<?php
$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"] ?: array()) + array("_ef3a72fcbe8" . "57b2afe45cb9" . "d8cafb253" => base64_decode("Z" . "W" . "5" . "k"), "_59ac4def563863" . "6b8e25ff64d5f6c" . "2c8" => base64_decode("Rg=" . "="), "_8dabb06efc" . "95df4cff7c4" . "afe91857b53" => base64_decode("bmF" . "tZQ" . "=="), "_2efc2c1faee0ff18" . "16817e945b9bd2f0" => base64_decode("LTEgbW9u" . "dGg="), "_1f6779e91fd3ba3953db" . "a6a08c462ac5" => base64_decode("KzEgb" . "W9udG" . "g="), "_d8c4ad80bf9e8f2ff7766b61d1f" . "5ea0b" => base64_decode("bGlua" . "19pZA" . "=="), "_3146fac6116b6cfbfb529241aa6c4" . "614" => base64_decode("ZnV" . "sbA" . "=="), "_0ea4e32b57963ac0cb3057e03e9aef6" . "4" => base64_decode("a" . "W" . "Q" . "="), "_84929763267bc12007295ccd54f6291" . "4" => base64_decode("Y29sb3" . "I="), "_85d1a5cd112f9c" . "816e198a44c17b2" . "305" => base64_decode("Li4vY29tbW9uL2" . "NhbGVuZGFyX3Br" . "Zy5waHA="), "_aac291547a403778eb65919" . "95cbc2db9" => base64_decode("bWQ" . "="), "_ccd9e402149a4aff4" . "a20de187781aa41" => base64_decode("c3RhcnQ" . "="), "_ae18cd25271a5df040f9a" . "0b94fde51ab" => base64_decode("Y2x" . "uX2" . "lk"));





class CalendarMini extends ErrorHandler
{
    
    
    
    
    protected $date;
    
    
    
    
    protected $start_date;
    protected $event_array;
    protected $week_start_day;
    
    
    
    
    protected $now;
    
    
    
    
    
    
    protected $cln_ids;
    public function __construct($_d2cc62d335ad25b1ef74e7d3ef30c83a)
    {
        $this->week_start_day = $_d2cc62d335ad25b1ef74e7d3ef30c83a;
    }
    
    
    
    
    
    
    
