/*! jquery ui - v1.10.3 - 2013-05-03 * http://jqueryui.com * includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js * copyright 2013 jquery foundation and other contributors; licensed mit */ (function(t,e){function i(e,i){var n,o,a,r=e.nodename.tolowercase();return"area"===r?(n=e.parentnode,o=n.name,e.href&&o&&"map"===n.nodename.tolowercase()?(a=t("img[usemap=#"+o+"]")[0],!!a&&s(a)):!1):(/input|select|textarea|button|object/.test(r)?!e.disabled:"a"===r?e.href||i:i)&&s(e)}function s(e){return t.expr.filters.visible(e)&&!t(e).parents().addback().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var n=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.3",keycode:{backspace:8,comma:188,delete:46,down:40,end:35,enter:13,escape:27,home:36,left:37,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,space:32,tab:9,up:38}}),t.fn.extend({focus:function(e){return function(i,s){return"number"==typeof i?this.each(function(){var e=this;settimeout(function(){t(e).focus(),s&&s.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollparent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zindex:function(i){if(i!==e)return this.css("zindex",i);if(this.length)for(var s,n,o=t(this[0]);o.length&&o[0]!==document;){if(s=o.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(n=parseint(o.css("zindex"),10),!isnan(n)&&0!==n))return n;o=o.parent()}return 0},uniqueid:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeuniqueid:function(){return this.each(function(){o.test(this.id)&&t(this).removeattr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createpseudo?t.expr.createpseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(e){return i(e,!isnan(t.attr(e,"tabindex")))},tabbable:function(e){var s=t.attr(e,"tabindex"),n=isnan(s);return(n||s>=0)&&i(e,!n)}}),t("").outerwidth(1).jquery||t.each(["width","height"],function(i,s){function n(e,i,s,n){return t.each(o,function(){i-=parsefloat(t.css(e,"padding"+this))||0,s&&(i-=parsefloat(t.css(e,"border"+this+"width"))||0),n&&(i-=parsefloat(t.css(e,"margin"+this))||0)}),i}var o="width"===s?["left","right"]:["top","bottom"],a=s.tolowercase(),r={innerwidth:t.fn.innerwidth,innerheight:t.fn.innerheight,outerwidth:t.fn.outerwidth,outerheight:t.fn.outerheight};t.fn["inner"+s]=function(i){return i===e?r["inner"+s].call(this):this.each(function(){t(this).css(a,n(this,i)+"px")})},t.fn["outer"+s]=function(e,i){return"number"!=typeof e?r["outer"+s].call(this,e):this.each(function(){t(this).css(a,n(this,e,!0,i)+"px")})}}),t.fn.addback||(t.fn.addback=function(t){return this.add(null==t?this.prevobject:this.prevobject.filter(t))}),t("").data("a-b","a").removedata("a-b").data("a-b")&&(t.fn.removedata=function(e){return function(i){return arguments.length?e.call(this,t.camelcase(i)):e.call(this)}}(t.fn.removedata)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.useragent.tolowercase()),t.support.selectstart="onselectstart"in document.createelement("div"),t.fn.extend({disableselection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableselection",function(t){t.preventdefault()})},enableselection:function(){return this.unbind(".ui-disableselection")}}),t.extend(t.ui,{plugin:{add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i){var s,n=t.plugins[e];if(n&&t.element[0].parentnode&&11!==t.element[0].parentnode.nodetype)for(s=0;n.length>s;s++)t.options[n[s][0]]&&n[s][1].apply(t.element,i)}},hasscroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollleft":"scrolltop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)}})})(jquery),function(t,e){var i=0,s=array.prototype.slice,n=t.cleandata;t.cleandata=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerhandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.widget),t.expr[":"][o.tolowercase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createwidget?(arguments.length&&this._createwidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childconstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isfunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superapply;return this._super=t,this._superapply=e,i=n.apply(this,arguments),this._super=s,this._superapply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgeteventprefix:a?h.widgeteventprefix:i},l,{constructor:r,namespace:c,widgetname:i,widgetfullname:o}),a?(t.each(a._childconstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetname,r,i._proto)}),delete a._childconstructors):s._childconstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasownproperty(n)&&o!==e&&(i[n]=t.isplainobject(o)?t.isplainobject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetfullname||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isfunction(n[a])&&"_"!==a.charat(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushstack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.widget=function(){},t.widget._childconstructors=[],t.widget.prototype={widgetname:"widget",widgeteventprefix:"",defaultelement:"
",options:{disabled:!1,create:null},_createwidget:function(e,s){s=t(s||this.defaultelement||this)[0],this.element=t(s),this.uuid=i++,this.eventnamespace="."+this.widgetname+this.uuid,this.options=t.widget.extend({},this.options,this._getcreateoptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetfullname,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerdocument:s.document||s),this.window=t(this.document[0].defaultview||this.document[0].parentwindow)),this._create(),this._trigger("create",null,this._getcreateeventdata()),this._init()},_getcreateoptions:t.noop,_getcreateeventdata:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventnamespace).removedata(this.widgetname).removedata(this.widgetfullname).removedata(t.camelcase(this.widgetfullname)),this.widget().unbind(this.eventnamespace).removeattr("aria-disabled").removeclass(this.widgetfullname+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventnamespace),this.hoverable.removeclass("ui-state-hover"),this.focusable.removeclass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),s===e)return o[i]===e?null:o[i];o[i]=s}else{if(s===e)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setoptions(r),this},_setoptions:function(t){var e;for(e in t)this._setoption(e,t[e]);return this},_setoption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleclass(this.widgetfullname+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeclass("ui-state-hover"),this.focusable.removeclass("ui-state-focus")),this},enable:function(){return this._setoption("disabled",!1)},disable:function(){return this._setoption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasclass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventnamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventnamespace+" ")+this.eventnamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return settimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currenttarget).addclass("ui-state-hover")},mouseleave:function(e){t(e.currenttarget).removeclass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currenttarget).addclass("ui-state-focus")},focusout:function(e){t(e.currenttarget).removeclass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.event(i),i.type=(e===this.widgeteventprefix?e:this.widgeteventprefix+e).tolowercase(),i.target=this.element[0],o=i.originalevent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isfunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isdefaultprevented())}},t.each({show:"fadein",hide:"fadeout"},function(e,i){t.widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isemptyobject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})}(jquery),function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseinit:function(){var e=this;this.element.bind("mousedown."+this.widgetname,function(t){return e._mousedown(t)}).bind("click."+this.widgetname,function(i){return!0===t.data(i.target,e.widgetname+".preventclickevent")?(t.removedata(i.target,e.widgetname+".preventclickevent"),i.stopimmediatepropagation(),!1):undefined}),this.started=!1},_mousedestroy:function(){this.element.unbind("."+this.widgetname),this._mousemovedelegate&&t(document).unbind("mousemove."+this.widgetname,this._mousemovedelegate).unbind("mouseup."+this.widgetname,this._mouseupdelegate)},_mousedown:function(i){if(!e){this._mousestarted&&this._mouseup(i),this._mousedownevent=i;var s=this,n=1===i.which,o="string"==typeof this.options.cancel&&i.target.nodename?t(i.target).closest(this.options.cancel).length:!1;return n&&!o&&this._mousecapture(i)?(this.mousedelaymet=!this.options.delay,this.mousedelaymet||(this._mousedelaytimer=settimeout(function(){s.mousedelaymet=!0},this.options.delay)),this._mousedistancemet(i)&&this._mousedelaymet(i)&&(this._mousestarted=this._mousestart(i)!==!1,!this._mousestarted)?(i.preventdefault(),!0):(!0===t.data(i.target,this.widgetname+".preventclickevent")&&t.removedata(i.target,this.widgetname+".preventclickevent"),this._mousemovedelegate=function(t){return s._mousemove(t)},this._mouseupdelegate=function(t){return s._mouseup(t)},t(document).bind("mousemove."+this.widgetname,this._mousemovedelegate).bind("mouseup."+this.widgetname,this._mouseupdelegate),i.preventdefault(),e=!0,!0)):!0}},_mousemove:function(e){return t.ui.ie&&(!document.documentmode||9>document.documentmode)&&!e.button?this._mouseup(e):this._mousestarted?(this._mousedrag(e),e.preventdefault()):(this._mousedistancemet(e)&&this._mousedelaymet(e)&&(this._mousestarted=this._mousestart(this._mousedownevent,e)!==!1,this._mousestarted?this._mousedrag(e):this._mouseup(e)),!this._mousestarted)},_mouseup:function(e){return t(document).unbind("mousemove."+this.widgetname,this._mousemovedelegate).unbind("mouseup."+this.widgetname,this._mouseupdelegate),this._mousestarted&&(this._mousestarted=!1,e.target===this._mousedownevent.target&&t.data(e.target,this.widgetname+".preventclickevent",!0),this._mousestop(e)),!1},_mousedistancemet:function(t){return math.max(math.abs(this._mousedownevent.pagex-t.pagex),math.abs(this._mousedownevent.pagey-t.pagey))>=this.options.distance},_mousedelaymet:function(){return this.mousedelaymet},_mousestart:function(){},_mousedrag:function(){},_mousestop:function(){},_mousecapture:function(){return!0}})}(jquery),function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.3",widgeteventprefix:"drag",options:{addclasses:!0,appendto:"parent",axis:!1,connecttosortable:!1,containment:!1,cursor:"auto",cursorat:!1,grid:!1,handle:!1,helper:"original",iframefix:!1,opacity:!1,refreshpositions:!1,revert:!1,revertduration:500,scope:"default",scroll:!0,scrollsensitivity:20,scrollspeed:20,snap:!1,snapmode:"both",snaptolerance:20,stack:!1,zindex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addclasses&&this.element.addclass("ui-draggable"),this.options.disabled&&this.element.addclass("ui-draggable-disabled"),this._mouseinit()},_destroy:function(){this.element.removeclass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mousedestroy()},_mousecapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._gethandle(e),this.handle?(t(i.iframefix===!0?"iframe":i.iframefix).each(function(){t("
").css({width:this.offsetwidth+"px",height:this.offsetheight+"px",position:"absolute",opacity:"0.001",zindex:1e3}).css(t(this).offset()).appendto("body")}),!0):!1)},_mousestart:function(e){var i=this.options;return this.helper=this._createhelper(e),this.helper.addclass("ui-draggable-dragging"),this._cachehelperproportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cachemargins(),this.cssposition=this.helper.css("position"),this.scrollparent=this.helper.scrollparent(),this.offsetparent=this.helper.offsetparent(),this.offsetparentcssposition=this.offsetparent.css("position"),this.offset=this.positionabs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pagex-this.offset.left,top:e.pagey-this.offset.top},parent:this._getparentoffset(),relative:this._getrelativeoffset()}),this.originalposition=this.position=this._generateposition(e),this.originalpagex=e.pagex,this.originalpagey=e.pagey,i.cursorat&&this._adjustoffsetfromhelper(i.cursorat),this._setcontainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cachehelperproportions(),t.ui.ddmanager&&!i.dropbehaviour&&t.ui.ddmanager.prepareoffsets(this,e),this._mousedrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragstart(this,e),!0)},_mousedrag:function(e,i){if("fixed"===this.offsetparentcssposition&&(this.offset.parent=this._getparentoffset()),this.position=this._generateposition(e),this.positionabs=this._convertpositionto("absolute"),!i){var s=this._uihash();if(this._trigger("drag",e,s)===!1)return this._mouseup({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mousestop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropbehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerdocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isfunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalposition,parseint(this.options.revertduration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseup:function(e){return t("div.ui-draggable-iframefix").each(function(){this.parentnode.removechild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragstop(this,e),t.ui.mouse.prototype._mouseup.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseup({}):this._clear(),this},_gethandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createhelper:function(e){var i=this.options,s=t.isfunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeattr("id"):this.element;return s.parents("body").length||s.appendto("parent"===i.appendto?this.element[0].parentnode:i.appendto),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustoffsetfromhelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isarray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperproportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperproportions.height-e.bottom+this.margins.top)},_getparentoffset:function(){var e=this.offsetparent.offset();return"absolute"===this.cssposition&&this.scrollparent[0]!==document&&t.contains(this.scrollparent[0],this.offsetparent[0])&&(e.left+=this.scrollparent.scrollleft(),e.top+=this.scrollparent.scrolltop()),(this.offsetparent[0]===document.body||this.offsetparent[0].tagname&&"html"===this.offsetparent[0].tagname.tolowercase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseint(this.offsetparent.css("bordertopwidth"),10)||0),left:e.left+(parseint(this.offsetparent.css("borderleftwidth"),10)||0)}},_getrelativeoffset:function(){if("relative"===this.cssposition){var t=this.element.position();return{top:t.top-(parseint(this.helper.css("top"),10)||0)+this.scrollparent.scrolltop(),left:t.left-(parseint(this.helper.css("left"),10)||0)+this.scrollparent.scrollleft()}}return{top:0,left:0}},_cachemargins:function(){this.margins={left:parseint(this.element.css("marginleft"),10)||0,top:parseint(this.element.css("margintop"),10)||0,right:parseint(this.element.css("marginright"),10)||0,bottom:parseint(this.element.css("marginbottom"),10)||0}},_cachehelperproportions:function(){this.helperproportions={width:this.helper.outerwidth(),height:this.helper.outerheight()}},_setcontainment:function(){var e,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[t(window).scrollleft()-this.offset.relative.left-this.offset.parent.left,t(window).scrolltop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollleft()+t(window).width()-this.helperproportions.width-this.margins.left,t(window).scrolltop()+(t(window).height()||document.body.parentnode.scrollheight)-this.helperproportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,t(document).width()-this.helperproportions.width-this.margins.left,(t(document).height()||document.body.parentnode.scrollheight)-this.helperproportions.height-this.margins.top],undefined):n.containment.constructor===array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentnode),i=t(n.containment),s=i[0],s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseint(i.css("borderleftwidth"),10)||0)+(parseint(i.css("paddingleft"),10)||0),(parseint(i.css("bordertopwidth"),10)||0)+(parseint(i.css("paddingtop"),10)||0),(e?math.max(s.scrollwidth,s.offsetwidth):s.offsetwidth)-(parseint(i.css("borderrightwidth"),10)||0)-(parseint(i.css("paddingright"),10)||0)-this.helperproportions.width-this.margins.left-this.margins.right,(e?math.max(s.scrollheight,s.offsetheight):s.offsetheight)-(parseint(i.css("borderbottomwidth"),10)||0)-(parseint(i.css("paddingbottom"),10)||0)-this.helperproportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertpositionto:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssposition||this.scrollparent[0]!==document&&t.contains(this.scrollparent[0],this.offsetparent[0])?this.scrollparent:this.offsetparent;return this.offset.scroll||(this.offset.scroll={top:n.scrolltop(),left:n.scrollleft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssposition?-this.scrollparent.scrolltop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssposition?-this.scrollparent.scrollleft():this.offset.scroll.left)*s}},_generateposition:function(e){var i,s,n,o,a=this.options,r="absolute"!==this.cssposition||this.scrollparent[0]!==document&&t.contains(this.scrollparent[0],this.offsetparent[0])?this.scrollparent:this.offsetparent,h=e.pagex,l=e.pagey;return this.offset.scroll||(this.offset.scroll={top:r.scrolltop(),left:r.scrollleft()}),this.originalposition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pagex-this.offset.click.lefti[2]&&(h=i[2]+this.offset.click.left),e.pagey-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalpagey+math.round((l-this.originalpagey)/a.grid[1])*a.grid[1]:this.originalpagey,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalpagex+math.round((h-this.originalpagex)/a.grid[0])*a.grid[0]:this.originalpagex,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssposition?-this.scrollparent.scrolltop():this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssposition?-this.scrollparent.scrollleft():this.offset.scroll.left)}},_clear:function(){this.helper.removeclass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelhelperremoval||this.helper.remove(),this.helper=null,this.cancelhelperremoval=!1},_trigger:function(e,i,s){return s=s||this._uihash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionabs=this._convertpositionto("absolute")),t.widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uihash:function(){return{helper:this.helper,position:this.position,originalposition:this.originalposition,offset:this.positionabs}}}),t.ui.plugin.add("draggable","connecttosortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,o=t.extend({},i,{item:s.element});s.sortables=[],t(n.connecttosortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldrevert:i.options.revert}),i.refreshpositions(),i._trigger("activate",e,o))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isover?(this.instance.isover=0,s.cancelhelperremoval=!0,this.instance.cancelhelperremoval=!1,this.shouldrevert&&(this.instance.options.revert=this.shouldrevert),this.instance._mousestop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentitem.css({top:"auto",left:"auto"})):(this.instance.cancelhelperremoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var o=!1,a=this;this.instance.positionabs=s.positionabs,this.instance.helperproportions=s.helperproportions,this.instance.offset.click=s.offset.click,this.instance._intersectswith(this.instance.containercache)&&(o=!0,t.each(s.sortables,function(){return this.instance.positionabs=s.positionabs,this.instance.helperproportions=s.helperproportions,this.instance.offset.click=s.offset.click,this!==a&&this.instance._intersectswith(this.instance.containercache)&&t.contains(a.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isover||(this.instance.isover=1,this.instance.currentitem=t(n).clone().removeattr("id").appendto(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentitem[0],this.instance._mousecapture(e,!0),this.instance._mousestart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("tosortable",e),s.dropped=this.instance.element,s.currentitem=s.element,this.instance.fromoutside=s),this.instance.currentitem&&this.instance._mousedrag(e)):this.instance.isover&&(this.instance.isover=0,this.instance.cancelhelperremoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uihash(this.instance)),this.instance._mousestop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentitem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromsortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollparent[0]!==document&&"html"!==e.scrollparent[0].tagname&&(e.overflowoffset=e.scrollparent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollparent[0]!==document&&"html"!==i.scrollparent[0].tagname?(s.axis&&"x"===s.axis||(i.overflowoffset.top+i.scrollparent[0].offsetheight-e.pagey=0;u--)r=p.snapelements[u].left,h=r+p.snapelements[u].width,l=p.snapelements[u].top,c=l+p.snapelements[u].height,r-g>v||m>h+g||l-g>b||_>c+g||!t.contains(p.snapelements[u].item.ownerdocument,p.snapelements[u].item)?(p.snapelements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uihash(),{snapitem:p.snapelements[u].item})),p.snapelements[u].snapping=!1):("inner"!==f.snapmode&&(s=g>=math.abs(l-b),n=g>=math.abs(c-_),o=g>=math.abs(r-v),a=g>=math.abs(h-m),s&&(i.position.top=p._convertpositionto("relative",{top:l-p.helperproportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertpositionto("relative",{top:c,left:0}).top-p.margins.top),o&&(i.position.left=p._convertpositionto("relative",{top:0,left:r-p.helperproportions.width}).left-p.margins.left),a&&(i.position.left=p._convertpositionto("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||o||a,"outer"!==f.snapmode&&(s=g>=math.abs(l-_),n=g>=math.abs(c-b),o=g>=math.abs(r-m),a=g>=math.abs(h-v),s&&(i.position.top=p._convertpositionto("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertpositionto("relative",{top:c-p.helperproportions.height,left:0}).top-p.margins.top),o&&(i.position.left=p._convertpositionto("relative",{top:0,left:r}).left-p.margins.left),a&&(i.position.left=p._convertpositionto("relative",{top:0,left:h-p.helperproportions.width}).left-p.margins.left)),!p.snapelements[u].snapping&&(s||n||o||a||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uihash(),{snapitem:p.snapelements[u].item})),p.snapelements[u].snapping=s||n||o||a||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makearray(t(i.stack)).sort(function(e,i){return(parseint(t(e).css("zindex"),10)||0)-(parseint(t(i).css("zindex"),10)||0)});s.length&&(e=parseint(t(s[0]).css("zindex"),10)||0,t(s).each(function(i){t(this).css("zindex",e+i)}),this.css("zindex",e+s.length))}}),t.ui.plugin.add("draggable","zindex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zindex")&&(n._zindex=s.css("zindex")),s.css("zindex",n.zindex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zindex&&t(i.helper).css("zindex",s._zindex)}})}(jquery),function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.3",widgeteventprefix:"drop",options:{accept:"*",activeclass:!1,addclasses:!0,greedy:!1,hoverclass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=t.isfunction(i)?i:function(t){return t.is(i) },this.proportions={width:this.element[0].offsetwidth,height:this.element[0].offsetheight},t.ui.ddmanager.droppables[e.scope]=t.ui.ddmanager.droppables[e.scope]||[],t.ui.ddmanager.droppables[e.scope].push(this),e.addclasses&&this.element.addclass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeclass("ui-droppable ui-droppable-disabled")},_setoption:function(e,i){"accept"===e&&(this.accept=t.isfunction(i)?i:function(t){return t.is(i)}),t.widget.prototype._setoption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeclass&&this.element.addclass(this.options.activeclass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeclass&&this.element.removeclass(this.options.activeclass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentitem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentitem||i.element)&&(this.options.hoverclass&&this.element.addclass(this.options.hoverclass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentitem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentitem||i.element)&&(this.options.hoverclass&&this.element.removeclass(this.options.hoverclass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentitem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentitem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentitem||s.element)?(this.options.activeclass&&this.element.removeclass(this.options.activeclass),this.options.hoverclass&&this.element.removeclass(this.options.hoverclass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentitem||t.element,helper:t.helper,position:t.position,offset:t.positionabs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,o,a=(t.positionabs||t.position.absolute).left,r=a+t.helperproportions.width,h=(t.positionabs||t.position.absolute).top,l=h+t.helperproportions.height,c=i.offset.left,u=c+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return a>=c&&u>=r&&h>=d&&p>=l;case"intersect":return a+t.helperproportions.width/2>c&&u>r-t.helperproportions.width/2&&h+t.helperproportions.height/2>d&&p>l-t.helperproportions.height/2;case"pointer":return n=(t.positionabs||t.position.absolute).left+(t.clickoffset||t.offset.click).left,o=(t.positionabs||t.position.absolute).top+(t.clickoffset||t.offset.click).top,e(o,d,i.proportions.height)&&e(n,c,i.proportions.width);case"touch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(a>=c&&u>=a||r>=c&&u>=r||c>a&&r>u);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareoffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentitem||e.element).find(":data(ui-droppable)").addback();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentitem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions.height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions={width:o[s].element[0].offsetwidth,height:o[s].element[0].offsetheight})}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentitem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragstart:function(e,i){e.element.parentsuntil("body").bind("scroll.droppable",function(){e.options.refreshpositions||t.ui.ddmanager.prepareoffsets(e,i)})},drag:function(e,i){e.options.refreshpositions&&t.ui.ddmanager.prepareoffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedychild&&this.visible){var s,n,o,a=t.ui.intersect(e,this,this.options.tolerance),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),o.length&&(s=t.data(o[0],"ui-droppable"),s.greedychild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragstop:function(e,i){e.element.parentsuntil("body").unbind("scroll.droppable"),e.options.refreshpositions||t.ui.ddmanager.prepareoffsets(e,i)}}}(jquery),function(t){function e(t){return parseint(t,10)||0}function i(t){return!isnan(parseint(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.3",widgeteventprefix:"resize",options:{alsoresize:!1,animate:!1,animateduration:"slow",animateeasing:"swing",aspectratio:!1,autohide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxheight:null,maxwidth:null,minheight:10,minwidth:10,zindex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,o,a=this,r=this.options;if(this.element.addclass("ui-resizable"),t.extend(this,{_aspectratio:!!r.aspectratio,aspectratio:r.aspectratio,originalelement:this.element,_proportionallyresizeelements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodename.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("
").css({position:this.element.css("position"),width:this.element.outerwidth(),height:this.element.outerheight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementiswrapper=!0,this.element.css({marginleft:this.originalelement.css("marginleft"),margintop:this.originalelement.css("margintop"),marginright:this.originalelement.css("marginright"),marginbottom:this.originalelement.css("marginbottom")}),this.originalelement.css({marginleft:0,margintop:0,marginright:0,marginbottom:0}),this.originalresizestyle=this.originalelement.css("resize"),this.originalelement.css("resize","none"),this._proportionallyresizeelements.push(this.originalelement.css({position:"static",zoom:1,display:"block"})),this.originalelement.css({margin:this.originalelement.css("margin")}),this._proportionallyresize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===string)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),o="ui-resizable-"+s,n=t("
"),n.css({zindex:r.zindex}),"se"===s&&n.addclass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderaxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===string&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementiswrapper&&this.originalelement[0].nodename.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerheight():s.outerwidth(),n=["padding",/ne|nw|n/.test(i)?"top":/se|sw|s/.test(i)?"bottom":/^e$/.test(i)?"right":"left"].join(""),e.css(n,o),this._proportionallyresize()),t(this.handles[i]).length},this._renderaxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableselection(),this._handles.mouseover(function(){a.resizing||(this.classname&&(n=this.classname.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),r.autohide&&(this._handles.hide(),t(this.element).addclass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeclass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){r.disabled||a.resizing||(t(this).addclass("ui-resizable-autohide"),a._handles.hide())})),this._mouseinit()},_destroy:function(){this._mousedestroy();var e,i=function(e){t(e).removeclass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removedata("resizable").removedata("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementiswrapper&&(i(this.element),e=this.element,this.originalelement.css({position:e.css("position"),width:e.outerwidth(),height:e.outerheight(),top:e.css("top"),left:e.css("left")}).insertafter(e),e.remove()),this.originalelement.css("resize",this.originalresizestyle),i(this.originalelement),this},_mousecapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mousestart:function(i){var s,n,o,a=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderproxy(),s=e(this.helper.css("left")),n=e(this.helper.css("top")),a.containment&&(s+=t(a.containment).scrollleft()||0,n+=t(a.containment).scrolltop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerwidth(),height:h.outerheight()}:{width:h.width(),height:h.height()},this.originalsize=this._helper?{width:h.outerwidth(),height:h.outerheight()}:{width:h.width(),height:h.height()},this.originalposition={left:s,top:n},this.sizediff={width:h.outerwidth()-h.width(),height:h.outerheight()-h.height()},this.originalmouseposition={left:i.pagex,top:i.pagey},this.aspectratio="number"==typeof a.aspectratio?a.aspectratio:this.originalsize.width/this.originalsize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),h.addclass("ui-resizable-resizing"),this._propagate("start",i),!0},_mousedrag:function(e){var i,s=this.helper,n={},o=this.originalmouseposition,a=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pagex-o.left||0,d=e.pagey-o.top||0,p=this._change[a];return p?(i=p.apply(this,[e,u,d]),this._updatevirtualboundaries(e.shiftkey),(this._aspectratio||e.shiftkey)&&(i=this._updateratio(i,e)),i=this._respectsize(i,e),this._updatecache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyresizeelements.length&&this._proportionallyresize(),t.isemptyobject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mousestop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyresizeelements,s=i.length&&/textarea/i.test(i[0].nodename),n=s&&t.ui.hasscroll(i[0],"left")?0:c.sizediff.height,o=s?0:c.sizediff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseint(c.element.css("left"),10)+(c.position.left-c.originalposition.left)||null,h=parseint(c.element.css("top"),10)+(c.position.top-c.originalposition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyresize()),t("body").css("cursor","auto"),this.element.removeclass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatevirtualboundaries:function(t){var e,s,n,o,a,r=this.options;a={minwidth:i(r.minwidth)?r.minwidth:0,maxwidth:i(r.maxwidth)?r.maxwidth:1/0,minheight:i(r.minheight)?r.minheight:0,maxheight:i(r.maxheight)?r.maxheight:1/0},(this._aspectratio||t)&&(e=a.minheight*this.aspectratio,n=a.minwidth/this.aspectratio,s=a.maxheight*this.aspectratio,o=a.maxwidth/this.aspectratio,e>a.minwidth&&(a.minwidth=e),n>a.minheight&&(a.minheight=n),a.maxwidth>s&&(a.maxwidth=s),a.maxheight>o&&(a.maxheight=o)),this._vboundaries=a},_updatecache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateratio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectratio:i(t.width)&&(t.height=t.width/this.aspectratio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectsize:function(t){var e=this._vboundaries,s=this.axis,n=i(t.width)&&e.maxwidth&&e.maxwidtht.width,r=i(t.height)&&e.minheight&&e.minheight>t.height,h=this.originalposition.left+this.originalsize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return a&&(t.width=e.minwidth),r&&(t.height=e.minheight),n&&(t.width=e.maxwidth),o&&(t.height=e.maxheight),a&&c&&(t.left=h-e.minwidth),n&&c&&(t.left=h-e.maxwidth),r&&u&&(t.top=l-e.minheight),o&&u&&(t.top=l-e.maxheight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyresize:function(){if(this._proportionallyresizeelements.length){var t,e,i,s,n,o=this.helper||this.element;for(t=0;this._proportionallyresizeelements.length>t;t++){if(n=this._proportionallyresizeelements[t],!this.borderdif)for(this.borderdif=[],i=[n.css("bordertopwidth"),n.css("borderrightwidth"),n.css("borderbottomwidth"),n.css("borderleftwidth")],s=[n.css("paddingtop"),n.css("paddingright"),n.css("paddingbottom"),n.css("paddingleft")],e=0;i.length>e;e++)this.borderdif[e]=(parseint(i[e],10)||0)+(parseint(s[e],10)||0);n.css({height:o.height()-this.borderdif[0]-this.borderdif[2]||0,width:o.width()-this.borderdif[1]-this.borderdif[3]||0})}}},_renderproxy:function(){var e=this.element,i=this.options;this.elementoffset=e.offset(),this._helper?(this.helper=this.helper||t("
"),this.helper.addclass(this._helper).css({width:this.element.outerwidth()-1,height:this.element.outerheight()-1,position:"absolute",left:this.elementoffset.left+"px",top:this.elementoffset.top+"px",zindex:++i.zindex}),this.helper.appendto("body").disableselection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalsize.width+e}},w:function(t,e){var i=this.originalsize,s=this.originalposition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalsize,n=this.originalposition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalsize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,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}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyresizeelements,o=n.length&&/textarea/i.test(n[0].nodename),a=o&&t.ui.hasscroll(n[0],"left")?0:i.sizediff.height,r=o?0:i.sizediff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseint(i.element.css("left"),10)+(i.position.left-i.originalposition.left)||null,c=parseint(i.element.css("top"),10)+(i.position.top-i.originalposition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateduration,easing:s.animateeasing,step:function(){var s={width:parseint(i.element.css("width"),10),height:parseint(i.element.css("height"),10),top:parseint(i.element.css("top"),10),left:parseint(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updatecache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,o,a,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerelement=t(p),/document/.test(d)||d===document?(l.containeroffset={left:0,top:0},l.containerposition={left:0,top:0},l.parentdata={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentnode.scrollheight}):(i=t(p),s=[],t(["top","right","left","bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containeroffset=i.offset(),l.containerposition=i.position(),l.containersize={height:i.innerheight()-s[3],width:i.innerwidth()-s[1]},n=l.containeroffset,o=l.containersize.height,a=l.containersize.width,r=t.ui.hasscroll(p,"left")?p.scrollwidth:a,h=t.ui.hasscroll(p)?p.scrollheight:o,l.parentdata={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,o,a=t(this).data("ui-resizable"),r=a.options,h=a.containeroffset,l=a.position,c=a._aspectratio||e.shiftkey,u={top:0,left:0},d=a.containerelement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectratio),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectratio),a.position.top=a._helper?h.top:0),a.offset.left=a.parentdata.left+a.position.left,a.offset.top=a.parentdata.top+a.position.top,i=math.abs((a._helper?a.offset.left-u.left:a.offset.left-u.left)+a.sizediff.width),s=math.abs((a._helper?a.offset.top-u.top:a.offset.top-h.top)+a.sizediff.height),n=a.containerelement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerelement.css("position")),n&&o&&(i-=a.parentdata.left),i+a.size.width>=a.parentdata.width&&(a.size.width=a.parentdata.width-i,c&&(a.size.height=a.size.width/a.aspectratio)),s+a.size.height>=a.parentdata.height&&(a.size.height=a.parentdata.height-s,c&&(a.size.width=a.size.height*a.aspectratio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containeroffset,n=e.containerposition,o=e.containerelement,a=t(e.helper),r=a.offset(),h=a.outerwidth()-e.sizediff.width,l=a.outerheight()-e.sizediff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoresize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseint(e.width(),10),height:parseint(e.height(),10),left:parseint(e.css("left"),10),top:parseint(e.css("top"),10)})})};"object"!=typeof i.alsoresize||i.alsoresize.parentnode?s(i.alsoresize):i.alsoresize.length?(i.alsoresize=i.alsoresize[0],s(i.alsoresize)):t.each(i.alsoresize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,o=s.originalsize,a=s.originalposition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),o={},a=s&&s.length?s:e.parents(i.originalelement[0]).length?["width","height"]:["width","height","top","left"];t.each(a,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof n.alsoresize||n.alsoresize.nodetype?h(n.alsoresize):t.each(n.alsoresize,function(t,e){h(t,e)})},stop:function(){t(this).removedata("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalelement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addclass("ui-resizable-ghost").addclass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendto(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removechild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalsize,o=e.originalposition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=math.round((s.width-n.width)/h)*h,u=math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxwidth&&d>i.maxwidth,g=i.maxheight&&p>i.maxheight,m=i.minwidth&&i.minwidth>d,v=i.minheight&&i.minheight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):(e.size.width=d,e.size.height=p,e.position.top=o.top-u,e.position.left=o.left-c)}})}(jquery),function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.3",options:{appendto:"body",autorefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addclass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addclass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerwidth(),bottom:i.top+e.outerheight(),startselected:!1,selected:e.hasclass("ui-selected"),selecting:e.hasclass("ui-selecting"),unselecting:e.hasclass("ui-unselecting")})})},this.refresh(),this.selectees=e.addclass("ui-selectee"),this._mouseinit(),this.helper=t("
")},_destroy:function(){this.selectees.removeclass("ui-selectee").removedata("selectable-item"),this.element.removeclass("ui-selectable ui-selectable-disabled"),this._mousedestroy()},_mousestart:function(e){var i=this,s=this.options;this.opos=[e.pagex,e.pagey],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendto).append(this.helper),this.helper.css({left:e.pagex,top:e.pagey,width:0,height:0}),s.autorefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metakey||e.ctrlkey||(s.$element.removeclass("ui-selected"),s.selected=!1,s.$element.addclass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addback().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metakey&&!e.ctrlkey||!n.$element.hasclass("ui-selected"),n.$element.removeclass(s?"ui-unselecting":"ui-selected").addclass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):undefined}))},_mousedrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pagex,h=e.pagey;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||o>i.right||i.top>h||a>i.bottom):"fit"===n.tolerance&&(l=i.left>o&&r>i.right&&i.top>a&&h>i.bottom),l?(i.selected&&(i.$element.removeclass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeclass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addclass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metakey||e.ctrlkey)&&i.startselected?(i.$element.removeclass("ui-selecting"),i.selecting=!1,i.$element.addclass("ui-selected"),i.selected=!0):(i.$element.removeclass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addclass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metakey||e.ctrlkey||i.startselected||(i.$element.removeclass("ui-selected"),i.selected=!1,i.$element.addclass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mousestop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeclass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeclass("ui-selecting").addclass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}(jquery),function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",widgeteventprefix:"sort",ready:!1,options:{appendto:"parent",axis:!1,connectwith:!1,containment:!1,cursor:"auto",cursorat:!1,droponempty:!0,forceplaceholdersize:!1,forcehelpersize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollsensitivity:20,scrollspeed:20,scope:"default",tolerance:"intersect",zindex:1e3,activate:null,beforestop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containercache={},this.element.addclass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseinit(),this.ready=!0},_destroy:function(){this.element.removeclass("ui-sortable ui-sortable-disabled"),this._mousedestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removedata(this.widgetname+"-item");return this},_setoption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleclass("ui-sortable-disabled",!!i)):t.widget.prototype._setoption.apply(this,arguments)},_mousecapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshitems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetname+"-item")===o?(s=t(this),!1):undefined}),t.data(e.target,o.widgetname+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addback().each(function(){this===e.target&&(n=!0)}),n)?(this.currentitem=s,this._removecurrentsfromitems(),!0):!1:!1)},_mousestart:function(e,i,s){var n,o,a=this.options;if(this.currentcontainer=this,this.refreshpositions(),this.helper=this._createhelper(e),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},t.extend(this.offset,{click:{left:e.pagex-this.offset.left,top:e.pagey-this.offset.top},parent:this._getparentoffset(),relative:this._getrelativeoffset()}),this.helper.css("position","absolute"),this.cssposition=this.helper.css("position"),this.originalposition=this._generateposition(e),this.originalpagex=e.pagex,this.originalpagey=e.pagey,a.cursorat&&this._adjustoffsetfromhelper(a.cursorat),this.domposition={prev:this.currentitem.prev()[0],parent:this.currentitem.parent()[0]},this.helper[0]!==this.currentitem[0]&&this.currentitem.hide(),this._createplaceholder(),a.containment&&this._setcontainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedcursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedstylesheet=t("").appendto(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedopacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zindex&&(this.helper.css("zindex")&&(this._storedzindex=this.helper.css("zindex")),this.helper.css("zindex",a.zindex)),this.scrollparent[0]!==document&&"html"!==this.scrollparent[0].tagname&&(this.overflowoffset=this.scrollparent.offset()),this._trigger("start",e,this._uihash()),this._preservehelperproportions||this._cachehelperproportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uihash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropbehaviour&&t.ui.ddmanager.prepareoffsets(this,e),this.dragging=!0,this.helper.addclass("ui-sortable-helper"),this._mousedrag(e),!0},_mousedrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generateposition(e),this.positionabs=this._convertpositionto("absolute"),this.lastpositionabs||(this.lastpositionabs=this.positionabs),this.options.scroll&&(this.scrollparent[0]!==document&&"html"!==this.scrollparent[0].tagname?(this.overflowoffset.top+this.scrollparent[0].offsetheight-e.pagey=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectswithpointer(s),o&&s.instance===this.currentcontainer&&n!==this.currentitem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectswithsides(s))break; this._rearrange(e,s),this._trigger("change",e,this._uihash());break}return this._contactcontainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uihash()),this.lastpositionabs=this.positionabs,!1},_mousestop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropbehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetparent[0]===document.body?0:this.offsetparent[0].scrollleft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetparent[0]===document.body?0:this.offsetparent[0].scrolltop)),this.reverting=!0,t(this.helper).animate(a,parseint(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseup({target:null}),"original"===this.options.helper?this.currentitem.css(this._storedcss).removeclass("ui-sortable-helper"):this.currentitem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uihash(this)),this.containers[e].containercache.over&&(this.containers[e]._trigger("out",null,this._uihash(this)),this.containers[e].containercache.over=0)}return this.placeholder&&(this.placeholder[0].parentnode&&this.placeholder[0].parentnode.removechild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentnode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_nofinalsort:null}),this.domposition.prev?t(this.domposition.prev).after(this.currentitem):t(this.domposition.parent).prepend(this.currentitem)),this},serialize:function(e){var i=this._getitemsasjquery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toarray:function(e){var i=this._getitemsasjquery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectswith:function(t){var e=this.positionabs.left,i=e+this.helperproportions.width,s=this.positionabs.top,n=s+this.helperproportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcepointerforcontainers||"pointer"!==this.options.tolerance&&this.helperproportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperproportions.width/2>o&&a>i-this.helperproportions.width/2&&s+this.helperproportions.height/2>r&&h>n-this.helperproportions.height/2},_intersectswithpointer:function(t){var i="x"===this.options.axis||e(this.positionabs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionabs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getdragverticaldirection(),a=this._getdraghorizontaldirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectswithsides:function(t){var i=e(this.positionabs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionabs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getdragverticaldirection(),o=this._getdraghorizontaldirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getdragverticaldirection:function(){var t=this.positionabs.top-this.lastpositionabs.top;return 0!==t&&(t>0?"down":"up")},_getdraghorizontaldirection:function(){var t=this.positionabs.left-this.lastpositionabs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshitems(t),this.refreshpositions(),this},_connectwith:function(){var t=this.options;return t.connectwith.constructor===string?[t.connectwith]:t.connectwith},_getitemsasjquery:function(e){var i,s,n,o,a=[],r=[],h=this._connectwith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetfullname),o&&o!==this&&!o.options.disabled&&r.push([t.isfunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(r.push([t.isfunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentitem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(function(){a.push(this)});return t(a)},_removecurrentsfromitems:function(){var e=this.currentitem.find(":data("+this.widgetname+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshitems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isfunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentitem}):t(this.options.items,this.element),this]],d=this._connectwith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetfullname),o&&o!==this&&!o.options.disabled&&(u.push([t.isfunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentitem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetname+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshpositions:function(e){this.offsetparent&&this.helper&&(this.offset.parent=this._getparentoffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentcontainer&&this.currentcontainer&&s.item[0]!==this.currentitem[0]||(n=this.options.toleranceelement?t(this.options.toleranceelement,s.item):s.item,e||(s.width=n.outerwidth(),s.height=n.outerheight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshcontainers)this.options.custom.refreshcontainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containercache.left=o.left,this.containers[i].containercache.top=o.top,this.containers[i].containercache.width=this.containers[i].element.outerwidth(),this.containers[i].containercache.height=this.containers[i].element.outerheight();return this},_createplaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==string||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentitem[0].nodename.tolowercase(),n=t("<"+s+">",e.document[0]).addclass(i||e.currentitem[0].classname+" ui-sortable-placeholder").removeclass("ui-sortable-helper");return"tr"===s?e.currentitem.children().each(function(){t(" ",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendto(n)}):"img"===s&&n.attr("src",e.currentitem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forceplaceholdersize)&&(n.height()||n.height(e.currentitem.innerheight()-parseint(e.currentitem.css("paddingtop")||0,10)-parseint(e.currentitem.css("paddingbottom")||0,10)),n.width()||n.width(e.currentitem.innerwidth()-parseint(e.currentitem.css("paddingleft")||0,10)-parseint(e.currentitem.css("paddingright")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentitem)),e.currentitem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactcontainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentitem[0],this.containers[n].element[0]))if(this._intersectswith(this.containers[n].containercache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containercache.over&&(this.containers[n]._trigger("out",s,this._uihash(this)),this.containers[n].containercache.over=0);if(f)if(1===this.containers.length)this.containers[g].containercache.over||(this.containers[g]._trigger("over",s,this._uihash(this)),this.containers[g].containercache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentitem),h=p?"left":"top",l=p?"width":"height",c=this.positionabs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentitem[0]&&(!p||e(this.positionabs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,math.abs(u-c)>math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>math.abs(u-c)&&(a=math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.droponempty)return;if(this.currentcontainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[g].element,!0),this._trigger("change",s,this._uihash()),this.containers[g]._trigger("change",s,this._uihash(this)),this.currentcontainer=this.containers[g],this.options.placeholder.update(this.currentcontainer,this.placeholder),this.containers[g]._trigger("over",s,this._uihash(this)),this.containers[g].containercache.over=1}},_createhelper:function(e){var i=this.options,s=t.isfunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentitem])):"clone"===i.helper?this.currentitem.clone():this.currentitem;return s.parents("body").length||t("parent"!==i.appendto?i.appendto:this.currentitem[0].parentnode)[0].appendchild(s[0]),s[0]===this.currentitem[0]&&(this._storedcss={width:this.currentitem[0].style.width,height:this.currentitem[0].style.height,position:this.currentitem.css("position"),top:this.currentitem.css("top"),left:this.currentitem.css("left")}),(!s[0].style.width||i.forcehelpersize)&&s.width(this.currentitem.width()),(!s[0].style.height||i.forcehelpersize)&&s.height(this.currentitem.height()),s},_adjustoffsetfromhelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isarray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperproportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperproportions.height-e.bottom+this.margins.top)},_getparentoffset:function(){this.offsetparent=this.helper.offsetparent();var e=this.offsetparent.offset();return"absolute"===this.cssposition&&this.scrollparent[0]!==document&&t.contains(this.scrollparent[0],this.offsetparent[0])&&(e.left+=this.scrollparent.scrollleft(),e.top+=this.scrollparent.scrolltop()),(this.offsetparent[0]===document.body||this.offsetparent[0].tagname&&"html"===this.offsetparent[0].tagname.tolowercase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseint(this.offsetparent.css("bordertopwidth"),10)||0),left:e.left+(parseint(this.offsetparent.css("borderleftwidth"),10)||0)}},_getrelativeoffset:function(){if("relative"===this.cssposition){var t=this.currentitem.position();return{top:t.top-(parseint(this.helper.css("top"),10)||0)+this.scrollparent.scrolltop(),left:t.left-(parseint(this.helper.css("left"),10)||0)+this.scrollparent.scrollleft()}}return{top:0,left:0}},_cachemargins:function(){this.margins={left:parseint(this.currentitem.css("marginleft"),10)||0,top:parseint(this.currentitem.css("margintop"),10)||0}},_cachehelperproportions:function(){this.helperproportions={width:this.helper.outerwidth(),height:this.helper.outerheight()}},_setcontainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentnode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperproportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentnode.scrollheight)-this.helperproportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseint(t(e).css("borderleftwidth"),10)||0)+(parseint(t(e).css("paddingleft"),10)||0)-this.margins.left,i.top+(parseint(t(e).css("bordertopwidth"),10)||0)+(parseint(t(e).css("paddingtop"),10)||0)-this.margins.top,i.left+(s?math.max(e.scrollwidth,e.offsetwidth):e.offsetwidth)-(parseint(t(e).css("borderleftwidth"),10)||0)-(parseint(t(e).css("paddingright"),10)||0)-this.helperproportions.width-this.margins.left,i.top+(s?math.max(e.scrollheight,e.offsetheight):e.offsetheight)-(parseint(t(e).css("bordertopwidth"),10)||0)-(parseint(t(e).css("paddingbottom"),10)||0)-this.helperproportions.height-this.margins.top])},_convertpositionto:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssposition||this.scrollparent[0]!==document&&t.contains(this.scrollparent[0],this.offsetparent[0])?this.scrollparent:this.offsetparent,o=/(html|body)/i.test(n[0].tagname);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssposition?-this.scrollparent.scrolltop():o?0:n.scrolltop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssposition?-this.scrollparent.scrollleft():o?0:n.scrollleft())*s}},_generateposition:function(e){var i,s,n=this.options,o=e.pagex,a=e.pagey,r="absolute"!==this.cssposition||this.scrollparent[0]!==document&&t.contains(this.scrollparent[0],this.offsetparent[0])?this.scrollparent:this.offsetparent,h=/(html|body)/i.test(r[0].tagname);return"relative"!==this.cssposition||this.scrollparent[0]!==document&&this.scrollparent[0]!==this.offsetparent[0]||(this.offset.relative=this._getrelativeoffset()),this.originalposition&&(this.containment&&(e.pagex-this.offset.click.leftthis.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pagey-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalpagey+math.round((a-this.originalpagey)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalpagex+math.round((o-this.originalpagex)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssposition?-this.scrollparent.scrolltop():h?0:r.scrolltop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssposition?-this.scrollparent.scrollleft():h?0:r.scrollleft())}},_rearrange:function(t,e,i,s){i?i[0].appendchild(this.placeholder[0]):e.item[0].parentnode.insertbefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextsibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshpositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._nofinalsort&&this.currentitem.parent().length&&this.placeholder.before(this.currentitem),this._nofinalsort=null,this.helper[0]===this.currentitem[0]){for(i in this._storedcss)("auto"===this._storedcss[i]||"static"===this._storedcss[i])&&(this._storedcss[i]="");this.currentitem.css(this._storedcss).removeclass("ui-sortable-helper")}else this.currentitem.show();for(this.fromoutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uihash(this.fromoutside))}),!this.fromoutside&&this.domposition.prev===this.currentitem.prev().not(".ui-sortable-helper")[0]&&this.domposition.parent===this.currentitem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uihash())}),this!==this.currentcontainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uihash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uihash(this))}}.call(this,this.currentcontainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uihash(this))}}.call(this,this.currentcontainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uihash(this))}}.call(this,this.containers[i])),this.containers[i].containercache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uihash(this))}}.call(this,this.containers[i])),this.containers[i].containercache.over=0);if(this.storedcursor&&(this.document.find("body").css("cursor",this.storedcursor),this.storedstylesheet.remove()),this._storedopacity&&this.helper.css("opacity",this._storedopacity),this._storedzindex&&this.helper.css("zindex","auto"===this._storedzindex?"":this._storedzindex),this.dragging=!1,this.cancelhelperremoval){if(!e){for(this._trigger("beforestop",t,this._uihash()),i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uihash())}return this.fromoutside=!1,!1}if(e||this._trigger("beforestop",t,this._uihash()),this.placeholder[0].parentnode.removechild(this.placeholder[0]),this.helper[0]!==this.currentitem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uihash())}return this.fromoutside=!1,!0},_trigger:function(){t.widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uihash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalposition:i.originalposition,offset:i.positionabs,item:i.currentitem,sender:e?e.element:null}}})}(jquery),function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parsefloat(t),isnan(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.tolowercase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundcolor borderbottomcolor borderleftcolor borderrightcolor bordertopcolor color columnrulecolor outlinecolor textdecorationcolor textemphasiscolor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseint(t[1],16),parseint(t[2],16),parseint(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseint(t[1]+t[1],16),parseint(t[2]+t[2],16),parseint(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.color=function(e,i,s,n){return new t.color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("

")[0],f=t.each;p.style.csstext="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundcolor.indexof("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodetype)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inarray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},torgbastring:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},tohslastring:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},tohexstring:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).tostring(16),1===t.length?"0"+t:t}).join("")},tostring:function(){return 0===this._rgba[3]?"transparent":this.torgbastring()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=math.max(s,n,o),h=math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[math.round(255*n(r,a,e+1/3)),math.round(255*n(r,a,e)),math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parsefloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.csshooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundcolor"===i?e.parentnode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundcolor"),a=a.parentnode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.torgbastring()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorinit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorinit=!0),t.csshooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.csshooks.bordercolor={expand:function(t){var e={};return f(["top","right","bottom","left"],function(i,s){e["border"+s+"color"]=t}),e}},o=t.color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jquery),function(){function i(e){var i,s,n=e.ownerdocument.defaultview?e.ownerdocument.defaultview.getcomputedstyle(e,null):e.currentstyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelcase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function s(e,i){var s,n,a={};for(s in i)n=i[s],e[s]!==n&&(o[s]||(t.fx.step[s]||!isnan(parsefloat(n)))&&(a[s]=n));return a}var n=["add","remove","toggle"],o={border:1,borderbottom:1,bordercolor:1,borderleft:1,borderright:1,bordertop:1,borderwidth:1,margin:1,padding:1};t.each(["borderleftstyle","borderrightstyle","borderbottomstyle","bordertopstyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setattr||1===t.pos&&!t.setattr)&&(jquery.style(t.elem,i,t.end),t.setattr=!0)}}),t.fn.addback||(t.fn.addback=function(t){return this.add(null==t?this.prevobject:this.prevobject.filter(t))}),t.effects.animateclass=function(e,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addback():a;l=l.map(function(){var e=t(this);return{el:e,start:i(this)}}),o=function(){t.each(n,function(t,i){e[i]&&a[i+"class"](e[i])})},o(),l=l.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addclass:function(e){return function(i,s,n,o){return s?t.effects.animateclass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addclass),removeclass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateclass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeclass),toggleclass:function(i){return function(s,n,o,a,r){return"boolean"==typeof n||n===e?o?t.effects.animateclass.call(this,n?{add:s}:{remove:s},o,a,r):i.apply(this,arguments):t.effects.animateclass.call(this,{toggle:s},n,o,a)}}(t.fn.toggleclass),switchclass:function(e,i,s,n,o){return t.effects.animateclass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function s(e,i,s,n){return t.isplainobject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isfunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isfunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isfunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.3",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,o;for(o=0;s.length>o;o++)null!==s[o]&&(n=t.data(i+s[o]),n===e&&(n=""),t.css(s[o],n))},setmode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getbaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createwrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerwidth(!0),height:e.outerheight(!0),"float":e.css("float")},s=t("

").addclass("ui-effects-wrapper").css({fontsize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeelement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zindex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isnan(parseint(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removewrapper:function(e){var i=document.activeelement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replacewith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},settransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssunit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isfunction(o)&&o.call(n[0]),t.isfunction(e)&&e()}var n=t(this),o=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):a.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,o=i.queue,a=t.effects.effect[i.effect];return t.fx.off||!a?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):o===!1?this.each(e):this.queue(o||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssunit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexof(e)>0&&(s=[parsefloat(i),e])}),s}})}(),function(){var e={};t.each(["quad","cubic","quart","quint","expo"],function(t,i){e[i]=function(e){return math.pow(e,t+2)}}),t.extend(e,{sine:function(t){return 1-math.cos(t*math.pi/2)},circ:function(t){return 1-math.sqrt(1-t*t)},elastic:function(t){return 0===t||1===t?t:-math.pow(2,8*(t-1))*math.sin((80*(t-1)-7.5)*math.pi/15)},back:function(t){return t*t*(3*t-2)},bounce:function(t){for(var e,i=4;((e=math.pow(2,--i))-1)/11>t;);return 1/math.pow(4,3-i)-7.5625*math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easein"+e]=i,t.easing["easeout"+e]=function(t){return 1-i(1-t)},t.easing["easeinout"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()}(jquery),function(t){var e=0,i={},s={};i.height=i.paddingtop=i.paddingbottom=i.bordertopwidth=i.borderbottomwidth="hide",s.height=s.paddingtop=s.paddingbottom=s.bordertopwidth=s.borderbottomwidth="show",t.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightstyle:"auto",icons:{activeheader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeactivate:null},_create:function(){var e=this.options;this.prevshow=this.prevhide=t(),this.element.addclass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processpanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getcreateeventdata:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createicons:function(){var e=this.options.icons;e&&(t("").addclass("ui-accordion-header-icon ui-icon "+e.header).prependto(this.headers),this.active.children(".ui-accordion-header-icon").removeclass(e.header).addclass(e.activeheader),this.headers.addclass("ui-accordion-icons")) },_destroyicons:function(){this.headers.removeclass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeclass("ui-accordion ui-widget ui-helper-reset").removeattr("role"),this.headers.removeclass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeattr("role").removeattr("aria-selected").removeattr("aria-controls").removeattr("tabindex").each(function(){/^ui-accordion/.test(this.id)&&this.removeattribute("id")}),this._destroyicons(),t=this.headers.next().css("display","").removeattr("role").removeattr("aria-expanded").removeattr("aria-hidden").removeattr("aria-labelledby").removeclass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeattribute("id")}),"content"!==this.options.heightstyle&&t.css("height","")},_setoption:function(t,e){return"active"===t?(this._activate(e),undefined):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupevents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyicons(),e&&this._createicons()),"disabled"===t&&this.headers.add(this.headers.next()).toggleclass("ui-state-disabled",!!e),undefined)},_keydown:function(e){if(!e.altkey&&!e.ctrlkey){var i=t.ui.keycode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keycode){case i.right:case i.down:o=this.headers[(n+1)%s];break;case i.left:case i.up:o=this.headers[(n-1+s)%s];break;case i.space:case i.enter:this._eventhandler(e);break;case i.home:o=this.headers[0];break;case i.end:o=this.headers[s-1]}o&&(t(e.target).attr("tabindex",-1),t(o).attr("tabindex",0),o.focus(),e.preventdefault())}},_panelkeydown:function(e){e.keycode===t.ui.keycode.up&&e.ctrlkey&&t(e.currenttarget).prev().focus()},refresh:function(){var e=this.options;this._processpanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyicons(),this._refresh()},_processpanels:function(){this.headers=this.element.find(this.options.header).addclass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addclass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,s=this.options,n=s.heightstyle,o=this.element.parent(),a=this.accordionid="ui-accordion-"+(this.element.attr("id")||++e);this.active=this._findactive(s.active).addclass("ui-accordion-header-active ui-state-active ui-corner-top").removeclass("ui-corner-all"),this.active.next().addclass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),s=i.attr("id"),n=i.next(),o=n.attr("id");s||(s=a+"-header-"+e,i.attr("id",s)),o||(o=a+"-panel-"+e,n.attr("id",o)),i.attr("aria-controls",o),n.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabindex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabindex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabindex",0),this._createicons(),this._setupevents(s.event),"fill"===n?(i=o.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerheight(!0))}),this.headers.each(function(){i-=t(this).outerheight(!0)}),this.headers.next().each(function(){t(this).height(math.max(0,i-t(this).innerheight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(i=0,this.headers.next().each(function(){i=math.max(i,t(this).css("height","").height())}).height(i))},_activate:function(e){var i=this._findactive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventhandler({target:i,currenttarget:i,preventdefault:t.noop}))},_findactive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupevents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventhandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelkeydown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventhandler:function(e){var i=this.options,s=this.active,n=t(e.currenttarget),o=n[0]===s[0],a=o&&i.collapsible,r=a?t():n.next(),h=s.next(),l={oldheader:s,oldpanel:h,newheader:a?t():n,newpanel:r};e.preventdefault(),o&&!i.collapsible||this._trigger("beforeactivate",e,l)===!1||(i.active=a?!1:this.headers.index(n),this.active=o?t():n,this._toggle(l),s.removeclass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeclass(i.icons.activeheader).addclass(i.icons.header),o||(n.removeclass("ui-corner-all").addclass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeclass(i.icons.header).addclass(i.icons.activeheader),n.next().addclass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newpanel,s=this.prevshow.length?this.prevshow:e.oldpanel;this.prevshow.add(this.prevhide).stop(!0,!0),this.prevshow=i,this.prevhide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._togglecomplete(e)),s.attr({"aria-expanded":"false","aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr("tabindex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabindex")}).attr("tabindex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabindex:0})},_animate:function(t,e,n){var o,a,r,h=this,l=0,c=t.length&&(!e.length||t.index()",options:{appendto:null,autofocus:!1,delay:300,minlength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s,n=this.element[0].nodename.tolowercase(),o="textarea"===n,a="input"===n;this.ismultiline=o?!0:a?!1:this.element.prop("iscontenteditable"),this.valuemethod=this.element[o||a?"val":"text"],this.isnewmenu=!0,this.element.addclass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readonly"))return e=!0,s=!0,i=!0,undefined;e=!1,s=!1,i=!1;var o=t.ui.keycode;switch(n.keycode){case o.page_up:e=!0,this._move("previouspage",n);break;case o.page_down:e=!0,this._move("nextpage",n);break;case o.up:e=!0,this._keyevent("previous",n);break;case o.down:e=!0,this._keyevent("next",n);break;case o.enter:case o.numpad_enter:this.menu.active&&(e=!0,n.preventdefault(),this.menu.select(n));break;case o.tab:this.menu.active&&this.menu.select(n);break;case o.escape:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventdefault());break;default:i=!0,this._searchtimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.ismultiline||this.menu.element.is(":visible"))&&s.preventdefault(),undefined;if(!i){var n=t.ui.keycode;switch(s.keycode){case n.page_up:this._move("previouspage",s);break;case n.page_down:this._move("nextpage",s);break;case n.up:this._keyevent("previous",s);break;case n.down:this._keyevent("next",s)}}},input:function(t){return s?(s=!1,t.preventdefault(),undefined):(this._searchtimeout(t),undefined)},focus:function(){this.selecteditem=null,this.previous=this._value()},blur:function(t){return this.cancelblur?(delete this.cancelblur,undefined):(cleartimeout(this.searching),this.close(t),this._change(t),undefined)}}),this._initsource(),this.menu=t("