mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
29 lines
327 KiB
JavaScript
29 lines
327 KiB
JavaScript
!function(t){function e(s){if(i[s])return i[s].exports;var n=i[s]={exports:{},id:s,loaded:!1};return t[s].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){"use strict";i(91),i(92),i(95),i(96),i(97),i(98),i(99),i(100),i(101),i(102),i(103),i(104),i(105),i(106),i(108),i(110),i(111),i(112),i(113),i(117),i(118),i(119),i(120)},function(t,e){t.exports=jQuery},,function(t,e){t.exports=React},function(t,e){t.exports=ReactDom},function(t,e){t.exports=ReactRedux},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){t.exports=i18n},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);a["default"].fn.layout.defaults.resize=!1,jLayout="undefined"==typeof jLayout?{}:jLayout,jLayout.threeColumnCompressor=function(t,e){function i(t){var e=t+"Size";return function(t){var i=n[e](),s=o[e](),a=r[e](),l=t.insets();return width=i.width+s.width+a.width,height=Math.max(i.height,s.height,a.height),{width:l.left+l.right+width,height:l.top+l.bottom+height}}}if("undefined"==typeof t.menu||"undefined"==typeof t.content||"undefined"==typeof t.preview)throw'Spec is invalid. Please provide "menu", "content" and "preview" elements.';if("undefined"==typeof e.minContentWidth||"undefined"==typeof e.minPreviewWidth||"undefined"==typeof e.mode)throw'Spec is invalid. Please provide "minContentWidth", "minPreviewWidth", "mode"';if("split"!==e.mode&&"content"!==e.mode&&"preview"!==e.mode)throw'Spec is invalid. "mode" should be either "split", "content" or "preview"';var s={options:e},n=a["default"].jLayoutWrap(t.menu),o=a["default"].jLayoutWrap(t.content),r=a["default"].jLayoutWrap(t.preview);return s.layout=function(i){var s=i.bounds(),a=i.insets(),l=a.top,h=s.height-a.bottom,c=a.left,d=s.width-a.right,u=t.menu.width(),p=0,f=0;"preview"===this.options.mode?(p=0,f=d-c-u):"content"===this.options.mode?(p=d-c-u,f=0):(p=(d-c-u)/2,f=d-c-(u+p),p<this.options.minContentWidth?(p=this.options.minContentWidth,f=d-c-(u+p)):f<this.options.minPreviewWidth&&(f=this.options.minPreviewWidth,p=d-c-(u+f)),(p<this.options.minContentWidth||f<this.options.minPreviewWidth)&&(p=d-c-u,f=0));var m={content:t.content.hasClass("column-hidden"),preview:t.preview.hasClass("column-hidden")},g={content:0===p,preview:0===f};return t.content.toggleClass("column-hidden",g.content),t.preview.toggleClass("column-hidden",g.preview),n.bounds({x:c,y:l,height:h-l,width:u}),n.doLayout(),c+=u,o.bounds({x:c,y:l,height:h-l,width:p}),g.content||o.doLayout(),c+=p,r.bounds({x:c,y:l,height:h-l,width:f}),g.preview||r.doLayout(),g.content!==m.content&&t.content.trigger("columnvisibilitychanged"),g.preview!==m.preview&&t.preview.trigger("columnvisibilitychanged"),p+f<e.minContentWidth+e.minPreviewWidth?t.preview.trigger("disable"):t.preview.trigger("enable"),i},s.preferred=i("preferred"),s.minimum=i("minimum"),s.maximum=i("maximum"),s}},function(module,exports,__webpack_require__){(function(jQuery){"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},_jQuery=__webpack_require__(1),_jQuery2=_interopRequireDefault(_jQuery);__webpack_require__(93);var windowWidth,windowHeight;_jQuery2["default"].noConflict(),window.ss=window.ss||{},window.ss.debounce=function(t,e,i){var s,n,a,o=function r(){s=null,i||t.apply(n,a)};return function(){var r=i&&!s;n=this,a=arguments,clearTimeout(s),s=setTimeout(o,e),r&&t.apply(n,a)}},(0,_jQuery2["default"])(window).bind("resize.leftandmain",function(t){(0,_jQuery2["default"])(".cms-container").trigger("windowresize")}),_jQuery2["default"].entwine.warningLevel=_jQuery2["default"].entwine.WARN_LEVEL_BESTPRACTISE,_jQuery2["default"].entwine("ss",function($){$(window).on("message",function(t){var e,i=t.originalEvent,s="object"===_typeof(i.data)?i.data:JSON.parse(i.data);if($.path.parseUrl(window.location.href).domain===$.path.parseUrl(i.origin).domain)switch(e=$("undefined"==typeof s.target?window:s.target),s.type){case"event":e.trigger(s.event,s.data);break;case"callback":e[s.callback].call(e,s.data)}});var positionLoadingSpinner=function t(){var t=120,e=$(".ss-loading-screen .loading-animation"),i=($(window).height()-e.height())/2;e.css("top",i+t),e.show()},applyChosen=function e(t){t.is(":visible")?t.addClass("has-chosen").chosen({allow_single_deselect:!0,disable_search_threshold:20,display_disabled_options:!0}):setTimeout(function(){t.show(),e(t)},500)},isSameUrl=function i(t,e){var i=$("base").attr("href");t=$.path.isAbsoluteUrl(t)?t:$.path.makeUrlAbsolute(t,i),e=$.path.isAbsoluteUrl(e)?e:$.path.makeUrlAbsolute(e,i);var s=$.path.parseUrl(t),n=$.path.parseUrl(e);return s.pathname.replace(/\/*$/,"")==n.pathname.replace(/\/*$/,"")&&s.search==n.search},ajaxCompleteEvent=window.ss.debounce(function(){$(window).trigger("ajaxComplete")},1e3,!0);$(window).bind("resize",positionLoadingSpinner).trigger("resize"),$(document).ajaxComplete(function(t,e,i){var s=document.URL,n=e.getResponseHeader("X-ControllerURL"),a=i.url,o=null!==e.getResponseHeader("X-Status")?e.getResponseHeader("X-Status"):e.statusText,r=e.status<200||e.status>399?"bad":"good",l=["OK","success","HTTP/2.0 200"];return null===n||isSameUrl(s,n)&&isSameUrl(a,n)||window.ss.router.show(n,{id:(new Date).getTime()+String(Math.random()).replace(/\D/g,""),pjax:e.getResponseHeader("X-Pjax")?e.getResponseHeader("X-Pjax"):i.headers["X-Pjax"]}),e.getResponseHeader("X-Reauthenticate")?void $(".cms-container").showLoginDialog():(0!==e.status&&o&&$.inArray(o,l)===-1&&statusMessage(decodeURIComponent(o),r),void ajaxCompleteEvent(this))}),$(".cms-container").entwine({StateChangeXHR:null,FragmentXHR:{},StateChangeCount:0,LayoutOptions:{minContentWidth:940,minPreviewWidth:400,mode:"content"},onadd:function s(){return $.browser.msie&&parseInt($.browser.version,10)<8?($(".ss-loading-screen").append('<p class="ss-loading-incompat-warning"><span class="notice">Your browser is not compatible with the CMS interface. Please use Internet Explorer 8+, Google Chrome or Mozilla Firefox.</span></p>').css("z-index",$(".ss-loading-screen").css("z-index")+1),$(".loading-animation").remove(),void this._super()):(this.redraw(),$(".ss-loading-screen").hide(),$("body").removeClass("loading"),$(window).unbind("resize",positionLoadingSpinner),this.restoreTabState(),void this._super())},onwindowresize:function n(){this.redraw()},"from .cms-panel":{ontoggle:function a(){this.redraw()}},"from .cms-container":{onaftersubmitform:function o(){this.redraw()}},updateLayoutOptions:function r(t){var e=this.getLayoutOptions(),i=!1;for(var s in t)e[s]!==t[s]&&(e[s]=t[s],i=!0);i&&this.redraw()},splitViewMode:function l(){this.updateLayoutOptions({mode:"split"})},contentViewMode:function h(){this.updateLayoutOptions({mode:"content"})},previewMode:function c(){this.updateLayoutOptions({mode:"preview"})},RedrawSuppression:!1,redraw:function d(){this.getRedrawSuppression()||(window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.data("jlayout",jLayout.threeColumnCompressor({menu:this.children(".cms-menu"),content:this.children(".cms-content"),preview:this.children(".cms-preview")},this.getLayoutOptions())),this.layout(),this.find(".cms-panel-layout").redraw(),this.find(".cms-content-fields[data-layout-type]").redraw(),this.find(".cms-edit-form[data-layout-type]").redraw(),this.find(".cms-preview").redraw(),this.find(".cms-content").redraw())},checkCanNavigate:function u(t){var e=this._findFragments(t||["Content"]),i=e.find(":data(changetracker)").add(e.filter(":data(changetracker)")),s=!0;return!i.length||(i.each(function(){$(this).confirmUnsavedChanges()||(s=!1)}),s)},loadPanel:function p(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1],i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],s=arguments[3],n=arguments.length<=4||void 0===arguments[4]?document.URL:arguments[4];this.checkCanNavigate(i.pjax?i.pjax.split(","):["Content"])&&(this.saveTabState(),i.__forceReferer=n,s&&(i.__forceReload=1+Math.random()),window.ss.router.show(t,i))},reloadCurrentPanel:function f(){this.loadPanel(document.URL,null,null,!0)},submitForm:function m(t,e,i,s){var n=this;e||(e=this.find(".btn-toolbar :submit[name=action_save]")),e||(e=this.find(".btn-toolbar :submit:first")),t.trigger("beforesubmitform"),this.trigger("submitform",{form:t,button:e}),$(e).addClass("loading");var a=t.validate();if("undefined"!=typeof a&&!a)return statusMessage("Validation failed.","bad"),$(e).removeClass("loading"),!1;var o=t.serializeArray();return o.push({name:$(e).attr("name"),value:"1"}),o.push({name:"BackURL",value:document.URL.replace(/\/$/,"")}),this.saveTabState(),jQuery.ajax(jQuery.extend({headers:{"X-Pjax":"CurrentForm,Breadcrumbs"},url:t.attr("action"),data:o,type:"POST",complete:function r(){$(e).removeClass("loading")},success:function l(e,s,a){t.removeClass("changed"),i&&i(e,s,a);var r=n.handleAjaxResponse(e,s,a);r&&r.filter("form").trigger("aftersubmitform",{status:s,xhr:a,formData:o})}},s)),!1},LastState:null,PauseState:!1,handleStateChange:function g(t){var e=arguments.length<=1||void 0===arguments[1]?window.history.state:arguments[1];if(!this.getPauseState()){this.getStateChangeXHR()&&this.getStateChangeXHR().abort();var i=this,s=e.pjax||"Content",n={},a=s.split(","),o=this._findFragments(a);if(this.setStateChangeCount(this.getStateChangeCount()+1),!this.checkCanNavigate()){var r=this.getLastState();return this.setPauseState(!0),r&&r.path?window.ss.router.show(r.path):window.ss.router.back(),void this.setPauseState(!1)}if(this.setLastState(e),o.length<a.length&&(s="Content",a=["Content"],o=this._findFragments(a)),this.trigger("beforestatechange",{state:e,element:o}),n["X-Pjax"]=s,"undefined"!=typeof e.__forceReferer){var l=e.__forceReferer;try{l=decodeURI(l)}catch(h){}finally{n["X-Backurl"]=encodeURI(l)}}o.addClass("loading");var c=$.ajax({headers:n,url:e.path||document.URL}).done(function(t,s,n){var a=i.handleAjaxResponse(t,s,n,e);i.trigger("afterstatechange",{data:t,status:s,xhr:n,element:a,state:e})}).always(function(){i.setStateChangeXHR(null),o.removeClass("loading")});return this.setStateChangeXHR(c),c}},loadFragment:function v(t,e){var i=this,s,n={},a=$("base").attr("href"),o=this.getFragmentXHR();return"undefined"!=typeof o[e]&&null!==o[e]&&(o[e].abort(),o[e]=null),t=$.path.isAbsoluteUrl(t)?t:$.path.makeUrlAbsolute(t,a),n["X-Pjax"]=e,s=$.ajax({headers:n,url:t,success:function r(t,e,s){var n=i.handleAjaxResponse(t,e,s,null);i.trigger("afterloadfragment",{data:t,status:e,xhr:s,elements:n})},error:function l(t,e,s){i.trigger("loadfragmenterror",{xhr:t,status:e,error:s})},complete:function h(){var t=i.getFragmentXHR();"undefined"!=typeof t[e]&&null!==t[e]&&(t[e]=null)}}),o[e]=s,s},handleAjaxResponse:function _(t,e,i,s){var n=this,a,o,r,l,h;if(i.getResponseHeader("X-Reload")&&i.getResponseHeader("X-ControllerURL")){var c=$("base").attr("href"),d=i.getResponseHeader("X-ControllerURL"),a=$.path.isAbsoluteUrl(d)?d:$.path.makeUrlAbsolute(d,c);return void(document.location.href=a)}if(t){var u=i.getResponseHeader("X-Title");u&&(document.title=decodeURIComponent(u.replace(/\+/g," ")));var p={},f;i.getResponseHeader("Content-Type").match(/^((text)|(application))\/json[ \t]*;?/i)?p=t:(l=document.createDocumentFragment(),jQuery.clean([t],document,l,[]),h=$(jQuery.merge([],l.childNodes)),r="Content",h.is("form")&&!h.is("[data-pjax-fragment~=Content]")&&(r="CurrentForm"),p[r]=h),this.setRedrawSuppression(!0);try{$.each(p,function(t,e){var i=$("[data-pjax-fragment]").filter(function(){return $.inArray(t,$(this).data("pjaxFragment").split(" "))!=-1}),s=$(e);if(f?f.add(s):f=s,s.find(".cms-container").length)throw'Content loaded via ajax is not allowed to contain tags matching the ".cms-container" selector to avoid infinite loops';var n=i.attr("style"),a=i.parent(),o="undefined"!=typeof a.data("jlayout"),r=["east","west","center","north","south","column-hidden"],l=i.attr("class"),h=[];l&&(h=$.grep(l.split(" "),function(t){return $.inArray(t,r)>=0})),s.removeClass(r.join(" ")).addClass(h.join(" ")),n&&s.attr("style",n);var c=s.find("style").detach();c.length&&$(document).find("head").append(c),i.replaceWith(s),!a.is(".cms-container")&&o&&a.layout()});var m=f.filter("form");m.hasClass("cms-tabset")&&m.removeClass("cms-tabset").addClass("cms-tabset")}finally{this.setRedrawSuppression(!1)}return this.redraw(),this.restoreTabState(s&&"undefined"!=typeof s.tabState?s.tabState:null),f}},_findFragments:function b(t){return $("[data-pjax-fragment]").filter(function(){var e,i=$(this).data("pjaxFragment").split(" ");for(e in t)if($.inArray(t[e],i)!=-1)return!0;return!1})},refresh:function w(){$(window).trigger("statechange"),$(this).redraw()},saveTabState:function y(){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var t=[],e=this._tabStateUrl();if(this.find(".cms-tabset,.ss-tabset").each(function(e,i){var s=$(i).attr("id");s&&$(i).data("tabs")&&($(i).data("ignoreTabState")||$(i).getIgnoreTabState()||t.push({id:s,selected:$(i).tabs("option","selected")}))}),t){var i="tabs-"+e;try{window.sessionStorage.setItem(i,JSON.stringify(t))}catch(s){if(s.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw s}}}},restoreTabState:function C(t){var e=this,i=this._tabStateUrl(),s="undefined"!=typeof window.sessionStorage&&window.sessionStorage,n=s?window.sessionStorage.getItem("tabs-"+i):null,a=!!n&&JSON.parse(n);this.find(".cms-tabset, .ss-tabset").each(function(){var i,s,n=$(this),o=n.attr("id"),r=n.children("ul").children("li.ss-tabs-force-active");n.data("tabs")&&(n.tabs("refresh"),r.length?i=r.first().index():t&&t[o]?(s=n.find(t[o].tabSelector),s.length&&(i=s.index())):a&&$.each(a,function(t,e){o==e.id&&(i=e.selected)}),null!==i&&(n.tabs("option","active",i),e.trigger("tabstaterestored")))})},clearTabState:function x(t){if("undefined"!=typeof window.sessionStorage){var e=window.sessionStorage;if(t)e.removeItem("tabs-"+t);else for(var i=0;i<e.length;i++)e.key(i).match(/^tabs-/)&&e.removeItem(e.key(i))}},clearCurrentTabState:function k(){this.clearTabState(this._tabStateUrl())},_tabStateUrl:function D(){return window.location.href.replace(/\?.*/,"").replace(/#.*/,"").replace($("base").attr("href"),"")},showLoginDialog:function S(){var t=$("body").data("member-tempid"),e=$(".leftandmain-logindialog"),i="CMSSecurity/login";e.length&&e.remove(),i=$.path.addSearchParams(i,{tempid:t,BackURL:window.location.href}),e=$('<div class="leftandmain-logindialog"></div>'),e.attr("id",(new Date).getTime()),e.data("url",i),$("body").append(e)}}),$(".leftandmain-logindialog").entwine({onmatch:function I(){this._super(),this.ssdialog({iframeUrl:this.data("url"),dialogClass:"leftandmain-logindialog-dialog",autoOpen:!0,minWidth:500,maxWidth:500,minHeight:370,maxHeight:400,closeOnEscape:!1,open:function t(){$(".ui-widget-overlay").addClass("leftandmain-logindialog-overlay")},close:function e(){$(".ui-widget-overlay").removeClass("leftandmain-logindialog-overlay")}})},onunmatch:function P(){this._super()},open:function T(){this.ssdialog("open")},close:function M(){this.ssdialog("close")},toggle:function A(t){this.is(":visible")?this.close():this.open()},reauthenticate:function E(t){"undefined"!=typeof t.SecurityID&&$(":input[name=SecurityID]").val(t.SecurityID),"undefined"!=typeof t.TempID&&$("body").data("member-tempid",t.TempID),this.close()}}),$("form.loading,.cms-content.loading,.cms-content-fields.loading,.cms-content-view.loading").entwine({onmatch:function N(){this.append('<div class="cms-content-loading-overlay ui-widget-overlay-light"></div><div class="cms-content-loading-spinner"></div>'),this._super()},onunmatch:function z(){this.find(".cms-content-loading-overlay,.cms-content-loading-spinner").remove(),this._super()}}),$('.cms input[type="submit"], .cms button, .cms input[type="reset"], .cms .ss-ui-button').entwine({onadd:function H(){this.addClass("ss-ui-button"),this.data("button")||this.button(),this._super()},onremove:function F(){this.data("button")&&this.button("destroy"),this._super()}}),$(".cms .cms-panel-link").entwine({onclick:function O(t){if($(this).hasClass("external-link"))return void t.stopPropagation();var e=this.attr("href"),i=e&&!e.match(/^#/)?e:this.data("href"),s={pjax:this.data("pjaxTarget")};$(".cms-container").loadPanel(i,null,s),t.preventDefault()}}),$(".cms .ss-ui-button-ajax").entwine({onclick:function onclick(e){$(this).removeClass("ui-button-text-only"),$(this).addClass("ss-ui-button-loading ui-button-text-icons");var loading=$(this).find(".ss-ui-loading-icon");loading.length<1&&(loading=$("<span></span>").addClass("ss-ui-loading-icon ui-button-icon-primary ui-icon"),$(this).prepend(loading)),loading.show();var href=this.attr("href"),url=href?href:this.data("href");jQuery.ajax({url:url,complete:function complete(xmlhttp,status){var msg=xmlhttp.getResponseHeader("X-Status")?xmlhttp.getResponseHeader("X-Status"):xmlhttp.responseText;try{"undefined"!=typeof msg&&null!==msg&&eval(msg)}catch(e){}loading.hide(),$(".cms-container").refresh(),$(this).removeClass("ss-ui-button-loading ui-button-text-icons"),$(this).addClass("ui-button-text-only")},dataType:"html"}),e.preventDefault()}}),$(".cms .ss-ui-dialog-link").entwine({UUID:null,onmatch:function W(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function R(){this._super()},onclick:function j(){this._super();var t=this,e="ss-ui-dialog-"+this.getUUID(),i=$("#"+e);i.length||(i=$('<div class="ss-ui-dialog" id="'+e+'" />'),$("body").append(i));var s=this.data("popupclass")?this.data("popupclass"):"";return i.ssdialog({iframeUrl:this.attr("href"),autoOpen:!0,dialogExtraClass:s}),!1}}),$(".cms-content .btn-toolbar").entwine({onmatch:function L(){this.find(".ss-ui-button").click(function(){var t=this.form;t&&(t.clickedButton=this,setTimeout(function(){t.clickedButton=null},10))}),this.redraw(),this._super()},onunmatch:function U(){this._super()},redraw:function B(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.contents().filter(function(){return 3==this.nodeType&&!/\S/.test(this.nodeValue)}).remove(),this.find(".ss-ui-button").each(function(){$(this).data("button")||$(this).button()}),this.find(".ss-ui-buttonset").buttonset()}}),$(".cms .field.date input.text").entwine({onmatch:function Y(){var t=$(this).parents(".field.date:first"),e=t.data();return e.showcalendar?(e.showOn="button",e.locale&&$.datepicker.regional[e.locale]&&(e=$.extend(e,$.datepicker.regional[e.locale],{})),this.prop("disabled")||this.prop("readonly")||$(this).datepicker(e),void this._super()):void this._super()},onunmatch:function V(){this._super()}}),$(".cms .field.dropdown select, .cms .field select[multiple], .form__fieldgroup-item select.dropdown").entwine({onmatch:function Q(){return this.is(".no-chosen")?void this._super():(this.data("placeholder")||this.data("placeholder"," "),this.removeClass("has-chosen").chosen("destroy"),this.siblings(".chosen-container").remove(),applyChosen(this),void this._super())},onunmatch:function q(){this._super()}}),$(".cms-panel-layout").entwine({redraw:function X(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),$(".cms .grid-field").entwine({showDetailView:function K(t){var e=window.location.search.replace(/^\?/,"");e&&(t=$.path.addSearchParams(t,e)),$(".cms-container").loadPanel(t)}}),$(".cms-search-form").entwine({onsubmit:function G(t){var e,i;e=this.find(":input:not(:submit)").filter(function(){var t=$.grep($(this).fieldValue(),function(t){return t});return t.length}),i=this.attr("action"),e.length&&(i=$.path.addSearchParams(i,e.serialize().replace("+","%20")));var s=this.closest(".cms-container");return s.find(".cms-edit-form").tabs("select",0),s.loadPanel(i,"",{},!0),!1}}),$(".cms-search-form button[type=reset], .cms-search-form input[type=reset]").entwine({onclick:function Z(t){t.preventDefault();var e=$(this).parents("form");e.clearForm(),e.find(".dropdown select").prop("selectedIndex",0).trigger("chosen:updated"),e.submit()}}),window._panelDeferredCache={},$(".cms-panel-deferred").entwine({onadd:function J(){this._super(),this.redraw()},onremove:function tt(){window.debug&&console.log("saving",this.data("url"),this),this.data("deferredNoCache")||(window._panelDeferredCache[this.data("url")]=this.html()),this._super()},redraw:function et(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var t=this,e=this.data("url");if(!e)throw'Elements of class .cms-panel-deferred need a "data-url" attribute';this._super(),this.children().length||(this.data("deferredNoCache")||"undefined"==typeof window._panelDeferredCache[e]?(this.addClass("loading"),$.ajax({url:e,complete:function i(){t.removeClass("loading")},success:function s(e,i,n){t.html(e)}})):this.html(window._panelDeferredCache[e]))}}),$(".cms-tabset").entwine({onadd:function it(){this.redrawTabs(),this._super()},onremove:function st(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function nt(){this.rewriteHashlinks();var t=this.attr("id"),e=this.find("ul:first .ui-tabs-active");this.data("uiTabs")||this.tabs({active:e.index()!=-1?e.index():0,beforeLoad:function i(t,e){return!1},activate:function s(t,e){var i=$(this).closest("form").find(".btn-toolbar");$(e.newTab).closest("li").hasClass("readonly")?i.fadeOut():i.show()}}),this.trigger("afterredrawtabs")},rewriteHashlinks:function at(){$(this).find("ul a").each(function(){if($(this).attr("href")){var t=$(this).attr("href").match(/#.*/);t&&$(this).attr("href",document.location.href.replace(/#.*/,"")+t[0])}})}}),$("#filters-button").entwine({onmatch:function ot(){this._super(),this.data("collapsed",!0),this.data("animating",!1)},onunmatch:function rt(){this._super()},showHide:function lt(){var t=this,e=$(".cms-content-filters").first(),i=this.data("collapsed");this.data("animating")||(this.toggleClass("active"),this.data("animating",!0),e[i?"slideDown":"slideUp"]({complete:function s(){t.data("collapsed",!i),t.data("animating",!1)}}))},onclick:function ht(){this.showHide()}})});var statusMessage=function t(e,i){e=jQuery("<div/>").text(e).html(),jQuery.noticeAdd({text:e,type:i,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}}).call(exports,__webpack_require__(1))},function(t,e,i){(function(t){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}var s=i(1),n=e(s);i(94),n["default"].widget("ssui.button",n["default"].ui.button,{options:{alternate:{icon:null,text:null},showingAlternate:!1},toggleAlternate:function a(){this._trigger("ontogglealternate")!==!1&&(this.options.alternate.icon||this.options.alternate.text)&&(this.options.showingAlternate=!this.options.showingAlternate,this.refresh())},_refreshAlternate:function o(){this._trigger("beforerefreshalternate"),(this.options.alternate.icon||this.options.alternate.text)&&(this.options.showingAlternate?(this.element.find(".ui-button-icon-primary").hide(),this.element.find(".ui-button-text").hide(),this.element.find(".ui-button-icon-alternate").show(),this.element.find(".ui-button-text-alternate").show()):(this.element.find(".ui-button-icon-primary").show(),this.element.find(".ui-button-text").show(),this.element.find(".ui-button-icon-alternate").hide(),this.element.find(".ui-button-text-alternate").hide()),this._trigger("afterrefreshalternate"))},_resetButton:function r(){var t=this.element.data("icon-primary"),e=this.element.data("icon-secondary");t||(t=this.element.data("icon")),t&&(this.options.icons.primary="btn-icon-"+t),e&&(this.options.icons.secondary="btn-icon-"+e),n["default"].ui.button.prototype._resetButton.call(this),this.options.alternate.text||(this.options.alternate.text=this.element.data("text-alternate")),this.options.alternate.icon||(this.options.alternate.icon=this.element.data("icon-alternate")),this.options.showingAlternate||(this.options.showingAlternate=this.element.hasClass("ss-ui-alternate")),this.options.alternate.icon&&this.buttonElement.append("<span class='ui-button-icon-alternate ui-button-icon-primary ui-icon btn-icon-"+this.options.alternate.icon+"'></span>"),this.options.alternate.text&&this.buttonElement.append("<span class='ui-button-text-alternate ui-button-text'>"+this.options.alternate.text+"</span>"),this._refreshAlternate()},refresh:function l(){n["default"].ui.button.prototype.refresh.call(this),this._refreshAlternate()},destroy:function h(){this.element.find(".ui-button-text-alternate").remove(),this.element.find(".ui-button-icon-alternate").remove(),n["default"].ui.button.prototype.destroy.call(this)}}),n["default"].widget("ssui.ssdialog",n["default"].ui.dialog,{options:{iframeUrl:"",reloadOnOpen:!0,dialogExtraClass:"",modal:!0,bgiframe:!0,autoOpen:!1,autoPosition:!0,minWidth:500,maxWidth:800,minHeight:300,maxHeight:700,widthRatio:.8,heightRatio:.8,resizable:!1},_create:function c(){n["default"].ui.dialog.prototype._create.call(this);var t=this,e=(0,n["default"])('<iframe marginWidth="0" marginHeight="0" frameBorder="0" scrolling="auto"></iframe>');e.bind("load",function(i){"about:blank"!=(0,n["default"])(this).attr("src")&&(e.addClass("loaded").show(),t._resizeIframe(),t.uiDialog.removeClass("loading"))}).hide(),this.options.dialogExtraClass&&this.uiDialog.addClass(this.options.dialogExtraClass),this.element.append(e),this.options.iframeUrl&&this.element.css("overflow","hidden")},open:function d(){n["default"].ui.dialog.prototype.open.call(this);var t=this,e=this.element.children("iframe");!this.options.iframeUrl||e.hasClass("loaded")&&!this.options.reloadOnOpen||(e.hide(),e.attr("src",this.options.iframeUrl),this.uiDialog.addClass("loading")),(0,n["default"])(window).bind("resize.ssdialog",function(){t._resizeIframe()})},close:function u(){n["default"].ui.dialog.prototype.close.call(this),this.uiDialog.unbind("resize.ssdialog"),(0,n["default"])(window).unbind("resize.ssdialog")},_resizeIframe:function p(){var e={},i,s,a=this.element.children("iframe");this.options.widthRatio&&(i=(0,n["default"])(window).width()*this.options.widthRatio,this.options.minWidth&&i<this.options.minWidth?e.width=this.options.minWidth:this.options.maxWidth&&i>this.options.maxWidth?e.width=this.options.maxWidth:e.width=i),this.options.heightRatio&&(s=(0,n["default"])(window).height()*this.options.heightRatio,this.options.minHeight&&s<this.options.minHeight?e.height=this.options.minHeight:this.options.maxHeight&&s>this.options.maxHeight?e.height=this.options.maxHeight:e.height=s),t.isEmptyObject(e)||(this._setOptions(e),a.attr("width",e.width-parseFloat(this.element.css("paddingLeft"))-parseFloat(this.element.css("paddingRight"))),a.attr("height",e.height-parseFloat(this.element.css("paddingTop"))-parseFloat(this.element.css("paddingBottom"))),this.options.autoPosition&&this._setOption("position",this.options.position))}}),n["default"].widget("ssui.titlebar",{_create:function f(){this.originalTitle=this.element.attr("title");var t=this,e=this.options,i=e.title||this.originalTitle||" ",s=n["default"].ui.dialog.getTitleId(this.element);this.element.parent().addClass("ui-dialog");var a=this.element.addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix");if(e.closeButton)var o=(0,n["default"])('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){o.addClass("ui-state-hover")},function(){o.removeClass("ui-state-hover")}).focus(function(){o.addClass("ui-state-focus")}).blur(function(){o.removeClass("ui-state-focus")}).mousedown(function(t){t.stopPropagation()}).appendTo(a),r=(this.uiDialogTitlebarCloseText=(0,n["default"])("<span/>")).addClass("ui-icon ui-icon-closethick").text(e.closeText).appendTo(o);var l=(0,n["default"])("<span/>").addClass("ui-dialog-title").attr("id",s).html(i).prependTo(a);a.find("*").add(a).disableSelection()},destroy:function m(){this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.originalTitle&&this.element.attr("title",this.originalTitle)}}),n["default"].extend(n["default"].ssui.titlebar,{version:"0.0.1",options:{title:"",closeButton:!1,closeText:"close"},uuid:0,getTitleId:function g(t){return"ui-dialog-title-"+(t.attr("id")||++this.uuid)}})}).call(e,i(1))},function(module,exports,__webpack_require__){(function(jQuery){/*! jQuery UI - v1.9.2 - 2012-11-23
|
|
* http://jqueryui.com
|
|
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.slider.js, jquery.ui.sortable.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
|
|
* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */
|
|
/*!
|
|
* Contains fix for 1.10 back ported manually
|
|
* https://github.com/jquery/jquery-ui/commit/c241313f1d31b18751a81c1321662512d8086cbc
|
|
* plus a fix to ui.selectable widgetEventPrefix being incorrect
|
|
*/
|
|
!function(t,e){function i(e,i){var n,a,o,r=e.nodeName.toLowerCase();return"area"===r?(n=e.parentNode,a=n.name,!(!e.href||!a||"map"!==n.nodeName.toLowerCase())&&(o=t("img[usemap=#"+a+"]")[0],!!o&&s(o))):(/input|select|textarea|button|object/.test(r)?!e.disabled:"a"===r?e.href||i:i)&&s(e)}function s(e){return t.expr.filters.visible(e)&&!t(e).parents().andSelf().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var n=0,a=/^ui-id-\d+$/;t.ui=t.ui||{},t.ui.version||(t.extend(t.ui,{version:"1.9.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({_focus:t.fn.focus,focus:function(e,i){return"number"==typeof e?this.each(function(){var s=this;setTimeout(function(){t(s).focus(),i&&i.call(s)},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var s=t(this[0]),n,a;s.length&&s[0]!==document;){if(n=s.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(a=parseInt(s.css("zIndex"),10),!isNaN(a)&&0!==a))return a;s=s.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var s=t.attr(e,"tabindex"),n=isNaN(s);return(n||s>=0)&&i(e,!n)}}),t(function(){var e=document.body,i=e.appendChild(i=document.createElement("div"));i.offsetHeight,t.extend(i.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),t.support.minHeight=100===i.offsetHeight,t.support.selectstart="onselectstart"in i,e.removeChild(i).style.display="none"}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,s){function n(e,i,s,n){return t.each(a,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),n&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var a="Width"===s?["Left","Right"]:["Top","Bottom"],o=s.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+s]=function(i){return i===e?r["inner"+s].call(this):this.each(function(){t(this).css(o,n(this,i)+"px")})},t.fn["outer"+s]=function(e,i){return"number"!=typeof e?r["outer"+s].call(this,e):this.each(function(){t(this).css(o,n(this,e,!0,i)+"px")})}}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),function(){var e=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];t.ui.ie=!!e.length,t.ui.ie6=6===parseFloat(e[1],10)}(),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,s){var n,a=t.ui[e].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(t,e,i){var s,n=t.plugins[e];if(n&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(s=0;s<n.length;s++)t.options[n[s][0]]&&n[s][1].apply(t.element,i)}},contains:t.contains,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||(e[s]=1,n=e[s]>0,e[s]=0,n)},isOverAxis:function(t,e,i){return t>e&&t<e+i},isOver:function(e,i,s,n,a,o){return t.ui.isOverAxis(e,s,a)&&t.ui.isOverAxis(i,n,o)}}))}(jQuery),function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i=0,s;null!=(s=e[i]);i++)try{t(s).triggerHandler("remove")}catch(a){}n(e)},t.widget=function(e,i,s){var n,a,o,r,l=e.split(".")[0];e=e.split(".")[1],n=l+"-"+e,s||(s=i,i=t.Widget),t.expr[":"][n.toLowerCase()]=function(e){return!!t.data(e,n)},t[l]=t[l]||{},a=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new o(t,e)},t.extend(o,a,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),r=new i,r.options=t.widget.extend({},r.options),t.each(s,function(e,n){t.isFunction(n)&&(s[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},s=function(t){return i.prototype[e].apply(this,t)};return function(){var e=this._super,i=this._superApply,a;return this._super=t,this._superApply=s,a=n.apply(this,arguments),this._super=e,this._superApply=i,a}}())}),o.prototype=t.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix||e:e},s,{constructor:o,namespace:l,widgetName:e,widgetBaseClass:n,widgetFullName:n}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o)},t.widget.extend=function(i){for(var n=s.call(arguments,1),a=0,o=n.length,r,l;a<o;a++)for(r in n[a])l=n[a][r],n[a].hasOwnProperty(r)&&l!==e&&(t.isPlainObject(l)?i[r]=t.isPlainObject(i[r])?t.widget.extend({},i[r],l):t.widget.extend({},l):i[r]=l);return i},t.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;t.fn[i]=function(o){var r="string"==typeof o,l=s.call(arguments,1),h=this;return o=!r&&l.length?t.widget.extend.apply(null,[o].concat(l)):o,r?this.each(function(){var s,n=t.data(this,a);return n?t.isFunction(n[o])&&"_"!==o.charAt(0)?(s=n[o].apply(n,l),s!==n&&s!==e?(h=s&&s.jquery?h.pushStack(s.get()):s,!1):void 0):t.error("no such method '"+o+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+o+"'")}):this.each(function(){var e=t.data(this,a);e?e.option(o||{})._init():t.data(this,a,new n(o,this))}),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetName,this),t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n=i,a,o,r;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(n={},a=i.split("."),i=a.shift(),a.length){for(o=n[i]=t.widget.extend({},this.options[i]),r=0;r<a.length-1;r++)o[a[r]]=o[a[r]]||{},o=o[a[r]];if(i=a.pop(),s===e)return o[i]===e?null:o[i];o[i]=s}else{if(s===e)return this.options[i]===e?null:this.options[i];n[i]=s}return this._setOptions(n),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(e,i,s){var n,a=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,o){function r(){if(e||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof o?a[o]:o).apply(a,arguments)}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||t.guid++);var l=s.match(/^(\w+)\s*(.*)$/),h=l[1]+a.eventNamespace,c=l[2];c?n.delegate(c,h,r):i.bind(h,r)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,a,o=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],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(t.isFunction(o)&&o.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,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),o=!t.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&t.effects&&(t.effects.effect[r]||t.uiBackCompat!==!1&&t.effects[r])?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){t(this)[e](),a&&a.call(s[0]),i()})}}),t.uiBackCompat!==!1&&(t.Widget.prototype._getCreateOptions=function(){return t.metadata&&t.metadata.get(this.element[0])[this.widgetName]})}(jQuery),function(t,e){var i=!1;t(document).mouseup(function(t){i=!1}),t.widget("ui.mouse",{version:"1.9.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){if(!0===t.data(i.target,e.widgetName+".preventClickEvent"))return t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!i){this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var s=this,n=1===e.which,a=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(n&&!a&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.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 s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),i=!0,!0))}},_mouseMove:function(e){return!t.ui.ie||document.documentMode>=9||e.button?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):this._mouseUp(e)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(t){return this.mouseDelayMet},_mouseStart:function(t){},_mouseDrag:function(t){},_mouseStop:function(t){},_mouseCapture:function(t){return!0}})}(jQuery),function(t,e){function i(t,e,i){return[parseInt(t[0],10)*(u.test(t[0])?e/100:1),parseInt(t[1],10)*(u.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}t.ui=t.ui||{};var n,a=Math.max,o=Math.abs,r=Math.round,l=/left|center|right/,h=/top|center|bottom/,c=/[\+\-]\d+%?/,d=/^\w+/,u=/%$/,p=t.fn.position;t.position={scrollbarWidth:function(){if(n!==e)return n;var i,s,a=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=a.children()[0];return t("body").append(a),i=o.offsetWidth,a.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=a[0].clientWidth),a.remove(),n=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,a="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:n?t.position.scrollbarWidth():0,height:a?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return p.apply(this,arguments);e=t.extend({},e);var n,u,f,m,g,v=t(e.of),_=t.position.getWithinInfo(e.within),b=t.position.getScrollInfo(_),w=v[0],y=(e.collision||"flip").split(" "),C={};return 9===w.nodeType?(u=v.width(),f=v.height(),m={top:0,left:0}):t.isWindow(w)?(u=v.width(),f=v.height(),m={top:v.scrollTop(),left:v.scrollLeft()}):w.preventDefault?(e.at="left top",u=f=0,m={top:w.pageY,left:w.pageX}):(u=v.outerWidth(),f=v.outerHeight(),m=v.offset()),g=t.extend({},m),t.each(["my","at"],function(){var t=(e[this]||"").split(" "),i,s;1===t.length&&(t=l.test(t[0])?t.concat(["center"]):h.test(t[0])?["center"].concat(t):["center","center"]),t[0]=l.test(t[0])?t[0]:"center",t[1]=h.test(t[1])?t[1]:"center",i=c.exec(t[0]),s=c.exec(t[1]),C[this]=[i?i[0]:0,s?s[0]:0],e[this]=[d.exec(t[0])[0],d.exec(t[1])[0]]}),1===y.length&&(y[1]=y[0]),"right"===e.at[0]?g.left+=u:"center"===e.at[0]&&(g.left+=u/2),"bottom"===e.at[1]?g.top+=f:"center"===e.at[1]&&(g.top+=f/2),n=i(C.at,u,f),g.left+=n[0],g.top+=n[1],this.each(function(){var l,h,c=t(this),d=c.outerWidth(),p=c.outerHeight(),w=s(this,"marginLeft"),x=s(this,"marginTop"),k=d+w+s(this,"marginRight")+b.width,D=p+x+s(this,"marginBottom")+b.height,S=t.extend({},g),I=i(C.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?S.left-=d:"center"===e.my[0]&&(S.left-=d/2),"bottom"===e.my[1]?S.top-=p:"center"===e.my[1]&&(S.top-=p/2),S.left+=I[0],S.top+=I[1],t.support.offsetFractions||(S.left=r(S.left),S.top=r(S.top)),l={marginLeft:w,marginTop:x},t.each(["left","top"],function(i,s){t.ui.position[y[i]]&&t.ui.position[y[i]][s](S,{targetWidth:u,targetHeight:f,elemWidth:d,elemHeight:p,collisionPosition:l,collisionWidth:k,collisionHeight:D,offset:[n[0]+I[0],n[1]+I[1]],my:e.my,at:e.at,within:_,elem:c})}),t.fn.bgiframe&&c.bgiframe(),e.using&&(h=function(t){var i=m.left-S.left,s=i+u-d,n=m.top-S.top,r=n+f-p,l={target:{element:v,left:m.left,top:m.top,width:u,height:f},element:{element:c,left:S.left,top:S.top,width:d,height:p},horizontal:s<0?"left":i>0?"right":"center",vertical:r<0?"top":n>0?"bottom":"middle"};u<d&&o(i+s)<u&&(l.horizontal="center"),f<p&&o(n+r)<f&&(l.vertical="middle"),a(o(i),o(s))>a(o(n),o(r))?l.important="horizontal":l.important="vertical",e.using.call(this,t,l)}),c.offset(t.extend(S,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,r=s-o,l=o+e.collisionWidth-n-s,h;e.collisionWidth>n?r>0&&l<=0?(h=t.left+r+e.collisionWidth-n-s,t.left+=r-h):l>0&&r<=0?t.left=s:r>l?t.left=s+n-e.collisionWidth:t.left=s:r>0?t.left+=r:l>0?t.left-=l:t.left=a(t.left-o,t.left)},top:function(t,e){var i=e.within,s=i.isWindow?i.scrollTop:i.offset.top,n=e.within.height,o=t.top-e.collisionPosition.marginTop,r=s-o,l=o+e.collisionHeight-n-s,h;e.collisionHeight>n?r>0&&l<=0?(h=t.top+r+e.collisionHeight-n-s,t.top+=r-h):l>0&&r<=0?t.top=s:r>l?t.top=s+n-e.collisionHeight:t.top=s:r>0?t.top+=r:l>0?t.top-=l:t.top=a(t.top-o,t.top)}},flip:{left:function(t,e){var i=e.within,s=i.offset.left+i.scrollLeft,n=i.width,a=i.isWindow?i.scrollLeft:i.offset.left,r=t.left-e.collisionPosition.marginLeft,l=r-a,h=r+e.collisionWidth-n-a,c="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,d="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,u=-2*e.offset[0],p,f;l<0?(p=t.left+c+d+u+e.collisionWidth-n-s,(p<0||p<o(l))&&(t.left+=c+d+u)):h>0&&(f=t.left-e.collisionPosition.marginLeft+c+d+u-a,(f>0||o(f)<h)&&(t.left+=c+d+u))},top:function(t,e){var i=e.within,s=i.offset.top+i.scrollTop,n=i.height,a=i.isWindow?i.scrollTop:i.offset.top,r=t.top-e.collisionPosition.marginTop,l=r-a,h=r+e.collisionHeight-n-a,c="top"===e.my[1],d=c?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,u="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,p=-2*e.offset[1],f,m;l<0?(m=t.top+d+u+p+e.collisionHeight-n-s,t.top+d+u+p>l&&(m<0||m<o(l))&&(t.top+=d+u+p)):h>0&&(f=t.top-e.collisionPosition.marginTop+d+u+p-a,t.top+d+u+p>h&&(f>0||o(f)<h)&&(t.top+=d+u+p))}},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)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&n<11,e.innerHTML="",i.removeChild(e)}(),t.uiBackCompat!==!1&&!function(t){var i=t.fn.position;t.fn.position=function(s){if(!s||!s.offset)return i.call(this,s);var n=s.offset.split(" "),a=s.at.split(" ");return 1===n.length&&(n[1]=n[0]),/^\d/.test(n[0])&&(n[0]="+"+n[0]),/^\d/.test(n[1])&&(n[1]="+"+n[1]),1===a.length&&(/left|center|right/.test(a[0])?a[1]="center":(a[1]=a[0],a[0]="center")),i.call(this,t.extend(s,{at:a[0]+n[0]+" "+a[1]+n[1],offset:e}))}}(jQuery)}(jQuery),function(t,e){var i=0,s={},n={};s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="hide",n.height=n.paddingTop=n.paddingBottom=n.borderTopWidth=n.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.9.2",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.accordionId="ui-accordion-"+(this.element.attr("id")||++i),s=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset"),this.headers=this.element.find(s.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this._hoverable(this.headers),this._focusable(this.headers),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide(),s.collapsible||s.active!==!1&&null!=s.active||(s.active=0),s.active<0&&(s.active+=this.headers.length),this.active=this._findActive(s.active).addClass("ui-accordion-header-active ui-state-active").toggleClass("ui-corner-all ui-corner-top"),this.active.next().addClass("ui-accordion-content-active").show(),this._createIcons(),this.refresh(),this.element.attr("role","tablist"),this.headers.attr("role","tab").each(function(i){var s=t(this),n=s.attr("id"),a=s.next(),o=a.attr("id");n||(n=e+"-header-"+i,s.attr("id",n)),o||(o=e+"-panel-"+i,a.attr("id",o)),s.attr("aria-controls",o),a.attr("aria-labelledby",n)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._on(this.headers,{keydown:"_keydown"}),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._setupEvents(s.event)},_getCreateEventData:function(){return{header:this.active,content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?void this._activate(e):("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("disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e)))},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),a=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(t(e.target).attr("tabIndex",-1),t(a).attr("tabIndex",0),a.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e,i,s=this.options.heightStyle,n=this.element.parent();"fill"===s?(t.support.minHeight||(i=n.css("overflow"),n.css("overflow","hidden")),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))}),i&&n.css("overflow",i),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(){e=Math.max(e,t(this).css("height","").height())}).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={};e&&(t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._on(this.headers,i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?t():n.next(),l=s.next(),h={oldHeader:s,oldPanel:l,newHeader:o?t():n,newPanel:r};e.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",e,h)===!1||(i.active=!o&&this.headers.index(n),this.active=a?t():n,this._toggle(h),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-expanded":"false","aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,e,i){var a,o,r,l=this,h=0,c=t.length&&(!e.length||t.index()<e.index()),d=this.options.animate||{},u=c&&d.down||d,p=function(){l._toggleComplete(i)};return"number"==typeof u&&(r=u),"string"==typeof u&&(o=u),o=o||u.easing||d.easing,r=r||u.duration||d.duration,e.length?t.length?(a=t.show().outerHeight(),e.animate(s,{duration:r,easing:o,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(n,{duration:r,easing:o,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?h+=i.now:"content"!==l.options.heightStyle&&(i.now=Math.round(a-e.outerHeight()-h),h=0)}})):e.animate(s,r,o,p):t.animate(n,r,o,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.uiBackCompat!==!1&&(!function(t,e){t.extend(e.options,{navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}});var i=e._create;e._create=function(){if(this.options.navigation){var e=this,s=this.element.find(this.options.header),n=s.next(),a=s.add(n).find("a").filter(this.options.navigationFilter)[0];a&&s.add(n).each(function(i){if(t.contains(this,a))return e.options.active=Math.floor(i/2),!1})}i.call(this)}}(jQuery,jQuery.ui.accordion.prototype),function(t,e){t.extend(e.options,{heightStyle:null,autoHeight:!0,clearStyle:!1,fillSpace:!1});var i=e._create,s=e._setOption;t.extend(e,{_create:function(){this.options.heightStyle=this.options.heightStyle||this._mergeHeightStyle(),i.call(this)},_setOption:function(t){"autoHeight"!==t&&"clearStyle"!==t&&"fillSpace"!==t||(this.options.heightStyle=this._mergeHeightStyle()),s.apply(this,arguments)},_mergeHeightStyle:function(){var t=this.options;return t.fillSpace?"fill":t.clearStyle?"content":t.autoHeight?"auto":void 0}})}(jQuery,jQuery.ui.accordion.prototype),function(t,e){t.extend(e.options.icons,{activeHeader:null,headerSelected:"ui-icon-triangle-1-s"});var i=e._createIcons;e._createIcons=function(){this.options.icons&&(this.options.icons.activeHeader=this.options.icons.activeHeader||this.options.icons.headerSelected),i.call(this)}}(jQuery,jQuery.ui.accordion.prototype),function(t,e){e.activate=e._activate;var i=e._findActive;e._findActive=function(t){return t===-1&&(t=!1),t&&"number"!=typeof t&&(t=this.headers.index(this.headers.filter(t)),t===-1&&(t=!1)),i.call(this,t)}}(jQuery,jQuery.ui.accordion.prototype),jQuery.ui.accordion.prototype.resize=jQuery.ui.accordion.prototype.refresh,function(t,e){t.extend(e.options,{change:null,changestart:null});var i=e._trigger;e._trigger=function(t,e,s){var n=i.apply(this,arguments);return!!n&&("beforeActivate"===t?n=i.call(this,"changestart",e,{oldHeader:s.oldHeader,oldContent:s.oldPanel,newHeader:s.newHeader,newContent:s.newPanel}):"activate"===t&&(n=i.call(this,"change",e,{oldHeader:s.oldHeader,oldContent:s.oldPanel,newHeader:s.newHeader,newContent:s.newPanel})),n)}}(jQuery,jQuery.ui.accordion.prototype),function(t,e){t.extend(e.options,{animate:null,animated:"slide"});var i=e._create;e._create=function(){var t=this.options;null===t.animate&&(t.animated?"slide"===t.animated?t.animate=300:"bounceslide"===t.animated?t.animate={duration:200,down:{easing:"easeOutBounce",duration:1e3}}:t.animate=t.animated:t.animate=!1),i.call(this)}}(jQuery,jQuery.ui.accordion.prototype))}(jQuery),function(t,e){var i=0;t.widget("ui.autocomplete",{version:"1.9.2",defaultElement:"<input>",options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,void(i=!0);e=!1,s=!1,i=!1;var a=t.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:e=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case a.UP:e=!0,this._keyEvent("previous",n);break;case a.DOWN:e=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,void s.preventDefault();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,void t.preventDefault()):void this._searchTimeout(t);
|
|
},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete").appendTo(this.document.find(this.options.appendTo||"body")[0]).menu({input:t(),role:null}).zIndex(this.element.zIndex()+1).hide().data("menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)});var s=i.item.data("ui-autocomplete-item")||i.item.data("item.autocomplete");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item")||e.item.data("item.autocomplete"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element),t.fn.bgiframe&&this.menu.element.bgiframe(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this.document.find(e||"body")[0]),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isMultiLine:function(){return!!this.element.is("textarea")||!this.element.is("input")&&this.element.prop("isContentEditable")},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,e=++i;return function(s){e===i&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(i,e),this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})}(jQuery),function(t,e){var i,s,n,a,o="ui-button ui-widget ui-state-default ui-corner-all",r="ui-state-hover ui-state-active ",l="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var e=t(this).find(":ui-button");setTimeout(function(){e.button("refresh")},1)},c=function(e){var i=e.name,s=e.form,n=t([]);return i&&(n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.9.2",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var e=this,r=this.options,l="checkbox"===this.type||"radio"===this.type,d=l?"":"ui-state-active",u="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===i&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(d)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){e.buttonElement.addClass(u)}).bind("blur"+this.eventNamespace,function(){e.buttonElement.removeClass(u)}),l&&(this.element.bind("change"+this.eventNamespace,function(){a||e.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){r.disabled||(a=!1,s=t.pageX,n=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){r.disabled||s===t.pageX&&n===t.pageY||(a=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return!r.disabled&&!a&&(t(this).toggleClass("ui-state-active"),void e.buttonElement.attr("aria-pressed",e.element[0].checked))}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||a)return!1;t(this).addClass("ui-state-active"),e.buttonElement.attr("aria-pressed","true");var i=e.element[0];c(i).not(i).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return!r.disabled&&(t(this).addClass("ui-state-active"),i=this,void e.document.one("mouseup",function(){i=null}))}).bind("mouseup"+this.eventNamespace,function(){return!r.disabled&&void t(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(e){return!r.disabled&&void(e.keyCode!==t.ui.keyCode.SPACE&&e.keyCode!==t.ui.keyCode.ENTER||t(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(o+" "+r+" "+l).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?void(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1)):void this._resetButton()},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?c(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var e=this.buttonElement.removeClass(l),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,a=[];s.primary||s.secondary?(this.options.text&&a.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(a.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):a.push("ui-button-text-only"),e.addClass(a.join(" "))}}),t.widget("ui.buttonset",{version:"1.9.2",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function($,undefined){function Datepicker(){this.debug=!1,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},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(e,"mouseout",function(){$(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!=-1&&$(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!=-1&&$(this).removeClass("ui-datepicker-next-hover")}).delegate(e,"mouseover",function(){$.datepicker._isDisabledDatepicker(instActive.inline?t.parent()[0]:instActive.input[0])||($(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),$(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!=-1&&$(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!=-1&&$(this).addClass("ui-datepicker-next-hover"))})}function extendRemove(t,e){$.extend(t,e);for(var i in e)null!=e[i]&&e[i]!=undefined||(t[i]=e[i]);return t}$.extend($.ui,{datepicker:{version:"1.9.2"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return extendRemove(this._defaults,t||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline="div"==nodeName||"span"==nodeName;target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),"input"==nodeName?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(t,e){var i=t[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:i,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(t,e){var i=$(t);e.append=$([]),e.trigger=$([]),i.hasClass(this.markerClassName)||(this._attachments(i,e),i.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(t,i,s){e.settings[i]=s}).bind("getData.datepicker",function(t,i){return this._get(e,i)}),this._autoSize(e),$.data(t,PROP_NAME,e),e.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,e){var i=this._get(e,"appendText"),s=this._get(e,"isRTL");e.append&&e.append.remove(),i&&(e.append=$('<span class="'+this._appendClass+'">'+i+"</span>"),t[s?"before":"after"](e.append)),t.unbind("focus",this._showDatepicker),e.trigger&&e.trigger.remove();var n=this._get(e,"showOn");if("focus"!=n&&"both"!=n||t.focus(this._showDatepicker),"button"==n||"both"==n){var a=this._get(e,"buttonText"),o=this._get(e,"buttonImage");e.trigger=$(this._get(e,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:o,alt:a,title:a}):$('<button type="button"></button>').addClass(this._triggerClass).html(""==o?a:$("<img/>").attr({src:o,alt:a,title:a}))),t[s?"before":"after"](e.trigger),e.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==t[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=t[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(t[0])):$.datepicker._showDatepicker(t[0]),!1})}},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e=new Date(2009,11,20),i=this._get(t,"dateFormat");if(i.match(/[DM]/)){var s=function(t){for(var e=0,i=0,s=0;s<t.length;s++)t[s].length>e&&(e=t[s].length,i=s);return i};e.setMonth(s(this._get(t,i.match(/MM/)?"monthNames":"monthNamesShort"))),e.setDate(s(this._get(t,i.match(/DD/)?"dayNames":"dayNamesShort"))+20-e.getDay())}t.input.attr("size",this._formatDate(t,e).length)}},_inlineDatepicker:function(t,e){var i=$(t);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(e.dpDiv).bind("setData.datepicker",function(t,i,s){e.settings[i]=s}).bind("getData.datepicker",function(t,i){return this._get(e,i)}),$.data(t,PROP_NAME,e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.settings.disabled&&this._disableDatepicker(t),e.dpDiv.css("display","block"))},_dialogDatepicker:function(t,e,i,s,n){var a=this._dialogInst;if(!a){this.uuid+=1;var o="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+o+'" style="position: absolute; top: -100px; width: 0px;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),a=this._dialogInst=this._newInst(this._dialogInput,!1),a.settings={},$.data(this._dialogInput[0],PROP_NAME,a)}if(extendRemove(a.settings,s||{}),e=e&&e.constructor==Date?this._formatDate(a,e):e,this._dialogInput.val(e),this._pos=n?n.length?n:[n.pageX,n.pageY]:null,!this._pos){var r=document.documentElement.clientWidth,l=document.documentElement.clientHeight,h=document.documentElement.scrollLeft||document.body.scrollLeft,c=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[r/2-100+h,l/2-150+c]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),a.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,a),this},_destroyDatepicker:function(t){var e=$(t),i=$.data(t,PROP_NAME);if(e.hasClass(this.markerClassName)){var s=t.nodeName.toLowerCase();$.removeData(t,PROP_NAME),"input"==s?(i.append.remove(),i.trigger.remove(),e.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!=s&&"span"!=s||e.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(t){var e=$(t),i=$.data(t,PROP_NAME);if(e.hasClass(this.markerClassName)){var s=t.nodeName.toLowerCase();if("input"==s)t.disabled=!1,i.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if("div"==s||"span"==s){var n=e.children("."+this._inlineClass);n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)}this._disabledInputs=$.map(this._disabledInputs,function(e){return e==t?null:e})}},_disableDatepicker:function(t){var e=$(t),i=$.data(t,PROP_NAME);if(e.hasClass(this.markerClassName)){var s=t.nodeName.toLowerCase();if("input"==s)t.disabled=!0,i.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if("div"==s||"span"==s){var n=e.children("."+this._inlineClass);n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)}this._disabledInputs=$.map(this._disabledInputs,function(e){return e==t?null:e}),this._disabledInputs[this._disabledInputs.length]=t}},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]==t)return!0;return!1},_getInst:function(t){try{return $.data(t,PROP_NAME)}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,e,i){var s=this._getInst(t);if(2==arguments.length&&"string"==typeof e)return"defaults"==e?$.extend({},$.datepicker._defaults):s?"all"==e?$.extend({},s.settings):this._get(s,e):null;var n=e||{};if("string"==typeof e&&(n={},n[e]=i),s){this._curInst==s&&this._hideDatepicker();var a=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(s,"min"),r=this._getMinMaxDate(s,"max");extendRemove(s.settings,n),null!==o&&n.dateFormat!==undefined&&n.minDate===undefined&&(s.settings.minDate=this._formatDate(s,o)),null!==r&&n.dateFormat!==undefined&&n.maxDate===undefined&&(s.settings.maxDate=this._formatDate(s,r)),this._attachments($(t),s),this._autoSize(s),this._setDate(s,a),this._updateAlternate(s),this._updateDatepicker(s)}},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(t){var e=$.datepicker._getInst(t.target),i=!0,s=e.dpDiv.is(".ui-datepicker-rtl");if(e._keyEvent=!0,$.datepicker._datepickerShowing)switch(t.keyCode){case 9:$.datepicker._hideDatepicker(),i=!1;break;case 13:var n=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",e.dpDiv);n[0]&&$.datepicker._selectDay(t.target,e.selectedMonth,e.selectedYear,n[0]);var a=$.datepicker._get(e,"onSelect");if(a){var o=$.datepicker._formatDate(e);a.apply(e.input?e.input[0]:null,[o,e])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(t.target,t.ctrlKey?-$.datepicker._get(e,"stepBigMonths"):-$.datepicker._get(e,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(t.target,t.ctrlKey?+$.datepicker._get(e,"stepBigMonths"):+$.datepicker._get(e,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&$.datepicker._clearDate(t.target),i=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&$.datepicker._gotoToday(t.target),i=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&$.datepicker._adjustDate(t.target,s?1:-1,"D"),i=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&$.datepicker._adjustDate(t.target,t.ctrlKey?-$.datepicker._get(e,"stepBigMonths"):-$.datepicker._get(e,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&$.datepicker._adjustDate(t.target,-7,"D"),i=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&$.datepicker._adjustDate(t.target,s?-1:1,"D"),i=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&$.datepicker._adjustDate(t.target,t.ctrlKey?+$.datepicker._get(e,"stepBigMonths"):+$.datepicker._get(e,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&$.datepicker._adjustDate(t.target,7,"D"),i=t.ctrlKey||t.metaKey;break;default:i=!1}else 36==t.keyCode&&t.ctrlKey?$.datepicker._showDatepicker(this):i=!1;i&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var e=$.datepicker._getInst(t.target);if($.datepicker._get(e,"constrainInput")){var i=$.datepicker._possibleChars($.datepicker._get(e,"dateFormat")),s=String.fromCharCode(t.charCode==undefined?t.keyCode:t.charCode);return t.ctrlKey||t.metaKey||s<" "||!i||i.indexOf(s)>-1}},_doKeyUp:function(t){var e=$.datepicker._getInst(t.target);if(e.input.val()!=e.lastVal)try{var i=$.datepicker.parseDate($.datepicker._get(e,"dateFormat"),e.input?e.input.val():null,$.datepicker._getFormatConfig(e));i&&($.datepicker._setDateFromField(e),$.datepicker._updateAlternate(e),$.datepicker._updateDatepicker(e))}catch(s){$.datepicker.log(s)}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!=t.nodeName.toLowerCase()&&(t=$("input",t.parentNode)[0]),!$.datepicker._isDisabledDatepicker(t)&&$.datepicker._lastInput!=t){var e=$.datepicker._getInst(t);$.datepicker._curInst&&$.datepicker._curInst!=e&&($.datepicker._curInst.dpDiv.stop(!0,!0),e&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var i=$.datepicker._get(e,"beforeShow"),s=i?i.apply(t,[t,e]):{};if(s!==!1){extendRemove(e.settings,s),e.lastVal=null,$.datepicker._lastInput=t,$.datepicker._setDateFromField(e),$.datepicker._inDialog&&(t.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(t),$.datepicker._pos[1]+=t.offsetHeight);var n=!1;$(t).parents().each(function(){return n|="fixed"==$(this).css("position"),!n});var a={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};if($.datepicker._pos=null,e.dpDiv.empty(),e.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(e),a=$.datepicker._checkOffset(e,a,n),e.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":n?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),!e.inline){var o=$.datepicker._get(e,"showAnim"),r=$.datepicker._get(e,"duration"),l=function(){var t=e.dpDiv.find("iframe.ui-datepicker-cover");if(t.length){var i=$.datepicker._getBorders(e.dpDiv);t.css({left:-i[0],top:-i[1],width:e.dpDiv.outerWidth(),height:e.dpDiv.outerHeight()})}};e.dpDiv.zIndex($(t).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&($.effects.effect[o]||$.effects[o])?e.dpDiv.show(o,$.datepicker._get(e,"showOptions"),r,l):e.dpDiv[o||"show"](o?r:null,l),o&&r||l(),e.input.is(":visible")&&!e.input.is(":disabled")&&e.input.focus(),$.datepicker._curInst=e}}}},_updateDatepicker:function(t){this.maxRows=4;var e=$.datepicker._getBorders(t.dpDiv);instActive=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var i=t.dpDiv.find("iframe.ui-datepicker-cover");i.length&&i.css({left:-e[0],top:-e[1],width:t.dpDiv.outerWidth(),height:t.dpDiv.outerHeight()}),t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var s=this._getNumberOfMonths(t),n=s[1],a=17;if(t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&t.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),t.dpDiv[(1!=s[0]||1!=s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t==$.datepicker._curInst&&$.datepicker._datepickerShowing&&t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&t.input[0]!=document.activeElement&&t.input.focus(),t.yearshtml){var o=t.yearshtml;setTimeout(function(){o===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),o=t.yearshtml=null},0)}},_getBorders:function(t){var e=function(t){return{thin:1,medium:2,thick:3}[t]||t};return[parseFloat(e(t.css("border-left-width"))),parseFloat(e(t.css("border-top-width")))]},_checkOffset:function(t,e,i){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),a=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,r=document.documentElement.clientWidth+(i?0:$(document).scrollLeft()),l=document.documentElement.clientHeight+(i?0:$(document).scrollTop());return e.left-=this._get(t,"isRTL")?s-a:0,e.left-=i&&e.left==t.input.offset().left?$(document).scrollLeft():0,e.top-=i&&e.top==t.input.offset().top+o?$(document).scrollTop():0,e.left-=Math.min(e.left,e.left+s>r&&r>s?Math.abs(e.left+s-r):0),e.top-=Math.min(e.top,e.top+n>l&&l>n?Math.abs(n+o):0),e},_findPos:function(t){for(var e=this._getInst(t),i=this._get(e,"isRTL");t&&("hidden"==t.type||1!=t.nodeType||$.expr.filters.hidden(t));)t=t[i?"previousSibling":"nextSibling"];var s=$(t).offset();return[s.left,s.top]},_hideDatepicker:function(t){var e=this._curInst;if(e&&(!t||e==$.data(t,PROP_NAME))&&this._datepickerShowing){var i=this._get(e,"showAnim"),s=this._get(e,"duration"),n=function(){$.datepicker._tidyDialog(e)};$.effects&&($.effects.effect[i]||$.effects[i])?e.dpDiv.hide(i,$.datepicker._get(e,"showOptions"),s,n):e.dpDiv["slideDown"==i?"slideUp":"fadeIn"==i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1;var a=this._get(e,"onClose");a&&a.apply(e.input?e.input[0]:null,[e.input?e.input.val():"",e]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if($.datepicker._curInst){var e=$(t.target),i=$.datepicker._getInst(e[0]);(e[0].id==$.datepicker._mainDivId||0!=e.parents("#"+$.datepicker._mainDivId).length||e.hasClass($.datepicker.markerClassName)||e.closest("."+$.datepicker._triggerClass).length||!$.datepicker._datepickerShowing||$.datepicker._inDialog&&$.blockUI)&&(!e.hasClass($.datepicker.markerClassName)||$.datepicker._curInst==i)||$.datepicker._hideDatepicker()}},_adjustDate:function(t,e,i){var s=$(t),n=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(n,e+("M"==i?this._get(n,"showCurrentAtPos"):0),i),this._updateDatepicker(n))},_gotoToday:function(t){var e=$(t),i=this._getInst(e[0]);if(this._get(i,"gotoCurrent")&&i.currentDay)i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear;else{var s=new Date;i.selectedDay=s.getDate(),i.drawMonth=i.selectedMonth=s.getMonth(),i.drawYear=i.selectedYear=s.getFullYear()}this._notifyChange(i),this._adjustDate(e)},_selectMonthYear:function(t,e,i){var s=$(t),n=this._getInst(s[0]);n["selected"+("M"==i?"Month":"Year")]=n["draw"+("M"==i?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),
|
|
this._notifyChange(n),this._adjustDate(s)},_selectDay:function(t,e,i,s){var n=$(t);if(!$(s).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(n[0])){var a=this._getInst(n[0]);a.selectedDay=a.currentDay=$("a",s).html(),a.selectedMonth=a.currentMonth=e,a.selectedYear=a.currentYear=i,this._selectDate(t,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear))}},_clearDate:function(t){var e=$(t),i=this._getInst(e[0]);this._selectDate(e,"")},_selectDate:function(t,e){var i=$(t),s=this._getInst(i[0]);e=null!=e?e:this._formatDate(s),s.input&&s.input.val(e),this._updateAlternate(s);var n=this._get(s,"onSelect");n?n.apply(s.input?s.input[0]:null,[e,s]):s.input&&s.input.trigger("change"),s.inline?this._updateDatepicker(s):(this._hideDatepicker(),this._lastInput=s.input[0],"object"!=typeof s.input[0]&&s.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var e=this._get(t,"altField");if(e){var i=this._get(t,"altFormat")||this._get(t,"dateFormat"),s=this._getDate(t),n=this.formatDate(i,s,this._getFormatConfig(t));$(e).each(function(){$(this).val(n)})}},noWeekends:function(t){var e=t.getDay();return[e>0&&e<6,""]},iso8601Week:function(t){var e=new Date(t.getTime());e.setDate(e.getDate()+4-(e.getDay()||7));var i=e.getTime();return e.setMonth(0),e.setDate(1),Math.floor(Math.round((i-e)/864e5)/7)+1},parseDate:function(t,e,i){if(null==t||null==e)throw"Invalid arguments";if(e="object"==typeof e?e.toString():e+"",""==e)return null;var s=(i?i.shortYearCutoff:null)||this._defaults.shortYearCutoff;s="string"!=typeof s?s:(new Date).getFullYear()%100+parseInt(s,10);for(var n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,o=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,l=-1,h=-1,c=-1,d=-1,u=!1,p=function(e){var i=_+1<t.length&&t.charAt(_+1)==e;return i&&_++,i},f=function(t){var i=p(t),s="@"==t?14:"!"==t?20:"y"==t&&i?4:"o"==t?3:2,n=new RegExp("^\\d{1,"+s+"}"),a=e.substring(v).match(n);if(!a)throw"Missing number at position "+v;return v+=a[0].length,parseInt(a[0],10)},m=function(t,i,s){var n=$.map(p(t)?s:i,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)}),a=-1;if($.each(n,function(t,i){var s=i[1];if(e.substr(v,s.length).toLowerCase()==s.toLowerCase())return a=i[0],v+=s.length,!1}),a!=-1)return a+1;throw"Unknown name at position "+v},g=function(){if(e.charAt(v)!=t.charAt(_))throw"Unexpected literal at position "+v;v++},v=0,_=0;_<t.length;_++)if(u)"'"!=t.charAt(_)||p("'")?g():u=!1;else switch(t.charAt(_)){case"d":c=f("d");break;case"D":m("D",n,a);break;case"o":d=f("o");break;case"m":h=f("m");break;case"M":h=m("M",o,r);break;case"y":l=f("y");break;case"@":var b=new Date(f("@"));l=b.getFullYear(),h=b.getMonth()+1,c=b.getDate();break;case"!":var b=new Date((f("!")-this._ticksTo1970)/1e4);l=b.getFullYear(),h=b.getMonth()+1,c=b.getDate();break;case"'":p("'")?g():u=!0;break;default:g()}if(v<e.length){var w=e.substr(v);if(!/^\s+/.test(w))throw"Extra/unparsed characters found in date: "+w}if(l==-1?l=(new Date).getFullYear():l<100&&(l+=(new Date).getFullYear()-(new Date).getFullYear()%100+(l<=s?0:-100)),d>-1)for(h=1,c=d;;){var y=this._getDaysInMonth(l,h-1);if(c<=y)break;h++,c-=y}var b=this._daylightSavingAdjust(new Date(l,h-1,c));if(b.getFullYear()!=l||b.getMonth()+1!=h||b.getDate()!=c)throw"Invalid date";return b},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";var s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,n=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,r=function(e){var i=u+1<t.length&&t.charAt(u+1)==e;return i&&u++,i},l=function(t,e,i){var s=""+e;if(r(t))for(;s.length<i;)s="0"+s;return s},h=function(t,e,i,s){return r(t)?s[e]:i[e]},c="",d=!1;if(e)for(var u=0;u<t.length;u++)if(d)"'"!=t.charAt(u)||r("'")?c+=t.charAt(u):d=!1;else switch(t.charAt(u)){case"d":c+=l("d",e.getDate(),2);break;case"D":c+=h("D",e.getDay(),s,n);break;case"o":c+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":c+=l("m",e.getMonth()+1,2);break;case"M":c+=h("M",e.getMonth(),a,o);break;case"y":c+=r("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":c+=e.getTime();break;case"!":c+=1e4*e.getTime()+this._ticksTo1970;break;case"'":r("'")?c+="'":d=!0;break;default:c+=t.charAt(u)}return c},_possibleChars:function(t){for(var e="",i=!1,s=function(e){var i=n+1<t.length&&t.charAt(n+1)==e;return i&&n++,i},n=0;n<t.length;n++)if(i)"'"!=t.charAt(n)||s("'")?e+=t.charAt(n):i=!1;else switch(t.charAt(n)){case"d":case"m":case"y":case"@":e+="0123456789";break;case"D":case"M":return null;case"'":s("'")?e+="'":i=!0;break;default:e+=t.charAt(n)}return e},_get:function(t,e){return t.settings[e]!==undefined?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!=t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n,a;n=a=this._getDefaultDate(t);var o=this._getFormatConfig(t);try{n=this.parseDate(i,s,o)||a}catch(r){this.log(r),s=e?"":s}t.selectedDay=n.getDate(),t.drawMonth=t.selectedMonth=n.getMonth(),t.drawYear=t.selectedYear=n.getFullYear(),t.currentDay=s?n.getDate():0,t.currentMonth=s?n.getMonth():0,t.currentYear=s?n.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(t,e,i){var s=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},n=function(e){try{return $.datepicker.parseDate($.datepicker._get(t,"dateFormat"),e,$.datepicker._getFormatConfig(t))}catch(i){}for(var s=(e.toLowerCase().match(/^c/)?$.datepicker._getDate(t):null)||new Date,n=s.getFullYear(),a=s.getMonth(),o=s.getDate(),r=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=r.exec(e);l;){switch(l[2]||"d"){case"d":case"D":o+=parseInt(l[1],10);break;case"w":case"W":o+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),o=Math.min(o,$.datepicker._getDaysInMonth(n,a));break;case"y":case"Y":n+=parseInt(l[1],10),o=Math.min(o,$.datepicker._getDaysInMonth(n,a))}l=r.exec(e)}return new Date(n,a,o)},a=null==e||""===e?i:"string"==typeof e?n(e):"number"==typeof e?isNaN(e)?i:s(e):new Date(e.getTime());return a=a&&"Invalid Date"==a.toString()?i:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,a=t.selectedYear,o=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=o.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=o.getMonth(),t.drawYear=t.selectedYear=t.currentYear=o.getFullYear(),n==t.selectedMonth&&a==t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""==t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(t){var e=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(i,-e,"M")},next:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(i,+e,"M")},hide:function(){window["DP_jQuery_"+dpuuid].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+dpuuid].datepicker._gotoToday(i)},selectDay:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(i,this,"Y"),!1}};$(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e=new Date;e=this._daylightSavingAdjust(new Date(e.getFullYear(),e.getMonth(),e.getDate()));var i=this._get(t,"isRTL"),s=this._get(t,"showButtonPanel"),n=this._get(t,"hideIfNoPrevNext"),a=this._get(t,"navigationAsDateFormat"),o=this._getNumberOfMonths(t),r=this._get(t,"showCurrentAtPos"),l=this._get(t,"stepMonths"),h=1!=o[0]||1!=o[1],c=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),d=this._getMinMaxDate(t,"min"),u=this._getMinMaxDate(t,"max"),p=t.drawMonth-r,f=t.drawYear;if(p<0&&(p+=12,f--),u){var m=this._daylightSavingAdjust(new Date(u.getFullYear(),u.getMonth()-o[0]*o[1]+1,u.getDate()));for(m=d&&m<d?d:m;this._daylightSavingAdjust(new Date(f,p,1))>m;)p--,p<0&&(p=11,f--)}t.drawMonth=p,t.drawYear=f;var g=this._get(t,"prevText");g=a?this.formatDate(g,this._daylightSavingAdjust(new Date(f,p-l,1)),this._getFormatConfig(t)):g;var v=this._canAdjustMonth(t,-1,f,p)?'<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="'+g+'"><span class="ui-icon ui-icon-circle-triangle-'+(i?"e":"w")+'">'+g+"</span></a>":n?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+g+'"><span class="ui-icon ui-icon-circle-triangle-'+(i?"e":"w")+'">'+g+"</span></a>",_=this._get(t,"nextText");_=a?this.formatDate(_,this._daylightSavingAdjust(new Date(f,p+l,1)),this._getFormatConfig(t)):_;var b=this._canAdjustMonth(t,1,f,p)?'<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="'+_+'"><span class="ui-icon ui-icon-circle-triangle-'+(i?"w":"e")+'">'+_+"</span></a>":n?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+_+'"><span class="ui-icon ui-icon-circle-triangle-'+(i?"w":"e")+'">'+_+"</span></a>",w=this._get(t,"currentText"),y=this._get(t,"gotoCurrent")&&t.currentDay?c:e;w=a?this.formatDate(w,y,this._getFormatConfig(t)):w;var C=t.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">'+this._get(t,"closeText")+"</button>",x=s?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(i?C:"")+(this._isInRange(t,y)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click">'+w+"</button>":"")+(i?"":C)+"</div>":"",k=parseInt(this._get(t,"firstDay"),10);k=isNaN(k)?0:k;for(var D=this._get(t,"showWeek"),S=this._get(t,"dayNames"),I=this._get(t,"dayNamesShort"),P=this._get(t,"dayNamesMin"),T=this._get(t,"monthNames"),M=this._get(t,"monthNamesShort"),A=this._get(t,"beforeShowDay"),E=this._get(t,"showOtherMonths"),N=this._get(t,"selectOtherMonths"),z=this._get(t,"calculateWeek")||this.iso8601Week,H=this._getDefaultDate(t),F="",O=0;O<o[0];O++){var W="";this.maxRows=4;for(var R=0;R<o[1];R++){var j=this._daylightSavingAdjust(new Date(f,p,t.selectedDay)),L=" ui-corner-all",U="";if(h){if(U+='<div class="ui-datepicker-group',o[1]>1)switch(R){case 0:U+=" ui-datepicker-group-first",L=" ui-corner-"+(i?"right":"left");break;case o[1]-1:U+=" ui-datepicker-group-last",L=" ui-corner-"+(i?"left":"right");break;default:U+=" ui-datepicker-group-middle",L=""}U+='">'}U+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+L+'">'+(/all|left/.test(L)&&0==O?i?b:v:"")+(/all|right/.test(L)&&0==O?i?v:b:"")+this._generateMonthYearHeader(t,p,f,d,u,O>0||R>0,T,M)+'</div><table class="ui-datepicker-calendar"><thead><tr>';for(var B=D?'<th class="ui-datepicker-week-col">'+this._get(t,"weekHeader")+"</th>":"",Y=0;Y<7;Y++){var V=(Y+k)%7;B+="<th"+((Y+k+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+S[V]+'">'+P[V]+"</span></th>"}U+=B+"</tr></thead><tbody>";var Q=this._getDaysInMonth(f,p);f==t.selectedYear&&p==t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,Q));var q=(this._getFirstDayOfMonth(f,p)-k+7)%7,X=Math.ceil((q+Q)/7),K=h&&this.maxRows>X?this.maxRows:X;this.maxRows=K;for(var G=this._daylightSavingAdjust(new Date(f,p,1-q)),Z=0;Z<K;Z++){U+="<tr>";for(var J=D?'<td class="ui-datepicker-week-col">'+this._get(t,"calculateWeek")(G)+"</td>":"",Y=0;Y<7;Y++){var tt=A?A.apply(t.input?t.input[0]:null,[G]):[!0,""],et=G.getMonth()!=p,it=et&&!N||!tt[0]||d&&G<d||u&&G>u;J+='<td class="'+((Y+k+6)%7>=5?" ui-datepicker-week-end":"")+(et?" ui-datepicker-other-month":"")+(G.getTime()==j.getTime()&&p==t.selectedMonth&&t._keyEvent||H.getTime()==G.getTime()&&H.getTime()==j.getTime()?" "+this._dayOverClass:"")+(it?" "+this._unselectableClass+" ui-state-disabled":"")+(et&&!E?"":" "+tt[1]+(G.getTime()==c.getTime()?" "+this._currentClass:"")+(G.getTime()==e.getTime()?" ui-datepicker-today":""))+'"'+(et&&!E||!tt[2]?"":' title="'+tt[2]+'"')+(it?"":' data-handler="selectDay" data-event="click" data-month="'+G.getMonth()+'" data-year="'+G.getFullYear()+'"')+">"+(et&&!E?" ":it?'<span class="ui-state-default">'+G.getDate()+"</span>":'<a class="ui-state-default'+(G.getTime()==e.getTime()?" ui-state-highlight":"")+(G.getTime()==c.getTime()?" ui-state-active":"")+(et?" ui-priority-secondary":"")+'" href="#">'+G.getDate()+"</a>")+"</td>",G.setDate(G.getDate()+1),G=this._daylightSavingAdjust(G)}U+=J+"</tr>"}p++,p>11&&(p=0,f++),U+="</tbody></table>"+(h?"</div>"+(o[0]>0&&R==o[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),W+=U}F+=W}return F+=x+($.ui.ie6&&!t.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),t._keyEvent=!1,F},_generateMonthYearHeader:function(t,e,i,s,n,a,o,r){var l=this._get(t,"changeMonth"),h=this._get(t,"changeYear"),c=this._get(t,"showMonthAfterYear"),d='<div class="ui-datepicker-title">',u="";if(a||!l)u+='<span class="ui-datepicker-month">'+o[e]+"</span>";else{var p=s&&s.getFullYear()==i,f=n&&n.getFullYear()==i;u+='<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';for(var m=0;m<12;m++)(!p||m>=s.getMonth())&&(!f||m<=n.getMonth())&&(u+='<option value="'+m+'"'+(m==e?' selected="selected"':"")+">"+r[m]+"</option>");u+="</select>"}if(c||(d+=u+(!a&&l&&h?"":" ")),!t.yearshtml)if(t.yearshtml="",a||!h)d+='<span class="ui-datepicker-year">'+i+"</span>";else{var g=this._get(t,"yearRange").split(":"),v=(new Date).getFullYear(),_=function(t){var e=t.match(/c[+-].*/)?i+parseInt(t.substring(1),10):t.match(/[+-].*/)?v+parseInt(t,10):parseInt(t,10);return isNaN(e)?v:e},b=_(g[0]),w=Math.max(b,_(g[1]||""));for(b=s?Math.max(b,s.getFullYear()):b,w=n?Math.min(w,n.getFullYear()):w,t.yearshtml+='<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';b<=w;b++)t.yearshtml+='<option value="'+b+'"'+(b==i?' selected="selected"':"")+">"+b+"</option>";t.yearshtml+="</select>",d+=t.yearshtml,t.yearshtml=null}return d+=this._get(t,"yearSuffix"),c&&(d+=(!a&&l&&h?"":" ")+u),d+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"==i?e:0),n=t.drawMonth+("M"==i?e:0),a=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"==i?e:0),o=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,a)));t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),"M"!=i&&"Y"!=i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&e<i?i:e;return n=s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),a=this._daylightSavingAdjust(new Date(i,s+(e<0?e:n[0]*n[1]),1));return e<0&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(t,a)},_isInRange:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max");return(!i||e.getTime()>=i.getTime())&&(!s||e.getTime()<=s.getTime())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),$.fn.datepicker=function(t){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find(document.body).append($.datepicker.dpDiv),$.datepicker.initialized=!0);var e=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!=t&&"getDate"!=t&&"widget"!=t?"option"==t&&2==arguments.length&&"string"==typeof arguments[1]?$.datepicker["_"+t+"Datepicker"].apply($.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?$.datepicker["_"+t+"Datepicker"].apply($.datepicker,[this].concat(e)):$.datepicker._attachDatepicker(this,t)}):$.datepicker["_"+t+"Datepicker"].apply($.datepicker,[this[0]].concat(e))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.9.2",window["DP_jQuery_"+dpuuid]=$}(jQuery),function(t,e){var i="ui-dialog ui-widget ui-widget-content ui-corner-all ",s={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},n={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.9.2",options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;i<0&&t(this).css("top",e.top-i)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),"string"!=typeof this.originalTitle&&(this.originalTitle=""),this.oldPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.options.title=this.options.title||this.originalTitle;var e=this,s=this.options,n=s.title||" ",a,o,r,l,h;a=(this.uiDialog=t("<div>")).addClass(i+s.dialogClass).css({display:"none",outline:0,zIndex:s.zIndex}).attr("tabIndex",-1).keydown(function(i){s.closeOnEscape&&!i.isDefaultPrevented()&&i.keyCode&&i.keyCode===t.ui.keyCode.ESCAPE&&(e.close(i),i.preventDefault())}).mousedown(function(t){e.moveToTop(!1,t)}).appendTo("body"),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(a),o=(this.uiDialogTitlebar=t("<div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").bind("mousedown",function(){a.focus()}).prependTo(a),r=t("<a href='#'></a>").addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").click(function(t){t.preventDefault(),e.close(t)}).appendTo(o),(this.uiDialogTitlebarCloseText=t("<span>")).addClass("ui-icon ui-icon-closethick").text(s.closeText).appendTo(r),l=t("<span>").uniqueId().addClass("ui-dialog-title").html(n).prependTo(o),h=(this.uiDialogButtonPane=t("<div>")).addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),(this.uiButtonSet=t("<div>")).addClass("ui-dialog-buttonset").appendTo(h),a.attr({role:"dialog","aria-labelledby":l.attr("id")}),o.find("*").add(o).disableSelection(),this._hoverable(r),this._focusable(r),s.draggable&&t.fn.draggable&&this._makeDraggable(),s.resizable&&t.fn.resizable&&this._makeResizable(),this._createButtons(s.buttons),this._isOpen=!1,t.fn.bgiframe&&a.bgiframe(),this._on(a,{keydown:function(e){if(s.modal&&e.keyCode===t.ui.keyCode.TAB){var i=t(":tabbable",a),n=i.filter(":first"),o=i.filter(":last");return e.target!==o[0]||e.shiftKey?e.target===n[0]&&e.shiftKey?(o.focus(1),!1):void 0:(n.focus(1),!1)}}})},_init:function(){this.options.autoOpen&&this.open()},_destroy:function(){var t,e=this.oldPosition;this.overlay&&this.overlay.destroy(),this.uiDialog.hide(),this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},close:function(e){var i=this,s,n;if(this._isOpen&&!1!==this._trigger("beforeClose",e))return this._isOpen=!1,this.overlay&&this.overlay.destroy(),this.options.hide?this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}):(this.uiDialog.hide(),this._trigger("close",e)),t.ui.dialog.overlay.resize(),this.options.modal&&(s=0,t(".ui-dialog").each(function(){this!==i.uiDialog[0]&&(n=t(this).css("z-index"),isNaN(n)||(s=Math.max(s,n)))}),t.ui.dialog.maxZ=s),this},isOpen:function(){return this._isOpen},moveToTop:function(e,i){var s=this.options,n;return s.modal&&!e||!s.stack&&!s.modal?this._trigger("focus",i):(s.zIndex>t.ui.dialog.maxZ&&(t.ui.dialog.maxZ=s.zIndex),this.overlay&&(t.ui.dialog.maxZ+=1,t.ui.dialog.overlay.maxZ=t.ui.dialog.maxZ,this.overlay.$el.css("z-index",t.ui.dialog.overlay.maxZ)),n={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()},t.ui.dialog.maxZ+=1,this.uiDialog.css("z-index",t.ui.dialog.maxZ),this.element.attr(n),this._trigger("focus",i),this)},open:function(){if(!this._isOpen){var e,i=this.options,s=this.uiDialog;return this._size(),this._position(i.position),s.show(i.show),this.overlay=i.modal?new t.ui.dialog.overlay(this):null,this.moveToTop(!0),e=this.element.find(":tabbable"),e.length||(e=this.uiDialogButtonPane.find(":tabbable"),e.length||(e=s)),e.eq(0).focus(),this._isOpen=!0,this._trigger("open"),this}},_createButtons:function(e){var i=this,s=!1;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),"object"==typeof e&&null!==e&&t.each(e,function(){return!(s=!0)}),s?(t.each(e,function(e,s){var n,a;s=t.isFunction(s)?{click:s,text:e}:s,s=t.extend({type:"button"},s),a=s.click,s.click=function(){a.apply(i.element[0],arguments)},n=t("<button></button>",s).appendTo(i.uiButtonSet),t.fn.button&&n.button()}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog)):this.uiDialog.removeClass("ui-dialog-buttons")},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,a){s.position=[a.position.left-i.document.scrollLeft(),a.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._trigger("dragStop",n,e(a)),t.ui.dialog.overlay.resize()}})},_makeResizable:function(i){function s(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}i=i===e?this.options.resizable:i;var n=this,a=this.options,o=this.uiDialog.css("position"),r="string"==typeof i?i:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:a.maxWidth,maxHeight:a.maxHeight,minWidth:a.minWidth,minHeight:this._minHeight(),handles:r,start:function(e,i){t(this).addClass("ui-dialog-resizing"),n._trigger("resizeStart",e,s(i))},resize:function(t,e){n._trigger("resize",t,s(e))},stop:function(e,i){t(this).removeClass("ui-dialog-resizing"),a.height=t(this).height(),a.width=t(this).width(),n._trigger("resizeStop",e,s(i)),t.ui.dialog.overlay.resize()}}).css("position",o).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(e){var i=[],s=[0,0],n;e?(("string"==typeof e||"object"==typeof e&&"0"in e)&&(i=e.split?e.split(" "):[e[0],e[1]],1===i.length&&(i[1]=i[0]),t.each(["left","top"],function(t,e){+i[t]===i[t]&&(s[t]=i[t],i[t]=e)}),e={my:i[0]+(s[0]<0?s[0]:"+"+s[0])+" "+i[1]+(s[1]<0?s[1]:"+"+s[1]),at:i.join(" ")}),e=t.extend({},t.ui.dialog.prototype.options.position,e)):e=t.ui.dialog.prototype.options.position,n=this.uiDialog.is(":visible"),n||this.uiDialog.show(),this.uiDialog.position(e),n||this.uiDialog.hide()},_setOptions:function(e){var i=this,a={},o=!1;t.each(e,function(t,e){i._setOption(t,e),t in s&&(o=!0),t in n&&(a[t]=e)}),o&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",a)},_setOption:function(e,s){var n,a,o=this.uiDialog;switch(e){case"buttons":this._createButtons(s);break;case"closeText":this.uiDialogTitlebarCloseText.text(""+s);break;case"dialogClass":o.removeClass(this.options.dialogClass).addClass(i+s);break;case"disabled":s?o.addClass("ui-dialog-disabled"):o.removeClass("ui-dialog-disabled");break;case"draggable":n=o.is(":data(draggable)"),n&&!s&&o.draggable("destroy"),!n&&s&&this._makeDraggable();break;case"position":this._position(s);break;case"resizable":a=o.is(":data(resizable)"),a&&!s&&o.resizable("destroy"),a&&"string"==typeof s&&o.resizable("option","handles",s),a||s===!1||this._makeResizable(s);break;case"title":t(".ui-dialog-title",this.uiDialogTitlebar).html(""+(s||" "))}this._super(e,s)},_size:function(){var e,i,s,n=this.options,a=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),n.minWidth>n.width&&(n.width=n.minWidth),e=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),i=Math.max(0,n.minHeight-e),"auto"===n.height?t.support.minHeight?this.element.css({minHeight:i,height:"auto"}):(this.uiDialog.show(),s=this.element.css("height","auto").height(),a||this.uiDialog.hide(),this.element.height(Math.max(s,i))):this.element.height(Math.max(n.height-e,0)),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),t.extend(t.ui.dialog,{uuid:0,maxZ:0,getTitleId:function(t){var e=t.attr("id");return e||(this.uuid+=1,e=this.uuid),"ui-dialog-title-"+e},overlay:function(e){this.$el=t.ui.dialog.overlay.create(e)}}),t.extend(t.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:t.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(t){return t+".dialog-overlay"}).join(" "),create:function(e){0===this.instances.length&&(setTimeout(function(){t.ui.dialog.overlay.instances.length&&t(document).bind(t.ui.dialog.overlay.events,function(e){if(t(e.target).zIndex()<t.ui.dialog.overlay.maxZ)return!1})},1),t(window).bind("resize.dialog-overlay",t.ui.dialog.overlay.resize));var i=this.oldInstances.pop()||t("<div>").addClass("ui-widget-overlay");return t(document).bind("keydown.dialog-overlay",function(s){var n=t.ui.dialog.overlay.instances;0!==n.length&&n[n.length-1]===i&&e.options.closeOnEscape&&!s.isDefaultPrevented()&&s.keyCode&&s.keyCode===t.ui.keyCode.ESCAPE&&(e.close(s),s.preventDefault())}),i.appendTo(document.body).css({width:this.width(),height:this.height()}),t.fn.bgiframe&&i.bgiframe(),this.instances.push(i),i},destroy:function(e){var i=t.inArray(e,this.instances),s=0;i!==-1&&this.oldInstances.push(this.instances.splice(i,1)[0]),0===this.instances.length&&t([document,window]).unbind(".dialog-overlay"),e.height(0).width(0).remove(),t.each(this.instances,function(){s=Math.max(s,this.css("z-index"))}),this.maxZ=s},height:function(){var e,i;return t.ui.ie?(e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),i=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),e<i?t(window).height()+"px":e+"px"):t(document).height()+"px"},width:function(){var e,i;return t.ui.ie?(e=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),i=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),e<i?t(window).width()+"px":e+"px"):t(document).width()+"px"},resize:function(){var e=t([]);t.each(t.ui.dialog.overlay.instances,function(){e=e.add(this)}),e.css({width:0,height:0}).css({width:t.ui.dialog.overlay.width(),height:t.ui.dialog.overlay.height()})}}),t.extend(t.ui.dialog.overlay.prototype,{destroy:function(){t.ui.dialog.overlay.destroy(this.$el)}})}(jQuery),function(t,e){t.widget("ui.draggable",t.ui.mouse,{version:"1.9.2",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},_create:function(){"original"!=this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return!(this.helper||i.disabled||t(e.target).is(".ui-resizable-handle"))&&(this.handle=this._getHandle(e),!!this.handle&&(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0))},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.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.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),i.containment&&this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px"),
|
|
t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=!1;t.ui.ddmanager&&!this.options.dropBehaviour&&(i=t.ui.ddmanager.drop(this,e)),this.dropped&&(i=this.dropped,this.dropped=!1);for(var s=this.element[0],n=!1;s&&(s=s.parentNode);)s==document&&(n=!0);if(!n&&"original"===this.options.helper)return!1;if("invalid"==this.options.revert&&!i||"valid"==this.options.revert&&i||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)){var a=this;t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){a._trigger("stop",e)!==!1&&a._clear()})}else this._trigger("stop",e)!==!1&&this._clear();return!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){var i=!this.options.handle||!t(this.options.handle,this.element).length;return t(this.options.handle,this.element).find("*").andSelf().each(function(){this==e.target&&(i=!0)}),i},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"==i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"==i.appendTo?this.element[0].parentNode:i.appendTo),s[0]==this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if("parent"==e.containment&&(e.containment=this.helper[0].parentNode),"document"!=e.containment&&"window"!=e.containment||(this.containment=["document"==e.containment?0:t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"==e.containment?0:t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"==e.containment?0:t(window).scrollLeft())+t("document"==e.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"==e.containment?0:t(window).scrollTop())+(t("document"==e.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(e.containment)||e.containment.constructor==Array)e.containment.constructor==Array&&(this.containment=e.containment);else{var i=t(e.containment),s=i[0];if(!s)return;var n=i.offset(),a="hidden"!=t(s).css("overflow");this.containment=[(parseInt(t(s).css("borderLeftWidth"),10)||0)+(parseInt(t(s).css("paddingLeft"),10)||0),(parseInt(t(s).css("borderTopWidth"),10)||0)+(parseInt(t(s).css("paddingTop"),10)||0),(a?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(t(s).css("borderLeftWidth"),10)||0)-(parseInt(t(s).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(a?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(t(s).css("borderTopWidth"),10)||0)-(parseInt(t(s).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i}},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"==e?1:-1,n=this.options,a="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(a[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"==this.cssPosition?-this.scrollParent.scrollTop():o?0:a.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():o?0:a.scrollLeft())*s}},_generatePosition:function(e){var i=this.options,s="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,n=/(html|body)/i.test(s[0].tagName),a=e.pageX,o=e.pageY;if(this.originalPosition){var r;if(this.containment){if(this.relative_container){var l=this.relative_container.offset();r=[this.containment[0]+l.left,this.containment[1]+l.top,this.containment[2]+l.left,this.containment[3]+l.top]}else r=this.containment;e.pageX-this.offset.click.left<r[0]&&(a=r[0]+this.offset.click.left),e.pageY-this.offset.click.top<r[1]&&(o=r[1]+this.offset.click.top),e.pageX-this.offset.click.left>r[2]&&(a=r[2]+this.offset.click.left),e.pageY-this.offset.click.top>r[3]&&(o=r[3]+this.offset.click.top)}if(i.grid){var h=i.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/i.grid[1])*i.grid[1]:this.originalPageY;o=r&&(h-this.offset.click.top<r[1]||h-this.offset.click.top>r[3])?h-this.offset.click.top<r[1]?h+i.grid[1]:h-i.grid[1]:h;var c=i.grid[0]?this.originalPageX+Math.round((a-this.originalPageX)/i.grid[0])*i.grid[0]:this.originalPageX;a=r&&(c-this.offset.click.left<r[0]||c-this.offset.click.left>r[2])?c-this.offset.click.left<r[0]?c+i.grid[0]:c-i.grid[0]:c}}return{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"==this.cssPosition?-this.scrollParent.scrollTop():n?0:s.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():n?0:s.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]==this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"==e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(t){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("draggable"),n=s.options,a=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,a))})},stop:function(e,i){var s=t(this).data("draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"==s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("draggable"),n=this,a=function(e){var i=this.offset.click.top,s=this.offset.click.left,n=this.positionAbs.top,a=this.positionAbs.left,o=e.height,r=e.width,l=e.top,h=e.left;return t.ui.isOver(n+i,a+s,l,h,o,r)};t.each(s.sortables,function(a){var o=!1,r=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!=r&&this.instance._intersectsWith(this.instance.containerCache)&&t.ui.contains(r.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i){var s=t("body"),n=t(this).data("draggable").options;s.css("cursor")&&(n._cursor=s.css("cursor")),s.css("cursor",n.cursor)},stop:function(e,i){var s=t(this).data("draggable").options;s._cursor&&t("body").css("cursor",s._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(e,i){var s=t(this).data("draggable");s.scrollParent[0]!=document&&"HTML"!=s.scrollParent[0].tagName&&(s.overflowOffset=s.scrollParent.offset())},drag:function(e,i){var s=t(this).data("draggable"),n=s.options,a=!1;s.scrollParent[0]!=document&&"HTML"!=s.scrollParent[0].tagName?(n.axis&&"x"==n.axis||(s.overflowOffset.top+s.scrollParent[0].offsetHeight-e.pageY<n.scrollSensitivity?s.scrollParent[0].scrollTop=a=s.scrollParent[0].scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(s.scrollParent[0].scrollTop=a=s.scrollParent[0].scrollTop-n.scrollSpeed)),n.axis&&"y"==n.axis||(s.overflowOffset.left+s.scrollParent[0].offsetWidth-e.pageX<n.scrollSensitivity?s.scrollParent[0].scrollLeft=a=s.scrollParent[0].scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(s.scrollParent[0].scrollLeft=a=s.scrollParent[0].scrollLeft-n.scrollSpeed))):(n.axis&&"x"==n.axis||(e.pageY-t(document).scrollTop()<n.scrollSensitivity?a=t(document).scrollTop(t(document).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<n.scrollSensitivity&&(a=t(document).scrollTop(t(document).scrollTop()+n.scrollSpeed))),n.axis&&"y"==n.axis||(e.pageX-t(document).scrollLeft()<n.scrollSensitivity?a=t(document).scrollLeft(t(document).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<n.scrollSensitivity&&(a=t(document).scrollLeft(t(document).scrollLeft()+n.scrollSpeed)))),a!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i){var s=t(this).data("draggable"),n=s.options;s.snapElements=[],t(n.snap.constructor!=String?n.snap.items||":data(draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!=s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i){for(var s=t(this).data("draggable"),n=s.options,a=n.snapTolerance,o=i.offset.left,r=o+s.helperProportions.width,l=i.offset.top,h=l+s.helperProportions.height,c=s.snapElements.length-1;c>=0;c--){var d=s.snapElements[c].left,u=d+s.snapElements[c].width,p=s.snapElements[c].top,f=p+s.snapElements[c].height;if(d-a<o&&o<u+a&&p-a<l&&l<f+a||d-a<o&&o<u+a&&p-a<h&&h<f+a||d-a<r&&r<u+a&&p-a<l&&l<f+a||d-a<r&&r<u+a&&p-a<h&&h<f+a){if("inner"!=n.snapMode){var m=Math.abs(p-h)<=a,g=Math.abs(f-l)<=a,v=Math.abs(d-r)<=a,_=Math.abs(u-o)<=a;m&&(i.position.top=s._convertPositionTo("relative",{top:p-s.helperProportions.height,left:0}).top-s.margins.top),g&&(i.position.top=s._convertPositionTo("relative",{top:f,left:0}).top-s.margins.top),v&&(i.position.left=s._convertPositionTo("relative",{top:0,left:d-s.helperProportions.width}).left-s.margins.left),_&&(i.position.left=s._convertPositionTo("relative",{top:0,left:u}).left-s.margins.left)}var b=m||g||v||_;if("outer"!=n.snapMode){var m=Math.abs(p-l)<=a,g=Math.abs(f-h)<=a,v=Math.abs(d-o)<=a,_=Math.abs(u-r)<=a;m&&(i.position.top=s._convertPositionTo("relative",{top:p,left:0}).top-s.margins.top),g&&(i.position.top=s._convertPositionTo("relative",{top:f-s.helperProportions.height,left:0}).top-s.margins.top),v&&(i.position.left=s._convertPositionTo("relative",{top:0,left:d}).left-s.margins.left),_&&(i.position.left=s._convertPositionTo("relative",{top:0,left:u-s.helperProportions.width}).left-s.margins.left)}!s.snapElements[c].snapping&&(m||g||v||_||b)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=m||g||v||_||b}else s.snapElements[c].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=!1}}}),t.ui.plugin.add("draggable","stack",{start:function(e,i){var s=t(this).data("draggable").options,n=t.makeArray(t(s.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});if(n.length){var a=parseInt(n[0].style.zIndex)||0;t(n).each(function(t){this.style.zIndex=a+t}),this[0].style.zIndex=a+n.length}}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})}(jQuery),function(t,e){t.widget("ui.droppable",{version:"1.9.2",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var e=this.options,i=e.accept;this.isover=0,this.isout=1,this.accept=t.isFunction(i)?i:function(t){return t.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},t.ui.ddmanager.droppables[e.scope]=t.ui.ddmanager.droppables[e.scope]||[],t.ui.ddmanager.droppables[e.scope].push(this),e.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=t.ui.ddmanager.droppables[this.options.scope],i=0;i<e.length;i++)e[i]==this&&e.splice(i,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"==e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!=this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!=this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current;if(!s||(s.currentItem||s.element)[0]==this.element[0])return!1;var n=!1;return this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"droppable");if(e.options.greedy&&!e.options.disabled&&e.options.scope==s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance))return n=!0,!1}),!n&&(!!this.accept.call(this.element[0],s.currentItem||s.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(e,i,s){if(!i.offset)return!1;var n=(e.positionAbs||e.position.absolute).left,a=n+e.helperProportions.width,o=(e.positionAbs||e.position.absolute).top,r=o+e.helperProportions.height,l=i.offset.left,h=l+i.proportions.width,c=i.offset.top,d=c+i.proportions.height;switch(s){case"fit":return l<=n&&a<=h&&c<=o&&r<=d;case"intersect":return l<n+e.helperProportions.width/2&&a-e.helperProportions.width/2<h&&c<o+e.helperProportions.height/2&&r-e.helperProportions.height/2<d;case"pointer":var u=(e.positionAbs||e.position.absolute).left+(e.clickOffset||e.offset.click).left,p=(e.positionAbs||e.position.absolute).top+(e.clickOffset||e.offset.click).top,f=t.ui.isOver(p,u,c,l,i.proportions.height,i.proportions.width);return f;case"touch":return(o>=c&&o<=d||r>=c&&r<=d||o<c&&r>d)&&(n>=l&&n<=h||a>=l&&a<=h||n<l&&a>h);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s=t.ui.ddmanager.droppables[e.options.scope]||[],n=i?i.type:null,a=(e.currentItem||e.element).find(":data(droppable)").andSelf();t:for(var o=0;o<s.length;o++)if(!(s[o].options.disabled||e&&!s[o].accept.call(s[o].element[0],e.currentItem||e.element))){for(var r=0;r<a.length;r++)if(a[r]==s[o].element[0]){s[o].proportions.height=0;continue t}s[o].visible="none"!=s[o].element.css("display"),s[o].visible&&("mousedown"==n&&s[o]._activate.call(s[o],i),s[o].offset=s[o].element.offset(),s[o].proportions={width:s[o].element[0].offsetWidth,height:s[o].element[0].offsetHeight})}},drop:function(e,i){var s=!1;return t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=1,this.isover=0,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s=t.ui.intersect(e,this,this.options.tolerance),n=s||1!=this.isover?s&&0==this.isover?"isover":null:"isout";if(n){var a;if(this.options.greedy){var o=this.options.scope,r=this.element.parents(":data(droppable)").filter(function(){return t.data(this,"droppable").options.scope===o});r.length&&(a=t.data(r[0],"droppable"),a.greedyChild="isover"==n?1:0)}a&&"isover"==n&&(a.isover=0,a.isout=1,a._out.call(a,i)),this[n]=1,this["isout"==n?"isover":"isout"]=0,this["isover"==n?"_over":"_out"].call(this,i),a&&"isout"==n&&(a.isout=0,a.isover=1,a._over.call(a,i))}}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}}(jQuery),jQuery.effects||function(t,e){var i=t.uiBackCompat!==!1,s="ui-effects-";t.effects={effect:{}},/*!
|
|
* jQuery Color Animations v2.0.0
|
|
* http://jquery.com/
|
|
*
|
|
* Copyright 2012 jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*
|
|
* Date: Mon Aug 13 13:41:02 2012 -0500
|
|
*/
|
|
function(e,i){function s(t,e,i){var s=d[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:s.max<t?s.max:t)}function n(t){var i=h(),s=i._rgba=[];return t=t.toLowerCase(),m(l,function(e,n){var a,o=n.re.exec(t),r=o&&n.parse(o),l=n.space||"rgba";if(r)return a=i[l](r),i[c[l].cache]=a[c[l].cache],s=i._rgba=a._rgba,!1}),s.length?("0,0,0,0"===s.join()&&e.extend(s,f.transparent),i):f[t]}function a(t,e,i){return i=(i+1)%1,6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}var o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),r=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=e.Color=function(t,i,s,n){return new e.Color.fn.parse(t,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},d={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},u=h.support={},p=e("<p>")[0],f,m=e.each;p.style.cssText="background-color:rgba(1,1,1,.5)",u.rgba=p.style.backgroundColor.indexOf("rgba")>-1,m(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=e.extend(h.prototype,{parse:function(a,o,r,l){if(a===i)return this._rgba=[null,null,null,null],this;(a.jquery||a.nodeType)&&(a=e(a).css(o),o=i);var d=this,u=e.type(a),p=this._rgba=[];return o!==i&&(a=[a,o,r,l],u="array"),"string"===u?this.parse(n(a)||f._default):"array"===u?(m(c.rgba.props,function(t,e){p[e.idx]=s(a[e.idx],e)}),this):"object"===u?(a instanceof h?m(c,function(t,e){a[e.cache]&&(d[e.cache]=a[e.cache].slice())}):m(c,function(e,i){var n=i.cache;m(i.props,function(t,e){if(!d[n]&&i.to){if("alpha"===t||null==a[t])return;d[n]=i.to(d._rgba)}d[n][e.idx]=s(a[t],e,!0)}),d[n]&&t.inArray(null,d[n].slice(0,3))<0&&(d[n][3]=1,i.from&&(d._rgba=i.from(d[n])))}),this):void 0},is:function(t){var e=h(t),i=!0,s=this;return m(c,function(t,n){var a,o=e[n.cache];return o&&(a=s[n.cache]||n.to&&n.to(s._rgba)||[],m(n.props,function(t,e){if(null!=o[e.idx])return i=o[e.idx]===a[e.idx]})),i}),i},_space:function(){var t=[],e=this;return m(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var i=h(t),n=i._space(),a=c[n],o=0===this.alpha()?h("transparent"):this,r=o[a.cache]||a.to(o._rgba),l=r.slice();return i=i[a.cache],m(a.props,function(t,n){var a=n.idx,o=r[a],h=i[a],c=d[n.type]||{};null!==h&&(null===o?l[a]=h:(c.mod&&(h-o>c.mod/2?o+=c.mod:o-h>c.mod/2&&(o-=c.mod)),l[a]=s((h-o)*e+o,n)))}),this[n](l)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(t)._rgba;return h(e.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),s=i.pop();return t&&i.push(~~(255*s)),"#"+e.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/255,i=t[1]/255,s=t[2]/255,n=t[3],a=Math.max(e,i,s),o=Math.min(e,i,s),r=a-o,l=a+o,h=.5*l,c,d;return c=o===a?0:e===a?60*(i-s)/r+360:i===a?60*(s-e)/r+120:60*(e-i)/r+240,d=0===h||1===h?h:h<=.5?r/l:r/(2-l),[Math.round(c)%360,d,h,null==n?1:n]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],n=t[3],o=s<=.5?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*a(r,o,e+1/3)),Math.round(255*a(r,o,e)),Math.round(255*a(r,o,e-1/3)),n]},m(c,function(t,n){var a=n.props,o=n.cache,l=n.to,c=n.from;h.fn[t]=function(t){if(l&&!this[o]&&(this[o]=l(this._rgba)),t===i)return this[o].slice();var n,r=e.type(t),d="array"===r||"object"===r?t:arguments,u=this[o].slice();return m(a,function(t,e){var i=d["object"===r?t:e.idx];null==i&&(i=u[e.idx]),u[e.idx]=s(i,e)}),c?(n=h(c(u)),n[o]=u,n):h(u)},m(a,function(i,s){h.fn[i]||(h.fn[i]=function(n){var a=e.type(n),o="alpha"===i?this._hsla?"hsla":"rgba":t,l=this[o](),h=l[s.idx],c;return"undefined"===a?h:("function"===a&&(n=n.call(this,h),a=e.type(n)),null==n&&s.empty?this:("string"===a&&(c=r.exec(n),c&&(n=h+parseFloat(c[2])*("+"===c[1]?1:-1))),l[s.idx]=n,this[o](l)))})})}),m(o,function(t,i){e.cssHooks[i]={set:function(t,s){var a,o,r="";if("string"!==e.type(s)||(a=n(s))){if(s=h(a||s),!u.rgba&&1!==s._rgba[3]){for(o="backgroundColor"===i?t.parentNode:t;(""===r||"transparent"===r)&&o&&o.style;)try{r=e.css(o,"backgroundColor"),o=o.parentNode}catch(l){}s=s.blend(r&&"transparent"!==r?r:"_default")}s=s.toRgbaString()}try{t.style[i]=s}catch(c){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=h(t.elem,i),t.end=h(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}}),e.cssHooks.borderColor={expand:function(t){var e={};return m(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},f=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(){var e=this.ownerDocument.defaultView?this.ownerDocument.defaultView.getComputedStyle(this,null):this.currentStyle,i={},s,n;if(e&&e.length&&e[0]&&e[e[0]])for(n=e.length;n--;)s=e[n],"string"==typeof e[s]&&(i[t.camelCase(s)]=e[s]);else for(s in e)"string"==typeof e[s]&&(i[s]=e[s]);return i}function s(e,i){var s={},n,o;for(n in i)o=i[n],e[n]!==o&&(a[n]||!t.fx.step[n]&&isNaN(parseFloat(o))||(s[n]=o));return s}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.effects.animateClass=function(e,a,o,r){var l=t.speed(a,o,r);return this.queue(function(){var a=t(this),o=a.attr("class")||"",r,h=l.children?a.find("*").andSelf():a;h=h.map(function(){var e=t(this);return{el:e,start:i.call(this)}}),r=function(){t.each(n,function(t,i){e[i]&&a[i+"Class"](e[i])})},r(),h=h.map(function(){return this.end=i.call(this.el[0]),this.diff=s(this.start,this.end),this}),a.attr("class",o),h=h.map(function(){var e=this,i=t.Deferred(),s=jQuery.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){r(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(a[0])})})},t.fn.extend({_addClass:t.fn.addClass,addClass:function(e,i,s,n){return i?t.effects.animateClass.call(this,{add:e},i,s,n):this._addClass(e)},_removeClass:t.fn.removeClass,removeClass:function(e,i,s,n){return i?t.effects.animateClass.call(this,{remove:e},i,s,n):this._removeClass(e)},_toggleClass:t.fn.toggleClass,toggleClass:function(i,s,n,a,o){return"boolean"==typeof s||s===e?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,a,o):this._toggleClass(i,s):t.effects.animateClass.call(this,{toggle:i},s,n,a)},switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function n(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function a(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||"string"==typeof e&&!t.effects.effect[e]&&(!i||!t.effects[e])}t.extend(t.effects,{version:"1.9.2",save:function(t,e){for(var i=0;i<e.length;i++)null!==e[i]&&t.data(s+e[i],t[0].style[e[i]])},restore:function(t,i){var n,a;for(a=0;a<i.length;a++)null!==i[a]&&(n=t.data(s+i[a]),n===e&&(n=""),t.css(i[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function i(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=s.complete,o=s.mode;(n.is(":hidden")?"hide"===o:"show"===o)?i():r.call(n[0],s,i)}var s=n.apply(this,arguments),a=s.mode,o=s.queue,r=t.effects.effect[s.effect],l=!r&&i&&t.effects[s.effect];return t.fx.off||!r&&!l?a?this[a](s.duration,s.complete):this.each(function(){s.complete&&s.complete.call(this)}):r?o===!1?this.each(e):this.queue(o||"fx",e):l.call(this,{options:s,duration:s.duration,callback:s.complete,mode:s.mode})},_show:t.fn.show,show:function(t){if(a(t))return this._show.apply(this,arguments);var e=n.apply(this,arguments);return e.mode="show",this.effect.call(this,e)},_hide:t.fn.hide,hide:function(t){if(a(t))return this._hide.apply(this,arguments);var e=n.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)},__toggle:t.fn.toggle,toggle:function(e){if(a(e)||"boolean"==typeof e||t.isFunction(e))return this.__toggle.apply(this,arguments);var i=n.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)},cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return t<.5?i(2*t)/2:1-i(t*-2+2)/2}})}()}(jQuery),function(t,e){var i=/up|down|vertical/,s=/up|left|vertical|horizontal/;t.effects.effect.blind=function(e,n){var a=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(a,e.mode||"hide"),l=e.direction||"up",h=i.test(l),c=h?"height":"width",d=h?"top":"left",u=s.test(l),p={},f="show"===r,m,g,v;a.parent().is(".ui-effects-wrapper")?t.effects.save(a.parent(),o):t.effects.save(a,o),a.show(),m=t.effects.createWrapper(a).css({overflow:"hidden"}),g=m[c](),v=parseFloat(m.css(d))||0,p[c]=f?g:0,u||(a.css(h?"bottom":"right",0).css(h?"top":"left","auto").css({position:"absolute"}),p[d]=f?v:g+v),f&&(m.css(c,0),u||m.css(d,v+g)),m.animate(p,{duration:e.duration,easing:e.easing,queue:!1,complete:function(){"hide"===r&&a.hide(),t.effects.restore(a,o),t.effects.removeWrapper(a),n()}})}}(jQuery),function(t,e){t.effects.effect.bounce=function(e,i){var s=t(this),n=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(s,e.mode||"effect"),o="hide"===a,r="show"===a,l=e.direction||"up",h=e.distance,c=e.times||5,d=2*c+(r||o?1:0),u=e.duration/d,p=e.easing,f="up"===l||"down"===l?"top":"left",m="up"===l||"left"===l,g,v,_,b=s.queue(),w=b.length;for((r||o)&&n.push("opacity"),t.effects.save(s,n),s.show(),t.effects.createWrapper(s),h||(h=s["top"===f?"outerHeight":"outerWidth"]()/3),r&&(_={opacity:1},_[f]=0,s.css("opacity",0).css(f,m?2*-h:2*h).animate(_,u,p)),o&&(h/=Math.pow(2,c-1)),_={},_[f]=0,g=0;g<c;g++)v={},v[f]=(m?"-=":"+=")+h,s.animate(v,u,p).animate(_,u,p),h=o?2*h:h/2;o&&(v={opacity:0},v[f]=(m?"-=":"+=")+h,s.animate(v,u,p)),s.queue(function(){o&&s.hide(),t.effects.restore(s,n),t.effects.removeWrapper(s),i()}),w>1&&b.splice.apply(b,[1,0].concat(b.splice(w,d+1))),s.dequeue()}}(jQuery),function(t,e){t.effects.effect.clip=function(e,i){var s=t(this),n=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(s,e.mode||"hide"),o="show"===a,r=e.direction||"vertical",l="vertical"===r,h=l?"height":"width",c=l?"top":"left",d={},u,p,f;t.effects.save(s,n),s.show(),u=t.effects.createWrapper(s).css({overflow:"hidden"}),p="IMG"===s[0].tagName?u:s,f=p[h](),o&&(p.css(h,0),p.css(c,f/2)),d[h]=o?f:0,d[c]=o?0:f/2,p.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){o||s.hide(),t.effects.restore(s,n),t.effects.removeWrapper(s),i()}})}}(jQuery),function(t,e){t.effects.effect.drop=function(e,i){var s=t(this),n=["position","top","bottom","left","right","opacity","height","width"],a=t.effects.setMode(s,e.mode||"hide"),o="show"===a,r=e.direction||"left",l="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r?"pos":"neg",c={opacity:o?1:0},d;t.effects.save(s,n),s.show(),t.effects.createWrapper(s),d=e.distance||s["top"===l?"outerHeight":"outerWidth"](!0)/2,o&&s.css("opacity",0).css(l,"pos"===h?-d:d),c[l]=(o?"pos"===h?"+=":"-=":"pos"===h?"-=":"+=")+d,s.animate(c,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),t.effects.removeWrapper(s),i()}})}}(jQuery),function(t,e){t.effects.effect.explode=function(e,i){function s(){p.push(this),p.length===a*o&&n()}function n(){r.css({visibility:"visible"}),t(p).remove(),h||r.hide(),i()}var a=e.pieces?Math.round(Math.sqrt(e.pieces)):3,o=a,r=t(this),l=t.effects.setMode(r,e.mode||"hide"),h="show"===l,c=r.show().css("visibility","hidden").offset(),d=Math.ceil(r.outerWidth()/o),u=Math.ceil(r.outerHeight()/a),p=[],f,m,g,v,_,b;for(f=0;f<a;f++)for(v=c.top+f*u,b=f-(a-1)/2,m=0;m<o;m++)g=c.left+m*d,_=m-(o-1)/2,r.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-m*d,top:-f*u}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:d,height:u,left:g+(h?_*d:0),top:v+(h?b*u:0),opacity:h?0:1}).animate({left:g+(h?0:_*d),top:v+(h?0:b*u),opacity:h?1:0},e.duration||500,e.easing,s)}}(jQuery),function(t,e){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}}(jQuery),function(t,e){t.effects.effect.fold=function(e,i){var s=t(this),n=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(s,e.mode||"hide"),o="show"===a,r="hide"===a,l=e.size||15,h=/([0-9]+)%/.exec(l),c=!!e.horizFirst,d=o!==c,u=d?["width","height"]:["height","width"],p=e.duration/2,f,m,g={},v={};t.effects.save(s,n),s.show(),f=t.effects.createWrapper(s).css({overflow:"hidden"}),m=d?[f.width(),f.height()]:[f.height(),f.width()],h&&(l=parseInt(h[1],10)/100*m[r?0:1]),o&&f.css(c?{height:0,width:l}:{height:l,width:0}),g[u[0]]=o?m[0]:l,v[u[1]]=o?m[1]:0,f.animate(g,p,e.easing).animate(v,p,e.easing,function(){r&&s.hide(),t.effects.restore(s,n),t.effects.removeWrapper(s),i()})}}(jQuery),function(t,e){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],a=t.effects.setMode(s,e.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}}(jQuery),function(t,e){t.effects.effect.pulsate=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"show"),a="show"===n,o="hide"===n,r=a||"hide"===n,l=2*(e.times||5)+(r?1:0),h=e.duration/l,c=0,d=s.queue(),u=d.length,p;for(!a&&s.is(":visible")||(s.css("opacity",0).show(),c=1),p=1;p<l;p++)s.animate({opacity:c},h,e.easing),c=1-c;s.animate({opacity:c},h,e.easing),s.queue(function(){o&&s.hide(),i()}),u>1&&d.splice.apply(d,[1,0].concat(d.splice(u,l+1))),s.dequeue()}}(jQuery),function(t,e){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?l:{height:l.height*r,width:l.width*r,outerHeight:l.outerHeight*r,outerWidth:l.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",l=e.origin,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=l||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:h),n.to={height:h.height*c.y,width:h.width*c.x,outerHeight:h.outerHeight*c.y,outerWidth:h.outerWidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],c=["fontSize"],d=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],u=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(o,e.mode||"effect"),f=e.restore||"effect"!==p,m=e.scale||"both",g=e.origin||["middle","center"],v=o.css("position"),_=f?r:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},"box"!==m&&"both"!==m||(a.from.y!==a.to.y&&(_=_.concat(d),o.from=t.effects.setTransition(o,d,a.from.y,o.from),o.to=t.effects.setTransition(o,d,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(u),o.from=t.effects.setTransition(o,u,a.from.x,o.from),o.to=t.effects.setTransition(o,u,a.to.x,o.to))),"content"!==m&&"both"!==m||a.from.y!==a.to.y&&(_=_.concat(c).concat(h),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),g&&(n=t.effects.getBaseline(g,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),"content"!==m&&"both"!==m||(d=d.concat(["marginTop","marginBottom"]).concat(c),u=u.concat(["marginLeft","marginRight"]),h=r.concat(d).concat(u),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,h),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,d,a.from.y,i.from),i.to=t.effects.setTransition(i,d,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,u,a.from.x,i.from),i.to=t.effects.setTransition(i,u,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,h)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}}(jQuery),function(t,e){t.effects.effect.shake=function(e,i){var s=t(this),n=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(s,e.mode||"effect"),o=e.direction||"left",r=e.distance||20,l=e.times||3,h=2*l+1,c=Math.round(e.duration/h),d="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,p={},f={},m={},g,v=s.queue(),_=v.length;for(t.effects.save(s,n),s.show(),t.effects.createWrapper(s),p[d]=(u?"-=":"+=")+r,f[d]=(u?"+=":"-=")+2*r,m[d]=(u?"-=":"+=")+2*r,s.animate(p,c,e.easing),g=1;g<l;g++)s.animate(f,c,e.easing).animate(m,c,e.easing);s.animate(f,c,e.easing).animate(p,c/2,e.easing).queue(function(){"hide"===a&&s.hide(),t.effects.restore(s,n),t.effects.removeWrapper(s),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,h+1))),s.dequeue()}}(jQuery),function(t,e){t.effects.effect.slide=function(e,i){var s=t(this),n=["position","top","bottom","left","right","width","height"],a=t.effects.setMode(s,e.mode||"show"),o="show"===a,r=e.direction||"left",l="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r,c,d={};t.effects.save(s,n),s.show(),c=e.distance||s["top"===l?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(s).css({overflow:"hidden"}),o&&s.css(l,h?isNaN(c)?"-"+c:-c:c),d[l]=(o?h?"+=":"-=":h?"-=":"+=")+c,s.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),t.effects.removeWrapper(s),i()}})}}(jQuery),function(t,e){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),a="fixed"===n.css("position"),o=t("body"),r=a?o.scrollTop():0,l=a?o.scrollLeft():0,h=n.offset(),c={top:h.top-r,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},d=s.offset(),u=t('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(e.className).css({top:d.top-r,left:d.left-l,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){u.remove(),i()})}}(jQuery),function(t,e){var i=!1;t.widget("ui.menu",{version:"1.9.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var s=t(e.target).closest(".ui-menu-item");!i&&s.not(".ui-state-disabled").length&&(i=!0,this.select(e),s.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),i=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,l=!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:l=!1,n=this.previousFilter||"",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=new RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&s.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(e.keyCode),r=new RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-—–\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".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]},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("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&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,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,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),n<0?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_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.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").end().find("a.ui-state-active").removeClass("ui-state-active")},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 ").children(".ui-menu-item").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.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?void(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),i.offset().top-s-n<0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var i,s,n;return this.active?void(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.children(".ui-menu-item").first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})}(jQuery),function(t,e){t.widget("ui.progressbar",{version:"1.9.2",options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this._value():(this._setOption("value",t),this)},_setOption:function(t,e){"value"===t&&(this.options.value=e,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),this._super(t,e)},_value:function(){var t=this.options.value;return"number"!=typeof t&&(t=0),Math.min(this.options.max,Math.max(this.min,t))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var t=this.value(),e=this._percentage();this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),this.valueDiv.toggle(t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(e.toFixed(0)+"%"),this.element.attr("aria-valuenow",t)}})}(jQuery),function(t,e){t.widget("ui.resizable",t.ui.mouse,{version:"1.9.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var e=this,i=this.options;if(this.element.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('<div class="ui-wrapper" style="overflow: hidden;"></div>').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("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=i.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor==String){"all"==this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw");var s=this.handles.split(",");this.handles={};for(var n=0;n<s.length;n++){var a=t.trim(s[n]),o="ui-resizable-"+a,r=t('<div class="ui-resizable-handle '+o+'"></div>');r.css({zIndex:i.zIndex}),"se"==a&&r.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[a]=".ui-resizable-"+a,this.element.append(r)}}this._renderAxis=function(e){e=e||this.element;for(var i in this.handles){if(this.handles[i].constructor==String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var s=t(this.handles[i],this.element),n=0;n=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth();var a=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");e.css(a,n),this._proportionallyResize()}t(this.handles[i]).length}},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!e.resizing){if(this.className)var t=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);e.axis=t&&t[1]?t[1]:"se"}}),i.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){i.disabled||(t(this).removeClass("ui-resizable-autohide"),e._handles.show())}).mouseleave(function(){i.disabled||e.resizing||(t(this).addClass("ui-resizable-autohide"),e._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var i=this.element;this.originalElement.css({position:i.css("position"),width:i.outerWidth(),height:i.outerHeight(),top:i.css("top"),left:i.css("left")}).insertAfter(i),i.remove()}return this.originalElement.css("resize",this.originalResizeStyle),e(this.originalElement),this},_mouseCapture:function(e){var i=!1;for(var s in this.handles)t(this.handles[s])[0]==e.target&&(i=!0);return!this.options.disabled&&i},_mouseStart:function(e){var s=this.options,n=this.element.position(),a=this.element;this.resizing=!0,this.documentScroll={top:t(document).scrollTop(),left:t(document).scrollLeft()},(a.is(".ui-draggable")||/absolute/.test(a.css("position")))&&a.css({position:"absolute",top:n.top,left:n.left}),this._renderProxy();var o=i(this.helper.css("left")),r=i(this.helper.css("top"));s.containment&&(o+=t(s.containment).scrollLeft()||0,r+=t(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:o,top:r},this.size=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.originalPosition={left:o,top:r},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1;var l=t(".ui-resizable-"+this.axis).css("cursor");return t("body").css("cursor","auto"==l?this.axis+"-resize":l),a.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(t){var e=this.helper,i=this.options,s={},n=this,a=this.originalMousePosition,o=this.axis,r=t.pageX-a.left||0,l=t.pageY-a.top||0,h=this._change[o];if(!h)return!1;var c=h.apply(this,[t,r,l]);return this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(c=this._updateRatio(c,t)),c=this._respectSize(c,t),this._propagate("resize",t),e.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(c),this._trigger("resize",t,this.ui()),!1},_mouseStop:function(e){this.resizing=!1;var i=this.options,s=this;if(this._helper){var n=this._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&t.ui.hasScroll(n[0],"left")?0:s.sizeDiff.height,r=a?0:s.sizeDiff.width,l={width:s.helper.width()-r,height:s.helper.height()-o},h=parseInt(s.element.css("left"),10)+(s.position.left-s.originalPosition.left)||null,c=parseInt(s.element.css("top"),10)+(s.position.top-s.originalPosition.top)||null;i.animate||this.element.css(t.extend(l,{top:c,left:h})),s.helper.height(s.size.height),s.helper.width(s.size.width),this._helper&&!i.animate&&this._proportionallyResize()}return t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e=this.options,i,n,a,o,r;r={minWidth:s(e.minWidth)?e.minWidth:0,maxWidth:s(e.maxWidth)?e.maxWidth:1/0,minHeight:s(e.minHeight)?e.minHeight:0,maxHeight:s(e.maxHeight)?e.maxHeight:1/0},(this._aspectRatio||t)&&(i=r.minHeight*this.aspectRatio,a=r.minWidth/this.aspectRatio,n=r.maxHeight*this.aspectRatio,o=r.maxWidth/this.aspectRatio,i>r.minWidth&&(r.minWidth=i),a>r.minHeight&&(r.minHeight=a),n<r.maxWidth&&(r.maxWidth=n),o<r.maxHeight&&(r.maxHeight=o)),this._vBoundaries=r},_updateCache:function(t){var e=this.options;this.offset=this.helper.offset(),s(t.left)&&(this.position.left=t.left),s(t.top)&&(this.position.top=t.top),s(t.height)&&(this.size.height=t.height),s(t.width)&&(this.size.width=t.width)},_updateRatio:function(t,e){var i=this.options,n=this.position,a=this.size,o=this.axis;return s(t.height)?t.width=t.height*this.aspectRatio:s(t.width)&&(t.height=t.width/this.aspectRatio),"sw"==o&&(t.left=n.left+(a.width-t.width),t.top=null),"nw"==o&&(t.top=n.top+(a.height-t.height),t.left=n.left+(a.width-t.width)),t},_respectSize:function(t,e){var i=this.helper,n=this._vBoundaries,a=this._aspectRatio||e.shiftKey,o=this.axis,r=s(t.width)&&n.maxWidth&&n.maxWidth<t.width,l=s(t.height)&&n.maxHeight&&n.maxHeight<t.height,h=s(t.width)&&n.minWidth&&n.minWidth>t.width,c=s(t.height)&&n.minHeight&&n.minHeight>t.height;h&&(t.width=n.minWidth),c&&(t.height=n.minHeight),r&&(t.width=n.maxWidth),l&&(t.height=n.maxHeight);var d=this.originalPosition.left+this.originalSize.width,u=this.position.top+this.size.height,p=/sw|nw|w/.test(o),f=/nw|ne|n/.test(o);h&&p&&(t.left=d-n.minWidth),r&&p&&(t.left=d-n.maxWidth),c&&f&&(t.top=u-n.minHeight),l&&f&&(t.top=u-n.maxHeight);var m=!t.width&&!t.height;return m&&!t.left&&t.top?t.top=null:m&&!t.top&&t.left&&(t.left=null),t},_proportionallyResize:function(){var e=this.options;if(this._proportionallyResizeElements.length)for(var i=this.helper||this.element,s=0;s<this._proportionallyResizeElements.length;s++){var n=this._proportionallyResizeElements[s];if(!this.borderDif){var a=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],o=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")];this.borderDif=t.map(a,function(t,e){var i=parseInt(t,10)||0,s=parseInt(o[e],10)||0;return i+s})}n.css({height:i.height()-this.borderDif[0]-this.borderDif[2]||0,width:i.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var e=this.element,i=this.options;if(this.elementOffset=e.offset(),this._helper){this.helper=this.helper||t('<div style="overflow:hidden;"></div>');var s=t.ui.ie6?1:0,n=t.ui.ie6?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+n,height:this.element.outerHeight()+n,position:"absolute",left:this.elementOffset.left-s+"px",top:this.elementOffset.top-s+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(t,e,i){return{width:this.originalSize.width+e}},w:function(t,e,i){var s=this.options,n=this.originalSize,a=this.originalPosition;return{left:a.left+e,width:n.width-e}},n:function(t,e,i){var s=this.options,n=this.originalSize,a=this.originalPosition;return{top:a.top+i,height:n.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","alsoResize",{start:function(e,i){var s=t(this).data("resizable"),n=s.options,a=function(e){t(e).each(function(){var e=t(this);e.data("resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof n.alsoResize||n.alsoResize.parentNode?a(n.alsoResize):n.alsoResize.length?(n.alsoResize=n.alsoResize[0],a(n.alsoResize)):t.each(n.alsoResize,function(t){a(t)})},resize:function(e,i){var s=t(this).data("resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},l=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("resizable-alsoresize"),a={},o=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(a[e]=i||null)}),e.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?l(n.alsoResize):t.each(n.alsoResize,function(t,e){l(t,e)})},stop:function(e,i){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","animate",{stop:function(e,i){var s=t(this).data("resizable"),n=s.options,a=s._proportionallyResizeElements,o=a.length&&/textarea/i.test(a[0].nodeName),r=o&&t.ui.hasScroll(a[0],"left")?0:s.sizeDiff.height,l=o?0:s.sizeDiff.width,h={width:s.size.width-l,height:s.size.height-r},c=parseInt(s.element.css("left"),10)+(s.position.left-s.originalPosition.left)||null,d=parseInt(s.element.css("top"),10)+(s.position.top-s.originalPosition.top)||null;s.element.animate(t.extend(h,d&&c?{top:d,left:c}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var i={width:parseInt(s.element.css("width"),10),height:parseInt(s.element.css("height"),10),top:parseInt(s.element.css("top"),10),left:parseInt(s.element.css("left"),10)};a&&a.length&&t(a[0]).css({width:i.width,height:i.height}),s._updateCache(i),s._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(e,s){var n=t(this).data("resizable"),a=n.options,o=n.element,r=a.containment,l=r instanceof t?r.get(0):/parent/.test(r)?o.parent().get(0):r;if(l)if(n.containerElement=t(l),/document/.test(r)||r==document)n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight};else{var h=t(l),c=[];t(["Top","Right","Left","Bottom"]).each(function(t,e){c[t]=i(h.css("padding"+e))}),n.containerOffset=h.offset(),n.containerPosition=h.position(),n.containerSize={height:h.innerHeight()-c[3],width:h.innerWidth()-c[1]};var d=n.containerOffset,u=n.containerSize.height,p=n.containerSize.width,f=t.ui.hasScroll(l,"left")?l.scrollWidth:p,m=t.ui.hasScroll(l)?l.scrollHeight:u;n.parentData={element:l,left:d.left,top:d.top,width:f,height:m}}},resize:function(e,i){var s=t(this).data("resizable"),n=s.options,a=s.containerSize,o=s.containerOffset,r=s.size,l=s.position,h=s._aspectRatio||e.shiftKey,c={top:0,left:0},d=s.containerElement;d[0]!=document&&/static/.test(d.css("position"))&&(c=o),l.left<(s._helper?o.left:0)&&(s.size.width=s.size.width+(s._helper?s.position.left-o.left:s.position.left-c.left),h&&(s.size.height=s.size.width/s.aspectRatio),s.position.left=n.helper?o.left:0),l.top<(s._helper?o.top:0)&&(s.size.height=s.size.height+(s._helper?s.position.top-o.top:s.position.top),h&&(s.size.width=s.size.height*s.aspectRatio),s.position.top=s._helper?o.top:0),s.offset.left=s.parentData.left+s.position.left,s.offset.top=s.parentData.top+s.position.top;var u=Math.abs((s._helper?s.offset.left-c.left:s.offset.left-c.left)+s.sizeDiff.width),p=Math.abs((s._helper?s.offset.top-c.top:s.offset.top-o.top)+s.sizeDiff.height),f=s.containerElement.get(0)==s.element.parent().get(0),m=/relative|absolute/.test(s.containerElement.css("position"));f&&m&&(u-=s.parentData.left),u+s.size.width>=s.parentData.width&&(s.size.width=s.parentData.width-u,h&&(s.size.height=s.size.width/s.aspectRatio)),p+s.size.height>=s.parentData.height&&(s.size.height=s.parentData.height-p,h&&(s.size.width=s.size.height*s.aspectRatio))},stop:function(e,i){var s=t(this).data("resizable"),n=s.options,a=s.position,o=s.containerOffset,r=s.containerPosition,l=s.containerElement,h=t(s.helper),c=h.offset(),d=h.outerWidth()-s.sizeDiff.width,u=h.outerHeight()-s.sizeDiff.height;s._helper&&!n.animate&&/relative/.test(l.css("position"))&&t(this).css({left:c.left-r.left-o.left,width:d,height:u}),s._helper&&!n.animate&&/static/.test(l.css("position"))&&t(this).css({left:c.left-r.left-o.left,width:d,height:u})}}),t.ui.plugin.add("resizable","ghost",{start:function(e,i){var s=t(this).data("resizable"),n=s.options,a=s.size;s.ghost=s.originalElement.clone(),s.ghost.css({opacity:.25,display:"block",position:"relative",height:a.height,width:a.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof n.ghost?n.ghost:""),s.ghost.appendTo(s.helper)},resize:function(e,i){var s=t(this).data("resizable"),n=s.options;s.ghost&&s.ghost.css({position:"relative",height:s.size.height,width:s.size.width})},stop:function(e,i){var s=t(this).data("resizable"),n=s.options;s.ghost&&s.helper&&s.helper.get(0).removeChild(s.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(e,i){var s=t(this).data("resizable"),n=s.options,a=s.size,o=s.originalSize,r=s.originalPosition,l=s.axis,h=n._aspectRatio||e.shiftKey;n.grid="number"==typeof n.grid?[n.grid,n.grid]:n.grid;var c=Math.round((a.width-o.width)/(n.grid[0]||1))*(n.grid[0]||1),d=Math.round((a.height-o.height)/(n.grid[1]||1))*(n.grid[1]||1);/^(se|s|e)$/.test(l)?(s.size.width=o.width+c,s.size.height=o.height+d):/^(ne)$/.test(l)?(s.size.width=o.width+c,s.size.height=o.height+d,s.position.top=r.top-d):/^(sw)$/.test(l)?(s.size.width=o.width+c,s.size.height=o.height+d,s.position.left=r.left-c):(s.size.width=o.width+c,s.size.height=o.height+d,s.position.top=r.top-d,s.position.left=r.left-c)}});var i=function(t){return parseInt(t,10)||0},s=function(t){return!isNaN(parseInt(t,10))}}(jQuery),function(t,e){t.widget("ui.selectable",t.ui.mouse,{version:"1.9.2",widgetEventPrefix:"selectable",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var e=this;this.element.addClass("ui-selectable"),this.dragged=!1;var i;this.refresh=function(){i=t(e.options.filter,e.element[0]),i.addClass("ui-selectee"),i.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=i.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this;if(this.opos=[e.pageX,e.pageY],!this.options.disabled){var s=this.options;this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.clientX,top:e.clientY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().andSelf().each(function(){var s=t.data(this,"selectable-item");if(s){var n=!e.metaKey&&!e.ctrlKey||!s.$element.hasClass("ui-selected");return s.$element.removeClass(n?"ui-unselecting":"ui-selected").addClass(n?"ui-selecting":"ui-unselecting"),s.unselecting=!n,s.selecting=n,s.selected=n,n?i._trigger("selecting",e,{selecting:s.element}):i._trigger("unselecting",e,{unselecting:s.element}),!1}})}},_mouseDrag:function(e){var i=this;if(this.dragged=!0,!this.options.disabled){var s=this.options,n=this.opos[0],a=this.opos[1],o=e.pageX,r=e.pageY;if(n>o){var l=o;o=n,n=l}if(a>r){var l=r;r=a,a=l}return this.helper.css({left:n,top:a,width:o-n,height:r-a}),this.selectees.each(function(){var l=t.data(this,"selectable-item");if(l&&l.element!=i.element[0]){var h=!1;"touch"==s.tolerance?h=!(l.left>o||l.right<n||l.top>r||l.bottom<a):"fit"==s.tolerance&&(h=l.left>n&&l.right<o&&l.top>a&&l.bottom<r),h?(l.selected&&(l.$element.removeClass("ui-selected"),l.selected=!1),l.unselecting&&(l.$element.removeClass("ui-unselecting"),l.unselecting=!1),l.selecting||(l.$element.addClass("ui-selecting"),l.selecting=!0,i._trigger("selecting",e,{selecting:l.element}))):(l.selecting&&((e.metaKey||e.ctrlKey)&&l.startselected?(l.$element.removeClass("ui-selecting"),l.selecting=!1,l.$element.addClass("ui-selected"),l.selected=!0):(l.$element.removeClass("ui-selecting"),l.selecting=!1,l.startselected&&(l.$element.addClass("ui-unselecting"),l.unselecting=!0),i._trigger("unselecting",e,{unselecting:l.element}))),l.selected&&(e.metaKey||e.ctrlKey||l.startselected||(l.$element.removeClass("ui-selected"),l.selected=!1,l.$element.addClass("ui-unselecting"),l.unselecting=!0,i._trigger("unselecting",e,{unselecting:l.element}))))}}),!1}},_mouseStop:function(e){var i=this;this.dragged=!1;var s=this.options;return t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}(jQuery),function(t,e){var i=5;t.widget("ui.slider",t.ui.mouse,{version:"1.9.2",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var e,s,n=this.options,a=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",r=[];for(this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"+(n.disabled?" ui-slider-disabled ui-disabled":"")),this.range=t([]),n.range&&(n.range===!0&&(n.values||(n.values=[this._valueMin(),this._valueMin()]),n.values.length&&2!==n.values.length&&(n.values=[n.values[0],n.values[0]])),this.range=t("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+("min"===n.range||"max"===n.range?" ui-slider-range-"+n.range:""))),s=n.values&&n.values.length||1,e=a.length;e<s;e++)r.push(o);this.handles=a.add(t(r.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(t){t.preventDefault()}).mouseenter(function(){n.disabled||t(this).addClass("ui-state-hover")}).mouseleave(function(){t(this).removeClass("ui-state-hover")}).focus(function(){n.disabled?t(this).blur():(t(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),t(this).addClass("ui-state-focus"))}).blur(function(){t(this).removeClass("ui-state-focus")}),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)}),this._on(this.handles,{keydown:function(e){var s,n,a,o,r=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(e.target).addClass("ui-state-active"),s=this._start(e,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),e.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/i);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/i);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(e,r,a)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}),this._refreshValue(),this._animateOff=!1},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,l,h,c=this,d=this.options;return!d.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));n>i&&(n=i,a=t(this),o=e)}),d.range===!0&&this.values(1)===d.min&&(o+=1,a=t(this.handles[o])),r=this._start(e,o),r!==!1&&(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),l=a.offset(),h=!t(e.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-a.width()/2,top:e.pageY-l.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),s<0&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&i<s)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i,!0))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;a<s.length;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch(t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"disabled":i?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.prop("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.prop("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;s<n;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);for(i=this.options.values.slice(),s=0;s<i.length;s+=1)i[s]=this._trimAlignValue(i[s]);return i},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();
|
|
if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,l=this,h=!this._animateOff&&r.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=(l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](c,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?(s-n)/(a-n)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](c,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))}})}(jQuery),function(t,e){t.widget("ui.sortable",t.ui.mouse,{version:"1.9.2",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},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=!!this.items.length&&("x"===t.axis||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display"))),this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=this;if(this.reverting)return!1;if(this.options.disabled||"static"==this.options.type)return!1;this._refreshItems(e);var n=null,a=t(e.target).parents().each(function(){if(t.data(this,s.widgetName+"-item")==s)return n=t(this),!1});if(t.data(e.target,s.widgetName+"-item")==s&&(n=t(e.target)),!n)return!1;if(this.options.handle&&!i){var o=!1;if(t(this.options.handle,n).find("*").andSelf().each(function(){this==e.target&&(o=!0)}),!o)return!1}return this.currentItem=n,this._removeCurrentsFromItems(),!0},_mouseStart:function(e,i,s){var n=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,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),n.containment&&this._setContainment(),n.cursor&&(t("body").css("cursor")&&(this._storedCursor=t("body").css("cursor")),t("body").css("cursor",n.cursor)),n.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",n.opacity)),n.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",n.zIndex)),this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(var a=this.containers.length-1;a>=0;a--)this.containers[a]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){if(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll){var i=this.options,s=!1;this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<i.scrollSensitivity?this.scrollParent[0].scrollTop=s=this.scrollParent[0].scrollTop+i.scrollSpeed:e.pageY-this.overflowOffset.top<i.scrollSensitivity&&(this.scrollParent[0].scrollTop=s=this.scrollParent[0].scrollTop-i.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<i.scrollSensitivity?this.scrollParent[0].scrollLeft=s=this.scrollParent[0].scrollLeft+i.scrollSpeed:e.pageX-this.overflowOffset.left<i.scrollSensitivity&&(this.scrollParent[0].scrollLeft=s=this.scrollParent[0].scrollLeft-i.scrollSpeed)):(e.pageY-t(document).scrollTop()<i.scrollSensitivity?s=t(document).scrollTop(t(document).scrollTop()-i.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<i.scrollSensitivity&&(s=t(document).scrollTop(t(document).scrollTop()+i.scrollSpeed)),e.pageX-t(document).scrollLeft()<i.scrollSensitivity?s=t(document).scrollLeft(t(document).scrollLeft()-i.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<i.scrollSensitivity&&(s=t(document).scrollLeft(t(document).scrollLeft()+i.scrollSpeed))),s!==!1&&t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)}this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px");for(var n=this.items.length-1;n>=0;n--){var a=this.items[n],o=a.item[0],r=this._intersectsWithPointer(a);if(r&&a.instance===this.currentContainer&&!(o==this.currentItem[0]||this.placeholder[1==r?"next":"prev"]()[0]==o||t.contains(this.placeholder[0],o)||"semi-dynamic"==this.options.type&&t.contains(this.element[0],o))){if(this.direction=1==r?"down":"up","pointer"!=this.options.tolerance&&!this._intersectsWithSides(a))break;this._rearrange(e,a),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();this.reverting=!0,t(this.helper).animate({left:n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"==this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!=this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=t.left,o=a+t.width,r=t.top,l=r+t.height,h=this.offset.click.top,c=this.offset.click.left,d=s+h>r&&s+h<l&&e+c>a&&e+c<o;return"pointer"==this.options.tolerance||this.options.forcePointerForContainers||"pointer"!=this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?d:a<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<o&&r<s+this.helperProportions.height/2&&n-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var i="x"===this.options.axis||t.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),s="y"===this.options.axis||t.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),n=i&&s,a=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return!!n&&(this.floating?o&&"right"==o||"down"==a?2:1:a&&("down"==a?2:1))},_intersectsWithSides:function(e){var i=t.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),s=t.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return this.floating&&a?"right"==a&&s||"left"==a&&!s:n&&("down"==n&&i||"up"==n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor==String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i=[],s=[],n=this._connectWith();if(n&&e)for(var a=n.length-1;a>=0;a--)for(var o=t(n[a]),r=o.length-1;r>=0;r--){var l=t.data(o[r],this.widgetName);l&&l!=this&&!l.options.disabled&&s.push([t.isFunction(l.options.items)?l.options.items.call(l.element):t(l.options.items,l.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),l])}s.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]);for(var a=s.length-1;a>=0;a--)s[a][0].each(function(){i.push(this)});return t(i)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;i<e.length;i++)if(e[i]==t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i=this.items,s=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],n=this._connectWith();if(n&&this.ready)for(var a=n.length-1;a>=0;a--)for(var o=t(n[a]),r=o.length-1;r>=0;r--){var l=t.data(o[r],this.widgetName);l&&l!=this&&!l.options.disabled&&(s.push([t.isFunction(l.options.items)?l.options.items.call(l.element[0],e,{item:this.currentItem}):t(l.options.items,l.element),l]),this.containers.push(l))}for(var a=s.length-1;a>=0;a--)for(var h=s[a][1],c=s[a][0],r=0,d=c.length;r<d;r++){var u=t(c[r]);u.data(this.widgetName+"-item",h),i.push({item:u,instance:h,width:0,height:0,left:0,top:0})}},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var i=this.items.length-1;i>=0;i--){var s=this.items[i];if(s.instance==this.currentContainer||!this.currentContainer||s.item[0]==this.currentItem[0]){var n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item;e||(s.width=n.outerWidth(),s.height=n.outerHeight());var a=n.offset();s.left=a.left,s.top=a.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var i=this.containers.length-1;i>=0;i--){var a=this.containers[i].element.offset();this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.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=e.options;if(!i.placeholder||i.placeholder.constructor==String){var s=i.placeholder;i.placeholder={element:function(){var i=t(document.createElement(e.currentItem[0].nodeName)).addClass(s||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return s||(i.style.visibility="hidden"),i},update:function(t,n){s&&!i.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(i.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),i.placeholder.update(e,e.placeholder)},_contactContainers:function(e){for(var i=null,s=null,n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(i&&t.contains(this.containers[n].element[0],i.element[0]))continue;i=this.containers[n],s=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",e,this._uiHash(this)),this.containers[n].containerCache.over=0);if(i)if(1===this.containers.length)this.containers[s]._trigger("over",e,this._uiHash(this)),this.containers[s].containerCache.over=1;else{for(var a=1e4,o=null,r=this.containers[s].floating?"left":"top",l=this.containers[s].floating?"width":"height",h=this.positionAbs[r]+this.offset.click[r],c=this.items.length-1;c>=0;c--)if(t.contains(this.containers[s].element[0],this.items[c].item[0])&&this.items[c].item[0]!=this.currentItem[0]){var d=this.items[c].item.offset()[r],u=!1;Math.abs(d-h)>Math.abs(d+this.items[c][l]-h)&&(u=!0,d+=this.items[c][l]),Math.abs(d-h)<a&&(a=Math.abs(d-h),o=this.items[c],this.direction=u?"up":"down")}if(!o&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[s],o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[s].element,!0),this._trigger("change",e,this._uiHash()),this.containers[s]._trigger("change",e,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[s]._trigger("over",e,this._uiHash(this)),this.containers[s].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"==i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!=i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(""==s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(""==s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if("parent"==e.containment&&(e.containment=this.helper[0].parentNode),"document"!=e.containment&&"window"!=e.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"==e.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"==e.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),!/^(document|window|parent)$/.test(e.containment)){var i=t(e.containment)[0],s=t(e.containment).offset(),n="hidden"!=t(i).css("overflow");this.containment=[s.left+(parseInt(t(i).css("borderLeftWidth"),10)||0)+(parseInt(t(i).css("paddingLeft"),10)||0)-this.margins.left,s.top+(parseInt(t(i).css("borderTopWidth"),10)||0)+(parseInt(t(i).css("paddingTop"),10)||0)-this.margins.top,s.left+(n?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(t(i).css("borderLeftWidth"),10)||0)-(parseInt(t(i).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,s.top+(n?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(t(i).css("borderTopWidth"),10)||0)-(parseInt(t(i).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=this.options,a="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(a[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"==this.cssPosition?-this.scrollParent.scrollTop():o?0:a.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():o?0:a.scrollLeft())*s}},_generatePosition:function(e){var i=this.options,s="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,n=/(html|body)/i.test(s[0].tagName);"relative"!=this.cssPosition||this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset());var a=e.pageX,o=e.pageY;if(this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),i.grid)){var r=this.originalPageY+Math.round((o-this.originalPageY)/i.grid[1])*i.grid[1];o=this.containment&&(r-this.offset.click.top<this.containment[1]||r-this.offset.click.top>this.containment[3])?r-this.offset.click.top<this.containment[1]?r+i.grid[1]:r-i.grid[1]:r;var l=this.originalPageX+Math.round((a-this.originalPageX)/i.grid[0])*i.grid[0];a=this.containment&&(l-this.offset.click.left<this.containment[0]||l-this.offset.click.left>this.containment[2])?l-this.offset.click.left<this.containment[0]?l+i.grid[0]:l-i.grid[0]:l}return{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"==this.cssPosition?-this.scrollParent.scrollTop():n?0:s.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():n?0:s.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(e,i){this.reverting=!1;var s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]==this.currentItem[0]){for(var n in this._storedCSS)"auto"!=this._storedCSS[n]&&"static"!=this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!i&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev==this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent==this.currentItem.parent()[0]||i||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(i||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer))));for(var n=this.containers.length-1;n>=0;n--)i||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[n])),this.containers[n].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[n])),this.containers[n].containerCache.over=0);if(this._storedCursor&&t("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"==this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!i){this._trigger("beforeStop",e,this._uiHash());for(var n=0;n<s.length;n++)s[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!1}if(i||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&&this.helper.remove(),this.helper=null,!i){for(var n=0;n<s.length;n++)s[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})}(jQuery),function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.9.2",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",t)))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(t(e.currentTarget).hasClass("ui-state-active"))return this._start(e)!==!1&&void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>▲</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>▼</span></a>"},_start:function(t){return!(!this.spinning&&this._trigger("start",t)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return i===-1?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&t<s.min?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,void this.element.val(this._format(i))}"max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._spin((t||1)*this.options.step)},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._spin((t||1)*-this.options.step)},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?void e(this._value).call(this,t):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(jQuery),function(t,e){function i(){return++n}function s(t){return t.hash.length>1&&t.href.replace(a,"")===location.href.replace(a,"").replace(/\s/g,"%20")}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.9.2",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options,s=i.active,n=location.hash.substring(1);this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){
|
|
t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),null===s&&(n&&this.tabs.each(function(e,i){if(t(i).attr("aria-controls")===n)return s=e,!1}),null===s&&(s=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==s&&s!==-1||(s=!!this.tabs.length&&0)),s!==!1&&(s=this.tabs.index(this.tabs.eq(s)),s===-1&&(s=!i.collapsible&&0)),i.active=s,!i.collapsible&&i.active===!1&&this.anchors.length&&(i.active=0),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(this.options.active):this.active=t(),this._refresh(),this.active.length&&this.load(i.active)},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(this.document[0].activeElement).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(s);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(s!==this.options.active&&s);default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),e<0&&(e=n),e}for(var n=this.tabs.length-1;t.inArray(s(),this.options.disabled)!==-1;)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,e){return"active"===t?void this._activate(e):"disabled"===t?void this._setupDisabled(e):(this._super(t,e),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),void("heightStyle"===t&&this._setupHeightStyle(e)))},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,l=t(n).uniqueId().attr("id"),h=t(n).closest("li"),c=h.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeSelector(a))):(r=e._tabId(h),a="#"+r,o=e.element.find(a),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),c&&h.data("ui-tabs-aria-controls",c),h.attr({"aria-controls":a.substring(1),"aria-labelledby":l}),o.attr("aria-labelledby",l)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i=0,s;s=this.tabs[i];i++)e===!0||t.inArray(i,e)!==-1?t(s).addClass("ui-state-disabled").attr("aria-disabled","true"):t(s).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s,n=this.element.parent();"fill"===e?(t.support.minHeight||(s=n.css("overflow"),n.css("overflow","hidden")),i=n.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),s&&n.css("overflow",s),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,l=r?t():this._getPanelForTab(a),h=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:h,newTab:r?t():a,newPanel:l};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=!r&&this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),h.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(a),e),this._toggle(e,c))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeData("href.tabs").removeData("load.tabs").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),t.inArray(i,s)!==-1)return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),l={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,l)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,l)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.uiBackCompat!==!1&&(t.ui.tabs.prototype._ui=function(t,e){return{tab:t,panel:e,index:this.anchors.index(t)}},t.widget("ui.tabs",t.ui.tabs,{url:function(t,e){this.anchors.eq(t).attr("href",e)}}),t.widget("ui.tabs",t.ui.tabs,{options:{ajaxOptions:null,cache:!1},_create:function(){this._super();var e=this;this._on({tabsbeforeload:function(i,s){return t.data(s.tab[0],"cache.tabs")?void i.preventDefault():void s.jqXHR.success(function(){e.options.cache&&t.data(s.tab[0],"cache.tabs",!0)})}})},_ajaxSettings:function(e,i,s){var n=this.options.ajaxOptions;return t.extend({},n,{error:function(t,e){try{n.error(t,e,s.tab.closest("li").index(),s.tab[0])}catch(i){}}},this._superApply(arguments))},_setOption:function(t,e){"cache"===t&&e===!1&&this.anchors.removeData("cache.tabs"),this._super(t,e)},_destroy:function(){this.anchors.removeData("cache.tabs"),this._super()},url:function(t){this.anchors.eq(t).removeData("cache.tabs"),this._superApply(arguments)}}),t.widget("ui.tabs",t.ui.tabs,{abort:function(){this.xhr&&this.xhr.abort()}}),t.widget("ui.tabs",t.ui.tabs,{options:{spinner:"<em>Loading…</em>"},_create:function(){this._super(),this._on({tabsbeforeload:function(t,e){if(t.target===this.element[0]&&this.options.spinner){var i=e.tab.find("span"),s=i.html();i.html(this.options.spinner),e.jqXHR.complete(function(){i.html(s)})}}})}}),t.widget("ui.tabs",t.ui.tabs,{options:{enable:null,disable:null},enable:function(e){var i=this.options,s;(e&&i.disabled===!0||t.isArray(i.disabled)&&t.inArray(e,i.disabled)!==-1)&&(s=!0),this._superApply(arguments),s&&this._trigger("enable",null,this._ui(this.anchors[e],this.panels[e]))},disable:function(e){var i=this.options,s;(e&&i.disabled===!1||t.isArray(i.disabled)&&t.inArray(e,i.disabled)===-1)&&(s=!0),this._superApply(arguments),s&&this._trigger("disable",null,this._ui(this.anchors[e],this.panels[e]))}}),t.widget("ui.tabs",t.ui.tabs,{options:{add:null,remove:null,tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},add:function(i,s,n){n===e&&(n=this.anchors.length);var a,o,r=this.options,l=t(r.tabTemplate.replace(/#\{href\}/g,i).replace(/#\{label\}/g,s)),h=i.indexOf("#")?this._tabId(l):i.replace("#","");return l.addClass("ui-state-default ui-corner-top").data("ui-tabs-destroy",!0),l.attr("aria-controls",h),a=n>=this.tabs.length,o=this.element.find("#"+h),o.length||(o=this._createPanel(h),a?n>0?o.insertAfter(this.panels.eq(-1)):o.appendTo(this.element):o.insertBefore(this.panels[n])),o.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").hide(),a?l.appendTo(this.tablist):l.insertBefore(this.tabs[n]),r.disabled=t.map(r.disabled,function(t){return t>=n?++t:t}),this.refresh(),1===this.tabs.length&&r.active===!1&&this.option("active",0),this._trigger("add",null,this._ui(this.anchors[n],this.panels[n])),this},remove:function(e){e=this._getIndex(e);var i=this.options,s=this.tabs.eq(e).remove(),n=this._getPanelForTab(s).remove();return s.hasClass("ui-tabs-active")&&this.anchors.length>2&&this._activate(e+(e+1<this.anchors.length?1:-1)),i.disabled=t.map(t.grep(i.disabled,function(t){return t!==e}),function(t){return t>=e?--t:t}),this.refresh(),this._trigger("remove",null,this._ui(s.find("a")[0],n[0])),this}}),t.widget("ui.tabs",t.ui.tabs,{length:function(){return this.anchors.length}}),t.widget("ui.tabs",t.ui.tabs,{options:{idPrefix:"ui-tabs-"},_tabId:function(e){var s=e.is("li")?e.find("a[href]"):e;return s=s[0],t(s).closest("li").attr("aria-controls")||s.title&&s.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF\-]/g,"")||this.options.idPrefix+i()}}),t.widget("ui.tabs",t.ui.tabs,{options:{panelTemplate:"<div></div>"},_createPanel:function(e){return t(this.options.panelTemplate).attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)}}),t.widget("ui.tabs",t.ui.tabs,{_create:function(){var t=this.options;null===t.active&&t.selected!==e&&(t.active=t.selected!==-1&&t.selected),this._super(),t.selected=t.active,t.selected===!1&&(t.selected=-1)},_setOption:function(t,e){if("selected"!==t)return this._super(t,e);var i=this.options;this._super("active",e!==-1&&e),i.selected=i.active,i.selected===!1&&(i.selected=-1)},_eventHandler:function(){this._superApply(arguments),this.options.selected=this.options.active,this.options.selected===!1&&(this.options.selected=-1)}}),t.widget("ui.tabs",t.ui.tabs,{options:{show:null,select:null},_create:function(){this._super(),this.options.active!==!1&&this._trigger("show",null,this._ui(this.active.find(".ui-tabs-anchor")[0],this._getPanelForTab(this.active)[0]))},_trigger:function(t,e,i){var s,n,a=this._superApply(arguments);return!!a&&("beforeActivate"===t?(s=i.newTab.length?i.newTab:i.oldTab,n=i.newPanel.length?i.newPanel:i.oldPanel,a=this._super("select",e,{tab:s.find(".ui-tabs-anchor")[0],panel:n[0],index:s.closest("li").index()})):"activate"===t&&i.newTab.length&&(a=this._super("show",e,{tab:i.newTab.find(".ui-tabs-anchor")[0],panel:i.newPanel[0],index:i.newTab.closest("li").index()})),a)}}),t.widget("ui.tabs",t.ui.tabs,{select:function(t){if(t=this._getIndex(t),t===-1){if(!this.options.collapsible||this.options.selected===-1)return;t=this.options.selected}this.anchors.eq(t).trigger(this.options.event+this.eventNamespace)}}),function(){var e=0;t.widget("ui.tabs",t.ui.tabs,{options:{cookie:null},_create:function(){var t=this.options,e;null==t.active&&t.cookie&&(e=parseInt(this._cookie(),10),e===-1&&(e=!1),t.active=e),this._super()},_cookie:function(i){var s=[this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++e)];return arguments.length&&(s.push(i===!1?-1:i),s.push(this.options.cookie)),t.cookie.apply(null,s)},_refresh:function(){this._super(),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_eventHandler:function(){this._superApply(arguments),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_destroy:function(){this._super(),this.options.cookie&&this._cookie(null,this.options.cookie)}})}(),t.widget("ui.tabs",t.ui.tabs,{_trigger:function(e,i,s){var n=t.extend({},s);return"load"===e&&(n.panel=n.panel[0],n.tab=n.tab.find(".ui-tabs-anchor")[0]),this._super(e,i,n)}}),t.widget("ui.tabs",t.ui.tabs,{options:{fx:null},_getFx:function(){var e,i,s=this.options.fx;return s&&(t.isArray(s)?(e=s[0],i=s[1]):e=i=s),s?{show:i,hide:e}:null},_toggle:function(t,e){function i(){n.running=!1,n._trigger("activate",t,e)}function s(){e.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),a.length&&r.show?a.animate(r.show,r.show.duration,function(){i()}):(a.show(),i())}var n=this,a=e.newPanel,o=e.oldPanel,r=this._getFx();return r?(n.running=!0,void(o.length&&r.hide?o.animate(r.hide,r.hide.duration,function(){e.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s()}):(e.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),o.hide(),s()))):this._super(t,e)}}))}(jQuery),function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);n!==-1&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.9.2",options:{content:function(){return t(this).attr("title")},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),void(this.options[e]=i)):(this._super(e,i),void("content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)})))},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).andSelf().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).andSelf().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e=t(this),s;e.data("ui-tooltip-open")&&(s=t.Event("blur"),s.target=s.currentTarget=this,i.close(s,!0)),e.attr("title")&&(e.uniqueId(),i.parents[this.id]={element:this,title:e.attr("title")},e.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,a=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=a),this._open(e,t,i)})}),void(i&&this._open(e,t,i)))},_open:function(i,s,n){function a(t){h.of=t,o.is(":hidden")||o.position(h)}var o,r,l,h=t.extend({},this.options.position);if(n){if(o=this._find(s),o.length)return void o.find(".ui-tooltip-content").html(n);s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),o=this._tooltip(s),e(s,o.attr("id")),o.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:a}),a(i)):o.position(t.extend({of:s},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(l=setInterval(function(){o.is(":visible")&&(a(h.of),clearInterval(l))},t.fx.interval)),this._trigger("open",i,{tooltip:o}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(o)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),a=this._find(n);this.closing||(n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),a.stop(!0),this._hide(a,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:a}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),t.fn.bgiframe&&n.bgiframe(),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})}(jQuery)}).call(exports,__webpack_require__(1))},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);a["default"].entwine("ss",function(t){t(".ss-tabset.ss-ui-action-tabset").entwine({IgnoreTabState:!0,onadd:function e(){this._super(),this.tabs({collapsible:!0,active:!1})},onremove:function i(){var e=t(".cms-container").find("iframe");e.each(function(e,i){try{t(i).contents().off("click.ss-ui-action-tabset")}catch(s){console.warn("Unable to access iframe, possible https mis-match")}}),t(document).off("click.ss-ui-action-tabset"),this._super()},ontabsbeforeactivate:function s(t,e){this.riseUp(t,e)},onclick:function n(t,e){this.attachCloseHandler(t,e)},attachCloseHandler:function a(e,i){var s=this,n=t(".cms-container").find("iframe"),a;a=function o(e){var i,n;i=t(e.target).closest(".ss-ui-action-tabset .ui-tabs-panel"),t(e.target).closest(s).length||i.length||(s.tabs("option","active",!1),n=t(".cms-container").find("iframe"),n.each(function(e,i){t(i).contents().off("click.ss-ui-action-tabset",a)}),t(document).off("click.ss-ui-action-tabset",a))},t(document).on("click.ss-ui-action-tabset",a),n.length>0&&n.each(function(e,i){t(i).contents().on("click.ss-ui-action-tabset",a)})},riseUp:function o(e,i){var s,n,a,o,r,l,h,c,d;return s=t(this).find(".ui-tabs-panel").outerHeight(),n=t(this).find(".ui-tabs-nav").outerHeight(),a=t(window).height()+t(document).scrollTop()-n,o=t(this).find(".ui-tabs-nav").offset().top,r=i.newPanel,l=i.newTab,o+s>=a&&o-s>0?(this.addClass("rise-up"),null!==l.position()&&(h=-r.outerHeight(),c=r.parents(".toolbar--south"),c&&(d=l.offset().top-c.offset().top,h-=d),t(r).css("top",h+"px"))):(this.removeClass("rise-up"),null!==l.position()&&t(r).css("bottom","100%")),!1}}),t(".cms-content-actions .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function r(e,i){this._super(e,i),t(i.newPanel).length>0&&t(i.newPanel).css("left",i.newTab.position().left+"px")}}),t(".cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function l(e,i){this._super(e,i),t(this).closest(".ss-ui-action-tabset").removeClass("tabset-open tabset-open-last")}}),t(".cms-content-fields .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function h(e,i){this._super(e,i),t(i.newPanel).length>0&&(t(i.newTab).hasClass("last")?(t(i.newPanel).css({left:"auto",right:"0px"}),t(i.newPanel).parent().addClass("tabset-open-last")):(t(i.newPanel).css("left",i.newTab.position().left+"px"),t(i.newTab).hasClass("first")&&(t(i.newPanel).css("left","0px"),t(i.newPanel).parent().addClass("tabset-open"))))}}),t(".cms-tree-view-sidebar .cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({"from .ui-tabs-nav li":{onhover:function c(e){t(e.target).parent().find("li .active").removeClass("active"),t(e.target).find("a").addClass("active")}},ontabsbeforeactivate:function d(e,i){this._super(e,i),t(i.newPanel).css({left:"auto",right:"auto"}),t(i.newPanel).length>0&&t(i.newPanel).parent().addClass("tabset-open")}})})},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);a["default"].entwine("ss",function(t){t.entwine.warningLevel=t.entwine.WARN_LEVEL_BESTPRACTISE,t(".cms-panel").entwine({WidthExpanded:null,WidthCollapsed:null,canSetCookie:function e(){return void 0!==t.cookie&&void 0!==this.attr("id")},getPersistedCollapsedState:function i(){var e,i;return this.canSetCookie()&&(i=t.cookie("cms-panel-collapsed-"+this.attr("id")),void 0!==i&&null!==i&&(e="true"===i)),e},setPersistedCollapsedState:function s(e){this.canSetCookie()&&t.cookie("cms-panel-collapsed-"+this.attr("id"),e,{path:"/",expires:31})},clearPersistedCollapsedState:function n(){this.canSetCookie()&&t.cookie("cms-panel-collapsed-"+this.attr("id"),"",{path:"/",expires:-1})},getInitialCollapsedState:function a(){var t=this.getPersistedCollapsedState();return void 0===t&&(t=this.hasClass("collapsed")),t},onadd:function o(){var e,i;if(!this.find(".cms-panel-content").length)throw new Exception('Content panel for ".cms-panel" not found');this.find(".cms-panel-toggle").length||(i=t("<div class='cms-panel-toggle south'></div>").append('<a class="toggle-expand" href="#"><span>»</span></a>').append('<a class="toggle-collapse" href="#"><span>«</span></a>'),this.append(i)),this.setWidthExpanded(this.find(".cms-panel-content").innerWidth()),e=this.find(".cms-panel-content-collapsed"),this.setWidthCollapsed(e.length?e.innerWidth():this.find(".toggle-expand").innerWidth()),this.togglePanel(!this.getInitialCollapsedState(),!0,!1),this._super()},togglePanel:function r(t,e,i){var s,n;e||(this.trigger("beforetoggle.sspanel",t),this.trigger(t?"beforeexpand":"beforecollapse")),this.toggleClass("collapsed",!t),s=t?this.getWidthExpanded():this.getWidthCollapsed(),this.width(s),n=this.find(".cms-panel-content-collapsed"),n.length&&(this.find(".cms-panel-content")[t?"show":"hide"](),this.find(".cms-panel-content-collapsed")[t?"hide":"show"]()),i!==!1&&this.setPersistedCollapsedState(!t),this.trigger("toggle",t),this.trigger(t?"expand":"collapse")},expandPanel:function l(t){(t||this.hasClass("collapsed"))&&this.togglePanel(!0)},collapsePanel:function h(t){!t&&this.hasClass("collapsed")||this.togglePanel(!1)}}),t(".cms-panel.collapsed .cms-panel-toggle").entwine({onclick:function c(t){this.expandPanel(),t.preventDefault()}}),t(".cms-panel *").entwine({getPanel:function d(){return this.parents(".cms-panel:first")}}),t(".cms-panel .toggle-expand").entwine({onclick:function u(t){t.preventDefault(),t.stopPropagation(),this.getPanel().expandPanel(),this._super(t)}}),t(".cms-panel .toggle-collapse").entwine({onclick:function p(t){t.preventDefault(),t.stopPropagation(),this.getPanel().collapsePanel(),this._super(t)}}),t(".cms-content-tools.collapsed").entwine({onclick:function f(t){this.expandPanel(),this._super(t)}})})},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);a["default"].entwine("ss.tree",function(t){t(".cms-tree").entwine({Hints:null,IsUpdatingTree:!1,IsLoaded:!1,onadd:function e(){if(this._super(),!t.isNumeric(this.data("jstree_instance_id"))){var e=this.attr("data-hints");e&&this.setHints(t.parseJSON(e));var i=this;this.jstree(this.getTreeConfig()).bind("loaded.jstree",function(e,s){i.setIsLoaded(!0),s.inst._set_settings({html_data:{ajax:{url:i.data("urlTree"),data:function n(e){var s=i.data("searchparams")||[];return s=t.grep(s,function(t,e){return"ID"!=t.name&&"value"!=t.name}),s.push({name:"ID",value:t(e).data("id")?t(e).data("id"):0}),s.push({name:"ajax",value:1}),s}}}}),i.updateFromEditForm(),i.css("visibility","visible"),s.inst.hide_checkboxes()}).bind("before.jstree",function(e,s){if("start_drag"==s.func&&(!i.hasClass("draggable")||i.hasClass("multiselect")))return e.stopImmediatePropagation(),!1;if(t.inArray(s.func,["check_node","uncheck_node"])){var n=t(s.args[0]).parents("li:first"),a=n.find("li:not(.disabled)");if(n.hasClass("disabled")&&0==a)return e.stopImmediatePropagation(),!1}}).bind("move_node.jstree",function(e,s){if(!i.getIsUpdatingTree()){var n=s.rslt.o,a=s.rslt.np,o=s.inst._get_parent(n),r=t(a).data("id")||0,l=t(n).data("id"),h=t.map(t(n).siblings().andSelf(),function(e){return t(e).data("id")});t.ajax({url:t.path.addSearchParams(i.data("urlSavetreenode"),i.data("extraParams")),type:"POST",data:{ID:l,ParentID:r,SiblingIDs:h},success:function c(){t(".cms-edit-form :input[name=ID]").val()==l&&t(".cms-edit-form :input[name=ParentID]").val(r),i.updateNodesFromServer([l])},statusCode:{403:function d(){t.jstree.rollback(s.rlbk)}}})}}).bind("select_node.jstree check_node.jstree uncheck_node.jstree",function(e,i){t(document).triggerHandler(e,i)})}},onremove:function i(){this.jstree("destroy"),this._super()},"from .cms-container":{onafterstatechange:function s(t){this.updateFromEditForm()}},"from .cms-container form":{onaftersubmitform:function n(e){var i=t(".cms-edit-form :input[name=ID]").val();this.updateNodesFromServer([i])}},getTreeConfig:function a(){var e=this;return{core:{initially_open:["record-0"],animation:0,html_titles:!0},html_data:{},ui:{select_limit:1,initially_select:[this.find(".current").attr("id")]},crrm:{move:{check_move:function i(s){var n=t(s.o),a=t(s.np),o=s.ot.get_container()[0]==s.np[0],r=n.getClassname(),l=a.getClassname(),h=e.getHints(),c=[],d=l?l:"Root",u=h&&"undefined"!=typeof h[d]?h[d]:null;u&&n.attr("class").match(/VirtualPage-([^\s]*)/)&&(r=RegExp.$1),u&&(c="undefined"!=typeof u.disallowedChildren?u.disallowedChildren:[]);var p=!(0===n.data("id")||n.hasClass("status-archived")||o&&"inside"!=s.p||a.hasClass("nochildren")||c.length&&t.inArray(r,c)!=-1);return p}}},dnd:{drop_target:!1,drag_target:!1},checkbox:{two_state:!0},themes:{theme:"apple",url:t("body").data("frameworkpath")+"/thirdparty/jstree/themes/apple/style.css"},plugins:["html_data","ui","dnd","crrm","themes","checkbox"]}},search:function o(t,e){t?this.data("searchparams",t):this.removeData("searchparams"),this.jstree("refresh",-1,e)},getNodeByID:function r(t){return this.find("*[data-id="+t+"]")},createNode:function l(e,i,s){var n=this,a=void 0!==i.ParentID&&n.getNodeByID(i.ParentID),o=t(e),r={data:""};o.hasClass("jstree-open")?r.state="open":o.hasClass("jstree-closed")&&(r.state="closed"),this.jstree("create_node",a.length?a:-1,"last",r,function(t){for(var e=t.attr("class"),i=0;i<o[0].attributes.length;i++){var n=o[0].attributes[i];t.attr(n.name,n.value)}t.addClass(e).html(o.html()),s(t)})},updateNode:function h(e,i,s){var n=this,a=t(i),o=!!s.NextID&&this.getNodeByID(s.NextID),r=!!s.PrevID&&this.getNodeByID(s.PrevID),l=!!s.ParentID&&this.getNodeByID(s.ParentID);t.each(["id","style","class","data-pagetype"],function(t,i){e.attr(i,a.attr(i))});var h=e.children("ul").detach();
|
|
e.html(a.html()).append(h),o&&o.length?this.jstree("move_node",e,o,"before"):r&&r.length?this.jstree("move_node",e,r,"after"):this.jstree("move_node",e,l.length?l:-1)},updateFromEditForm:function c(){var e,i=t(".cms-edit-form :input[name=ID]").val();i?(e=this.getNodeByID(i),e.length?(this.jstree("deselect_all"),this.jstree("select_node",e)):this.updateNodesFromServer([i])):this.jstree("deselect_all")},updateNodesFromServer:function d(e){if(!this.getIsUpdatingTree()&&this.getIsLoaded()){var i=this,s,n=!1;this.setIsUpdatingTree(!0),i.jstree("save_selected");var a=function o(t){i.getNodeByID(t.data("id")).not(t).remove(),i.jstree("deselect_all"),i.jstree("select_node",t)};i.jstree("open_node",this.getNodeByID(0)),i.jstree("save_opened"),i.jstree("save_selected"),t.ajax({url:t.path.addSearchParams(this.data("urlUpdatetreenodes"),"ids="+e.join(",")),dataType:"json",success:function r(e,s){t.each(e,function(t,e){var s=i.getNodeByID(t);return e?void(s.length?(i.updateNode(s,e.html,e),setTimeout(function(){a(s)},500)):(n=!0,e.ParentID&&!i.find("li[data-id="+e.ParentID+"]").length?i.jstree("load_node",-1,function(){newNode=i.find("li[data-id="+t+"]"),a(newNode)}):i.createNode(e.html,e,function(t){a(t)}))):void i.jstree("delete_node",s)}),n||(i.jstree("deselect_all"),i.jstree("reselect"),i.jstree("reopen"))},complete:function l(){i.setIsUpdatingTree(!1)}})}}}),t(".cms-tree.multiple").entwine({onmatch:function u(){this._super(),this.jstree("show_checkboxes")},onunmatch:function p(){this._super(),this.jstree("uncheck_all"),this.jstree("hide_checkboxes")},getSelectedIDs:function f(){return t(this).jstree("get_checked").not(".disabled").map(function(){return t(this).data("id")}).get()}}),t(".cms-tree li").entwine({setEnabled:function m(t){this.toggleClass("disabled",!t)},getClassname:function g(){var t=this.attr("class").match(/class-([^\s]*)/i);return t?t[1]:""},getID:function v(){return this.data("id")}})})},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);a["default"].entwine("ss",function(t){t(".cms-content").entwine({onadd:function e(){var t=this;this.find(".cms-tabset").redrawTabs(),this._super()},redraw:function i(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.add(this.find(".cms-tabset")).redrawTabs(),this.find(".cms-content-header").redraw(),this.find(".cms-content-actions").redraw()}}),t(".cms-content .cms-tree").entwine({onadd:function s(){var e=this;this._super(),this.bind("select_node.jstree",function(i,s){var n=s.rslt.obj,a=e.find(":input[name=ID]").val(),o=s.args[2],r=t(".cms-container");if(!o)return!1;if(t(n).hasClass("disabled"))return!1;if(t(n).data("id")!=a){var l=t(n).find("a:first").attr("href");l&&"#"!=l?(l=l.split("?")[0],e.jstree("deselect_all"),e.jstree("uncheck_all"),t.path.isExternal(t(n).find("a:first"))&&(l=l=t.path.makeUrlAbsolute(l,t("base").attr("href"))),document.location.search&&(l=t.path.addSearchParams(l,document.location.search.replace(/^\?/,""))),r.loadPanel(l)):e.removeForm()}})}}),t(".cms-content .cms-content-fields").entwine({redraw:function n(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),t(".cms-content .cms-content-header, .cms-content .cms-content-actions").entwine({redraw:function a(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.height("auto"),this.height(this.innerHeight()-this.css("padding-top")-this.css("padding-bottom"))}})})},function(t,e,i){(function(t){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}var s=i(1),n=e(s),a=i(51),o=e(a);window.onbeforeunload=function(t){var e=(0,n["default"])(".cms-edit-form");if(e.trigger("beforesubmitform"),e.is(".changed")&&!e.is(".discardchanges"))return o["default"]._t("LeftAndMain.CONFIRMUNSAVEDSHORT")},n["default"].entwine("ss",function(t){t(".cms-edit-form").entwine({PlaceholderHtml:"",ChangeTrackerOptions:{ignoreFieldSelector:".no-change-track, .ss-upload :input, .cms-navigator :input"},ValidationErrorShown:!1,onadd:function e(){var t=this;this.attr("autocomplete","off"),this._setupChangeTracker();for(var e in{action:!0,method:!0,enctype:!0,name:!0}){var i=this.find(":input[name=_form_"+e+"]");i&&(this.attr(e,i.val()),i.remove())}this.setValidationErrorShown(!1),this._super()},"from .cms-tabset":{onafterredrawtabs:function i(){if(this.hasClass("validationerror")){var e=this.find(".message.validation, .message.required").first().closest(".tab");t(".cms-container").clearCurrentTabState();var i=e.closest(".ss-tabset");i.length||(i=e.closest(".cms-tabset")),i.length?i.tabs("option","active",e.index(".tab")):this.getValidationErrorShown()||(this.setValidationErrorShown(!0),r(ss.i18n._t("ModelAdmin.VALIDATIONERROR","Validation Error")))}}},onremove:function s(){this.changetracker("destroy"),this._super()},onmatch:function n(){this._super()},onunmatch:function a(){this._super()},redraw:function l(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.add(this.find(".cms-tabset")).redrawTabs(),this.find(".cms-content-header").redraw()},_setupChangeTracker:function h(){this.changetracker(this.getChangeTrackerOptions())},confirmUnsavedChanges:function c(){if(this.trigger("beforesubmitform"),!this.is(".changed")||this.is(".discardchanges"))return!0;var t=confirm(o["default"]._t("LeftAndMain.CONFIRMUNSAVED"));return t&&this.addClass("discardchanges"),t},onsubmit:function d(t,e){if("_blank"!=this.prop("target"))return e&&this.closest(".cms-container").submitForm(this,e),!1},validate:function u(){var t=!0;return this.trigger("validate",{isValid:t}),t},"from .htmleditor":{oneditorinit:function p(e){var i=this,s=t(e.target).closest(".field.htmleditor"),n=s.find("textarea.htmleditor").getEditor().getInstance();n.onClick.add(function(t){i.saveFieldFocus(s.attr("id"))})}},"from .cms-edit-form :input:not(:submit)":{onclick:function f(e){this.saveFieldFocus(t(e.target).attr("id"))},onfocus:function m(e){this.saveFieldFocus(t(e.target).attr("id"))}},"from .cms-edit-form .treedropdown *":{onfocusin:function g(e){var i=t(e.target).closest(".field.treedropdown");this.saveFieldFocus(i.attr("id"))}},"from .cms-edit-form .dropdown .chosen-container a":{onfocusin:function v(e){var i=t(e.target).closest(".field.dropdown");this.saveFieldFocus(i.attr("id"))}},"from .cms-container":{ontabstaterestored:function _(t){this.restoreFieldFocus()}},saveFieldFocus:function b(e){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var i=t(this).attr("id"),s=[];if(s.push({id:i,selected:e}),s)try{window.sessionStorage.setItem(i,JSON.stringify(s))}catch(n){if(n.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw n}}},restoreFieldFocus:function w(){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var e=this,i="undefined"!=typeof window.sessionStorage&&window.sessionStorage,s=i?window.sessionStorage.getItem(this.attr("id")):null,n=!!s&&JSON.parse(s),a,o=0!==this.find(".ss-tabset").length,r,l,h,c;if(i&&n.length>0){if(t.each(n,function(i,s){e.is("#"+s.id)&&(a=t("#"+s.selected))}),t(a).length<1)return void this.focusFirstInput();if(r=t(a).closest(".ss-tabset").find(".ui-tabs-nav .ui-tabs-active .ui-tabs-anchor").attr("id"),l="tab-"+t(a).closest(".ss-tabset .ui-tabs-panel").attr("id"),o&&l!==r)return;h=t(a).closest(".togglecomposite"),h.length>0&&h.accordion("activate",h.find(".ui-accordion-header")),c=t(a).position().top,t(a).is(":visible")||(a="#"+t(a).closest(".field").attr("id"),c=t(a).position().top),t(a).focus(),c>t(window).height()/2&&e.find(".cms-content-fields").scrollTop(c)}else this.focusFirstInput()}},focusFirstInput:function y(){this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:first").focus()}}),t(".cms-edit-form .btn-toolbar input.action[type=submit], .cms-edit-form .btn-toolbar button.action").entwine({onclick:function C(t){return this.hasClass("gridfield-button-delete")&&!confirm(o["default"]._t("TABLEFIELD.DELETECONFIRMMESSAGE"))?(t.preventDefault(),!1):(this.is(":disabled")||this.parents("form").trigger("submit",[this]),t.preventDefault(),!1)}}),t(".cms-edit-form .btn-toolbar input.action[type=submit].ss-ui-action-cancel, .cms-edit-form .btn-toolbar button.action.ss-ui-action-cancel").entwine({onclick:function x(t){window.history.length>1?window.history.back():this.parents("form").trigger("submit",[this]),t.preventDefault()}}),t(".cms-edit-form .ss-tabset").entwine({onmatch:function k(){if(!this.hasClass("ss-ui-action-tabset")){var t=this.find("> ul:first");1==t.children("li").length&&t.hide().parent().addClass("ss-tabset-tabshidden")}this._super()},onunmatch:function D(){this._super()}})});var r=function l(e){t.noticeAdd({text:e,type:"error",stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}}).call(e,i(1))},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);a["default"].entwine("ss",function(t){t(".cms-panel.cms-menu").entwine({togglePanel:function e(i,s,n){t(".cms-menu-list").children("li").each(function(){i?t(this).children("ul").each(function(){t(this).removeClass("collapsed-flyout"),t(this).data("collapse")&&(t(this).removeData("collapse"),t(this).addClass("collapse"))}):t(this).children("ul").each(function(){t(this).addClass("collapsed-flyout"),t(this).hasClass("collapse"),t(this).removeClass("collapse"),t(this).data("collapse",!0)})}),this.toggleFlyoutState(i),this._super(i,s,n)},toggleFlyoutState:function i(e){if(e)t(".collapsed").find("li").show(),t(".cms-menu-list").find(".child-flyout-indicator").hide();else{t(".collapsed-flyout").find("li").each(function(){t(this).hide()});var i=t(".cms-menu-list ul.collapsed-flyout").parent();0===i.children(".child-flyout-indicator").length&&i.append('<span class="child-flyout-indicator"></span>').fadeIn(),i.children(".child-flyout-indicator").fadeIn()}},siteTreePresent:function s(){return t("#cms-content-tools-CMSMain").length>0},getPersistedStickyState:function n(){var e,i;return void 0!==t.cookie&&(i=t.cookie("cms-menu-sticky"),void 0!==i&&null!==i&&(e="true"===i)),e},setPersistedStickyState:function a(e){void 0!==t.cookie&&t.cookie("cms-menu-sticky",e,{path:"/",expires:31})},getEvaluatedCollapsedState:function o(){var e,i=this.getPersistedCollapsedState(),s=t(".cms-menu").getPersistedStickyState(),n=this.siteTreePresent();return e=void 0===i?n:i!==n&&s?i:n},onadd:function r(){var e=this;setTimeout(function(){e.togglePanel(!e.getEvaluatedCollapsedState(),!1,!1)},0),t(window).on("ajaxComplete",function(t){setTimeout(function(){e.togglePanel(!e.getEvaluatedCollapsedState(),!1,!1)},0)}),this._super()}}),t(".cms-menu-list").entwine({onmatch:function l(){var t=this;this.find("li.current").select(),this.updateItems(),this._super()},onunmatch:function h(){this._super()},updateMenuFromResponse:function c(t){var e=t.getResponseHeader("X-Controller");if(e){var i=this.find("li#Menu-"+e.replace(/\\/g,"-").replace(/[^a-zA-Z0-9\-_:.]+/,""));i.hasClass("current")||i.select()}this.updateItems()},"from .cms-container":{onafterstatechange:function d(t,e){this.updateMenuFromResponse(e.xhr)},onaftersubmitform:function u(t,e){this.updateMenuFromResponse(e.xhr)}},"from .cms-edit-form":{onrelodeditform:function p(t,e){this.updateMenuFromResponse(e.xmlhttp)}},getContainingPanel:function f(){return this.closest(".cms-panel")},fromContainingPanel:{ontoggle:function m(e){this.toggleClass("collapsed",t(e.target).hasClass("collapsed")),t(".cms-container").trigger("windowresize"),this.hasClass("collapsed")&&this.find("li.children.opened").removeClass("opened"),this.hasClass("collapsed")||t(".toggle-children.opened").closest("li").addClass("opened")}},updateItems:function g(){var e=this.find("#Menu-CMSMain");e[e.is(".current")?"show":"hide"]();var i=t(".cms-content input[name=ID]").val();i&&this.find("li").each(function(){t.isFunction(t(this).setRecordID)&&t(this).setRecordID(i)})}}),t(".cms-menu-list li").entwine({toggleFlyout:function v(e){var i=t(this);if(i.children("ul").first().hasClass("collapsed-flyout"))if(e){if(!i.children("ul").first().children("li").first().hasClass("clone")){var s=i.clone();s.addClass("clone").css({}),s.children("ul").first().remove(),s.find("span").not(".text").remove(),s.find("a").first().unbind("click"),i.children("ul").prepend(s)}t(".collapsed-flyout").show(),i.addClass("opened"),i.children("ul").find("li").fadeIn("fast")}else s&&s.remove(),t(".collapsed-flyout").hide(),i.removeClass("opened"),i.find("toggle-children").removeClass("opened"),i.children("ul").find("li").hide()}}),t(".cms-menu-list li").hoverIntent(function(){t(this).toggleFlyout(!0)},function(){t(this).toggleFlyout(!1)}),t(".cms-menu-list .toggle").entwine({onclick:function _(e){e.preventDefault(),t(this).toogleFlyout(!0)}}),t(".cms-menu-list li").entwine({onmatch:function b(){this.find("ul").length&&this.find("a:first").append('<span class="toggle-children"><span class="toggle-children-icon"></span></span>'),this._super()},onunmatch:function w(){this._super()},toggle:function y(){this[this.hasClass("opened")?"close":"open"]()},open:function C(){var t=this.getMenuItem();t&&t.open(),this.find("li.clone")&&this.find("li.clone").remove(),this.addClass("opened").find("ul").show(),this.find(".toggle-children").addClass("opened")},close:function x(){this.removeClass("opened").find("ul").hide(),this.find(".toggle-children").removeClass("opened")},select:function k(){var t=this.getMenuItem();if(this.addClass("current").open(),this.siblings().removeClass("current").close(),this.siblings().find("li").removeClass("current"),t){var e=t.siblings();t.addClass("current"),e.removeClass("current").close(),e.find("li").removeClass("current").close()}this.getMenu().updateItems(),this.trigger("select")}}),t(".cms-menu-list *").entwine({getMenu:function D(){return this.parents(".cms-menu-list:first")}}),t(".cms-menu-list li *").entwine({getMenuItem:function S(){return this.parents("li:first")}}),t(".cms-menu-list li a").entwine({onclick:function I(e){var i=t.path.isExternal(this.attr("href"));if(!(e.which>1||i)&&"_blank"!=this.attr("target")){e.preventDefault();var s=this.getMenuItem(),n=this.attr("href");i||(n=t("base").attr("href")+n);var a=s.find("li");a.length?a.first().find("a").click():document.location.href=n,s.select()}}}),t(".cms-menu-list li .toggle-children").entwine({onclick:function P(t){var e=this.closest("li");return e.toggle(),!1}}),t(".cms .profile-link").entwine({onclick:function T(){return t(".cms-container").loadPanel(this.attr("href")),t(".cms-menu-list li").removeClass("current").close(),!1}}),t(".cms-menu .sticky-toggle").entwine({onadd:function M(){var e=!!t(".cms-menu").getPersistedStickyState();this.toggleCSS(e),this.toggleIndicator(e),this._super()},toggleCSS:function A(t){this[t?"addClass":"removeClass"]("active")},toggleIndicator:function E(t){this.next(".sticky-status-indicator").text(t?"fixed":"auto")},onclick:function N(){var t=this.closest(".cms-menu"),e=t.getPersistedCollapsedState(),i=t.getPersistedStickyState(),s=void 0===i?!this.hasClass("active"):!i;void 0===e?t.setPersistedCollapsedState(t.hasClass("collapsed")):void 0!==e&&s===!1&&t.clearPersistedCollapsedState(),t.setPersistedStickyState(s),this.toggleCSS(s),this.toggleIndicator(s),this._super()}})})},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n),o=i(51),r=s(o);a["default"].entwine("ss.preview",function(t){t(".cms-preview").entwine({AllowedStates:["StageLink","LiveLink","ArchiveLink"],CurrentStateName:null,CurrentSizeName:"auto",IsPreviewEnabled:!1,DefaultMode:"split",Sizes:{auto:{width:"100%",height:"100%"},mobile:{width:"335px",height:"568px"},mobileLandscape:{width:"583px",height:"320px"},tablet:{width:"783px",height:"1024px"},tabletLandscape:{width:"1039px",height:"768px"},desktop:{width:"1024px",height:"800px"}},changeState:function e(i,s){var n=this,a=this._getNavigatorStates();return s!==!1&&t.each(a,function(t,e){n.saveState("state",i)}),this.setCurrentStateName(i),this._loadCurrentState(),this.redraw(),this},changeMode:function i(e,s){var n=t(".cms-container");if("split"==e)n.entwine(".ss").splitViewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState();else if("content"==e)n.entwine(".ss").contentViewMode(),this.setIsPreviewEnabled(!1);else{if("preview"!=e)throw"Invalid mode: "+e;n.entwine(".ss").previewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState()}return s!==!1&&this.saveState("mode",e),this.redraw(),this},changeSize:function s(t){var e=this.getSizes();return this.setCurrentSizeName(t),this.removeClass("auto desktop tablet mobile").addClass(t),this.find(".preview-device-outer").width(e[t].width).height(e[t].height),this.find(".preview-device-inner").width(e[t].width),this.saveState("size",t),this.redraw(),this},redraw:function n(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var e=this.getCurrentStateName();e&&this.find(".cms-preview-states").changeVisibleState(e);var i=t(".cms-container").entwine(".ss").getLayoutOptions();i&&t(".preview-mode-selector").changeVisibleMode(i.mode);var s=this.getCurrentSizeName();return s&&this.find(".preview-size-selector").changeVisibleSize(this.getCurrentSizeName()),this},saveState:function a(t,e){this._supportsLocalStorage()&&window.localStorage.setItem("cms-preview-state-"+t,e)},loadState:function o(t){if(this._supportsLocalStorage())return window.localStorage.getItem("cms-preview-state-"+t)},disablePreview:function l(){return this.setPendingURL(null),this._loadUrl("about:blank"),this._block(),this.changeMode("content",!1),this.setIsPreviewEnabled(!1),this},enablePreview:function h(){return this.getIsPreviewEnabled()||(this.setIsPreviewEnabled(!0),t.browser.msie&&t.browser.version.slice(0,3)<=7?this.changeMode("content"):this.changeMode(this.getDefaultMode(),!1)),this},getOrAppendFontFixStyleElement:function c(){var e=t("#FontFixStyleElement");return e.length||(e=t('<style type="text/css" id="FontFixStyleElement" disabled="disabled">:before,:after{content:none !important}</style>').appendTo("head")),e},onadd:function d(){var e=this,i=this.parent(),s=this.find("iframe");s.addClass("center"),s.bind("load",function(){e._adjustIframeForPreview(),e._loadCurrentPage(),t(this).removeClass("loading")}),t.browser.msie&&8===parseInt(t.browser.version,10)&&s.bind("readystatechange",function(t){"interactive"==s[0].readyState&&(e.getOrAppendFontFixStyleElement().removeAttr("disabled"),setTimeout(function(){e.getOrAppendFontFixStyleElement().attr("disabled","disabled")},0))}),this.append('<div class="cms-preview-overlay ui-widget-overlay-light"></div>'),this.find(".cms-preview-overlay").hide(),this.disablePreview(),this._super()},_supportsLocalStorage:function u(){var t=new Date,e,i;try{return(e=window.localStorage).setItem(t,t),i=e.getItem(t)==t,e.removeItem(t),i&&e}catch(s){console.warn("localStorge is not available due to current browser / system settings.")}},onenable:function p(){var e=t(".preview-mode-selector");e.removeClass("split-disabled"),e.find(".disabled-tooltip").hide()},ondisable:function f(){var e=t(".preview-mode-selector");e.addClass("split-disabled"),e.find(".disabled-tooltip").show()},_block:function m(){return this.addClass("blocked"),this.find(".cms-preview-overlay").show(),this},_unblock:function g(){return this.removeClass("blocked"),this.find(".cms-preview-overlay").hide(),this},_initialiseFromContent:function v(){var e,i;return t(".cms-previewable").length?(e=this.loadState("mode"),i=this.loadState("size"),this._moveNavigator(),e&&"content"==e||(this.enablePreview(),this._loadCurrentState()),this.redraw(),e&&this.changeMode(e),i&&this.changeSize(i)):this.disablePreview(),this},"from .cms-container":{onafterstatechange:function _(t,e){e.xhr.getResponseHeader("X-ControllerURL")||this._initialiseFromContent()}},PendingURL:null,oncolumnvisibilitychanged:function b(){var t=this.getPendingURL();t&&!this.is(".column-hidden")&&(this.setPendingURL(null),this._loadUrl(t),this._unblock())},"from .cms-container .cms-edit-form":{onaftersubmitform:function w(){this._initialiseFromContent()}},_loadUrl:function y(t){return this.find("iframe").addClass("loading").attr("src",t),this},_getNavigatorStates:function C(){var e=t.map(this.getAllowedStates(),function(e){var i=t(".cms-preview-states .state-name[data-name="+e+"]");return i.length?{name:e,url:i.attr("href"),active:i.hasClass("active")}:null});return e},_loadCurrentState:function x(){if(!this.getIsPreviewEnabled())return this;var e=this._getNavigatorStates(),i=this.getCurrentStateName(),s=null;e&&(s=t.grep(e,function(t,e){return i===t.name||!i&&t.active}));var n=null;return s[0]?n=s[0].url:e.length?(this.setCurrentStateName(e[0].name),n=e[0].url):this.setCurrentStateName(null),n&&(n+=(n.indexOf("?")===-1?"?":"&")+"CMSPreview=1"),this.is(".column-hidden")?(this.setPendingURL(n),this._loadUrl("about:blank"),this._block()):(this.setPendingURL(null),n?(this._loadUrl(n),this._unblock()):this._block()),this},_moveNavigator:function k(){var e=t(".cms-preview .cms-preview-controls"),i=t(".cms-edit-form .cms-navigator");i.length&&e.length?e.html(t(".cms-edit-form .cms-navigator").detach()):this._block()},_loadCurrentPage:function D(){if(this.getIsPreviewEnabled()){var e,i=t(".cms-container");try{e=this.find("iframe")[0].contentDocument}catch(s){console.warn("Unable to access iframe, possible https mis-match")}if(e){var n=t(e).find("meta[name=x-page-id]").attr("content"),a=t(e).find("meta[name=x-cms-edit-link]").attr("content"),o=t(".cms-content");n&&o.find(":input[name=ID]").val()!=n&&t(".cms-container").entwine(".ss").loadPanel(a)}}},_adjustIframeForPreview:function S(){var t=this.find("iframe")[0],e;if(t){try{e=t.contentDocument}catch(i){console.warn("Unable to access iframe, possible https mis-match")}if(e){for(var s=e.getElementsByTagName("A"),n=0;n<s.length;n++){var a=s[n].getAttribute("href");a&&a.match(/^http:\/\//)&&s[n].setAttribute("target","_blank")}var o=e.getElementById("SilverStripeNavigator");o&&(o.style.display="none");var r=e.getElementById("SilverStripeNavigatorMessage");r&&(r.style.display="none"),this.trigger("afterIframeAdjustedForPreview",[e])}}}}),t(".cms-edit-form").entwine({onadd:function I(){this._super(),t(".cms-preview")._initialiseFromContent()}}),t(".cms-preview-states").entwine({changeVisibleState:function P(t){this.find('[data-name="'+t+'"]').addClass("active").siblings().removeClass("active")}}),t(".cms-preview-states .state-name").entwine({onclick:function T(e){if(1==e.which){var i=t(this).attr("data-name");this.addClass("active").siblings().removeClass("active"),t(".cms-preview").changeState(i),e.preventDefault()}}}),t(".preview-mode-selector").entwine({changeVisibleMode:function M(t){this.find("select").val(t).trigger("chosen:updated")._addIcon()}}),t(".preview-mode-selector select").entwine({onchange:function A(e){this._super(e),e.preventDefault();var i=t(this).val();t(".cms-preview").changeMode(i)}}),t(".cms-preview.column-hidden").entwine({onmatch:function E(){t("#preview-mode-dropdown-in-content").show(),t(".cms-preview .result-selected").hasClass("font-icon-columns")&&statusMessage(r["default"]._t("LeftAndMain.DISABLESPLITVIEW","Screen too small to show site preview in split mode"),"error"),this._super()},onunmatch:function N(){t("#preview-mode-dropdown-in-content").hide(),this._super()}}),t("#preview-mode-dropdown-in-content").entwine({onmatch:function z(){t(".cms-preview").is(".column-hidden")?this.show():this.hide(),this._super()},onunmatch:function H(){this._super()}}),t(".preview-size-selector").entwine({changeVisibleSize:function F(t){this.find("select").val(t).trigger("chosen:updated")._addIcon()}}),t(".preview-size-selector select").entwine({onchange:function $(e){e.preventDefault();var i=t(this).val();t(".cms-preview").changeSize(i)}}),t(".preview-selector select.preview-dropdown").entwine({"onchosen:ready":function O(){this._super(),this._addIcon()},_addIcon:function W(){var t=this.find(":selected"),e=t.attr("data-icon"),i=this.parent().find(".chosen-container a.chosen-single"),s=i.attr("data-icon");return"undefined"!=typeof s&&i.removeClass(s),i.addClass(e),i.attr("data-icon",e),this}}),t(".preview-mode-selector .chosen-drop li:last-child").entwine({onmatch:function R(){t(".preview-mode-selector").hasClass("split-disabled")?this.parent().append('<div class="disabled-tooltip"></div>'):this.parent().append('<div class="disabled-tooltip" style="display: none;"></div>')}}),t(".preview-device-outer").entwine({onclick:function j(){this.toggleClass("rotate")}})})},function(t,e,i){(function(t){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}var s=i(1),n=e(s),a=i(51),o=e(a);n["default"].entwine("ss.tree",function(e){e("#Form_BatchActionsForm").entwine({Actions:[],getTree:function i(){return e(".cms-tree")},fromTree:{oncheck_node:function s(t,e){this.serializeFromTree()},onuncheck_node:function n(t,e){this.serializeFromTree()}},onmatch:function a(){var t=this;t.getTree().bind("load_node.jstree",function(e,i){t.refreshSelected()})},onunmatch:function r(){var t=this;t.getTree().unbind("load_node.jstree")},registerDefault:function l(){this.register(ss.config.adminUrl+"pages/batchactions/publish",function(t){var e=confirm(o["default"].inject(o["default"]._t("CMSMAIN.BATCH_PUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to publish?"),{num:t.length}));return!!e&&t}),this.register(ss.config.adminUrl+"pages/batchactions/unpublish",function(t){var e=confirm(o["default"].inject(o["default"]._t("CMSMAIN.BATCH_UNPUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to unpublish"),{num:t.length}));return!!e&&t}),this.register(ss.config.adminUrl+"pages/batchactions/delete",function(t){var e=confirm(o["default"].inject(o["default"]._t("CMSMAIN.BATCH_DELETE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to delete?"),{num:t.length}));return!!e&&t}),this.register(ss.config.adminUrl+"pages/batchactions/archive",function(t){var e=confirm(o["default"].inject(o["default"]._t("CMSMAIN.BATCH_ARCHIVE_PROMPT","You have {num} page(s) selected.\n\nAre you sure you want to archive these pages?\n\nThese pages and all of their children pages will be unpublished and sent to the archive."),{num:t.length}));return!!e&&t}),this.register(ss.config.adminUrl+"pages/batchactions/restore",function(t){var e=confirm(o["default"].inject(o["default"]._t("CMSMAIN.BATCH_RESTORE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to restore to stage?\n\nChildren of archived pages will be restored to the root level, unless those pages are also being restored."),{num:t.length}));return!!e&&t}),this.register(ss.config.adminUrl+"pages/batchactions/deletefromlive",function(t){var e=confirm(o["default"].inject(o["default"]._t("CMSMAIN.BATCH_DELETELIVE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to delete these pages from live?"),{num:t.length}));return!!e&&t})},onadd:function h(){this.registerDefault(),this._super()},register:function c(t,e){this.trigger("register",{type:t,callback:e});var i=this.getActions();i[t]=e,this.setActions(i)},unregister:function d(t){this.trigger("unregister",{type:t});var e=this.getActions();e[t]&&delete e[t],this.setActions(e)},refreshSelected:function u(i){var s=this,n=this.getTree(),a=this.getIDs(),o=[],r=e(".cms-content-batchactions-button"),l=this.find(":input[name=Action]").val();null==i&&(i=n);for(var h in a)e(e(n).getNodeByID(h)).addClass("selected").attr("selected","selected");if(!l||l==-1||!r.hasClass("active"))return void e(i).find("li").each(function(){e(this).setEnabled(!0)});e(i).find("li").each(function(){o.push(e(this).data("id")),e(this).addClass("treeloading").setEnabled(!1)});var c=e.path.parseUrl(l),d=c.hrefNoSearch+"/applicablepages/";d=e.path.addSearchParams(d,c.search),d=e.path.addSearchParams(d,{csvIDs:o.join(",")}),t.getJSON(d,function(n){t(i).find("li").each(function(){e(this).removeClass("treeloading");var t=e(this).data("id");0==t||e.inArray(t,n)>=0?e(this).setEnabled(!0):(e(this).removeClass("selected").setEnabled(!1),e(this).prop("selected",!1))}),s.serializeFromTree()})},serializeFromTree:function p(){var t=this.getTree(),e=t.getSelectedIDs();return this.setIDs(e),!0},setIDs:function f(t){this.find(":input[name=csvIDs]").val(t?t.join(","):null)},getIDs:function m(){var t=this.find(":input[name=csvIDs]").val();return t?t.split(","):[]},onsubmit:function g(i){var s=this,n=this.getIDs(),a=this.getTree(),r=this.getActions();if(!n||!n.length)return alert(o["default"]._t("CMSMAIN.SELECTONEPAGE","Please select at least one page")),i.preventDefault(),!1;var l=this.find(":input[name=Action]").val();if(r[l]&&(n=this.getActions()[l].apply(this,[n])),!n||!n.length)return i.preventDefault(),!1;this.setIDs(n),a.find("li").removeClass("failed");var h=this.find(":submit:first");return h.addClass("loading"),t.ajax({url:l,type:"POST",data:this.serializeArray(),complete:function c(t,e){h.removeClass("loading"),a.jstree("refresh",-1),s.setIDs([]),s.find(":input[name=Action]").val("").change();var i=t.getResponseHeader("X-Status");i&&statusMessage(decodeURIComponent(i),"success"==e?"good":"bad")},success:function d(t,i){var s,n;if(t.modified){var o=[];for(s in t.modified)n=a.getNodeByID(s),a.jstree("set_text",n,t.modified[s].TreeTitle),o.push(n);e(o).effect("highlight")}if(t.deleted)for(s in t.deleted)n=a.getNodeByID(s),n.length&&a.jstree("delete_node",n);if(t.error)for(s in t.error)n=a.getNodeByID(s),e(n).addClass("failed")},dataType:"json"}),i.preventDefault(),!1}}),e(".cms-content-batchactions-button").entwine({onmatch:function v(){this._super(),this.updateTree()},onunmatch:function _(){this._super()},onclick:function b(t){this.updateTree()},updateTree:function w(){var t=e(".cms-tree"),i=e("#Form_BatchActionsForm");this._super(),this.data("active")?(t.addClass("multiple"),t.removeClass("draggable"),i.serializeFromTree()):(t.removeClass("multiple"),t.addClass("draggable")),e("#Form_BatchActionsForm").refreshSelected()}}),e("#Form_BatchActionsForm select[name=Action]").entwine({onchange:function y(t){var i=e(t.target.form),s=i.find(":submit"),n=e(t.target).val();n&&n!=-1?s.removeAttr("disabled").button("refresh"):s.attr("disabled","disabled").button("refresh"),e("#Form_BatchActionsForm").refreshSelected(),this.trigger("chosen:updated"),this._super(t)}})})}).call(e,i(1))},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);a["default"].entwine("ss",function(t){t(".cms .field.cms-description-tooltip").entwine({onmatch:function e(){this._super();var t=this.find(".description"),e,i;t.length&&(this.attr("title",t.text()).tooltip({content:t.html()}),t.remove())}}),t(".cms .field.cms-description-tooltip :input").entwine({onfocusin:function i(t){this.closest(".field").tooltip("open")},onfocusout:function s(t){this.closest(".field").tooltip("close")}})})},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);a["default"].entwine("ss",function(t){t(".cms-description-toggle").entwine({onadd:function e(){var t=!1,e=this.prop("id").substr(0,this.prop("id").indexOf("_Holder")),i=this.find(".cms-description-trigger"),s=this.find(".description");this.hasClass("description-toggle-enabled")||(0===i.length&&(i=this.find(".middleColumn").first().after('<label class="right" for="'+e+'"><a class="cms-description-trigger" href="javascript:void(0)"><span class="btn-icon-information"></span></a></label>').next()),this.addClass("description-toggle-enabled"),i.on("click",function(){s[t?"hide":"show"](),t=!t}),s.hide())}})})},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);a["default"].entwine("ss",function(t){t(".TreeDropdownField").entwine({"from .cms-container form":{onaftersubmitform:function e(t){this.find(".tree-holder").empty(),this._super()}}})})},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n),o=i(51),r=s(o),l=i(3),h=s(l),c=i(4),d=s(c),u=i(5),p=i(107),f=s(p);
|
|
a["default"].entwine("ss",function(t){t(".cms-content-actions .add-to-campaign-action,#add-to-campaign__action").entwine({onclick:function e(){var e=t("#add-to-campaign__dialog-wrapper");return e.length||(e=t('<div id="add-to-campaign__dialog-wrapper" />'),t("body").append(e)),e.open(),!1}}),t("#add-to-campaign__dialog-wrapper").entwine({open:function i(){this._renderModal()},close:function s(){this._clearModal()},_renderModal:function n(){var e=this,i=function l(){return e._clearModal()},s=function c(){return e._handleSubmitModal.apply(e,arguments)},n=t("form.cms-edit-form :input[name=ID]").val(),a=window.ss.store,o=a.getState().config.sections["SilverStripe\\CMS\\Controllers\\CMSPageEditController"],r=o.form.AddToCampaignForm.schemaUrl+"/"+n;d["default"].render(h["default"].createElement(u.Provider,{store:a},h["default"].createElement(f["default"],{show:!0,handleSubmit:s,handleHide:i,schemaUrl:r,bodyClassName:"add-to-campaign__dialog",responseClassBad:"add-to-campaign__response add-to-campaign__response--error",responseClassGood:"add-to-campaign__response add-to-campaign__response--good"})),this[0])},_clearModal:function a(){d["default"].unmountComponentAtNode(this[0])},_handleSubmitModal:function o(t,e,i){return t.preventDefault(),e.Campaign?i():(alert(r["default"]._t("AddToCampaigns.ErrorCampaignNotSelected","There was no campaign selected to be added to")),null)}})})},function(t,e){t.exports=FormBuilderModal},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);i(92),i(109);var o=function r(t){var e=(0,a["default"])((0,a["default"])(this).contents()).find(".message");if(e&&e.html()){var i=(0,a["default"])(window.parent.document).find("#Form_EditForm_Members").get(0);i&&i.refresh();var s=(0,a["default"])(window.parent.document).find(".cms-tree").get(0);s&&s.reload()}};(0,a["default"])("#MemberImportFormIframe, #GroupImportFormIframe").entwine({onadd:function l(){this._super(),(0,a["default"])(this).bind("load",o)}}),a["default"].entwine("ss",function(t){t(".permissioncheckboxset .checkbox[value=ADMIN]").entwine({onmatch:function e(){this.toggleCheckboxes(),this._super()},onunmatch:function i(){this._super()},onclick:function s(t){this.toggleCheckboxes()},toggleCheckboxes:function n(){var e=this,i=this.parents(".field:eq(0)").find(".checkbox").not(this);this.is(":checked")?i.each(function(){t(this).data("SecurityAdmin.oldChecked",t(this).is(":checked")),t(this).data("SecurityAdmin.oldDisabled",t(this).is(":disabled")),t(this).prop("disabled",!0),t(this).prop("checked",!0)}):i.each(function(){t(this).prop("checked",t(this).data("SecurityAdmin.oldChecked")),t(this).prop("disabled",t(this).data("SecurityAdmin.oldDisabled"))})}})})},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);a["default"].entwine("ss",function(t){t(".permissioncheckboxset .valADMIN input").entwine({onmatch:function e(){this._super()},onunmatch:function i(){this._super()},onclick:function s(t){this.toggleCheckboxes()},toggleCheckboxes:function n(){var e=t(this).parents(".field:eq(0)").find(".checkbox").not(this);t(this).is(":checked")?e.each(function(){t(this).data("SecurityAdmin.oldChecked",t(this).attr("checked")),t(this).data("SecurityAdmin.oldDisabled",t(this).attr("disabled")),t(this).attr("disabled","disabled"),t(this).attr("checked","checked")}):e.each(function(){var e=t(this).data("SecurityAdmin.oldChecked"),i=t(this).data("SecurityAdmin.oldDisabled");null!==e&&t(this).attr("checked",e),null!==i&&t(this).attr("disabled",i)})}}),t(".permissioncheckboxset .valCMS_ACCESS_LeftAndMain input").entwine({getCheckboxesExceptThisOne:function a(){return t(this).parents(".field:eq(0)").find("li").filter(function(e){var i=t(this).attr("class");return!!i&&i.match(/CMS_ACCESS_/)}).find(".checkbox").not(this)},onmatch:function o(){this.toggleCheckboxes(),this._super()},onunmatch:function r(){this._super()},onclick:function l(t){this.toggleCheckboxes()},toggleCheckboxes:function h(){var e=this.getCheckboxesExceptThisOne();t(this).is(":checked")?e.each(function(){t(this).data("PermissionCheckboxSetField.oldChecked",t(this).is(":checked")),t(this).data("PermissionCheckboxSetField.oldDisabled",t(this).is(":disabled")),t(this).prop("disabled","disabled"),t(this).prop("checked","checked")}):e.each(function(){t(this).prop("checked",t(this).data("PermissionCheckboxSetField.oldChecked")),t(this).prop("disabled",t(this).data("PermissionCheckboxSetField.oldDisabled"))})}})})},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);i(92),a["default"].entwine("ss",function(t){t(".cms-content-tools #Form_SearchForm").entwine({onsubmit:function e(t){this.trigger("beforeSubmit")}}),t(".importSpec").entwine({onmatch:function i(){this.find("div.details").hide(),this.find("a.detailsLink").click(function(){return t("#"+t(this).attr("href").replace(/.*#/,"")).slideToggle(),!1}),this._super()},onunmatch:function s(){this._super()}})})},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);(0,a["default"])(".ss-assetuploadfield").entwine({onmatch:function o(){this._super(),this.find(".ss-uploadfield-editandorganize").hide()},onunmatch:function r(){this._super()},onfileuploadadd:function l(t){this.find(".ss-uploadfield-editandorganize").show()},onfileuploadstart:function h(t){this.find(".ss-uploadfield-editandorganize").show()}}),(0,a["default"])(".ss-uploadfield-view-allowed-extensions .toggle").entwine({onclick:function c(t){var e=this.closest(".ss-uploadfield-view-allowed-extensions"),i=this.closest(".ui-tabs-panel").height()+20;e.toggleClass("active"),e.find(".toggle-content").css("minHeight",i)}})},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);(0,a["default"])(document).on("click",".confirmedpassword .showOnClick a",function(){var t=(0,a["default"])(".showOnClickContainer",(0,a["default"])(this).parent());return t.toggle("fast",function(){t.find('input[type="hidden"]').val(t.is(":visible")?1:0)}),!1})},function(t,e,i){(function(t){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}var s=i(1),n=e(s),a=i(51),o=e(a);window.tmpl=i(114),i(115),i(116),n["default"].widget("blueimpUIX.fileupload",n["default"].blueimpUI.fileupload,{_initTemplates:function r(){this.options.templateContainer=document.createElement(this._files.prop("nodeName")),this.options.uploadTemplate=window.tmpl(this.options.uploadTemplateName),this.options.downloadTemplate=window.tmpl(this.options.downloadTemplateName)},_enableFileInputButton:function l(){n["default"].blueimpUI.fileupload.prototype._enableFileInputButton.call(this),this.element.find(".ss-uploadfield-addfile").show()},_disableFileInputButton:function h(){n["default"].blueimpUI.fileupload.prototype._disableFileInputButton.call(this),this.element.find(".ss-uploadfield-addfile").hide()},_onAdd:function c(t,e){var i=n["default"].blueimpUI.fileupload.prototype._onAdd.call(this,t,e),s=this._files.find(".ss-uploadfield-item").slice(e.files.length*-1).first(),a="+="+(s.position().top-parseInt(s.css("marginTop"),10)||0-parseInt(s.css("borderTopWidth"),10)||0);s.offsetParent().animate({scrollTop:a},1e3);for(var r=0,l=0;l<e.files.length;l++)"number"==typeof e.files[l].size&&(r+=e.files[l].size);return(0,n["default"])(".fileOverview .uploadStatus .details .total").text(e.files.length),"number"==typeof r&&r>0&&(r=this._formatFileSize(r),(0,n["default"])(".fileOverview .uploadStatus .details .fileSize").text(r)),1==e.files.length&&null!==e.files[0].error?((0,n["default"])(".fileOverview .uploadStatus .state").text(o["default"]._t("AssetUploadField.UploadField.UPLOADFAIL","Sorry your upload failed")),(0,n["default"])(".fileOverview .uploadStatus").addClass("bad").removeClass("good").removeClass("notice")):((0,n["default"])(".fileOverview .uploadStatus .state").text(o["default"]._t("AssetUploadField.UPLOADINPROGRESS","Please wait… upload in progress")),(0,n["default"])(".ss-uploadfield-item-edit-all").hide(),(0,n["default"])(".fileOverview .uploadStatus").addClass("notice").removeClass("good").removeClass("bad")),i},_onDone:function d(t,e,i,s){this.options.changeDetection&&this.element.closest("form").trigger("dirty"),n["default"].blueimpUI.fileupload.prototype._onDone.call(this,t,e,i,s)},_onSend:function u(t,e){var i=this,s=this.options;return s.overwriteWarning&&s.replaceFile?void n["default"].get(s.urlFileExists,{filename:e.files[0].name},function(a,o,r){return a.exists?(e.context.find(".ss-uploadfield-item-status").text(s.errorMessages.overwriteWarning).addClass("ui-state-warning-text"),e.context.find(".ss-uploadfield-item-progress").hide(),e.context.find(".ss-uploadfield-item-overwrite").show(),e.context.find(".ss-uploadfield-item-overwrite-warning").on("click",function(t){return e.context.find(".ss-uploadfield-item-progress").show(),e.context.find(".ss-uploadfield-item-overwrite").hide(),e.context.find(".ss-uploadfield-item-status").removeClass("ui-state-warning-text"),n["default"].blueimpUI.fileupload.prototype._onSend.call(i,t,e),t.preventDefault(),!1}),void 0):n["default"].blueimpUI.fileupload.prototype._onSend.call(i,t,e)}):n["default"].blueimpUI.fileupload.prototype._onSend.call(i,t,e)},_onAlways:function p(t,e,i,s){n["default"].blueimpUI.fileupload.prototype._onAlways.call(this,t,e,i,s),"string"==typeof i?((0,n["default"])(".fileOverview .uploadStatus .state").text(o["default"]._t("AssetUploadField.UploadField.UPLOADFAIL","Sorry your upload failed")),(0,n["default"])(".fileOverview .uploadStatus").addClass("bad").removeClass("good").removeClass("notice")):200===i.status&&((0,n["default"])(".fileOverview .uploadStatus .state").text(o["default"]._t("AssetUploadField.FILEUPLOADCOMPLETED","File upload completed!")),(0,n["default"])(".ss-uploadfield-item-edit-all").show(),(0,n["default"])(".fileOverview .uploadStatus").addClass("good").removeClass("notice").removeClass("bad"))},_create:function f(){n["default"].blueimpUI.fileupload.prototype._create.call(this),this._adjustMaxNumberOfFiles(0)},attach:function m(t){this.options.changeDetection&&this.element.closest("form").trigger("dirty");var e=this,i=t.files,s=t.replaceFileID,a=!0,o=null;s&&(o=(0,n["default"])(".ss-uploadfield-item[data-fileid='"+s+"']"),0===o.length?o=null:e._adjustMaxNumberOfFiles(1)),n["default"].each(i,function(t,i){e._adjustMaxNumberOfFiles(-1),a=e._validate([i])&&a}),t.isAdjusted=!0,t.files.valid=t.isValidated=a,t.context=this._renderDownload(i),o?o.replaceWith(t.context):t.context.appendTo(this._files),t.context.data("data",t),this._reflow=this._transition&&t.context[0].offsetWidth,t.context.addClass("in")}}),n["default"].entwine("ss",function(e){e("div.ss-upload").entwine({Config:null,onmatch:function i(){if(!this.is(".readonly,.disabled")){var t=this.find(".ss-uploadfield-fromcomputer-fileinput"),i=e(".ss-uploadfield-dropzone"),s=t.data("config");i.on("dragover",function(t){t.preventDefault()}),i.on("dragenter",function(t){i.addClass("hover active")}),i.on("dragleave",function(t){t.target===i[0]&&i.removeClass("hover active")}),i.on("drop",function(t){if(i.removeClass("hover active"),t.target!==i[0])return!1}),this.setConfig(s),this.fileupload(e.extend(!0,{formData:function n(t){var i=e(t).find(":input[name=ID]").val(),s=[{name:"SecurityID",value:e(t).find(":input[name=SecurityID]").val()}];return i&&s.push({name:"ID",value:i}),s},errorMessages:{1:o["default"]._t("UploadField.PHP_MAXFILESIZE"),2:o["default"]._t("UploadField.HTML_MAXFILESIZE"),3:o["default"]._t("UploadField.ONLYPARTIALUPLOADED"),4:o["default"]._t("UploadField.NOFILEUPLOADED"),5:o["default"]._t("UploadField.NOTMPFOLDER"),6:o["default"]._t("UploadField.WRITEFAILED"),7:o["default"]._t("UploadField.STOPEDBYEXTENSION"),maxFileSize:o["default"]._t("UploadField.TOOLARGESHORT"),minFileSize:o["default"]._t("UploadField.TOOSMALL"),acceptFileTypes:o["default"]._t("UploadField.INVALIDEXTENSIONSHORT"),maxNumberOfFiles:o["default"]._t("UploadField.MAXNUMBEROFFILESSHORT"),uploadedBytes:o["default"]._t("UploadField.UPLOADEDBYTES"),emptyResult:o["default"]._t("UploadField.EMPTYRESULT")},send:function a(t,i){i.context&&i.dataType&&"iframe"===i.dataType.substr(0,6)&&(i.total=1,i.loaded=1,e(this).data("fileupload").options.progress(t,i))},progress:function r(t,e){if(e.context){var i=parseInt(e.loaded/e.total*100,10)+"%";e.context.find(".ss-uploadfield-item-status").html(1==e.total?o["default"]._t("UploadField.LOADING"):i),e.context.find(".ss-uploadfield-item-progressbarvalue").css("width",i)}}},s,{fileInput:t,dropZone:i,form:t.closest("form"),previewAsCanvas:!1,acceptFileTypes:new RegExp(s.acceptFileTypes,"i")})),this.data("fileupload")._isXHRUpload({multipart:!0})&&e(".ss-uploadfield-item-uploador").hide().show(),this._super()}},onunmatch:function s(){e(".ss-uploadfield-dropzone").off("dragover dragenter dragleave drop"),this._super()},openSelectDialog:function n(i){var s=this,n=this.getConfig(),a="ss-uploadfield-dialog-"+this.attr("id"),o=t("#"+a);o.length||(o=t('<div class="ss-uploadfield-dialog" id="'+a+'" />'));var r=n.urlSelectDialog,l=null;i&&i.attr("data-fileid")>0&&(l=i.attr("data-fileid")),o.ssdialog({iframeUrl:r,height:550}),o.find("iframe").bind("load",function(t){var i=e(this).contents(),n=i.find(".grid-field");i.find("table.grid-field").css("margin-top",0),i.find("input[name=action_doAttach]").unbind("click.openSelectDialog").bind("click.openSelectDialog",function(){var t=e.map(n.find(".ss-gridfield-item.ui-selected"),function(t){return e(t).data("id")});return t&&t.length&&s.attachFiles(t,l),o.ssdialog("close"),!1})}),o.ssdialog("open")},attachFiles:function a(t,i){var s=this,n=this.getConfig(),a=e('<div class="loader" />'),o=i?this.find(".ss-uploadfield-item[data-fileid='"+i+"']"):this.find(".ss-uploadfield-addfile");o.children().hide(),o.append(a),e.ajax({type:"POST",url:n.urlAttach,data:{ids:t},complete:function r(t,e){o.children().show(),a.remove()},success:function l(t,n,a){t&&!e.isEmptyObject(t)&&s.fileupload("attach",{files:t,options:s.fileupload("option"),replaceFileID:i})}})}}),e("div.ss-upload *").entwine({getUploadField:function r(){return this.parents("div.ss-upload:first")}}),e("div.ss-upload .ss-uploadfield-files .ss-uploadfield-item").entwine({onadd:function l(){this._super(),this.closest(".ss-upload").find(".ss-uploadfield-addfile").addClass("borderTop")},onremove:function h(){e(".ss-uploadfield-files:not(:has(.ss-uploadfield-item))").closest(".ss-upload").find(".ss-uploadfield-addfile").removeClass("borderTop"),this._super()}}),e("div.ss-upload .ss-uploadfield-startall").entwine({onclick:function c(t){return this.closest(".ss-upload").find(".ss-uploadfield-item-start button").click(),t.preventDefault(),!1}}),e("div.ss-upload .ss-uploadfield-item-cancelfailed").entwine({onclick:function d(t){return this.closest(".ss-uploadfield-item").remove(),t.preventDefault(),!1}}),e("div.ss-upload .ss-uploadfield-item-remove:not(.ui-state-disabled), .ss-uploadfield-item-delete:not(.ui-state-disabled)").entwine({onclick:function u(t){var e=this.closest("div.ss-upload"),i=e.getConfig("changeDetection"),s=e.data("fileupload"),n=this.closest(".ss-uploadfield-item"),a="";return this.is(".ss-uploadfield-item-delete")?confirm(o["default"]._t("UploadField.ConfirmDelete"))&&(i.changeDetection&&this.closest("form").trigger("dirty"),s&&s._trigger("destroy",t,{context:n,url:this.data("href"),type:"get",dataType:s.options.dataType})):(i.changeDetection&&this.closest("form").trigger("dirty"),s&&s._trigger("destroy",t,{context:n})),t.preventDefault(),!1}}),e("div.ss-upload .ss-uploadfield-item-edit-all").entwine({onclick:function p(t){return e(this).hasClass("opened")?(e(".ss-uploadfield-item .ss-uploadfield-item-edit .toggle-details-icon.opened").each(function(t){e(this).closest(".ss-uploadfield-item-edit").click()}),e(this).removeClass("opened").find(".toggle-details-icon").removeClass("opened")):(e(".ss-uploadfield-item .ss-uploadfield-item-edit .toggle-details-icon").each(function(t){e(this).hasClass("opened")||e(this).closest(".ss-uploadfield-item-edit").click()}),e(this).addClass("opened").find(".toggle-details-icon").addClass("opened")),t.preventDefault(),!1}}),e("div.ss-upload:not(.disabled):not(.readonly) .ss-uploadfield-item-edit").entwine({onclick:function f(t){var e=this,i=e.closest(".ss-uploadfield-item").find(".ss-uploadfield-item-editform"),s=i.prev(".ss-uploadfield-item-info"),n=i.find("iframe");if(n.parent().hasClass("loading"))return t.preventDefault(),!1;if("about:blank"==n.attr("src")){var a=this.siblings();n.attr("src",n.data("src")),n.parent().addClass("loading"),a.addClass("ui-state-disabled"),a.attr("disabled","disabled"),n.on("load",function(){n.parent().removeClass("loading"),n.data("src")&&(e._prepareIframe(n,i,s),n.data("src",""))})}else e._prepareIframe(n,i,s);return t.preventDefault(),!1},_prepareIframe:function m(t,e,i){var s;t.contents().ready(function(){var i=t.get(0).contentWindow.jQuery;i(i.find(":input")).bind("change",function(t){e.removeClass("edited"),e.addClass("edited")})}),e.hasClass("loading")||(s=this.hasClass("ss-uploadfield-item-edit")?this.siblings():this.find("ss-uploadfield-item-edit").siblings(),e.parent(".ss-uploadfield-item").removeClass("ui-state-warning"),e.toggleEditForm(),i.find(".toggle-details-icon").hasClass("opened")?(s.addClass("ui-state-disabled"),s.attr("disabled","disabled")):(s.removeClass("ui-state-disabled"),s.removeAttr("disabled")))}}),e("div.ss-upload .ss-uploadfield-item-editform").entwine({fitHeight:function g(){var t=this.find("iframe"),i=t.contents().find("body"),s=i.find("form").outerHeight(!0),n=s+(t.outerHeight(!0)-t.height()),a=n+(this.outerHeight(!0)-this.height());e.browser.msie||"8.0"==e.browser.version.slice(0,3)||i.find("body").css({height:s}),t.height(n),this.animate({height:a},500)},toggleEditForm:function v(){var t=this.prev(".ss-uploadfield-item-info"),i=t.find(".ss-uploadfield-item-status"),s=this.find("iframe").contents(),n=s.find("#Form_EditForm_error"),a="";0===this.height()?(a=o["default"]._t("UploadField.Editing","Editing ..."),this.fitHeight(),this.addClass("opened"),t.find(".toggle-details-icon").addClass("opened"),i.removeClass("ui-state-success-text").removeClass("ui-state-warning-text"),s.find("#Form_EditForm_action_doEdit").click(function(){t.find("label .name").text(s.find("#Name input").val())}),e("div.ss-upload .ss-uploadfield-files .ss-uploadfield-item-actions .toggle-details-icon:not(.opened)").index()<0&&e("div.ss-upload .ss-uploadfield-item-edit-all").addClass("opened").find(".toggle-details-icon").addClass("opened")):(this.animate({height:0},500),this.removeClass("opened"),t.find(".toggle-details-icon").removeClass("opened"),e("div.ss-upload .ss-uploadfield-item-edit-all").removeClass("opened").find(".toggle-details-icon").removeClass("opened"),this.hasClass("edited")?n.hasClass("good")?(a=o["default"]._t("UploadField.CHANGESSAVED","Changes Saved"),this.removeClass("edited").parent(".ss-uploadfield-item").removeClass("ui-state-warning"),i.addClass("ui-state-success-text")):(a=o["default"]._t("UploadField.UNSAVEDCHANGES","Unsaved Changes"),this.parent(".ss-uploadfield-item").addClass("ui-state-warning"),i.addClass("ui-state-warning-text")):(a=o["default"]._t("UploadField.NOCHANGES","No Changes"),i.addClass("ui-state-success-text")),n.removeClass("good").hide()),i.attr("title",a).text(a)}}),e("div.ss-upload .ss-uploadfield-fromfiles").entwine({onclick:function _(t){return this.getUploadField().openSelectDialog(this.closest(".ss-uploadfield-item")),t.preventDefault(),!1}})})}).call(e,i(1))},function(t,e,i){var s;!function(n){"use strict";var a=function(t,e){var i=/[^\-\w]/.test(t)?new Function(a.arg,("var _s=''"+a.helper+";_s+='"+t.replace(a.regexp,a.func)+"';return _s;").split("_s+='';").join("")):a.cache[t]=a.cache[t]||a(a.load(t));return i.tmpl=i.tmpl||a,e?i(e):i};a.cache={},a.load=function(t){return document.getElementById(t).innerHTML},a.regexp=/(\s+)|('|\\)(?![^%]*%\})|(?:\{%(=|#)(.+?)%\})|(\{%)|(%\})/g,a.func=function(t,e,i,s,n,a,o,r,l){return e?r&&r+t.length!==l.length?" ":"":i?"\\"+t:s?"="===s?"'+_e("+n+")+'":"'+("+n+"||'')+'":a?"';":o?"_s+='":void 0},a.encReg=/[<>&"\x00]/g,a.encMap={"<":"<",">":">","&":"&",'"':""","\0":""},a.encode=function(t){return String(t||"").replace(a.encReg,function(t){return a.encMap[t]})},a.arg="o",a.helper=",_t=arguments.callee.tmpl,_e=_t.encode,print=function(s,e){_s+=e&&(s||'')||_e(s);},include=function(s,d){_s+=_t(s,d);}",s=function(){return a}.call(e,i,e,t),!(void 0!==s&&(t.exports=s))}(this)},function(t,e){"use strict";window.tmpl.cache["ss-uploadfield-uploadtemplate"]=window.tmpl('{% for (var i=0, files=o.files, l=files.length, file=files[0]; i<l; file=files[++i]) { %}<li class="ss-uploadfield-item template-upload{% if (file.error) { %} ui-state-error{% } %}"><div class="ss-uploadfield-item-preview preview"><span></span></div><div class="ss-uploadfield-item-info"><label class="ss-uploadfield-item-name"><span class="name" title="{% if (file.name) { %}{%=file.name%}{% } else { %}'+ss.i18n._t("UploadField.NOFILENAME","Untitled")+'{% } %}">{% if (file.name) { %}{%=file.name%}{% } else { %}'+ss.i18n._t("UploadField.NOFILENAME","Untitled")+'{% } %}</span> {% if (!file.error) { %}<div class="ss-uploadfield-item-status">0%</div>{% } else { %}<div class="ss-uploadfield-item-status ui-state-error-text" title="{%=o.options.errorMessages[file.error] || file.error%}">{%=o.options.errorMessages[file.error] || file.error%}</div>{% } %}<div class="clear"><!-- --></div></label><div class="ss-uploadfield-item-actions">{% if (!file.error) { %}<div class="ss-uploadfield-item-progress"><div class="ss-uploadfield-item-progressbar"><div class="ss-uploadfield-item-progressbarvalue"></div></div></div>{% if (!o.options.autoUpload) { %}<div class="ss-uploadfield-item-start start"><button type="button" class="icon icon-16" data-icon="navigation">'+ss.i18n._t("UploadField.START","Start")+'</button></div>{% } %}{% } %}<div class="ss-uploadfield-item-cancel cancel"><button type="button" class="icon icon-16" data-icon="minus-circle" title="'+ss.i18n._t("UploadField.CANCELREMOVE","Cancel/Remove")+'">'+ss.i18n._t("UploadField.CANCELREMOVE","Cancel/Remove")+'</button></div><div class="ss-uploadfield-item-overwrite hide "><button type="button" data-icon="drive-upload" class="ss-uploadfield-item-overwrite-warning" title="'+ss.i18n._t("UploadField.OVERWRITE","Overwrite")+'">'+ss.i18n._t("UploadField.OVERWRITE","Overwrite")+"</button></div></div></div></li>{% } %}")},function(t,e){"use strict";tmpl.cache["ss-uploadfield-downloadtemplate"]=tmpl('{% for (var i=0, files=o.files, l=files.length, file=files[0]; i<l; file=files[++i]) { %}<li class="ss-uploadfield-item template-download{% if (file.error) { %} ui-state-error{% } %}" data-fileid="{%=file.id%}">{% if (file.thumbnail_url) { %}<div class="ss-uploadfield-item-preview preview"><span><img src="{%=file.thumbnail_url%}" alt="" /></span></div>{% } %}<div class="ss-uploadfield-item-info">{% if (!file.error && file.id) { %}<input type="hidden" name="{%=file.fieldname%}[Files][]" value="{%=file.id%}" />{% } %}{% if (!file.error && file.filename) { %}<input type="hidden" value="{%=file.filename%}" name="{%=file.fieldname%}[Filename]" /><input type="hidden" value="{%=file.hash%}" name="{%=file.fieldname%}[Hash]" /><input type="hidden" value="{%=file.variant%}" name="{%=file.fieldname%}[Variant]" />{% } %}<label class="ss-uploadfield-item-name"><span class="name" title="{%=file.name%}">{%=file.name%}</span> <span class="size">{%=o.formatFileSize(file.size)%}</span>{% if (!file.error) { %}<div class="ss-uploadfield-item-status ui-state-success-text" title="'+ss.i18n._t("UploadField.Uploaded","Uploaded")+'">'+ss.i18n._t("UploadField.Uploaded","Uploaded")+'</div>{% } else { %}<div class="ss-uploadfield-item-status ui-state-error-text" title="{%=o.options.errorMessages[file.error] || file.error%}">{%=o.options.errorMessages[file.error] || file.error%}</div>{% } %}<div class="clear"><!-- --></div></label>{% if (file.error) { %}<div class="ss-uploadfield-item-actions"><div class="ss-uploadfield-item-cancel ss-uploadfield-item-cancelfailed delete"><button type="button" class="icon icon-16" data-icon="delete" title="'+ss.i18n._t("UploadField.CANCELREMOVE","Cancel/Remove")+'">'+ss.i18n._t("UploadField.CANCELREMOVE","Cancel/Remove")+'</button></div></div>{% } else { %}<div class="ss-uploadfield-item-actions">{% print(file.buttons, true); %}</div>{% } %}</div>{% if (!file.error) { %}<div class="ss-uploadfield-item-editform"><iframe frameborder="0" data-src="{%=file.edit_url%}" src="about:blank"></iframe></div>{% } %}</li>{% } %}')},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);(0,a["default"])(document).ready(function(){(0,a["default"])("ul.SelectionGroup input.selector, ul.selection-group input.selector").live("click",function(){var t=(0,a["default"])(this).closest("li");t.addClass("selected");var e=t.prevAll("li.selected");e.length&&e.removeClass("selected");var i=t.nextAll("li.selected");i.length&&i.removeClass("selected"),(0,a["default"])(this).focus()})})},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);i(94),a["default"].fn.extend({ssDatepicker:function o(t){return(0,a["default"])(this).each(function(){if(!((0,a["default"])(this).prop("disabled")||(0,a["default"])(this).prop("readonly")||(0,a["default"])(this).data("datepicker"))){(0,a["default"])(this).siblings("button").addClass("ui-icon ui-icon-calendar");var e=(0,a["default"])(this).closest(".field.date"),i=a["default"].extend(t||{},(0,a["default"])(this).data(),(0,a["default"])(this).data("jqueryuiconfig"),{});i.showcalendar&&(i.locale&&a["default"].datepicker.regional[i.locale]&&(i=a["default"].extend(i,a["default"].datepicker.regional[i.locale],{})),i.min&&(i.minDate=a["default"].datepicker.parseDate("yy-mm-dd",i.min)),i.max&&(i.maxDate=a["default"].datepicker.parseDate("yy-mm-dd",i.max)),i.dateFormat=i.jquerydateformat,(0,a["default"])(this).datepicker(i))}})}}),(0,a["default"])(document).on("click",".field.date input.text,input.text.date",function(){(0,a["default"])(this).ssDatepicker(),(0,a["default"])(this).data("datepicker")&&(0,a["default"])(this).datepicker("show")})},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(1),a=s(n);i(94),a["default"].entwine("ss",function(t){t(".ss-toggle").entwine({onadd:function e(){this._super(),this.accordion({heightStyle:"content",collapsible:!0,active:!this.hasClass("ss-toggle-start-closed")&&0})},onremove:function i(){this.data("accordion")&&this.accordion("destroy"),this._super()},getTabSet:function s(){return this.closest(".ss-tabset")},fromTabSet:{ontabsshow:function n(){this.accordion("resize")}}})})},function(t,e,i){(function(t){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}var s=i(1),n=e(s);n["default"].entwine("ss",function(e){e(".memberdatetimeoptionset").entwine({onmatch:function i(){this.find(".toggle-content").hide(),this._super()}}),e(".memberdatetimeoptionset .toggle").entwine({onclick:function s(e){return t(this).closest(".form__field-description").parent().find(".toggle-content").toggle(),!1}})})}).call(e,i(1))}]);
|
|
//# sourceMappingURL=bundle-legacy.js.map
|