PHP 8.2.31
Preview: progressbar.js Size: 4.12 KB
/home/nshryvcy/himaltourism.com/wp-includes/js/jquery/ui/progressbar.js

/*!
 * jQuery UI Progressbar 1.13.2
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */

//>>label: Progressbar
//>>group: Widgets
/* eslint-disable max-len */
//>>description: Displays a status indicator for loading state, standard percentage, and other progress indicators.
/* eslint-enable max-len */
//>>docs: http://api.jqueryui.com/progressbar/
//>>demos: http://jqueryui.com/progressbar/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/progressbar.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"./core"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.widget( "ui.progressbar", {
	version: "1.13.2",
	options: {
		classes: {
			"ui-progressbar": "ui-corner-all",
			"ui-progressbar-value": "ui-corner-left",
			"ui-progressbar-complete": "ui-corner-right"
		},
		max: 100,
		value: 0,

		change: null,
		complete: null
	},

	min: 0,

	_create: function() {

		// Constrain initial value
		this.oldValue = this.options.value = this._constrainedValue();

		this.element.attr( {

			// Only set static values; aria-valuenow and aria-valuemax are
			// set inside _refreshValue()
			role: "progressbar",
			"aria-valuemin": this.min
		} );
		this._addClass( "ui-progressbar", "ui-widget ui-widget-content" );

		this.valueDiv = $( "<div>" ).appendTo( this.element );
		this._addClass( this.valueDiv, "ui-progressbar-value", "ui-widget-header" );
		this._refreshValue();
	},

	_destroy: function() {
		this.element.removeAttr( "role aria-valuemin aria-valuemax aria-valuenow" );

		this.valueDiv.remove();
	},

	value: function( newValue ) {
		if ( newValue === undefined ) {
			return this.options.value;
		}

		this.options.value = this._constrainedValue( newValue );
		this._refreshValue();
	},

	_constrainedValue: function( newValue ) {
		if ( newValue === undefined ) {
			newValue = this.options.value;
		}

		this.indeterminate = newValue === false;

		// Sanitize value
		if ( typeof newValue !== "number" ) {
			newValue = 0;
		}

		return this.indeterminate ? false :
			Math.min( this.options.max, Math.max( this.min, newValue ) );
	},

	_setOptions: function( options ) {

		// Ensure "value" option is set after other values (like max)
		var value = options.value;
		delete options.value;

		this._super( options );

		this.options.value = this._constrainedValue( value );
		this._refreshValue();
	},

	_setOption: function( key, value ) {
		if ( key === "max" ) {

			// Don't allow a max less than min
			value = Math.max( this.min, value );
		}
		this._super( key, value );
	},

	_setOptionDisabled: function( value ) {
		this._super( value );

		this.element.attr( "aria-disabled", value );
		this._toggleClass( null, "ui-state-disabled", !!value );
	},

	_percentage: function() {
		return this.indeterminate ?
			100 :
			100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
	},

	_refreshValue: function() {
		var value = this.options.value,
			percentage = this._percentage();

		this.valueDiv
			.toggle( this.indeterminate || value > this.min )
			.width( percentage.toFixed( 0 ) + "%" );

		this
			._toggleClass( this.valueDiv, "ui-progressbar-complete", null,
				value === this.options.max )
			._toggleClass( "ui-progressbar-indeterminate", null, this.indeterminate );

		if ( this.indeterminate ) {
			this.element.removeAttr( "aria-valuenow" );
			if ( !this.overlayDiv ) {
				this.overlayDiv = $( "<div>" ).appendTo( this.valueDiv );
				this._addClass( this.overlayDiv, "ui-progressbar-overlay" );
			}
		} else {
			this.element.attr( {
				"aria-valuemax": this.options.max,
				"aria-valuenow": value
			} );
			if ( this.overlayDiv ) {
				this.overlayDiv.remove();
				this.overlayDiv = null;
			}
		}

		if ( this.oldValue !== value ) {
			this.oldValue = value;
			this._trigger( "change" );
		}
		if ( value === this.options.max ) {
			this._trigger( "complete" );
		}
	}
} );

} );

