jQuery UI & 下载 & 拖动组件

转载地址:http://www.cnblogs.com/lihuiyy/archive/2012/08/08/2601683.html

jQuery UI 库文件官方下载: http://jqueryui.com/download

使用时,只需在工程中将 development-bundle 文件夹下的 themes 文件夹添加到新建 css 文件夹下,并将 ui 文件夹导入到工程中。然后在 html 文件中,按下列顺序导入js文件:

<script type="text/javascript" src="jquery-1.7.2.js"></script>
<script type="text/javascript" src="ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="ui/jquery.ui.mouse.js"></script>
<script type="text/javascript" src="ui/jquery.ui.draggable.js"></script> //这个是根据需要导入,在此实现拖动效果

1.拖动手柄

代码如下:

按 Ctrl+C 复制代码
按 Ctrl+C 复制代码

2.Helper元素

代码如下:

复制代码
 1 <body>
 2 <fieldset>
 3   <legend>说明</legend>
 4   1、拖动"茄菲猫"时自身将随鼠标一起移动,helper为original。<br/>
 5   2、拖动"多啦A梦"时自身原始位置不变,而是创建一个副本随鼠标移动,helper为clone。还配合opacity属性设置了透明度。<br/>
 6   3、拖动"阿童木"时将会出现一个自定义的helper,它是由helper的回调函数来定义的。
 7 </fieldset>
 8 <div id="message_box1" class="message_box" >
 9   <div class="message" >
10     <div class="header">
11       <div>茄菲猫</div>
12       <span>×</span></div>
13     <img src="images/jiafeimao.jpg" /> </div>
14 </div>
15 <div id="message_box2" class="message_box" >
16   <div class="message" >
17     <div class="header">
18       <div>多啦A梦</div>
19       <span>×</span></div>
20     <img src="images/duolaeim.jpg" /> </div>
21 </div>
22 <div id="message_box3" class="message_box" >
23   <div class="message" >
24     <div class="header">
25       <div>阿童木</div>
26       <span>×</span></div>
27     <img src="images/atongmu.jpg" /> </div>
28 </div>
29 <script language="javascript" type="text/javascript">
30 $(document).ready(function(){
31     $("#message_box1").draggable({helper: "original"});
32     $("#message_box2").draggable({opacity: 0.7, helper: "clone"});
33     $("#message_box3").draggable({
34         cursor: "move",
35         cursorAt: { top: -10, left: -10 },
36         helper: function( event ) {
37                 return $( "<div class='ui-widget-header'>这里是自定义helper</div>" );
38             }
39 
40         });
41 });
42 </script>
43 </body>
复制代码

3.限制拖动区域

代码如下:

复制代码
 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2 <html xmlns="http://www.w3.org/1999/xhtml">
 3 <head>
 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5 <title>draggable组件</title>
 6 <script language="javascript" src="js/jquery-1.4.2.min.js"></script>
 7 <script type="text/javascript" src="js/jquery.ui.core.js"></script>
 8 <script type="text/javascript" src="js/jquery.ui.widget.js"></script>
 9 <script type="text/javascript" src="js/jquery.ui.mouse.js"></script>
10 <script type="text/javascript" src="js/jquery.ui.draggable.js"></script>
11 <link href="CSS/base/jquery.ui.all.css" rel="stylesheet" type="text/css" />
12 <style type="text/css">
13 body {
14     font-size:14px;
15 }
16 #wrap {
17     clear:both;
18     margin: 10px auto 10px auto;
19     padding: 10px;
20     width: 620px;
21     height:150px;
22     background: #fff;
23     border: 5px solid #000;
24 }
25 .drag {
26     width:150px;
27     height:100px;
28     border: 2px solid #000;
29     float:left;
30     padding:5px;
31     margin: 0 10px 10px 0;
32 }
33 .miniDrag {
34     font-size:12px;
35     border: 2px solid #D6D6D6;
36     cursor:move
37 }
38 #box1 {
39     cursor: e-resize;
40 }
41 #box2 {
42     cursor: n-resize;
43 }
44 fieldset {
45     margin-bottom:5px;
46 }
47 </style>
48 </head>
49 <body>
50 <fieldset>
51   <legend>说明</legend>
52   1、box1和box2被限制只能在一个方向上拖动,由axis属性定义。<br/>
53   2、box3、box4和box5则被限制在指定区域内,由containment属性定义。
54 </fieldset>
55 <div id="box1" class="drag">我是box1,只能水平拖动。</div>
56 <div id="box2" class="drag">我是box2,只能垂直拖动。</div>
57 <div id="wrap">
58   <div id="box3" class="drag">我是box3,只能在这个容器内拖动。 </div>
59   <div id="box4" class="drag">我是box4,活动区域是整个窗口</div>
60   <div  class="drag">我是box
61     <div id="box5" class="miniDrag">我是box5,能在我的父容器内活动</div>
62   </div>
63 </div>
64 <script type="text/javascript" language="javascript">
65 $(document).ready(function(){
66     $("#box1").draggable({axis:"x"});
67     $("#box2").draggable({axis:"y"});
68     $("#box3").draggable({containment: "#wrap", scroll: false,cursor:"move"});
69     $("#box4").draggable({containment: "window",cursor:"move"});
70     $("#box5").draggable({containment: "parent",cursor:"move"});
71 });
72 </script>
73 </body>
74 </html>
复制代码

4.自动吸附

代码如下:

复制代码
 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2 <html xmlns="http://www.w3.org/1999/xhtml">
 3 <head>
 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5 <title>draggable组件</title>
 6 <script language="javascript" src="js/jquery-1.4.2.min.js"></script>
 7 <script type="text/javascript" src="js/jquery.ui.core.js"></script>
 8 <script type="text/javascript" src="js/jquery.ui.widget.js"></script>
 9 <script type="text/javascript" src="js/jquery.ui.mouse.js"></script>
10 <script type="text/javascript" src="js/jquery.ui.draggable.js"></script>
11 <style type="text/css">
12 body {
13     font-size:14px;
14 }
15 #wrap {
16     clear:both;
17     margin: 10px auto 10px auto;
18     width: 720px;
19     height:220px;
20     border: 1px solid #BFBFBF;
21     background-color: #fff;
22     background-image: url(images/40.JPG);
23 }
24 h1 {
25     color:#006;
26     font-size:24px;
27     font-weight:bold;
28     text-align:center;
29     margin-top:0px;
30 }
31 .drag {
32     width:121px;
33     height:100px;
34     border: 1px solid #000;
35     float:left;
36     margin: 0 20px 0 0;
37     background:#FFF;
38 }
39 
40 </style>
41 </head>
42 <body>
43 <h1>设置可拖动元素的吸附能力</h1>
44 <div id="wrap" >
45   <div id="box1" class="drag">box1,自动吸附到所有可拖动对象</div>
46   <div id="box2" class="drag">box2,仅可吸附到父容器</div>
47   <div id="box3" class="drag">box3,仅可吸附到父容器的内边</div>
48   <div id="box4" class="drag">box4,按20×20网格自动吸附</div>
49   <div id="box5" class="drag">box5,按40×40网格自动吸附</div>
50 </div>
51 <script type="text/javascript" language="javascript">
52 $(document).ready(function(){
53         $( "#box1" ).draggable({ snap: true });
54         $( "#box2" ).draggable({ snap: "#wrap" });
55         $( "#box3" ).draggable({ snap: "#wrap", snapMode: "inner" });
56         $( "#box4" ).draggable({ grid: [ 20,20 ] });
57         $( "#box5" ).draggable({ grid: [ 40, 40 ] });
58 });
59 </script>
60 </body>
61 </html>
复制代码

5.重设拖动后的元素

代码如下:

复制代码
  1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2 <html xmlns="http://www.w3.org/1999/xhtml">
  3 <head>
  4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5 <title>draggable组件</title>
  6 <script language="javascript" src="js/jquery-1.4.2.min.js"></script>
  7 <script type="text/javascript" src="js/jquery.ui.core.js"></script>
  8 <script type="text/javascript" src="js/jquery.ui.widget.js"></script>
  9 <script type="text/javascript" src="js/jquery.ui.mouse.js"></script>
 10 <script type="text/javascript" src="js/jquery.ui.draggable.js"></script>
 11 <style type="text/css">
 12 .message_box {
 13     width:180px;
 14     height:150px;
 15     filter:dropshadow(color=#666666, offx=3, offy=3, positive=2);
 16     float:left;
 17     margin-right:10px;
 18 }
 19 #mask {
 20     position:absolute;
 21     top:0;
 22     left:0;
 23 width:expression(body.clientWidth);
 24 height:expression(body.clientHeight);
 25     background:#666;
 26     filter:ALPHA(opacity=60);
 27     z-index:1;
 28     visibility:hidden
 29 }
 30 .message {
 31     border:#036 solid;
 32     border-width:1 1 3 1;
 33     width:95%;
 34     height:95%;
 35     background:#fff;
 36     color:#036;
 37     font-size:12px;
 38     line-height:150%
 39 }
 40 .header {
 41     background:#036;
 42     height:22px;
 43     font-family:Verdana, Arial, Helvetica, sans-serif;
 44     font-size:12px;
 45     padding:3px 5px 0px 10px;
 46     color:#fff;
 47     cursor:move;
 48 }
 49 ul {
 50     margin-right:25px;
 51 }
 52 .header div {
 53     display:inline;
 54     width:150px;
 55 }
 56 .header span {
 57     float:right;
 58     display:inline;
 59     cursor:hand;
 60 }
 61 fieldset {
 62     margin-bottom:5px;
 63 }
 64 .message_box img {
 65     width:100px;
 66     border:2px solid #D6D6D6;
 67     margin:10px;
 68 }
 69 </style>
 70 <link href="CSS/base/jquery.ui.all.css" rel="stylesheet" type="text/css" />
 71 </head>
 72 <body>
 73 <fieldset>
 74   <legend>说明</legend>
 75   1、拖动"茄菲猫"结束时,自身将从鼠标位置自动返回原始位置。<br/>
 76   2、拖动"多啦A梦"结束时,副本将从鼠标位置自动返回原始位置。<br/>
 77   3、拖动"阿童木"结束时,自身将从鼠标位置自动返回原始位置。在这里可以设置返回间隔(单位:毫秒)
 78   <input type="text" value="1000" size="4" />
 79 </fieldset>
 80 <div id="message_box1" class="message_box" >
 81   <div class="message" >
 82     <div class="header">
 83       <div>茄菲猫</div>
 84       <span>×</span></div>
 85     <img src="images/jiafeimao.jpg" /> </div>
 86 </div>
 87 <div id="message_box2" class="message_box" >
 88   <div class="message" >
 89     <div class="header">
 90       <div>多啦A梦</div>
 91       <span>×</span></div>
 92     <img src="images/duolaeim.jpg" /> </div>
 93 </div>
 94 <div id="message_box3" class="message_box" >
 95   <div class="message" >
 96     <div class="header">
 97       <div>阿童木</div>
 98       <span>×</span></div>
 99     <img src="images/atongmu.jpg" /> </div>
