SILENT KILLERPanel

Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > woocommerce > assets > js > frontend


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//ameliagraphics.com/wp-content/plugins/woocommerce/assets/js/frontend

NameTypeSizeLast ModifiedActions
account-i18n.js File 712 bytes June 25 2024 21:17:40.
account-i18n.min.js File 179 bytes June 25 2024 21:17:40.
add-payment-method.js File 1415 bytes November 23 2022 05:58:58.
add-payment-method.min.js File 905 bytes July 18 2023 23:53:36.
add-to-cart-variation.js File 30253 bytes March 03 2025 22:28:12.
add-to-cart-variation.min.js File 14751 bytes March 03 2025 22:28:12.
add-to-cart.js File 8845 bytes June 23 2025 19:46:28.
add-to-cart.min.js File 4422 bytes June 23 2025 19:54:28.
address-i18n.js File 5053 bytes January 21 2025 18:53:44.
address-i18n.min.js File 2750 bytes January 21 2025 18:53:44.
cart-fragments.js File 5639 bytes April 19 2023 03:03:20.
cart-fragments.min.js File 2939 bytes July 18 2023 23:53:36.
cart.js File 20962 bytes June 23 2025 19:46:28.
cart.min.js File 9878 bytes June 23 2025 19:46:28.
checkout.js File 33724 bytes June 23 2025 19:46:28.
checkout.min.js File 18099 bytes June 23 2025 19:46:28.
country-select.js File 6367 bytes August 27 2024 23:04:44.
country-select.min.js File 3494 bytes August 27 2024 23:04:44.
credit-card-form.js File 588 bytes May 23 2018 19:30:10.
credit-card-form.min.js File 518 bytes May 23 2018 19:30:10.
geolocation.js File 3845 bytes September 26 2023 21:42:36.
geolocation.min.js File 1286 bytes September 26 2023 21:42:36.
lost-password.js File 159 bytes May 23 2018 19:30:10.
lost-password.min.js File 132 bytes May 23 2018 19:30:10.
order-attribution.js File 6721 bytes May 12 2025 21:07:28.
order-attribution.min.js File 2346 bytes May 12 2025 21:07:28.
password-strength-meter.js File 4216 bytes January 21 2025 18:53:44.
password-strength-meter.min.js File 2190 bytes January 21 2025 18:53:44.
price-slider.js File 3065 bytes May 26 2021 00:19:44.
price-slider.min.js File 2138 bytes July 18 2023 23:53:36.
single-product.js File 16883 bytes June 23 2025 19:46:28.
single-product.min.js File 9649 bytes June 23 2025 19:46:28.
tokenization-form.js File 3841 bytes May 18 2021 21:00:20.
tokenization-form.min.js File 2264 bytes July 18 2023 23:53:36.
woocommerce.js File 7585 bytes June 23 2025 19:46:28.
woocommerce.min.js File 4131 bytes June 23 2025 19:46:28.
wp-consent-api-integration.js File 727 bytes January 30 2024 23:24:56.
wp-consent-api-integration.min.js File 435 bytes January 30 2024 23:24:56.

Reading File: /home/codekrsu//ameliagraphics.com/wp-content/plugins/woocommerce/assets/js/frontend/geolocation.js

/*global wc_geolocation_params */
jQuery( function( $ ) {
	/**
	 * Contains the current geo hash (or false if the hash
	 * is not set/cannot be determined).
	 *
	 * @type {boolean|string}
	 */
	var geo_hash = false;

	/**
	 * Obtains the current geo hash from the `woocommerce_geo_hash` cookie, if set.
	 *
	 * @returns {boolean}
	 */
	function get_geo_hash() {
		var geo_hash_cookie = Cookies.get( 'woocommerce_geo_hash' );

		if ( 'string' === typeof geo_hash_cookie && geo_hash_cookie.length ) {
			geo_hash = geo_hash_cookie;
			return true;
		}

		return false;
	}

	/**
	 * If we have an active geo hash value but it does not match the `?v=` query var in
	 * current page URL, that indicates that we need to refresh the page.
	 *
	 * @returns {boolean}
	 */
	function needs_refresh() {
		return geo_hash && ( new URLSearchParams( window.location.search ) ).get( 'v' ) !== geo_hash;
	}

	/**
	 * Appends (or replaces) the geo hash used for links on the current page.
	 */
	var $append_hashes = function() {
		if ( ! geo_hash ) {
			return;
		}

		$( 'a[href^="' + wc_geolocation_params.home_url + '"]:not(a[href*="v="]), a[href^="/"]:not(a[href*="v="])' ).each( function() {
			var $this      = $( this ),
				href       = $this.attr( 'href' ),
				href_parts = href.split( '#' );

			href = href_parts[0];

			if ( href.indexOf( '?' ) > 0 ) {
				href = href + '&v=' + geo_hash;
			} else {
				href = href + '?v=' + geo_hash;
			}

			if ( typeof href_parts[1] !== 'undefined' && href_parts[1] !== null ) {
				href = href + '#' + href_parts[1];
			}

			$this.attr( 'href', href );
		});
	};

	var $geolocate_customer = {
		url: wc_geolocation_params.wc_ajax_url.toString().replace( '%%endpoint%%', 'get_customer_location' ),
		type: 'GET',
		success: function( response ) {
			if ( response.success && response.data.hash && response.data.hash !== geo_hash ) {
				$geolocation_redirect( response.data.hash );
			}
		}
	};

	/**
	 * Once we have a new hash, we redirect so a new version of the current page
	 * (with correct pricing for the current region, etc) is displayed.
	 *
	 * @param {string} hash
	 */
	var $geolocation_redirect = function( hash ) {
		// Updates our (cookie-based) cache of the hash value. Expires in 1 hour.
		Cookies.set( 'woocommerce_geo_hash', hash, { expires: 1 / 24 } );

		const urlQuery     = new URL( window.location ).searchParams;
		const existingHash = urlQuery.get( 'v' );

		// If the current URL does not contain the expected hash, redirect.
		if ( existingHash !== hash ) {
			urlQuery.set( 'v', hash );
			window.location.search = '?' + urlQuery.toString();
		}
	};

	/**
	 * Updates any forms on the page so they use the current geo hash.
	 */
	function update_forms() {
		if ( ! geo_hash ) {
			return;
		}

		$( 'form' ).each( function () {
			var $this = $( this );
			var method = $this.attr( 'method' );
			var hasField = $this.find( 'input[name="v"]' ).length > 0;

			if ( method && 'get' === method.toLowerCase() && ! hasField ) {
				$this.append( '<input type="hidden" name="v" value="' + geo_hash + '" />' );
			} else {
				var href = $this.attr( 'action' );
				if ( href ) {
					if ( href.indexOf( '?' ) > 0 ) {
						$this.attr( 'action', href + '&v=' + geo_hash );
					} else {
						$this.attr( 'action', href + '?v=' + geo_hash );
					}
				}
			}
		});
	}

	// Get the current geo hash. If it doesn't exist, or if it doesn't match the current
	// page URL, perform a geolocation request.
	if ( ! get_geo_hash() || needs_refresh() ) {
		$.ajax( $geolocate_customer );
	}

	// Page updates.
	update_forms();
	$append_hashes();

	$( document.body ).on( 'added_to_cart', function() {
		$append_hashes();
	});

	// Enable user to trigger manual append hashes on AJAX operations
	$( document.body ).on( 'woocommerce_append_geo_hashes', function() {
		$append_hashes();
	});
});

SILENT KILLER Tool