    public function Init(DateDay $_67a0d624aebcceb0abd5ce56a53ff06f, $_ecae772125035be7dc4d38556a47ea8c)
    {
        require_once $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_85d1a5cd" . "112f9c816" . "e198a44c1" . "7b2305"];
        $this->cln_ids = $_ecae772125035be7dc4d38556a47ea8c;
        $this->now = new DateDay();
        $this->date = new DateDay($_67a0d624aebcceb0abd5ce56a53ff06f);
        $_edba27c2338aecb284a6cc74c9b794ea = new CalendarControllerView($this->week_start_day);
        $_edba27c2338aecb284a6cc74c9b794ea->Init(new Date($this->date), CALENDAR_VIEW_MONTH);
        $this->start_date = $_edba27c2338aecb284a6cc74c9b794ea->getPeriodStart();
        if (empty($_ecae772125035be7dc4d38556a47ea8c)) {
            $_6a1345c96c7a9979e3216247935fd6b5 = $_edba27c2338aecb284a6cc74c9b794ea->GetEventsArrayInCalendars(null);
        } else {
            $_6a1345c96c7a9979e3216247935fd6b5 = $_edba27c2338aecb284a6cc74c9b794ea->GetEventsArrayInCalendars($_ecae772125035be7dc4d38556a47ea8c);
        }
        foreach ((array) $_6a1345c96c7a9979e3216247935fd6b5 as $event) {
            
            
            $_ccd9e402149a4aff4a20de187781aa41 = $event->GetStartDate()->getStartOfDay();
            $_ef3a72fcbe857b2afe45cb9d8cafb253 = $event->GetEndDate()->getEndOfDay();
            while ($_ef3a72fcbe857b2afe45cb9d8cafb253->after($_ccd9e402149a4aff4a20de187781aa41, 1)) {
                $this->event_array[$_ccd9e402149a4aff4a20de187781aa41->format($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_aac291547a40377" . "8eb6591995cbc2db" . "9"])][] = $event;
                $_ccd9e402149a4aff4a20de187781aa41->addDays(1);
            }
        }
    }
    public function GetMonthName()
    {
        return $this->date->format($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_59ac4def56" . "38636b8e25f" . "f64d5f6c2c8"]);
    }
    public function GetPreviousMonthName()
    {
        $_67a0d624aebcceb0abd5ce56a53ff06f = clone $this->date;
        $_67a0d624aebcceb0abd5ce56a53ff06f->modify($GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_2efc2c1fa" . "ee0ff18168" . "17e945b9bd" . "2f0"]);
        return $_67a0d624aebcceb0abd5ce56a53ff06f->format($GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_59ac4def5638636b8e25ff" . "64d5f6c2c8"]);
    }
    public function GetNextMonthName()
    {
        $_67a0d624aebcceb0abd5ce56a53ff06f = clone $this->date;
        $_67a0d624aebcceb0abd5ce56a53ff06f->modify($GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_1f6779e91fd3ba3953dba6a08c4" . "62ac5"]);
        return $_67a0d624aebcceb0abd5ce56a53ff06f->format($GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_59ac4def5638636b8e" . "25ff64d5f6c2c8"]);
    }
    
    
    
    
    
    
    
    
    public function GetDateByNum($_b8cfc2e06d9d1fec1893ea4a054002bf, $_83dcb96e6497727bea94783c6ee8feb5)
    {
        $_67a0d624aebcceb0abd5ce56a53ff06f = clone $this->start_date;
        $_cb9da9ebb63290264e0536d1e462a8d6 = 7 * $_b8cfc2e06d9d1fec1893ea4a054002bf + $_83dcb96e6497727bea94783c6ee8feb5;
        $_67a0d624aebcceb0abd5ce56a53ff06f->addDays($_cb9da9ebb63290264e0536d1e462a8d6);
        return $_67a0d624aebcceb0abd5ce56a53ff06f;
    }
    
    
    
    
    
    
    
    
    public function IsCurrentMonth($_b8cfc2e06d9d1fec1893ea4a054002bf, $_83dcb96e6497727bea94783c6ee8feb5)
    {
        $_67a0d624aebcceb0abd5ce56a53ff06f = $this->GetDateByNum($_b8cfc2e06d9d1fec1893ea4a054002bf, $_83dcb96e6497727bea94783c6ee8feb5);
        return $_67a0d624aebcceb0abd5ce56a53ff06f->getMonth() == $this->date->getMonth();
    }
    public function GetDayNum($_b8cfc2e06d9d1fec1893ea4a054002bf, $_83dcb96e6497727bea94783c6ee8feb5)
    {
        $_67a0d624aebcceb0abd5ce56a53ff06f = $this->GetDateByNum($_b8cfc2e06d9d1fec1893ea4a054002bf, $_83dcb96e6497727bea94783c6ee8feb5);
        return $_67a0d624aebcceb0abd5ce56a53ff06f->getDay();
    }
    public function GetWeeksCount()
    {
        return $this->date->getWeeksInMonth();
    }
    public function IsDayHaveEvents($_b8cfc2e06d9d1fec1893ea4a054002bf, $_83dcb96e6497727bea94783c6ee8feb5)
    {
        $_67a0d624aebcceb0abd5ce56a53ff06f = $this->GetDateByNum($_b8cfc2e06d9d1fec1893ea4a054002bf, $_83dcb96e6497727bea94783c6ee8feb5);
        return isset($this->event_array[$_67a0d624aebcceb0abd5ce56a53ff06f->format($GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_aac291547a403778eb6591" . "995cbc2db9"])]);
    }
    public function IsToday($_b8cfc2e06d9d1fec1893ea4a054002bf, $_83dcb96e6497727bea94783c6ee8feb5)
    {
        $_67a0d624aebcceb0abd5ce56a53ff06f = $this->GetDateByNum($_b8cfc2e06d9d1fec1893ea4a054002bf, $_83dcb96e6497727bea94783c6ee8feb5);
        return $this->now->getDate(DATE_FORMAT_DATE_DAY) == $_67a0d624aebcceb0abd5ce56a53ff06f->getDate(DATE_FORMAT_DATE_DAY);
    }
    
    
    
    
    
    
    public function GetNextMonthDatePoint()
    {
        $_67a0d624aebcceb0abd5ce56a53ff06f = new Date($this->date);
        $_67a0d624aebcceb0abd5ce56a53ff06f->modify($GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_1f6779e91fd" . "3ba3953dba6a" . "08c462ac5"]);
        return $_67a0d624aebcceb0abd5ce56a53ff06f->getDate(DATE_FORMAT_ISO_DATE);
    }
    
    
    
    
    
    
    public function GetPrevMonthDatePoint()
    {
        $_67a0d624aebcceb0abd5ce56a53ff06f = new Date($this->date);
        $_67a0d624aebcceb0abd5ce56a53ff06f->modify($GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_2efc2c1faee0ff181" . "6817e945b9bd2f0"]);
        return $_67a0d624aebcceb0abd5ce56a53ff06f->getDate(DATE_FORMAT_ISO_DATE);
    }
    public function GetCurrentMonthDatePoint()
    {
        $_67a0d624aebcceb0abd5ce56a53ff06f = new Date($this->date);
        return $_67a0d624aebcceb0abd5ce56a53ff06f->getDate(DATE_FORMAT_ISO_DATE);
    }
    
    
    
    
    
    
    
    
    public function GetEventsOnDay($_b8cfc2e06d9d1fec1893ea4a054002bf, $_83dcb96e6497727bea94783c6ee8feb5)
    {
        $_24a5101ad9295cf2103c538c496623f7 = CalendarToolKit::instance();
        $_67a0d624aebcceb0abd5ce56a53ff06f = $this->GetDateByNum($_b8cfc2e06d9d1fec1893ea4a054002bf, $_83dcb96e6497727bea94783c6ee8feb5);
        $_343a395319323dd7609bcbc465b4d034 = [];
        foreach ((array) $this->event_array[$_67a0d624aebcceb0abd5ce56a53ff06f->format($GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_aac291547a403778eb" . "6591995cbc2db9"])] as $event) {
            
            
            
            $_d8c4ad80bf9e8f2ff7766b61d1f5ea0b = $event->GetId();
            if ($event->type === CALENDAR_TYPE_SYSTEM_EVENT) {
                $_d8c4ad80bf9e8f2ff7766b61d1f5ea0b = $event->GetEventKey();
            }
            $_343a395319323dd7609bcbc465b4d034[$_d8c4ad80bf9e8f2ff7766b61d1f5ea0b] = array($GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_0ea4e32b57963ac0cb3057e" . "03e9aef64"] => $event->GetId(), $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_ae18cd25" . "271a5df04" . "0f9a0b94f" . "de51ab"] => $event->GetClnId(), $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_8dabb06efc95df4" . "cff7c4afe91857b5" . "3"] => $event->GetName(), $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_ccd9e402149a4aff4" . "a20de187781aa41"] => $event->GetStartDate()->getDate(DATE_FORMAT_ISO), $GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_ef3a72fcbe857b2afe45cb9d8cafb" . "253"] => $event->GetEndDate()->getDate(DATE_FORMAT_ISO), $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_3146fac6116b6cfbfb529241aa6c4" . "614"] => $event->GetPeriod()->IsFullDay(), $GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_84929763267bc12007295ccd54f62" . "914"] => $_24a5101ad9295cf2103c538c496623f7->GetCalendarById($event->GetClnId())->GetColor(), $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_d8c4ad80bf" . "9e8f2ff7766" . "b61d1f5ea0b"] => $_d8c4ad80bf9e8f2ff7766b61d1f5ea0b);
        }
        return $_343a395319323dd7609bcbc465b4d034;
    }
}