From 9fb06a6c103a9abcc960250c3ffc1ae55d239371 Mon Sep 17 00:00:00 2001 From: Tim Whitlock Date: Wed, 5 Jun 2024 15:16:15 +0100 Subject: [PATCH] Added .blade.php tokenizer hack --- languages/loco-translate.pot | 2 +- lib/compiled/gettext.php | 3565 ++++++++++++++++++++++++++++++---- lib/data/locales.php | 2 +- pub/css/admin.css | 2 +- pub/css/editor.css | 2 +- pub/js/min/admin.js | 7 +- readme.txt | 1 + src/gettext/Extraction.php | 2 +- 8 files changed, 3217 insertions(+), 366 deletions(-) diff --git a/languages/loco-translate.pot b/languages/loco-translate.pot index 93e047d..bb5a303 100644 --- a/languages/loco-translate.pot +++ b/languages/loco-translate.pot @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: Loco Translate 2.6.10-dev\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/loco-translate/\n" -"POT-Creation-Date: 2024-05-27 09:18+0000\n" +"POT-Creation-Date: 2024-06-05 14:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: \n" diff --git a/lib/compiled/gettext.php b/lib/compiled/gettext.php index 313a5c6..cce828c 100644 --- a/lib/compiled/gettext.php +++ b/lib/compiled/gettext.php @@ -1,363 +1,3212 @@ map = array_combine( array_map( 'strtolower', $keys ), $keys ); parent::__construct($raw); } } -public function normalize( $k ) { $k = strtolower($k); return array_key_exists($k,$this->map) ? $this->map[$k] : null; } -public function add($key, $val ) { $this->offsetSet( $key, $val ); return $this; } -public function __toString() { $pairs = []; 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) { return array_key_exists( strtolower($key), $this->map ); } -public function __get( $key ){ return $this->offsetGet( $key ); } -public function __set( $key, $val ) { $this->offsetSet( $key, $val ); } -#[ReturnTypeWillChange] -public function offsetExists( $key ) { return $this->has($key); } -#[ReturnTypeWillChange] -public function offsetGet( $key ) { $k = $this->normalize($key); if( is_null($k) ){ return ''; } return parent::offsetGet($k); } -#[ReturnTypeWillChange] -public function offsetSet( $key, $value ) { $k = strtolower($key); if( isset($this->map[$k]) && $key !== $this->map[$k] ){ parent::offsetUnset( $this->map[$k] ); } $this->map[$k] = $key; parent::offsetSet( $key, $value ); } -#[ReturnTypeWillChange] -public function offsetUnset( $key ) { $k = strtolower($key); if( isset($this->map[$k]) ){ parent::offsetUnset( $this->map[$k] ); unset( $this->map[$k] ); } } -#[ReturnTypeWillChange] -public function jsonSerialize() { return $this->getArrayCopy(); } } -function loco_normalize_charset( $cs ) { if( preg_match('/^UTF-?8$/i',$cs) ){ return 'UTF-8'; } try { $aliases = @mb_encoding_aliases($cs); } catch( ValueError $e ){ $aliases = false; } if( false === $aliases ){ throw new InvalidArgumentException('Unsupported character encoding: '.$cs ); } if( 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; } -class LocoPoHeaders extends LocoHeaders { -private $cs = null; -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 ){ } catch( Exception $e ){ trigger_error( $e->getMessage(), E_USER_NOTICE ); } } $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,['UTF-8',$cs],true) ){ foreach( $headers as $key => $val ){ $headers[$key] = mb_convert_encoding($val,'UTF-8',[$cs]); } } return $headers; } -public static function fromSource( $raw ) { $po = new LocoPoParser($raw); $po->parse(0); return $po->getHeader(); } } -function loco_convert_utf8( $str, $enc, $strict ) { if( '' === $enc || 'UTF-8' === $enc || 'US-ASCII' === $enc ){ if( false === preg_match('//u',$str) ){ if( $strict ){ $e = new Loco_error_ParseException( $enc ? 'Invalid '.$enc.' encoding' : 'Unknown character encoding' ); if( preg_match('/^(?:[\\x00-\\x7F]|[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xFF][\\x80-\\xBF]{3})*/',$str,$r) && $str !== $r[0] ){ $e->setOffsetContext( strlen($r[0]), $str ); } throw $e; } $str = loco_fix_utf8($str); } } 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; } -function loco_fix_utf8( $str ) { $fix = ''; while( is_string($str) && '' !== $str ){ if( preg_match('/^(?:[\\x00-\\x7F]|[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xFF][\\x80-\\xBF]{3})+/',$str,$r) ){ $fix .= $r[0]; $str = substr($str, strlen($r[0]) ); } else { $fix.= mb_convert_encoding( $str[0], 'UTF-8', 'cp1252' ); $str = substr($str,1); } } return loco_convert_utf8($fix,'',true); } -abstract class LocoGettextParser { -private $head = null; -private $cs = ''; -abstract public function parse( $limit = -1 ); -protected function setHeader( LocoPoHeaders $head ) { $this->head = $head; $cs = $head->getCharset(); if( '' !== $cs ){ if( '' === $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 ){ $str = loco_convert_utf8($str,$this->cs,false); } return $str; } -protected function initMsgKey( $key ) { $r = explode("\4",$key); $value = [ 'source' => array_pop($r), 'target' => '', ]; if( isset($r[0]) ){ $value['context'] = $r[0]; } return $value; } } -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; } -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 ); } -class LocoPoParser extends LocoGettextParser implements Iterator { -private $lines = []; -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', $cs ); $cs = 'UTF-8'; } if( 'UTF-8' === $cs ){ $this->setCharset('UTF-8'); } $this->lines = preg_split('/(\\r\\n?|\\n)/', $src ); } } -#[ReturnTypeWillChange] -public function rewind() { $this->i = -1; $this->k = -1; $this->next(); } -#[ReturnTypeWillChange] -public function valid() { return is_int($this->i); } -#[ReturnTypeWillChange] -public function key() { return $this->k; } -#[ReturnTypeWillChange] -public function current() { return $this->m; } -#[ReturnTypeWillChange] -public function next() { $valid = false; $entry = [ '#' => [], 'id' => [null], 'str' => [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'); } $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]) ); } if( 0 === $limit ){ return []; } $i = -1; $assets = []; $lk = $head['X-Loco-Lookup']; while( $this->valid() ){ $entry = $this->current(); $msgid = $entry['id'][0]; if( is_null($msgid) ){ $this->next(); continue; } if( ++$i === $limit ){ return $assets; } $asset = [ '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 && 'text' !== $lk ){ $asset[$lk] = $asset['source']; $asset['source'] = $msgid; } else if( substr($msgid,0,1) == 'loco:' ){ $asset['_id'] = substr($msgid,5); } else { $asset['prev'] = $prev_entry; $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 = [ '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( is_array($prev_entry) && isset($prev_entry[1]) ){ if( $lk && 'text' !== $lk ){ $plural[$lk] = $plural['source']; $plural['source'] = $prev_entry[1]['source']; } } } if( isset($asset['flag']) ){ $plural['flag'] = $asset['flag']; } $assets[] = $plural; } } $this->next(); } 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; } } -class LocoMoParser extends LocoGettextParser { -private $bin; -private $be = null; -private $n = null; -private $o = null; -private $t = null; -private $v = null; -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 = []; $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 && -1 !== $limit ){ break; } $r[$i] = [ '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( $n = 1; $n < $nforms; $n++ ){ $r[++$i] = [ 'source' => isset($sources[$n]) ? $this->str( $sources[$n] ) : sprintf('%s (plural %u)',$r[$p]['source'],$n), 'target' => isset($targets[$n]) ? $this->str( $targets[$n] ) : '', 'parent' => $p, 'plural' => $n, ]; } } $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; } -#[ReturnTypeWillChange] -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]; } } -class LocoJedParser extends LocoGettextParser { -private $ld; -public function __construct( array $struct ){ $this->ld = $struct; } -public function parse( $limit = -1 ) { $values = []; foreach( $this->ld as $messages ){ $msgid = key($messages); if( '' === $msgid ){ $this->setHeader( new LocoJedHeaders($messages['']) ); unset($messages['']); } else { $this->setHeader( new LocoJedHeaders ); } $values[] = [ 'source' => '', 'target' => $this->getHeader(), ]; $i = -1; foreach( $messages as $key => $list ){ if( ++$i === $limit ){ break; } $value = $this->initMsgKey($key); $index = count($values); foreach( $list as $j => $msgstr ){ if( ! is_string($msgstr) ){ throw new Loco_error_ParseException('msgstr must be scalar'); } $value['target'] = $msgstr; if( 0 < $j ){ $value['plural'] = $j; $value['parent'] = $index; $value['source'] = ''; } $values[] = $value; } } } return $values; } } -class LocoJedHeaders extends LocoPoHeaders { -public function __construct( array $raw = [] ) { foreach( ['Language'=>'lang','plural_forms'=>'Plural-Forms'] as $canonical => $alias ){ if( array_key_exists($alias,$raw) && ! array_key_exists($canonical,$raw) ){ $raw[$canonical] = $raw[$alias]; } } parent::__construct($raw); } } -class LocoMoPhpParser extends LocoGettextParser { -private $msgs; -public function __construct( array $struct ){ $this->msgs = $struct['messages']; unset($struct['messages']); $this->setHeader( new LocoPoHeaders($struct) ); } -public function parse( $limit = -1 ) { $values = [ [ 'source' => '', 'target' => $this->getHeader(), ] ]; $i = -1; foreach( $this->msgs as $key => $bin ){ if( ++$i === $limit ){ break; } $value = $this->initMsgKey($key); $index = count($values); foreach( explode("\0",$bin) as $i => $msgstr ){ $value['target'] = $msgstr; if( 0 < $i ){ $value['plural'] = $i; $value['parent'] = $index; $value['source'] = ''; } $values[] = $value; } } return $values; } } -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/',[__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 = [ $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.'#: ' ); } return '#: '.$text; } -public static function prefix( $text, $prefix, $eol = "\n" ) { return $prefix . implode($eol.$prefix, self::split($text) ); } -public static function split( $text ) { $lines = preg_split('/\\R/u', $text ); if( false === $lines ){ if( false === preg_match('//u',$text) ){ $text = mb_convert_encoding( $text, 'UTF-8', 'cp1252' ); } $lines = preg_split('/\\r?\\n+/', $text ); } return $lines; } -public static function trim( $text ) { $lines = []; $deferred = null; foreach( explode("\n",$text) as $line ){ if( '' === $line ){ continue; } if( preg_match('/^msg[a-z]+(?:\\[\\d+])? ""/',$line) ){ $deferred = $line; continue; } if( $deferred && '"' === $line[0] ){ $lines[] = $deferred; $deferred = null; } $lines[] = $line; } return implode("\n",$lines); } } -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; } } -class LocoPoMessage extends ArrayObject { -public function __construct( array $r ){ $r['key'] = $r['source']; parent::__construct($r); } -public function __get( $prop ) { return $this->offsetExists($prop) ? $this->offsetGet($prop) : null; } -public function isFuzzy() { return 4 === $this->__get('flag'); } -public function getFormat() { $f = $this->__get('format'); if( is_string($f) && '' !== $f ){ return $f; } return ''; } -private function getPoFlags() { $flags = []; foreach( array_merge( [$this], $this->__get('plurals')?:[] ) as $form ){ if( $form->isFuzzy() ){ $flags[0] = 'fuzzy'; } $f = $form->getFormat(); if( '' !== $f ){ $flags[1] = $f.'-format'; } } return array_values($flags); } -public function getHash() { $hash = $this->getKey(); if( $this->offsetExists('plurals') ){ foreach( $this->offsetGet('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 exportSerial( $f = 'target' ) { $a = [ $this[$f] ]; if( $this->offsetExists('plurals') ){ $plurals = $this->offsetGet('plurals'); if( is_array($plurals) ){ foreach( $plurals as $p ){ $a[] = $p[$f]; } } } return $a; } -public function __toString(){ return $this->render( 79, 76 ); } -public function render( $width, $ref_width, $max_forms = 0 ) { $s = []; try { if( $text = $this->__get('comment') ) { $s[] = LocoPo::prefix( $text, '# '); } if( $text = $this->__get('notes') ) { $s[] = LocoPo::prefix( $text, '#. '); } if( $text = $this->__get('refs') ){ $s[] = LocoPo::refs( $text, $ref_width ); } if( $texts = $this->getPoFlags() ){ $s[] = '#, '.implode(', ',$texts); } $prev = $this->__get('prev'); if( is_array($prev) && $prev ){ foreach( new LocoPoIterator($prev) as $p ){ $text = $p->render( max(0,$width-3), 0 ); $s[] = LocoPo::prefix( LocoPo::trim($text),'#| '); break; } } $text = $this->__get('context'); if( is_string($text) && '' !== $text ){ $s[] = LocoPo::pair('msgctxt', $text, $width ); } $s[] = LocoPo::pair( 'msgid', $this['source'], $width ); $target = $this['target']; $plurals = $this->__get('plurals'); if( is_array($plurals) ){ if( array_key_exists(0,$plurals) ){ $p = $plurals[0]; $s[] = LocoPo::pair('msgid_plural', $p['source'], $width ); $s[] = LocoPo::pair('msgstr[0]', $target, $width ); $i = 0; while( array_key_exists($i,$plurals) ){ $p = $plurals[$i]; if( ++$i === $max_forms ){ break; } $s[] = LocoPo::pair('msgstr['.$i.']', $p['target'], $width ); } } else if( isset($this['plural_key']) ){ $s[] = LocoPo::pair('msgid_plural', $this['plural_key'], $width ); $s[] = LocoPo::pair('msgstr[0]', $target, $width ); } else { trigger_error('Missing plural_key in zero plural export'); $s[] = LocoPo::pair('msgstr', $target, $width ); } } else { $s[] = LocoPo::pair('msgstr', $target, $width ); } } catch( Exception $e ){ trigger_error( $e->getMessage(), E_USER_WARNING ); } return implode("\n",$s)."\n"; } -public function merge( LocoPoMessage $def, $translate = false ) { if( $def->getHash() !== $this->getHash() ){ $prev = [ 'source' => '', 'target' => '' ]; $prev = $this->diff('source',$def,$prev); $prev = $this->diff('context',$def,$prev); $this['flag'] = 4; $this['prev'] = [ $prev ]; $defPlural = $def->getPlural(0); $ourPlural = $this->getPlural(0); if( $defPlural && $ourPlural ) { $ourPlural->merge($defPlural); if( $ourPlural->offsetExists('prev') ) { $this['prev'][] = $ourPlural->prev[0]+['parent'=>0,'plural'=>1]; $ourPlural->offsetUnset('prev'); } } else if( $defPlural ){ $this['plurals'] = [ clone $defPlural ]; } else if( $ourPlural ){ $this['prev'][] = $ourPlural->exportBasic() + ['parent'=>0,'plural'=>1]; $this->offsetUnset('plurals'); } } foreach( ['notes','refs','format'] as $f ){ if( $def->offsetExists($f) ){ $this->offsetSet($f,$def->offsetGet($f)); } else if( $this->offsetExists($f) ){ $this->offsetUnset($f); } } if( $translate && '' === $this['target'] && '' !== $def['target'] ){ $this['target'] = $def['target']; if( $def->offsetExists('comment') ) { $this['comment'] = $def['comment']; } if( $this->offsetExists('plurals') ){ foreach( $this['plurals'] as $i => $ourPlural ){ if( '' === $ourPlural['target'] ){ $defPlural = $def->getPlural($i); if( $defPlural ){ $ourPlural['target'] = $defPlural['target']; } } } } } } -private function diff( $key, LocoPoMessage $def, array $prev ) { $old = $this->__get($key); $new = $def->__get($key); if( $new !== $old ){ $this->offsetSet($key,$new); if( is_string($old) && '' !== $old ){ $prev[$key] = $old; } } return $prev; } -private function getPlural( $i ) { if( $this->offsetExists('plurals') ){ $plurals = $this->offsetGet('plurals'); if( is_array($plurals) && array_key_exists($i,$plurals) ){ return $plurals[$i]; } } return null; } -private function exportBasic() { return [ 'source' => $this['source'], 'context' => $this->context, 'target' => '', ]; } -public function export() { $a = $this->getArrayCopy(); unset($a['key']); if( array_key_exists('plurals',$a) ){ foreach( $a['plurals'] as $i => $p ){ if( $p instanceof ArrayObject ){ $a['plurals'][$i] = $p->getArrayCopy(); } } } return $a; } -public function strip() { $this['target'] = ''; $plurals = $this->plurals; if( is_array($plurals) ){ foreach( $plurals as $p ){ $p->strip(); } } return $this; } -public function translated() { $n = 0; if( '' !== (string) $this['target'] ){ $n++; } if( $this->offsetExists('plurals') ){ foreach( $this->offsetGet('plurals') as $plural ) { if( '' !== (string) $plural['target']) { $n++; } } } return $n; } } -class LocoPoIterator implements Iterator, Countable { -private $po; -private $headers = null; -private $i; -private $t; -private $j; -private $z = 0; -private $w = 79; -public function __construct( $po ){ if( is_array($po) ){ $this->po = $po; } else if( $po instanceof Traversable ){ $this->po = iterator_to_array($po,false); } else { throw new InvalidArgumentException('PO data must be array or iterator'); } $this->t = count( $this->po ); if( 0 === $this->t ){ throw new InvalidArgumentException('Empty PO data'); } $h = $po[0]; if( '' !== $h['source'] || ( isset($h['context']) && '' !== $h['context'] ) || ( isset($po[1]['parent']) && 0 === $po[1]['parent'] ) ){ $this->z = -1; } } -public function push( LocoPoMessage $p ) { $raw = $p->export(); $plurals = $p->plurals; unset($raw['plurals']); $i = count($this->po); $this->po[$i] = $raw; $this->t++; if( is_array($plurals) ) { $j = 0; foreach( $plurals as $p ) { $raw = $p->export(); $raw['parent'] = $i; $raw['plural'] = ++$j; $this->po[] = $raw; $this->t++; } } } -public function concat( LocoPoIterator $more ) { foreach( $more as $message ){ $this->push($message); } return $this; } -public function __clone() { if( $this->headers ){ $this->headers = new LocoPoHeaders( $this->headers->getArrayCopy() ); } } -#[ReturnTypeWillChange] -public function count() { return $this->t - ( $this->z + 1 ); } -public function wrap( $width ) { if( $width > 0 ){ $this->w = max( 15, $width ); } else { $this->w = 0; } return $this; } -#[ReturnTypeWillChange] -public function rewind() { $this->i = $this->z; $this->j = -1; $this->next(); } -#[ReturnTypeWillChange] -public function key() { return $this->j; } -#[ReturnTypeWillChange] -public function valid() { return is_int($this->i); } -#[ReturnTypeWillChange] -public function next() { $i = $this->i; while( ++$i < $this->t ){ if( array_key_exists('parent',$this->po[$i]) ){ continue; } $this->j++; $this->i = $i; return; } $this->i = null; $this->j = null; } -#[ReturnTypeWillChange] -public function current() { return $this->item( $this->i ); } -private function item( $i ) { $po = $this->po; $parent = new LocoPoMessage( $po[$i] ); $plurals = []; $nonseq = $parent->offsetExists('child'); $j = $nonseq ? $parent['child'] : $i+1; while( isset($po[$j]['parent']) && $i === $po[$j]['parent'] ){ $plurals[] = new LocoPoMessage($po[$j++]); } if( $plurals ){ $parent['plurals'] = $plurals; } return $parent; } -public function exportEntry( $i ) { return $this->item( $i + ( 1-$this->z) ); } -public function getArrayCopy() { $po = $this->po; if( 0 === $this->z ){ $po[0]['target'] = (string) $this->getHeaders(); } return $po; } -public function clear() { if( 0 === $this->z ){ $this->po = [ $this->po[0] ]; $this->t = 1; } else { $this->po = []; $this->t = 0; } } -public function getHeaders() { if( is_null($this->headers) ){ $header = $this->po[0]; if( 0 === $this->z ){ $value = $header['target']; if( is_string($value) ){ $this->headers = LocoPoHeaders::fromMsgstr($value); } else if( $value instanceof LocoPoHeaders ){ $this->headers = $value; } else if( is_array($value) ){ $this->headers = new LocoPoHeaders($value); } } else { $this->headers = new LocoPoHeaders; } } return $this->headers; } -public function setHeaders( LocoPoHeaders $head ) { $this->headers = $head; if( 0 === $this->z ){ $this->po[0]['target'] = null; } return $this; } -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( callable $sorter = null ) { $width = $this->w; $ref_width = max( 0, $width - 3 ); $h = $this->exportHeader(); $msg = new LocoPoMessage( $h ); $s = $msg->render( $width, $ref_width ); if( $sorter ){ $msgs = []; foreach( $this as $msg ){ $msgs[] = $msg; } usort( $msgs, $sorter ); } else { $msgs = $this; } $h = $this->getHeaders()->offsetGet('Plural-Forms'); if( is_string($h) && preg_match('/nplurals\\s*=\\s*(\\d)/',$h,$r) ){ $max_pl = (int) $r[1]; } else { $max_pl = 0; } foreach( $msgs as $msg ){ $s .= "\n".$msg->render( $width, $ref_width, $max_pl ); } return $s; } -public function exportJed() { $head = $this->getHeaders(); $a = [ '' => [ 'domain' => $head['domain'], 'lang' => $head['language'], 'plural-forms' => $head['plural-forms'], ] ]; foreach( $this as $message ){ if( $message->translated() ){ $a[ $message->getKey() ] = $message->exportSerial(); } } return $a; } -private function exportHeader() { if( 0 === $this->z ){ $h = $this->po[0]; } else { $h = [ 'source' => '', 'target' => '' ]; } if( $this->headers ){ $h['target'] = (string) $this->headers; } return $h; } -public function exportRefs( $grep = '' ) { $a = []; if( '' === $grep ) { $grep = '/(\\S+):\\d+/'; } else { $grep = '/(\\S*'.$grep.'):\\d+/'; } $self = get_class($this); $base = [ $this->exportHeader() ]; foreach( $this as $message ){ if( preg_match_all( $grep, (string) $message->refs, $r ) ){ foreach( $r[1] as $ref ) { if( array_key_exists($ref,$a) ){ $po = $a[$ref]; } else { $po = new $self($base); $a[$ref] = $po; } $po->push($message); } } } return $a; } -public function splitRefs( array $map = null ) { $a = []; $self = get_class($this); $base = [ $this->exportHeader() ]; if( is_array($map) ){ $grep = implode('|',array_keys($map)); } else { $grep = '[a-z]+'; } foreach( $this as $message ){ $refs = ltrim( (string) $message->refs ); if( '' !== $refs ){ if( preg_match_all('/\\S+\\.('.$grep.'):\\d+/', $refs, $r, PREG_SET_ORDER ) ){ $tmp = []; foreach( $r as $rr ) { list( $ref, $ext ) = $rr; $tmp[$ext][$ref] = true; } foreach( $tmp as $ext => $refs ){ if( is_array($map) ){ $ext = $map[$ext]; } if( array_key_exists($ext,$a) ){ $po = $a[$ext]; } else { $po = new $self($base); $a[$ext] = $po; } $message = clone $message; $message['refs'] = implode(' ',array_keys($refs) ); $po->push($message); } } } } return $a; } -public function getHashes() { $a = []; 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 equal( LocoPoIterator $that ) { if( $this->t !== $that->t ){ return false; } $i = $this->z; $fields = [ 'source', 'context', 'notes', 'refs', 'target', 'comment', 'flag', 'parent', 'plural' ]; while( ++$i < $this->t ){ $a = $this->po[$i]; $b = $that->po[$i]; foreach( $fields as $f ){ $af = isset($a[$f]) ? $a[$f] : ''; $bf = isset($b[$f]) ? $b[$f] : ''; if( $af !== $bf ){ return false; } } } return true; } -public function sort( callable $func = null ) { $order = []; foreach( $this as $msg ){ $order[] = $msg; } usort( $order, $func ?: [__CLASS__,'compare'] ); $this->clear(); foreach( $order as $p ){ $this->push($p); } 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 = []; foreach( $this as $i => $msg ){ $index[ $msg->getHash() ] = $i; } $obj = new LocoPoIndex( $index ); return [ $obj, 'compare' ]; } } -class LocoMoTable { -private $size = 0; -private $bin = ''; -private $map = null; -public function __construct( $data = '' ){ if( is_array($data) ){ $this->compile( $data ); } else if( '' !== $data ){ $this->parse( $data ); } } -#[ReturnTypeWillChange] -public function count() { if( is_null($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_null($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 = ''; $this->map = []; 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 ); } $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; } -private function parse( $bin ) { $this->bin = $bin; $this->size = null; $hash_tab_size = $this->count(); $this->map = []; $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; } } -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 = (int) floor($seed); $seed |= 1; while ( ! self::is_prime($seed) ){ $seed += 2; } return $seed; } -private static function is_prime( $num ) { if( 1 === $num ){ return false; } if( 2 === $num ){ 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; } } -class LocoMo { -private $bin; -private $msgs; -private $head; -private $hash = null; -private $use_fuzzy = false; -private $cs = null; -public function __construct( Iterator $export, LocoPoHeaders $head = null ){ if( $head ){ $this->head = $head; } else { $this->head = new LocoPoHeaders; $this->setHeader('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() { $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 ) { if( $cs = $this->cs ){ $s = mb_convert_encoding($s,$cs,['UTF-8']); } return $s; } -public function compile() { $table = ['']; $sources = ['']; $targets = [ (string) $this->head ]; $fuzzy_flag = 4; $skip_fuzzy = ! $this->use_fuzzy; if( $this->head->has('Plural-Forms') && preg_match('/^nplurals=(\\d)/',$this->head->trimmed('Plural-Forms'), $r) ){ $nplurals = (int) $r[1]; $maxplural = max( 0, $nplurals-1 ); } else { $maxplural = 1; } 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']) ){ if( $r['plurals'] ){ $i = 0; foreach( $r['plurals'] as $i => $p ){ if( $i === 0 ){ $msgid .= "\0".$this->str($p['key']); } $msgstr .= "\0".$this->str($p['target']); } while( $maxplural > ++$i ){ $msgstr .= "\0"; } } else if( isset($r['plural_key']) ){ $msgid .= "\0".$this->str($r['plural_key']); } } $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 $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 ); } } -interface LocoTokensInterface extends Iterator { -public function advance(); -public function ignore( array $a ); } -class LocoTokenizer implements LocoTokensInterface { const T_LITERAL = 0; const T_UNKNOWN = -1; -private $src; -private $pos; -private $line; -private $col; -private $max; -private $rules = []; -private $skip = []; -private $tok; -private $len; -public function __construct( $src = '' ){ $this->init($src); } -public function parse( $src ) { $tokens = []; $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][] = [ $grep, $t ]; } else { $this->rules[''][] = [ $grep, $t ]; } return $this; } -public function ignore( array $a ) { foreach( $a as $t ){ $this->skip[$t] = true; } return $this; } -#[ReturnTypeWillChange] -public function current() { return $this->tok; } -public function advance() { $tok = $this->current(); $this->next(); return $tok; } -#[ReturnTypeWillChange] -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( [$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 = [ 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 : [ $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; } -#[ReturnTypeWillChange] -public function key() { return $this->len ? $this->len-1 : null; } -#[ReturnTypeWillChange] -public function valid() { return null !== $this->tok; } -#[ReturnTypeWillChange] -public function rewind() { $this->len = 0; $this->pos = 0; $this->col = 0; $this->line = 1; $this->max = strlen($this->src) - 1; $this->next(); } } -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 ) ); } -function loco_resolve_surrogates( $s ){ return preg_replace_callback('/\\xED([\\xA0-\\xAF])([\\x80-\\xBF])\\xED([\\xB0-\\xBF])([\\x80-\\xBF])/', '_loco_resolve_surrogates', $s ); } -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 ); } -class LocoEscapeParser { -private $map; -private $grep; -public function __construct( array $map = [] ){ $this->map = $map; $rules = ['\\\\']; 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).')/'; } -final public function unescape( $s ) { if( '' !== $s ) { return $this->stripSlashes( preg_replace_callback($this->grep, [$this, 'unescapeMatch'], $s) ); } return ''; } -final 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); } } -class LocoJsTokens extends LocoTokenizer { const T_KWORD = 1; const T_REGEX = 2; -private static $lex = null; -protected static $words = [ '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( [ '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', [$this,'matchWord'] ); $this->define('/^\\s+/u', T_WHITESPACE ); $this->define('!^//.*!', T_COMMENT ); $this->define('!^/\\*.*\\*/!Us', [$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,1) == '/**' ){ return T_DOC_COMMENT; } return T_COMMENT; } } -interface LocoExtractorInterface { -public function setDomain( $default ); -public function tokenize( $src ); -public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ); } -class LocoExtracted implements Countable { -private $exp = []; -private $reg = []; -private $dom = []; -private $dflt = ''; -public function extractSource( LocoExtractorInterface $ext, $src, $fileref = '' ) { $ext->extract( $this, $ext->tokenize($src), $fileref ); return $this; } -public function export() { return $this->exp; } -#[ReturnTypeWillChange] -public function count() { return count( $this->exp ); } -public function getDomainCounts() { return $this->dom; } -public function setDomain( $default ) { $this->dflt = $default; return $this; } -public function getDomain() { return $this->dflt; } -private function key( array $entry ) { $key = (string) $entry['source']; foreach( ['context','domain'] as $i => $prop ){ if( array_key_exists($prop,$entry) ) { $add = (string) $entry[$prop]; if( '' !== $add ){ $key .= ord($i).$add; } } } return $key; } -public function pushEntry( array $entry, $domain ) { if( '' === $domain || '*' === $domain ){ $domain = $this->dflt; } $entry['id'] = ''; $entry['target'] = ''; $entry['domain'] = $domain; $key = $this->key($entry); 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 pushPlural( array $entry, $sindex ) { $parent = $this->exp[$sindex]; $domain = $parent['domain']; $pkey = $this->key($parent)."\2"; if( ! array_key_exists($pkey,$this->reg) ){ $pindex = count($this->exp); $this->reg[$pkey] = $pindex; $entry += [ 'id' => '', 'target' => '', 'plural' => 1, 'parent' => $sindex, 'domain' => $domain, ]; $this->exp[$pindex] = $entry; if( isset($entry['format']) && ! isset( $parent['format']) ) { $this->exp[$sindex]['format'] = $entry['format']; } if( $pindex !== $sindex + $entry['plural']) { $this->exp[$sindex]['child'] = $pindex; } } } -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 ) { if( '' === $domain ){ $domain = $this->dflt; } $map = []; $newOffset = 1; $matchAll = '*' === $domain; $raw = [ [ '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; } } -abstract class LocoExtractor implements LocoExtractorInterface { -private $rules; -private $wp = []; -private $domain = ''; -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( $keyword ) { return isset($this->rules[$keyword]) ? $this->rules[$keyword] : ''; } -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; } $msgid = $args[$s]; if( ! is_string($msgid) ){ return null; } $entry = [ 'source' => $msgid, ]; if( is_int($c) && isset($args[$c]) ){ $entry['context'] = $args[$c]; } else if( '' === $msgid ){ return null; } if( $ref ){ $entry['refs'] = $ref; } if( is_int($d) && array_key_exists($d,$args) ){ $domain = $args[$d]; if( is_null($domain) ){ $domain = ''; } } else if( '' === $this->domain ) { $domain = $strings->getDomain(); } else { $domain = $this->domain; } $format = ''; $comment = $this->comment($comment); if( '' !== $comment ){ if( preg_match('/^xgettext:\\s*([-a-z]+)-format\\s*/mi', $comment, $r, PREG_OFFSET_CAPTURE ) ){ $format = $r[1][0]; $entry['format'] = $format; $comment = trim( substr_replace( $comment,'', $r[0][1], strlen($r[0][0]) ) ); } 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; } $msgid_plural = is_int($p) && isset($args[$p]) ? $args[$p] : ''; if( '' === $format ){ $format = $this->fsniff($msgid); if( '' !== $format ){ $entry['format'] = $format; } else if( '' !== $msgid_plural ){ $format = $this->fsniff($msgid_plural); if( '' !== $format ){ $entry['format'] = $format; } } } $index = $strings->pushEntry($entry,$domain); if( '' !== $msgid_plural ){ $entry = [ 'source' => $msgid_plural, ]; if( '' !== $format ) { $entry['format'] = $format; } $strings->pushPlural($entry,$index); } return $index; } -protected function utf8( $str ) { if( false === preg_match('//u',$str) ){ $str = mb_convert_encoding( $str, 'UTF-8', 'cp1252' ); } return $str; } } -class LocoPHPTokens implements LocoTokensInterface, Countable { -private $i = null; -private $tokens; -private $skip_tokens = []; -private $literal_tokens = []; -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 = []; $this->rewind(); while( $tok = $this->advance() ){ $arr[] = $tok; } return $arr; } -public function advance() { $tok = $this->current(); $this->next(); return $tok; } -#[ReturnTypeWillChange] -public function rewind() { $this->i = ( false === reset($this->tokens) ? null : key($this->tokens) ); } -#[ReturnTypeWillChange] -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; } -#[ReturnTypeWillChange] -public function key() { return $this->i; } -#[ReturnTypeWillChange] -public function next() { $this->i = ( false === next($this->tokens) ? null : key($this->tokens) ); } -#[ReturnTypeWillChange] -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 = []; foreach( $this as $token ){ $s[] = is_array($token) ? $token[1] : $token; } return implode('',$s); } -#[ReturnTypeWillChange] -public function count() { return count($this->tokens); } } -class LocoPHPEscapeParser extends LocoEscapeParser { -public function __construct(){ parent::__construct( [ '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})/', [$this,'unescapeMatch'], $s, -1, $n ); } } -function loco_unescape_php_string( $s ) { static $l; if( is_null($l) ) { $l = new LocoPHPEscapeParser; } return $l->unescape($s); } -function loco_decapse_php_string( $s ) { if( '' === $s ){ return ''; } $q = $s[0]; if( "'" === $q ){ return str_replace( ['\\'.$q, '\\\\'], [$q, '\\'], substr( $s, 1, -1 ) ); } if( '"' !== $q ){ return $s; } return loco_unescape_php_string( substr($s,1,-1) ); } -function loco_parse_php_comment( $comment ) { $comment = trim( $comment,"/ \n\r\t" ); if( '' !== $comment && '*' === $comment[0] ){ $lines = []; $junk = "\r\t/ *"; foreach( explode("\n",$comment) as $line ){ $line = trim($line,$junk); if( '' !== $line ){ $lines[] = $line; } } $comment = implode("\n", $lines); } return $comment; } -function loco_parse_wp_comment( $block ) { $header = []; if( '/*' === substr($block,0,2) ){ $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; } -class LocoPHPExtractor extends LocoExtractor { -private $defs = []; -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 ) { $format = ''; $offset = 0; while( preg_match('/%(?:[1-9]\\d*\\$)?(?:\'.|[-+0 ])*\\d*(?:\\.\\d+)?(.|$)/',$str,$r,PREG_OFFSET_CAPTURE,$offset) ){ $type = $r[1][0]; list($match,$offset) = $r[0]; if( '%' === $type && '%%' !== $match ){ return ''; } if( '' === $type || ! preg_match('/^[bcdeEfFgGosuxX%]/',$type) ){ return ''; } $offset += strlen($match); if( preg_match('/^% +[a-z]/i',$match) || preg_match('/^%[b-ou-x]/i',$match) ){ continue; } $format = 'php'; } return $format; } -protected function comment( $comment ) { return preg_replace('/^translators:\\s+/mi', '', loco_parse_php_comment($comment) ); } -public function define( $name, $value ) { $this->defs[$name] = $value; return $this; } -public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ) { $tokens->ignore( [T_WHITESPACE] ); $n = 0; $depth = 0; $comment = ''; $narg = 0; $args = []; $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 ){ $s = self::utf8($s); $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; $s = self::utf8($s); 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 => $text ){ $ref = $fileref ? $fileref.':'.$tok[2]: ''; $meta = $tags[$tag]; if( is_string($meta) ){ $meta = ['notes'=>$meta]; trigger_error( $tag.' header defaulted to "notes"',E_USER_DEPRECATED); } $strings->pushEntry( ['source'=>$text,'refs'=>$ref] + $meta, (string) $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 = []; $narg = 0; } else if( '' !== $comment && ! preg_match('!^[/* ]+(translators|xgettext):!im',$comment) ){ $comment = ''; } } } } -class LocoJsExtractor extends LocoPHPExtractor { -public function tokenize( $src ) { return new LocoJsTokens($src); } -public function fsniff( $str ) { return parent::fsniff($str) ? 'javascript' : ''; } -public function decapse( $raw ) { return LocoJsTokens::decapse($raw); } } -class LocoTwigExtractor extends LocoPHPExtractor { -public function tokenize( $src ) { $src = 'setBase( rtrim(ABSPATH,'/').'/wp-includes' ); } } -public function setBase( $path ) { $this->base = $path; } -private function getType( $type ) { if( array_key_exists($type,self::$types) ){ return self::$types[$type]; } $path = $this->base.'/'.$type.'-i18n.json'; if ( ! file_exists($path) ) { throw new Exception( basename($path).' not found in '.$this->base ); } return json_decode( file_get_contents($path) ); } -public function tokenize( $src ) { $raw = json_decode($src,true); if( ! is_array($raw) || ! array_key_exists('$schema',$raw) ){ throw new InvalidArgumentException('Invalid JSON'); } if( ! preg_match('!^https?://schemas.wp.org/trunk/(block|theme)\\.json!', $raw['$schema'], $r ) ){ throw new InvalidArgumentException('Unsupported schema'); } if( '' === $this->domain && array_key_exists('textdomain',$raw) ){ $this->domain = $raw['textdomain']; } return new LocoWpJsonStrings( $raw, $this->getType($r[1]) ); } -public function setDomain( $default ) { $this->domain = $default; return $this; } -public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ) { if( ! preg_match('/:\\d+$/',$fileref) ){ $fileref.=':1'; } $tokens->rewind(); while( $tok = $tokens->advance() ){ $tok['refs'] = $fileref; $strings->pushEntry( $tok, $this->domain ); } } } -class LocoWpJsonStrings extends ArrayIterator implements LocoTokensInterface { -public function __construct( array $raw, stdClass $tpl ){ parent::__construct([]); $this->walk( $tpl, $raw ); } -public function advance() { $tok = $this->current(); $this->next(); return $tok; } -public function ignore(array $a) { return $this; } -private function walk( $tpl, $raw ) { if( is_string($tpl) && is_string($raw) ) { $this->offsetSet( null, [ 'context' => $tpl, 'source' => $raw, ] ); return; } if( is_array($tpl) && is_array($raw) ) { foreach ( $raw as $value ) { self::walk( $tpl[0], $value ); } } else if( is_object($tpl) && is_array($raw) ) { $group_key = '*'; foreach ( $raw as $key => $value ) { if ( isset($tpl->$key) ) { $this->walk( $tpl->$key, $value ); } else if ( isset($tpl->$group_key) ) { $this->walk( $tpl->$group_key, $value ); } } } } } -function loco_wp_extractor( $type = 'php' ) { if( 'json' === $type ){ return new LocoWpJsonExtractor; } static $rules = [ '__' => 'sd', '_e' => 'sd', '_c' => 'sd', '_n' => 'sp_d', '_n_noop' => 'spd', '_nc' => 'sp_d', '__ngettext' => 'spd', '__ngettext_noop' => 'spd', '_x' => 'scd', '_ex' => 'scd', '_nx' => 'sp_cd', '_nx_noop' => 'spcd', 'esc_attr__' => 'sd', 'esc_html__' => 'sd', 'esc_attr_e' => 'sd', 'esc_html_e' => 'sd', 'esc_attr_x' => 'scd', 'esc_html_x' => 'scd', ]; if( 'php' === $type ){ $extr = new LocoPHPExtractor($rules); } else if( 'twig' === $type ){ $extr = new LocoTwigExtractor($rules); } else if( 'js' === $type ){ $extr = new LocoJsExtractor($rules); } else { throw new InvalidArgumentException('No string extractor for '.$type); } return $extr; } -function loco_string_percent( $n, $t ) { if( ! $t || ! $n ){ return '0'; } if( $t === $n ){ return '100'; } $dp = 0; $n = 100 * $n / $t; if( $n > 99 ){ return number_format( min( $n, 99.9 ), ++$dp ); } if( $n < 0.5 ){ $n = max( $n, 0.0001 ); do { $s = number_format( $n, ++$dp ); } while( preg_match('/^0\\.0+$/',$s) && $dp < 4 ); return substr($s,1); } return number_format( $n, $dp ); } -function loco_print_progress( $translated, $untranslated, $flagged ) { $total = $translated + $untranslated; $complete = loco_string_percent( $translated - $flagged, $total ); $class = 'progress'; if( ! $translated && ! $flagged ){ $class .= ' empty'; } else if( '100' === $complete ){ $class .= ' done'; } echo '
'; if( $flagged ){ $s = loco_string_percent( $flagged, $total ); echo '
 
'; } if( '0' === $complete ){ echo ' '; } else { $class = 'bar p'; $p = (int) $complete; $class .= sprintf(' p-%u', 10*floor($p/10) ); $style = 'width:'.$complete.'%'; if( $flagged ){ $remain = 100.0 - (float) $s; $style .= '; max-width: '.sprintf('%s',$remain).'%'; } echo '
 
'; } echo '
',$complete,'%
'; } -class LocoFuzzyMatcher implements Countable { -private $pot = []; -private $po = []; -private $diff = []; -private $dmax = .20; -#[ReturnTypeWillChange] -public function count() { return count($this->pot); } -public function unmatched() { return array_values($this->pot); } -public function redundant() { return array_values($this->po); } -public function setFuzziness( $s ) { if( $this->po ){ throw new LogicException('Cannot setFuzziness() after calling match()'); } $this->dmax = (float) max( 0, min( (int) $s, 100 ) ) / 100; } -public function add( $a ) { $source = isset($a['source']) ? (string) $a['source'] : ''; $context = isset($a['context']) ? (string) $a['context'] : ''; $key = $source."\4".$context; $this->pot[$key] = $a; } -private function key( $a ) { $source = isset($a['source']) ? (string) $a['source'] : ''; $context = isset($a['context']) ? (string) $a['context'] : ''; return $source."\4".$context; } -protected function getRef( $a ) { $key = $this->key($a); return array_key_exists($key,$this->pot) ? $this->pot[$key] : null; } -public function match( $a ) { $old = $this->key($a); if( isset($this->pot[$old]) ){ $new = $this->pot[$old]; unset($this->pot[$old]); return $new; } $this->po[$old] = $a; $target = isset($a['target']) ? (string) $a['target'] : ''; $comment = isset($a['comment']) ? (string) $a['comment'] : ''; if( '' === $target && '' === $comment ){ return null; } if( 0 < $this->dmax ){ foreach( $this->pot as $new => $_ ){ $dist = $this->distance($old,$new); if( -1 !== $dist ){ $this->diff[] = [ $old, $new, $dist ]; } } } return null; } -private function distance( $a, $b ) { $a = strtolower($a); $b = strtolower($b); if( $a === $b ){ return 0; } $lenA = strlen($a); $lenB = strlen($b); $lenDiff = abs($lenA-$lenB); $max = min($lenA,$lenB) + $lenDiff; $max = (int) ceil( $this->dmax * $max ); if( $max < $lenDiff ) { return -1; } $len = max($lenA,$lenB); if( $len < 256 ){ $d = levenshtein($a,$b); return $d > $max ? -1 : $d; } $d = 0; for( $i = 0; $i < $len; $i+=$max ){ $aa = substr($a,$i,$max); $bb = substr($b,$i,$max); $d += levenshtein($aa,$bb); if( $d > $max ){ return -1; } } return $d; } -public function getFuzzyMatches() { $pairs = []; usort( $this->diff, [__CLASS__,'compareDistance'] ); foreach( $this->diff as $pair ){ list($old,$new) = $pair; if( ! array_key_exists($new,$this->pot) || ! array_key_exists($old,$this->po) ){ continue; } $pairs[] = [ $this->po[$old], $this->pot[$new], ]; unset($this->po[$old]); unset($this->pot[$new]); if( ! $this->po || ! $this->pot ){ break; } } $this->diff = []; return $pairs; } -private static function compareDistance( array $a, array $b ) { return $a[2] - $b[2]; } } -defined('T_FINALLY') || define('T_FINALLY',500); if( function_exists('loco_check_extension') ) { loco_check_extension('mbstring'); } \ No newline at end of file +interface LocoArrayInterface extends ArrayAccess, Iterator, Countable, JsonSerializable { + public function getArrayCopy(); +} + +class LocoHeaders extends ArrayIterator implements LocoArrayInterface { + private $map = []; + + public function __construct( array $raw = [] ) { + if ( $raw ) { + $keys = array_keys( $raw ); + $this->map = array_combine( array_map( 'strtolower', $keys ), $keys ); + parent::__construct( $raw ); + } + } + + public function normalize( $k ) { + $k = strtolower( $k ); + + return array_key_exists( $k, $this->map ) ? $this->map[ $k ] : null; + } + + public function add( $key, $val ) { + $this->offsetSet( $key, $val ); + + return $this; + } + + public function __toString() { + $pairs = []; + 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 ) { + return array_key_exists( strtolower( $key ), $this->map ); + } + + public function __get( $key ) { + return $this->offsetGet( $key ); + } + + public function __set( $key, $val ) { + $this->offsetSet( $key, $val ); + } + + #[ReturnTypeWillChange] + public function offsetExists( $key ) { + return $this->has( $key ); + } + + #[ReturnTypeWillChange] + public function offsetGet( $key ) { + $k = $this->normalize( $key ); + if ( is_null( $k ) ) { + return ''; + } + + return parent::offsetGet( $k ); + } + + #[ReturnTypeWillChange] + public function offsetSet( $key, $value ) { + $k = strtolower( $key ); + if ( isset( $this->map[ $k ] ) && $key !== $this->map[ $k ] ) { + parent::offsetUnset( $this->map[ $k ] ); + } + $this->map[ $k ] = $key; + parent::offsetSet( $key, $value ); + } + + #[ReturnTypeWillChange] + public function offsetUnset( $key ) { + $k = strtolower( $key ); + if ( isset( $this->map[ $k ] ) ) { + parent::offsetUnset( $this->map[ $k ] ); + unset( $this->map[ $k ] ); + } + } + + #[ReturnTypeWillChange] + public function jsonSerialize() { + return $this->getArrayCopy(); + } +} + +function loco_normalize_charset( $cs ) { + if ( preg_match( '/^UTF-?8$/i', $cs ) ) { + return 'UTF-8'; + } + try { + $aliases = @mb_encoding_aliases( $cs ); + } catch ( ValueError $e ) { + $aliases = false; + } + if ( false === $aliases ) { + throw new InvalidArgumentException( 'Unsupported character encoding: ' . $cs ); + } + if ( 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; +} + +class LocoPoHeaders extends LocoHeaders { + private $cs = null; + + 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 ) { + } catch ( Exception $e ) { + trigger_error( $e->getMessage(), E_USER_NOTICE ); + } + } + $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, [ 'UTF-8', $cs ], true ) ) { + foreach ( $headers as $key => $val ) { + $headers[ $key ] = mb_convert_encoding( $val, 'UTF-8', [ $cs ] ); + } + } + + return $headers; + } + + public static function fromSource( $raw ) { + $po = new LocoPoParser( $raw ); + $po->parse( 0 ); + + return $po->getHeader(); + } +} + +function loco_convert_utf8( $str, $enc, $strict ) { + if ( '' === $enc || 'UTF-8' === $enc || 'US-ASCII' === $enc ) { + if ( false === preg_match( '//u', $str ) ) { + if ( $strict ) { + $e = new Loco_error_ParseException( $enc ? 'Invalid ' . $enc . ' encoding' : 'Unknown character encoding' ); + if ( preg_match( '/^(?:[\\x00-\\x7F]|[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xFF][\\x80-\\xBF]{3})*/', $str, $r ) && $str !== $r[0] ) { + $e->setOffsetContext( strlen( $r[0] ), $str ); + } + throw $e; + } + $str = loco_fix_utf8( $str ); + } + } 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; +} + +function loco_fix_utf8( $str ) { + $fix = ''; + while ( is_string( $str ) && '' !== $str ) { + if ( preg_match( '/^(?:[\\x00-\\x7F]|[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xFF][\\x80-\\xBF]{3})+/', $str, $r ) ) { + $fix .= $r[0]; + $str = substr( $str, strlen( $r[0] ) ); + } else { + $fix .= mb_convert_encoding( $str[0], 'UTF-8', 'cp1252' ); + $str = substr( $str, 1 ); + } + } + + return loco_convert_utf8( $fix, '', true ); +} + +abstract class LocoGettextParser { + private $head = null; + private $cs = ''; + + abstract public function parse( $limit = - 1 ); + + protected function setHeader( LocoPoHeaders $head ) { + $this->head = $head; + $cs = $head->getCharset(); + if ( '' !== $cs ) { + if ( '' === $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 ) { + $str = loco_convert_utf8( $str, $this->cs, false ); + } + + return $str; + } + + protected function initMsgKey( $key ) { + $r = explode( "\4", $key ); + $value = [ 'source' => array_pop( $r ), 'target' => '', ]; + if ( isset( $r[0] ) ) { + $value['context'] = $r[0]; + } + + return $value; + } +} + +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; +} + +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 ); +} + +class LocoPoParser extends LocoGettextParser implements Iterator { + private $lines = []; + 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', $cs ); + $cs = 'UTF-8'; + } + if ( 'UTF-8' === $cs ) { + $this->setCharset( 'UTF-8' ); + } + $this->lines = preg_split( '/(\\r\\n?|\\n)/', $src ); + } + } + + #[ReturnTypeWillChange] + public function rewind() { + $this->i = - 1; + $this->k = - 1; + $this->next(); + } + + #[ReturnTypeWillChange] + public function valid() { + return is_int( $this->i ); + } + + #[ReturnTypeWillChange] + public function key() { + return $this->k; + } + + #[ReturnTypeWillChange] + public function current() { + return $this->m; + } + + #[ReturnTypeWillChange] + public function next() { + $valid = false; + $entry = [ '#' => [], 'id' => [ null ], 'str' => [ 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' ); + } + $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] ) ); + } + if ( 0 === $limit ) { + return []; + } + $i = - 1; + $assets = []; + $lk = $head['X-Loco-Lookup']; + while ( $this->valid() ) { + $entry = $this->current(); + $msgid = $entry['id'][0]; + if ( is_null( $msgid ) ) { + $this->next(); + continue; + } + if ( ++ $i === $limit ) { + return $assets; + } + $asset = [ + '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 && 'text' !== $lk ) { + $asset[ $lk ] = $asset['source']; + $asset['source'] = $msgid; + } else if ( substr( $msgid, 0, 5 ) === 'loco:' ) { + $asset['_id'] = substr( $msgid, 5 ); + } else { + $asset['prev'] = $prev_entry; + $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 = [ + '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 ( is_array( $prev_entry ) && isset( $prev_entry[1] ) ) { + if ( $lk && 'text' !== $lk ) { + $plural[ $lk ] = $plural['source']; + $plural['source'] = $prev_entry[1]['source']; + } + } + } + if ( isset( $asset['flag'] ) ) { + $plural['flag'] = $asset['flag']; + } + $assets[] = $plural; + } + } + $this->next(); + } + 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; + } +} + +class LocoMoParser extends LocoGettextParser { + private $bin; + private $be = null; + private $n = null; + private $o = null; + private $t = null; + private $v = null; + + 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 = []; + $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 && - 1 !== $limit ) { + break; + } + $r[ $i ] = [ + '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 ( $n = 1; $n < $nforms; $n ++ ) { + $r[ ++ $i ] = [ + 'source' => isset( $sources[ $n ] ) ? $this->str( $sources[ $n ] ) : sprintf( '%s (plural %u)', $r[ $p ]['source'], $n ), + 'target' => isset( $targets[ $n ] ) ? $this->str( $targets[ $n ] ) : '', + 'parent' => $p, + 'plural' => $n, + ]; + } + } + $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; + } + + #[ReturnTypeWillChange] + 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]; + } +} + +class LocoJedParser extends LocoGettextParser { + private $ld; + + public function __construct( array $struct ) { + $this->ld = $struct; + } + + public function parse( $limit = - 1 ) { + $values = []; + foreach ( $this->ld as $messages ) { + $msgid = key( $messages ); + if ( '' === $msgid ) { + $this->setHeader( new LocoJedHeaders( $messages[''] ) ); + unset( $messages[''] ); + } else { + $this->setHeader( new LocoJedHeaders ); + } + $values[] = [ 'source' => '', 'target' => $this->getHeader(), ]; + $i = - 1; + foreach ( $messages as $key => $list ) { + if ( ++ $i === $limit ) { + break; + } + $value = $this->initMsgKey( $key ); + $index = count( $values ); + foreach ( $list as $j => $msgstr ) { + if ( ! is_string( $msgstr ) ) { + throw new Loco_error_ParseException( 'msgstr must be scalar' ); + } + $value['target'] = $msgstr; + if ( 0 < $j ) { + $value['plural'] = $j; + $value['parent'] = $index; + $value['source'] = ''; + } + $values[] = $value; + } + } + } + + return $values; + } +} + +class LocoJedHeaders extends LocoPoHeaders { + public function __construct( array $raw = [] ) { + foreach ( [ 'Language' => 'lang', 'plural_forms' => 'Plural-Forms' ] as $canonical => $alias ) { + if ( array_key_exists( $alias, $raw ) && ! array_key_exists( $canonical, $raw ) ) { + $raw[ $canonical ] = $raw[ $alias ]; + } + } + parent::__construct( $raw ); + } +} + +class LocoMoPhpParser extends LocoGettextParser { + private $msgs; + + public function __construct( array $struct ) { + $this->msgs = $struct['messages']; + unset( $struct['messages'] ); + $this->setHeader( new LocoPoHeaders( $struct ) ); + } + + public function parse( $limit = - 1 ) { + $values = [ [ 'source' => '', 'target' => $this->getHeader(), ] ]; + $i = - 1; + foreach ( $this->msgs as $key => $bin ) { + if ( ++ $i === $limit ) { + break; + } + $value = $this->initMsgKey( $key ); + $index = count( $values ); + foreach ( explode( "\0", $bin ) as $i => $msgstr ) { + $value['target'] = $msgstr; + if ( 0 < $i ) { + $value['plural'] = $i; + $value['parent'] = $index; + $value['source'] = ''; + } + $values[] = $value; + } + } + + return $values; + } +} + +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/', [ __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 = [ $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 . '#: ' ); + } + + return '#: ' . $text; + } + + public static function prefix( $text, $prefix, $eol = "\n" ) { + return $prefix . implode( $eol . $prefix, self::split( $text ) ); + } + + public static function split( $text ) { + $lines = preg_split( '/\\R/u', $text ); + if ( false === $lines ) { + if ( false === preg_match( '//u', $text ) ) { + $text = mb_convert_encoding( $text, 'UTF-8', 'cp1252' ); + } + $lines = preg_split( '/\\r?\\n+/', $text ); + } + + return $lines; + } + + public static function trim( $text ) { + $lines = []; + $deferred = null; + foreach ( explode( "\n", $text ) as $line ) { + if ( '' === $line ) { + continue; + } + if ( preg_match( '/^msg[a-z]+(?:\\[\\d+])? ""/', $line ) ) { + $deferred = $line; + continue; + } + if ( $deferred && '"' === $line[0] ) { + $lines[] = $deferred; + $deferred = null; + } + $lines[] = $line; + } + + return implode( "\n", $lines ); + } +} + +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; + } +} + +class LocoPoMessage extends ArrayObject { + public function __construct( array $r ) { + $r['key'] = $r['source']; + parent::__construct( $r ); + } + + public function __get( $prop ) { + return $this->offsetExists( $prop ) ? $this->offsetGet( $prop ) : null; + } + + public function isFuzzy() { + return 4 === $this->__get( 'flag' ); + } + + public function getFormat() { + $f = $this->__get( 'format' ); + if ( is_string( $f ) && '' !== $f ) { + return $f; + } + + return ''; + } + + private function getPoFlags() { + $flags = []; + foreach ( array_merge( [ $this ], $this->__get( 'plurals' ) ?: [] ) as $form ) { + if ( $form->isFuzzy() ) { + $flags[0] = 'fuzzy'; + } + $f = $form->getFormat(); + if ( '' !== $f ) { + $flags[1] = $f . '-format'; + } + } + + return array_values( $flags ); + } + + public function getHash() { + $hash = $this->getKey(); + if ( $this->offsetExists( 'plurals' ) ) { + foreach ( $this->offsetGet( '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 exportSerial( $f = 'target' ) { + $a = [ $this[ $f ] ]; + if ( $this->offsetExists( 'plurals' ) ) { + $plurals = $this->offsetGet( 'plurals' ); + if ( is_array( $plurals ) ) { + foreach ( $plurals as $p ) { + $a[] = $p[ $f ]; + } + } + } + + return $a; + } + + public function __toString() { + return $this->render( 79, 76 ); + } + + public function render( $width, $ref_width, $max_forms = 0 ) { + $s = []; + try { + if ( $text = $this->__get( 'comment' ) ) { + $s[] = LocoPo::prefix( $text, '# ' ); + } + if ( $text = $this->__get( 'notes' ) ) { + $s[] = LocoPo::prefix( $text, '#. ' ); + } + if ( $text = $this->__get( 'refs' ) ) { + $s[] = LocoPo::refs( $text, $ref_width ); + } + if ( $texts = $this->getPoFlags() ) { + $s[] = '#, ' . implode( ', ', $texts ); + } + $prev = $this->__get( 'prev' ); + if ( is_array( $prev ) && $prev ) { + foreach ( new LocoPoIterator( $prev ) as $p ) { + $text = $p->render( max( 0, $width - 3 ), 0 ); + $s[] = LocoPo::prefix( LocoPo::trim( $text ), '#| ' ); + break; + } + } + $text = $this->__get( 'context' ); + if ( is_string( $text ) && '' !== $text ) { + $s[] = LocoPo::pair( 'msgctxt', $text, $width ); + } + $s[] = LocoPo::pair( 'msgid', $this['source'], $width ); + $target = $this['target']; + $plurals = $this->__get( 'plurals' ); + if ( is_array( $plurals ) ) { + if ( array_key_exists( 0, $plurals ) ) { + $p = $plurals[0]; + $s[] = LocoPo::pair( 'msgid_plural', $p['source'], $width ); + $s[] = LocoPo::pair( 'msgstr[0]', $target, $width ); + $i = 0; + while ( array_key_exists( $i, $plurals ) ) { + $p = $plurals[ $i ]; + if ( ++ $i === $max_forms ) { + break; + } + $s[] = LocoPo::pair( 'msgstr[' . $i . ']', $p['target'], $width ); + } + } else if ( isset( $this['plural_key'] ) ) { + $s[] = LocoPo::pair( 'msgid_plural', $this['plural_key'], $width ); + $s[] = LocoPo::pair( 'msgstr[0]', $target, $width ); + } else { + trigger_error( 'Missing plural_key in zero plural export' ); + $s[] = LocoPo::pair( 'msgstr', $target, $width ); + } + } else { + $s[] = LocoPo::pair( 'msgstr', $target, $width ); + } + } catch ( Exception $e ) { + trigger_error( $e->getMessage(), E_USER_WARNING ); + } + + return implode( "\n", $s ) . "\n"; + } + + public function merge( LocoPoMessage $def, $translate = false ) { + if ( $def->getHash() !== $this->getHash() ) { + $prev = [ 'source' => '', 'target' => '' ]; + $prev = $this->diff( 'source', $def, $prev ); + $prev = $this->diff( 'context', $def, $prev ); + $this['flag'] = 4; + $this['prev'] = [ $prev ]; + $defPlural = $def->getPlural( 0 ); + $ourPlural = $this->getPlural( 0 ); + if ( $defPlural && $ourPlural ) { + $ourPlural->merge( $defPlural ); + if ( $ourPlural->offsetExists( 'prev' ) ) { + $this['prev'][] = $ourPlural->prev[0] + [ 'parent' => 0, 'plural' => 1 ]; + $ourPlural->offsetUnset( 'prev' ); + } + } else if ( $defPlural ) { + $this['plurals'] = [ clone $defPlural ]; + } else if ( $ourPlural ) { + $this['prev'][] = $ourPlural->exportBasic() + [ 'parent' => 0, 'plural' => 1 ]; + $this->offsetUnset( 'plurals' ); + } + } + foreach ( [ 'notes', 'refs', 'format' ] as $f ) { + if ( $def->offsetExists( $f ) ) { + $this->offsetSet( $f, $def->offsetGet( $f ) ); + } else if ( $this->offsetExists( $f ) ) { + $this->offsetUnset( $f ); + } + } + if ( $translate && '' === $this['target'] && '' !== $def['target'] ) { + $this['target'] = $def['target']; + if ( $def->offsetExists( 'comment' ) ) { + $this['comment'] = $def['comment']; + } + if ( $this->offsetExists( 'plurals' ) ) { + foreach ( $this['plurals'] as $i => $ourPlural ) { + if ( '' === $ourPlural['target'] ) { + $defPlural = $def->getPlural( $i ); + if ( $defPlural ) { + $ourPlural['target'] = $defPlural['target']; + } + } + } + } + } + } + + private function diff( $key, LocoPoMessage $def, array $prev ) { + $old = $this->__get( $key ); + $new = $def->__get( $key ); + if ( $new !== $old ) { + $this->offsetSet( $key, $new ); + if ( is_string( $old ) && '' !== $old ) { + $prev[ $key ] = $old; + } + } + + return $prev; + } + + private function getPlural( $i ) { + if ( $this->offsetExists( 'plurals' ) ) { + $plurals = $this->offsetGet( 'plurals' ); + if ( is_array( $plurals ) && array_key_exists( $i, $plurals ) ) { + return $plurals[ $i ]; + } + } + + return null; + } + + private function exportBasic() { + return [ 'source' => $this['source'], 'context' => $this->context, 'target' => '', ]; + } + + public function export() { + $a = $this->getArrayCopy(); + unset( $a['key'] ); + if ( array_key_exists( 'plurals', $a ) ) { + foreach ( $a['plurals'] as $i => $p ) { + if ( $p instanceof ArrayObject ) { + $a['plurals'][ $i ] = $p->getArrayCopy(); + } + } + } + + return $a; + } + + public function strip() { + $this['target'] = ''; + $plurals = $this->plurals; + if ( is_array( $plurals ) ) { + foreach ( $plurals as $p ) { + $p->strip(); + } + } + + return $this; + } + + public function translated() { + $n = 0; + if ( '' !== (string) $this['target'] ) { + $n ++; + } + if ( $this->offsetExists( 'plurals' ) ) { + foreach ( $this->offsetGet( 'plurals' ) as $plural ) { + if ( '' !== (string) $plural['target'] ) { + $n ++; + } + } + } + + return $n; + } +} + +class LocoPoIterator implements Iterator, Countable { + private $po; + private $headers = null; + private $i; + private $t; + private $j; + private $z = 0; + private $w = 79; + + public function __construct( $po ) { + if ( is_array( $po ) ) { + $this->po = $po; + } else if ( $po instanceof Traversable ) { + $this->po = iterator_to_array( $po, false ); + } else { + throw new InvalidArgumentException( 'PO data must be array or iterator' ); + } + $this->t = count( $this->po ); + if ( 0 === $this->t ) { + throw new InvalidArgumentException( 'Empty PO data' ); + } + $h = $po[0]; + if ( '' !== $h['source'] || ( isset( $h['context'] ) && '' !== $h['context'] ) || ( isset( $po[1]['parent'] ) && 0 === $po[1]['parent'] ) ) { + $this->z = - 1; + } + } + + public function push( LocoPoMessage $p ) { + $raw = $p->export(); + $plurals = $p->plurals; + unset( $raw['plurals'] ); + $i = count( $this->po ); + $this->po[ $i ] = $raw; + $this->t ++; + if ( is_array( $plurals ) ) { + $j = 0; + foreach ( $plurals as $p ) { + $raw = $p->export(); + $raw['parent'] = $i; + $raw['plural'] = ++ $j; + $this->po[] = $raw; + $this->t ++; + } + } + } + + public function concat( LocoPoIterator $more ) { + foreach ( $more as $message ) { + $this->push( $message ); + } + + return $this; + } + + public function __clone() { + if ( $this->headers ) { + $this->headers = new LocoPoHeaders( $this->headers->getArrayCopy() ); + } + } + + #[ReturnTypeWillChange] + public function count() { + return $this->t - ( $this->z + 1 ); + } + + public function wrap( $width ) { + if ( $width > 0 ) { + $this->w = max( 15, $width ); + } else { + $this->w = 0; + } + + return $this; + } + + #[ReturnTypeWillChange] + public function rewind() { + $this->i = $this->z; + $this->j = - 1; + $this->next(); + } + + #[ReturnTypeWillChange] + public function key() { + return $this->j; + } + + #[ReturnTypeWillChange] + public function valid() { + return is_int( $this->i ); + } + + #[ReturnTypeWillChange] + public function next() { + $i = $this->i; + while ( ++ $i < $this->t ) { + if ( array_key_exists( 'parent', $this->po[ $i ] ) ) { + continue; + } + $this->j ++; + $this->i = $i; + + return; + } + $this->i = null; + $this->j = null; + } + + #[ReturnTypeWillChange] + public function current() { + return $this->item( $this->i ); + } + + private function item( $i ) { + $po = $this->po; + $parent = new LocoPoMessage( $po[ $i ] ); + $plurals = []; + $nonseq = $parent->offsetExists( 'child' ); + $j = $nonseq ? $parent['child'] : $i + 1; + while ( isset( $po[ $j ]['parent'] ) && $i === $po[ $j ]['parent'] ) { + $plurals[] = new LocoPoMessage( $po[ $j ++ ] ); + } + if ( $plurals ) { + $parent['plurals'] = $plurals; + } + + return $parent; + } + + public function exportEntry( $i ) { + return $this->item( $i + ( 1 - $this->z ) ); + } + + public function getArrayCopy() { + $po = $this->po; + if ( 0 === $this->z ) { + $po[0]['target'] = (string) $this->getHeaders(); + } + + return $po; + } + + public function clear() { + if ( 0 === $this->z ) { + $this->po = [ $this->po[0] ]; + $this->t = 1; + } else { + $this->po = []; + $this->t = 0; + } + } + + public function getHeaders() { + if ( is_null( $this->headers ) ) { + $header = $this->po[0]; + if ( 0 === $this->z ) { + $value = $header['target']; + if ( is_string( $value ) ) { + $this->headers = LocoPoHeaders::fromMsgstr( $value ); + } else if ( $value instanceof LocoPoHeaders ) { + $this->headers = $value; + } else if ( is_array( $value ) ) { + $this->headers = new LocoPoHeaders( $value ); + } + } else { + $this->headers = new LocoPoHeaders; + } + } + + return $this->headers; + } + + public function setHeaders( LocoPoHeaders $head ) { + $this->headers = $head; + if ( 0 === $this->z ) { + $this->po[0]['target'] = null; + } + + return $this; + } + + 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( callable $sorter = null ) { + $width = $this->w; + $ref_width = max( 0, $width - 3 ); + $h = $this->exportHeader(); + $msg = new LocoPoMessage( $h ); + $s = $msg->render( $width, $ref_width ); + if ( $sorter ) { + $msgs = []; + foreach ( $this as $msg ) { + $msgs[] = $msg; + } + usort( $msgs, $sorter ); + } else { + $msgs = $this; + } + $h = $this->getHeaders()->offsetGet( 'Plural-Forms' ); + if ( is_string( $h ) && preg_match( '/nplurals\\s*=\\s*(\\d)/', $h, $r ) ) { + $max_pl = (int) $r[1]; + } else { + $max_pl = 0; + } + foreach ( $msgs as $msg ) { + $s .= "\n" . $msg->render( $width, $ref_width, $max_pl ); + } + + return $s; + } + + public function exportJed() { + $head = $this->getHeaders(); + $a = [ + '' => [ + 'domain' => $head['domain'], + 'lang' => $head['language'], + 'plural-forms' => $head['plural-forms'], + ] + ]; + foreach ( $this as $message ) { + if ( $message->translated() ) { + $a[ $message->getKey() ] = $message->exportSerial(); + } + } + + return $a; + } + + private function exportHeader() { + if ( 0 === $this->z ) { + $h = $this->po[0]; + } else { + $h = [ 'source' => '', 'target' => '' ]; + } + if ( $this->headers ) { + $h['target'] = (string) $this->headers; + } + + return $h; + } + + public function exportRefs( $grep = '' ) { + $a = []; + if ( '' === $grep ) { + $grep = '/(\\S+):\\d+/'; + } else { + $grep = '/(\\S*' . $grep . '):\\d+/'; + } + $self = get_class( $this ); + $base = [ $this->exportHeader() ]; + foreach ( $this as $message ) { + if ( preg_match_all( $grep, (string) $message->refs, $r ) ) { + foreach ( $r[1] as $ref ) { + if ( array_key_exists( $ref, $a ) ) { + $po = $a[ $ref ]; + } else { + $po = new $self( $base ); + $a[ $ref ] = $po; + } + $po->push( $message ); + } + } + } + + return $a; + } + + public function splitRefs( array $map = null ) { + $a = []; + $self = get_class( $this ); + $base = [ $this->exportHeader() ]; + if ( is_array( $map ) ) { + $grep = implode( '|', array_keys( $map ) ); + } else { + $grep = '[a-z]+'; + } + foreach ( $this as $message ) { + $refs = ltrim( (string) $message->refs ); + if ( '' !== $refs ) { + if ( preg_match_all( '/\\S+\\.(' . $grep . '):\\d+/', $refs, $r, PREG_SET_ORDER ) ) { + $tmp = []; + foreach ( $r as $rr ) { + list( $ref, $ext ) = $rr; + $tmp[ $ext ][ $ref ] = true; + } + foreach ( $tmp as $ext => $refs ) { + if ( is_array( $map ) ) { + $ext = $map[ $ext ]; + } + if ( array_key_exists( $ext, $a ) ) { + $po = $a[ $ext ]; + } else { + $po = new $self( $base ); + $a[ $ext ] = $po; + } + $message = clone $message; + $message['refs'] = implode( ' ', array_keys( $refs ) ); + $po->push( $message ); + } + } + } + } + + return $a; + } + + public function getHashes() { + $a = []; + 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 equal( LocoPoIterator $that ) { + if ( $this->t !== $that->t ) { + return false; + } + $i = $this->z; + $fields = [ 'source', 'context', 'notes', 'refs', 'target', 'comment', 'flag', 'parent', 'plural' ]; + while ( ++ $i < $this->t ) { + $a = $this->po[ $i ]; + $b = $that->po[ $i ]; + foreach ( $fields as $f ) { + $af = isset( $a[ $f ] ) ? $a[ $f ] : ''; + $bf = isset( $b[ $f ] ) ? $b[ $f ] : ''; + if ( $af !== $bf ) { + return false; + } + } + } + + return true; + } + + public function sort( callable $func = null ) { + $order = []; + foreach ( $this as $msg ) { + $order[] = $msg; + } + usort( $order, $func ?: [ __CLASS__, 'compare' ] ); + $this->clear(); + foreach ( $order as $p ) { + $this->push( $p ); + } + + 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 = []; + foreach ( $this as $i => $msg ) { + $index[ $msg->getHash() ] = $i; + } + $obj = new LocoPoIndex( $index ); + + return [ $obj, 'compare' ]; + } +} + +class LocoMoTable { + private $size = 0; + private $bin = ''; + private $map = null; + + public function __construct( $data = '' ) { + if ( is_array( $data ) ) { + $this->compile( $data ); + } else if ( '' !== $data ) { + $this->parse( $data ); + } + } + + #[ReturnTypeWillChange] + public function count() { + if ( is_null( $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_null( $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 = ''; + $this->map = []; + + 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 ); + } + $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; + } + + private function parse( $bin ) { + $this->bin = $bin; + $this->size = null; + $hash_tab_size = $this->count(); + $this->map = []; + $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; + } + } + + 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 = (int) floor( $seed ); + $seed |= 1; + while ( ! self::is_prime( $seed ) ) { + $seed += 2; + } + + return $seed; + } + + private static function is_prime( $num ) { + if ( 1 === $num ) { + return false; + } + if ( 2 === $num ) { + 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; + } +} + +class LocoMo { + private $bin; + private $msgs; + private $head; + private $hash = null; + private $use_fuzzy = false; + private $cs = null; + + public function __construct( Iterator $export, LocoPoHeaders $head = null ) { + if ( $head ) { + $this->head = $head; + } else { + $this->head = new LocoPoHeaders; + $this->setHeader( '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() { + $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 ) { + if ( $cs = $this->cs ) { + $s = mb_convert_encoding( $s, $cs, [ 'UTF-8' ] ); + } + + return $s; + } + + public function compile() { + $table = [ '' ]; + $sources = [ '' ]; + $targets = [ (string) $this->head ]; + $fuzzy_flag = 4; + $skip_fuzzy = ! $this->use_fuzzy; + if ( $this->head->has( 'Plural-Forms' ) && preg_match( '/^nplurals=(\\d)/', $this->head->trimmed( 'Plural-Forms' ), $r ) ) { + $nplurals = (int) $r[1]; + $maxplural = max( 0, $nplurals - 1 ); + } else { + $maxplural = 1; + } + 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'] ) ) { + if ( $r['plurals'] ) { + $i = 0; + foreach ( $r['plurals'] as $i => $p ) { + if ( $i === 0 ) { + $msgid .= "\0" . $this->str( $p['key'] ); + } + $msgstr .= "\0" . $this->str( $p['target'] ); + } + while ( $maxplural > ++ $i ) { + $msgstr .= "\0"; + } + } else if ( isset( $r['plural_key'] ) ) { + $msgid .= "\0" . $this->str( $r['plural_key'] ); + } + } + $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 $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 ); + } +} + +interface LocoTokensInterface extends Iterator { + public function advance(); + + public function ignore( ...$symbols ); +} + +class LocoTokenizer implements LocoTokensInterface { + const T_LITERAL = 0; + const T_UNKNOWN = - 1; + private $src; + private $pos; + private $line; + private $col; + private $max; + private $rules = []; + private $skip = []; + private $tok; + private $len; + + public function __construct( $src = '' ) { + $this->init( $src ); + } + + public function parse( $src ) { + return iterator_to_array( $this->generate( $src ) ); + } + + public function generate( $src ) { + $this->init( $src ); + while ( $this->valid() ) { + yield $this->current(); + $this->next(); + } + } + + 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 ][] = [ $grep, $t ]; + } else { + $this->rules[''][] = [ $grep, $t ]; + } + + return $this; + } + + public function ignore( ...$symbols ) { + $this->skip += array_fill_keys( $symbols, true ); + + return $this; + } + + #[ReturnTypeWillChange] + public function current() { + return $this->tok; + } + + public function advance() { + $tok = $this->current(); + $this->next(); + + return $tok; + } + + #[ReturnTypeWillChange] + 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 ( [ $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 = [ 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 : [ $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; + } + + #[ReturnTypeWillChange] + public function key() { + return $this->len ? $this->len - 1 : null; + } + + #[ReturnTypeWillChange] + public function valid() { + return null !== $this->tok; + } + + #[ReturnTypeWillChange] + public function rewind() { + $this->len = 0; + $this->pos = 0; + $this->col = 0; + $this->line = 1; + $this->max = strlen( $this->src ) - 1; + $this->next(); + } +} + +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 ) ); +} + +function loco_resolve_surrogates( $s ) { + return preg_replace_callback( '/\\xED([\\xA0-\\xAF])([\\x80-\\xBF])\\xED([\\xB0-\\xBF])([\\x80-\\xBF])/', '_loco_resolve_surrogates', $s ); +} + +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 ); +} + +class LocoEscapeParser { + private $map; + private $grep; + + public function __construct( array $map = [] ) { + $this->map = $map; + $rules = [ '\\\\' ]; + 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 ) . ')/'; + } + + final public function unescape( $s ) { + if ( '' !== $s ) { + return $this->stripSlashes( preg_replace_callback( $this->grep, [ $this, 'unescapeMatch' ], $s ) ); + } + + return ''; + } + + final 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 ); + } +} + +class LocoJsTokens extends LocoTokenizer { + const T_KWORD = 1; + const T_REGEX = 2; + private static $lex = null; + protected static $words = [ + '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( [ 'U' => 'U', 'a' => 'a', ] ); + self::$lex = $l; + } + + return $l->unescape( $s ); + } + + public function __construct( $src = '' ) { + $this->ignore( T_WHITESPACE ); + $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', [ + $this, + 'matchWord' + ] ); + $this->define( '/^\\s+/u', T_WHITESPACE ); + $this->define( '!^//.*!', T_COMMENT ); + $this->define( '!^/\\*.*\\*/!Us', [ $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; + } +} + +interface LocoExtractorInterface { + public function setDomain( $default ); + + public function tokenize( $src ); + + public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ); + + public function extractSource( $src, $fileref ); +} + +class LocoExtracted implements Countable { + private $exp = []; + private $reg = []; + private $dom = []; + private $dflt = ''; + + public function extractSource( LocoExtractorInterface $ext, $src, $fileref = '' ) { + $ext->extract( $this, $ext->tokenize( $src ), $fileref ); + + return $this; + } + + public function export() { + return $this->exp; + } + + #[ReturnTypeWillChange] + public function count() { + return count( $this->exp ); + } + + public function getDomainCounts() { + return $this->dom; + } + + public function setDomain( $default ) { + $this->dflt = $default; + + return $this; + } + + public function getDomain() { + return $this->dflt; + } + + private function key( array $entry ) { + $key = (string) $entry['source']; + foreach ( [ 'context', 'domain' ] as $i => $prop ) { + if ( array_key_exists( $prop, $entry ) ) { + $add = (string) $entry[ $prop ]; + if ( '' !== $add ) { + $key .= ord( $i ) . $add; + } + } + } + + return $key; + } + + public function pushEntry( array $entry, $domain ) { + if ( '' === $domain || '*' === $domain ) { + $domain = $this->dflt; + } + $entry['id'] = ''; + $entry['target'] = ''; + $entry['domain'] = $domain; + $key = $this->key( $entry ); + 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 pushPlural( array $entry, $sindex ) { + $parent = $this->exp[ $sindex ]; + $domain = $parent['domain']; + $pkey = $this->key( $parent ) . "\2"; + if ( ! array_key_exists( $pkey, $this->reg ) ) { + $pindex = count( $this->exp ); + $this->reg[ $pkey ] = $pindex; + $entry += [ + 'id' => '', + 'target' => '', + 'plural' => 1, + 'parent' => $sindex, + 'domain' => $domain, + ]; + $this->exp[ $pindex ] = $entry; + if ( isset( $entry['format'] ) && ! isset( $parent['format'] ) ) { + $this->exp[ $sindex ]['format'] = $entry['format']; + } + if ( $pindex !== $sindex + $entry['plural'] ) { + $this->exp[ $sindex ]['child'] = $pindex; + } + } + } + + 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 ) { + if ( '' === $domain ) { + $domain = $this->dflt; + } + $map = []; + $newOffset = 1; + $matchAll = '*' === $domain; + $raw = [ [ '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; + } +} + +abstract class LocoExtractor implements LocoExtractorInterface { + private $rules; + private $wp = []; + private $domain = ''; + + 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( $keyword ) { + return isset( $this->rules[ $keyword ] ) ? $this->rules[ $keyword ] : ''; + } + + 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; + } + $msgid = $args[ $s ]; + if ( ! is_string( $msgid ) ) { + return null; + } + $entry = [ 'source' => $msgid, ]; + if ( is_int( $c ) && isset( $args[ $c ] ) ) { + $entry['context'] = $args[ $c ]; + } else if ( '' === $msgid ) { + return null; + } + if ( $ref ) { + $entry['refs'] = $ref; + } + if ( is_int( $d ) && array_key_exists( $d, $args ) ) { + $domain = $args[ $d ]; + if ( is_null( $domain ) ) { + $domain = ''; + } + } else if ( '' === $this->domain ) { + $domain = $strings->getDomain(); + } else { + $domain = $this->domain; + } + $format = ''; + $comment = $this->comment( $comment ); + if ( '' !== $comment ) { + if ( preg_match( '/^xgettext:\\s*([-a-z]+)-format\\s*/mi', $comment, $r, PREG_OFFSET_CAPTURE ) ) { + $format = $r[1][0]; + $entry['format'] = $format; + $comment = trim( substr_replace( $comment, '', $r[0][1], strlen( $r[0][0] ) ) ); + } + 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; + } + $msgid_plural = is_int( $p ) && isset( $args[ $p ] ) ? $args[ $p ] : ''; + if ( '' === $format ) { + $format = $this->fsniff( $msgid ); + if ( '' !== $format ) { + $entry['format'] = $format; + } else if ( '' !== $msgid_plural ) { + $format = $this->fsniff( $msgid_plural ); + if ( '' !== $format ) { + $entry['format'] = $format; + } + } + } + $index = $strings->pushEntry( $entry, $domain ); + if ( '' !== $msgid_plural ) { + $entry = [ 'source' => $msgid_plural, ]; + if ( '' !== $format ) { + $entry['format'] = $format; + } + $strings->pushPlural( $entry, $index ); + } + + return $index; + } + + protected function utf8( $str ) { + if ( false === preg_match( '//u', $str ) ) { + $str = mb_convert_encoding( $str, 'UTF-8', 'cp1252' ); + } + + return $str; + } +} + +class LocoPHPTokens implements LocoTokensInterface, Countable { + private $i = null; + private $tokens; + private $skip_tokens; + private $literal_tokens; + + public function __construct( array $tokens ) { + $this->tokens = $tokens; + $this->reset(); + } + + public function reset() { + $this->rewind(); + $this->literal_tokens = []; + $this->skip_tokens = []; + } + + public function literal( ...$symbols ) { + $this->literal_tokens += array_fill_keys( $symbols, true ); + + return $this; + } + + public function ignore( ...$symbols ) { + $this->skip_tokens += array_fill_keys( $symbols, true ); + + return $this; + } + + public function export() { + return array_values( iterator_to_array( $this ) ); + } + + public function advance() { + if ( $this->valid() ) { + $tok = $this->current(); + $this->next(); + + return $tok; + } + + return null; + } + + #[ReturnTypeWillChange] + public function rewind() { + $this->i = ( false === reset( $this->tokens ) ? null : key( $this->tokens ) ); + } + + #[ReturnTypeWillChange] + public function valid() { + while ( is_int( $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; + } + + #[ReturnTypeWillChange] + public function key() { + return $this->i; + } + + #[ReturnTypeWillChange] + public function next() { + $this->i = ( false === next( $this->tokens ) ? null : key( $this->tokens ) ); + } + + #[ReturnTypeWillChange] + public function current() { + $tok = $this->tokens[ $this->i ]; + if ( is_array( $tok ) && isset( $this->literal_tokens[ $tok[0] ] ) ) { + return $tok[1]; + } + + return $tok; + } + + public function __toString() { + $s = []; + foreach ( $this as $token ) { + $s[] = is_array( $token ) ? $token[1] : $token; + } + + return implode( '', $s ); + } + + #[ReturnTypeWillChange] + public function count() { + return count( $this->tokens ); + } +} + +class LocoPHPEscapeParser extends LocoEscapeParser { + public function __construct() { + parent::__construct( [ + '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})/', [ + $this, + 'unescapeMatch' + ], $s, - 1, $n ); + } +} + +function loco_unescape_php_string( $s ) { + static $l; + if ( is_null( $l ) ) { + $l = new LocoPHPEscapeParser; + } + + return $l->unescape( $s ); +} + +function loco_decapse_php_string( $s ) { + if ( '' === $s ) { + return ''; + } + $q = $s[0]; + if ( "'" === $q ) { + return str_replace( [ '\\' . $q, '\\\\' ], [ $q, '\\' ], substr( $s, 1, - 1 ) ); + } + if ( '"' !== $q ) { + return $s; + } + + return loco_unescape_php_string( substr( $s, 1, - 1 ) ); +} + +function loco_parse_php_comment( $comment ) { + $comment = trim( $comment, "/ \n\r\t" ); + if ( '' !== $comment && '*' === $comment[0] ) { + $lines = []; + $junk = "\r\t/ *"; + foreach ( explode( "\n", $comment ) as $line ) { + $line = trim( $line, $junk ); + if ( '' !== $line ) { + $lines[] = $line; + } + } + $comment = implode( "\n", $lines ); + } + + return $comment; +} + +function loco_parse_wp_comment( $block ) { + $header = []; + if ( '/*' === substr( $block, 0, 2 ) ) { + $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; +} + +class LocoPHPExtractor extends LocoExtractor { + private $defs = []; + + 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 ) { + $format = ''; + $offset = 0; + while ( preg_match( '/%(?:[1-9]\\d*\\$)?(?:\'.|[-+0 ])*\\d*(?:\\.\\d+)?(.|$)/', $str, $r, PREG_OFFSET_CAPTURE, $offset ) ) { + $type = $r[1][0]; + list( $match, $offset ) = $r[0]; + if ( '%' === $type && '%%' !== $match ) { + return ''; + } + if ( '' === $type || ! preg_match( '/^[bcdeEfFgGosuxX%]/', $type ) ) { + return ''; + } + $offset += strlen( $match ); + if ( preg_match( '/^% +[a-z]/i', $match ) || preg_match( '/^%[b-ou-x]/i', $match ) ) { + continue; + } + $format = 'php'; + } + + return $format; + } + + protected function comment( $comment ) { + return preg_replace( '/^translators:\\s+/mi', '', loco_parse_php_comment( $comment ) ); + } + + public function define( $name, $value ) { + $this->defs[ $name ] = $value; + + return $this; + } + + public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ) { + $tokens->ignore( T_WHITESPACE ); + $n = 0; + $depth = 0; + $comment = ''; + $narg = 0; + $args = []; + $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 ) { + $s = self::utf8( $s ); + $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; + $s = self::utf8( $s ); + 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 => $text ) { + $ref = $fileref ? $fileref . ':' . $tok[2] : ''; + $meta = $tags[ $tag ]; + if ( is_string( $meta ) ) { + $meta = [ 'notes' => $meta ]; + trigger_error( $tag . ' header defaulted to "notes"', E_USER_DEPRECATED ); + } + $strings->pushEntry( [ 'source' => $text, 'refs' => $ref ] + $meta, (string) $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 = []; + $narg = 0; + } else if ( '' !== $comment && ! preg_match( '!^[/* ]+(translators|xgettext):!im', $comment ) ) { + $comment = ''; + } + } + } +} + +class LocoJsExtractor extends LocoPHPExtractor { + public function tokenize( $src ) { + return new LocoJsTokens( $src ); + } + + public function fsniff( $str ) { + return parent::fsniff( $str ) ? 'javascript' : ''; + } + + public function decapse( $raw ) { + return LocoJsTokens::decapse( $raw ); + } +} + +class LocoTwigExtractor extends LocoPHPExtractor { + public function tokenize( $src ) { + return parent::tokenize( 'setBase( rtrim( ABSPATH, '/' ) . '/wp-includes' ); + } + } + + public function setBase( $path ) { + $this->base = $path; + } + + private function getType( $type ) { + if ( array_key_exists( $type, self::$types ) ) { + return self::$types[ $type ]; + } + $path = $this->base . '/' . $type . '-i18n.json'; + if ( ! file_exists( $path ) ) { + throw new Exception( basename( $path ) . ' not found in ' . $this->base ); + } + + return json_decode( file_get_contents( $path ) ); + } + + public function tokenize( $src ) { + $raw = json_decode( $src, true ); + if ( ! is_array( $raw ) || ! array_key_exists( '$schema', $raw ) ) { + throw new InvalidArgumentException( 'Invalid JSON' ); + } + if ( ! preg_match( '!^https?://schemas.wp.org/trunk/(block|theme)\\.json!', $raw['$schema'], $r ) ) { + throw new InvalidArgumentException( 'Unsupported schema' ); + } + if ( '' === $this->domain && array_key_exists( 'textdomain', $raw ) ) { + $this->domain = $raw['textdomain']; + } + + return new LocoWpJsonStrings( $raw, $this->getType( $r[1] ) ); + } + + public function setDomain( $default ) { + $this->domain = $default; + + return $this; + } + + public function extract( LocoExtracted $strings, LocoTokensInterface $tokens, $fileref = '' ) { + if ( ! preg_match( '/:\\d+$/', $fileref ) ) { + $fileref .= ':1'; + } + $tokens->rewind(); + while ( $tok = $tokens->advance() ) { + $tok['refs'] = $fileref; + $strings->pushEntry( $tok, $this->domain ); + } + } + + final public function extractSource( $src, $fileref ) { + $strings = new LocoExtracted; + $this->extract( $strings, $this->tokenize( $src ), $fileref ); + + return $strings; + } +} + +class LocoWpJsonStrings extends ArrayIterator implements LocoTokensInterface { + public function __construct( array $raw, stdClass $tpl ) { + parent::__construct(); + $this->walk( $tpl, $raw ); + } + + public function advance() { + $tok = $this->current(); + $this->next(); + + return $tok; + } + + public function ignore( ...$symbols ) { + return $this; + } + + private function walk( $tpl, $raw ) { + if ( is_string( $tpl ) && is_string( $raw ) ) { + $this->offsetSet( null, [ 'context' => $tpl, 'source' => $raw, ] ); + + return; + } + if ( is_array( $tpl ) && is_array( $raw ) ) { + foreach ( $raw as $value ) { + self::walk( $tpl[0], $value ); + } + } else if ( is_object( $tpl ) && is_array( $raw ) ) { + $group_key = '*'; + foreach ( $raw as $key => $value ) { + if ( isset( $tpl->$key ) ) { + $this->walk( $tpl->$key, $value ); + } else if ( isset( $tpl->$group_key ) ) { + $this->walk( $tpl->$group_key, $value ); + } + } + } + } +} + +function loco_wp_extractor( $type = 'php', $ext = '' ) { + if ( 'json' === $type ) { + return new LocoWpJsonExtractor; + } + static $rules = [ + '__' => 'sd', + '_e' => 'sd', + '_c' => 'sd', + '_n' => 'sp_d', + '_n_noop' => 'spd', + '_nc' => 'sp_d', + '__ngettext' => 'spd', + '__ngettext_noop' => 'spd', + '_x' => 'scd', + '_ex' => 'scd', + '_nx' => 'sp_cd', + '_nx_noop' => 'spcd', + 'esc_attr__' => 'sd', + 'esc_html__' => 'sd', + 'esc_attr_e' => 'sd', + 'esc_html_e' => 'sd', + 'esc_attr_x' => 'scd', + 'esc_html_x' => 'scd', + ]; + if ( 'php' === $type ) { + return substr( $ext, - 9 ) === 'blade.php' ? new LocoBladeExtractor( $rules ) : new LocoPHPExtractor( $rules ); + } + if ( 'js' === $type ) { + return new LocoJsExtractor( $rules ); + } + if ( 'twig' === $type ) { + return new LocoTwigExtractor( $rules ); + } + throw new InvalidArgumentException( 'No extractor for ' . $type ); +} + +function loco_string_percent( $n, $t ) { + if ( ! $t || ! $n ) { + return '0'; + } + if ( $t === $n ) { + return '100'; + } + $dp = 0; + $n = 100 * $n / $t; + if ( $n > 99 ) { + return number_format( min( $n, 99.9 ), ++ $dp ); + } + if ( $n < 0.5 ) { + $n = max( $n, 0.0001 ); + do { + $s = number_format( $n, ++ $dp ); + } while ( preg_match( '/^0\\.0+$/', $s ) && $dp < 4 ); + + return substr( $s, 1 ); + } + + return number_format( $n, $dp ); +} + +function loco_print_progress( $translated, $untranslated, $flagged ) { + $total = $translated + $untranslated; + $complete = loco_string_percent( $translated - $flagged, $total ); + $class = 'progress'; + if ( ! $translated && ! $flagged ) { + $class .= ' empty'; + } else if ( '100' === $complete ) { + $class .= ' done'; + } + echo '
'; + if ( $flagged ) { + $s = loco_string_percent( $flagged, $total ); + echo '
 
'; + } + if ( '0' === $complete ) { + echo ' '; + } else { + $class = 'bar p'; + $p = (int) $complete; + $class .= sprintf( ' p-%u', 10 * floor( $p / 10 ) ); + $style = 'width:' . $complete . '%'; + if ( $flagged ) { + $remain = 100.0 - (float) $s; + $style .= '; max-width: ' . sprintf( '%s', $remain ) . '%'; + } + echo '
 
'; + } + echo '
', $complete, '%
'; +} + +class LocoFuzzyMatcher implements Countable { + private $pot = []; + private $po = []; + private $diff = []; + private $dmax = .20; + + #[ReturnTypeWillChange] + public function count() { + return count( $this->pot ); + } + + public function unmatched() { + return array_values( $this->pot ); + } + + public function redundant() { + return array_values( $this->po ); + } + + public function setFuzziness( $s ) { + if ( $this->po ) { + throw new LogicException( 'Cannot setFuzziness() after calling match()' ); + } + $this->dmax = (float) max( 0, min( (int) $s, 100 ) ) / 100; + } + + public function add( $a ) { + $source = isset( $a['source'] ) ? (string) $a['source'] : ''; + $context = isset( $a['context'] ) ? (string) $a['context'] : ''; + $key = $source . "\4" . $context; + $this->pot[ $key ] = $a; + } + + private function key( $a ) { + $source = isset( $a['source'] ) ? (string) $a['source'] : ''; + $context = isset( $a['context'] ) ? (string) $a['context'] : ''; + + return $source . "\4" . $context; + } + + protected function getRef( $a ) { + $key = $this->key( $a ); + + return array_key_exists( $key, $this->pot ) ? $this->pot[ $key ] : null; + } + + public function match( $a ) { + $old = $this->key( $a ); + if ( isset( $this->pot[ $old ] ) ) { + $new = $this->pot[ $old ]; + unset( $this->pot[ $old ] ); + + return $new; + } + $this->po[ $old ] = $a; + $target = isset( $a['target'] ) ? (string) $a['target'] : ''; + $comment = isset( $a['comment'] ) ? (string) $a['comment'] : ''; + if ( '' === $target && '' === $comment ) { + return null; + } + if ( 0 < $this->dmax ) { + foreach ( $this->pot as $new => $_ ) { + $dist = $this->distance( $old, $new ); + if ( - 1 !== $dist ) { + $this->diff[] = [ $old, $new, $dist ]; + } + } + } + + return null; + } + + private function distance( $a, $b ) { + $a = strtolower( $a ); + $b = strtolower( $b ); + if ( $a === $b ) { + return 0; + } + $lenA = strlen( $a ); + $lenB = strlen( $b ); + $lenDiff = abs( $lenA - $lenB ); + $max = min( $lenA, $lenB ) + $lenDiff; + $max = (int) ceil( $this->dmax * $max ); + if ( $max < $lenDiff ) { + return - 1; + } + $len = max( $lenA, $lenB ); + if ( $len < 256 ) { + $d = levenshtein( $a, $b ); + + return $d > $max ? - 1 : $d; + } + $d = 0; + for ( $i = 0; $i < $len; $i += $max ) { + $aa = substr( $a, $i, $max ); + $bb = substr( $b, $i, $max ); + $d += levenshtein( $aa, $bb ); + if ( $d > $max ) { + return - 1; + } + } + + return $d; + } + + public function getFuzzyMatches() { + $pairs = []; + usort( $this->diff, [ __CLASS__, 'compareDistance' ] ); + foreach ( $this->diff as $pair ) { + list( $old, $new ) = $pair; + if ( ! array_key_exists( $new, $this->pot ) || ! array_key_exists( $old, $this->po ) ) { + continue; + } + $pairs[] = [ $this->po[ $old ], $this->pot[ $new ], ]; + unset( $this->po[ $old ] ); + unset( $this->pot[ $new ] ); + if ( ! $this->po || ! $this->pot ) { + break; + } + } + $this->diff = []; + + return $pairs; + } + + private static function compareDistance( array $a, array $b ) { + return $a[2] - $b[2]; + } +} + +defined( 'T_FINALLY' ) || define( 'T_FINALLY', 500 ); +if ( function_exists( 'loco_check_extension' ) ) { + loco_check_extension( 'mbstring' ); +} \ No newline at end of file diff --git a/lib/data/locales.php b/lib/data/locales.php index 641fc90..7fa917b 100644 --- a/lib/data/locales.php +++ b/lib/data/locales.php @@ -2,4 +2,4 @@ /** * Compiled data. Do not edit. */ -return ['af'=>[0=>'Afrikaans',1=>'Afrikaans'],'am'=>[0=>'Amharic',1=>'አማርኛ'],'arg'=>[0=>'Aragonese',1=>'Aragonés'],'ar'=>[0=>'Arabic',1=>'العربية'],'ary'=>[0=>'Moroccan Arabic',1=>'العربية المغربية'],'as'=>[0=>'Assamese',1=>'অসমীয়া'],'azb'=>[0=>'South Azerbaijani',1=>'گؤنئی آذربایجان'],'az'=>[0=>'Azerbaijani',1=>'Azərbaycan dili'],'bel'=>[0=>'Belarusian',1=>'Беларуская мова'],'bg_BG'=>[0=>'Bulgarian',1=>'Български'],'bn_BD'=>[0=>'Bengali (Bangladesh)',1=>'বাংলা'],'bo'=>[0=>'Tibetan',1=>'བོད་ཡིག'],'bs_BA'=>[0=>'Bosnian',1=>'Bosanski'],'ca'=>[0=>'Catalan',1=>'Català'],'ceb'=>[0=>'Cebuano',1=>'Cebuano'],'cs_CZ'=>[0=>'Czech',1=>'Čeština'],'cy'=>[0=>'Welsh',1=>'Cymraeg'],'da_DK'=>[0=>'Danish',1=>'Dansk'],'de_AT'=>[0=>'German (Austria)',1=>'Deutsch (Österreich)'],'de_DE'=>[0=>'German',1=>'Deutsch'],'de_CH'=>[0=>'German (Switzerland)',1=>'Deutsch (Schweiz)'],'de_CH_informal'=>[0=>'German (Switzerland, Informal)',1=>'Deutsch (Schweiz, Du)'],'de_DE_formal'=>[0=>'German (Formal)',1=>'Deutsch (Sie)'],'dsb'=>[0=>'Lower Sorbian',1=>'Dolnoserbšćina'],'dzo'=>[0=>'Dzongkha',1=>'རྫོང་ཁ'],'el'=>[0=>'Greek',1=>'Ελληνικά'],'en_GB'=>[0=>'English (UK)',1=>'English (UK)'],'en_CA'=>[0=>'English (Canada)',1=>'English (Canada)'],'en_NZ'=>[0=>'English (New Zealand)',1=>'English (New Zealand)'],'en_AU'=>[0=>'English (Australia)',1=>'English (Australia)'],'en_ZA'=>[0=>'English (South Africa)',1=>'English (South Africa)'],'eo'=>[0=>'Esperanto',1=>'Esperanto'],'es_MX'=>[0=>'Spanish (Mexico)',1=>'Español de México'],'es_CO'=>[0=>'Spanish (Colombia)',1=>'Español de Colombia'],'es_VE'=>[0=>'Spanish (Venezuela)',1=>'Español de Venezuela'],'es_CR'=>[0=>'Spanish (Costa Rica)',1=>'Español de Costa Rica'],'es_EC'=>[0=>'Spanish (Ecuador)',1=>'Español de Ecuador'],'es_DO'=>[0=>'Spanish (Dominican Republic)',1=>'Español de República Dominicana'],'es_PE'=>[0=>'Spanish (Peru)',1=>'Español de Perú'],'es_UY'=>[0=>'Spanish (Uruguay)',1=>'Español de Uruguay'],'es_PR'=>[0=>'Spanish (Puerto Rico)',1=>'Español de Puerto Rico'],'es_ES'=>[0=>'Spanish (Spain)',1=>'Español'],'es_GT'=>[0=>'Spanish (Guatemala)',1=>'Español de Guatemala'],'es_CL'=>[0=>'Spanish (Chile)',1=>'Español de Chile'],'es_AR'=>[0=>'Spanish (Argentina)',1=>'Español de Argentina'],'et'=>[0=>'Estonian',1=>'Eesti'],'eu'=>[0=>'Basque',1=>'Euskara'],'fa_AF'=>[0=>'Persian (Afghanistan)',1=>'(فارسی (افغانستان'],'fa_IR'=>[0=>'Persian',1=>'فارسی'],'fi'=>[0=>'Finnish',1=>'Suomi'],'fr_CA'=>[0=>'French (Canada)',1=>'Français du Canada'],'fr_BE'=>[0=>'French (Belgium)',1=>'Français de Belgique'],'fr_FR'=>[0=>'French (France)',1=>'Français'],'fur'=>[0=>'Friulian',1=>'Friulian'],'fy'=>[0=>'Frisian',1=>'Frysk'],'gd'=>[0=>'Scottish Gaelic',1=>'Gàidhlig'],'gl_ES'=>[0=>'Galician',1=>'Galego'],'gu'=>[0=>'Gujarati',1=>'ગુજરાતી'],'haz'=>[0=>'Hazaragi',1=>'هزاره گی'],'he_IL'=>[0=>'Hebrew',1=>'עִבְרִית'],'hi_IN'=>[0=>'Hindi',1=>'हिन्दी'],'hr'=>[0=>'Croatian',1=>'Hrvatski'],'hsb'=>[0=>'Upper Sorbian',1=>'Hornjoserbšćina'],'hu_HU'=>[0=>'Hungarian',1=>'Magyar'],'hy'=>[0=>'Armenian',1=>'Հայերեն'],'id_ID'=>[0=>'Indonesian',1=>'Bahasa Indonesia'],'is_IS'=>[0=>'Icelandic',1=>'Íslenska'],'it_IT'=>[0=>'Italian',1=>'Italiano'],'ja'=>[0=>'Japanese',1=>'日本語'],'jv_ID'=>[0=>'Javanese',1=>'Basa Jawa'],'ka_GE'=>[0=>'Georgian',1=>'ქართული'],'kab'=>[0=>'Kabyle',1=>'Taqbaylit'],'kk'=>[0=>'Kazakh',1=>'Қазақ тілі'],'km'=>[0=>'Khmer',1=>'ភាសាខ្មែរ'],'kn'=>[0=>'Kannada',1=>'ಕನ್ನಡ'],'ko_KR'=>[0=>'Korean',1=>'한국어'],'ckb'=>[0=>'Kurdish (Sorani)',1=>'كوردی‎'],'kir'=>[0=>'Kyrgyz',1=>'Кыргызча'],'lo'=>[0=>'Lao',1=>'ພາສາລາວ'],'lt_LT'=>[0=>'Lithuanian',1=>'Lietuvių kalba'],'lv'=>[0=>'Latvian',1=>'Latviešu valoda'],'mk_MK'=>[0=>'Macedonian',1=>'Македонски јазик'],'ml_IN'=>[0=>'Malayalam',1=>'മലയാളം'],'mn'=>[0=>'Mongolian',1=>'Монгол'],'mr'=>[0=>'Marathi',1=>'मराठी'],'ms_MY'=>[0=>'Malay',1=>'Bahasa Melayu'],'my_MM'=>[0=>'Myanmar (Burmese)',1=>'ဗမာစာ'],'nb_NO'=>[0=>'Norwegian (Bokmål)',1=>'Norsk bokmål'],'ne_NP'=>[0=>'Nepali',1=>'नेपाली'],'nl_BE'=>[0=>'Dutch (Belgium)',1=>'Nederlands (België)'],'nl_NL_formal'=>[0=>'Dutch (Formal)',1=>'Nederlands (Formeel)'],'nl_NL'=>[0=>'Dutch',1=>'Nederlands'],'nn_NO'=>[0=>'Norwegian (Nynorsk)',1=>'Norsk nynorsk'],'oci'=>[0=>'Occitan',1=>'Occitan'],'pa_IN'=>[0=>'Panjabi (India)',1=>'ਪੰਜਾਬੀ'],'pl_PL'=>[0=>'Polish',1=>'Polski'],'ps'=>[0=>'Pashto',1=>'پښتو'],'pt_BR'=>[0=>'Portuguese (Brazil)',1=>'Português do Brasil'],'pt_PT'=>[0=>'Portuguese (Portugal)',1=>'Português'],'pt_AO'=>[0=>'Portuguese (Angola)',1=>'Português de Angola'],'pt_PT_ao90'=>[0=>'Portuguese (Portugal, AO90)',1=>'Português (AO90)'],'rhg'=>[0=>'Rohingya',1=>'Ruáinga'],'ro_RO'=>[0=>'Romanian',1=>'Română'],'ru_RU'=>[0=>'Russian',1=>'Русский'],'sah'=>[0=>'Sakha',1=>'Сахалыы'],'snd'=>[0=>'Sindhi',1=>'سنڌي'],'si_LK'=>[0=>'Sinhala',1=>'සිංහල'],'sk_SK'=>[0=>'Slovak',1=>'Slovenčina'],'skr'=>[0=>'Saraiki',1=>'سرائیکی'],'sl_SI'=>[0=>'Slovenian',1=>'Slovenščina'],'sq'=>[0=>'Albanian',1=>'Shqip'],'sr_RS'=>[0=>'Serbian',1=>'Српски језик'],'sv_SE'=>[0=>'Swedish',1=>'Svenska'],'sw'=>[0=>'Swahili',1=>'Kiswahili'],'szl'=>[0=>'Silesian',1=>'Ślōnskŏ gŏdka'],'ta_IN'=>[0=>'Tamil',1=>'தமிழ்'],'ta_LK'=>[0=>'Tamil (Sri Lanka)',1=>'தமிழ்'],'te'=>[0=>'Telugu',1=>'తెలుగు'],'th'=>[0=>'Thai',1=>'ไทย'],'tl'=>[0=>'Tagalog',1=>'Tagalog'],'tr_TR'=>[0=>'Turkish',1=>'Türkçe'],'tt_RU'=>[0=>'Tatar',1=>'Татар теле'],'tah'=>[0=>'Tahitian',1=>'Reo Tahiti'],'ug_CN'=>[0=>'Uighur',1=>'ئۇيغۇرچە'],'uk'=>[0=>'Ukrainian',1=>'Українська'],'ur'=>[0=>'Urdu',1=>'اردو'],'uz_UZ'=>[0=>'Uzbek',1=>'O‘zbekcha'],'vi'=>[0=>'Vietnamese',1=>'Tiếng Việt'],'zh_CN'=>[0=>'Chinese (China)',1=>'简体中文'],'zh_TW'=>[0=>'Chinese (Taiwan)',1=>'繁體中文'],'zh_HK'=>[0=>'Chinese (Hong Kong)',1=>'香港中文']]; \ No newline at end of file +return ['af'=>[0=>'Afrikaans',1=>'Afrikaans'],'am'=>[0=>'Amharic',1=>'አማርኛ'],'arg'=>[0=>'Aragonese',1=>'Aragonés'],'ar'=>[0=>'Arabic',1=>'العربية'],'ary'=>[0=>'Moroccan Arabic',1=>'العربية المغربية'],'as'=>[0=>'Assamese',1=>'অসমীয়া'],'azb'=>[0=>'South Azerbaijani',1=>'گؤنئی آذربایجان'],'az'=>[0=>'Azerbaijani',1=>'Azərbaycan dili'],'bel'=>[0=>'Belarusian',1=>'Беларуская мова'],'bg_BG'=>[0=>'Bulgarian',1=>'Български'],'bn_BD'=>[0=>'Bengali (Bangladesh)',1=>'বাংলা'],'bo'=>[0=>'Tibetan',1=>'བོད་ཡིག'],'bs_BA'=>[0=>'Bosnian',1=>'Bosanski'],'ca'=>[0=>'Catalan',1=>'Català'],'ceb'=>[0=>'Cebuano',1=>'Cebuano'],'cs_CZ'=>[0=>'Czech',1=>'Čeština'],'cy'=>[0=>'Welsh',1=>'Cymraeg'],'da_DK'=>[0=>'Danish',1=>'Dansk'],'de_CH'=>[0=>'German (Switzerland)',1=>'Deutsch (Schweiz)'],'de_CH_informal'=>[0=>'German (Switzerland, Informal)',1=>'Deutsch (Schweiz, Du)'],'de_DE'=>[0=>'German',1=>'Deutsch'],'de_AT'=>[0=>'German (Austria)',1=>'Deutsch (Österreich)'],'de_DE_formal'=>[0=>'German (Formal)',1=>'Deutsch (Sie)'],'dsb'=>[0=>'Lower Sorbian',1=>'Dolnoserbšćina'],'dzo'=>[0=>'Dzongkha',1=>'རྫོང་ཁ'],'el'=>[0=>'Greek',1=>'Ελληνικά'],'en_NZ'=>[0=>'English (New Zealand)',1=>'English (New Zealand)'],'en_CA'=>[0=>'English (Canada)',1=>'English (Canada)'],'en_ZA'=>[0=>'English (South Africa)',1=>'English (South Africa)'],'en_GB'=>[0=>'English (UK)',1=>'English (UK)'],'en_AU'=>[0=>'English (Australia)',1=>'English (Australia)'],'eo'=>[0=>'Esperanto',1=>'Esperanto'],'es_ES'=>[0=>'Spanish (Spain)',1=>'Español'],'es_AR'=>[0=>'Spanish (Argentina)',1=>'Español de Argentina'],'es_CO'=>[0=>'Spanish (Colombia)',1=>'Español de Colombia'],'es_MX'=>[0=>'Spanish (Mexico)',1=>'Español de México'],'es_CR'=>[0=>'Spanish (Costa Rica)',1=>'Español de Costa Rica'],'es_VE'=>[0=>'Spanish (Venezuela)',1=>'Español de Venezuela'],'es_EC'=>[0=>'Spanish (Ecuador)',1=>'Español de Ecuador'],'es_DO'=>[0=>'Spanish (Dominican Republic)',1=>'Español de República Dominicana'],'es_PE'=>[0=>'Spanish (Peru)',1=>'Español de Perú'],'es_UY'=>[0=>'Spanish (Uruguay)',1=>'Español de Uruguay'],'es_PR'=>[0=>'Spanish (Puerto Rico)',1=>'Español de Puerto Rico'],'es_GT'=>[0=>'Spanish (Guatemala)',1=>'Español de Guatemala'],'es_CL'=>[0=>'Spanish (Chile)',1=>'Español de Chile'],'et'=>[0=>'Estonian',1=>'Eesti'],'eu'=>[0=>'Basque',1=>'Euskara'],'fa_IR'=>[0=>'Persian',1=>'فارسی'],'fa_AF'=>[0=>'Persian (Afghanistan)',1=>'(فارسی (افغانستان'],'fi'=>[0=>'Finnish',1=>'Suomi'],'fr_CA'=>[0=>'French (Canada)',1=>'Français du Canada'],'fr_FR'=>[0=>'French (France)',1=>'Français'],'fr_BE'=>[0=>'French (Belgium)',1=>'Français de Belgique'],'fur'=>[0=>'Friulian',1=>'Friulian'],'fy'=>[0=>'Frisian',1=>'Frysk'],'gd'=>[0=>'Scottish Gaelic',1=>'Gàidhlig'],'gl_ES'=>[0=>'Galician',1=>'Galego'],'gu'=>[0=>'Gujarati',1=>'ગુજરાતી'],'haz'=>[0=>'Hazaragi',1=>'هزاره گی'],'he_IL'=>[0=>'Hebrew',1=>'עִבְרִית'],'hi_IN'=>[0=>'Hindi',1=>'हिन्दी'],'hr'=>[0=>'Croatian',1=>'Hrvatski'],'hsb'=>[0=>'Upper Sorbian',1=>'Hornjoserbšćina'],'hu_HU'=>[0=>'Hungarian',1=>'Magyar'],'hy'=>[0=>'Armenian',1=>'Հայերեն'],'id_ID'=>[0=>'Indonesian',1=>'Bahasa Indonesia'],'is_IS'=>[0=>'Icelandic',1=>'Íslenska'],'it_IT'=>[0=>'Italian',1=>'Italiano'],'ja'=>[0=>'Japanese',1=>'日本語'],'jv_ID'=>[0=>'Javanese',1=>'Basa Jawa'],'ka_GE'=>[0=>'Georgian',1=>'ქართული'],'kab'=>[0=>'Kabyle',1=>'Taqbaylit'],'kk'=>[0=>'Kazakh',1=>'Қазақ тілі'],'km'=>[0=>'Khmer',1=>'ភាសាខ្មែរ'],'kn'=>[0=>'Kannada',1=>'ಕನ್ನಡ'],'ko_KR'=>[0=>'Korean',1=>'한국어'],'ckb'=>[0=>'Kurdish (Sorani)',1=>'كوردی‎'],'kir'=>[0=>'Kyrgyz',1=>'Кыргызча'],'lo'=>[0=>'Lao',1=>'ພາສາລາວ'],'lt_LT'=>[0=>'Lithuanian',1=>'Lietuvių kalba'],'lv'=>[0=>'Latvian',1=>'Latviešu valoda'],'mk_MK'=>[0=>'Macedonian',1=>'Македонски јазик'],'ml_IN'=>[0=>'Malayalam',1=>'മലയാളം'],'mn'=>[0=>'Mongolian',1=>'Монгол'],'mr'=>[0=>'Marathi',1=>'मराठी'],'ms_MY'=>[0=>'Malay',1=>'Bahasa Melayu'],'my_MM'=>[0=>'Myanmar (Burmese)',1=>'ဗမာစာ'],'nb_NO'=>[0=>'Norwegian (Bokmål)',1=>'Norsk bokmål'],'ne_NP'=>[0=>'Nepali',1=>'नेपाली'],'nl_BE'=>[0=>'Dutch (Belgium)',1=>'Nederlands (België)'],'nl_NL_formal'=>[0=>'Dutch (Formal)',1=>'Nederlands (Formeel)'],'nl_NL'=>[0=>'Dutch',1=>'Nederlands'],'nn_NO'=>[0=>'Norwegian (Nynorsk)',1=>'Norsk nynorsk'],'oci'=>[0=>'Occitan',1=>'Occitan'],'pa_IN'=>[0=>'Panjabi (India)',1=>'ਪੰਜਾਬੀ'],'pl_PL'=>[0=>'Polish',1=>'Polski'],'ps'=>[0=>'Pashto',1=>'پښتو'],'pt_PT_ao90'=>[0=>'Portuguese (Portugal, AO90)',1=>'Português (AO90)'],'pt_PT'=>[0=>'Portuguese (Portugal)',1=>'Português'],'pt_BR'=>[0=>'Portuguese (Brazil)',1=>'Português do Brasil'],'pt_AO'=>[0=>'Portuguese (Angola)',1=>'Português de Angola'],'rhg'=>[0=>'Rohingya',1=>'Ruáinga'],'ro_RO'=>[0=>'Romanian',1=>'Română'],'ru_RU'=>[0=>'Russian',1=>'Русский'],'sah'=>[0=>'Sakha',1=>'Сахалыы'],'snd'=>[0=>'Sindhi',1=>'سنڌي'],'si_LK'=>[0=>'Sinhala',1=>'සිංහල'],'sk_SK'=>[0=>'Slovak',1=>'Slovenčina'],'skr'=>[0=>'Saraiki',1=>'سرائیکی'],'sl_SI'=>[0=>'Slovenian',1=>'Slovenščina'],'sq'=>[0=>'Albanian',1=>'Shqip'],'sr_RS'=>[0=>'Serbian',1=>'Српски језик'],'sv_SE'=>[0=>'Swedish',1=>'Svenska'],'sw'=>[0=>'Swahili',1=>'Kiswahili'],'szl'=>[0=>'Silesian',1=>'Ślōnskŏ gŏdka'],'ta_IN'=>[0=>'Tamil',1=>'தமிழ்'],'ta_LK'=>[0=>'Tamil (Sri Lanka)',1=>'தமிழ்'],'te'=>[0=>'Telugu',1=>'తెలుగు'],'th'=>[0=>'Thai',1=>'ไทย'],'tl'=>[0=>'Tagalog',1=>'Tagalog'],'tr_TR'=>[0=>'Turkish',1=>'Türkçe'],'tt_RU'=>[0=>'Tatar',1=>'Татар теле'],'tah'=>[0=>'Tahitian',1=>'Reo Tahiti'],'ug_CN'=>[0=>'Uighur',1=>'ئۇيغۇرچە'],'uk'=>[0=>'Ukrainian',1=>'Українська'],'ur'=>[0=>'Urdu',1=>'اردو'],'uz_UZ'=>[0=>'Uzbek',1=>'O‘zbekcha'],'vi'=>[0=>'Vietnamese',1=>'Tiếng Việt'],'zh_TW'=>[0=>'Chinese (Taiwan)',1=>'繁體中文'],'zh_CN'=>[0=>'Chinese (China)',1=>'简体中文'],'zh_HK'=>[0=>'Chinese (Hong Kong)',1=>'香港中文']]; \ No newline at end of file diff --git a/pub/css/admin.css b/pub/css/admin.css index ea4f82b..9f8ba50 100644 --- a/pub/css/admin.css +++ b/pub/css/admin.css @@ -1 +1 @@ -._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.6.10);background-repeat:no-repeat;min-height:16px}._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.6.10) 0 0 no-repeat;min-height:75px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.6.10);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.6.10);background-size:16px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.6.10);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-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco-admin.wrap .icon,#loco-admin.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?v=2.6.10");src:url("../font/loco.eot?v=2.6.10?#iefix") format("embedded-opentype"),url("../font/loco.woff?v=2.6.10") format("woff"),url("../font/loco.ttf?v=2.6.10") format("truetype"),url("../font/loco.svg?v=2.6.10#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-admin.wrap .selector li,#loco-admin.wrap .selector .handle,#loco-admin.wrap .selectoradd a,#loco-admin.wrap .selectorsep:before,#loco-admin.wrap .selectorsep span{padding:.3em .75em}#loco-admin.wrap .selector{text-align:left;display:inline-block;white-space:nowrap}#loco-admin.wrap .selectoradd a,#loco-admin.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-admin.wrap .selectorsep{display:inline-block;border:solid 1px transparent}#loco-admin.wrap .selectorsep:before{display:block;position:relative;color:#999;height:1.3em;overflow:hidden}#loco-admin.wrap .selectorsep>*{display:block;line-height:1em;color:#666;height:1.3em;overflow:hidden}#loco-admin.wrap .selector .handle{outline:none;white-space:nowrap;padding-right:2.3em;max-width:250px;text-overflow:ellipsis}#loco-admin.wrap .selector .handle .prefix{padding-right:.6ex}#loco-admin.wrap .selector .handle:after{font-family:loco;font-size:1.3em;color:#ccc;display:block;position:absolute;top:.25em;right:.6em;content:"▼"}#loco-admin.wrap .selector .handle:focus:after,#loco-admin.wrap .selector .handle:hover:after{color:#666}#loco-admin.wrap .selector.no-caret .handle{padding-right:.75em}#loco-admin.wrap .selector.no-caret .handle:after{display:none}#loco-admin.wrap .selector.no-title .handle{padding-left:.5em;padding-right:.5em}#loco-admin.wrap .selector.no-title .handle .label{display:none}#loco-admin.wrap .selector.no-title .handle .icon{margin-right:0px}#loco-admin.wrap .selector.dummy .handle{border-color:transparent}#loco-admin.wrap .selector.dummy .handle:after{display:none}#loco-admin.wrap .selectoradd{position:relative}#loco-admin.wrap .selectoradd>*{display:block;float:left;clear:none}#loco-admin.wrap .selectoradd>a.has-icon{width:1.3em}#loco-admin.wrap .selectoradd>a.has-icon:before{color:#999;display:inline;padding-left:0;padding-right:0;line-height:1.4em}#loco-admin.wrap .selectoradd>a.has-icon:hover:after{color:#2e892e}#loco-admin.wrap .selectorsep{display:inline-block}#loco-admin.wrap .selectorsep span{color:#666;height:1.3em}#loco-admin.wrap .selector ul,#loco-admin.wrap .selector li{display:block;position:relative;cursor:default;margin:0}#loco-admin.wrap .selector ul{padding:0;overflow:auto}#loco-admin.wrap .selector.multi li input{display:none}#loco-admin.wrap .selector li.selected{background:#e5e5e5}#loco-admin.wrap .selector li.over{background-color:#ccc;color:#fff;text-shadow:1px 1px #aaa}#loco-admin.wrap .selector li.over .label{color:#fff}#loco-admin.wrap .selector .label{font:inherit;color:inherit}#loco-admin.wrap .selector .icon{display:inline-block;min-width:1.2em;text-align:center;font-size:14px}#loco-admin.wrap .selector .icon.no-icon{display:none}#loco-admin.wrap .selector .icon:before{color:#666}#loco-admin.wrap .selector .label{line-height:1;vertical-align:text-bottom}#loco-admin.wrap .selector .lang{vertical-align:middle}#loco-admin.wrap .selector .icon,#loco-admin.wrap .selector .icon-16{vertical-align:text-bottom}#loco-admin.wrap .selector .icon,#loco-admin.wrap .selector .lang,#loco-admin.wrap .selector .icon-16{margin-right:5px}#loco-admin.wrap .selector .region,#loco-admin.wrap .selector .lang-tlh,#loco-admin.wrap .selector .variant-wales,#loco-admin.wrap .selector .region-gb.lang-cy,#loco-admin.wrap .selector .variant-scotland,#loco-admin.wrap .selector .region-gb.lang-gd,#loco-admin.wrap .selector .variant-valencia,#loco-admin.wrap .selector .region-es.variant-valencia,#loco-admin.wrap .selector .lang-ca,#loco-admin.wrap .selector .region-es.lang-ca,#loco-admin.wrap .selector .lang-eo,#loco-admin.wrap .selector .lang-eu{margin-left:2px;margin-right:7px}#loco-admin.wrap .selector.avatars .label{line-height:18px}#loco-admin.wrap .selector.avatars .avtr,#loco-admin.wrap .selector.avatars .icon-user{width:18px;height:18px;line-height:18px}#loco-admin.wrap .selector.avatars .avtr{background-size:18px;background-repeat:no-repeat}#loco-admin.wrap .selector.ticked .icon.no-icon{font-size:12px;display:inline-block}#loco-admin.wrap .selector.ticked .selected .icon.no-icon:before{content:"✓"}#loco-admin.wrap .selectoradd a:focus,#loco-admin.wrap .selectoradd a:hover,#loco-admin.wrap .selector .handle:focus,#loco-admin.wrap .selector .handle:hover{color:#000;border-color:#999}#loco-admin.wrap .selectoradd a:focus{outline:none}#loco-admin.wrap .selector.active .handle{border-color:#999;background-color:#eee;color:#999}#loco-admin.wrap .selector.active .handle:after{color:#999;content:"▲"}#loco-admin.wrap .selector.disabled,#loco-admin.wrap .selectoradd.disabled{cursor:default;cursor:no-drop;cursor:not-allowed}#loco-admin.wrap .selectoradd.disabled a,#loco-admin.wrap .selector.disabled .handle{pointer-events:none;color:#999}#loco-admin.wrap .selector.readonly .handle{pointer-events:none;border-color:transparent}#loco-admin.wrap .selector.readonly .handle,#loco-admin.wrap .selector.disabled .handle{padding-right:1em}#loco-admin.wrap .selector.readonly .handle:after,#loco-admin.wrap .selector.disabled .handle:after{display:none}#loco-admin.wrap .selector.readonly .handle span.icon,#loco-admin.wrap .selector.disabled .handle span.icon{color:#999 !important}#loco-admin.wrap .selector li.disabled,#loco-admin.wrap .selector li.disabled.over{color:#aaa;text-shadow:1px 1px #fff;pointer-events:none}#loco-admin.wrap .selector li.disabled *{cursor:text}#loco-admin.wrap .selector li.disabled .icon:before{color:#aaa}#loco-admin.wrap .selector li.disabled .flag,#loco-admin.wrap .selector li.disabled .icon-16{opacity:.4}#loco-admin.wrap .selectorset .selector,#loco-admin.wrap .selectorset .selectoradd{float:left;clear:none}#loco-admin.wrap body>.selector{display:block;position:fixed;top:0;left:0;margin:0;padding:0;background:#f5f5f5;box-shadow:0 10px 5px rgba(0,0,0,.2);border:solid 1px #ccc;z-index:400001;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#loco-admin.wrap body>.selector form{display:none}#loco-admin.wrap body>.selector.filterable form{display:block;border-bottom:solid 1px #ddd}#loco-admin.wrap body>.selector.filterable form input{margin:0;display:block;position:relative;background:#fff;width:100%;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;padding-left:.75em;border:none}#loco-admin.wrap body>.selector.filterable 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-admin.wrap body>.selector.filterable form ::placeholder{color:#ddd;font-family:"loco";display:block;position:relative;font-size:17px;top:1px}#loco-admin.wrap body>.selector.filterable form ::-webkit-input-placeholder{color:#ddd;font-family:"loco";display:block;position:relative;font-size:17px;top:1px}#loco-admin.wrap body>.selector.filterable form :-moz-placeholder{color:#ddd;font-family:"loco";display:block;position:relative;font-size:17px;top:1px;opacity:1}#loco-admin.wrap body>.selector.filterable form ::-moz-placeholder{color:#ddd;font-family:"loco";display:block;position:relative;font-size:17px;top:1px;opacity:1}#loco-admin.wrap body>.selector.filterable form :-ms-input-placeholder{color:#ddd;font-family:"loco";display:block;position:relative;font-size:17px;top:1px}#loco-admin.wrap body>.selector.filterable form .ielt10 .placeheld{color:#ddd;font-family:"loco";display:block;position:relative;font-size:17px;top:1px}#loco-admin.wrap body>.selector.none{border-color:#bd2c00}#loco-admin.wrap body>.selector.none form input:focus{-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-admin.wrap body>.selector.none li{opacity:.4}#loco-admin.wrap div.auto-comp-wrap{width:100%}#loco-admin.wrap div.auto-comp-wrap input{display:inline-block}#loco-admin.wrap div.auto-comp-wrap.loading input{background:transparent url(../img/ajax-loader.gif?v=2.6.10) right 2px no-repeat}#loco-admin.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-admin.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-admin.wrap div.auto-comp-result:first-child{border-top:solid 1px #ddd}#loco-admin.wrap div.auto-comp-result>*{display:inline-block;vertical-align:middle;line-height:normal}#loco-admin.wrap div.auto-comp-result .icon:before{padding-right:5px}#loco-admin.wrap div.auto-comp-result:hover{background:#a8a8a8;color:#fff;border-top-color:#a8a8a8;border-bottom-color:#999}#loco-admin.wrap div.auto-comp-result.selected{background:#666 !important;color:#fff;border-top-color:#666;border-bottom-color:#666}#loco-admin.wrap div.auto-comp-result .lang,#loco-admin.wrap div.auto-comp-result .region,#loco-admin.wrap div.auto-comp-result .lang-tlh,#loco-admin.wrap div.auto-comp-result .variant-wales,#loco-admin.wrap div.auto-comp-result .region-gb.lang-cy,#loco-admin.wrap div.auto-comp-result .variant-scotland,#loco-admin.wrap div.auto-comp-result .region-gb.lang-gd,#loco-admin.wrap div.auto-comp-result .variant-valencia,#loco-admin.wrap div.auto-comp-result .region-es.variant-valencia,#loco-admin.wrap div.auto-comp-result .lang-ca,#loco-admin.wrap div.auto-comp-result .region-es.lang-ca,#loco-admin.wrap div.auto-comp-result .lang-eo,#loco-admin.wrap div.auto-comp-result .lang-eu,#loco-admin.wrap div.auto-comp-result .avtr{margin-right:5px}#loco-admin.wrap div.auto-comp-wrap.error a.icon.clear:before{color:#c00;opacity:1}#loco-admin.wrap div.auto-comp-wrap.error input[type=text]{border-color:#c00;color:#c00}#loco-admin.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-admin.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.6.10);background-repeat:no-repeat;min-height:16px}#loco-admin.wrap ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.6.10) 0 0 no-repeat;min-height:75px}#loco-admin.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.6.10);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-admin.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.6.10);background-size:16px}#loco-admin.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.6.10);background-size:16px}}#loco-admin.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-admin.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-admin.wrap .loco-font,#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco-admin.wrap .icon,#loco-admin.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-admin.wrap .has-icon:before{display:inline-block;padding-right:.3em}#loco-admin.wrap a.icon-help{cursor:help}#loco-admin.wrap a.icon-help span{display:none}#loco-admin.wrap .icon-share:before{content:"↑"}#loco-admin.wrap .icon-notag:before{content:""}#loco-admin.wrap .icon-magnify:before{content:"🔍"}#loco-admin.wrap .icon-python:before{content:"🐍"}#loco-admin.wrap .icon-unicode:before{content:"u"}#loco-admin.wrap .icon-json:before{content:"{"}#loco-admin.wrap .icon-translate:before{content:""}#loco-admin.wrap .icon-project:before{content:""}#loco-admin.wrap .icon-plural:before{content:"᛬"}#loco-admin.wrap .icon-max:before,#loco-admin.wrap .icon-full-screen:before{content:""}#loco-admin.wrap .icon-min:before{content:""}#loco-admin.wrap .icon-sort:before{content:""}#loco-admin.wrap .icon-ok:before,#loco-admin.wrap .notice-success>.has-icon:before,#loco-admin.wrap .notice-success p>strong.has-icon:before,#loco-admin.wrap .panel-success>.has-icon:before,#loco-admin.wrap .panel-success p>strong.has-icon:before{content:"✓"}#loco-admin.wrap .icon-ok-empty:before{content:"🗌"}#loco-admin.wrap .icon-play:before{content:"⏵"}#loco-admin.wrap .icon-checkbox-checked:before,#loco-admin.wrap .selector.multi li.selected .icon-checkbox:before{content:"☑"}#loco-admin.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco-admin.wrap .icon-checkbox-partial:before{content:"☉"}#loco-admin.wrap .icon-radio-checked:before{content:"⚫"}#loco-admin.wrap .icon-radio-unchecked:before{content:"⚪"}#loco-admin.wrap .icon-ext:before{content:"⬈"}#loco-admin.wrap .icon-pdf:before{content:"P"}#loco-admin.wrap .icon-zip:before{content:"Z"}#loco-admin.wrap .icon-bullist:before{content:""}#loco-admin.wrap .icon-numlist:before{content:""}#loco-admin.wrap .icon-indent:before{content:""}#loco-admin.wrap .icon-outdent:before{content:""}#loco-admin.wrap .icon-link:before{content:""}#loco-admin.wrap .icon-unlink:before{content:""}#loco-admin.wrap .icon-bold:before{content:"B"}#loco-admin.wrap .icon-italic:before{content:"I"}#loco-admin.wrap .icon-library:before,#loco-admin.wrap .icon-glossary:before{content:"📚"}#loco-admin.wrap .icon-star:before{content:""}#loco-admin.wrap .icon-user:before{content:""}#loco-admin.wrap .icon-remove:before,#loco-admin.wrap a.icon.close:before{content:"×"}#loco-admin.wrap .icon-cog:before{content:""}#loco-admin.wrap .icon-trash:before{content:""}#loco-admin.wrap .icon-time:before,#loco-admin.wrap .icon-history:before{content:""}#loco-admin.wrap .icon-download:before{content:""}#loco-admin.wrap .icon-revert:before{content:""}#loco-admin.wrap .icon-sync:before{content:""}#loco-admin.wrap .icon-lock:before,#loco-admin.wrap .notice-locked>.has-icon:before,#loco-admin.wrap .notice-locked p>strong.has-icon:before,#loco-admin.wrap .panel-locked>.has-icon:before,#loco-admin.wrap .panel-locked p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-flag:before{content:""}#loco-admin.wrap .icon-tag:before{content:""}#loco-admin.wrap .icon-tags:before{content:""}#loco-admin.wrap .icon-print:before{content:""}#loco-admin.wrap .icon-camera:before{content:""}#loco-admin.wrap .icon-pencil:before{content:""}#loco-admin.wrap .icon-add:before{content:""}#loco-admin.wrap .icon-del:before{content:""}#loco-admin.wrap .icon-clear:before,#loco-admin.wrap a.icon.clear:before{content:""}#loco-admin.wrap .icon-ok-sign:before{content:"✔"}#loco-admin.wrap .icon-help:before{content:"?"}#loco-admin.wrap .icon-info:before,#loco-admin.wrap .notice-info>.has-icon:before,#loco-admin.wrap .notice-info p>strong.has-icon:before,#loco-admin.wrap .panel-info>.has-icon:before,#loco-admin.wrap .panel-info p>strong.has-icon:before{content:"ℹ"}#loco-admin.wrap .icon-cancel:before{content:""}#loco-admin.wrap .icon-warn:before,#loco-admin.wrap .notice-error>.has-icon:before,#loco-admin.wrap .notice-error p>strong.has-icon:before,#loco-admin.wrap .panel-error>.has-icon:before,#loco-admin.wrap .panel-error p>strong.has-icon:before,#loco-admin.wrap .notice-warning>.has-icon:before,#loco-admin.wrap .notice-warning p>strong.has-icon:before,#loco-admin.wrap .panel-warning>.has-icon:before,#loco-admin.wrap .panel-warning p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-comment:before{content:""}#loco-admin.wrap .icon-bar-chart:before{content:""}#loco-admin.wrap .icon-key:before{content:""}#loco-admin.wrap .icon-cogs:before{content:""}#loco-admin.wrap .icon-comments:before{content:""}#loco-admin.wrap .icon-signout:before{content:""}#loco-admin.wrap .icon-signin:before{content:""}#loco-admin.wrap .icon-upload:before{content:""}#loco-admin.wrap .icon-twitter:before{content:"🐦"}#loco-admin.wrap .icon-facebook:before{content:""}#loco-admin.wrap .icon-github:before{content:""}#loco-admin.wrap .icon-feed:before{content:""}#loco-admin.wrap .icon-globe:before{content:""}#loco-admin.wrap .icon-wrench:before,#loco-admin.wrap .notice-debug>.has-icon:before,#loco-admin.wrap .notice-debug p>strong.has-icon:before,#loco-admin.wrap .panel-debug>.has-icon:before,#loco-admin.wrap .panel-debug p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-group:before{content:""}#loco-admin.wrap .icon-cloud:before{content:""}#loco-admin.wrap .icon-copy:before{content:""}#loco-admin.wrap .icon-save:before{content:""}#loco-admin.wrap .icon-menu:before{content:""}#loco-admin.wrap .icon-table:before{content:""}#loco-admin.wrap .icon-caret-down:before{content:"▼"}#loco-admin.wrap .icon-caret-up:before{content:"▲"}#loco-admin.wrap .icon-caret-right:before{content:"▶"}#loco-admin.wrap .icon-mail:before{content:""}#loco-admin.wrap .icon-cloud-upload:before{content:""}#loco-admin.wrap .icon-file:before{content:""}#loco-admin.wrap .icon-circle-white:before{content:"⚬"}#loco-admin.wrap .icon-circle-black:before{content:"●"}#loco-admin.wrap .icon-eraser:before{content:""}#loco-admin.wrap .icon-unlock:before{content:""}#loco-admin.wrap .icon-apple:before{content:""}#loco-admin.wrap .icon-android:before{content:""}#loco-admin.wrap .icon-robot:before{content:"🤖"}#loco-admin.wrap .icon-back:before{content:"⬅"}#loco-admin.wrap .icon-next:before{content:"➔"}#loco-admin.wrap .icon-arrow-up:before{content:"⬆"}#loco-admin.wrap .icon-arrow-down:before{content:"⬇"}#loco-admin.wrap .icon-confirm:before{content:"!"}#loco-admin.wrap .icon-visible:before{content:"⏿"}#loco-admin.wrap .icon-hidden:before{content:"*"}#loco-admin.wrap .icon-calendar:before{content:""}#loco-admin.wrap .icon-ccard:before{content:""}#loco-admin.wrap .icon-caret-left:before{content:"◀"}#loco-admin.wrap .icon-pro:before{content:"⚡"}#loco-admin.wrap .icon-bell:before{content:""}#loco-admin.wrap .icon-code:before{content:""}#loco-admin.wrap .icon-privacy:before{content:"🛡"}#loco-admin.wrap .icon-hellip:before{content:"…"}#loco-admin.wrap .icon-vellip:before{content:"⁞"}#loco-admin.wrap .icon-collapse:before{content:""}#loco-admin.wrap .icon-expand:before{content:""}#loco-admin.wrap .icon-wordpress:before{content:""}#loco-admin.wrap .icon-restore:before{content:""}#loco-admin.wrap .icon-pilcrow:before{content:"¶"}#loco-admin.wrap .icon-google:before{content:" ";background:transparent url(../img/sso/g.svg?v=2.6.10) 0 1px no-repeat;background-size:18px}#loco-admin.wrap .icon-status.is-translated:before,#loco-admin.wrap .is-translated>header>.icon-status:before{color:#2e892e;content:"✓";text-align:center}#loco-admin.wrap .icon-status.is-untranslated:before,#loco-admin.wrap .is-untranslated>header>.icon-status:before{color:#aaa;content:"×";text-align:center;font-size:1.1em}#loco-admin.wrap .icon-status.is-flagged:before,#loco-admin.wrap .is-flagged>header>.icon-status:before{color:#bd2c00;content:"";text-align:center}#loco-admin.wrap .icon-status.is-translated.is-blank:before,#loco-admin.wrap .icon-status.is-translated.is-inherit:before,#loco-admin.wrap .is-translated.is-blank>header>.icon-status:before,#loco-admin.wrap .is-translated.is-inherit>header>.icon-status:before{content:"🗌"}#loco-admin.wrap .icon-status.is-translated.is-blank:before,#loco-admin.wrap .is-translated.is-blank>header>.icon-status:before{color:#aaa}#loco-admin.wrap .icon-status.is-fuzzy:before,#loco-admin.wrap .is-fuzzy>header>.icon-status:before{color:#666;content:""}#loco-admin.wrap .lang,#loco-admin.wrap .region,#loco-admin.wrap .lang-tlh,#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy,#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd,#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia,#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca,#loco-admin.wrap .lang-eo,#loco-admin.wrap .lang-eu{color:#fff;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:1.33;text-align:center;white-space:normal;text-shadow:none;vertical-align:middle}#loco-admin.wrap .lang{width:20px;height:12px;background-color:#2e892e}#loco-admin.wrap .lang:before{content:attr(lang);vertical-align:baseline}#loco-admin.wrap .lang-el{background-color:#1d48a3}#loco-admin.wrap .lang-el:before{content:"Ελ"}#loco-admin.wrap .region,#loco-admin.wrap .lang-tlh,#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy,#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd,#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia,#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca,#loco-admin.wrap .lang-eo,#loco-admin.wrap .lang-eu{width:16px;height:12px;margin:0 2px;background-image:url(../img/flags-16.png?v=2.6.10);background-repeat:no-repeat;background-color:transparent;background-size:100%}@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-admin.wrap .region,#loco-admin.wrap .lang-tlh,#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy,#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd,#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia,#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca,#loco-admin.wrap .lang-eo,#loco-admin.wrap .lang-eu{background-image:url(../img/flags-32.png?v=2.6.10)}}#loco-admin.wrap .region:before,#loco-admin.wrap .lang-tlh:before,#loco-admin.wrap .variant-wales:before,#loco-admin.wrap .region-gb.lang-cy:before,#loco-admin.wrap .variant-scotland:before,#loco-admin.wrap .region-gb.lang-gd:before,#loco-admin.wrap .variant-valencia:before,#loco-admin.wrap .region-es.variant-valencia:before,#loco-admin.wrap .lang-ca:before,#loco-admin.wrap .region-es.lang-ca:before,#loco-admin.wrap .lang-eo:before,#loco-admin.wrap .lang-eu:before{visibility:hidden}#loco-admin.wrap .lang-zh{background-color:#b90000}#loco-admin.wrap .lang-zh.script-hans:before{content:"中国"}#loco-admin.wrap .lang-zh.script-hant:before{content:"中國"}#loco-admin.wrap .__{background-position:0 0}#loco-admin.wrap .lang-eo{background-position:0 -13px}#loco-admin.wrap .lang-tlh{background-position:0 -26px}#loco-admin.wrap .lang-eu{background-position:0 -39px}#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca{background-position:0 -52px}#loco-admin.wrap .region-tg{background-position:0 -65px}#loco-admin.wrap .region-me{background-position:0 -78px}#loco-admin.wrap .region-la{background-position:0 -91px}#loco-admin.wrap .region-mr{background-position:0 -104px}#loco-admin.wrap .region-ni{background-position:0 -117px}#loco-admin.wrap .region-lv{background-position:0 -130px}#loco-admin.wrap .region-om{background-position:0 -143px}#loco-admin.wrap .region-af{background-position:0 -156px}#loco-admin.wrap .region-cy{background-position:0 -169px}#loco-admin.wrap .region-bj{background-position:0 -182px}#loco-admin.wrap .region-aq{background-position:0 -195px}#loco-admin.wrap .region-cn{background-position:0 -208px}#loco-admin.wrap .region-co{background-position:0 -221px}#loco-admin.wrap .region-cx{background-position:0 -234px}#loco-admin.wrap .region-ag{background-position:0 -247px}#loco-admin.wrap .region-ms{background-position:0 -260px}#loco-admin.wrap .region-md{background-position:0 -273px}#loco-admin.wrap .region-zm{background-position:0 -286px}#loco-admin.wrap .region-vn{background-position:0 -299px}#loco-admin.wrap .region-tf{background-position:0 -312px}#loco-admin.wrap .region-td{background-position:0 -325px}#loco-admin.wrap .region-yt{background-position:0 -338px}#loco-admin.wrap .region-lb{background-position:0 -351px}#loco-admin.wrap .region-mf{background-position:0 -364px}#loco-admin.wrap .region-lu{background-position:0 -377px}#loco-admin.wrap .region-mq{background-position:0 -390px}#loco-admin.wrap .region-cz{background-position:0 -403px}#loco-admin.wrap .region-ae{background-position:0 -416px}#loco-admin.wrap .region-cm{background-position:0 -429px}#loco-admin.wrap .region-bi{background-position:0 -442px}#loco-admin.wrap .region-ar{background-position:0 -455px}#loco-admin.wrap .region-as{background-position:0 -468px}#loco-admin.wrap .region-bh{background-position:0 -481px}#loco-admin.wrap .region-cl{background-position:0 -494px}#loco-admin.wrap .region-ad{background-position:0 -507px}#loco-admin.wrap .region-mp{background-position:0 -520px}#loco-admin.wrap .region-lt{background-position:0 -533px}#loco-admin.wrap .region-mg{background-position:0 -546px}#loco-admin.wrap .region-lc{background-position:0 -559px}#loco-admin.wrap .region-tr{background-position:0 -572px}#loco-admin.wrap .region-ua{background-position:0 -585px}#loco-admin.wrap .region-tv{background-position:0 -598px}#loco-admin.wrap .region-vi{background-position:0 -611px}#loco-admin.wrap .region-mt{background-position:0 -624px}#loco-admin.wrap .region-no{background-position:0 -637px}#loco-admin.wrap .region-mc{background-position:0 -650px}#loco-admin.wrap .region-ch{background-position:0 -663px}#loco-admin.wrap .region-bl{background-position:0 -676px}#loco-admin.wrap .region-aw{background-position:0 -689px}#loco-admin.wrap .region-bz{background-position:0 -702px}#loco-admin.wrap .region-bm{background-position:0 -715px}#loco-admin.wrap .region-ci{background-position:0 -728px}#loco-admin.wrap .region-mu{background-position:0 -741px}#loco-admin.wrap .region-us{background-position:0 -754px}#loco-admin.wrap .region-tw{background-position:0 -767px}#loco-admin.wrap .region-ye{background-position:0 -780px}#loco-admin.wrap .region-mw{background-position:0 -793px}#loco-admin.wrap .region-nl{background-position:0 -806px}#loco-admin.wrap .region-ls{background-position:0 -819px}#loco-admin.wrap .region-bo{background-position:0 -832px}#loco-admin.wrap .region-at{background-position:0 -845px}#loco-admin.wrap .region-ck{background-position:0 -858px}#loco-admin.wrap .region-by{background-position:0 -871px}#loco-admin.wrap .region-au{background-position:0 -884px}#loco-admin.wrap .region-bn{background-position:0 -897px}#loco-admin.wrap .region-ma{background-position:0 -910px}#loco-admin.wrap .region-nz{background-position:0 -923px}#loco-admin.wrap .region-lr{background-position:0 -936px}#loco-admin.wrap .region-mv{background-position:0 -949px}#loco-admin.wrap .region-tc{background-position:0 -962px}#loco-admin.wrap .region-ug{background-position:0 -975px}#loco-admin.wrap .region-tt{background-position:0 -988px}#loco-admin.wrap .region-pl{background-position:0 -1001px}#loco-admin.wrap .region-rs{background-position:0 -1014px}#loco-admin.wrap .region-in{background-position:0 -1027px}#loco-admin.wrap .region-ge{background-position:0 -1040px}#loco-admin.wrap .region-gr{background-position:0 -1053px}#loco-admin.wrap .region-gs{background-position:0 -1066px}#loco-admin.wrap .region-gd{background-position:0 -1079px}#loco-admin.wrap .region-io{background-position:0 -1092px}#loco-admin.wrap .region-hk{background-position:0 -1105px}#loco-admin.wrap .region-kp{background-position:0 -1118px}#loco-admin.wrap .region-kg{background-position:0 -1131px}#loco-admin.wrap .region-pm{background-position:0 -1144px}#loco-admin.wrap .region-sv{background-position:0 -1157px}#loco-admin.wrap .region-re{background-position:0 -1170px}#loco-admin.wrap .region-sa{background-position:0 -1183px}#loco-admin.wrap .region-sc{background-position:0 -1196px}#loco-admin.wrap .region-st{background-position:0 -1209px}#loco-admin.wrap .region-ke{background-position:0 -1222px}#loco-admin.wrap .region-im{background-position:0 -1235px}#loco-admin.wrap .region-kr{background-position:0 -1248px}#loco-admin.wrap .region-gf{background-position:0 -1261px}#loco-admin.wrap .region-dj{background-position:0 -1274px}#loco-admin.wrap .region-gq{background-position:0 -1287px}#loco-admin.wrap .region-gp{background-position:0 -1300px}#loco-admin.wrap .region-dk{background-position:0 -1313px}#loco-admin.wrap .region-gg{background-position:0 -1326px}#loco-admin.wrap .region-il{background-position:0 -1339px}#loco-admin.wrap .region-pn{background-position:0 -1352px}#loco-admin.wrap .region-sb{background-position:0 -1365px}#loco-admin.wrap .region-py{background-position:0 -1378px}#loco-admin.wrap .region-ru{background-position:0 -1391px}#loco-admin.wrap .region-kw{background-position:0 -1404px}#loco-admin.wrap .region-do{background-position:0 -1417px}#loco-admin.wrap .region-gt{background-position:0 -1430px}#loco-admin.wrap .region-gb{background-position:0 -1443px}#loco-admin.wrap .region-gu{background-position:0 -1456px}#loco-admin.wrap .region-je{background-position:0 -1469px}#loco-admin.wrap .region-hm{background-position:0 -1482px}#loco-admin.wrap .region-sg{background-position:0 -1495px}#loco-admin.wrap .region-pk{background-position:0 -1508px}#loco-admin.wrap .region-sr{background-position:0 -1521px}#loco-admin.wrap .region-se{background-position:0 -1534px}#loco-admin.wrap .region-jp{background-position:0 -1547px}#loco-admin.wrap .region-gw{background-position:0 -1560px}#loco-admin.wrap .region-eh{background-position:0 -1573px}#loco-admin.wrap .region-dz{background-position:0 -1586px}#loco-admin.wrap .region-ga{background-position:0 -1599px}#loco-admin.wrap .region-fr{background-position:0 -1612px}#loco-admin.wrap .region-dm{background-position:0 -1625px}#loco-admin.wrap .region-hn{background-position:0 -1638px}#loco-admin.wrap .region-sd{background-position:0 -1651px}#loco-admin.wrap .region-rw{background-position:0 -1664px}#loco-admin.wrap .region-ph{background-position:0 -1677px}#loco-admin.wrap .region-ss{background-position:0 -1690px}#loco-admin.wrap .region-qa{background-position:0 -1703px}#loco-admin.wrap .region-pe{background-position:0 -1716px}#loco-admin.wrap .region-pr{background-position:0 -1729px}#loco-admin.wrap .region-si{background-position:0 -1742px}#loco-admin.wrap .region-ht{background-position:0 -1755px}#loco-admin.wrap .region-es{background-position:0 -1768px}#loco-admin.wrap .region-gl{background-position:0 -1781px}#loco-admin.wrap .region-gm{background-position:0 -1794px}#loco-admin.wrap .region-er{background-position:0 -1807px}#loco-admin.wrap .region-fi{background-position:0 -1820px}#loco-admin.wrap .region-ee{background-position:0 -1833px}#loco-admin.wrap .region-kn{background-position:0 -1846px}#loco-admin.wrap .region-hu{background-position:0 -1859px}#loco-admin.wrap .region-iq{background-position:0 -1872px}#loco-admin.wrap .region-ky{background-position:0 -1885px}#loco-admin.wrap .region-sh{background-position:0 -1898px}#loco-admin.wrap .region-ps{background-position:0 -1911px}#loco-admin.wrap .region-pf{background-position:0 -1924px}#loco-admin.wrap .region-sj{background-position:0 -1937px}#loco-admin.wrap .region-id{background-position:0 -1950px}#loco-admin.wrap .region-is{background-position:0 -1963px}#loco-admin.wrap .region-eg{background-position:0 -1976px}#loco-admin.wrap .region-fk{background-position:0 -1989px}#loco-admin.wrap .region-fj{background-position:0 -2002px}#loco-admin.wrap .region-gn{background-position:0 -2015px}#loco-admin.wrap .region-gy{background-position:0 -2028px}#loco-admin.wrap .region-ir{background-position:0 -2041px}#loco-admin.wrap .region-km{background-position:0 -2054px}#loco-admin.wrap .region-ie{background-position:0 -2067px}#loco-admin.wrap .region-kz{background-position:0 -2080px}#loco-admin.wrap .region-ro{background-position:0 -2093px}#loco-admin.wrap .region-sk{background-position:0 -2106px}#loco-admin.wrap .region-pg{background-position:0 -2119px}#loco-admin.wrap .region-pt{background-position:0 -2132px}#loco-admin.wrap .region-so{background-position:0 -2145px}#loco-admin.wrap .region-sx{background-position:0 -2158px}#loco-admin.wrap .region-hr{background-position:0 -2171px}#loco-admin.wrap .region-ki{background-position:0 -2184px}#loco-admin.wrap .region-jm{background-position:0 -2197px}#loco-admin.wrap .region-ec{background-position:0 -2210px}#loco-admin.wrap .region-et{background-position:0 -2223px}#loco-admin.wrap .region-fo{background-position:0 -2236px}#loco-admin.wrap .region-kh{background-position:0 -2249px}#loco-admin.wrap .region-sy{background-position:0 -2262px}#loco-admin.wrap .region-sn{background-position:0 -2275px}#loco-admin.wrap .region-pw{background-position:0 -2288px}#loco-admin.wrap .region-sl{background-position:0 -2301px}#loco-admin.wrap .region-fm{background-position:0 -2314px}#loco-admin.wrap .region-gi{background-position:0 -2327px}#loco-admin.wrap .region-de{background-position:0 -2340px}#loco-admin.wrap .region-gh{background-position:0 -2353px}#loco-admin.wrap .region-jo{background-position:0 -2366px}#loco-admin.wrap .region-it{background-position:0 -2379px}#loco-admin.wrap .region-pa{background-position:0 -2392px}#loco-admin.wrap .region-sz{background-position:0 -2405px}#loco-admin.wrap .region-sm{background-position:0 -2418px}#loco-admin.wrap .region-tn{background-position:0 -2431px}#loco-admin.wrap .region-ml{background-position:0 -2444px}#loco-admin.wrap .region-cg{background-position:0 -2457px}#loco-admin.wrap .region-ax{background-position:0 -2470px}#loco-admin.wrap .region-ao{background-position:0 -2483px}#loco-admin.wrap .region-bt{background-position:0 -2496px}#loco-admin.wrap .region-bb{background-position:0 -2509px}#loco-admin.wrap .region-cf{background-position:0 -2522px}#loco-admin.wrap .region-mm{background-position:0 -2535px}#loco-admin.wrap .region-li{background-position:0 -2548px}#loco-admin.wrap .region-na{background-position:0 -2561px}#loco-admin.wrap .region-mz{background-position:0 -2574px}#loco-admin.wrap .region-to{background-position:0 -2587px}#loco-admin.wrap .region-vg{background-position:0 -2600px}#loco-admin.wrap .region-ve{background-position:0 -2613px}#loco-admin.wrap .region-tz{background-position:0 -2626px}#loco-admin.wrap .region-tm{background-position:0 -2639px}#loco-admin.wrap .region-mx{background-position:0 -2652px}#loco-admin.wrap .region-nc{background-position:0 -2665px}#loco-admin.wrap .region-mo{background-position:0 -2678px}#loco-admin.wrap .region-lk{background-position:0 -2691px}#loco-admin.wrap .region-cd{background-position:0 -2704px}#loco-admin.wrap .region-al{background-position:0 -2717px}#loco-admin.wrap .region-bw{background-position:0 -2730px}#loco-admin.wrap .region-cr{background-position:0 -2743px}#loco-admin.wrap .region-bv{background-position:0 -2756px}#loco-admin.wrap .region-am{background-position:0 -2769px}#loco-admin.wrap .region-az{background-position:0 -2782px}#loco-admin.wrap .region-ba{background-position:0 -2795px}#loco-admin.wrap .region-mn{background-position:0 -2808px}#loco-admin.wrap .region-nu{background-position:0 -2821px}#loco-admin.wrap .region-my{background-position:0 -2834px}#loco-admin.wrap .region-tl{background-position:0 -2847px}#loco-admin.wrap .region-ws{background-position:0 -2860px}#loco-admin.wrap .region-th{background-position:0 -2873px}#loco-admin.wrap .region-nf{background-position:0 -2886px}#loco-admin.wrap .region-ly{background-position:0 -2899px}#loco-admin.wrap .region-ai{background-position:0 -2912px}#loco-admin.wrap .region-br{background-position:0 -2925px}#loco-admin.wrap .region-cv{background-position:0 -2938px}#loco-admin.wrap .region-be{background-position:0 -2951px}#loco-admin.wrap .region-ca{background-position:0 -2964px}#loco-admin.wrap .region-bd{background-position:0 -2977px}#loco-admin.wrap .region-cw{background-position:0 -2990px}#loco-admin.wrap .region-bs{background-position:0 -3003px}#loco-admin.wrap .region-ng{background-position:0 -3016px}#loco-admin.wrap .region-mk{background-position:0 -3029px}#loco-admin.wrap .region-np{background-position:0 -3042px}#loco-admin.wrap .region-va{background-position:0 -3055px}#loco-admin.wrap .region-uz{background-position:0 -3068px}#loco-admin.wrap .region-um{background-position:0 -3081px}#loco-admin.wrap .region-tk{background-position:0 -3094px}#loco-admin.wrap .region-vc{background-position:0 -3107px}#loco-admin.wrap .region-zw{background-position:0 -3120px}#loco-admin.wrap .region-nr{background-position:0 -3133px}#loco-admin.wrap .region-ne{background-position:0 -3146px}#loco-admin.wrap .region-cu{background-position:0 -3159px}#loco-admin.wrap .region-bq{background-position:0 -3172px}#loco-admin.wrap .region-bf{background-position:0 -3185px}#loco-admin.wrap .region-bg{background-position:0 -3198px}#loco-admin.wrap .region-cc{background-position:0 -3211px}#loco-admin.wrap .region-mh{background-position:0 -3224px}#loco-admin.wrap .region-za{background-position:0 -3237px}#loco-admin.wrap .region-uy{background-position:0 -3250px}#loco-admin.wrap .region-wf{background-position:0 -3263px}#loco-admin.wrap .region-vu{background-position:0 -3276px}#loco-admin.wrap .region-tj{background-position:0 -3289px}#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd{background-position:0 -3302px}#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia{background-position:0 -3315px}#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy{background-position:0 -3328px}#loco-admin.wrap .x-eu{background-position:0 -3341px}#loco-admin.wrap .region-jp,#loco-admin.wrap .region-fi,#loco-admin.wrap .region-cy,#loco-admin.wrap .region-pl,#loco-admin.wrap .region-fo,#loco-admin.wrap .region-kr,#loco-admin.wrap .region-ru,#loco-admin.wrap .region-va{outline:solid 1px #ddd}#loco-admin.wrap .overlay-title .region,#loco-admin.wrap .overlay-title .lang-ca,#loco-admin.wrap .overlay-title .lang-eo,#loco-admin.wrap .overlay-title .lang-eu,#loco-admin.wrap .overlay-title .variant-wales,#loco-admin.wrap .overlay-title .variant-scotland,#loco-admin.wrap .overlay-title .variant-valencia,#loco-admin.wrap .overlay-title .region-gb.lang-gd,#loco-admin.wrap .overlay-title .region-gb.lang-cy,#loco-admin.wrap .overlay-title .region-es.lang-ca,#loco-admin.wrap .overlay-title .region-es.variant-valencia,#loco-admin.wrap .overlay-title .lang-tlh{outline:none}#loco-admin.wrap span.lang code{display:none}#loco-admin.wrap .icon-share:before{content:"↑"}#loco-admin.wrap .icon-notag:before{content:""}#loco-admin.wrap .icon-magnify:before{content:"🔍"}#loco-admin.wrap .icon-python:before{content:"🐍"}#loco-admin.wrap .icon-unicode:before{content:"u"}#loco-admin.wrap .icon-json:before{content:"{"}#loco-admin.wrap .icon-translate:before{content:""}#loco-admin.wrap .icon-project:before{content:""}#loco-admin.wrap .icon-plural:before{content:"᛬"}#loco-admin.wrap .icon-max:before,#loco-admin.wrap .icon-full-screen:before{content:""}#loco-admin.wrap .icon-min:before{content:""}#loco-admin.wrap .icon-sort:before{content:""}#loco-admin.wrap .icon-ok:before,#loco-admin.wrap .notice-success>.has-icon:before,#loco-admin.wrap .notice-success p>strong.has-icon:before,#loco-admin.wrap .panel-success>.has-icon:before,#loco-admin.wrap .panel-success p>strong.has-icon:before{content:"✓"}#loco-admin.wrap .icon-ok-empty:before{content:"🗌"}#loco-admin.wrap .icon-play:before{content:"⏵"}#loco-admin.wrap .icon-checkbox-checked:before,#loco-admin.wrap .selector.multi li.selected .icon-checkbox:before{content:"☑"}#loco-admin.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco-admin.wrap .icon-checkbox-partial:before{content:"☉"}#loco-admin.wrap .icon-radio-checked:before{content:"⚫"}#loco-admin.wrap .icon-radio-unchecked:before{content:"⚪"}#loco-admin.wrap .icon-ext:before{content:"⬈"}#loco-admin.wrap .icon-pdf:before{content:"P"}#loco-admin.wrap .icon-zip:before{content:"Z"}#loco-admin.wrap .icon-bullist:before{content:""}#loco-admin.wrap .icon-numlist:before{content:""}#loco-admin.wrap .icon-indent:before{content:""}#loco-admin.wrap .icon-outdent:before{content:""}#loco-admin.wrap .icon-link:before{content:""}#loco-admin.wrap .icon-unlink:before{content:""}#loco-admin.wrap .icon-bold:before{content:"B"}#loco-admin.wrap .icon-italic:before{content:"I"}#loco-admin.wrap .icon-library:before,#loco-admin.wrap .icon-glossary:before{content:"📚"}#loco-admin.wrap .icon-star:before{content:""}#loco-admin.wrap .icon-user:before{content:""}#loco-admin.wrap .icon-remove:before,#loco-admin.wrap a.icon.close:before{content:"×"}#loco-admin.wrap .icon-cog:before{content:""}#loco-admin.wrap .icon-trash:before{content:""}#loco-admin.wrap .icon-time:before,#loco-admin.wrap .icon-history:before{content:""}#loco-admin.wrap .icon-download:before{content:""}#loco-admin.wrap .icon-revert:before{content:""}#loco-admin.wrap .icon-sync:before{content:""}#loco-admin.wrap .icon-lock:before,#loco-admin.wrap .notice-locked>.has-icon:before,#loco-admin.wrap .notice-locked p>strong.has-icon:before,#loco-admin.wrap .panel-locked>.has-icon:before,#loco-admin.wrap .panel-locked p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-flag:before{content:""}#loco-admin.wrap .icon-tag:before{content:""}#loco-admin.wrap .icon-tags:before{content:""}#loco-admin.wrap .icon-print:before{content:""}#loco-admin.wrap .icon-camera:before{content:""}#loco-admin.wrap .icon-pencil:before{content:""}#loco-admin.wrap .icon-add:before{content:""}#loco-admin.wrap .icon-del:before{content:""}#loco-admin.wrap .icon-clear:before,#loco-admin.wrap a.icon.clear:before{content:""}#loco-admin.wrap .icon-ok-sign:before{content:"✔"}#loco-admin.wrap .icon-help:before{content:"?"}#loco-admin.wrap .icon-info:before,#loco-admin.wrap .notice-info>.has-icon:before,#loco-admin.wrap .notice-info p>strong.has-icon:before,#loco-admin.wrap .panel-info>.has-icon:before,#loco-admin.wrap .panel-info p>strong.has-icon:before{content:"ℹ"}#loco-admin.wrap .icon-cancel:before{content:""}#loco-admin.wrap .icon-warn:before,#loco-admin.wrap .notice-error>.has-icon:before,#loco-admin.wrap .notice-error p>strong.has-icon:before,#loco-admin.wrap .panel-error>.has-icon:before,#loco-admin.wrap .panel-error p>strong.has-icon:before,#loco-admin.wrap .notice-warning>.has-icon:before,#loco-admin.wrap .notice-warning p>strong.has-icon:before,#loco-admin.wrap .panel-warning>.has-icon:before,#loco-admin.wrap .panel-warning p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-comment:before{content:""}#loco-admin.wrap .icon-bar-chart:before{content:""}#loco-admin.wrap .icon-key:before{content:""}#loco-admin.wrap .icon-cogs:before{content:""}#loco-admin.wrap .icon-comments:before{content:""}#loco-admin.wrap .icon-signout:before{content:""}#loco-admin.wrap .icon-signin:before{content:""}#loco-admin.wrap .icon-upload:before{content:""}#loco-admin.wrap .icon-twitter:before{content:"🐦"}#loco-admin.wrap .icon-facebook:before{content:""}#loco-admin.wrap .icon-github:before{content:""}#loco-admin.wrap .icon-feed:before{content:""}#loco-admin.wrap .icon-globe:before{content:""}#loco-admin.wrap .icon-wrench:before,#loco-admin.wrap .notice-debug>.has-icon:before,#loco-admin.wrap .notice-debug p>strong.has-icon:before,#loco-admin.wrap .panel-debug>.has-icon:before,#loco-admin.wrap .panel-debug p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-group:before{content:""}#loco-admin.wrap .icon-cloud:before{content:""}#loco-admin.wrap .icon-copy:before{content:""}#loco-admin.wrap .icon-save:before{content:""}#loco-admin.wrap .icon-menu:before{content:""}#loco-admin.wrap .icon-table:before{content:""}#loco-admin.wrap .icon-caret-down:before{content:"▼"}#loco-admin.wrap .icon-caret-up:before{content:"▲"}#loco-admin.wrap .icon-caret-right:before{content:"▶"}#loco-admin.wrap .icon-mail:before{content:""}#loco-admin.wrap .icon-cloud-upload:before{content:""}#loco-admin.wrap .icon-file:before{content:""}#loco-admin.wrap .icon-circle-white:before{content:"⚬"}#loco-admin.wrap .icon-circle-black:before{content:"●"}#loco-admin.wrap .icon-eraser:before{content:""}#loco-admin.wrap .icon-unlock:before{content:""}#loco-admin.wrap .icon-apple:before{content:""}#loco-admin.wrap .icon-android:before{content:""}#loco-admin.wrap .icon-robot:before{content:"🤖"}#loco-admin.wrap .icon-back:before{content:"⬅"}#loco-admin.wrap .icon-next:before{content:"➔"}#loco-admin.wrap .icon-arrow-up:before{content:"⬆"}#loco-admin.wrap .icon-arrow-down:before{content:"⬇"}#loco-admin.wrap .icon-confirm:before{content:"!"}#loco-admin.wrap .icon-visible:before{content:"⏿"}#loco-admin.wrap .icon-hidden:before{content:"*"}#loco-admin.wrap .icon-calendar:before{content:""}#loco-admin.wrap .icon-ccard:before{content:""}#loco-admin.wrap .icon-caret-left:before{content:"◀"}#loco-admin.wrap .icon-pro:before{content:"⚡"}#loco-admin.wrap .icon-bell:before{content:""}#loco-admin.wrap .icon-code:before{content:""}#loco-admin.wrap .icon-privacy:before{content:"🛡"}#loco-admin.wrap .icon-hellip:before{content:"…"}#loco-admin.wrap .icon-vellip:before{content:"⁞"}#loco-admin.wrap .icon-collapse:before{content:""}#loco-admin.wrap .icon-expand:before{content:""}#loco-admin.wrap .icon-wordpress:before{content:""}#loco-admin.wrap .icon-restore:before{content:""}#loco-admin.wrap .icon-pilcrow:before{content:"¶"}#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before,#loco-admin.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-admin.wrap .icon,#loco-admin.wrap .has-icon:before{font-family:"loco"}#loco-admin.wrap .has-dashicon:before{font-family:"dashicons";font-size:1.4em}#loco-admin.wrap .has-icon:before,#loco-admin.wrap .has-dashicon:before,#loco-admin.wrap .has-icon>span{display:inline-block;vertical-align:middle}#loco-admin.wrap .only-icon{text-align:center}#loco-admin.wrap .only-icon:before{text-align:center;padding:0}#loco-admin.wrap .only-icon span{display:none}#loco-admin.wrap a,#loco-admin.wrap .wp-core-ui .button-link{text-decoration:none}#loco-admin.wrap h3:hover>a.loco-anchor{color:#ccc}#loco-admin.wrap h3:hover>a.loco-anchor:before{content:"¶"}#loco-admin.wrap .has-lang>span{display:inline-block;vertical-align:middle}#loco-admin.wrap a.has-lang:hover>span:last-child{text-decoration:underline}#loco-admin.wrap h1 ul,#loco-admin.wrap h1 li{margin:0;padding:0}#loco-admin.wrap h1 li{display:inline-block}#loco-admin.wrap h1 li:after{content:"/";color:#999;text-shadow:none;display:inline-block}#loco-admin.wrap h1 li:last-child:after{content:""}#loco-admin.wrap h1 li:last-child a{color:inherit;pointer-events:none;cursor:auto}#loco-admin.wrap h2 span{color:#999;font-weight:normal}#loco-admin.wrap h2 .loco-meta,#loco-admin.wrap h3 .loco-meta{color:inherit;font-size:14px;font-weight:normal;vertical-align:middle}#loco-admin.wrap .wp-list-table td:first-child .icon{width:16px;display:inline-block;text-align:center}#loco-admin.wrap .wp-list-table td{white-space:nowrap}#loco-admin.wrap .wp-list-table td>a,#loco-admin.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-admin.wrap .wp-list-table th.loco-sort{cursor:pointer}#loco-admin.wrap .wp-list-table th.loco-sort:hover{color:#000}#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after{padding:0 0 0 4px;color:#999}#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after{content:"▼"}#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after{content:"▲"}#loco-admin.wrap .wp-list-table td.has-row-actions{overflow:visible}#loco-admin.wrap .wp-list-table tfoot td{font-size:12px;color:#666}#loco-admin.wrap form.loco-filter{display:block;margin-bottom:5px}#loco-admin.wrap form.loco-filter .icon-filter{color:#999}#loco-admin.wrap nav.above-list-table{margin-bottom:1em}#loco-admin.wrap nav.above-list-table a{display:inline-block;margin-right:1em}#loco-admin.wrap .wp-core-ui button.inverted,#loco-admin.wrap .wp-core-ui button.inverted:hover,#loco-admin.wrap .po-fuzzy button.icon-cloud{background:-moz-linear-gradient(top, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);background:-webkit-linear-gradient(top, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);background:linear-gradient(to bottom, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;border-color:gray}#loco-admin.wrap .wp-core-ui button:active,#loco-admin.wrap .wp-core-ui button.inverted:active{border-color:#5b9dd9}#loco-admin.wrap .loco-clearable{display:inline-block;vertical-align:middle;position:relative}#loco-admin.wrap .loco-clearable a.clear,#loco-admin.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:inherit}#loco-admin.wrap .loco-clearable a.clear:before,#loco-admin.wrap .auto-comp-wrap a.clear:before{vertical-align:middle;padding:0;color:#999}#loco-admin.wrap .loco-clearable a.clear:hover:before,#loco-admin.wrap .auto-comp-wrap a.clear:hover:before{color:#333}#loco-admin.wrap .loco-clearable a.clear span,#loco-admin.wrap .auto-comp-wrap a.clear span{display:none}#loco-admin.wrap .loco-clearable ::-ms-clear,#loco-admin.wrap .auto-comp-wrap ::-ms-clear{display:none}#loco-admin.wrap div.progress{color:#000;background:transparent !important}#loco-admin.wrap div.progress *{height:100%;overflow:hidden;white-space:nowrap}#loco-admin.wrap div.progress .t{background-color:#ddd;border:1px solid #ccc}#loco-admin.wrap div.progress .t .bar{float:left;clear:none;background-color:#3db63d}#loco-admin.wrap div.progress .t .bar.f{background-color:#bd2c00}#loco-admin.wrap div.progress .l{display:block}#loco-admin.wrap td div.progress .t{border:none}#loco-admin.wrap td div.progress .l{display:none}#loco-admin.wrap code.path{color:#333;margin:0;padding:0;display:inline;background:transparent}#loco-admin.wrap .loco-danger{color:#d54e21}#loco-admin.wrap .notice,#loco-admin.wrap .panel{border:1px solid #ddd;border-left-width:4px;background:#fff;position:relative;margin:1em 0;padding:1px 12px;box-shadow:0 1px 1px rgba(0,0,0,.04)}#loco-admin.wrap .notice p,#loco-admin.wrap .panel p{margin:.5em 0;padding:2px}#loco-admin.wrap .notice-success,#loco-admin.wrap .panel-success{border-color:#00a32a}#loco-admin.wrap .notice-success>.has-icon,#loco-admin.wrap .notice-success p>strong.has-icon,#loco-admin.wrap .panel-success>.has-icon,#loco-admin.wrap .panel-success p>strong.has-icon{color:#000}#loco-admin.wrap .notice-warning,#loco-admin.wrap .panel-warning{border-color:orange}#loco-admin.wrap .notice-error,#loco-admin.wrap .panel-error{border-color:#dc3232}#loco-admin.wrap .notice-debug,#loco-admin.wrap .panel-debug{border-color:#00a0d2}#loco-admin.wrap .notice-info,#loco-admin.wrap .panel-info{border-color:#72aee6}#loco-admin.wrap .notice-danger,#loco-admin.wrap .panel-danger{border-color:#dc3232}#loco-admin.wrap .notice-locked,#loco-admin.wrap .panel-locked{border-color:orange}#loco-admin.wrap .notice>.has-icon:before,#loco-admin.wrap .notice p>strong.has-icon:before,#loco-admin.wrap .panel>.has-icon:before,#loco-admin.wrap .panel p>strong.has-icon:before{padding-right:6px}#loco-admin.wrap .notice>p>a.button.has-icon:before,#loco-admin.wrap .panel>p>a.button.has-icon:before{width:1.2em}#loco-admin.wrap .notice>p>em,#loco-admin.wrap .panel>p>em{color:#d54e21;font-style:normal}#loco-admin.wrap .notice>p>em a,#loco-admin.wrap .panel>p>em a{color:inherit}#loco-admin.wrap .notice>p a:hover,#loco-admin.wrap .notice>nav a:hover,#loco-admin.wrap .panel>p a:hover,#loco-admin.wrap .panel>nav a:hover{text-decoration:underline}#loco-admin.wrap .notice>p a.button,#loco-admin.wrap .notice>nav a.button,#loco-admin.wrap .panel>p a.button,#loco-admin.wrap .panel>nav a.button{text-decoration:inherit}#loco-admin.wrap .notice>p:not(:first-child)>strong.has-icon:first-child,#loco-admin.wrap .panel>p:not(:first-child)>strong.has-icon:first-child{visibility:hidden}#loco-admin.wrap .notice.has-nav,#loco-admin.wrap .panel.has-nav{display:flex;flex-direction:row}#loco-admin.wrap .notice.has-nav p,#loco-admin.wrap .notice.has-nav nav,#loco-admin.wrap .panel.has-nav p,#loco-admin.wrap .panel.has-nav nav{line-height:22px;flex-grow:1}#loco-admin.wrap .notice.has-nav nav,#loco-admin.wrap .panel.has-nav nav{text-align:right;padding:2px;margin:.5em 0}#loco-admin.wrap .notice.has-nav.is-dismissible,#loco-admin.wrap .panel.has-nav.is-dismissible{padding-right:38px}#loco-admin.wrap .notice.has-nav a,#loco-admin.wrap .panel.has-nav a{white-space:nowrap}#loco-admin.wrap .notice.has-nav nav>span,#loco-admin.wrap .panel.has-nav nav>span{color:#666}#loco-admin.wrap .notice>h3>span,#loco-admin.wrap .panel>h3>span{display:inline-block;vertical-align:middle}#loco-admin.wrap ul.problems li{font-style:italic}#loco-admin.wrap label{position:relative}#loco-admin.wrap label.for-disabled,#loco-admin.wrap label.for-disabled>input{cursor:default !important}#loco-admin.wrap input.regular-text,#loco-admin.wrap textarea.regular-text{width:25em}#loco-admin.wrap .button-link{padding:0 10px 1px}#loco-admin.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-admin.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-admin.wrap .button-success:hover{background:#3db63d}#loco-admin.wrap .button-danger[disabled],#loco-admin.wrap .button-success[disabled]{text-shadow:none !important}#loco-admin.wrap form button.loco-loading.button-large{padding-left:0}#loco-admin.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-admin.wrap ::placeholder{color:#ccc}#loco-admin.wrap ::-webkit-input-placeholder{color:#ccc}#loco-admin.wrap :-moz-placeholder{color:#ccc;opacity:1}#loco-admin.wrap ::-moz-placeholder{color:#ccc;opacity:1}#loco-admin.wrap :-ms-input-placeholder{color:#ccc}#loco-admin.wrap .ielt10 .placeheld{color:#ccc}#loco-admin.wrap a.has-raquo:after{content:" »"}#loco-admin.wrap a.has-laquo:before{content:"« "}#loco-admin.wrap span.inline-spinner{display:inline-block;min-width:16px;min-height:16px;background:transparent url(../img/spin-modal.gif?v=2.6.10) 0 0 no-repeat}@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-admin.wrap span.inline-spinner{background-size:100%;background-image:url(../img/spin-modal@2x.gif?v=2.6.10)}}.js #wpbody-content>.notice{display:none}.js #wpbody-content>.notice.inline{display:block}.js #loco-admin.wrap .jshide,.no-js #loco-admin.wrap .jsonly{display:none !important}#loco-admin.wrap .invis{visibility:hidden}.form-table tr td{vertical-align:top}.form-table tr.compact td{padding-top:0}.form-table tr th a.icon-help{display:none}.loco-modal{min-width:50%;min-height:100px}.loco-modal-wide{min-width:90% !important}.loco-modal-no-close .ui-dialog-titlebar-close{display:none}.loco-modal .ui-dialog-titlebar-close{overflow:hidden}.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.6.10) center 20px no-repeat}@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){.ui-dialog-content>div.loco-loading{background-size:16px;background-image:url(../img/spin-modal.gif?v=2.6.10@2x.gif?v=2.6.10)}}#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}#loco-credit>*{vertical-align:middle}#loco-credit>a{display:inline-block;position:relative;overflow:hidden;background:transparent url(../img/logo-foot.gif?v=2.6.10) 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)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#66c6e4 !important;background:#008ec2 !important;border-color:#008ec2 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../img/skins/fresh/spin-primary-button.gif?v=2.6.10) 0 0 no-repeat !important}@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){.wp-core-ui .button-primary.loco-loading[disabled]:before{background-size:16px !important;background-image:url(../img/skins/fresh/spin-primary-button@2x.gif?v=2.6.10) !important}} \ No newline at end of file +._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.6.10);background-repeat:no-repeat;min-height:16px}._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.6.10) 0 0 no-repeat;min-height:75px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.6.10);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.6.10);background-size:16px}._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.6.10);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-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco-admin.wrap .icon,#loco-admin.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?v=2.6.10");src:url("../font/loco.eot?v=2.6.10?#iefix") format("embedded-opentype"),url("../font/loco.woff?v=2.6.10") format("woff"),url("../font/loco.ttf?v=2.6.10") format("truetype"),url("../font/loco.svg?v=2.6.10#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-admin.wrap .selector li,#loco-admin.wrap .selector .handle,#loco-admin.wrap .selectorsep:before,#loco-admin.wrap .selectoradd a,#loco-admin.wrap .selectorsep a{padding:.3em .75em}#loco-admin.wrap .selector{text-align:left;display:inline-block;white-space:nowrap}#loco-admin.wrap .selectoradd a,#loco-admin.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-admin.wrap .selectorsep{display:inline-block;border:solid 1px transparent}#loco-admin.wrap .selectorsep:before{display:block;position:relative;color:#999;height:1.3em;overflow:hidden}#loco-admin.wrap .selectorsep a.icon{display:block;position:relative;line-height:1em;color:#666;height:1.3em;overflow:hidden}#loco-admin.wrap .selectorsep a.icon:before{padding:0}#loco-admin.wrap .selector .handle{outline:none;white-space:nowrap;padding-right:2.3em;max-width:250px;text-overflow:ellipsis}#loco-admin.wrap .selector .handle .prefix{padding-right:.6ex}#loco-admin.wrap .selector .handle:after{font-family:loco;font-size:1.3em;color:#ccc;display:block;position:absolute;top:.25em;right:.6em;content:"▼"}#loco-admin.wrap .selector .handle:focus:after,#loco-admin.wrap .selector .handle:hover:after{color:#666}#loco-admin.wrap .selector.no-caret .handle{padding-right:.75em}#loco-admin.wrap .selector.no-caret .handle:after{display:none}#loco-admin.wrap .selector.no-title .handle{padding-left:.5em;padding-right:.5em}#loco-admin.wrap .selector.no-title .handle .label{display:none}#loco-admin.wrap .selector.no-title .handle .icon{margin-right:0px}#loco-admin.wrap .selector.dummy .handle{border-color:transparent}#loco-admin.wrap .selector.dummy .handle:after{display:none}#loco-admin.wrap .selectoradd{position:relative}#loco-admin.wrap .selectoradd>*{display:block;float:left;clear:none}#loco-admin.wrap .selectoradd>a.has-icon{width:1.3em}#loco-admin.wrap .selectoradd>a.has-icon:before{color:#999;display:inline;padding-left:0;padding-right:0;line-height:1.4em}#loco-admin.wrap .selectoradd>a.has-icon:hover:after{color:#2e892e}#loco-admin.wrap .selectorsep{display:inline-block}#loco-admin.wrap .selectorsep span{color:#666;height:1.3em}#loco-admin.wrap .selector ul,#loco-admin.wrap .selector li{display:block;position:relative;cursor:default;margin:0}#loco-admin.wrap .selector ul{padding:0;overflow:auto}#loco-admin.wrap .selector.multi li input{display:none}#loco-admin.wrap .selector li.selected{background:#e5e5e5}#loco-admin.wrap .selector li.over{background-color:#ccc;color:#fff;text-shadow:1px 1px #aaa}#loco-admin.wrap .selector li.over .label{color:#fff}#loco-admin.wrap .selector .label{font:inherit;color:inherit}#loco-admin.wrap .selector .icon{display:inline-block;min-width:1.2em;text-align:center;font-size:14px}#loco-admin.wrap .selector .icon.no-icon{display:none}#loco-admin.wrap .selector .icon:before{color:#666}#loco-admin.wrap .selector .label{line-height:1;vertical-align:text-bottom}#loco-admin.wrap .selector .lang{vertical-align:middle}#loco-admin.wrap .selector .icon,#loco-admin.wrap .selector .icon-16{vertical-align:text-bottom}#loco-admin.wrap .selector .icon,#loco-admin.wrap .selector .lang,#loco-admin.wrap .selector .icon-16{margin-right:5px}#loco-admin.wrap .selector .region,#loco-admin.wrap .selector .lang-tlh,#loco-admin.wrap .selector .variant-wales,#loco-admin.wrap .selector .region-gb.lang-cy,#loco-admin.wrap .selector .variant-scotland,#loco-admin.wrap .selector .region-gb.lang-gd,#loco-admin.wrap .selector .variant-valencia,#loco-admin.wrap .selector .region-es.variant-valencia,#loco-admin.wrap .selector .lang-ca,#loco-admin.wrap .selector .region-es.lang-ca,#loco-admin.wrap .selector .lang-eo,#loco-admin.wrap .selector .lang-eu{margin-left:2px;margin-right:7px}#loco-admin.wrap .selector.avatars .label{line-height:18px}#loco-admin.wrap .selector.avatars .avtr,#loco-admin.wrap .selector.avatars .icon-user{width:18px;height:18px;line-height:18px}#loco-admin.wrap .selector.avatars .avtr{background-size:18px;background-repeat:no-repeat}#loco-admin.wrap .selector.ticked .icon.no-icon{font-size:12px;display:inline-block}#loco-admin.wrap .selector.ticked .selected .icon.no-icon:before{content:"✓"}#loco-admin.wrap .selectoradd a:focus,#loco-admin.wrap .selectoradd a:hover,#loco-admin.wrap .selector .handle:focus,#loco-admin.wrap .selector .handle:hover{color:#000;border-color:#999}#loco-admin.wrap .selectoradd a:focus{outline:none}#loco-admin.wrap .selector.active .handle{border-color:#999;background-color:#eee;color:#999}#loco-admin.wrap .selector.active .handle:after{color:#999;content:"▲"}#loco-admin.wrap .selector.disabled,#loco-admin.wrap .selectoradd.disabled{cursor:default;cursor:no-drop;cursor:not-allowed}#loco-admin.wrap .selectoradd.disabled a,#loco-admin.wrap .selector.disabled .handle{pointer-events:none;color:#999}#loco-admin.wrap .selector.readonly .handle{pointer-events:none;border-color:#ddd}#loco-admin.wrap .selector.readonly .handle,#loco-admin.wrap .selector.disabled .handle{padding-right:1em}#loco-admin.wrap .selector.readonly .handle:after,#loco-admin.wrap .selector.disabled .handle:after{display:none}#loco-admin.wrap .selector.readonly .handle span.icon,#loco-admin.wrap .selector.disabled .handle span.icon{color:#999 !important}#loco-admin.wrap .selector li.disabled,#loco-admin.wrap .selector li.disabled.over{color:#aaa;text-shadow:1px 1px #fff;pointer-events:none}#loco-admin.wrap .selector li.disabled *{cursor:text}#loco-admin.wrap .selector li.disabled .icon:before{color:#aaa}#loco-admin.wrap .selector li.disabled .flag,#loco-admin.wrap .selector li.disabled .icon-16{opacity:.4}#loco-admin.wrap .selectorset .selector{float:left;clear:left}#loco-admin.wrap .selectorset .selectoradd,#loco-admin.wrap .selectorset .selectorsep{float:left;clear:none}#loco-admin.wrap body>.selector{display:block;position:fixed;top:0;left:0;margin:0;padding:0;background:#f5f5f5;box-shadow:0 10px 5px rgba(0,0,0,.2);border:solid 1px #ccc;z-index:400001;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#loco-admin.wrap body>.selector form{display:none}#loco-admin.wrap body>.selector.filterable form{display:block;border-bottom:solid 1px #ddd}#loco-admin.wrap body>.selector.filterable form input{margin:0;display:block;position:relative;background:#fff;width:100%;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;padding-left:.75em;border:none}#loco-admin.wrap body>.selector.filterable 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-admin.wrap body>.selector.filterable form ::placeholder{color:#ddd;font-family:"loco";display:block;position:relative;font-size:17px;top:1px}#loco-admin.wrap body>.selector.filterable form ::-webkit-input-placeholder{color:#ddd;font-family:"loco";display:block;position:relative;font-size:17px;top:1px}#loco-admin.wrap body>.selector.filterable form :-moz-placeholder{color:#ddd;font-family:"loco";display:block;position:relative;font-size:17px;top:1px;opacity:1}#loco-admin.wrap body>.selector.filterable form ::-moz-placeholder{color:#ddd;font-family:"loco";display:block;position:relative;font-size:17px;top:1px;opacity:1}#loco-admin.wrap body>.selector.filterable form :-ms-input-placeholder{color:#ddd;font-family:"loco";display:block;position:relative;font-size:17px;top:1px}#loco-admin.wrap body>.selector.filterable form .ielt10 .placeheld{color:#ddd;font-family:"loco";display:block;position:relative;font-size:17px;top:1px}#loco-admin.wrap body>.selector.none{border-color:#bd2c00}#loco-admin.wrap body>.selector.none form input:focus{-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-admin.wrap body>.selector.none li{opacity:.4}#loco-admin.wrap div.auto-comp-wrap{width:100%}#loco-admin.wrap div.auto-comp-wrap input{display:inline-block}#loco-admin.wrap div.auto-comp-wrap.loading input{background:transparent url(../img/ajax-loader.gif?v=2.6.10) right 2px no-repeat}#loco-admin.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-admin.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-admin.wrap div.auto-comp-result:first-child{border-top:solid 1px #ddd}#loco-admin.wrap div.auto-comp-result>*{display:inline-block;vertical-align:middle;line-height:normal}#loco-admin.wrap div.auto-comp-result .icon:before{padding-right:5px}#loco-admin.wrap div.auto-comp-result:hover{background:#a8a8a8;color:#fff;border-top-color:#a8a8a8;border-bottom-color:#999}#loco-admin.wrap div.auto-comp-result.selected{background:#666 !important;color:#fff;border-top-color:#666;border-bottom-color:#666}#loco-admin.wrap div.auto-comp-result .lang,#loco-admin.wrap div.auto-comp-result .region,#loco-admin.wrap div.auto-comp-result .lang-tlh,#loco-admin.wrap div.auto-comp-result .variant-wales,#loco-admin.wrap div.auto-comp-result .region-gb.lang-cy,#loco-admin.wrap div.auto-comp-result .variant-scotland,#loco-admin.wrap div.auto-comp-result .region-gb.lang-gd,#loco-admin.wrap div.auto-comp-result .variant-valencia,#loco-admin.wrap div.auto-comp-result .region-es.variant-valencia,#loco-admin.wrap div.auto-comp-result .lang-ca,#loco-admin.wrap div.auto-comp-result .region-es.lang-ca,#loco-admin.wrap div.auto-comp-result .lang-eo,#loco-admin.wrap div.auto-comp-result .lang-eu,#loco-admin.wrap div.auto-comp-result .avtr{margin-right:5px}#loco-admin.wrap div.auto-comp-wrap.error a.icon.clear:before{color:#c00;opacity:1}#loco-admin.wrap div.auto-comp-wrap.error input[type=text]{border-color:#c00;color:#c00}#loco-admin.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-admin.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.6.10);background-repeat:no-repeat;min-height:16px}#loco-admin.wrap ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.6.10) 0 0 no-repeat;min-height:75px}#loco-admin.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.6.10);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-admin.wrap ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2-x2.gif?v=2.6.10);background-size:16px}#loco-admin.wrap ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.6.10);background-size:16px}}#loco-admin.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-admin.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-admin.wrap .loco-font,#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco-admin.wrap .icon,#loco-admin.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-admin.wrap .has-icon:before{display:inline-block;padding-right:.3em}#loco-admin.wrap a.icon-help{cursor:help}#loco-admin.wrap a.icon-help span{display:none}#loco-admin.wrap .icon-share:before{content:"↑"}#loco-admin.wrap .icon-notag:before{content:""}#loco-admin.wrap .icon-magnify:before{content:"🔍"}#loco-admin.wrap .icon-python:before{content:"🐍"}#loco-admin.wrap .icon-unicode:before{content:"u"}#loco-admin.wrap .icon-json:before{content:"{"}#loco-admin.wrap .icon-translate:before{content:""}#loco-admin.wrap .icon-project:before{content:""}#loco-admin.wrap .icon-plural:before{content:"᛬"}#loco-admin.wrap .icon-max:before,#loco-admin.wrap .icon-full-screen:before{content:""}#loco-admin.wrap .icon-min:before{content:""}#loco-admin.wrap .icon-sort:before{content:""}#loco-admin.wrap .icon-ok:before,#loco-admin.wrap .notice-success>.has-icon:before,#loco-admin.wrap .notice-success p>strong.has-icon:before,#loco-admin.wrap .panel-success>.has-icon:before,#loco-admin.wrap .panel-success p>strong.has-icon:before{content:"✓"}#loco-admin.wrap .icon-ok-empty:before{content:"🗌"}#loco-admin.wrap .icon-play:before{content:"⏵"}#loco-admin.wrap .icon-checkbox-checked:before,#loco-admin.wrap .selector.multi li.selected .icon-checkbox:before{content:"☑"}#loco-admin.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco-admin.wrap .icon-checkbox-partial:before{content:"☉"}#loco-admin.wrap .icon-radio-checked:before{content:"⚫"}#loco-admin.wrap .icon-radio-unchecked:before{content:"⚪"}#loco-admin.wrap .icon-ext:before{content:"⬈"}#loco-admin.wrap .icon-pdf:before{content:"P"}#loco-admin.wrap .icon-zip:before{content:"Z"}#loco-admin.wrap .icon-bullist:before{content:""}#loco-admin.wrap .icon-numlist:before{content:""}#loco-admin.wrap .icon-indent:before{content:""}#loco-admin.wrap .icon-outdent:before{content:""}#loco-admin.wrap .icon-link:before{content:""}#loco-admin.wrap .icon-unlink:before{content:""}#loco-admin.wrap .icon-bold:before{content:"B"}#loco-admin.wrap .icon-italic:before{content:"I"}#loco-admin.wrap .icon-library:before,#loco-admin.wrap .icon-glossary:before{content:"📚"}#loco-admin.wrap .icon-star:before{content:""}#loco-admin.wrap .icon-user:before{content:""}#loco-admin.wrap .icon-remove:before,#loco-admin.wrap a.icon.close:before{content:"×"}#loco-admin.wrap .icon-cog:before{content:""}#loco-admin.wrap .icon-trash:before{content:""}#loco-admin.wrap .icon-time:before,#loco-admin.wrap .icon-history:before{content:""}#loco-admin.wrap .icon-download:before{content:""}#loco-admin.wrap .icon-revert:before{content:""}#loco-admin.wrap .icon-sync:before{content:""}#loco-admin.wrap .icon-lock:before,#loco-admin.wrap .notice-locked>.has-icon:before,#loco-admin.wrap .notice-locked p>strong.has-icon:before,#loco-admin.wrap .panel-locked>.has-icon:before,#loco-admin.wrap .panel-locked p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-flag:before{content:""}#loco-admin.wrap .icon-tag:before{content:""}#loco-admin.wrap .icon-tags:before{content:""}#loco-admin.wrap .icon-print:before{content:""}#loco-admin.wrap .icon-camera:before{content:""}#loco-admin.wrap .icon-pencil:before{content:""}#loco-admin.wrap .icon-add:before{content:""}#loco-admin.wrap .icon-del:before{content:""}#loco-admin.wrap .icon-clear:before,#loco-admin.wrap a.icon.clear:before{content:""}#loco-admin.wrap .icon-ok-sign:before{content:"✔"}#loco-admin.wrap .icon-help:before{content:"?"}#loco-admin.wrap .icon-info:before,#loco-admin.wrap .notice-info>.has-icon:before,#loco-admin.wrap .notice-info p>strong.has-icon:before,#loco-admin.wrap .panel-info>.has-icon:before,#loco-admin.wrap .panel-info p>strong.has-icon:before{content:"ℹ"}#loco-admin.wrap .icon-cancel:before{content:""}#loco-admin.wrap .icon-warn:before,#loco-admin.wrap .notice-error>.has-icon:before,#loco-admin.wrap .notice-error p>strong.has-icon:before,#loco-admin.wrap .panel-error>.has-icon:before,#loco-admin.wrap .panel-error p>strong.has-icon:before,#loco-admin.wrap .notice-warning>.has-icon:before,#loco-admin.wrap .notice-warning p>strong.has-icon:before,#loco-admin.wrap .panel-warning>.has-icon:before,#loco-admin.wrap .panel-warning p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-comment:before{content:""}#loco-admin.wrap .icon-bar-chart:before{content:""}#loco-admin.wrap .icon-key:before{content:""}#loco-admin.wrap .icon-cogs:before{content:""}#loco-admin.wrap .icon-comments:before{content:""}#loco-admin.wrap .icon-signout:before{content:""}#loco-admin.wrap .icon-signin:before{content:""}#loco-admin.wrap .icon-upload:before{content:""}#loco-admin.wrap .icon-twitter:before{content:"🐦"}#loco-admin.wrap .icon-facebook:before{content:""}#loco-admin.wrap .icon-github:before{content:""}#loco-admin.wrap .icon-feed:before{content:""}#loco-admin.wrap .icon-globe:before{content:""}#loco-admin.wrap .icon-wrench:before,#loco-admin.wrap .notice-debug>.has-icon:before,#loco-admin.wrap .notice-debug p>strong.has-icon:before,#loco-admin.wrap .panel-debug>.has-icon:before,#loco-admin.wrap .panel-debug p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-group:before{content:""}#loco-admin.wrap .icon-cloud:before{content:""}#loco-admin.wrap .icon-copy:before{content:""}#loco-admin.wrap .icon-save:before{content:""}#loco-admin.wrap .icon-menu:before{content:""}#loco-admin.wrap .icon-table:before{content:""}#loco-admin.wrap .icon-caret-down:before{content:"▼"}#loco-admin.wrap .icon-caret-up:before{content:"▲"}#loco-admin.wrap .icon-caret-right:before{content:"▶"}#loco-admin.wrap .icon-mail:before{content:""}#loco-admin.wrap .icon-cloud-upload:before{content:""}#loco-admin.wrap .icon-file:before{content:""}#loco-admin.wrap .icon-circle-white:before{content:"⚬"}#loco-admin.wrap .icon-circle-black:before{content:"●"}#loco-admin.wrap .icon-eraser:before{content:""}#loco-admin.wrap .icon-unlock:before{content:""}#loco-admin.wrap .icon-apple:before{content:""}#loco-admin.wrap .icon-android:before{content:""}#loco-admin.wrap .icon-robot:before{content:"🤖"}#loco-admin.wrap .icon-back:before{content:"⬅"}#loco-admin.wrap .icon-next:before{content:"➔"}#loco-admin.wrap .icon-arrow-up:before{content:"⬆"}#loco-admin.wrap .icon-arrow-down:before{content:"⬇"}#loco-admin.wrap .icon-confirm:before{content:"!"}#loco-admin.wrap .icon-visible:before{content:"⏿"}#loco-admin.wrap .icon-hidden:before{content:"*"}#loco-admin.wrap .icon-calendar:before{content:""}#loco-admin.wrap .icon-ccard:before{content:""}#loco-admin.wrap .icon-caret-left:before{content:"◀"}#loco-admin.wrap .icon-pro:before{content:"⚡"}#loco-admin.wrap .icon-bell:before{content:""}#loco-admin.wrap .icon-code:before{content:""}#loco-admin.wrap .icon-privacy:before{content:"🛡"}#loco-admin.wrap .icon-hellip:before{content:"…"}#loco-admin.wrap .icon-vellip:before{content:"⁞"}#loco-admin.wrap .icon-collapse:before{content:""}#loco-admin.wrap .icon-expand:before{content:""}#loco-admin.wrap .icon-wordpress:before{content:""}#loco-admin.wrap .icon-restore:before{content:""}#loco-admin.wrap .icon-pilcrow:before{content:"¶"}#loco-admin.wrap .icon-google:before{content:" ";background:transparent url(../img/sso/g.svg?v=2.6.10) 0 1px no-repeat;background-size:18px}#loco-admin.wrap .icon-status.is-translated:before,#loco-admin.wrap .is-translated>header>.icon-status:before{color:#2e892e;content:"✓";text-align:center}#loco-admin.wrap .icon-status.is-untranslated:before,#loco-admin.wrap .is-untranslated>header>.icon-status:before{color:#aaa;content:"×";text-align:center;font-size:1.1em}#loco-admin.wrap .icon-status.is-flagged:before,#loco-admin.wrap .is-flagged>header>.icon-status:before{color:#bd2c00;content:"";text-align:center}#loco-admin.wrap .icon-status.is-translated.is-blank:before,#loco-admin.wrap .icon-status.is-translated.is-inherit:before,#loco-admin.wrap .is-translated.is-blank>header>.icon-status:before,#loco-admin.wrap .is-translated.is-inherit>header>.icon-status:before{content:"🗌"}#loco-admin.wrap .icon-status.is-translated.is-blank:before,#loco-admin.wrap .is-translated.is-blank>header>.icon-status:before{color:#aaa}#loco-admin.wrap .icon-status.is-fuzzy:before,#loco-admin.wrap .is-fuzzy>header>.icon-status:before{color:#666;content:""}#loco-admin.wrap .lang,#loco-admin.wrap .region,#loco-admin.wrap .lang-tlh,#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy,#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd,#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia,#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca,#loco-admin.wrap .lang-eo,#loco-admin.wrap .lang-eu{color:#fff;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:1.33;text-align:center;white-space:normal;text-shadow:none;vertical-align:middle}#loco-admin.wrap .lang{width:20px;height:12px;background-color:#2e892e}#loco-admin.wrap .lang:before{content:attr(lang);vertical-align:baseline}#loco-admin.wrap .lang-el{background-color:#1d48a3}#loco-admin.wrap .lang-el:before{content:"Ελ"}#loco-admin.wrap .region,#loco-admin.wrap .lang-tlh,#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy,#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd,#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia,#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca,#loco-admin.wrap .lang-eo,#loco-admin.wrap .lang-eu{width:16px;height:12px;margin:0 2px;background-image:url(../img/flags-16.png?v=2.6.10);background-repeat:no-repeat;background-color:transparent;background-size:100%}@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-admin.wrap .region,#loco-admin.wrap .lang-tlh,#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy,#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd,#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia,#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca,#loco-admin.wrap .lang-eo,#loco-admin.wrap .lang-eu{background-image:url(../img/flags-32.png?v=2.6.10)}}#loco-admin.wrap .region:before,#loco-admin.wrap .lang-tlh:before,#loco-admin.wrap .variant-wales:before,#loco-admin.wrap .region-gb.lang-cy:before,#loco-admin.wrap .variant-scotland:before,#loco-admin.wrap .region-gb.lang-gd:before,#loco-admin.wrap .variant-valencia:before,#loco-admin.wrap .region-es.variant-valencia:before,#loco-admin.wrap .lang-ca:before,#loco-admin.wrap .region-es.lang-ca:before,#loco-admin.wrap .lang-eo:before,#loco-admin.wrap .lang-eu:before{visibility:hidden}#loco-admin.wrap .lang-zh{background-color:#b90000}#loco-admin.wrap .lang-zh.script-hans:before{content:"中国"}#loco-admin.wrap .lang-zh.script-hant:before{content:"中國"}#loco-admin.wrap .__{background-position:0 0}#loco-admin.wrap .lang-eo{background-position:0 -13px}#loco-admin.wrap .lang-tlh{background-position:0 -26px}#loco-admin.wrap .lang-eu{background-position:0 -39px}#loco-admin.wrap .lang-ca,#loco-admin.wrap .region-es.lang-ca{background-position:0 -52px}#loco-admin.wrap .region-tg{background-position:0 -65px}#loco-admin.wrap .region-me{background-position:0 -78px}#loco-admin.wrap .region-la{background-position:0 -91px}#loco-admin.wrap .region-mr{background-position:0 -104px}#loco-admin.wrap .region-ni{background-position:0 -117px}#loco-admin.wrap .region-lv{background-position:0 -130px}#loco-admin.wrap .region-om{background-position:0 -143px}#loco-admin.wrap .region-af{background-position:0 -156px}#loco-admin.wrap .region-cy{background-position:0 -169px}#loco-admin.wrap .region-bj{background-position:0 -182px}#loco-admin.wrap .region-aq{background-position:0 -195px}#loco-admin.wrap .region-cn{background-position:0 -208px}#loco-admin.wrap .region-co{background-position:0 -221px}#loco-admin.wrap .region-cx{background-position:0 -234px}#loco-admin.wrap .region-ag{background-position:0 -247px}#loco-admin.wrap .region-ms{background-position:0 -260px}#loco-admin.wrap .region-md{background-position:0 -273px}#loco-admin.wrap .region-zm{background-position:0 -286px}#loco-admin.wrap .region-vn{background-position:0 -299px}#loco-admin.wrap .region-tf{background-position:0 -312px}#loco-admin.wrap .region-td{background-position:0 -325px}#loco-admin.wrap .region-yt{background-position:0 -338px}#loco-admin.wrap .region-lb{background-position:0 -351px}#loco-admin.wrap .region-mf{background-position:0 -364px}#loco-admin.wrap .region-lu{background-position:0 -377px}#loco-admin.wrap .region-mq{background-position:0 -390px}#loco-admin.wrap .region-cz{background-position:0 -403px}#loco-admin.wrap .region-ae{background-position:0 -416px}#loco-admin.wrap .region-cm{background-position:0 -429px}#loco-admin.wrap .region-bi{background-position:0 -442px}#loco-admin.wrap .region-ar{background-position:0 -455px}#loco-admin.wrap .region-as{background-position:0 -468px}#loco-admin.wrap .region-bh{background-position:0 -481px}#loco-admin.wrap .region-cl{background-position:0 -494px}#loco-admin.wrap .region-ad{background-position:0 -507px}#loco-admin.wrap .region-mp{background-position:0 -520px}#loco-admin.wrap .region-lt{background-position:0 -533px}#loco-admin.wrap .region-mg{background-position:0 -546px}#loco-admin.wrap .region-lc{background-position:0 -559px}#loco-admin.wrap .region-tr{background-position:0 -572px}#loco-admin.wrap .region-ua{background-position:0 -585px}#loco-admin.wrap .region-tv{background-position:0 -598px}#loco-admin.wrap .region-vi{background-position:0 -611px}#loco-admin.wrap .region-mt{background-position:0 -624px}#loco-admin.wrap .region-no{background-position:0 -637px}#loco-admin.wrap .region-mc{background-position:0 -650px}#loco-admin.wrap .region-ch{background-position:0 -663px}#loco-admin.wrap .region-bl{background-position:0 -676px}#loco-admin.wrap .region-aw{background-position:0 -689px}#loco-admin.wrap .region-bz{background-position:0 -702px}#loco-admin.wrap .region-bm{background-position:0 -715px}#loco-admin.wrap .region-ci{background-position:0 -728px}#loco-admin.wrap .region-mu{background-position:0 -741px}#loco-admin.wrap .region-us{background-position:0 -754px}#loco-admin.wrap .region-tw{background-position:0 -767px}#loco-admin.wrap .region-ye{background-position:0 -780px}#loco-admin.wrap .region-mw{background-position:0 -793px}#loco-admin.wrap .region-nl{background-position:0 -806px}#loco-admin.wrap .region-ls{background-position:0 -819px}#loco-admin.wrap .region-bo{background-position:0 -832px}#loco-admin.wrap .region-at{background-position:0 -845px}#loco-admin.wrap .region-ck{background-position:0 -858px}#loco-admin.wrap .region-by{background-position:0 -871px}#loco-admin.wrap .region-au{background-position:0 -884px}#loco-admin.wrap .region-bn{background-position:0 -897px}#loco-admin.wrap .region-ma{background-position:0 -910px}#loco-admin.wrap .region-nz{background-position:0 -923px}#loco-admin.wrap .region-lr{background-position:0 -936px}#loco-admin.wrap .region-mv{background-position:0 -949px}#loco-admin.wrap .region-tc{background-position:0 -962px}#loco-admin.wrap .region-ug{background-position:0 -975px}#loco-admin.wrap .region-tt{background-position:0 -988px}#loco-admin.wrap .region-pl{background-position:0 -1001px}#loco-admin.wrap .region-rs{background-position:0 -1014px}#loco-admin.wrap .region-in{background-position:0 -1027px}#loco-admin.wrap .region-ge{background-position:0 -1040px}#loco-admin.wrap .region-gr{background-position:0 -1053px}#loco-admin.wrap .region-gs{background-position:0 -1066px}#loco-admin.wrap .region-gd{background-position:0 -1079px}#loco-admin.wrap .region-io{background-position:0 -1092px}#loco-admin.wrap .region-hk{background-position:0 -1105px}#loco-admin.wrap .region-kp{background-position:0 -1118px}#loco-admin.wrap .region-kg{background-position:0 -1131px}#loco-admin.wrap .region-pm{background-position:0 -1144px}#loco-admin.wrap .region-sv{background-position:0 -1157px}#loco-admin.wrap .region-re{background-position:0 -1170px}#loco-admin.wrap .region-sa{background-position:0 -1183px}#loco-admin.wrap .region-sc{background-position:0 -1196px}#loco-admin.wrap .region-st{background-position:0 -1209px}#loco-admin.wrap .region-ke{background-position:0 -1222px}#loco-admin.wrap .region-im{background-position:0 -1235px}#loco-admin.wrap .region-kr{background-position:0 -1248px}#loco-admin.wrap .region-gf{background-position:0 -1261px}#loco-admin.wrap .region-dj{background-position:0 -1274px}#loco-admin.wrap .region-gq{background-position:0 -1287px}#loco-admin.wrap .region-gp{background-position:0 -1300px}#loco-admin.wrap .region-dk{background-position:0 -1313px}#loco-admin.wrap .region-gg{background-position:0 -1326px}#loco-admin.wrap .region-il{background-position:0 -1339px}#loco-admin.wrap .region-pn{background-position:0 -1352px}#loco-admin.wrap .region-sb{background-position:0 -1365px}#loco-admin.wrap .region-py{background-position:0 -1378px}#loco-admin.wrap .region-ru{background-position:0 -1391px}#loco-admin.wrap .region-kw{background-position:0 -1404px}#loco-admin.wrap .region-do{background-position:0 -1417px}#loco-admin.wrap .region-gt{background-position:0 -1430px}#loco-admin.wrap .region-gb{background-position:0 -1443px}#loco-admin.wrap .region-gu{background-position:0 -1456px}#loco-admin.wrap .region-je{background-position:0 -1469px}#loco-admin.wrap .region-hm{background-position:0 -1482px}#loco-admin.wrap .region-sg{background-position:0 -1495px}#loco-admin.wrap .region-pk{background-position:0 -1508px}#loco-admin.wrap .region-sr{background-position:0 -1521px}#loco-admin.wrap .region-se{background-position:0 -1534px}#loco-admin.wrap .region-jp{background-position:0 -1547px}#loco-admin.wrap .region-gw{background-position:0 -1560px}#loco-admin.wrap .region-eh{background-position:0 -1573px}#loco-admin.wrap .region-dz{background-position:0 -1586px}#loco-admin.wrap .region-ga{background-position:0 -1599px}#loco-admin.wrap .region-fr{background-position:0 -1612px}#loco-admin.wrap .region-dm{background-position:0 -1625px}#loco-admin.wrap .region-hn{background-position:0 -1638px}#loco-admin.wrap .region-sd{background-position:0 -1651px}#loco-admin.wrap .region-rw{background-position:0 -1664px}#loco-admin.wrap .region-ph{background-position:0 -1677px}#loco-admin.wrap .region-ss{background-position:0 -1690px}#loco-admin.wrap .region-qa{background-position:0 -1703px}#loco-admin.wrap .region-pe{background-position:0 -1716px}#loco-admin.wrap .region-pr{background-position:0 -1729px}#loco-admin.wrap .region-si{background-position:0 -1742px}#loco-admin.wrap .region-ht{background-position:0 -1755px}#loco-admin.wrap .region-es{background-position:0 -1768px}#loco-admin.wrap .region-gl{background-position:0 -1781px}#loco-admin.wrap .region-gm{background-position:0 -1794px}#loco-admin.wrap .region-er{background-position:0 -1807px}#loco-admin.wrap .region-fi{background-position:0 -1820px}#loco-admin.wrap .region-ee{background-position:0 -1833px}#loco-admin.wrap .region-kn{background-position:0 -1846px}#loco-admin.wrap .region-hu{background-position:0 -1859px}#loco-admin.wrap .region-iq{background-position:0 -1872px}#loco-admin.wrap .region-ky{background-position:0 -1885px}#loco-admin.wrap .region-sh{background-position:0 -1898px}#loco-admin.wrap .region-ps{background-position:0 -1911px}#loco-admin.wrap .region-pf{background-position:0 -1924px}#loco-admin.wrap .region-sj{background-position:0 -1937px}#loco-admin.wrap .region-id{background-position:0 -1950px}#loco-admin.wrap .region-is{background-position:0 -1963px}#loco-admin.wrap .region-eg{background-position:0 -1976px}#loco-admin.wrap .region-fk{background-position:0 -1989px}#loco-admin.wrap .region-fj{background-position:0 -2002px}#loco-admin.wrap .region-gn{background-position:0 -2015px}#loco-admin.wrap .region-gy{background-position:0 -2028px}#loco-admin.wrap .region-ir{background-position:0 -2041px}#loco-admin.wrap .region-km{background-position:0 -2054px}#loco-admin.wrap .region-ie{background-position:0 -2067px}#loco-admin.wrap .region-kz{background-position:0 -2080px}#loco-admin.wrap .region-ro{background-position:0 -2093px}#loco-admin.wrap .region-sk{background-position:0 -2106px}#loco-admin.wrap .region-pg{background-position:0 -2119px}#loco-admin.wrap .region-pt{background-position:0 -2132px}#loco-admin.wrap .region-so{background-position:0 -2145px}#loco-admin.wrap .region-sx{background-position:0 -2158px}#loco-admin.wrap .region-hr{background-position:0 -2171px}#loco-admin.wrap .region-ki{background-position:0 -2184px}#loco-admin.wrap .region-jm{background-position:0 -2197px}#loco-admin.wrap .region-ec{background-position:0 -2210px}#loco-admin.wrap .region-et{background-position:0 -2223px}#loco-admin.wrap .region-fo{background-position:0 -2236px}#loco-admin.wrap .region-kh{background-position:0 -2249px}#loco-admin.wrap .region-sy{background-position:0 -2262px}#loco-admin.wrap .region-sn{background-position:0 -2275px}#loco-admin.wrap .region-pw{background-position:0 -2288px}#loco-admin.wrap .region-sl{background-position:0 -2301px}#loco-admin.wrap .region-fm{background-position:0 -2314px}#loco-admin.wrap .region-gi{background-position:0 -2327px}#loco-admin.wrap .region-de{background-position:0 -2340px}#loco-admin.wrap .region-gh{background-position:0 -2353px}#loco-admin.wrap .region-jo{background-position:0 -2366px}#loco-admin.wrap .region-it{background-position:0 -2379px}#loco-admin.wrap .region-pa{background-position:0 -2392px}#loco-admin.wrap .region-sz{background-position:0 -2405px}#loco-admin.wrap .region-sm{background-position:0 -2418px}#loco-admin.wrap .region-tn{background-position:0 -2431px}#loco-admin.wrap .region-ml{background-position:0 -2444px}#loco-admin.wrap .region-cg{background-position:0 -2457px}#loco-admin.wrap .region-ax{background-position:0 -2470px}#loco-admin.wrap .region-ao{background-position:0 -2483px}#loco-admin.wrap .region-bt{background-position:0 -2496px}#loco-admin.wrap .region-bb{background-position:0 -2509px}#loco-admin.wrap .region-cf{background-position:0 -2522px}#loco-admin.wrap .region-mm{background-position:0 -2535px}#loco-admin.wrap .region-li{background-position:0 -2548px}#loco-admin.wrap .region-na{background-position:0 -2561px}#loco-admin.wrap .region-mz{background-position:0 -2574px}#loco-admin.wrap .region-to{background-position:0 -2587px}#loco-admin.wrap .region-vg{background-position:0 -2600px}#loco-admin.wrap .region-ve{background-position:0 -2613px}#loco-admin.wrap .region-tz{background-position:0 -2626px}#loco-admin.wrap .region-tm{background-position:0 -2639px}#loco-admin.wrap .region-mx{background-position:0 -2652px}#loco-admin.wrap .region-nc{background-position:0 -2665px}#loco-admin.wrap .region-mo{background-position:0 -2678px}#loco-admin.wrap .region-lk{background-position:0 -2691px}#loco-admin.wrap .region-cd{background-position:0 -2704px}#loco-admin.wrap .region-al{background-position:0 -2717px}#loco-admin.wrap .region-bw{background-position:0 -2730px}#loco-admin.wrap .region-cr{background-position:0 -2743px}#loco-admin.wrap .region-bv{background-position:0 -2756px}#loco-admin.wrap .region-am{background-position:0 -2769px}#loco-admin.wrap .region-az{background-position:0 -2782px}#loco-admin.wrap .region-ba{background-position:0 -2795px}#loco-admin.wrap .region-mn{background-position:0 -2808px}#loco-admin.wrap .region-nu{background-position:0 -2821px}#loco-admin.wrap .region-my{background-position:0 -2834px}#loco-admin.wrap .region-tl{background-position:0 -2847px}#loco-admin.wrap .region-ws{background-position:0 -2860px}#loco-admin.wrap .region-th{background-position:0 -2873px}#loco-admin.wrap .region-nf{background-position:0 -2886px}#loco-admin.wrap .region-ly{background-position:0 -2899px}#loco-admin.wrap .region-ai{background-position:0 -2912px}#loco-admin.wrap .region-br{background-position:0 -2925px}#loco-admin.wrap .region-cv{background-position:0 -2938px}#loco-admin.wrap .region-be{background-position:0 -2951px}#loco-admin.wrap .region-ca{background-position:0 -2964px}#loco-admin.wrap .region-bd{background-position:0 -2977px}#loco-admin.wrap .region-cw{background-position:0 -2990px}#loco-admin.wrap .region-bs{background-position:0 -3003px}#loco-admin.wrap .region-ng{background-position:0 -3016px}#loco-admin.wrap .region-mk{background-position:0 -3029px}#loco-admin.wrap .region-np{background-position:0 -3042px}#loco-admin.wrap .region-va{background-position:0 -3055px}#loco-admin.wrap .region-uz{background-position:0 -3068px}#loco-admin.wrap .region-um{background-position:0 -3081px}#loco-admin.wrap .region-tk{background-position:0 -3094px}#loco-admin.wrap .region-vc{background-position:0 -3107px}#loco-admin.wrap .region-zw{background-position:0 -3120px}#loco-admin.wrap .region-nr{background-position:0 -3133px}#loco-admin.wrap .region-ne{background-position:0 -3146px}#loco-admin.wrap .region-cu{background-position:0 -3159px}#loco-admin.wrap .region-bq{background-position:0 -3172px}#loco-admin.wrap .region-bf{background-position:0 -3185px}#loco-admin.wrap .region-bg{background-position:0 -3198px}#loco-admin.wrap .region-cc{background-position:0 -3211px}#loco-admin.wrap .region-mh{background-position:0 -3224px}#loco-admin.wrap .region-za{background-position:0 -3237px}#loco-admin.wrap .region-uy{background-position:0 -3250px}#loco-admin.wrap .region-wf{background-position:0 -3263px}#loco-admin.wrap .region-vu{background-position:0 -3276px}#loco-admin.wrap .region-tj{background-position:0 -3289px}#loco-admin.wrap .variant-scotland,#loco-admin.wrap .region-gb.lang-gd{background-position:0 -3302px}#loco-admin.wrap .variant-valencia,#loco-admin.wrap .region-es.variant-valencia{background-position:0 -3315px}#loco-admin.wrap .variant-wales,#loco-admin.wrap .region-gb.lang-cy{background-position:0 -3328px}#loco-admin.wrap .x-eu{background-position:0 -3341px}#loco-admin.wrap .region-jp,#loco-admin.wrap .region-fi,#loco-admin.wrap .region-cy,#loco-admin.wrap .region-pl,#loco-admin.wrap .region-fo,#loco-admin.wrap .region-kr,#loco-admin.wrap .region-ru,#loco-admin.wrap .region-va{outline:solid 1px #ddd}#loco-admin.wrap .overlay-title .region,#loco-admin.wrap .overlay-title .lang-ca,#loco-admin.wrap .overlay-title .lang-eo,#loco-admin.wrap .overlay-title .lang-eu,#loco-admin.wrap .overlay-title .variant-wales,#loco-admin.wrap .overlay-title .variant-scotland,#loco-admin.wrap .overlay-title .variant-valencia,#loco-admin.wrap .overlay-title .region-gb.lang-gd,#loco-admin.wrap .overlay-title .region-gb.lang-cy,#loco-admin.wrap .overlay-title .region-es.lang-ca,#loco-admin.wrap .overlay-title .region-es.variant-valencia,#loco-admin.wrap .overlay-title .lang-tlh{outline:none}#loco-admin.wrap span.lang code{display:none}#loco-admin.wrap .icon-share:before{content:"↑"}#loco-admin.wrap .icon-notag:before{content:""}#loco-admin.wrap .icon-magnify:before{content:"🔍"}#loco-admin.wrap .icon-python:before{content:"🐍"}#loco-admin.wrap .icon-unicode:before{content:"u"}#loco-admin.wrap .icon-json:before{content:"{"}#loco-admin.wrap .icon-translate:before{content:""}#loco-admin.wrap .icon-project:before{content:""}#loco-admin.wrap .icon-plural:before{content:"᛬"}#loco-admin.wrap .icon-max:before,#loco-admin.wrap .icon-full-screen:before{content:""}#loco-admin.wrap .icon-min:before{content:""}#loco-admin.wrap .icon-sort:before{content:""}#loco-admin.wrap .icon-ok:before,#loco-admin.wrap .notice-success>.has-icon:before,#loco-admin.wrap .notice-success p>strong.has-icon:before,#loco-admin.wrap .panel-success>.has-icon:before,#loco-admin.wrap .panel-success p>strong.has-icon:before{content:"✓"}#loco-admin.wrap .icon-ok-empty:before{content:"🗌"}#loco-admin.wrap .icon-play:before{content:"⏵"}#loco-admin.wrap .icon-checkbox-checked:before,#loco-admin.wrap .selector.multi li.selected .icon-checkbox:before{content:"☑"}#loco-admin.wrap .icon-checkbox-unchecked:before{content:"☐"}#loco-admin.wrap .icon-checkbox-partial:before{content:"☉"}#loco-admin.wrap .icon-radio-checked:before{content:"⚫"}#loco-admin.wrap .icon-radio-unchecked:before{content:"⚪"}#loco-admin.wrap .icon-ext:before{content:"⬈"}#loco-admin.wrap .icon-pdf:before{content:"P"}#loco-admin.wrap .icon-zip:before{content:"Z"}#loco-admin.wrap .icon-bullist:before{content:""}#loco-admin.wrap .icon-numlist:before{content:""}#loco-admin.wrap .icon-indent:before{content:""}#loco-admin.wrap .icon-outdent:before{content:""}#loco-admin.wrap .icon-link:before{content:""}#loco-admin.wrap .icon-unlink:before{content:""}#loco-admin.wrap .icon-bold:before{content:"B"}#loco-admin.wrap .icon-italic:before{content:"I"}#loco-admin.wrap .icon-library:before,#loco-admin.wrap .icon-glossary:before{content:"📚"}#loco-admin.wrap .icon-star:before{content:""}#loco-admin.wrap .icon-user:before{content:""}#loco-admin.wrap .icon-remove:before,#loco-admin.wrap a.icon.close:before{content:"×"}#loco-admin.wrap .icon-cog:before{content:""}#loco-admin.wrap .icon-trash:before{content:""}#loco-admin.wrap .icon-time:before,#loco-admin.wrap .icon-history:before{content:""}#loco-admin.wrap .icon-download:before{content:""}#loco-admin.wrap .icon-revert:before{content:""}#loco-admin.wrap .icon-sync:before{content:""}#loco-admin.wrap .icon-lock:before,#loco-admin.wrap .notice-locked>.has-icon:before,#loco-admin.wrap .notice-locked p>strong.has-icon:before,#loco-admin.wrap .panel-locked>.has-icon:before,#loco-admin.wrap .panel-locked p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-flag:before{content:""}#loco-admin.wrap .icon-tag:before{content:""}#loco-admin.wrap .icon-tags:before{content:""}#loco-admin.wrap .icon-print:before{content:""}#loco-admin.wrap .icon-camera:before{content:""}#loco-admin.wrap .icon-pencil:before{content:""}#loco-admin.wrap .icon-add:before{content:""}#loco-admin.wrap .icon-del:before{content:""}#loco-admin.wrap .icon-clear:before,#loco-admin.wrap a.icon.clear:before{content:""}#loco-admin.wrap .icon-ok-sign:before{content:"✔"}#loco-admin.wrap .icon-help:before{content:"?"}#loco-admin.wrap .icon-info:before,#loco-admin.wrap .notice-info>.has-icon:before,#loco-admin.wrap .notice-info p>strong.has-icon:before,#loco-admin.wrap .panel-info>.has-icon:before,#loco-admin.wrap .panel-info p>strong.has-icon:before{content:"ℹ"}#loco-admin.wrap .icon-cancel:before{content:""}#loco-admin.wrap .icon-warn:before,#loco-admin.wrap .notice-error>.has-icon:before,#loco-admin.wrap .notice-error p>strong.has-icon:before,#loco-admin.wrap .panel-error>.has-icon:before,#loco-admin.wrap .panel-error p>strong.has-icon:before,#loco-admin.wrap .notice-warning>.has-icon:before,#loco-admin.wrap .notice-warning p>strong.has-icon:before,#loco-admin.wrap .panel-warning>.has-icon:before,#loco-admin.wrap .panel-warning p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-comment:before{content:""}#loco-admin.wrap .icon-bar-chart:before{content:""}#loco-admin.wrap .icon-key:before{content:""}#loco-admin.wrap .icon-cogs:before{content:""}#loco-admin.wrap .icon-comments:before{content:""}#loco-admin.wrap .icon-signout:before{content:""}#loco-admin.wrap .icon-signin:before{content:""}#loco-admin.wrap .icon-upload:before{content:""}#loco-admin.wrap .icon-twitter:before{content:"🐦"}#loco-admin.wrap .icon-facebook:before{content:""}#loco-admin.wrap .icon-github:before{content:""}#loco-admin.wrap .icon-feed:before{content:""}#loco-admin.wrap .icon-globe:before{content:""}#loco-admin.wrap .icon-wrench:before,#loco-admin.wrap .notice-debug>.has-icon:before,#loco-admin.wrap .notice-debug p>strong.has-icon:before,#loco-admin.wrap .panel-debug>.has-icon:before,#loco-admin.wrap .panel-debug p>strong.has-icon:before{content:""}#loco-admin.wrap .icon-group:before{content:""}#loco-admin.wrap .icon-cloud:before{content:""}#loco-admin.wrap .icon-copy:before{content:""}#loco-admin.wrap .icon-save:before{content:""}#loco-admin.wrap .icon-menu:before{content:""}#loco-admin.wrap .icon-table:before{content:""}#loco-admin.wrap .icon-caret-down:before{content:"▼"}#loco-admin.wrap .icon-caret-up:before{content:"▲"}#loco-admin.wrap .icon-caret-right:before{content:"▶"}#loco-admin.wrap .icon-mail:before{content:""}#loco-admin.wrap .icon-cloud-upload:before{content:""}#loco-admin.wrap .icon-file:before{content:""}#loco-admin.wrap .icon-circle-white:before{content:"⚬"}#loco-admin.wrap .icon-circle-black:before{content:"●"}#loco-admin.wrap .icon-eraser:before{content:""}#loco-admin.wrap .icon-unlock:before{content:""}#loco-admin.wrap .icon-apple:before{content:""}#loco-admin.wrap .icon-android:before{content:""}#loco-admin.wrap .icon-robot:before{content:"🤖"}#loco-admin.wrap .icon-back:before{content:"⬅"}#loco-admin.wrap .icon-next:before{content:"➔"}#loco-admin.wrap .icon-arrow-up:before{content:"⬆"}#loco-admin.wrap .icon-arrow-down:before{content:"⬇"}#loco-admin.wrap .icon-confirm:before{content:"!"}#loco-admin.wrap .icon-visible:before{content:"⏿"}#loco-admin.wrap .icon-hidden:before{content:"*"}#loco-admin.wrap .icon-calendar:before{content:""}#loco-admin.wrap .icon-ccard:before{content:""}#loco-admin.wrap .icon-caret-left:before{content:"◀"}#loco-admin.wrap .icon-pro:before{content:"⚡"}#loco-admin.wrap .icon-bell:before{content:""}#loco-admin.wrap .icon-code:before{content:""}#loco-admin.wrap .icon-privacy:before{content:"🛡"}#loco-admin.wrap .icon-hellip:before{content:"…"}#loco-admin.wrap .icon-vellip:before{content:"⁞"}#loco-admin.wrap .icon-collapse:before{content:""}#loco-admin.wrap .icon-expand:before{content:""}#loco-admin.wrap .icon-wordpress:before{content:""}#loco-admin.wrap .icon-restore:before{content:""}#loco-admin.wrap .icon-pilcrow:before{content:"¶"}#loco-admin.wrap .icon,#loco-admin.wrap .has-icon:before,#loco-admin.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-admin.wrap .icon,#loco-admin.wrap .has-icon:before{font-family:"loco"}#loco-admin.wrap .has-dashicon:before{font-family:"dashicons";font-size:1.4em}#loco-admin.wrap .has-icon:before,#loco-admin.wrap .has-dashicon:before,#loco-admin.wrap .has-icon>span{display:inline-block;vertical-align:middle}#loco-admin.wrap .only-icon{text-align:center}#loco-admin.wrap .only-icon:before{text-align:center;padding:0}#loco-admin.wrap .only-icon span{display:none}#loco-admin.wrap a,#loco-admin.wrap .wp-core-ui .button-link{text-decoration:none}#loco-admin.wrap h3:hover>a.loco-anchor{color:#ccc}#loco-admin.wrap h3:hover>a.loco-anchor:before{content:"¶"}#loco-admin.wrap .has-lang>span{display:inline-block;vertical-align:middle}#loco-admin.wrap a.has-lang:hover>span:last-child{text-decoration:underline}#loco-admin.wrap h1 ul,#loco-admin.wrap h1 li{margin:0;padding:0}#loco-admin.wrap h1 li{display:inline-block}#loco-admin.wrap h1 li:after{content:"/";color:#999;text-shadow:none;display:inline-block}#loco-admin.wrap h1 li:last-child:after{content:""}#loco-admin.wrap h1 li:last-child a{color:inherit;pointer-events:none;cursor:auto}#loco-admin.wrap h2 span{color:#999;font-weight:normal}#loco-admin.wrap h2 .loco-meta,#loco-admin.wrap h3 .loco-meta{color:inherit;font-size:14px;font-weight:normal;vertical-align:middle}#loco-admin.wrap .wp-list-table td:first-child .icon{width:16px;display:inline-block;text-align:center}#loco-admin.wrap .wp-list-table td{white-space:nowrap}#loco-admin.wrap .wp-list-table td>a,#loco-admin.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-admin.wrap .wp-list-table th.loco-sort{cursor:pointer}#loco-admin.wrap .wp-list-table th.loco-sort:hover{color:#000}#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after{padding:0 0 0 4px;color:#999}#loco-admin.wrap .wp-list-table th.loco-sort.loco-desc:after{content:"▼"}#loco-admin.wrap .wp-list-table th.loco-sort.loco-asc:after{content:"▲"}#loco-admin.wrap .wp-list-table td.has-row-actions{overflow:visible}#loco-admin.wrap .wp-list-table tfoot td{font-size:12px;color:#666}#loco-admin.wrap form.loco-filter{display:block;margin-bottom:5px}#loco-admin.wrap form.loco-filter .icon-filter{color:#999}#loco-admin.wrap nav.above-list-table{margin-bottom:1em}#loco-admin.wrap nav.above-list-table a{display:inline-block;margin-right:1em}#loco-admin.wrap .wp-core-ui button.inverted,#loco-admin.wrap .wp-core-ui button.inverted:hover,#loco-admin.wrap .po-fuzzy button.icon-cloud{background:-moz-linear-gradient(top, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);background:-webkit-linear-gradient(top, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);background:linear-gradient(to bottom, #cccccc 0%, #e0e0e0 30%, #fefefe 100%);-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;border-color:gray}#loco-admin.wrap .wp-core-ui button:active,#loco-admin.wrap .wp-core-ui button.inverted:active{border-color:#5b9dd9}#loco-admin.wrap .loco-clearable{display:inline-block;vertical-align:middle;position:relative}#loco-admin.wrap .loco-clearable a.clear,#loco-admin.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:inherit}#loco-admin.wrap .loco-clearable a.clear:before,#loco-admin.wrap .auto-comp-wrap a.clear:before{vertical-align:middle;padding:0;color:#999}#loco-admin.wrap .loco-clearable a.clear:hover:before,#loco-admin.wrap .auto-comp-wrap a.clear:hover:before{color:#333}#loco-admin.wrap .loco-clearable a.clear span,#loco-admin.wrap .auto-comp-wrap a.clear span{display:none}#loco-admin.wrap .loco-clearable ::-ms-clear,#loco-admin.wrap .auto-comp-wrap ::-ms-clear{display:none}#loco-admin.wrap div.progress{color:#000;background:transparent !important}#loco-admin.wrap div.progress *{height:100%;overflow:hidden;white-space:nowrap}#loco-admin.wrap div.progress .t{background-color:#ddd;border:1px solid #ccc}#loco-admin.wrap div.progress .t .bar{float:left;clear:none;background-color:#3db63d}#loco-admin.wrap div.progress .t .bar.f{background-color:#bd2c00}#loco-admin.wrap div.progress .l{display:block}#loco-admin.wrap td div.progress .t{border:none}#loco-admin.wrap td div.progress .l{display:none}#loco-admin.wrap code.path{color:#333;margin:0;padding:0;display:inline;background:transparent}#loco-admin.wrap .loco-danger{color:#d54e21}#loco-admin.wrap .notice,#loco-admin.wrap .panel{border:1px solid #ddd;border-left-width:4px;background:#fff;position:relative;margin:1em 0;padding:1px 12px;box-shadow:0 1px 1px rgba(0,0,0,.04)}#loco-admin.wrap .notice p,#loco-admin.wrap .panel p{margin:.5em 0;padding:2px}#loco-admin.wrap .notice-success,#loco-admin.wrap .panel-success{border-color:#00a32a}#loco-admin.wrap .notice-success>.has-icon,#loco-admin.wrap .notice-success p>strong.has-icon,#loco-admin.wrap .panel-success>.has-icon,#loco-admin.wrap .panel-success p>strong.has-icon{color:#000}#loco-admin.wrap .notice-warning,#loco-admin.wrap .panel-warning{border-color:orange}#loco-admin.wrap .notice-error,#loco-admin.wrap .panel-error{border-color:#dc3232}#loco-admin.wrap .notice-debug,#loco-admin.wrap .panel-debug{border-color:#00a0d2}#loco-admin.wrap .notice-info,#loco-admin.wrap .panel-info{border-color:#72aee6}#loco-admin.wrap .notice-danger,#loco-admin.wrap .panel-danger{border-color:#dc3232}#loco-admin.wrap .notice-locked,#loco-admin.wrap .panel-locked{border-color:orange}#loco-admin.wrap .notice>.has-icon:before,#loco-admin.wrap .notice p>strong.has-icon:before,#loco-admin.wrap .panel>.has-icon:before,#loco-admin.wrap .panel p>strong.has-icon:before{padding-right:6px}#loco-admin.wrap .notice>p>a.button.has-icon:before,#loco-admin.wrap .panel>p>a.button.has-icon:before{width:1.2em}#loco-admin.wrap .notice>p>em,#loco-admin.wrap .panel>p>em{color:#d54e21;font-style:normal}#loco-admin.wrap .notice>p>em a,#loco-admin.wrap .panel>p>em a{color:inherit}#loco-admin.wrap .notice>p a:hover,#loco-admin.wrap .notice>nav a:hover,#loco-admin.wrap .panel>p a:hover,#loco-admin.wrap .panel>nav a:hover{text-decoration:underline}#loco-admin.wrap .notice>p a.button,#loco-admin.wrap .notice>nav a.button,#loco-admin.wrap .panel>p a.button,#loco-admin.wrap .panel>nav a.button{text-decoration:inherit}#loco-admin.wrap .notice>p:not(:first-child)>strong.has-icon:first-child,#loco-admin.wrap .panel>p:not(:first-child)>strong.has-icon:first-child{visibility:hidden}#loco-admin.wrap .notice.has-nav,#loco-admin.wrap .panel.has-nav{display:flex;flex-direction:row}#loco-admin.wrap .notice.has-nav p,#loco-admin.wrap .notice.has-nav nav,#loco-admin.wrap .panel.has-nav p,#loco-admin.wrap .panel.has-nav nav{line-height:22px;flex-grow:1}#loco-admin.wrap .notice.has-nav nav,#loco-admin.wrap .panel.has-nav nav{text-align:right;padding:2px;margin:.5em 0}#loco-admin.wrap .notice.has-nav.is-dismissible,#loco-admin.wrap .panel.has-nav.is-dismissible{padding-right:38px}#loco-admin.wrap .notice.has-nav a,#loco-admin.wrap .panel.has-nav a{white-space:nowrap}#loco-admin.wrap .notice.has-nav nav>span,#loco-admin.wrap .panel.has-nav nav>span{color:#666}#loco-admin.wrap .notice>h3>span,#loco-admin.wrap .panel>h3>span{display:inline-block;vertical-align:middle}#loco-admin.wrap ul.problems li{font-style:italic}#loco-admin.wrap label{position:relative}#loco-admin.wrap label.for-disabled,#loco-admin.wrap label.for-disabled>input{cursor:default !important}#loco-admin.wrap input.regular-text,#loco-admin.wrap textarea.regular-text{width:25em}#loco-admin.wrap .button-link{padding:0 10px 1px}#loco-admin.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-admin.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-admin.wrap .button-success:hover{background:#3db63d}#loco-admin.wrap .button-danger[disabled],#loco-admin.wrap .button-success[disabled]{text-shadow:none !important}#loco-admin.wrap form button.loco-loading.button-large{padding-left:0}#loco-admin.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-admin.wrap ::placeholder{color:#ccc}#loco-admin.wrap ::-webkit-input-placeholder{color:#ccc}#loco-admin.wrap :-moz-placeholder{color:#ccc;opacity:1}#loco-admin.wrap ::-moz-placeholder{color:#ccc;opacity:1}#loco-admin.wrap :-ms-input-placeholder{color:#ccc}#loco-admin.wrap .ielt10 .placeheld{color:#ccc}#loco-admin.wrap a.has-raquo:after{content:" »"}#loco-admin.wrap a.has-laquo:before{content:"« "}#loco-admin.wrap span.inline-spinner{display:inline-block;min-width:16px;min-height:16px;background:transparent url(../img/spin-modal.gif?v=2.6.10) 0 0 no-repeat}@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-admin.wrap span.inline-spinner{background-size:100%;background-image:url(../img/spin-modal@2x.gif?v=2.6.10)}}.js #wpbody-content>.notice{display:none}.js #wpbody-content>.notice.inline{display:block}.js #loco-admin.wrap .jshide,.no-js #loco-admin.wrap .jsonly{display:none !important}#loco-admin.wrap .invis{visibility:hidden}.form-table tr td{vertical-align:top}.form-table tr.compact td{padding-top:0}.form-table tr th a.icon-help{display:none}.loco-modal{min-width:50%;min-height:100px}.loco-modal-wide{min-width:90% !important}.loco-modal-no-close .ui-dialog-titlebar-close{display:none}.loco-modal .ui-dialog-titlebar-close{overflow:hidden}.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.6.10) center 20px no-repeat}@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){.ui-dialog-content>div.loco-loading{background-size:16px;background-image:url(../img/spin-modal.gif?v=2.6.10@2x.gif?v=2.6.10)}}#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}#loco-credit>*{vertical-align:middle}#loco-credit>a{display:inline-block;position:relative;overflow:hidden;background:transparent url(../img/logo-foot.gif?v=2.6.10) 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)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#66c6e4 !important;background:#008ec2 !important;border-color:#008ec2 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../img/skins/fresh/spin-primary-button.gif?v=2.6.10) 0 0 no-repeat !important}@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){.wp-core-ui .button-primary.loco-loading[disabled]:before{background-size:16px !important;background-image:url(../img/skins/fresh/spin-primary-button@2x.gif?v=2.6.10) !important}} \ No newline at end of file diff --git a/pub/css/editor.css b/pub/css/editor.css index c958662..7c31773 100644 --- a/pub/css/editor.css +++ b/pub/css/editor.css @@ -1 +1 @@ -#loco-editor{border:solid 1px #ccc}#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.6.10);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.6.10) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.6.10);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.6.10);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.6.10);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 .has-proxy .wg-overlay,#loco-editor .has-mirror .wg-overlay,#loco-editor .has-overlay>textarea{display:none !important}#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.6.10) 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.6.10);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.6.10) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.6.10);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.6.10);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.6.10);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.6.10) 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.6.10) 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-field>.wg-content>div.mce-content-body{position:relative}#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}#loco-editor .is-field>.wg-content>.wg-count{display:block;position:absolute;right:10px;bottom:8px;padding:0;margin:0;width:auto;font-size:12px;height:12px;line-height:normal;text-align:right;white-space:nowrap;pointer-events:none;border:none;z-index:1;color:#ccc}#loco-editor .is-field>.wg-content>.wg-count.is-eq{color:#000}#loco-editor .is-field>.wg-content>.wg-count.is-gt{color:#bd2c00;font-weight:bold}@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.po-error:before{content:"";color:#bd2c00}#loco-editor .is-table .wg-cols>div:first-child>div.selected:before{color:#fff !important}#loco-editor .wg-cell>.meta{color:#333;margin:0 !important;padding:6px 10px;font-weight:normal;font-size:13px;line-height:1.4em;cursor:default !important}#loco-editor .wg-cell>.meta>p{display:block;white-space:pre-line;margin:0 0 .3em 0}#loco-editor .wg-cell>.meta>p.tags{line-height:1.8em;white-space:nowrap}#loco-editor .wg-cell>.meta>p.tags span{border:1px solid transparent}#loco-editor .wg-cell>.meta>p.tags span:first-child{border-left:none}#loco-editor .wg-cell>.meta>p.tags mark{color:#999;background-color:#eee;border-radius:2px;border:1px solid silver;padding:2px 4px;margin-right:4px}#loco-editor .wg-cell>.meta>p.tags mark.ctxt{color:#fff;background-color:silver}#loco-editor .wg-cell>.meta .icon-warn{color:#bd2c00}#loco-editor .wg-cell>.meta .has-icon:before{padding-right:0;width:17px}#loco-editor .wg-cell>.meta code{font-size:12px}#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-target header nav{display:block;position:absolute;right:0px;top:0px;padding:2px}#loco-editor #po-target header nav button{margin-left:5px}#loco-editor #po-target header nav.po-empty .icon-cloud{display:none !important}#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 .has-title>header{line-height:normal;padding:7px}#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 header,#loco-editor nav{display:block;position:relative}#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.6.10) center 20px no-repeat}@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-inner>div.loco-loading{background-size:16px;background-image:url(../img/spin-editor-button@x2.gif?v=2.6.10)}}#loco-editor-inner h2{color:#000;line-height:1}#loco-editor-inner .wg-cell>.meta code{padding:0;color:#0073aa;background:inherit;cursor:pointer}#loco-editor-inner .wg-cell>.meta code:hover{text-decoration:underline}#loco-admin.wrap #loco-editor>nav{font-size:14px;height:50px}#loco-admin.wrap #loco-editor>nav form{display:block;float:left;clear:none;padding:0;margin:0}#loco-admin.wrap #loco-editor>nav form.aux{float:right;margin-right:5px}#loco-admin.wrap #loco-editor>nav fieldset{display:block;position:relative;float:left;clear:none}#loco-admin.wrap #loco-editor>nav button,#loco-admin.wrap #loco-editor>nav 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-admin.wrap #loco-editor>nav input[type=text]{padding:0 10px;font-size:14px;line-height:normal}#loco-admin.wrap #loco-editor>nav .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-admin.wrap #loco-editor>nav .loco-clearable{padding:0 20px}#loco-admin.wrap #loco-editor>nav .loco-clearable.invalid a.clear:before{color:#c00}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear{right:25px;line-height:2;top:2px}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear:hover:before{color:#c00}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear:active:before{color:#000}#loco-admin.wrap #loco-editor>nav button.only-icon{width:40px}#loco-admin.wrap form.aux{float:right;margin-right:5px}#loco-admin.wrap button.has-icon:before{width:16px;padding:0}#loco-admin.wrap button.has-icon.loco-loading:before{content:" ";height:16px;background:transparent url(../img/spin-editor-button.gif?v=2.6.10) 0 0 no-repeat}@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-admin.wrap button.has-icon.loco-loading:before{background-size:100%;background-image:url(../img/spin-editor-button@x2.gif?v=2.6.10)}}#loco-admin.wrap .button,#loco-admin.wrap input[type=text]{border-color:#aaa;color:#444}#loco-admin.wrap .button-link{color:#888;padding-right:5px}#loco-admin.wrap .button:hover,#loco-admin.wrap .button-link:hover{color:#000}#loco-admin.wrap .button-primary,#loco-admin.wrap .button-primary:hover{color:#fff}#loco-admin.wrap button.icon-translate:before{font-size:16px}.loco-modal .loco-api{position:relative;padding:10px;background:#f7f7f7;border:solid 1px #eee;font-size:14px;margin-bottom:16px}.loco-modal .loco-api p{padding:0;margin:0;font-size:inherit}.loco-modal .loco-api blockquote{font-weight:bold;margin:0;padding:10px 0}.loco-modal .loco-api .loco-api-credit{padding:0;display:block;font-size:12px;white-space:nowrap;position:absolute;right:10px;bottom:10px}.loco-modal .loco-api-loading{text-indent:20px;background:transparent url(../img/spin-modal.gif?v=2.6.10) 10px center no-repeat}@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-modal .loco-api-loading{background-size:16px;background-image:url(../img/spin-modal@2x.gif?v=2.6.10)}}.loco-modal .loco-alert p{margin-bottom:2em;font-size:14px}.loco-modal .loco-alert nav{display:block;position:relative;margin:1em 0}.loco-modal .loco-alert nav a{display:inline-block;margin-right:1em;padding:10px}.loco-modal .loco-api>select{width:100%;max-width:100%}#loco-auto{display:none;min-width:50%;min-height:300px;position:relative}#loco-auto form blockquote{margin:0;padding:1em 0;font-size:14px}.loco-api-deepl .loco-api-credit a,.loco-api-google .loco-api-credit a,.loco-api-microsoft .loco-api-credit a{height:20px;text-indent:-999px;text-align:left;display:inline-block;vertical-align:top;overflow:hidden}.loco-api-deepl .loco-api-credit a{width:50px;background:transparent url(../img/api/deepl.png?v=2.6.10) 0 0 no-repeat}@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-api-deepl .loco-api-credit a{background-size:100%;background-image:url(../img/api/deepl@2x.png?v=2.6.10)}}.loco-api-google .loco-api-credit a{width:50px;background:transparent url(../img/api/google.png?v=2.6.10) 0 0 no-repeat}@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-api-google .loco-api-credit a{background-size:100%;background-image:url(../img/api/google@2x.png?v=2.6.10)}}.loco-api-microsoft .loco-api-credit a{width:76px;background-image:url(../img/api/microsoft.png?v=2.6.10)}@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-api-microsoft .loco-api-credit a{background-size:100%;background-image:url(../img/api/microsoft@2x.png?v=2.6.10)}} \ No newline at end of file +#loco-editor{border:solid 1px #ccc}#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.6.10);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.6.10) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.6.10);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.6.10);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.6.10);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 .has-proxy .wg-overlay,#loco-editor .has-mirror .wg-overlay,#loco-editor .has-overlay>textarea{display:none !important}#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.6.10) 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 .glossarized{white-space:pre-wrap;word-wrap:break-word}#loco-editor .glossarized .term{color:inherit;text-decoration:underline dashed;text-underline-offset:3px;cursor:help}#loco-editor ._ajax_loader_f2{background-image:url(../img/ajax-loader-f2.gif?v=2.6.10);background-repeat:no-repeat;min-height:16px}#loco-editor ._ajax_loader_f2x4{background:transparent url(../img/ajax-loader-f2-x4.gif?v=2.6.10) 0 0 no-repeat;min-height:75px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc.gif?v=2.6.10);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.6.10);background-size:16px}#loco-editor ._ajax_loader_cc{background-image:url(../img/ajax-loader-cc-x2.gif?v=2.6.10);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.6.10) 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.6.10) 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-field>.wg-content>div.mce-content-body{position:relative}#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}#loco-editor .is-field>.wg-content>.wg-count{display:block;position:absolute;right:10px;bottom:8px;padding:0;margin:0;width:auto;font-size:12px;height:12px;line-height:normal;text-align:right;white-space:nowrap;pointer-events:none;border:none;z-index:1;color:#ccc}#loco-editor .is-field>.wg-content>.wg-count.is-eq{color:#000}#loco-editor .is-field>.wg-content>.wg-count.is-gt{color:#bd2c00;font-weight:bold}@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.po-error:before{content:"";color:#bd2c00}#loco-editor .is-table .wg-cols>div:first-child>div.selected:before{color:#fff !important}#loco-editor .wg-cell>.meta{color:#333;margin:0 !important;padding:6px 10px;font-weight:normal;font-size:13px;line-height:1.4em;cursor:default !important}#loco-editor .wg-cell>.meta>p{display:block;white-space:pre-line;margin:0 0 .3em 0}#loco-editor .wg-cell>.meta>p.tags{line-height:1.8em;white-space:nowrap}#loco-editor .wg-cell>.meta>p.tags span{border:1px solid transparent}#loco-editor .wg-cell>.meta>p.tags span:first-child{border-left:none}#loco-editor .wg-cell>.meta>p.tags mark{color:#999;background-color:#eee;border-radius:2px;border:1px solid silver;padding:2px 4px;margin-right:4px}#loco-editor .wg-cell>.meta>p.tags mark.ctxt{color:#fff;background-color:silver}#loco-editor .wg-cell>.meta .icon-warn{color:#bd2c00}#loco-editor .wg-cell>.meta .has-icon:before{padding-right:0;width:17px}#loco-editor .wg-cell>.meta code{font-size:12px}#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-target header nav{display:block;position:absolute;right:0px;top:0px;padding:2px}#loco-editor #po-target header nav button{margin-left:5px}#loco-editor #po-target header nav.po-empty .icon-cloud{display:none !important}#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 .has-title>header{line-height:normal;padding:7px}#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 header,#loco-editor nav{display:block;position:relative}#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.6.10) center 20px no-repeat}@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-inner>div.loco-loading{background-size:16px;background-image:url(../img/spin-editor-button@x2.gif?v=2.6.10)}}#loco-editor-inner h2{color:#000;line-height:1}#loco-editor-inner .wg-cell>.meta code{padding:0;color:#0073aa;background:inherit;cursor:pointer}#loco-editor-inner .wg-cell>.meta code:hover{text-decoration:underline}#loco-admin.wrap #loco-editor>nav{font-size:14px;height:50px}#loco-admin.wrap #loco-editor>nav form{display:block;float:left;clear:none;padding:0;margin:0}#loco-admin.wrap #loco-editor>nav form.aux{float:right;margin-right:5px}#loco-admin.wrap #loco-editor>nav fieldset{display:block;position:relative;float:left;clear:none}#loco-admin.wrap #loco-editor>nav button,#loco-admin.wrap #loco-editor>nav 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-admin.wrap #loco-editor>nav input[type=text]{padding:0 10px;font-size:14px;line-height:normal}#loco-admin.wrap #loco-editor>nav .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-admin.wrap #loco-editor>nav .loco-clearable{padding:0 20px}#loco-admin.wrap #loco-editor>nav .loco-clearable.invalid a.clear:before{color:#c00}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear{right:25px;line-height:2;top:2px}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear:hover:before{color:#c00}#loco-admin.wrap #loco-editor>nav .loco-clearable a.clear:active:before{color:#000}#loco-admin.wrap #loco-editor>nav button.only-icon{width:40px}#loco-admin.wrap form.aux{float:right;margin-right:5px}#loco-admin.wrap button.has-icon:before{width:16px;padding:0}#loco-admin.wrap button.has-icon.loco-loading:before{content:" ";height:16px;background:transparent url(../img/spin-editor-button.gif?v=2.6.10) 0 0 no-repeat}@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-admin.wrap button.has-icon.loco-loading:before{background-size:100%;background-image:url(../img/spin-editor-button@x2.gif?v=2.6.10)}}#loco-admin.wrap .button,#loco-admin.wrap input[type=text]{border-color:#aaa;color:#444}#loco-admin.wrap .button-link{color:#888;padding-right:5px}#loco-admin.wrap .button:hover,#loco-admin.wrap .button-link:hover{color:#000}#loco-admin.wrap .button-primary,#loco-admin.wrap .button-primary:hover{color:#fff}#loco-admin.wrap button.icon-translate:before{font-size:16px}.loco-modal .loco-api{position:relative;padding:10px;background:#f7f7f7;border:solid 1px #eee;font-size:14px;margin-bottom:16px}.loco-modal .loco-api p{padding:0;margin:0;font-size:inherit}.loco-modal .loco-api blockquote{font-weight:bold;margin:0;padding:10px 0}.loco-modal .loco-api .loco-api-credit{padding:0;display:block;font-size:12px;white-space:nowrap;position:absolute;right:10px;bottom:10px}.loco-modal .loco-api-loading{text-indent:20px;background:transparent url(../img/spin-modal.gif?v=2.6.10) 10px center no-repeat}@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-modal .loco-api-loading{background-size:16px;background-image:url(../img/spin-modal@2x.gif?v=2.6.10)}}.loco-modal .loco-alert p{margin-bottom:2em;font-size:14px}.loco-modal .loco-alert nav{display:block;position:relative;margin:1em 0}.loco-modal .loco-alert nav a{display:inline-block;margin-right:1em;padding:10px}.loco-modal .loco-api>select{width:100%;max-width:100%}#loco-auto{display:none;min-width:50%;min-height:300px;position:relative}#loco-auto form blockquote{margin:0;padding:1em 0;font-size:14px}.loco-api-deepl .loco-api-credit a,.loco-api-google .loco-api-credit a,.loco-api-microsoft .loco-api-credit a{height:20px;text-indent:-999px;text-align:left;display:inline-block;vertical-align:top;overflow:hidden}.loco-api-deepl .loco-api-credit a{width:50px;background:transparent url(../img/api/deepl.png?v=2.6.10) 0 0 no-repeat}@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-api-deepl .loco-api-credit a{background-size:100%;background-image:url(../img/api/deepl@2x.png?v=2.6.10)}}.loco-api-google .loco-api-credit a{width:50px;background:transparent url(../img/api/google.png?v=2.6.10) 0 0 no-repeat}@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-api-google .loco-api-credit a{background-size:100%;background-image:url(../img/api/google@2x.png?v=2.6.10)}}.loco-api-microsoft .loco-api-credit a{width:76px;background-image:url(../img/api/microsoft.png?v=2.6.10)}@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-api-microsoft .loco-api-credit a{background-size:100%;background-image:url(../img/api/microsoft@2x.png?v=2.6.10)}} \ No newline at end of file diff --git a/pub/js/min/admin.js b/pub/js/min/admin.js index dfe4852..a06baa5 100644 --- a/pub/js/min/admin.js +++ b/pub/js/min/admin.js @@ -2906,6 +2906,9 @@ this.dir = g; this.redraw(); return this.cells; }; +v.count = function() { +return this.cells && this.cells.length || 0; +}; v.destroy = function() { this.clear(); delete c[this.id]; @@ -3255,11 +3258,9 @@ u.setListCell = function(c) { const a = this; a.listCell = c; c.on("wgRowSelect", function(e, m) { -a.loadMessage(a.po.row(m)); -return !0; +(e = a.po.row(m)) && e !== a.active && a.loadMessage(e); }).on("wgRowDeselect", function(e, m, g) { g || a.loadNothing(); -return !0; }); }; u.setSourceCell = function(c) { diff --git a/readme.txt b/readme.txt index ff59854..e7e8789 100644 --- a/readme.txt +++ b/readme.txt @@ -104,6 +104,7 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http * Added loco_api_provider_{id} filter * JSON compiler observes configured .js aliases * Fixed a missing security check - thanks Nosa Shandy +* Added .blade.php tokenizer hack = 2.6.9 = * Rolled back load helper changes diff --git a/src/gettext/Extraction.php b/src/gettext/Extraction.php index 24cf030..902bbb8 100644 --- a/src/gettext/Extraction.php +++ b/src/gettext/Extraction.php @@ -90,7 +90,7 @@ public function addProject( Loco_package_Project $project ){ $type = $opts->ext2type( $file->extension() ); $fileref = $file->getRelativePath($base); try { - $extr = loco_wp_extractor($type); + $extr = loco_wp_extractor( $type, $file->fullExtension() ); if( 'php' === $type || 'twig' === $type) { // skip large files for PHP, because token_get_all is hungry if( 0 !== $max ){