/*! jquery ui - v1.12.1 - 2018-12-23 * http://jqueryui.com * includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/selectable.js, widgets/sortable.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/selectmenu.js, widgets/slider.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js * copyright jquery foundation and other contributors; licensed mit */ (function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jquery)})(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseint(t.css("zindex"),10),!isnan(i)&&0!==i))return i;t=t.parent()}return 0}function s(){this._curinst=null,this._keyevent=!1,this._disabledinputs=[],this._datepickershowing=!1,this._indialog=!1,this._maindivid="ui-datepicker-div",this._inlineclass="ui-datepicker-inline",this._appendclass="ui-datepicker-append",this._triggerclass="ui-datepicker-trigger",this._dialogclass="ui-datepicker-dialog",this._disableclass="ui-datepicker-disabled",this._unselectableclass="ui-datepicker-unselectable",this._currentclass="ui-datepicker-current-day",this._dayoverclass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closetext:"done",prevtext:"prev",nexttext:"next",currenttext:"today",monthnames:["january","february","march","april","may","june","july","august","september","october","november","december"],monthnamesshort:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],daynames:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],daynamesshort:["sun","mon","tue","wed","thu","fri","sat"],daynamesmin:["su","mo","tu","we","th","fr","sa"],weekheader:"wk",dateformat:"mm/dd/yy",firstday:0,isrtl:!1,showmonthafteryear:!1,yearsuffix:""},this._defaults={showon:"focus",showanim:"fadein",showoptions:{},defaultdate:null,appendtext:"",buttontext:"...",buttonimage:"",buttonimageonly:!1,hideifnoprevnext:!1,navigationasdateformat:!1,gotocurrent:!1,changemonth:!1,changeyear:!1,yearrange:"c-10:c+10",showothermonths:!1,selectothermonths:!1,showweek:!1,calculateweek:this.iso8601week,shortyearcutoff:"+10",mindate:null,maxdate:null,duration:"fast",beforeshowday:null,beforeshow:null,onselect:null,onchangemonthyear:null,onclose:null,numberofmonths:1,showcurrentatpos:0,stepmonths:1,stepbigmonths:12,altfield:"",altformat:"",constraininput:!0,showbuttonpanel:!1,autosize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-us"]=t.extend(!0,{},this.regional.en),this.dpdiv=n(t("
"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeclass("ui-state-hover"),-1!==this.classname.indexof("ui-datepicker-prev")&&t(this).removeclass("ui-datepicker-prev-hover"),-1!==this.classname.indexof("ui-datepicker-next")&&t(this).removeclass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isdisableddatepicker(p.inline?p.dpdiv.parent()[0]:p.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeclass("ui-state-hover"),t(this).addclass("ui-state-hover"),-1!==this.classname.indexof("ui-datepicker-prev")&&t(this).addclass("ui-datepicker-prev-hover"),-1!==this.classname.indexof("ui-datepicker-next")&&t(this).addclass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var h=0,l=array.prototype.slice;t.cleandata=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerhandler("remove")}catch(a){}e(i)}}(t.cleandata),t.widget=function(e,i,s){var n,o,a,r={},h=e.split(".")[0];e=e.split(".")[1];var l=h+"-"+e;return s||(s=i,i=t.widget),t.isarray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.tolowercase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return this._createwidget?(arguments.length&&this._createwidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childconstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isfunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superapply;return this._super=t,this._superapply=n,e=s.apply(this,arguments),this._super=i,this._superapply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgeteventprefix:n?a.widgeteventprefix||e:e},r,{constructor:o,namespace:h,widgetname:e,widgetfullname:l}),n?(t.each(n._childconstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetname,o,i._proto)}),delete n._childconstructors):i._childconstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=l.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasownproperty(i)&&void 0!==s&&(e[i]=t.isplainobject(s)?t.isplainobject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetfullname||e;t.fn[e]=function(n){var o="string"==typeof n,a=l.call(arguments,1),r=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(r=o,!1):o?t.isfunction(o[n])&&"_"!==n.charat(0)?(i=o[n].apply(o,a),i!==o&&void 0!==i?(r=i&&i.jquery?r.pushstack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+n+"'")}):r=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),r}},t.widget=function(){},t.widget._childconstructors=[],t.widget.prototype={widgetname:"widget",widgeteventprefix:"",defaultelement:"
",options:{classes:{},disabled:!1,create:null},_createwidget:function(e,i){i=t(i||this.defaultelement||this)[0],this.element=t(i),this.uuid=h++,this.eventnamespace="."+this.widgetname+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classeselementlookup={},i!==this&&(t.data(i,this.widgetfullname,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerdocument:i.document||i),this.window=t(this.document[0].defaultview||this.document[0].parentwindow)),this.options=t.widget.extend({},this.options,this._getcreateoptions(),e),this._create(),this.options.disabled&&this._setoptiondisabled(this.options.disabled),this._trigger("create",null,this._getcreateeventdata()),this._init()},_getcreateoptions:function(){return{}},_getcreateeventdata:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classeselementlookup,function(t,i){e._removeclass(i,t)}),this.element.off(this.eventnamespace).removedata(this.widgetfullname),this.widget().off(this.eventnamespace).removeattr("aria-disabled"),this.bindings.off(this.eventnamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setoptions(a),this},_setoptions:function(t){var e;for(e in t)this._setoption(e,t[e]);return this},_setoption:function(t,e){return"classes"===t&&this._setoptionclasses(e),this.options[t]=e,"disabled"===t&&this._setoptiondisabled(e),this},_setoptionclasses:function(e){var i,s,n;for(i in e)n=this.classeselementlookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeclass(n,i),s.addclass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setoptiondisabled:function(t){this._toggleclass(this.widget(),this.widgetfullname+"-disabled",null,!!t),t&&(this._removeclass(this.hoverable,null,"ui-state-hover"),this._removeclass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setoptions({disabled:!1})},disable:function(){return this._setoptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classeselementlookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classeselementlookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackclasseselement"}),e.keys&&i(e.keys.match(/\s+/g)||[],!0),e.extra&&i(e.extra.match(/\s+/g)||[]),s.join(" ")},_untrackclasseselement:function(e){var i=this;t.each(i.classeselementlookup,function(s,n){-1!==t.inarray(e.target,n)&&(i.classeselementlookup[s]=t(n.not(e.target).get()))})},_removeclass:function(t,e,i){return this._toggleclass(t,e,i,!1)},_addclass:function(t,e,i){return this._toggleclass(t,e,i,!0)},_toggleclass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleclass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasclass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventnamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventnamespace+" ")+this.eventnamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_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){this._addclass(t(e.currenttarget),null,"ui-state-hover")},mouseleave:function(e){this._removeclass(t(e.currenttarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addclass(t(e.currenttarget),null,"ui-state-focus")},focusout:function(e){this._removeclass(t(e.currenttarget),null,"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()})}}),t.widget,function(){function e(t,e,i){return[parsefloat(t[0])*(u.test(t[0])?e/100:1),parsefloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseint(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodetype?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.iswindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrolltop(),left:e.scrollleft()}}:i.preventdefault?{width:0,height:0,offset:{top:i.pagey,left:i.pagex}}:{width:e.outerwidth(),height:e.outerheight(),offset:e.offset()}}var n,o=math.max,a=math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarwidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetwidth,s.css("overflow","scroll"),i=o.offsetwidth,e===i&&(i=s[0].clientwidth),s.remove(),n=e-i},getscrollinfo:function(e){var i=e.iswindow||e.isdocument?"":e.element.css("overflow-x"),s=e.iswindow||e.isdocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(d,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.iswindow?s.scrollleft:s.offset.left,a=s.width,r=t.left-e.collisionposition.marginleft,h=n-r,l=r+e.collisionwidth-a-n;e.collisionwidth>a?h>0&&0>=l?(i=t.left+h+e.collisionwidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionwidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.iswindow?s.scrolltop:s.offset.top,a=e.within.height,r=t.top-e.collisionposition.margintop,h=n-r,l=r+e.collisionheight-a-n;e.collisionheight>a?h>0&&0>=l?(i=t.top+h+e.collisionheight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionheight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollleft,r=n.width,h=n.iswindow?n.scrollleft:n.offset.left,l=t.left-e.collisionposition.marginleft,c=l-h,u=l+e.collisionwidth-r-h,d="left"===e.my[0]?-e.elemwidth:"right"===e.my[0]?e.elemwidth:0,p="left"===e.at[0]?e.targetwidth:"right"===e.at[0]?-e.targetwidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionwidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionposition.marginleft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrolltop,r=n.height,h=n.iswindow?n.scrolltop:n.offset.top,l=t.top-e.collisionposition.margintop,c=l-h,u=l+e.collisionheight-r-h,d="top"===e.my[1],p=d?-e.elemheight:"bottom"===e.my[1]?e.elemheight:0,f="top"===e.at[1]?e.targetheight:"bottom"===e.at[1]?-e.targetheight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionheight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionposition.margintop+p+f+m-h,(i>0||u>a(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,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])}}),t.fn.extend({disableselection:function(){var t="onselectstart"in document.createelement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableselection",function(t){t.preventdefault()})}}(),enableselection:function(){return this.off(".ui-disableselection")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodename.tolowercase();return"area"===l?(n=i.parentnode,o=n.name,i.href&&o&&"map"===n.nodename.tolowercase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formresetmixin={_formresethandler:function(){var e=t(this);settimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindformresethandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formresethandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindformresethandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inarray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removedata("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["width","height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parsefloat(t.css(e,"padding"+this))||0,s&&(i-=parsefloat(t.css(e,"border"+this+"width"))||0),o&&(i-=parsefloat(t.css(e,"margin"+this))||0)}),i}var n="width"===i?["left","right"]:["top","bottom"],o=i.tolowercase(),a={innerwidth:t.fn.innerwidth,innerheight:t.fn.innerheight,outerwidth:t.fn.outerwidth,outerheight:t.fn.outerheight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addback=function(t){return this.add(null==t?this.prevobject:this.prevobject.filter(t))}),t.ui.keycode={backspace:8,comma:188,delete:46,down:40,end:35,enter:13,escape:27,home:36,left:37,page_down:34,page_up:33,period:190,right:39,space:32,tab:9,up:38},t.ui.escapeselector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushstack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeselector(s)+"']",n=n.add(o.find(i).addback(i))),this.pushstack(n))},t.fn.scrollparent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerdocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueid:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeuniqueid:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeattr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.useragent.tolowercase());var c=!1;t(document).on("mouseup",function(){c=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseinit:function(){var e=this;this.element.on("mousedown."+this.widgetname,function(t){return e._mousedown(t)}).on("click."+this.widgetname,function(i){return!0===t.data(i.target,e.widgetname+".preventclickevent")?(t.removedata(i.target,e.widgetname+".preventclickevent"),i.stopimmediatepropagation(),!1):void 0}),this.started=!1},_mousedestroy:function(){this.element.off("."+this.widgetname),this._mousemovedelegate&&this.document.off("mousemove."+this.widgetname,this._mousemovedelegate).off("mouseup."+this.widgetname,this._mouseupdelegate)},_mousedown:function(e){if(!c){this._mousemoved=!1,this._mousestarted&&this._mouseup(e),this._mousedownevent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodename?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mousecapture(e)?(this.mousedelaymet=!this.options.delay,this.mousedelaymet||(this._mousedelaytimer=settimeout(function(){i.mousedelaymet=!0},this.options.delay)),this._mousedistancemet(e)&&this._mousedelaymet(e)&&(this._mousestarted=this._mousestart(e)!==!1,!this._mousestarted)?(e.preventdefault(),!0):(!0===t.data(e.target,this.widgetname+".preventclickevent")&&t.removedata(e.target,this.widgetname+".preventclickevent"),this._mousemovedelegate=function(t){return i._mousemove(t)},this._mouseupdelegate=function(t){return i._mouseup(t)},this.document.on("mousemove."+this.widgetname,this._mousemovedelegate).on("mouseup."+this.widgetname,this._mouseupdelegate),e.preventdefault(),c=!0,!0)):!0}},_mousemove:function(e){if(this._mousemoved){if(t.ui.ie&&(!document.documentmode||9>document.documentmode)&&!e.button)return this._mouseup(e);if(!e.which)if(e.originalevent.altkey||e.originalevent.ctrlkey||e.originalevent.metakey||e.originalevent.shiftkey)this.ignoremissingwhich=!0;else if(!this.ignoremissingwhich)return this._mouseup(e)}return(e.which||e.button)&&(this._mousemoved=!0),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){this.document.off("mousemove."+this.widgetname,this._mousemovedelegate).off("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)),this._mousedelaytimer&&(cleartimeout(this._mousedelaytimer),delete this._mousedelaytimer),this.ignoremissingwhich=!1,c=!1,e.preventdefault()},_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}}),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,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentnode&&11!==t.element[0].parentnode.nodetype))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.ui.safeactiveelement=function(t){var e;try{e=t.activeelement}catch(i){e=t.body}return e||(e=t.body),e.nodename||(e=t.body),e},t.ui.safeblur=function(e){e&&"body"!==e.nodename.tolowercase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",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&&this._setpositionrelative(),this.options.addclasses&&this._addclass("ui-draggable"),this._sethandleclassname(),this._mouseinit()},_setoption:function(t,e){this._super(t,e),"handle"===t&&(this._removehandleclassname(),this._sethandleclassname())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyonclear=!0,void 0):(this._removehandleclassname(),this._mousedestroy(),void 0)},_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?(this._bluractiveelement(e),this._blockframes(i.iframefix===!0?"iframe":i.iframefix),!0):!1)},_blockframes:function(e){this.iframeblocks=this.document.find(e).map(function(){var e=t(this);return t("
").css("position","absolute").appendto(e.parent()).outerwidth(e.outerwidth()).outerheight(e.outerheight()).offset(e.offset())[0]})},_unblockframes:function(){this.iframeblocks&&(this.iframeblocks.remove(),delete this.iframeblocks)},_bluractiveelement:function(e){var i=t.ui.safeactiveelement(this.document[0]),s=t(e.target);s.closest(i).length||t.ui.safeblur(i)},_mousestart:function(e){var i=this.options;return this.helper=this._createhelper(e),this._addclass(this.helper,"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(!0),this.offsetparent=this.helper.offsetparent(),this.hasfixedancestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionabs=this.element.offset(),this._refreshoffsets(e),this.originalposition=this.position=this._generateposition(e,!1),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)},_refreshoffsets:function(t){this.offset={top:this.positionabs.top-this.margins.top,left:this.positionabs.left-this.margins.left,scroll:!1,parent:this._getparentoffset(),relative:this._getrelativeoffset()},this.offset.click={left:t.pagex-this.offset.left,top:t.pagey-this.offset.top}},_mousedrag:function(e,i){if(this.hasfixedancestor&&(this.offset.parent=this._getparentoffset()),this.position=this._generateposition(e,!0),this.positionabs=this._convertpositionto("absolute"),!i){var s=this._uihash();if(this._trigger("drag",e,s)===!1)return this._mouseup(new t.event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",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),"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},_mouseup:function(e){return this._unblockframes(),t.ui.ddmanager&&t.ui.ddmanager.dragstop(this,e),this.handleelement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseup.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseup(new t.event("mouseup",{target:this.element[0]})):this._clear(),this},_gethandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_sethandleclassname:function(){this.handleelement=this.options.handle?this.element.find(this.options.handle):this.element,this._addclass(this.handleelement,"ui-draggable-handle")},_removehandleclassname:function(){this._removeclass(this.handleelement,"ui-draggable-handle")},_createhelper:function(e){var i=this.options,s=t.isfunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeattr("id"):this.element;return n.parents("body").length||n.appendto("parent"===i.appendto?this.element[0].parentnode:i.appendto),s&&n[0]===this.element[0]&&this._setpositionrelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setpositionrelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_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)},_isrootnode:function(t){return/(html|body)/i.test(t.tagname)||t===this.document[0]},_getparentoffset:function(){var e=this.offsetparent.offset(),i=this.document[0];return"absolute"===this.cssposition&&this.scrollparent[0]!==i&&t.contains(this.scrollparent[0],this.offsetparent[0])&&(e.left+=this.scrollparent.scrollleft(),e.top+=this.scrollparent.scrolltop()),this._isrootnode(this.offsetparent[0])&&(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)return{top:0,left:0};var t=this.element.position(),e=this._isrootnode(this.scrollparent[0]);return{top:t.top-(parseint(this.helper.css("top"),10)||0)+(e?0:this.scrollparent.scrolltop()),left:t.left-(parseint(this.helper.css("left"),10)||0)+(e?0:this.scrollparent.scrollleft())}},_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,o=this.document[0];return this.relativecontainer=null,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()||o.body.parentnode.scrollheight)-this.helperproportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,t(o).width()-this.helperproportions.width-this.margins.left,(t(o).height()||o.body.parentnode.scrollheight)-this.helperproportions.height-this.margins.top],void 0):n.containment.constructor===array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentnode),i=t(n.containment),s=i[0],s&&(e=/(scroll|auto)/.test(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.relativecontainer=i),void 0):(this.containment=null,void 0) },_convertpositionto:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isrootnode(this.scrollparent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssposition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssposition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generateposition:function(t,e){var i,s,n,o,a=this.options,r=this._isrootnode(this.scrollparent[0]),h=t.pagex,l=t.pagey;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollparent.scrolltop(),left:this.scrollparent.scrollleft()}),e&&(this.containment&&(this.relativecontainer?(s=this.relativecontainer.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,t.pagex-this.offset.click.lefti[2]&&(h=i[2]+this.offset.click.left),t.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),"y"===a.axis&&(h=this.originalpagex),"x"===a.axis&&(l=this.originalpagey)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssposition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssposition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeclass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelhelperremoval||this.helper.remove(),this.helper=null,this.cancelhelperremoval=!1,this.destroyonclear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uihash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionabs=this._convertpositionto("absolute"),s.offset=this.positionabs),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,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connecttosortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshpositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelhelperremoval=!1,t.each(s.sortables,function(){var t=this;t.isover?(t.isover=0,s.cancelhelperremoval=!0,t.cancelhelperremoval=!1,t._storedcss={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mousestop(e),t.options.helper=t.options._helper):(t.cancelhelperremoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionabs=s.positionabs,o.helperproportions=s.helperproportions,o.offset.click=s.offset.click,o._intersectswith(o.containercache)&&(n=!0,t.each(s.sortables,function(){return this.positionabs=s.positionabs,this.helperproportions=s.helperproportions,this.offset.click=s.offset.click,this!==o&&this._intersectswith(this.containercache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isover||(o.isover=1,s._parent=i.helper.parent(),o.currentitem=i.helper.appendto(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentitem[0],o._mousecapture(e,!0),o._mousestart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("tosortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshpositions()}),s.currentitem=s.element,o.fromoutside=s),o.currentitem&&(o._mousedrag(e),i.position=o.position)):o.isover&&(o.isover=0,o.cancelhelperremoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uihash(o)),o._mousestop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendto(s._parent),s._refreshoffsets(e),i.position=s._generateposition(e,!0),s._trigger("fromsortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshpositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollparentnothidden||(i.scrollparentnothidden=i.helper.scrollparent(!1)),i.scrollparentnothidden[0]!==i.document[0]&&"html"!==i.scrollparentnothidden[0].tagname&&(i.overflowoffset=i.scrollparentnothidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollparentnothidden[0],r=s.document[0];a!==r&&"html"!==a.tagname?(n.axis&&"x"===n.axis||(s.overflowoffset.top+a.offsetheight-e.pagey=0;d--)h=s.snapelements[d].left-s.margins.left,l=h+s.snapelements[d].width,c=s.snapelements[d].top-s.margins.top,u=c+s.snapelements[d].height,h-m>_||g>l+m||c-m>b||v>u+m||!t.contains(s.snapelements[d].item.ownerdocument,s.snapelements[d].item)?(s.snapelements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uihash(),{snapitem:s.snapelements[d].item})),s.snapelements[d].snapping=!1):("inner"!==f.snapmode&&(n=m>=math.abs(c-b),o=m>=math.abs(u-v),a=m>=math.abs(h-_),r=m>=math.abs(l-g),n&&(i.position.top=s._convertpositionto("relative",{top:c-s.helperproportions.height,left:0}).top),o&&(i.position.top=s._convertpositionto("relative",{top:u,left:0}).top),a&&(i.position.left=s._convertpositionto("relative",{top:0,left:h-s.helperproportions.width}).left),r&&(i.position.left=s._convertpositionto("relative",{top:0,left:l}).left)),p=n||o||a||r,"outer"!==f.snapmode&&(n=m>=math.abs(c-v),o=m>=math.abs(u-b),a=m>=math.abs(h-g),r=m>=math.abs(l-_),n&&(i.position.top=s._convertpositionto("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertpositionto("relative",{top:u-s.helperproportions.height,left:0}).top),a&&(i.position.left=s._convertpositionto("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertpositionto("relative",{top:0,left:l-s.helperproportions.width}).left)),!s.snapelements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uihash(),{snapitem:s.snapelements[d].item})),s.snapelements[d].snapping=n||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makearray(t(o.stack)).sort(function(e,i){return(parseint(t(e).css("zindex"),10)||0)-(parseint(t(i).css("zindex"),10)||0)});a.length&&(n=parseint(t(a[0]).css("zindex"),10)||0,t(a).each(function(e){t(this).css("zindex",n+e)}),this.css("zindex",n+a.length))}}),t.ui.plugin.add("draggable","zindex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zindex")&&(o._zindex=n.css("zindex")),n.css("zindex",o.zindex)},stop:function(e,i,s){var n=s.options;n._zindex&&t(i.helper).css("zindex",n._zindex)}}),t.ui.draggable,t.widget("ui.droppable",{version:"1.12.1",widgeteventprefix:"drop",options:{accept:"*",addclasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isfunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],void 0):e?e:e={width:this.element[0].offsetwidth,height:this.element[0].offsetheight}},this._addtomanager(i.scope),i.addclasses&&this._addclass("ui-droppable")},_addtomanager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setoption:function(e,i){if("accept"===e)this.accept=t.isfunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addtomanager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addactiveclass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeactiveclass(),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._addhoverclass(),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._removehoverclass(),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 i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentitem||s.element)&&u(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentitem||s.element)?(this._removeactiveclass(),this._removehoverclass(),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}},_addhoverclass:function(){this._addclass("ui-droppable-hover")},_removehoverclass:function(){this._removeclass("ui-droppable-hover")},_addactiveclass:function(){this._addclass("ui-droppable-active")},_removeactiveclass:function(){this._removeclass("ui-droppable-active")}});var u=t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,s,n){if(!i.offset)return!1;var o=(e.positionabs||e.position.absolute).left+e.margins.left,a=(e.positionabs||e.position.absolute).top+e.margins.top,r=o+e.helperproportions.width,h=a+e.helperproportions.height,l=i.offset.left,c=i.offset.top,u=l+i.proportions().width,d=c+i.proportions().height;switch(s){case"fit":return o>=l&&u>=r&&a>=c&&d>=h;case"intersect":return o+e.helperproportions.width/2>l&&u>r-e.helperproportions.width/2&&a+e.helperproportions.height/2>c&&d>h-e.helperproportions.height/2;case"pointer":return t(n.pagey,c,i.proportions().height)&&t(n.pagex,l,i.proportions().width);case"touch":return(a>=c&&d>=a||h>=c&&d>=h||c>a&&h>d)&&(o>=l&&u>=o||r>=l&&u>=r||l>o&&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&&u(e,this,this.options.tolerance,i)&&(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").on("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=u(e,this,this.options.tolerance,i),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(this).droppable("instance").options.scope===n}),o.length&&(s=t(o[0]).droppable("instance"),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").off("scroll.droppable"),e.options.refreshpositions||t.ui.ddmanager.prepareoffsets(e,i)}},t.uibackcompat!==!1&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverclass:!1,activeclass:!1},_addactiveclass:function(){this._super(),this.options.activeclass&&this.element.addclass(this.options.activeclass)},_removeactiveclass:function(){this._super(),this.options.activeclass&&this.element.removeclass(this.options.activeclass)},_addhoverclass:function(){this._super(),this.options.hoverclass&&this.element.addclass(this.options.hoverclass)},_removehoverclass:function(){this._super(),this.options.hoverclass&&this.element.removeclass(this.options.hoverclass)}}),t.ui.droppable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgeteventprefix:"resize",options:{alsoresize:!1,animate:!1,animateduration:"slow",animateeasing:"swing",aspectratio:!1,autohide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},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},_num:function(t){return parsefloat(t)||0},_isnumber:function(t){return!isnan(parsefloat(t))},_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)},_create:function(){var e,i=this.options,s=this;this._addclass("ui-resizable"),t.extend(this,{_aspectratio:!!i.aspectratio,aspectratio:i.aspectratio,originalelement:this.element,_proportionallyresizeelements:[],_helper:i.helper||i.ghost||i.animate?i.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.resizable("instance")),this.elementiswrapper=!0,e={margintop:this.originalelement.css("margintop"),marginright:this.originalelement.css("marginright"),marginbottom:this.originalelement.css("marginbottom"),marginleft:this.originalelement.css("marginleft")},this.element.css(e),this.originalelement.css("margin",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(e),this._proportionallyresize()),this._setuphandles(),i.autohide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeclass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addclass("ui-resizable-autohide"),s._handles.hide())}),this._mouseinit()},_destroy:function(){this._mousedestroy();var e,i=function(e){t(e).removedata("resizable").removedata("ui-resizable").off(".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},_setoption:function(t,e){switch(this._super(t,e),t){case"handles":this._removehandles(),this._setuphandles();break;default:}},_setuphandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.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=t(),this.handles.constructor===string)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("
"),this._addclass(o,"ui-resizable-handle "+n),o.css({zindex:a.zindex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);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]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodetype)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mousedown})),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()),this._handles=this._handles.add(this.handles[i])},this._renderaxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableselection(),this._handles.on("mouseover",function(){r.resizing||(this.classname&&(o=this.classname.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autohide&&(this._handles.hide(),this._addclass("ui-resizable-autohide"))},_removehandles:function(){this._handles.remove()},_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(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderproxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollleft()||0,s+=t(o.containment).scrolltop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalsize=this._helper?{width:a.outerwidth(),height:a.outerheight()}:{width:a.width(),height:a.height()},this.sizediff={width:a.outerwidth()-a.width(),height:a.outerheight()-a.height()},this.originalposition={left:i,top:s},this.originalmouseposition={left:e.pagex,top:e.pagey},this.aspectratio="number"==typeof o.aspectratio?o.aspectratio:this.originalsize.width/this.originalsize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addclass("ui-resizable-resizing"),this._propagate("start",e),!0},_mousedrag:function(e){var i,s,n=this.originalmouseposition,o=this.axis,a=e.pagex-n.left||0,r=e.pagey-n.top||0,h=this._change[o];return this._updateprevproperties(),h?(i=h.apply(this,[e,a,r]),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),s=this._applychanges(),!this._helper&&this._proportionallyresizeelements.length&&this._proportionallyresize(),t.isemptyobject(s)||(this._updateprevproperties(),this._trigger("resize",e,this.ui()),this._applychanges()),!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&&this._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=parsefloat(c.element.css("left"))+(c.position.left-c.originalposition.left)||null,h=parsefloat(c.element.css("top"))+(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._removeclass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateprevproperties:function(){this.prevposition={top:this.position.top,left:this.position.left},this.prevsize={width:this.size.width,height:this.size.height}},_applychanges:function(){var t={};return this.position.top!==this.prevposition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevposition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevsize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevsize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updatevirtualboundaries:function(t){var e,i,s,n,o,a=this.options;o={minwidth:this._isnumber(a.minwidth)?a.minwidth:0,maxwidth:this._isnumber(a.maxwidth)?a.maxwidth:1/0,minheight:this._isnumber(a.minheight)?a.minheight:0,maxheight:this._isnumber(a.maxheight)?a.maxheight:1/0},(this._aspectratio||t)&&(e=o.minheight*this.aspectratio,s=o.minwidth/this.aspectratio,i=o.maxheight*this.aspectratio,n=o.maxwidth/this.aspectratio,e>o.minwidth&&(o.minwidth=e),s>o.minheight&&(o.minheight=s),o.maxwidth>i&&(o.maxwidth=i),o.maxheight>n&&(o.maxheight=n)),this._vboundaries=o},_updatecache:function(t){this.offset=this.helper.offset(),this._isnumber(t.left)&&(this.position.left=t.left),this._isnumber(t.top)&&(this.position.top=t.top),this._isnumber(t.height)&&(this.size.height=t.height),this._isnumber(t.width)&&(this.size.width=t.width)},_updateratio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isnumber(t.height)?t.width=t.height*this.aspectratio:this._isnumber(t.width)&&(t.height=t.width/this.aspectratio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectsize:function(t){var e=this._vboundaries,i=this.axis,s=this._isnumber(t.width)&&e.maxwidth&&e.maxwidtht.width,a=this._isnumber(t.height)&&e.minheight&&e.minheight>t.height,r=this.originalposition.left+this.originalsize.width,h=this.originalposition.top+this.originalsize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minwidth),a&&(t.height=e.minheight),s&&(t.width=e.maxwidth),n&&(t.height=e.maxheight),o&&l&&(t.left=r-e.minwidth),s&&l&&(t.left=r-e.maxwidth),a&&c&&(t.top=h-e.minheight),n&&c&&(t.top=h-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},_getpaddingplusborderdimensions:function(t){for(var e=0,i=[],s=[t.css("bordertopwidth"),t.css("borderrightwidth"),t.css("borderbottomwidth"),t.css("borderleftwidth")],n=[t.css("paddingtop"),t.css("paddingright"),t.css("paddingbottom"),t.css("paddingleft")];4>e;e++)i[e]=parsefloat(s[e])||0,i[e]+=parsefloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyresize:function(){if(this._proportionallyresizeelements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyresizeelements.length>e;e++)t=this._proportionallyresizeelements[e],this.outerdimensions||(this.outerdimensions=this._getpaddingplusborderdimensions(t)),t.css({height:i.height()-this.outerdimensions.height||0,width:i.width()-this.outerdimensions.width||0})},_renderproxy:function(){var e=this.element,i=this.options;this.elementoffset=e.offset(),this._helper?(this.helper=this.helper||t("
"),this._addclass(this.helper,this._helper),this.helper.css({width:this.element.outerwidth(),height:this.element.outerheight(),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).resizable("instance"),s=i.options,n=i._proportionallyresizeelements,o=n.length&&/textarea/i.test(n[0].nodename),a=o&&i._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=parsefloat(i.element.css("left"))+(i.position.left-i.originalposition.left)||null,c=parsefloat(i.element.css("top"))+(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:parsefloat(i.element.css("width")),height:parsefloat(i.element.css("height")),top:parsefloat(i.element.css("top")),left:parsefloat(i.element.css("left"))};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 e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerelement=t(d),/document/.test(u)||u===document?(h.containeroffset={left:0,top:0},h.containerposition={left:0,top:0},h.parentdata={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentnode.scrollheight}):(e=t(d),i=[],t(["top","right","left","bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containeroffset=e.offset(),h.containerposition=e.position(),h.containersize={height:e.innerheight()-i[3],width:e.innerwidth()-i[1]},s=h.containeroffset,n=h.containersize.height,o=h.containersize.width,a=h._hasscroll(d,"left")?d.scrollwidth:o,r=h._hasscroll(d)?d.scrollheight:n,h.parentdata={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containeroffset,l=a.position,c=a._aspectratio||e.shiftkey,u={top:0,left:0},d=a.containerelement,p=!0;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,p=!1),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,p=!1),a.position.top=a._helper?h.top:0),n=a.containerelement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerelement.css("position")),n&&o?(a.offset.left=a.parentdata.left+a.position.left,a.offset.top=a.parentdata.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=math.abs(a.sizediff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=math.abs(a.sizediff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentdata.width&&(a.size.width=a.parentdata.width-i,c&&(a.size.height=a.size.width/a.aspectratio,p=!1)),s+a.size.height>=a.parentdata.height&&(a.size.height=a.parentdata.height-s,c&&(a.size.width=a.size.height*a.aspectratio,p=!1)),p||(a.position.left=a.prevposition.left,a.position.top=a.prevposition.top,a.size.width=a.prevsize.width,a.size.height=a.prevsize.height)},stop:function(){var e=t(this).resizable("instance"),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).resizable("instance"),i=e.options;t(i.alsoresize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parsefloat(e.width()),height:parsefloat(e.height()),left:parsefloat(e.css("left")),top:parsefloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),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}; t(n.alsoresize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalelement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removedata("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalelement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addclass(e.ghost,"ui-resizable-ghost"),t.uibackcompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addclass(this.options.ghost),e.ghost.appendto(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removechild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalsize,a=i.originalposition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=math.round((n.width-o.width)/l)*l,d=math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,m=s.maxwidth&&p>s.maxwidth,g=s.maxheight&&f>s.maxheight,_=s.minwidth&&s.minwidth>p,v=s.minheight&&s.minheight>f;s.grid=h,_&&(p+=l),v&&(f+=c),m&&(p-=l),g&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getpaddingplusborderdimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",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=this;this._addclass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementpos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addclass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),s=i.offset(),n={left:s.left-e.elementpos.left,top:s.top-e.elementpos.top};t.data(this,"selectable-item",{element:this,$element:i,left:n.left,top:n.top,right:n.left+i.outerwidth(),bottom:n.top+i.outerheight(),startselected:!1,selected:i.hasclass("ui-selected"),selecting:i.hasclass("ui-selecting"),unselecting:i.hasclass("ui-unselecting")})})},this.refresh(),this._mouseinit(),this.helper=t("
"),this._addclass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removedata("selectable-item"),this._mousedestroy()},_mousestart:function(e){var i=this,s=this.options;this.opos=[e.pagex,e.pagey],this.elementpos=t(this.element[0]).offset(),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||(i._removeclass(s.$element,"ui-selected"),s.selected=!1,i._addclass(s.$element,"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"),i._removeclass(n.$element,s?"ui-unselecting":"ui-selected")._addclass(n.$element,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):void 0}))},_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,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementpos.left,c.right=i.right+s.elementpos.left,c.top=i.top+s.elementpos.top,c.bottom=i.bottom+s.elementpos.top,"touch"===n.tolerance?l=!(c.left>r||o>c.right||c.top>h||a>c.bottom):"fit"===n.tolerance&&(l=c.left>o&&r>c.right&&c.top>a&&h>c.bottom),l?(i.selected&&(s._removeclass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeclass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addclass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metakey||e.ctrlkey)&&i.startselected?(s._removeclass(i.$element,"ui-selecting"),i.selecting=!1,s._addclass(i.$element,"ui-selected"),i.selected=!0):(s._removeclass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addclass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metakey||e.ctrlkey||i.startselected||(s._removeclass(i.$element,"ui-selected"),i.selected=!1,s._addclass(i.$element,"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");i._removeclass(s.$element,"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");i._removeclass(s.$element,"ui-selecting")._addclass(s.$element,"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}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",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},_isoveraxis:function(t,e,i){return t>=e&&e+i>t},_isfloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containercache={},this._addclass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseinit(),this._sethandleclassname(),this.ready=!0},_setoption:function(t,e){this._super(t,e),"handle"===t&&this._sethandleclassname()},_sethandleclassname:function(){var e=this;this._removeclass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addclass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mousedestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removedata(this.widgetname+"-item");return this},_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):void 0}),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]!==this.document[0]&&"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._addclass(this.helper,"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]!==this.document[0]&&"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]===this.document[0].body?0:this.offsetparent[0].scrollleft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetparent[0]===this.document[0].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(new t.event("mouseup",{target:null})),"original"===this.options.helper?(this.currentitem.css(this._storedcss),this._removeclass(this.currentitem,"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 e,i,s="x"===this.options.axis||this._isoveraxis(this.positionabs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isoveraxis(this.positionabs.left+this.offset.click.left,t.left,t.width),o=s&&n;return o?(e=this._getdragverticaldirection(),i=this._getdraghorizontaldirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1)):!1},_intersectswithsides:function(t){var e=this._isoveraxis(this.positionabs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isoveraxis(this.positionabs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getdragverticaldirection(),n=this._getdraghorizontaldirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_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._sethandleclassname(),this.refreshpositions(),this},_connectwith:function(){var t=this.options;return t.connectwith.constructor===string?[t.connectwith]:t.connectwith},_getitemsasjquery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectwith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s],this.document[0]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetfullname),a&&a!==this&&!a.options.disabled&&h.push([t.isfunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.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]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_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],this.document[0]),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.floating=this.items.length?"x"===this.options.axis||this._isfloating(this.items[0].item):!1,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]);return e._addclass(n,"ui-sortable-placeholder",i||e.currentitem[0].classname)._removeclass(n,"ui-sortable-helper"),"tbody"===s?e._createtrplaceholder(e.currentitem.find("tr").eq(0),t("",e.document[0]).appendto(n)):"tr"===s?e._createtrplaceholder(e.currentitem,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)},_createtrplaceholder:function(e,i){var s=this;e.children().each(function(){t(" ",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendto(i)})},_contactcontainers:function(e){var i,s,n,o,a,r,h,l,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentitem[0],this.containers[i].element[0]))if(this._intersectswith(this.containers[i].containercache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containercache.over&&(this.containers[i]._trigger("out",e,this._uihash(this)),this.containers[i].containercache.over=0);if(d)if(1===this.containers.length)this.containers[p].containercache.over||(this.containers[p]._trigger("over",e,this._uihash(this)),this.containers[p].containercache.over=1);else{for(n=1e4,o=null,c=d.floating||this._isfloating(this.currentitem),a=c?"left":"top",r=c?"width":"height",u=c?"pagex":"pagey",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentitem[0]&&(h=this.items[s].item.offset()[a],l=!1,e[u]-h>this.items[s][r]/2&&(l=!0),n>math.abs(e[u]-h)&&(n=math.abs(e[u]-h),o=this.items[s],this.direction=l?"up":"down"));if(!o&&!this.options.droponempty)return;if(this.currentcontainer===this.containers[p])return this.currentcontainer.containercache.over||(this.containers[p]._trigger("over",e,this._uihash()),this.currentcontainer.containercache.over=1),void 0;o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uihash()),this.containers[p]._trigger("change",e,this._uihash(this)),this.currentcontainer=this.containers[p],this.options.placeholder.update(this.currentcontainer,this.placeholder),this.containers[p]._trigger("over",e,this._uihash(this)),this.containers[p].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]!==this.document[0]&&t.contains(this.scrollparent[0],this.offsetparent[0])&&(e.left+=this.scrollparent.scrollleft(),e.top+=this.scrollparent.scrolltop()),(this.offsetparent[0]===this.document[0].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,"document"===n.containment?this.document.width():this.window.width()-this.helperproportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentnode.scrollheight:this.window.height()||this.document[0].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]!==this.document[0]&&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]!==this.document[0]&&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]!==this.document[0]&&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){function i(t,e,i){return function(s){i._trigger(t,s,e._uihash(e))}}this.reverting=!1;var s,n=[];if(!this._nofinalsort&&this.currentitem.parent().length&&this.placeholder.before(this.currentitem),this._nofinalsort=null,this.helper[0]===this.currentitem[0]){for(s in this._storedcss)("auto"===this._storedcss[s]||"static"===this._storedcss[s])&&(this._storedcss[s]="");this.currentitem.css(this._storedcss),this._removeclass(this.currentitem,"ui-sortable-helper")}else this.currentitem.show();for(this.fromoutside&&!e&&n.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||n.push(function(t){this._trigger("update",t,this._uihash())}),this!==this.currentcontainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uihash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uihash(this))}}.call(this,this.currentcontainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uihash(this))}}.call(this,this.currentcontainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containercache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].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,e||this._trigger("beforestop",t,this._uihash()),this.placeholder[0].parentnode.removechild(this.placeholder[0]),this.cancelhelperremoval||(this.helper[0]!==this.currentitem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uihash())}return this.fromoutside=!1,!this.cancelhelperremoval},_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}}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},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},hideprops:{bordertopwidth:"hide",borderbottomwidth:"hide",paddingtop:"hide",paddingbottom:"hide",height:"hide"},showprops:{bordertopwidth:"show",borderbottomwidth:"show",paddingtop:"show",paddingbottom:"show",height:"show"},_create:function(){var e=this.options;this.prevshow=this.prevhide=t(),this._addclass("ui-accordion","ui-widget ui-helper-reset"),this.element.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()}},_createicons:function(){var e,i,s=this.options.icons;s&&(e=t(""),this._addclass(e,"ui-accordion-header-icon","ui-icon "+s.header),e.prependto(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeclass(i,s.header)._addclass(i,null,s.activeheader)._addclass(this.headers,"ui-accordion-icons")) },_destroyicons:function(){this._removeclass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeattr("role"),this.headers.removeattr("role aria-expanded aria-selected aria-controls tabindex").removeuniqueid(),this._destroyicons(),t=this.headers.next().css("display","").removeattr("role aria-hidden aria-labelledby").removeuniqueid(),"content"!==this.options.heightstyle&&t.css("height","")},_setoption:function(t,e){return"active"===t?(this._activate(e),void 0):("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()),void 0)},_setoptiondisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleclass(null,"ui-state-disabled",!!t),this._toggleclass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_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),t(o).trigger("focus"),e.preventdefault())}},_panelkeydown:function(e){e.keycode===t.ui.keycode.up&&e.ctrlkey&&t(e.currenttarget).prev().trigger("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(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addclass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addclass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightstyle,n=this.element.parent();this.active=this._findactive(i.active),this._addclass(this.active,"ui-accordion-header-active","ui-state-active")._removeclass(this.active,"ui-accordion-header-collapsed"),this._addclass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueid().attr("id"),s=e.next(),n=s.uniqueid().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabindex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabindex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabindex",0),this._createicons(),this._setupevents(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerheight(!0))}),this.headers.each(function(){e-=t(this).outerheight(!0)}),this.headers.next().each(function(){t(this).height(math.max(0,e-t(this).innerheight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_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,s,n=this.options,o=this.active,a=t(e.currenttarget),r=a[0]===o[0],h=r&&n.collapsible,l=h?t():a.next(),c=o.next(),u={oldheader:o,oldpanel:c,newheader:h?t():a,newpanel:l};e.preventdefault(),r&&!n.collapsible||this._trigger("beforeactivate",e,u)===!1||(n.active=h?!1:this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeclass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeclass(i,null,n.icons.activeheader)._addclass(i,null,n.icons.header)),r||(this._removeclass(a,"ui-accordion-header-collapsed")._addclass(a,"ui-accordion-header-active","ui-state-active"),n.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeclass(s,null,n.icons.header)._addclass(s,null,n.icons.activeheader)),this._addclass(a.next(),"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-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabindex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseint(t(this).attr("tabindex"),10)}).attr("tabindex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabindex:0})},_animate:function(t,e,i){var s,n,o,a=this,r=0,h=t.css("box-sizing"),l=t.length&&(!e.length||t.index()",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activemenu=this.element,this.mousehandled=!1,this.element.uniqueid().attr({role:this.options.role,tabindex:0}),this._addclass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventdefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeactiveelement(this.document[0]));!this.mousehandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.ispropagationstopped()||(this.mousehandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&cleartimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousfilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currenttarget);i[0]===s[0]&&(this._removeclass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseall","mouseleave .ui-menu":"collapseall",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeactiveelement(this.document[0]));i&&this.collapseall(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeondocumentclick(t)&&this.collapseall(t),this.mousehandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeattr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeuniqueid().removeattr("tabindex role aria-haspopup");this.element.removeattr("aria-activedescendant").find(".ui-menu").addback().removeattr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabindex").removeuniqueid().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keycode){case t.ui.keycode.page_up:this.previouspage(e);break;case t.ui.keycode.page_down:this.nextpage(e);break;case t.ui.keycode.home:this._move("first","first",e);break;case t.ui.keycode.end:this._move("last","last",e);break;case t.ui.keycode.up:this.previous(e);break;case t.ui.keycode.down:this.next(e);break;case t.ui.keycode.left:this.collapse(e);break;case t.ui.keycode.right:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keycode.enter:case t.ui.keycode.space:this._activate(e);break;case t.ui.keycode.escape:this.collapse(e);break;default:a=!1,s=this.previousfilter||"",o=!1,n=e.keycode>=96&&105>=e.keycode?""+(e.keycode-96):string.fromcharcode(e.keycode),cleartimeout(this.filtertimer),n===s?o=!0:n=s+n,i=this._filtermenuitems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextall(".ui-menu-item"):i,i.length||(n=string.fromcharcode(e.keycode),i=this._filtermenuitems(n)),i.length?(this.focus(e,i),this.previousfilter=n,this.filtertimer=this._delay(function(){delete this.previousfilter},1e3)):delete this.previousfilter}a&&e.preventdefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,h=this.element.find(this.options.menus);this._toggleclass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=h.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("").data("ui-menu-submenu-caret",!0);a._addclass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addclass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=h.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isdivider(e)&&a._addclass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueid().attr({tabindex:-1,role:this._itemrole()}),this._addclass(n,"ui-menu-item")._addclass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemrole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setoption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeclass(i,null,this.options.icons.submenu)._addclass(i,null,e.submenu)}this._super(t,e)},_setoptiondisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleclass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollintoview(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addclass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addclass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startopening(i),this.activemenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollintoview:function(e){var i,s,n,o,a,r;this._hasscroll()&&(i=parsefloat(t.css(this.activemenu[0],"bordertopwidth"))||0,s=parsefloat(t.css(this.activemenu[0],"paddingtop"))||0,n=e.offset().top-this.activemenu.offset().top-i-s,o=this.activemenu.scrolltop(),a=this.activemenu.height(),r=e.outerheight(),0>n?this.activemenu.scrolltop(o+n):n+r>a&&this.activemenu.scrolltop(o+n-a+r))},blur:function(t,e){e||cleartimeout(this.timer),this.active&&(this._removeclass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startopening:function(t){cleartimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);cleartimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeattr("aria-hidden").attr("aria-expanded","true").position(i)},collapseall:function(e,i){cleartimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeclass(s.find(".ui-state-active"),null,"ui-state-active"),this.activemenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeondocumentclick:function(e){return!t(e.target).closest(".ui-menu").length},_isdivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isfirstitem:function(){return this.active&&!this.active.prevall(".ui-menu-item").length},islastitem:function(){return this.active&&!this.active.nextall(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevall":"nextall"](".ui-menu-item").eq(-1):this.active[t+"all"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activemenu.find(this.options.items)[e]()),this.focus(i,s)},nextpage:function(e){var i,s,n;return this.active?(this.islastitem()||(this._hasscroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextall(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activemenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previouspage:function(e){var i,s,n;return this.active?(this.isfirstitem()||(this._hasscroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevall(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activemenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasscroll:function(){return this.element.outerheight()",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},requestindex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodename.tolowercase(),o="textarea"===n,a="input"===n;this.ismultiline=o||!a&&this._iscontenteditable(this.element),this.valuemethod=this.element[o||a?"val":"text"],this.isnewmenu=!0,this._addclass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readonly"))return e=!0,s=!0,i=!0,void 0;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: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.ismultiline||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(),void 0;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(),void 0):(this._searchtimeout(t),void 0)},focus:function(){this.selecteditem=null,this.previous=this._value()},blur:function(t){return this.cancelblur?(delete this.cancelblur,void 0):(cleartimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initsource(),this.menu=t("