SILENT KILLERPanel

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


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/admin//

NameTypeSizeLast ModifiedActions
api-keys.js File 3986 bytes May 18 2021 21:00:20.
api-keys.min.js File 2280 bytes July 18 2023 23:53:36.
backbone-modal.js File 4459 bytes December 27 2023 00:45:02.
backbone-modal.min.js File 2837 bytes December 27 2023 00:45:02.
marketplace-suggestions.js File 16612 bytes June 23 2025 19:46:28.
marketplace-suggestions.min.js File 6654 bytes June 23 2025 19:46:28.
meta-boxes-coupon.js File 3057 bytes April 01 2025 15:51:36.
meta-boxes-coupon.min.js File 1650 bytes April 01 2025 15:51:36.
meta-boxes-order.js File 55606 bytes May 12 2025 21:07:28.
meta-boxes-order.min.js File 33765 bytes May 12 2025 21:07:28.
meta-boxes-product-variation.js File 43279 bytes May 12 2025 21:07:28.
meta-boxes-product-variation.min.js File 23090 bytes May 12 2025 21:07:28.
meta-boxes-product.js File 35075 bytes May 12 2025 21:07:28.
meta-boxes-product.min.js File 18476 bytes May 12 2025 21:07:28.
meta-boxes.js File 4993 bytes August 01 2023 21:16:08.
meta-boxes.min.js File 3040 bytes August 01 2023 21:16:08.
network-orders.js File 2394 bytes May 23 2018 19:30:10.
network-orders.min.js File 1281 bytes July 18 2023 23:53:36.
order-attribution-admin.js File 1185 bytes December 27 2023 00:45:02.
order-attribution-admin.min.js File 730 bytes December 27 2023 00:45:02.
product-editor.js File 405 bytes November 23 2022 05:58:58.
product-editor.min.js File 240 bytes July 18 2023 23:53:36.
product-ordering.js File 2547 bytes July 19 2022 23:16:40.
product-ordering.min.js File 1653 bytes July 18 2023 23:53:36.
quick-edit.js File 7231 bytes March 03 2025 22:28:12.
quick-edit.min.js File 4691 bytes March 03 2025 22:28:12.
reports.js File 5518 bytes November 14 2024 01:17:00.
reports.min.js File 2765 bytes November 14 2024 01:17:00.
settings-views-html-settings-tax.js File 12324 bytes March 03 2025 22:28:12.
settings-views-html-settings-tax.min.js File 6231 bytes March 03 2025 22:28:12.
settings.js File 12233 bytes May 12 2025 21:07:28.
settings.min.js File 6402 bytes May 12 2025 21:07:28.
system-status.js File 5419 bytes June 18 2024 17:22:26.
system-status.min.js File 3138 bytes June 18 2024 17:22:26.
term-ordering.js File 4675 bytes June 22 2022 02:13:02.
term-ordering.min.js File 2532 bytes July 18 2023 23:53:36.
users.js File 3875 bytes May 18 2021 21:00:20.
users.min.js File 1915 bytes July 18 2023 23:53:36.
wc-brands-enhanced-select.js File 4160 bytes September 23 2024 20:44:04.
wc-brands-enhanced-select.min.js File 1630 bytes September 23 2024 20:44:04.
wc-clipboard.js File 869 bytes May 18 2021 21:00:20.
wc-clipboard.min.js File 336 bytes May 18 2021 21:00:20.
wc-enhanced-select.js File 13906 bytes August 16 2023 00:05:04.
wc-enhanced-select.min.js File 7892 bytes August 16 2023 00:05:04.
wc-orders.js File 2024 bytes October 19 2022 00:34:38.
wc-orders.min.js File 1195 bytes July 18 2023 23:53:36.
wc-product-export.js File 3880 bytes May 12 2025 21:07:28.
wc-product-export.min.js File 2141 bytes May 12 2025 21:07:28.
wc-product-import.js File 2995 bytes May 24 2023 03:17:54.
wc-product-import.min.js File 1742 bytes July 18 2023 23:53:36.
wc-setup.js File 10290 bytes May 18 2021 21:00:20.
wc-setup.min.js File 6502 bytes July 18 2023 23:53:36.
wc-shipping-classes.js File 6725 bytes March 03 2025 22:28:12.
wc-shipping-classes.min.js File 3651 bytes March 03 2025 22:28:12.
wc-shipping-zone-methods.js File 28999 bytes April 01 2025 15:51:36.
wc-shipping-zone-methods.min.js File 15146 bytes April 01 2025 15:51:36.
wc-shipping-zones.js File 9452 bytes March 03 2025 22:28:12.
wc-shipping-zones.min.js File 4970 bytes March 03 2025 22:28:12.
wc-status-widget-async.js File 1311 bytes May 12 2025 21:07:28.
wc-status-widget-async.min.js File 519 bytes May 12 2025 21:07:28.
wc-status-widget.js File 1824 bytes November 14 2024 01:17:00.
wc-status-widget.min.js File 1074 bytes November 14 2024 01:17:00.
woocommerce_admin.js File 22913 bytes May 12 2025 21:07:28.
woocommerce_admin.min.js File 12270 bytes May 12 2025 21:07:28.

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