100 </div>
101 <script language="javascript" type="text/javascript">
102 $(document).ready(function(){
103     $("#message_box1").draggable({revert: true});
104     $("#message_box2").draggable({revert: true,opacity: 0.7, helper: "clone"});
105     $("#message_box3").draggable({revert: true,revertDuration:1000});
106     $("input:text").keyup(function(){
107        var duration = 1000;
108        if ($("input:text").val() != "") {
109             duration = $("input:text").val();
110         }
111         $("#message_box3").draggable({revert: true,revertDuration:duration});
112 
113     });
114 });
115 </script>
116 </body>
117 </html>
复制代码

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
jquery需要的所有js文件 /*! * jQuery UI 1.8.18 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI */(function(a,b){function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,&quot;visibility&quot;)===&quot;hidden&quot;||a.expr.filters.hidden(this)}).length}function c(b,c){var e=b.nodeName.toLowerCase();if(&quot;area&quot;===e){var f=b.parentNode,g=f.name,h;if(!b.href||!g||f.nodeName.toLowerCase()!==&quot;map&quot;)return!1;h=a(&quot;img[usemap=#&quot;+g+&quot;]&quot;)[0];return!!h&amp;&amp;d(h)}return(/input|select|textarea|button|object/.test(e)?!b.disabled:&quot;a&quot;==e?b.href||c:c)&amp;&amp;d(b)}a.ui=a.ui||{};a.ui.version||(a.extend(a.ui,{version:&quot;1.8.18&quot;,keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b==&quot;number&quot;?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&amp;&amp;c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;a.browser.msie&amp;&amp;/(static|relative)/.test(this.css(&quot;position&quot;))||/absolute/.test(this.css(&quot;position&quot;))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,&quot;position&quot;,1))&amp;&amp;/(auto|scroll)/.test(a.curCSS(this,&quot;overflow&quot;,1)+a.curCSS(this,&quot;overflow-y&quot;,1)+a.curCSS(this,&quot;overflow-x&quot;,1))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,&quot;overflow&quot;,1)+a.curCSS(this,&quot;overflow-y&quot;,1)+a.curCSS(this,&quot;overflow-x&quot;,1))}).eq(0);return/fixed/.test(this.css(&quot;position&quot;))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css(&quot;zIndex&quot;,c);if(this.length){var d=a(this[0]),e,f;while(d.length&amp;&amp;d[0]!==document){e=d.css(&quot;position&quot;);if(e===&quot;absolute&quot;||e===&quot;relative&quot;||e===&quot;fixed&quot;){f=parseInt(d.css(&quot;zIndex&quot;),10);if(!isNaN(f)&amp;&amp;f!==0)return f}d=d.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?&quot;selectstart&quot;:&quot;mousedown&quot;)+&quot;.ui-disableSelection&quot;,function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(&quot;.ui-disableSelection&quot;)}}),a.each([&quot;Width&quot;,&quot;Height&quot;],function(c,d){function h(b,c,d,f){a.each(e,function(){c-=parseFloat(a.curCSS(b,&quot;padding&quot;+this,!0))||0,d&amp;&amp;(c-=parseFloat(a.curCSS(b,&quot;border&quot;+this+&quot;Width&quot;,!0))||0),f&amp;&amp;(c-=parseFloat(a.curCSS(b,&quot;margin&quot;+this,!0))||0)});return c}var e=d===&quot;Width&quot;?[&quot;Left&quot;,&quot;Right&quot;]:[&quot;Top&quot;,&quot;Bottom&quot;],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn[&quot;inner&quot;+d]=function(c){if(c===b)return g[&quot;inner&quot;+d].call(this);return this.each(function(){a(this).css(f,h(this,c)+&quot;px&quot;)})},a.fn[&quot;outer&quot;+d]=function(b,c){if(typeof b!=&quot;number&quot;)return g[&quot;outer&quot;+d].call(this,b);return this.each(function(){a(this).css(f,h(this,b,!0,c)+&quot;px&quot;)})}}),a.extend(a.expr[&quot;:&quot;],{data:function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,&quot;tabindex&quot;)))},tabbable:function(b){var d=a.attr(b,&quot;tabindex&quot;),e=isNaN(d);return(e||d&gt;=0)&amp;&amp;c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement(&quot;div&quot;));c.offsetHeight,a.extend(c.style,{minHeight:&quot;100px&quot;,height:&quot;auto&quot;,padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart=&quot;onselectstart&quot;in c,b.removeChild(c).style.display=&quot;none&quot;}),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(!!d&amp;&amp;!!a.element[0].parentNode)for(var e=0;e&lt;d.length;e++)a.options[d[e][0]]&amp;&amp;d[e][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&amp;16:a!==b&amp;&amp;a.contains(b)},hasScroll:function(b,c){if(a(b).css(&quot;overflow&quot;)===&quot;hidden&quot;)return!1;var d=c&amp;&amp;c===&quot;left&quot;?&quot;scrollLeft&quot;:&quot;scrollTop&quot;,e=!1;if(b[d]&gt;0)return!0;b[d]=1,e=b[d]&gt;0,b[d]=0;return e},isOverAxis:function(a,b,c){return a&gt;b&amp;&amp;a&lt;b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&amp;&amp;a.ui.isOverAxis(c,e,g)}}))})(jQuery);/*! * jQuery UI Widget 1.8.18 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Widget */(function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++)try{a(e).triggerHandler(&quot;remove&quot;)}catch(f){}c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){c||(!b||a.filter(b,[this]).length)&amp;&amp;a(&quot;*&quot;,this).add([this]).each(function(){try{a(this).triggerHandler(&quot;remove&quot;)}catch(b){}});return d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(&quot;.&quot;)[0],f;b=b.split(&quot;.&quot;)[1],f=e+&quot;-&quot;+b,d||(d=c,c=a.Widget),a.expr[&quot;:&quot;][f]=function(c){return!!a.data(c,b)},a[e]=a[e]||{},a[e][b]=function(a,b){arguments.length&amp;&amp;this._createWidget(a,b)};var g=new c;g.options=a.extend(!0,{},g.options),a[e][b].prototype=a.extend(!0,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d),a.widget.bridge(b,a[e][b])},a.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e==&quot;string&quot;,g=Array.prototype.slice.call(arguments,1),h=this;e=!f&amp;&amp;g.length?a.extend.apply(null,[!0,e].concat(g)):e;if(f&amp;&amp;e.charAt(0)===&quot;_&quot;)return h;f?this.each(function(){var d=a.data(this,c),f=d&amp;&amp;a.isFunction(d[e])?d[e].apply(d,g):d;if(f!==d&amp;&amp;f!==b){h=f;return!1}}):this.each(function(){var b=a.data(this,c);b?b.option(e||{})._init():a.data(this,c,new d(e,this))});return h}},a.Widget=function(a,b){arguments.length&amp;&amp;this._createWidget(a,b)},a.Widget.prototype={widgetName:&quot;widget&quot;,widgetEventPrefix:&quot;&quot;,options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this),this.element=a(c),this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind(&quot;remove.&quot;+this.widgetName,function(){d.destroy()}),this._create(),this._trigger(&quot;create&quot;),this._init()},_getCreateOptions:function(){return a.metadata&amp;&amp;a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind(&quot;.&quot;+this.widgetName).removeData(this.widgetName),this.widget().unbind(&quot;.&quot;+this.widgetName).removeAttr(&quot;aria-disabled&quot;).removeClass(this.widgetBaseClass+&quot;-disabled &quot;+&quot;ui-state-disabled&quot;)},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c==&quot;string&quot;){if(d===b)return this.options[c];e={},e[c]=d}this._setOptions(e);return this},_setOptions:function(b){var c=this;a.each(b,function(a,b){c._setOption(a,b)});return this},_setOption:function(a,b){this.options[a]=b,a===&quot;disabled&quot;&amp;&amp;this.widget()[b?&quot;addClass&quot;:&quot;removeClass&quot;](this.widgetBaseClass+&quot;-disabled&quot;+&quot; &quot;+&quot;ui-state-disabled&quot;).attr(&quot;aria-disabled&quot;,b);return this},enable:function(){return this._setOption(&quot;disabled&quot;,!1)},disable:function(){return this._setOption(&quot;disabled&quot;,!0)},_trigger:function(b,c,d){var e,f,g=this.options[b];d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent;if(f)for(e in f)e in c||(c[e]=f[e]);this.element.trigger(c,d);return!(a.isFunction(g)&amp;&amp;g.call(this.element[0],c,d)===!1||c.isDefaultPrevented())}}})(jQuery);/*! * jQuery UI Mouse 1.8.18 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Mouse * * Depends: * jquery.ui.widget.js */(function(a,b){var c=!1;a(document).mouseup(function(a){c=!1}),a.widget(&quot;ui.mouse&quot;,{options:{cancel:&quot;:input,option&quot;,distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind(&quot;mousedown.&quot;+this.widgetName,function(a){return b._mouseDown(a)}).bind(&quot;click.&quot;+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+&quot;.preventClickEvent&quot;)){a.removeData(c.target,b.widgetName+&quot;.preventClickEvent&quot;),c.stopImmediatePropagation();return!1}}),this.started=!1},_mouseDestroy:function(){this.element.unbind(&quot;.&quot;+this.widgetName)},_mouseDown:function(b){if(!c){this._mouseStarted&amp;&amp;this._mouseUp(b),this._mouseDownEvent=b;var d=this,e=b.which==1,f=typeof this.options.cancel==&quot;string&quot;&amp;&amp;b.target.nodeName?a(b.target).closest(this.options.cancel).length:!1;if(!e||f||!this._mouseCapture(b))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(b)&amp;&amp;this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==!1;if(!this._mouseStarted){b.preventDefault();return!0}}!0===a.data(b.target,this.widgetName+&quot;.preventClickEvent&quot;)&amp;&amp;a.removeData(b.target,this.widgetName+&quot;.preventClickEvent&quot;),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},a(document).bind(&quot;mousemove.&quot;+this.widgetName,this._mouseMoveDelegate).bind(&quot;mouseup.&quot;+this.widgetName,this._mouseUpDelegate),b.preventDefault(),c=!0;return!0}},_mouseMove:function(b){if(a.browser.msie&amp;&amp;!(document.documentMode&gt;=9)&amp;&amp;!b.button)return this._mouseUp(b);if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}this._mouseDistanceMet(b)&amp;&amp;this._mouseDelayMet(b)&amp;&amp;(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b));return!this._mouseStarted},_mouseUp:function(b){a(document).unbind(&quot;mousemove.&quot;+this.widgetName,this._mouseMoveDelegate).unbind(&quot;mouseup.&quot;+this.widgetName,this._mouseUpDelegate),this._mouseStarted&amp;&amp;(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&amp;&amp;a.data(b.target,this.widgetName+&quot;.preventClickEvent&quot;,!0),this._mouseStop(b));return!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))&gt;=this.options.distance},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return!0}})})(jQuery);/* * jQuery UI Position 1.8.18 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Position */(function(a,b){a.ui=a.ui||{};var c=/left|center|right/,d=/top|center|bottom/,e=&quot;center&quot;,f={},g=a.fn.position,h=a.fn.offset;a.fn.position=function(b){if(!b||!b.of)return g.apply(this,arguments);b=a.extend({},b);var h=a(b.of),i=h[0],j=(b.collision||&quot;flip&quot;).split(&quot; &quot;),k=b.offset?b.offset.split(&quot; &quot;):[0,0],l,m,n;i.nodeType===9?(l=h.width(),m=h.height(),n={top:0,left:0}):i.setTimeout?(l=h.width(),m=h.height(),n={top:h.scrollTop(),left:h.scrollLeft()}):i.preventDefault?(b.at=&quot;left top&quot;,l=m=0,n={top:b.of.pageY,left:b.of.pageX}):(l=h.outerWidth(),m=h.outerHeight(),n=h.offset()),a.each([&quot;my&quot;,&quot;at&quot;],function(){var a=(b[this]||&quot;&quot;).split(&quot; &quot;);a.length===1&amp;&amp;(a=c.test(a[0])?a.concat([e]):d.test(a[0])?[e].concat(a):[e,e]),a[0]=c.test(a[0])?a[0]:e,a[1]=d.test(a[1])?a[1]:e,b[this]=a}),j.length===1&amp;&amp;(j[1]=j[0]),k[0]=parseInt(k[0],10)||0,k.length===1&amp;&amp;(k[1]=k[0]),k[1]=parseInt(k[1],10)||0,b.at[0]===&quot;right&quot;?n.left+=l:b.at[0]===e&amp;&amp;(n.left+=l/2),b.at[1]===&quot;bottom&quot;?n.top+=m:b.at[1]===e&amp;&amp;(n.top+=m/2),n.left+=k[0],n.top+=k[1];return this.each(function(){var c=a(this),d=c.outerWidth(),g=c.outerHeight(),h=parseInt(a.curCSS(this,&quot;marginLeft&quot;,!0))||0,i=parseInt(a.curCSS(this,&quot;marginTop&quot;,!0))||0,o=d+h+(parseInt(a.curCSS(this,&quot;marginRight&quot;,!0))||0),p=g+i+(parseInt(a.curCSS(this,&quot;marginBottom&quot;,!0))||0),q=a.extend({},n),r;b.my[0]===&quot;right&quot;?q.left-=d:b.my[0]===e&amp;&amp;(q.left-=d/2),b.my[1]===&quot;bottom&quot;?q.top-=g:b.my[1]===e&amp;&amp;(q.top-=g/2),f.fractions||(q.left=Math.round(q.left),q.top=Math.round(q.top)),r={left:q.left-h,top:q.top-i},a.each([&quot;left&quot;,&quot;top&quot;],function(c,e){a.ui.position[j[c]]&amp;&amp;a.ui.position[j[c]][e](q,{targetWidth:l,targetHeight:m,elemWidth:d,elemHeight:g,collisionPosition:r,collisionWidth:o,collisionHeight:p,offset:k,my:b.my,at:b.at})}),a.fn.bgiframe&amp;&amp;c.bgiframe(),c.offset(a.extend(q,{using:b.using}))})},a.ui.position={fit:{left:function(b,c){var d=a(window),e=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft();b.left=e&gt;0?b.left-e:Math.max(b.left-c.collisionPosition.left,b.left)},top:function(b,c){var d=a(window),e=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();b.top=e&gt;0?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]!==e){var d=a(window),f=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),g=c.my[0]===&quot;left&quot;?-c.elemWidth:c.my[0]===&quot;right&quot;?c.elemWidth:0,h=c.at[0]===&quot;left&quot;?c.targetWidth:-c.targetWidth,i=-2*c.offset[0];b.left+=c.collisionPosition.left&lt;0?g+h+i:f&gt;0?g+h+i:0}},top:function(b,c){if(c.at[1]!==e){var d=a(window),f=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),g=c.my[1]===&quot;top&quot;?-c.elemHeight:c.my[1]===&quot;bottom&quot;?c.elemHeight:0,h=c.at[1]===&quot;top&quot;?c.targetHeight:-c.targetHeight,i=-2*c.offset[1];b.top+=c.collisionPosition.top&lt;0?g+h+i:f&gt;0?g+h+i:0}}}},a.offset.setOffset||(a.offset.setOffset=function(b,c){/static/.test(a.curCSS(b,&quot;position&quot;))&amp;&amp;(b.style.position=&quot;relative&quot;);var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,&quot;top&quot;,!0),10)||0,g=parseInt(a.curCSS(b,&quot;left&quot;,!0),10)||0,h={top:c.top-e.top+f,left:c.left-e.left+g};&quot;using&quot;in c?c.using.call(b,h):d.css(h)},a.fn.offset=function(b){var c=this[0];if(!c||!c.ownerDocument)return null;if(b)return this.each(function(){a.offset.setOffset(this,b)});return h.call(this)}),function(){var b=document.getElementsByTagName(&quot;body&quot;)[0],c=document.createElement(&quot;div&quot;),d,e,g,h,i;d=document.createElement(b?&quot;div&quot;:&quot;body&quot;),g={visibility:&quot;hidden&quot;,width:0,height:0,border:0,margin:0,background:&quot;none&quot;},b&amp;&amp;a.extend(g,{position:&quot;absolute&quot;,left:&quot;-1000px&quot;,top:&quot;-1000px&quot;});for(var j in g)d.style[j]=g[j];d.appendChild(c),e=b||document.documentElement,e.insertBefore(d,e.firstChild),c.style.cssText=&quot;position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;&quot;,h=a(c).offset(function(a,b){return b}).offset(),d.innerHTML=&quot;&quot;,e.removeChild(d),i=h.top+h.left+(b?2e3:0),f.fractions=i&gt;21&amp;&amp;i&lt;22}()})(jQuery);/* * jQuery UI Draggable 1.8.18 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Draggables * * Depends: * jquery.ui.core.js * jquery.ui.mouse.js * jquery.ui.widget.js */(function(a,b){a.widget(&quot;ui.draggable&quot;,a.ui.mouse,{widgetEventPrefix:&quot;drag&quot;,options:{addClasses:!0,appendTo:&quot;parent&quot;,axis:!1,connectToSortable:!1,containment:!1,cursor:&quot;auto&quot;,cursorAt:!1,grid:!1,handle:!1,helper:&quot;original&quot;,iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:&quot;default&quot;,scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:&quot;both&quot;,snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper==&quot;original&quot;&amp;&amp;!/^(?:r|a|f)/.test(this.element.css(&quot;position&quot;))&amp;&amp;(this.element[0].style.position=&quot;relative&quot;),this.options.addClasses&amp;&amp;this.element.addClass(&quot;ui-draggable&quot;),this.options.disabled&amp;&amp;this.element.addClass(&quot;ui-draggable-disabled&quot;),this._mouseInit()},destroy:function(){if(!!this.element.data(&quot;draggable&quot;)){this.element.removeData(&quot;draggable&quot;).unbind(&quot;.draggable&quot;).removeClass(&quot;ui-draggable ui-draggable-dragging ui-draggable-disabled&quot;),this._mouseDestroy();return this}},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(&quot;.ui-resizable-handle&quot;))return!1;this.handle=this._getHandle(b);if(!this.handle)return!1;c.iframeFix&amp;&amp;a(c.iframeFix===!0?&quot;iframe&quot;:c.iframeFix).each(function(){a(&#39;&lt;div class=&quot;ui-draggable-iframeFix&quot; style=&quot;background: #fff;&quot;&gt;&lt;/div&gt;&#39;).css({width:this.offsetWidth+&quot;px&quot;,height:this.offsetHeight+&quot;px&quot;,position:&quot;absolute&quot;,opacity:&quot;0.001&quot;,zIndex:1e3}).css(a(this).offset()).appendTo(&quot;body&quot;)});return!0},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b),this._cacheHelperProportions(),a.ui.ddmanager&amp;&amp;(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css(&quot;position&quot;),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&amp;&amp;this._adjustOffsetFromHelper(c.cursorAt),c.containment&amp;&amp;this._setContainment();if(this._trigger(&quot;start&quot;,b)===!1){this._clear();return!1}this._cacheHelperProportions(),a.ui.ddmanager&amp;&amp;!c.dropBehaviour&amp;&amp;a.ui.ddmanager.prepareOffsets(this,b),this.helper.addClass(&quot;ui-draggable-dragging&quot;),this._mouseDrag(b,!0),a.ui.ddmanager&amp;&amp;a.ui.ddmanager.dragStart(this,b);return!0},_mouseDrag:function(b,c){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!c){var d=this._uiHash();if(this._trigger(&quot;drag&quot;,b,d)===!1){this._mouseUp({});return!1}this.position=d.position}if(!this.options.axis||this.options.axis!=&quot;y&quot;)this.helper[0].style.left=this.position.left+&quot;px&quot;;if(!this.options.axis||this.options.axis!=&quot;x&quot;)this.helper[0].style.top=this.position.top+&quot;px&quot;;a.ui.ddmanager&amp;&amp;a.ui.ddmanager.drag(this,b);return!1},_mouseStop:function(b){var c=!1;a.ui.ddmanager&amp;&amp;!this.options.dropBehaviour&amp;&amp;(c=a.ui.ddmanager.drop(this,b)),this.dropped&amp;&amp;(c=this.dropped,this.dropped=!1);if((!this.element[0]||!this.element[0].parentNode)&amp;&amp;this.options.helper==&quot;original&quot;)return!1;if(this.options.revert==&quot;invalid&quot;&amp;&amp;!c||this.options.revert==&quot;valid&quot;&amp;&amp;c||this.options.revert===!0||a.isFunction(this.options.revert)&amp;&amp;this.options.revert.call(this.element,c)){var d=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){d._trigger(&quot;stop&quot;,b)!==!1&amp;&amp;d._clear()})}else this._trigger(&quot;stop&quot;,b)!==!1&amp;&amp;this._clear();return!1},_mouseUp:function(b){this.options.iframeFix===!0&amp;&amp;a(&quot;div.ui-draggable-iframeFix&quot;).each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&amp;&amp;a.ui.ddmanager.dragStop(this,b);return a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){this.helper.is(&quot;.ui-draggable-dragging&quot;)?this._mouseUp({}):this._clear();return this},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?!0:!1;a(this.options.handle,this.element).find(&quot;*&quot;).andSelf().each(function(){this==b.target&amp;&amp;(c=!0)});return c},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c.helper==&quot;clone&quot;?this.element.clone().removeAttr(&quot;id&quot;):this.element;d.parents(&quot;body&quot;).length||d.appendTo(c.appendTo==&quot;parent&quot;?this.element[0].parentNode:c.appendTo),d[0]!=this.element[0]&amp;&amp;!/(fixed|absolute)/.test(d.css(&quot;position&quot;))&amp;&amp;d.css(&quot;position&quot;,&quot;absolute&quot;);return d},_adjustOffsetFromHelper:function(b){typeof b==&quot;string&quot;&amp;&amp;(b=b.split(&quot; &quot;)),a.isArray(b)&amp;&amp;(b={left:+b[0],top:+b[1]||0}),&quot;left&quot;in b&amp;&amp;(this.offset.click.left=b.left+this.margins.left),&quot;right&quot;in b&amp;&amp;(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),&quot;top&quot;in b&amp;&amp;(this.offset.click.top=b.top+this.margins.top),&quot;bottom&quot;in b&amp;&amp;(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition==&quot;absolute&quot;&amp;&amp;this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0])&amp;&amp;(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()==&quot;html&quot;&amp;&amp;a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css(&quot;borderTopWidth&quot;),10)||0),left:b.left+(parseInt(this.offsetParent.css(&quot;borderLeftWidth&quot;),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==&quot;relative&quot;){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css(&quot;top&quot;),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css(&quot;left&quot;),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css(&quot;marginLeft&quot;),10)||0,top:parseInt(this.element.css(&quot;marginTop&quot;),10)||0,right:parseInt(this.element.css(&quot;marginRight&quot;),10)||0,bottom:parseInt(this.element.css(&quot;marginBottom&quot;),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment==&quot;parent&quot;&amp;&amp;(b.containment=this.helper[0].parentNode);if(b.containment==&quot;document&quot;||b.containment==&quot;window&quot;)this.containment=[b.containment==&quot;document&quot;?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,b.containment==&quot;document&quot;?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(b.containment==&quot;document&quot;?0:a(window).scrollLeft())+a(b.containment==&quot;document&quot;?document:window).width()-this.helperProportions.width-this.margins.left,(b.containment==&quot;document&quot;?0:a(window).scrollTop())+(a(b.containment==&quot;document&quot;?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)&amp;&amp;b.containment.constructor!=Array){var c=a(b.containment),d=c[0];if(!d)return;var e=c.offset(),f=a(d).css(&quot;overflow&quot;)!=&quot;hidden&quot;;this.containment=[(parseInt(a(d).css(&quot;borderLeftWidth&quot;),10)||0)+(parseInt(a(d).css(&quot;paddingLeft&quot;),10)||0),(parseInt(a(d).css(&quot;borderTopWidth&quot;),10)||0)+(parseInt(a(d).css(&quot;paddingTop&quot;),10)||0),(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css(&quot;borderLeftWidth&quot;),10)||0)-(parseInt(a(d).css(&quot;paddingRight&quot;),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css(&quot;borderTopWidth&quot;),10)||0)-(parseInt(a(d).css(&quot;paddingBottom&quot;),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=c}else b.containment.constructor==Array&amp;&amp;(this.containment=b.containment)},_convertPositionTo:function(b,c){c||(c=this.position);var d=b==&quot;absolute&quot;?1:-1,e=this.options,f=this.cssPosition==&quot;absolute&quot;&amp;&amp;(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&amp;&amp;a.browser.version&lt;526&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&amp;&amp;a.browser.version&lt;526&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition==&quot;absolute&quot;&amp;&amp;(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName),f=b.pageX,g=b.pageY;if(this.originalPosition){var h;if(this.containment){if(this.relative_container){var i=this.relative_container.offset();h=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]}else h=this.containment;b.pageX-this.offset.click.left&lt;h[0]&amp;&amp;(f=h[0]+this.offset.click.left),b.pageY-this.offset.click.top&lt;h[1]&amp;&amp;(g=h[1]+this.offset.click.top),b.pageX-this.offset.click.left&gt;h[2]&amp;&amp;(f=h[2]+this.offset.click.left),b.pageY-this.offset.click.top&gt;h[3]&amp;&amp;(g=h[3]+this.offset.click.top)}if(c.grid){var j=c.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1]:this.originalPageY;g=h?j-this.offset.click.top&lt;h[1]||j-this.offset.click.top&gt;h[3]?j-this.offset.click.top&lt;h[1]?j+c.grid[1]:j-c.grid[1]:j:j;var k=c.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0]:this.originalPageX;f=h?k-this.offset.click.left&lt;h[0]||k-this.offset.click.left&gt;h[2]?k-this.offset.click.left&lt;h[0]?k+c.grid[0]:k-c.grid[0]:k:k}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&amp;&amp;a.browser.version&lt;526&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&amp;&amp;a.browser.version&lt;526&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_clear:function(){this.helper.removeClass(&quot;ui-draggable-dragging&quot;),this.helper[0]!=this.element[0]&amp;&amp;!this.cancelHelperRemoval&amp;&amp;this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(b,c,d){d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d]),b==&quot;drag&quot;&amp;&amp;(this.positionAbs=this._convertPositionTo(&quot;absolute&quot;));return a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(a){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.extend(a.ui.draggable,{version:&quot;1.8.18&quot;}),a.ui.plugin.add(&quot;draggable&quot;,&quot;connectToSortable&quot;,{start:function(b,c){var d=a(this).data(&quot;draggable&quot;),e=d.options,f=a.extend({},c,{item:d.element});d.sortables=[],a(e.connectToSortable).each(function(){var c=a.data(this,&quot;sortable&quot;);c&amp;&amp;!c.options.disabled&amp;&amp;(d.sortables.push({instance:c,shouldRevert:c.options.revert}),c.refreshPositions(),c._trigger(&quot;activate&quot;,b,f))})},stop:function(b,c){var d=a(this).data(&quot;draggable&quot;),e=a.extend({},c,{item:d.element});a.each(d.sortables,function(){this.instance.isOver?(this.instance.isOver=0,d.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&amp;&amp;(this.instance.options.revert=!0),this.instance._mouseStop(b),this.instance.options.helper=this.instance.options._helper,d.options.helper==&quot;original&quot;&amp;&amp;this.instance.currentItem.css({top:&quot;auto&quot;,left:&quot;auto&quot;})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger(&quot;deactivate&quot;,b,e))})},drag:function(b,c){var d=a(this).data(&quot;draggable&quot;),e=this,f=function(b){var c=this.offset.click.top,d=this.offset.click.left,e=this.positionAbs.top,f=this.positionAbs.left,g=b.height,h=b.width,i=b.top,j=b.left;return a.ui.isOver(e+c,f+d,i,j,g,h)};a.each(d.sortables,function(f){this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this.instance._intersectsWith(this.instance.containerCache)?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(e).clone().removeAttr(&quot;id&quot;).appendTo(this.instance.element).data(&quot;sortable-item&quot;,!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return c.helper[0]},b.target=this.instance.currentItem[0],this.instance._mouseCapture(b,!0),this.instance._mouseStart(b,!0,!0),this.instance.offset.click.top=d.offset.click.top,this.instance.offset.click.left=d.offset.click.left,this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top,d._trigger(&quot;toSortable&quot;,b),d.dropped=this.instance.element,d.currentItem=d.element,this.instance.fromOutside=d),this.instance.currentItem&amp;&amp;this.instance._mouseDrag(b)):this.instance.isOver&amp;&amp;(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger(&quot;out&quot;,b,this.instance._uiHash(this.instance)),this.instance._mouseStop(b,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&amp;&amp;this.instance.placeholder.remove(),d._trigger(&quot;fromSortable&quot;,b),d.dropped=!1)})}}),a.ui.plugin.add(&quot;draggable&quot;,&quot;cursor&quot;,{start:function(b,c){var d=a(&quot;body&quot;),e=a(this).data(&quot;draggable&quot;).options;d.css(&quot;cursor&quot;)&amp;&amp;(e._cursor=d.css(&quot;cursor&quot;)),d.css(&quot;cursor&quot;,e.cursor)},stop:function(b,c){var d=a(this).data(&quot;draggable&quot;).options;d._cursor&amp;&amp;a(&quot;body&quot;).css(&quot;cursor&quot;,d._cursor)}}),a.ui.plugin.add(&quot;draggable&quot;,&quot;opacity&quot;,{start:function(b,c){var d=a(c.helper),e=a(this).data(&quot;draggable&quot;).options;d.css(&quot;opacity&quot;)&amp;&amp;(e._opacity=d.css(&quot;opacity&quot;)),d.css(&quot;opacity&quot;,e.opacity)},stop:function(b,c){var d=a(this).data(&quot;draggable&quot;).options;d._opacity&amp;&amp;a(c.helper).css(&quot;opacity&quot;,d._opacity)}}),a.ui.plugin.add(&quot;draggable&quot;,&quot;scroll&quot;,{start:function(b,c){var d=a(this).data(&quot;draggable&quot;);d.scrollParent[0]!=document&amp;&amp;d.scrollParent[0].tagName!=&quot;HTML&quot;&amp;&amp;(d.overflowOffset=d.scrollParent.offset())},drag:function(b,c){var d=a(this).data(&quot;draggable&quot;),e=d.options,f=!1;if(d.scrollParent[0]!=document&amp;&amp;d.scrollParent[0].tagName!=&quot;HTML&quot;){if(!e.axis||e.axis!=&quot;x&quot;)d.overflowOffset.top+d.scrollParent[0].offsetHeight-b.pageY&lt;e.scrollSensitivity?d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop+e.scrollSpeed:b.pageY-d.overflowOffset.top&lt;e.scrollSensitivity&amp;&amp;(d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop-e.scrollSpeed);if(!e.axis||e.axis!=&quot;y&quot;)d.overflowOffset.left+d.scrollParent[0].offsetWidth-b.pageX&lt;e.scrollSensitivity?d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft+e.scrollSpeed:b.pageX-d.overflowOffset.left&lt;e.scrollSensitivity&amp;&amp;(d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft-e.scrollSpeed)}else{if(!e.axis||e.axis!=&quot;x&quot;)b.pageY-a(document).scrollTop()&lt;e.scrollSensitivity?f=a(document).scrollTop(a(document).scrollTop()-e.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())&lt;e.scrollSensitivity&amp;&amp;(f=a(document).scrollTop(a(document).scrollTop()+e.scrollSpeed));if(!e.axis||e.axis!=&quot;y&quot;)b.pageX-a(document).scrollLeft()&lt;e.scrollSensitivity?f=a(document).scrollLeft(a(document).scrollLeft()-e.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())&lt;e.scrollSensitivity&amp;&amp;(f=a(document).scrollLeft(a(document).scrollLeft()+e.scrollSpeed))}f!==!1&amp;&amp;a.ui.ddmanager&amp;&amp;!e.dropBehaviour&amp;&amp;a.ui.ddmanager.prepareOffsets(d,b)}}),a.ui.plugin.add(&quot;draggable&quot;,&quot;snap&quot;,{start:function(b,c){var d=a(this).data(&quot;draggable&quot;),e=d.options;d.snapElements=[],a(e.snap.constructor!=String?e.snap.items||&quot;:data(draggable)&quot;:e.snap).each(function(){var b=a(this),c=b.offset();this!=d.element[0]&amp;&amp;d.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left:c.left})})},drag:function(b,c){var d=a(this).data(&quot;draggable&quot;),e=d.options,f=e.snapTolerance,g=c.offset.left,h=g+d.helperProportions.width,i=c.offset.top,j=i+d.helperProportions.height;for(var k=d.snapElements.length-1;k&gt;=0;k--){var l=d.snapElements[k].left,m=l+d.snapElements[k].width,n=d.snapElements[k].top,o=n+d.snapElements[k].height;if(!(l-f&lt;g&amp;&amp;g&lt;m+f&amp;&amp;n-f&lt;i&amp;&amp;i&lt;o+f||l-f&lt;g&amp;&amp;g&lt;m+f&amp;&amp;n-f&lt;j&amp;&amp;j&lt;o+f||l-f&lt;h&amp;&amp;h&lt;m+f&amp;&amp;n-f&lt;i&amp;&amp;i&lt;o+f||l-f&lt;h&amp;&amp;h&lt;m+f&amp;&amp;n-f&lt;j&amp;&amp;j&lt;o+f)){d.snapElements[k].snapping&amp;&amp;d.options.snap.release&amp;&amp;d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=!1;continue}if(e.snapMode!=&quot;inner&quot;){var p=Math.abs(n-j)&lt;=f,q=Math.abs(o-i)&lt;=f,r=Math.abs(l-h)&lt;=f,s=Math.abs(m-g)&lt;=f;p&amp;&amp;(c.position.top=d._convertPositionTo(&quot;relative&quot;,{top:n-d.helperProportions.height,left:0}).top-d.margins.top),q&amp;&amp;(c.position.top=d._convertPositionTo(&quot;relative&quot;,{top:o,left:0}).top-d.margins.top),r&amp;&amp;(c.position.left=d._convertPositionTo(&quot;relative&quot;,{top:0,left:l-d.helperProportions.width}).left-d.margins.left),s&amp;&amp;(c.position.left=d._convertPositionTo(&quot;relative&quot;,{top:0,left:m}).left-d.margins.left)}var t=p||q||r||s;if(e.snapMode!=&quot;outer&quot;){var p=Math.abs(n-i)&lt;=f,q=Math.abs(o-j)&lt;=f,r=Math.abs(l-g)&lt;=f,s=Math.abs(m-h)&lt;=f;p&amp;&amp;(c.position.top=d._convertPositionTo(&quot;relative&quot;,{top:n,left:0}).top-d.margins.top),q&amp;&amp;(c.position.top=d._convertPositionTo(&quot;relative&quot;,{top:o-d.helperProportions.height,left:0}).top-d.margins.top),r&amp;&amp;(c.position.left=d._convertPositionTo(&quot;relative&quot;,{top:0,left:l}).left-d.margins.left),s&amp;&amp;(c.position.left=d._convertPositionTo(&quot;relative&quot;,{top:0,left:m-d.helperProportions.width}).left-d.margins.left)}!d.snapElements[k].snapping&amp;&amp;(p||q||r||s||t)&amp;&amp;d.options.snap.snap&amp;&amp;d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=p||q||r||s||t}}}),a.ui.plugin.add(&quot;draggable&quot;,&quot;stack&quot;,{start:function(b,c){var d=a(this).data(&quot;draggable&quot;).options,e=a.makeArray(a(d.stack)).sort(function(b,c){return(parseInt(a(b).css(&quot;zIndex&quot;),10)||0)-(parseInt(a(c).css(&quot;zIndex&quot;),10)||0)});if(!!e.length){var f=parseInt(e[0].style.zIndex)||0;a(e).each(function(a){this.style.zIndex=f+a}),this[0].style.zIndex=f+e.length}}}),a.ui.plugin.add(&quot;draggable&quot;,&quot;zIndex&quot;,{start:function(b,c){var d=a(c.helper),e=a(this).data(&quot;draggable&quot;).options;d.css(&quot;zIndex&quot;)&amp;&amp;(e._zIndex=d.css(&quot;zIndex&quot;)),d.css(&quot;zIndex&quot;,e.zIndex)},stop:function(b,c){var d=a(this).data(&quot;draggable&quot;).options;d._zIndex&amp;&amp;a(c.helper).css(&quot;zIndex&quot;,d._zIndex)}})})(jQuery);/* * jQuery UI Droppable 1.8.18 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Droppables * * Depends: * jquery.ui.core.js * jquery.ui.widget.js * jquery.ui.mouse.js * jquery.ui.draggable.js */(function(a,b){a.widget(&quot;ui.droppable&quot;,{widgetEventPrefix:&quot;drop&quot;,options:{accept:&quot;*&quot;,activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:&quot;default&quot;,tolerance:&quot;intersect&quot;},_create:function(){var b=this.options,c=b.accept;this.isover=0,this.isout=1,this.accept=a.isFunction(c)?c:function(a){return a.is(c)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},a.ui.ddmanager.droppables[b.scope]=a.ui.ddmanager.droppables[b.scope]||[],a.ui.ddmanager.droppables[b.scope].push(this),b.addClasses&amp;&amp;this.element.addClass(&quot;ui-droppable&quot;)},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c&lt;b.length;c++)b[c]==this&amp;&amp;b.splice(c,1);this.element.removeClass(&quot;ui-droppable ui-droppable-disabled&quot;).removeData(&quot;droppable&quot;).unbind(&quot;.droppable&quot;);return this},_setOption:function(b,c){b==&quot;accept&quot;&amp;&amp;(this.accept=a.isFunction(c)?c:function(a){return a.is(c)}),a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&amp;&amp;this.element.addClass(this.options.activeClass),c&amp;&amp;this._trigger(&quot;activate&quot;,b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&amp;&amp;this.element.removeClass(this.options.activeClass),c&amp;&amp;this._trigger(&quot;deactivate&quot;,b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;!!c&amp;&amp;(c.currentItem||c.element)[0]!=this.element[0]&amp;&amp;this.accept.call(this.element[0],c.currentItem||c.element)&amp;&amp;(this.options.hoverClass&amp;&amp;this.element.addClass(this.options.hoverClass),this._trigger(&quot;over&quot;,b,this.ui(c)))},_out:function(b){var c=a.ui.ddmanager.current;!!c&amp;&amp;(c.currentItem||c.element)[0]!=this.element[0]&amp;&amp;this.accept.call(this.element[0],c.currentItem||c.element)&amp;&amp;(this.options.hoverClass&amp;&amp;this.element.removeClass(this.options.hoverClass),this._trigger(&quot;out&quot;,b,this.ui(c)))},_drop:function(b,c){var d=c||a.ui.ddmanager.current;if(!d||(d.currentItem||d.element)[0]==this.element[0])return!1;var e=!1;this.element.find(&quot;:data(droppable)&quot;).not(&quot;.ui-draggable-dragging&quot;).each(function(){var b=a.data(this,&quot;droppable&quot;);if(b.options.greedy&amp;&amp;!b.options.disabled&amp;&amp;b.options.scope==d.options.scope&amp;&amp;b.accept.call(b.element[0],d.currentItem||d.element)&amp;&amp;a.ui.intersect(d,a.extend(b,{offset:b.element.offset()}),b.options.tolerance)){e=!0;return!1}});if(e)return!1;if(this.accept.call(this.element[0],d.currentItem||d.element)){this.options.activeClass&amp;&amp;this.element.removeClass(this.options.activeClass),this.options.hoverClass&amp;&amp;this.element.removeClass(this.options.hoverClass),this._trigger(&quot;drop&quot;,b,this.ui(d));return this.element}return!1},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}}),a.extend(a.ui.droppable,{version:&quot;1.8.18&quot;}),a.ui.intersect=function(b,c,d){if(!c.offset)return!1;var e=(b.positionAbs||b.position.absolute).left,f=e+b.helperProportions.width,g=(b.positionAbs||b.position.absolute).top,h=g+b.helperProportions.height,i=c.offset.left,j=i+c.proportions.width,k=c.offset.top,l=k+c.proportions.height;switch(d){case&quot;fit&quot;:return i&lt;=e&amp;&amp;f&lt;=j&amp;&amp;k&lt;=g&amp;&amp;h&lt;=l;case&quot;intersect&quot;:return i&lt;e+b.helperProportions.width/2&amp;&amp;f-b.helperProportions.width/2&lt;j&amp;&amp;k&lt;g+b.helperProportions.height/2&amp;&amp;h-b.helperProportions.height/2&lt;l;case&quot;pointer&quot;:var m=(b.positionAbs||b.position.absolute).left+(b.clickOffset||b.offset.click).left,n=(b.positionAbs||b.position.absolute).top+(b.clickOffset||b.offset.click).top,o=a.ui.isOver(n,m,k,i,c.proportions.height,c.proportions.width);return o;case&quot;touch&quot;:return(g&gt;=k&amp;&amp;g&lt;=l||h&gt;=k&amp;&amp;h&lt;=l||g&lt;k&amp;&amp;h&gt;l)&amp;&amp;(e&gt;=i&amp;&amp;e&lt;=j||f&gt;=i&amp;&amp;f&lt;=j||e&lt;i&amp;&amp;f&gt;j);default:return!1}},a.ui.ddmanager={current:null,droppables:{&quot;default&quot;:[]},prepareOffsets:function(b,c){var d=a.ui.ddmanager.droppables[b.options.scope]||[],e=c?c.type:null,f=(b.currentItem||b.element).find(&quot;:data(droppable)&quot;).andSelf();droppablesLoop:for(var g=0;g&lt;d.length;g++){if(d[g].options.disabled||b&amp;&amp;!d[g].accept.call(d[g].element[0],b.currentItem||b.element))continue;for(var h=0;h&lt;f.length;h++)if(f[h]==d[g].element[0]){d[g].proportions.height=0;continue droppablesLoop}d[g].visible=d[g].element.css(&quot;display&quot;)!=&quot;none&quot;;if(!d[g].visible)continue;e==&quot;mousedown&quot;&amp;&amp;d[g]._activate.call(d[g],c),d[g].offset=d[g].element.offset(),d[g].proportions={width:d[g].element[0].offsetWidth,height:d[g].element[0].offsetHeight}}},drop:function(b,c){var d=!1;a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){!this.options||(!this.options.disabled&amp;&amp;this.visible&amp;&amp;a.ui.intersect(b,this,this.options.tolerance)&amp;&amp;(d=this._drop.call(this,c)||d),!this.options.disabled&amp;&amp;this.visible&amp;&amp;this.accept.call(this.element[0],b.currentItem||b.element)&amp;&amp;(this.isout=1,this.isover=0,this._deactivate.call(this,c)))});return d},dragStart:function(b,c){b.element.parents(&quot;:not(body,html)&quot;).bind(&quot;scroll.droppable&quot;,function(){b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)})},drag:function(b,c){b.options.refreshPositions&amp;&amp;a.ui.ddmanager.prepareOffsets(b,c),a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var d=a.ui.intersect(b,this,this.options.tolerance),e=!d&amp;&amp;this.isover==1?&quot;isout&quot;:d&amp;&amp;this.isover==0?&quot;isover&quot;:null;if(!e)return;var f;if(this.options.greedy){var g=this.element.parents(&quot;:data(droppable):eq(0)&quot;);g.length&amp;&amp;(f=a.data(g[0],&quot;droppable&quot;),f.greedyChild=e==&quot;isover&quot;?1:0)}f&amp;&amp;e==&quot;isover&quot;&amp;&amp;(f.isover=0,f.isout=1,f._out.call(f,c)),this[e]=1,this[e==&quot;isout&quot;?&quot;isover&quot;:&quot;isout&quot;]=0,this[e==&quot;isover&quot;?&quot;_over&quot;:&quot;_out&quot;].call(this,c),f&amp;&amp;e==&quot;isout&quot;&amp;&amp;(f.isout=0,f.isover=1,f._over.call(f,c))}})},dragStop:function(b,c){b.element.parents(&quot;:not(body,html)&quot;).unbind(&quot;scroll.droppable&quot;),b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)}}})(jQuery);/* * jQuery UI Resizable 1.8.18 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Resizables * * Depends: * jquery.ui.core.js * jquery.ui.mouse.js * jquery.ui.widget.js */(function(a,b){a.widget(&quot;ui.resizable&quot;,a.ui.mouse,{widgetEventPrefix:&quot;resize&quot;,options:{alsoResize:!1,animate:!1,animateDuration:&quot;slow&quot;,animateEasing:&quot;swing&quot;,aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:&quot;e,s,se&quot;,helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var b=this,c=this.options;this.element.addClass(&quot;ui-resizable&quot;),a.extend(this,{_aspectRatio:!!c.aspectRatio,aspectRatio:c.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:c.helper||c.ghost||c.animate?c.helper||&quot;ui-resizable-helper&quot;:null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&amp;&amp;(this.element.wrap(a(&#39;&lt;div class=&quot;ui-wrapper&quot; style=&quot;overflow: hidden;&quot;&gt;&lt;/div&gt;&#39;).css({position:this.element.css(&quot;position&quot;),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css(&quot;top&quot;),left:this.element.css(&quot;left&quot;)})),this.element=this.element.parent().data(&quot;resizable&quot;,this.element.data(&quot;resizable&quot;)),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css(&quot;marginLeft&quot;),marginTop:this.originalElement.css(&quot;marginTop&quot;),marginRight:this.originalElement.css(&quot;marginRight&quot;),marginBottom:this.originalElement.css(&quot;marginBottom&quot;)}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css(&quot;resize&quot;),this.originalElement.css(&quot;resize&quot;,&quot;none&quot;),this._proportionallyResizeElements.push(this.originalElement.css({position:&quot;static&quot;,zoom:1,display:&quot;block&quot;})),this.originalElement.css({margin:this.originalElement.css(&quot;margin&quot;)}),this._proportionallyResize()),this.handles=c.handles||(a(&quot;.ui-resizable-handle&quot;,this.element).length?{n:&quot;.ui-resizable-n&quot;,e:&quot;.ui-resizable-e&quot;,s:&quot;.ui-resizable-s&quot;,w:&quot;.ui-resizable-w&quot;,se:&quot;.ui-resizable-se&quot;,sw:&quot;.ui-resizable-sw&quot;,ne:&quot;.ui-resizable-ne&quot;,nw:&quot;.ui-resizable-nw&quot;}:&quot;e,s,se&quot;);if(this.handles.constructor==String){this.handles==&quot;all&quot;&amp;&amp;(this.handles=&quot;n,e,s,w,se,sw,ne,nw&quot;);var d=this.handles.split(&quot;,&quot;);this.handles={};for(var e=0;e&lt;d.length;e++){var f=a.trim(d[e]),g=&quot;ui-resizable-&quot;+f,h=a(&#39;&lt;div class=&quot;ui-resizable-handle &#39;+g+&#39;&quot;&gt;&lt;/div&gt;&#39;);/sw|se|ne|nw/.test(f)&amp;&amp;h.css({zIndex:++c.zIndex}),&quot;se&quot;==f&amp;&amp;h.addClass(&quot;ui-icon ui-icon-gripsmall-diagonal-se&quot;),this.handles[f]=&quot;.ui-resizable-&quot;+f,this.element.append(h)}}this._renderAxis=function(b){b=b||this.element;for(var c in this.handles){this.handles[c].constructor==String&amp;&amp;(this.handles[c]=a(this.handles[c],this.element).show());if(this.elementIsWrapper&amp;&amp;this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var d=a(this.handles[c],this.element),e=0;e=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth();var f=[&quot;padding&quot;,/ne|nw|n/.test(c)?&quot;Top&quot;:/se|sw|s/.test(c)?&quot;Bottom&quot;:/^e$/.test(c)?&quot;Right&quot;:&quot;Left&quot;].join(&quot;&quot;);b.css(f,e),this._proportionallyResize()}if(!a(this.handles[c]).length)continue}},this._renderAxis(this.element),this._handles=a(&quot;.ui-resizable-handle&quot;,this.element).disableSelection(),this._handles.mouseover(function(){if(!b.resizing){if(this.className)var a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=a&amp;&amp;a[1]?a[1]:&quot;se&quot;}}),c.autoHide&amp;&amp;(this._handles.hide(),a(this.element).addClass(&quot;ui-resizable-autohide&quot;).hover(function(){c.disabled||(a(this).removeClass(&quot;ui-resizable-autohide&quot;),b._handles.show())},function(){c.disabled||b.resizing||(a(this).addClass(&quot;ui-resizable-autohide&quot;),b._handles.hide())})),this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(b){a(b).removeClass(&quot;ui-resizable ui-resizable-disabled ui-resizable-resizing&quot;).removeData(&quot;resizable&quot;).unbind(&quot;.resizable&quot;).find(&quot;.ui-resizable-handle&quot;).remove()};if(this.elementIsWrapper){b(this.element);var c=this.element;c.after(this.originalElement.css({position:c.css(&quot;position&quot;),width:c.outerWidth(),height:c.outerHeight(),top:c.css(&quot;top&quot;),left:c.css(&quot;left&quot;)})).remove()}this.originalElement.css(&quot;resize&quot;,this.originalResizeStyle),b(this.originalElement);return this},_mouseCapture:function(b){var c=!1;for(var d in this.handles)a(this.handles[d])[0]==b.target&amp;&amp;(c=!0);return!this.options.disabled&amp;&amp;c},_mouseStart:function(b){var d=this.options,e=this.element.position(),f=this.element;this.resizing=!0,this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()},(f.is(&quot;.ui-draggable&quot;)||/absolute/.test(f.css(&quot;position&quot;)))&amp;&amp;f.css({position:&quot;absolute&quot;,top:e.top,left:e.left}),this._renderProxy();var g=c(this.helper.css(&quot;left&quot;)),h=c(this.helper.css(&quot;top&quot;));d.containment&amp;&amp;(g+=a(d.containment).scrollLeft()||0,h+=a(d.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:g,top:h},this.size=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalPosition={left:g,top:h},this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio=typeof d.aspectRatio==&quot;number&quot;?d.aspectRatio:this.originalSize.width/this.originalSize.height||1;var i=a(&quot;.ui-resizable-&quot;+this.axis).css(&quot;cursor&quot;);a(&quot;body&quot;).css(&quot;cursor&quot;,i==&quot;auto&quot;?this.axis+&quot;-resize&quot;:i),f.addClass(&quot;ui-resizable-resizing&quot;),this._propagate(&quot;start&quot;,b);return!0},_mouseDrag:function(b){var c=this.helper,d=this.options,e={},f=this,g=this.originalMousePosition,h=this.axis,i=b.pageX-g.left||0,j=b.pageY-g.top||0,k=this._change[h];if(!k)return!1;var l=k.apply(this,[b,i,j]),m=a.browser.msie&amp;&amp;a.browser.version&lt;7,n=this.sizeDiff;this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)l=this._updateRatio(l,b);l=this._respectSize(l,b),this._propagate(&quot;resize&quot;,b),c.css({top:this.position.top+&quot;px&quot;,left:this.position.left+&quot;px&quot;,width:this.size.width+&quot;px&quot;,height:this.size.height+&quot;px&quot;}),!this._helper&amp;&amp;this._proportionallyResizeElements.length&amp;&amp;this._proportionallyResize(),this._updateCache(l),this._trigger(&quot;resize&quot;,b,this.ui());return!1},_mouseStop:function(b){this.resizing=!1;var c=this.options,d=this;if(this._helper){var e=this._proportionallyResizeElements,f=e.length&amp;&amp;/textarea/i.test(e[0].nodeName),g=f&amp;&amp;a.ui.hasScroll(e[0],&quot;left&quot;)?0:d.sizeDiff.height,h=f?0:d.sizeDiff.width,i={width:d.helper.width()-h,height:d.helper.height()-g},j=parseInt(d.element.css(&quot;left&quot;),10)+(d.position.left-d.originalPosition.left)||null,k=parseInt(d.element.css(&quot;top&quot;),10)+(d.position.top-d.originalPosition.top)||null;c.animate||this.element.css(a.extend(i,{top:k,left:j})),d.helper.height(d.size.height),d.helper.width(d.size.width),this._helper&amp;&amp;!c.animate&amp;&amp;this._proportionallyResize()}a(&quot;body&quot;).css(&quot;cursor&quot;,&quot;auto&quot;),this.element.removeClass(&quot;ui-resizable-resizing&quot;),this._propagate(&quot;stop&quot;,b),this._helper&amp;&amp;this.helper.remove();return!1},_updateVirtualBoundaries:function(a){var b=this.options,c,e,f,g,h;h={minWidth:d(b.minWidth)?b.minWidth:0,maxWidth:d(b.maxWidth)?b.maxWidth:Infinity,minHeight:d(b.minHeight)?b.minHeight:0,maxHeight:d(b.maxHeight)?b.maxHeight:Infinity};if(this._aspectRatio||a)c=h.minHeight*this.aspectRatio,f=h.minWidth/this.aspectRatio,e=h.maxHeight*this.aspectRatio,g=h.maxWidth/this.aspectRatio,c&gt;h.minWidth&amp;&amp;(h.minWidth=c),f&gt;h.minHeight&amp;&amp;(h.minHeight=f),e&lt;h.maxWidth&amp;&amp;(h.maxWidth=e),g&lt;h.maxHeight&amp;&amp;(h.maxHeight=g);this._vBoundaries=h},_updateCache:function(a){var b=this.options;this.offset=this.helper.offset(),d(a.left)&amp;&amp;(this.position.left=a.left),d(a.top)&amp;&amp;(this.position.top=a.top),d(a.height)&amp;&amp;(this.size.height=a.height),d(a.width)&amp;&amp;(this.size.width=a.width)},_updateRatio:function(a,b){var c=this.options,e=this.position,f=this.size,g=this.axis;d(a.height)?a.width=a.height*this.aspectRatio:d(a.width)&amp;&amp;(a.height=a.width/this.aspectRatio),g==&quot;sw&quot;&amp;&amp;(a.left=e.left+(f.width-a.width),a.top=null),g==&quot;nw&quot;&amp;&amp;(a.top=e.top+(f.height-a.height),a.left=e.left+(f.width-a.width));return a},_respectSize:function(a,b){var c=this.helper,e=this._vBoundaries,f=this._aspectRatio||b.shiftKey,g=this.axis,h=d(a.width)&amp;&amp;e.maxWidth&amp;&amp;e.maxWidth&lt;a.width,i=d(a.height)&amp;&amp;e.maxHeight&amp;&amp;e.maxHeight&lt;a.height,j=d(a.width)&amp;&amp;e.minWidth&amp;&amp;e.minWidth&gt;a.width,k=d(a.height)&amp;&amp;e.minHeight&amp;&amp;e.minHeight&gt;a.height;j&amp;&amp;(a.width=e.minWidth),k&amp;&amp;(a.height=e.minHeight),h&amp;&amp;(a.width=e.maxWidth),i&amp;&amp;(a.height=e.maxHeight);var l=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,n=/sw|nw|w/.test(g),o=/nw|ne|n/.test(g);j&amp;&amp;n&amp;&amp;(a.left=l-e.minWidth),h&amp;&amp;n&amp;&amp;(a.left=l-e.maxWidth),k&amp;&amp;o&amp;&amp;(a.top=m-e.minHeight),i&amp;&amp;o&amp;&amp;(a.top=m-e.maxHeight);var p=!a.width&amp;&amp;!a.height;p&amp;&amp;!a.left&amp;&amp;a.top?a.top=null:p&amp;&amp;!a.top&amp;&amp;a.left&amp;&amp;(a.left=null);return a},_proportionallyResize:function(){var b=this.options;if(!!this._proportionallyResizeElements.length){var c=this.helper||this.element;for(var d=0;d&lt;this._proportionallyResizeElements.length;d++){var e=this._proportionallyResizeElements[d];if(!this.borderDif){var f=[e.css(&quot;borderTopWidth&quot;),e.css(&quot;borderRightWidth&quot;),e.css(&quot;borderBottomWidth&quot;),e.css(&quot;borderLeftWidth&quot;)],g=[e.css(&quot;paddingTop&quot;),e.css(&quot;paddingRight&quot;),e.css(&quot;paddingBottom&quot;),e.css(&quot;paddingLeft&quot;)];this.borderDif=a.map(f,function(a,b){var c=parseInt(a,10)||0,d=parseInt(g[b],10)||0;return c+d})}if(a.browser.msie&amp;&amp;(!!a(c).is(&quot;:hidden&quot;)||!!a(c).parents(&quot;:hidden&quot;).length))continue;e.css({height:c.height()-this.borderDif[0]-this.borderDif[2]||0,width:c.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset();if(this._helper){this.helper=this.helper||a(&#39;&lt;div style=&quot;overflow:hidden;&quot;&gt;&lt;/div&gt;&#39;);var d=a.browser.msie&amp;&amp;a.browser.version&lt;7,e=d?1:0,f=d?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+f,height:this.element.outerHeight()+f,position:&quot;absolute&quot;,left:this.elementOffset.left-e+&quot;px&quot;,top:this.elementOffset.top-e+&quot;px&quot;,zIndex:++c.zIndex}),this.helper.appendTo(&quot;body&quot;).disableSelection()}else this.helper=this.element},_change:{e:function(a,b,c){return{width:this.originalSize.width+b}},w:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{left:f.left+b,width:e.width-b}},n:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{top:f.top+c,height:e.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),b!=&quot;resize&quot;&amp;&amp;this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.extend(a.ui.resizable,{version:&quot;1.8.18&quot;}),a.ui.plugin.add(&quot;resizable&quot;,&quot;alsoResize&quot;,{start:function(b,c){var d=a(this).data(&quot;resizable&quot;),e=d.options,f=function(b){a(b).each(function(){var b=a(this);b.data(&quot;resizable-alsoresize&quot;,{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css(&quot;left&quot;),10),top:parseInt(b.css(&quot;top&quot;),10)})})};typeof e.alsoResize==&quot;object&quot;&amp;&amp;!e.alsoResize.parentNode?e.alsoResize.length?(e.alsoResize=e.alsoResize[0],f(e.alsoResize)):a.each(e.alsoResize,function(a){f(a)}):f(e.alsoResize)},resize:function(b,c){var d=a(this).data(&quot;resizable&quot;),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},i=function(b,d){a(b).each(function(){var b=a(this),e=a(this).data(&quot;resizable-alsoresize&quot;),f={},g=d&amp;&amp;d.length?d:b.parents(c.originalElement[0]).length?[&quot;width&quot;,&quot;height&quot;]:[&quot;width&quot;,&quot;height&quot;,&quot;top&quot;,&quot;left&quot;];a.each(g,function(a,b){var c=(e[b]||0)+(h[b]||0);c&amp;&amp;c&gt;=0&amp;&amp;(f[b]=c||null)}),b.css(f)})};typeof e.alsoResize==&quot;object&quot;&amp;&amp;!e.alsoResize.nodeType?a.each(e.alsoResize,function(a,b){i(a,b)}):i(e.alsoResize)},stop:function(b,c){a(this).removeData(&quot;resizable-alsoresize&quot;)}}),a.ui.plugin.add(&quot;resizable&quot;,&quot;animate&quot;,{stop:function(b,c){var d=a(this).data(&quot;resizable&quot;),e=d.options,f=d._proportionallyResizeElements,g=f.length&amp;&amp;/textarea/i.test(f[0].nodeName),h=g&amp;&amp;a.ui.hasScroll(f[0],&quot;left&quot;)?0:d.sizeDiff.height,i=g?0:d.sizeDiff.width,j={width:d.size.width-i,height:d.size.height-h},k=parseInt(d.element.css(&quot;left&quot;),10)+(d.position.left-d.originalPosition.left)||null,l=parseInt(d.element.css(&quot;top&quot;),10)+(d.position.top-d.originalPosition.top)||null;d.element.animate(a.extend(j,l&amp;&amp;k?{top:l,left:k}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var c={width:parseInt(d.element.css(&quot;width&quot;),10),height:parseInt(d.element.css(&quot;height&quot;),10),top:parseInt(d.element.css(&quot;top&quot;),10),left:parseInt(d.element.css(&quot;left&quot;),10)};f&amp;&amp;f.length&amp;&amp;a(f[0]).css({width:c.width,height:c.height}),d._updateCache(c),d._propagate(&quot;resize&quot;,b)}})}}),a.ui.plugin.add(&quot;resizable&quot;,&quot;containment&quot;,{start:function(b,d){var e=a(this).data(&quot;resizable&quot;),f=e.options,g=e.element,h=f.containment,i=h instanceof a?h.get(0):/parent/.test(h)?g.parent().get(0):h;if(!!i){e.containerElement=a(i);if(/document/.test(h)||h==document)e.containerOffset={left:0,top:0},e.containerPosition={left:0,top:0},e.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight};else{var j=a(i),k=[];a([&quot;Top&quot;,&quot;Right&quot;,&quot;Left&quot;,&quot;Bottom&quot;]).each(function(a,b){k[a]=c(j.css(&quot;padding&quot;+b))}),e.containerOffset=j.offset(),e.containerPosition=j.position(),e.containerSize={height:j.innerHeight()-k[3],width:j.innerWidth()-k[1]};var l=e.containerOffset,m=e.containerSize.height,n=e.containerSize.width,o=a.ui.hasScroll(i,&quot;left&quot;)?i.scrollWidth:n,p=a.ui.hasScroll(i)?i.scrollHeight:m;e.parentData={element:i,left:l.left,top:l.top,width:o,height:p}}}},resize:function(b,c){var d=a(this).data(&quot;resizable&quot;),e=d.options,f=d.containerSize,g=d.containerOffset,h=d.size,i=d.position,j=d._aspectRatio||b.shiftKey,k={top:0,left:0},l=d.containerElement;l[0]!=document&amp;&amp;/static/.test(l.css(&quot;position&quot;))&amp;&amp;(k=g),i.left&lt;(d._helper?g.left:0)&amp;&amp;(d.size.width=d.size.width+(d._helper?d.position.left-g.left:d.position.left-k.left),j&amp;&amp;(d.size.height=d.size.width/e.aspectRatio),d.position.left=e.helper?g.left:0),i.top&lt;(d._helper?g.top:0)&amp;&amp;(d.size.height=d.size.height+(d._helper?d.position.top-g.top:d.position.top),j&amp;&amp;(d.size.width=d.size.height*e.aspectRatio),d.position.top=d._helper?g.top:0),d.offset.left=d.parentData.left+d.position.left,d.offset.top=d.parentData.top+d.position.top;var m=Math.abs((d._helper?d.offset.left-k.left:d.offset.left-k.left)+d.sizeDiff.width),n=Math.abs((d._helper?d.offset.top-k.top:d.offset.top-g.top)+d.sizeDiff.height),o=d.containerElement.get(0)==d.element.parent().get(0),p=/relative|absolute/.test(d.containerElement.css(&quot;position&quot;));o&amp;&amp;p&amp;&amp;(m-=d.parentData.left),m+d.size.width&gt;=d.parentData.width&amp;&amp;(d.size.width=d.parentData.width-m,j&amp;&amp;(d.size.height=d.size.width/d.aspectRatio)),n+d.size.height&gt;=d.parentData.height&amp;&amp;(d.size.height=d.parentData.height-n,j&amp;&amp;(d.size.width=d.size.height*d.aspectRatio))},stop:function(b,c){var d=a(this).data(&quot;resizable&quot;),e=d.options,f=d.position,g=d.containerOffset,h=d.containerPosition,i=d.containerElement,j=a(d.helper),k=j.offset(),l=j.outerWidth()-d.sizeDiff.width,m=j.outerHeight()-d.sizeDiff.height;d._helper&amp;&amp;!e.animate&amp;&amp;/relative/.test(i.css(&quot;position&quot;))&amp;&amp;a(this).css({left:k.left-h.left-g.left,width:l,height:m}),d._helper&amp;&amp;!e.animate&amp;&amp;/static/.test(i.css(&quot;position&quot;))&amp;&amp;a(this).css({left:k.left-h.left-g.left,width:l,height:m})}}),a.ui.plugin.add(&quot;resizable&quot;,&quot;ghost&quot;,{start:function(b,c){var d=a(this).data(&quot;resizable&quot;),e=d.options,f=d.size;d.ghost=d.originalElement.clone(),d.ghost.css({opacity:.25,display:&quot;block&quot;,position:&quot;relative&quot;,height:f.height,width:f.width,margin:0,left:0,top:0}).addClass(&quot;ui-resizable-ghost&quot;).addClass(typeof e.ghost==&quot;string&quot;?e.ghost:&quot;&quot;),d.ghost.appendTo(d.helper)},resize:function(b,c){var d=a(this).data(&quot;resizable&quot;),e=d.options;d.ghost&amp;&amp;d.ghost.css({position:&quot;relative&quot;,height:d.size.height,width:d.size.width})},stop:function(b,c){var d=a(this).data(&quot;resizable&quot;),e=d.options;d.ghost&amp;&amp;d.helper&amp;&amp;d.helper.get(0).removeChild(d.ghost.get(0))}}),a.ui.plugin.add(&quot;resizable&quot;,&quot;grid&quot;,{resize:function(b,c){var d=a(this).data(&quot;resizable&quot;),e=d.options,f=d.size,g=d.originalSize,h=d.originalPosition,i=d.axis,j=e._aspectRatio||b.shiftKey;e.grid=typeof e.grid==&quot;number&quot;?[e.grid,e.grid]:e.grid;var k=Math.round((f.width-g.width)/(e.grid[0]||1))*(e.grid[0]||1),l=Math.round((f.height-g.height)/(e.grid[1]||1))*(e.grid[1]||1);/^(se|s|e)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l):/^(ne)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l):/^(sw)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.left=h.left-k):(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l,d.position.left=h.left-k)}});var c=function(a){return parseInt(a,10)||0},d=function(a){return!isNaN(parseInt(a,10))}})(jQuery);/* * jQuery UI Selectable 1.8.18 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Selectables * * Depends: * jquery.ui.core.js * jquery.ui.mouse.js * jquery.ui.widget.js */(function(a,b){a.widget(&quot;ui.selectable&quot;,a.ui.mouse,{options:{appendTo:&quot;body&quot;,autoRefresh:!0,distance:0,filter:&quot;*&quot;,tolerance:&quot;touch&quot;},_create:function(){var b=this;this.element.addClass(&quot;ui-selectable&quot;),this.dragged=!1;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]),c.addClass(&quot;ui-selectee&quot;),c.each(function(){var b=a(this),c=b.offset();a.data(this,&quot;selectable-item&quot;,{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass(&quot;ui-selected&quot;),selecting:b.hasClass(&quot;ui-selecting&quot;),unselecting:b.hasClass(&quot;ui-unselecting&quot;)})})},this.refresh(),this.selectees=c.addClass(&quot;ui-selectee&quot;),this._mouseInit(),this.helper=a(&quot;&lt;div class=&#39;ui-selectable-helper&#39;&gt;&lt;/div&gt;&quot;)},destroy:function(){this.selectees.removeClass(&quot;ui-selectee&quot;).removeData(&quot;selectable-item&quot;),this.element.removeClass(&quot;ui-selectable ui-selectable-disabled&quot;).removeData(&quot;selectable&quot;).unbind(&quot;.selectable&quot;),this._mouseDestroy();return this},_mouseStart:function(b){var c=this;this.opos=[b.pageX,b.pageY];if(!this.options.disabled){var d=this.options;this.selectees=a(d.filter,this.element[0]),this._trigger(&quot;start&quot;,b),a(d.appendTo).append(this.helper),this.helper.css({left:b.clientX,top:b.clientY,width:0,height:0}),d.autoRefresh&amp;&amp;this.refresh(),this.selectees.filter(&quot;.ui-selected&quot;).each(function(){var d=a.data(this,&quot;selectable-item&quot;);d.startselected=!0,!b.metaKey&amp;&amp;!b.ctrlKey&amp;&amp;(d.$element.removeClass(&quot;ui-selected&quot;),d.selected=!1,d.$element.addClass(&quot;ui-unselecting&quot;),d.unselecting=!0,c._trigger(&quot;unselecting&quot;,b,{unselecting:d.element}))}),a(b.target).parents().andSelf().each(function(){var d=a.data(this,&quot;selectable-item&quot;);if(d){var e=!b.metaKey&amp;&amp;!b.ctrlKey||!d.$element.hasClass(&quot;ui-selected&quot;);d.$element.removeClass(e?&quot;ui-unselecting&quot;:&quot;ui-selected&quot;).addClass(e?&quot;ui-selecting&quot;:&quot;ui-unselecting&quot;),d.unselecting=!e,d.selecting=e,d.selected=e,e?c._trigger(&quot;selecting&quot;,b,{selecting:d.element}):c._trigger(&quot;unselecting&quot;,b,{unselecting:d.element});return!1}})}},_mouseDrag:function(b){var c=this;this.dragged=!0;if(!this.options.disabled){var d=this.options,e=this.opos[0],f=this.opos[1],g=b.pageX,h=b.pageY;if(e&gt;g){var i=g;g=e,e=i}if(f&gt;h){var i=h;h=f,f=i}this.helper.css({left:e,top:f,width:g-e,height:h-f}),this.selectees.each(function(){var i=a.data(this,&quot;selectable-item&quot;);if(!!i&amp;&amp;i.element!=c.element[0]){var j=!1;d.tolerance==&quot;touch&quot;?j=!(i.left&gt;g||i.right&lt;e||i.top&gt;h||i.bottom&lt;f):d.tolerance==&quot;fit&quot;&amp;&amp;(j=i.left&gt;e&amp;&amp;i.right&lt;g&amp;&amp;i.top&gt;f&amp;&amp;i.bottom&lt;h),j?(i.selected&amp;&amp;(i.$element.removeClass(&quot;ui-selected&quot;),i.selected=!1),i.unselecting&amp;&amp;(i.$element.removeClass(&quot;ui-unselecting&quot;),i.unselecting=!1),i.selecting||(i.$element.addClass(&quot;ui-selecting&quot;),i.selecting=!0,c._trigger(&quot;selecting&quot;,b,{selecting:i.element}))):(i.selecting&amp;&amp;((b.metaKey||b.ctrlKey)&amp;&amp;i.startselected?(i.$element.removeClass(&quot;ui-selecting&quot;),i.selecting=!1,i.$element.addClass(&quot;ui-selected&quot;),i.selected=!0):(i.$element.removeClass(&quot;ui-selecting&quot;),i.selecting=!1,i.startselected&amp;&amp;(i.$element.addClass(&quot;ui-unselecting&quot;),i.unselecting=!0),c._trigger(&quot;unselecting&quot;,b,{unselecting:i.element}))),i.selected&amp;&amp;!b.metaKey&amp;&amp;!b.ctrlKey&amp;&amp;!i.startselected&amp;&amp;(i.$element.removeClass(&quot;ui-selected&quot;),i.selected=!1,i.$element.addClass(&quot;ui-unselecting&quot;),i.unselecting=!0,c._trigger(&quot;unselecting&quot;,b,{unselecting:i.element})))}});return!1}},_mouseStop:function(b){var c=this;this.dragged=!1;var d=this.options;a(&quot;.ui-unselecting&quot;,this.element[0]).each(function(){var d=a.data(this,&quot;selectable-item&quot;);d.$element.removeClass(&quot;ui-unselecting&quot;),d.unselecting=!1,d.startselected=!1,c._trigger(&quot;unselected&quot;,b,{unselected:d.element})}),a(&quot;.ui-selecting&quot;,this.element[0]).each(function(){var d=a.data(this,&quot;selectable-item&quot;);d.$element.removeClass(&quot;ui-selecting&quot;).addClass(&quot;ui-selected&quot;),d.selecting=!1,d.selected=!0,d.startselected=!0,c._trigger(&quot;selected&quot;,b,{selected:d.element})}),this._trigger(&quot;stop&quot;,b),this.helper.remove();return!1}}),a.extend(a.ui.selectable,{version:&quot;1.8.18&quot;})})(jQuery);/* * jQuery UI Sortable 1.8.18 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Sortables * * Depends: * jquery.ui.core.js * jquery.ui.mouse.js * jquery.ui.widget.js */(function(a,b){a.widget(&quot;ui.sortable&quot;,a.ui.mouse,{widgetEventPrefix:&quot;sort&quot;,ready:!1,options:{appendTo:&quot;parent&quot;,axis:!1,connectWith:!1,containment:!1,cursor:&quot;auto&quot;,cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:&quot;original&quot;,items:&quot;&gt; *&quot;,opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:&quot;default&quot;,tolerance:&quot;intersect&quot;,zIndex:1e3},_create:function(){var a=this.options;this.containerCache={},this.element.addClass(&quot;ui-sortable&quot;),this.refresh(),this.floating=this.items.length?a.axis===&quot;x&quot;||/left|right/.test(this.items[0].item.css(&quot;float&quot;))||/inline|table-cell/.test(this.items[0].item.css(&quot;display&quot;)):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){a.Widget.prototype.destroy.call(this),this.element.removeClass(&quot;ui-sortable ui-sortable-disabled&quot;),this._mouseDestroy();for(var b=this.items.length-1;b&gt;=0;b--)this.items[b].item.removeData(this.widgetName+&quot;-item&quot;);return this},_setOption:function(b,c){b===&quot;disabled&quot;?(this.options[b]=c,this.widget()[c?&quot;addClass&quot;:&quot;removeClass&quot;](&quot;ui-sortable-disabled&quot;)):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c){var d=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type==&quot;static&quot;)return!1;this._refreshItems(b);var e=null,f=this,g=a(b.target).parents().each(function(){if(a.data(this,d.widgetName+&quot;-item&quot;)==f){e=a(this);return!1}});a.data(b.target,d.widgetName+&quot;-item&quot;)==f&amp;&amp;(e=a(b.target));if(!e)return!1;if(this.options.handle&amp;&amp;!c){var h=!1;a(this.options.handle,e).find(&quot;*&quot;).andSelf().each(function(){this==b.target&amp;&amp;(h=!0)});if(!h)return!1}this.currentItem=e,this._removeCurrentsFromItems();return!0},_mouseStart:function(b,c,d){var e=this.options,f=this;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.helper.css(&quot;position&quot;,&quot;absolute&quot;),this.cssPosition=this.helper.css(&quot;position&quot;),a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,e.cursorAt&amp;&amp;this._adjustOffsetFromHelper(e.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&amp;&amp;this.currentItem.hide(),this._createPlaceholder(),e.containment&amp;&amp;this._setContainment(),e.cursor&amp;&amp;(a(&quot;body&quot;).css(&quot;cursor&quot;)&amp;&amp;(this._storedCursor=a(&quot;body&quot;).css(&quot;cursor&quot;)),a(&quot;body&quot;).css(&quot;cursor&quot;,e.cursor)),e.opacity&amp;&amp;(this.helper.css(&quot;opacity&quot;)&amp;&amp;(this._storedOpacity=this.helper.css(&quot;opacity&quot;)),this.helper.css(&quot;opacity&quot;,e.opacity)),e.zIndex&amp;&amp;(this.helper.css(&quot;zIndex&quot;)&amp;&amp;(this._storedZIndex=this.helper.css(&quot;zIndex&quot;)),this.helper.css(&quot;zIndex&quot;,e.zIndex)),this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!=&quot;HTML&quot;&amp;&amp;(this.overflowOffset=this.scrollParent.offset()),this._trigger(&quot;start&quot;,b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(var g=this.containers.length-1;g&gt;=0;g--)this.containers[g]._trigger(&quot;activate&quot;,b,f._uiHash(this));a.ui.ddmanager&amp;&amp;(a.ui.ddmanager.current=this),a.ui.ddmanager&amp;&amp;!e.dropBehaviour&amp;&amp;a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass(&quot;ui-sortable-helper&quot;),this._mouseDrag(b);return!0},_mouseDrag:function(b){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo(&quot;absolute&quot;),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var c=this.options,d=!1;this.scrollParent[0]!=do

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值