/**
 * Kendo UI v2023.3.1114 (http://www.telerik.com/kendo-ui)
 * Copyright 2023 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
 *
 * Kendo UI commercial licenses may be obtained at
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
 * If you do not own a commercial license, this file shall be governed by the trial license terms.
 */
import"./kendo.core.js";import"./kendo.draganddrop.js";var __meta__={id:"resizable",name:"Resizable",category:"framework",depends:["core","draganddrop"],advanced:!0};!function(i,t){var n=window.kendo,o=n.ui,e=o.Widget,s=n.isFunction,r=i.extend,a="horizontal",d="vertical",c="start",l="resize",p="resizeend",_=e.extend({init:function(i,t){var n=this;e.fn.init.call(n,i,t),n.orientation=n.options.orientation.toLowerCase()!=d?a:d,n._positionMouse=n.orientation==a?"x":"y",n._position=n.orientation==a?"left":"top",n._sizingDom=n.orientation==a?"outerWidth":"outerHeight",n.draggable=new o.Draggable(t.draggableElement||i,{distance:1,filter:t.handle,drag:n._resize.bind(n),dragcancel:n._cancel.bind(n),dragstart:n._start.bind(n),dragend:n._dragend.bind(n),clickMoveClick:t.clickMoveClick}),n.userEvents=n.draggable.userEvents},events:[l,p,c],options:{name:"Resizable",orientation:a,clickMoveClick:!1},resize:function(){},_max:function(i){var n=this,o=n.hint?n.hint[n._sizingDom]():0,e=n.options.max;return s(e)?e(i):e!==t?n._initialElementPosition+e-o:e},_min:function(i){var n=this.options.min;return s(n)?n(i):n!==t?this._initialElementPosition+n:n},_start:function(t){var n=this,o=n.options.hint,e=i(t.currentTarget);n._initialElementPosition=e.position()[n._position],n._initialMousePosition=t[n._positionMouse].startLocation,o&&(n.hint=s(o)?i(o(e)):o,n.hint.css({position:"absolute"}).css(n._position,n._initialElementPosition).appendTo(n.element)),n.trigger(c,t),n._maxPosition=n._max(t),n._minPosition=n._min(t),i(document.body).css("cursor",e.css("cursor"))},_resize:function(i){var n,o=this,e=o._maxPosition,s=o._minPosition,a=o._initialElementPosition+(i[o._positionMouse].location-o._initialMousePosition);n=s!==t?Math.max(s,a):a,o.position=n=e!==t?Math.min(e,n):n,o.hint&&o.hint.toggleClass(o.options.invalidClass||"",n==e||n==s).css(o._position,n),o.resizing=!0,o.trigger(l,r(i,{position:n}))},_dragend:function(i){this._stop(),this.trigger(p,r(i,{position:this.position}))},_stop:function(){var t=this;t.hint&&t.hint.remove(),t.resizing=!1,i(document.body).css("cursor","")},_cancel:function(i){var n=this;n.hint&&(n.position=t,n.hint.css(n._position,n._initialElementPosition),n._stop())},destroy:function(){var i=this;e.fn.destroy.call(i),i.draggable&&i.draggable.destroy()},press:function(i){if(i){var t=i.position(),n=this;n.userEvents.press(t.left,t.top,i[0]),n.targetPosition=t,n.target=i}},move:function(i){var n=this,o=n._position,e=n.targetPosition,s=n.position;s===t&&(s=e[o]),e[o]=s+i,n.userEvents.move(e.left,e.top)},end:function(){this.userEvents.end(),this.target=this.position=t}});n.ui.plugin(_)}(window.kendo.jQuery);var kendo$1=kendo;export{kendo$1 as default};
//# sourceMappingURL=kendo.resizable.js.map
