%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 18.191.233.34
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User : www-root ( 1010)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/main/core/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/main/core//core_decl.js
;(function() {
	'use strict';

	BX.namespace('BX');

	var isBlock = function(block)
	{
		return BX.type.isPlainObject(block) && ('block' in block);
	};

	var isString = function(string)
	{
		return BX.type.isNotEmptyString(string);
	};

	var isTag = function(tag)
	{
		return BX.type.isPlainObject(tag) && !('block' in tag && 'elem' in tag);
	};

	BX.render = function(item)
	{
		var element = null;

		if (isBlock(item) || isTag(item))
		{
			var tag = 'tag' in item ? item.tag : 'div';
			var className = item.block;
			var attrs = 'attrs' in item ? item.attrs : {};
			var events = 'events' in item ? item.events : {};
			var props = {};

			if ('props' in item && BX.type.isPlainObject(item.props))
			{
				props = item.props;
			}

			if ('mix' in item && BX.type.isArray(item.mix))
			{
				item.mix.push(className);
				props.className = item.mix.join(' ');
			}
			else if ('mix' in item && BX.type.isNotEmptyString(item.mix))
			{
				props.className = [className, item.mix].join(' ');
			}
			else
			{
				props.className = className;
			}

			if ('content' in item)
			{
				var children = [];
				var text = '';

				if (isBlock(item.content) || isTag(item.content))
				{
					if (item.content.block in BX.Main.ui.block)
					{
						item.content = BX.Main.ui.block[item.content.block](item.content);
					}

					children = [BX.render(item.content)];
				}

				if (isString(item.content))
				{
					text = (item.isHtmlContent) ? item.content : BX.util.htmlspecialchars(item.content);
				}

				if (BX.type.isArray(item.content))
				{
					children = BX.decl(item.content);
				}

				if (BX.type.isDomNode(item.content))
				{
					children = [item.content];
				}
			}

			element = BX.create(tag, {props: props, attrs: attrs, events: events, children: children, html: text});
		}
		else if (isString(item))
		{
			element = BX.util.htmlspecialchars(item);
		}
		else if (BX.type.isDomNode(item))
		{
			element = item;
		}

		return element;
	};


	BX.decl = function(decl)
	{
		var result = null;

		if (BX.type.isArray(decl))
		{
			result = decl.map(function(current) {
				if (isBlock(current) && current.block in BX.Main.ui.block)
				{
					current = BX.Main.ui.block[current.block](current);
				}

				return BX.render(current);
			});
		}
		else if (isBlock(decl))
		{
			if (decl.block in BX.Main.ui.block)
			{
				decl = BX.Main.ui.block[decl.block](decl);
			}

			result = BX.render(decl);
		}

		return result;
	};
})();

Youez - 2016 - github.com/yon3zu
LinuXploit