/* global woocommerce_settings_params, wp */
( function ( $, params, wp ) {
	$( function () {
		// Sell Countries
		$( 'select#woocommerce_allowed_countries' )
			.on( 'change', function () {
				if ( 'specific' === $( this ).val() ) {
					$( this ).closest( 'tr' ).next( 'tr' ).hide();
					$( this ).closest( 'tr' ).next().next( 'tr' ).show();
				} else if ( 'all_except' === $( this ).val() ) {
					$( this ).closest( 'tr' ).next( 'tr' ).show();
					$( this ).closest( 'tr' ).next().next( 'tr' ).hide();
				} else {
					$( this ).closest( 'tr' ).next( 'tr' ).hide();
					$( this ).closest( 'tr' ).next().next( 'tr' ).hide();
				}
			} )
			.trigger( 'change' );

		// Ship Countries
		$( 'select#woocommerce_ship_to_countries' )
			.on( 'change', function () {
				if ( 'specific' === $( this ).val() ) {
					$( this ).closest( 'tr' ).next( 'tr' ).show();
				} else {
					$( this ).closest( 'tr' ).next( 'tr' ).hide();
				}
			} )
			.trigger( 'change' );

		// Stock management
		$( 'input#woocommerce_manage_stock' )
			.on( 'change', function () {
				if ( $( this ).is( ':checked' ) ) {
					$( this )
						.closest( 'tbody' )
						.find( '.manage_stock_field' )
						.closest( 'tr' )
						.show();
				} else {
					$( this )
						.closest( 'tbody' )
						.find( '.manage_stock_field' )
						.closest( 'tr' )
						.hide();
				}
			} )
			.trigger( 'change' );

		// Color picker
		$( '.colorpick' )
			.iris( {
				change: function ( event, ui ) {
					const $this = $( this );
					$this
						.parent()
						.find( '.colorpickpreview' )
						.css( { backgroundColor: ui.color.toString() } );
					setTimeout( function () {
						$this.trigger( 'change' );
					} );
				},
				hide: true,
				border: true,
			} )

			.on( 'click focus', function ( event ) {
				event.stopPropagation();
				$( '.iris-picker' ).hide();
				$( this ).closest( 'td' ).find( '.iris-picker' ).show();
				$( this ).data( 'originalValue', $( this ).val() );
			} )

			.on( 'change', function () {
				if ( $( this ).is( '.iris-error' ) ) {
					var original_value = $( this ).data( 'originalValue' );

					if (
						original_value.match(
							/^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/
						)
					) {
						$( this )
							.val( $( this ).data( 'originalValue' ) )
							.trigger( 'change' );
					} else {
						$( this ).val( '' ).trigger( 'change' );
					}
				}
			} );

		$( '.iris-square-value' ).on( 'click', function ( event ) {
			event.preventDefault();
		} );

		$( '.colorpickpreview' ).on( 'click', function ( event ) {
			event.stopPropagation();
			$( this ).next( '.colorpick' ).click();
		} );

		$( 'body' ).on( 'click', function () {
			$( '.iris-picker' ).hide();
		} );

		// Edit prompt
		function editPrompt () {
			var changed = false;
			let $prevent_change_elements = $( '.wp-list-table .check-column, .wc-settings-prevent-change-event' );

			$( 'input, textarea, select, checkbox' ).on( 'change input', function (
				event
			) {
				// Prevent change event on specific elements, that don't change the form. E.g.:
				// - WP List Table checkboxes that only (un)select rows
				// - Changing email type in email preview
				if (
					$prevent_change_elements.length &&
					$prevent_change_elements.has( event.target ).length
				) {
					return;
				}

				if ( ! changed ) {
					window.onbeforeunload = function () {
						return params.i18n_nav_warning;
					};
					changed = true;
					$( '.woocommerce-save-button' ).removeAttr( 'disabled' );
				}
			} );

			$( '.iris-picker' ).on( 'click', function () {
				if ( ! changed ) {
					changed = true;
					$( '.woocommerce-save-button' ).removeAttr( 'disabled' );
				}
			} );

			$( '.submit :input, input#search-submit' ).on(
				'click',
				function () {
					window.onbeforeunload = '';
				}
			);
		}

		$( editPrompt );

		const nodeListContainsFormElements = ( nodes ) => {
			if ( ! nodes.length	) {
				return false;
			}
			return Array.from( nodes ).some( ( element ) => {
				return $( element ).find( 'input, textarea, select, checkbox' ).length;
			} );
		}

		const form = document.querySelector( '#mainform' );
		const observer = new MutationObserver( ( mutationsList ) => {
			for ( const mutation of mutationsList ) {
				if ( mutation.type === 'childList' ) {
					if ( nodeListContainsFormElements( mutation.addedNodes ) ) {
						editPrompt();
						$( '.woocommerce-save-button' ).removeAttr( 'disabled' );
					} else if ( nodeListContainsFormElements( mutation.removedNodes ) ) {
						$( '.woocommerce-save-button' ).removeAttr( 'disabled' );
					}
				}
			}
		} );

		observer.observe( form, { childList: true, subtree: true } );

		// Sorting
		$( 'table.wc_gateways tbody, table.wc_shipping tbody' ).sortable( {
			items: 'tr',
			cursor: 'move',
			axis: 'y',
			handle: 'td.sort',
			scrollSensitivity: 40,
			helper: function ( event, ui ) {
				ui.children().each( function () {
					$( this ).width( $( this ).width() );
				} );
				ui.css( 'left', '0' );
				return ui;
			},
			start: function ( event, ui ) {
				ui.item.css( 'background-color', '#f6f6f6' );
			},
			stop: function ( event, ui ) {
				ui.item.removeAttr( 'style' );
				ui.item.trigger( 'updateMoveButtons', { isInitialLoad: false } );
			},
		} );

		// Select all/none
		$( '.woocommerce' ).on( 'click', '.select_all', function () {
			$( this )
				.closest( 'td' )
				.find( 'select option' )
				.prop( 'selected', true );
			$( this ).closest( 'td' ).find( 'select' ).trigger( 'change' );
			return false;
		} );

		$( '.woocommerce' ).on( 'click', '.select_none', function () {
			$( this )
				.closest( 'td' )
				.find( 'select option' )
				.prop( 'selected', false );
			$( this ).closest( 'td' ).find( 'select' ).trigger( 'change' );
			return false;
		} );

		// Re-order buttons.
		$( '.wc-item-reorder-nav' )
			.find( '.wc-move-up, .wc-move-down' )
			.on( 'click', function () {
				var moveBtn = $( this ),
					$row = moveBtn.closest( 'tr' );

				moveBtn.trigger( 'focus' );

				var isMoveUp = moveBtn.is( '.wc-move-up' ),
					isMoveDown = moveBtn.is( '.wc-move-down' );

				if ( isMoveUp ) {
					var $previewRow = $row.prev( 'tr' );

					if ( $previewRow && $previewRow.length ) {
						$previewRow.before( $row );
						wp.a11y.speak( params.i18n_moved_up );
					}
				} else if ( isMoveDown ) {
					var $nextRow = $row.next( 'tr' );

					if ( $nextRow && $nextRow.length ) {
						$nextRow.after( $row );
						wp.a11y.speak( params.i18n_moved_down );
					}
				}

				moveBtn.trigger( 'focus' ); // Re-focus after the container was moved.
				moveBtn.closest( 'table' ).trigger( 'updateMoveButtons', { isInitialLoad: false } );
			} );

		$( '.wc-item-reorder-nav' )
			.closest( 'table' )
			.on( 'updateMoveButtons', function ( event, data ) {
				var table = $( this ),
					lastRow = $( this ).find( 'tbody tr:last' ),
					firstRow = $( this ).find( 'tbody tr:first' );

				table
					.find( '.wc-item-reorder-nav .wc-move-disabled' )
					.removeClass( 'wc-move-disabled' )
					.attr( { tabindex: '0', 'aria-hidden': 'false' } );
				firstRow
					.find( '.wc-item-reorder-nav .wc-move-up' )
					.addClass( 'wc-move-disabled' )
					.attr( { tabindex: '-1', 'aria-hidden': 'true' } );
				lastRow
					.find( '.wc-item-reorder-nav .wc-move-down' )
					.addClass( 'wc-move-disabled' )
					.attr( { tabindex: '-1', 'aria-hidden': 'true' } );
				if ( ! data.isInitialLoad ) {
					$( '.woocommerce-save-button' ).removeAttr( 'disabled' );
				}
			} );

		$( '.wc-item-reorder-nav' )
			.closest( 'table' )
			.trigger( 'updateMoveButtons', { isInitialLoad: true } );

		$( '.submit button' ).on( 'click', function () {
			if (
				$( 'select#woocommerce_allowed_countries' ).val() ===
					'specific' &&
				! $( '[name="woocommerce_specific_allowed_countries[]"]' ).val()
			) {
				if (
					window.confirm(
						woocommerce_settings_params.i18n_no_specific_countries_selected
					)
				) {
					return true;
				}
				return false;
			}
		} );

		$( '#settings-other-payment-methods' ).on( 'click', function ( e ) {
			if (
				typeof window.wcTracks.recordEvent === 'undefined' &&
				typeof window.wc.tracks.recordEvent === 'undefined'
			) {
				return;
			}

			var recordEvent =
				window.wc.tracks.recordEvent || window.wcTracks.recordEvent;

			var payment_methods = $.map(
				$(
					'td.wc_payment_gateways_wrapper tbody tr[data-gateway_id] '
				),
				function ( tr ) {
					return $( tr ).attr( 'data-gateway_id' );
				}
			);

			recordEvent( 'settings_payments_recommendations_other_options', {
				available_payment_methods: payment_methods,
			} );
		} );

		$( '.woocommerce-save-button.components-button' ).on( 'click', function ( e ) {
			if ( ! $( this ).attr( 'disabled' ) ) {
				$( this ).addClass( 'is-busy' );
			}
		} );

		/**
		 * Support conditionally displaying a settings field description when another element
		 * is set to a specific value.
		 *
		 * This logic is subject to change, and is not intended for use by other plugins.
		 * Note that we can't avoid jQuery here, because of our current dependence on Select2
		 * for various controls.
		 */
		document.querySelectorAll( 'body.woocommerce_page_wc-settings #mainform .conditional.description' ).forEach( description => {
			const $underObservation = $( description.dataset.dependsOn );
			const showIfEquals      = description.dataset.showIfEquals;

			if ( undefined === showIfEquals || $underObservation.length === 0 ) {
				return;
			}

			/**
			 * Set visibility of the description element according to whether its value
			 * matches that of showIfEquals.
			 */
			const changeAgent = () => {
				description.style.visibility = $underObservation.val() === showIfEquals ? 'visible' : 'hidden';
			};

			// Monitor future changes, and take action based on the current state.
			$underObservation.on( 'change', changeAgent );
			changeAgent();
		} );

		// Ensures the active tab is visible and centered on small screens if it's out of view in a scrollable tab list.
		function settings_scroll_to_active_tab() {
			const body = document.body;
			if (
				! body.classList.contains('mobile') ||
				! body.classList.contains('woocommerce_page_wc-settings')
			) {
				return;
			}
			// Select the currently active tab
			const activeTab = document.querySelector( '.nav-tab-active' );

			// Exit if there's no active tab or screen is wider than 500px (desktop)
			if ( ! activeTab || window.innerWidth >= 500 ) {
				return;
			}

			// Get the parent element, assumed to be the scrollable container
			const parent = activeTab.parentElement;

			// Exit if no parent or if scrolling isn't needed (content fits)
			if ( ! parent || parent.scrollWidth <= parent.clientWidth ) {
				return;
			}

			// Get the position of the active tab relative to its parent
			const tabLeft = activeTab.offsetLeft;
			const tabRight = tabLeft + activeTab.offsetWidth;
			const scrollLeft = parent.scrollLeft;
			const visibleLeft = scrollLeft;
			const visibleRight = scrollLeft + parent.clientWidth;
			const isOutOfView = tabLeft < visibleLeft || tabRight > visibleRight;

			// If it’s out of view, scroll the parent so the tab is centered
			if ( isOutOfView ) {
				const offset = tabLeft - parent.clientWidth / 2 + activeTab.offsetWidth / 2;
					parent.scrollTo( {
					left: offset,
					behavior: 'auto' // Instant scroll (no animation)
				} );
			}
		}

		// Some legacy setting pages have tables that span beyond the set width of its parents
		// causing layout issues.
		// Fixe the width of the nav tab wrapper to match the window width on mobile.
		function settings_fix_nav_width() {
			const body = document.body;
			if (
				! body.classList.contains('mobile') ||
				! body.classList.contains('woocommerce_page_wc-settings')
			) {
				return;
			}
			const navWrapper = document.getElementsByClassName('nav-tab-wrapper');
			if ( ! navWrapper.length ) {
				return;
			}

			const navWrapperWidth = navWrapper[0].offsetWidth;
			if ( navWrapperWidth !== window.innerWidth) {
				navWrapper[0].style.width = window.innerWidth + 'px';
			}
		}

		settings_scroll_to_active_tab();
		settings_fix_nav_width();

	} );
} )( jQuery, woocommerce_settings_params, wp );

SILENT KILLER Tool