Directory Contents

Dirs: 0 × Files: 74

Name Size Perms Modified Actions
15.70 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
8.61 KB lrw-r--r-- 2023-04-04 05:42:19
Edit Download
17.03 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
8.27 KB lrw-r--r-- 2023-04-04 05:42:19
Edit Download
11.41 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
5.99 KB lrw-r--r-- 2023-04-04 05:42:19
Edit Download
7.36 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
4.21 KB lrw-r--r-- 2022-09-24 06:25:30
Edit Download
8.41 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
4.29 KB lrw-r--r-- 2022-09-24 06:25:30
Edit Download
48.68 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
20.94 KB lrw-r--r-- 2023-04-04 05:42:19
Edit Download
80.56 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
35.87 KB lrw-r--r-- 2023-04-04 05:42:19
Edit Download
23.03 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
12.65 KB lrw-r--r-- 2023-04-04 05:42:19
Edit Download
34.59 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
17.89 KB lrw-r--r-- 2023-04-04 05:42:19
Edit Download
12.57 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
6.49 KB lrw-r--r-- 2023-04-04 05:42:19
Edit Download
1.58 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
864 B lrw-r--r-- 2022-09-20 04:34:10
Edit Download
2.58 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
975 B lrw-r--r-- 2022-09-20 04:34:10
Edit Download
1.52 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
780 B lrw-r--r-- 2022-09-20 04:34:10
Edit Download
1.54 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
737 B lrw-r--r-- 2022-09-20 04:34:10
Edit Download
2.83 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
1.08 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
946 B lrw-r--r-- 2022-09-20 04:34:10
Edit Download
509 B lrw-r--r-- 2022-09-20 04:34:10
Edit Download
2.11 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
1004 B lrw-r--r-- 2022-09-20 04:34:10
Edit Download
1.19 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
632 B lrw-r--r-- 2022-09-20 04:34:10
Edit Download
973 B lrw-r--r-- 2022-09-20 04:34:10
Edit Download
494 B lrw-r--r-- 2022-09-20 04:34:10
Edit Download
1.51 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
672 B lrw-r--r-- 2022-09-20 04:34:10
Edit Download
1.32 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
707 B lrw-r--r-- 2022-09-20 04:34:10
Edit Download
1.82 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
830 B lrw-r--r-- 2022-09-20 04:34:10
Edit Download
5.27 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
2.42 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
1.90 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
901 B lrw-r--r-- 2022-09-20 04:34:10
Edit Download
866 B lrw-r--r-- 2022-09-20 04:34:10
Edit Download
426 B lrw-r--r-- 2022-09-20 04:34:10
Edit Download
40.96 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
16.93 KB lrw-r--r-- 2023-04-04 05:42:19
Edit Download
18.41 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
9.88 KB lrw-r--r-- 2023-04-04 05:42:19
Edit Download
6.05 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
3.32 KB lrw-r--r-- 2022-09-24 06:25:30
Edit Download
4.12 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
2.48 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
29.62 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
18.27 KB lrw-r--r-- 2023-04-04 05:42:19
Edit Download
7.92 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
4.38 KB lrw-r--r-- 2022-09-24 06:25:30
Edit Download
15.75 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
9.13 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
19.10 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
10.48 KB lrw-r--r-- 2023-04-04 05:42:19
Edit Download
46.45 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
24.85 KB lrw-r--r-- 2023-04-04 05:42:19
Edit Download
14.03 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
7.44 KB lrw-r--r-- 2022-09-24 06:25:30
Edit Download
23.02 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
11.66 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
14.06 KB lrw-r--r-- 2022-09-20 04:34:10
Edit Download
6.04 KB lrw-r--r-- 2023-04-04 05:42:19
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).