<?php
/*
Plugin Name: Embed SharePoint OneDrive Documents
Plugin URI: https://plugins.miniorange.com/
Description: This plugin will allow you to sync and embed Sharepoint, OneDrive Business, OneDrive Personal Documents(folders and files) in the WordPress. Allowing users to Download, Preview, Edit sharepoint files from the WordPress itself based on their access level.
Version: 10.0.0
Author: miniOrange
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/


namespace MoSharePointObjectSync;

require_once __DIR__ . "\57\x63\154\141\163\163\x2d\x77\160\x2d\156\x61\x6d\x65\163\160\141\x63\145\55\x61\x75\164\x6f\154\x6f\x61\144\x65\x72\x2e\160\150\x70";
require_once __DIR__ . "\x2f\127\162\141\x70\160\x65\162\163\x2f\167\x70\x57\162\x61\x70\160\145\x72\56\x70\x68\x70";
require_once __DIR__ . "\x2f\x6c\151\x62\57\154\151\x63\145\156\163\145\57\141\x75\x74\157\154\x6f\141\x64\145\x72\x2e\160\150\x70";
use MoSharePointObjectSync\API\SyncMOSPS;
use MoSharePointObjectSync\View\adminView;
use MoSharePointObjectSync\Controller\adminController;
use MoSharePointObjectSync\Observer\adminObserver;
use MoSharePointObjectSync\Observer\mediaObserver;
use MoSharePointObjectSync\Observer\shortcodeObserver;
use MoSharePointObjectSync\Wrappers\dbWrapper;
use MoSharePointObjectSync\Wrappers\pluginConstants;
use MoSharePointObjectSync\API\CustomerMOSPS;
use MoSharePointObjectSync\Observer\taxonomyObserver;
use MoSharePointObjectSync\Observer\appConfigObserver;
use MoSharePointObjectSync\Wrappers\wpWrapper;
use MoSharePointObjectSync\LicenseLibrary\Mo_License_Service;
use MoSharePointObjectSync\LicenseLibrary\Classes\Mo_License_Library;
define("\120\x4c\x55\107\x49\116\137\126\x45\x52\x53\111\x4f\116", "\61\x30\x2e\x30\56\60");
define("\115\117\x5f\123\120\123\x5f\120\x4c\125\x47\111\x4e\137\125\122\x4c", plugins_url('', __FILE__));
if (defined("\x4d\117\105\123\110\x50\137\x54\x41\x58\117\116\x4f\115\131")) {
    goto Jh;
}
define("\x4d\117\x45\123\x48\x50\x5f\x54\101\x58\x4f\116\x4f\x4d\x59", "\155\157\145\163\150\x70\55\x63\141\x74\x65\147\157\x72\x79");
Jh:
class MOsps
{
    private static $instance;
    public static function mo_sps_load_instance()
    {
        if (isset(self::$instance)) {
            goto YU;
        }
        $pj = __CLASS__;
        new Mo_License_Library();
        self::$instance = new $pj();
        self::$instance->mo_sps_load_hooks();
        YU:
        return self::$instance;
    }
    public function mo_sps_load_hooks()
    {
        add_action("\x61\144\155\x69\156\x5f\155\x65\156\x75", array($this, "\155\x6f\x5f\x73\160\163\x5f\x61\144\x6d\x69\156\137\155\145\x6e\165"));
        add_action("\151\x6e\x69\x74", array(mediaObserver::getObserver(), "\155\x6f\137\x73\160\x73\x5f\155\x65\x64\151\x61\137\x6f\142\163\145\162\x76\145\162"), 0);
        add_action("\151\156\x69\x74", array(adminObserver::getObserver(), "\x6d\157\137\x73\160\x73\137\x61\144\x6d\151\156\137\157\142\x73\x65\162\166\145\x72"));
        add_action("\151\156\151\x74", array(taxonomyObserver::getObserver(), "\x6d\157\x5f\163\160\x73\137\x72\x65\x67\151\163\164\x65\162\137\x74\x61\170\157\156\157\x6d\x79"), 1);
        add_action("\151\x6e\x69\164", array($this, "\x63\165\x73\164\157\155\x5f\141\164\164\x61\x63\150\155\145\x6e\x74\x5f\160\157\x73\x74\x5f\164\x79\160\x65"), 0);
        add_action("\141\144\x6d\x69\x6e\x5f\x69\x6e\151\x74", array(adminController::getController(), "\x6d\157\x5f\x73\160\x73\x5f\x61\144\x6d\x69\x6e\137\x63\x6f\x6e\164\x72\157\x6c\x6c\145\162"));
        add_action("\x61\144\155\151\x6e\137\145\x6e\x71\x75\145\x75\145\137\163\143\x72\151\x70\x74\x73", array($this, "\155\157\137\x73\x70\x73\137\x73\145\x74\x74\x69\x6e\147\x73\x5f\x73\164\x79\154\145"));
        add_action("\x61\x64\155\x69\x6e\x5f\x65\x6e\161\165\x65\165\x65\137\163\143\x72\x69\x70\164\x73", array($this, "\155\x6f\137\x73\x70\x73\137\x73\145\164\164\151\156\x67\x73\137\x73\143\162\151\x70\x74\x73"));
        add_action("\x77\x70\x5f\141\x6a\x61\x78\137\155\157\137\x64\x6f\143\x5f\154\x69\x62\137\x65\x6d\x62\145\144", array(mediaObserver::getObserver(), "\x6d\157\x5f\x64\157\143\x5f\154\151\x62\x5f\x65\155\142\145\x64\137\x61\x70\151\x5f\x68\x61\x6e\x64\x6c\x65\162"));
        add_action("\167\x70\137\x61\x6a\141\x78\x5f\156\x6f\160\162\x69\166\x5f\x6d\x6f\137\144\157\x63\137\x6c\151\x62\x5f\x65\x6d\x62\x65\x64", array(mediaObserver::getObserver(), "\x6d\157\x5f\x64\157\x63\x5f\154\x69\142\137\x65\x6d\x62\x65\144\137\x61\x70\151\137\150\x61\x6e\x64\154\145\162"));
        if (!Mo_License_Service::is_customer_license_valid()) {
            goto aE;
        }
        add_action("\x77\160\x5f\141\152\x61\170\x5f\x6d\x6f\x5f\x73\x70\x73\x5f\x73\171\x6e\x63\137\x66\x69\154\145", array(adminObserver::getObserver(), "\155\157\x5f\x73\160\x73\x5f\x73\171\x6e\x63\x5f\x66\x69\154\x65"));
        add_action("\167\160\137\x61\152\x61\x78\x5f\x6e\157\x70\162\x69\x76\137\155\x6f\x5f\x73\160\163\137\163\x79\x6e\143\137\x66\x69\154\145", array(adminObserver::getObserver(), "\155\157\x5f\163\x70\163\137\x73\x79\156\143\x5f\146\x69\154\x65"));
        add_action("\x77\160\137\141\152\x61\x78\137\155\x6f\137\x73\160\x73\137\147\145\x74\137\146\x69\154\145\137\165\x72\x6c", array(adminObserver::getObserver(), "\x6d\x6f\x5f\163\x70\x73\x5f\x67\145\164\x5f\x66\151\x6c\x65\137\165\x72\154"));
        add_action("\167\160\x5f\141\152\141\x78\x5f\156\x6f\x70\162\151\x76\137\x6d\157\x5f\163\160\x73\137\147\145\x74\137\146\x69\x6c\145\x5f\165\x72\x6c", array(adminObserver::getObserver(), "\155\x6f\137\163\x70\163\x5f\x67\145\164\x5f\x66\151\x6c\x65\x5f\165\162\154"));
        add_action("\x77\x70\x5f\x61\152\141\x78\137\x6d\157\x5f\x73\160\163\x5f\x67\x65\164\137\x75\162\154\x5f\143\157\x6e\x74\145\x6e\x74", array(adminObserver::getObserver(), "\155\157\x5f\x73\160\163\x5f\147\145\164\137\165\162\x6c\137\143\157\x6e\x74\145\x6e\164"));
        add_action("\167\160\x5f\x61\152\141\x78\137\156\x6f\160\162\151\166\137\x6d\157\x5f\x73\x70\163\x5f\147\x65\x74\x5f\165\162\154\x5f\x63\x6f\156\164\145\156\164", array(adminObserver::getObserver(), "\155\157\x5f\163\x70\x73\137\147\x65\164\137\165\162\154\137\143\157\x6e\x74\145\156\164"));
        add_action("\x77\x70\x5f\141\x6a\141\170\137\155\157\x5f\x73\x70\163\137\163\x79\156\x63\x5f\x73\160\145\x63\x69\146\151\143\137\x66\151\154\145", array(adminObserver::getObserver(), "\155\157\x5f\163\x70\163\x5f\x73\171\x6e\x63\x5f\x73\x70\145\143\151\x66\x69\143\x5f\x66\151\154\x65"));
        add_action("\167\x70\137\141\152\x61\x78\x5f\x6e\x6f\160\162\x69\x76\x5f\155\x6f\137\x73\160\163\137\163\x79\156\143\x5f\x73\160\x65\x63\151\146\x69\x63\x5f\146\x69\x6c\x65", array(adminObserver::getObserver(), "\x6d\x6f\x5f\163\160\x73\x5f\x73\x79\156\x63\x5f\163\160\x65\x63\151\x66\x69\143\x5f\x66\x69\x6c\145"));
        add_action("\167\x70\137\x61\x6a\141\x78\137\155\x6f\x5f\163\160\x73\137\144\x6f\167\x6e\154\157\141\x64\137\x66\151\x6c\145", array(mediaObserver::getObserver(), "\155\x6f\137\x73\x70\x73\x5f\x64\157\x77\156\154\157\141\144\137\146\x69\x6c\x65"));
        add_action("\167\x70\137\x61\152\141\x78\x5f\156\157\x70\x72\x69\x76\x5f\155\157\x5f\x73\x70\163\137\144\157\x77\x6e\x6c\157\141\144\x5f\146\x69\154\145", array(mediaObserver::getObserver(), "\x6d\157\x5f\x73\160\x73\137\x64\x6f\167\x6e\154\x6f\141\144\x5f\x66\x69\154\x65"));
        add_action("\167\x70\137\141\x6a\x61\x78\137\155\157\137\x64\x6f\143\x5f\154\151\x62\x5f\165\160\154\x6f\x61\x64", array(mediaObserver::getObserver(), "\x6d\157\x5f\144\x6f\x63\137\x6c\151\x62\x5f\x75\160\154\x6f\x61\144\137\141\160\x69\137\x68\141\156\144\x6c\x65\x72"));
        add_action("\167\x70\137\141\152\x61\x78\x5f\x6e\157\160\162\151\x76\x5f\155\x6f\137\144\157\x63\x5f\154\x69\142\137\165\160\154\157\141\144", array(mediaObserver::getObserver(), "\155\x6f\x5f\x64\157\x63\137\154\x69\142\137\x75\x70\154\x6f\x61\x64\137\x61\160\x69\x5f\x68\141\156\x64\x6c\x65\x72"));
        add_action("\167\160\137\141\152\x61\170\137\155\x6f\137\x73\160\x73\137\147\x65\x6e\x65\x72\141\164\145\x5f\x75\x72\154", array(SyncMOSPS::getObserver(), "\155\x6f\x5f\x73\160\163\x5f\x67\145\156\x65\x72\141\x74\x65\137\x75\162\x6c"));
        add_action("\x77\x70\137\x61\x6a\141\170\137\155\x6f\137\x73\160\163\x5f\163\150\x6f\162\x74\143\157\x64\x65", array(shortcodeObserver::getObserver(), "\155\x6f\x5f\x73\x70\163\x5f\x73\150\157\x72\164\143\x6f\144\145\x5f\141\160\151\137\150\141\x6e\x64\154\x65\x72"));
        add_action("\167\160\x5f\x61\152\x61\x78\x5f\x6d\157\137\x73\x70\x73\137\141\x70\160\x5f\x63\x6f\x6e\146\x69\x67\165\x72\x61\164\x69\x6f\x6e", array(appConfigObserver::getObserver(), "\x6d\x6f\x5f\x73\x70\x73\x5f\x61\160\x70\x5f\143\x6f\x6e\146\x69\147\x75\x72\x61\x74\151\157\x6e\137\141\x70\151\137\150\x61\156\x64\154\145\x72"));
        aE:
        add_shortcode("\x4d\x4f\137\x53\110\101\x52\105\x50\117\x49\116\x54\x5f\114\111\x42\x52\x41\122\131", array(mediaObserver::getObserver(), "\x6d\x6f\137\x73\160\163\137\145\155\x62\x65\x64\x5f\163\150\157\x72\164\x63\157\x64\x65\137\x73\x68\x61\x72\x65\x70\x6f\x69\x6e\164\x5f\x6c\151\x62\x72\141\x72\171"));
        add_shortcode("\115\117\x5f\123\x48\x41\122\x45\120\117\111\116\x54\137\x4c\111\x53\x54", array(mediaObserver::getObserver(), "\155\x6f\137\x73\x70\x73\x5f\x65\x6d\x62\x65\x64\x5f\x73\x68\157\x72\164\143\x6f\144\x65\x5f\x73\150\x61\x72\145\x70\157\x69\x6e\164\x5f\x4c\x69\x73\x74"));
        add_shortcode("\x4d\x4f\x5f\123\x48\x41\122\x45\120\x4f\x49\116\124\137\125\x50\x4c\117\101\x44", array(mediaObserver::getObserver(), "\x6d\x6f\137\x73\x70\163\137\163\x68\x6f\162\164\x63\x6f\144\x65\137\165\160\x6c\x6f\x61\144\x5f\x69\156\x5f\x73\150\141\162\145\160\x6f\x69\156\164\137\x6c\151\142\162\141\162\x79"));
        add_shortcode("\115\117\137\x53\110\x41\x52\105\120\x4f\x49\x4e\124\137\104\111\x53\x50\114\x41\131\x5f\106\111\114\x45\137\x4c\111\x53\124", array(mediaObserver::getObserver(), "\155\x6f\137\163\160\x73\x5f\x65\x6d\x62\145\144\x5f\163\x68\157\162\164\143\157\x64\x65\137\x73\150\x61\x72\x65\x70\x6f\151\x6e\164\x5f\146\x69\154\145\x5f\154\151\163\164"));
        add_shortcode("\x4d\117\137\x53\110\101\x52\105\x50\117\x49\116\x54\137\123\120\105\x43\x49\x46\x49\x43\137\106\x49\114\x45", array(mediaObserver::getObserver(), "\155\157\x5f\163\x70\163\x5f\145\155\142\x65\144\x5f\x73\150\157\162\164\143\157\144\x65\137\x73\150\141\162\145\160\x6f\151\156\164\x5f\166\151\144\145\157"));
        add_shortcode("\x4d\x4f\137\x53\110\x41\122\105\x50\x4f\x49\x4e\124\137\x4e\105\x57\x53", array(mediaObserver::getObserver(), "\x6d\157\137\x73\160\x73\137\145\x6d\142\x65\x64\x5f\x73\150\x6f\x72\x74\143\x6f\x64\145\x5f\163\150\x61\x72\145\160\157\x69\x6e\164\x5f\156\145\167\x73"));
        add_shortcode("\115\117\x5f\x53\110\101\122\105\120\117\111\116\x54\137\105\x56\x45\116\124\123", array(mediaObserver::getObserver(), "\155\x6f\137\x73\x70\x73\x5f\145\x6d\142\145\144\137\163\150\157\162\x74\143\x6f\x64\145\137\x73\x68\x61\162\145\x70\157\x69\156\164\137\145\x76\x65\156\164\x73"));
        add_shortcode("\115\117\x5f\123\x48\x41\x52\x45\120\117\x49\x4e\124\x5f\x55\120\x4c\x4f\x41\104\137\x44\117\103\x55\x4d\105\x4e\124", array(mediaObserver::getObserver(), "\x6d\x6f\x5f\x73\x70\163\x5f\163\150\157\x72\164\143\157\144\145\137\125\x70\154\x6f\x61\x64\x5f\x77\x6f\x72\x64\160\x72\x65\x73\x73\x5f\164\157\137\163\x68\x61\x72\145\x70\157\x69\x6e\164\137\154\151\x62\162\x61\x72\x79"));
        register_activation_hook(__FILE__, array(dbWrapper::getSPSWrapper(), "\155\x6f\x5f\163\x70\x73\137\143\162\x65\x61\164\145\137\155\x65\x64\x69\x61\137\x74\x61\142\x6c\x65"));
        register_deactivation_hook(__FILE__, array($this, "\155\x6f\x5f\x73\160\163\137\144\x65\141\143\x74\151\x76\141\x74\145"));
        add_filter("\167\x70\137\147\x65\164\x5f\x61\x74\164\141\x63\x68\x6d\x65\156\x74\x5f\x75\162\154", array($this, "\155\157\x5f\163\x70\163\x5f\147\x65\164\x5f\141\x74\164\x61\x63\x68\155\145\156\164\137\x75\x72\x6c"), 1000, 2);
        add_filter("\167\x70\137\160\162\145\160\x61\x72\x65\137\x61\164\x74\x61\143\x68\155\x65\x6e\164\137\146\157\162\x5f\x6a\x73", array($this, "\155\x6f\x5f\x73\x70\x73\x5f\147\x65\x74\x5f\x69\x6d\x61\147\145\137\x66\x6f\x72\x5f\141\x74\x74\x61\x63\x68\155\x65\156\x74"), 100, 3);
        add_filter("\150\x74\x74\160\137\x72\145\161\x75\x65\163\x74\x5f\x74\x69\155\145\x6f\x75\164", array($this, "\x6d\x6f\137\163\160\x73\x5f\142\x75\155\x70\x5f\x72\x65\x71\165\x65\163\164\137\x74\151\x6d\x65\x6f\x75\x74"));
        add_filter("\143\162\157\156\x5f\163\143\150\145\144\165\x6c\x65\x73", array(SyncMOSPS::getObserver(), "\155\x6f\x5f\x73\160\163\137\143\162\157\156\137\143\x75\x73\x74\x6f\x6d\137\163\143\150\x65\144\165\154\x65"));
        add_action("\155\157\x5f\163\x70\163\137\x73\x79\156\x63\x5f\x64\x6f\143\x5f\x61\143\164\151\x6f\x6e", array(SyncMOSPS::getObserver(), "\x6d\x6f\137\x73\x70\163\137\x73\x79\x6e\143\137\144\157\143\x5f\x61\x63\x74\151\x6f\156"), 10, 2);
        add_action("\155\157\137\x73\x70\x73\x5f\x66\157\x6c\x64\145\x72\x5f\x73\x79\x6e\143\x5f\x61\143\164\x69\157\x6e", array(SyncMOSPS::getObserver(), "\x6d\157\x5f\x73\160\x73\137\146\157\x6c\x64\x65\x72\137\x73\171\x6e\143\x5f\x61\x63\x74\151\157\156"), 10, 1);
        register_uninstall_hook(__FILE__, "\155\x6f\137\x73\160\163\137\165\x6e\x69\156\163\x74\x61\x6c\154");
        add_action("\141\144\x6d\151\156\x5f\x69\156\x69\164", array($this, "\155\157\x5f\x73\160\163\x5f\160\154\165\x67\151\156\x5f\x63\x68\145\x63\x6b\x5f\x6d\x69\147\162\141\x74\x69\x6f\x6e"));
        add_action("\141\144\155\151\x6e\137\x69\x6e\151\164", array($this, "\155\157\x5f\x73\160\163\x5f\x70\154\165\147\x69\x6e\x5f\x68\141\x6e\144\x6c\x65\137\155\x69\x67\162\141\x74\151\157\156\x5f\x61\x63\x74\151\157\156"));
    }
    function mo_sps_plugin_check_migration()
    {
        if (get_option("\155\x6f\137\163\x70\x73\x5f\141\160\x70\x6c\151\x63\x61\x74\151\x6f\156\137\143\157\156\x66\151\x67") && !get_option("\x6d\x6f\137\x73\160\x73\137\x70\154\165\147\151\x6e\x5f\x6d\x69\147\x72\x61\164\151\157\156\x5f\143\x6f\x6d\160\x6c\145\164\x65\x64")) {
            goto aJ;
        }
        if (!get_option("\x6d\x6f\x5f\163\x70\x73\x5f\x61\160\x70\x6c\151\x63\141\x74\151\x6f\x6e\x5f\143\x6f\x6e\146\151\147")) {
            goto cR;
        }
        goto R8;
        aJ:
        add_action("\141\x64\x6d\x69\x6e\x5f\x6e\x6f\164\x69\143\x65\x73", array($this, "\155\x6f\137\x73\160\163\137\x70\x6c\x75\147\x69\156\x5f\155\151\147\x72\x61\x74\151\x6f\x6e\x5f\x6e\x6f\x74\151\x63\x65"));
        goto R8;
        cR:
        update_option("\155\x6f\x5f\163\160\x73\x5f\160\154\x75\147\x69\156\137\x6d\x69\147\x72\x61\x74\x69\x6f\156\x5f\x63\157\155\x70\154\145\x74\145\x64", true);
        R8:
    }
    function mo_sps_plugin_migration_notice()
    {
        $V0 = isset($_GET["\x74\x61\142"]) ? $_GET["\x74\x61\x62"] : "\x61\x70\x70\137\x63\157\156\x66\x69\147";
        if (!(isset($_GET["\160\x61\147\x65"]) && $_GET["\160\x61\x67\x65"] == "\x6d\x6f\137\163\x70\163" && $V0 == "\141\x70\160\x5f\143\x6f\x6e\x66\151\x67")) {
            goto IT;
        }
        echo "\x9\11\x3c\x64\151\166\x20\143\x6c\141\x73\x73\75\x22\156\157\164\x69\x63\145\40\x6e\157\164\151\x63\145\55\x69\156\146\157\x22\76\xd\xa\x9\x9\x9\74\160\76\111\x74\40\x73\x65\145\155\x73\40\x79\x6f\165\40\141\154\162\x65\x61\x64\x79\40\150\x61\166\x65\40\163\x6f\155\x65\x20\143\157\156\x66\x69\147\x75\162\141\x74\151\157\x6e\163\x20\163\145\x74\40\x75\x70\40\x66\x72\157\155\40\164\150\145\40\x70\x72\145\166\151\x6f\165\163\40\x76\145\x72\163\151\157\156\x20\x6f\146\40\164\x68\145\40\160\x6c\165\x67\x69\x6e\56\40\x43\154\x69\143\153\x20\x6f\156\40\164\x68\145\x20\x62\x75\x74\164\x6f\156\40\x62\145\154\x6f\167\40\164\x6f\x20\155\151\x67\x72\x61\164\145\40\171\157\x75\x72\40\143\157\x6e\x66\151\147\165\162\x61\x74\151\x6f\x6e\163\56\x3c\x2f\160\x3e\xd\xa\x9\11\x9\74\146\157\162\155\40\155\145\164\150\x6f\x64\x3d\42\x70\x6f\x73\164\42\x20\x61\143\164\x69\157\x6e\x3d\x22\x22\x3e\xd\xa\11\x9\x9\x9\x3c\151\x6e\x70\165\x74\x20\164\171\160\x65\x3d\42\150\151\144\x64\145\x6e\x22\40\x6e\x61\155\145\x3d\x22\155\157\137\163\x70\163\137\160\x6c\165\x67\x69\156\x5f\x6d\x69\x67\x72\x61\164\x69\157\x6e\137\141\143\x74\151\x6f\x6e\x22\x20\166\x61\x6c\x75\x65\75\42\x6d\151\x67\x72\141\x74\145\x5f\x63\x6f\x6e\x66\x69\147\165\162\141\164\151\157\156\x73\x22\76\xd\xa\x9\x9\11\x9";
        submit_button(__("\115\151\147\x72\x61\x74\145\40\103\157\156\x66\151\147\165\162\x61\164\151\x6f\156\x73"), "\x70\162\x69\x6d\x61\x72\x79", "\x6d\x6f\137\163\160\163\x5f\160\154\165\147\151\x6e\x5f\155\x69\147\162\141\x74\145\137\142\165\164\x74\157\156");
        echo "\11\x9\x9\x3c\57\146\x6f\x72\155\76\xd\12\11\11\74\x2f\144\x69\166\76\xd\xa\11\x9\x9";
        IT:
    }
    function mo_sps_plugin_handle_migration_action()
    {
        if (!(isset($_POST["\155\x6f\137\x73\x70\x73\x5f\x70\154\x75\x67\151\x6e\x5f\155\151\x67\162\x61\164\x69\157\156\x5f\141\x63\164\x69\x6f\156"]) && $_POST["\155\x6f\x5f\x73\160\163\137\160\154\x75\147\151\x6e\x5f\155\x69\147\162\x61\164\x69\157\x6e\x5f\x61\x63\164\151\x6f\156"] === "\155\x69\x67\162\x61\x74\x65\137\143\157\156\x66\x69\147\165\162\141\164\151\157\156\163" && !get_option("\x6d\x6f\x5f\163\x70\163\x5f\x70\154\x75\147\x69\x6e\137\155\151\x67\162\x61\164\x69\x6f\x6e\137\x63\157\155\160\154\x65\164\145\144"))) {
            goto FY;
        }
        wpWrapper::mo_sps_set_option(pluginConstants::TEST_CONNECTION_STATUS, "\163\165\x63\x63\145\163\163");
        update_option("\x6d\157\137\x73\x70\163\x5f\x70\154\165\x67\151\156\x5f\155\x69\147\162\141\164\151\x6f\156\137\143\157\155\160\154\x65\164\145\x64", true);
        echo "\x9\x9\11\x3c\163\143\162\151\x70\x74\x20\164\x79\160\x65\x3d\x22\164\145\x78\164\x2f\x6a\x61\x76\x61\x73\143\162\x69\x70\164\x22\76\xd\xa\x9\x9\11\11\167\x69\x6e\x64\157\167\x2e\157\x6e\x6c\157\141\144\40\75\x20\146\165\156\143\164\151\x6f\x6e\50\51\x20\173\xd\12\11\11\x9\x9\11\x69\x66\40\x28\167\x69\156\144\x6f\x77\x2e\154\x6f\143\x61\164\151\x6f\156\x2e\x68\x72\x65\146\x2e\x69\x6e\x64\x65\170\117\146\x28\x27\x70\141\147\145\x3d\x6d\x6f\x5f\x73\x70\x73\46\164\x61\x62\x3d\141\160\160\137\x63\x6f\156\x66\x69\x67\x27\51\x20\41\75\x3d\40\55\x31\51\x20\173\15\12\x9\x9\11\x9\11\x9\154\157\143\141\164\151\x6f\156\56\x72\145\x6c\157\x61\x64\50\51\x3b\15\12\11\x9\x9\x9\11\x7d\xd\xa\11\x9\x9\11\175\x3b\15\12\x9\11\11\74\x2f\x73\x63\162\151\160\x74\x3e\xd\xa\11\x9\11";
        FY:
    }
    public function custom_attachment_post_type()
    {
        $Fa = array("\x6e\x61\155\145" => _x("\123\150\x70\x20\101\x74\x74\141\143\x68\x6d\x65\156\x74\x73", "\120\157\163\x74\40\124\x79\160\145\40\107\145\156\145\162\x61\x6c\x20\x4e\141\155\145", "\x74\x65\170\x74\x5f\x64\x6f\155\141\x69\x6e"), "\163\151\x6e\147\x75\x6c\x61\162\137\156\x61\155\145" => _x("\x53\150\x70\40\x41\x74\x74\141\x63\150\x6d\x65\156\164", "\120\157\163\164\x20\124\171\x70\145\x20\x53\x69\156\x67\165\154\141\162\40\x4e\x61\155\145", "\164\145\170\x74\137\x64\157\155\141\x69\x6e"), "\x6d\145\x6e\x75\137\x6e\x61\155\x65" => __("\x53\x68\x70\x20\x41\164\x74\141\143\150\x6d\145\156\x74\x73", "\164\x65\x78\164\137\144\x6f\x6d\x61\151\156"), "\x6e\x61\x6d\145\137\x61\x64\155\151\x6e\137\142\x61\162" => __("\123\x68\160\x20\101\x74\164\x61\x63\x68\155\x65\x6e\164", "\164\x65\x78\164\x5f\144\157\155\141\151\x6e"), "\x61\162\143\x68\151\166\145\x73" => __("\x41\164\x74\141\x63\150\x6d\x65\x6e\x74\40\101\162\143\150\x69\x76\145\x73", "\x74\x65\x78\164\137\144\157\x6d\141\x69\x6e"), "\141\x74\164\x72\x69\x62\x75\x74\x65\x73" => __("\x41\x74\x74\141\143\x68\155\x65\x6e\x74\40\101\x74\164\162\x69\x62\165\x74\x65\163", "\x74\145\170\164\137\x64\157\x6d\x61\x69\156"), "\160\141\x72\x65\156\x74\x5f\x69\164\145\155\137\x63\157\x6c\x6f\156" => __("\120\x61\162\145\156\164\x20\101\x74\x74\141\x63\x68\x6d\145\x6e\164\72", "\164\145\170\164\137\x64\157\x6d\141\x69\x6e"), "\x61\x6c\154\x5f\x69\164\x65\155\x73" => __("\101\154\x6c\40\x41\164\164\x61\x63\150\x6d\x65\156\164\163", "\x74\x65\170\x74\x5f\x64\x6f\155\x61\151\156"), "\141\x64\x64\x5f\x6e\145\167\x5f\151\x74\145\x6d" => __("\101\x64\144\x20\x4e\145\x77\40\101\164\164\141\x63\x68\x6d\x65\156\x74", "\164\145\x78\164\137\144\157\x6d\x61\x69\156"), "\x61\144\x64\x5f\x6e\145\x77" => __("\x41\144\144\x20\x4e\x65\x77", "\x74\145\170\164\x5f\x64\x6f\155\141\151\x6e"), "\156\145\167\137\x69\x74\x65\155" => __("\x4e\x65\x77\x20\x41\x74\164\141\143\x68\x6d\145\x6e\x74", "\164\x65\x78\164\137\x64\157\155\141\151\156"), "\x65\144\x69\x74\137\151\x74\x65\x6d" => __("\105\144\151\x74\x20\101\164\164\141\143\x68\155\x65\x6e\x74", "\x74\145\x78\164\137\144\x6f\x6d\141\x69\x6e"), "\165\160\144\141\164\x65\137\151\164\145\155" => __("\x55\x70\x64\141\164\145\x20\x41\x74\x74\141\x63\x68\x6d\145\x6e\x74", "\164\145\170\164\137\144\157\155\x61\151\x6e"), "\x76\151\145\x77\x5f\x69\164\145\155" => __("\x56\x69\x65\x77\x20\x41\x74\164\x61\143\150\155\145\156\x74", "\164\145\x78\x74\137\x64\x6f\x6d\x61\151\156"), "\166\x69\145\167\137\151\164\x65\x6d\163" => __("\x56\x69\145\167\40\x41\x74\x74\x61\143\x68\155\145\x6e\164\163", "\x74\145\170\x74\x5f\144\157\155\141\151\x6e"), "\x73\145\141\162\143\150\137\x69\164\145\155\163" => __("\x53\x65\x61\162\x63\x68\x20\x41\164\164\141\x63\x68\x6d\x65\x6e\164", "\164\145\170\x74\x5f\x64\x6f\155\141\151\156"), "\x6e\157\164\137\146\x6f\165\x6e\144" => __("\x41\164\164\141\x63\x68\155\145\156\x74\40\x4e\157\x74\40\x66\157\x75\x6e\x64", "\x74\x65\170\x74\137\x64\x6f\x6d\x61\151\x6e"), "\x6e\x6f\x74\137\x66\157\165\156\x64\x5f\151\156\137\x74\x72\x61\163\x68" => __("\x41\x74\x74\x61\143\x68\155\145\156\x74\x20\116\157\x74\40\x66\x6f\x75\156\144\40\151\156\40\x54\x72\141\163\x68", "\x74\x65\170\164\137\x64\157\x6d\141\151\x6e"), "\146\x65\x61\x74\165\x72\x65\x64\x5f\x69\155\141\147\145" => __("\x46\145\141\164\165\x72\x65\144\40\111\x6d\x61\147\145", "\164\x65\170\x74\x5f\x64\157\155\x61\151\x6e"), "\x73\x65\164\137\x66\x65\x61\x74\165\x72\x65\144\x5f\151\155\141\x67\145" => __("\x53\145\x74\x20\146\x65\141\164\x75\x72\x65\x64\40\x69\155\x61\x67\x65", "\164\x65\x78\x74\x5f\144\x6f\155\x61\x69\x6e"), "\x72\x65\x6d\157\166\145\137\x66\145\x61\164\x75\162\145\x64\x5f\151\155\141\147\x65" => __("\122\145\x6d\157\166\x65\40\x66\x65\x61\164\165\x72\x65\144\x20\x69\155\141\147\145", "\164\145\170\164\137\144\x6f\x6d\141\151\156"), "\165\x73\145\137\x66\145\141\x74\165\x72\x65\144\137\x69\155\141\147\145" => __("\x55\x73\x65\40\x61\x73\40\146\145\141\164\165\162\x65\144\40\151\155\x61\147\145", "\164\145\170\164\x5f\144\x6f\155\x61\151\x6e"), "\x69\156\163\145\x72\164\137\x69\156\164\x6f\137\151\164\145\155" => __("\x49\156\163\145\162\164\x20\x69\156\164\157\x20\141\164\x74\141\143\150\x6d\x65\x6e\x74", "\x74\145\x78\164\x5f\144\x6f\155\x61\x69\156"), "\165\160\154\157\x61\x64\145\144\137\164\x6f\137\x74\150\x69\x73\x5f\x69\x74\x65\x6d" => __("\x55\x70\x6c\157\x61\144\145\x64\x20\164\157\x20\164\x68\151\163\x20\141\164\x74\141\143\x68\155\x65\x6e\164", "\164\145\x78\x74\137\x64\x6f\155\x61\x69\156"), "\x69\164\145\155\x73\x5f\x6c\x69\x73\164" => __("\x41\x74\x74\x61\x63\150\x6d\x65\156\x74\163\x20\154\x69\163\x74", "\164\145\x78\164\x5f\x64\157\x6d\x61\x69\x6e"), "\x69\164\x65\x6d\x73\137\x6c\x69\163\164\137\x6e\x61\x76\151\147\141\164\x69\x6f\x6e" => __("\101\164\x74\141\x63\150\x6d\x65\x6e\x74\163\40\154\151\x73\x74\40\156\x61\166\x69\x67\x61\164\x69\x6f\156", "\x74\x65\170\x74\137\144\157\155\141\x69\156"), "\146\151\154\x74\145\x72\137\x69\164\145\x6d\163\137\154\151\x73\x74" => __("\106\151\x6c\x74\145\x72\40\141\x74\x74\141\143\x68\x6d\145\156\x74\163\x20\x6c\151\x73\x74", "\164\x65\170\x74\x5f\144\157\155\141\151\x6e"));
        $rZ = array("\154\x61\142\145\154" => __("\123\150\x70\x20\101\164\164\x61\143\x68\155\x65\156\x74", "\x74\145\x78\164\137\x64\157\x6d\x61\151\156"), "\144\x65\x73\143\x72\151\160\164\x69\157\156" => __("\x53\150\160\40\101\164\x74\x61\x63\150\155\x65\x6e\x74\x20\x44\145\163\143\162\151\x70\x74\151\x6f\x6e", "\164\x65\x78\164\x5f\x64\157\155\x61\151\156"), "\x6c\x61\142\145\x6c\163" => $Fa, "\163\165\160\160\x6f\162\164\x73" => array("\x74\x69\164\154\145", "\145\x64\151\164\x6f\162", "\x74\150\x75\155\142\x6e\x61\x69\154", "\x65\x78\143\145\x72\160\164", "\x63\x75\x73\x74\157\155\55\x66\151\145\154\x64\x73", "\x70\141\147\x65\55\x61\x74\164\162\151\x62\x75\x74\145\x73"), "\164\141\170\x6f\156\x6f\155\151\x65\x73" => array("\143\141\164\145\147\157\x72\x79", "\160\157\x73\x74\x5f\x74\141\147"), "\150\x69\145\x72\x61\162\x63\x68\151\143\x61\154" => false, "\x70\x75\142\154\151\x63" => true, "\x73\x68\x6f\167\137\x75\x69" => true, "\x73\x68\x6f\x77\137\151\156\x5f\x6d\x65\x6e\165" => false, "\x6d\x65\156\x75\137\160\157\x73\151\164\151\x6f\156" => 5, "\x6d\x65\x6e\165\x5f\151\143\157\x6e" => "\144\x61\163\150\x69\x63\x6f\156\163\x2d\155\145\144\x69\141\55\x74\x65\x78\164", "\x73\x68\x6f\x77\137\x69\x6e\x5f\x61\144\x6d\151\156\x5f\x62\141\162" => true, "\x73\x68\157\167\x5f\x69\x6e\137\156\141\x76\137\155\x65\156\x75\163" => true, "\x63\141\156\137\145\170\x70\157\162\x74" => true, "\150\x61\x73\x5f\141\162\x63\x68\151\x76\x65" => true, "\145\170\x63\x6c\x75\144\x65\x5f\x66\162\x6f\x6d\x5f\163\145\141\162\x63\x68" => false, "\x70\165\142\154\151\x63\x6c\171\x5f\161\x75\x65\x72\171\141\142\154\x65" => true, "\x63\141\160\141\x62\x69\154\x69\164\171\137\x74\x79\160\145" => "\160\x6f\163\x74");
        register_post_type("\163\x68\160\137\x61\164\164\x61\x63\150\155\x65\x6e\x74", $rZ);
    }
    public function mo_sps_bump_request_timeout()
    {
        return 60;
    }
    public function mo_sps_wpml_delete_duplicate_file($WE, $uF)
    {
        $dx = get_post_meta($WE, "\x6d\157\x5f\163\160\163\x5f\146\x69\154\145\x5f\x75\162\x6c", true);
        if (empty($dx)) {
            goto U2;
        }
        wp_delete_post($uF, true);
        U2:
    }
    public function mo_sps_pll_delete_duplicate_file($WE, $uF, $nE)
    {
        $dx = get_post_meta($WE, "\x6d\x6f\137\163\160\x73\x5f\146\x69\x6c\x65\137\165\x72\154", true);
        if (empty($dx)) {
            goto f7;
        }
        wp_delete_post($uF, true);
        f7:
    }
    public function mo_sps_get_attachment_url($xr, $WE)
    {
        $dx = get_post_meta($WE, "\x6d\157\137\x73\160\163\137\146\151\154\145\x5f\165\x72\154", true);
        $EG = get_post_meta($WE, "\x6d\x6f\137\x73\160\163\137\146\x69\x6c\145\137\x65\x64\x69\x74\137\x75\162\x6c", true);
        if (!empty($dx)) {
            goto Tg;
        }
        $dx = $xr;
        Tg:
        if (empty($EG)) {
            goto ir;
        }
        return $EG;
        ir:
        return $dx;
    }
    public static function mo_sps_deactivate()
    {
        if (!get_option("\x73\x70\x73\x5f\154\153")) {
            goto se;
        }
        $za = new CustomerMOSPS();
        $za->mo_sps_update_key_status();
        se:
        delete_option("\155\157\x5f\163\x70\x73\137\x61\x64\x6d\151\156\137\x70\141\x73\x73\x77\x6f\x72\x64");
        delete_option("\155\x6f\137\163\160\x73\x5f\x61\144\155\151\x6e\x5f\x63\165\x73\x74\x6f\x6d\x65\x72\x5f\153\x65\171");
        delete_option("\155\x6f\137\163\x70\x73\137\x61\144\x6d\151\156\x5f\141\160\151\137\153\145\x79");
        delete_option("\155\x6f\137\x73\x70\x73\x5f\141\144\x6d\x69\x6e\x5f\160\x68\x6f\x6e\145");
        delete_option("\155\x6f\137\163\x70\x73\x5f\162\145\147\x69\163\x74\162\141\x74\151\157\156\x5f\x73\x74\141\164\x75\163");
        delete_option("\x6d\157\137\x73\x70\x73\x5f\x63\165\163\164\x6f\x6d\x65\162\x5f\164\157\x6b\145\156");
        delete_option("\x73\160\x73\137\x6c\153");
        delete_option("\155\157\x5f\x73\160\163\137\166\x6c\137\x63\x68\x65\143\153\137\x74");
        delete_option("\x6d\157\137\x73\160\163\x5f\x76\x6c\x5f\143\x68\145\143\x6b\x5f\x73");
    }
    public function mo_sps_get_image_for_attachment($Rz, $Ea, $Uf)
    {
        $WE = $Ea->ID;
        $dx = get_post_meta($WE, "\x6d\x6f\137\163\x70\x73\137\x66\151\x6c\145\x5f\165\x72\x6c", true);
        if (!($Rz["\x75\162\x6c"] == $dx && $Rz["\164\171\x70\x65"] == "\151\155\141\x67\145")) {
            goto i9;
        }
        $Rz["\151\x63\157\x6e"] = $Rz["\165\x72\154"];
        i9:
        return $Rz;
    }
    public function mo_sps_admin_menu()
    {
        $YI = add_menu_page("\x6d\151\156\151\x4f\162\x61\x6e\147\145\x20\123\150\x61\x72\145\x50\157\151\156\164\x20\x49\156\164\x65\x67\x72\x61\164\x69\157\x6e\40" . __("\x2b\40\123\x79\x6e\143"), "\123\x68\141\162\x65\x50\157\x69\156\164\57\117\x6e\145\x44\x72\x69\x76\x65", "\x61\x64\155\151\x6e\151\163\x74\162\141\164\x6f\162", "\x6d\x6f\137\x73\160\x73", array(adminView::getView(), "\155\x6f\137\x73\x70\x73\x5f\x6d\145\156\x75\x5f\x64\151\163\x70\154\141\x79"), plugin_dir_url(__FILE__) . "\151\x6d\141\147\x65\163\57\155\x69\156\x69\157\162\x61\x6e\147\145\x5f\155\x65\x6e\x75\56\x70\x6e\147");
    }
    function mo_sps_settings_style($YI)
    {
        if (!($YI != "\164\157\x70\154\145\166\x65\154\137\160\141\x67\x65\137\x6d\x6f\137\x73\x70\x73")) {
            goto RY;
        }
        return;
        RY:
        $IY = plugins_url("\151\x6e\143\154\165\144\145\x73\57\143\163\163\57\155\x6f\x5f\163\160\163\137\163\x65\x74\164\x69\x6e\147\163\x2e\143\163\163", __FILE__);
        $JG = plugins_url("\151\x6e\143\154\165\144\x65\x73\x2f\x63\163\163\x2f\163\145\154\145\143\164\x77\157\x6f\56\155\x69\156\56\143\163\x73", __FILE__);
        $ox = plugins_url("\151\156\143\154\165\x64\145\163\x2f\143\163\163\57\x70\150\157\156\145\x2e\143\163\x73", __FILE__);
        wp_enqueue_style("\155\x6f\137\x73\160\x73\137\160\x68\x6f\156\x65\137\x63\x73\163", $ox, array(), PLUGIN_VERSION);
        wp_enqueue_style("\x6d\x6f\137\x73\x70\163\137\143\163\163", $IY, array(), PLUGIN_VERSION);
        wp_enqueue_style("\155\157\137\x73\x70\x73\x5f\x73\x65\154\145\143\164\167\x6f\157\137\x63\x73\163", $JG, array(), PLUGIN_VERSION);
    }
    function mo_sps_settings_scripts($YI)
    {
        if (!($YI != "\164\x6f\160\154\145\x76\145\x6c\x5f\x70\141\x67\x65\x5f\155\157\137\x73\x70\163")) {
            goto wy;
        }
        return;
        wy:
        wp_enqueue_script("\152\x71\165\x65\x72\171");
        wp_enqueue_media();
        $dk = plugins_url("\x69\x6e\143\x6c\165\x64\145\163\x2f\152\163\x2f\160\150\x6f\156\145\56\x6a\x73", __FILE__);
        $YR = plugins_url("\151\156\143\154\165\144\145\x73\57\152\163\x2f\x6d\x6f\137\x73\160\x73\x5f\163\145\x74\164\151\x6e\147\x73\x2e\x6a\x73", __FILE__);
        $ph = plugins_url("\x69\156\143\154\x75\x64\x65\163\x2f\x6a\163\57\163\145\154\x65\143\x74\x77\x6f\157\56\155\151\x6e\x2e\152\163", __FILE__);
        $dC = plugins_url("\x69\156\143\x6c\165\144\145\163\x2f\152\163\57\163\x65\x6c\x65\143\x74\x32\56\x6d\x69\156\56\152\x73", __FILE__);
        wp_enqueue_script("\155\157\x5f\163\x70\163\137\160\150\x6f\x6e\145\137\x6a\163", $dk, array(), PLUGIN_VERSION);
        wp_enqueue_script("\x73\x65\x74\x74\151\156\147\x5f\x6a\x73\x5f\165\x72\154", $YR, array("\152\x71\165\x65\162\x79"), PLUGIN_VERSION);
        wp_enqueue_script("\x6d\x6f\x5f\x73\160\163\x5f\163\x65\154\145\x63\164\x77\x6f\157\137\152\x73", $ph, array("\152\x71\x75\x65\x72\x79"), PLUGIN_VERSION);
        wp_enqueue_script("\155\x6f\137\163\x70\x73\x5f\163\x65\x6c\145\x63\164\62\x5f\152\x73", $dC, array(), PLUGIN_VERSION);
    }
}
MOsps::mo_sps_load_instance();
