<?php
/*
Generated by OutputBooks Team
*/

goto yiJnv;
yiJnv:
if (!defined("\102\x41\x53\105\120\101\x54\x48")) {
    exit("\x4e\x6f\40\x64\x69\162\145\143\x74\x20\163\x63\x72\x69\x70\164\x20\141\143\x63\x65\x73\x73\40\141\154\154\x6f\x77\145\144");
}
goto XpnbJ;
XpnbJ:
if (!function_exists("\x6f\142\x5f\147\145\x74\x5f\x64\145\x6c\x69\155\151\164\x65\162")) {
    function ob_get_delimiter($file = '')
    {
        goto lkhZh;
        Kchql:
        $csv = file_get_contents($file);
        goto dMBMN;
        SC10X:
        reset($res);
        goto lvg3H;
        lkhZh:
        $delimiters = array("\163\145\155\151\x63\157\x6c\x6f\x6e" => "\x3b", "\164\141\x62" => "\x9", "\143\x6f\155\155\x61" => "\x2c", "\160\x69\160\x65" => "\x7c");
        goto Kchql;
        heCop:
        return $delimiters[$first_key];
        goto xNJZC;
        lvg3H:
        $first_key = key($res);
        goto heCop;
        yBGbx:
        LN8FL:
        goto uScgA;
        uScgA:
        arsort($res);
        goto SC10X;
        dMBMN:
        foreach ($delimiters as $key => $delim) {
            $res[$key] = substr_count($csv, $delim);
            RUePg:
        }
        goto yBGbx;
        xNJZC:
    }
}
goto XjFs_;
XjFs_:
if (!function_exists("\x6f\x62\x5f\x67\x72\x69\144\x5f\x70\x61\162\x73\x65")) {
    function ob_grid_parse($Filepath = '', $param = array())
    {
        goto ne6BP;
        onLHM:
        date_default_timezone_set("\x55\124\103");
        goto PTl2F;
        PTl2F:
        try {
            goto Xb2KQ;
            eCZw9:
            return $parsedData;
            goto kK4e5;
            nEWYk:
            $parsedData = array("\x6c\151\163\x74\x49\x74\145\155\x73" => array(), "\170\x6c\163\x48\145\x61\144\145\x72" => array());
            goto okFTJ;
            GouEk:
            if ($Extension == "\x70\x64\x66" || $Extension == "\152\160\x67" || $Extension == "\x70\x6e\x67") {
                goto hwFYt;
                YDnhq:
                curl_close($curl);
                goto ejYaM;
                ejYaM:
                exit;
                goto sysaW;
                IVVbI:
                curl_setopt_array($curl, [CURLOPT_URL => "\x68\x74\x74\160\x3a\57\57\x31\62\x37\x2e\x30\56\60\x2e\61\72\x35\60\60\x30\57\145\x78\164\162\141\x63\164\x5f\144\x61\x74\x61", CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => ["\146\x69\x6c\145" => new CURLFile($Filepath)]]);
                goto ilAZw;
                G8GuO:
                if (curl_errno($curl)) {
                    echo "\x43\165\162\154\40\145\162\x72\x6f\162\72\40" . curl_error($curl);
                } else {
                    print_R($response);
                }
                goto YDnhq;
                hwFYt:
                $curl = curl_init();
                goto IVVbI;
                ilAZw:
                $response = curl_exec($curl);
                goto G8GuO;
                sysaW:
            } else {
                if ($Extension != "\143\163\166" && $Extension != "\x74\163\x76" && pathinfo($Filepath, PATHINFO_EXTENSION) == "\x74\145\x78\164\x2f\160\154\x61\151\x6e") {
                    $delim = ob_get_delimiter($Filepath);
                    if ($delim == "\x9") {
                        goto phE2O;
                        phE2O:
                        copy($Filepath, $Filepath . "\56\164\x73\x76");
                        goto GhIrt;
                        GhIrt:
                        $Filepath = $Filepath . "\x2e\x74\163\166";
                        goto vXUYf;
                        vXUYf:
                        $Extension = "\164\x73\x76";
                        goto i5rfJ;
                        i5rfJ:
                    } else {
                        if ($delim == "\x2c") {
                            goto kj2CR;
                            PMINl:
                            $Filepath = $Filepath . "\56\143\163\x76";
                            goto e00IN;
                            e00IN:
                            $Extension = "\x63\163\x76";
                            goto OyNIP;
                            kj2CR:
                            copy($Filepath, $Filepath . "\56\x63\x73\x76");
                            goto PMINl;
                            OyNIP:
                        }
                    }
                }
            }
            goto hQcg1;
            Gf51T:
            $isDataDetected = false;
            goto zzy_K;
            i3lqY:
            if (!$isDataDetected) {
                return $parsedData;
            }
            goto eCZw9;
            wEDKE:
            $sMonth = array('', "\152\x61\x6e", "\146\x65\x62", "\155\x61\x72", "\141\160\162", "\155\141\x79", "\x6a\165\156", "\152\x75\154", "\141\x75\x67", "\163\x65\x70", "\157\143\x74", "\156\x6f\166", "\x64\145\143");
            goto VNIu7;
            P8hzy:
            NbF_2:
            goto i3lqY;
            l1OW8:
            foreach ($Spreadsheet as $Row) {
                goto xL9t9;
                DBgs1:
                $Row = array_map("\x74\x72\x69\x6d", $Row);
                goto x7j_h;
                tBJ5z:
                if ($identified >= 4) {
                    $isDataDetected = true;
                } else {
                    $isDataDetected = false;
                    goto NbF_2;
                }
                goto DfNLm;
                FxVFx:
                if ($Extension == "\x63\163\166" && (!is_array($Row) || count($Row) == 1)) {
                    $Row = str_getcsv($Row[0]);
                }
                goto UoDXl;
                enEBt:
                $identified = 0;
                goto DBgs1;
                UoDXl:
                if ($isDataDetected) {
                    goto cHq3Q;
                    EkmxM:
                    goto rWXZ_;
                    goto DW0mQ;
                    oah0i:
                    if (empty($rowData) || empty($rowData["\151\x74\145\x6d\116\x61\x6d\145"])) {
                        goto rWXZ_;
                    }
                    goto D3VPb;
                    D3VPb:
                    $parsedData["\x6c\151\163\x74\111\164\x65\155\163"][] = $rowData;
                    goto EkmxM;
                    nETmX:
                    LE5wT:
                    goto iVx4p;
                    cHq3Q:
                    $rowData = array();
                    goto TKA1e;
                    TKA1e:
                    $emptyDetect = 0;
                    goto TiLSG;
                    TiLSG:
                    foreach ($indexes as $key => $val) {
                        goto mYMAd;
                        yJAY1:
                        if (empty($Row[$index]) && $key == "\x69\164\145\155\116\141\155\145" && $cellsInfo && !empty($cellsInfo[$index]) && $cellsInfo[$index]["\x63\157\154\x73\160\x61\x6e"] > 1) {
                            if (!empty($Row[$index - 1])) {
                                $indexes[$key] = array($index - 1);
                            }
                        }
                        goto p01Pe;
                        SdrP5:
                        M_9xS:
                        goto Zgf8g;
                        mYMAd:
                        $index = $val[0];
                        goto yJAY1;
                        p01Pe:
                        if (empty($Row[$index])) {
                            $emptyDetect++;
                        } else {
                            goto w5qZp;
                            bN5oR:
                            if (!$Row[$index]) {
                                if ($key == "\x69\164\x65\155\116\x61\x6d\x65") {
                                    $Row[$index - 1];
                                }
                                goto M_9xS;
                            }
                            goto OFDjV;
                            J4Ogz:
                            buNAC:
                            goto MWfvM;
                            C1Qk7:
                            switch ($key) {
                                case "\x6d\x66\147\104\141\x74\145":
                                case "\x65\x78\x70\x44\141\164\145":
                                    goto Rk965;
                                    Rk965:
                                    $Row[$index] = str_replace($sMonth, array_keys($sMonth), str_replace($lMonth, array_keys($lMonth), strtolower($Row[$index])));
                                    goto bySwV;
                                    S4cGs:
                                    if (!$date["\x79\x65\x61\162"]) {
                                        goto bsk8q;
                                    }
                                    goto k304d;
                                    EoYSE:
                                    $date = implode("\x2f", $date);
                                    goto xCyO7;
                                    xCyO7:
                                    $date = date_parse($date);
                                    goto S4cGs;
                                    k304d:
                                    $date = $date["\x79\x65\x61\x72"] . "\x2d" . str_pad($date["\x6d\157\156\x74\150"], 2, "\x30", STR_PAD_LEFT) . "\x2d" . str_pad($date["\144\141\171"], 2, "\x30", STR_PAD_LEFT);
                                    goto NIMFI;
                                    ekIt2:
                                    $date = explode("\57", $date);
                                    goto F8NqU;
                                    F8NqU:
                                    if (!empty($date) && !empty($date[2]) && strlen($date[2]) == 2) {
                                        $date[2] = "\x32\60" . $date[2];
                                    }
                                    goto EoYSE;
                                    NIMFI:
                                    $Row[$index] = $date;
                                    goto K0cJa;
                                    bySwV:
                                    $date = preg_replace("\x2f\x28\134\144\53\51\133\134\x2f\x7c\134\55\174\54\174\x5c\163\x5d\50\x5c\x64\53\x29\x5b\134\x2f\174\134\55\174\x2c\174\134\163\x5d\50\x5c\x64\x2b\x29\57\x69", "\x24\62\x2f\44\61\x2f\44\63", $Row[$index]);
                                    goto MRUhQ;
                                    MRUhQ:
                                    if (is_numeric($date)) {
                                        $date = gmdate("\x6d\x2f\x64\x2f\131", ($date - 25569) * 86400);
                                    }
                                    goto ekIt2;
                                    K0cJa:
                                    goto bsk8q;
                                    goto JNai4;
                                    JNai4:
                                case "\x71\164\x79":
                                case "\x72\141\x74\x65":
                                case "\144\x69\x73\143\x6f\165\x6e\164":
                                case "\x74\x61\x78\x61\142\154\145\101\x6d\x6f\165\x6e\164":
                                    if (count($val) > 1) {
                                        foreach ($val as $v) {
                                            goto jHP3s;
                                            oiweU:
                                            F5SVU:
                                            goto LvJR9;
                                            jHP3s:
                                            $Row[$v] = (double) str_replace("\x2c", '', $Row[$v]);
                                            goto DufAq;
                                            DufAq:
                                            $index = $v;
                                            goto ym1I3;
                                            ym1I3:
                                            if (!empty($Row[$v])) {
                                                goto ozVig;
                                            }
                                            goto oiweU;
                                            LvJR9:
                                        }
                                        ozVig:
                                    } else {
                                        $Row[$index] = (double) str_replace("\54", '', $Row[$index]);
                                    }
                                    goto bsk8q;
                                case "\x69\164\145\155\x4e\141\x6d\145":
                                    if (count($val) > 1) {
                                        $Row[$index] = implode("\54\40", array_filter(array_intersect_key($Row, array_flip($val))));
                                    }
                                    goto bsk8q;
                            }
                            goto J4Ogz;
                            OFDjV:
                            if ($key == "\x69\x74\145\x6d\x4e\x61\x6d\x65" && strpos($param[$key], $Row[$index]) !== false) {
                                goto LE5wT;
                            }
                            goto C1Qk7;
                            w5qZp:
                            $Row[$index] = preg_replace("\57\134\163\x2b\57", "\x20", trim($Row[$index]));
                            goto bN5oR;
                            Qgp18:
                            $rowData[$key] = $Row[$index];
                            goto ZUMIl;
                            MWfvM:
                            bsk8q:
                            goto Qgp18;
                            ZUMIl:
                        }
                        goto SdrP5;
                        Zgf8g:
                    }
                    goto nETmX;
                    iVx4p:
                    if ($emptyDetect && count($indexes) == $emptyDetect) {
                        goto rWXZ_;
                    }
                    goto oah0i;
                    DW0mQ:
                }
                goto enEBt;
                x7j_h:
                foreach ($patterns as $key => $pattern) {
                    goto k6od6;
                    KFIX5:
                    $identified++;
                    goto Rzbjz;
                    NWv68:
                    $keys = array_keys($output);
                    goto eqb0l;
                    eqb0l:
                    $indexes[$key] = $keys;
                    goto KFIX5;
                    HiKf9:
                    if (empty($output)) {
                        goto bq5uY;
                    }
                    goto NWv68;
                    Rzbjz:
                    bq5uY:
                    goto bWJoB;
                    k6od6:
                    $output = preg_grep($pattern, $Row);
                    goto HiKf9;
                    bWJoB:
                }
                goto y44OS;
                DfNLm:
                rWXZ_:
                goto P0wCM;
                xL9t9:
                $cellsInfo = $Spreadsheet->getCellsInfo();
                goto FxVFx;
                y44OS:
                i_aYN:
                goto vOppP;
                vOppP:
                $parsedData["\170\x6c\163\110\x65\x61\144\x65\x72"] = $Row;
                goto tBJ5z;
                P0wCM:
            }
            goto P8hzy;
            fL796:
            $patterns = array();
            goto t1lpX;
            Xb2KQ:
            $Extension = strtolower(pathinfo($Filepath, PATHINFO_EXTENSION));
            goto GouEk;
            VNIu7:
            $lMonth = array('', "\152\x61\x6e\165\x61\x72\171", "\x66\x65\142\x72\x75\141\x72\x79", "\x6d\x61\x72\x63\150", "\141\x70\162\151\154", "\155\141\171", "\x6a\x75\156\145", "\x6a\x75\154\171", "\x61\x75\x67\165\x73\x74", "\163\x65\160\164\145\x6d\142\145\x72", "\157\x63\x74\157\x62\145\x72", "\x6e\x6f\x76\145\155\142\x65\x72", "\x64\145\x63\x65\155\x62\x65\x72");
            goto l1OW8;
            Bv6oF:
            hfQnY:
            goto wEDKE;
            hQcg1:
            $Spreadsheet = new SpreadsheetReader($Filepath, false, false, array("\x42\165\x69\x6c\x74\x69\156\x46\x6f\162\x6d\141\164\163" => array(14 => "\144\x64\x2d\x6d\155\x2d\x79\171\x79\171", 22 => "\144\x2f\x6d\x2f\x79\171\40\150\x3a\x6d\x6d")));
            goto Gf51T;
            t1lpX:
            foreach ($param as $key => $val) {
                goto L0Ddg;
                xIEeu:
                $patterns[$key] = "\57\136\x28" . implode("\174", $val) . "\x29" . ($isExactMatch ? "\x24" : '') . "\x2f\151";
                goto KQyvn;
                L0Ddg:
                if (!is_array($val)) {
                    $val = preg_quote(stripslashes($val));
                    $val = preg_split("\57\x28\x2c\174\73\51\57", $val);
                }
                goto BLFGG;
                BEzZ1:
                $val = str_replace("\x2f", "\x5c\57", $val);
                goto xIEeu;
                KQyvn:
                aQagS:
                goto CKDB9;
                BLFGG:
                $val = array_map("\164\162\x69\155", $val);
                goto BEzZ1;
                CKDB9:
            }
            goto Bv6oF;
            zzy_K:
            $indexes = array();
            goto nEWYk;
            okFTJ:
            $isExactMatch = true;
            goto fL796;
            kK4e5:
        } catch (Exception $E) {
            throw $E;
            return false;
        }
        goto ERQ_U;
        ne6BP:
        require_once APPPATH . "\x74\150\151\162\x64\137\x70\x61\162\x74\x79\57\x73\x70\162\145\x61\144\x73\x68\145\145\x74\55\162\145\x61\144\145\162\x2f\160\150\160\55\x65\170\x63\x65\154\55\x72\145\x61\x64\145\162\x2f\145\x78\x63\x65\x6c\137\162\145\141\x64\x65\x72\62\56\160\x68\160";
        goto MoAZp;
        MoAZp:
        require_once APPPATH . "\x74\150\151\162\x64\137\x70\x61\162\x74\x79\x2f\x73\x70\x72\x65\x61\144\163\x68\x65\145\164\55\x72\x65\x61\x64\x65\162\x2f\x53\x70\x72\145\141\x64\x73\150\x65\145\164\122\145\x61\144\145\x72\56\x70\x68\x70";
        goto onLHM;
        ERQ_U:
    }
}
