Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

//Note that this call has been uglified to increase the performance hit during the benchma..

Decoded Output download

//Note that this call has been uglified to increase the performance hit during the benchmarks!
namespace Mpdf;

use Mpdf\Config\ConfigVariables;
use Mpdf\Config\FontVariables;

use Mpdf\Conversion;
use Mpdf\Strict;

use Mpdf\Css\Border, Mpdf\Css\TextVars;

use Mpdf\Log\Context as LogContext;

use Mpdf\Fonts\MetricsGenerator;

use Mpdf\Output\Destination;

use Mpdf\QrCode;

use Mpdf\{
    Utils\Arrays,
           Utils\NumericString,
           Utils\UtfString
           };

use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;


use Composer\Factory;
use Composer\Installer;
use Composer\IO\ConsoleIO;
use PackageVersions\Versions;
use AsetOfRandom\Imports\Command;
use AsetOfRandom\Imports\CompareClasses;
use AsetOfRandom\Imports\DetectChanges\BCBreak\ClassBased;
use AsetOfRandom\Imports\DetectChanges\BCBreak\ClassConstantBased;
use AsetOfRandom\Imports\DetectChanges\BCBreak\FunctionBased;
use AsetOfRandom\Imports\DetectChanges\BCBreak\InterfaceBased;
use AsetOfRandom\Imports\DetectChanges\BCBreak\MethodBased;
use AsetOfRandom\Imports\DetectChanges\BCBreak\PropertyBased;
use AsetOfRandom\Imports\DetectChanges\BCBreak\TraitBased;
use AsetOfRandom\Imports\DetectChanges\Variance\TypeIsContravariant;
use AsetOfRandom\Imports\DetectChanges\Variance\TypeIsCovariant;
use AsetOfRandom\Imports\Factory\ComposerInstallationReflectorFactory;
use AsetOfRandom\Imports\Git\GetVersionCollectionFromGitRepository;
use AsetOfRandom\Imports\Git\GitCheckoutRevisionToTemporaryPath;
use AsetOfRandom\Imports\Git\GitParseRevision;
use AsetOfRandom\Imports\Git\PickLastMinorVersionFromCollection;
use AsetOfRandom\Imports\LocateDependencies\LocateDependenciesViaComposer;
use AsetOfRandom\Imports\LocateSources\LocateSourcesViaComposerJson;
use AsetOfRandom\Imports\BetterReflection;
use RuntimeException;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\ConsoleOutput;

/**
 * mPDF, PHP library generating PDF files from UTF-8 encoded HTML
 *
 * based on FPDF by Olivier Plathey
 *      and HTML2FPDF by Renato Coelho
 *
 * @license GPL-2.0
 */
class Mpdf
{
    const VERSION = '8.0.6';

    const SCALE = 72 / 25.4;

    var $useFixedNormalLineHeight; // mPDF 6
    var $useFixedTextBaseline; // mPDF 6
    var $adjustFontDescLineheight; // mPDF 6
    var $interpolateImages; // mPDF 6
    var $defaultPagebreakType; // mPDF 6 pagebreaktype
    var $indexUseSubentries; // mPDF 6

    var $autoScriptToLang; // mPDF 6
    var $baseScript; // mPDF 6
    var $autoVietnamese; // mPDF 6
    var $autoArabic; // mPDF 6

    var $CJKforceend;
    var $h2bookmarks;
    var $h2toc;
    var $decimal_align;
    var $margBuffer;
    var $splitTableBorderWidth;

    var $bookmarkStyles;
    var $useActiveForms;

    var $repackageTTF;
    var $allowCJKorphans;
    var $allowCJKoverflow;

    var $useKerning;
    var $restrictColorSpace;
    var $bleedMargin;
    var $crossMarkMargin;
    var $cropMarkMargin;
    var $cropMarkLength;
    var $nonPrintMargin;

    var $PDFX;
    var $PDFXauto;

    var $PDFA;
    var $PDFAversion = '1-B';
    var $PDFAauto;
    var $ICCProfile;

    var $printers_info;
    var $iterationCounter;
    var $smCapsScale;
    var $smCapsStretch;

    var $backupSubsFont;
    var $backupSIPFont;
    var $fonttrans;
    var $debugfonts;
    var $useAdobeCJK;
    var $percentSubset;
    var $maxTTFFilesize;
    var $BMPonly;

    var $tableMinSizePriority;

    var $dpi;
    var $watermarkImgAlphaBlend;
    var $watermarkImgBehind;
    var $justifyB4br;
    var $packTableData;
    var $pgsIns;
    var $simpleTables;
    var $enableImports;

    var $debug;

    var $setAutoTopMargin;
    var $setAutoBottomMargin;
    var $autoMarginPadding;
    var $collapseBlockMargins;
    var $falseBoldWeight;
    var $normalLineheight;
    var $incrementFPR1;
    var $incrementFPR2;
    var $incrementFPR3;
    var $incrementFPR4;

    var $SHYlang;
    var $SHYleftmin;
    var $SHYrightmin;
    var $SHYcharmin;
    var $SHYcharmax;
    var $SHYlanguages;

    // PageNumber Conditional Text
    var $pagenumPrefix;
    var $pagenumSuffix;

    var $nbpgPrefix;
    var $nbpgSuffix;
    var $showImageErrors;
    var $allow_output_buffering;
    var $autoPadding;
    var $tabSpaces;
    var $autoLangToFont;
    var $watermarkTextAlpha;
    var $watermarkImageAlpha;
    var $watermark_size;
    var $watermark_pos;
    var $annotSize;
    var $annotMargin;
    var $annotOpacity;
    var $title2annots;
    var $keepColumns;
    var $keep_table_proportions;
    var $ignore_table_widths;
    var $ignore_table_percents;
    var $list_number_suffix;

    var $list_auto_mode; // mPDF 6
    var $list_indent_first_level; // mPDF 6
    var $list_indent_default; // mPDF 6
    var $list_indent_default_mpdf;
    var $list_marker_offset; // mPDF 6
    var $list_symbol_size;

    var $useSubstitutions;
    var $CSSselectMedia;

    var $forcePortraitHeaders;
    var $forcePortraitMargins;
    var $displayDefaultOrientation;
    var $ignore_invalid_utf8;
    var $allowedCSStags;
    var $onlyCoreFonts;
    var $allow_charset_conversion;

    var $jSWord;
    var $jSmaxChar;
    var $jSmaxCharLast;
    var $jSmaxWordLast;

    var $max_colH_correction;

    var $table_error_report;
    var $table_error_report_param;
    var $biDirectional;
    var $text_input_as_HTML;
    var $anchor2Bookmark;
    var $shrink_tables_to_fit;

    var $allow_html_optional_endtags;

    var $img_dpi;
    var $whitelistStreamWrappers;

    var $defaultheaderfontsize;
    var $defaultheaderfontstyle;
    var $defaultheaderline;
    var $defaultfooterfontsize;
    var $defaultfooterfontstyle;
    var $defaultfooterline;
    var $header_line_spacing;
    var $footer_line_spacing;

    var $pregCJKchars;
    var $pregRTLchars;
    var $pregCURSchars; // mPDF 6

    var $mirrorMargins;
    var $watermarkText;
    var $watermarkAngle;
    var $watermarkImage;
    var $showWatermarkText;
    var $showWatermarkImage;

    var $svgAutoFont;
    var $svgClasses;

    var $fontsizes;

    var $defaultPageNumStyle; // mPDF 6

    //////////////////////
    // INTERNAL VARIABLES
    //////////////////////
    var $extrapagebreak; // mPDF 6 pagebreaktype

    var $uniqstr; // mPDF 5.7.2
    var $hasOC;

    var $textvar; // mPDF 5.7.1
    var $fontLanguageOverride; // mPDF 5.7.1
    var $OTLtags; // mPDF 5.7.1
    var $OTLdata;  // mPDF 5.7.1

    var $useDictionaryLBR;
    var $useTibetanLBR;

    var $writingToC;
    var $layers;
    var $layerDetails;
    var $current_layer;
    var $open_layer_pane;
    var $decimal_offset;
    var $inMeter;

    var $CJKleading;
    var $CJKfollowing;
    var $CJKoverflow;

    var $textshadow;

    var $colsums;
    var $spanborder;
    var $spanborddet;

    var $visibility;

    var $kerning;
    var $fixedlSpacing;
    var $minwSpacing;
    var $lSpacingCSS;
    var $wSpacingCSS;

    var $spotColorIDs;
    var $SVGcolors;
    var $spotColors;
    var $defTextColor;
    var $defDrawColor;
    var $defFillColor;

    var $tableBackgrounds;
    var $inlineDisplayOff;
    var $kt_y00;
    var $kt_p00;
    var $upperCase;
    var $checkSIP;
    var $checkSMP;
    var $checkCJK;

    var $watermarkImgAlpha;
    var $PDFAXwarnings;

    var $MetadataRoot;
    var $OutputIntentRoot;
    var $InfoRoot;
    var $associatedFilesRoot;

    var $pdf_version;

    private $fontDir;

    var $tempDir;

    var $allowAnnotationFiles;

    var $fontdata;

    var $noImageFile;
    var $lastblockbottommargin;
    var $baselineC;

    // mPDF 5.7.3  inline text-decoration parameters
    var $baselineSup;
    var $baselineSub;
    var $baselineS;
    var $baselineO;

    var $subPos;
    var $subArrMB;
    var $ReqFontStyle;
    var $tableClipPath;

    var $fullImageHeight;

    var $inFixedPosBlock;  // Internal flag for position:fixed block
    var $fixedPosBlock;  // Buffer string for position:fixed block
    var $fixedPosBlockDepth;
    var $fixedPosBlockBBox;
    var $fixedPosBlockSave;
    var $maxPosL;
    var $maxPosR;
    var $loaded;

    var $extraFontSubsets;

    var $docTemplateStart;  // Internal flag for page (page no. -1) that docTemplate starts on

    var $time0;

    var $hyphenationDictionaryFile;

    var $spanbgcolorarray;
    var $default_font;
    var $headerbuffer;
    var $lastblocklevelchange;
    var $nestedtablejustfinished;
    var $linebreakjustfinished;
    var $cell_border_dominance_L;
    var $cell_border_dominance_R;
    var $cell_border_dominance_T;
    var $cell_border_dominance_B;
    var $table_keep_together;
    var $plainCell_properties;
    var $shrin_k1;
    var $outerfilled;

    var $blockContext;
    var $floatDivs;

    var $patterns;
    var $pageBackgrounds;

    var $bodyBackgroundGradient;
    var $bodyBackgroundImage;
    var $bodyBackgroundColor;

    var $writingHTMLheader; // internal flag - used both for writing HTMLHeaders/Footers and FixedPos block
    var $writingHTMLfooter;

    var $angle;

    var $gradients;

    var $kwt_Reference;
    var $kwt_BMoutlines;
    var $kwt_toc;

    var $tbrot_BMoutlines;
    var $tbrot_toc;

    var $col_BMoutlines;
    var $col_toc;

    var $floatbuffer;
    var $floatmargins;

    var $bullet;
    var $bulletarray;

    var $currentLang;
    var $default_lang;

    var $default_available_fonts;

    var $pageTemplate;
    var $docTemplate;
    var $docTemplateContinue;

    var $arabGlyphs;
    var $arabHex;
    var $persianGlyphs;
    var $persianHex;
    var $arabVowels;
    var $arabPrevLink;
    var $arabNextLink;

    var $formobjects; // array of Form Objects for WMF
    var $InlineProperties;
    var $InlineAnnots;
    var $InlineBDF; // mPDF 6 Bidirectional formatting
    var $InlineBDFctr; // mPDF 6

    var $ktAnnots;
    var $tbrot_Annots;
    var $kwt_Annots;
    var $columnAnnots;
    var $columnForms;
    var $tbrotForms;

    var $PageAnnots;

    var $pageDim; // Keep track of page wxh for orientation changes - set in _beginpage, used in _putannots

    var $breakpoints;

    var $tableLevel;
    var $tbctr;
    var $innermostTableLevel;
    var $saveTableCounter;
    var $cellBorderBuffer;

    var $saveHTMLFooter_height;
    var $saveHTMLFooterE_height;

    var $firstPageBoxHeader;
    var $firstPageBoxHeaderEven;
    var $firstPageBoxFooter;
    var $firstPageBoxFooterEven;

    var $page_box;

    var $show_marks; // crop or cross marks
    var $basepathIsLocal;

    var $use_kwt;
    var $kwt;
    var $kwt_height;
    var $kwt_y0;
    var $kwt_x0;
    var $kwt_buffer;
    var $kwt_Links;
    var $kwt_moved;
    var $kwt_saved;

    var $PageNumSubstitutions;

    var $table_borders_separate;
    var $base_table_properties;
    var $borderstyles;

    var $blockjustfinished;

    var $orig_bMargin;
    var $orig_tMargin;
    var $orig_lMargin;
    var $orig_rMargin;
    var $orig_hMargin;
    var $orig_fMargin;

    var $pageHTMLheaders;
    var $pageHTMLfooters;

    var $saveHTMLHeader;
    var $saveHTMLFooter;

    var $HTMLheaderPageLinks;
    var $HTMLheaderPageAnnots;
    var $HTMLheaderPageForms;

    // See Config\FontVariables for these next 5 values
    var $available_unifonts;
    var $sans_fonts;
    var $serif_fonts;
    var $mono_fonts;
    var $defaultSubsFont;

    // List of ALL available CJK fonts (incl. styles) (Adobe add-ons)  hw removed
    var $available_CJK_fonts;

    var $HTMLHeader;
    var $HTMLFooter;
    var $HTMLHeaderE;
    var $HTMLFooterE;
    var $bufferoutput;

    // CJK fonts
    var $Big5_widths;
    var $GB_widths;
    var $SJIS_widths;
    var $UHC_widths;

    // SetProtection
    var $encrypted;

    var $enc_obj_id; // encryption object id

    // Bookmark
    var $BMoutlines;
    var $OutlineRoot;

    // INDEX
    var $ColActive;
    var $Reference;
    var $CurrCol;
    var $NbCol;
    var $y0;   // Top ordinate of columns

    var $ColL;
    var $ColWidth;
    var $ColGap;

    // COLUMNS
    var $ColR;
    var $ChangeColumn;
    var $columnbuffer;
    var $ColDetails;
    var $columnLinks;
    var $colvAlign;

    // Substitutions
    var $substitute;  // Array of substitution strings e.g. <ttz>112</ttz>
    var $entsearch;  // Array of HTML entities (>ASCII 127) to substitute
    var $entsubstitute; // Array of substitution decimal unicode for the Hi entities

    // Default values if no style sheet offered	(cf. http://www.w3.org/TR/CSS21/sample.html)
    var $defaultCSS;
    var $defaultCssFile;

    var $lastoptionaltag; // Save current block item which HTML specifies optionsl endtag
    var $pageoutput;
    var $charset_in;
    var $blk;
    var $blklvl;
    var $ColumnAdjust;

    var $ws; // Word spacing

    var $HREF;
    var $pgwidth;
    var $fontlist;
    var $oldx;
    var $oldy;
    var $B;
    var $I;

    var $tdbegin;
    var $table;
    var $cell;
    var $col;
    var $row;

    var $divbegin;
    var $divwidth;
    var $divheight;
    var $spanbgcolor;

    // mPDF 6 Used for table cell (block-type) properties
    var $cellTextAlign;
    var $cellLineHeight;
    var $cellLineStackingStrategy;
    var $cellLineStackingShift;

    // mPDF 6  Lists
    var $listcounter;
    var $listlvl;
    var $listtype;
    var $listitem;

    var $pjustfinished;
    var $ignorefollowingspaces;
    var $SMALL;
    var $BIG;
    var $dash_on;
    var $dotted_on;

    var $textbuffer;
    var $currentfontstyle;
    var $currentfontfamily;
    var $currentfontsize;
    var $colorarray;
    var $bgcolorarray;
    var $internallink;
    var $enabledtags;

    var $lineheight;
    var $default_lineheight_correction;
    var $basepath;
    var $textparam;

    var $specialcontent;
    var $selectoption;
    var $objectbuffer;

    // Table Rotation
    var $table_rotate;
    var $tbrot_maxw;
    var $tbrot_maxh;
    var $tablebuffer;
    var $tbrot_align;
    var $tbrot_Links;

    var $keep_block_together; // Keep a Block from page-break-inside: avoid

    var $tbrot_y0;
    var $tbrot_x0;
    var $tbrot_w;
    var $tbrot_h;

    var $mb_enc;
    var $originalMbEnc;
    var $originalMbRegexEnc;

    var $directionality;

    var $extgstates; // Used for alpha channel - Transparency (Watermark)
    var $mgl;
    var $mgt;
    var $mgr;
    var $mgb;

    var $tts;
    var $ttz;
    var $tta;

    // Best to alter the below variables using default stylesheet above
    var $page_break_after_avoid;
    var $margin_bottom_collapse;
    var $default_font_size; // in pts
    var $original_default_font_size; // used to save default sizes when using table default
    var $original_default_font;
    var $watermark_font;
    var $defaultAlign;

    // TABLE
    var $defaultTableAlign;
    var $tablethead;
    var $thead_font_weight;
    var $thead_font_style;
    var $thead_font_smCaps;
    var $thead_valign_default;
    var $thead_textalign_default;
    var $tabletfoot;
    var $tfoot_font_weight;
    var $tfoot_font_style;
    var $tfoot_font_smCaps;
    var $tfoot_valign_default;
    var $tfoot_textalign_default;

    var $trow_text_rotate;

    var $cellPaddingL;
    var $cellPaddingR;
    var $cellPaddingT;
    var $cellPaddingB;
    var $table_border_attr_set;
    var $table_border_css_set;

    var $shrin_k; // factor with which to shrink tables - used internally - do not change
    var $shrink_this_table_to_fit; // 0 or false to disable; value (if set) gives maximum factor to reduce fontsize
    var $MarginCorrection; // corrects for OddEven Margins
    var $margin_footer;
    var $margin_header;

    var $tabletheadjustfinished;
    var $usingCoreFont;
    var $charspacing;

    var $js;

    /**
     * Set timeout for cURL
     *
     * @var int
     */
    var $curlTimeout;

    /**
     * Set to true to follow redirects with cURL.
     *
     * @var bool
     */
    var $curlFollowLocation;

    /**
     * Set your own CA certificate store for SSL Certificate verification when using cURL
     *
     * Useful setting to use on hosts with outdated CA certificates.
     *
     * Download the latest CA certificate from https://curl.haxx.se/docs/caextract.html
     *
     * @var string The absolute path to the pem file
     */
    var $curlCaCertificate;

    /**
     * Set to true to allow unsafe SSL HTTPS requests.
     *
     * Can be useful when using CDN with HTTPS and if you don't want to configure settings with SSL certificates.
     *
     * @var bool
     */
    var $curlAllowUnsafeSslRequests;

    /**
     * Set the proxy for cURL.
     *
     * @see https://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html
     *
     * @var string
     */
    var $curlProxy;

    /**
     * Set the proxy auth for cURL.
     *
     * @see https://curl.haxx.se/libcurl/c/CURLOPT_PROXYUSERPWD.html
     *
     * @var string
     */
    var $curlProxyAuth;

    // Private properties FROM FPDF
    var $DisplayPreferences;
    var $flowingBlockAttr;

    var $page; // current page number

    var $n; // current object number
    var $n_js; // current object number

    var $n_ocg_hidden;
    var $n_ocg_print;
    var $n_ocg_view;

    var $offsets; // array of object offsets
    var $buffer; // buffer holding in-memory PDF
    var $pages; // array containing pages
    var $state; // current document state
    var $compress; // compression flag

    var $DefOrientation; // default orientation
    var $CurOrientation; // current orientation
    var $OrientationChanges; // array indicating orientation changes

    var $fwPt;
    var $fhPt; // dimensions of page format in points
    var $fw;
    var $fh; // dimensions of page format in user unit
    var $wPt;
    var $hPt; // current dimensions of page in points

    var $w;
    var $h; // current dimensions of page in user unit

    var $lMargin; // left margin
    var $tMargin; // top margin
    var $rMargin; // right margin
    var $bMargin; // page break margin
    var $cMarginL; // cell margin Left
    var $cMarginR; // cell margin Right
    var $cMarginT; // cell margin Left
    var $cMarginB; // cell margin Right

    var $DeflMargin; // Default left margin
    var $DefrMargin; // Default right margin

    var $x;
    var $y; // current position in user unit for cell positioning

    var $lasth; // height of last cell printed
    var $LineWidth; // line width in user unit

    var $CoreFonts; // array of standard font names
    var $fonts; // array of used fonts
    var $FontFiles; // array of font files

    var $images; // array of used images
    var $imageVars = []; // array of image vars

    var $PageLinks; // array of links in pages
    var $links; // array of internal links
    var $FontFamily; // current font family
    var $FontStyle; // current font style
    var $CurrentFont; // current font info
    var $FontSizePt; // current font size in points
    var $FontSize; // current font size in user unit
    var $DrawColor; // commands for drawing color
    var $FillColor; // commands for filling color
    var $TextColor; // commands for text color
    var $ColorFlag; // indicates whether fill and text colors are different
    var $autoPageBreak; // automatic page breaking
    var $PageBreakTrigger; // threshold used to trigger page breaks
    var $InFooter; // flag set when processing footer

    var $InHTMLFooter;
    var $processingFooter; // flag set when processing footer - added for columns
    var $processingHeader; // flag set when processing header - added for columns
    var $ZoomMode; // zoom display mode
    var $LayoutMode; // layout display mode
    var $title; // title
    var $subject; // subject
    var $author; // author
    var $keywords; // keywords
    var $creator; // creator

    var $customProperties; // array of custom document properties

    var $associatedFiles; // associated files (see SetAssociatedFiles below)
    var $additionalXmpRdf; // additional rdf added in xmp

    var $aliasNbPg; // alias for total number of pages
    var $aliasNbPgGp; // alias for total number of pages in page group

    var $ispre;
    var $outerblocktags;
    var $innerblocktags;

    public $exposeVersion;

    /**
     * @var string
     */
    private $fontDescriptor;

    /**
     * @var \Mpdf\Otl
     */
    private $otl;

    /**
     * @var \Mpdf\CssManager
     */
    private $cssManager;

    /**
     * @var \Mpdf\Gradient
     */
    private $gradient;

    /**
     * @var \Mpdf\Image\Bmp
     */
    private $bmp;

    /**
     * @var \Mpdf\Image\Wmf
     */
    private $wmf;

    /**
     * @var \Mpdf\TableOfContents
     */
    private $tableOfContents;

    /**
     * @var \Mpdf\Form
     */
    private $form;

    /**
     * @var \Mpdf\DirectWrite
     */
    private $directWrite;

    /**
     * @var \Mpdf\Cache
     */
    private $cache;

    /**
     * @var \Mpdf\Fonts\FontCache
     */
    private $fontCache;

    /**
     * @var \Mpdf\Fonts\FontFileFinder
     */
    private $fontFileFinder;

    /**
     * @var \Mpdf\Tag
     */
    private $tag;

    /**
     * @var \Mpdf\Barcode
     * @todo solve Tag dependency and make private
     */
    public $barcode;

    /**
     * @var \Mpdf\QrCode\QrCode
     */
    private $qrcode;

    /**
     * @var \Mpdf\SizeConverter
     */
    private $sizeConverter;

    /**
     * @var \Mpdf\Color\ColorConverter
     */
    private $colorConverter;

    /**
     * @var \Mpdf\Color\ColorModeConverter
     */
    private $colorModeConverter;

    /**
     * @var \Mpdf\Color\ColorSpaceRestrictor
     */
    private $colorSpaceRestrictor;

    /**
     * @var \Mpdf\Hyphenator
     */
    private $hyphenator;

    /**
     * @var \Mpdf\Pdf\Protection
     */
    private $protection;

    /**
     * @var \Mpdf\RemoteContentFetcher
     */
    private $remoteContentFetcher;

    /**
     * @var \Mpdf\Image\ImageProcessor
     */
    private $imageProcessor;

    /**
     * @var \Mpdf\Language\LanguageToFontInterface
     */
    private $languageToFont;

    /**
     * @var \Mpdf\Language\ScriptToLanguageInterface
     */
    private $scriptToLanguage;

    /**
     * @var \Psr\Log\LoggerInterface
     */
    private $logger;

    /**
     * @var \Mpdf\Writer\BaseWriter
     */
    private $writer;

    /**
     * @var \Mpdf\Writer\FontWriter
     */
    private $fontWriter;

    /**
     * @var \Mpdf\Writer\MetadataWriter
     */
    private $metadataWriter;

    /**
     * @var \Mpdf\Writer\ImageWriter
     */
    private $imageWriter;

    /**
     * @var \Mpdf\Writer\FormWriter
     */
    private $formWriter;

    /**
     * @var \Mpdf\Writer\PageWriter
     */
    private $pageWriter;

    /**
     * @var \Mpdf\Writer\BookmarkWriter
     */
    private $bookmarkWriter;

    /**
     * @var \Mpdf\Writer\OptionalContentWriter
     */
    private $optionalContentWriter;

    /**
     * @var \Mpdf\Writer\ColorWriter
     */
    private $colorWriter;

    /**
     * @var \Mpdf\Writer\BackgroundWriter
     */
    private $backgroundWriter;

    /**
     * @var \Mpdf\Writer\JavaScriptWriter
     */
    private $javaScriptWriter;

    /**
     * @var \Mpdf\Writer\ResourceWriter
     */
    private $resourceWriter;

    /**
     * @var string[]
     */
    private $services;

    /**
     * @param mixed[] $config
     */
    public function __construct(array $config = [])
    {
        $this->_dochecks();

        [
            $mode,
            $format,
            $default_font_size,
            $default_font,
            $mgl,
            $mgr,
            $mgt,
            $mgb,
            $mgh,
            $mgf,
            $orientation
            ] = $this->initConstructorParams($config);

        $this->logger = new NullLogger();

        $originalConfig = $config;
        $config = $this->initConfig($originalConfig);

        $serviceFactory = new ServiceFactory();
        $services = $serviceFactory->getServices(
            $this,
            $this->logger,
            $config,
            $this->restrictColorSpace,
            $this->languageToFont,
            $this->scriptToLanguage,
            $this->fontDescriptor,
            $this->bmp,
            $this->directWrite,
            $this->wmf
        );

        $this->services = [];

        foreach ($services as $key => $service) {
            $this->{$key} = $service;
            $this->services[] = $key;
        }

        $this->time0 = microtime(true);

        $this->writingToC = false;

        $this->layers = [];
        $this->current_layer = 0;
        $this->open_layer_pane = false;

        $this->visibility = 'visible';

        $this->tableBackgrounds = [];
        $this->uniqstr = '20110230'; // mPDF 5.7.2
        $this->kt_y00 = 0;
        $this->kt_p00 = 0;
        $this->BMPonly = [];
        $this->page = 0;
        $this->n = 2;
        $this->buffer = '';
        $this->objectbuffer = [];
        $this->pages = [];
        $this->OrientationChanges = [];
        $this->state = 0;
        $this->fonts = [];
        $this->FontFiles = [];
        $this->images = [];
        $this->links = [];
        $this->InFooter = false;
        $this->processingFooter = false;
        $this->processingHeader = false;
        $this->lasth = 0;
        $this->FontFamily = '';
        $this->FontStyle = '';
        $this->FontSizePt = 9;

        // Small Caps
        $this->inMeter = false;
        $this->decimal_offset = 0;

        $this->PDFAXwarnings = [];

        $this->defTextColor = $this->TextColor = $this->SetTColor($this->colorConverter->convert(0, $this->PDFAXwarnings), true);
        $this->defDrawColor = $this->DrawColor = $this->SetDColor($this->colorConverter->convert(0, $this->PDFAXwarnings), true);
        $this->defFillColor = $this->FillColor = $this->SetFColor($this->colorConverter->convert(255, $this->PDFAXwarnings), true);

        $this->upperCase = require __DIR__ . '/../data/upperCase.php';

        $this->extrapagebreak = true; // mPDF 6 pagebreaktype

        $this->ColorFlag = false;
        $this->extgstates = [];

        $this->mb_enc = 'windows-1252';
        $this->originalMbEnc = mb_internal_encoding();
        $this->originalMbRegexEnc = mb_regex_encoding();

        $this->directionality = 'ltr';
        $this->defaultAlign = 'L';
        $this->defaultTableAlign = 'L';

        $this->fixedPosBlockSave = [];
        $this->extraFontSubsets = 0;

        $this->blockContext = 1;
        $this->floatDivs = [];
        $this->DisplayPreferences = '';

        // Tiling patterns used for backgrounds
        $this->patterns = [];
        $this->pageBackgrounds = [];
        $this->gradients = [];

        // internal flag - used both for writing HTMLHeaders/Footers and FixedPos block
        $this->writingHTMLheader = false;
        // internal flag - used both for writing HTMLHeaders/Footers and FixedPos block
        $this->writingHTMLfooter = false;

        $this->kwt_Reference = [];
        $this->kwt_BMoutlines = [];
        $this->kwt_toc = [];

        $this->tbrot_BMoutlines = [];
        $this->tbrot_toc = [];

        $this->col_BMoutlines = [];
        $this->col_toc = [];

        $this->pgsIns = [];
        $this->PDFAXwarnings = [];
        $this->inlineDisplayOff = false;
        $this->lSpacingCSS = '';
        $this->wSpacingCSS = '';
        $this->fixedlSpacing = false;
        $this->minwSpacing = 0;

        // Baseline for text
        $this->baselineC = 0.35;

        // mPDF 5.7.3  inline text-decoration parameters
        // Sets default change in baseline for <sup> text as factor of preceeding fontsize
        // 0.35 has been recommended; 0.5 matches applications like MS Word
        $this->baselineSup = 0.5;

        // Sets default change in baseline for <sub> text as factor of preceeding fontsize
        $this->baselineSub = -0.2;
        // Sets default height for <strike> text as factor of fontsize
        $this->baselineS = 0.3;
        // Sets default height for overline text as factor of fontsize
        $this->baselineO = 1.1;

        $this->noImageFile = __DIR__ . '/../data/no_image.jpg';
        $this->subPos = 0;

        $this->fullImageHeight = false;
        $this->floatbuffer = [];
        $this->floatmargins = [];
        $this->formobjects = []; // array of Form Objects for WMF
        $this->InlineProperties = [];
        $this->InlineAnnots = [];
        $this->InlineBDF = []; // mPDF 6
        $this->InlineBDFctr = 0; // mPDF 6
        $this->tbrot_Annots = [];
        $this->kwt_Annots = [];
        $this->columnAnnots = [];
        $this->PageLinks = [];
        $this->OrientationChanges = [];
        $this->pageDim = [];
        $this->saveHTMLHeader = [];
        $this->saveHTMLFooter = [];
        $this->PageAnnots = [];
        $this->PageNumSubstitutions = [];
        $this->breakpoints = []; // used in columnbuffer
        $this->tableLevel = 0;
        $this->tbctr = []; // counter for nested tables at each level
        $this->page_box = [];
        $this->show_marks = ''; // crop or cross marks
        $this->kwt = false;
        $this->kwt_height = 0;
        $this->kwt_y0 = 0;
        $this->kwt_x0 = 0;
        $this->kwt_buffer = [];
        $this->kwt_Links = [];
        $this->kwt_moved = false;
        $this->kwt_saved = false;
        $this->PageNumSubstitutions = [];
        $this->base_table_properties = [];
        $this->borderstyles = ['inset', 'groove', 'outset', 'ridge', 'dotted', 'dashed', 'solid', 'double'];
        $this->tbrot_align = 'C';

        $this->pageHTMLheaders = [];
        $this->pageHTMLfooters = [];
        $this->HTMLheaderPageLinks = [];
        $this->HTMLheaderPageAnnots = [];

        $this->HTMLheaderPageForms = [];
        $this->columnForms = [];
        $this->tbrotForms = [];

        $this->pageoutput = [];

        $this->bufferoutput = false;

        $this->encrypted = false;

        $this->BMoutlines = [];
        $this->ColActive = 0;          // Flag indicating that columns are on (the index is being processed)
        $this->Reference = [];    // Array containing the references
        $this->CurrCol = 0;               // Current column number
        $this->ColL = [0];   // Array of Left pos of columns - absolute - needs Margin correction for Odd-Even
        $this->ColR = [0];   // Array of Right pos of columns - absolute pos - needs Margin correction for Odd-Even
        $this->ChangeColumn = 0;
        $this->columnbuffer = [];
        $this->ColDetails = [];  // Keeps track of some column details
        $this->columnLinks = [];  // Cross references PageLinks
        $this->substitute = [];  // Array of substitution strings e.g. <ttz>112</ttz>
        $this->entsearch = [];  // Array of HTML entities (>ASCII 127) to substitute
        $this->entsubstitute = []; // Array of substitution decimal unicode for the Hi entities
        $this->lastoptionaltag = '';
        $this->charset_in = '';
        $this->blk = [];
        $this->blklvl = 0;
        $this->tts = false;
        $this->ttz = false;
        $this->tta = false;
        $this->ispre = false;

        $this->checkSIP = false;
        $this->checkSMP = false;
        $this->checkCJK = false;

        $this->page_break_after_avoid = false;
        $this->margin_bottom_collapse = false;
        $this->tablethead = 0;
        $this->tabletfoot = 0;
        $this->table_border_attr_set = 0;
        $this->table_border_css_set = 0;
        $this->shrin_k = 1.0;
        $this->shrink_this_table_to_fit = 0;
        $this->MarginCorrection = 0;

        $this->tabletheadjustfinished = false;
        $this->usingCoreFont = false;
        $this->charspacing = 0;

        $this->autoPageBreak = true;

        $this->_setPageSize($format, $orientation);
        $this->DefOrientation = $orientation;

        $this->margin_header = $mgh;
        $this->margin_footer = $mgf;

        $bmargin = $mgb;

        $this->DeflMargin = $mgl;
        $this->DefrMargin = $mgr;

        $this->orig_tMargin = $mgt;
        $this->orig_bMargin = $bmargin;
        $this->orig_lMargin = $this->DeflMargin;
        $this->orig_rMargin = $this->DefrMargin;
        $this->orig_hMargin = $this->margin_header;
        $this->orig_fMargin = $this->margin_footer;

        if ($this->setAutoTopMargin == 'pad') {
            $mgt += $this->margin_header;
        }
        if ($this->setAutoBottomMargin == 'pad') {
            $mgb += $this->margin_footer;
        }

        // sets l r t margin
        $this->SetMargins($this->DeflMargin, $this->DefrMargin, $mgt);

        // Automatic page break
        // sets $this->bMargin & PageBreakTrigger
        $this->SetAutoPageBreak($this->autoPageBreak, $bmargin);

        $this->pgwidth = $this->w - $this->lMargin - $this->rMargin;

        // Interior cell margin (1 mm) ? not used
        $this->cMarginL = 1;
        $this->cMarginR = 1;

        // Line width (0.2 mm)
        $this->LineWidth = .567 / Mpdf::SCALE;

        // Enable all tags as default
        $this->DisableTags();
        // Full width display mode
        $this->SetDisplayMode(100); // fullwidth? 'fullpage'

        // Compression
        $this->SetCompression(true);
        // Set default display preferences
        $this->SetDisplayPreferences('');

        $this->initFontConfig($originalConfig);

        // Available fonts
        $this->available_unifonts = [];
        foreach ($this->fontdata as $f => $fs) {
            if (isset($fs['R']) && $fs['R']) {
                $this->available_unifonts[] = $f;
            }
            if (isset($fs['B']) && $fs['B']) {
                $this->available_unifonts[] = $f . 'B';
            }
            if (isset($fs['I']) && $fs['I']) {
                $this->available_unifonts[] = $f . 'I';
            }
            if (isset($fs['BI']) && $fs['BI']) {
                $this->available_unifonts[] = $f . 'BI';
            }
        }

        $this->default_available_fonts = $this->available_unifonts;

        $optcore = false;
        $onlyCoreFonts = false;
        if (preg_match('/([\-+])aCJK/i', $mode, $m)) {
            $mode = preg_replace('/([\-+])aCJK/i', '', $mode); // mPDF 6
            if ($m[1] == '+') {
                $this->useAdobeCJK = true;
            } else {
                $this->useAdobeCJK = false;
            }
        }

        if (strlen($mode) == 1) {
            if ($mode == 's') {
                $this->percentSubset = 100;
                $mode = '';
            } elseif ($mode == 'c') {
                $onlyCoreFonts = true;
                $mode = '';
            }
        } elseif (substr($mode, -2) == '-s') {
            $this->percentSubset = 100;
            $mode = substr($mode, 0, strlen($mode) - 2);
        } elseif (substr($mode, -2) == '-c') {
            $onlyCoreFonts = true;
            $mode = substr($mode, 0, strlen($mode) - 2);
        } elseif (substr($mode, -2) == '-x') {
            $optcore = true;
            $mode = substr($mode, 0, strlen($mode) - 2);
        }

        // Autodetect if mode is a language_country string (en-GB or en_GB or en)
        if ($mode && $mode != 'UTF-8') { // mPDF 6
            [$coreSuitable, $mpdf_pdf_unifont] = $this->languageToFont->getLanguageOptions($mode, $this->useAdobeCJK);
            if ($coreSuitable && $optcore) {
                $onlyCoreFonts = true;
            }
            if ($mpdf_pdf_unifont) {  // mPDF 6
                $default_font = $mpdf_pdf_unifont;
            }
            $this->currentLang = $mode;
            $this->default_lang = $mode;
        }

        $this->onlyCoreFonts = $onlyCoreFonts;

        if ($this->onlyCoreFonts) {
            $this->setMBencoding('windows-1252'); // sets $this->mb_enc
        } else {
            $this->setMBencoding('UTF-8'); // sets $this->mb_enc
        }
        @mb_regex_encoding('UTF-8'); // required only for mb_ereg... and mb_split functions

        // Adobe CJK fonts
        $this->available_CJK_fonts = [
            'gb',
            'big5',
            'sjis',
            'uhc',
            'gbB',
            'big5B',
            'sjisB',
            'uhcB',
            'gbI',
            'big5I',
            'sjisI',
            'uhcI',
            'gbBI',
            'big5BI',
            'sjisBI',
            'uhcBI',
        ];

        // Standard fonts
        $this->CoreFonts = [
            'ccourier' => 'Courier',
            'ccourierB' => 'Courier-Bold',
            'ccourierI' => 'Courier-Oblique',
            'ccourierBI' => 'Courier-BoldOblique',
            'chelvetica' => 'Helvetica',
            'chelveticaB' => 'Helvetica-Bold',
            'chelveticaI' => 'Helvetica-Oblique',
            'chelveticaBI' => 'Helvetica-BoldOblique',
            'ctimes' => 'Times-Roman',
            'ctimesB' => 'Times-Bold',
            'ctimesI' => 'Times-Italic',
            'ctimesBI' => 'Times-BoldItalic',
            'csymbol' => 'Symbol',
            'czapfdingbats' => 'ZapfDingbats'
        ];

        $this->fontlist = [
            "ctimes",
            "ccourier",
            "chelvetica",
            "csymbol",
            "czapfdingbats"
        ];

        // Substitutions
        $this->setHiEntitySubstitutions();

        if ($this->onlyCoreFonts) {
            $this->useSubstitutions = true;
            $this->SetSubstitutions();
        } else {
            $this->useSubstitutions = $config['useSubstitutions'];
        }

        if (file_exists($this->defaultCssFile)) {
            $css = file_get_contents($this->defaultCssFile);
            $this->cssManager->ReadCSS('<style> ' . $css . ' </style>');
        } else {
            throw new \Mpdf\MpdfException(sprintf('Unable to read default CSS file "%s"', $this->defaultCssFile));
        }

        if ($default_font == '') {
            if ($this->onlyCoreFonts) {
                if (in_array(strtolower($this->defaultCSS['BODY']['FONT-FAMILY']), $this->mono_fonts)) {
                    $default_font = 'ccourier';
                } elseif (in_array(strtolower($this->defaultCSS['BODY']['FONT-FAMILY']), $this->sans_fonts)) {
                    $default_font = 'chelvetica';
                } else {
                    $default_font = 'ctimes';
                }
            } else {
                $default_font = $this->defaultCSS['BODY']['FONT-FAMILY'];
            }
        }
        if (!$default_font_size) {
            $mmsize = $this->sizeConverter->convert($this->defaultCSS['BODY']['FONT-SIZE']);
            $default_font_size = $mmsize * (Mpdf::SCALE);
        }

        if ($default_font) {
            $this->SetDefaultFont($default_font);
        }
        if ($default_font_size) {
            $this->SetDefaultFontSize($default_font_size);
        }

        $this->SetLineHeight(); // lineheight is in mm

        $this->SetFColor($this->colorConverter->convert(255, $this->PDFAXwarnings));
        $this->HREF = '';
        $this->oldy = -1;
        $this->B = 0;
        $this->I = 0;

        // mPDF 6  Lists
        $this->listlvl = 0;
        $this->listtype = [];
        $this->listitem = [];
        $this->listcounter = [];

        $this->tdbegin = false;
        $this->table = [];
        $this->cell = [];
        $this->col = -1;
        $this->row = -1;
        $this->cellBorderBuffer = [];

        $this->divbegin = false;
        // mPDF 6
        $this->cellTextAlign = '';
        $this->cellLineHeight = '';
        $this->cellLineStackingStrategy = '';
        $this->cellLineStackingShift = '';

        $this->divwidth = 0;
        $this->divheight = 0;
        $this->spanbgcolor = false;
        $this->spanborder = false;
        $this->spanborddet = [];

        $this->blockjustfinished = false;
        $this->ignorefollowingspaces = true; // in order to eliminate exceeding left-side spaces
        $this->dash_on = false;
        $this->dotted_on = false;
        $this->textshadow = '';

        $this->currentfontfamily = '';
        $this->currentfontsize = '';
        $this->currentfontstyle = '';
        $this->colorarray = ''; // mPDF 6
        $this->spanbgcolorarray = ''; // mPDF 6
        $this->textbuffer = [];
        $this->internallink = [];
        $this->basepath = "";

        $this->SetBasePath('');

        $this->textparam = [];

        $this->specialcontent = '';
        $this->selectoption = [];
    }

    public function cleanup()
    {
        mb_internal_encoding($this->originalMbEnc);
        @mb_regex_encoding($this->originalMbRegexEnc);
    }

    /**
     * @param \Psr\Log\LoggerInterface
     *
     * @return \Mpdf\Mpdf
     */
    public function setLogger(LoggerInterface $logger)
    {
        $this->logger = $logger;

        foreach ($this->services as $name) {
            if ($this->$name && $this->$name instanceof \Psr\Log\LoggerAwareInterface) {
                $this->$name->setLogger($logger);
            }
        }

        return $this;
    }

    private function initConfig(array $config)
    {
        $configObject = new ConfigVariables();
        $defaults = $configObject->getDefaults();
        $config = array_intersect_key($config + $defaults, $defaults);

        foreach ($config as $var => $val) {
            $this->{$var} = $val;
        }

        return $config;
    }

    private function initConstructorParams(array $config)
    {
        $constructor = [
            'mode' => '',
            'format' => 'A4',
            'default_font_size' => 0,
            'default_font' => '',
            'margin_left' => 15,
            'margin_right' => 15,
            'margin_top' => 16,
            'margin_bottom' => 16,
            'margin_header' => 9,
            'margin_footer' => 9,
            'orientation' => 'P',
        ];

        foreach ($constructor as $key => $val) {
            if (isset($config[$key])) {
                $constructor[$key] = $config[$key];
            }
        }

        return array_values($constructor);
    }

    private function initFontConfig(array $config)
    {
        $configObject = new FontVariables();
        $defaults = $configObject->getDefaults();
        $config = array_intersect_key($config + $defaults, $defaults);
        foreach ($config as $var => $val) {
            $this->{$var} = $val;
        }

        return $config;
    }

    function _setPageSize($format, &$orientation)
    {
        if (is_string($format)) {

            if (empty($format)) {
                $format = 'A4';
            }

            // e.g. A4-L = A4 landscape, A4-P = A4 portrait
            if (preg_match('/([0-9a-zA-Z]*)-([P,L])/i', $format, $m)) {
                $format = $m[1];
                $orientation = $m[2];
            } elseif (empty($orientation)) {
                $orientation = 'P';
            }

            $format = PageFormat::getSizeFromName($format);

            $this->fwPt = $format[0];
            $this->fhPt = $format[1];

        } else {

            if (!$format[0] || !$format[1]) {
                throw new \Mpdf\MpdfException('Invalid page format: ' . $format[0] . ' ' . $format[1]);
            }

            $this->fwPt = $format[0] * Mpdf::SCALE;
            $this->fhPt = $format[1] * Mpdf::SCALE;
        }

        $this->fw = $this->fwPt / Mpdf::SCALE;
        $this->fh = $this->fhPt / Mpdf::SCALE;

        // Page orientation
        $orientation = strtolower($orientation);
        if ($orientation === 'p' || $orientation == 'portrait') {
            $orientation = 'P';
            $this->wPt = $this->fwPt;
            $this->hPt = $this->fhPt;
        } elseif ($orientation === 'l' || $orientation == 'landscape') {
            $orientation = 'L';
            $this->wPt = $this->fhPt;
            $this->hPt = $this->fwPt;
        } else {
            throw new \Mpdf\MpdfException('Incorrect orientation: ' . $orientation);
        }

        $this->CurOrientation = $orientation;

        $this->w = $this->wPt / Mpdf::SCALE;
        $this->h = $this->hPt / Mpdf::SCALE;
    }

    function RestrictUnicodeFonts($res)
    {
        // $res = array of (Unicode) fonts to restrict to: e.g. norasi|norasiB - language specific
        if (count($res)) { // Leave full list of available fonts if passed blank array
            $this->available_unifonts = $res;
        } else {
            $this->available_unifonts = $this->default_available_fonts;
        }
        if (count($this->available_unifonts) == 0) {
            $this->available_unifonts[] = $this->default_available_fonts[0];
        }
        $this->available_unifonts = array_values($this->available_unifonts);
    }

    function setMBencoding($enc)
    {
        if ($this->mb_enc != $enc) {
            $this->mb_enc = $enc;
            mb_internal_encoding($this->mb_enc);
        }
    }

    function SetMargins($left, $right, $top)
    {
        // Set left, top and right margins
        $this->lMargin = $left;
        $this->rMargin = $right;
        $this->tMargin = $top;
    }

    function ResetMargins()
    {
        // ReSet left, top margins
        if (($this->forcePortraitHeaders || $this->forcePortraitMargins) && $this->DefOrientation == 'P' && $this->CurOrientation == 'L') {
            if (($this->mirrorMargins) && (($this->page) % 2 == 0)) { // EVEN
                $this->tMargin = $this->orig_rMargin;
                $this->bMargin = $this->orig_lMargin;
            } else { // ODD	// OR NOT MIRRORING MARGINS/FOOTERS
                $this->tMargin = $this->orig_lMargin;
                $this->bMargin = $this->orig_rMargin;
            }
            $this->lMargin = $this->DeflMargin;
            $this->rMargin = $this->DefrMargin;
            $this->MarginCorrection = 0;
            $this->PageBreakTrigger = $this->h - $this->bMargin;
        } elseif (($this->mirrorMargins) && (($this->page) % 2 == 0)) { // EVEN
            $this->lMargin = $this->DefrMargin;
            $this->rMargin = $this->DeflMargin;
            $this->MarginCorrection = $this->DefrMargin - $this->DeflMargin;
        } else { // ODD	// OR NOT MIRRORING MARGINS/FOOTERS
            $this->lMargin = $this->DeflMargin;
            $this->rMargin = $this->DefrMargin;
            if ($this->mirrorMargins) {
                $this->MarginCorrection = $this->DeflMargin - $this->DefrMargin;
            }
        }
        $this->x = $this->lMargin;
    }

    function SetLeftMargin($margin)
    {
        // Set left margin
        $this->lMargin = $margin;
        if ($this->page > 0 and $this->x < $margin) {
            $this->x = $margin;
        }
    }

    function SetTopMargin($margin)
    {
        // Set top margin
        $this->tMargin = $margin;
    }

    function SetRightMargin($margin)
    {
        // Set right margin
        $this->rMargin = $margin;
    }

    function SetAutoPageBreak($auto, $margin = 0)
    {
        // Set auto page break mode and triggering margin
        $this->autoPageBreak = $auto;
        $this->bMargin = $margin;
        $this->PageBreakTrigger = $this->h - $margin;
    }

    function SetDisplayMode($zoom, $layout = 'continuous')
    {
        $allowedZoomModes = ['fullpage', 'fullwidth', 'real', 'default', 'none'];

        if (in_array($zoom, $allowedZoomModes, true) || is_numeric($zoom)) {
            $this->ZoomMode = $zoom;
        } else {
            throw new \Mpdf\MpdfException('Incorrect zoom display mode: ' . $zoom);
        }

        $allowedLayoutModes = ['single', 'continuous', 'two', 'twoleft', 'tworight', 'default'];

        if (in_array($layout, $allowedLayoutModes, true)) {
            $this->LayoutMode = $layout;
        } else {
            throw new \Mpdf\MpdfException('Incorrect layout display mode: ' . $layout);
        }
    }

    function SetCompression($compress)
    {
        // Set page compression
        if (function_exists('gzcompress')) {
            $this->compress = $compress;
        } else {
            $this->compress = false;
        }
    }

    function SetTitle($title)
    {
        // Title of document // Arrives as UTF-8
        $this->title = $title;
    }

    function SetSubject($subject)
    {
        // Subject of document
        $this->subject = $subject;
    }

    function SetAuthor($author)
    {
        // Author of document
        $this->author = $author;
    }

    function SetKeywords($keywords)
    {
        // Keywords of document
        $this->keywords = $keywords;
    }

    function SetCreator($creator)
    {
        // Creator of document
        $this->creator = $creator;
    }

    function AddCustomProperty($key, $value)
    {
        $this->customProperties[$key] = $value;
    }

    /**
     * Set one or multiple associated file ("/AF" as required by PDF/A-3)
     *
     * param $files is an array of hash containing:
     *   path: file path on FS
     *   content: file content
     *   name: file name (not necessarily the same as the file on FS)
     *   mime (optional): file mime type (will show up as /Subtype in the PDF)
     *   description (optional): file description
     *   AFRelationship (optional): PDF/A-3 AFRelationship (e.g. "Alternative")
     *
     * e.g. to associate 1 file:
     *     [[
     *         'path' => 'tmp/1234.xml',
     *         'content' => 'file content',
     *         'name' => 'public_name.xml',
     *         'mime' => 'text/xml',
     *         'description' => 'foo',
     *         'AFRelationship' => 'Alternative',
     *     ]]
     *
     * @param mixed[] $files Array of arrays of associated files. See above
     */
    function SetAssociatedFiles(array $files)
    {
        $this->associatedFiles = $files;
    }

    function SetAdditionalXmpRdf($s)
    {
        $this->additionalXmpRdf = $s;
    }

    function SetAnchor2Bookmark($x)
    {
        $this->anchor2Bookmark = $x;
    }

    public function AliasNbPages($alias = '{nb}')
    {
        // Define an alias for total number of pages
        $this->aliasNbPg = $alias;
    }

    public function AliasNbPageGroups($alias = '{nbpg}')
    {
        // Define an alias for total number of pages in a group
        $this->aliasNbPgGp = $alias;
    }

    function SetAlpha($alpha, $bm = 'Normal', $return = false, $mode = 'B')
    {
        // alpha: real value from 0 (transparent) to 1 (opaque)
        // bm:    blend mode, one of the following:
        //          Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn,
        //          HardLight, SoftLight, Difference, Exclusion, Hue, Saturation, Color, Luminosity
        // set alpha for stroking (CA) and non-stroking (ca) operations
        // mode determines F (fill) S (stroke) B (both)
        if (($this->PDFA || $this->PDFX) && $alpha != 1) {
            if (($this->PDFA && !$this->PDFAauto) || ($this->PDFX && !$this->PDFXauto)) {
                $this->PDFAXwarnings[] = "Image opacity must be 100% (Opacity changed to 100%)";
            }
            $alpha = 1;
        }
        $a = ['BM' => '/' . $bm];
        if ($mode == 'F' || $mode == 'B') {
            $a['ca'] = $alpha; // mPDF 5.7.2
        }
        if ($mode == 'S' || $mode == 'B') {
            $a['CA'] = $alpha; // mPDF 5.7.2
        }
        $gs = $this->AddExtGState($a);
        if ($return) {
            return sprintf('/GS%d gs', $gs);
        } else {
            $this->writer->write(sprintf('/GS%d gs', $gs));
        }
    }

    function AddExtGState($parms)
    {
        $n = count($this->extgstates);
        // check if graphics state already exists
        for ($i = 1; $i <= $n; $i++) {
            if (count($this->extgstates[$i]['parms']) == count($parms)) {
                $same = true;
                foreach ($this->extgstates[$i]['parms'] as $k => $v) {
                    if (!isset($parms[$k]) || $parms[$k] != $v) {
                        $same = false;
                        break;
                    }
                }
                if ($same) {
                    return $i;
                }
            }
        }
        $n++;
        $this->extgstates[$n]['parms'] = $parms;
        return $n;
    }

    function SetVisibility($v)
    {
        if (($this->PDFA || $this->PDFX) && $this->visibility != 'visible') {
            $this->PDFAXwarnings[] = "Cannot set visibility to anything other than full when using PDFA or PDFX";
            return '';
        } elseif (!$this->PDFA && !$this->PDFX) {
            $this->pdf_version = '1.5';
        }
        if ($this->visibility != 'visible') {
            $this->writer->write('EMC');
            $this->hasOC = intval($this->hasOC);
        }
        if ($v == 'printonly') {
            $this->writer->write('/OC /OC1 BDC');
            $this->hasOC = ($this->hasOC | 1);
        } elseif ($v == 'screenonly') {
            $this->writer->write('/OC /OC2 BDC');
            $this->hasOC = ($this->hasOC | 2);
        } elseif ($v == 'hidden') {
            $this->writer->write('/OC /OC3 BDC');
            $this->hasOC = ($this->hasOC | 4);
        } elseif ($v != 'visible') {
            throw new \Mpdf\MpdfException('Incorrect visibility: ' . $v);
        }
        $this->visibility = $v;
    }

    function Open()
    {
        // Begin document
        if ($this->state == 0) {
            // Was is function _begindoc()
            // Start document
            $this->state = 1;
            $this->writer->write('%PDF-' . $this->pdf_version);
            $this->writer->write('%' . chr(226) . chr(227) . chr(207) . chr(211)); // 4 chars > 128 to show binary file
        }
    }

    function Close()
    {
        // @log Closing last page

        // Terminate document
        if ($this->state == 3) {
            return;
        }
        if ($this->page == 0) {
            $this->AddPage($this->CurOrientation);
        }
        if (count($this->cellBorderBuffer)) {
            $this->printcellbuffer();
        } // *TABLES*
        if ($this->tablebuffer) {
            $this->printtablebuffer();
        } // *TABLES*
        /* -- COLUMNS -- */

        if ($this->ColActive) {
            $this->SetColumns(0);
            $this->ColActive = 0;
            if (count($this->columnbuffer)) {
                $this->printcolumnbuffer();
            }
        }
        /* -- END COLUMNS -- */

        // BODY Backgrounds
        $s = '';

        $s .= $this->PrintBodyBackgrounds();
        $s .= $this->PrintPageBackgrounds();

        $this->pages[$this->page] = preg_replace(
            '/(___BACKGROUND___PATTERNS' . $this->uniqstr . ')/',
            "\n" . $s . "\n" . '\\1',
            $this->pages[$this->page]
        );

        $this->pageBackgrounds = [];

        if ($this->visibility != 'visible') {
            $this->SetVisibility('visible');
        }

        $this->EndLayer();

        if (!$this->tableOfContents->TOCmark) { // Page footer
            $this->InFooter = true;
            $this->Footer();
            $this->InFooter = false;
        }

        if ($this->tableOfContents->TOCmark || count($this->tableOfContents->m_TOC)) {
            $this->tableOfContents->insertTOC();
        }

        // *TOC*
        // Close page
        $this->_endpage();

        // Close document
        $this->_enddoc();
    }

    /* -- BACKGROUNDS -- */

    function _resizeBackgroundImage($imw, $imh, $cw, $ch, $resize, $repx, $repy, $pba = [], $size = [])
    {
        // pba is background positioning area (from CSS background-origin) may not always be set [x,y,w,h]
        // size is from CSS3 background-size - takes precendence over old resize
        // $w - absolute length or % or auto or cover | contain
        // $h - absolute length or % or auto or cover | contain
        if (isset($pba['w'])) {
            $cw = $pba['w'];
        }
        if (isset($pba['h'])) {
            $ch = $pba['h'];
        }

        $cw = $cw * Mpdf::SCALE;
        $ch = $ch * Mpdf::SCALE;
        if (empty($size) && !$resize) {
            return [$imw, $imh, $repx, $repy];
        }

        if (isset($size['w']) && $size['w']) {
            if ($size['w'] == 'contain') {
                // Scale the image, while preserving its intrinsic aspect ratio (if any),
                // to the largest size such that both its width and its height can fit inside the background positioning area.
                // Same as resize==3
                $h = $imh * $cw / $imw;
                $w = $cw;
                if ($h > $ch) {
                    $w = $w * $ch / $h;
                    $h = $ch;
                }
            } elseif ($size['w'] == 'cover') {
                // Scale the image, while preserving its intrinsic aspect ratio (if any),
                // to the smallest size such that both its width and its height can completely cover the background positioning area.
                $h = $imh * $cw / $imw;
                $w = $cw;
                if ($h < $ch) {
                    $w = $w * $h / $ch;
                    $h = $ch;
                }
            } else {
                if (stristr($size['w'], '%')) {
                    $size['w'] = (float) $size['w'];
                    $size['w'] /= 100;
                    $size['w'] = ($cw * $size['w']);
                }
                if (stristr($size['h'], '%')) {
                    $size['h'] = (float) $size['h'];
                    $size['h'] /= 100;
                    $size['h'] = ($ch * $size['h']);
                }
                if ($size['w'] == 'auto' && $size['h'] == 'auto') {
                    $w = $imw;
                    $h = $imh;
                } elseif ($size['w'] == 'auto' && $size['h'] != 'auto') {
                    $w = $imw * $size['h'] / $imh;
                    $h = $size['h'];
                } elseif ($size['w'] != 'auto' && $size['h'] == 'auto') {
                    $h = $imh * $size['w'] / $imw;
                    $w = $size['w'];
                } else {
                    $w = $size['w'];
                    $h = $size['h'];
                }
            }
            return [$w, $h, $repx, $repy];
        } elseif ($resize == 1 && $imw > $cw) {
            $h = $imh * $cw / $imw;
            return [$cw, $h, $repx, $repy];
        } elseif ($resize == 2 && $imh > $ch) {
            $w = $imw * $ch / $imh;
            return [$w, $ch, $repx, $repy];
        } elseif ($resize == 3) {
            $w = $imw;
            $h = $imh;
            if ($w > $cw) {
                $h = $h * $cw / $w;
                $w = $cw;
            }
            if ($h > $ch) {
                $w = $w * $ch / $h;
                $h = $ch;
            }
            return [$w, $h, $repx, $repy];
        } elseif ($resize == 4) {
            $h = $imh * $cw / $imw;
            return [$cw, $h, $repx, $repy];
        } elseif ($resize == 5) {
            $w = $imw * $ch / $imh;
            return [$w, $ch, $repx, $repy];
        } elseif ($resize == 6) {
            return [$cw, $ch, $repx, $repy];
        }
        return [$imw, $imh, $repx, $repy];
    }

    function SetBackground(&$properties, &$maxwidth)
    {
        if (isset($properties['BACKGROUND-ORIGIN']) && ($properties['BACKGROUND-ORIGIN'] == 'border-box' || $properties['BACKGROUND-ORIGIN'] == 'content-box')) {
            $origin = $properties['BACKGROUND-ORIGIN'];
        } else {
            $origin = 'padding-box';
        }

        if (isset($properties['BACKGROUND-SIZE'])) {
            if (stristr($properties['BACKGROUND-SIZE'], 'contain')) {
                $bsw = $bsh = 'contain';
            } elseif (stristr($properties['BACKGROUND-SIZE'], 'cover')) {
                $bsw = $bsh = 'cover';
            } else {
                $bsw = $bsh = 'auto';
                $sz = preg_split('/\s+/', trim($properties['BACKGROUND-SIZE']));
                if (count($sz) == 2) {
                    $bsw = $sz[0];
                    $bsh = $sz[1];
                } else {
                    $bsw = $sz[0];
                }
                if (!stristr($bsw, '%') && !stristr($bsw, 'auto')) {
                    $bsw = $this->sizeConverter->convert($bsw, $maxwidth, $this->FontSize);
                }
                if (!stristr($bsh, '%') && !stristr($bsh, 'auto')) {
                    $bsh = $this->sizeConverter->convert($bsh, $maxwidth, $this->FontSize);
                }
            }
            $size = ['w' => $bsw, 'h' => $bsh];
        } else {
            $size = false;
        } // mPDF 6
        if (preg_match('/(-moz-)*(repeating-)*(linear|radial)-gradient/', $properties['BACKGROUND-IMAGE'])) {
            return ['gradient' => $properties['BACKGROUND-IMAGE'], 'origin' => $origin, 'size' => $size];
        } else {
            $file = $properties['BACKGROUND-IMAGE'];
            $sizesarray = $this->Image($file, 0, 0, 0, 0, '', '', false, false, false, false, true);
            if (isset($sizesarray['IMAGE_ID'])) {
                $image_id = $sizesarray['IMAGE_ID'];
                $orig_w = $sizesarray['WIDTH'] * Mpdf::SCALE;  // in user units i.e. mm
                $orig_h = $sizesarray['HEIGHT'] * Mpdf::SCALE;  // (using $this->img_dpi)
                if (isset($properties['BACKGROUND-IMAGE-RESOLUTION'])) {
                    if (preg_match('/from-image/i', $properties['BACKGROUND-IMAGE-RESOLUTION']) && isset($sizesarray['set-dpi']) && $sizesarray['set-dpi'] > 0) {
                        $orig_w *= $this->img_dpi / $sizesarray['set-dpi'];
                        $orig_h *= $this->img_dpi / $sizesarray['set-dpi'];
                    } elseif (preg_match('/(\d+)dpi/i', $properties['BACKGROUND-IMAGE-RESOLUTION'], $m)) {
                        $dpi = $m[1];
                        if ($dpi > 0) {
                            $orig_w *= $this->img_dpi / $dpi;
                            $orig_h *= $this->img_dpi / $dpi;
                        }
                    }
                }
                $x_repeat = true;
                $y_repeat = true;
                if (isset($properties['BACKGROUND-REPEAT'])) {
                    if ($properties['BACKGROUND-REPEAT'] == 'no-repeat' || $properties['BACKGROUND-REPEAT'] == 'repeat-x') {
                        $y_repeat = false;
                    }
                    if ($properties['BACKGROUND-REPEAT'] == 'no-repeat' || $properties['BACKGROUND-REPEAT'] == 'repeat-y') {
                        $x_repeat = false;
                    }
                }
                $x_pos = 0;
                $y_pos = 0;
                if (isset($properties['BACKGROUND-POSITION'])) {
                    $ppos = preg_split('/\s+/', $properties['BACKGROUND-POSITION']);
                    $x_pos = $ppos[0];
                    $y_pos = $ppos[1];
                    if (!stristr($x_pos, '%')) {
                        $x_pos = $this->sizeConverter->convert($x_pos, $maxwidth, $this->FontSize);
                    }
                    if (!stristr($y_pos, '%')) {
                        $y_pos = $this->sizeConverter->convert($y_pos, $maxwidth, $this->FontSize);
                    }
                }
                if (isset($properties['BACKGROUND-IMAGE-RESIZE'])) {
                    $resize = $properties['BACKGROUND-IMAGE-RESIZE'];
                } else {
                    $resize = 0;
                }
                if (isset($properties['BACKGROUND-IMAGE-OPACITY'])) {
                    $opacity = $properties['BACKGROUND-IMAGE-OPACITY'];
                } else {
                    $opacity = 1;
                }
                return ['image_id' => $image_id, 'orig_w' => $orig_w, 'orig_h' => $orig_h, 'x_pos' => $x_pos, 'y_pos' => $y_pos, 'x_repeat' => $x_repeat, 'y_repeat' => $y_repeat, 'resize' => $resize, 'opacity' => $opacity, 'itype' => $sizesarray['itype'], 'origin' => $origin, 'size' => $size];
            }
        }
        return false;
    }

    /* -- END BACKGROUNDS -- */

    function PrintBodyBackgrounds()
    {
        $s = '';
        $clx = 0;
        $cly = 0;
        $clw = $this->w;
        $clh = $this->h;
        // If using bleed and trim margins in paged media
        if ($this->pageDim[$this->page]['outer_width_LR'] || $this->pageDim[$this->page]['outer_width_TB']) {
            $clx = $this->pageDim[$this->page]['outer_width_LR'] - $this->pageDim[$this->page]['bleedMargin'];
            $cly = $this->pageDim[$this->page]['outer_width_TB'] - $this->pageDim[$this->page]['bleedMargin'];
            $clw = $this->w - 2 * $clx;
            $clh = $this->h - 2 * $cly;
        }

        if ($this->bodyBackgroundColor) {
            $s .= 'q ' . $this->SetFColor($this->bodyBackgroundColor, true) . "\n";
            if ($this->bodyBackgroundColor[0] == 5) { // RGBa
                $s .= $this->SetAlpha(ord($this->bodyBackgroundColor[4]) / 100, 'Normal', true, 'F') . "\n";
            } elseif ($this->bodyBackgroundColor[0] == 6) { // CMYKa
                $s .= $this->SetAlpha(ord($this->bodyBackgroundColor[5]) / 100, 'Normal', true, 'F') . "\n";
            }
            $s .= sprintf('%.3F %.3F %.3F %.3F re f Q', ($clx * Mpdf::SCALE), ($cly * Mpdf::SCALE), $clw * Mpdf::SCALE, $clh * Mpdf::SCALE) . "\n";
        }

        /* -- BACKGROUNDS -- */
        if ($this->bodyBackgroundGradient) {
            $g = $this->gradient->parseBackgroundGradient($this->bodyBackgroundGradient);
            if ($g) {
                $s .= $this->gradient->Gradient($clx, $cly, $clw, $clh, (isset($g['gradtype']) ? $g['gradtype'] : null), $g['stops'], $g['colorspace'], $g['coords'], $g['extend'], true);
            }
        }
        if ($this->bodyBackgroundImage) {
            if (isset($this->bodyBackgroundImage['gradient']) && $this->bodyBackgroundImage['gradient'] && preg_match('/(-moz-)*(repeating-)*(linear|radial)-gradient/', $this->bodyBackgroundImage['gradient'])) {
                $g = $this->gradient->parseMozGradient($this->bodyBackgroundImage['gradient']);
                if ($g) {
                    $s .= $this->gradient->Gradient($clx, $cly, $clw, $clh, $g['type'], $g['stops'], $g['colorspace'], $g['coords'], $g['extend'], true);
                }
            } elseif ($this->bodyBackgroundImage['image_id']) { // Background pattern
                $n = count($this->patterns) + 1;
                // If using resize, uses TrimBox (not including the bleed)
                [$orig_w, $orig_h, $x_repeat, $y_repeat] = $this->_resizeBackgroundImage($this->bodyBackgroundImage['orig_w'], $this->bodyBackgroundImage['orig_h'], $clw, $clh, $this->bodyBackgroundImage['resize'], $this->bodyBackgroundImage['x_repeat'], $this->bodyBackgroundImage['y_repeat']);

                $this->patterns[$n] = ['x' => $clx, 'y' => $cly, 'w' => $clw, 'h' => $clh, 'pgh' => $this->h, 'image_id' => $this->bodyBackgroundImage['image_id'], 'orig_w' => $orig_w, 'orig_h' => $orig_h, 'x_pos' => $this->bodyBackgroundImage['x_pos'], 'y_pos' => $this->bodyBackgroundImage['y_pos'], 'x_repeat' => $x_repeat, 'y_repeat' => $y_repeat, 'itype' => $this->bodyBackgroundImage['itype']];
                if (($this->bodyBackgroundImage['opacity'] > 0 || $this->bodyBackgroundImage['opacity'] === '0') && $this->bodyBackgroundImage['opacity'] < 1) {
                    $opac = $this->SetAlpha($this->bodyBackgroundImage['opacity'], 'Normal', true);
                } else {
                    $opac = '';
                }
                $s .= sprintf('q /Pattern cs /P%d scn %s %.3F %.3F %.3F %.3F re f Q', $n, $opac, ($clx * Mpdf::SCALE), ($cly * Mpdf::SCALE), $clw * Mpdf::SCALE, $clh * Mpdf::SCALE) . "\n";
            }
        }
        /* -- END BACKGROUNDS -- */
        return $s;
    }

    function _setClippingPath($clx, $cly, $clw, $clh)
    {
        $s = ' q 0 w '; // Line width=0
        $s .= sprintf('%.3F %.3F m ', ($clx) * Mpdf::SCALE, ($this->h - ($cly)) * Mpdf::SCALE); // start point TL before the arc
        $s .= sprintf('%.3F %.3F l ', ($clx) * Mpdf::SCALE, ($this->h - ($cly + $clh)) * Mpdf::SCALE); // line to BL
        $s .= sprintf('%.3F %.3F l ', ($clx + $clw) * Mpdf::SCALE, ($this->h - ($cly + $clh)) * Mpdf::SCALE); // line to BR
        $s .= sprintf('%.3F %.3F l ', ($clx + $clw) * Mpdf::SCALE, ($this->h - ($cly)) * Mpdf::SCALE); // line to TR
        $s .= sprintf('%.3F %.3F l ', ($clx) * Mpdf::SCALE, ($this->h - ($cly)) * Mpdf::SCALE); // line to TL
        $s .= ' W n '; // Ends path no-op & Sets the clipping path
        return $s;
    }

    function PrintPageBackgrounds($adjustmenty = 0)
    {
        $s = '';

        ksort($this->pageBackgrounds);

        foreach ($this->pageBackgrounds as $bl => $pbs) {

            foreach ($pbs as $pb) {

                if ((!isset($pb['image_id']) && !isset($pb['gradient'])) || isset($pb['shadowonly'])) { // Background colour or boxshadow

                    if ($pb['z-index'] > 0) {
                        $this->current_layer = $pb['z-index'];
                        $s .= "\n" . '/OCBZ-index /ZI' . $pb['z-index'] . ' BDC' . "\n";
                    }

                    if ($pb['visibility'] != 'visible') {
                        if ($pb['visibility'] == 'printonly') {
                            $s .= '/OC /OC1 BDC' . "\n";
                        } elseif ($pb['visibility'] == 'screenonly') {
                            $s .= '/OC /OC2 BDC' . "\n";
                        } elseif ($pb['visibility'] == 'hidden') {
                            $s .= '/OC /OC3 BDC' . "\n";
                        }
                    }

                    // Box shadow
                    if (isset($pb['shadow']) && $pb['shadow']) {
                        $s .= $pb['shadow'] . "\n";
                    }

                    if (isset($pb['clippath']) && $pb['clippath']) {
                        $s .= $pb['clippath'] . "\n";
                    }

                    $s .= 'q ' . $this->SetFColor($pb['col'], true) . "\n";

                    if ($pb['col'] && $pb['col'][0] === '5') { // RGBa
                        $s .= $this->SetAlpha(ord($pb['col'][4]) / 100, 'Normal', true, 'F') . "\n";
                    } elseif ($pb['col'] && $pb['col'][0] === '6') { // CMYKa
                        $s .= $this->SetAlpha(ord($pb['col'][5]) / 100, 'Normal', true, 'F') . "\n";
                    }

                    $s .= sprintf('%.3F %.3F %.3F %.3F re f Q', $pb['x'] * Mpdf::SCALE, ($this->h - $pb['y']) * Mpdf::SCALE, $pb['w'] * Mpdf::SCALE, -$pb['h'] * Mpdf::SCALE) . "\n";

                    if (isset($pb['clippath']) && $pb['clippath']) {
                        $s .= 'Q' . "\n";
                    }

                    if ($pb['visibility'] != 'visible') {
                        $s .= 'EMC' . "\n";
                    }

                    if ($pb['z-index'] > 0) {
                        $s .= "\n" . 'EMCBZ-index' . "\n";
                        $this->current_layer = 0;
                    }
                }
            }

            /* -- BACKGROUNDS -- */
            foreach ($pbs as $pb) {

                if ((isset($pb['gradient']) && $pb['gradient']) || (isset($pb['image_id']) && $pb['image_id'])) {

                    if ($pb['z-index'] > 0) {
                        $this->current_layer = $pb['z-index'];
                        $s .= "\n" . '/OCGZ-index /ZI' . $pb['z-index'] . ' BDC' . "\n";
                    }

                    if ($pb['visibility'] != 'visible') {
                        if ($pb['visibility'] == 'printonly') {
                            $s .= '/OC /OC1 BDC' . "\n";
                        } elseif ($pb['visibility'] == 'screenonly') {
                            $s .= '/OC /OC2 BDC' . "\n";
                        } elseif ($pb['visibility'] == 'hidden') {
                            $s .= '/OC /OC3 BDC' . "\n";
                        }
                    }

                }

                if (isset($pb['gradient']) && $pb['gradient']) {

                    if (isset($pb['clippath']) && $pb['clippath']) {
                        $s .= $pb['clippath'] . "\n";
                    }

                    $s .= $this->gradient->Gradient($pb['x'], $pb['y'], $pb['w'], $pb['h'], $pb['gradtype'], $pb['stops'], $pb['colorspace'], $pb['coords'], $pb['extend'], true);

                    if (isset($pb['clippath']) && $pb['clippath']) {
                        $s .= 'Q' . "\n";
                    }

                } elseif (isset($pb['image_id']) && $pb['image_id']) { // Background Image

                    $pb['y'] -= $adjustmenty;
                    $pb['h'] += $adjustmenty;
                    $n = count($this->patterns) + 1;

                    [$orig_w, $orig_h, $x_repeat, $y_repeat] = $this->_resizeBackgroundImage($pb['orig_w'], $pb['orig_h'], $pb['w'], $pb['h'], $pb['resize'], $pb['x_repeat'], $pb['y_repeat'], $pb['bpa'], $pb['size']);

                    $this->patterns[$n] = ['x' => $pb['x'], 'y' => $pb['y'], 'w' => $pb['w'], 'h' => $pb['h'], 'pgh' => $this->h, 'image_id' => $pb['image_id'], 'orig_w' => $orig_w, 'orig_h' => $orig_h, 'x_pos' => $pb['x_pos'], 'y_pos' => $pb['y_pos'], 'x_repeat' => $x_repeat, 'y_repeat' => $y_repeat, 'itype' => $pb['itype'], 'bpa' => $pb['bpa']];

                    $x = $pb['x'] * Mpdf::SCALE;
                    $y = ($this->h - $pb['y']) * Mpdf::SCALE;
                    $w = $pb['w'] * Mpdf::SCALE;
                    $h = -$pb['h'] * Mpdf::SCALE;

                    if (isset($pb['clippath']) && $pb['clippath']) {
                        $s .= $pb['clippath'] . "\n";
                    }

                    if ($this->writingHTMLfooter || $this->writingHTMLheader) { // Write each (tiles) image rather than use as a pattern

                        $iw = $pb['orig_w'] / Mpdf::SCALE;
                        $ih = $pb['orig_h'] / Mpdf::SCALE;

                        $w = $pb['w'];
                        $h = $pb['h'];
                        $x0 = $pb['x'];
                        $y0 = $pb['y'];

                        if (isset($pb['bpa']) && $pb['bpa']) {
                            $w = $pb['bpa']['w'];
                            $h = $pb['bpa']['h'];
                            $x0 = $pb['bpa']['x'];
                            $y0 = $pb['bpa']['y'];
                        }

                        if (isset($pb['size']['w']) && $pb['size']['w']) {
                            $size = $pb['size'];

                            if ($size['w'] == 'contain') {
                                // Scale the image, while preserving its intrinsic aspect ratio (if any), to the largest
                                // size such that both its width and its height can fit inside the background positioning area.
                                // Same as resize==3
                                $ih = $ih * $pb['bpa']['w'] / $iw;
                                $iw = $pb['bpa']['w'];
                                if ($ih > $pb['bpa']['h']) {
                                    $iw = $iw * $pb['bpa']['h'] / $ih;
                                    $ih = $pb['bpa']['h'];
                                }
                            } elseif ($size['w'] == 'cover') {
                                // Scale the image, while preserving its intrinsic aspect ratio (if any), to the smallest
                                // size such that both its width and its height can completely cover the background positioning area.
                                $ih = $ih * $pb['bpa']['w'] / $iw;
                                $iw = $pb['bpa']['w'];
                                if ($ih < $pb['bpa']['h']) {
                                    $iw = $iw * $ih / $pb['bpa']['h'];
                                    $ih = $pb['bpa']['h'];
                                }
                            } else {

                                if (NumericString::containsPercentChar($size['w'])) {
                                    $size['w'] = NumericString::removePercentChar($size['w']);
                                    $size['w'] /= 100;
                                    $size['w'] = ($pb['bpa']['w'] * $size['w']);
                                }

                                if (NumericString::containsPercentChar($size['h'])) {
                                    $size['h'] = NumericString::removePercentChar($size['h']);
                                    $size['h'] /= 100;
                                    $size['h'] = ($pb['bpa']['h'] * $size['h']);
                                }

                                if ($size['w'] == 'auto' && $size['h'] == 'auto') {
                                    $iw = $iw;
                                    $ih = $ih;
                                } elseif ($size['w'] == 'auto' && $size['h'] != 'auto') {
                                    $iw = $iw * $size['h'] / $ih;
                                    $ih = $size['h'];
                                } elseif ($size['w'] != 'auto' && $size['h'] == 'auto') {
                                    $ih = $ih * $size['w'] / $iw;
                                    $iw = $size['w'];
                                } else {
                                    $iw = $size['w'];
                                    $ih = $size['h'];
                                }
                            }
                        }

                        // Number to repeat
                        if ($pb['x_repeat']) {
                            $nx = ceil($pb['w'] / $iw) + 1;
                        } else {
                            $nx = 1;
                        }

                        if ($pb['y_repeat']) {
                            $ny = ceil($pb['h'] / $ih) + 1;
                        } else {
                            $ny = 1;
                        }

                        $x_pos = $pb['x_pos'];
                        if (stristr($x_pos, '%')) {
                            $x_pos = (float) $x_pos;
                            $x_pos /= 100;
                            $x_pos = ($pb['bpa']['w'] * $x_pos) - ($iw * $x_pos);
                        }

                        $y_pos = $pb['y_pos'];

                        if (stristr($y_pos, '%')) {
                            $y_pos = (float) $y_pos;
                            $y_pos /= 100;
                            $y_pos = ($pb['bpa']['h'] * $y_pos) - ($ih * $y_pos);
                        }

                        if ($nx > 1) {
                            while ($x_pos > ($pb['x'] - $pb['bpa']['x'])) {
                                $x_pos -= $iw;
                            }
                        }

                        if ($ny > 1) {
                            while ($y_pos > ($pb['y'] - $pb['bpa']['y'])) {
                                $y_pos -= $ih;
                            }
                        }

                        for ($xi = 0; $xi < $nx; $xi++) {
                            for ($yi = 0; $yi < $ny; $yi++) {
                                $x = $x0 + $x_pos + ($iw * $xi);
                                $y = $y0 + $y_pos + ($ih * $yi);
                                if ($pb['opacity'] > 0 && $pb['opacity'] < 1) {
                                    $opac = $this->SetAlpha($pb['opacity'], 'Normal', true);
                                } else {
                                    $opac = '';
                                }
                                $s .= sprintf("q %s %.3F 0 0 %.3F %.3F %.3F cm /I%d Do Q", $opac, $iw * Mpdf::SCALE, $ih * Mpdf::SCALE, $x * Mpdf::SCALE, ($this->h - ($y + $ih)) * Mpdf::SCALE, $pb['image_id']) . "\n";
                            }
                        }

                    } else {
                        if (($pb['opacity'] > 0 || $pb['opacity'] === '0') && $pb['opacity'] < 1) {
                            $opac = $this->SetAlpha($pb['opacity'], 'Normal', true);
                        } else {
                            $opac = '';
                        }
                        $s .= sprintf('q /Pattern cs /P%d scn %s %.3F %.3F %.3F %.3F re f Q', $n, $opac, $x, $y, $w, $h) . "\n";
                    }

                    if (isset($pb['clippath']) && $pb['clippath']) {
                        $s .= 'Q' . "\n";
                    }
                }

                if ((isset($pb['gradient']) && $pb['gradient']) || (isset($pb['image_id']) && $pb['image_id'])) {
                    if ($pb['visibility'] != 'visible') {
                        $s .= 'EMC' . "\n";
                    }

                    if ($pb['z-index'] > 0) {
                        $s .= "\n" . 'EMCGZ-index' . "\n";
                        $this->current_layer = 0;
                    }
                }
            }
            /* -- END BACKGROUNDS -- */
        }

        return $s;
    }

    function PrintTableBackgrounds($adjustmenty = 0)
    {
        $s = '';
        /* -- BACKGROUNDS -- */
        ksort($this->tableBackgrounds);
        foreach ($this->tableBackgrounds as $bl => $pbs) {
            foreach ($pbs as $pb) {
                if ((!isset($pb['gradient']) || !$pb['gradient']) && (!isset($pb['image_id']) || !$pb['image_id'])) {
                    $s .= 'q ' . $this->SetFColor($pb['col'], true) . "\n";
                    if ($pb['col'][0] == 5) { // RGBa
                        $s .= $this->SetAlpha(ord($pb['col'][4]) / 100, 'Normal', true, 'F') . "\n";
                    } elseif ($pb['col'][0] == 6) { // CMYKa
                        $s .= $this->SetAlpha(ord($pb['col'][5]) / 100, 'Normal', true, 'F') . "\n";
                    }
                    $s .= sprintf('%.3F %.3F %.3F %.3F re %s Q', $pb['x'] * Mpdf::SCALE, ($this->h - $pb['y']) * Mpdf::SCALE, $pb['w'] * Mpdf::SCALE, -$pb['h'] * Mpdf::SCALE, 'f') . "\n";
                }
                if (isset($pb['gradient']) && $pb['gradient']) {
                    if (isset($pb['clippath']) && $pb['clippath']) {
                        $s .= $pb['clippath'] . "\n";
                    }
                    $s .= $this->gradient->Gradient($pb['x'], $pb['y'], $pb['w'], $pb['h'], $pb['gradtype'], $pb['stops'], $pb['colorspace'], $pb['coords'], $pb['extend'], true);
                    if (isset($pb['clippath']) && $pb['clippath']) {
                        $s .= 'Q' . "\n";
                    }
                }
                if (isset($pb['image_id']) && $pb['image_id']) { // Background pattern
                    $pb['y'] -= $adjustmenty;
                    $pb['h'] += $adjustmenty;
                    $n = count($this->patterns) + 1;
                    [$orig_w, $orig_h, $x_repeat, $y_repeat] = $this->_resizeBackgroundImage($pb['orig_w'], $pb['orig_h'], $pb['w'], $pb['h'], $pb['resize'], $pb['x_repeat'], $pb['y_repeat']);
                    $this->patterns[$n] = ['x' => $pb['x'], 'y' => $pb['y'], 'w' => $pb['w'], 'h' => $pb['h'], 'pgh' => $this->h, 'image_id' => $pb['image_id'], 'orig_w' => $orig_w, 'orig_h' => $orig_h, 'x_pos' => $pb['x_pos'], 'y_pos' => $pb['y_pos'], 'x_repeat' => $x_repeat, 'y_repeat' => $y_repeat, 'itype' => $pb['itype']];
                    $x = $pb['x'] * Mpdf::SCALE;
                    $y = ($this->h - $pb['y']) * Mpdf::SCALE;
                    $w = $pb['w'] * Mpdf::SCALE;
                    $h = -$pb['h'] * Mpdf::SCALE;

                    // mPDF 5.7.3
                    if (($this->writingHTMLfooter || $this->writingHTMLheader) && (!isset($pb['clippath']) || $pb['clippath'] == '')) {
                        // Set clipping path
                        $pb['clippath'] = sprintf(' q 0 w %.3F %.3F m %.3F %.3F l %.3F %.3F l %.3F %.3F l %.3F %.3F l W n ', $x, $y, $x, $y + $h, $x + $w, $y + $h, $x + $w, $y, $x, $y);
                    }

                    if (isset($pb['clippath']) && $pb['clippath']) {
                        $s .= $pb['clippath'] . "\n";
                    }

                    // mPDF 5.7.3
                    if ($this->writingHTMLfooter || $this->writingHTMLheader) { // Write each (tiles) image rather than use as a pattern
                        $iw = $pb['orig_w'] / Mpdf::SCALE;
                        $ih = $pb['orig_h'] / Mpdf::SCALE;

                        $w = $pb['w'];
                        $h = $pb['h'];
                        $x0 = $pb['x'];
                        $y0 = $pb['y'];

                        if (isset($pb['bpa']) && $pb['bpa']) {
                            $w = $pb['bpa']['w'];
                            $h = $pb['bpa']['h'];
                            $x0 = $pb['bpa']['x'];
                            $y0 = $pb['bpa']['y'];
                        } // At present 'bpa' (background page area) is not set for tablebackgrounds - only pagebackgrounds
                        // For now, just set it as:
                        else {
                            $pb['bpa'] = ['x' => $x0, 'y' => $y0, 'w' => $w, 'h' => $h];
                        }

                        if (isset($pb['size']['w']) && $pb['size']['w']) {
                            $size = $pb['size'];

                            if ($size['w'] == 'contain') {
                                // Scale the image, while preserving its intrinsic aspect ratio (if any), to the largest size such that both its width and its height can fit inside the background positioning area.
                                // Same as resize==3
                                $ih = $ih * $pb['bpa']['w'] / $iw;
                                $iw = $pb['bpa']['w'];
                                if ($ih > $pb['bpa']['h']) {
                                    $iw = $iw * $pb['bpa']['h'] / $ih;
                                    $ih = $pb['bpa']['h'];
                                }
                            } elseif ($size['w'] == 'cover') {
                                // Scale the image, while preserving its intrinsic aspect ratio (if any), to the smallest size such that both its width and its height can completely cover the background positioning area.
                                $ih = $ih * $pb['bpa']['w'] / $iw;
                                $iw = $pb['bpa']['w'];
                                if ($ih < $pb['bpa']['h']) {
                                    $iw = $iw * $ih / $pb['bpa']['h'];
                                    $ih = $pb['bpa']['h'];
                                }
                            } else {
                                if (NumericString::containsPercentChar($size['w'])) {
                                    $size['w'] = NumericString::removePercentChar($size['w']);
                                    $size['w'] /= 100;
                                    $size['w'] = ($pb['bpa']['w'] * $size['w']);
                                }
                                if (NumericString::containsPercentChar($size['h'])) {
                                    $size['h'] = NumericString::removePercentChar($size['h']);
                                    $size['h'] /= 100;
                                    $size['h'] = ($pb['bpa']['h'] * $size['h']);
                                }
                                if ($size['w'] == 'auto' && $size['h'] == 'auto') {
                                    $iw = $iw;
                                    $ih = $ih;
                                } elseif ($size['w'] == 'auto' && $size['h'] != 'auto') {
                                    $iw = $iw * $size['h'] / $ih;
                                    $ih = $size['h'];
                                } elseif ($size['w'] != 'auto' && $size['h'] == 'auto') {
                                    $ih = $ih * $size['w'] / $iw;
                                    $iw = $size['w'];
                                } else {
                                    $iw = $size['w'];
                                    $ih = $size['h'];
                                }
                            }
                        }

                        // Number to repeat
                        if (isset($pb['x_repeat']) && $pb['x_repeat']) {
                            $nx = ceil($pb['w'] / $iw) + 1;
                        } else {
                            $nx = 1;
                        }
                        if (isset($pb['y_repeat']) && $pb['y_repeat']) {
                            $ny = ceil($pb['h'] / $ih) + 1;
                        } else {
                            $ny = 1;
                        }

                        $x_pos = $pb['x_pos'];
                        if (NumericString::containsPercentChar($x_pos)) {
                            $x_pos = NumericString::removePercentChar($x_pos);
                            $x_pos /= 100;
                            $x_pos = ($pb['bpa']['w'] * $x_pos) - ($iw * $x_pos);
                        }
                        $y_pos = $pb['y_pos'];
                        if (NumericString::containsPercentChar($y_pos)) {
                            $y_pos = NumericString::removePercentChar($y_pos);
                            $y_pos /= 100;
                            $y_pos = ($pb['bpa']['h'] * $y_pos) - ($ih * $y_pos);
                        }
                        if ($nx > 1) {
                            while ($x_pos > ($pb['x'] - $pb['bpa']['x'])) {
                                $x_pos -= $iw;
                            }
                        }
                        if ($ny > 1) {
                            while ($y_pos > ($pb['y'] - $pb['bpa']['y'])) {
                                $y_pos -= $ih;
                            }
                        }
                        for ($xi = 0; $xi < $nx; $xi++) {
                            for ($yi = 0; $yi < $ny; $yi++) {
                                $x = $x0 + $x_pos + ($iw * $xi);
                                $y = $y0 + $y_pos + ($ih * $yi);
                                if ($pb['opacity'] > 0 && $pb['opacity'] < 1) {
                                    $opac = $this->SetAlpha($pb['opacity'], 'Normal', true);
                                } else {
                                    $opac = '';
                                }
                                $s .= sprintf("q %s %.3F 0 0 %.3F %.3F %.3F cm /I%d Do Q", $opac, $iw * Mpdf::SCALE, $ih * Mpdf::SCALE, $x * Mpdf::SCALE, ($this->h - ($y + $ih)) * Mpdf::SCALE, $pb['image_id']) . "\n";
                            }
                        }
                    } else {
                        if (($pb['opacity'] > 0 || $pb['opacity'] === '0') && $pb['opacity'] < 1) {
                            $opac = $this->SetAlpha($pb['opacity'], 'Normal', true);
                        } else {
                            $opac = '';
                        }
                        $s .= sprintf('q /Pattern cs /P%d scn %s %.3F %.3F %.3F %.3F re f Q', $n, $opac, $x, $y, $w, $h) . "\n";
                    }

                    if (isset($pb['clippath']) && $pb['clippath']) {
                        $s .= 'Q' . "\n";
                    }
                }
            }
        }
        /* -- END BACKGROUNDS -- */
        return $s;
    }

    function BeginLayer($id)
    {
        if ($this->current_layer > 0) {
            $this->EndLayer();
        }
        if ($id < 1) {
            return false;
        }
        if (!isset($this->layers[$id])) {
            $this->layers[$id] = ['name' => 'Layer ' . ($id)];
            if (($this->PDFA || $this->PDFX)) {
                $this->PDFAXwarnings[] = "Cannot use layers when using PDFA or PDFX";
                return '';
            } elseif (!$this->PDFA && !$this->PDFX) {
                $this->pdf_version = '1.5';
            }
        }
        $this->current_layer = $id;
        $this->writer->write('/OCZ-index /ZI' . $id . ' BDC');

        $this->pageoutput[$this->page] = [];
    }

    function EndLayer()
    {
        if ($this->current_layer > 0) {
            $this->writer->write('EMCZ-index');
            $this->current_layer = 0;
        }
    }

    function AddPageByArray($a)
    {
        if (!is_array($a)) {
            $a = [];
        }

        $orientation = (isset($a['orientation']) ? $a['orientation'] : '');
        $condition = (isset($a['condition']) ? $a['condition'] : (isset($a['type']) ? $a['type'] : ''));
        $resetpagenum = (isset($a['resetpagenum']) ? $a['resetpagenum'] : '');
        $pagenumstyle = (isset($a['pagenumstyle']) ? $a['pagenumstyle'] : '');
        $suppress = (isset($a['suppress']) ? $a['suppress'] : '');
        $mgl = (isset($a['mgl']) ? $a['mgl'] : (isset($a['margin-left']) ? $a['margin-left'] : ''));
        $mgr = (isset($a['mgr']) ? $a['mgr'] : (isset($a['margin-right']) ? $a['margin-right'] : ''));
        $mgt = (isset($a['mgt']) ? $a['mgt'] : (isset($a['margin-top']) ? $a['margin-top'] : ''));
        $mgb = (isset($a['mgb']) ? $a['mgb'] : (isset($a['margin-bottom']) ? $a['margin-bottom'] : ''));
        $mgh = (isset($a['mgh']) ? $a['mgh'] : (isset($a['margin-header']) ? $a['margin-header'] : ''));
        $mgf = (isset($a['mgf']) ? $a['mgf'] : (isset($a['margin-footer']) ? $a['margin-footer'] : ''));
        $ohname = (isset($a['ohname']) ? $a['ohname'] : (isset($a['odd-header-name']) ? $a['odd-header-name'] : ''));
        $ehname = (isset($a['ehname']) ? $a['ehname'] : (isset($a['even-header-name']) ? $a['even-header-name'] : ''));
        $ofname = (isset($a['ofname']) ? $a['ofname'] : (isset($a['odd-footer-name']) ? $a['odd-footer-name'] : ''));
        $efname = (isset($a['efname']) ? $a['efname'] : (isset($a['even-footer-name']) ? $a['even-footer-name'] : ''));
        $ohvalue = (isset($a['ohvalue']) ? $a['ohvalue'] : (isset($a['odd-header-value']) ? $a['odd-header-value'] : 0));
        $ehvalue = (isset($a['ehvalue']) ? $a['ehvalue'] : (isset($a['even-header-value']) ? $a['even-header-value'] : 0));
        $ofvalue = (isset($a['ofvalue']) ? $a['ofvalue'] : (isset($a['odd-footer-value']) ? $a['odd-footer-value'] : 0));
        $efvalue = (isset($a['efvalue']) ? $a['efvalue'] : (isset($a['even-footer-value']) ? $a['even-footer-value'] : 0));
        $pagesel = (isset($a['pagesel']) ? $a['pagesel'] : (isset($a['pageselector']) ? $a['pageselector'] : ''));
        $newformat = (isset($a['newformat']) ? $a['newformat'] : (isset($a['sheet-size']) ? $a['sheet-size'] : ''));

        $this->AddPage($orientation, $condition, $resetpagenum, $pagenumstyle, $suppress, $mgl, $mgr, $mgt, $mgb, $mgh, $mgf, $ohname, $ehname, $ofname, $efname, $ohvalue, $ehvalue, $ofvalue, $efvalue, $pagesel, $newformat);
    }

    // mPDF 6 pagebreaktype
    function _preForcedPagebreak($pagebreaktype)
    {
        if ($pagebreaktype == 'cloneall') {
            // Close any open block tags
            $arr = [];
            $ai = 0;
            for ($b = $this->blklvl; $b > 0; $b--) {
                $this->tag->CloseTag($this->blk[$b]['tag'], $arr, $ai);
            }
            if ($this->blklvl == 0 && !empty($this->textbuffer)) { // Output previously buffered content
                $this->printbuffer($this->textbuffer, 1);
                $this->textbuffer = [];
            }
        } elseif ($pagebreaktype == 'clonebycss') {
            // Close open block tags whilst box-decoration-break==clone
            $arr = [];
            $ai = 0;
            for ($b = $this->blklvl; $b > 0; $b--) {
                if (isset($this->blk[$b]['box_decoration_break']) && $this->blk[$b]['box_decoration_break'] == 'clone') {
                    $this->tag->CloseTag($this->blk[$b]['tag'], $arr, $ai);
                } else {
                    if ($b == $this->blklvl && !empty($this->textbuffer)) { // Output previously buffered content
                        $this->printbuffer($this->textbuffer, 1);
                        $this->textbuffer = [];
                    }
                    break;
                }
            }
        } elseif (!empty($this->textbuffer)) { // Output previously buffered content
            $this->printbuffer($this->textbuffer, 1);
            $this->textbuffer = [];
        }
    }

    // mPDF 6 pagebreaktype
    function _postForcedPagebreak($pagebreaktype, $startpage, $save_blk, $save_blklvl)
    {
        if ($pagebreaktype == 'cloneall') {
            $this->blk = [];
            $this->blk[0] = $save_blk[0];
            // Re-open block tags
            $this->blklvl = 0;
            $arr = [];
            $i = 0;
            for ($b = 1; $b <= $save_blklvl; $b++) {
                $this->tag->OpenTag($save_blk[$b]['tag'], $save_blk[$b]['attr'], $arr, $i);
            }
        } elseif ($pagebreaktype == 'clonebycss') {
            $this->blk = [];
            $this->blk[0] = $save_blk[0];
            // Don't re-open tags for lowest level elements - so need to do some adjustments
            for ($b = 1; $b <= $this->blklvl; $b++) {
                $this->blk[$b] = $save_blk[$b];
                $this->blk[$b]['startpage'] = 0;
                $this->blk[$b]['y0'] = $this->y; // ?? $this->tMargin
                if (($this->page - $startpage) % 2) {
                    if (isset($this->blk[$b]['x0'])) {
                        $this->blk[$b]['x0'] += $this->MarginCorrection;
                    } else {
                        $this->blk[$b]['x0'] = $this->MarginCorrection;
                    }
                }
                // for Float DIV
                $this->blk[$b]['marginCorrected'][$this->page] = true;
            }

            // Re-open block tags for any that have box_decoration_break==clone
            $arr = [];
            $i = 0;
            for ($b = $this->blklvl + 1; $b <= $save_blklvl; $b++) {
                if ($b < $this->blklvl) {
                    $this->lastblocklevelchange = -1;
                }
                $this->tag->OpenTag($save_blk[$b]['tag'], $save_blk[$b]['attr'], $arr, $i);
            }
            if ($this->blk[$this->blklvl]['box_decoration_break'] != 'clone') {
                $this->lastblocklevelchange = -1;
            }
        } else {
            $this->lastblocklevelchange = -1;
        }
    }

    function AddPage(
        $orientation = '',
        $condition = '',
        $resetpagenum = '',
        $pagenumstyle = '',
        $suppress = '',
        $mgl = '',
        $mgr = '',
        $mgt = '',
        $mgb = '',
        $mgh = '',
        $mgf = '',
        $ohname = '',
        $ehname = '',
        $ofname = '',
        $efname = '',
        $ohvalue = 0,
        $ehvalue = 0,
        $ofvalue = 0,
        $efvalue = 0,
        $pagesel = '',
        $newformat = ''
    ) {
        /* -- CSS-FLOAT -- */
        // Float DIV
        // Cannot do with columns on, or if any change in page orientation/margins etc.
        // If next page already exists - i.e background /headers and footers already written
        if ($this->state > 0 && $this->page < count($this->pages)) {
            $bak_cml = $this->cMarginL;
            $bak_cmr = $this->cMarginR;
            $bak_dw = $this->divwidth;
            // Paint Div Border if necessary
            if ($this->blklvl > 0) {
                $save_tr = $this->table_rotate; // *TABLES*
                $this->table_rotate = 0; // *TABLES*
                if (isset($this->blk[$this->blklvl]['y0']) && $this->y == $this->blk[$this->blklvl]['y0']) {
                    $this->blk[$this->blklvl]['startpage'] ++;
                }
                if ((isset($this->blk[$this->blklvl]['y0']) && $this->y > $this->blk[$this->blklvl]['y0']) || $this->flowingBlockAttr['is_table']) {
                    $toplvl = $this->blklvl;
                } else {
                    $toplvl = $this->blklvl - 1;
                }
                $sy = $this->y;
                for ($bl = 1; $bl <= $toplvl; $bl++) {
                    $this->PaintDivBB('pagebottom', 0, $bl);
                }
                $this->y = $sy;
                $this->table_rotate = $save_tr; // *TABLES*
            }
            $s = $this->PrintPageBackgrounds();

            // Writes after the marker so not overwritten later by page background etc.
            $this->pages[$this->page] = preg_replace(
                '/(___BACKGROUND___PATTERNS' . $this->uniqstr . ')/',
                '\\1' . "\n" . $s . "\n",
                $this->pages[$this->page]
            );

            $this->pageBackgrounds = [];
            $family = $this->FontFamily;
            $style = $this->FontStyle;
            $size = $this->FontSizePt;
            $lw = $this->LineWidth;
            $dc = $this->DrawColor;
            $fc = $this->FillColor;
            $tc = $this->TextColor;
            $cf = $this->ColorFlag;

            $this->printfloatbuffer();

            // Move to next page
            $this->page++;

            $this->ResetMargins();
            $this->SetAutoPageBreak($this->autoPageBreak, $this->bMargin);
            $this->x = $this->lMargin;
            $this->y = $this->tMargin;
            $this->FontFamily = '';
            $this->writer->write('2 J');
            $this->LineWidth = $lw;
            $this->writer->write(sprintf('%.3F w', $lw * Mpdf::SCALE));

            if ($family) {
                $this->SetFont($family, $style, $size, true, true);
            }

            $this->DrawColor = $dc;

            if ($dc != $this->defDrawColor) {
                $this->writer->write($dc);
            }

            $this->FillColor = $fc;

            if ($fc != $this->defFillColor) {
                $this->writer->write($fc);
            }

            $this->TextColor = $tc;
            $this->ColorFlag = $cf;

            for ($bl = 1; $bl <= $this->blklvl; $bl++) {
                $this->blk[$bl]['y0'] = $this->y;
                // Don't correct more than once for background DIV containing a Float
                if (!isset($this->blk[$bl]['marginCorrected'][$this->page])) {
                    if (isset($this->blk[$bl]['x0'])) {
                        $this->blk[$bl]['x0'] += $this->MarginCorrection;
                    } else {
                        $this->blk[$bl]['x0'] = $this->MarginCorrection;
                    }
                }
                $this->blk[$bl]['marginCorrected'][$this->page] = true;
            }

            $this->cMarginL = $bak_cml;
            $this->cMarginR = $bak_cmr;
            $this->divwidth = $bak_dw;

            return '';
        }
        /* -- END CSS-FLOAT -- */

        // Start a new page
        if ($this->state == 0) {
            $this->Open();
        }

        $bak_cml = $this->cMarginL;
        $bak_cmr = $this->cMarginR;
        $bak_dw = $this->divwidth;

        $bak_lh = $this->lineheight;

        $orientation = substr(strtoupper($orientation), 0, 1);
        $condition = strtoupper($condition);


        if ($condition == 'E') { // only adds new page if needed to create an Even page
            if (!$this->mirrorMargins || ($this->page) % 2 == 0) {
                return false;
            }
        } elseif ($condition == 'O') { // only adds new page if needed to create an Odd page
            if (!$this->mirrorMargins || ($this->page) % 2 == 1) {
                return false;
            }
        } elseif ($condition == 'NEXT-EVEN') { // always adds at least one new page to create an Even page
            if (!$this->mirrorMargins) {
                $condition = '';
            } else {
                if ($pagesel) {
                    $pbch = $pagesel;
                    $pagesel = '';
                } // *CSS-PAGE*
                else {
                    $pbch = false;
                } // *CSS-PAGE*
                $this->AddPage($this->CurOrientation, 'O');
                $this->extrapagebreak = true; // mPDF 6 pagebreaktype
                if ($pbch) {
                    $pagesel = $pbch;
                } // *CSS-PAGE*
                $condition = '';
            }
        } elseif ($condition == 'NEXT-ODD') { // always adds at least one new page to create an Odd page
            if (!$this->mirrorMargins) {
                $condition = '';
            } else {
                if ($pagesel) {
                    $pbch = $pagesel;
                    $pagesel = '';
                } // *CSS-PAGE*
                else {
                    $pbch = false;
                } // *CSS-PAGE*
                $this->AddPage($this->CurOrientation, 'E');
                $this->extrapagebreak = true; // mPDF 6 pagebreaktype
                if ($pbch) {
                    $pagesel = $pbch;
                } // *CSS-PAGE*
                $condition = '';
            }
        }

        if ($resetpagenum || $pagenumstyle || $suppress) {
            $this->PageNumSubstitutions[] = ['from' => ($this->page + 1), 'reset' => $resetpagenum, 'type' => $pagenumstyle, 'suppress' => $suppress];
        }

        $save_tr = $this->table_rotate; // *TABLES*
        $this->table_rotate = 0; // *TABLES*
        $save_kwt = $this->kwt;
        $this->kwt = 0;
        $save_layer = $this->current_layer;
        $save_vis = $this->visibility;

        if ($this->visibility != 'visible') {
            $this->SetVisibility('visible');
        }

        $this->EndLayer();

        // Paint Div Border if necessary
        // PAINTS BACKGROUND COLOUR OR BORDERS for DIV - DISABLED FOR COLUMNS (cf. AcceptPageBreak) AT PRESENT in ->PaintDivBB
        if (!$this->ColActive && $this->blklvl > 0) {
            if (isset($this->blk[$this->blklvl]['y0']) && $this->y == $this->blk[$this->blklvl]['y0'] && !$this->extrapagebreak) { // mPDF 6 pagebreaktype
                if (isset($this->blk[$this->blklvl]['startpage'])) {
                    $this->blk[$this->blklvl]['startpage'] ++;
                } else {
                    $this->blk[$this->blklvl]['startpage'] = 1;
                }
            }
            if ((isset($this->blk[$this->blklvl]['y0']) && $this->y > $this->blk[$this->blklvl]['y0']) || $this->flowingBlockAttr['is_table'] || $this->extrapagebreak) {
                $toplvl = $this->blklvl;
            } // mPDF 6 pagebreaktype
            else {
                $toplvl = $this->blklvl - 1;
            }
            $sy = $this->y;
            for ($bl = 1; $bl <= $toplvl; $bl++) {
                if (isset($this->blk[$bl]['z-index']) && $this->blk[$bl]['z-index'] > 0) {
                    $this->BeginLayer($this->blk[$bl]['z-index']);
                }
                if (isset($this->blk[$bl]['visibility']) && $this->blk[$bl]['visibility'] && $this->blk[$bl]['visibility'] != 'visible') {
                    $this->SetVisibility($this->blk[$bl]['visibility']);
                }
                $this->PaintDivBB('pagebottom', 0, $bl);
            }
            $this->y = $sy;
            // RESET block y0 and x0 - see below
        }
        $this->extrapagebreak = false; // mPDF 6 pagebreaktype

        if ($this->visibility != 'visible') {
            $this->SetVisibility('visible');
        }

        $this->EndLayer();

        // BODY Backgrounds
        if ($this->page > 0) {
            $s = '';
            $s .= $this->PrintBodyBackgrounds();

            $s .= $this->PrintPageBackgrounds();
            $this->pages[$this->page] = preg_replace('/(___BACKGROUND___PATTERNS' . $this->uniqstr . ')/', "\n" . $s . "\n" . '\\1', $this->pages[$this->page]);
            $this->pageBackgrounds = [];
        }

        $save_kt = $this->keep_block_together;
        $this->keep_block_together = 0;

        $save_cols = false;

        /* -- COLUMNS -- */
        if ($this->ColActive) {
            $save_cols = true;
            $save_nbcol = $this->NbCol; // other values of gap and vAlign will not change by setting Columns off
            $this->SetColumns(0);
        }
        /* -- END COLUMNS -- */

        $family = $this->FontFamily;
        $style = $this->FontStyle;
        $size = $this->FontSizePt;
        $this->ColumnAdjust = true; // enables column height adjustment for the page
        $lw = $this->LineWidth;
        $dc = $this->DrawColor;
        $fc = $this->FillColor;
        $tc = $this->TextColor;
        $cf = $this->ColorFlag;
        if ($this->page > 0) {
            // Page footer
            $this->InFooter = true;

            $this->Reset();
            $this->pageoutput[$this->page] = [];

            $this->Footer();
            // Close page
            $this->_endpage();
        }

        // Start new page
        $this->_beginpage($orientation, $mgl, $mgr, $mgt, $mgb, $mgh, $mgf, $ohname, $ehname, $ofname, $efname, $ohvalue, $ehvalue, $ofvalue, $efvalue, $pagesel, $newformat);

        if ($this->docTemplate) {
            $currentReaderId = $this->currentReaderId;

            $pagecount = $this->setSourceFile($this->docTemplate);
            if (($this->page - $this->docTemplateStart) > $pagecount) {
                if ($this->docTemplateContinue) {
                    $tplIdx = $this->importPage($pagecount);
                    $this->useTemplate($tplIdx);
                }
            } else {
                $tplIdx = $this->importPage(($this->page - $this->docTemplateStart));
                $this->useTemplate($tplIdx);
            }

            $this->currentReaderId = $currentReaderId;
        }

        if ($this->pageTemplate) {
            $this->useTemplate($this->pageTemplate);
        }

        // Tiling Patterns
        $this->writer->write('___PAGE___START' . $this->uniqstr);
        $this->writer->write('___BACKGROUND___PATTERNS' . $this->uniqstr);
        $this->writer->write('___HEADER___MARKER' . $this->uniqstr);
        $this->pageBackgrounds = [];

        // Set line cap style to square
        $this->SetLineCap(2);
        // Set line width
        $this->LineWidth = $lw;
        $this->writer->write(sprintf('%.3F w', $lw * Mpdf::SCALE));
        // Set font
        if ($family) {
            $this->SetFont($family, $style, $size, true, true); // forces write
        }

        // Set colors
        $this->DrawColor = $dc;
        if ($dc != $this->defDrawColor) {
            $this->writer->write($dc);
        }
        $this->FillColor = $fc;
        if ($fc != $this->defFillColor) {
            $this->writer->write($fc);
        }
        $this->TextColor = $tc;
        $this->ColorFlag = $cf;

        // Page header
        $this->Header();

        // Restore line width
        if ($this->LineWidth != $lw) {
            $this->LineWidth = $lw;
            $this->writer->write(sprintf('%.3F w', $lw * Mpdf::SCALE));
        }
        // Restore font
        if ($family) {
            $this->SetFont($family, $style, $size, true, true); // forces write
        }

        // Restore colors
        if ($this->DrawColor != $dc) {
            $this->DrawColor = $dc;
            $this->writer->write($dc);
        }
        if ($this->FillColor != $fc) {
            $this->FillColor = $fc;
            $this->writer->write($fc);
        }
        $this->TextColor = $tc;
        $this->ColorFlag = $cf;
        $this->InFooter = false;

        if ($save_layer > 0) {
            $this->BeginLayer($save_layer);
        }

        if ($save_vis != 'visible') {
            $this->SetVisibility($save_vis);
        }

        /* -- COLUMNS -- */
        if ($save_cols) {
            // Restore columns
            $this->SetColumns($save_nbcol, $this->colvAlign, $this->ColGap);
        }
        if ($this->ColActive) {
            $this->SetCol(0);
        }
        /* -- END COLUMNS -- */


        // RESET BLOCK BORDER TOP
        if (!$this->ColActive) {
            for ($bl = 1; $bl <= $this->blklvl; $bl++) {
                $this->blk[$bl]['y0'] = $this->y;
                if (isset($this->blk[$bl]['x0'])) {
                    $this->blk[$bl]['x0'] += $this->MarginCorrection;
                } else {
                    $this->blk[$bl]['x0'] = $this->MarginCorrection;
                }
                // Added mPDF 3.0 Float DIV
                $this->blk[$bl]['marginCorrected'][$this->page] = true;
            }
        }


        $this->table_rotate = $save_tr; // *TABLES*
        $this->kwt = $save_kwt;

        $this->keep_block_together = $save_kt;

        $this->cMarginL = $bak_cml;
        $this->cMarginR = $bak_cmr;
        $this->divwidth = $bak_dw;

        $this->lineheight = $bak_lh;
    }

    /**
     * Get current page number
     *
     * @return int
     */
    function PageNo()
    {
        return $this->page;
    }

    function AddSpotColorsFromFile($file)
    {
        $colors = @file($file);
        if (!$colors) {
            throw new \Mpdf\MpdfException("Cannot load spot colors file - " . $file);
        }
        foreach ($colors as $sc) {
            [$name, $c, $m, $y, $k] = preg_split("/\t/", $sc);
            $c = intval($c);
            $m = intval($m);
            $y = intval($y);
            $k = intval($k);
            $this->AddSpotColor($name, $c, $m, $y, $k);
        }
    }

    function AddSpotColor($name, $c, $m, $y, $k)
    {
        $name = strtoupper(trim($name));
        if (!isset($this->spotColors[$name])) {
            $i = count($this->spotColors) + 1;
            $this->spotColors[$name] = ['i' => $i, 'c' => $c, 'm' => $m, 'y' => $y, 'k' => $k];
            $this->spotColorIDs[$i] = $name;
        }
    }

    function SetColor($col, $type = '')
    {
        $out = '';
        if (!$col) {
            return '';
        } // mPDF 6
        if ($col[0] == 3 || $col[0] == 5) { // RGB / RGBa
            $out = sprintf('%.3F %.3F %.3F rg', ord($col[1]) / 255, ord($col[2]) / 255, ord($col[3]) / 255);
        } elseif ($col[0] == 1) { // GRAYSCALE
            $out = sprintf('%.3F g', ord($col[1]) / 255);
        } elseif ($col[0] == 2) { // SPOT COLOR
            $out = sprintf('/CS%d cs %.3F scn', ord($col[1]), ord($col[2]) / 100);
        } elseif ($col[0] == 4 || $col[0] == 6) { // CMYK / CMYKa
            $out = sprintf('%.3F %.3F %.3F %.3F k', ord($col[1]) / 100, ord($col[2]) / 100, ord($col[3]) / 100, ord($col[4]) / 100);
        }
        if ($type == 'Draw') {
            $out = strtoupper($out);
        } // e.g. rg => RG
        elseif ($type == 'CodeOnly') {
            $out = preg_replace('/\s(rg|g|k)/', '', $out);
        }
        return $out;
    }

    function SetDColor($col, $return = false)
    {
        $out = $this->SetColor($col, 'Draw');
        if ($return) {
            return $out;
        }
        if ($out == '') {
            return '';
        }
        $this->DrawColor = $out;
        if ($this->page > 0 && ((isset($this->pageoutput[$this->page]['DrawColor']) && $this->pageoutput[$this->page]['DrawColor'] != $this->DrawColor) || !isset($this->pageoutput[$this->page]['DrawColor']))) {
            $this->writer->write($this->DrawColor);
        }
        $this->pageoutput[$this->page]['DrawColor'] = $this->DrawColor;
    }

    function SetFColor($col, $return = false)
    {
        $out = $this->SetColor($col, 'Fill');
        if ($return) {
            return $out;
        }
        if ($out == '') {
            return '';
        }
        $this->FillColor = $out;
        $this->ColorFlag = ($out != $this->TextColor);
        if ($this->page > 0 && ((isset($this->pageoutput[$this->page]['FillColor']) && $this->pageoutput[$this->page]['FillColor'] != $this->FillColor) || !isset($this->pageoutput[$this->page]['FillColor']))) {
            $this->writer->write($this->FillColor);
        }
        $this->pageoutput[$this->page]['FillColor'] = $this->FillColor;
    }

    function SetTColor($col, $return = false)
    {
        $out = $this->SetColor($col, 'Text');
        if ($return) {
            return $out;
        }
        if ($out == '') {
            return '';
        }
        $this->TextColor = $out;
        $this->ColorFlag = ($this->FillColor != $out);
    }

    function SetDrawColor($r, $g = -1, $b = -1, $col4 = -1, $return = false)
    {
        // Set color for all stroking operations
        $col = [];
        if (($r == 0 and $g == 0 and $b == 0 && $col4 == -1) or $g == -1) {
            $col = $this->colorConverter->convert($r, $this->PDFAXwarnings);
        } elseif ($col4 == -1) {
            $col = $this->colorConverter->convert('rgb(' . $r . ',' . $g . ',' . $b . ')', $this->PDFAXwarnings);
        } else {
            $col = $this->colorConverter->convert('cmyk(' . $r . ',' . $g . ',' . $b . ',' . $col4 . ')', $this->PDFAXwarnings);
        }
        $out = $this->SetDColor($col, $return);
        return $out;
    }

    function SetFillColor($r, $g = -1, $b = -1, $col4 = -1, $return = false)
    {
        // Set color for all filling operations
        $col = [];
        if (($r == 0 and $g == 0 and $b == 0 && $col4 == -1) or $g == -1) {
            $col = $this->colorConverter->convert($r, $this->PDFAXwarnings);
        } elseif ($col4 == -1) {
            $col = $this->colorConverter->convert('rgb(' . $r . ',' . $g . ',' . $b . ')', $this->PDFAXwarnings);
        } else {
            $col = $this->colorConverter->convert('cmyk(' . $r . ',' . $g . ',' . $b . ',' . $col4 . ')', $this->PDFAXwarnings);
        }
        $out = $this->SetFColor($col, $return);
        return $out;
    }

    function SetTextColor($r, $g = -1, $b = -1, $col4 = -1, $return = false)
    {
        // Set color for text
        $col = [];
        if (($r == 0 and $g == 0 and $b == 0 && $col4 == -1) or $g == -1) {
            $col = $this->colorConverter->convert($r, $this->PDFAXwarnings);
        } elseif ($col4 == -1) {
            $col = $this->colorConverter->convert('rgb(' . $r . ',' . $g . ',' . $b . ')', $this->PDFAXwarnings);
        } else {
            $col = $this->colorConverter->convert('cmyk(' . $r . ',' . $g . ',' . $b . ',' . $col4 . ')', $this->PDFAXwarnings);
        }
        $out = $this->SetTColor($col, $return);
        return $out;
    }

    function _getCharWidth(&$cw, $u, $isdef = true)
    {
        $w = 0;

        if ($u == 0) {
            $w = false;
        } elseif (isset($cw[$u * 2 + 1])) {
            $w = (ord($cw[$u * 2]) << 8) + ord($cw[$u * 2 + 1]);
        }

        if ($w == 65535) {
            return 0;
        } elseif ($w) {
            return $w;
        } elseif ($isdef) {
            return false;
        } else {
            return 0;
        }
    }

    function _charDefined(&$cw, $u)
    {
        $w = 0;
        if ($u == 0) {
            return false;
        }
        if (isset($cw[$u * 2 + 1])) {
            $w = (ord($cw[$u * 2]) << 8) + ord($cw[$u * 2 + 1]);
        }

        return (bool) $w;
    }

    function GetCharWidthCore($c)
    {
        // Get width of a single character in the current Core font
        $c = (string) $c;
        $w = 0;
        // Soft Hyphens chr(173)
        if ($c == chr(173) && $this->FontFamily != 'csymbol' && $this->FontFamily != 'czapfdingbats') {
            return 0;
        } elseif (($this->textvar & TextVars::FC_SMALLCAPS) && isset($this->upperCase[ord($c)])) {  // mPDF 5.7.1
            $charw = $this->CurrentFont['cw'][chr($this->upperCase[ord($c)])];
            if ($charw !== false) {
                $charw = $charw * $this->smCapsScale * $this->smCapsStretch / 100;
                $w+=$charw;
            }
        } elseif (isset($this->CurrentFont['cw'][$c])) {
            $w += $this->CurrentFont['cw'][$c];
        } elseif (isset($this->CurrentFont['cw'][ord($c)])) {
            $w += $this->CurrentFont['cw'][ord($c)];
        }
        $w *= ($this->FontSize / 1000);
        if ($this->minwSpacing || $this->fixedlSpacing) {
            if ($c == ' ') {
                $nb_spaces = 1;
            } else {
                $nb_spaces = 0;
            }
            $w += $this->fixedlSpacing + ($nb_spaces * $this->minwSpacing);
        }
        return ($w);
    }

    function GetCharWidthNonCore($c, $addSubset = true)
    {
        // Get width of a single character in the current Non-Core font
        $c = (string) $c;
        $w = 0;
        $unicode = $this->UTF8StringToArray($c, $addSubset);
        $char = $unicode[0];
        /* -- CJK-FONTS -- */
        if ($this->CurrentFont['type'] == 'Type0') { // CJK Adobe fonts
            if ($char == 173) {
                return 0;
            } // Soft Hyphens
            elseif (isset($this->CurrentFont['cw'][$char])) {
                $w+=$this->CurrentFont['cw'][$char];
            } elseif (isset($this->CurrentFont['MissingWidth'])) {
                $w += $this->CurrentFont['MissingWidth'];
            } else {
                $w += 500;
            }
        } else {
            /* -- END CJK-FONTS -- */
            if ($char == 173) {
                return 0;
            } // Soft Hyphens
            elseif (($this->textvar & TextVars::FC_SMALLCAPS) && isset($this->upperCase[$char])) { // mPDF 5.7.1
                $charw = $this->_getCharWidth($this->CurrentFont['cw'], $this->upperCase[$char]);
                if ($charw !== false) {
                    $charw = $charw * $this->smCapsScale * $this->smCapsStretch / 100;
                    $w+=$charw;
                } elseif (isset($this->CurrentFont['desc']['MissingWidth'])) {
                    $w += $this->CurrentFont['desc']['MissingWidth'];
                } elseif (isset($this->CurrentFont['MissingWidth'])) {
                    $w += $this->CurrentFont['MissingWidth'];
                } else {
                    $w += 500;
                }
            } else {
                $charw = $this->_getCharWidth($this->CurrentFont['cw'], $char);
                if ($charw !== false) {
                    $w+=$charw;
                } elseif (isset($this->CurrentFont['desc']['MissingWidth'])) {
                    $w += $this->CurrentFont['desc']['MissingWidth'];
                } elseif (isset($this->CurrentFont['MissingWidth'])) {
                    $w += $this->CurrentFont['MissingWidth'];
                } else {
                    $w += 500;
                }
            }
        } // *CJK-FONTS*
        $w *= ($this->FontSize / 1000);
        if ($this->minwSpacing || $this->fixedlSpacing) {
            if ($c == ' ') {
                $nb_spaces = 1;
            } else {
                $nb_spaces = 0;
            }
            $w += $this->fixedlSpacing + ($nb_spaces * $this->minwSpacing);
        }
        return ($w);
    }

    function GetCharWidth($c, $addSubset = true)
    {
        if (!$this->usingCoreFont) {
            return $this->GetCharWidthNonCore($c, $addSubset);
        } else {
            return $this->GetCharWidthCore($c);
        }
    }

    function GetStringWidth($s, $addSubset = true, $OTLdata = false, $textvar = 0, $includeKashida = false)
    {
        // mPDF 5.7.1
        // Get width of a string in the current font
        $s = (string) $s;
        $cw = &$this->CurrentFont['cw'];
        $w = 0;
        $kerning = 0;
        $lastchar = 0;
        $nb_carac = 0;
        $nb_spaces = 0;
        $kashida = 0;
        // mPDF ITERATION
        if ($this->iterationCounter) {
            $s = preg_replace('/{iteration ([a-zA-Z0-9_]+)}/', '\\1', $s);
        }
        if (!$this->usingCoreFont) {
            $discards = substr_count($s, "\xc2\xad"); // mPDF 6 soft hyphens [U+00AD]
            $unicode = $this->UTF8StringToArray($s, $addSubset);
            if ($this->minwSpacing || $this->fixedlSpacing) {
                $nb_spaces = mb_substr_count($s, ' ', $this->mb_enc);
                $nb_carac = count($unicode) - $discards; // mPDF 6
                // mPDF 5.7.1
                // Use GPOS OTL
                if (isset($this->CurrentFont['useOTL']) && $this->CurrentFont['useOTL']) {
                    if (isset($OTLdata['group']) && $OTLdata['group']) {
                        $nb_carac -= substr_count($OTLdata['group'], 'M');
                    }
                }
            }
            /* -- CJK-FONTS -- */
            if ($this->CurrentFont['type'] == 'Type0') { // CJK Adobe fonts
                foreach ($unicode as $char) {
                    if ($char == 0x00AD) {
                        continue;
                    } // mPDF 6 soft hyphens [U+00AD]
                    if (isset($cw[$char])) {
                        $w+=$cw[$char];
                    } elseif (isset($this->CurrentFont['MissingWidth'])) {
                        $w += $this->CurrentFont['MissingWidth'];
                    } else {
                        $w += 500;
                    }
                }
            } else {
                /* -- END CJK-FONTS -- */
                foreach ($unicode as $i => $char) {
                    if ($char == 0x00AD) {
                        continue;
                    } // mPDF 6 soft hyphens [U+00AD]
                    if (($textvar & TextVars::FC_SMALLCAPS) && isset($this->upperCase[$char])) {
                        $charw = $this->_getCharWidth($cw, $this->upperCase[$char]);
                        if ($charw !== false) {
                            $charw = $charw * $this->smCapsScale * $this->smCapsStretch / 100;
                            $w+=$charw;
                        } elseif (isset($this->CurrentFont['desc']['MissingWidth'])) {
                            $w += $this->CurrentFont['desc']['MissingWidth'];
                        } elseif (isset($this->CurrentFont['MissingWidth'])) {
                            $w += $this->CurrentFont['MissingWidth'];
                        } else {
                            $w += 500;
                        }
                    } else {
                        $charw = $this->_getCharWidth($cw, $char);
                        if ($charw !== false) {
                            $w+=$charw;
                        } elseif (isset($this->CurrentFont['desc']['MissingWidth'])) {
                            $w += $this->CurrentFont['desc']['MissingWidth'];
                        } elseif (isset($this->CurrentFont['MissingWidth'])) {
                            $w += $this->CurrentFont['MissingWidth'];
                        } else {
                            $w += 500;
                        }
                        // mPDF 5.7.1
                        // Use GPOS OTL
                        // ...GetStringWidth...
                        if (isset($this->CurrentFont['useOTL']) && ($this->CurrentFont['useOTL'] & 0xFF) && !empty($OTLdata)) {
                            if (isset($OTLdata['GPOSinfo'][$i]['wDir']) && $OTLdata['GPOSinfo'][$i]['wDir'] == 'RTL') {
                                if (isset($OTLdata['GPOSinfo'][$i]['XAdvanceR']) && $OTLdata['GPOSinfo'][$i]['XAdvanceR']) {
                                    $w += $OTLdata['GPOSinfo'][$i]['XAdvanceR'] * 1000 / $this->CurrentFont['unitsPerEm'];
                                }
                            } else {
                                if (isset($OTLdata['GPOSinfo'][$i]['XAdvanceL']) && $OTLdata['GPOSinfo'][$i]['XAdvanceL']) {
                                    $w += $OTLdata['GPOSinfo'][$i]['XAdvanceL'] * 1000 / $this->CurrentFont['unitsPerEm'];
                                }
                            }
                            // Kashida from GPOS
                            // Kashida is set as an absolute length value (already set as a proportion based on useKashida %)
                            if ($includeKashida && isset($OTLdata['GPOSinfo'][$i]['kashida_space']) && $OTLdata['GPOSinfo'][$i]['kashida_space']) {
                                $kashida += $OTLdata['GPOSinfo'][$i]['kashida_space'];
                            }
                        }
                        if (($textvar & TextVars::FC_KERNING) && $lastchar) {
                            if (isset($this->CurrentFont['kerninfo'][$lastchar][$char])) {
                                $kerning += $this->CurrentFont['kerninfo'][$lastchar][$char];
                            }
                        }
                        $lastchar = $char;
                    }
                }
            } // *CJK-FONTS*
        } else {
            if ($this->FontFamily != 'csymbol' && $this->FontFamily != 'czapfdingbats') {
                $s = str_replace(chr(173), '', $s);
            }
            $nb_carac = $l = strlen($s);
            if ($this->minwSpacing || $this->fixedlSpacing) {
                $nb_spaces = substr_count($s, ' ');
            }
            for ($i = 0; $i < $l; $i++) {
                if (($textvar & TextVars::FC_SMALLCAPS) && isset($this->upperCase[ord($s[$i])])) {  // mPDF 5.7.1
                    $charw = $cw[chr($this->upperCase[ord($s[$i])])];
                    if ($charw !== false) {
                        $charw = $charw * $this->smCapsScale * $this->smCapsStretch / 100;
                        $w+=$charw;
                    }
                } elseif (isset($cw[$s[$i]])) {
                    $w += $cw[$s[$i]];
                } elseif (isset($cw[ord($s[$i])])) {
                    $w += $cw[ord($s[$i])];
                }
                if (($textvar & TextVars::FC_KERNING) && $i > 0) { // mPDF 5.7.1
                    if (isset($this->CurrentFont['kerninfo'][$s[($i - 1)]][$s[$i]])) {
                        $kerning += $this->CurrentFont['kerninfo'][$s[($i - 1)]][$s[$i]];
                    }
                }
            }
        }
        unset($cw);
        if ($textvar & TextVars::FC_KERNING) {
            $w += $kerning;
        } // mPDF 5.7.1
        $w *= ($this->FontSize / 1000);
        $w += (($nb_carac + $nb_spaces) * $this->fixedlSpacing) + ($nb_spaces * $this->minwSpacing);
        $w += $kashida / Mpdf::SCALE;

        return ($w);
    }

    function SetLineWidth($width)
    {
        // Set line width
        $this->LineWidth = $width;
        $lwout = (sprintf('%.3F w', $width * Mpdf::SCALE));
        if ($this->page > 0 && ((isset($this->pageoutput[$this->page]['LineWidth']) && $this->pageoutput[$this->page]['LineWidth'] != $lwout) || !isset($this->pageoutput[$this->page]['LineWidth']))) {
            $this->writer->write($lwout);
        }
        $this->pageoutput[$this->page]['LineWidth'] = $lwout;
    }

    function Line($x1, $y1, $x2, $y2)
    {
        // Draw a line
        $this->writer->write(sprintf('%.3F %.3F m %.3F %.3F l S', $x1 * Mpdf::SCALE, ($this->h - $y1) * Mpdf::SCALE, $x2 * Mpdf::SCALE, ($this->h - $y2) * Mpdf::SCALE));
    }

    function Arrow($x1, $y1, $x2, $y2, $headsize = 3, $fill = 'B', $angle = 25)
    {
        // F == fill // S == stroke // B == stroke and fill
        // angle = splay of arrowhead - 1 - 89 degrees
        if ($fill == 'F') {
            $fill = 'f';
        } elseif ($fill == 'FD' or $fill == 'DF' or $fill == 'B') {
            $fill = 'B';
        } else {
            $fill = 'S';
        }
        $a = atan2(($y2 - $y1), ($x2 - $x1));
        $b = $a + deg2rad($angle);
        $c = $a - deg2rad($angle);
        $x3 = $x2 - ($headsize * cos($b));
        $y3 = $this->h - ($y2 - ($headsize * sin($b)));
        $x4 = $x2 - ($headsize * cos($c));
        $y4 = $this->h - ($y2 - ($headsize * sin($c)));

        $x5 = $x3 - ($x3 - $x4) / 2; // mid point of base of arrowhead - to join arrow line to
        $y5 = $y3 - ($y3 - $y4) / 2;

        $s = '';
        $s .= sprintf('%.3F %.3F m %.3F %.3F l S', $x1 * Mpdf::SCALE, ($this->h - $y1) * Mpdf::SCALE, $x5 * Mpdf::SCALE, $y5 * Mpdf::SCALE);
        $this->writer->write($s);

        $s = '';
        $s .= sprintf('%.3F %.3F m %.3F %.3F l %.3F %.3F l %.3F %.3F l %.3F %.3F l ', $x5 * Mpdf::SCALE, $y5 * Mpdf::SCALE, $x3 * Mpdf::SCALE, $y3 * Mpdf::SCALE, $x2 * Mpdf::SCALE, ($this->h - $y2) * Mpdf::SCALE, $x4 * Mpdf::SCALE, $y4 * Mpdf::SCALE, $x5 * Mpdf::SCALE, $y5 * Mpdf::SCALE);
        $s .= $fill;
        $this->writer->write($s);
    }

    function Rect($x, $y, $w, $h, $style = '')
    {
        // Draw a rectangle
        if ($style == 'F') {
            $op = 'f';
        } elseif ($style == 'FD' or $style == 'DF') {
            $op = 'B';
        } else {
            $op = 'S';
        }
        $this->writer->write(sprintf('%.3F %.3F %.3F %.3F re %s', $x * Mpdf::SCALE, ($this->h - $y) * Mpdf::SCALE, $w * Mpdf::SCALE, -$h * Mpdf::SCALE, $op));
    }

    function AddFontDirectory($directory)
    {
        $this->fontDir[] = $directory;
        $this->fontFileFinder->setDirectories($this->fontDir);
    }

    function AddFont($family, $style = '')
    {
        if (empty($family)) {
            return;
        }

        $family = strtolower($family);
        $style = strtoupper($style);
        $style = str_replace('U', '', $style);

        if ($style == 'IB') {
            $style = 'BI';
        }

        $fontkey = $family . $style;

        // check if the font has been already added
        if (isset($this->fonts[$fontkey])) {
            return;
        }

        /* -- CJK-FONTS -- */
        if (in_array($family, $this->available_CJK_fonts)) {
            if (empty($this->Big5_widths)) {
                require __DIR__ . '/../data/CJKdata.php';
            }
            $this->AddCJKFont($family); // don't need to add style
            return;
        }
        /* -- END CJK-FONTS -- */

        if ($this->usingCoreFont) {
            throw new \Mpdf\MpdfException("mPDF Error - problem with Font management");
        }

        $stylekey = $style;
        if (!$style) {
            $stylekey = 'R';
        }

        if (!isset($this->fontdata[$family][$stylekey]) || !$this->fontdata[$family][$stylekey]) {
            throw new \Mpdf\MpdfException(sprintf('Font "%s%s%s" is not supported', $family, $style ? ' - ' : '', $style));
        }

        /* Setup defaults */
        $font = [
            'name' => '',
            'type' => '',
            'desc' => '',
            'panose' => '',
            'unitsPerEm' => '',
            'up' => '',
            'ut' => '',
            'strs' => '',
            'strp' => '',
            'sip' => false,
            'smp' => false,
            'useOTL' => 0,
            'fontmetrics' => '',
            'haskerninfo' => false,
            'haskernGPOS' => false,
            'hassmallcapsGSUB' => false,
            'BMPselected' => false,
            'GSUBScriptLang' => [],
            'GSUBFeatures' => [],
            'GSUBLookups' => [],
            'GPOSScriptLang' => [],
            'GPOSFeatures' => [],
            'GPOSLookups' => [],
            'rtlPUAstr' => '',
        ];

        $fontCacheFilename = $fontkey . '.mtx.json';
        if ($this->fontCache->jsonHas($fontCacheFilename)) {
            $font = $this->fontCache->jsonLoad($fontCacheFilename);
        }

        $ttffile = $this->fontFileFinder->findFontFile($this->fontdata[$family][$stylekey]);
        $ttfstat = stat($ttffile);

        $TTCfontID = isset($this->fontdata[$family]['TTCfontID'][$stylekey]) ? isset($this->fontdata[$family]['TTCfontID'][$stylekey]) : 0;
        $fontUseOTL = isset($this->fontdata[$family]['useOTL']) ? $this->fontdata[$family]['useOTL'] : false;
        $BMPonly = in_array($family, $this->BMPonly) ? true : false;

        $regenerate = false;
        if ($BMPonly && !$font['BMPselected']) {
            $regenerate = true;
        } elseif (!$BMPonly && $font['BMPselected']) {
            $regenerate = true;
        }

        if ($fontUseOTL && $font['useOTL'] != $fontUseOTL) {
            $regenerate = true;
            $font['useOTL'] = $fontUseOTL;
        } elseif (!$fontUseOTL && $font['useOTL']) {
            $regenerate = true;
            $font['useOTL'] = 0;
        }

        if ($this->fontDescriptor != $font['fontmetrics']) {
            $regenerate = true;
        } // mPDF 6

        if (empty($font['name']) || $font['originalsize'] != $ttfstat['size'] || $regenerate) {
            $generator = new MetricsGenerator($this->fontCache, $this->fontDescriptor);

            $generator->generateMetrics(
                $ttffile,
                $ttfstat,
                $fontkey,
                $TTCfontID,
                $this->debugfonts,
                $BMPonly,
                $font['useOTL'],
                $fontUseOTL
            );

            $font = $this->fontCache->jsonLoad($fontCacheFilename);
            $cw = $this->fontCache->load($fontkey . '.cw.dat');
            $glyphIDtoUni = $this->fontCache->load($fontkey . '.gid.dat');
        } else {
            if ($this->fontCache->has($fontkey . '.cw.dat')) {
                $cw = $this->fontCache->load($fontkey . '.cw.dat');
            }

            if ($this->fontCache->has($fontkey . '.gid.dat')) {
                $glyphIDtoUni = $this->fontCache->load($fontkey . '.gid.dat');
            }
        }

        if (isset($this->fontdata[$family]['sip-ext']) && $this->fontdata[$family]['sip-ext']) {
            $sipext = $this->fontdata[$family]['sip-ext'];
        } else {
            $sipext = '';
        }

        // Override with values from config_font.php
        if (isset($this->fontdata[$family]['Ascent']) && $this->fontdata[$family]['Ascent']) {
            $desc['Ascent'] = $this->fontdata[$family]['Ascent'];
        }
        if (isset($this->fontdata[$family]['Descent']) && $this->fontdata[$family]['Descent']) {
            $desc['Descent'] = $this->fontdata[$family]['Descent'];
        }
        if (isset($this->fontdata[$family]['Leading']) && $this->fontdata[$family]['Leading']) {
            $desc['Leading'] = $this->fontdata[$family]['Leading'];
        }

        $i = count($this->fonts) + $this->extraFontSubsets + 1;

        $this->fonts[$fontkey] = [
            'i' => $i,
            'name' => $font['name'],
            'type' => $font['type'],
            'desc' => $font['desc'],
            'panose' => $font['panose'],
            'unitsPerEm' => $font['unitsPerEm'],
            'up' => $font['up'],
            'ut' => $font['ut'],
            'strs' => $font['strs'],
            'strp' => $font['strp'],
            'cw' => $cw,
            'ttffile' => $ttffile,
            'fontkey' => $fontkey,
            'used' => false,
            'sip' => $font['sip'],
            'sipext' => $sipext,
            'smp' => $font['smp'],
            'TTCfontID' => $TTCfontID,
            'useOTL' => $fontUseOTL,
            'useKashida' => (isset($this->fontdata[$family]['useKashida']) ? $this->fontdata[$family]['useKashida'] : false),
            'GSUBScriptLang' => $font['GSUBScriptLang'],
            'GSUBFeatures' => $font['GSUBFeatures'],
            'GSUBLookups' => $font['GSUBLookups'],
            'GPOSScriptLang' => $font['GPOSScriptLang'],
            'GPOSFeatures' => $font['GPOSFeatures'],
            'GPOSLookups' => $font['GPOSLookups'],
            'rtlPUAstr' => $font['rtlPUAstr'],
            'glyphIDtoUni' => $glyphIDtoUni,
            'haskerninfo' => $font['haskerninfo'],
            'haskernGPOS' => $font['haskernGPOS'],
            'hassmallcapsGSUB' => $font['hassmallcapsGSUB'],
        ];


        if (!$font['sip'] && !$font['smp']) {
            $subsetRange = range(32, 127);
            $this->fonts[$fontkey]['subset'] = array_combine($subsetRange, $subsetRange);
        } else {
            $this->fonts[$fontkey]['subsets'] = [0 => range(0, 127)];
            $this->fonts[$fontkey]['subsetfontids'] = [$i];
        }

        if ($font['haskerninfo']) {
            $this->fonts[$fontkey]['kerninfo'] = $font['kerninfo'];
        }

        $this->FontFiles[$fontkey] = [
            'length1' => $font['originalsize'],
            'type' => 'TTF',
            'ttffile' => $ttffile,
            'sip' => $font['sip'],
            'smp' => $font['smp'],
        ];

        unset($cw);
    }

    function SetFont($family, $style = '', $size = 0, $write = true, $forcewrite = false)
    {
        $family = strtolower($family);

        if (!$this->onlyCoreFonts) {
            if ($family == 'sans' || $family == 'sans-serif') {
                $family = $this->sans_fonts[0];
            }
            if ($family == 'serif') {
                $family = $this->serif_fonts[0];
            }
            if ($family == 'mono' || $family == 'monospace') {
                $family = $this->mono_fonts[0];
            }
        }

        if (isset($this->fonttrans[$family]) && $this->fonttrans[$family]) {
            $family = $this->fonttrans[$family];
        }

        if ($family == '') {
            if ($this->FontFamily) {
                $family = $this->FontFamily;
            } elseif ($this->default_font) {
                $family = $this->default_font;
            } else {
                throw new \Mpdf\MpdfException("No font or default font set!");
            }
        }

        $this->ReqFontStyle = $style; // required or requested style - used later for artificial bold/italic

        if (($family == 'csymbol') || ($family == 'czapfdingbats') || ($family == 'ctimes') || ($family == 'ccourier') || ($family == 'chelvetica')) {
            if ($this->PDFA || $this->PDFX) {
                if ($family == 'csymbol' || $family == 'czapfdingbats') {
                    throw new \Mpdf\MpdfException("Symbol and Zapfdingbats cannot be embedded in mPDF (required for PDFA1-b or PDFX/1-a).");
                }
                if ($family == 'ctimes' || $family == 'ccourier' || $family == 'chelvetica') {
                    if (($this->PDFA && !$this->PDFAauto) || ($this->PDFX && !$this->PDFXauto)) {
                        $this->PDFAXwarnings[] = "Core Adobe font " . ucfirst($family) . " cannot be embedded in mPDF, which is required for PDFA1-b or PDFX/1-a. (Embedded font will be substituted.)";
                    }
                    if ($family == 'chelvetica') {
                        $family = 'sans';
                    }
                    if ($family == 'ctimes') {
                        $family = 'serif';
                    }
                    if ($family == 'ccourier') {
                        $family = 'mono';
                    }
                }
                $this->usingCoreFont = false;
            } else {
                $this->usingCoreFont = true;
            }
            if ($family == 'csymbol' || $family == 'czapfdingbats') {
                $style = '';
            }
        } else {
            $this->usingCoreFont = false;
        }

        // mPDF 5.7.1
        if ($style) {
            $style = strtoupper($style);
            if ($style == 'IB') {
                $style = 'BI';
            }
        }
        if ($size == 0) {
            $size = $this->FontSizePt;
        }

        $fontkey = $family . $style;

        $stylekey = $style;
        if (!$stylekey) {
            $stylekey = "R";
        }

        if (!$this->onlyCoreFonts && !$this->usingCoreFont) {
            if (!isset($this->fonts[$fontkey]) || count($this->default_available_fonts) != count($this->available_unifonts)) { // not already added

                /* -- CJK-FONTS -- */
                if (in_array($fontkey, $this->available_CJK_fonts)) {
                    if (!isset($this->fonts[$fontkey])) { // already added
                        if (empty($this->Big5_widths)) {
                            require __DIR__ . '/../data/CJKdata.php';
                        }
                        $this->AddCJKFont($family); // don't need to add style
                    }
                } else { // Test to see if requested font/style is available - or substitute /* -- END CJK-FONTS -- */
                    if (!in_array($fontkey, $this->available_unifonts)) {
                        // If font[nostyle] exists - set it
                        if (in_array($family, $this->available_unifonts)) {
                            $style = '';
                        } // elseif only one font available - set it (assumes if only one font available it will not have a style)
                        elseif (count($this->available_unifonts) == 1) {
                            $family = $this->available_unifonts[0];
                            $style = '';
                        } else {
                            $found = 0;
                            // else substitute font of similar type
                            if (in_array($family, $this->sans_fonts)) {
                                $i = array_intersect($this->sans_fonts, $this->available_unifonts);
                                if (count($i)) {
                                    $i = array_values($i);
                                    // with requested style if possible
                                    if (!in_array(($i[0] . $style), $this->available_unifonts)) {
                                        $style = '';
                                    }
                                    $family = $i[0];
                                    $found = 1;
                                }
                            } elseif (in_array($family, $this->serif_fonts)) {
                                $i = array_intersect($this->serif_fonts, $this->available_unifonts);
                                if (count($i)) {
                                    $i = array_values($i);
                                    // with requested style if possible
                                    if (!in_array(($i[0] . $style), $this->available_unifonts)) {
                                        $style = '';
                                    }
                                    $family = $i[0];
                                    $found = 1;
                                }
                            } elseif (in_array($family, $this->mono_fonts)) {
                                $i = array_intersect($this->mono_fonts, $this->available_unifonts);
                                if (count($i)) {
                                    $i = array_values($i);
                                    // with requested style if possible
                                    if (!in_array(($i[0] . $style), $this->available_unifonts)) {
                                        $style = '';
                                    }
                                    $family = $i[0];
                                    $found = 1;
                                }
                            }

                            if (!$found) {
                                // set first available font
                                $fs = $this->available_unifonts[0];
                                preg_match('/^([a-z_0-9\-]+)([BI]{0,2})$/', $fs, $fas); // Allow "-"
                                // with requested style if possible
                                $ws = $fas[1] . $style;
                                if (in_array($ws, $this->available_unifonts)) {
                                    $family = $fas[1]; // leave $style as is
                                } elseif (in_array($fas[1], $this->available_unifonts)) {
                                    // or without style
                                    $family = $fas[1];
                                    $style = '';
                                } else {
                                    // or with the style specified
                                    $family = $fas[1];
                                    $style = $fas[2];
                                }
                            }
                        }
                        $fontkey = $family . $style;
                    }
                }
            }

            // try to add font (if not already added)
            $this->AddFont($family, $style);

            // Test if font is already selected
            if ($this->FontFamily == $family && $this->FontFamily == $this->currentfontfamily && $this->FontStyle == $style && $this->FontStyle == $this->currentfontstyle && $this->FontSizePt == $size && $this->FontSizePt == $this->currentfontsize && !$forcewrite) {
                return $family;
            }

            $fontkey = $family . $style;

            // Select it
            $this->FontFamily = $family;
            $this->FontStyle = $style;
            $this->FontSizePt = $size;
            $this->FontSize = $size / Mpdf::SCALE;
            $this->CurrentFont = &$this->fonts[$fontkey];
            if ($write) {
                $fontout = (sprintf('BT /F%d %.3F Tf ET', $this->CurrentFont['i'], $this->FontSizePt));
                if ($this->page > 0 && ((isset($this->pageoutput[$this->page]['Font']) && $this->pageoutput[$this->page]['Font'] != $fontout) || !isset($this->pageoutput[$this->page]['Font']))) {
                    $this->writer->write($fontout);
                }
                $this->pageoutput[$this->page]['Font'] = $fontout;
            }

            // Added - currentfont (lowercase) used in HTML2PDF
            $this->currentfontfamily = $family;
            $this->currentfontsize = $size;
            $this->currentfontstyle = $style;
            $this->setMBencoding('UTF-8');
        } else {  // if using core fonts
            if ($this->PDFA || $this->PDFX) {
                throw new \Mpdf\MpdfException('Core Adobe fonts cannot be embedded in mPDF (required for PDFA1-b or PDFX/1-a) - cannot use option to use core fonts.');
            }
            $this->setMBencoding('windows-1252');

            // Test if font is already selected
            if (($this->FontFamily == $family) and ( $this->FontStyle == $style) and ( $this->FontSizePt == $size) && !$forcewrite) {
                return $family;
            }

            if (!isset($this->CoreFonts[$fontkey])) {
                if (in_array($family, $this->serif_fonts)) {
                    $family = 'ctimes';
                } elseif (in_array($family, $this->mono_fonts)) {
                    $family = 'ccourier';
                } else {
                    $family = 'chelvetica';
                }
                $this->usingCoreFont = true;
                $fontkey = $family . $style;
            }

            if (!isset($this->fonts[$fontkey])) {
                // STANDARD CORE FONTS
                if (isset($this->CoreFonts[$fontkey])) {
                    // Load metric file
                    $file = $family;
                    if ($family == 'ctimes' || $family == 'chelvetica' || $family == 'ccourier') {
                        $file .= strtolower($style);
                    }
                    require __DIR__ . '/../data/font/' . $file . '.php';
                    if (!isset($cw)) {
                        throw new \Mpdf\MpdfException(sprintf('Could not include font metric file "%s"', $file));
                    }
                    $i = count($this->fonts) + $this->extraFontSubsets + 1;
                    $this->fonts[$fontkey] = ['i' => $i, 'type' => 'core', 'name' => $this->CoreFonts[$fontkey], 'desc' => $desc, 'up' => $up, 'ut' => $ut, 'cw' => $cw];
                    if ($this->useKerning && isset($kerninfo)) {
                        $this->fonts[$fontkey]['kerninfo'] = $kerninfo;
                    }
                } else {
                    throw new \Mpdf\MpdfException(sprintf('Font %s not defined', $fontkey));
                }
            }

            // Test if font is already selected
            if (($this->FontFamily == $family) and ( $this->FontStyle == $style) and ( $this->FontSizePt == $size) && !$forcewrite) {
                return $family;
            }
            // Select it
            $this->FontFamily = $family;
            $this->FontStyle = $style;
            $this->FontSizePt = $size;
            $this->FontSize = $size / Mpdf::SCALE;
            $this->CurrentFont = &$this->fonts[$fontkey];
            if ($write) {
                $fontout = (sprintf('BT /F%d %.3F Tf ET', $this->CurrentFont['i'], $this->FontSizePt));
                if ($this->page > 0 && ((isset($this->pageoutput[$this->page]['Font']) && $this->pageoutput[$this->page]['Font'] != $fontout) || !isset($this->pageoutput[$this->page]['Font']))) {
                    $this->writer->write($fontout);
                }
                $this->pageoutput[$this->page]['Font'] = $fontout;
            }
            // Added - currentfont (lowercase) used in HTML2PDF
            $this->currentfontfamily = $family;
            $this->currentfontsize = $size;
            $this->currentfontstyle = $style;
        }

        return $family;
    }

    function SetFontSize($size, $write = true)
    {
        // Set font size in points
        if ($this->FontSizePt == $size) {
            return;
        }
        $this->FontSizePt = $size;
        $this->FontSize = $size / Mpdf::SCALE;
        $this->currentfontsize = $size;
        if ($write) {
            $fontout = (sprintf('BT /F%d %.3F Tf ET', $this->CurrentFont['i'], $this->FontSizePt));
            // Edited mPDF 3.0
            if ($this->page > 0 && ((isset($this->pageoutput[$this->page]['Font']) && $this->pageoutput[$this->page]['Font'] != $fontout) || !isset($this->pageoutput[$this->page]['Font']))) {
                $this->writer->write($fontout);
            }
            $this->pageoutput[$this->page]['Font'] = $fontout;
        }
    }

    function AddLink()
    {
        // Create a new internal link
        $n = count($this->links) + 1;
        $this->links[$n] = [0, 0];
        return $n;
    }

    function SetLink($link, $y = 0, $page = -1)
    {
        // Set destination of internal link
        if ($y == -1) {
            $y = $this->y;
        }
        if ($page == -1) {
            $page = $this->page;
        }
        $this->links[$link] = [$page, $y];
    }

    function Link($x, $y, $w, $h, $link)
    {
        $l = [$x * Mpdf::SCALE, $this->hPt - $y * Mpdf::SCALE, $w * Mpdf::SCALE, $h * Mpdf::SCALE, $link];
        if ($this->keep_block_together) { // don't write yet
            return;
        } elseif ($this->table_rotate) { // *TABLES*
            $this->tbrot_Links[$this->page][] = $l; // *TABLES*
            return; // *TABLES*
        } // *TABLES*
        elseif ($this->kwt) {
            $this->kwt_Links[$this->page][] = $l;
            return;
        }

        if ($this->writingHTMLheader || $this->writingHTMLfooter) {
            $this->HTMLheaderPageLinks[] = $l;
            return;
        }
        // Put a link on the page
        $this->PageLinks[$this->page][] = $l;
        // Save cross-reference to Column buffer
        $ref = count($this->PageLinks[$this->page]) - 1; // *COLUMNS*
        $this->columnLinks[$this->CurrCol][(int) $this->x][(int) $this->y] = $ref; // *COLUMNS*
    }

    function Text($x, $y, $txt, $OTLdata = [], $textvar = 0, $aixextra = '', $coordsys = '', $return = false)
    {
        // Output (or return) a string
        // Called (internally) by Watermark() & _tableWrite() [rotated cells] & TableHeaderFooter() & WriteText()
        // Called also from classes/svg.php
        // Expects Font to be set
        // Expects input to be mb_encoded if necessary and RTL reversed & OTL processed
        // ARTIFICIAL BOLD AND ITALIC
        $s = 'q ';
        if ($this->falseBoldWeight && strpos($this->ReqFontStyle, "B") !== false && strpos($this->FontStyle, "B") === false) {
            $s .= '2 Tr 1 J 1 j ';
            $s .= sprintf('%.3F w ', ($this->FontSize / 130) * Mpdf::SCALE * $this->falseBoldWeight);
            $tc = strtoupper($this->TextColor); // change 0 0 0 rg to 0 0 0 RG
            if ($this->FillColor != $tc) {
                $s .= $tc . ' ';
            }  // stroke (outline) = same colour as text(fill)
        }
        if (strpos($this->ReqFontStyle, "I") !== false && strpos($this->FontStyle, "I") === false) {
            $aix = '1 0 0.261799 1 %.3F %.3F Tm';
        } else {
            $aix = '%.3F %.3F Td';
        }

        $aix = $aixextra . $aix;

        if ($this->ColorFlag) {
            $s .= $this->TextColor . ' ';
        }

        $this->CurrentFont['used'] = true;

        if ($this->usingCoreFont) {
            $txt2 = str_replace(chr(160), chr(32), $txt);
        } else {
            $txt2 = str_replace(chr(194) . chr(160), chr(32), $txt);
        }

        $px = $x;
        $py = $y;
        if ($coordsys != 'SVG') {
            $px = $x * Mpdf::SCALE;
            $py = ($this->h - $y) * Mpdf::SCALE;
        }


        /** ************** SIMILAR TO Cell() ************************ */

        // IF corefonts AND NOT SmCaps AND NOT Kerning
        // Just output text
        if ($this->usingCoreFont && !($textvar & TextVars::FC_SMALLCAPS) && !($textvar & TextVars::FC_KERNING)) {
            $txt2 = $this->writer->escape($txt2);
            $s .= sprintf('BT ' . $aix . ' (%s) Tj ET', $px, $py, $txt2);
        } // IF NOT corefonts [AND NO wordspacing] AND NOT SIP/SMP AND NOT SmCaps AND NOT Kerning AND NOT OTL
        // Just output text
        elseif (!$this->usingCoreFont && !($textvar & TextVars::FC_SMALLCAPS) && !($textvar & TextVars::FC_KERNING) && !(isset($this->CurrentFont['useOTL']) && ($this->CurrentFont['useOTL'] & 0xFF) && !empty($OTLdata['GPOSinfo']))) {
            // IF SIP/SMP
            if ($this->CurrentFont['sip'] || $this->CurrentFont['smp']) {
                $txt2 = $this->UTF8toSubset($txt2);
                $s .=sprintf('BT ' . $aix . ' %s Tj ET', $px, $py, $txt2);
            } // NOT SIP/SMP
            else {
                $txt2 = $this->writer->utf8ToUtf16BigEndian($txt2, false);
                $txt2 = $this->writer->escape($txt2);
                $s .=sprintf('BT ' . $aix . ' (%s) Tj ET', $px, $py, $txt2);
            }
        } // IF NOT corefonts [AND IS wordspacing] AND NOT SIP AND NOT SmCaps AND NOT Kerning AND NOT OTL
        // Not required here (cf. Cell() )
        // ELSE (IF SmCaps || Kerning || OTL) [corefonts or not corefonts; SIP or SMP or BMP]
        else {
            $s .= $this->applyGPOSpdf($txt2, $aix, $px, $py, $OTLdata, $textvar);
        }
        /*         * ************** END ************************ */

        $s .= ' ';

        if (($textvar & TextVars::FD_UNDERLINE) && $txt != '') { // mPDF 5.7.1
            $c = strtoupper($this->TextColor); // change 0 0 0 rg to 0 0 0 RG
            if ($this->FillColor != $c) {
                $s.= ' ' . $c . ' ';
            }
            if (isset($this->CurrentFont['up']) && $this->CurrentFont['up']) {
                $up = $this->CurrentFont['up'];
            } else {
                $up = -100;
            }
            $adjusty = (-$up / 1000 * $this->FontSize);
            if (isset($this->CurrentFont['ut']) && $this->CurrentFont['ut']) {
                $ut = $this->CurrentFont['ut'] / 1000 * $this->FontSize;
            } else {
                $ut = 60 / 1000 * $this->FontSize;
            }
            $olw = $this->LineWidth;
            $s .= ' ' . (sprintf(' %.3F w', $ut * Mpdf::SCALE));
            $s .= ' ' . $this->_dounderline($x, $y + $adjusty, $txt, $OTLdata, $textvar);
            $s .= ' ' . (sprintf(' %.3F w', $olw * Mpdf::SCALE));
            if ($this->FillColor != $c) {
                $s.= ' ' . $this->FillColor . ' ';
            }
        }
        // STRIKETHROUGH
        if (($textvar & TextVars::FD_LINETHROUGH) && $txt != '') { // mPDF 5.7.1
            $c = strtoupper($this->TextColor); // change 0 0 0 rg to 0 0 0 RG
            if ($this->FillColor != $c) {
                $s.= ' ' . $c . ' ';
            }
            // Superscript and Subscript Y coordinate adjustment (now for striked-through texts)
            if (isset($this->CurrentFont['desc']['CapHeight']) && $this->CurrentFont['desc']['CapHeight']) {
                $ch = $this->CurrentFont['desc']['CapHeight'];
            } else {
                $ch = 700;
            }
            $adjusty = (-$ch / 1000 * $this->FontSize) * 0.35;
            if (isset($this->CurrentFont['ut']) && $this->CurrentFont['ut']) {
                $ut = $this->CurrentFont['ut'] / 1000 * $this->FontSize;
            } else {
                $ut = 60 / 1000 * $this->FontSize;
            }
            $olw = $this->LineWidth;
            $s .= ' ' . (sprintf(' %.3F w', $ut * Mpdf::SCALE));
            $s .= ' ' . $this->_dounderline($x, $y + $adjusty, $txt, $OTLdata, $textvar);
            $s .= ' ' . (sprintf(' %.3F w', $olw * Mpdf::SCALE));
            if ($this->FillColor != $c) {
                $s.= ' ' . $this->FillColor . ' ';
            }
        }
        $s .= 'Q';

        if ($return) {
            return $s . " \n";
        }
        $this->writer->write($s);
    }

    /* -- DIRECTW -- */

    function WriteText($x, $y, $txt)
    {
        // Output a string using Text() but does encoding and text reversing of RTL
        $txt = $this->purify_utf8_text($txt);
        if ($this->text_input_as_HTML) {
            $txt = $this->all_entities_to_utf8($txt);
        }
        if ($this->usingCoreFont) {
            $txt = mb_convert_encoding($txt, $this->mb_enc, 'UTF-8');
        }

        // DIRECTIONALITY
        if (preg_match("/([" . $this->pregRTLchars . "])/u", $txt)) {
            $this->biDirectional = true;
        } // *OTL*

        $textvar = 0;
        $save_OTLtags = $this->OTLtags;
        $this->OTLtags = [];
        if ($this->useKerning) {
            if ($this->CurrentFont['haskernGPOS']) {
                $this->OTLtags['Plus'] .= ' kern';
            } else {
                $textvar = ($textvar | TextVars::FC_KERNING);
            }
        }

        /* -- OTL -- */
        // Use OTL OpenType Table Layout - GSUB & GPOS
        if (isset($this->CurrentFont['useOTL']) && $this->CurrentFont['useOTL']) {
            $txt = $this->otl->applyOTL($txt, $this->CurrentFont['useOTL']);
            $OTLdata = $this->otl->OTLdata;
        }
        /* -- END OTL -- */
        $this->OTLtags = $save_OTLtags;

        $this->magic_reverse_dir($txt, $this->directionality, $OTLdata);

        $this->Text($x, $y, $txt, $OTLdata, $textvar);
    }

    function WriteCell($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = 0, $link = '', $currentx = 0)
    {
        // Output a cell using Cell() but does encoding and text reversing of RTL
        $txt = $this->purify_utf8_text($txt);
        if ($this->text_input_as_HTML) {
            $txt = $this->all_entities_to_utf8($txt);
        }
        if ($this->usingCoreFont) {
            $txt = mb_convert_encoding($txt, $this->mb_enc, 'UTF-8');
        }
        // DIRECTIONALITY
        if (preg_match("/([" . $this->pregRTLchars . "])/u", $txt)) {
            $this->biDirectional = true;
        } // *OTL*

        $textvar = 0;
        $save_OTLtags = $this->OTLtags;
        $this->OTLtags = [];
        if ($this->useKerning) {
            if ($this->CurrentFont['haskernGPOS']) {
                $this->OTLtags['Plus'] .= ' kern';
            } else {
                $textvar = ($textvar | TextVars::FC_KERNING);
            }
        }

        /* -- OTL -- */
        // Use OTL OpenType Table Layout - GSUB & GPOS
        if (isset($this->CurrentFont['useOTL']) && $this->CurrentFont['useOTL']) {
            $txt = $this->otl->applyOTL($txt, $this->CurrentFont['useOTL']);
            $OTLdata = $this->otl->OTLdata;
        }
        /* -- END OTL -- */
        $this->OTLtags = $save_OTLtags;

        $this->magic_reverse_dir($txt, $this->directionality, $OTLdata);

        $this->Cell($w, $h, $txt, $border, $ln, $align, $fill, $link, $currentx, 0, 0, 'M', 0, false, $OTLdata, $textvar);
    }

    /* -- END DIRECTW -- */

    function ResetSpacing()
    {
        if ($this->ws != 0) {
            $this->writer->write('BT 0 Tw ET');
        }
        $this->ws = 0;
        if ($this->charspacing != 0) {
            $this->writer->write('BT 0 Tc ET');
        }
        $this->charspacing = 0;
    }

    function SetSpacing($cs, $ws)
    {
        if (intval($cs * 1000) == 0) {
            $cs = 0;
        }
        if ($cs) {
            $this->writer->write(sprintf('BT %.3F Tc ET', $cs));
        } elseif ($this->charspacing != 0) {
            $this->writer->write('BT 0 Tc ET');
        }
        $this->charspacing = $cs;
        if (intval($ws * 1000) == 0) {
            $ws = 0;
        }
        if ($ws) {
            $this->writer->write(sprintf('BT %.3F Tw ET', $ws));
        } elseif ($this->ws != 0) {
            $this->writer->write('BT 0 Tw ET');
        }
        $this->ws = $ws;
    }

    // WORD SPACING
    function GetJspacing($nc, $ns, $w, $inclCursive, &$cOTLdata)
    {
        $kashida_present = false;
        $kashida_space = 0;
        if ($w > 0 && $inclCursive && isset($this->CurrentFont['useKashida']) && $this->CurrentFont['useKashida'] && !empty($cOTLdata)) {
            for ($c = 0; $c < count($cOTLdata); $c++) {
                for ($i = 0; $i < strlen($cOTLdata[$c]['group']); $i++) {
                    if (isset($cOTLdata[$c]['GPOSinfo'][$i]['kashida']) && $cOTLdata[$c]['GPOSinfo'][$i]['kashida'] > 0) {
                        $kashida_present = true;
                        break 2;
                    }
                }
            }
        }

        if ($kashida_present) {
            $k_ctr = 0;  // Number of kashida points
            $k_total = 0;  // Total of kashida values (priority)
            // Reset word
            $max_kashida_in_word = 0;
            $last_kashida_in_word = -1;

            for ($c = 0; $c < count($cOTLdata); $c++) {
                for ($i = 0; $i < strlen($cOTLdata[$c]['group']); $i++) {
                    if ($cOTLdata[$c]['group'][$i] == 'S') {
                        // Save from last word
                        if ($max_kashida_in_word) {
                            $k_ctr++;
                            $k_total = $max_kashida_in_word;
                        }
                        // Reset word
                        $max_kashida_in_word = 0;
                        $last_kashida_in_word = -1;
                    }

                    if (isset($cOTLdata[$c]['GPOSinfo'][$i]['kashida']) && $cOTLdata[$c]['GPOSinfo'][$i]['kashida'] > 0) {
                        if ($max_kashida_in_word) {
                            if ($cOTLdata[$c]['GPOSinfo'][$i]['kashida'] > $max_kashida_in_word) {
                                $max_kashida_in_word = $cOTLdata[$c]['GPOSinfo'][$i]['kashida'];
                                $cOTLdata[$c]['GPOSinfo'][$last_kashida_in_word]['kashida'] = 0;
                                $last_kashida_in_word = $i;
                            } else {
                                $cOTLdata[$c]['GPOSinfo'][$i]['kashida'] = 0;
                            }
                        } else {
                            $max_kashida_in_word = $cOTLdata[$c]['GPOSinfo'][$i]['kashida'];
                            $last_kashida_in_word = $i;
                        }
                    }
                }
            }
            // Save from last word
            if ($max_kashida_in_word) {
                $k_ctr++;
                $k_total = $max_kashida_in_word;
            }

            // Number of kashida points = $k_ctr
            // $useKashida is a % value from CurrentFont/config_fonts.php
            // % ratio divided between word-spacing and kashida-spacing
            $kashida_space_ratio = intval($this->CurrentFont['useKashida']) / 100;


            $kashida_space = $w * $kashida_space_ratio;

            $tatw = $this->_getCharWidth($this->CurrentFont['cw'], 0x0640);
            // Only use kashida if each allocated kashida width is > 0.01 x width of a tatweel
            // Otherwise fontstretch is too small and errors
            // If not just leave to adjust word-spacing
            if ($tatw && (($kashida_space / $k_ctr) / $tatw) > 0.01) {
                for ($c = 0; $c < count($cOTLdata); $c++) {
                    for ($i = 0; $i < strlen($cOTLdata[$c]['group']); $i++) {
                        if (isset($cOTLdata[$c]['GPOSinfo'][$i]['kashida']) && $cOTLdata[$c]['GPOSinfo'][$i]['kashida'] > 0) {
                            // At this point kashida is a number representing priority (higher number - higher priority)
                            // We are now going to set it as an actual length
                            // This shares it equally amongst words:
                            $cOTLdata[$c]['GPOSinfo'][$i]['kashida_space'] = (1 / $k_ctr) * $kashida_space;
                        }
                    }
                }
                $w -= $kashida_space;
            }
        }

        $ws = 0;
        $charspacing = 0;
        $ww = $this->jSWord;
        $ncx = $nc - 1;
        if ($nc == 0) {
            return [0, 0, 0];
        } // Only word spacing allowed / possible
        elseif ($this->fixedlSpacing !== false || $inclCursive) {
            if ($ns) {
                $ws = $w / $ns;
            }
        } elseif ($nc == 1) {
            $charspacing = $w;
        } elseif (!$ns) {
            $charspacing = $w / ($ncx );
            if (($this->jSmaxChar > 0) && ($charspacing > $this->jSmaxChar)) {
                $charspacing = $this->jSmaxChar;
            }
        } elseif ($ns == ($ncx )) {
            $charspacing = $w / $ns;
        } else {
            if ($this->usingCoreFont) {
                $cs = ($w * (1 - $this->jSWord)) / ($ncx );
                if (($this->jSmaxChar > 0) && ($cs > $this->jSmaxChar)) {
                    $cs = $this->jSmaxChar;
                    $ww = 1 - (($cs * ($ncx )) / $w);
                }
                $charspacing = $cs;
                $ws = ($w * ($ww) ) / $ns;
            } else {
                $cs = ($w * (1 - $this->jSWord)) / ($ncx - $ns);
                if (($this->jSmaxChar > 0) && ($cs > $this->jSmaxChar)) {
                    $cs = $this->jSmaxChar;
                    $ww = 1 - (($cs * ($ncx - $ns)) / $w);
                }
                $charspacing = $cs;
                $ws = (($w * ($ww) ) / $ns) - $charspacing;
            }
        }
        return [$charspacing, $ws, $kashida_space];
    }

    /**
     * Output a cell
     *
     * Expects input to be mb_encoded if necessary and RTL reversed
     *
     * @since mPDF 5.7.1
     */
    function Cell($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = 0, $link = '', $currentx = 0, $lcpaddingL = 0, $lcpaddingR = 0, $valign = 'M', $spanfill = 0, $exactWidth = false, $OTLdata = false, $textvar = 0, $lineBox = false)
    {
        // NON_BREAKING SPACE
        if ($this->usingCoreFont) {
            $txt = str_replace(chr(160), chr(32), $txt);
        } else {
            $txt = str_replace(chr(194) . chr(160), chr(32), $txt);
        }

        $oldcolumn = $this->CurrCol;

        // Automatic page break
        // Allows PAGE-BREAK-AFTER = avoid to work
        if (isset($this->blk[$this->blklvl])) {
            $bottom = $this->blk[$this->blklvl]['padding_bottom'] + $this->blk[$this->blklvl]['margin_bottom'];
        } else {
            $bottom = 0;
        }

        if (!$this->tableLevel
            && (
                ($this->y + $this->divheight > $this->PageBreakTrigger)
                || ($this->y + $h > $this->PageBreakTrigger)
                || (
                    $this->y + ($h * 2) + $bottom > $this->PageBreakTrigger
                    && $this->blk[$this->blklvl]['page_break_after_avoid']
                )
            )
            && !$this->InFooter
            && $this->AcceptPageBreak()
        ) { // mPDF 5.7.2

            $x = $this->x; // Current X position

            // WORD SPACING
            $ws = $this->ws; // Word Spacing
            $charspacing = $this->charspacing; // Character Spacing
            $this->ResetSpacing();

            $this->AddPage($this->CurOrientation);

            // Added to correct for OddEven Margins
            $x += $this->MarginCorrection;
            if ($currentx) {
                $currentx += $this->MarginCorrection;
            }
            $this->x = $x;
            // WORD SPACING
            $this->SetSpacing($charspacing, $ws);
        }

        // Test: to put line through centre of cell: $this->Line($this->x,$this->y+($h/2),$this->x+50,$this->y+($h/2));
        // Test: to put border around cell as it is specified: $border='LRTB';

        /* -- COLUMNS -- */
        // COLS
        // COLUMN CHANGE
        if ($this->CurrCol != $oldcolumn) {
            if ($currentx) {
                $currentx += $this->ChangeColumn * ($this->ColWidth + $this->ColGap);
            }
            $this->x += $this->ChangeColumn * ($this->ColWidth + $this->ColGap);
        }

        // COLUMNS Update/overwrite the lowest bottom of printing y value for a column
        if ($this->ColActive) {
            if ($h) {
                $this->ColDetails[$this->CurrCol]['bottom_margin'] = $this->y + $h;
            } else {
                $this->ColDetails[$this->CurrCol]['bottom_margin'] = $this->y + $this->divheight;
            }
        }
        /* -- END COLUMNS -- */


        if ($w == 0) {
            $w = $this->w - $this->rMargin - $this->x;
        }

        $s = '';
        if ($fill == 1 && $this->FillColor) {
            if ((isset($this->pageoutput[$this->page]['FillColor']) && $this->pageoutput[$this->page]['FillColor'] != $this->FillColor) || !isset($this->pageoutput[$this->page]['FillColor'])) {
                $s .= $this->FillColor . ' ';
            }
            $this->pageoutput[$this->page]['FillColor'] = $this->FillColor;
        }

        if ($lineBox && isset($lineBox['boxtop']) && $txt) { // i.e. always from WriteFlowingBlock/finishFlowingBlock (but not objects -
            // which only have $lineBox['top'] set)
            $boxtop = $this->y + $lineBox['boxtop'];
            $boxbottom = $this->y + $lineBox['boxbottom'];
            $glyphYorigin = $lineBox['glyphYorigin'];
            $baseline_shift = $lineBox['baseline-shift'];
            $bord_boxtop = $bg_boxtop = $boxtop = $boxtop - $baseline_shift;
            $bord_boxbottom = $bg_boxbottom = $boxbottom = $boxbottom - $baseline_shift;
            $bord_boxheight = $bg_boxheight = $boxheight = $boxbottom - $boxtop;

            // If inline element BACKGROUND has bounding box set by parent element:
            if (isset($lineBox['background-boxtop'])) {
                $bg_boxtop = $this->y + $lineBox['background-boxtop'] - $lineBox['background-baseline-shift'];
                $bg_boxbottom = $this->y + $lineBox['background-boxbottom'] - $lineBox['background-baseline-shift'];
                $bg_boxheight = $bg_boxbottom - $bg_boxtop;
            }
            // If inline element BORDER has bounding box set by parent element:
            if (isset($lineBox['border-boxtop'])) {
                $bord_boxtop = $this->y + $lineBox['border-boxtop'] - $lineBox['border-baseline-shift'];
                $bord_boxbottom = $this->y + $lineBox['border-boxbottom'] - $lineBox['border-baseline-shift'];
                $bord_boxheight = $bord_boxbottom - $bord_boxtop;
            }

        } else {

            $boxtop = $this->y;
            $boxheight = $h;
            $boxbottom = $this->y + $h;
            $baseline_shift = 0;

            if ($txt != '') {

                // FONT SIZE - this determines the baseline caculation
                $bfs = $this->FontSize;
                // Calculate baseline Superscript and Subscript Y coordinate adjustment
                $bfx = $this->baselineC;
                $baseline = $bfx * $bfs;

                if ($textvar & TextVars::FA_SUPERSCRIPT) {
                    $baseline_shift = $this->textparam['text-baseline'];
                } elseif ($textvar & TextVars::FA_SUBSCRIPT) {
                    $baseline_shift = $this->textparam['text-baseline'];
                } elseif ($this->bullet) {
                    $baseline += ($bfx - 0.7) * $this->FontSize;
                }

                // Vertical align (for Images)
                if ($valign == 'T') {
                    $va = (0.5 * $bfs * $this->normalLineheight);
                } elseif ($valign == 'B') {
                    $va = $h - (0.5 * $bfs * $this->normalLineheight);
                } else {
                    $va = 0.5 * $h;
                } // Middle

                // ONLY SET THESE IF WANT TO CONFINE BORDER +/- FILL TO FIT FONTSIZE - NOT FULL CELL AS IS ORIGINAL FUNCTION
                // spanfill or spanborder are set in FlowingBlock functions
                if ($spanfill || !empty($this->spanborddet) || $link != '') {
                    $exth = 0.2; // Add to fontsize to increase height of background / link / border
                    $boxtop = $this->y + $baseline + $va - ($this->FontSize * (1 + $exth / 2) * (0.5 + $bfx));
                    $boxheight = $this->FontSize * (1 + $exth);
                    $boxbottom = $boxtop + $boxheight;
                }

                $glyphYorigin = $baseline + $va;
            }

            $boxtop -= $baseline_shift;
            $boxbottom -= $baseline_shift;
            $bord_boxtop = $bg_boxtop = $boxtop;
            $bord_boxbottom = $bg_boxbottom = $boxbottom;
            $bord_boxheight = $bg_boxheight = $boxheight = $boxbottom - $boxtop;
        }

        $bbw = $tbw = $lbw = $rbw = 0; // Border widths
        if (!empty($this->spanborddet)) {

            if (!isset($this->spanborddet['B'])) {
                $this->spanborddet['B'] = ['s' => 0, 'style' => '', 'w' => 0];
            }

            if (!isset($this->spanborddet['T'])) {
                $this->spanborddet['T'] = ['s' => 0, 'style' => '', 'w' => 0];
            }

            if (!isset($this->spanborddet['L'])) {
                $this->spanborddet['L'] = ['s' => 0, 'style' => '', 'w' => 0];
            }

            if (!isset($this->spanborddet['R'])) {
                $this->spanborddet['R'] = ['s' => 0, 'style' => '', 'w' => 0];
            }

            $bbw = $this->spanborddet['B']['w'];
            $tbw = $this->spanborddet['T']['w'];
            $lbw = $this->spanborddet['L']['w'];
            $rbw = $this->spanborddet['R']['w'];
        }

        if ($fill == 1 || $border == 1 || !empty($this->spanborddet)) {

            if (!empty($this->spanborddet)) {

                if ($fill == 1) {
                    $s .= sprintf('%.3F %.3F %.3F %.3F re f ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bg_boxtop + $tbw) * Mpdf::SCALE, ($w + $lbw + $rbw) * Mpdf::SCALE, (-$bg_boxheight - $tbw - $bbw) * Mpdf::SCALE);
                }

                $s.= ' q ';
                $dashon = 3;
                $dashoff = 3.5;
                $dot = 2.5;

                if ($tbw) {
                    $short = 0;

                    if ($this->spanborddet['T']['style'] == 'dashed') {
                        $s .= sprintf(' 0 j 0 J [%.3F %.3F] 0 d ', $tbw * $dashon * Mpdf::SCALE, $tbw * $dashoff * Mpdf::SCALE);
                    } elseif ($this->spanborddet['T']['style'] == 'dotted') {
                        $s .= sprintf(' 1 j 1 J [%.3F %.3F] %.3F d ', 0.001, $tbw * $dot * Mpdf::SCALE, -$tbw / 2 * Mpdf::SCALE);
                        $short = $tbw / 2;
                    } else {
                        $s .= ' 0 j 0 J [] 0 d ';
                    }

                    if ($this->spanborddet['T']['style'] != 'dotted') {
                        $s .= 'q ';
                        $s .= sprintf('%.3F %.3F m ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F l ', ($this->x + $w + $rbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F l ', ($this->x + $w) * Mpdf::SCALE, ($this->h - $bord_boxtop) * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F l ', ($this->x) * Mpdf::SCALE, ($this->h - $bord_boxtop) * Mpdf::SCALE);
                        $s .= ' h W n '; // Ends path no-op & Sets the clipping path
                    }

                    $c = $this->SetDColor($this->spanborddet['T']['c'], true);

                    if ($this->spanborddet['T']['style'] == 'double') {
                        $s .= sprintf(' %s %.3F w ', $c, $tbw / 3 * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw * 5 / 6) * Mpdf::SCALE, ($this->x + $w + $rbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw * 5 / 6) * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw / 6) * Mpdf::SCALE, ($this->x + $w + $rbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw / 6) * Mpdf::SCALE);
                    } elseif ($this->spanborddet['T']['style'] == 'dotted') {
                        $s .= sprintf(' %s %.3F w ', $c, $tbw * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw / 2) * Mpdf::SCALE, ($this->x + $w + $rbw - $short) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw / 2) * Mpdf::SCALE);
                    } else {
                        $s .= sprintf(' %s %.3F w ', $c, $tbw * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw / 2) * Mpdf::SCALE, ($this->x + $w + $rbw - $short) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw / 2) * Mpdf::SCALE);
                    }

                    if ($this->spanborddet['T']['style'] != 'dotted') {
                        $s .= ' Q ';
                    }
                }
                if ($bbw) {

                    $short = 0;
                    if ($this->spanborddet['B']['style'] == 'dashed') {
                        $s .= sprintf(' 0 j 0 J [%.3F %.3F] 0 d ', $bbw * $dashon * Mpdf::SCALE, $bbw * $dashoff * Mpdf::SCALE);
                    } elseif ($this->spanborddet['B']['style'] == 'dotted') {
                        $s .= sprintf(' 1 j 1 J [%.3F %.3F] %.3F d ', 0.001, $bbw * $dot * Mpdf::SCALE, -$bbw / 2 * Mpdf::SCALE);
                        $short = $bbw / 2;
                    } else {
                        $s .= ' 0 j 0 J [] 0 d ';
                    }

                    if ($this->spanborddet['B']['style'] != 'dotted') {
                        $s .= 'q ';
                        $s .= sprintf('%.3F %.3F m ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw) * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F l ', ($this->x + $w + $rbw) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw) * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F l ', ($this->x + $w) * Mpdf::SCALE, ($this->h - $bord_boxbottom) * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F l ', ($this->x) * Mpdf::SCALE, ($this->h - $bord_boxbottom) * Mpdf::SCALE);
                        $s .= ' h W n '; // Ends path no-op & Sets the clipping path
                    }

                    $c = $this->SetDColor($this->spanborddet['B']['c'], true);

                    if ($this->spanborddet['B']['style'] == 'double') {
                        $s .= sprintf(' %s %.3F w ', $c, $bbw / 3 * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw / 6) * Mpdf::SCALE, ($this->x + $w + $rbw - $short) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw / 6) * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw * 5 / 6) * Mpdf::SCALE, ($this->x + $w + $rbw - $short) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw * 5 / 6) * Mpdf::SCALE);
                    } elseif ($this->spanborddet['B']['style'] == 'dotted') {
                        $s .= sprintf(' %s %.3F w ', $c, $bbw * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw / 2) * Mpdf::SCALE, ($this->x + $w + $rbw - $short) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw / 2) * Mpdf::SCALE);
                    } else {
                        $s .= sprintf(' %s %.3F w ', $c, $bbw * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw / 2) * Mpdf::SCALE, ($this->x + $w + $rbw - $short) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw / 2) * Mpdf::SCALE);
                    }

                    if ($this->spanborddet['B']['style'] != 'dotted') {
                        $s .= ' Q ';
                    }
                }

                if ($lbw) {
                    $short = 0;
                    if ($this->spanborddet['L']['style'] == 'dashed') {
                        $s .= sprintf(' 0 j 0 J [%.3F %.3F] 0 d ', $lbw * $dashon * Mpdf::SCALE, $lbw * $dashoff * Mpdf::SCALE);
                    } elseif ($this->spanborddet['L']['style'] == 'dotted') {
                        $s .= sprintf(' 1 j 1 J [%.3F %.3F] %.3F d ', 0.001, $lbw * $dot * Mpdf::SCALE, -$lbw / 2 * Mpdf::SCALE);
                        $short = $lbw / 2;
                    } else {
                        $s .= ' 0 j 0 J [] 0 d ';
                    }

                    if ($this->spanborddet['L']['style'] != 'dotted') {
                        $s .= 'q ';
                        $s .= sprintf('%.3F %.3F m ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw) * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F l ', ($this->x) * Mpdf::SCALE, ($this->h - $bord_boxbottom) * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F l ', ($this->x) * Mpdf::SCALE, ($this->h - $bord_boxtop) * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F l ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE);
                        $s .= ' h W n '; // Ends path no-op & Sets the clipping path
                    }

                    $c = $this->SetDColor($this->spanborddet['L']['c'], true);
                    if ($this->spanborddet['L']['style'] == 'double') {
                        $s .= sprintf(' %s %.3F w ', $c, $lbw / 3 * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw / 6) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE, ($this->x - $lbw / 6) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw + $short) * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw * 5 / 6) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE, ($this->x - $lbw * 5 / 6) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw + $short) * Mpdf::SCALE);
                    } elseif ($this->spanborddet['L']['style'] == 'dotted') {
                        $s .= sprintf(' %s %.3F w ', $c, $lbw * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw / 2) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE, ($this->x - $lbw / 2) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw + $short) * Mpdf::SCALE);
                    } else {
                        $s .= sprintf(' %s %.3F w ', $c, $lbw * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw / 2) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE, ($this->x - $lbw / 2) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw + $short) * Mpdf::SCALE);
                    }

                    if ($this->spanborddet['L']['style'] != 'dotted') {
                        $s .= ' Q ';
                    }
                }

                if ($rbw) {

                    $short = 0;
                    if ($this->spanborddet['R']['style'] == 'dashed') {
                        $s .= sprintf(' 0 j 0 J [%.3F %.3F] 0 d ', $rbw * $dashon * Mpdf::SCALE, $rbw * $dashoff * Mpdf::SCALE);
                    } elseif ($this->spanborddet['R']['style'] == 'dotted') {
                        $s .= sprintf(' 1 j 1 J [%.3F %.3F] %.3F d ', 0.001, $rbw * $dot * Mpdf::SCALE, -$rbw / 2 * Mpdf::SCALE);
                        $short = $rbw / 2;
                    } else {
                        $s .= ' 0 j 0 J [] 0 d ';
                    }

                    if ($this->spanborddet['R']['style'] != 'dotted') {
                        $s .= 'q ';
                        $s .= sprintf('%.3F %.3F m ', ($this->x + $w + $rbw) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw) * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F l ', ($this->x + $w) * Mpdf::SCALE, ($this->h - $bord_boxbottom) * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F l ', ($this->x + $w) * Mpdf::SCALE, ($this->h - $bord_boxtop) * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F l ', ($this->x + $w + $rbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE);
                        $s .= ' h W n '; // Ends path no-op & Sets the clipping path
                    }

                    $c = $this->SetDColor($this->spanborddet['R']['c'], true);
                    if ($this->spanborddet['R']['style'] == 'double') {
                        $s .= sprintf(' %s %.3F w ', $c, $rbw / 3 * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x + $w + $rbw / 6) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE, ($this->x + $w + $rbw / 6) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw + $short) * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x + $w + $rbw * 5 / 6) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE, ($this->x + $w + $rbw * 5 / 6) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw + $short) * Mpdf::SCALE);
                    } elseif ($this->spanborddet['R']['style'] == 'dotted') {
                        $s .= sprintf(' %s %.3F w ', $c, $rbw * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x + $w + $rbw / 2) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE, ($this->x + $w + $rbw / 2) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw + $short) * Mpdf::SCALE);
                    } else {
                        $s .= sprintf(' %s %.3F w ', $c, $rbw * Mpdf::SCALE);
                        $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x + $w + $rbw / 2) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE, ($this->x + $w + $rbw / 2) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw + $short) * Mpdf::SCALE);
                    }

                    if ($this->spanborddet['R']['style'] != 'dotted') {
                        $s .= ' Q ';
                    }
                }

                $s.= ' Q ';

            } else { // If "border", does not come from WriteFlowingBlock or FinishFlowingBlock

                if ($fill == 1) {
                    $op = ($border == 1) ? 'B' : 'f';
                } else {
                    $op = 'S';
                }

                $s .= sprintf('%.3F %.3F %.3F %.3F re %s ', $this->x * Mpdf::SCALE, ($this->h - $bg_boxtop) * Mpdf::SCALE, $w * Mpdf::SCALE, -$bg_boxheight * Mpdf::SCALE, $op);
            }
        }

        if (is_string($border)) { // If "border", does not come from WriteFlowingBlock or FinishFlowingBlock

            $x = $this->x;
            $y = $this->y;

            if (is_int(strpos($border, 'L'))) {
                $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', $x * Mpdf::SCALE, ($this->h - $bord_boxtop) * Mpdf::SCALE, $x * Mpdf::SCALE, ($this->h - ($bord_boxbottom)) * Mpdf::SCALE);
            }

            if (is_int(strpos($border, 'T'))) {
                $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', $x * Mpdf::SCALE, ($this->h - $bord_boxtop) * Mpdf::SCALE, ($x + $w) * Mpdf::SCALE, ($this->h - $bord_boxtop) * Mpdf::SCALE);
            }

            if (is_int(strpos($border, 'R'))) {
                $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($x + $w) * Mpdf::SCALE, ($this->h - $bord_boxtop) * Mpdf::SCALE, ($x + $w) * Mpdf::SCALE, ($this->h - ($bord_boxbottom)) * Mpdf::SCALE);
            }

            if (is_int(strpos($border, 'B'))) {
                $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', $x * Mpdf::SCALE, ($this->h - ($bord_boxbottom)) * Mpdf::SCALE, ($x + $w) * Mpdf::SCALE, ($this->h - ($bord_boxbottom)) * Mpdf::SCALE);
            }
        }

        if ($txt != '') {

            if ($exactWidth) {
                $stringWidth = $w;
            } else {
                $stringWidth = $this->GetStringWidth($txt, true, $OTLdata, $textvar) + ( $this->charspacing * mb_strlen($txt, $this->mb_enc) / Mpdf::SCALE ) + ( $this->ws * mb_substr_count($txt, ' ', $this->mb_enc) / Mpdf::SCALE );
            }

            // Set x OFFSET FOR PRINTING
            if ($align == 'R') {
                $dx = $w - $this->cMarginR - $stringWidth - $lcpaddingR;
            } elseif ($align == 'C') {
                $dx = (($w - $stringWidth ) / 2);
            } elseif ($align == 'L' or $align == 'J') {
                $dx = $this->cMarginL + $lcpaddingL;
            } else {
                $dx = 0;
            }

            if ($this->ColorFlag) {
                $s .='q ' . $this->TextColor . ' ';
            }

            // OUTLINE
            if (isset($this->textparam['outline-s']) && $this->textparam['outline-s'] && !($textvar & TextVars::FC_SMALLCAPS)) { // mPDF 5.7.1
                $s .=' ' . sprintf('%.3F w', $this->LineWidth * Mpdf::SCALE) . ' ';
                $s .=" $this->DrawColor ";
                $s .=" 2 Tr ";
            } elseif ($this->falseBoldWeight && strpos($this->ReqFontStyle, "B") !== false && strpos($this->FontStyle, "B") === false && !($textvar & TextVars::FC_SMALLCAPS)) { // can't use together with OUTLINE or Small Caps	// mPDF 5.7.1	??? why not with SmallCaps ???
                $s .= ' 2 Tr 1 J 1 j ';
                $s .= ' ' . sprintf('%.3F w', ($this->FontSize / 130) * Mpdf::SCALE * $this->falseBoldWeight) . ' ';
                $tc = strtoupper($this->TextColor); // change 0 0 0 rg to 0 0 0 RG
                if ($this->FillColor != $tc) {
                    $s .= ' ' . $tc . ' ';
                }  // stroke (outline) = same colour as text(fill)
            } else {
                $s .=" 0 Tr ";
            }

            if (strpos($this->ReqFontStyle, "I") !== false && strpos($this->FontStyle, "I") === false) { // Artificial italic
                $aix = '1 0 0.261799 1 %.3F %.3F Tm ';
            } else {
                $aix = '%.3F %.3F Td ';
            }

            $px = ($this->x + $dx) * Mpdf::SCALE;
            $py = ($this->h - ($this->y + $glyphYorigin - $baseline_shift)) * Mpdf::SCALE;

            // THE TEXT
            $txt2 = $txt;
            $sub = '';
            $this->CurrentFont['used'] = true;

            /*             * ************** SIMILAR TO Text() ************************ */

            // IF corefonts AND NOT SmCaps AND NOT Kerning
            // Just output text; charspacing and wordspacing already set by charspacing (Tc) and ws (Tw)
            if ($this->usingCoreFont && !($textvar & TextVars::FC_SMALLCAPS) && !($textvar & TextVars::FC_KERNING)) {
                $txt2 = $this->writer->escape($txt2);
                $sub .= sprintf('BT ' . $aix . ' (%s) Tj ET', $px, $py, $txt2);
            } // IF NOT corefonts AND NO wordspacing AND NOT SIP/SMP AND NOT SmCaps AND NOT Kerning AND NOT OTL
            // Just output text
            elseif (!$this->usingCoreFont && !$this->ws && !($textvar & TextVars::FC_SMALLCAPS) && !($textvar & TextVars::FC_KERNING) && !(isset($this->CurrentFont['useOTL']) && ($this->CurrentFont['useOTL'] & 0xFF) && !empty($OTLdata['GPOSinfo']))) {
                // IF SIP/SMP
                if ((isset($this->CurrentFont['sip']) && $this->CurrentFont['sip']) || (isset($this->CurrentFont['smp']) && $this->CurrentFont['smp'])) {
                    $txt2 = $this->UTF8toSubset($txt2);
                    $sub .=sprintf('BT ' . $aix . ' %s Tj ET', $px, $py, $txt2);
                } // NOT SIP/SMP
                else {
                    $txt2 = $this->writer->utf8ToUtf16BigEndian($txt2, false);
                    $txt2 = $this->writer->escape($txt2);
                    $sub .=sprintf('BT ' . $aix . ' (%s) Tj ET', $px, $py, $txt2);
                }
            } // IF NOT corefonts AND IS wordspacing AND NOT SIP AND NOT SmCaps AND NOT Kerning AND NOT OTL
            // Output text word by word with an adjustment to the intercharacter spacing for SPACEs to form word spacing
            // IF multibyte - Tw has no effect - need to do word spacing using an adjustment before each space
            elseif (!$this->usingCoreFont && $this->ws && !((isset($this->CurrentFont['sip']) && $this->CurrentFont['sip']) || (isset($this->CurrentFont['smp']) && $this->CurrentFont['smp'])) && !($textvar & TextVars::FC_SMALLCAPS) && !($textvar & TextVars::FC_KERNING) && !(isset($this->CurrentFont['useOTL']) && ($this->CurrentFont['useOTL'] & 0xFF) && (!empty($OTLdata['GPOSinfo']) || (strpos($OTLdata['group'], 'M') !== false && $this->charspacing)) )) {
                $space = " ";
                $space = $this->writer->utf8ToUtf16BigEndian($space, false);
                $space = $this->writer->escape($space);
                $sub .=sprintf('BT ' . $aix . ' %.3F Tc [', $px, $py, $this->charspacing);
                $t = explode(' ', $txt2);
                $numt = count($t);
                for ($i = 0; $i < $numt; $i++) {
                    $tx = $t[$i];
                    $tx = $this->writer->utf8ToUtf16BigEndian($tx, false);
                    $tx = $this->writer->escape($tx);
                    $sub .=sprintf('(%s) ', $tx);
                    if (($i + 1) < $numt) {
                        $adj = -($this->ws) * 1000 / $this->FontSizePt;
                        $sub .=sprintf('%d(%s) ', $adj, $space);
                    }
                }
                $sub .='] TJ ';
                $sub .=' ET';
            } // ELSE (IF SmCaps || Kerning || OTL) [corefonts or not corefonts; SIP or SMP or BMP]
            else {
                $sub = $this->applyGPOSpdf($txt, $aix, $px, $py, $OTLdata, $textvar);
            }

            /** ************** END SIMILAR TO Text() ************************ */

            if ($this->shrin_k > 1) {
                $shrin_k = $this->shrin_k;
            } else {
                $shrin_k = 1;
            }

            // UNDERLINE
            if ($textvar & TextVars::FD_UNDERLINE) { // mPDF 5.7.1	// mPDF 6

                // mPDF 5.7.3  inline text-decoration parameters

                $c = isset($this->textparam['u-decoration']['color']) ? $this->textparam['u-decoration']['color'] : '';
                if ($this->FillColor != $c) {
                    $sub .= ' ' . $c . ' ';
                }

                // mPDF 5.7.3  inline text-decoration parameters
                $decorationfontkey = isset($this->textparam['u-decoration']['fontkey']) ? $this->textparam['u-decoration']['fontkey'] : '';
                $decorationfontsize = isset($this->textparam['u-decoration']['fontsize']) ? $this->textparam['u-decoration']['fontsize'] / $shrin_k : 0;

                if (isset($this->fonts[$decorationfontkey]['ut']) && $this->fonts[$decorationfontkey]['ut']) {
                    $ut = $this->fonts[$decorationfontkey]['ut'] / 1000 * $decorationfontsize;
                } else {
                    $ut = 60 / 1000 * $decorationfontsize;
                }

                if (isset($this->fonts[$decorationfontkey]['up']) && $this->fonts[$decorationfontkey]['up']) {
                    $up = $this->fonts[$decorationfontkey]['up'];
                } else {
                    $up = -100;
                }

                $adjusty = (-$up / 1000 * $decorationfontsize) + $ut / 2;
                $ubaseline = isset($this->textparam['u-decoration']['baseline'])
                    ? $glyphYorigin - $this->textparam['u-decoration']['baseline'] / $shrin_k
                    : $glyphYorigin;

                $olw = $this->LineWidth;

                $sub .= ' ' . (sprintf(' %.3F w 0 j 0 J ', $ut * Mpdf::SCALE));
                $sub .= ' ' . $this->_dounderline($this->x + $dx, $this->y + $ubaseline + $adjusty, $txt, $OTLdata, $textvar);
                $sub .= ' ' . (sprintf(' %.3F w 2 j 2 J ', $olw * Mpdf::SCALE));

                if ($this->FillColor != $c) {
                    $sub .= ' ' . $this->FillColor . ' ';
                }
            }

            // STRIKETHROUGH
            if ($textvar & TextVars::FD_LINETHROUGH) { // mPDF 5.7.1	// mPDF 6

                // mPDF 5.7.3  inline text-decoration parameters
                $c = $this->textparam['s-decoration']['color'];

                if ($this->FillColor != $c) {
                    $sub .= ' ' . $c . ' ';
                }

                // mPDF 5.7.3  inline text-decoration parameters
                $decorationfontkey = $this->textparam['s-decoration']['fontkey'];
                $decorationfontsize = $this->textparam['s-decoration']['fontsize'] / $shrin_k;

                // Use yStrikeoutSize from OS/2 if available
                if (isset($this->fonts[$decorationfontkey]['strs']) && $this->fonts[$decorationfontkey]['strs']) {
                    $ut = $this->fonts[$decorationfontkey]['strs'] / 1000 * $decorationfontsize;
                } // else use underlineThickness from post if available
                elseif (isset($this->fonts[$decorationfontkey]['ut']) && $this->fonts[$decorationfontkey]['ut']) {
                    $ut = $this->fonts[$decorationfontkey]['ut'] / 1000 * $decorationfontsize;
                } else {
                    $ut = 50 / 1000 * $decorationfontsize;
                }

                // Use yStrikeoutPosition from OS/2 if available
                if (isset($this->fonts[$decorationfontkey]['strp']) && $this->fonts[$decorationfontkey]['strp']) {
                    $up = $this->fonts[$decorationfontkey]['strp'];
                    $adjusty = (-$up / 1000 * $decorationfontsize);
                } // else use a fraction ($this->baselineS) of CapHeight
                else {
                    if (isset($this->fonts[$decorationfontkey]['desc']['CapHeight']) && $this->fonts[$decorationfontkey]['desc']['CapHeight']) {
                        $ch = $this->fonts[$decorationfontkey]['desc']['CapHeight'];
                    } else {
                        $ch = 700;
                    }
                    $adjusty = (-$ch / 1000 * $decorationfontsize) * $this->baselineS;
                }

                $sbaseline = $glyphYorigin - $this->textparam['s-decoration']['baseline'] / $shrin_k;

                $olw = $this->LineWidth;

                $sub .=' ' . (sprintf(' %.3F w 0 j 0 J ', $ut * Mpdf::SCALE));
                $sub .=' ' . $this->_dounderline($this->x + $dx, $this->y + $sbaseline + $adjusty, $txt, $OTLdata, $textvar);
                $sub .=' ' . (sprintf(' %.3F w 2 j 2 J ', $olw * Mpdf::SCALE));

                if ($this->FillColor != $c) {
                    $sub .= ' ' . $this->FillColor . ' ';
                }
            }

            // mPDF 5.7.3  inline text-decoration parameters
            // OVERLINE
            if ($textvar & TextVars::FD_OVERLINE) { // mPDF 5.7.1	// mPDF 6
                // mPDF 5.7.3  inline text-decoration parameters
                $c = $this->textparam['o-decoration']['color'];
                if ($this->FillColor != $c) {
                    $sub .= ' ' . $c . ' ';
                }

                // mPDF 5.7.3  inline text-decoration parameters
                $decorationfontkey = (int) (((float) $this->textparam['o-decoration']['fontkey']) / $shrin_k);
                $decorationfontsize = $this->textparam['o-decoration']['fontsize'];

                if (isset($this->fonts[$decorationfontkey]['ut']) && $this->fonts[$decorationfontkey]['ut']) {
                    $ut = $this->fonts[$decorationfontkey]['ut'] / 1000 * $decorationfontsize;
                } else {
                    $ut = 60 / 1000 * $decorationfontsize;
                }
                if (isset($this->fonts[$decorationfontkey]['desc']['CapHeight']) && $this->fonts[$decorationfontkey]['desc']['CapHeight']) {
                    $ch = $this->fonts[$decorationfontkey]['desc']['CapHeight'];
                } else {
                    $ch = 700;
                }
                $adjusty = (-$ch / 1000 * $decorationfontsize) * $this->baselineO;
                $obaseline = $glyphYorigin - $this->textparam['o-decoration']['baseline'] / $shrin_k;
                $olw = $this->LineWidth;
                $sub .=' ' . (sprintf(' %.3F w 0 j 0 J ', $ut * Mpdf::SCALE));
                $sub .=' ' . $this->_dounderline($this->x + $dx, $this->y + $obaseline + $adjusty, $txt, $OTLdata, $textvar);
                $sub .=' ' . (sprintf(' %.3F w 2 j 2 J ', $olw * Mpdf::SCALE));
                if ($this->FillColor != $c) {
                    $sub .= ' ' . $this->FillColor . ' ';
                }
            }

            // TEXT SHADOW
            if ($this->textshadow) {  // First to process is last in CSS comma separated shadows
                foreach ($this->textshadow as $ts) {
                    $s .= ' q ';
                    $s .= $this->SetTColor($ts['col'], true) . "\n";
                    if ($ts['col'][0] == 5 && ord($ts['col'][4]) < 100) { // RGBa
                        $s .= $this->SetAlpha(ord($ts['col'][4]) / 100, 'Normal', true, 'F') . "\n";
                    } elseif ($ts['col'][0] == 6 && ord($ts['col'][5]) < 100) { // CMYKa
                        $s .= $this->SetAlpha(ord($ts['col'][5]) / 100, 'Normal', true, 'F') . "\n";
                    } elseif ($ts['col'][0] == 1 && $ts['col'][2] == 1 && ord($ts['col'][3]) < 100) { // Gray
                        $s .= $this->SetAlpha(ord($ts['col'][3]) / 100, 'Normal', true, 'F') . "\n";
                    }
                    $s .= sprintf(' 1 0 0 1 %.4F %.4F cm', $ts['x'] * Mpdf::SCALE, -$ts['y'] * Mpdf::SCALE) . "\n";
                    $s .= $sub;
                    $s .= ' Q ';
                }
            }

            $s .= $sub;

            // COLOR
            if ($this->ColorFlag) {
                $s .=' Q';
            }

            // LINK
            if ($link != '') {
                $this->Link($this->x, $boxtop, $w, $boxheight, $link);
            }
        }
        if ($s) {
            $this->writer->write($s);
        }

        // WORD SPACING
        if ($this->ws && !$this->usingCoreFont) {
            $this->writer->write(sprintf('BT %.3F Tc ET', $this->charspacing));
        }
        $this->lasth = $h;
        if (strpos($txt, "\n") !== false) {
            $ln = 1; // cell recognizes \n from <BR> tag
        }
        if ($ln > 0) {
            // Go to next line
            $this->y += $h;
            if ($ln == 1) {
                // Move to next line
                if ($currentx != 0) {
                    $this->x = $currentx;
                } else {
                    $this->x = $this->lMargin;
                }
            }
        } else {
            $this->x+=$w;
        }
    }

    function applyGPOSpdf($txt, $aix, $x, $y, $OTLdata, $textvar = 0)
    {
        // Generate PDF string
        // ==============================
        if ((isset($this->CurrentFont['sip']) && $this->CurrentFont['sip']) || (isset($this->CurrentFont['smp']) && $this->CurrentFont['smp'])) {
            $sipset = true;
        } else {
            $sipset = false;
        }

        if ($textvar & TextVars::FC_SMALLCAPS) {
            $smcaps = true;
        } // IF SmallCaps using transformation, NOT OTL
        else {
            $smcaps = false;
        }

        if ($sipset) {
            $fontid = $last_fontid = $original_fontid = $this->CurrentFont['subsetfontids'][0];
        } else {
            $fontid = $last_fontid = $original_fontid = $this->CurrentFont['i'];
        }
        $SmallCapsON = false;  // state: uppercase/not
        $lastSmallCapsON = false; // state: uppercase/not
        $last_fontsize = $fontsize = $this->FontSizePt;
        $last_fontstretch = $fontstretch = 100;
        $groupBreak = false;

        $unicode = $this->UTF8StringToArray($txt);

        $GPOSinfo = (isset($OTLdata['GPOSinfo']) ? $OTLdata['GPOSinfo'] : []);
        $charspacing = ($this->charspacing * 1000 / $this->FontSizePt);
        $wordspacing = ($this->ws * 1000 / $this->FontSizePt);

        $XshiftBefore = 0;
        $XshiftAfter = 0;
        $lastYPlacement = 0;

        if ($sipset) {
            // mPDF 6  DELETED ********
            // 	$txt= preg_replace('/'.preg_quote($this->aliasNbPg,'/').'/', chr(7), $txt);	// ? Need to adjust OTL info
            // 	$txt= preg_replace('/'.preg_quote($this->aliasNbPgGp,'/').'/', chr(8), $txt);	// ? Need to adjust OTL info
            $tj = '<';
        } else {
            $tj = '(';
        }

        for ($i = 0; $i < count($unicode); $i++) {
            $c = $unicode[$i];
            $tx = '';
            $XshiftBefore = $XshiftAfter;
            $XshiftAfter = 0;
            $YPlacement = 0;
            $groupBreak = false;
            $kashida = 0;
            if (!empty($OTLdata)) {
                // YPlacement from GPOS
                if (isset($GPOSinfo[$i]['YPlacement']) && $GPOSinfo[$i]['YPlacement']) {
                    $YPlacement = $GPOSinfo[$i]['YPlacement'] * $this->FontSizePt / $this->CurrentFont['unitsPerEm'];
                    $groupBreak = true;
                }
                // XPlacement from GPOS
                if (isset($GPOSinfo[$i]['XPlacement']) && $GPOSinfo[$i]['XPlacement']) {
                    if (!isset($GPOSinfo[$i]['wDir']) || $GPOSinfo[$i]['wDir'] != 'RTL') {
                        if (isset($GPOSinfo[$i]['BaseWidth'])) {
                            $GPOSinfo[$i]['XPlacement'] -= $GPOSinfo[$i]['BaseWidth'];
                        }
                    }

                    // Convert to PDF Text space (thousandths of a unit );
                    $XshiftBefore += $GPOSinfo[$i]['XPlacement'] * 1000 / $this->CurrentFont['unitsPerEm'];
                    $XshiftAfter += -$GPOSinfo[$i]['XPlacement'] * 1000 / $this->CurrentFont['unitsPerEm'];
                }

                // Kashida from GPOS
                // Kashida is set as an absolute length value, but to adjust text needs to be converted to
                // font-related size
                if (isset($GPOSinfo[$i]['kashida_space']) && $GPOSinfo[$i]['kashida_space']) {
                    $kashida = $GPOSinfo[$i]['kashida_space'];
                }

                if ($c == 32) { // word spacing
                    $XshiftAfter += $wordspacing;
                }

                if (substr($OTLdata['group'], ($i + 1), 1) != 'M') { // Don't add inter-character spacing before Marks
                    $XshiftAfter += $charspacing;
                }

                // ...applyGPOSpdf...
                // XAdvance from GPOS - Convert to PDF Text space (thousandths of a unit );
                if (((isset($GPOSinfo[$i]['wDir']) && $GPOSinfo[$i]['wDir'] != 'RTL') || !isset($GPOSinfo[$i]['wDir'])) && isset($GPOSinfo[$i]['XAdvanceL']) && $GPOSinfo[$i]['XAdvanceL']) {
                    $XshiftAfter += $GPOSinfo[$i]['XAdvanceL'] * 1000 / $this->CurrentFont['unitsPerEm'];
                } elseif (isset($GPOSinfo[$i]['wDir']) && $GPOSinfo[$i]['wDir'] == 'RTL' && isset($GPOSinfo[$i]['XAdvanceR']) && $GPOSinfo[$i]['XAdvanceR']) {
                    $XshiftAfter += $GPOSinfo[$i]['XAdvanceR'] * 1000 / $this->CurrentFont['unitsPerEm'];
                }
            } // Character & Word spacing - if NOT OTL
            else {
                $XshiftAfter += $charspacing;
                if ($c == 32) {
                    $XshiftAfter += $wordspacing;
                }
            }

            // IF Kerning done using pairs rather than OTL
            if ($textvar & TextVars::FC_KERNING) {
                if ($i > 0 && isset($this->CurrentFont['kerninfo'][$unicode[($i - 1)]][$unicode[$i]])) {
                    $XshiftBefore += $this->CurrentFont['kerninfo'][$unicode[($i - 1)]][$unicode[$i]];
                }
            }

            if ($YPlacement != $lastYPlacement) {
                $groupBreak = true;
            }

            if ($XshiftBefore) {  // +ve value in PDF moves to the left
                // If Fontstretch is ongoing, need to adjust X adjustments because these will be stretched out.
                $XshiftBefore *= 100 / $last_fontstretch;
                if ($sipset) {
                    $tj .= sprintf('>%d<', (-$XshiftBefore));
                } else {
                    $tj .= sprintf(')%d(', (-$XshiftBefore));
                }
            }

            // Small-Caps
            if ($smcaps) {
                if (isset($this->upperCase[$c])) {
                    $c = $this->upperCase[$c];
                    // $this->CurrentFont['subset'][$this->upperCase[$c]] = $this->upperCase[$c];	// add the CAP to subset
                    $SmallCapsON = true;
                    // For $sipset
                    if (!$lastSmallCapsON) {   // Turn ON SmallCaps
                        $groupBreak = true;
                        $fontstretch = $this->smCapsStretch;
                        $fontsize = $this->FontSizePt * $this->smCapsScale;
                    }
                } else {
                    $SmallCapsON = false;
                    if ($lastSmallCapsON) {  // Turn OFF SmallCaps
                        $groupBreak = true;
                        $fontstretch = 100;
                        $fontsize = $this->FontSizePt;
                    }
                }
            }

            // Prepare Text and Select Font ID
            if ($sipset) {
                // mPDF 6  DELETED ********
                // if ($c == 7 || $c == 8) {
                // if ($original_fontid != $last_fontid) {
                // 	$groupBreak = true;
                // 	$fontid = $original_fontid;
                // }
                // if ($c == 7) { $tj .= $this->aliasNbPgHex; }
                // else { $tj .= $this->aliasNbPgGpHex; }
                // continue;
                // }
                for ($j = 0; $j < 99; $j++) {
                    $init = array_search($c, $this->CurrentFont['subsets'][$j]);
                    if ($init !== false) {
                        if ($this->CurrentFont['subsetfontids'][$j] != $last_fontid) {
                            $groupBreak = true;
                            $fontid = $this->CurrentFont['subsetfontids'][$j];
                        }
                        $tx = sprintf("%02s", strtoupper(dechex($init)));
                        break;
                    } elseif (count($this->CurrentFont['subsets'][$j]) < 255) {
                        $n = count($this->CurrentFont['subsets'][$j]);
                        $this->CurrentFont['subsets'][$j][$n] = $c;
                        if ($this->CurrentFont['subsetfontids'][$j] != $last_fontid) {
                            $groupBreak = true;
                            $fontid = $this->CurrentFont['subsetfontids'][$j];
                        }
                        $tx = sprintf("%02s", strtoupper(dechex($n)));
                        break;
                    } elseif (!isset($this->CurrentFont['subsets'][($j + 1)])) {
                        $this->CurrentFont['subsets'][($j + 1)] = [0 => 0];
                        $this->CurrentFont['subsetfontids'][($j + 1)] = count($this->fonts) + $this->extraFontSubsets + 1;
                        $this->extraFontSubsets++;
                    }
                }
            } else {
                $tx = UtfString::code2utf($c);
                if ($this->usingCoreFont) {
                    $tx = utf8_decode($tx);
                } else {
                    $tx = $this->writer->utf8ToUtf16BigEndian($tx, false);
                }
                $tx = $this->writer->escape($tx);
            }

            // If any settings require a new Text Group
            if ($groupBreak || $fontstretch != $last_fontstretch) {
                if ($sipset) {
                    $tj .= '>] TJ ';
                } else {
                    $tj .= ')] TJ ';
                }
                if ($fontid != $last_fontid || $fontsize != $last_fontsize) {
                    $tj .= sprintf(' /F%d %.3F Tf ', $fontid, $fontsize);
                }
                if ($fontstretch != $last_fontstretch) {
                    $tj .= sprintf('%d Tz ', $fontstretch);
                }
                if ($YPlacement != $lastYPlacement) {
                    $tj .= sprintf('%.3F Ts ', $YPlacement);
                }
                if ($sipset) {
                    $tj .= '[<';
                } else {
                    $tj .= '[(';
                }
            }

            // Output the code for the txt character
            $tj .= $tx;
            $lastSmallCapsON = $SmallCapsON;
            $last_fontid = $fontid;
            $last_fontsize = $fontsize;
            $last_fontstretch = $fontstretch;

            // Kashida
            if ($kashida) {
                $c = 0x0640; // add the Tatweel U+0640
                if (isset($this->CurrentFont['subset'])) {
                    $this->CurrentFont['subset'][$c] = $c;
                }
                $kashida *= 1000 / $this->FontSizePt;
                $tatw = $this->_getCharWidth($this->CurrentFont['cw'], 0x0640);

                // Get YPlacement from next Base character
                $nextbase = $i + 1;
                while ($OTLdata['group'][$nextbase] != 'C') {
                    $nextbase++;
                }
                if (isset($GPOSinfo[$nextbase]) && isset($GPOSinfo[$nextbase]['YPlacement']) && $GPOSinfo[$nextbase]['YPlacement']) {
                    $YPlacement = $GPOSinfo[$nextbase]['YPlacement'] * $this->FontSizePt / $this->CurrentFont['unitsPerEm'];
                }

                // Prepare Text and Select Font ID
                if ($sipset) {
                    for ($j = 0; $j < 99; $j++) {
                        $init = array_search($c, $this->CurrentFont['subsets'][$j]);
                        if ($init !== false) {
                            if ($this->CurrentFont['subsetfontids'][$j] != $last_fontid) {
                                $fontid = $this->CurrentFont['subsetfontids'][$j];
                            }
                            $tx = sprintf("%02s", strtoupper(dechex($init)));
                            break;
                        } elseif (count($this->CurrentFont['subsets'][$j]) < 255) {
                            $n = count($this->CurrentFont['subsets'][$j]);
                            $this->CurrentFont['subsets'][$j][$n] = $c;
                            if ($this->CurrentFont['subsetfontids'][$j] != $last_fontid) {
                                $fontid = $this->CurrentFont['subsetfontids'][$j];
                            }
                            $tx = sprintf("%02s", strtoupper(dechex($n)));
                            break;
                        } elseif (!isset($this->CurrentFont['subsets'][($j + 1)])) {
                            $this->CurrentFont['subsets'][($j + 1)] = [0 => 0];
                            $this->CurrentFont['subsetfontids'][($j + 1)] = count($this->fonts) + $this->extraFontSubsets + 1;
                            $this->extraFontSubsets++;
                        }
                    }
                } else {
                    $tx = UtfString::code2utf($c);
                    $tx = $this->writer->utf8ToUtf16BigEndian($tx, false);
                    $tx = $this->writer->escape($tx);
                }

                if ($kashida > $tatw) {
                    // Insert multiple tatweel characters, repositioning the last one to give correct total length
                    $fontstretch = 100;
                    $nt = intval($kashida / $tatw);
                    $nudgeback = (($nt + 1) * $tatw) - $kashida;
                    $optx = str_repeat($tx, $nt);
                    if ($sipset) {
                        $optx .= sprintf('>%d<', ($nudgeback));
                    } else {
                        $optx .= sprintf(')%d(', ($nudgeback));
                    }
                    $optx .= $tx; // #last
                } else {
                    // Insert single tatweel character and use fontstretch to get correct length
                    $fontstretch = ($kashida / $tatw) * 100;
                    $optx = $tx;
                }

                if ($sipset) {
                    $tj .= '>] TJ ';
                } else {
                    $tj .= ')] TJ ';
                }
                if ($fontid != $last_fontid || $fontsize != $last_fontsize) {
                    $tj .= sprintf(' /F%d %.3F Tf ', $fontid, $fontsize);
                }
                if ($fontstretch != $last_fontstretch) {
                    $tj .= sprintf('%d Tz ', $fontstretch);
                }
                $tj .= sprintf('%.3F Ts ', $YPlacement);
                if ($sipset) {
                    $tj .= '[<';
                } else {
                    $tj .= '[(';
                }

                // Output the code for the txt character(s)
                $tj .= $optx;
                $last_fontid = $fontid;
                $last_fontstretch = $fontstretch;
                $fontstretch = 100;
            }

            $lastYPlacement = $YPlacement;
        }


        // Finish up
        if ($sipset) {
            $tj .= '>';
            if ($XshiftAfter) {
                $tj .= sprintf('%d', (-$XshiftAfter));
            }
            if ($last_fontid != $original_fontid) {
                $tj .= '] TJ ';
                $tj .= sprintf(' /F%d %.3F Tf ', $original_fontid, $fontsize);
                $tj .= '[';
            }
            $tj = preg_replace('/([^\\\])<>/', '\\1 ', $tj);
        } else {
            $tj .= ')';
            if ($XshiftAfter) {
                $tj .= sprintf('%d', (-$XshiftAfter));
            }
            if ($last_fontid != $original_fontid) {
                $tj .= '] TJ ';
                $tj .= sprintf(' /F%d %.3F Tf ', $original_fontid, $fontsize);
                $tj .= '[';
            }
            $tj = preg_replace('/([^\\\])\(\)/', '\\1 ', $tj);
        }

        $s = sprintf(' BT ' . $aix . ' 0 Tc 0 Tw [%s] TJ ET ', $x, $y, $tj);

        // echo $s."\n\n"; // exit;

        return $s;
    }

    function _kern($txt, $mode, $aix, $x, $y)
    {
        if ($mode == 'MBTw') { // Multibyte requiring word spacing
            $space = ' ';
            // Convert string to UTF-16BE without BOM
            $space = $this->writer->utf8ToUtf16BigEndian($space, false);
            $space = $this->writer->escape($space);
            $s = sprintf(' BT ' . $aix, $x * Mpdf::SCALE, ($this->h - $y) * Mpdf::SCALE);
            $t = explode(' ', $txt);
            for ($i = 0; $i < count($t); $i++) {
                $tx = $t[$i];

                $tj = '(';
                $unicode = $this->UTF8StringToArray($tx);
                for ($ti = 0; $ti < count($unicode); $ti++) {
                    if ($ti > 0 && isset($this->CurrentFont['kerninfo'][$unicode[($ti - 1)]][$unicode[$ti]])) {
                        $kern = -$this->CurrentFont['kerninfo'][$unicode[($ti - 1)]][$unicode[$ti]];
                        $tj .= sprintf(')%d(', $kern);
                    }
                    $tc = UtfString::code2utf($unicode[$ti]);
                    $tc = $this->writer->utf8ToUtf16BigEndian($tc, false);
                    $tj .= $this->writer->escape($tc);
                }
                $tj .= ')';
                $s .= sprintf(' %.3F Tc [%s] TJ', $this->charspacing, $tj);


                if (($i + 1) < count($t)) {
                    $s .= sprintf(' %.3F Tc (%s) Tj', $this->ws + $this->charspacing, $space);
                }
            }
            $s .= ' ET ';
        } elseif (!$this->usingCoreFont) {
            $s = '';
            $tj = '(';
            $unicode = $this->UTF8StringToArray($txt);
            for ($i = 0; $i < count($unicode); $i++) {
                if ($i > 0 && isset($this->CurrentFont['kerninfo'][$unicode[($i - 1)]][$unicode[$i]])) {
                    $kern = -$this->CurrentFont['kerninfo'][$unicode[($i - 1)]][$unicode[$i]];
                    $tj .= sprintf(')%d(', $kern);
                }
                $tx = UtfString::code2utf($unicode[$i]);
                $tx = $this->writer->utf8ToUtf16BigEndian($tx, false);
                $tj .= $this->writer->escape($tx);
            }
            $tj .= ')';
            $s .= sprintf(' BT ' . $aix . ' [%s] TJ ET ', $x * Mpdf::SCALE, ($this->h - $y) * Mpdf::SCALE, $tj);
        } else { // CORE Font
            $s = '';
            $tj = '(';
            $l = strlen($txt);
            for ($i = 0; $i < $l; $i++) {
                if ($i > 0 && isset($this->CurrentFont['kerninfo'][$txt[($i - 1)]][$txt[$i]])) {
                    $kern = -$this->CurrentFont['kerninfo'][$txt[($i - 1)]][$txt[$i]];
                    $tj .= sprintf(')%d(', $kern);
                }
                $tj .= $this->writer->escape($txt[$i]);
            }
            $tj .= ')';
            $s .= sprintf(' BT ' . $aix . ' [%s] TJ ET ', $x * Mpdf::SCALE, ($this->h - $y) * Mpdf::SCALE, $tj);
        }

        return $s;
    }

    function MultiCell($w, $h, $txt, $border = 0, $align = '', $fill = 0, $link = '', $directionality = 'ltr', $encoded = false, $OTLdata = false, $maxrows = false)
    {
        // maxrows is called from mpdfform->TEXTAREA
        // Parameter (pre-)encoded - When called internally from form::textarea - mb_encoding already done and OTL - but not reverse RTL
        if (!$encoded) {
            $txt = $this->purify_utf8_text($txt);
            if ($this->text_input_as_HTML) {
                $txt = $this->all_entities_to_utf8($txt);
            }
            if ($this->usingCoreFont) {
                $txt = mb_convert_encoding($txt, $this->mb_enc, 'UTF-8');
            }
            if (preg_match("/([" . $this->pregRTLchars . "])/u", $txt)) {
                $this->biDirectional = true;
            } // *OTL*
            /* -- OTL -- */
            $OTLdata = [];
            // Use OTL OpenType Table Layout - GSUB & GPOS
            if (isset($this->CurrentFont['useOTL']) && $this->CurrentFont['useOTL']) {
                $txt = $this->otl->applyOTL($txt, $this->CurrentFont['useOTL']);
                $OTLdata = $this->otl->OTLdata;
            }
            if ($directionality == 'rtl' || $this->biDirectional) {
                if (!isset($OTLdata)) {
                    $unicode = $this->UTF8StringToArray($txt, false);
                    $is_strong = false;
                    $this->getBasicOTLdata($OTLdata, $unicode, $is_strong);
                }
            }
            /* -- END OTL -- */
        }
        if (!$align) {
            $align = $this->defaultAlign;
        }

        // Output text with automatic or explicit line breaks
        $cw = &$this->CurrentFont['cw'];
        if ($w == 0) {
            $w = $this->w - $this->rMargin - $this->x;
        }

        $wmax = ($w - ($this->cMarginL + $this->cMarginR));
        if ($this->usingCoreFont) {
            $s = str_replace("\r", '', $txt);
            $nb = strlen($s);
            while ($nb > 0 and $s[$nb - 1] == "\n") {
                $nb--;
            }
        } else {
            $s = str_replace("\r", '', $txt);
            $nb = mb_strlen($s, $this->mb_enc);
            while ($nb > 0 and mb_substr($s, $nb - 1, 1, $this->mb_enc) == "\n") {
                $nb--;
            }
        }
        $b = 0;
        if ($border) {
            if ($border == 1) {
                $border = 'LTRB';
                $b = 'LRT';
                $b2 = 'LR';
            } else {
                $b2 = '';
                if (is_int(strpos($border, 'L'))) {
                    $b2 .= 'L';
                }
                if (is_int(strpos($border, 'R'))) {
                    $b2 .= 'R';
                }
                $b = is_int(strpos($border, 'T')) ? $b2 . 'T' : $b2;
            }
        }
        $sep = -1;
        $i = 0;
        $j = 0;
        $l = 0;
        $ns = 0;
        $nl = 1;

        $rows = 0;
        $start_y = $this->y;

        if (!$this->usingCoreFont) {
            $inclCursive = false;
            if (preg_match("/([" . $this->pregCURSchars . "])/u", $s)) {
                $inclCursive = true;
            }
            while ($i < $nb) {
                // Get next character
                $c = mb_substr($s, $i, 1, $this->mb_enc);
                if ($c == "\n") {
                    // Explicit line break
                    // WORD SPACING
                    $this->ResetSpacing();
                    $tmp = rtrim(mb_substr($s, $j, $i - $j, $this->mb_enc));
                    $tmpOTLdata = false;
                    /* -- OTL -- */
                    if (isset($OTLdata)) {
                        $tmpOTLdata = $this->otl->sliceOTLdata($OTLdata, $j, $i - $j);
                        $this->otl->trimOTLdata($tmpOTLdata, false, true);
                        $this->magic_reverse_dir($tmp, $directionality, $tmpOTLdata);
                    }
                    /* -- END OTL -- */
                    $this->Cell($w, $h, $tmp, $b, 2, $align, $fill, $link, 0, 0, 0, 'M', 0, false, $tmpOTLdata);
                    if ($maxrows != false && isset($this->form) && ($this->y - $start_y) / $h > $maxrows) {
                        return false;
                    }
                    $i++;
                    $sep = -1;
                    $j = $i;
                    $l = 0;
                    $ns = 0;
                    $nl++;
                    if ($border and $nl == 2) {
                        $b = $b2;
                    }
                    continue;
                }
                if ($c == " ") {
                    $sep = $i;
                    $ls = $l;
                    $ns++;
                }

                $l += $this->GetCharWidthNonCore($c);

                if ($l > $wmax) {
                    // Automatic line break
                    if ($sep == -1) { // Only one word
                        if ($i == $j) {
                            $i++;
                        }
                        // WORD SPACING
                        $this->ResetSpacing();
                        $tmp = rtrim(mb_substr($s, $j, $i - $j, $this->mb_enc));
                        $tmpOTLdata = false;
                        /* -- OTL -- */
                        if (isset($OTLdata)) {
                            $tmpOTLdata = $this->otl->sliceOTLdata($OTLdata, $j, $i - $j);
                            $this->otl->trimOTLdata($tmpOTLdata, false, true);
                            $this->magic_reverse_dir($tmp, $directionality, $tmpOTLdata);
                        }
                        /* -- END OTL -- */
                        $this->Cell($w, $h, $tmp, $b, 2, $align, $fill, $link, 0, 0, 0, 'M', 0, false, $tmpOTLdata);
                    } else {
                        $tmp = rtrim(mb_substr($s, $j, $sep - $j, $this->mb_enc));
                        $tmpOTLdata = false;
                        /* -- OTL -- */
                        if (isset($OTLdata)) {
                            $tmpOTLdata = $this->otl->sliceOTLdata($OTLdata, $j, $sep - $j);
                            $this->otl->trimOTLdata($tmpOTLdata, false, true);
                        }
                        /* -- END OTL -- */
                        if ($align == 'J') {
                            //////////////////////////////////////////
                            // JUSTIFY J using Unicode fonts (Word spacing doesn't work)
                            // WORD SPACING UNICODE
                            // Change NON_BREAKING SPACE to spaces so they are 'spaced' properly
                            $tmp = str_replace(chr(194) . chr(160), chr(32), $tmp);
                            $len_ligne = $this->GetStringWidth($tmp, false, $tmpOTLdata);
                            $nb_carac = mb_strlen($tmp, $this->mb_enc);
                            $nb_spaces = mb_substr_count($tmp, ' ', $this->mb_enc);
                            // Take off number of Marks
                            // Use GPOS OTL
                            if (isset($this->CurrentFont['useOTL']) && ($this->CurrentFont['useOTL'])) {
                                if (isset($tmpOTLdata['group']) && $tmpOTLdata['group']) {
                                    $nb_carac -= substr_count($tmpOTLdata['group'], 'M');
                                }
                            }

                            [$charspacing, $ws, $kashida] = $this->GetJspacing($nb_carac, $nb_spaces, ((($wmax) - $len_ligne) * Mpdf::SCALE), $inclCursive, $tmpOTLdata);
                            $this->SetSpacing($charspacing, $ws);
                            //////////////////////////////////////////
                        }
                        if (isset($OTLdata)) {
                            $this->magic_reverse_dir($tmp, $directionality, $tmpOTLdata);
                        }
                        $this->Cell($w, $h, $tmp, $b, 2, $align, $fill, $link, 0, 0, 0, 'M', 0, false, $tmpOTLdata);
                        $i = $sep + 1;
                    }
                    if ($maxrows != false && isset($this->form) && ($this->y - $start_y) / $h > $maxrows) {
                        return false;
                    }
                    $sep = -1;
                    $j = $i;
                    $l = 0;
                    $ns = 0;
                    $nl++;
                    if ($border and $nl == 2) {
                        $b = $b2;
                    }
                } else {
                    $i++;
                }
            }
            // Last chunk
            // WORD SPACING

            $this->ResetSpacing();
        } else {
            while ($i < $nb) {
                // Get next character
                $c = $s[$i];
                if ($c == "\n") {
                    // Explicit line break
                    // WORD SPACING
                    $this->ResetSpacing();
                    $this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill, $link);
                    if ($maxrows != false && isset($this->form) && ($this->y - $start_y) / $h > $maxrows) {
                        return false;
                    }
                    $i++;
                    $sep = -1;
                    $j = $i;
                    $l = 0;
                    $ns = 0;
                    $nl++;
                    if ($border and $nl == 2) {
                        $b = $b2;
                    }
                    continue;
                }
                if ($c == " ") {
                    $sep = $i;
                    $ls = $l;
                    $ns++;
                }

                $l += $this->GetCharWidthCore($c);
                if ($l > $wmax) {
                    // Automatic line break
                    if ($sep == -1) {
                        if ($i == $j) {
                            $i++;
                        }
                        // WORD SPACING
                        $this->ResetSpacing();
                        $this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill, $link);
                    } else {
                        if ($align == 'J') {
                            $tmp = rtrim(substr($s, $j, $sep - $j));
                            //////////////////////////////////////////
                            // JUSTIFY J using Unicode fonts (Word spacing doesn't work)
                            // WORD SPACING NON_UNICODE/CJK
                            // Change NON_BREAKING SPACE to spaces so they are 'spaced' properly
                            $tmp = str_replace(chr(160), chr(32), $tmp);
                            $len_ligne = $this->GetStringWidth($tmp);
                            $nb_carac = strlen($tmp);
                            $nb_spaces = substr_count($tmp, ' ');
                            $tmpOTLdata = [];
                            [$charspacing, $ws, $kashida] = $this->GetJspacing($nb_carac, $nb_spaces, ((($wmax) - $len_ligne) * Mpdf::SCALE), false, $tmpOTLdata);
                            $this->SetSpacing($charspacing, $ws);
                            //////////////////////////////////////////
                        }
                        $this->Cell($w, $h, substr($s, $j, $sep - $j), $b, 2, $align, $fill, $link);
                        $i = $sep + 1;
                    }
                    if ($maxrows != false && isset($this->form) && ($this->y - $start_y) / $h > $maxrows) {
                        return false;
                    }
                    $sep = -1;
                    $j = $i;
                    $l = 0;
                    $ns = 0;
                    $nl++;
                    if ($border and $nl == 2) {
                        $b = $b2;
                    }
                } else {
                    $i++;
                }
            }
            // Last chunk
            // WORD SPACING

            $this->ResetSpacing();
        }
        // Last chunk
        if ($border and is_int(strpos($border, 'B'))) {
            $b .= 'B';
        }
        if (!$this->usingCoreFont) {
            $tmp = rtrim(mb_substr($s, $j, $i - $j, $this->mb_enc));
            $tmpOTLdata = false;
            /* -- OTL -- */
            if (isset($OTLdata)) {
                $tmpOTLdata = $this->otl->sliceOTLdata($OTLdata, $j, $i - $j);
                $this->otl->trimOTLdata($tmpOTLdata, false, true);
                $this->magic_reverse_dir($tmp, $directionality, $tmpOTLdata);
            }
            /* -- END OTL -- */
            $this->Cell($w, $h, $tmp, $b, 2, $align, $fill, $link, 0, 0, 0, 'M', 0, false, $tmpOTLdata);
        } else {
            $this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill, $link);
        }
        $this->x = $this->lMargin;
    }

    /* -- DIRECTW -- */

    function Write($h, $txt, $currentx = 0, $link = '', $directionality = 'ltr', $align = '', $fill = 0)
    {
        if (empty($this->directWrite)) {
            $this->directWrite = new DirectWrite($this, $this->otl, $this->sizeConverter, $this->colorConverter);
        }

        $this->directWrite->Write($h, $txt, $currentx, $link, $directionality, $align, $fill);
    }

    /* -- END DIRECTW -- */


    /* -- HTML-CSS -- */

    function saveInlineProperties()
    {
        $saved = [];
        $saved['family'] = $this->FontFamily;
        $saved['style'] = $this->FontStyle;
        $saved['sizePt'] = $this->FontSizePt;
        $saved['size'] = $this->FontSize;
        $saved['HREF'] = $this->HREF;
        $saved['textvar'] = $this->textvar; // mPDF 5.7.1
        $saved['OTLtags'] = $this->OTLtags; // mPDF 5.7.1
        $saved['textshadow'] = $this->textshadow;
        $saved['linewidth'] = $this->LineWidth;
        $saved['drawcolor'] = $this->DrawColor;
        $saved['textparam'] = $this->textparam;
        $saved['lSpacingCSS'] = $this->lSpacingCSS;
        $saved['wSpacingCSS'] = $this->wSpacingCSS;
        $saved['I'] = $this->I;
        $saved['B'] = $this->B;
        $saved['colorarray'] = $this->colorarray;
        $saved['bgcolorarray'] = $this->spanbgcolorarray;
        $saved['border'] = $this->spanborddet;
        $saved['color'] = $this->TextColor;
        $saved['bgcolor'] = $this->FillColor;
        $saved['lang'] = $this->currentLang;
        $saved['fontLanguageOverride'] = $this->fontLanguageOverride; // mPDF 5.7.1
        $saved['display_off'] = $this->inlineDisplayOff;

        return $saved;
    }

    function restoreInlineProperties(&$saved)
    {
        $FontFamily = $saved['family'];
        $this->FontStyle = $saved['style'];
        $this->FontSizePt = $saved['sizePt'];
        $this->FontSize = $saved['size'];

        $this->currentLang = $saved['lang'];
        $this->fontLanguageOverride = $saved['fontLanguageOverride']; // mPDF 5.7.1

        $this->ColorFlag = ($this->FillColor != $this->TextColor); // Restore ColorFlag as well

        $this->HREF = $saved['HREF'];
        $this->textvar = $saved['textvar']; // mPDF 5.7.1
        $this->OTLtags = $saved['OTLtags']; // mPDF 5.7.1
        $this->textshadow = $saved['textshadow'];
        $this->LineWidth = $saved['linewidth'];
        $this->DrawColor = $saved['drawcolor'];
        $this->textparam = $saved['textparam'];
        $this->inlineDisplayOff = $saved['display_off'];

        $this->lSpacingCSS = $saved['lSpacingCSS'];
        if (($this->lSpacingCSS || $this->lSpacingCSS === '0') && strtoupper($this->lSpacingCSS) != 'NORMAL') {
            $this->fixedlSpacing = $this->sizeConverter->convert($this->lSpacingCSS, $this->FontSize);
        } else {
            $this->fixedlSpacing = false;
        }
        $this->wSpacingCSS = $saved['wSpacingCSS'];
        if ($this->wSpacingCSS && strtoupper($this->wSpacingCSS) != 'NORMAL') {
            $this->minwSpacing = $this->sizeConverter->convert($this->wSpacingCSS, $this->FontSize);
        } else {
            $this->minwSpacing = 0;
        }

        $this->SetFont($FontFamily, $saved['style'], $saved['sizePt'], false);

        $this->currentfontstyle = $saved['style'];
        $this->currentfontsize = $saved['sizePt'];
        $this->SetStylesArray(['B' => $saved['B'], 'I' => $saved['I']]); // mPDF 5.7.1

        $this->TextColor = $saved['color'];
        $this->FillColor = $saved['bgcolor'];
        $this->colorarray = $saved['colorarray'];
        $cor = $saved['colorarray'];
        if ($cor) {
            $this->SetTColor($cor);
        }
        $this->spanbgcolorarray = $saved['bgcolorarray'];
        $cor = $saved['bgcolorarray'];
        if ($cor) {
            $this->SetFColor($cor);
        }
        $this->spanborddet = $saved['border'];
    }

    // Used when ColActive for tables - updated to return first block with background fill OR borders
    function GetFirstBlockFill()
    {
        // Returns the first blocklevel that uses a bgcolor fill
        $startfill = 0;
        for ($i = 1; $i <= $this->blklvl; $i++) {
            if ($this->blk[$i]['bgcolor'] || $this->blk[$i]['border_left']['w'] || $this->blk[$i]['border_right']['w'] || $this->blk[$i]['border_top']['w'] || $this->blk[$i]['border_bottom']['w']) {
                $startfill = $i;
                break;
            }
        }
        return $startfill;
    }

    // -------------------------FLOWING BLOCK------------------------------------//
    // The following functions were originally written by Damon Kohler           //
    // --------------------------------------------------------------------------//

    function saveFont()
    {
        $saved = [];
        $saved['family'] = $this->FontFamily;
        $saved['style'] = $this->FontStyle;
        $saved['sizePt'] = $this->FontSizePt;
        $saved['size'] = $this->FontSize;
        $saved['curr'] = &$this->CurrentFont;
        $saved['lang'] = $this->currentLang; // mPDF 6
        $saved['color'] = $this->TextColor;
        $saved['spanbgcolor'] = $this->spanbgcolor;
        $saved['spanbgcolorarray'] = $this->spanbgcolorarray;
        $saved['bord'] = $this->spanborder;
        $saved['border'] = $this->spanborddet;
        $saved['HREF'] = $this->HREF;
        $saved['textvar'] = $this->textvar; // mPDF 5.7.1
        $saved['textshadow'] = $this->textshadow;
        $saved['linewidth'] = $this->LineWidth;
        $saved['drawcolor'] = $this->DrawColor;
        $saved['textparam'] = $this->textparam;
        $saved['ReqFontStyle'] = $this->ReqFontStyle;
        $saved['fixedlSpacing'] = $this->fixedlSpacing;
        $saved['minwSpacing'] = $this->minwSpacing;
        return $saved;
    }

    function restoreFont(&$saved, $write = true)
    {
        if (!isset($saved) || empty($saved)) {
            return;
        }

        $this->FontFamily = $saved['family'];
        $this->FontStyle = $saved['style'];
        $this->FontSizePt = $saved['sizePt'];
        $this->FontSize = $saved['size'];
        $this->CurrentFont = &$saved['curr'];
        $this->currentLang = $saved['lang']; // mPDF 6
        $this->TextColor = $saved['color'];
        $this->spanbgcolor = $saved['spanbgcolor'];
        $this->spanbgcolorarray = $saved['spanbgcolorarray'];
        $this->spanborder = $saved['bord'];
        $this->spanborddet = $saved['border'];
        $this->ColorFlag = ($this->FillColor != $this->TextColor); // Restore ColorFlag as well
        $this->HREF = $saved['HREF'];
        $this->fixedlSpacing = $saved['fixedlSpacing'];
        $this->minwSpacing = $saved['minwSpacing'];
        $this->textvar = $saved['textvar'];  // mPDF 5.7.1
        $this->textshadow = $saved['textshadow'];
        $this->LineWidth = $saved['linewidth'];
        $this->DrawColor = $saved['drawcolor'];
        $this->textparam = $saved['textparam'];
        if ($write) {
            $this->SetFont($saved['family'], $saved['style'], $saved['sizePt'], true, true); // force output
            $fontout = (sprintf('BT /F%d %.3F Tf ET', $this->CurrentFont['i'], $this->FontSizePt));
            if ($this->page > 0 && ((isset($this->pageoutput[$this->page]['Font']) && $this->pageoutput[$this->page]['Font'] != $fontout) || !isset($this->pageoutput[$this->page]['Font']))) {
                $this->writer->write($fontout);
            }
            $this->pageoutput[$this->page]['Font'] = $fontout;
        } else {
            $this->SetFont($saved['family'], $saved['style'], $saved['sizePt'], false);
        }
        $this->ReqFontStyle = $saved['ReqFontStyle'];
    }

    function newFlowingBlock($w, $h, $a = '', $is_table = false, $blockstate = 0, $newblock = true, $blockdir = 'ltr', $table_draft = false)
    {
        if (!$a) {
            if ($blockdir == 'rtl') {
                $a = 'R';
            } else {
                $a = 'L';
            }
        }
        $this->flowingBlockAttr['width'] = ($w * Mpdf::SCALE);
        // line height in user units
        $this->flowingBlockAttr['is_table'] = $is_table;
        $this->flowingBlockAttr['table_draft'] = $table_draft;
        $this->flowingBlockAttr['height'] = $h;
        $this->flowingBlockAttr['lineCount'] = 0;
        $this->flowingBlockAttr['align'] = $a;
        $this->flowingBlockAttr['font'] = [];
        $this->flowingBlockAttr['content'] = [];
        $this->flowingBlockAttr['contentB'] = [];
        $this->flowingBlockAttr['contentWidth'] = 0;
        $this->flowingBlockAttr['blockstate'] = $blockstate;

        $this->flowingBlockAttr['newblock'] = $newblock;
        $this->flowingBlockAttr['valign'] = 'M';
        $this->flowingBlockAttr['blockdir'] = $blockdir;
        $this->flowingBlockAttr['cOTLdata'] = []; // mPDF 5.7.1
        $this->flowingBlockAttr['lastBidiText'] = ''; // mPDF 5.7.1
        if (!empty($this->otl)) {
            $this->otl->lastBidiStrongType = '';
        } // *OTL*
    }

    function finishFlowingBlock($endofblock = false, $next = '')
    {
        $currentx = $this->x;
        // prints out the last chunk
        $is_table = $this->flowingBlockAttr['is_table'];
        $table_draft = $this->flowingBlockAttr['table_draft'];
        $maxWidth = & $this->flowingBlockAttr['width'];
        $stackHeight = & $this->flowingBlockAttr['height'];
        $align = & $this->flowingBlockAttr['align'];
        $content = & $this->flowingBlockAttr['content'];
        $contentB = & $this->flowingBlockAttr['contentB'];
        $font = & $this->flowingBlockAttr['font'];
        $contentWidth = & $this->flowingBlockAttr['contentWidth'];
        $lineCount = & $this->flowingBlockAttr['lineCount'];
        $valign = & $this->flowingBlockAttr['valign'];
        $blockstate = $this->flowingBlockAttr['blockstate'];

        $cOTLdata = & $this->flowingBlockAttr['cOTLdata']; // mPDF 5.7.1
        $newblock = $this->flowingBlockAttr['newblock'];
        $blockdir = $this->flowingBlockAttr['blockdir'];

        // *********** BLOCK BACKGROUND COLOR *****************//
        if ($this->blk[$this->blklvl]['bgcolor'] && !$is_table) {
            $fill = 0;
        } else {
            $this->SetFColor($this->colorConverter->convert(255, $this->PDFAXwarnings));
            $fill = 0;
        }

        $hanger = '';
        // Always right trim!
        // Right trim last content and adjust width if needed to justify (later)
        if (isset($content[count($content) - 1]) && preg_match('/[ ]+$/', $content[count($content) - 1], $m)) {
            $strip = strlen($m[0]);
            $content[count($content) - 1] = substr($content[count($content) - 1], 0, (strlen($content[count($content) - 1]) - $strip));
            /* -- OTL -- */
            if (isset($this->CurrentFont['useOTL']) && $this->CurrentFont['useOTL']) {
                $this->otl->trimOTLdata($cOTLdata[count($cOTLdata) - 1], false, true);
            }
            /* -- END OTL -- */
        }

        // the amount of space taken up so far in user units
        $usedWidth = 0;

        // COLS
        $oldcolumn = $this->CurrCol;

        if ($this->ColActive && !$is_table) {
            $this->breakpoints[$this->CurrCol][] = $this->y;
        } // *COLUMNS*
        // Print out each chunk

        /* -- TABLES -- */
        if ($is_table) {
            $ipaddingL = 0;
            $ipaddingR = 0;
            $paddingL = 0;
            $paddingR = 0;
        } else {
            /* -- END TABLES -- */
            $ipaddingL = $this->blk[$this->blklvl]['padding_left'];
            $ipaddingR = $this->blk[$this->blklvl]['padding_right'];
            $paddingL = ($ipaddingL * Mpdf::SCALE);
            $paddingR = ($ipaddingR * Mpdf::SCALE);
            $this->cMarginL = $this->blk[$this->blklvl]['border_left']['w'];
            $this->cMarginR = $this->blk[$this->blklvl]['border_right']['w'];

            // Added mPDF 3.0 Float DIV
            $fpaddingR = 0;
            $fpaddingL = 0;
            /* -- CSS-FLOAT -- */
            if (count($this->floatDivs)) {
                [$l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width] = $this->GetFloatDivInfo($this->blklvl);
                if ($r_exists) {
                    $fpaddingR = $r_width;
                }
                if ($l_exists) {
                    $fpaddingL = $l_width;
                }
            }
            /* -- END CSS-FLOAT -- */

            $usey = $this->y + 0.002;
            if (($newblock) && ($blockstate == 1 || $blockstate == 3) && ($lineCount == 0)) {
                $usey += $this->blk[$this->blklvl]['margin_top'] + $this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['border_top']['w'];
            }
            /* -- CSS-IMAGE-FLOAT -- */
            // If float exists at this level
            if (isset($this->floatmargins['R']) && $usey <= $this->floatmargins['R']['y1'] && $usey >= $this->floatmargins['R']['y0'] && !$this->floatmargins['R']['skipline']) {
                $fpaddingR += $this->floatmargins['R']['w'];
            }
            if (isset($this->floatmargins['L']) && $usey <= $this->floatmargins['L']['y1'] && $usey >= $this->floatmargins['L']['y0'] && !$this->floatmargins['L']['skipline']) {
                $fpaddingL += $this->floatmargins['L']['w'];
            }
            /* -- END CSS-IMAGE-FLOAT -- */
        } // *TABLES*


        $lineBox = [];

        $this->_setInlineBlockHeights($lineBox, $stackHeight, $content, $font, $is_table);

        if ($is_table && count($content) == 0) {
            $stackHeight = 0;
        }

        if ($table_draft) {
            $this->y += $stackHeight;
            $this->objectbuffer = [];
            return 0;
        }

        // While we're at it, check if contains cursive text
        // Change NBSP to SPACE.
        // Re-calculate contentWidth
        $contentWidth = 0;

        foreach ($content as $k => $chunk) {
            $this->restoreFont($font[$k], false);
            if (!isset($this->objectbuffer[$k]) || (isset($this->objectbuffer[$k]) && !$this->objectbuffer[$k])) {
                // Soft Hyphens chr(173)
                if (!$this->usingCoreFont) {
                    /* -- OTL -- */
                    // mPDF 5.7.1
                    if (isset($this->CurrentFont['useOTL']) && $this->CurrentFont['useOTL']) {
                        $this->otl->removeChar($chunk, $cOTLdata[$k], "\xc2\xad");
                        $this->otl->replaceSpace($chunk, $cOTLdata[$k]);
                        $content[$k] = $chunk;
                    } /* -- END OTL -- */ else {  // *OTL*
                        $content[$k] = $chunk = str_replace("\xc2\xad", '', $chunk);
                        $content[$k] = $chunk = str_replace(chr(194) . chr(160), chr(32), $chunk);
                    } // *OTL*
                } elseif ($this->FontFamily != 'csymbol' && $this->FontFamily != 'czapfdingbats') {
                    $content[$k] = $chunk = str_replace(chr(173), '', $chunk);
                    $content[$k] = $chunk = str_replace(chr(160), chr(32), $chunk);
                }
                $contentWidth += $this->GetStringWidth($chunk, true, (isset($cOTLdata[$k]) ? $cOTLdata[$k] : false), $this->textvar) * Mpdf::SCALE;
            } elseif (isset($this->objectbuffer[$k]) && $this->objectbuffer[$k]) {
                // LIST MARKERS	// mPDF 6  Lists
                if ($this->objectbuffer[$k]['type'] == 'image' && isset($this->objectbuffer[$k]['listmarker']) && $this->objectbuffer[$k]['listmarker'] && $this->objectbuffer[$k]['listmarkerposition'] == 'outside') {
                    // do nothing
                } else {
                    $contentWidth += $this->objectbuffer[$k]['OUTER-WIDTH'] * Mpdf::SCALE;
                }
            }
        }

        if (isset($font[count($font) - 1])) {
            $lastfontreqstyle = (isset($font[count($font) - 1]['ReqFontStyle']) ? $font[count($font) - 1]['ReqFontStyle'] : '');
            $lastfontstyle = (isset($font[count($font) - 1]['style']) ? $font[count($font) - 1]['style'] : '');
        } else {
            $lastfontreqstyle = null;
            $lastfontstyle = null;
        }
        if ($blockdir == 'ltr' && strpos($lastfontreqstyle, "I") !== false && strpos($lastfontstyle, "I") === false) { // Artificial italic
            $lastitalic = $this->FontSize * 0.15 * Mpdf::SCALE;
        } else {
            $lastitalic = 0;
        }

        // Get PAGEBREAK TO TEST for height including the bottom border/padding
        $check_h = max($this->divheight, $stackHeight);

        // This fixes a proven bug...
        if ($endofblock && $newblock && $blockstate == 0 && !$content) {
            $check_h = 0;
        }
        // but ? needs to fix potentially more widespread...
        // if (!$content) {  $check_h = 0; }

        if ($this->blklvl > 0 && !$is_table) {
            if ($endofblock && $blockstate > 1) {
                if ($this->blk[$this->blklvl]['page_break_after_avoid']) {
                    $check_h += $stackHeight;
                }
                $check_h += ($this->blk[$this->blklvl]['padding_bottom'] + $this->blk[$this->blklvl]['border_bottom']['w']);
            }
            if (($newblock && ($blockstate == 1 || $blockstate == 3) && $lineCount == 0) || ($endofblock && $blockstate == 3 && $lineCount == 0)) {
                $check_h += ($this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['margin_top'] + $this->blk[$this->blklvl]['border_top']['w']);
            }
        }

        // Force PAGE break if column height cannot take check-height
        if ($this->ColActive && $check_h > ($this->PageBreakTrigger - $this->y0)) {
            $this->SetCol($this->NbCol - 1);
        }

        // Avoid just border/background-color moved on to next page
        if ($endofblock && $blockstate > 1 && !$content) {
            $buff = $this->margBuffer;
        } else {
            $buff = 0;
        }


        // PAGEBREAK
        if (!$is_table && ($this->y + $check_h) > ($this->PageBreakTrigger + $buff) and ! $this->InFooter and $this->AcceptPageBreak()) {
            $bak_x = $this->x; // Current X position
            // WORD SPACING
            $ws = $this->ws; // Word Spacing
            $charspacing = $this->charspacing; // Character Spacing
            $this->ResetSpacing();

            $this->AddPage($this->CurOrientation);

            $this->x = $bak_x;
            // Added to correct for OddEven Margins
            $currentx += $this->MarginCorrection;
            $this->x += $this->MarginCorrection;

            // WORD SPACING
            $this->SetSpacing($charspacing, $ws);
        }


        /* -- COLUMNS -- */
        // COLS
        // COLUMN CHANGE
        if ($this->CurrCol != $oldcolumn) {
            $currentx += $this->ChangeColumn * ($this->ColWidth + $this->ColGap);
            $this->x += $this->ChangeColumn * ($this->ColWidth + $this->ColGap);
            $oldcolumn = $this->CurrCol;
        }


        if ($this->ColActive && !$is_table) {
            $this->breakpoints[$this->CurrCol][] = $this->y;
        }
        /* -- END COLUMNS -- */

        // TOP MARGIN
        if ($newblock && ($blockstate == 1 || $blockstate == 3) && ($this->blk[$this->blklvl]['margin_top']) && $lineCount == 0 && !$is_table) {
            $this->DivLn($this->blk[$this->blklvl]['margin_top'], $this->blklvl - 1, true, $this->blk[$this->blklvl]['margin_collapse']);
            if ($this->ColActive) {
                $this->breakpoints[$this->CurrCol][] = $this->y;
            } // *COLUMNS*
        }

        if ($newblock && ($blockstate == 1 || $blockstate == 3) && $lineCount == 0 && !$is_table) {
            $this->blk[$this->blklvl]['y0'] = $this->y;
            $this->blk[$this->blklvl]['startpage'] = $this->page;
            if ($this->blk[$this->blklvl]['float']) {
                $this->blk[$this->blklvl]['float_start_y'] = $this->y;
            }
            if ($this->ColActive) {
                $this->breakpoints[$this->CurrCol][] = $this->y;
            } // *COLUMNS*
        }

        // Paragraph INDENT
        $WidthCorrection = 0;
        if (($newblock) && ($blockstate == 1 || $blockstate == 3) && isset($this->blk[$this->blklvl]['text_indent']) && ($lineCount == 0) && (!$is_table) && ($align != 'C')) {
            $ti = $this->sizeConverter->convert($this->blk[$this->blklvl]['text_indent'], $this->blk[$this->blklvl]['inner_width'], $this->blk[$this->blklvl]['InlineProperties']['size'], false);  // mPDF 5.7.4
            $WidthCorrection = ($ti * Mpdf::SCALE);
        }


        // PADDING and BORDER spacing/fill
        if (($newblock) && ($blockstate == 1 || $blockstate == 3) && (($this->blk[$this->blklvl]['padding_top']) || ($this->blk[$this->blklvl]['border_top'])) && ($lineCount == 0) && (!$is_table)) {
            // $state = 0 normal; 1 top; 2 bottom; 3 top and bottom
            $this->DivLn($this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['border_top']['w'], -3, true, false, 1);
            if ($this->ColActive) {
                $this->breakpoints[$this->CurrCol][] = $this->y;
            } // *COLUMNS*
            $this->x = $currentx;
        }


        // Added mPDF 3.0 Float DIV
        $fpaddingR = 0;
        $fpaddingL = 0;
        /* -- CSS-FLOAT -- */
        if (count($this->floatDivs)) {
            [$l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width] = $this->GetFloatDivInfo($this->blklvl);
            if ($r_exists) {
                $fpaddingR = $r_width;
            }
            if ($l_exists) {
                $fpaddingL = $l_width;
            }
        }
        /* -- END CSS-FLOAT -- */

        $usey = $this->y + 0.002;
        if (($newblock) && ($blockstate == 1 || $blockstate == 3) && ($lineCount == 0)) {
            $usey += $this->blk[$this->blklvl]['margin_top'] + $this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['border_top']['w'];
        }
        /* -- CSS-IMAGE-FLOAT -- */
        // If float exists at this level
        if (isset($this->floatmargins['R']) && $usey <= $this->floatmargins['R']['y1'] && $usey >= $this->floatmargins['R']['y0'] && !$this->floatmargins['R']['skipline']) {
            $fpaddingR += $this->floatmargins['R']['w'];
        }
        if (isset($this->floatmargins['L']) && $usey <= $this->floatmargins['L']['y1'] && $usey >= $this->floatmargins['L']['y0'] && !$this->floatmargins['L']['skipline']) {
            $fpaddingL += $this->floatmargins['L']['w'];
        }
        /* -- END CSS-IMAGE-FLOAT -- */


        if ($content) {
            // In FinishFlowing Block no lines are justified as it is always last line
            // but if CJKorphan has allowed content width to go over max width, use J charspacing to compress line
            // JUSTIFICATION J - NOT!
            $nb_carac = 0;
            $nb_spaces = 0;
            $jcharspacing = 0;
            $jkashida = 0;
            $jws = 0;
            $inclCursive = false;
            $dottab = false;
            foreach ($content as $k => $chunk) {
                if (!isset($this->objectbuffer[$k]) || (isset($this->objectbuffer[$k]) && !$this->objectbuffer[$k])) {
                    $nb_carac += mb_strlen($chunk, $this->mb_enc);
                    $nb_spaces += mb_substr_count($chunk, ' ', $this->mb_enc);
                    // mPDF 6
                    // Use GPOS OTL
                    $this->restoreFont($font[$k], false);
                    if (isset($this->CurrentFont['useOTL']) && $this->CurrentFont['useOTL']) {
                        if (isset($cOTLdata[$k]['group']) && $cOTLdata[$k]['group']) {
                            $nb_marks = substr_count($cOTLdata[$k]['group'], 'M');
                            $nb_carac -= $nb_marks;
                        }
                        if (preg_match("/([" . $this->pregCURSchars . "])/u", $chunk)) {
                            $inclCursive = true;
                        }
                    }
                } else {
                    $nb_carac ++;  // mPDF 6 allow spacing for inline object
                    if ($this->objectbuffer[$k]['type'] == 'dottab') {
                        $dottab = $this->objectbuffer[$k]['outdent'];
                    }
                }
            }

            // DIRECTIONALITY RTL
            $chunkorder = range(0, count($content) - 1); // mPDF 6
            /* -- OTL -- */
            // mPDF 6
            if ($blockdir == 'rtl' || $this->biDirectional) {
                $this->otl->bidiReorder($chunkorder, $content, $cOTLdata, $blockdir);
                // From this point on, $content and $cOTLdata may contain more elements (and re-ordered) compared to
                // $this->objectbuffer and $font ($chunkorder contains the mapping)
            }
            /* -- END OTL -- */

            // Remove any XAdvance from OTL data at end of line
            // And correct for XPlacement on last character
            // BIDI is applied
            foreach ($chunkorder as $aord => $k) {
                if (count($cOTLdata)) {
                    $this->restoreFont($font[$k], false);
                    // ...FinishFlowingBlock...
                    if ($aord == count($chunkorder) - 1 && isset($cOTLdata[$aord]['group'])) { // Last chunk on line
                        $nGPOS = strlen($cOTLdata[$aord]['group']) - 1; // Last character
                        if (isset($cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceL']) || isset($cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceR'])) {
                            if (isset($cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceL'])) {
                                $w = $cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceL'] * 1000 / $this->CurrentFont['unitsPerEm'];
                            } else {
                                $w = $cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceR'] * 1000 / $this->CurrentFont['unitsPerEm'];
                            }
                            $w *= ($this->FontSize / 1000);
                            $contentWidth -= $w * Mpdf::SCALE;
                            $cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceL'] = 0;
                            $cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceR'] = 0;
                        }

                        // If last character has an XPlacement set, adjust width calculation, and add to XAdvance to account for it
                        if (isset($cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XPlacement'])) {
                            $w = -$cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XPlacement'] * 1000 / $this->CurrentFont['unitsPerEm'];
                            $w *= ($this->FontSize / 1000);
                            $contentWidth -= $w * Mpdf::SCALE;
                            $cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceL'] = $cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XPlacement'];
                            $cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceR'] = $cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XPlacement'];
                        }
                    }
                }
            }

            // if it's justified, we need to find the char/word spacing (or if orphans have allowed length of line to go over the maxwidth)
            // If "orphans" in fact is just a final space - ignore this
            $lastchar = mb_substr($content[(count($chunkorder) - 1)], mb_strlen($content[(count($chunkorder) - 1)], $this->mb_enc) - 1, 1, $this->mb_enc);
            if (preg_match("/[" . $this->CJKoverflow . "]/u", $lastchar)) {
                $CJKoverflow = true;
            } else {
                $CJKoverflow = false;
            }
            if ((((($contentWidth + $lastitalic) > $maxWidth) && ($content[(count($chunkorder) - 1)] != ' ') ) ||
                    (!$endofblock && $align == 'J' && ($next == 'image' || $next == 'select' || $next == 'input' || $next == 'textarea' || ($next == 'br' && $this->justifyB4br)))) && !($CJKoverflow && $this->allowCJKoverflow)) {
                // WORD SPACING
                [$jcharspacing, $jws, $jkashida] = $this->GetJspacing($nb_carac, $nb_spaces, ($maxWidth - $lastitalic - $contentWidth - $WidthCorrection - (($this->cMarginL + $this->cMarginR) * Mpdf::SCALE) - ($paddingL + $paddingR + (($fpaddingL + $fpaddingR) * Mpdf::SCALE) )), $inclCursive, $cOTLdata);
            } /* -- CJK-FONTS -- */ elseif ($this->checkCJK && $align == 'J' && $CJKoverflow && $this->allowCJKoverflow && $this->CJKforceend) {
                // force-end overhang
                $hanger = mb_substr($content[(count($chunkorder) - 1)], mb_strlen($content[(count($chunkorder) - 1)], $this->mb_enc) - 1, 1, $this->mb_enc);
                if (preg_match("/[" . $this->CJKoverflow . "]/u", $hanger)) {
                    $content[(count($chunkorder) - 1)] = mb_substr($content[(count($chunkorder) - 1)], 0, mb_strlen($content[(count($chunkorder) - 1)], $this->mb_enc) - 1, $this->mb_enc);
                    $this->restoreFont($font[$chunkorder[count($chunkorder) - 1]], false);
                    $contentWidth -= $this->GetStringWidth($hanger) * Mpdf::SCALE;
                    $nb_carac -= 1;
                    [$jcharspacing, $jws, $jkashida] = $this->GetJspacing($nb_carac, $nb_spaces, ($maxWidth - $lastitalic - $contentWidth - $WidthCorrection - (($this->cMarginL + $this->cMarginR) * Mpdf::SCALE) - ($paddingL + $paddingR + (($fpaddingL + $fpaddingR) * Mpdf::SCALE) )), $inclCursive, $cOTLdata);
                }
            } /* -- END CJK-FONTS -- */

            // Check if will fit at word/char spacing of previous line - if so continue it
            // but only allow a maximum of $this->jSmaxWordLast and $this->jSmaxCharLast
            elseif ($contentWidth < ($maxWidth - $lastitalic - $WidthCorrection - (($this->cMarginL + $this->cMarginR) * Mpdf::SCALE) - ($paddingL + $paddingR + (($fpaddingL + $fpaddingR) * Mpdf::SCALE))) && !$this->fixedlSpacing) {
                if ($this->ws > $this->jSmaxWordLast) {
                    $jws = $this->jSmaxWordLast;
                }
                if ($this->charspacing > $this->jSmaxCharLast) {
                    $jcharspacing = $this->jSmaxCharLast;
                }
                $check = $maxWidth - $lastitalic - $WidthCorrection - $contentWidth - (($this->cMarginL + $this->cMarginR) * Mpdf::SCALE) - ($paddingL + $paddingR + (($fpaddingL + $fpaddingR) * Mpdf::SCALE) ) - ( $jcharspacing * $nb_carac) - ( $jws * $nb_spaces);
                if ($check <= 0) {
                    $jcharspacing = 0;
                    $jws = 0;
                }
            }

            $empty = $maxWidth - $lastitalic - $WidthCorrection - $contentWidth - (($this->cMarginL + $this->cMarginR) * Mpdf::SCALE) - ($paddingL + $paddingR + (($fpaddingL + $fpaddingR) * Mpdf::SCALE) );


            $empty -= ($jcharspacing * ($nb_carac - 1)); // mPDF 6 nb_carac MINUS 1
            $empty -= ($jws * $nb_spaces);
            $empty -= ($jkashida);

            $empty /= Mpdf::SCALE;

            if (!$is_table) {
                $this->maxPosR = max($this->maxPosR, ($this->w - $this->rMargin - $this->blk[$this->blklvl]['outer_right_margin'] - $empty));
                $this->maxPosL = min($this->maxPosL, ($this->lMargin + $this->blk[$this->blklvl]['outer_left_margin'] + $empty));
            }

            $arraysize = count($chunkorder);

            $margins = ($this->cMarginL + $this->cMarginR) + ($ipaddingL + $ipaddingR + $fpaddingR + $fpaddingR );

            if (!$is_table) {
                $this->DivLn($stackHeight, $this->blklvl, false);
            } // false -> don't advance y

            $this->x = $currentx + $this->cMarginL + $ipaddingL + $fpaddingL;
            if ($dottab !== false && $blockdir == 'rtl') {
                $this->x -= $dottab;
            } elseif ($align == 'R') {
                $this->x += $empty;
            } elseif ($align == 'J' && $blockdir == 'rtl') {
                $this->x += $empty;
            } elseif ($align == 'C') {
                $this->x += ($empty / 2);
            }

            // Paragraph INDENT
            $WidthCorrection = 0;
            if (($newblock) && ($blockstate == 1 || $blockstate == 3) && isset($this->blk[$this->blklvl]['text_indent']) && ($lineCount == 0) && (!$is_table) && ($align != 'C')) {
                $ti = $this->sizeConverter->convert($this->blk[$this->blklvl]['text_indent'], $this->blk[$this->blklvl]['inner_width'], $this->blk[$this->blklvl]['InlineProperties']['size'], false);  // mPDF 5.7.4
                if ($blockdir != 'rtl') {
                    $this->x += $ti;
                } // mPDF 6
            }

            foreach ($chunkorder as $aord => $k) { // mPDF 5.7
                $chunk = $content[$aord];
                if (isset($this->objectbuffer[$k]) && $this->objectbuffer[$k]) {
                    $xadj = $this->x - $this->objectbuffer[$k]['OUTER-X'];
                    $this->objectbuffer[$k]['OUTER-X'] += $xadj;
                    $this->objectbuffer[$k]['BORDER-X'] += $xadj;
                    $this->objectbuffer[$k]['INNER-X'] += $xadj;

                    if ($this->objectbuffer[$k]['type'] == 'listmarker') {
                        $this->objectbuffer[$k]['lineBox'] = $lineBox[-1]; // Block element details for glyph-origin
                    }
                    $yadj = $this->y - $this->objectbuffer[$k]['OUTER-Y'];
                    if ($this->objectbuffer[$k]['type'] == 'dottab') { // mPDF 6 DOTTAB
                        $this->objectbuffer[$k]['lineBox'] = $lineBox[$k]; // element details for glyph-origin
                    }
                    if ($this->objectbuffer[$k]['type'] != 'dottab') { // mPDF 6 DOTTAB
                        $yadj += $lineBox[$k]['top'];
                    }
                    $this->objectbuffer[$k]['OUTER-Y'] += $yadj;
                    $this->objectbuffer[$k]['BORDER-Y'] += $yadj;
                    $this->objectbuffer[$k]['INNER-Y'] += $yadj;
                }

                $this->restoreFont($font[$k]);  // mPDF 5.7

                if ($is_table && substr($align, 0, 1) == 'D' && $aord == 0) {
                    $dp = $this->decimal_align[substr($align, 0, 2)];
                    $s = preg_split('/' . preg_quote($dp, '/') . '/', $content[0], 2);  // ? needs to be /u if not core
                    $s0 = $this->GetStringWidth($s[0], false);
                    $this->x += ($this->decimal_offset - $s0);
                }

                $this->SetSpacing(($this->fixedlSpacing * Mpdf::SCALE) + $jcharspacing, ($this->fixedlSpacing + $this->minwSpacing) * Mpdf::SCALE + $jws);
                $this->fixedlSpacing = false;
                $this->minwSpacing = 0;

                $save_vis = $this->visibility;
                if (isset($this->textparam['visibility']) && $this->textparam['visibility'] && $this->textparam['visibility'] != $this->visibility) {
                    $this->SetVisibility($this->textparam['visibility']);
                }

                // *********** SPAN BACKGROUND COLOR ***************** //
                if (isset($this->spanbgcolor) && $this->spanbgcolor) {
                    $cor = $this->spanbgcolorarray;
                    $this->SetFColor($cor);
                    $save_fill = $fill;
                    $spanfill = 1;
                    $fill = 1;
                }
                if (!empty($this->spanborddet)) {
                    if (strpos($contentB[$k], 'L') !== false && isset($this->spanborddet['L'])) {
                        $this->x += $this->spanborddet['L']['w'];
                    }
                    if (strpos($contentB[$k], 'L') === false) {
                        $this->spanborddet['L']['s'] = $this->spanborddet['L']['w'] = 0;
                    }
                    if (strpos($contentB[$k], 'R') === false) {
                        $this->spanborddet['R']['s'] = $this->spanborddet['R']['w'] = 0;
                    }
                }
                // WORD SPACING
                // mPDF 5.7.1
                $stringWidth = $this->GetStringWidth($chunk, true, (isset($cOTLdata[$aord]) ? $cOTLdata[$aord] : false), $this->textvar);
                $nch = mb_strlen($chunk, $this->mb_enc);
                // Use GPOS OTL
                if (isset($this->CurrentFont['useOTL']) && $this->CurrentFont['useOTL']) {
                    if (isset($cOTLdata[$aord]['group']) && $cOTLdata[$aord]['group']) {
                        $nch -= substr_count($cOTLdata[$aord]['group'], 'M');
                    }
                }
                $stringWidth += ( $this->charspacing * $nch / Mpdf::SCALE );

                $stringWidth += ( $this->ws * mb_substr_count($chunk, ' ', $this->mb_enc) / Mpdf::SCALE );

                if (isset($this->objectbuffer[$k])) {
                    if ($this->objectbuffer[$k]['type'] == 'dottab') {
                        $this->objectbuffer[$k]['OUTER-WIDTH'] +=$empty;
                        $this->objectbuffer[$k]['OUTER-WIDTH'] +=$this->objectbuffer[$k]['outdent'];
                    }
                    // LIST MARKERS	// mPDF 6  Lists
                    if ($this->objectbuffer[$k]['type'] == 'image' && isset($this->objectbuffer[$k]['listmarker']) && $this->objectbuffer[$k]['listmarker'] && $this->objectbuffer[$k]['listmarkerposition'] == 'outside') {
                        // do nothing
                    } else {
                        $stringWidth = $this->objectbuffer[$k]['OUTER-WIDTH'];
                    }
                }

                if ($stringWidth == 0) {
                    $stringWidth = 0.000001;
                }
                if ($aord == $arraysize - 1) { // mPDF 5.7
                    // mPDF 5.7.1
                    if ($this->checkCJK && $CJKoverflow && $align == 'J' && $this->allowCJKoverflow && $hanger && $this->CJKforceend) {
                        // force-end overhang
                        $this->Cell($stringWidth, $stackHeight, $chunk, '', 0, '', $fill, $this->HREF, $currentx, 0, 0, 'M', $fill, true, (isset($cOTLdata[$aord]) ? $cOTLdata[$aord] : false), $this->textvar, (isset($lineBox[$k]) ? $lineBox[$k] : false));  // mPDF 5.7.1
                        $this->Cell($this->GetStringWidth($hanger), $stackHeight, $hanger, '', 1, '', $fill, $this->HREF, $currentx, 0, 0, 'M', $fill, true, (isset($cOTLdata[$aord]) ? $cOTLdata[$aord] : false), $this->textvar, (isset($lineBox[$k]) ? $lineBox[$k] : false)); // mPDF 5.7.1
                    } else {
                        $this->Cell($stringWidth, $stackHeight, $chunk, '', 1, '', $fill, $this->HREF, $currentx, 0, 0, 'M', $fill, true, (isset($cOTLdata[$aord]) ? $cOTLdata[$aord] : false), $this->textvar, (isset($lineBox[$k]) ? $lineBox[$k] : false)); // mPDF 5.7.1
                    }
                } else {
                    $this->Cell($stringWidth, $stackHeight, $chunk, '', 0, '', $fill, $this->HREF, 0, 0, 0, 'M', $fill, true, (isset($cOTLdata[$aord]) ? $cOTLdata[$aord] : false), $this->textvar, (isset($lineBox[$k]) ? $lineBox[$k] : false)); // first or middle part	// mPDF 5.7.1
                }


                if (!empty($this->spanborddet)) {
                    if (strpos($contentB[$k], 'R') !== false && $aord != $arraysize - 1) {
                        $this->x += $this->spanborddet['R']['w'];
                    }
                }
                // *********** SPAN BACKGROUND COLOR OFF - RESET BLOCK BGCOLOR ***************** //
                if (isset($spanfill) && $spanfill) {
                    $fill = $save_fill;
                    $spanfill = 0;
                    if ($fill) {
                        $this->SetFColor($bcor);
                    }
                }
                if (isset($this->textparam['visibility']) && $this->textparam['visibility'] && $this->visibility != $save_vis) {
                    $this->SetVisibility($save_vis);
                }
            }

            $this->printobjectbuffer($is_table, $blockdir);
            $this->objectbuffer = [];
            $this->ResetSpacing();
        } // END IF CONTENT

        /* -- CSS-IMAGE-FLOAT -- */
        // Update values if set to skipline
        if ($this->floatmargins) {
            $this->_advanceFloatMargins();
        }


        if ($endofblock && $blockstate > 1) {
            // If float exists at this level
            if (isset($this->floatmargins['R']['y1'])) {
                $fry1 = $this->floatmargins['R']['y1'];
            } else {
                $fry1 = 0;
            }
            if (isset($this->floatmargins['L']['y1'])) {
                $fly1 = $this->floatmargins['L']['y1'];
            } else {
                $fly1 = 0;
            }
            if ($this->y < $fry1 || $this->y < $fly1) {
                $drop = max($fry1, $fly1) - $this->y;
                $this->DivLn($drop);
                $this->x = $currentx;
            }
        }
        /* -- END CSS-IMAGE-FLOAT -- */


        // PADDING and BORDER spacing/fill
        if ($endofblock && ($blockstate > 1) && ($this->blk[$this->blklvl]['padding_bottom'] || $this->blk[$this->blklvl]['border_bottom'] || $this->blk[$this->blklvl]['css_set_height']) && (!$is_table)) {
            // If CSS height set, extend bottom - if on same page as block started, and CSS HEIGHT > actual height,
            // and does not force pagebreak
            $extra = 0;
            if (isset($this->blk[$this->blklvl]['css_set_height']) && $this->blk[$this->blklvl]['css_set_height'] && $this->blk[$this->blklvl]['startpage'] == $this->page) {
                // predicted height
                $h1 = ($this->y - $this->blk[$this->blklvl]['y0']) + $this->blk[$this->blklvl]['padding_bottom'] + $this->blk[$this->blklvl]['border_bottom']['w'];
                if ($h1 < ($this->blk[$this->blklvl]['css_set_height'] + $this->blk[$this->blklvl]['padding_bottom'] + $this->blk[$this->blklvl]['padding_top'])) {
                    $extra = ($this->blk[$this->blklvl]['css_set_height'] + $this->blk[$this->blklvl]['padding_bottom'] + $this->blk[$this->blklvl]['padding_top']) - $h1;
                }
                if ($this->y + $this->blk[$this->blklvl]['padding_bottom'] + $this->blk[$this->blklvl]['border_bottom']['w'] + $extra > $this->PageBreakTrigger) {
                    $extra = $this->PageBreakTrigger - ($this->y + $this->blk[$this->blklvl]['padding_bottom'] + $this->blk[$this->blklvl]['border_bottom']['w']);
                }
            }

            // $state = 0 normal; 1 top; 2 bottom; 3 top and bottom
            $this->DivLn($this->blk[$this->blklvl]['padding_bottom'] + $this->blk[$this->blklvl]['border_bottom']['w'] + $extra, -3, true, false, 2);
            $this->x = $currentx;

            if ($this->ColActive) {
                $this->breakpoints[$this->CurrCol][] = $this->y;
            } // *COLUMNS*
        }

        // SET Bottom y1 of block (used for painting borders)
        if (($endofblock) && ($blockstate > 1) && (!$is_table)) {
            $this->blk[$this->blklvl]['y1'] = $this->y;
        }

        // BOTTOM MARGIN
        if (($endofblock) && ($blockstate > 1) && ($this->blk[$this->blklvl]['margin_bottom']) && (!$is_table)) {
            if ($this->y + $this->blk[$this->blklvl]['margin_bottom'] < $this->PageBreakTrigger and ! $this->InFooter) {
                $this->DivLn($this->blk[$this->blklvl]['margin_bottom'], $this->blklvl - 1, true, $this->blk[$this->blklvl]['margin_collapse']);
                if ($this->ColActive) {
                    $this->breakpoints[$this->CurrCol][] = $this->y;
                } // *COLUMNS*
            }
        }

        // Reset lineheight
        $stackHeight = $this->divheight;
    }

    function printobjectbuffer($is_table = false, $blockdir = false)
    {
        if (!$blockdir) {
            $blockdir = $this->directionality;
        }

        if ($is_table && $this->shrin_k > 1) {
            $k = $this->shrin_k;
        } else {
            $k = 1;
        }

        $save_y = $this->y;
        $save_x = $this->x;

        $save_currentfontfamily = $this->FontFamily;
        $save_currentfontsize = $this->FontSizePt;
        $save_currentfontstyle = $this->FontStyle;

        if ($blockdir == 'rtl') {
            $rtlalign = 'R';
        } else {
            $rtlalign = 'L';
        }

        foreach ($this->objectbuffer as $ib => $objattr) {

            if ($objattr['type'] == 'bookmark' || $objattr['type'] == 'indexentry' || $objattr['type'] == 'toc') {
                $x = $objattr['OUTER-X'];
                $y = $objattr['OUTER-Y'];
                $this->y = $y - $this->FontSize / 2;
                $this->x = $x;
                if ($objattr['type'] == 'bookmark') {
                    $this->Bookmark($objattr['CONTENT'], $objattr['bklevel'], $y - $this->FontSize);
                } // *BOOKMARKS*
                if ($objattr['type'] == 'indexentry') {
                    $this->IndexEntry($objattr['CONTENT']);
                } // *INDEX*
                if ($objattr['type'] == 'toc') {
                    $this->TOC_Entry($objattr['CONTENT'], $objattr['toclevel'], (isset($objattr['toc_id']) ? $objattr['toc_id'] : ''));
                } // *TOC*
            } /* -- ANNOTATIONS -- */ elseif ($objattr['type'] == 'annot') {
                if ($objattr['POS-X']) {
                    $x = $objattr['POS-X'];
                } elseif ($this->annotMargin <> 0) {
                    $x = -$objattr['OUTER-X'];
                } else {
                    $x = $objattr['OUTER-X'];
                }
                if ($objattr['POS-Y']) {
                    $y = $objattr['POS-Y'];
                } else {
                    $y = $objattr['OUTER-Y'] - $this->FontSize / 2;
                }
                // Create a dummy entry in the _out/columnBuffer with position sensitive data,
                // linking $y-1 in the Columnbuffer with entry in $this->columnAnnots
                // and when columns are split in length will not break annotation from current line
                $this->y = $y - 1;
                $this->x = $x - 1;
                $this->Line($x - 1, $y - 1, $x - 1, $y - 1);
                $this->Annotation($objattr['CONTENT'], $x, $y, $objattr['ICON'], $objattr['AUTHOR'], $objattr['SUBJECT'], $objattr['OPACITY'], $objattr['COLOR'], (isset($objattr['POPUP']) ? $objattr['POPUP'] : ''), (isset($objattr['FILE']) ? $objattr['FILE'] : ''));
            } /* -- END ANNOTATIONS -- */ else {
                $y = $objattr['OUTER-Y'];
                $x = $objattr['OUTER-X'];
                $w = $objattr['OUTER-WIDTH'];
                $h = $objattr['OUTER-HEIGHT'];
                if (isset($objattr['text'])) {
                    $texto = $objattr['text'];
                }
                $this->y = $y;
                $this->x = $x;
                if (isset($objattr['fontfamily'])) {
                    $this->SetFont($objattr['fontfamily'], '', $objattr['fontsize']);
                }
            }

            // HR
            if ($objattr['type'] == 'hr') {
                $this->SetDColor($objattr['color']);
                switch ($objattr['align']) {
                    case 'C':
                        $empty = $objattr['OUTER-WIDTH'] - $objattr['INNER-WIDTH'];
                        $empty /= 2;
                        $x += $empty;
                        break;
                    case 'R':
                        $empty = $objattr['OUTER-WIDTH'] - $objattr['INNER-WIDTH'];
                        $x += $empty;
                        break;
                }
                $oldlinewidth = $this->LineWidth;
                $this->SetLineWidth($objattr['linewidth'] / $k);
                $this->y += ($objattr['linewidth'] / 2) + $objattr['margin_top'] / $k;
                $this->Line($x, $this->y, $x + $objattr['INNER-WIDTH'], $this->y);
                $this->SetLineWidth($oldlinewidth);
                $this->SetDColor($this->colorConverter->convert(0, $this->PDFAXwarnings));
            }
            // IMAGE
            if ($objattr['type'] == 'image') {
                // mPDF 5.7.3 TRANSFORMS
                if (isset($objattr['transform'])) {
                    $this->writer->write("\n" . '% BTR'); // Begin Transform
                }
                if (isset($objattr['z-index']) && $objattr['z-index'] > 0 && $this->current_layer == 0) {
                    $this->BeginLayer($objattr['z-index']);
                }
                if (isset($objattr['visibility']) && $objattr['visibility'] != 'visible' && $objattr['visibility']) {
                    $this->SetVisibility($objattr['visibility']);
                }
                if (isset($objattr['opacity'])) {
                    $this->SetAlpha($objattr['opacity']);
                }

                $obiw = $objattr['INNER-WIDTH'];
                $obih = $objattr['INNER-HEIGHT'];

                $sx = $objattr['orig_w'] ? ($objattr['INNER-WIDTH'] * Mpdf::SCALE / $objattr['orig_w']) : INF;
                $sy = $objattr['orig_h'] ? ($objattr['INNER-HEIGHT'] * Mpdf::SCALE / $objattr['orig_h']) : INF;

                $rotate = 0;
                if (isset($objattr['ROTATE'])) {
                    $rotate = $objattr['ROTATE'];
                }

                if ($rotate == 90) {
                    // Clockwise
                    $obiw = $objattr['INNER-HEIGHT'];
                    $obih = $objattr['INNER-WIDTH'];
                    $tr = $this->transformTranslate(0, -$objattr['INNER-WIDTH'], true);
                    $tr .= ' ' . $this->transformRotate(90, $objattr['INNER-X'], ($objattr['INNER-Y'] + $objattr['INNER-WIDTH']), true);
                    $sx = $obiw * Mpdf::SCALE / $objattr['orig_h'];
                    $sy = $obih * Mpdf::SCALE / $objattr['orig_w'];
                } elseif ($rotate == -90 || $rotate == 270) {
                    // AntiClockwise
                    $obiw = $objattr['INNER-HEIGHT'];
                    $obih = $objattr['INNER-WIDTH'];
                    $tr = $this->transformTranslate($objattr['INNER-WIDTH'], ($objattr['INNER-HEIGHT'] - $objattr['INNER-WIDTH']), true);
                    $tr .= ' ' . $this->transformRotate(-90, $objattr['INNER-X'], ($objattr['INNER-Y'] + $objattr['INNER-WIDTH']), true);
                    $sx = $obiw * Mpdf::SCALE / $objattr['orig_h'];
                    $sy = $obih * Mpdf::SCALE / $objattr['orig_w'];
                } elseif ($rotate == 180) {
                    // Mirror
                    $tr = $this->transformTranslate($objattr['INNER-WIDTH'], -$objattr['INNER-HEIGHT'], true);
                    $tr .= ' ' . $this->transformRotate(180, $objattr['INNER-X'], ($objattr['INNER-Y'] + $objattr['INNER-HEIGHT']), true);
                } else {
                    $tr = '';
                }
                $tr = trim($tr);
                if ($tr) {
                    $tr .= ' ';
                }
                $gradmask = '';

                // mPDF 5.7.3 TRANSFORMS
                $tr2 = '';
                if (isset($objattr['transform'])) {
                    $maxsize_x = $w;
                    $maxsize_y = $h;
                    $cx = $x + $w / 2;
                    $cy = $y + $h / 2;
                    preg_match_all('/(translatex|translatey|translate|scalex|scaley|scale|rotate|skewX|skewY|skew)\((.*?)\)/is', $objattr['transform'], $m);
                    if (count($m[0])) {
                        for ($i = 0; $i < count($m[0]); $i++) {
                            $c = strtolower($m[1][$i]);
                            $v = trim($m[2][$i]);
                            $vv = preg_split('/[ ,]+/', $v);
                            if ($c == 'translate' && count($vv)) {
                                $translate_x = $this->sizeConverter->convert($vv[0], $maxsize_x, false, false);
                                if (count($vv) == 2) {
                                    $translate_y = $this->sizeConverter->convert($vv[1], $maxsize_y, false, false);
                                } else {
                                    $translate_y = 0;
                                }
                                $tr2 .= $this->transformTranslate($translate_x, $translate_y, true) . ' ';
                            } elseif ($c == 'translatex' && count($vv)) {
                                $translate_x = $this->sizeConverter->convert($vv[0], $maxsize_x, false, false);
                                $tr2 .= $this->transformTranslate($translate_x, 0, true) . ' ';
                            } elseif ($c == 'translatey' && count($vv)) {
                                $translate_y = $this->sizeConverter->convert($vv[1], $maxsize_y, false, false);
                                $tr2 .= $this->transformTranslate(0, $translate_y, true) . ' ';
                            } elseif ($c == 'scale' && count($vv)) {
                                $scale_x = $vv[0] * 100;
                                if (count($vv) == 2) {
                                    $scale_y = $vv[1] * 100;
                                } else {
                                    $scale_y = $scale_x;
                                }
                                $tr2 .= $this->transformScale($scale_x, $scale_y, $cx, $cy, true) . ' ';
                            } elseif ($c == 'scalex' && count($vv)) {
                                $scale_x = $vv[0] * 100;
                                $tr2 .= $this->transformScale($scale_x, 0, $cx, $cy, true) . ' ';
                            } elseif ($c == 'scaley' && count($vv)) {
                                $scale_y = $vv[1] * 100;
                                $tr2 .= $this->transformScale(0, $scale_y, $cx, $cy, true) . ' ';
                            } elseif ($c == 'skew' && count($vv)) {
                                $angle_x = $this->ConvertAngle($vv[0], false);
                                if (count($vv) == 2) {
                                    $angle_y = $this->ConvertAngle($vv[1], false);
                                } else {
                                    $angle_y = 0;
                                }
                                $tr2 .= $this->transformSkew($angle_x, $angle_y, $cx, $cy, true) . ' ';
                            } elseif ($c == 'skewx' && count($vv)) {
                                $angle = $this->ConvertAngle($vv[0], false);
                                $tr2 .= $this->transformSkew($angle, 0, $cx, $cy, true) . ' ';
                            } elseif ($c == 'skewy' && count($vv)) {
                                $angle = $this->ConvertAngle($vv[0], false);
                                $tr2 .= $this->transformSkew(0, $angle, $cx, $cy, true) . ' ';
                            } elseif ($c == 'rotate' && count($vv)) {
                                $angle = $this->ConvertAngle($vv[0]);
                                $tr2 .= $this->transformRotate($angle, $cx, $cy, true) . ' ';
                            }
                        }
                    }
                }

                // LIST MARKERS (Images)	// mPDF 6  Lists
                if (isset($objattr['listmarker']) && $objattr['listmarker'] && $objattr['listmarkerposition'] == 'outside') {
                    $mw = $objattr['OUTER-WIDTH'];
                    // NB If change marker-offset, also need to alter in function _getListMarkerWidth
                    $adjx = $this->sizeConverter->convert($this->list_marker_offset, $this->FontSize);
                    if ($objattr['dir'] == 'rtl') {
                        $objattr['INNER-X'] += $adjx;
                    } else {
                        $objattr['INNER-X'] -= $adjx;
                        $objattr['INNER-X'] -= $mw;
                    }
                }
                // mPDF 5.7.3 TRANSFORMS / BACKGROUND COLOR
                // Transform also affects image background
                if ($tr2) {
                    $this->writer->write('q ' . $tr2 . ' ');
                }
                if (isset($objattr['bgcolor']) && $objattr['bgcolor']) {
                    $bgcol = $objattr['bgcolor'];
                    $this->SetFColor($bgcol);
                    $this->Rect($x, $y, $w, $h, 'F');
                    $this->SetFColor($this->colorConverter->convert(255, $this->PDFAXwarnings));
                }
                if ($tr2) {
                    $this->writer->write('Q');
                }

                /* -- BACKGROUNDS -- */
                if (isset($objattr['GRADIENT-MASK'])) {
                    $g = $this->gradient->parseMozGradient($objattr['GRADIENT-MASK']);
                    if ($g) {
                        $dummy = $this->gradient->Gradient($objattr['INNER-X'], $objattr['INNER-Y'], $obiw, $obih, $g['type'], $g['stops'], $g['colorspace'], $g['coords'], $g['extend'], true, true);
                        $gradmask = '/TGS' . count($this->gradients) . ' gs ';
                    }
                }
                /* -- END BACKGROUNDS -- */
                /* -- IMAGES-WMF -- */
                if (isset($objattr['itype']) && $objattr['itype'] == 'wmf') {
                    $outstring = sprintf('q ' . $tr . $tr2 . '%.3F 0 0 %.3F %.3F %.3F cm /FO%d Do Q', $sx, -$sy, $objattr['INNER-X'] * Mpdf::SCALE - $sx * $objattr['wmf_x'], (($this->h - $objattr['INNER-Y']) * Mpdf::SCALE) + $sy * $objattr['wmf_y'], $objattr['ID']); // mPDF 5.7.3 TRANSFORMS
                } else { 				/* -- END IMAGES-WMF -- */
                    if (isset($objattr['itype']) && $objattr['itype'] == 'svg') {
                        $outstring = sprintf('q ' . $tr . $tr2 . '%.3F 0 0 %.3F %.3F %.3F cm /FO%d Do Q', $sx, -$sy, $objattr['INNER-X'] * Mpdf::SCALE - $sx * $objattr['wmf_x'], (($this->h - $objattr['INNER-Y']) * Mpdf::SCALE) + $sy * $objattr['wmf_y'], $objattr['ID']); // mPDF 5.7.3 TRANSFORMS
                    } else {
                        $outstring = sprintf("q " . $tr . $tr2 . "%.3F 0 0 %.3F %.3F %.3F cm " . $gradmask . "/I%d Do Q", $obiw * Mpdf::SCALE, $obih * Mpdf::SCALE, $objattr['INNER-X'] * Mpdf::SCALE, ($this->h - ($objattr['INNER-Y'] + $obih )) * Mpdf::SCALE, $objattr['ID']); // mPDF 5.7.3 TRANSFORMS
                    }
                }
                $this->writer->write($outstring);
                // LINK
                if (isset($objattr['link'])) {
                    $this->Link($objattr['INNER-X'], $objattr['INNER-Y'], $objattr['INNER-WIDTH'], $objattr['INNER-HEIGHT'], $objattr['link']);
                }
                if (isset($objattr['opacity'])) {
                    $this->SetAlpha(1);
                }

                // mPDF 5.7.3 TRANSFORMS
                // Transform also affects image borders
                if ($tr2) {
                    $this->writer->write('q ' . $tr2 . ' ');
                }
                if ((isset($objattr['border_top']) && $objattr['border_top'] > 0) || (isset($objattr['border_left']) && $objattr['border_left'] > 0) || (isset($objattr['border_right']) && $objattr['border_right'] > 0) || (isset($objattr['border_bottom']) && $objattr['border_bottom'] > 0)) {
                    $this->PaintImgBorder($objattr, $is_table);
                }
                if ($tr2) {
                    $this->writer->write('Q');
                }

                if (isset($objattr['visibility']) && $objattr['visibility'] != 'visible' && $objattr['visibility']) {
                    $this->SetVisibility('visible');
                }
                if (isset($objattr['z-index']) && $objattr['z-index'] > 0 && $this->current_layer == 0) {
                    $this->EndLayer();
                }
                // mPDF 5.7.3 TRANSFORMS
                if (isset($objattr['transform'])) {
                    $this->writer->write("\n" . '% ETR'); // End Transform
                }
            }

            if ($objattr['type'] === 'barcode') {

                $bgcol = $this->colorConverter->convert(255, $this->PDFAXwarnings);

                if (isset($objattr['bgcolor']) && $objattr['bgcolor']) {
                    $bgcol = $objattr['bgcolor'];
                }

                $col = $this->colorConverter->convert(0, $this->PDFAXwarnings);

                if (isset($objattr['color']) && $objattr['color']) {
                    $col = $objattr['color'];
                }

                $this->SetFColor($bgcol);
                $this->Rect($objattr['BORDER-X'], $objattr['BORDER-Y'], $objattr['BORDER-WIDTH'], $objattr['BORDER-HEIGHT'], 'F');
                $this->SetFColor($this->colorConverter->convert(255, $this->PDFAXwarnings));

                if (isset($objattr['BORDER-WIDTH'])) {
                    $this->PaintImgBorder($objattr, $is_table);
                }

                $barcodeTypes = ['EAN13', 'ISBN', 'ISSN', 'UPCA', 'UPCE', 'EAN8'];
                if (in_array($objattr['btype'], $barcodeTypes, true)) {

                    $this->WriteBarcode(
                        $objattr['code'],
                        $objattr['showtext'],
                        $objattr['INNER-X'],
                        $objattr['INNER-Y'],
                        $objattr['bsize'],
                        0,
                        0,
                        0,
                        0,
                        0,
                        $objattr['bheight'],
                        $bgcol,
                        $col,
                        $objattr['btype'],
                        $objattr['bsupp'],
                        (isset($objattr['bsupp_code']) ? $objattr['bsupp_code'] : ''),
                        $k
                    );

                } elseif ($objattr['btype'] === 'QR') {

                    if (!class_exists('Mpdf\QrCode\QrCode')) {
                        throw new \Mpdf\MpdfException('Class Mpdf\QrCode\QrCode does not exists. Install the package from Packagist with "composer require mpdf/qrcode"');
                    }

                    $barcodeContent = str_replace('\r\n', "\r\n", $objattr['code']);
                    $barcodeContent = str_replace('\n', "\n", $barcodeContent);

                    $qrcode = new QrCode\QrCode($barcodeContent, $objattr['errorlevel']);
                    if ($objattr['disableborder']) {
                        $qrcode->disableBorder();
                    }

                    $bgColor = [255, 255, 255];
                    if ($objattr['bgcolor']) {
                        $bgColor = array_map(
                            function ($col) {
                                return intval(255 * floatval($col));
                            },
                            explode(" ", $this->SetColor($objattr['bgcolor'], 'CodeOnly'))
                        );
                    }
                    $color = [0, 0, 0];
                    if ($objattr['color']) {
                        $color = array_map(
                            function ($col) {
                                return intval(255 * floatval($col));
                            },
                            explode(" ", $this->SetColor($objattr['color'], 'CodeOnly'))
                        );
                    }

                    $out = new QrCode\Output\Mpdf();
                    $out->output(
                        $qrcode,
                        $this,
                        $objattr['INNER-X'],
                        $objattr['INNER-Y'],
                        $objattr['bsize'] * 25,
                        $bgColor,
                        $color
                    );

                    unset($qrcode);

                } else {

                    $this->WriteBarcode2(
                        $objattr['code'],
                        $objattr['INNER-X'],
                        $objattr['INNER-Y'],
                        $objattr['bsize'],
                        $objattr['bheight'],
                        $bgcol,
                        $col,
                        $objattr['btype'],
                        $objattr['pr_ratio'],
                        $k
                    );

                }
            }

            // TEXT CIRCLE
            if ($objattr['type'] == 'textcircle') {
                $bgcol = '';
                if (isset($objattr['bgcolor']) && $objattr['bgcolor']) {
                    $bgcol = $objattr['bgcolor'];
                }
                $col = $this->colorConverter->convert(0, $this->PDFAXwarnings);
                if (isset($objattr['color']) && $objattr['color']) {
                    $col = $objattr['color'];
                }
                $this->SetTColor($col);
                $this->SetFColor($bgcol);
                if ($bgcol) {
                    $this->Rect($objattr['BORDER-X'], $objattr['BORDER-Y'], $objattr['BORDER-WIDTH'], $objattr['BORDER-HEIGHT'], 'F');
                }
                $this->SetFColor($this->colorConverter->convert(255, $this->PDFAXwarnings));
                if (isset($objattr['BORDER-WIDTH'])) {
                    $this->PaintImgBorder($objattr, $is_table);
                }
                if (empty($this->directWrite)) {
                    $this->directWrite = new DirectWrite($this, $this->otl, $this->sizeConverter, $this->colorConverter);
                }
                if (isset($objattr['top-text'])) {
                    $this->directWrite->CircularText($objattr['INNER-X'] + $objattr['INNER-WIDTH'] / 2, $objattr['INNER-Y'] + $objattr['INNER-HEIGHT'] / 2, $objattr['r'] / $k, $objattr['top-text'], 'top', $objattr['fontfamily'], $objattr['fontsize'] / $k, $objattr['fontstyle'], $objattr['space-width'], $objattr['char-width'], (isset($objattr['divider']) ? $objattr['divider'] : ''));
                }
                if (isset($objattr['bottom-text'])) {
                    $this->directWrite->CircularText($objattr['INNER-X'] + $objattr['INNER-WIDTH'] / 2, $objattr['INNER-Y'] + $objattr['INNER-HEIGHT'] / 2, $objattr['r'] / $k, $objattr['bottom-text'], 'bottom', $objattr['fontfamily'], $objattr['fontsize'] / $k, $objattr['fontstyle'], $objattr['space-width'], $objattr['char-width'], (isset($objattr['divider']) ? $objattr['divider'] : ''));
                }
            }

            $this->ResetSpacing();

            // LIST MARKERS (Text or bullets)	// mPDF 6  Lists
            if ($objattr['type'] == 'listmarker') {
                if (isset($objattr['fontfamily'])) {
                    $this->SetFont($objattr['fontfamily'], $objattr['fontstyle'], $objattr['fontsizept']);
                }
                $col = $this->colorConverter->convert(0, $this->PDFAXwarnings);
                if (isset($objattr['colorarray']) && ($objattr['colorarray'])) {
                    $col = $objattr['colorarray'];
                }

                if (isset($objattr['bullet']) && $objattr['bullet']) { // Used for position "outside" only
                    $type = $objattr['bullet'];
                    $size = $objattr['size'];

                    if ($objattr['listmarkerposition'] == 'inside') {
                        $adjx = $size / 2;
                        if ($objattr['dir'] == 'rtl') {
                            $adjx += $objattr['offset'];
                        }
                        $this->x += $adjx;
                    } else {
                        $adjx = $objattr['offset'];
                        $adjx += $size / 2;
                        if ($objattr['dir'] == 'rtl') {
                            $this->x += $adjx;
                        } else {
                            $this->x -= $adjx;
                        }
                    }

                    $yadj = $objattr['lineBox']['glyphYorigin'];
                    if (isset($this->CurrentFont['desc']['XHeight']) && $this->CurrentFont['desc']['XHeight']) {
                        $xh = $this->CurrentFont['desc']['XHeight'];
                    } else {
                        $xh = 500;
                    }
                    $yadj -= ($this->FontSize * $xh / 1000) * 0.625; // Vertical height of bullet (centre) from baseline= XHeight * 0.625
                    $this->y += $yadj;

                    $this->_printListBullet($this->x, $this->y, $size, $type, $col);
                } else {
                    $this->SetTColor($col);
                    $w = $this->GetStringWidth($texto);
                    // NB If change marker-offset, also need to alter in function _getListMarkerWidth
                    $adjx = $this->sizeConverter->convert($this->list_marker_offset, $this->FontSize);
                    if ($objattr['dir'] == 'rtl') {
                        $align = 'L';
                        $this->x += $adjx;
                    } else {
                        // Use these lines to set as marker-offset, right-aligned - default
                        $align = 'R';
                        $this->x -= $adjx;
                        $this->x -= $w;
                    }
                    $this->Cell($w, $this->FontSize, $texto, 0, 0, $align, 0, '', 0, 0, 0, 'T', 0, false, false, 0, $objattr['lineBox']);
                    $this->SetTColor($this->colorConverter->convert(0, $this->PDFAXwarnings));
                }
            }

            // DOT-TAB
            if ($objattr['type'] == 'dottab') {
                if (isset($objattr['fontfamily'])) {
                    $this->SetFont($objattr['fontfamily'], '', $objattr['fontsize']);
                }
                $sp = $this->GetStringWidth(' ');
                $nb = floor(($w - 2 * $sp) / $this->GetStringWidth('.'));
                if ($nb > 0) {
                    $dots = ' ' . str_repeat('.', $nb) . ' ';
                } else {
                    $dots = ' ';
                }
                $col = $this->colorConverter->convert(0, $this->PDFAXwarnings);
                if (isset($objattr['colorarray']) && ($objattr['colorarray'])) {
                    $col = $objattr['colorarray'];
                }
                $this->SetTColor($col);
                $save_dh = $this->divheight;
                $save_sbd = $this->spanborddet;
                $save_textvar = $this->textvar; // mPDF 5.7.1
                $this->spanborddet = '';
                $this->divheight = 0;
                $this->textvar = 0x00; // mPDF 5.7.1

                $this->Cell($w, $h, $dots, 0, 0, 'C', 0, '', 0, 0, 0, 'T', 0, false, false, 0, $objattr['lineBox']); // mPDF 6 DOTTAB
                $this->spanborddet = $save_sbd;
                $this->textvar = $save_textvar; // mPDF 5.7.1
                $this->divheight = $save_dh;
                $this->SetTColor($this->colorConverter->convert(0, $this->PDFAXwarnings));
            }

            /* -- FORMS -- */
            // TEXT/PASSWORD INPUT
            if ($objattr['type'] == 'input' && ($objattr['subtype'] == 'TEXT' || $objattr['subtype'] == 'PASSWORD')) {
                $this->form->print_ob_text($objattr, $w, $h, $texto, $rtlalign, $k, $blockdir);
            }

            // TEXTAREA
            if ($objattr['type'] == 'textarea') {
                $this->form->print_ob_textarea($objattr, $w, $h, $texto, $rtlalign, $k, $blockdir);
            }

            // SELECT
            if ($objattr['type'] == 'select') {
                $this->form->print_ob_select($objattr, $w, $h, $texto, $rtlalign, $k, $blockdir);
            }


            // INPUT/BUTTON as IMAGE
            if ($objattr['type'] == 'input' && $objattr['subtype'] == 'IMAGE') {
                $this->form->print_ob_imageinput($objattr, $w, $h, $texto, $rtlalign, $k, $blockdir, $is_table);
            }

            // BUTTON
            if ($objattr['type'] == 'input' && ($objattr['subtype'] == 'SUBMIT' || $objattr['subtype'] == 'RESET' || $objattr['subtype'] == 'BUTTON')) {
                $this->form->print_ob_button($objattr, $w, $h, $texto, $rtlalign, $k, $blockdir);
            }

            // CHECKBOX
            if ($objattr['type'] == 'input' && ($objattr['subtype'] == 'CHECKBOX')) {
                $this->form->print_ob_checkbox($objattr, $w, $h, $texto, $rtlalign, $k, $blockdir, $x, $y);
            }
            // RADIO
            if ($objattr['type'] == 'input' && ($objattr['subtype'] == 'RADIO')) {
                $this->form->print_ob_radio($objattr, $w, $h, $texto, $rtlalign, $k, $blockdir, $x, $y);
            }
            /* -- END FORMS -- */
        }

        $this->SetFont($save_currentfontfamily, $save_currentfontstyle, $save_currentfontsize);

        $this->y = $save_y;
        $this->x = $save_x;

        unset($content);
    }

    function _printListBullet($x, $y, $size, $type, $color)
    {
        // x and y are the centre of the bullet; size is the width and/or height in mm
        $fcol = $this->SetTColor($color, true);
        $lcol = strtoupper($fcol); // change 0 0 0 rg to 0 0 0 RG
        $this->writer->write(sprintf('q %s %s', $lcol, $fcol));
        $this->writer->write('0 j 0 J [] 0 d');
        if ($type == 'square') {
            $size *= 0.85; // Smaller to appear the same size as circle/disc
            $this->writer->write(sprintf('%.3F %.3F %.3F %.3F re f', ($x - $size / 2) * Mpdf::SCALE, ($this->h - $y + $size / 2) * Mpdf::SCALE, ($size) * Mpdf::SCALE, (-$size) * Mpdf::SCALE));
        } elseif ($type == 'disc') {
            $this->Circle($x, $y, $size / 2, 'F'); // Fill
        } elseif ($type == 'circle') {
            $lw = $size / 12; // Line width
            $this->writer->write(sprintf('%.3F w ', $lw * Mpdf::SCALE));
            $this->Circle($x, $y, $size / 2 - $lw / 2, 'S'); // Stroke
        }
        $this->writer->write('Q');
    }

    // mPDF 6
    // Get previous character and move pointers
    function _moveToPrevChar(&$contentctr, &$charctr, $content)
    {
        $lastchar = false;
        $charctr--;
        while ($charctr < 0) { // go back to previous $content[]
            $contentctr--;
            if ($contentctr < 0) {
                return false;
            }
            if ($this->usingCoreFont) {
                $charctr = strlen($content[$contentctr]) - 1;
            } else {
                $charctr = mb_strlen($content[$contentctr], $this->mb_enc) - 1;
            }
        }
        if ($this->usingCoreFont) {
            $lastchar = $content[$contentctr][$charctr];
        } else {
            $lastchar = mb_substr($content[$contentctr], $charctr, 1, $this->mb_enc);
        }
        return $lastchar;
    }

    // Get previous character
    function _getPrevChar($contentctr, $charctr, $content)
    {
        $lastchar = false;
        $charctr--;
        while ($charctr < 0) { // go back to previous $content[]
            $contentctr--;
            if ($contentctr < 0) {
                return false;
            }
            if ($this->usingCoreFont) {
                $charctr = strlen($content[$contentctr]) - 1;
            } else {
                $charctr = mb_strlen($content[$contentctr], $this->mb_enc) - 1;
            }
        }
        if ($this->usingCoreFont) {
            $lastchar = $content[$contentctr][$charctr];
        } else {
            $lastchar = mb_substr($content[$contentctr], $charctr, 1, $this->mb_enc);
        }
        return $lastchar;
    }

    function WriteFlowingBlock($s, $sOTLdata)
    {
        // mPDF 5.7.1
        $currentx = $this->x;
        $is_table = $this->flowingBlockAttr['is_table'];
        $table_draft = $this->flowingBlockAttr['table_draft'];
        // width of all the content so far in points
        $contentWidth = & $this->flowingBlockAttr['contentWidth'];
        // cell width in points
        $maxWidth = & $this->flowingBlockAttr['width'];
        $lineCount = & $this->flowingBlockAttr['lineCount'];
        // line height in user units
        $stackHeight = & $this->flowingBlockAttr['height'];
        $align = & $this->flowingBlockAttr['align'];
        $content = & $this->flowingBlockAttr['content'];
        $contentB = & $this->flowingBlockAttr['contentB'];
        $font = & $this->flowingBlockAttr['font'];
        $valign = & $this->flowingBlockAttr['valign'];
        $blockstate = $this->flowingBlockAttr['blockstate'];
        $cOTLdata = & $this->flowingBlockAttr['cOTLdata']; // mPDF 5.7.1

        $newblock = $this->flowingBlockAttr['newblock'];
        $blockdir = $this->flowingBlockAttr['blockdir'];

        // *********** BLOCK BACKGROUND COLOR ***************** //
        if ($this->blk[$this->blklvl]['bgcolor'] && !$is_table) {
            $fill = 0;
        } else {
            $this->SetFColor($this->colorConverter->convert(255, $this->PDFAXwarnings));
            $fill = 0;
        }
        $font[] = $this->saveFont();
        $content[] = '';
        $contentB[] = '';
        $cOTLdata[] = $sOTLdata; // mPDF 5.7.1
        $currContent = & $content[count($content) - 1];

        $CJKoverflow = false;
        $Oikomi = false; // mPDF 6
        $hanger = '';

        // COLS
        $oldcolumn = $this->CurrCol;
        if ($this->ColActive && !$is_table) {
            $this->breakpoints[$this->CurrCol][] = $this->y;
        } // *COLUMNS*

        /* -- TABLES -- */
        if ($is_table) {
            $ipaddingL = 0;
            $ipaddingR = 0;
            $paddingL = 0;
            $paddingR = 0;
            $cpaddingadjustL = 0;
            $cpaddingadjustR = 0;
            // Added mPDF 3.0
            $fpaddingR = 0;
            $fpaddingL = 0;
        } else {
            /* -- END TABLES -- */
            $ipaddingL = $this->blk[$this->blklvl]['padding_left'];
            $ipaddingR = $this->blk[$this->blklvl]['padding_right'];
            $paddingL = ($ipaddingL * Mpdf::SCALE);
            $paddingR = ($ipaddingR * Mpdf::SCALE);
            $this->cMarginL = $this->blk[$this->blklvl]['border_left']['w'];
            $cpaddingadjustL = -$this->cMarginL;
            $this->cMarginR = $this->blk[$this->blklvl]['border_right']['w'];
            $cpaddingadjustR = -$this->cMarginR;
            // Added mPDF 3.0 Float DIV
            $fpaddingR = 0;
            $fpaddingL = 0;
            /* -- CSS-FLOAT -- */
            if (count($this->floatDivs)) {
                [$l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width] = $this->GetFloatDivInfo($this->blklvl);
                if ($r_exists) {
                    $fpaddingR = $r_width;
                }
                if ($l_exists) {
                    $fpaddingL = $l_width;
                }
            }
            /* -- END CSS-FLOAT -- */

            $usey = $this->y + 0.002;
            if (($newblock) && ($blockstate == 1 || $blockstate == 3) && ($lineCount == 0)) {
                $usey += $this->blk[$this->blklvl]['margin_top'] + $this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['border_top']['w'];
            }
            /* -- CSS-IMAGE-FLOAT -- */
            // If float exists at this level
            if (isset($this->floatmargins['R']) && $usey <= $this->floatmargins['R']['y1'] && $usey >= $this->floatmargins['R']['y0'] && !$this->floatmargins['R']['skipline']) {
                $fpaddingR += $this->floatmargins['R']['w'];
            }
            if (isset($this->floatmargins['L']) && $usey <= $this->floatmargins['L']['y1'] && $usey >= $this->floatmargins['L']['y0'] && !$this->floatmargins['L']['skipline']) {
                $fpaddingL += $this->floatmargins['L']['w'];
            }
            /* -- END CSS-IMAGE-FLOAT -- */
        } // *TABLES*
        // OBJECTS - IMAGES & FORM Elements (NB has already skipped line/page if required - in printbuffer)
        if (substr($s, 0, 3) == "\xbb\xa4\xac") { // identifier has been identified!
            $objattr = $this->_getObjAttr($s);
            $h_corr = 0;
            if ($is_table) { // *TABLES*
                $maximumW = ($maxWidth / Mpdf::SCALE) - ($this->cellPaddingL + $this->cMarginL + $this->cellPaddingR + $this->cMarginR);  // *TABLES*
            } // *TABLES*
            else { // *TABLES*
                if (($newblock) && ($blockstate == 1 || $blockstate == 3) && ($lineCount == 0) && (!$is_table)) {
                    $h_corr = $this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['border_top']['w'];
                }
                $maximumW = ($maxWidth / Mpdf::SCALE) - ($this->blk[$this->blklvl]['padding_left'] + $this->blk[$this->blklvl]['border_left']['w'] + $this->blk[$this->blklvl]['padding_right'] + $this->blk[$this->blklvl]['border_right']['w'] + $fpaddingL + $fpaddingR );
            } // *TABLES*
            $objattr = $this->inlineObject($objattr['type'], $this->lMargin + $fpaddingL + ($contentWidth / Mpdf::SCALE), ($this->y + $h_corr), $objattr, $this->lMargin, ($contentWidth / Mpdf::SCALE), $maximumW, $stackHeight, true, $is_table);

            // SET LINEHEIGHT for this line ================ RESET AT END
            $stackHeight = max($stackHeight, $objattr['OUTER-HEIGHT']);
            $this->objectbuffer[count($content) - 1] = $objattr;
            // if (isset($objattr['vertical-align'])) { $valign = $objattr['vertical-align']; }
            // else { $valign = ''; }
            // LIST MARKERS	// mPDF 6  Lists
            if ($objattr['type'] == 'image' && isset($objattr['listmarker']) && $objattr['listmarker'] && $objattr['listmarkerposition'] == 'outside') {
                // do nothing
            } else {
                $contentWidth += ($objattr['OUTER-WIDTH'] * Mpdf::SCALE);
            }
            return;
        }

        $lbw = $rbw = 0; // Border widths
        if (!empty($this->spanborddet)) {
            if (isset($this->spanborddet['L'])) {
                $lbw = $this->spanborddet['L']['w'];
            }
            if (isset($this->spanborddet['R'])) {
                $rbw = $this->spanborddet['R']['w'];
            }
        }

        if ($this->usingCoreFont) {
            $clen = strlen($s);
        } else {
            $clen = mb_strlen($s, $this->mb_enc);
        }

        // for every character in the string
        for ($i = 0; $i < $clen; $i++) {
            // extract the current character
            // get the width of the character in points
            if ($this->usingCoreFont) {
                $c = $s[$i];
                // Soft Hyphens chr(173)
                $cw = ($this->GetCharWidthCore($c) * Mpdf::SCALE);
                if (($this->textvar & TextVars::FC_KERNING) && $i > 0) { // mPDF 5.7.1
                    if (isset($this->CurrentFont['kerninfo'][$s[($i - 1)]][$c])) {
                        $cw += ($this->CurrentFont['kerninfo'][$s[($i - 1)]][$c] * $this->FontSizePt / 1000 );
                    }
                }
            } else {
                $c = mb_substr($s, $i, 1, $this->mb_enc);
                $cw = ($this->GetCharWidthNonCore($c, false) * Mpdf::SCALE);
                // mPDF 5.7.1
                // Use OTL GPOS
                if (isset($this->CurrentFont['useOTL']) && ($this->CurrentFont['useOTL'] & 0xFF)) {
                    // ...WriteFlowingBlock...
                    // Only  add XAdvanceL (not sure at present whether RTL or LTR writing direction)
                    // At this point, XAdvanceL and XAdvanceR will balance
                    if (isset($sOTLdata['GPOSinfo'][$i]['XAdvanceL'])) {
                        $cw += $sOTLdata['GPOSinfo'][$i]['XAdvanceL'] * (1000 / $this->CurrentFont['unitsPerEm']) * ($this->FontSize / 1000) * Mpdf::SCALE;
                    }
                }
                if (($this->textvar & TextVars::FC_KERNING) && $i > 0) { // mPDF 5.7.1
                    $lastc = mb_substr($s, ($i - 1), 1, $this->mb_enc);
                    $ulastc = $this->UTF8StringToArray($lastc, false);
                    $uc = $this->UTF8StringToArray($c, false);
                    if (isset($this->CurrentFont['kerninfo'][$ulastc[0]][$uc[0]])) {
                        $cw += ($this->CurrentFont['kerninfo'][$ulastc[0]][$uc[0]] * $this->FontSizePt / 1000 );
                    }
                }
            }

            if ($i == 0) {
                $cw += $lbw * Mpdf::SCALE;
                $contentB[(count($contentB) - 1)] .= 'L';
            }
            if ($i == ($clen - 1)) {
                $cw += $rbw * Mpdf::SCALE;
                $contentB[(count($contentB) - 1)] .= 'R';
            }
            if ($c == ' ') {
                $currContent .= $c;
                $contentWidth += $cw;
                continue;
            }

            // Paragraph INDENT
            $WidthCorrection = 0;
            if (($newblock) && ($blockstate == 1 || $blockstate == 3) && isset($this->blk[$this->blklvl]['text_indent']) && ($lineCount == 0) && (!$is_table) && ($align != 'C')) {
                $ti = $this->sizeConverter->convert($this->blk[$this->blklvl]['text_indent'], $this->blk[$this->blklvl]['inner_width'], $this->blk[$this->blklvl]['InlineProperties']['size'], false);  // mPDF 5.7.4
                $WidthCorrection = ($ti * Mpdf::SCALE);
            }
            // OUTDENT
            foreach ($this->objectbuffer as $k => $objattr) {   // mPDF 6 DOTTAB
                if ($objattr['type'] == 'dottab') {
                    $WidthCorrection -= ($objattr['outdent'] * Mpdf::SCALE);
                    break;
                }
            }


            // Added mPDF 3.0 Float DIV
            $fpaddingR = 0;
            $fpaddingL = 0;
            /* -- CSS-FLOAT -- */
            if (count($this->floatDivs)) {
                [$l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width] = $this->GetFloatDivInfo($this->blklvl);
                if ($r_exists) {
                    $fpaddingR = $r_width;
                }
                if ($l_exists) {
                    $fpaddingL = $l_width;
                }
            }
            /* -- END CSS-FLOAT -- */

            $usey = $this->y + 0.002;
            if (($newblock) && ($blockstate == 1 || $blockstate == 3) && ($lineCount == 0)) {
                $usey += $this->blk[$this->blklvl]['margin_top'] + $this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['border_top']['w'];
            }

            /* -- CSS-IMAGE-FLOAT -- */
            // If float exists at this level
            if (isset($this->floatmargins['R']) && $usey <= $this->floatmargins['R']['y1'] && $usey >= $this->floatmargins['R']['y0'] && !$this->floatmargins['R']['skipline']) {
                $fpaddingR += $this->floatmargins['R']['w'];
            }
            if (isset($this->floatmargins['L']) && $usey <= $this->floatmargins['L']['y1'] && $usey >= $this->floatmargins['L']['y0'] && !$this->floatmargins['L']['skipline']) {
                $fpaddingL += $this->floatmargins['L']['w'];
            }
            /* -- END CSS-IMAGE-FLOAT -- */


            // try adding another char
            if (( $contentWidth + $cw > $maxWidth - $WidthCorrection - (($this->cMarginL + $this->cMarginR) * Mpdf::SCALE) - ($paddingL + $paddingR + (($fpaddingL + $fpaddingR) * Mpdf::SCALE) ) + 0.001)) {// 0.001 is to correct for deviations converting mm=>pts
                // it won't fit, output what we already have
                $lineCount++;

                // contains any content that didn't make it into this print
                $savedContent = '';
                $savedContentB = '';
                $savedOTLdata = []; // mPDF 5.7.1
                $savedFont = [];
                $savedObj = [];
                $savedPreOTLdata = []; // mPDF 5.7.1
                $savedPreContent = [];
                $savedPreContentB = [];
                $savedPreFont = [];

                // mPDF 6
                // New line-breaking algorithm
                /////////////////////
                // LINE BREAKING
                /////////////////////
                $breakfound = false;
                $contentctr = count($content) - 1;
                if ($this->usingCoreFont) {
                    $charctr = strlen($currContent);
                } else {
                    $charctr = mb_strlen($currContent, $this->mb_enc);
                }
                $checkchar = $c;
                $prevchar = $this->_getPrevChar($contentctr, $charctr, $content);

                /* -- CJK-FONTS -- */
                // 1) CJK Overflowing a) punctuation or b) Oikomi
                // Next character ($c) is suitable to add as overhanging or squeezed punctuation, or Oikomi
                if ($CJKoverflow || $Oikomi) { // If flag already set
                    $CJKoverflow = false;
                    $Oikomi = false;
                    $breakfound = true;
                }
                if (!$this->usingCoreFont && !$breakfound && $this->checkCJK) {

                    // Get next/following character (in this chunk)
                    $followingchar = '';
                    if ($i < ($clen - 1)) {
                        if ($this->usingCoreFont) {
                            $followingchar = $s[$i + 1];
                        } else {
                            $followingchar = mb_substr($s, $i + 1, 1, $this->mb_enc);
                        }
                    }

                    // 1a) Overflow punctuation
                    if (preg_match("/[" . $this->pregCJKchars . "]/u", $prevchar) && preg_match("/[" . $this->CJKoverflow . "]/u", $checkchar) && $this->allowCJKorphans) {
                        // add character onto this line
                        $currContent .= $c;
                        $contentWidth += $cw;
                        $CJKoverflow = true; // Set flag
                        continue;
                    } elseif (preg_match("/[" . $this->pregCJKchars . "]/u", $checkchar) && $this->allowCJKorphans &&
                        (preg_match("/[" . $this->CJKleading . "]/u", $followingchar) || preg_match("/[" . $this->CJKfollowing . "]/u", $checkchar)) &&
                        !preg_match("/[" . $this->CJKleading . "]/u", $checkchar) && !preg_match("/[" . $this->CJKfollowing . "]/u", $followingchar) &&
                        !(preg_match("/[0-9\x{ff10}-\x{ff19}]/u", $followingchar) && preg_match("/[0-9\x{ff10}-\x{ff19}]/u", $checkchar))) {
                        // 1b) Try squeezing another character(s) onto this line = Oikomi, if character cannot end line
                        // or next character cannot start line (and not splitting CJK numerals)
                        // NB otherwise it move lastchar(s) to next line to keep $c company = Oidashi, which is done below in standard way
                        // add character onto this line
                        $currContent .= $c;
                        $contentWidth += $cw;
                        $Oikomi = true; // Set flag
                        continue;
                    }
                }
                /* -- END CJK-FONTS -- */
                /* -- HYPHENATION -- */

                // AUTOMATIC HYPHENATION
                // 2) Automatic hyphen in current word (does not cross tags)
                if (isset($this->textparam['hyphens']) && $this->textparam['hyphens'] == 1) {
                    $currWord = '';
                    // Look back and ahead to get current word
                    for ($ac = $charctr - 1; $ac >= 0; $ac--) {
                        if ($this->usingCoreFont) {
                            $addc = substr($currContent, $ac, 1);
                        } else {
                            $addc = mb_substr($currContent, $ac, 1, $this->mb_enc);
                        }
                        if ($addc == ' ') {
                            break;
                        }
                        $currWord = $addc . $currWord;
                    }
                    $start = $ac + 1;
                    for ($ac = $i; $ac < ($clen - 1); $ac++) {
                        if ($this->usingCoreFont) {
                            $addc = substr($s, $ac, 1);
                        } else {
                            $addc = mb_substr($s, $ac, 1, $this->mb_enc);
                        }
                        if ($addc == ' ') {
                            break;
                        }
                        $currWord .= $addc;
                    }
                    $ptr = $this->hyphenator->hyphenateWord($currWord, $charctr - $start);
                    if ($ptr > -1) {
                        $breakfound = [$contentctr, $start + $ptr, $contentctr, $start + $ptr, 'hyphen'];
                    }
                }
                /* -- END HYPHENATION -- */

                // Search backwards to find first line-break opportunity
                while ($breakfound == false && $prevchar !== false) {
                    $cutcontentctr = $contentctr;
                    $cutcharctr = $charctr;
                    $prevchar = $this->_moveToPrevChar($contentctr, $charctr, $content);
                    /////////////////////
                    // 3) Break at SPACE
                    /////////////////////
                    if ($prevchar == ' ') {
                        $breakfound = [$contentctr, $charctr, $cutcontentctr, $cutcharctr, 'discard'];
                    } /////////////////////
                    // 4) Break at U+200B in current word (Khmer, Lao & Thai Invisible word boundary, and Tibetan)
                    /////////////////////
                    elseif ($prevchar == "\xe2\x80\x8b") { // U+200B Zero-width Word Break
                        $breakfound = [$contentctr, $charctr, $cutcontentctr, $cutcharctr, 'discard'];
                    } /////////////////////
                    // 5) Break at Hard HYPHEN '-' or U+2010
                    /////////////////////
                    elseif (isset($this->textparam['hyphens']) && $this->textparam['hyphens'] != 2 && ($prevchar == '-' || $prevchar == "\xe2\x80\x90")) {
                        // Don't break a URL
                        // Look back to get first part of current word
                        $checkw = '';
                        for ($ac = $charctr - 1; $ac >= 0; $ac--) {
                            if ($this->usingCoreFont) {
                                $addc = substr($currContent, $ac, 1);
                            } else {
                                $addc = mb_substr($currContent, $ac, 1, $this->mb_enc);
                            }
                            if ($addc == ' ') {
                                break;
                            }
                            $checkw = $addc . $checkw;
                        }
                        // Don't break if HyphenMinus AND (a URL or before a numeral or before a >)
                        if ((!preg_match('/(http:|ftp:|https:|www\.)/', $checkw) && $checkchar != '>' && !preg_match('/[0-9]/', $checkchar)) || $prevchar == "\xe2\x80\x90") {
                            $breakfound = [$cutcontentctr, $cutcharctr, $cutcontentctr, $cutcharctr, 'cut'];
                        }
                    } /////////////////////
                    // 6) Break at Soft HYPHEN (replace with hard hyphen)
                    /////////////////////
                    elseif (isset($this->textparam['hyphens']) && $this->textparam['hyphens'] != 2 && !$this->usingCoreFont && $prevchar == "\xc2\xad") {
                        $breakfound = [$cutcontentctr, $cutcharctr, $cutcontentctr, $cutcharctr, 'cut'];
                        $content[$contentctr] = mb_substr($content[$contentctr], 0, $charctr, $this->mb_enc) . '-' . mb_substr($content[$contentctr], $charctr + 1, mb_strlen($content[$contentctr]), $this->mb_enc);
                        if (!empty($cOTLdata[$contentctr])) {
                            $cOTLdata[$contentctr]['char_data'][$charctr] = ['bidi_class' => 9, 'uni' => 45];
                            $cOTLdata[$contentctr]['group'][$charctr] = 'C';
                        }
                    } elseif (isset($this->textparam['hyphens']) && $this->textparam['hyphens'] != 2 && $this->FontFamily != 'csymbol' && $this->FontFamily != 'czapfdingbats' && $prevchar == chr(173)) {
                        $breakfound = [$cutcontentctr, $cutcharctr, $cutcontentctr, $cutcharctr, 'cut'];
                        $content[$contentctr] = substr($content[$contentctr], 0, $charctr) . '-' . substr($content[$contentctr], $charctr + 1);
                    } /* -- CJK-FONTS -- */
                    /////////////////////
                    // 7) Break at CJK characters (unless forbidden characters to end or start line)
                    // CJK Avoiding line break in the middle of numerals
                    /////////////////////
                    elseif (!$this->usingCoreFont && $this->checkCJK && preg_match("/[" . $this->pregCJKchars . "]/u", $checkchar) &&
                        !preg_match("/[" . $this->CJKfollowing . "]/u", $checkchar) && !preg_match("/[" . $this->CJKleading . "]/u", $prevchar) &&
                        !(preg_match("/[0-9\x{ff10}-\x{ff19}]/u", $prevchar) && preg_match("/[0-9\x{ff10}-\x{ff19}]/u", $checkchar))) {
                        $breakfound = [$cutcontentctr, $cutcharctr, $cutcontentctr, $cutcharctr, 'cut'];
                    }
                    /* -- END CJK-FONTS -- */
                    /////////////////////
                    // 8) Break at OBJECT (Break before all objects here - selected objects are moved forward to next line below e.g. dottab)
                    /////////////////////
                    if (isset($this->objectbuffer[$contentctr])) {
                        $breakfound = [$cutcontentctr, $cutcharctr, $cutcontentctr, $cutcharctr, 'cut'];
                    }


                    $checkchar = $prevchar;
                }

                // If a line-break opportunity found:
                if (is_array($breakfound)) {
                    $contentctr = $breakfound[0];
                    $charctr = $breakfound[1];
                    $cutcontentctr = $breakfound[2];
                    $cutcharctr = $breakfound[3];
                    $type = $breakfound[4];
                    // Cache chunks which are already processed, but now need to be passed on to the new line
                    for ($ix = count($content) - 1; $ix > $cutcontentctr; $ix--) {
                        // save and crop off any subsequent chunks
                        /* -- OTL -- */
                        if (!empty($sOTLdata)) {
                            $tmpOTL = array_pop($cOTLdata);
                            $savedPreOTLdata[] = $tmpOTL;
                        }
                        /* -- END OTL -- */
                        $savedPreContent[] = array_pop($content);
                        $savedPreContentB[] = array_pop($contentB);
                        $savedPreFont[] = array_pop($font);
                    }

                    // Next cache the part which will start the next line
                    if ($this->usingCoreFont) {
                        $savedPreContent[] = substr($content[$cutcontentctr], $cutcharctr);
                    } else {
                        $savedPreContent[] = mb_substr($content[$cutcontentctr], $cutcharctr, mb_strlen($content[$cutcontentctr]), $this->mb_enc);
                    }
                    $savedPreContentB[] = preg_replace('/L/', '', $contentB[$cutcontentctr]);
                    $savedPreFont[] = $font[$cutcontentctr];
                    /* -- OTL -- */
                    if (!empty($sOTLdata)) {
                        $savedPreOTLdata[] = $this->otl->splitOTLdata($cOTLdata[$cutcontentctr], $cutcharctr, $cutcharctr);
                    }
                    /* -- END OTL -- */


                    // Finally adjust the Current content which ends this line
                    if ($cutcharctr == 0 && $type == 'discard') {
                        array_pop($content);
                        array_pop($contentB);
                        array_pop($font);
                        array_pop($cOTLdata);
                    }

                    $currContent = & $content[count($content) - 1];
                    if ($this->usingCoreFont) {
                        $currContent = substr($currContent, 0, $charctr);
                    } else {
                        $currContent = mb_substr($currContent, 0, $charctr, $this->mb_enc);
                    }

                    if (!empty($sOTLdata)) {
                        $savedPreOTLdata[] = $this->otl->splitOTLdata($cOTLdata[(count($cOTLdata) - 1)], mb_strlen($currContent, $this->mb_enc));
                    }

                    if (strpos($contentB[(count($contentB) - 1)], 'R') !== false) {   // ???
                        $contentB[count($content) - 1] = preg_replace('/R/', '', $contentB[count($content) - 1]); // ???
                    }

                    if ($type == 'hyphen') {
                        $currContent .= '-';
                        if (!empty($cOTLdata[(count($cOTLdata) - 1)])) {
                            $cOTLdata[(count($cOTLdata) - 1)]['char_data'][] = ['bidi_class' => 9, 'uni' => 45];
                            $cOTLdata[(count($cOTLdata) - 1)]['group'] .= 'C';
                        }
                    }

                    $savedContent = '';
                    $savedContentB = '';
                    $savedFont = [];
                    $savedOTLdata = [];
                }
                // If no line-break opportunity found - split at current position
                // or - Next character ($c) is suitable to add as overhanging or squeezed punctuation, or Oikomi, as set above by:
                // 1) CJK Overflowing a) punctuation or b) Oikomi
                // in which case $breakfound==1 and NOT array

                if (!is_array($breakfound)) {
                    $savedFont = $this->saveFont();
                    if (!empty($sOTLdata)) {
                        $savedOTLdata = $this->otl->splitOTLdata($cOTLdata[(count($cOTLdata) - 1)], mb_strlen($currContent, $this->mb_enc));
                    }
                }

                if ($content[count($content) - 1] == '' && !isset($this->objectbuffer[count($content) - 1])) {
                    array_pop($content);
                    array_pop($contentB);
                    array_pop($font);
                    array_pop($cOTLdata);
                    $currContent = & $content[count($content) - 1];
                }

                // Right Trim current content - including CJK space, and for OTLdata
                // incl. CJK - strip CJK space at end of line &#x3000; = \xe3\x80\x80 = CJK space
                $currContent = rtrim($currContent);
                if ($this->checkCJK) {
                    $currContent = preg_replace("/\xe3\x80\x80$/", '', $currContent);
                } // *CJK-FONTS*
                /* -- OTL -- */
                if (isset($this->CurrentFont['useOTL']) && $this->CurrentFont['useOTL']) {
                    $this->otl->trimOTLdata($cOTLdata[count($cOTLdata) - 1], false, true); // NB also does U+3000
                }
                /* -- END OTL -- */


                // Selected OBJECTS are moved forward to next line, unless they come before a space or U+200B (type='discard')
                if (isset($this->objectbuffer[(count($content) - 1)]) && (!isset($type) || $type != 'discard')) {
                    $objtype = $this->objectbuffer[(count($content) - 1)]['type'];
                    if ($objtype == 'dottab' || $objtype == 'bookmark' || $objtype == 'indexentry' || $objtype == 'toc' || $objtype == 'annot') {
                        $savedObj = array_pop($this->objectbuffer);
                    }
                }


                // Decimal alignment (cancel if wraps to > 1 line)
                if ($is_table && substr($align, 0, 1) == 'D') {
                    $align = substr($align, 2, 1);
                }

                $lineBox = [];

                $this->_setInlineBlockHeights($lineBox, $stackHeight, $content, $font, $is_table);

                // update $contentWidth since it has changed with cropping
                $contentWidth = 0;

                $inclCursive = false;
                foreach ($content as $k => $chunk) {
                    if (isset($this->objectbuffer[$k]) && $this->objectbuffer[$k]) {
                        // LIST MARKERS
                        if ($this->objectbuffer[$k]['type'] == 'image' && isset($this->objectbuffer[$k]['listmarker']) && $this->objectbuffer[$k]['listmarker']) {
                            if ($this->objectbuffer[$k]['listmarkerposition'] != 'outside') {
                                $contentWidth += $this->objectbuffer[$k]['OUTER-WIDTH'] * Mpdf::SCALE;
                            }
                        } else {
                            $contentWidth += $this->objectbuffer[$k]['OUTER-WIDTH'] * Mpdf::SCALE;
                        }
                    } elseif (!isset($this->objectbuffer[$k]) || (isset($this->objectbuffer[$k]) && !$this->objectbuffer[$k])) {
                        $this->restoreFont($font[$k], false);
                        if ($this->checkCJK && $k == count($content) - 1 && $CJKoverflow && $align == 'J' && $this->allowCJKoverflow && $this->CJKforceend) {
                            // force-end overhang
                            $hanger = mb_substr($chunk, mb_strlen($chunk, $this->mb_enc) - 1, 1, $this->mb_enc);
                            // Probably ought to do something with char_data and GPOS in cOTLdata...
                            $content[$k] = $chunk = mb_substr($chunk, 0, mb_strlen($chunk, $this->mb_enc) - 1, $this->mb_enc);
                        }

                        // Soft Hyphens chr(173) + Replace NBSP with SPACE + Set inclcursive if includes CURSIVE TEXT
                        if (!$this->usingCoreFont) {
                            /* -- OTL -- */
                            if ((isset($this->CurrentFont['useOTL']) && $this->CurrentFont['useOTL']) || !empty($sOTLdata)) {
                                $this->otl->removeChar($chunk, $cOTLdata[$k], "\xc2\xad");
                                $this->otl->replaceSpace($chunk, $cOTLdata[$k]); // NBSP -> space
                                if (preg_match("/([" . $this->pregCURSchars . "])/u", $chunk)) {
                                    $inclCursive = true;
                                }
                                $content[$k] = $chunk;
                            } /* -- END OTL -- */ else {  // *OTL*
                                $content[$k] = $chunk = str_replace("\xc2\xad", '', $chunk);
                                $content[$k] = $chunk = str_replace(chr(194) . chr(160), chr(32), $chunk);
                            } // *OTL*
                        } elseif ($this->FontFamily != 'csymbol' && $this->FontFamily != 'czapfdingbats') {
                            $content[$k] = $chunk = str_replace(chr(173), '', $chunk);
                            $content[$k] = $chunk = str_replace(chr(160), chr(32), $chunk);
                        }

                        $contentWidth += $this->GetStringWidth($chunk, true, (isset($cOTLdata[$k]) ? $cOTLdata[$k] : false), $this->textvar) * Mpdf::SCALE;  // mPDF 5.7.1
                        if (!empty($this->spanborddet)) {
                            if (isset($this->spanborddet['L']['w']) && strpos($contentB[$k], 'L') !== false) {
                                $contentWidth += $this->spanborddet['L']['w'] * Mpdf::SCALE;
                            }
                            if (isset($this->spanborddet['R']['w']) && strpos($contentB[$k], 'R') !== false) {
                                $contentWidth += $this->spanborddet['R']['w'] * Mpdf::SCALE;
                            }
                        }
                    }
                }

                $lastfontreqstyle = (isset($font[count($font) - 1]['ReqFontStyle']) ? $font[count($font) - 1]['ReqFontStyle'] : '');
                $lastfontstyle = (isset($font[count($font) - 1]['style']) ? $font[count($font) - 1]['style'] : '');
                if ($blockdir == 'ltr' && strpos($lastfontreqstyle, "I") !== false && strpos($lastfontstyle, "I") === false) { // Artificial italic
                    $lastitalic = $this->FontSize * 0.15 * Mpdf::SCALE;
                } else {
                    $lastitalic = 0;
                }




                // NOW FORMAT THE LINE TO OUTPUT
                if (!$table_draft) {
                    // DIRECTIONALITY RTL
                    $chunkorder = range(0, count($content) - 1); // mPDF 5.7
                    /* -- OTL -- */
                    // mPDF 6
                    if ($blockdir == 'rtl' || $this->biDirectional) {
                        $this->otl->bidiReorder($chunkorder, $content, $cOTLdata, $blockdir);
                        // From this point on, $content and $cOTLdata may contain more elements (and re-ordered) compared to
                        // $this->objectbuffer and $font ($chunkorder contains the mapping)
                    }

                    /* -- END OTL -- */
                    // Remove any XAdvance from OTL data at end of line
                    foreach ($chunkorder as $aord => $k) {
                        if (count($cOTLdata)) {
                            $this->restoreFont($font[$k], false);
                            // ...WriteFlowingBlock...
                            if ($aord == count($chunkorder) - 1 && isset($cOTLdata[$aord]['group'])) { // Last chunk on line
                                $nGPOS = strlen($cOTLdata[$aord]['group']) - 1; // Last character
                                if (isset($cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceL']) || isset($cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceR'])) {
                                    if (isset($cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceL'])) {
                                        $w = $cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceL'] * 1000 / $this->CurrentFont['unitsPerEm'];
                                    } else {
                                        $w = $cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceR'] * 1000 / $this->CurrentFont['unitsPerEm'];
                                    }
                                    $w *= ($this->FontSize / 1000);
                                    $contentWidth -= $w * Mpdf::SCALE;
                                    $cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceL'] = 0;
                                    $cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceR'] = 0;
                                }

                                // If last character has an XPlacement set, adjust width calculation, and add to XAdvance to account for it
                                if (isset($cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XPlacement'])) {
                                    $w = -$cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XPlacement'] * 1000 / $this->CurrentFont['unitsPerEm'];
                                    $w *= ($this->FontSize / 1000);
                                    $contentWidth -= $w * Mpdf::SCALE;
                                    $cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceL'] = $cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XPlacement'];
                                    $cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XAdvanceR'] = $cOTLdata[$aord]['GPOSinfo'][$nGPOS]['XPlacement'];
                                }
                            }
                        }
                    }

                    // JUSTIFICATION J
                    $jcharspacing = 0;
                    $jws = 0;
                    $nb_carac = 0;
                    $nb_spaces = 0;
                    $jkashida = 0;
                    // if it's justified, we need to find the char/word spacing (or if hanger $this->CJKforceend)
                    if (($align == 'J' && !$CJKoverflow) || (($contentWidth + $lastitalic > $maxWidth - $WidthCorrection - (($this->cMarginL + $this->cMarginR) * Mpdf::SCALE) - ($paddingL + $paddingR + (($fpaddingL + $fpaddingR) * Mpdf::SCALE) ) + 0.001) && (!$CJKoverflow || ($CJKoverflow && !$this->allowCJKoverflow))) || $CJKoverflow && $align == 'J' && $this->allowCJKoverflow && $hanger && $this->CJKforceend) {   // 0.001 is to correct for deviations converting mm=>pts
                        // JUSTIFY J (character spacing)
                        // WORD SPACING
                        // mPDF 5.7
                        foreach ($chunkorder as $aord => $k) {
                            $chunk = isset($content[$aord]) ? $content[$aord] : '';
                            if (!isset($this->objectbuffer[$k]) || (isset($this->objectbuffer[$k]) && !$this->objectbuffer[$k])) {
                                $nb_carac += mb_strlen($chunk, $this->mb_enc);
                                $nb_spaces += mb_substr_count($chunk, ' ', $this->mb_enc);
                                // GPOS OTL
                                if (isset($this->CurrentFont['useOTL']) && ($this->CurrentFont['useOTL'] & 0xFF)) {
                                    if (isset($cOTLdata[$aord]['group']) && $cOTLdata[$aord]['group']) {
                                        $nb_carac -= substr_count($cOTLdata[$aord]['group'], 'M');
                                    }
                                }
                            } else {
                                $nb_carac ++;
                            } // mPDF 6 allow spacing for inline object
                        }
                        // GetJSpacing adds kashida spacing to GPOSinfo if appropriate for Font
                        [$jcharspacing, $jws, $jkashida] = $this->GetJspacing($nb_carac, $nb_spaces, ($maxWidth - $lastitalic - $contentWidth - $WidthCorrection - (($this->cMarginL + $this->cMarginR) * Mpdf::SCALE) - ($paddingL + $paddingR + (($fpaddingL + $fpaddingR) * Mpdf::SCALE) )), $inclCursive, $cOTLdata);
                    }

                    // WORD SPACING
                    $empty = $maxWidth - $lastitalic - $WidthCorrection - $contentWidth - (($this->cMarginL + $this->cMarginR) * Mpdf::SCALE) - ($paddingL + $paddingR + (($fpaddingL + $fpaddingR) * Mpdf::SCALE) );

                    $empty -= ($jcharspacing * ($nb_carac - 1)); // mPDF 6 nb_carac MINUS 1
                    $empty -= ($jws * $nb_spaces);
                    $empty -= ($jkashida);
                    $empty /= Mpdf::SCALE;

                    $b = ''; // do not borders
                    // Get PAGEBREAK TO TEST for height including the top border/padding
                    $check_h = max($this->divheight, $stackHeight);
                    if (($newblock) && ($blockstate == 1 || $blockstate == 3) && ($this->blklvl > 0) && ($lineCount == 1) && (!$is_table)) {
                        $check_h += ($this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['margin_top'] + $this->blk[$this->blklvl]['border_top']['w']);
                    }

                    if ($this->ColActive && $check_h > ($this->PageBreakTrigger - $this->y0)) {
                        $this->SetCol($this->NbCol - 1);
                    }

                    // PAGEBREAK
                    // 'If' below used in order to fix "first-line of other page with justify on" bug
                    if (!$is_table && ($this->y + $check_h) > $this->PageBreakTrigger and ! $this->InFooter and $this->AcceptPageBreak()) {
                        $bak_x = $this->x; // Current X position
                        // WORD SPACING
                        $ws = $this->ws; // Word Spacing
                        $charspacing = $this->charspacing; // Character Spacing
                        $this->ResetSpacing();

                        $this->AddPage($this->CurOrientation);

                        $this->x = $bak_x;
                        // Added to correct for OddEven Margins
                        $currentx += $this->MarginCorrection;
                        $this->x += $this->MarginCorrection;

                        // WORD SPACING
                        $this->SetSpacing($charspacing, $ws);
                    }

                    if ($this->kwt && !$is_table) { // mPDF 5.7+
                        $this->printkwtbuffer();
                        $this->kwt = false;
                    }


                    /* -- COLUMNS -- */
                    // COLS
                    // COLUMN CHANGE
                    if ($this->CurrCol != $oldcolumn) {
                        $currentx += $this->ChangeColumn * ($this->ColWidth + $this->ColGap);
                        $this->x += $this->ChangeColumn * ($this->ColWidth + $this->ColGap);
                        $oldcolumn = $this->CurrCol;
                    }

                    if ($this->ColActive && !$is_table) {
                        $this->breakpoints[$this->CurrCol][] = $this->y;
                    } // *COLUMNS*
                    /* -- END COLUMNS -- */

                    // TOP MARGIN
                    if (($newblock) && ($blockstate == 1 || $blockstate == 3) && ($this->blk[$this->blklvl]['margin_top']) && ($lineCount == 1) && (!$is_table)) {
                        $this->DivLn($this->blk[$this->blklvl]['margin_top'], $this->blklvl - 1, true, $this->blk[$this->blklvl]['margin_collapse']);
                        if ($this->ColActive) {
                            $this->breakpoints[$this->CurrCol][] = $this->y;
                        } // *COLUMNS*
                    }


                    // Update y0 for top of block (used to paint border)
                    if (($newblock) && ($blockstate == 1 || $blockstate == 3) && ($lineCount == 1) && (!$is_table)) {
                        $this->blk[$this->blklvl]['y0'] = $this->y;
                        $this->blk[$this->blklvl]['startpage'] = $this->page;
                        if ($this->blk[$this->blklvl]['float']) {
                            $this->blk[$this->blklvl]['float_start_y'] = $this->y;
                        }
                    }

                    // TOP PADDING and BORDER spacing/fill
                    if (($newblock) && ($blockstate == 1 || $blockstate == 3) && (($this->blk[$this->blklvl]['padding_top']) || ($this->blk[$this->blklvl]['border_top'])) && ($lineCount == 1) && (!$is_table)) {
                        // $state = 0 normal; 1 top; 2 bottom; 3 top and bottom
                        $this->DivLn($this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['border_top']['w'], -3, true, false, 1);
                        if ($this->ColActive) {
                            $this->breakpoints[$this->CurrCol][] = $this->y;
                        } // *COLUMNS*
                    }

                    $arraysize = count($chunkorder);

                    $margins = ($this->cMarginL + $this->cMarginR) + ($ipaddingL + $ipaddingR + $fpaddingR + $fpaddingR );

                    // PAINT BACKGROUND FOR THIS LINE
                    if (!$is_table) {
                        $this->DivLn($stackHeight, $this->blklvl, false);
                    } // false -> don't advance y

                    $this->x = $currentx + $this->cMarginL + $ipaddingL + $fpaddingL;
                    if ($align == 'R') {
                        $this->x += $empty;
                    } elseif ($align == 'C') {
                        $this->x += ($empty / 2);
                    }

                    // Paragraph INDENT
                    if (isset($this->blk[$this->blklvl]['text_indent']) && ($newblock) && ($blockstate == 1 || $blockstate == 3) && ($lineCount == 1) && (!$is_table) && ($blockdir != 'rtl') && ($align != 'C')) {
                        $ti = $this->sizeConverter->convert($this->blk[$this->blklvl]['text_indent'], $this->blk[$this->blklvl]['inner_width'], $this->blk[$this->blklvl]['InlineProperties']['size'], false);  // mPDF 5.7.4
                        $this->x += $ti;
                    }

                    // BIDI magic_reverse moved upwards from here
                    foreach ($chunkorder as $aord => $k) { // mPDF 5.7

                        $chunk = isset($content[$aord]) ? $content[$aord] : '';

                        if (isset($this->objectbuffer[$k]) && $this->objectbuffer[$k]) {
                            $xadj = $this->x - $this->objectbuffer[$k]['OUTER-X'];
                            $this->objectbuffer[$k]['OUTER-X'] += $xadj;
                            $this->objectbuffer[$k]['BORDER-X'] += $xadj;
                            $this->objectbuffer[$k]['INNER-X'] += $xadj;

                            if ($this->objectbuffer[$k]['type'] == 'listmarker') {
                                $this->objectbuffer[$k]['lineBox'] = $lineBox[-1]; // Block element details for glyph-origin
                            }
                            $yadj = $this->y - $this->objectbuffer[$k]['OUTER-Y'];
                            if ($this->objectbuffer[$k]['type'] == 'dottab') { // mPDF 6 DOTTAB
                                $this->objectbuffer[$k]['lineBox'] = $lineBox[$k]; // element details for glyph-origin
                            }
                            if ($this->objectbuffer[$k]['type'] != 'dottab') { // mPDF 6 DOTTAB
                                $yadj += $lineBox[$k]['top'];
                            }
                            $this->objectbuffer[$k]['OUTER-Y'] += $yadj;
                            $this->objectbuffer[$k]['BORDER-Y'] += $yadj;
                            $this->objectbuffer[$k]['INNER-Y'] += $yadj;
                        }

                        $this->restoreFont($font[$k]);  // mPDF 5.7

                        $this->SetSpacing(($this->fixedlSpacing * Mpdf::SCALE) + $jcharspacing, ($this->fixedlSpacing + $this->minwSpacing) * Mpdf::SCALE + $jws);
                        // Now unset these values so they don't influence GetStringwidth below or in fn. Cell
                        $this->fixedlSpacing = false;
                        $this->minwSpacing = 0;

                        $save_vis = $this->visibility;
                        if (isset($this->textparam['visibility']) && $this->textparam['visibility'] && $this->textparam['visibility'] != $this->visibility) {
                            $this->SetVisibility($this->textparam['visibility']);
                        }
                        // *********** SPAN BACKGROUND COLOR ***************** //
                        if ($this->spanbgcolor) {
                            $cor = $this->spanbgcolorarray;
                            $this->SetFColor($cor);
                            $save_fill = $fill;
                            $spanfill = 1;
                            $fill = 1;
                        }
                        if (!empty($this->spanborddet)) {
                            if (strpos($contentB[$k], 'L') !== false) {
                                $this->x += (isset($this->spanborddet['L']['w']) ? $this->spanborddet['L']['w'] : 0);
                            }
                            if (strpos($contentB[$k], 'L') === false) {
                                $this->spanborddet['L']['s'] = $this->spanborddet['L']['w'] = 0;
                            }
                            if (strpos($contentB[$k], 'R') === false) {
                                $this->spanborddet['R']['s'] = $this->spanborddet['R']['w'] = 0;
                            }
                        }

                        // WORD SPACING
                        // StringWidth this time includes any kashida spacing
                        $stringWidth = $this->GetStringWidth($chunk, true, (isset($cOTLdata[$aord]) ? $cOTLdata[$aord] : false), $this->textvar, true);

                        $nch = mb_strlen($chunk, $this->mb_enc);
                        // GPOS OTL
                        if (isset($this->CurrentFont['useOTL']) && ($this->CurrentFont['useOTL'] & 0xFF)) {
                            if (isset($cOTLdata[$aord]['group']) && $cOTLdata[$aord]['group']) {
                                $nch -= substr_count($cOTLdata[$aord]['group'], 'M');
                            }
                        }
                        $stringWidth += ( $this->charspacing * $nch / Mpdf::SCALE );

                        $stringWidth += ( $this->ws * mb_substr_count($chunk, ' ', $this->mb_enc) / Mpdf::SCALE );

                        if (isset($this->objectbuffer[$k])) {
                            // LIST MARKERS	// mPDF 6  Lists
                            if ($this->objectbuffer[$k]['type'] == 'image' && isset($this->objectbuffer[$k]['listmarker']) && $this->objectbuffer[$k]['listmarker'] && $this->objectbuffer[$k]['listmarkerposition'] == 'outside') {
                                $stringWidth = 0;
                            } else {
                                $stringWidth = $this->objectbuffer[$k]['OUTER-WIDTH'];
                            }
                        }

                        if ($stringWidth == 0) {
                            $stringWidth = 0.000001;
                        }

                        if ($aord == $arraysize - 1) {
                            $stringWidth -= ( $this->charspacing / Mpdf::SCALE );
                            if ($this->checkCJK && $CJKoverflow && $align == 'J' && $this->allowCJKoverflow && $hanger && $this->CJKforceend) {
                                // force-end overhang
                                $this->Cell($stringWidth, $stackHeight, $chunk, '', 0, '', $fill, $this->HREF, $currentx, 0, 0, 'M', $fill, true, (isset($cOTLdata[$aord]) ? $cOTLdata[$aord] : false), $this->textvar, (isset($lineBox[$k]) ? $lineBox[$k] : false));
                                $this->Cell($this->GetStringWidth($hanger), $stackHeight, $hanger, '', 1, '', $fill, $this->HREF, $currentx, 0, 0, 'M', $fill, true, (isset($cOTLdata[$aord]) ? $cOTLdata[$aord] : false), $this->textvar, (isset($lineBox[$k]) ? $lineBox[$k] : false));
                            } else {
                                $this->Cell($stringWidth, $stackHeight, $chunk, '', 1, '', $fill, $this->HREF, $currentx, 0, 0, 'M', $fill, true, (isset($cOTLdata[$aord]) ? $cOTLdata[$aord] : false), $this->textvar, (isset($lineBox[$k]) ? $lineBox[$k] : false)); // mono-style line or last part (skips line)
                            }
                        } else {
                            $this->Cell($stringWidth, $stackHeight, $chunk, '', 0, '', $fill, $this->HREF, 0, 0, 0, 'M', $fill, true, (isset($cOTLdata[$aord]) ? $cOTLdata[$aord] : false), $this->textvar, (isset($lineBox[$k]) ? $lineBox[$k] : false)); // first or middle part
                        }

                        if (!empty($this->spanborddet)) {
                            if (strpos($contentB[$k], 'R') !== false && $aord != $arraysize - 1) {
                                $this->x += $this->spanborddet['R']['w'];
                            }
                        }
                        // *********** SPAN BACKGROUND COLOR OFF - RESET BLOCK BGCOLOR ***************** //
                        if (isset($spanfill) && $spanfill) {
                            $fill = $save_fill;
                            $spanfill = 0;
                            if ($fill) {
                                $this->SetFColor($bcor);
                            }
                        }
                        if (isset($this->textparam['visibility']) && $this->textparam['visibility'] && $this->visibility != $save_vis) {
                            $this->SetVisibility($save_vis);
                        }
                    }
                } elseif ($table_draft) {
                    $this->y += $stackHeight;
                }

                if (!$is_table) {
                    $this->maxPosR = max($this->maxPosR, ($this->w - $this->rMargin - $this->blk[$this->blklvl]['outer_right_margin']));
                    $this->maxPosL = min($this->maxPosL, ($this->lMargin + $this->blk[$this->blklvl]['outer_left_margin']));
                }

                // move on to the next line, reset variables, tack on saved content and current char

                if (!$table_draft) {
                    $this->printobjectbuffer($is_table, $blockdir);
                }
                $this->objectbuffer = [];


                /* -- CSS-IMAGE-FLOAT -- */
                // Update values if set to skipline
                if ($this->floatmargins) {
                    $this->_advanceFloatMargins();
                }
                /* -- END CSS-IMAGE-FLOAT -- */

                // Reset lineheight
                $stackHeight = $this->divheight;
                $valign = 'M';

                $font = [];
                $content = [];
                $contentB = [];
                $cOTLdata = []; // mPDF 5.7.1
                $contentWidth = 0;
                if (!empty($savedObj)) {
                    $this->objectbuffer[] = $savedObj;
                    $font[] = $savedFont;
                    $content[] = '';
                    $contentB[] = '';
                    $cOTLdata[] = []; // mPDF 5.7.1
                    $contentWidth += $savedObj['OUTER-WIDTH'] * Mpdf::SCALE;
                }
                if (count($savedPreContent) > 0) {
                    for ($ix = count($savedPreContent) - 1; $ix >= 0; $ix--) {
                        $font[] = $savedPreFont[$ix];
                        $content[] = $savedPreContent[$ix];
                        $contentB[] = $savedPreContentB[$ix];
                        if (!empty($sOTLdata)) {
                            $cOTLdata[] = $savedPreOTLdata[$ix];
                        }
                        $this->restoreFont($savedPreFont[$ix]);
                        $lbw = $rbw = 0; // Border widths
                        if (!empty($this->spanborddet)) {
                            $lbw = (isset($this->spanborddet['L']['w']) ? $this->spanborddet['L']['w'] : 0);
                            $rbw = (isset($this->spanborddet['R']['w']) ? $this->spanborddet['R']['w'] : 0);
                        }
                        if ($ix > 0) {
                            $contentWidth += $this->GetStringWidth($savedPreContent[$ix], true, (isset($savedPreOTLdata[$ix]) ? $savedPreOTLdata[$ix] : false), $this->textvar) * Mpdf::SCALE; // mPDF 5.7.1
                            if (strpos($savedPreContentB[$ix], 'L') !== false) {
                                $contentWidth += $lbw;
                            }
                            if (strpos($savedPreContentB[$ix], 'R') !== false) {
                                $contentWidth += $rbw;
                            }
                        }
                    }
                    $savedPreContent = [];
                    $savedPreContentB = [];
                    $savedPreOTLdata = []; // mPDF 5.7.1
                    $savedPreFont = [];
                    $content[(count($content) - 1)] .= $c;
                } else {
                    $font[] = $savedFont;
                    $content[] = $savedContent . $c;
                    $contentB[] = $savedContentB;
                    $cOTLdata[] = $savedOTLdata; // mPDF 5.7.1
                }

                $currContent = & $content[(count($content) - 1)];
                $this->restoreFont($font[(count($font) - 1)]); // mPDF 6.0

                /* -- CJK-FONTS -- */
                // CJK - strip CJK space at start of line
                // &#x3000; = \xe3\x80\x80 = CJK space
                if ($this->checkCJK && $currContent == "\xe3\x80\x80") {
                    $currContent = '';
                    if (isset($this->CurrentFont['useOTL']) && $this->CurrentFont['useOTL']) {
                        $this->otl->trimOTLdata($cOTLdata[count($cOTLdata) - 1], true, false); // left trim U+3000
                    }
                }
                /* -- END CJK-FONTS -- */

                $lbw = $rbw = 0; // Border widths
                if (!empty($this->spanborddet)) {
                    $lbw = (isset($this->spanborddet['L']['w']) ? $this->spanborddet['L']['w'] : 0);
                    $rbw = (isset($this->spanborddet['R']['w']) ? $this->spanborddet['R']['w'] : 0);
                }

                $contentWidth += $this->GetStringWidth($currContent, false, (isset($cOTLdata[(count($cOTLdata) - 1)]) ? $cOTLdata[(count($cOTLdata) - 1)] : false), $this->textvar) * Mpdf::SCALE; // mPDF 5.7.1
                if (strpos($savedContentB, 'L') !== false) {
                    $contentWidth += $lbw;
                }
                $CJKoverflow = false;
                $hanger = '';
            } // another character will fit, so add it on
            else {
                $contentWidth += $cw;
                $currContent .= $c;
            }
        }

        unset($content);
        unset($contentB);
    }

    // ----------------------END OF FLOWING BLOCK------------------------------------//


    /* -- CSS-IMAGE-FLOAT -- */
    // Update values if set to skipline
    function _advanceFloatMargins()
    {
        // Update floatmargins - L
        if (isset($this->floatmargins['L']) && $this->floatmargins['L']['skipline'] && $this->floatmargins['L']['y0'] != $this->y) {
            $yadj = $this->y - $this->floatmargins['L']['y0'];
            $this->floatmargins['L']['y0'] = $this->y;
            $this->floatmargins['L']['y1'] += $yadj;

            // Update objattr in floatbuffer
            if ($this->floatbuffer[$this->floatmargins['L']['id']]['border_left']['w']) {
                $this->floatbuffer[$this->floatmargins['L']['id']]['BORDER-Y'] += $yadj;
            }
            $this->floatbuffer[$this->floatmargins['L']['id']]['INNER-Y'] += $yadj;
            $this->floatbuffer[$this->floatmargins['L']['id']]['OUTER-Y'] += $yadj;

            // Unset values
            $this->floatbuffer[$this->floatmargins['L']['id']]['skipline'] = false;
            $this->floatmargins['L']['skipline'] = false;
            $this->floatmargins['L']['id'] = '';
        }
        // Update floatmargins - R
        if (isset($this->floatmargins['R']) && $this->floatmargins['R']['skipline'] && $this->floatmargins['R']['y0'] != $this->y) {
            $yadj = $this->y - $this->floatmargins['R']['y0'];
            $this->floatmargins['R']['y0'] = $this->y;
            $this->floatmargins['R']['y1'] += $yadj;

            // Update objattr in floatbuffer
            if ($this->floatbuffer[$this->floatmargins['R']['id']]['border_left']['w']) {
                $this->floatbuffer[$this->floatmargins['R']['id']]['BORDER-Y'] += $yadj;
            }
            $this->floatbuffer[$this->floatmargins['R']['id']]['INNER-Y'] += $yadj;
            $this->floatbuffer[$this->floatmargins['R']['id']]['OUTER-Y'] += $yadj;

            // Unset values
            $this->floatbuffer[$this->floatmargins['R']['id']]['skipline'] = false;
            $this->floatmargins['R']['skipline'] = false;
            $this->floatmargins['R']['id'] = '';
        }
    }

    /* -- END CSS-IMAGE-FLOAT -- */



    /* -- END HTML-CSS -- */

    function _SetTextRendering($mode)
    {
        if (!(($mode == 0) || ($mode == 1) || ($mode == 2))) {
            throw new \Mpdf\MpdfException("Text rendering mode should be 0, 1 or 2 (value : $mode)");
        }
        $tr = ($mode . ' Tr');
        if ($this->page > 0 && ((isset($this->pageoutput[$this->page]['TextRendering']) && $this->pageoutput[$this->page]['TextRendering'] != $tr) || !isset($this->pageoutput[$this->page]['TextRendering']))) {
            $this->writer->write($tr);
        }
        $this->pageoutput[$this->page]['TextRendering'] = $tr;
    }

    function SetTextOutline($params = [])
    {
        if (isset($params['outline-s']) && $params['outline-s']) {
            $this->SetLineWidth($params['outline-WIDTH']);
            $this->SetDColor($params['outline-COLOR']);
            $tr = ('2 Tr');
            if ($this->page > 0 && ((isset($this->pageoutput[$this->page]['TextRendering']) && $this->pageoutput[$this->page]['TextRendering'] != $tr) || !isset($this->pageoutput[$this->page]['TextRendering']))) {
                $this->writer->write($tr);
            }
            $this->pageoutput[$this->page]['TextRendering'] = $tr;
        } else { // Now resets all values
            $this->SetLineWidth(0.2);
            $this->SetDColor($this->colorConverter->convert(0, $this->PDFAXwarnings));
            $this->_SetTextRendering(0);
            $tr = ('0 Tr');
            if ($this->page > 0 && ((isset($this->pageoutput[$this->page]['TextRendering']) && $this->pageoutput[$this->page]['TextRendering'] != $tr) || !isset($this->pageoutput[$this->page]['TextRendering']))) {
                $this->writer->write($tr);
            }
            $this->pageoutput[$this->page]['TextRendering'] = $tr;
        }
    }

    function Image($file, $x, $y, $w = 0, $h = 0, $type = '', $link = '', $paint = true, $constrain = true, $watermark = false, $shownoimg = true, $allowvector = true)
    {
        $orig_srcpath = $file;
        $this->GetFullPath($file);

        $info = $this->imageProcessor->getImage($file, true, $allowvector, $orig_srcpath);
        if (!$info && $paint) {
            $info = $this->imageProcessor->getImage($this->noImageFile);
            if ($info) {
                $file = $this->noImageFile;
                $w = ($info['w'] * (25.4 / $this->img_dpi));  // 14 x 16px
                $h = ($info['h'] * (25.4 / $this->img_dpi));  // 14 x 16px
            }
        }
        if (!$info) {
            return false;
        }
        // Automatic width and height calculation if needed
        if ($w == 0 and $h == 0) {
            /* -- IMAGES-WMF -- */
            if ($info['type'] == 'wmf') {
                // WMF units are twips (1/20pt)
                // divide by 20 to get points
                // divide by k to get user units
                $w = abs($info['w']) / (20 * Mpdf::SCALE);
                $h = abs($info['h']) / (20 * Mpdf::SCALE);
            } else { 			/* -- END IMAGES-WMF -- */
                if ($info['type'] == 'svg') {
                    // returned SVG units are pts
                    // divide by k to get user units (mm)
                    $w = abs($info['w']) / Mpdf::SCALE;
                    $h = abs($info['h']) / Mpdf::SCALE;
                } else {
                    // Put image at default image dpi
                    $w = ($info['w'] / Mpdf::SCALE) * (72 / $this->img_dpi);
                    $h = ($info['h'] / Mpdf::SCALE) * (72 / $this->img_dpi);
                }
            }
        }
        if ($w == 0) {
            $w = abs($h * $info['w'] / $info['h']);
        }
        if ($h == 0) {
            $h = abs($w * $info['h'] / $info['w']);
        }

        /* -- WATERMARK -- */
        if ($watermark) {
            $maxw = $this->w;
            $maxh = $this->h;
            // Size = D PF or array
            if (is_array($this->watermark_size)) {
                $w = $this->watermark_size[0];
                $h = $this->watermark_size[1];
            } elseif (!is_string($this->watermark_size)) {
                $maxw -= $this->watermark_size * 2;
                $maxh -= $this->watermark_size * 2;
                $w = $maxw;
                $h = abs($w * $info['h'] / $info['w']);
                if ($h > $maxh) {
                    $h = $maxh;
                    $w = abs($h * $info['w'] / $info['h']);
                }
            } elseif ($this->watermark_size == 'F') {
                if ($this->ColActive) {
                    $maxw = $this->w - ($this->DeflMargin + $this->DefrMargin);
                } else {
                    $maxw = $this->pgwidth;
                }
                $maxh = $this->h - ($this->tMargin + $this->bMargin);
                $w = $maxw;
                $h = abs($w * $info['h'] / $info['w']);
                if ($h > $maxh) {
                    $h = $maxh;
                    $w = abs($h * $info['w'] / $info['h']);
                }
            } elseif ($this->watermark_size == 'P') { // Default P
                $w = $maxw;
                $h = abs($w * $info['h'] / $info['w']);
                if ($h > $maxh) {
                    $h = $maxh;
                    $w = abs($h * $info['w'] / $info['h']);
                }
            }
            // Automatically resize to maximum dimensions of page if too large
            if ($w > $maxw) {
                $w = $maxw;
                $h = abs($w * $info['h'] / $info['w']);
            }
            if ($h > $maxh) {
                $h = $maxh;
                $w = abs($h * $info['w'] / $info['h']);
            }
            // Position
            if (is_array($this->watermark_pos)) {
                $x = $this->watermark_pos[0];
                $y = $this->watermark_pos[1];
            } elseif ($this->watermark_pos == 'F') { // centred on printable area
                if ($this->ColActive) { // *COLUMNS*
                    if (($this->mirrorMargins) && (($this->page) % 2 == 0)) {
                        $xadj = $this->DeflMargin - $this->DefrMargin;
                    } // *COLUMNS*
                    else {
                        $xadj = 0;
                    } // *COLUMNS*
                    $x = ($this->DeflMargin - $xadj + ($this->w - ($this->DeflMargin + $this->DefrMargin)) / 2) - ($w / 2); // *COLUMNS*
                } // *COLUMNS*
                else {  // *COLUMNS*
                    $x = ($this->lMargin + ($this->pgwidth) / 2) - ($w / 2);
                } // *COLUMNS*
                $y = ($this->tMargin + ($this->h - ($this->tMargin + $this->bMargin)) / 2) - ($h / 2);
            } else { // default P - centred on whole page
                $x = ($this->w / 2) - ($w / 2);
                $y = ($this->h / 2) - ($h / 2);
            }
            /* -- IMAGES-WMF -- */
            if ($info['type'] == 'wmf') {
                $sx = $w * Mpdf::SCALE / $info['w'];
                $sy = -$h * Mpdf::SCALE / $info['h'];
                $outstring = sprintf('q %.3F 0 0 %.3F %.3F %.3F cm /FO%d Do Q', $sx, $sy, $x * Mpdf::SCALE - $sx * $info['x'], (($this->h - $y) * Mpdf::SCALE) - $sy * $info['y'], $info['i']);
            } else { 			/* -- END IMAGES-WMF -- */
                if ($info['type'] == 'svg') {
                    $sx = $w * Mpdf::SCALE / $info['w'];
                    $sy = -$h * Mpdf::SCALE / $info['h'];
                    $outstring = sprintf('q %.3F 0 0 %.3F %.3F %.3F cm /FO%d Do Q', $sx, $sy, $x * Mpdf::SCALE - $sx * $info['x'], (($this->h - $y) * Mpdf::SCALE) - $sy * $info['y'], $info['i']);
                } else {
                    $outstring = sprintf("q %.3F 0 0 %.3F %.3F %.3F cm /I%d Do Q", $w * Mpdf::SCALE, $h * Mpdf::SCALE, $x * Mpdf::SCALE, ($this->h - ($y + $h)) * Mpdf::SCALE, $info['i']);
                }
            }

            if ($this->watermarkImgBehind) {
                $outstring = $this->watermarkImgAlpha . "\n" . $outstring . "\n" . $this->SetAlpha(1, 'Normal', true) . "\n";
                $this->pages[$this->page] = preg_replace('/(___BACKGROUND___PATTERNS' . $this->uniqstr . ')/', "\n" . $outstring . "\n" . '\\1', $this->pages[$this->page]);
            } else {
                $this->writer->write($outstring);
            }

            return 0;
        } // end of IF watermark
        /* -- END WATERMARK -- */

        if ($constrain) {
            // Automatically resize to maximum dimensions of page if too large
            if (isset($this->blk[$this->blklvl]['inner_width']) && $this->blk[$this->blklvl]['inner_width']) {
                $maxw = $this->blk[$this->blklvl]['inner_width'];
            } else {
                $maxw = $this->pgwidth;
            }
            if ($w > $maxw) {
                $w = $maxw;
                $h = abs($w * $info['h'] / $info['w']);
            }
            if ($h > $this->h - ($this->tMargin + $this->bMargin + 1)) {  // see below - +10 to avoid drawing too close to border of page
                $h = $this->h - ($this->tMargin + $this->bMargin + 1);
                if ($this->fullImageHeight) {
                    $h = $this->fullImageHeight;
                }
                $w = abs($h * $info['w'] / $info['h']);
            }


            // Avoid drawing out of the paper(exceeding width limits).
            // if ( ($x + $w) > $this->fw ) {
            if (($x + $w) > $this->w) {
                $x = $this->lMargin;
                $y += 5;
            }

            $changedpage = false;
            $oldcolumn = $this->CurrCol;
            // Avoid drawing out of the page.
            if ($y + $h > $this->PageBreakTrigger and ! $this->InFooter and $this->AcceptPageBreak()) {
                $this->AddPage($this->CurOrientation);
                // Added to correct for OddEven Margins
                $x = $x + $this->MarginCorrection;
                $y = $this->tMargin; // mPDF 5.7.3
                $changedpage = true;
            }
            /* -- COLUMNS -- */
            // COLS
            // COLUMN CHANGE
            if ($this->CurrCol != $oldcolumn) {
                $y = $this->y0;
                $x += $this->ChangeColumn * ($this->ColWidth + $this->ColGap);
                $this->x += $this->ChangeColumn * ($this->ColWidth + $this->ColGap);
            }
            /* -- END COLUMNS -- */
        } // end of IF constrain

        /* -- IMAGES-WMF -- */
        if ($info['type'] == 'wmf') {
            $sx = $w * Mpdf::SCALE / $info['w'];
            $sy = -$h * Mpdf::SCALE / $info['h'];
            $outstring = sprintf('q %.3F 0 0 %.3F %.3F %.3F cm /FO%d Do Q', $sx, $sy, $x * Mpdf::SCALE - $sx * $info['x'], (($this->h - $y) * Mpdf::SCALE) - $sy * $info['y'], $info['i']);
        } else { 		/* -- END IMAGES-WMF -- */
            if ($info['type'] == 'svg') {
                $sx = $w * Mpdf::SCALE / $info['w'];
                $sy = -$h * Mpdf::SCALE / $info['h'];
                $outstring = sprintf('q %.3F 0 0 %.3F %.3F %.3F cm /FO%d Do Q', $sx, $sy, $x * Mpdf::SCALE - $sx * $info['x'], (($this->h - $y) * Mpdf::SCALE) - $sy * $info['y'], $info['i']);
            } else {
                $outstring = sprintf("q %.3F 0 0 %.3F %.3F %.3F cm /I%d Do Q", $w * Mpdf::SCALE, $h * Mpdf::SCALE, $x * Mpdf::SCALE, ($this->h - ($y + $h)) * Mpdf::SCALE, $info['i']);
            }
        }

        if ($paint) {
            $this->writer->write($outstring);
            if ($link) {
                $this->Link($x, $y, $w, $h, $link);
            }

            // Avoid writing text on top of the image. // THIS WAS OUTSIDE THE if ($paint) bit!!!!!!!!!!!!!!!!
            $this->y = $y + $h;
        }

        // Return width-height array
        $sizesarray['WIDTH'] = $w;
        $sizesarray['HEIGHT'] = $h;
        $sizesarray['X'] = $x; // Position before painting image
        $sizesarray['Y'] = $y; // Position before painting image
        $sizesarray['OUTPUT'] = $outstring;

        $sizesarray['IMAGE_ID'] = $info['i'];
        $sizesarray['itype'] = $info['type'];
        $sizesarray['set-dpi'] = (isset($info['set-dpi']) ? $info['set-dpi'] : 0);
        return $sizesarray;
    }

    // =============================================================
    // =============================================================
    // =============================================================
    // =============================================================
    // =============================================================
    /* -- HTML-CSS -- */

    function _getObjAttr($t)
    {
        $c = explode("\xbb\xa4\xac", $t, 2);
        $c = explode(",", $c[1], 2);
        foreach ($c as $v) {
            $v = explode("=", $v, 2);
            $sp[$v[0]] = $v[1];
        }
        return (unserialize($sp['objattr']));
    }

    function inlineObject($type, $x, $y, $objattr, $Lmargin, $widthUsed, $maxWidth, $lineHeight, $paint = false, $is_table = false)
    {
        if ($is_table) {
            $k = $this->shrin_k;
        } else {
            $k = 1;
        }

        // NB $x is only used when paint=true
        // Lmargin not used
        $w = 0;
        if (isset($objattr['width'])) {
            $w = $objattr['width'] / $k;
        }
        $h = 0;
        if (isset($objattr['height'])) {
            $h = abs($objattr['height'] / $k);
        }
        $widthLeft = $maxWidth - $widthUsed;
        $maxHeight = $this->h - ($this->tMargin + $this->bMargin + 10);
        if ($this->fullImageHeight) {
            $maxHeight = $this->fullImageHeight;
        }
        // For Images
        if (isset($objattr['border_left'])) {
            $extraWidth = ($objattr['border_left']['w'] + $objattr['border_right']['w'] + $objattr['margin_left'] + $objattr['margin_right']) / $k;
            $extraHeight = ($objattr['border_top']['w'] + $objattr['border_bottom']['w'] + $objattr['margin_top'] + $objattr['margin_bottom']) / $k;

            if ($type == 'image' || $type == 'barcode' || $type == 'textcircle') {
                $extraWidth += ($objattr['padding_left'] + $objattr['padding_right']) / $k;
                $extraHeight += ($objattr['padding_top'] + $objattr['padding_bottom']) / $k;
            }
        }

        if (!isset($objattr['vertical-align'])) {
            if ($objattr['type'] == 'select') {
                $objattr['vertical-align'] = 'M';
            } else {
                $objattr['vertical-align'] = 'BS';
            }
        } // mPDF 6

        if ($type == 'image' || (isset($objattr['subtype']) && $objattr['subtype'] == 'IMAGE')) {
            if (isset($objattr['itype']) && ($objattr['itype'] == 'wmf' || $objattr['itype'] == 'svg')) {
                $file = $objattr['file'];
                $info = $this->formobjects[$file];
            } elseif (isset($objattr['file'])) {
                $file = $objattr['file'];
                $info = $this->images[$file];
            }
        }
        if ($type == 'annot' || $type == 'bookmark' || $type == 'indexentry' || $type == 'toc') {
            $w = 0.00001;
            $h = 0.00001;
        }

        // TEST whether need to skipline
        if (!$paint) {
            if ($type == 'hr') { // always force new line
                if (($y + $h + $lineHeight > $this->PageBreakTrigger) && !$this->InFooter && !$is_table) {
                    return [-2, $w, $h];
                } // New page + new line
                else {
                    return [1, $w, $h];
                } // new line
            } else {
                // LIST MARKERS	// mPDF 6  Lists
                $displayheight = $h;
                $displaywidth = $w;
                if ($objattr['type'] == 'image' && isset($objattr['listmarker']) && $objattr['listmarker']) {
                    $displayheight = 0;
                    if ($objattr['listmarkerposition'] == 'outside') {
                        $displaywidth = 0;
                    }
                }

                if ($widthUsed > 0 && $displaywidth > $widthLeft && (!$is_table || $type != 'image')) {  // New line needed
                    // mPDF 6  Lists
                    if (($y + $displayheight + $lineHeight > $this->PageBreakTrigger) && !$this->InFooter) {
                        return [-2, $w, $h];
                    } // New page + new line
                    return [1, $w, $h]; // new line
                } elseif ($widthUsed > 0 && $displaywidth > $widthLeft && $is_table) {  // New line needed in TABLE
                    return [1, $w, $h]; // new line
                } // Will fit on line but NEW PAGE REQUIRED
                elseif (($y + $displayheight > $this->PageBreakTrigger) && !$this->InFooter && !$is_table) {
                    return [-1, $w, $h];
                } // mPDF 6  Lists
                else {
                    return [0, $w, $h];
                }
            }
        }

        if ($type == 'annot' || $type == 'bookmark' || $type == 'indexentry' || $type == 'toc') {
            $w = 0.00001;
            $h = 0.00001;
            $objattr['BORDER-WIDTH'] = 0;
            $objattr['BORDER-HEIGHT'] = 0;
            $objattr['BORDER-X'] = $x;
            $objattr['BORDER-Y'] = $y;
            $objattr['INNER-WIDTH'] = 0;
            $objattr['INNER-HEIGHT'] = 0;
            $objattr['INNER-X'] = $x;
            $objattr['INNER-Y'] = $y;
        }

        if ($type == 'image') {
            // Automatically resize to width remaining
            if ($w > ($widthLeft + 0.0001) && !$is_table) { // mPDF 5.7.4  0.0001 to allow for rounding errors when w==maxWidth
                $w = $widthLeft;
                $h = abs($w * $info['h'] / $info['w']);
            }
            $img_w = $w - $extraWidth;
            $img_h = $h - $extraHeight;

            $objattr['BORDER-WIDTH'] = $img_w + $objattr['padding_left'] / $k + $objattr['padding_right'] / $k + (($objattr['border_left']['w'] / $k + $objattr['border_right']['w'] / $k) / 2);
            $objattr['BORDER-HEIGHT'] = $img_h + $objattr['padding_top'] / $k + $objattr['padding_bottom'] / $k + (($objattr['border_top']['w'] / $k + $objattr['border_bottom']['w'] / $k) / 2);
            $objattr['BORDER-X'] = $x + $objattr['margin_left'] / $k + (($objattr['border_left']['w'] / $k) / 2);
            $objattr['BORDER-Y'] = $y + $objattr['margin_top'] / $k + (($objattr['border_top']['w'] / $k) / 2);
            $objattr['INNER-WIDTH'] = $img_w;
            $objattr['INNER-HEIGHT'] = $img_h;
            $objattr['INNER-X'] = $x + $objattr['padding_left'] / $k + $objattr['margin_left'] / $k + ($objattr['border_left']['w'] / $k);
            $objattr['INNER-Y'] = $y + $objattr['padding_top'] / $k + $objattr['margin_top'] / $k + ($objattr['border_top']['w'] / $k);
            $objattr['ID'] = $info['i'];
        }

        if ($type == 'input' && $objattr['subtype'] == 'IMAGE') {
            $img_w = $w - $extraWidth;
            $img_h = $h - $extraHeight;
            $objattr['BORDER-WIDTH'] = $img_w + (($objattr['border_left']['w'] / $k + $objattr['border_right']['w'] / $k) / 2);
            $objattr['BORDER-HEIGHT'] = $img_h + (($objattr['border_top']['w'] / $k + $objattr['border_bottom']['w'] / $k) / 2);
            $objattr['BORDER-X'] = $x + $objattr['margin_left'] / $k + (($objattr['border_left']['w'] / $k) / 2);
            $objattr['BORDER-Y'] = $y + $objattr['margin_top'] / $k + (($objattr['border_top']['w'] / $k) / 2);
            $objattr['INNER-WIDTH'] = $img_w;
            $objattr['INNER-HEIGHT'] = $img_h;
            $objattr['INNER-X'] = $x + $objattr['margin_left'] / $k + ($objattr['border_left']['w'] / $k);
            $objattr['INNER-Y'] = $y + $objattr['margin_top'] / $k + ($objattr['border_top']['w'] / $k);
            $objattr['ID'] = $info['i'];
        }

        if ($type == 'barcode' || $type == 'textcircle') {
            $b_w = $w - $extraWidth;
            $b_h = $h - $extraHeight;
            $objattr['BORDER-WIDTH'] = $b_w + $objattr['padding_left'] / $k + $objattr['padding_right'] / $k + (($objattr['border_left']['w'] / $k + $objattr['border_right']['w'] / $k) / 2);
            $objattr['BORDER-HEIGHT'] = $b_h + $objattr['padding_top'] / $k + $objattr['padding_bottom'] / $k + (($objattr['border_top']['w'] / $k + $objattr['border_bottom']['w'] / $k) / 2);
            $objattr['BORDER-X'] = $x + $objattr['margin_left'] / $k + (($objattr['border_left']['w'] / $k) / 2);
            $objattr['BORDER-Y'] = $y + $objattr['margin_top'] / $k + (($objattr['border_top']['w'] / $k) / 2);
            $objattr['INNER-X'] = $x + $objattr['padding_left'] / $k + $objattr['margin_left'] / $k + ($objattr['border_left']['w'] / $k);
            $objattr['INNER-Y'] = $y + $objattr['padding_top'] / $k + $objattr['margin_top'] / $k + ($objattr['border_top']['w'] / $k);
            $objattr['INNER-WIDTH'] = $b_w;
            $objattr['INNER-HEIGHT'] = $b_h;
        }


        if ($type == 'textarea') {
            // Automatically resize to width remaining
            if ($w > $widthLeft && !$is_table) {
                $w = $widthLeft;
            }
            // This used to resize height to maximum remaining on page ? why. Causes problems when in table and causing a new column
            // if (($y + $h > $this->PageBreakTrigger) && !$this->InFooter) {
            // 	$h=$this->h - $y - $this->bMargin;
            // }
        }

        if ($type == 'hr') {
            if ($is_table) {
                $objattr['INNER-WIDTH'] = $maxWidth * $objattr['W-PERCENT'] / 100;
                $objattr['width'] = $objattr['INNER-WIDTH'];
                $w = $maxWidth;
            } else {
                if ($w > $maxWidth) {
                    $w = $maxWidth;
                }
                $objattr['INNER-WIDTH'] = $w;
                $w = $maxWidth;
            }
        }



        if (($type == 'select') || ($type == 'input' && ($objattr['subtype'] == 'TEXT' || $objattr['subtype'] == 'PASSWORD'))) {
            // Automatically resize to width remaining
            if ($w > $widthLeft && !$is_table) {
                $w = $widthLeft;
            }
        }

        if ($type == 'textarea' || $type == 'select' || $type == 'input') {
            if (isset($objattr['fontsize'])) {
                $objattr['fontsize'] /= $k;
            }
            if (isset($objattr['linewidth'])) {
                $objattr['linewidth'] /= $k;
            }
        }

        if (!isset($objattr['BORDER-Y'])) {
            $objattr['BORDER-Y'] = 0;
        }
        if (!isset($objattr['BORDER-X'])) {
            $objattr['BORDER-X'] = 0;
        }
        if (!isset($objattr['INNER-Y'])) {
            $objattr['INNER-Y'] = 0;
        }
        if (!isset($objattr['INNER-X'])) {
            $objattr['INNER-X'] = 0;
        }

        // Return width-height array
        $objattr['OUTER-WIDTH'] = $w;
        $objattr['OUTER-HEIGHT'] = $h;
        $objattr['OUTER-X'] = $x;
        $objattr['OUTER-Y'] = $y;
        return $objattr;
    }

    /* -- END HTML-CSS -- */

    // =============================================================
    // =============================================================
    // =============================================================
    // =============================================================
    // =============================================================

    function SetLineJoin($mode = 0)
    {
        $s = sprintf('%d j', $mode);
        if ($this->page > 0 && ((isset($this->pageoutput[$this->page]['LineJoin']) && $this->pageoutput[$this->page]['LineJoin'] != $s) || !isset($this->pageoutput[$this->page]['LineJoin']))) {
            $this->writer->write($s);
        }
        $this->pageoutput[$this->page]['LineJoin'] = $s;
    }

    function SetLineCap($mode = 2)
    {
        $s = sprintf('%d J', $mode);
        if ($this->page > 0 && ((isset($this->pageoutput[$this->page]['LineCap']) && $this->pageoutput[$this->page]['LineCap'] != $s) || !isset($this->pageoutput[$this->page]['LineCap']))) {
            $this->writer->write($s);
        }
        $this->pageoutput[$this->page]['LineCap'] = $s;
    }

    function SetDash($black = false, $white = false)
    {
        if ($black and $white) {
            $s = sprintf('[%.3F %.3F] 0 d', $black * Mpdf::SCALE, $white * Mpdf::SCALE);
        } else {
            $s = '[] 0 d';
        }
        if ($this->page > 0 && ((isset($this->pageoutput[$this->page]['Dash']) && $this->pageoutput[$this->page]['Dash'] != $s) || !isset($this->pageoutput[$this->page]['Dash']))) {
            $this->writer->write($s);
        }
        $this->pageoutput[$this->page]['Dash'] = $s;
    }

    function SetDisplayPreferences($preferences)
    {
        // String containing any or none of /HideMenubar/HideToolbar/HideWindowUI/DisplayDocTitle/CenterWindow/FitWindow
        $this->DisplayPreferences .= $preferences;
    }

    function Ln($h = '', $collapsible = 0)
    {
        // Added collapsible to allow collapsible top-margin on new page
        // Line feed; default value is last cell height
        $this->x = $this->lMargin + $this->blk[$this->blklvl]['outer_left_margin'];
        if ($collapsible && ($this->y == $this->tMargin) && (!$this->ColActive)) {
            $h = 0;
        }
        if (is_string($h)) {
            $this->y+=$this->lasth;
        } else {
            $this->y+=$h;
        }
    }

    /* -- HTML-CSS -- */

    function DivLn($h, $level = -3, $move_y = true, $collapsible = false, $state = 0)
    {
        // $state = 0 normal; 1 top; 2 bottom; 3 top and bottom
        // Used in Columns and keep-with-table i.e. "kwt"
        // writes background block by block so it can be repositioned
        // and also used in writingFlowingBlock at top and bottom of blocks to move y (not to draw/paint anything)
        // adds lines (y) where DIV bgcolors are filled in
        // this->x is returned as it was
        // allows .00001 as nominal height used for bookmarks/annotations etc.
        if ($collapsible && (sprintf("%0.4f", $this->y) == sprintf("%0.4f", $this->tMargin)) && (!$this->ColActive)) {
            return;
        }

        // mPDF 6 Columns
        //   if ($collapsible && (sprintf("%0.4f", $this->y)==sprintf("%0.4f", $this->y0)) && ($this->ColActive) && $this->CurrCol == 0) { return; }	// *COLUMNS*
        if ($collapsible && (sprintf("%0.4f", $this->y) == sprintf("%0.4f", $this->y0)) && ($this->ColActive)) {
            return;
        } // *COLUMNS*
        // Still use this method if columns or keep-with-table, as it allows repositioning later
        // otherwise, now uses PaintDivBB()
        if (!$this->ColActive && !$this->kwt) {
            if ($move_y && !$this->ColActive) {
                $this->y += $h;
            }
            return;
        }

        if ($level == -3) {
            $level = $this->blklvl;
        }
        $firstblockfill = $this->GetFirstBlockFill();
        if ($firstblockfill && $this->blklvl > 0 && $this->blklvl >= $firstblockfill) {
            $last_x = 0;
            $last_w = 0;
            $last_fc = $this->FillColor;
            $bak_x = $this->x;
            $bak_h = $this->divheight;
            $this->divheight = 0; // Temporarily turn off divheight - as Cell() uses it to check for PageBreak
            for ($blvl = $firstblockfill; $blvl <= $level; $blvl++) {
                $this->x = $this->lMargin + $this->blk[$blvl]['outer_left_margin'];
                // mPDF 6
                if ($this->blk[$blvl]['bgcolor']) {
                    $this->SetFColor($this->blk[$blvl]['bgcolorarray']);
                }
                if ($last_x != ($this->lMargin + $this->blk[$blvl]['outer_left_margin']) || ($last_w != $this->blk[$blvl]['width']) || $last_fc != $this->FillColor || (isset($this->blk[$blvl]['border_top']['s']) && $this->blk[$blvl]['border_top']['s']) || (isset($this->blk[$blvl]['border_bottom']['s']) && $this->blk[$blvl]['border_bottom']['s']) || (isset($this->blk[$blvl]['border_left']['s']) && $this->blk[$blvl]['border_left']['s']) || (isset($this->blk[$blvl]['border_right']['s']) && $this->blk[$blvl]['border_right']['s'])) {
                    $x = $this->x;
                    $this->Cell(($this->blk[$blvl]['width']), $h, '', '', 0, '', 1);
                    $this->x = $x;
                    if (!$this->keep_block_together && !$this->writingHTMLheader && !$this->writingHTMLfooter) {
                        // $state = 0 normal; 1 top; 2 bottom; 3 top and bottom
                        if ($blvl == $this->blklvl) {
                            $this->PaintDivLnBorder($state, $blvl, $h);
                        } else {
                            $this->PaintDivLnBorder(0, $blvl, $h);
                        }
                    }
                }
                $last_x = $this->lMargin + $this->blk[$blvl]['outer_left_margin'];
                $last_w = $this->blk[$blvl]['width'];
                $last_fc = $this->FillColor;
            }
            // Reset current block fill
            if (isset($this->blk[$this->blklvl]['bgcolorarray'])) {
                $bcor = $this->blk[$this->blklvl]['bgcolorarray'];
                $this->SetFColor($bcor);
            }
            $this->x = $bak_x;
            $this->divheight = $bak_h;
        }
        if ($move_y) {
            $this->y += $h;
        }
    }

    /* -- END HTML-CSS -- */

    function SetX($x)
    {
        // Set x position
        if ($x >= 0) {
            $this->x = $x;
        } else {
            $this->x = $this->w + $x;
        }
    }

    function SetY($y)
    {
        // Set y position and reset x
        $this->x = $this->lMargin;
        if ($y >= 0) {
            $this->y = $y;
        } else {
            $this->y = $this->h + $y;
        }
    }

    function SetXY($x, $y)
    {
        // Set x and y positions
        $this->SetY($y);
        $this->SetX($x);
    }

    function Output($name = '', $dest = '')
    {
        $this->logger->debug(sprintf('PDF generated in %.6F seconds', microtime(true) - $this->time0), ['context' => LogContext::STATISTICS]);

        // Finish document if necessary
        if ($this->state < 3) {
            $this->Close();
        }

        if ($this->debug && error_get_last()) {
            $e = error_get_last();
            if (($e['type'] < 2048 && $e['type'] != 8) || (intval($e['type']) & intval(ini_get("error_reporting")))) {
                throw new \Mpdf\MpdfException(
                    sprintf('Error detected. PDF file generation aborted: %s', $e['message']),
                    $e['type'],
                    1,
                    $e['file'],
                    $e['line']
                );
            }
        }

        if (($this->PDFA || $this->PDFX) && $this->encrypted) {
            throw new \Mpdf\MpdfException('PDF/A1-b or PDF/X1-a does not permit encryption of documents.');
        }

        if (count($this->PDFAXwarnings) && (($this->PDFA && !$this->PDFAauto) || ($this->PDFX && !$this->PDFXauto))) {
            if ($this->PDFA) {
                $standard = 'PDFA/1-b';
                $option = '$mpdf->PDFAauto';
            } else {
                $standard = 'PDFX/1-a ';
                $option = '$mpdf->PDFXauto';
            }

            $this->logger->warning(sprintf('PDF could not be generated as it stands as a %s compliant file.', $standard), ['context' => LogContext::PDFA_PDFX]);
            $this->logger->warning(sprintf('These issues can be automatically fixed by mPDF using %s = true;', $option), ['context' => LogContext::PDFA_PDFX]);
            $this->logger->warning(sprintf('Action that mPDF will take to automatically force %s compliance are shown further in the log.', $standard), ['context' => LogContext::PDFA_PDFX]);

            $this->PDFAXwarnings = array_unique($this->PDFAXwarnings);
            foreach ($this->PDFAXwarnings as $w) {
                $this->logger->warning($w, ['context' => LogContext::PDFA_PDFX]);
            }

            throw new \Mpdf\MpdfException('PDFA/PDFX warnings generated. See log for further details');
        }

        $this->logger->debug(sprintf('Compiled in %.6F seconds', microtime(true) - $this->time0), ['context' => LogContext::STATISTICS]);
        $this->logger->debug(sprintf('Peak Memory usage %s MB', number_format(memory_get_peak_usage(true) / (1024 * 1024), 2)), ['context' => LogContext::STATISTICS]);
        $this->logger->debug(sprintf('PDF file size %s kB', number_format(strlen($this->buffer) / 1024)), ['context' => LogContext::STATISTICS]);
        $this->logger->debug(sprintf('%d fonts used', count($this->fonts)), ['context' => LogContext::STATISTICS]);

        if (is_bool($dest)) {
            $dest = $dest ? Destination::DOWNLOAD : Destination::FILE;
        }

        $dest = strtoupper($dest);
        if (empty($dest)) {
            if (empty($name)) {
                $name = 'mpdf.pdf';
                $dest = Destination::INLINE;
            } else {
                $dest = Destination::FILE;
            }
        }

        switch ($dest) {

            case Destination::INLINE:

                if (headers_sent($filename, $line)) {
                    throw new \Mpdf\MpdfException(
                        sprintf('Data has already been sent to output (%s at line %s), unable to output PDF file', $filename, $line)
                    );
                }

                if ($this->debug && !$this->allow_output_buffering && ob_get_contents()) {
                    throw new \Mpdf\MpdfException('Output has already been sent from the script - PDF file generation aborted.');
                }

                // We send to a browser
                if (PHP_SAPI !== 'cli') {
                    header('Content-Type: application/pdf');

                    if (!isset($_SERVER['HTTP_ACCEPT_ENCODING']) || empty($_SERVER['HTTP_ACCEPT_ENCODING'])) {
                        // don't use length if server using compression
                        header('Content-Length: ' . strlen($this->buffer));
                    }

                    header('Content-disposition: inline; filename="' . $name . '"');
                    header('Cache-Control: public, must-revalidate, max-age=0');
                    header('Pragma: public');
                    header('X-Generator: mPDF' . ($this->exposeVersion ? (' ' . static::VERSION) : ''));
                    header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
                    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
                }

                echo $this->buffer;

                break;

            case Destination::DOWNLOAD:

                if (headers_sent()) {
                    throw new \Mpdf\MpdfException('Data has already been sent to output, unable to output PDF file');
                }

                header('Content-Description: File Transfer');
                header('Content-Transfer-Encoding: binary');
                header('Cache-Control: public, must-revalidate, max-age=0');
                header('Pragma: public');
                header('X-Generator: mPDF' . ($this->exposeVersion ? (' ' . static::VERSION) : ''));
                header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
                header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
                header('Content-Type: application/pdf');

                if (!isset($_SERVER['HTTP_ACCEPT_ENCODING']) || empty($_SERVER['HTTP_ACCEPT_ENCODING'])) {
                    // don't use length if server using compression
                    header('Content-Length: ' . strlen($this->buffer));
                }

                header('Content-Disposition: attachment; filename="' . $name . '"');

                echo $this->buffer;

                break;

            case Destination::FILE:
                $f = fopen($name, 'wb');

                if (!$f) {
                    throw new \Mpdf\MpdfException(sprintf('Unable to create output file %s', $name));
                }

                fwrite($f, $this->buffer, strlen($this->buffer));
                fclose($f);

                break;

            case Destination::STRING_RETURN:
                $this->cache->clearOld();
                return $this->buffer;

            default:
                throw new \Mpdf\MpdfException(sprintf('Incorrect output destination %s', $dest));
        }

        $this->cache->clearOld();
    }

    // *****************************************************************************
    //                                                                             *
    //                             Protected methods                               *
    //                                                                             *
    // *****************************************************************************
    function _dochecks()
    {
        // Check for locale-related bug
        if (1.1 == 1) {
            throw new \Mpdf\MpdfException('Do not alter the locale before including mPDF');
        }

        // Check for decimal separator
        if (sprintf('%.1f', 1.0) != '1.0') {
            setlocale(LC_NUMERIC, 'C');
        }

        if (ini_get('mbstring.func_overload')) {
            throw new \Mpdf\MpdfException('Mpdf cannot function properly with mbstring.func_overload enabled');
        }

        if (!function_exists('mb_substr')) {
            throw new \Mpdf\MpdfException('mbstring extension must be loaded in order to run mPDF');
        }
    }

    function _puthtmlheaders()
    {
        $this->state = 2;
        $nb = $this->page;
        for ($n = 1; $n <= $nb; $n++) {
            if ($this->mirrorMargins && $n % 2 == 0) {
                $OE = 'E';
            } // EVEN
            else {
                $OE = 'O';
            }
            $this->page = $n;
            $pn = $this->docPageNum($n);
            if ($pn) {
                $pnstr = $this->pagenumPrefix . $pn . $this->pagenumSuffix;
            } else {
                $pnstr = '';
            }

            $pnt = $this->docPageNumTotal($n);

            if ($pnt) {
                $pntstr = $this->nbpgPrefix . $pnt . $this->nbpgSuffix;
            } else {
                $pntstr = '';
            }

            if (isset($this->saveHTMLHeader[$n][$OE])) {
                $html = isset($this->saveHTMLHeader[$n][$OE]['html']) ? $this->saveHTMLHeader[$n][$OE]['html'] : '';
                $this->lMargin = $this->saveHTMLHeader[$n][$OE]['ml'];
                $this->rMargin = $this->saveHTMLHeader[$n][$OE]['mr'];
                $this->tMargin = $this->saveHTMLHeader[$n][$OE]['mh'];
                $this->bMargin = $this->saveHTMLHeader[$n][$OE]['mf'];
                $this->margin_header = $this->saveHTMLHeader[$n][$OE]['mh'];
                $this->margin_footer = $this->saveHTMLHeader[$n][$OE]['mf'];
                $this->w = $this->saveHTMLHeader[$n][$OE]['pw'];
                $this->h = $this->saveHTMLHeader[$n][$OE]['ph'];
                $rotate = (isset($this->saveHTMLHeader[$n][$OE]['rotate']) ? $this->saveHTMLHeader[$n][$OE]['rotate'] : null);
                $this->Reset();
                $this->pageoutput[$n] = [];
                $this->pgwidth = $this->w - $this->lMargin - $this->rMargin;
                $this->x = $this->lMargin;
                $this->y = $this->margin_header;
                $html = str_replace('{PAGENO}', $pnstr, $html);
                $html = str_replace($this->aliasNbPgGp, $pntstr, $html); // {nbpg}
                $html = str_replace($this->aliasNbPg, $nb, $html); // {nb}
                $html = preg_replace_callback('/\{DATE\s+(.*?)\}/', [$this, 'date_callback'], $html); // mPDF 5.7

                $this->HTMLheaderPageLinks = [];
                $this->HTMLheaderPageAnnots = [];
                $this->HTMLheaderPageForms = [];
                $this->pageBackgrounds = [];

                $this->writingHTMLheader = true;
                $this->WriteHTML($html, HTMLParserMode::HTML_HEADER_BUFFER);
                $this->writingHTMLheader = false;
                $this->Reset();
                $this->pageoutput[$n] = [];

                $s = $this->PrintPageBackgrounds();
                $this->headerbuffer = $s . $this->headerbuffer;
                $os = '';
                if ($rotate) {
                    $os .= sprintf('q 0 -1 1 0 0 %.3F cm ', ($this->w * Mpdf::SCALE));
                    // To rotate the other way i.e. Header to left of page:
                    // $os .= sprintf('q 0 1 -1 0 %.3F %.3F cm ',($this->h*Mpdf::SCALE), (($this->rMargin - $this->lMargin )*Mpdf::SCALE));
                }
                $os .= $this->headerbuffer;
                if ($rotate) {
                    $os .= ' Q' . "\n";
                }

                // Writes over the page background but behind any other output on page
                $os = preg_replace(['/\\\\/', '/\$/'], ['\\\\\\\\', '\\\\$'], $os);

                $this->pages[$n] = preg_replace('/(___HEADER___MARKER' . $this->uniqstr . ')/', "\n" . $os . "\n" . '\\1', $this->pages[$n]);

                $lks = $this->HTMLheaderPageLinks;
                foreach ($lks as $lk) {
                    if ($rotate) {
                        $lw = $lk[2];
                        $lh = $lk[3];
                        $lk[2] = $lh;
                        $lk[3] = $lw; // swap width and height
                        $ax = $lk[0] / Mpdf::SCALE;
                        $ay = $lk[1] / Mpdf::SCALE;
                        $bx = $ay - ($lh / Mpdf::SCALE);
                        $by = $this->w - $ax;
                        $lk[0] = $bx * Mpdf::SCALE;
                        $lk[1] = ($this->h - $by) * Mpdf::SCALE - $lw;
                    }
                    $this->PageLinks[$n][] = $lk;
                }
                /* -- FORMS -- */
                foreach ($this->HTMLheaderPageForms as $f) {
                    $this->form->forms[$f['n']] = $f;
                }
                /* -- END FORMS -- */
            }

            if (isset($this->saveHTMLFooter[$n][$OE])) {

                $html = $this->saveHTMLFooter[$this->page][$OE]['html'];

                $this->lMargin = $this->saveHTMLFooter[$n][$OE]['ml'];
                $this->rMargin = $this->saveHTMLFooter[$n][$OE]['mr'];
                $this->tMargin = $this->saveHTMLFooter[$n][$OE]['mh'];
                $this->bMargin = $this->saveHTMLFooter[$n][$OE]['mf'];
                $this->margin_header = $this->saveHTMLFooter[$n][$OE]['mh'];
                $this->margin_footer = $this->saveHTMLFooter[$n][$OE]['mf'];
                $this->w = $this->saveHTMLFooter[$n][$OE]['pw'];
                $this->h = $this->saveHTMLFooter[$n][$OE]['ph'];
                $rotate = (isset($this->saveHTMLFooter[$n][$OE]['rotate']) ? $this->saveHTMLFooter[$n][$OE]['rotate'] : null);
                $this->Reset();
                $this->pageoutput[$n] = [];
                $this->pgwidth = $this->w - $this->lMargin - $this->rMargin;
                $this->x = $this->lMargin;
                $top_y = $this->y = $this->h - $this->margin_footer;

                // if bottom-margin==0, corrects to avoid division by zero
                if ($this->y == $this->h) {
                    $top_y = $this->y = ($this->h + 0.01);
                }

                $html = str_replace('{PAGENO}', $pnstr, $html);
                $html = str_replace($this->aliasNbPgGp, $pntstr, $html); // {nbpg}
                $html = str_replace($this->aliasNbPg, $nb, $html); // {nb}
                $html = preg_replace_callback('/\{DATE\s+(.*?)\}/', [$this, 'date_callback'], $html); // mPDF 5.7


                $this->HTMLheaderPageLinks = [];
                $this->HTMLheaderPageAnnots = [];
                $this->HTMLheaderPageForms = [];
                $this->pageBackgrounds = [];

                $this->writingHTMLfooter = true;
                $this->InFooter = true;
                $this->WriteHTML($html, HTMLParserMode::HTML_HEADER_BUFFER);
                $this->InFooter = false;
                $this->Reset();
                $this->pageoutput[$n] = [];

                $fheight = $this->y - $top_y;
                $adj = -$fheight;

                $s = $this->PrintPageBackgrounds(-$adj);
                $this->headerbuffer = $s . $this->headerbuffer;
                $this->writingHTMLfooter = false; // mPDF 5.7.3  (moved after PrintPageBackgrounds so can adjust position of images in footer)

                $os = '';
                $os .= $this->StartTransform(true) . "\n";

                if ($rotate) {
                    $os .= sprintf('q 0 -1 1 0 0 %.3F cm ', ($this->w * Mpdf::SCALE));
                    // To rotate the other way i.e. Header to left of page:
                    // $os .= sprintf('q 0 1 -1 0 %.3F %.3F cm ',($this->h*Mpdf::SCALE), (($this->rMargin - $this->lMargin )*Mpdf::SCALE));
                }

                $os .= $this->transformTranslate(0, $adj, true) . "\n";
                $os .= $this->headerbuffer;

                if ($rotate) {
                    $os .= ' Q' . "\n";
                }

                $os .= $this->StopTransform(true) . "\n";

                // Writes over the page background but behind any other output on page
                $os = preg_replace(['/\\\\/', '/\$/'], ['\\\\\\\\', '\\\\$'], $os);

                $this->pages[$n] = preg_replace('/(___HEADER___MARKER' . $this->uniqstr . ')/', "\n" . $os . "\n" . '\\1', $this->pages[$n]);

                $lks = $this->HTMLheaderPageLinks;

                foreach ($lks as $lk) {

                    $lk[1] -= $adj * Mpdf::SCALE;

                    if ($rotate) {
                        $lw = $lk[2];
                        $lh = $lk[3];
                        $lk[2] = $lh;
                        $lk[3] = $lw; // swap width and height

                        $ax = $lk[0] / Mpdf::SCALE;
                        $ay = $lk[1] / Mpdf::SCALE;
                        $bx = $ay - ($lh / Mpdf::SCALE);
                        $by = $this->w - $ax;
                        $lk[0] = $bx * Mpdf::SCALE;
                        $lk[1] = ($this->h - $by) * Mpdf::SCALE - $lw;
                    }

                    $this->PageLinks[$n][] = $lk;
                }

                /* -- FORMS -- */
                foreach ($this->HTMLheaderPageForms as $f) {
                    $f['y'] += $adj;
                    $this->form->forms[$f['n']] = $f;
                }
                /* -- END FORMS -- */
            }
        }

        $this->page = $nb;
        $this->state = 1;
    }

    /* -- ANNOTATIONS -- */
    function Annotation($text, $x = 0, $y = 0, $icon = 'Note', $author = '', $subject = '', $opacity = 0, $colarray = false, $popup = '', $file = '')
    {
        if (is_array($colarray) && count($colarray) == 3) {
            $colarray = $this->colorConverter->convert('rgb(' . $colarray[0] . ',' . $colarray[1] . ',' . $colarray[2] . ')', $this->PDFAXwarnings);
        }
        if ($colarray === false) {
            $colarray = $this->colorConverter->convert('yellow', $this->PDFAXwarnings);
        }
        if ($x == 0) {
            $x = $this->x;
        }
        if ($y == 0) {
            $y = $this->y;
        }
        $page = $this->page;
        if ($page < 1) { // Document has not been started - assume it's for first page
            $page = 1;
            if ($x == 0) {
                $x = $this->lMargin;
            }
            if ($y == 0) {
                $y = $this->tMargin;
            }
        }

        if ($this->PDFA || $this->PDFX) {
            if (($this->PDFA && !$this->PDFAauto) || ($this->PDFX && !$this->PDFXauto)) {
                $this->PDFAXwarnings[] = "Annotation markers cannot be semi-transparent in PDFA1-b or PDFX/1-a, so they may make underlying text unreadable. (Annotation markers moved to right margin)";
            }
            $x = ($this->w) - $this->rMargin * 0.66;
        }
        if (!$this->annotMargin) {
            $y -= $this->FontSize / 2;
        }

        if (!$opacity && $this->annotMargin) {
            $opacity = 1;
        } elseif (!$opacity) {
            $opacity = $this->annotOpacity;
        }

        $an = ['txt' => $text, 'x' => $x, 'y' => $y, 'opt' => ['Icon' => $icon, 'T' => $author, 'Subj' => $subject, 'C' => $colarray, 'CA' => $opacity, 'popup' => $popup, 'file' => $file]];

        if ($this->keep_block_together) { // don't write yet
            return;
        } elseif ($this->table_rotate) {
            $this->tbrot_Annots[$this->page][] = $an;
            return;
        } elseif ($this->kwt) {
            $this->kwt_Annots[$this->page][] = $an;
            return;
        }

        if ($this->writingHTMLheader || $this->writingHTMLfooter) {
            $this->HTMLheaderPageAnnots[] = $an;
            return;
        }

        // Put an Annotation on the page
        $this->PageAnnots[$page][] = $an;

        /* -- COLUMNS -- */
        // Save cross-reference to Column buffer
        $ref = isset($this->PageAnnots[$this->page]) ? (count($this->PageAnnots[$this->page]) - 1) : -1;
        $this->columnAnnots[$this->CurrCol][intval($this->x)][intval($this->y)] = $ref;
        /* -- END COLUMNS -- */
    }

    /* -- END ANNOTATIONS -- */

    function _enddoc()
    {
        // @log Writing Headers & Footers

        $this->_puthtmlheaders();

        // @log Writing Pages

        // Remove references to unused fonts (usually default font)
        foreach ($this->fonts as $fk => $font) {
            if (isset($font['type']) && $font['type'] == 'TTF' && !$font['used']) {
                if ($font['sip'] || $font['smp']) {
                    foreach ($font['subsetfontids'] as $k => $fid) {
                        foreach ($this->pages as $pn => $page) {
                            $this->pages[$pn] = preg_replace('/\s\/F' . $fid . ' \d[\d.]* Tf\s/is', ' ', $this->pages[$pn]);
                        }
                    }
                } else {
                    foreach ($this->pages as $pn => $page) {
                        $this->pages[$pn] = preg_replace('/\s\/F' . $font['i'] . ' \d[\d.]* Tf\s/is', ' ', $this->pages[$pn]);
                    }
                }
            }
        }

        if (count($this->layers)) {
            foreach ($this->pages as $pn => $page) {
                preg_match_all('/\/OCZ-index \/ZI(\d+) BDC(.*?)(EMCZ)-index/is', $this->pages[$pn], $m1);
                preg_match_all('/\/OCBZ-index \/ZI(\d+) BDC(.*?)(EMCBZ)-index/is', $this->pages[$pn], $m2);
                preg_match_all('/\/OCGZ-index \/ZI(\d+) BDC(.*?)(EMCGZ)-index/is', $this->pages[$pn], $m3);
                $m = [];
                for ($i = 0; $i < 4; $i++) {
                    $m[$i] = array_merge($m1[$i], $m2[$i], $m3[$i]);
                }
                if (count($m[0])) {
                    $sortarr = [];
                    for ($i = 0; $i < count($m[0]); $i++) {
                        $key = $m[1][$i] * 2;
                        if ($m[3][$i] == 'EMCZ') {
                            $key +=2; // background first then gradient then normal
                        } elseif ($m[3][$i] == 'EMCGZ') {
                            $key +=1;
                        }
                        $sortarr[$i] = $key;
                    }
                    asort($sortarr);
                    foreach ($sortarr as $i => $k) {
                        $this->pages[$pn] = str_replace($m[0][$i], '', $this->pages[$pn]);
                        $this->pages[$pn] .= "\n" . $m[0][$i] . "\n";
                    }
                    $this->pages[$pn] = preg_replace('/\/OC[BG]{0,1}Z-index \/ZI(\d+) BDC/is', '/OC /ZI\\1 BDC ', $this->pages[$pn]);
                    $this->pages[$pn] = preg_replace('/EMC[BG]{0,1}Z-index/is', 'EMC', $this->pages[$pn]);
                }
            }
        }

        $this->pageWriter->writePages();

        // @log Writing document resources

        $this->resourceWriter->writeResources();

        // Info
        $this->writer->object();
        $this->InfoRoot = $this->n;
        $this->writer->write('<<');

        // @log Writing document info
        $this->metadataWriter->writeInfo();

        $this->writer->write('>>');
        $this->writer->write('endobj');

        // METADATA
        if ($this->PDFA || $this->PDFX) {
            $this->metadataWriter->writeMetadata();
        }

        // OUTPUTINTENT
        if ($this->PDFA || $this->PDFX || $this->ICCProfile) {
            $this->metadataWriter->writeOutputIntent();
        }

        // Associated files
        if ($this->associatedFiles) {
            $this->metadataWriter->writeAssociatedFiles();
        }

        // Catalog
        $this->writer->object();
        $this->writer->write('<<');

        // @log Writing document catalog

        $this->metadataWriter->writeCatalog();

        $this->writer->write('>>');
        $this->writer->write('endobj');

        // Cross-ref
        $o = strlen($this->buffer);
        $this->writer->write('xref');
        $this->writer->write('0 ' . ($this->n + 1));
        $this->writer->write('0000000000 65535 f ');

        for ($i = 1; $i <= $this->n; $i++) {
            $this->writer->write(sprintf('%010d 00000 n ', $this->offsets[$i]));
        }

        // Trailer
        $this->writer->write('trailer');
        $this->writer->write('<<');

        $this->metadataWriter->writeTrailer();

        $this->writer->write('>>');
        $this->writer->write('startxref');
        $this->writer->write($o);

        $this->buffer .= '%%EOF';
        $this->state = 3;
    }

    function _beginpage(
        $orientation,
        $mgl = '',
        $mgr = '',
        $mgt = '',
        $mgb = '',
        $mgh = '',
        $mgf = '',
        $ohname = '',
        $ehname = '',
        $ofname = '',
        $efname = '',
        $ohvalue = 0,
        $ehvalue = 0,
        $ofvalue = 0,
        $efvalue = 0,
        $pagesel = '',
        $newformat = ''
    ) {
        if (!($pagesel && $this->page == 1 && (sprintf("%0.4f", $this->y) == sprintf("%0.4f", $this->tMargin)))) {
            $this->page++;
            $this->pages[$this->page] = '';
        }
        $this->state = 2;
        $resetHTMLHeadersrequired = false;

        if ($newformat) {
            $this->_setPageSize($newformat, $orientation);
        }

        /* -- CSS-PAGE -- */
        // Paged media (page-box)
        if ($pagesel || (isset($this->page_box['using']) && $this->page_box['using'])) {

            if ($pagesel || $this->page == 1) {
                $first = true;
            } else {
                $first = false;
            }

            if ($this->mirrorMargins && ($this->page % 2 == 0)) {
                $oddEven = 'E';
            } else {
                $oddEven = 'O';
            }

            if ($pagesel) {
                $psel = $pagesel;
            } elseif ($this->page_box['current']) {
                $psel = $this->page_box['current'];
            } else {
                $psel = '';
            }

            [$orientation, $mgl, $mgr, $mgt, $mgb, $mgh, $mgf, $hname, $fname, $bg, $resetpagenum, $pagenumstyle, $suppress, $marks, $newformat] = $this->SetPagedMediaCSS($psel, $first, $oddEven);

            if ($this->mirrorMargins && ($this->page % 2 == 0)) {

                if ($hname) {
                    $ehvalue = 1;
                    $ehname = $hname;
                } else {
                    $ehvalue = -1;
                }

                if ($fname) {
                    $efvalue = 1;
                    $efname = $fname;
                } else {
                    $efvalue = -1;
                }

            } else {

                if ($hname) {
                    $ohvalue = 1;
                    $ohname = $hname;
                } else {
                    $ohvalue = -1;
                }

                if ($fname) {
                    $ofvalue = 1;
                    $ofname = $fname;
                } else {
                    $ofvalue = -1;
                }
            }

            if ($resetpagenum || $pagenumstyle || $suppress) {
                $this->PageNumSubstitutions[] = ['from' => ($this->page), 'reset' => $resetpagenum, 'type' => $pagenumstyle, 'suppress' => $suppress];
            }

            // PAGED MEDIA - CROP / CROSS MARKS from @PAGE
            $this->show_marks = $marks;

            // Background color
            if (isset($bg['BACKGROUND-COLOR'])) {
                $cor = $this->colorConverter->convert($bg['BACKGROUND-COLOR'], $this->PDFAXwarnings);
                if ($cor) {
                    $this->bodyBackgroundColor = $cor;
                }
            } else {
                $this->bodyBackgroundColor = false;
            }

            /* -- BACKGROUNDS -- */
            if (isset($bg['BACKGROUND-GRADIENT'])) {
                $this->bodyBackgroundGradient = $bg['BACKGROUND-GRADIENT'];
            } else {
                $this->bodyBackgroundGradient = false;
            }

            // Tiling Patterns
            if (isset($bg['BACKGROUND-IMAGE']) && $bg['BACKGROUND-IMAGE']) {
                $ret = $this->SetBackground($bg, $this->pgwidth);
                if ($ret) {
                    $this->bodyBackgroundImage = $ret;
                }
            } else {
                $this->bodyBackgroundImage = false;
            }
            /* -- END BACKGROUNDS -- */

            $this->page_box['current'] = $psel;
            $this->page_box['using'] = true;
        }
        /* -- END CSS-PAGE -- */

        // Page orientation
        if (!$orientation) {
            $orientation = $this->DefOrientation;
        } else {
            $orientation = strtoupper(substr($orientation, 0, 1));
            if ($orientation != $this->DefOrientation) {
                $this->OrientationChanges[$this->page] = true;
            }
        }

        if ($orientation != $this->CurOrientation || $newformat) {

            // Change orientation
            if ($orientation == 'P') {
                $this->wPt = $this->fwPt;
                $this->hPt = $this->fhPt;
                $this->w = $this->fw;
                $this->h = $this->fh;
                if (($this->forcePortraitHeaders || $this->forcePortraitMargins) && $this->DefOrientation == 'P') {
                    $this->tMargin = $this->orig_tMargin;
                    $this->bMargin = $this->orig_bMargin;
                    $this->DeflMargin = $this->orig_lMargin;
                    $this->DefrMargin = $this->orig_rMargin;
                    $this->margin_header = $this->orig_hMargin;
                    $this->margin_footer = $this->orig_fMargin;
                } else {
                    $resetHTMLHeadersrequired = true;
                }
            } else {
                $this->wPt = $this->fhPt;
                $this->hPt = $this->fwPt;
                $this->w = $this->fh;
                $this->h = $this->fw;

                if (($this->forcePortraitHeaders || $this->forcePortraitMargins) && $this->DefOrientation == 'P') {
                    $this->tMargin = $this->orig_lMargin;
                    $this->bMargin = $this->orig_rMargin;
                    $this->DeflMargin = $this->orig_bMargin;
                    $this->DefrMargin = $this->orig_tMargin;
                    $this->margin_header = $this->orig_hMargin;
                    $this->margin_footer = $this->orig_fMargin;
                } else {
                    $resetHTMLHeadersrequired = true;
                }
            }

            $this->CurOrientation = $orientation;
            $this->ResetMargins();
            $this->pgwidth = $this->w - $this->lMargin - $this->rMargin;
            $this->PageBreakTrigger = $this->h - $this->bMargin;
        }

        $this->pageDim[$this->page]['w'] = $this->w;
        $this->pageDim[$this->page]['h'] = $this->h;

        $this->pageDim[$this->page]['outer_width_LR'] = isset($this->page_box['outer_width_LR']) ? $this->page_box['outer_width_LR'] : 0;
        $this->pageDim[$this->page]['outer_width_TB'] = isset($this->page_box['outer_width_TB']) ? $this->page_box['outer_width_TB'] : 0;

        if (!isset($this->page_box['outer_width_LR']) && !isset($this->page_box['outer_width_TB'])) {
            $this->pageDim[$this->page]['bleedMargin'] = 0;
        } elseif ($this->bleedMargin <= $this->page_box['outer_width_LR'] && $this->bleedMargin <= $this->page_box['outer_width_TB']) {
            $this->pageDim[$this->page]['bleedMargin'] = $this->bleedMargin;
        } else {
            $this->pageDim[$this->page]['bleedMargin'] = min($this->page_box['outer_width_LR'], $this->page_box['outer_width_TB']) - 0.01;
        }

        // If Page Margins are re-defined
        // strlen()>0 is used to pick up (integer) 0, (string) '0', or set value
        if ((strlen($mgl) > 0 && $this->DeflMargin != $mgl) || (strlen($mgr) > 0 && $this->DefrMargin != $mgr) || (strlen($mgt) > 0 && $this->tMargin != $mgt) || (strlen($mgb) > 0 && $this->bMargin != $mgb) || (strlen($mgh) > 0 && $this->margin_header != $mgh) || (strlen($mgf) > 0 && $this->margin_footer != $mgf)) {

            if (strlen($mgl) > 0) {
                $this->DeflMargin = $mgl;
            }

            if (strlen($mgr) > 0) {
                $this->DefrMargin = $mgr;
            }

            if (strlen($mgt) > 0) {
                $this->tMargin = $mgt;
            }

            if (strlen($mgb) > 0) {
                $this->bMargin = $mgb;
            }

            if (strlen($mgh) > 0) {
                $this->margin_header = $mgh;
            }

            if (strlen($mgf) > 0) {
                $this->margin_footer = $mgf;
            }

            $this->ResetMargins();
            $this->SetAutoPageBreak($this->autoPageBreak, $this->bMargin);

            $this->pgwidth = $this->w - $this->lMargin - $this->rMargin;
            $resetHTMLHeadersrequired = true;
        }

        $this->ResetMargins();
        $this->pgwidth = $this->w - $this->lMargin - $this->rMargin;
        $this->SetAutoPageBreak($this->autoPageBreak, $this->bMargin);

        // Reset column top margin
        $this->y0 = $this->tMargin;

        $this->x = $this->lMargin;
        $this->y = $this->tMargin;
        $this->FontFamily = '';

        // HEADERS AND FOOTERS	// mPDF 6
        if ($ohvalue < 0 || strtoupper($ohvalue) == 'OFF') {
            $this->HTMLHeader = '';
            $resetHTMLHeadersrequired = true;
        } elseif ($ohname && $ohvalue > 0) {
            if (preg_match('/^html_(.*)$/i', $ohname, $n)) {
                $name = $n[1];
            } else {
                $name = $ohname;
            }
            if (isset($this->pageHTMLheaders[$name])) {
                $this->HTMLHeader = $this->pageHTMLheaders[$name];
            } else {
                $this->HTMLHeader = '';
            }
            $resetHTMLHeadersrequired = true;
        }

        if ($ehvalue < 0 || strtoupper($ehvalue) == 'OFF') {
            $this->HTMLHeaderE = '';
            $resetHTMLHeadersrequired = true;
        } elseif ($ehname && $ehvalue > 0) {
            if (preg_match('/^html_(.*)$/i', $ehname, $n)) {
                $name = $n[1];
            } else {
                $name = $ehname;
            }
            if (isset($this->pageHTMLheaders[$name])) {
                $this->HTMLHeaderE = $this->pageHTMLheaders[$name];
            } else {
                $this->HTMLHeaderE = '';
            }
            $resetHTMLHeadersrequired = true;
        }

        if ($ofvalue < 0 || strtoupper($ofvalue) == 'OFF') {
            $this->HTMLFooter = '';
            $resetHTMLHeadersrequired = true;
        } elseif ($ofname && $ofvalue > 0) {
            if (preg_match('/^html_(.*)$/i', $ofname, $n)) {
                $name = $n[1];
            } else {
                $name = $ofname;
            }
            if (isset($this->pageHTMLfooters[$name])) {
                $this->HTMLFooter = $this->pageHTMLfooters[$name];
            } else {
                $this->HTMLFooter = '';
            }
            $resetHTMLHeadersrequired = true;
        }

        if ($efvalue < 0 || strtoupper($efvalue) == 'OFF') {
            $this->HTMLFooterE = '';
            $resetHTMLHeadersrequired = true;
        } elseif ($efname && $efvalue > 0) {
            if (preg_match('/^html_(.*)$/i', $efname, $n)) {
                $name = $n[1];
            } else {
                $name = $efname;
            }
            if (isset($this->pageHTMLfooters[$name])) {
                $this->HTMLFooterE = $this->pageHTMLfooters[$name];
            } else {
                $this->HTMLFooterE = '';
            }
            $resetHTMLHeadersrequired = true;
        }

        if ($resetHTMLHeadersrequired) {
            $this->SetHTMLHeader($this->HTMLHeader);
            $this->SetHTMLHeader($this->HTMLHeaderE, 'E');
            $this->SetHTMLFooter($this->HTMLFooter);
            $this->SetHTMLFooter($this->HTMLFooterE, 'E');
        }


        if (($this->mirrorMargins) && (($this->page) % 2 == 0)) { // EVEN
            $this->_setAutoHeaderHeight($this->HTMLHeaderE);
            $this->_setAutoFooterHeight($this->HTMLFooterE);
        } else { // ODD or DEFAULT
            $this->_setAutoHeaderHeight($this->HTMLHeader);
            $this->_setAutoFooterHeight($this->HTMLFooter);
        }

        // Reset column top margin
        $this->y0 = $this->tMargin;

        $this->x = $this->lMargin;
        $this->y = $this->tMargin;
    }

    // mPDF 6
    function _setAutoHeaderHeight(&$htmlh)
    {
        /* When the setAutoTopMargin option is set to pad/stretch, only apply auto header height when a header exists */
        if ($this->HTMLHeader === '' && $this->HTMLHeaderE === '') {
            return;
        }

        if ($this->setAutoTopMargin == 'pad') {
            if (isset($htmlh['h']) && $htmlh['h']) {
                $h = $htmlh['h'];
            } // 5.7.3
            else {
                $h = 0;
            }
            $this->tMargin = $this->margin_header + $h + $this->orig_tMargin;
        } elseif ($this->setAutoTopMargin == 'stretch') {
            if (isset($htmlh['h']) && $htmlh['h']) {
                $h = $htmlh['h'];
            } // 5.7.3
            else {
                $h = 0;
            }
            $this->tMargin = max($this->orig_tMargin, $this->margin_header + $h + $this->autoMarginPadding);
        }
    }

    // mPDF 6
    function _setAutoFooterHeight(&$htmlf)
    {
        /* When the setAutoTopMargin option is set to pad/stretch, only apply auto footer height when a footer exists */
        if ($this->HTMLFooter === '' && $this->HTMLFooterE === '') {
            return;
        }

        if ($this->setAutoBottomMargin == 'pad') {
            if (isset($htmlf['h']) && $htmlf['h']) {
                $h = $htmlf['h'];
            } // 5.7.3
            else {
                $h = 0;
            }
            $this->bMargin = $this->margin_footer + $h + $this->orig_bMargin;
            $this->PageBreakTrigger = $this->h - $this->bMargin;
        } elseif ($this->setAutoBottomMargin == 'stretch') {
            if (isset($htmlf['h']) && $htmlf['h']) {
                $h = $htmlf['h'];
            } // 5.7.3
            else {
                $h = 0;
            }
            $this->bMargin = max($this->orig_bMargin, $this->margin_footer + $h + $this->autoMarginPadding);
            $this->PageBreakTrigger = $this->h - $this->bMargin;
        }
    }

    function _endpage()
    {
        /* -- CSS-IMAGE-FLOAT -- */
        $this->printfloatbuffer();
        /* -- END CSS-IMAGE-FLOAT -- */

        if ($this->visibility != 'visible') {
            $this->SetVisibility('visible');
        }
        $this->EndLayer();
        // End of page contents
        $this->state = 1;
    }

    function _dounderline($x, $y, $txt, $OTLdata = false, $textvar = 0)
    {
        // Now print line exactly where $y secifies - called from Text() and Cell() - adjust  position there
        // WORD SPACING
        $w = ($this->GetStringWidth($txt, false, $OTLdata, $textvar) * Mpdf::SCALE) + ($this->charspacing * mb_strlen($txt, $this->mb_enc)) + ( $this->ws * mb_substr_count($txt, ' ', $this->mb_enc));
        // Draw a line
        return sprintf('%.3F %.3F m %.3F %.3F l S', $x * Mpdf::SCALE, ($this->h - $y) * Mpdf::SCALE, ($x * Mpdf::SCALE) + $w, ($this->h - $y) * Mpdf::SCALE);
    }



    /* -- WATERMARK -- */

    // add a watermark
    function watermark($texte, $angle = 45, $fontsize = 96, $alpha = 0.2)
    {
        if ($this->PDFA || $this->PDFX) {
            throw new \Mpdf\MpdfException('PDFA and PDFX do not permit transparency, so mPDF does not allow Watermarks!');
        }

        if (!$this->watermark_font) {
            $this->watermark_font = $this->default_font;
        }

        $this->SetFont($this->watermark_font, "B", $fontsize, false); // Don't output
        $texte = $this->purify_utf8_text($texte);

        if ($this->text_input_as_HTML) {
            $texte = $this->all_entities_to_utf8($texte);
        }

        if ($this->usingCoreFont) {
            $texte = mb_convert_encoding($texte, $this->mb_enc, 'UTF-8');
        }

        // DIRECTIONALITY
        if (preg_match("/([" . $this->pregRTLchars . "])/u", $texte)) {
            $this->biDirectional = true;
        } // *OTL*

        $textvar = 0;
        $save_OTLtags = $this->OTLtags;
        $this->OTLtags = [];
        if ($this->useKerning) {
            if ($this->CurrentFont['haskernGPOS']) {
                $this->OTLtags['Plus'] .= ' kern';
            } else {
                $textvar = ($textvar | TextVars::FC_KERNING);
            }
        }

        /* -- OTL -- */
        // Use OTL OpenType Table Layout - GSUB & GPOS
        if (isset($this->CurrentFont['useOTL']) && $this->CurrentFont['useOTL']) {
            $texte = $this->otl->applyOTL($texte, $this->CurrentFont['useOTL']);
            $OTLdata = $this->otl->OTLdata;
        }
        /* -- END OTL -- */
        $this->OTLtags = $save_OTLtags;

        $this->magic_reverse_dir($texte, $this->directionality, $OTLdata);

        $this->SetAlpha($alpha);

        $this->SetTColor($this->colorConverter->convert(0, $this->PDFAXwarnings));

        $szfont = $fontsize;
        $loop = 0;
        $maxlen = (min($this->w, $this->h) ); // sets max length of text as 7/8 width/height of page

        while ($loop == 0) {
            $this->SetFont($this->watermark_font, "B", $szfont, false); // Don't output
            $offset = ((sin(deg2rad($angle))) * ($szfont / Mpdf::SCALE));

            $strlen = $this->GetStringWidth($texte, true, $OTLdata, $textvar);
            if ($strlen > $maxlen - $offset) {
                $szfont --;
            } else {
                $loop ++;
            }
        }

        $this->SetFont($this->watermark_font, "B", $szfont - 0.1, true, true); // Output The -0.1 is because SetFont above is not written to PDF

        // Repeating it will not output anything as mPDF thinks it is set
        $adj = ((cos(deg2rad($angle))) * ($strlen / 2));
        $opp = ((sin(deg2rad($angle))) * ($strlen / 2));

        $wx = ($this->w / 2) - $adj + $offset / 3;
        $wy = ($this->h / 2) + $opp;

        $this->Rotate($angle, $wx, $wy);
        $this->Text($wx, $wy, $texte, $OTLdata, $textvar);
        $this->Rotate(0);
        $this->SetTColor($this->colorConverter->convert(0, $this->PDFAXwarnings));

        $this->SetAlpha(1);
    }

    function watermarkImg($src, $alpha = 0.2)
    {
        if ($this->PDFA || $this->PDFX) {
            throw new \Mpdf\MpdfException('PDFA and PDFX do not permit transparency, so mPDF does not allow Watermarks!');
        }

        if ($this->watermarkImgBehind) {
            $this->watermarkImgAlpha = $this->SetAlpha($alpha, 'Normal', true);
        } else {
            $this->SetAlpha($alpha, $this->watermarkImgAlphaBlend);
        }

        $this->Image($src, 0, 0, 0, 0, '', '', true, true, true);

        if (!$this->watermarkImgBehind) {
            $this->SetAlpha(1);
        }
    }

    /* -- END WATERMARK -- */

    function Rotate($angle, $x = -1, $y = -1)
    {
        if ($x == -1) {
            $x = $this->x;
        }
        if ($y == -1) {
            $y = $this->y;
        }
        if ($this->angle != 0) {
            $this->writer->write('Q');
        }
        $this->angle = $angle;
        if ($angle != 0) {
            $angle*=M_PI / 180;
            $c = cos($angle);
            $s = sin($angle);
            $cx = $x * Mpdf::SCALE;
            $cy = ($this->h - $y) * Mpdf::SCALE;
            $this->writer->write(sprintf('q %.5F %.5F %.5F %.5F %.3F %.3F cm 1 0 0 1 %.3F %.3F cm', $c, $s, -$s, $c, $cx, $cy, -$cx, -$cy));
        }
    }

    function CircularText($x, $y, $r, $text, $align = 'top', $fontfamily = '', $fontsize = 0, $fontstyle = '', $kerning = 120, $fontwidth = 100, $divider = '')
    {
        if (empty($this->directWrite)) {
            $this->directWrite = new DirectWrite($this, $this->otl, $this->sizeConverter, $this->colorConverter);
        }

        $this->directWrite->CircularText($x, $y, $r, $text, $align, $fontfamily, $fontsize, $fontstyle, $kerning, $fontwidth, $divider);
    }

    // From Invoice
    function RoundedRect($x, $y, $w, $h, $r, $style = '')
    {
        $hp = $this->h;

        if ($style == 'F') {
            $op = 'f';
        } elseif ($style == 'FD' or $style == 'DF') {
            $op = 'B';
        } else {
            $op = 'S';
        }

        $MyArc = 4 / 3 * (sqrt(2) - 1);
        $this->writer->write(sprintf('%.3F %.3F m', ($x + $r) * Mpdf::SCALE, ($hp - $y) * Mpdf::SCALE));
        $xc = $x + $w - $r;
        $yc = $y + $r;
        $this->writer->write(sprintf('%.3F %.3F l', $xc * Mpdf::SCALE, ($hp - $y) * Mpdf::SCALE));

        $this->_Arc($xc + $r * $MyArc, $yc - $r, $xc + $r, $yc - $r * $MyArc, $xc + $r, $yc);
        $xc = $x + $w - $r;
        $yc = $y + $h - $r;
        $this->writer->write(sprintf('%.3F %.3F l', ($x + $w) * Mpdf::SCALE, ($hp - $yc) * Mpdf::SCALE));

        $this->_Arc($xc + $r, $yc + $r * $MyArc, $xc + $r * $MyArc, $yc + $r, $xc, $yc + $r);
        $xc = $x + $r;
        $yc = $y + $h - $r;
        $this->writer->write(sprintf('%.3F %.3F l', $xc * Mpdf::SCALE, ($hp - ($y + $h)) * Mpdf::SCALE));

        $this->_Arc($xc - $r * $MyArc, $yc + $r, $xc - $r, $yc + $r * $MyArc, $xc - $r, $yc);
        $xc = $x + $r;
        $yc = $y + $r;
        $this->writer->write(sprintf('%.3F %.3F l', ($x) * Mpdf::SCALE, ($hp - $yc) * Mpdf::SCALE));

        $this->_Arc($xc - $r, $yc - $r * $MyArc, $xc - $r * $MyArc, $yc - $r, $xc, $yc - $r);
        $this->writer->write($op);
    }

    function _Arc($x1, $y1, $x2, $y2, $x3, $y3)
    {
        $h = $this->h;
        $this->writer->write(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F c ', $x1 * Mpdf::SCALE, ($h - $y1) * Mpdf::SCALE, $x2 * Mpdf::SCALE, ($h - $y2) * Mpdf::SCALE, $x3 * Mpdf::SCALE, ($h - $y3) * Mpdf::SCALE));
    }

    // ====================================================



    /* -- DIRECTW -- */
    function Shaded_box($text, $font = '', $fontstyle = 'B', $szfont = '', $width = '70%', $style = 'DF', $radius = 2.5, $fill = '#FFFFFF', $color = '#000000', $pad = 2)
    {
        // F (shading - no line),S (line, no shading),DF (both)
        if (empty($this->directWrite)) {
            $this->directWrite = new DirectWrite($this, $this->otl, $this->sizeConverter, $this->colorConverter);
        }
        $this->directWrite->Shaded_box($text, $font, $fontstyle, $szfont, $width, $style, $radius, $fill, $color, $pad);
    }

    /* -- END DIRECTW -- */

    function UTF8StringToArray($str, $addSubset = true)
    {
        $out = [];
        $len = strlen($str);
        for ($i = 0; $i < $len; $i++) {
            $uni = -1;
            $h = ord($str[$i]);
            if ($h <= 0x7F) {
                $uni = $h;
            } elseif ($h >= 0xC2) {
                if (($h <= 0xDF) && ($i < $len - 1)) {
                    $uni = ($h & 0x1F) << 6 | (ord($str[++$i]) & 0x3F);
                } elseif (($h <= 0xEF) && ($i < $len - 2)) {
                    $uni = ($h & 0x0F) << 12 | (ord($str[++$i]) & 0x3F) << 6 | (ord($str[++$i]) & 0x3F);
                } elseif (($h <= 0xF4) && ($i < $len - 3)) {
                    $uni = ($h & 0x0F) << 18 | (ord($str[++$i]) & 0x3F) << 12 | (ord($str[++$i]) & 0x3F) << 6 | (ord($str[++$i]) & 0x3F);
                }
            }
            if ($uni >= 0) {
                $out[] = $uni;
                if ($addSubset && isset($this->CurrentFont['subset'])) {
                    $this->CurrentFont['subset'][$uni] = $uni;
                }
            }
        }
        return $out;
    }

    // Convert utf-8 string to <HHHHHH> for Font Subsets
    function UTF8toSubset($str)
    {
        $ret = '<';
        // $str = preg_replace('/'.preg_quote($this->aliasNbPg,'/').'/', chr(7), $str );	// mPDF 6 deleted
        // $str = preg_replace('/'.preg_quote($this->aliasNbPgGp,'/').'/', chr(8), $str );	// mPDF 6 deleted
        $unicode = $this->UTF8StringToArray($str);
        $orig_fid = $this->CurrentFont['subsetfontids'][0];
        $last_fid = $this->CurrentFont['subsetfontids'][0];
        foreach ($unicode as $c) {
            /* 	// mPDF 6 deleted
			  if ($c == 7 || $c == 8) {
			  if ($orig_fid != $last_fid) {
			  $ret .= '> Tj /F'.$orig_fid.' '.$this->FontSizePt.' Tf <';
			  $last_fid = $orig_fid;
			  }
			  if ($c == 7) { $ret .= $this->aliasNbPgHex; }
			  else { $ret .= $this->aliasNbPgGpHex; }
			  continue;
			  }
			 */
            if (!$this->_charDefined($this->CurrentFont['cw'], $c)) {
                $c = 0;
            } // mPDF 6
            for ($i = 0; $i < 99; $i++) {
                // return c as decimal char
                $init = array_search($c, $this->CurrentFont['subsets'][$i]);
                if ($init !== false) {
                    if ($this->CurrentFont['subsetfontids'][$i] != $last_fid) {
                        $ret .= '> Tj /F' . $this->CurrentFont['subsetfontids'][$i] . ' ' . $this->FontSizePt . ' Tf <';
                        $last_fid = $this->CurrentFont['subsetfontids'][$i];
                    }
                    $ret .= sprintf("%02s", strtoupper(dechex($init)));
                    break;
                } // TrueType embedded SUBSETS
                elseif (count($this->CurrentFont['subsets'][$i]) < 255) {
                    $n = count($this->CurrentFont['subsets'][$i]);
                    $this->CurrentFont['subsets'][$i][$n] = $c;
                    if ($this->CurrentFont['subsetfontids'][$i] != $last_fid) {
                        $ret .= '> Tj /F' . $this->CurrentFont['subsetfontids'][$i] . ' ' . $this->FontSizePt . ' Tf <';
                        $last_fid = $this->CurrentFont['subsetfontids'][$i];
                    }
                    $ret .= sprintf("%02s", strtoupper(dechex($n)));
                    break;
                } elseif (!isset($this->CurrentFont['subsets'][($i + 1)])) {
                    // TrueType embedded SUBSETS
                    $this->CurrentFont['subsets'][($i + 1)] = [0 => 0];
                    $new_fid = count($this->fonts) + $this->extraFontSubsets + 1;
                    $this->CurrentFont['subsetfontids'][($i + 1)] = $new_fid;
                    $this->extraFontSubsets++;
                }
            }
        }
        $ret .= '>';
        if ($last_fid != $orig_fid) {
            $ret .= ' Tj /F' . $orig_fid . ' ' . $this->FontSizePt . ' Tf <> ';
        }
        return $ret;
    }

    /* -- CJK-FONTS -- */

    // from class PDF_Chinese CJK EXTENSIONS
    function AddCIDFont($family, $style, $name, &$cw, $CMap, $registry, $desc)
    {
        $fontkey = strtolower($family) . strtoupper($style);
        if (isset($this->fonts[$fontkey])) {
            throw new \Mpdf\MpdfException("Font already added: $family $style");
        }
        $i = count($this->fonts) + $this->extraFontSubsets + 1;
        $name = str_replace(' ', '', $name);
        if ($family == 'sjis') {
            $up = -120;
        } else {
            $up = -130;
        }
        // ? 'up' and 'ut' do not seem to be referenced anywhere
        $this->fonts[$fontkey] = ['i' => $i, 'type' => 'Type0', 'name' => $name, 'up' => $up, 'ut' => 40, 'cw' => $cw, 'CMap' => $CMap, 'registry' => $registry, 'MissingWidth' => 1000, 'desc' => $desc];
    }

    function AddCJKFont($family)
    {

        if ($this->PDFA || $this->PDFX) {
            throw new \Mpdf\MpdfException("Adobe CJK fonts cannot be embedded in mPDF (required for PDFA1-b and PDFX/1-a).");
        }
        if ($family == 'big5') {
            $this->AddBig5Font();
        } elseif ($family == 'gb') {
            $this->AddGBFont();
        } elseif ($family == 'sjis') {
            $this->AddSJISFont();
        } elseif ($family == 'uhc') {
            $this->AddUHCFont();
        }
    }

    function AddBig5Font()
    {
        // Add Big5 font with proportional Latin
        $family = 'big5';
        $name = 'MSungStd-Light-Acro';
        $cw = $this->Big5_widths;
        $CMap = 'UniCNS-UTF16-H';
        $registry = ['ordering' => 'CNS1', 'supplement' => 4];
        $desc = [
            'Ascent' => 880,
            'Descent' => -120,
            'CapHeight' => 880,
            'Flags' => 6,
            'FontBBox' => '[-160 -249 1015 1071]',
            'ItalicAngle' => 0,
            'StemV' => 93,
        ];
        $this->AddCIDFont($family, '', $name, $cw, $CMap, $registry, $desc);
        $this->AddCIDFont($family, 'B', $name . ',Bold', $cw, $CMap, $registry, $desc);
        $this->AddCIDFont($family, 'I', $name . ',Italic', $cw, $CMap, $registry, $desc);
        $this->AddCIDFont($family, 'BI', $name . ',BoldItalic', $cw, $CMap, $registry, $desc);
    }

    function AddGBFont()
    {
        // Add GB font with proportional Latin
        $family = 'gb';
        $name = 'STSongStd-Light-Acro';
        $cw = $this->GB_widths;
        $CMap = 'UniGB-UTF16-H';
        $registry = ['ordering' => 'GB1', 'supplement' => 4];
        $desc = [
            'Ascent' => 880,
            'Descent' => -120,
            'CapHeight' => 737,
            'Flags' => 6,
            'FontBBox' => '[-25 -254 1000 880]',
            'ItalicAngle' => 0,
            'StemV' => 58,
            'Style' => '<< /Panose <000000000400000000000000> >>',
        ];
        $this->AddCIDFont($family, '', $name, $cw, $CMap, $registry, $desc);
        $this->AddCIDFont($family, 'B', $name . ',Bold', $cw, $CMap, $registry, $desc);
        $this->AddCIDFont($family, 'I', $name . ',Italic', $cw, $CMap, $registry, $desc);
        $this->AddCIDFont($family, 'BI', $name . ',BoldItalic', $cw, $CMap, $registry, $desc);
    }

    function AddSJISFont()
    {
        // Add SJIS font with proportional Latin
        $family = 'sjis';
        $name = 'KozMinPro-Regular-Acro';
        $cw = $this->SJIS_widths;
        $CMap = 'UniJIS-UTF16-H';
        $registry = ['ordering' => 'Japan1', 'supplement' => 5];
        $desc = [
            'Ascent' => 880,
            'Descent' => -120,
            'CapHeight' => 740,
            'Flags' => 6,
            'FontBBox' => '[-195 -272 1110 1075]',
            'ItalicAngle' => 0,
            'StemV' => 86,
            'XHeight' => 502,
        ];
        $this->AddCIDFont($family, '', $name, $cw, $CMap, $registry, $desc);
        $this->AddCIDFont($family, 'B', $name . ',Bold', $cw, $CMap, $registry, $desc);
        $this->AddCIDFont($family, 'I', $name . ',Italic', $cw, $CMap, $registry, $desc);
        $this->AddCIDFont($family, 'BI', $name . ',BoldItalic', $cw, $CMap, $registry, $desc);
    }

    function AddUHCFont()
    {
        // Add UHC font with proportional Latin
        $family = 'uhc';
        $name = 'HYSMyeongJoStd-Medium-Acro';
        $cw = $this->UHC_widths;
        $CMap = 'UniKS-UTF16-H';
        $registry = ['ordering' => 'Korea1', 'supplement' => 2];
        $desc = [
            'Ascent' => 880,
            'Descent' => -120,
            'CapHeight' => 720,
            'Flags' => 6,
            'FontBBox' => '[-28 -148 1001 880]',
            'ItalicAngle' => 0,
            'StemV' => 60,
            'Style' => '<< /Panose <000000000600000000000000> >>',
        ];
        $this->AddCIDFont($family, '', $name, $cw, $CMap, $registry, $desc);
        $this->AddCIDFont($family, 'B', $name . ',Bold', $cw, $CMap, $registry, $desc);
        $this->AddCIDFont($family, 'I', $name . ',Italic', $cw, $CMap, $registry, $desc);
        $this->AddCIDFont($family, 'BI', $name . ',BoldItalic', $cw, $CMap, $registry, $desc);
    }

    /* -- END CJK-FONTS -- */

    //////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////

    function SetDefaultFont($font)
    {
        // Disallow embedded fonts to be used as defaults in PDFA
        if ($this->PDFA || $this->PDFX) {
            if (strtolower($font) == 'ctimes') {
                $font = 'serif';
            }
            if (strtolower($font) == 'ccourier') {
                $font = 'monospace';
            }
            if (strtolower($font) == 'chelvetica') {
                $font = 'sans-serif';
            }
        }
        $font = $this->SetFont($font); // returns substituted font if necessary
        $this->default_font = $font;
        $this->original_default_font = $font;
        if (!$this->watermark_font) {
            $this->watermark_font = $font;
        } // *WATERMARK*
        $this->defaultCSS['BODY']['FONT-FAMILY'] = $font;
        $this->cssManager->CSS['BODY']['FONT-FAMILY'] = $font;
    }

    function SetDefaultFontSize($fontsize)
    {
        $this->default_font_size = $fontsize;
        $this->original_default_font_size = $fontsize;
        $this->SetFontSize($fontsize);
        $this->defaultCSS['BODY']['FONT-SIZE'] = $fontsize . 'pt';
        $this->cssManager->CSS['BODY']['FONT-SIZE'] = $fontsize . 'pt';
    }

    function SetDefaultBodyCSS($prop, $val)
    {
        if ($prop) {
            $this->defaultCSS['BODY'][strtoupper($prop)] = $val;
            $this->cssManager->CSS['BODY'][strtoupper($prop)] = $val;
        }
    }

    function SetDirectionality($dir = 'ltr')
    {
        /* -- OTL -- */
        if (strtolower($dir) == 'rtl') {
            if ($this->directionality != 'rtl') {
                // Swop L/R Margins so page 1 RTL is an 'even' page
                $tmp = $this->DeflMargin;
                $this->DeflMargin = $this->DefrMargin;
                $this->DefrMargin = $tmp;
                $this->orig_lMargin = $this->DeflMargin;
                $this->orig_rMargin = $this->DefrMargin;

                $this->SetMargins($this->DeflMargin, $this->DefrMargin, $this->tMargin);
            }
            $this->directionality = 'rtl';
            $this->defaultAlign = 'R';
            $this->defaultTableAlign = 'R';
        } else {
            /* -- END OTL -- */
            $this->directionality = 'ltr';
            $this->defaultAlign = 'L';
            $this->defaultTableAlign = 'L';
        } // *OTL*
        $this->cssManager->CSS['BODY']['DIRECTION'] = $this->directionality;
    }

    // Return either a number (factor) - based on current set fontsize (if % or em) - or exact lineheight (with 'mm' after it)
    function fixLineheight($v)
    {
        $lh = false;
        if (preg_match('/^[0-9\.,]*$/', $v) && $v >= 0) {
            return ($v + 0);
        } elseif (strtoupper($v) == 'NORMAL' || $v == 'N') {
            return 'N';  // mPDF 6
        } else {
            $tlh = $this->sizeConverter->convert($v, $this->FontSize, $this->FontSize, true);
            if ($tlh) {
                return ($tlh . 'mm');
            }
        }
        return $this->normalLineheight;
    }

    function _getNormalLineheight($desc = false)
    {
        if (!$desc) {
            $desc = $this->CurrentFont['desc'];
        }
        if (!isset($desc['Leading'])) {
            $desc['Leading'] = 0;
        }
        if ($this->useFixedNormalLineHeight) {
            $lh = $this->normalLineheight;
        } elseif (isset($desc['Ascent']) && $desc['Ascent']) {
            $lh = ($this->adjustFontDescLineheight * ($desc['Ascent'] - $desc['Descent'] + $desc['Leading']) / 1000);
        } else {
            $lh = $this->normalLineheight;
        }
        return $lh;
    }

    // Set a (fixed) lineheight to an actual value - either to named fontsize(pts) or default
    function SetLineHeight($FontPt = '', $lh = '')
    {
        if (!$FontPt) {
            $FontPt = $this->FontSizePt;
        }
        $fs = $FontPt / Mpdf::SCALE;
        $this->lineheight = $this->_computeLineheight($lh, $fs);
    }

    function _computeLineheight($lh, $fs = '')
    {
        if ($this->shrin_k > 1) {
            $k = $this->shrin_k;
        } else {
            $k = 1;
        }
        if (!$fs) {
            $fs = $this->FontSize;
        }
        if ($lh == 'N') {
            $lh = $this->_getNormalLineheight();
        }
        if (preg_match('/mm/', $lh)) {
            return (((float) $lh) / $k); // convert to number
        } elseif ($lh > 0) {
            return ($fs * $lh);
        }
        return ($fs * $this->normalLineheight);
    }

    function _setLineYpos(&$fontsize, &$fontdesc, &$CSSlineheight, $blockYpos = false)
    {
        $ypos['glyphYorigin'] = 0;
        $ypos['baseline-shift'] = 0;
        $linegap = 0;
        $leading = 0;

        if (isset($fontdesc['Ascent']) && $fontdesc['Ascent'] && !$this->useFixedTextBaseline) {
            // Fontsize uses font metrics - this method seems to produce results compatible with browsers (except IE9)
            $ypos['boxtop'] = $fontdesc['Ascent'] / 1000 * $fontsize;
            $ypos['boxbottom'] = $fontdesc['Descent'] / 1000 * $fontsize;
            if (isset($fontdesc['Leading'])) {
                $linegap = $fontdesc['Leading'] / 1000 * $fontsize;
            }
        } // Default if not set - uses baselineC
        else {
            $ypos['boxtop'] = (0.5 + $this->baselineC) * $fontsize;
            $ypos['boxbottom'] = -(0.5 - $this->baselineC) * $fontsize;
        }
        $fontheight = $ypos['boxtop'] - $ypos['boxbottom'];

        if ($this->shrin_k > 1) {
            $shrin_k = $this->shrin_k;
        } else {
            $shrin_k = 1;
        }

        $leading = 0;
        if ($CSSlineheight == 'N') {
            $lh = $this->_getNormalLineheight($fontdesc);
            $lineheight = ($fontsize * $lh);
            $leading += $linegap; // specified in hhea or sTypo in OpenType tables
        } elseif (preg_match('/mm/', $CSSlineheight)) {
            $lineheight = (((float) $CSSlineheight) / $shrin_k); // convert to number
        } // ??? If lineheight is a factor e.g. 1.3  ?? use factor x 1em or ? use 'normal' lineheight * factor
        // Could depend on value for $text_height - a draft CSS value as set above for now
        elseif ($CSSlineheight > 0) {
            $lineheight = ($fontsize * $CSSlineheight);
        } else {
            $lineheight = ($fontsize * $this->normalLineheight);
        }

        // In general, calculate the "leading" - the difference between the fontheight and the lineheight
        // and add half to the top and half to the bottom. BUT
        // If an inline element has a font-size less than the block element, and the line-height is set as an em or % value
        // it will add too much leading below the font and expand the height of the line - so just use the block element exttop/extbottom:
        if (preg_match('/mm/', $CSSlineheight)
            && ($blockYpos && $ypos['boxtop'] < $blockYpos['boxtop'])
            && ($blockYpos && $ypos['boxbottom'] > $blockYpos['boxbottom'])) {

            $ypos['exttop'] = $blockYpos['exttop'];
            $ypos['extbottom'] = $blockYpos['extbottom'];

        } else {

            $leading += ($lineheight - $fontheight);

            $ypos['exttop'] = $ypos['boxtop'] + $leading / 2;
            $ypos['extbottom'] = $ypos['boxbottom'] - $leading / 2;
        }


        // TEMP ONLY FOR DEBUGGING *********************************
        // $ypos['lineheight'] = $lineheight;
        // $ypos['fontheight'] = $fontheight;
        // $ypos['leading'] = $leading;

        return $ypos;
    }

    /* Called from WriteFlowingBlock() and finishFlowingBlock()
	  Determines the line hieght and glyph/writing position
	  for each element in the line to be written */

    function _setInlineBlockHeights(&$lineBox, &$stackHeight, &$content, &$font, $is_table)
    {
        if ($this->shrin_k > 1) {
            $shrin_k = $this->shrin_k;
        } else {
            $shrin_k = 1;
        }

        $ypos = [];
        $bordypos = [];
        $bgypos = [];

        if ($is_table) {
            // FOR TABLE
            $fontsize = $this->FontSize;
            $fontkey = $this->FontFamily . $this->FontStyle;
            $fontdesc = $this->fonts[$fontkey]['desc'];
            $CSSlineheight = $this->cellLineHeight;
            $line_stacking_strategy = $this->cellLineStackingStrategy; // inline-line-height [default] | block-line-height | max-height | grid-height
            $line_stacking_shift = $this->cellLineStackingShift;  // consider-shifts [default] | disregard-shifts
        } else {
            // FOR BLOCK FONT
            $fontsize = $this->blk[$this->blklvl]['InlineProperties']['size'];
            $fontkey = $this->blk[$this->blklvl]['InlineProperties']['family'] . $this->blk[$this->blklvl]['InlineProperties']['style'];
            $fontdesc = $this->fonts[$fontkey]['desc'];
            $CSSlineheight = $this->blk[$this->blklvl]['line_height'];
            // inline-line-height | block-line-height | max-height | grid-height
            $line_stacking_strategy = (isset($this->blk[$this->blklvl]['line_stacking_strategy']) ? $this->blk[$this->blklvl]['line_stacking_strategy'] : 'inline-line-height');
            // consider-shifts | disregard-shifts
            $line_stacking_shift = (isset($this->blk[$this->blklvl]['line_stacking_shift']) ? $this->blk[$this->blklvl]['line_stacking_shift'] : 'consider-shifts');
        }
        $boxLineHeight = $this->_computeLineheight($CSSlineheight, $fontsize);


        // First, set a "strut" using block font at index $lineBox[-1]
        $ypos[-1] = $this->_setLineYpos($fontsize, $fontdesc, $CSSlineheight);

        // for the block element - always taking the block EXTENDED progression including leading - which may be negative
        if ($line_stacking_strategy == 'block-line-height') {
            $topy = $ypos[-1]['exttop'];
            $bottomy = $ypos[-1]['extbottom'];
        } else {
            $topy = 0;
            $bottomy = 0;
        }

        // Get text-middle for aligning images/objects
        $midpoint = $ypos[-1]['boxtop'] - (($ypos[-1]['boxtop'] - $ypos[-1]['boxbottom']) / 2);

        // for images / inline objects / replaced elements
        $mta = 0; // Maximum top-aligned
        $mba = 0; // Maximum bottom-aligned
        foreach ($content as $k => $chunk) {
            if (isset($this->objectbuffer[$k]) && $this->objectbuffer[$k]['type'] == 'listmarker') {
                $ypos[$k] = $ypos[-1];
                // UPDATE Maximums
                if ($line_stacking_strategy == 'block-line-height' || $line_stacking_strategy == 'grid-height' || $line_stacking_strategy == 'max-height') { // don't include extended block progression of all inline elements
                    if ($ypos[$k]['boxtop'] > $topy) {
                        $topy = $ypos[$k]['boxtop'];
                    }
                    if ($ypos[$k]['boxbottom'] < $bottomy) {
                        $bottomy = $ypos[$k]['boxbottom'];
                    }
                } else {
                    if ($ypos[$k]['exttop'] > $topy) {
                        $topy = $ypos[$k]['exttop'];
                    }
                    if ($ypos[$k]['extbottom'] < $bottomy) {
                        $bottomy = $ypos[$k]['extbottom'];
                    }
                }
            } elseif (isset($this->objectbuffer[$k]) && $this->objectbuffer[$k]['type'] == 'dottab') { // mPDF 6 DOTTAB
                $fontsize = $font[$k]['size'];
                $fontdesc = $font[$k]['curr']['desc'];
                $lh = 1;
                $ypos[$k] = $this->_setLineYpos($fontsize, $fontdesc, $lh, $ypos[-1]); // Lineheight=1 fixed
            } elseif (isset($this->objectbuffer[$k])) {
                $oh = $this->objectbuffer[$k]['OUTER-HEIGHT'];
                $va = $this->objectbuffer[$k]['vertical-align'];

                if ($va == 'BS') { //  (BASELINE default)
                    if ($oh > $topy) {
                        $topy = $oh;
                    }
                } elseif ($va == 'M') {
                    if (($midpoint + $oh / 2) > $topy) {
                        $topy = $midpoint + $oh / 2;
                    }
                    if (($midpoint - $oh / 2) < $bottomy) {
                        $bottomy = $midpoint - $oh / 2;
                    }
                } elseif ($va == 'TT') {
                    if (($ypos[-1]['boxtop'] - $oh) < $bottomy) {
                        $bottomy = $ypos[-1]['boxtop'] - $oh;
                        $topy = max($topy, $ypos[-1]['boxtop']);
                    }
                } elseif ($va == 'TB') {
                    if (($ypos[-1]['boxbottom'] + $oh) > $topy) {
                        $topy = $ypos[-1]['boxbottom'] + $oh;
                        $bottomy = min($bottomy, $ypos[-1]['boxbottom']);
                    }
                } elseif ($va == 'T') {
                    if ($oh > $mta) {
                        $mta = $oh;
                    }
                } elseif ($va == 'B') {
                    if ($oh > $mba) {
                        $mba = $oh;
                    }
                }
            } elseif ($content[$k] || $content[$k] === '0') {
                // FOR FLOWING BLOCK
                $fontsize = $font[$k]['size'];
                $fontdesc = $font[$k]['curr']['desc'];
                // In future could set CSS line-height from inline elements; for now, use block level:
                $ypos[$k] = $this->_setLineYpos($fontsize, $fontdesc, $CSSlineheight, $ypos[-1]);

                if (isset($font[$k]['textparam']['text-baseline']) && $font[$k]['textparam']['text-baseline'] != 0) {
                    $ypos[$k]['baseline-shift'] = $font[$k]['textparam']['text-baseline'];
                }

                // DO ALIGNMENT FOR BASELINES *******************
                // Until most fonts have OpenType BASE tables, this won't work
                // $ypos[$k] compared to $ypos[-1] or $ypos[$k-1] using $dominant_baseline and $baseline_table
                // UPDATE Maximums
                if ($line_stacking_strategy == 'block-line-height' || $line_stacking_strategy == 'grid-height' || $line_stacking_strategy == 'max-height') { // don't include extended block progression of all inline elements
                    if ($line_stacking_shift == 'disregard-shifts') {
                        if ($ypos[$k]['boxtop'] > $topy) {
                            $topy = $ypos[$k]['boxtop'];
                        }
                        if ($ypos[$k]['boxbottom'] < $bottomy) {
                            $bottomy = $ypos[$k]['boxbottom'];
                        }
                    } else {
                        if (($ypos[$k]['boxtop'] + $ypos[$k]['baseline-shift']) > $topy) {
                            $topy = $ypos[$k]['boxtop'] + $ypos[$k]['baseline-shift'];
                        }
                        if (($ypos[$k]['boxbottom'] + $ypos[$k]['baseline-shift']) < $bottomy) {
                            $bottomy = $ypos[$k]['boxbottom'] + $ypos[$k]['baseline-shift'];
                        }
                    }
                } else {
                    if ($line_stacking_shift == 'disregard-shifts') {
                        if ($ypos[$k]['exttop'] > $topy) {
                            $topy = $ypos[$k]['exttop'];
                        }
                        if ($ypos[$k]['extbottom'] < $bottomy) {
                            $bottomy = $ypos[$k]['extbottom'];
                        }
                    } else {
                        if (($ypos[$k]['exttop'] + $ypos[$k]['baseline-shift']) > $topy) {
                            $topy = $ypos[$k]['exttop'] + $ypos[$k]['baseline-shift'];
                        }
                        if (($ypos[$k]['extbottom'] + $ypos[$k]['baseline-shift']) < $bottomy) {
                            $bottomy = $ypos[$k]['extbottom'] + $ypos[$k]['baseline-shift'];
                        }
                    }
                }

                // If BORDER set on inline element
                if (isset($font[$k]['bord']) && $font[$k]['bord']) {
                    $bordfontsize = $font[$k]['textparam']['bord-decoration']['fontsize'] / $shrin_k;
                    $bordfontkey = $font[$k]['textparam']['bord-decoration']['fontkey'];
                    if ($bordfontkey != $fontkey || $bordfontsize != $fontsize || isset($font[$k]['textparam']['bord-decoration']['baseline'])) {
                        $bordfontdesc = $this->fonts[$bordfontkey]['desc'];
                        $bordypos[$k] = $this->_setLineYpos($bordfontsize, $bordfontdesc, $CSSlineheight, $ypos[-1]);
                        if (isset($font[$k]['textparam']['bord-decoration']['baseline']) && $font[$k]['textparam']['bord-decoration']['baseline'] != 0) {
                            $bordypos[$k]['baseline-shift'] = $font[$k]['textparam']['bord-decoration']['baseline'] / $shrin_k;
                        }
                    }
                }
                // If BACKGROUND set on inline element
                if (isset($font[$k]['spanbgcolor']) && $font[$k]['spanbgcolor']) {
                    $bgfontsize = $font[$k]['textparam']['bg-decoration']['fontsize'] / $shrin_k;
                    $bgfontkey = $font[$k]['textparam']['bg-decoration']['fontkey'];
                    if ($bgfontkey != $fontkey || $bgfontsize != $fontsize || isset($font[$k]['textparam']['bg-decoration']['baseline'])) {
                        $bgfontdesc = $this->fonts[$bgfontkey]['desc'];
                        $bgypos[$k] = $this->_setLineYpos($bgfontsize, $bgfontdesc, $CSSlineheight, $ypos[-1]);
                        if (isset($font[$k]['textparam']['bg-decoration']['baseline']) && $font[$k]['textparam']['bg-decoration']['baseline'] != 0) {
                            $bgypos[$k]['baseline-shift'] = $font[$k]['textparam']['bg-decoration']['baseline'] / $shrin_k;
                        }
                    }
                }
            }
        }


        // TOP or BOTTOM aligned images
        if ($mta > ($topy - $bottomy)) {
            if (($topy - $mta) < $bottomy) {
                $bottomy = $topy - $mta;
            }
        }
        if ($mba > ($topy - $bottomy)) {
            if (($bottomy + $mba) > $topy) {
                $topy = $bottomy + $mba;
            }
        }

        if ($line_stacking_strategy == 'block-line-height') { // fixed height set by block element (whether present or not)
            $topy = $ypos[-1]['exttop'];
            $bottomy = $ypos[-1]['extbottom'];
        }

        $inclusiveHeight = $topy - $bottomy;

        // SET $stackHeight taking note of line_stacking_strategy
        // NB inclusive height already takes account of need to consider block progression height (excludes leading set by lineheight)
        // or extended block progression height (includes leading set by lineheight)
        if ($line_stacking_strategy == 'block-line-height') { // fixed = extended block progression height of block element
            $stackHeight = $boxLineHeight;
        } elseif ($line_stacking_strategy == 'max-height') { // smallest height which includes extended block progression height of block element
            // and block progression heights of inline elements (NOT extended)
            $stackHeight = $inclusiveHeight;
        } elseif ($line_stacking_strategy == 'grid-height') { // smallest multiple of block element lineheight to include
            // block progression heights of inline elements (NOT extended)
            $stackHeight = $boxLineHeight;
            while ($stackHeight < $inclusiveHeight) {
                $stackHeight += $boxLineHeight;
            }
        } else { // 'inline-line-height' = default		// smallest height which includes extended block progression height of block element
            // AND extended block progression heights of inline elements
            $stackHeight = $inclusiveHeight;
        }

        $diff = $stackHeight - $inclusiveHeight;
        $topy += $diff / 2;
        $bottomy -= $diff / 2;

        // ADJUST $ypos => lineBox using $stackHeight; lineBox are all offsets from the top of stackHeight in mm
        // and SET IMAGE OFFSETS
        $lineBox[-1]['boxtop'] = $topy - $ypos[-1]['boxtop'];
        $lineBox[-1]['boxbottom'] = $topy - $ypos[-1]['boxbottom'];
        // $lineBox[-1]['exttop'] = $topy - $ypos[-1]['exttop'];
        // $lineBox[-1]['extbottom'] = $topy - $ypos[-1]['extbottom'];
        $lineBox[-1]['glyphYorigin'] = $topy - $ypos[-1]['glyphYorigin'];
        $lineBox[-1]['baseline-shift'] = $ypos[-1]['baseline-shift'];

        $midpoint = $lineBox[-1]['boxbottom'] - (($lineBox[-1]['boxbottom'] - $lineBox[-1]['boxtop']) / 2);

        foreach ($content as $k => $chunk) {
            if (isset($this->objectbuffer[$k])) {
                $oh = $this->objectbuffer[$k]['OUTER-HEIGHT'];
                // LIST MARKERS
                if ($this->objectbuffer[$k]['type'] == 'listmarker') {
                    $oh = $fontsize;
                } elseif ($this->objectbuffer[$k]['type'] == 'dottab') { // mPDF 6 DOTTAB
                    $oh = $font[$k]['size']; // == $this->objectbuffer[$k]['fontsize']/Mpdf::SCALE;
                    $lineBox[$k]['boxtop'] = $topy - $ypos[$k]['boxtop'];
                    $lineBox[$k]['boxbottom'] = $topy - $ypos[$k]['boxbottom'];
                    $lineBox[$k]['glyphYorigin'] = $topy - $ypos[$k]['glyphYorigin'];
                    $lineBox[$k]['baseline-shift'] = 0;
                    // continue;
                }
                $va = $this->objectbuffer[$k]['vertical-align']; // = $objattr['vertical-align'] = set as M,T,B,S

                if ($va == 'BS') { //  (BASELINE default)
                    $lineBox[$k]['top'] = $lineBox[-1]['glyphYorigin'] - $oh;
                } elseif ($va == 'M') {
                    $lineBox[$k]['top'] = $midpoint - $oh / 2;
                } elseif ($va == 'TT') {
                    $lineBox[$k]['top'] = $lineBox[-1]['boxtop'];
                } elseif ($va == 'TB') {
                    $lineBox[$k]['top'] = $lineBox[-1]['boxbottom'] - $oh;
                } elseif ($va == 'T') {
                    $lineBox[$k]['top'] = 0;
                } elseif ($va == 'B') {
                    $lineBox[$k]['top'] = $stackHeight - $oh;
                }
            } elseif ($content[$k] || $content[$k] === '0') {
                $lineBox[$k]['boxtop'] = $topy - $ypos[$k]['boxtop'];
                $lineBox[$k]['boxbottom'] = $topy - $ypos[$k]['boxbottom'];
                // $lineBox[$k]['exttop'] = $topy - $ypos[$k]['exttop'];
                // $lineBox[$k]['extbottom'] = $topy - $ypos[$k]['extbottom'];
                $lineBox[$k]['glyphYorigin'] = $topy - $ypos[$k]['glyphYorigin'];
                $lineBox[$k]['baseline-shift'] = $ypos[$k]['baseline-shift'];
                if (isset($bordypos[$k]['boxtop'])) {
                    $lineBox[$k]['border-boxtop'] = $topy - $bordypos[$k]['boxtop'];
                    $lineBox[$k]['border-boxbottom'] = $topy - $bordypos[$k]['boxbottom'];
                    $lineBox[$k]['border-baseline-shift'] = $bordypos[$k]['baseline-shift'];
                }
                if (isset($bgypos[$k]['boxtop'])) {
                    $lineBox[$k]['background-boxtop'] = $topy - $bgypos[$k]['boxtop'];
                    $lineBox[$k]['background-boxbottom'] = $topy - $bgypos[$k]['boxbottom'];
                    $lineBox[$k]['background-baseline-shift'] = $bgypos[$k]['baseline-shift'];
                }
            }
        }
    }

    function SetBasePath($str = '')
    {
        if (isset($_SERVER['HTTP_HOST'])) {
            $host = $_SERVER['HTTP_HOST'];
        } elseif (isset($_SERVER['SERVER_NAME'])) {
            $host = $_SERVER['SERVER_NAME'];
        } else {
            $host = '';
        }
        if (!$str) {
            if (isset($_SERVER['SCRIPT_NAME'])) {
                $currentPath = dirname($_SERVER['SCRIPT_NAME']);
            } else {
                $currentPath = dirname($_SERVER['PHP_SELF']);
            }
            $currentPath = str_replace("\\", "/", $currentPath);
            if ($currentPath == '/') {
                $currentPath = '';
            }
            if ($host) {  // mPDF 6
                if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && $_SERVER['HTTPS'] !== 'off') {
                    $currpath = 'https://' . $host . $currentPath . '/';
                } else {
                    $currpath = 'http://' . $host . $currentPath . '/';
                }
            } else {
                $currpath = '';
            }
            $this->basepath = $currpath;
            $this->basepathIsLocal = true;
            return;
        }
        $str = preg_replace('/\?.*/', '', $str);
        if (!preg_match('/(http|https|ftp):\/\/.*\//i', $str)) {
            $str .= '/';
        }
        $str .= 'xxx'; // in case $str ends in / e.g. http://www.bbc.co.uk/
        $this->basepath = dirname($str) . "/"; // returns e.g. e.g. http://www.google.com/dir1/dir2/dir3/
        $this->basepath = str_replace("\\", "/", $this->basepath); // If on Windows
        $tr = parse_url($this->basepath);
        if (isset($tr['host']) && ($tr['host'] == $host)) {
            $this->basepathIsLocal = true;
        } else {
            $this->basepathIsLocal = false;
        }
    }

    public function GetFullPath(&$path, $basepath = '')
    {
        // When parsing CSS need to pass temporary basepath - so links are relative to current stylesheet
        if (!$basepath) {
            $basepath = $this->basepath;
        }

        // Fix path value
        $path = str_replace("\\", '/', $path); // If on Windows

        // mPDF 5.7.2
        if (substr($path, 0, 2) === '//') {
            $scheme = parse_url($basepath, PHP_URL_SCHEME);
            $scheme = $scheme ?: 'http';
            $path = $scheme . ':' . $path;
        }

        $path = preg_replace('|^./|', '', $path); // Inadvertently corrects "./path/etc" and "//www.domain.com/etc"

        if (substr($path, 0, 1) == '#') {
            return;
        }

        if (preg_match('@^(mailto|tel|fax):.*@i', $path)) {
            return;
        }

        if (substr($path, 0, 3) == "../") { // It is a relative link

            $backtrackamount = substr_count($path, "../");
            $maxbacktrack = substr_count($basepath, "/") - 3;
            $filepath = str_replace("../", '', $path);
            $path = $basepath;

            // If it is an invalid relative link, then make it go to directory root
            if ($backtrackamount > $maxbacktrack) {
                $backtrackamount = $maxbacktrack;
            }

            // Backtrack some directories
            for ($i = 0; $i < $backtrackamount + 1; $i++) {
                $path = substr($path, 0, strrpos($path, "/"));
            }

            $path = $path . "/" . $filepath; // Make it an absolute path

        } elseif ((strpos($path, ":/") === false || strpos($path, ":/") > 10) && !is_file($path)) { // It is a local link

            if (substr($path, 0, 1) == "/") {

                $tr = parse_url($basepath);

                // mPDF 5.7.2
                $root = '';
                if (!empty($tr['scheme'])) {
                    $root .= $tr['scheme'] . '://';
                }

                $root .= isset($tr['host']) ? $tr['host'] : '';
                $root .= ((isset($tr['port']) && $tr['port']) ? (':' . $tr['port']) : ''); // mPDF 5.7.3

                $path = $root . $path;

            } else {
                $path = $basepath . $path;
            }
        }
        // Do nothing if it is an Absolute Link
    }

    function docPageNum($num = 0, $extras = false)
    {
        if ($num < 1) {
            $num = $this->page;
        }

        $type = $this->defaultPageNumStyle; // set default Page Number Style
        $ppgno = $num;
        $suppress = 0;
        $offset = 0;
        $lastreset = 0;

        foreach ($this->PageNumSubstitutions as $psarr) {

            if ($num >= $psarr['from']) {

                if ($psarr['reset']) {
                    if ($psarr['reset'] > 1) {
                        $offset = $psarr['reset'] - 1;
                    }
                    $ppgno = $num - $psarr['from'] + 1 + $offset;
                    $lastreset = $psarr['from'];
                }

                if ($psarr['type']) {
                    $type = $psarr['type'];
                }

                if (strtoupper($psarr['suppress']) == 'ON' || $psarr['suppress'] == 1) {
                    $suppress = 1;
                } elseif (strtoupper($psarr['suppress']) == 'OFF') {
                    $suppress = 0;
                }
            }
        }

        if ($suppress) {
            return '';
        }

        $ppgno = $this->_getStyledNumber($ppgno, $type);

        if ($extras) {
            $ppgno = $this->pagenumPrefix . $ppgno . $this->pagenumSuffix;
        }

        return $ppgno;
    }

    function docPageNumTotal($num = 0, $extras = false)
    {
        if ($num < 1) {
            $num = $this->page;
        }

        $type = $this->defaultPageNumStyle; // set default Page Number Style
        $ppgstart = 1;
        $ppgend = count($this->pages) + 1;
        $suppress = 0;
        $offset = 0;

        foreach ($this->PageNumSubstitutions as $psarr) {
            if ($num >= $psarr['from']) {
                if ($psarr['reset']) {
                    if ($psarr['reset'] > 1) {
                        $offset = $psarr['reset'] - 1;
                    }
                    $ppgstart = $psarr['from'] + $offset;
                    $ppgend = count($this->pages) + 1 + $offset;
                }
                if ($psarr['type']) {
                    $type = $psarr['type'];
                }
                if (strtoupper($psarr['suppress']) == 'ON' || $psarr['suppress'] == 1) {
                    $suppress = 1;
                } elseif (strtoupper($psarr['suppress']) == 'OFF') {
                    $suppress = 0;
                }
            }
            if ($num < $psarr['from']) {
                if ($psarr['reset']) {
                    $ppgend = $psarr['from'] + $offset;
                    break;
                }
            }
        }

        if ($suppress) {
            return '';
        }

        $ppgno = $ppgend - $ppgstart + $offset;
        $ppgno = $this->_getStyledNumber($ppgno, $type);

        if ($extras) {
            $ppgno = $this->pagenumPrefix . $ppgno . $this->pagenumSuffix;
        }

        return $ppgno;
    }

    // mPDF 6
    function _getStyledNumber($ppgno, $type, $listmarker = false)
    {
        if ($listmarker) {
            $reverse = true; // Reverse RTL numerals (Hebrew) when using for list
            $checkfont = true; // Using list - font is set, so check if character is available
        } else {
            $reverse = false; // For pagenumbers, RTL numerals (Hebrew) will get reversed later by bidi
            $checkfont = false; // For pagenumbers - font is not set, so no check
        }

        $decToAlpha = new Conversion\DecToAlpha();
        $decToCjk = new Conversion\DecToCjk();
        $decToHebrew = new Conversion\DecToHebrew();
        $decToRoman = new Conversion\DecToRoman();
        $decToOther = new Conversion\DecToOther($this);

        $lowertype = strtolower($type);

        if ($lowertype == 'upper-latin' || $lowertype == 'upper-alpha' || $type == 'A') {

            $ppgno = $decToAlpha->convert($ppgno, true);

        } elseif ($lowertype == 'lower-latin' || $lowertype == 'lower-alpha' || $type == 'a') {

            $ppgno = $decToAlpha->convert($ppgno, false);

        } elseif ($lowertype == 'upper-roman' || $type == 'I') {

            $ppgno = $decToRoman->convert($ppgno, true);

        } elseif ($lowertype == 'lower-roman' || $type == 'i') {

            $ppgno = $decToRoman->convert($ppgno, false);

        } elseif ($lowertype == 'hebrew') {

            $ppgno = $decToHebrew->convert($ppgno, $reverse);

        } elseif (preg_match('/(arabic-indic|bengali|devanagari|gujarati|gurmukhi|kannada|malayalam|oriya|persian|tamil|telugu|thai|urdu|cambodian|khmer|lao)/i', $lowertype, $m)) {

            $cp = $decToOther->getCodePage($m[1]);
            $ppgno = $decToOther->convert($ppgno, $cp, $checkfont);

        } elseif ($lowertype == 'cjk-decimal') {

            $ppgno = $decToCjk->convert($ppgno);

        }

        return $ppgno;
    }

    function docPageSettings($num = 0)
    {
        // Returns current type (numberstyle), suppression state for this page number;
        // reset is only returned if set for this page number
        if ($num < 1) {
            $num = $this->page;
        }

        $type = $this->defaultPageNumStyle; // set default Page Number Style
        $ppgno = $num;
        $suppress = 0;
        $offset = 0;
        $reset = '';

        foreach ($this->PageNumSubstitutions as $psarr) {
            if ($num >= $psarr['from']) {
                if ($psarr['reset']) {
                    if ($psarr['reset'] > 1) {
                        $offset = $psarr['reset'] - 1;
                    }
                    $ppgno = $num - $psarr['from'] + 1 + $offset;
                }
                if ($psarr['type']) {
                    $type = $psarr['type'];
                }
                if (strtoupper($psarr['suppress']) == 'ON' || $psarr['suppress'] == 1) {
                    $suppress = 1;
                } elseif (strtoupper($psarr['suppress']) == 'OFF') {
                    $suppress = 0;
                }
            }
            if ($num == $psarr['from']) {
                $reset = $psarr['reset'];
            }
        }

        if ($suppress) {
            $suppress = 'on';
        } else {
            $suppress = 'off';
        }

        return [$type, $suppress, $reset];
    }

    function RestartDocTemplate()
    {
        $this->docTemplateStart = $this->page;
    }

    // Page header
    function Header($content = '')
    {

        $this->cMarginL = 0;
        $this->cMarginR = 0;


        if (($this->mirrorMargins && ($this->page % 2 == 0) && $this->HTMLHeaderE) || ($this->mirrorMargins && ($this->page % 2 == 1) && $this->HTMLHeader) || (!$this->mirrorMargins && $this->HTMLHeader)) {
            $this->writeHTMLHeaders();
            return;
        }
    }

    /* -- TABLES -- */
    function TableHeaderFooter($content = '', $tablestartpage = '', $tablestartcolumn = '', $horf = 'H', $level = 0, $firstSpread = true, $finalSpread = true)
    {
        if (($horf == 'H' || $horf == 'F') && !empty($content)) { // mPDF 5.7.2
            $table = &$this->table[1][1];

            // mPDF 5.7.2
            if ($horf == 'F') { // Table Footer
                $firstrow = count($table['cells']) - $table['footernrows'];
                $lastrow = count($table['cells']) - 1;
            } else {  // Table Header
                $firstrow = 0;
                $lastrow = $table['headernrows'] - 1;
            }
            if (empty($content[$firstrow])) {
                if ($this->debug) {
                    throw new \Mpdf\MpdfException("<tfoot> must precede <tbody> in a table");
                } else {
                    return;
                }
            }


            // Advance down page by half width of top border
            if ($horf == 'H') { // Only if header
                if ($table['borders_separate']) {
                    $adv = $table['border_spacing_V'] / 2 + $table['border_details']['T']['w'] + $table['padding']['T'];
                } else {
                    $adv = $table['max_cell_border_width']['T'] / 2;
                }
                if ($adv) {
                    if ($this->table_rotate) {
                        $this->y += ($adv);
                    } else {
                        $this->DivLn($adv, $this->blklvl, true);
                    }
                }
            }

            $topy = $content[$firstrow][0]['y'] - $this->y;

            for ($i = $firstrow; $i <= $lastrow; $i++) {
                $y = $this->y;

                /* -- COLUMNS -- */
                // If outside columns, this is done in PaintDivBB
                if ($this->ColActive) {
                    // OUTER FILL BGCOLOR of DIVS
                    if ($this->blklvl > 0) {
                        $firstblockfill = $this->GetFirstBlockFill();
                        if ($firstblockfill && $this->blklvl >= $firstblockfill) {
                            $divh = $content[$i][0]['h'];
                            $bak_x = $this->x;
                            $this->DivLn($divh, -3, false);
                            // Reset current block fill
                            $bcor = $this->blk[$this->blklvl]['bgcolorarray'];
                            $this->SetFColor($bcor);
                            $this->x = $bak_x;
                        }
                    }
                }
                /* -- END COLUMNS -- */

                $colctr = 0;
                foreach ($content[$i] as $tablehf) {
                    $colctr++;
                    $y = Arrays::get($tablehf, 'y', null) - $topy;
                    $this->y = $y;
                    // Set some cell values
                    $x = Arrays::get($tablehf, 'x', null);
                    if (($this->mirrorMargins) && ($tablestartpage == 'ODD') && (($this->page) % 2 == 0)) { // EVEN
                        $x = $x + $this->MarginCorrection;
                    } elseif (($this->mirrorMargins) && ($tablestartpage == 'EVEN') && (($this->page) % 2 == 1)) { // ODD
                        $x = $x + $this->MarginCorrection;
                    }
                    /* -- COLUMNS -- */
                    // Added to correct for Columns
                    if ($this->ColActive) {
                        if ($this->directionality == 'rtl') { // *OTL*
                            $x -= ($this->CurrCol - $tablestartcolumn) * ($this->ColWidth + $this->ColGap); // *OTL*
                        } // *OTL*
                        else { // *OTL*
                            $x += ($this->CurrCol - $tablestartcolumn) * ($this->ColWidth + $this->ColGap);
                        } // *OTL*
                    }
                    /* -- END COLUMNS -- */

                    if ($colctr == 1) {
                        $x0 = $x;
                    }

                    // mPDF ITERATION
                    if ($this->iterationCounter) {
                        foreach ($tablehf['textbuffer'] as $k => $t) {
                            if (!is_array($t[0]) && preg_match('/{iteration ([a-zA-Z0-9_]+)}/', $t[0], $m)) {
                                $vname = '__' . $m[1] . '_';
                                if (!isset($this->$vname)) {
                                    $this->$vname = 1;
                                } else {
                                    $this->$vname++;
                                }
                                $tablehf['textbuffer'][$k][0] = preg_replace('/{iteration ' . $m[1] . '}/', $this->$vname, $tablehf['textbuffer'][$k][0]);
                            }
                        }
                    }

                    $w = Arrays::get($tablehf, 'w', null);
                    $h = Arrays::get($tablehf, 'h', null);
                    $va = Arrays::get($tablehf, 'va', null);
                    $R = Arrays::get($tablehf, 'R', null);
                    $direction = Arrays::get($tablehf, 'direction', null);
                    $mih = Arrays::get($tablehf, 'mih', null);
                    $border = Arrays::get($tablehf, 'border', null);
                    $border_details = Arrays::get($tablehf, 'border_details', null);
                    $padding = Arrays::get($tablehf, 'padding', null);
                    $this->tabletheadjustfinished = true;

                    $textbuffer = Arrays::get($tablehf, 'textbuffer', null);

                    // Align
                    $align = Arrays::get($tablehf, 'a', null);
                    $this->cellTextAlign = $align;

                    $this->cellLineHeight = Arrays::get($tablehf, 'cellLineHeight', null);
                    $this->cellLineStackingStrategy = Arrays::get($tablehf, 'cellLineStackingStrategy', null);
                    $this->cellLineStackingShift = Arrays::get($tablehf, 'cellLineStackingShift', null);

                    $this->x = $x;

                    if ($this->ColActive) {
                        if ($table['borders_separate']) {
                            $tablefill = isset($table['bgcolor'][-1]) ? $table['bgcolor'][-1] : 0;
                            if ($tablefill) {
                                $color = $this->colorConverter->convert($tablefill, $this->PDFAXwarnings);
                                if ($color) {
                                    $xadj = ($table['border_spacing_H'] / 2);
                                    $yadj = ($table['border_spacing_V'] / 2);
                                    $wadj = $table['border_spacing_H'];
                                    $hadj = $table['border_spacing_V'];
                                    if ($i == $firstrow && $horf == 'H') {  // Top
                                        $yadj += $table['padding']['T'] + $table['border_details']['T']['w'];
                                        $hadj += $table['padding']['T'] + $table['border_details']['T']['w'];
                                    }
                                    if (($i == ($lastrow) || (isset($tablehf['rowspan']) && ($i + $tablehf['rowspan']) == ($lastrow + 1)) || (!isset($tablehf['rowspan']) && ($i + 1) == ($lastrow + 1))) && $horf == 'F') { // Bottom
                                        $hadj += $table['padding']['B'] + $table['border_details']['B']['w'];
                                    }
                                    if ($colctr == 1) {  // Left
                                        $xadj += $table['padding']['L'] + $table['border_details']['L']['w'];
                                        $wadj += $table['padding']['L'] + $table['border_details']['L']['w'];
                                    }
                                    if ($colctr == count($content[$i])) { // Right
                                        $wadj += $table['padding']['R'] + $table['border_details']['R']['w'];
                                    }
                                    $this->SetFColor($color);
                                    $this->Rect($x - $xadj, $y - $yadj, $w + $wadj, $h + $hadj, 'F');
                                }
                            }
                        }
                    }

                    if ($table['empty_cells'] != 'hide' || !empty($textbuffer) || !$table['borders_separate']) {
                        $paintcell = true;
                    } else {
                        $paintcell = false;
                    }

                    // Vertical align
                    if ($R && intval($R) > 0 && isset($va) && $va != 'B') {
                        $va = 'B';
                    }

                    if (!isset($va) || empty($va) || $va == 'M') {
                        $this->y += ($h - $mih) / 2;
                    } elseif (isset($va) && $va == 'B') {
                        $this->y += $h - $mih;
                    }


                    // TABLE ROW OR CELL FILL BGCOLOR
                    $fill = 0;
                    if (isset($tablehf['bgcolor']) && $tablehf['bgcolor'] && $tablehf['bgcolor'] != 'transparent') {
                        $fill = $tablehf['bgcolor'];
                        $leveladj = 6;
                    } elseif (isset($content[$i][0]['trbgcolor']) && $content[$i][0]['trbgcolor'] && $content[$i][0]['trbgcolor'] != 'transparent') { // Row color
                        $fill = $content[$i][0]['trbgcolor'];
                        $leveladj = 3;
                    }
                    if ($fill && $paintcell) {
                        $color = $this->colorConverter->convert($fill, $this->PDFAXwarnings);
                        if ($color) {
                            if ($table['borders_separate']) {
                                if ($this->ColActive) {
                                    $this->SetFColor($color);
                                    $this->Rect($x + ($table['border_spacing_H'] / 2), $y + ($table['border_spacing_V'] / 2), $w - $table['border_spacing_H'], $h - $table['border_spacing_V'], 'F');
                                } else {
                                    $this->tableBackgrounds[$level * 9 + $leveladj][] = ['gradient' => false, 'x' => ($x + ($table['border_spacing_H'] / 2)), 'y' => ($y + ($table['border_spacing_V'] / 2)), 'w' => ($w - $table['border_spacing_H']), 'h' => ($h - $table['border_spacing_V']), 'col' => $color];
                                }
                            } else {
                                if ($this->ColActive) {
                                    $this->SetFColor($color);
                                    $this->Rect($x, $y, $w, $h, 'F');
                                } else {
                                    $this->tableBackgrounds[$level * 9 + $leveladj][] = ['gradient' => false, 'x' => $x, 'y' => $y, 'w' => $w, 'h' => $h, 'col' => $color];
                                }
                            }
                        }
                    }


                    /* -- BACKGROUNDS -- */
                    if (isset($tablehf['gradient']) && $tablehf['gradient'] && $paintcell) {
                        $g = $this->gradient->parseBackgroundGradient($tablehf['gradient']);
                        if ($g) {
                            if ($table['borders_separate']) {
                                $px = $x + ($table['border_spacing_H'] / 2);
                                $py = $y + ($table['border_spacing_V'] / 2);
                                $pw = $w - $table['border_spacing_H'];
                                $ph = $h - $table['border_spacing_V'];
                            } else {
                                $px = $x;
                                $py = $y;
                                $pw = $w;
                                $ph = $h;
                            }
                            if ($this->ColActive) {
                                $this->gradient->Gradient($px, $py, $pw, $ph, $g['type'], $g['stops'], $g['colorspace'], $g['coords'], $g['extend']);
                            } else {
                                $this->tableBackgrounds[$level * 9 + 7][] = ['gradient' => true, 'x' => $px, 'y' => $py, 'w' => $pw, 'h' => $ph, 'gradtype' => $g['type'], 'stops' => $g['stops'], 'colorspace' => $g['colorspace'], 'coords' => $g['coords'], 'extend' => $g['extend'], 'clippath' => ''];
                            }
                        }
                    }

                    if (isset($tablehf['background-image']) && $paintcell) {
                        if ($tablehf['background-image']['gradient'] && preg_match('/(-moz-)*(repeating-)*(linear|radial)-gradient/', $tablehf['background-image']['gradient'])) {
                            $g = $this->gradient->parseMozGradient($tablehf['background-image']['gradient']);
                            if ($g) {
                                if ($table['borders_separate']) {
                                    $px = $x + ($table['border_spacing_H'] / 2);
                                    $py = $y + ($table['border_spacing_V'] / 2);
                                    $pw = $w - $table['border_spacing_H'];
                                    $ph = $h - $table['border_spacing_V'];
                                } else {
                                    $px = $x;
                                    $py = $y;
                                    $pw = $w;
                                    $ph = $h;
                                }
                                if ($this->ColActive) {
                                    $this->gradient->Gradient($px, $py, $pw, $ph, $g['type'], $g['stops'], $g['colorspace'], $g['coords'], $g['extend']);
                                } else {
                                    $this->tableBackgrounds[$level * 9 + 7][] = ['gradient' => true, 'x' => $px, 'y' => $py, 'w' => $pw, 'h' => $ph, 'gradtype' => $g['type'], 'stops' => $g['stops'], 'colorspace' => $g['colorspace'], 'coords' => $g['coords'], 'extend' => $g['extend'], 'clippath' => ''];
                                }
                            }
                        } elseif ($tablehf['background-image']['image_id']) { // Background pattern
                            $n = count($this->patterns) + 1;
                            if ($table['borders_separate']) {
                                $px = $x + ($table['border_spacing_H'] / 2);
                                $py = $y + ($table['border_spacing_V'] / 2);
                                $pw = $w - $table['border_spacing_H'];
                                $ph = $h - $table['border_spacing_V'];
                            } else {
                                $px = $x;
                                $py = $y;
                                $pw = $w;
                                $ph = $h;
                            }
                            if ($this->ColActive) {
                                [$orig_w, $orig_h, $x_repeat, $y_repeat] = $this->_resizeBackgroundImage($tablehf['background-image']['orig_w'], $tablehf['background-image']['orig_h'], $pw, $ph, $tablehf['background-image']['resize'], $tablehf['background-image']['x_repeat'], $tablehf['background-image']['y_repeat']);
                                $this->patterns[$n] = ['x' => $px, 'y' => $py, 'w' => $pw, 'h' => $ph, 'pgh' => $this->h, 'image_id' => $tablehf['background-image']['image_id'], 'orig_w' => $orig_w, 'orig_h' => $orig_h, 'x_pos' => $tablehf['background-image']['x_pos'], 'y_pos' => $tablehf['background-image']['y_pos'], 'x_repeat' => $x_repeat, 'y_repeat' => $y_repeat, 'itype' => $tablehf['background-image']['itype']];
                                if ($tablehf['background-image']['opacity'] > 0 && $tablehf['background-image']['opacity'] < 1) {
                                    $opac = $this->SetAlpha($tablehf['background-image']['opacity'], 'Normal', true);
                                } else {
                                    $opac = '';
                                }
                                $this->writer->write(sprintf('q /Pattern cs /P%d scn %s %.3F %.3F %.3F %.3F re f Q', $n, $opac, $px * Mpdf::SCALE, ($this->h - $py) * Mpdf::SCALE, $pw * Mpdf::SCALE, -$ph * Mpdf::SCALE));
                            } else {
                                $this->tableBackgrounds[$level * 9 + 8][] = ['x' => $px, 'y' => $py, 'w' => $pw, 'h' => $ph, 'image_id' => $tablehf['background-image']['image_id'], 'orig_w' => $tablehf['background-image']['orig_w'], 'orig_h' => $tablehf['background-image']['orig_h'], 'x_pos' => $tablehf['background-image']['x_pos'], 'y_pos' => $tablehf['background-image']['y_pos'], 'x_repeat' => $tablehf['background-image']['x_repeat'], 'y_repeat' => $tablehf['background-image']['y_repeat'], 'clippath' => '', 'resize' => $tablehf['background-image']['resize'], 'opacity' => $tablehf['background-image']['opacity'], 'itype' => $tablehf['background-image']['itype']];
                            }
                        }
                    }
                    /* -- END BACKGROUNDS -- */

                    // Cell Border
                    if ($table['borders_separate'] && $paintcell && $border) {
                        $this->_tableRect($x + ($table['border_spacing_H'] / 2) + ($border_details['L']['w'] / 2), $y + ($table['border_spacing_V'] / 2) + ($border_details['T']['w'] / 2), $w - $table['border_spacing_H'] - ($border_details['L']['w'] / 2) - ($border_details['R']['w'] / 2), $h - $table['border_spacing_V'] - ($border_details['T']['w'] / 2) - ($border_details['B']['w'] / 2), $border, $border_details, false, $table['borders_separate']);
                    } elseif ($paintcell && $border) {
                        $this->_tableRect($x, $y, $w, $h, $border, $border_details, true, $table['borders_separate']);   // true causes buffer
                    }

                    // Print cell content
                    if (!empty($textbuffer)) {
                        if ($horf == 'F' && preg_match('/{colsum([0-9]*)[_]*}/', $textbuffer[0][0], $m)) {
                            $rep = sprintf("%01." . intval($m[1]) . "f", $this->colsums[$colctr - 1]);
                            $textbuffer[0][0] = preg_replace('/{colsum[0-9_]*}/', $rep, $textbuffer[0][0]);
                        }

                        if ($R) {
                            $cellPtSize = $textbuffer[0][11] / $this->shrin_k;
                            if (!$cellPtSize) {
                                $cellPtSize = $this->default_font_size;
                            }
                            $cellFontHeight = ($cellPtSize / Mpdf::SCALE);
                            $opx = $this->x;
                            $opy = $this->y;
                            $angle = intval($R);

                            // Only allow 45 - 90 degrees (when bottom-aligned) or -90
                            if ($angle > 90) {
                                $angle = 90;
                            } elseif ($angle > 0 && (isset($va) && $va != 'B')) {
                                $angle = 90;
                            } elseif ($angle > 0 && $angle < 45) {
                                $angle = 45;
                            } elseif ($angle < 0) {
                                $angle = -90;
                            }

                            $offset = ((sin(deg2rad($angle))) * 0.37 * $cellFontHeight);
                            if (isset($align) && $align == 'R') {
                                $this->x += ($w) + ($offset) - ($cellFontHeight / 3) - ($padding['R'] + $border_details['R']['w']);
                            } elseif (!isset($align) || $align == 'C') {
                                $this->x += ($w / 2) + ($offset);
                            } else {
                                $this->x += ($offset) + ($cellFontHeight / 3) + ($padding['L'] + $border_details['L']['w']);
                            }
                            $str = '';
                            foreach ($tablehf['textbuffer'] as $t) {
                                $str .= $t[0] . ' ';
                            }
                            $str = rtrim($str);

                            if (!isset($va) || $va == 'M') {
                                $this->y -= ($h - $mih) / 2; // Undo what was added earlier VERTICAL ALIGN
                                if ($angle > 0) {
                                    $this->y += (($h - $mih) / 2) + ($padding['T'] + $border_details['T']['w']) + ($mih - ($padding['T'] + $border_details['T']['w'] + $border_details['B']['w'] + $padding['B']));
                                } elseif ($angle < 0) {
                                    $this->y += (($h - $mih) / 2) + ($padding['T'] + $border_details['T']['w']);
                                }
                            } elseif (isset($va) && $va == 'B') {
                                $this->y -= $h - $mih; // Undo what was added earlier VERTICAL ALIGN
                                if ($angle > 0) {
                                    $this->y += $h - ($border_details['B']['w'] + $padding['B']);
                                } elseif ($angle < 0) {
                                    $this->y += $h - $mih + ($padding['T'] + $border_details['T']['w']);
                                }
                            } elseif (isset($va) && $va == 'T') {
                                if ($angle > 0) {
                                    $this->y += $mih - ($border_details['B']['w'] + $padding['B']);
                                } elseif ($angle < 0) {
                                    $this->y += ($padding['T'] + $border_details['T']['w']);
                                }
                            }

                            $this->Rotate($angle, $this->x, $this->y);
                            $s_fs = $this->FontSizePt;
                            $s_f = $this->FontFamily;
                            $s_st = $this->FontStyle;
                            if (!empty($textbuffer[0][3])) { // Font Color
                                $cor = $textbuffer[0][3];
                                $this->SetTColor($cor);
                            }
                            $this->SetFont($textbuffer[0][4], $textbuffer[0][2], $cellPtSize, true, true);

                            $this->magic_reverse_dir($str, $this->directionality, $textbuffer[0][18]);
                            $this->Text($this->x, $this->y, $str, $textbuffer[0][18], $textbuffer[0][8]); // textvar
                            $this->Rotate(0);
                            $this->SetFont($s_f, $s_st, $s_fs, true, true);
                            $this->SetTColor(0);
                            $this->x = $opx;
                            $this->y = $opy;
                        } else {
                            if ($table['borders_separate']) { // NB twice border width
                                $xadj = $border_details['L']['w'] + $padding['L'] + ($table['border_spacing_H'] / 2);
                                $wadj = $border_details['L']['w'] + $border_details['R']['w'] + $padding['L'] + $padding['R'] + $table['border_spacing_H'];
                                $yadj = $border_details['T']['w'] + $padding['T'] + ($table['border_spacing_H'] / 2);
                            } else {
                                $xadj = $border_details['L']['w'] / 2 + $padding['L'];
                                $wadj = ($border_details['L']['w'] + $border_details['R']['w']) / 2 + $padding['L'] + $padding['R'];
                                $yadj = $border_details['T']['w'] / 2 + $padding['T'];
                            }

                            $this->divwidth = $w - ($wadj);
                            $this->x += $xadj;
                            $this->y += $yadj;
                            $this->printbuffer($textbuffer, '', true, false, $direction);
                        }
                    }
                    $textbuffer = [];

                    /* -- BACKGROUNDS -- */
                    if (!$this->ColActive) {
                        if (isset($content[$i][0]['trgradients']) && ($colctr == 1 || $table['borders_separate'])) {
                            $g = $this->gradient->parseBackgroundGradient($content[$i][0]['trgradients']);
                            if ($g) {
                                $gx = $x0;
                                $gy = $y;
                                $gh = $h;
                                $gw = $table['w'] - ($table['max_cell_border_width']['L'] / 2) - ($table['max_cell_border_width']['R'] / 2) - $table['margin']['L'] - $table['margin']['R'];
                                if ($table['borders_separate']) {
                                    $gw -= ($table['padding']['L'] + $table['border_details']['L']['w'] + $table['padding']['R'] + $table['border_details']['R']['w'] + $table['border_spacing_H']);
                                    $clx = $x + ($table['border_spacing_H'] / 2);
                                    $cly = $y + ($table['border_spacing_V'] / 2);
                                    $clw = $w - $table['border_spacing_H'];
                                    $clh = $h - $table['border_spacing_V'];
                                    // Set clipping path
                                    $s = $this->_setClippingPath($clx, $cly, $clw, $clh); // mPDF 6
                                    $this->tableBackgrounds[$level * 9 + 4][] = ['gradient' => true, 'x' => $gx + ($table['border_spacing_H'] / 2), 'y' => $gy + ($table['border_spacing_V'] / 2), 'w' => $gw - $table['border_spacing_V'], 'h' => $gh - $table['border_spacing_H'], 'gradtype' => $g['type'], 'stops' => $g['stops'], 'colorspace' => $g['colorspace'], 'coords' => $g['coords'], 'extend' => $g['extend'], 'clippath' => $s];
                                } else {
                                    $this->tableBackgrounds[$level * 9 + 4][] = ['gradient' => true, 'x' => $gx, 'y' => $gy, 'w' => $gw, 'h' => $gh, 'gradtype' => $g['type'], 'stops' => $g['stops'], 'colorspace' => $g['colorspace'], 'coords' => $g['coords'], 'extend' => $g['extend'], 'clippath' => ''];
                                }
                            }
                        }

                        if (isset($content[$i][0]['trbackground-images']) && ($colctr == 1 || $table['borders_separate'])) {
                            if ($content[$i][0]['trbackground-images']['gradient'] && preg_match('/(-moz-)*(repeating-)*(linear|radial)-gradient/', $content[$i][0]['trbackground-images']['gradient'])) {
                                $g = $this->gradient->parseMozGradient($content[$i][0]['trbackground-images']['gradient']);
                                if ($g) {
                                    $gx = $x0;
                                    $gy = $y;
                                    $gh = $h;
                                    $gw = $table['w'] - ($table['max_cell_border_width']['L'] / 2) - ($table['max_cell_border_width']['R'] / 2) - $table['margin']['L'] - $table['margin']['R'];
                                    if ($table['borders_separate']) {
                                        $gw -= ($table['padding']['L'] + $table['border_details']['L']['w'] + $table['padding']['R'] + $table['border_details']['R']['w'] + $table['border_spacing_H']);
                                        $clx = $x + ($table['border_spacing_H'] / 2);
                                        $cly = $y + ($table['border_spacing_V'] / 2);
                                        $clw = $w - $table['border_spacing_H'];
                                        $clh = $h - $table['border_spacing_V'];
                                        // Set clipping path
                                        $s = $this->_setClippingPath($clx, $cly, $clw, $clh); // mPDF 6
                                        $this->tableBackgrounds[$level * 9 + 4][] = ['gradient' => true, 'x' => $gx + ($table['border_spacing_H'] / 2), 'y' => $gy + ($table['border_spacing_V'] / 2), 'w' => $gw - $table['border_spacing_V'], 'h' => $gh - $table['border_spacing_H'], 'gradtype' => $g['type'], 'stops' => $g['stops'], 'colorspace' => $g['colorspace'], 'coords' => $g['coords'], 'extend' => $g['extend'], 'clippath' => $s];
                                    } else {
                                        $this->tableBackgrounds[$level * 9 + 4][] = ['gradient' => true, 'x' => $gx, 'y' => $gy, 'w' => $gw, 'h' => $gh, 'gradtype' => $g['type'], 'stops' => $g['stops'], 'colorspace' => $g['colorspace'], 'coords' => $g['coords'], 'extend' => $g['extend'], 'clippath' => ''];
                                    }
                                }
                            } else {
                                $image_id = $content[$i][0]['trbackground-images']['image_id'];
                                $orig_w = $content[$i][0]['trbackground-images']['orig_w'];
                                $orig_h = $content[$i][0]['trbackground-images']['orig_h'];
                                $x_pos = $content[$i][0]['trbackground-images']['x_pos'];
                                $y_pos = $content[$i][0]['trbackground-images']['y_pos'];
                                $x_repeat = $content[$i][0]['trbackground-images']['x_repeat'];
                                $y_repeat = $content[$i][0]['trbackground-images']['y_repeat'];
                                $resize = $content[$i][0]['trbackground-images']['resize'];
                                $opacity = $content[$i][0]['trbackground-images']['opacity'];
                                $itype = $content[$i][0]['trbackground-images']['itype'];

                                $clippath = '';
                                $gx = $x0;
                                $gy = $y;
                                $gh = $h;
                                $gw = $table['w'] - ($table['max_cell_border_width']['L'] / 2) - ($table['max_cell_border_width']['R'] / 2) - $table['margin']['L'] - $table['margin']['R'];
                                if ($table['borders_separate']) {
                                    $gw -= ($table['padding']['L'] + $table['border_details']['L']['w'] + $table['padding']['R'] + $table['border_details']['R']['w'] + $table['border_spacing_H']);
                                    $clx = $x + ($table['border_spacing_H'] / 2);
                                    $cly = $y + ($table['border_spacing_V'] / 2);
                                    $clw = $w - $table['border_spacing_H'];
                                    $clh = $h - $table['border_spacing_V'];
                                    // Set clipping path
                                    $s = $this->_setClippingPath($clx, $cly, $clw, $clh); // mPDF 6
                                    $this->tableBackgrounds[$level * 9 + 5][] = ['x' => $gx + ($table['border_spacing_H'] / 2), 'y' => $gy + ($table['border_spacing_V'] / 2), 'w' => $gw - $table['border_spacing_V'], 'h' => $gh - $table['border_spacing_H'], 'image_id' => $image_id, 'orig_w' => $orig_w, 'orig_h' => $orig_h, 'x_pos' => $x_pos, 'y_pos' => $y_pos, 'x_repeat' => $x_repeat, 'y_repeat' => $y_repeat, 'clippath' => $s, 'resize' => $resize, 'opacity' => $opacity, 'itype' => $itype];
                                } else {
                                    $this->tableBackgrounds[$level * 9 + 5][] = ['x' => $gx, 'y' => $gy, 'w' => $gw, 'h' => $gh, 'image_id' => $image_id, 'orig_w' => $orig_w, 'orig_h' => $orig_h, 'x_pos' => $x_pos, 'y_pos' => $y_pos, 'x_repeat' => $x_repeat, 'y_repeat' => $y_repeat, 'clippath' => '', 'resize' => $resize, 'opacity' => $opacity, 'itype' => $itype];
                                }
                            }
                        }
                    }
                    /* -- END BACKGROUNDS -- */

                    // TABLE BORDER - if separate OR collapsed and only table border
                    if (($table['borders_separate'] || ($this->simpleTables && !$table['simple']['border'])) && $table['border']) {
                        $halfspaceL = $table['padding']['L'] + ($table['border_spacing_H'] / 2);
                        $halfspaceR = $table['padding']['R'] + ($table['border_spacing_H'] / 2);
                        $halfspaceT = $table['padding']['T'] + ($table['border_spacing_V'] / 2);
                        $halfspaceB = $table['padding']['B'] + ($table['border_spacing_V'] / 2);
                        $tbx = $x;
                        $tby = $y;
                        $tbw = $w;
                        $tbh = $h;
                        $tab_bord = 0;
                        $corner = '';
                        if ($i == $firstrow && $horf == 'H') {  // Top
                            $tby -= $halfspaceT + ($table['border_details']['T']['w'] / 2);
                            $tbh += $halfspaceT + ($table['border_details']['T']['w'] / 2);
                            $this->setBorder($tab_bord, Border::TOP);
                            $corner .= 'T';
                        }
                        if (($i == ($lastrow) || (isset($tablehf['rowspan']) && ($i + $tablehf['rowspan']) == ($lastrow + 1))) && $horf == 'F') { // Bottom
                            $tbh += $halfspaceB + ($table['border_details']['B']['w'] / 2);
                            $this->setBorder($tab_bord, Border::BOTTOM);
                            $corner .= 'B';
                        }
                        if ($colctr == 1 && $firstSpread) { // Left
                            $tbx -= $halfspaceL + ($table['border_details']['L']['w'] / 2);
                            $tbw += $halfspaceL + ($table['border_details']['L']['w'] / 2);
                            $this->setBorder($tab_bord, Border::LEFT);
                            $corner .= 'L';
                        }
                        if ($colctr == count($content[$i]) && $finalSpread) { // Right
                            $tbw += $halfspaceR + ($table['border_details']['R']['w'] / 2);
                            $this->setBorder($tab_bord, Border::RIGHT);
                            $corner .= 'R';
                        }
                        $this->_tableRect($tbx, $tby, $tbw, $tbh, $tab_bord, $table['border_details'], false, $table['borders_separate'], 'table', $corner, $table['border_spacing_V'], $table['border_spacing_H']);
                    }
                }// end column $content
                $this->y = $y + $h; // Update y coordinate
            }// end row $i
            unset($table);
            $this->colsums = [];
        }
    }

    /* -- END TABLES -- */

    function SetHTMLHeader($header = '', $OE = '', $write = false)
    {

        $height = 0;
        if (is_array($header) && isset($header['html']) && $header['html']) {
            $Hhtml = $header['html'];
            if ($this->setAutoTopMargin) {
                if (isset($header['h'])) {
                    $height = $header['h'];
                } else {
                    $height = $this->_getHtmlHeight($Hhtml);
                }
            }
        } elseif (!is_array($header) && $header) {
            $Hhtml = $header;
            if ($this->setAutoTopMargin) {
                $height = $this->_getHtmlHeight($Hhtml);
            }
        } else {
            $Hhtml = '';
        }

        if ($OE !== 'E') {
            $OE = 'O';
        }

        if ($OE === 'E') {
            if ($Hhtml) {
                $this->HTMLHeaderE = [];
                $this->HTMLHeaderE['html'] = $Hhtml;
                $this->HTMLHeaderE['h'] = $height;
            } else {
                $this->HTMLHeaderE = '';
            }
        } else {
            if ($Hhtml) {
                $this->HTMLHeader = [];
                $this->HTMLHeader['html'] = $Hhtml;
                $this->HTMLHeader['h'] = $height;
            } else {
                $this->HTMLHeader = '';
            }
        }

        if (!$this->mirrorMargins && $OE == 'E') {
            return;
        }
        if ($Hhtml == '') {
            return;
        }

        if ($this->setAutoTopMargin == 'pad') {
            $this->tMargin = $this->margin_header + $height + $this->orig_tMargin;
            if (isset($this->saveHTMLHeader[$this->page][$OE]['mt'])) {
                $this->saveHTMLHeader[$this->page][$OE]['mt'] = $this->tMargin;
            }
        } elseif ($this->setAutoTopMargin == 'stretch') {
            $this->tMargin = max($this->orig_tMargin, $this->margin_header + $height + $this->autoMarginPadding);
            if (isset($this->saveHTMLHeader[$this->page][$OE]['mt'])) {
                $this->saveHTMLHeader[$this->page][$OE]['mt'] = $this->tMargin;
            }
        }
        if ($write && $this->state != 0 && (($this->mirrorMargins && $OE == 'E' && ($this->page) % 2 == 0) || ($this->mirrorMargins && $OE != 'E' && ($this->page) % 2 == 1) || !$this->mirrorMargins)) {
            $this->writeHTMLHeaders();
        }
    }

    function SetHTMLFooter($footer = '', $OE = '')
    {
        $height = 0;
        if (is_array($footer) && isset($footer['html']) && $footer['html']) {
            $Fhtml = $footer['html'];
            if ($this->setAutoBottomMargin) {
                if (isset($footer['h'])) {
                    $height = $footer['h'];
                } else {
                    $height = $this->_getHtmlHeight($Fhtml);
                }
            }
        } elseif (!is_array($footer) && $footer) {
            $Fhtml = $footer;
            if ($this->setAutoBottomMargin) {
                $height = $this->_getHtmlHeight($Fhtml);
            }
        } else {
            $Fhtml = '';
        }

        if ($OE !== 'E') {
            $OE = 'O';
        }

        if ($OE === 'E') {
            if ($Fhtml) {
                $this->HTMLFooterE = [];
                $this->HTMLFooterE['html'] = $Fhtml;
                $this->HTMLFooterE['h'] = $height;
            } else {
                $this->HTMLFooterE = '';
            }
        } else {
            if ($Fhtml) {
                $this->HTMLFooter = [];
                $this->HTMLFooter['html'] = $Fhtml;
                $this->HTMLFooter['h'] = $height;
            } else {
                $this->HTMLFooter = '';
            }
        }

        if (!$this->mirrorMargins && $OE == 'E') {
            return;
        }

        if ($Fhtml == '') {
            return false;
        }

        if ($this->setAutoBottomMargin == 'pad') {
            $this->bMargin = $this->margin_footer + $height + $this->orig_bMargin;
            $this->PageBreakTrigger = $this->h - $this->bMargin;
            if (isset($this->saveHTMLHeader[$this->page][$OE]['mb'])) {
                $this->saveHTMLHeader[$this->page][$OE]['mb'] = $this->bMargin;
            }
        } elseif ($this->setAutoBottomMargin == 'stretch') {
            $this->bMargin = max($this->orig_bMargin, $this->margin_footer + $height + $this->autoMarginPadding);
            $this->PageBreakTrigger = $this->h - $this->bMargin;
            if (isset($this->saveHTMLHeader[$this->page][$OE]['mb'])) {
                $this->saveHTMLHeader[$this->page][$OE]['mb'] = $this->bMargin;
            }
        }
    }

    function _getHtmlHeight($html)
    {
        $save_state = $this->state;
        if ($this->state == 0) {
            $this->AddPage($this->CurOrientation);
        }
        $this->state = 2;
        $this->Reset();
        $this->pageoutput[$this->page] = [];
        $save_x = $this->x;
        $save_y = $this->y;
        $this->x = $this->lMargin;
        $this->y = $this->margin_header;
        $html = str_replace('{PAGENO}', $this->pagenumPrefix . $this->docPageNum($this->page) . $this->pagenumSuffix, $html);
        $html = str_replace($this->aliasNbPgGp, $this->nbpgPrefix . $this->docPageNumTotal($this->page) . $this->nbpgSuffix, $html);
        $html = str_replace($this->aliasNbPg, $this->page, $html);
        $html = preg_replace_callback('/\{DATE\s+(.*?)\}/', [$this, 'date_callback'], $html); // mPDF 5.7
        $this->HTMLheaderPageLinks = [];
        $this->HTMLheaderPageAnnots = [];
        $this->HTMLheaderPageForms = [];
        $savepb = $this->pageBackgrounds;
        $this->writingHTMLheader = true;
        $this->WriteHTML($html, HTMLParserMode::HTML_HEADER_BUFFER);
        $this->writingHTMLheader = false;
        $h = ($this->y - $this->margin_header);
        $this->Reset();
        // mPDF 5.7.2 - Clear in case Float used in Header/Footer
        $this->blk[0]['blockContext'] = 0;
        $this->blk[0]['float_endpos'] = 0;

        $this->pageoutput[$this->page] = [];
        $this->headerbuffer = '';
        $this->pageBackgrounds = $savepb;
        $this->x = $save_x;
        $this->y = $save_y;
        $this->state = $save_state;
        if ($save_state == 0) {
            unset($this->pages[1]);
            $this->page = 0;
        }
        return $h;
    }

    // Called internally from Header
    function writeHTMLHeaders()
    {

        if ($this->mirrorMargins && ($this->page) % 2 == 0) {
            $OE = 'E';
        } else {
            $OE = 'O';
        }

        if ($OE === 'E') {
            $this->saveHTMLHeader[$this->page][$OE]['html'] = $this->HTMLHeaderE['html'];
        } else {
            $this->saveHTMLHeader[$this->page][$OE]['html'] = $this->HTMLHeader['html'];
        }

        if ($this->forcePortraitHeaders && $this->CurOrientation == 'L' && $this->CurOrientation != $this->DefOrientation) {
            $this->saveHTMLHeader[$this->page][$OE]['rotate'] = true;
            $this->saveHTMLHeader[$this->page][$OE]['ml'] = $this->tMargin;
            $this->saveHTMLHeader[$this->page][$OE]['mr'] = $this->bMargin;
            $this->saveHTMLHeader[$this->page][$OE]['mh'] = $this->margin_header;
            $this->saveHTMLHeader[$this->page][$OE]['mf'] = $this->margin_footer;
            $this->saveHTMLHeader[$this->page][$OE]['pw'] = $this->h;
            $this->saveHTMLHeader[$this->page][$OE]['ph'] = $this->w;
        } else {
            $this->saveHTMLHeader[$this->page][$OE]['ml'] = $this->lMargin;
            $this->saveHTMLHeader[$this->page][$OE]['mr'] = $this->rMargin;
            $this->saveHTMLHeader[$this->page][$OE]['mh'] = $this->margin_header;
            $this->saveHTMLHeader[$this->page][$OE]['mf'] = $this->margin_footer;
            $this->saveHTMLHeader[$this->page][$OE]['pw'] = $this->w;
            $this->saveHTMLHeader[$this->page][$OE]['ph'] = $this->h;
        }
    }

    function writeHTMLFooters()
    {

        if ($this->mirrorMargins && ($this->page) % 2 == 0) {
            $OE = 'E';
        } else {
            $OE = 'O';
        }

        if ($OE === 'E') {
            $this->saveHTMLFooter[$this->page][$OE]['html'] = $this->HTMLFooterE['html'];
        } else {
            $this->saveHTMLFooter[$this->page][$OE]['html'] = $this->HTMLFooter['html'];
        }

        if ($this->forcePortraitHeaders && $this->CurOrientation == 'L' && $this->CurOrientation != $this->DefOrientation) {
            $this->saveHTMLFooter[$this->page][$OE]['rotate'] = true;
            $this->saveHTMLFooter[$this->page][$OE]['ml'] = $this->tMargin;
            $this->saveHTMLFooter[$this->page][$OE]['mr'] = $this->bMargin;
            $this->saveHTMLFooter[$this->page][$OE]['mt'] = $this->rMargin;
            $this->saveHTMLFooter[$this->page][$OE]['mb'] = $this->lMargin;
            $this->saveHTMLFooter[$this->page][$OE]['mh'] = $this->margin_header;
            $this->saveHTMLFooter[$this->page][$OE]['mf'] = $this->margin_footer;
            $this->saveHTMLFooter[$this->page][$OE]['pw'] = $this->h;
            $this->saveHTMLFooter[$this->page][$OE]['ph'] = $this->w;
        } else {
            $this->saveHTMLFooter[$this->page][$OE]['ml'] = $this->lMargin;
            $this->saveHTMLFooter[$this->page][$OE]['mr'] = $this->rMargin;
            $this->saveHTMLFooter[$this->page][$OE]['mt'] = $this->tMargin;
            $this->saveHTMLFooter[$this->page][$OE]['mb'] = $this->bMargin;
            $this->saveHTMLFooter[$this->page][$OE]['mh'] = $this->margin_header;
            $this->saveHTMLFooter[$this->page][$OE]['mf'] = $this->margin_footer;
            $this->saveHTMLFooter[$this->page][$OE]['pw'] = $this->w;
            $this->saveHTMLFooter[$this->page][$OE]['ph'] = $this->h;
        }
    }

    // mPDF 6
    function _shareHeaderFooterWidth($cl, $cc, $cr)
    {
        // mPDF 6
        $l = mb_strlen($cl, 'UTF-8');
        $c = mb_strlen($cc, 'UTF-8');
        $r = mb_strlen($cr, 'UTF-8');
        $s = max($l, $r);
        $tw = $c + 2 * $s;
        if ($tw > 0) {
            return [intval($s * 100 / $tw), intval($c * 100 / $tw), intval($s * 100 / $tw)];
        } else {
            return [33, 33, 33];
        }
    }

    // mPDF 6
    // Create an HTML header/footer from array (non-HTML header/footer)
    function _createHTMLheaderFooter($arr, $hf)
    {
        $lContent = (isset($arr['L']['content']) ? $arr['L']['content'] : '');
        $cContent = (isset($arr['C']['content']) ? $arr['C']['content'] : '');
        $rContent = (isset($arr['R']['content']) ? $arr['R']['content'] : '');
        [$lw, $cw, $rw] = $this->_shareHeaderFooterWidth($lContent, $cContent, $rContent);
        if ($hf == 'H') {
            $valign = 'bottom';
            $vpadding = '0 0 ' . $this->header_line_spacing . 'em 0';
        } else {
            $valign = 'top';
            $vpadding = '' . $this->footer_line_spacing . 'em 0 0 0';
        }
        if ($this->directionality == 'rtl') { // table columns get reversed so need different text-alignment
            $talignL = 'right';
            $talignR = 'left';
        } else {
            $talignL = 'left';
            $talignR = 'right';
        }
        $html = '<table width="100%" style="border-collapse: collapse; margin: 0; vertical-align: ' . $valign . '; color: #000000; ';
        if (isset($arr['line']) && $arr['line']) {
            $html .= ' border-' . $valign . ': 0.1mm solid #000000;';
        }
        $html .= '">';
        $html .= '<tr>';
        $html .= '<td width="' . $lw . '%" style="padding: ' . $vpadding . '; text-align: ' . $talignL . '; ';
        if (isset($arr['L']['font-family'])) {
            $html .= ' font-family: ' . $arr['L']['font-family'] . ';';
        }
        if (isset($arr['L']['color'])) {
            $html .= ' color: ' . $arr['L']['color'] . ';';
        }
        if (isset($arr['L']['font-size'])) {
            $html .= ' font-size: ' . $arr['L']['font-size'] . 'pt;';
        }
        if (isset($arr['L']['font-style'])) {
            if ($arr['L']['font-style'] == 'B' || $arr['L']['font-style'] == 'BI') {
                $html .= ' font-weight: bold;';
            }
            if ($arr['L']['font-style'] == 'I' || $arr['L']['font-style'] == 'BI') {
                $html .= ' font-style: italic;';
            }
        }
        $html .= '">' . $lContent . '</td>';
        $html .= '<td width="' . $cw . '%" style="padding: ' . $vpadding . '; text-align: center; ';
        if (isset($arr['C']['font-family'])) {
            $html .= ' font-family: ' . $arr['C']['font-family'] . ';';
        }
        if (isset($arr['C']['color'])) {
            $html .= ' color: ' . $arr['C']['color'] . ';';
        }
        if (isset($arr['C']['font-size'])) {
            $html .= ' font-size: ' . $arr['L']['font-size'] . 'pt;';
        }
        if (isset($arr['C']['font-style'])) {
            if ($arr['C']['font-style'] == 'B' || $arr['C']['font-style'] == 'BI') {
                $html .= ' font-weight: bold;';
            }
            if ($arr['C']['font-style'] == 'I' || $arr['C']['font-style'] == 'BI') {
                $html .= ' font-style: italic;';
            }
        }
        $html .= '">' . $cContent . '</td>';
        $html .= '<td width="' . $rw . '%" style="padding: ' . $vpadding . '; text-align: ' . $talignR . '; ';
        if (isset($arr['R']['font-family'])) {
            $html .= ' font-family: ' . $arr['R']['font-family'] . ';';
        }
        if (isset($arr['R']['color'])) {
            $html .= ' color: ' . $arr['R']['color'] . ';';
        }
        if (isset($arr['R']['font-size'])) {
            $html .= ' font-size: ' . $arr['R']['font-size'] . 'pt;';
        }
        if (isset($arr['R']['font-style'])) {
            if ($arr['R']['font-style'] == 'B' || $arr['R']['font-style'] == 'BI') {
                $html .= ' font-weight: bold;';
            }
            if ($arr['R']['font-style'] == 'I' || $arr['R']['font-style'] == 'BI') {
                $html .= ' font-style: italic;';
            }
        }
        $html .= '">' . $rContent . '</td>';
        $html .= '</tr></table>';
        return $html;
    }

    function DefHeaderByName($name, $arr)
    {
        if (!$name) {
            $name = '_nonhtmldefault';
        }
        $html = $this->_createHTMLheaderFooter($arr, 'H');

        $this->pageHTMLheaders[$name]['html'] = $html;
        $this->pageHTMLheaders[$name]['h'] = $this->_getHtmlHeight($html);
    }

    function DefFooterByName($name, $arr)
    {
        if (!$name) {
            $name = '_nonhtmldefault';
        }
        $html = $this->_createHTMLheaderFooter($arr, 'F');

        $this->pageHTMLfooters[$name]['html'] = $html;
        $this->pageHTMLfooters[$name]['h'] = $this->_getHtmlHeight($html);
    }

    function SetHeaderByName($name, $side = 'O', $write = false)
    {
        if (!$name) {
            $name = '_nonhtmldefault';
        }
        $this->SetHTMLHeader($this->pageHTMLheaders[$name], $side, $write);
    }

    function SetFooterByName($name, $side = 'O')
    {
        if (!$name) {
            $name = '_nonhtmldefault';
        }
        $this->SetHTMLFooter($this->pageHTMLfooters[$name], $side);
    }

    function DefHTMLHeaderByName($name, $html)
    {
        if (!$name) {
            $name = '_default';
        }

        $this->pageHTMLheaders[$name]['html'] = $html;
        $this->pageHTMLheaders[$name]['h'] = $this->_getHtmlHeight($html);
    }

    function DefHTMLFooterByName($name, $html)
    {
        if (!$name) {
            $name = '_default';
        }

        $this->pageHTMLfooters[$name]['html'] = $html;
        $this->pageHTMLfooters[$name]['h'] = $this->_getHtmlHeight($html);
    }

    function SetHTMLHeaderByName($name, $side = 'O', $write = false)
    {
        if (!$name) {
            $name = '_default';
        }
        $this->SetHTMLHeader($this->pageHTMLheaders[$name], $side, $write);
    }

    function SetHTMLFooterByName($name, $side = 'O')
    {
        if (!$name) {
            $name = '_default';
        }
        $this->SetHTMLFooter($this->pageHTMLfooters[$name], $side);
    }

    function SetHeader($Harray = [], $side = '', $write = false)
    {
        $oddhtml = '';
        $evenhtml = '';

        if (is_string($Harray)) {

            if (strlen($Harray) === 0) {

                $oddhtml = '';
                $evenhtml = '';

            } elseif (strpos($Harray, '|') !== false) {

                $hdet = explode('|', $Harray);

                [$lw, $cw, $rw] = $this->_shareHeaderFooterWidth($hdet[0], $hdet[1], $hdet[2]);
                $oddhtml = '<table width="100%" style="border-collapse: collapse; margin: 0; vertical-align: bottom; color: #000000; ';

                if ($this->defaultheaderfontsize) {
                    $oddhtml .= ' font-size: ' . $this->defaultheaderfontsize . 'pt;';
                }

                if ($this->defaultheaderfontstyle) {

                    if ($this->defaultheaderfontstyle == 'B' || $this->defaultheaderfontstyle == 'BI') {
                        $oddhtml .= ' font-weight: bold;';
                    }

                    if ($this->defaultheaderfontstyle == 'I' || $this->defaultheaderfontstyle == 'BI') {
                        $oddhtml .= ' font-style: italic;';
                    }
                }

                if ($this->defaultheaderline) {
                    $oddhtml .= ' border-bottom: 0.1mm solid #000000;';
                }

                $oddhtml .= '">';
                $oddhtml .= '<tr>';
                $oddhtml .= '<td width="' . $lw . '%" style="padding: 0 0 ' . $this->header_line_spacing . 'em 0; text-align: left; ">' . $hdet[0] . '</td>';
                $oddhtml .= '<td width="' . $cw . '%" style="padding: 0 0 ' . $this->header_line_spacing . 'em 0; text-align: center; ">' . $hdet[1] . '</td>';
                $oddhtml .= '<td width="' . $rw . '%" style="padding: 0 0 ' . $this->header_line_spacing . 'em 0; text-align: right; ">' . $hdet[2] . '</td>';
                $oddhtml .= '</tr></table>';

                $evenhtml = '<table width="100%" style="border-collapse: collapse; margin: 0; vertical-align: bottom; color: #000000; ';

                if ($this->defaultheaderfontsize) {
                    $evenhtml .= ' font-size: ' . $this->defaultheaderfontsize . 'pt;';
                }

                if ($this->defaultheaderfontstyle) {
                    if ($this->defaultheaderfontstyle == 'B' || $this->defaultheaderfontstyle == 'BI') {
                        $evenhtml .= ' font-weight: bold;';
                    }
                    if ($this->defaultheaderfontstyle == 'I' || $this->defaultheaderfontstyle == 'BI') {
                        $evenhtml .= ' font-style: italic;';
                    }
                }

                if ($this->defaultheaderline) {
                    $evenhtml .= ' border-bottom: 0.1mm solid #000000;';
                }

                $evenhtml .= '">';
                $evenhtml .= '<tr>';
                $evenhtml .= '<td width="' . $rw . '%" style="padding: 0 0 ' . $this->header_line_spacing . 'em 0; text-align: left; ">' . $hdet[2] . '</td>';
                $evenhtml .= '<td width="' . $cw . '%" style="padding: 0 0 ' . $this->header_line_spacing . 'em 0; text-align: center; ">' . $hdet[1] . '</td>';
                $evenhtml .= '<td width="' . $lw . '%" style="padding: 0 0 ' . $this->header_line_spacing . 'em 0; text-align: right; ">' . $hdet[0] . '</td>';
                $evenhtml .= '</tr></table>';

            } else {

                $oddhtml = '<div style="margin: 0; color: #000000; ';

                if ($this->defaultheaderfontsize) {
                    $oddhtml .= ' font-size: ' . $this->defaultheaderfontsize . 'pt;';
                }

                if ($this->defaultheaderfontstyle) {

                    if ($this->defaultheaderfontstyle == 'B' || $this->defaultheaderfontstyle == 'BI') {
                        $oddhtml .= ' font-weight: bold;';
                    }

                    if ($this->defaultheaderfontstyle == 'I' || $this->defaultheaderfontstyle == 'BI') {
                        $oddhtml .= ' font-style: italic;';
                    }
                }

                if ($this->defaultheaderline) {
                    $oddhtml .= ' border-bottom: 0.1mm solid #000000;';
                }

                $oddhtml .= 'text-align: right; ">' . $Harray . '</div>';
                $evenhtml = '<div style="margin: 0; color: #000000; ';

                if ($this->defaultheaderfontsize) {
                    $evenhtml .= ' font-size: ' . $this->defaultheaderfontsize . 'pt;';
                }

                if ($this->defaultheaderfontstyle) {

                    if ($this->defaultheaderfontstyle == 'B' || $this->defaultheaderfontstyle == 'BI') {
                        $evenhtml .= ' font-weight: bold;';
                    }

                    if ($this->defaultheaderfontstyle == 'I' || $this->defaultheaderfontstyle == 'BI') {
                        $evenhtml .= ' font-style: italic;';
                    }
                }

                if ($this->defaultheaderline) {
                    $evenhtml .= ' border-bottom: 0.1mm solid #000000;';
                }

                $evenhtml .= 'text-align: left; ">' . $Harray . '</div>';
            }

        } elseif (is_array($Harray) && !empty($Harray)) {

            $odd = null;
            $even = null;

            if ($side === 'O') {
                $odd = $Harray;
            } elseif ($side === 'E') {
                $even = $Harray;
            } else {
                $odd = Arrays::get($Harray, 'odd', null);
                $even = Arrays::get($Harray, 'even', null);
            }

            $oddhtml = $this->_createHTMLheaderFooter($odd, 'H');
            $evenhtml = $this->_createHTMLheaderFooter($even, 'H');
        }

        if ($side === 'E') {
            $this->SetHTMLHeader($evenhtml, 'E', $write);
        } elseif ($side === 'O') {
            $this->SetHTMLHeader($oddhtml, 'O', $write);
        } else {
            $this->SetHTMLHeader($oddhtml, 'O', $write);
            $this->SetHTMLHeader($evenhtml, 'E', $write);
        }
    }

    function SetFooter($Farray = [], $side = '')
    {
        $oddhtml = '';
        $evenhtml = '';

        if (is_string($Farray)) {

            if (strlen($Farray) == 0) {

                $oddhtml = '';
                $evenhtml = '';

            } elseif (strpos($Farray, '|') !== false) {

                $hdet = explode('|', $Farray);
                $oddhtml = '<table width="100%" style="border-collapse: collapse; margin: 0; vertical-align: top; color: #000000; ';

                if ($this->defaultfooterfontsize) {
                    $oddhtml .= ' font-size: ' . $this->defaultfooterfontsize . 'pt;';
                }

                if ($this->defaultfooterfontstyle) {
                    if ($this->defaultfooterfontstyle == 'B' || $this->defaultfooterfontstyle == 'BI') {
                        $oddhtml .= ' font-weight: bold;';
                    }
                    if ($this->defaultfooterfontstyle == 'I' || $this->defaultfooterfontstyle == 'BI') {
                        $oddhtml .= ' font-style: italic;';
                    }
                }

                if ($this->defaultfooterline) {
                    $oddhtml .= ' border-top: 0.1mm solid #000000;';
                }

                $oddhtml .= '">';
                $oddhtml .= '<tr>';
                $oddhtml .= '<td width="33%" style="padding: ' . $this->footer_line_spacing . 'em 0 0 0; text-align: left; ">' . $hdet[0] . '</td>';
                $oddhtml .= '<td width="33%" style="padding: ' . $this->footer_line_spacing . 'em 0 0 0; text-align: center; ">' . $hdet[1] . '</td>';
                $oddhtml .= '<td width="33%" style="padding: ' . $this->footer_line_spacing . 'em 0 0 0; text-align: right; ">' . $hdet[2] . '</td>';
                $oddhtml .= '</tr></table>';

                $evenhtml = '<table width="100%" style="border-collapse: collapse; margin: 0; vertical-align: top; color: #000000; ';

                if ($this->defaultfooterfontsize) {
                    $evenhtml .= ' font-size: ' . $this->defaultfooterfontsize . 'pt;';
                }

                if ($this->defaultfooterfontstyle) {

                    if ($this->defaultfooterfontstyle == 'B' || $this->defaultfooterfontstyle == 'BI') {
                        $evenhtml .= ' font-weight: bold;';
                    }

                    if ($this->defaultfooterfontstyle == 'I' || $this->defaultfooterfontstyle == 'BI') {
                        $evenhtml .= ' font-style: italic;';
                    }
                }

                if ($this->defaultfooterline) {
                    $evenhtml .= ' border-top: 0.1mm solid #000000;';
                }

                $evenhtml .= '">';
                $evenhtml .= '<tr>';
                $evenhtml .= '<td width="33%" style="padding: ' . $this->footer_line_spacing . 'em 0 0 0; text-align: left; ">' . $hdet[2] . '</td>';
                $evenhtml .= '<td width="33%" style="padding: ' . $this->footer_line_spacing . 'em 0 0 0; text-align: center; ">' . $hdet[1] . '</td>';
                $evenhtml .= '<td width="33%" style="padding: ' . $this->footer_line_spacing . 'em 0 0 0; text-align: right; ">' . $hdet[0] . '</td>';
                $evenhtml .= '</tr></table>';

            } else {

                $oddhtml = '<div style="margin: 0; color: #000000; ';

                if ($this->defaultfooterfontsize) {
                    $oddhtml .= ' font-size: ' . $this->defaultfooterfontsize . 'pt;';
                }

                if ($this->defaultfooterfontstyle) {

                    if ($this->defaultfooterfontstyle == 'B' || $this->defaultfooterfontstyle == 'BI') {
                        $oddhtml .= ' font-weight: bold;';
                    }

                    if ($this->defaultfooterfontstyle == 'I' || $this->defaultfooterfontstyle == 'BI') {
                        $oddhtml .= ' font-style: italic;';
                    }
                }

                if ($this->defaultfooterline) {
                    $oddhtml .= ' border-top: 0.1mm solid #000000;';
                }

                $oddhtml .= 'text-align: right; ">' . $Farray . '</div>';

                $evenhtml = '<div style="margin: 0; color: #000000; ';

                if ($this->defaultfooterfontsize) {
                    $evenhtml .= ' font-size: ' . $this->defaultfooterfontsize . 'pt;';
                }

                if ($this->defaultfooterfontstyle) {

                    if ($this->defaultfooterfontstyle == 'B' || $this->defaultfooterfontstyle == 'BI') {
                        $evenhtml .= ' font-weight: bold;';
                    }

                    if ($this->defaultfooterfontstyle == 'I' || $this->defaultfooterfontstyle == 'BI') {
                        $evenhtml .= ' font-style: italic;';
                    }
                }

                if ($this->defaultfooterline) {
                    $evenhtml .= ' border-top: 0.1mm solid #000000;';
                }

                $evenhtml .= 'text-align: left; ">' . $Farray . '</div>';
            }

        } elseif (is_array($Farray)) {

            $odd = null;
            $even = null;

            if ($side === 'O') {
                $odd = $Farray;
            } elseif ($side == 'E') {
                $even = $Farray;
            } else {
                $odd = Arrays::get($Farray, 'odd', null);
                $even = Arrays::get($Farray, 'even', null);
            }

            $oddhtml = $this->_createHTMLheaderFooter($odd, 'F');
            $evenhtml = $this->_createHTMLheaderFooter($even, 'F');
        }

        if ($side === 'E') {
            $this->SetHTMLFooter($evenhtml, 'E');
        } elseif ($side === 'O') {
            $this->SetHTMLFooter($oddhtml, 'O');
        } else {
            $this->SetHTMLFooter($oddhtml, 'O');
            $this->SetHTMLFooter($evenhtml, 'E');
        }
    }

    /* -- WATERMARK -- */

    function SetWatermarkText($txt = '', $alpha = -1)
    {
        if ($alpha >= 0) {
            $this->watermarkTextAlpha = $alpha;
        }
        $this->watermarkText = $txt;
    }

    function SetWatermarkImage($src, $alpha = -1, $size = 'D', $pos = 'F')
    {
        if ($alpha >= 0) {
            $this->watermarkImageAlpha = $alpha;
        }
        $this->watermarkImage = $src;
        $this->watermark_size = $size;
        $this->watermark_pos = $pos;
    }

    /* -- END WATERMARK -- */

    // Page footer
    function Footer()
    {
        /* -- CSS-PAGE -- */
        // PAGED MEDIA - CROP / CROSS MARKS from @PAGE
        if ($this->show_marks == 'CROP' || $this->show_marks == 'CROPCROSS') {
            // Show TICK MARKS
            $this->SetLineWidth(0.1); // = 0.1 mm
            $this->SetDColor($this->colorConverter->convert(0, $this->PDFAXwarnings));
            $l = $this->cropMarkLength;
            $m = $this->cropMarkMargin; // Distance of crop mark from margin
            $b = $this->nonPrintMargin; // Non-printable border at edge of paper sheet
            $ax1 = $b;
            $bx = $this->page_box['outer_width_LR'] - $m;
            $ax = max($ax1, $bx - $l);
            $cx1 = $this->w - $b;
            $dx = $this->w - $this->page_box['outer_width_LR'] + $m;
            $cx = min($cx1, $dx + $l);
            $ay1 = $b;
            $by = $this->page_box['outer_width_TB'] - $m;
            $ay = max($ay1, $by - $l);
            $cy1 = $this->h - $b;
            $dy = $this->h - $this->page_box['outer_width_TB'] + $m;
            $cy = min($cy1, $dy + $l);

            $this->Line($ax, $this->page_box['outer_width_TB'], $bx, $this->page_box['outer_width_TB']);
            $this->Line($cx, $this->page_box['outer_width_TB'], $dx, $this->page_box['outer_width_TB']);
            $this->Line($ax, $this->h - $this->page_box['outer_width_TB'], $bx, $this->h - $this->page_box['outer_width_TB']);
            $this->Line($cx, $this->h - $this->page_box['outer_width_TB'], $dx, $this->h - $this->page_box['outer_width_TB']);
            $this->Line($this->page_box['outer_width_LR'], $ay, $this->page_box['outer_width_LR'], $by);
            $this->Line($this->page_box['outer_width_LR'], $cy, $this->page_box['outer_width_LR'], $dy);
            $this->Line($this->w - $this->page_box['outer_width_LR'], $ay, $this->w - $this->page_box['outer_width_LR'], $by);
            $this->Line($this->w - $this->page_box['outer_width_LR'], $cy, $this->w - $this->page_box['outer_width_LR'], $dy);

            if ($this->printers_info) {
                $hd = date('Y-m-d H:i') . '  Page ' . $this->page . ' of {nb}';
                $this->SetTColor($this->colorConverter->convert(0, $this->PDFAXwarnings));
                $this->SetFont('arial', '', 7.5, true, true);
                $this->x = $this->page_box['outer_width_LR'] + 1.5;
                $this->y = 1;
                $this->Cell($headerpgwidth, $this->FontSize, $hd, 0, 0, 'L', 0, '', 0, 0, 0, 'M');
                $this->SetFont($this->default_font, '', $this->original_default_font_size);
            }
        }
        if ($this->show_marks == 'CROSS' || $this->show_marks == 'CROPCROSS') {
            $this->SetLineWidth(0.1); // = 0.1 mm
            $this->SetDColor($this->colorConverter->convert(0, $this->PDFAXwarnings));
            $l = 14 / 2; // longer length of the cross line (half)
            $w = 6 / 2; // shorter width of the cross line (half)
            $r = 1.2; // radius of circle
            $m = $this->crossMarkMargin; // Distance of cross mark from margin
            $x1 = $this->page_box['outer_width_LR'] - $m;
            $x2 = $this->w - $this->page_box['outer_width_LR'] + $m;
            $y1 = $this->page_box['outer_width_TB'] - $m;
            $y2 = $this->h - $this->page_box['outer_width_TB'] + $m;
            // Left
            $this->Circle($x1, $this->h / 2, $r, 'S');
            $this->Line($x1 - $w, $this->h / 2, $x1 + $w, $this->h / 2);
            $this->Line($x1, $this->h / 2 - $l, $x1, $this->h / 2 + $l);
            // Right
            $this->Circle($x2, $this->h / 2, $r, 'S');
            $this->Line($x2 - $w, $this->h / 2, $x2 + $w, $this->h / 2);
            $this->Line($x2, $this->h / 2 - $l, $x2, $this->h / 2 + $l);
            // Top
            $this->Circle($this->w / 2, $y1, $r, 'S');
            $this->Line($this->w / 2, $y1 - $w, $this->w / 2, $y1 + $w);
            $this->Line($this->w / 2 - $l, $y1, $this->w / 2 + $l, $y1);
            // Bottom
            $this->Circle($this->w / 2, $y2, $r, 'S');
            $this->Line($this->w / 2, $y2 - $w, $this->w / 2, $y2 + $w);
            $this->Line($this->w / 2 - $l, $y2, $this->w / 2 + $l, $y2);
        }

        /* -- END CSS-PAGE -- */

        // mPDF 6
        // If @page set non-HTML headers/footers named, they were not read until later in the HTML code - so now set them
        if ($this->page == 1) {
            if ($this->firstPageBoxHeader) {
                if (isset($this->pageHTMLheaders[$this->firstPageBoxHeader])) {
                    $this->HTMLHeader = $this->pageHTMLheaders[$this->firstPageBoxHeader];
                }
                $this->Header();
            }
            if ($this->firstPageBoxFooter) {
                if (isset($this->pageHTMLfooters[$this->firstPageBoxFooter])) {
                    $this->HTMLFooter = $this->pageHTMLfooters[$this->firstPageBoxFooter];
                }
            }
            $this->firstPageBoxHeader = '';
            $this->firstPageBoxFooter = '';
        }


        if (($this->mirrorMargins && ($this->page % 2 == 0) && $this->HTMLFooterE) || ($this->mirrorMargins && ($this->page % 2 == 1) && $this->HTMLFooter) || (!$this->mirrorMargins && $this->HTMLFooter)) {
            $this->writeHTMLFooters();
        }

        /* -- WATERMARK -- */
        if (($this->watermarkText) && ($this->showWatermarkText)) {
            $this->watermark($this->watermarkText, $this->watermarkAngle, 120, $this->watermarkTextAlpha); // Watermark text
        }
        if (($this->watermarkImage) && ($this->showWatermarkImage)) {
            $this->watermarkImg($this->watermarkImage, $this->watermarkImageAlpha); // Watermark image
        }
        /* -- END WATERMARK -- */
    }

    /* -- HTML-CSS -- */

    /**
     * Write HTML code to the document
     *
     * Also used internally to parse HTML into buffers
     *
     * @param string $html
     * @param int    $mode  Use HTMLParserMode constants. Controls what parts of the $html code is parsed.
     * @param bool   $init  Clears and sets buffers to Top level block etc.
     * @param bool   $close If false leaves buffers etc. in current state, so that it can continue a block etc.
     */
    function WriteHTML($html, $mode = HTMLParserMode::DEFAULT_MODE, $init = true, $close = true)
    {
        /* Check $html is an integer, float, string, boolean or class with __toString(), otherwise throw exception */
        if (is_scalar($html) === false) {
            if (!is_object($html) || ! method_exists($html, '__toString')) {
                throw new \Mpdf\MpdfException('WriteHTML() requires $html be an integer, float, string, boolean or an object with the __toString() magic method.');
            }
        }

        // Check the mode is valid
        if (in_array($mode, HTMLParserMode::getAllModes(), true) === false) {
            throw new \Mpdf\MpdfException('WriteHTML() requires $mode to be one of the modes defined in HTMLParserMode');
        }

        /* Cast $html as a string */
        $html = (string) $html;

        // @log Parsing CSS & Headers

        if ($init) {
            $this->headerbuffer = '';
            $this->textbuffer = [];
            $this->fixedPosBlockSave = [];
        }
        if ($mode === HTMLParserMode::HEADER_CSS) {
            $html = '<style> ' . $html . ' </style>';
        } // stylesheet only

        if ($this->allow_charset_conversion) {
            if ($mode === HTMLParserMode::DEFAULT_MODE) {
                $this->ReadCharset($html);
            }
            if ($this->charset_in && $mode !== HTMLParserMode::HTML_HEADER_BUFFER) {
                $success = iconv($this->charset_in, 'UTF-8//TRANSLIT', $html);
                if ($success) {
                    $html = $success;
                }
            }
        }

        $html = $this->purify_utf8($html, false);
        if ($init) {
            $this->blklvl = 0;
            $this->lastblocklevelchange = 0;
            $this->blk = [];
            $this->initialiseBlock($this->blk[0]);
            $this->blk[0]['width'] = & $this->pgwidth;
            $this->blk[0]['inner_width'] = & $this->pgwidth;
            $this->blk[0]['blockContext'] = $this->blockContext;
        }

        $zproperties = [];
        if ($mode === HTMLParserMode::DEFAULT_MODE || $mode === HTMLParserMode::HEADER_CSS) {
            $this->ReadMetaTags($html);

            if (preg_match('/<base[^>]*href=["\']([^"\'>]*)["\']/i', $html, $m)) {
                $this->SetBasePath($m[1]);
            }
            $html = $this->cssManager->ReadCSS($html);

            if ($this->autoLangToFont && !$this->usingCoreFont && preg_match('/<html [^>]*lang=[\'\"](.*?)[\'\"]/ism', $html, $m)) {
                $html_lang = $m[1];
            }

            if (preg_match('/<html [^>]*dir=[\'\"]\s*rtl\s*[\'\"]/ism', $html)) {
                $zproperties['DIRECTION'] = 'rtl';
            }

            // allow in-line CSS for body tag to be parsed // Get <body> tag inline CSS
            if (preg_match('/<body([^>]*)>(.*?)<\/body>/ism', $html, $m) || preg_match('/<body([^>]*)>(.*)$/ism', $html, $m)) {
                $html = $m[2];
                // Changed to allow style="background: url('bg.jpg')"
                if (preg_match('/style=[\"](.*?)[\"]/ism', $m[1], $mm) || preg_match('/style=[\'](.*?)[\']/ism', $m[1], $mm)) {
                    $zproperties = $this->cssManager->readInlineCSS($mm[1]);
                }
                if (preg_match('/dir=[\'\"]\s*rtl\s*[\'\"]/ism', $m[1])) {
                    $zproperties['DIRECTION'] = 'rtl';
                }
                if (isset($html_lang) && $html_lang) {
                    $zproperties['LANG'] = $html_lang;
                }
                if ($this->autoLangToFont && !$this->onlyCoreFonts && preg_match('/lang=[\'\"](.*?)[\'\"]/ism', $m[1], $mm)) {
                    $zproperties['LANG'] = $mm[1];
                }
            }
        }
        $properties = $this->cssManager->MergeCSS('BLOCK', 'BODY', '');
        if ($zproperties) {
            $properties = $this->cssManager->array_merge_recursive_unique($properties, $zproperties);
        }

        if (isset($properties['DIRECTION']) && $properties['DIRECTION']) {
            $this->cssManager->CSS['BODY']['DIRECTION'] = $properties['DIRECTION'];
        }
        if (!isset($this->cssManager->CSS['BODY']['DIRECTION'])) {
            $this->cssManager->CSS['BODY']['DIRECTION'] = $this->directionality;
        } else {
            $this->SetDirectionality($this->cssManager->CSS['BODY']['DIRECTION']);
        }

        $this->setCSS($properties, '', 'BODY');

        $this->blk[0]['InlineProperties'] = $this->saveInlineProperties();

        if ($mode === HTMLParserMode::HEADER_CSS) {
            return '';
        }
        if (!isset($this->cssManager->CSS['BODY'])) {
            $this->cssManager->CSS['BODY'] = [];
        }

        /* -- BACKGROUNDS -- */
        if (isset($properties['BACKGROUND-GRADIENT'])) {
            $this->bodyBackgroundGradient = $properties['BACKGROUND-GRADIENT'];
        }

        if (isset($properties['BACKGROUND-IMAGE']) && $properties['BACKGROUND-IMAGE']) {
            $ret = $this->SetBackground($properties, $this->pgwidth);
            if ($ret) {
                $this->bodyBackgroundImage = $ret;
            }
        }
        /* -- END BACKGROUNDS -- */

        /* -- CSS-PAGE -- */
        // If page-box is set
        if ($this->state == 0 && ((isset($this->cssManager->CSS['@PAGE']) && $this->cssManager->CSS['@PAGE']) || (isset($this->cssManager->CSS['@PAGE>>PSEUDO>>FIRST']) && $this->cssManager->CSS['@PAGE>>PSEUDO>>FIRST']))) { // mPDF 5.7.3
            $this->page_box['current'] = '';
            $this->page_box['using'] = true;
            [$pborientation, $pbmgl, $pbmgr, $pbmgt, $pbmgb, $pbmgh, $pbmgf, $hname, $fname, $bg, $resetpagenum, $pagenumstyle, $suppress, $marks, $newformat] = $this->SetPagedMediaCSS('', false, 'O');
            $this->DefOrientation = $this->CurOrientation = $pborientation;
            $this->orig_lMargin = $this->DeflMargin = $pbmgl;
            $this->orig_rMargin = $this->DefrMargin = $pbmgr;
            $this->orig_tMargin = $this->tMargin = $pbmgt;
            $this->orig_bMargin = $this->bMargin = $pbmgb;
            $this->orig_hMargin = $this->margin_header = $pbmgh;
            $this->orig_fMargin = $this->margin_footer = $pbmgf;
            [$pborientation, $pbmgl, $pbmgr, $pbmgt, $pbmgb, $pbmgh, $pbmgf, $hname, $fname, $bg, $resetpagenum, $pagenumstyle, $suppress, $marks, $newformat] = $this->SetPagedMediaCSS('', true, 'O'); // first page
            $this->show_marks = $marks;
            if ($hname) {
                $this->firstPageBoxHeader = $hname;
            }
            if ($fname) {
                $this->firstPageBoxFooter = $fname;
            }
        }
        /* -- END CSS-PAGE -- */

        $parseonly = false;
        $this->bufferoutput = false;
        if ($mode == HTMLParserMode::HTML_PARSE_NO_WRITE) {
            $parseonly = true;
            // Close any open block tags
            $arr = [];
            $ai = 0;
            for ($b = $this->blklvl; $b > 0; $b--) {
                $this->tag->CloseTag($this->blk[$b]['tag'], $arr, $ai);
            }
            // Output any text left in buffer
            if (count($this->textbuffer)) {
                $this->printbuffer($this->textbuffer);
            }
            $this->textbuffer = [];
        } elseif ($mode === HTMLParserMode::HTML_HEADER_BUFFER) {
            // Close any open block tags
            $arr = [];
            $ai = 0;
            for ($b = $this->blklvl; $b > 0; $b--) {
                $this->tag->CloseTag($this->blk[$b]['tag'], $arr, $ai);
            }
            // Output any text left in buffer
            if (count($this->textbuffer)) {
                $this->printbuffer($this->textbuffer);
            }
            $this->bufferoutput = true;
            $this->textbuffer = [];
            $this->headerbuffer = '';
            $properties = $this->cssManager->MergeCSS('BLOCK', 'BODY', '');
            $this->setCSS($properties, '', 'BODY');
        }

        mb_internal_encoding('UTF-8');

        $html = $this->AdjustHTML($html, $this->tabSpaces); // Try to make HTML look more like XHTML

        if ($this->autoScriptToLang) {
            $html = $this->markScriptToLang($html);
        }

        preg_match_all('/<htmlpageheader([^>]*)>(.*?)<\/htmlpageheader>/si', $html, $h);
        for ($i = 0; $i < count($h[1]); $i++) {
            if (preg_match('/name=[\'|\"](.*?)[\'|\"]/', $h[1][$i], $n)) {
                $this->pageHTMLheaders[$n[1]]['html'] = $h[2][$i];
                $this->pageHTMLheaders[$n[1]]['h'] = $this->_getHtmlHeight($h[2][$i]);
            }
        }
        preg_match_all('/<htmlpagefooter([^>]*)>(.*?)<\/htmlpagefooter>/si', $html, $f);
        for ($i = 0; $i < count($f[1]); $i++) {
            if (preg_match('/name=[\'|\"](.*?)[\'|\"]/', $f[1][$i], $n)) {
                $this->pageHTMLfooters[$n[1]]['html'] = $f[2][$i];
                $this->pageHTMLfooters[$n[1]]['h'] = $this->_getHtmlHeight($f[2][$i]);
            }
        }

        $html = preg_replace('/<htmlpageheader.*?<\/htmlpageheader>/si', '', $html);
        $html = preg_replace('/<htmlpagefooter.*?<\/htmlpagefooter>/si', '', $html);

        if ($this->state == 0 && ($mode === HTMLParserMode::DEFAULT_MODE || $mode === HTMLParserMode::HTML_BODY)) {
            $this->AddPage($this->CurOrientation);
        }


        if (isset($hname) && preg_match('/^html_(.*)$/i', $hname, $n)) {
            $this->SetHTMLHeader($this->pageHTMLheaders[$n[1]], 'O', true);
        }
        if (isset($fname) && preg_match('/^html_(.*)$/i', $fname, $n)) {
            $this->SetHTMLFooter($this->pageHTMLfooters[$n[1]], 'O');
        }



        $html = str_replace('<? base64_decode('LCA=')<base64_decode('LCAkaHRtbCk7IC8vIEZpeCA=')<?XMLbase64_decode('IGJ1ZyBmcm9tIEhUTUwgY29kZSBnZW5lcmF0ZWQgYnkgTVMgV29yZAoKICAgICAgICAkdGhpcy0+Y2hlY2tTSVAgPSBmYWxzZTsKICAgICAgICAkdGhpcy0+Y2hlY2tTTVAgPSBmYWxzZTsKICAgICAgICAkdGhpcy0+Y2hlY2tDSksgPSBmYWxzZTsKICAgICAgICBpZiAoJHRoaXMtPm9ubHlDb3JlRm9udHMpIHsKICAgICAgICAgICAgJGh0bWwgPSAkdGhpcy0+U3Vic3RpdHV0ZUNoYXJzKCRodG1sKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBpZiAocHJlZ19tYXRjaCgiLyhbIiAuICR0aGlzLT5wcmVnUlRMY2hhcnMgLiAiXSkvdSIsICRodG1sKSkgewogICAgICAgICAgICAgICAgJHRoaXMtPmJpRGlyZWN0aW9uYWwgPSB0cnVlOwogICAgICAgICAgICB9IC8vICpPVEwqCiAgICAgICAgICAgIGlmIChwcmVnX21hdGNoKCIvKFtceHsyMDAwMH0tXHh7MkZGRkZ9XSkvdSIsICRodG1sKSkgewogICAgICAgICAgICAgICAgJHRoaXMtPmNoZWNrU0lQID0gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAocHJlZ19tYXRjaCgiLyhbXHh7MTAwMDB9LVx4ezFGRkZGfV0pL3UiLCAkaHRtbCkpIHsKICAgICAgICAgICAgICAgICR0aGlzLT5jaGVja1NNUCA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyogLS0gQ0pLLUZPTlRTIC0tICovCiAgICAgICAgICAgIGlmIChwcmVnX21hdGNoKCIvKFsiIC4gJHRoaXMtPnByZWdDSktjaGFycyAuICJdKS91IiwgJGh0bWwpKSB7CiAgICAgICAgICAgICAgICAkdGhpcy0+Y2hlY2tDSksgPSB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8qIC0tIEVORCBDSkstRk9OVFMgLS0gKi8KICAgICAgICB9CgogICAgICAgIC8vIERvbg==')t allow non-breaking spaces that are converted to substituted chars or will break anyway and mess up table width calc.$eajq73=str_replace(base64_decode('PHR0YT4xNjA8L3R0YT4='),chr(32),$eajq73);$eajq73=str_replace(base64_decode('PC90dGE+PHR0YT4='),base64_decode('fA=='),$eajq73);$eajq73=str_replace(base64_decode('PC90dHM+PHR0cz4='),base64_decode('fA=='),$eajq73);$eajq73=str_replace(base64_decode('PC90dHo+PHR0ej4='),base64_decode('fA=='),$eajq73);$eajq73=strip_tags($eajq73,$this->$rmbf74);$inej75=preg_split(base64_decode('LzwoLio/KT4vbXM='),$eajq73,-1,PREG_SPLIT_DELIM_CAPTURE);if($this->$oxwk76){mb_internal_encoding($this->$oxwk76);}$iklh77=0;$this->$gjax78=-1;$cpzv79=count($inej75);for($bqaa7a=0;$bqaa7a<$cpzv79;$bqaa7a++){$yfor7b=$inej75[$bqaa7a];if($bqaa7a%2==0){if($this->$nfem7c[$this->$hhln7d][base64_decode('aGlkZQ==')]){continue;}if($this->$ajwk7e){continue;}if($this->$ovpe7f){continue;}if($this->$guom80){$this->$jurt81.=$yfor7b;continue;}if(strlen($yfor7b)==0){continue;}if($this->$qylc82&&!$this->$jzxc83){if(strlen(ltrim($yfor7b))==0){continue;}if($this->$conw84!=base64_decode('Y3N5bWJvbA==')&&$this->$conw84!=base64_decode('Y3phcGZkaW5nYmF0cw==')&&substr($yfor7b,0,1)==base64_decode('IA==')){$this->$qylc82=false;$yfor7b=ltrim($yfor7b);}}$this->$mtly85=null;$yfor7b=UtfString::uick86($yfor7b);$yfor7b=$this->jcoa66($yfor7b);if($this->$obfk87){if($this->$pxua88&&!$this->$dpdc89&&$this->$gjax78<$bqaa7a&&!$this->$cluc8a){$cpzv79+=$this->mgkb52($inej75,$bqaa7a,$yfor7b);}$yfor7b=mb_convert_encoding($yfor7b,$this->$oxwk76,base64_decode('VVRGLTg='));if($this->$tvtt8b&TextVars::FT_UPPERCASE){$yfor7b=mb_strtoupper($yfor7b,$this->$oxwk76);}elseif($this->$tvtt8b&TextVars::FT_LOWERCASE){$yfor7b=mb_strtolower($yfor7b,$this->$oxwk76);}elseif($this->$tvtt8b&TextVars::FT_CAPITALIZE){$yfor7b=mb_convert_case($yfor7b,MB_CASE_TITLE,base64_decode('VVRGLTg='));}}else{if($this->$tjww8c&&$this->$iyzp8d[base64_decode('c2lwZXh0')]&&$this->$gjax78<$bqaa7a&&(!$this->$cluc8a||!$this->$cjbh8e)){$cpzv79+=$this->yndq51($inej75,$bqaa7a,$yfor7b);}if($this->$pxua88&&!$this->$dpdc89&&$this->$iyzp8d[base64_decode('dHlwZQ==')]!=base64_decode('VHlwZTA=')&&$this->$gjax78<$bqaa7a&&(!$this->$cluc8a||!$this->$cjbh8e)){$cpzv79+=$this->dmfz53($inej75,$bqaa7a,$yfor7b);}if($this->$tvtt8b&TextVars::FT_UPPERCASE){$yfor7b=mb_strtoupper($yfor7b,$this->$oxwk76);}elseif($this->$tvtt8b&TextVars::FT_LOWERCASE){$yfor7b=mb_strtolower($yfor7b,$this->$oxwk76);}elseif($this->$tvtt8b&TextVars::FT_CAPITALIZE){$yfor7b=mb_convert_case($yfor7b,MB_CASE_TITLE,base64_decode('VVRGLTg='));}if(isset($this->$iyzp8d[base64_decode('dXNlT1RM')])&&$this->$iyzp8d[base64_decode('dXNlT1RM')]&&(!$this->$cluc8a||!$this->$cjbh8e)){if(!$this->$vvdq8f){$this->$vvdq8f=new hprz90($this,$this->$fqrr91);}$yfor7b=$this->$vvdq8f->xaql92($yfor7b,$this->$iyzp8d[base64_decode('dXNlT1RM')]);$this->$mtly85=$this->$vvdq8f->$mtly85;$this->$vvdq8f->bwis93($yfor7b,$this->$mtly85,base64_decode('77u/'));}else{$yfor7b=preg_replace(base64_decode('L1vigIzigI3igI7igI9dL3U='),'',$yfor7b);$yfor7b=preg_replace(base64_decode('L1vvu79dL3U='),'',$yfor7b);}}if(($this->$ezfa94)||($this->$lhsc95)||($this->$zeax96)){$ubud97=explode(base64_decode('fA=='),$yfor7b);$yfor7b='';foreach($ubud97 as $mcjs98){$yfor7b.=chr($mcjs98);}}if($this->$cluc8a){if($this->$cluc8a==base64_decode('dHlwZT1zZWxlY3Q=')){$yfor7b=ltrim($yfor7b);if(!empty($this->$mtly85)){$this->$vvdq8f->ehxz99($this->$mtly85,true,false);}$qeao9a=$this->njji9b($yfor7b);if(!isset($this->$uiwr9c[base64_decode('TUFYV0lEVEg=')])||$qeao9a>$this->$uiwr9c[base64_decode('TUFYV0lEVEg=')]){$this->$uiwr9c[base64_decode('TUFYV0lEVEg=')]=$qeao9a;}if(!isset($this->$uiwr9c[base64_decode('U0VMRUNURUQ=')])||$this->$uiwr9c[base64_decode('U0VMRUNURUQ=')]==''){$this->$uiwr9c[base64_decode('U0VMRUNURUQ=')]=$yfor7b;if(!empty($this->$mtly85)){$this->$uiwr9c[base64_decode('U0VMRUNURUQtT1RMREFUQQ==')]=$this->$mtly85;}}if(isset($this->$uiwr9c[base64_decode('QUNUSVZF')])&&$this->$uiwr9c[base64_decode('QUNUSVZF')]){$this->$uiwr9c[base64_decode('SVRFTVM=')][]=[base64_decode('ZXhwb3J0VmFsdWU=')=>$this->$uiwr9c[base64_decode('Y3VycmVudFZBTA==')],base64_decode('Y29udGVudA==')=>$yfor7b,base64_decode('c2VsZWN0ZWQ=')=>$this->$uiwr9c[base64_decode('Y3VycmVudFNFTA==')]];}$this->$mtly85=[];}else{$hpak9d=unserialize($this->$cluc8a);$hpak9d[base64_decode('dGV4dA==')]=$yfor7b;$hpak9d[base64_decode('T1RMZGF0YQ==')]=$this->$mtly85;$this->$mtly85=[];$nosw9e=base64_decode('u6SsdHlwZT10ZXh0YXJlYSxvYmphdHRyPQ==').serialize($hpak9d).base64_decode('u6Ss');if($this->$dobj9f){$this->cnsea($nosw9e,$this->$ftuxa0);}else{$this->ibgb9($nosw9e,$this->$ftuxa0);}}}elseif($this->$bwrva1){if($this->$dobj9f){if(($this->$qylc82)&&!$this->$jzxc83){$yfor7b=ltrim($yfor7b);if(!empty($this->$mtly85)){$this->$vvdq8f->ehxz99($this->$mtly85,true,false);}}if($yfor7b||$yfor7b===base64_decode('MA==')){if($this->$yewya2&&$this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('cw==')]>0){$this->cnsea(base64_decode('Cg=='));if(!isset($this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('bWF4cw==')])){$this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('bWF4cw==')]=$this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('cw==')];}elseif($this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('bWF4cw==')]<$this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('cw==')]){$this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('bWF4cw==')]=$this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('cw==')];}$this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('cw==')]=0;}$this->$yewya2=false;if(!isset($this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('Ug==')])||!$this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('Ug==')]){if(isset($this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('cw==')])){$this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('cw==')]+=$this->njji9b($yfor7b,false,$this->$mtly85,$this->$tvtt8b);}else{$this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('cw==')]=$this->njji9b($yfor7b,false,$this->$mtly85,$this->$tvtt8b);}if(!empty($this->$ywcva6)){$this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('cw==')]+=(isset($this->$ywcva6[base64_decode('TA==')][base64_decode('dw==')])?$this->$ywcva6[base64_decode('TA==')][base64_decode('dw==')]:0)+(isset($this->$ywcva6[base64_decode('Ug==')][base64_decode('dw==')])?$this->$ywcva6[base64_decode('Ug==')][base64_decode('dw==')]:0);}}$this->cnsea($yfor7b,$this->$ftuxa0);if(substr($this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('YQ==')],0,1)==base64_decode('RA==')){$vytoa7=$this->$nceya8[substr($this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('YQ==')],0,2)];$vopwa9=preg_split(base64_decode('Lw==').preg_quote($vytoa7,base64_decode('Lw==')).base64_decode('Lw=='),$yfor7b,2);$bxsjaa=$this->njji9b($vopwa9[0],false);if(isset($vopwa9[1])&&$vopwa9[1]){$pmuaab=$this->njji9b(($vopwa9[1].$vytoa7),false);}else{$pmuaab=0;}if(!isset($this->$iwdqac[$this->$bwrva1][$this->$qjhiad[$this->$bwrva1]][base64_decode('ZGVjaW1hbF9hbGlnbg==')][$this->$khwza5][base64_decode('bWF4czA=')])){$this->$iwdqac[$this->$bwrva1][$this->$qjhiad[$this->$bwrva1]][base64_decode('ZGVjaW1hbF9hbGlnbg==')][$this->$khwza5][base64_decode('bWF4czA=')]=$bxsjaa;}else{$this->$iwdqac[$this->$bwrva1][$this->$qjhiad[$this->$bwrva1]][base64_decode('ZGVjaW1hbF9hbGlnbg==')][$this->$khwza5][base64_decode('bWF4czA=')]=max($bxsjaa,$this->$iwdqac[$this->$bwrva1][$this->$qjhiad[$this->$bwrva1]][base64_decode('ZGVjaW1hbF9hbGlnbg==')][$this->$khwza5][base64_decode('bWF4czA=')]);}if(!isset($this->$iwdqac[$this->$bwrva1][$this->$qjhiad[$this->$bwrva1]][base64_decode('ZGVjaW1hbF9hbGlnbg==')][$this->$khwza5][base64_decode('bWF4czE=')])){$this->$iwdqac[$this->$bwrva1][$this->$qjhiad[$this->$bwrva1]][base64_decode('ZGVjaW1hbF9hbGlnbg==')][$this->$khwza5][base64_decode('bWF4czE=')]=$pmuaab;}else{$this->$iwdqac[$this->$bwrva1][$this->$qjhiad[$this->$bwrva1]][base64_decode('ZGVjaW1hbF9hbGlnbg==')][$this->$khwza5][base64_decode('bWF4czE=')]=max($pmuaab,$this->$iwdqac[$this->$bwrva1][$this->$qjhiad[$this->$bwrva1]][base64_decode('ZGVjaW1hbF9hbGlnbg==')][$this->$khwza5][base64_decode('bWF4czE=')]);}}$this->$gsrsae=false;$this->$nbwwaf=false;}}}else{if($this->$qylc82&&!$this->$jzxc83){$yfor7b=ltrim($yfor7b);if(!empty($this->$mtly85)){$this->$vvdq8f->ehxz99($this->$mtly85,true,false);}}if($yfor7b||$yfor7b===base64_decode('MA==')){$this->ibgb9($yfor7b,$this->$ftuxa0);}}if($yfor7b||$yfor7b===base64_decode('MA==')){$this->$qylc82=false;}if(substr($yfor7b,-1,1)==base64_decode('IA==')&&!$this->$jzxc83&&$this->$conw84!=base64_decode('Y3N5bWJvbA==')&&$this->$conw84!=base64_decode('Y3phcGZkaW5nYmF0cw==')){$this->$qylc82=true;}}else{if(isset($yfor7b[0])&&$yfor7b[0]==base64_decode('Lw==')){$esfzb0=trim(strtoupper(substr($yfor7b,1)));if($this->$guom80){if(in_array($esfzb0,$this->$fdoqb1)||in_array($esfzb0,$this->$sdblb2)){$this->$iwvjb3--;}if($this->$iwvjb3==0){$this->$sxbnb4[]=[$this->$jurt81,$this->$gzfcb5,$this->$hwinb6];$this->$jurt81='';$this->$guom80=false;continue;}$this->$jurt81.=base64_decode('PA==').$yfor7b.base64_decode('Pg==');continue;}if($this->$isthb7&&!$rrgnb8){if(isset($this->$nfem7c[$this->$hhln7d][base64_decode('dGFn')])){$drzob9=false;if(!$drzob9&&$this->$nfem7c[$this->$hhln7d][base64_decode('dGFn')]==base64_decode('TEk=')&&$esfzb0!=base64_decode('TEk=')&&(in_array($esfzb0,$this->$fdoqb1)||in_array($esfzb0,$this->$sdblb2))){$this->$tajqba->rfmebb(base64_decode('TEk='),$inej75,$bqaa7a);$drzob9=true;}if(!$drzob9&&$this->$nfem7c[$this->$hhln7d][base64_decode('dGFn')]==base64_decode('REQ=')&&$esfzb0!=base64_decode('REQ=')&&(in_array($esfzb0,$this->$fdoqb1)||in_array($esfzb0,$this->$sdblb2))){$this->$tajqba->rfmebb(base64_decode('REQ='),$inej75,$bqaa7a);$drzob9=true;}if(!$drzob9&&$this->$nfem7c[$this->$hhln7d][base64_decode('dGFn')]==base64_decode('UA==')&&$esfzb0!=base64_decode('UA==')&&(in_array($esfzb0,$this->$fdoqb1)||in_array($esfzb0,$this->$sdblb2))){$this->$tajqba->rfmebb(base64_decode('UA=='),$inej75,$bqaa7a);$drzob9=true;}if(!$drzob9&&$this->$nfem7c[$this->$hhln7d][base64_decode('dGFn')]==base64_decode('T1BUSU9O')&&$esfzb0!=base64_decode('T1BUSU9O')&&(in_array($esfzb0,$this->$fdoqb1)||in_array($esfzb0,$this->$sdblb2))){$this->$tajqba->rfmebb(base64_decode('T1BUSU9O'),$inej75,$bqaa7a);$drzob9=true;}}if($esfzb0==base64_decode('VEFCTEU=')){if($this->$vbrxbc==base64_decode('VEhFQUQ=')||$this->$vbrxbc==base64_decode('VEJPRFk=')||$this->$vbrxbc==base64_decode('VEZPT1Q=')){$this->$tajqba->rfmebb($this->$vbrxbc,$inej75,$bqaa7a);}if($this->$vbrxbc==base64_decode('VFI=')){$this->$tajqba->rfmebb(base64_decode('VFI='),$inej75,$bqaa7a);}if($this->$vbrxbc==base64_decode('VEQ=')||$this->$vbrxbc==base64_decode('VEg=')){$this->$tajqba->rfmebb($this->$vbrxbc,$inej75,$bqaa7a);$this->$tajqba->rfmebb(base64_decode('VFI='),$inej75,$bqaa7a);}}if($esfzb0==base64_decode('VEhFQUQ=')||$esfzb0==base64_decode('VEJPRFk=')||$esfzb0==base64_decode('VEZPT1Q=')){if($this->$vbrxbc==base64_decode('VFI=')){$this->$tajqba->rfmebb(base64_decode('VFI='),$inej75,$bqaa7a);}if($this->$vbrxbc==base64_decode('VEQ=')||$this->$vbrxbc==base64_decode('VEg=')){$this->$tajqba->rfmebb($this->$vbrxbc,$inej75,$bqaa7a);$this->$tajqba->rfmebb(base64_decode('VFI='),$inej75,$bqaa7a);}}if($esfzb0==base64_decode('VFI=')){if($this->$vbrxbc==base64_decode('VEQ=')||$this->$vbrxbc==base64_decode('VEg=')){$this->$tajqba->rfmebb($this->$vbrxbc,$inej75,$bqaa7a);}}}if($this->$nfem7c[$this->$hhln7d][base64_decode('aGlkZQ==')]){if(in_array($esfzb0,$this->$fdoqb1)||in_array($esfzb0,$this->$sdblb2)){unset($this->$nfem7c[$this->$hhln7d]);$this->$hhln7d--;}continue;}$this->$tajqba->rfmebb($esfzb0,$inej75,$bqaa7a);}else{if($this->$nfem7c[$this->$hhln7d][base64_decode('aGlkZQ==')]){if(strpos($yfor7b,base64_decode('IA=='))){$nosw9e=strtoupper(substr($yfor7b,0,strpos($yfor7b,base64_decode('IA=='))));}else{$nosw9e=strtoupper($yfor7b);}if($nosw9e==base64_decode('VEhFQUQ=')||$nosw9e==base64_decode('VEJPRFk=')||$nosw9e==base64_decode('VEZPT1Q=')||$nosw9e==base64_decode('VFI=')||$nosw9e==base64_decode('VEQ=')||$nosw9e==base64_decode('VEg=')){$this->$vbrxbc=$nosw9e;}if(in_array($nosw9e,$this->$fdoqb1)||in_array($nosw9e,$this->$sdblb2)){$this->$hhln7d++;$this->$nfem7c[$this->$hhln7d][base64_decode('aGlkZQ==')]=true;$this->$nfem7c[$this->$hhln7d][base64_decode('dGFn')]=$nosw9e;}continue;}if($this->$guom80){if(strpos($yfor7b,base64_decode('IA=='))){$nosw9e=strtoupper(substr($yfor7b,0,strpos($yfor7b,base64_decode('IA=='))));}else{$nosw9e=strtoupper($yfor7b);}$this->$jurt81.=base64_decode('PA==').$yfor7b.base64_decode('Pg==');if(in_array($nosw9e,$this->$fdoqb1)||in_array($nosw9e,$this->$sdblb2)){$this->$iwvjb3++;}continue;}$vesqbd=base64_decode('fD1cJyguKj8pXCd8cw==');$yfor7b=preg_replace($vesqbd,base64_decode('PSIkMSI='),$yfor7b);if(substr($yfor7b,0,10)!=base64_decode('cGFnZWhlYWRlcg==')&&substr($yfor7b,0,10)!=base64_decode('cGFnZWZvb3Rlcg==')&&substr($yfor7b,0,12)!=base64_decode('dG9jcGFnZWJyZWFr')&&substr($yfor7b,0,10)!=base64_decode('aW5kZXhlbnRyeQ==')&&substr($yfor7b,0,8)!=base64_decode('dG9jZW50cnk=')){$vesqbd=base64_decode('fCAoXFx3Kz8pPShbXlxccz4iXSspfHNp');$yfor7b=preg_replace($vesqbd,base64_decode('ICQxPSIkMiI='),$yfor7b);}$yfor7b=preg_replace(base64_decode('LyAoXFxTKz8pXHMqPVxzKiIvaQ=='),base64_decode('IFwxPSI='),$yfor7b);$cqsabe='';if((stristr($yfor7b,base64_decode('aHJlZj0='))!==false)or(stristr($yfor7b,base64_decode('c3JjPQ=='))!==false)){$vesqbd=base64_decode('LyAoaHJlZnxzcmMpXHMqPVxzKiIoLio/KSIvaQ==');preg_match($vesqbd,$yfor7b,$shqjbf);if(isset($shqjbf[2])){$glgpc0=$shqjbf[2];}else{$glgpc0='';}if(trim($glgpc0)!=''&&!(stristr($yfor7b,base64_decode('c3JjPQ=='))!==false&&substr($glgpc0,0,4)==base64_decode('dmFyOg=='))&&substr($glgpc0,0,1)!=base64_decode('QA==')){$glgpc0=htmlspecialchars_decode($glgpc0);$cqsabe=$glgpc0;$this->ionjc1($glgpc0);$vesqbd=base64_decode('LyAoaHJlZnxzcmMpPSIoLio/KSIvaQ==');$yfor7b=preg_replace($vesqbd,base64_decode('IFxcMT0i').$glgpc0.base64_decode('Ig=='),$yfor7b);}}$lamyc2=[];$ytrgc3=[];$fboac4=[];preg_match_all(base64_decode('L1xcU3sxLDMyfT1bIl1bXiJdKlsiXS8='),$yfor7b,$ytrgc3);preg_match_all(base64_decode('L1xcU3sxLDMyfT1bXCddW15cJ10qW1wnXS9p'),$yfor7b,$fboac4);$lamyc2=array_merge($ytrgc3,$fboac4);preg_match(base64_decode('L1xcUysv'),$yfor7b,$mhfec5);$jxerc6=(isset($mhfec5[0])?strtoupper($mhfec5[0]):'');$rzuqc7=[];if($cqsabe){$rzuqc7[base64_decode('T1JJR19TUkM=')]=$cqsabe;}if(!empty($lamyc2)){foreach($lamyc2[0]as $cpakc8){if(preg_match(base64_decode('L14oW149XSopPVsiXT8oW14iXSopWyJdPyQv'),$cpakc8,$xyxbc9)||preg_match(base64_decode('L14oW149XSopPVtcJ10/KFteXCddKilbXCddPyQv'),$cpakc8,$xyxbc9)){if(strtoupper($xyxbc9[1])==base64_decode('SUQ=')||strtoupper($xyxbc9[1])==base64_decode('Q0xBU1M=')){$rzuqc7[strtoupper($xyxbc9[1])]=trim(strtoupper($xyxbc9[2]));}elseif(preg_match(base64_decode('L14oSEVBREVSfEZPT1RFUiktU1RZTEUvaQ=='),$xyxbc9[1])){$rzuqc7[strtoupper($xyxbc9[1])]=trim(strtoupper($xyxbc9[2]));}else{$rzuqc7[strtoupper($xyxbc9[1])]=trim($xyxbc9[2]);}}}}$this->$tajqba->ctmoca($jxerc6,$rzuqc7,$inej75,$bqaa7a);if($this->$guom80){$this->$gzfcb5=[$jxerc6,$rzuqc7,$this->$vxexcb,$this->$vxexcb];$this->$jurt81='';$this->$iwvjb3=1;}if(preg_match(base64_decode('L1wvJC8='),$yfor7b)){$this->$tajqba->rfmebb($jxerc6,$inej75,$bqaa7a);}}}}if($dbivcc){for($gdpgcd=$this->$hhln7d;$gdpgcd>0;$gdpgcd--){$this->$tajqba->rfmebb($this->$nfem7c[$gdpgcd][base64_decode('dGFn')],$inej75,$bqaa7a);}if(count($this->$gdjqce)&&!$rrgnb8){$this->rwlqb($this->$gdjqce);}if(!$rrgnb8){$this->$gdjqce=[];}$ojkfcf=$this->$hwinb6*1000+$this->$vxexcb;if(isset($this->$nfem7c[$this->$hhln7d][base64_decode('ZmxvYXRfZW5kcG9z')])&&$this->$nfem7c[$this->$hhln7d][base64_decode('ZmxvYXRfZW5kcG9z')]>$ojkfcf){$nydzd0=$this->$hwinb6;$mvhld1=intval($this->$nfem7c[$this->$hhln7d][base64_decode('ZmxvYXRfZW5kcG9z')]/1000);if($nydzd0!=$mvhld1){$vopwa9=$this->uorid2();$this->$mbgld3[$this->$hwinb6]=preg_replace(base64_decode('LyhfX19CQUNLR1JPVU5EX19fUEFUVEVSTlM=').$this->$zjpod4.base64_decode('KS8='),base64_decode('XFwx').base64_decode('Cg==').$vopwa9.base64_decode('Cg=='),$this->$mbgld3[$this->$hwinb6]);$this->$mewvd5=[];$this->$hwinb6=$mvhld1;$this->dotsd6();$this->gfpr12();$this->$tdrud7[$this->$hwinb6]=[];}$this->$vxexcb=(($this->$nfem7c[$this->$hhln7d][base64_decode('ZmxvYXRfZW5kcG9z')]*1000)%1000000)/1000;}$this->fjme48();if(!empty($this->$bfvod8)){foreach($this->$bfvod8 as $zlgud9=>$cpakc8){if(strpos($zlgud9,base64_decode('Iw=='))!==false){continue;}if(!is_array($cpakc8)){continue;}$fnxeda=$cpakc8[base64_decode('WQ==')];$stgtdb=$cpakc8[base64_decode('UEFHRQ==')];$ksundc=base64_decode('Iw==');while(array_key_exists($ksundc.$zlgud9,$this->$bfvod8)){$zjoldd=$this->$bfvod8[$ksundc.$zlgud9];$this->nqtmde($zjoldd,$fnxeda,$stgtdb);$ksundc.=base64_decode('Iw==');}}}$this->$auxgdf=false;if(count($this->$sxbnb4)){foreach($this->$sxbnb4 as $rzhke0){$nydzd0=$this->$hwinb6;$this->$hwinb6=$rzhke0[2];$this->bues0($rzhke0[0],0,0,100,100,base64_decode('YXV0bw=='),$rzhke0[1]);$this->$hwinb6=$nydzd0;}$this->$sxbnb4=[];}}}function bues0($eajq73,$qnmje1,$ekxre2,$tpmge3,$sprqe4,$gndoe5=base64_decode('dmlzaWJsZQ=='),$hxsfe6=[]){$gndoe5=sagh3c($gndoe5);if($this->$agywe7==0){$this->hwqbe8($this->$glxre9);}$jgjdea=$this->$vxexcb;$aylceb=$this->$vxexcb;$this->$erhcec=$this->$vxexcb;$aucked=false;if($this->$tavmee){$aucked=true;$vzypef=$this->$vbrlf0;$this->lfqd3f(0);}$zskkf1=$this->$wpznf2;$this->$rkgsf3=true;$this->$coiwf4=true;$this->$xcaqf5=true;$gfdxf6=$this->$mewvd5;$utgff7=preg_replace(base64_decode('L1xzLw=='),'',$eajq73);$axlqf8=0;if($tpmge3>$this->$vxexcb){$qnmje1=0;$tpmge3=$this->$vxexcb;}if($sprqe4>$this->$vxexcb){$ekxre2=0;$sprqe4=$this->$vxexcb;}if($qnmje1>$this->$vxexcb){$qnmje1=$this->$vxexcb-$tpmge3;}if($ekxre2>$this->$vxexcb){$ekxre2=$this->$vxexcb-$sprqe4;}if(!empty($hxsfe6)){$jxerc6=$hxsfe6[0];$rzuqc7=$hxsfe6[1];$tearf9=$hxsfe6[2];$ozknfa=$hxsfe6[3];$this->$hhln7d=0;$this->$hcemfb=0;$this->$nfem7c=[];$this->iiea1($this->$nfem7c[0]);$this->$nfem7c[0][base64_decode('d2lkdGg=')]=&$this->$zfpcfc;$this->$nfem7c[0][base64_decode('aW5uZXJfd2lkdGg=')]=&$this->$zfpcfc;$this->$nfem7c[0][base64_decode('YmxvY2tDb250ZXh0')]=$this->$icxyfd;$azkzfe=$this->$mddeff->rdcy100(base64_decode('QkxPQ0s='),base64_decode('Qk9EWQ=='),'');$this->qbmi15($azkzfe,'',base64_decode('Qk9EWQ=='));$this->$hhln7d=1;$this->iiea1($this->$nfem7c[1]);$this->$nfem7c[1][base64_decode('dGFn')]=$jxerc6;$this->$nfem7c[1][base64_decode('YXR0cg==')]=$rzuqc7;$this->gfpr12();$smnz101=$this->$mddeff->rdcy100(base64_decode('QkxPQ0s='),$jxerc6,$rzuqc7);if(isset($smnz101[base64_decode('Uk9UQVRF')])&&($smnz101[base64_decode('Uk9UQVRF')]==90||$smnz101[base64_decode('Uk9UQVRF')]==-90||$smnz101[base64_decode('Uk9UQVRF')]==180)){$axlqf8=$smnz101[base64_decode('Uk9UQVRF')];}if(isset($smnz101[base64_decode('T1ZFUkZMT1c=')])){$gndoe5=sagh3c($smnz101[base64_decode('T1ZFUkZMT1c=')]);}if(sagh3c($smnz101[base64_decode('UE9TSVRJT04=')])==base64_decode('Zml4ZWQ=')){$xaav102=$this->$zfpcfc;$fbyf103=$this->$vxexcb-$this->$aohn104-$this->$aohn104;$owrb105=$this->$aohn104;$egkb106=$this->$aohn104;}else{$xaav102=$this->$vxexcb;$fbyf103=$this->$vxexcb;$owrb105=0;$egkb106=0;}$yitw107='';if(isset($smnz101[base64_decode('VEVYVC1BTElHTg==')])){$yitw107.=base64_decode('dGV4dC1hbGlnbjog').sagh3c($smnz101[base64_decode('VEVYVC1BTElHTg==')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('VEVYVC1UUkFOU0ZPUk0=')])){$yitw107.=base64_decode('dGV4dC10cmFuc2Zvcm06IA==').sagh3c($smnz101[base64_decode('VEVYVC1UUkFOU0ZPUk0=')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('VEVYVC1JTkRFTlQ=')])){$yitw107.=base64_decode('dGV4dC1pbmRlbnQ6IA==').sagh3c($smnz101[base64_decode('VEVYVC1JTkRFTlQ=')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('VEVYVC1ERUNPUkFUSU9O')])){$yitw107.=base64_decode('dGV4dC1kZWNvcmF0aW9uOiA=').sagh3c($smnz101[base64_decode('VEVYVC1ERUNPUkFUSU9O')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('Rk9OVC1GQU1JTFk=')])){$yitw107.=base64_decode('Zm9udC1mYW1pbHk6IA==').sagh3c($smnz101[base64_decode('Rk9OVC1GQU1JTFk=')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('Rk9OVC1TVFlMRQ==')])){$yitw107.=base64_decode('Zm9udC1zdHlsZTog').sagh3c($smnz101[base64_decode('Rk9OVC1TVFlMRQ==')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('Rk9OVC1XRUlHSFQ=')])){$yitw107.=base64_decode('Zm9udC13ZWlnaHQ6IA==').sagh3c($smnz101[base64_decode('Rk9OVC1XRUlHSFQ=')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('Rk9OVC1TSVpF')])){$yitw107.=base64_decode('Zm9udC1zaXplOiA=').sagh3c($smnz101[base64_decode('Rk9OVC1TSVpF')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('TElORS1IRUlHSFQ=')])){$yitw107.=base64_decode('bGluZS1oZWlnaHQ6IA==').sagh3c($smnz101[base64_decode('TElORS1IRUlHSFQ=')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('VEVYVC1TSEFET1c=')])){$yitw107.=base64_decode('dGV4dC1zaGFkb3c6IA==').sagh3c($smnz101[base64_decode('VEVYVC1TSEFET1c=')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('TEVUVEVSLVNQQUNJTkc=')])){$yitw107.=base64_decode('bGV0dGVyLXNwYWNpbmc6IA==').sagh3c($smnz101[base64_decode('TEVUVEVSLVNQQUNJTkc=')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('Rk9OVC1WQVJJQU5ULVBPU0lUSU9O')])){$yitw107.=base64_decode('Zm9udC12YXJpYW50LXBvc2l0aW9uOiA=').sagh3c($smnz101[base64_decode('Rk9OVC1WQVJJQU5ULVBPU0lUSU9O')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('Rk9OVC1WQVJJQU5ULUNBUFM=')])){$yitw107.=base64_decode('Zm9udC12YXJpYW50LWNhcHM6IA==').sagh3c($smnz101[base64_decode('Rk9OVC1WQVJJQU5ULUNBUFM=')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('Rk9OVC1WQVJJQU5ULUxJR0FUVVJFUw==')])){$yitw107.=base64_decode('Zm9udC12YXJpYW50LWxpZ2F0dXJlczog').sagh3c($smnz101[base64_decode('Rk9OVC1WQVJJQU5ULUxJR0FUVVJFUw==')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('Rk9OVC1WQVJJQU5ULU5VTUVSSUM=')])){$yitw107.=base64_decode('Zm9udC12YXJpYW50LW51bWVyaWM6IA==').sagh3c($smnz101[base64_decode('Rk9OVC1WQVJJQU5ULU5VTUVSSUM=')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('Rk9OVC1WQVJJQU5ULUFMVEVSTkFURVM=')])){$yitw107.=base64_decode('Zm9udC12YXJpYW50LWFsdGVybmF0ZXM6IA==').sagh3c($smnz101[base64_decode('Rk9OVC1WQVJJQU5ULUFMVEVSTkFURVM=')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('Rk9OVC1GRUFUVVJFLVNFVFRJTkdT')])){$yitw107.=base64_decode('Zm9udC1mZWF0dXJlLXNldHRpbmdzOiA=').sagh3c($smnz101[base64_decode('Rk9OVC1GRUFUVVJFLVNFVFRJTkdT')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('Rk9OVC1MQU5HVUFHRS1PVkVSUklERQ==')])){$yitw107.=base64_decode('Zm9udC1sYW5ndWFnZS1vdmVycmlkZTog').sagh3c($smnz101[base64_decode('Rk9OVC1MQU5HVUFHRS1PVkVSUklERQ==')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('Rk9OVC1LRVJOSU5H')])){$yitw107.=base64_decode('Zm9udC1rZXJuaW5nOiA=').sagh3c($smnz101[base64_decode('Rk9OVC1LRVJOSU5H')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('Q09MT1I=')])){$yitw107.=base64_decode('Y29sb3I6IA==').sagh3c($smnz101[base64_decode('Q09MT1I=')]).base64_decode('OyA=');}if(isset($smnz101[base64_decode('Wi1JTkRFWA==')])){$yitw107.=base64_decode('ei1pbmRleDog').$smnz101[base64_decode('Wi1JTkRFWA==')].base64_decode('OyA=');}if($yitw107){$eajq73=base64_decode('PGRpdiBzdHlsZT0i').$yitw107.base64_decode('Ij4=').$eajq73.base64_decode('PC9kaXY+');}$baoc108=[];$baoc108[base64_decode('TUFSR0lOLVRPUA==')]=(isset($smnz101[base64_decode('TUFSR0lOLVRPUA==')])?$smnz101[base64_decode('TUFSR0lOLVRPUA==')]:'');$baoc108[base64_decode('TUFSR0lOLVJJR0hU')]=(isset($smnz101[base64_decode('TUFSR0lOLVJJR0hU')])?$smnz101[base64_decode('TUFSR0lOLVJJR0hU')]:'');$baoc108[base64_decode('TUFSR0lOLUJPVFRPTQ==')]=(isset($smnz101[base64_decode('TUFSR0lOLUJPVFRPTQ==')])?$smnz101[base64_decode('TUFSR0lOLUJPVFRPTQ==')]:'');$baoc108[base64_decode('TUFSR0lOLUxFRlQ=')]=(isset($smnz101[base64_decode('TUFSR0lOLUxFRlQ=')])?$smnz101[base64_decode('TUFSR0lOLUxFRlQ=')]:'');$baoc108[base64_decode('UEFERElORy1UT1A=')]=(isset($smnz101[base64_decode('UEFERElORy1UT1A=')])?$smnz101[base64_decode('UEFERElORy1UT1A=')]:'');$baoc108[base64_decode('UEFERElORy1SSUdIVA==')]=(isset($smnz101[base64_decode('UEFERElORy1SSUdIVA==')])?$smnz101[base64_decode('UEFERElORy1SSUdIVA==')]:'');$baoc108[base64_decode('UEFERElORy1CT1RUT00=')]=(isset($smnz101[base64_decode('UEFERElORy1CT1RUT00=')])?$smnz101[base64_decode('UEFERElORy1CT1RUT00=')]:'');$baoc108[base64_decode('UEFERElORy1MRUZU')]=(isset($smnz101[base64_decode('UEFERElORy1MRUZU')])?$smnz101[base64_decode('UEFERElORy1MRUZU')]:'');$baoc108[base64_decode('Qk9SREVSLVRPUA==')]=(isset($smnz101[base64_decode('Qk9SREVSLVRPUA==')])?$smnz101[base64_decode('Qk9SREVSLVRPUA==')]:'');$baoc108[base64_decode('Qk9SREVSLVJJR0hU')]=(isset($smnz101[base64_decode('Qk9SREVSLVJJR0hU')])?$smnz101[base64_decode('Qk9SREVSLVJJR0hU')]:'');$baoc108[base64_decode('Qk9SREVSLUJPVFRPTQ==')]=(isset($smnz101[base64_decode('Qk9SREVSLUJPVFRPTQ==')])?$smnz101[base64_decode('Qk9SREVSLUJPVFRPTQ==')]:'');$baoc108[base64_decode('Qk9SREVSLUxFRlQ=')]=(isset($smnz101[base64_decode('Qk9SREVSLUxFRlQ=')])?$smnz101[base64_decode('Qk9SREVSLUxFRlQ=')]:'');if(isset($smnz101[base64_decode('Qk9SREVSLVRPUC1MRUZULVJBRElVUy1I')])){$baoc108[base64_decode('Qk9SREVSLVRPUC1MRUZULVJBRElVUy1I')]=$smnz101[base64_decode('Qk9SREVSLVRPUC1MRUZULVJBRElVUy1I')];}if(isset($smnz101[base64_decode('Qk9SREVSLVRPUC1MRUZULVJBRElVUy1W')])){$baoc108[base64_decode('Qk9SREVSLVRPUC1MRUZULVJBRElVUy1W')]=$smnz101[base64_decode('Qk9SREVSLVRPUC1MRUZULVJBRElVUy1W')];}if(isset($smnz101[base64_decode('Qk9SREVSLVRPUC1SSUdIVC1SQURJVVMtSA==')])){$baoc108[base64_decode('Qk9SREVSLVRPUC1SSUdIVC1SQURJVVMtSA==')]=$smnz101[base64_decode('Qk9SREVSLVRPUC1SSUdIVC1SQURJVVMtSA==')];}if(isset($smnz101[base64_decode('Qk9SREVSLVRPUC1SSUdIVC1SQURJVVMtVg==')])){$baoc108[base64_decode('Qk9SREVSLVRPUC1SSUdIVC1SQURJVVMtVg==')]=$smnz101[base64_decode('Qk9SREVSLVRPUC1SSUdIVC1SQURJVVMtVg==')];}if(isset($smnz101[base64_decode('Qk9SREVSLUJPVFRPTS1MRUZULVJBRElVUy1I')])){$baoc108[base64_decode('Qk9SREVSLUJPVFRPTS1MRUZULVJBRElVUy1I')]=$smnz101[base64_decode('Qk9SREVSLUJPVFRPTS1MRUZULVJBRElVUy1I')];}if(isset($smnz101[base64_decode('Qk9SREVSLUJPVFRPTS1MRUZULVJBRElVUy1W')])){$baoc108[base64_decode('Qk9SREVSLUJPVFRPTS1MRUZULVJBRElVUy1W')]=$smnz101[base64_decode('Qk9SREVSLUJPVFRPTS1MRUZULVJBRElVUy1W')];}if(isset($smnz101[base64_decode('Qk9SREVSLUJPVFRPTS1SSUdIVC1SQURJVVMtSA==')])){$baoc108[base64_decode('Qk9SREVSLUJPVFRPTS1SSUdIVC1SQURJVVMtSA==')]=$smnz101[base64_decode('Qk9SREVSLUJPVFRPTS1SSUdIVC1SQURJVVMtSA==')];}if(isset($smnz101[base64_decode('Qk9SREVSLUJPVFRPTS1SSUdIVC1SQURJVVMtVg==')])){$baoc108[base64_decode('Qk9SREVSLUJPVFRPTS1SSUdIVC1SQURJVVMtVg==')]=$smnz101[base64_decode('Qk9SREVSLUJPVFRPTS1SSUdIVC1SQURJVVMtVg==')];}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1DT0xPUg==')])){$baoc108[base64_decode('QkFDS0dST1VORC1DT0xPUg==')]=$smnz101[base64_decode('QkFDS0dST1VORC1DT0xPUg==')];}if(isset($smnz101[base64_decode('Qk9YLVNIQURPVw==')])){$baoc108[base64_decode('Qk9YLVNIQURPVw==')]=$smnz101[base64_decode('Qk9YLVNIQURPVw==')];}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1JTUFHRQ==')])){$baoc108[base64_decode('QkFDS0dST1VORC1JTUFHRQ==')]=$smnz101[base64_decode('QkFDS0dST1VORC1JTUFHRQ==')];}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1JTUFHRS1SRVNJWkU=')])){$baoc108[base64_decode('QkFDS0dST1VORC1JTUFHRS1SRVNJWkU=')]=$smnz101[base64_decode('QkFDS0dST1VORC1JTUFHRS1SRVNJWkU=')];}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1JTUFHRS1PUEFDSVRZ')])){$baoc108[base64_decode('QkFDS0dST1VORC1JTUFHRS1PUEFDSVRZ')]=$smnz101[base64_decode('QkFDS0dST1VORC1JTUFHRS1PUEFDSVRZ')];}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1SRVBFQVQ=')])){$baoc108[base64_decode('QkFDS0dST1VORC1SRVBFQVQ=')]=$smnz101[base64_decode('QkFDS0dST1VORC1SRVBFQVQ=')];}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1QT1NJVElPTg==')])){$baoc108[base64_decode('QkFDS0dST1VORC1QT1NJVElPTg==')]=$smnz101[base64_decode('QkFDS0dST1VORC1QT1NJVElPTg==')];}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1HUkFESUVOVA==')])){$baoc108[base64_decode('QkFDS0dST1VORC1HUkFESUVOVA==')]=$smnz101[base64_decode('QkFDS0dST1VORC1HUkFESUVOVA==')];}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1TSVpF')])){$baoc108[base64_decode('QkFDS0dST1VORC1TSVpF')]=$smnz101[base64_decode('QkFDS0dST1VORC1TSVpF')];}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1PUklHSU4=')])){$baoc108[base64_decode('QkFDS0dST1VORC1PUklHSU4=')]=$smnz101[base64_decode('QkFDS0dST1VORC1PUklHSU4=')];}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1DTElQ')])){$baoc108[base64_decode('QkFDS0dST1VORC1DTElQ')]=$smnz101[base64_decode('QkFDS0dST1VORC1DTElQ')];}$this->qbmi15($baoc108,base64_decode('QkxPQ0s='),$jxerc6);$umvh109=$this->$nfem7c[1][base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')];$wqzb10a=$this->$nfem7c[1][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')];$ooxb10b=$this->$nfem7c[1][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')];$xfuy10c=$this->$nfem7c[1][base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')];$trhr10d=$this->$nfem7c[1][base64_decode('cGFkZGluZ19yaWdodA==')];$ehys10e=$this->$nfem7c[1][base64_decode('cGFkZGluZ19sZWZ0')];$jrev10f=$this->$nfem7c[1][base64_decode('cGFkZGluZ190b3A=')];$wjfj110=$this->$nfem7c[1][base64_decode('cGFkZGluZ19ib3R0b20=')];$wrdl111=$this->$nfem7c[1][base64_decode('bWFyZ2luX3JpZ2h0')];if(isset($smnz101[base64_decode('TUFSR0lOLVJJR0hU')])&&sagh3c($smnz101[base64_decode('TUFSR0lOLVJJR0hU')])==base64_decode('YXV0bw==')){$wrdl111=base64_decode('YXV0bw==');}$jjch112=$this->$nfem7c[1][base64_decode('bWFyZ2luX2xlZnQ=')];if(isset($smnz101[base64_decode('TUFSR0lOLUxFRlQ=')])&&sagh3c($smnz101[base64_decode('TUFSR0lOLUxFRlQ=')])==base64_decode('YXV0bw==')){$jjch112=base64_decode('YXV0bw==');}$yrwp113=$this->$nfem7c[1][base64_decode('bWFyZ2luX3RvcA==')];if(isset($smnz101[base64_decode('TUFSR0lOLVRPUA==')])&&sagh3c($smnz101[base64_decode('TUFSR0lOLVRPUA==')])==base64_decode('YXV0bw==')){$yrwp113=base64_decode('YXV0bw==');}$fgaq114=$this->$nfem7c[1][base64_decode('bWFyZ2luX2JvdHRvbQ==')];if(isset($smnz101[base64_decode('TUFSR0lOLUJPVFRPTQ==')])&&sagh3c($smnz101[base64_decode('TUFSR0lOLUJPVFRPTQ==')])==base64_decode('YXV0bw==')){$fgaq114=base64_decode('YXV0bw==');}if(isset($smnz101[base64_decode('TEVGVA==')])&&sagh3c($smnz101[base64_decode('TEVGVA==')])!=base64_decode('YXV0bw==')){$mfmu115=$this->$kcbo116->pqih117($smnz101[base64_decode('TEVGVA==')],$xaav102,$this->$bfpt118,false);}else{$mfmu115=base64_decode('YXV0bw==');}if(isset($smnz101[base64_decode('VE9Q')])&&sagh3c($smnz101[base64_decode('VE9Q')])!=base64_decode('YXV0bw==')){$pfho119=$this->$kcbo116->pqih117($smnz101[base64_decode('VE9Q')],$fbyf103,$this->$bfpt118,false);}else{$pfho119=base64_decode('YXV0bw==');}if(isset($smnz101[base64_decode('UklHSFQ=')])&&sagh3c($smnz101[base64_decode('UklHSFQ=')])!=base64_decode('YXV0bw==')){$joer11a=$this->$kcbo116->pqih117($smnz101[base64_decode('UklHSFQ=')],$xaav102,$this->$bfpt118,false);}else{$joer11a=base64_decode('YXV0bw==');}if(isset($smnz101[base64_decode('Qk9UVE9N')])&&sagh3c($smnz101[base64_decode('Qk9UVE9N')])!=base64_decode('YXV0bw==')){$jmdg11b=$this->$kcbo116->pqih117($smnz101[base64_decode('Qk9UVE9N')],$fbyf103,$this->$bfpt118,false);}else{$jmdg11b=base64_decode('YXV0bw==');}if(isset($smnz101[base64_decode('V0lEVEg=')])&&sagh3c($smnz101[base64_decode('V0lEVEg=')])!=base64_decode('YXV0bw==')){$siha11c=$this->$kcbo116->pqih117($smnz101[base64_decode('V0lEVEg=')],$xaav102,$this->$bfpt118,false);}else{$siha11c=base64_decode('YXV0bw==');}if(isset($smnz101[base64_decode('SEVJR0hU')])&&sagh3c($smnz101[base64_decode('SEVJR0hU')])!=base64_decode('YXV0bw==')){$zfcq11d=$this->$kcbo116->pqih117($smnz101[base64_decode('SEVJR0hU')],$fbyf103,$this->$bfpt118,false);}else{$zfcq11d=base64_decode('YXV0bw==');}if($axlqf8==90||$axlqf8==-90){if($mfmu115===base64_decode('YXV0bw==')&&$joer11a!==base64_decode('YXV0bw==')){$otyw11e=$joer11a;}else{$otyw11e=false;}if($pfho119===base64_decode('YXV0bw==')&&$jmdg11b!==base64_decode('YXV0bw==')){$jrao11f=$jmdg11b;}else{$jrao11f=false;}}if($utgff7==''&&$zfcq11d===base64_decode('YXV0bw==')){$zfcq11d=0.0001;}if($utgff7==''&&$siha11c===base64_decode('YXV0bw==')){$siha11c=2*$this->bxpw120(base64_decode('Vw=='),false);}$tugt121='';if($pfho119===base64_decode('YXV0bw==')&&$zfcq11d===base64_decode('YXV0bw==')&&$jmdg11b===base64_decode('YXV0bw==')&&$yrwp113===base64_decode('YXV0bw==')&&$fgaq114===base64_decode('YXV0bw==')){$tugt121=$pfho119;if($yrwp113===base64_decode('YXV0bw==')){$yrwp113=0;}if($fgaq114===base64_decode('YXV0bw==')){$fgaq114=0;}$pfho119=$ozknfa-$yrwp113-$egkb106;}elseif($pfho119===base64_decode('YXV0bw==')&&$zfcq11d===base64_decode('YXV0bw==')&&$jmdg11b===base64_decode('YXV0bw==')){$tugt121=$pfho119=$ozknfa-$egkb106;if($yrwp113===base64_decode('YXV0bw==')){$yrwp113=0;}if($fgaq114===base64_decode('YXV0bw==')){$fgaq114=0;}}elseif($pfho119!==base64_decode('YXV0bw==')&&$zfcq11d!==base64_decode('YXV0bw==')&&$jmdg11b!==base64_decode('YXV0bw==')){if($yrwp113===base64_decode('YXV0bw==')&&$fgaq114===base64_decode('YXV0bw==')){$qnmje1=$fbyf103-$pfho119-$ooxb10b-$jrev10f-$zfcq11d-$wjfj110-$xfuy10c-$jmdg11b;$yrwp113=$fgaq114=($qnmje1/2);}elseif($yrwp113===base64_decode('YXV0bw==')){$yrwp113=$fbyf103-$pfho119-$ooxb10b-$jrev10f-$zfcq11d-$wjfj110-$xfuy10c-$fgaq114-$jmdg11b;}elseif($fgaq114===base64_decode('YXV0bw==')){$fgaq114=$fbyf103-$pfho119-$yrwp113-$ooxb10b-$jrev10f-$zfcq11d-$wjfj110-$xfuy10c-$jmdg11b;}else{$jmdg11b=$fbyf103-$pfho119-$yrwp113-$ooxb10b-$jrev10f-$zfcq11d-$wjfj110-$xfuy10c-$yrwp113;}}else{if($yrwp113===base64_decode('YXV0bw==')){$yrwp113=0;}if($fgaq114===base64_decode('YXV0bw==')){$fgaq114=0;}if($pfho119===base64_decode('YXV0bw==')&&$zfcq11d===base64_decode('YXV0bw==')&&$jmdg11b!==base64_decode('YXV0bw==')){}elseif($pfho119===base64_decode('YXV0bw==')&&$jmdg11b===base64_decode('YXV0bw==')&&$zfcq11d!==base64_decode('YXV0bw==')){$pfho119=$ozknfa-$yrwp113-$egkb106;$jmdg11b=$fbyf103-$pfho119-$yrwp113-$ooxb10b-$jrev10f-$zfcq11d-$wjfj110-$xfuy10c-$yrwp113;}elseif($zfcq11d===base64_decode('YXV0bw==')&&$jmdg11b===base64_decode('YXV0bw==')&&$pfho119!==base64_decode('YXV0bw==')){}elseif($pfho119===base64_decode('YXV0bw==')&&$zfcq11d!==base64_decode('YXV0bw==')&&$jmdg11b!==base64_decode('YXV0bw==')){$pfho119=$fbyf103-$yrwp113-$ooxb10b-$jrev10f-$zfcq11d-$wjfj110-$xfuy10c-$yrwp113-$jmdg11b;}elseif($zfcq11d===base64_decode('YXV0bw==')&&$pfho119!==base64_decode('YXV0bw==')&&$jmdg11b!==base64_decode('YXV0bw==')){$zfcq11d=$fbyf103-$pfho119-$yrwp113-$ooxb10b-$jrev10f-$wjfj110-$xfuy10c-$yrwp113-$jmdg11b;}elseif($jmdg11b===base64_decode('YXV0bw==')&&$pfho119!==base64_decode('YXV0bw==')&&$zfcq11d!==base64_decode('YXV0bw==')){$jmdg11b=$fbyf103-$pfho119-$yrwp113-$ooxb10b-$jrev10f-$zfcq11d-$wjfj110-$xfuy10c-$yrwp113;}}if($mfmu115===base64_decode('YXV0bw==')&&$siha11c===base64_decode('YXV0bw==')&&$joer11a===base64_decode('YXV0bw==')){if($jjch112===base64_decode('YXV0bw==')){$jjch112=0;}if($wrdl111===base64_decode('YXV0bw==')){$wrdl111=0;}$mfmu115=$tearf9-$jjch112-$owrb105;}elseif($mfmu115!==base64_decode('YXV0bw==')&&$siha11c!==base64_decode('YXV0bw==')&&$joer11a!==base64_decode('YXV0bw==')){if($jjch112===base64_decode('YXV0bw==')&&$wrdl111===base64_decode('YXV0bw==')){$qnmje1=$xaav102-$mfmu115-$wqzb10a-$ehys10e-$siha11c-$trhr10d-$umvh109-$joer11a;$jjch112=$wrdl111=($qnmje1/2);}elseif($jjch112===base64_decode('YXV0bw==')){$jjch112=$xaav102-$mfmu115-$wqzb10a-$ehys10e-$siha11c-$trhr10d-$umvh109-$wrdl111-$joer11a;}elseif($wrdl111===base64_decode('YXV0bw==')){$wrdl111=$xaav102-$mfmu115-$jjch112-$wqzb10a-$ehys10e-$siha11c-$trhr10d-$umvh109-$joer11a;}else{$joer11a=$xaav102-$mfmu115-$jjch112-$wqzb10a-$ehys10e-$siha11c-$trhr10d-$umvh109-$jjch112;}}else{if($jjch112===base64_decode('YXV0bw==')){$jjch112=0;}if($wrdl111===base64_decode('YXV0bw==')){$wrdl111=0;}if($mfmu115===base64_decode('YXV0bw==')&&$siha11c===base64_decode('YXV0bw==')&&$joer11a!==base64_decode('YXV0bw==')){}elseif($mfmu115===base64_decode('YXV0bw==')&&$joer11a===base64_decode('YXV0bw==')&&$siha11c!==base64_decode('YXV0bw==')){$mfmu115=$tearf9-$jjch112-$owrb105;$joer11a=$xaav102-$mfmu115-$jjch112-$wqzb10a-$ehys10e-$siha11c-$trhr10d-$umvh109-$jjch112;}elseif($siha11c===base64_decode('YXV0bw==')&&$joer11a===base64_decode('YXV0bw==')&&$mfmu115!==base64_decode('YXV0bw==')){}elseif($mfmu115===base64_decode('YXV0bw==')&&$siha11c!==base64_decode('YXV0bw==')&&$joer11a!==base64_decode('YXV0bw==')){$mfmu115=$xaav102-$jjch112-$wqzb10a-$ehys10e-$siha11c-$trhr10d-$umvh109-$jjch112-$joer11a;}elseif($siha11c===base64_decode('YXV0bw==')&&$mfmu115!==base64_decode('YXV0bw==')&&$joer11a!==base64_decode('YXV0bw==')){$siha11c=$xaav102-$mfmu115-$jjch112-$wqzb10a-$ehys10e-$trhr10d-$umvh109-$jjch112-$joer11a;}elseif($joer11a===base64_decode('YXV0bw==')&&$mfmu115!==base64_decode('YXV0bw==')&&$siha11c!==base64_decode('YXV0bw==')){$joer11a=$xaav102-$mfmu115-$jjch112-$wqzb10a-$ehys10e-$siha11c-$trhr10d-$umvh109-$jjch112;}}if(isset($baoc108[base64_decode('QkFDS0dST1VORC1JTUFHRQ==')])&&$baoc108[base64_decode('QkFDS0dST1VORC1JTUFHRQ==')]){$dfpz122=$this->cysp123($baoc108,$this->$nfem7c[1][base64_decode('aW5uZXJfd2lkdGg=')]);if($dfpz122){$this->$nfem7c[1][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')]=$dfpz122;}}$favb124=$pfho119===base64_decode('YXV0bw==');$eryv125=$mfmu115===base64_decode('YXV0bw==');$frrb126=$joer11a===base64_decode('YXV0bw==');$rivy127=$jmdg11b===base64_decode('YXV0bw==');$pfho119=is_numeric($pfho119)?$pfho119:0;$mfmu115=is_numeric($mfmu115)?$mfmu115:0;$joer11a=is_numeric($joer11a)?$joer11a:0;$jmdg11b=is_numeric($jmdg11b)?$jmdg11b:0;$ekxre2=$egkb106+$pfho119+$yrwp113+$ooxb10b+$jrev10f;$sprqe4=$fbyf103-$pfho119-$yrwp113-$ooxb10b-$jrev10f-$wjfj110-$xfuy10c-$fgaq114-$jmdg11b;$qnmje1=$owrb105+$mfmu115+$jjch112+$wqzb10a+$ehys10e;$tpmge3=$xaav102-$mfmu115-$jjch112-$wqzb10a-$ehys10e-$trhr10d-$umvh109-$wrdl111-$joer11a;if($zfcq11d===base64_decode('YXV0bw==')&&$favb124){$ekxre2=$egkb106+$yrwp113+$ooxb10b+$jrev10f;$sprqe4=$fbyf103-($jmdg11b+$yrwp113+$fgaq114+$ooxb10b+$xfuy10c+$jrev10f+$wjfj110);}elseif($zfcq11d===base64_decode('YXV0bw==')&&$rivy127){$ekxre2=$egkb106+$pfho119+$yrwp113+$ooxb10b+$jrev10f;$sprqe4=$fbyf103-($pfho119+$yrwp113+$fgaq114+$ooxb10b+$xfuy10c+$jrev10f+$wjfj110);}if($siha11c===base64_decode('YXV0bw==')&&$eryv125){$qnmje1=$owrb105+$jjch112+$wqzb10a+$ehys10e;$tpmge3=$xaav102-($joer11a+$jjch112+$wrdl111+$wqzb10a+$umvh109+$ehys10e+$trhr10d);}elseif($siha11c===base64_decode('YXV0bw==')&&$frrb126){$qnmje1=$owrb105+$mfmu115+$jjch112+$wqzb10a+$ehys10e;$tpmge3=$xaav102-($mfmu115+$jjch112+$wrdl111+$wqzb10a+$umvh109+$ehys10e+$trhr10d);}$fhaf128=$egkb106+$pfho119+$yrwp113;$mexn129=$owrb105+$mfmu115+$jjch112;$ksmp12a=$this->$nfem7c[1];unset($smnz101);unset($baoc108);if($siha11c===base64_decode('YXV0bw==')){$this->$aohn104=$qnmje1;$this->$aohn104=$this->$vxexcb-$tpmge3-$qnmje1;$this->$zfpcfc=$this->$vxexcb-$this->$aohn104-$this->$aohn104;$this->$tdrud7[$this->$hwinb6]=[];$this->$vxexcb=$qnmje1;$this->$vxexcb=$ekxre2;$this->$qiyi12b=[];$this->$gbhi12c=[];$this->$uzbl12d=[];$this->$mewvd5=[];$this->$esib12e=0;$this->$sxdg12f=$this->$vxexcb;$this->cqtx130($eajq73,HTMLParserMode::HTML_HEADER_BUFFER);$siha11c=$this->$esib12e-$this->$aohn104;if($frrb126){$joer11a=$xaav102-$mfmu115-$jjch112-$wqzb10a-$ehys10e-$siha11c-$trhr10d-$umvh109-$jjch112;}elseif($eryv125){$mfmu115=$xaav102-$jjch112-$wqzb10a-$ehys10e-$siha11c-$trhr10d-$umvh109-$jjch112-$joer11a;$mexn129=$owrb105+$mfmu115+$jjch112;$wfix131=$mexn129+$wqzb10a+$ehys10e;$qnmje1=$wfix131;}$tpmge3=$siha11c;$fhaf128=$egkb106+$pfho119+$yrwp113;$mexn129=$owrb105+$mfmu115+$jjch112;}if($zfcq11d===base64_decode('YXV0bw==')){$this->$aohn104=$qnmje1;$this->$aohn104=$this->$vxexcb-$tpmge3-$qnmje1;$this->$zfpcfc=$this->$vxexcb-$this->$aohn104-$this->$aohn104;$this->$tdrud7[$this->$hwinb6]=[];$this->$vxexcb=$qnmje1;$this->$vxexcb=$ekxre2;$this->$qiyi12b=[];$this->$gbhi12c=[];$this->$uzbl12d=[];$this->$mewvd5=[];$this->cqtx130($eajq73,HTMLParserMode::HTML_HEADER_BUFFER);$zfcq11d=$this->$vxexcb-$ekxre2;if($gndoe5!=base64_decode('aGlkZGVu')&&$gndoe5!=base64_decode('dmlzaWJsZQ==')){if(($this->$vxexcb+$wjfj110+$xfuy10c)>($egkb106+$fbyf103)){$jdhg132=($this->$vxexcb+$wjfj110+$xfuy10c)-($egkb106+$fbyf103);$zfcq11d-=$jdhg132;}}if($rivy127&&$tugt121===base64_decode('YXV0bw==')){$jmdg11b=$pfho119=($fbyf103-$yrwp113-$ooxb10b-$jrev10f-$zfcq11d-$wjfj110-$xfuy10c-$fgaq114)/2;if($gndoe5!=base64_decode('aGlkZGVu')&&$gndoe5!=base64_decode('dmlzaWJsZQ==')){if($pfho119<0){$pfho119=0;$zfcq11d=$fbyf103-$pfho119-$yrwp113-$ooxb10b-$jrev10f-$wjfj110-$xfuy10c-$fgaq114-$jmdg11b;}}$fhaf128=$egkb106+$pfho119+$yrwp113;$gqsz133=$fhaf128+$ooxb10b+$jrev10f;$ekxre2=$gqsz133;}elseif($rivy127){$jmdg11b=$fbyf103-$pfho119-$yrwp113-$ooxb10b-$jrev10f-$zfcq11d-$wjfj110-$xfuy10c-$fgaq114;}elseif($favb124){$pfho119=$fbyf103-$yrwp113-$ooxb10b-$jrev10f-$zfcq11d-$wjfj110-$xfuy10c-$fgaq114-$jmdg11b;if($gndoe5!=base64_decode('aGlkZGVu')&&$gndoe5!=base64_decode('dmlzaWJsZQ==')){if($pfho119<0){$pfho119=0;$zfcq11d=$fbyf103-$pfho119-$yrwp113-$ooxb10b-$jrev10f-$wjfj110-$xfuy10c-$fgaq114-$jmdg11b;}}$fhaf128=$egkb106+$pfho119+$yrwp113;$gqsz133=$fhaf128+$ooxb10b+$jrev10f;$ekxre2=$gqsz133;}$sprqe4=$zfcq11d;$fhaf128=$egkb106+$pfho119+$yrwp113;$mexn129=$owrb105+$mfmu115+$jjch112;}$siha11c=$tpmge3;$zfcq11d=$sprqe4;}$this->$aohn104=$qnmje1;$this->$aohn104=$this->$vxexcb-$tpmge3-$qnmje1;$this->$zfpcfc=$this->$vxexcb-$this->$aohn104-$this->$aohn104;$this->$tdrud7[$this->$hwinb6]=[];$this->$vxexcb=$qnmje1;$this->$vxexcb=$ekxre2;$this->$qiyi12b=[];$this->$gbhi12c=[];$this->$uzbl12d=[];$this->$mewvd5=[];$this->cqtx130($eajq73,HTMLParserMode::HTML_HEADER_BUFFER);$exxq134=$this->$vxexcb-$ekxre2;$tewk135=$tpmge3;$sqzy136=$sprqe4;$vucy137=$exxq134/$tewk135;if($gndoe5!=base64_decode('aGlkZGVu')&&$gndoe5!=base64_decode('dmlzaWJsZQ==')){$skbu138=$sprqe4/$tpmge3;if($skbu138>0){if(($vucy137/$skbu138)>1){$trdr139=ceil($exxq134/$this->$qrlb13a);$nnsz13b=$tewk135*$trdr139;$dkhj13c=sqrt(($nnsz13b*$this->$qrlb13a)/$skbu138)*0.8;$tewk135+=($dkhj13c-$tewk135)-($tpmge3/100);}$rxtm13d=($vucy137/$skbu138);$jlyf13e=1;while(($vucy137/$skbu138)>1){$this->$vxexcb=$qnmje1;$this->$vxexcb=$ekxre2;if(($vucy137/$skbu138)>1.5||($vucy137/$skbu138)<0.6){$tewk135+=($tpmge3/$this->$aomd13f);}elseif(($vucy137/$skbu138)>1.2||($vucy137/$skbu138)<0.85){$tewk135+=($tpmge3/$this->$etsh140);}elseif(($vucy137/$skbu138)>1.1||($vucy137/$skbu138)<0.91){$tewk135+=($tpmge3/$this->$tjal141);}else{$tewk135+=($tpmge3/$this->$wyub142);}$sqzy136=$tewk135*$skbu138;$this->$aohn104=$this->$vxexcb-$tewk135-$qnmje1;$this->$zfpcfc=$this->$vxexcb-$this->$aohn104-$this->$aohn104;$this->$qiyi12b=[];$this->$gbhi12c=[];$this->$uzbl12d=[];$this->$mewvd5=[];$this->cqtx130($eajq73,HTMLParserMode::HTML_HEADER_BUFFER);$exxq134=$this->$vxexcb-$ekxre2;$vucy137=$exxq134/$tewk135;}}}$wcyi143=$tpmge3/$tewk135;$this->$mbgld3[$this->$hwinb6].=base64_decode('X19fQkVGT1JFX0JPUkRFUlNfX18=');$mhav144=$this->uorid2();$this->$mewvd5=[];if($axlqf8==90||$axlqf8==-90){$haqj145=$wqzb10a+$ehys10e+$siha11c+$trhr10d+$umvh109;$hold146=$ooxb10b+$jrev10f+$zfcq11d+$wjfj110+$xfuy10c;$itvx147=base64_decode('IHEK');if($axlqf8==90){if($otyw11e!==false){$mwce148=$haqj145;}else{$mwce148=$hold146;}if($jrao11f!==false){$tnxc149=-$haqj145+$hold146;}else{$tnxc149=0;}}else{if($otyw11e!==false){$mwce148=$haqj145-$hold146;}else{$mwce148=0;}if($jrao11f!==false){$tnxc149=$hold146;}else{$tnxc149=$haqj145;}}$itvx147.=$this->mydh5f($mwce148,$tnxc149,true).base64_decode('Cg==');$itvx147.=$this->upka60($axlqf8,$mexn129,$fhaf128,true).base64_decode('Cg==');$gzus14a=base64_decode('IFEK');}elseif($axlqf8==180){$itvx147=base64_decode('IHEK');$itvx147.=$this->mydh5f($wqzb10a+$ehys10e+$siha11c+$trhr10d+$umvh109,$ooxb10b+$jrev10f+$zfcq11d+$wjfj110+$xfuy10c,true).base64_decode('Cg==');$itvx147.=$this->upka60(180,$mexn129,$fhaf128,true).base64_decode('Cg==');$gzus14a=base64_decode('IFEK');}else{$itvx147='';$gzus14a='';}if(!empty($hxsfe6)){$this->$nfem7c[1]=$ksmp12a;$this->$nfem7c[1][base64_decode('d2lkdGg=')]=$ldps14b=$xaav102-$mfmu115-$jjch112-$wrdl111-$joer11a;$this->$nfem7c[1][base64_decode('eDA=')]=$mexn129;$this->$nfem7c[1][base64_decode('eTA=')]=$fhaf128;$this->$nfem7c[1][base64_decode('c3RhcnRwYWdl')]=$this->$hwinb6;$this->$nfem7c[1][base64_decode('eTE=')]=$fhaf128+$ooxb10b+$jrev10f+$zfcq11d+$wjfj110+$xfuy10c;$this->$kbxm14c->mbha14d($itvx147);$this->qnrye('',0,1);$this->$kbxm14c->mbha14d($gzus14a);}$vopwa9=$this->uorid2();$vopwa9=$itvx147.$vopwa9.$gzus14a;$this->$mbgld3[$this->$hwinb6]=preg_replace(base64_decode('L19fX0JFRk9SRV9CT1JERVJTX19fLw=='),base64_decode('Cg==').$vopwa9.base64_decode('Cg=='),$this->$mbgld3[$this->$hwinb6]);$this->$mewvd5=[];$this->$kbxm14c->mbha14d($itvx147);if($gndoe5==base64_decode('aGlkZGVu')){$coby14e=$this->$vxexcb;if(!empty($hxsfe6)&&($this->$vxexcb+$wjfj110+$xfuy10c)>($fhaf128+$ooxb10b+$jrev10f+$zfcq11d+$wjfj110+$xfuy10c)){$coby14e=($fhaf128+$ooxb10b+$jrev10f+$zfcq11d+$wjfj110+$xfuy10c)-($wjfj110+$xfuy10c);}$prjb14f=base64_decode('VyBu');$this->$kbxm14c->mbha14d(base64_decode('cQ=='));$wpvv150=$coby14e-$ekxre2;$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGICUuM0YgJS4zRiByZSAlcw=='),$qnmje1*Mpdf::SCALE,($this->$vxexcb-$ekxre2)*Mpdf::SCALE,$tpmge3*Mpdf::SCALE,-$wpvv150*Mpdf::SCALE,$prjb14f));if(!empty($mhav144)){$qbic151=base64_decode('cQo=').sprintf(base64_decode('JS4zRiAlLjNGICUuM0YgJS4zRiByZSAlcw=='),$qnmje1*Mpdf::SCALE,($this->$vxexcb-$ekxre2)*Mpdf::SCALE,$tpmge3*Mpdf::SCALE,-$wpvv150*Mpdf::SCALE,$prjb14f);$qbic151.=base64_decode('Cg==').$mhav144.base64_decode('ClE=');$mhav144=$qbic151;}}if(!empty($mhav144)){if($wcyi143!=1){$qbic151=base64_decode('cQo=').$this->nfql5e(($wcyi143*100),($wcyi143*100),$qnmje1,$ekxre2,true);$qbic151.=base64_decode('Cg==').$mhav144.base64_decode('ClE=');$mhav144=$qbic151;}$this->$kbxm14c->mbha14d($mhav144);}if($wcyi143!=1){$this->fukx5c();$this->nfql5e(($wcyi143*100),($wcyi143*100),$qnmje1,$ekxre2);}$this->$kbxm14c->mbha14d($this->$anos152);if($wcyi143!=1){$this->ajgp5d();}if($gndoe5==base64_decode('aGlkZGVu')){$this->$kbxm14c->mbha14d(base64_decode('UQ=='));}$this->$kbxm14c->mbha14d($gzus14a);foreach($this->$qiyi12b as $nfem7c){if($axlqf8){$qbic151=$nfem7c[2];$nfem7c[2]=$nfem7c[3];$nfem7c[3]=$qbic151;$xokr153=(($nfem7c[0]/Mpdf::SCALE));$owkr154=(($this->$vxexcb-($nfem7c[1]/Mpdf::SCALE)));if($axlqf8==90){$dlvl155=-($xokr153-$mexn129)+($hold146-($owkr154-$fhaf128));$obgz156=-($owkr154-$fhaf128)+($xokr153-$mexn129);$nfem7c[2]=-$nfem7c[2];}elseif($axlqf8==-90){$dlvl155=-($xokr153-$mexn129)+($owkr154-$fhaf128);$obgz156=-($owkr154-$fhaf128)-($xokr153-$mexn129)+$haqj145;$nfem7c[3]=-$nfem7c[3];}if($otyw11e!==false){$dlvl155+=$haqj145-$hold146;}if($jrao11f!==false){$obgz156+=$hold146-$haqj145;}$xokr153+=$dlvl155;$owkr154+=$obgz156;$nfem7c[0]=$xokr153*Mpdf::SCALE;$nfem7c[1]=($this->$vxexcb-$owkr154)*Mpdf::SCALE;}if($wcyi143!=1){$xokr153=(($nfem7c[0]/Mpdf::SCALE)-$qnmje1);$evzt157=$qnmje1+($xokr153*$wcyi143);$nfem7c[0]=$evzt157*Mpdf::SCALE;$owkr154=(($this->$vxexcb-($nfem7c[1]/Mpdf::SCALE))-$ekxre2);$swjl158=$ekxre2+($owkr154*$wcyi143);$nfem7c[1]=($this->$vxexcb-$swjl158)*Mpdf::SCALE;$nfem7c[2]*=$wcyi143;$nfem7c[3]*=$wcyi143;}$this->$izdi159[$this->$hwinb6][]=$nfem7c;}foreach($this->$uzbl12d as $bpxl15a=>$bymq15b){if($wcyi143!=1){$bymq15b[base64_decode('eA==')]=$qnmje1+(($bymq15b[base64_decode('eA==')]-$qnmje1)*$wcyi143);$bymq15b[base64_decode('eQ==')]=$ekxre2+(($bymq15b[base64_decode('eQ==')]-$ekxre2)*$wcyi143);$bymq15b[base64_decode('dw==')]*=$wcyi143;$bymq15b[base64_decode('aA==')]*=$wcyi143;$bymq15b[base64_decode('c3R5bGU=')][base64_decode('Zm9udHNpemU=')]*=$wcyi143;}$this->$mmng15c->$qyrn15d[$bymq15b[base64_decode('bg==')]]=$bymq15b;}foreach($this->$gbhi12c as $nfem7c){if($axlqf8){if($axlqf8==90){$dlvl155=-($nfem7c[base64_decode('eA==')]-$mexn129)+($hold146-($nfem7c[base64_decode('eQ==')]-$fhaf128));$obgz156=-($nfem7c[base64_decode('eQ==')]-$fhaf128)+($nfem7c[base64_decode('eA==')]-$mexn129);}elseif($axlqf8==-90){$dlvl155=-($nfem7c[base64_decode('eA==')]-$mexn129)+($nfem7c[base64_decode('eQ==')]-$fhaf128);$obgz156=-($nfem7c[base64_decode('eQ==')]-$fhaf128)-($nfem7c[base64_decode('eA==')]-$mexn129)+$haqj145;}if($otyw11e!==false){$dlvl155+=$haqj145-$hold146;}if($jrao11f!==false){$obgz156+=$hold146-$haqj145;}$nfem7c[base64_decode('eA==')]+=$dlvl155;$nfem7c[base64_decode('eQ==')]+=$obgz156;}if($wcyi143!=1){$nfem7c[base64_decode('eA==')]=$qnmje1+(($nfem7c[base64_decode('eA==')]-$qnmje1)*$wcyi143);$nfem7c[base64_decode('eQ==')]=$ekxre2+(($nfem7c[base64_decode('eQ==')]-$ekxre2)*$wcyi143);}$this->$dulu15e[$this->$hwinb6][]=$nfem7c;}$this->$anos152='';$this->$qiyi12b=[];$this->$gbhi12c=[];$this->$uzbl12d=[];$this->$mewvd5=$gfdxf6;$this->$rkgsf3=false;$this->$coiwf4=false;$this->$erhcec=false;$this->dotsd6();$this->$zfpcfc=$this->$vxexcb-$this->$aohn104-$this->$aohn104;$this->qyvk15f($aylceb,$jgjdea);$this->$wpznf2=$zskkf1;$this->$xcaqf5=false;$this->$tdrud7[$this->$hwinb6]=[];$this->$tdrud7[$this->$hwinb6][base64_decode('Rm9udA==')]='';if($aucked){$this->lfqd3f($vzypef,$this->$hclk160,$this->$tofz161);}}function iiea1(&$vhpo162){$vhpo162[base64_decode('bWFyZ2luX3RvcA==')]=0;$vhpo162[base64_decode('bWFyZ2luX2xlZnQ=')]=0;$vhpo162[base64_decode('bWFyZ2luX2JvdHRvbQ==')]=0;$vhpo162[base64_decode('bWFyZ2luX3JpZ2h0')]=0;$vhpo162[base64_decode('cGFkZGluZ190b3A=')]=0;$vhpo162[base64_decode('cGFkZGluZ19sZWZ0')]=0;$vhpo162[base64_decode('cGFkZGluZ19ib3R0b20=')]=0;$vhpo162[base64_decode('cGFkZGluZ19yaWdodA==')]=0;$vhpo162[base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')]=0;$vhpo162[base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]=0;$vhpo162[base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')]=0;$vhpo162[base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')]=0;$vhpo162[base64_decode('ZGlyZWN0aW9u')]=base64_decode('bHRy');$vhpo162[base64_decode('aGlkZQ==')]=false;$vhpo162[base64_decode('b3V0ZXJfbGVmdF9tYXJnaW4=')]=0;$vhpo162[base64_decode('b3V0ZXJfcmlnaHRfbWFyZ2lu')]=0;$vhpo162[base64_decode('Y2FzY2FkZUNTUw==')]=[];$vhpo162[base64_decode('YmxvY2stYWxpZ24=')]=false;$vhpo162[base64_decode('Ymdjb2xvcg==')]=false;$vhpo162[base64_decode('cGFnZV9icmVha19hZnRlcl9hdm9pZA==')]=false;$vhpo162[base64_decode('a2VlcF9ibG9ja190b2dldGhlcg==')]=false;$vhpo162[base64_decode('ZmxvYXQ=')]=false;$vhpo162[base64_decode('bGluZV9oZWlnaHQ=')]='';$vhpo162[base64_decode('bWFyZ2luX2NvbGxhcHNl')]=false;}function gavw2($dxym163){$bvpu164=preg_split(base64_decode('L1xzKy8='),trim($dxym163));if(isset($this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')])){$kusy165=$this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')];}elseif(isset($this->$nfem7c[$this->$hhln7d-1][base64_decode('aW5uZXJfd2lkdGg=')])){$kusy165=$this->$nfem7c[$this->$hhln7d-1][base64_decode('aW5uZXJfd2lkdGg=')];}else{$kusy165=$this->$vxexcb;}if(count($bvpu164)==1){$odhk166=$this->$kcbo116->pqih117($bvpu164[0],$kusy165,$this->$bfpt118,false);if($odhk166>0){return[base64_decode('cw==')=>1,base64_decode('dw==')=>$odhk166,base64_decode('Yw==')=>$this->$eenv167->pqih117(0,$this->$yqgg168),base64_decode('c3R5bGU=')=>base64_decode('c29saWQ=')];}else{return[base64_decode('dw==')=>0,base64_decode('cw==')=>0];}}elseif(count($bvpu164)==2){if(in_array($bvpu164[1],$this->$fqax169)||$bvpu164[1]==base64_decode('bm9uZQ==')||$bvpu164[1]==base64_decode('aGlkZGVu')){$bvpu164[2]='';}elseif(in_array($bvpu164[0],$this->$fqax169)||$bvpu164[0]==base64_decode('bm9uZQ==')||$bvpu164[0]==base64_decode('aGlkZGVu')){$bvpu164[0]='';$bvpu164[1]=$bvpu164[0];$bvpu164[2]=$bvpu164[1];}else{$bvpu164[1]='';$bvpu164[2]=$bvpu164[1];}}elseif(count($bvpu164)==3){if(substr($bvpu164[0],0,1)==base64_decode('Iw==')){$qbic151=$bvpu164[0];$bvpu164[0]=$bvpu164[1];$bvpu164[1]=$bvpu164[2];$bvpu164[2]=$qbic151;}elseif(substr($bvpu164[0],1,1)==base64_decode('Iw==')){$qbic151=$bvpu164[1];$bvpu164[0]=$bvpu164[2];$bvpu164[1]=$bvpu164[0];$bvpu164[2]=$qbic151;}elseif(in_array($bvpu164[0],$this->$fqax169)||$bvpu164[0]==base64_decode('bm9uZQ==')||$bvpu164[0]==base64_decode('aGlkZGVu')){$qbic151=$bvpu164[0];$bvpu164[0]=$bvpu164[1];$bvpu164[1]=$qbic151;}}else{return[base64_decode('dw==')=>0,base64_decode('cw==')=>0];}$odhk166=$this->$kcbo116->pqih117($bvpu164[0],$kusy165,$this->$bfpt118,false);$koil16a=$this->$eenv167->pqih117($bvpu164[2],$this->$yqgg168);$bvpu164[1]=sagh3c($bvpu164[1]);if(in_array($bvpu164[1],$this->$fqax169)&&$odhk166>0){$mspu16b=1;}elseif($bvpu164[1]==base64_decode('aGlkZGVu')){$mspu16b=1;$odhk166=0;$koil16a='';}elseif($bvpu164[1]==base64_decode('bm9uZQ==')){$mspu16b=0;$odhk166=0;$koil16a='';}else{$mspu16b=0;$odhk166=0;$koil16a='';$bvpu164[1]='';}return[base64_decode('cw==')=>$mspu16b,base64_decode('dw==')=>$odhk166,base64_decode('Yw==')=>$koil16a,base64_decode('c3R5bGU=')=>$bvpu164[1],base64_decode('ZG9t')=>0];}function ubms3($inej75,$gdpgcd,&$moed16c,&$mrhm16d){$bawt16e=0;$qnmje1=$inej75-$moed16c;$ekxre2=$gdpgcd-$mrhm16d;if(((($qnmje1+$bawt16e)*($qnmje1+$bawt16e))/($inej75*$inej75)+(($ekxre2+$bawt16e)*($ekxre2+$bawt16e))/($gdpgcd*$gdpgcd))<=1){return false;}$xctw16f=atan2($ekxre2,$qnmje1);$powy170=$gdpgcd/sqrt((($gdpgcd*$gdpgcd)/($inej75*$inej75))+(tan($xctw16f)*tan($xctw16f)));$wsqb171=$inej75/sqrt((($inej75*$inej75)/($gdpgcd*$gdpgcd))+((1/tan($xctw16f))*(1/tan($xctw16f))));$moed16c=max($moed16c,$inej75-$powy170+$bawt16e);$mrhm16d=max($mrhm16d,$gdpgcd-$wsqb171+$bawt16e);}function kgmf4($ixou172,$qfbq173,$dfok174){if($dfok174==base64_decode('RQ==')){if($this->$kmyq175==base64_decode('cnRs')){$wypg176=base64_decode('Ug==');}else{$wypg176=base64_decode('TA==');}}else{if($this->$kmyq175==base64_decode('cnRs')){$wypg176=base64_decode('TA==');}else{$wypg176=base64_decode('Ug==');}}$ixou172=strtoupper($ixou172);$smnz101=[];$smnz101[base64_decode('U0laRQ==')]=base64_decode('QVVUTw==');$smnz101[base64_decode('TUFSR0lOLVJJR0hU')]=strval($this->$yqjz177).base64_decode('bW0=');$smnz101[base64_decode('TUFSR0lOLUxFRlQ=')]=strval($this->$lwyb178).base64_decode('bW0=');$smnz101[base64_decode('TUFSR0lOLVRPUA==')]=strval($this->$bhsm179).base64_decode('bW0=');$smnz101[base64_decode('TUFSR0lOLUJPVFRPTQ==')]=strval($this->$jyvo17a).base64_decode('bW0=');$smnz101[base64_decode('TUFSR0lOLUhFQURFUg==')]=strval($this->$ixku17b).base64_decode('bW0=');$smnz101[base64_decode('TUFSR0lOLUZPT1RFUg==')]=strval($this->$jmnc17c).base64_decode('bW0=');if(isset($this->$mddeff->$cvuy17d[base64_decode('QFBBR0U=')])){$yszn17e=$this->$mddeff->$cvuy17d[base64_decode('QFBBR0U=')];}else{$yszn17e=[];}if(is_array($yszn17e)&&!empty($yszn17e)){$smnz101=array_merge($smnz101,$yszn17e);}if(isset($smnz101[base64_decode('RVZFTi1IRUFERVItTkFNRQ==')])&&$dfok174==base64_decode('RQ==')){$smnz101[base64_decode('SEVBREVS')]=$smnz101[base64_decode('RVZFTi1IRUFERVItTkFNRQ==')];unset($smnz101[base64_decode('RVZFTi1IRUFERVItTkFNRQ==')]);}if(isset($smnz101[base64_decode('T0RELUhFQURFUi1OQU1F')])&&$dfok174!=base64_decode('RQ==')){$smnz101[base64_decode('SEVBREVS')]=$smnz101[base64_decode('T0RELUhFQURFUi1OQU1F')];unset($smnz101[base64_decode('T0RELUhFQURFUi1OQU1F')]);}if(isset($smnz101[base64_decode('RVZFTi1GT09URVItTkFNRQ==')])&&$dfok174==base64_decode('RQ==')){$smnz101[base64_decode('Rk9PVEVS')]=$smnz101[base64_decode('RVZFTi1GT09URVItTkFNRQ==')];unset($smnz101[base64_decode('RVZFTi1GT09URVItTkFNRQ==')]);}if(isset($smnz101[base64_decode('T0RELUZPT1RFUi1OQU1F')])&&$dfok174!=base64_decode('RQ==')){$smnz101[base64_decode('Rk9PVEVS')]=$smnz101[base64_decode('T0RELUZPT1RFUi1OQU1F')];unset($smnz101[base64_decode('T0RELUZPT1RFUi1OQU1F')]);}if(isset($this->$mddeff->$cvuy17d[base64_decode('QFBBR0U+PlBTRVVETz4+UklHSFQ=')])&&$wypg176==base64_decode('Ug==')){$yszn17e=$this->$mddeff->$cvuy17d[base64_decode('QFBBR0U+PlBTRVVETz4+UklHSFQ=')];}else{$yszn17e=[];}if(isset($yszn17e[base64_decode('U0laRQ==')])){unset($yszn17e[base64_decode('U0laRQ==')]);}if(isset($yszn17e[base64_decode('U0hFRVQtU0laRQ==')])){unset($yszn17e[base64_decode('U0hFRVQtU0laRQ==')]);}if(isset($yszn17e[base64_decode('TUFSR0lOLUxFRlQ=')])){unset($yszn17e[base64_decode('TUFSR0lOLUxFRlQ=')]);}if(isset($yszn17e[base64_decode('TUFSR0lOLVJJR0hU')])){unset($yszn17e[base64_decode('TUFSR0lOLVJJR0hU')]);}if(is_array($yszn17e)&&!empty($yszn17e)){$smnz101=array_merge($smnz101,$yszn17e);}if(isset($this->$mddeff->$cvuy17d[base64_decode('QFBBR0U+PlBTRVVETz4+TEVGVA==')])&&$wypg176==base64_decode('TA==')){$yszn17e=$this->$mddeff->$cvuy17d[base64_decode('QFBBR0U+PlBTRVVETz4+TEVGVA==')];}else{$yszn17e=[];}if(isset($yszn17e[base64_decode('U0laRQ==')])){unset($yszn17e[base64_decode('U0laRQ==')]);}if(isset($yszn17e[base64_decode('U0hFRVQtU0laRQ==')])){unset($yszn17e[base64_decode('U0hFRVQtU0laRQ==')]);}if(isset($yszn17e[base64_decode('TUFSR0lOLUxFRlQ=')])){unset($yszn17e[base64_decode('TUFSR0lOLUxFRlQ=')]);}if(isset($yszn17e[base64_decode('TUFSR0lOLVJJR0hU')])){unset($yszn17e[base64_decode('TUFSR0lOLVJJR0hU')]);}if(is_array($yszn17e)&&!empty($yszn17e)){$smnz101=array_merge($smnz101,$yszn17e);}if(isset($this->$mddeff->$cvuy17d[base64_decode('QFBBR0U+PlBTRVVETz4+RklSU1Q=')])&&$qfbq173){$yszn17e=$this->$mddeff->$cvuy17d[base64_decode('QFBBR0U+PlBTRVVETz4+RklSU1Q=')];}else{$yszn17e=[];}if(isset($yszn17e[base64_decode('U0laRQ==')])){unset($yszn17e[base64_decode('U0laRQ==')]);}if(isset($yszn17e[base64_decode('U0hFRVQtU0laRQ==')])){unset($yszn17e[base64_decode('U0hFRVQtU0laRQ==')]);}if(isset($yszn17e[base64_decode('TUFSR0lOLUxFRlQ=')])){unset($yszn17e[base64_decode('TUFSR0lOLUxFRlQ=')]);}if(isset($yszn17e[base64_decode('TUFSR0lOLVJJR0hU')])){unset($yszn17e[base64_decode('TUFSR0lOLVJJR0hU')]);}if(is_array($yszn17e)&&!empty($yszn17e)){$smnz101=array_merge($smnz101,$yszn17e);}if($ixou172){if(isset($this->$mddeff->$cvuy17d[base64_decode('QFBBR0U+Pk5BTUVEPj4=').$ixou172])){$yszn17e=$this->$mddeff->$cvuy17d[base64_decode('QFBBR0U+Pk5BTUVEPj4=').$ixou172];}else{$yszn17e=[];}if(is_array($yszn17e)&&!empty($yszn17e)){$smnz101=array_merge($smnz101,$yszn17e);}if(isset($smnz101[base64_decode('RVZFTi1IRUFERVItTkFNRQ==')])&&$dfok174==base64_decode('RQ==')){$smnz101[base64_decode('SEVBREVS')]=$smnz101[base64_decode('RVZFTi1IRUFERVItTkFNRQ==')];unset($smnz101[base64_decode('RVZFTi1IRUFERVItTkFNRQ==')]);}if(isset($smnz101[base64_decode('T0RELUhFQURFUi1OQU1F')])&&$dfok174!=base64_decode('RQ==')){$smnz101[base64_decode('SEVBREVS')]=$smnz101[base64_decode('T0RELUhFQURFUi1OQU1F')];unset($smnz101[base64_decode('T0RELUhFQURFUi1OQU1F')]);}if(isset($smnz101[base64_decode('RVZFTi1GT09URVItTkFNRQ==')])&&$dfok174==base64_decode('RQ==')){$smnz101[base64_decode('Rk9PVEVS')]=$smnz101[base64_decode('RVZFTi1GT09URVItTkFNRQ==')];unset($smnz101[base64_decode('RVZFTi1GT09URVItTkFNRQ==')]);}if(isset($smnz101[base64_decode('T0RELUZPT1RFUi1OQU1F')])&&$dfok174!=base64_decode('RQ==')){$smnz101[base64_decode('Rk9PVEVS')]=$smnz101[base64_decode('T0RELUZPT1RFUi1OQU1F')];unset($smnz101[base64_decode('T0RELUZPT1RFUi1OQU1F')]);}if(isset($this->$mddeff->$cvuy17d[base64_decode('QFBBR0U+Pk5BTUVEPj4=').$ixou172.base64_decode('Pj5QU0VVRE8+PlJJR0hU')])&&$wypg176==base64_decode('Ug==')){$yszn17e=$this->$mddeff->$cvuy17d[base64_decode('QFBBR0U+Pk5BTUVEPj4=').$ixou172.base64_decode('Pj5QU0VVRE8+PlJJR0hU')];}else{$yszn17e=[];}if(isset($yszn17e[base64_decode('U0laRQ==')])){unset($yszn17e[base64_decode('U0laRQ==')]);}if(isset($yszn17e[base64_decode('U0hFRVQtU0laRQ==')])){unset($yszn17e[base64_decode('U0hFRVQtU0laRQ==')]);}if(isset($yszn17e[base64_decode('TUFSR0lOLUxFRlQ=')])){unset($yszn17e[base64_decode('TUFSR0lOLUxFRlQ=')]);}if(isset($yszn17e[base64_decode('TUFSR0lOLVJJR0hU')])){unset($yszn17e[base64_decode('TUFSR0lOLVJJR0hU')]);}if(is_array($yszn17e)&&!empty($yszn17e)){$smnz101=array_merge($smnz101,$yszn17e);}if(isset($this->$mddeff->$cvuy17d[base64_decode('QFBBR0U+Pk5BTUVEPj4=').$ixou172.base64_decode('Pj5QU0VVRE8+PkxFRlQ=')])&&$wypg176==base64_decode('TA==')){$yszn17e=$this->$mddeff->$cvuy17d[base64_decode('QFBBR0U+Pk5BTUVEPj4=').$ixou172.base64_decode('Pj5QU0VVRE8+PkxFRlQ=')];}else{$yszn17e=[];}if(isset($yszn17e[base64_decode('U0laRQ==')])){unset($yszn17e[base64_decode('U0laRQ==')]);}if(isset($yszn17e[base64_decode('U0hFRVQtU0laRQ==')])){unset($yszn17e[base64_decode('U0hFRVQtU0laRQ==')]);}if(isset($yszn17e[base64_decode('TUFSR0lOLUxFRlQ=')])){unset($yszn17e[base64_decode('TUFSR0lOLUxFRlQ=')]);}if(isset($yszn17e[base64_decode('TUFSR0lOLVJJR0hU')])){unset($yszn17e[base64_decode('TUFSR0lOLVJJR0hU')]);}if(is_array($yszn17e)&&!empty($yszn17e)){$smnz101=array_merge($smnz101,$yszn17e);}if(isset($this->$mddeff->$cvuy17d[base64_decode('QFBBR0U+Pk5BTUVEPj4=').$ixou172.base64_decode('Pj5QU0VVRE8+PkZJUlNU')])&&$qfbq173){$yszn17e=$this->$mddeff->$cvuy17d[base64_decode('QFBBR0U+Pk5BTUVEPj4=').$ixou172.base64_decode('Pj5QU0VVRE8+PkZJUlNU')];}else{$yszn17e=[];}if(isset($yszn17e[base64_decode('U0laRQ==')])){unset($yszn17e[base64_decode('U0laRQ==')]);}if(isset($yszn17e[base64_decode('U0hFRVQtU0laRQ==')])){unset($yszn17e[base64_decode('U0hFRVQtU0laRQ==')]);}if(isset($yszn17e[base64_decode('TUFSR0lOLUxFRlQ=')])){unset($yszn17e[base64_decode('TUFSR0lOLUxFRlQ=')]);}if(isset($yszn17e[base64_decode('TUFSR0lOLVJJR0hU')])){unset($yszn17e[base64_decode('TUFSR0lOLVJJR0hU')]);}if(is_array($yszn17e)&&!empty($yszn17e)){$smnz101=array_merge($smnz101,$yszn17e);}}$vjej17f=$amlf180=$qoya181=$nabo182=$rgvj183=$nier184=$fkwt185='';$clnj186=$jxmt187='';$ezjd188=$scyf189=$lkkt18a='';$jfxn18b='';$uvud18c=[];$cehg18d='';if(isset($smnz101[base64_decode('U0hFRVQtU0laRQ==')])&&is_array($smnz101[base64_decode('U0hFRVQtU0laRQ==')])){$cehg18d=$smnz101[base64_decode('U0hFRVQtU0laRQ==')];if($cehg18d[0]>$cehg18d[1]){$cehg18d=array_reverse($cehg18d);$smnz101[base64_decode('T1JJRU5UQVRJT04=')]=base64_decode('TA==');}else{$smnz101[base64_decode('T1JJRU5UQVRJT04=')]=base64_decode('UA==');}$this->ydjg18e($cehg18d,$smnz101[base64_decode('T1JJRU5UQVRJT04=')]);}if(isset($smnz101[base64_decode('U0laRQ==')])&&is_array($smnz101[base64_decode('U0laRQ==')])&&!$cehg18d){if($smnz101[base64_decode('U0laRQ==')][base64_decode('Vw==')]>$smnz101[base64_decode('U0laRQ==')][base64_decode('SA==')]){$smnz101[base64_decode('T1JJRU5UQVRJT04=')]=base64_decode('TA==');}else{$smnz101[base64_decode('T1JJRU5UQVRJT04=')]=base64_decode('UA==');}}if(is_array($smnz101[base64_decode('U0laRQ==')])){if($smnz101[base64_decode('U0laRQ==')][base64_decode('Vw==')]>$this->$tpmge3){$smnz101[base64_decode('U0laRQ==')][base64_decode('Vw==')]=$this->$tpmge3;}if($smnz101[base64_decode('U0laRQ==')][base64_decode('SA==')]>$this->$sprqe4){$smnz101[base64_decode('U0laRQ==')][base64_decode('SA==')]=$this->$sprqe4;}if(($smnz101[base64_decode('T1JJRU5UQVRJT04=')]==$this->$ftci18f&&!$cehg18d)||($cehg18d&&$smnz101[base64_decode('T1JJRU5UQVRJT04=')]==base64_decode('UA=='))){$zody190=($this->$tpmge3-$smnz101[base64_decode('U0laRQ==')][base64_decode('Vw==')])/2;$rzbj191=($this->$sprqe4-$smnz101[base64_decode('U0laRQ==')][base64_decode('SA==')])/2;}else{$zody190=($this->$sprqe4-$smnz101[base64_decode('U0laRQ==')][base64_decode('Vw==')])/2;$rzbj191=($this->$tpmge3-$smnz101[base64_decode('U0laRQ==')][base64_decode('SA==')])/2;}$dibe192=$smnz101[base64_decode('U0laRQ==')][base64_decode('Vw==')];$cisy193=$smnz101[base64_decode('U0laRQ==')][base64_decode('SA==')];}else{$zody190=0;$rzbj191=0;if(!$cehg18d){if(strtoupper($smnz101[base64_decode('U0laRQ==')])==base64_decode('QVVUTw==')){$smnz101[base64_decode('T1JJRU5UQVRJT04=')]=$this->$ftci18f;}elseif(strtoupper($smnz101[base64_decode('U0laRQ==')])==base64_decode('TEFORFNDQVBF')){$smnz101[base64_decode('T1JJRU5UQVRJT04=')]=base64_decode('TA==');}else{$smnz101[base64_decode('T1JJRU5UQVRJT04=')]=base64_decode('UA==');}}if(($smnz101[base64_decode('T1JJRU5UQVRJT04=')]==$this->$ftci18f&&!$cehg18d)||($cehg18d&&$smnz101[base64_decode('T1JJRU5UQVRJT04=')]==base64_decode('UA=='))){$dibe192=$this->$tpmge3;$cisy193=$this->$sprqe4;}else{$dibe192=$this->$sprqe4;$cisy193=$this->$tpmge3;}}if(isset($smnz101[base64_decode('SEVBREVS')])&&$smnz101[base64_decode('SEVBREVS')]){$clnj186=$smnz101[base64_decode('SEVBREVS')];}if(isset($smnz101[base64_decode('Rk9PVEVS')])&&$smnz101[base64_decode('Rk9PVEVS')]){$jxmt187=$smnz101[base64_decode('Rk9PVEVS')];}if(isset($smnz101[base64_decode('UkVTRVRQQUdFTlVN')])&&$smnz101[base64_decode('UkVTRVRQQUdFTlVN')]){$ezjd188=$smnz101[base64_decode('UkVTRVRQQUdFTlVN')];}if(isset($smnz101[base64_decode('UEFHRU5VTVNUWUxF')])&&$smnz101[base64_decode('UEFHRU5VTVNUWUxF')]){$scyf189=$smnz101[base64_decode('UEFHRU5VTVNUWUxF')];}if(isset($smnz101[base64_decode('U1VQUFJFU1M=')])&&$smnz101[base64_decode('U1VQUFJFU1M=')]){$lkkt18a=$smnz101[base64_decode('U1VQUFJFU1M=')];}if(isset($smnz101[base64_decode('TUFSS1M=')])){if(preg_match(base64_decode('L2Nyb3NzL2k='),$smnz101[base64_decode('TUFSS1M=')])&&preg_match(base64_decode('L2Nyb3AvaQ=='),$smnz101[base64_decode('TUFSS1M=')])){$jfxn18b=base64_decode('Q1JPUENST1NT');}elseif(strtoupper($smnz101[base64_decode('TUFSS1M=')])==base64_decode('Q1JPUA==')){$jfxn18b=base64_decode('Q1JPUA==');}elseif(strtoupper($smnz101[base64_decode('TUFSS1M=')])==base64_decode('Q1JPU1M=')){$jfxn18b=base64_decode('Q1JPU1M=');}}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1DT0xPUg==')])&&$smnz101[base64_decode('QkFDS0dST1VORC1DT0xPUg==')]){$uvud18c[base64_decode('QkFDS0dST1VORC1DT0xPUg==')]=$smnz101[base64_decode('QkFDS0dST1VORC1DT0xPUg==')];}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1HUkFESUVOVA==')])&&$smnz101[base64_decode('QkFDS0dST1VORC1HUkFESUVOVA==')]){$uvud18c[base64_decode('QkFDS0dST1VORC1HUkFESUVOVA==')]=$smnz101[base64_decode('QkFDS0dST1VORC1HUkFESUVOVA==')];}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1JTUFHRQ==')])&&$smnz101[base64_decode('QkFDS0dST1VORC1JTUFHRQ==')]){$uvud18c[base64_decode('QkFDS0dST1VORC1JTUFHRQ==')]=$smnz101[base64_decode('QkFDS0dST1VORC1JTUFHRQ==')];}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1SRVBFQVQ=')])&&$smnz101[base64_decode('QkFDS0dST1VORC1SRVBFQVQ=')]){$uvud18c[base64_decode('QkFDS0dST1VORC1SRVBFQVQ=')]=$smnz101[base64_decode('QkFDS0dST1VORC1SRVBFQVQ=')];}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1QT1NJVElPTg==')])&&$smnz101[base64_decode('QkFDS0dST1VORC1QT1NJVElPTg==')]){$uvud18c[base64_decode('QkFDS0dST1VORC1QT1NJVElPTg==')]=$smnz101[base64_decode('QkFDS0dST1VORC1QT1NJVElPTg==')];}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1JTUFHRS1SRVNJWkU=')])&&$smnz101[base64_decode('QkFDS0dST1VORC1JTUFHRS1SRVNJWkU=')]){$uvud18c[base64_decode('QkFDS0dST1VORC1JTUFHRS1SRVNJWkU=')]=$smnz101[base64_decode('QkFDS0dST1VORC1JTUFHRS1SRVNJWkU=')];}if(isset($smnz101[base64_decode('QkFDS0dST1VORC1JTUFHRS1PUEFDSVRZ')])){$uvud18c[base64_decode('QkFDS0dST1VORC1JTUFHRS1PUEFDSVRZ')]=$smnz101[base64_decode('QkFDS0dST1VORC1JTUFHRS1PUEFDSVRZ')];}if(isset($smnz101[base64_decode('TUFSR0lOLUxFRlQ=')])){$amlf180=$this->$kcbo116->pqih117($smnz101[base64_decode('TUFSR0lOLUxFRlQ=')],$dibe192)+$zody190;}if(isset($smnz101[base64_decode('TUFSR0lOLVJJR0hU')])){$qoya181=$this->$kcbo116->pqih117($smnz101[base64_decode('TUFSR0lOLVJJR0hU')],$dibe192)+$zody190;}if(isset($smnz101[base64_decode('TUFSR0lOLUJPVFRPTQ==')])){$rgvj183=$this->$kcbo116->pqih117($smnz101[base64_decode('TUFSR0lOLUJPVFRPTQ==')],$cisy193)+$rzbj191;}if(isset($smnz101[base64_decode('TUFSR0lOLVRPUA==')])){$nabo182=$this->$kcbo116->pqih117($smnz101[base64_decode('TUFSR0lOLVRPUA==')],$cisy193)+$rzbj191;}if(isset($smnz101[base64_decode('TUFSR0lOLUhFQURFUg==')])){$nier184=$this->$kcbo116->pqih117($smnz101[base64_decode('TUFSR0lOLUhFQURFUg==')],$cisy193)+$rzbj191;}if(isset($smnz101[base64_decode('TUFSR0lOLUZPT1RFUg==')])){$fkwt185=$this->$kcbo116->pqih117($smnz101[base64_decode('TUFSR0lOLUZPT1RFUg==')],$cisy193)+$rzbj191;}if(isset($smnz101[base64_decode('T1JJRU5UQVRJT04=')])&&$smnz101[base64_decode('T1JJRU5UQVRJT04=')]){$vjej17f=$smnz101[base64_decode('T1JJRU5UQVRJT04=')];}$this->$vrwk194[base64_decode('b3V0ZXJfd2lkdGhfTFI=')]=$zody190;$this->$vrwk194[base64_decode('b3V0ZXJfd2lkdGhfVEI=')]=$rzbj191;return[$vjej17f,$amlf180,$qoya181,$nabo182,$rgvj183,$nier184,$fkwt185,$clnj186,$jxmt187,$uvud18c,$ezjd188,$scyf189,$lkkt18a,$jfxn18b,$cehg18d];}function xugj5($xmio195,$igsi196=0){[$pwcu197,$xvjy198,$mugl199,$kkzs19a,$oeux19b,$frlo19c]=$this->qvsx6($igsi196,true);$zynv19d=$ojkfcf=($this->$hwinb6*1000+$this->$vxexcb);if($xmio195==base64_decode('Qk9USA==')&&($pwcu197||$xvjy198)){$this->$tdrud7[$this->$hwinb6]=[];$zynv19d=max($mugl199,$kkzs19a,$ojkfcf);}elseif($xmio195==base64_decode('UklHSFQ=')&&$xvjy198){$this->$tdrud7[$this->$hwinb6]=[];$zynv19d=max($kkzs19a,$ojkfcf);}elseif($xmio195==base64_decode('TEVGVA==')&&$pwcu197){$this->$tdrud7[$this->$hwinb6]=[];$zynv19d=max($mugl199,$ojkfcf);}else{return;}$nydzd0=$this->$hwinb6;$mvhld1=intval($zynv19d/1000);if($nydzd0!=$mvhld1){$vopwa9=$this->uorid2();$this->$mbgld3[$this->$hwinb6]=preg_replace(base64_decode('LyhfX19CQUNLR1JPVU5EX19fUEFUVEVSTlM=').$this->$zjpod4.base64_decode('KS8='),base64_decode('XFwx').base64_decode('Cg==').$vopwa9.base64_decode('Cg=='),$this->$mbgld3[$this->$hwinb6]);$this->$mewvd5=[];$this->$hwinb6=$mvhld1;}$this->dotsd6();$this->$tdrud7[$this->$hwinb6]=[];$this->$vxexcb=(($zynv19d*1000)%1000000)/1000;}function qvsx6($igsi196=0,$xmio195=false){$pwcu197=false;$xvjy198=false;$mugl199=0;$kkzs19a=0;$oeux19b=0;$frlo19c=0;if(count($this->$nooa19e)){$ojkfcf=($this->$hwinb6*1000+$this->$vxexcb);foreach($this->$nooa19e as $bymq15b){if(($xmio195&&$bymq15b[base64_decode('YmxvY2tDb250ZXh0')]==$this->$nfem7c[$igsi196][base64_decode('YmxvY2tDb250ZXh0')])||(!$xmio195&&$ojkfcf>=$bymq15b[base64_decode('c3RhcnRwb3M=')]&&$ojkfcf<($bymq15b[base64_decode('ZW5kcG9z')]-0.001)&&$bymq15b[base64_decode('YmxrbHZs')]>$igsi196&&$bymq15b[base64_decode('YmxvY2tDb250ZXh0')]==$this->$nfem7c[$igsi196][base64_decode('YmxvY2tDb250ZXh0')])){if($bymq15b[base64_decode('c2lkZQ==')]==base64_decode('TA==')){$pwcu197=true;$mugl199=max($mugl199,$bymq15b[base64_decode('ZW5kcG9z')]);$oeux19b=max($oeux19b,$bymq15b[base64_decode('dw==')]);}if($bymq15b[base64_decode('c2lkZQ==')]==base64_decode('Ug==')){$xvjy198=true;$kkzs19a=max($kkzs19a,$bymq15b[base64_decode('ZW5kcG9z')]);$frlo19c=max($frlo19c,$bymq15b[base64_decode('dw==')]);}}}}return[$pwcu197,$xvjy198,$mugl199,$kkzs19a,$oeux19b,$frlo19c];}function bglv7($psje19f,$qoje1a0,$ujwk1a1){$yfor7b='';$this->$vahp1a2='';$fccx1a3=base64_decode('IA==');if($qoje1a0&&$qoje1a0!=base64_decode('bm9uZQ==')){$qoje1a0=trim(preg_replace(base64_decode('L3VybFwoWyJcJ10qKC4qPylbIlwnXSpcKS8='),base64_decode('XFwx'),$qoje1a0));$jkel1a4=100;$tprf1a5=100;$hpak9d=[];$hpak9d[base64_decode('bWFyZ2luX3RvcA==')]=0;$hpak9d[base64_decode('bWFyZ2luX2JvdHRvbQ==')]=0;$hpak9d[base64_decode('bWFyZ2luX2xlZnQ=')]=0;$hpak9d[base64_decode('bWFyZ2luX3JpZ2h0')]=0;$hpak9d[base64_decode('cGFkZGluZ190b3A=')]=0;$hpak9d[base64_decode('cGFkZGluZ19ib3R0b20=')]=0;$hpak9d[base64_decode('cGFkZGluZ19sZWZ0')]=0;$hpak9d[base64_decode('cGFkZGluZ19yaWdodA==')]=0;$hpak9d[base64_decode('d2lkdGg=')]=0;$hpak9d[base64_decode('aGVpZ2h0')]=0;$hpak9d[base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')]=0;$hpak9d[base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')]=0;$hpak9d[base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]=0;$hpak9d[base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')]=0;$hpak9d[base64_decode('dmlzaWJpbGl0eQ==')]=base64_decode('dmlzaWJsZQ==');$uuhb1a6=$qoje1a0;$cqsabe=$qoje1a0;$hpak9d[base64_decode('dmVydGljYWwtYWxpZ24=')]=base64_decode('QlM=');$tpmge3=0;$sprqe4=0;$jefe1a7=$this->$quyf1a8->tfnw1a9($uuhb1a6,true,true,$cqsabe);if(!$jefe1a7){return;}if($jefe1a7[base64_decode('dw==')]==0&&$jefe1a7[base64_decode('aA==')]==0){$jefe1a7[base64_decode('aA==')]=$this->$kcbo116->pqih117(base64_decode('MWVt'),$this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);}$hpak9d[base64_decode('ZmlsZQ==')]=$uuhb1a6;if($tpmge3==0 and $sprqe4==0){if($jefe1a7[base64_decode('dHlwZQ==')]==base64_decode('d21m')){$tpmge3=abs($jefe1a7[base64_decode('dw==')])/(20*Mpdf::SCALE);$sprqe4=abs($jefe1a7[base64_decode('aA==')])/(20*Mpdf::SCALE);}else{if($jefe1a7[base64_decode('dHlwZQ==')]==base64_decode('c3Zn')){$tpmge3=abs($jefe1a7[base64_decode('dw==')])/Mpdf::SCALE;$sprqe4=abs($jefe1a7[base64_decode('aA==')])/Mpdf::SCALE;}else{$tpmge3=($jefe1a7[base64_decode('dw==')]/Mpdf::SCALE)*(72/$this->$xegk1aa);$sprqe4=($jefe1a7[base64_decode('aA==')]/Mpdf::SCALE)*(72/$this->$xegk1aa);}}}if($tpmge3==0){$tpmge3=abs($sprqe4*$jefe1a7[base64_decode('dw==')]/$jefe1a7[base64_decode('aA==')]);}if($sprqe4==0){$sprqe4=abs($tpmge3*$jefe1a7[base64_decode('aA==')]/$jefe1a7[base64_decode('dw==')]);}if($tpmge3>$jkel1a4){$tpmge3=$jkel1a4;$sprqe4=abs($tpmge3*$jefe1a7[base64_decode('aA==')]/$jefe1a7[base64_decode('dw==')]);}if($sprqe4>$tprf1a5){$sprqe4=$tprf1a5;$tpmge3=abs($sprqe4*$jefe1a7[base64_decode('dw==')]/$jefe1a7[base64_decode('aA==')]);}$hpak9d[base64_decode('dHlwZQ==')]=base64_decode('aW1hZ2U=');$hpak9d[base64_decode('aXR5cGU=')]=$jefe1a7[base64_decode('dHlwZQ==')];$hpak9d[base64_decode('b3JpZ19o')]=$jefe1a7[base64_decode('aA==')];$hpak9d[base64_decode('b3JpZ193')]=$jefe1a7[base64_decode('dw==')];if($jefe1a7[base64_decode('dHlwZQ==')]==base64_decode('d21m')){$hpak9d[base64_decode('d21mX3g=')]=$jefe1a7[base64_decode('eA==')];$hpak9d[base64_decode('d21mX3k=')]=$jefe1a7[base64_decode('eQ==')];}else{if($jefe1a7[base64_decode('dHlwZQ==')]==base64_decode('c3Zn')){$hpak9d[base64_decode('d21mX3g=')]=$jefe1a7[base64_decode('eA==')];$hpak9d[base64_decode('d21mX3k=')]=$jefe1a7[base64_decode('eQ==')];}}$hpak9d[base64_decode('aGVpZ2h0')]=$sprqe4;$hpak9d[base64_decode('d2lkdGg=')]=$tpmge3;$hpak9d[base64_decode('aW1hZ2VfaGVpZ2h0')]=$sprqe4;$hpak9d[base64_decode('aW1hZ2Vfd2lkdGg=')]=$tpmge3;$hpak9d[base64_decode('ZGly')]=(isset($this->$nfem7c[$this->$hhln7d][base64_decode('ZGlyZWN0aW9u')])?$this->$nfem7c[$this->$hhln7d][base64_decode('ZGlyZWN0aW9u')]:base64_decode('bHRy'));$hpak9d[base64_decode('bGlzdG1hcmtlcg==')]=true;$hpak9d[base64_decode('bGlzdG1hcmtlcnBvc2l0aW9u')]=$ujwk1a1;$yfor7b=base64_decode('u6SsdHlwZT1pbWFnZSxvYmphdHRyPQ==').serialize($hpak9d).base64_decode('u6Ss');$this->ibgb9($yfor7b);if($ujwk1a1==base64_decode('aW5zaWRl')){$yfor7b=$fccx1a3;$this->ibgb9($yfor7b);}}elseif($psje19f==base64_decode('ZGlzYw==')||$psje19f==base64_decode('Y2lyY2xl')||$psje19f==base64_decode('c3F1YXJl')){$hpak9d=[];$hpak9d[base64_decode('dHlwZQ==')]=base64_decode('bGlzdG1hcmtlcg==');$hpak9d[base64_decode('bGlzdG1hcmtlcnBvc2l0aW9u')]=$ujwk1a1;$hpak9d[base64_decode('d2lkdGg=')]=0;$gkou1ab=$this->$kcbo116->pqih117($this->$hszl1ac,$this->$bfpt118);$hpak9d[base64_decode('c2l6ZQ==')]=$gkou1ab;$hpak9d[base64_decode('b2Zmc2V0')]=$this->$kcbo116->pqih117($this->$ptdd1ad,$this->$bfpt118);if($ujwk1a1==base64_decode('aW5zaWRl')){$hpak9d[base64_decode('d2lkdGg=')]=$gkou1ab+$hpak9d[base64_decode('b2Zmc2V0')];}$hpak9d[base64_decode('aGVpZ2h0')]=$this->$bfpt118;$hpak9d[base64_decode('dmVydGljYWwtYWxpZ24=')]=base64_decode('VA==');$hpak9d[base64_decode('dGV4dA==')]='';$hpak9d[base64_decode('ZGly')]=(isset($this->$nfem7c[$this->$hhln7d][base64_decode('ZGlyZWN0aW9u')])?$this->$nfem7c[$this->$hhln7d][base64_decode('ZGlyZWN0aW9u')]:base64_decode('bHRy'));$hpak9d[base64_decode('YnVsbGV0')]=$psje19f;$hpak9d[base64_decode('Y29sb3JhcnJheQ==')]=$this->$ftza1ae;$hpak9d[base64_decode('Zm9udGZhbWlseQ==')]=$this->$conw84;$hpak9d[base64_decode('Zm9udHNpemU=')]=$this->$bfpt118;$hpak9d[base64_decode('Zm9udHNpemVwdA==')]=$this->$jvue1af;$hpak9d[base64_decode('Zm9udHN0eWxl')]=$this->$yoib1b0;$yfor7b=base64_decode('u6SsdHlwZT1saXN0bWFya2VyLG9iamF0dHI9').serialize($hpak9d).base64_decode('u6Ss');$this->$vahp1a2=$this->ibgb9($yfor7b,'','',true);}elseif(preg_match(base64_decode('L1VcKyhbYS1mQS1GMC05XSspL2k='),$psje19f,$iivi1b1)){if($this->mdfc1b2($this->$iyzp8d[base64_decode('Y3c=')],hexdec($iivi1b1[1]))){$brqd1b3=UtfString::raon1b4($iivi1b1[1]);}else{$brqd1b3=base64_decode('LQ==');}if(preg_match(base64_decode('L3JnYlwoLio/XCkv'),$psje19f,$iivi1b1)){$mbjj1b5=$this->$eenv167->pqih117($iivi1b1[0],$this->$yqgg168);}else{$mbjj1b5='';}$wqbl1b6=$this->$ftza1ae;if($mbjj1b5){$this->$ftza1ae=$mbjj1b5;}if($ujwk1a1==base64_decode('aW5zaWRl')){$yfor7b=$brqd1b3.$fccx1a3;$this->ibgb9($yfor7b);}else{$hpak9d=[];$hpak9d[base64_decode('dHlwZQ==')]=base64_decode('bGlzdG1hcmtlcg==');$hpak9d[base64_decode('d2lkdGg=')]=0;$hpak9d[base64_decode('aGVpZ2h0')]=$this->$bfpt118;$hpak9d[base64_decode('dmVydGljYWwtYWxpZ24=')]=base64_decode('VA==');$hpak9d[base64_decode('dGV4dA==')]=$brqd1b3;$hpak9d[base64_decode('ZGly')]=(isset($this->$nfem7c[$this->$hhln7d][base64_decode('ZGlyZWN0aW9u')])?$this->$nfem7c[$this->$hhln7d][base64_decode('ZGlyZWN0aW9u')]:base64_decode('bHRy'));$hpak9d[base64_decode('Y29sb3JhcnJheQ==')]=$this->$ftza1ae;$hpak9d[base64_decode('Zm9udGZhbWlseQ==')]=$this->$conw84;$hpak9d[base64_decode('Zm9udHNpemU=')]=$this->$bfpt118;$hpak9d[base64_decode('Zm9udHNpemVwdA==')]=$this->$jvue1af;$hpak9d[base64_decode('Zm9udHN0eWxl')]=$this->$yoib1b0;$yfor7b=base64_decode('u6SsdHlwZT1saXN0bWFya2VyLG9iamF0dHI9').serialize($hpak9d).base64_decode('u6Ss');$this->$vahp1a2=$this->ibgb9($yfor7b,'','',true);}$this->$ftza1ae=$wqbl1b6;}else{$bxsl1b7=$this->$knad1b8[$this->$kudn1b9];if($psje19f==base64_decode('bm9uZQ==')){return;}$gpsw1ba=$this->xrzm1bb($bxsl1b7,$psje19f,true);if($ujwk1a1==base64_decode('aW5zaWRl')){$yfor7b=$gpsw1ba.$this->$xzud1bc.$fccx1a3;$this->ibgb9($yfor7b);}else{if(isset($this->$nfem7c[$this->$hhln7d][base64_decode('ZGlyZWN0aW9u')])&&$this->$nfem7c[$this->$hhln7d][base64_decode('ZGlyZWN0aW9u')]==base64_decode('cnRs')){$iivi1b1=strtr($this->$xzud1bc,base64_decode('KV19'),base64_decode('KFt7')).$gpsw1ba;}else{$iivi1b1=$gpsw1ba.$this->$xzud1bc;}$hpak9d=[];$hpak9d[base64_decode('dHlwZQ==')]=base64_decode('bGlzdG1hcmtlcg==');$hpak9d[base64_decode('d2lkdGg=')]=0;$hpak9d[base64_decode('aGVpZ2h0')]=$this->$bfpt118;$hpak9d[base64_decode('dmVydGljYWwtYWxpZ24=')]=base64_decode('VA==');$hpak9d[base64_decode('dGV4dA==')]=$iivi1b1;$hpak9d[base64_decode('ZGly')]=(isset($this->$nfem7c[$this->$hhln7d][base64_decode('ZGlyZWN0aW9u')])?$this->$nfem7c[$this->$hhln7d][base64_decode('ZGlyZWN0aW9u')]:base64_decode('bHRy'));$hpak9d[base64_decode('Y29sb3JhcnJheQ==')]=$this->$ftza1ae;$hpak9d[base64_decode('Zm9udGZhbWlseQ==')]=$this->$conw84;$hpak9d[base64_decode('Zm9udHNpemU=')]=$this->$bfpt118;$hpak9d[base64_decode('Zm9udHNpemVwdA==')]=$this->$jvue1af;$hpak9d[base64_decode('Zm9udHN0eWxl')]=$this->$yoib1b0;$yfor7b=base64_decode('u6SsdHlwZT1saXN0bWFya2VyLG9iamF0dHI9').serialize($hpak9d).base64_decode('u6Ss');$this->$vahp1a2=$this->ibgb9($yfor7b,'','',true);}}}function lhjx8(&$qcvo1bd,&$inej75,&$bqaa7a){$vxoy1be=0;$sihb1bf=$this->$kcbo116->pqih117($this->$ptdd1ad,$this->$bfpt118);$cgje1c0=$this->$knad1b8[$this->$kudn1b9];if($qcvo1bd[base64_decode('bGlzdF9zdHlsZV90eXBl')]!=base64_decode('ZGlzYw==')&&$qcvo1bd[base64_decode('bGlzdF9zdHlsZV90eXBl')]!=base64_decode('Y2lyY2xl')&&$qcvo1bd[base64_decode('bGlzdF9zdHlsZV90eXBl')]!=base64_decode('c3F1YXJl')){$fdfh1c1=1;for($mvuz1c2=$bqaa7a+2;$mvuz1c2<count($inej75);$mvuz1c2+=2){$yfor7b=$inej75[$mvuz1c2];if(!$yfor7b){continue;}if($yfor7b[0]==base64_decode('Lw==')){$yfor7b=strtoupper(substr($yfor7b,1));if($yfor7b==base64_decode('T0w=')||$yfor7b==base64_decode('VUw=')){if($fdfh1c1==1){break;}$fdfh1c1--;}}else{if(strpos($yfor7b,base64_decode('IA=='))){$yfor7b=substr($yfor7b,0,strpos($yfor7b,base64_decode('IA==')));}$yfor7b=strtoupper($yfor7b);if($yfor7b==base64_decode('TEk=')){if($fdfh1c1==1){$cgje1c0++;}}elseif($yfor7b==base64_decode('T0w=')||$yfor7b==base64_decode('VUw=')){$fdfh1c1++;}}}}$dglt1c3=new upil1c4\oewd1c5();$btev1c6=new upil1c4\chor1c7();$ktok1c8=new upil1c4\eugt1c9($this);switch($qcvo1bd[base64_decode('bGlzdF9zdHlsZV90eXBl')]){case base64_decode('ZGVjaW1hbA=='):case base64_decode('MQ=='):$vxoy1be=$this->njji9b(str_repeat(base64_decode('NQ=='),strlen($cgje1c0)).$this->$xzud1bc);break;case base64_decode('bm9uZQ=='):$vxoy1be=0;break;case base64_decode('dXBwZXItYWxwaGE='):case base64_decode('dXBwZXItbGF0aW4='):case base64_decode('QQ=='):$kico1ca=$dglt1c3->pqih117($cgje1c0,true);if($cgje1c0<13){$vxoy1be=$this->njji9b(base64_decode('RA==').$this->$xzud1bc);}else{$vxoy1be=$this->njji9b(str_repeat(base64_decode('Vw=='),strlen($kico1ca)).$this->$xzud1bc);}break;case base64_decode('bG93ZXItYWxwaGE='):case base64_decode('bG93ZXItbGF0aW4='):case base64_decode('YQ=='):$rbkv1cb=$dglt1c3->pqih117($cgje1c0,false);if($cgje1c0<13){$vxoy1be=$this->njji9b(base64_decode('Yg==').$this->$xzud1bc);}else{$vxoy1be=$this->njji9b(str_repeat(base64_decode('bQ=='),strlen($rbkv1cb)).$this->$xzud1bc);}break;case base64_decode('dXBwZXItcm9tYW4='):case base64_decode('SQ=='):if($cgje1c0>87){$slhw1cc=87;}elseif($cgje1c0>86){$slhw1cc=86;}elseif($cgje1c0>37){$slhw1cc=38;}elseif($cgje1c0>36){$slhw1cc=37;}elseif($cgje1c0>27){$slhw1cc=28;}elseif($cgje1c0>26){$slhw1cc=27;}elseif($cgje1c0>17){$slhw1cc=18;}elseif($cgje1c0>16){$slhw1cc=17;}elseif($cgje1c0>7){$slhw1cc=8;}elseif($cgje1c0>6){$slhw1cc=7;}elseif($cgje1c0>3){$slhw1cc=4;}else{$slhw1cc=$cgje1c0;}$lqpi1cd=$btev1c6->pqih117($slhw1cc,true);$vxoy1be=$this->njji9b($lqpi1cd.$this->$xzud1bc);break;case base64_decode('bG93ZXItcm9tYW4='):case base64_decode('aQ=='):if($cgje1c0>87){$slhw1cc=87;}elseif($cgje1c0>86){$slhw1cc=86;}elseif($cgje1c0>37){$slhw1cc=38;}elseif($cgje1c0>36){$slhw1cc=37;}elseif($cgje1c0>27){$slhw1cc=28;}elseif($cgje1c0>26){$slhw1cc=27;}elseif($cgje1c0>17){$slhw1cc=18;}elseif($cgje1c0>16){$slhw1cc=17;}elseif($cgje1c0>7){$slhw1cc=8;}elseif($cgje1c0>6){$slhw1cc=7;}elseif($cgje1c0>3){$slhw1cc=4;}else{$slhw1cc=$cgje1c0;}$lqpi1cd=$btev1c6->pqih117($slhw1cc,false);$vxoy1be=$this->njji9b($lqpi1cd.$this->$xzud1bc);break;case base64_decode('ZGlzYw=='):case base64_decode('Y2lyY2xl'):case base64_decode('c3F1YXJl'):$gkou1ab=$this->$kcbo116->pqih117($this->$hszl1ac,$this->$bfpt118);$rzeu1ce=$this->$kcbo116->pqih117($this->$ptdd1ad,$this->$bfpt118);$vxoy1be=$gkou1ab+$rzeu1ce;break;case base64_decode('YXJhYmljLWluZGlj'):$vxoy1be=$this->njji9b(str_repeat($ktok1c8->pqih117(3,0x0660),strlen($cgje1c0)).$this->$xzud1bc);break;case base64_decode('cGVyc2lhbg=='):case base64_decode('dXJkdQ=='):$vxoy1be=$this->njji9b(str_repeat($ktok1c8->pqih117(3,0x06F0),strlen($cgje1c0)).$this->$xzud1bc);break;case base64_decode('YmVuZ2FsaQ=='):$vxoy1be=$this->njji9b(str_repeat($ktok1c8->pqih117(3,0x09E6),strlen($cgje1c0)).$this->$xzud1bc);break;case base64_decode('ZGV2YW5hZ2FyaQ=='):$vxoy1be=$this->njji9b(str_repeat($ktok1c8->pqih117(3,0x0966),strlen($cgje1c0)).$this->$xzud1bc);break;case base64_decode('Z3VqYXJhdGk='):$vxoy1be=$this->njji9b(str_repeat($ktok1c8->pqih117(3,0x0AE6),strlen($cgje1c0)).$this->$xzud1bc);break;case base64_decode('Z3VybXVraGk='):$vxoy1be=$this->njji9b(str_repeat($ktok1c8->pqih117(3,0x0A66),strlen($cgje1c0)).$this->$xzud1bc);break;case base64_decode('a2FubmFkYQ=='):$vxoy1be=$this->njji9b(str_repeat($ktok1c8->pqih117(3,0x0CE6),strlen($cgje1c0)).$this->$xzud1bc);break;case base64_decode('bWFsYXlhbGFt'):$vxoy1be=$this->njji9b(str_repeat($ktok1c8->pqih117(6,0x0D66),strlen($cgje1c0)).$this->$xzud1bc);break;case base64_decode('b3JpeWE='):$vxoy1be=$this->njji9b(str_repeat($ktok1c8->pqih117(3,0x0B66),strlen($cgje1c0)).$this->$xzud1bc);break;case base64_decode('dGVsdWd1'):$vxoy1be=$this->njji9b(str_repeat($ktok1c8->pqih117(3,0x0C66),strlen($cgje1c0)).$this->$xzud1bc);break;case base64_decode('dGFtaWw='):$vxoy1be=$this->njji9b(str_repeat($ktok1c8->pqih117(9,0x0BE6),strlen($cgje1c0)).$this->$xzud1bc);break;case base64_decode('dGhhaQ=='):$vxoy1be=$this->njji9b(str_repeat($ktok1c8->pqih117(5,0x0E50),strlen($cgje1c0)).$this->$xzud1bc);break;default:$vxoy1be=$this->njji9b(str_repeat(base64_decode('NQ=='),strlen($cgje1c0)).$this->$xzud1bc);break;}return($vxoy1be+$sihb1bf);}function ibgb9($xctw16f,$odfo1cf='',$ajjt1d0='',$lvfc1d1=false){$vzct1d2=[];$vzct1d2[0]=$xctw16f;if(isset($odfo1cf)&&$odfo1cf){$vzct1d2[1]=$odfo1cf;}$vzct1d2[2]=$this->$bafe1d3;if(isset($this->$ftza1ae)&&$this->$ftza1ae){$vzct1d2[3]=$this->$ftza1ae;}$vzct1d2[4]=$this->$edwx1d4;$vzct1d2[5]=$this->$payl1d5;if(isset($ajjt1d0)&&$ajjt1d0){$vzct1d2[7]=$ajjt1d0;}if(isset($this->$nahk1d6[base64_decode('UGx1cw==')])&&strpos($this->$nahk1d6[base64_decode('UGx1cw==')],base64_decode('a2Vybg=='))!==false&&empty($this->$mtly85[base64_decode('R1BPU2luZm8=')])){$this->$tvtt8b=($this->$tvtt8b|TextVars::FC_KERNING);}$vzct1d2[8]=$this->$tvtt8b;if(isset($this->$dumo1d7)&&$this->$dumo1d7){$vzct1d2[9]=$this->$dumo1d7;}if(isset($this->$ietq1d8)&&$this->$ietq1d8){$vzct1d2[10]=$this->$ietq1d8;}$vzct1d2[11]=$this->$lvbj1d9;if(isset($this->$owdf1da)&&$this->$owdf1da){$vzct1d2[12]=$this->$owdf1da;}if(isset($this->$faig1db)&&$this->$faig1db){$vzct1d2[14]=$this->$faig1db;}if(isset($this->$faig1db)&&$this->$faig1db){$vzct1d2[15]=$this->$faig1db;}if(isset($this->$ywcva6)&&$this->$ywcva6){$vzct1d2[16]=$this->$ywcva6;}if(isset($this->$vhrm1dc)&&$this->$vhrm1dc){$vzct1d2[17]=$this->$vhrm1dc;}if(isset($this->$mtly85)&&$this->$mtly85){$vzct1d2[18]=$this->$mtly85;$this->$mtly85=[];}else{$vzct1d2[18]=null;}if($lvfc1d1){return($vzct1d2);}if($this->$vahp1a2){$this->$gdjqce[]=$this->$vahp1a2;$this->$vahp1a2=[];}$this->$gdjqce[]=$vzct1d2;}function cnsea($xctw16f,$odfo1cf='',$ajjt1d0=''){$vzct1d2=[];$vzct1d2[0]=$xctw16f;if(isset($odfo1cf)&&$odfo1cf){$vzct1d2[1]=$odfo1cf;}$vzct1d2[2]=$this->$bafe1d3;if(isset($this->$ftza1ae)&&$this->$ftza1ae){$vzct1d2[3]=$this->$ftza1ae;}$vzct1d2[4]=$this->$edwx1d4;if(isset($ajjt1d0)&&$ajjt1d0){$vzct1d2[7]=$ajjt1d0;}if(isset($this->$nahk1d6[base64_decode('UGx1cw==')])&&strpos($this->$nahk1d6[base64_decode('UGx1cw==')],base64_decode('a2Vybg=='))!==false&&empty($this->$mtly85[base64_decode('R1BPU2luZm8=')])){$this->$tvtt8b=($this->$tvtt8b|TextVars::FC_KERNING);}$vzct1d2[8]=$this->$tvtt8b;if(isset($this->$dumo1d7)&&$this->$dumo1d7){$vzct1d2[9]=$this->$dumo1d7;}if(isset($this->$ietq1d8)&&$this->$ietq1d8){$vzct1d2[10]=$this->$ietq1d8;}$vzct1d2[11]=$this->$lvbj1d9;if(isset($this->$owdf1da)&&$this->$owdf1da){$vzct1d2[12]=$this->$owdf1da;}if(isset($this->$faig1db)&&$this->$faig1db){$vzct1d2[14]=$this->$faig1db;}if(isset($this->$faig1db)&&$this->$faig1db){$vzct1d2[15]=$this->$faig1db;}if(isset($this->$ywcva6)&&$this->$ywcva6){$vzct1d2[16]=$this->$ywcva6;}if(isset($this->$vhrm1dc)&&$this->$vhrm1dc){$vzct1d2[17]=$this->$vhrm1dc;}if(isset($this->$mtly85)&&$this->$mtly85){$vzct1d2[18]=$this->$mtly85;$this->$mtly85=[];}else{$vzct1d2[18]=null;}$this->$evuqa3[$this->$uqzwa4][$this->$khwza5][base64_decode('dGV4dGJ1ZmZlcg==')][]=$vzct1d2;}function rwlqb($elvo1dd,$akln1de=0,$ntzn1df=false,$yxch1e0=false,$swnt1e1=''){$this->$ietq1d8='';$this->$tbpq1e2=false;$this->$kurk1e3=false;$this->$ywcva6=[];$tqeu1e4=0;if(count($this->$nooa19e)){[$pwcu197,$xvjy198,$mugl199,$kkzs19a,$oeux19b,$frlo19c]=$this->qvsx6($this->$hhln7d);if(($this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')]-$oeux19b-$frlo19c)<(2*$this->bxpw120(base64_decode('Vw=='),false))){if($mugl199<$kkzs19a&&($this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')]-$frlo19c)>(2*$this->bxpw120(base64_decode('Vw=='),false))){$this->xugj5(base64_decode('TEVGVA=='),$this->$hhln7d);}elseif($kkzs19a<$mugl199&&($this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')]-$oeux19b)>(2*$this->bxpw120(base64_decode('Vw=='),false))){$this->xugj5(base64_decode('UklHSFQ='),$this->$hhln7d);}else{$this->xugj5(base64_decode('Qk9USA=='),$this->$hhln7d);}}}$czsc1e5=$this->$vxexcb;$cmio1e6=$this->$vxexcb;$xyga1e7='';if(!$ntzn1df){if(isset($this->$nfem7c[$this->$hhln7d][base64_decode('YWxpZ24=')])&&$this->$nfem7c[$this->$hhln7d][base64_decode('YWxpZ24=')]){$xyga1e7=$this->$nfem7c[$this->$hhln7d][base64_decode('YWxpZ24=')];}if(isset($this->$nfem7c[$this->$hhln7d][base64_decode('YmxvY2stYWxpZ24=')])&&$this->$nfem7c[$this->$hhln7d][base64_decode('YmxvY2stYWxpZ24=')]){$xyga1e7=$this->$nfem7c[$this->$hhln7d][base64_decode('YmxvY2stYWxpZ24=')];}if(isset($this->$nfem7c[$this->$hhln7d][base64_decode('ZGlyZWN0aW9u')])){$phsu1e8=$this->$nfem7c[$this->$hhln7d][base64_decode('ZGlyZWN0aW9u')];}else{$phsu1e8='';}$this->$liux1e9=$this->$nfem7c[$this->$hhln7d][base64_decode('d2lkdGg=')];}else{$xyga1e7=$this->$gdnz1ea;$phsu1e8=$swnt1e1;}$abcr1eb=$this->$hwinb6;if($this->$liux1e9==0){$this->$liux1e9=$this->$zfpcfc;}if(!$ntzn1df){$this->lyhr1ec($this->$jvue1af,$this->$nfem7c[$this->$hhln7d][base64_decode('bGluZV9oZWlnaHQ=')]);}$this->$ltzi1ed=$this->$qrlb13a;$twgj1ee=$this->$ltzi1ed;if(!$yxch1e0){$this->nscn1ef($this->$rbvk1f0,'',$this->$wrdu1f1,true,true);}$this->hvwc1f2($this->$liux1e9,$this->$ltzi1ed,$xyga1e7,$ntzn1df,$akln1de,true,$phsu1e8,$yxch1e0);$mocl1f3=count($elvo1dd);if($mocl1f3==0){$this->qoom1f4(true);}for($bqaa7a=0;$bqaa7a<$mocl1f3;$bqaa7a++){if(empty($elvo1dd[$bqaa7a][18])){if(substr($elvo1dd[$bqaa7a][0],0,3)==base64_decode('u6Ss')){$wayv1f5=[0xFFFC];}else{$wayv1f5=$this->uxql1f6($elvo1dd[$bqaa7a][0],false);}$jdbi1f7=false;$this->uhfp4d($elvo1dd[$bqaa7a][18],$wayv1f5,$jdbi1f7);}if(($phsu1e8==base64_decode('cnRs')||$this->$esbu1f8)&&isset($elvo1dd[$bqaa7a][4])&&in_array($elvo1dd[$bqaa7a][4],[base64_decode('Y2NvdXJpZXI='),base64_decode('Y3RpbWVz'),base64_decode('Y2hlbHZldGljYQ=='),base64_decode('Y3N5bWJvbA=='),base64_decode('Y3phcGZkaW5nYmF0cw==')])){throw new \yrkk1f9\ojjg1fa(base64_decode('WW91IGNhbm5vdCB1c2UgY29yZSBmb250cyBpbiBhIGRvY3VtZW50IHdoaWNoIGNvbnRhaW5zIFJUTCB0ZXh0Lg=='));}}if(($phsu1e8==base64_decode('cnRs')||$this->$esbu1f8)&&!$yxch1e0){if(empty($this->$vvdq8f)){$this->$vvdq8f=new hprz90($this,$this->$fqrr91);}$this->$vvdq8f->qlwg1fb($elvo1dd,$phsu1e8);$mocl1f3=count($elvo1dd);}for($bqaa7a=$mocl1f3-1;$bqaa7a>0;$bqaa7a--){if(empty($elvo1dd[$bqaa7a][0])&&(isset($elvo1dd[$bqaa7a][16])&&$elvo1dd[$bqaa7a][16]!==base64_decode('MA=='))&&empty($elvo1dd[$bqaa7a][7])){unset($elvo1dd[$bqaa7a]);}}if(isset($elvo1dd[0][16])){$ufwb1fc=$elvo1dd[0][16];}else{$ufwb1fc=false;}for($bqaa7a=1;$bqaa7a<$mocl1f3;$bqaa7a++){if(isset($elvo1dd[$bqaa7a][16])&&$elvo1dd[$bqaa7a][16]==$ufwb1fc&&((!isset($elvo1dd[$bqaa7a][9][base64_decode('Ym9yZC1kZWNvcmF0aW9u')])&&!isset($elvo1dd[$bqaa7a-1][9][base64_decode('Ym9yZC1kZWNvcmF0aW9u')]))||(isset($elvo1dd[$bqaa7a][9][base64_decode('Ym9yZC1kZWNvcmF0aW9u')])&&isset($elvo1dd[$bqaa7a-1][9][base64_decode('Ym9yZC1kZWNvcmF0aW9u')])&&$elvo1dd[$bqaa7a][9][base64_decode('Ym9yZC1kZWNvcmF0aW9u')]==$elvo1dd[$bqaa7a-1][9][base64_decode('Ym9yZC1kZWNvcmF0aW9u')]))){if(isset($elvo1dd[$bqaa7a][16][base64_decode('Ug==')])){$ufwb1fc=$elvo1dd[$bqaa7a][16];}else{$ufwb1fc=false;}$elvo1dd[$bqaa7a][16][base64_decode('TA==')][base64_decode('cw==')]=0;$elvo1dd[$bqaa7a][16][base64_decode('TA==')][base64_decode('dw==')]=0;$elvo1dd[$bqaa7a-1][16][base64_decode('Ug==')][base64_decode('cw==')]=0;$elvo1dd[$bqaa7a-1][16][base64_decode('Ug==')][base64_decode('dw==')]=0;}else{if(isset($elvo1dd[$bqaa7a][16][base64_decode('Ug==')])){$ufwb1fc=$elvo1dd[$bqaa7a][16];}else{$ufwb1fc=false;}}}for($bqaa7a=0;$bqaa7a<$mocl1f3;$bqaa7a++){$mhln1fd=$this->$byxc1fe;$bmtp1ff=isset($elvo1dd[$bqaa7a])?$elvo1dd[$bqaa7a]:null;if($bqaa7a==0&&$bmtp1ff[0]!=base64_decode('Cg==')&&!$this->$jzxc83){$bmtp1ff[0]=ltrim($bmtp1ff[0]);if(!empty($bmtp1ff[18])){$this->$vvdq8f->ehxz99($bmtp1ff[18],true,false);}}if(empty($bmtp1ff[0])&&!($bmtp1ff[0]===base64_decode('MA=='))&&empty($bmtp1ff[7])){if($bqaa7a==($mocl1f3-1)){$this->qoom1f4(true);}continue;}if(isset($bmtp1ff[11])&&$bmtp1ff[11]!=''){if($ntzn1df&&$this->$ckpp200){$this->rvmj201($bmtp1ff[11]/$this->$ckpp200,false);}else{$this->rvmj201($bmtp1ff[11],false);}}if(isset($bmtp1ff[17])&&!empty($bmtp1ff[17])){$this->$vhrm1dc=$bmtp1ff[17];}if(isset($bmtp1ff[16])&&!empty($bmtp1ff[16])){$this->$ywcva6=$bmtp1ff[16];$this->$kurk1e3=true;}if(isset($bmtp1ff[15])){$this->$faig1db=$bmtp1ff[15];if($this->$faig1db&&strtoupper($this->$faig1db)!=base64_decode('Tk9STUFM')){$this->$fruo202=$this->$kcbo116->pqih117($this->$faig1db,$this->$bfpt118)/$this->$ckpp200;}}if(isset($bmtp1ff[14])){$this->$faig1db=$bmtp1ff[14];if(($this->$faig1db||$this->$faig1db===base64_decode('MA=='))&&strtoupper($this->$faig1db)!=base64_decode('Tk9STUFM')){$this->$msmg203=$this->$kcbo116->pqih117($this->$faig1db,$this->$bfpt118)/$this->$ckpp200;}}if(isset($bmtp1ff[10])and!empty($bmtp1ff[10])){$this->$ietq1d8=$bmtp1ff[10];$this->$tbpq1e2=true;}if(isset($bmtp1ff[9])and!empty($bmtp1ff[9])){$this->$dumo1d7=$bmtp1ff[9];$this->udvh204($this->$dumo1d7);if($ntzn1df&&$this->$ckpp200){if(isset($this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')])){$this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')]/=$this->$ckpp200;}if(isset($this->$dumo1d7[base64_decode('ZGVjb3JhdGlvbi1iYXNlbGluZQ==')])){$this->$dumo1d7[base64_decode('ZGVjb3JhdGlvbi1iYXNlbGluZQ==')]/=$this->$ckpp200;}if(isset($this->$dumo1d7[base64_decode('ZGVjb3JhdGlvbi1mb250c2l6ZQ==')])){$this->$dumo1d7[base64_decode('ZGVjb3JhdGlvbi1mb250c2l6ZQ==')]/=$this->$ckpp200;}}}if(isset($bmtp1ff[8])){$this->$tvtt8b=$bmtp1ff[8];}if(isset($bmtp1ff[7])and $bmtp1ff[7]!=''){$pofq205=$this->$vxexcb;if($this->$glff206){$this->$bfvod8[$bmtp1ff[7]]=[base64_decode('WQ==')=>$pofq205,base64_decode('UEFHRQ==')=>$this->$hwinb6,base64_decode('dGJyb3Q=')=>true];}elseif($this->$hped207){$this->$bfvod8[$bmtp1ff[7]]=[base64_decode('WQ==')=>$pofq205,base64_decode('UEFHRQ==')=>$this->$hwinb6,base64_decode('a3d0')=>true];}elseif($this->$tavmee){$this->$bfvod8[$bmtp1ff[7]]=[base64_decode('WQ==')=>$pofq205,base64_decode('UEFHRQ==')=>$this->$hwinb6,base64_decode('Y29s')=>$this->$byxc1fe];}elseif(!$this->$wzrh208){$this->$bfvod8[$bmtp1ff[7]]=[base64_decode('WQ==')=>$pofq205,base64_decode('UEFHRQ==')=>$this->$hwinb6];}if(empty($bmtp1ff[0])){if($bqaa7a==($mocl1f3-1)){$this->qoom1f4(true);}continue;}}if(isset($bmtp1ff[5])and $bmtp1ff[5]!=''){$this->$payl1d5=$bmtp1ff[5];}if(isset($bmtp1ff[4])and $bmtp1ff[4]!=''){$bsxk209=$this->nscn1ef($bmtp1ff[4],$this->$yoib1b0,0,false);}if(!empty($bmtp1ff[3])){$lfmz20a=$bmtp1ff[3];$this->tmfj20b($lfmz20a);}if(isset($bmtp1ff[2])and $bmtp1ff[2]!=''){$this->vfwh18($bmtp1ff[2]);}if(isset($bmtp1ff[12])and $bmtp1ff[12]!=''){$this->$owdf1da=$bmtp1ff[12];}if(isset($bmtp1ff[1])and $bmtp1ff[1]!=''){if(strpos($bmtp1ff[1],base64_decode('Lg=='))===false&&strpos($bmtp1ff[1],base64_decode('QA=='))!==0){while(array_key_exists($bmtp1ff[1],$this->$bfvod8)){$bmtp1ff[1]=base64_decode('Iw==').$bmtp1ff[1];}$this->$bfvod8[$bmtp1ff[1]]=$this->hcpx20c();$bmtp1ff[1]=$this->$bfvod8[$bmtp1ff[1]];}$this->$ftuxa0=$bmtp1ff[1];}if(substr($bmtp1ff[0],0,3)==base64_decode('u6Ss')){$hpak9d=$this->lqfo20d($bmtp1ff[0]);if($hpak9d[base64_decode('dHlwZQ==')]==base64_decode('bmVzdGVkdGFibGU=')){if($hpak9d[base64_decode('bmVzdGVkY29udGVudA==')]){$bnju20e=$hpak9d[base64_decode('bGV2ZWw=')];$qouj20f=&$this->$iwdqac[$bnju20e][$hpak9d[base64_decode('dGFibGU=')]];if($yxch1e0){$this->$vxexcb+=$this->$iwdqac[($bnju20e+1)][$hpak9d[base64_decode('bmVzdGVkY29udGVudA==')]][base64_decode('aA==')];$this->qoom1f4(false,base64_decode('bmVzdGVkdGFibGU='));}else{$trsf210=&$qouj20f[base64_decode('Y2VsbHM=')][$hpak9d[base64_decode('cm93')]][$hpak9d[base64_decode('Y29s')]];$this->qoom1f4(false,base64_decode('bmVzdGVkdGFibGU='));$ayji211=$this->$liux1e9;$gync212=$this->$emsj213;$this->$emsj213=[];$ldhp214=$this->$vxexcb;[$bhdh215,$tpmge3]=$this->umca24($qouj20f,$hpak9d[base64_decode('cm93')],$hpak9d[base64_decode('Y29s')]);$iqqk216=$this->$iwdqac[($bnju20e+1)][$hpak9d[base64_decode('bmVzdGVkY29udGVudA==')]][base64_decode('dw==')];if(!$this->$fzri217){if($this->$wdnu218){[$nkbe219,$docu21a,$vaip21b,$xwah21c]=$this->synb1f($trsf210[base64_decode('Ym9yZGVyYmlu')]);}else{$docu21a=$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')];$xwah21c=$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')];}if($qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){$hjnz21d=$tpmge3-$xwah21c-$docu21a-$trsf210[base64_decode('cGFkZGluZw==')][base64_decode('TA==')]-$trsf210[base64_decode('cGFkZGluZw==')][base64_decode('Ug==')]-$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfSA==')];}else{$hjnz21d=$tpmge3-$xwah21c/2-$docu21a/2-$trsf210[base64_decode('cGFkZGluZw==')][base64_decode('TA==')]-$trsf210[base64_decode('cGFkZGluZw==')][base64_decode('Ug==')];}}elseif($this->$fzri217){if($qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){$hjnz21d=$tpmge3-$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')]-$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')]-$trsf210[base64_decode('cGFkZGluZw==')][base64_decode('TA==')]-$trsf210[base64_decode('cGFkZGluZw==')][base64_decode('Ug==')]-$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfSA==')];}else{$hjnz21d=$tpmge3-$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')]/2-$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')]/2-$trsf210[base64_decode('cGFkZGluZw==')][base64_decode('TA==')]-$trsf210[base64_decode('cGFkZGluZw==')][base64_decode('Ug==')];}}if($trsf210[base64_decode('YQ==')]==base64_decode('Qw==')||$this->$iwdqac[($bnju20e+1)][$hpak9d[base64_decode('bmVzdGVkY29udGVudA==')]][base64_decode('YQ==')]==base64_decode('Qw==')){$ldhp214+=($hjnz21d-$iqqk216)/2;}elseif($trsf210[base64_decode('YQ==')]==base64_decode('Ug==')||$this->$iwdqac[($bnju20e+1)][$hpak9d[base64_decode('bmVzdGVkY29udGVudA==')]][base64_decode('YQ==')]==base64_decode('Ug==')){$ldhp214+=$hjnz21d-$iqqk216;}$this->$vxexcb=$ldhp214;$this->radp2e($this->$iwdqac[($bnju20e+1)][$hpak9d[base64_decode('bmVzdGVkY29udGVudA==')]]);$this->$emsj213=$gync212;$this->$vxexcb=$cmio1e6;$this->$liux1e9=$ayji211;}$this->hvwc1f2($this->$liux1e9,$this->$ltzi1ed,$xyga1e7,$ntzn1df,$akln1de,false,$phsu1e8,$yxch1e0);}}else{if($ntzn1df){$jkel1a4=$this->$liux1e9;}else{$jkel1a4=$this->$liux1e9-($this->$nfem7c[$this->$hhln7d][base64_decode('cGFkZGluZ19sZWZ0')]+$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]+$this->$nfem7c[$this->$hhln7d][base64_decode('cGFkZGluZ19yaWdodA==')]+$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')]);}if(isset($this->$kosf21e[base64_decode('Ug==')])&&$this->$vxexcb<=$this->$kosf21e[base64_decode('Ug==')][base64_decode('eTE=')]&&$this->$vxexcb>=$this->$kosf21e[base64_decode('Ug==')][base64_decode('eTA=')]){$jkel1a4-=$this->$kosf21e[base64_decode('Ug==')][base64_decode('dw==')];}if(isset($this->$kosf21e[base64_decode('TA==')])&&$this->$vxexcb<=$this->$kosf21e[base64_decode('TA==')][base64_decode('eTE=')]&&$this->$vxexcb>=$this->$kosf21e[base64_decode('TA==')][base64_decode('eTA=')]){$jkel1a4-=$this->$kosf21e[base64_decode('TA==')][base64_decode('dw==')];}[$jqne21f]=$this->xdnd220($hpak9d[base64_decode('dHlwZQ==')],'',$this->$vxexcb,$hpak9d,$this->$aohn104,($this->$yqkf221[base64_decode('Y29udGVudFdpZHRo')]/Mpdf::SCALE),$jkel1a4,$this->$yqkf221[base64_decode('aGVpZ2h0')],false,$ntzn1df);$miaa222=$this->$vxexcb;$abcr1eb=$this->$hwinb6;$eicn223=$this->$byxc1fe;if(($jqne21f==1||$jqne21f==-2)&&!isset($hpak9d[base64_decode('ZmxvYXQ=')])){$this->qoom1f4(false,$hpak9d[base64_decode('dHlwZQ==')]);$this->hvwc1f2($this->$liux1e9,$this->$ltzi1ed,$xyga1e7,$ntzn1df,$akln1de,false,$phsu1e8,$yxch1e0);}if(!$yxch1e0){$pvys224=$this->$hwinb6;if($this->$byxc1fe!=$eicn223){$ihqv225=true;}else{$ihqv225=false;}if(!$ihqv225&&$jqne21f<0&&$this->hoox3e()&&$pvys224==$abcr1eb){$this->hwqbe8($this->$glxre9);if(count($this->$kvqm226)){$bdec227=$miaa222-$this->$vxexcb;foreach($this->$kvqm226 as $ppem228=>$mcjs98){if($this->$kvqm226[$ppem228][base64_decode('T1VURVItWQ==')]){$this->$kvqm226[$ppem228][base64_decode('T1VURVItWQ==')]-=$bdec227;}if($this->$kvqm226[$ppem228][base64_decode('Qk9SREVSLVk=')]){$this->$kvqm226[$ppem228][base64_decode('Qk9SREVSLVk=')]-=$bdec227;}if($this->$kvqm226[$ppem228][base64_decode('SU5ORVItWQ==')]){$this->$kvqm226[$ppem228][base64_decode('SU5ORVItWQ==')]-=$bdec227;}}}}if($this->$hwinb6!=$abcr1eb){if(($this->$hwinb6-$abcr1eb)%2==1){$cmio1e6+=$this->$ikyp229;}$abcr1eb=$this->$hwinb6;$ekxre2=$this->$aohn104-$tqeu1e4;$this->$utax22a=$this->$aohn104-$tqeu1e4;$twgj1ee=0;}$this->$vxexcb=$cmio1e6;if($this->$byxc1fe!=$mhln1fd){if($this->$kmyq175==base64_decode('cnRs')){$cmio1e6-=($this->$byxc1fe-$mhln1fd)*($this->$donh22b+$this->$tofz161);}else{$cmio1e6+=($this->$byxc1fe-$mhln1fd)*($this->$donh22b+$this->$tofz161);}$this->$vxexcb=$cmio1e6;$mhln1fd=$this->$byxc1fe;$ekxre2=$this->$aocw22c-$tqeu1e4;$this->$utax22a=$this->$aocw22c-$tqeu1e4;$twgj1ee=0;}}if($hpak9d[base64_decode('dHlwZQ==')]==base64_decode('aW1hZ2U=')&&isset($hpak9d[base64_decode('ZmxvYXQ=')])){$tiua22d=$this->$vxexcb;if($this->$yqkf221[base64_decode('bmV3YmxvY2s=')]&&($this->$yqkf221[base64_decode('YmxvY2tzdGF0ZQ==')]==1||$this->$yqkf221[base64_decode('YmxvY2tzdGF0ZQ==')]==3)&&$this->$yqkf221[base64_decode('bGluZUNvdW50')]==0){$tiua22d+=$this->$nfem7c[$this->$hhln7d][base64_decode('bWFyZ2luX3RvcA==')]+$this->$nfem7c[$this->$hhln7d][base64_decode('cGFkZGluZ190b3A=')]+$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')];}if($hpak9d[base64_decode('ZmxvYXQ=')]==base64_decode('Ug==')){$iiau22e=$this->$vxexcb-$this->$aohn104-$hpak9d[base64_decode('d2lkdGg=')]-($this->$nfem7c[$this->$hhln7d][base64_decode('b3V0ZXJfcmlnaHRfbWFyZ2lu')]+$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')]+$this->$nfem7c[$this->$hhln7d][base64_decode('cGFkZGluZ19yaWdodA==')]);}elseif($hpak9d[base64_decode('ZmxvYXQ=')]==base64_decode('TA==')){$iiau22e=$this->$aohn104+($this->$nfem7c[$this->$hhln7d][base64_decode('b3V0ZXJfbGVmdF9tYXJnaW4=')]+$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]+$this->$nfem7c[$this->$hhln7d][base64_decode('cGFkZGluZ19sZWZ0')]);}$tpmge3=$hpak9d[base64_decode('d2lkdGg=')];$sprqe4=abs($hpak9d[base64_decode('aGVpZ2h0')]);$bonj22f=$jkel1a4-($this->$yqkf221[base64_decode('Y29udGVudFdpZHRo')]/Mpdf::SCALE);$tprf1a5=$this->$vxexcb-($this->$aohn104+$this->$hdwb230+$this->$aohn104+10);$xbcx231=($hpak9d[base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]+$hpak9d[base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')]+$hpak9d[base64_decode('bWFyZ2luX2xlZnQ=')]+$hpak9d[base64_decode('bWFyZ2luX3JpZ2h0')]);$ohma232=($hpak9d[base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')]+$hpak9d[base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')]+$hpak9d[base64_decode('bWFyZ2luX3RvcA==')]+$hpak9d[base64_decode('bWFyZ2luX2JvdHRvbQ==')]);if($hpak9d[base64_decode('aXR5cGU=')]==base64_decode('d21m')||$hpak9d[base64_decode('aXR5cGU=')]==base64_decode('c3Zn')){$whdf233=$hpak9d[base64_decode('ZmlsZQ==')];$jefe1a7=$this->$yyut234[$whdf233];}else{$whdf233=$hpak9d[base64_decode('ZmlsZQ==')];$jefe1a7=$this->$onzr235[$whdf233];}$fcnj236=$tpmge3-$xbcx231;$neiy237=$sprqe4-$ohma232;if($hpak9d[base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]){$hpak9d[base64_decode('Qk9SREVSLVdJRFRI')]=$fcnj236+(($hpak9d[base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]+$hpak9d[base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')])/2);$hpak9d[base64_decode('Qk9SREVSLUhFSUdIVA==')]=$neiy237+(($hpak9d[base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')]+$hpak9d[base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')])/2);$hpak9d[base64_decode('Qk9SREVSLVg=')]=$iiau22e+$hpak9d[base64_decode('bWFyZ2luX2xlZnQ=')]+(($hpak9d[base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')])/2);$hpak9d[base64_decode('Qk9SREVSLVk=')]=$tiua22d+$hpak9d[base64_decode('bWFyZ2luX3RvcA==')]+(($hpak9d[base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')])/2);}$hpak9d[base64_decode('SU5ORVItV0lEVEg=')]=$fcnj236;$hpak9d[base64_decode('SU5ORVItSEVJR0hU')]=$neiy237;$hpak9d[base64_decode('SU5ORVItWA==')]=$iiau22e+$hpak9d[base64_decode('bWFyZ2luX2xlZnQ=')]+($hpak9d[base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]);$hpak9d[base64_decode('SU5ORVItWQ==')]=$tiua22d+$hpak9d[base64_decode('bWFyZ2luX3RvcA==')]+($hpak9d[base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')]);$hpak9d[base64_decode('SUQ=')]=$jefe1a7[base64_decode('aQ==')];$hpak9d[base64_decode('T1VURVItV0lEVEg=')]=$tpmge3;$hpak9d[base64_decode('T1VURVItSEVJR0hU')]=$sprqe4;$hpak9d[base64_decode('T1VURVItWA==')]=$iiau22e;$hpak9d[base64_decode('T1VURVItWQ==')]=$tiua22d;if($hpak9d[base64_decode('ZmxvYXQ=')]==base64_decode('Ug==')){$this->$kosf21e[base64_decode('Ug==')][base64_decode('c2tpcGxpbmU=')]=false;if(isset($this->$kosf21e[base64_decode('Ug==')][base64_decode('eTE=')])&&$this->$kosf21e[base64_decode('Ug==')][base64_decode('eTE=')]>0&&$tiua22d<$this->$kosf21e[base64_decode('Ug==')][base64_decode('eTE=')]){$this->ltoa238($bmtp1ff[0],$bmtp1ff[18]);}elseif(isset($this->$kosf21e[base64_decode('TA==')][base64_decode('eTE=')])&&$this->$kosf21e[base64_decode('TA==')][base64_decode('eTE=')]>0&&$tiua22d<$this->$kosf21e[base64_decode('TA==')][base64_decode('eTE=')]){$iank239=2*$this->bxpw120(base64_decode('Vw=='),false);if(($this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')]-$tpmge3-$this->$kosf21e[base64_decode('TA==')][base64_decode('dw==')])<$iank239){$this->ltoa238($bmtp1ff[0],$bmtp1ff[18]);}else{$this->$kosf21e[base64_decode('Ug==')][base64_decode('eA==')]=$iiau22e;$this->$kosf21e[base64_decode('Ug==')][base64_decode('dw==')]=$tpmge3;$this->$kosf21e[base64_decode('Ug==')][base64_decode('eTA=')]=$tiua22d;$this->$kosf21e[base64_decode('Ug==')][base64_decode('eTE=')]=$tiua22d+$sprqe4;if($jqne21f==1){$this->$kosf21e[base64_decode('Ug==')][base64_decode('c2tpcGxpbmU=')]=true;$this->$kosf21e[base64_decode('Ug==')][base64_decode('aWQ=')]=count($this->$pgsp23a)+0;$hpak9d[base64_decode('c2tpcGxpbmU=')]=true;}$this->$pgsp23a[]=$hpak9d;}}else{$this->$kosf21e[base64_decode('Ug==')][base64_decode('eA==')]=$iiau22e;$this->$kosf21e[base64_decode('Ug==')][base64_decode('dw==')]=$tpmge3;$this->$kosf21e[base64_decode('Ug==')][base64_decode('eTA=')]=$tiua22d;$this->$kosf21e[base64_decode('Ug==')][base64_decode('eTE=')]=$tiua22d+$sprqe4;if($jqne21f==1){$this->$kosf21e[base64_decode('Ug==')][base64_decode('c2tpcGxpbmU=')]=true;$this->$kosf21e[base64_decode('Ug==')][base64_decode('aWQ=')]=count($this->$pgsp23a)+0;$hpak9d[base64_decode('c2tpcGxpbmU=')]=true;}$this->$pgsp23a[]=$hpak9d;}}elseif($hpak9d[base64_decode('ZmxvYXQ=')]==base64_decode('TA==')){$this->$kosf21e[base64_decode('TA==')][base64_decode('c2tpcGxpbmU=')]=false;if(isset($this->$kosf21e[base64_decode('TA==')][base64_decode('eTE=')])&&$this->$kosf21e[base64_decode('TA==')][base64_decode('eTE=')]>0&&$tiua22d<$this->$kosf21e[base64_decode('TA==')][base64_decode('eTE=')]){$this->$kosf21e[base64_decode('TA==')][base64_decode('c2tpcGxpbmU=')]=false;$this->ltoa238($bmtp1ff[0],$bmtp1ff[18]);}elseif(isset($this->$kosf21e[base64_decode('Ug==')][base64_decode('eTE=')])&&$this->$kosf21e[base64_decode('Ug==')][base64_decode('eTE=')]>0&&$tiua22d<$this->$kosf21e[base64_decode('Ug==')][base64_decode('eTE=')]){$iank239=2*$this->bxpw120(base64_decode('Vw=='),false);if(($this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')]-$tpmge3-$this->$kosf21e[base64_decode('Ug==')][base64_decode('dw==')])<$iank239){$this->ltoa238($bmtp1ff[0],$bmtp1ff[18]);}else{$this->$kosf21e[base64_decode('TA==')][base64_decode('eA==')]=$iiau22e+$tpmge3;$this->$kosf21e[base64_decode('TA==')][base64_decode('dw==')]=$tpmge3;$this->$kosf21e[base64_decode('TA==')][base64_decode('eTA=')]=$tiua22d;$this->$kosf21e[base64_decode('TA==')][base64_decode('eTE=')]=$tiua22d+$sprqe4;if($jqne21f==1){$this->$kosf21e[base64_decode('TA==')][base64_decode('c2tpcGxpbmU=')]=true;$this->$kosf21e[base64_decode('TA==')][base64_decode('aWQ=')]=count($this->$pgsp23a)+0;$hpak9d[base64_decode('c2tpcGxpbmU=')]=true;}$this->$pgsp23a[]=$hpak9d;}}else{$this->$kosf21e[base64_decode('TA==')][base64_decode('eA==')]=$iiau22e+$tpmge3;$this->$kosf21e[base64_decode('TA==')][base64_decode('dw==')]=$tpmge3;$this->$kosf21e[base64_decode('TA==')][base64_decode('eTA=')]=$tiua22d;$this->$kosf21e[base64_decode('TA==')][base64_decode('eTE=')]=$tiua22d+$sprqe4;if($jqne21f==1){$this->$kosf21e[base64_decode('TA==')][base64_decode('c2tpcGxpbmU=')]=true;$this->$kosf21e[base64_decode('TA==')][base64_decode('aWQ=')]=count($this->$pgsp23a)+0;$hpak9d[base64_decode('c2tpcGxpbmU=')]=true;}$this->$pgsp23a[]=$hpak9d;}}}else{$this->ltoa238($bmtp1ff[0],(isset($bmtp1ff[18])?$bmtp1ff[18]:null));}}}else{if($this->$bwrva1){$tqeu1e4=0;}else{$tqeu1e4=$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')];}if($bmtp1ff[0]==base64_decode('Cg==')){if($this->$yqkf221[base64_decode('Y29udGVudA==')]){$this->qoom1f4(false,base64_decode('YnI='));}elseif($ntzn1df){$this->$vxexcb+=$this->xsqy23b($this->$eppa23c);}elseif(!$ntzn1df){$this->wmgk23d($this->$qrlb13a);if($this->$tavmee){$this->$otfb23e[$this->$byxc1fe][]=$this->$vxexcb;}}if($this->$hwinb6!=$abcr1eb){if(($this->$hwinb6-$abcr1eb)%2==1){$cmio1e6+=$this->$ikyp229;}$abcr1eb=$this->$hwinb6;$ekxre2=$this->$aohn104-$tqeu1e4;$this->$utax22a=$this->$aohn104-$tqeu1e4;$twgj1ee=0;}$this->$vxexcb=$cmio1e6;if($this->$byxc1fe!=$mhln1fd){if($this->$kmyq175==base64_decode('cnRs')){$cmio1e6-=($this->$byxc1fe-$mhln1fd)*($this->$donh22b+$this->$tofz161);}else{$cmio1e6+=($this->$byxc1fe-$mhln1fd)*($this->$donh22b+$this->$tofz161);}$this->$vxexcb=$cmio1e6;$mhln1fd=$this->$byxc1fe;$ekxre2=$this->$aocw22c-$tqeu1e4;$this->$utax22a=$this->$aocw22c-$tqeu1e4;$twgj1ee=0;}$this->hvwc1f2($this->$liux1e9,$this->$ltzi1ed,$xyga1e7,$ntzn1df,$akln1de,false,$phsu1e8,$yxch1e0);}else{$this->ltoa238($bmtp1ff[0],$bmtp1ff[18]);if($this->$hwinb6!=$abcr1eb){if(($this->$hwinb6-$abcr1eb)%2==1){$cmio1e6+=$this->$ikyp229;$this->$vxexcb=$cmio1e6;}$abcr1eb=$this->$hwinb6;$ekxre2=$this->$aohn104-$tqeu1e4;$this->$utax22a=$this->$aohn104-$tqeu1e4;$twgj1ee=0;}if($this->$byxc1fe!=$mhln1fd){if($this->$kmyq175==base64_decode('cnRs')){$cmio1e6-=($this->$byxc1fe-$mhln1fd)*($this->$donh22b+$this->$tofz161);}else{$cmio1e6+=($this->$byxc1fe-$mhln1fd)*($this->$donh22b+$this->$tofz161);}$this->$vxexcb=$cmio1e6;$mhln1fd=$this->$byxc1fe;$ekxre2=$this->$aocw22c-$tqeu1e4;$this->$utax22a=$this->$aocw22c-$tqeu1e4;$twgj1ee=0;}}}if($bqaa7a==($mocl1f3-1)){$this->qoom1f4(true);if($this->$hwinb6!=$abcr1eb){if(($this->$hwinb6-$abcr1eb)%2==1){$cmio1e6+=$this->$ikyp229;$this->$vxexcb=$cmio1e6;}$abcr1eb=$this->$hwinb6;$ekxre2=$this->$aohn104-$tqeu1e4;$this->$utax22a=$this->$aohn104-$tqeu1e4;$twgj1ee=0;}if($this->$byxc1fe!=$mhln1fd){if($this->$kmyq175==base64_decode('cnRs')){$cmio1e6-=($this->$byxc1fe-$mhln1fd)*($this->$donh22b+$this->$tofz161);}else{$cmio1e6+=($this->$byxc1fe-$mhln1fd)*($this->$donh22b+$this->$tofz161);}$this->$vxexcb=$cmio1e6;$mhln1fd=$this->$byxc1fe;$ekxre2=$this->$aocw22c-$tqeu1e4;$this->$utax22a=$this->$aocw22c-$tqeu1e4;$twgj1ee=0;}}$this->tmfj20b($this->$eenv167->pqih117(0,$this->$yqgg168));$this->chhp23f($this->$eenv167->pqih117(0,$this->$yqgg168));$this->zbel240($this->$eenv167->pqih117(255,$this->$yqgg168));$this->$ftza1ae='';$this->$ietq1d8='';$this->$tbpq1e2=false;$this->$kurk1e3=false;$this->$ywcva6=[];$this->$ftuxa0='';$this->$dumo1d7=[];$this->udvh204();$this->$tvtt8b=0x00;$this->$nahk1d6=[];$this->$vhrm1dc='';$this->$edwx1d4='';$this->$lvbj1d9='';$this->$bafe1d3='';$this->$payl1d5=$this->$enxb241;$this->jtzr242($this->$hrph243);if($this->$bwrva1){$this->lyhr1ec('',$this->$iwdqac[1][1][base64_decode('Y2VsbExpbmVIZWlnaHQ=')]);}else{if(isset($this->$nfem7c[$this->$hhln7d][base64_decode('bGluZV9oZWlnaHQ=')])&&$this->$nfem7c[$this->$hhln7d][base64_decode('bGluZV9oZWlnaHQ=')]){$this->lyhr1ec('',$this->$nfem7c[$this->$hhln7d][base64_decode('bGluZV9oZWlnaHQ=')]);}}$this->gtpl19();$this->$faig1db='';$this->$faig1db='';$this->$msmg203=false;$this->$fruo202=0;$this->garm244();$this->$cmtt245=false;$this->$qhts246=false;}$this->gfpr12();if((isset($this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVy')])||isset($this->$nfem7c[$this->$hhln7d][base64_decode('Ymdjb2xvcg==')])||isset($this->$nfem7c[$this->$hhln7d][base64_decode('Ym94X3NoYWRvdw==')]))&&$akln1de&&($this->$vxexcb!=$this->$utax22a)){$lccl247=$this->$vxexcb;if(isset($this->$nfem7c[$this->$hhln7d][base64_decode('c3RhcnRwYWdl')])&&$this->$nfem7c[$this->$hhln7d][base64_decode('c3RhcnRwYWdl')]!=$this->$hwinb6&&$akln1de!=1){$this->qnrye(base64_decode('cGFnZXRvcA=='),$akln1de);}elseif($akln1de!=1){$this->qnrye('',$akln1de);}$this->$vxexcb=$lccl247;$this->$vxexcb=$cmio1e6;}$this->rvmj201($this->$wrdu1f1,false);if($yxch1e0){$wpvv150=$this->$vxexcb-$czsc1e5;$this->$vxexcb=$czsc1e5;$this->$vxexcb=$cmio1e6;return $wpvv150;}}function tazzc($mwbm248,$nckx249,$nnot24a,$wypg176){if($mwbm248==base64_decode('ZGFzaGVk')&&(($wypg176==base64_decode('TA==')||$wypg176==base64_decode('Ug=='))||($wypg176==base64_decode('VA==')&&$nckx249!=base64_decode('cGFnZXRvcA==')&&!$nnot24a)||($wypg176==base64_decode('Qg==')&&$nckx249!=base64_decode('cGFnZWJvdHRvbQ==')))){$ztxa24b=2;$xzjj24c=1.5;$this->garm244($ztxa24b,($ztxa24b/$xzjj24c)+($this->$wjdv24d*2));}elseif($mwbm248==base64_decode('ZG90dGVk')||($wypg176==base64_decode('VA==')&&($nckx249==base64_decode('cGFnZXRvcA==')||$nnot24a))||($wypg176==base64_decode('Qg==')&&$nckx249==base64_decode('cGFnZWJvdHRvbQ=='))){$this->qamy24e(1);$this->dpnc24f(1);$this->garm244(0.001,($this->$wjdv24d*3));}}function iftcd($gdpgcd,$zlgud9=1){$this->mhap250($gdpgcd[base64_decode('dw==')]/$zlgud9);$this->chhp23f($gdpgcd[base64_decode('Yw==')]);if($gdpgcd[base64_decode('Yw==')][0]==5){$this->xchi251(ord($gdpgcd[base64_decode('Yw==')][4])/100,base64_decode('Tm9ybWFs'),false,base64_decode('Uw=='));}elseif($gdpgcd[base64_decode('Yw==')][0]==6){$this->xchi251(ord($gdpgcd[base64_decode('Yw==')][5])/100,base64_decode('Tm9ybWFs'),false,base64_decode('Uw=='));}}function qnrye($rjun252='',$akln1de=0,$lepu253=0){if($this->$tavmee){return;}if($this->$wzrh208){return;}$jgjdea=$this->$vxexcb;if(!$lepu253){$lepu253=$this->$hhln7d;}$trhy254=$uozl255=$jmuu256=$tkbl257=0;if(isset($this->$nfem7c[$lepu253][base64_decode('YmJfcGFpbnRlZA==')][$this->$hwinb6])&&$this->$nfem7c[$lepu253][base64_decode('YmJfcGFpbnRlZA==')][$this->$hwinb6]){return;}if(isset($this->$nfem7c[$lepu253][base64_decode('eDA=')])){$trhy254=$this->$nfem7c[$lepu253][base64_decode('eDA=')];}if(isset($this->$nfem7c[$lepu253][base64_decode('eTE=')])){$tkbl257=$this->$nfem7c[$lepu253][base64_decode('eTE=')];}if($tkbl257==0){if($rjun252==base64_decode('cGFnZWJvdHRvbQ==')){$tkbl257=$this->$vxexcb-$this->$aohn104;}else{$tkbl257=$this->$vxexcb;}}$vlep258=(isset($this->$nfem7c[$lepu253][base64_decode('c3RhcnRwYWdl')])&&$this->$nfem7c[$lepu253][base64_decode('c3RhcnRwYWdl')]!=$this->$hwinb6);if(isset($this->$nfem7c[$lepu253][base64_decode('eTA=')])){$jmuu256=$this->$nfem7c[$lepu253][base64_decode('eTA=')];}$sprqe4=$tkbl257-$jmuu256;$tpmge3=$this->$nfem7c[$lepu253][base64_decode('d2lkdGg=')];$uozl255=$trhy254+$tpmge3;$dilx259=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')];$pfbq25a=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')];$xbiu25b=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')];$enxs25c=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')];if(!$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')]||$rjun252==base64_decode('cGFnZXRvcA==')||$vlep258){$dilx259=0;}if(!$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')]||$akln1de==1||$rjun252==base64_decode('cGFnZWJvdHRvbQ==')){$pfbq25a=0;}$wxls25d=0;$jtwy25e=0;$fjxv25f=0;$ibqp260=0;$twma261=0;$ggak262=0;$ihxk263=0;$isvf264=0;$qitx265=false;if(isset($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JhZGl1c19UTF9I')])){$wxls25d=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JhZGl1c19UTF9I')];$qitx265=true;}if(isset($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JhZGl1c19UTF9W')])){$jtwy25e=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JhZGl1c19UTF9W')];$qitx265=true;}if(isset($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JhZGl1c19UUl9I')])){$fjxv25f=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JhZGl1c19UUl9I')];$qitx265=true;}if(isset($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JhZGl1c19UUl9W')])){$ibqp260=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JhZGl1c19UUl9W')];$qitx265=true;}if(isset($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JhZGl1c19CUl9I')])){$ihxk263=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JhZGl1c19CUl9I')];$qitx265=true;}if(isset($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JhZGl1c19CUl9W')])){$isvf264=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JhZGl1c19CUl9W')];$qitx265=true;}if(isset($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JhZGl1c19CTF9I')])){$twma261=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JhZGl1c19CTF9I')];$qitx265=true;}if(isset($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JhZGl1c19CTF9W')])){$ggak262=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JhZGl1c19CTF9W')];$qitx265=true;}if(!$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')]||$rjun252==base64_decode('cGFnZXRvcA==')||$vlep258){$wxls25d=0;$jtwy25e=0;$fjxv25f=0;$ibqp260=0;}if(!$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')]||$akln1de==1||$rjun252==base64_decode('cGFnZWJvdHRvbQ==')){$twma261=0;$ggak262=0;$ihxk263=0;$isvf264=0;}if($wxls25d<min($xbiu25b,$dilx259)){$wxls25d=$jtwy25e=0;}if($jtwy25e<min($xbiu25b,$dilx259)){$jtwy25e=$wxls25d=0;}if($fjxv25f<min($enxs25c,$dilx259)){$fjxv25f=$ibqp260=0;}if($ibqp260<min($enxs25c,$dilx259)){$ibqp260=$fjxv25f=0;}if($twma261<min($xbiu25b,$pfbq25a)){$twma261=$ggak262=0;}if($ggak262<min($xbiu25b,$pfbq25a)){$ggak262=$twma261=0;}if($ihxk263<min($enxs25c,$pfbq25a)){$ihxk263=$isvf264=0;}if($isvf264<min($enxs25c,$pfbq25a)){$isvf264=$ihxk263=0;}$bymq15b=min($sprqe4/($jtwy25e+$ggak262+0.001),$sprqe4/($ibqp260+$isvf264+0.001),$tpmge3/($wxls25d+$fjxv25f+0.001),$tpmge3/($twma261+$ihxk263+0.001));if($bymq15b<1){$wxls25d*=$bymq15b;$jtwy25e*=$bymq15b;$fjxv25f*=$bymq15b;$ibqp260*=$bymq15b;$twma261*=$bymq15b;$ggak262*=$bymq15b;$ihxk263*=$bymq15b;$isvf264*=$bymq15b;}$bsvi266=$this->$eenv167->pqih117(255,$this->$yqgg168);for($nnsz13b=0;$nnsz13b<=$lepu253;$nnsz13b++){if($this->$nfem7c[$nnsz13b][base64_decode('Ymdjb2xvcg==')]){$bsvi266=$this->$nfem7c[$nnsz13b][base64_decode('Ymdjb2xvcmFycmF5')];}}if(isset($this->$nfem7c[$lepu253][base64_decode('eTA=')])&&$this->$nfem7c[$lepu253][base64_decode('eTA=')]){$jmuu256=$this->$nfem7c[$lepu253][base64_decode('eTA=')];}$sprqe4=$tkbl257-$jmuu256;$tpmge3=$this->$nfem7c[$lepu253][base64_decode('d2lkdGg=')];if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')]&&$rjun252!=base64_decode('cGFnZXRvcA==')&&!$vlep258){$lamd267=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')];$zhev268='';$dmuz269=0;$xolh26a=0;if(isset($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZ2VuZA==')])&&$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZ2VuZA==')]){$zhev268=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZ2VuZA==')];$cgkt26b=$zhev268[0]=ltrim($zhev268[0]);if(!empty($zhev268[18])){$this->$vvdq8f->ehxz99($zhev268[18],true,false);}$this->nscn1ef($zhev268[4],$zhev268[2],$zhev268[11]);if(isset($zhev268[3])&&$zhev268[3]){$lfmz20a=$zhev268[3];$this->tmfj20b($lfmz20a);}$czjp26c=$this->njji9b($cgkt26b,true,$zhev268[18],$zhev268[8]);$aylceb=$this->$vxexcb;$jgjdea=$this->$vxexcb;$ychz26d=$this->$conw84;$qaqi26e=$this->$jvue1af;$hzra26f=$this->$yoib1b0;$this->$vxexcb=$jmuu256-$this->$bfpt118/2+$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')]/2;$this->$vxexcb=$trhy254+$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19sZWZ0')]+$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')];$mjen270=0.2*$this->$bfpt118;$dmuz269=$this->$vxexcb-$mjen270;$xolh26a=$this->$vxexcb+$czjp26c+$mjen270;$this->ljru4c($cgkt26b,$this->$nfem7c[$lepu253][base64_decode('ZGlyZWN0aW9u')],$zhev268[18]);$bodj271='';$this->rstt272($czjp26c,$this->$bfpt118,$cgkt26b,'',0,base64_decode('Qw=='),$bodj271,'',0,0,0,base64_decode('TQ=='),$bodj271,false,$zhev268[18],$zhev268[8]);$this->$vxexcb=$aylceb;$this->$vxexcb=$jgjdea;$this->nscn1ef($ychz26d,$hzra26f,$qaqi26e);$this->tmfj20b($this->$eenv167->pqih117(0,$this->$yqgg168));}if(isset($lamd267[base64_decode('cw==')])&&$lamd267[base64_decode('cw==')]){if(!$qitx265&&$lamd267[base64_decode('c3R5bGU=')]!=base64_decode('ZG90dGVk')&&$lamd267[base64_decode('c3R5bGU=')]!=base64_decode('ZGFzaGVk')){$this->$kbxm14c->mbha14d(base64_decode('cQ=='));$this->mhap250(0);$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($trhy254)*Mpdf::SCALE,($this->$vxexcb-($jmuu256))*Mpdf::SCALE));$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$xbiu25b)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$dilx259))*Mpdf::SCALE));$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$tpmge3-$enxs25c)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$dilx259))*Mpdf::SCALE));$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$tpmge3)*Mpdf::SCALE,($this->$vxexcb-($jmuu256))*Mpdf::SCALE));$this->$kbxm14c->mbha14d(base64_decode('IGggVyBuIA=='));}$this->iftcd($lamd267);if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG90dGVk')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZGFzaGVk')){$dmuz269-=$dilx259/2;$xolh26a+=$dilx259/2;$this->tazzc($lamd267[base64_decode('c3R5bGU=')],$rjun252,$vlep258,base64_decode('VA=='));}elseif(($jtwy25e&&$wxls25d)||($ibqp260&&$fjxv25f)||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('c29saWQ=')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$this->qamy24e(0);$this->dpnc24f(0);}$vopwa9='';if($fjxv25f&&$ibqp260){$vopwa9.=($this->ttwtf($trhy254+$tpmge3-$fjxv25f,$jmuu256+$ibqp260,$fjxv25f-$dilx259/2,$ibqp260-$dilx259/2,1,2,true)).base64_decode('Cg==');}else{if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('c29saWQ=')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($trhy254+$tpmge3)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($dilx259/2)))*Mpdf::SCALE)).base64_decode('Cg==');}else{$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($trhy254+$tpmge3-($dilx259/2))*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($dilx259/2)))*Mpdf::SCALE)).base64_decode('Cg==');}}if($wxls25d&&$jtwy25e){if($zhev268){if($xolh26a<($trhy254+$tpmge3-$fjxv25f)){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),$xolh26a*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($dilx259/2)))*Mpdf::SCALE)).base64_decode('Cg==');}if($dmuz269>($trhy254+$wxls25d)){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),$dmuz269*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($dilx259/2)))*Mpdf::SCALE)).base64_decode('Cg==');$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$wxls25d)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($dilx259/2)))*Mpdf::SCALE).base64_decode('Cg=='));}else{$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($trhy254+$wxls25d)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($dilx259/2)))*Mpdf::SCALE)).base64_decode('Cg==');}}else{$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$wxls25d)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($dilx259/2)))*Mpdf::SCALE)).base64_decode('Cg==');}$vopwa9.=($this->ttwtf($trhy254+$wxls25d,$jmuu256+$jtwy25e,$wxls25d-$dilx259/2,$jtwy25e-$dilx259/2,2,1)).base64_decode('Cg==');}else{if($zhev268){if($xolh26a<($trhy254+$tpmge3)){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),$xolh26a*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($dilx259/2)))*Mpdf::SCALE)).base64_decode('Cg==');}if($dmuz269>($trhy254)){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),$dmuz269*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($dilx259/2)))*Mpdf::SCALE)).base64_decode('Cg==');if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('c29saWQ=')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($dilx259/2)))*Mpdf::SCALE)).base64_decode('Cg==');}else{$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+($dilx259/2))*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($dilx259/2)))*Mpdf::SCALE)).base64_decode('Cg==');}}elseif($lamd267[base64_decode('c3R5bGU=')]==base64_decode('c29saWQ=')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($trhy254)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($dilx259/2)))*Mpdf::SCALE)).base64_decode('Cg==');}else{$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($trhy254+$dilx259/2)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($dilx259/2)))*Mpdf::SCALE)).base64_decode('Cg==');}}elseif($lamd267[base64_decode('c3R5bGU=')]==base64_decode('c29saWQ=')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($dilx259/2)))*Mpdf::SCALE)).base64_decode('Cg==');}else{$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+($dilx259/2))*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($dilx259/2)))*Mpdf::SCALE)).base64_decode('Cg==');}}$vopwa9.=base64_decode('Uw==').base64_decode('Cg==');$this->$kbxm14c->mbha14d($vopwa9);if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$this->mhap250($lamd267[base64_decode('dw==')]/3);$this->chhp23f($bsvi266);$this->$kbxm14c->mbha14d($vopwa9);}if(!$qitx265&&$lamd267[base64_decode('c3R5bGU=')]!=base64_decode('ZG90dGVk')&&$lamd267[base64_decode('c3R5bGU=')]!=base64_decode('ZGFzaGVk')){$this->$kbxm14c->mbha14d(base64_decode('UQ=='));}$this->mhap250(0.1);$this->chhp23f($this->$eenv167->pqih117(0,$this->$yqgg168));$this->qamy24e(2);$this->dpnc24f(2);$this->garm244();}}if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')]&&$akln1de!=1&&$rjun252!=base64_decode('cGFnZWJvdHRvbQ==')){$lamd267=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')];if(isset($lamd267[base64_decode('cw==')])&&$lamd267[base64_decode('cw==')]){if(!$qitx265&&$lamd267[base64_decode('c3R5bGU=')]!=base64_decode('ZG90dGVk')&&$lamd267[base64_decode('c3R5bGU=')]!=base64_decode('ZGFzaGVk')){$this->$kbxm14c->mbha14d(base64_decode('cQ=='));$this->mhap250(0);$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($trhy254)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4))*Mpdf::SCALE));$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$xbiu25b)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4-$pfbq25a))*Mpdf::SCALE));$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$tpmge3-$enxs25c)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4-$pfbq25a))*Mpdf::SCALE));$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$tpmge3)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4))*Mpdf::SCALE));$this->$kbxm14c->mbha14d(base64_decode('IGggVyBuIA=='));}$this->iftcd($lamd267);if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG90dGVk')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZGFzaGVk')){$this->tazzc($lamd267[base64_decode('c3R5bGU=')],$rjun252,$vlep258,base64_decode('Qg=='));}elseif(($ggak262&&$twma261)||($isvf264&&$ihxk263)||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('c29saWQ=')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$this->qamy24e(0);$this->dpnc24f(0);}$vopwa9='';if($twma261&&$ggak262){$vopwa9.=($this->ttwtf($trhy254+$twma261,$jmuu256+$sprqe4-$ggak262,$twma261-$pfbq25a/2,$ggak262-$pfbq25a/2,3,2,true)).base64_decode('Cg==');}else{if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('c29saWQ=')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($trhy254)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4-($pfbq25a/2)))*Mpdf::SCALE)).base64_decode('Cg==');}else{$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($trhy254+($pfbq25a/2))*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4-($pfbq25a/2)))*Mpdf::SCALE)).base64_decode('Cg==');}}if($ihxk263&&$isvf264){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$tpmge3-($pfbq25a/2)-$ihxk263)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4-($pfbq25a/2)))*Mpdf::SCALE)).base64_decode('Cg==');$vopwa9.=($this->ttwtf($trhy254+$tpmge3-$ihxk263,$jmuu256+$sprqe4-$isvf264,$ihxk263-$pfbq25a/2,$isvf264-$pfbq25a/2,4,1)).base64_decode('Cg==');}else{if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('c29saWQ=')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$tpmge3)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4-($pfbq25a/2)))*Mpdf::SCALE)).base64_decode('Cg==');}else{$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$tpmge3-($pfbq25a/2))*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4-($pfbq25a/2)))*Mpdf::SCALE)).base64_decode('Cg==');}}$vopwa9.=base64_decode('Uw==').base64_decode('Cg==');$this->$kbxm14c->mbha14d($vopwa9);if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$this->mhap250($lamd267[base64_decode('dw==')]/3);$this->chhp23f($bsvi266);$this->$kbxm14c->mbha14d($vopwa9);}if(!$qitx265&&$lamd267[base64_decode('c3R5bGU=')]!=base64_decode('ZG90dGVk')&&$lamd267[base64_decode('c3R5bGU=')]!=base64_decode('ZGFzaGVk')){$this->$kbxm14c->mbha14d(base64_decode('UQ=='));}$this->mhap250(0.1);$this->chhp23f($this->$eenv167->pqih117(0,$this->$yqgg168));$this->qamy24e(2);$this->dpnc24f(2);$this->garm244();}}if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')]){$lamd267=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')];if(isset($lamd267[base64_decode('cw==')])&&$lamd267[base64_decode('cw==')]){if(!$qitx265&&$lamd267[base64_decode('c3R5bGU=')]!=base64_decode('ZG90dGVk')&&$lamd267[base64_decode('c3R5bGU=')]!=base64_decode('ZGFzaGVk')){$this->$kbxm14c->mbha14d(base64_decode('cQ=='));$this->mhap250(0);$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($trhy254)*Mpdf::SCALE,($this->$vxexcb-($jmuu256))*Mpdf::SCALE));$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$xbiu25b)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$dilx259))*Mpdf::SCALE));$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$xbiu25b)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4-$pfbq25a))*Mpdf::SCALE));$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4))*Mpdf::SCALE));$this->$kbxm14c->mbha14d(base64_decode('IGggVyBuIA=='));}$this->iftcd($lamd267);if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG90dGVk')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZGFzaGVk')){$this->tazzc($lamd267[base64_decode('c3R5bGU=')],$rjun252,$vlep258,base64_decode('TA=='));}elseif(($jtwy25e&&$wxls25d)||($ggak262&&$twma261)||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('c29saWQ=')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$this->qamy24e(0);$this->dpnc24f(0);}$vopwa9='';if($jtwy25e&&$wxls25d){$vopwa9.=($this->ttwtf($trhy254+$wxls25d,$jmuu256+$jtwy25e,$wxls25d-$xbiu25b/2,$jtwy25e-$xbiu25b/2,2,2,true)).base64_decode('Cg==');}else{if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('c29saWQ=')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($trhy254+($xbiu25b/2))*Mpdf::SCALE,($this->$vxexcb-($jmuu256))*Mpdf::SCALE)).base64_decode('Cg==');}else{$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($trhy254+($xbiu25b/2))*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($xbiu25b/2)))*Mpdf::SCALE)).base64_decode('Cg==');}}if($ggak262&&$twma261){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+($xbiu25b/2))*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4-($xbiu25b/2)-$ggak262))*Mpdf::SCALE)).base64_decode('Cg==');$vopwa9.=($this->ttwtf($trhy254+$twma261,$jmuu256+$sprqe4-$ggak262,$twma261-$xbiu25b/2,$ggak262-$xbiu25b/2,3,1)).base64_decode('Cg==');}else{if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('c29saWQ=')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+($xbiu25b/2))*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4))*Mpdf::SCALE)).base64_decode('Cg==');}else{$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+($xbiu25b/2))*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4-($xbiu25b/2)))*Mpdf::SCALE)).base64_decode('Cg==');}}$vopwa9.=base64_decode('Uw==').base64_decode('Cg==');$this->$kbxm14c->mbha14d($vopwa9);if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$this->mhap250($lamd267[base64_decode('dw==')]/3);$this->chhp23f($bsvi266);$this->$kbxm14c->mbha14d($vopwa9);}if(!$qitx265&&$lamd267[base64_decode('c3R5bGU=')]!=base64_decode('ZG90dGVk')&&$lamd267[base64_decode('c3R5bGU=')]!=base64_decode('ZGFzaGVk')){$this->$kbxm14c->mbha14d(base64_decode('UQ=='));}$this->mhap250(0.1);$this->chhp23f($this->$eenv167->pqih117(0,$this->$yqgg168));$this->qamy24e(2);$this->dpnc24f(2);$this->garm244();}}if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JpZ2h0')]){$lamd267=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JpZ2h0')];if(isset($lamd267[base64_decode('cw==')])&&$lamd267[base64_decode('cw==')]){if(!$qitx265&&$lamd267[base64_decode('c3R5bGU=')]!=base64_decode('ZG90dGVk')&&$lamd267[base64_decode('c3R5bGU=')]!=base64_decode('ZGFzaGVk')){$this->$kbxm14c->mbha14d(base64_decode('cQ=='));$this->mhap250(0);$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($trhy254+$tpmge3)*Mpdf::SCALE,($this->$vxexcb-($jmuu256))*Mpdf::SCALE));$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$tpmge3-$enxs25c)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$dilx259))*Mpdf::SCALE));$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$tpmge3-$enxs25c)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4-$pfbq25a))*Mpdf::SCALE));$this->$kbxm14c->mbha14d(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$tpmge3)*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4))*Mpdf::SCALE));$this->$kbxm14c->mbha14d(base64_decode('IGggVyBuIA=='));}$this->iftcd($lamd267);if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG90dGVk')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZGFzaGVk')){$this->tazzc($lamd267[base64_decode('c3R5bGU=')],$rjun252,$vlep258,base64_decode('Ug=='));}elseif(($ibqp260&&$fjxv25f)||($isvf264&&$ihxk263)||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('c29saWQ=')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$this->qamy24e(0);$this->dpnc24f(0);}$vopwa9='';if($isvf264&&$ihxk263){$vopwa9.=($this->ttwtf($trhy254+$tpmge3-$ihxk263,$jmuu256+$sprqe4-$isvf264,$ihxk263-$enxs25c/2,$isvf264-$enxs25c/2,4,2,true)).base64_decode('Cg==');}else{if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('c29saWQ=')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($trhy254+$tpmge3-($enxs25c/2))*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4))*Mpdf::SCALE)).base64_decode('Cg==');}else{$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($trhy254+$tpmge3-($enxs25c/2))*Mpdf::SCALE,($this->$vxexcb-($jmuu256+$sprqe4-($enxs25c/2)))*Mpdf::SCALE)).base64_decode('Cg==');}}if($ibqp260&&$fjxv25f){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$tpmge3-($enxs25c/2))*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($enxs25c/2)+$ibqp260))*Mpdf::SCALE)).base64_decode('Cg==');$vopwa9.=($this->ttwtf($trhy254+$tpmge3-$fjxv25f,$jmuu256+$ibqp260,$fjxv25f-$enxs25c/2,$ibqp260-$enxs25c/2,1,1)).base64_decode('Cg==');}else{if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('c29saWQ=')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$tpmge3-($enxs25c/2))*Mpdf::SCALE,($this->$vxexcb-($jmuu256))*Mpdf::SCALE)).base64_decode('Cg==');}else{$vopwa9.=(sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($trhy254+$tpmge3-($enxs25c/2))*Mpdf::SCALE,($this->$vxexcb-($jmuu256+($enxs25c/2)))*Mpdf::SCALE)).base64_decode('Cg==');}}$vopwa9.=base64_decode('Uw==').base64_decode('Cg==');$this->$kbxm14c->mbha14d($vopwa9);if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$this->mhap250($lamd267[base64_decode('dw==')]/3);$this->chhp23f($bsvi266);$this->$kbxm14c->mbha14d($vopwa9);}if(!$qitx265&&$lamd267[base64_decode('c3R5bGU=')]!=base64_decode('ZG90dGVk')&&$lamd267[base64_decode('c3R5bGU=')]!=base64_decode('ZGFzaGVk')){$this->$kbxm14c->mbha14d(base64_decode('UQ=='));}$this->mhap250(0.1);$this->chhp23f($this->$eenv167->pqih117(0,$this->$yqgg168));$this->qamy24e(2);$this->dpnc24f(2);$this->garm244();}}$this->garm244();$this->$vxexcb=$jgjdea;if($this->$tavmee||$this->$hped207||$this->$wzrh208){return;}$guax273=$trhy254;$zyzf274=$uozl255;$ygqk275=$jmuu256;$bhzq276=$tkbl257;if(isset($this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZF9jbGlw')])&&$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZF9jbGlw')]==base64_decode('cGFkZGluZy1ib3g=')){$ccov277=max(0,$wxls25d-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]);$odrf278=max(0,$jtwy25e-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')]);$zsqh279=max(0,$fjxv25f-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')]);$sdim27a=max(0,$ibqp260-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')]);$vdbv27b=max(0,$twma261-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]);$flxl27c=max(0,$ggak262-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')]);$oopz27d=max(0,$ihxk263-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')]);$iehh27e=max(0,$isvf264-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')]);$guax273+=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')];$zyzf274-=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')];if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')]&&$rjun252!=base64_decode('cGFnZXRvcA==')&&!$vlep258){$ygqk275+=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')];}if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')]&&$akln1de!=1&&$rjun252!=base64_decode('cGFnZWJvdHRvbQ==')){$bhzq276-=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')];}}elseif(isset($this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZF9jbGlw')])&&$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZF9jbGlw')]==base64_decode('Y29udGVudC1ib3g=')){$ccov277=max(0,$wxls25d-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]-$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19sZWZ0')]);$odrf278=max(0,$jtwy25e-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')]-$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ190b3A=')]);$zsqh279=max(0,$fjxv25f-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')]-$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19yaWdodA==')]);$sdim27a=max(0,$ibqp260-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')]-$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ190b3A=')]);$vdbv27b=max(0,$twma261-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]-$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19sZWZ0')]);$flxl27c=max(0,$ggak262-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')]-$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19ib3R0b20=')]);$oopz27d=max(0,$ihxk263-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')]-$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19yaWdodA==')]);$iehh27e=max(0,$isvf264-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')]-$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19ib3R0b20=')]);$guax273+=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]+$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19sZWZ0')];$zyzf274-=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')]+$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19yaWdodA==')];if(($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')]||$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ190b3A=')])&&$rjun252!=base64_decode('cGFnZXRvcA==')&&!$vlep258){$ygqk275+=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')]+$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ190b3A=')];}if(($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')]||$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19ib3R0b20=')])&&$akln1de!=1&&$rjun252!=base64_decode('cGFnZWJvdHRvbQ==')){$bhzq276-=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')]+$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19ib3R0b20=')];}}else{$ccov277=$wxls25d;$odrf278=$jtwy25e;$zsqh279=$fjxv25f;$sdim27a=$ibqp260;$vdbv27b=$twma261;$flxl27c=$ggak262;$oopz27d=$ihxk263;$iehh27e=$isvf264;}$vopwa9=base64_decode('IHEgMCB3IA==');$vopwa9.=sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($guax273+$ccov277)*Mpdf::SCALE,($this->$vxexcb-$ygqk275)*Mpdf::SCALE);if($ccov277||$odrf278){$vopwa9.=$this->ttwtf($guax273+$ccov277,$ygqk275+$odrf278,$ccov277,$odrf278,2);}$vopwa9.=sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($guax273)*Mpdf::SCALE,($this->$vxexcb-($bhzq276-$flxl27c))*Mpdf::SCALE);if($vdbv27b||$flxl27c){$vopwa9.=$this->ttwtf($guax273+$vdbv27b,$bhzq276-$flxl27c,$vdbv27b,$flxl27c,3);}$vopwa9.=sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($zyzf274-$oopz27d)*Mpdf::SCALE,($this->$vxexcb-($bhzq276))*Mpdf::SCALE);if($oopz27d||$iehh27e){$vopwa9.=$this->ttwtf($zyzf274-$oopz27d,$bhzq276-$iehh27e,$oopz27d,$iehh27e,4);}$vopwa9.=sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($zyzf274)*Mpdf::SCALE,($this->$vxexcb-($ygqk275+$sdim27a))*Mpdf::SCALE);if($zsqh279||$sdim27a){$vopwa9.=$this->ttwtf($zyzf274-$zsqh279,$ygqk275+$sdim27a,$zsqh279,$sdim27a,1);}$vopwa9.=sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($guax273+$ccov277)*Mpdf::SCALE,($this->$vxexcb-$ygqk275)*Mpdf::SCALE);$plcz27f='';if(isset($this->$nfem7c[$lepu253][base64_decode('Ym94X3NoYWRvdw==')])&&$this->$nfem7c[$lepu253][base64_decode('Ym94X3NoYWRvdw==')]&&$sprqe4>0){foreach($this->$nfem7c[$lepu253][base64_decode('Ym94X3NoYWRvdw==')]as $iuzj280){if($iuzj280[base64_decode('Y29s')][0]==1){$skzk281=base64_decode('R3JheQ==');if($iuzj280[base64_decode('Y29s')][2]==1){$liej282=base64_decode('MQ==').$iuzj280[base64_decode('Y29s')][1].base64_decode('MQ==').$iuzj280[base64_decode('Y29s')][3];}else{$liej282=base64_decode('MQ==').$iuzj280[base64_decode('Y29s')][1].base64_decode('MQ==').chr(100);}$cpng283=base64_decode('MQ==').$iuzj280[base64_decode('Y29s')][1].base64_decode('MQ==').chr(0);}elseif($iuzj280[base64_decode('Y29s')][0]==4){$skzk281=base64_decode('Q01ZSw==');$liej282=base64_decode('Ng==').$iuzj280[base64_decode('Y29s')][1].$iuzj280[base64_decode('Y29s')][2].$iuzj280[base64_decode('Y29s')][3].$iuzj280[base64_decode('Y29s')][4].chr(100);$cpng283=base64_decode('Ng==').$iuzj280[base64_decode('Y29s')][1].$iuzj280[base64_decode('Y29s')][2].$iuzj280[base64_decode('Y29s')][3].$iuzj280[base64_decode('Y29s')][4].chr(0);}elseif($iuzj280[base64_decode('Y29s')][0]==5){$skzk281=base64_decode('UkdC');$liej282=base64_decode('NQ==').$iuzj280[base64_decode('Y29s')][1].$iuzj280[base64_decode('Y29s')][2].$iuzj280[base64_decode('Y29s')][3].$iuzj280[base64_decode('Y29s')][4];$cpng283=base64_decode('NQ==').$iuzj280[base64_decode('Y29s')][1].$iuzj280[base64_decode('Y29s')][2].$iuzj280[base64_decode('Y29s')][3].chr(0);}elseif($iuzj280[base64_decode('Y29s')][0]==6){$skzk281=base64_decode('Q01ZSw==');$liej282=base64_decode('Ng==').$iuzj280[base64_decode('Y29s')][1].$iuzj280[base64_decode('Y29s')][2].$iuzj280[base64_decode('Y29s')][3].$iuzj280[base64_decode('Y29s')][4].$iuzj280[base64_decode('Y29s')][5];$cpng283=base64_decode('Ng==').$iuzj280[base64_decode('Y29s')][1].$iuzj280[base64_decode('Y29s')][2].$iuzj280[base64_decode('Y29s')][3].$iuzj280[base64_decode('Y29s')][4].chr(0);}else{$skzk281=base64_decode('UkdC');$liej282=base64_decode('NQ==').$iuzj280[base64_decode('Y29s')][1].$iuzj280[base64_decode('Y29s')][2].$iuzj280[base64_decode('Y29s')][3].chr(100);$cpng283=base64_decode('NQ==').$iuzj280[base64_decode('Y29s')][1].$iuzj280[base64_decode('Y29s')][2].$iuzj280[base64_decode('Y29s')][3].chr(0);}$plcz27f.=$vopwa9;$plcz27f.=sprintf(base64_decode('MCAlLjNGIG0gJS4zRiAlLjNGIGwg'),$this->$vxexcb*Mpdf::SCALE,$this->$vxexcb*Mpdf::SCALE,$this->$vxexcb*Mpdf::SCALE);$plcz27f.=sprintf(base64_decode('JS4zRiAwIGwgMCAwIGwgMCAlLjNGIGwg'),$this->$vxexcb*Mpdf::SCALE,$this->$vxexcb*Mpdf::SCALE);$plcz27f.=base64_decode('VyBu').base64_decode('Cg==');$iuzj280[base64_decode('Ymx1cg==')]=abs($iuzj280[base64_decode('Ymx1cg==')]);if(-$iuzj280[base64_decode('c3ByZWFk')]+$iuzj280[base64_decode('Ymx1cg==')]/2>min($tpmge3/2,$sprqe4/2)){$iuzj280[base64_decode('c3ByZWFk')]=$iuzj280[base64_decode('Ymx1cg==')]/2-min($tpmge3/2,$sprqe4/2)+0.01;}if($iuzj280[base64_decode('eA==')]||$iuzj280[base64_decode('eQ==')]){$plcz27f.=sprintf(base64_decode('IHEgMSAwIDAgMSAlLjRGICUuNEYgY20='),$iuzj280[base64_decode('eA==')]*Mpdf::SCALE,-$iuzj280[base64_decode('eQ==')]*Mpdf::SCALE).base64_decode('Cg==');}$plcz27f.=base64_decode('IHEgMCB3IA==');$plcz27f.=$this->zbel240($liej282,true).base64_decode('Cg==');if($liej282[0]==5&&ord($liej282[4])<100){$plcz27f.=$this->xchi251(ord($liej282[4])/100,base64_decode('Tm9ybWFs'),true,base64_decode('Rg==')).base64_decode('Cg==');}elseif($liej282[0]==6&&ord($liej282[5])<100){$plcz27f.=$this->xchi251(ord($liej282[5])/100,base64_decode('Tm9ybWFs'),true,base64_decode('Rg==')).base64_decode('Cg==');}elseif($liej282[0]==1&&$liej282[2]==1&&ord($liej282[3])<100){$plcz27f.=$this->xchi251(ord($liej282[3])/100,base64_decode('Tm9ybWFs'),true,base64_decode('Rg==')).base64_decode('Cg==');}$cnch284=0.551784;$nvne285=0.551784;$eyyi286=$iuzj280[base64_decode('c3ByZWFk')]+$iuzj280[base64_decode('Ymx1cg==')]/2;$catk287=$iuzj280[base64_decode('c3ByZWFk')]-$iuzj280[base64_decode('Ymx1cg==')]/2;$xwah21c=$iuzj280[base64_decode('Ymx1cg==')];$dmtc288=$trhy254-$eyyi286;$ctkq289=$jmuu256-$eyyi286;$hyul28a=$tpmge3+$eyyi286*2;$mhgn28b=$sprqe4+$eyyi286*2;$pppv28c=false;if(max($zsqh279,$ccov277,$oopz27d,$vdbv27b)>=$tpmge3+$catk287){$pppv28c=true;}if(max($sdim27a,$odrf278,$iehh27e,$flxl27c)>=$sprqe4+$catk287){$pppv28c=true;}$qvqd28d=$dmtc288+$hyul28a-$eyyi286-$zsqh279;$loqn28e=$qvqd28d+($catk287+$zsqh279)*$cnch284;$lnjb28f=$ctkq289+$xwah21c;$atqh290=$dmtc288+$hyul28a-$eyyi286-$zsqh279;$qlxx291=$atqh290+($eyyi286+$zsqh279)*$cnch284;$hvqr292=$ctkq289;$lmmy293=$hvqr292+$xwah21c/2;$uzqy294=$dmtc288+$hyul28a;$tpgn295=$uzqy294-$xwah21c/2;$eiym296=$ctkq289+$eyyi286+$sdim27a;$dany297=$eiym296-($eyyi286+$sdim27a)*$cnch284;$zdhq298=$dmtc288+$hyul28a-$xwah21c;$wvpq299=$ctkq289+$eyyi286+$sdim27a;$mnbq29a=$wvpq299-($catk287+$sdim27a)*$cnch284;if(-$catk287>min($zsqh279,$sdim27a)||$pppv28c){$qvqd28d=$dmtc288+$hyul28a-$xwah21c;$loqn28e=$qvqd28d;$atqh290=$dmtc288+$hyul28a-$xwah21c;$qlxx291=$atqh290+$xwah21c*$nvne285;$eiym296=$ctkq289+$xwah21c;$dany297=$eiym296-$xwah21c*$nvne285;$wvpq299=$ctkq289+$xwah21c;$mnbq29a=$wvpq299;}$plcz27f.=sprintf(base64_decode('JS4zRiAlLjNGIG0g'),($qvqd28d)*Mpdf::SCALE,($this->$vxexcb-($lnjb28f))*Mpdf::SCALE);$plcz27f.=sprintf(base64_decode('JS4zRiAlLjNGICUuM0YgJS4zRiAlLjNGICUuM0YgYyA='),($loqn28e)*Mpdf::SCALE,($this->$vxexcb-($lnjb28f))*Mpdf::SCALE,($zdhq298)*Mpdf::SCALE,($this->$vxexcb-($mnbq29a))*Mpdf::SCALE,($zdhq298)*Mpdf::SCALE,($this->$vxexcb-($wvpq299))*Mpdf::SCALE);$lldj29b[0][base64_decode('Zg==')]=0;$lldj29b[0][base64_decode('cG9pbnRz')]=[$qvqd28d,$lnjb28f,$qvqd28d,$lnjb28f,$atqh290,$lmmy293,$atqh290,$hvqr292,$qlxx291,$hvqr292,$uzqy294,$dany297,$uzqy294,$eiym296,$tpgn295,$eiym296,$zdhq298,$wvpq299,$zdhq298,$wvpq299,$zdhq298,$mnbq29a,$loqn28e,$lnjb28f];$lldj29b[0][base64_decode('Y29sb3Jz')]=[$liej282,$cpng283,$cpng283,$liej282];$qvqd28d=$dmtc288+$hyul28a;$lnjb28f=$ctkq289+$eyyi286+$sdim27a;$atqh290=$dmtc288+$hyul28a-$xwah21c;$hvqr292=$ctkq289+$eyyi286+$sdim27a;$uzqy294=$dmtc288+$hyul28a-$xwah21c;$eiym296=$ctkq289+$mhgn28b-$eyyi286-$iehh27e;$zdhq298=$dmtc288+$hyul28a;$dtxd29c=$zdhq298-$xwah21c/2;$wvpq299=$ctkq289+$mhgn28b-$eyyi286-$iehh27e;if(-$catk287>min($zsqh279,$sdim27a)||$pppv28c){$lnjb28f=$ctkq289+$xwah21c;$hvqr292=$ctkq289+$xwah21c;}if(-$catk287>min($oopz27d,$iehh27e)||$pppv28c){$eiym296=$ctkq289+$mhgn28b-$xwah21c;$wvpq299=$ctkq289+$mhgn28b-$xwah21c;}$plcz27f.=sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($uzqy294)*Mpdf::SCALE,($this->$vxexcb-($eiym296))*Mpdf::SCALE);$lldj29b[1][base64_decode('Zg==')]=2;$lldj29b[1][base64_decode('cG9pbnRz')]=[$atqh290,$hvqr292,$uzqy294,$eiym296,$uzqy294,$eiym296,$uzqy294,$eiym296,$dtxd29c,$wvpq299,$zdhq298,$wvpq299,$zdhq298,$wvpq299,$qvqd28d,$lnjb28f];$lldj29b[1][base64_decode('Y29sb3Jz')]=[$liej282,$cpng283];$qvqd28d=$dmtc288+$hyul28a-$xwah21c;$lnjb28f=$ctkq289+$mhgn28b-$eyyi286-$iehh27e;$bftp29d=$lnjb28f+($catk287+$iehh27e)*$cnch284;$atqh290=$dmtc288+$hyul28a;$hvqr292=$ctkq289+$mhgn28b-$eyyi286-$iehh27e;$mfoi29e=$hvqr292+($eyyi286+$iehh27e)*$cnch284;$uzqy294=$dmtc288+$hyul28a-$eyyi286-$oopz27d;$adoy29f=$uzqy294+($eyyi286+$oopz27d)*$cnch284;$eiym296=$ctkq289+$mhgn28b;$vmeo2a0=$eiym296-$xwah21c/2;$zdhq298=$dmtc288+$hyul28a-$eyyi286-$oopz27d;$oijc2a1=$zdhq298+($catk287+$oopz27d)*$cnch284;$wvpq299=$ctkq289+$mhgn28b-$xwah21c;if(-$catk287>min($oopz27d,$iehh27e)||$pppv28c){$lnjb28f=$ctkq289+$mhgn28b-$xwah21c;$bftp29d=$lnjb28f;$hvqr292=$ctkq289+$mhgn28b-$xwah21c;$mfoi29e=$hvqr292+$xwah21c*$nvne285;$uzqy294=$dmtc288+$hyul28a-$xwah21c;$adoy29f=$uzqy294+$xwah21c*$nvne285;$zdhq298=$dmtc288+$hyul28a-$xwah21c;$oijc2a1=$zdhq298;}$plcz27f.=sprintf(base64_decode('JS4zRiAlLjNGICUuM0YgJS4zRiAlLjNGICUuM0YgYyA='),($qvqd28d)*Mpdf::SCALE,($this->$vxexcb-($bftp29d))*Mpdf::SCALE,($oijc2a1)*Mpdf::SCALE,($this->$vxexcb-($wvpq299))*Mpdf::SCALE,($zdhq298)*Mpdf::SCALE,($this->$vxexcb-($wvpq299))*Mpdf::SCALE);$lldj29b[2][base64_decode('Zg==')]=2;$lldj29b[2][base64_decode('cG9pbnRz')]=[$atqh290,$mfoi29e,$adoy29f,$eiym296,$uzqy294,$eiym296,$uzqy294,$vmeo2a0,$zdhq298,$wvpq299,$zdhq298,$wvpq299,$oijc2a1,$wvpq299,$qvqd28d,$bftp29d];$lldj29b[2][base64_decode('Y29sb3Jz')]=[$cpng283,$liej282];$qvqd28d=$dmtc288+$hyul28a-$eyyi286-$oopz27d;$lnjb28f=$ctkq289+$mhgn28b;$atqh290=$dmtc288+$hyul28a-$eyyi286-$oopz27d;$hvqr292=$ctkq289+$mhgn28b-$xwah21c;$uzqy294=$dmtc288+$eyyi286+$vdbv27b;$eiym296=$ctkq289+$mhgn28b-$xwah21c;$zdhq298=$dmtc288+$eyyi286+$vdbv27b;$wvpq299=$ctkq289+$mhgn28b;$qmfv2a2=$wvpq299-$xwah21c/2;if(-$catk287>min($oopz27d,$iehh27e)||$pppv28c){$qvqd28d=$dmtc288+$hyul28a-$xwah21c;$atqh290=$dmtc288+$hyul28a-$xwah21c;}if(-$catk287>min($vdbv27b,$flxl27c)||$pppv28c){$uzqy294=$dmtc288+$xwah21c;$zdhq298=$dmtc288+$xwah21c;}$plcz27f.=sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($uzqy294)*Mpdf::SCALE,($this->$vxexcb-($eiym296))*Mpdf::SCALE);$lldj29b[3][base64_decode('Zg==')]=2;$lldj29b[3][base64_decode('cG9pbnRz')]=[$atqh290,$hvqr292,$uzqy294,$eiym296,$uzqy294,$eiym296,$uzqy294,$eiym296,$zdhq298,$qmfv2a2,$zdhq298,$wvpq299,$zdhq298,$wvpq299,$qvqd28d,$lnjb28f];$lldj29b[3][base64_decode('Y29sb3Jz')]=[$liej282,$cpng283];$qvqd28d=$dmtc288+$eyyi286+$vdbv27b;$loqn28e=$qvqd28d-($catk287+$vdbv27b)*$cnch284;$lnjb28f=$ctkq289+$mhgn28b-$xwah21c;$atqh290=$dmtc288+$eyyi286+$vdbv27b;$qlxx291=$atqh290-($eyyi286+$vdbv27b)*$cnch284;$hvqr292=$ctkq289+$mhgn28b;$uzqy294=$dmtc288;$tpgn295=$uzqy294+$xwah21c/2;$eiym296=$ctkq289+$mhgn28b-$eyyi286-$flxl27c;$dany297=$eiym296+($eyyi286+$flxl27c)*$cnch284;$zdhq298=$dmtc288+$xwah21c;$wvpq299=$ctkq289+$mhgn28b-$eyyi286-$flxl27c;$mnbq29a=$wvpq299+($catk287+$flxl27c)*$cnch284;if(-$catk287>min($vdbv27b,$flxl27c)||$pppv28c){$qvqd28d=$dmtc288+$xwah21c;$loqn28e=$qvqd28d;$atqh290=$dmtc288+$xwah21c;$qlxx291=$atqh290-$xwah21c*$nvne285;$eiym296=$ctkq289+$mhgn28b-$xwah21c;$dany297=$eiym296+$xwah21c*$nvne285;$wvpq299=$ctkq289+$mhgn28b-$xwah21c;$mnbq29a=$wvpq299;}$plcz27f.=sprintf(base64_decode('JS4zRiAlLjNGICUuM0YgJS4zRiAlLjNGICUuM0YgYyA='),($loqn28e)*Mpdf::SCALE,($this->$vxexcb-($lnjb28f))*Mpdf::SCALE,($zdhq298)*Mpdf::SCALE,($this->$vxexcb-($mnbq29a))*Mpdf::SCALE,($zdhq298)*Mpdf::SCALE,($this->$vxexcb-($wvpq299))*Mpdf::SCALE);$lldj29b[4][base64_decode('Zg==')]=2;$lldj29b[4][base64_decode('cG9pbnRz')]=[$qlxx291,$hvqr292,$uzqy294,$dany297,$uzqy294,$eiym296,$tpgn295,$eiym296,$zdhq298,$wvpq299,$zdhq298,$wvpq299,$zdhq298,$mnbq29a,$loqn28e,$lnjb28f];$lldj29b[4][base64_decode('Y29sb3Jz')]=[$cpng283,$liej282];$qvqd28d=$dmtc288;$lnjb28f=$ctkq289+$mhgn28b-$eyyi286-$flxl27c;$atqh290=$dmtc288+$xwah21c;$hvqr292=$ctkq289+$mhgn28b-$eyyi286-$flxl27c;$uzqy294=$dmtc288+$xwah21c;$eiym296=$ctkq289+$eyyi286+$odrf278;$zdhq298=$dmtc288;$dtxd29c=$zdhq298+$xwah21c/2;$wvpq299=$ctkq289+$eyyi286+$odrf278;if(-$catk287>min($vdbv27b,$flxl27c)||$pppv28c){$lnjb28f=$ctkq289+$mhgn28b-$xwah21c;$hvqr292=$ctkq289+$mhgn28b-$xwah21c;}if(-$catk287>min($ccov277,$odrf278)||$pppv28c){$eiym296=$ctkq289+$xwah21c;$wvpq299=$ctkq289+$xwah21c;}$plcz27f.=sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($uzqy294)*Mpdf::SCALE,($this->$vxexcb-($eiym296))*Mpdf::SCALE);$lldj29b[5][base64_decode('Zg==')]=2;$lldj29b[5][base64_decode('cG9pbnRz')]=[$atqh290,$hvqr292,$uzqy294,$eiym296,$uzqy294,$eiym296,$uzqy294,$eiym296,$dtxd29c,$wvpq299,$zdhq298,$wvpq299,$zdhq298,$wvpq299,$qvqd28d,$lnjb28f];$lldj29b[5][base64_decode('Y29sb3Jz')]=[$liej282,$cpng283];$qvqd28d=$dmtc288+$xwah21c;$lnjb28f=$ctkq289+$eyyi286+$odrf278;$bftp29d=$lnjb28f-($catk287+$odrf278)*$cnch284;$atqh290=$dmtc288;$hvqr292=$ctkq289+$eyyi286+$odrf278;$mfoi29e=$hvqr292-($eyyi286+$odrf278)*$cnch284;$uzqy294=$dmtc288+$eyyi286+$ccov277;$adoy29f=$uzqy294-($eyyi286+$ccov277)*$cnch284;$eiym296=$ctkq289;$vmeo2a0=$eiym296+$xwah21c/2;$zdhq298=$dmtc288+$eyyi286+$ccov277;$oijc2a1=$zdhq298-($catk287+$ccov277)*$cnch284;$wvpq299=$ctkq289+$xwah21c;if(-$catk287>min($ccov277,$odrf278)||$pppv28c){$lnjb28f=$ctkq289+$xwah21c;$bftp29d=$lnjb28f;$hvqr292=$ctkq289+$xwah21c;$mfoi29e=$hvqr292-$xwah21c*$nvne285;$uzqy294=$dmtc288+$xwah21c;$adoy29f=$uzqy294-$xwah21c*$nvne285;$zdhq298=$dmtc288+$xwah21c;$oijc2a1=$zdhq298;}$plcz27f.=sprintf(base64_decode('JS4zRiAlLjNGICUuM0YgJS4zRiAlLjNGICUuM0YgYyA='),($qvqd28d)*Mpdf::SCALE,($this->$vxexcb-($bftp29d))*Mpdf::SCALE,($oijc2a1)*Mpdf::SCALE,($this->$vxexcb-($wvpq299))*Mpdf::SCALE,($zdhq298)*Mpdf::SCALE,($this->$vxexcb-($wvpq299))*Mpdf::SCALE);$lldj29b[6][base64_decode('Zg==')]=2;$lldj29b[6][base64_decode('cG9pbnRz')]=[$atqh290,$mfoi29e,$adoy29f,$eiym296,$uzqy294,$eiym296,$uzqy294,$vmeo2a0,$zdhq298,$wvpq299,$zdhq298,$wvpq299,$oijc2a1,$wvpq299,$qvqd28d,$bftp29d];$lldj29b[6][base64_decode('Y29sb3Jz')]=[$cpng283,$liej282];$qvqd28d=$dmtc288+$eyyi286+$ccov277;$lnjb28f=$ctkq289;$atqh290=$dmtc288+$eyyi286+$ccov277;$hvqr292=$ctkq289+$xwah21c;$uzqy294=$dmtc288+$hyul28a-$eyyi286-$zsqh279;$eiym296=$ctkq289+$xwah21c;$zdhq298=$dmtc288+$hyul28a-$eyyi286-$zsqh279;$wvpq299=$ctkq289;$qmfv2a2=$wvpq299+$xwah21c/2;if(-$catk287>min($ccov277,$odrf278)||$pppv28c){$qvqd28d=$dmtc288+$xwah21c;$atqh290=$dmtc288+$xwah21c;}if(-$catk287>min($zsqh279,$sdim27a)||$pppv28c){$uzqy294=$dmtc288+$hyul28a-$xwah21c;$zdhq298=$dmtc288+$hyul28a-$xwah21c;}$plcz27f.=sprintf(base64_decode('JS4zRiAlLjNGIGwg'),($uzqy294)*Mpdf::SCALE,($this->$vxexcb-($eiym296))*Mpdf::SCALE);$lldj29b[7][base64_decode('Zg==')]=2;$lldj29b[7][base64_decode('cG9pbnRz')]=[$atqh290,$hvqr292,$uzqy294,$eiym296,$uzqy294,$eiym296,$uzqy294,$eiym296,$zdhq298,$qmfv2a2,$zdhq298,$wvpq299,$zdhq298,$wvpq299,$qvqd28d,$lnjb28f];$lldj29b[7][base64_decode('Y29sb3Jz')]=[$liej282,$cpng283];$plcz27f.=base64_decode('IGggZiBRIA==').base64_decode('Cg==');if($xwah21c){$plcz27f.=$this->$csbt2a3->zqmp2a4($dmtc288,$ctkq289,$hyul28a,$mhgn28b,$lldj29b,$dmtc288,$dmtc288+$hyul28a,$ctkq289,$ctkq289+$mhgn28b,$skzk281,true);}if($iuzj280[base64_decode('eA==')]||$iuzj280[base64_decode('eQ==')]){$plcz27f.=base64_decode('IFE=').base64_decode('Cg==');}$plcz27f.=base64_decode('IFE=').base64_decode('Cg==');}}$vopwa9.=base64_decode('IFcgbiA=');if($this->$nfem7c[$lepu253][base64_decode('Ymdjb2xvcg==')]){$this->$mewvd5[$lepu253][]=[base64_decode('eA==')=>$trhy254,base64_decode('eQ==')=>$jmuu256,base64_decode('dw==')=>$tpmge3,base64_decode('aA==')=>$sprqe4,base64_decode('Y29s')=>$this->$nfem7c[$lepu253][base64_decode('Ymdjb2xvcmFycmF5')],base64_decode('Y2xpcHBhdGg=')=>$vopwa9,base64_decode('dmlzaWJpbGl0eQ==')=>$this->$tvgl2a5,base64_decode('c2hhZG93')=>$plcz27f,base64_decode('ei1pbmRleA==')=>$this->$cmks2a6,];}elseif($plcz27f){$this->$mewvd5[$lepu253][]=[base64_decode('eA==')=>0,base64_decode('eQ==')=>0,base64_decode('dw==')=>0,base64_decode('aA==')=>0,base64_decode('c2hhZG93b25seQ==')=>true,base64_decode('Y29s')=>'',base64_decode('Y2xpcHBhdGg=')=>'',base64_decode('dmlzaWJpbGl0eQ==')=>$this->$tvgl2a5,base64_decode('c2hhZG93')=>$plcz27f,base64_decode('ei1pbmRleA==')=>$this->$cmks2a6,];}if(isset($this->$nfem7c[$lepu253][base64_decode('Z3JhZGllbnQ=')])){$extx2a7=$this->$csbt2a3->kwxa2a8($this->$nfem7c[$lepu253][base64_decode('Z3JhZGllbnQ=')]);if($extx2a7){$lolm2a9=$trhy254;$nugq2aa=$jmuu256;$this->$mewvd5[$lepu253][]=[base64_decode('Z3JhZGllbnQ=')=>true,base64_decode('eA==')=>$lolm2a9,base64_decode('eQ==')=>$nugq2aa,base64_decode('dw==')=>$tpmge3,base64_decode('aA==')=>$sprqe4,base64_decode('Z3JhZHR5cGU=')=>$extx2a7[base64_decode('dHlwZQ==')],base64_decode('c3RvcHM=')=>$extx2a7[base64_decode('c3RvcHM=')],base64_decode('Y29sb3JzcGFjZQ==')=>$extx2a7[base64_decode('Y29sb3JzcGFjZQ==')],base64_decode('Y29vcmRz')=>$extx2a7[base64_decode('Y29vcmRz')],base64_decode('ZXh0ZW5k')=>$extx2a7[base64_decode('ZXh0ZW5k')],base64_decode('Y2xpcHBhdGg=')=>$vopwa9,base64_decode('dmlzaWJpbGl0eQ==')=>$this->$tvgl2a5,base64_decode('ei1pbmRleA==')=>$this->$cmks2a6];}}if(isset($this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')])){if(isset($this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('Z3JhZGllbnQ=')])&&$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('Z3JhZGllbnQ=')]&&preg_match(base64_decode('LygtbW96LSkqKHJlcGVhdGluZy0pKihsaW5lYXJ8cmFkaWFsKS1ncmFkaWVudC8='),$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('Z3JhZGllbnQ=')])){$extx2a7=$this->$csbt2a3->raxe2ab($this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('Z3JhZGllbnQ=')]);if($extx2a7){$lolm2a9=$trhy254;$nugq2aa=$jmuu256;if($this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('b3JpZ2lu')]==base64_decode('cGFkZGluZy1ib3g=')){$lolm2a9+=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')];$tpmge3-=($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]+$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')]);if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')]&&$rjun252!=base64_decode('cGFnZXRvcA==')&&!$vlep258){$nugq2aa+=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')];}if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')]&&$akln1de!=1&&$rjun252!=base64_decode('cGFnZWJvdHRvbQ==')){$rewm2ac=$tkbl257-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')];}else{$rewm2ac=$tkbl257;}$sprqe4=$rewm2ac-$nugq2aa;}elseif($this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('b3JpZ2lu')]==base64_decode('Y29udGVudC1ib3g=')){$lolm2a9+=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]+$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19sZWZ0')];$tpmge3-=($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]+$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19sZWZ0')]+$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')]+$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19yaWdodA==')]);if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')]&&$rjun252!=base64_decode('cGFnZXRvcA==')&&!$vlep258){$nugq2aa+=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')]+$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ190b3A=')];}if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')]&&$akln1de!=1&&$rjun252!=base64_decode('cGFnZWJvdHRvbQ==')){$rewm2ac=$tkbl257-($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')]+$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19ib3R0b20=')]);}else{$rewm2ac=$tkbl257-$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19ib3R0b20=')];}$sprqe4=$rewm2ac-$nugq2aa;}if(isset($this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('c2l6ZQ==')][base64_decode('dw==')])&&$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('c2l6ZQ==')][base64_decode('dw==')]){$gkou1ab=$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('c2l6ZQ==')];if($gkou1ab[base64_decode('dw==')]!=base64_decode('Y29udGFpbg==')&&$gkou1ab[base64_decode('dw==')]!=base64_decode('Y292ZXI=')){if(stristr($gkou1ab[base64_decode('dw==')],base64_decode('JQ=='))){$gkou1ab[base64_decode('dw==')]=(float)$gkou1ab[base64_decode('dw==')];$gkou1ab[base64_decode('dw==')]/=100;$tpmge3*=$gkou1ab[base64_decode('dw==')];}elseif($gkou1ab[base64_decode('dw==')]!=base64_decode('YXV0bw==')){$tpmge3=$gkou1ab[base64_decode('dw==')];}if(stristr($gkou1ab[base64_decode('aA==')],base64_decode('JQ=='))){$gkou1ab[base64_decode('aA==')]=(float)$gkou1ab[base64_decode('aA==')];$gkou1ab[base64_decode('aA==')]/=100;$sprqe4*=$gkou1ab[base64_decode('aA==')];}elseif($gkou1ab[base64_decode('aA==')]!=base64_decode('YXV0bw==')){$sprqe4=$gkou1ab[base64_decode('aA==')];}}}$this->$mewvd5[$lepu253][]=[base64_decode('Z3JhZGllbnQ=')=>true,base64_decode('eA==')=>$lolm2a9,base64_decode('eQ==')=>$nugq2aa,base64_decode('dw==')=>$tpmge3,base64_decode('aA==')=>$sprqe4,base64_decode('Z3JhZHR5cGU=')=>$extx2a7[base64_decode('dHlwZQ==')],base64_decode('c3RvcHM=')=>$extx2a7[base64_decode('c3RvcHM=')],base64_decode('Y29sb3JzcGFjZQ==')=>$extx2a7[base64_decode('Y29sb3JzcGFjZQ==')],base64_decode('Y29vcmRz')=>$extx2a7[base64_decode('Y29vcmRz')],base64_decode('ZXh0ZW5k')=>$extx2a7[base64_decode('ZXh0ZW5k')],base64_decode('Y2xpcHBhdGg=')=>$vopwa9,base64_decode('dmlzaWJpbGl0eQ==')=>$this->$tvgl2a5,base64_decode('ei1pbmRleA==')=>$this->$cmks2a6];}}else{$jyat2ad=$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('aW1hZ2VfaWQ=')];$ttim2ae=$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('b3JpZ193')];$sppq2af=$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('b3JpZ19o')];$rqeb2b0=$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('eF9wb3M=')];$jiim2b1=$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('eV9wb3M=')];$epiy2b2=$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('eF9yZXBlYXQ=')];$eyvg2b3=$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('eV9yZXBlYXQ=')];$nwcf2b4=$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('cmVzaXpl')];$ytyc2b5=$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('b3BhY2l0eQ==')];$vmaq2b6=$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('aXR5cGU=')];$gkou1ab=$this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('c2l6ZQ==')];$jpgd2b7=[base64_decode('eA==')=>$trhy254,base64_decode('eQ==')=>$jmuu256,base64_decode('dw==')=>$tpmge3,base64_decode('aA==')=>$sprqe4];if($this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('b3JpZ2lu')]==base64_decode('cGFkZGluZy1ib3g=')){$jpgd2b7[base64_decode('eA==')]=$trhy254+$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')];$jpgd2b7[base64_decode('dw==')]=$tpmge3-($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]+$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')]);if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')]&&$rjun252!=base64_decode('cGFnZXRvcA==')&&!$vlep258){$jpgd2b7[base64_decode('eQ==')]=$jmuu256+$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')];}else{$jpgd2b7[base64_decode('eQ==')]=$jmuu256;}if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')]&&$akln1de!=1&&$rjun252!=base64_decode('cGFnZWJvdHRvbQ==')){$bzst2b8=$tkbl257-$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')];}else{$bzst2b8=$tkbl257;}$jpgd2b7[base64_decode('aA==')]=$bzst2b8-$jpgd2b7[base64_decode('eQ==')];}elseif($this->$nfem7c[$lepu253][base64_decode('YmFja2dyb3VuZC1pbWFnZQ==')][base64_decode('b3JpZ2lu')]==base64_decode('Y29udGVudC1ib3g=')){$jpgd2b7[base64_decode('eA==')]=$trhy254+$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]+$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19sZWZ0')];$jpgd2b7[base64_decode('dw==')]=$tpmge3-($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('dw==')]+$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19sZWZ0')]+$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('dw==')]+$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19yaWdodA==')]);if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')]&&$rjun252!=base64_decode('cGFnZXRvcA==')&&!$vlep258){$jpgd2b7[base64_decode('eQ==')]=$jmuu256+$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('dw==')]+$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ190b3A=')];}else{$jpgd2b7[base64_decode('eQ==')]=$jmuu256+$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ190b3A=')];}if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')]&&$akln1de!=1&&$rjun252!=base64_decode('cGFnZWJvdHRvbQ==')){$bzst2b8=$tkbl257-($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')]+$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19ib3R0b20=')]);}else{$bzst2b8=$tkbl257-$this->$nfem7c[$lepu253][base64_decode('cGFkZGluZ19ib3R0b20=')];}$jpgd2b7[base64_decode('aA==')]=$bzst2b8-$jpgd2b7[base64_decode('eQ==')];}$this->$mewvd5[$lepu253][]=[base64_decode('eA==')=>$trhy254,base64_decode('eQ==')=>$jmuu256,base64_decode('dw==')=>$tpmge3,base64_decode('aA==')=>$sprqe4,base64_decode('aW1hZ2VfaWQ=')=>$jyat2ad,base64_decode('b3JpZ193')=>$ttim2ae,base64_decode('b3JpZ19o')=>$sppq2af,base64_decode('eF9wb3M=')=>$rqeb2b0,base64_decode('eV9wb3M=')=>$jiim2b1,base64_decode('eF9yZXBlYXQ=')=>$epiy2b2,base64_decode('eV9yZXBlYXQ=')=>$eyvg2b3,base64_decode('Y2xpcHBhdGg=')=>$vopwa9,base64_decode('cmVzaXpl')=>$nwcf2b4,base64_decode('b3BhY2l0eQ==')=>$ytyc2b5,base64_decode('aXR5cGU=')=>$vmaq2b6,base64_decode('dmlzaWJpbGl0eQ==')=>$this->$tvgl2a5,base64_decode('ei1pbmRleA==')=>$this->$cmks2a6,base64_decode('c2l6ZQ==')=>$gkou1ab,base64_decode('YnBh')=>$jpgd2b7];}}$this->$nfem7c[$lepu253][base64_decode('YmJfcGFpbnRlZA==')][$this->$hwinb6]=true;}function ttwtf($trhy254,$jmuu256,$kryc2b9,$jxtm2ba,$jmas2bb=1,$crmj2bc=false,$kqqc2bd=false){$vopwa9='';if($kryc2b9<0){$kryc2b9=0;}if($jxtm2ba<0){$jxtm2ba=0;}$kryc2b9*=Mpdf::SCALE;$jxtm2ba*=Mpdf::SCALE;$axth2be=0;if($jmas2bb==1){$ubwh2bf=90;$xzjw2c0=4;}elseif($jmas2bb==2){$ubwh2bf=180;$xzjw2c0=8;}elseif($jmas2bb==3){$ubwh2bf=270;$xzjw2c0=12;}else{$ubwh2bf=360;$xzjw2c0=16;}$axth2be=deg2rad((float)$axth2be);$ubwh2bf=deg2rad((float)$ubwh2bf);$lybb2c1=$ubwh2bf-$axth2be;$elmo2c2=$lybb2c1/$xzjw2c0;$rzdr2c3=$elmo2c2/3;$trhy254*=Mpdf::SCALE;$jmuu256=($this->$vxexcb-$jmuu256)*Mpdf::SCALE;$yjjy2c4=$axth2be;$oohf2c5=$trhy254+($kryc2b9*cos($yjjy2c4));$vtku2c6=$jmuu256+($jxtm2ba*sin($yjjy2c4));$ycou2c7=-$kryc2b9*sin($yjjy2c4);$cavv2c8=$jxtm2ba*cos($yjjy2c4);$prjb14f=false;for($bqaa7a=1;$bqaa7a<=$xzjw2c0;$bqaa7a++){$yjjy2c4=($bqaa7a*$elmo2c2)+$axth2be;$avyz2c9=$trhy254+($kryc2b9*cos($yjjy2c4));$tycl2ca=$jmuu256+($jxtm2ba*sin($yjjy2c4));$szkm2cb=-$kryc2b9*sin($yjjy2c4);$eyyi286=$jxtm2ba*cos($yjjy2c4);if($bqaa7a>($xzjw2c0-4)&&(!$crmj2bc||($crmj2bc==1&&$bqaa7a<=$xzjw2c0-2)||($crmj2bc==2&&$bqaa7a>$xzjw2c0-2))){if($kqqc2bd&&!$prjb14f){$vopwa9.=sprintf(base64_decode('JS4zRiAlLjNGIG0g'),$oohf2c5,$vtku2c6);}$vopwa9.=sprintf(base64_decode('JS4zRiAlLjNGICUuM0YgJS4zRiAlLjNGICUuM0YgYyA='),($oohf2c5+($ycou2c7*$rzdr2c3)),($vtku2c6+($cavv2c8*$rzdr2c3)),($avyz2c9-($szkm2cb*$rzdr2c3)),($tycl2ca-($eyyi286*$rzdr2c3)),$avyz2c9,$tycl2ca);$prjb14f=true;}$oohf2c5=$avyz2c9;$vtku2c6=$tycl2ca;$ycou2c7=$szkm2cb;$cavv2c8=$eyyi286;}return $vopwa9;}function dqgp10($jzrb2cc=0,$lepu253=0,$sprqe4=0){$this->$teik2cd[$this->$byxc1fe][base64_decode('Ym90dG9tX21hcmdpbg==')]=$this->$vxexcb+$sprqe4;$jgjdea=$this->$vxexcb;$tpmge3=$this->$nfem7c[$lepu253][base64_decode('d2lkdGg=')];$trhy254=$this->$vxexcb;$jmuu256=$this->$vxexcb;$uozl255=$this->$vxexcb+$tpmge3;$tkbl257=$this->$vxexcb+$sprqe4;$vlep258=(isset($this->$nfem7c[$lepu253][base64_decode('c3RhcnRwYWdl')])&&$this->$nfem7c[$lepu253][base64_decode('c3RhcnRwYWdl')]!=$this->$hwinb6);if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')]&&($jzrb2cc==1||$jzrb2cc==3)){$lamd267=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3RvcA==')];if(isset($lamd267[base64_decode('cw==')])&&$lamd267[base64_decode('cw==')]){$this->iftcd($lamd267);$this->$vxexcb=$jmuu256+($lamd267[base64_decode('dw==')]/2);if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG90dGVk')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZGFzaGVk')){$this->tazzc($lamd267[base64_decode('c3R5bGU=')],'',$vlep258,base64_decode('VA=='));$this->piep2ce($trhy254+($lamd267[base64_decode('dw==')]/2),$this->$vxexcb,$trhy254+$tpmge3-($lamd267[base64_decode('dw==')]/2),$this->$vxexcb);}else{$this->qamy24e(0);$this->dpnc24f(0);$this->piep2ce($trhy254,$this->$vxexcb,$trhy254+$tpmge3,$this->$vxexcb);}$this->$vxexcb+=$lamd267[base64_decode('dw==')];$this->qamy24e(2);$this->dpnc24f(2);$this->garm244();}}if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')]){$lamd267=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2xlZnQ=')];if(isset($lamd267[base64_decode('cw==')])&&$lamd267[base64_decode('cw==')]){$this->iftcd($lamd267);if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG90dGVk')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZGFzaGVk')){$this->$vxexcb=$jmuu256+($lamd267[base64_decode('dw==')]/2);$this->tazzc($lamd267[base64_decode('c3R5bGU=')],'',$vlep258,base64_decode('TA=='));$this->piep2ce($trhy254+($lamd267[base64_decode('dw==')]/2),$this->$vxexcb,$trhy254+($lamd267[base64_decode('dw==')]/2),$jmuu256+$sprqe4-($lamd267[base64_decode('dw==')]/2));}else{$this->$vxexcb=$jmuu256;$this->qamy24e(0);$this->dpnc24f(0);$this->piep2ce($trhy254+($lamd267[base64_decode('dw==')]/2),$this->$vxexcb,$trhy254+($lamd267[base64_decode('dw==')]/2),$jmuu256+$sprqe4);}$this->$vxexcb+=$lamd267[base64_decode('dw==')];$this->qamy24e(2);$this->dpnc24f(2);$this->garm244();}}if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JpZ2h0')]){$lamd267=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX3JpZ2h0')];if(isset($lamd267[base64_decode('cw==')])&&$lamd267[base64_decode('cw==')]){$this->iftcd($lamd267);if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG90dGVk')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZGFzaGVk')){$this->$vxexcb=$jmuu256+($lamd267[base64_decode('dw==')]/2);$this->tazzc($lamd267[base64_decode('c3R5bGU=')],'',$vlep258,base64_decode('Ug=='));$this->piep2ce($trhy254+$tpmge3-($lamd267[base64_decode('dw==')]/2),$this->$vxexcb,$trhy254+$tpmge3-($lamd267[base64_decode('dw==')]/2),$jmuu256+$sprqe4-($lamd267[base64_decode('dw==')]/2));}else{$this->$vxexcb=$jmuu256;$this->qamy24e(0);$this->dpnc24f(0);$this->piep2ce($trhy254+$tpmge3-($lamd267[base64_decode('dw==')]/2),$this->$vxexcb,$trhy254+$tpmge3-($lamd267[base64_decode('dw==')]/2),$jmuu256+$sprqe4);}$this->$vxexcb+=$lamd267[base64_decode('dw==')];$this->qamy24e(2);$this->dpnc24f(2);$this->garm244();}}if($this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')]&&$jzrb2cc>1){$lamd267=$this->$nfem7c[$lepu253][base64_decode('Ym9yZGVyX2JvdHRvbQ==')];if(isset($lamd267[base64_decode('cw==')])&&$lamd267[base64_decode('cw==')]){$this->iftcd($lamd267);$this->$vxexcb=$jmuu256+$sprqe4-($lamd267[base64_decode('dw==')]/2);if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG90dGVk')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZGFzaGVk')){$this->tazzc($lamd267[base64_decode('c3R5bGU=')],'',$vlep258,base64_decode('Qg=='));$this->piep2ce($trhy254+($lamd267[base64_decode('dw==')]/2),$this->$vxexcb,$trhy254+$tpmge3-($lamd267[base64_decode('dw==')]/2),$this->$vxexcb);}else{$this->qamy24e(0);$this->dpnc24f(0);$this->piep2ce($trhy254,$this->$vxexcb,$trhy254+$tpmge3,$this->$vxexcb);}$this->$vxexcb+=$lamd267[base64_decode('dw==')];$this->qamy24e(2);$this->dpnc24f(2);$this->garm244();}}$this->garm244();$this->$vxexcb=$jgjdea;}function nnns11($hpak9d,$ntzn1df){if($this->$tavmee){return;}if($ntzn1df){$zlgud9=$this->$ckpp200;}else{$zlgud9=1;}$sprqe4=(isset($hpak9d[base64_decode('Qk9SREVSLUhFSUdIVA==')])?$hpak9d[base64_decode('Qk9SREVSLUhFSUdIVA==')]:0);$tpmge3=(isset($hpak9d[base64_decode('Qk9SREVSLVdJRFRI')])?$hpak9d[base64_decode('Qk9SREVSLVdJRFRI')]:0);$trhy254=(isset($hpak9d[base64_decode('Qk9SREVSLVg=')])?$hpak9d[base64_decode('Qk9SREVSLVg=')]:0);$jmuu256=(isset($hpak9d[base64_decode('Qk9SREVSLVk=')])?$hpak9d[base64_decode('Qk9SREVSLVk=')]:0);if($hpak9d[base64_decode('Ym9yZGVyX3RvcA==')]){$lamd267=$hpak9d[base64_decode('Ym9yZGVyX3RvcA==')];if(!empty($lamd267[base64_decode('cw==')])){$this->iftcd($lamd267,$zlgud9);if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG90dGVk')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZGFzaGVk')){$this->tazzc($lamd267[base64_decode('c3R5bGU=')],'','',base64_decode('VA=='));}$this->piep2ce($trhy254,$jmuu256,$trhy254+$tpmge3,$jmuu256);$this->qamy24e(2);$this->dpnc24f(2);$this->garm244();}}if($hpak9d[base64_decode('Ym9yZGVyX2xlZnQ=')]){$lamd267=$hpak9d[base64_decode('Ym9yZGVyX2xlZnQ=')];if(!empty($lamd267[base64_decode('cw==')])){$this->iftcd($lamd267,$zlgud9);if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG90dGVk')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZGFzaGVk')){$this->tazzc($lamd267[base64_decode('c3R5bGU=')],'','',base64_decode('TA=='));}$this->piep2ce($trhy254,$jmuu256,$trhy254,$jmuu256+$sprqe4);$this->qamy24e(2);$this->dpnc24f(2);$this->garm244();}}if($hpak9d[base64_decode('Ym9yZGVyX3JpZ2h0')]){$lamd267=$hpak9d[base64_decode('Ym9yZGVyX3JpZ2h0')];if(!empty($lamd267[base64_decode('cw==')])){$this->iftcd($lamd267,$zlgud9);if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG90dGVk')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZGFzaGVk')){$this->tazzc($lamd267[base64_decode('c3R5bGU=')],'','',base64_decode('Ug=='));}$this->piep2ce($trhy254+$tpmge3,$jmuu256,$trhy254+$tpmge3,$jmuu256+$sprqe4);$this->qamy24e(2);$this->dpnc24f(2);$this->garm244();}}if($hpak9d[base64_decode('Ym9yZGVyX2JvdHRvbQ==')]){$lamd267=$hpak9d[base64_decode('Ym9yZGVyX2JvdHRvbQ==')];if(!empty($lamd267[base64_decode('cw==')])){$this->iftcd($lamd267,$zlgud9);if($lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZG90dGVk')||$lamd267[base64_decode('c3R5bGU=')]==base64_decode('ZGFzaGVk')){$this->tazzc($lamd267[base64_decode('c3R5bGU=')],'','',base64_decode('Qg=='));}$this->piep2ce($trhy254,$jmuu256+$sprqe4,$trhy254+$tpmge3,$jmuu256+$sprqe4);$this->qamy24e(2);$this->dpnc24f(2);$this->garm244();}}$this->garm244();$this->xchi251(1);}function gfpr12(){$this->tmfj20b($this->$eenv167->pqih117(0,$this->$yqgg168));$this->chhp23f($this->$eenv167->pqih117(0,$this->$yqgg168));$this->zbel240($this->$eenv167->pqih117(255,$this->$yqgg168));$this->xchi251(1);$this->$ftza1ae='';$this->$ietq1d8='';$this->$tbpq1e2=false;$this->$kurk1e3=false;$this->$ywcva6=[];$this->gtpl19();$this->$ftuxa0='';$this->$dumo1d7=[];$this->udvh204();$this->$tvtt8b=0x00;$this->$nahk1d6=[];$this->$vhrm1dc='';$this->$payl1d5=$this->$enxb241;$this->jtzr242($this->$hrph243);$this->nscn1ef($this->$rbvk1f0,'',0,false);$this->rvmj201($this->$wrdu1f1,false);$this->$edwx1d4='';$this->$lvbj1d9='';$this->$bafe1d3='';if($this->$bwrva1&&isset($this->$iwdqac[1][1][base64_decode('Y2VsbExpbmVIZWlnaHQ=')])){$this->lyhr1ec('',$this->$iwdqac[1][1][base64_decode('Y2VsbExpbmVIZWlnaHQ=')]);}else{if(isset($this->$nfem7c[$this->$hhln7d][base64_decode('bGluZV9oZWlnaHQ=')])&&$this->$nfem7c[$this->$hhln7d][base64_decode('bGluZV9oZWlnaHQ=')]){$this->lyhr1ec('',$this->$nfem7c[$this->$hhln7d][base64_decode('bGluZV9oZWlnaHQ=')]);}}$this->$faig1db='';$this->$faig1db='';$this->$msmg203=false;$this->$fruo202=0;$this->garm244();$this->$cmtt245=false;$this->$qhts246=false;$this->$liux1e9=0;$this->$ltzi1ed=0;$this->$gdnz1ea='';$this->$eppa23c='';$this->$yqgj2cf='';$this->$gmqe2d0='';$this->$utax22a=-1;$rqot2d1=[];if(isset($this->$mddeff->$cvuy17d[base64_decode('Qk9EWQ==')][base64_decode('Rk9OVC1TVFlMRQ==')])){$rqot2d1[base64_decode('Rk9OVC1TVFlMRQ==')]=$this->$mddeff->$cvuy17d[base64_decode('Qk9EWQ==')][base64_decode('Rk9OVC1TVFlMRQ==')];}if(isset($this->$mddeff->$cvuy17d[base64_decode('Qk9EWQ==')][base64_decode('Rk9OVC1XRUlHSFQ=')])){$rqot2d1[base64_decode('Rk9OVC1XRUlHSFQ=')]=$this->$mddeff->$cvuy17d[base64_decode('Qk9EWQ==')][base64_decode('Rk9OVC1XRUlHSFQ=')];}if(isset($this->$mddeff->$cvuy17d[base64_decode('Qk9EWQ==')][base64_decode('Q09MT1I=')])){$rqot2d1[base64_decode('Q09MT1I=')]=$this->$mddeff->$cvuy17d[base64_decode('Qk9EWQ==')][base64_decode('Q09MT1I=')];}if(isset($rqot2d1)){$this->qbmi15($rqot2d1,base64_decode('QkxPQ0s='),base64_decode('Qk9EWQ=='));}}function unxf13($eajq73){$vesqbd=base64_decode('LyAoXFx3Kz8pPShbXlxccz4iXSspL3Np');$eajq73=preg_replace($vesqbd,base64_decode('ICQxPSIkMiI='),$eajq73);if(preg_match(base64_decode('Lzx0aXRsZT4oLio/KTxcL3RpdGxlPi9zaQ=='),$eajq73,$iivi1b1)){$this->zqwz2d2($iivi1b1[1]);}preg_match_all(base64_decode('LzxtZXRhIFtePl0qPyhuYW1lfGNvbnRlbnQpPSIoW14+XSo/KSIgW14+XSo/KG5hbWV8Y29udGVudCk9IihbXj5dKj8pIi4qPz4vc2k='),$eajq73,$rmbl2d3);$brto2d4=$rmbl2d3[1];$fwml2d5=$rmbl2d3[3];for($bqaa7a=0;$bqaa7a<count($rmbl2d3[0]);$bqaa7a++){$ixou172=(strtoupper($brto2d4[$bqaa7a])==base64_decode('TkFNRQ=='))?strtoupper($rmbl2d3[2][$bqaa7a]):strtoupper($rmbl2d3[4][$bqaa7a]);$nxfc2d6=(strtoupper($brto2d4[$bqaa7a])==base64_decode('Q09OVEVOVA=='))?$rmbl2d3[2][$bqaa7a]:$rmbl2d3[4][$bqaa7a];switch($ixou172){case base64_decode('S0VZV09SRFM='):$this->dpux2d7($nxfc2d6);break;case base64_decode('QVVUSE9S'):$this->zzbn2d8($nxfc2d6);break;case base64_decode('REVTQ1JJUFRJT04='):$this->dxun2d9($nxfc2d6);break;}}}function aeur14($eajq73){if($this->$yvvw2da){if(preg_match(base64_decode('LzxoZWFkLipjaGFyc2V0PShbXlwnXCJcc10qKS4qPFwvaGVhZD4vc2k='),$eajq73,$iivi1b1)){if(strtoupper($iivi1b1[1])!=base64_decode('VVRGLTg=')){$this->$hryb2db=strtoupper($iivi1b1[1]);}}}}function qbmi15($elvo1dd,$ddid2dc='',$jxerc6=''){if(!is_array($elvo1dd)){return;}$axcd2dd=$this->$conw84.$this->$yoib1b0;$onos2de=$this->$bfpt118;$dnzo2df=false;$fwie2e0=false;$oocs2e1=(($this->$hhln7d==0)?0:$this->$hhln7d-1);if(isset($elvo1dd[base64_decode('Rk9OVC1TSVpF')])){$cpakc8=$elvo1dd[base64_decode('Rk9OVC1TSVpF')];if(is_numeric($cpakc8[0])||($cpakc8[0]===base64_decode('Lg=='))){if($ddid2dc==base64_decode('QkxPQ0s=')&&$this->$hhln7d>0&&isset($this->$nfem7c[$this->$hhln7d-1][base64_decode('SW5saW5lUHJvcGVydGllcw==')])&&isset($this->$nfem7c[$this->$hhln7d-1][base64_decode('SW5saW5lUHJvcGVydGllcw==')][base64_decode('c2l6ZQ==')])){$wxpc2e2=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$this->$hhln7d-1][base64_decode('SW5saW5lUHJvcGVydGllcw==')][base64_decode('c2l6ZQ==')]);}elseif($ddid2dc==base64_decode('VEFCTEVDRUxM')){$wxpc2e2=$this->$kcbo116->pqih117($cpakc8,$this->$wrdu1f1/Mpdf::SCALE);}else{$wxpc2e2=$this->$kcbo116->pqih117($cpakc8,$this->$bfpt118);}$this->rvmj201($wxpc2e2*(Mpdf::SCALE),false);}else{$cpakc8=strtoupper($cpakc8);if(isset($this->$ttts2e3[$cpakc8])){$this->rvmj201($this->$ttts2e3[$cpakc8]*$this->$wrdu1f1,false);}}if($jxerc6==base64_decode('Qk9EWQ==')){$this->imfw2e4($this->$jvue1af);}}if(isset($elvo1dd[base64_decode('TEFORw==')])&&$elvo1dd[base64_decode('TEFORw==')]){if($this->$linl2e5&&!$this->$obfk87){if($elvo1dd[base64_decode('TEFORw==')]!=$this->$enxb241&&$elvo1dd[base64_decode('TEFORw==')]!=base64_decode('VVRGLTg=')){[$abtd2e6,$mdvx2e7]=$this->$sgzy2e8->tkum2e9($elvo1dd[base64_decode('TEFORw==')],$this->$beoa2ea);if($mdvx2e7){$elvo1dd[base64_decode('Rk9OVC1GQU1JTFk=')]=$mdvx2e7;}if($jxerc6==base64_decode('Qk9EWQ==')){$this->$enxb241=$elvo1dd[base64_decode('TEFORw==')];}}}$this->$payl1d5=$elvo1dd[base64_decode('TEFORw==')];}if(isset($elvo1dd[base64_decode('Rk9OVC1GQU1JTFk=')])){$cpakc8=$elvo1dd[base64_decode('Rk9OVC1GQU1JTFk=')];$snrg2eb=explode(base64_decode('LA=='),$cpakc8);$uugs2ec=0;foreach($snrg2eb as $bymq15b){$wwya2ed=trim($bymq15b);$wwya2ed=preg_replace(base64_decode('L1siXCddKiguKj8pWyJcJ10qLw=='),base64_decode('XFwx'),$wwya2ed);$wwya2ed=preg_replace(base64_decode('LyAv'),'',$wwya2ed);$cpakc8=sagh3c(trim($wwya2ed));if(isset($this->$crmr2ee[$cpakc8])&&$this->$crmr2ee[$cpakc8]){$cpakc8=$this->$crmr2ee[$cpakc8];}if((!$this->$dpdc89&&in_array($cpakc8,$this->$viba2ef))||in_array($cpakc8,[base64_decode('Y2NvdXJpZXI='),base64_decode('Y3RpbWVz'),base64_decode('Y2hlbHZldGljYQ==')])||($this->$dpdc89&&in_array($cpakc8,[base64_decode('Y291cmllcg=='),base64_decode('dGltZXM='),base64_decode('aGVsdmV0aWNh'),base64_decode('YXJpYWw=')]))||in_array($cpakc8,[base64_decode('c2ppcw=='),base64_decode('dWhj'),base64_decode('YmlnNQ=='),base64_decode('Z2I=')])){$wwya2ed=$cpakc8;$uugs2ec=1;break;}}if(!$uugs2ec){foreach($snrg2eb as $bymq15b){$wwya2ed=trim($bymq15b);$wwya2ed=preg_replace(base64_decode('L1siXCddKiguKj8pWyJcJ10qLw=='),base64_decode('XFwx'),$wwya2ed);$wwya2ed=preg_replace(base64_decode('LyAv'),'',$wwya2ed);$cpakc8=sagh3c(trim($wwya2ed));if(isset($this->$crmr2ee[$cpakc8])&&$this->$crmr2ee[$cpakc8]){$cpakc8=$this->$crmr2ee[$cpakc8];}if(in_array($cpakc8,$this->$rcas2f0)||in_array($cpakc8,$this->$fssk2f1)||in_array($cpakc8,$this->$mxfm2f2)){$wwya2ed=$cpakc8;break;}}}if($jxerc6==base64_decode('Qk9EWQ==')){$this->ultd2f3($wwya2ed);}$this->nscn1ef($wwya2ed,$this->$bafe1d3,0,false);}else{$this->nscn1ef($this->$edwx1d4,$this->$bafe1d3,0,false);}foreach($elvo1dd as $zlgud9=>$cpakc8){if($ddid2dc!=base64_decode('SU5MSU5F')&&$jxerc6!=base64_decode('Qk9EWQ==')&&$ddid2dc!=base64_decode('VEFCTEVDRUxM')){switch($zlgud9){case base64_decode('Qk9SREVSLVRPUA=='):$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX3RvcA==')]=$this->gavw2($cpakc8);if($this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX3RvcA==')][base64_decode('cw==')]){$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVy')]=1;}break;case base64_decode('Qk9SREVSLUJPVFRPTQ=='):$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX2JvdHRvbQ==')]=$this->gavw2($cpakc8);if($this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('cw==')]){$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVy')]=1;}break;case base64_decode('Qk9SREVSLUxFRlQ='):$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX2xlZnQ=')]=$this->gavw2($cpakc8);if($this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX2xlZnQ=')][base64_decode('cw==')]){$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVy')]=1;}break;case base64_decode('Qk9SREVSLVJJR0hU'):$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX3JpZ2h0')]=$this->gavw2($cpakc8);if($this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX3JpZ2h0')][base64_decode('cw==')]){$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVy')]=1;}break;case base64_decode('UEFERElORy1UT1A='):$this->$nfem7c[$this->$hhln7d][base64_decode('cGFkZGluZ190b3A=')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);break;case base64_decode('UEFERElORy1CT1RUT00='):$this->$nfem7c[$this->$hhln7d][base64_decode('cGFkZGluZ19ib3R0b20=')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);break;case base64_decode('UEFERElORy1MRUZU'):if(($jxerc6==base64_decode('VUw=')||$jxerc6==base64_decode('T0w='))&&$cpakc8==base64_decode('YXV0bw==')){$this->$nfem7c[$this->$hhln7d][base64_decode('cGFkZGluZ19sZWZ0')]=base64_decode('YXV0bw==');break;}$this->$nfem7c[$this->$hhln7d][base64_decode('cGFkZGluZ19sZWZ0')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);break;case base64_decode('UEFERElORy1SSUdIVA=='):if(($jxerc6==base64_decode('VUw=')||$jxerc6==base64_decode('T0w='))&&$cpakc8==base64_decode('YXV0bw==')){$this->$nfem7c[$this->$hhln7d][base64_decode('cGFkZGluZ19yaWdodA==')]=base64_decode('YXV0bw==');break;}$this->$nfem7c[$this->$hhln7d][base64_decode('cGFkZGluZ19yaWdodA==')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);break;case base64_decode('TUFSR0lOLVRPUA=='):$qbic151=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);if(isset($this->$nfem7c[$this->$hhln7d][base64_decode('bGFzdGJvdHRvbW1hcmdpbg==')])){if($qbic151>$this->$nfem7c[$this->$hhln7d][base64_decode('bGFzdGJvdHRvbW1hcmdpbg==')]){$qbic151-=$this->$nfem7c[$this->$hhln7d][base64_decode('bGFzdGJvdHRvbW1hcmdpbg==')];}else{$qbic151=0;}}$this->$nfem7c[$this->$hhln7d][base64_decode('bWFyZ2luX3RvcA==')]=$qbic151;break;case base64_decode('TUFSR0lOLUJPVFRPTQ=='):$this->$nfem7c[$this->$hhln7d][base64_decode('bWFyZ2luX2JvdHRvbQ==')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);break;case base64_decode('TUFSR0lOLUxFRlQ='):$this->$nfem7c[$this->$hhln7d][base64_decode('bWFyZ2luX2xlZnQ=')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);break;case base64_decode('TUFSR0lOLVJJR0hU'):$this->$nfem7c[$this->$hhln7d][base64_decode('bWFyZ2luX3JpZ2h0')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);break;case base64_decode('Qk9SREVSLVRPUC1MRUZULVJBRElVUy1I'):$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX3JhZGl1c19UTF9I')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);break;case base64_decode('Qk9SREVSLVRPUC1MRUZULVJBRElVUy1W'):$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX3JhZGl1c19UTF9W')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);break;case base64_decode('Qk9SREVSLVRPUC1SSUdIVC1SQURJVVMtSA=='):$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX3JhZGl1c19UUl9I')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);break;case base64_decode('Qk9SREVSLVRPUC1SSUdIVC1SQURJVVMtVg=='):$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX3JhZGl1c19UUl9W')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);break;case base64_decode('Qk9SREVSLUJPVFRPTS1MRUZULVJBRElVUy1I'):$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX3JhZGl1c19CTF9I')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);break;case base64_decode('Qk9SREVSLUJPVFRPTS1MRUZULVJBRElVUy1W'):$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX3JhZGl1c19CTF9W')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);break;case base64_decode('Qk9SREVSLUJPVFRPTS1SSUdIVC1SQURJVVMtSA=='):$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX3JhZGl1c19CUl9I')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);break;case base64_decode('Qk9SREVSLUJPVFRPTS1SSUdIVC1SQURJVVMtVg=='):$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX3JhZGl1c19CUl9W')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);break;case base64_decode('Qk9YLVNIQURPVw=='):$efrz2f4=$this->$mddeff->afdg2f5($cpakc8);if($efrz2f4){$this->$nfem7c[$this->$hhln7d][base64_decode('Ym94X3NoYWRvdw==')]=$efrz2f4;}break;case base64_decode('QkFDS0dST1VORC1DTElQ'):if(strtoupper($cpakc8)==base64_decode('UEFERElORy1CT1g=')){$this->$nfem7c[$this->$hhln7d][base64_decode('YmFja2dyb3VuZF9jbGlw')]=base64_decode('cGFkZGluZy1ib3g=');}elseif(strtoupper($cpakc8)==base64_decode('Q09OVEVOVC1CT1g=')){$this->$nfem7c[$this->$hhln7d][base64_decode('YmFja2dyb3VuZF9jbGlw')]=base64_decode('Y29udGVudC1ib3g=');}break;case base64_decode('UEFHRS1CUkVBSy1BRlRFUg=='):if(strtoupper($cpakc8)==base64_decode('QVZPSUQ=')){$this->$nfem7c[$this->$hhln7d][base64_decode('cGFnZV9icmVha19hZnRlcl9hdm9pZA==')]=true;}elseif(strtoupper($cpakc8)==base64_decode('QUxXQVlT')||strtoupper($cpakc8)==base64_decode('TEVGVA==')||strtoupper($cpakc8)==base64_decode('UklHSFQ=')){$this->$nfem7c[$this->$hhln7d][base64_decode('cGFnZV9icmVha19hZnRlcg==')]=strtoupper($cpakc8);}break;case base64_decode('Qk9YLURFQ09SQVRJT04tQlJFQUs='):if(strtoupper($cpakc8)==base64_decode('Q0xPTkU=')){$this->$nfem7c[$this->$hhln7d][base64_decode('Ym94X2RlY29yYXRpb25fYnJlYWs=')]=base64_decode('Y2xvbmU=');}elseif(strtoupper($cpakc8)==base64_decode('U0xJQ0U=')){$this->$nfem7c[$this->$hhln7d][base64_decode('Ym94X2RlY29yYXRpb25fYnJlYWs=')]=base64_decode('c2xpY2U=');}break;case base64_decode('V0lEVEg='):if(strtoupper($cpakc8)!=base64_decode('QVVUTw==')){$this->$nfem7c[$this->$hhln7d][base64_decode('Y3NzX3NldF93aWR0aA==')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false);}break;case base64_decode('TElTVC1TVFlMRS1UWVBF'):$this->$nfem7c[$this->$hhln7d][base64_decode('bGlzdF9zdHlsZV90eXBl')]=sagh3c($cpakc8);break;case base64_decode('TElTVC1TVFlMRS1JTUFHRQ=='):$this->$nfem7c[$this->$hhln7d][base64_decode('bGlzdF9zdHlsZV9pbWFnZQ==')]=sagh3c($cpakc8);break;case base64_decode('TElTVC1TVFlMRS1QT1NJVElPTg=='):$this->$nfem7c[$this->$hhln7d][base64_decode('bGlzdF9zdHlsZV9wb3NpdGlvbg==')]=sagh3c($cpakc8);break;}}if($ddid2dc!=base64_decode('SU5MSU5F')&&$ddid2dc!=base64_decode('VEFCTEVDRUxM')){switch($zlgud9){case base64_decode('VEVYVC1JTkRFTlQ='):$this->$nfem7c[$this->$hhln7d][base64_decode('dGV4dF9pbmRlbnQ=')]=$this->$kcbo116->pqih117($cpakc8,$this->$nfem7c[$oocs2e1][base64_decode('aW5uZXJfd2lkdGg=')],$this->$bfpt118,false).base64_decode('bW0=');break;case base64_decode('TUFSR0lOLUNPTExBUFNF'):if(strtoupper($cpakc8)==base64_decode('Q09MTEFQU0U=')){$this->$nfem7c[$this->$hhln7d][base64_decode('bWFyZ2luX2NvbGxhcHNl')]=true;}break;case base64_decode('TElORS1IRUlHSFQ='):$this->$nfem7c[$this->$hhln7d][base64_decode('bGluZV9oZWlnaHQ=')]=$this->wcta2f6($cpakc8);if(!$this->$nfem7c[$this->$hhln7d][base64_decode('bGluZV9oZWlnaHQ=')]){$this->$nfem7c[$this->$hhln7d][base64_decode('bGluZV9oZWlnaHQ=')]=base64_decode('Tg==');}break;case base64_decode('TElORS1TVEFDS0lORy1TVFJBVEVHWQ=='):$this->$nfem7c[$this->$hhln7d][base64_decode('bGluZV9zdGFja2luZ19zdHJhdGVneQ==')]=sagh3c($cpakc8);break;case base64_decode('TElORS1TVEFDS0lORy1TSElGVA=='):$this->$nfem7c[$this->$hhln7d][base64_decode('bGluZV9zdGFja2luZ19zaGlmdA==')]=sagh3c($cpakc8);break;case base64_decode('VEVYVC1BTElHTg=='):switch(strtoupper($cpakc8)){case base64_decode('TEVGVA=='):$this->$nfem7c[$this->$hhln7d][base64_decode('YWxpZ24=')]=base64_decode('TA==');break;case base64_decode('Q0VOVEVS'):$this->$nfem7c[$this->$hhln7d][base64_decode('YWxpZ24=')]=base64_decode('Qw==');break;case base64_decode('UklHSFQ='):$this->$nfem7c[$this->$hhln7d][base64_decode('YWxpZ24=')]=base64_decode('Ug==');break;case base64_decode('SlVTVElGWQ=='):$this->$nfem7c[$this->$hhln7d][base64_decode('YWxpZ24=')]=base64_decode('Sg==');break;}break;case base64_decode('QkFDS0dST1VORC1HUkFESUVOVA=='):if($ddid2dc==base64_decode('QkxPQ0s=')){$this->$nfem7c[$this->$hhln7d][base64_decode('Z3JhZGllbnQ=')]=$cpakc8;}break;case base64_decode('RElSRUNUSU9O'):if($cpakc8){$this->$nfem7c[$this->$hhln7d][base64_decode('ZGlyZWN0aW9u')]=sagh3c($cpakc8);}break;}}if($ddid2dc==base64_decode('SU5MSU5F')){switch($zlgud9){case base64_decode('RElTUExBWQ=='):if(strtoupper($cpakc8)==base64_decode('Tk9ORQ==')){$this->$ajwk7e=true;}break;case base64_decode('RElSRUNUSU9O'):break;}}if($ddid2dc==base64_decode('SU5MSU5F')){switch($zlgud9){case base64_decode('Qk9SREVSLVRPUA=='):$this->$ywcva6[base64_decode('VA==')]=$this->gavw2($cpakc8);$this->$kurk1e3=true;$dnzo2df=true;break;case base64_decode('Qk9SREVSLUJPVFRPTQ=='):$this->$ywcva6[base64_decode('Qg==')]=$this->gavw2($cpakc8);$this->$kurk1e3=true;$dnzo2df=true;break;case base64_decode('Qk9SREVSLUxFRlQ='):$this->$ywcva6[base64_decode('TA==')]=$this->gavw2($cpakc8);$this->$kurk1e3=true;$dnzo2df=true;break;case base64_decode('Qk9SREVSLVJJR0hU'):$this->$ywcva6[base64_decode('Ug==')]=$this->gavw2($cpakc8);$this->$kurk1e3=true;$dnzo2df=true;break;case base64_decode('VklTSUJJTElUWQ=='):$cpakc8=sagh3c($cpakc8);if($cpakc8==base64_decode('dmlzaWJsZQ==')||$cpakc8==base64_decode('aGlkZGVu')||$cpakc8==base64_decode('cHJpbnRvbmx5')||$cpakc8==base64_decode('c2NyZWVub25seQ==')){$this->$dumo1d7[base64_decode('dmlzaWJpbGl0eQ==')]=$cpakc8;}break;}}if($ddid2dc!=base64_decode('VEFCTEVDRUxM')){switch($zlgud9){case base64_decode('VEVYVC1BTElHTg=='):if(strtoupper($cpakc8)==base64_decode('Tk9KVVNUSUZZ')&&$this->$nfem7c[$this->$hhln7d][base64_decode('YWxpZ24=')]==base64_decode('Sg==')){$this->$nfem7c[$this->$hhln7d][base64_decode('YWxpZ24=')]='';}break;case base64_decode('QkFDS0dST1VORA=='):case base64_decode('QkFDS0dST1VORC1DT0xPUg=='):$lfmz20a=$this->$eenv167->pqih117($cpakc8,$this->$yqgg168);if($lfmz20a){if($jxerc6==base64_decode('Qk9EWQ==')){$this->$nhmh2f7=$lfmz20a;}elseif($ddid2dc==base64_decode('SU5MSU5F')){$this->$ietq1d8=$lfmz20a;$this->$tbpq1e2=true;$fwie2e0=true;}else{$this->$nfem7c[$this->$hhln7d][base64_decode('Ymdjb2xvcmFycmF5')]=$lfmz20a;$this->$nfem7c[$this->$hhln7d][base64_decode('Ymdjb2xvcg==')]=true;}}elseif($ddid2dc!=base64_decode('SU5MSU5F')){if($this->$tavmee){$this->$nfem7c[$this->$hhln7d][base64_decode('Ymdjb2xvcmFycmF5')]=$this->$nfem7c[$oocs2e1][base64_decode('Ymdjb2xvcmFycmF5')];$this->$nfem7c[$this->$hhln7d][base64_decode('Ymdjb2xvcg==')]=$this->$nfem7c[$oocs2e1][base64_decode('Ymdjb2xvcg==')];}}break;case base64_decode('VkVSVElDQUwtQUxJR04='):switch(strtoupper($cpakc8)){case base64_decode('U1VQRVI='):$this->$tvtt8b=($this->$tvtt8b|TextVars::FA_SUPERSCRIPT);$this->$tvtt8b=($this->$tvtt8b&~TextVars::FA_SUBSCRIPT);if(isset($this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')])){$this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')]+=($this->$bvlo2f8)*$onos2de;}else{$this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')]=($this->$bvlo2f8)*$onos2de;}break;case base64_decode('U1VC'):$this->$tvtt8b=($this->$tvtt8b|TextVars::FA_SUBSCRIPT);$this->$tvtt8b=($this->$tvtt8b&~TextVars::FA_SUPERSCRIPT);if(isset($this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')])){$this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')]+=($this->$xjfe2f9)*$onos2de;}else{$this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')]=($this->$xjfe2f9)*$onos2de;}break;case base64_decode('QkFTRUxJTkU='):$this->$tvtt8b=($this->$tvtt8b&~TextVars::FA_SUBSCRIPT);$this->$tvtt8b=($this->$tvtt8b&~TextVars::FA_SUPERSCRIPT);if(isset($this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')])){unset($this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')]);}break;default:$qzfy2fa=$this->xsqy23b($this->$nfem7c[$this->$hhln7d][base64_decode('bGluZV9oZWlnaHQ=')]);$tzsi2fb=$this->$kcbo116->pqih117($cpakc8,$qzfy2fa,$this->$bfpt118,false);$this->$tvtt8b=($this->$tvtt8b&~TextVars::FA_SUBSCRIPT);$this->$tvtt8b=($this->$tvtt8b&~TextVars::FA_SUPERSCRIPT);if($tzsi2fb){if($tzsi2fb>0){$this->$tvtt8b=($this->$tvtt8b|TextVars::FA_SUPERSCRIPT);}else{$this->$tvtt8b=($this->$tvtt8b|TextVars::FA_SUBSCRIPT);}if(isset($this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')])){$this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')]+=$tzsi2fb;}else{$this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')]=$tzsi2fb;}}}break;}}switch($zlgud9){case base64_decode('TEVUVEVSLVNQQUNJTkc='):$this->$faig1db=$cpakc8;if(($this->$faig1db||$this->$faig1db===base64_decode('MA=='))&&strtoupper($this->$faig1db)!=base64_decode('Tk9STUFM')){$this->$msmg203=$this->$kcbo116->pqih117($this->$faig1db,$this->$bfpt118);}break;case base64_decode('V09SRC1TUEFDSU5H'):$this->$faig1db=$cpakc8;if($this->$faig1db&&strtoupper($this->$faig1db)!=base64_decode('Tk9STUFM')){$this->$fruo202=$this->$kcbo116->pqih117($this->$faig1db,$this->$bfpt118);}break;case base64_decode('Rk9OVC1TVFlMRQ=='):switch(strtoupper($cpakc8)){case base64_decode('SVRBTElD'):case base64_decode('T0JMSVFVRQ=='):$this->rbes16(base64_decode('SQ=='),true);break;case base64_decode('Tk9STUFM'):$this->rbes16(base64_decode('SQ=='),false);break;}break;case base64_decode('Rk9OVC1XRUlHSFQ='):switch(strtoupper($cpakc8)){case base64_decode('Qk9MRA=='):$this->rbes16(base64_decode('Qg=='),true);break;case base64_decode('Tk9STUFM'):$this->rbes16(base64_decode('Qg=='),false);break;}break;case base64_decode('Rk9OVC1LRVJOSU5H'):if(strtoupper($cpakc8)==base64_decode('Tk9STUFM')||(strtoupper($cpakc8)==base64_decode('QVVUTw==')&&$this->$gebi2fc)){if($this->$iyzp8d[base64_decode('aGFza2VybkdQT1M=')]){if(isset($this->$nahk1d6[base64_decode('UGx1cw==')])){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IGtlcm4=');}else{$this->$nahk1d6[base64_decode('UGx1cw==')]=base64_decode('IGtlcm4=');}}else{$this->$tvtt8b=($this->$tvtt8b|TextVars::FC_KERNING);}}elseif(strtoupper($cpakc8)==base64_decode('Tk9ORQ==')||(strtoupper($cpakc8)==base64_decode('QVVUTw==')&&!$this->$gebi2fc)){if(isset($this->$nahk1d6[base64_decode('UGx1cw==')])){$this->$nahk1d6[base64_decode('UGx1cw==')]=str_replace(base64_decode('a2Vybg=='),'',$this->$nahk1d6[base64_decode('UGx1cw==')]);}if(isset($this->$nahk1d6[base64_decode('RkZQbHVz')])){$this->$nahk1d6[base64_decode('RkZQbHVz')]=preg_replace(base64_decode('L2tlcm5bXGRdKi8='),'',$this->$nahk1d6[base64_decode('RkZQbHVz')]);}$this->$tvtt8b=($this->$tvtt8b&~TextVars::FC_KERNING);}break;case base64_decode('Rk9OVC1MQU5HVUFHRS1PVkVSUklERQ=='):$cpakc8=strtoupper($cpakc8);if(strpos($cpakc8,base64_decode('Tk9STUFM'))!==false){$this->$rpzl2fd='';}else{$this->$rpzl2fd=trim($cpakc8);}break;case base64_decode('Rk9OVC1WQVJJQU5ULVBPU0lUSU9O'):if(isset($this->$nahk1d6[base64_decode('UGx1cw==')])){$this->$nahk1d6[base64_decode('UGx1cw==')]=str_replace([base64_decode('c3Vwcw=='),base64_decode('c3Vicw==')],'',$this->$nahk1d6[base64_decode('UGx1cw==')]);}switch(strtoupper($cpakc8)){case base64_decode('U1VQRVI='):$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IHN1cHM=');break;case base64_decode('U1VC'):$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IHN1YnM=');break;case base64_decode('Tk9STUFM'):break;}break;case base64_decode('Rk9OVC1WQVJJQU5ULUNBUFM='):$cpakc8=strtoupper($cpakc8);if(!isset($this->$nahk1d6[base64_decode('UGx1cw==')])){$this->$nahk1d6[base64_decode('UGx1cw==')]='';}$this->$nahk1d6[base64_decode('UGx1cw==')]=str_replace([base64_decode('YzJzYw=='),base64_decode('c21jcA=='),base64_decode('YzJwYw=='),base64_decode('cGNhcA=='),base64_decode('dW5pYw=='),base64_decode('dGl0bA==')],'',$this->$nahk1d6[base64_decode('UGx1cw==')]);$this->$tvtt8b=($this->$tvtt8b&~TextVars::FC_SMALLCAPS);if(strpos($cpakc8,base64_decode('QUxMLVNNQUxMLUNBUFM='))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IGMyc2Mgc21jcA==');}elseif(strpos($cpakc8,base64_decode('U01BTEwtQ0FQUw=='))!==false){if(isset($this->$iyzp8d[base64_decode('aGFzc21hbGxjYXBzR1NVQg==')])&&$this->$iyzp8d[base64_decode('aGFzc21hbGxjYXBzR1NVQg==')]){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IHNtY3A=');}else{$this->$tvtt8b=($this->$tvtt8b|TextVars::FC_SMALLCAPS);}}elseif(strpos($cpakc8,base64_decode('QUxMLVBFVElURS1DQVBT'))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IGMycGMgcGNhcA==');}elseif(strpos($cpakc8,base64_decode('UEVUSVRFLUNBUFM='))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IHBjYXA=');}elseif(strpos($cpakc8,base64_decode('VU5JQ0FTRQ=='))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IHVuaWM=');}elseif(strpos($cpakc8,base64_decode('VElUTElORy1DQVBT'))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IHRpdGw=');}break;case base64_decode('Rk9OVC1WQVJJQU5ULUxJR0FUVVJFUw=='):$cpakc8=strtoupper($cpakc8);if(!isset($this->$nahk1d6[base64_decode('UGx1cw==')])){$this->$nahk1d6[base64_decode('UGx1cw==')]='';}if(!isset($this->$nahk1d6[base64_decode('TWludXM=')])){$this->$nahk1d6[base64_decode('TWludXM=')]='';}if(strpos($cpakc8,base64_decode('Tk9STUFM'))!==false){$this->$nahk1d6[base64_decode('TWludXM=')]=str_replace([base64_decode('bGlnYQ=='),base64_decode('Y2xpZw=='),base64_decode('Y2FsdA==')],'',$this->$nahk1d6[base64_decode('TWludXM=')]);$this->$nahk1d6[base64_decode('UGx1cw==')]=str_replace([base64_decode('ZGxpZw=='),base64_decode('aGxpZw==')],'',$this->$nahk1d6[base64_decode('UGx1cw==')]);}elseif(strpos($cpakc8,base64_decode('Tk9ORQ=='))!==false){$this->$nahk1d6[base64_decode('TWludXM=')].=base64_decode('IGxpZ2EgY2xpZyBjYWx0');$this->$nahk1d6[base64_decode('UGx1cw==')]=str_replace([base64_decode('ZGxpZw=='),base64_decode('aGxpZw==')],'',$this->$nahk1d6[base64_decode('UGx1cw==')]);}if(strpos($cpakc8,base64_decode('Tk8tQ09NTU9OLUxJR0FUVVJFUw=='))!==false){$this->$nahk1d6[base64_decode('TWludXM=')].=base64_decode('IGxpZ2EgY2xpZw==');}elseif(strpos($cpakc8,base64_decode('Q09NTU9OLUxJR0FUVVJFUw=='))!==false){$this->$nahk1d6[base64_decode('TWludXM=')]=str_replace([base64_decode('bGlnYQ=='),base64_decode('Y2xpZw==')],'',$this->$nahk1d6[base64_decode('TWludXM=')]);}if(strpos($cpakc8,base64_decode('Tk8tQ09OVEVYVFVBTA=='))!==false){$this->$nahk1d6[base64_decode('TWludXM=')].=base64_decode('IGNhbHQ=');}elseif(strpos($cpakc8,base64_decode('Q09OVEVYVFVBTA=='))!==false){$this->$nahk1d6[base64_decode('TWludXM=')]=str_replace(base64_decode('Y2FsdA=='),'',$this->$nahk1d6[base64_decode('TWludXM=')]);}if(strpos($cpakc8,base64_decode('Tk8tRElTQ1JFVElPTkFSWS1MSUdBVFVSRVM='))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')]=str_replace(base64_decode('ZGxpZw=='),'',$this->$nahk1d6[base64_decode('UGx1cw==')]);}elseif(strpos($cpakc8,base64_decode('RElTQ1JFVElPTkFSWS1MSUdBVFVSRVM='))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IGRsaWc=');}if(strpos($cpakc8,base64_decode('Tk8tSElTVE9SSUNBTC1MSUdBVFVSRVM='))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')]=str_replace(base64_decode('aGxpZw=='),'',$this->$nahk1d6[base64_decode('UGx1cw==')]);}elseif(strpos($cpakc8,base64_decode('SElTVE9SSUNBTC1MSUdBVFVSRVM='))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IGhsaWc=');}break;case base64_decode('Rk9OVC1WQVJJQU5ULU5VTUVSSUM='):$cpakc8=strtoupper($cpakc8);if(!isset($this->$nahk1d6[base64_decode('UGx1cw==')])){$this->$nahk1d6[base64_decode('UGx1cw==')]='';}if(strpos($cpakc8,base64_decode('Tk9STUFM'))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')]=str_replace([base64_decode('b3Jkbg=='),base64_decode('emVybw=='),base64_decode('bG51bQ=='),base64_decode('b251bQ=='),base64_decode('cG51bQ=='),base64_decode('dG51bQ=='),base64_decode('ZnJhYw=='),base64_decode('YWZyYw==')],'',$this->$nahk1d6[base64_decode('UGx1cw==')]);}if(strpos($cpakc8,base64_decode('T1JESU5BTA=='))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IG9yZG4=');}if(strpos($cpakc8,base64_decode('U0xBU0hFRC1aRVJP'))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IHplcm8=');}if(strpos($cpakc8,base64_decode('TElOSU5HLU5VTVM='))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IGxudW0=');$this->$nahk1d6[base64_decode('UGx1cw==')]=str_replace(base64_decode('b251bQ=='),'',$this->$nahk1d6[base64_decode('UGx1cw==')]);}elseif(strpos($cpakc8,base64_decode('T0xEU1RZTEUtTlVNUw=='))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IG9udW0=');$this->$nahk1d6[base64_decode('UGx1cw==')]=str_replace(base64_decode('bG51bQ=='),'',$this->$nahk1d6[base64_decode('UGx1cw==')]);}if(strpos($cpakc8,base64_decode('UFJPUE9SVElPTkFMLU5VTVM='))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IHBudW0=');$this->$nahk1d6[base64_decode('UGx1cw==')]=str_replace(base64_decode('dG51bQ=='),'',$this->$nahk1d6[base64_decode('UGx1cw==')]);}elseif(strpos($cpakc8,base64_decode('VEFCVUxBUi1OVU1T'))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IHRudW0=');$this->$nahk1d6[base64_decode('UGx1cw==')]=str_replace(base64_decode('cG51bQ=='),'',$this->$nahk1d6[base64_decode('UGx1cw==')]);}if(strpos($cpakc8,base64_decode('RElBR09OQUwtRlJBQ1RJT05T'))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IGZyYWM=');$this->$nahk1d6[base64_decode('UGx1cw==')]=str_replace(base64_decode('YWZyYw=='),'',$this->$nahk1d6[base64_decode('UGx1cw==')]);}elseif(strpos($cpakc8,base64_decode('U1RBQ0tFRC1GUkFDVElPTlM='))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IGFmcmM=');$this->$nahk1d6[base64_decode('UGx1cw==')]=str_replace(base64_decode('ZnJhYw=='),'',$this->$nahk1d6[base64_decode('UGx1cw==')]);}break;case base64_decode('Rk9OVC1WQVJJQU5ULUFMVEVSTkFURVM='):$cpakc8=strtoupper($cpakc8);if(!isset($this->$nahk1d6[base64_decode('UGx1cw==')])){$this->$nahk1d6[base64_decode('UGx1cw==')]='';}if(strpos($cpakc8,base64_decode('Tk9STUFM'))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')]=str_replace(base64_decode('aGlzdA=='),'',$this->$nahk1d6[base64_decode('UGx1cw==')]);}if(strpos($cpakc8,base64_decode('SElTVE9SSUNBTC1GT1JNUw=='))!==false){$this->$nahk1d6[base64_decode('UGx1cw==')].=base64_decode('IGhpc3Q=');}break;case base64_decode('Rk9OVC1GRUFUVVJFLVNFVFRJTkdT'):$cpakc8=sagh3c($cpakc8);if(strpos($cpakc8,base64_decode('bm9ybWFs'))!==false){$this->$nahk1d6[base64_decode('RkZNaW51cw==')]='';$this->$nahk1d6[base64_decode('RkZQbHVz')]='';}else{if(!isset($this->$nahk1d6[base64_decode('RkZQbHVz')])){$this->$nahk1d6[base64_decode('RkZQbHVz')]='';}if(!isset($this->$nahk1d6[base64_decode('RkZNaW51cw==')])){$this->$nahk1d6[base64_decode('RkZNaW51cw==')]='';}$lmdr2fe=preg_split(base64_decode('L1ssXS8='),$cpakc8);foreach($lmdr2fe as $xctw16f){if(preg_match(base64_decode('L1tcIlwnXShbYS16QS1aMC05XXs0fSlbXCJcJ11ccyoob258b2ZmfFxkKil7MCwxfS8='),$xctw16f,$iivi1b1)){if($iivi1b1[2]==base64_decode('b2Zm')||$iivi1b1[2]===base64_decode('MA==')){if(strpos($this->$nahk1d6[base64_decode('RkZNaW51cw==')],$iivi1b1[1])===false){$this->$nahk1d6[base64_decode('RkZNaW51cw==')].=base64_decode('IA==').$iivi1b1[1];}$this->$nahk1d6[base64_decode('RkZQbHVz')]=preg_replace(base64_decode('Lw==').$iivi1b1[1].base64_decode('W1xkXSov'),'',$this->$nahk1d6[base64_decode('RkZQbHVz')]);}else{if($iivi1b1[2]==base64_decode('b24=')){$iivi1b1[2]=base64_decode('MQ==');}if(strpos($this->$nahk1d6[base64_decode('RkZQbHVz')],$iivi1b1[1])===false){$this->$nahk1d6[base64_decode('RkZQbHVz')].=base64_decode('IA==').$iivi1b1[1].$iivi1b1[2];}$this->$nahk1d6[base64_decode('RkZNaW51cw==')]=str_replace($iivi1b1[1],'',$this->$nahk1d6[base64_decode('RkZNaW51cw==')]);}}}}break;case base64_decode('VEVYVC1UUkFOU0ZPUk0='):switch(strtoupper($cpakc8)){case base64_decode('Q0FQSVRBTElaRQ=='):$this->$tvtt8b=($this->$tvtt8b|TextVars::FT_CAPITALIZE);$this->$tvtt8b=($this->$tvtt8b&~TextVars::FT_UPPERCASE);$this->$tvtt8b=($this->$tvtt8b&~TextVars::FT_LOWERCASE);break;case base64_decode('VVBQRVJDQVNF'):$this->$tvtt8b=($this->$tvtt8b|TextVars::FT_UPPERCASE);$this->$tvtt8b=($this->$tvtt8b&~TextVars::FT_LOWERCASE);$this->$tvtt8b=($this->$tvtt8b&~TextVars::FT_CAPITALIZE);break;case base64_decode('TE9XRVJDQVNF'):$this->$tvtt8b=($this->$tvtt8b|TextVars::FT_LOWERCASE);$this->$tvtt8b=($this->$tvtt8b&~TextVars::FT_UPPERCASE);$this->$tvtt8b=($this->$tvtt8b&~TextVars::FT_CAPITALIZE);break;case base64_decode('Tk9ORQ=='):break;$this->$tvtt8b=($this->$tvtt8b&~TextVars::FT_UPPERCASE);$this->$tvtt8b=($this->$tvtt8b&~TextVars::FT_LOWERCASE);$this->$tvtt8b=($this->$tvtt8b&~TextVars::FT_CAPITALIZE);}break;case base64_decode('VEVYVC1TSEFET1c='):$ezfa94=$this->$mddeff->abiq2ff($cpakc8);if($ezfa94){$this->$vhrm1dc=$ezfa94;}break;case base64_decode('SFlQSEVOUw=='):if(strtoupper($cpakc8)==base64_decode('Tk9ORQ==')){$this->$dumo1d7[base64_decode('aHlwaGVucw==')]=2;}elseif(strtoupper($cpakc8)==base64_decode('QVVUTw==')){$this->$dumo1d7[base64_decode('aHlwaGVucw==')]=1;}elseif(strtoupper($cpakc8)==base64_decode('TUFOVUFM')){$this->$dumo1d7[base64_decode('aHlwaGVucw==')]=0;}break;case base64_decode('VEVYVC1PVVRMSU5F'):if(strtoupper($cpakc8)==base64_decode('Tk9ORQ==')){$this->$dumo1d7[base64_decode('b3V0bGluZS1z')]=false;}break;case base64_decode('VEVYVC1PVVRMSU5FLVdJRFRI'):case base64_decode('T1VUTElORS1XSURUSA=='):switch(strtoupper($cpakc8)){case base64_decode('VEhJTg=='):$cpakc8=base64_decode('MC4wM2Vt');break;case base64_decode('TUVESVVN'):$cpakc8=base64_decode('MC4wNWVt');break;case base64_decode('VEhJQ0s='):$cpakc8=base64_decode('MC4wN2Vt');break;}$tpmge3=$this->$kcbo116->pqih117($cpakc8,$this->$bfpt118,$this->$bfpt118);if($tpmge3){$this->$dumo1d7[base64_decode('b3V0bGluZS1XSURUSA==')]=$tpmge3;$this->$dumo1d7[base64_decode('b3V0bGluZS1z')]=true;}else{$this->$dumo1d7[base64_decode('b3V0bGluZS1z')]=false;}break;case base64_decode('VEVYVC1PVVRMSU5FLUNPTE9S'):case base64_decode('T1VUTElORS1DT0xPUg=='):if(strtoupper($cpakc8)==base64_decode('SU5WRVJU')){if($this->$ftza1ae){$lfmz20a=$this->$ftza1ae;$this->$dumo1d7[base64_decode('b3V0bGluZS1DT0xPUg==')]=$this->$eenv167->dspe300($lfmz20a);}else{$this->$dumo1d7[base64_decode('b3V0bGluZS1DT0xPUg==')]=$this->$eenv167->pqih117(255,$this->$yqgg168);}}else{$lfmz20a=$this->$eenv167->pqih117($cpakc8,$this->$yqgg168);if($lfmz20a){$this->$dumo1d7[base64_decode('b3V0bGluZS1DT0xPUg==')]=$lfmz20a;}}break;case base64_decode('Q09MT1I='):$lfmz20a=$this->$eenv167->pqih117($cpakc8,$this->$yqgg168);if($lfmz20a){$this->$ftza1ae=$lfmz20a;$this->tmfj20b($lfmz20a);}break;}}if(isset($elvo1dd[base64_decode('VEVYVC1ERUNPUkFUSU9O')])){$cpakc8=$elvo1dd[base64_decode('VEVYVC1ERUNPUkFUSU9O')];if(stristr($cpakc8,base64_decode('TElORS1USFJPVUdI'))){$this->$tvtt8b=($this->$tvtt8b|TextVars::FD_LINETHROUGH);if(isset($this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')])){$this->$dumo1d7[base64_decode('cy1kZWNvcmF0aW9u')][base64_decode('YmFzZWxpbmU=')]=$this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')];}else{$this->$dumo1d7[base64_decode('cy1kZWNvcmF0aW9u')][base64_decode('YmFzZWxpbmU=')]=0;}$this->$dumo1d7[base64_decode('cy1kZWNvcmF0aW9u')][base64_decode('Zm9udGtleQ==')]=$this->$conw84.$this->$yoib1b0;$this->$dumo1d7[base64_decode('cy1kZWNvcmF0aW9u')][base64_decode('Zm9udHNpemU=')]=$this->$bfpt118;$this->$dumo1d7[base64_decode('cy1kZWNvcmF0aW9u')][base64_decode('Y29sb3I=')]=strtoupper($this->$gvjs301);}if(stristr($cpakc8,base64_decode('VU5ERVJMSU5F'))){$this->$tvtt8b=($this->$tvtt8b|TextVars::FD_UNDERLINE);if(isset($this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')])){$this->$dumo1d7[base64_decode('dS1kZWNvcmF0aW9u')][base64_decode('YmFzZWxpbmU=')]=$this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')];}else{$this->$dumo1d7[base64_decode('dS1kZWNvcmF0aW9u')][base64_decode('YmFzZWxpbmU=')]=0;}$this->$dumo1d7[base64_decode('dS1kZWNvcmF0aW9u')][base64_decode('Zm9udGtleQ==')]=$this->$conw84.$this->$yoib1b0;$this->$dumo1d7[base64_decode('dS1kZWNvcmF0aW9u')][base64_decode('Zm9udHNpemU=')]=$this->$bfpt118;$this->$dumo1d7[base64_decode('dS1kZWNvcmF0aW9u')][base64_decode('Y29sb3I=')]=strtoupper($this->$gvjs301);}if(stristr($cpakc8,base64_decode('T1ZFUkxJTkU='))){$this->$tvtt8b=($this->$tvtt8b|TextVars::FD_OVERLINE);if(isset($this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')])){$this->$dumo1d7[base64_decode('by1kZWNvcmF0aW9u')][base64_decode('YmFzZWxpbmU=')]=$this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')];}else{$this->$dumo1d7[base64_decode('by1kZWNvcmF0aW9u')][base64_decode('YmFzZWxpbmU=')]=0;}$this->$dumo1d7[base64_decode('by1kZWNvcmF0aW9u')][base64_decode('Zm9udGtleQ==')]=$this->$conw84.$this->$yoib1b0;$this->$dumo1d7[base64_decode('by1kZWNvcmF0aW9u')][base64_decode('Zm9udHNpemU=')]=$this->$bfpt118;$this->$dumo1d7[base64_decode('by1kZWNvcmF0aW9u')][base64_decode('Y29sb3I=')]=strtoupper($this->$gvjs301);}if(stristr($cpakc8,base64_decode('Tk9ORQ=='))){$this->$tvtt8b=($this->$tvtt8b&~TextVars::FD_UNDERLINE);$this->$tvtt8b=($this->$tvtt8b&~TextVars::FD_LINETHROUGH);$this->$tvtt8b=($this->$tvtt8b&~TextVars::FD_OVERLINE);if(isset($this->$dumo1d7[base64_decode('dS1kZWNvcmF0aW9u')])){unset($this->$dumo1d7[base64_decode('dS1kZWNvcmF0aW9u')]);}if(isset($this->$dumo1d7[base64_decode('cy1kZWNvcmF0aW9u')])){unset($this->$dumo1d7[base64_decode('cy1kZWNvcmF0aW9u')]);}if(isset($this->$dumo1d7[base64_decode('by1kZWNvcmF0aW9u')])){unset($this->$dumo1d7[base64_decode('by1kZWNvcmF0aW9u')]);}}}if($dnzo2df){if(isset($this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')])){$this->$dumo1d7[base64_decode('Ym9yZC1kZWNvcmF0aW9u')][base64_decode('YmFzZWxpbmU=')]=$this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')];}else{$this->$dumo1d7[base64_decode('Ym9yZC1kZWNvcmF0aW9u')][base64_decode('YmFzZWxpbmU=')]=0;}$this->$dumo1d7[base64_decode('Ym9yZC1kZWNvcmF0aW9u')][base64_decode('Zm9udGtleQ==')]=$this->$conw84.$this->$yoib1b0;$this->$dumo1d7[base64_decode('Ym9yZC1kZWNvcmF0aW9u')][base64_decode('Zm9udHNpemU=')]=$this->$bfpt118;}if($fwie2e0){if(isset($this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')])){$this->$dumo1d7[base64_decode('YmctZGVjb3JhdGlvbg==')][base64_decode('YmFzZWxpbmU=')]=$this->$dumo1d7[base64_decode('dGV4dC1iYXNlbGluZQ==')];}else{$this->$dumo1d7[base64_decode('YmctZGVjb3JhdGlvbg==')][base64_decode('YmFzZWxpbmU=')]=0;}$this->$dumo1d7[base64_decode('YmctZGVjb3JhdGlvbg==')][base64_decode('Zm9udGtleQ==')]=$this->$conw84.$this->$yoib1b0;$this->$dumo1d7[base64_decode('YmctZGVjb3JhdGlvbg==')][base64_decode('Zm9udHNpemU=')]=$this->$bfpt118;}}function rbes16($jxerc6,$qtww302){$this->$jxerc6=$qtww302;$mwbm248='';foreach([base64_decode('Qg=='),base64_decode('SQ==')]as $vopwa9){if($this->$vopwa9){$mwbm248.=$vopwa9;}}$this->$bafe1d3=$mwbm248;$this->nscn1ef('',$mwbm248,0,false);}function nenl17($vzct1d2){$mwbm248='';foreach([base64_decode('Qg=='),base64_decode('SQ==')]as $vopwa9){if(isset($vzct1d2[$vopwa9])){if($vzct1d2[$vopwa9]){$this->$vopwa9=true;$mwbm248.=$vopwa9;}else{$this->$vopwa9=false;}}elseif($this->$vopwa9){$mwbm248.=$vopwa9;}}$this->$bafe1d3=$mwbm248;$this->nscn1ef('',$mwbm248,0,false);}function vfwh18($cnux303){$mwbm248='';foreach([base64_decode('Qg=='),base64_decode('SQ==')]as $vopwa9){if(strpos($cnux303,$vopwa9)!==false){$this->$vopwa9=true;$mwbm248.=$vopwa9;}else{$this->$vopwa9=false;}}$this->$bafe1d3=$mwbm248;$this->nscn1ef('',$mwbm248,0,false);}function gtpl19(){foreach([base64_decode('Qg=='),base64_decode('SQ==')]as $vopwa9){$this->$vopwa9=false;}$this->$bafe1d3='';$this->nscn1ef('','',0,false);}function xphy1a($cnux303=''){if($cnux303==''){$this->$rmbf74=base64_decode('PGE+PGFjcm9ueW0+PGFkZHJlc3M+PGFydGljbGU+PGFzaWRlPjxiPjxiZGk+PGJkbz48YmlnPjxibG9ja3F1b3RlPjxicj48Y2FwdGlvbj48Y2VudGVyPjxjaXRlPjxjb2RlPjxkZWw+PGRldGFpbHM+PGRkPjxkaXY+PGRsPjxkdD48ZW0+PGZpZWxkc2V0PjxmaWdjYXB0aW9uPjxmaWd1cmU+PGZvbnQ+PGZvcm0+PGgxPjxoMj48aDM+PGg0PjxoNT48aDY+PGhncm91cD48aHI+PGk+PGltZz48aW5wdXQ+PGlucz48a2JkPjxsZWdlbmQ+PGxpPjxtYWluPjxtYXJrPjxtZXRlcj48bmF2PjxvbD48b3B0aW9uPjxwPjxwcmU+PHByb2dyZXNzPjxxPjxzPjxzYW1wPjxzZWN0aW9uPjxzZWxlY3Q+PHNtYWxsPjxzcGFuPjxzdHJpa2U+PHN0cm9uZz48c3ViPjxzdW1tYXJ5PjxzdXA+PHRhYmxlPjx0Ym9keT48dGQ+PHRlbXBsYXRlPjx0ZXh0YXJlYT48dGZvb3Q+PHRoPjx0aGVhZD48dGltZT48dHI+PHR0Pjx1Pjx1bD48dmFyPjxmb290ZXI+PGhlYWRlcj48YW5ub3RhdGlvbj48Ym9va21hcms+PHRleHRjaXJjbGU+PGJhcmNvZGU+PGRvdHRhYj48aW5kZXhlbnRyeT48aW5kZXhpbnNlcnQ+PHdhdGVybWFya3RleHQ+PHdhdGVybWFya2ltYWdlPjx0dHM+PHR0ej48dHRhPjxjb2x1bW5fYnJlYWs+PGNvbHVtbmJyZWFrPjxuZXdjb2x1bW4+PG5ld3BhZ2U+PHBhZ2VfYnJlYWs+PHBhZ2VicmVhaz48Zm9ybWZlZWQ+PGNvbHVtbnM+PHRvYz48dG9jZW50cnk+PHRvY3BhZ2VicmVhaz48cGFnZWhlYWRlcj48cGFnZWZvb3Rlcj48c2V0cGFnZWhlYWRlcj48c2V0cGFnZWZvb3Rlcj48c2V0aHRtbHBhZ2VoZWFkZXI+PHNldGh0bWxwYWdlZm9vdGVyPg==');}else{$cnux303=explode(base64_decode('LA=='),$cnux303);foreach($cnux303 as $cpakc8){$this->$rmbf74=str_replace(trim($cpakc8),'',$this->$rmbf74);}}}function oapj1b($mzpq304,$asfm305=0,$kttd306=[],$urta307=false){$zwxc308=0;$cjti309=0;$rtlv30a=0;$nfpn30b=false;if((count($kttd306)==0)or((count($kttd306)==1)&&($kttd306[0][0]==''))){return 0;}foreach($kttd306 as $vcad30c){$hzhd30d=$vcad30c[0];$luue30e=(isset($vcad30c[18])?$vcad30c[18]:null);if($this->$zbmh30f){$hzhd30d=preg_replace(base64_decode('L3tpdGVyYXRpb24gKFthLXpBLVowLTlfXSspfS8='),base64_decode('XFwx'),$hzhd30d);}if(substr($hzhd30d,0,3)==base64_decode('u6Ss')){$hpak9d=$this->lqfo20d($hzhd30d);if($hpak9d[base64_decode('dHlwZQ==')]!=base64_decode('aHI=')&&isset($hpak9d[base64_decode('d2lkdGg=')])&&($hpak9d[base64_decode('d2lkdGg=')]/$this->$ckpp200)>($mzpq304+0.0001)){if(($hpak9d[base64_decode('d2lkdGg=')]/$this->$ckpp200)>$rtlv30a){$rtlv30a=($hpak9d[base64_decode('d2lkdGg=')]/$this->$ckpp200);}$nfpn30b=true;}continue;}if($hzhd30d==base64_decode('Cg==')){$zwxc308=0;continue;}$hzhd30d=trim($hzhd30d);if(!empty($luue30e)){$this->$vvdq8f->ehxz99($luue30e,true,true);}if(isset($vcad30c[11])and $vcad30c[11]!=''){if($this->$ckpp200){$this->rvmj201($vcad30c[11]/$this->$ckpp200,false);}else{$this->rvmj201($vcad30c[11],false);}}if(isset($vcad30c[4])and $vcad30c[4]!=''){$bsxk209=$this->nscn1ef($vcad30c[4],$this->$yoib1b0,0,false);}if(isset($vcad30c[2])and $vcad30c[2]!=''){$this->vfwh18($vcad30c[2]);}$dzmd310=$ngwg311=0;if(isset($vcad30c[16])&&!empty($vcad30c[16])){$this->$ywcva6=$vcad30c[16];$dzmd310=(isset($this->$ywcva6[base64_decode('TA==')][base64_decode('dw==')])?$this->$ywcva6[base64_decode('TA==')][base64_decode('dw==')]:0);$ngwg311=(isset($this->$ywcva6[base64_decode('Ug==')][base64_decode('dw==')])?$this->$ywcva6[base64_decode('Ug==')][base64_decode('dw==')]:0);}if(isset($vcad30c[15])){$this->$faig1db=$vcad30c[15];if($this->$faig1db&&strtoupper($this->$faig1db)!=base64_decode('Tk9STUFM')){$this->$fruo202=$this->$kcbo116->pqih117($this->$faig1db,$this->$bfpt118)/$this->$ckpp200;}}if(isset($vcad30c[14])){$this->$faig1db=$vcad30c[14];if(($this->$faig1db||$this->$faig1db===base64_decode('MA=='))&&strtoupper($this->$faig1db)!=base64_decode('Tk9STUFM')){$this->$msmg203=$this->$kcbo116->pqih117($this->$faig1db,$this->$bfpt118)/$this->$ckpp200;}}if(isset($vcad30c[8])){$this->$tvtt8b=$vcad30c[8];}if($urta307||(!preg_match(base64_decode('LyhceGUyXHg4MFx4OGJ8ICkv'),trim($hzhd30d))&&preg_match(base64_decode('Lyhb').$this->$xfsv312.base64_decode('XSkvdQ=='),$hzhd30d))){if(preg_match(base64_decode('Lyhb').$this->$xfsv312.base64_decode('XSkvdQ=='),$hzhd30d)){$zzki313=true;}else{$zzki313=false;}$ywya314=preg_split(base64_decode('Ly91'),$hzhd30d);foreach($ywya314 as $zlgud9=>$eyot315){if($zzki313){if(preg_match(base64_decode('L1s=').$this->$hxwk316.base64_decode('XS91'),$eyot315)&&$zlgud9>0){$eyot315=$ywya314[$zlgud9-1].$eyot315;}if(preg_match(base64_decode('L1s=').$this->$delp317.base64_decode('XS91'),$eyot315)&&$zlgud9<(count($ywya314)-1)){$eyot315=$eyot315.$ywya314[$zlgud9+1];}}$ukyf318=$this->njji9b($eyot315,false,false,$vcad30c[8]);if($zlgud9==0){$ukyf318+=$dzmd310;}if($zlgud9==(count($ywya314)-1)){$ukyf318+=$ngwg311;}if($ukyf318>$mzpq304+0.0001){if($ukyf318>$rtlv30a){$rtlv30a=$ukyf318;}$nfpn30b=true;}}}else{$vaoj319=[];if(isset($vcad30c[18])&&$vcad30c[18]){preg_match_all(base64_decode('LyhceGUyXHg4MFx4OGJ8ICkv'),$hzhd30d,$imiv31a,PREG_OFFSET_CAPTURE);$vbob31b=0;$zlgud9=-1;foreach($imiv31a[0]as $zlgud9=>$iivi1b1){$rzeu1ce=$iivi1b1[1];for($bpxl15a=$vbob31b;$bpxl15a<$rzeu1ce;$bpxl15a++){if(isset($vcad30c[18][base64_decode('R1BPU2luZm8=')][$bpxl15a][base64_decode('WEFkdmFuY2VM')])){if(isset($vaoj319[$zlgud9])){$vaoj319[$zlgud9]+=$vcad30c[18][base64_decode('R1BPU2luZm8=')][$bpxl15a][base64_decode('WEFkdmFuY2VM')];}else{$vaoj319[$zlgud9]=$vcad30c[18][base64_decode('R1BPU2luZm8=')][$bpxl15a][base64_decode('WEFkdmFuY2VM')];}}}$vbob31b=$rzeu1ce+1;}$zlgud9++;foreach($vcad30c[18][base64_decode('R1BPU2luZm8=')]as $bpxl15a=>$trvz31c){if($bpxl15a>=$vbob31b&&isset($vcad30c[18][base64_decode('R1BPU2luZm8=')][$bpxl15a][base64_decode('WEFkdmFuY2VM')])){if(isset($vaoj319[$zlgud9])){$vaoj319[$zlgud9]+=$vcad30c[18][base64_decode('R1BPU2luZm8=')][$bpxl15a][base64_decode('WEFkdmFuY2VM')];}else{$vaoj319[$zlgud9]=$vcad30c[18][base64_decode('R1BPU2luZm8=')][$bpxl15a][base64_decode('WEFkdmFuY2VM')];}}}}$yplg31d=preg_split(base64_decode('LyhceGUyXHg4MFx4OGJ8ICkv'),$hzhd30d);foreach($yplg31d as $zlgud9=>$xrur31e){$xrur31e=trim($xrur31e);$uhmg31f=$this->njji9b($xrur31e,false,false,$vcad30c[8]);if(isset($vaoj319[$zlgud9])){$uhmg31f+=($vaoj319[$zlgud9]*1000/$this->$iyzp8d[base64_decode('dW5pdHNQZXJFbQ==')])*($this->$bfpt118/1000);}if($zlgud9==0){$uhmg31f+=$dzmd310;}if($zlgud9==(count($yplg31d)-1)){$uhmg31f+=$ngwg311;}if(count($yplg31d)==1&&substr($vcad30c[0],0,1)!=base64_decode('IA==')){$zwxc308+=$uhmg31f;}elseif(count($yplg31d)>1&&$zlgud9==0&&substr($vcad30c[0],0,1)!=base64_decode('IA==')){$zwxc308+=$uhmg31f;}else{$zwxc308=$uhmg31f;}$cjti309=max($cjti309,$zwxc308);if(count($yplg31d)==1&&substr($vcad30c[0],-1,1)==base64_decode('IA==')){$zwxc308=0;}elseif(count($yplg31d)>1&&($zlgud9!=(count($yplg31d)-1)||substr($vcad30c[0],-1,1)==base64_decode('IA=='))){$zwxc308=0;}if($uhmg31f>$mzpq304+0.0001){if($uhmg31f>$rtlv30a){$rtlv30a=$uhmg31f;}$nfpn30b=true;}}}if($cjti309>$mzpq304+0.0001){if($cjti309>$rtlv30a){$rtlv30a=$cjti309;}$nfpn30b=true;}if(isset($vcad30c[2])and $vcad30c[2]!=''){$this->gtpl19();}if(isset($vcad30c[4])and $vcad30c[4]!=''){$this->nscn1ef($this->$rbvk1f0,$this->$yoib1b0,0,false);}if(isset($vcad30c[11])and $vcad30c[11]!=''){$this->rvmj201($this->$wrdu1f1,false);}$this->$ywcva6=[];$this->$tvtt8b=0x00;$this->$nahk1d6=[];$this->$faig1db='';$this->$faig1db='';$this->$msmg203=false;$this->$fruo202=0;}if(($nfpn30b)&&($this->$tnul320)){throw new \yrkk1f9\ojjg1fa(base64_decode('V29yZCBpcyB0b28gbG9uZyB0byBmaXQgaW4gdGFibGUgLSA=').$this->$acvq321);}if($nfpn30b){return-$rtlv30a;}else{return 1;}}function wyxk1c(&$qouj20f,$zlgud9){$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfSA==')]/=$zlgud9;$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfVg==')]/=$zlgud9;$qouj20f[base64_decode('cGFkZGluZw==')][base64_decode('VA==')]/=$zlgud9;$qouj20f[base64_decode('cGFkZGluZw==')][base64_decode('Ug==')]/=$zlgud9;$qouj20f[base64_decode('cGFkZGluZw==')][base64_decode('Qg==')]/=$zlgud9;$qouj20f[base64_decode('cGFkZGluZw==')][base64_decode('TA==')]/=$zlgud9;$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('VA==')]/=$zlgud9;$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('Ug==')]/=$zlgud9;$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('Qg==')]/=$zlgud9;$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('TA==')]/=$zlgud9;$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('dw==')]/=$zlgud9;$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')]/=$zlgud9;$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')]/=$zlgud9;$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')]/=$zlgud9;if(isset($qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('VA==')])){$qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('VA==')]/=$zlgud9;}if(isset($qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('Ug==')])){$qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('Ug==')]/=$zlgud9;}if(isset($qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('Qg==')])){$qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('Qg==')]/=$zlgud9;}if(isset($qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('TA==')])){$qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('TA==')]/=$zlgud9;}if($this->$fzri217){$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('dw==')]/=$zlgud9;$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')]/=$zlgud9;$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')]/=$zlgud9;$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')]/=$zlgud9;}$qouj20f[base64_decode('bWl3')]/=$zlgud9;$qouj20f[base64_decode('bWF3')]/=$zlgud9;for($mvuz1c2=0;$mvuz1c2<$qouj20f[base64_decode('bmM=')];$mvuz1c2++){$qouj20f[base64_decode('d2M=')][$mvuz1c2][base64_decode('bWl3')]=isset($qouj20f[base64_decode('d2M=')][$mvuz1c2][base64_decode('bWl3')])?$qouj20f[base64_decode('d2M=')][$mvuz1c2][base64_decode('bWl3')]:0;$qouj20f[base64_decode('d2M=')][$mvuz1c2][base64_decode('bWF3')]=isset($qouj20f[base64_decode('d2M=')][$mvuz1c2][base64_decode('bWF3')])?$qouj20f[base64_decode('d2M=')][$mvuz1c2][base64_decode('bWF3')]:0;$qouj20f[base64_decode('d2M=')][$mvuz1c2][base64_decode('bWl3')]/=$zlgud9;$qouj20f[base64_decode('d2M=')][$mvuz1c2][base64_decode('bWF3')]/=$zlgud9;if(isset($qouj20f[base64_decode('ZGVjaW1hbF9hbGlnbg==')][$mvuz1c2][base64_decode('bWF4czA=')])&&$qouj20f[base64_decode('ZGVjaW1hbF9hbGlnbg==')][$mvuz1c2][base64_decode('bWF4czA=')]){$qouj20f[base64_decode('ZGVjaW1hbF9hbGlnbg==')][$mvuz1c2][base64_decode('bWF4czA=')]/=$zlgud9;}if(isset($qouj20f[base64_decode('ZGVjaW1hbF9hbGlnbg==')][$mvuz1c2][base64_decode('bWF4czE=')])&&$qouj20f[base64_decode('ZGVjaW1hbF9hbGlnbg==')][$mvuz1c2][base64_decode('bWF4czE=')]){$qouj20f[base64_decode('ZGVjaW1hbF9hbGlnbg==')][$mvuz1c2][base64_decode('bWF4czE=')]/=$zlgud9;}if(isset($qouj20f[base64_decode('d2M=')][$mvuz1c2][base64_decode('YWJzbWl3')])&&$qouj20f[base64_decode('d2M=')][$mvuz1c2][base64_decode('YWJzbWl3')]){$qouj20f[base64_decode('d2M=')][$mvuz1c2][base64_decode('YWJzbWl3')]/=$zlgud9;}for($bqaa7a=0;$bqaa7a<$qouj20f[base64_decode('bnI=')];$bqaa7a++){$ybcs322=&$qouj20f[base64_decode('Y2VsbHM=')][$bqaa7a][$mvuz1c2];if(isset($ybcs322)&&$ybcs322){if(!$this->$fzri217){if($this->$wdnu218){$trsf210=$this->ufvx20($ybcs322[base64_decode('Ym9yZGVyYmlu')]);$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('dw==')]/=$zlgud9;$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')]/=$zlgud9;$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')]/=$zlgud9;$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')]/=$zlgud9;$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('VEw=')]/=$zlgud9;$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('VFI=')]/=$zlgud9;$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('Qkw=')]/=$zlgud9;$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('QlI=')]/=$zlgud9;$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('TFQ=')]/=$zlgud9;$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('TEI=')]/=$zlgud9;$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('UlQ=')]/=$zlgud9;$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('UkI=')]/=$zlgud9;$ybcs322[base64_decode('Ym9yZGVyYmlu')]=$this->bvuq1e($trsf210);}else{$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('dw==')]/=$zlgud9;$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')]/=$zlgud9;$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')]/=$zlgud9;$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')]/=$zlgud9;$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('VEw=')]/=$zlgud9;$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('VFI=')]/=$zlgud9;$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('Qkw=')]/=$zlgud9;$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('QlI=')]/=$zlgud9;$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('TFQ=')]/=$zlgud9;$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('TEI=')]/=$zlgud9;$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('UlQ=')]/=$zlgud9;$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('UkI=')]/=$zlgud9;}}$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('VA==')]/=$zlgud9;$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('Ug==')]/=$zlgud9;$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('Qg==')]/=$zlgud9;$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('TA==')]/=$zlgud9;$ybcs322[base64_decode('bWF4cw==')]=isset($ybcs322[base64_decode('bWF4cw==')])?$ybcs322[base64_decode('bWF4cw==')]/=$zlgud9:null;$ybcs322[base64_decode('dw==')]=isset($ybcs322[base64_decode('dw==')])?$ybcs322[base64_decode('dw==')]/=$zlgud9:null;$ybcs322[base64_decode('cw==')]=isset($ybcs322[base64_decode('cw==')])?$ybcs322[base64_decode('cw==')]/=$zlgud9:0;$ybcs322[base64_decode('aA==')]=isset($ybcs322[base64_decode('aA==')])?$ybcs322[base64_decode('aA==')]/=$zlgud9:null;$ybcs322[base64_decode('bWl3')]=isset($ybcs322[base64_decode('bWl3')])?$ybcs322[base64_decode('bWl3')]/=$zlgud9:0;$ybcs322[base64_decode('bWF3')]=isset($ybcs322[base64_decode('bWF3')])?$ybcs322[base64_decode('bWF3')]/=$zlgud9:0;$ybcs322[base64_decode('YWJzbWl3')]=isset($ybcs322[base64_decode('YWJzbWl3')])?$ybcs322[base64_decode('YWJzbWl3')]/=$zlgud9:null;$ybcs322[base64_decode('bmVzdGVkbWF3')]=isset($ybcs322[base64_decode('bmVzdGVkbWF3')])?$ybcs322[base64_decode('bmVzdGVkbWF3')]/=$zlgud9:null;$ybcs322[base64_decode('bmVzdGVkbWl3')]=isset($ybcs322[base64_decode('bmVzdGVkbWl3')])?$ybcs322[base64_decode('bmVzdGVkbWl3')]/=$zlgud9:null;if(isset($ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')])){foreach($ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')]as $bpxl15a=>$eswf323){if(!empty($eswf323[16])){!isset($ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')][$bpxl15a][16][base64_decode('VA==')])||$ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')][$bpxl15a][16][base64_decode('VA==')][base64_decode('dw==')]/=$zlgud9;!isset($ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')][$bpxl15a][16][base64_decode('Qg==')])||$ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')][$bpxl15a][16][base64_decode('Qg==')][base64_decode('dw==')]/=$zlgud9;!isset($ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')][$bpxl15a][16][base64_decode('TA==')])||$ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')][$bpxl15a][16][base64_decode('TA==')][base64_decode('dw==')]/=$zlgud9;!isset($ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')][$bpxl15a][16][base64_decode('Ug==')])||$ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')][$bpxl15a][16][base64_decode('Ug==')][base64_decode('dw==')]/=$zlgud9;}}}unset($ybcs322);}}}}function nfgp1d(&$eakf324){$vopwa9=fread($eakf324,2);$inej75=(ord($vopwa9[0])<<8)+ord($vopwa9[1]);if($inej75&(1<<15)){$inej75=($inej75-(1<<16));}return $inej75;}function bvuq1e($trsf210){if(!is_array($trsf210)||!isset($trsf210)){return '';}if(!$this->$wdnu218){return $trsf210;}$kgmb325=pack(base64_decode('bm5kYTZBMTBubmRhNkExMG5uZGE2QTEwbm5kYTZBMTBuZDk='),$trsf210[base64_decode('Ym9yZGVy')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('cw==')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('Yw==')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('c3R5bGU=')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('ZG9t')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('cw==')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('Yw==')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('c3R5bGU=')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('ZG9t')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('cw==')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('dw==')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('Yw==')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('c3R5bGU=')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('ZG9t')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('cw==')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('Yw==')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('c3R5bGU=')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('ZG9t')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('Qkw=')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('QlI=')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('UlQ=')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('UkI=')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('VEw=')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('VFI=')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('TFQ=')],$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('TEI=')],(isset($trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Y2VsbHBvc2RvbQ==')])?$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Y2VsbHBvc2RvbQ==')]:0));return $kgmb325;}function synb1f($kgmb325){if(!$kgmb325){return[0,0,0,0];}if(!$this->$wdnu218){return[$kgmb325[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('dw==')],$kgmb325[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')],$kgmb325[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')],$kgmb325[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')]];}$dxym163=unpack(base64_decode('bmJvcmQvbnJzL2Rydy9hNnJjYS9BMTByc3QvbnJkL25scy9kbHcvYTZsY2EvQTEwbHN0L25sZC9udHMvZHR3L2E2dGNhL0ExMHRzdC9udGQvbmJzL2Ridy9hNmJjYS9BMTBic3QvbmJkL2RtYmwvZG1ici9kbXJ0L2RtcmIvZG10bC9kbXRyL2RtbHQvZG1sYi9kY3Bk'),$kgmb325);$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')]=$dxym163[base64_decode('cnc=')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')]=$dxym163[base64_decode('bHc=')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('dw==')]=$dxym163[base64_decode('dHc=')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')]=$dxym163[base64_decode('Ync=')];return[$dxym163[base64_decode('dHc=')],$dxym163[base64_decode('cnc=')],$dxym163[base64_decode('Ync=')],$dxym163[base64_decode('bHc=')]];}function ufvx20($kgmb325){if(!$kgmb325){return[];}if(!$this->$wdnu218){return $kgmb325;}$dxym163=unpack(base64_decode('bmJvcmQvbnJzL2Rydy9hNnJjYS9BMTByc3QvbnJkL25scy9kbHcvYTZsY2EvQTEwbHN0L25sZC9udHMvZHR3L2E2dGNhL0ExMHRzdC9udGQvbmJzL2Ridy9hNmJjYS9BMTBic3QvbmJkL2RtYmwvZG1ici9kbXJ0L2RtcmIvZG10bC9kbXRyL2RtbHQvZG1sYi9kY3Bk'),$kgmb325);$trsf210[base64_decode('Ym9yZGVy')]=$dxym163[base64_decode('Ym9yZA==')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('cw==')]=$dxym163[base64_decode('cnM=')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')]=$dxym163[base64_decode('cnc=')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('Yw==')]=str_pad($dxym163[base64_decode('cmNh')],6,base64_decode('AA=='));$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('c3R5bGU=')]=trim($dxym163[base64_decode('cnN0')]);$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('ZG9t')]=$dxym163[base64_decode('cmQ=')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('cw==')]=$dxym163[base64_decode('bHM=')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')]=$dxym163[base64_decode('bHc=')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('Yw==')]=str_pad($dxym163[base64_decode('bGNh')],6,base64_decode('AA=='));$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('c3R5bGU=')]=trim($dxym163[base64_decode('bHN0')]);$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('ZG9t')]=$dxym163[base64_decode('bGQ=')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('cw==')]=$dxym163[base64_decode('dHM=')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('dw==')]=$dxym163[base64_decode('dHc=')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('Yw==')]=str_pad($dxym163[base64_decode('dGNh')],6,base64_decode('AA=='));$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('c3R5bGU=')]=trim($dxym163[base64_decode('dHN0')]);$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('ZG9t')]=$dxym163[base64_decode('dGQ=')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('cw==')]=$dxym163[base64_decode('YnM=')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')]=$dxym163[base64_decode('Ync=')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('Yw==')]=str_pad($dxym163[base64_decode('YmNh')],6,base64_decode('AA=='));$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('c3R5bGU=')]=trim($dxym163[base64_decode('YnN0')]);$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('ZG9t')]=$dxym163[base64_decode('YmQ=')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('Qkw=')]=$dxym163[base64_decode('bWJs')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('QlI=')]=$dxym163[base64_decode('bWJy')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('UlQ=')]=$dxym163[base64_decode('bXJ0')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('UkI=')]=$dxym163[base64_decode('bXJi')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('VEw=')]=$dxym163[base64_decode('bXRs')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('VFI=')]=$dxym163[base64_decode('bXRy')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('TFQ=')]=$dxym163[base64_decode('bWx0')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('bWJ3')][base64_decode('TEI=')]=$dxym163[base64_decode('bWxi')];$trsf210[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Y2VsbHBvc2RvbQ==')]=$dxym163[base64_decode('Y3Bk')];return($trsf210);}function tpao21(&$qouj20f,$uxif326=false){$iknj327=&$qouj20f[base64_decode('Y2VsbHM=')];$uncg328=$qouj20f[base64_decode('bmM=')];$obtj329=$qouj20f[base64_decode('bnI=')];$qfgm32a=[];if($qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){$pzhq32b=$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')]+$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')]+$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('TA==')]+$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('Ug==')]+$qouj20f[base64_decode('cGFkZGluZw==')][base64_decode('TA==')]+$qouj20f[base64_decode('cGFkZGluZw==')][base64_decode('Ug==')]+$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfSA==')];}else{$pzhq32b=$qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('TA==')]/2+$qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('Ug==')]/2+$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('TA==')]+$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('Ug==')];}for($mvuz1c2=0;$mvuz1c2<$uncg328;$mvuz1c2++){$kocv32c=&$qouj20f[base64_decode('d2M=')][$mvuz1c2];for($bqaa7a=0;$bqaa7a<$obtj329;$bqaa7a++){if(isset($iknj327[$bqaa7a][$mvuz1c2])&&$iknj327[$bqaa7a][$mvuz1c2]){$ybcs322=&$iknj327[$bqaa7a][$mvuz1c2];if($this->$fzri217){if($qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){$zdnt32d=$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')]+$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')]+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('TA==')]+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('Ug==')]+$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfSA==')];}else{$zdnt32d=$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')]/2+$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')]/2+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('TA==')]+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('Ug==')];}}else{if($this->$wdnu218){[$nkbe219,$docu21a,$vaip21b,$xwah21c]=$this->synb1f($ybcs322[base64_decode('Ym9yZGVyYmlu')]);}else{$docu21a=$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')];$xwah21c=$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')];}if($qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){$zdnt32d=$xwah21c+$docu21a+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('TA==')]+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('Ug==')]+$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfSA==')];}else{$zdnt32d=$xwah21c/2+$docu21a/2+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('TA==')]+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('Ug==')];}}$iank239=$zdnt32d;if(substr($ybcs322[base64_decode('YQ==')],0,1)==base64_decode('RA==')){$iank239=$qouj20f[base64_decode('ZGVjaW1hbF9hbGlnbg==')][$mvuz1c2][base64_decode('bWF4czA=')]+$qouj20f[base64_decode('ZGVjaW1hbF9hbGlnbg==')][$mvuz1c2][base64_decode('bWF4czE=')]+$zdnt32d;}$ybcs322[base64_decode('YWJzbWl3')]=$iank239;if(isset($ybcs322[base64_decode('Ug==')])&&$ybcs322[base64_decode('Ug==')]){$ybcs322[base64_decode('bWF3')]=$ybcs322[base64_decode('bWl3')]=$this->$bfpt118+$zdnt32d;if(isset($ybcs322[base64_decode('dw==')])){if($ybcs322[base64_decode('bWl3')]<$ybcs322[base64_decode('dw==')]){$ybcs322[base64_decode('bWl3')]=$ybcs322[base64_decode('dw==')];}}if(!isset($ybcs322[base64_decode('Y29sc3Bhbg==')])){if($kocv32c[base64_decode('bWl3')]<$ybcs322[base64_decode('bWl3')]){$kocv32c[base64_decode('bWl3')]=$ybcs322[base64_decode('bWl3')];}if($kocv32c[base64_decode('bWF3')]<$ybcs322[base64_decode('bWF3')]){$kocv32c[base64_decode('bWF3')]=$ybcs322[base64_decode('bWF3')];}if($uxif326){if(isset($qouj20f[base64_decode('bA==')][$mvuz1c2])){$qouj20f[base64_decode('bA==')][$mvuz1c2]+=$ybcs322[base64_decode('bWl3')];}else{$qouj20f[base64_decode('bA==')][$mvuz1c2]=$ybcs322[base64_decode('bWl3')];}}}if($ybcs322[base64_decode('bWl3')]>$kocv32c[base64_decode('bWl3')]){$kocv32c[base64_decode('bWl3')]=$ybcs322[base64_decode('bWl3')];}if($kocv32c[base64_decode('bWl3')]>$kocv32c[base64_decode('bWF3')]){$kocv32c[base64_decode('bWF3')]=$kocv32c[base64_decode('bWl3')];}continue;}if($uxif326){if(isset($ybcs322[base64_decode('cw==')])){$ybcs322[base64_decode('cw==')]+=$zdnt32d;}if(isset($ybcs322[base64_decode('bWF4cw==')])){$ybcs322[base64_decode('bWF4cw==')]+=$zdnt32d;}if(isset($ybcs322[base64_decode('bmVzdGVkbWl3')])){$ybcs322[base64_decode('bmVzdGVkbWl3')]+=$zdnt32d;}if(isset($ybcs322[base64_decode('bmVzdGVkbWF3')])){$ybcs322[base64_decode('bmVzdGVkbWF3')]+=$zdnt32d;}}if(isset($ybcs322[base64_decode('bmVzdGVkbWl3')])&&(!isset($this->$iwdqac[1][1][base64_decode('b3ZlcmZsb3c=')])||$this->$iwdqac[1][1][base64_decode('b3ZlcmZsb3c=')]!=base64_decode('dmlzaWJsZQ=='))){$mukr32e=$ybcs322[base64_decode('bmVzdGVkbWl3')];}else{$mukr32e=$iank239;}if(isset($ybcs322[base64_decode('bWF4cw==')])&&$ybcs322[base64_decode('bWF4cw==')]!=''){$ybcs322[base64_decode('cw==')]=$ybcs322[base64_decode('bWF4cw==')];}if(isset($ybcs322[base64_decode('bmVzdGVkbWF3')])){$ybcs322[base64_decode('bWF3')]=$ybcs322[base64_decode('bmVzdGVkbWF3')];}else{$ybcs322[base64_decode('bWF3')]=$ybcs322[base64_decode('cw==')];}if(isset($qouj20f[base64_decode('b3ZlcmZsb3c=')])&&$qouj20f[base64_decode('b3ZlcmZsb3c=')]==base64_decode('dmlzaWJsZQ==')&&$qouj20f[base64_decode('bGV2ZWw=')]==1){if(($ybcs322[base64_decode('bWF3')]+$pzhq32b)>$this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')]){$ybcs322[base64_decode('bWF3')]=$this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')]-$pzhq32b;}}if(isset($ybcs322[base64_decode('bm93cmFw')])&&$ybcs322[base64_decode('bm93cmFw')]){$mukr32e=$ybcs322[base64_decode('bWF3')];}if(isset($ybcs322[base64_decode('d3BlcmNlbnQ=')])&&$uxif326){if(isset($ybcs322[base64_decode('Y29sc3Bhbg==')])){for($zlgud9=0;$zlgud9<$ybcs322[base64_decode('Y29sc3Bhbg==')];$zlgud9++){$qouj20f[base64_decode('d2M=')][($mvuz1c2+$zlgud9)][base64_decode('d3BlcmNlbnQ=')]=$ybcs322[base64_decode('d3BlcmNlbnQ=')]/$ybcs322[base64_decode('Y29sc3Bhbg==')];}}else{if(isset($qouj20f[base64_decode('dw==')])&&$qouj20f[base64_decode('dw==')]){$ybcs322[base64_decode('dw==')]=$ybcs322[base64_decode('d3BlcmNlbnQ=')]/100*($qouj20f[base64_decode('dw==')]-$pzhq32b);}$kocv32c[base64_decode('d3BlcmNlbnQ=')]=$ybcs322[base64_decode('d3BlcmNlbnQ=')];}}if(isset($qouj20f[base64_decode('b3ZlcmZsb3c=')])&&$qouj20f[base64_decode('b3ZlcmZsb3c=')]==base64_decode('dmlzaWJsZQ==')&&$qouj20f[base64_decode('bGV2ZWw=')]==1){if(isset($ybcs322[base64_decode('dw==')])&&($ybcs322[base64_decode('dw==')]+$pzhq32b)>$this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')]){$ybcs322[base64_decode('dw==')]=$this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')]-$pzhq32b;}}if(isset($ybcs322[base64_decode('dw==')])){if($mukr32e<$ybcs322[base64_decode('dw==')]){$ybcs322[base64_decode('bWl3')]=$ybcs322[base64_decode('dw==')];}if($mukr32e>$ybcs322[base64_decode('dw==')]){$ybcs322[base64_decode('bWl3')]=$ybcs322[base64_decode('dw==')]=$mukr32e;}if(!isset($ybcs322[base64_decode('Y29sc3Bhbg==')])){if(!isset($kocv32c[base64_decode('dw==')])){$kocv32c[base64_decode('dw==')]=1;}}$ybcs322[base64_decode('bWF3')]=$ybcs322[base64_decode('dw==')];}else{$ybcs322[base64_decode('bWl3')]=$mukr32e;}if(isset($ybcs322[base64_decode('bWl3')])&&$ybcs322[base64_decode('bWF3')]<$ybcs322[base64_decode('bWl3')]){$ybcs322[base64_decode('bWF3')]=$ybcs322[base64_decode('bWl3')];}if(!isset($ybcs322[base64_decode('Y29sc3Bhbg==')])){if(isset($ybcs322[base64_decode('bWl3')])&&$kocv32c[base64_decode('bWl3')]<$ybcs322[base64_decode('bWl3')]){$kocv32c[base64_decode('bWl3')]=$ybcs322[base64_decode('bWl3')];}if($kocv32c[base64_decode('bWF3')]<$ybcs322[base64_decode('bWF3')]){$kocv32c[base64_decode('bWF3')]=$ybcs322[base64_decode('bWF3')];}if((isset($kocv32c[base64_decode('YWJzbWl3')])&&$kocv32c[base64_decode('YWJzbWl3')]<$ybcs322[base64_decode('YWJzbWl3')])||!isset($kocv32c[base64_decode('YWJzbWl3')])){$kocv32c[base64_decode('YWJzbWl3')]=$ybcs322[base64_decode('YWJzbWl3')];}if(isset($qouj20f[base64_decode('bA==')][$mvuz1c2])){$qouj20f[base64_decode('bA==')][$mvuz1c2]+=$ybcs322[base64_decode('cw==')];}else{$qouj20f[base64_decode('bA==')][$mvuz1c2]=$ybcs322[base64_decode('cw==')];}}else{$qfgm32a[]=[$bqaa7a,$mvuz1c2];}if(isset($ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')])){if(isset($qouj20f[base64_decode('b3ZlcmZsb3c=')])&&$qouj20f[base64_decode('b3ZlcmZsb3c=')]==base64_decode('d3JhcA==')){$eyot315=true;}else{$eyot315=false;}$jhpi32f=$this->oapj1b($kocv32c[base64_decode('bWl3')]-$zdnt32d,0,$ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')],$eyot315);}else{$jhpi32f=0;}if($jhpi32f<0){if(!isset($ybcs322[base64_decode('Y29sc3Bhbg==')])){$kocv32c[base64_decode('bWl3')]=max((isset($kocv32c[base64_decode('bWl3')])?$kocv32c[base64_decode('bWl3')]:0),((-$jhpi32f)+$zdnt32d));}else{$ybcs322[base64_decode('bWl3')]=max((isset($ybcs322[base64_decode('bWl3')])?$ybcs322[base64_decode('bWl3')]:0),((-$jhpi32f)+$zdnt32d));}}if(!isset($ybcs322[base64_decode('Y29sc3Bhbg==')])){if($kocv32c[base64_decode('bWl3')]>$kocv32c[base64_decode('bWF3')]){$kocv32c[base64_decode('bWF3')]=$kocv32c[base64_decode('bWl3')];}}}unset($ybcs322);}}$kocv32c=&$qouj20f[base64_decode('d2M=')];foreach($qfgm32a as $gizc330){[$bqaa7a,$mvuz1c2]=$gizc330;$ybcs322=&$iknj327[$bqaa7a][$mvuz1c2];$bcli331=$mvuz1c2+$ybcs322[base64_decode('Y29sc3Bhbg==')];if($bcli331>$uncg328){$bcli331=$uncg328;}$lztc332=$rgns333=0;$kpsa334=$mdhj335=0;$dxsv336=[];for($zlgud9=$mvuz1c2;$zlgud9<$bcli331;$zlgud9++){if(isset($qouj20f[base64_decode('bA==')][$zlgud9])){if($ybcs322[base64_decode('Ug==')]){$qouj20f[base64_decode('bA==')][$zlgud9]+=$ybcs322[base64_decode('bWl3')]/$ybcs322[base64_decode('Y29sc3Bhbg==')];}else{$qouj20f[base64_decode('bA==')][$zlgud9]+=$ybcs322[base64_decode('cw==')]/$ybcs322[base64_decode('Y29sc3Bhbg==')];}}else{if($ybcs322[base64_decode('Ug==')]){$qouj20f[base64_decode('bA==')][$zlgud9]=$ybcs322[base64_decode('bWl3')]/$ybcs322[base64_decode('Y29sc3Bhbg==')];}else{$qouj20f[base64_decode('bA==')][$zlgud9]=$ybcs322[base64_decode('cw==')]/$ybcs322[base64_decode('Y29sc3Bhbg==')];}}$lztc332+=$kocv32c[$zlgud9][base64_decode('bWl3')];$kpsa334+=$kocv32c[$zlgud9][base64_decode('bWF3')];if(!isset($ybcs322[base64_decode('dw==')])){$dxsv336[]=$zlgud9;$rgns333+=$kocv32c[$zlgud9][base64_decode('bWl3')];$mdhj335+=$kocv32c[$zlgud9][base64_decode('bWF3')];}}if($ybcs322[base64_decode('bWl3')]>$lztc332){if(!$lztc332){for($zlgud9=$mvuz1c2;$zlgud9<$bcli331;$zlgud9++){$kocv32c[$zlgud9][base64_decode('bWl3')]=$ybcs322[base64_decode('bWl3')]/$ybcs322[base64_decode('Y29sc3Bhbg==')];}}elseif(!count($dxsv336)&&$lztc332!=0){$vmwz337=$ybcs322[base64_decode('bWl3')]-$lztc332;for($zlgud9=$mvuz1c2;$zlgud9<$bcli331;$zlgud9++){$kocv32c[$zlgud9][base64_decode('bWl3')]+=($kocv32c[$zlgud9][base64_decode('bWl3')]/$lztc332)*$vmwz337;}}else{$vmwz337=$ybcs322[base64_decode('bWl3')]-$lztc332;foreach($dxsv336 as $zlgud9){if(!isset($kocv32c[$zlgud9][base64_decode('dw==')])||!$kocv32c[$zlgud9][base64_decode('dw==')]){$kocv32c[$zlgud9][base64_decode('bWl3')]+=($kocv32c[$zlgud9][base64_decode('bWl3')]/$rgns333)*$vmwz337;}}}}if($ybcs322[base64_decode('bWF3')]>$kpsa334){if(!$lztc332){for($zlgud9=$mvuz1c2;$zlgud9<$bcli331;$zlgud9++){$kocv32c[$zlgud9][base64_decode('bWF3')]=$ybcs322[base64_decode('bWF3')]/$ybcs322[base64_decode('Y29sc3Bhbg==')];}}elseif(!count($dxsv336)&&$kpsa334!=0){$vmwz337=$ybcs322[base64_decode('bWF3')]-$kpsa334;for($zlgud9=$mvuz1c2;$zlgud9<$bcli331;$zlgud9++){$kocv32c[$zlgud9][base64_decode('bWF3')]+=($kocv32c[$zlgud9][base64_decode('bWF3')]/$kpsa334)*$vmwz337;}}else{$vmwz337=$ybcs322[base64_decode('bWF3')]-$kpsa334;foreach($dxsv336 as $zlgud9){$kocv32c[$zlgud9][base64_decode('bWF3')]+=$vmwz337/count($dxsv336);}}}unset($ybcs322);}$hhys338=0;$nlmp339=0;$biqk33a=0;for($bqaa7a=0;$bqaa7a<$uncg328;$bqaa7a++){$hhys338+=$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('bWl3')];$nlmp339+=$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('bWF3')];$biqk33a+=isset($qouj20f[base64_decode('bA==')])?$qouj20f[base64_decode('bA==')][$bqaa7a]:0;}if(!isset($qouj20f[base64_decode('dw==')])&&$uxif326){$axau33b=0;$ueml33c=0;for($bqaa7a=0;$bqaa7a<$uncg328;$bqaa7a++){if(isset($qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('d3BlcmNlbnQ=')])&&$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('d3BlcmNlbnQ=')]){$axau33b+=$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('d3BlcmNlbnQ=')];}else{$ueml33c++;}}if($axau33b>=100&&$ueml33c){for($bqaa7a=0;$bqaa7a<$uncg328;$bqaa7a++){if((!isset($qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('d3BlcmNlbnQ=')])||!$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('d3BlcmNlbnQ=')])&&(!isset($qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('dw==')])||!$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('dw==')])){$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('d3BlcmNlbnQ=')]=1;}}}if($axau33b){$igjg33d=(100-$axau33b);$axau33b=max($axau33b,100);$dosh33e=0;$chzf33f=0;$zkuk340=0;$jlse341=0;$nanx342=0;$kvnn343=0;$zeyz344=0;$sjrm345=0;$fvmf346=0;$ithh347=0;for($bqaa7a=0;$bqaa7a<$uncg328;$bqaa7a++){if(isset($qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('d3BlcmNlbnQ=')])){$jlse341=max($jlse341,($qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('bWl3')]*$axau33b/$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('d3BlcmNlbnQ=')]));$sjrm345=max($sjrm345,($qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('bWF3')]*$axau33b/$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('d3BlcmNlbnQ=')]));}else{$dosh33e+=$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('bWl3')];$nanx342+=$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('bWF3')];if(!isset($qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('dw==')])){$chzf33f++;$kvnn343++;}}}if($dosh33e&&$igjg33d>0){$ithh347=$dosh33e*100/$igjg33d;}if($nanx342&&$igjg33d>0){$fvmf346=$nanx342*100/$igjg33d;}if(($ithh347>$hhys338||$jlse341>$hhys338)&&$this->$xnmf348){if($ithh347>$jlse341){$zkuk340=round((($ithh347*$igjg33d/100)-$dosh33e),3);$hhys338=$ithh347;}else{$hhys338=$jlse341;}for($bqaa7a=0;$bqaa7a<$uncg328;$bqaa7a++){if(isset($qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('d3BlcmNlbnQ=')])){$syed349=$hhys338*$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('d3BlcmNlbnQ=')]/100;if($qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('bWl3')]<$syed349){$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('bWl3')]=$syed349;}$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('dw==')]=1;}elseif($zkuk340&&!$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('dw==')]){$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('bWl3')]+=$zkuk340/$chzf33f;}}}if(($fvmf346>$nlmp339||$sjrm345>$nlmp339)){if($fvmf346>$sjrm345){$zeyz344=round((($fvmf346*$igjg33d/100)-$nanx342),3);$nlmp339=$fvmf346;}else{$nlmp339=$sjrm345;}for($bqaa7a=0;$bqaa7a<$uncg328;$bqaa7a++){if(isset($qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('d3BlcmNlbnQ=')])){$wciw34a=$nlmp339*$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('d3BlcmNlbnQ=')]/100;if($qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('bWF3')]<$wciw34a){$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('bWF3')]=$wciw34a;}$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('dw==')]=1;}elseif($zeyz344&&!$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('dw==')]){$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('bWF3')]+=$zeyz344/$kvnn343;}if($qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('bWF3')]<$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('bWl3')]){$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('bWF3')]=$qouj20f[base64_decode('d2M=')][$bqaa7a][base64_decode('bWl3')];}}}if($hhys338>$nlmp339){$nlmp339=$hhys338;}}}if(isset($qouj20f[base64_decode('d3BlcmNlbnQ=')])&&$qouj20f[base64_decode('d3BlcmNlbnQ=')]){$hhys338*=(100/$qouj20f[base64_decode('d3BlcmNlbnQ=')]);$nlmp339*=(100/$qouj20f[base64_decode('d3BlcmNlbnQ=')]);}$hhys338+=$pzhq32b;$nlmp339+=$pzhq32b;if((isset($qouj20f[base64_decode('bWl3')])&&$hhys338>$qouj20f[base64_decode('bWl3')])||!isset($qouj20f[base64_decode('bWl3')])){$qouj20f[base64_decode('bWl3')]=$hhys338;}if((isset($qouj20f[base64_decode('bWF3')])&&$nlmp339>$qouj20f[base64_decode('bWF3')])||!isset($qouj20f[base64_decode('bWF3')])){$qouj20f[base64_decode('bWF3')]=$nlmp339;}$qouj20f[base64_decode('dGw=')]=$biqk33a;if($this->$glff206){$kjba34b=$this->$uyjj34c;}else{$kjba34b=$this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')];}if(!isset($qouj20f[base64_decode('b3ZlcmZsb3c=')])){$qouj20f[base64_decode('b3ZlcmZsb3c=')]=null;}if($qouj20f[base64_decode('b3ZlcmZsb3c=')]==base64_decode('dmlzaWJsZQ==')){return[0,0];}elseif($qouj20f[base64_decode('b3ZlcmZsb3c=')]==base64_decode('aGlkZGVu')&&!$this->$glff206&&!$this->$tavmee&&$hhys338>$kjba34b){$qouj20f[base64_decode('dw==')]=$qouj20f[base64_decode('bWl3')];return[0,0];}if(isset($qouj20f[base64_decode('dw==')])&&$qouj20f[base64_decode('dw==')]){if($qouj20f[base64_decode('dw==')]>=$hhys338&&$qouj20f[base64_decode('dw==')]<=$kjba34b){$qouj20f[base64_decode('bWF3')]=$kjba34b=$qouj20f[base64_decode('dw==')];}elseif($qouj20f[base64_decode('dw==')]>=$hhys338&&$qouj20f[base64_decode('dw==')]>$kjba34b&&$this->$xnmf348){$hhys338=$qouj20f[base64_decode('dw==')];}elseif($qouj20f[base64_decode('dw==')]<$hhys338&&$hhys338<$kjba34b&&$this->$xnmf348){$qouj20f[base64_decode('bWF3')]=$qouj20f[base64_decode('dw==')]=$hhys338;}else{unset($qouj20f[base64_decode('dw==')]);}}$vucy137=$hhys338/$kjba34b;if($hhys338>$kjba34b){return[($vucy137+0.001),$hhys338];}unset($iknj327);return[0,0];}function kymw22(&$qouj20f){$vjzj34d=&$qouj20f[base64_decode('d2M=')];$rpiw34e=$qouj20f[base64_decode('bmM=')];$kjtf34f=0;if($qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){$pzhq32b=$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')]+$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')]+$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('TA==')]+$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('Ug==')]+$qouj20f[base64_decode('cGFkZGluZw==')][base64_decode('TA==')]+$qouj20f[base64_decode('cGFkZGluZw==')][base64_decode('Ug==')]+$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfSA==')];}else{$pzhq32b=$qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('TA==')]/2+$qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('Ug==')]/2+$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('TA==')]+$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('Ug==')];}if($qouj20f[base64_decode('bGV2ZWw=')]>1&&isset($qouj20f[base64_decode('dw==')])){if(isset($qouj20f[base64_decode('d3BlcmNlbnQ=')])&&$qouj20f[base64_decode('d3BlcmNlbnQ=')]){$qouj20f[base64_decode('dw==')]=$qyco350=(($qouj20f[base64_decode('dw==')]-$pzhq32b)*$qouj20f[base64_decode('d3BlcmNlbnQ=')]/100)+$pzhq32b;}else{$qyco350=$qouj20f[base64_decode('dw==')];}}elseif($this->$glff206){$qyco350=$this->$uyjj34c;$hplh351=$this->$nfem7c[$this->$hhln7d][base64_decode('cGFkZGluZ19ib3R0b20=')]+$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')];if($hplh351/$qyco350<0.05){$qyco350-=$hplh351;}}else{if(isset($qouj20f[base64_decode('dw==')])&&$qouj20f[base64_decode('dw==')]<$this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')]){$wkdv352=1;$qyco350=$qouj20f[base64_decode('dw==')];}elseif($qouj20f[base64_decode('b3ZlcmZsb3c=')]==base64_decode('dmlzaWJsZQ==')&&$qouj20f[base64_decode('bGV2ZWw=')]==1){$qyco350=null;}elseif($qouj20f[base64_decode('b3ZlcmZsb3c=')]==base64_decode('aGlkZGVu')&&!$this->$tavmee&&isset($qouj20f[base64_decode('dw==')])&&$qouj20f[base64_decode('dw==')]>$this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')]&&$qouj20f[base64_decode('dw==')]==$qouj20f){$qyco350=$qouj20f[base64_decode('dw==')];}else{$qyco350=$this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')];}}$wtfi353=0;$szhu354=0;$cfpj355=0;for($bqaa7a=0;$bqaa7a<$rpiw34e;$bqaa7a++){if(isset($vjzj34d[$bqaa7a][base64_decode('d3BlcmNlbnQ=')])){$kjtf34f+=$vjzj34d[$bqaa7a][base64_decode('bWF3')];$cfpj355=1;}elseif(isset($vjzj34d[$bqaa7a][base64_decode('dw==')])){$kjtf34f+=$vjzj34d[$bqaa7a][base64_decode('bWl3')];}else{$kjtf34f+=$vjzj34d[$bqaa7a][base64_decode('bWF3')];}$wtfi353+=isset($qouj20f[base64_decode('bA==')])?$qouj20f[base64_decode('bA==')][$bqaa7a]:0;}if(!$wtfi353){$wtfi353=1;}$kjtf34f+=$pzhq32b;if($kjtf34f>$qyco350){$qouj20f[base64_decode('dw==')]=$qyco350;}elseif($kjtf34f<$qyco350&&!isset($qouj20f[base64_decode('dw==')])&&$cfpj355){$qouj20f[base64_decode('dw==')]=$qouj20f[base64_decode('bWF3')];}if(isset($qouj20f[base64_decode('dw==')])&&$qouj20f[base64_decode('dw==')]>$qyco350){$qouj20f[base64_decode('dw==')]=$qyco350;}if(isset($qouj20f[base64_decode('dw==')])&&($qouj20f[base64_decode('dw==')]==$kjtf34f)&&!$cfpj355){for($bqaa7a=0;$bqaa7a<$rpiw34e;$bqaa7a++){$vjzj34d[$bqaa7a]=$vjzj34d[$bqaa7a][base64_decode('bWF3')];}}elseif(isset($qouj20f[base64_decode('dw==')])){$lztc332=$rgns333=0;$dxsv336=[];$nyrx356=[];for($bqaa7a=0;$bqaa7a<$rpiw34e;$bqaa7a++){$lztc332+=$vjzj34d[$bqaa7a][base64_decode('bWl3')];if(!isset($vjzj34d[$bqaa7a][base64_decode('dw==')])||($vjzj34d[$bqaa7a][base64_decode('dw==')]&&$qouj20f[base64_decode('dw==')]>$qyco350&&!$this->$xnmf348&&!$wkdv352)){$dxsv336[]=$bqaa7a;$rgns333+=$vjzj34d[$bqaa7a][base64_decode('bWl3')];$szhu354+=$qouj20f[base64_decode('bA==')][$bqaa7a];}}if(!$szhu354){$szhu354=1;}if($qouj20f[base64_decode('dw==')]>$lztc332+$pzhq32b){if($qouj20f[base64_decode('dw==')]<$qyco350||$this->$xnmf348){for($zlgud9=0;$zlgud9<$rpiw34e;$zlgud9++){if(isset($vjzj34d[$zlgud9][base64_decode('d3BlcmNlbnQ=')])){$wrcf357=$vjzj34d[$zlgud9][base64_decode('bWl3')];$vjzj34d[$zlgud9][base64_decode('bWl3')]=($qouj20f[base64_decode('dw==')]-$pzhq32b)*$vjzj34d[$zlgud9][base64_decode('d3BlcmNlbnQ=')]/100;$lztc332+=$vjzj34d[$zlgud9][base64_decode('bWl3')]-$wrcf357;$rgns333+=$vjzj34d[$zlgud9][base64_decode('bWl3')]-$wrcf357;}}}$ihss358=0;$khsd359=0;if(!count($dxsv336)){$vmwz337=($qouj20f[base64_decode('dw==')]-($lztc332+$pzhq32b));for($zlgud9=0;$zlgud9<$rpiw34e;$zlgud9++){$xhca35a=($qouj20f[base64_decode('bA==')][$zlgud9]/$wtfi353);if($vjzj34d[$zlgud9][base64_decode('bWl3')]+($vmwz337*$xhca35a)>=$vjzj34d[$zlgud9][base64_decode('bWF3')]){$ihss358+=($vmwz337*$xhca35a)-($vjzj34d[$zlgud9][base64_decode('bWF3')]-$vjzj34d[$zlgud9][base64_decode('bWl3')]);$vjzj34d[$zlgud9][base64_decode('bWl3')]=$vjzj34d[$zlgud9][base64_decode('bWF3')];}else{$nyrx356[]=$zlgud9;$khsd359+=$qouj20f[base64_decode('bA==')][$zlgud9];$vjzj34d[$zlgud9][base64_decode('bWl3')]+=($vmwz337*$xhca35a);}}}else{$vmwz337=($qouj20f[base64_decode('dw==')]-($lztc332+$pzhq32b));foreach($dxsv336 as $zlgud9){$xhca35a=($qouj20f[base64_decode('bA==')][$zlgud9]/$szhu354);if($vjzj34d[$zlgud9][base64_decode('bWl3')]+($vmwz337*$xhca35a)>=$vjzj34d[$zlgud9][base64_decode('bWF3')]){$ihss358+=($vmwz337*$xhca35a)-($vjzj34d[$zlgud9][base64_decode('bWF3')]-$vjzj34d[$zlgud9][base64_decode('bWl3')]);$vjzj34d[$zlgud9][base64_decode('bWl3')]=$vjzj34d[$zlgud9][base64_decode('bWF3')];}else{$nyrx356[]=$zlgud9;$khsd359+=$qouj20f[base64_decode('bA==')][$zlgud9];$vjzj34d[$zlgud9][base64_decode('bWl3')]+=($vmwz337*$xhca35a);}}}if($ihss358){if(count($nyrx356)&&count($nyrx356)<$rpiw34e){foreach($nyrx356 as $bqaa7a){if($khsd359){$vjzj34d[$bqaa7a][base64_decode('bWl3')]+=$ihss358*$qouj20f[base64_decode('bA==')][$bqaa7a]/$khsd359;}}}elseif(count($dxsv336)&&count($dxsv336)<$rpiw34e){foreach($dxsv336 as $bqaa7a){$vjzj34d[$bqaa7a][base64_decode('bWl3')]+=$ihss358/count($dxsv336);}}elseif($rpiw34e){$khsd359=array_sum($qouj20f[base64_decode('bA==')]);if($khsd359){for($bqaa7a=0;$bqaa7a<$rpiw34e;$bqaa7a++){$vjzj34d[$bqaa7a][base64_decode('bWl3')]+=$ihss358*$qouj20f[base64_decode('bA==')][$bqaa7a]/$khsd359;}}}}}for($bqaa7a=0;$bqaa7a<$rpiw34e;$bqaa7a++){$vjzj34d[$bqaa7a]=$vjzj34d[$bqaa7a][base64_decode('bWl3')];}$wtnc35b=0;for($bqaa7a=0;$bqaa7a<$rpiw34e;$bqaa7a++){$wtnc35b+=$vjzj34d[$bqaa7a];}if($wtnc35b>($qyco350+0.001-$pzhq32b)){$poyp35c=0;$xqtk35d=0;for($bqaa7a=0;$bqaa7a<$rpiw34e;$bqaa7a++){if((isset($vjzj34d[$bqaa7a])&&$vjzj34d[$bqaa7a]>(($qyco350-$pzhq32b)/$rpiw34e))&&(!isset($vjzj34d[$bqaa7a][base64_decode('dw==')]))){$xqtk35d++;unset($vjzj34d[$bqaa7a]);}else{$poyp35c+=$vjzj34d[$bqaa7a];}}for($bqaa7a=0;$bqaa7a<$rpiw34e;$bqaa7a++){if(!isset($vjzj34d[$bqaa7a])||!$vjzj34d[$bqaa7a]){$vjzj34d[$bqaa7a]=((($qyco350-$pzhq32b)-$poyp35c)/($xqtk35d));}}}}else{$qouj20f[base64_decode('dw==')]=$kjtf34f;for($bqaa7a=0;$bqaa7a<$rpiw34e;$bqaa7a++){if(isset($vjzj34d[$bqaa7a][base64_decode('d3BlcmNlbnQ=')])&&$this->$xnmf348){$jjql35e=$vjzj34d[$bqaa7a][base64_decode('bWF3')];}elseif(isset($vjzj34d[$bqaa7a][base64_decode('dw==')])){$jjql35e=$vjzj34d[$bqaa7a][base64_decode('bWl3')];}else{$jjql35e=$vjzj34d[$bqaa7a][base64_decode('bWF3')];}unset($vjzj34d[$bqaa7a]);$vjzj34d[$bqaa7a]=$jjql35e;}}if($qouj20f[base64_decode('b3ZlcmZsb3c=')]===base64_decode('dmlzaWJsZQ==')&&$qouj20f[base64_decode('bGV2ZWw=')]==1){if($kjtf34f>$this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')]){for($mvuz1c2=0;$mvuz1c2<$rpiw34e;$mvuz1c2++){for($bqaa7a=0;$bqaa7a<$qouj20f[base64_decode('bnI=')];$bqaa7a++){if(isset($qouj20f[base64_decode('Y2VsbHM=')][$bqaa7a][$mvuz1c2])&&$qouj20f[base64_decode('Y2VsbHM=')][$bqaa7a][$mvuz1c2]){$mcze35f=(isset($qouj20f[base64_decode('Y2VsbHM=')][$bqaa7a][$mvuz1c2][base64_decode('Y29sc3Bhbg==')])?$qouj20f[base64_decode('Y2VsbHM=')][$bqaa7a][$mvuz1c2][base64_decode('Y29sc3Bhbg==')]:1);if($mcze35f>1){$tpmge3=0;for($ybcs322=$mvuz1c2;$ybcs322<($mvuz1c2+$mcze35f);$ybcs322++){$tpmge3+=$vjzj34d[$ybcs322];}if($tpmge3>$this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')]){$xuot360=$tpmge3-($this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')]-$pzhq32b);for($ybcs322=$mvuz1c2;$ybcs322<($mvuz1c2+$mcze35f);$ybcs322++){$vjzj34d[$ybcs322]-=$xuot360*($vjzj34d[$ybcs322]/$tpmge3);}$qouj20f[base64_decode('dw==')]-=$xuot360;$qouj20f[base64_decode('Y3Nw')][$mvuz1c2]=$tpmge3-$xuot360;}}}}}}$gtxq361=0;$ixxe362=0;for($bqaa7a=0;$bqaa7a<$rpiw34e;$bqaa7a++){if(isset($qouj20f[base64_decode('Y3Nw')][$bqaa7a])){$tpmge3=$qouj20f[base64_decode('Y3Nw')][$bqaa7a];unset($qouj20f[base64_decode('Y3Nw')][$bqaa7a]);}else{$tpmge3=$vjzj34d[$bqaa7a];}if(($ixxe362+$tpmge3+$pzhq32b)>$this->$nfem7c[$this->$hhln7d][base64_decode('aW5uZXJfd2lkdGg=')]){$gtxq361++;$ixxe362=$vjzj34d[$bqaa7a];}else{$ixxe362+=$vjzj34d[$bqaa7a];}$qouj20f[base64_decode('Y29sUGc=')][$bqaa7a]=$gtxq361;}}}function jtgv23(&$qouj20f){$bnju20e=$qouj20f[base64_decode('bGV2ZWw=')];$aoeo363=$qouj20f[base64_decode('bGV2ZWxpZA==')];$lagk364=&$qouj20f[base64_decode('Y2VsbHM=')];$rpiw34e=$qouj20f[base64_decode('bmM=')];$rgzx365=$qouj20f[base64_decode('bnI=')];$qfgm32a=[];$fugt366=0;$qrra367=0;$zwgg368=0;$xbcj369=0;$mvnf36a=0;$flcz36b=0;$ywmv36c=0;if($this->$glff206){$zenm36d=$this->$fxmn36e;$paap36f=$this->$fxmn36e;}else{$zenm36d=($this->$vxexcb-$this->$aohn104-$this->$aohn104)-$this->$ugka370;$paap36f=($this->$vxexcb-$this->$aohn104-$this->$vxexcb)-$this->$ugka370;$hplh351=$this->$nfem7c[$this->$hhln7d][base64_decode('cGFkZGluZ19ib3R0b20=')]+$this->$nfem7c[$this->$hhln7d][base64_decode('Ym9yZGVyX2JvdHRvbQ==')][base64_decode('dw==')]+$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('Qg==')];if($paap36f>$hplh351&&$hplh351/$paap36f<0.05){$paap36f-=$hplh351;}elseif($paap36f==0){$paap36f=0.001;}if($zenm36d>$hplh351&&$hplh351/$zenm36d<0.05){$zenm36d-=$hplh351;}elseif($zenm36d==0){$zenm36d=0.001;}}if($paap36f<0){$paap36f=0.001;}if($zenm36d<0){$zenm36d=0.001;}for($bqaa7a=0;$bqaa7a<$rgzx365;$bqaa7a++){$ehpy371=&$qouj20f[base64_decode('aHI=')][$bqaa7a];for($mvuz1c2=0;$mvuz1c2<$rpiw34e;$mvuz1c2++){if(isset($lagk364[$bqaa7a][$mvuz1c2])&&$lagk364[$bqaa7a][$mvuz1c2]){$ybcs322=&$lagk364[$bqaa7a][$mvuz1c2];if($this->$fzri217){if($qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){$khaz372=($qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')]+$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')])+($ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('TA==')]+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('Ug==')])+$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfSA==')];$slzv373=($qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('dw==')]+$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')])+($ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('VA==')]+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('Qg==')])+$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfVg==')];}else{$khaz372=($qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')]+$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')])/2+($ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('TA==')]+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('Ug==')]);$slzv373=($qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('dw==')]+$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')])/2+($ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('VA==')]+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('Qg==')]);}}else{if($this->$wdnu218){[$nkbe219,$docu21a,$vaip21b,$xwah21c]=$this->synb1f($ybcs322[base64_decode('Ym9yZGVyYmlu')]);}else{$nkbe219=$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('dw==')];$vaip21b=$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')];$docu21a=$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')];$xwah21c=$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')];}if($qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){$khaz372=$xwah21c+$docu21a+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('TA==')]+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('Ug==')]+$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfSA==')];$slzv373=$nkbe219+$vaip21b+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('VA==')]+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('Qg==')]+$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfVg==')];}else{$khaz372=$xwah21c/2+$docu21a/2+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('TA==')]+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('Ug==')];$slzv373=$nkbe219/2+$vaip21b/2+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('VA==')]+$ybcs322[base64_decode('cGFkZGluZw==')][base64_decode('Qg==')];}}if($qouj20f[base64_decode('b3ZlcmZsb3c=')]==base64_decode('dmlzaWJsZQ==')&&$bnju20e==1){[$qnmje1,$wyvk374]=$this->ftqr25($qouj20f,$bqaa7a,$mvuz1c2);}else{[$qnmje1,$wyvk374]=$this->umca24($qouj20f,$bqaa7a,$mvuz1c2);}if($ybcs322[base64_decode('Ug==')]&&isset($ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')])){$cnux303='';foreach($ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')]as $xctw16f){$cnux303.=$xctw16f[0].base64_decode('IA==');}$cnux303=rtrim($cnux303);$ojfb375=$this->$jvue1af;$esbw376=$this->$conw84;$ybvt377=$this->$yoib1b0;$this->nscn1ef($ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')][0][4],$ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')][0][2],$ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')][0][11]/$this->$ckpp200,true,true);$lvkz378=$this->njji9b($cnux303,true,$ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')][0][18],$ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')][0][8]);if($ybcs322[base64_decode('Ug==')]>=45&&$ybcs322[base64_decode('Ug==')]<90){$lvkz378=((sin(deg2rad($ybcs322[base64_decode('Ug==')])))*$lvkz378)+((sin(deg2rad($ybcs322[base64_decode('Ug==')])))*(($ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')][0][11]/Mpdf::SCALE)/$this->$ckpp200));}$this->nscn1ef($esbw376,$ybvt377,$ojfb375,true,true);$wpvv150=($lvkz378)+$slzv373;}else{if(isset($ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')])&&!empty($ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')])){$this->$eppa23c=$ybcs322[base64_decode('Y2VsbExpbmVIZWlnaHQ=')];$this->$yqgj2cf=$ybcs322[base64_decode('Y2VsbExpbmVTdGFja2luZ1N0cmF0ZWd5')];$this->$gmqe2d0=$ybcs322[base64_decode('Y2VsbExpbmVTdGFja2luZ1NoaWZ0')];$this->$liux1e9=$wyvk374-$khaz372;$lvkz378=$this->rwlqb($ybcs322[base64_decode('dGV4dGJ1ZmZlcg==')],'',true,true);}else{$lvkz378=0;}$wpvv150=$lvkz378+$slzv373;}if(isset($ybcs322[base64_decode('aA==')])&&$ybcs322[base64_decode('aA==')]>$wpvv150){$ybcs322[base64_decode('bWlo')]=$wpvv150;$wpvv150=$ybcs322[base64_decode('aA==')];}else{$ybcs322[base64_decode('bWlo')]=$wpvv150;}if(isset($ybcs322[base64_decode('cm93c3Bhbg==')])){$qfgm32a[]=[$bqaa7a,$mvuz1c2];}elseif($ehpy371<$wpvv150){$ehpy371=$wpvv150;}if($qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){if($bqaa7a==($rgzx365-1)||(isset($ybcs322[base64_decode('cm93c3Bhbg==')])&&($bqaa7a+$ybcs322[base64_decode('cm93c3Bhbg==')])==($rgzx365))){$ekob379=$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('Qg==')]+$qouj20f[base64_decode('cGFkZGluZw==')][base64_decode('Qg==')]+$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')]+$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfVg==')]/2;}else{$ekob379=$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfVg==')]/2;}}else{if(!$this->$fzri217){$ekob379=$vaip21b/2;}elseif($this->$fzri217){$ekob379=$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')]/2;}}if(isset($qouj20f[base64_decode('aXNfdGhlYWQ=')][$bqaa7a])&&$qouj20f[base64_decode('aXNfdGhlYWQ=')][$bqaa7a]){if($mvuz1c2==0){$qrra367+=$wpvv150;$xbcj369+=$wpvv150+$ekob379;}}elseif(isset($qouj20f[base64_decode('aXNfdGZvb3Q=')][$bqaa7a])&&$qouj20f[base64_decode('aXNfdGZvb3Q=')][$bqaa7a]){if($mvuz1c2==0){$flcz36b+=$wpvv150;$ywmv36c+=$wpvv150+$ekob379;}}else{$fugt366=max($fugt366,$wpvv150);$zwgg368=max($zwgg368,$wpvv150+$ekob379);}if($this->$bwrva1==1&&$bqaa7a==(isset($qouj20f[base64_decode('aGVhZGVybnJvd3M=')])?$qouj20f[base64_decode('aGVhZGVybnJvd3M=')]:0)){$mvnf36a=max($wpvv150,$mvnf36a);}unset($ybcs322);}}}$ehpy371=&$qouj20f[base64_decode('aHI=')];foreach($qfgm32a as $gizc330){[$bqaa7a,$mvuz1c2]=$gizc330;$ybcs322=&$lagk364[$bqaa7a][$mvuz1c2];$zqdm37a=$bqaa7a+$ybcs322[base64_decode('cm93c3Bhbg==')];if($zqdm37a>$rgzx365){$zqdm37a=$rgzx365;}$qeio37b=$wmdh37c=0;$dxsv336=[];for($zlgud9=$bqaa7a;$zlgud9<$zqdm37a;$zlgud9++){$qeio37b+=$ehpy371[$zlgud9];$iuzj280=false;for($iivi1b1=0;$iivi1b1<$rpiw34e;$iivi1b1++){$uphd37d=&$lagk364[$zlgud9][$iivi1b1];if(isset($uphd37d[base64_decode('cm93c3Bhbg==')])){continue;}if(isset($uphd37d[base64_decode('aA==')])){$iuzj280=true;break;}}if(!$iuzj280){$dxsv336[]=$zlgud9;}}if($qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){if($bqaa7a==($rgzx365-1)||($bqaa7a+$ybcs322[base64_decode('cm93c3Bhbg==')])==($rgzx365)){$ekob379=$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('Qg==')]+$qouj20f[base64_decode('cGFkZGluZw==')][base64_decode('Qg==')]+$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')]+$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfVg==')]/2;}else{$ekob379=$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfVg==')]/2;}}else{if(!$this->$fzri217){if($this->$wdnu218){[$nkbe219,$docu21a,$vaip21b,$xwah21c]=$this->synb1f($ybcs322[base64_decode('Ym9yZGVyYmlu')]);}else{$vaip21b=$ybcs322[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')];}$ekob379=$vaip21b/2;}elseif($this->$fzri217){$ekob379=$qouj20f[base64_decode('c2ltcGxl')][base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')]/2;}}if(!empty($qouj20f[base64_decode('aXNfdGhlYWQ=')][$bqaa7a])){$qrra367=max($qrra367,$qeio37b);$xbcj369=max($xbcj369,$qeio37b+$ekob379);}elseif(!empty($qouj20f[base64_decode('aXNfdGZvb3Q=')][$bqaa7a])){$flcz36b=max($flcz36b,$qeio37b);$ywmv36c=max($ywmv36c,$qeio37b+$ekob379);}else{$fugt366=max($fugt366,$qeio37b);$zwgg368=max($zwgg368,$qeio37b+$ekob379);}if($this->$bwrva1==1&&$bqaa7a==(isset($qouj20f[base64_decode('aGVhZGVybnJvd3M=')])?$qouj20f[base64_decode('aGVhZGVybnJvd3M=')]:0)){$mvnf36a=max($qeio37b,$mvnf36a);}if($ybcs322[base64_decode('bWlo')]>$qeio37b){if(!$qeio37b){for($zlgud9=$bqaa7a;$zlgud9<$zqdm37a;$zlgud9++){$ehpy371[$zlgud9]=$ybcs322[base64_decode('bWlo')]/$ybcs322[base64_decode('cm93c3Bhbg==')];}}elseif(!count($dxsv336)){$ewrb37e=$ybcs322[base64_decode('bWlo')]-$qeio37b;for($zlgud9=$bqaa7a;$zlgud9<$zqdm37a;$zlgud9++){$ehpy371[$zlgud9]+=($ehpy371[$zlgud9]/$qeio37b)*$ewrb37e;}}else{$ewrb37e=$ybcs322[base64_decode('bWlo')]-$qeio37b;foreach($dxsv336 as $zlgud9){$ehpy371[$zlgud9]+=$ewrb37e/(count($dxsv336));}}}unset($ybcs322);if($ehpy371[$bqaa7a]==0){$zbys37f=$bqaa7a;foreach($qfgm32a as $pinr380){[$ypxb381,$gncg382]=$pinr380;$ybcs322=&$lagk364[$ypxb381][$gncg382];if(isset($ybcs322[base64_decode('cm93c3Bhbg==')])&&$ybcs322[base64_decode('cm93c3Bhbg==')]>1){if(($ypxb381+$ybcs322[base64_decode('cm93c3Bhbg==')]-1)>=$bqaa7a){$zbys37f=min($zbys37f,$ypxb381);}}}$dfzg383=$bqaa7a+$ybcs322[base64_decode('cm93c3Bhbg==')]-1;for($zlgud9=$zbys37f;$zlgud9<=$dfzg383;$zlgud9++){if($zlgud9!=$bqaa7a&&$ehpy371[$zlgud9]==0){break(1);}if($zlgud9==$zbys37f){for($iivi1b1=0;$iivi1b1<$rpiw34e;$iivi1b1++){if(!isset($lagk364[$zlgud9][$iivi1b1])||$lagk364[$zlgud9][$iivi1b1]==0){break(2);}}}elseif($zlgud9==$dfzg383){for($iivi1b1=0;$iivi1b1<$rpiw34e;$iivi1b1++){$ybcs322=&$lagk364[$zlgud9][$iivi1b1];if(isset($ybcs322[base64_decode('cm93c3Bhbg==')])&&$ybcs322[base64_decode('cm93c3Bhbg==')]>1){break(2);}}}}$dnok384=[];$dnra385=0;$esod386=[];for($iivi1b1=0;$iivi1b1<$rpiw34e;$iivi1b1++){for($zlgud9=$zbys37f;$zlgud9<=$dfzg383;$zlgud9++){if(isset($lagk364[$zlgud9][$iivi1b1])&&$lagk364[$zlgud9][$iivi1b1]!=0){$ybcs322=&$lagk364[$zlgud9][$iivi1b1];if(isset($ybcs322[base64_decode('aA==')])&&$ybcs322[base64_decode('aA==')]){$wwvv387=$ybcs322[base64_decode('aA==')];}else{$wwvv387=$ybcs322[base64_decode('bWlo')];}if(isset($dnok384[$iivi1b1])){$dnok384[$iivi1b1]+=$wwvv387;}else{$dnok384[$iivi1b1]=$wwvv387;}if(!isset($ybcs322[base64_decode('cm93c3Bhbg==')])||$ybcs322[base64_decode('cm93c3Bhbg==')]<2){$esod386[$zlgud9]=max((isset($esod386[$zlgud9])?$esod386[$zlgud9]:0),$wwvv387);}}}$dnra385=max($dnra385,$dnok384[$iivi1b1]);}$esod386[$bqaa7a]=$dnra385-array_sum($esod386);for($zlgud9=$zbys37f;$zlgud9<=$dfzg383;$zlgud9++){$ehpy371[$zlgud9]=$esod386[$zlgud9];}}unset($ybcs322);}$qouj20f[base64_decode('aA==')]=array_sum($ehpy371);unset($ehpy371);if($qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){$qouj20f[base64_decode('aA==')]+=$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('VA==')]+$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('Qg==')]+$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('dw==')]+$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')]+$qouj20f[base64_decode('Ym9yZGVyX3NwYWNpbmdfVg==')]+$qouj20f[base64_decode('cGFkZGluZw==')][base64_decode('VA==')]+$qouj20f[base64_decode('cGFkZGluZw==')][base64_decode('Qg==')];}else{$qouj20f[base64_decode('aA==')]+=$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('VA==')]+$qouj20f[base64_decode('bWFyZ2lu')][base64_decode('Qg==')]+$qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('VA==')]/2+$qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('Qg==')]/2;}$dwfc388=$zwgg368+$xbcj369+$ywmv36c;$fwqk389=$mvnf36a+$xbcj369+$ywmv36c;return[$qouj20f[base64_decode('aA==')],$dwfc388,$zenm36d,$paap36f,$fwqk389];}function umca24(&$qouj20f,$bqaa7a,$mvuz1c2){$trsf210=&$qouj20f[base64_decode('Y2VsbHM=')][$bqaa7a][$mvuz1c2];if($trsf210){if(isset($trsf210[base64_decode('eDA=')])){return[$trsf210[base64_decode('eDA=')],$trsf210[base64_decode('dzA=')]];}$qnmje1=0;$vjzj34d=&$qouj20f[base64_decode('d2M=')];for($zlgud9=0;$zlgud9<$mvuz1c2;$zlgud9++){$qnmje1+=$vjzj34d[$zlgud9];}$tpmge3=$vjzj34d[$mvuz1c2];if(isset($trsf210[base64_decode('Y29sc3Bhbg==')])){for($zlgud9=$mvuz1c2+$trsf210[base64_decode('Y29sc3Bhbg==')]-1;$zlgud9>$mvuz1c2;$zlgud9--){$tpmge3+=$vjzj34d[$zlgud9];}}$trsf210[base64_decode('eDA=')]=$qnmje1;$trsf210[base64_decode('dzA=')]=$tpmge3;return[$qnmje1,$tpmge3];}return[0,0];}function ftqr25(&$qouj20f,$bqaa7a,$mvuz1c2){$trsf210=&$qouj20f[base64_decode('Y2VsbHM=')][$bqaa7a][$mvuz1c2];if($trsf210){if(isset($trsf210[base64_decode('eDA=')])){return[$trsf210[base64_decode('eDA=')],$trsf210[base64_decode('dzA=')]];}$qnmje1=0;$vjzj34d=&$qouj20f[base64_decode('d2M=')];$ukzd38a=$qouj20f[base64_decode('Y29sUGc=')][$mvuz1c2];for($zlgud9=0;$zlgud9<$mvuz1c2;$zlgud9++){if($qouj20f[base64_decode('Y29sUGc=')][$zlgud9]==$ukzd38a){$qnmje1+=$vjzj34d[$zlgud9];}}$tpmge3=$vjzj34d[$mvuz1c2];if(isset($trsf210[base64_decode('Y29sc3Bhbg==')])){for($zlgud9=$mvuz1c2+$trsf210[base64_decode('Y29sc3Bhbg==')]-1;$zlgud9>$mvuz1c2;$zlgud9--){if($qouj20f[base64_decode('Y29sUGc=')][$zlgud9]==$ukzd38a){$tpmge3+=$vjzj34d[$zlgud9];}}}$trsf210[base64_decode('eDA=')]=$qnmje1;$trsf210[base64_decode('dzA=')]=$tpmge3;return[$qnmje1,$tpmge3];}return[0,0];}function gwrt26(&$qouj20f,$bqaa7a,$mvuz1c2){$trsf210=&$qouj20f[base64_decode('Y2VsbHM=')][$bqaa7a][$mvuz1c2];if($trsf210){if(isset($trsf210[base64_decode('eTA=')])){return[$trsf210[base64_decode('eTA=')],$trsf210[base64_decode('aDA=')]];}$ekxre2=0;$ehpy371=&$qouj20f[base64_decode('aHI=')];for($zlgud9=0;$zlgud9<$bqaa7a;$zlgud9++){$ekxre2+=$ehpy371[$zlgud9];}$sprqe4=$ehpy371[$bqaa7a];if(isset($trsf210[base64_decode('cm93c3Bhbg==')])){for($zlgud9=$bqaa7a+$trsf210[base64_decode('cm93c3Bhbg==')]-1;$zlgud9>$bqaa7a;$zlgud9--){if(array_key_exists($zlgud9,$ehpy371)){$sprqe4+=$ehpy371[$zlgud9];}else{$this->$uipa38b->tzcd38c(base64_decode('UG9zc2libGUgbm9uLXdlbGxmb3JtZWQgSFRNTCBtYXJrdXAgaW4gYSB0YWJsZQ=='),[base64_decode('Y29udGV4dA==')=>LogContext::HTML_MARKUP]);}}}$trsf210[base64_decode('eTA=')]=$ekxre2;$trsf210[base64_decode('aDA=')]=$sprqe4;return[$ekxre2,$sprqe4];}return[0,0];}function xikg27($qouj20f,$gntb38d){if($gntb38d==$qouj20f[base64_decode('bmM=')]-1){return $qouj20f[base64_decode('aHI=')][$gntb38d];}$dwfc388=$qouj20f[base64_decode('aHI=')][$gntb38d];for($bqaa7a=$gntb38d+1;$bqaa7a<$qouj20f[base64_decode('bnI=')];$bqaa7a++){$aqov38e=0;for($mvuz1c2=0;$mvuz1c2<$qouj20f[base64_decode('bmM=')];$mvuz1c2++){if($qouj20f[base64_decode('Y2VsbHM=')][$bqaa7a][$mvuz1c2]){if(isset($qouj20f[base64_decode('Y2VsbHM=')][$bqaa7a][$mvuz1c2][base64_decode('Y29sc3Bhbg==')])){$aqov38e+=$qouj20f[base64_decode('Y2VsbHM=')][$bqaa7a][$mvuz1c2][base64_decode('Y29sc3Bhbg==')];}else{$aqov38e+=1;}}}if($aqov38e==$qouj20f[base64_decode('bmM=')]){return $dwfc388;}else{$dwfc388+=$qouj20f[base64_decode('aHI=')][$bqaa7a];}}return $dwfc388;}function sokn28($qnmje1,$ekxre2,$tpmge3,$sprqe4,$nmos38f=-1,$cxxc390=[],$iqxc391=false,$uksb392=false,$hrbl393=base64_decode('Y2VsbA=='),$tlij394='',$cmuv395=0,$fxuh396=0){$fzje397=[];if($nmos38f==-1){$this->zdvz398($qnmje1,$ekxre2,$tpmge3,$sprqe4);}elseif($this->$fzri217&&($hrbl393==base64_decode('Y2VsbA=='))){$this->mhap250($cxxc390[base64_decode('TA==')][base64_decode('dw==')]);if($cxxc390[base64_decode('TA==')][base64_decode('Yw==')]){$this->chhp23f($cxxc390[base64_decode('TA==')][base64_decode('Yw==')]);}else{$this->chhp23f($this->$eenv167->pqih117(0,$this->$yqgg168));}$this->qamy24e(0);$this->zdvz398($qnmje1,$ekxre2,$tpmge3,$sprqe4);}elseif($nmos38f){if(!$uksb392&&$iqxc391){$rwge399=base64_decode('TFJUQg==');for($smnz101=0;$smnz101<strlen($rwge399);$smnz101++){$wypg176=$rwge399[$smnz101];$cxxc390[base64_decode('cA==')]=$wypg176;$kvgn39a=0;if(isset($cxxc390[$wypg176][base64_decode('dw==')])){$kvgn39a+=($cxxc390[$wypg176][base64_decode('dw==')]*100000);}if(isset($cxxc390[$wypg176][base64_decode('c3R5bGU=')])){$kvgn39a+=(array_search($cxxc390[$wypg176][base64_decode('c3R5bGU=')],$this->$fqax169)*100);}if(isset($cxxc390[$wypg176][base64_decode('ZG9t')])){$kvgn39a+=($cxxc390[$wypg176][base64_decode('ZG9t')]*10);}$pbyt39b=0;if(isset($cxxc390[$wypg176][base64_decode('Yw==')])&&is_array($cxxc390[$wypg176][base64_decode('Yw==')])){if($cxxc390[$wypg176][base64_decode('Yw==')][0]==3){$pbyt39b=10-(((ord($cxxc390[$wypg176][base64_decode('Yw==')][1])*1.00)+(ord($cxxc390[$wypg176][base64_decode('Yw==')][2])*1.00)+(ord($cxxc390[$wypg176][base64_decode('Yw==')][3])*1.00))/76.5);}}if($pbyt39b){$kvgn39a+=$pbyt39b;}if(isset($cxxc390[base64_decode('Y2VsbHBvc2RvbQ==')])){$kvgn39a+=$cxxc390[base64_decode('Y2VsbHBvc2RvbQ==')];}$zuxo39c=false;if($wypg176==base64_decode('VA==')&&$this->ucby2a($nmos38f,Border::TOP)){$qvnu39d=Border::TOP;$zuxo39c=true;}elseif($wypg176==base64_decode('TA==')&&$this->ucby2a($nmos38f,Border::LEFT)){$qvnu39d=Border::LEFT;$zuxo39c=true;}elseif($wypg176==base64_decode('Ug==')&&$this->ucby2a($nmos38f,Border::RIGHT)){$qvnu39d=Border::RIGHT;$zuxo39c=true;}elseif($wypg176==base64_decode('Qg==')&&$this->ucby2a($nmos38f,Border::BOTTOM)){$qvnu39d=Border::BOTTOM;$zuxo39c=true;}if($zuxo39c){$this->$emsj213[]=pack(base64_decode('QTE2bkNuZGE2QTEwZDE0'),str_pad(sprintf(base64_decode('JTA4Ljdm'),$kvgn39a),16,base64_decode('MA=='),STR_PAD_LEFT),$qvnu39d,ord($wypg176),$cxxc390[$wypg176][base64_decode('cw==')],$cxxc390[$wypg176][base64_decode('dw==')],$cxxc390[$wypg176][base64_decode('Yw==')],$cxxc390[$wypg176][base64_decode('c3R5bGU=')],$qnmje1,$ekxre2,$tpmge3,$sprqe4,$cxxc390[base64_decode('bWJ3')][base64_decode('Qkw=')],$cxxc390[base64_decode('bWJ3')][base64_decode('QlI=')],$cxxc390[base64_decode('bWJ3')][base64_decode('UlQ=')],$cxxc390[base64_decode('bWJ3')][base64_decode('UkI=')],$cxxc390[base64_decode('bWJ3')][base64_decode('VEw=')],$cxxc390[base64_decode('bWJ3')][base64_decode('VFI=')],$cxxc390[base64_decode('bWJ3')][base64_decode('TFQ=')],$cxxc390[base64_decode('bWJ3')][base64_decode('TEI=')],$cxxc390[base64_decode('Y2VsbHBvc2RvbQ==')],0);if($cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('cmlkZ2U=')||$cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('Z3Jvb3Zl')||$cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('aW5zZXQ=')||$cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('b3V0c2V0')||$cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){$cxxc390[$wypg176][base64_decode('b3ZlcmxheQ==')]=true;$this->$emsj213[]=pack(base64_decode('QTE2bkNuZGE2QTEwZDE0'),str_pad(sprintf(base64_decode('JTA4Ljdm'),($kvgn39a+4)),16,base64_decode('MA=='),STR_PAD_LEFT),$qvnu39d,ord($wypg176),$cxxc390[$wypg176][base64_decode('cw==')],$cxxc390[$wypg176][base64_decode('dw==')],$cxxc390[$wypg176][base64_decode('Yw==')],$cxxc390[$wypg176][base64_decode('c3R5bGU=')],$qnmje1,$ekxre2,$tpmge3,$sprqe4,$cxxc390[base64_decode('bWJ3')][base64_decode('Qkw=')],$cxxc390[base64_decode('bWJ3')][base64_decode('QlI=')],$cxxc390[base64_decode('bWJ3')][base64_decode('UlQ=')],$cxxc390[base64_decode('bWJ3')][base64_decode('UkI=')],$cxxc390[base64_decode('bWJ3')][base64_decode('VEw=')],$cxxc390[base64_decode('bWJ3')][base64_decode('VFI=')],$cxxc390[base64_decode('bWJ3')][base64_decode('TFQ=')],$cxxc390[base64_decode('bWJ3')][base64_decode('TEI=')],$cxxc390[base64_decode('Y2VsbHBvc2RvbQ==')],1);}}}return;}if(isset($cxxc390[base64_decode('cA==')])&&strlen($cxxc390[base64_decode('cA==')])>1){$rwge399=$cxxc390[base64_decode('cA==')];}else{$rwge399=base64_decode('TFRSQg==');}$vyyj39e=0;$arld39f=0;$xnbn3a0=0;$angv3a1=0;if(isset($cxxc390[base64_decode('VA==')][base64_decode('dw==')])){$vyyj39e=$cxxc390[base64_decode('VA==')][base64_decode('dw==')];}if(isset($cxxc390[base64_decode('Ug==')][base64_decode('dw==')])){$arld39f=$cxxc390[base64_decode('Ug==')][base64_decode('dw==')];}if(isset($cxxc390[base64_decode('Qg==')][base64_decode('dw==')])){$xnbn3a0=$cxxc390[base64_decode('Qg==')][base64_decode('dw==')];}if(isset($cxxc390[base64_decode('TA==')][base64_decode('dw==')])){$angv3a1=$cxxc390[base64_decode('TA==')][base64_decode('dw==')];}$dphw3a2=$qnmje1+$tpmge3;$pysx3a3=$ekxre2+$sprqe4;$fxrj3a4=$this->$wjdv24d;for($smnz101=0;$smnz101<strlen($rwge399);$smnz101++){$wypg176=$rwge399[$smnz101];$fdee3a5=0;$qfyb3a6=0;$bdec227=0;$izak3a7=0;$afkk3a8=false;if($vyyj39e&&$wypg176==base64_decode('VA==')&&$this->ucby2a($nmos38f,Border::TOP)){$owkr154=$ekxre2;$swjl158=$ekxre2;$xokr153=$qnmje1;$evzt157=$dphw3a2;$this->mhap250($vyyj39e);if($hrbl393==base64_decode('Y2VsbA==')||strpos($tlij394,base64_decode('TA=='))!==false){if($vyyj39e>$angv3a1){$fdee3a5=($vyyj39e-$angv3a1)/2;}if($vyyj39e<$angv3a1){$fdee3a5=($vyyj39e+$angv3a1)/2;}}else{$fdee3a5=$vyyj39e/2-$fxuh396/2;}if($hrbl393==base64_decode('Y2VsbA==')||strpos($tlij394,base64_decode('Ug=='))!==false){if($vyyj39e>$arld39f){$qfyb3a6=($vyyj39e-$arld39f)/2;}if($vyyj39e<$arld39f){$qfyb3a6=($vyyj39e+$arld39f)/2;}}else{$qfyb3a6=$vyyj39e/2-$fxuh396/2;}if(!$uksb392&&!empty($cxxc390[base64_decode('bWJ3')])&&!empty($cxxc390[base64_decode('bWJ3')][base64_decode('VEw=')])){$fdee3a5=($vyyj39e-$cxxc390[base64_decode('bWJ3')][base64_decode('VEw=')])/2;}if(!$uksb392&&!empty($cxxc390[base64_decode('bWJ3')])&&!empty($cxxc390[base64_decode('bWJ3')][base64_decode('VFI=')])){$qfyb3a6=($vyyj39e-$cxxc390[base64_decode('bWJ3')][base64_decode('VFI=')])/2;}$afkk3a8=true;}if($angv3a1&&$wypg176==base64_decode('TA==')&&$this->ucby2a($nmos38f,Border::LEFT)){$owkr154=$ekxre2;$swjl158=$pysx3a3;$xokr153=$qnmje1;$evzt157=$qnmje1;$this->mhap250($angv3a1);if($hrbl393==base64_decode('Y2VsbA==')||strpos($tlij394,base64_decode('VA=='))!==false){if($angv3a1>$vyyj39e){$bdec227=($angv3a1-$vyyj39e)/2;}if($angv3a1<$vyyj39e){$bdec227=($angv3a1+$vyyj39e)/2;}}else{$bdec227=$angv3a1/2-$cmuv395/2;}if($hrbl393==base64_decode('Y2VsbA==')||strpos($tlij394,base64_decode('Qg=='))!==false){if($angv3a1>$xnbn3a0){$izak3a7=($angv3a1-$xnbn3a0)/2;}if($angv3a1<$xnbn3a0){$izak3a7=($angv3a1+$xnbn3a0)/2;}}else{$izak3a7=$angv3a1/2-$cmuv395/2;}if(!$uksb392&&$cxxc390[base64_decode('bWJ3')][base64_decode('TFQ=')]){$bdec227=($angv3a1-$cxxc390[base64_decode('bWJ3')][base64_decode('TFQ=')])/2;}if(!$uksb392&&$cxxc390[base64_decode('bWJ3')][base64_decode('TEI=')]){$izak3a7=($angv3a1-$cxxc390[base64_decode('bWJ3')][base64_decode('TEI=')])/2;}$afkk3a8=true;}if($arld39f&&$wypg176==base64_decode('Ug==')&&$this->ucby2a($nmos38f,Border::RIGHT)){$owkr154=$ekxre2;$swjl158=$pysx3a3;$xokr153=$dphw3a2;$evzt157=$dphw3a2;$this->mhap250($arld39f);if($hrbl393==base64_decode('Y2VsbA==')||strpos($tlij394,base64_decode('VA=='))!==false){if($arld39f<$vyyj39e){$bdec227=($arld39f+$vyyj39e)/2;}if($arld39f>$vyyj39e){$bdec227=($arld39f-$vyyj39e)/2;}}else{$bdec227=$arld39f/2-$cmuv395/2;}if($hrbl393==base64_decode('Y2VsbA==')||strpos($tlij394,base64_decode('Qg=='))!==false){if($arld39f>$xnbn3a0){$izak3a7=($arld39f-$xnbn3a0)/2;}if($arld39f<$xnbn3a0){$izak3a7=($arld39f+$xnbn3a0)/2;}}else{$izak3a7=$arld39f/2-$cmuv395/2;}if(!$uksb392&&!empty($cxxc390[base64_decode('bWJ3')])&&!empty($cxxc390[base64_decode('bWJ3')][base64_decode('UlQ=')])){$bdec227=($arld39f-$cxxc390[base64_decode('bWJ3')][base64_decode('UlQ=')])/2;}if(!$uksb392&&!empty($cxxc390[base64_decode('bWJ3')])&&!empty($cxxc390[base64_decode('bWJ3')][base64_decode('UkI=')])){$izak3a7=($arld39f-$cxxc390[base64_decode('bWJ3')][base64_decode('UkI=')])/2;}$afkk3a8=true;}if($xnbn3a0&&$wypg176==base64_decode('Qg==')&&$this->ucby2a($nmos38f,Border::BOTTOM)){$owkr154=$pysx3a3;$swjl158=$pysx3a3;$xokr153=$qnmje1;$evzt157=$dphw3a2;$this->mhap250($xnbn3a0);if($hrbl393==base64_decode('Y2VsbA==')||strpos($tlij394,base64_decode('TA=='))!==false){if($xnbn3a0>$angv3a1){$fdee3a5=($xnbn3a0-$angv3a1)/2;}if($xnbn3a0<$angv3a1){$fdee3a5=($xnbn3a0+$angv3a1)/2;}}else{$fdee3a5=$xnbn3a0/2-$fxuh396/2;}if($hrbl393==base64_decode('Y2VsbA==')||strpos($tlij394,base64_decode('Ug=='))!==false){if($xnbn3a0>$arld39f){$qfyb3a6=($xnbn3a0-$arld39f)/2;}if($xnbn3a0<$arld39f){$qfyb3a6=($xnbn3a0+$arld39f)/2;}}else{$qfyb3a6=$xnbn3a0/2-$fxuh396/2;}if(!$uksb392&&isset($cxxc390[base64_decode('bWJ3')])&&isset($cxxc390[base64_decode('bWJ3')][base64_decode('Qkw=')])){$fdee3a5=($xnbn3a0-$cxxc390[base64_decode('bWJ3')][base64_decode('Qkw=')])/2;}if(!$uksb392&&isset($cxxc390[base64_decode('bWJ3')])&&isset($cxxc390[base64_decode('bWJ3')][base64_decode('QlI=')])){$qfyb3a6=($xnbn3a0-$cxxc390[base64_decode('bWJ3')][base64_decode('QlI=')])/2;}$afkk3a8=true;}if($afkk3a8){if($cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('ZG91Ymxl')){if(!isset($cxxc390[$wypg176][base64_decode('b3ZlcmxheQ==')])||!$cxxc390[$wypg176][base64_decode('b3ZlcmxheQ==')]||$uksb392){if($cxxc390[$wypg176][base64_decode('Yw==')]){$this->chhp23f($cxxc390[$wypg176][base64_decode('Yw==')]);}else{$this->chhp23f($this->$eenv167->pqih117(0,$this->$yqgg168));}$this->piep2ce($xokr153+$fdee3a5,$owkr154+$bdec227,$evzt157-$qfyb3a6,$swjl158-$izak3a7);}if((isset($cxxc390[$wypg176][base64_decode('b3ZlcmxheQ==')])&&$cxxc390[$wypg176][base64_decode('b3ZlcmxheQ==')])||$uksb392){if($uksb392&&$hrbl393==base64_decode('dGFibGU=')){if($wypg176==base64_decode('VA==')){$fdee3a5-=$this->$wjdv24d/2;$qfyb3a6-=$this->$wjdv24d;if($this->ucby2a($nmos38f,Border::LEFT)){$fdee3a5+=$this->$wjdv24d/2;}if($this->ucby2a($nmos38f,Border::RIGHT)){$qfyb3a6+=$this->$wjdv24d;}}if($wypg176==base64_decode('TA==')){$bdec227-=$this->$wjdv24d/2;$izak3a7-=$this->$wjdv24d;if($this->ucby2a($nmos38f,Border::TOP)){$bdec227+=$this->$wjdv24d/2;}if($this->ucby2a($nmos38f,Border::BOTTOM)){$izak3a7+=$this->$wjdv24d;}}if($wypg176==base64_decode('Qg==')){$fdee3a5-=$this->$wjdv24d/2;$qfyb3a6-=$this->$wjdv24d;if($this->ucby2a($nmos38f,Border::LEFT)){$fdee3a5+=$this->$wjdv24d/2;}if($this->ucby2a($nmos38f,Border::RIGHT)){$qfyb3a6+=$this->$wjdv24d;}}if($wypg176==base64_decode('Ug==')){$bdec227-=$this->$wjdv24d/2;$izak3a7-=$this->$wjdv24d;if($this->ucby2a($nmos38f,Border::TOP)){$bdec227+=$this->$wjdv24d/2;}if($this->ucby2a($nmos38f,Border::BOTTOM)){$izak3a7+=$this->$wjdv24d;}}}$this->mhap250($this->$wjdv24d/3);$bsvi266=$this->$eenv167->pqih117(255,$this->$yqgg168);for($nnsz13b=0;$nnsz13b<=$this->$hhln7d;$nnsz13b++){if($this->$nfem7c[$nnsz13b][base64_decode('Ymdjb2xvcg==')]){$bsvi266=($this->$nfem7c[$nnsz13b][base64_decode('Ymdjb2xvcmFycmF5')]);}}if($uksb392){$fzje397[]=[base64_decode('eA==')=>$xokr153+$fdee3a5,base64_decode('eQ==')=>$owkr154+$bdec227,base64_decode('eDI=')=>$evzt157-$qfyb3a6,base64_decode('eTI=')=>$swjl158-$izak3a7,base64_decode('Y29s')=>$bsvi266,base64_decode('bHc=')=>$this->$wjdv24d,];}else{$this->chhp23f($bsvi266);$this->piep2ce($xokr153+$fdee3a5,$owkr154+$bdec227,$evzt157-$qfyb3a6,$swjl158-$izak3a7);}}}elseif(isset($cxxc390[$wypg176][base64_decode('c3R5bGU=')])&&($cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('cmlkZ2U=')||$cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('Z3Jvb3Zl')||$cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('aW5zZXQ=')||$cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('b3V0c2V0'))){if(!isset($cxxc390[$wypg176][base64_decode('b3ZlcmxheQ==')])||!$cxxc390[$wypg176][base64_decode('b3ZlcmxheQ==')]||$uksb392){if($cxxc390[$wypg176][base64_decode('Yw==')]){$this->chhp23f($cxxc390[$wypg176][base64_decode('Yw==')]);}else{$this->chhp23f($this->$eenv167->pqih117(0,$this->$yqgg168));}if($cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('b3V0c2V0')||$cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('Z3Jvb3Zl')){$uncg328=$this->$eenv167->sglq3a9($cxxc390[$wypg176][base64_decode('Yw==')]);$this->chhp23f($uncg328);}elseif($cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('cmlkZ2U=')||$cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('aW5zZXQ=')){$uncg328=$this->$eenv167->eovx3aa($cxxc390[$wypg176][base64_decode('Yw==')]);$this->chhp23f($uncg328);}$this->piep2ce($xokr153+$fdee3a5,$owkr154+$bdec227,$evzt157-$qfyb3a6,$swjl158-$izak3a7);}if((isset($cxxc390[$wypg176][base64_decode('b3ZlcmxheQ==')])&&$cxxc390[$wypg176][base64_decode('b3ZlcmxheQ==')])||$uksb392){if($cxxc390[$wypg176][base64_decode('Yw==')]){$this->chhp23f($cxxc390[$wypg176][base64_decode('Yw==')]);}else{$this->chhp23f($this->$eenv167->pqih117(0,$this->$yqgg168));}$hywe3ab=($this->$wjdv24d)/3;$this->mhap250($this->$wjdv24d/2);$zldz3ac=$ndgt3ad=$vmoa3ae=$vbco3af=0;if($cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('cmlkZ2U=')||$cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('aW5zZXQ=')){$uncg328=$this->$eenv167->sglq3a9($cxxc390[$wypg176][base64_decode('Yw==')]);if($uksb392&&$hrbl393==base64_decode('dGFibGU=')){if($wypg176==base64_decode('VA==')){$ndgt3ad=$this->$wjdv24d/2;$zldz3ac=-$this->$wjdv24d/2;$vmoa3ae=$this->$wjdv24d;if($this->ucby2a($nmos38f,Border::LEFT)){$zldz3ac+=$this->$wjdv24d;$vmoa3ae-=$this->$wjdv24d;}if($this->ucby2a($nmos38f,Border::RIGHT)){$vmoa3ae-=$this->$wjdv24d*2;}}if($wypg176==base64_decode('TA==')){$zldz3ac=$this->$wjdv24d/2;$ndgt3ad=-$this->$wjdv24d/2;$vbco3af=$this->$wjdv24d;if($this->ucby2a($nmos38f,Border::TOP)){$ndgt3ad+=$this->$wjdv24d;$vbco3af-=$this->$wjdv24d;}if($this->ucby2a($nmos38f,Border::BOTTOM)){$vbco3af-=$this->$wjdv24d*2;}}if($wypg176==base64_decode('Qg==')){$ndgt3ad=$this->$wjdv24d/2;$zldz3ac=-$this->$wjdv24d/2;$vmoa3ae=$this->$wjdv24d;}if($wypg176==base64_decode('Ug==')){$zldz3ac=$this->$wjdv24d/2;$ndgt3ad=-$this->$wjdv24d/2;$vbco3af=$this->$wjdv24d;}}elseif($wypg176==base64_decode('VA==')){$ndgt3ad=$this->$wjdv24d/2;$zldz3ac=$this->$wjdv24d/2;$vmoa3ae=-$this->$wjdv24d*2;}elseif($wypg176==base64_decode('TA==')){$zldz3ac=$this->$wjdv24d/2;$ndgt3ad=$this->$wjdv24d/2;$vbco3af=-$this->$wjdv24d*2;}elseif($wypg176==base64_decode('Qg==')&&$uksb392){$ndgt3ad=$this->$wjdv24d/2;$vmoa3ae=$this->$wjdv24d/2;}elseif($wypg176==base64_decode('Ug==')&&$uksb392){$zldz3ac=$this->$wjdv24d/2;$vbco3af=$this->$wjdv24d/2;}elseif($wypg176==base64_decode('Qg==')){$ndgt3ad=$this->$wjdv24d/2;$zldz3ac=$this->$wjdv24d/2;}elseif($wypg176==base64_decode('Ug==')){$zldz3ac=$this->$wjdv24d/2;$ndgt3ad=$this->$wjdv24d/2;}}else{$uncg328=$this->$eenv167->eovx3aa($cxxc390[$wypg176][base64_decode('Yw==')]);if($uksb392&&$hrbl393==base64_decode('dGFibGU=')){if($wypg176==base64_decode('VA==')){$ndgt3ad=$this->$wjdv24d/2;$zldz3ac=-$this->$wjdv24d/2;$vmoa3ae=$this->$wjdv24d;if($this->ucby2a($nmos38f,Border::LEFT)){$zldz3ac+=$this->$wjdv24d;$vmoa3ae-=$this->$wjdv24d;}}if($wypg176==base64_decode('TA==')){$zldz3ac=$this->$wjdv24d/2;$ndgt3ad=-$this->$wjdv24d/2;$vbco3af=$this->$wjdv24d;if($this->ucby2a($nmos38f,Border::TOP)){$ndgt3ad+=$this->$wjdv24d;$vbco3af-=$this->$wjdv24d;}}if($wypg176==base64_decode('Qg==')){$ndgt3ad=$this->$wjdv24d/2;$zldz3ac=-$this->$wjdv24d/2;$vmoa3ae=$this->$wjdv24d;if($this->ucby2a($nmos38f,Border::LEFT)){$zldz3ac+=$this->$wjdv24d;$vmoa3ae-=$this->$wjdv24d;}}if($wypg176==base64_decode('Ug==')){$zldz3ac=$this->$wjdv24d/2;$ndgt3ad=-$this->$wjdv24d/2;$vbco3af=$this->$wjdv24d;if($this->ucby2a($nmos38f,Border::TOP)){$ndgt3ad+=$this->$wjdv24d;$vbco3af-=$this->$wjdv24d;}}}elseif($wypg176==base64_decode('VA==')){$ndgt3ad=$this->$wjdv24d/2;$zldz3ac=$this->$wjdv24d/2;}elseif($wypg176==base64_decode('TA==')){$zldz3ac=$this->$wjdv24d/2;$ndgt3ad=$this->$wjdv24d/2;}elseif($wypg176==base64_decode('Qg==')&&$uksb392){$ndgt3ad=$this->$wjdv24d/2;$zldz3ac=$this->$wjdv24d/2;}elseif($wypg176==base64_decode('Ug==')&&$uksb392){$zldz3ac=$this->$wjdv24d/2;$ndgt3ad=$this->$wjdv24d/2;}elseif($wypg176==base64_decode('Qg==')){$ndgt3ad=$this->$wjdv24d/2;$zldz3ac=-$this->$wjdv24d/2;$vmoa3ae=$this->$wjdv24d;}elseif($wypg176==base64_decode('Ug==')){$zldz3ac=$this->$wjdv24d/2;$ndgt3ad=-$this->$wjdv24d/2;$vbco3af=$this->$wjdv24d;}}if($uksb392){$fzje397[]=[base64_decode('eA==')=>$xokr153+$fdee3a5+$zldz3ac,base64_decode('eQ==')=>$owkr154+$bdec227+$ndgt3ad,base64_decode('eDI=')=>$evzt157-$qfyb3a6+$zldz3ac+$vmoa3ae,base64_decode('eTI=')=>$swjl158-$izak3a7+$ndgt3ad+$vbco3af,base64_decode('Y29s')=>$uncg328,base64_decode('bHc=')=>$this->$wjdv24d,];}else{$this->chhp23f($uncg328);$this->piep2ce($xokr153+$fdee3a5+$zldz3ac,$owkr154+$bdec227+$ndgt3ad,$evzt157-$qfyb3a6+$zldz3ac+$vmoa3ae,$swjl158-$izak3a7+$ndgt3ad+$vbco3af);}}}else{if($cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('ZGFzaGVk')){$ztxa24b=2;$xzjj24c=1.5;$this->garm244($ztxa24b,($ztxa24b/$xzjj24c)+($this->$wjdv24d*2));}elseif($cxxc390[$wypg176][base64_decode('c3R5bGU=')]==base64_decode('ZG90dGVk')){$this->qamy24e(1);$this->dpnc24f(1);$this->garm244(0.001,($this->$wjdv24d*2));}if($cxxc390[$wypg176][base64_decode('Yw==')]){$this->chhp23f($cxxc390[$wypg176][base64_decode('Yw==')]);}else{$this->chhp23f($this->$eenv167->pqih117(0,$this->$yqgg168));}$this->piep2ce($xokr153+$fdee3a5,$owkr154+$bdec227,$evzt157-$qfyb3a6,$swjl158-$izak3a7);}$this->garm244();$this->dpnc24f(2);}}if($uksb392&&count($fzje397)){foreach($fzje397 as $zvwp3b0){$this->mhap250($zvwp3b0[base64_decode('bHc=')]);$this->chhp23f($zvwp3b0[base64_decode('Y29s')]);$this->piep2ce($zvwp3b0[base64_decode('eA==')],$zvwp3b0[base64_decode('eQ==')],$zvwp3b0[base64_decode('eDI=')],$zvwp3b0[base64_decode('eTI=')]);}}}}function hakb29(&$qihz3b1,$wfpz3b2,$fybq3b3=true){$wfpz3b2=intval($wfpz3b2);if($fybq3b3){$fybq3b3=true;}$qihz3b1=intval($qihz3b1);$qihz3b1=$fybq3b3?($qihz3b1|$wfpz3b2):($qihz3b1&~$wfpz3b2);}function ucby2a($qihz3b1,$wfpz3b2){$wfpz3b2=intval($wfpz3b2);$qihz3b1=intval($qihz3b1);return(($qihz3b1&$wfpz3b2)==$wfpz3b2);}function vzgl2b(&$zfdv3b4,&$siga3b5,&$ccfx3b6,$eowi3b7){if($zfdv3b4&&$zfdv3b4[base64_decode('dw==')]>$siga3b5[base64_decode('dw==')]){$siga3b5=$zfdv3b4;$this->hakb29($ccfx3b6,$eowi3b7);}elseif($zfdv3b4&&$zfdv3b4[base64_decode('dw==')]==$siga3b5[base64_decode('dw==')]&&array_search($zfdv3b4[base64_decode('c3R5bGU=')],$this->$fqax169)>array_search($siga3b5[base64_decode('c3R5bGU=')],$this->$fqax169)){$siga3b5=$zfdv3b4;$this->hakb29($ccfx3b6,$eowi3b7);}}function nvam2c(&$qouj20f){if(!$qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]&&$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')]){$qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('TA==')]=$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')];}if(!$qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]&&$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')]){$qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('Ug==')]=$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')];}if(!$qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]&&$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('dw==')]){$qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('VA==')]=$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('dw==')];}if(!$qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]&&$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')]){$qouj20f[base64_decode('bWF4X2NlbGxfYm9yZGVyX3dpZHRo')][base64_decode('Qg==')]=$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')];}if($this->$fzri217){return;}$lagk364=&$qouj20f[base64_decode('Y2VsbHM=')];$rpiw34e=$qouj20f[base64_decode('bmM=')];$rgzx365=$qouj20f[base64_decode('bnI=')];if(isset($qouj20f[base64_decode('dG9wbnRhaWw=')])&&$qouj20f[base64_decode('dG9wbnRhaWw=')]){$jvmg3b8=$this->gavw2($qouj20f[base64_decode('dG9wbnRhaWw=')]);}if(isset($qouj20f[base64_decode('dGhlYWQtdW5kZXJsaW5l')])&&$qouj20f[base64_decode('dGhlYWQtdW5kZXJsaW5l')]){$zfes3b9=$this->gavw2($qouj20f[base64_decode('dGhlYWQtdW5kZXJsaW5l')]);}for($bqaa7a=0;$bqaa7a<$rgzx365;$bqaa7a++){for($mvuz1c2=0;$mvuz1c2<$rpiw34e;$mvuz1c2++){if(isset($lagk364[$bqaa7a][$mvuz1c2])&&$lagk364[$bqaa7a][$mvuz1c2]){$trsf210=&$lagk364[$bqaa7a][$mvuz1c2];if($this->$wdnu218){$qvnu39d=$this->ufvx20($trsf210[base64_decode('Ym9yZGVyYmlu')]);}else{$qvnu39d=&$lagk364[$bqaa7a][$mvuz1c2];}if(!$qvnu39d[base64_decode('Ym9yZGVy')]&&$qvnu39d[base64_decode('Ym9yZGVy')]!==0&&isset($qouj20f[base64_decode('Ym9yZGVy')])&&$qouj20f[base64_decode('Ym9yZGVy')]&&$this->$soxf3ba){$qvnu39d[base64_decode('Ym9yZGVy')]=$qouj20f[base64_decode('Ym9yZGVy')];$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')]=$qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')];}if(isset($trsf210[base64_decode('Y29sc3Bhbg==')])&&$trsf210[base64_decode('Y29sc3Bhbg==')]>1){$fiol3bb=$trsf210[base64_decode('Y29sc3Bhbg==')];}else{$fiol3bb=1;}if(isset($trsf210[base64_decode('cm93c3Bhbg==')])&&$trsf210[base64_decode('cm93c3Bhbg==')]>1){$nbuc3bc=$trsf210[base64_decode('cm93c3Bhbg==')];}else{$nbuc3bc=1;}$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Y2VsbHBvc2RvbQ==')]=((($bqaa7a+1)/$rgzx365)/10000)+((($mvuz1c2+1)/$rpiw34e)/10);if($this->$mdjf3bd&&!$qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){if($bqaa7a==0){$this->vzgl2b($qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')],$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')],$qvnu39d[base64_decode('Ym9yZGVy')],Border::TOP);}if($bqaa7a==($rgzx365-1)||($bqaa7a+$nbuc3bc)==($rgzx365)){$this->vzgl2b($qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')],$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')],$qvnu39d[base64_decode('Ym9yZGVy')],Border::BOTTOM);}if($mvuz1c2==0){$this->vzgl2b($qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')],$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')],$qvnu39d[base64_decode('Ym9yZGVy')],Border::LEFT);}if($mvuz1c2==($rpiw34e-1)||($mvuz1c2+$fiol3bb)==($rpiw34e)){$this->vzgl2b($qouj20f[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')],$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')],$qvnu39d[base64_decode('Ym9yZGVy')],Border::RIGHT);}}$jtnh3be=true;if(isset($qouj20f[base64_decode('dG9wbnRhaWw=')])&&$qouj20f[base64_decode('dG9wbnRhaWw=')]){if($bqaa7a==0){$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')]=$jvmg3b8;$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::TOP);}if($this->$bwrva1==1&&$qouj20f[base64_decode('aGVhZGVybnJvd3M=')]>0&&$bqaa7a==$qouj20f[base64_decode('aGVhZGVybnJvd3M=')]-1){$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')]=$jvmg3b8;$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::BOTTOM);$jtnh3be=false;}elseif($this->$bwrva1==1&&$qouj20f[base64_decode('aGVhZGVybnJvd3M=')]>0&&$bqaa7a==$qouj20f[base64_decode('aGVhZGVybnJvd3M=')]){if(!$qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')]=$jvmg3b8;$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::TOP);}}if($this->$bwrva1==1&&$qouj20f[base64_decode('Zm9vdGVybnJvd3M=')]>0&&$bqaa7a==($rgzx365-$qouj20f[base64_decode('Zm9vdGVybnJvd3M=')]-1)){if(!$qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')]=$jvmg3b8;$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::BOTTOM);$jtnh3be=false;}}elseif($this->$bwrva1==1&&$qouj20f[base64_decode('Zm9vdGVybnJvd3M=')]>0&&$bqaa7a==($rgzx365-$qouj20f[base64_decode('Zm9vdGVybnJvd3M=')])){$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')]=$jvmg3b8;$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::TOP);}if($this->$mahl3bf){if(!$qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')]=$jvmg3b8;$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::TOP);}}if($bqaa7a==($rgzx365-1)||($bqaa7a+$nbuc3bc)==($rgzx365)){$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')]=$jvmg3b8;$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::BOTTOM);}}if(isset($qouj20f[base64_decode('dGhlYWQtdW5kZXJsaW5l')])&&$qouj20f[base64_decode('dGhlYWQtdW5kZXJsaW5l')]){if($qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){if($bqaa7a==0){$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')]=$zfes3b9;$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::BOTTOM);$jtnh3be=false;}}else{if($this->$bwrva1==1&&$qouj20f[base64_decode('aGVhZGVybnJvd3M=')]>0&&$bqaa7a==$qouj20f[base64_decode('aGVhZGVybnJvd3M=')]-1){$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')]=$zfes3b9;$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::TOP);}elseif($this->$mahl3bf){$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')]=$zfes3b9;$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::TOP);}}}if(!$qouj20f[base64_decode('Ym9yZGVyc19zZXBhcmF0ZQ==')]){if(($bqaa7a<($rgzx365-1)||($bqaa7a+$nbuc3bc)<$rgzx365)&&$jtnh3be){for($dlxb3c0=0;$dlxb3c0<$fiol3bb;$dlxb3c0++){if(isset($lagk364[($bqaa7a+$nbuc3bc)][$mvuz1c2+$dlxb3c0])){if($this->$wdnu218){$vnbv3c1=$lagk364[($bqaa7a+$nbuc3bc)][$mvuz1c2+$dlxb3c0];$exit3c2=$this->ufvx20($vnbv3c1[base64_decode('Ym9yZGVyYmlu')]);}else{$exit3c2=&$lagk364[($bqaa7a+$nbuc3bc)][$mvuz1c2+$dlxb3c0];}}else{$exit3c2=false;}if(isset($exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('cw==')])&&$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('cw==')]==1){$nolj3c3=$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('dw==')];$bcqy3c4=$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('dw==')];if($qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('c3R5bGU=')]==base64_decode('aGlkZGVu')){$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')]=$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')];$this->hakb29($exit3c2[base64_decode('Ym9yZGVy')],Border::TOP,false);$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::BOTTOM,false);}elseif($exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('c3R5bGU=')]==base64_decode('aGlkZGVu')){$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')]=$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')];$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::BOTTOM,false);$this->hakb29($exit3c2[base64_decode('Ym9yZGVy')],Border::TOP,false);}elseif($bcqy3c4>$nolj3c3){if(!isset($lagk364[($bqaa7a+$nbuc3bc)][$mvuz1c2+$dlxb3c0][base64_decode('Y29sc3Bhbg==')])||(isset($lagk364[($bqaa7a+$nbuc3bc)][$mvuz1c2+$dlxb3c0][base64_decode('Y29sc3Bhbg==')])&&$lagk364[($bqaa7a+$nbuc3bc)][$mvuz1c2+$dlxb3c0][base64_decode('Y29sc3Bhbg==')]<2)){$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')]=$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')];$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::BOTTOM);}}elseif($nolj3c3>$bcqy3c4){if($fiol3bb<2){$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')]=$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')];$this->hakb29($exit3c2[base64_decode('Ym9yZGVy')],Border::TOP);}}elseif(array_search($qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('c3R5bGU=')],$this->$fqax169)>array_search($exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('c3R5bGU=')],$this->$fqax169)){if(!isset($lagk364[($bqaa7a+$nbuc3bc)][$mvuz1c2+$dlxb3c0][base64_decode('Y29sc3Bhbg==')])||(isset($lagk364[($bqaa7a+$nbuc3bc)][$mvuz1c2+$dlxb3c0][base64_decode('Y29sc3Bhbg==')])&&$lagk364[($bqaa7a+$nbuc3bc)][$mvuz1c2+$dlxb3c0][base64_decode('Y29sc3Bhbg==')]<2)){$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')]=$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')];$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::BOTTOM);}}elseif(array_search($exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('c3R5bGU=')],$this->$fqax169)>array_search($qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('c3R5bGU=')],$this->$fqax169)){if($fiol3bb<2){$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')]=$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')];$this->hakb29($exit3c2[base64_decode('Ym9yZGVy')],Border::TOP);}}elseif($exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')][base64_decode('ZG9t')]>$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')][base64_decode('ZG9t')]){if($fiol3bb<2){$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')]=$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')];$this->hakb29($exit3c2[base64_decode('Ym9yZGVy')],Border::TOP);}}else{if(!isset($lagk364[($bqaa7a+$nbuc3bc)][$mvuz1c2+$dlxb3c0][base64_decode('Y29sc3Bhbg==')])||(isset($lagk364[($bqaa7a+$nbuc3bc)][$mvuz1c2+$dlxb3c0][base64_decode('Y29sc3Bhbg==')])&&$lagk364[($bqaa7a+$nbuc3bc)][$mvuz1c2+$dlxb3c0][base64_decode('Y29sc3Bhbg==')]<2)){$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')]=$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')];$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::BOTTOM);}}}elseif($exit3c2){if(!isset($lagk364[($bqaa7a+$nbuc3bc)][$mvuz1c2+$dlxb3c0][base64_decode('Y29sc3Bhbg==')])||(isset($lagk364[($bqaa7a+$nbuc3bc)][$mvuz1c2+$dlxb3c0][base64_decode('Y29sc3Bhbg==')])&&$lagk364[($bqaa7a+$nbuc3bc)][$mvuz1c2+$dlxb3c0][base64_decode('Y29sc3Bhbg==')]<2)){$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('VA==')]=$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Qg==')];}}if($exit3c2&&$this->$wdnu218){$lagk364[$bqaa7a+$nbuc3bc][$mvuz1c2+$dlxb3c0][base64_decode('Ym9yZGVyYmlu')]=$this->bvuq1e($exit3c2);}unset($exit3c2);}}if($mvuz1c2<($rpiw34e-1)||($mvuz1c2+$fiol3bb)<$rpiw34e){for($dlxb3c0=0;$dlxb3c0<$nbuc3bc;$dlxb3c0++){if(isset($lagk364[($bqaa7a+$dlxb3c0)][$mvuz1c2+$fiol3bb])){if($this->$wdnu218){$vnbv3c1=$lagk364[($bqaa7a+$dlxb3c0)][$mvuz1c2+$fiol3bb];$exit3c2=$this->ufvx20($vnbv3c1[base64_decode('Ym9yZGVyYmlu')]);}else{$exit3c2=&$lagk364[$bqaa7a+$dlxb3c0][$mvuz1c2+$fiol3bb];}}else{$exit3c2=false;}if($exit3c2&&$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('cw==')]==1){$nolj3c3=$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('dw==')];$bcqy3c4=$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('dw==')];if($qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')][base64_decode('c3R5bGU=')]==base64_decode('aGlkZGVu')){$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')]=$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')];$this->hakb29($exit3c2[base64_decode('Ym9yZGVy')],Border::LEFT,false);$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::RIGHT,false);}elseif($exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')][base64_decode('c3R5bGU=')]==base64_decode('aGlkZGVu')){$qvnu39d[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('Ug==')]=$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')];$this->hakb29($qvnu39d[base64_decode('Ym9yZGVy')],Border::RIGHT,false);$this->hakb29($exit3c2[base64_decode('Ym9yZGVy')],Border::LEFT,false);}elseif($bcqy3c4>$nolj3c3){if(!isset($lagk364[($bqaa7a+$dlxb3c0)][$mvuz1c2+$fiol3bb][base64_decode('cm93c3Bhbg==')])||(isset($lagk364[($bqaa7a+$dlxb3c0)][$mvuz1c2+$fiol3bb][base64_decode('cm93c3Bhbg==')])&&$lagk364[($bqaa7a+$dlxb3c0)][$mvuz1c2+$fiol3bb][base64_decode('cm93c3Bhbg==')]<2)){$exit3c2[base64_decode('Ym9yZGVyX2RldGFpbHM=')][base64_decode('TA==')]=$qvnu39d[base64_decode(