8889841cPK´[ÞB«qf f loader.phpnu„[µü¤assets = [ 'styles' => [ 'e-animations' => [ 'src' => $this->get_css_assets_url( 'animations', 'assets/lib/animations/', true ), 'version' => ELEMENTOR_VERSION, 'dependencies' => [], ], ], 'scripts' => [], ]; } public function get_assets() { if ( ! $this->assets ) { $this->init_assets(); } return $this->assets; } /** * @param array $assets { * @type array 'styles' * @type array 'scripts' * } */ public function enable_assets( array $assets_data ) { if ( ! $this->assets ) { $this->init_assets(); } foreach ( $assets_data as $assets_type => $assets_list ) { foreach ( $assets_list as $asset_name ) { $this->assets[ $assets_type ][ $asset_name ]['enabled'] = true; } } } /** * @param array $assets { * @type array 'styles' * @type array 'scripts' * } */ public function add_assets( array $assets ) { if ( ! $this->assets ) { $this->init_assets(); } $this->assets = array_replace_recursive( $this->assets, $assets ); } public function enqueue_assets() { $assets = $this->get_assets(); $is_preview_mode = Plugin::$instance->preview->is_preview_mode(); $is_optimized_assets_loading = Plugin::$instance->experiments->is_feature_active( 'e_optimized_assets_loading' ); foreach ( $assets as $assets_type => $assets_type_data ) { foreach ( $assets_type_data as $asset_name => $asset_data ) { if ( ! empty( $asset_data['enabled'] ) || $is_preview_mode || ! $is_optimized_assets_loading ) { if ( 'scripts' === $assets_type ) { wp_enqueue_script( $asset_name, $asset_data['src'], $asset_data['dependencies'], $asset_data['version'], true ); } else { wp_enqueue_style( $asset_name, $asset_data['src'], $asset_data['dependencies'], $asset_data['version'] ); } } } } } private function register_assets() { $assets = $this->get_assets(); foreach ( $assets as $assets_type => $assets_type_data ) { foreach ( $assets_type_data as $asset_name => $asset_data ) { if ( 'scripts' === $assets_type ) { wp_register_script( $asset_name, $asset_data['src'], $asset_data['dependencies'], $asset_data['version'], true ); } else { wp_register_style( $asset_name, $asset_data['src'], $asset_data['dependencies'], $asset_data['version'] ); } } } } public function __construct() { parent::__construct(); $this->register_assets(); } } PK´[_É:€€data-managers/widgets-css.phpnu„[µü¤get_file_data( 'size' ); $widget_css = ''; if ( $asset_css_file_size ) { // If the file size is larger than 8KB then calling the external CSS file, otherwise, printing inline CSS. if ( $asset_css_file_size > 8000 ) { $asset_url = $this->get_config_data( 'file_url' ); $widget_css = sprintf( '', $asset_url ); } else { $widget_css = $this->get_file_data( 'content' ); $widget_css = sprintf( '', $widget_css ); } } return $widget_css; } } PK´[õPëkk$data-managers/responsive-widgets.phpnu„[µü¤get_file_data( 'content' ); if ( $data ) { $data = json_decode( $data, true ); } return $data; } } PK´[ÄÁÌbÌÌdata-managers/base.phpnu„[µü¤assets_config['key']; } /** * Get Relative Version. * * The asset data will be re-evaluated according the version number. * * @since 3.3.0 * @access protected * * @return string */ protected function get_version() { return $this->assets_config['version']; } /** * Get Asset Path. * * The asset data will be extracted from the file path. * * @since 3.3.0 * @access protected * * @return string */ protected function get_file_path() { return $this->assets_config['file_path']; } /** * Get Config Data. * * Holds a unique data relevant for the specific assets category type. * * @since 3.3.0 * @access protected * * @return string|array */ protected function get_config_data( $key = '' ) { if ( isset( $this->assets_config['data'] ) ) { if ( $key ) { if ( isset( $this->assets_config['data'][ $key ] ) ) { return $this->assets_config['data'][ $key ]; } return ''; } return $this->assets_config['data']; } return []; } /** * Set Asset Data. * * Responsible for setting the current asset data. * * @since 3.3.0 * @access protected * * @return void */ protected function set_asset_data( $asset_key ) { if ( ! isset( $this->assets_data[ $asset_key ] ) ) { $this->assets_data[ $asset_key ] = []; } $this->assets_data[ $asset_key ]['content'] = $this->get_asset_content(); $this->assets_data[ $asset_key ]['version'] = $this->get_version(); $this->save_asset_data( $asset_key ); } /** * Save Asset Data. * * Responsible for saving the asset data in the DB. * * @since 3.3.0 * @access protected * * @param string $asset_key * * @return void */ protected function save_asset_data( $asset_key ) { $assets_data = $this->get_saved_assets_data(); $content_type = $this->content_type; $assets_category = $this->assets_category; $assets_data[ $content_type ][ $assets_category ][ $asset_key ] = $this->assets_data[ $asset_key ]; update_option( self::ASSETS_DATA_KEY, $assets_data ); } /** * Is Asset Version Changed. * * Responsible for comparing the saved asset data version to the current relative version. * * @since 3.3.0 * @access protected * * @param string $asset_key * * @return boolean */ protected function is_asset_version_changed( $version ) { return $this->get_version() !== $version; } /** * Get File Data. * * Getting a file content or size. * * @since 3.3.0 * @access protected * * @param string $data_type (content|size) * @param string $file_key - In case that the same file data is needed for multiple assets (like a JSON file), the file data key should be the same for all shared assets to make sure that the file is being read only once. * * @return string|number */ protected function get_file_data( $data_type, $file_key = '' ) { $asset_key = $file_key ? $file_key : $this->get_key(); if ( isset( $this->files_data[ $asset_key ][ $data_type ] ) ) { return $this->files_data[ $asset_key ][ $data_type ]; } if ( ! isset( $this->files_data[ $asset_key ] ) ) { $this->files_data[ $asset_key ] = []; } $asset_path = $this->get_file_path(); if ( 'content' === $data_type ) { $data = Utils::file_get_contents( $asset_path ); if ( ! $data ) { $data = ''; } } elseif ( 'size' === $data_type ) { $data = file_exists( $asset_path ) ? filesize( $asset_path ) : 0; } $this->files_data[ $asset_key ][ $data_type ] = $data; return $data; } /** * Get Saved Assets Data. * * Getting the assets data from the DB. * * @since 3.3.0 * @access protected * * @return array */ protected function get_saved_assets_data() { $assets_data = get_option( self::ASSETS_DATA_KEY, [] ); $content_type = $this->content_type; $assets_category = $this->assets_category; if ( ! isset( $assets_data[ $content_type ] ) ) { $assets_data[ $content_type ] = []; } if ( ! isset( $assets_data[ $content_type ][ $assets_category ] ) ) { $assets_data[ $content_type ][ $assets_category ] = []; } return $assets_data; } /** * Get Config. * * Getting the assets data config. * * @since 3.5.0 * @access protected * * @return array */ protected function get_config( $data ) { return []; } /** * Init Asset Data. * * Initialize the asset data and handles the asset content updates when needed. * * @since 3.3.0 * @access public * * @param array $config { * @type string 'key' * @type string 'version' * @type string 'file_path' * @type array 'data' * } * * @return void */ public function init_asset_data( $config ) { $this->assets_config = $config; $asset_key = $config['key']; $asset_data = isset( $this->assets_data[ $asset_key ] ) ? $this->assets_data[ $asset_key ] : []; if ( ! $asset_data || $this->is_asset_version_changed( $asset_data['version'] ) ) { $this->set_asset_data( $asset_key ); } } /** * Get Asset Data From Config. * * Getting the asset data content from config. * * @since 3.3.0 * @access public * * @param array $config { * @type string 'key' * @type string 'version' * @type string 'file_path' * @type array 'data' * } * * @return mixed */ public function get_asset_data_from_config( array $config ) { $this->init_asset_data( $config ); $asset_key = $config['key']; return $this->assets_data[ $asset_key ]['content']; } /** * Get Asset Data. * * Getting the asset data content. * * @since 3.5.0 * @access public * * @param array $data * * @return mixed */ public function get_asset_data( array $data ) { $config = $this->get_config( $data ); return $this->get_asset_data_from_config( $config ); } public function __construct() { $assets_data = $this->get_saved_assets_data(); $content_type = $this->content_type; $assets_category = $this->assets_category; $this->assets_data = $assets_data[ $content_type ][ $assets_category ]; } } PK´[Q“óŒ  'data-managers/font-icon-svg/e-icons.phpnu„[µü¤ $icon['value'], 'version' => self::LIBRARY_CURRENT_VERSION, 'file_path' => ELEMENTOR_ASSETS_PATH . 'lib/eicons/eicons.json', 'data' => [ 'icon_data' => [ 'name' => $icon['value'], 'library' => $icon['library'], ], ], ]; } protected function get_asset_content() { $icon_data = $this->get_config_data( 'icon_data' ); $file_data = json_decode( $this->get_file_data( 'content', $icon_data['library'] ), true ); $icon_name = str_replace( 'eicon-', '', $icon_data['name'] ); $svg_data = $file_data[ $icon_name ]; return [ 'width' => $svg_data['width'], 'height' => $svg_data['height'], 'path' => $svg_data['path'], 'key' => $this->get_key(), ]; } } PK´[{ 44'data-managers/font-icon-svg/manager.phpnu„[µü¤ [ 'regex' => '/^fa-/', 'manager' => new Font_Awesome(), ], 'eicons' => [ 'regex' => '/^eicons$/', 'manager' => new E_Icons(), ], ]; } return self::$data; } public static function get_font_icon_svg_data( $icon ) { $data = self::get_data(); $font_family = $icon['font_family']; $font_family_manager = $data[ $font_family ]['manager']; return $font_family_manager->get_asset_data( $icon ); } public static function get_font_family( $icon_library ) { foreach ( self::get_data() as $family => $data ) { if ( preg_match( $data['regex'], $icon_library ) ) { return $family; } } return ''; } } PK´[V\U0»»$data-managers/font-icon-svg/base.phpnu„[µü¤ $icon_key, 'version' => self::LIBRARY_CURRENT_VERSION, 'file_path' => ELEMENTOR_ASSETS_PATH . 'lib/font-awesome/json/' . $icon_file_name . '.json', 'data' => [ 'icon_data' => [ 'name' => $icon_name, 'library' => $icon['library'], ], ], ]; } protected function get_asset_content() { $icon_data = $this->get_config_data( 'icon_data' ); $file_data = json_decode( $this->get_file_data( 'content', $icon_data['library'] ), true ); $icon_name = $icon_data['name']; $svg_data = $file_data['icons'][ $icon_name ]; return [ 'width' => $svg_data[0], 'height' => $svg_data[1], 'path' => $svg_data[4], 'key' => $this->get_key(), ]; } } PK´[ÞB«qf f loader.phpnu„[µü¤PK´[_É:€€  data-managers/widgets-css.phpnu„[µü¤PK´[õPëkk$mdata-managers/responsive-widgets.phpnu„[µü¤PK´[ÄÁÌbÌÌ,data-managers/base.phpnu„[µü¤PK´[Q“óŒ  '>.data-managers/font-icon-svg/e-icons.phpnu„[µü¤PK´[{ 44'ž2data-managers/font-icon-svg/manager.phpnu„[µü¤PK´[V\U0»»$)7data-managers/font-icon-svg/base.phpnu„[µü¤PK´[«^pì,89data-managers/font-icon-svg/font-awesome.phpnu„[µü¤PKÿ¤>