Loco Translate - Version 2.3.2

Version Description

  • Removed login/email from default Last-Translator credit
  • Bumped WP compatibility to 5.4
  • Fixed PHP 7.4 deprecations
Download this release

Release Info

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

Code changes from version 2.3.1 to 2.3.2

languages/loco-translate.pot CHANGED
@@ -1,9 +1,9 @@
1
  #, fuzzy
2
  msgid ""
3
  msgstr ""
4
- "Project-Id-Version: Loco Translate 2.3.1\n"
5
  "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2019-10-18 10:23+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.3.1; wp-5.2.4"
17
 
18
  #: src/fs/FileWriter.php:214
19
  #, php-format
@@ -36,7 +36,7 @@ msgid "%s file is writeable"
36
  msgstr ""
37
 
38
  #. Shows number of fuzzy strings at top of editor
39
- #: src/js/Strings.php:48 src/gettext/Metadata.php:200
40
  #, javascript-format
41
  msgid "%s fuzzy"
42
  msgstr ""
@@ -48,13 +48,13 @@ msgid "%s on disk"
48
  msgstr ""
49
 
50
  #. Shows number of untranslated strings at top of editor
51
- #: src/js/Strings.php:52 src/gettext/Metadata.php:203
52
  #, javascript-format
53
  msgid "%s untranslated"
54
  msgstr ""
55
 
56
  #. Shows percentage translated at top of editor
57
- #: src/js/Strings.php:44 src/gettext/Metadata.php:198
58
  #, javascript-format
59
  msgid "%s%% translated"
60
  msgstr ""
@@ -83,7 +83,7 @@ msgstr[0] ""
83
  msgstr[1] ""
84
 
85
  #. Shows total string count at top of editor
86
- #: src/js/Strings.php:40 src/gettext/Metadata.php:188
87
  #, php-format
88
  msgid "1 string"
89
  msgid_plural "%s strings"
@@ -1187,12 +1187,12 @@ msgstr ""
1187
  msgid "Permission denied to update file"
1188
  msgstr ""
1189
 
1190
- #: src/package/Plugin.php:203
1191
  #, php-format
1192
  msgid "Plugin not found: %s"
1193
  msgstr ""
1194
 
1195
- #: src/mvc/AdminRouter.php:66 src/admin/config/PrefsController.php:48
1196
  #: src/admin/config/VersionController.php:22
1197
  #: src/admin/config/SettingsController.php:77 tpl/admin/help/tab-settings.php:2
1198
  msgid "Plugin settings"
@@ -1352,7 +1352,7 @@ msgstr ""
1352
  msgid "Save credentials in session"
1353
  msgstr ""
1354
 
1355
- #: tpl/admin/config/settings.php:170 tpl/admin/config/prefs.php:28
1356
  msgid "Save settings"
1357
  msgstr ""
1358
 
@@ -1405,7 +1405,7 @@ msgstr ""
1405
  msgid "Settings"
1406
  msgstr ""
1407
 
1408
- #: src/admin/config/PrefsController.php:32
1409
  #: src/admin/config/SettingsController.php:31
1410
  msgid "Settings saved"
1411
  msgstr ""
@@ -1660,7 +1660,7 @@ msgid ""
1660
  "the file writeable by %s"
1661
  msgstr ""
1662
 
1663
- #: src/hooks/AdminHooks.php:100
1664
  msgid "Translate"
1665
  msgstr ""
1666
 
@@ -1696,7 +1696,7 @@ msgstr ""
1696
  msgid "Translations have been recently modified in the following bundles"
1697
  msgstr ""
1698
 
1699
- #: tpl/admin/config/prefs.php:13 tpl/admin/config/prefs.php:17
1700
  msgid "Translator credit"
1701
  msgstr ""
1702
 
@@ -1739,7 +1739,7 @@ msgstr ""
1739
  msgid "User options apply to your WordPress login, across all sites"
1740
  msgstr ""
1741
 
1742
- #: src/data/Permissions.php:156
1743
  msgctxt "User role"
1744
  msgid "Translator"
1745
  msgstr ""
1
  #, fuzzy
2
  msgid ""
3
  msgstr ""
4
+ "Project-Id-Version: Loco Translate 2.3.2-dev\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2020-03-31 12:22+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.3.2-dev; wp-5.4-RC5-47533"
17
 
18
  #: src/fs/FileWriter.php:214
19
  #, php-format
36
  msgstr ""
37
 
38
  #. Shows number of fuzzy strings at top of editor
39
+ #: src/js/Strings.php:48 src/gettext/Metadata.php:205
40
  #, javascript-format
41
  msgid "%s fuzzy"
42
  msgstr ""
48
  msgstr ""
49
 
50
  #. Shows number of untranslated strings at top of editor
51
+ #: src/js/Strings.php:52 src/gettext/Metadata.php:208
52
  #, javascript-format
53
  msgid "%s untranslated"
54
  msgstr ""
55
 
56
  #. Shows percentage translated at top of editor
57
+ #: src/js/Strings.php:44 src/gettext/Metadata.php:203
58
  #, javascript-format
59
  msgid "%s%% translated"
60
  msgstr ""
83
  msgstr[1] ""
84
 
85
  #. Shows total string count at top of editor
86
+ #: src/js/Strings.php:40 src/gettext/Metadata.php:193
87
  #, php-format
88
  msgid "1 string"
89
  msgid_plural "%s strings"
1187
  msgid "Permission denied to update file"
1188
  msgstr ""
1189
 
1190
+ #: src/package/Plugin.php:207
1191
  #, php-format
1192
  msgid "Plugin not found: %s"
1193
  msgstr ""
1194
 
1195
+ #: src/mvc/AdminRouter.php:66 src/admin/config/PrefsController.php:42
1196
  #: src/admin/config/VersionController.php:22
1197
  #: src/admin/config/SettingsController.php:77 tpl/admin/help/tab-settings.php:2
1198
  msgid "Plugin settings"
1352
  msgid "Save credentials in session"
1353
  msgstr ""
1354
 
1355
+ #: tpl/admin/config/settings.php:170 tpl/admin/config/prefs.php:29
1356
  msgid "Save settings"
1357
  msgstr ""
1358
 
1405
  msgid "Settings"
1406
  msgstr ""
1407
 
1408
+ #: src/admin/config/PrefsController.php:26
1409
  #: src/admin/config/SettingsController.php:31
1410
  msgid "Settings saved"
1411
  msgstr ""
1660
  "the file writeable by %s"
1661
  msgstr ""
1662
 
1663
+ #: src/hooks/AdminHooks.php:102
1664
  msgid "Translate"
1665
  msgstr ""
1666
 
1696
  msgid "Translations have been recently modified in the following bundles"
1697
  msgstr ""
1698
 
1699
+ #: tpl/admin/config/prefs.php:14 tpl/admin/config/prefs.php:18
1700
  msgid "Translator credit"
1701
  msgstr ""
1702
 
1739
  msgid "User options apply to your WordPress login, across all sites"
1740
  msgstr ""
1741
 
1742
+ #: src/data/Permissions.php:157
1743
  msgctxt "User role"
1744
  msgid "Translator"
1745
  msgstr ""
lib/compiled/gettext.php CHANGED
@@ -5,34 +5,34 @@
5
  interface LocoArrayInterface extends ArrayAccess, Iterator, Countable, JsonSerializable { public function getArrayCopy(); }
6
  class LocoHeaders extends ArrayIterator implements LocoArrayInterface { private $map = array(); public function __construct(array $raw = array() ){ if( $raw ){ $keys = array_keys( $raw ); $this->map = array_combine( array_map( 'strtolower', $keys ), $keys ); parent::__construct($raw); } } public function normalize( $key ){ $k = strtolower($key); return isset($this->map[$k]) ? $this->map[$k] : null; } public function add($key, $val ){ $this->offsetSet( $key, $val ); return $this; } public function __toString(){ $pairs = array(); foreach( $this as $key => $val ){ $pairs[] = $key.': '.$val; } return implode("\n", $pairs ); } public function trimmed($prop ){ return trim( $this->__get($prop) ); } public function has($key ){ $k = strtolower($key); return isset($this->map[$k]); } public function __get($key ){ return $this->offsetGet( $key ); } public function __set($key, $val ){ $this->offsetSet( $key, $val ); } public function offsetExists($k ){ return ! is_null( $this->normalize($k) ); } public function offsetGet($k ){ $k = $this->normalize($k); if( is_null($k) ){ return ''; } return parent::offsetGet($k); } public function offsetSet($key, $v ){ $k = strtolower($key); if( isset($this->map[$k]) && $key !== $this->map[$k] ){ parent::offsetUnset( $this->map[$k] ); } $this->map[$k] = $key; parent::offsetSet( $key, $v ); } public function offsetUnset($key ){ $k = strtolower($key); if( isset($this->map[$k]) ){ parent::offsetUnset( $this->map[$k] ); unset( $this->map[$k] ); } } public function jsonSerialize(){ return $this->getArrayCopy(); } public function keys(){ trigger_error('Is this required?', E_USER_NOTICE); return array_values( $this->map ); } }
7
  function loco_normalize_charset( $cs ){ if( preg_match('/^UTF-?8$/i',$cs) ){ return 'UTF-8'; } $aliases = @mb_encoding_aliases($cs); if( false === $aliases ){ throw new InvalidArgumentException('Unsupported character encoding: '.$cs ); } if( $r = preg_grep('/^ISO[-_]\\d+[-_]\\d+$/i',$aliases) ){ $cs = current($aliases); $cs = strtr( strtoupper($cs), '_', '-' ); } else if( in_array('US-ASCII',$aliases,true) ){ $cs = 'US-ASCII'; } return $cs; }
8
- class LocoPoHeaders extends LocoHeaders { private $cs; public function getCharset(){ $cs = $this->cs; if( is_null($cs) ){ $cs = ''; $raw = $this->offsetGet('content-type'); if( $raw && preg_match('!\\bcharset[= ]+([-\\w]+)!',$raw,$r) ){ try { $cs = loco_normalize_charset($r[1]); } catch( InvalidArgumentException $e ){ $cs = null; } } $this->cs = $cs; } return $cs; } public function setCharset( $to ){ $to = loco_normalize_charset($to); $from = $this->getCharset(); $this->cs = $to; $this['Content-Type'] = 'text/plain; charset='.$to; if( $from && $from !== $to ){ foreach( $this as $key => $val ){ $this[$key] = mb_convert_encoding($val,$to,$from); } } return $to; } public static function fromMsgstr( $str ){ $headers = new LocoPoHeaders; $key = ''; foreach( preg_split('/[\\r\\n]+/',$str) as $line ){ $i = strpos($line,':'); if( is_int($i) ){ $key = trim( substr($line,0,$i), " \t" ); $headers->offsetSet( $key, ltrim( substr($line,++$i)," \t" ) ); } else if( '' !== $key ){ $headers->offsetSet( $key, $headers->offsetGet($key)."\n".$line ); } } $cs = $headers->getCharset(); if( $cs && 'UTF-8' !== $cs && 'UTF-8' !== mb_detect_encoding($str,array('UTF-8',$cs),true) ){ foreach( $headers as $key => $val ){ $headers[$key] = mb_convert_encoding($val,'UTF-8',array($cs)); } } return $headers; } public static function fromSource( $raw ){ $po = new LocoPoParser($raw); $po->parse(0); return $po->getHeader(); } }
9
- function loco_convert_utf8( $str, $enc ){ if( '' === $enc ){ if( false === preg_match('//u',$str) ){ $str = mb_convert_encoding( $str, 'UTF-8', 'cp1252' ); } } else if( 'UTF-8' === $enc || 'US-ASCII' === $enc ){ if( false === preg_match('//u',$str) ){ throw new InvalidArgumentException('Bad '.$enc.' encoding'); } } else if( 'ISO-8859-1' === $enc ) { $str = mb_convert_encoding( $str, 'UTF-8', 'cp1252' ); } else { $str = mb_convert_encoding( $str, 'UTF-8', $enc ); } return $str; }
10
  abstract class LocoGettextParser { private $head; private $cs; abstract public function parse( $limit = -1 ); protected function setHeader( LocoPoHeaders $head ){ $this->head = $head; if( $cs = $head->getCharset() ){ if( is_null($this->cs) ){ $this->setCharset($cs); } } return $head; } public function getHeader(){ return $this->head; } protected function setCharset( $cs ){ $this->cs = $cs; } protected function getCharset(){ return $this->cs; } protected function str( $str ){ if( '' !== $str ){ $enc = (string) $this->cs; $str = loco_convert_utf8( $str, $enc ); } return $str; } }
11
- function loco_remove_bom( $s, &$c ){ $bom = substr($s,0,2); if( "\xFF\xFE" === $bom ){ $c = 'UTF-16LE'; return substr($s,2); } if( "\xFE\xFF" === $bom ){ $c = 'UTF-16BE'; return substr($s,2); } if( "\xEF\xBB" === $bom && "\xBF" === $s{2} ){ $c = 'UTF-8'; return substr($s,3); } $c = ''; return $s; }
12
  function loco_parse_reference_id( $refs, &$_id ){ if( false === ( $n = strpos($refs,'loco:') ) ){ $_id = ''; return $refs; } $_id = substr($refs, $n+5, 24 ); $refs = substr_replace( $refs, '', $n, 29 ); return trim( $refs ); }
13
- class LocoPoParser extends LocoGettextParser implements Iterator { private $lines = array(); private $i; private $k; private $m; public function __construct( $src ){ if( '' !== $src ){ $src = loco_remove_bom($src,$cs); if( $cs && 'UTF-8' !== $cs ){ $src = mb_convert_encoding( $src, 'UTF-8', array($cs) ); } if( 'UTF-8' === mb_detect_encoding($src,array('UTF-8','ISO-8859-1'),true) ){ $this->setCharset('UTF-8'); } $this->lines = preg_split('/(\\r\\n?|\\n)/', $src ); } } public function rewind(){ $this->i = -1; $this->k = -1; $this->next(); } public function valid(){ return is_int($this->i); } public function key(){ return $this->k; } public function current(){ return $this->m; } public function next(){ $valid = false; $entry = array( '#' => array(), 'id' => array(null), 'str' => array(null) ); $i = $this->i; while( array_key_exists(++$i,$this->lines) ){ $line = $this->lines[$i]; try { if( '' === $line ){ if( $valid ){ break; } continue; } $c = $line{0}; if( '#' === $c ){ if( $valid ){ $i--; break; } $f = isset($line{1}) ? $line{1} : ' '; $entry['#'][$f][] = trim( substr( $line, 1+strlen($f) ), "/ \n\r\t" ); } else if( preg_match('/^msg(id(?:_plural)?|ctxt|str(?:\\[(\\d+)\\])?)[ \\t]*/', $line, $r ) ){ if( isset($r[2]) ){ $key = 'str'; $idx = (int) $r[2]; } else { $key = $r[1]; $idx = 0; } if( $valid && 'str' !== $key && null !== $entry['str'][0] ){ $i--; break; } $val = ''; $line = substr( $line, strlen($r[0]) ); if( ! $line || '"' !== $line{0} ){ throw new Exception('Expected " to follow msg'.$key); } while( true ){ if( '"' === $line || '"' !== substr($line,-1) ){ throw new Exception('Unterminated msg'.$key ); } $val .= substr( $line, 1, -1 ); $j = $i + 1; if( array_key_exists($j,$this->lines) && ( $line = $this->lines[$j] ) && '"' === $line{0} ){ $i = $j; } else { break; } } if( ! $valid ){ $valid = true; } if( 'id_plural' === $key ){ $key = 'id'; $idx = 1; } $entry[$key][$idx] = stripcslashes($val); } else if( preg_match('/^[ \\t]+$/',$line) ){ if( $valid ) { break; } } else if( '"' === $c ){ throw new Exception('String encountered without keyword'); } else { throw new Exception('Junk'); } } catch( Exception $e ){ } } if( $valid ){ ++$this->k; $this->i = $i; $this->m = $entry; } else { $this->i = null; $this->k = null; $this->m = null; } } public function parse( $limit = -1 ){ $this->rewind(); if( ! $this->valid() ){ throw new Loco_error_ParseException('Invalid PO file'); } $i = -1; $assets = array(); $entry = $this->current(); if( '' !== $entry['id'][0] || isset($entry['ctxt']) || is_null($entry['str'][0]) ){ $head = $this->setHeader( new LocoPoHeaders ); } else { $head = $this->setHeader( LocoPoHeaders::fromMsgstr($entry['str'][0]) ); } $lk = $head['X-Loco-Lookup']; while( $this->valid() ){ $entry = $this->current(); $this->next(); $msgid = $entry['id'][0]; if( is_null($msgid) ){ continue; } if( ++$i === $limit ){ return $assets; } $asset = array( 'source' => $this->str( $msgid ), 'target' => $this->str( (string) $entry['str'][0] ), 'context' => null, ); $prev_entry = null; if( isset($entry['ctxt']) ){ $asset['context'] = $this->str( $entry['ctxt'][0] ); } $cmt = $entry['#']; if( isset($cmt[' ']) ){ $asset['comment'] = $this->str( implode("\n", $cmt[' '] ) ); } if( isset($cmt['.']) ){ $asset['notes'] = $this->str( implode("\n", $cmt['.'] ) ); } if( isset($cmt[':']) ){ if( $refs = implode( ' ', $cmt[':'] ) ) { $refs = $this->str($refs); if( $refs = loco_parse_reference_id( $refs, $_id ) ){ $asset['refs'] = $refs; } if( $_id ){ $asset['_id'] = $_id; } } } if( isset($cmt[',']) ){ foreach( $cmt[','] as $flags ){ foreach( explode(',',$flags) as $flag ){ if( $flag = trim($flag," \t") ){ if( preg_match('/^((?:no-)?\w+)-format/', $flag, $r ) ){ $asset['format'] = $r[1]; } else if( 'fuzzy' === $flag ){ $asset['flag'] = 4; } } } } } if( isset($cmt['|']) ){ $p = new LocoPoParser(''); $p->lines = $cmt['|']; $p->setCharset( $this->getCharset() ); try { $prev_entry = $p->parse(); } catch( Loco_error_ParseException $e ){ } if( $prev_entry ){ $msgid = $prev_entry[0]['source']; if( $lk ){ $asset[$lk] = $asset['source']; $asset['source'] = $msgid; } else if( 'loco:' === substr($msgid,0,5) ){ $asset['_id'] = substr($msgid,5); } else { $asset['prev'] = $prev_entry; } } else { $prev_entry = null; } } $assets[] = $asset; if( isset($entry['id'][1]) ){ $idx = 0; $pidx = count($assets) - 1; $num = max( 2, count($entry['str']) ); while( ++$idx < $num ){ $plural = array( 'source' => '', 'target' => isset($entry['str'][$idx]) ? $this->str($entry['str'][$idx]) : '', 'plural' => $idx, 'parent' => $pidx, ); if( 1 === $idx ){ $plural['source'] = $this->str($entry['id'][1]); if( $lk && is_array($prev_entry) && isset($prev_entry[1]) ){ $plural[$lk] = $plural['source']; $plural['source'] = $prev_entry[1]['source']; } } if( isset($asset['flag']) ){ $plural['flag'] = $asset['flag']; } $assets[] = $plural; } } } if( -1 === $i ){ throw new Loco_error_ParseException('Invalid PO file'); } else if( 0 === $i && '' === $assets[0]['source'] && '' === $assets[0]['target'] ){ throw new Loco_error_ParseException('Invalid PO file' ); } return $assets; } }
14
  class LocoMoParser extends LocoGettextParser { private $bin; private $be; private $n; private $o; private $t; private $v; public function __construct( $bin ){ $this->bin = $bin; } public function getAt( $idx ){ $offset = $this->targetOffset(); $offset += ( $idx * 8 ); $len = $this->integerAt( $offset ); $idx = $this->integerAt( $offset + 4 ); $txt = $this->bytes( $idx, $len ); if( false === strpos( $txt, "\0") ){ return $txt; } return explode( "\0", $txt ); } public function parse( $limit = -1 ){ $i = -1; $r = array(); $sourceOffset = $this->sourceOffset(); $targetOffset = $this->targetOffset(); $soffset = $sourceOffset; $toffset = $targetOffset; while( $soffset < $targetOffset ){ $len = $this->integerAt( $soffset ); $idx = $this->integerAt( $soffset + 4 ); $src = $this->bytes( $idx, $len ); $eot = strpos( $src, "\x04" ); if( false === $eot ){ $context = null; } else { $context = $this->str( substr($src, 0, $eot ) ); $src = substr( $src, $eot+1 ); } $sources = explode( "\0", $src, 2 ); $len = $this->integerAt( $toffset ); $idx = $this->integerAt( $toffset + 4 ); $targets = explode( "\0", $this->bytes( $idx, $len ) ); if( -1 === $i && '' === $sources[0] && is_null($context) ){ $this->setHeader( LocoPoHeaders::fromMsgstr($targets[0]) ); } if( ++$i === $limit ){ break; } $r[$i] = array( 'source' => $this->str( $sources[0] ), 'target' => $this->str( $targets[0] ), 'context' => $context, ); if( isset($sources[1]) ){ $p = count($r) - 1; $nforms = max( 2, count($targets) ); for( $i = 1; $i < $nforms; $i++ ){ $r[] = array( 'source' => isset($sources[$i]) ? $this->str( $sources[$i] ) : sprintf('%s (plural %u)',$r[$p]['source'],$i), 'target' => isset($targets[$i]) ? $this->str( $targets[$i] ) : '', 'parent' => $p, 'plural' => $i, ); } } $soffset += 8; $toffset += 8; } return $r; } public function isBigendian(){ if( is_null($this->be) ){ $str = $this->words( 0, 1 ); if( "\xDE\x12\x04\x95" === $str ){ $this->be = false; } else if( "\x95\x04\x12\xDE" === $str ){ $this->be = true; } else { throw new Loco_error_ParseException('Invalid MO format'); } } return $this->be; } public function version(){ if( is_null($this->v) ){ $this->v = $this->integerWord(1); } return $this->v; } public function count(){ if( is_null($this->n) ){ $this->n = $this->integerWord(2); } return $this->n; } public function sourceOffset(){ if( is_null($this->o) ){ $this->o = $this->integerWord(3); } return $this->o; } public function targetOffset(){ if( is_null($this->t) ){ $this->t = $this->integerWord(4); } return $this->t; } public function getHashTable(){ $s = $this->integerWord(5); $h = $this->integerWord(6); return $this->bytes( $h, $s * 4 ); } private function bytes( $offset, $length ){ $s = substr( $this->bin, $offset, $length ); if( strlen($s) !== $length ){ throw new Loco_error_ParseException('Failed to read '.$length.' bytes at ['.$offset.']' ); } return $s; } private function words( $offset, $length ){ return $this->bytes( $offset * 4, $length * 4 ); } private function integerWord( $offset ){ return $this->integerAt( $offset * 4 ); } private function integerAt( $offset ){ $str = $this->bytes( $offset, 4 ); $fmt = $this->isBigendian() ? 'N' : 'V'; $arr = unpack( $fmt, $str ); if( ! isset($arr[1]) || ! is_int($arr[1]) ){ throw new Loco_error_ParseException('Failed to read integer at byte '.$offset); } return $arr[1]; } }
15
  abstract class LocoPo { public static function pair( $key, $text, $width = 79, $eol = "\n", $esc = '\\n' ){ if( '' === $text ){ return $key.' ""'; } $text = addcslashes( $text, "\t\x0B\x0C\x07\x08\\\"" ); if( $esc ) { $text = preg_replace('/(?:\\r\\n?|\\n)/', $esc.$eol, $text, -1, $nbr ); } else { $eol = "\n"; $text = preg_replace_callback('/(?:\\r\\n?|\\n)/',array(__CLASS__,'replace_br'), $text, -1, $nbr ); } if( $nbr ){ } else if( $width && $width < mb_strlen($text,'UTF-8') + strlen($key) + 3 ){ } else { return $key.' "'.$text.'"'; } $lines = array( $key.' "' ); if( $width ){ $width -= 2; $a = '/^.{0,'.($width-1).'}[-– \\.,:;\\?!\\)\\]\\}\\>]/u'; $b = '/^[^-– \\.,:;\\?!\\)\\]\\}\\>]+/u'; foreach( explode($eol,$text) as $unwrapped ){ $length = mb_strlen( $unwrapped, 'UTF-8' ); while( $length > $width ){ if( preg_match( $a, $unwrapped, $r ) ){ $line = $r[0]; } else if( preg_match( $b, $unwrapped, $r ) ){ $line = $r[0]; } else { throw new Exception('Wrapping error'); } $lines[] = $line; $trunc = mb_strlen($line,'UTF-8'); $length -= $trunc; $unwrapped = (string) substr( $unwrapped, strlen($line) ); if( ( '' === $unwrapped && 0 !== $length ) || ( 0 === $length && '' !== $unwrapped ) ){ throw new Exception('Truncation error'); } } if( 0 !== $length ){ $lines[] = $unwrapped; } } } else { foreach( explode($eol,$text) as $unwrapped ){ $lines[] = $unwrapped; } } return implode('"'.$eol.'"',$lines).'"'; } private static function replace_br( array $r ){ return addcslashes($r[0],"\r\n")."\n"; } public static function refs( $text, $width = 76, $eol = "\n" ){ $text = preg_replace('/\\s+/u', ' ', $text ); if( $width ){ $text = wordwrap( $text, $width, $eol.'#: ', false ); } return '#: '.$text; } public static function prefix( $text, $prefix, $eol = "\n" ){ $lines = preg_split('/\\R/u', $text, -1 ); return $prefix.implode( $eol.$prefix, $lines ); } }
16
  class LocoPoIterator implements Iterator, Countable { private $po; private $headers; private $i; private $t; private $j; private $z; private $w = 79; public function __construct( $po ){ $this->po = $po; $this->t = count( $po ); if( ! isset($po[0]) ){ throw new InvalidArgumentException('Empty PO data'); } $h = $po[0]; if( '' === $h['source'] && empty($h['context']) ){ $this->z = 0; } else { $this->z = -1; } } public function count(){ return $this->t - ( $this->z + 1 ); } public function wrap( $width ){ $width = (int) $width; if( $width > 0 ){ $this->w = max( 15, $width ); } else { $this->w = 0; } return $this; } public function rewind(){ $this->i = $this->z; $this->j = -1; $this->next(); } public function key(){ return $this->j; } public function valid(){ return is_int($this->i); } public function next(){ $i = $this->i; while( ++$i < $this->t ){ $this->j++; $this->i = $i; return; } $this->i = null; $this->j = null; } public function current(){ $i = $this->i; $po = $this->po; $parent = new LocoPoMessage( $po[$i] ); $plurals = array(); while( isset($po[++$i]['parent']) ){ $this->i = $i; $plurals[] = new LocoPoMessage( $po[$i] ); } if( $plurals ){ $parent['plurals'] = $plurals; } return $parent; } public function getArrayCopy(){ $po = $this->po; if( 0 === $this->z ){ $po[0]['target'] = (string) $this->getHeaders(); } return $po; } public function getHeaders(){ if( ! $this->headers ){ $header = $this->po[0]; if( 0 === $this->z ){ $this->headers = LocoPoHeaders::fromMsgstr( $header['target'] ); } else { $this->headers = new LocoPoHeaders; } } return $this->headers; } public function initPo(){ if( 0 === $this->z ){ unset( $this->po[0]['flag'] ); } return $this; } public function initPot(){ if( 0 === $this->z ){ $this->po[0]['flag'] = 4; } return $this; } public function strip(){ $po = $this->po; $i = count($po); $z = $this->z; while( --$i > $z ){ $po[$i]['target'] = ''; } $this->po = $po; return $this; } public function __toString(){ try { return $this->render(); } catch( Exception $e ){ trigger_error( $e->getMessage(), E_USER_WARNING ); return ''; } } public function render( $sorter = null ){ $width = $this->w; $ref_width = max( 0, $width - 3 ); if( 0 === $this->z ){ $h = $this->po[0]; } else { $h = array( 'source' => '' ); } $h['target'] = (string) $this->getHeaders(); $msg = new LocoPoMessage( $h ); $s = $msg->render( $width, $ref_width ); if( $sorter ){ if( ! is_callable($sorter) ){ throw new InvalidArgumentException('Bad callback'); } $msgs = array(); foreach( $this as $msg ){ $msgs[] = $msg; } usort( $msgs, $sorter ); } else { $msgs = $this; } foreach( $msgs as $msg ){ $s .= "\n".$msg->render( $width, $ref_width ); } return $s; } public function exportRefs( $grep = '' ){ $a = array(); if( '' === $grep ) { $grep = '/(\\S+):\\d+/'; } else { $grep = '/(\\S*'.$grep.'):\\d+/'; } foreach( $this as $message ){ if( preg_match_all( $grep, (string) $message->refs, $r ) ){ foreach( $r[1] as $ref ) { $a[$ref][] = $message; } } } return $a; } public function splitRefs( array $map = null ){ $a = array(); foreach( $this as $message ){ $refs = ltrim( (string) $message->refs ); if( '' !== $refs ){ if( preg_match_all('/\\S+\\.([a-z]+):\\d+/', $refs, $r, PREG_SET_ORDER ) ){ $tmp = array(); foreach( $r as $rr ) { list( $ref, $ext ) = $rr; $tmp[$ext][$ref] = true; } foreach( $tmp as $ext => $refs ){ if( is_null($map) ){ } else if( isset($map[$ext]) ){ $ext = $map[$ext]; } else { continue; } $message = clone $message; $message['refs'] = implode(' ',array_keys($refs) ); $a[$ext][] = $message; } } } } return $a; } public function getHashes(){ $a = array(); foreach( $this as $msg ){ $a[] = $msg->getHash(); } sort( $a, SORT_STRING ); return $a; } public function equalSource( LocoPoIterator $that ){ $a = $this->getHashes(); $b = $that->getHashes(); if( count($a) !== count($b) ){ return false; } foreach( $a as $i => $hash ){ if( $hash !== $b[$i] ){ return false; } } return true; } public function sort( $func = null ){ $order = array(); foreach( $this as $msg ){ $order[] = $msg; } if( is_null($func) ){ $func = array( __CLASS__, 'compare' ); } else if( ! is_callable($func) ){ throw new InvalidArgumentException('Bad callback'); } usort( $order, $func ); $po = array(); if( 0 === $this->z ){ $po[] = $this->po[0]; } foreach( $order as $msg ){ $po[] = $msg->getArrayCopy(); if( is_array( $plurals = $msg->plurals ) ){ $index = count($po) - 1; unset( $po[$index]['plurals'] ); foreach( $plurals as $p ){ $a = $p->getArrayCopy(); $a['parent'] = $index; $po[] = $a; } } } $this->po = $po; return $this; } public static function compare( LocoPoMessage $a, LocoPoMessage $b ){ $h = $a->getHash(); $j = $b->getHash(); $n = strcasecmp( $h, $j ); if( 0 === $n ){ $n = strcmp( $h, $j ); if( 0 === $n ){ return 0; } } return $n > 0 ? 1 : -1; } public function createSorter(){ $index = array(); foreach( $this as $i => $msg ){ $index[ $msg->getHash() ] = $i; } $obj = new LocoPoIndex( $index ); return array( $obj, 'compare' ); } }
17
  class LocoPoIndex extends ArrayIterator { public function compare( LocoPoMessage $a, LocoPoMessage $b ){ $h = $a->getHash(); if( ! isset($this[$h]) ){ return 1; } $j = $b->getHash(); if( ! isset($this[$j]) ){ return -1; } return $this[$h] > $this[$j] ? 1 : -1; } }
18
- class LocoPoMessage extends ArrayObject { public function __construct( array $r ){ $r['key'] = $r['source']; parent::__construct($r); } public function __get( $prop ){ return isset($this[$prop]) ? $this[$prop] : null; } private function _getFlags(){ $flags = array(); $plurals = $this->__get('plurals'); if( 4 === $this->__get('flag') ){ $flags[] = 'fuzzy'; } else if( $plurals ){ foreach( $plurals as $child ){ if( 4 === $child->__get('flag') ){ $flags[] = 'fuzzy'; break; } } } if( $f = $this->__get('format') ){ $flags[] = $f.'-format'; } else if( isset($plurals[0]) && ( $f = $plurals[0]->format ) ){ $flags[] = $f.'-format'; } return $flags; } public function getHash(){ $hash = $this->getKey(); if( isset($this['plurals']) ){ foreach( $this['plurals'] as $p ){ $hash .= "\0".$p->getHash(); break; } } return $hash; } public function getKey(){ $msgid = (string) $this['source']; $msgctxt = (string) $this->__get('context'); if( '' !== $msgctxt ){ if( '' === $msgid ){ $msgid = '('.$msgctxt.')'; } $msgid = $msgctxt."\4".$msgid; } return $msgid; } public function getMsgstrs(){ $a = array( $this['target'] ); $plurals = $this->__get('plurals'); if( is_array($plurals) ){ foreach( $plurals as $i => $p ){ $a[] = $p['target']; } } return $a; } public function __toString(){ return $this->render( 79, 76 ); } public function render( $width, $ref_width ){ $s = ''; try { if( $text = $this->__get('comment') ) { $s .= LocoPo::prefix( $text, '# ')."\n"; } if( $text = $this->__get('notes') ) { $s .= LocoPo::prefix( $text, '#. ')."\n"; } if( $text = $this->__get('refs') ){ $s .= LocoPo::refs( $text, $ref_width )."\n"; } if( $texts = $this->_getFlags() ){ $s .= '#, '.implode(', ',$texts)."\n"; } $text = $this->__get('context'); if( is_string($text) && isset($text{0}) ){ $s .= LocoPo::pair('msgctxt', $text, $width )."\n"; } $s .= LocoPo::pair( 'msgid', $this['key'], $width )."\n"; $target = $this['target']; if( is_array( $plurals = $this->__get('plurals') ) ){ if( $plurals ){ foreach( $plurals as $i => $p ){ if( 0 === $i ){ $s .= LocoPo::pair('msgid_plural', $p['key'], $width )."\n"; $s .= LocoPo::pair('msgstr[0]', $target, $width )."\n"; } $s .= LocoPo::pair('msgstr['.(++$i).']', $p['target'], $width )."\n"; } } else if( isset($this['plural_key']) ){ $s .= LocoPo::pair('msgid_plural', $this['plural_key'], $width )."\n"; $s .= LocoPo::pair('msgstr[0]', $target, $width )."\n"; } else { trigger_error('Missing plural_key in zero plural export'); $s .= LocoPo::pair('msgstr', $target, $width )."\n"; } } else { $s .= LocoPo::pair('msgstr', $target, $width )."\n"; } } catch( Exception $e ){ trigger_error( $e->getMessage(), E_USER_WARNING ); } return $s; } }
19
- class LocoMoTable { private $size = 0; private $bin = ''; private $map; public function __construct( $data = null ){ if( is_array($data) ){ $this->compile( $data ); } else if( $data ){ $this->parse( $data ); } } public function count(){ if( ! isset($this->size) ){ if( $this->bin ){ $this->size = (int) ( strlen( $this->bin ) / 4 ); } else if( is_array($this->map) ){ $this->size = count($this->map); } else { return 0; } if( ! self::is_prime($this->size) || $this->size < 3 ){ throw new Exception('Size expected to be prime number above 2, got '.$this->size); } } return $this->size; } public function bytes(){ return $this->count() * 4; } public function __toString(){ return $this->bin; } public function export(){ if( ! is_array($this->map) ){ $this->parse( $this->bin ); } return $this->map; } private function reset( $length ){ $this->size = max( 3, self::next_prime ( $length * 4 / 3 ) ); $this->bin = null; $this->map = array(); return $this->size; } public function compile( array $msgids ){ $hash_tab_size = $this->reset( count($msgids) ); $packed = array_fill( 0, $hash_tab_size, "\0\0\0\0" ); $j = 0; foreach( $msgids as $msgid ){ $hash_val = self::hashpjw( $msgid ); $idx = $hash_val % $hash_tab_size; if( array_key_exists($idx, $this->map) ){ $incr = 1 + ( $hash_val % ( $hash_tab_size - 2 ) ); do { $idx += $incr; if( $hash_val === $idx ){ throw new Exception('Unable to find empty slot in hash table'); } $idx %= $hash_tab_size; } while( array_key_exists($idx, $this->map ) ); } $this->map[$idx] = $j; $packed[$idx] = pack('V', ++$j ); } return $this->bin = implode('',$packed); } public function lookup( $msgid, array $msgids ){ $hash_val = self::hashpjw( $msgid ); $idx = $hash_val % $this->size; $incr = 1 + ( $hash_val % ( $this->size - 2 ) ); while( true ){ if( ! array_key_exists($idx, $this->map) ){ break; } $j = $this->map[$idx]; if( isset($msgids[$j]) && $msgid === $msgids[$j] ){ return $j; } $idx += $incr; if( $idx === $hash_val ){ break; } $idx %= $this->size; } return -1; } public function parse( $bin ){ $this->bin = (string) $bin; $this->size = null; $hash_tab_size = $this->count(); $this->map = array(); $idx = -1; $byte = 0; while( ++$idx < $hash_tab_size ){ $word = substr( $this->bin, $byte, 4 ); if( "\0\0\0\0" !== $word ){ list(,$j) = unpack('V', $word ); $this->map[$idx] = $j - 1; } $byte += 4; } return $this->map; } public static function hashpjw( $str ){ $i = -1; $hval = 0; $len = strlen($str); while( ++$i < $len ){ $ord = ord( $str{$i} ); $hval = ( $hval << 4 ) + $ord; $g = $hval & 0xf0000000; if( $g !== 0 ){ $hval ^= $g >> 24; $hval ^= $g; } } return $hval; } private static function next_prime( $seed ){ $seed |= 1; while ( ! self::is_prime($seed) ){ $seed += 2; } return $seed; } private static function is_prime( $num ) { if ($num === 1 ){ return false; } if( $num === 2 ){ return true; } if( $num % 2 == 0 ) { return false; } for( $i = 3; $i <= ceil(sqrt($num)); $i = $i + 2) { if($num % $i == 0 ){ return false; } } return true; } }
20
  class LocoMo { private $bin; private $msgs; private $head; private $hash; private $use_fuzzy = false; private $cs; public function __construct( Iterator $export, LocoPoHeaders $head = null ){ if( $head ){ $this->head = $head; } else { $this->head = new LocoPoHeaders(array('Project-Id-Version' => 'Loco')); } $this->msgs = $export; $this->bin = ''; } public function setCharset( $cs ){ $cs = $this->head->setCharset($cs); $this->cs = 'UTF-8' === $cs ? null : $cs; } public function enableHash(){ return $this->hash = new LocoMoTable; } public function useFuzzy(){ $this->use_fuzzy = true; } public function setHeader( $key, $val ){ $this->head->add($key, $val); return $this; } private function str( $s ){ $s = (string) $s; if( $cs = $this->cs ){ $s = mb_convert_encoding($s,$cs,array('UTF-8')); } return $s; } public function compile(){ $table = array(''); $sources = array(''); $targets = array( (string) $this->head ); $fuzzy_flag = 4; $skip_fuzzy = ! $this->use_fuzzy; foreach( $this->msgs as $r ){ if( $skip_fuzzy && isset($r['flag']) && $fuzzy_flag === $r['flag'] ){ continue; } $msgid = $this->str( $r['key'] ); if( isset($r['context']) ){ $msgctxt = $this->str( $r['context'] ); if( '' !== $msgctxt ){ if( '' === $msgid ){ $msgid = '('.$msgctxt.')'; } $msgid = $msgctxt."\x04".$msgid; } } if( '' === $msgid ){ continue; } $msgstr = $this->str( $r['target'] ); if( '' === $msgstr ){ continue; } $table[] = $msgid; if( isset($r['plurals']) ){ foreach( $r['plurals'] as $i => $p ){ if( $i === 0 ){ $msgid .= "\0".$p['key']; } $msgstr .= "\0".$p['target']; } } $sources[] = $msgid; $targets[] = $msgstr; } asort( $sources, SORT_STRING ); $this->bin = "\xDE\x12\x04\x95\x00\x00\x00\x00"; $n = count($sources); $this->writeInteger( $n ); $offset = 28; $this->writeInteger( $offset ); $offset += $n * 8; $this->writeInteger( $offset ); if( $this->hash ){ sort( $table, SORT_STRING ); $this->hash->compile( $table ); $s = $this->hash->count(); } else { $s = 0; } $this->writeInteger( $s ); $offset += $n * 8; $this->writeInteger( $offset ); if( $s ){ $offset += $s * 4; } $source = ''; foreach( $sources as $i => $str ){ $source .= $str."\0"; $this->writeInteger( $strlen = strlen($str) ); $this->writeInteger( $offset ); $offset += $strlen + 1; } $target = ''; foreach( array_keys($sources) as $i ){ $str = $targets[$i]; $target .= $str."\0"; $this->writeInteger( $strlen = strlen($str) ); $this->writeInteger( $offset ); $offset += $strlen + 1; } if( $this->hash ){ $this->bin .= $this->hash->__toString(); } $this->bin .= $source; $this->bin .= $target; return $this->bin; } private function writeInteger( $num ){ $this->bin .= pack( 'V', $num ); return $this; } }
21
  interface LocoTokensInterface extends Iterator { public function advance(); public function ignore( array $a ); }
22
- class LocoTokenizer implements LocoTokensInterface { const T_LITERAL = 0; const T_UNKNOWN = -1; private $src; private $pos; private $line; private $col; private $max; private $rules = array(); private $skip = array(); private $tok; private $len; public function __construct( $src = '' ){ $this->init($src); } public function parse( $src ){ $tokens = array(); $this->init($src); while( $tok = $this->advance() ){ $tokens[] = $tok; } return $tokens; } public function init( $src ){ $this->src = $src; $this->rewind(); return $this; } public function define( $grep, $t = 0 ){ if('^' !== substr($grep,1,1) ){ throw new InvalidArgumentException('Expression '.$grep.' isn\'t anchored'); } if( ! is_int($t) && ! is_callable($t) ){ throw new InvalidArgumentException('Non-integer token must be valid callback'); } $sniff = substr($grep,2,1); if( $sniff === preg_quote($sniff,$grep{0}) ){ $this->rules[$sniff][] = array( $grep, $t ); } else { $this->rules[''][] = array( $grep, $t ); } return $this; } public function ignore( array $a ){ foreach( $a as $t ){ $this->skip[$t] = true; } return $this; } public function current(){ return $this->tok; } public function advance(){ $tok = $this->current(); $this->next(); return $tok; } public function next(){ $tok = null; $offset = $this->pos; $column = $this->col; $line = $this->line; while( $offset <= $this->max ){ $t = null; $s = ''; $text = substr($this->src,$offset); foreach( array($text{0},'') as $k ){ if( isset($this->rules[$k]) ) { foreach( $this->rules[$k] as $rule) { if( preg_match($rule[0], $text, $match ) ) { $s = $match[0]; $t = $rule[1]; if( ! is_int($t) ) { $t = call_user_func( $t, $s, $match ); } break 2; } } } } if( is_null($t) ){ $n = preg_match('/^./u',$text,$match); if( false === $n ){ $s = $text{0}; $match = array( mb_convert_encoding($s,'UTF-8','cp1252') ); } $s = (string) $match[0]; $t = self::T_UNKNOWN; } $length = strlen($s); if( 0 === $length ){ throw new Loco_error_ParseException('Failed to match anything'); } $offset += $length; $lines = preg_split('/\\r?\\n/',$s); $nlines = count($lines); if( $nlines > 1 ){ $next_line = $line + ( $nlines - 1 ); $next_column = strlen( end($lines) ); } else { $next_line = $line; $next_column = $column + $length; } if( array_key_exists($t,$this->skip) ){ $line = $next_line; $column = $next_column; continue; } $tok = self::T_LITERAL === $t ? $s : array( $t, $s, $line, $column ); $line = $next_line; $column = $next_column; $this->len++; break; } $this->tok = $tok; $this->pos = $offset; $this->col = $column; $this->line = $line; } public function key(){ return $this->len ? $this->len-1 : null; } public function valid(){ return null !== $this->tok; } public function rewind(){ $this->len = 0; $this->pos = 0; $this->col = 0; $this->line = 1; $this->max = strlen($this->src) - 1; $this->next(); } }
23
  function loco_utf8_chr( $u ){ if( $u < 0x80 ){ if( $u < 0 ){ throw new RangeException( sprintf('%d is out of Unicode range', $u ) ); } return chr($u); } if( $u < 0x800 ) { return chr( ($u>>6) & 0x1F | 0xC0 ).chr( $u & 0x3F | 0x80 ); } if( $u < 0x10000 ) { return chr( $u>>12 & 15 | 0xE0 ).chr( $u>>6 & 0x3F | 0x80 ).chr( $u & 0x3F | 0x80 ); } if( $u < 0x110000 ) { return chr( $u>>18 & 7 | 0xF0 ).chr( $u>>12 & 0x3F | 0x80 ).chr( $u>>6 & 0x3F | 0x80 ).chr( $u & 0x3F | 0x80 ); } throw new RangeException( sprintf('\\x%X is out of Unicode range', $u ) ); }
24
  function loco_resolve_surrogates( $s ){ return preg_replace_callback('/\\xED([\\xA0-\\xAF])([\\x80-\\xBF])\\xED([\\xB0-\\xBF])([\\x80-\\xBF])/', '_loco_resolve_surrogates', $s ); }
25
  function _loco_resolve_surrogates( array $r ){ return loco_utf8_chr ( ( ( ( ( 832 | ( ord($r[1]) & 0x3F ) ) << 6 ) | ( ord($r[2]) & 0x3F ) ) - 0xD800 ) * 0x400 + ( ( ( ( 832 | ( ord($r[3]) & 0x3F ) ) << 6 ) | ( ord($r[4]) & 0x3F ) ) - 0xDC00 ) + 0x10000 ); }
26
- class LocoEscapeParser { private $map; private $grep; public function __construct( array $map = array() ){ $this->map = $map; $rules = array('\\\\'); if( $map ){ $rules[] = '['.implode(array_keys($map)).']'; } if( ! isset($map['U']) ) { $rules[] = 'U[0-9A-Fa-f]{5,8}'; } if( ! isset($map['u']) ) { $rules[] = 'u(?:\\{[0-9A-Fa-f]+\\}|[0-9A-Fa-f]{1,4})(?:\\\\u(?:\\{[0-9A-Fa-f]+\\}|[0-9A-Fa-f]{1,4}))*'; } $this->grep = '/\\\\('.implode('|',$rules).')/'; } public function unescape( $s ){ if( '' !== $s ) { return $this->stripSlashes( preg_replace_callback($this->grep, array($this, 'unescapeMatch'), $s) ); } return ''; } public function unescapeMatch( array $r ){ $s = $r[0]; $c = substr($s,1,1); if( isset($this->map[$c]) ){ return $this->map[$c]; } if( 'u' === $c ){ $str = ''; $surrogates = false; foreach( explode('\\u',$s) as $i => $h ){ if( '' !== $h ){ $h = ltrim( trim($h,'{}'),'0'); $u = intval($h,16); $str.= loco_utf8_chr($u); if( ! $surrogates ){ $surrogates = $u >= 0xD800 && $u <= 0xDBFF; } } } if( $surrogates ){ $str = loco_resolve_surrogates($str); } return $str; } if( 'U' === $c ){ return loco_utf8_chr( intval(substr($s,2),16) ); } if( 'x' === $c ){ return chr( intval(substr($s,2),16) ); } if( ctype_digit($c) ){ return chr( intval(substr($s,1),8) ); } return $s; } protected function stripSlashes( $s ){ return stripcslashes($s); } }
27
  class LocoJsTokens extends LocoTokenizer { const T_KWORD = 1; const T_REGEX = 2; private static $lex; protected static $words = array( 'true' => 1, 'false' => 1, 'null' => 1, 'break' => T_BREAK, 'else' => T_ELSE, 'new' => T_NEW, 'var' => 1, 'case' => T_CASE, 'finally' => T_FINALLY, 'return' => T_RETURN, 'void' => 1, 'catch' => T_CATCH, 'for' => T_FOR, 'switch' => T_SWITCH, 'while' => T_WHILE, 'continue' => T_CONTINUE, 'function' => T_FUNCTION, 'this' => T_STRING, 'with' => 1, 'default' => T_DEFAULT, 'if' => T_IF, 'throw' => T_THROW, 'delete' => 1, 'in' => 1, 'try' => T_TRY, 'do' => T_DO, 'instanceof' => 1, 'typeof' => 1, ); public static function decapse( $encapsed ){ $s = substr($encapsed,1,-1); $l = self::$lex; if( is_null($l) ){ $l = new LocoEscapeParser( array( 'U' => 'U', 'a' => 'a', ) ); self::$lex = $l; } return $l->unescape($s); } public function __construct( $src = '' ){ $this->define('/^(?:\\\\u[0-9A-F]{4,4}|[$_\\pL\\p{Nl}])(?:\\\\u[0-9A-F]{4}|[$_\\pL\\pN\\p{Mn}\\p{Mc}\\p{Pc}])*/ui', array($this,'matchWord') ); $this->define('/^\\s+/u', T_WHITESPACE ); $this->define('!^//.*!', T_COMMENT ); $this->define('!^/\\*.*\\*/!Us', array($this,'matchComment') ); $this->define('/^"(?:\\\\.|[^\\r\\n\\p{Zl}\\p{Zp}"\\\\])*"/u', T_CONSTANT_ENCAPSED_STRING ); $this->define('/^\'(?:\\\\.|[^\\r\\n\\p{Zl}\\p{Zp}\'\\\\])*\'/u', T_CONSTANT_ENCAPSED_STRING ); $this->define('/^[-+;,<>.=:|&^!?*%~(){}[\\]]/'); parent::__construct($src); } public function matchWord( $s ){ if( array_key_exists($s,self::$words) ){ return self::$words[$s]; } return T_STRING; } public function matchComment( $s ){ if( '/**' === substr($s,0,3) ){ return T_DOC_COMMENT; } return T_COMMENT; } }
28
  class LocoExtracted implements Countable { private $exp = array(); private $reg = array(); private $dom = array(); private $dflt = ''; public function extractSource( LocoExtractor $ext, $src, $fileref = '' ){ $ext->extract( $this, $ext->tokenize($src), $fileref ); return $this; } public function export(){ return $this->exp; } public function count(){ return count( $this->exp ); } public function getDomainCounts(){ return $this->dom; } public function setDomain( $default ){ $this->dflt = (string) $default; return $this; } public function getDomain(){ return $this->dflt; } public function pushMeta( $source, $notes = '', $domain = null ){ if( ! $domain || '*' === $domain ){ $domain = $this->dflt; } $entry = array( 'id' => '', 'source' => $source, 'target' => '', 'notes' => $notes, ); if( $domain ){ $entry['domain'] = $domain; $key = $source."\1".$domain; } else { $key = $source; } return $this->pushMsgid( $key, $entry, $domain ); } public function pushMsgid( $key, array $entry, $domain ){ if( isset($this->reg[$key]) ){ $index = $this->reg[$key]; $clash = $this->exp[$index]; if( $value = $this->mergeField( $clash, $entry, 'refs', ' ') ){ $this->exp[$index]['refs'] = $value; } if( $value = $this->mergeField( $clash, $entry, 'notes', "\n") ){ $this->exp[$index]['notes'] = $value; } } else { $index = count($this->exp); $this->reg[$key] = $index; $this->exp[$index] = $entry; if( isset($this->dom[$domain]) ){ $this->dom[$domain]++; } else { $this->dom[$domain] = 1; } } return $index; } public function pushMsgidPlural( $key, array $entry ){ $key = $key."\2"; if( ! isset($this->reg[$key]) ){ $index = count($this->exp); $this->reg[$key] = $index; $this->exp[$index] = $entry; } } public function mergeField( array $old, array $new, $field, $glue ){ $prev = isset($old[$field]) ? $old[$field] : ''; if( isset($new[$field]) ){ $text = $new[$field]; if( '' !== $prev && $prev !== $text ){ if( 'notes' === $field && preg_match( '/^'.preg_quote( rtrim($text,'. '),'/').'[. ]*$/mu', $prev ) ) { $text = $prev; } else { $text = $prev.$glue.$text; } } return $text; } return $prev; } public function filter( $domain ){ $map = array(); $newOffset = 1; $matchAll = '*' === $domain; $raw = array( array( 'id' => '', 'source' => '', 'target' => '', 'domain' => $matchAll ? '' : $domain, ) ); foreach( $this->exp as $oldOffset => $r ){ if( isset($r['parent']) ){ if( isset($map[$r['parent']]) ){ $r['parent'] = $map[ $r['parent'] ]; $raw[ $newOffset++ ] = $r; } } else { if( $matchAll ){ $match = true; } else if( isset($r['domain']) ){ $match = $domain === $r['domain']; } else { $match = $domain === ''; } if( $match ){ $map[ $oldOffset ] = $newOffset; $raw[ $newOffset++ ] = $r; } } } return $raw; } }
29
- abstract class LocoExtractor { private $rules; private $wp = array(); private $domain; abstract public function tokenize( $src ); abstract public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ); abstract protected function fsniff( $str ); abstract protected function decapse( $raw ); abstract protected function comment( $comment ); public function __construct( array $rules ){ $this->rules = $rules; } public function setDomain( $default ){ $this->domain = $default; return $this; } public function headerize( array $tags, $domain = '' ){ if( isset($this->wp[$domain]) ){ $this->wp[$domain] += $tags; } else { $this->wp[$domain] = $tags; } return $this; } protected function getHeaders(){ return $this->wp; } final public function extractSource( $src, $fileref ){ $strings = new LocoExtracted; $this->extract( $strings, $this->tokenize($src), $fileref ); return $strings; } public function rule( $s ){ return isset($this->rules[$s]) ? $this->rules[$s] : ''; } protected function push( LocoExtracted $strings, $rule, array $args, $comment = '', $ref = '' ){ $s = strpos( $rule, 's'); $p = strpos( $rule, 'p'); $c = strpos( $rule, 'c'); $d = strpos( $rule, 'd'); if( false === $s || ! isset($args[$s]) ){ return null; } $key = $args[$s]; if( ! is_string($key) ){ return null; } $entry = array( 'id' => '', 'source' => ( $msgid = $key ), 'target' => '', ); if( is_int($c) && isset($args[$c]) ){ $entry['context'] = $context = $args[$c]; $key .= "\0". $context; } else if( ! isset($msgid{0}) ){ return null; } else { $context = null; } if( $ref ){ $entry['refs'] = $ref; } if( is_int($d) && array_key_exists($d,$args) ){ $domain = $args[$d]; if( is_null($domain) ){ $domain = ''; } } else { $domain = $this->domain or $domain = $strings->getDomain(); } if( is_string($domain) && '' !== $domain ){ $entry['domain'] = $domain; $key .= "\1".$domain; } $parse_printf = true; if( $comment = $this->comment($comment) ){ if( preg_match('/^xgettext:\\s*([-a-z]+)-format\\s*/mi', $comment, $r, PREG_OFFSET_CAPTURE ) ){ $entry['format'] = $r[1][0]; $comment = trim( substr_replace( $comment,'', $r[0][1], strlen($r[0][0]) ) ); $parse_printf = ( 'no-' === substr($entry['format'],0,3) ) ? false : null; } if( preg_match('/^references?:( *.+:\\d+)*\\s*/mi', $comment, $r, PREG_OFFSET_CAPTURE ) ){ $entry['refs'] = trim($r[1][0],' '); $comment = trim( substr_replace( $comment, '', $r[0][1], strlen($r[0][0]) ) ); } $entry['notes'] = $comment; } if( $parse_printf && ( $format = $this->fsniff($msgid) ) ){ $entry['format'] = $format; } $index = $strings->pushMsgid( $key, $entry, $domain ); if( is_int($p) && isset($args[$p]) ){ $msgid_plural = $args[$p]; $entry = array( 'id' => '', 'source' => $msgid_plural, 'target' => '', 'plural' => 1, 'parent' => $index, ); if( false !== $parse_printf && ( $format = $this->fsniff($msgid_plural) ) ){ $entry['format'] = $format; } $strings->pushMsgidPlural( $key, $entry ); } return $index; } }
30
  class LocoPHPTokens implements LocoTokensInterface, Countable { private $i; private $tokens; private $skip_tokens = array(); private $literal_tokens = array(); public function __construct( array $tokens ){ $this->tokens = $tokens; $this->rewind(); } public function literal( array $a ){ foreach( $a as $t ){ $this->literal_tokens[ $t ] = 1; } return $this; } public function ignore( array $a ){ foreach( $a as $t ){ $this->skip_tokens[$t] = true; } return $this; } public function export(){ $arr = array(); $this->rewind(); while( $tok = $this->advance() ){ $arr[] = $tok; } return $arr; } public function advance(){ $tok = $this->current(); $this->next(); return $tok; } public function rewind(){ $this->i = ( false === reset($this->tokens) ? null : key($this->tokens) ); } public function valid(){ while( isset($this->i) ){ $tok = $this->tokens[$this->i]; if( array_key_exists( is_array($tok) ? $tok[0] : $tok, $this->skip_tokens ) ){ $this->next(); } else { return true; } } return false; } public function key(){ return $this->i; } public function next(){ $this->i = ( false === next($this->tokens) ? null : key($this->tokens) ); } public function current(){ if( ! $this->valid() ){ return false; } $tok = $this->tokens[$this->i]; if( is_array($tok) && isset($this->literal_tokens[$tok[0]]) ){ return $tok[1]; } return $tok; } public function __toString(){ $s = array(); foreach( $this as $token ){ $s[] = is_array($token) ? $token[1] : $token; } return implode('',$s); } public function count(){ return count($this->tokens); } }
31
  class LocoPHPEscapeParser extends LocoEscapeParser { public function __construct(){ parent::__construct( array( 'n' => "\n", 'r' => "\r", 't' => "\t", 'v' => "\x0B", 'f' => "\x0C", 'e' => "\x1B", '$' => '$', '\\' => '\\', '"' => '"', ) ); } protected function stripSlashes( $s ){ return preg_replace_callback('/\\\\(x[0-9A-Fa-f]{1,2}|[0-3]?[0-7]{1,2})/', array($this,'unescapeMatch'), $s, -1, $n ); } }
32
  function loco_unescape_php_string( $s ){ static $l; if( is_null($l) ) { $l = new LocoPHPEscapeParser; } return $l->unescape($s); }
33
- function loco_decapse_php_string( $s ){ if( ! $s ){ return (string) $s; } $q = $s{0}; if( "'" === $q ){ return str_replace( array('\\'.$q, '\\\\'), array($q, '\\'), substr( $s, 1, -1 ) ); } if( '"' !== $q ){ return $s; } return loco_unescape_php_string( substr($s,1,-1) ); }
34
- function loco_parse_php_comment($comment){ $comment = trim( $comment,"/ \n\r\t" ); if( $comment && '*' === $comment{0} ){ $lines = array(); $junk = "\r\t/ *"; foreach( explode("\n",$comment) as $line ){ $line = trim($line,$junk); if( '' !== $line ){ $lines[] = $line; } } $comment = implode("\n", $lines); } return $comment; }
35
- function loco_parse_wp_comment( $block ){ $header = array(); if( '*' === $block{1} ){ $junk = "\r\t/ *"; foreach( explode("\n", $block) as $line ){ if( false !== ( $i = strpos($line,':') ) ){ $key = substr($line,0,$i); $val = substr($line,++$i); $header[ trim($key,$junk) ] = trim($val,$junk); } } } return $header; }
36
  function loco_sniff_printf( $s, $p, $limit = 0, $offset = 0 ){ $n = 0; while( is_string($s) && '' !== $s && false !== ( $i = strpos($s,'%',$offset) ) ){ if( 0 !== $i ){ $s = substr( $s, $i ); } if( preg_match( $p, $s, $r ) ){ $match = $r[0]; if( 0 < $n && isset($r[1]) && '' === $r[1] && '%' !== substr($match,-1) ){ return 0; } if( ++$n === $limit ){ break; } $offset = strlen($match); } else { return 0; } } return $n; }
37
  function loco_sniff_php_printf( $s, $limit = 0 ){ return loco_sniff_printf( $s, '/^%(?:[1-9]\\d*\\$)?(?:\'.|[-+0 ])*\\d*(?:\\.\\d+)?[suxXbcdeEfFgGo%]/', $limit ); }
38
  class LocoPHPExtractor extends LocoExtractor { private $defs = array(); public function tokenize( $src ){ return new LocoPHPTokens( token_get_all($src) ); } public function decapse( $raw ){ return loco_decapse_php_string( $raw ); } public function fsniff( $str ){ return loco_sniff_php_printf($str) ? 'php' : ''; } protected function comment( $comment ){ $comment = loco_parse_php_comment($comment); $comment = preg_replace('/^translators:\\s+/mi', '', $comment ); return $comment; } public function define( $name, $value ){ if( is_string($value) ){ $this->defs[$name] = $value; } return $this; } public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ){ $tokens->ignore( array(T_WHITESPACE) ); $n = 0; $depth = 0; $comment = ''; $narg = 0; $args = array(); $ref = ''; $rule = ''; $wp = $this->getHeaders(); $tokens->rewind(); while( $tok = $tokens->advance() ){ if( is_string($tok) ){ $s = $tok; $t = null; } else { $t = $tok[0]; $s = $tok[1]; } if( $depth ){ if( ')' === $s || ']' === $s ){ if( 0 === --$depth ){ if( $this->push( $strings, $rule, $args, $comment, $ref ) ){ $n++; } $comment = ''; } } else if( '(' === $s || '[' === $s ){ $depth++; $args[$narg] = null; } else if( 1 === $depth ){ if( ',' === $s ){ $narg++; } else if( T_CONSTANT_ENCAPSED_STRING === $t ){ $args[$narg] = $this->decapse($s); } else if( T_STRING === $t && array_key_exists($s,$this->defs) ){ $args[$narg] = $this->defs[$s]; } else { $args[$narg] = null; } } } else if( T_COMMENT === $t || T_DOC_COMMENT === $t ){ $was_header = false; if( 0 === $n ){ if( false !== strpos($s,'* @package') ){ $was_header = true; } if( $wp && ( $header = loco_parse_wp_comment($s) ) ){ foreach( $wp as $domain => $tags ){ foreach( array_intersect_key($header,$tags) as $tag => $source ){ $strings->pushMeta( $source, $tags[$tag], $domain ); $was_header = true; } } } } if( ! $was_header ) { $comment = $s; } } else if( T_STRING === $t && '(' === $tokens->advance() && ( $rule = $this->rule($s) ) ){ $ref = $fileref ? $fileref.':'.$tok[2]: ''; $depth = 1; $args = array(); $narg = 0; } else if( $comment ){ if( false === stripos($comment, 'translators:') && false === strpos($comment, 'xgettext:') ){ $comment = ''; } } } return $this; } }
5
  interface LocoArrayInterface extends ArrayAccess, Iterator, Countable, JsonSerializable { public function getArrayCopy(); }
6
  class LocoHeaders extends ArrayIterator implements LocoArrayInterface { private $map = array(); public function __construct(array $raw = array() ){ if( $raw ){ $keys = array_keys( $raw ); $this->map = array_combine( array_map( 'strtolower', $keys ), $keys ); parent::__construct($raw); } } public function normalize( $key ){ $k = strtolower($key); return isset($this->map[$k]) ? $this->map[$k] : null; } public function add($key, $val ){ $this->offsetSet( $key, $val ); return $this; } public function __toString(){ $pairs = array(); foreach( $this as $key => $val ){ $pairs[] = $key.': '.$val; } return implode("\n", $pairs ); } public function trimmed($prop ){ return trim( $this->__get($prop) ); } public function has($key ){ $k = strtolower($key); return isset($this->map[$k]); } public function __get($key ){ return $this->offsetGet( $key ); } public function __set($key, $val ){ $this->offsetSet( $key, $val ); } public function offsetExists($k ){ return ! is_null( $this->normalize($k) ); } public function offsetGet($k ){ $k = $this->normalize($k); if( is_null($k) ){ return ''; } return parent::offsetGet($k); } public function offsetSet($key, $v ){ $k = strtolower($key); if( isset($this->map[$k]) && $key !== $this->map[$k] ){ parent::offsetUnset( $this->map[$k] ); } $this->map[$k] = $key; parent::offsetSet( $key, $v ); } public function offsetUnset($key ){ $k = strtolower($key); if( isset($this->map[$k]) ){ parent::offsetUnset( $this->map[$k] ); unset( $this->map[$k] ); } } public function jsonSerialize(){ return $this->getArrayCopy(); } public function keys(){ trigger_error('Is this required?', E_USER_NOTICE); return array_values( $this->map ); } }
7
  function loco_normalize_charset( $cs ){ if( preg_match('/^UTF-?8$/i',$cs) ){ return 'UTF-8'; } $aliases = @mb_encoding_aliases($cs); if( false === $aliases ){ throw new InvalidArgumentException('Unsupported character encoding: '.$cs ); } if( $r = preg_grep('/^ISO[-_]\\d+[-_]\\d+$/i',$aliases) ){ $cs = current($aliases); $cs = strtr( strtoupper($cs), '_', '-' ); } else if( in_array('US-ASCII',$aliases,true) ){ $cs = 'US-ASCII'; } return $cs; }
8
+ class LocoPoHeaders extends LocoHeaders { private $cs; public function getCharset(){ $cs = $this->cs; if( is_null($cs) ){ $cs = ''; $raw = $this->offsetGet('content-type'); if( $raw && preg_match('!\\bcharset[= ]+([-\\w]+)!',$raw,$r) ){ try { $cs = loco_normalize_charset($r[1]); } catch( Loco_error_ParseException $e ){ $cs = null; } catch( Throwable $e ){ trigger_error($e->getMessage(),E_USER_NOTICE); $cs = null; } } $this->cs = $cs; } return $cs; } public function setCharset( $to ){ $to = loco_normalize_charset($to); $from = $this->getCharset(); $this->cs = $to; $this['Content-Type'] = 'text/plain; charset='.$to; if( $from && $from !== $to ){ foreach( $this as $key => $val ){ $this[$key] = mb_convert_encoding($val,$to,$from); } } return $to; } public static function fromMsgstr( $str ){ $headers = new LocoPoHeaders; $key = ''; foreach( preg_split('/[\\r\\n]+/',$str) as $line ){ $i = strpos($line,':'); if( is_int($i) ){ $key = trim( substr($line,0,$i), " \t" ); $headers->offsetSet( $key, ltrim( substr($line,++$i)," \t" ) ); } else if( '' !== $key ){ $headers->offsetSet( $key, $headers->offsetGet($key)."\n".$line ); } } $cs = $headers->getCharset(); if( $cs && 'UTF-8' !== $cs && 'UTF-8' !== mb_detect_encoding($str,array('UTF-8',$cs),true) ){ foreach( $headers as $key => $val ){ $headers[$key] = mb_convert_encoding($val,'UTF-8',array($cs)); } } return $headers; } public static function fromSource( $raw ){ $po = new LocoPoParser($raw); $po->parse(0); return $po->getHeader(); } }
9
+ function loco_convert_utf8( $str, $enc ){ if( '' === $enc ){ if( false === preg_match('//u',$str) ){ $str = mb_convert_encoding( $str, 'UTF-8', 'cp1252' ); } } else if( 'UTF-8' === $enc || 'US-ASCII' === $enc ){ if( false === preg_match('//u',$str) ){ throw new Loco_error_ParseException('Bad '.$enc.' encoding'); } } else if( 'ISO-8859-1' === $enc ) { $str = mb_convert_encoding( $str, 'UTF-8', 'cp1252' ); } else { $str = mb_convert_encoding( $str, 'UTF-8', $enc ); } return $str; }
10
  abstract class LocoGettextParser { private $head; private $cs; abstract public function parse( $limit = -1 ); protected function setHeader( LocoPoHeaders $head ){ $this->head = $head; if( $cs = $head->getCharset() ){ if( is_null($this->cs) ){ $this->setCharset($cs); } } return $head; } public function getHeader(){ return $this->head; } protected function setCharset( $cs ){ $this->cs = $cs; } protected function getCharset(){ return $this->cs; } protected function str( $str ){ if( '' !== $str ){ $enc = (string) $this->cs; $str = loco_convert_utf8( $str, $enc ); } return $str; } }
11
+ function loco_remove_bom( $s, &$c ){ $bom = substr($s,0,2); if( "\xFF\xFE" === $bom ){ $c = 'UTF-16LE'; return substr($s,2); } if( "\xFE\xFF" === $bom ){ $c = 'UTF-16BE'; return substr($s,2); } if( "\xEF\xBB" === $bom && "\xBF" === $s[2] ){ $c = 'UTF-8'; return substr($s,3); } $c = ''; return $s; }
12
  function loco_parse_reference_id( $refs, &$_id ){ if( false === ( $n = strpos($refs,'loco:') ) ){ $_id = ''; return $refs; } $_id = substr($refs, $n+5, 24 ); $refs = substr_replace( $refs, '', $n, 29 ); return trim( $refs ); }
13
+ class LocoPoParser extends LocoGettextParser implements Iterator { private $lines = array(); private $i; private $k; private $m; public function __construct( $src ){ if( '' !== $src ){ $src = loco_remove_bom($src,$cs); if( $cs && 'UTF-8' !== $cs ){ $src = mb_convert_encoding( $src, 'UTF-8', array($cs) ); } if( 'UTF-8' === mb_detect_encoding($src,array('UTF-8','ISO-8859-1'),true) ){ $this->setCharset('UTF-8'); } $this->lines = preg_split('/(\\r\\n?|\\n)/', $src ); } } public function rewind(){ $this->i = -1; $this->k = -1; $this->next(); } public function valid(){ return is_int($this->i); } public function key(){ return $this->k; } public function current(){ return $this->m; } public function next(){ $valid = false; $entry = array( '#' => array(), 'id' => array(null), 'str' => array(null) ); $i = $this->i; while( array_key_exists(++$i,$this->lines) ){ $line = $this->lines[$i]; try { if( '' === $line ){ if( $valid ){ break; } continue; } $c = $line[0]; if( '#' === $c ){ if( $valid ){ $i--; break; } if( '#' === $line ){ continue; } $f = $line[1]; $entry['#'][$f][] = trim( substr( $line, 1+strlen($f) ), "/ \n\r\t" ); } else if( preg_match('/^msg(id(?:_plural)?|ctxt|str(?:\\[(\\d+)])?)[ \\t]*/', $line, $r ) ){ if( isset($r[2]) ){ $key = 'str'; $idx = (int) $r[2]; } else { $key = $r[1]; $idx = 0; } if( $valid && 'str' !== $key && null !== $entry['str'][0] ){ $i--; break; } $snip = strlen($r[0]); if( '"' !== substr($line,$snip,1) ){ throw new Exception('Expected " to follow msg'.$key); } $val = ''; $line = substr($line,$snip); while( true ){ if( '"' === $line || '"' !== substr($line,-1) ){ throw new Exception('Unterminated msg'.$key ); } $val .= substr( $line, 1, -1 ); $j = $i + 1; if( array_key_exists($j,$this->lines) && ( $line = $this->lines[$j] ) && '"' === $line[0] ){ $i = $j; } else { break; } } if( ! $valid ){ $valid = true; } if( 'id_plural' === $key ){ $key = 'id'; $idx = 1; } $entry[$key][$idx] = stripcslashes($val); } else if( preg_match('/^[ \\t]+$/',$line) ){ if( $valid ) { break; } } else if( '"' === $c ){ throw new Exception('String encountered without keyword'); } else { throw new Exception('Junk'); } } catch( Exception $e ){ } } if( $valid ){ ++$this->k; $this->i = $i; $this->m = $entry; } else { $this->i = null; $this->k = null; $this->m = null; } } public function parse( $limit = -1 ){ $this->rewind(); if( ! $this->valid() ){ throw new Loco_error_ParseException('Invalid PO file'); } $i = -1; $assets = array(); $entry = $this->current(); if( '' !== $entry['id'][0] || isset($entry['ctxt']) || is_null($entry['str'][0]) ){ $head = $this->setHeader( new LocoPoHeaders ); } else { $head = $this->setHeader( LocoPoHeaders::fromMsgstr($entry['str'][0]) ); } $lk = $head['X-Loco-Lookup']; while( $this->valid() ){ $entry = $this->current(); $this->next(); $msgid = $entry['id'][0]; if( is_null($msgid) ){ continue; } if( ++$i === $limit ){ return $assets; } $asset = array( 'source' => $this->str( $msgid ), 'target' => $this->str( (string) $entry['str'][0] ), 'context' => null, ); $prev_entry = null; if( isset($entry['ctxt']) ){ $asset['context'] = $this->str( $entry['ctxt'][0] ); } $cmt = $entry['#']; if( isset($cmt[' ']) ){ $asset['comment'] = $this->str( implode("\n", $cmt[' '] ) ); } if( isset($cmt['.']) ){ $asset['notes'] = $this->str( implode("\n", $cmt['.'] ) ); } if( isset($cmt[':']) ){ if( $refs = implode( ' ', $cmt[':'] ) ) { $refs = $this->str($refs); if( $refs = loco_parse_reference_id( $refs, $_id ) ){ $asset['refs'] = $refs; } if( $_id ){ $asset['_id'] = $_id; } } } if( isset($cmt[',']) ){ foreach( $cmt[','] as $flags ){ foreach( explode(',',$flags) as $flag ){ if( $flag = trim($flag," \t") ){ if( preg_match('/^((?:no-)?\w+)-format/', $flag, $r ) ){ $asset['format'] = $r[1]; } else if( 'fuzzy' === $flag ){ $asset['flag'] = 4; } } } } } if( isset($cmt['|']) ){ $p = new LocoPoParser(''); $p->lines = $cmt['|']; $p->setCharset( $this->getCharset() ); try { $prev_entry = $p->parse(); } catch( Loco_error_ParseException $e ){ } if( $prev_entry ){ $msgid = $prev_entry[0]['source']; if( $lk ){ $asset[$lk] = $asset['source']; $asset['source'] = $msgid; } else if( 'loco:' === substr($msgid,0,5) ){ $asset['_id'] = substr($msgid,5); } else { $asset['prev'] = $prev_entry; } } else { $prev_entry = null; } } $assets[] = $asset; if( isset($entry['id'][1]) ){ $idx = 0; $pidx = count($assets) - 1; $num = max( 2, count($entry['str']) ); while( ++$idx < $num ){ $plural = array( 'source' => '', 'target' => isset($entry['str'][$idx]) ? $this->str($entry['str'][$idx]) : '', 'plural' => $idx, 'parent' => $pidx, ); if( 1 === $idx ){ $plural['source'] = $this->str($entry['id'][1]); if( $lk && is_array($prev_entry) && isset($prev_entry[1]) ){ $plural[$lk] = $plural['source']; $plural['source'] = $prev_entry[1]['source']; } } if( isset($asset['flag']) ){ $plural['flag'] = $asset['flag']; } $assets[] = $plural; } } } if( -1 === $i ){ throw new Loco_error_ParseException('Invalid PO file'); } else if( 0 === $i && '' === $assets[0]['source'] && '' === $assets[0]['target'] ){ throw new Loco_error_ParseException('Invalid PO file' ); } return $assets; } }
14
  class LocoMoParser extends LocoGettextParser { private $bin; private $be; private $n; private $o; private $t; private $v; public function __construct( $bin ){ $this->bin = $bin; } public function getAt( $idx ){ $offset = $this->targetOffset(); $offset += ( $idx * 8 ); $len = $this->integerAt( $offset ); $idx = $this->integerAt( $offset + 4 ); $txt = $this->bytes( $idx, $len ); if( false === strpos( $txt, "\0") ){ return $txt; } return explode( "\0", $txt ); } public function parse( $limit = -1 ){ $i = -1; $r = array(); $sourceOffset = $this->sourceOffset(); $targetOffset = $this->targetOffset(); $soffset = $sourceOffset; $toffset = $targetOffset; while( $soffset < $targetOffset ){ $len = $this->integerAt( $soffset ); $idx = $this->integerAt( $soffset + 4 ); $src = $this->bytes( $idx, $len ); $eot = strpos( $src, "\x04" ); if( false === $eot ){ $context = null; } else { $context = $this->str( substr($src, 0, $eot ) ); $src = substr( $src, $eot+1 ); } $sources = explode( "\0", $src, 2 ); $len = $this->integerAt( $toffset ); $idx = $this->integerAt( $toffset + 4 ); $targets = explode( "\0", $this->bytes( $idx, $len ) ); if( -1 === $i && '' === $sources[0] && is_null($context) ){ $this->setHeader( LocoPoHeaders::fromMsgstr($targets[0]) ); } if( ++$i === $limit ){ break; } $r[$i] = array( 'source' => $this->str( $sources[0] ), 'target' => $this->str( $targets[0] ), 'context' => $context, ); if( isset($sources[1]) ){ $p = count($r) - 1; $nforms = max( 2, count($targets) ); for( $i = 1; $i < $nforms; $i++ ){ $r[] = array( 'source' => isset($sources[$i]) ? $this->str( $sources[$i] ) : sprintf('%s (plural %u)',$r[$p]['source'],$i), 'target' => isset($targets[$i]) ? $this->str( $targets[$i] ) : '', 'parent' => $p, 'plural' => $i, ); } } $soffset += 8; $toffset += 8; } return $r; } public function isBigendian(){ if( is_null($this->be) ){ $str = $this->words( 0, 1 ); if( "\xDE\x12\x04\x95" === $str ){ $this->be = false; } else if( "\x95\x04\x12\xDE" === $str ){ $this->be = true; } else { throw new Loco_error_ParseException('Invalid MO format'); } } return $this->be; } public function version(){ if( is_null($this->v) ){ $this->v = $this->integerWord(1); } return $this->v; } public function count(){ if( is_null($this->n) ){ $this->n = $this->integerWord(2); } return $this->n; } public function sourceOffset(){ if( is_null($this->o) ){ $this->o = $this->integerWord(3); } return $this->o; } public function targetOffset(){ if( is_null($this->t) ){ $this->t = $this->integerWord(4); } return $this->t; } public function getHashTable(){ $s = $this->integerWord(5); $h = $this->integerWord(6); return $this->bytes( $h, $s * 4 ); } private function bytes( $offset, $length ){ $s = substr( $this->bin, $offset, $length ); if( strlen($s) !== $length ){ throw new Loco_error_ParseException('Failed to read '.$length.' bytes at ['.$offset.']' ); } return $s; } private function words( $offset, $length ){ return $this->bytes( $offset * 4, $length * 4 ); } private function integerWord( $offset ){ return $this->integerAt( $offset * 4 ); } private function integerAt( $offset ){ $str = $this->bytes( $offset, 4 ); $fmt = $this->isBigendian() ? 'N' : 'V'; $arr = unpack( $fmt, $str ); if( ! isset($arr[1]) || ! is_int($arr[1]) ){ throw new Loco_error_ParseException('Failed to read integer at byte '.$offset); } return $arr[1]; } }
15
  abstract class LocoPo { public static function pair( $key, $text, $width = 79, $eol = "\n", $esc = '\\n' ){ if( '' === $text ){ return $key.' ""'; } $text = addcslashes( $text, "\t\x0B\x0C\x07\x08\\\"" ); if( $esc ) { $text = preg_replace('/(?:\\r\\n?|\\n)/', $esc.$eol, $text, -1, $nbr ); } else { $eol = "\n"; $text = preg_replace_callback('/(?:\\r\\n?|\\n)/',array(__CLASS__,'replace_br'), $text, -1, $nbr ); } if( $nbr ){ } else if( $width && $width < mb_strlen($text,'UTF-8') + strlen($key) + 3 ){ } else { return $key.' "'.$text.'"'; } $lines = array( $key.' "' ); if( $width ){ $width -= 2; $a = '/^.{0,'.($width-1).'}[-– \\.,:;\\?!\\)\\]\\}\\>]/u'; $b = '/^[^-– \\.,:;\\?!\\)\\]\\}\\>]+/u'; foreach( explode($eol,$text) as $unwrapped ){ $length = mb_strlen( $unwrapped, 'UTF-8' ); while( $length > $width ){ if( preg_match( $a, $unwrapped, $r ) ){ $line = $r[0]; } else if( preg_match( $b, $unwrapped, $r ) ){ $line = $r[0]; } else { throw new Exception('Wrapping error'); } $lines[] = $line; $trunc = mb_strlen($line,'UTF-8'); $length -= $trunc; $unwrapped = (string) substr( $unwrapped, strlen($line) ); if( ( '' === $unwrapped && 0 !== $length ) || ( 0 === $length && '' !== $unwrapped ) ){ throw new Exception('Truncation error'); } } if( 0 !== $length ){ $lines[] = $unwrapped; } } } else { foreach( explode($eol,$text) as $unwrapped ){ $lines[] = $unwrapped; } } return implode('"'.$eol.'"',$lines).'"'; } private static function replace_br( array $r ){ return addcslashes($r[0],"\r\n")."\n"; } public static function refs( $text, $width = 76, $eol = "\n" ){ $text = preg_replace('/\\s+/u', ' ', $text ); if( $width ){ $text = wordwrap( $text, $width, $eol.'#: ', false ); } return '#: '.$text; } public static function prefix( $text, $prefix, $eol = "\n" ){ $lines = preg_split('/\\R/u', $text, -1 ); return $prefix.implode( $eol.$prefix, $lines ); } }
16
  class LocoPoIterator implements Iterator, Countable { private $po; private $headers; private $i; private $t; private $j; private $z; private $w = 79; public function __construct( $po ){ $this->po = $po; $this->t = count( $po ); if( ! isset($po[0]) ){ throw new InvalidArgumentException('Empty PO data'); } $h = $po[0]; if( '' === $h['source'] && empty($h['context']) ){ $this->z = 0; } else { $this->z = -1; } } public function count(){ return $this->t - ( $this->z + 1 ); } public function wrap( $width ){ $width = (int) $width; if( $width > 0 ){ $this->w = max( 15, $width ); } else { $this->w = 0; } return $this; } public function rewind(){ $this->i = $this->z; $this->j = -1; $this->next(); } public function key(){ return $this->j; } public function valid(){ return is_int($this->i); } public function next(){ $i = $this->i; while( ++$i < $this->t ){ $this->j++; $this->i = $i; return; } $this->i = null; $this->j = null; } public function current(){ $i = $this->i; $po = $this->po; $parent = new LocoPoMessage( $po[$i] ); $plurals = array(); while( isset($po[++$i]['parent']) ){ $this->i = $i; $plurals[] = new LocoPoMessage( $po[$i] ); } if( $plurals ){ $parent['plurals'] = $plurals; } return $parent; } public function getArrayCopy(){ $po = $this->po; if( 0 === $this->z ){ $po[0]['target'] = (string) $this->getHeaders(); } return $po; } public function getHeaders(){ if( ! $this->headers ){ $header = $this->po[0]; if( 0 === $this->z ){ $this->headers = LocoPoHeaders::fromMsgstr( $header['target'] ); } else { $this->headers = new LocoPoHeaders; } } return $this->headers; } public function initPo(){ if( 0 === $this->z ){ unset( $this->po[0]['flag'] ); } return $this; } public function initPot(){ if( 0 === $this->z ){ $this->po[0]['flag'] = 4; } return $this; } public function strip(){ $po = $this->po; $i = count($po); $z = $this->z; while( --$i > $z ){ $po[$i]['target'] = ''; } $this->po = $po; return $this; } public function __toString(){ try { return $this->render(); } catch( Exception $e ){ trigger_error( $e->getMessage(), E_USER_WARNING ); return ''; } } public function render( $sorter = null ){ $width = $this->w; $ref_width = max( 0, $width - 3 ); if( 0 === $this->z ){ $h = $this->po[0]; } else { $h = array( 'source' => '' ); } $h['target'] = (string) $this->getHeaders(); $msg = new LocoPoMessage( $h ); $s = $msg->render( $width, $ref_width ); if( $sorter ){ if( ! is_callable($sorter) ){ throw new InvalidArgumentException('Bad callback'); } $msgs = array(); foreach( $this as $msg ){ $msgs[] = $msg; } usort( $msgs, $sorter ); } else { $msgs = $this; } foreach( $msgs as $msg ){ $s .= "\n".$msg->render( $width, $ref_width ); } return $s; } public function exportRefs( $grep = '' ){ $a = array(); if( '' === $grep ) { $grep = '/(\\S+):\\d+/'; } else { $grep = '/(\\S*'.$grep.'):\\d+/'; } foreach( $this as $message ){ if( preg_match_all( $grep, (string) $message->refs, $r ) ){ foreach( $r[1] as $ref ) { $a[$ref][] = $message; } } } return $a; } public function splitRefs( array $map = null ){ $a = array(); foreach( $this as $message ){ $refs = ltrim( (string) $message->refs ); if( '' !== $refs ){ if( preg_match_all('/\\S+\\.([a-z]+):\\d+/', $refs, $r, PREG_SET_ORDER ) ){ $tmp = array(); foreach( $r as $rr ) { list( $ref, $ext ) = $rr; $tmp[$ext][$ref] = true; } foreach( $tmp as $ext => $refs ){ if( is_null($map) ){ } else if( isset($map[$ext]) ){ $ext = $map[$ext]; } else { continue; } $message = clone $message; $message['refs'] = implode(' ',array_keys($refs) ); $a[$ext][] = $message; } } } } return $a; } public function getHashes(){ $a = array(); foreach( $this as $msg ){ $a[] = $msg->getHash(); } sort( $a, SORT_STRING ); return $a; } public function equalSource( LocoPoIterator $that ){ $a = $this->getHashes(); $b = $that->getHashes(); if( count($a) !== count($b) ){ return false; } foreach( $a as $i => $hash ){ if( $hash !== $b[$i] ){ return false; } } return true; } public function sort( $func = null ){ $order = array(); foreach( $this as $msg ){ $order[] = $msg; } if( is_null($func) ){ $func = array( __CLASS__, 'compare' ); } else if( ! is_callable($func) ){ throw new InvalidArgumentException('Bad callback'); } usort( $order, $func ); $po = array(); if( 0 === $this->z ){ $po[] = $this->po[0]; } foreach( $order as $msg ){ $po[] = $msg->getArrayCopy(); if( is_array( $plurals = $msg->plurals ) ){ $index = count($po) - 1; unset( $po[$index]['plurals'] ); foreach( $plurals as $p ){ $a = $p->getArrayCopy(); $a['parent'] = $index; $po[] = $a; } } } $this->po = $po; return $this; } public static function compare( LocoPoMessage $a, LocoPoMessage $b ){ $h = $a->getHash(); $j = $b->getHash(); $n = strcasecmp( $h, $j ); if( 0 === $n ){ $n = strcmp( $h, $j ); if( 0 === $n ){ return 0; } } return $n > 0 ? 1 : -1; } public function createSorter(){ $index = array(); foreach( $this as $i => $msg ){ $index[ $msg->getHash() ] = $i; } $obj = new LocoPoIndex( $index ); return array( $obj, 'compare' ); } }
17
  class LocoPoIndex extends ArrayIterator { public function compare( LocoPoMessage $a, LocoPoMessage $b ){ $h = $a->getHash(); if( ! isset($this[$h]) ){ return 1; } $j = $b->getHash(); if( ! isset($this[$j]) ){ return -1; } return $this[$h] > $this[$j] ? 1 : -1; } }
18
+ class LocoPoMessage extends ArrayObject { public function __construct( array $r ){ $r['key'] = $r['source']; parent::__construct($r); } public function __get( $prop ){ return isset($this[$prop]) ? $this[$prop] : null; } private function _getFlags(){ $flags = array(); $plurals = $this->__get('plurals'); if( 4 === $this->__get('flag') ){ $flags[] = 'fuzzy'; } else if( $plurals ){ foreach( $plurals as $child ){ if( 4 === $child->__get('flag') ){ $flags[] = 'fuzzy'; break; } } } if( $f = $this->__get('format') ){ $flags[] = $f.'-format'; } else if( isset($plurals[0]) && ( $f = $plurals[0]->format ) ){ $flags[] = $f.'-format'; } return $flags; } public function getHash(){ $hash = $this->getKey(); if( isset($this['plurals']) ){ foreach( $this['plurals'] as $p ){ $hash .= "\0".$p->getHash(); break; } } return $hash; } public function getKey(){ $msgid = (string) $this['source']; $msgctxt = (string) $this->__get('context'); if( '' !== $msgctxt ){ if( '' === $msgid ){ $msgid = '('.$msgctxt.')'; } $msgid = $msgctxt."\4".$msgid; } return $msgid; } public function getMsgstrs(){ $a = array( $this['target'] ); $plurals = $this->__get('plurals'); if( is_array($plurals) ){ foreach( $plurals as $i => $p ){ $a[] = $p['target']; } } return $a; } public function __toString(){ return $this->render( 79, 76 ); } public function render( $width, $ref_width ){ $s = ''; try { if( $text = $this->__get('comment') ) { $s .= LocoPo::prefix( $text, '# ')."\n"; } if( $text = $this->__get('notes') ) { $s .= LocoPo::prefix( $text, '#. ')."\n"; } if( $text = $this->__get('refs') ){ $s .= LocoPo::refs( $text, $ref_width )."\n"; } if( $texts = $this->_getFlags() ){ $s .= '#, '.implode(', ',$texts)."\n"; } $text = $this->__get('context'); if( is_string($text) && '' !== $text ){ $s .= LocoPo::pair('msgctxt', $text, $width )."\n"; } $s .= LocoPo::pair( 'msgid', $this['key'], $width )."\n"; $target = $this['target']; if( is_array( $plurals = $this->__get('plurals') ) ){ if( $plurals ){ foreach( $plurals as $i => $p ){ if( 0 === $i ){ $s .= LocoPo::pair('msgid_plural', $p['key'], $width )."\n"; $s .= LocoPo::pair('msgstr[0]', $target, $width )."\n"; } $s .= LocoPo::pair('msgstr['.(++$i).']', $p['target'], $width )."\n"; } } else if( isset($this['plural_key']) ){ $s .= LocoPo::pair('msgid_plural', $this['plural_key'], $width )."\n"; $s .= LocoPo::pair('msgstr[0]', $target, $width )."\n"; } else { trigger_error('Missing plural_key in zero plural export'); $s .= LocoPo::pair('msgstr', $target, $width )."\n"; } } else { $s .= LocoPo::pair('msgstr', $target, $width )."\n"; } } catch( Exception $e ){ trigger_error( $e->getMessage(), E_USER_WARNING ); } return $s; } }
19
+ class LocoMoTable { private $size = 0; private $bin = ''; private $map; public function __construct( $data = null ){ if( is_array($data) ){ $this->compile( $data ); } else if( $data ){ $this->parse( $data ); } } public function count(){ if( ! isset($this->size) ){ if( $this->bin ){ $this->size = (int) ( strlen( $this->bin ) / 4 ); } else if( is_array($this->map) ){ $this->size = count($this->map); } else { return 0; } if( ! self::is_prime($this->size) || $this->size < 3 ){ throw new Exception('Size expected to be prime number above 2, got '.$this->size); } } return $this->size; } public function bytes(){ return $this->count() * 4; } public function __toString(){ return $this->bin; } public function export(){ if( ! is_array($this->map) ){ $this->parse( $this->bin ); } return $this->map; } private function reset( $length ){ $this->size = max( 3, self::next_prime ( $length * 4 / 3 ) ); $this->bin = null; $this->map = array(); return $this->size; } public function compile( array $msgids ){ $hash_tab_size = $this->reset( count($msgids) ); $packed = array_fill( 0, $hash_tab_size, "\0\0\0\0" ); $j = 0; foreach( $msgids as $msgid ){ $hash_val = self::hashpjw( $msgid ); $idx = $hash_val % $hash_tab_size; if( array_key_exists($idx, $this->map) ){ $incr = 1 + ( $hash_val % ( $hash_tab_size - 2 ) ); do { $idx += $incr; if( $hash_val === $idx ){ throw new Exception('Unable to find empty slot in hash table'); } $idx %= $hash_tab_size; } while( array_key_exists($idx, $this->map ) ); } $this->map[$idx] = $j; $packed[$idx] = pack('V', ++$j ); } return $this->bin = implode('',$packed); } public function lookup( $msgid, array $msgids ){ $hash_val = self::hashpjw( $msgid ); $idx = $hash_val % $this->size; $incr = 1 + ( $hash_val % ( $this->size - 2 ) ); while( true ){ if( ! array_key_exists($idx, $this->map) ){ break; } $j = $this->map[$idx]; if( isset($msgids[$j]) && $msgid === $msgids[$j] ){ return $j; } $idx += $incr; if( $idx === $hash_val ){ break; } $idx %= $this->size; } return -1; } public function parse( $bin ){ $this->bin = (string) $bin; $this->size = null; $hash_tab_size = $this->count(); $this->map = array(); $idx = -1; $byte = 0; while( ++$idx < $hash_tab_size ){ $word = substr( $this->bin, $byte, 4 ); if( "\0\0\0\0" !== $word ){ list(,$j) = unpack('V', $word ); $this->map[$idx] = $j - 1; } $byte += 4; } return $this->map; } public static function hashpjw( $str ){ $i = -1; $hval = 0; $len = strlen($str); while( ++$i < $len ){ $ord = ord( substr($str,$i,1) ); $hval = ( $hval << 4 ) + $ord; $g = $hval & 0xf0000000; if( $g !== 0 ){ $hval ^= $g >> 24; $hval ^= $g; } } return $hval; } private static function next_prime( $seed ){ $seed |= 1; while ( ! self::is_prime($seed) ){ $seed += 2; } return $seed; } private static function is_prime( $num ) { if ($num === 1 ){ return false; } if( $num === 2 ){ return true; } if( $num % 2 == 0 ) { return false; } for( $i = 3; $i <= ceil(sqrt($num)); $i = $i + 2) { if($num % $i == 0 ){ return false; } } return true; } }
20
  class LocoMo { private $bin; private $msgs; private $head; private $hash; private $use_fuzzy = false; private $cs; public function __construct( Iterator $export, LocoPoHeaders $head = null ){ if( $head ){ $this->head = $head; } else { $this->head = new LocoPoHeaders(array('Project-Id-Version' => 'Loco')); } $this->msgs = $export; $this->bin = ''; } public function setCharset( $cs ){ $cs = $this->head->setCharset($cs); $this->cs = 'UTF-8' === $cs ? null : $cs; } public function enableHash(){ return $this->hash = new LocoMoTable; } public function useFuzzy(){ $this->use_fuzzy = true; } public function setHeader( $key, $val ){ $this->head->add($key, $val); return $this; } private function str( $s ){ $s = (string) $s; if( $cs = $this->cs ){ $s = mb_convert_encoding($s,$cs,array('UTF-8')); } return $s; } public function compile(){ $table = array(''); $sources = array(''); $targets = array( (string) $this->head ); $fuzzy_flag = 4; $skip_fuzzy = ! $this->use_fuzzy; foreach( $this->msgs as $r ){ if( $skip_fuzzy && isset($r['flag']) && $fuzzy_flag === $r['flag'] ){ continue; } $msgid = $this->str( $r['key'] ); if( isset($r['context']) ){ $msgctxt = $this->str( $r['context'] ); if( '' !== $msgctxt ){ if( '' === $msgid ){ $msgid = '('.$msgctxt.')'; } $msgid = $msgctxt."\x04".$msgid; } } if( '' === $msgid ){ continue; } $msgstr = $this->str( $r['target'] ); if( '' === $msgstr ){ continue; } $table[] = $msgid; if( isset($r['plurals']) ){ foreach( $r['plurals'] as $i => $p ){ if( $i === 0 ){ $msgid .= "\0".$p['key']; } $msgstr .= "\0".$p['target']; } } $sources[] = $msgid; $targets[] = $msgstr; } asort( $sources, SORT_STRING ); $this->bin = "\xDE\x12\x04\x95\x00\x00\x00\x00"; $n = count($sources); $this->writeInteger( $n ); $offset = 28; $this->writeInteger( $offset ); $offset += $n * 8; $this->writeInteger( $offset ); if( $this->hash ){ sort( $table, SORT_STRING ); $this->hash->compile( $table ); $s = $this->hash->count(); } else { $s = 0; } $this->writeInteger( $s ); $offset += $n * 8; $this->writeInteger( $offset ); if( $s ){ $offset += $s * 4; } $source = ''; foreach( $sources as $i => $str ){ $source .= $str."\0"; $this->writeInteger( $strlen = strlen($str) ); $this->writeInteger( $offset ); $offset += $strlen + 1; } $target = ''; foreach( array_keys($sources) as $i ){ $str = $targets[$i]; $target .= $str."\0"; $this->writeInteger( $strlen = strlen($str) ); $this->writeInteger( $offset ); $offset += $strlen + 1; } if( $this->hash ){ $this->bin .= $this->hash->__toString(); } $this->bin .= $source; $this->bin .= $target; return $this->bin; } private function writeInteger( $num ){ $this->bin .= pack( 'V', $num ); return $this; } }
21
  interface LocoTokensInterface extends Iterator { public function advance(); public function ignore( array $a ); }
22
+ class LocoTokenizer implements LocoTokensInterface { const T_LITERAL = 0; const T_UNKNOWN = -1; private $src; private $pos; private $line; private $col; private $max; private $rules = array(); private $skip = array(); private $tok; private $len; public function __construct( $src = '' ){ $this->init($src); } public function parse( $src ){ $tokens = array(); $this->init($src); while( $tok = $this->advance() ){ $tokens[] = $tok; } return $tokens; } public function init( $src ){ $this->src = $src; $this->rewind(); return $this; } public function define( $grep, $t = 0 ){ if('^' !== $grep[1] ){ throw new InvalidArgumentException('Expression '.$grep.' isn\'t anchored'); } if( ! is_int($t) && ! is_callable($t) ){ throw new InvalidArgumentException('Non-integer token must be valid callback'); } $sniff = $grep[2]; if( $sniff === preg_quote($sniff,$grep[0]) ){ $this->rules[$sniff][] = array( $grep, $t ); } else { $this->rules[''][] = array( $grep, $t ); } return $this; } public function ignore( array $a ){ foreach( $a as $t ){ $this->skip[$t] = true; } return $this; } public function current(){ return $this->tok; } public function advance(){ $tok = $this->current(); $this->next(); return $tok; } public function next(){ $tok = null; $offset = $this->pos; $column = $this->col; $line = $this->line; while( $offset <= $this->max ){ $t = null; $s = ''; $text = substr($this->src,$offset); foreach( array($text[0],'') as $k ){ if( isset($this->rules[$k]) ) { foreach( $this->rules[$k] as $rule) { if( preg_match($rule[0], $text, $match ) ) { $s = $match[0]; $t = $rule[1]; if( ! is_int($t) ) { $t = call_user_func( $t, $s, $match ); } break 2; } } } } if( is_null($t) ){ $n = preg_match('/^./u',$text,$match); if( false === $n ){ $s = $text[0]; $match = array( mb_convert_encoding($s,'UTF-8','cp1252') ); } $s = (string) $match[0]; $t = self::T_UNKNOWN; } $length = strlen($s); if( 0 === $length ){ throw new Loco_error_ParseException('Failed to match anything'); } $offset += $length; $lines = preg_split('/\\r?\\n/',$s); $nlines = count($lines); if( $nlines > 1 ){ $next_line = $line + ( $nlines - 1 ); $next_column = strlen( end($lines) ); } else { $next_line = $line; $next_column = $column + $length; } if( array_key_exists($t,$this->skip) ){ $line = $next_line; $column = $next_column; continue; } $tok = self::T_LITERAL === $t ? $s : array( $t, $s, $line, $column ); $line = $next_line; $column = $next_column; $this->len++; break; } $this->tok = $tok; $this->pos = $offset; $this->col = $column; $this->line = $line; } public function key(){ return $this->len ? $this->len-1 : null; } public function valid(){ return null !== $this->tok; } public function rewind(){ $this->len = 0; $this->pos = 0; $this->col = 0; $this->line = 1; $this->max = strlen($this->src) - 1; $this->next(); } }
23
  function loco_utf8_chr( $u ){ if( $u < 0x80 ){ if( $u < 0 ){ throw new RangeException( sprintf('%d is out of Unicode range', $u ) ); } return chr($u); } if( $u < 0x800 ) { return chr( ($u>>6) & 0x1F | 0xC0 ).chr( $u & 0x3F | 0x80 ); } if( $u < 0x10000 ) { return chr( $u>>12 & 15 | 0xE0 ).chr( $u>>6 & 0x3F | 0x80 ).chr( $u & 0x3F | 0x80 ); } if( $u < 0x110000 ) { return chr( $u>>18 & 7 | 0xF0 ).chr( $u>>12 & 0x3F | 0x80 ).chr( $u>>6 & 0x3F | 0x80 ).chr( $u & 0x3F | 0x80 ); } throw new RangeException( sprintf('\\x%X is out of Unicode range', $u ) ); }
24
  function loco_resolve_surrogates( $s ){ return preg_replace_callback('/\\xED([\\xA0-\\xAF])([\\x80-\\xBF])\\xED([\\xB0-\\xBF])([\\x80-\\xBF])/', '_loco_resolve_surrogates', $s ); }
25
  function _loco_resolve_surrogates( array $r ){ return loco_utf8_chr ( ( ( ( ( 832 | ( ord($r[1]) & 0x3F ) ) << 6 ) | ( ord($r[2]) & 0x3F ) ) - 0xD800 ) * 0x400 + ( ( ( ( 832 | ( ord($r[3]) & 0x3F ) ) << 6 ) | ( ord($r[4]) & 0x3F ) ) - 0xDC00 ) + 0x10000 ); }
26
+ class LocoEscapeParser { private $map; private $grep; public function __construct( array $map = array() ){ $this->map = $map; $rules = array('\\\\'); if( $map ){ $rules[] = '['.implode(array_keys($map)).']'; } if( ! isset($map['U']) ) { $rules[] = 'U[0-9A-Fa-f]{5,8}'; } if( ! isset($map['u']) ) { $rules[] = 'u(?:\\{[0-9A-Fa-f]+\\}|[0-9A-Fa-f]{1,4})(?:\\\\u(?:\\{[0-9A-Fa-f]+\\}|[0-9A-Fa-f]{1,4}))*'; } $this->grep = '/\\\\('.implode('|',$rules).')/'; } public function unescape( $s ){ if( '' !== $s ) { return $this->stripSlashes( preg_replace_callback($this->grep, array($this, 'unescapeMatch'), $s) ); } return ''; } public function unescapeMatch( array $r ){ $s = $r[0]; $c = $s[1]; if( isset($this->map[$c]) ){ return $this->map[$c]; } if( 'u' === $c ){ $str = ''; $surrogates = false; foreach( explode('\\u',$s) as $i => $h ){ if( '' !== $h ){ $h = ltrim( trim($h,'{}'),'0'); $u = intval($h,16); $str.= loco_utf8_chr($u); if( ! $surrogates ){ $surrogates = $u >= 0xD800 && $u <= 0xDBFF; } } } if( $surrogates ){ $str = loco_resolve_surrogates($str); } return $str; } if( 'U' === $c ){ return loco_utf8_chr( intval(substr($s,2),16) ); } if( 'x' === $c ){ return chr( intval(substr($s,2),16) ); } if( ctype_digit($c) ){ return chr( intval(substr($s,1),8) ); } return $s; } protected function stripSlashes( $s ){ return stripcslashes($s); } }
27
  class LocoJsTokens extends LocoTokenizer { const T_KWORD = 1; const T_REGEX = 2; private static $lex; protected static $words = array( 'true' => 1, 'false' => 1, 'null' => 1, 'break' => T_BREAK, 'else' => T_ELSE, 'new' => T_NEW, 'var' => 1, 'case' => T_CASE, 'finally' => T_FINALLY, 'return' => T_RETURN, 'void' => 1, 'catch' => T_CATCH, 'for' => T_FOR, 'switch' => T_SWITCH, 'while' => T_WHILE, 'continue' => T_CONTINUE, 'function' => T_FUNCTION, 'this' => T_STRING, 'with' => 1, 'default' => T_DEFAULT, 'if' => T_IF, 'throw' => T_THROW, 'delete' => 1, 'in' => 1, 'try' => T_TRY, 'do' => T_DO, 'instanceof' => 1, 'typeof' => 1, ); public static function decapse( $encapsed ){ $s = substr($encapsed,1,-1); $l = self::$lex; if( is_null($l) ){ $l = new LocoEscapeParser( array( 'U' => 'U', 'a' => 'a', ) ); self::$lex = $l; } return $l->unescape($s); } public function __construct( $src = '' ){ $this->define('/^(?:\\\\u[0-9A-F]{4,4}|[$_\\pL\\p{Nl}])(?:\\\\u[0-9A-F]{4}|[$_\\pL\\pN\\p{Mn}\\p{Mc}\\p{Pc}])*/ui', array($this,'matchWord') ); $this->define('/^\\s+/u', T_WHITESPACE ); $this->define('!^//.*!', T_COMMENT ); $this->define('!^/\\*.*\\*/!Us', array($this,'matchComment') ); $this->define('/^"(?:\\\\.|[^\\r\\n\\p{Zl}\\p{Zp}"\\\\])*"/u', T_CONSTANT_ENCAPSED_STRING ); $this->define('/^\'(?:\\\\.|[^\\r\\n\\p{Zl}\\p{Zp}\'\\\\])*\'/u', T_CONSTANT_ENCAPSED_STRING ); $this->define('/^[-+;,<>.=:|&^!?*%~(){}[\\]]/'); parent::__construct($src); } public function matchWord( $s ){ if( array_key_exists($s,self::$words) ){ return self::$words[$s]; } return T_STRING; } public function matchComment( $s ){ if( '/**' === substr($s,0,3) ){ return T_DOC_COMMENT; } return T_COMMENT; } }
28
  class LocoExtracted implements Countable { private $exp = array(); private $reg = array(); private $dom = array(); private $dflt = ''; public function extractSource( LocoExtractor $ext, $src, $fileref = '' ){ $ext->extract( $this, $ext->tokenize($src), $fileref ); return $this; } public function export(){ return $this->exp; } public function count(){ return count( $this->exp ); } public function getDomainCounts(){ return $this->dom; } public function setDomain( $default ){ $this->dflt = (string) $default; return $this; } public function getDomain(){ return $this->dflt; } public function pushMeta( $source, $notes = '', $domain = null ){ if( ! $domain || '*' === $domain ){ $domain = $this->dflt; } $entry = array( 'id' => '', 'source' => $source, 'target' => '', 'notes' => $notes, ); if( $domain ){ $entry['domain'] = $domain; $key = $source."\1".$domain; } else { $key = $source; } return $this->pushMsgid( $key, $entry, $domain ); } public function pushMsgid( $key, array $entry, $domain ){ if( isset($this->reg[$key]) ){ $index = $this->reg[$key]; $clash = $this->exp[$index]; if( $value = $this->mergeField( $clash, $entry, 'refs', ' ') ){ $this->exp[$index]['refs'] = $value; } if( $value = $this->mergeField( $clash, $entry, 'notes', "\n") ){ $this->exp[$index]['notes'] = $value; } } else { $index = count($this->exp); $this->reg[$key] = $index; $this->exp[$index] = $entry; if( isset($this->dom[$domain]) ){ $this->dom[$domain]++; } else { $this->dom[$domain] = 1; } } return $index; } public function pushMsgidPlural( $key, array $entry ){ $key = $key."\2"; if( ! isset($this->reg[$key]) ){ $index = count($this->exp); $this->reg[$key] = $index; $this->exp[$index] = $entry; } } public function mergeField( array $old, array $new, $field, $glue ){ $prev = isset($old[$field]) ? $old[$field] : ''; if( isset($new[$field]) ){ $text = $new[$field]; if( '' !== $prev && $prev !== $text ){ if( 'notes' === $field && preg_match( '/^'.preg_quote( rtrim($text,'. '),'/').'[. ]*$/mu', $prev ) ) { $text = $prev; } else { $text = $prev.$glue.$text; } } return $text; } return $prev; } public function filter( $domain ){ $map = array(); $newOffset = 1; $matchAll = '*' === $domain; $raw = array( array( 'id' => '', 'source' => '', 'target' => '', 'domain' => $matchAll ? '' : $domain, ) ); foreach( $this->exp as $oldOffset => $r ){ if( isset($r['parent']) ){ if( isset($map[$r['parent']]) ){ $r['parent'] = $map[ $r['parent'] ]; $raw[ $newOffset++ ] = $r; } } else { if( $matchAll ){ $match = true; } else if( isset($r['domain']) ){ $match = $domain === $r['domain']; } else { $match = $domain === ''; } if( $match ){ $map[ $oldOffset ] = $newOffset; $raw[ $newOffset++ ] = $r; } } } return $raw; } }
29
+ abstract class LocoExtractor { private $rules; private $wp = array(); private $domain; abstract public function tokenize( $src ); abstract public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ); abstract protected function fsniff( $str ); abstract protected function decapse( $raw ); abstract protected function comment( $comment ); public function __construct( array $rules ){ $this->rules = $rules; } public function setDomain( $default ){ $this->domain = $default; return $this; } public function headerize( array $tags, $domain = '' ){ if( isset($this->wp[$domain]) ){ $this->wp[$domain] += $tags; } else { $this->wp[$domain] = $tags; } return $this; } protected function getHeaders(){ return $this->wp; } final public function extractSource( $src, $fileref ){ $strings = new LocoExtracted; $this->extract( $strings, $this->tokenize($src), $fileref ); return $strings; } public function rule( $s ){ return isset($this->rules[$s]) ? $this->rules[$s] : ''; } protected function push( LocoExtracted $strings, $rule, array $args, $comment = '', $ref = '' ){ $s = strpos( $rule, 's'); $p = strpos( $rule, 'p'); $c = strpos( $rule, 'c'); $d = strpos( $rule, 'd'); if( false === $s || ! isset($args[$s]) ){ return null; } $key = $args[$s]; if( ! is_string($key) ){ return null; } $msgid = $key; $entry = array( 'id' => '', 'source' => $msgid, 'target' => '', ); if( is_int($c) && isset($args[$c]) ){ $entry['context'] = $context = $args[$c]; $key .= "\0". $context; } else if( '' === $msgid ){ return null; } else { $context = null; } if( $ref ){ $entry['refs'] = $ref; } if( is_int($d) && array_key_exists($d,$args) ){ $domain = $args[$d]; if( is_null($domain) ){ $domain = ''; } } else { $domain = $this->domain or $domain = $strings->getDomain(); } if( is_string($domain) && '' !== $domain ){ $entry['domain'] = $domain; $key .= "\1".$domain; } $parse_printf = true; if( $comment = $this->comment($comment) ){ if( preg_match('/^xgettext:\\s*([-a-z]+)-format\\s*/mi', $comment, $r, PREG_OFFSET_CAPTURE ) ){ $entry['format'] = $r[1][0]; $comment = trim( substr_replace( $comment,'', $r[0][1], strlen($r[0][0]) ) ); $parse_printf = ( 'no-' === substr($entry['format'],0,3) ) ? false : null; } if( preg_match('/^references?:( *.+:\\d+)*\\s*/mi', $comment, $r, PREG_OFFSET_CAPTURE ) ){ $entry['refs'] = trim($r[1][0],' '); $comment = trim( substr_replace( $comment, '', $r[0][1], strlen($r[0][0]) ) ); } $entry['notes'] = $comment; } if( $parse_printf && ( $format = $this->fsniff($msgid) ) ){ $entry['format'] = $format; } $index = $strings->pushMsgid( $key, $entry, $domain ); if( is_int($p) && isset($args[$p]) ){ $msgid_plural = $args[$p]; $entry = array( 'id' => '', 'source' => $msgid_plural, 'target' => '', 'plural' => 1, 'parent' => $index, ); if( false !== $parse_printf && ( $format = $this->fsniff($msgid_plural) ) ){ $entry['format'] = $format; } $strings->pushMsgidPlural( $key, $entry ); } return $index; } }
30
  class LocoPHPTokens implements LocoTokensInterface, Countable { private $i; private $tokens; private $skip_tokens = array(); private $literal_tokens = array(); public function __construct( array $tokens ){ $this->tokens = $tokens; $this->rewind(); } public function literal( array $a ){ foreach( $a as $t ){ $this->literal_tokens[ $t ] = 1; } return $this; } public function ignore( array $a ){ foreach( $a as $t ){ $this->skip_tokens[$t] = true; } return $this; } public function export(){ $arr = array(); $this->rewind(); while( $tok = $this->advance() ){ $arr[] = $tok; } return $arr; } public function advance(){ $tok = $this->current(); $this->next(); return $tok; } public function rewind(){ $this->i = ( false === reset($this->tokens) ? null : key($this->tokens) ); } public function valid(){ while( isset($this->i) ){ $tok = $this->tokens[$this->i]; if( array_key_exists( is_array($tok) ? $tok[0] : $tok, $this->skip_tokens ) ){ $this->next(); } else { return true; } } return false; } public function key(){ return $this->i; } public function next(){ $this->i = ( false === next($this->tokens) ? null : key($this->tokens) ); } public function current(){ if( ! $this->valid() ){ return false; } $tok = $this->tokens[$this->i]; if( is_array($tok) && isset($this->literal_tokens[$tok[0]]) ){ return $tok[1]; } return $tok; } public function __toString(){ $s = array(); foreach( $this as $token ){ $s[] = is_array($token) ? $token[1] : $token; } return implode('',$s); } public function count(){ return count($this->tokens); } }
31
  class LocoPHPEscapeParser extends LocoEscapeParser { public function __construct(){ parent::__construct( array( 'n' => "\n", 'r' => "\r", 't' => "\t", 'v' => "\x0B", 'f' => "\x0C", 'e' => "\x1B", '$' => '$', '\\' => '\\', '"' => '"', ) ); } protected function stripSlashes( $s ){ return preg_replace_callback('/\\\\(x[0-9A-Fa-f]{1,2}|[0-3]?[0-7]{1,2})/', array($this,'unescapeMatch'), $s, -1, $n ); } }
32
  function loco_unescape_php_string( $s ){ static $l; if( is_null($l) ) { $l = new LocoPHPEscapeParser; } return $l->unescape($s); }
33
+ function loco_decapse_php_string( $s ){ if( ! $s ){ return (string) $s; } $q = $s[0]; if( "'" === $q ){ return str_replace( array('\\'.$q, '\\\\'), array($q, '\\'), substr( $s, 1, -1 ) ); } if( '"' !== $q ){ return $s; } return loco_unescape_php_string( substr($s,1,-1) ); }
34
+ function loco_parse_php_comment($comment){ $comment = trim( $comment,"/ \n\r\t" ); if( '' !== $comment && '*' === $comment[0] ){ $lines = array(); $junk = "\r\t/ *"; foreach( explode("\n",$comment) as $line ){ $line = trim($line,$junk); if( '' !== $line ){ $lines[] = $line; } } $comment = implode("\n", $lines); } return $comment; }
35
+ function loco_parse_wp_comment( $block ){ $header = array(); if( '*' === $block[1] ){ $junk = "\r\t/ *"; foreach( explode("\n", $block) as $line ){ if( false !== ( $i = strpos($line,':') ) ){ $key = substr($line,0,$i); $val = substr($line,++$i); $header[ trim($key,$junk) ] = trim($val,$junk); } } } return $header; }
36
  function loco_sniff_printf( $s, $p, $limit = 0, $offset = 0 ){ $n = 0; while( is_string($s) && '' !== $s && false !== ( $i = strpos($s,'%',$offset) ) ){ if( 0 !== $i ){ $s = substr( $s, $i ); } if( preg_match( $p, $s, $r ) ){ $match = $r[0]; if( 0 < $n && isset($r[1]) && '' === $r[1] && '%' !== substr($match,-1) ){ return 0; } if( ++$n === $limit ){ break; } $offset = strlen($match); } else { return 0; } } return $n; }
37
  function loco_sniff_php_printf( $s, $limit = 0 ){ return loco_sniff_printf( $s, '/^%(?:[1-9]\\d*\\$)?(?:\'.|[-+0 ])*\\d*(?:\\.\\d+)?[suxXbcdeEfFgGo%]/', $limit ); }
38
  class LocoPHPExtractor extends LocoExtractor { private $defs = array(); public function tokenize( $src ){ return new LocoPHPTokens( token_get_all($src) ); } public function decapse( $raw ){ return loco_decapse_php_string( $raw ); } public function fsniff( $str ){ return loco_sniff_php_printf($str) ? 'php' : ''; } protected function comment( $comment ){ $comment = loco_parse_php_comment($comment); $comment = preg_replace('/^translators:\\s+/mi', '', $comment ); return $comment; } public function define( $name, $value ){ if( is_string($value) ){ $this->defs[$name] = $value; } return $this; } public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ){ $tokens->ignore( array(T_WHITESPACE) ); $n = 0; $depth = 0; $comment = ''; $narg = 0; $args = array(); $ref = ''; $rule = ''; $wp = $this->getHeaders(); $tokens->rewind(); while( $tok = $tokens->advance() ){ if( is_string($tok) ){ $s = $tok; $t = null; } else { $t = $tok[0]; $s = $tok[1]; } if( $depth ){ if( ')' === $s || ']' === $s ){ if( 0 === --$depth ){ if( $this->push( $strings, $rule, $args, $comment, $ref ) ){ $n++; } $comment = ''; } } else if( '(' === $s || '[' === $s ){ $depth++; $args[$narg] = null; } else if( 1 === $depth ){ if( ',' === $s ){ $narg++; } else if( T_CONSTANT_ENCAPSED_STRING === $t ){ $args[$narg] = $this->decapse($s); } else if( T_STRING === $t && array_key_exists($s,$this->defs) ){ $args[$narg] = $this->defs[$s]; } else { $args[$narg] = null; } } } else if( T_COMMENT === $t || T_DOC_COMMENT === $t ){ $was_header = false; if( 0 === $n ){ if( false !== strpos($s,'* @package') ){ $was_header = true; } if( $wp && ( $header = loco_parse_wp_comment($s) ) ){ foreach( $wp as $domain => $tags ){ foreach( array_intersect_key($header,$tags) as $tag => $source ){ $strings->pushMeta( $source, $tags[$tag], $domain ); $was_header = true; } } } } if( ! $was_header ) { $comment = $s; } } else if( T_STRING === $t && '(' === $tokens->advance() && ( $rule = $this->rule($s) ) ){ $ref = $fileref ? $fileref.':'.$tok[2]: ''; $depth = 1; $args = array(); $narg = 0; } else if( $comment ){ if( false === stripos($comment, 'translators:') && false === strpos($comment, 'xgettext:') ){ $comment = ''; } } } return $this; } }
lib/compiled/phpunit.php CHANGED
@@ -2,5 +2,5 @@
2
  /**
3
  * Downgraded for PHP 5.2 compatibility. Do not edit.
4
  */
5
- class LocoDomQuery extends ArrayIterator { public static function parse( $source ){ $dom = new DOMDocument('1.0', 'UTF-8' ); $dom->preserveWhitespace = true; $dom->formatOutput = false; $source = '<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body>'.$source.'</body></html>'; $used_errors = libxml_use_internal_errors(true); $opts = LIBXML_HTML_NODEFDTD; $parsed = $dom->loadHTML( $source, $opts ); $errors = libxml_get_errors(); $used_errors || libxml_use_internal_errors(false); libxml_clear_errors(); if( $errors || ! $parsed ){ $e = new Loco_error_ParseException('Unknown parse error'); foreach( $errors as $error ){ $e = new Loco_error_ParseException( trim($error->message) ); $e->setContext( $error->line, $error->column, $source ); if( LIBXML_ERR_FATAL === $error->level ){ throw $e; } } if( ! $parsed ){ throw $e; } } return $dom; } public function __construct( $value ){ if( is_array($value) ){ $nodes = $value; } else if( $value instanceof DOMDocument ){ $nodes = array( $value->documentElement ); } else if( $value instanceof DOMNodeList ){ $nodes = array(); foreach( $value as $node ){ $nodes[] = $node; } } else { $value = self::parse( $value ); $nodes = array( $value->documentElement ); } parent::__construct( $nodes ); } public function eq( $index ){ $q = new LocoDomQuery(array()); if( $el = $this[$index] ){ $q[] = $el; } return $q; } public function find( $value ){ $q = new LocoDomQuery( array() ); $f = new _LocoDomQueryFilter($value); foreach( $this as $el ){ foreach( $f->filter($el) as $match ){ $q[] = $match; } } return $q; } public function text(){ $s = ''; foreach( $this as $el ){ $s .= $el->textContent; } return $s; } public function html(){ $s = ''; foreach( $this as $outer ){ foreach( $outer->childNodes as $inner ){ $s .= $inner->ownerDocument->saveXML($inner); } break; } return $s; } public function attr( $name ){ foreach( $this as $el ){ return $el->getAttribute($name); } return null; } public function serialize(){ $pairs = array(); foreach( array('input','select','textarea','button') as $type ){ foreach( $this->find($type) as $field ){ $name = $field->getAttribute('name'); if( ! $name ){ continue; } if( $field->hasAttribute('type') ){ $type = $field->getAttribute('type'); } if( 'select' === $type ){ $value = null; $f = new _LocoDomQueryFilter('option'); foreach( $f->filter($field) as $option ){ if( $option->hasAttribute('value') ){ $_value = $option->getAttribute('value'); } else { $_value = $option->nodeValue; } if( $option->hasAttribute('selected') ){ $value = $_value; break; } else if( is_null($value) ){ $value = $_value; } } if( is_null($value) ){ $value = ''; } } else if( 'checkbox' === $type || 'radio' === $type ){ if( $field->hasAttribute('checked') ){ $value = $field->getAttribute('value'); } else { continue; } } else if( 'file' === $type ){ $value = ''; } else if( $field->hasAttribute('value') ){ $value = $field->getAttribute('value'); } else { $value = $field->textContent; } $pairs[] = sprintf('%s=%s', rawurlencode($name), rawurlencode($value) ); } } return implode('&',$pairs); } }
6
  class _LocoDomQueryFilter { private $tag; private $attr = array(); public function __construct( $value ){ $id = '[-_a-z][-_a-z0-9]*'; if( ! preg_match('/^([a-z1-6]*)(#'.$id.')?(\.'.$id.')?(\[(\w+)="(.+)"\])?$/i', $value, $r ) ){ throw new InvalidArgumentException('Bad filter, '.$value ); } if( $r[1] ){ $this->tag = $r[1]; } if( ! empty($r[2]) ){ $this->attr['id'] = substr($r[2],1); } if( ! empty($r[3]) ){ $this->attr['class'] = substr($r[3],1); } if( ! empty($r[4]) ){ $this->attr[ $r[5] ] = $r[6]; } } public function filter( DOMElement $el ){ if( $this->tag ){ $list = $el->getElementsByTagName($this->tag); $recursive = false; } else { $list = $el->childNodes; $recursive = true; } if( $this->attr ){ $list = $this->reduce( $list, new ArrayIterator, $recursive )->getArrayCopy(); } return $list; } public function reduce( DOMNodeList $list, ArrayIterator $reduced, $recursive ){ foreach( $list as $node ){ if( $node instanceof DOMElement ){ $matched = false; foreach( $this->attr as $name => $value ){ if( ! $node->hasAttribute($name) ){ $matched = false; break; } $values = array_flip( explode(' ', $node->getAttribute($name) ) ); if( ! isset($values[$value]) ){ $matched = false; break; } $matched = true; } if( $matched ){ $reduced[] = $node; } if( $recursive && $node->hasChildNodes() ){ $this->reduce( $node->childNodes, $reduced, true ); } } } return $reduced; } }
2
  /**
3
  * Downgraded for PHP 5.2 compatibility. Do not edit.
4
  */
5
+ class LocoDomQuery extends ArrayIterator { public static function parse( $source ){ $dom = new DOMDocument('1.0', 'UTF-8' ); $dom->preserveWhitespace = true; $dom->formatOutput = false; $source = '<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body>'.$source.'</body></html>'; $used_errors = libxml_use_internal_errors(true); $opts = LIBXML_HTML_NODEFDTD; $parsed = $dom->loadHTML( $source, $opts ); $errors = libxml_get_errors(); $used_errors || libxml_use_internal_errors(false); libxml_clear_errors(); if( $errors || ! $parsed ){ $e = new Loco_error_ParseException('Unknown parse error'); foreach( $errors as $error ){ $e = new Loco_error_ParseException( trim($error->message) ); $e->setContext( $error->line, $error->column, $source ); if( LIBXML_ERR_FATAL === $error->level ){ throw $e; } } if( ! $parsed ){ throw $e; } } return $dom; } public function __construct( $value ){ if( $value instanceof DOMDocument ){ $value = array( $value->documentElement ); } else if( $value instanceof DOMNode ){ $value = array( $value ); } if( is_iterable($value) ){ $nodes = array(); foreach( $value as $node ){ $nodes[] = $node; } } else if( is_string($value) || method_exists($value,'__toString') ){ $value = self::parse( $value ); $nodes = array( $value->documentElement ); } else { $type = is_object($value) ? get_class($value) : gettype($value); throw new InvalidArgumentException('Cannot construct DOM from '.$type ); } parent::__construct( $nodes ); } public function eq( $index ){ $q = new LocoDomQuery(array()); if( $el = $this[$index] ){ $q[] = $el; } return $q; } public function find( $value ){ $q = new LocoDomQuery( array() ); $f = new _LocoDomQueryFilter($value); foreach( $this as $el ){ foreach( $f->filter($el) as $match ){ $q[] = $match; } } return $q; } public function children(){ $q = new LocoDomQuery(array()); foreach( $this as $el ){ if( $el instanceof DOMNode ){ foreach( $el->childNodes as $child ) { $q[] = $child; } } } return $q; } public function text(){ $s = ''; foreach( $this as $el ){ $s .= $el->textContent; } return $s; } public function html(){ $s = ''; foreach( $this as $outer ){ foreach( $outer->childNodes as $inner ){ $s .= $inner->ownerDocument->saveXML($inner); } break; } return $s; } public function attr( $name ){ foreach( $this as $el ){ return $el->getAttribute($name); } return null; } public function serialize(){ $pairs = array(); foreach( array('input','select','textarea','button') as $type ){ foreach( $this->find($type) as $field ){ $name = $field->getAttribute('name'); if( ! $name ){ continue; } if( $field->hasAttribute('type') ){ $type = $field->getAttribute('type'); } if( 'select' === $type ){ $value = null; $f = new _LocoDomQueryFilter('option'); foreach( $f->filter($field) as $option ){ if( $option->hasAttribute('value') ){ $_value = $option->getAttribute('value'); } else { $_value = $option->nodeValue; } if( $option->hasAttribute('selected') ){ $value = $_value; break; } else if( is_null($value) ){ $value = $_value; } } if( is_null($value) ){ $value = ''; } } else if( 'checkbox' === $type || 'radio' === $type ){ if( $field->hasAttribute('checked') ){ $value = $field->getAttribute('value'); } else { continue; } } else if( 'file' === $type ){ $value = ''; } else if( $field->hasAttribute('value') ){ $value = $field->getAttribute('value'); } else { $value = $field->textContent; } $pairs[] = sprintf('%s=%s', rawurlencode($name), rawurlencode($value) ); } } return implode('&',$pairs); } }
6
  class _LocoDomQueryFilter { private $tag; private $attr = array(); public function __construct( $value ){ $id = '[-_a-z][-_a-z0-9]*'; if( ! preg_match('/^([a-z1-6]*)(#'.$id.')?(\.'.$id.')?(\[(\w+)="(.+)"\])?$/i', $value, $r ) ){ throw new InvalidArgumentException('Bad filter, '.$value ); } if( $r[1] ){ $this->tag = $r[1]; } if( ! empty($r[2]) ){ $this->attr['id'] = substr($r[2],1); } if( ! empty($r[3]) ){ $this->attr['class'] = substr($r[3],1); } if( ! empty($r[4]) ){ $this->attr[ $r[5] ] = $r[6]; } } public function filter( DOMElement $el ){ if( $this->tag ){ $list = $el->getElementsByTagName($this->tag); $recursive = false; } else { $list = $el->childNodes; $recursive = true; } if( $this->attr ){ $list = $this->reduce( $list, new ArrayIterator, $recursive )->getArrayCopy(); } return $list; } public function reduce( DOMNodeList $list, ArrayIterator $reduced, $recursive ){ foreach( $list as $node ){ if( $node instanceof DOMElement ){ $matched = false; foreach( $this->attr as $name => $value ){ if( ! $node->hasAttribute($name) ){ $matched = false; break; } $values = array_flip( explode(' ', $node->getAttribute($name) ) ); if( ! isset($values[$value]) ){ $matched = false; break; } $matched = true; } if( $matched ){ $reduced[] = $node; } if( $recursive && $node->hasChildNodes() ){ $this->reduce( $node->childNodes, $reduced, true ); } } } return $reduced; } }
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_CH'=>array(0=>'German (Switzerland)',1=>'Deutsch (Schweiz)'),'de_DE'=>array(0=>'German',1=>'Deutsch'),'de_DE_formal'=>array(0=>'German (Formal)',1=>'Deutsch (Sie)'),'de_CH_informal'=>array(0=>'German (Switzerland, Informal)',1=>'Deutsch (Schweiz, Du)'),'dzo'=>array(0=>'Dzongkha',1=>'རྫོང་ཁ'),'el'=>array(0=>'Greek',1=>'Ελληνικά'),'en_AU'=>array(0=>'English (Australia)',1=>'English (Australia)'),'en_ZA'=>array(0=>'English (South Africa)',1=>'English (South Africa)'),'en_CA'=>array(0=>'English (Canada)',1=>'English (Canada)'),'en_GB'=>array(0=>'English (UK)',1=>'English (UK)'),'en_NZ'=>array(0=>'English (New Zealand)',1=>'English (New Zealand)'),'eo'=>array(0=>'Esperanto',1=>'Esperanto'),'es_ES'=>array(0=>'Spanish (Spain)',1=>'Español'),'es_CO'=>array(0=>'Spanish (Colombia)',1=>'Español de Colombia'),'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_GT'=>array(0=>'Spanish (Guatemala)',1=>'Español de Guatemala'),'es_AR'=>array(0=>'Spanish (Argentina)',1=>'Español de Argentina'),'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_BE'=>array(0=>'Dutch (Belgium)',1=>'Nederlands (België)'),'nl_NL'=>array(0=>'Dutch',1=>'Nederlands'),'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_PT'=>array(0=>'Portuguese (Portugal)',1=>'Português'),'pt_BR'=>array(0=>'Portuguese (Brazil)',1=>'Português do Brasil'),'pt_PT_ao90'=>array(0=>'Portuguese (Portugal, AO90)',1=>'Português (AO90)'),'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=>'অসমীয়া'),'az'=>array(0=>'Azerbaijani',1=>'Azərbaycan dili'),'azb'=>array(0=>'South Azerbaijani',1=>'گؤنئی آذربایجان'),'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'=>array(0=>'German',1=>'Deutsch'),'de_CH'=>array(0=>'German (Switzerland)',1=>'Deutsch (Schweiz)'),'de_CH_informal'=>array(0=>'German (Switzerland, Informal)',1=>'Deutsch (Schweiz, Du)'),'de_DE_formal'=>array(0=>'German (Formal)',1=>'Deutsch (Sie)'),'dzo'=>array(0=>'Dzongkha',1=>'རྫོང་ཁ'),'el'=>array(0=>'Greek',1=>'Ελληνικά'),'en_GB'=>array(0=>'English (UK)',1=>'English (UK)'),'en_NZ'=>array(0=>'English (New Zealand)',1=>'English (New Zealand)'),'en_CA'=>array(0=>'English (Canada)',1=>'English (Canada)'),'en_ZA'=>array(0=>'English (South Africa)',1=>'English (South Africa)'),'en_AU'=>array(0=>'English (Australia)',1=>'English (Australia)'),'eo'=>array(0=>'Esperanto',1=>'Esperanto'),'es_AR'=>array(0=>'Spanish (Argentina)',1=>'Español de Argentina'),'es_CO'=>array(0=>'Spanish (Colombia)',1=>'Español de Colombia'),'es_VE'=>array(0=>'Spanish (Venezuela)',1=>'Español de Venezuela'),'es_CL'=>array(0=>'Spanish (Chile)',1=>'Español de Chile'),'es_GT'=>array(0=>'Spanish (Guatemala)',1=>'Español de Guatemala'),'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_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_CA'=>array(0=>'French (Canada)',1=>'Français du Canada'),'fr_FR'=>array(0=>'French (France)',1=>'Français'),'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_BE'=>array(0=>'Dutch (Belgium)',1=>'Nederlands (België)'),'nl_NL'=>array(0=>'Dutch',1=>'Nederlands'),'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'=>array(0=>'Portuguese (Portugal)',1=>'Português'),'pt_PT_ao90'=>array(0=>'Portuguese (Portugal, AO90)',1=>'Português (AO90)'),'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_CN'=>array(0=>'Chinese (China)',1=>'简体中文'),'zh_HK'=>array(0=>'Chinese (Hong Kong)',1=>'香港中文版 '),'zh_TW'=>array(0=>'Chinese (Taiwan)',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.3.1
8
  Author URI: https://localise.biz/wordpress/plugin
9
  Text Domain: loco-translate
10
  Domain Path: /languages/
@@ -36,7 +36,7 @@ function loco_plugin_file(){
36
  * @return string
37
  */
38
  function loco_plugin_version(){
39
- return '2.3.1';
40
  }
41
 
42
 
@@ -154,8 +154,11 @@ function loco_autoload( $name ){
154
  if( 'Loco_' === substr($name,0,5) ){
155
  loco_include( 'src/'.strtr( substr($name,5), '_', '/' ).'.php' );
156
  }
157
- else if( ! isset($name{20}) && file_exists( $path = loco_plugin_root().'/src/compat/'.$name.'.php') ){
158
- require $path;
 
 
 
159
  }
160
  }
161
 
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.3.2
8
  Author URI: https://localise.biz/wordpress/plugin
9
  Text Domain: loco-translate
10
  Domain Path: /languages/
36
  * @return string
37
  */
38
  function loco_plugin_version(){
39
+ return '2.3.2';
40
  }
41
 
42
 
154
  if( 'Loco_' === substr($name,0,5) ){
155
  loco_include( 'src/'.strtr( substr($name,5), '_', '/' ).'.php' );
156
  }
157
+ else if( strlen($name) < 20 ){
158
+ $path = loco_plugin_root().'/src/compat/'.$name.'.php';
159
+ if( file_exists($path) ){
160
+ require $path;
161
+ }
162
  }
163
  }
164
 
pub/css/admin.css CHANGED
@@ -1 +1 @@
1
- ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.3.1);background-repeat:no-repeat;min-height:16px}._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.3.1) 0 0 no-repeat;min-height:75px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.3.1);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.3.1);background-size:16px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.3.1);background-size:16px}}._green_glow_inner{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}.loco-font,#loco.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco.wrap .icon,#loco.wrap .has-icon:before{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@font-face{font-family:"loco";src:url("../font/loco.eot");src:url("../font/loco.eot?#iefix") format("embedded-opentype"),url("../font/loco.woff") format("woff"),url("../font/loco.ttf") format("truetype"),url("../font/loco.svg#loco") format("svg");font-weight:normal;font-style:normal}.tipsy{font-size:11px;position:absolute;padding:5px;z-index:500001;opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.tipsy.in{opacity:1}.tipsy-inner{background-color:#000;color:#fff;white-space:nowrap;padding:6px 8px;line-height:1.3em;text-align:center;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-font-smoothing:subpixel-antialiased}.tipsy-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.tipsy-n .tipsy-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-nw .tipsy-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-ne .tipsy-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-s .tipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-sw .tipsy-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-se .tipsy-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-e .tipsy-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.tipsy-w .tipsy-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}#loco.wrap .selector li,#loco.wrap .selector .handle,#loco.wrap .selectoradd a,#loco.wrap .selectorsep:before,#loco.wrap .selectorsep span{padding:.3em .75em}#loco.wrap .selector{text-align:left;display:inline-block;white-space:nowrap}#loco.wrap .selectoradd a,#loco.wrap .selector .handle{cursor:default;display:block;position:relative;border-top:solid 1px #fff;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-left:solid 1px #fff;color:#666;height:1.3em;overflow:hidden;white-space:normal}#loco.wrap .selectorsep{display:inline-block;border:solid 1px transparent}#loco.wrap .selectorsep:before{display:block;position:relative;color:#999;height:1.3em;overflow:hidden}#loco.wrap .selectorsep>*{display:block;line-height:1em;color:#666;height:1.3em;overflow:hidden}#loco.wrap .selector .handle{outline:none;white-space:nowrap;padding-right:2.3em;max-width:250px;text-overflow:ellipsis}#loco.wrap .selector .handle .prefix{padding-right:.6ex}#loco.wrap .selector .handle:after{font-family:loco;font-size:1.3em;color:#ccc;display:block;position:absolute;top:.25em;right:.6em;content:"▼"}#loco.wrap .selector .handle:focus:after,#loco.wrap .selector .handle:hover:after{color:#666}#loco.wrap .selector.no-caret .handle{padding-right:.75em}#loco.wrap .selector.no-caret .handle:after{display:none}#loco.wrap .selector.no-title .handle{padding-left:.5em;padding-right:.5em}#loco.wrap .selector.no-title .handle .label{display:none}#loco.wrap .selector.no-title .handle .icon{margin-right:0px}#loco.wrap .selector.dummy .handle{border-color:transparent}#loco.wrap .selector.dummy .handle:after{display:none}#loco.wrap .selectoradd{position:relative}#loco.wrap .selectoradd>*{display:block;float:left;clear:none}#loco.wrap .selectoradd>a.has-icon{width:1.3em}#loco.wrap .selectoradd>a.has-icon:before{color:#999;display:inline;padding-left:0;padding-right:0;line-height:1.4em}#loco.wrap .selectoradd>a.has-icon:hover:after{color:#2e892e}#loco.wrap .selectorsep{display:inline-block}#loco.wrap .selectorsep span{color:#666;height:1.3em}#loco.wrap .selector ul{padding:0}#loco.wrap .selector ul,#loco.wrap .selector li{display:block;position:relative;cursor:default;margin:0}#loco.wrap .selector ul{z-index:5;position:absolute;left:0;top:0;background:#f5f5f5;box-shadow:0 10px 5px rgba(0,0,0,.2);border:solid 1px #ccc;overflow:auto}#loco.wrap .selector.up ul{margin-top:0}#loco.wrap .selector.multi li input{display:none}#loco.wrap .selector.multi li.checked{background:#e5e5e5}#loco.wrap .selector li.active{background:#e5e5e5 !important}#loco.wrap .selector li.over{background:#ccc !important;color:#fff;text-shadow:1px 1px #aaa}#loco.wrap .selector li.over .label{color:#fff}#loco.wrap .selector .label{font:inherit;color:inherit}#loco.wrap .selector .icon{display:inline-block;min-width:1.2em;text-align:center;font-size:14px}#loco.wrap .selector .icon.no-icon{display:none}#loco.wrap .selector .icon:before{color:#666}#loco.wrap .selector .avtr{width:18px;height:18px;background-size:18px;background-repeat:no-repeat}#loco.wrap .selector .label{line-height:1}#loco.wrap .selector .icon,#loco.wrap .selector .icon-16{vertical-align:bottom}#loco.wrap .selector .icon,#loco.wrap .selector .lang,#loco.wrap .selector .icon-16{margin-right:5px}#loco.wrap .selector .region,#loco.wrap .selector .variant-wales,#loco.wrap .selector .region-gb.lang-cy,#loco.wrap .selector .variant-scotland,#loco.wrap .selector .region-gb.lang-gd,#loco.wrap .selector .lang-ca,#loco.wrap .selector .lang-eo,#loco.wrap .selector .lang-eu{margin-left:2px;margin-right:7px}#loco.wrap .selector.ticked .icon.no-icon{font-size:12px;display:inline-block}#loco.wrap .selector.ticked .active .icon.no-icon:before{content:"✓"}#loco.wrap .selectoradd a:hover,#loco.wrap .selector a.handle:focus,#loco.wrap .selector a.handle:hover{color:#000;border-color:#999}#loco.wrap .selector.active .handle{border-color:#999;background-color:#eee;color:#999}#loco.wrap .selector.active .handle:after{color:#999;content:"▲"}#loco.wrap .selector.disabled{cursor:default;cursor:no-drop;cursor:not-allowed}#loco.wrap .selector.disabled .handle{pointer-events:none;border-top:solid 1px #fff;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-left:solid 1px #fff;color:#999;padding-right:1em}#loco.wrap .selector.disabled .handle:after{display:none}#loco.wrap .selector.disabled .handle span.icon{color:#999 !important}#loco.wrap .selector li.disabled,#loco.wrap .selector li.disabled.over{color:#aaa;text-shadow:1px 1px #fff;pointer-events:none}#loco.wrap .selector li.disabled *{cursor:text}#loco.wrap .selector li.disabled .icon:before{color:#aaa}#loco.wrap .selector li.disabled .flag,#loco.wrap .selector li.disabled .icon-16{opacity:.4}#loco.wrap .selector.lefty ul{left:auto;right:0}#loco.wrap .selector.lefty ul .icon,#loco.wrap .selector.lefty ul .icon-32{display:block;float:right;clear:none}#loco.wrap .selector.lefty ul .label{padding-right:32px;padding-left:0}#loco.wrap .selector ul>form{margin:0;display:block}#loco.wrap .selector ul>form input{margin:0;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}#loco.wrap .selector ul>form input:focus{-webkit-box-shadow:inset 0 0 5px 0 #3db63d;-moz-box-shadow:inset 0 0 5px 0 #3db63d;box-shadow:inset 0 0 5px 0 #3db63d}#loco.wrap .selector ul>form input.error{border-color:#c00;-webkit-box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5);-moz-box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5);box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5)}#loco.wrap .selector ul>form a.clear{margin:0;border:none}#loco.wrap .selector ul>form ::placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco.wrap .selector ul>form ::-webkit-input-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco.wrap .selector ul>form :-moz-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block;opacity:1}#loco.wrap .selector ul>form ::-moz-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block;opacity:1}#loco.wrap .selector ul>form :-ms-input-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco.wrap .selector ul>form .ielt10 .placeheld{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco.wrap div.auto-comp-wrap{width:100%}#loco.wrap div.auto-comp-wrap input{display:inline-block}#loco.wrap div.auto-comp-wrap.loading input{background:transparent url(../img/ajax-loader.gif?v=2.3.1) right 2px no-repeat}#loco.wrap div.auto-comp-drop{color:#333;background:#fff;border-top:none;position:absolute;width:auto;top:0;left:0;z-index:99;-webkit-box-shadow:0 5px 5px rgba(0,0,0,.4);-moz-box-shadow:0 5px 5px rgba(0,0,0,.4);box-shadow:0 5px 5px rgba(0,0,0,.4)}#loco.wrap div.auto-comp-result{padding:5px 10px;cursor:pointer;background:#f0f0f0;border-top:solid 1px #fff;border-bottom:solid 1px #ddd;white-space:nowrap}#loco.wrap div.auto-comp-result:first-child{border-top:solid 1px #ddd}#loco.wrap div.auto-comp-result>*{display:inline-block;vertical-align:middle;line-height:normal}#loco.wrap div.auto-comp-result .icon:before{padding-right:5px}#loco.wrap div.auto-comp-result:hover{background:#a8a8a8;color:#fff;border-top-color:#a8a8a8;border-bottom-color:#999}#loco.wrap div.auto-comp-result.selected{background:#666 !important;color:#fff;border-top-color:#666;border-bottom-color:#666}#loco.wrap div.auto-comp-result .lang,#loco.wrap div.auto-comp-result .region,#loco.wrap div.auto-comp-result .variant-wales,#loco.wrap div.auto-comp-result .region-gb.lang-cy,#loco.wrap div.auto-comp-result .variant-scotland,#loco.wrap div.auto-comp-result .region-gb.lang-gd,#loco.wrap div.auto-comp-result .lang-ca,#loco.wrap div.auto-comp-result .lang-eo,#loco.wrap div.auto-comp-result .lang-eu,#loco.wrap div.auto-comp-result .avtr{margin-right:5px}#loco.wrap div.auto-comp-wrap.error a.icon.clear:before{color:#c00;opacity:1}#loco.wrap div.auto-comp-wrap.error input[type=text]{border-color:#c00;color:#c00}#loco.wrap div.auto-comp-wrap.error input[type=text]:focus{-webkit-box-shadow:0 0 .5em 0 rgba(153,0,0,.5);-moz-box-shadow:0 0 .5em 0 rgba(153,0,0,.5);box-shadow:0 0 .5em 0 rgba(153,0,0,.5)}#loco.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.3.1);background-repeat:no-repeat;min-height:16px}#loco.wrap ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.3.1) 0 0 no-repeat;min-height:75px}#loco.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.3.1);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.3.1);background-size:16px}#loco.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.3.1);background-size:16px}}#loco.wrap ._green_glow_inner{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco.wrap ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco.wrap .loco-font,#loco.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco.wrap .icon,#loco.wrap .has-icon:before{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco.wrap .has-icon:before{display:inline-block;padding-right:.3em}#loco.wrap a.icon-help{cursor:help}#loco.wrap a.icon-help span{display:none}#loco.wrap .icon-notag:before{content:""}#loco.wrap .icon-magnify:before{content:"🔍"}#loco.wrap .icon-python:before{content:"🐍"}#loco.wrap .icon-unicode:before{content:"u"}#loco.wrap .icon-json:before{content:"{"}#loco.wrap .icon-bullist:before{content:""}#loco.wrap .icon-numlist:before{content:""}#loco.wrap .icon-indent:before{content:""}#loco.wrap .icon-outdent:before{content:""}#loco.wrap .icon-link:before{content:""}#loco.wrap .icon-unlink:before{content:""}#loco.wrap .icon-bold:before{content:"B"}#loco.wrap .icon-italic:before{content:"I"}#loco.wrap .icon-translate:before{content:""}#loco.wrap .icon-proj:before{content:""}#loco.wrap .icon-plural:before{content:"᛬"}#loco.wrap .icon-max:before,#loco.wrap .icon-full-screen:before{content:""}#loco.wrap .icon-min:before{content:""}#loco.wrap .icon-sort:before{content:""}#loco.wrap .icon-ok:before,#loco.wrap .notice-success>.has-icon:before,#loco.wrap .notice-success p>strong.has-icon:before{content:"✓"}#loco.wrap .icon-ok-empty:before{content:"🗌"}#loco.wrap .icon-checkbox-checked:before,#loco.wrap .selector.multi li.checked .icon-checkbox:before{content:"☑"}#loco.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco.wrap .icon-checkbox-partial:before{content:"☉"}#loco.wrap .icon-radio-checked:before{content:"⚫"}#loco.wrap .icon-radio-unchecked:before{content:"⚪"}#loco.wrap .icon-ext:before{content:"⬈"}#loco.wrap .icon-share:before{content:""}#loco.wrap .icon-star:before{content:""}#loco.wrap .icon-user:before{content:""}#loco.wrap .icon-remove:before{content:"×"}#loco.wrap .icon-cog:before{content:""}#loco.wrap .icon-trash:before{content:""}#loco.wrap .icon-time:before,#loco.wrap .icon-history:before{content:""}#loco.wrap .icon-download:before{content:""}#loco.wrap .icon-revert:before{content:""}#loco.wrap .icon-sync:before{content:""}#loco.wrap .icon-lock:before,#loco.wrap .notice-locked>.has-icon:before,#loco.wrap .notice-locked p>strong.has-icon:before{content:""}#loco.wrap .icon-flag:before{content:""}#loco.wrap .icon-tag:before{content:""}#loco.wrap .icon-tags:before{content:""}#loco.wrap .icon-print:before{content:""}#loco.wrap .icon-camera:before{content:""}#loco.wrap .icon-pencil:before{content:""}#loco.wrap .icon-add:before{content:""}#loco.wrap .icon-del:before{content:""}#loco.wrap .icon-clear:before,#loco.wrap a.icon.clear:before{content:""}#loco.wrap .icon-ok-sign:before{content:"✔"}#loco.wrap .icon-help:before{content:"?"}#loco.wrap .icon-info:before,#loco.wrap .notice-info>.has-icon:before,#loco.wrap .notice-info p>strong.has-icon:before{content:"ℹ"}#loco.wrap .icon-cancel:before{content:""}#loco.wrap .icon-warn:before,#loco.wrap .notice-error>.has-icon:before,#loco.wrap .notice-error p>strong.has-icon:before,#loco.wrap .notice-warning>.has-icon:before,#loco.wrap .notice-warning p>strong.has-icon:before{content:""}#loco.wrap .icon-comment:before{content:""}#loco.wrap .icon-bar-chart:before{content:""}#loco.wrap .icon-key:before{content:""}#loco.wrap .icon-cogs:before{content:""}#loco.wrap .icon-comments:before{content:""}#loco.wrap .icon-signout:before{content:""}#loco.wrap .icon-signin:before{content:""}#loco.wrap .icon-upload:before{content:""}#loco.wrap .icon-twitter:before{content:"🐦"}#loco.wrap .icon-facebook:before{content:""}#loco.wrap .icon-github:before{content:""}#loco.wrap .icon-feed:before{content:""}#loco.wrap .icon-globe:before{content:""}#loco.wrap .icon-wrench:before,#loco.wrap .notice-debug>.has-icon:before,#loco.wrap .notice-debug p>strong.has-icon:before{content:""}#loco.wrap .icon-group:before{content:""}#loco.wrap .icon-cloud:before{content:""}#loco.wrap .icon-copy:before{content:""}#loco.wrap .icon-save:before{content:""}#loco.wrap .icon-menu:before{content:""}#loco.wrap .icon-table:before{content:""}#loco.wrap .icon-caret-down:before{content:"▼"}#loco.wrap .icon-caret-up:before{content:"▲"}#loco.wrap .icon-caret-right:before{content:"▶"}#loco.wrap .icon-mail:before{content:""}#loco.wrap .icon-cloud-upload:before{content:""}#loco.wrap .icon-file:before{content:""}#loco.wrap .icon-circle-white:before{content:"⚬"}#loco.wrap .icon-circle-black:before{content:"●"}#loco.wrap .icon-eraser:before{content:""}#loco.wrap .icon-unlock:before{content:""}#loco.wrap .icon-apple:before{content:""}#loco.wrap .icon-android:before{content:""}#loco.wrap .icon-back:before{content:"⬅"}#loco.wrap .icon-next:before{content:"➔"}#loco.wrap .icon-arrow-up:before{content:""}#loco.wrap .icon-ccard:before{content:""}#loco.wrap .icon-caret-left:before{content:"◀"}#loco.wrap .icon-pro:before{content:"⚡"}#loco.wrap .icon-bell:before{content:""}#loco.wrap .icon-code:before{content:""}#loco.wrap .icon-privacy:before{content:"🛡"}#loco.wrap .icon-hellip:before{content:"…"}#loco.wrap .icon-vellip:before{content:"⁞"}#loco.wrap .icon-collapse:before{content:""}#loco.wrap .icon-expand:before{content:""}#loco.wrap .icon-wordpress:before{content:""}#loco.wrap .icon-database:before{content:""}#loco.wrap .icon-restore:before{content:""}#loco.wrap .icon-pilcrow:before{content:"¶"}#loco.wrap .icon-status.is-translated:before,#loco.wrap .is-translated>header>.icon-status:before{color:#2e892e;content:"✓";text-align:center}#loco.wrap .icon-status.is-untranslated:before,#loco.wrap .is-untranslated>header>.icon-status:before{color:#aaa;content:"×";text-align:center;font-size:1.1em}#loco.wrap .icon-status.is-flagged:before,#loco.wrap .is-flagged>header>.icon-status:before{color:#bd2c00;content:"";text-align:center}#loco.wrap .icon-status.is-translated.is-blank:before,#loco.wrap .icon-status.is-translated.is-inherit:before,#loco.wrap .is-translated.is-blank>header>.icon-status:before,#loco.wrap .is-translated.is-inherit>header>.icon-status:before{content:"🗌"}#loco.wrap .icon-status.is-fuzzy:before,#loco.wrap .is-fuzzy>header>.icon-status:before{color:#666;content:""}#loco.wrap .lang,#loco.wrap .region,#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy,#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd,#loco.wrap .lang-ca,#loco.wrap .lang-eo,#loco.wrap .lang-eu{color:#fff;background:#2e892e;display:inline-block;text-transform:uppercase;overflow:hidden;font-family:Verdana,Arial,sans-serif;font-size:9px;font-weight:normal;font-style:normal;line-height:12px;text-align:center;white-space:normal;text-shadow:none}#loco.wrap .lang{width:20px;height:12px;line-height:12px;vertical-align:middle}#loco.wrap .lang:before{content:attr(lang);vertical-align:baseline}#loco.wrap .no-lang{width:18px;height:10px;border:solid 1px #2e892e;background:transparent}#loco.wrap .lang-el{background-color:#1d48a3}#loco.wrap .lang-el:before{content:"Ελ"}#loco.wrap .region,#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy,#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd,#loco.wrap .lang-ca,#loco.wrap .lang-eo,#loco.wrap .lang-eu{width:16px;height:12px;margin:0 2px;background-image:url(../img/flags.png?v=2.3.1);background-repeat:no-repeat;background-color:transparent}#loco.wrap .region:before,#loco.wrap .variant-wales:before,#loco.wrap .region-gb.lang-cy:before,#loco.wrap .variant-scotland:before,#loco.wrap .region-gb.lang-gd:before,#loco.wrap .lang-ca:before,#loco.wrap .lang-eo:before,#loco.wrap .lang-eu:before{visibility:hidden}#loco.wrap .lang-zh{background-color:#b90000}#loco.wrap .lang-zh.script-hans:before{content:"中国"}#loco.wrap .lang-zh.script-hant:before{content:"中國"}#loco.wrap .__{background-position:0 0}#loco.wrap .lang-eo{background-position:0 -12px}#loco.wrap .lang-eu{background-position:0 -24px}#loco.wrap .lang-ca{background-position:0 -36px}#loco.wrap .region-tg{background-position:0 -48px}#loco.wrap .region-me{background-position:0 -60px}#loco.wrap .region-la{background-position:0 -73px}#loco.wrap .region-mr{background-position:0 -85px}#loco.wrap .region-ni{background-position:0 -97px}#loco.wrap .region-lv{background-position:0 -109px}#loco.wrap .region-om{background-position:0 -121px}#loco.wrap .region-af{background-position:0 -133px}#loco.wrap .region-cy{background-position:0 -145px}#loco.wrap .region-bj{background-position:0 -157px}#loco.wrap .region-aq{background-position:0 -169px}#loco.wrap .region-cn{background-position:0 -186px}#loco.wrap .region-co{background-position:0 -198px}#loco.wrap .region-cx{background-position:0 -210px}#loco.wrap .region-ag{background-position:0 -222px}#loco.wrap .region-ms{background-position:0 -234px}#loco.wrap .region-md{background-position:0 -246px}#loco.wrap .region-zm{background-position:0 -258px}#loco.wrap .region-vn{background-position:0 -270px}#loco.wrap .region-tf{background-position:0 -282px}#loco.wrap .region-td{background-position:0 -294px}#loco.wrap .region-yt{background-position:0 -306px}#loco.wrap .region-lb{background-position:0 -318px}#loco.wrap .region-mf{background-position:0 -330px}#loco.wrap .region-lu{background-position:0 -347px}#loco.wrap .region-mq{background-position:0 -359px}#loco.wrap .region-cz{background-position:0 -371px}#loco.wrap .region-ae{background-position:0 -383px}#loco.wrap .region-cm{background-position:0 -395px}#loco.wrap .region-bi{background-position:0 -407px}#loco.wrap .region-ar{background-position:0 -419px}#loco.wrap .region-as{background-position:0 -431px}#loco.wrap .region-bh{background-position:0 -443px}#loco.wrap .region-cl{background-position:0 -455px}#loco.wrap .region-ad{background-position:0 -467px}#loco.wrap .region-mp{background-position:0 -479px}#loco.wrap .region-lt{background-position:0 -491px}#loco.wrap .region-mg{background-position:0 -503px}#loco.wrap .region-lc{background-position:0 -515px}#loco.wrap .region-tr{background-position:0 -527px}#loco.wrap .region-ua{background-position:0 -539px}#loco.wrap .region-tv{background-position:0 -551px}#loco.wrap .region-vi{background-position:0 -563px}#loco.wrap .region-mt{background-position:0 -575px}#loco.wrap .region-no{background-position:0 -587px}#loco.wrap .region-mc{background-position:0 -599px}#loco.wrap .region-ch{background-position:0 -611px}#loco.wrap .region-bl{background-position:0 -623px}#loco.wrap .region-aw{background-position:0 -640px}#loco.wrap .region-bz{background-position:0 -652px}#loco.wrap .region-bm{background-position:0 -664px}#loco.wrap .region-ci{background-position:0 -676px}#loco.wrap .region-mu{background-position:0 -688px}#loco.wrap .region-us{background-position:0 -700px}#loco.wrap .region-tw{background-position:0 -712px}#loco.wrap .region-ye{background-position:0 -724px}#loco.wrap .region-mw{background-position:0 -736px}#loco.wrap .region-nl{background-position:0 -748px}#loco.wrap .region-ls{background-position:0 -760px}#loco.wrap .region-bo{background-position:0 -772px}#loco.wrap .region-at{background-position:0 -784px}#loco.wrap .region-ck{background-position:0 -796px}#loco.wrap .region-by{background-position:0 -808px}#loco.wrap .region-au{background-position:0 -820px}#loco.wrap .region-bn{background-position:0 -832px}#loco.wrap .region-ma{background-position:0 -844px}#loco.wrap .region-nz{background-position:0 -856px}#loco.wrap .region-lr{background-position:0 -868px}#loco.wrap .region-mv{background-position:0 -880px}#loco.wrap .region-tc{background-position:0 -892px}#loco.wrap .region-ug{background-position:0 -904px}#loco.wrap .region-tt{background-position:0 -916px}#loco.wrap .region-pl{background-position:0 -928px}#loco.wrap .region-rs{background-position:0 -940px}#loco.wrap .region-in{background-position:0 -952px}#loco.wrap .region-ge{background-position:0 -964px}#loco.wrap .region-gr{background-position:0 -976px}#loco.wrap .region-gs{background-position:0 -988px}#loco.wrap .region-gd{background-position:0 -1000px}#loco.wrap .region-io{background-position:0 -1012px}#loco.wrap .region-hk{background-position:0 -1024px}#loco.wrap .region-kp{background-position:0 -1036px}#loco.wrap .region-kg{background-position:0 -1048px}#loco.wrap .region-pm{background-position:0 -1060px}#loco.wrap .region-sv{background-position:0 -1072px}#loco.wrap .region-re{background-position:0 -1084px}#loco.wrap .region-sa{background-position:0 -1096px}#loco.wrap .region-sc{background-position:0 -1108px}#loco.wrap .region-st{background-position:0 -1120px}#loco.wrap .region-ke{background-position:0 -1132px}#loco.wrap .region-im{background-position:0 -1144px}#loco.wrap .region-kr{background-position:0 -1161px}#loco.wrap .region-gf{background-position:0 -1173px}#loco.wrap .region-dj{background-position:0 -1185px}#loco.wrap .region-gq{background-position:0 -1197px}#loco.wrap .region-gp{background-position:0 -1209px}#loco.wrap .region-dk{background-position:0 -1221px}#loco.wrap .region-gg{background-position:0 -1233px}#loco.wrap .region-il{background-position:0 -1250px}#loco.wrap .region-pn{background-position:0 -1262px}#loco.wrap .region-sb{background-position:0 -1274px}#loco.wrap .region-py{background-position:0 -1286px}#loco.wrap .region-ru{background-position:0 -1298px}#loco.wrap .region-kw{background-position:0 -1310px}#loco.wrap .region-do{background-position:0 -1322px}#loco.wrap .region-gt{background-position:0 -1334px}#loco.wrap .region-gb{background-position:0 -1346px}#loco.wrap .region-gu{background-position:0 -1358px}#loco.wrap .region-je{background-position:0 -1370px}#loco.wrap .region-hm{background-position:0 -1387px}#loco.wrap .region-sg{background-position:0 -1399px}#loco.wrap .region-pk{background-position:0 -1411px}#loco.wrap .region-sr{background-position:0 -1423px}#loco.wrap .region-se{background-position:0 -1435px}#loco.wrap .region-jp{background-position:0 -1447px}#loco.wrap .region-gw{background-position:0 -1459px}#loco.wrap .region-eh{background-position:0 -1471px}#loco.wrap .region-dz{background-position:0 -1483px}#loco.wrap .region-ga{background-position:0 -1495px}#loco.wrap .region-fr{background-position:0 -1507px}#loco.wrap .region-dm{background-position:0 -1519px}#loco.wrap .region-hn{background-position:0 -1531px}#loco.wrap .region-sd{background-position:0 -1543px}#loco.wrap .region-rw{background-position:0 -1555px}#loco.wrap .region-ph{background-position:0 -1567px}#loco.wrap .region-ss{background-position:0 -1579px}#loco.wrap .region-qa{background-position:0 -1596px}#loco.wrap .region-pe{background-position:0 -1608px}#loco.wrap .region-pr{background-position:0 -1620px}#loco.wrap .region-si{background-position:0 -1632px}#loco.wrap .region-ht{background-position:0 -1644px}#loco.wrap .region-es{background-position:0 -1656px}#loco.wrap .region-gl{background-position:0 -1668px}#loco.wrap .region-gm{background-position:0 -1680px}#loco.wrap .region-er{background-position:0 -1692px}#loco.wrap .region-fi{background-position:0 -1704px}#loco.wrap .region-ee{background-position:0 -1716px}#loco.wrap .region-kn{background-position:0 -1728px}#loco.wrap .region-hu{background-position:0 -1740px}#loco.wrap .region-iq{background-position:0 -1752px}#loco.wrap .region-ky{background-position:0 -1764px}#loco.wrap .region-sh{background-position:0 -1776px}#loco.wrap .region-ps{background-position:0 -1788px}#loco.wrap .region-pf{background-position:0 -1800px}#loco.wrap .region-sj{background-position:0 -1812px}#loco.wrap .region-id{background-position:0 -1824px}#loco.wrap .region-is{background-position:0 -1836px}#loco.wrap .region-eg{background-position:0 -1848px}#loco.wrap .region-fk{background-position:0 -1860px}#loco.wrap .region-fj{background-position:0 -1872px}#loco.wrap .region-gn{background-position:0 -1884px}#loco.wrap .region-gy{background-position:0 -1896px}#loco.wrap .region-ir{background-position:0 -1908px}#loco.wrap .region-km{background-position:0 -1920px}#loco.wrap .region-ie{background-position:0 -1932px}#loco.wrap .region-kz{background-position:0 -1944px}#loco.wrap .region-ro{background-position:0 -1956px}#loco.wrap .region-sk{background-position:0 -1968px}#loco.wrap .region-pg{background-position:0 -1980px}#loco.wrap .region-pt{background-position:0 -1992px}#loco.wrap .region-so{background-position:0 -2004px}#loco.wrap .region-sx{background-position:0 -2016px}#loco.wrap .region-hr{background-position:0 -2033px}#loco.wrap .region-ki{background-position:0 -2045px}#loco.wrap .region-jm{background-position:0 -2057px}#loco.wrap .region-ec{background-position:0 -2069px}#loco.wrap .region-et{background-position:0 -2081px}#loco.wrap .region-fo{background-position:0 -2093px}#loco.wrap .region-kh{background-position:0 -2105px}#loco.wrap .region-sy{background-position:0 -2117px}#loco.wrap .region-sn{background-position:0 -2129px}#loco.wrap .region-pw{background-position:0 -2141px}#loco.wrap .region-sl{background-position:0 -2153px}#loco.wrap .region-fm{background-position:0 -2165px}#loco.wrap .region-gi{background-position:0 -2177px}#loco.wrap .region-de{background-position:0 -2189px}#loco.wrap .region-gh{background-position:0 -2201px}#loco.wrap .region-jo{background-position:0 -2213px}#loco.wrap .region-it{background-position:0 -2225px}#loco.wrap .region-pa{background-position:0 -2237px}#loco.wrap .region-sz{background-position:0 -2249px}#loco.wrap .region-sm{background-position:0 -2261px}#loco.wrap .region-tn{background-position:0 -2273px}#loco.wrap .region-ml{background-position:0 -2285px}#loco.wrap .region-cg{background-position:0 -2297px}#loco.wrap .region-ax{background-position:0 -2309px}#loco.wrap .region-ao{background-position:0 -2321px}#loco.wrap .region-bt{background-position:0 -2333px}#loco.wrap .region-an{background-position:0 -2345px}#loco.wrap .region-bb{background-position:0 -2357px}#loco.wrap .region-cf{background-position:0 -2369px}#loco.wrap .region-mm{background-position:0 -2381px}#loco.wrap .region-li{background-position:0 -2393px}#loco.wrap .region-na{background-position:0 -2405px}#loco.wrap .region-mz{background-position:0 -2417px}#loco.wrap .region-to{background-position:0 -2429px}#loco.wrap .region-vg{background-position:0 -2441px}#loco.wrap .region-ve{background-position:0 -2453px}#loco.wrap .region-tz{background-position:0 -2465px}#loco.wrap .region-tm{background-position:0 -2477px}#loco.wrap .region-mx{background-position:0 -2489px}#loco.wrap .region-nc{background-position:0 -2501px}#loco.wrap .region-mo{background-position:0 -2513px}#loco.wrap .region-lk{background-position:0 -2525px}#loco.wrap .region-cd{background-position:0 -2537px}#loco.wrap .region-al{background-position:0 -2549px}#loco.wrap .region-bw{background-position:0 -2561px}#loco.wrap .region-cs{background-position:0 -2573px}#loco.wrap .region-cr{background-position:0 -2585px}#loco.wrap .region-bv{background-position:0 -2597px}#loco.wrap .region-am{background-position:0 -2609px}#loco.wrap .region-az{background-position:0 -2621px}#loco.wrap .region-ba{background-position:0 -2633px}#loco.wrap .region-mn{background-position:0 -2645px}#loco.wrap .region-nu{background-position:0 -2657px}#loco.wrap .region-my{background-position:0 -2669px}#loco.wrap .region-tl{background-position:0 -2681px}#loco.wrap .region-ws{background-position:0 -2693px}#loco.wrap .region-th{background-position:0 -2705px}#loco.wrap .region-nf{background-position:0 -2717px}#loco.wrap .region-ly{background-position:0 -2729px}#loco.wrap .region-ai{background-position:0 -2741px}#loco.wrap .region-br{background-position:0 -2753px}#loco.wrap .region-cv{background-position:0 -2765px}#loco.wrap .region-be{background-position:0 -2777px}#loco.wrap .region-ca{background-position:0 -2789px}#loco.wrap .region-bd{background-position:0 -2801px}#loco.wrap .region-cw{background-position:0 -2813px}#loco.wrap .region-bs{background-position:0 -2830px}#loco.wrap .region-ng{background-position:0 -2842px}#loco.wrap .region-mk{background-position:0 -2854px}#loco.wrap .region-np{background-position:0 -2866px}#loco.wrap .region-va{background-position:0 -2878px}#loco.wrap .region-uz{background-position:0 -2890px}#loco.wrap .region-um{background-position:0 -2902px}#loco.wrap .region-tk{background-position:0 -2914px}#loco.wrap .region-vc{background-position:0 -2926px}#loco.wrap .region-zw{background-position:0 -2938px}#loco.wrap .region-nr{background-position:0 -2950px}#loco.wrap .region-ne{background-position:0 -2962px}#loco.wrap .region-cu{background-position:0 -2974px}#loco.wrap .region-bq{background-position:0 -2986px}#loco.wrap .region-bf{background-position:0 -2998px}#loco.wrap .region-bg{background-position:0 -3010px}#loco.wrap .region-cc{background-position:0 -3022px}#loco.wrap .region-mh{background-position:0 -3034px}#loco.wrap .region-za{background-position:0 -3046px}#loco.wrap .region-uy{background-position:0 -3058px}#loco.wrap .region-wf{background-position:0 -3070px}#loco.wrap .region-vu{background-position:0 -3082px}#loco.wrap .region-tj{background-position:0 -3094px}#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd{background-position:0 -3106px}#loco.wrap .variant-valencia{background-position:0 -3118px}#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy{background-position:0 -3130px}#loco.wrap .x-eu{background-position:0 -3142px}#loco.wrap span.lang code{display:none}#loco.wrap .icon-notag:before{content:""}#loco.wrap .icon-magnify:before{content:"🔍"}#loco.wrap .icon-python:before{content:"🐍"}#loco.wrap .icon-unicode:before{content:"u"}#loco.wrap .icon-json:before{content:"{"}#loco.wrap .icon-bullist:before{content:""}#loco.wrap .icon-numlist:before{content:""}#loco.wrap .icon-indent:before{content:""}#loco.wrap .icon-outdent:before{content:""}#loco.wrap .icon-link:before{content:""}#loco.wrap .icon-unlink:before{content:""}#loco.wrap .icon-bold:before{content:"B"}#loco.wrap .icon-italic:before{content:"I"}#loco.wrap .icon-translate:before{content:""}#loco.wrap .icon-proj:before{content:""}#loco.wrap .icon-plural:before{content:"᛬"}#loco.wrap .icon-max:before,#loco.wrap .icon-full-screen:before{content:""}#loco.wrap .icon-min:before{content:""}#loco.wrap .icon-sort:before{content:""}#loco.wrap .icon-ok:before,#loco.wrap .notice-success>.has-icon:before,#loco.wrap .notice-success p>strong.has-icon:before{content:"✓"}#loco.wrap .icon-ok-empty:before{content:"🗌"}#loco.wrap .icon-checkbox-checked:before,#loco.wrap .selector.multi li.checked .icon-checkbox:before{content:"☑"}#loco.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco.wrap .icon-checkbox-partial:before{content:"☉"}#loco.wrap .icon-radio-checked:before{content:"⚫"}#loco.wrap .icon-radio-unchecked:before{content:"⚪"}#loco.wrap .icon-ext:before{content:"⬈"}#loco.wrap .icon-share:before{content:""}#loco.wrap .icon-star:before{content:""}#loco.wrap .icon-user:before{content:""}#loco.wrap .icon-remove:before{content:"×"}#loco.wrap .icon-cog:before{content:""}#loco.wrap .icon-trash:before{content:""}#loco.wrap .icon-time:before,#loco.wrap .icon-history:before{content:""}#loco.wrap .icon-download:before{content:""}#loco.wrap .icon-revert:before{content:""}#loco.wrap .icon-sync:before{content:""}#loco.wrap .icon-lock:before,#loco.wrap .notice-locked>.has-icon:before,#loco.wrap .notice-locked p>strong.has-icon:before{content:""}#loco.wrap .icon-flag:before{content:""}#loco.wrap .icon-tag:before{content:""}#loco.wrap .icon-tags:before{content:""}#loco.wrap .icon-print:before{content:""}#loco.wrap .icon-camera:before{content:""}#loco.wrap .icon-pencil:before{content:""}#loco.wrap .icon-add:before{content:""}#loco.wrap .icon-del:before{content:""}#loco.wrap .icon-clear:before,#loco.wrap a.icon.clear:before{content:""}#loco.wrap .icon-ok-sign:before{content:"✔"}#loco.wrap .icon-help:before{content:"?"}#loco.wrap .icon-info:before,#loco.wrap .notice-info>.has-icon:before,#loco.wrap .notice-info p>strong.has-icon:before{content:"ℹ"}#loco.wrap .icon-cancel:before{content:""}#loco.wrap .icon-warn:before,#loco.wrap .notice-error>.has-icon:before,#loco.wrap .notice-error p>strong.has-icon:before,#loco.wrap .notice-warning>.has-icon:before,#loco.wrap .notice-warning p>strong.has-icon:before{content:""}#loco.wrap .icon-comment:before{content:""}#loco.wrap .icon-bar-chart:before{content:""}#loco.wrap .icon-key:before{content:""}#loco.wrap .icon-cogs:before{content:""}#loco.wrap .icon-comments:before{content:""}#loco.wrap .icon-signout:before{content:""}#loco.wrap .icon-signin:before{content:""}#loco.wrap .icon-upload:before{content:""}#loco.wrap .icon-twitter:before{content:"🐦"}#loco.wrap .icon-facebook:before{content:""}#loco.wrap .icon-github:before{content:""}#loco.wrap .icon-feed:before{content:""}#loco.wrap .icon-globe:before{content:""}#loco.wrap .icon-wrench:before,#loco.wrap .notice-debug>.has-icon:before,#loco.wrap .notice-debug p>strong.has-icon:before{content:""}#loco.wrap .icon-group:before{content:""}#loco.wrap .icon-cloud:before{content:""}#loco.wrap .icon-copy:before{content:""}#loco.wrap .icon-save:before{content:""}#loco.wrap .icon-menu:before{content:""}#loco.wrap .icon-table:before{content:""}#loco.wrap .icon-caret-down:before{content:"▼"}#loco.wrap .icon-caret-up:before{content:"▲"}#loco.wrap .icon-caret-right:before{content:"▶"}#loco.wrap .icon-mail:before{content:""}#loco.wrap .icon-cloud-upload:before{content:""}#loco.wrap .icon-file:before{content:""}#loco.wrap .icon-circle-white:before{content:"⚬"}#loco.wrap .icon-circle-black:before{content:"●"}#loco.wrap .icon-eraser:before{content:""}#loco.wrap .icon-unlock:before{content:""}#loco.wrap .icon-apple:before{content:""}#loco.wrap .icon-android:before{content:""}#loco.wrap .icon-back:before{content:"⬅"}#loco.wrap .icon-next:before{content:"➔"}#loco.wrap .icon-arrow-up:before{content:""}#loco.wrap .icon-ccard:before{content:""}#loco.wrap .icon-caret-left:before{content:"◀"}#loco.wrap .icon-pro:before{content:"⚡"}#loco.wrap .icon-bell:before{content:""}#loco.wrap .icon-code:before{content:""}#loco.wrap .icon-privacy:before{content:"🛡"}#loco.wrap .icon-hellip:before{content:"…"}#loco.wrap .icon-vellip:before{content:"⁞"}#loco.wrap .icon-collapse:before{content:""}#loco.wrap .icon-expand:before{content:""}#loco.wrap .icon-wordpress:before{content:""}#loco.wrap .icon-database:before{content:""}#loco.wrap .icon-restore:before{content:""}#loco.wrap .icon-pilcrow:before{content:"¶"}#loco.wrap .icon,#loco.wrap .has-icon:before,#loco.wrap .has-dashicon:before{speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco.wrap .icon,#loco.wrap .has-icon:before{font-family:"loco"}#loco.wrap .has-dashicon:before{font-family:"dashicons";font-size:1.4em}#loco.wrap .has-icon:before,#loco.wrap .has-dashicon:before,#loco.wrap .has-icon>span{display:inline-block;vertical-align:middle}#loco.wrap .only-icon{text-align:center}#loco.wrap .only-icon:before{text-align:center}#loco.wrap .only-icon span{display:none}#loco.wrap a,#loco.wrap .wp-core-ui .button-link{text-decoration:none}#loco.wrap h3:hover>a.loco-anchor{color:#ccc}#loco.wrap h3:hover>a.loco-anchor:before{content:"¶"}#loco.wrap .has-lang>span{display:inline-block;vertical-align:middle}#loco.wrap a.has-lang:hover>span:last-child{text-decoration:underline}#loco.wrap h1 ul,#loco.wrap h1 li{margin:0;padding:0}#loco.wrap h1 li{display:inline-block}#loco.wrap h1 li:after{content:"/";color:#999;text-shadow:none;display:inline-block}#loco.wrap h1 li:last-child:after{content:""}#loco.wrap h1 li:last-child a{color:inherit;pointer-events:none;cursor:auto}#loco.wrap h2 span{color:#999;font-weight:normal}#loco.wrap h2 .loco-meta,#loco.wrap h3 .loco-meta{color:inherit;font-size:14px;font-weight:normal;vertical-align:middle}#loco.wrap .wp-list-table td:first-child .icon{width:16px;display:inline-block;text-align:center}#loco.wrap .wp-list-table td{white-space:nowrap}#loco.wrap .wp-list-table td>a,#loco.wrap .wp-list-table td>time{display:inline-block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis}#loco.wrap .wp-list-table th.loco-sort{cursor:pointer}#loco.wrap .wp-list-table th.loco-sort:hover{color:#000}#loco.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco.wrap .wp-list-table th.loco-sort.loco-desc:after{padding:0 0 0 4px;color:#999}#loco.wrap .wp-list-table th.loco-sort.loco-desc:after{content:"▼"}#loco.wrap .wp-list-table th.loco-sort.loco-asc:after{content:"▲"}#loco.wrap .wp-list-table td.has-row-actions{overflow:visible}#loco.wrap form.loco-filter{display:block;margin-bottom:5px}#loco.wrap form.loco-filter .icon-filter{color:#999}#loco.wrap nav.above-list-table{margin-bottom:1em}#loco.wrap nav.above-list-table a{display:inline-block;margin-right:1em}#loco.wrap .wp-core-ui button.inverted,#loco.wrap .wp-core-ui button.inverted:hover{background:-moz-linear-gradient(top, #cccccc 0%, #e0e0e0 5%, #fefefe 100%);background:-webkit-linear-gradient(top, #cccccc 0%, #e0e0e0 5%, #fefefe 100%);background:linear-gradient(to bottom, #cccccc 0%, #e0e0e0 5%, #fefefe 100%);-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;border-color:#bbb}#loco.wrap .wp-core-ui button:active,#loco.wrap .wp-core-ui button.inverted:active{border-color:#5b9dd9}#loco.wrap .loco-clearable{display:inline-block;vertical-align:middle;position:relative}#loco.wrap .loco-clearable a.clear,#loco.wrap .auto-comp-wrap a.clear{top:0;right:0;outline:none;margin:0;border:solid 1px transparent;padding:5px 5px;position:absolute;font-size:1em;line-height:normal}#loco.wrap .loco-clearable a.clear:before,#loco.wrap .auto-comp-wrap a.clear:before{vertical-align:middle;padding:0;color:#999}#loco.wrap .loco-clearable a.clear:hover:before,#loco.wrap .auto-comp-wrap a.clear:hover:before{color:#333}#loco.wrap .loco-clearable a.clear span,#loco.wrap .auto-comp-wrap a.clear span{display:none}#loco.wrap .loco-clearable ::-ms-clear,#loco.wrap .auto-comp-wrap ::-ms-clear{display:none}#loco.wrap div.progress{color:#000;background:transparent !important}#loco.wrap div.progress *{height:100%;overflow:hidden;white-space:nowrap}#loco.wrap div.progress .t{background-color:#ddd;border:1px solid #ccc}#loco.wrap div.progress .t .bar{float:left;clear:none;background-color:#3db63d}#loco.wrap div.progress .t .bar.f{background-color:#bd2c00}#loco.wrap div.progress .l{display:block}#loco.wrap td div.progress .t{border:none}#loco.wrap td div.progress .l{display:none}#loco.wrap code.path{color:#333;margin:0;padding:0;display:inline;background:transparent}#loco.wrap .loco-danger{color:#d54e21}#loco.wrap .notice,#loco.wrap .panel{background:#fff;position:relative;margin:1em 0;padding:1px 12px}#loco.wrap .notice-generic{border-color:#ddd}#loco.wrap .notice-success>.has-icon,#loco.wrap .notice-success p>strong.has-icon{color:#000}#loco.wrap .notice-warning{border-color:orange}#loco.wrap .notice-error{border-color:#dc3232}#loco.wrap .notice-debug{border-color:#00a0d2}#loco.wrap .notice-danger{border-color:#dc3232}#loco.wrap .notice-locked{border-color:orange}#loco.wrap .notice>.has-icon:before,#loco.wrap .notice p>strong.has-icon:before{padding-right:6px}#loco.wrap .notice>p>a.button.has-icon:before{width:1.5em}#loco.wrap .notice>p>em{color:#d54e21;font-style:normal}#loco.wrap .notice>p>em a{color:inherit}#loco.wrap .notice>p a:hover,#loco.wrap .notice>nav a:hover{text-decoration:underline}#loco.wrap .notice>p a.button,#loco.wrap .notice>nav a.button{text-decoration:inherit}#loco.wrap .notice.has-nav{display:flex;flex-direction:row}#loco.wrap .notice.has-nav p,#loco.wrap .notice.has-nav nav{line-height:22px;flex-grow:1}#loco.wrap .notice.has-nav nav{text-align:right;padding:2px;margin:.5em 0}#loco.wrap .notice.has-nav.is-dismissible{padding-right:38px}#loco.wrap .notice.has-nav a{font-size:12px;white-space:nowrap}#loco.wrap .notice.has-nav nav>span{color:#666}#loco.wrap .notice>h3>span{display:inline-block;vertical-align:middle}#loco.wrap ul.problems li{font-style:italic}#loco.wrap label{position:relative}#loco.wrap label.for-disabled,#loco.wrap label.for-disabled>input{cursor:default !important}#loco.wrap input.regular-text,#loco.wrap textarea.regular-text{width:25em}#loco.wrap .button-link{padding:0 10px 1px}#loco.wrap .button-danger{background:#ba0000;border-color:#900 #600 #600;-webkit-box-shadow:0 1px 0 #600;-moz-box-shadow:0 1px 0 #600;box-shadow:0 1px 0 #600;color:#fff;text-shadow:0 -1px 1px #600,1px 0 1px #600,0 1px 1px #600,-1px 0 1px #600}#loco.wrap .button-success{background:#00b500;border-color:#090 #2e892e #2e892e;-webkit-box-shadow:0 1px 0 #2e892e;-moz-box-shadow:0 1px 0 #2e892e;box-shadow:0 1px 0 #2e892e;color:#fff;text-shadow:0 -1px 1px #2e892e,1px 0 1px #2e892e,0 1px 1px #2e892e,-1px 0 1px #2e892e}#loco.wrap .button-success:hover{background:#3db63d}#loco.wrap form button.loco-loading.button-large{padding-left:0}#loco.wrap form button.loco-loading.button-large:before{width:16px;height:16px;margin:0 4px;content:" ";font-size:16px;line-height:1;display:inline-block;vertical-align:sub}#loco.wrap ::placeholder{color:#ccc}#loco.wrap ::-webkit-input-placeholder{color:#ccc}#loco.wrap :-moz-placeholder{color:#ccc;opacity:1}#loco.wrap ::-moz-placeholder{color:#ccc;opacity:1}#loco.wrap :-ms-input-placeholder{color:#ccc}#loco.wrap .ielt10 .placeheld{color:#ccc}#loco.wrap a.has-raquo:after{content:" »"}#loco.wrap a.has-laquo:before{content:"« "}#loco.wrap span.inline-spinner{display:inline-block;min-width:16px;min-height:16px;background:transparent url(../img/spin-modal.gif?v=2.3.1) 0 0 no-repeat}.js #wpbody-content>.notice{display:none}.js #wpbody-content>.notice.inline{display:block}.js #loco.wrap .jshide,.no-js #loco.wrap .jsonly{display:none !important}#loco.wrap .invis{visibility:hidden}.form-table tr{vertical-align:top}.form-table tr.compact td{padding-top:0}.loco-modal.request-filesystem-credentials-dialog{top:15% !important;max-height:85% !important}.loco-modal.request-filesystem-credentials-dialog>.ui-dialog-content{background:inherit}.loco-modal.request-filesystem-credentials-dialog .ftp-password>label>em:last-child{display:none}.ui-dialog-content>div.loco-loading{height:100%;background:transparent url(../img/spin-modal.gif?v=2.3.1) center 20px no-repeat}#loco-credit>*{vertical-align:middle}#loco-credit>a{display:inline-block;position:relative;overflow:hidden;background:transparent url(../img/logo-foot.gif?v=2.3.1) 0 0 no-repeat;height:30px;width:100px;text-indent:200px;-webkit-transition-duration:0s;transition-duration:0s}#loco-credit>a:hover{background-position:0 -35px}#loco-content{position:relative}#footer-upgrade span:before{color:#ccc;content:" | ";display:inline;padding-left:.5em;padding-right:.5em}#footer-upgrade span:first-child:before{content:"";display:none}.loco-clearfix:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}dl.debug dt{font-weight:bold}dl.debug dt,dl.debug dd{white-space:pre}.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(0,115,170,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#0073aa}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../img/skins/fresh/spin-primary-button.gif?v=2.3.1) 0 0 no-repeat !important}
1
+ ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.3.2);background-repeat:no-repeat;min-height:16px}._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.3.2) 0 0 no-repeat;min-height:75px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.3.2);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.3.2);background-size:16px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.3.2);background-size:16px}}._green_glow_inner{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}.loco-font,#loco.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco.wrap .icon,#loco.wrap .has-icon:before{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@font-face{font-family:"loco";src:url("../font/loco.eot");src:url("../font/loco.eot?#iefix") format("embedded-opentype"),url("../font/loco.woff") format("woff"),url("../font/loco.ttf") format("truetype"),url("../font/loco.svg#loco") format("svg");font-weight:normal;font-style:normal}.tipsy{font-size:11px;position:absolute;padding:5px;z-index:500001;opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.tipsy.in{opacity:1}.tipsy-inner{background-color:#000;color:#fff;white-space:nowrap;padding:6px 8px;line-height:1.3em;text-align:center;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-font-smoothing:subpixel-antialiased}.tipsy-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.tipsy-n .tipsy-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-nw .tipsy-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-ne .tipsy-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-s .tipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-sw .tipsy-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-se .tipsy-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-e .tipsy-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.tipsy-w .tipsy-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}#loco.wrap .selector li,#loco.wrap .selector .handle,#loco.wrap .selectoradd a,#loco.wrap .selectorsep:before,#loco.wrap .selectorsep span{padding:.3em .75em}#loco.wrap .selector{text-align:left;display:inline-block;white-space:nowrap}#loco.wrap .selectoradd a,#loco.wrap .selector .handle{cursor:default;display:block;position:relative;border-top:solid 1px #fff;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-left:solid 1px #fff;color:#666;height:1.3em;overflow:hidden;white-space:normal}#loco.wrap .selectorsep{display:inline-block;border:solid 1px transparent}#loco.wrap .selectorsep:before{display:block;position:relative;color:#999;height:1.3em;overflow:hidden}#loco.wrap .selectorsep>*{display:block;line-height:1em;color:#666;height:1.3em;overflow:hidden}#loco.wrap .selector .handle{outline:none;white-space:nowrap;padding-right:2.3em;max-width:250px;text-overflow:ellipsis}#loco.wrap .selector .handle .prefix{padding-right:.6ex}#loco.wrap .selector .handle:after{font-family:loco;font-size:1.3em;color:#ccc;display:block;position:absolute;top:.25em;right:.6em;content:"▼"}#loco.wrap .selector .handle:focus:after,#loco.wrap .selector .handle:hover:after{color:#666}#loco.wrap .selector.no-caret .handle{padding-right:.75em}#loco.wrap .selector.no-caret .handle:after{display:none}#loco.wrap .selector.no-title .handle{padding-left:.5em;padding-right:.5em}#loco.wrap .selector.no-title .handle .label{display:none}#loco.wrap .selector.no-title .handle .icon{margin-right:0px}#loco.wrap .selector.dummy .handle{border-color:transparent}#loco.wrap .selector.dummy .handle:after{display:none}#loco.wrap .selectoradd{position:relative}#loco.wrap .selectoradd>*{display:block;float:left;clear:none}#loco.wrap .selectoradd>a.has-icon{width:1.3em}#loco.wrap .selectoradd>a.has-icon:before{color:#999;display:inline;padding-left:0;padding-right:0;line-height:1.4em}#loco.wrap .selectoradd>a.has-icon:hover:after{color:#2e892e}#loco.wrap .selectorsep{display:inline-block}#loco.wrap .selectorsep span{color:#666;height:1.3em}#loco.wrap .selector ul{padding:0}#loco.wrap .selector ul,#loco.wrap .selector li{display:block;position:relative;cursor:default;margin:0}#loco.wrap .selector ul{z-index:5;position:absolute;left:0;top:0;background:#f5f5f5;box-shadow:0 10px 5px rgba(0,0,0,.2);border:solid 1px #ccc;overflow:auto}#loco.wrap .selector.up ul{margin-top:0}#loco.wrap .selector.multi li input{display:none}#loco.wrap .selector.multi li.checked{background:#e5e5e5}#loco.wrap .selector li.active{background:#e5e5e5 !important}#loco.wrap .selector li.over{background:#ccc !important;color:#fff;text-shadow:1px 1px #aaa}#loco.wrap .selector li.over .label{color:#fff}#loco.wrap .selector .label{font:inherit;color:inherit}#loco.wrap .selector .icon{display:inline-block;min-width:1.2em;text-align:center;font-size:14px}#loco.wrap .selector .icon.no-icon{display:none}#loco.wrap .selector .icon:before{color:#666}#loco.wrap .selector .avtr{width:18px;height:18px;background-size:18px;background-repeat:no-repeat}#loco.wrap .selector .label{line-height:1}#loco.wrap .selector .icon,#loco.wrap .selector .icon-16{vertical-align:bottom}#loco.wrap .selector .icon,#loco.wrap .selector .lang,#loco.wrap .selector .icon-16{margin-right:5px}#loco.wrap .selector .region,#loco.wrap .selector .variant-wales,#loco.wrap .selector .region-gb.lang-cy,#loco.wrap .selector .variant-scotland,#loco.wrap .selector .region-gb.lang-gd,#loco.wrap .selector .variant-valencia,#loco.wrap .selector .region-es.variant-valencia,#loco.wrap .selector .lang-ca,#loco.wrap .selector .region-es.lang-ca,#loco.wrap .selector .lang-eo,#loco.wrap .selector .lang-eu{margin-left:2px;margin-right:7px}#loco.wrap .selector.ticked .icon.no-icon{font-size:12px;display:inline-block}#loco.wrap .selector.ticked .active .icon.no-icon:before{content:"✓"}#loco.wrap .selectoradd a:hover,#loco.wrap .selector a.handle:focus,#loco.wrap .selector a.handle:hover{color:#000;border-color:#999}#loco.wrap .selector.active .handle{border-color:#999;background-color:#eee;color:#999}#loco.wrap .selector.active .handle:after{color:#999;content:"▲"}#loco.wrap .selector.disabled{cursor:default;cursor:no-drop;cursor:not-allowed}#loco.wrap .selector.disabled .handle{pointer-events:none;border-top:solid 1px #fff;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-left:solid 1px #fff;color:#999;padding-right:1em}#loco.wrap .selector.disabled .handle:after{display:none}#loco.wrap .selector.disabled .handle span.icon{color:#999 !important}#loco.wrap .selector li.disabled,#loco.wrap .selector li.disabled.over{color:#aaa;text-shadow:1px 1px #fff;pointer-events:none}#loco.wrap .selector li.disabled *{cursor:text}#loco.wrap .selector li.disabled .icon:before{color:#aaa}#loco.wrap .selector li.disabled .flag,#loco.wrap .selector li.disabled .icon-16{opacity:.4}#loco.wrap .selector.lefty ul{left:auto;right:0}#loco.wrap .selector.lefty ul .icon,#loco.wrap .selector.lefty ul .icon-32{display:block;float:right;clear:none}#loco.wrap .selector.lefty ul .label{padding-right:32px;padding-left:0}#loco.wrap .selector ul>form{margin:0;display:block}#loco.wrap .selector ul>form input{margin:0;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}#loco.wrap .selector ul>form input:focus{-webkit-box-shadow:inset 0 0 5px 0 #3db63d;-moz-box-shadow:inset 0 0 5px 0 #3db63d;box-shadow:inset 0 0 5px 0 #3db63d}#loco.wrap .selector ul>form input.error{border-color:#c00;-webkit-box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5);-moz-box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5);box-shadow:inset 0 0 5px 0 rgba(153,0,0,.5)}#loco.wrap .selector ul>form a.clear{margin:0;border:none}#loco.wrap .selector ul>form ::placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco.wrap .selector ul>form ::-webkit-input-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco.wrap .selector ul>form :-moz-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block;opacity:1}#loco.wrap .selector ul>form ::-moz-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block;opacity:1}#loco.wrap .selector ul>form :-ms-input-placeholder{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco.wrap .selector ul>form .ielt10 .placeheld{color:gray;font-size:16px;font-family:"loco";text-align:right;display:block}#loco.wrap div.auto-comp-wrap{width:100%}#loco.wrap div.auto-comp-wrap input{display:inline-block}#loco.wrap div.auto-comp-wrap.loading input{background:transparent url(../img/ajax-loader.gif?v=2.3.2) right 2px no-repeat}#loco.wrap div.auto-comp-drop{color:#333;background:#fff;border-top:none;position:absolute;width:auto;top:0;left:0;z-index:99;-webkit-box-shadow:0 5px 5px rgba(0,0,0,.4);-moz-box-shadow:0 5px 5px rgba(0,0,0,.4);box-shadow:0 5px 5px rgba(0,0,0,.4)}#loco.wrap div.auto-comp-result{padding:5px 10px;cursor:pointer;background:#f0f0f0;border-top:solid 1px #fff;border-bottom:solid 1px #ddd;white-space:nowrap}#loco.wrap div.auto-comp-result:first-child{border-top:solid 1px #ddd}#loco.wrap div.auto-comp-result>*{display:inline-block;vertical-align:middle;line-height:normal}#loco.wrap div.auto-comp-result .icon:before{padding-right:5px}#loco.wrap div.auto-comp-result:hover{background:#a8a8a8;color:#fff;border-top-color:#a8a8a8;border-bottom-color:#999}#loco.wrap div.auto-comp-result.selected{background:#666 !important;color:#fff;border-top-color:#666;border-bottom-color:#666}#loco.wrap div.auto-comp-result .lang,#loco.wrap div.auto-comp-result .region,#loco.wrap div.auto-comp-result .variant-wales,#loco.wrap div.auto-comp-result .region-gb.lang-cy,#loco.wrap div.auto-comp-result .variant-scotland,#loco.wrap div.auto-comp-result .region-gb.lang-gd,#loco.wrap div.auto-comp-result .variant-valencia,#loco.wrap div.auto-comp-result .region-es.variant-valencia,#loco.wrap div.auto-comp-result .lang-ca,#loco.wrap div.auto-comp-result .region-es.lang-ca,#loco.wrap div.auto-comp-result .lang-eo,#loco.wrap div.auto-comp-result .lang-eu,#loco.wrap div.auto-comp-result .avtr{margin-right:5px}#loco.wrap div.auto-comp-wrap.error a.icon.clear:before{color:#c00;opacity:1}#loco.wrap div.auto-comp-wrap.error input[type=text]{border-color:#c00;color:#c00}#loco.wrap div.auto-comp-wrap.error input[type=text]:focus{-webkit-box-shadow:0 0 .5em 0 rgba(153,0,0,.5);-moz-box-shadow:0 0 .5em 0 rgba(153,0,0,.5);box-shadow:0 0 .5em 0 rgba(153,0,0,.5)}#loco.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.3.2);background-repeat:no-repeat;min-height:16px}#loco.wrap ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.3.2) 0 0 no-repeat;min-height:75px}#loco.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.3.2);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.3.2);background-size:16px}#loco.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.3.2);background-size:16px}}#loco.wrap ._green_glow_inner{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco.wrap ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco.wrap .loco-font,#loco.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco.wrap .icon,#loco.wrap .has-icon:before{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco.wrap .has-icon:before{display:inline-block;padding-right:.3em}#loco.wrap a.icon-help{cursor:help}#loco.wrap a.icon-help span{display:none}#loco.wrap .icon-notag:before{content:""}#loco.wrap .icon-magnify:before{content:"🔍"}#loco.wrap .icon-python:before{content:"🐍"}#loco.wrap .icon-unicode:before{content:"u"}#loco.wrap .icon-json:before{content:"{"}#loco.wrap .icon-bullist:before{content:""}#loco.wrap .icon-numlist:before{content:""}#loco.wrap .icon-indent:before{content:""}#loco.wrap .icon-outdent:before{content:""}#loco.wrap .icon-link:before{content:""}#loco.wrap .icon-unlink:before{content:""}#loco.wrap .icon-bold:before{content:"B"}#loco.wrap .icon-italic:before{content:"I"}#loco.wrap .icon-translate:before{content:""}#loco.wrap .icon-proj:before{content:""}#loco.wrap .icon-plural:before{content:"᛬"}#loco.wrap .icon-max:before,#loco.wrap .icon-full-screen:before{content:""}#loco.wrap .icon-min:before{content:""}#loco.wrap .icon-sort:before{content:""}#loco.wrap .icon-ok:before,#loco.wrap .notice-success>.has-icon:before,#loco.wrap .notice-success p>strong.has-icon:before{content:"✓"}#loco.wrap .icon-ok-empty:before{content:"🗌"}#loco.wrap .icon-checkbox-checked:before,#loco.wrap .selector.multi li.checked .icon-checkbox:before{content:"☑"}#loco.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco.wrap .icon-checkbox-partial:before{content:"☉"}#loco.wrap .icon-radio-checked:before{content:"⚫"}#loco.wrap .icon-radio-unchecked:before{content:"⚪"}#loco.wrap .icon-ext:before{content:"⬈"}#loco.wrap .icon-share:before{content:""}#loco.wrap .icon-star:before{content:""}#loco.wrap .icon-user:before{content:""}#loco.wrap .icon-remove:before{content:"×"}#loco.wrap .icon-cog:before{content:""}#loco.wrap .icon-trash:before{content:""}#loco.wrap .icon-time:before,#loco.wrap .icon-history:before{content:""}#loco.wrap .icon-download:before{content:""}#loco.wrap .icon-revert:before{content:""}#loco.wrap .icon-sync:before{content:""}#loco.wrap .icon-lock:before,#loco.wrap .notice-locked>.has-icon:before,#loco.wrap .notice-locked p>strong.has-icon:before{content:""}#loco.wrap .icon-flag:before{content:""}#loco.wrap .icon-tag:before{content:""}#loco.wrap .icon-tags:before{content:""}#loco.wrap .icon-print:before{content:""}#loco.wrap .icon-camera:before{content:""}#loco.wrap .icon-pencil:before{content:""}#loco.wrap .icon-add:before{content:""}#loco.wrap .icon-del:before{content:""}#loco.wrap .icon-clear:before,#loco.wrap a.icon.clear:before{content:""}#loco.wrap .icon-ok-sign:before{content:"✔"}#loco.wrap .icon-help:before{content:"?"}#loco.wrap .icon-info:before,#loco.wrap .notice-info>.has-icon:before,#loco.wrap .notice-info p>strong.has-icon:before{content:"ℹ"}#loco.wrap .icon-cancel:before{content:""}#loco.wrap .icon-warn:before,#loco.wrap .notice-error>.has-icon:before,#loco.wrap .notice-error p>strong.has-icon:before,#loco.wrap .notice-warning>.has-icon:before,#loco.wrap .notice-warning p>strong.has-icon:before{content:""}#loco.wrap .icon-comment:before{content:""}#loco.wrap .icon-bar-chart:before{content:""}#loco.wrap .icon-key:before{content:""}#loco.wrap .icon-cogs:before{content:""}#loco.wrap .icon-comments:before{content:""}#loco.wrap .icon-signout:before{content:""}#loco.wrap .icon-signin:before{content:""}#loco.wrap .icon-upload:before{content:""}#loco.wrap .icon-twitter:before{content:"🐦"}#loco.wrap .icon-facebook:before{content:""}#loco.wrap .icon-github:before{content:""}#loco.wrap .icon-feed:before{content:""}#loco.wrap .icon-globe:before{content:""}#loco.wrap .icon-wrench:before,#loco.wrap .notice-debug>.has-icon:before,#loco.wrap .notice-debug p>strong.has-icon:before{content:""}#loco.wrap .icon-group:before{content:""}#loco.wrap .icon-cloud:before{content:""}#loco.wrap .icon-copy:before{content:""}#loco.wrap .icon-save:before{content:""}#loco.wrap .icon-menu:before{content:""}#loco.wrap .icon-table:before{content:""}#loco.wrap .icon-caret-down:before{content:"▼"}#loco.wrap .icon-caret-up:before{content:"▲"}#loco.wrap .icon-caret-right:before{content:"▶"}#loco.wrap .icon-mail:before{content:""}#loco.wrap .icon-cloud-upload:before{content:""}#loco.wrap .icon-file:before{content:""}#loco.wrap .icon-circle-white:before{content:"⚬"}#loco.wrap .icon-circle-black:before{content:"●"}#loco.wrap .icon-eraser:before{content:""}#loco.wrap .icon-unlock:before{content:""}#loco.wrap .icon-apple:before{content:""}#loco.wrap .icon-android:before{content:""}#loco.wrap .icon-back:before{content:"⬅"}#loco.wrap .icon-next:before{content:"➔"}#loco.wrap .icon-arrow-up:before{content:""}#loco.wrap .icon-ccard:before{content:""}#loco.wrap .icon-caret-left:before{content:"◀"}#loco.wrap .icon-pro:before{content:"⚡"}#loco.wrap .icon-bell:before{content:""}#loco.wrap .icon-code:before{content:""}#loco.wrap .icon-privacy:before{content:"🛡"}#loco.wrap .icon-hellip:before{content:"…"}#loco.wrap .icon-vellip:before{content:"⁞"}#loco.wrap .icon-collapse:before{content:""}#loco.wrap .icon-expand:before{content:""}#loco.wrap .icon-wordpress:before{content:""}#loco.wrap .icon-database:before{content:""}#loco.wrap .icon-restore:before{content:""}#loco.wrap .icon-pilcrow:before{content:"¶"}#loco.wrap .icon-status.is-translated:before,#loco.wrap .is-translated>header>.icon-status:before{color:#2e892e;content:"✓";text-align:center}#loco.wrap .icon-status.is-untranslated:before,#loco.wrap .is-untranslated>header>.icon-status:before{color:#aaa;content:"×";text-align:center;font-size:1.1em}#loco.wrap .icon-status.is-flagged:before,#loco.wrap .is-flagged>header>.icon-status:before{color:#bd2c00;content:"";text-align:center}#loco.wrap .icon-status.is-translated.is-blank:before,#loco.wrap .icon-status.is-translated.is-inherit:before,#loco.wrap .is-translated.is-blank>header>.icon-status:before,#loco.wrap .is-translated.is-inherit>header>.icon-status:before{content:"🗌"}#loco.wrap .icon-status.is-fuzzy:before,#loco.wrap .is-fuzzy>header>.icon-status:before{color:#666;content:""}#loco.wrap .lang,#loco.wrap .region,#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy,#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd,#loco.wrap .variant-valencia,#loco.wrap .region-es.variant-valencia,#loco.wrap .lang-ca,#loco.wrap .region-es.lang-ca,#loco.wrap .lang-eo,#loco.wrap .lang-eu{color:#fff;background:#2e892e;display:inline-block;text-transform:uppercase;overflow:hidden;font-family:Verdana,Arial,sans-serif;font-size:9px;font-weight:normal;font-style:normal;line-height:12px;text-align:center;white-space:normal;text-shadow:none}#loco.wrap .lang{width:20px;height:12px;line-height:12px;vertical-align:middle}#loco.wrap .lang:before{content:attr(lang);vertical-align:baseline}#loco.wrap .no-lang{width:18px;height:10px;border:solid 1px #2e892e;background:transparent}#loco.wrap .lang-el{background-color:#1d48a3}#loco.wrap .lang-el:before{content:"Ελ"}#loco.wrap .region,#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy,#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd,#loco.wrap .variant-valencia,#loco.wrap .region-es.variant-valencia,#loco.wrap .lang-ca,#loco.wrap .region-es.lang-ca,#loco.wrap .lang-eo,#loco.wrap .lang-eu{width:16px;height:12px;margin:0 2px;background-image:url(../img/flags.png?v=2.3.2);background-repeat:no-repeat;background-color:transparent}#loco.wrap .region:before,#loco.wrap .variant-wales:before,#loco.wrap .region-gb.lang-cy:before,#loco.wrap .variant-scotland:before,#loco.wrap .region-gb.lang-gd:before,#loco.wrap .variant-valencia:before,#loco.wrap .region-es.variant-valencia:before,#loco.wrap .lang-ca:before,#loco.wrap .region-es.lang-ca:before,#loco.wrap .lang-eo:before,#loco.wrap .lang-eu:before{visibility:hidden}#loco.wrap .lang-zh{background-color:#b90000}#loco.wrap .lang-zh.script-hans:before{content:"中国"}#loco.wrap .lang-zh.script-hant:before{content:"中國"}#loco.wrap .__{background-position:0 0}#loco.wrap .lang-eo{background-position:0 -12px}#loco.wrap .lang-eu{background-position:0 -24px}#loco.wrap .lang-ca,#loco.wrap .region-es.lang-ca{background-position:0 -36px}#loco.wrap .region-tg{background-position:0 -48px}#loco.wrap .region-me{background-position:0 -60px}#loco.wrap .region-la{background-position:0 -73px}#loco.wrap .region-mr{background-position:0 -85px}#loco.wrap .region-ni{background-position:0 -97px}#loco.wrap .region-lv{background-position:0 -109px}#loco.wrap .region-om{background-position:0 -121px}#loco.wrap .region-af{background-position:0 -133px}#loco.wrap .region-cy{background-position:0 -145px}#loco.wrap .region-bj{background-position:0 -157px}#loco.wrap .region-aq{background-position:0 -169px}#loco.wrap .region-cn{background-position:0 -186px}#loco.wrap .region-co{background-position:0 -198px}#loco.wrap .region-cx{background-position:0 -210px}#loco.wrap .region-ag{background-position:0 -222px}#loco.wrap .region-ms{background-position:0 -234px}#loco.wrap .region-md{background-position:0 -246px}#loco.wrap .region-zm{background-position:0 -258px}#loco.wrap .region-vn{background-position:0 -270px}#loco.wrap .region-tf{background-position:0 -282px}#loco.wrap .region-td{background-position:0 -294px}#loco.wrap .region-yt{background-position:0 -306px}#loco.wrap .region-lb{background-position:0 -318px}#loco.wrap .region-mf{background-position:0 -330px}#loco.wrap .region-lu{background-position:0 -347px}#loco.wrap .region-mq{background-position:0 -359px}#loco.wrap .region-cz{background-position:0 -371px}#loco.wrap .region-ae{background-position:0 -383px}#loco.wrap .region-cm{background-position:0 -395px}#loco.wrap .region-bi{background-position:0 -407px}#loco.wrap .region-ar{background-position:0 -419px}#loco.wrap .region-as{background-position:0 -431px}#loco.wrap .region-bh{background-position:0 -443px}#loco.wrap .region-cl{background-position:0 -455px}#loco.wrap .region-ad{background-position:0 -467px}#loco.wrap .region-mp{background-position:0 -479px}#loco.wrap .region-lt{background-position:0 -491px}#loco.wrap .region-mg{background-position:0 -503px}#loco.wrap .region-lc{background-position:0 -515px}#loco.wrap .region-tr{background-position:0 -527px}#loco.wrap .region-ua{background-position:0 -539px}#loco.wrap .region-tv{background-position:0 -551px}#loco.wrap .region-vi{background-position:0 -563px}#loco.wrap .region-mt{background-position:0 -575px}#loco.wrap .region-no{background-position:0 -587px}#loco.wrap .region-mc{background-position:0 -599px}#loco.wrap .region-ch{background-position:0 -611px}#loco.wrap .region-bl{background-position:0 -623px}#loco.wrap .region-aw{background-position:0 -640px}#loco.wrap .region-bz{background-position:0 -652px}#loco.wrap .region-bm{background-position:0 -664px}#loco.wrap .region-ci{background-position:0 -676px}#loco.wrap .region-mu{background-position:0 -688px}#loco.wrap .region-us{background-position:0 -700px}#loco.wrap .region-tw{background-position:0 -712px}#loco.wrap .region-ye{background-position:0 -724px}#loco.wrap .region-mw{background-position:0 -736px}#loco.wrap .region-nl{background-position:0 -748px}#loco.wrap .region-ls{background-position:0 -760px}#loco.wrap .region-bo{background-position:0 -772px}#loco.wrap .region-at{background-position:0 -784px}#loco.wrap .region-ck{background-position:0 -796px}#loco.wrap .region-by{background-position:0 -808px}#loco.wrap .region-au{background-position:0 -820px}#loco.wrap .region-bn{background-position:0 -832px}#loco.wrap .region-ma{background-position:0 -844px}#loco.wrap .region-nz{background-position:0 -856px}#loco.wrap .region-lr{background-position:0 -868px}#loco.wrap .region-mv{background-position:0 -880px}#loco.wrap .region-tc{background-position:0 -892px}#loco.wrap .region-ug{background-position:0 -904px}#loco.wrap .region-tt{background-position:0 -916px}#loco.wrap .region-pl{background-position:0 -928px}#loco.wrap .region-rs{background-position:0 -940px}#loco.wrap .region-in{background-position:0 -952px}#loco.wrap .region-ge{background-position:0 -964px}#loco.wrap .region-gr{background-position:0 -976px}#loco.wrap .region-gs{background-position:0 -988px}#loco.wrap .region-gd{background-position:0 -1000px}#loco.wrap .region-io{background-position:0 -1012px}#loco.wrap .region-hk{background-position:0 -1024px}#loco.wrap .region-kp{background-position:0 -1036px}#loco.wrap .region-kg{background-position:0 -1048px}#loco.wrap .region-pm{background-position:0 -1060px}#loco.wrap .region-sv{background-position:0 -1072px}#loco.wrap .region-re{background-position:0 -1084px}#loco.wrap .region-sa{background-position:0 -1096px}#loco.wrap .region-sc{background-position:0 -1108px}#loco.wrap .region-st{background-position:0 -1120px}#loco.wrap .region-ke{background-position:0 -1132px}#loco.wrap .region-im{background-position:0 -1144px}#loco.wrap .region-kr{background-position:0 -1161px}#loco.wrap .region-gf{background-position:0 -1173px}#loco.wrap .region-dj{background-position:0 -1185px}#loco.wrap .region-gq{background-position:0 -1197px}#loco.wrap .region-gp{background-position:0 -1209px}#loco.wrap .region-dk{background-position:0 -1221px}#loco.wrap .region-gg{background-position:0 -1233px}#loco.wrap .region-il{background-position:0 -1250px}#loco.wrap .region-pn{background-position:0 -1262px}#loco.wrap .region-sb{background-position:0 -1274px}#loco.wrap .region-py{background-position:0 -1286px}#loco.wrap .region-ru{background-position:0 -1298px}#loco.wrap .region-kw{background-position:0 -1310px}#loco.wrap .region-do{background-position:0 -1322px}#loco.wrap .region-gt{background-position:0 -1334px}#loco.wrap .region-gb{background-position:0 -1346px}#loco.wrap .region-gu{background-position:0 -1358px}#loco.wrap .region-je{background-position:0 -1370px}#loco.wrap .region-hm{background-position:0 -1387px}#loco.wrap .region-sg{background-position:0 -1399px}#loco.wrap .region-pk{background-position:0 -1411px}#loco.wrap .region-sr{background-position:0 -1423px}#loco.wrap .region-se{background-position:0 -1435px}#loco.wrap .region-jp{background-position:0 -1447px}#loco.wrap .region-gw{background-position:0 -1459px}#loco.wrap .region-eh{background-position:0 -1471px}#loco.wrap .region-dz{background-position:0 -1483px}#loco.wrap .region-ga{background-position:0 -1495px}#loco.wrap .region-fr{background-position:0 -1507px}#loco.wrap .region-dm{background-position:0 -1519px}#loco.wrap .region-hn{background-position:0 -1531px}#loco.wrap .region-sd{background-position:0 -1543px}#loco.wrap .region-rw{background-position:0 -1555px}#loco.wrap .region-ph{background-position:0 -1567px}#loco.wrap .region-ss{background-position:0 -1579px}#loco.wrap .region-qa{background-position:0 -1596px}#loco.wrap .region-pe{background-position:0 -1608px}#loco.wrap .region-pr{background-position:0 -1620px}#loco.wrap .region-si{background-position:0 -1632px}#loco.wrap .region-ht{background-position:0 -1644px}#loco.wrap .region-es{background-position:0 -1656px}#loco.wrap .region-gl{background-position:0 -1668px}#loco.wrap .region-gm{background-position:0 -1680px}#loco.wrap .region-er{background-position:0 -1692px}#loco.wrap .region-fi{background-position:0 -1704px}#loco.wrap .region-ee{background-position:0 -1716px}#loco.wrap .region-kn{background-position:0 -1728px}#loco.wrap .region-hu{background-position:0 -1740px}#loco.wrap .region-iq{background-position:0 -1752px}#loco.wrap .region-ky{background-position:0 -1764px}#loco.wrap .region-sh{background-position:0 -1776px}#loco.wrap .region-ps{background-position:0 -1788px}#loco.wrap .region-pf{background-position:0 -1800px}#loco.wrap .region-sj{background-position:0 -1812px}#loco.wrap .region-id{background-position:0 -1824px}#loco.wrap .region-is{background-position:0 -1836px}#loco.wrap .region-eg{background-position:0 -1848px}#loco.wrap .region-fk{background-position:0 -1860px}#loco.wrap .region-fj{background-position:0 -1872px}#loco.wrap .region-gn{background-position:0 -1884px}#loco.wrap .region-gy{background-position:0 -1896px}#loco.wrap .region-ir{background-position:0 -1908px}#loco.wrap .region-km{background-position:0 -1920px}#loco.wrap .region-ie{background-position:0 -1932px}#loco.wrap .region-kz{background-position:0 -1944px}#loco.wrap .region-ro{background-position:0 -1956px}#loco.wrap .region-sk{background-position:0 -1968px}#loco.wrap .region-pg{background-position:0 -1980px}#loco.wrap .region-pt{background-position:0 -1992px}#loco.wrap .region-so{background-position:0 -2004px}#loco.wrap .region-sx{background-position:0 -2016px}#loco.wrap .region-hr{background-position:0 -2033px}#loco.wrap .region-ki{background-position:0 -2045px}#loco.wrap .region-jm{background-position:0 -2057px}#loco.wrap .region-ec{background-position:0 -2069px}#loco.wrap .region-et{background-position:0 -2081px}#loco.wrap .region-fo{background-position:0 -2093px}#loco.wrap .region-kh{background-position:0 -2105px}#loco.wrap .region-sy{background-position:0 -2117px}#loco.wrap .region-sn{background-position:0 -2129px}#loco.wrap .region-pw{background-position:0 -2141px}#loco.wrap .region-sl{background-position:0 -2153px}#loco.wrap .region-fm{background-position:0 -2165px}#loco.wrap .region-gi{background-position:0 -2177px}#loco.wrap .region-de{background-position:0 -2189px}#loco.wrap .region-gh{background-position:0 -2201px}#loco.wrap .region-jo{background-position:0 -2213px}#loco.wrap .region-it{background-position:0 -2225px}#loco.wrap .region-pa{background-position:0 -2237px}#loco.wrap .region-sz{background-position:0 -2249px}#loco.wrap .region-sm{background-position:0 -2261px}#loco.wrap .region-tn{background-position:0 -2273px}#loco.wrap .region-ml{background-position:0 -2285px}#loco.wrap .region-cg{background-position:0 -2297px}#loco.wrap .region-ax{background-position:0 -2309px}#loco.wrap .region-ao{background-position:0 -2321px}#loco.wrap .region-bt{background-position:0 -2333px}#loco.wrap .region-an{background-position:0 -2345px}#loco.wrap .region-bb{background-position:0 -2357px}#loco.wrap .region-cf{background-position:0 -2369px}#loco.wrap .region-mm{background-position:0 -2381px}#loco.wrap .region-li{background-position:0 -2393px}#loco.wrap .region-na{background-position:0 -2405px}#loco.wrap .region-mz{background-position:0 -2417px}#loco.wrap .region-to{background-position:0 -2429px}#loco.wrap .region-vg{background-position:0 -2441px}#loco.wrap .region-ve{background-position:0 -2453px}#loco.wrap .region-tz{background-position:0 -2465px}#loco.wrap .region-tm{background-position:0 -2477px}#loco.wrap .region-mx{background-position:0 -2489px}#loco.wrap .region-nc{background-position:0 -2501px}#loco.wrap .region-mo{background-position:0 -2513px}#loco.wrap .region-lk{background-position:0 -2525px}#loco.wrap .region-cd{background-position:0 -2537px}#loco.wrap .region-al{background-position:0 -2549px}#loco.wrap .region-bw{background-position:0 -2561px}#loco.wrap .region-cs{background-position:0 -2573px}#loco.wrap .region-cr{background-position:0 -2585px}#loco.wrap .region-bv{background-position:0 -2597px}#loco.wrap .region-am{background-position:0 -2609px}#loco.wrap .region-az{background-position:0 -2621px}#loco.wrap .region-ba{background-position:0 -2633px}#loco.wrap .region-mn{background-position:0 -2645px}#loco.wrap .region-nu{background-position:0 -2657px}#loco.wrap .region-my{background-position:0 -2669px}#loco.wrap .region-tl{background-position:0 -2681px}#loco.wrap .region-ws{background-position:0 -2693px}#loco.wrap .region-th{background-position:0 -2705px}#loco.wrap .region-nf{background-position:0 -2717px}#loco.wrap .region-ly{background-position:0 -2729px}#loco.wrap .region-ai{background-position:0 -2741px}#loco.wrap .region-br{background-position:0 -2753px}#loco.wrap .region-cv{background-position:0 -2765px}#loco.wrap .region-be{background-position:0 -2777px}#loco.wrap .region-ca{background-position:0 -2789px}#loco.wrap .region-bd{background-position:0 -2801px}#loco.wrap .region-cw{background-position:0 -2813px}#loco.wrap .region-bs{background-position:0 -2830px}#loco.wrap .region-ng{background-position:0 -2842px}#loco.wrap .region-mk{background-position:0 -2854px}#loco.wrap .region-np{background-position:0 -2866px}#loco.wrap .region-va{background-position:0 -2878px}#loco.wrap .region-uz{background-position:0 -2890px}#loco.wrap .region-um{background-position:0 -2902px}#loco.wrap .region-tk{background-position:0 -2914px}#loco.wrap .region-vc{background-position:0 -2926px}#loco.wrap .region-zw{background-position:0 -2938px}#loco.wrap .region-nr{background-position:0 -2950px}#loco.wrap .region-ne{background-position:0 -2962px}#loco.wrap .region-cu{background-position:0 -2974px}#loco.wrap .region-bq{background-position:0 -2986px}#loco.wrap .region-bf{background-position:0 -2998px}#loco.wrap .region-bg{background-position:0 -3010px}#loco.wrap .region-cc{background-position:0 -3022px}#loco.wrap .region-mh{background-position:0 -3034px}#loco.wrap .region-za{background-position:0 -3046px}#loco.wrap .region-uy{background-position:0 -3058px}#loco.wrap .region-wf{background-position:0 -3070px}#loco.wrap .region-vu{background-position:0 -3082px}#loco.wrap .region-tj{background-position:0 -3094px}#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd{background-position:0 -3106px}#loco.wrap .variant-valencia,#loco.wrap .region-es.variant-valencia{background-position:0 -3118px}#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy{background-position:0 -3130px}#loco.wrap .x-eu{background-position:0 -3142px}#loco.wrap span.lang code{display:none}#loco.wrap .icon-notag:before{content:""}#loco.wrap .icon-magnify:before{content:"🔍"}#loco.wrap .icon-python:before{content:"🐍"}#loco.wrap .icon-unicode:before{content:"u"}#loco.wrap .icon-json:before{content:"{"}#loco.wrap .icon-bullist:before{content:""}#loco.wrap .icon-numlist:before{content:""}#loco.wrap .icon-indent:before{content:""}#loco.wrap .icon-outdent:before{content:""}#loco.wrap .icon-link:before{content:""}#loco.wrap .icon-unlink:before{content:""}#loco.wrap .icon-bold:before{content:"B"}#loco.wrap .icon-italic:before{content:"I"}#loco.wrap .icon-translate:before{content:""}#loco.wrap .icon-proj:before{content:""}#loco.wrap .icon-plural:before{content:"᛬"}#loco.wrap .icon-max:before,#loco.wrap .icon-full-screen:before{content:""}#loco.wrap .icon-min:before{content:""}#loco.wrap .icon-sort:before{content:""}#loco.wrap .icon-ok:before,#loco.wrap .notice-success>.has-icon:before,#loco.wrap .notice-success p>strong.has-icon:before{content:"✓"}#loco.wrap .icon-ok-empty:before{content:"🗌"}#loco.wrap .icon-checkbox-checked:before,#loco.wrap .selector.multi li.checked .icon-checkbox:before{content:"☑"}#loco.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco.wrap .icon-checkbox-partial:before{content:"☉"}#loco.wrap .icon-radio-checked:before{content:"⚫"}#loco.wrap .icon-radio-unchecked:before{content:"⚪"}#loco.wrap .icon-ext:before{content:"⬈"}#loco.wrap .icon-share:before{content:""}#loco.wrap .icon-star:before{content:""}#loco.wrap .icon-user:before{content:""}#loco.wrap .icon-remove:before{content:"×"}#loco.wrap .icon-cog:before{content:""}#loco.wrap .icon-trash:before{content:""}#loco.wrap .icon-time:before,#loco.wrap .icon-history:before{content:""}#loco.wrap .icon-download:before{content:""}#loco.wrap .icon-revert:before{content:""}#loco.wrap .icon-sync:before{content:""}#loco.wrap .icon-lock:before,#loco.wrap .notice-locked>.has-icon:before,#loco.wrap .notice-locked p>strong.has-icon:before{content:""}#loco.wrap .icon-flag:before{content:""}#loco.wrap .icon-tag:before{content:""}#loco.wrap .icon-tags:before{content:""}#loco.wrap .icon-print:before{content:""}#loco.wrap .icon-camera:before{content:""}#loco.wrap .icon-pencil:before{content:""}#loco.wrap .icon-add:before{content:""}#loco.wrap .icon-del:before{content:""}#loco.wrap .icon-clear:before,#loco.wrap a.icon.clear:before{content:""}#loco.wrap .icon-ok-sign:before{content:"✔"}#loco.wrap .icon-help:before{content:"?"}#loco.wrap .icon-info:before,#loco.wrap .notice-info>.has-icon:before,#loco.wrap .notice-info p>strong.has-icon:before{content:"ℹ"}#loco.wrap .icon-cancel:before{content:""}#loco.wrap .icon-warn:before,#loco.wrap .notice-error>.has-icon:before,#loco.wrap .notice-error p>strong.has-icon:before,#loco.wrap .notice-warning>.has-icon:before,#loco.wrap .notice-warning p>strong.has-icon:before{content:""}#loco.wrap .icon-comment:before{content:""}#loco.wrap .icon-bar-chart:before{content:""}#loco.wrap .icon-key:before{content:""}#loco.wrap .icon-cogs:before{content:""}#loco.wrap .icon-comments:before{content:""}#loco.wrap .icon-signout:before{content:""}#loco.wrap .icon-signin:before{content:""}#loco.wrap .icon-upload:before{content:""}#loco.wrap .icon-twitter:before{content:"🐦"}#loco.wrap .icon-facebook:before{content:""}#loco.wrap .icon-github:before{content:""}#loco.wrap .icon-feed:before{content:""}#loco.wrap .icon-globe:before{content:""}#loco.wrap .icon-wrench:before,#loco.wrap .notice-debug>.has-icon:before,#loco.wrap .notice-debug p>strong.has-icon:before{content:""}#loco.wrap .icon-group:before{content:""}#loco.wrap .icon-cloud:before{content:""}#loco.wrap .icon-copy:before{content:""}#loco.wrap .icon-save:before{content:""}#loco.wrap .icon-menu:before{content:""}#loco.wrap .icon-table:before{content:""}#loco.wrap .icon-caret-down:before{content:"▼"}#loco.wrap .icon-caret-up:before{content:"▲"}#loco.wrap .icon-caret-right:before{content:"▶"}#loco.wrap .icon-mail:before{content:""}#loco.wrap .icon-cloud-upload:before{content:""}#loco.wrap .icon-file:before{content:""}#loco.wrap .icon-circle-white:before{content:"⚬"}#loco.wrap .icon-circle-black:before{content:"●"}#loco.wrap .icon-eraser:before{content:""}#loco.wrap .icon-unlock:before{content:""}#loco.wrap .icon-apple:before{content:""}#loco.wrap .icon-android:before{content:""}#loco.wrap .icon-back:before{content:"⬅"}#loco.wrap .icon-next:before{content:"➔"}#loco.wrap .icon-arrow-up:before{content:""}#loco.wrap .icon-ccard:before{content:""}#loco.wrap .icon-caret-left:before{content:"◀"}#loco.wrap .icon-pro:before{content:"⚡"}#loco.wrap .icon-bell:before{content:""}#loco.wrap .icon-code:before{content:""}#loco.wrap .icon-privacy:before{content:"🛡"}#loco.wrap .icon-hellip:before{content:"…"}#loco.wrap .icon-vellip:before{content:"⁞"}#loco.wrap .icon-collapse:before{content:""}#loco.wrap .icon-expand:before{content:""}#loco.wrap .icon-wordpress:before{content:""}#loco.wrap .icon-database:before{content:""}#loco.wrap .icon-restore:before{content:""}#loco.wrap .icon-pilcrow:before{content:"¶"}#loco.wrap .icon,#loco.wrap .has-icon:before,#loco.wrap .has-dashicon:before{speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco.wrap .icon,#loco.wrap .has-icon:before{font-family:"loco"}#loco.wrap .has-dashicon:before{font-family:"dashicons";font-size:1.4em}#loco.wrap .has-icon:before,#loco.wrap .has-dashicon:before,#loco.wrap .has-icon>span{display:inline-block;vertical-align:middle}#loco.wrap .only-icon{text-align:center}#loco.wrap .only-icon:before{text-align:center}#loco.wrap .only-icon span{display:none}#loco.wrap a,#loco.wrap .wp-core-ui .button-link{text-decoration:none}#loco.wrap h3:hover>a.loco-anchor{color:#ccc}#loco.wrap h3:hover>a.loco-anchor:before{content:"¶"}#loco.wrap .has-lang>span{display:inline-block;vertical-align:middle}#loco.wrap a.has-lang:hover>span:last-child{text-decoration:underline}#loco.wrap h1 ul,#loco.wrap h1 li{margin:0;padding:0}#loco.wrap h1 li{display:inline-block}#loco.wrap h1 li:after{content:"/";color:#999;text-shadow:none;display:inline-block}#loco.wrap h1 li:last-child:after{content:""}#loco.wrap h1 li:last-child a{color:inherit;pointer-events:none;cursor:auto}#loco.wrap h2 span{color:#999;font-weight:normal}#loco.wrap h2 .loco-meta,#loco.wrap h3 .loco-meta{color:inherit;font-size:14px;font-weight:normal;vertical-align:middle}#loco.wrap .wp-list-table td:first-child .icon{width:16px;display:inline-block;text-align:center}#loco.wrap .wp-list-table td{white-space:nowrap}#loco.wrap .wp-list-table td>a,#loco.wrap .wp-list-table td>time{display:inline-block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis}#loco.wrap .wp-list-table th.loco-sort{cursor:pointer}#loco.wrap .wp-list-table th.loco-sort:hover{color:#000}#loco.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco.wrap .wp-list-table th.loco-sort.loco-desc:after{padding:0 0 0 4px;color:#999}#loco.wrap .wp-list-table th.loco-sort.loco-desc:after{content:"▼"}#loco.wrap .wp-list-table th.loco-sort.loco-asc:after{content:"▲"}#loco.wrap .wp-list-table td.has-row-actions{overflow:visible}#loco.wrap form.loco-filter{display:block;margin-bottom:5px}#loco.wrap form.loco-filter .icon-filter{color:#999}#loco.wrap nav.above-list-table{margin-bottom:1em}#loco.wrap nav.above-list-table a{display:inline-block;margin-right:1em}#loco.wrap .wp-core-ui button.inverted,#loco.wrap .wp-core-ui button.inverted:hover{background:-moz-linear-gradient(top, #cccccc 0%, #e0e0e0 5%, #fefefe 100%);background:-webkit-linear-gradient(top, #cccccc 0%, #e0e0e0 5%, #fefefe 100%);background:linear-gradient(to bottom, #cccccc 0%, #e0e0e0 5%, #fefefe 100%);-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;border-color:#bbb}#loco.wrap .wp-core-ui button:active,#loco.wrap .wp-core-ui button.inverted:active{border-color:#5b9dd9}#loco.wrap .loco-clearable{display:inline-block;vertical-align:middle;position:relative}#loco.wrap .loco-clearable a.clear,#loco.wrap .auto-comp-wrap a.clear{top:0;right:0;outline:none;margin:0;border:solid 1px transparent;padding:5px 5px;position:absolute;font-size:1em;line-height:normal}#loco.wrap .loco-clearable a.clear:before,#loco.wrap .auto-comp-wrap a.clear:before{vertical-align:middle;padding:0;color:#999}#loco.wrap .loco-clearable a.clear:hover:before,#loco.wrap .auto-comp-wrap a.clear:hover:before{color:#333}#loco.wrap .loco-clearable a.clear span,#loco.wrap .auto-comp-wrap a.clear span{display:none}#loco.wrap .loco-clearable ::-ms-clear,#loco.wrap .auto-comp-wrap ::-ms-clear{display:none}#loco.wrap div.progress{color:#000;background:transparent !important}#loco.wrap div.progress *{height:100%;overflow:hidden;white-space:nowrap}#loco.wrap div.progress .t{background-color:#ddd;border:1px solid #ccc}#loco.wrap div.progress .t .bar{float:left;clear:none;background-color:#3db63d}#loco.wrap div.progress .t .bar.f{background-color:#bd2c00}#loco.wrap div.progress .l{display:block}#loco.wrap td div.progress .t{border:none}#loco.wrap td div.progress .l{display:none}#loco.wrap code.path{color:#333;margin:0;padding:0;display:inline;background:transparent}#loco.wrap .loco-danger{color:#d54e21}#loco.wrap .notice,#loco.wrap .panel{background:#fff;position:relative;margin:1em 0;padding:1px 12px}#loco.wrap .notice-generic{border-color:#ddd}#loco.wrap .notice-success>.has-icon,#loco.wrap .notice-success p>strong.has-icon{color:#000}#loco.wrap .notice-warning{border-color:orange}#loco.wrap .notice-error{border-color:#dc3232}#loco.wrap .notice-debug{border-color:#00a0d2}#loco.wrap .notice-danger{border-color:#dc3232}#loco.wrap .notice-locked{border-color:orange}#loco.wrap .notice>.has-icon:before,#loco.wrap .notice p>strong.has-icon:before{padding-right:6px}#loco.wrap .notice>p>a.button.has-icon:before{width:1.5em}#loco.wrap .notice>p>em{color:#d54e21;font-style:normal}#loco.wrap .notice>p>em a{color:inherit}#loco.wrap .notice>p a:hover,#loco.wrap .notice>nav a:hover{text-decoration:underline}#loco.wrap .notice>p a.button,#loco.wrap .notice>nav a.button{text-decoration:inherit}#loco.wrap .notice.has-nav{display:flex;flex-direction:row}#loco.wrap .notice.has-nav p,#loco.wrap .notice.has-nav nav{line-height:22px;flex-grow:1}#loco.wrap .notice.has-nav nav{text-align:right;padding:2px;margin:.5em 0}#loco.wrap .notice.has-nav.is-dismissible{padding-right:38px}#loco.wrap .notice.has-nav a{white-space:nowrap}#loco.wrap .notice.has-nav nav>span{color:#666}#loco.wrap .notice>h3>span{display:inline-block;vertical-align:middle}#loco.wrap ul.problems li{font-style:italic}#loco.wrap label{position:relative}#loco.wrap label.for-disabled,#loco.wrap label.for-disabled>input{cursor:default !important}#loco.wrap input.regular-text,#loco.wrap textarea.regular-text{width:25em}#loco.wrap .button-link{padding:0 10px 1px}#loco.wrap .button-danger{background:#ba0000;border-color:#900 #600 #600;-webkit-box-shadow:0 1px 0 #600;-moz-box-shadow:0 1px 0 #600;box-shadow:0 1px 0 #600;color:#fff;text-shadow:0 -1px 1px #600,1px 0 1px #600,0 1px 1px #600,-1px 0 1px #600}#loco.wrap .button-success{background:#00b500;border-color:#090 #2e892e #2e892e;-webkit-box-shadow:0 1px 0 #2e892e;-moz-box-shadow:0 1px 0 #2e892e;box-shadow:0 1px 0 #2e892e;color:#fff;text-shadow:0 -1px 1px #2e892e,1px 0 1px #2e892e,0 1px 1px #2e892e,-1px 0 1px #2e892e}#loco.wrap .button-success:hover{background:#3db63d}#loco.wrap form button.loco-loading.button-large{padding-left:0}#loco.wrap form button.loco-loading.button-large:before{width:16px;height:16px;margin:0 4px;content:" ";font-size:16px;line-height:1;display:inline-block;vertical-align:sub}#loco.wrap ::placeholder{color:#ccc}#loco.wrap ::-webkit-input-placeholder{color:#ccc}#loco.wrap :-moz-placeholder{color:#ccc;opacity:1}#loco.wrap ::-moz-placeholder{color:#ccc;opacity:1}#loco.wrap :-ms-input-placeholder{color:#ccc}#loco.wrap .ielt10 .placeheld{color:#ccc}#loco.wrap a.has-raquo:after{content:" »"}#loco.wrap a.has-laquo:before{content:"« "}#loco.wrap span.inline-spinner{display:inline-block;min-width:16px;min-height:16px;background:transparent url(../img/spin-modal.gif?v=2.3.2) 0 0 no-repeat}.js #wpbody-content>.notice{display:none}.js #wpbody-content>.notice.inline{display:block}.js #loco.wrap .jshide,.no-js #loco.wrap .jsonly{display:none !important}#loco.wrap .invis{visibility:hidden}.form-table tr{vertical-align:top}.form-table tr.compact td{padding-top:0}.loco-modal.request-filesystem-credentials-dialog{top:15% !important;max-height:85% !important}.loco-modal.request-filesystem-credentials-dialog>.ui-dialog-content{background:inherit}.loco-modal.request-filesystem-credentials-dialog .ftp-password>label>em:last-child{display:none}.ui-dialog-content>div.loco-loading{height:100%;background:transparent url(../img/spin-modal.gif?v=2.3.2) center 20px no-repeat}#loco-credit>*{vertical-align:middle}#loco-credit>a{display:inline-block;position:relative;overflow:hidden;background:transparent url(../img/logo-foot.gif?v=2.3.2) 0 0 no-repeat;height:30px;width:100px;text-indent:200px;-webkit-transition-duration:0s;transition-duration:0s}#loco-credit>a:hover{background-position:0 -35px}#loco-content{position:relative}#footer-upgrade span:before{color:#ccc;content:" | ";display:inline;padding-left:.5em;padding-right:.5em}#footer-upgrade span:first-child:before{content:"";display:none}.loco-clearfix:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}dl.debug dt{font-weight:bold}dl.debug dt,dl.debug dd{white-space:pre}.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(0,115,170,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#0073aa}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../img/skins/fresh/spin-primary-button.gif?v=2.3.2) 0 0 no-repeat !important}
pub/css/editor.css CHANGED
@@ -1 +1 @@
1
- #loco-editor{border:solid 1px #ccc}#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.3.1);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.3.1) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.3.1);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.3.1);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.3.1);background-size:16px}}#loco-editor ._green_glow_inner,#loco-editor .is-editable>.wg-content>textarea:focus,#loco-editor .is-editable>.wg-content.has-focus .ace_scroller,#loco-editor .is-editable>.wg-content.has-focus .wysihtml-editor,#loco-editor .is-editable>.wg-content.has-focus .mce-content-body{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco-editor ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco-editor .loco-font,#loco-editor .is-table .wg-thead .wg-sortable>header:after{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-editor div.ta-mirror{position:absolute;top:0;border:solid 1px transparent;color:transparent;padding:.4em .6em;pointer-events:none}#loco-editor div.ta-mirror span{position:relative}#loco-editor div.ta-mirror span:after{color:#ccc;white-space:pre;display:inline-block;position:absolute;top:0;line-height:normal}#loco-editor div.ta-mirror .crlf:after{content:"¬"}#loco-editor div.ta-mirror .eof:after{content:"¶"}#loco-editor div.ta-mirror .x20:after{content:"·";color:#aaa}#loco-editor div.ta-mirror .x9:after{content:"⟶"}#loco-editor div.ta-mirror,#loco-editor .has-mirror textarea{white-space:pre-wrap;word-wrap:break-word;word-spacing:0px}#loco-editor .has-mirror ::placeholder{color:transparent}#loco-editor .has-mirror ::-webkit-input-placeholder{color:transparent}#loco-editor .has-mirror :-moz-placeholder{color:transparent;opacity:1}#loco-editor .has-mirror ::-moz-placeholder{color:transparent;opacity:1}#loco-editor .has-mirror :-ms-input-placeholder{color:transparent}#loco-editor .has-mirror .ielt10 .placeheld{color:transparent}#loco-editor div.ta-mirror{left:0;text-align:left}#loco-editor div.ta-mirror span:after{left:0}#loco-editor div.ta-mirror .eol:after{padding-left:.2em}#loco-editor [dir=RTL] div.ta-mirror{left:auto;right:0;text-align:right}#loco-editor [dir=RTL] div.ta-mirror span:after{right:0}#loco-editor [dir=RTL] div.ta-mirror .eol:after{padding-left:0;padding-right:.2em}#loco-editor .has-proxy>textarea{display:none !important}#loco-editor .has-proxy .ace_editor{height:100%;font-size:13px !important;line-height:1.4 !important}#loco-editor .has-proxy .ace_editor .ace_marker-layer .ace_bracket{display:none}#loco-editor .has-proxy .ace_print-margin{display:none}#loco-editor .ace_printf{color:#b90690;background-color:#edf1be}#loco-editor .ace_locked{color:gray}#loco-editor .ace_icu-quoted{color:gray}#loco-editor .ace_icu{color:#697eb9}#loco-editor .ace_icu.ace_name{color:#b90600}#loco-editor .resizer{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0 0 6px 0;background:#f0f0f0 url(../img/wg/splity.png?v=2.3.1) center bottom no-repeat;border:1px solid #ddd;overflow:hidden;cursor:move;cursor:row-resize;cursor:s-resize}#loco-editor .resizer>*{height:100%;border:none}#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.3.1);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.3.1) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.3.1);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.3.1);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.3.1);background-size:16px}}#loco-editor ._green_glow_inner,#loco-editor .is-editable>.wg-content>textarea:focus,#loco-editor .is-editable>.wg-content.has-focus .ace_scroller,#loco-editor .is-editable>.wg-content.has-focus .wysihtml-editor,#loco-editor .is-editable>.wg-content.has-focus .mce-content-body{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco-editor ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco-editor .loco-font,#loco-editor .is-table .wg-thead .wg-sortable>header:after{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-editor .wg-cell,#loco-editor .wg-cell>div{clear:both;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;outline:none}#loco-editor .wg-cell{left:0;top:0;padding:0;margin:0;overflow:hidden}#loco-editor .wg-split{background:#eee}#loco-editor .wg-body:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}#loco-editor .wg-split-x>div>.not-first>*{margin-left:6px}#loco-editor .wg-split-y>div>.not-first>*{margin-top:6px}#loco-editor .wg-split>div>.has-title .wg-content{margin-top:0}#loco-editor .wg-split-x>div>.wg-cell{float:left;clear:none;height:100%}#loco-editor .wg-split-x>div{cursor:move;cursor:ew-resize;cursor:col-resize}#loco-editor .wg-split>div>.not-first:before{display:block;position:absolute;overflow:hidden;content:" "}#loco-editor .wg-split-x>div>.not-first:before{width:6px;height:100%;background:transparent url(../img/wg/splitx.png?v=2.3.1) center center no-repeat}#loco-editor .wg-split-y>div{cursor:move;cursor:ns-resize;cursor:row-resize}#loco-editor .wg-split-y>div>.not-first:before{height:6px;width:100%;background:transparent url(../img/wg/splity.png?v=2.3.1) center center no-repeat}#loco-editor .wg-split>div.locked{cursor:default}#loco-editor .wg-split-x>div.locked>.not-first>*{margin-left:0px}#loco-editor .wg-split-y>div.locked>.not-first>*{margin-top:0px}#loco-editor .wg-split>div.locked>.not-first:before{display:none}#loco-editor .has-title>header{background:#e2e2e2;cursor:default !important;margin:0;white-space:nowrap}#loco-editor .wg-content{background:#fff;cursor:default;padding:4px 6px;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#loco-editor .wg-toolbar{top:0;right:0;margin-top:6px;position:absolute}#loco-editor .wg-toolbar>span{color:#fff;background:#000;display:block;padding:0 6px;cursor:default !important}#loco-editor .wg-toolbar>span:active{color:#000;background-color:#fff}#loco-editor .wg-content,#loco-editor .wg-tbody>div{overflow:scroll;overflow-x:hidden;overflow-y:auto}#loco-editor .is-table{background-color:#fff}#loco-editor .is-table .wg-thead .has-title>header{font-weight:normal;background:transparent;padding:4px 0;margin:0 0 0 10px}#loco-editor .is-table .wg-thead>div>.not-first:before{background-position:center center}#loco-editor .is-table .wg-thead{background:#e2e2e2;border-bottom:solid 1px #ccc}#loco-editor .is-table .wg-tbody{background-image:url(data:image/gif;base64,R0lGODlhAQAsAIABAPz8/P///yH5BAEAAAEALAAAAAABACwAAAIIjI+pAe0PIygAOw==);position:relative}#loco-editor .is-table .wg-cols>div{float:left;clear:none}#loco-editor .is-table .wg-cols>div>div{white-space:nowrap;line-height:1.7em;padding-left:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis;background-color:#fff}#loco-editor .is-table .wg-cols>div>div:nth-child(even){background-color:#f7f7f7}#loco-editor .is-table .wg-cols>div>div.selected{background-color:#3db63d;color:#fff}#loco-editor .is-table .wg-cols>div>div.selected::selection{background-color:#fff;color:#000}#loco-editor .is-table .wg-cols>div:first-child>div{padding-left:4px}#loco-editor .is-table .wg-dead{clear:both}#loco-editor .is-table .wg-thead .wg-sortable>header{cursor:pointer !important}#loco-editor .is-table .wg-thead .wg-sortable>header:after{padding:0 0 0 5px;color:#999}#loco-editor .is-table .wg-thead .wg-sortable.wg-asc>header:after{content:"▲"}#loco-editor .is-table .wg-thead .wg-sortable.wg-desc>header:after{content:"▼"}#loco-editor .is-table .wg-thead .wg-sortable:hover>header:after{color:#000}#loco-editor .is-field>.wg-content{cursor:text;padding:0;line-height:normal;overflow:hidden;overflow-y:hidden}#loco-editor .is-field>.wg-content>div,#loco-editor .is-field>.wg-content>textarea{font-size:14px;line-height:1.4;border:1px solid #ddd;width:100%;height:100%;padding:8px 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}#loco-editor .is-field>.wg-content textarea{resize:none;overflow:auto;display:block}#loco-editor .is-field>.wg-content>.ace_editor{padding:0;border-width:0}#loco-editor .is-field>.wg-content>div[contenteditable]{overflow:scroll;overflow-x:hidden;overflow-y:auto}#loco-editor .is-readonly>.wg-content{cursor:default}#loco-editor .is-readonly>.wg-content>div,#loco-editor .is-readonly>.wg-content>textarea,#loco-editor .is-readonly>.wg-content>textarea[readonly]{background:#f8f8f8;text-shadow:0 1px #fff;color:inherit}#loco-editor .is-readonly>.wg-content .ace_scroller{cursor:default;background:#f8f8f8}#loco-editor .is-readonly>.wg-content .ace_cursor-layer{display:none}#loco-editor .is-readonly>.wg-content>textarea[readonly]{cursor:default}#loco-editor .is-editable>.wg-content[dir=RTL] .ace_editor .ace_line{direction:ltr;unicode-bidi:bidi-override}#loco-editor .wg-split-x>nav.wg-tabs{white-space:nowrap;text-align:center;cursor:default}#loco-editor .wg-split-x>nav.wg-tabs>a{display:inline-block;padding:.5em 1em;margin-top:.2em;color:#000;text-decoration:none;-webkit-border-radius:.2em .2em 0 0;-moz-border-radius:.2em .2em 0 0;-ms-border-radius:.2em .2em 0 0;-o-border-radius:.2em .2em 0 0;border-radius:.2em .2em 0 0;background-color:#f3f7fd}#loco-editor .wg-split-x>nav.wg-tabs>a:hover{background-color:#fff}#loco-editor .wg-split-x>nav.wg-tabs>a.active{background-color:#3db63d;color:#fff}#loco-editor .wg-split>div>.has-nav>.wg-body{margin-top:0px}#loco-editor .wg-dead{visibility:hidden}@media all and (max-width: 768px){#loco-editor .wg-split-x>div>.not-first>*{margin-left:20px}#loco-editor .wg-split-y>div>.not-first>*{margin-top:20px}#loco-editor .wg-split-x>div>.not-first:before{width:20px}#loco-editor .wg-split-y>div>.not-first:before{height:20px}#loco-editor .is-table .wg-thead header{padding-left:20px}}#loco-editor .is-table .po-fuzzy{color:#b59829;font-weight:bold}#loco-editor .is-table .po-empty{color:#1f507a;font-weight:bold}#loco-editor .is-table .po-flagged{color:#bd2c00}#loco-editor .is-table .wg-cols>div:first-child>div:before{font-family:loco;vertical-align:inherit;display:inline-block;content:" ";width:1.3em;line-height:1}#loco-editor .is-table .wg-cols>div:first-child>div.po-fuzzy:before{content:""}#loco-editor .is-table .wg-cols>div:first-child>div.po-flagged:before{content:""}#loco-editor .is-table .wg-cols>div:first-child>div.po-comment:before{content:"";color:#999}#loco-editor .is-table .wg-cols>div:first-child>div.po-unsaved:before{content:"";color:#f1d040}#loco-editor .is-table .wg-cols>div:first-child>div.selected:before{color:#fff !important}#loco-editor .wg-cell p.notes{font-weight:normal;line-height:normal}#loco-editor .wg-cell p.notes>*{display:inline-block}#loco-editor .wg-cell p.notes>span{border:1px solid transparent;border-left:none}#loco-editor .wg-cell p.notes>mark{color:#fff;border-radius:2px;background-color:silver;border:1px solid silver;padding:0 .3em}#loco-editor .wg-cell p.notes>mark.tag{color:#999;background-color:#eee}#loco-editor .is-table .wg-cols>div>div>mark{display:inline-block;vertical-align:text-bottom;font:inherit;font-weight:normal;color:#fff;border-radius:2px;font-size:90%;line-height:1;padding:.2em .3em;background-color:rgba(0,0,0,.25)}#loco-editor .is-table .wg-cols>div>div.selected.po-flagged{background-color:#bd2c00}#loco-editor .is-table .wg-cols>div>div.selected.po-fuzzy{background-color:#b59829}#loco-editor .is-table .wg-cols>div>div.selected.po-empty{background-color:#999}#loco-editor #po-list .wg-content{padding:0}#loco-editor #po-source>.wg-body>.has-title>header{background:transparent;font-weight:normal;float:left;clear:none;min-width:3.4em}#loco-editor #po-source>.wg-body>.has-title>.wg-content{clear:none}#loco-editor .wg-cell>p.notes,#loco-editor .wg-cell>p.errors{font-size:13px;line-height:1.4em;margin:0;padding:5px 10px;cursor:default !important}#loco-editor .wg-cell>p.errors{color:#c00}#loco-editor .wg-cell>p.notes{color:#333;white-space:pre-line}#loco-editor .has-title>header{line-height:normal;padding:6px}#loco-editor .has-title>header .lang{margin-right:6px;margin-bottom:1px}#loco-editor .trg-rtl #po-list-tbody .wg-cols>div[for=po-list-col-target]>div,#loco-editor .src-rtl #po-list-tbody .wg-cols>div[for=po-list-col-source]>div{direction:rtl;padding-left:0;padding-right:10px;text-align:right}#loco-editor #po-source>.wg-body>.has-title>h2{min-width:4.5em}#loco-editor .is-table .wg-td{font-size:13px}#loco-editor-inner{min-height:600px;font-size:14px;clear:both}#loco-editor-inner>div.loco-loading{height:100px;background:transparent url(../img/spin-editor-button.gif?v=2.3.1) center 20px no-repeat}#loco-editor-inner h2{color:#000;line-height:1}#loco.wrap #loco-toolbar{font-size:14px;height:50px}#loco.wrap #loco-toolbar form{display:block;float:left;clear:none;padding:0;margin:0}#loco.wrap #loco-toolbar form.aux{float:right;margin-right:5px}#loco.wrap #loco-toolbar fieldset{display:block;position:relative;float:left;clear:none}#loco.wrap #loco-toolbar button,#loco.wrap #loco-toolbar input[type=text]{display:block;position:relative;float:left;clear:none;margin:5px 0 0 5px;height:36px;text-align:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#loco.wrap #loco-toolbar input[type=text]{padding:0 10px;font-size:14px;line-height:normal}#loco.wrap #loco-toolbar .invalid input[type=text]:focus{border-color:#c00;-webkit-box-shadow:0 0 2px rgba(153,0,0,.5);-moz-box-shadow:0 0 2px rgba(153,0,0,.5);box-shadow:0 0 2px rgba(153,0,0,.5)}#loco.wrap #loco-toolbar .loco-clearable{padding:0 20px}#loco.wrap #loco-toolbar .loco-clearable.invalid a.clear:before{color:#c00}#loco.wrap #loco-toolbar .loco-clearable a.clear{right:25px;line-height:2}#loco.wrap #loco-toolbar .loco-clearable a.clear:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#loco.wrap #loco-toolbar .loco-clearable a.clear:hover:before{color:#c00}#loco.wrap #loco-toolbar .loco-clearable a.clear:active:before{color:#000}#loco.wrap #loco-toolbar button{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#loco.wrap #loco-toolbar button.has-icon:before{width:16px;padding:0}#loco.wrap #loco-toolbar button.has-icon.loco-loading:before{content:" ";height:16px;background:transparent url(../img/spin-editor-button.gif?v=2.3.1) 0 0 no-repeat}#loco.wrap #loco-toolbar button.only-icon{width:40px}
1
+ #loco-editor{border:solid 1px #ccc}#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.3.2);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.3.2) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.3.2);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.3.2);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.3.2);background-size:16px}}#loco-editor ._green_glow_inner,#loco-editor .is-editable>.wg-content>textarea:focus,#loco-editor .is-editable>.wg-content.has-focus .ace_scroller,#loco-editor .is-editable>.wg-content.has-focus .wysihtml-editor,#loco-editor .is-editable>.wg-content.has-focus .mce-content-body{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco-editor ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco-editor .loco-font,#loco-editor .is-table .wg-thead .wg-sortable>header:after{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-editor div.ta-mirror{position:absolute;top:0;border:solid 1px transparent;color:transparent;padding:.4em .6em;pointer-events:none}#loco-editor div.ta-mirror span{position:relative}#loco-editor div.ta-mirror span:after{color:#ccc;white-space:pre;display:inline-block;position:absolute;top:0;line-height:normal}#loco-editor div.ta-mirror .crlf:after{content:"¬"}#loco-editor div.ta-mirror .eof:after{content:"¶"}#loco-editor div.ta-mirror .x20:after{content:"·";color:#aaa}#loco-editor div.ta-mirror .x9:after{content:"⟶"}#loco-editor div.ta-mirror,#loco-editor .has-mirror textarea{white-space:pre-wrap;word-wrap:break-word;word-spacing:0px}#loco-editor .has-mirror ::placeholder{color:transparent}#loco-editor .has-mirror ::-webkit-input-placeholder{color:transparent}#loco-editor .has-mirror :-moz-placeholder{color:transparent;opacity:1}#loco-editor .has-mirror ::-moz-placeholder{color:transparent;opacity:1}#loco-editor .has-mirror :-ms-input-placeholder{color:transparent}#loco-editor .has-mirror .ielt10 .placeheld{color:transparent}#loco-editor div.ta-mirror{left:0;text-align:left}#loco-editor div.ta-mirror span:after{left:0}#loco-editor div.ta-mirror .eol:after{padding-left:.2em}#loco-editor [dir=RTL] div.ta-mirror{left:auto;right:0;text-align:right}#loco-editor [dir=RTL] div.ta-mirror span:after{right:0}#loco-editor [dir=RTL] div.ta-mirror .eol:after{padding-left:0;padding-right:.2em}#loco-editor .has-proxy>textarea{display:none !important}#loco-editor .has-proxy .ace_editor{height:100%;font-size:13px !important;line-height:1.4 !important}#loco-editor .has-proxy .ace_editor .ace_marker-layer .ace_bracket{display:none}#loco-editor .has-proxy .ace_print-margin{display:none}#loco-editor .ace_printf{color:#b90690;background-color:#edf1be}#loco-editor .ace_locked{color:gray}#loco-editor .ace_icu-quoted{color:gray}#loco-editor .ace_icu{color:#697eb9}#loco-editor .ace_icu.ace_name{color:#b90600}#loco-editor .resizer{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0 0 6px 0;background:#f0f0f0 url(../img/wg/splity.png?v=2.3.2) center bottom no-repeat;border:1px solid #ddd;overflow:hidden;cursor:move;cursor:row-resize;cursor:s-resize}#loco-editor .resizer>*{height:100%;border:none}#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.3.2);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.3.2) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.3.2);background-repeat:no-repeat;min-height:16px}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.3.2);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.3.2);background-size:16px}}#loco-editor ._green_glow_inner,#loco-editor .is-editable>.wg-content>textarea:focus,#loco-editor .is-editable>.wg-content.has-focus .ace_scroller,#loco-editor .is-editable>.wg-content.has-focus .wysihtml-editor,#loco-editor .is-editable>.wg-content.has-focus .mce-content-body{-webkit-box-shadow:inset 0 0 10px 0 #3db63d;-moz-box-shadow:inset 0 0 10px 0 #3db63d;box-shadow:inset 0 0 10px 0 #3db63d}#loco-editor ._green_glow_outer{-webkit-box-shadow:0 0 .5em 0 #3db63d;-moz-box-shadow:0 0 .5em 0 #3db63d;box-shadow:0 0 .5em 0 #3db63d}#loco-editor .loco-font,#loco-editor .is-table .wg-thead .wg-sortable>header:after{font-family:"loco";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco-editor .wg-cell,#loco-editor .wg-cell>div{clear:both;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;outline:none}#loco-editor .wg-cell{left:0;top:0;padding:0;margin:0;overflow:hidden}#loco-editor .wg-split{background:#eee}#loco-editor .wg-body:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}#loco-editor .wg-split-x>div>.not-first>*{margin-left:6px}#loco-editor .wg-split-y>div>.not-first>*{margin-top:6px}#loco-editor .wg-split>div>.has-title .wg-content{margin-top:0}#loco-editor .wg-split-x>div>.wg-cell{float:left;clear:none;height:100%}#loco-editor .wg-split-x>div{cursor:move;cursor:ew-resize;cursor:col-resize}#loco-editor .wg-split>div>.not-first:before{display:block;position:absolute;overflow:hidden;content:" "}#loco-editor .wg-split-x>div>.not-first:before{width:6px;height:100%;background:transparent url(../img/wg/splitx.png?v=2.3.2) center center no-repeat}#loco-editor .wg-split-y>div{cursor:move;cursor:ns-resize;cursor:row-resize}#loco-editor .wg-split-y>div>.not-first:before{height:6px;width:100%;background:transparent url(../img/wg/splity.png?v=2.3.2) center center no-repeat}#loco-editor .wg-split>div.locked{cursor:default}#loco-editor .wg-split-x>div.locked>.not-first>*{margin-left:0px}#loco-editor .wg-split-y>div.locked>.not-first>*{margin-top:0px}#loco-editor .wg-split>div.locked>.not-first:before{display:none}#loco-editor .has-title>header{background:#e2e2e2;cursor:default !important;margin:0;white-space:nowrap}#loco-editor .wg-content{background:#fff;cursor:default;padding:4px 6px;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#loco-editor .wg-toolbar{top:0;right:0;margin-top:6px;position:absolute}#loco-editor .wg-toolbar>span{color:#fff;background:#000;display:block;padding:0 6px;cursor:default !important}#loco-editor .wg-toolbar>span:active{color:#000;background-color:#fff}#loco-editor .wg-content,#loco-editor .wg-tbody>div{overflow:scroll;overflow-x:hidden;overflow-y:auto}#loco-editor .is-table{background-color:#fff}#loco-editor .is-table .wg-thead .has-title>header{font-weight:normal;background:transparent;padding:4px 0;margin:0 0 0 10px}#loco-editor .is-table .wg-thead>div>.not-first:before{background-position:center center}#loco-editor .is-table .wg-thead{background:#e2e2e2;border-bottom:solid 1px #ccc}#loco-editor .is-table .wg-tbody{background-image:url(data:image/gif;base64,R0lGODlhAQAsAIABAPz8/P///yH5BAEAAAEALAAAAAABACwAAAIIjI+pAe0PIygAOw==);position:relative}#loco-editor .is-table .wg-cols>div{float:left;clear:none}#loco-editor .is-table .wg-cols>div>div{white-space:nowrap;line-height:1.7em;padding-left:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis;background-color:#fff}#loco-editor .is-table .wg-cols>div>div:nth-child(even){background-color:#f7f7f7}#loco-editor .is-table .wg-cols>div>div.selected{background-color:#3db63d;color:#fff}#loco-editor .is-table .wg-cols>div>div.selected::selection{background-color:#fff;color:#000}#loco-editor .is-table .wg-cols>div:first-child>div{padding-left:4px}#loco-editor .is-table .wg-dead{clear:both}#loco-editor .is-table .wg-thead .wg-sortable>header{cursor:pointer !important}#loco-editor .is-table .wg-thead .wg-sortable>header:after{padding:0 0 0 5px;color:#999}#loco-editor .is-table .wg-thead .wg-sortable.wg-asc>header:after{content:"▲"}#loco-editor .is-table .wg-thead .wg-sortable.wg-desc>header:after{content:"▼"}#loco-editor .is-table .wg-thead .wg-sortable:hover>header:after{color:#000}#loco-editor .is-field>.wg-content{cursor:text;padding:0;line-height:normal;overflow:hidden;overflow-y:hidden}#loco-editor .is-field>.wg-content>div,#loco-editor .is-field>.wg-content>textarea{font-size:14px;line-height:1.4;border:1px solid #ddd;width:100%;height:100%;padding:8px 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}#loco-editor .is-field>.wg-content textarea{resize:none;overflow:auto;display:block}#loco-editor .is-field>.wg-content>.ace_editor{padding:0;border-width:0}#loco-editor .is-field>.wg-content>div[contenteditable]{overflow:scroll;overflow-x:hidden;overflow-y:auto}#loco-editor .is-readonly>.wg-content{cursor:default}#loco-editor .is-readonly>.wg-content>div,#loco-editor .is-readonly>.wg-content>textarea,#loco-editor .is-readonly>.wg-content>textarea[readonly]{background:#f8f8f8;text-shadow:0 1px #fff;color:inherit}#loco-editor .is-readonly>.wg-content .ace_scroller{cursor:default;background:#f8f8f8}#loco-editor .is-readonly>.wg-content .ace_cursor-layer{display:none}#loco-editor .is-readonly>.wg-content>textarea[readonly]{cursor:default}#loco-editor .is-editable>.wg-content[dir=RTL] .ace_editor .ace_line{direction:ltr;unicode-bidi:bidi-override}#loco-editor .wg-split-x>nav.wg-tabs{white-space:nowrap;text-align:center;cursor:default}#loco-editor .wg-split-x>nav.wg-tabs>a{display:inline-block;padding:.5em 1em;margin-top:.2em;color:#000;text-decoration:none;-webkit-border-radius:.2em .2em 0 0;-moz-border-radius:.2em .2em 0 0;-ms-border-radius:.2em .2em 0 0;-o-border-radius:.2em .2em 0 0;border-radius:.2em .2em 0 0;background-color:#f3f7fd}#loco-editor .wg-split-x>nav.wg-tabs>a:hover{background-color:#fff}#loco-editor .wg-split-x>nav.wg-tabs>a.active{background-color:#3db63d;color:#fff}#loco-editor .wg-split>div>.has-nav>.wg-body{margin-top:0px}#loco-editor .wg-dead{visibility:hidden}@media all and (max-width: 768px){#loco-editor .wg-split-x>div>.not-first>*{margin-left:20px}#loco-editor .wg-split-y>div>.not-first>*{margin-top:20px}#loco-editor .wg-split-x>div>.not-first:before{width:20px}#loco-editor .wg-split-y>div>.not-first:before{height:20px}#loco-editor .is-table .wg-thead header{padding-left:20px}}#loco-editor .is-table .po-fuzzy{color:#b59829;font-weight:bold}#loco-editor .is-table .po-empty{color:#1f507a;font-weight:bold}#loco-editor .is-table .po-flagged{color:#bd2c00}#loco-editor .is-table .wg-cols>div:first-child>div:before{font-family:loco;vertical-align:inherit;display:inline-block;content:" ";width:1.3em;line-height:1}#loco-editor .is-table .wg-cols>div:first-child>div.po-fuzzy:before{content:""}#loco-editor .is-table .wg-cols>div:first-child>div.po-flagged:before{content:""}#loco-editor .is-table .wg-cols>div:first-child>div.po-comment:before{content:"";color:#999}#loco-editor .is-table .wg-cols>div:first-child>div.po-unsaved:before{content:"";color:#f1d040}#loco-editor .is-table .wg-cols>div:first-child>div.selected:before{color:#fff !important}#loco-editor .wg-cell p.notes{font-weight:normal;line-height:normal}#loco-editor .wg-cell p.notes>*{display:inline-block}#loco-editor .wg-cell p.notes>span{border:1px solid transparent;border-left:none}#loco-editor .wg-cell p.notes>mark{color:#fff;border-radius:2px;background-color:silver;border:1px solid silver;padding:0 .3em}#loco-editor .wg-cell p.notes>mark.tag{color:#999;background-color:#eee}#loco-editor .is-table .wg-cols>div>div>mark{display:inline-block;vertical-align:text-bottom;font:inherit;font-weight:normal;color:#fff;border-radius:2px;font-size:90%;line-height:1;padding:.2em .3em;background-color:rgba(0,0,0,.25)}#loco-editor .is-table .wg-cols>div>div.selected.po-flagged{background-color:#bd2c00}#loco-editor .is-table .wg-cols>div>div.selected.po-fuzzy{background-color:#b59829}#loco-editor .is-table .wg-cols>div>div.selected.po-empty{background-color:#999}#loco-editor #po-list .wg-content{padding:0}#loco-editor #po-source>.wg-body>.has-title>header{background:transparent;font-weight:normal;float:left;clear:none;min-width:3.4em}#loco-editor #po-source>.wg-body>.has-title>.wg-content{clear:none}#loco-editor .wg-cell>p.notes,#loco-editor .wg-cell>p.errors{font-size:13px;line-height:1.4em;margin:0;padding:5px 10px;cursor:default !important}#loco-editor .wg-cell>p.errors{color:#c00}#loco-editor .wg-cell>p.notes{color:#333;white-space:pre-line}#loco-editor .has-title>header{line-height:normal;padding:6px}#loco-editor .has-title>header .lang{margin-right:6px;margin-bottom:1px}#loco-editor .trg-rtl #po-list-tbody .wg-cols>div[for=po-list-col-target]>div,#loco-editor .src-rtl #po-list-tbody .wg-cols>div[for=po-list-col-source]>div{direction:rtl;padding-left:0;padding-right:10px;text-align:right}#loco-editor #po-source>.wg-body>.has-title>h2{min-width:4.5em}#loco-editor .is-table .wg-td{font-size:13px}#loco-editor-inner{min-height:600px;font-size:14px;clear:both}#loco-editor-inner>div.loco-loading{height:100px;background:transparent url(../img/spin-editor-button.gif?v=2.3.2) center 20px no-repeat}#loco-editor-inner h2{color:#000;line-height:1}#loco.wrap #loco-toolbar{font-size:14px;height:50px}#loco.wrap #loco-toolbar form{display:block;float:left;clear:none;padding:0;margin:0}#loco.wrap #loco-toolbar form.aux{float:right;margin-right:5px}#loco.wrap #loco-toolbar fieldset{display:block;position:relative;float:left;clear:none}#loco.wrap #loco-toolbar button,#loco.wrap #loco-toolbar input[type=text]{display:block;position:relative;float:left;clear:none;margin:5px 0 0 5px;height:36px;text-align:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#loco.wrap #loco-toolbar input[type=text]{padding:0 10px;font-size:14px;line-height:normal}#loco.wrap #loco-toolbar .invalid input[type=text]:focus{border-color:#c00;-webkit-box-shadow:0 0 2px rgba(153,0,0,.5);-moz-box-shadow:0 0 2px rgba(153,0,0,.5);box-shadow:0 0 2px rgba(153,0,0,.5)}#loco.wrap #loco-toolbar .loco-clearable{padding:0 20px}#loco.wrap #loco-toolbar .loco-clearable.invalid a.clear:before{color:#c00}#loco.wrap #loco-toolbar .loco-clearable a.clear{right:25px;line-height:2}#loco.wrap #loco-toolbar .loco-clearable a.clear:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#loco.wrap #loco-toolbar .loco-clearable a.clear:hover:before{color:#c00}#loco.wrap #loco-toolbar .loco-clearable a.clear:active:before{color:#000}#loco.wrap #loco-toolbar button,#loco.wrap #loco-toolbar input[type=text]{border-color:#aaa}#loco.wrap #loco-toolbar button.has-icon:before{width:16px;padding:0}#loco.wrap #loco-toolbar button.has-icon.loco-loading:before{content:" ";height:16px;background:transparent url(../img/spin-editor-button.gif?v=2.3.2) 0 0 no-repeat}#loco.wrap #loco-toolbar button.only-icon{width:40px}
pub/css/podiff.css CHANGED
@@ -1 +1 @@
1
- #loco.wrap .revisions-diff{padding:10px;min-height:20px}#loco.wrap table.diff{border-collapse:collapse}#loco.wrap table.diff td{white-space:nowrap;overflow:hidden;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;padding:2px}#loco.wrap table.diff td>span{color:#aaa}#loco.wrap table.diff td>span:after{content:". "}#loco.wrap table.diff tbody{border-top:1px dashed #ccc}#loco.wrap table.diff tbody:first-child{border-top:none}#loco.wrap .revisions.loading .diff-meta{color:#eee}#loco.wrap .revisions.loading .loading-indicator span.spinner{visibility:visible;background:#fff url(../img/spin-modal.gif?v=2.3.1) center center no-repeat}#loco.wrap .revisions-meta{clear:both;padding:10px 12px;margin:0;position:relative;top:10px}#loco.wrap .revisions-meta .diff-meta{clear:none;float:left;width:50%;padding:0;min-height:auto}#loco.wrap .revisions-meta .diff-meta button{margin-top:5px}#loco.wrap .revisions-meta .diff-meta-current{float:right;text-align:right}#loco.wrap .revisions-meta time{color:#72777c}#loco.wrap .revisions-control-frame{margin:10px 0}#loco.wrap .revisions-diff-frame{margin-top:20px}
1
+ #loco.wrap .revisions-diff{padding:10px;min-height:20px}#loco.wrap table.diff{border-collapse:collapse}#loco.wrap table.diff td{white-space:nowrap;overflow:hidden;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;padding:2px}#loco.wrap table.diff td>span{color:#aaa}#loco.wrap table.diff td>span:after{content:". "}#loco.wrap table.diff tbody{border-top:1px dashed #ccc}#loco.wrap table.diff tbody:first-child{border-top:none}#loco.wrap .revisions.loading .diff-meta{color:#eee}#loco.wrap .revisions.loading .loading-indicator span.spinner{visibility:visible;background:#fff url(../img/spin-modal.gif?v=2.3.2) center center no-repeat}#loco.wrap .revisions-meta{clear:both;padding:10px 12px;margin:0;position:relative;top:10px}#loco.wrap .revisions-meta .diff-meta{clear:none;float:left;width:50%;padding:0;min-height:auto}#loco.wrap .revisions-meta .diff-meta button{margin-top:5px}#loco.wrap .revisions-meta .diff-meta-current{float:right;text-align:right}#loco.wrap .revisions-meta time{color:#72777c}#loco.wrap .revisions-control-frame{margin:10px 0}#loco.wrap .revisions-diff-frame{margin-top:20px}
pub/css/poview.css CHANGED
@@ -1 +1 @@
1
- .js #loco.wrap .loco-loading{min-height:100px;background:#fff url(../img/spin-modal.gif?v=2.3.1) center center no-repeat}.js #loco.wrap .loco-loading ol.msgcat{display:none}#loco.wrap #loco-po{padding-right:0;overflow:auto}#loco.wrap ol.msgcat{margin-left:3em;padding-top:1em;border-top:1px dashed #ccc}#loco.wrap ol.msgcat:first-child{padding-top:0;border-top:none}#loco.wrap ol.msgcat li{color:#aaa;margin:0;padding:0 0 0 1em;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;border-left:1px solid #eee}#loco.wrap ol.msgcat li>*{color:#333;white-space:pre}#loco.wrap ol.msgcat li>.po-comment{color:#3cc200}#loco.wrap ol.msgcat li>.po-refs{color:#0073aa}#loco.wrap ol.msgcat li>.po-refs a{color:inherit;text-decoration:none}#loco.wrap ol.msgcat li>.po-refs a:hover{text-decoration:underline}#loco.wrap ol.msgcat li>.po-flags{color:#77904a}#loco.wrap ol.msgcat li>.po-flags em{font-style:normal}#loco.wrap ol.msgcat li>.po-word{color:#000}#loco.wrap ol.msgcat li>.po-junk{font-style:italic;color:#ccc}#loco.wrap ol.msgcat li>.po-string>span{color:#c931c7}#loco.wrap form.loco-filter{top:0;right:0;position:absolute}#loco.wrap .loco-invalid form.loco-filter input[type=text]:focus{border-color:#c00;-webkit-box-shadow:0 0 2px rgba(153,0,0,.5);-moz-box-shadow:0 0 2px rgba(153,0,0,.5);box-shadow:0 0 2px rgba(153,0,0,.5)}#loco.wrap .loco-invalid ol.msgcat{list-style-type:none}#loco.wrap .loco-invalid ol.msgcat li{color:#000}.loco-modal{min-width:90% !important;min-height:100px}#loco-po-ref ol li{color:#aaa;margin:0;white-space:pre;padding:0 0 0 1em;font:normal 12px/17px Consolas,Monaco,monospace;background:transparent;border-left:1px solid #eee}#loco-po-ref ol li code{margin:0;padding:0;display:inline;background:inherit}#loco-po-ref ol li.highlighted{color:#666;background-color:#f8eec7}#loco-po-ref ol li.highlighted code.T_CONSTANT_ENCAPSED_STRING{color:#c931c7}
1
+ .js #loco.wrap .loco-loading{min-height:100px;background:#fff url(../img/spin-modal.gif?v=2.3.2) center center no-repeat}.js #loco.wrap .loco-loading ol.msgcat{display:none}#loco.wrap #loco-po{padding-right:0;overflow:auto}#loco.wrap ol.msgcat{margin-left:3em;padding-top:1em;border-top:1px dashed #ccc}#loco.wrap ol.msgcat:first-child{padding-top:0;border-top:none}#loco.wrap ol.msgcat li{color:#aaa;margin:0;padding:0 0 0 1em;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;border-left:1px solid #eee}#loco.wrap ol.msgcat li>*{color:#333;white-space:pre}#loco.wrap ol.msgcat li>.po-comment{color:#3cc200}#loco.wrap ol.msgcat li>.po-refs{color:#0073aa}#loco.wrap ol.msgcat li>.po-refs a{color:inherit;text-decoration:none}#loco.wrap ol.msgcat li>.po-refs a:hover{text-decoration:underline}#loco.wrap ol.msgcat li>.po-flags{color:#77904a}#loco.wrap ol.msgcat li>.po-flags em{font-style:normal}#loco.wrap ol.msgcat li>.po-word{color:#000}#loco.wrap ol.msgcat li>.po-junk{font-style:italic;color:#ccc}#loco.wrap ol.msgcat li>.po-string>span{color:#c931c7}#loco.wrap form.loco-filter{top:0;right:0;position:absolute}#loco.wrap .loco-invalid form.loco-filter input[type=text]:focus{border-color:#c00;-webkit-box-shadow:0 0 2px rgba(153,0,0,.5);-moz-box-shadow:0 0 2px rgba(153,0,0,.5);box-shadow:0 0 2px rgba(153,0,0,.5)}#loco.wrap .loco-invalid ol.msgcat{list-style-type:none}#loco.wrap .loco-invalid ol.msgcat li{color:#000}.loco-modal{min-width:90% !important;min-height:100px}#loco-po-ref ol li{color:#aaa;margin:0;white-space:pre;padding:0 0 0 1em;font:normal 12px/17px Consolas,Monaco,monospace;background:transparent;border-left:1px solid #eee}#loco-po-ref ol li code{margin:0;padding:0;display:inline;background:inherit}#loco-po-ref ol li.highlighted{color:#666;background-color:#f8eec7}#loco-po-ref ol li.highlighted code.T_CONSTANT_ENCAPSED_STRING{color:#c931c7}
pub/css/skins/blue.css CHANGED
@@ -1 +1 @@
1
- .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(9,100,132,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#096484}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/blue/spin-primary-button.gif?v=2.3.1) 0 0 no-repeat !important}
1
+ .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(9,100,132,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#096484}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/blue/spin-primary-button.gif?v=2.3.2) 0 0 no-repeat !important}
pub/css/skins/coffee.css CHANGED
@@ -1 +1 @@
1
- .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(199,165,137,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#c7a589}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/coffee/spin-primary-button.gif?v=2.3.1) 0 0 no-repeat !important}
1
+ .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(199,165,137,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#c7a589}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/coffee/spin-primary-button.gif?v=2.3.2) 0 0 no-repeat !important}
pub/css/skins/ectoplasm.css CHANGED
@@ -1 +1 @@
1
- .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(163,183,69,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#a3b745}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/ectoplasm/spin-primary-button.gif?v=2.3.1) 0 0 no-repeat !important}
1
+ .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(163,183,69,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#a3b745}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/ectoplasm/spin-primary-button.gif?v=2.3.2) 0 0 no-repeat !important}
pub/css/skins/light.css CHANGED
@@ -1 +1 @@
1
- .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(136,136,136,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#888}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/light/spin-primary-button.gif?v=2.3.1) 0 0 no-repeat !important}
1
+ .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(136,136,136,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#888}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/light/spin-primary-button.gif?v=2.3.2) 0 0 no-repeat !important}
pub/css/skins/midnight.css CHANGED
@@ -1 +1 @@
1
- .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(225,77,67,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#e14d43}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/midnight/spin-primary-button.gif?v=2.3.1) 0 0 no-repeat !important}
1
+ .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(225,77,67,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#e14d43}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/midnight/spin-primary-button.gif?v=2.3.2) 0 0 no-repeat !important}
pub/css/skins/ocean.css CHANGED
@@ -1 +1 @@
1
- .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(158,186,160,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#9ebaa0}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/ocean/spin-primary-button.gif?v=2.3.1) 0 0 no-repeat !important}
1
+ .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(158,186,160,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#9ebaa0}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/ocean/spin-primary-button.gif?v=2.3.2) 0 0 no-repeat !important}
pub/css/skins/sunrise.css CHANGED
@@ -1 +1 @@
1
- .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(221,130,59,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#dd823b}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/sunrise/spin-primary-button.gif?v=2.3.1) 0 0 no-repeat !important}
1
+ .wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(221,130,59,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#dd823b}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}form button.loco-loading.button-primary[disabled]:before{background:transparent url(../../img/skins/sunrise/spin-primary-button.gif?v=2.3.2) 0 0 no-repeat !important}
pub/js/min/admin.js CHANGED
@@ -1,47 +1,47 @@
1
- (function(v,z,h,S){var n=function(){var c={};return{register:function(f,h){c[f]=h},require:function(f,h){var p=c[f];if(!p)throw Error('CommonJS error: failed to require("'+h+'")');return p}}}();n.register("$1",function(c,f,h){function p(b){var e=typeof b;if("string"===e)if(/[^ <>!=()%^&|?:n0-9]/.test(b))console.error("Invalid plural: "+b);else return new Function("n","return "+b);"function"!==e&&(b=function(a){return 1!=a});return b}c.init=function(b){function e(d,b,e){return(d=a[d])&&d[e]?d[e]:b||
2
- ""}b=p(b);var a={};return{_:function(a){return e(a,a,0)},_x:function(a,b){return e(b+"\u0004"+a,a,0)},_n:function(a,m,k){k=Number(b(k));isNaN(k)&&(k=0);return e(a,k?m:a,k)},load:function(d){a=d||{};return this},pluraleq:function(a){b=p(a);return this}}};return c}({},v,z));n.register("$2",function(c,f,h){Array.prototype.indexOf||(Array.prototype.indexOf=function(c){if(null==this)throw new TypeError;var b,e=Object(this),a=e.length>>>0;if(0===a)return-1;b=0;1<arguments.length&&(b=Number(arguments[1]),
3
- b!=b?b=0:0!=b&&Infinity!=b&&-Infinity!=b&&(b=(0<b||-1)*Math.floor(Math.abs(b))));if(b>=a)return-1;for(b=0<=b?b:Math.max(a-Math.abs(b),0);b<a;b++)if(b in e&&e[b]===c)return b;return-1});return c}({},v,z));n.register("$3",function(c,f,h){c.trim=function(c,b){for(b||(b=" \n");c&&-1!==b.indexOf(c.substr(0,1));)c=c.substr(1);for(;c&&-1!==b.indexOf(c.substr(-1));)c=c.substr(0,c.length-1);return c};c.sprintf=function(c){var b=0,e,a=[].slice.call(arguments,1);return c.replace(/%(s|u|%)/g,function(d,m){if("%"===
4
- m)return"%";e=a[b++];return String(e)||""})};return c}({},v,z));n.register("$48",function(c,f,h){function p(){var b=a;d&&(b="("+d+") "+b);h.title=b}function b(d){d||(d=e);d!==a&&(a=d,p())}var e=h.title,a=e,d=0;c.set=function(a){b(a);return c};c.get=function(){return a};c.replace=function(d,e){b(a.replace(d,e));return c};c.badge=function(a){isNaN(a=Number(a))&&(a=0);a!==d&&(d=a,p());return c};return c}({},v,z));n.register("$42",function(c,f,h){function p(d){a||f._gat&&(a=_gat._createTracker(b,"loco"));
5
- if(a){var m=d.shift();a[m].apply(a,d)}else e&&e.push(d);return c}var b,e,a;c._init=function(a){if(b=a.code){e=f._gaq||(f._gaq=[]);e.push(["_setAccount",b]);e.push(["_gat._anonymizeIp"]);e.push(["_setDomainName",a.host]);e.push(["_trackPageview"]);a=h.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"==h.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var m=h.getElementsByTagName("script")[0];m.parentNode.insertBefore(a,m)}return c};c.event=function(a,
6
- b,e,g){return p(["_trackEvent",a||"",b||"",e||"",g||0])};c.page=function(a,b){var e={page:a||location.pathname+location.hash,title:b||n.require("$48","title.js").get()};return p(["_trackPageview",e])};return c}({},v,z));n.register("$43",function(c,f,h){function p(a,d){if(b)b[a](d);else f.ga&&ga(a,d);return c}var b,e;c._init=function(a){a.code&&(function(a,b,e,g,l,A,c){a.GoogleAnalyticsObject=l;a[l]=a[l]||function(){(a[l].q=a[l].q||[]).push(arguments)};a[l].l=1*new Date;A=b.createElement(e);c=b.getElementsByTagName(e)[0];
7
- A.async=1;A.src=g;c.parentNode.insertBefore(A,c)}(f,h,"script","//www.google-analytics.com/analytics.js","ga"),ga("create",a.code,{alwaysSendReferrer:!0,userId:a.uid}),ga("set","anonymizeIp",!0),a.custom&&p("set",a.custom),c.page(),ga(function(a){b=a}));return c};c.event=function(a,d,b,e){return p("send",{hitType:"event",eventCategory:a||"",eventAction:d||"",eventLabel:b||"",eventValue:Number(e||0)})};c.page=function(a,d){var b={hitType:"pageview",page:a||location.pathname+location.hash,title:d||
8
- n.require("$48","title.js").get()};b.location=location.protocol+"//"+location.hostname+b.page;e&&p("set",{referrer:e});e=b.location;return p("send",b)};c.reset=function(){e=location.href;var a={page:location.pathname+location.hash,title:n.require("$48","title.js").get(),location:e};p("set",a);return c};return c}({},v,z));n.register("$31",function(c,f,D){function p(a,e){h(a).click(function(a){b&&b.event(e,"click",this.getAttribute("href")||"");return!0});a=null;return c}var b,e=location.hostname,a=
9
- "/help"===location.pathname.substr(0,5);c.init=function(a){!b&&a&&(e=a.host||(a.host=e),b=a.legacy?n.require("$42","legacy.js"):n.require("$43","universal.js"),b._init(a));return c};c.link=function(d){for(var b=d.getAttribute("href");b&&"#"!==b;){if(0===b.indexOf("#"))return p(d,"anchor");if("/help"===b.substr(0,5)&&!a)d.setAttribute("target","_blank");else if(0===b.indexOf("http")||0===b.indexOf("//")){if(-1!==b.indexOf(e)&&/^(https?:)*\/\/([^\/]+)/.exec(b)&&e===RegExp.$2)break;d.setAttribute("target",
10
- "_blank");p(d,"external")}break}return c};c.page=function(){b&&b.page.apply(b,arguments);return c};c.event=function(){b&&b.event.apply(b,arguments);return c};c.reset=function(){b&&b.reset&&b.reset();return c};return c}({},v,z));n.register("$36",function(c,f,n){function p(a){return 27===a.keyCode&&r&&w?(I(),a.preventDefault(),!1):!0}function b(){if(r){var a=f.innerWidth,d=f.innerHeight;a!==H&&(H=a,K(u));d!==y&&(y=d,s&&e())}return!0}function e(){var a=m.outerHeight(!0)-s.clientHeight;s.style.maxHeight=
11
- String(y-a)+"px"}function a(a){a?(l.show(),k.addClass("has-title")):(l.hide(),k.removeClass("has-title"))}var d,m,k,g,l,A,B,s,r=!1,w=!1,q=!1,C,E,H,u,y,F=c.init=function(){if(!d){d=h('<div id="overlay"></div>');m=h('<div class="overlay-frame"></div>');k=h('<div class="overlay-container"></div>');l=h('<div class="overlay-title"><span class="icon"></span><span class="title">Untitled</span></div>');A=h("<nav></nav>");B=h('<a class="overlay-close" href="#"><span>x</span></a>');g=h('<div class="overlay-bg"></div>');
12
- d.append(m.append(k)).append(g).prependTo(n.body);h(n).on("keydown",p);h(f).resize(b);H=f.innerWidth;y=f.innerHeight;E=k.outerWidth(!0)-k.width()+(m.innerWidth()-m.width());C=parseInt(k.css("width"));if(!C||isNaN(C))C=k.width();A.hide().prependTo(m);l.append(B.hide()).hide().prependTo(m);d.hide()}return d},K=c.width=function(a){var d=F();if(null===a)m.css("width",""),k.css("width","");else{a=a||C||640;x=a+E;u=a;var g=H;x>g?(x=g,a=x-E,d.addClass("spill")):d.removeClass("spill");m.css("width",x+"px");
13
- k.css("width",a+"px")}return c};c.autoSize=function(){var a=F(),d=C||0;k.children().each(function(a,g){d=Math.max(d,h(g).outerWidth(!0))});K(d);if(s=a.find("div.overlay-scroll")[0])y=f.innerHeight,e();return c};c.css=function(a){F().attr("class",a);return c};c.think=function(){F().addClass("loading");return c};c.unthink=function(){F().removeClass("loading");return c};c.html=function(a){F();f.innerShiv&&(a=innerShiv(a,!1));return k.html(a)};c.append=function(a){F();a instanceof jQuery||(a=h(a));k.append(a);
14
- return c};var I=c.close=function(a){if(r){var g=function(){F().hide();h(n.body).removeClass("has-overlay");r=!1;k.html("");r=null;d.trigger("overlayClosed",[c])};null==a&&(a=300);d.trigger("overlayClosing",[c]);a?d.fadeOut(a,g):g()}return c};c.title=function(d,g){F();var b="",e=l.find("span");g&&/^lang lang-(\w+)/.exec(g)&&(b=RegExp.$1);e.eq(0).attr("class",g||"no-icon").attr("lang",b);q=d||"";e.eq(1).text(q);null!=d?a(!0):w||a(!1);return c};c.enableClose=function(){F();w=!0;B.off("click").on("click",
15
- function(){I();return!1});a(!0);B.show();return c};c.disableClose=function(){F();w=!1;B.hide();r&&q||a(!1);return c};c.enableNav=function(a){A.append(a);A.show();return c};c.disableNav=function(){A.html("").hide();return c};c.open=function(){F();k.html("");K(C);d.attr("class","");h(n.body).addClass("has-overlay");F().show();r||(r=!0,b());c.title(null);w&&a(!0);d.trigger("overlayOpened",[c]);return c};c.active=function(){return r};c.listen=function(a){F().on("overlayClosed",a);return c};c.unlisten=
16
- function(a){F().off("overlayClosed",a);return c};return c}({},v,z));n.register("$11",function(c,f,n){function p(a,d){this.$element=h(a);this.options=d;this.enabled=!0;this.fixTitle()}c.init=function(a,d){var m={fade:!0,offset:5,delayIn:b,delayOut:e,anchor:a.attr("data-anchor"),gravity:a.attr("data-gravity")||"s"};d&&(m=h.extend({},m,d));a.tipsy(m)};c.delays=function(a,d){b=a||150;e=d||100};c.kill=function(){h("div.tipsy").remove()};c.text=function(a,d){d.data("tipsy").setTitle(a)};var b,e;c.delays();
17
- h(n.body).on("overlayOpened overlayClosing",function(a){c.kill();return!0});p.prototype={show:function(){var a=this.getTitle();if(a&&this.enabled){var d=this.tip();d.find(".tipsy-inner")[this.options.html?"html":"text"](a);d[0].className="tipsy";d.remove().css({top:0,left:0}).prependTo(n.body);var a=(a=this.options.anchor)?this.$element.find(a):this.$element,a=h.extend({},a.offset(),{width:a[0].offsetWidth,height:a[0].offsetHeight}),b=d[0].offsetWidth,e=d[0].offsetHeight,g="function"==typeof this.options.gravity?
18
- this.options.gravity.call(this.$element[0]):this.options.gravity,l;switch(g.charAt(0)){case "n":l={top:a.top+a.height+this.options.offset,left:a.left+a.width/2-b/2};break;case "s":l={top:a.top-e-this.options.offset,left:a.left+a.width/2-b/2};break;case "e":l={top:a.top+a.height/2-e/2,left:a.left-b-this.options.offset};break;case "w":l={top:a.top+a.height/2-e/2,left:a.left+a.width+this.options.offset}}2==g.length&&("w"==g.charAt(1)?l.left=a.left+a.width/2-15:l.left=a.left+a.width/2-b+15);d.css(l).addClass("tipsy-"+
19
  g);d.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+g.charAt(0);this.options.className&&d.addClass("function"==typeof this.options.className?this.options.className.call(this.$element[0]):this.options.className);d.addClass("in")}},hide:function(){this.tip().remove()},fixTitle:function(){var a=this.$element,d=a.attr("title")||"";(d||"string"!==typeof a.attr("original-title"))&&a.attr("original-title",d).removeAttr("title")},getTitle:function(){var a,d=this.$element,b=this.options;this.fixTitle();
20
  "string"==typeof b.title?a=d.attr("title"==b.title?"original-title":b.title):"function"==typeof b.title&&(a=b.title.call(d[0]));return(a=(""+a).replace(/(^\s*|\s*$)/,""))||b.fallback},setTitle:function(a){var d=this.$element;d.attr("default-title")||d.attr("default-title",this.getTitle());null==a&&(a=d.attr("default-title")||this.getTitle());d.attr("original-title",a);if(this.$tip)this.$tip.find(".tipsy-inner")[this.options.html?"html":"text"](a)},tip:function(){this.$tip||(this.$tip=h('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>'),
21
- this.$tip.data("tipsy-pointee",this.$element[0]));return this.$tip},validate:function(){this.$element[0].parentNode||(this.hide(),this.options=this.$element=null)},enable:function(){this.enabled=!0},disable:function(){this.hide();this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled}};h.fn.tipsy=function(a){function d(d){var g=h.data(d,"tipsy");g||(g=new p(d,h.fn.tipsy.elementOptions(d,a)),h.data(d,"tipsy",g));return g}function b(){var g=d(this),e=a.delayIn;g.hoverState="in";0==e?g.show():
22
- (g.fixTitle(),setTimeout(function(){"in"==g.hoverState&&g.show()},e))}function e(){var g=d(this),b=a.delayOut;g.hoverState="out";0==b?g.hide():(g.tip().removeClass("in"),setTimeout(function(){"out"==g.hoverState&&g.hide()},b))}a=h.extend({},h.fn.tipsy.defaults,a);a.live||this.each(function(){d(this)});if("manual"!=a.trigger){var g=a.live?"live":"bind",l="hover"==a.trigger?"mouseleave":"blur";this[g]("hover"==a.trigger?"mouseenter":"focus",b)[g](l,e)}return this};h.fn.tipsy.defaults={className:null,
23
- delayIn:0,delayOut:0,fade:!1,fallback:"",gravity:"n",html:!1,live:!1,offset:0,opacity:0.8,title:"title",trigger:"hover",anchor:null};h.fn.tipsy.elementOptions=function(a,d){return h.metadata?h.extend({},d,h(a).metadata()):d};h.fn.tipsy.autoNS=function(){return h(this).offset().top>h(n).scrollTop()+h(f).height()/2?"s":"n"};h.fn.tipsy.autoWE=function(){return h(this).offset().left>h(n).scrollLeft()+h(f).width()/2?"e":"w"};h.fn.tipsy.autoBounds=function(a,d){return function(){var b=d[0],e=1<d.length?
24
- d[1]:!1,g=h(n).scrollTop()+a,l=h(n).scrollLeft()+a,A=h(this);A.offset().top<g&&(b="n");A.offset().left<l&&(e="w");h(f).width()+h(n).scrollLeft()-A.offset().left<a&&(e="e");h(f).height()+h(n).scrollTop()-A.offset().top<a&&(b="s");return b+(e?e:"")}};return c}({},v,z));n.register("$8",function(c,f,n){c.listen=function(c,b){function e(){s[k?"show":"hide"]()}function a(a){B&&c.setAttribute("size",2+a.length);k=a;e();return a}function d(){g=null;b(k)}function m(){var b=c.value;A&&b===A&&(b="");b!==k&&
25
- (g&&clearTimeout(g),a(b),l?g=setTimeout(d,l):d())}var k,g;c=c instanceof jQuery?c[0]:c;var l=150,A=f.attachEvent&&c.getAttribute("placeholder"),B=1===Number(c.size),s=h('<a href="#clear" tabindex="-1" class="icon clear"><span>clear</span></a>').click(function(){c.value="";m();return!1});a(c.value);h(c).on("input blur focus",function(){m();return!0}).after(s);e();return{delay:function(a){l=a},ping:function(b){b?(g&&clearTimeout(g),b=c.value,A&&b===A&&(b=""),a(b),d(),b=void 0):b=m();return b},val:function(b){if(null==
26
- b)return k;g&&clearTimeout(g);c.value=a(b);e()},el:function(){return c},blur:function(a){return h(c).on("blur",a)}}};return c}({},v,z));n.register("$35",function(c,f,n){function p(a,b,m,c,g){function l(){s&&clearTimeout(s);r&&r.fadeOut(400,function(){h(this).remove();r=null});return!1}function A(){B();-1!==c&&(s=setTimeout(l,c||2E3));r.off("mouseleave").on("mouseenter",B)}function B(){s&&clearTimeout(s);s=null;r.off("mouseenter").on("mouseleave",A)}var s;e||(e=n.createElement("div"),e.id="growls",
27
- n.body.appendChild(e));var r=h('<div class="growl growl-'+m+'"><div><a class="close" href="#"><span>X</span></a><span class="badge"></span><p class="message"></p><small class="caption"></small></div></div>');r.find("p").text(a||"Empty message");b?r.find("small").text(b):r.find("small").remove();if(g.length){g.push({label:"Cancel",callback:l,css:"cancel"});var w,q=h('<form action="#" class="dialog"></form>');b=function(a,b){w=h('<input type="button" value="'+b.label+'" class="butt '+(b.css||"")+'" />');
28
- w.click(function(a){"function"===typeof b.callback&&b.callback(a,{close:l})});q.append(w);return w};for(a=0;a<g.length;a++)b(a,g[a]);r.append(q)}h(e).prepend(r.hide().fadeIn(400));r.find("a").click(l);A()}var b,e;c.init=function(){if(!b)return b=f.alert,f.alert=function(a){a=String(a).split("\n");var b=a[1]&&a.slice(1).join("\n");c.alert(a[0],b)},c};c.debug=function(a){b(a);return c};c.alert=function(a,d,e,c,g){try{return p(a,d||"",e||"alert",c||4E3,g||[]),!0}catch(l){return a+="\n\n--\n"+(l.message||
29
- l),b.call(f,a),!1}};c.success=function(a,b,e){return c.alert(a,b,"success",e||2E3)};c.dialog=function(a,b,e,k){return c.alert(a,b,k||"alert",-1,e)};return c}({},v,z));n.register("$22",function(c,f,D){function p(a){var d;(d=a.alert)&&alert(d);(d=a.success)&&n.require("$35","growl.js").success.apply(null,d.push?d:[d]);if(d=a.download)f.location.assign(d);else if(d=a.redirect)if(0===d.indexOf("/modal/"))a.modal={url:d};else return f.location.assign(d),!1;else if(a.reload)return f.location.reload(),!1;
30
- (d=a.modal)&&n.require("$32","modal.js").replace(d);(d=a.async)&&b(d.job_id,d.title)}function b(a,b){var e=n.require("$36","overlay.js");e.open().disableClose().css("modal-processing").html('<div class="wrap"><h2>'+(b||"Please wait")+"</h2></div>");n.require("$37","async.js").init(a).delay(500).timeout(2E4).listen("error",function(a){e.css("modal-error").enableClose().title("Error");e.html("<h2>"+(a||"Unknown error")+"</h2>")}).listen("complete",function(a){e.close();e=null;a&&p(a)}).start()}var e=
31
- {401:"Authorization Required",422:"Invalid data sent to server",404:"Not Found",500:"Server Error",502:"Bad Gateway",503:"Service unavailable",504:"Gateway timeout"};c.jsonLink=function(a){if(!a)return"";a=a.split("?");a[0]=a[0].replace(/(\.[a-z0-9]{1,4})?$/i,".json");return a.join("?")};c.errorData=function(a,b,c){var k,g;c=a.responseText;b=a.status;if(!c&&0===b)return null;try{k=h.parseJSON(c)||{}}catch(l){k={},g=e[a.status]||l.message||l}k.error=g||k.error||k.statusText||a.statusText||e[b]||"Unknown Error";
32
- return k};c.ajax=function(a,b,m,k){function g(a){function b(a){var g=a&&a[0];if(!g||D.contains&&!D.contains(g))a=h(D.body);return a}var g=b(k);g.trigger("locoAjaxSuccess",[a]);var d=a.events;if(d&&d.length)for(var e,q=n.require("$31","ga.js");e=d.shift();)g=b(g),g.trigger(e,[a]),q.event("ajax",e);if(!1===p(a))return!1;m&&m();return!0}function l(l,k,s){if("abort"!==k){var r=l.status,w,q=a.statusCode;if(200===r||!q||!q[r])if(401===r)n.require("$32","modal.js").load("/modal/user/ping.json?r="+encodeURIComponent(location.pathname),
33
- e[r]);else{if("parsererror"===k)f.console&&console.error&&console.error(r,l.responseText),w=404===r?"Ajax service not found":/^\s+Fatal error/.test(l.responseText)?"Fatal server error from Ajax request":"Bad Ajax response";else{var C=c.errorData(l,k,s);C&&C.error&&(w=C.error)}"function"===typeof b&&!1===b(null,w,r,l)?m&&m():C&&C.data&&!g(C.data)||(alert(w||"Unknown Ajax error"),m&&m())}}}(a.headers||(a.headers={}))["X-Loco-Csrf"]=f.loco&&G.csrf||"";a.error=l;a.success=function(a,c,s){if(!a||"object"!==
34
- typeof a)return l(s,"unknown");(a.status||a.error)&&alert(a.error||a.statusText||s.statusText||e[a.status]||"Unknown Error");"function"===typeof b&&!1===b(a&&a.data?a.data:a,null,c,s)?m&&m():a&&a.data?g(a.data):m&&m()};-1!==a.url.indexOf(".json")&&(a.dataType="json");return h.ajax(a)};return c}({},v,z));n.register("$37",function(c,f,h){c.init=function(c){function b(a,b){for(var g=-1,d,e=q[a]||[];++g<e.length;)(d=e[g])&&d.apply&&d.apply(null,b||[])}function e(){var a=B+"ms",g=Math.round(B/1E3);1<g&&
35
- (a=g+" seconds");a="Job timeout after "+a;m();d();b("error",[a])}function a(a,e){if(!a||e)a={state:"error",message:e};try{switch(a.state){case "error":throw Error(a.message||"Unknown error tracking job progress");case "queued":case "starting":case "progress":var q=a.progress||0,r=a.message,y=a.state;q!==l&&(m(),l=q);b("progress",[l,r,y]);g();break;case "done":var A=a.data,c=a.message;l=100;m();d();b("complete",[A,c]);break;default:throw Error("Unexpected job status: "+a.state);}}catch(w){q=w.message||
36
- w,m(),d(),b("error",[q])}}function d(){r&&(clearTimeout(r),r=null)}function m(){s&&(clearTimeout(s),s=null)}function k(){var b={dataType:"json",url:A};n.require("$22","http.js").ajax(b,a)}function g(){d();r=setTimeout(k,w);s||(s=setTimeout(e,B))}var l=0,A="/ajax/async/poll/"+c+".json",B=1E4,s,r,w=100,q={error:[],complete:[],progress:[]};return{start:function(){m();g();return this},stop:function(){m();d();return this},delay:function(a){w=a;return this},timeout:function(a){B=a;return this},listen:function(a,
37
- b){var g=q[a];if(g)g.push(b);else throw Error(a+" is not a valid async event");return this}}};return c}({},v,z));n.register("$32",function(c,f,D){function p(a){a.stopPropagation();a.preventDefault();return!1}function b(){l||(l=n.require("$36","overlay.js"),l.listen(m));return l}function e(){var a=s.length-1,b=s[a],g=h('<a class="has-icon icon-back" data-gravity="w">Back</a>').attr("href",b[0]).attr("title",b[1]).click(function(g){if(s[a]===b&&C())return n.require("$11","tooltip.js").kill(),p(g)});
38
- l.enableNav(g);n.require("$11","tooltip.js").init(g)}function a(a,b,g){a=a.split("#");var d=a[0],d=d+(-1===d.indexOf("?")?"?":"&"),d=d+(encodeURIComponent(b)+"="+encodeURIComponent(g));a[0]=d;return a.join("#")}function d(a,g){var d=b().autoSize(),q=d.init();n.require("$18","html.js").init(q);g&&g.lock&&d.disableClose();s.length&&e();q.find("[data-script]").each(function(a,b){b=h(b);for(var d=-1,e,q=b.attr("data-script").split(" ");++d<q.length;)e=q[d],B[e]?B[e](b,g||{}):alert("Unknown script "+e)});
39
- q.trigger("locoModalLoaded",[d,a||"",g||{}]);var l=q.find("form")[0],r;if(l)a:for(d=0;d<l.elements.length;d++)switch(q=l.elements[d],q.type){case "text":case "email":case "textarea":r=Number(q.getAttribute("tabindex"));if(isNaN(r)||100>r)continue a;h(q).focus();break a}}function m(){r=null;s=[];return!0}function k(a){var b=h(a.currentTarget),d=b.attr("data-modal");if("back"===d){if(C())return p(a);d="close"}if("close"===d){q();var e=b.attr("href");if(e&&-1!==e.indexOf("#!"))return!0}else{var l="submit"===
40
- a.type,r=b.attr("title")||b.attr("data-title"),e=b.attr("href")||b.attr("action"),A=l?b.serialize():"",b=l?b.attr("method"):"get";w(e,r,b,A,"modal "+(d||g(e)))}return p(a)}function g(a){return"http"===a.substr(0,4)?a.split("/").slice(3,6).join("-"):a.split("/").slice(1,4).join("-")}var l,A=n.require("$31","ga.js"),B={},s=[],r,w=c.load=function(g,e,q,y,m){var k=r;r=[].slice.call(arguments);k&&g!==k[0]&&(s.push(k),g=a(g,"r",k[0]));k=b();k.active()||k.open().css("modal").html('<div class="loading"></div>');
41
- k.title("Loading ..").disableClose().disableNav();k.think();var k=g.split("#"),B=k[1];B&&(g=k[0]);var k=n.require("$22","http.js"),C={type:q||"get",data:y||"",url:k.jsonLink(g)};k.ajax(C,function(a,b,c){var k=a&&a.html;if(!k)return a&&a.redirect?(r=s.pop()||null,w(a.redirect,e,q,y,m)):(a=h('<h3 class="error"></h3>').text(b||"Unknown error"),b=h('<footer class="buttonset"><a href="/" data-modal="close" class="has-icon icon-ok">Close</a></footer>'),a=h('<div class="basic"></div>').append(a).append(b),
42
- b="Error",c&&200!==c&&(b+=" "+c),l.unthink().enableClose().title(b).html("").append(a),n.require("$18","html.js").init(l.init())),!1;e=a.title||e||"Untitled";r&&(r[1]=e);l.unthink().enableClose().title(e,a.icon).width(null).css(m||"modal").autoSize().html(k);c=a.js||{};B&&(c["#"]=B);d(g,c);A.page(g,e);l.init().one("overlayClosed",function(){A.reset()});return!0});return c},q=c.close=function(){b().close();return c},C=c.back=function(){if(previous=s.pop())return r=s[s.length-2],w.apply(null,previous),
43
- !0};c.reload=function(){r&&w.apply(null,r)};c.postback=function(a){r&&(r[2]="post",r[3]=a,w.apply(null,r))};c.initLink=function(a){a.click(k)};c.initForm=function(a){h(a).submit(k)};c.replace=function(a){var e=b(),q=a&&a.html,l=a&&a.url,r=a&&a.title,A=a&&a.action;if(l)q=s.length-1,q=0<=q?s[q][0]:void 0,l===q?C():w(l,r,"","",a&&a.css||"modal "+g(l));else if(q)e.open().html(q),r&&e.enableClose().title(r),d("",a&&a.js);else if("function"===typeof c[A])c[A]();return e};c.find=function(a){return b().init().find(a)};
44
- c.script=function(a,b){if(b){if("function"!==typeof b.run)throw Error(a+" macro has no run function");B[a]=b.run;return c}return B[a]};c.hash=function(a){var b=a.hash;"#/modal/"===b.substr(0,8)&&(b=b.substr(1),a.hash="",c.replace({url:b}))};return c}({},v,z));n.register("$21",{"\u00e1":"a","\u00e0":"a","\u0103":"a","\u1eaf":"a","\u1eb1":"a","\u1eb5":"a","\u1eb3":"a","\u00e2":"a","\u1ea5":"a","\u1ea7":"a","\u1eab":"a","\u1ea9":"a","\u01ce":"a","\u00e5":"a","\u01fb":"a","\u00e4":"a","\u01df":"a","\u00e3":"a",
45
  "\u0227":"a","\u01e1":"a","\u0105":"a","\u0101":"a","\u1ea3":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1eb7":"a","\u1ead":"a","\u1e01":"a","\u01fd":"\u00e6","\u01e3":"\u00e6","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0107":"c","\u0109":"c","\u010d":"c","\u010b":"c","\u00e7":"c","\u1e09":"c","\u010f":"d","\u1e0b":"d","\u1e11":"d","\u0111":"d","\u1e0d":"d","\u1e13":"d","\u1e0f":"d","\u00f0":"d","\ua77a":"d","\u01c6":"\u01f3","\u00e9":"e","\u00e8":"e","\u0115":"e","\u00ea":"e","\u1ebf":"e","\u1ec1":"e",
46
  "\u1ec5":"e","\u1ec3":"e","\u011b":"e","\u00eb":"e","\u1ebd":"e","\u0117":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u0113":"e","\u1e17":"e","\u1e15":"e","\u1ebb":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u1e19":"e","\u1e1b":"e","\u1e1f":"f","\ua77c":"f","\u01f5":"g","\u011f":"g","\u011d":"g","\u01e7":"g","\u0121":"g","\u0123":"g","\u1e21":"g","\ua7a1":"g","\u1d79":"g","\u0125":"h","\u021f":"h","\u1e27":"h","\u1e23":"h","\u1e29":"h","\u0127":"h","\u210f":"h","\u1e25":"h","\u1e2b":"h",
47
  "\u1e96":"h","\u00ed":"i","\u00ec":"i","\u012d":"i","\u00ee":"i","\u01d0":"i","\u00ef":"i","\u1e2f":"i","\u0129":"i","\u012f":"i","\u012b":"i","\u1ec9":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u1e2d":"i","\u0135":"j","\u01f0":"j","\u1e31":"k","\u01e9":"k","\u0137":"k","\ua7a3":"k","\u1e33":"k","\u1e35":"k","\u013a":"l","\u013e":"l","\u013c":"l","\u0142":"l","\u1e37":"l","\u1e39":"l","\u1e3d":"l","\u1e3b":"l","\u0140":"l","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0144":"n","\u01f9":"n","\u0148":"n",
@@ -53,190 +53,190 @@ c.script=function(a,b){if(b){if("function"!==typeof b.run)throw Error(a+" macro
53
  "\u1f90":"\u03b7","\u1f21":"\u03b7","\u1f25":"\u03b7","\u1f95":"\u03b7","\u1f23":"\u03b7","\u1f93":"\u03b7","\u1f27":"\u03b7","\u1f97":"\u03b7","\u1f91":"\u03b7","\u03ae":"\u03b7","\u1f75":"\u03b7","\u1fc4":"\u03b7","\u1f74":"\u03b7","\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",
54
  "\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","\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",
55
  "\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","\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",
56
- "\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"});n.register("$7",function(c,f,h){c.init=function(){function c(a){return l[a]||a}function b(a,b,g,d){b=a.split(b);for(var e=b.length;0!==e--;)(a=b[e])&&null==d[a]&&(g.push(a),d[a]=!0);return g}function e(a){return b(String(a||"").toLowerCase().replace(k,c),g,[],{})}function a(a,
57
- d){for(var e=[],l={},w,q=d.length,C=g;0!==q--;)(w=d[q])&&b(String(w||"").toLowerCase().replace(k,c),C,e,l);m[a]=e}function d(a,b){var g=[],d=-1,e=m,q=e.length,l,c,k,f,y,h,p=a.length,n=b?!0:!1;a:for(;++d<q;)if(k=e[d],null!=k&&(f=k.length)){y=0;b:for(;y<p;y++){h=a[y];for(l=0;l<f;l++)if(c=k[l],0===c.indexOf(h))continue b;continue a}g.push(n?b[d]:d)}return g}var m=[],k=/[^a-z0-9]/g,g=/[\-_\s.?!;:,*^+=~`"(){}<>\[\]\/\\\u00a0\u1680\u180e\u2000-\u206f\u2e00-\u2e7f\u3000-\u303f]+/,l=n.require("$21","flatten.json");
58
- return{split:e,pull:function(a,b){return d(a,b)},find:function(a,b){return d(e(a),b)},add:function(a,b){m[a]=e(b)},push:function(b){a(m.length,b)},index:function(b,g){a(b,g)},size:function(){return m.length},clear:function(){m=[]},remove:function(a){m[a]=null}}};return c}({},v,z));n.register("$23",function(c,f,h){c.create=function(){var c=[],b=n.require("$7","fulltext.js").init();return{add:function(e,a){b.add(c.length,a);c.push(e);return this},find:function(e){return b.find(e,c)},clear:function(){c=
59
- [];b.clear();return this}}};return c}({},v,z));n.register("$10",function(c,f,D){function p(b){-1===b.indexOf("?")&&(b="/auto/"+b+".json?q=");this.url=b;this.dead={}}function b(){this.dict=n.require("$23","dict.js").create()}c.init=function(e){function a(){if("hint"!==K){var a=y.val()&&!(J&&J.val())&&null==f&&!q;D[a?"addClass":"removeClass"]("error")}}function d(a){J&&J.val(a)}function c(){v.show();var a=y.outerWidth(!1),b=y.outerHeight(!1),g=y.css("margin-top");g&&(g=parseInt(g),isNaN(g)||(b+=g));
60
- a-=2;v.css("top",b+"px").css("minWidth",a+"px");q=!0}function k(){v.hide();q=!1}function g(){v.html("");k();w=0;u=f=null}function l(b){g();var d;for(d=0;d<b.length;d++){var e=d,q=b[d],l=q.value,r=q.lang||l.lang,y=h('<span class="label"></span>').text(q.label),k=h('<div class="auto-comp-result"></div>'),s=void 0,E=void 0;if(E=q.icon)s=h("<span></span>").attr("class",E).appendTo(k),r?(s.attr("lang",r),q.lang=r):-1!==E.indexOf("lang-"+l)&&(s.attr("lang",l),q.lang=l);for(E in q)k.data(E,q[E]);k.append(y);
61
- A(e,k)}(w=b.length)?(C&&c(),B(0)):(B(null),a(),D.trigger("locoAutonone",[]))}function A(a,b){v.append(b);b.click(function(g){g.stopPropagation();B(a,b);r();return!1});return b}function B(a,b){u&&(u.removeClass("selected"),u=null);f=null;null==a?d(""):(b||(b=v.find("div.auto-comp-result").eq(a)),b.length&&(b.addClass("selected"),f=a,u=b))}function s(a){if(w){var b=w-1;null==f?a=0<a?0:b:(a=f+a,0>a?a=b:a>b&&(a=0));return B(a)}}function r(){if(null==f)z.val(""),d("");else{var b=v.find("div.auto-comp-result").eq(f),
62
- e=b.data()||{label:"Error"},q=e.value,l=e.label;d(q);z.val(l);k();b=b.clone();b.data(e);g();A(0,b);w=1;B(0,b);a();b.trigger("locoAutocomp",[q,l,b])}}var w=0,q=!1,C=!1,E=e.form,f=null,u=null,y=h(e),F=y.attr("name"),K=y.attr("data-mode"),I=y.attr("data-provider"),J="hint"!==K&&h('<input type="hidden" value="" name="'+F+'" />').appendTo(E),D=h('<div class="auto-comp-wrap"></div>').replaceAll(y),v=h('<div class="auto-comp-drop"></div>');I&&(I=new p(I));J&&y.attr("name","_"+F);y.attr("autocomplete")||
63
- y.attr("autocomplete","off");D.append(y).append(v);k();y.focus(function(){C=!0;1<w&&c()}).blur(function(){C=!1;a()}).keydown(function(a){function b(){a.preventDefault();a.stopPropagation();return!1}switch(a.keyCode){case 27:q&&(a.stopPropagation(),k(),y.blur());break;case 40:w&&(q?s(1):c());break;case 38:q&&s(-1);break;case 13:if(q)return r(),b();if(!f&&"hint"!==K)return b()}return!0});var z=n.require("$8","LocoTextListener.js").listen(y,function(a){I&&I.fetch(a,l)});(E=y.attr("data-pre"))&&(E=h.parseJSON(E))&&
64
- E.value&&E.label?(l([E]),r()):!e.value||J&&J.val()||!I||I.fetch(e.value,function(a){l(a);r()});return{$:y,val:function(){return J&&J.val()},clear:g,reset:function(){g();y.val("");d("");z.ping()},force:function(a,b){g();d(b||"");z.val(a)},preload:function(a){w&&g();I=new b;var d,e;for(d in a)e=a[d],I.add(e)},mode:function(a){K=a},provide:function(a){I=new p(a)}}};p.prototype.fetch=function(b,a){if(!b)return a&&a([]),this.dead={},this;var d,c=this.dead;for(d in c)if(0===b.indexOf(d))return a&&a([]),
65
- this;d={dataType:"json",url:this.url+encodeURIComponent(b)};n.require("$22","http.js").ajax(d,function(d){var g=d&&d.results;g&&(a&&d.query&&d.query===b&&a(d.results),g.length||(c[b]=0));return!0});return this};b.prototype.add=function(b){var a=b.fulltext||b.label||b.value;a&&this.dict.add(b,a)};b.prototype.fetch=function(b,a){var d=b?this.dict.find(b):[];a&&a(d);return this};return c}({},v,z));n.register("$9",function(c,f,D){function p(a){a.stopPropagation();a.preventDefault();return!1}function b(a,
66
- b,d){d.off().mouseup(function(d){d.stopPropagation();a.selectIndex(b,!0);return!1}).mouseover(function(){h(this).addClass("over");a.hover=b;return!0}).mouseout(function(){h(this).removeClass("over");a.hover=-1;return!0});return d}function e(b){m===b&&(h(f).off("resize scroll",a),m=null);return b}function a(){m&&m.resize()}function d(a){if(a){var b,d=a[0],e=d.id,c=d.title,r=d.disabled,m=[],q=[],k,E=-1,f=d.options.length,u=this.selectedIcon||"";this.id=e||"";this.name=d.name||"";this.prefix=d.getAttribute("data-prefix");
67
- for(this.defaultIcon=d.getAttribute("data-icon")||"icon no-icon";++E<f;)b=d.options[E],k=h(b),b.selected&&m.push(E),q.push([k.val(),k.text(),k.attr("data-icon")||u,b.disabled,k.attr("lang")]);this.hidden||(this.hidden=h('<input type="hidden" name="'+this.name+'" value="" />').appendTo(d.form));this.list=h("<ul></ul>").mouseup(p);this.icon=h('<span class="icon"> </span>');this.selection=h('<span class="label"></span>');this.handle=h('<a class="handle" href="#"></a>').attr("tabindex",a.attr("tabindex")||
68
- "").append(this.icon).append(this.selection);b=h('<div class="selector"></div>').addClass(d.className).append(this.handle).append(this.list).replaceAll(d);e&&b.attr("id",e);c&&a.hasClass("hastip")&&(b.attr("title",c),n.require("$11","tooltip.js").init(b,{gravity:a.attr("data-gravity")||"s",anchor:a.attr("data-anchor")}));this.wrapper=b;this.up=b.hasClass("up");for(this.clearOptions();b=q.shift();)this.addOption.apply(this,b);r?this.disable():this.enable();this.close();if(f=m.length)for(E=0;E<f;E++)this.selectIndex(m[E]);
69
- else E=d.selectedIndex,null!=E&&0<=E&&this.selectIndex(E)}}c.create=function(a){return new d(a)};c.extend=function(a){a.parent=d;a.prototype=new d};var m,k=d.prototype;k.enable=function(){var a=this;a.bound?a.wrapper.removeClass("disabled"):(a.handle.click(function(a){a.preventDefault();return!1}).mouseover(function(b){return a.onRollover(b)}).mouseout(function(b){return a.onRollout(b)}).mousedown(function(b){return a.onPress(b)}).keydown(function(b){return a.onKeydown(b)}),h(D).mouseup(function(b){return a.onRelease(b)}).keydown(function(b){return a.onGlobalKeydown(b)}),
70
  a.bound=!0)};k.disable=function(){this.wrapper.addClass("disabled")};k.isDisabled=function(){return this.wrapper.hasClass("disabled")};k.onRollover=function(){return this.over=!0};k.onRollout=function(){this.over=!1;return!0};k.onPress=function(a){return this.active?this.over?(this.close(),a.stopPropagation(),a.preventDefault(),!1):!0:(this.open(),a.stopPropagation(),a.preventDefault(),this.handle.focus(),!1)};k.onRelease=function(){this.active&&!this.over&&this.close();return!0};k.onGlobalKeydown=
71
- function(a){if(this.active)switch(a.keyCode){case 27:return this.close(),p(a);case 40:return this.hoverNext(1),p(a);case 38:return this.hoverNext(-1),p(a);case 13:if(-1!=this.hover)return this.selectIndex(this.hover,!0),this.hoverItem(-1),this.close(),p(a)}return!0};k.onKeydown=function(a){return this.active||40!==a.keyCode?!0:(this.open(),p(a))};k.resize=function(){var a=this.list,b=this.handle,d=b.outerWidth()||0,e=a.outerWidth()||0,c;this.up?(c=a.outerHeight(),a.css("top","-"+(c+2)+"px")):(c=b.outerHeight()||
72
- 0,c+=2,a.css("top",c+"px"),b=c+n.require("$18","html.js").top(b[0]),c=f.innerHeight-Math.max(0,b-f.pageYOffset),c-=4,a.css("max-height",c+"px"));d>e&&(d-=e-a.width(),a.css("min-width",String(d)+"px"))};k.open=function(){var b=this.list,d=this.wrapper,c=d.data("tipsy");this.active=!0;this.hover=-1;d.addClass("active");b.show().scrollTop(0);c&&c.disable();this!==m&&(m&&e(m),h(f).on("resize scroll",a),m=this);this.resize()};k.close=function(){var a=this.wrapper,b=a.data("tipsy");this.list.hide();this.active=
73
  !1;-1!==this.hover&&(this.getElement(this.hover).removeClass("over"),this.hover=-1);a.removeClass("active");b&&b.enable();e(this)};k.hoverItem=function(a,b){-1!==this.hover&&this.getElement(this.hover).removeClass("over");this.hover=a;-1!==a&&(b=b||this.getElement(a),b.addClass("over"))};k.hoverNext=function(a){var b=this.hover,d=this.options.length,e,c=null;for(-1===b&&0>a&&(b=d);d;){b+=a;if(0>b){this.close();break}else b>=d&&(b=0);if((e=this.options[b])&&!e.disabled&&!e.hidden){this.hoverItem(b);
74
- break}if(null==c)c=b;else if(c===b)break}};k.enableChange=function(a){this.eventName=a;this.eventData=[].slice.call(arguments,1);return this};k.enableConfirm=function(a){this.confirm=a;return this};k.clearOptions=function(){this.index={};this.length=0;this.options=[];this.list.html("");this.hidden.val("");this.idx=this.hover=-1;this.dict=null;return this};k.destroy=function(){this.clearOptions();this.hidden.remove()};k.addOption=function(a,d,e,c,m){var r=this.options.length,k=h("<span></span>").addClass(e||
75
- "icon no-icon"),q=h('<span class="label"></span>').text(d||a),q=h("<li></li>").append(k).append(q).appendTo(this.list);14<r&&this.getDict().add(r,d);m?m=m.split("-").shift():e&&-1!==e.indexOf("lang-"+a)&&(m=a);m&&k.attr("lang",m);q.attr("data-option",r);this.options[r]={value:a,text:d,lang:m||"",icon:e};this.index[a]=r;this.length=r+1;c?this.disableIndex(r):b(this,r,q);return r};k.getDict=function(){return this.dict||(this.dict=this.createDict())};k.createDict=function(){var a=this,b=n.require("$7",
76
- "fulltext.js").init(),d=h('<input type="text" placeholder="&#x1F50D;"/>').appendTo(h('<form class="clearable"></form>').submit(p).insertBefore(a.getElement(0)));n.require("$8","LocoTextListener.js").listen(d,function(e){0===(""===e?a.unfilter():a.filter(b.find(e)))?d.addClass("error"):d.removeClass("error")});h.each(a.options,function(a,d){b.add(a,d.text)});return b};k.filter=function(a){var b=-1,d=this.length,e,c=-1,r=a.length;if(r===d)this.unfilter();else{for(;++c<r;){for(e=a[c];++b<e;)this.hideIndex(b);
77
  this.showIndex(b)}for(;++b<d;)this.hideIndex(b)}return r};k.unfilter=function(){for(var a=-1,b=this.length;++a<b;)this.showIndex(a);return b};k.disableOption=function(a){return this.disableIndex(this.index[a])};k.enableOption=function(a){return this.enableIndex(this.index[a])};k.disableIndex=function(a){var b=this.options[a];b&&!b.disabled&&(b.disabled=!0,this.getElement(a).addClass("disabled").off());return this};k.enableIndex=function(a){var d=this.options[a];d&&d.disabled&&(d.disabled=null,b(this,
78
- a,this.getElement(a)).removeClass("disabled"));return this};k.hideIndex=function(a){var b=this.options[a];b&&!b.hidden&&(b.hidden=!0,this.getElement(a).hide())};k.showIndex=function(a){var b=this.options[a];b&&b.hidden&&(b.hidden=null,this.getElement(a).show())};k.each=function(a){for(var b=-1,d=this.options,e=d.length;++b<e;)a(b,d[b]);return this};k.reIndex=function(){var a=-1,d={},e,c=this.dict,m=this.options,r=m.length;for(c&&c.clear();++a<r;)e=m[a],d[e.value]=a,c&&c.add(a,e.text),e.disabled||
79
- b(this,a,this.getElement(a));this.index=d;this.length=r};k.selectValue=function(a,b){return this.selectIndex(this.index[a],b)};k.hasValue=function(a){return null!=this.index[a]};k.hasIndex=function(a){return this.length>a};k.getIndex=function(){return this.idx};k.selectIndex=function(a,b){var d=this.options[a];if(d){var e=this,c=e.idx,r=d.value,m=d.icon||e.defaultIcon,q=function(){null!=c&&e.getElement(c).removeClass("active");e.getElement(a).addClass("active");e.setLabel(d.text).setIcon(m,d.lang);
80
  e.hidden.val(r);e.idx=a;b&&e.change()};c===a?e.hidden.val(r):b?"function"===typeof e.confirm?e.confirm.call(null,d,function(a){a&&q()}):e.beforeChange(r)&&q():q();e.active&&e.close()}return this};k.setLabel=function(a){this.selection.text(a);(a=this.prefix)&&this.selection.prepend(h('<span class="prefix"></span>').text(a));return this};k.setIcon=function(a,b){this.icon.attr("class",a).attr("lang",b||"");return this};k.val=function(){var a=this.options[this.idx];return a&&a.value};k.change=function(){var a=
81
  this.val(),b=this.save,d=this.eventName||"change",e=[a].concat(this.eventData||[]);this.wrapper.trigger(d,e);b&&b(a);this.hidden.triggerHandler("change");return this};k.beforeChange=function(a){var b=h.Event("locoBeforeSelect");this.wrapper.trigger(b,[a]);return!b.isDefaultPrevented()};k.renameOption=function(a,b){var d=this.index[a],e=this.options[d];e&&(e.text=b,this.getElement(d).find("span.label").text(b),d===this.idx&&this.setLabel(b));return this};k.removeOption=function(a){var b=this.index[a],
82
  d=this.options[b];d&&(a=this.val(),this.getElement(b).remove(),this.options.splice(b,1),this.reIndex(),a===d.value?this.selectIndex(0,!0):this.selectValue(a,!1))};k.getElement=function(a){return this.list.find("li").eq(a)};k.getWrapper=function(){return this.wrapper};k.tip=function(){return this.getWrapper().data("tipsy")};k.$=function(a,b){h.fn[a].apply(this.wrapper,b||[]);return this};k.persist=function(a){var b=this.id||this.name,d=a.fetch(b);null!=d&&this.selectValue(d,!0);this.save=function(d){a.store(b,
83
- d)};return this};k.listen=function(a){return this.on(this.eventName||"change",a)};k.on=function(a,b){this.wrapper.on(a,b);return this};k=null;return c}({},v,z));n.register("$33",function(c,f,D){function p(b){var e=[],a=h([]);this.hidden=a;this.selected=e;this.selectedIcon="icon icon-checkbox";this.constructor.call(this,b);this.wrapper.addClass("multi");for(var d,c,k,g=h('<input type="checkbox" name="'+this.name+'[]" />')[0],l=this.options,A=l.length,f=-1;++f<A;)d=this.getElement(f)[0],k=g.cloneNode(!0),
84
- e[f]&&(k.checked=!0),k.setAttribute("value",l[f].value),a.push(d.appendChild(k));(c=this.defaultIcon)&&this.setIcon(c);(c=b.attr("title"))?this.setLabel(c):this.wrapper.addClass("no-title")}c.create=function(b){return new p(b)};n.require("$9","LocoSelector.js").extend(p);f=p.prototype;f.selectIndex=function(b,e){return this.setIndexState(b,!this.selected[b],e)};f.setIndexState=function(b,e,a){var d=this.options[b],c=this.getElement(b),k=this.hidden[b],g=this.selected;d&&e!==g[b]&&(g[b]=e,c[e?"addClass":
85
- "removeClass"]("checked"),k&&(k.checked=e),a&&this.change());return this};f.selectValue=function(b,e){if(null==b.pop)return p.parent.prototype.selectValue.call(this,b,e);for(var a=this.selected.slice(),d=this.options.length,c=this.index||{},k=!1,g=-1,l=-1;++g<d;)a[g]&&(k=!0),a[g]=!1;if(d=b.length)for(;++l<d;)g=c[b[l]],null==g?k=!0:!1===a[g]&&(k=a[g]=!0);if(k){for(g in a)this.setIndexState(g,a[g]);e&&this.change()}return this};f.val=function(){for(var b=[],e=this.options,a=this.selected,d=a.length,
86
- c=-1;++c<d;)a[c]&&b.push(e[c].value);return b};f=null;return c}({},v,z));n.register("$44",function(c,f,h){function p(b,a){for(var d=String(b);a>d.length;)d="0"+d;return d}function b(b){var a=b%10;if(1===a){if(11!==b)return"st"}else if(2===a){if(12!==b)return"nd"}else if(3===a&&13!==b)return"rd";return"th"}c.formatter=function(){return{format:function(b,a){var d=this;return a.replace(/%[YmdHisMjSghAa]/g,function(a){return d[a.charAt(1)](b)})},Y:function(b){return String(b.getFullYear())},m:function(b){return p(1+
87
- b.getFullMonth(),2)},M:function(b){return"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")[b.getMonth()]},d:function(b){return p(b.getDate(),2)},H:function(b){return p(b.getHours(),2)},i:function(b){return p(b.getMinutes(),2)},s:function(b){return p(b.getSeconds(),2)},j:function(b){return String(b.getDate())},S:function(e){return b(e.getDate())},g:function(b){b=b.getHours();return String(0===b?12:12<b?b-12:b)},h:function(b){return p(this.g(b),2)},a:function(b){return 12>b.getHours()?"am":
88
- "pm"},A:function(b){return 12>b.getHours()?"AM":"PM"}}};return c}({},v,z));n.register("$34",function(c,f,D){function p(a){var e=a.id,c=m||(m=[]),r=k||(k={}),w=a.getAttribute("datetime"),w=l(w);if(!isNaN(w))return e||(e="tick"+ ++g,a.setAttribute("id",e)),a={id:e,el:a,dt:new Date(w),st:a.textContent},r[e]||c.push(a),r[e]=a,d||(d=setTimeout(b,200)),a}function b(){for(var a=m,c=a.length,g={},r=[];0<c--;)ticker=a[c],e(ticker)&&(r.push(ticker),g[ticker.id]=ticker);r.length?(m=r,k=g,d=setTimeout(b,3E4)):
89
- d=k=m=null}function e(b){var d=b.el;if(D.contains&&!D.contains(d))return!1;strDate=a(b.dt,new Date,!0);if(""===strDate)return!1;strDate!==b.st&&(h(d).text(strDate),b.st=strDate);return!0}function a(a,b,d){var e=b.getTime(),c=a.getTime(),q=e-c;if(6E4>q)return"Just now";if(36E5>q)return a=Math.floor(q/6E4),String(a)+" minute"+(1===a?"":"s")+" ago";if(864E5>q&&b.getDate()===a.getDate()&&b.getMonth()===a.getMonth()&&b.getFullYear()===a.getFullYear())return a=Math.round(q/36E5),"About "+String(a)+" hour"+
90
- (1===a?"":"s")+" ago";if(d)return"";d=Math.floor(e/864E5)-Math.floor(c/864E5);e=n.require("$44","date.js").formatter();q=e.format(a," %g:%i %A");return 1>=d&&(b.setHours(0),b.setMinutes(0),b.setSeconds(0),b=b.getTime()-864E5,c>=b)?"Yesterday at"+q:11>d?d+" days ago at"+q:e.format(a,"%M %j%S %Y,")+q}var d,m,k,g=0,l=Date.parse||function(){return Number.NaN};c.onEach=function(a,b){p(b)};c.update=function(a){e(p(a))};c.rel=a;return c}({},v,z));n.register("$18",function(c,f,D){var p=f.ieVersion;c.ie=function(b){return b?
91
- p<=b:p};var b=c.init=function(b){b?b instanceof jQuery||(b=h(b)):b=h(D.body);var a=n.require("$31","ga.js"),d=n.require("$19","forms.js"),m=n.require("$32","modal.js"),k=n.require("$10","LocoAutoComplete.js"),g=n.require("$9","LocoSelector.js"),l=n.require("$33","LocoMultiSelector.js"),f=n.require("$11","tooltip.js");b.find("form").each(function(a,b){var e=h(b);p&&10>p&&d.placeholders(e);b.getAttribute("data-modal")?m.initForm(b):b.hasAttribute("action")&&"#"!==e.attr("action").charAt(0)&&!b.target&&
92
- d.jsonify(b);e.find("input.auto-comp").each(function(a,b){k.init(b)});e.find("select.selector").each(function(a,b){b.hasAttribute("multiple")?l.create(h(b)):g.create(h(b))});e.hasClass("hasreveal")&&d.revealify(e);e.find("button.hastip").each(function(a,b){f.init(h(b))})});b.find("a").each(function(b,d){-1!==d.className.indexOf("hastip")&&f.init(h(d));"/modal/"===String(d.getAttribute("href")).substr(0,7)||d.getAttribute("data-modal")?m.initLink(h(d)):a.link(d)});b.find("time.tick").each(n.require("$34",
93
- "tick.js").onEach);d=m=k=b=null;return c};c.$=function(b){return h(f.innerShiv?innerShiv(b,!1):b)};h.fn._html=function(e){return null!=e?(e=this.html(f.innerShiv?innerShiv(e,!1):e),b(this),e):j.html()};h.fn.macro=function(b,a){if("function"!==typeof b.run)throw Error("macro has no run function");b.run(this,a||{});return this};c.el=function(b,a){var d=D.createElement(b||"div");a&&(d.className=a);return d};c.txt=function(b){return D.createTextNode(b||"")};c.h=function(){function b(){c=/[<>&]/g;k=/(\r\n|\n|\r)/g;
94
- g=/(?:https?):\/\/(\S+)/ig;l=location.hostname;b=null}function a(a){return"&#"+a.charCodeAt(0)+";"}function d(a,b){return'<a href="'+a+'" target="'+(b.indexOf(l)?"_blank":"_top")+'">'+b+"</a>"}var c,k,g,l;return function(l,f){b&&b();var s=l.replace(c,a);f&&(s=s.replace(g,d).replace(k,"<br />"));return s}}();c.noop=function(b){b&&(b.preventDefault(),b.stopPropagation(),h(b.target).blur());return!1};c.top=function(b,a){a||(a=D.body);for(var d=b.offsetTop||0;(b=b.offsetParent)&&b!==a;)d+=b.offsetTop||
95
- 0;return d};c.left=function(b,a){a||(a=D.body);for(var d=b.offsetLeft||0;(b=b.offsetParent)&&b!==a;)d+=b.offsetLeft||0;return d};return c}({},v,z));n.register("$19",function(c,f,D){function p(a){function b(){a.value===g&&(a.value="",c.removeClass("placeheld"));return!0}function e(){""===a.value&&(a.value=g,c.addClass("placeheld"));return!0}var c=h(a);if(!c.hasClass("auto-comp")){var g=c.attr("placeholder");if(g)return c.focus(b).blur(e),e(),{kill:function(){b();c.off("focus",b).off("blur",e)}}}}var b=
96
  c.enable=function(a){function b(a,d){d.getAttribute("data-was-disabled")||(d.disabled=!1)}a.find(".button").removeClass("loading");a.find("button").each(b);a.find("input").each(b);a.find("select").each(b);a.find("textarea").each(b);f.attachEvent&&a.hasClass("has-placeholders")&&c.placeholders(a);a.removeClass("disabled").trigger("locoEnable");delete a._disabled},e=c.disable=function(a){function b(a,d){d.disabled?d.setAttribute("data-was-disabled","true"):d.disabled=!0}a._disabled||(a.find(".button").addClass("loading"),
97
  a.find("button").each(b),a.find("input").each(b),a.find("select").each(b),a.find("textarea").each(b),a.addClass("disabled").trigger("locoDisable"),a._disabled=!0)};c.jsonify=function(a,d,c){a instanceof jQuery||(a=h(a));a.disable||(h.fn.disable=function(){e(this);return this},h.fn.enable=function(){b(this);this.placehold&&this.placehold();return this});var k="";a.find('[type="submit"]').click(function(a){a&&a.target&&a.target.name&&(k=encodeURIComponent(a.target.name)+"="+encodeURIComponent(a.target.value));
98
- return!0});a.submit(function(b){if(b&&b.isDefaultPrevented&&b.isDefaultPrevented()||c&&!1===c(b))return!1;var e=a.serialize(),e=e.replace(/%0D%0A/g,"%0A");k&&(e&&(e+="&"),e+=k,k="");a.disable();var f=n.require("$22","http.js"),e={url:f.jsonLink(a.attr("action")),type:a.attr("method"),data:e};f.ajax(e,d,function(){a.enable()},a);b.preventDefault();b.stopPropagation();return!1})};c.revealify=function(a){a=a.closest("form");a.find("div[data-reveal-if]").each(function(b,e){function c(a){var b;b=p;q=q||
99
- a.target;if("."===r)b=Boolean(q&&q[w]),p&&(b=!b);else{var d,e,y=h(q.form).serializeArray();for(e in y)y[e].name===s&&(d=y[e].value);"!="===r&&(b=!b);b=b?w!==d:w===d}if(b!==f)if(f=b,a)g[f?"slideDown":"slideUp"](200);else g[f?"show":"hide"]();return!0}var g=h(e),l=/^(\!?)([_\w\-\[\]]+)(\.|!?=)(.*)$/.exec(g.attr("data-reveal-if"));if(l){var f,p=l[1]?!0:!1,s=l[2],r=l[3],w=l[4],l=a[0][s];if(l.type||null==l.length)l=[l];b=l.length;for(var q;0!==b--;)q=l[b],c(),h(q).change(c).removeClass("jshide");l=l=q=
100
- null}});a=null};c.linkify=function(a){var b=a.getAttribute("data-icon");if(b){var e=h(a),c=h("<a> </a>");c.attr("href",a.form.action);c.attr("class",e.attr("class"));c.attr("tabindex",e.attr("tabindex"));e.attr("tabindex","-1");c.text(e.val());b&&h("<span></span>").prependTo(c).addClass(b);e.hide().after(c);c.click(function(a){e.click();return!1})}};c.placeholders=function(a){var b,e=[];a.find("input[placeholder]").each(function(a,c){"password"!==c.type&&(b=p(c))&&e.push(b)});e.length&&(a.submit(function(){for(var a in e)e[a].kill()}),
101
- a.addClass("has-placeholders"),b=i=null)};return c}({},v,z));n.register("$4",function(c,f,D){function p(a,b,d){function e(){c();g=setTimeout(b,d)}function c(){g&&clearTimeout(g);g=null}var g;e();h(a).mouseenter(c).mouseleave(e);return{die:function(){c();h(a).off("mouseenter mouseleave")}}}function b(a,b){a.fadeTo(b,0,function(){a.slideUp(b,function(){a.remove();h(f).triggerHandler("resize")})});return a}function e(a,d){function e(d){g[r]=null;b(h(a),250);c&&c.die();var q;if(q=d)d.stopPropagation(),
102
- d.preventDefault(),q=!1;return q}var c,r;h(a).addClass("is-dismissible");h('<button type="button" class="notice-dismiss" href="#"> </a>').prependTo(a).click(e);h(f).triggerHandler("resize");l();r=g.length;g.push(e);d&&(c=p(a,e,d));return{stick:function(){c&&c.die();c=null;g[r]=null}}}function a(a,b,d){var e=n.require("$18","html.js");a=h('<div class="notice notice-'+a+'" loco-notice inline></div>').prependTo(h("#loco-notices"));var c=h(e.el("p"));d=h(e.el("span")).text(d);b=h(e.el("strong","has-icon")).text(b+
103
- ": ");c.append(b).append(d).appendTo(a);return a}function d(b,d,c,g){b=a(c,d,b).hide().fadeIn(500);h(f).triggerHandler("resize");return e(b,g)}function m(a){return d(a,B,"warning")}function k(){h("#loco-notices").find("div.notice").each(function(a,b){if(-1===b.className.indexOf("jshide")){var d=-1===b.className.indexOf("notice-success")?null:5E3;e(b,d)}})}var g=[],l=Date.now||function(){return(new Date).getTime()},A,B,s,r;c.error=function(a){return d(a,A,"error")};c.warn=m;c.info=function(a){return d(a,
104
- s,"info")};c.success=function(a){return d(a,r,"success",5E3)};c.warning=m;c.log=function(){f.console&&console.log&&console.log.apply(console,arguments)};c.debug=function(a,b){f.console&&console.error&&(console.error("Loco Error: "+a),b&&console.debug&&console.debug(b))};c.clear=function(){for(var a=-1,b,d=g,e=d.length;++a<e;)(b=d[a])&&b();g=[];return c};c.create=a;c.raise=function(a){(c[a.type]||c.error).call(c,a.message)};c.convert=e;c.init=function(a){A=a._("Error");B=a._("Warning");s=a._("Notice");
105
- r=a._("OK");setTimeout(k,1E3);return c};return c}({},v,z));n.register("$5",function(c,f,D){function p(a){var b=h("<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 b(a){return(a=a.split(/[\r\n]/)[0])?(a=a.replace(/ +in +\S+ on line \d+/,""),a=a.replace(/^[()! ]+Fatal error:\s*/,"")):t._("Server returned invalid data")}function e(a,b,d){a[b]=d}function a(a,b,d){a.push({name:b,value:d})}
106
- function d(a,b,d){a.append(b,d)}function m(a,d,e,c){function q(d,c,q){if("abort"!==c){var y=g||{_:function(a){return a}},k=d.status,f=d.responseText,w=p(f),h=d.getResponseHeader("Content-Type")||"text/html",s=d.getResponseHeader("Content-Length")||f.length;"success"===c&&q?m.error(q):(m.error(b(w)+".\n"+y._("Check console output for debugging information")),m.debug("Ajax failure for "+a,{status:k,error:c,message:q,output:f}),"parsererror"===c&&(q="Response not JSON"),m.log([y._("Provide the following text when reporting a problem")+
107
- ":","----","Status "+k+' "'+(q||y._("Unknown error"))+'" ('+h+" "+s+" bytes)",w,"===="].join("\n")));e&&e.call&&e(d,c,q);l=d}}c.url=A;c.dataType="json";c.error=q;c.success=function(a,b,e){var c=a&&a.data,g=a&&a.notices,r=g&&g.length;for(!c||a.error?q(e,b,a&&a.error&&a.error.message):d&&d(c,b,e);r--;)m.raise(g[r])};var m=n.require("$4","notices.js").clear();return h.ajax(c)}var k={},g,l,A=f.ajaxurl||"/wp-admin/admin-ajax.php";c.init=function(a){k=a.nonces||k;return c};c.localise=function(a){g=a;return c};
108
- c.xhr=function(){return l};c.strip=p;c.parse=b;c.submit=function(a,b,d){function e(){c.removeClass("loading");n.require("$19","forms.js").enable(c)}var c=h(a),g=c.serialize();c.addClass("loading");n.require("$19","forms.js").disable(c);return m(a.route.value,function(a,d,c){e();b&&b(a,d,c)},function(a,b,c){e();d&&d(a,b,c)},{type:a.method,data:g})};c.post=function(b,c,g,l){var q,C=!0;c=c||{};(q=k[b])||(f.console&&console.debug&&console.debug('No nonce for "'+b+'"'),q="");var E=q;f.FormData&&c instanceof
109
- FormData?(C=!1,q=d):q=Array.isArray(c)?a:e;q(c,"action","loco_json");q(c,"route",b);q(c,"loco-nonce",E);return m(b,g,l,{type:"post",data:c,processData:C,contentType:C?"application/x-www-form-urlencoded; charset=UTF-8":!1})};c.setNonce=function(a,b){k[a]=b;return c};c.hasNonce=function(a){return!!k[a]};return c}({},v,z));n.register("$20",{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,
110
- orkh:1,ital:1,lydi:1,ar:1,ary:1,ckb:1,dv:1,fa:1,he:1,nqo:1,ps:1,ur:1,yi:1});n.register("$6",function(c,f,h){function p(){}var b,e=n.require("$20","rtl.json");c.init=function(){return new p};c.cast=function(a){return a instanceof p?a:"string"===typeof a?c.parse(a):c.clone(a)};c.clone=function(a){var b,c=new p;for(b in a)c[b]=a[b];return c};c.parse=function(a){if(!(b||(b=/^([a-z]{2,3})(?:[-_]([a-z]{2}))?(?:[-_]([a-z0-9]{3,8}))?$/i)).exec(a))return null;var d=new p;d.lang=RegExp.$1.toLowerCase();if(a=
111
- RegExp.$2)d.region=a.toUpperCase();if(a=RegExp.$3)d.variant=a.toLowerCase();return d};f=p.prototype;f.isValid=function(){return!!this.lang};f.isKnown=function(){var a=this.lang;return!(!a||"zxx"===a)};f.toString=function(a){a=a||"-";var b,c=this.lang||"zxx";if(b=this.region)c+=a+b;if(b=this.variant)c+=a+b;return c};f.getIcon=function(){for(var a=3,b,c,e=["variant","region","lang"],g=[];0!==a--;)if(b=e[a],c=this[b])g.push(b),g.push(b+"-"+c.toLowerCase());return g.join(" ")};f.isRTL=function(){return!!e[String(this.lang).toLowerCase()]};
112
- f=null;return c}({},v,z));n.register("$38",function(c,f,h){function p(){}var b,e,a=n.require("$20","rtl.json");c.init=function(){return new p};c.cast=function(a){return a instanceof p?a:"string"===typeof a?c.parse(a):c.clone(a)};c.clone=function(a){var b,c=new p;for(b in a)c[b]=a[b];return c};c.parse=function(a){b||(e=/[-_+]/,b=/^([a-z]{2,3})(?:-([a-z]{4}))?(?:-([a-z]{2}|[0-9]{3}))?(?:-([0-9][a-z0-9]{3,8}|[a-z0-9]{5,8}))?(?:-([a-z]-[-a-z]+))?$/i);a=String(a).split(e).join("-");if(!b.exec(a))return null;
113
- var c=new p;c.lang=RegExp.$1.toLowerCase();if(a=RegExp.$2)c.script=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();if(a=RegExp.$3)c.region=a.toUpperCase();if(a=RegExp.$4)c.variant=a.toLowerCase();if(a=RegExp.$5)c.extension=a;return c};f=p.prototype;f.isValid=function(){return!!this.lang};f.isKnown=function(){var a=this.lang;return!(!a||"zxx"===a)};f.toString=function(a){a=a||"-";var b,c=this.lang||"zxx";if(b=this.script)c+=a+b;if(b=this.region)c+=a+b;if(b=this.variant)c+=a+b;if(b=this.extension)c+=
114
- a+b;return c};f.getIcon=function(){for(var a=4,b,c,e=["variant","region","script","lang"],l=[];0!==a--;)if(b=e[a],c=this[b])c.join&&(c=c.join("-")),1===a&&3===c.length?l.push("region-m49"):l=l.concat([b,b+"-"+c.toLowerCase()]);return l.join(" ")};f.isRTL=function(){return!!a[String(this.script||this.lang).toLowerCase()]};f=null;return c}({},v,z));n.register("$39",function(c,f,h){function p(a){f.console&&console.error&&console.error(a)}function b(){p("Method not implemented")}function e(){}function a(a){}
115
- e.prototype.toString=function(){return"[Undefined]"};a.prototype._validate=function(a){var c,k,g=!0;for(c in this)k=this[c],k===b?(p(a+"."+c+"() must be implemented"),g=!1):k instanceof e&&(p(a+"."+c+" must be defined"),g=!1);return g};c.init=function(d,c){var k,g=new a;if(d)for(k=d.length;0!==k--;)g[d[k]]=b;if(c)for(k=c.length;0!==k--;)g[c[k]]=new e;return g};c.validate=function(a){var b=/function (\w+)\(/.exec(a.toString())?RegExp.$1:"";a.prototype._validate(b||"Object")};return c}({},v,z));n.register("$49",
116
- function(c,f,h){var p=f.requestAnimationFrame,b=f.cancelAnimationFrame,e=0;if(!p||!b)for(var a in{ms:1,moz:1,webkit:1,o:1})if(p=f[a+"RequestAnimationFrame"])if(b=f[a+"CancelAnimationFrame"]||f[a+"CancelRequestAnimationFrame"])break;p&&b||(p=function(a){var b=d();timeToCall=Math.max(0,16-(b-e));nextTime=b+timeToCall;timerId=f.setTimeout(function(){a(nextTime)},timeToCall);e=nextTime;return timerId},b=function(a){clearTimeout(a)});var d=Date.now||function(){return(new Date).getTime()};c.loop=function(a,
117
- d){function c(){f=p(c,d);a(e++)}var e=0,f;c();return{stop:function(){f&&b(f);f=null}}};return c}({},v,z));n.register("$45",function(c,f,h){function p(b,d,c,e){if(a){var g=c;c=function(a){if((a.MSPOINTER_TYPE_TOUCH||"touch")===a.pointerType)return g(a)}}b.addEventListener(d,c,e);return{unbind:function(){b.removeEventListener(d,c,e)}}}function b(a){a.preventDefault();a.stopPropagation();return!1}var e,a=!!f.navigator.msPointerEnabled,d=a?"MSPointerDown":"touchstart",m=a?"MSPointerMove":"touchmove",
118
- k=a?"MSPointerUp":"touchend";c.ok=function(a){null==e&&(e="function"===typeof h.body.addEventListener);e&&a&&a(c);return e};c.ms=function(){return a};c.dragger=function(a,c){function e(b){a.addEventListener(b,l[b],!1)}function r(b){a.removeEventListener(b,l[b],!1)}var l={};l[d]=function(a){g(a,function(b,e){e.type=d;c(a,e,q)});e(m);e(k);return!0};l[k]=function(a){r(m);r(k);g(a,function(b,d){d.type=k;c(a,d,q)});return!0};l[m]=function(a){g(a,function(b,d){d.type=m;c(a,d,q)});return b(a)};e(d);var q=
119
- {kill:function(){r(d);r(m);r(k);a=q=c=null}};return q};c.swiper=function(c,e,f){function r(a){c.addEventListener(a,u[a],!1)}function w(a){c.removeEventListener(a,u[a],!1)}function q(){h&&h.stop();h=null}var h,E,p,u={},y=[],F=[],K=[];u[d]=function(a){E=!1;q();var b=l();g(a,function(a,d){y[a]=b;F[a]=d.clientX;K[a]=d.clientY});p=c.scrollLeft;return!0};u[k]=function(a){g(a,function(a,b){var d=l()-y[a],c=F[a]-b.clientX,d=Math.abs(c)/d;e(d,c?0>c?-1:1:0)});p=null;return!0};u[m]=function(a){var d,e;null==
120
- p||g(a,function(a,b){d=F[a]-b.clientX;e=K[a]-b.clientY});if(e&&Math.abs(e)>Math.abs(d))return E=!0;d&&(E=!0,c.scrollLeft=Math.max(0,p+d));return b(a)};if(!a||f)r(d),r(m),r(k),a&&(c.className+=" mstouch");return{kill:function(){w(d);w(m);w(k);q()},swiped:function(){return E},ms:function(){return a},snap:function(b){a&&!f&&(c.style["-ms-scroll-snap-points-x"]="snapInterval(0px,"+b+"px)",c.style["-ms-scroll-snap-type"]="mandatory",c.style["-ms-scroll-chaining"]="none")},scroll:function(a,b,d){q();var e=
121
- c.scrollLeft,g=a>e?1:-1,r=Math[1===g?"min":"max"],y=Math.round(16*b*g);return h=n.require("$49","fps.js").loop(function(b){b&&(e=Math.max(0,r(a,e+y)),c.scrollLeft=e,a===e&&(q(),d&&d(e)))},c)}}};c.start=function(a,b){return p(a,d,b,!1)};c.move=function(a,b){return p(a,m,b,!1)};c.end=function(a,b){return p(a,k,b,!1)};var g=c.each=function(b,d){if(a)(b.MSPOINTER_TYPE_TOUCH||"touch")===b.pointerType&&d(0,b);else for(var c=-1,e=(b.originalEvent||b).changedTouches||[];++c<e.length;)d(c,e[c])},l=Date.now||
122
- function(){return(new Date).getTime()};return c}({},v,z));n.register("$50",function(c,f,n){c.init=function(c){function b(){f.style.top=String(-c.scrollTop)+"px";return!0}function e(){var b=f;b.textContent=c.value;b.innerHTML=b.innerHTML.replace(/[ \t]/g,a).split(/(?:\n|\r\n?)/).join('<span class="eol crlf"></span>\r\n')+'<span class="eol eof"></span>';return!0}function a(a){return'<span class="x'+a.charCodeAt(0).toString(16)+'">'+a+"</span>"}var d=c.parentNode,f=d.insertBefore(n.createElement("div"),
123
- c);h(c).on("input",e).on("scroll",b);h(d).addClass("has-mirror");f.className="ta-mirror";var k=c.offsetWidth-c.clientWidth;2<k&&(f.style.marginRight=String(k-2)+"px");e();b();return{kill:function(){h(c).off("input",e).off("scroll",b);d.removeChild(f);f=null;h(d).removeClass("has-mirror")}}};return c}({},v,z));n.register("$30",function(c,f,h){function p(a,d){for(var c=0,e=-1,g=d&&f[d],l=b[a]||[],h=l.length;++e<h;)callback=l[e],"function"===typeof callback&&(callback(g),c++);return c}var b={},e;c.load=
124
- function(a,d,c){function e(){A&&(clearTimeout(A),A=null);n&&(n.onreadystatechange=null,n=n=n.onload=null);a&&(delete b[a],a=null)}function g(b,d){var g=n&&n.readyState;if(d||!g||"loaded"===g||"complete"===g)d||p(a,c),e()}function l(){if(0===p(a))throw Error('Failed to load "'+(c||a)+'"');e()}if(c&&f[c])"function"===typeof d&&d(f[c]);else if(null!=b[a])b[a].push(d);else{b[a]=[d];var A=setTimeout(l,4E3),n=h.createElement("script");n.setAttribute("src",a);n.setAttribute("async","true");n.onreadystatechange=
125
- g;n.onload=g;n.onerror=l;n.onabort=e;h.getElementsByTagName("head")[0].appendChild(n)}};c.stat=function(a){var b;if(!(b=e)){for(var c,f,g=h.getElementsByTagName("script"),l=-1,p=g.length;++l<p;)if(b=g[l].getAttribute("src"))if(c=b.indexOf("/lib/vendor"),-1!==c){f=b.substr(0,c);break}b=e=f||"/static"}return b+a};return c}({},v,z));n.register("$15",function(c,f,D){function p(a,b){a.setReadOnly(!1);a.on("change",function(a,c){return b.val(c.getValue())});a.on("focus",function(){return b.focus()});a.on("blur",
126
  function(){return b.blur()})}function b(a){a.off("change");a.off("focus");a.off("blur")}function e(a){b(a);a.setReadOnly(!0);a.setHighlightGutterLine(!1);a.setHighlightActiveLine(!1)}function a(a,b){function c(){this.HighlightRules=e}var e=d(b),g=a.require,f=g("ace/lib/oop");f.inherits(e,g("ace/mode/text_highlight_rules").TextHighlightRules);f.inherits(c,g("ace/mode/text").Mode);return new c}function d(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_:\\.-]+;)"},
127
- {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=m(a);"icu"===a?b={start:b.start.concat([{token:"icu-quoted",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]*[^{}]+)?)?}"},
128
  {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]+",
129
- 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 m(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%]/;
130
- 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 g:return k||"%%"}}var k,g="auto";c.init=function(c,d,k){var m,r=!1,w=k||g,q=c.parentNode,C=q.appendChild(D.createElement("div"));h(q).addClass("has-proxy has-ace");n.require("$30","remote.js").load("https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ace.js",
131
- function(b){if(C){if(!b)throw Error("Failed to load code editor");m=b.edit(C);var q=m.session,g=m.renderer;m.$blockScrolling=Infinity;m.setShowInvisibles(r);m.setWrapBehavioursEnabled(!1);m.setBehavioursEnabled(!1);m.setHighlightActiveLine(!1);q.setUseSoftTabs(!1);g.setShowGutter(!0);g.setPadding(10);g.setScrollMargin(8);q.setMode(a(b,w));m.setValue(c.value,-1);q.setUseWrapMode(!0);d?p(m,d):e(m)}},"ace");return{kill:function(){m&&(b(m),m.destroy(),m=null);C&&(q.removeChild(C),h(q).removeClass("has-proxy has-ace"),
132
- C=null);return this},disable:function(){m&&e(m);d=null;return this},enable:function(a){d=a;m&&p(m,a);return this},resize:function(){m&&m.resize();return this},val:function(a){m&&a!==m.getValue()&&m.setValue(a,-1);return this},invs:function(a){a=a||!1;r!==a&&(r=a,m&&m.setShowInvisibles(a));return this},strf:function(b){b=b||g;b!==w&&(w=b,m&&m.session.setMode(a(f.ace,b)));return this},focus:function(){return this}}};c.strf=function(a,b){g=a;k=b;return c};return c}({},v,z));n.register("$51",function(c,
133
- f,D){function p(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 b(a){a.off("input");a.off("change");a.off("focus");a.off("blur")}function e(a){b(a);a.setMode("readonly")}var a=0;c.load=function(a){var b=n.require("$30","remote.js");b.load(b.stat("/lib/tinymce.min.js"),a,"tinymce");return c};c.init=function(d,f){function k(a){B=a;s="<p>"===a.substr(0,3)&&
134
- "</p>"===a.substr(-4);return a.replace(/(<\/?)script/ig,"$1loco:script")}function g(a){l=a;a._getContent=a.getContent;a.getContent=function(a){a=this._getContent(a);a=a.replace(/(<\/?)loco:script/ig,"$1script");if(!s&&"<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(k(a),b)};f?(p(a,f),f.reset()):e(a);h(q).removeClass("loading")}var l,n=!1,B="",s=!1,
135
- r=d.parentNode,w=r.parentNode,q=r.appendChild(D.createElement("div")),C=w.insertBefore(D.createElement("nav"),r);C.id="_tb"+String(++a);h(r).addClass("has-proxy has-mce");h(q).addClass("mce-content-body loading").html(k(d.value));c.load(function(a){if(!a)throw Error("Failed to load HTML editor");q&&a.init({inline:!0,target:q,hidden_input:!1,theme:"modern",skin:!1,plugins:"link lists",browser_spellcheck:!0,menubar:!1,fixed_toolbar_container:"#"+C.id,toolbar:"formatselect | bold italic link unlink | bullist numlist outdent indent",
136
  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",
137
- entities:"38,amp,60,lt,62,gt,160,nbsp",entity_encoding:"named",keep_styles:!1,init_instance_callback:g})});return{val:function(a){a=k(a);null==l?(d.value=a,h(q).html(a)):l.getContent()!==a&&l.setContent(a);f&&f.val(a);return this},kill:function(){l&&(f&&f.val(l.getContent()),b(l),l.destroy(),l=null);q&&(r.removeChild(q),h(r).removeClass("has-proxy has-mce"),q=null);C&&(w.removeChild(C),C=null);return this},enable:function(a){f=a;l&&p(l,a);return this},disable:function(){l&&e(l);f=null;return this},
138
- focus:function(){l&&f&&l.focus();return this},invs:function(a){a=a||!1;n!==a&&(n=a,h(r)[a?"addClass":"removeClass"]("show-invs"));return this}}};return c}({},v,z));n.register("$46",function(c,f,D){function p(a){function b(){p&&(n.off("input",c),p=!1)}function c(){var b=a.value;b!==r&&(n.trigger("changing",[b,r]),r=b)}function f(){c();p&&w!==r&&n.trigger("changed",[r])}function g(){e=a;w=r;p||(n.on("input",c),p=!0);n.trigger("editFocus");s.addClass("has-focus");return!0}function l(){e===a&&(e=null);
139
- n.trigger("editBlur");s.removeClass("has-focus");p&&(f(),b());return!0}var p=!1,n=h(a),s=h(a.parentNode),r=a.value,w;n.blur(l).focus(g);return{val:function(b){r!==b&&(a.value=b,n.triggerHandler("input"),r=b);return!0},kill:function(){b();n.off("blur",l).off("focus",g)},fire:function(){r=null;c()},ping:f,blur:l,focus:g,reset:function(){w=r=a.value}}}function b(a){this.e=a}var e;c._new=function(a){return new b(a)};c.init=function(a){var c=new b(a);a.disabled?(a.removeAttribute("disabled"),c.disable()):
140
  a.readOnly?c.disable():c.enable();return c};TextAreaPrototype=b.prototype;TextAreaPrototype.destroy=function(){this.unlisten();var a=this.p;a&&(a.kill(),this.p=null);this.e=null};TextAreaPrototype.reload=function(a,b){var c=this.l;c&&!b&&(this.disable(),c=null);this.val(a||"");b&&!c&&this.enable();return this};TextAreaPrototype.val=function(a){var b=this.e;if(null==a)return b.value;var c=this.l,e=this.p;e&&e.val(a);c&&c.val(a);c||b.value===a||(b.value=a,h(b).triggerHandler("input"));return this};
141
  TextAreaPrototype.fire=function(){this.l&&this.l.fire();return this};TextAreaPrototype.ping=function(){this.l&&this.l.ping();return this};TextAreaPrototype.focus=function(){var a=this.p;a?a.focus():h(this.e).focus()};TextAreaPrototype.focused=function(){return e&&e===this.el};TextAreaPrototype.parent=function(){return this.e.parentNode};TextAreaPrototype.attr=function(a,b){var c=this.e;if(1===arguments.length)return c.getAttribute(a);null==b?c.removeAttribute(a):c.setAttribute(a,b);return this};TextAreaPrototype.editable=
142
- function(){return!!this.l};TextAreaPrototype.enable=function(){var a=this.p;this.e.removeAttribute("readonly");this.listen();a&&a.enable&&a.enable(this.l);return this};TextAreaPrototype.disable=function(){var a=this.p;this.e.setAttribute("readonly",!0);this.unlisten();a&&a.disable&&a.disable();return this};TextAreaPrototype.listen=function(){var a=this.l;a&&a.kill();this.l=p(this.e);return this};TextAreaPrototype.unlisten=function(){var a=this.l;a&&(a.kill(),this.l=null);return this};TextAreaPrototype.setInvs=
143
- function(a,b){var c=this.i||!1;if(b||c!==a)this._i&&(this._i.kill(),delete this._i),(c=this.p)?c.invs&&c.invs(a):a&&(this._i=n.require("$50","mirror.js").init(this.e)),this.i=a;return this};TextAreaPrototype.getInvs=function(){return this.i||!1};TextAreaPrototype.setMode=function(a){var b=this.p,c=this.i||!1;a!==(this.m||"")&&(this.m=a,b&&b.kill(),this.p=b="code"===a?n.require("$15","ace.js").init(this.e,this.l,this["%"]):"html"===a?n.require("$51","mce.js").init(this.e,this.l):null,this.setInvs(c,
144
- !0),e&&this.focus());return this};TextAreaPrototype.setStrf=function(a){this["%"]=a;"code"===this.m&&this.p.strf(a);return this};TextAreaPrototype.name=function(a){this.e.setAttribute("name",a);return this};TextAreaPrototype.placeholder=function(a){this.e.setAttribute("placeholder",a);return this};TextAreaPrototype.redraw=function(){var a=this.p;a&&a.resize&&a.resize()};TextAreaPrototype=null;return c}({},v,z));n.register("$47",function(c,f,n){function p(a){var b=f.console;b&&b.error&&b.error(a)}
145
- function b(a){var b=n.createElement("div");a&&b.setAttribute("class",a);return b}function e(a){return function(){a.resize();return this}}function a(a){return function(b){for(var c=b.target,d=c.$index;null==d&&"DIV"!==c.nodeName&&(c=c.parentElement);)d=c.$index;null!=d&&(b.stopImmediatePropagation(),a.select(d));return!0}}function d(a){return function(){a.redrawDirty()&&a.redraw();return!0}}function m(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||
146
- b.ctrlKey||b.metaKey||b.altKey)return!0;a.selectNext(c);b.stopPropagation();b.preventDefault();return!1}}function k(a,b,c){function d(a){p("row["+a+"] disappeared");return{cellVal:function(){return""}}}return function(e){var g=b||0,f=c?-1:1,y=a.rows||[];e.sort(function(a,b){return f*(y[a]||d(a)).cellVal(g).localeCompare((y[b]||d(b)).cellVal(g))})}}function g(a){this.w=a}function l(a){this.t=a;this.length=0}function A(a,b,c){var d=n.createElement("div");d.className=c||"";this._=d;this.d=b||[];this.i=
147
- a||0;this.length=b.length}function B(a){this.live=a;this.rows=[]}c.create=function(a){return new g(a)};var s=g.prototype;s.init=function(c){var g=this.w,q=g.id,f=g.splity(q+"-thead",q+"-tbody"),l=f[0],f=f[1],k=[],p=[],y=[],F=[];if(c)this.ds=c,this.idxs=p,this._idxs=null;else if(!(c=this.ds))throw Error("No datasource");l.css.push("wg-thead");f.css.push("wg-tbody");c.eachCol(function(a,b,c){y[a]=q+"-col-"+b;F[a]=c||b});for(var n=b(),s=-1,B=y.length,D=b("wg-cols"),v=l.splitx.apply(l,y);++s<B;)v[s].header(F[s]),
148
- D.appendChild(n.cloneNode(!1)).setAttribute("for",y[s]);c.eachRow(function(a,b,c){k[a]=new A(a,b,c);p[a]=a});this.rows=k;this.cols=D;this.ww=null;this.root=n=f.body;this.head=l;l.redraw=e(this);l=f.fixed=v[0].bodyY()||20;g.lock().resize(l,f);g.css.push("is-table");g.restyle();this.sc?this._re_sort(B):c.sort&&c.sort(p);this.redrawDirty();this.render();h(n).attr("tabindex","-1").on("keydown",m(this)).on("mousedown",a(this)).on("scroll",d(this));return this};s.clear=function(){for(var a=this.pages||
149
- [],b=a.length;0!==b--;)a[b].destroy();this.pages=[];this.sy=this.mx=this.mn=this.vh=null;void 0;return this};s.render=function(){for(var a,b,c=[],d=this.rows||[],e=-1,g,f=this.idxs,y=f.length,l=this.idxr={},k=this.r,h=this._r,m=this.root,p=this.cols;++e<y;){0===e%100&&(a=p.cloneNode(!0),b=new B(a),b.h=2200,b.insert(m),c.push(b));g=f[e];l[g]=e;a=d[g];if(null==a)throw Error("Render error, no data at ["+g+"]");a.page=b;b.rows.push(a)}b&&100!==b.size()&&b.sleepH(22);this.pages=c;this.mx=this.mn=null;
150
- this.redrawDirty();this.redraw();null==k?null!=h&&(a=d[h])&&a.page&&(delete this._r,this.select(h,!0)):(a=d[k])&&a.page?this.select(k,!0):(this.deselect(),this._r=k);return this};s.resize=function(){var a=-1,b=this.ww||(this.ww=[]),c=this.w,d=c.cells[0],e=d.body.childNodes,g=e.length,f=this.pages||[],y=f.length;for(c.redraw.call(d);++a<g;)b[a]=e[a].style.width;if(y){c=this.mx;for(a=this.mn;a<=c;a++)f[a].widths(b);this.redrawDirty()&&this.redraw()}};s.redrawDirty=function(){var a=!1,b=this.root,c=
151
- b.scrollTop,b=b.clientHeight;this.sy!==c&&(a=!0,this.sy=c);this.vh!==b&&(a=!0,this.vh=b);return a};s.redraw=function(){for(var a=0,b=-1,c=null,d=null,e=this.ww,g=this.sy,f=this.vh,y=this.mn,l=this.mx,k=Math.max(0,g-100),g=f+g+100,h=this.pages||[],m=h.length;++b<m&&!(a>g);)f=h[b],a+=f.height(),a<k||(null===c&&(c=b),d=b,f.rendered||f.render(e));if(y!==c){if(null!==y&&c>y)for(b=y;b<c;b++){f=h[b];if(!f)throw Error("Shit!");f.rendered&&f.sleep()}this.mn=c}if(l!==d){if(null!==l&&d<l)for(b=l;b>d;b--)f=h[b],
152
  f.rendered&&f.sleep();this.mx=d}};s.selected=function(){return this.r};s.thead=function(){return this.w.cells[0]};s.tbody=function(){return this.w.cells[1]};s.tr=function(a){return(a=this.row(a))?a.cells():[]};s.row=function(a){return this.rows[a]};s.td=function(a,b){return this.tr(a)[b]};s.next=function(a,b,c){null==c&&(c=this.r||0);var d=this.idxs,e=d.length,g=(this.idxr||{})[c];for(c=g;c!==(g+=a)&&!(0<=g&&e>g);)if(b&&e)g=1===a?-1:e,b=!1;else return null;c=d[g];return null==c||null==this.rows[c]?
153
- (p("Bad next: ["+g+"] does not map to data row"),null):c};s.selectNext=function(a,b,c){a=this.next(a,b);null!=a&&this.r!==a&&this.select(a,c);return this};s.deselect=function(a){var b=this.r;null!=b&&(this.r=null,h(this.tr(b)).removeClass("selected"),this.w.fire("wgRowDeselect",[b,a]));return this};s.selectRow=function(a,b){return this.select(this.idxs[a])};s.select=function(a,b){var c=this.rows[a],d=c&&c.page;if(!d)return this.deselect(!1),p("Row is filtered out"),this;this.deselect(!0);var e,g=
154
- this.w.cells[1];d.rendered||(e=d.top(),g.scrollY(e),this.redrawDirty()&&this.redraw());if(!c.rendered)return d.rendered||p("Failed to render page"),p("Row ["+c.i+"] not rendered"),this;d=c.cells();h(d).addClass("selected");this.r=a;b||(e=g.scrollY(),h(this.root).focus(),e!==g.scrollY()&&g.scrollY(e));g.scrollTo(d[0],!0);this.w.fire("wgRowSelect",[a,c.data()]);return this};s.unfilter=function(){this._idxs&&(this.idxs=this._sort(this._idxs),this._idxs=null,this.clear().render());return this};s.filter=
155
- function(a){this._idxs||(this._idxs=this.idxs);this.idxs=this._sort(a);return this.clear().render()};s.each=function(a){for(var b,c=-1,d=this.rows||[],e=this.idxs||[],g=e.length;++c<g;)b=e[c],a(d[b],c,b);return this};s.sortable=function(a){var b=this.sc||(this.sc=new l(this));b.has(a)||b.add(a);return this};s._re_sort=function(a){var b=-1,c=this.sc,d=c.active;for(this.sc=c=new l(this);++b<a;)c.add(b);d&&(b=this.head.indexOf(d.id),-1===b&&(b=Math.min(d.idx,a-1)),this.sort(b,d.desc));return this};s._sort=
156
- function(a,b){b?(this.s=b,b(a)):(b=this.s)&&b(a);return a};s.sort=function(a,b){this._sort(this.idxs,k(this,a,b));this.sc.activate(a,b);return this};s=null;s=l.prototype;s.has=function(a){return null!=this[a]};s.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};s.toggle=function(a){this.t.sort(a,!this[a].desc).clear().render();
157
  return this};s.activate=function(a,b){var c,d;c=this.active;var e=this[a],g=this.t.head.cells;c&&(d=g[c.idx])&&(d.removeClass(c.css),c!==e&&d.restyle());(d=g[a])?(e.desc=b,this.active=e,c="wg-"+(b?"desc":"asc"),d.addClass(c).restyle(),e.css=c):this.active=null;return this};s=null;s=A.prototype;s.render=function(a){var b,c=[],d=this._,e=this.length;if(d){for(this.c=c;0!==e--;)b=d.cloneNode(!1),c[e]=this.update(e,b),b.$index=this.i,a[e].appendChild(b);this._=null}else for(c=this.c;0!==e--;)a[e].appendChild(c[e]);
158
- this.rendered=!0;return this};s.update=function(a,b){var c=b||this.c[a]||{},d=(this.d[a]||function(){})()||"\u00a0";null==d.innerHTML?c.textContent=d:c.innerHTML=d.innerHTML;return c};s.cells=function(){return this.c||[]};s.data=function(){for(var a=-1,b=[],c=this.length;++a<c;)b[a]=this.cellVal(a);return b};s.destroy=function(){this.page=null;this.rendered=!1};s.cellVal=function(a){a=this.d[a]()||"";return String(a.textContent||a)};s=null;s=B.prototype;s.size=function(){return this.rows.length};
159
- s.insert=function(a){var c=this.h,d=b("wg-dead");d.style.height=String(c)+"px";a.appendChild(d);return this.dead=d};s.top=function(){return(this.rendered?this.live:this.dead).offsetTop};s.height=function(){var a=this.h;null==a&&(this.h=a=this.rendered?this.live.firstChild.offsetHeight:this.dead.offsetHight);a||p("row has zero height");return a};s.render=function(a){for(var b,c=-1,d=this.rows,e=d.length,g=this.dead,f=this.live,y=f.childNodes;++c<e;)b=d[c],b.rendered||b.render(y);e=a.length;for(c=0;c<
160
- e;c++)y[c].style.width=a[c];g.parentNode.replaceChild(f,g);this.rendered=!0;this.h=null;return this};s.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};s.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};s.widths=function(a){for(var b=this.live.childNodes,c=a.length;0!==c--;)b[c].style.width=a[c];return this};
161
- s.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()};s=null;return c}({},v,z));n.register("$40",function(c,f,D){function p(a,b){var c=a.id,d=c&&s[c],e=d&&d.parent();if(!d||!e)return null;var g=e.dir===B,c=g?"X":"Y",f="page"+c,g=g?A:l,k=g(e.el),c=b["offset"+c],h=e.el,m=h.className;null==c&&(c=b[f]-g(a));c&&(k+=c);h.className=m+" is-resizing";return{done:function(){h.className=m},move:function(a){e.resize(a[f]-k,
162
- d);return!0}}}function b(b,c){function d(){h(D).off("mousemove",e);w&&(w.done(),w=null);return!0}function e(a){w?w.move(a):d();return!0}if(w)return!0;w=p(b.target,b);if(!w)return!0;h(D).one("mouseup",d).on("mousemove",e);return a(b)}function e(a,b){var c=b.type;"touchmove"===c?w&&w.move(b):"touchstart"===c?w=p(a.target,b):"touchend"===c&&w&&(w.done(),w=null)}function a(a){a.stopPropagation();a.preventDefault();return!1}function d(a){var b=r;b&&b.redraw();a&&a.redraw();return r=a}function m(a,b){var c=
163
- h(b).on("editFocus",function(){c.trigger("wgFocus",[d(a)])}).on("editBlur",function(){c.trigger("wgBlur",[d(null)])})}function k(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;s[b]=this;this.clear()}var g=n.require("$18","html.js"),l=g.top,A=g.left,B=1,s={},r,w=!1;c.init=function(a){var c=new k(a);c.redraw();n.require("$45","touch.js").ok(function(b){b.dragger(a,e)});h(a).mousedown(b);return c};f=k.prototype;f.fire=function(a,b){var c=
164
  h.Event(a);c.cell=this;h(this.el).trigger(c,b);return this};f.each=function(a){for(var b=-1,c=this.cells,d=c.length;++b<d;)a(c[b],b);return this};f.indexOf=function(a){return(a=s[a.id||String(a)])&&a.pid===this.id?a.index:-1};f.on=function(){return this.$("on",arguments)};f.off=function(){return this.$("off",arguments)};f.find=function(a){return h(this.el).find(a)};f.$=function(a,b){h.fn[a].apply(h(this.el),b);return this};f.addClass=function(a){this.css.push(a);return this};f.removeClass=function(a){a=
165
- this.css.indexOf(a);-1!==a&&this.css.splice(a,1);return this};f.parent=function(){return this.pid&&s[this.pid]};f.splitx=function(){return this._split(B,arguments)};f.splity=function(){return this._split(2,arguments)};f._split=function(a,b){(this.length||this.field)&&this.clear();for(var c=-1,d,e=b.length,f=1/e,l=0;++c<e;){d=g.el();this.body.appendChild(d);for(var h=d,m=b[c],p=m,n=1;s[m];)m=p+"-"+ ++n;h.id=m;d=new k(d);d.index=c;d.pid=this.id;d._locale(this.lang,this.rtl);d.pos=l;l+=f;this.cells.push(d);
166
  this.length++}this.dir=a;this.redraw();return this.cells};f.destroy=function(){this.clear();delete s[this.id];var a=this.el;a.innerHTML="";this.body=null;a.className=this._cn||"";h(a).off();return this};f.exists=function(){return this===s[this.id]};f.clear=function(){for(var a=this.el,b=this.cells,c=this.field,d=this.body,e=this.nav,f=this.length||0;0!==f--;)delete s[b[f].destroy().id];this.cells=[];this.length=0;e&&(a.removeChild(e),this.nav=null);d&&(c&&(g.ie()&&h(d).triggerHandler("blur"),c.destroy(),
167
- this.field=null),this.table&&(this.table=null),a===d.parentNode&&a.removeChild(d));this.body=a.appendChild(g.el("","wg-body"));this._h=null;return this};f.resize=function(a,b){if(!b&&(b=this.cells[1],!b))return;var c=b.index,d=this.cells,e=h(this.el)[this.dir===B?"width":"height"](),g=d[c+1],c=d[c-1];pad=(b.body||b.el.firstChild).offsetTop||0;max=(g?g.pos*e:e)-pad;min=c?c.pos*e:0;b.pos=Math.min(max,Math.max(min,a))/e;this.redraw();return this};f.distribute=function(a){for(var b=-1,c=0,d,e=this.cells,
168
  g=a.length;++b<g&&(d=e[++c]);)d.pos=Math.max(0,Math.min(1,a[b]));this.redraw();return this};f.distribution=function(){for(var a=[],b=0,c=this.cells,d=c.length-1;b<d;)a[b]=c[++b].pos;return a};f.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"),this.field.editable()?a.push("is-editable"):
169
- a.push("is-readonly"));a=a.join(" ");a!==this._css&&(this._css=a,this.el.className=a);return this};f.redraw=function(a){this.restyle();var b=this.el,c=this.body,d=this.field;if(c){var e,g=b.clientWidth||0,f=b.clientHeight||0,l=c.offsetTop||0,f=l>f?0:f-l;this._h!==f&&(this._h=f,c.style.height=String(f)+"px",e=d);this._w!==g&&(this._w=g,e=d);e&&e.redraw()}c=this.length;g=1;f=this.nav;for(l=2===this.dir?"height":"width";0!==c--;)d=this.cells[c],f?e=1:(d.fixed&&(d.pos=d.fixed/h(b)[l]()),e=g-d.pos,g=d.pos),
170
- d.el.style[l]=String(100*e)+"%",d.redraw(a);return this};f.contents=function(a,b){var c=this.el,d=this.body;if(null==a)return d.innerHTML;this.length?this.clear():d&&(c.removeChild(d),d=null);d||(this.body=d=c.appendChild(g.el("",b||"wg-content")),this._h=null,(c=this.lang)&&this._locale(c,this.rtl,!0));"string"===typeof a?h(d)._html(a):a&&this.append(a);this.redraw();return this};f.textarea=function(a,b){var c=this.field;if(c){var d=c.editable();c.reload(a,b);d!==b&&this.restyle()}else this.length&&
171
- this.clear(),d=g.el("textarea"),d.setAttribute("wrap","virtual"),d.value=a,this.contents(d),c=n.require("$46","field.js")._new(d)[b?"enable":"disable"](),m(this,d),this.field=c,this.restyle();this.lang||this.locale("en");return c};f.locale=function(a){a=n.require("$38","locale.js").cast(a);return this._locale(String(a),a.isRTL())};f._locale=function(a,b,c){var d=this.body;if(c||a!==this.lang)this.lang=a,d&&d.setAttribute("lang",a);if(c||b!==this.rtl)this.rtl=b,d&&d.setAttribute("dir",b?"RTL":"LTR");
172
  return this};f.editable=function(){var a=this.field;if(a)return a.editable()?a:null;var b=this.cells,c=b.length,d=this.navigated();if(null!=d)return b[d].editable();for(;++d<c;){for(d=0;d<c;c++);if(a=b[d].editable())return a}};f.eachTextarea=function(a){var b=this.field;b?a(b):this.each(function(b){b.eachTextarea(a)});return this};f.append=function(a){a&&(a.nodeType?g.init(this.body.appendChild(a)):g.init(h(a).appendTo(this.body)));return this};f.prepend=function(a){var b=this.body;if(a.nodeType){var c=
173
  b.firstChild;g.init(c?b.insertBefore(a,c):b.appendChild(a))}else g.init(h(a).prependTo(b));return this};f.before=function(a){var b=this.body;a.nodeType?g.init(this.el.insertBefore(a,b)):g.init(h(a).insertBefore(b));return this};f.header=function(a,b){if(null==a&&null==b)return this.el.getElementsByTagName("header")[0];this.t=g.txt(a||"");this.el.insertBefore(g.el("header",b),this.body).appendChild(this.t);this.redraw();return this};f.title=function(a){var b=this.t;if(b)return b.nodeValue=a||"",b;
174
- this.header(a);return this.t};f.titled=function(){var a=this.t;return a&&a.nodeValue};f.bodyY=function(){return l(this.body,this.el)};f.scrollY=function(a){if(S===a)return this.body.scrollTop;this.body.scrollTop=a};f.tabulate=function(a){var b=this.table;b?b.clear():b=n.require("$47","wgtable.js").create(this);b.init(a);return this.table=b};f.lock=function(){this.body.className+=" locked";return this};f.scrollTo=function(a,b){var c,d=this.body;c=d.scrollTop;var e=l(a,d);if(c>e)c=e;else{var g=d.clientHeight,
175
- e=e+h(a).outerHeight();if(g+c<e)c=e-g;else return}b?d.scrollTop=c:h(d).stop(!0).animate({scrollTop:c},250)};f.navigize=function(b,c){function d(a){var b=f[a],c=k[a],e=h(b.el).show();c.addClass("active");l=a;m.data("idx",a);b.fire("wgTabSelect",[a]);return e}var e=this,f=e.cells,y=e.nav,l,k=[];y&&e.el.removeChild(y);var y=e.nav=e.el.insertBefore(g.el("nav","wg-tabs"),e.body),m=h(y).on("click",function(b){var c=h(b.target).data("idx");if(null==c)return!0;if(null!=l){var g=k[l];h(f[l].el).hide();g.removeClass("active")}d(c);
176
- e.redraw();return a(b)});null==c&&(c=m.data("idx")||0);e.each(function(a,c){k[c]=h('<a href="#'+a.id+'"></a>').data("idx",c).text(b[c]).appendTo(m);a.pos=0;h(a.el).hide()});d(f[c]?c:0);e.lock();e.redraw();return e};f.navigated=function(){var a=this.nav;if(a)return h(a).data("idx")};f=null;return c}({},v,z));n.register("$24",function(c,f,D){function p(a){var b=[];a&&(a.saved()||b.push("po-unsaved"),a.fuzzy()?b.push("po-fuzzy"):a.flagged()&&b.push("po-flagged"),a.translation()||b.push("po-empty"),a.comment()&&
177
- b.push("po-comment"));return b.join(" ")}function b(a,b,c){b=h(a.title(b).parentNode);var d=b.find("span.lang");c?(c=n.require("$38","locale.js").cast(c),d.length||(d=h("<span></span>").prependTo(b)),d.attr("lang",c.lang).attr("class",c.getIcon()||"lang region region-"+(c.region||"zz").toLowerCase())):(d.remove(),c="en");a.locale(c);return b}function e(){this.dirty=0}var a="poUpdate",d="changing",m="changed",k=0,g=1,l=2,A=3,B=4,s=5,r=/^\s+/,w,q,C=n.require("$3","string.js").sprintf,v=n.require("$18",
178
- "html.js");c.extend=function(a){return a.prototype=new e};c.localise=function(a){q=a;return c};var z=function(){var a=D.createElement("p");return function(b){a.innerHTML=b.replace("src=","x=");return a.textContent}}(),u=e.prototype=n.require("$39","abstract.js").init(["getListColumns","getListHeadings","getListEntry"],["editable","t"]);u.init=function(){this.localise();this.editable={source:!0,target:!0};this.mode="";this.html=!1;return this};u.localise=function(a){a||(a=q||n.require("$1","t.js").init());
179
- var b=[];b[k]=a._x("Source text","Editor")+":";b[A]=a._x("%s translation","Editor")+":";b[B]=a._x("Context","Editor")+":";b[s]=a._x("Comments","Editor")+":";b[g]=a._x("Single","Editor")+":";b[l]=a._x("Plural","Editor")+":";b[6]=a._x("Untranslated","Editor");b[7]=a._x("Translated","Editor");b[8]=a._x("Fuzzy","Editor");this.labels=b;this.t=a;return this};u.setRootCell=function(a){function b(a){c.redraw(!0,a);return!0}var c=n.require("$40","wingrid.js").init(a);h(f).on("resize",b);this.redraw=b;h(a).on("wgFocus wgBlur",
180
- function(a,b){a.stopPropagation();w=b});this.destroy=function(){c.destroy();h(f).off("resize",b)};this.rootDiv=a;return c};u.$=function(){return h(this.rootDiv)};u.setListCell=function(a){var b=this;b.listCell=a;a.on("wgRowSelect",function(a,c){b.loadMessage(b.po.row(c));return!0}).on("wgRowDeselect",function(a,c,d){d||b.loadNothing();return!0})};u.setSourceCell=function(a){this.sourceCell=a};u.setTargetCell=function(a){this.targetCell=a};u.next=function(a,b,c){for(var d=this.listTable,e=d.selected(),
181
- g=e,f,l=this.po;null!=(e=d.next(a,c,e));){if(g===e){e=null;break}if(b&&(f=l.row(e),f.translated(0)))continue;break}null!=e&&d.select(e,!0);return e};u.current=function(a){var b=this.active;if("undefined"===typeof a)return b;a?a.is(b)?this.reloadMessage(a):this.loadMessage(a):this.unloadActive();return this};u.getTargetOffset=function(){if(this.active)return this.targetCell&&this.targetCell.navigated()||0};u.getTargetEditable=function(){return this.editable.target&&this.targetCell&&this.targetCell.editable()};
182
  u.getSourceEditable=function(){return this.editable.source&&this.sourceCell&&this.sourceCell.editable()};u.getContextEditable=function(){return this.editable.context&&this.contextCell&&this.contextCell.editable()};u.getFirstEditable=function(){return this.getTargetEditable()||this.getSourceEditable()||this.getContextEditable()};u.searchable=function(a){a&&(this.dict=a,this.po&&this.rebuildSearch());return this.dict&&!0};u.rebuildSearch=function(){var a=-1,b=this.po.rows,c=b.length,d=this.dict;for(d.clear();++a<
183
  c;)d.add(a,b[a].toText())};u.filtered=function(){return this.lastSearch||""};u.filter=function(a,b){var c,d=this.listTable,e=this.lastFound,g=this.lastSearch;if(a){if(g===a)return e||0;if(g&&!e&&0===a.indexOf(g))return 0;c=this.dict.find(a)}this.lastSearch=g=a;this.lastFound=e=c?c.length:this.po.length;c?d.filter(c):d.unfilter();b||this.fire("poFilter",[g,e]);return e};u.countFiltered=function(){return this.lastSearch?this.lastFound:this.po.length};u.unsave=function(a,b){var c=!1;if(a=a||self.active){if(c=
184
- a.saved(b))this.dirty++,a.unsave(b),this.fire("poUnsaved",[a,b]);this.markUnsaved(a)}return c};u.markUnsaved=function(a){var b=this.po.indexOf(a);if(b=this.listTable.tr(b)){var c=b[0].className;a=c.replace(/(?:^| +)po-[a-z]+/g,"")+" "+p(a);a!==c&&h(b).attr("class",a)}};u.save=function(a){var b=this.po;if(this.dirty||a)b.each(function(a,b){b.save()}),this.listCell.find("div.po-unsaved").removeClass("po-unsaved"),this.dirty=0,this.fire("poSave");return b};u.fire=function(a,b){var c=this.handle;if(c&&
185
- c[a]&&(c=c[a].apply(this,b||[]),!1===c))return!1;c=h.Event(a);this.$().trigger(c,b);return!c.isDefaultPrevented()};u.on=function(a,b){this.$().on(a,b);return this};u.getSorter=function(){return null};u.reload=function(){var a=this,b,c=a.listCell,d=a.listTable,e=a.po,g=e&&e.locale(),f=g&&g.isRTL(),l=e&&e.length||0;if(!e||!e.row)return c&&c.clear().header("Error").contents("Invalid messages list"),!1;a.lastSearch&&(a.lastSearch="",a.lastFound=l,a.fire("poFilter",["",l]));d&&(b=d.thead().distribution());
186
- a.listTable=d=c.tabulate({eachCol:function(b){var c,d,e=a.getListColumns(),g=a.getListHeadings();for(d in e)c=e[d],b(c,d,g[c])},eachRow:function(b){e.each(function(c,d){b(d.idx,a.getListEntry(d),p(d))})},sort:a.getSorter()});var k,c=a.getListColumns();for(k in c)d.sortable(c[k]);b&&d.thead().distribute(b);d.tbody().$(f?"addClass":"removeClass",["is-rtl"]);a.targetLocale=g;a.fire("poLoad");return!!l};u.load=function(a,b){this.po=a;this.dict&&this.rebuildSearch();this.reload()&&(-1!==b?this.listTable.selectRow(b||
187
  0):this.active&&this.unloadActive())};u.pasteMessage=function(a){var b,c=0;(b=this.sourceCell)&&b.eachTextarea(function(b){b.val(a.source(null,c++))});(b=this.contextCell)&&b.eachTextarea(function(b){b.val(a.context())});if(b=this.targetCell)c=0,b.eachTextarea(function(b){b.val(a.translation(c++))});this.updateListCell(a,"source");this.updateListCell(a,"target");return this};u.reloadMessage=function(a){var b=this.sourceCell,c=this.targetCell,d;this.pasteMessage(a);b&&this.setNotes(a,b)&&b.redraw();
188
- c&&(d=c.navigated()||0,d=this.setErrors(a.errors(d),c),!b&&this.setNotes(a,c)&&(d=!0),d&&c.redraw());return this};u.setStatus=function(){return null};u.setNotes=function(a,b){var c=[],d=!1,e=this.$notes,g=this.labels,f=a.notes(),l=a.context(),k=[],m=a.tags(),p=m&&m.length;l&&(k.push("<span>"+v.h(g[B])+"</span>"),k.push("<mark>"+v.h(l)+"</mark>"));if(p&&this.getTag)for(k.push("<span>Tagged:</span>");0<=--p;)(g=this.getTag(m[p]))&&k.push('<mark class="tag">'+v.h(g.mod_name)+"</mark>");k.length&&c.push(k.join(" "));
189
- f&&c.push(v.h(f,!0));c.length?(e||(e=b.find("p.notes"),e.length||(e=h('<p class="notes"></p>').insertAfter(b.header())),this.$notes=e),e.html(c.join("\n")).show(),v.init(e),d=!0):e&&e.text()&&(e.text("").hide(),d=!0);return d};u.setErrors=function(a,b){var c=!1,d=this.$errs;a&&a.length?(d||(d=b.find("p.errors"),d.length||(d=h('<p class="errors"></p>').insertAfter(this.targetCell.header())),this.$errs=d),d.html(v.h(a.join(".\n")+".",!0)).show(),v.init(d),c=!0):d&&d.text()&&(d.text("").hide(),c=!0);
190
- return c};u.loadMessage=function(c){function e(a,b){var c=b?a.split(" "):a.split(" ",1);a=c[0];"="===a.charAt(0)&&(a=a.substr(1),a=["zero","one","two"][Number(a)]||a);c[0]=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();return c.join(" ")}function f(a,d){var m=S,p=O[k];a.off();a.titled()!==p&&b(a,p,d||"en");p=!1;u.setNotes(c,a)&&(p=!0);if(c.plural()){var p=-1,n=[],r=[],q=a.id+"-",s=c.sourceForms()||d&&d.plurals||["One","Other"],A=s.length;if(2!==A||"="===s[0].charAt(0)&&"=1"!==s[0])for(;++p<A;)n[p]=
191
- q+String(p),r[p]=e(s[p])+":";else n=[q+"-0",q+"-1"],r=[O[g],O[l]];a.splity.apply(a,n);a.each(function(a,b){a.header(r[b]).textarea(c.source(null,b),m).setStrf(H).setMode(v).setInvs(z)});a.lock();m&&a.each(function(a,b){h(a,b)})}else p&&a.redraw(),a.textarea(c.source(),m).setStrf(H).setMode(v).setInvs(z),m&&h(a,0)}function h(b,e){b.on(d,function(a,b){c.source(b,e);0===e&&u.updateListCell(c,"source");u.unsave(c,e)}).on(m,function(){0===e&&u.po.reIndex(c);u.dict&&u.rebuildSearch();u.fire(a,[c])})}function p(a,
192
- d,g){P&&a.eachTextarea(function(a){a.ping()});a.off();var f=d.isKnown()&&d.label||"Target",f=C(O[A],f);a.titled()!==f&&b(a,f,d);f=!1;!this.sourceCell&&u.setNotes(c,a)&&(f=!0);u.setErrors(c.errors(g),a)&&(f=!0);u.setStatus(c,g);if(c.pluralized()){var l=[],k=[],h=a.id+"-",m=c.targetForms()||d.plurals||["One","Other"],f=m.length,r=function(a){var b=m[a];k.push(b?e(b,!0):"Form "+a);l.push(h+String(a))};for(c.each(r);(d=l.length)<f;)r(d);a.splitx.apply(a,l);a.each(function(a,b){var d=P&&!c.disabled(b);
193
- a.textarea(c.translation(b),d).setStrf(H).setMode(v).setInvs(z);P&&n(a,b)});a.navigize(k,g||null).on("wgTabSelect",function(b,d){var e=P&&b.cell.editable();e&&e.focus();u.setErrors(c.errors(d),a);u.setStatus(c,d);u.fire("poTab",[d])})}else f&&a.redraw(),a.textarea(c.translation(),P&&!c.disabled(0)).setStrf(H).setMode(v).setInvs(z),P&&n(a,0)}function n(b,e){b.on(d,function(a,b,d){c.translate(b,e);0===e&&u.updateListCell(c,"target");c.fuzzy(e)?u.fuzzy(!1,c,e):u.unsave(c,e);""===b?u.fire("poEmpty",[!0,
194
- c,e]):""===d&&u.fire("poEmpty",[!1,c,e])}).on(m,function(){u.dict&&u.rebuildSearch();u.fire(a,[c])})}function r(e){e.off();var g=O[B];e.titled()!==g&&(b(e,g),u.setStatus(null));e.textarea(c.context(),!0).setMode(v).setInvs(z);X&&e.on(d,function(a,b){c.context(b);u.updateListCell(c,"source");u.unsave(c,R)}).on(m,function(){u.po.reIndex(c);u.dict&&u.rebuildSearch();u.fire(a,[c])})}function q(a){var e=O[s];a.titled()!==e&&b(a,e);a.off().on(d,function(a,b){c.comment(b);u.fire("poComment",[c,b]);u.unsave(c,
195
- R)}).textarea(c.comment(),!0)}var u=this,v=u.mode,D=c.isHTML(),z=u.inv||!1,E=this.fmt||null,H=c.format()||null,G=c.is(u.active),R=0,L=u.sourceCell,T=u.targetCell,U=u.contextCell,V=u.commentCell,P=u.editable.target,S=u.editable.source,X=u.editable.context,Q=w,Y=u.sourceLocale,W=u.targetLocale,O=u.labels;u.html!==D&&(u.html=D,"code"!==u.mode&&(v=D?"html":"",u.setMode(v)));u.active=c;L&&f(L,Y);U&&r(U);T&&W&&(R=T.navigated()||0,p(T,W,R));V&&q(V);Q&&(Q.exists()||(Q=Q.parent()),(D=Q.editable())&&D.focus());
196
  E!==H&&(this.fmt=H);G||u.fire("poSelected",[c])};u.unloadActive=function(){var a;(a=this.$notes)&&a.text("").hide();(a=this.$errs)&&a.text("").hide();(a=this.sourceCell)&&a.off().clear();(a=this.contextCell)&&a.off().clear();(a=this.targetCell)&&a.off().clear();(a=this.commentCell)&&a.off();this.active&&(this.fire("poDeselected",[this.active]),this.active=null);return this};u.loadNothing=function(){var a,b=this.t,c=this.mode||"",d=this.inv||!1,e=this.fmt;this.unloadActive();this.setStatus(null);(a=
197
  this.commentCell)&&a.textarea("",!1);if(a=this.sourceCell)a.textarea("",!1).setStrf(e).setMode(c).setInvs(d),a.title(b._x("Source text not loaded","Editor")+":");if(a=this.contextCell)a.textarea("",!1).setMode(c).setInvs(d),a.title(b._x("Context not loaded","Editor")+":");if(a=this.targetCell)a.textarea("",!1).setStrf(e).setMode(c).setInvs(d),a.title(b._x("Translation not loaded","Editor")+":");this.fire("poSelected",[null])};u.updateListCell=function(a,b){var c=this.getListColumns()[b],d=this.po.indexOf(a);
198
- (d=this.listTable.row(d))&&d.update(c)};u.cellText=function(a){if(-1!==a.indexOf("<")||-1!==a.indexOf("&"))a=z(a);return a.replace(r,"")||"\u00a0"};u.fuzzy=function(a,b,c){var d=4===this.flag(null,b,c);!0!==a||d?!1===a&&d&&this.flag(0,b,c)&&this.fire("poFuzzy",[b,!1,c]):this.flag(4,b,c)&&this.fire("poFuzzy",[b,!0,c]);return d};u.flag=function(b,c,d){if(!c){c=this.active;d=this.getTargetOffset();if(null==d)return null;d&&c.targetForms()&&(d=0)}var e=c.flagged(d);if(null==b)return e;if(e===b||b&&!c.translated(d)||
199
  !this.fire("poFlag",[b,e,c,d]))return!1;c.flag(b,d);this.fire(a,[c])&&this.unsave(c,d);this.setStatus(c,d);return!0};u.add=function(b,c){var d,e=this.po.get(b,c);e?d=this.po.indexOf(e):(d=this.po.length,e=this.po.add(b,c),this.load(this.po,-1),this.fire("poAdd",[e]),this.fire(a,[e]));this.lastSearch&&this.filter("");this.listTable.select(d);return e};u.del=function(b){if(b=b||this.active){var c=this.lastSearch,d=this.po.del(b);null!=d&&(this.unsave(b),this.fire("poDel",[b]),this.fire(a,[b]),this.reload(),
200
  this.dict&&this.rebuildSearch(),this.active&&this.active.equals(b)&&this.unloadActive(),this.po.length&&(c&&this.filter(c),this.active||(d=Math.min(d,this.po.length-1),this.listTable.select(d))))}};u.setMono=function(a){return this.setMode(a?"code":this.html?"html":"")};u.setMode=function(a){this.mode!==a&&(this.mode=a,this.callTextareas(function(b){b.setMode(a)}));return this};u.getMono=function(){return"code"===this.mode};u.setInvs=function(a){(this.inv||!1)!==a&&(this.inv=a,this.callTextareas(function(b){b.setInvs(a)}),
201
- this.fire("poInvs",[a]));return this};u.getInvs=function(){return this.inv||!1};u.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};u.focus=function(){var a=this.getTargetEditable();a&&a.focus();return this};u=null;return c}({},v,z));n.register("$25",function(c,f,h){Number.prototype.format=function(c){c=Math.pow(10,c||0);var b=Math.round(c*this)/c;c=[];var b=String(b),e=b.split("."),b=e[0],
202
- e=e[1],a=b.length;do c.unshift(b.substring(a-3,a));while(0<(a-=3));b=c.join(",");if(c=e){c=e;for(var d,e=c.length;"0"===c.charAt(--e);)d=e;d&&(c=substring(0,d));c=e=c}c&&(b+="."+e);return b};Number.prototype.percent=function(c){var b=0,e=this&&c?100*(this/c):0;if(0===e)return"0";if(100===e)return"100";if(99<e)e=Math.min(e,99.9),c=e.format(++b);else if(0.5>e){e=Math.max(e,1E-4);do c=e.format(++b);while("0"===c&&4>b);c=c.substr(1)}else c=e.format(0);return c};return c}({},v,z));n.register("$12",function(c,
203
- f,h){function p(){this.init()._validate();this.sourceLocale={lang:"en",label:"English",plurals:["One","Other"]}}f=n.require("$24","base.js");n.require("$25","number.js");c.init=function(b){var c=new p;b=c.setRootCell(b);var a=b.splity("po-list","po-edit"),d=a[0],f=a[1],a=f.splitx("po-trans","po-comment"),k=a[0],g=a[1].header("Loading.."),a=k.splity("po-source","po-target"),k=a[0].header("Loading.."),a=a[1].header("Loading..");b.distribute([0.34]);f.distribute([0.8]);c.setListCell(d);c.setSourceCell(k);
204
- c.setTargetCell(a);c.commentCell=g;c.editable.source=!1;return c};f=p.prototype=f.extend(p);f.getListHeadings=function(){var b=this.t||{_x:function(b){return b}};return[b._x("Source text","Editor"),b._x("Translation","Editor")]};f.getListColumns=function(){return{source:0,target:1}};f.getListEntry=function(b){var c=this.cellText;return[function(){var a,d=c(b.source()||""),f=b.context();return f?(a=h.createElement("p"),a.appendChild(h.createElement("mark")).innerText=f,a.appendChild(h.createTextNode("\u00a0"+
205
  d)),a):d},function(){return c(b.translation()||"")}]};f.stats=function(){var b=this.po,c=b.length,a=0,d=0,f=0;b.each(function(b,c){c.fuzzy()?f++:c.translated()?a++:d++});return{t:c,p:a.percent(c)+"%",f:f,u:d}};f.unlock=function(){this._unlocked||(this._unlocked=this.targetLocale,delete this.targetLocale,this.po&&this.po.unlock(),this.editable={source:!0,context:!0,target:!1},this.contextCell=this.targetCell,delete this.targetCell,this.fire("poLock",[!1]),this.active&&this.loadMessage(this.active))};
206
  f.lock=function(){var b;this._unlocked&&(b=this.targetLocale=this._unlocked,delete this._unlocked,this.po&&this.po.lock(b),this.editable={source:!1,context:!1,target:!0},this.targetCell=this.contextCell,delete this.contextCell,this.fire("poLock",[!0,b]),this.active&&this.loadMessage(this.active))};f.locked=function(){return!this._unlocked};f.getSorter=function(){function b(a,b){var f=a.weight(),g=b.weight();return f===g?c(a,b):f>g?-1:1}function c(a,b){return a.hash().localeCompare(b.hash())}var a=
207
- this;return function(d){var f=a.po,k=a.locked()?b:c;d.sort(function(a,b){return k(f.row(a),f.row(b))})}};return c}({},v,z));n.register("$13",function(c,f,n){var p={copy:66,clear:75,save:83,fuzzy:85,next:40,prev:38,enter:13,invis:73},b={38:!0,40:!0,73:!0},e={66:function(a,b){var c=b.current();c&&(c.normalize(),b.focus().pasteMessage(c))},75:function(a,b){var c=b.current();c&&(c.untranslate(),b.focus().pasteMessage(c))},85:function(a,b){b.focus().fuzzy(!b.fuzzy())},13:function(a,b){b.getFirstEditable()&&
208
- b.next(1,!0,!0)},40:function(a,b){var c=a.shiftKey;b.next(1,c,c)},38:function(a,b){var c=a.shiftKey;b.next(-1,c,c)},73:function(a,b){if(!a.shiftKey)return!1;b.setInvs(!b.getInvs())}};c.init=function(a,c){function m(c){if(c.isDefaultPrevented()||!c.metaKey&&!c.ctrlKey)return!0;var d=c.which;if(!k[d])return!0;var f=e[d];if(!f)throw Error("command undefined #"+d);if(c.altKey||c.shiftKey&&!b[d]||!1===f(c,a))return!0;c.stopPropagation();c.preventDefault();return!1}var k={};h(c||f).on("keydown",m);return{add:function(a,
209
- b){e[p[a]]=b;return this},enable:function(){var a,b;for(b in arguments)a=p[arguments[b]],k[a]=!0;return this},disable:function(){h(c||f).off("keydown",m);a=c=k=null}}};return c}({},v,z));n.register("$26",function(c,f,h){function p(){this.reIndex([])}c.init=function(){return new p};f=p.prototype;f.reIndex=function(b){for(var c={},a=-1,d=b.length;++a<d;)c[b[a]]=a;this.keys=b;this.length=a;this.ords=c};f.key=function(b,c){if(null==c)return this.keys[b];var a=this.keys[b],d=this.ords[c];if(c!==a){if(null!=
210
  d)throw Error("Clash with item at ["+d+"]");this.keys[b]=c;delete this.ords[a];this.ords[c]=b}return b};f.indexOf=function(b){b=this.ords[b];return null==b?-1:b};f.add=function(b,c){var a=this.ords[b];null==a&&(this.keys[this.length]=b,a=this.ords[b]=this.length++);this[a]=c;return a};f.get=function(b){return this[this.ords[b]]};f.has=function(b){return null!=this.ords[b]};f.del=function(b){this.cut(this.ords[b],1)};f.cut=function(b,c){c=c||1;var a=[].splice.call(this,b,c);this.keys.splice(b,c);this.reIndex(this.keys);
211
- return a};f.each=function(b){for(var c=-1,a=this.keys,d=this.length;++c<d;)b(a[c],this[c],c);return this};f.sort=function(b){for(var c=-1,a=this.length,d,f=this.keys,k=this.ords,g=[];++c<a;)g[c]=[this[c],f[c]];g.sort(function(a,c){return b(a[0],c[0])});for(c=0;c<a;c++)d=g[c],this[c]=d[0],d=d[1],f[c]=d,k[d]=c;return this};f.join=function(b){return[].join.call(this,b)};f=null;return c}({},v,z));n.register("$27",function(c,f,h){function p(b,c){var a=RegExp("^.{0,"+(b-1)+"}["+c+"]"),d=RegExp("^[^"+c+
212
- "]+");return function(c,e){for(var g=c.length,f;g>b;){f=a.exec(c)||d.exec(c);if(null==f)break;f=f[0];e.push(f);f=f.length;g-=f;c=c.substr(f)}0!==g&&e.push(c);return e}}c.create=function(b){function c(a){return l[a]||"\\"+a}var a,d,f=/(?:\r\n|[\r\n\v\f\u2028\u2029])/g,k=/[ \r\n]+/g,g=/[\t\v\f\x07\x08\\\"]/g,l={"\t":"\\t","\v":"\\v","\f":"\\f","\u0007":"\\a","\b":"\\b"};if(null==b||isNaN(b=Number(b)))b=79;0<b&&(a=p(b-3," "),d=p(b-2,"-\u2013 \\.,:;\\?!\\)\\]\\}\\>"));return{pair:function(a,l){if(!l)return a+
213
- ' ""';l=l.replace(g,c);var k=0;l=l.replace(f,function(){k++;return"\\n\n"});if(!(k||b&&b<l.length+a.length+3))return a+' "'+l+'"';var h=[a+' "'],p=l.split("\n");if(d)for(var n=-1,v=p.length;++n<v;)d(p[n],h);else h=h.concat(p);return h.join('"\n"')+'"'},prefix:function(a,b){var c=a.split(f);return b+c.join("\n"+b)},refs:function(b){b=b.replace(k," ",b);a&&(b=a(b,[]).join("\n#: "));return"#: "+b}}};return c}({},v,z));n.register("$41",function(c,f,h){function p(){this.length=0}c.init=function(){return new p};
214
- f=p.prototype;f.push=function(b){this[this.length++]=b;return this};f.sort=function(b){[].sort.call(this,b);return this};f.each=function(b){for(var c=-1,a=this.length;++c<a;)b(c,this[c]);return this};return c}({},v,z));n.register("$28",function(c,f,h){function p(){}c.extend=function(b){return b.prototype=new p};f=p.prototype=n.require("$39","abstract.js").init(["add","load"]);f.row=function(b){return this.rows[b]};f.lock=function(b){return this.locale(b||{lang:"zxx",label:"Unknown",nplurals:1,pluraleq:"n!=1"})};
215
- f.unlock=function(){var b=this.loc;this.loc=null;return b};f.locale=function(b){null==b?b=this.loc:this.loc=b=n.require("$38","locale.js").cast(b);return b};f.each=function(b){this.rows.each(b);return this};f.indexOf=function(b){"object"!==typeof b&&(b=this.get(b));if(!b)return-1;null==b.idx&&(b.idx=this.rows.indexOf(b.hash()));return b.idx};f.get=function(b){return this.rows&&this.rows.get(b)};f.del=function(b){b=this.indexOf(b);if(-1!==b){var c=this.rows.cut(b,1);if(c&&c.length)return this.length=
216
- this.rows.length,this.rows.each(function(a,b,c){b.idx=c}),b}};f.reIndex=function(b,c){var a=this.indexOf(b),d=b.hash(),f=this.rows.indexOf(d);return f===a?a:-1!==f?(c=(c||0)+1,b.source("Error, duplicate "+String(c)+": "+b.source()),this.reIndex(b,c)):this.rows.key(a,d)};f.sort=function(b){this.rows.sort(b);return this};f["export"]=function(){for(var b=-1,c=this.rows,a=c.length,d=n.require("$41","list.js").init();++b<a;)d.push(c[b]);return d};f=null;return c}({},v,z));n.register("$29",function(c,f,
217
- h){function p(){this._id=this.id=""}c.extend=function(b){return b.prototype=new p};f=p.prototype;f.flag=function(b,c){var a=this.flg||(this.flg=[]);if(null!=c)a[c]=b;else for(var d=Math.max(a.length,this.src.length,this.msg.length);0!==d--;)a[d]=b;return this};f.flagged=function(b){var c=this.flg||[];if(null!=b)return c[b]||0;for(b=c.length;0!==b--;)if(c[b])return!0;return!1};f.flags=function(){for(var b,c={},a=[],d=this.flg||[],f=d.length;0!==f--;)b=d[f],c[b]||(c[b]=!0,a.push(b));return a};f.flaggedAs=
218
  function(b,c){var a=this.flg||[];if(null!=c)return b===a[c]||0;for(var d=a.length;0!==d--;)if(a[d]===b)return!0;return!1};f.fuzzy=function(b,c){var a=this.flaggedAs(4,b);null!=c&&this.flag(c?4:0,b);return a};f.source=function(b,c){if(null==b)return this.src[c||0]||"";this.src[c||0]=b;return this};f.plural=function(b,c){if(null==b)return this.src[c||1]||"";this.src[c||1]=b||"";return this};f.sourceForms=function(){return this.srcF};f.targetForms=function(){return this.msgF};f.each=function(b){for(var c=
219
  -1,a=this.src,d=this.msg,f=Math.max(a.length,d.length);++c<f;)b(c,a[c],d[c]);return this};f.count=function(){return Math.max(this.src.length,this.msg.length)};f.pluralized=function(){return 1<this.src.length||1<this.msg.length};f.translate=function(b,c){this.msg[c||0]=b||"";return this};f.untranslate=function(b){if(null!=b)this.msg[b]="";else{var c=this.msg,a=c.length;for(b=0;b<a;b++)c[b]=""}return this};f.translation=function(b){return this.msg[b||0]||""};f.errors=function(b){return this.err&&this.err[b||
220
  0]||[]};f.translated=function(b){if(null!=b)return!!this.msg[b];var c=this.msg,a=c.length;for(b=0;b<a;b++)if(!c[b])return!1;return!0};f.untranslated=function(b){if(null!=b)return!this.msg[b];var c=this.msg,a=c.length;for(b=0;b<a;b++)if(c[b])return!1;return!0};f.comment=function(b){if(null==b)return this.cmt||"";this.cmt=b||"";return this};f.notes=function(b){if(null==b)return this.xcmt||"";this.xcmt=b||"";return this};f.refs=function(b){if(null==b)return this.ref||"";this.ref=b||"";return this};f.format=
221
  function(b){if(null==b)return this.fmt||"";this.fmt=b||"";return this};f.context=function(b){if(null==b)return this.ctx||"";this.ctx=b||"";return this};f.tags=function(){return this.tg};f.toString=f.toText=function(){return this.src.concat(this.msg,this.id,this.ctx).join(" ")};f.weight=function(){var b=0;this.translation()||(b+=2);this.fuzzy()&&(b+=1);return b};f.equals=function(b){return this===b||this.hash()===b.hash()};f.hash=function(){return this.id};f.normalize=function(){for(var b=this.msg.length;0!==
222
  b--;)this.msg[b]=this.src[b]||""};f.disabled=function(b){return!!(this.lck||[])[b||0]};f.disable=function(b){(this.lck||(this.lck=[]))[b||0]=!0;return this};f.saved=function(b){var c=this.drt;if(!c)return!0;if(null!=b)return!c[b];for(b=c.length;0!==b--;)if(c[b])return!1;return!0};f.unsave=function(b){(this.drt||(this.drt=[]))[b||0]=!0;return this};f.save=function(b){var c=this.drt;null==b?this.drt=null:c[b]=!1;return this};f.is=function(b){return b&&(b===this||b.idx===this.idx)};f.isHTML=function(b){if(null==
223
- b)return this.htm||!1;this.htm=b};f=null;return c}({},v,z));n.register("$14",function(c,f,h){function p(a){return{"Project-Id-Version":"PACKAGE VERSION","Report-Msgid-Bugs-To":"","POT-Creation-Date":a||"","PO-Revision-Date":a||"","Last-Translator":"","Language-Team":"",Language:"","Plural-Forms":"","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit"}}function b(a,b){var c=a||"";b&&(c+="\x00"+b);return c}function e(){return n.require("$26","collection.js").init()}
224
- function a(a){var b=f.console;b&&b.error&&b.error(a.message||String(a))}function d(a){return n.require("$27","format.js").create(a)}function m(a){this.locale(a);this.length=0;this.rows=e();this.head=p(this.now())}function k(a,b){this.src=[a||""];this.msg=[b||""]}c.create=function(a){return new m(a)};h=n.require("$28","messages.js").extend(m);h.now=function(){function a(b,c){for(var d=String(b);d.length<c;)d="0"+d;return d}var b=new Date,c=b.getUTCFullYear(),d=b.getUTCMonth()+1,e=b.getUTCDate(),f=
225
- b.getUTCHours(),b=b.getUTCMinutes();return a(c,4)+"-"+a(d,2)+"-"+a(e,2)+" "+a(f,2)+":"+a(b,2)+"+0000"};h.header=function(a,b){var c=this.head||(this.head={});if(null==b)return this.headers()[a]||"";c[a]=b||"";return this};h.headers=function(a){var b,c=this.now(),d=this.head||(this.head=p(c));if(null!=a){for(b in a)d[b]=a[b];return this}var e=this.locale();a={};for(b in d)a[b]=String(d[b]);e?(a.Language=String(e)||"zxx",a["Language-Team"]=e.label||a.Language,a["Plural-Forms"]="nplurals="+(e.nplurals||
226
  "2")+"; plural="+(e.pluraleq||"n!=1")+";",b="PO-Revision-Date"):(a.Language="",a["Plural-Forms"]="nplurals=INTEGER; plural=EXPRESSION;",a["PO-Revision-Date"]="YEAR-MO-DA HO:MI+ZONE",b="POT-Creation-Date");a[b]||(a[b]=c);a["X-Generator"]="Loco https://localise.biz/";return a};h.get=function(a,c){var d=b(a,c);return this.rows.get(d)};h.add=function(b,c){b instanceof k||(b=new k(b));c&&b.context(c);var d=b.hash();this.rows.get(d)?a("Duplicate message at index "+this.indexOf(b)):(b.idx=this.rows.add(d,
227
- b),this.length=this.rows.length);return b};h.load=function(b){for(var c=-1,d,e,f,h,m,p,n=(f=this.locale())&&f.nplurals||2,v=[];++c<b.length;)d=b[c],null==d.parent?(e=d.source||d.id,f=d.target||"",h=d.context,e||h?(m=new k(e,f),m._id=d._id,h&&m.context(h),d.flag&&m.flag(d.flag,0),d.comment&&m.comment(d.comment),d.notes&&m.notes(d.notes),d.refs&&m.refs(d.refs),m.format(d.format),d.message=m,this.add(m)):0===c&&"object"===typeof f&&(this.head=f,this.headcmt=d.comment)):v.push(d);for(c=-1;++c<v.length;)try{d=
228
- v[c];e=d.source||d.id;m=b[d.parent]&&b[d.parent].message;if(!m)throw Error("parent missing for plural "+e);p=d.plural;1===p&&m.plural(e);p>=n||(d.flag&&m.flag(d.flag,p),m.translate(d.target||"",p),d.format&&!m.format()&&m.format(d.format))}catch(z){a(z)}return this};h.merge=function(b){var c=this,d,f=b.header("POT-Creation-Date"),h=c.rows,k=[],m=[];b=b.rows;c.rows.each(function(a,c){null==b.get(a)&&m.push(c)});c.rows=e();b.each(function(b,e){try{(d=h.get(b))?(d.ref=e.ref,d.fmt=e.fmt):(d=e,k.push(d)),
229
- c.add(d)}catch(f){a(f)}});f&&c.header("POT-Creation-Date",f);return{add:k,del:m}};h.wrap=function(a){this.fmtr=d(a);return this};h.toString=function(){var a,b=this.locale(),c=[],e=[],f=this.headers(),h=!b,m=b&&b.nplurals||2,p=this.fmtr||d();f[b?"PO-Revision-Date":"POT-Creation-Date"]=this.now();for(a in f)e.push(a+": "+f[a]);e=new k("",e.join("\n"));e.comment(this.headcmt||"");h&&e.fuzzy(0,!0);c.push(e.toString());c.push("");this.rows.each(function(a,b){a&&(c.push(b.cat(p,h,m)),c.push(""))});return c.join("\n")};
230
- h=n.require("$29","message.js").extend(k);h.hash=function(){return b(this.source(),this.context())};h.toString=function(){return this.cat(d())};h.cat=function(a,b,c){var d,e=[],f;(f=this.cmt)&&e.push(a.prefix(f,"# "));(f=this.xcmt)&&e.push(a.prefix(f,"#. "));d=this.ref;if(f=this._id)d+=(d?" ":"")+"loco:"+f;d&&/\S/.test(d)&&e.push(a.refs(d));!b&&this.fuzzy()&&e.push("#, fuzzy");(f=this.fmt)&&e.push("#, "+f+"-format");(f=this.ctx)&&e.push(a.pair("msgctxt",f));e.push(a.pair("msgid",this.src[0]));if(null==
231
- this.src[1])e.push(a.pair("msgstr",b?"":this.msg[0]));else for(d=-1,e.push(a.pair("msgid_plural",this.src[1])),f=this.msg||["",""],c=c||f.length;++d<c;)e.push(a.pair("msgstr["+d+"]",b?"":f[d]||""));return e.join("\n")};h.compare=function(a,b){var c=this.weight(),d=a.weight();if(c>d)return 1;if(c<d)return-1;if(b){c=this.hash().toLowerCase();d=a.hash().toLowerCase();if(c<d)return 1;if(c>d)return-1}return 0};h=h=null;return c}({},v,z));n.register("$16",function(c,f,n){c.init=function(c){function b(){M||
232
- (I.click(l),M=h('<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&&h("#ssh-keys").toggleClass("hidden","ssh"!==h(this).val())}));return M}function e(){G&&(a(h(q)),G=!1);if(H&&L){var b=L,c=h(J);c.find("span.loco-msg").text(b);N||(c.removeClass("jshide").hide().fadeIn(500),N=!0)}else N&&(a(h(J)),N=!1)}function a(a){a.slideUp(250).fadeOut(250,
233
- function(){h(this).addClass("jshide")})}function d(){if(H)return M&&M.dialog("close"),e(),h(c).find('button[type="submit"]').attr("disabled",!1),h(f).triggerHandler("resize"),w&&w(!0),!0;y&&M?(G||(h(q).removeClass("jshide").hide().fadeIn(500),G=!0),N&&(a(h(J)),N=!1)):e();h(c).find('input[type="submit"]').attr("disabled",!0);w&&w(!1);return!1}function m(a){var b,c,d=r||{};for(b in d)d.hasOwnProperty(b)&&(c=d[b],a[b]?a[b].value=c:h('<input type="hidden" />').attr("name",b).appendTo(a).val(c))}function k(a){a.preventDefault();
234
- a=h(a.target).serializeArray();s(a);E=!0;return!1}function g(a){a.preventDefault();M.dialog("close");return!1}function l(a){a.preventDefault();M.dialog("open").find('input[name="connection_type"]').change();return!1}function v(a){H=a.authed;C=a.method;h(q).find("span.loco-msg").text(a.message||"Something went wrong.");L=a.warning||"";a.notice&&u.notices.info(a.notice);if(H)"direct"!==C&&(r=a.creds,m(c),E&&a.success&&u.notices.success(a.success)),d();else if(a.reason)u.notices.info(a.reason);else if(a=
235
- a.prompt){var e=b();e.html(a).find("form").submit(k);e.dialog("option","title",e.find("h2").remove().text());e.find("button.cancel-button").show().click(g);e.find('input[type="submit"]').addClass("button-primary");d();h(f).triggerHandler("resize")}else u.notices.error("Server didn't return credentials, nor a prompt for credentials")}function z(){d()}function s(a){E=!1;u.ajax.setNonce("fsConnect",K).post("fsConnect",a,v,z);return a}var r,w,q=c,C=null,E=!1,H=!1,u=f.locoScope,y=c.path.value,F=c.auth.value,
236
- K=c["loco-nonce"].value,I=h(q).find("button.button-primary"),J=n.getElementById(q.id+"-warn"),G=!1,N=!1,L="",M;u.notices.convert(J).stick();c.connection_type?(r={},r.connection_type=c.connection_type.value,H=!0):y&&F&&s({path:y,auth:F});d();return{applyCreds:function(a){if(a.nodeType)m(a);else{var b,c=r||{};for(b in c)c.hasOwnProperty(b)&&(a[b]=c[b])}return this},setForm:function(a){c=a;d();m(a);return this},connect:function(){y=c.path.value;F=c.auth.value;s(h(c).serializeArray());return this},listen:function(a){w=
237
- a;H&&a(!0);return this}}};return c}({},v,z));n.register("$17",function(c,f,v){function p(c,f,g,h){f="n"===g?e(f):a(f);h&&(f=d(f));return b([].sort,[f])(c)}function b(a,b){return function(c){a.apply(c,b);return c}}function e(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 a(a){return function(b,c){return(b&&b[a]||"").localeCompare(c&&c[a]||"")}}function d(a){return function(b,c){return-1*a(b,c)}}c.init=function(a){function b(a){var c=-1,d=a.length;for(h("tr",
238
- q).remove();++c<d;)q.appendChild(a[c].$)}function c(a){s=a?z.find(a,d):d.slice(0);w&&(a=e[w],s=p(s,w,a.type,a.desc));b(s)}var d=[],e=[],f=0,s,r,w,q=a.getElementsByTagName("tbody")[0],v=a.getElementsByTagName("thead")[0],z=n.require("$7","fulltext.js").init();v&&q&&(h("th",v).each(function(a,c){var g=c.getAttribute("data-sort-type");g&&(a=f,h(c).addClass("loco-sort").click(function(c){c.preventDefault();c=a;var f=e[c],g=f.type,m=!(f.desc=!f.desc);s=p(s||d.slice(0),c,g,m);b(s);r&&r.removeClass("loco-desc loco-asc");
239
- r=h(f.$).addClass(m?"loco-desc":"loco-asc").removeClass(m?"loco-asc":"loco-desc");w=c;return!1}),e[f]={$:c,type:g});c.hasAttribute("colspan")?f+=Number(c.getAttribute("colspan")):f++}),h("tr",q).each(function(a,b){var c,f,g,h=[],k={_:a,$:b},m=b.getElementsByTagName("td");for(f in e){c=m[f];(g=c.textContent.replace(/(^\s+|\s+$)/g,""))&&h.push(g);c.hasAttribute("data-sort-value")&&(g=c.getAttribute("data-sort-value"));switch(e[f].type){case "n":g=Number(g)}k[f]=g}d[a]=k;z.index(a,h)}),a=h('form.loco-filter input[type="text"]',
240
- a.parentNode),a.length&&(a=a[0],v=h(a.form),1<d.length?n.require("$8","LocoTextListener.js").listen(a,c):v.hide(),v.on("submit",function(a){a.preventDefault();return!1})))};return c}({},v,z));var G=v.locoScope||(v.locoScope={});v=v.locoConf||(v.locoConf={});z=n.require("$1","t.js").init();var L=v.wplang;n.require("$2","array.js");G.l10n=z;z.load(v.wpl10n);L&&z.pluraleq(L.pluraleq);G.string=n.require("$3","string.js");G.notices=n.require("$4","notices.js").init(z);G.ajax=n.require("$5","ajax.js").init(v).localise(z);
241
- G.locale=n.require("$6","wplocale.js");G.fulltext=n.require("$7","fulltext.js");G.watchtext=n.require("$8","LocoTextListener.js").listen;G.selector=n.require("$9","LocoSelector.js").create;G.autocomp=n.require("$10","LocoAutoComplete.js").init;G.tooltip=n.require("$11","tooltip.js");G.po={ed:n.require("$12","poedit.js"),kbd:n.require("$13","hotkeys.js"),init:n.require("$14","po.js").create,ace:n.require("$15","ace.js").strf("php")};G.fs=n.require("$16","fsconn.js");h("#loco.wrap table.wp-list-table").each(function(c,
242
- f){n.require("$17","tables.js").init(f)})})(window,document,window.jQuery);
1
+ (function(w,y,h,S){var m=function(){var c={};return{register:function(f,h){c[f]=h},require:function(f,h){var l=c[f];if(!l)throw Error('CommonJS error: failed to require("'+h+'")');return l}}}();m.register("$1",function(c,f,h){function l(b){var e=typeof b;if("string"===e)if(/[^ <>!=()%^&|?:n0-9]/.test(b))console.error("Invalid plural: "+b);else return new Function("n","return "+b);"function"!==e&&(b=function(a){return 1!=a});return b}c.init=function(b){function e(d,b,e){return(d=a[d])&&d[e]?d[e]:b||
2
+ ""}b=l(b);var a={};return{_:function(a){return e(a,a,0)},_x:function(a,b){return e(b+"\u0004"+a,a,0)},_n:function(a,p,k){k=Number(b(k));isNaN(k)&&(k=0);return e(a,k?p:a,k)},load:function(d){a=d||{};return this},pluraleq:function(a){b=l(a);return this}}};return c}({},w,y));m.register("$2",function(c,f,h){Array.prototype.indexOf||(Array.prototype.indexOf=function(c){if(null==this)throw new TypeError;var b,e=Object(this),a=e.length>>>0;if(0===a)return-1;b=0;1<arguments.length&&(b=Number(arguments[1]),
3
+ b!=b?b=0:0!=b&&Infinity!=b&&-Infinity!=b&&(b=(0<b||-1)*Math.floor(Math.abs(b))));if(b>=a)return-1;for(b=0<=b?b:Math.max(a-Math.abs(b),0);b<a;b++)if(b in e&&e[b]===c)return b;return-1});return c}({},w,y));m.register("$3",function(c,f,h){c.trim=function(c,b){for(b||(b=" \n");c&&-1!==b.indexOf(c.substr(0,1));)c=c.substr(1);for(;c&&-1!==b.indexOf(c.substr(-1));)c=c.substr(0,c.length-1);return c};c.sprintf=function(c){var b=0,e,a=[].slice.call(arguments,1);return c.replace(/%(s|u|%)/g,function(d,p){if("%"===
4
+ p)return"%";e=a[b++];return String(e)||""})};return c}({},w,y));m.register("$48",function(c,f,h){function l(){var b=a;d&&(b="("+d+") "+b);h.title=b}function b(d){d||(d=e);d!==a&&(a=d,l())}var e=h.title,a=e,d=0;c.set=function(a){b(a);return c};c.get=function(){return a};c.replace=function(d,e){b(a.replace(d,e));return c};c.badge=function(a){isNaN(a=Number(a))&&(a=0);a!==d&&(d=a,l());return c};return c}({},w,y));m.register("$42",function(c,f,h){function l(d){a||f._gat&&(a=_gat._createTracker(b,"loco"));
5
+ if(a){var p=d.shift();a[p].apply(a,d)}else e&&e.push(d);return c}var b,e,a;c._init=function(a){if(b=a.code){e=f._gaq||(f._gaq=[]);e.push(["_setAccount",b]);e.push(["_gat._anonymizeIp"]);e.push(["_setDomainName",a.host]);e.push(["_trackPageview"]);a=h.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"==h.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var p=h.getElementsByTagName("script")[0];p.parentNode.insertBefore(a,p)}return c};c.event=function(a,
6
+ b,e,g){return l(["_trackEvent",a||"",b||"",e||"",g||0])};c.page=function(a,b){var e={page:a||location.pathname+location.hash,title:b||m.require("$48","title.js").get()};return l(["_trackPageview",e])};return c}({},w,y));m.register("$43",function(c,f,h){function l(a,d){if(b)b[a](d);else f.ga&&ga(a,d);return c}var b,e;c._init=function(a){a.code&&(function(a,b,e,g,n,A,c){a.GoogleAnalyticsObject=n;a[n]=a[n]||function(){(a[n].q=a[n].q||[]).push(arguments)};a[n].l=1*new Date;A=b.createElement(e);c=b.getElementsByTagName(e)[0];
7
+ A.async=1;A.src=g;c.parentNode.insertBefore(A,c)}(f,h,"script","//www.google-analytics.com/analytics.js","ga"),ga("create",a.code,{alwaysSendReferrer:!0,userId:a.uid}),ga("set","anonymizeIp",!0),a.custom&&l("set",a.custom),c.page(),ga(function(a){b=a}));return c};c.event=function(a,d,b,e){return l("send",{hitType:"event",eventCategory:a||"",eventAction:d||"",eventLabel:b||"",eventValue:Number(e||0)})};c.page=function(a,d){var b={hitType:"pageview",page:a||location.pathname+location.hash,title:d||
8
+ m.require("$48","title.js").get()};b.location=location.protocol+"//"+location.hostname+b.page;e&&l("set",{referrer:e});e=b.location;return l("send",b)};c.reset=function(){e=location.href;var a={page:location.pathname+location.hash,title:m.require("$48","title.js").get(),location:e};l("set",a);return c};return c}({},w,y));m.register("$31",function(c,f,D){function l(a,e){h(a).click(function(a){b&&b.event(e,"click",this.getAttribute("href")||"");return!0});a=null;return c}var b,e=location.hostname,a=
9
+ "/help"===location.pathname.substr(0,5);c.init=function(a){!b&&a&&(e=a.host||(a.host=e),b=a.legacy?m.require("$42","legacy.js"):m.require("$43","universal.js"),b._init(a));return c};c.link=function(d){for(var b=d.getAttribute("href");b&&"#"!==b;){if(0===b.indexOf("#"))return l(d,"anchor");if("/help"===b.substr(0,5)&&!a)d.setAttribute("target","_blank");else if(0===b.indexOf("http")||0===b.indexOf("//")){if(-1!==b.indexOf(e)&&/^(https?:)*\/\/([^\/]+)/.exec(b)&&e===RegExp.$2)break;d.setAttribute("target",
10
+ "_blank");l(d,"external")}break}return c};c.page=function(){b&&b.page.apply(b,arguments);return c};c.event=function(){b&&b.event.apply(b,arguments);return c};c.reset=function(){b&&b.reset&&b.reset();return c};return c}({},w,y));m.register("$36",function(c,f,m){function l(a){return 27===a.keyCode&&r&&v?(I(),a.preventDefault(),!1):!0}function b(){if(r){var a=f.innerWidth,d=f.innerHeight;a!==H&&(H=a,K(u));d!==z&&(z=d,s&&e())}return!0}function e(){var a=p.outerHeight(!0)-s.clientHeight;s.style.maxHeight=
11
+ String(z-a)+"px"}function a(a){a?(n.show(),k.addClass("has-title")):(n.hide(),k.removeClass("has-title"))}var d,p,k,g,n,A,C,s,r=!1,v=!1,q=!1,B,E,H,u,z,F=c.init=function(){if(!d){d=h('<div id="overlay"></div>');p=h('<div class="overlay-frame"></div>');k=h('<div class="overlay-container"></div>');n=h('<div class="overlay-title"><span class="icon"></span><span class="title">Untitled</span></div>');A=h("<nav></nav>");C=h('<a class="overlay-close" href="#"><span>x</span></a>');g=h('<div class="overlay-bg"></div>');
12
+ d.append(p.append(k)).append(g).prependTo(m.body);h(m).on("keydown",l);h(f).resize(b);H=f.innerWidth;z=f.innerHeight;E=k.outerWidth(!0)-k.width()+(p.innerWidth()-p.width());B=parseInt(k.css("width"));if(!B||isNaN(B))B=k.width();A.hide().prependTo(p);n.append(C.hide()).hide().prependTo(p);d.hide()}return d},K=c.width=function(a){var d=F();if(null===a)p.css("width",""),k.css("width","");else{a=a||B||640;x=a+E;u=a;var g=H;x>g?(x=g,a=x-E,d.addClass("spill")):d.removeClass("spill");p.css("width",x+"px");
13
+ k.css("width",a+"px")}return c};c.autoSize=function(){var a=F(),d=B||0;k.children().each(function(a,g){d=Math.max(d,h(g).outerWidth(!0))});K(d);if(s=a.find("div.overlay-scroll")[0])z=f.innerHeight,e();return c};c.css=function(a){F().attr("class",a);return c};c.think=function(){F().addClass("loading");return c};c.unthink=function(){F().removeClass("loading");return c};c.html=function(a){F();f.innerShiv&&(a=innerShiv(a,!1));return k.html(a)};c.append=function(a){F();a instanceof jQuery||(a=h(a));k.append(a);
14
+ return c};var I=c.close=function(a){if(r){var g=function(){F().hide();h(m.body).removeClass("has-overlay");r=!1;k.html("");r=null;d.trigger("overlayClosed",[c])};null==a&&(a=300);d.trigger("overlayClosing",[c]);a?d.fadeOut(a,g):g()}return c};c.title=function(d,g){F();var b="",e=n.find("span");g&&/^lang lang-(\w+)/.exec(g)&&(b=RegExp.$1);e.eq(0).attr("class",g||"no-icon").attr("lang",b);q=d||"";e.eq(1).text(q);null!=d?a(!0):v||a(!1);return c};c.enableClose=function(){F();v=!0;C.off("click").on("click",
15
+ function(){I();return!1});a(!0);C.show();return c};c.disableClose=function(){F();v=!1;C.hide();r&&q||a(!1);return c};c.enableNav=function(a){A.append(a);A.show();return c};c.disableNav=function(){A.html("").hide();return c};c.open=function(){F();k.html("");K(B);d.attr("class","");h(m.body).addClass("has-overlay");F().show();r||(r=!0,b());c.title(null);v&&a(!0);d.trigger("overlayOpened",[c]);return c};c.active=function(){return r};c.listen=function(a){F().on("overlayClosed",a);return c};c.unlisten=
16
+ function(a){F().off("overlayClosed",a);return c};return c}({},w,y));m.register("$11",function(c,f,m){function l(a,d){this.$element=h(a);this.options=d;this.enabled=!0;this.fixTitle()}c.init=function(a,d){var p={fade:!0,offset:5,delayIn:b,delayOut:e,anchor:a.attr("data-anchor"),gravity:a.attr("data-gravity")||"s"};d&&(p=h.extend({},p,d));a.tipsy(p)};c.delays=function(a,d){b=a||150;e=d||100};c.kill=function(){h("div.tipsy").remove()};c.text=function(a,d){d.data("tipsy").setTitle(a)};var b,e;c.delays();
17
+ h(m.body).on("overlayOpened overlayClosing",function(a){c.kill();return!0});l.prototype={show:function(){var a=this.getTitle();if(a&&this.enabled){var d=this.tip();d.find(".tipsy-inner")[this.options.html?"html":"text"](a);d[0].className="tipsy";d.remove().css({top:0,left:0}).prependTo(m.body);var a=(a=this.options.anchor)?this.$element.find(a):this.$element,a=h.extend({},a.offset(),{width:a[0].offsetWidth,height:a[0].offsetHeight}),b=d[0].offsetWidth,e=d[0].offsetHeight,g="function"==typeof this.options.gravity?
18
+ this.options.gravity.call(this.$element[0]):this.options.gravity,n;switch(g.charAt(0)){case "n":n={top:a.top+a.height+this.options.offset,left:a.left+a.width/2-b/2};break;case "s":n={top:a.top-e-this.options.offset,left:a.left+a.width/2-b/2};break;case "e":n={top:a.top+a.height/2-e/2,left:a.left-b-this.options.offset};break;case "w":n={top:a.top+a.height/2-e/2,left:a.left+a.width+this.options.offset}}2==g.length&&("w"==g.charAt(1)?n.left=a.left+a.width/2-15:n.left=a.left+a.width/2-b+15);d.css(n).addClass("tipsy-"+
19
  g);d.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+g.charAt(0);this.options.className&&d.addClass("function"==typeof this.options.className?this.options.className.call(this.$element[0]):this.options.className);d.addClass("in")}},hide:function(){this.tip().remove()},fixTitle:function(){var a=this.$element,d=a.attr("title")||"";(d||"string"!==typeof a.attr("original-title"))&&a.attr("original-title",d).removeAttr("title")},getTitle:function(){var a,d=this.$element,b=this.options;this.fixTitle();
20
  "string"==typeof b.title?a=d.attr("title"==b.title?"original-title":b.title):"function"==typeof b.title&&(a=b.title.call(d[0]));return(a=(""+a).replace(/(^\s*|\s*$)/,""))||b.fallback},setTitle:function(a){var d=this.$element;d.attr("default-title")||d.attr("default-title",this.getTitle());null==a&&(a=d.attr("default-title")||this.getTitle());d.attr("original-title",a);if(this.$tip)this.$tip.find(".tipsy-inner")[this.options.html?"html":"text"](a)},tip:function(){this.$tip||(this.$tip=h('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>'),
21
+ this.$tip.data("tipsy-pointee",this.$element[0]));return this.$tip},validate:function(){this.$element[0].parentNode||(this.hide(),this.options=this.$element=null)},enable:function(){this.enabled=!0},disable:function(){this.hide();this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled}};h.fn.tipsy=function(a){function d(d){var g=h.data(d,"tipsy");g||(g=new l(d,h.fn.tipsy.elementOptions(d,a)),h.data(d,"tipsy",g));return g}function b(){var g=d(this),e=a.delayIn;g.hoverState="in";0==e?g.show():
22
+ (g.fixTitle(),setTimeout(function(){"in"==g.hoverState&&g.show()},e))}function e(){var g=d(this),b=a.delayOut;g.hoverState="out";0==b?g.hide():(g.tip().removeClass("in"),setTimeout(function(){"out"==g.hoverState&&g.hide()},b))}a=h.extend({},h.fn.tipsy.defaults,a);a.live||this.each(function(){d(this)});if("manual"!=a.trigger){var g=a.live?"live":"bind",n="hover"==a.trigger?"mouseleave":"blur";this[g]("hover"==a.trigger?"mouseenter":"focus",b)[g](n,e)}return this};h.fn.tipsy.defaults={className:null,
23
+ delayIn:0,delayOut:0,fade:!1,fallback:"",gravity:"n",html:!1,live:!1,offset:0,opacity:0.8,title:"title",trigger:"hover",anchor:null};h.fn.tipsy.elementOptions=function(a,d){return h.metadata?h.extend({},d,h(a).metadata()):d};h.fn.tipsy.autoNS=function(){return h(this).offset().top>h(m).scrollTop()+h(f).height()/2?"s":"n"};h.fn.tipsy.autoWE=function(){return h(this).offset().left>h(m).scrollLeft()+h(f).width()/2?"e":"w"};h.fn.tipsy.autoBounds=function(a,d){return function(){var b=d[0],e=1<d.length?
24
+ d[1]:!1,g=h(m).scrollTop()+a,n=h(m).scrollLeft()+a,A=h(this);A.offset().top<g&&(b="n");A.offset().left<n&&(e="w");h(f).width()+h(m).scrollLeft()-A.offset().left<a&&(e="e");h(f).height()+h(m).scrollTop()-A.offset().top<a&&(b="s");return b+(e?e:"")}};return c}({},w,y));m.register("$8",function(c,f,m){c.listen=function(c,b){function e(){s[k?"show":"hide"]()}function a(a){C&&c.setAttribute("size",2+a.length);k=a;e();return a}function d(){g=null;b(k)}function p(){var b=c.value;A&&b===A&&(b="");b!==k&&
25
+ (g&&clearTimeout(g),a(b),n?g=setTimeout(d,n):d())}var k,g;c=c instanceof jQuery?c[0]:c;var n=150,A=f.attachEvent&&c.getAttribute("placeholder"),C=1===Number(c.size),s=h('<a href="#clear" tabindex="-1" class="icon clear"><span>clear</span></a>').click(function(){c.value="";p();return!1});a(c.value);h(c).on("input blur focus",function(){p();return!0}).after(s);e();return{delay:function(a){n=a},ping:function(b){b?(g&&clearTimeout(g),b=c.value,A&&b===A&&(b=""),a(b),d(),b=void 0):b=p();return b},val:function(b){if(null==
26
+ b)return k;g&&clearTimeout(g);c.value=a(b);e()},el:function(){return c},blur:function(a){return h(c).on("blur",a)}}};return c}({},w,y));m.register("$35",function(c,f,m){function l(a,b,p,c,g){function n(){s&&clearTimeout(s);r&&r.fadeOut(400,function(){h(this).remove();r=null});return!1}function A(){C();-1!==c&&(s=setTimeout(n,c||2E3));r.off("mouseleave").on("mouseenter",C)}function C(){s&&clearTimeout(s);s=null;r.off("mouseenter").on("mouseleave",A)}var s;e||(e=m.createElement("div"),e.id="growls",
27
+ m.body.appendChild(e));var r=h('<div class="growl growl-'+p+'"><div><a class="close" href="#"><span>X</span></a><span class="badge"></span><p class="message"></p><small class="caption"></small></div></div>');r.find("p").text(a||"Empty message");b?r.find("small").text(b):r.find("small").remove();if(g.length){g.push({label:"Cancel",callback:n,css:"cancel"});var v,q=h('<form action="#" class="dialog"></form>');b=function(a,b){v=h('<input type="button" value="'+b.label+'" class="butt '+(b.css||"")+'" />');
28
+ v.click(function(a){"function"===typeof b.callback&&b.callback(a,{close:n})});q.append(v);return v};for(a=0;a<g.length;a++)b(a,g[a]);r.append(q)}h(e).prepend(r.hide().fadeIn(400));r.find("a").click(n);A()}var b,e;c.init=function(){if(!b)return b=f.alert,f.alert=function(a){a=String(a).split("\n");var b=a[1]&&a.slice(1).join("\n");c.alert(a[0],b)},c};c.debug=function(a){b(a);return c};c.alert=function(a,d,e,c,g){try{return l(a,d||"",e||"alert",c||4E3,g||[]),!0}catch(n){return a+="\n\n--\n"+(n.message||
29
+ n),b.call(f,a),!1}};c.success=function(a,b,e){return c.alert(a,b,"success",e||2E3)};c.dialog=function(a,b,e,k){return c.alert(a,b,k||"alert",-1,e)};return c}({},w,y));m.register("$22",function(c,f,D){function l(a){var d;(d=a.alert)&&alert(d);(d=a.success)&&m.require("$35","growl.js").success.apply(null,d.push?d:[d]);if(d=a.download)f.location.assign(d);else if(d=a.redirect)if(0===d.indexOf("/modal/"))a.modal={url:d};else return f.location.assign(d),!1;else if(a.reload)return f.location.reload(),!1;
30
+ (d=a.modal)&&m.require("$32","modal.js").replace(d);(d=a.async)&&b(d.job_id,d.title)}function b(a,b){var e=m.require("$36","overlay.js");e.open().disableClose().css("modal-processing").html('<div class="wrap"><h2>'+(b||"Please wait")+"</h2></div>");m.require("$37","async.js").init(a).delay(500).timeout(2E4).listen("error",function(a){e.css("modal-error").enableClose().title("Error");e.html("<h2>"+(a||"Unknown error")+"</h2>")}).listen("complete",function(a){e.close();e=null;a&&l(a)}).start()}var e=
31
+ {401:"Authorization Required",422:"Invalid data sent to server",404:"Not Found",500:"Server Error",502:"Bad Gateway",503:"Service unavailable",504:"Gateway timeout"};c.jsonLink=function(a){if(!a)return"";a=a.split("?");a[0]=a[0].replace(/(\.[a-z0-9]{1,4})?$/i,".json");return a.join("?")};c.errorData=function(a,b,c){var k,g;c=a.responseText;b=a.status;if(!c&&0===b)return null;try{k=h.parseJSON(c)||{}}catch(n){k={},g=e[a.status]||n.message||n}k.error=g||k.error||k.statusText||a.statusText||e[b]||"Unknown Error";
32
+ return k};c.ajax=function(a,b,p,k){function g(a){function b(a){var g=a&&a[0];if(!g||D.contains&&!D.contains(g))a=h(D.body);return a}var g=b(k);g.trigger("locoAjaxSuccess",[a]);var d=a.events;if(d&&d.length)for(var e,q=m.require("$31","ga.js");e=d.shift();)g=b(g),g.trigger(e,[a]),q.event("ajax",e);if(!1===l(a))return!1;p&&p();return!0}function n(n,k,s){if("abort"!==k){var r=n.status,v,q=a.statusCode;if(200===r||!q||!q[r])if(401===r)m.require("$32","modal.js").load("/modal/user/ping.json?r="+encodeURIComponent(location.pathname),
33
+ e[r]);else{if("parsererror"===k)f.console&&console.error&&console.error(r,n.responseText),v=404===r?"Ajax service not found":/^\s+Fatal error/.test(n.responseText)?"Fatal server error from Ajax request":"Bad Ajax response";else{var B=c.errorData(n,k,s);B&&B.error&&(v=B.error)}"function"===typeof b&&!1===b(null,v,r,n)?p&&p():B&&B.data&&!g(B.data)||(alert(v||"Unknown Ajax error"),p&&p())}}}(a.headers||(a.headers={}))["X-Loco-Csrf"]=f.loco&&G.csrf||"";a.error=n;a.success=function(a,c,s){if(!a||"object"!==
34
+ typeof a)return n(s,"unknown");(a.status||a.error)&&alert(a.error||a.statusText||s.statusText||e[a.status]||"Unknown Error");"function"===typeof b&&!1===b(a&&a.data?a.data:a,null,c,s)?p&&p():a&&a.data?g(a.data):p&&p()};-1!==a.url.indexOf(".json")&&(a.dataType="json");return h.ajax(a)};return c}({},w,y));m.register("$37",function(c,f,h){c.init=function(c){function b(a,b){for(var g=-1,d,e=B[a]||[];++g<e.length;)(d=e[g])&&d.apply&&d.apply(null,b||[])}function e(a){k();p();b("error",[a])}function a(){var a=
35
+ s+"ms",b=Math.round(s/1E3);1<b&&(a=b+" seconds");e("Job timeout after "+a)}function d(a,g){if(!a||g)a={state:"error",message:g};try{var d=a.state||"error";switch(d){case "queued":case "started":case "starting":case "progress":var q=a.progress||0,r=a.message||d;q!==A&&(k(),A=q);b("progress",[A,r,"state"]);n();break;case "done":var c=a.data,v=a.message||"Done";A=100;k();p();b("complete",[c,v]);break;case "error":e(a.message||"Unknown error tracking job progress");break;default:e("Unexpected job status: "+
36
+ d)}}catch(s){e(s.message||s)}}function p(){v&&(clearTimeout(v),v=null)}function k(){r&&(clearTimeout(r),r=null)}function g(){var a={dataType:"json",url:C};m.require("$22","http.js").ajax(a,d)}function n(){p();v=setTimeout(g,q);r||(r=setTimeout(a,s))}var A=0,C="/ajax/async/poll/"+c+".json",s=1E4,r,v,q=100,B={error:[],complete:[],progress:[]};return{start:function(){k();n();return this},stop:function(){k();p();return this},delay:function(a){q=a;return this},timeout:function(a){s=a;return this},listen:function(a,
37
+ b){var g=B[a];if(g)g.push(b);else throw Error(a+" is not a valid async event");return this}}};return c}({},w,y));m.register("$32",function(c,f,D){function l(a){a.stopPropagation();a.preventDefault();return!1}function b(){n||(n=m.require("$36","overlay.js"),n.listen(p));return n}function e(){var a=s.length-1,b=s[a],g=h('<a class="has-icon icon-back" data-gravity="w">Back</a>').attr("href",b[0]).attr("title",b[1]).click(function(g){if(s[a]===b&&B())return m.require("$11","tooltip.js").kill(),l(g)});
38
+ n.enableNav(g);m.require("$11","tooltip.js").init(g)}function a(a,b,g){a=a.split("#");var d=a[0],d=d+(-1===d.indexOf("?")?"?":"&"),d=d+(encodeURIComponent(b)+"="+encodeURIComponent(g));a[0]=d;return a.join("#")}function d(a,g){var d=b().autoSize(),q=d.init();m.require("$18","html.js").init(q);g&&g.lock&&d.disableClose();s.length&&e();q.find("[data-script]").each(function(a,b){b=h(b);for(var d=-1,e,q=b.attr("data-script").split(" ");++d<q.length;)e=q[d],C[e]?C[e](b,g||{}):alert("Unknown script "+e)});
39
+ q.trigger("locoModalLoaded",[d,a||"",g||{}]);var n=q.find("form")[0],r;if(n)a:for(d=0;d<n.elements.length;d++)switch(q=n.elements[d],q.type){case "text":case "email":case "textarea":r=Number(q.getAttribute("tabindex"));if(isNaN(r)||100>r)continue a;h(q).focus();break a}}function p(){r=null;s=[];return!0}function k(a){var b=h(a.currentTarget),d=b.attr("data-modal");if("back"===d){if(B())return l(a);d="close"}if("close"===d){q();var e=b.attr("href");if(e&&-1!==e.indexOf("#!"))return!0}else{var n="submit"===
40
+ a.type,r=b.attr("title")||b.attr("data-title"),e=b.attr("href")||b.attr("action"),A=n?b.serialize():"",b=n?b.attr("method"):"get";v(e,r,b,A,"modal "+(d||g(e)))}return l(a)}function g(a){return"http"===a.substr(0,4)?a.split("/").slice(3,6).join("-"):a.split("/").slice(1,4).join("-")}var n,A=m.require("$31","ga.js"),C={},s=[],r,v=c.load=function(g,e,q,z,p){var k=r;r=[].slice.call(arguments);k&&g!==k[0]&&(s.push(k),g=a(g,"r",k[0]));k=b();k.active()||k.open().css("modal").html('<div class="loading"></div>');
41
+ k.title("Loading ..").disableClose().disableNav();k.think();var k=g.split("#"),C=k[1];C&&(g=k[0]);var k=m.require("$22","http.js"),B={type:q||"get",data:z||"",url:k.jsonLink(g)};k.ajax(B,function(a,b,c){var k=a&&a.html;if(!k)return a&&a.redirect?(r=s.pop()||null,v(a.redirect,e,q,z,p)):(a=h('<h3 class="error"></h3>').text(b||"Unknown error"),b=h('<footer class="buttonset"><a href="/" data-modal="close" class="has-icon icon-ok">Close</a></footer>'),a=h('<div class="basic"></div>').append(a).append(b),
42
+ b="Error",c&&200!==c&&(b+=" "+c),n.unthink().enableClose().title(b).html("").append(a),m.require("$18","html.js").init(n.init())),!1;e=a.title||e||"Untitled";r&&(r[1]=e);n.unthink().enableClose().title(e,a.icon).width(null).css(p||"modal").autoSize().html(k);c=a.js||{};C&&(c["#"]=C);d(g,c);A.page(g,e);n.init().one("overlayClosed",function(){A.reset()});return!0});return c},q=c.close=function(){b().close();return c},B=c.back=function(){if(previous=s.pop())return r=s[s.length-2],v.apply(null,previous),
43
+ !0};c.reload=function(){r&&v.apply(null,r)};c.postback=function(a){r&&(r[2]="post",r[3]=a,v.apply(null,r))};c.initLink=function(a){a.click(k)};c.initForm=function(a){h(a).submit(k)};c.replace=function(a){var e=b(),q=a&&a.html,n=a&&a.url,r=a&&a.title,A=a&&a.action;if(n)q=s.length-1,q=0<=q?s[q][0]:void 0,n===q?B():v(n,r,"","",a&&a.css||"modal "+g(n));else if(q)e.open().html(q),r&&e.enableClose().title(r),d("",a&&a.js);else if("function"===typeof c[A])c[A]();return e};c.find=function(a){return b().init().find(a)};
44
+ c.script=function(a,b){if(b){if("function"!==typeof b.run)throw Error(a+" macro has no run function");C[a]=b.run;return c}return C[a]};c.hash=function(a){var b=a.hash;"#/modal/"===b.substr(0,8)&&(b=b.substr(1),a.hash="",c.replace({url:b}))};return c}({},w,y));m.register("$21",{"\u00e1":"a","\u00e0":"a","\u0103":"a","\u1eaf":"a","\u1eb1":"a","\u1eb5":"a","\u1eb3":"a","\u00e2":"a","\u1ea5":"a","\u1ea7":"a","\u1eab":"a","\u1ea9":"a","\u01ce":"a","\u00e5":"a","\u01fb":"a","\u00e4":"a","\u01df":"a","\u00e3":"a",
45
  "\u0227":"a","\u01e1":"a","\u0105":"a","\u0101":"a","\u1ea3":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1eb7":"a","\u1ead":"a","\u1e01":"a","\u01fd":"\u00e6","\u01e3":"\u00e6","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0107":"c","\u0109":"c","\u010d":"c","\u010b":"c","\u00e7":"c","\u1e09":"c","\u010f":"d","\u1e0b":"d","\u1e11":"d","\u0111":"d","\u1e0d":"d","\u1e13":"d","\u1e0f":"d","\u00f0":"d","\ua77a":"d","\u01c6":"\u01f3","\u00e9":"e","\u00e8":"e","\u0115":"e","\u00ea":"e","\u1ebf":"e","\u1ec1":"e",
46
  "\u1ec5":"e","\u1ec3":"e","\u011b":"e","\u00eb":"e","\u1ebd":"e","\u0117":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u0113":"e","\u1e17":"e","\u1e15":"e","\u1ebb":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u1e19":"e","\u1e1b":"e","\u1e1f":"f","\ua77c":"f","\u01f5":"g","\u011f":"g","\u011d":"g","\u01e7":"g","\u0121":"g","\u0123":"g","\u1e21":"g","\ua7a1":"g","\u1d79":"g","\u0125":"h","\u021f":"h","\u1e27":"h","\u1e23":"h","\u1e29":"h","\u0127":"h","\u210f":"h","\u1e25":"h","\u1e2b":"h",
47
  "\u1e96":"h","\u00ed":"i","\u00ec":"i","\u012d":"i","\u00ee":"i","\u01d0":"i","\u00ef":"i","\u1e2f":"i","\u0129":"i","\u012f":"i","\u012b":"i","\u1ec9":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u1e2d":"i","\u0135":"j","\u01f0":"j","\u1e31":"k","\u01e9":"k","\u0137":"k","\ua7a3":"k","\u1e33":"k","\u1e35":"k","\u013a":"l","\u013e":"l","\u013c":"l","\u0142":"l","\u1e37":"l","\u1e39":"l","\u1e3d":"l","\u1e3b":"l","\u0140":"l","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0144":"n","\u01f9":"n","\u0148":"n",
53
  "\u1f90":"\u03b7","\u1f21":"\u03b7","\u1f25":"\u03b7","\u1f95":"\u03b7","\u1f23":"\u03b7","\u1f93":"\u03b7","\u1f27":"\u03b7","\u1f97":"\u03b7","\u1f91":"\u03b7","\u03ae":"\u03b7","\u1f75":"\u03b7","\u1fc4":"\u03b7","\u1f74":"\u03b7","\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",
54
  "\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","\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",
55
  "\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","\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",
56
+ "\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"});m.register("$7",function(c,f,h){c.init=function(){function c(a){return n[a]||a}function b(a,b,g,d){b=a.split(b);for(var e=b.length;0!==e--;)(a=b[e])&&null==d[a]&&(g.push(a),d[a]=!0);return g}function e(a){return b(String(a||"").toLowerCase().replace(k,c),g,[],{})}function a(a,
57
+ d){for(var e=[],n={},v,q=d.length,B=g;0!==q--;)(v=d[q])&&b(String(v||"").toLowerCase().replace(k,c),B,e,n);p[a]=e}function d(a,b){var g=[],d=-1,e=p,q=e.length,n,c,k,f,z,h,l=a.length,m=b?!0:!1;a:for(;++d<q;)if(k=e[d],null!=k&&(f=k.length)){z=0;b:for(;z<l;z++){h=a[z];for(n=0;n<f;n++)if(c=k[n],0===c.indexOf(h))continue b;continue a}g.push(m?b[d]:d)}return g}var p=[],k=/[^a-z0-9]/g,g=/[\-_\s.?!;:,*^+=~`"(){}<>\[\]\/\\\u00a0\u1680\u180e\u2000-\u206f\u2e00-\u2e7f\u3000-\u303f]+/,n=m.require("$21","flatten.json");
58
+ return{split:e,pull:function(a,b){return d(a,b)},find:function(a,b){return d(e(a),b)},add:function(a,b){p[a]=e(b)},push:function(b){a(p.length,b)},index:function(b,g){a(b,g)},size:function(){return p.length},clear:function(){p=[]},remove:function(a){p[a]=null}}};return c}({},w,y));m.register("$23",function(c,f,h){c.create=function(){var c=[],b=m.require("$7","fulltext.js").init();return{add:function(e,a){b.add(c.length,a);c.push(e);return this},find:function(e){return b.find(e,c)},clear:function(){c=
59
+ [];b.clear();return this}}};return c}({},w,y));m.register("$10",function(c,f,D){function l(b){-1===b.indexOf("?")&&(b="/auto/"+b+".json?q=");this.url=b;this.dead={}}function b(){this.dict=m.require("$23","dict.js").create()}c.init=function(e){function a(){if("hint"!==K){var a=z.val()&&!(J&&J.val())&&null==f&&!q;D[a?"addClass":"removeClass"]("error")}}function d(a){J&&J.val(a)}function c(){w.show();var a=z.outerWidth(!1),b=z.outerHeight(!1),g=z.css("margin-top");g&&(g=parseInt(g),isNaN(g)||(b+=g));
60
+ a-=2;w.css("top",b+"px").css("minWidth",a+"px");q=!0}function k(){w.hide();q=!1}function g(){w.html("");k();v=0;u=f=null}function n(b){g();var d;for(d=0;d<b.length;d++){var e=d,q=b[d],n=q.value,r=q.lang||n.lang,z=h('<span class="label"></span>').text(q.label),k=h('<div class="auto-comp-result"></div>'),s=void 0,E=void 0;if(E=q.icon)s=h("<span></span>").attr("class",E).appendTo(k),r?(s.attr("lang",r),q.lang=r):-1!==E.indexOf("lang-"+n)&&(s.attr("lang",n),q.lang=n);for(E in q)k.data(E,q[E]);k.append(z);
61
+ A(e,k)}(v=b.length)?(B&&c(),C(0)):(C(null),a(),D.trigger("locoAutonone",[]))}function A(a,b){w.append(b);b.click(function(g){g.stopPropagation();C(a,b);r();return!1});return b}function C(a,b){u&&(u.removeClass("selected"),u=null);f=null;null==a?d(""):(b||(b=w.find("div.auto-comp-result").eq(a)),b.length&&(b.addClass("selected"),f=a,u=b))}function s(a){if(v){var b=v-1;null==f?a=0<a?0:b:(a=f+a,0>a?a=b:a>b&&(a=0));return C(a)}}function r(){if(null==f)y.val(""),d("");else{var b=w.find("div.auto-comp-result").eq(f),
62
+ e=b.data()||{label:"Error"},q=e.value,n=e.label;d(q);y.val(n);k();b=b.clone();b.data(e);g();A(0,b);v=1;C(0,b);a();b.trigger("locoAutocomp",[q,n,b])}}var v=0,q=!1,B=!1,E=e.form,f=null,u=null,z=h(e),F=z.attr("name"),K=z.attr("data-mode"),I=z.attr("data-provider"),J="hint"!==K&&h('<input type="hidden" value="" name="'+F+'" />').appendTo(E),D=h('<div class="auto-comp-wrap"></div>').replaceAll(z),w=h('<div class="auto-comp-drop"></div>');I&&(I=new l(I));J&&z.attr("name","_"+F);z.attr("autocomplete")||
63
+ z.attr("autocomplete","off");D.append(z).append(w);k();z.focus(function(){B=!0;1<v&&c()}).blur(function(){B=!1;a()}).keydown(function(a){function b(){a.preventDefault();a.stopPropagation();return!1}switch(a.keyCode){case 27:q&&(a.stopPropagation(),k(),z.blur());break;case 40:v&&(q?s(1):c());break;case 38:q&&s(-1);break;case 13:if(q)return r(),b();if(!f&&"hint"!==K)return b()}return!0});var y=m.require("$8","LocoTextListener.js").listen(z,function(a){I&&I.fetch(a,n)});(E=z.attr("data-pre"))&&(E=h.parseJSON(E))&&
64
+ E.value&&E.label?(n([E]),r()):!e.value||J&&J.val()||!I||I.fetch(e.value,function(a){n(a);r()});return{$:z,val:function(){return J&&J.val()},clear:g,reset:function(){g();z.val("");d("");y.ping()},force:function(a,b){g();d(b||"");y.val(a)},preload:function(a){v&&g();I=new b;var d,e;for(d in a)e=a[d],I.add(e)},mode:function(a){K=a},provide:function(a){I=new l(a)}}};l.prototype.fetch=function(b,a){if(!b)return a&&a([]),this.dead={},this;var d,c=this.dead;for(d in c)if(0===b.indexOf(d))return a&&a([]),
65
+ this;d={dataType:"json",url:this.url+encodeURIComponent(b)};m.require("$22","http.js").ajax(d,function(d){var g=d&&d.results;g&&(a&&d.query&&d.query===b&&a(d.results),g.length||(c[b]=0));return!0});return this};b.prototype.add=function(b){var a=b.fulltext||b.label||b.value;a&&this.dict.add(b,a)};b.prototype.fetch=function(b,a){var d=b?this.dict.find(b):[];a&&a(d);return this};return c}({},w,y));m.register("$9",function(c,f,D){function l(a){a.stopPropagation();a.preventDefault();return!1}function b(a,
66
+ b,d){d.off().mouseup(function(d){d.stopPropagation();a.selectIndex(b,!0);return!1}).mouseover(function(){h(this).addClass("over");a.hover=b;return!0}).mouseout(function(){h(this).removeClass("over");a.hover=-1;return!0});return d}function e(b){p===b&&(h(f).off("resize scroll",a),p=null);return b}function a(){p&&p.resize()}function d(a){if(a){var b,d=a[0],e=d.id,c=d.title,r=d.disabled,v=[],q=[],p,k=-1,f=d.options.length,u=this.selectedIcon||"";this.id=e||"";this.name=d.name||"";this.prefix=d.getAttribute("data-prefix");
67
+ for(this.defaultIcon=d.getAttribute("data-icon")||"icon no-icon";++k<f;)b=d.options[k],p=h(b),b.selected&&v.push(k),q.push([p.val(),p.text(),p.attr("data-icon")||u,b.disabled,p.attr("lang")]);this.hidden||(this.hidden=h('<input type="hidden" name="'+this.name+'" value="" />').appendTo(d.form));this.list=h("<ul></ul>").mouseup(l);this.icon=h('<span class="icon"> </span>');this.selection=h('<span class="label"></span>');this.handle=h('<a class="handle" href="#"></a>').attr("tabindex",a.attr("tabindex")||
68
+ "").append(this.icon).append(this.selection);b=h('<div class="selector"></div>').addClass(d.className).append(this.handle).append(this.list).replaceAll(d);e&&b.attr("id",e);c&&a.hasClass("hastip")&&(b.attr("title",c),m.require("$11","tooltip.js").init(b,{gravity:a.attr("data-gravity")||"s",anchor:a.attr("data-anchor")}));this.wrapper=b;this.up=b.hasClass("up");for(this.clearOptions();b=q.shift();)this.addOption.apply(this,b);r?this.disable():this.enable();this.close();if(f=v.length)for(k=0;k<f;k++)this.selectIndex(v[k]);
69
+ else k=d.selectedIndex,null!=k&&0<=k&&this.selectIndex(k)}}c.create=function(a){return new d(a)};c.extend=function(a){a.parent=d;a.prototype=new d};var p,k=d.prototype;k.enable=function(){var a=this;a.bound?a.wrapper.removeClass("disabled"):(a.handle.click(function(a){a.preventDefault();return!1}).mouseover(function(b){return a.onRollover(b)}).mouseout(function(b){return a.onRollout(b)}).mousedown(function(b){return a.onPress(b)}).keydown(function(b){return a.onKeydown(b)}),h(D).mouseup(function(b){return a.onRelease(b)}).keydown(function(b){return a.onGlobalKeydown(b)}),
70
  a.bound=!0)};k.disable=function(){this.wrapper.addClass("disabled")};k.isDisabled=function(){return this.wrapper.hasClass("disabled")};k.onRollover=function(){return this.over=!0};k.onRollout=function(){this.over=!1;return!0};k.onPress=function(a){return this.active?this.over?(this.close(),a.stopPropagation(),a.preventDefault(),!1):!0:(this.open(),a.stopPropagation(),a.preventDefault(),this.handle.focus(),!1)};k.onRelease=function(){this.active&&!this.over&&this.close();return!0};k.onGlobalKeydown=
71
+ function(a){if(this.active)switch(a.keyCode){case 27:return this.close(),l(a);case 40:return this.hoverNext(1),l(a);case 38:return this.hoverNext(-1),l(a);case 13:if(-1!=this.hover)return this.selectIndex(this.hover,!0),this.hoverItem(-1),this.close(),l(a)}return!0};k.onKeydown=function(a){return this.active||40!==a.keyCode?!0:(this.open(),l(a))};k.resize=function(){var a=this.list,b=this.handle,d=b.outerWidth()||0,e=a.outerWidth()||0,c;this.up?(c=a.outerHeight(),a.css("top","-"+(c+2)+"px")):(c=b.outerHeight()||
72
+ 0,c+=2,a.css("top",c+"px"),b=c+m.require("$18","html.js").top(b[0]),c=f.innerHeight-Math.max(0,b-f.pageYOffset),c-=4,a.css("max-height",c+"px"));d>e&&(d-=e-a.width(),a.css("min-width",String(d)+"px"))};k.open=function(){var b=this.list,d=this.wrapper,c=d.data("tipsy");this.active=!0;this.hover=-1;d.addClass("active");b.show().scrollTop(0);c&&c.disable();this!==p&&(p&&e(p),h(f).on("resize scroll",a),p=this);this.resize()};k.close=function(){var a=this.wrapper,b=a.data("tipsy");this.list.hide();this.active=
73
  !1;-1!==this.hover&&(this.getElement(this.hover).removeClass("over"),this.hover=-1);a.removeClass("active");b&&b.enable();e(this)};k.hoverItem=function(a,b){-1!==this.hover&&this.getElement(this.hover).removeClass("over");this.hover=a;-1!==a&&(b=b||this.getElement(a),b.addClass("over"))};k.hoverNext=function(a){var b=this.hover,d=this.options.length,e,c=null;for(-1===b&&0>a&&(b=d);d;){b+=a;if(0>b){this.close();break}else b>=d&&(b=0);if((e=this.options[b])&&!e.disabled&&!e.hidden){this.hoverItem(b);
74
+ break}if(null==c)c=b;else if(c===b)break}};k.enableChange=function(a){this.eventName=a;this.eventData=[].slice.call(arguments,1);return this};k.enableConfirm=function(a){this.confirm=a;return this};k.clearOptions=function(){this.index={};this.length=0;this.options=[];this.list.html("");this.hidden.val("");this.idx=this.hover=-1;this.dict=null;return this};k.destroy=function(){this.clearOptions();this.hidden.remove()};k.addOption=function(a,d,e,c,k){var r=this.options.length,p=h("<span></span>").addClass(e||
75
+ "icon no-icon"),q=h('<span class="label"></span>').text(d||a),q=h("<li></li>").append(p).append(q).appendTo(this.list);14<r&&this.getDict().add(r,d);k?k=k.split("-").shift():e&&-1!==e.indexOf("lang-"+a)&&(k=a);k&&p.attr("lang",k);q.attr("data-option",r);this.options[r]={value:a,text:d,lang:k||"",icon:e};this.index[a]=r;this.length=r+1;c?this.disableIndex(r):b(this,r,q);return r};k.getDict=function(){return this.dict||(this.dict=this.createDict())};k.createDict=function(){var a=this,b=m.require("$7",
76
+ "fulltext.js").init(),d=h('<input type="text" placeholder="&#x1F50D;"/>').appendTo(h('<form class="clearable"></form>').submit(l).insertBefore(a.getElement(0)));m.require("$8","LocoTextListener.js").listen(d,function(e){0===(""===e?a.unfilter():a.filter(b.find(e)))?d.addClass("error"):d.removeClass("error")});h.each(a.options,function(a,d){b.add(a,d.text)});return b};k.filter=function(a){var b=-1,d=this.length,e,c=-1,r=a.length;if(r===d)this.unfilter();else{for(;++c<r;){for(e=a[c];++b<e;)this.hideIndex(b);
77
  this.showIndex(b)}for(;++b<d;)this.hideIndex(b)}return r};k.unfilter=function(){for(var a=-1,b=this.length;++a<b;)this.showIndex(a);return b};k.disableOption=function(a){return this.disableIndex(this.index[a])};k.enableOption=function(a){return this.enableIndex(this.index[a])};k.disableIndex=function(a){var b=this.options[a];b&&!b.disabled&&(b.disabled=!0,this.getElement(a).addClass("disabled").off());return this};k.enableIndex=function(a){var d=this.options[a];d&&d.disabled&&(d.disabled=null,b(this,
78
+ a,this.getElement(a)).removeClass("disabled"));return this};k.hideIndex=function(a){var b=this.options[a];b&&!b.hidden&&(b.hidden=!0,this.getElement(a).hide())};k.showIndex=function(a){var b=this.options[a];b&&b.hidden&&(b.hidden=null,this.getElement(a).show())};k.each=function(a){for(var b=-1,d=this.options,e=d.length;++b<e;)a(b,d[b]);return this};k.reIndex=function(){var a=-1,d={},e,c=this.dict,k=this.options,r=k.length;for(c&&c.clear();++a<r;)e=k[a],d[e.value]=a,c&&c.add(a,e.text),e.disabled||
79
+ b(this,a,this.getElement(a));this.index=d;this.length=r};k.selectValue=function(a,b){return this.selectIndex(this.index[a],b)};k.hasValue=function(a){return null!=this.index[a]};k.hasIndex=function(a){return this.length>a};k.getIndex=function(){return this.idx};k.selectIndex=function(a,b){var d=this.options[a];if(d){var e=this,c=e.idx,r=d.value,k=d.icon||e.defaultIcon,q=function(){null!=c&&e.getElement(c).removeClass("active");e.getElement(a).addClass("active");e.setLabel(d.text).setIcon(k,d.lang);
80
  e.hidden.val(r);e.idx=a;b&&e.change()};c===a?e.hidden.val(r):b?"function"===typeof e.confirm?e.confirm.call(null,d,function(a){a&&q()}):e.beforeChange(r)&&q():q();e.active&&e.close()}return this};k.setLabel=function(a){this.selection.text(a);(a=this.prefix)&&this.selection.prepend(h('<span class="prefix"></span>').text(a));return this};k.setIcon=function(a,b){this.icon.attr("class",a).attr("lang",b||"");return this};k.val=function(){var a=this.options[this.idx];return a&&a.value};k.change=function(){var a=
81
  this.val(),b=this.save,d=this.eventName||"change",e=[a].concat(this.eventData||[]);this.wrapper.trigger(d,e);b&&b(a);this.hidden.triggerHandler("change");return this};k.beforeChange=function(a){var b=h.Event("locoBeforeSelect");this.wrapper.trigger(b,[a]);return!b.isDefaultPrevented()};k.renameOption=function(a,b){var d=this.index[a],e=this.options[d];e&&(e.text=b,this.getElement(d).find("span.label").text(b),d===this.idx&&this.setLabel(b));return this};k.removeOption=function(a){var b=this.index[a],
82
  d=this.options[b];d&&(a=this.val(),this.getElement(b).remove(),this.options.splice(b,1),this.reIndex(),a===d.value?this.selectIndex(0,!0):this.selectValue(a,!1))};k.getElement=function(a){return this.list.find("li").eq(a)};k.getWrapper=function(){return this.wrapper};k.tip=function(){return this.getWrapper().data("tipsy")};k.$=function(a,b){h.fn[a].apply(this.wrapper,b||[]);return this};k.persist=function(a){var b=this.id||this.name,d=a.fetch(b);null!=d&&this.selectValue(d,!0);this.save=function(d){a.store(b,
83
+ d)};return this};k.listen=function(a){return this.on(this.eventName||"change",a)};k.on=function(a,b){this.wrapper.on(a,b);return this};k=null;return c}({},w,y));m.register("$33",function(c,f,D){function l(b){var e=[],a=h([]);this.hidden=a;this.selected=e;this.selectedIcon="icon icon-checkbox";this.constructor.call(this,b);this.wrapper.addClass("multi");for(var d,c,k,g=h('<input type="checkbox" name="'+this.name+'[]" />')[0],n=this.options,A=n.length,f=-1;++f<A;)d=this.getElement(f)[0],k=g.cloneNode(!0),
84
+ e[f]&&(k.checked=!0),k.setAttribute("value",n[f].value),a.push(d.appendChild(k));(c=this.defaultIcon)&&this.setIcon(c);(c=b.attr("title"))?this.setLabel(c):this.wrapper.addClass("no-title")}c.create=function(b){return new l(b)};m.require("$9","LocoSelector.js").extend(l);f=l.prototype;f.selectIndex=function(b,e){return this.setIndexState(b,!this.selected[b],e)};f.setIndexState=function(b,e,a){var d=this.options[b],c=this.getElement(b),k=this.hidden[b],g=this.selected;d&&e!==g[b]&&(g[b]=e,c[e?"addClass":
85
+ "removeClass"]("checked"),k&&(k.checked=e),a&&this.change());return this};f.selectValue=function(b,e){if(null==b.pop)return l.parent.prototype.selectValue.call(this,b,e);for(var a=this.selected.slice(),d=this.options.length,c=this.index||{},k=!1,g=-1,n=-1;++g<d;)a[g]&&(k=!0),a[g]=!1;if(d=b.length)for(;++n<d;)g=c[b[n]],null==g?k=!0:!1===a[g]&&(k=a[g]=!0);if(k){for(g in a)this.setIndexState(g,a[g]);e&&this.change()}return this};f.val=function(){for(var b=[],e=this.options,a=this.selected,d=a.length,
86
+ c=-1;++c<d;)a[c]&&b.push(e[c].value);return b};f=null;return c}({},w,y));m.register("$44",function(c,f,h){function l(b,a){for(var d=String(b);a>d.length;)d="0"+d;return d}function b(b){var a=b%10;if(1===a){if(11!==b)return"st"}else if(2===a){if(12!==b)return"nd"}else if(3===a&&13!==b)return"rd";return"th"}c.formatter=function(){return{format:function(b,a){var d=this;return a.replace(/%[YmdHisMjSghAa]/g,function(a){return d[a.charAt(1)](b)})},Y:function(b){return String(b.getFullYear())},m:function(b){return l(1+
87
+ b.getFullMonth(),2)},M:function(b){return"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")[b.getMonth()]},d:function(b){return l(b.getDate(),2)},H:function(b){return l(b.getHours(),2)},i:function(b){return l(b.getMinutes(),2)},s:function(b){return l(b.getSeconds(),2)},j:function(b){return String(b.getDate())},S:function(e){return b(e.getDate())},g:function(b){b=b.getHours();return String(0===b?12:12<b?b-12:b)},h:function(b){return l(this.g(b),2)},a:function(b){return 12>b.getHours()?"am":
88
+ "pm"},A:function(b){return 12>b.getHours()?"AM":"PM"}}};return c}({},w,y));m.register("$34",function(c,f,D){function l(a){var e=a.id,c=p||(p=[]),r=k||(k={}),v=a.getAttribute("datetime"),v=n(v);if(!isNaN(v))return e||(e="tick"+ ++g,a.setAttribute("id",e)),a={id:e,el:a,dt:new Date(v),st:a.textContent},r[e]||c.push(a),r[e]=a,d||(d=setTimeout(b,200)),a}function b(){for(var a=p,c=a.length,g={},r=[];0<c--;)ticker=a[c],e(ticker)&&(r.push(ticker),g[ticker.id]=ticker);r.length?(p=r,k=g,d=setTimeout(b,3E4)):
89
+ d=k=p=null}function e(b){var d=b.el;if(D.contains&&!D.contains(d))return!1;strDate=a(b.dt,new Date,!0);if(""===strDate)return!1;strDate!==b.st&&(h(d).text(strDate),b.st=strDate);return!0}function a(a,b,d){var e=b.getTime(),c=a.getTime(),q=e-c;if(6E4>q)return"Just now";if(36E5>q)return a=Math.floor(q/6E4),String(a)+" minute"+(1===a?"":"s")+" ago";if(864E5>q&&b.getDate()===a.getDate()&&b.getMonth()===a.getMonth()&&b.getFullYear()===a.getFullYear())return a=Math.round(q/36E5),"About "+String(a)+" hour"+
90
+ (1===a?"":"s")+" ago";if(d)return"";d=Math.floor(e/864E5)-Math.floor(c/864E5);e=m.require("$44","date.js").formatter();q=e.format(a," %g:%i %A");return 1>=d&&(b.setHours(0),b.setMinutes(0),b.setSeconds(0),b=b.getTime()-864E5,c>=b)?"Yesterday at"+q:11>d?d+" days ago at"+q:e.format(a,"%M %j%S %Y,")+q}var d,p,k,g=0,n=Date.parse||function(){return Number.NaN};c.onEach=function(a,b){l(b)};c.update=function(a){e(l(a))};c.rel=a;return c}({},w,y));m.register("$18",function(c,f,D){var l=f.ieVersion;c.ie=function(b){return b?
91
+ l<=b:l};var b=c.init=function(b){b?b instanceof jQuery||(b=h(b)):b=h(D.body);var a=m.require("$31","ga.js"),d=m.require("$19","forms.js"),p=m.require("$32","modal.js"),k=m.require("$10","LocoAutoComplete.js"),g=m.require("$9","LocoSelector.js"),n=m.require("$33","LocoMultiSelector.js"),f=m.require("$11","tooltip.js");b.find("form").each(function(a,b){var e=h(b);l&&10>l&&d.placeholders(e);b.getAttribute("data-modal")?p.initForm(b):b.hasAttribute("action")&&"#"!==e.attr("action").charAt(0)&&!b.target&&
92
+ d.jsonify(b);e.find("input.auto-comp").each(function(a,b){k.init(b)});e.find("select.selector").each(function(a,b){b.hasAttribute("multiple")?n.create(h(b)):g.create(h(b))});e.hasClass("hasreveal")&&d.revealify(e);e.find("button.hastip").each(function(a,b){f.init(h(b))})});b.find("a").each(function(b,d){-1!==d.className.indexOf("hastip")&&f.init(h(d));"/modal/"===String(d.getAttribute("href")).substr(0,7)||d.getAttribute("data-modal")?p.initLink(h(d)):a.link(d)});b.find("time.tick").each(m.require("$34",
93
+ "tick.js").onEach);d=p=k=b=null;return c};c.$=function(b){return h(f.innerShiv?innerShiv(b,!1):b)};h.fn._html=function(e){return null!=e?(e=this.html(f.innerShiv?innerShiv(e,!1):e),b(this),e):j.html()};h.fn.macro=function(b,a){if("function"!==typeof b.run)throw Error("macro has no run function");b.run(this,a||{});return this};c.el=function(b,a){var d=D.createElement(b||"div");a&&(d.className=a);return d};c.txt=function(b){return D.createTextNode(b||"")};c.h=function(){function b(){c=/[<>&]/g;k=/(\r\n|\n|\r)/g;
94
+ g=/(?:https?):\/\/(\S+)/ig;n=location.hostname;b=null}function a(a){return"&#"+a.charCodeAt(0)+";"}function d(a,b){return'<a href="'+a+'" target="'+(b.indexOf(n)?"_blank":"_top")+'">'+b+"</a>"}var c,k,g,n;return function(n,f){b&&b();var s=n.replace(c,a);f&&(s=s.replace(g,d).replace(k,"<br />"));return s}}();c.noop=function(b){b&&(b.preventDefault(),b.stopPropagation(),h(b.target).blur());return!1};c.top=function(b,a){a||(a=D.body);for(var d=b.offsetTop||0;(b=b.offsetParent)&&b!==a;)d+=b.offsetTop||
95
+ 0;return d};c.left=function(b,a){a||(a=D.body);for(var d=b.offsetLeft||0;(b=b.offsetParent)&&b!==a;)d+=b.offsetLeft||0;return d};return c}({},w,y));m.register("$19",function(c,f,D){function l(a){function b(){a.value===g&&(a.value="",c.removeClass("placeheld"));return!0}function e(){""===a.value&&(a.value=g,c.addClass("placeheld"));return!0}var c=h(a);if(!c.hasClass("auto-comp")){var g=c.attr("placeholder");if(g)return c.focus(b).blur(e),e(),{kill:function(){b();c.off("focus",b).off("blur",e)}}}}var b=
96
  c.enable=function(a){function b(a,d){d.getAttribute("data-was-disabled")||(d.disabled=!1)}a.find(".button").removeClass("loading");a.find("button").each(b);a.find("input").each(b);a.find("select").each(b);a.find("textarea").each(b);f.attachEvent&&a.hasClass("has-placeholders")&&c.placeholders(a);a.removeClass("disabled").trigger("locoEnable");delete a._disabled},e=c.disable=function(a){function b(a,d){d.disabled?d.setAttribute("data-was-disabled","true"):d.disabled=!0}a._disabled||(a.find(".button").addClass("loading"),
97
  a.find("button").each(b),a.find("input").each(b),a.find("select").each(b),a.find("textarea").each(b),a.addClass("disabled").trigger("locoDisable"),a._disabled=!0)};c.jsonify=function(a,d,c){a instanceof jQuery||(a=h(a));a.disable||(h.fn.disable=function(){e(this);return this},h.fn.enable=function(){b(this);this.placehold&&this.placehold();return this});var k="";a.find('[type="submit"]').click(function(a){a&&a.target&&a.target.name&&(k=encodeURIComponent(a.target.name)+"="+encodeURIComponent(a.target.value));
98
+ return!0});a.submit(function(b){if(b&&b.isDefaultPrevented&&b.isDefaultPrevented()||c&&!1===c(b))return!1;var e=a.serialize(),e=e.replace(/%0D%0A/g,"%0A");k&&(e&&(e+="&"),e+=k,k="");a.disable();var f=m.require("$22","http.js"),e={url:f.jsonLink(a.attr("action")),type:a.attr("method"),data:e};f.ajax(e,d,function(){a.enable()},a);b.preventDefault();b.stopPropagation();return!1})};c.revealify=function(a){a=a.closest("form");a.find("div[data-reveal-if]").each(function(b,e){function c(a){var b;b=l;q=q||
99
+ a.target;if("."===r)b=Boolean(q&&q[v]),l&&(b=!b);else{var d,e,z=h(q.form).serializeArray();for(e in z)z[e].name===s&&(d=z[e].value);"!="===r&&(b=!b);b=b?v!==d:v===d}if(b!==f)if(f=b,a)g[f?"slideDown":"slideUp"](200);else g[f?"show":"hide"]();return!0}var g=h(e),n=/^(\!?)([_\w\-\[\]]+)(\.|!?=)(.*)$/.exec(g.attr("data-reveal-if"));if(n){var f,l=n[1]?!0:!1,s=n[2],r=n[3],v=n[4],n=a[0][s];if(n.type||null==n.length)n=[n];b=n.length;for(var q;0!==b--;)q=n[b],c(),h(q).change(c).removeClass("jshide");n=n=q=
100
+ null}});a=null};c.linkify=function(a){var b=a.getAttribute("data-icon");if(b){var e=h(a),c=h("<a> </a>");c.attr("href",a.form.action);c.attr("class",e.attr("class"));c.attr("tabindex",e.attr("tabindex"));e.attr("tabindex","-1");c.text(e.val());b&&h("<span></span>").prependTo(c).addClass(b);e.hide().after(c);c.click(function(a){e.click();return!1})}};c.placeholders=function(a){var b,e=[];a.find("input[placeholder]").each(function(a,c){"password"!==c.type&&(b=l(c))&&e.push(b)});e.length&&(a.submit(function(){for(var a in e)e[a].kill()}),
101
+ a.addClass("has-placeholders"),b=i=null)};return c}({},w,y));m.register("$4",function(c,f,D){function l(a,b,d){function e(){c();g=setTimeout(b,d)}function c(){g&&clearTimeout(g);g=null}var g;e();h(a).mouseenter(c).mouseleave(e);return{die:function(){c();h(a).off("mouseenter mouseleave")}}}function b(a,b){a.fadeTo(b,0,function(){a.slideUp(b,function(){a.remove();h(f).triggerHandler("resize")})});return a}function e(a,d){function e(d){g[r]=null;b(h(a),250);c&&c.die();var q;if(q=d)d.stopPropagation(),
102
+ d.preventDefault(),q=!1;return q}var c,r;h(a).addClass("is-dismissible");h('<button type="button" class="notice-dismiss" href="#"> </a>').prependTo(a).click(e);h(f).triggerHandler("resize");n();r=g.length;g.push(e);d&&(c=l(a,e,d));return{stick:function(){c&&c.die();c=null;g[r]=null}}}function a(a,b,d){var e=m.require("$18","html.js");a=h('<div class="notice notice-'+a+'" loco-notice inline></div>').prependTo(h("#loco-notices"));var c=h(e.el("p"));d=h(e.el("span")).text(d);b=h(e.el("strong","has-icon")).text(b+
103
+ ": ");c.append(b).append(d).appendTo(a);return a}function d(b,d,c,g){b=a(c,d,b).hide().fadeIn(500);h(f).triggerHandler("resize");return e(b,g)}function p(a){return d(a,C,"warning")}function k(){h("#loco-notices").find("div.notice").each(function(a,b){if(-1===b.className.indexOf("jshide")){var d=-1===b.className.indexOf("notice-success")?null:5E3;e(b,d)}})}var g=[],n=Date.now||function(){return(new Date).getTime()},A,C,s,r;c.error=function(a){return d(a,A,"error")};c.warn=p;c.info=function(a){return d(a,
104
+ s,"info")};c.success=function(a){return d(a,r,"success",5E3)};c.warning=p;c.log=function(){f.console&&console.log&&console.log.apply(console,arguments)};c.debug=function(a,b){f.console&&console.error&&(console.error("Loco Error: "+a),b&&console.debug&&console.debug(b))};c.clear=function(){for(var a=-1,b,d=g,e=d.length;++a<e;)(b=d[a])&&b();g=[];return c};c.create=a;c.raise=function(a){(c[a.type]||c.error).call(c,a.message)};c.convert=e;c.init=function(a){A=a._("Error");C=a._("Warning");s=a._("Notice");
105
+ r=a._("OK");setTimeout(k,1E3);return c};return c}({},w,y));m.register("$5",function(c,f,D){function l(a){var b=h("<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 b(a){return(a=a.split(/[\r\n]/)[0])?(a=a.replace(/ +in +\S+ on line \d+/,""),a=a.replace(/^[()! ]+Fatal error:\s*/,"")):t._("Server returned invalid data")}function e(a,b,d){a[b]=d}function a(a,b,d){a.push({name:b,value:d})}
106
+ function d(a,b,d){a.append(b,d)}function p(a,d,e,c){function q(d,c,q){if("abort"!==c){var z=g||{_:function(a){return a}},p=d.status,f=d.responseText,v=l(f),h=d.getResponseHeader("Content-Type")||"text/html",s=d.getResponseHeader("Content-Length")||f.length;"success"===c&&q?k.error(q):(k.error(b(v)+".\n"+z._("Check console output for debugging information")),k.debug("Ajax failure for "+a,{status:p,error:c,message:q,output:f}),"parsererror"===c&&(q="Response not JSON"),k.log([z._("Provide the following text when reporting a problem")+
107
+ ":","----","Status "+p+' "'+(q||z._("Unknown error"))+'" ('+h+" "+s+" bytes)",v,"===="].join("\n")));e&&e.call&&e(d,c,q);n=d}}c.url=A;c.dataType="json";c.error=q;c.success=function(a,b,e){var c=a&&a.data,g=a&&a.notices,r=g&&g.length;for(!c||a.error?q(e,b,a&&a.error&&a.error.message):d&&d(c,b,e);r--;)k.raise(g[r])};var k=m.require("$4","notices.js").clear();return h.ajax(c)}var k={},g,n,A=f.ajaxurl||"/wp-admin/admin-ajax.php";c.init=function(a){k=a.nonces||k;return c};c.localise=function(a){g=a;return c};
108
+ c.xhr=function(){return n};c.strip=l;c.parse=b;c.submit=function(a,b,d){function e(){c.removeClass("loading");m.require("$19","forms.js").enable(c)}var c=h(a),g=c.serialize();c.addClass("loading");m.require("$19","forms.js").disable(c);return p(a.route.value,function(a,d,c){e();b&&b(a,d,c)},function(a,b,c){e();d&&d(a,b,c)},{type:a.method,data:g})};c.post=function(b,c,g,n){var q,B=!0;c=c||{};(q=k[b])||(f.console&&console.debug&&console.debug('No nonce for "'+b+'"'),q="");var E=q;f.FormData&&c instanceof
109
+ FormData?(B=!1,q=d):q=Array.isArray(c)?a:e;q(c,"action","loco_json");q(c,"route",b);q(c,"loco-nonce",E);return p(b,g,n,{type:"post",data:c,processData:B,contentType:B?"application/x-www-form-urlencoded; charset=UTF-8":!1})};c.setNonce=function(a,b){k[a]=b;return c};c.hasNonce=function(a){return!!k[a]};return c}({},w,y));m.register("$20",{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,
110
+ orkh:1,ital:1,lydi:1,ar:1,ary:1,ckb:1,dv:1,fa:1,he:1,nqo:1,ps:1,ur:1,yi:1});m.register("$6",function(c,f,h){function l(){}var b,e=m.require("$20","rtl.json");c.init=function(){return new l};c.cast=function(a){return a instanceof l?a:"string"===typeof a?c.parse(a):c.clone(a)};c.clone=function(a){var b,c=new l;for(b in a)c[b]=a[b];return c};c.parse=function(a){if(!(b||(b=/^([a-z]{2,3})(?:[-_]([a-z]{2}))?(?:[-_]([a-z0-9]{3,8}))?$/i)).exec(a))return null;var d=new l;d.lang=RegExp.$1.toLowerCase();if(a=
111
+ RegExp.$2)d.region=a.toUpperCase();if(a=RegExp.$3)d.variant=a.toLowerCase();return d};f=l.prototype;f.isValid=function(){return!!this.lang};f.isKnown=function(){var a=this.lang;return!(!a||"zxx"===a)};f.toString=function(a){a=a||"-";var b,c=this.lang||"zxx";if(b=this.region)c+=a+b;if(b=this.variant)c+=a+b;return c};f.getIcon=function(){for(var a=3,b,c,e=["variant","region","lang"],g=[];0!==a--;)if(b=e[a],c=this[b])g.push(b),g.push(b+"-"+c.toLowerCase());return g.join(" ")};f.isRTL=function(){return!!e[String(this.lang).toLowerCase()]};
112
+ f=null;return c}({},w,y));m.register("$38",function(c,f,h){function l(){}var b,e,a=m.require("$20","rtl.json");c.init=function(){return new l};c.cast=function(a){return a instanceof l?a:"string"===typeof a?c.parse(a):c.clone(a)};c.clone=function(a){var b,c=new l;for(b in a)c[b]=a[b];return c};c.parse=function(a){b||(e=/[-_+]/,b=/^([a-z]{2,3})(?:-([a-z]{4}))?(?:-([a-z]{2}|[0-9]{3}))?(?:-([0-9][a-z0-9]{3,8}|[a-z0-9]{5,8}))?(?:-([a-z]-[-a-z]+))?$/i);a=String(a).split(e).join("-");if(!b.exec(a))return null;
113
+ var c=new l;c.lang=RegExp.$1.toLowerCase();if(a=RegExp.$2)c.script=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();if(a=RegExp.$3)c.region=a.toUpperCase();if(a=RegExp.$4)c.variant=a.toLowerCase();if(a=RegExp.$5)c.extension=a;return c};f=l.prototype;f.isValid=function(){return!!this.lang};f.isKnown=function(){var a=this.lang;return!(!a||"zxx"===a)};f.toString=function(a){a=a||"-";var b,c=this.lang||"zxx";if(b=this.script)c+=a+b;if(b=this.region)c+=a+b;if(b=this.variant)c+=a+b;if(b=this.extension)c+=
114
+ a+b;return c};f.getIcon=function(){for(var a=4,b,c,e=["variant","region","script","lang"],n=[];0!==a--;)if(b=e[a],c=this[b])c.join&&(c=c.join("-")),1===a&&3===c.length?n.push("region-m49"):n=n.concat([b,b+"-"+c.toLowerCase()]);return n.join(" ")};f.isRTL=function(){return!!a[String(this.script||this.lang).toLowerCase()]};f=null;return c}({},w,y));m.register("$39",function(c,f,h){function l(a){f.console&&console.error&&console.error(a)}function b(){l("Method not implemented")}function e(){}function a(a){}
115
+ e.prototype.toString=function(){return"[Undefined]"};a.prototype._validate=function(a){var c,k,g=!0;for(c in this)k=this[c],k===b?(l(a+"."+c+"() must be implemented"),g=!1):k instanceof e&&(l(a+"."+c+" must be defined"),g=!1);return g};c.init=function(d,c){var k,g=new a;if(d)for(k=d.length;0!==k--;)g[d[k]]=b;if(c)for(k=c.length;0!==k--;)g[c[k]]=new e;return g};c.validate=function(a){var b=/function (\w+)\(/.exec(a.toString())?RegExp.$1:"";a.prototype._validate(b||"Object")};return c}({},w,y));m.register("$49",
116
+ function(c,f,h){var l=f.requestAnimationFrame,b=f.cancelAnimationFrame,e=0;if(!l||!b)for(var a in{ms:1,moz:1,webkit:1,o:1})if(l=f[a+"RequestAnimationFrame"])if(b=f[a+"CancelAnimationFrame"]||f[a+"CancelRequestAnimationFrame"])break;l&&b||(l=function(a){var b=d();timeToCall=Math.max(0,16-(b-e));nextTime=b+timeToCall;timerId=f.setTimeout(function(){a(nextTime)},timeToCall);e=nextTime;return timerId},b=function(a){clearTimeout(a)});var d=Date.now||function(){return(new Date).getTime()};c.loop=function(a,
117
+ d){function c(){f=l(c,d);a(e++)}var e=0,f;c();return{stop:function(){f&&b(f);f=null}}};return c}({},w,y));m.register("$45",function(c,f,h){function l(b,d,c,e){if(a){var g=c;c=function(a){if((a.MSPOINTER_TYPE_TOUCH||"touch")===a.pointerType)return g(a)}}b.addEventListener(d,c,e);return{unbind:function(){b.removeEventListener(d,c,e)}}}function b(a){a.preventDefault();a.stopPropagation();return!1}var e,a=!!f.navigator.msPointerEnabled,d=a?"MSPointerDown":"touchstart",p=a?"MSPointerMove":"touchmove",
118
+ k=a?"MSPointerUp":"touchend";c.ok=function(a){null==e&&(e="function"===typeof h.body.addEventListener);e&&a&&a(c);return e};c.ms=function(){return a};c.dragger=function(a,c){function e(b){a.addEventListener(b,n[b],!1)}function r(b){a.removeEventListener(b,n[b],!1)}var n={};n[d]=function(a){g(a,function(b,e){e.type=d;c(a,e,q)});e(p);e(k);return!0};n[k]=function(a){r(p);r(k);g(a,function(b,d){d.type=k;c(a,d,q)});return!0};n[p]=function(a){g(a,function(b,d){d.type=p;c(a,d,q)});return b(a)};e(d);var q=
119
+ {kill:function(){r(d);r(p);r(k);a=q=c=null}};return q};c.swiper=function(c,e,f){function r(a){c.addEventListener(a,u[a],!1)}function v(a){c.removeEventListener(a,u[a],!1)}function q(){h&&h.stop();h=null}var h,E,l,u={},z=[],F=[],K=[];u[d]=function(a){E=!1;q();var b=n();g(a,function(a,d){z[a]=b;F[a]=d.clientX;K[a]=d.clientY});l=c.scrollLeft;return!0};u[k]=function(a){g(a,function(a,b){var d=n()-z[a],c=F[a]-b.clientX,d=Math.abs(c)/d;e(d,c?0>c?-1:1:0)});l=null;return!0};u[p]=function(a){var d,e;null==
120
+ l||g(a,function(a,b){d=F[a]-b.clientX;e=K[a]-b.clientY});if(e&&Math.abs(e)>Math.abs(d))return E=!0;d&&(E=!0,c.scrollLeft=Math.max(0,l+d));return b(a)};if(!a||f)r(d),r(p),r(k),a&&(c.className+=" mstouch");return{kill:function(){v(d);v(p);v(k);q()},swiped:function(){return E},ms:function(){return a},snap:function(b){a&&!f&&(c.style["-ms-scroll-snap-points-x"]="snapInterval(0px,"+b+"px)",c.style["-ms-scroll-snap-type"]="mandatory",c.style["-ms-scroll-chaining"]="none")},scroll:function(a,b,d){q();var e=
121
+ c.scrollLeft,g=a>e?1:-1,r=Math[1===g?"min":"max"],z=Math.round(16*b*g);return h=m.require("$49","fps.js").loop(function(b){b&&(e=Math.max(0,r(a,e+z)),c.scrollLeft=e,a===e&&(q(),d&&d(e)))},c)}}};c.start=function(a,b){return l(a,d,b,!1)};c.move=function(a,b){return l(a,p,b,!1)};c.end=function(a,b){return l(a,k,b,!1)};var g=c.each=function(b,d){if(a)(b.MSPOINTER_TYPE_TOUCH||"touch")===b.pointerType&&d(0,b);else for(var c=-1,e=(b.originalEvent||b).changedTouches||[];++c<e.length;)d(c,e[c])},n=Date.now||
122
+ function(){return(new Date).getTime()};return c}({},w,y));m.register("$50",function(c,f,m){c.init=function(c){function b(){f.style.top=String(-c.scrollTop)+"px";return!0}function e(){var b=f;b.textContent=c.value;b.innerHTML=b.innerHTML.replace(/[ \t]/g,a).split(/(?:\n|\r\n?)/).join('<span class="eol crlf"></span>\r\n')+'<span class="eol eof"></span>';return!0}function a(a){return'<span class="x'+a.charCodeAt(0).toString(16)+'">'+a+"</span>"}var d=c.parentNode,f=d.insertBefore(m.createElement("div"),
123
+ c);h(c).on("input",e).on("scroll",b);h(d).addClass("has-mirror");f.className="ta-mirror";var k=c.offsetWidth-c.clientWidth;2<k&&(f.style.marginRight=String(k-2)+"px");e();b();return{kill:function(){h(c).off("input",e).off("scroll",b);d.removeChild(f);f=null;h(d).removeClass("has-mirror")}}};return c}({},w,y));m.register("$30",function(c,f,h){function l(a,d){for(var c=0,e=-1,g=d&&f[d],n=b[a]||[],h=n.length;++e<h;)callback=n[e],"function"===typeof callback&&(callback(g),c++);return c}var b={},e;c.load=
124
+ function(a,d,c){function e(){A&&(clearTimeout(A),A=null);m&&(m.onreadystatechange=null,m=m=m.onload=null);a&&(delete b[a],a=null)}function g(b,d){var g=m&&m.readyState;if(d||!g||"loaded"===g||"complete"===g)d||l(a,c),e()}function n(){if(0===l(a))throw Error('Failed to load "'+(c||a)+'"');e()}if(c&&f[c])"function"===typeof d&&d(f[c]);else if(null!=b[a])b[a].push(d);else{b[a]=[d];var A=setTimeout(n,4E3),m=h.createElement("script");m.setAttribute("src",a);m.setAttribute("async","true");m.onreadystatechange=
125
+ g;m.onload=g;m.onerror=n;m.onabort=e;h.getElementsByTagName("head")[0].appendChild(m)}};c.stat=function(a){var b;if(!(b=e)){for(var c,f,g=h.getElementsByTagName("script"),n=-1,l=g.length;++n<l;)if(b=g[n].getAttribute("src"))if(c=b.indexOf("/lib/vendor"),-1!==c){f=b.substr(0,c);break}b=e=f||"/static"}return b+a};return c}({},w,y));m.register("$15",function(c,f,D){function l(a,b){a.setReadOnly(!1);a.on("change",function(a,c){return b.val(c.getValue())});a.on("focus",function(){return b.focus()});a.on("blur",
126
  function(){return b.blur()})}function b(a){a.off("change");a.off("focus");a.off("blur")}function e(a){b(a);a.setReadOnly(!0);a.setHighlightGutterLine(!1);a.setHighlightActiveLine(!1)}function a(a,b){function c(){this.HighlightRules=e}var e=d(b),g=a.require,f=g("ace/lib/oop");f.inherits(e,g("ace/mode/text_highlight_rules").TextHighlightRules);f.inherits(c,g("ace/mode/text").Mode);return new c}function d(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_:\\.-]+;)"},
127
+ {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=p(a);"icu"===a?b={start:b.start.concat([{token:"icu-quoted",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]*[^{}]+)?)?}"},
128
  {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]+",
129
+ 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 p(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%]/;
130
+ 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 g:return k||"%%"}}var k,g="auto";c.init=function(c,d,k){var p,r=!1,v=k||g,q=c.parentNode,B=q.appendChild(D.createElement("div"));h(q).addClass("has-proxy has-ace");m.require("$30","remote.js").load("https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ace.js",
131
+ function(b){if(B){if(!b)throw Error("Failed to load code editor");p=b.edit(B);var q=p.session,g=p.renderer;p.$blockScrolling=Infinity;p.setShowInvisibles(r);p.setWrapBehavioursEnabled(!1);p.setBehavioursEnabled(!1);p.setHighlightActiveLine(!1);q.setUseSoftTabs(!1);g.setShowGutter(!0);g.setPadding(10);g.setScrollMargin(8);q.setMode(a(b,v));p.setValue(c.value,-1);q.setUseWrapMode(!0);d?l(p,d):e(p)}},"ace");return{kill:function(){p&&(b(p),p.destroy(),p=null);B&&(q.removeChild(B),h(q).removeClass("has-proxy has-ace"),
132
+ B=null);return this},disable:function(){p&&e(p);d=null;return this},enable:function(a){d=a;p&&l(p,a);return this},resize:function(){p&&p.resize();return this},val:function(a){p&&a!==p.getValue()&&p.setValue(a,-1);return this},invs:function(a){a=a||!1;r!==a&&(r=a,p&&p.setShowInvisibles(a));return this},strf:function(b){b=b||g;b!==v&&(v=b,p&&p.session.setMode(a(f.ace,b)));return this},focus:function(){return this}}};c.strf=function(a,b){g=a;k=b;return c};return c}({},w,y));m.register("$51",function(c,
133
+ f,D){function l(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 b(a){a.off("input");a.off("change");a.off("focus");a.off("blur")}function e(a){b(a);a.setMode("readonly")}var a=0;c.load=function(a){var b=m.require("$30","remote.js");b.load(b.stat("/lib/tinymce.min.js"),a,"tinymce");return c};c.init=function(d,f){function k(a){C=a;s="<p>"===a.substr(0,3)&&
134
+ "</p>"===a.substr(-4);return a.replace(/(<\/?)script/ig,"$1loco:script")}function g(a){n=a;a._getContent=a.getContent;a.getContent=function(a){a=this._getContent(a);a=a.replace(/(<\/?)loco:script/ig,"$1script");if(!s&&"<p>"===a.substr(0,3)&&"</p>"===a.substr(-4)){var b=a.substr(3,a.length-7);if(b===C||-1===b.indexOf("</p>"))a=b}return a};a._setContent=a.setContent;a.setContent=function(a,b){return this._setContent(k(a),b)};f?(l(a,f),f.reset()):e(a);h(q).removeClass("loading")}var n,m=!1,C="",s=!1,
135
+ r=d.parentNode,v=r.parentNode,q=r.appendChild(D.createElement("div")),B=v.insertBefore(D.createElement("nav"),r);B.id="_tb"+String(++a);h(r).addClass("has-proxy has-mce");h(q).addClass("mce-content-body loading").html(k(d.value));c.load(function(a){if(!a)throw Error("Failed to load HTML editor");q&&a.init({inline:!0,target:q,hidden_input:!1,theme:"modern",skin:!1,plugins:"link lists",browser_spellcheck:!0,menubar:!1,fixed_toolbar_container:"#"+B.id,toolbar:"formatselect | bold italic link unlink | bullist numlist outdent indent",
136
  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",
137
+ entities:"38,amp,60,lt,62,gt,160,nbsp",entity_encoding:"named",keep_styles:!1,init_instance_callback:g})});return{val:function(a){a=k(a);null==n?(d.value=a,h(q).html(a)):n.getContent()!==a&&n.setContent(a);f&&f.val(a);return this},kill:function(){n&&(f&&f.val(n.getContent()),b(n),n.destroy(),n=null);q&&(r.removeChild(q),h(r).removeClass("has-proxy has-mce"),q=null);B&&(v.removeChild(B),B=null);return this},enable:function(a){f=a;n&&l(n,a);return this},disable:function(){n&&e(n);f=null;return this},
138
+ focus:function(){n&&f&&n.focus();return this},invs:function(a){a=a||!1;m!==a&&(m=a,h(r)[a?"addClass":"removeClass"]("show-invs"));return this}}};return c}({},w,y));m.register("$46",function(c,f,D){function l(a){function b(){l&&(m.off("input",c),l=!1)}function c(){var b=a.value;b!==r&&(m.trigger("changing",[b,r]),r=b)}function f(){c();l&&v!==r&&m.trigger("changed",[r])}function g(){e=a;v=r;l||(m.on("input",c),l=!0);m.trigger("editFocus");s.addClass("has-focus");return!0}function n(){e===a&&(e=null);
139
+ m.trigger("editBlur");s.removeClass("has-focus");l&&(f(),b());return!0}var l=!1,m=h(a),s=h(a.parentNode),r=a.value,v;m.blur(n).focus(g);return{val:function(b){r!==b&&(a.value=b,m.triggerHandler("input"),r=b);return!0},kill:function(){b();m.off("blur",n).off("focus",g)},fire:function(){r=null;c()},ping:f,blur:n,focus:g,reset:function(){v=r=a.value}}}function b(a){this.e=a}var e;c._new=function(a){return new b(a)};c.init=function(a){var c=new b(a);a.disabled?(a.removeAttribute("disabled"),c.disable()):
140
  a.readOnly?c.disable():c.enable();return c};TextAreaPrototype=b.prototype;TextAreaPrototype.destroy=function(){this.unlisten();var a=this.p;a&&(a.kill(),this.p=null);this.e=null};TextAreaPrototype.reload=function(a,b){var c=this.l;c&&!b&&(this.disable(),c=null);this.val(a||"");b&&!c&&this.enable();return this};TextAreaPrototype.val=function(a){var b=this.e;if(null==a)return b.value;var c=this.l,e=this.p;e&&e.val(a);c&&c.val(a);c||b.value===a||(b.value=a,h(b).triggerHandler("input"));return this};
141
  TextAreaPrototype.fire=function(){this.l&&this.l.fire();return this};TextAreaPrototype.ping=function(){this.l&&this.l.ping();return this};TextAreaPrototype.focus=function(){var a=this.p;a?a.focus():h(this.e).focus()};TextAreaPrototype.focused=function(){return e&&e===this.el};TextAreaPrototype.parent=function(){return this.e.parentNode};TextAreaPrototype.attr=function(a,b){var c=this.e;if(1===arguments.length)return c.getAttribute(a);null==b?c.removeAttribute(a):c.setAttribute(a,b);return this};TextAreaPrototype.editable=
142
+ function(){return!!this.l};TextAreaPrototype.enable=function(){var a=this.p;this.e.removeAttribute("readonly");this.listen();a&&a.enable&&a.enable(this.l);return this};TextAreaPrototype.disable=function(){var a=this.p;this.e.setAttribute("readonly",!0);this.unlisten();a&&a.disable&&a.disable();return this};TextAreaPrototype.listen=function(){var a=this.l;a&&a.kill();this.l=l(this.e);return this};TextAreaPrototype.unlisten=function(){var a=this.l;a&&(a.kill(),this.l=null);return this};TextAreaPrototype.setInvs=
143
+ function(a,b){var c=this.i||!1;if(b||c!==a)this._i&&(this._i.kill(),delete this._i),(c=this.p)?c.invs&&c.invs(a):a&&(this._i=m.require("$50","mirror.js").init(this.e)),this.i=a;return this};TextAreaPrototype.getInvs=function(){return this.i||!1};TextAreaPrototype.setMode=function(a){var b=this.p,c=this.i||!1;a!==(this.m||"")&&(this.m=a,b&&b.kill(),this.p=b="code"===a?m.require("$15","ace.js").init(this.e,this.l,this["%"]):"html"===a?m.require("$51","mce.js").init(this.e,this.l):null,this.setInvs(c,
144
+ !0),e&&this.focus());return this};TextAreaPrototype.setStrf=function(a){this["%"]=a;"code"===this.m&&this.p.strf(a);return this};TextAreaPrototype.name=function(a){this.e.setAttribute("name",a);return this};TextAreaPrototype.placeholder=function(a){this.e.setAttribute("placeholder",a);return this};TextAreaPrototype.redraw=function(){var a=this.p;a&&a.resize&&a.resize()};TextAreaPrototype=null;return c}({},w,y));m.register("$47",function(c,f,m){function l(a){var b=f.console;b&&b.error&&b.error(a)}
145
+ function b(a){var b=m.createElement("div");a&&b.setAttribute("class",a);return b}function e(a){return function(){a.resize();return this}}function a(a){return function(b){for(var c=b.target,d=c.$index;null==d&&"DIV"!==c.nodeName&&(c=c.parentElement);)d=c.$index;null!=d&&(b.stopImmediatePropagation(),a.select(d));return!0}}function d(a){return function(){a.redrawDirty()&&a.redraw();return!0}}function p(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||
146
+ b.ctrlKey||b.metaKey||b.altKey)return!0;a.selectNext(c);b.stopPropagation();b.preventDefault();return!1}}function k(a,b,c){function d(a){l("row["+a+"] disappeared");return{cellVal:function(){return""}}}return function(e){var g=b||0,f=c?-1:1,z=a.rows||[];e.sort(function(a,b){return f*(z[a]||d(a)).cellVal(g).localeCompare((z[b]||d(b)).cellVal(g))})}}function g(a){this.w=a}function n(a){this.t=a;this.length=0}function A(a,b,c){var d=m.createElement("div");d.className=c||"";this._=d;this.d=b||[];this.i=
147
+ a||0;this.length=b.length}function C(a){this.live=a;this.rows=[]}c.create=function(a){return new g(a)};var s=g.prototype;s.init=function(c){var g=this.w,q=g.id,f=g.splity(q+"-thead",q+"-tbody"),k=f[0],f=f[1],n=[],l=[],z=[],F=[];if(c)this.ds=c,this.idxs=l,this._idxs=null;else if(!(c=this.ds))throw Error("No datasource");k.css.push("wg-thead");f.css.push("wg-tbody");c.eachCol(function(a,b,c){z[a]=q+"-col-"+b;F[a]=c||b});for(var m=b(),s=-1,C=z.length,D=b("wg-cols"),w=k.splitx.apply(k,z);++s<C;)w[s].header(F[s]),
148
+ D.appendChild(m.cloneNode(!1)).setAttribute("for",z[s]);c.eachRow(function(a,b,c){n[a]=new A(a,b,c);l[a]=a});this.rows=n;this.cols=D;this.ww=null;this.root=m=f.body;this.head=k;k.redraw=e(this);k=f.fixed=w[0].bodyY()||20;g.lock().resize(k,f);g.css.push("is-table");g.restyle();this.sc?this._re_sort(C):c.sort&&c.sort(l);this.redrawDirty();this.render();h(m).attr("tabindex","-1").on("keydown",p(this)).on("mousedown",a(this)).on("scroll",d(this));return this};s.clear=function(){for(var a=this.pages||
149
+ [],b=a.length;0!==b--;)a[b].destroy();this.pages=[];this.sy=this.mx=this.mn=this.vh=null;void 0;return this};s.render=function(){for(var a,b,c=[],d=this.rows||[],e=-1,g,f=this.idxs,z=f.length,k=this.idxr={},n=this.r,h=this._r,p=this.root,l=this.cols;++e<z;){0===e%100&&(a=l.cloneNode(!0),b=new C(a),b.h=2200,b.insert(p),c.push(b));g=f[e];k[g]=e;a=d[g];if(null==a)throw Error("Render error, no data at ["+g+"]");a.page=b;b.rows.push(a)}b&&100!==b.size()&&b.sleepH(22);this.pages=c;this.mx=this.mn=null;
150
+ this.redrawDirty();this.redraw();null==n?null!=h&&(a=d[h])&&a.page&&(delete this._r,this.select(h,!0)):(a=d[n])&&a.page?this.select(n,!0):(this.deselect(),this._r=n);return this};s.resize=function(){var a=-1,b=this.ww||(this.ww=[]),c=this.w,d=c.cells[0],e=d.body.childNodes,g=e.length,f=this.pages||[],z=f.length;for(c.redraw.call(d);++a<g;)b[a]=e[a].style.width;if(z){c=this.mx;for(a=this.mn;a<=c;a++)f[a].widths(b);this.redrawDirty()&&this.redraw()}};s.redrawDirty=function(){var a=!1,b=this.root,c=
151
+ b.scrollTop,b=b.clientHeight;this.sy!==c&&(a=!0,this.sy=c);this.vh!==b&&(a=!0,this.vh=b);return a};s.redraw=function(){for(var a=0,b=-1,c=null,d=null,e=this.ww,g=this.sy,f=this.vh,z=this.mn,k=this.mx,n=Math.max(0,g-100),g=f+g+100,h=this.pages||[],p=h.length;++b<p&&!(a>g);)f=h[b],a+=f.height(),a<n||(null===c&&(c=b),d=b,f.rendered||f.render(e));if(z!==c){if(null!==z&&c>z)for(b=z;b<c;b++){f=h[b];if(!f)throw Error("Shit!");f.rendered&&f.sleep()}this.mn=c}if(k!==d){if(null!==k&&d<k)for(b=k;b>d;b--)f=h[b],
152
  f.rendered&&f.sleep();this.mx=d}};s.selected=function(){return this.r};s.thead=function(){return this.w.cells[0]};s.tbody=function(){return this.w.cells[1]};s.tr=function(a){return(a=this.row(a))?a.cells():[]};s.row=function(a){return this.rows[a]};s.td=function(a,b){return this.tr(a)[b]};s.next=function(a,b,c){null==c&&(c=this.r||0);var d=this.idxs,e=d.length,g=(this.idxr||{})[c];for(c=g;c!==(g+=a)&&!(0<=g&&e>g);)if(b&&e)g=1===a?-1:e,b=!1;else return null;c=d[g];return null==c||null==this.rows[c]?
153
+ (l("Bad next: ["+g+"] does not map to data row"),null):c};s.selectNext=function(a,b,c){a=this.next(a,b);null!=a&&this.r!==a&&this.select(a,c);return this};s.deselect=function(a){var b=this.r;null!=b&&(this.r=null,h(this.tr(b)).removeClass("selected"),this.w.fire("wgRowDeselect",[b,a]));return this};s.selectRow=function(a,b){return this.select(this.idxs[a])};s.select=function(a,b){var c=this.rows[a],d=c&&c.page;if(!d)return this.deselect(!1),l("Row is filtered out"),this;this.deselect(!0);var e,g=
154
+ this.w.cells[1];d.rendered||(e=d.top(),g.scrollY(e),this.redrawDirty()&&this.redraw());if(!c.rendered)return d.rendered||l("Failed to render page"),l("Row ["+c.i+"] not rendered"),this;d=c.cells();h(d).addClass("selected");this.r=a;b||(e=g.scrollY(),h(this.root).focus(),e!==g.scrollY()&&g.scrollY(e));g.scrollTo(d[0],!0);this.w.fire("wgRowSelect",[a,c.data()]);return this};s.unfilter=function(){this._idxs&&(this.idxs=this._sort(this._idxs),this._idxs=null,this.clear().render());return this};s.filter=
155
+ function(a){this._idxs||(this._idxs=this.idxs);this.idxs=this._sort(a);return this.clear().render()};s.each=function(a){for(var b,c=-1,d=this.rows||[],e=this.idxs||[],g=e.length;++c<g;)b=e[c],a(d[b],c,b);return this};s.sortable=function(a){var b=this.sc||(this.sc=new n(this));b.has(a)||b.add(a);return this};s._re_sort=function(a){var b=-1,c=this.sc,d=c.active;for(this.sc=c=new n(this);++b<a;)c.add(b);d&&(b=this.head.indexOf(d.id),-1===b&&(b=Math.min(d.idx,a-1)),this.sort(b,d.desc));return this};s._sort=
156
+ function(a,b){b?(this.s=b,b(a)):(b=this.s)&&b(a);return a};s.sort=function(a,b){this._sort(this.idxs,k(this,a,b));this.sc.activate(a,b);return this};s=null;s=n.prototype;s.has=function(a){return null!=this[a]};s.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};s.toggle=function(a){this.t.sort(a,!this[a].desc).clear().render();
157
  return this};s.activate=function(a,b){var c,d;c=this.active;var e=this[a],g=this.t.head.cells;c&&(d=g[c.idx])&&(d.removeClass(c.css),c!==e&&d.restyle());(d=g[a])?(e.desc=b,this.active=e,c="wg-"+(b?"desc":"asc"),d.addClass(c).restyle(),e.css=c):this.active=null;return this};s=null;s=A.prototype;s.render=function(a){var b,c=[],d=this._,e=this.length;if(d){for(this.c=c;0!==e--;)b=d.cloneNode(!1),c[e]=this.update(e,b),b.$index=this.i,a[e].appendChild(b);this._=null}else for(c=this.c;0!==e--;)a[e].appendChild(c[e]);
158
+ this.rendered=!0;return this};s.update=function(a,b){var c=b||this.c[a]||{},d=(this.d[a]||function(){})()||"\u00a0";null==d.innerHTML?c.textContent=d:c.innerHTML=d.innerHTML;return c};s.cells=function(){return this.c||[]};s.data=function(){for(var a=-1,b=[],c=this.length;++a<c;)b[a]=this.cellVal(a);return b};s.destroy=function(){this.page=null;this.rendered=!1};s.cellVal=function(a){a=this.d[a]()||"";return String(a.textContent||a)};s=null;s=C.prototype;s.size=function(){return this.rows.length};
159
+ s.insert=function(a){var c=this.h,d=b("wg-dead");d.style.height=String(c)+"px";a.appendChild(d);return this.dead=d};s.top=function(){return(this.rendered?this.live:this.dead).offsetTop};s.height=function(){var a=this.h;null==a&&(this.h=a=this.rendered?this.live.firstChild.offsetHeight:this.dead.offsetHight);a||l("row has zero height");return a};s.render=function(a){for(var b,c=-1,d=this.rows,e=d.length,g=this.dead,f=this.live,z=f.childNodes;++c<e;)b=d[c],b.rendered||b.render(z);e=a.length;for(c=0;c<
160
+ e;c++)z[c].style.width=a[c];g.parentNode.replaceChild(f,g);this.rendered=!0;this.h=null;return this};s.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};s.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};s.widths=function(a){for(var b=this.live.childNodes,c=a.length;0!==c--;)b[c].style.width=a[c];return this};
161
+ s.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()};s=null;return c}({},w,y));m.register("$40",function(c,f,D){function l(a,b){var c=a.id,d=c&&s[c],e=d&&d.parent();if(!d||!e)return null;var g=e.dir===C,c=g?"X":"Y",f="page"+c,g=g?A:n,k=g(e.el),c=b["offset"+c],h=e.el,p=h.className;null==c&&(c=b[f]-g(a));c&&(k+=c);h.className=p+" is-resizing";return{done:function(){h.className=p},move:function(a){e.resize(a[f]-k,
162
+ d);return!0}}}function b(b,c){function d(){h(D).off("mousemove",e);v&&(v.done(),v=null);return!0}function e(a){v?v.move(a):d();return!0}if(v)return!0;v=l(b.target,b);if(!v)return!0;h(D).one("mouseup",d).on("mousemove",e);return a(b)}function e(a,b){var c=b.type;"touchmove"===c?v&&v.move(b):"touchstart"===c?v=l(a.target,b):"touchend"===c&&v&&(v.done(),v=null)}function a(a){a.stopPropagation();a.preventDefault();return!1}function d(a){var b=r;b&&b.redraw();a&&a.redraw();return r=a}function p(a,b){var c=
163
+ h(b).on("editFocus",function(){c.trigger("wgFocus",[d(a)])}).on("editBlur",function(){c.trigger("wgBlur",[d(null)])})}function k(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;s[b]=this;this.clear()}var g=m.require("$18","html.js"),n=g.top,A=g.left,C=1,s={},r,v=!1;c.init=function(a){var c=new k(a);c.redraw();m.require("$45","touch.js").ok(function(b){b.dragger(a,e)});h(a).mousedown(b);return c};f=k.prototype;f.fire=function(a,b){var c=
164
  h.Event(a);c.cell=this;h(this.el).trigger(c,b);return this};f.each=function(a){for(var b=-1,c=this.cells,d=c.length;++b<d;)a(c[b],b);return this};f.indexOf=function(a){return(a=s[a.id||String(a)])&&a.pid===this.id?a.index:-1};f.on=function(){return this.$("on",arguments)};f.off=function(){return this.$("off",arguments)};f.find=function(a){return h(this.el).find(a)};f.$=function(a,b){h.fn[a].apply(h(this.el),b);return this};f.addClass=function(a){this.css.push(a);return this};f.removeClass=function(a){a=
165
+ this.css.indexOf(a);-1!==a&&this.css.splice(a,1);return this};f.parent=function(){return this.pid&&s[this.pid]};f.splitx=function(){return this._split(C,arguments)};f.splity=function(){return this._split(2,arguments)};f._split=function(a,b){(this.length||this.field)&&this.clear();for(var c=-1,d,e=b.length,f=1/e,n=0;++c<e;){d=g.el();this.body.appendChild(d);for(var h=d,p=b[c],l=p,m=1;s[p];)p=l+"-"+ ++m;h.id=p;d=new k(d);d.index=c;d.pid=this.id;d._locale(this.lang,this.rtl);d.pos=n;n+=f;this.cells.push(d);
166
  this.length++}this.dir=a;this.redraw();return this.cells};f.destroy=function(){this.clear();delete s[this.id];var a=this.el;a.innerHTML="";this.body=null;a.className=this._cn||"";h(a).off();return this};f.exists=function(){return this===s[this.id]};f.clear=function(){for(var a=this.el,b=this.cells,c=this.field,d=this.body,e=this.nav,f=this.length||0;0!==f--;)delete s[b[f].destroy().id];this.cells=[];this.length=0;e&&(a.removeChild(e),this.nav=null);d&&(c&&(g.ie()&&h(d).triggerHandler("blur"),c.destroy(),
167
+ this.field=null),this.table&&(this.table=null),a===d.parentNode&&a.removeChild(d));this.body=a.appendChild(g.el("","wg-body"));this._h=null;return this};f.resize=function(a,b){if(!b&&(b=this.cells[1],!b))return;var c=b.index,d=this.cells,e=h(this.el)[this.dir===C?"width":"height"](),g=d[c+1],c=d[c-1];pad=(b.body||b.el.firstChild).offsetTop||0;max=(g?g.pos*e:e)-pad;min=c?c.pos*e:0;b.pos=Math.min(max,Math.max(min,a))/e;this.redraw();return this};f.distribute=function(a){for(var b=-1,c=0,d,e=this.cells,
168
  g=a.length;++b<g&&(d=e[++c]);)d.pos=Math.max(0,Math.min(1,a[b]));this.redraw();return this};f.distribution=function(){for(var a=[],b=0,c=this.cells,d=c.length-1;b<d;)a[b]=c[++b].pos;return a};f.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"),this.field.editable()?a.push("is-editable"):
169
+ a.push("is-readonly"));a=a.join(" ");a!==this._css&&(this._css=a,this.el.className=a);return this};f.redraw=function(a){this.restyle();var b=this.el,c=this.body,d=this.field;if(c){var e,g=b.clientWidth||0,f=b.clientHeight||0,k=c.offsetTop||0,f=k>f?0:f-k;this._h!==f&&(this._h=f,c.style.height=String(f)+"px",e=d);this._w!==g&&(this._w=g,e=d);e&&e.redraw()}c=this.length;g=1;f=this.nav;for(k=2===this.dir?"height":"width";0!==c--;)d=this.cells[c],f?e=1:(d.fixed&&(d.pos=d.fixed/h(b)[k]()),e=g-d.pos,g=d.pos),
170
+ d.el.style[k]=String(100*e)+"%",d.redraw(a);return this};f.contents=function(a,b){var c=this.el,d=this.body;if(null==a)return d.innerHTML;this.length?this.clear():d&&(c.removeChild(d),d=null);d||(this.body=d=c.appendChild(g.el("",b||"wg-content")),this._h=null,(c=this.lang)&&this._locale(c,this.rtl,!0));"string"===typeof a?h(d)._html(a):a&&this.append(a);this.redraw();return this};f.textarea=function(a,b){var c=this.field;if(c){var d=c.editable();c.reload(a,b);d!==b&&this.restyle()}else this.length&&
171
+ this.clear(),d=g.el("textarea"),d.setAttribute("wrap","virtual"),d.value=a,this.contents(d),c=m.require("$46","field.js")._new(d)[b?"enable":"disable"](),p(this,d),this.field=c,this.restyle();this.lang||this.locale("en");return c};f.locale=function(a){a=m.require("$38","locale.js").cast(a);return this._locale(String(a),a.isRTL())};f._locale=function(a,b,c){var d=this.body;if(c||a!==this.lang)this.lang=a,d&&d.setAttribute("lang",a);if(c||b!==this.rtl)this.rtl=b,d&&d.setAttribute("dir",b?"RTL":"LTR");
172
  return this};f.editable=function(){var a=this.field;if(a)return a.editable()?a:null;var b=this.cells,c=b.length,d=this.navigated();if(null!=d)return b[d].editable();for(;++d<c;){for(d=0;d<c;c++);if(a=b[d].editable())return a}};f.eachTextarea=function(a){var b=this.field;b?a(b):this.each(function(b){b.eachTextarea(a)});return this};f.append=function(a){a&&(a.nodeType?g.init(this.body.appendChild(a)):g.init(h(a).appendTo(this.body)));return this};f.prepend=function(a){var b=this.body;if(a.nodeType){var c=
173
  b.firstChild;g.init(c?b.insertBefore(a,c):b.appendChild(a))}else g.init(h(a).prependTo(b));return this};f.before=function(a){var b=this.body;a.nodeType?g.init(this.el.insertBefore(a,b)):g.init(h(a).insertBefore(b));return this};f.header=function(a,b){if(null==a&&null==b)return this.el.getElementsByTagName("header")[0];this.t=g.txt(a||"");this.el.insertBefore(g.el("header",b),this.body).appendChild(this.t);this.redraw();return this};f.title=function(a){var b=this.t;if(b)return b.nodeValue=a||"",b;
174
+ this.header(a);return this.t};f.titled=function(){var a=this.t;return a&&a.nodeValue};f.bodyY=function(){return n(this.body,this.el)};f.scrollY=function(a){if(S===a)return this.body.scrollTop;this.body.scrollTop=a};f.tabulate=function(a){var b=this.table;b?b.clear():b=m.require("$47","wgtable.js").create(this);b.init(a);return this.table=b};f.lock=function(){this.body.className+=" locked";return this};f.scrollTo=function(a,b){var c,d=this.body;c=d.scrollTop;var e=n(a,d);if(c>e)c=e;else{var g=d.clientHeight,
175
+ e=e+h(a).outerHeight();if(g+c<e)c=e-g;else return}b?d.scrollTop=c:h(d).stop(!0).animate({scrollTop:c},250)};f.navigize=function(b,c){function d(a){var b=f[a],c=p[a],e=h(b.el).show();c.addClass("active");n=a;l.data("idx",a);b.fire("wgTabSelect",[a]);return e}var e=this,f=e.cells,k=e.nav,n,p=[];k&&e.el.removeChild(k);var k=e.nav=e.el.insertBefore(g.el("nav","wg-tabs"),e.body),l=h(k).on("click",function(b){var c=h(b.target).data("idx");if(null==c)return!0;if(null!=n){var g=p[n];h(f[n].el).hide();g.removeClass("active")}d(c);
176
+ e.redraw();return a(b)});null==c&&(c=l.data("idx")||0);e.each(function(a,c){p[c]=h('<a href="#'+a.id+'"></a>').data("idx",c).text(b[c]).appendTo(l);a.pos=0;h(a.el).hide()});d(f[c]?c:0);e.lock();e.redraw();return e};f.navigated=function(){var a=this.nav;if(a)return h(a).data("idx")};f=null;return c}({},w,y));m.register("$24",function(c,f,D){function l(a){var b=[];a&&(a.saved()||b.push("po-unsaved"),a.fuzzy()?b.push("po-fuzzy"):a.flagged()&&b.push("po-flagged"),a.translation()||b.push("po-empty"),a.comment()&&
177
+ b.push("po-comment"));return b.join(" ")}function b(a,b,c){b=h(a.title(b).parentNode);var d=b.find("span.lang");c?(c=m.require("$38","locale.js").cast(c),d.length||(d=h("<span></span>").prependTo(b)),d.attr("lang",c.lang).attr("class",c.getIcon()||"lang region region-"+(c.region||"zz").toLowerCase())):(d.remove(),c="en");a.locale(c);return b}function e(){this.dirty=0}var a="poUpdate",d="changing",p="changed",k=0,g=1,n=2,A=3,C=4,s=5,r=/^\s+/,v,q,B=m.require("$3","string.js").sprintf,w=m.require("$18",
178
+ "html.js");c.extend=function(a){return a.prototype=new e};c.localise=function(a){q=a;return c};var y=function(){var a=D.createElement("p");return function(b){a.innerHTML=b.replace("src=","x=");return a.textContent}}(),u=e.prototype=m.require("$39","abstract.js").init(["getListColumns","getListHeadings","getListEntry"],["editable","t"]);u.init=function(){this.localise();this.editable={source:!0,target:!0};this.mode="";this.html=!1;return this};u.localise=function(a){a||(a=q||m.require("$1","t.js").init());
179
+ var b=[];b[k]=a._x("Source text","Editor")+":";b[A]=a._x("%s translation","Editor")+":";b[C]=a._x("Context","Editor")+":";b[s]=a._x("Comments","Editor")+":";b[g]=a._x("Single","Editor")+":";b[n]=a._x("Plural","Editor")+":";b[6]=a._x("Untranslated","Editor");b[7]=a._x("Translated","Editor");b[8]=a._x("Fuzzy","Editor");this.labels=b;this.t=a;return this};u.setRootCell=function(a){function b(a){c.redraw(!0,a);return!0}var c=m.require("$40","wingrid.js").init(a);h(f).on("resize",b);this.redraw=b;h(a).on("wgFocus wgBlur",
180
+ function(a,b){a.stopPropagation();v=b});this.destroy=function(){c.destroy();h(f).off("resize",b)};this.rootDiv=a;return c};u.$=function(){return h(this.rootDiv)};u.setListCell=function(a){var b=this;b.listCell=a;a.on("wgRowSelect",function(a,c){b.loadMessage(b.po.row(c));return!0}).on("wgRowDeselect",function(a,c,d){d||b.loadNothing();return!0})};u.setSourceCell=function(a){this.sourceCell=a};u.setTargetCell=function(a){this.targetCell=a};u.next=function(a,b,c){for(var d=this.listTable,e=d.selected(),
181
+ g=e,f,k=this.po;null!=(e=d.next(a,c,e));){if(g===e){e=null;break}if(b&&(f=k.row(e),f.translated(0)))continue;break}null!=e&&d.select(e,!0);return e};u.current=function(a){var b=this.active;if("undefined"===typeof a)return b;a?a.is(b)?this.reloadMessage(a):this.loadMessage(a):this.unloadActive();return this};u.getTargetOffset=function(){if(this.active)return this.targetCell&&this.targetCell.navigated()||0};u.getTargetEditable=function(){return this.editable.target&&this.targetCell&&this.targetCell.editable()};
182
  u.getSourceEditable=function(){return this.editable.source&&this.sourceCell&&this.sourceCell.editable()};u.getContextEditable=function(){return this.editable.context&&this.contextCell&&this.contextCell.editable()};u.getFirstEditable=function(){return this.getTargetEditable()||this.getSourceEditable()||this.getContextEditable()};u.searchable=function(a){a&&(this.dict=a,this.po&&this.rebuildSearch());return this.dict&&!0};u.rebuildSearch=function(){var a=-1,b=this.po.rows,c=b.length,d=this.dict;for(d.clear();++a<
183
  c;)d.add(a,b[a].toText())};u.filtered=function(){return this.lastSearch||""};u.filter=function(a,b){var c,d=this.listTable,e=this.lastFound,g=this.lastSearch;if(a){if(g===a)return e||0;if(g&&!e&&0===a.indexOf(g))return 0;c=this.dict.find(a)}this.lastSearch=g=a;this.lastFound=e=c?c.length:this.po.length;c?d.filter(c):d.unfilter();b||this.fire("poFilter",[g,e]);return e};u.countFiltered=function(){return this.lastSearch?this.lastFound:this.po.length};u.unsave=function(a,b){var c=!1;if(a=a||self.active){if(c=
184
+ a.saved(b))this.dirty++,a.unsave(b),this.fire("poUnsaved",[a,b]);this.markUnsaved(a)}return c};u.markUnsaved=function(a){var b=this.po.indexOf(a);if(b=this.listTable.tr(b)){var c=b[0].className;a=c.replace(/(?:^| +)po-[a-z]+/g,"")+" "+l(a);a!==c&&h(b).attr("class",a)}};u.save=function(a){var b=this.po;if(this.dirty||a)b.each(function(a,b){b.save()}),this.listCell.find("div.po-unsaved").removeClass("po-unsaved"),this.dirty=0,this.fire("poSave");return b};u.fire=function(a,b){var c=this.handle;if(c&&
185
+ c[a]&&(c=c[a].apply(this,b||[]),!1===c))return!1;c=h.Event(a);this.$().trigger(c,b);return!c.isDefaultPrevented()};u.on=function(a,b){this.$().on(a,b);return this};u.getSorter=function(){return null};u.reload=function(){var a=this,b,c=a.listCell,d=a.listTable,e=a.po,g=e&&e.locale(),f=g&&g.isRTL(),k=e&&e.length||0;if(!e||!e.row)return c&&c.clear().header("Error").contents("Invalid messages list"),!1;a.lastSearch&&(a.lastSearch="",a.lastFound=k,a.fire("poFilter",["",k]));d&&(b=d.thead().distribution());
186
+ a.listTable=d=c.tabulate({eachCol:function(b){var c,d,e=a.getListColumns(),g=a.getListHeadings();for(d in e)c=e[d],b(c,d,g[c])},eachRow:function(b){e.each(function(c,d){b(d.idx,a.getListEntry(d),l(d))})},sort:a.getSorter()});var n,c=a.getListColumns();for(n in c)d.sortable(c[n]);b&&d.thead().distribute(b);d.tbody().$(f?"addClass":"removeClass",["is-rtl"]);a.targetLocale=g;a.fire("poLoad");return!!k};u.load=function(a,b){this.po=a;this.dict&&this.rebuildSearch();this.reload()&&(-1!==b?this.listTable.selectRow(b||
187
  0):this.active&&this.unloadActive())};u.pasteMessage=function(a){var b,c=0;(b=this.sourceCell)&&b.eachTextarea(function(b){b.val(a.source(null,c++))});(b=this.contextCell)&&b.eachTextarea(function(b){b.val(a.context())});if(b=this.targetCell)c=0,b.eachTextarea(function(b){b.val(a.translation(c++))});this.updateListCell(a,"source");this.updateListCell(a,"target");return this};u.reloadMessage=function(a){var b=this.sourceCell,c=this.targetCell,d;this.pasteMessage(a);b&&this.setNotes(a,b)&&b.redraw();
188
+ c&&(d=c.navigated()||0,d=this.setErrors(a.errors(d),c),!b&&this.setNotes(a,c)&&(d=!0),d&&c.redraw());return this};u.setStatus=function(){return null};u.setNotes=function(a,b){var c=[],d=!1,e=this.$notes,g=this.labels,f=a.notes(),k=a.context(),n=[],p=a.tags(),l=p&&p.length;k&&(n.push("<span>"+w.h(g[C])+"</span>"),n.push("<mark>"+w.h(k)+"</mark>"));if(l&&this.getTag)for(n.push("<span>Tagged:</span>");0<=--l;)(g=this.getTag(p[l]))&&n.push('<mark class="tag">'+w.h(g.mod_name)+"</mark>");n.length&&c.push(n.join(" "));
189
+ f&&c.push(w.h(f,!0));c.length?(e||(e=b.find("p.notes"),e.length||(e=h('<p class="notes"></p>').insertAfter(b.header())),this.$notes=e),e.html(c.join("\n")).show(),w.init(e),d=!0):e&&e.text()&&(e.text("").hide(),d=!0);return d};u.setErrors=function(a,b){var c=!1,d=this.$errs;a&&a.length?(d||(d=b.find("p.errors"),d.length||(d=h('<p class="errors"></p>').insertAfter(this.targetCell.header())),this.$errs=d),d.html(w.h(a.join(".\n")+".",!0)).show(),w.init(d),c=!0):d&&d.text()&&(d.text("").hide(),c=!0);
190
+ return c};u.loadMessage=function(c){function e(a,b){var c=b?a.split(" "):a.split(" ",1);a=c[0];"="===a.charAt(0)&&(a=a.substr(1),a=["zero","one","two"][Number(a)]||a);c[0]=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();return c.join(" ")}function f(a,d){var p=S,l=O[k];a.off();a.titled()!==l&&b(a,l,d||"en");l=!1;u.setNotes(c,a)&&(l=!0);if(c.plural()){var l=-1,m=[],r=[],q=a.id+"-",s=c.sourceForms()||d&&d.plurals||["One","Other"],A=s.length;if(2!==A||"="===s[0].charAt(0)&&"=1"!==s[0])for(;++l<A;)m[l]=
191
+ q+String(l),r[l]=e(s[l])+":";else m=[q+"-0",q+"-1"],r=[O[g],O[n]];a.splity.apply(a,m);a.each(function(a,b){a.header(r[b]).textarea(c.source(null,b),p).setStrf(H).setMode(w).setInvs(y)});a.lock();p&&a.each(function(a,b){h(a,b)})}else l&&a.redraw(),a.textarea(c.source(),p).setStrf(H).setMode(w).setInvs(y),p&&h(a,0)}function h(b,e){b.on(d,function(a,b){c.source(b,e);0===e&&u.updateListCell(c,"source");u.unsave(c,e)}).on(p,function(){0===e&&u.po.reIndex(c);u.dict&&u.rebuildSearch();u.fire(a,[c])})}function l(a,
192
+ d,g){P&&a.eachTextarea(function(a){a.ping()});a.off();var f=d.isKnown()&&d.label||"Target",f=B(O[A],f);a.titled()!==f&&b(a,f,d);f=!1;!this.sourceCell&&u.setNotes(c,a)&&(f=!0);u.setErrors(c.errors(g),a)&&(f=!0);u.setStatus(c,g);if(c.pluralized()){var k=[],n=[],h=a.id+"-",p=c.targetForms()||d.plurals||["One","Other"],f=p.length,r=function(a){var b=p[a];n.push(b?e(b,!0):"Form "+a);k.push(h+String(a))};for(c.each(r);(d=k.length)<f;)r(d);a.splitx.apply(a,k);a.each(function(a,b){var d=P&&!c.disabled(b);
193
+ a.textarea(c.translation(b),d).setStrf(H).setMode(w).setInvs(y);P&&m(a,b)});a.navigize(n,g||null).on("wgTabSelect",function(b,d){var e=P&&b.cell.editable();e&&e.focus();u.setErrors(c.errors(d),a);u.setStatus(c,d);u.fire("poTab",[d])})}else f&&a.redraw(),a.textarea(c.translation(),P&&!c.disabled(0)).setStrf(H).setMode(w).setInvs(y),P&&m(a,0)}function m(b,e){b.on(d,function(a,b,d){c.translate(b,e);0===e&&u.updateListCell(c,"target");c.fuzzy(e)?u.fuzzy(!1,c,e):u.unsave(c,e);""===b?u.fire("poEmpty",[!0,
194
+ c,e]):""===d&&u.fire("poEmpty",[!1,c,e])}).on(p,function(){u.dict&&u.rebuildSearch();u.fire(a,[c])})}function r(e){e.off();var g=O[C];e.titled()!==g&&(b(e,g),u.setStatus(null));e.textarea(c.context(),!0).setMode(w).setInvs(y);X&&e.on(d,function(a,b){c.context(b);u.updateListCell(c,"source");u.unsave(c,R)}).on(p,function(){u.po.reIndex(c);u.dict&&u.rebuildSearch();u.fire(a,[c])})}function q(a){var e=O[s];a.titled()!==e&&b(a,e);a.off().on(d,function(a,b){c.comment(b);u.fire("poComment",[c,b]);u.unsave(c,
195
+ R)}).textarea(c.comment(),!0)}var u=this,w=u.mode,D=c.isHTML(),y=u.inv||!1,E=this.fmt||null,H=c.format()||null,G=c.is(u.active),R=0,L=u.sourceCell,T=u.targetCell,U=u.contextCell,V=u.commentCell,P=u.editable.target,S=u.editable.source,X=u.editable.context,Q=v,Y=u.sourceLocale,W=u.targetLocale,O=u.labels;u.html!==D&&(u.html=D,"code"!==u.mode&&(w=D?"html":"",u.setMode(w)));u.active=c;L&&f(L,Y);U&&r(U);T&&W&&(R=T.navigated()||0,l(T,W,R));V&&q(V);Q&&(Q.exists()||(Q=Q.parent()),(D=Q.editable())&&D.focus());
196
  E!==H&&(this.fmt=H);G||u.fire("poSelected",[c])};u.unloadActive=function(){var a;(a=this.$notes)&&a.text("").hide();(a=this.$errs)&&a.text("").hide();(a=this.sourceCell)&&a.off().clear();(a=this.contextCell)&&a.off().clear();(a=this.targetCell)&&a.off().clear();(a=this.commentCell)&&a.off();this.active&&(this.fire("poDeselected",[this.active]),this.active=null);return this};u.loadNothing=function(){var a,b=this.t,c=this.mode||"",d=this.inv||!1,e=this.fmt;this.unloadActive();this.setStatus(null);(a=
197
  this.commentCell)&&a.textarea("",!1);if(a=this.sourceCell)a.textarea("",!1).setStrf(e).setMode(c).setInvs(d),a.title(b._x("Source text not loaded","Editor")+":");if(a=this.contextCell)a.textarea("",!1).setMode(c).setInvs(d),a.title(b._x("Context not loaded","Editor")+":");if(a=this.targetCell)a.textarea("",!1).setStrf(e).setMode(c).setInvs(d),a.title(b._x("Translation not loaded","Editor")+":");this.fire("poSelected",[null])};u.updateListCell=function(a,b){var c=this.getListColumns()[b],d=this.po.indexOf(a);
198
+ (d=this.listTable.row(d))&&d.update(c)};u.cellText=function(a){if(-1!==a.indexOf("<")||-1!==a.indexOf("&"))a=y(a);return a.replace(r,"")||"\u00a0"};u.fuzzy=function(a,b,c){var d=4===this.flag(null,b,c);!0!==a||d?!1===a&&d&&this.flag(0,b,c)&&this.fire("poFuzzy",[b,!1,c]):this.flag(4,b,c)&&this.fire("poFuzzy",[b,!0,c]);return d};u.flag=function(b,c,d){if(!c){c=this.active;d=this.getTargetOffset();if(null==d)return null;d&&c.targetForms()&&(d=0)}var e=c.flagged(d);if(null==b)return e;if(e===b||b&&!c.translated(d)||
199
  !this.fire("poFlag",[b,e,c,d]))return!1;c.flag(b,d);this.fire(a,[c])&&this.unsave(c,d);this.setStatus(c,d);return!0};u.add=function(b,c){var d,e=this.po.get(b,c);e?d=this.po.indexOf(e):(d=this.po.length,e=this.po.add(b,c),this.load(this.po,-1),this.fire("poAdd",[e]),this.fire(a,[e]));this.lastSearch&&this.filter("");this.listTable.select(d);return e};u.del=function(b){if(b=b||this.active){var c=this.lastSearch,d=this.po.del(b);null!=d&&(this.unsave(b),this.fire("poDel",[b]),this.fire(a,[b]),this.reload(),
200
  this.dict&&this.rebuildSearch(),this.active&&this.active.equals(b)&&this.unloadActive(),this.po.length&&(c&&this.filter(c),this.active||(d=Math.min(d,this.po.length-1),this.listTable.select(d))))}};u.setMono=function(a){return this.setMode(a?"code":this.html?"html":"")};u.setMode=function(a){this.mode!==a&&(this.mode=a,this.callTextareas(function(b){b.setMode(a)}));return this};u.getMono=function(){return"code"===this.mode};u.setInvs=function(a){(this.inv||!1)!==a&&(this.inv=a,this.callTextareas(function(b){b.setInvs(a)}),
201
+ this.fire("poInvs",[a]));return this};u.getInvs=function(){return this.inv||!1};u.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};u.focus=function(){var a=this.getTargetEditable();a&&a.focus();return this};u=null;return c}({},w,y));m.register("$25",function(c,f,h){Number.prototype.format=function(c){c=Math.pow(10,c||0);var b=Math.round(c*this)/c;c=[];var b=String(b),e=b.split("."),b=e[0],
202
+ e=e[1],a=b.length;do c.unshift(b.substring(a-3,a));while(0<(a-=3));b=c.join(",");if(c=e){c=e;for(var d,e=c.length;"0"===c.charAt(--e);)d=e;d&&(c=substring(0,d));c=e=c}c&&(b+="."+e);return b};Number.prototype.percent=function(c){var b=0,e=this&&c?100*(this/c):0;if(0===e)return"0";if(100===e)return"100";if(99<e)e=Math.min(e,99.9),c=e.format(++b);else if(0.5>e){e=Math.max(e,1E-4);do c=e.format(++b);while("0"===c&&4>b);c=c.substr(1)}else c=e.format(0);return c};return c}({},w,y));m.register("$12",function(c,
203
+ f,h){function l(){this.init()._validate();this.sourceLocale={lang:"en",label:"English",plurals:["One","Other"]}}f=m.require("$24","base.js");m.require("$25","number.js");c.init=function(b){var c=new l;b=c.setRootCell(b);var a=b.splity("po-list","po-edit"),d=a[0],f=a[1],a=f.splitx("po-trans","po-comment"),k=a[0],g=a[1].header("Loading.."),a=k.splity("po-source","po-target"),k=a[0].header("Loading.."),a=a[1].header("Loading..");b.distribute([0.34]);f.distribute([0.8]);c.setListCell(d);c.setSourceCell(k);
204
+ c.setTargetCell(a);c.commentCell=g;c.editable.source=!1;return c};f=l.prototype=f.extend(l);f.getListHeadings=function(){var b=this.t||{_x:function(b){return b}};return[b._x("Source text","Editor"),b._x("Translation","Editor")]};f.getListColumns=function(){return{source:0,target:1}};f.getListEntry=function(b){var c=this.cellText;return[function(){var a,d=c(b.source()||""),f=b.context();return f?(a=h.createElement("p"),a.appendChild(h.createElement("mark")).innerText=f,a.appendChild(h.createTextNode("\u00a0"+
205
  d)),a):d},function(){return c(b.translation()||"")}]};f.stats=function(){var b=this.po,c=b.length,a=0,d=0,f=0;b.each(function(b,c){c.fuzzy()?f++:c.translated()?a++:d++});return{t:c,p:a.percent(c)+"%",f:f,u:d}};f.unlock=function(){this._unlocked||(this._unlocked=this.targetLocale,delete this.targetLocale,this.po&&this.po.unlock(),this.editable={source:!0,context:!0,target:!1},this.contextCell=this.targetCell,delete this.targetCell,this.fire("poLock",[!1]),this.active&&this.loadMessage(this.active))};
206
  f.lock=function(){var b;this._unlocked&&(b=this.targetLocale=this._unlocked,delete this._unlocked,this.po&&this.po.lock(b),this.editable={source:!1,context:!1,target:!0},this.targetCell=this.contextCell,delete this.contextCell,this.fire("poLock",[!0,b]),this.active&&this.loadMessage(this.active))};f.locked=function(){return!this._unlocked};f.getSorter=function(){function b(a,b){var f=a.weight(),g=b.weight();return f===g?c(a,b):f>g?-1:1}function c(a,b){return a.hash().localeCompare(b.hash())}var a=
207
+ this;return function(d){var f=a.po,k=a.locked()?b:c;d.sort(function(a,b){return k(f.row(a),f.row(b))})}};return c}({},w,y));m.register("$13",function(c,f,m){var l={copy:66,clear:75,save:83,fuzzy:85,next:40,prev:38,enter:13,invis:73},b={38:!0,40:!0,73:!0},e={66:function(a,b){var c=b.current();c&&(c.normalize(),b.focus().pasteMessage(c))},75:function(a,b){var c=b.current();c&&(c.untranslate(),b.focus().pasteMessage(c))},85:function(a,b){b.focus().fuzzy(!b.fuzzy())},13:function(a,b){b.getFirstEditable()&&
208
+ b.next(1,!0,!0)},40:function(a,b){var c=a.shiftKey;b.next(1,c,c)},38:function(a,b){var c=a.shiftKey;b.next(-1,c,c)},73:function(a,b){if(!a.shiftKey)return!1;b.setInvs(!b.getInvs())}};c.init=function(a,c){function p(c){if(c.isDefaultPrevented()||!c.metaKey&&!c.ctrlKey)return!0;var d=c.which;if(!k[d])return!0;var f=e[d];if(!f)throw Error("command undefined #"+d);if(c.altKey||c.shiftKey&&!b[d]||!1===f(c,a))return!0;c.stopPropagation();c.preventDefault();return!1}var k={};h(c||f).on("keydown",p);return{add:function(a,
209
+ b){e[l[a]]=b;return this},enable:function(){var a,b;for(b in arguments)a=l[arguments[b]],k[a]=!0;return this},disable:function(){h(c||f).off("keydown",p);a=c=k=null}}};return c}({},w,y));m.register("$26",function(c,f,h){function l(){this.reIndex([])}c.init=function(){return new l};f=l.prototype;f.reIndex=function(b){for(var c={},a=-1,d=b.length;++a<d;)c[b[a]]=a;this.keys=b;this.length=a;this.ords=c};f.key=function(b,c){if(null==c)return this.keys[b];var a=this.keys[b],d=this.ords[c];if(c!==a){if(null!=
210
  d)throw Error("Clash with item at ["+d+"]");this.keys[b]=c;delete this.ords[a];this.ords[c]=b}return b};f.indexOf=function(b){b=this.ords[b];return null==b?-1:b};f.add=function(b,c){var a=this.ords[b];null==a&&(this.keys[this.length]=b,a=this.ords[b]=this.length++);this[a]=c;return a};f.get=function(b){return this[this.ords[b]]};f.has=function(b){return null!=this.ords[b]};f.del=function(b){this.cut(this.ords[b],1)};f.cut=function(b,c){c=c||1;var a=[].splice.call(this,b,c);this.keys.splice(b,c);this.reIndex(this.keys);
211
+ return a};f.each=function(b){for(var c=-1,a=this.keys,d=this.length;++c<d;)b(a[c],this[c],c);return this};f.sort=function(b){for(var c=-1,a=this.length,d,f=this.keys,k=this.ords,g=[];++c<a;)g[c]=[this[c],f[c]];g.sort(function(a,c){return b(a[0],c[0])});for(c=0;c<a;c++)d=g[c],this[c]=d[0],d=d[1],f[c]=d,k[d]=c;return this};f.join=function(b){return[].join.call(this,b)};f=null;return c}({},w,y));m.register("$27",function(c,f,h){function l(b,c){var a=RegExp("^.{0,"+(b-1)+"}["+c+"]"),d=RegExp("^[^"+c+
212
+ "]+");return function(c,e){for(var g=c.length,f;g>b;){f=a.exec(c)||d.exec(c);if(null==f)break;f=f[0];e.push(f);f=f.length;g-=f;c=c.substr(f)}0!==g&&e.push(c);return e}}c.create=function(b){function c(a){return n[a]||"\\"+a}var a,d,f=/(?:\r\n|[\r\n\v\f\u2028\u2029])/g,k=/[ \r\n]+/g,g=/[\t\v\f\x07\x08\\\"]/g,n={"\t":"\\t","\v":"\\v","\f":"\\f","\u0007":"\\a","\b":"\\b"};if(null==b||isNaN(b=Number(b)))b=79;0<b&&(a=l(b-3," "),d=l(b-2,"-\u2013 \\.,:;\\?!\\)\\]\\}\\>"));return{pair:function(a,k){if(!k)return a+
213
+ ' ""';k=k.replace(g,c);var n=0;k=k.replace(f,function(){n++;return"\\n\n"});if(!(n||b&&b<k.length+a.length+3))return a+' "'+k+'"';var h=[a+' "'],l=k.split("\n");if(d)for(var m=-1,w=l.length;++m<w;)d(l[m],h);else h=h.concat(l);return h.join('"\n"')+'"'},prefix:function(a,b){var c=a.split(f);return b+c.join("\n"+b)},refs:function(b){b=b.replace(k," ",b);a&&(b=a(b,[]).join("\n#: "));return"#: "+b}}};return c}({},w,y));m.register("$41",function(c,f,h){function l(){this.length=0}c.init=function(){return new l};
214
+ f=l.prototype;f.push=function(b){this[this.length++]=b;return this};f.sort=function(b){[].sort.call(this,b);return this};f.each=function(b){for(var c=-1,a=this.length;++c<a;)b(c,this[c]);return this};return c}({},w,y));m.register("$28",function(c,f,h){function l(){}c.extend=function(b){return b.prototype=new l};f=l.prototype=m.require("$39","abstract.js").init(["add","load"]);f.row=function(b){return this.rows[b]};f.lock=function(b){return this.locale(b||{lang:"zxx",label:"Unknown",nplurals:1,pluraleq:"n!=1"})};
215
+ f.unlock=function(){var b=this.loc;this.loc=null;return b};f.locale=function(b){null==b?b=this.loc:this.loc=b=m.require("$38","locale.js").cast(b);return b};f.each=function(b){this.rows.each(b);return this};f.indexOf=function(b){"object"!==typeof b&&(b=this.get(b));if(!b)return-1;null==b.idx&&(b.idx=this.rows.indexOf(b.hash()));return b.idx};f.get=function(b){return this.rows&&this.rows.get(b)};f.del=function(b){b=this.indexOf(b);if(-1!==b){var c=this.rows.cut(b,1);if(c&&c.length)return this.length=
216
+ this.rows.length,this.rows.each(function(a,b,c){b.idx=c}),b}};f.reIndex=function(b,c){var a=this.indexOf(b),d=b.hash(),f=this.rows.indexOf(d);return f===a?a:-1!==f?(c=(c||0)+1,b.source("Error, duplicate "+String(c)+": "+b.source()),this.reIndex(b,c)):this.rows.key(a,d)};f.sort=function(b){this.rows.sort(b);return this};f["export"]=function(){for(var b=-1,c=this.rows,a=c.length,d=m.require("$41","list.js").init();++b<a;)d.push(c[b]);return d};f=null;return c}({},w,y));m.register("$29",function(c,f,
217
+ h){function l(){this._id=this.id=""}c.extend=function(b){return b.prototype=new l};f=l.prototype;f.flag=function(b,c){var a=this.flg||(this.flg=[]);if(null!=c)a[c]=b;else for(var d=Math.max(a.length,this.src.length,this.msg.length);0!==d--;)a[d]=b;return this};f.flagged=function(b){var c=this.flg||[];if(null!=b)return c[b]||0;for(b=c.length;0!==b--;)if(c[b])return!0;return!1};f.flags=function(){for(var b,c={},a=[],d=this.flg||[],f=d.length;0!==f--;)b=d[f],c[b]||(c[b]=!0,a.push(b));return a};f.flaggedAs=
218
  function(b,c){var a=this.flg||[];if(null!=c)return b===a[c]||0;for(var d=a.length;0!==d--;)if(a[d]===b)return!0;return!1};f.fuzzy=function(b,c){var a=this.flaggedAs(4,b);null!=c&&this.flag(c?4:0,b);return a};f.source=function(b,c){if(null==b)return this.src[c||0]||"";this.src[c||0]=b;return this};f.plural=function(b,c){if(null==b)return this.src[c||1]||"";this.src[c||1]=b||"";return this};f.sourceForms=function(){return this.srcF};f.targetForms=function(){return this.msgF};f.each=function(b){for(var c=
219
  -1,a=this.src,d=this.msg,f=Math.max(a.length,d.length);++c<f;)b(c,a[c],d[c]);return this};f.count=function(){return Math.max(this.src.length,this.msg.length)};f.pluralized=function(){return 1<this.src.length||1<this.msg.length};f.translate=function(b,c){this.msg[c||0]=b||"";return this};f.untranslate=function(b){if(null!=b)this.msg[b]="";else{var c=this.msg,a=c.length;for(b=0;b<a;b++)c[b]=""}return this};f.translation=function(b){return this.msg[b||0]||""};f.errors=function(b){return this.err&&this.err[b||
220
  0]||[]};f.translated=function(b){if(null!=b)return!!this.msg[b];var c=this.msg,a=c.length;for(b=0;b<a;b++)if(!c[b])return!1;return!0};f.untranslated=function(b){if(null!=b)return!this.msg[b];var c=this.msg,a=c.length;for(b=0;b<a;b++)if(c[b])return!1;return!0};f.comment=function(b){if(null==b)return this.cmt||"";this.cmt=b||"";return this};f.notes=function(b){if(null==b)return this.xcmt||"";this.xcmt=b||"";return this};f.refs=function(b){if(null==b)return this.ref||"";this.ref=b||"";return this};f.format=
221
  function(b){if(null==b)return this.fmt||"";this.fmt=b||"";return this};f.context=function(b){if(null==b)return this.ctx||"";this.ctx=b||"";return this};f.tags=function(){return this.tg};f.toString=f.toText=function(){return this.src.concat(this.msg,this.id,this.ctx).join(" ")};f.weight=function(){var b=0;this.translation()||(b+=2);this.fuzzy()&&(b+=1);return b};f.equals=function(b){return this===b||this.hash()===b.hash()};f.hash=function(){return this.id};f.normalize=function(){for(var b=this.msg.length;0!==
222
  b--;)this.msg[b]=this.src[b]||""};f.disabled=function(b){return!!(this.lck||[])[b||0]};f.disable=function(b){(this.lck||(this.lck=[]))[b||0]=!0;return this};f.saved=function(b){var c=this.drt;if(!c)return!0;if(null!=b)return!c[b];for(b=c.length;0!==b--;)if(c[b])return!1;return!0};f.unsave=function(b){(this.drt||(this.drt=[]))[b||0]=!0;return this};f.save=function(b){var c=this.drt;null==b?this.drt=null:c[b]=!1;return this};f.is=function(b){return b&&(b===this||b.idx===this.idx)};f.isHTML=function(b){if(null==
223
+ b)return this.htm||!1;this.htm=b};f=null;return c}({},w,y));m.register("$14",function(c,f,h){function l(a){return{"Project-Id-Version":"PACKAGE VERSION","Report-Msgid-Bugs-To":"","POT-Creation-Date":a||"","PO-Revision-Date":a||"","Last-Translator":"","Language-Team":"",Language:"","Plural-Forms":"","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit"}}function b(a,b){var c=a||"";b&&(c+="\x00"+b);return c}function e(){return m.require("$26","collection.js").init()}
224
+ function a(a){var b=f.console;b&&b.error&&b.error(a.message||String(a))}function d(a){return m.require("$27","format.js").create(a)}function p(a){this.locale(a);this.length=0;this.rows=e();this.head=l(this.now())}function k(a,b){this.src=[a||""];this.msg=[b||""]}c.create=function(a){return new p(a)};h=m.require("$28","messages.js").extend(p);h.now=function(){function a(b,c){for(var d=String(b);d.length<c;)d="0"+d;return d}var b=new Date,c=b.getUTCFullYear(),d=b.getUTCMonth()+1,e=b.getUTCDate(),f=
225
+ b.getUTCHours(),b=b.getUTCMinutes();return a(c,4)+"-"+a(d,2)+"-"+a(e,2)+" "+a(f,2)+":"+a(b,2)+"+0000"};h.header=function(a,b){var c=this.head||(this.head={});if(null==b)return this.headers()[a]||"";c[a]=b||"";return this};h.headers=function(a){var b,c=this.now(),d=this.head||(this.head=l(c));if(null!=a){for(b in a)d[b]=a[b];return this}var e=this.locale();a={};for(b in d)a[b]=String(d[b]);e?(a.Language=String(e)||"zxx",a["Language-Team"]=e.label||a.Language,a["Plural-Forms"]="nplurals="+(e.nplurals||
226
  "2")+"; plural="+(e.pluraleq||"n!=1")+";",b="PO-Revision-Date"):(a.Language="",a["Plural-Forms"]="nplurals=INTEGER; plural=EXPRESSION;",a["PO-Revision-Date"]="YEAR-MO-DA HO:MI+ZONE",b="POT-Creation-Date");a[b]||(a[b]=c);a["X-Generator"]="Loco https://localise.biz/";return a};h.get=function(a,c){var d=b(a,c);return this.rows.get(d)};h.add=function(b,c){b instanceof k||(b=new k(b));c&&b.context(c);var d=b.hash();this.rows.get(d)?a("Duplicate message at index "+this.indexOf(b)):(b.idx=this.rows.add(d,
227
+ b),this.length=this.rows.length);return b};h.load=function(b){for(var c=-1,d,e,f,h,l,m,p=(f=this.locale())&&f.nplurals||2,w=[];++c<b.length;)d=b[c],null==d.parent?(e=d.source||d.id,f=d.target||"",h=d.context,e||h?(l=new k(e,f),l._id=d._id,h&&l.context(h),d.flag&&l.flag(d.flag,0),d.comment&&l.comment(d.comment),d.notes&&l.notes(d.notes),d.refs&&l.refs(d.refs),l.format(d.format),d.message=l,this.add(l)):0===c&&"object"===typeof f&&(this.head=f,this.headcmt=d.comment)):w.push(d);for(c=-1;++c<w.length;)try{d=
228
+ w[c];e=d.source||d.id;l=b[d.parent]&&b[d.parent].message;if(!l)throw Error("parent missing for plural "+e);m=d.plural;1===m&&l.plural(e);m>=p||(d.flag&&l.flag(d.flag,m),l.translate(d.target||"",m),d.format&&!l.format()&&l.format(d.format))}catch(y){a(y)}return this};h.merge=function(b){var c=this,d,f=b.header("POT-Creation-Date"),k=c.rows,h=[],l=[];b=b.rows;c.rows.each(function(a,c){null==b.get(a)&&l.push(c)});c.rows=e();b.each(function(b,e){try{(d=k.get(b))?(d.ref=e.ref,d.fmt=e.fmt):(d=e,h.push(d)),
229
+ c.add(d)}catch(f){a(f)}});f&&c.header("POT-Creation-Date",f);return{add:h,del:l}};h.wrap=function(a){this.fmtr=d(a);return this};h.toString=function(){var a,b=this.locale(),c=[],e=[],f=this.headers(),h=!b,l=b&&b.nplurals||2,m=this.fmtr||d();f[b?"PO-Revision-Date":"POT-Creation-Date"]=this.now();for(a in f)e.push(a+": "+f[a]);e=new k("",e.join("\n"));e.comment(this.headcmt||"");h&&e.fuzzy(0,!0);c.push(e.toString());c.push("");this.rows.each(function(a,b){a&&(c.push(b.cat(m,h,l)),c.push(""))});return c.join("\n")};
230
+ h=m.require("$29","message.js").extend(k);h.hash=function(){return b(this.source(),this.context())};h.toString=function(){return this.cat(d())};h.cat=function(a,b,c){var d,e=[],f;(f=this.cmt)&&e.push(a.prefix(f,"# "));(f=this.xcmt)&&e.push(a.prefix(f,"#. "));d=this.ref;if(f=this._id)d+=(d?" ":"")+"loco:"+f;d&&/\S/.test(d)&&e.push(a.refs(d));!b&&this.fuzzy()&&e.push("#, fuzzy");(f=this.fmt)&&e.push("#, "+f+"-format");(f=this.ctx)&&e.push(a.pair("msgctxt",f));e.push(a.pair("msgid",this.src[0]));if(null==
231
+ this.src[1])e.push(a.pair("msgstr",b?"":this.msg[0]));else for(d=-1,e.push(a.pair("msgid_plural",this.src[1])),f=this.msg||["",""],c=c||f.length;++d<c;)e.push(a.pair("msgstr["+d+"]",b?"":f[d]||""));return e.join("\n")};h.compare=function(a,b){var c=this.weight(),d=a.weight();if(c>d)return 1;if(c<d)return-1;if(b){c=this.hash().toLowerCase();d=a.hash().toLowerCase();if(c<d)return 1;if(c>d)return-1}return 0};h=h=null;return c}({},w,y));m.register("$16",function(c,f,m){c.init=function(c){function b(){M||
232
+ (I.click(n),M=h('<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&&h("#ssh-keys").toggleClass("hidden","ssh"!==h(this).val())}));return M}function e(){G&&(a(h(q)),G=!1);if(H&&L){var b=L,c=h(J);c.find("span.loco-msg").text(b);N||(c.removeClass("jshide").hide().fadeIn(500),N=!0)}else N&&(a(h(J)),N=!1)}function a(a){a.slideUp(250).fadeOut(250,
233
+ function(){h(this).addClass("jshide")})}function d(){if(H)return M&&M.dialog("close"),e(),h(c).find('button[type="submit"]').attr("disabled",!1),h(f).triggerHandler("resize"),v&&v(!0),!0;z&&M?(G||(h(q).removeClass("jshide").hide().fadeIn(500),G=!0),N&&(a(h(J)),N=!1)):e();h(c).find('input[type="submit"]').attr("disabled",!0);v&&v(!1);return!1}function p(a){var b,c,d=r||{};for(b in d)d.hasOwnProperty(b)&&(c=d[b],a[b]?a[b].value=c:h('<input type="hidden" />').attr("name",b).appendTo(a).val(c))}function k(a){a.preventDefault();
234
+ a=h(a.target).serializeArray();s(a);E=!0;return!1}function g(a){a.preventDefault();M.dialog("close");return!1}function n(a){a.preventDefault();M.dialog("open").find('input[name="connection_type"]').change();return!1}function w(a){H=a.authed;B=a.method;h(q).find("span.loco-msg").text(a.message||"Something went wrong.");L=a.warning||"";a.notice&&u.notices.info(a.notice);if(H)"direct"!==B&&(r=a.creds,p(c),E&&a.success&&u.notices.success(a.success)),d();else if(a.reason)u.notices.info(a.reason);else if(a=
235
+ a.prompt){var e=b();e.html(a).find("form").submit(k);e.dialog("option","title",e.find("h2").remove().text());e.find("button.cancel-button").show().click(g);e.find('input[type="submit"]').addClass("button-primary");d();h(f).triggerHandler("resize")}else u.notices.error("Server didn't return credentials, nor a prompt for credentials")}function y(){d()}function s(a){E=!1;u.ajax.setNonce("fsConnect",K).post("fsConnect",a,w,y);return a}var r,v,q=c,B=null,E=!1,H=!1,u=f.locoScope,z=c.path.value,F=c.auth.value,
236
+ K=c["loco-nonce"].value,I=h(q).find("button.button-primary"),J=m.getElementById(q.id+"-warn"),G=!1,N=!1,L="",M;u.notices.convert(J).stick();c.connection_type?(r={},r.connection_type=c.connection_type.value,H=!0):z&&F&&s({path:z,auth:F});d();return{applyCreds:function(a){if(a.nodeType)p(a);else{var b,c=r||{};for(b in c)c.hasOwnProperty(b)&&(a[b]=c[b])}return this},setForm:function(a){c=a;d();p(a);return this},connect:function(){z=c.path.value;F=c.auth.value;s(h(c).serializeArray());return this},listen:function(a){v=
237
+ a;H&&a(!0);return this}}};return c}({},w,y));m.register("$17",function(c,f,w){function l(c,f,g,h){f="n"===g?e(f):a(f);h&&(f=d(f));return b([].sort,[f])(c)}function b(a,b){return function(c){a.apply(c,b);return c}}function e(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 a(a){return function(b,c){return(b&&b[a]||"").localeCompare(c&&c[a]||"")}}function d(a){return function(b,c){return-1*a(b,c)}}c.init=function(a){function b(a){var c=-1,d=a.length;for(h("tr",
238
+ q).remove();++c<d;)q.appendChild(a[c].$)}function c(a){s=a?y.find(a,d):d.slice(0);v&&(a=e[v],s=l(s,v,a.type,a.desc));b(s)}var d=[],e=[],f=0,s,r,v,q=a.getElementsByTagName("tbody")[0],w=a.getElementsByTagName("thead")[0],y=m.require("$7","fulltext.js").init();w&&q&&(h("th",w).each(function(a,c){var g=c.getAttribute("data-sort-type");g&&(a=f,h(c).addClass("loco-sort").click(function(c){c.preventDefault();c=a;var f=e[c],g=f.type,m=!(f.desc=!f.desc);s=l(s||d.slice(0),c,g,m);b(s);r&&r.removeClass("loco-desc loco-asc");
239
+ r=h(f.$).addClass(m?"loco-desc":"loco-asc").removeClass(m?"loco-asc":"loco-desc");v=c;return!1}),e[f]={$:c,type:g});c.hasAttribute("colspan")?f+=Number(c.getAttribute("colspan")):f++}),h("tr",q).each(function(a,b){var c,f,g,h=[],k={_:a,$:b},l=b.getElementsByTagName("td");for(f in e){c=l[f];(g=c.textContent.replace(/(^\s+|\s+$)/g,""))&&h.push(g);c.hasAttribute("data-sort-value")&&(g=c.getAttribute("data-sort-value"));switch(e[f].type){case "n":g=Number(g)}k[f]=g}d[a]=k;y.index(a,h)}),a=h('form.loco-filter input[type="text"]',
240
+ a.parentNode),a.length&&(a=a[0],w=h(a.form),1<d.length?m.require("$8","LocoTextListener.js").listen(a,c):w.hide(),w.on("submit",function(a){a.preventDefault();return!1})))};return c}({},w,y));var G=w.locoScope||(w.locoScope={});w=w.locoConf||(w.locoConf={});y=m.require("$1","t.js").init();var L=w.wplang;m.require("$2","array.js");G.l10n=y;y.load(w.wpl10n);L&&y.pluraleq(L.pluraleq);G.string=m.require("$3","string.js");G.notices=m.require("$4","notices.js").init(y);G.ajax=m.require("$5","ajax.js").init(w).localise(y);
241
+ G.locale=m.require("$6","wplocale.js");G.fulltext=m.require("$7","fulltext.js");G.watchtext=m.require("$8","LocoTextListener.js").listen;G.selector=m.require("$9","LocoSelector.js").create;G.autocomp=m.require("$10","LocoAutoComplete.js").init;G.tooltip=m.require("$11","tooltip.js");G.po={ed:m.require("$12","poedit.js"),kbd:m.require("$13","hotkeys.js"),init:m.require("$14","po.js").create,ace:m.require("$15","ace.js").strf("php")};G.fs=m.require("$16","fsconn.js");h("#loco.wrap table.wp-list-table").each(function(c,
242
+ f){m.require("$17","tables.js").init(f)})})(window,document,window.jQuery);
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: timwhitlock
3
  Tags: translation, translators, localization, localisation, l10n, i18n, Gettext, PO, MO, productivity, multilingual, internationalization
4
  Requires at least: 4.1
5
  Requires PHP: 5.2.4
6
- Tested up to: 5.2.4
7
- Stable tag: 2.3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -97,6 +97,11 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http
97
 
98
  == Changelog ==
99
 
 
 
 
 
 
100
  = 2.3.1 =
101
  * Default POT getter now looks in "lang" directory
102
  * Not calling deprecated magic quotes functions under PHP 7.4
@@ -314,7 +319,7 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http
314
 
315
  == Upgrade Notice ==
316
 
317
- = 2.3.1 =
318
  * Various bug fixes and improvements
319
 
320
 
3
  Tags: translation, translators, localization, localisation, l10n, i18n, Gettext, PO, MO, productivity, multilingual, internationalization
4
  Requires at least: 4.1
5
  Requires PHP: 5.2.4
6
+ Tested up to: 5.4
7
+ Stable tag: 2.3.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
97
 
98
  == Changelog ==
99
 
100
+ = 2.3.2 =
101
+ * Removed login/email from default Last-Translator credit
102
+ * Bumped WP compatibility to 5.4
103
+ * Fixed PHP 7.4 deprecations
104
+
105
  = 2.3.1 =
106
  * Default POT getter now looks in "lang" directory
107
  * Not calling deprecated magic quotes functions under PHP 7.4
319
 
320
  == Upgrade Notice ==
321
 
322
+ = 2.3.2 =
323
  * Various bug fixes and improvements
324
 
325
 
src/admin/config/PrefsController.php CHANGED
@@ -16,12 +16,6 @@ class Loco_admin_config_PrefsController extends Loco_admin_config_BaseController
16
  $opts = Loco_data_Preferences::get();
17
  $this->set( 'opts', $opts );
18
 
19
- // default value for Last-Translator credit
20
- $user = wp_get_current_user();
21
- $name = $user->get('display_name') or $name = 'nobody';
22
- $email = $user->get('user_email') or $email = 'nobody@localhost';
23
- $this->set('credit', sprintf('%s <%s>', $name, $email ) );
24
-
25
  // handle save action
26
  $nonce = $this->setNonce('save-prefs');
27
  try {
16
  $opts = Loco_data_Preferences::get();
17
  $this->set( 'opts', $opts );
18
 
 
 
 
 
 
 
19
  // handle save action
20
  $nonce = $this->setNonce('save-prefs');
21
  try {
src/config/BundleReader.php CHANGED
@@ -19,6 +19,7 @@ class Loco_config_BundleReader {
19
 
20
 
21
  /**
 
22
  * @return Loco_package_Bundle
23
  */
24
  public function loadXml( Loco_fs_File $file ){
19
 
20
 
21
  /**
22
+ * @param Loco_fs_File loco.xml file
23
  * @return Loco_package_Bundle
24
  */
25
  public function loadXml( Loco_fs_File $file ){
src/data/Permissions.php CHANGED
@@ -36,7 +36,8 @@ class Loco_data_Permissions {
36
  $roles = self::wp_roles();
37
  $apply = array();
38
  // ensure translator role exists and is not locked out
39
- if( $role = $roles->get_role('translator') ){
 
40
  $role->has_cap('read') || $role->add_cap('read');
41
  }
42
  // else absence of translator role indicates first run
36
  $roles = self::wp_roles();
37
  $apply = array();
38
  // ensure translator role exists and is not locked out
39
+ $role = $roles->get_role('translator');
40
+ if( $role instanceof WP_Role ){
41
  $role->has_cap('read') || $role->add_cap('read');
42
  }
43
  // else absence of translator role indicates first run
src/data/Preferences.php CHANGED
@@ -1,6 +1,8 @@
1
  <?php
2
  /**
3
  * Data object persisted as a WordPress user meta entry under the loco_prefs key
 
 
4
  */
5
  class Loco_data_Preferences extends Loco_data_Serializable {
6
 
@@ -21,7 +23,6 @@ class Loco_data_Preferences extends Loco_data_Serializable {
21
  * @var array
22
  */
23
  private static $defaults = array (
24
- // text to use in Last-Translator credit
25
  'credit' => '',
26
  );
27
 
@@ -94,6 +95,7 @@ class Loco_data_Preferences extends Loco_data_Serializable {
94
 
95
  /**
96
  * Populate all settings from raw postdata.
 
97
  * @return Loco_data_Preferences
98
  */
99
  public function populate( array $data ){
@@ -108,5 +110,19 @@ class Loco_data_Preferences extends Loco_data_Serializable {
108
  }
109
  return $this;
110
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
 
112
  }
1
  <?php
2
  /**
3
  * Data object persisted as a WordPress user meta entry under the loco_prefs key
4
+ *
5
+ * @property string $credit Last-Translator credit, defaults to current display name
6
  */
7
  class Loco_data_Preferences extends Loco_data_Serializable {
8
 
23
  * @var array
24
  */
25
  private static $defaults = array (
 
26
  'credit' => '',
27
  );
28
 
95
 
96
  /**
97
  * Populate all settings from raw postdata.
98
+ * @param array
99
  * @return Loco_data_Preferences
100
  */
101
  public function populate( array $data ){
110
  }
111
  return $this;
112
  }
113
+
114
+
115
+ /**
116
+ * Get default Last-Translator credit
117
+ * @return string
118
+ */
119
+ public function default_credit(){
120
+ $user = wp_get_current_user();
121
+ $name = (string) $user->get('display_name');
122
+ if( $user->get('user_login') === $name ){
123
+ $name = '';
124
+ }
125
+ return $name;
126
+ }
127
 
128
  }
src/data/Session.php CHANGED
@@ -122,7 +122,6 @@ class Loco_data_Session extends Loco_data_Serializable {
122
  }
123
 
124
 
125
-
126
  /**
127
  * Persist object in WordPress usermeta table
128
  * @return Loco_data_Session
@@ -136,7 +135,6 @@ class Loco_data_Session extends Loco_data_Serializable {
136
  }
137
 
138
 
139
-
140
  /**
141
  * Clear object data and remove our key from WordPress usermeta record
142
  * @return Loco_data_Session
@@ -155,28 +153,27 @@ class Loco_data_Session extends Loco_data_Serializable {
155
 
156
  /**
157
  * @param string name of messages bag, e.g. "errors"
158
- * @param mixed optionally put data in rather than getting data out
159
  * @return mixed
160
  */
161
  public function flash( $bag, $data = null ){
162
  if( isset($data) ){
163
  $this->dirty = true;
164
  $this[$bag][] = $data;
165
- return;
166
  }
167
  // else get first object in bag and remove before returning
168
- if( isset($this[$bag]) ){
169
  if( $data = array_shift($this[$bag]) ){
170
  $this->dirty = true;
171
  return $data;
172
  }
173
  }
 
174
  }
175
 
176
 
177
-
178
  /**
179
- * @internal
180
  */
181
  public function offsetSet( $index, $newval ){
182
  if( ! isset($this[$index]) || $newval !== $this[$index] ){
@@ -186,9 +183,8 @@ class Loco_data_Session extends Loco_data_Serializable {
186
  }
187
 
188
 
189
-
190
  /**
191
- * @internal
192
  */
193
  public function offsetUnset( $index ){
194
  if( isset($this[$index]) ){
122
  }
123
 
124
 
 
125
  /**
126
  * Persist object in WordPress usermeta table
127
  * @return Loco_data_Session
135
  }
136
 
137
 
 
138
  /**
139
  * Clear object data and remove our key from WordPress usermeta record
140
  * @return Loco_data_Session
153
 
154
  /**
155
  * @param string name of messages bag, e.g. "errors"
156
+ * @param string optionally put message in rather than getting data out
157
  * @return mixed
158
  */
159
  public function flash( $bag, $data = null ){
160
  if( isset($data) ){
161
  $this->dirty = true;
162
  $this[$bag][] = $data;
 
163
  }
164
  // else get first object in bag and remove before returning
165
+ else if( isset($this[$bag]) ){
166
  if( $data = array_shift($this[$bag]) ){
167
  $this->dirty = true;
168
  return $data;
169
  }
170
  }
171
+ return null;
172
  }
173
 
174
 
 
175
  /**
176
+ * {@inheritDoc}
177
  */
178
  public function offsetSet( $index, $newval ){
179
  if( ! isset($this[$index]) || $newval !== $this[$index] ){
183
  }
184
 
185
 
 
186
  /**
187
+ * {@inheritDoc}
188
  */
189
  public function offsetUnset( $index ){
190
  if( isset($this[$index]) ){
src/fs/File.php CHANGED
@@ -40,15 +40,16 @@ class Loco_fs_File {
40
  * @return string fixed path, or "" if not absolute
41
  */
42
  public static function abs( $path ){
43
- if( $path = (string) $path ){
44
- $chr1 = $path{0};
 
45
  // return unmodified path if starts "/"
46
  if( '/' === $chr1 ){
47
  return $path;
48
  }
49
  // Windows drive path if "X:" or network path if "\\"
50
- if( isset($path{1}) ){
51
- $chr2 = $path{1};
52
  if( ':' === $chr2 || ( '\\' === $chr1 && '\\' === $chr2 ) ){
53
  return strtoupper($chr1).$chr2.strtr( substr($path,2), '\\', '/' );
54
  }
@@ -425,7 +426,7 @@ class Loco_fs_File {
425
  // if we are below given base path, return ./relative
426
  if( substr($path,0,$length) === $base ){
427
  ++$length;
428
- if( isset($path{$length}) ){
429
  return substr( $path, $length );
430
  }
431
  // else paths were identical
40
  * @return string fixed path, or "" if not absolute
41
  */
42
  public static function abs( $path ){
43
+ $path = (string) $path;
44
+ if( '' !== $path ){
45
+ $chr1 = substr($path,0,1);
46
  // return unmodified path if starts "/"
47
  if( '/' === $chr1 ){
48
  return $path;
49
  }
50
  // Windows drive path if "X:" or network path if "\\"
51
+ $chr2 = (string) substr($path,1,1);
52
+ if( '' !== $chr2 ){
53
  if( ':' === $chr2 || ( '\\' === $chr1 && '\\' === $chr2 ) ){
54
  return strtoupper($chr1).$chr2.strtr( substr($path,2), '\\', '/' );
55
  }
426
  // if we are below given base path, return ./relative
427
  if( substr($path,0,$length) === $base ){
428
  ++$length;
429
+ if( strlen($path) > $length ){
430
  return substr( $path, $length );
431
  }
432
  // else paths were identical
src/fs/FileFinder.php CHANGED
@@ -335,7 +335,7 @@ class Loco_fs_FileFinder implements Iterator, Countable, Loco_fs_FileListInterfa
335
  if( is_resource($this->dir) ){
336
  while( $f = readdir($this->dir) ){
337
  // dot-files always excluded
338
- if( '.' === $f{0} ){
339
  continue;
340
  }
341
  $path = $this->cwd.'/'.$f;
@@ -470,8 +470,8 @@ class Loco_fs_FileFinder implements Iterator, Countable, Loco_fs_FileListInterfa
470
  */
471
  public function rewind(){
472
  if( $this->cached ){
473
- reset( $this->cache );
474
- $this->i = key($this->cache);
475
  }
476
  else {
477
  $this->d = 0;
335
  if( is_resource($this->dir) ){
336
  while( $f = readdir($this->dir) ){
337
  // dot-files always excluded
338
+ if( '.' === substr($f,0,1) ){
339
  continue;
340
  }
341
  $path = $this->cwd.'/'.$f;
470
  */
471
  public function rewind(){
472
  if( $this->cached ){
473
+ $this->cache->rewind();
474
+ $this->i = $this->cache->key();
475
  }
476
  else {
477
  $this->d = 0;
src/gettext/Data.php CHANGED
@@ -28,10 +28,21 @@ class Loco_gettext_Data extends LocoPoIterator implements JsonSerializable {
28
  * @return Loco_gettext_Data
29
  */
30
  public static function load( Loco_fs_File $file ){
31
- if( 'mo' === self::ext($file) ){
32
- return self::fromBinary( $file->getContents() );
 
 
 
 
 
 
 
 
 
 
 
 
33
  }
34
- return self::fromSource( $file->getContents() );
35
  }
36
 
37
 
@@ -259,18 +270,19 @@ class Loco_gettext_Data extends LocoPoIterator implements JsonSerializable {
259
  'X-Generator' => 'Loco https://localise.biz/',
260
  'X-Loco-Version' => sprintf('%s; wp-%s', loco_plugin_version(), $GLOBALS['wp_version'] ),
261
  );
262
- // set actual last translator from WordPress login when possible
263
  if( function_exists('get_current_user_id') && get_current_user_id() ){
264
- $user = wp_get_current_user();
265
- $name = $user->get('display_name') or $name = 'nobody';
266
- $email = $user->get('user_email') or $email = 'nobody@localhost';
267
- // set user's preferred last translator credit if configured
268
  $prefs = Loco_data_Preferences::get();
269
- $credit = $prefs->credit;
270
- if( ! $credit ){
271
- $credit = sprintf('%s <%s>', $name, $email );
 
 
 
 
 
 
272
  }
273
- $required['Last-Translator'] = apply_filters( 'loco_current_translator', $credit, $name, $email );
274
  }
275
  // only set absent or empty headers from default list
276
  foreach( $defaults as $key => $value ){
28
  * @return Loco_gettext_Data
29
  */
30
  public static function load( Loco_fs_File $file ){
31
+ $type = strtoupper( self::ext($file) );
32
+ // catch parse errors so we can inform user of which file is bad
33
+ try {
34
+ if( 'MO' === $type ){
35
+ return self::fromBinary( $file->getContents() );
36
+ }
37
+ else {
38
+ return self::fromSource( $file->getContents() );
39
+ }
40
+ }
41
+ catch( Loco_error_ParseException $e ){
42
+ $path = $file->getRelativePath( loco_constant('WP_CONTENT_DIR') );
43
+ Loco_error_AdminNotices::debug( sprintf('Failed to parse %s as a %s file',$path,$type) );
44
+ throw new Loco_error_ParseException( sprintf('Invalid %s file: %s',$type,basename($path)) );
45
  }
 
46
  }
47
 
48
 
270
  'X-Generator' => 'Loco https://localise.biz/',
271
  'X-Loco-Version' => sprintf('%s; wp-%s', loco_plugin_version(), $GLOBALS['wp_version'] ),
272
  );
273
+ // set user's preferred Last-Translator credit if configured
274
  if( function_exists('get_current_user_id') && get_current_user_id() ){
 
 
 
 
275
  $prefs = Loco_data_Preferences::get();
276
+ $credit = (string) $prefs->credit;
277
+ if( '' === $credit ){
278
+ $credit = $prefs->default_credit();
279
+ }
280
+ // filter credit with current user name and email
281
+ $user = wp_get_current_user();
282
+ $credit = apply_filters( 'loco_current_translator', $credit, $user->get('display_name'), $user->get('email') );
283
+ if( '' !== $credit ){
284
+ $required['Last-Translator'] = $credit;
285
  }
 
286
  }
287
  // only set absent or empty headers from default list
288
  foreach( $defaults as $key => $value ){
src/gettext/Metadata.php CHANGED
@@ -69,12 +69,17 @@ class Loco_gettext_Metadata extends Loco_data_Transient {
69
  try {
70
  $data = Loco_gettext_Data::load($po)->getArrayCopy();
71
  $meta['valid'] = true;
72
- $meta['stats'] = self::stats( $data );
73
  }
74
  catch( Exception $e ){
75
  $meta['valid'] = false;
 
76
  }
77
  }
 
 
 
 
78
  // persist on shutdown with a useful TTL and keepalive
79
  // Maximum lifespan: 10 days. Refreshed if accessed a day after being cached.
80
  $meta->setLifespan(864000)->keepAlive(86400)->persistLazily();
69
  try {
70
  $data = Loco_gettext_Data::load($po)->getArrayCopy();
71
  $meta['valid'] = true;
72
+ $meta['stats'] = self::stats($data);
73
  }
74
  catch( Exception $e ){
75
  $meta['valid'] = false;
76
+ $meta['error'] = $e->getMessage();
77
  }
78
  }
79
+ // show cached debug notice as if file was being parsed
80
+ else if( $meta->offsetExists('error') ){
81
+ Loco_error_AdminNotices::debug($meta['error'].': '.$meta['rpath']);
82
+ }
83
  // persist on shutdown with a useful TTL and keepalive
84
  // Maximum lifespan: 10 days. Refreshed if accessed a day after being cached.
85
  $meta->setLifespan(864000)->keepAlive(86400)->persistLazily();
src/gettext/WordCount.php CHANGED
@@ -58,11 +58,12 @@ class Loco_gettext_WordCount implements Countable {
58
 
59
  /**
60
  * Very simple word count, only suitable for latin characters, and biased toward English.
 
61
  * @return int
62
  */
63
  public static function simpleCount( $str ){
64
  $n = 0;
65
- if( isset($str{0}) ){
66
 
67
  // TODO should we strip PHP string formatting?
68
  // e.g. "Hello %s" currently counts as 2 words.
58
 
59
  /**
60
  * Very simple word count, only suitable for latin characters, and biased toward English.
61
+ * @param string
62
  * @return int
63
  */
64
  public static function simpleCount( $str ){
65
  $n = 0;
66
+ if( is_string($str) && '' !== $str ){
67
 
68
  // TODO should we strip PHP string formatting?
69
  // e.g. "Hello %s" currently counts as 2 words.
src/hooks/AdminHooks.php CHANGED
@@ -70,7 +70,6 @@ class Loco_hooks_AdminHooks extends Loco_hooks_Hookable {
70
  }
71
 
72
 
73
-
74
  /**
75
  * "admin_menu" callback.
76
  */
@@ -87,6 +86,9 @@ class Loco_hooks_AdminHooks extends Loco_hooks_Hookable {
87
 
88
  /**
89
  * plugin_action_links action callback
 
 
 
90
  */
91
  public function on_plugin_action_links( $links, $plugin = '' ){
92
  try {
@@ -107,7 +109,6 @@ class Loco_hooks_AdminHooks extends Loco_hooks_Hookable {
107
  }
108
 
109
 
110
-
111
  /**
112
  * Purge in-memory caches that may be persisted by object caching plugins
113
  */
@@ -119,9 +120,10 @@ class Loco_hooks_AdminHooks extends Loco_hooks_Hookable {
119
  }
120
 
121
 
122
-
123
  /**
124
  * pre_update_option_{$option} filter callback for $option = "active_plugins"
 
 
125
  */
126
  public function filter_pre_update_option_active_plugins( $value = null ){
127
  $this->purge_wp_cache();
@@ -129,9 +131,10 @@ class Loco_hooks_AdminHooks extends Loco_hooks_Hookable {
129
  }
130
 
131
 
132
-
133
  /**
134
  * pre_update_site_option_{$option} filter callback for $option = "active_sitewide_plugins"
 
 
135
  */
136
  public function filter_pre_update_site_option_active_sitewide_plugins( $value = null ){
137
  $this->purge_wp_cache();
70
  }
71
 
72
 
 
73
  /**
74
  * "admin_menu" callback.
75
  */
86
 
87
  /**
88
  * plugin_action_links action callback
89
+ * @param string[]
90
+ * @param string
91
+ * @return string[]
92
  */
93
  public function on_plugin_action_links( $links, $plugin = '' ){
94
  try {
109
  }
110
 
111
 
 
112
  /**
113
  * Purge in-memory caches that may be persisted by object caching plugins
114
  */
120
  }
121
 
122
 
 
123
  /**
124
  * pre_update_option_{$option} filter callback for $option = "active_plugins"
125
+ * @param array active plugins
126
+ * @return array
127
  */
128
  public function filter_pre_update_option_active_plugins( $value = null ){
129
  $this->purge_wp_cache();
131
  }
132
 
133
 
 
134
  /**
135
  * pre_update_site_option_{$option} filter callback for $option = "active_sitewide_plugins"
136
+ * @param array active sitewide plugins
137
+ * @return array
138
  */
139
  public function filter_pre_update_site_option_active_sitewide_plugins( $value = null ){
140
  $this->purge_wp_cache();
src/mvc/AjaxRouter.php CHANGED
@@ -173,7 +173,7 @@ class Loco_mvc_AjaxRouter extends Loco_hooks_Hookable {
173
  }
174
  // else execute controller to get json output
175
  $json = $this->ctrl->render();
176
- if( is_null($json) || ! isset($json{0}) ){
177
  throw new Loco_error_Exception( __('Ajax controller returned empty JSON','loco-translate') );
178
  }
179
  }
@@ -201,7 +201,7 @@ class Loco_mvc_AjaxRouter extends Loco_hooks_Hookable {
201
  }
202
  // else execute controller to get raw output
203
  $data = $this->ctrl->render();
204
- if( is_null($data) || ! isset($data{0}) ){
205
  throw new Loco_error_Exception( __('Download controller returned empty output','loco-translate') );
206
  }
207
  }
173
  }
174
  // else execute controller to get json output
175
  $json = $this->ctrl->render();
176
+ if( is_null($json) || '' === $json ){
177
  throw new Loco_error_Exception( __('Ajax controller returned empty JSON','loco-translate') );
178
  }
179
  }
201
  }
202
  // else execute controller to get raw output
203
  $data = $this->ctrl->render();
204
+ if( is_null($data) || '' === $data ){
205
  throw new Loco_error_Exception( __('Download controller returned empty output','loco-translate') );
206
  }
207
  }
src/mvc/View.php CHANGED
@@ -36,6 +36,7 @@ class Loco_mvc_View implements IteratorAggregate {
36
 
37
  /**
38
  * @internal
 
39
  */
40
  public function __construct( array $args = array() ){
41
  $this->scope = new Loco_mvc_ViewParams( $args );
@@ -49,7 +50,7 @@ class Loco_mvc_View implements IteratorAggregate {
49
  * @return Loco_mvc_View
50
  */
51
  public function cd( $path ){
52
- if( $path && '/' === $path{0} ){
53
  $this->cwd = untrailingslashit( loco_plugin_root().'/tpl'.$path );
54
  }
55
  else {
@@ -59,10 +60,9 @@ class Loco_mvc_View implements IteratorAggregate {
59
  }
60
 
61
 
62
-
63
  /**
64
  * @internal
65
- * Clean up if something ubruptly stopped rendering before graceful end
66
  */
67
  public function __destruct(){
68
  if( $this->block ){
@@ -71,9 +71,9 @@ class Loco_mvc_View implements IteratorAggregate {
71
  }
72
 
73
 
74
-
75
  /**
76
  * Render error screen HTML
 
77
  * @return string
78
  */
79
  public static function renderError( Loco_error_Exception $e ){
@@ -88,11 +88,10 @@ class Loco_mvc_View implements IteratorAggregate {
88
  }
89
 
90
 
91
-
92
  /**
93
- * @internal
94
  * Make this view a child of another template. i.e. decorate this with that.
95
  * Parent will have access to original argument scope, but separate from now on
 
96
  * @return Loco_mvc_View the parent view
97
  */
98
  private function extend( $tpl ){
@@ -104,8 +103,8 @@ class Loco_mvc_View implements IteratorAggregate {
104
 
105
 
106
  /**
107
- * @internal
108
  * After start is called any captured output will be placed in the named variable
 
109
  * @return void
110
  */
111
  private function start( $name ){
@@ -115,9 +114,7 @@ class Loco_mvc_View implements IteratorAggregate {
115
  }
116
 
117
 
118
-
119
  /**
120
- * @internal
121
  * When stop is called, buffered output is saved into current variable for output by parent template, or at end of script.
122
  * @return void
123
  */
36
 
37
  /**
38
  * @internal
39
+ * @param array
40
  */
41
  public function __construct( array $args = array() ){
42
  $this->scope = new Loco_mvc_ViewParams( $args );
50
  * @return Loco_mvc_View
51
  */
52
  public function cd( $path ){
53
+ if( $path && '/' === substr($path,0,1) ){
54
  $this->cwd = untrailingslashit( loco_plugin_root().'/tpl'.$path );
55
  }
56
  else {
60
  }
61
 
62
 
 
63
  /**
64
  * @internal
65
+ * Clean up if something abruptly stopped rendering before graceful end
66
  */
67
  public function __destruct(){
68
  if( $this->block ){
71
  }
72
 
73
 
 
74
  /**
75
  * Render error screen HTML
76
+ * @param Loco_error_Exception
77
  * @return string
78
  */
79
  public static function renderError( Loco_error_Exception $e ){
88
  }
89
 
90
 
 
91
  /**
 
92
  * Make this view a child of another template. i.e. decorate this with that.
93
  * Parent will have access to original argument scope, but separate from now on
94
+ * @param string
95
  * @return Loco_mvc_View the parent view
96
  */
97
  private function extend( $tpl ){
103
 
104
 
105
  /**
 
106
  * After start is called any captured output will be placed in the named variable
107
+ * @param string
108
  * @return void
109
  */
110
  private function start( $name ){
114
  }
115
 
116
 
 
117
  /**
 
118
  * When stop is called, buffered output is saved into current variable for output by parent template, or at end of script.
119
  * @return void
120
  */
src/package/Bundle.php CHANGED
@@ -37,7 +37,7 @@ abstract class Loco_package_Bundle extends ArrayObject implements JsonSerializab
37
  private $xpaths;
38
 
39
  /**
40
- * Full path to PHP bootsrap file
41
  * @var string
42
  */
43
  private $boot;
@@ -339,13 +339,19 @@ abstract class Loco_package_Bundle extends ArrayObject implements JsonSerializab
339
 
340
  /**
341
  * Set primary PHP source file containing bundle bootstrap code, if applicable.
 
342
  * @return Loco_package_Bundle
343
  */
344
  public function setBootstrapPath( $path ){
345
- $this->boot = (string) $path;
 
 
 
 
 
346
  // base directory can be inferred from bootstrap path
347
  if( ! $this->hasDirectoryPath() ){
348
- $this->setDirectoryPath( dirname($this->boot) );
349
  }
350
  return $this;
351
  }
37
  private $xpaths;
38
 
39
  /**
40
+ * Full path to PHP bootstrap file
41
  * @var string
42
  */
43
  private $boot;
339
 
340
  /**
341
  * Set primary PHP source file containing bundle bootstrap code, if applicable.
342
+ * @param string path to PHP file
343
  * @return Loco_package_Bundle
344
  */
345
  public function setBootstrapPath( $path ){
346
+ $path = (string) $path;
347
+ // sanity check this is a PHP file even if it doesn't exist
348
+ if( '.php' !== substr($path,-4) ){
349
+ throw new Loco_error_Exception('Bootstrap file should end .php'.$path );
350
+ }
351
+ $this->boot = $path;
352
  // base directory can be inferred from bootstrap path
353
  if( ! $this->hasDirectoryPath() ){
354
+ $this->setDirectoryPath( dirname($path) );
355
  }
356
  return $this;
357
  }
src/package/Plugin.php CHANGED
@@ -179,10 +179,14 @@ class Loco_package_Plugin extends Loco_package_Bundle {
179
  public function setDirectoryPath( $path ){
180
  parent::setDirectoryPath($path);
181
  // plugin bootstrap file can be inferred from base directory + handle
 
182
  if( ! $this->getBootstrapPath() ){
183
- $file = new Loco_fs_File( basename( $this->getHandle() ) );
184
- $file->normalize( $path );
185
- $this->setBootstrapPath( $file->getPath() );
 
 
 
186
  }
187
 
188
  return $this;
179
  public function setDirectoryPath( $path ){
180
  parent::setDirectoryPath($path);
181
  // plugin bootstrap file can be inferred from base directory + handle
182
+ // e.g. if base is "/path/to/foo" and handle is "foo/bar.php" we can derive "/path/to/foo/bar.php"
183
  if( ! $this->getBootstrapPath() ){
184
+ $handle = $this->getHandle();
185
+ if( '' !== $handle ) {
186
+ $file = new Loco_fs_File( basename($handle) );
187
+ $file->normalize( $path );
188
+ $this->setBootstrapPath( $file->getPath() );
189
+ }
190
  }
191
 
192
  return $this;
tpl/admin/config/prefs.php CHANGED
@@ -4,6 +4,7 @@
4
  */
5
 
6
  $this->extend('../layout');
 
7
  ?>
8
 
9
  <form action="" method="post" enctype="application/x-www-form-urlencoded">
@@ -17,7 +18,7 @@ $this->extend('../layout');
17
  <span><?php esc_html_e('Translator credit','loco-translate')?></span>
18
  </legend>
19
  <p>
20
- <input type="text" size="64" name="opts[credit]" id="loco--credit" value="<?php echo esc_attr($opts->credit)?>" placeholder="<?php echo esc_attr($credit)?>" />
21
  </p>
22
  </fieldset>
23
  </td>
4
  */
5
 
6
  $this->extend('../layout');
7
+ /* @var Loco_data_Preferences $opts */
8
  ?>
9
 
10
  <form action="" method="post" enctype="application/x-www-form-urlencoded">
18
  <span><?php esc_html_e('Translator credit','loco-translate')?></span>
19
  </legend>
20
  <p>
21
+ <input type="text" size="64" name="opts[credit]" id="loco--credit" value="<?php echo esc_attr($opts->credit)?>" placeholder="<?php echo esc_attr($opts->default_credit())?>" />
22
  </p>
23
  </fieldset>
24
  </td>
tpl/admin/file/msgcat.php CHANGED
@@ -12,10 +12,10 @@
12
  continue;
13
  }
14
  // may be a comment line
15
- if( '#' === $line{0} ){
16
  // may be able to parse out references
17
- if( isset($line{1}) ){
18
- $symbol = $line{1};
19
  $line = substr($line,2);
20
  if( ':' === $symbol ){
21
  echo '<span class="po-refs">#:',preg_replace('/\\S+:\d+/', '<a href="/#\\0" class="po-text">\\0</a>', $params->escape($line) ),'</span>';
@@ -36,7 +36,7 @@
36
  continue;
37
  }
38
  // grab keyword if there is one before quoted string
39
- if( preg_match('/^(msg[_a-z0-9\\[\\]]+)(\s+)/', $line, $r ) ){
40
  echo '<span class="po-word">',$params->escape($r[1]),'</span><span class="po-space">',$params->escape($r[2]),'</span>';
41
  $line = substr( $line, strlen($r[0]) );
42
  }
12
  continue;
13
  }
14
  // may be a comment line
15
+ if( '#' === substr($line,0,1) ){
16
  // may be able to parse out references
17
+ $symbol = (string) substr($line,1,1);
18
+ if( '' !== $symbol ){
19
  $line = substr($line,2);
20
  if( ':' === $symbol ){
21
  echo '<span class="po-refs">#:',preg_replace('/\\S+:\d+/', '<a href="/#\\0" class="po-text">\\0</a>', $params->escape($line) ),'</span>';
36
  continue;
37
  }
38
  // grab keyword if there is one before quoted string
39
+ if( preg_match('/^(msg[_a-z0-9\\[\\]]+)(\\s+)/', $line, $r ) ){
40
  echo '<span class="po-word">',$params->escape($r[1]),'</span><span class="po-space">',$params->escape($r[2]),'</span>';
41
  $line = substr( $line, strlen($r[0]) );
42
  }
tpl/admin/file/view-mo.php CHANGED
@@ -26,7 +26,7 @@ $this->start('source');
26
  $rowfmt = sprintf( '%%0%uX | ', strlen( sprintf( '%02X', $cols * floor( $bytes / $cols ) ) ) );
27
 
28
  for( $b = 0; $b < $bytes; $b++ ){
29
- $c = $bin{$b};
30
  $n = ord($c);
31
  // print byte offset
32
  if( ! $line ){
26
  $rowfmt = sprintf( '%%0%uX | ', strlen( sprintf( '%02X', $cols * floor( $bytes / $cols ) ) ) );
27
 
28
  for( $b = 0; $b < $bytes; $b++ ){
29
+ $c = substr($bin,$b,1);
30
  $n = ord($c);
31
  // print byte offset
32
  if( ! $line ){
tpl/debug/dump.php CHANGED
@@ -4,7 +4,7 @@
4
  */
5
 
6
  ?><dl class="debug"><?php
7
- foreach( $params as $prop => $value ): if( '_' !== $prop{0} ):?>
8
  <dt><?php echo esc_html($prop)?></dt>
9
  <dd><?php echo esc_html( json_encode($value,JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE) )?></dd><?php
10
  endif; endforeach?>
4
  */
5
 
6
  ?><dl class="debug"><?php
7
+ foreach( $params as $prop => $value ): if( '_' !== substr($prop,0,1) ):?>
8
  <dt><?php echo esc_html($prop)?></dt>
9
  <dd><?php echo esc_html( json_encode($value,JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE) )?></dd><?php
10
  endif; endforeach?>