wp/wp-includes/js/jquery/ui/droppable.js
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
--- a/wp/wp-includes/js/jquery/ui/droppable.js	Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/js/jquery/ui/droppable.js	Fri Sep 05 18:40:08 2025 +0200
@@ -1,17 +1,17 @@
 /*!
- * jQuery UI Droppable 1.13.1
- * http://jqueryui.com
+ * jQuery UI Droppable 1.13.3
+ * https://jqueryui.com
  *
- * Copyright jQuery Foundation and other contributors
+ * Copyright OpenJS Foundation and other contributors
  * Released under the MIT license.
- * http://jquery.org/license
+ * https://jquery.org/license
  */
 
 //>>label: Droppable
 //>>group: Interactions
 //>>description: Enables drop targets for draggable elements.
-//>>docs: http://api.jqueryui.com/droppable/
-//>>demos: http://jqueryui.com/droppable/
+//>>docs: https://api.jqueryui.com/droppable/
+//>>demos: https://jqueryui.com/droppable/
 
 ( function( factory ) {
 	"use strict";
@@ -23,7 +23,8 @@
 			"jquery",
 			"./draggable",
 			"./mouse",
-			"./core"
+			"../version",
+			"../widget"
 		], factory );
 	} else {
 
@@ -34,7 +35,7 @@
 "use strict";
 
 $.widget( "ui.droppable", {
-	version: "1.13.1",
+	version: "1.13.3",
 	widgetEventPrefix: "drop",
 	options: {
 		accept: "*",
@@ -150,12 +151,12 @@
 
 		// Bail if draggable and droppable are same element
 		if ( !draggable || ( draggable.currentItem ||
-			draggable.element )[ 0 ] === this.element[ 0 ] ) {
+				draggable.element )[ 0 ] === this.element[ 0 ] ) {
 			return;
 		}
 
 		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||
-			draggable.element ) ) ) {
+				draggable.element ) ) ) {
 			this._addHoverClass();
 			this._trigger( "over", event, this.ui( draggable ) );
 		}
@@ -168,12 +169,12 @@
 
 		// Bail if draggable and droppable are same element
 		if ( !draggable || ( draggable.currentItem ||
-			draggable.element )[ 0 ] === this.element[ 0 ] ) {
+				draggable.element )[ 0 ] === this.element[ 0 ] ) {
 			return;
 		}
 
 		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||
-			draggable.element ) ) ) {
+				draggable.element ) ) ) {
 			this._removeHoverClass();
 			this._trigger( "out", event, this.ui( draggable ) );
 		}
@@ -187,7 +188,7 @@
 
 		// Bail if draggable and droppable are same element
 		if ( !draggable || ( draggable.currentItem ||
-			draggable.element )[ 0 ] === this.element[ 0 ] ) {
+				draggable.element )[ 0 ] === this.element[ 0 ] ) {
 			return false;
 		}
 
@@ -218,7 +219,7 @@
 		}
 
 		if ( this.accept.call( this.element[ 0 ],
-			( draggable.currentItem || draggable.element ) ) ) {
+				( draggable.currentItem || draggable.element ) ) ) {
 			this._removeActiveClass();
 			this._removeHoverClass();
 
@@ -281,28 +282,28 @@
 			b = t + droppable.proportions().height;
 
 		switch ( toleranceMode ) {
-			case "fit":
-				return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );
-			case "intersect":
-				return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half
-					x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half
-					t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half
-					y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half
-			case "pointer":
-				return isOverAxis( event.pageY, t, droppable.proportions().height ) &&
-					isOverAxis( event.pageX, l, droppable.proportions().width );
-			case "touch":
-				return (
-					( y1 >= t && y1 <= b ) || // Top edge touching
-					( y2 >= t && y2 <= b ) || // Bottom edge touching
-					( y1 < t && y2 > b ) // Surrounded vertically
-				) && (
-					( x1 >= l && x1 <= r ) || // Left edge touching
-					( x2 >= l && x2 <= r ) || // Right edge touching
-					( x1 < l && x2 > r ) // Surrounded horizontally
-				);
-			default:
-				return false;
+		case "fit":
+			return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );
+		case "intersect":
+			return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half
+				x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half
+				t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half
+				y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half
+		case "pointer":
+			return isOverAxis( event.pageY, t, droppable.proportions().height ) &&
+				isOverAxis( event.pageX, l, droppable.proportions().width );
+		case "touch":
+			return (
+				( y1 >= t && y1 <= b ) || // Top edge touching
+				( y2 >= t && y2 <= b ) || // Bottom edge touching
+				( y1 < t && y2 > b ) // Surrounded vertically
+			) && (
+				( x1 >= l && x1 <= r ) || // Left edge touching
+				( x2 >= l && x2 <= r ) || // Right edge touching
+				( x1 < l && x2 > r ) // Surrounded horizontally
+			);
+		default:
+			return false;
 		}
 	};
 } )();
@@ -324,7 +325,7 @@
 
 			// No disabled and non-accepted
 			if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ],
-				( t.currentItem || t.element ) ) ) ) {
+					( t.currentItem || t.element ) ) ) ) {
 				continue;
 			}
 
@@ -366,12 +367,12 @@
 				return;
 			}
 			if ( !this.options.disabled && this.visible &&
-				$.ui.intersect( draggable, this, this.options.tolerance, event ) ) {
+					$.ui.intersect( draggable, this, this.options.tolerance, event ) ) {
 				dropped = this._drop.call( this, event ) || dropped;
 			}
 
 			if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ],
-				( draggable.currentItem || draggable.element ) ) ) {
+					( draggable.currentItem || draggable.element ) ) ) {
 				this.isout = true;
 				this.isover = false;
 				this._deactivate.call( this, event );