text: function isMacOS(){return isOS("mac")}function isWindowsOS(){return isOS("win")}function isLinuxOS(){return isOS("linux")}function isOS(t){return navigator.appVersion.toLowerCase().include(t)}function isSupportsTouch(){return isIPad()||isAndroid()}function isMozilla(){return"Netscape"===navigator.appName}function isFirefox(){return navigator.userAgent.toLowerCase().include("firefox")}function isWebKitEngine(){return Prototype.Browser.WebKit}function isChrome(){return navigator.userAgent.toLowerCase().include("chrome")}function isIPad(){return"iPad"==navigator.platform}function isAndroid(){return navigator.userAgent.toLowerCase().include("android")}function isIE(){return"Microsoft Internet Explorer"===navigator.appName||navigator.userAgent.indexOf("Trident/")>=0}function isIE6(){return isIEVersion(6)}function isIE7(){return isIEVersion(7)}function isIE8(){return isIEVersion(8)}function isIE9(){return isIEVersion(9)}function isIE10(){return isIEVersion(10)}function isIE11(){return isIEVersion(11)}function isIEVersion7Upwards(){return getIEVersion()>=7}function isIEVersion(t){return getIEVersion()===t}function getIEVersion(){var t=0;if(getIEVersion.version>=0)return getIEVersion.version;if(isIE())if("Netscape"===navigator.appName){var e=navigator.userAgent,i=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})");null!=i.exec(e)&&(t=parseFloat(RegExp.$1))}else{var n=navigator.appVersion.split("MSIE")[1];t=parseFloat(n)}return getIEVersion.version=t,t}function doNothing(){}function addDataToForm(t,e){var i=function(e,i){var n=jQuery("<input>").attr("type","hidden").attr("name",e).val(i);jQuery(t).append(jQuery(n))};_.each(e,function(t,e){_.isArray(t)?_.each(t,function(t){i(e,t)}):i(e,t)})}function updateYearMonth(t,e,i){return t&&(t.setFullYear(e),t.setMonth(i),t.getMonth()!==i&&t.setMonth(i)),t}function getTZOffset(t,e){if(!t)return 0;var i,n={"africa/abidjan":{utc:0,utc_dst:0},"africa/accra":{utc:0,utc_dst:0},"africa/addis_ababa":{utc:3,utc_dst:3},"africa/algiers":{utc:1,utc_dst:1},"africa/asmara":{utc:3,utc_dst:3},"africa/asmera":{utc:3,utc_dst:3},"africa/bamako":{utc:0,utc_dst:0},"africa/bangui":{utc:1,utc_dst:1},"africa/banjul":{utc:0,utc_dst:0},"africa/bissau":{utc:0,utc_dst:0},"africa/blantyre":{utc:2,utc_dst:2},"africa/brazzaville":{utc:1,utc_dst:1},"africa/bujumbura":{utc:2,utc_dst:2},"africa/cairo":{utc:2,utc_dst:2},"africa/casablanca":{utc:0,utc_dst:1},"africa/ceuta":{utc:1,utc_dst:2},"africa/conakry":{utc:0,utc_dst:0},"africa/dakar":{utc:0,utc_dst:0},"africa/dar_es_salaam":{utc:3,utc_dst:3},"africa/djibouti":{utc:3,utc_dst:3},"africa/douala":{utc:1,utc_dst:1},"africa/el_aaiun":{utc:0,utc_dst:0},"africa/freetown":{utc:0,utc_dst:0},"africa/gaborone":{utc:2,utc_dst:2},"africa/harare":{utc:2,utc_dst:2},"africa/johannesburg":{utc:2,utc_dst:2},"africa/juba":{utc:3,utc_dst:3},"africa/kampala":{utc:3,utc_dst:3},"africa/khartoum":{utc:3,utc_dst:3},"africa/kigali":{utc:2,utc_dst:2},"africa/kinshasa":{utc:1,utc_dst:1},"africa/lagos":{utc:1,utc_dst:1},"africa/libreville":{utc:1,utc_dst:1},"africa/lome":{utc:0,utc_dst:0},"africa/luanda":{utc:1,utc_dst:1},"africa/lubumbashi":{utc:2,utc_dst:2},"africa/lusaka":{utc:2,utc_dst:2},"africa/malabo":{utc:1,utc_dst:1},"africa/maputo":{utc:2,utc_dst:2},"africa/maseru":{utc:2,utc_dst:2},"africa/mbabane":{utc:2,utc_dst:2},"africa/mogadishu":{utc:3,utc_dst:3},"africa/monrovia":{utc:0,utc_dst:0},"africa/nairobi":{utc:3,utc_dst:3},"africa/ndjamena":{utc:1,utc_dst:1},"africa/niamey":{utc:1,utc_dst:1},"africa/nouakchott":{utc:0,utc_dst:0},"africa/ouagadougou":{utc:0,utc_dst:0},"africa/porto-novo":{utc:1,utc_dst:1},"africa/sao_tome":{utc:0,utc_dst:0},"africa/timbuktu":{utc:0,utc_dst:0},"africa/tripoli":{utc:2,utc_dst:2},"africa/tunis":{utc:1,utc_dst:1},"africa/windhoek":{utc:1,utc_dst:2},akst9akdt:{utc:-9,utc_dst:-8},"america/adak":{utc:-10,utc_dst:-9},"america/anchorage":{utc:-9,utc_dst:-8},"america/anguilla":{utc:-4,utc_dst:-4},"america/antigua":{utc:-4,utc_dst:-4},"america/araguaina":{utc:-3,utc_dst:-3},"america/argentina/buenos_aires":{utc:-3,utc_dst:-3},"america/argentina/catamarca":{utc:-3,utc_dst:-3},"america/argentina/comodrivadavia":{utc:-3,utc_dst:-3},"america/argentina/cordoba":{utc:-3,utc_dst:-3},"america/argentina/jujuy":{utc:-3,utc_dst:-3},"america/argentina/la_rioja":{utc:-3,utc_dst:-3},"america/argentina/mendoza":{utc:-3,utc_dst:-3},"america/argentina/rio_gallegos":{utc:-3,utc_dst:-3},"america/argentina/salta":{utc:-3,utc_dst:-3},"america/argentina/san_juan":{utc:-3,utc_dst:-3},"america/argentina/san_luis":{utc:-3,utc_dst:-3},"america/argentina/tucuman":{utc:-3,utc_dst:-3},"america/argentina/ushuaia":{utc:-3,utc_dst:-3},"america/aruba":{utc:-4,utc_dst:-4},"america/asuncion":{utc:-4,utc_dst:-3},"america/atikokan":{utc:-5,utc_dst:-5},"america/atka":{utc:-10,utc_dst:-9},"america/bahia":{utc:-3,utc_dst:-2},"america/bahia_banderas":{utc:-6,utc_dst:-5},"america/barbados":{utc:-4,utc_dst:-4},"america/belem":{utc:-3,utc_dst:-3},"america/belize":{utc:-6,utc_dst:-6},"america/blanc-sablon":{utc:-4,utc_dst:-4},"america/boa_vista":{utc:-4,utc_dst:-4},"america/bogota":{utc:-5,utc_dst:-5},"america/boise":{utc:-7,utc_dst:-6},"america/buenos_aires":{utc:-3,utc_dst:-3},"america/cambridge_bay":{utc:-7,utc_dst:-6},"america/campo_grande":{utc:-4,utc_dst:-3},"america/cancun":{utc:-6,utc_dst:-5},"america/caracas":{utc:-4.5,utc_dst:-4.5},"america/catamarca":{utc:-3,utc_dst:-3},"america/cayenne":{utc:-3,utc_dst:-3},"america/cayman":{utc:-5,utc_dst:-5},"america/chicago":{utc:-6,utc_dst:-5},"america/chihuahua":{utc:-7,utc_dst:-6},"america/coral_harbour":{utc:-5,utc_dst:-5},"america/cordoba":{utc:-3,utc_dst:-3},"america/costa_rica":{utc:-6,utc_dst:-6},"america/creston":{utc:-7,utc_dst:-7},"america/cuiaba":{utc:-4,utc_dst:-3},"america/curacao":{utc:-4,utc_dst:-4},"america/danmarkshavn":{utc:0,utc_dst:0},"america/dawson":{utc:-8,utc_dst:-7},"america/dawson_creek":{utc:-7,utc_dst:-7},"america/denver":{utc:-7,utc_dst:-6},"america/detroit":{utc:-5,utc_dst:-4},"america/dominica":{utc:-4,utc_dst:-4},"america/edmonton":{utc:-7,utc_dst:-6},"america/eirunepe":{utc:-4,utc_dst:-4},"america/el_salvador":{utc:-6,utc_dst:-6},"america/ensenada":{utc:-8,utc_dst:-7},"america/fort_wayne":{utc:-5,utc_dst:-4},"america/fortaleza":{utc:-3,utc_dst:-3},"america/glace_bay":{utc:-4,utc_dst:-3},"america/godthab":{utc:-3,utc_dst:-2},"america/goose_bay":{utc:-4,utc_dst:-3},"america/grand_turk":{utc:-5,utc_dst:-4},"america/grenada":{utc:-4,utc_dst:-4},"america/guadeloupe":{utc:-4,utc_dst:-4},"america/guatemala":{utc:-6,utc_dst:-6},"america/guayaquil":{utc:-5,utc_dst:-5},"america/guyana":{utc:-4,utc_dst:-4},"america/halifax":{utc:-4,utc_dst:-3},"america/havana":{utc:-5,utc_dst:-4},"america/hermosillo":{utc:-7,utc_dst:-7},"america/indiana/indianapolis":{utc:-5,utc_dst:-4},"america/indiana/knox":{utc:-6,utc_dst:-5},"america/indiana/marengo":{utc:-5,utc_dst:-4},"america/indiana/petersburg":{utc:-5,utc_dst:-4},"america/indiana/tell_city":{utc:-6,utc_dst:-5},"america/indiana/vevay":{utc:-5,utc_dst:-4},"america/indiana/vincennes":{utc:-5,utc_dst:-4},"america/indiana/winamac":{utc:-5,utc_dst:-4},"america/indianapolis":{utc:-5,utc_dst:-4},"america/inuvik":{utc:-7,utc_dst:-6},"america/iqaluit":{utc:-5,utc_dst:-4},"america/jamaica":{utc:-5,utc_dst:-5},"america/jujuy":{utc:-3,utc_dst:-3},"america/juneau":{utc:-9,utc_dst:-8},"america/kentucky/louisville":{utc:-5,utc_dst:-4},"america/kentucky/monticello":{utc:-5,utc_dst:-4},"america/knox_in":{utc:-6,utc_dst:-5},"america/kralendijk":{utc:-4,utc_dst:-4},"america/la_paz":{utc:-4,utc_dst:-4},"america/lima":{utc:-5,utc_dst:-5},"america/los_angeles":{utc:-8,utc_dst:-7},"america/louisville":{utc:-5,utc_dst:-4},"america/lower_princes":{utc:-4,utc_dst:-4},"america/maceio":{utc:-3,utc_dst:-3},"america/managua":{utc:-6,utc_dst:-6},"america/manaus":{utc:-4,utc_dst:-4},"america/marigot":{utc:-4,utc_dst:-4},"america/martinique":{utc:-4,utc_dst:-4},"america/matamoros":{utc:-6,utc_dst:-5},"america/mazatlan":{utc:-7,utc_dst:-6},"america/mendoza":{utc:-3,utc_dst:-3},"america/menominee":{utc:-6,utc_dst:-5},"america/merida":{utc:-6,utc_dst:-5},"america/metlakatla":{utc:-8,utc_dst:-8},"america/mexico_city":{utc:-6,utc_dst:-5},"america/miquelon":{utc:-3,utc_dst:-2},"america/moncton":{utc:-4,utc_dst:-3},"america/monterrey":{utc:-6,utc_dst:-5},"america/montevideo":{utc:-3,utc_dst:-2},"america/montreal":{utc:-5,utc_dst:-4},"america/montserrat":{utc:-4,utc_dst:-4},"america/nassau":{utc:-5,utc_dst:-4},"america/new_york":{utc:-5,utc_dst:-4},"america/nipigon":{utc:-5,utc_dst:-4},"america/nome":{utc:-9,utc_dst:-8},"america/noronha":{utc:-2,utc_dst:-2},"america/north_dakota/beulah":{utc:-6,utc_dst:-5},"america/north_dakota/center":{utc:-6,utc_dst:-5},"america/north_dakota/new_salem":{utc:-6,utc_dst:-5},"america/ojinaga":{utc:-7,utc_dst:-6},"america/panama":{utc:-5,utc_dst:-5},"america/pangnirtung":{utc:-5,utc_dst:-4},"america/paramaribo":{utc:-3,utc_dst:-3},"america/phoenix":{utc:-7,utc_dst:-7},"america/port_of_spain":{utc:-4,utc_dst:-4},"america/port-au-prince":{utc:-5,utc_dst:-4},"america/porto_acre":{utc:-4,utc_dst:-4},"america/porto_velho":{utc:-4,utc_dst:-4},"america/puerto_rico":{utc:-4,utc_dst:-4},"america/rainy_river":{utc:-6,utc_dst:-5},"america/rankin_inlet":{utc:-6,utc_dst:-5},"america/recife":{utc:-3,utc_dst:-3},"america/regina":{utc:-6,utc_dst:-6},"america/resolute":{utc:-6,utc_dst:-5},"america/rio_branco":{utc:-4,utc_dst:-4},"america/rosario":{utc:-3,utc_dst:-3},"america/santa_isabel":{utc:-8,utc_dst:-7},"america/santarem":{utc:-3,utc_dst:-3},"america/santiago":{utc:-4,utc_dst:-3},"america/santo_domingo":{utc:-4,utc_dst:-4},"america/sao_paulo":{utc:-3,utc_dst:-2},"america/scoresbysund":{utc:-1,utc_dst:0},"america/shiprock":{utc:-7,utc_dst:-6},"america/sitka":{utc:-9,utc_dst:-8},"america/st_barthelemy":{utc:-4,utc_dst:-4},"america/st_johns":{utc:-3.5,utc_dst:-2.5},"america/st_kitts":{utc:-4,utc_dst:-4},"america/st_lucia":{utc:-4,utc_dst:-4},"america/st_thomas":{utc:-4,utc_dst:-4},"america/st_vincent":{utc:-4,utc_dst:-4},"america/swift_current":{utc:-6,utc_dst:-6},"america/tegucigalpa":{utc:-6,utc_dst:-6},"america/thule":{utc:-4,utc_dst:-3},"america/thunder_bay":{utc:-5,utc_dst:-4},"america/tijuana":{utc:-8,utc_dst:-7},"america/toronto":{utc:-5,utc_dst:-4},"america/tortola":{utc:-4,utc_dst:-4},"america/vancouver":{utc:-8,utc_dst:-7},"america/virgin":{utc:-4,utc_dst:-4},"america/whitehorse":{utc:-8,utc_dst:-7},"america/winnipeg":{utc:-6,utc_dst:-5},"america/yakutat":{utc:-9,utc_dst:-8},"america/yellowknife":{utc:-7,utc_dst:-6},"antarctica/casey":{utc:11,utc_dst:8},"antarctica/davis":{utc:5,utc_dst:7},"antarctica/dumontdurville":{utc:10,utc_dst:10},"antarctica/macquarie":{utc:11,utc_dst:11},"antarctica/mawson":{utc:5,utc_dst:5},"antarctica/mcmurdo":{utc:12,utc_dst:13},"antarctica/palmer":{utc:-4,utc_dst:-3},"antarctica/rothera":{utc:-3,utc_dst:-3},"antarctica/south_pole":{utc:12,utc_dst:13},"antarctica/syowa":{utc:3,utc_dst:3},"antarctica/vostok":{utc:6,utc_dst:6},"arctic/longyearbyen":{utc:1,utc_dst:2},"asia/aden":{utc:3,utc_dst:3},"asia/almaty":{utc:6,utc_dst:6},"asia/amman":{utc:2,utc_dst:3},"asia/anadyr":{utc:12,utc_dst:12},"asia/aqtau":{utc:5,utc_dst:5},"asia/aqtobe":{utc:5,utc_dst:5},"asia/ashgabat":{utc:5,utc_dst:5},"asia/ashkhabad":{utc:5,utc_dst:5},"asia/baghdad":{utc:3,utc_dst:3},"asia/bahrain":{utc:3,utc_dst:3},"asia/baku":{utc:4,utc_dst:5},"asia/bangkok":{utc:7,utc_dst:7},"asia/beirut":{utc:2,utc_dst:3},"asia/bishkek":{utc:6,utc_dst:6},"asia/brunei":{utc:8,utc_dst:8},"asia/calcutta":{utc:5.5,utc_dst:5.5},"asia/choibalsan":{utc:8,utc_dst:8},"asia/chongqing":{utc:8,utc_dst:8},"asia/chungking":{utc:8,utc_dst:8},"asia/colombo":{utc:5.5,utc_dst:5.5},"asia/dacca":{utc:6,utc_dst:6},"asia/damascus":{utc:2,utc_dst:3},"asia/dhaka":{utc:6,utc_dst:6},"asia/dili":{utc:9,utc_dst:9},"asia/dubai":{utc:4,utc_dst:4},"asia/dushanbe":{utc:5,utc_dst:5},"asia/gaza":{utc:2,utc_dst:3},"asia/harbin":{utc:8,utc_dst:8},"asia/hebron":{utc:2,utc_dst:3},"asia/ho_chi_minh":{utc:7,utc_dst:7},"asia/hong_kong":{utc:8,utc_dst:8},"asia/hovd":{utc:7,utc_dst:7},"asia/irkutsk":{utc:9,utc_dst:9},"asia/istanbul":{utc:2,utc_dst:3},"asia/jakarta":{utc:7,utc_dst:7},"asia/jayapura":{utc:9,utc_dst:9},"asia/jerusalem":{utc:2,utc_dst:3},"asia/kabul":{utc:4.5,utc_dst:4.5},"asia/kamchatka":{utc:12,utc_dst:12},"asia/karachi":{utc:5,utc_dst:5},"asia/kashgar":{utc:8,utc_dst:8},"asia/kathmandu":{utc:5.75,utc_dst:5.75},"asia/katmandu":{utc:5.75,utc_dst:5.75},"asia/kolkata":{utc:5.5,utc_dst:5.5},"asia/krasnoyarsk":{utc:8,utc_dst:8},"asia/kuala_lumpur":{utc:8,utc_dst:8},"asia/kuching":{utc:8,utc_dst:8},"asia/kuwait":{utc:3,utc_dst:3},"asia/macao":{utc:8,utc_dst:8},"asia/macau":{utc:8,utc_dst:8},"asia/magadan":{utc:12,utc_dst:12},"asia/makassar":{utc:8,utc_dst:8},"asia/manila":{utc:8,utc_dst:8},"asia/muscat":{utc:4,utc_dst:4},"asia/nicosia":{utc:2,utc_dst:3},"asia/novokuznetsk":{utc:7,utc_dst:7},"asia/novosibirsk":{utc:7,utc_dst:7},"asia/omsk":{utc:7,utc_dst:7},"asia/oral":{utc:5,utc_dst:5},"asia/phnom_penh":{utc:7,utc_dst:7},"asia/pontianak":{utc:7,utc_dst:7},"asia/pyongyang":{utc:9,utc_dst:9},"asia/qatar":{utc:3,utc_dst:3},"asia/qyzylorda":{utc:6,utc_dst:6},"asia/rangoon":{utc:6.5,utc_dst:6.5},"asia/riyadh":{utc:3,utc_dst:3},"asia/saigon":{utc:7,utc_dst:7},"asia/sakhalin":{utc:11,utc_dst:11},"asia/samarkand":{utc:5,utc_dst:5},"asia/seoul":{utc:9,utc_dst:9},"asia/shanghai":{utc:8,utc_dst:8},"asia/singapore":{utc:8,utc_dst:8},"asia/taipei":{utc:8,utc_dst:8},"asia/tashkent":{utc:5,utc_dst:5},"asia/tbilisi":{utc:4,utc_dst:4},"asia/tehran":{utc:3.5,utc_dst:4.5},"asia/tel_aviv":{utc:2,utc_dst:3},"asia/thimbu":{utc:6,utc_dst:6},"asia/thimphu":{utc:6,utc_dst:6},"asia/tokyo":{utc:9,utc_dst:9},"asia/ujung_pandang":{utc:8,utc_dst:8},"asia/ulaanbaatar":{utc:8,utc_dst:8},"asia/ulan_bator":{utc:8,utc_dst:8},"asia/urumqi":{utc:8,utc_dst:8},"asia/vientiane":{utc:7,utc_dst:7},"asia/vladivostok":{utc:11,utc_dst:11},"asia/yakutsk":{utc:10,utc_dst:10},"asia/yekaterinburg":{utc:6,utc_dst:6},"asia/yerevan":{utc:4,utc_dst:4},"atlantic/azores":{utc:-1,utc_dst:0},"atlantic/bermuda":{utc:-4,utc_dst:-3},"atlantic/canary":{utc:0,utc_dst:1},"atlantic/cape_verde":{utc:-1,utc_dst:-1},"atlantic/faeroe":{utc:0,utc_dst:1},"atlantic/faroe":{utc:0,utc_dst:1},"atlantic/jan_mayen":{utc:1,utc_dst:2},"atlantic/madeira":{utc:0,utc_dst:1},"atlantic/reykjavik":{utc:0,utc_dst:0},"atlantic/south_georgia":{utc:-2,utc_dst:-2},"atlantic/st_helena":{utc:0,utc_dst:0},"atlantic/stanley":{utc:-3,utc_dst:-3},"australia/act":{utc:10,utc_dst:11},"australia/adelaide":{utc:9.5,utc_dst:10.5},"australia/brisbane":{utc:10,utc_dst:10},"australia/broken_hill":{utc:9.5,utc_dst:10.5},"australia/canberra":{utc:10,utc_dst:11},"australia/currie":{utc:10,utc_dst:11},"australia/darwin":{utc:9.5,utc_dst:9.5},"australia/eucla":{utc:8.75,utc_dst:8.75},"australia/hobart":{utc:10,utc_dst:11},"australia/lhi":{utc:10.5,utc_dst:11},"australia/lindeman":{utc:10,utc_dst:10},"australia/lord_howe":{utc:10.5,utc_dst:11},"australia/melbourne":{utc:10,utc_dst:11},"australia/north":{utc:9.5,utc_dst:9.5},"australia/nsw":{utc:10,utc_dst:11},"australia/perth":{utc:8,utc_dst:8},"australia/queensland":{utc:10,utc_dst:10},"australia/south":{utc:9.5,utc_dst:10.5},"australia/sydney":{utc:10,utc_dst:11},"australia/tasmania":{utc:10,utc_dst:11},"australia/victoria":{utc:10,utc_dst:11},"australia/west":{utc:8,utc_dst:8},"australia/yancowinna":{utc:9.5,utc_dst:10.5},"brazil/acre":{utc:-4,utc_dst:-4},"brazil/denoronha":{utc:-2,utc_dst:-2},"brazil/east":{utc:-3,utc_dst:-2},"brazil/west":{utc:-4,utc_dst:-4},"canada/atlantic":{utc:-4,utc_dst:-3},"canada/central":{utc:-6,utc_dst:-5},"canada/eastern":{utc:-5,utc_dst:-4},"canada/east-saskatchewan":{utc:-6,utc_dst:-6},"canada/mountain":{utc:-7,utc_dst:-6},"canada/newfoundland":{utc:-3.5,utc_dst:-2.5},"canada/pacific":{utc:-8,utc_dst:-7},"canada/saskatchewan":{utc:-6,utc_dst:-6},"canada/yukon":{utc:-8,utc_dst:-7},cet:{utc:1,utc_dst:2},"chile/continental":{utc:-4,utc_dst:-3},"chile/easterisland":{utc:-6,utc_dst:-5},cst6cdt:{utc:-6,utc_dst:-5},cuba:{utc:-5,utc_dst:-4},eet:{utc:2,utc_dst:3},egypt:{utc:2,utc_dst:2},eire:{utc:0,utc_dst:1},est:{utc:-5,utc_dst:-5},est5edt:{utc:-5,utc_dst:-4},"etc/gmt":{utc:0,utc_dst:0},"etc/gmt+0":{utc:0,utc_dst:0},"etc/uct":{utc:0,utc_dst:0},"etc/universal":{utc:0,utc_dst:0},"etc/utc":{utc:0,utc_dst:0},"etc/zulu":{utc:0,utc_dst:0},"europe/amsterdam":{utc:1,utc_dst:2},"europe/andorra":{utc:1,utc_dst:2},"europe/athens":{utc:2,utc_dst:3},"europe/belfast":{utc:0,utc_dst:1},"europe/belgrade":{utc:1,utc_dst:2},"europe/berlin":{utc:1,utc_dst:2},"europe/bratislava":{utc:1,utc_dst:2},"europe/brussels":{utc:1,utc_dst:2},"europe/bucharest":{utc:2,utc_dst:3},"europe/budapest":{utc:1,utc_dst:2},"europe/chisinau":{utc:2,utc_dst:3},"europe/copenhagen":{utc:1,utc_dst:2},"europe/dublin":{utc:0,utc_dst:1},"europe/gibraltar":{utc:1,utc_dst:2},"europe/guernsey":{utc:0,utc_dst:1},"europe/helsinki":{utc:2,utc_dst:3},"europe/isle_of_man":{utc:0,utc_dst:1},"europe/istanbul":{utc:2,utc_dst:3},"europe/jersey":{utc:0,utc_dst:1},"europe/kaliningrad":{utc:3,utc_dst:3},"europe/kiev":{utc:2,utc_dst:3},"europe/lisbon":{utc:0,utc_dst:1},"europe/ljubljana":{utc:1,utc_dst:2},"europe/london":{utc:0,utc_dst:1},"europe/luxembourg":{utc:1,utc_dst:2},"europe/madrid":{utc:1,utc_dst:2},"europe/malta":{utc:1,utc_dst:2},"europe/mariehamn":{utc:2,utc_dst:3},"europe/minsk":{utc:3,utc_dst:3},"europe/monaco":{utc:1,utc_dst:2},"europe/moscow":{utc:4,utc_dst:4},"europe/nicosia":{utc:2,utc_dst:3},"europe/oslo":{utc:1,utc_dst:2},"europe/paris":{utc:1,utc_dst:2},"europe/podgorica":{utc:1,utc_dst:2},"europe/prague":{utc:1,utc_dst:2},"europe/riga":{utc:2,utc_dst:3},"europe/rome":{utc:1,utc_dst:2},"europe/samara":{utc:4,utc_dst:4},"europe/san_marino":{utc:1,utc_dst:2},"europe/sarajevo":{utc:1,utc_dst:2},"europe/simferopol":{utc:2,utc_dst:3},"europe/skopje":{utc:1,utc_dst:2},"europe/sofia":{utc:2,utc_dst:3},"europe/stockholm":{utc:1,utc_dst:2},"europe/tallinn":{utc:2,utc_dst:3},"europe/tirane":{utc:1,utc_dst:2},"europe/tiraspol":{utc:2,utc_dst:3},"europe/uzhgorod":{utc:2,utc_dst:3},"europe/vaduz":{utc:1,utc_dst:2},"europe/vatican":{utc:1,utc_dst:2},"europe/vienna":{utc:1,utc_dst:2},"europe/vilnius":{utc:2,utc_dst:3},"europe/volgograd":{utc:4,utc_dst:4},"europe/warsaw":{utc:1,utc_dst:2},"europe/zagreb":{utc:1,utc_dst:2},"europe/zaporozhye":{utc:2,utc_dst:3},"europe/zurich":{utc:1,utc_dst:2},gb:{utc:0,utc_dst:1},"gb-eire":{utc:0,utc_dst:1},gmt:{utc:0,utc_dst:0},"gmt+0":{utc:0,utc_dst:0},gmt0:{utc:0,utc_dst:0},"gmt-0":{utc:0,utc_dst:0},greenwich:{utc:0,utc_dst:0},hongkong:{utc:8,utc_dst:8},hst:{utc:-10,utc_dst:-10},iceland:{utc:0,utc_dst:0},"indian/antananarivo":{utc:3,utc_dst:3},"indian/chagos":{utc:6,utc_dst:6},"indian/christmas":{utc:7,utc_dst:7},"indian/cocos":{utc:6.5,utc_dst:6.5},"indian/comoro":{utc:3,utc_dst:3},"indian/kerguelen":{utc:5,utc_dst:5},"indian/mahe":{utc:4,utc_dst:4},"indian/maldives":{utc:5,utc_dst:5},"indian/mauritius":{utc:4,utc_dst:4},"indian/mayotte":{utc:3,utc_dst:3},"indian/reunion":{utc:4,utc_dst:4},iran:{utc:3.5,utc_dst:4.5},israel:{utc:2,utc_dst:3},jamaica:{utc:-5,utc_dst:-5},japan:{utc:9,utc_dst:9},"jst-9":{utc:9,utc_dst:9},kwajalein:{utc:12,utc_dst:12},libya:{utc:2,utc_dst:2},met:{utc:1,utc_dst:2},"mexico/bajanorte":{utc:-8,utc_dst:-7},"mexico/bajasur":{utc:-7,utc_dst:-6},"mexico/general":{utc:-6,utc_dst:-5},mst:{utc:-7,utc_dst:-7},mst7mdt:{utc:-7,utc_dst:-6},navajo:{utc:-7,utc_dst:-6},nz:{utc:12,utc_dst:13},"nz-chat":{utc:12.75,utc_dst:13.75},"pacific/apia":{utc:13,utc_dst:14},"pacific/auckland":{utc:12,utc_dst:13},"pacific/chatham":{utc:12.75,utc_dst:13.75},"pacific/chuuk":{utc:10,utc_dst:10},"pacific/easter":{utc:-6,utc_dst:-5},"pacific/efate":{utc:11,utc_dst:11},"pacific/enderbury":{utc:13,utc_dst:13},"pacific/fakaofo":{utc:13,utc_dst:13},"pacific/fiji":{utc:12,utc_dst:13},"pacific/funafuti":{utc:12,utc_dst:12},"pacific/galapagos":{utc:-6,utc_dst:-6},"pacific/gambier":{utc:-9,utc_dst:-9},"pacific/guadalcanal":{utc:11,utc_dst:11},"pacific/guam":{utc:10,utc_dst:10},"pacific/honolulu":{utc:-10,utc_dst:-10},"pacific/johnston":{utc:-10,utc_dst:-10},"pacific/kiritimati":{utc:14,utc_dst:14},"pacific/kosrae":{utc:11,utc_dst:11},"pacific/kwajalein":{utc:12,utc_dst:12},"pacific/majuro":{utc:12,utc_dst:12},"pacific/marquesas":{utc:-9.5,utc_dst:-9.5},"pacific/midway":{utc:-11,utc_dst:-11},"pacific/nauru":{utc:12,utc_dst:12},"pacific/niue":{utc:-11,utc_dst:-11},"pacific/norfolk":{utc:11.5,utc_dst:11.5},"pacific/noumea":{utc:11,utc_dst:11},"pacific/pago_pago":{utc:-11,utc_dst:-11},"pacific/palau":{utc:9,utc_dst:9},"pacific/pitcairn":{utc:-8,utc_dst:-8},"pacific/pohnpei":{utc:11,utc_dst:11},"pacific/ponape":{utc:11,utc_dst:11},"pacific/port_moresby":{utc:10,utc_dst:10},"pacific/rarotonga":{utc:-10,utc_dst:-10},"pacific/saipan":{utc:10,utc_dst:10},"pacific/samoa":{utc:-11,utc_dst:-11},"pacific/tahiti":{utc:-10,utc_dst:-10},"pacific/tarawa":{utc:12,utc_dst:12},"pacific/tongatapu":{utc:13,utc_dst:13},"pacific/truk":{utc:10,utc_dst:10},"pacific/wake":{utc:12,utc_dst:12},"pacific/wallis":{utc:12,utc_dst:12},"pacific/yap":{utc:10,utc_dst:10},poland:{utc:1,utc_dst:2},portugal:{utc:0,utc_dst:1},prc:{utc:8,utc_dst:8},pst8pdt:{utc:-8,utc_dst:-7},roc:{utc:8,utc_dst:8},rok:{utc:9,utc_dst:9},singapore:{utc:8,utc_dst:8},turkey:{utc:2,utc_dst:3},uct:{utc:0,utc_dst:0},universal:{utc:0,utc_dst:0},"us/alaska":{utc:-9,utc_dst:-8},"us/aleutian":{utc:-10,utc_dst:-9},"us/arizona":{utc:-7,utc_dst:-7},"us/central":{utc:-6,utc_dst:-5},"us/eastern":{utc:-5,utc_dst:-4},"us/east-indiana":{utc:-5,utc_dst:-4},"us/hawaii":{utc:-10,utc_dst:-10},"us/indiana-starke":{utc:-6,utc_dst:-5},"us/michigan":{utc:-5,utc_dst:-4},"us/mountain":{utc:-7,utc_dst:-6},"us/pacific":{utc:-8,utc_dst:-7},"us/pacific-new":{utc:-8,utc_dst:-7},"us/samoa":{utc:-11,utc_dst:-11},utc:{utc:0,utc_dst:0},wet:{utc:0,utc_dst:1},"w-su":{utc:4,utc_dst:4},zulu:{utc:0,utc_dst:0}};if(t=t.toLowerCase(),"undefined"==typeof n[t])return 0;i=n[t].utc;var s=require("moment");return s(e).isDST()&&(i=n[t].utc_dst),i}function exists(t){return!Object.isUndefined(t)}function isArray(t){return Object.isArray(t)}function isNumber(t){return Object.isNumber(t)}function isNotNullORUndefined(t){return"undefined"!=typeof t&&null!=t}function hasDisabledAttributeSet(t){var e=t.getAttribute("disabled");return isNotNullORUndefined(e)?"0"==e||"false"==e||""==e?!1:!0:!1}function getParentDiv(t){return t.up("div")}function getParentRow(t){return elem.up("tr")}function getParentCell(t){return elem.up("td")}function getParentTable(t){return elem.up("table")}function getAbsoluteParent(t){for(var e=t;!e.style||"absolute"!==e.style.position;){if("body"===e.tagName.toLowerCase())return null;e=e.up()}return e}function getElementWithIdAndTagAndParent(t,e,i){for(var n=i.getElementsByTagName(e),s=0;s<n.length;s++)if(n[s].getAttribute("id")===t)return n[s];return null}function getClosestAncestor(t,e){for(var i;!i;)if(i=$(t).up(e),!i&&(t=t.parentNode,!t||"DIV"!==t.tagName))return null;return i}function isDescendantOf(t,e){for(;"BODY"!=t.tagName;){if(t==e)return!0;t=t.parentNode}return!1}function getCellIndex(t){return t.cellIndex}function getRowIndex(t){return t.rowIndex}function isDisabled(t){if(!t.readAttribute)return!1;if(Draggables&&Draggables.activeDraggable&&Draggables.activeDraggable.dragging&&matchAny(Draggables.activeDraggable.element,[".sizer.dragging"],!1))return!1;var e=!!t.readAttribute("disabled")||t.ancestors().any(function(t){return t.readAttribute("disabled")}),i=matchAny(t,[".disabled"],!0);return e||i}function matchAny(t,e,i){if(!t)return null;for(var n=0;n<e.length;++n)if(t.match&&t.match(e[n]))return t;if(i)for(var n=0;n<e.length;++n){var s=t.up&&t.up(e[n]);if(s)return s}return null}function matchMeOrUp(t,e){for(var i;t&&!i;)i=t.match&&t.match(e)&&t,t=t.parentNode;return i}function stylesMatch(t,e,i){return $(t).getStyle(i)===$(e).getStyle(i)}function getNextMatchingSibling(t,e){for(;t=t.nextSibling;)if(t.match&&t.match(e))return t;return null}function getNextNonMatchingSibling(t,e){for(;t=t.nextSibling;)if(t.match&&!t.match(e))return t;return null}function getPreviousMatchingSibling(t,e){for(;t=t.previousSibling;)if(t.match&&t.match(e))return t;return null}function getPreviousNonMatchingSibling(t,e){for(;t=t.previousSibling;)if(t.match&&!t.match(e))return t;return null}function getAbsoluteOffsets(t){for(var e=t.offsetLeft,i=t.offsetTop,n=t.offsetParent;"BODY"!=n.tagName.toUpperCase()&&"absolute"!=n.style.position;){var e=e+n.offsetLeft,i=i+n.offsetTop;n=n.offsetParent}return"absolute"==n.style.position&&(e+=n.offsetLeft,i+=n.offsetTop),isIE()&&(i+=1),new Array(e,i,e+t.offsetWidth,i+t.offsetHeight)}function getAbsoluteTopOffset(t){for(var e=t.offsetTop,i=t.offsetParent;"BODY"!=i.tagName.toUpperCase()&&"absolute"!=i.style.position;){var e=e+i.offsetTop;i=i.offsetParent}return"absolute"==i.style.position&&(e+=i.offsetTop),isIE()&&(e+=1),e}function getBoxOffsets(t,e){var i=$(t).cumulativeOffset(),n=i[0],s=i[1];if(e){var o=$(t).cumulativeScrollOffset();n-=o[0],s-=o[1]}return new Array(n,s)}function getInnerText(t){return isNotNullORUndefined(t.innerText)?t.innerText:t.textContent}function isPointOverlayingObject(t,e,i){return Position.within(i,t,e)}function boxesOverlap(t,e,i,n,s,o,r,a){return!(e>a||o>n||t>r||s>i)}function boxesOverlapVertically(t,e,i,n){return!(t>=n||i>=e)}function boxesOverlapHorizontally(t,e,i,n){return!(t>=n||i>=e)}function getOuterHeight(t){return t.clientHeight?new Number(t.getStyle("height").replace(/[^\d\.]/g,""))+getBufferHeight(t,!0):0}function getOuterWidth(t){return t.clientWidth?new Number(t.getStyle("width").replace(/[^\d\.]/g,""))+getBufferWidth(t,!0):0}function getBufferHeight(t,e){if(!t.visible())return 0;var i=0,n=/[^\d\.]/g;if(e){var s=t.getStyle("marginTop"),o=t.getStyle("marginBottom");s=null==s?"0px":s,o=null==o?"0px":o,s=s.replace(n,""),o=o.replace(n,""),i=new Number(s).ceil()+new Number(o).ceil()}return i+=new Number(t.getStyle("borderBottomWidth").replace(n,"")).ceil()+new Number(t.getStyle("borderTopWidth").replace(n,"")).ceil()+new Number(t.getStyle("paddingTop").replace(n,"")).ceil()+new Number(t.getStyle("paddingBottom").replace(n,"")).ceil()}function getBufferWidth(t,e){if(!t.visible())return 0;var i=0,n=/[^\d\.]/g;if(e){var s=t.getStyle("marginLeft"),o=t.getStyle("marginRight");s=null==s?"0px":s,o=null==o?"0px":o,s=s.replace(n,""),o=o.replace(n,""),i=new Number(s).ceil()+new Number(o).ceil()}return i+=new Number(t.getStyle("borderLeftWidth").replace(n,"")).ceil()+new Number(t.getStyle("borderRightWidth").replace(n,"")).ceil()+new Number(t.getStyle("paddingLeft").replace(n,"")).ceil()+new Number(t.getStyle("paddingRight").replace(n,"")).ceil()}function getDimensionInPx(t,e){var i={left:"width",right:"width",width:"width",top:"height",bottom:"height",height:"height"},n=t.getStyle(e);if(n.include("%")){var s=t.parentNode,o=s.getStyle(i[e]);if(!o.include("px"))throw"cannot convert to px , because parent dimension not measured in px";return parseInt(n)*parseInt(o)/100}if(n.include("px"))return parseInt(n);throw"cannot convert to px, because unit is neither px or %"}function getActualDimension(t,e){var i={width:"clientWidth",height:"clientHeight"};return t[i[e]]}function purgeChildElements(t){try{var e=t&&t.children;if(!e)return;for(var i=0,n=e.length;n>i;i++)purge(e[i]),purgeChildElements(e[i]),e[i]=null,e[i]=t.removeChild(e[i]);return 0==t.children.length}catch(s){}}function purge(t){var e,i,n,s=t.attributes;if(s)for(i=s.length,e=0;i>e;e+=1)n=s[e].name,"function"==typeof t[n]&&(t[n]=null);if(s=t.childNodes)for(i=s.length,e=0;i>e;e+=1)purge(t.childNodes[e])}function getCaret(t){if(!t)return 0;if(t.selectionStart)return t.selectionStart;if(document.selection){t.focus();var e=document.selection.createRange();if(null==e)return 0;var i=t.createTextRange(),n=i.duplicate();return i.moveToBookmark(e.getBookmark()),n.setEndPoint("EndToStart",i),n.text.length}return 0}function isAlmostInView(t,e){var i=parseInt(getBoxOffsets(t)[1]),n=$(t).cumulativeScrollOffset()[1],s=getWindowHeight();return n+s+e>i}function getTouchedElement(t){var e=t.changedTouches;return e&&e.length>0?$(document.elementFromPoint(e[0].clientX,e[0].clientY)):t.element()}function centerLayer(t){t.style.left=parseInt((getWindowWidth()-parseInt(t.clientWidth))/2+getScrollLeft())+"px",t.style.top=parseInt((getWindowHeight()-parseInt(t.clientHeight))/2+getScrollTop())+"px"}function centerElement(t,e){if(t){if(t.jquery&&(t=$(t.get(0))),e.horz){if(!t.hasClassName("centered_horz"))throw"Element's className "+t.className+" must include 'centered_horz' for function centerLayer to work with these arguments";var i=t.getWidth()||t.getStyle("min-width");if(i){var n=parseInt(i),s=n+getBufferWidth(t,!0),o=t.up().getWidth();o>s&&(t.style.marginLeft=-(n/2)+"px",t.style.left="50%")}}if(e.vert){if(!t.hasClassName("centered_vert"))throw"Element's className "+t.className+" must include 'centered_vert' for function centerLayer to work with these arguments";var r=t.getHeight()||t.getStyle("min-height");if(r){var a=parseInt(r),l=a+getBufferHeight(t,!0),u=t.up().getHeight();u>l&&(t.style.marginTop=-(a/2)+"px",t.style.top="50%")}}}}function parseFunc(t,e){var i=t.className,n=i.indexOf(e);if(n>-1){var s=i.substring(n).split(" ");if(s.length>0){var o=s[0].replace(e,"");return"function"==typeof window[o]?window[o]:null}}return null}function cascadeElement(t,e){var i=parseInt(t.getStyle("width")),n=i+getBufferWidth(t,!0),s=t.up().getWidth(),o=-(e.horzOffset*e.number/2)+e.position*e.horzOffset;s>n&&(t.style.left=(s-n)/2+o+"px");var r=parseInt(t.getStyle("height")),a=r+getBufferHeight(t,!0),l=t.up().getHeight(),u=-(e.vertOffset*e.number/2)+e.position*e.vertOffset;l>a&&(t.style.top=(l-a)/2+u+"px")}function fitObjectIntoScreen(t,e,i,n,s){var o=e?parseInt(e):parseInt(t.offsetLeft),r=i?parseInt(i):parseInt(t.offsetTop),a=n?parseInt(n):parseInt(t.clientWidth),l=s?parseInt(s):parseInt(t.clientHeight),u=getScrollLeft(),c=getScrollTop(),h=getWindowWidth(),d=getWindowHeight();a+=20,l+=20,r+l>c+d&&(r=c+d-l),c>r&&(r=c),o+a>u+h&&(o=u+h-a),u>o&&(o=u),t.style.left=o+"px",t.style.top=r+"px"}function setWidthStyleByReflection(t,e){t=e?$(t).select(e)[0]:t,t&&(t.style.width=(t.clientWidth||t.offsetWidth)+"px")}function focusOn(t){$(t).focus()}function selectAndFocusOn(t){var e=$(t);e.select(),e.focus()}function renderHazeLayer(t,e){var i=document.body;return renderOverlay(t,e,i.scrollWidth,i.scrollHeight,"haze")}function renderOverlay(t,e,i,n,s){var o=document.createElement("DIV");return o.className=s,o.style.position="absolute",o.style.left=t,o.style.top=e,o.style.width=i,o.style.height=n,document.body.appendChild(o),o}function removeOverlay(t){t&&t.parentNode&&t.parentNode.removeChild(t),t&&(t=null)}function reParent(t,e){t&&(t.parentNode&&t.parentNode==e||e.appendChild(t))}function getScrollLeftForAbsoluteParent(t){return isIE()?t.scrollLeft:0}function getScrollTopForAbsoluteParent(t){return isIE()?t.scrollTop:0}function renderTransparentIFrame(t,e,i,n){var s=5,o=document.createElement("IFRAME");return o.frameBorder=0,o.style.filter="alpha(opacity=0)",o.style.position="absolute",o.style.left=t-s,o.style.top=e-s,o.style.width=i-2*s,o.style.height=n-2*s,document.body.appendChild(o),o}function pushOverlayObject(t,e,i){var n=getAbsoluteOffsets($(t));pushOverlayObjectAtOffsets(n,e,i)}function pushTotalOverlayObject(t,e){var i=new Array(0,0,document.body.scrollWidth,document.body.scrollHeight);pushOverlayObjectAtOffsets(i,t,e)}function pushOverlayObjectAtOffsets(t,e,i){if(isIE()){var n=renderTransparentIFrame(t[0],t[1],t[2]-t[0],t[3]-t[1]);overlayObjectStack.push(n)}var s=renderOverlay(t[0],t[1],t[2]-t[0],t[3]-t[1],e);i&&(s.style.zIndex=i),overlayObjectStack.push(s)}function popOverlayObject(){if(overlayObjectStack.length>0){var t=overlayObjectStack.pop();removeOverlay(t),isIE()&&overlayObjectStack.length>0&&removeOverlay(overlayObjectStack.pop())}}function popAllOverlayObjects(){for(;overlayObjectStack.length>0;){var t=overlayObjectStack.pop();
  removeOverlay(t)}}function disableSelection(t){t&&("undefined"!=typeof t.style.KhtmlUserSelect?t.onselectstart=function(t){return t.stopPropagation(),!1}:"undefined"!=typeof t.onselectstart?t.onselectstart=function(t){return t=t?t:window.event,t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,!1}:"undefined"!=typeof t.style.MozUserSelect&&(t.style.MozUserSelect="-moz-none"),t.style.cursor="default")}function disableSelectionWithoutCursorStyle(t){t&&("undefined"!=typeof t.style.KhtmlUserSelect?t.onselectstart=function(t){return t.stopPropagation(),!1}:"undefined"!=typeof t.onselectstart?t.onselectstart=function(t){return t=t?t:window.event,t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,!1}:"undefined"!=typeof t.style.MozUserSelect&&(t.style.MozUserSelect="-moz-none"))}function enableSelection(t){t&&("undefined"!=typeof t.style.KhtmlUserSelect?t.onselectstart=function(t){return t.stopPropagation(),!0}:"undefined"!=typeof t.onselectstart?t.onselectstart=function(t){return t=t?t:window.event,t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,!0}:"undefined"!=typeof t.style.MozUserSelect&&(t.style.MozUserSelect="text"),t.style.cursor="default")}function setCursor(t){document.body.style.cursor=t}function cursorDefault(){setCursor("default")}function cursorPointer(){setCursor("pointer")}function cursorWait(){setCursor("wait")}function getCellAtColumn(t,e){for(columnCount=0,i=0;i<t.length;i++)if(columnCount+=t.colspan,columnCount>=e)return t[i];return null}function getCellAtRow(t,e,n){for(rowCount=0,i=0;i<t.length;i++){var s=t[i].cells[e];rowCount+=s.rowspan,rowCount>=n}return null}function copyTable(t,e,i,n){var s=n?t:$(t).select("tbody")[0],o=n?e:$(e).select("tbody.copyTo")[0];i&&clearTable(e);try{o.insert(s.innerHTML)}catch(r){}}function copyTableJquery(t,e,i,n){var s=n?t:t.find("tbody:first"),o=n?e:jQuery("tobody.copyTo:first",e);i&&clearTable(e);try{jQuery(o).append(s.html())}catch(r){}}function clearTable(t){if(document.all)for(;t.rows[0];)t.deleteRow(0);else t.innerHTML=""}function getWindowWidth(){var t=jQuery(window).width();return isIE9()&&(t+=17),t}function getWindowHeight(){var t=jQuery(window).height();return isIE9()&&(t+=17),t}function getScrollLeft(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft}function getScrollTop(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop}function scrollXToMiddle(t){var e=t.scrollWidth-getWindowWidth();e>0&&(t.scrollLeft=e/2)}function launchNewWindow(t){window.open(t)}function getIFrameDocument(t){var e=t.contentWindow||t.contentDocument;return e.document&&(e=e.document),e}function getEvent(t){return t?t:window.event}function popEvent(t){cancelEventBubbling(t?t:event)}function triggerNativeEvent(t,e){var i,n=isIE();e=e||(n?document.documentElement:window),document.createEvent?(i=document.createEvent("Event"),i.initEvent(t,!0,!0),e.dispatchEvent(i)):e.fireEvent("on"+t,document.createEventObject())}function relatedTargetInElementSubtree(t,e){return t.relatedTarget?e===t.relatedTarget?!0:t.relatedTarget.descendantOf(e):!1}function cancelEventBubbling(t){t=getEvent(t),t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}function cancelEventAndPreventDefault(t){t.preventDefault(),t.stop()}function enterKeyHit(t){var e=whichKeyHit(t);return 13==e||3==e}function whichKeyHit(t){t=getEvent(t);var e=t.charCode?t.charCode:t.which?t.which:t.keyCode;return e}function isCtrlHeld(t){return t=getEvent(t),!(!t||!t.ctrlKey)}function isShiftHeld(t){return t=getEvent(t),!(!t||!t.shiftKey)}function getEventTarget(t){return t=getEvent(t),t&&(t.target||t.srcElement)}function isNavigationInput(t){t=getEvent(t);var e=t.keyCode?t.keyCode:t.which;return e==Keys.DOM_VK_LEFT||e==Keys.DOM_VK_RIGHT||e==Keys.DOM_VK_TAB||e==Keys.DOM_VK_BACK_SPACE||e==Keys.DOM_VK_ENTER}function verifyIsDigitInput(t){t=getEvent(t);var e=t.keyCode?t.keyCode:t.which;return e>=Keys.DOM_VK_0&&e<=Keys.DOM_VK_9||isNavigationInput(t)}function verifyIsInputNumericGroupSeparator(t){t=getEvent(t);var e=t.keyCode?t.keyCode:t.which,i=String.fromCharCode(e);return i===groupingSeparator}function verifyIsInputNumericDecimalSeparator(t){t=getEvent(t);var e=t.keyCode?t.keyCode:t.which,i=String.fromCharCode(e);return i===decimalSeparator}function numberOfDecimals(t){for(var e=t.length,i=0,n=0;e>n;n++)t.charAt(n)===decimalSeparator&&i++;return i}function macOSKeyboardRightClick(t){var t=getEvent(t);return t.ctrlKey?0==t.button||1==t.button||2==t.button:!1}function macOSMouseRightClick(t){var t=getEvent(t),e=!1;return t=t||window.event,t.which?e=3==t.which:t.button&&(e=2==t.button),e}function isRightClick(t){if(isMacOS()){var e=macOSKeyboardRightClick(t),i=macOSMouseRightClick(t);return e||i}return Event.isRightClick(t)}function isLeftClick(t){return Event.isLeftClick(t)}function isMetaHeld(t,e){var t=getEvent(t);return getEvent(t)?isMacOS()?e?t.altKey:t.metaKey:isCtrlHeld(t):!1}function trim(t){return t.strip()}function startsWith(t,e){return t.startsWith(e)}function getTextAfterUnderscore(t){return getTextAfterSubstring(t,"_")}function getTextBeforeUnderscore(t){return getTextBeforeSubstring(t,"_")}function extractNumber(t){var e=t.match(/\d/g);return e=e.join("")}function getTextAfterSubstring(t,e){var i=t.toLowerCase().indexOf(e.toLowerCase());return-1==i?null:t.substring(i+e.length)}function getTextBeforeSubstring(t,e){var i=t.toLowerCase().indexOf(e.toLowerCase());return-1==i?t:t.substring(0,i)}function removeTrailingSlash(t){var e=t.substring(t.length-1);return"/"==e?t.substring(0,t.length-1):t}function removeTrailingPound(t){var e=t.substring(t.length-1);return"#"==e?t.substring(0,t.length-1):t}function removeChars(t,e){var i=0;for(i;i<e.length;i++)for(;t.indexOf(e[i])>-1;)t=t.replace(e[i],"");return t}function replaceAll(t,e,i){t.gsub(e,i)}function jsHash(){var t=new Array;t.clazz="Hash";for(var e=0;e<arguments.length;e+=2)"undefined"!=typeof arguments[e+1]&&(t[arguments[e]]=arguments[e+1],t.push(arguments[e]));return t}function textCounter(t,e){return t.value.length>e?(t.value=t.value.substring(0,e),!1):!0}function saveAndClear(t,e){t=e,e=""}function escapeString(t,e,i){if(!t||!e||void 0===i||null===i)return t;var n="string"==typeof i||Object.isArray(i)&&i.length<e.length,s=Object.isArray(i)?i.first():i;return Object.isArray(e)?(e.each(function(e,o){var r=n?s:i[o];t=t.replace(e,r)}),t):t.replace(e,s)}function formatString(t){var e,i,n,s=Array.prototype.slice.call(arguments,1),o=[];if(s.length<3){for(var r=0;r<s.length;r++)t=t.replace("{"+r+"}",s[r]);return t}if(e=(t||"").match(/[{]\d+[}]/g),!e)return t;i=t.split(/[{]\d+[}]/);for(var a=0;a<i.length;a+=1)n=a<e.length?s[e[a].slice(1,-1)]:"",o.push(i[a],n);return o.join("")}function removeWhitespacesFromTable(t){return t.replace(/>\s+<\/table/g,"></table").replace(/>\s+<thead/g,"><thead").replace(/>\s+<\/thead/g,"></thead").replace(/>\s+<tbody/g,"><tbody").replace(/>\s+<\/tbody/g,"></tbody").replace(/>\s+<caption/g,"><caption").replace(/>\s+<\/caption/g,"></caption").replace(/>\s+<tr/g,"><tr").replace(/>\s+<\/tr/g,"></tr").replace(/>\s+<th/g,"><th").replace(/>\s+<\/th/g,"></th").replace(/>\s+<td/g,"><td").replace(/>\s+<\/td/g,"></td")}function splitText(t,e){var i={left:"",right:t};return e=parseInt(e,10),_.isNaN(e)?i:0===e?i:(i.left=t.substr(0,e),i.right=t.substr(e),i)}function redirectToUrl(t){if(isIE8()){var e=document.createElement("a");e.href=t,document.body.appendChild(e),e.click()}else window.location.href=t}function checkURLProtocol(t,e){if(!e)return t;if(startsWith(t,"/"))return t;for(var i=new Array("http://","https://","file://","mailto://","ftp://"),n=0;n<i.length;n++)if(startsWith(t,i[n]))return t;return i[0]+t}function getSymbolToAppendNextParam(t){var e=t.substring(t.length-1);return"?"==e||"&"==e?"":t.indexOf("?")>-1?"&":"?"}function showBusyCursor(){theBody.style.cursor="wait"}function restoreDefaultCursor(){theBody.style.cursor=""}function encodeText(t){return encodeURIComponent(encodeURIComponent(t))}function decodeText(t){return decodeURIComponent(t)}function constrain(t,e,i){return t>i?i:e>t?e:t}function deepClone(t){if(null==t)return null;if("object"!=typeof t)return t;var e=Object.isArray(t)?[]:{};for(var i in t)"object"==typeof t[i]?e[i]=deepClone(t[i]):e[i]=t[i];return e}function cloneCustomAttributes(t,e){var i=t?t.attributes:{};for(var n in i){var s=i[n]&&i[n].name;s&&s.startsWith("data")&&$(e).writeAttribute(s,$(t).readAttribute(s))}}function initLog(){log=""}function logIt(t){log=log+"||"+t+"-"+(new Date).getTime()}function debug(t){window.console&&window.console.debug(t)}function startTimer(t){window.console&&window.console.time?console.time(t):timer[t]=+new Date}function stopTimer(t){if(window.console&&window.console.timeEnd)console.timeEnd(t);else if(timer[t]){var e=t+": "+(+new Date-timer[t]);timer[t]=void 0,window.console?console.log(e):window.status=e}}function toBlockNotation(t){return t?t.split(".").map(function(t){return"['"+t+"']"}).join(""):""}function toFunction(theFunction){if("string"!=typeof theFunction)return theFunction;var blockReference=toBlockNotation(theFunction);return eval("window"+blockReference)}function BusyMonitor(t,e){this.waitTime=t,this.theFunction=e,this.timer=null}function InPlaceEditor(t){this.elem=$(t),this.id=t.identify(),this.editing=!1,this.value=getInnerText(t)}function evaluateScripts(t){var e;e=t?$(t):document;var i=e.getElementsByTagName("SCRIPT");if(null!=i)for(var n=0;n<i.length;n++){var s=i[n];s&&s.text&&globalEval(s.text)}}function evaluateScript(t){var e=$(t);e&&e.text&&globalEval(e.text)}function globalEval(t){window.eval.call(window,t)}function loadJSFiles(t){t&&Object.isArray(t)&&t.each(function(t){loadJSFile(t)})}function loadJSFile(t){$(t)&&$(t).parentNode.removeChild($(t));var e=new Element("script");e.setAttribute("id",t),e.setAttribute("type","text/javascript"),e.setAttribute("src",t),$$("head")[0].appendChild(e)}function unloadAllScripts(){var t=document.getElementsByTagName("SCRIPT");if(null!=t)for(var e=0;e<t.length;e++){var i=t[e];i.parentNode.removeChild(i)}}function loadCSSFiles(t,e){t&&Object.isArray(t)&&t.each(function(t){loadCSSFile(t,e)})}function loadCSSFile(t,e){unloadCSSFile(t);var i=new Element("link");i.setAttribute("id",escape(t)),i.setAttribute("rel","stylesheet"),i.setAttribute("type","text/css"),i.setAttribute("href",t),e&&document.body?document.body.appendChild(i):$$("head")[0].insert(i,"bottom")}function unloadCSSFiles(t){t&&Object.isArray(t)&&t.each(function(t){unloadCSSFile(t)})}function unloadCSSFile(t){if($(escape(t)))try{$(escape(t)).parentNode.removeChild($(escape(t)))}catch(e){alert(e)}}function createCSSRule(t){var e=document.createElement("style");e.type="text/css",e.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(e)}function getFirstMatch(t){return $$(t)[0]}function dialogOnMouseDown(t){var e=null!=t?t:window.event;cancelEventDragTarget&&cancelEventDragTarget==getEventTarget(e)||new Dragger(e,[getAbsoluteParent(window.event?e.srcElement:e.target)],!0,!0,2,new DragListener)}function cancelEventDrag(t){cancelEventDragTarget=getEventTarget(t)}function encodeUriParameter(t){return encodeURIComponent(encodeURIComponent(t))}function replaceHTML(t,e){if(isIE())return void(t.innerHTML=e);var t=$(t),i=t.nextSibling,n=t.parentNode;n.removeChild(t),t.innerHTML=e,i?n.insertBefore(t,i):n.appendChild(t)}function gotoDefaultLocation(t){window.location.href="flow.html?_flowId=searchFlow"+(t?"&"+t:"")}function gotoFolderExplorer(t){window.location.href="flow.html?_flowId=searchFlow",document.location="flow.html?_flowId=searchFlow&showFolder="+t}function switchDesign(t){var e=document.location.href,i=e.include("&decorator");"old"===t?i?e=e.replace("main","mainOld"):e+="&decorator=mainOld&confirm=true":i?e=e.replace("mainOld","main"):e+="&decorator=main&confirm=true",redirectToUrl(e)}function showDiv(t){var e=document.getElementById(t),i=(document.body.clientWidth,document.body.clientHeight,e.style.zIndex);e.style.zIndex=-100,e.style.display="block",centerLayer(e),e.style.zIndex=i}function hideDiv(t){var e=document.getElementById(t);return e.style.display="none",!0}function borderImage(t,e){(document.all||document.getElementById)&&(t.style.borderColor=e)}function resetRadio(t){var e=!1;if(t.length)for(var i=0;i<t.length;++i)t[i].checked&&(t[i].checked=!1,e=!0);else t.checked&&(t.checked=!1,e=!0);return e}function launchAboutDlg(){var t=document.getElementById("about");t.style.display="block",centerLayer(t)}function hideAboutDlg(){var t=document.getElementById("about");t.style.display="none"}function unescapeBackslash(t){return t?t.replace(/\\\\/g,"\\"):t}function ajaxIframeDownload(t,e){var i=$("ajax-download-iframe");e&&(i.onload=e.onload),i.src=t}function parseAsDate(t){var e=t.match(/(\d+)/g);return new Date(e[0],e[1]-1,e[2])}function parseAsDateTime(t){var e=t.match(/(\d+)/g);return new Date(e[0],e[1]-1,e[2],e[3],e[4],e[5])}function padNumber(t){var e=String(t);return 1===e.length&&(e="0"+e),e}function toTimestampString(t){return t.getUTCFullYear()+"-"+padNumber(t.getMonth()+1)+"-"+padNumber(t.getDate())+" "+padNumber(t.getHours())+":"+padNumber(t.getMinutes())+":"+padNumber(t.getSeconds())}function isProVersion(){return __jrsConfigs__.isProVersion}function AjaxRequester(t,e,i,n){this.url=t||document.location.toString(),this.params=e,this.xmlhttp=getXMLHTTP();var s=this.processResponse(this);this.xmlhttp.onreadystatechange=s,this.postData=i,this.async=!n,this.requestTime=+new Date}function handleResponse(t){checkForErrors(t)||t.responseHandler(t),ajaxRequestEnded(t),JRS&&JRS.vars&&(JRS.vars.ajax_in_progress=!1),document.getElementById("mainTableContainerOverlay")&&(document.getElementById("mainTableContainerOverlay").className="hidden")}function targettedResponseHandler(t){var e=t.xmlhttp,i=t.params[0],n=t.params[1],s=t.params[2],o=(t.params[3],$(i));if(n)o.innerHTML="",updateUsingResponseSubset(e,n,o);else{var r=e.responseText.trim();if(0===r.indexOf("<div")){var a=r.substring(0,r.indexOf(">")+1),l=r.substring(r.indexOf(">")+1,r.lastIndexOf("</")),u=r.substring(r.lastIndexOf("</")),c=jQuery(a+u);c.text(xssUtil.escape(l)),jQuery(o).html(c)}else jQuery(o).html(r)}invokeCallbacks(s,o)}function cumulativeResponseHandler(t){var e=t.xmlhttp,i=t.params[0],n=t.params[1],s=t.params[2],o=$(i);n?updateUsingResponseSubset(e,n,o):o.insert(e.responseText,{position:"after"}),invokeCallbacks(s)}function rowCopyResponseHandler(t){var e=t.xmlhttp,i=t.params[0],n=t.params[2],s=$(i);if("TABLE"!==s.tagName)return void alert("Ajax Exception: rowCopyResponseHandler will not work for container "+s.tagName);var o=Builder.node("DIV");o.innerHTML=e.responseText,copyTable(o.getElementsByTagName("table")[0],s,!1,!1),invokeCallbacks(n)}function updateUsingResponseSubset(t,e,i){function n(){if(!(c>=u)){var t=jQuery(l.get(c));t.attr("src")?(c++,s(t.attr("data-custname"),t.attr("src"),n)):(c++,o(t.html(),n))}}function s(t,e,i){var n=i||!1,s=document.createElement("script");window.jr_scripts||(window.jr_scripts={}),window.jr_scripts[t]||"jr_jq_min"===t?n&&i():(s.setAttribute("type","text/javascript"),s.readyState?s.onreadystatechange=function(){("loaded"===s.readyState||"complete"===s.readyState)&&(s.onreadystatechange=null,n&&i())}:s.onload=function(){n&&i()},s.src=e,document.getElementsByTagName("head")[0].appendChild(s),window.jr_scripts[t]=e)}function o(t,e){var i=e||!1;if(t){var n=t.match(/^.*((\r\n|\n|\r)|$)/gm);window.eval(n.join("\n")),i&&e()}}var r=jQuery(t.responseText),a=r.filter("#"+e);if("TABLE"==i.tagName&&"TABLE"==$(e).tagName?copyTableJquery(a,i,!0):jQuery(i).append(a.html()),"undefined"!=typeof jQuery){var l=r.filter("script.jasperreports"),u=l.size(),c=0;n()}}function invokeCallbacks(callback,customArg){callback&&("string"==typeof callback?eval(callback):callback(customArg))}function ajaxClobberredUpdate(t,e){e.responseHandler=clobberingResponseHandler,ajaxUpdate(t,e)}function ajaxTargettedUpdate(url,options){var responseHandler;responseHandler=options.mode==AjaxRequester.prototype.CUMULATIVE_UPDATE?cumulativeResponseHandler:options.mode==AjaxRequester.prototype.ROW_COPY_UPDATE?rowCopyResponseHandler:options.mode==AjaxRequester.prototype.EVAL_JSON?evalJSONResponseHandler:targettedResponseHandler,options.responseHandler=function(requester,params){options.preFillAction?"string"==typeof options.preFillAction?eval(options.preFillAction):options.preFillAction(responseHandler(requester,params)):responseHandler(requester,options.params)},ajaxUpdate(url,options)}function ajaxNonReturningUpdate(t,e){e.responseHandler=null,ajaxUpdate(t,e)}function ajaxClobberedFormSubmit(t,e,i){var n=getPostData(t,extraPostData);i.postData=appendPostData(n,extraPostData),i.responseHandler=clobberingResponseHandler,ajaxUpdate(e,i)}function ajaxTargettedFormSubmit(t,e,i){var n=getPostData(t,i.extraPostData);i.postData=appendPostData(n,i.extraPostData),i.responseHandler=targettedResponseHandler,ajaxUpdate(e,i)}function ajaxErrorHandler(){showMessageDialog(ajaxError,ajaxErrorHeader)}function doNothing(){}function ajaxUpdate(t,e){var i=!0,n=new AjaxRequester(t,[e.fillLocation,e.fromLocation,e.callback,e.isAutomaticRefresh],e.postData,e.synchronous);isIPad()&&"adhoc"==JRS.vars.current_flow&&(JRS.vars.ajax_in_progress||(JRS.vars.ajax_in_progress=!0)),i&&(n.busyCursor=!e.silent,n.showLoading=!e.silent&&!e.hideLoader,n.responseHandler=e.responseHandler||doNothing,n.responseHandler!=doNothing&&ajaxRequestStarted(n),e.errorHandler&&(n.errorHandler=e.errorHandler),n.xmlhttp&&(e.postData?n.doPost():n.doGet()))}function checkForErrors(t){var e=t.errorHandler;return e(t.xmlhttp)}function getPostData(t,e){"string"==typeof t&&(t=document.forms[t]);for(var i="",n=0;n<t.elements.length;++n){var s=t.elements[n];!s.name||e&&e[s.name]||(i=appendFormInput(i,s))}return i}function appendPostData(t,e){for(var i in e)t=appendFormValue(t,i,e[i]);return t}function appendFormInput(t,e){if(e.name){var i,n=!1;switch(e.type){case"checkbox":case"radio":n=e.checked,i=e.value;break;case"hidden":case"password":case"text":case"Textarea":n=!0,i=e.value;break;case"select-one":case"select-multiple":i=[];for(var s=0;s<e.options.length;++s){var o=e.options[s];o.selected&&(n=!0,i.push(o.value))}}if(n)if(i.shift)for(;i.length>0;)t=appendFormValue(t,e.name,i.shift());else t=appendFormValue(t,e.name,i)}return t}function appendFormValue(t,e,i){return t.length>0&&(t+="&"),t+=e+"="+encodeURIComponent(i)}function baseErrorHandler(t){if(500==t.status)return showErrorPopup(t.responseText),!0;var e=t.getResponseHeader("LoginRequested");if(e){var i=".";return document.location=i,!0}var n=t.getResponseHeader("JasperServerError");if(n){var s=t.getResponseHeader("SuppressError");if(!s){var o=jQuery(".dashboardViewFrame");if(1==o.length){document.body.innerHTML=t.responseText;var r=jQuery("#"+JRS.fid,window.parent.document);r.removeClass("hidden").show()}else showErrorPopup(t.responseText)}return!0}return!1}function showErrorPopup(t,e){(t&&t.indexOf("sessionAttributeMissingException"))>-1?dialogs.clusterErrorPopup.show(t):dialogs.errorPopup.show(t,!1,e)}function hideErrorPopup(){popOverlayObject();var t=document.getElementById(ERROR_POPUP_DIV);t.style.display="none"}function ajaxRequestStarted(t){++ajax.ajaxRequestCount,t.busyCursor&&(document.body.style.cursor="wait"),!isIPad()&&t.showLoading&&t.startResponseTimer()}function ajaxRequestEnded(t){t.cancelResponseTimer(),ajax.ajaxRequestCount<=1?(document.body.style.cursor="auto",ajax.ajaxRequestCount=0,dialogs.popup.hide($(ajax.LOADING_ID))):ajax.ajaxRequestCount--}function isValidJsonResponse(t){var e=t.getResponseHeader("Content-Type");return 200==t.status&&null!=e&&e.indexOf("application/json")>=0}function getXMLHTTP(){var t,e;if(!e&&!t)try{e=new XMLHttpRequest}catch(i){alert("You need a browser which supports an XMLHttpRequest Object.\nMozilla build 0.9.5 has this Object and IE5 and above, others may do, I don't know, any info jim@jibbering.com")}return e}function moveTo(t,e,i,n){new Effect.Move($(t),{sync:!1,x:e,y:i,mode:"absolute",duration:n?n:.2})}function move(t,e,i,n){new Effect.Move($(t),{sync:!1,x:e,y:i,mode:"relative",duration:n?n:.2})}function moveMany(t,e,i,n){for(var s=[],o=0;o<t.length;++o)s[o]=new Effect.Move(t[o],{sync:!0,x:e,y:i,mode:"relative"});new Effect.Parallel(s,{duration:n?n:1})}function fade(t,e,i){$(t).fade({duration:e?e:1,from:1,to:i?i:0})}function fadeMany(t,e,i){for(var n=[],s=0;s<t.length;++s)n[s]=new Effect.Fade(t[s],{sync:!0,from:1,to:i?i:0});new Effect.Parallel(n,{duration:e?e:1})}function appear(t,e,i){$(t).appear({duration:e?e:1,from:0,to:i?i:1})}function appearMany(t,e,i){for(var n=[],s=0;s<t.length;++s)n[s]=new Effect.Appear(t[s],{sync:!0,from:0,to:i?i:1});new Effect.Parallel(n,{duration:e?e:1})}function pulsate(t,e,i){var n=$(t).identify();Effect.Pulsate(n,{pulses:e?e:5,duration:i?i:2})}function renderImageOverMousePointer(t,e){var t=$(t);return t.show(),t.style.left=e.clientX,t.style.top=e.clientY,t}function JSTooltip(t,e){if(t){if(this.srcElement=t,e&&(this.label=e.label,this.text=e.text,this.offsets=e.offsets,this.showBelow=!!e.showBelow,this.templateId=e.templateId,this.loadTextCallback=e.loadTextCallback,this.loadTextExecuted=!1),this.disabled=!1,this.removed=!1,this.templateId)this._toAttribute(this.TOOLTIP_TEMPLATE,this.templateId);else{var i=this._fromAttribute(this.TOOLTIP_TEMPLATE);this.templateId=i&&i.length>0?i:this.TOOLTIP_TEMPLATE_ID}this.label?this._toAttribute(this.TOOLTIP_LABEL,this.label):this.label=this._fromAttribute(this.TOOLTIP_LABEL),this.text?this._toAttribute(this.TOOLTIP_TEXT,this.text):this.text=this._fromAttribute(this.TOOLTIP_TEXT),this.label&&(this.label=this._escapeText(this.label)),this.text&&(this.text=this._escapeText(this.text)),this.srcElement.jsTooltip=this,tooltipModule.tooltips.push(this)}}function replaceNbsps(t){var e=new RegExp("&nbsp;","g");return t.replace(e," ")}function fireMenuAction(t,e){var i=getAsFunction(t);i&&i()}function fireMenuActionWithEvent(t,e,i){var n,s=toFunction(e);s=s||(n=toFunction("localContext."+e)),s&&(t=_.isArray(t)?t:[t],s.apply(n?localContext:null,t))}function getMenuMouseupFunction(t,e,i,n,s){if(!t)return null;if(e){var o=resolveReservedStringsInArray(e,i,n,s);return function(){fireMenuActionWithEvent(o,t,s)}}return function(){fireMenuAction(t,s)}}function evaluateTest(t,e,i,n,s,o){var r=null!=o?o:!0,a=getAsFunction(t);return a&&(r=a.apply(this,resolveReservedStringsInArray(e,i,n,null)),s&&(r=!r)),r}function resolveReservedStringsInArray(t,e,i,n){return t?t.collect(function(t){return resolveReservedStrings(t,e,i,n)}):[]}function resolveReservedStrings(t,e,i,n){return t==actionModel.RES_SELECTED?actionModel.selObjects:t==actionModel.RES_LABEL?e:t==actionModel.RES_ID?i:t==actionModel.EVENT?n:t}function getRandomId(){var t=Math.round(50*Math.random(10));return"_"+t}define("domReady",[],function(){"use strict";function t(t){var e;for(e=0;e<t.length;e+=1)t[e](u)}function e(){var e=c;l&&e.length&&(c=[],t(e))}function i(){l||(l=!0,r&&clearInterval(r),e())}function n(t){return l?t(u):c.push(t),n}var s,o,r,a="undefined"!=typeof window&&window.document,l=!a,u=a?document:null,c=[];if(a){if(document.addEventListener)document.addEventListener("DOMContentLoaded",i,!1),window.addEventListener("load",i,!1);else if(window.attachEvent){window.attachEvent("onload",i),o=document.createElement("div");try{s=null===window.frameElement}catch(h){}o.doScroll&&s&&window.external&&(r=setInterval(function(){try{o.doScroll(),i()}catch(t){}},30))}"complete"===document.readyState&&i()}return n.version="2.0.1",n.load=function(t,e,i,s){s.isBuild?i(null):n(i)},n}),define("commons.bare.main",["require","prototype","!domReady"],function(t){"use strict";t("prototype"),t("!domReady")}),function(){function t(t,e,i){for(var n=(i||0)-1,s=t?t.length:0;++n<s;)if(t[n]===e)return n;return-1}function e(t,e){for(var i=t.criteria,n=e.criteria,s=-1,o=i.length;++s<o;){var r=i[s],a=n[s];if(r!==a){if(r>a||"undefined"==typeof r)return 1;if(a>r||"undefined"==typeof a)return-1}}return t.index-e.index}function i(t){return"\\"+Ae[t]}function n(){return de.pop()||[]}function s(t){t.length=0,de.length<ge&&de.push(t)}function o(t,e,i){e||(e=0),"undefined"==typeof i&&(i=t?t.length:0);for(var n=-1,s=i-e||0,o=Array(0>s?0:s);++n<s;)o[n]=t[e+n];return o}function r(t){return t instanceof r?t:new a(t)}function a(t,e){this.__chain__=!!e,this.__wrapped__=t}function l(t){function e(){if(n){var t=o(n);qe.apply(t,arguments)}if(this instanceof e){var r=c(i.prototype),a=i.apply(r,t||arguments);return $(a)?a:r}return i.apply(s,t||arguments)}var i=t[0],n=t[2],s=t[4];return e}function u(t,e,i,r,a){if(i){var l=i(t);if("undefined"!=typeof l)return l}var c=$(t);if(!c)return t;var h=$e.call(t);if(!ke[h])return t;var d=ni[h];switch(h){case xe:case Se:return new d(+t);case Me:case De:return new d(t);case Ce:return l=d(t.source,ve.exec(t)),l.lastIndex=t.lastIndex,l}var p=oi(t);if(e){var f=!r;r||(r=n()),a||(a=n());for(var m=r.length;m--;)if(r[m]==t)return a[m];l=p?d(t.length):{}}else l=p?o(t):I({},t);return p&&(Ke.call(t,"index")&&(l.index=t.index),Ke.call(t,"input")&&(l.input=t.input)),e?(r.push(t),a.push(l),(p?st:pi)(t,function(t,n){l[n]=u(t,e,i,r,a)}),f&&(s(r),s(a)),l):l}function c(t,e){return $(t)?Xe(t):{}}function h(t,e,i){if("function"!=typeof t)return Qt;if("undefined"==typeof e||!("prototype"in t))return t;switch(i){case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,s){return t.call(e,i,n,s)};case 4:return function(i,n,s,o){return t.call(e,i,n,s,o)}}return jt(t,e)}function d(t){function e(){var t=u?a:this;if(s){var g=o(s);qe.apply(g,arguments)}if((r||p)&&(g||(g=o(arguments)),r&&qe.apply(g,r),p&&g.length<l))return n|=16,d([i,f?n:-4&n,g,null,a,l]);if(g||(g=arguments),h&&(i=t[m]),this instanceof e){t=c(i.prototype);var v=i.apply(t,g);return $(v)?v:t}return i.apply(t,g)}var i=t[0],n=t[1],s=t[2],r=t[3],a=t[4],l=t[5],u=1&n,h=2&n,p=4&n,f=8&n,m=i;return e}function p(t,e){for(var i=-1,n=T(),s=t?t.length:0,o=[];++i<s;){var r=t[i];n(e,r)<0&&o.push(r)}return o}function f(t,e,i,n){for(var s=(n||0)-1,o=t?t.length:0,r=[];++s<o;){var a=t[s];if(a&&"object"==typeof a&&"number"==typeof a.length&&(oi(a)||M(a))){e||(a=f(a,e,i));var l=-1,u=a.length,c=r.length;for(r.length+=u;++l<u;)r[c++]=a[l]}else i||r.push(a)}return r}function m(t,e,i,n){if(t===e)return 0!==t||1/t==1/e;var s=typeof t,o=typeof e;if(!(t!==t||t&&Oe[s]||e&&Oe[o]))return!1;if(null==t||null==e)return t===e;var a=$e.call(t),l=$e.call(e);if(a!=l)return!1;switch(a){case xe:case Se:return+t==+e;case Me:return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case Ce:case De:return t==String(e)}var u=a==Te;if(!u){var c=t instanceof r,h=e instanceof r;if(c||h)return m(c?t.__wrapped__:t,h?e.__wrapped__:e,i,n);if(a!=Ie)return!1;var d=t.constructor,p=e.constructor;if(d!=p&&!(H(d)&&d instanceof d&&H(p)&&p instanceof p)&&"constructor"in t&&"constructor"in e)return!1}i||(i=[]),n||(n=[]);for(var f=i.length;f--;)if(i[f]==t)return n[f]==e;var g=!0,v=0;if(i.push(t),n.push(e),u){if(v=e.length,g=v==t.length)for(;v--&&(g=m(t[v],e[v],i,n)););}else di(e,function(e,s,o){return Ke.call(o,s)?(v++,!(g=Ke.call(t,s)&&m(t[s],e,i,n))&&fe):void 0}),g&&di(t,function(t,e,i){return Ke.call(i,e)?!(g=--v>-1)&&fe:void 0});return i.pop(),n.pop(),g}function g(t,e,i,n,s){(oi(e)?st:pi)(e,function(e,o){var r,a,l=e,u=t[o];if(e&&((a=oi(e))||fi(e))){for(var c=n.length;c--;)if(r=n[c]==e){u=s[c];break}if(!r){var h;i&&(l=i(u,e),(h="undefined"!=typeof l)&&(u=l)),h||(u=a?oi(u)?u:[]:fi(u)?u:{}),n.push(e),s.push(u),h||g(u,e,i,n,s)}}else i&&(l=i(u,e),"undefined"==typeof l&&(l=e)),"undefined"!=typeof l&&(u=l);t[o]=u})}function v(t,e){return t+We(ii()*(e-t+1))}function _(t,e,i){for(var n=-1,s=T(),o=t?t.length:0,r=[],a=i?[]:r;++n<o;){var l=t[n],u=i?i(l,n,t):l;(e?!n||a[a.length-1]!==u:s(a,u)<0)&&(i&&a.push(u),r.push(l))}return r}function b(t){return function(e,i,n){var s={};i=Xt(i,n,3);var o=-1,r=e?e.length:0;if("number"==typeof r)for(;++o<r;){var a=e[o];t(s,a,i(a,o,e),e)}else pi(e,function(e,n,o){t(s,e,i(e,n,o),o)});return s}}function y(t,e,i,n,s,o){var r=2&e,a=16&e,u=32&e;if(!r&&!H(t))throw new TypeError;a&&!i.length&&(e&=-17,a=i=!1),u&&!n.length&&(e&=-33,u=n=!1);var c=1==e||17===e?l:d;return c([t,e,i,n,s,o])}function w(t){return li[t]}function T(){var e=(e=r.indexOf)===St?t:e;return e}function x(t){return"function"==typeof t&&Be.test(t)}function S(t){var e,i;return t&&$e.call(t)==Ie&&(e=t.constructor,!H(e)||e instanceof e)?(di(t,function(t,e){i=e}),"undefined"==typeof i||Ke.call(t,i)):fe}function E(t){return ui[t]}function M(t){return t&&"object"==typeof t&&"number"==typeof t.length&&$e.call(t)==we||!1}function I(t){if(!t)return t;for(var e=1,i=arguments.length;i>e;e++){var n=arguments[e];if(n)for(var s in n)t[s]=n[s]}return t}function C(t,e,i,n){return"boolean"!=typeof e&&null!=e&&(n=i,i=e,e=!1),u(t,e,"function"==typeof i&&h(i,n,1))}function D(t,e,i){return u(t,!0,"function"==typeof e&&h(e,i,1))}function k(t){if(!t)return t;for(var e=1,i=arguments.length;i>e;e++){var n=arguments[e];if(n)for(var s in n)"undefined"==typeof t[s]&&(t[s]=n[s])}return t}function O(t){var e=[];return di(t,function(t,i){H(t)&&e.push(i)}),e.sort()}function A(t,e){return t?Ke.call(t,e):!1}function N(t){for(var e=-1,i=ai(t),n=i.length,s={};++e<n;){var o=i[e];s[t[o]]=o}return s}function L(t){return t===!0||t===!1||t&&"object"==typeof t&&$e.call(t)==xe||!1}function P(t){return t&&"object"==typeof t&&$e.call(t)==Se||!1}function R(t){return t&&1===t.nodeType||!1}function F(t){if(!t)return!0;if(oi(t)||K(t))return!t.length;for(var e in t)if(Ke.call(t,e))return!1;return!0}function j(t,e){return m(t,e)}function z(t){return Qe(t)&&!Je(parseFloat(t))}function H(t){return"function"==typeof t}function $(t){return!(!t||!Oe[typeof t])}function B(t){return W(t)&&t!=+t}function U(t){return null===t}function W(t){return"number"==typeof t||t&&"object"==typeof t&&$e.call(t)==Me||!1}function V(t){return t&&Oe[typeof t]&&$e.call(t)==Ce||!1}function K(t){return"string"==typeof t||t&&"object"==typeof t&&$e.call(t)==De||!1}function q(t){return"undefined"==typeof t}function Y(t){var e=arguments,i=2;if(!$(t))return t;if("number"!=typeof e[2]&&(i=e.length),i>3&&"function"==typeof e[i-2])var r=h(e[--i-1],e[i--],2);else i>2&&"function"==typeof e[i-1]&&(r=e[--i]);for(var a=o(arguments,1,i),l=-1,u=n(),c=n();++l<i;)g(t,a[l],r,u,c);return s(u),s(c),t}function X(t){var e=[];di(t,function(t,i){e.push(i)}),e=p(e,f(arguments,!0,!1,1));for(var i=-1,n=e.length,s={};++i<n;){var o=e[i];s[o]=t[o]}return s}function G(t){for(var e=-1,i=ai(t),n=i.length,s=Array(n);++e<n;){var o=i[e];s[e]=[o,t[o]]}return s}function Q(t){for(var e=-1,i=f(arguments,!0,!1,1),n=i.length,s={};++e<n;){var o=i[e];o in t&&(s[o]=t[o])}return s}function J(t){for(var e=-1,i=ai(t),n=i.length,s=Array(n);++e<n;)s[e]=t[i[e]];return s}function Z(t,e){var i=T(),n=t?t.length:0,s=!1;return n&&"number"==typeof n?s=i(t,e)>-1:pi(t,function(t){return(s=t===e)&&fe}),s}function tt(t,e,i){var n=!0;e=Xt(e,i,3);var s=-1,o=t?t.length:0;if("number"==typeof o)for(;++s<o&&(n=!!e(t[s],s,t)););else pi(t,function(t,i,s){return!(n=!!e(t,i,s))&&fe});return n}function et(t,e,i){var n=[];e=Xt(e,i,3);var s=-1,o=t?t.length:0;if("number"==typeof o)for(;++s<o;){var r=t[s];e(r,s,t)&&n.push(r)}else pi(t,function(t,i,s){e(t,i,s)&&n.push(t)});return n}function it(t,e,i){e=Xt(e,i,3);var n=-1,s=t?t.length:0;if("number"!=typeof s){var o;return pi(t,function(t,i,n){return e(t,i,n)?(o=t,fe):void 0}),o}for(;++n<s;){var r=t[n];if(e(r,n,t))return r}}function nt(t,e){return bt(t,e,!0)}function st(t,e,i){var n=-1,s=t?t.length:0;if(e=e&&"undefined"==typeof i?e:h(e,i,3),"number"==typeof s)for(;++n<s&&e(t[n],n,t)!==fe;);else pi(t,e)}function ot(t,e){var i=t?t.length:0;if("number"==typeof i)for(;i--&&e(t[i],i,t)!==!1;);else{var n=ai(t);i=n.length,pi(t,function(t,s,o){return s=n?n[--i]:--i,e(o[s],s,o)===!1&&fe})}}function rt(t,e){var i=o(arguments,2),n=-1,s="function"==typeof e,r=t?t.length:0,a=Array("number"==typeof r?r:0);return st(t,function(t){a[++n]=(s?e:t[e]).apply(t,i)}),a}function at(t,e,i){
  var n=-1,s=t?t.length:0;if(e=Xt(e,i,3),"number"==typeof s)for(var o=Array(s);++n<s;)o[n]=e(t[n],n,t);else o=[],pi(t,function(t,i,s){o[++n]=e(t,i,s)});return o}function lt(t,e,i){var n=-(1/0),s=n;"function"!=typeof e&&i&&i[e]===t&&(e=null);var o=-1,r=t?t.length:0;if(null==e&&"number"==typeof r)for(;++o<r;){var a=t[o];a>s&&(s=a)}else e=Xt(e,i,3),st(t,function(t,i,o){var r=e(t,i,o);r>n&&(n=r,s=t)});return s}function ut(t,e,i){var n=1/0,s=n;"function"!=typeof e&&i&&i[e]===t&&(e=null);var o=-1,r=t?t.length:0;if(null==e&&"number"==typeof r)for(;++o<r;){var a=t[o];s>a&&(s=a)}else e=Xt(e,i,3),st(t,function(t,i,o){var r=e(t,i,o);n>r&&(n=r,s=t)});return s}function ct(t,e,i,n){if(!t)return i;var s=arguments.length<3;e=Xt(e,n,4);var o=-1,r=t.length;if("number"==typeof r)for(s&&(i=t[++o]);++o<r;)i=e(i,t[o],o,t);else pi(t,function(t,n,o){i=s?(s=!1,t):e(i,t,n,o)});return i}function ht(t,e,i,n){var s=arguments.length<3;return e=Xt(e,n,4),ot(t,function(t,n,o){i=s?(s=!1,t):e(i,t,n,o)}),i}function dt(t,e,i){return e=Xt(e,i,3),et(t,function(t,i,n){return!e(t,i,n)})}function pt(t,e,i){if(t&&"number"!=typeof t.length&&(t=J(t)),null==e||i)return t?t[v(0,t.length-1)]:he;var n=ft(t);return n.length=ei(ti(0,e),n.length),n}function ft(t){var e=-1,i=t?t.length:0,n=Array("number"==typeof i?i:0);return st(t,function(t){var i=v(0,++e);n[e]=n[i],n[i]=t}),n}function mt(t){var e=t?t.length:0;return"number"==typeof e?e:ai(t).length}function gt(t,e,i){var n;e=Xt(e,i,3);var s=-1,o=t?t.length:0;if("number"==typeof o)for(;++s<o&&!(n=e(t[s],s,t)););else pi(t,function(t,i,s){return(n=e(t,i,s))&&fe});return!!n}function vt(t,i,n){var s=-1,o=t?t.length:0,r=Array("number"==typeof o?o:0);for(i=Xt(i,n,3),st(t,function(t,e,n){r[++s]={criteria:[i(t,e,n)],index:s,value:t}}),o=r.length,r.sort(e);o--;)r[o]=r[o].value;return r}function _t(t){return oi(t)?o(t):t&&"number"==typeof t.length?at(t):J(t)}function bt(t,e,i){return i&&F(e)?he:(i?it:et)(t,e)}function yt(t){for(var e=-1,i=t?t.length:0,n=[];++e<i;){var s=t[e];s&&n.push(s)}return n}function wt(t){return p(t,f(arguments,!0,!0,1))}function Tt(t,e,i){var n=0,s=t?t.length:0;if("number"!=typeof e&&null!=e){var r=-1;for(e=Xt(e,i,3);++r<s&&e(t[r],r,t);)n++}else if(n=e,null==n||i)return t?t[0]:he;return o(t,0,ei(ti(0,n),s))}function xt(t,e){return f(t,e)}function St(e,i,n){if("number"==typeof n){var s=e?e.length:0;n=0>n?ti(0,s+n):n||0}else if(n){var o=Ot(e,i);return e[o]===i?o:-1}return t(e,i,n)}function Et(t,e,i){var n=0,s=t?t.length:0;if("number"!=typeof e&&null!=e){var r=s;for(e=Xt(e,i,3);r--&&e(t[r],r,t);)n++}else n=null==e||i?1:e||n;return o(t,0,ei(ti(0,s-n),s))}function Mt(){for(var t=[],e=-1,i=arguments.length;++e<i;){var n=arguments[e];(oi(n)||M(n))&&t.push(n)}var s=t[0],o=-1,r=T(),a=s?s.length:0,l=[];t:for(;++o<a;)if(n=s[o],r(l,n)<0){for(var e=i;--e;)if(r(t[e],n)<0)continue t;l.push(n)}return l}function It(t,e,i){var n=0,s=t?t.length:0;if("number"!=typeof e&&null!=e){var r=s;for(e=Xt(e,i,3);r--&&e(t[r],r,t);)n++}else if(n=e,null==n||i)return t?t[s-1]:he;return o(t,ti(0,s-n))}function Ct(t,e,i){var n=t?t.length:0;for("number"==typeof i&&(n=(0>i?ti(0,n+i):ei(i,n-1))+1);n--;)if(t[n]===e)return n;return-1}function Dt(t,e,i){t=+t||0,i=+i||1,null==e&&(e=t,t=0);for(var n=-1,s=ti(0,Ue((e-t)/i)),o=Array(s);++n<s;)o[n]=t,t+=i;return o}function kt(t,e,i){if("number"!=typeof e&&null!=e){var n=0,s=-1,r=t?t.length:0;for(e=Xt(e,i,3);++s<r&&e(t[s],s,t);)n++}else n=null==e||i?1:ti(0,e);return o(t,n)}function Ot(t,e,i,n){var s=0,o=t?t.length:s;for(i=i?Xt(i,n,1):Qt,e=i(e);o>s;){var r=s+o>>>1;i(t[r])<e?s=r+1:o=r}return s}function At(){return _(f(arguments,!0,!0))}function Nt(t,e,i,n){return"boolean"!=typeof e&&null!=e&&(n=i,i="function"!=typeof e&&n&&n[e]===t?null:e,e=!1),null!=i&&(i=Xt(i,n,3)),_(t,e,i)}function Lt(t){return p(t,o(arguments,1))}function Pt(){for(var t=-1,e=lt(_i(arguments,"length")),i=Array(0>e?0:e);++t<e;)i[t]=_i(arguments,t);return i}function Rt(t,e){var i=-1,n=t?t.length:0,s={};for(e||!n||oi(t[0])||(e=[]);++i<n;){var o=t[i];e?s[o]=e[i]:o&&(s[o[0]]=o[1])}return s}function Ft(t,e){if(!H(e))throw new TypeError;return function(){return--t<1?e.apply(this,arguments):void 0}}function jt(t,e){return arguments.length>2?y(t,17,o(arguments,2),null,e):y(t,1,null,null,e)}function zt(t){for(var e=arguments.length>1?f(arguments,!0,!1,1):O(t),i=-1,n=e.length;++i<n;){var s=e[i];t[s]=y(t[s],1,null,null,t)}return t}function Ht(){for(var t=arguments,e=t.length;e--;)if(!H(t[e]))throw new TypeError;return function(){for(var e=arguments,i=t.length;i--;)e=[t[i].apply(this,e)];return e[0]}}function $t(t,e,i){var n,s,o,r,a,l,u,c=0,h=!1,d=!0;if(!H(t))throw new TypeError;if(e=ti(0,e)||0,i===!0){var p=!0;d=!1}else $(i)&&(p=i.leading,h="maxWait"in i&&(ti(e,i.maxWait)||0),d="trailing"in i?i.trailing:d);var f=function(){var i=e-(bi()-r);if(0>=i){s&&clearTimeout(s);var h=u;s=l=u=he,h&&(c=bi(),o=t.apply(a,n),l||s||(n=a=null))}else l=setTimeout(f,i)},m=function(){l&&clearTimeout(l),s=l=u=he,(d||h!==e)&&(c=bi(),o=t.apply(a,n),l||s||(n=a=null))};return function(){if(n=arguments,r=bi(),a=this,u=d&&(l||!p),h===!1)var i=p&&!l;else{s||p||(c=r);var g=h-(r-c),v=0>=g;v?(s&&(s=clearTimeout(s)),c=r,o=t.apply(a,n)):s||(s=setTimeout(m,g))}return v&&l?l=clearTimeout(l):l||e===h||(l=setTimeout(f,e)),i&&(v=!0,o=t.apply(a,n)),!v||l||s||(n=a=null),o}}function Bt(t){if(!H(t))throw new TypeError;var e=o(arguments,1);return setTimeout(function(){t.apply(he,e)},1)}function Ut(t,e){if(!H(t))throw new TypeError;var i=o(arguments,2);return setTimeout(function(){t.apply(he,i)},e)}function Wt(t,e){var i={};return function(){var n=e?e.apply(this,arguments):me+arguments[0];return Ke.call(i,n)?i[n]:i[n]=t.apply(this,arguments)}}function Vt(t){var e,i;if(!H(t))throw new TypeError;return function(){return e?i:(e=!0,i=t.apply(this,arguments),t=null,i)}}function Kt(t){return y(t,16,o(arguments,1))}function qt(t,e,i){var n=!0,s=!0;if(!H(t))throw new TypeError;return i===!1?n=!1:$(i)&&(n="leading"in i?i.leading:n,s="trailing"in i?i.trailing:s),i={},i.leading=n,i.maxWait=e,i.trailing=s,$t(t,e,i)}function Yt(t,e){return y(e,16,[t])}function Xt(t,e,i){var n=typeof t;if(null==t||"function"==n)return h(t,e,i);if("object"!=n)return te(t);var s=ai(t);return function(e){for(var i=s.length,n=!1;i--&&(n=e[s[i]]===t[s[i]]););return n}}function Gt(t){return null==t?"":String(t).replace(hi,w)}function Qt(t){return t}function Jt(t){st(O(t),function(e){var i=r[e]=t[e];r.prototype[e]=function(){var t=[this.__wrapped__];qe.apply(t,arguments);var e=i.apply(r,t);return this.__chain__?new a(e,!0):e}})}function Zt(){return Ne._=He,this}function te(t){return function(e){return e[t]}}function ee(t,e){return null==t&&null==e&&(e=1),t=+t||0,null==e?(e=t,t=0):e=+e||0,t+We(ii()*(e-t+1))}function ie(t,e){if(t){var i=t[e];return H(i)?t[e]():i}}function ne(t,e,n){var s=r,o=s.templateSettings;t=String(t||""),n=k({},n,o);var a=0,l="__p += '",u=n.variable,c=RegExp((n.escape||be).source+"|"+(n.interpolate||be).source+"|"+(n.evaluate||be).source+"|$","g");t.replace(c,function(e,n,s,o,r){return l+=t.slice(a,r).replace(ye,i),n&&(l+="' +\n_.escape("+n+") +\n'"),o&&(l+="';\n"+o+";\n__p += '"),s&&(l+="' +\n((__t = ("+s+")) == null ? '' : __t) +\n'"),a=r+e.length,e}),l+="';\n",u||(u="obj",l="with ("+u+" || {}) {\n"+l+"\n}\n"),l="function("+u+") {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n"+l+"return __p\n}";try{var h=Function("_","return "+l)(s)}catch(d){throw d.source=l,d}return e?h(e):(h.source=l,h)}function se(t,e,i){t=(t=+t)>-1?t:0;var n=-1,s=Array(t);for(e=h(e,i,1);++n<t;)s[n]=e(n);return s}function oe(t){return null==t?"":String(t).replace(ci,E)}function re(t){var e=++pe+"";return t?t+e:e}function ae(t){return t=new a(t),t.__chain__=!0,t}function le(t,e){return e(t),t}function ue(){return this.__chain__=!0,this}function ce(){return this.__wrapped__}var he,de=[],pe=0,fe={},me=+new Date+"",ge=40,ve=/\w*$/,_e=/<%=([\s\S]+?)%>/g,be=/($^)/,ye=/['\n\r\t\u2028\u2029\\]/g,we="[object Arguments]",Te="[object Array]",xe="[object Boolean]",Se="[object Date]",Ee="[object Function]",Me="[object Number]",Ie="[object Object]",Ce="[object RegExp]",De="[object String]",ke={};ke[Ee]=!1,ke[we]=ke[Te]=ke[xe]=ke[Se]=ke[Me]=ke[Ie]=ke[Ce]=ke[De]=!0;var Oe={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},Ae={"\\":"\\","'":"'","\n":"n","\r":"r","	":"t","\u2028":"u2028","\u2029":"u2029"},Ne=Oe[typeof window]&&window||this,Le=Oe[typeof exports]&&exports&&!exports.nodeType&&exports,Pe=Oe[typeof module]&&module&&!module.nodeType&&module,Re=Pe&&Pe.exports===Le&&Le,Fe=Oe[typeof global]&&global;!Fe||Fe.global!==Fe&&Fe.window!==Fe||(Ne=Fe);var je=[],ze=Object.prototype,He=Ne._,$e=ze.toString,Be=RegExp("^"+String($e).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Ue=Math.ceil,We=Math.floor,Ve=x(Ve=Object.getPrototypeOf)&&Ve,Ke=ze.hasOwnProperty,qe=je.push,Ye=ze.propertyIsEnumerable,Xe=x(Xe=Object.create)&&Xe,Ge=x(Ge=Array.isArray)&&Ge,Qe=Ne.isFinite,Je=Ne.isNaN,Ze=x(Ze=Object.keys)&&Ze,ti=Math.max,ei=Math.min,ii=Math.random,ni={};ni[Te]=Array,ni[xe]=Boolean,ni[Se]=Date,ni[Ee]=Function,ni[Ie]=Object,ni[Me]=Number,ni[Ce]=RegExp,ni[De]=String,a.prototype=r.prototype;var si={};!function(){var t={0:1,length:1};si.spliceObjects=(je.splice.call(t,0,1),!t[0])}(1),r.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:_e,variable:""},Xe||(c=function(){function t(){}return function(e){if($(e)){t.prototype=e;var i=new t;t.prototype=null}return i||Ne.Object()}}()),M(arguments)||(M=function(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Ke.call(t,"callee")&&!Ye.call(t,"callee")||!1});var oi=Ge||function(t){return t&&"object"==typeof t&&"number"==typeof t.length&&$e.call(t)==Te||!1},ri=function(t){var e,i=t,n=[];if(!i)return n;if(!Oe[typeof t])return n;for(e in i)Ke.call(i,e)&&n.push(e);return n},ai=Ze?function(t){return $(t)?Ze(t):[]}:ri,li={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},ui=N(li),ci=RegExp("("+ai(ui).join("|")+")","g"),hi=RegExp("["+ai(li).join("")+"]","g"),di=function(t,e){var i,n=t,s=n;if(!n)return s;if(!Oe[typeof n])return s;for(i in n)if(e(n[i],i,t)===fe)return s;return s},pi=function(t,e){var i,n=t,s=n;if(!n)return s;if(!Oe[typeof n])return s;for(i in n)if(Ke.call(n,i)&&e(n[i],i,t)===fe)return s;return s};H(/x/)&&(H=function(t){return"function"==typeof t&&$e.call(t)==Ee});var fi=Ve?function(t){if(!t||$e.call(t)!=Ie)return!1;var e=t.valueOf,i=x(e)&&(i=Ve(e))&&Ve(i);return i?t==i||Ve(t)==i:S(t)}:S,mi=b(function(t,e,i){Ke.call(t,i)?t[i]++:t[i]=1}),gi=b(function(t,e,i){(Ke.call(t,i)?t[i]:t[i]=[]).push(e)}),vi=b(function(t,e,i){t[i]=e}),_i=at,bi=x(bi=Date.now)&&bi||function(){return(new Date).getTime()};r.after=Ft,r.bind=jt,r.bindAll=zt,r.chain=ae,r.compact=yt,r.compose=Ht,r.countBy=mi,r.debounce=$t,r.defaults=k,r.defer=Bt,r.delay=Ut,r.difference=wt,r.filter=et,r.flatten=xt,r.forEach=st,r.functions=O,r.groupBy=gi,r.indexBy=vi,r.initial=Et,r.intersection=Mt,r.invert=N,r.invoke=rt,r.keys=ai,r.map=at,r.max=lt,r.memoize=Wt,r.merge=Y,r.min=ut,r.omit=X,r.once=Vt,r.pairs=G,r.partial=Kt,r.pick=Q,r.pluck=_i,r.range=Dt,r.reject=dt,r.rest=kt,r.shuffle=ft,r.sortBy=vt,r.tap=le,r.throttle=qt,r.times=se,r.toArray=_t,r.union=At,r.uniq=Nt,r.values=J,r.where=bt,r.without=Lt,r.wrap=Yt,r.zip=Pt,r.collect=at,r.drop=kt,r.each=st,r.extend=I,r.methods=O,r.object=Rt,r.select=et,r.tail=kt,r.unique=Nt,r.clone=C,r.cloneDeep=D,r.contains=Z,r.escape=Gt,r.every=tt,r.find=it,r.has=A,r.identity=Qt,r.indexOf=St,r.isArguments=M,r.isArray=oi,r.isBoolean=L,r.isDate=P,r.isElement=R,r.isEmpty=F,r.isEqual=j,r.isFinite=z,r.isFunction=H,r.isNaN=B,r.isNull=U,r.isNumber=W,r.isObject=$,r.isRegExp=V,r.isString=K,r.isUndefined=q,r.lastIndexOf=Ct,r.mixin=Jt,r.noConflict=Zt,r.random=ee,r.reduce=ct,r.reduceRight=ht,r.result=ie,r.size=mt,r.some=gt,r.sortedIndex=Ot,r.template=ne,r.unescape=oe,r.uniqueId=re,r.all=tt,r.any=gt,r.detect=it,r.findWhere=nt,r.foldl=ct,r.foldr=ht,r.include=Z,r.inject=ct,r.first=Tt,r.last=It,r.sample=pt,r.take=Tt,r.head=Tt,Jt(r),r.VERSION="2.4.1",r.prototype.chain=ue,r.prototype.value=ce,st(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=je[t];r.prototype[t]=function(){var t=this.__wrapped__;return e.apply(t,arguments),si.spliceObjects||0!==t.length||delete t[0],this}}),st(["concat","join","slice"],function(t){var e=je[t];r.prototype[t]=function(){var t=this.__wrapped__,i=e.apply(t,arguments);return this.__chain__&&(i=new a(i),i.__chain__=!0),i}}),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Ne._=r,define("lodash.custom",[],function(){return r})):Le&&Pe?Re?(Pe.exports=r)._=r:Le._=r:Ne._=r}.call(this),define("common/util/xssUtil",["require"],function(t){var e="a,abbr,acronym,address,area,article,aside,b,bdi,bdo,big,blockquote,body,br,caption,center,center,cite,code,col,colgroup,dd,details,dfn,div,dl,dt,em,fieldset,font,footer,form,h1,h2,h3,h4,h5,h6,head,header,hr,html,i,iframe,img,input,label,legend,li,main,map,mark,menu,menuitem,meta,nav,ol,option,p,pre,section,select,small,span,strike,strong,sub,summary,sup,table,tbody,td,textarea,th,thead,title,tr,u,ul,!--",i={"(":"&#40;",")":"&#41;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},n=function(t){return null==t?"":t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},s=function(t){var e=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.push(n(i));return e},o=function(){var t,e={"&#111;":"o","&#110;":"n","&amp;":"&"};for(t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[i[t]]=t);return e}(),r="(?:"+s(i).join("|")+")",a=RegExp(r),l=RegExp(r,"g"),u="(?:\\)|\\()",c=RegExp(u),h=RegExp(u,"g"),d="\\b='(.*?)'",p=RegExp(d),f=RegExp(d,"g"),m='\\b="(.*?)"',g=RegExp(m),v=RegExp(m,"g"),_="<(?!/|"+e.replace(/,/g,"|")+")",b=RegExp(_,"i"),y=RegExp(_,"ig"),w="</(?!"+e.replace(/,/g,"|")+")",T=RegExp(w,"i"),x=RegExp(w,"ig"),S="\\bjavascript:",E=RegExp(S,"i"),M=RegExp(S,"ig"),I="\\bon(\\w+?)=",C=RegExp(I,"i"),D=RegExp(I,"ig"),k=function(t,e){if(t=null==t?"":t,e=e||{},!("string"==typeof t||t instanceof String))return t;if(e.softHTMLEscape){if(t=c.test(t)?t.replace(h,function(t){return i[t]}):t,t=p.test(t)?t.replace(f,"=`$1`").replace(/'/g,"&#39;").replace(/\b=`(.*?)`/g,"='$1'"):t.replace(/'/g,"&#39;"),t=g.test(t)?t.replace(v,"=`$1`").replace(/"/g,"&quot;").replace(/\b=`(.*?)`/g,'="$1"'):t.replace(/"/g,"&quot;"),e.whiteList&&e.whiteList instanceof Array&&e.whiteList.length>0){var n="<(?!/|"+e.whiteList.join("|")+")",s=RegExp(n,"i"),o=RegExp(n,"ig");t=s.test(t)?t.replace(o,"&lt;"):t;var r="</(?!"+e.whiteList.join("|")+")",u=RegExp(r,"i"),d=RegExp(r,"ig");t=u.test(t)?t.replace(d,"&lt;/"):t}else t=b.test(t)?t.replace(y,"&lt;"):t,t=T.test(t)?t.replace(x,"&lt;/"):t;t=E.test(t)?t.replace(M,""):t,t=C.test(t)?t.replace(D,"&#111;&#110;$1="):t}else t=a.test(t)?t.replace(l,function(t){return i[t]}):t;return t},O="(?:"+s(o).join("|")+")",A=RegExp(O,"i"),N=RegExp(O,"ig"),L=function(t){return t=null==t?"":t,("string"==typeof t||t instanceof String)&&A.test(t)?t.replace(N,function(t){return o[t]}):t};return xssUtil={escape:k,unescape:L,noConflict:function(){}},xssUtil}),!function(t,e){"use strict";var i=e.prototype.trim,n=e.prototype.trimRight,s=e.prototype.trimLeft,o=function(t){return 1*t||0},r=function(t,e){if(1>e)return"";for(var i="";e>0;)1&e&&(i+=t),e>>=1,t+=t;return i},a=[].slice,l=function(t){return null==t?"\\s":t.source?t.source:"["+p.escapeRegExp(t)+"]"},u={lt:"<",gt:">",quot:'"',apos:"'",amp:"&"},c={};for(var h in u)c[u[h]]=h;var d=function(){function t(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}var i=r,n=function(){return n.cache.hasOwnProperty(arguments[0])||(n.cache[arguments[0]]=n.parse(arguments[0])),n.format.call(null,n.cache[arguments[0]],arguments)};return n.format=function(n,s){var o,r,a,l,u,c,h,p=1,f=n.length,m="",g=[];for(r=0;f>r;r++)if(m=t(n[r]),"string"===m)g.push(n[r]);else if("array"===m){if(l=n[r],l[2])for(o=s[p],a=0;a<l[2].length;a++){if(!o.hasOwnProperty(l[2][a]))throw new Error(d('[_.sprintf] property "%s" does not exist',l[2][a]));o=o[l[2][a]]}else o=l[1]?s[l[1]]:s[p++];if(/[^s]/.test(l[8])&&"number"!=t(o))throw new Error(d("[_.sprintf] expecting number but found %s",t(o)));switch(l[8]){case"b":o=o.toString(2);break;case"c":o=e.fromCharCode(o);break;case"d":o=parseInt(o,10);break;case"e":o=l[7]?o.toExponential(l[7]):o.toExponential();break;case"f":o=l[7]?parseFloat(o).toFixed(l[7]):parseFloat(o);break;case"o":o=o.toString(8);break;case"s":o=(o=e(o))&&l[7]?o.substring(0,l[7]):o;break;case"u":o=Math.abs(o);break;case"x":o=o.toString(16);break;case"X":o=o.toString(16).toUpperCase()}o=/[def]/.test(l[8])&&l[3]&&o>=0?"+"+o:o,c=l[4]?"0"==l[4]?"0":l[4].charAt(1):" ",h=l[6]-e(o).length,u=l[6]?i(c,h):"",g.push(l[5]?o+u:u+o)}return g.join("")},n.cache={},n.parse=function(t){for(var e=t,i=[],n=[],s=0;e;){if(null!==(i=/^[^\x25]+/.exec(e)))n.push(i[0]);else if(null!==(i=/^\x25{2}/.exec(e)))n.push("%");else{if(null===(i=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(e)))throw new Error("[_.sprintf] huh?");if(i[2]){s|=1;var o=[],r=i[2],a=[];if(null===(a=/^([a-z_][a-z_\d]*)/i.exec(r)))throw new Error("[_.sprintf] huh?");for(o.push(a[1]);""!==(r=r.substring(a[0].length));)if(null!==(a=/^\.([a-z_][a-z_\d]*)/i.exec(r)))o.push(a[1]);else{if(null===(a=/^\[(\d+)\]/.exec(r)))throw new Error("[_.sprintf] huh?");o.push(a[1])}i[2]=o}else s|=2;if(3===s)throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");n.push(i)}e=e.substring(i[0].length)}return n},n}(),p={VERSION:"2.3.0",isBlank:function(t){return null==t&&(t=""),/^\s*$/.test(t)},stripTags:function(t){return null==t?"":e(t).replace(/<\/?[^>]+>/g,"")},capitalize:function(t){return t=null==t?"":e(t),t.charAt(0).toUpperCase()+t.slice(1)},chop:function(t,i){return null==t?[]:(t=e(t),i=~~i,i>0?t.match(new RegExp(".{1,"+i+"}","g")):[t])},clean:function(t){return p.strip(t).replace(/\s+/g," ")},count:function(t,i){return null==t||null==i?0:e(t).split(i).length-1},chars:function(t){return null==t?[]:e(t).split("")},swapCase:function(t){return null==t?"":e(t).replace(/\S/g,function(t){return t===t.toUpperCase()?t.toLowerCase():t.toUpperCase()})},escapeHTML:function(t){return null==t?"":e(t).replace(/[&<>"']/g,function(t){return"&"+c[t]+";"})},unescapeHTML:function(t){return null==t?"":e(t).replace(/\&([^;]+);/g,function(t,i){var n;return i in u?u[i]:(n=i.match(/^#x([\da-fA-F]+)$/))?e.fromCharCode(parseInt(n[1],16)):(n=i.match(/^#(\d+)$/))?e.fromCharCode(~~n[1]):t})},escapeRegExp:function(t){return null==t?"":e(t).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},splice:function(t,e,i,n){var s=p.chars(t);return s.splice(~~e,~~i,n),s.join("")},insert:function(t,e,i){return p.splice(t,e,0,i)},include:function(t,i){return""===i?!0:null==t?!1:-1!==e(t).indexOf(i)},join:function(){var t=a.call(arguments),e=t.shift();return null==e&&(e=""),t.join(e)},lines:function(t){return null==t?[]:e(t).split("\n")},reverse:function(t){return p.chars(t).reverse().join("")},startsWith:function(t,i){return""===i?!0:null==t||null==i?!1:(t=e(t),i=e(i),t.length>=i.length&&t.slice(0,i.length)===i)},endsWith:function(t,i){return""===i?!0:null==t||null==i?!1:(t=e(t),i=e(i),t.length>=i.length&&t.slice(t.length-i.length)===i)},succ:function(t){return null==t?"":(t=e(t),t.slice(0,-1)+e.fromCharCode(t.charCodeAt(t.length-1)+1))},titleize:function(t){return null==t?"":e(t).replace(/(?:^|\s)\S/g,function(t){return t.toUpperCase()})},camelize:function(t){return p.trim(t).replace(/[-_\s]+(.)?/g,function(t,e){return e.toUpperCase()})},underscored:function(t){return p.trim(t).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()},dasherize:function(t){return p.trim(t).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()},classify:function(t){return p.titleize(e(t).replace(/_/g," ")).replace(/\s/g,"")},humanize:function(t){return p.capitalize(p.underscored(t).replace(/_id$/,"").replace(/_/g," "))},trim:function(t,n){return null==t?"":!n&&i?i.call(t):(n=l(n),e(t).replace(new RegExp("^"+n+"+|"+n+"+$","g"),""))},ltrim:function(t,i){return null==t?"":!i&&s?s.call(t):(i=l(i),e(t).replace(new RegExp("^"+i+"+"),""))},rtrim:function(t,i){return null==t?"":!i&&n?n.call(t):(i=l(i),e(t).replace(new RegExp(i+"+$"),""))},truncate:function(t,i,n){return null==t?"":(t=e(t),n=n||"...",i=~~i,t.length>i?t.slice(0,i)+n:t)},prune:function(t,i,n){if(null==t)return"";if(t=e(t),i=~~i,n=null!=n?e(n):"...",t.length<=i)return t;var s=function(t){return t.toUpperCase()!==t.toLowerCase()?"A":" "},o=t.slice(0,i+1).replace(/.(?=\W*\w*$)/g,s);return o=o.slice(o.length-2).match(/\w\w/)?o.replace(/\s*\S+$/,""):p.rtrim(o.slice(0,o.length-1)),(o+n).length>t.length?t:t.slice(0,o.length)+n},words:function(t,e){return p.isBlank(t)?[]:p.trim(t,e).split(e||/\s+/)},pad:function(t,i,n,s){t=null==t?"":e(t),i=~~i;var o=0;switch(n?n.length>1&&(n=n.charAt(0)):n=" ",s){case"right":return o=i-t.length,t+r(n,o);case"both":return o=i-t.length,r(n,Math.ceil(o/2))+t+r(n,Math.floor(o/2));default:return o=i-t.length,r(n,o)+t}},lpad:function(t,e,i){return p.pad(t,e,i)},rpad:function(t,e,i){return p.pad(t,e,i,"right")},lrpad:function(t,e,i){return p.pad(t,e,i,"both")},sprintf:d,vsprintf:function(t,e){return e.unshift(t),d.apply(null,e)},toNumber:function(t,i){if(null==t||""==t)return 0;t=e(t);var n=o(o(t).toFixed(~~i));return 0!==n||t.match(/^0+$/)?n:Number.NaN},numberFormat:function(t,e,i,n){if(isNaN(t)||null==t)return"";t=t.toFixed(~~e),n=n||",";var s=t.split("."),o=s[0],r=s[1]?(i||".")+s[1]:"";return o.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+n)+r},strRight:function(t,i){if(null==t)return"";t=e(t),i=null!=i?e(i):i;var n=i?t.indexOf(i):-1;return~n?t.slice(n+i.length,t.length):t},strRightBack:function(t,i){if(null==t)return"";t=e(t),i=null!=i?e(i):i;var n=i?t.lastIndexOf(i):-1;return~n?t.slice(n+i.length,t.length):t},strLeft:function(t,i){if(null==t)return"";t=e(t),i=null!=i?e(i):i;var n=i?t.indexOf(i):-1;return~n?t.slice(0,n):t},strLeftBack:function(t,e){if(null==t)return"";t+="",e=null!=e?""+e:e;var i=t.lastIndexOf(e);return~i?t.slice(0,i):t},toSentence:function(t,e,i,n){e=e||", ",i=i||" and ";var s=t.slice(),o=s.pop();return t.length>2&&n&&(i=p.rtrim(e)+i),s.length?s.join(e)+i+o:o},toSentenceSerial:function(){var t=a.call(arguments);return t[3]=!0,p.toSentence.apply(p,t)},slugify:function(t){if(null==t)return"";var i="ąàáäâãåæćęèéëêìíïîłńòóöôõøùúüûñçżź",n="aaaaaaaaceeeeeiiiilnoooooouuuunczz",s=new RegExp(l(i),"g");return t=e(t).toLowerCase().replace(s,function(t){var e=i.indexOf(t);return n.charAt(e)||"-"}),p.dasherize(t.replace(/[^\w\s-]/g,""))},surround:function(t,e){return[e,t,e].join("")},quote:function(t){return p.surround(t,'"')},exports:function(){var t={};for(var e in this)this.hasOwnProperty(e)&&!e.match(/^(?:include|contains|reverse)$/)&&(t[e]=this[e]);return t},repeat:function(t,i,n){if(null==t)return"";if(i=~~i,null==n)return r(e(t),i);for(var s=[];i>0;s[--i]=t);return s.join(n)},levenshtein:function(t,i){if(null==t&&null==i)return 0;if(null==t)return e(i).length;if(null==i)return e(t).length;t=e(t),i=e(i);for(var n,s,o=[],r=0;r<=i.length;r++)for(var a=0;a<=t.length;a++)s=r&&a?t.charAt(a-1)===i.charAt(r-1)?n:Math.min(o[a],o[a-1],n)+1:r+a,n=o[a],o[a]=s;return o.pop()}};p.strip=p.trim,p.lstrip=p.ltrim,p.rstrip=p.rtrim,p.center=p.lrpad,p.rjust=p.lpad,p.ljust=p.rpad,p.contains=p.include,p.q=p.quote,"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(module.exports=p),exports._s=p):"function"==typeof define&&define.amd?define("underscore.string",[],function(){return p}):(t._=t._||{},t._.string=t._.str=p)}(this,String),define("underscore",["require","lodash.custom","common/util/xssUtil","underscore.string"],function(t){"use strict";var e=t("lodash.custom"),i=t("common/util/xssUtil");e.str=t("underscore.string"),e.templateSettings={evaluate:/\{\{([\s\S]+?)\}\}/g,interpolate:/\{\{=([\s\S]+?)\}\}/g,escape:/\{\{-([\s\S]+?)\}\}/g},e.mixin(e.str.exports()),e.xssEscape=i.escape;var n=e.template;return e.template=function(t,i,s){var o=e.templateSettings,r=/($^)/;t=String(t||""),s=e.defaults({},s,o);var a=RegExp((s.escape||r).source+"|$","g");return t=t.replace(a,"{{ print(_.xssEscape($1)); }}"),n.call(e,t,i,s)},e});var log="";Function.prototype.addMethod=function(t,e){return this.prototype[t]=e,this},Function.prototype.addVar=function(t,e){return this.prototype[t]=e,this},Function.prototype.compose=function(t){var e=this;return function(){return e.call(this,t.apply(this,arguments))}};var overlayObjectStack=new Array;"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.strip()});var timer={},inspect=function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i+" = "+t[i]);return e.join("\n")},getAsFunction=function(t){return toFunction(t)||toFunction("localContext."+t)};BusyMonitor.prototype.run=function(){var t=arguments;null!=this.timer&&clearTimeout(this.timer);var e=function(){this.theFunction.apply(null,t)};this.timer=setTimeout(e.bind(this),this.waitTime)},BusyMonitor.prototype.cancel=function(){this.timer&&clearTimeout(this.timer)},InPlaceEditor.prototype.makeEditable=function(t){var e=this,i=this.elem.id+"Input",n=this.value,s=Builder.node("input",{className:"control input text",id:i,value:n});this.elem.update(s),this.editing=!0;var o=jQuery("#"+i);if(isIE()){var r=!1;o.hover(function(){!r&&n&&n===this.value&&(this.select(),this.focus(),r=!0)},function(){})}if(o.focus(),o.select(),t){if(t.blur&&($(i).onblur=function(i){i=i?i:window.event;var n=t.blur,s=getAsFunction(n);s.call(e,i)}),(t.onEnter||t.onTab)&&($(i).onkeypress=function(i){var n=null,s=null;i=i?i:window.event,enterKeyHit(i)?(n=t.onEnter,s=getAsFunction(n),s.call(e,i)):i.keyCode==Event.KEY_TAB&&(n=t.onTab,s=getAsFunction(n),s.call(e,i))}),t.onMouseup){var a=function(n){if(n=n?n:window.event,$(Event.element(n))!=$(i)){var s=t.onMouseup,o=getAsFunction(s);o.call(e,n)}};isIPad()?document.body.ontouchend=a:document.body.onmousedown=a}t.onEsc&&(document.body.onkeydown=function(i){if(i=i?i:window.event,i.keyCode==Event.KEY_ESC){var n=t.onEsc,s=getAsFunction(n);s.call(e,i)}})}},InPlaceEditor.prototype.makeNonEditable=function(){if(this.elem&&this.elem.firstDescendant()&&this.editing){var t=this.elem.firstDescendant().value;this.elem.update(xssUtil.escape(t)),this.editing=!1}},InPlaceEditor.prototype.revertEdit=function(){this.elem.update(this.value),this.editing=!1};var cancelEventDragTarget=null;String.prototype.times=function(t){return 1>t?"":new Array(t+1).join(this)};var tracer={nativeCodeEx:/\[native code\]/,indentCount:-4,tracing:[],traceMe:function(t,e){var i=function(){var i=+new Date,n=" ".times(tracer.indentCount+=4);console.info(n+e+"("+Array.prototype.slice.call(arguments).join(", ")+")");var s=t.apply(this,arguments);return console.info(n+e,"-> ",s,"(",new Date-i,"ms",")"),tracer.indentCount-=4,s};i.traceOff=t;for(var n in t)i[n]=t[n];return console.log("tracing "+e),i},traceAll:function(t,e){if(t!=window&&("object"==typeof t||"function"==typeof t))for(var i in t)if(t.hasOwnProperty(i)&&t[i]!=t){var n=t[i];"function"==typeof n&&(this==t||n.traceOff||this.nativeCodeEx.test(n)||(t[i]=this.traceMe(t[i],i),this.tracing.push({obj:t,methodName:i}))),e&&this.traceAll(n,!0)}},untraceAll:function(){for(var t=0;t<this.tracing.length;++t){var e=this.tracing[t];e.obj[e.methodName]=e.obj[e.methodName].traceOff}console.log("tracing disabled"),tracer.tracing=[]}},ValidationModule={validate:function(t,e){var i=this;if(!isArray(t))return this.validateEntry(t,e);var n=!0;return _.each(t,function(t){n=i.validateEntry(t,e)&&n}),n},validateEntry:function(t,e){if(t.validator)return this.validateLegacy(t,e);if(!t.selector){var i=this._validateElement(t.element,t,e);return null==i}for(var n=jQuery(t.element).find(t.selector),s=!0,o=0;o<n.length;o++){var i=this._validateElement(n[o],t,e);s=s&&null==i}return s},_validateElement:function(t,e,i){var n;if(e.method)n=this._runValidatorOnElement(e.method,t,e.messages,e.options);else for(var s=e.validators,o=0;o<s.length;o++){var r=s[o];if(n=this._runValidatorOnElement(r.method,t,r.messages,r.options),null!=n)break}return i!==!1&&(n?this.showError(t,n):this.hideError(t)),n},_runValidatorOnElement:function(t,e,i,n){_.isString(t)&&(t=this.methods[t]);var s=t.call(this,e.value,i,n);return _.isObject(s)?s.isValid?null:s.errorMessage:s},attachOnEvent:function(t,e){_.isArray(e)||(e=[e]),_.each(e,function(e){jQuery(e.element).on(t,function(t){ValidationModule.validateEntry(e)})})},_getMessage:function(t,e,i,n){(_.isArray(i)||void 0===i)&&(n=i,i=this.defaultMessages);var s=null;return e&&(s=e[t]),!s&&i&&(s=i[t]),s&&n&&(s=this.fillPlaceholders(s,n)),s||t},fillPlaceholders:function(t,e){for(var i=0;i<e.length;i++)t=t.replace("{"+i+"}",e[i]);return t},defaultMessages:{mandatory:"Field is mandatory",tooSmall:"Value is too small, at least {0} required",tooBig:"Value is too big, at most {0} allowed",tooShort:"Value is too short, at least {0} characters required",tooLong:"Value is too long, at most {0} characters allowed",wordInvalidChars:"Value should contain only word characters (letters, digits and underscore)",shouldStartWithLetter:"Value should start with letter"},methods:{mandatory:function(t,e){return jQuery.trim(t)?null:this._getMessage("mandatory",e)},minMax:function(t,e,i){var n=jQuery.trim(t);if(!n)return null;var n=parseFloat(n);return isNaN(n)?this._getMessage("notANumber",e):void 0!==i.min&&n<i.min?this._getMessage("tooSmall",e,[i.min]):void 0!==i.max&&n>i.max?this._getMessage("tooBig",e,[i.max]):void 0},minMaxLength:function(t,e,i){return i.minLength&&t.length<i.minLength?this._getMessage("tooShort",e,[i.minLength]):i.maxLength&&t.length>i.maxLength?this._getMessage("tooLong",e,[i.maxLength]):void 0},resourceIdChars:function(t,e){if(!localContext||!localContext.initOptions||!localContext.initOptions.resourceIdNotSupportedSymbols)throw"There is no resourceIdNotSupportedSymbols property in init options.";return new RegExp(localContext.initOptions.resourceIdNotSupportedSymbols,"g").test(t)?this._getMessage("resourceIdInvalidChars",e):void 0},wordChars:function(t,e){return t.search(/\W/)>=0?this._getMessage("wordInvalidChars",e):void 0},startsWithLetter:function(t,e){return t.substr(0,1).match(/[A-Za-z]/)?void 0:this._getMessage("shouldStartWithLetter",e)},isDecimal:function(t){return _.isNumber(t)||_.isString(t)&&!isNaN(Number(t))?null:"defaultErrorMessage"},isInteger:function(t){return _.isNumber(t)||_.isString(t)&&/^[-+]?\d+$/.test(t)?null:"defaultErrorMessage"}},validateLegacy:function(t,e){var i=!0,n=[];return t=isArray(t)?t:[t],e=e!==!1,t.each(function(t){var s=t.validator.call(ValidationModule,t.element.getValue());s.isValid?t.onValid&&t.onValid(t):t.onInvalid&&t.onInvalid(t),s.isValid||n.include(t.element)?n.include(t.element)||e&&ValidationModule.hideError(t.element,!0):(n.push(t.element),e&&ValidationModule.showError(t.element,s.errorMessage),i=!1)}),i},_showMessage:function(t,e,i,n){var s=t.validatorMessageContainer||t.parentNode,o=$(s).select(n)[0];o=o||$(s).select(layoutModule.MESSAGE_PATTERN)[0],o||(o=document.createElement("span"),s.appendChild(o)),o.className="";for(var r=n.split("."),a=0;a<r.length;a++)o.addClassName(r[a].trim());0==o.children.length?o.update(e):o.children[0].update(e),s.addClassName(i)},showError:function(t,e,i){this._showMessage(t,e,layoutModule.ERROR_CLASS,layoutModule.MESSAGE_WARNING_PATTERN);var n=t.validatorMessageContainer||t.parentNode;if(i){var s=$(n).select(layoutModule.DETAILS_PATTERN)[0];s&&s.stopObserving("click").observe("click",function(){dialogs.errorPopup.show(i,!0)}.bindAsEventListener(this))}else{var o=$(n).select(layoutModule.MESSAGE_WARNING_DETAILS_PATTERN)[0];o&&$(o).hide()}},showSuccess:function(t,e){this._showMessage(t,e,layoutModule.SUCCESS_CLASS,layoutModule.MESSAGE_SUCCESS_PATTERN)},hideError:function(t,e){var i=t.validatorMessageContainer||t.parentNode;if($(i).removeClassName(layoutModule.ERROR_CLASS),
  e){var n=$(i).select(layoutModule.MESSAGE_WARNING_PATTERN)[0]||$(i).select(layoutModule.MESSAGE_PATTERN)[0];n&&n.update("")}},hideSuccess:function(t){var e=t.validatorMessageContainer||t.parentNode;$(e).removeClassName(layoutModule.SUCCESS_CLASS)}},ClassNameBuilder=function(t){return this.element=$(t),this.element.classNameBuilder?this.element.classNameBuilder:(this.names=this.element.className.split(" "),this.names=this.names.compact().uniq(),void(this.element.classNameBuilder=this))};ClassNameBuilder.addMethod("add",function(t){var e=[];if(Object.isString(t))e=t.split(" ");else{if(!isArray(t))return this;e=t}return e.each(function(t){this.names.include(t)||this.names.push(t)}.bind(this)),this}).addMethod("remove",function(t){return this.names=this.names.without(t),this}).addMethod("clean",function(){return this.names=[],this}).addMethod("toClassName",function(){return this.element.className=this.names.join(" "),this.element.className});var JSCookie=function(t,e,i){if(!Object.isString(t))throw"Invalid name";this.name=t,this.value=e,Object.isUndefined(e)?this.value=this._getCookies()[t]:this._setCookie(this.name,this.value,i)};JSCookie.addVar("daysToExpiration",30),JSCookie.addVar("getCookieTemplate",function(){return _.template("{{- name}}={{- value}}; expires={{- expires}}; path=/;")}),JSCookie.addMethod("_getCookies",function(){var t={};return document.cookie.split(";").invoke("strip").each(function(e){var i=e.split("=");t[i[0].strip()]=decodeURI(i[1])}),t}),JSCookie.addMethod("set",function(t,e){this.value=t,this._setCookie(this.name,this.value,e)}),JSCookie.addMethod("get",function(){return this.value}),JSCookie.addMethod("_setCookie",function(t,e,i){document.cookie=this.getCookieTemplate()({name:t,value:encodeURI(new String(e)),expires:this._getExpiresDate(i).toGMTString()})}),JSCookie.addMethod("_getExpiresDate",function(t){var e=new Date;return e.setTime(e.getTime()+(t?t:24*this.daysToExpiration*60*60*1e3)),e});var sessionManager={RESET_SESSION_MIN_TIME:1e3,resetSession:function(t){var e=(new Date).getTime();if(!(this._lastSessionResetTime&&e-this._lastSessionResetTime<this.RESET_SESSION_MIN_TIME)){this._lastSessionResetTime=e;var i=buildActionUrl({flowExecutionKey:t,eventId:"resetSession"}),n={errorHandler:this.errorHandler};ajaxNonReturningUpdate(i,n)}},errorHandler:function(t){var e=t.getResponseHeader("LoginRequested");return e?(document.location=urlContext,!0):void 0}},buildActionUrl=function(t){if(t){var e=deepClone(t);return $w("flowId flowExecutionKey eventId").each(function(t){e[t]&&(e["_"+t]=e[t],delete e[t])}),"flow.html?"+Object.toQueryString(e)}},pageDimmer={DOM_ID:"#pageDimmer",show:function(t){if(jQuery(this.DOM_ID).removeClass("hidden"),t&&t.match(layoutModule.DIALOG_PATTERN)){var e=t.getStyle("zIndex");e=e?parseInt(e,10):0,e>0&&this.setZindex(e-1)}},hide:function(){jQuery(this.DOM_ID).addClass("hidden")},setZindex:function(t){jQuery(this.DOM_ID).css({zIndex:t})}},fileSender={};fileSender.upload=function(t,e,i,n){return fileSender.uploadMultiple([t],e,i,n)},fileSender.uploadMultiple=function(t,e,i,n){for(var s=Builder.node("FORM",{action:"flow.html?_flowId="+e,method:"post",enctype:"multipart/form-data"}),o=0;o<t.length;o++){var r=t[o],a=r.cloneNode(!0);r.writeAttribute("id",null),r.addClassName("hidden"),s.file&&s.file.remove(),fileSender.moveEventHandlers(r,a),r.insert({after:a}),r.remove(),s.insert(r);for(var l in i){var u=Builder.node("INPUT",{type:"hidden",name:l,value:i[l]});s.insert(u)}}return s.addClassName("hidden"),document.body.insert(s),fileSender.submit(s,{onStart:null,onComplete:n}),s.submit(),s},fileSender.moveEventHandlers=function(t,e){var i=Event.cache,n=fileSender.getUniqueElementID(t),s=i[n];delete i[n],s&&(_.each(s,function(t,i){"element"!==i&&_.each(t,function(t){e.observe(i,t.handler)})}),s=null)},fileSender.getUniqueElementID=function(t){return t===window?0:"uniqueID"in document.createElement("div")?t==document?1:t.uniqueID:("undefined"==typeof t._prototypeUID&&(t._prototypeUID=Element.Storage.UID++),t._prototypeUID)},fileSender.frame=function(t){var e="f"+Math.floor(99999*Math.random()),i=$("ajax-upload-iframe").cloneNode(!0);i.writeAttribute("id",e),i.writeAttribute("name",e),document.body.insert(i);var n=function(){fileSender.loaded(e)};return i.observe("load",n),t&&"function"==typeof t.onComplete&&(i.onComplete=t.onComplete),e},fileSender.form=function(t,e){t.setAttribute("target",e)},fileSender.submit=function(t,e){return fileSender.form(t,fileSender.frame(e)),e&&"function"==typeof e.onStart?e.onStart():!0},fileSender.loaded=function(t){var e,i=document.getElementById(t);e=i.contentDocument?i.contentDocument:i.contentWindow?i.contentWindow.document:window.frames[t].document,"about:blank"!=e.location.href&&(fileSender.sessionTimeoutHandler(e)||"function"==typeof i.onComplete&&i.onComplete(e.body.innerHTML))},fileSender.sessionTimeoutHandler=function(t){for(var e=t.getElementsByTagName("meta"),i=0;i<e.length;i++)if("pageHeading"==e[i].name&&"LOGIN PAGE"==e[i].content)return document.location=".",!0;return!1},Keys=new Object,Keys.DOM_VK_BACK_SPACE=8,Keys.DOM_VK_ENTER=13,Keys.DOM_VK_PAGE_UP=33,Keys.DOM_VK_DOWN=40,Keys.DOM_VK_INSERT=45,Keys.DOM_VK_DELETE=46,Keys.DOM_VK_0=48,Keys.DOM_VK_9=57,Keys.DOM_VK_NUMPAD0=96,Keys.DOM_VK_NUMPAD9=105,Keys.DOM_VK_DECIMAL=110,Keys.DOM_VK_COMMA=188,Keys.DOM_VK_PERIOD=190,Keys.DOM_VK_CANCEL=3,Keys.DOM_VK_HELP=6,Keys.DOM_VK_TAB=9,Keys.DOM_VK_CLEAR=12,Keys.DOM_VK_RETURN=13,Keys.DOM_VK_SHIFT=16,Keys.DOM_VK_CONTROL=17,Keys.DOM_VK_ALT=18,Keys.DOM_VK_PAUSE=19,Keys.DOM_VK_CAPS_LOCK=20,Keys.DOM_VK_ESCAPE=27,Keys.DOM_VK_SPACE=32,Keys.DOM_VK_PAGE_DOWN=34,Keys.DOM_VK_END=35,Keys.DOM_VK_HOME=36,Keys.DOM_VK_LEFT=37,Keys.DOM_VK_UP=38,Keys.DOM_VK_RIGHT=39,Keys.DOM_VK_PRINTSCREEN=44,Keys.DOM_VK_1=49,Keys.DOM_VK_2=50,Keys.DOM_VK_3=51,Keys.DOM_VK_4=52,Keys.DOM_VK_5=53,Keys.DOM_VK_6=54,Keys.DOM_VK_7=55,Keys.DOM_VK_8=56,Keys.DOM_VK_SEMICOLON=59,Keys.DOM_VK_EQUALS=61,Keys.DOM_VK_A=65,Keys.DOM_VK_B=66,Keys.DOM_VK_C=67,Keys.DOM_VK_D=68,Keys.DOM_VK_E=69,Keys.DOM_VK_F=70,Keys.DOM_VK_G=71,Keys.DOM_VK_H=72,Keys.DOM_VK_I=73,Keys.DOM_VK_J=74,Keys.DOM_VK_K=75,Keys.DOM_VK_L=76,Keys.DOM_VK_M=77,Keys.DOM_VK_N=78,Keys.DOM_VK_O=79,Keys.DOM_VK_P=80,Keys.DOM_VK_Q=81,Keys.DOM_VK_R=82,Keys.DOM_VK_S=83,Keys.DOM_VK_T=84,Keys.DOM_VK_U=85,Keys.DOM_VK_V=86,Keys.DOM_VK_W=87,Keys.DOM_VK_X=88,Keys.DOM_VK_Y=89,Keys.DOM_VK_Z=90,Keys.DOM_VK_CONTEXT_MENU=93,Keys.DOM_VK_NUMPAD1=97,Keys.DOM_VK_NUMPAD2=98,Keys.DOM_VK_NUMPAD3=99,Keys.DOM_VK_NUMPAD4=100,Keys.DOM_VK_NUMPAD5=101,Keys.DOM_VK_NUMPAD6=102,Keys.DOM_VK_NUMPAD7=103,Keys.DOM_VK_NUMPAD8=104,Keys.DOM_VK_MULTIPLY=106,Keys.DOM_VK_ADD=107,Keys.DOM_VK_SEPARATOR=108,Keys.DOM_VK_SUBTRACT=109,Keys.DOM_VK_SUBTRACT_UNDERSCORE_IE=189,Keys.DOM_VK_DIVIDE=111,Keys.DOM_VK_F1=112,Keys.DOM_VK_F2=113,Keys.DOM_VK_F3=114,Keys.DOM_VK_F4=115,Keys.DOM_VK_F5=116,Keys.DOM_VK_F6=117,Keys.DOM_VK_F7=118,Keys.DOM_VK_F8=119,Keys.DOM_VK_F9=120,Keys.DOM_VK_F10=121,Keys.DOM_VK_F11=122,Keys.DOM_VK_F12=123,Keys.DOM_VK_F13=124,Keys.DOM_VK_F14=125,Keys.DOM_VK_F15=126,Keys.DOM_VK_F16=127,Keys.DOM_VK_F17=128,Keys.DOM_VK_F18=129,Keys.DOM_VK_F19=130,Keys.DOM_VK_F20=131,Keys.DOM_VK_F21=132,Keys.DOM_VK_F22=133,Keys.DOM_VK_F23=134,Keys.DOM_VK_F24=135,Keys.DOM_VK_NUM_LOCK=144,Keys.DOM_VK_SCROLL_LOCK=145,Keys.DOM_VK_SLASH=191,Keys.DOM_VK_BACK_QUOTE=192,Keys.DOM_VK_OPEN_BRACKET=219,Keys.DOM_VK_BACK_SLASH=220,Keys.DOM_VK_CLOSE_BRACKET=221,Keys.DOM_VK_QUOTE=222,Keys.DOM_VK_META=224,compileTemplate=function(t){if(t){var e=_.templateSettings;_.templateSettings={evaluate:/\{\{([\s\S]+?)\}\}/g,interpolate:/\{\{=([\s\S]+?)\}\}/g,escape:/\{\{-([\s\S]+?)\}\}/g};var i=_.template(jQuery(t).html());return _.templateSettings=e,i}},define("utils.common",["prototype","jquery","underscore"],function(t){return function(){var e;return e||t.jQuery}}(this));var Builder={NODEMAP:{AREA:"map",CAPTION:"table",COL:"table",COLGROUP:"table",LEGEND:"fieldset",OPTGROUP:"select",OPTION:"select",PARAM:"object",TBODY:"table",TD:"table",TFOOT:"table",TH:"table",THEAD:"table",TR:"table"},node:function(t){t=t.toUpperCase();var e=this.NODEMAP[t]||"div",i=document.createElement(e);try{i.innerHTML="<"+t+"></"+t+">"}catch(n){}var s=i.firstChild||null;if(s&&s.tagName.toUpperCase()!=t&&(s=s.getElementsByTagName(t)[0]),s||(s=document.createElement(t)),s){if(arguments[1])if(this._isStringOrNumber(arguments[1])||arguments[1]instanceof Array||arguments[1].tagName)this._children(s,arguments[1]);else{var o=this._attributes(arguments[1]);if(o.length){try{i.innerHTML="<"+t+" "+o+"></"+t+">"}catch(n){}if(s=i.firstChild||null,!s){s=document.createElement(t);for(attr in arguments[1])s["class"==attr?"className":attr]=arguments[1][attr]}s.tagName.toUpperCase()!=t&&(s=i.getElementsByTagName(t)[0])}}return arguments[2]&&this._children(s,arguments[2]),$(s)}},_text:function(t){return document.createTextNode(t)},ATTR_MAP:{className:"class",htmlFor:"for"},_attributes:function(t){var e=[];for(attribute in t)e.push((attribute in this.ATTR_MAP?this.ATTR_MAP[attribute]:attribute)+'="'+t[attribute].toString().escapeHTML().gsub(/"/,"&quot;")+'"');return e.join(" ")},_children:function(t,e){return e.tagName?void t.appendChild(e):void("object"==typeof e?e.flatten().each(function(e){"object"==typeof e?t.appendChild(e):Builder._isStringOrNumber(e)&&t.appendChild(Builder._text(e))}):Builder._isStringOrNumber(e)&&t.appendChild(Builder._text(e)))},_isStringOrNumber:function(t){return"string"==typeof t||"number"==typeof t},build:function(t){var e=this.node("div");return $(e).update(t.strip()),e.down()},dump:function(t){"object"!=typeof t&&"function"!=typeof t&&(t=window);var e="A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR".split(/\s+/);e.each(function(e){t[e]=function(){return Builder.node.apply(Builder,[e].concat($A(arguments)))}})}};define("builder",["prototype"],function(t){return function(){var e;return e||t.Builder}}(this)),define("jquery.ui",["require","jquery"],function(t){var e=t("jquery");return function(t,e){function i(e,i){var s,o,r,a=e.nodeName.toLowerCase();return"area"===a?(s=e.parentNode,o=s.name,e.href&&o&&"map"===s.nodeName.toLowerCase()?(r=t("img[usemap=#"+o+"]")[0],!!r&&n(r)):!1):(/input|select|textarea|button|object/.test(a)?!e.disabled:"a"===a?e.href||i:i)&&n(e)}function n(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var s=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"@VERSION",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(i,n){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),n&&n.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var n,s,o=t(this[0]);o.length&&o[0]!==document;){if(n=o.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(o.css("zIndex"),10),!isNaN(s)&&0!==s))return s;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,n){return!!t.data(e,n[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var n=t.attr(e,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(e,!s)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,n){function s(e,i,n,s){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),s&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===n?["Left","Right"]:["Top","Bottom"],r=n.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(i){return i===e?a["inner"+n].call(this):this.each(function(){t(this).css(r,s(this,i)+"px")})},t.fn["outer"+n]=function(e,i){return"number"!=typeof e?a["outer"+n].call(this,e):this.each(function(){t(this).css(r,s(this,e,!0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<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)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,n){var s,o=t.ui[e].prototype;for(s in n)o.plugins[s]=o.plugins[s]||[],o.plugins[s].push([i,n[s]])},call:function(t,e,i){var n,s=t.plugins[e];if(s&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(n=0;n<s.length;n++)t.options[s[n][0]]&&s[n][1].apply(t.element,i)}},hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return e[n]>0?!0:(e[n]=1,s=e[n]>0,e[n]=0,s)}})}(e),function(t,e){var i=0,n=Array.prototype.slice,s=t.cleanData;t.cleanData=function(e){for(var i,n=0;null!=(i=e[n]);n++)try{t(i).triggerHandler("remove")}catch(o){}s(e)},t.widget=function(e,i,n){var s,o,r,a,l={},u=e.split(".")[0];e=e.split(".")[1],s=u+"-"+e,n||(n=i,i=t.Widget),t.expr[":"][s.toLowerCase()]=function(e){return!!t.data(e,s)},t[u]=t[u]||{},o=t[u][e],r=t[u][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new r(t,e)},t.extend(r,o,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(n,function(e,n){return t.isFunction(n)?void(l[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,i=this._super,o=this._superApply;return this._super=t,this._superApply=s,e=n.apply(this,arguments),this._super=i,this._superApply=o,e}}()):void(l[e]=n)}),r.prototype=t.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||e:e},l,{constructor:r,namespace:u,widgetName:e,widgetFullName:s}),o?(t.each(o._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,r,i._proto)}),delete o._childConstructors):i._childConstructors.push(r),t.widget.bridge(e,r)},t.widget.extend=function(i){for(var s,o,r=n.call(arguments,1),a=0,l=r.length;l>a;a++)for(s in r[a])o=r[a][s],r[a].hasOwnProperty(s)&&o!==e&&(t.isPlainObject(o)?i[s]=t.isPlainObject(i[s])?t.widget.extend({},i[s],o):t.widget.extend({},o):i[s]=o);return i},t.widget.bridge=function(i,s){var o=s.prototype.widgetFullName||i;t.fn[i]=function(r){var a="string"==typeof r,l=n.call(arguments,1),u=this;return r=!a&&l.length?t.widget.extend.apply(null,[r].concat(l)):r,a?this.each(function(){var n,s=t.data(this,o);return s?t.isFunction(s[r])&&"_"!==r.charAt(0)?(n=s[r].apply(s,l),n!==s&&n!==e?(u=n&&n.jquery?u.pushStack(n.get()):n,!1):void 0):t.error("no such method '"+r+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+r+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(r||{})._init():t.data(this,o,new s(r,this))}),u}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),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(),n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),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,n){var s,o,r,a=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(a={},s=i.split("."),i=s.shift(),s.length){for(o=a[i]=t.widget.extend({},this.options[i]),r=0;r<s.length-1;r++)o[s[r]]=o[s[r]]||{},o=o[s[r]];if(i=s.pop(),1===arguments.length)return o[i]===e?null:o[i];o[i]=n}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];a[i]=n}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return 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,n){var s,o=this;"boolean"!=typeof e&&(n=i,i=e,e=!1),n?(i=s=t(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,s=this.widget()),t.each(n,function(n,r){function a(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?o[r]:r).apply(o,arguments):void 0}"string"!=typeof r&&(a.guid=r.guid=r.guid||a.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+o.eventNamespace,c=l[2];c?s.delegate(c,u,a):i.bind(u,a)})},_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?n[t]:t).apply(n,arguments)}var n=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,n){var s,o,r=this.options[e];if(n=n||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(s in o)s in i||(i[s]=o[s]);return this.element.trigger(i,n),!(t.isFunction(r)&&r.apply(this.element[0],[i].concat(n))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(n,s,o){"string"==typeof s&&(s={effect:s});var r,a=s?s===!0||"number"==typeof s?i:s.effect||i:e;s=s||{},"number"==typeof s&&(s={duration:s}),r=!t.isEmptyObject(s),s.complete=o,s.delay&&n.delay(s.delay),r&&t.effects&&t.effects.effect[a]?n[e](s):a!==e&&n[a]?n[a](s.duration,s.easing,o):n.queue(function(i){t(this)[e](),o&&o.call(n[0]),i()})}})}(e),function(t,e){var i=!1;t(document).mouseup(function(){i=!1}),t.widget("ui.mouse",{version:"@VERSION",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),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 n=this,s=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.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 n._mouseMove(t)},this._mouseUpDelegate=function(t){return n._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),i=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(e),function(t,e){t.widget("ui.draggable",t.ui.mouse,{version:"@VERSION",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<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):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(this._trigger("drag",e,n)===!1)return this._mouseUp({}),!1;this.position=n.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,n=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(n=t.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,s=this.options;return s.containment?"window"===s.containment?void(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===s.containment?void(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):s.containment.constructor===Array?void(this.containment=s.containment):("parent"===s.containment&&(s.containment=this.helper[0].parentNode),i=t(s.containment),n=i[0],void(n&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i))):void(this.containment=null)},_convertPositionTo:function(e,i){i||(i=this.position);var n="absolute"===e?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:s.scrollTop(),left:s.scrollLeft()}),{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*n
  }},_generatePosition:function(e){var i,n,s,o,r=this.options,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=e.pageX,u=e.pageY;return this.offset.scroll||(this.offset.scroll={top:a.scrollTop(),left:a.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(n=this.relative_container.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(u=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(u=i[3]+this.offset.click.top)),r.grid&&(s=r.grid[1]?this.originalPageY+Math.round((u-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,u=i?s-this.offset.click.top>=i[1]||s-this.offset.click.top>i[3]?s:s-this.offset.click.top>=i[1]?s-r.grid[1]:s+r.grid[1]:s,o=r.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-r.grid[0]:o+r.grid[0]:o)),{top:u-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,n){return n=n||this._uiHash(),t.ui.plugin.call(this,e,[i,n]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var n=t(this).data("ui-draggable"),s=n.options,o=t.extend({},i,{item:n.element});n.sortables=[],t(s.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(n.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i){var n=t(this).data("ui-draggable"),s=t.extend({},i,{item:n.element});t.each(n.sortables,function(){this.instance.isOver?(this.instance.isOver=0,n.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===n.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,s))})},drag:function(e,i){var n=t(this).data("ui-draggable"),s=this;t.each(n.sortables,function(){var o=!1,r=this;this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,t.each(n.sortables,function(){return this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this!==r&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(r.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(s).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=n.offset.click.top,this.instance.offset.click.left=n.offset.click.left,this.instance.offset.parent.left-=n.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=n.offset.parent.top-this.instance.offset.parent.top,n._trigger("toSortable",e),n.dropped=this.instance.element,n.currentItem=n.element,this.instance.fromOutside=n),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(),n._trigger("fromSortable",e),n.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var n=t(i.helper),s=t(this).data("ui-draggable").options;n.css("opacity")&&(s._opacity=n.css("opacity")),n.css("opacity",s.opacity)},stop:function(e,i){var n=t(this).data("ui-draggable").options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),n=i.options,s=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(n.axis&&"x"===n.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<n.scrollSensitivity?i.scrollParent[0].scrollTop=s=i.scrollParent[0].scrollTop+n.scrollSpeed:e.pageY-i.overflowOffset.top<n.scrollSensitivity&&(i.scrollParent[0].scrollTop=s=i.scrollParent[0].scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<n.scrollSensitivity?i.scrollParent[0].scrollLeft=s=i.scrollParent[0].scrollLeft+n.scrollSpeed:e.pageX-i.overflowOffset.left<n.scrollSensitivity&&(i.scrollParent[0].scrollLeft=s=i.scrollParent[0].scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(document).scrollTop()<n.scrollSensitivity?s=t(document).scrollTop(t(document).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<n.scrollSensitivity&&(s=t(document).scrollTop(t(document).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(document).scrollLeft()<n.scrollSensitivity?s=t(document).scrollLeft(t(document).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<n.scrollSensitivity&&(s=t(document).scrollLeft(t(document).scrollLeft()+n.scrollSpeed)))),s!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),n=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:n.top,left:n.left})})},drag:function(e,i){var n,s,o,r,a,l,u,c,h,d,p=t(this).data("ui-draggable"),f=p.options,m=f.snapTolerance,g=i.offset.left,v=g+p.helperProportions.width,_=i.offset.top,b=_+p.helperProportions.height;for(h=p.snapElements.length-1;h>=0;h--)a=p.snapElements[h].left,l=a+p.snapElements[h].width,u=p.snapElements[h].top,c=u+p.snapElements[h].height,a-m>v||g>l+m||u-m>b||_>c+m||!t.contains(p.snapElements[h].item.ownerDocument,p.snapElements[h].item)?(p.snapElements[h].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[h].item})),p.snapElements[h].snapping=!1):("inner"!==f.snapMode&&(n=Math.abs(u-b)<=m,s=Math.abs(c-_)<=m,o=Math.abs(a-v)<=m,r=Math.abs(l-g)<=m,n&&(i.position.top=p._convertPositionTo("relative",{top:u-p.helperProportions.height,left:0}).top-p.margins.top),s&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:a-p.helperProportions.width}).left-p.margins.left),r&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l}).left-p.margins.left)),d=n||s||o||r,"outer"!==f.snapMode&&(n=Math.abs(u-_)<=m,s=Math.abs(c-b)<=m,o=Math.abs(a-g)<=m,r=Math.abs(l-v)<=m,n&&(i.position.top=p._convertPositionTo("relative",{top:u,left:0}).top-p.margins.top),s&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:a}).left-p.margins.left),r&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[h].snapping&&(n||s||o||r||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[h].item})),p.snapElements[h].snapping=n||s||o||r||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,n=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});n.length&&(e=parseInt(t(n[0]).css("zIndex"),10)||0,t(n).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+n.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var n=t(i.helper),s=t(this).data("ui-draggable").options;n.css("zIndex")&&(s._zIndex=n.css("zIndex")),n.css("zIndex",s.zIndex)},stop:function(e,i){var n=t(this).data("ui-draggable").options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}})}(e),function(t,e){function i(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"@VERSION",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,n=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(n)?n:function(t){return t.is(n)},this.proportions=function(){return arguments.length?void(e=arguments[0]):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},t.ui.ddmanager.droppables[i.scope]=t.ui.ddmanager.droppables[i.scope]||[],t.ui.ddmanager.droppables[i.scope].push(this),i.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];e<i.length;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var n=i||t.ui.ddmanager.current,s=!1;return n&&(n.currentItem||n.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===n.options.scope&&e.accept.call(e.element[0],n.currentItem||n.element)&&t.ui.intersect(n,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(s=!0,!1):void 0}),s?!1:this.accept.call(this.element[0],n.currentItem||n.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(n)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,e,n){if(!e.offset)return!1;var s,o,r=(t.positionAbs||t.position.absolute).left,a=(t.positionAbs||t.position.absolute).top,l=r+t.helperProportions.width,u=a+t.helperProportions.height,c=e.offset.left,h=e.offset.top,d=c+e.proportions().width,p=h+e.proportions().height;switch(n){case"fit":return r>=c&&d>=l&&a>=h&&p>=u;case"intersect":return c<r+t.helperProportions.width/2&&l-t.helperProportions.width/2<d&&h<a+t.helperProportions.height/2&&u-t.helperProportions.height/2<p;case"pointer":return s=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,o=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,i(o,h,e.proportions().height)&&i(s,c,e.proportions().width);case"touch":return(a>=h&&p>=a||u>=h&&p>=u||h>a&&u>p)&&(r>=c&&d>=r||l>=c&&d>=l||c>r&&l>d);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var n,s,o=t.ui.ddmanager.droppables[e.options.scope]||[],r=i?i.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(n=0;n<o.length;n++)if(!(o[n].options.disabled||e&&!o[n].accept.call(o[n].element[0],e.currentItem||e.element))){for(s=0;s<a.length;s++)if(a[s]===o[n].element[0]){o[n].proportions().height=0;continue t}o[n].visible="none"!==o[n].element.css("display"),o[n].visible&&("mousedown"===r&&o[n]._activate.call(o[n],i),o[n].offset=o[n].element.offset(),o[n].proportions({width:o[n].element[0].offsetWidth,height:o[n].element[0].offsetHeight}))}},drop:function(e,i){var n=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(n=this._drop.call(this,i)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),n},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 n,s,o,r=t.ui.intersect(e,this,this.options.tolerance),a=!r&&this.isover?"isout":r&&!this.isover?"isover":null;a&&(this.options.greedy&&(s=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===s}),o.length&&(n=t.data(o[0],"ui-droppable"),n.greedyChild="isover"===a)),n&&"isover"===a&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,i),n&&"isout"===a&&(n.isout=!1,n.isover=!0,n._over.call(n,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}}(e),function(t,e){function i(t){return parseInt(t,10)||0}function n(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"@VERSION",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){function e(t){return a._mouseDown(t)}var i,n,s,o,r,a=this,l=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!l.aspectRatio,aspectRatio:l.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:l.helper||l.ghost||l.animate?l.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("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=l.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},n=0;n<i.length;n++)s=t.trim(i[n]),r="ui-resizable-"+s,o=t("<div class='ui-resizable-handle "+r+"'></div>"),o.css({zIndex:l.zIndex}),"se"===s&&o.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(o);this._renderAxis=function(e){var i,n,s,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i]+":last",this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(n=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),s=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(s,o),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element);for(n in this.handles)this._handles=this._handles.add(this.handles[n]);if(this._handles.disableSelection(),this._handles.mouseover(function(){a.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=o&&o[1]?o[1]:"se")}),l.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){l.disabled||(t(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){l.disabled||a.resizing||(t(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit(),l.handles.constructor!==String)for(n in l.handles)s=l.handles[n],s instanceof t&&s.bind("mousedown."+this.widgetName,e)},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,n,s=!1;for(i in this.handles)n=t(this.handles[i])[0],(n===e.target||t.contains(n,e.target))&&(s=!0);return!this.options.disabled&&s},_mouseStart:function(e){var n,s,o,r=this.options,a=this.element.position(),l=this.element;return this.resizing=!0,/absolute/.test(l.css("position"))?l.css({position:"absolute",top:l.css("top"),left:l.css("left")}):l.is(".ui-draggable")&&l.css({position:"absolute",top:a.top,left:a.left}),this._renderProxy(),n=i(this.helper.css("left")),s=i(this.helper.css("top")),r.containment&&(n+=t(r.containment).scrollLeft()||0,s+=t(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:l.width(),height:l.height()},this.originalSize=this._helper?{width:l.outerWidth(),height:l.outerHeight()}:{width:l.width(),height:l.height()},this.originalPosition={left:n,top:s},this.sizeDiff={width:l.outerWidth()-l.width(),height:l.outerHeight()-l.height()},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof r.aspectRatio?r.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),l.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,n=this.helper,s={},o=this.originalMousePosition,r=this.axis,a=this.position.top,l=this.position.left,u=this.size.width,c=this.size.height,h=e.pageX-o.left||0,d=e.pageY-o.top||0,p=this._change[r];return p?(i=p.apply(this,[e,h,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==a&&(s.top=this.position.top+"px"),this.position.left!==l&&(s.left=this.position.left+"px"),this.size.width!==u&&(s.width=this.size.width+"px"),this.size.height!==c&&(s.height=this.size.height+"px"),n.css(s),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,n,s,o,r,a,l,u=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,n=i.length&&/textarea/i.test(i[0].nodeName),s=n&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,o=n?0:c.sizeDiff.width,r={width:c.helper.width()-o,height:c.helper.height()-s},a=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,l=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,u.animate||this.element.css(t.extend(r,{top:l,left:a})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!u.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,i,s,o,r,a=this.options;r={minWidth:n(a.minWidth)?a.minWidth:0,maxWidth:n(a.maxWidth)?a.maxWidth:1/0,minHeight:n(a.minHeight)?a.minHeight:0,maxHeight:n(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=r.minHeight*this.aspectRatio,s=r.minWidth/this.aspectRatio,i=r.maxHeight*this.aspectRatio,o=r.maxWidth/this.aspectRatio,e>r.minWidth&&(r.minWidth=e),s>r.minHeight&&(r.minHeight=s),i<r.maxWidth&&(r.maxWidth=i),o<r.maxHeight&&(r.maxHeight=o)),this._vBoundaries=r},_updateCache:function(t){this.offset=this.helper.offset(),n(t.left)&&(this.position.left=t.left),n(t.top)&&(this.position.top=t.top),n(t.height)&&(this.size.height=t.height),n(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return n(t.height)?t.width=t.height*this.aspectRatio:n(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=n(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=n(t.height)&&e.maxHeight&&e.maxHeight<t.height,r=n(t.width)&&e.minWidth&&e.minWidth>t.width,a=n(t.height)&&e.minHeight&&e.minHeight>t.height,l=this.originalPosition.left+this.originalSize.width,u=this.position.top+this.size.height,c=/sw|nw|w/.test(i),h=/nw|ne|n/.test(i);return r&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),r&&c&&(t.left=l-e.minWidth),s&&c&&(t.left=l-e.maxWidth),a&&h&&(t.top=u-e.minHeight),o&&h&&(t.top=u-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,n,s,o=this.helper||this.element;for(t=0;t<this._proportionallyResizeElements.length;t++){if(s=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[s.css("borderTopWidth"),s.css("borderRightWidth"),s.css("borderBottomWidth"),s.css("borderLeftWidth")],n=[s.css("paddingTop"),s.css("paddingRight"),s.css("paddingBottom"),s.css("paddingLeft")],e=0;e<i.length;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(n[e],10)||0);s.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,n=this.originalPosition;return{left:n.left+e,width:i.width-e}},n:function(t,e,i){var n=this.originalSize,s=this.originalPosition;return{top:s.top+i,height:n.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},sw:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,n]))},ne:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},nw:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,n]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),n=i.options,s=i._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),r=o&&t.ui.hasScroll(s[0],"left")?0:i.sizeDiff.height,a=o?0:i.sizeDiff.width,l={width:i.size.width-a,height:i.size.height-r},u=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,c&&u?{top:c,left:u}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};s&&s.length&&t(s[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,n,s,o,r,a,l,u=t(this).data("ui-resizable"),c=u.options,h=u.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?h.parent().get(0):d;p&&(u.containerElement=t(p),/document/.test(d)||d===document?(u.containerOffset={left:0,top:0},u.containerPosition={left:0,top:0},u.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(p),n=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){n[t]=i(e.css("padding"+s))}),u.containerOffset=e.offset(),u.containerPosition=e.position(),u.containerSize={height:e.innerHeight()-n[3],width:e.innerWidth()-n[1]},s=u.containerOffset,o=u.containerSize.height,r=u.containerSize.width,a=t.ui.hasScroll(p,"left")?p.scrollWidth:r,l=t.ui.hasScroll(p)?p.scrollHeight:o,u.parentData={element:p,left:s.left,top:s.top,width:a,height:l}))},resize:function(e){var i,n,s,o,r=t(this).data("ui-resizable"),a=r.options,l=r.containerOffset,u=r.position,c=r._aspectRatio||e.shiftKey,h={top:0,left:0},d=r.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(h=l),u.left<(r._helper?l.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-l.left:r.position.left-h.left),c&&(r.size.height=r.size.width/r.aspectRatio),r.position.left=a.helper?l.left:0),u.top<(r._helper?l.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-l.top:r.position.top),c&&(r.size.width=r.size.height*r.aspectRatio),r.position.top=r._helper?l.top:0),r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top,i=Math.abs((r._helper?r.offset.left-h.left:r.offset.left-h.left)+r.sizeDiff.width),n=Math.abs((r._helper?r.offset.top-h.top:r.offset.top-l.top)+r.sizeDiff.height),s=r.containerElement.get(0)===r.element.parent().get(0),o=/relative|absolute/.test(r.containerElement.css("position")),s&&o&&(i-=Math.abs(r.parentData.left)),i+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-i,c&&(r.size.height=r.size.width/r.aspectRatio)),n+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-n,c&&(r.size.width=r.size.height*r.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,n=e.containerOffset,s=e.containerPosition,o=e.containerElement,r=t(e.helper),a=r.offset(),l=r.outerWidth()-e.sizeDiff.width,u=r.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:a.left-s.left-n.left,width:l,height:u}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:a.left-s.left-n.left,width:l,height:u})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,n=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?n(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],n(i.alsoResize)):t.each(i.alsoResize,function(t){n(t)})},resize:function(e,i){var n=t(this).data("ui-resizable"),s=n.options,o=n.originalSize,r=n.originalPosition,a={height:n.size.height-o.height||0,width:n.size.width-o.width||0,top:n.position.top-r.top||0,left:n.position.left-r.left||0},l=function(e,n){t(e).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),o={},r=n&&n.length?n:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(r,function(t,e){var i=(s[e]||0)+(a[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof s.alsoResize||s.alsoResize.nodeType?l(s.alsoResize):t.each(s.alsoResize,function(t,e){l(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,n=e.size;e.ghost=e.originalElement.clone(),
  e.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,n=e.size,s=e.originalSize,o=e.originalPosition,r=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=a[0]||1,u=a[1]||1,c=Math.round((n.width-s.width)/l)*l,h=Math.round((n.height-s.height)/u)*u,d=s.width+c,p=s.height+h,f=i.maxWidth&&i.maxWidth<d,m=i.maxHeight&&i.maxHeight<p,g=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=a,g&&(d+=l),v&&(p+=u),f&&(d-=l),m&&(p-=u),/^(se|s|e)$/.test(r)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(r)?(e.size.width=d,e.size.height=p,e.position.top=o.top-h):/^(sw)$/.test(r)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):(p-u>0?(e.size.height=p,e.position.top=o.top-h):(e.size.height=u,e.position.top=o.top+s.height-u),d-l>0?(e.size.width=d,e.position.left=o.left-c):(e.size.width=l,e.position.left=o.left+s.width-l))}})}(e),function(t,e){t.widget("ui.selectable",t.ui.mouse,{version:"@VERSION",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<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,n=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(n.filter,this.element[0]),this._trigger("start",e),t(n.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),n.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var n=t.data(this,"selectable-item");n.startselected=!0,e.metaKey||e.ctrlKey||(n.$element.removeClass("ui-selected"),n.selected=!1,n.$element.addClass("ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",e,{unselecting:n.element}))}),t(e.target).parents().addBack().each(function(){var n,s=t.data(this,"selectable-item");return s?(n=!e.metaKey&&!e.ctrlKey||!s.$element.hasClass("ui-selected"),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):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,n=this,s=this.options,o=this.opos[0],r=this.opos[1],a=e.pageX,l=e.pageY;return o>a&&(i=a,a=o,o=i),r>l&&(i=l,l=r,r=i),this.helper.css({left:o,top:r,width:a-o,height:l-r}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),u=!1;i&&i.element!==n.element[0]&&("touch"===s.tolerance?u=!(i.left>a||i.right<o||i.top>l||i.bottom<r):"fit"===s.tolerance&&(u=i.left>o&&i.right<a&&i.top>r&&i.bottom<l),u?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,n._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),n._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var n=t.data(this,"selectable-item");n.$element.removeClass("ui-unselecting"),n.unselecting=!1,n.startselected=!1,i._trigger("unselected",e,{unselected:n.element})}),t(".ui-selecting",this.element[0]).each(function(){var n=t.data(this,"selectable-item");n.$element.removeClass("ui-selecting").addClass("ui-selected"),n.selecting=!1,n.selected=!0,n.startselected=!0,i._trigger("selected",e,{selected:n.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}(e),function(t,e){function i(t,e,i){return t>e&&e+i>t}function n(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"@VERSION",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||n(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var n=null,s=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(n=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(n=t(e.target)),n&&(!this.options.handle||i||(t(this.options.handle,n).find("*").addBack().each(function(){this===e.target&&(s=!0)}),s))?(this.currentItem=n,this._removeCurrentsFromItems(),!0):!1)},_mouseStart:function(e,i,n){var s,o,r=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,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",r.cursor),this.storedStylesheet=t("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(o)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.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(),!n)for(s=this.containers.length-1;s>=0;s--)this.containers[s]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,n,s,o,r=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<r.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+r.scrollSpeed:e.pageY-this.overflowOffset.top<r.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-r.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<r.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+r.scrollSpeed:e.pageX-this.overflowOffset.left<r.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-r.scrollSpeed)):(e.pageY-t(document).scrollTop()<r.scrollSensitivity?a=t(document).scrollTop(t(document).scrollTop()-r.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<r.scrollSensitivity&&(a=t(document).scrollTop(t(document).scrollTop()+r.scrollSpeed)),e.pageX-t(document).scrollLeft()<r.scrollSensitivity?a=t(document).scrollLeft(t(document).scrollLeft()-r.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<r.scrollSensitivity&&(a=t(document).scrollLeft(t(document).scrollLeft()+r.scrollSpeed))),a!==!1&&t.ui.ddmanager&&!r.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"),i=this.items.length-1;i>=0;i--)if(n=this.items[i],s=n.item[0],o=this._intersectsWithPointer(n),o&&n.instance===this.currentContainer&&s!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==s&&!t.contains(this.placeholder[0],s)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],s):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),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 n=this,s=this.placeholder.offset(),o=this.options.axis,r={};o&&"x"!==o||(r.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(r.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){n._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),n=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&n.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!n.length&&e.key&&n.push(e.key+"="),n.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},i.each(function(){n.push(t(e.item||this).attr(e.attribute||"id")||"")}),n},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,n=this.positionAbs.top,s=n+this.helperProportions.height,o=t.left,r=o+t.width,a=t.top,l=a+t.height,u=this.offset.click.top,c=this.offset.click.left,h="x"===this.options.axis||n+u>a&&l>n+u,d="y"===this.options.axis||e+c>o&&r>e+c,p=h&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&a<n+this.helperProportions.height/2&&s-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||i(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||i(this.positionAbs.left+this.offset.click.left,t.left,t.width),s=e&&n,o=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return s?this.floating?r&&"right"===r||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var e=i(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),n=i(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&n||"left"===o&&!n:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){a.push(this)}var n,s,o,r,a=[],l=[],u=this._connectWith();if(u&&e)for(n=u.length-1;n>=0;n--)for(o=t(u[n]),s=o.length-1;s>=0;s--)r=t.data(o[s],this.widgetFullName),r&&r!==this&&!r.options.disabled&&l.push([t.isFunction(r.options.items)?r.options.items.call(r.element):t(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);for(l.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]),n=l.length-1;n>=0;n--)l[n][0].each(i);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;i<e.length;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,n,s,o,r,a,l,u,c=this.items,h=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(s=t(d[i]),n=s.length-1;n>=0;n--)o=t.data(s[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(h.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=h.length-1;i>=0;i--)for(r=h[i][1],a=h[i][0],n=0,u=a.length;u>n;n++)l=t(a[n]),l.data(this.widgetName+"-item",r),c.push({item:l,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,n,s,o;for(i=this.items.length-1;i>=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?t(this.options.toleranceElement,n.item):n.item,e||(n.width=s.outerWidth(),n.height=s.outerHeight()),o=s.offset(),n.left=o.left,n.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,n=e.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=e.currentItem[0].nodeName.toLowerCase(),s=t("<"+n+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===n?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(s)}):"img"===n&&s.attr("src",e.currentItem.attr("src")),i||s.css("visibility","hidden"),s},update:function(t,s){(!i||n.forcePlaceholderSize)&&(s.height()||s.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),s.width()||s.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_contactContainers:function(e){var s,o,r,a,l,u,c,h,d,p,f=null,m=null;for(s=this.containers.length-1;s>=0;s--)if(!t.contains(this.currentItem[0],this.containers[s].element[0]))if(this._intersectsWith(this.containers[s].containerCache)){if(f&&t.contains(this.containers[s].element[0],f.element[0]))continue;f=this.containers[s],m=s}else this.containers[s].containerCache.over&&(this.containers[s]._trigger("out",e,this._uiHash(this)),this.containers[s].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[m].containerCache.over||(this.containers[m]._trigger("over",e,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(r=1e4,a=null,p=f.floating||n(this.currentItem),l=p?"left":"top",u=p?"width":"height",c=this.positionAbs[l]+this.offset.click[l],o=this.items.length-1;o>=0;o--)t.contains(this.containers[m].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||i(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(h=this.items[o].item.offset()[l],d=!1,Math.abs(h-c)>Math.abs(h+this.items[o][u]-c)&&(d=!0,h+=this.items[o][u]),Math.abs(h-c)<r&&(r=Math.abs(h-c),a=this.items[o],this.direction=d?"up":"down"));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[m])return;a?this._rearrange(e,a,null,!0):this._rearrange(e,null,this.containers[m].element,!0),this._trigger("change",e,this._uiHash()),this.containers[m]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[m],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[m]._trigger("over",e,this._uiHash(this)),this.containers[m].containerCache.over=1}},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[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")}),(!n[0].style.width||i.forceHelperSize)&&n.width(this.currentItem.width()),(!n[0].style.height||i.forceHelperSize)&&n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,s=this.options;"parent"===s.containment&&(s.containment=this.helper[0].parentNode),("document"===s.containment||"window"===s.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===s.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===s.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(s.containment)||(e=t(s.containment)[0],i=t(s.containment).offset(),n="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var n="absolute"===e?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:s.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*n}},_generatePosition:function(e){var i,n,s=this.options,o=e.pageX,r=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),s.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/s.grid[1])*s.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-s.grid[1]:i+s.grid[1]:i,n=this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0],o=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-s.grid[0]:n+s.grid[0]:n)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(t,e,i,n){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 s=this.counter;this._delay(function(){s===this.counter&&this.refreshPositions(!n)})},_clear:function(t,e){function i(t,e,i){return function(n){i._trigger(t,n,e._uiHash(e))}}this.reverting=!1;var n,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(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();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)e||s.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(s.push(i("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),n=0;n<s.length;n++)s[n].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(n=0;n<s.length;n++)s[n].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})}(e),function(t,i){var n="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var n=h[e.type]||{};return null==t?i||!e.def?null:e.def:(t=n.floor?~~t:parseFloat(t),isNaN(t)?e.def:n.mod?(t+n.mod)%n.mod:0>t?0:n.max<t?n.max:t)}function n(e){var i=u(),n=i._rgba=[];return e=e.toLowerCase(),f(l,function(t,s){var o,r=s.re.exec(e),a=r&&s.parse(r),l=s.space||"rgba";return a?(o=i[l](a),i[c[l].cache]=o[c[l].cache],n=i._rgba=o._rgba,!1):void 0}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),i):o[e]}function s(t,e,i){return i=(i+1)%1,1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}var o,r="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",a=/^([\-+])=\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]]}}],u=t.Color=function(e,i,n,s){return new t.Color.fn.parse(e,i,n,s)},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"}}}},h={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=u.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),u.fn=t.extend(u.prototype,{parse:function(s,r,a,l){if(s===e)return this._rgba=[null,null,null,null],this;(s.jquery||s.nodeType)&&(s=t(s).css(r),r=e);var h=this,d=t.type(s),p=this._rgba=[];return r!==e&&(s=[s,r,a,l],d="array"),"string"===d?this.parse(n(s)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(s[e.idx],e)}),this):"object"===d?(s instanceof u?f(c,function(t,e){s[e.cache]&&(h[e.cache]=s[e.cache].slice())}):f(c,function(e,n){var o=n.cache;f(n.props,function(t,e){if(!h[o]&&n.to){if("alpha"===t||null==s[t])return;h[o]=n.to(h._rgba)}h[o][e.idx]=i(s[t],e,!0)}),h[o]&&t.inArray(null,h[o].slice(0,3))<0&&(h[o][3]=1,
  n.from&&(h._rgba=n.from(h[o])))}),this):void 0},is:function(t){var e=u(t),i=!0,n=this;return f(c,function(t,s){var o,r=e[s.cache];return r&&(o=n[s.cache]||s.to&&s.to(n._rgba)||[],f(s.props,function(t,e){return null!=r[e.idx]?i=r[e.idx]===o[e.idx]:void 0})),i}),i},_space:function(){var t=[],e=this;return f(c,function(i,n){e[n.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var n=u(t),s=n._space(),o=c[s],r=0===this.alpha()?u("transparent"):this,a=r[o.cache]||o.to(r._rgba),l=a.slice();return n=n[o.cache],f(o.props,function(t,s){var o=s.idx,r=a[o],u=n[o],c=h[s.type]||{};null!==u&&(null===r?l[o]=u:(c.mod&&(u-r>c.mod/2?r+=c.mod:r-u>c.mod/2&&(r-=c.mod)),l[o]=i((u-r)*e+r,s)))}),this[s](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),s=u(e)._rgba;return u(t.map(i,function(t,e){return(1-n)*s[e]+n*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),n=i.pop();return e&&i.push(~~(255*n)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),u.fn.parse.prototype=u.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,n=t[0]/255,s=t[1]/255,o=t[2]/255,r=t[3],a=Math.max(n,s,o),l=Math.min(n,s,o),u=a-l,c=a+l,h=.5*c;return e=l===a?0:n===a?60*(s-o)/u+360:s===a?60*(o-n)/u+120:60*(n-s)/u+240,i=0===u?0:.5>=h?u/c:u/(2-c),[Math.round(e)%360,i,h,null==r?1:r]},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],n=t[2],o=t[3],r=.5>=n?n*(1+i):n+i-n*i,a=2*n-r;return[Math.round(255*s(a,r,e+1/3)),Math.round(255*s(a,r,e)),Math.round(255*s(a,r,e-1/3)),o]},f(c,function(n,s){var o=s.props,r=s.cache,l=s.to,c=s.from;u.fn[n]=function(n){if(l&&!this[r]&&(this[r]=l(this._rgba)),n===e)return this[r].slice();var s,a=t.type(n),h="array"===a||"object"===a?n:arguments,d=this[r].slice();return f(o,function(t,e){var n=h["object"===a?t:e.idx];null==n&&(n=d[e.idx]),d[e.idx]=i(n,e)}),c?(s=u(c(d)),s[r]=d,s):u(d)},f(o,function(e,i){u.fn[e]||(u.fn[e]=function(s){var o,r=t.type(s),l="alpha"===e?this._hsla?"hsla":"rgba":n,u=this[l](),c=u[i.idx];return"undefined"===r?c:("function"===r&&(s=s.call(this,c),r=t.type(s)),null==s&&i.empty?this:("string"===r&&(o=a.exec(s),o&&(s=c+parseFloat(o[2])*("+"===o[1]?1:-1))),u[i.idx]=s,this[l](u)))})})}),u.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,s){var o,r,a="";if("transparent"!==s&&("string"!==t.type(s)||(o=n(s)))){if(s=u(o||s),!d.rgba&&1!==s._rgba[3]){for(r="backgroundColor"===i?e.parentNode:e;(""===a||"transparent"===a)&&r&&r.style;)try{a=t.css(r,"backgroundColor"),r=r.parentNode}catch(l){}s=s.blend(a&&"transparent"!==a?a:"_default")}s=s.toRgbaString()}try{e.style[i]=s}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=u(e.elem,i),e.end=u(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},u.hook(r),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,n){e["border"+n+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(e),function(){function n(e){var i,n,s=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(s&&s.length&&s[0]&&s[s[0]])for(n=s.length;n--;)i=s[n],"string"==typeof s[i]&&(o[t.camelCase(i)]=s[i]);else for(i in s)"string"==typeof s[i]&&(o[i]=s[i]);return o}function s(e,i){var n,s,o={};for(n in i)s=i[n],e[n]!==s&&(r[n]||(t.fx.step[n]||!isNaN(parseFloat(s)))&&(o[n]=s));return o}var o=["add","remove","toggle"],r={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(i,n){t.fx.step[n]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(e.style(t.elem,n,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,i,r,a){var l=t.speed(i,r,a);return this.queue(function(){var i,r=t(this),a=r.attr("class")||"",u=l.children?r.find("*").addBack():r;u=u.map(function(){var e=t(this);return{el:e,start:n(this)}}),i=function(){t.each(o,function(t,i){e[i]&&r[i+"Class"](e[i])})},i(),u=u.map(function(){return this.end=n(this.el[0]),this.diff=s(this.start,this.end),this}),r.attr("class",a),u=u.map(function(){var e=this,i=t.Deferred(),n=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,n),i.promise()}),t.when.apply(t,u.get()).done(function(){i(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(r[0])})})},t.fn.extend({addClass:function(e){return function(i,n,s,o){return n?t.effects.animateClass.call(this,{add:i},n,s,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,n,s,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},n,s,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(n,s,o,r,a){return"boolean"==typeof s||s===i?o?t.effects.animateClass.call(this,s?{add:n}:{remove:n},o,r,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:n},s,o,r)}}(t.fn.toggleClass),switchClass:function(e,i,n,s,o){return t.effects.animateClass.call(this,{add:i,remove:e},n,s,o)}})}(),function(){function e(e,i,n,s){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(s=i,n=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(s=n,n=i,i={}),t.isFunction(n)&&(s=n,n=null),i&&t.extend(e,i),n=n||i.duration,e.duration=t.fx.off?0:"number"==typeof n?n:n in t.fx.speeds?t.fx.speeds[n]:t.fx.speeds._default,e.complete=s||i.complete,e}function s(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"@VERSION",save:function(t,e){for(var i=0;i<e.length;i++)null!==e[i]&&t.data(n+e[i],t[0].style[e[i]])},restore:function(t,e){var s,o;for(o=0;o<e.length;o++)null!==e[o]&&(s=t.data(n+e[o]),s===i&&(s=""),t.css(e[o],s))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,n;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":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=t[1]/e.width}return{x:n,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")},n=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),s={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(r){o=document.body}return e.wrap(n),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),n=e.parent(),"static"===e.css("position")?(n.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,n){i[n]=e.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(s),n.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,n,s){return s=s||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(s[i]=o[0]*n+o[1])}),s}}),t.fn.extend({effect:function(){function i(e){function i(){t.isFunction(o)&&o.call(s[0]),t.isFunction(e)&&e()}var s=t(this),o=n.complete,a=n.mode;(s.is(":hidden")?"hide"===a:"show"===a)?(s[a](),i()):r.call(s[0],n,i)}var n=e.apply(this,arguments),s=n.mode,o=n.queue,r=t.effects.effect[n.effect];return t.fx.off||!r?s?this[s](n.duration,n.complete):this.each(function(){n.complete&&n.complete.call(this)}):o===!1?this.each(i):this.queue(o||"fx",i)},show:function(t){return function(i){if(s(i))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(t.fn.show),hide:function(t){return function(i){if(s(i))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(i){if(s(i)||"boolean"==typeof i)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),n=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(n=[parseFloat(i),e])}),n}})}(),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.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()}(e),function(t,e){var i=0,n={},s={};n.height=n.paddingTop=n.paddingBottom=n.borderTopWidth=n.borderBottomWidth="hide",s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="show",t.widget("ui.accordion",{version:"@VERSION",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<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-expanded").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-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,n=this.headers.length,s=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(s+1)%n];break;case i.LEFT:case i.UP:o=this.headers[(s-1+n)%n];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[n-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),o.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var e,n=this.options,s=n.heightStyle,o=this.element.parent(),r=this.accordionId="ui-accordion-"+(this.element.attr("id")||++i);this.active=this._findActive(n.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),n=i.attr("id"),s=i.next(),o=s.attr("id");n||(n=r+"-header-"+e,i.attr("id",n)),o||(o=r+"-panel-"+e,s.attr("id",o)),i.attr("aria-controls",o),s.attr("aria-labelledby",n)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(n.event),"fill"===s?(e=o.height(),this.element.siblings(":visible").each(function(){var i=t(this),n=i.css("position");"absolute"!==n&&"fixed"!==n&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){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={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,n=this.active,s=t(e.currentTarget),o=s[0]===n[0],r=o&&i.collapsible,a=r?t():s.next(),l=n.next(),u={oldHeader:n,oldPanel:l,newHeader:r?t():s,newPanel:a};e.preventDefault(),o&&!i.collapsible||this._trigger("beforeActivate",e,u)===!1||(i.active=r?!1:this.headers.index(s),this.active=o?t():s,this._toggle(u),n.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),o||(s.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),s.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,n=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=n,this.options.animate?this._animate(i,n,e):(n.hide(),i.show(),this._toggleComplete(e)),n.attr({"aria-hidden":"true"}),n.prev().attr("aria-selected","false"),i.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(t,e,i){var o,r,a,l=this,u=0,c=t.length&&(!e.length||t.index()<e.index()),h=this.options.animate||{},d=c&&h.down||h,p=function(){l._toggleComplete(i)};return"number"==typeof d&&(a=d),"string"==typeof d&&(r=d),r=r||d.easing||h.easing,a=a||d.duration||h.duration,e.length?t.length?(o=t.show().outerHeight(),e.animate(n,{duration:a,easing:r,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(s,{duration:a,easing:r,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?u+=i.now:"content"!==l.options.heightStyle&&(i.now=Math.round(o-e.outerHeight()-u),u=0)}})):e.animate(n,a,r,p):t.animate(s,a,r,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)}})}(e),function(t,e){t.widget("ui.autocomplete",{version:"@VERSION",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,n,s=this.element[0].nodeName.toLowerCase(),o="textarea"===s,r="input"===s;this.isMultiLine=o?!0:r?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[o||r?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return e=!0,n=!0,void(i=!0);e=!1,n=!1,i=!1;var o=t.ui.keyCode;switch(s.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",s);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",s);break;case o.UP:e=!0,this._keyEvent("previous",s);break;case o.DOWN:e=!0,this._keyEvent("next",s);break;case o.ENTER:case o.NUMPAD_ENTER:this.menu.active&&(e=!0,s.preventDefault(),this.menu.select(s));break;case o.TAB:this.menu.active&&this.menu.select(s);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(s),s.preventDefault());break;default:i=!0,this._searchTimeout(s)}},keypress:function(n){if(e)return e=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&n.preventDefault());if(!i){var s=t.ui.keyCode;switch(n.keyCode){case s.PAGE_UP:this._move("previousPage",n);break;case s.PAGE_DOWN:this._move("nextPage",n);break;case s.UP:this._keyEvent("previous",n);break;case s.DOWN:this._keyEvent("next",n)}}},input:function(t){return n?(n=!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 ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-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(n){n.target===e.element[0]||n.target===i||t.contains(i,n.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 n=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:n})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value):this.liveRegion.text(n.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,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").insertBefore(this.element),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._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,n=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,n){n(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,s){n.xhr&&n.xhr.abort(),n.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){s(t)},error:function(){s([])}})}):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 e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__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();this._renderMenu(i,e),this.isNewMenu=!0,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 n=this;t.each(i,function(t,i){n._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 n=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return n.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))}})}(e),function(t,e){var i,n="ui-button ui-widget ui-state-default ui-corner-all",s="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",o=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},r=function(e){var i=e.name,n=e.form,s=t([]);return i&&(i=i.replace(/'/g,"\\'"),s=n?t(n).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),s};t.widget("ui.button",{version:"@VERSION",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,o),"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,s=this.options,a="checkbox"===this.type||"radio"===this.type,l=a?"":"ui-state-active";null===s.label&&(s.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(n).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){s.disabled||this===i&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){s.disabled||t(this).removeClass(l)}).bind("click"+this.eventNamespace,function(t){s.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),a&&this.element.bind("change"+this.eventNamespace,function(){e.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return s.disabled?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(s.disabled)return!1;t(this).addClass("ui-state-active"),e.buttonElement.attr("aria-pressed","true");var i=e.element[0];r(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 s.disabled?!1:(t(this).addClass("ui-state-active"),i=this,void e.document.one("mouseup",function(){i=null}))}).bind("mouseup"+this.eventNamespace,function(){return s.disabled?!1:void t(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(e){return s.disabled?!1:void((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+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",s.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(n+" ui-state-active "+s).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?(this.element.prop("disabled",!!e),void(e&&this.buttonElement.removeClass("ui-state-focus"))):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?r(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(s),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),n=this.options.icons,o=n.primary&&n.secondary,r=[];n.primary||n.secondary?(this.options.text&&r.push("ui-button-text-icon"+(o?"s":n.primary?"-primary":"-secondary")),n.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+n.primary+"'></span>"),n.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+n.secondary+"'></span>"),this.options.text||(r.push(o?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):r.push("ui-button-text-only"),e.addClass(r.join(" "))}}),t.widget("ui.buttonset",{version:"@VERSION",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-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")}})}(e),function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div-1-10-4",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(o.inline?e.parent()[0]:o.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function s(e,i){t.extend(e,i);for(var n in i)null==i[n]&&(e[n]=i[n]);return e}t.extend(t.ui,{datepicker:{version:"@VERSION"}});var o,r="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return s(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var n,s,o;n=e.nodeName.toLowerCase(),s="div"===n||"span"===n,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),s),o.settings=t.extend({},i||{}),"input"===n?this._connectDatepicker(e,o):s&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var n=t(e);i.append=t([]),i.trigger=t([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,r,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var n,s,o,r=this._get(i,"appendText"),a=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t("<span class='"+this._appendClass+"'>"+r+"</span>"),e[a?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),("focus"===n||"both"===n)&&e.focus(this._showDatepicker),("button"===n||"both"===n)&&(s=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:s,title:s}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:s,title:s}):s)),e[a?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,n,s,o=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,n=0,s=0;s<t.length;s++)t[s].length>i&&(i=t[s].length,n=s);return n},o.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var n=t(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),t.data(e,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,n,o,a){var l,u,c,h,d,p=this._dialogInst;return p||(this.uuid+=1,l="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+l+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],r,p)),s(p.settings,o||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(u=document.documentElement.clientWidth,c=document.documentElement.clientHeight,h=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[u/2-100+h,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],r,p),this},_destroyDatepicker:function(e){var i,n=t(e),s=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,r),"input"===i?(s.append.remove(),s.trigger.remove(),n.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&n.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,n,s=t(e),o=t.data(e,r);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(n=s.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,n,s=t(e),o=t.data(e,r);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(n=s.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_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(e){try{return t.data(e,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,n,o){var r,a,l,u,c=this._getInst(i);return 2===arguments.length&&"string"==typeof n?"defaults"===n?t.extend({},t.datepicker._defaults):c?"all"===n?t.extend({},c.settings):this._get(c,n):null:(r=n||{},"string"==typeof n&&(r={},r[n]=o),void(c&&(this._curInst===c&&this._hideDatepicker(),a=this._getDateDatepicker(i,!0),l=this._getMinMaxDate(c,"min"),u=this._getMinMaxDate(c,"max"),s(c.settings,r),null!==l&&r.dateFormat!==e&&r.minDate===e&&(c.settings.minDate=this._formatDate(c,l)),null!==u&&r.dateFormat!==e&&r.maxDate===e&&(c.settings.maxDate=this._formatDate(c,u)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,a),this._updateAlternate(c),this._updateDatepicker(c))))},_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(e){var i,n,s,o=t.datepicker._getInst(e.target),r=!0,a=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),r=!1;break;case 13:return s=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),s[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,s[0]),i=t.datepicker._get(o,"onSelect"),i?(n=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[n,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),r=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),r=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?1:-1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),r=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?-1:1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),r=e.ctrlKey||e.metaKey;break;default:r=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):r=!1;r&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,n,s=t.datepicker._getInst(e.target);return t.datepicker._get(s,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(s,"dateFormat")),n=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">n||!i||i.indexOf(n)>-1):void 0},_doKeyUp:function(e){var i,n=t.datepicker._getInst(e.target);if(n.input.val()!==n.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,t.datepicker._getFormatConfig(n)),i&&(t.datepicker._setDateFromField(n),t.datepicker._updateAlternate(n),t.datepicker._updateDatepicker(n))}catch(s){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,n,o,r,a,l,u;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(i,"beforeShow"),o=n?n.apply(e,[e,i]):{},o!==!1&&(s(i.settings,o),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),a={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),a=t.datepicker._checkOffset(i,a,r),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),i.inline||(l=t.datepicker._get(i,"showAnim"),u=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?i.dpDiv.show(l,t.datepicker._get(i,"showOptions"),u):i.dpDiv[l||"show"](l?u:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,o=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,n=this._getNumberOfMonths(e),s=n[1],r=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&e.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",r*s+"em"),e.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,n){var s=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,a=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:t(document).scrollLeft()),u=document.documentElement.clientHeight+(n?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?s-r:0,i.left-=n&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=n&&i.top===e.input.offset().top+a?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>l&&l>s?Math.abs(i.left+s-l):0),i.top-=Math.min(i.top,i.top+o>u&&u>o?Math.abs(o+a):0),i},_findPos:function(e){for(var i,n=this._getInst(e),s=this._get(n,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[s?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,n,s,o,a=this._curInst;!a||e&&a!==t.data(e,r)||this._datepickerShowing&&(i=this._get(a,"showAnim"),n=this._get(a,"duration"),s=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),n,s):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,s),i||s(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),n=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==n)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,n){var s=t(e),o=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(o,i+("M"===n?this._get(o,"showCurrentAtPos"):0),n),this._updateDatepicker(o))},_gotoToday:function(e){var i,n=t(e),s=this._getInst(n[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(n)},_selectMonthYear:function(e,i,n){var s=t(e),o=this._getInst(s[0]);o["selected"+("M"===n?"Month":"Year")]=o["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(s)},_selectDay:function(e,i,n,s){var o,r=t(e);t(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(o=this._getInst(r[0]),o.selectedDay=o.currentDay=t("a",s).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=n,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var n,s=t(e),o=this._getInst(s[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),n=this._get(o,"onSelect"),n?n.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,n,s,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),n=this._getDate(e),s=this.formatDate(i,n,this._getFormatConfig(e)),t(o).each(function(){t(this).val(s)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,n){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?i.toString():i+"",""===i)return null;var s,o,r,a,l=0,u=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof u?u:(new Date).getFullYear()%100+parseInt(u,10),h=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,d=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,_=-1,b=!1,y=function(t){var i=s+1<e.length&&e.charAt(s+1)===t;return i&&s++,i},w=function(t){var e=y(t),n="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,s=new RegExp("^\\d{1,"+n+"}"),o=i.substring(l).match(s);if(!o)throw"Missing number at position "+l;return l+=o[0].length,parseInt(o[0],10)},T=function(e,n,s){var o=-1,r=t.map(y(e)?s:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(r,function(t,e){var n=e[1];return i.substr(l,n.length).toLowerCase()===n.toLowerCase()?(o=e[0],l+=n.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},x=function(){if(i.charAt(l)!==e.charAt(s))throw"Unexpected literal at position "+l;l++};for(s=0;s<e.length;s++)if(b)"'"!==e.charAt(s)||y("'")?x():b=!1;else switch(e.charAt(s)){case"d":v=w("d");break;case"D":T("D",h,d);break;case"o":_=w("o");break;case"m":g=w("m");break;case"M":g=T("M",p,f);break;case"y":m=w("y");break;case"@":a=new Date(w("@")),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"!":a=new Date((w("!")-this._ticksTo1970)/1e4),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(l<i.length&&(r=i.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=m?0:-100)),_>-1)for(g=1,v=_;;){if(o=this._getDaysInMonth(m,g-1),o>=v)break;g++,v-=o}if(a=this._daylightSavingAdjust(new Date(m,g-1,v)),a.getFullYear()!==m||a.getMonth()+1!==g||a.getDate()!==v)throw"Invalid date";return a},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 n,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=n+1<t.length&&t.charAt(n+1)===e;return i&&n++,i},u=function(t,e,i){var n=""+e;if(l(t))for(;n.length<i;)n="0"+n;return n},c=function(t,e,i,n){return l(t)?n[e]:i[e]},h="",d=!1;if(e)for(n=0;n<t.length;n++)if(d)"'"!==t.charAt(n)||l("'")?h+=t.charAt(n):d=!1;else switch(t.charAt(n)){case"d":h+=u("d",e.getDate(),2);break;case"D":h+=c("D",e.getDay(),s,o);break;case"o":h+=u("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=u("m",e.getMonth()+1,2);break;case"M":h+=c("M",e.getMonth(),r,a);break;case"y":h+=l("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":h+=e.getTime();break;case"!":h+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?h+="'":d=!0;break;default:h+=t.charAt(n)}return h},_possibleChars:function(t){var e,i="",n=!1,s=function(i){var n=e+1<t.length&&t.charAt(e+1)===i;return n&&e++,n};for(e=0;e<t.length;e++)if(n)"'"!==t.charAt(e)||s("'")?i+=t.charAt(e):n=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":n=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),n=t.lastVal=t.input?t.input.val():null,s=this._getDefaultDate(t),o=s,r=this._getFormatConfig(t);try{o=this.parseDate(i,n,r)||s}catch(a){n=e?"":n}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=n?o.getDate():0,t.currentMonth=n?o.getMonth():0,t.currentYear=n?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,n){var s=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(n){}for(var s=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=s.getFullYear(),r=s.getMonth(),a=s.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,u=l.exec(i);u;){switch(u[2]||"d"){case"d":case"D":a+=parseInt(u[1],10);break;case"w":case"W":a+=7*parseInt(u[1],10);break;case"m":case"M":r+=parseInt(u[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,r));break;case"y":case"Y":o+=parseInt(u[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,r))}u=l.exec(i)}return new Date(o,r,a)},r=null==i||""===i?n:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?n:s(i):new Date(i.getTime());return r=r&&"Invalid Date"===r.toString()?n:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var n=!e,s=t.selectedMonth,o=t.selectedYear,r=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=r.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=r.getMonth(),t.drawYear=t.selectedYear=t.currentYear=r.getFullYear(),s===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(n?"":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(e){var i=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(n,-i,"M")},next:function(){t.datepicker._adjustDate(n,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(n)},selectDay:function(){return t.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(n,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,n,s,o,r,a,l,u,c,h,d,p,f,m,g,v,_,b,y,w,T,x,S,E,M,I,C,D,k,O,A,N,L,P,R,F,j,z,H=new Date,$=this._daylightSavingAdjust(new Date(H.getFullYear(),H.getMonth(),H.getDate())),B=this._get(t,"isRTL"),U=this._get(t,"showButtonPanel"),W=this._get(t,"hideIfNoPrevNext"),V=this._get(t,"navigationAsDateFormat"),K=this._getNumberOfMonths(t),q=this._get(t,"showCurrentAtPos"),Y=this._get(t,"stepMonths"),X=1!==K[0]||1!==K[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-q,tt=t.drawYear;if(0>Z&&(Z+=12,tt--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-K[0]*K[1]+1,J.getDate())),e=Q&&Q>e?Q:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)Z--,0>Z&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,i=this._get(t,"prevText"),i=V?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,Z-Y,1)),this._getFormatConfig(t)):i,n=this._canAdjustMonth(t,-1,tt,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>":W?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>",s=this._get(t,"nextText"),s=V?this.formatDate(s,this._daylightSavingAdjust(new Date(tt,Z+Y,1)),this._getFormatConfig(t)):s,o=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+s+"</span></a>":W?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+s+"</span></a>",r=this._get(t,"currentText"),a=this._get(t,"gotoCurrent")&&t.currentDay?G:$,r=V?this.formatDate(r,a,this._getFormatConfig(t)):r,l=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>",u=U?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(B?l:"")+(this._isInRange(t,a)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(B?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,h=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),m=this._get(t,"monthNamesShort"),g=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",T=0;T<K[0];T++){for(x="",this.maxRows=4,S=0;S<K[1];S++){if(E=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),M=" ui-corner-all",I="",X){if(I+="<div class='ui-datepicker-group",K[1]>1)switch(S){case 0:I+=" ui-datepicker-group-first",M=" ui-corner-"+(B?"right":"left");break;case K[1]-1:I+=" ui-datepicker-group-last",M=" ui-corner-"+(B?"left":"right");break;default:I+=" ui-datepicker-group-middle",M=""}I+="'>"}for(I+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+M+"'>"+(/all|left/.test(M)&&0===T?B?o:n:"")+(/all|right/.test(M)&&0===T?B?n:o:"")+this._generateMonthYearHeader(t,Z,tt,Q,J,T>0||S>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",C=h?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)D=(w+c)%7,C+="<th"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[D]+"'>"+p[D]+"</span></th>";for(I+=C+"</tr></thead><tbody>",k=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,k)),O=(this._getFirstDayOfMonth(tt,Z)-c+7)%7,A=Math.ceil((O+k)/7),N=X&&this.maxRows>A?this.maxRows:A,this.maxRows=N,L=this._daylightSavingAdjust(new Date(tt,Z,1-O)),P=0;N>P;P++){for(I+="<tr>",R=h?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(L)+"</td>":"",w=0;7>w;w++)F=g?g.apply(t.input?t.input[0]:null,[L]):[!0,""],j=L.getMonth()!==Z,z=j&&!_||!F[0]||Q&&Q>L||J&&L>J,R+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(j?" ui-datepicker-other-month":"")+(L.getTime()===E.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===L.getTime()&&b.getTime()===E.getTime()?" "+this._dayOverClass:"")+(z?" "+this._unselectableClass+" ui-state-disabled":"")+(j&&!v?"":" "+F[1]+(L.getTime()===G.getTime()?" "+this._currentClass:"")+(L.getTime()===$.getTime()?" ui-datepicker-today":""))+"'"+(j&&!v||!F[2]?"":" title='"+F[2].replace(/'/g,"&#39;")+"'")+(z?"":" data-handler='selectDay' data-event='click' data-month='"+L.getMonth()+"' data-year='"+L.getFullYear()+"'")+">"+(j&&!v?"&#xa0;":z?"<span class='ui-state-default'>"+L.getDate()+"</span>":"<a class='ui-state-default"+(L.getTime()===$.getTime()?" ui-state-highlight":"")+(L.getTime()===G.getTime()?" ui-state-active":"")+(j?" ui-priority-secondary":"")+"' href='#'>"+L.getDate()+"</a>")+"</td>",L.setDate(L.getDate()+1),L=this._daylightSavingAdjust(L);I+=R+"</tr>"}Z++,Z>11&&(Z=0,tt++),I+="</tbody></table>"+(X?"</div>"+(K[0]>0&&S===K[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=I}y+=x}return y+=u,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,n,s,o,r,a){var l,u,c,h,d,p,f,m,g=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!g)y+="<span class='ui-datepicker-month'>"+r[e]+"</span>";else{
  for(l=n&&n.getFullYear()===i,u=s&&s.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!l||c>=n.getMonth())&&(!u||c<=s.getMonth())&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+a[c]+"</option>");y+="</select>"}if(_||(b+=y+(!o&&g&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(h=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(h[0]),m=Math.max(f,p(h[1]||"")),f=n?Math.max(f,n.getFullYear()):f,m=s?Math.min(m,s.getFullYear()):m,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!o&&g&&v?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var n=t.drawYear+("Y"===i?e:0),s=t.drawMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(n,s))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(n,s,o)));t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),n=this._getMinMaxDate(t,"max"),s=i&&i>e?i:e;return n&&s>n?n:s},_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,n){var s=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,n+(0>e?e:s[0]*s[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,n,s=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),r=null,a=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),r=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=n),i[1].match(/[+\-].*/)&&(a+=n)),(!s||e.getTime()>=s.getTime())&&(!o||e.getTime()<=o.getTime())&&(!r||e.getFullYear()>=r)&&(!a||e.getFullYear()<=a)},_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,n){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var s=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(n,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),s,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t("<div class='visualizejs'></div>").append(t.datepicker.dpDiv));var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="@VERSION"}(e),function(t,e){var i={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:"@VERSION",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,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;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).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},disable:t.noop,enable:t.noop,close:function(e){var i,n=this;if(this._isOpen&&this._trigger("beforeClose",e)!==!1){if(this._isOpen=!1,this._destroyOverlay(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&t(i).blur()}catch(s){}this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",e)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),void this._trigger("open"))},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),n=i.filter(":first"),s=i.filter(":last");e.target!==s[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==n[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(s.focus(1),e.preventDefault()):(n.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(t.each(i,function(i,n){var s,o;n=t.isFunction(n)?{click:n,text:i}:n,n=t.extend({type:"button"},n),s=n.click,n.click=function(){s.apply(e.element[0],arguments)},o={icons:n.icons,text:n.showText},delete n.icons,delete n.showText,t("<button></button>",n).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,s){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",n,e(s))},drag:function(t,n){i._trigger("drag",t,e(n))},stop:function(s,o){n.position=[o.position.left-i.document.scrollLeft(),o.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",s,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,n=this.options,s=n.resizable,o=this.uiDialog.css("position"),r="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:r,start:function(n,s){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",n,e(s))},resize:function(t,n){i._trigger("resize",t,e(n))},stop:function(s,o){n.height=t(this).height(),n.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",s,e(o))}}).css("position",o)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var s=this,o=!1,r={};t.each(e,function(t,e){s._setOption(t,e),t in i&&(o=!0),t in n&&(r[t]=e)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(t,e){var i,n,s=this.uiDialog;"dialogClass"===t&&s.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=s.is(":data(ui-draggable)"),i&&!e&&s.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(n=s.is(":data(ui-resizable)"),n&&!e&&s.resizable("destroy"),n&&"string"==typeof e&&s.resizable("option","handles",e),n||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),e=Math.max(0,n.minHeight-t),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none","auto"===n.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(n){e._allowInteraction(n)||(n.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,n=[],s=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(n=i.split?i.split(" "):[i[0],i[1]],1===n.length&&(n[1]=n[0]),t.each(["left","top"],function(t,e){+n[t]===n[t]&&(s[t]=n[t],n[t]=e)}),i={my:n[0]+(s[0]<0?s[0]:"+"+s[0])+" "+n[1]+(s[1]<0?s[1]:"+"+s[1]),at:n.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})}(e),function(t,e){var i=/up|down|vertical/,n=/up|left|vertical|horizontal/;t.effects.effect.blind=function(e,s){var o,r,a,l=t(this),u=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(l,e.mode||"hide"),h=e.direction||"up",d=i.test(h),p=d?"height":"width",f=d?"top":"left",m=n.test(h),g={},v="show"===c;l.parent().is(".ui-effects-wrapper")?t.effects.save(l.parent(),u):t.effects.save(l,u),l.show(),o=t.effects.createWrapper(l).css({overflow:"hidden"}),r=o[p](),a=parseFloat(o.css(f))||0,g[p]=v?r:0,m||(l.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),g[f]=v?a:r+a),v&&(o.css(p,0),m||o.css(f,a+r)),o.animate(g,{duration:e.duration,easing:e.easing,queue:!1,complete:function(){"hide"===c&&l.hide(),t.effects.restore(l,u),t.effects.removeWrapper(l),s()}})}}(e),function(t,e){t.effects.effect.bounce=function(e,i){var n,s,o,r=t(this),a=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(r,e.mode||"effect"),u="hide"===l,c="show"===l,h=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||u?1:0),m=e.duration/f,g=e.easing,v="up"===h||"down"===h?"top":"left",_="up"===h||"left"===h,b=r.queue(),y=b.length;for((c||u)&&a.push("opacity"),t.effects.save(r,a),r.show(),t.effects.createWrapper(r),d||(d=r["top"===v?"outerHeight":"outerWidth"]()/3),c&&(o={opacity:1},o[v]=0,r.css("opacity",0).css(v,_?2*-d:2*d).animate(o,m,g)),u&&(d/=Math.pow(2,p-1)),o={},o[v]=0,n=0;p>n;n++)s={},s[v]=(_?"-=":"+=")+d,r.animate(s,m,g).animate(o,m,g),d=u?2*d:d/2;u&&(s={opacity:0},s[v]=(_?"-=":"+=")+d,r.animate(s,m,g)),r.queue(function(){u&&r.hide(),t.effects.restore(r,a),t.effects.removeWrapper(r),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),r.dequeue()}}(e),function(t,e){t.effects.effect.clip=function(e,i){var n,s,o,r=t(this),a=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(r,e.mode||"hide"),u="show"===l,c=e.direction||"vertical",h="vertical"===c,d=h?"height":"width",p=h?"top":"left",f={};t.effects.save(r,a),r.show(),n=t.effects.createWrapper(r).css({overflow:"hidden"}),s="IMG"===r[0].tagName?n:r,o=s[d](),u&&(s.css(d,0),s.css(p,o/2)),f[d]=u?o:0,f[p]=u?0:o/2,s.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){u||r.hide(),t.effects.restore(r,a),t.effects.removeWrapper(r),i()}})}}(e),function(t,e){t.effects.effect.drop=function(e,i){var n,s=t(this),o=["position","top","bottom","left","right","opacity","height","width"],r=t.effects.setMode(s,e.mode||"hide"),a="show"===r,l=e.direction||"left",u="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",h={opacity:a?1:0};t.effects.save(s,o),s.show(),t.effects.createWrapper(s),n=e.distance||s["top"===u?"outerHeight":"outerWidth"](!0)/2,a&&s.css("opacity",0).css(u,"pos"===c?-n:n),h[u]=(a?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+n,s.animate(h,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===r&&s.hide(),t.effects.restore(s,o),t.effects.removeWrapper(s),i()}})}}(e),function(t,e){t.effects.effect.explode=function(e,i){function n(){b.push(this),b.length===h*d&&s()}function s(){p.css({visibility:"visible"}),t(b).remove(),m||p.hide(),i()}var o,r,a,l,u,c,h=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=h,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/h),b=[];for(o=0;h>o;o++)for(l=g.top+o*_,c=o-(h-1)/2,r=0;d>r;r++)a=g.left+r*v,u=r-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-r*v,top:-o*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:a+(m?u*v:0),top:l+(m?c*_:0),opacity:m?0:1}).animate({left:a+(m?0:u*v),top:l+(m?0:c*_),opacity:m?1:0},e.duration||500,e.easing,n)}}(e),function(t,e){t.effects.effect.fade=function(e,i){var n=t(this),s=t.effects.setMode(n,e.mode||"toggle");n.animate({opacity:s},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}}(e),function(t,e){t.effects.effect.fold=function(e,i){var n,s,o=t(this),r=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(o,e.mode||"hide"),l="show"===a,u="hide"===a,c=e.size||15,h=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=l!==d,f=p?["width","height"]:["height","width"],m=e.duration/2,g={},v={};t.effects.save(o,r),o.show(),n=t.effects.createWrapper(o).css({overflow:"hidden"}),s=p?[n.width(),n.height()]:[n.height(),n.width()],h&&(c=parseInt(h[1],10)/100*s[u?0:1]),l&&n.css(d?{height:0,width:c}:{height:c,width:0}),g[f[0]]=l?s[0]:c,v[f[1]]=l?s[1]:0,n.animate(g,m,e.easing).animate(v,m,e.easing,function(){u&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()})}}(e),function(t,e){t.effects.effect.highlight=function(e,i){var n=t(this),s=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(n,e.mode||"show"),r={backgroundColor:n.css("backgroundColor")};"hide"===o&&(r.opacity=0),t.effects.save(n,s),n.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,s),i()}})}}(e),function(t,e){t.effects.effect.pulsate=function(e,i){var n,s=t(this),o=t.effects.setMode(s,e.mode||"show"),r="show"===o,a="hide"===o,l=r||"hide"===o,u=2*(e.times||5)+(l?1:0),c=e.duration/u,h=0,d=s.queue(),p=d.length;for((r||!s.is(":visible"))&&(s.css("opacity",0).show(),h=1),n=1;u>n;n++)s.animate({opacity:h},c,e.easing),h=1-h;s.animate({opacity:h},c,e.easing),s.queue(function(){a&&s.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,u+1))),s.dequeue()}}(e),function(t,e){t.effects.effect.puff=function(e,i){var n=t(this),s=t.effects.setMode(n,e.mode||"hide"),o="hide"===s,r=parseInt(e.percent,10)||150,a=r/100,l={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:s,complete:i,percent:o?r:100,from:o?l:{height:l.height*a,width:l.width*a,outerHeight:l.outerHeight*a,outerWidth:l.outerWidth*a}}),n.effect(e)},t.effects.effect.scale=function(e,i){var n=t(this),s=t.extend(!0,{},e),o=t.effects.setMode(n,e.mode||"effect"),r=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===o?0:100),a=e.direction||"both",l=e.origin,u={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()},c={y:"horizontal"!==a?r/100:1,x:"vertical"!==a?r/100:1};s.effect="size",s.queue=!1,s.complete=i,"effect"!==o&&(s.origin=l||["middle","center"],s.restore=!0),s.from=e.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:u),s.to={height:u.height*c.y,width:u.width*c.x,outerHeight:u.outerHeight*c.y,outerWidth:u.outerWidth*c.x},s.fade&&("show"===o&&(s.from.opacity=0,s.to.opacity=1),"hide"===o&&(s.from.opacity=1,s.to.opacity=0)),n.effect(s)},t.effects.effect.size=function(e,i){var n,s,o,r=t(this),a=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],u=["width","height","overflow"],c=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(r,e.mode||"effect"),f=e.restore||"effect"!==p,m=e.scale||"both",g=e.origin||["middle","center"],v=r.css("position"),_=f?a:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&r.show(),n={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()},"toggle"===e.mode&&"show"===p?(r.from=e.to||b,r.to=e.from||n):(r.from=e.from||("show"===p?b:n),r.to=e.to||("hide"===p?b:n)),o={from:{y:r.from.height/n.height,x:r.from.width/n.width},to:{y:r.to.height/n.height,x:r.to.width/n.width}},("box"===m||"both"===m)&&(o.from.y!==o.to.y&&(_=_.concat(h),r.from=t.effects.setTransition(r,h,o.from.y,r.from),r.to=t.effects.setTransition(r,h,o.to.y,r.to)),o.from.x!==o.to.x&&(_=_.concat(d),r.from=t.effects.setTransition(r,d,o.from.x,r.from),r.to=t.effects.setTransition(r,d,o.to.x,r.to))),("content"===m||"both"===m)&&o.from.y!==o.to.y&&(_=_.concat(c).concat(u),r.from=t.effects.setTransition(r,c,o.from.y,r.from),r.to=t.effects.setTransition(r,c,o.to.y,r.to)),t.effects.save(r,_),r.show(),t.effects.createWrapper(r),r.css("overflow","hidden").css(r.from),g&&(s=t.effects.getBaseline(g,n),r.from.top=(n.outerHeight-r.outerHeight())*s.y,r.from.left=(n.outerWidth-r.outerWidth())*s.x,r.to.top=(n.outerHeight-r.to.outerHeight)*s.y,r.to.left=(n.outerWidth-r.to.outerWidth)*s.x),r.css(r.from),("content"===m||"both"===m)&&(h=h.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),u=a.concat(h).concat(d),r.find("*[width]").each(function(){var i=t(this),n={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,u),i.from={height:n.height*o.from.y,width:n.width*o.from.x,outerHeight:n.outerHeight*o.from.y,outerWidth:n.outerWidth*o.from.x},i.to={height:n.height*o.to.y,width:n.width*o.to.x,outerHeight:n.height*o.to.y,outerWidth:n.width*o.to.x},o.from.y!==o.to.y&&(i.from=t.effects.setTransition(i,h,o.from.y,i.from),i.to=t.effects.setTransition(i,h,o.to.y,i.to)),o.from.x!==o.to.x&&(i.from=t.effects.setTransition(i,d,o.from.x,i.from),i.to=t.effects.setTransition(i,d,o.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,u)})})),r.animate(r.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===r.to.opacity&&r.css("opacity",r.from.opacity),"hide"===p&&r.hide(),t.effects.restore(r,_),f||("static"===v?r.css({position:"relative",top:r.to.top,left:r.to.left}):t.each(["top","left"],function(t,e){r.css(e,function(e,i){var n=parseInt(i,10),s=t?r.to.left:r.to.top;return"auto"===i?s+"px":n+s+"px"})})),t.effects.removeWrapper(r),i()}})}}(e),function(t,e){t.effects.effect.shake=function(e,i){var n,s=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(s,e.mode||"effect"),a=e.direction||"left",l=e.distance||20,u=e.times||3,c=2*u+1,h=Math.round(e.duration/c),d="up"===a||"down"===a?"top":"left",p="up"===a||"left"===a,f={},m={},g={},v=s.queue(),_=v.length;for(t.effects.save(s,o),s.show(),t.effects.createWrapper(s),f[d]=(p?"-=":"+=")+l,m[d]=(p?"+=":"-=")+2*l,g[d]=(p?"-=":"+=")+2*l,s.animate(f,h,e.easing),n=1;u>n;n++)s.animate(m,h,e.easing).animate(g,h,e.easing);s.animate(m,h,e.easing).animate(f,h/2,e.easing).queue(function(){"hide"===r&&s.hide(),t.effects.restore(s,o),t.effects.removeWrapper(s),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),s.dequeue()}}(e),function(t,e){t.effects.effect.slide=function(e,i){var n,s=t(this),o=["position","top","bottom","left","right","width","height"],r=t.effects.setMode(s,e.mode||"show"),a="show"===r,l=e.direction||"left",u="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,h={};t.effects.save(s,o),s.show(),n=e.distance||s["top"===u?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(s).css({overflow:"hidden"}),a&&s.css(u,c?isNaN(n)?"-"+n:-n:n),h[u]=(a?c?"+=":"-=":c?"-=":"+=")+n,s.animate(h,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===r&&s.hide(),t.effects.restore(s,o),t.effects.removeWrapper(s),i()}})}}(e),function(t,e){t.effects.effect.transfer=function(e,i){var n=t(this),s=t(e.to),o="fixed"===s.css("position"),r=t("body"),a=o?r.scrollTop():0,l=o?r.scrollLeft():0,u=s.offset(),c={top:u.top-a,left:u.left-l,height:s.innerHeight(),width:s.innerWidth()},h=n.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:h.top-a,left:h.left-l,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}}(e),function(t,e){t.widget("ui.menu",{version:"@VERSION",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.mouseHandled=!1,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 i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){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),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().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 n,s,o,r,a,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,s=this.previousFilter||"",o=String.fromCharCode(e.keyCode),r=!1,clearTimeout(this.filterTimer),o===s?r=!0:o=s+o,a=new RegExp("^"+i(o),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(t(this).children("a").text())}),n=r&&-1!==n.index(this.active.next())?this.active.nextAll(".ui-menu-item"):n,n.length||(o=String.fromCharCode(e.keyCode),a=new RegExp("^"+i(o),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(t(this).children("a").text())})),n.length?(this.focus(e,n),n.length>1?(this.previousFilter=o,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,n=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),n.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),n=e.prev("a"),s=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);n.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",n.attr("id"))}),
  e=n.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);/[^\-\u2014\u2013\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]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",n.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&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,n,s,o,r,a;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,s=e.offset().top-this.activeMenu.offset().top-i-n,o=this.activeMenu.scrollTop(),r=this.activeMenu.height(),a=e.height(),0>s?this.activeMenu.scrollTop(o+s):s+a>r&&this.activeMenu.scrollTop(o+s-r+a))},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 n=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(e),this.activeMenu=n},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 n;this.active&&(n="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,n)},nextPage:function(e){var i,n,s;return this.active?void(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n-s<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,n,s;return this.active?void(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n+s>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)}})}(e),function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function n(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,r=Math.max,a=Math.abs,l=Math.round,u=/left|center|right/,c=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(o!==e)return o;var i,n,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=s.children()[0];return t("body").append(s),i=r.offsetWidth,s.css("overflow","scroll"),n=r.offsetWidth,i===n&&(n=s[0].clientWidth),s.remove(),o=i-n},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),s="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:s?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),n=t.isWindow(i[0]),s=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:n,isDocument:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n?i.width():i.outerWidth(),height:n?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var o,p,m,g,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),T=(e.collision||"flip").split(" "),x={};return _=s(b),b[0].preventDefault&&(e.at="left top"),p=_.width,m=_.height,g=_.offset,v=t.extend({},g),t.each(["my","at"],function(){var t,i,n=(e[this]||"").split(" ");1===n.length&&(n=u.test(n[0])?n.concat(["center"]):c.test(n[0])?["center"].concat(n):["center","center"]),n[0]=u.test(n[0])?n[0]:"center",n[1]=c.test(n[1])?n[1]:"center",t=h.exec(n[0]),i=h.exec(n[1]),x[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(n[0])[0],d.exec(n[1])[0]]}),1===T.length&&(T[1]=T[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=m:"center"===e.at[1]&&(v.top+=m/2),o=i(x.at,p,m),v.left+=o[0],v.top+=o[1],this.each(function(){var s,u,c=t(this),h=c.outerWidth(),d=c.outerHeight(),f=n(this,"marginLeft"),_=n(this,"marginTop"),S=h+f+n(this,"marginRight")+w.width,E=d+_+n(this,"marginBottom")+w.height,M=t.extend({},v),I=i(x.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?M.left-=h:"center"===e.my[0]&&(M.left-=h/2),"bottom"===e.my[1]?M.top-=d:"center"===e.my[1]&&(M.top-=d/2),M.left+=I[0],M.top+=I[1],t.support.offsetFractions||(M.left=l(M.left),M.top=l(M.top)),s={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,n){t.ui.position[T[i]]&&t.ui.position[T[i]][n](M,{targetWidth:p,targetHeight:m,elemWidth:h,elemHeight:d,collisionPosition:s,collisionWidth:S,collisionHeight:E,offset:[o[0]+I[0],o[1]+I[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(u=function(t){var i=g.left-M.left,n=i+p-h,s=g.top-M.top,o=s+m-d,l={target:{element:b,left:g.left,top:g.top,width:p,height:m},element:{element:c,left:M.left,top:M.top,width:h,height:d},horizontal:0>n?"left":i>0?"right":"center",vertical:0>o?"top":s>0?"bottom":"middle"};h>p&&a(i+n)<p&&(l.horizontal="center"),d>m&&a(s+o)<m&&(l.vertical="middle"),r(a(i),a(n))>r(a(s),a(o))?l.important="horizontal":l.important="vertical",e.using.call(this,t,l)}),c.offset(t.extend(M,{using:u}))})},t.ui.position={fit:{left:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollLeft:n.offset.left,o=n.width,a=t.left-e.collisionPosition.marginLeft,l=s-a,u=a+e.collisionWidth-o-s;e.collisionWidth>o?l>0&&0>=u?(i=t.left+l+e.collisionWidth-o-s,t.left+=l-i):u>0&&0>=l?t.left=s:l>u?t.left=s+o-e.collisionWidth:t.left=s:l>0?t.left+=l:u>0?t.left-=u:t.left=r(t.left-a,t.left)},top:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,a=t.top-e.collisionPosition.marginTop,l=s-a,u=a+e.collisionHeight-o-s;e.collisionHeight>o?l>0&&0>=u?(i=t.top+l+e.collisionHeight-o-s,t.top+=l-i):u>0&&0>=l?t.top=s:l>u?t.top=s+o-e.collisionHeight:t.top=s:l>0?t.top+=l:u>0?t.top-=u:t.top=r(t.top-a,t.top)}},flip:{left:function(t,e){var i,n,s=e.within,o=s.offset.left+s.scrollLeft,r=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,u=t.left-e.collisionPosition.marginLeft,c=u-l,h=u+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||i<a(c))&&(t.left+=d+p+f)):h>0&&(n=t.left-e.collisionPosition.marginLeft+d+p+f-l,(n>0||a(n)<h)&&(t.left+=d+p+f))},top:function(t,e){var i,n,s=e.within,o=s.offset.top+s.scrollTop,r=s.height,l=s.isWindow?s.scrollTop:s.offset.top,u=t.top-e.collisionPosition.marginTop,c=u-l,h=u+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(n=t.top+p+f+m+e.collisionHeight-r-o,t.top+p+f+m>c&&(0>n||n<a(c))&&(t.top+=p+f+m)):h>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-l,t.top+p+f+m>h&&(i>0||a(i)<h)&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,n,s,o,r=document.getElementsByTagName("body")[0],a=document.createElement("div");e=document.createElement(r?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&t.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in n)e.style[o]=n[o];e.appendChild(a),i=r||document.documentElement,i.insertBefore(e,i.firstChild),a.style.cssText="position: absolute; left: 10.7432222px;",s=t(a).offset().left,t.support.offsetFractions=s>10&&11>s,e.innerHTML="",i.removeChild(e)}()}(e),function(t,e){t.widget("ui.progressbar",{version:"@VERSION",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),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.options.value:(this.options.value=this._constrainedValue(t),void this._refreshValue())},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})}(e),function(t,e){var i=5;t.widget("ui.slider",t.ui.mouse,{version:"@VERSION",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){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"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,n=this.options,s=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(i=n.values&&n.values.length||1,s.length>i&&(s.slice(i).remove(),s=s.slice(0,i)),e=s.length;i>e;e++)r.push(o);this.handles=s.add(t(r.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,n,s,o,r,a,l,u,c=this,h=this.options;return h.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(i),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(n-c.values(e));(s>i||s===i&&(e===c._lastChangedValue||c.values(e)===h.min))&&(s=i,o=t(this),r=e)}),a=this._start(e,r),a===!1?!1:(this._mouseSliding=!0,this._handleIndex=r,o.addClass("ui-state-active").focus(),l=o.offset(),u=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=u?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,r,n),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,n,s,o;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)),n=i/e,n>1&&(n=1),0>n&&(n=0),"vertical"===this.orientation&&(n=1-n),s=this._valueMax()-this._valueMin(),o=this._valueMin()+n*s,this._trimAlignValue(o)},_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 n,s,o;this.options.values&&this.options.values.length?(n=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>n||1===e&&n>i)&&(i=n),i!==this.values(e)&&(s=this.values(),s[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:s}),n=this.values(e?0:1),o!==!1&&this.values(e,i))):i!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:i}),o!==!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._lastChangedValue=e,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 n,s,o;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(n=this.options.values,s=arguments[0],o=0;o<n.length;o+=1)n[o]=this._trimAlignValue(s[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var n,s=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(s=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){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(),n=0;s>n;n+=1)this._change(null,n);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,n;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_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,n=t-i;return 2*Math.abs(i)>=e&&(n+=i>0?e:-e),parseFloat(n.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,n,s,o,r=this.options.range,a=this.options,l=this,u=this._animateOff?!1:a.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[u?"animate":"css"](c,a.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[u?"animate":"css"]({left:i+"%"},a.animate),1===n&&l.range[u?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===n&&l.range.stop(1,1)[u?"animate":"css"]({bottom:i+"%"},a.animate),1===n&&l.range[u?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(n=this.value(),s=this._valueMin(),o=this._valueMax(),i=o!==s?(n-s)/(o-s)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[u?"animate":"css"](c,a.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:i+"%"},a.animate),"max"===r&&"horizontal"===this.orientation&&this.range[u?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:a.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:i+"%"},a.animate),"max"===r&&"vertical"===this.orientation&&this.range[u?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:a.animate}))},_handleEvents:{keydown:function(e){var n,s,o,r,a=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"),n=this._start(e,a),n===!1))return}switch(r=this.options.step,s=o=this.options.values&&this.options.values.length?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:o=this._valueMin();break;case t.ui.keyCode.END:o=this._valueMax();break;case t.ui.keyCode.PAGE_UP:o=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/i);break;case t.ui.keyCode.PAGE_DOWN:o=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/i);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;o=this._trimAlignValue(s+r);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;o=this._trimAlignValue(s-r)}this._slide(e,a,o)},click:function(t){t.preventDefault()},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"))}}})}(e),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:"@VERSION",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._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,n){var s=i.attr(n);void 0!==s&&s.length&&(e[n]=s)}),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._stop(),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=n,this._delay(function(){this.previous=n}))}var n;n=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){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e):void 0},"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,n=t.ui.keyCode;switch(e.keyCode){case n.UP:return this._repeat(null,1,e),!0;case n.DOWN:return this._repeat(null,-1,e),!0;case n.PAGE_UP:return this._repeat(null,i.page,e),!0;case n.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+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_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-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,n=this.options;return e=null!==n.min?n.min:0,i=t-e,i=Math.round(i/n.step)*n.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==n.max&&t>n.max?n.max:null!==n.min&&t<n.min?n.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)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),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._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},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}})}(e),function(t,e){function i(){return++s}function n(t){return t=t.cloneNode(!1),t.hash.length>1&&decodeURIComponent(t.href.replace(o,""))===decodeURIComponent(location.href.replace(o,""))}var s=0,o=/#.*$/;t.widget("ui.tabs",{version:"@VERSION",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;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(),i.active=this._initialActive(),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(i.active):this.active=t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===e&&(n&&this.tabs.each(function(i,s){return t(s).attr("aria-controls")===n?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=i?!1:0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_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"),n=this.tabs.index(i),s=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:s=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n);case t.ui.keyCode.ENTER:return e.preventDefault(),
  clearTimeout(this.activating),void this._activate(n===this.options.active?!1:n);default:return}e.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,s),e.ctrlKey||(i.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},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 n(){return e>s&&(e=0),0>e&&(e=s),e}for(var s=this.tabs.length-1;-1!==t.inArray(n(),this.options.disabled);)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,s){var o,r,a,l=t(s).uniqueId().attr("id"),u=t(s).closest("li"),c=u.attr("aria-controls");n(s)?(o=s.hash,r=e.element.find(e._sanitizeSelector(o))):(a=e._tabId(u),o="#"+a,r=e.element.find(o),r.length||(r=e._createPanel(a),r.insertAfter(e.panels[i-1]||e.tablist)),r.attr("aria-live","polite")),r.length&&(e.panels=e.panels.add(r)),c&&u.data("ui-tabs-aria-controls",c),u.attr({"aria-controls":o.substring(1),"aria-labelledby":l}),r.attr("aria-labelledby",l)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.tablist||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,n=0;i=this.tabs[n];n++)e===!0||-1!==t.inArray(n,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).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,n=this.element.parent();"fill"===e?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),n=e.css("position");"absolute"!==n&&"fixed"!==n&&(i-=e.outerHeight(!0))}),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,n=this.active,s=t(e.currentTarget),o=s.closest("li"),r=o[0]===n[0],a=r&&i.collapsible,l=a?t():this._getPanelForTab(o),u=n.length?this._getPanelForTab(n):t(),c={oldTab:n,oldPanel:u,newTab:a?t():o,newPanel:l};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||r&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=a?!1:this.tabs.index(o),this.active=r?t():o,this.xhr&&this.xhr.abort(),u.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function n(){o.running=!1,o._trigger("activate",e,i)}function s(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),r.length&&o.options.show?o._show(r,o.options.show,n):(r.show(),n())}var o=this,r=i.newPanel,a=i.oldPanel;this.running=!0,a.length&&this.options.hide?this._hide(a,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),a.hide(),s()),a.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),r.length&&a.length?i.oldTab.attr("tabIndex",-1):r.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),r.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,n=this._findActive(e);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.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").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).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var n=this.options.disabled;n!==!1&&(i===e?n=!1:(i=this._getIndex(i),n=t.isArray(n)?t.map(n,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(n))},disable:function(i){var n=this.options.disabled;if(n!==!0){if(i===e)n=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,n))return;n=t.isArray(n)?t.merge([i],n).sort():[i]}this._setupDisabled(n)}},load:function(e,i){e=this._getIndex(e);var s=this,o=this.tabs.eq(e),r=o.find(".ui-tabs-anchor"),a=this._getPanelForTab(o),l={tab:o,panel:a};n(r[0])||(this.xhr=t.ajax(this._ajaxSettings(r,i,l)),this.xhr&&"canceled"!==this.xhr.statusText&&(o.addClass("ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){a.html(t),s._trigger("load",i,l)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&s.panels.stop(!1,!0),o.removeClass("ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr},1)})))},_ajaxSettings:function(e,i,n){var s=this;return{url:e.attr("href"),beforeSend:function(e,o){return s._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},n))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(e),function(t){function e(e,i){var n=(e.attr("aria-describedby")||"").split(/\s+/);n.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(n.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),n=(e.attr("aria-describedby")||"").split(/\s+/),s=t.inArray(i,n);-1!==s&&n.splice(s,1),e.removeData("ui-tooltip-id"),n=t.trim(n.join(" ")),n?e.attr("aria-describedby",n):e.removeAttr("aria-describedby")}var n=0;t.widget("ui.tooltip",{version:"@VERSION",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},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 n=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){n._updateContent(e)})))},_disable:function(){var e=this;t.each(this.tooltips,function(i,n){var s=t.Event("blur");s.target=s.currentTarget=n[0],e.close(s,!0)}),this.element.find(this.options.items).addBack().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).addBack().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,n=t(e?e.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&n.parents().each(function(){var e,n=t(this);n.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))}),this._updateContent(n,e))},_updateContent:function(t,e){var i,n=this.options.content,s=this,o=e?e.type:null;return"string"==typeof n?this._open(e,t,n):(i=n.call(t[0],function(i){t.data("ui-tooltip-open")&&s._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),void(i&&this._open(e,t,i)))},_open:function(i,n,s){function o(t){u.of=t,r.is(":hidden")||r.position(u)}var r,a,l,u=t.extend({},this.options.position);if(s){if(r=this._find(n),r.length)return void r.find(".ui-tooltip-content").html(s);n.is("[title]")&&(i&&"mouseover"===i.type?n.attr("title",""):n.removeAttr("title")),r=this._tooltip(n),e(n,r.attr("id")),r.find(".ui-tooltip-content").html(s),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):r.position(t.extend({of:n},this.options.position)),r.hide(),this._show(r,this.options.show),this.options.show&&this.options.show.delay&&(l=this.delayedShow=setInterval(function(){r.is(":visible")&&(o(u.of),clearInterval(l))},t.fx.interval)),this._trigger("open",i,{tooltip:r}),a={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=n[0],this.close(i,!0)}},remove:function(){this._removeTooltip(r)}},i&&"mouseover"!==i.type||(a.mouseleave="close"),i&&"focusin"!==i.type||(a.focusout="close"),this._on(!0,n,a)}},close:function(e){var n=this,s=t(e?e.currentTarget:this.element),o=this._find(s);this.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&s.attr("title",s.data("ui-tooltip-title")),i(s),o.stop(!0),this._hide(o,this.options.hide,function(){n._removeTooltip(t(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"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 n.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+n++,s=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(s),s.appendTo(this.document[0].body),this.tooltips[i]=e,s},_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,n){var s=t.Event("blur");s.target=s.currentTarget=n[0],e.close(s,!0),t("#"+i).remove(),n.data("ui-tooltip-title")&&(n.attr("title",n.data("ui-tooltip-title")),n.removeData("ui-tooltip-title"))})}})}(e),e}),define("jquery.timepicker.original",["require","jquery.ui"],function(require){var jQuery=require("jquery.ui");return function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"1.3"}});var Timepicker=function(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",defaultValue:null,parse:"strict"},$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(t){return extendRemove(this._defaults,t||{}),this},_newInst:function($input,o){var tp_inst=new Timepicker,inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults)if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue)try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}overrides={beforeShow:function(t,e){return $.isFunction(tp_inst._defaults.evnts.beforeShow)?tp_inst._defaults.evnts.beforeShow.call($input[0],t,e,tp_inst):void 0},onChangeMonthYear:function(t,e,i){tp_inst._updateDateTime(i),$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],t,e,i,tp_inst)},onClose:function(t,e){tp_inst.timeDefined===!0&&""!==$input.val()&&tp_inst._updateDateTime(e),$.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],t,e,tp_inst)}};for(i in overrides)overrides.hasOwnProperty(i)&&(fns[i]=o[i]||null);tp_inst._defaults=$.extend({},this._defaults,inlineSettings,o,overrides,{evnts:fns,timepicker:tp_inst}),tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(t){return t.toUpperCase()}),tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(t){return t.toUpperCase()}),tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:"")),"string"==typeof tp_inst._defaults.controlType?("slider"==tp_inst._defaults.controlType&&"undefined"==typeof $.ui.slider&&(tp_inst._defaults.controlType="select"),tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]):tp_inst.control=tp_inst._defaults.controlType;var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];null!==tp_inst._defaults.timezoneList&&(timezoneList=tp_inst._defaults.timezoneList);var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&"object"!=typeof timezoneList[0])for(;tzl>tzi;tzi++)tzv=timezoneList[tzi],timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)};return tp_inst._defaults.timezoneList=timezoneList,tp_inst.timezone=null!==tp_inst._defaults.timezone?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):-1*(new Date).getTimezoneOffset(),tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour,tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute,tp_inst.second=tp_inst._defaults.second<tp_inst._defaults.secondMin?tp_inst._defaults.secondMin:tp_inst._defaults.second>tp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second,tp_inst.millisec=tp_inst._defaults.millisec<tp_inst._defaults.millisecMin?tp_inst._defaults.millisecMin:tp_inst._defaults.millisec>tp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec,tp_inst.microsec=tp_inst._defaults.microsec<tp_inst._defaults.microsecMin?tp_inst._defaults.microsecMin:tp_inst._defaults.microsec>tp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:tp_inst._defaults.microsec,tp_inst.ampm="",tp_inst.$input=$input,o.altField&&(tp_inst.$altInput=$(o.altField).css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})),(0===tp_inst._defaults.minDate||0===tp_inst._defaults.minDateTime)&&(tp_inst._defaults.minDate=new Date),(0===tp_inst._defaults.maxDate||0===tp_inst._defaults.maxDateTime)&&(tp_inst._defaults.maxDate=new Date),void 0!==tp_inst._defaults.minDate&&tp_inst._defaults.minDate instanceof Date&&(tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())),void 0!==tp_inst._defaults.minDateTime&&tp_inst._defaults.minDateTime instanceof Date&&(tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())),void 0!==tp_inst._defaults.maxDate&&tp_inst._defaults.maxDate instanceof Date&&(tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())),void 0!==tp_inst._defaults.maxDateTime&&tp_inst._defaults.maxDateTime instanceof Date&&(tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())),tp_inst.$input.bind("focus",function(){tp_inst._onFocus()}),tp_inst},_addTimePicker:function(t){var e=this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val();this.timeDefined=this._parseTime(e),this._limitMinMaxDateTime(t,!1),this._injectTimePicker()},_parseTime:function(t,e){if(this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),e||!this._defaults.timeOnly){var i=$.datepicker._get(this.inst,"dateFormat");try{var n=parseDateTimeInternal(i,this._defaults.timeFormat,t,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!n.timeObj)return!1;$.extend(this,n.timeObj)}catch(s){return $.timepicker.log("Error parsing the date/time string: "+s+"\ndate/time string = "+t+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+i),!1}return!0}var o=$.datepicker.parseTime(this._defaults.timeFormat,t,this._defaults);return o?($.extend(this,o),!0):!1},_injectTimePicker:function(){var t=this.inst.dpDiv,e=this.inst.settings,i=this,n="",s="",o=null,r={},a={},l=null,u=0,c=0;if(0===t.find("div.ui-timepicker-div").length&&e.showTimepicker){var h=' style="display:none;"',d='<div class="ui-timepicker-div'+(e.isRTL?" ui-timepicker-rtl":"")+'"><dl><dt class="ui_tpicker_time_label"'+(e.showTime?"":h)+">"+e.timeText+'</dt><dd class="ui_tpicker_time"'+(e.showTime?"":h)+"></dd>";for(u=0,c=this.units.length;c>u;u++){if(n=this.units[u],s=n.substr(0,1).toUpperCase()+n.substr(1),o=null!==e["show"+s]?e["show"+s]:this.support[n],r[n]=parseInt(e[n+"Max"]-(e[n+"Max"]-e[n+"Min"])%e["step"+s],10),a[n]=0,d+='<dt class="ui_tpicker_'+n+'_label"'+(o?"":h)+">"+e[n+"Text"]+'</dt><dd class="ui_tpicker_'+n+'"><div class="ui_tpicker_'+n+'_slider"'+(o?"":h)+"></div>",o&&e[n+"Grid"]>0){if(d+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>',"hour"==n)for(var p=e[n+"Min"];p<=r[n];p+=parseInt(e[n+"Grid"],10)){a[n]++;var f=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:p},e);d+='<td data-for="'+n+'">'+f+"</td>"}else for(var m=e[n+"Min"];m<=r[n];m+=parseInt(e[n+"Grid"],10))a[n]++,d+='<td data-for="'+n+'">'+(10>m?"0":"")+m+"</td>";d+="</tr></table></div>"}d+="</dd>"}var g=null!==e.showTimezone?e.showTimezone:this.support.timezone;d+='<dt class="ui_tpicker_timezone_label"'+(g?"":h)+">"+e.timezoneText+"</dt>",d+='<dd class="ui_tpicker_timezone" '+(g?"":h)+"></dd>",d+="</dl></div>";var v=$(d);for(e.timeOnly===!0&&(v.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+e.timeOnlyTitle+"</div></div>"),t.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),u=0,c=i.units.length;c>u;u++)n=i.units[u],s=n.substr(0,1).toUpperCase()+n.substr(1),o=null!==e["show"+s]?e["show"+s]:this.support[n],i[n+"_slider"]=i.control.create(i,v.find(".ui_tpicker_"+n+"_slider"),n,i[n],e[n+"Min"],r[n],e["step"+s]),o&&e[n+"Grid"]>0&&(l=100*a[n]*e[n+"Grid"]/(r[n]-e[n+"Min"]),v.find(".ui_tpicker_"+n+" table").css({width:l+"%",marginLeft:e.isRTL?"0":l/(-2*a[n])+"%",marginRight:e.isRTL?l/(-2*a[n])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(t){var e=$(this),s=e.html(),o=parseInt(s.replace(/[^0-9]/g),10),r=s.replace(/[^apm]/gi),a=e.data("for");"hour"==a&&(-1!==r.indexOf("p")&&12>o?o+=12:-1!==r.indexOf("a")&&12===o&&(o=0)),i.control.value(i,i[a+"_slider"],n,o),i._onTimeChange(),i._onSelectHandler()}).css({cursor:"pointer",width:100/a[n]+"%",textAlign:"center",overflow:"hidden"}));if(this.timezone_select=v.find(".ui_tpicker_timezone").append("<select></select>").find("select"),$.fn.append.apply(this.timezone_select,$.map(e.timezoneList,function(t,e){return $("<option />").val("object"==typeof t?t.value:t).text("object"==typeof t?t.label:t)})),"undefined"!=typeof this.timezone&&null!==this.timezone&&""!==this.timezone){var _=-1*new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12).getTimezoneOffset();_==this.timezone?selectLocalTimezone(i):this.timezone_select.val(this.timezone)}else"undefined"!=typeof this.hour&&null!==this.hour&&""!==this.hour?this.timezone_select.val(e.timezone):selectLocalTimezone(i);this.timezone_select.change(function(){i._onTimeChange(),i._onSelectHandler()});var b=t.find(".ui-datepicker-buttonpane");if(b.length?b.before(v):t.append(v),this.$timeObj=v.find(".ui_tpicker_time"),null!==this.inst){var y=this.timeDefined;this._onTimeChange(),this.timeDefined=y}if(this._defaults.addSliderAccess){var w=this._defaults.sliderAccessArgs,T=this._defaults.isRTL;w.isRTL=T,setTimeout(function(){if(0===v.find(".ui-slider-access").length){v.find(".ui-slider:visible").sliderAccess(w);var t=v.find(".ui-slider-access:eq(0)").outerWidth(!0);t&&v.find("table:visible").each(function(){var e=$(this),i=e.outerWidth(),n=e.css(T?"marginRight":"marginLeft").toString().replace("%",""),s=i-t,o=n*s/i+"%",r={width:s,marginRight:0,marginLeft:0};r[T?"marginRight":"marginLeft"]=o,e.css(r)})}},10)}}},_limitMinMaxDateTime:function(t,e){var i=this._defaults,n=new Date(t.selectedYear,t.selectedMonth,t.selectedDay);if(this._defaults.showTimepicker){if(null!==$.datepicker._get(t,"minDateTime")&&void 0!==$.datepicker._get(t,"minDateTime")&&n){var s=$.datepicker._get(t,"minDateTime"),o=new Date(s.getFullYear(),s.getMonth(),s.getDate(),0,0,0,0);(null===this.hourMinOriginal||null===this.minuteMinOriginal||null===this.secondMinOriginal||null===this.millisecMinOriginal||null===this.microsecMinOriginal)&&(this.hourMinOriginal=i.hourMin,this.minuteMinOriginal=i.minuteMin,this.secondMinOriginal=i.secondMin,this.millisecMinOriginal=i.millisecMin,this.microsecMinOriginal=i.microsecMin),t.settings.timeOnly||o.getTime()==n.getTime()?(this._defaults.hourMin=s.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=s.getMinutes(),this.minute<=this._defaults.minuteMin?(this.minute=this._defaults.minuteMin,this._defaults.secondMin=s.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,this._defaults.millisecMin=s.getMilliseconds(),this.millisec<=this._defaults.millisecMin?(this.millisec=this._defaults.millisecMin,this._defaults.microsecMin=s.getMicroseconds()):(this.microsec<this._defaults.microsecMin&&(this.microsec=this._defaults.microsecMin),this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.hourMin=this.hourMinOriginal,this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)}if(null!==$.datepicker._get(t,"maxDateTime")&&void 0!==$.datepicker._get(t,"maxDateTime")&&n){var r=$.datepicker._get(t,"maxDateTime"),a=new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0,0);(null===this.hourMaxOriginal||null===this.minuteMaxOriginal||null===this.secondMaxOriginal||null===this.millisecMaxOriginal)&&(this.hourMaxOriginal=i.hourMax,this.minuteMaxOriginal=i.minuteMax,this.secondMaxOriginal=i.secondMax,this.millisecMaxOriginal=i.millisecMax,this.microsecMaxOriginal=i.microsecMax),t.settings.timeOnly||a.getTime()==n.getTime()?(this._defaults.hourMax=r.getHours(),this.hour>=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=r.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=r.getSeconds(),this.second>=this._defaults.secondMax?(this.second=this._defaults.secondMax,this._defaults.millisecMax=r.getMilliseconds(),this.millisec>=this._defaults.millisecMax?(this.millisec=this._defaults.millisecMax,this._defaults.microsecMax=r.getMicroseconds()):(this.microsec>this._defaults.microsecMax&&(this.microsec=this._defaults.microsecMax),this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)}if(void 0!==e&&e===!0){var l=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),u=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),c=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,10),h=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec,10);microsecMax=parseInt(this._defaults.microsecMax-(this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec,10),this.hour_slider&&(this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:l}),this.control.value(this,this.hour_slider,"hour",this.hour-this.hour%this._defaults.stepHour)),this.minute_slider&&(this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,max:u}),this.control.value(this,this.minute_slider,"minute",this.minute-this.minute%this._defaults.stepMinute)),this.second_slider&&(this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:c}),this.control.value(this,this.second_slider,"second",this.second-this.second%this._defaults.stepSecond)),this.millisec_slider&&(this.control.options(this,this.millisec_slider,"millisec",{min:this._defaults.millisecMin,max:h}),this.control.value(this,this.millisec_slider,"millisec",this.millisec-this.millisec%this._defaults.stepMillisec)),this.microsec_slider&&(this.control.options(this,this.microsec_slider,"microsec",{min:this._defaults.microsecMin,max:microsecMax}),this.control.value(this,this.microsec_slider,"microsec",this.microsec-this.microsec%this._defaults.stepMicrosec))}}},_onTimeChange:function(){var t=this.hour_slider?this.control.value(this,this.hour_slider,"hour"):!1,e=this.minute_slider?this.control.value(this,this.minute_slider,"minute"):!1,i=this.second_slider?this.control.value(this,this.second_slider,"second"):!1,n=this.millisec_slider?this.control.value(this,this.millisec_slider,"millisec"):!1,s=this.microsec_slider?this.control.value(this,this.microsec_slider,"microsec"):!1,o=this.timezone_select?this.timezone_select.val():!1,r=this._defaults,a=r.pickerTimeFormat||r.timeFormat,l=r.pickerTimeSuffix||r.timeSuffix;"object"==typeof t&&(t=!1),"object"==typeof e&&(e=!1),"object"==typeof i&&(i=!1),"object"==typeof n&&(n=!1),"object"==typeof s&&(s=!1),"object"==typeof o&&(o=!1),t!==!1&&(t=parseInt(t,10)),e!==!1&&(e=parseInt(e,10)),i!==!1&&(i=parseInt(i,10)),n!==!1&&(n=parseInt(n,10)),
  s!==!1&&(s=parseInt(s,10));var u=r[12>t?"amNames":"pmNames"][0],c=t!=this.hour||e!=this.minute||i!=this.second||n!=this.millisec||s!=this.microsec||this.ampm.length>0&&12>t!=(-1!==$.inArray(this.ampm.toUpperCase(),this.amNames))||null!==this.timezone&&o!=this.timezone;c&&(t!==!1&&(this.hour=t),e!==!1&&(this.minute=e),i!==!1&&(this.second=i),n!==!1&&(this.millisec=n),s!==!1&&(this.microsec=s),o!==!1&&(this.timezone=o),this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0)),this.support.ampm&&(this.ampm=u),this.formattedTime=$.datepicker.formatTime(r.timeFormat,this,r),this.$timeObj&&(a===r.timeFormat?this.$timeObj.text(this.formattedTime+l):this.$timeObj.text($.datepicker.formatTime(a,this,r)+l)),this.timeDefined=!0,c&&this._updateDateTime()},_onSelectHandler:function(){var t=this._defaults.onSelect||this.inst.settings.onSelect,e=this.$input?this.$input[0]:null;t&&e&&t.apply(e,[this.formattedDateTime,this])},_updateDateTime:function(t){t=this.inst||t;var e=$.datepicker._daylightSavingAdjust(new Date(t.selectedYear,t.selectedMonth,t.selectedDay)),i=$.datepicker._get(t,"dateFormat"),n=$.datepicker._getFormatConfig(t),s=null!==e&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(i,null===e?new Date:e,n);var o=this.formattedDate;if(""===t.lastVal&&(t.currentYear=t.selectedYear,t.currentMonth=t.selectedMonth,t.currentDay=t.selectedDay),this._defaults.timeOnly===!0?o=this.formattedTime:this._defaults.timeOnly!==!0&&(this._defaults.alwaysSetTime||s)&&(o+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=o,this._defaults.showTimepicker)if(this.$altInput&&this._defaults.timeOnly===!1&&this._defaults.altFieldTimeOnly===!0)this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate);else if(this.$altInput){this.$input.val(o);var r="",a=this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,l=this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;this._defaults.timeOnly||(r=this._defaults.altFormat?$.datepicker.formatDate(this._defaults.altFormat,null===e?new Date:e,n):this.formattedDate,r&&(r+=a)),r+=this._defaults.altTimeFormat?$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+l:this.formattedTime+l,this.$altInput.val(r)}else this.$input.val(o);else this.$input.val(this.formattedDate);var u=$.datepicker._get(t,"onUpdateDateTime");u&&""!==this.formattedTime&&u.apply(window,[{time:this.formattedTime,date:this.formattedDate,datetime:o}]),this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var t=$.datepicker._getInst(this.$input.get(0)),e=$.datepicker._get(t,"timepicker");if(e&&e._defaults.timeOnly&&t.input.val()!=t.lastVal)try{$.datepicker._updateDatepicker(t)}catch(i){$.timepicker.log(i)}}},_controls:{slider:{create:function(t,e,i,n,s,o,r){var a=t._defaults.isRTL;return e.prop("slide",null).slider({orientation:"horizontal",value:a?-1*n:n,min:a?-1*o:s,max:a?-1*s:o,step:r,slide:function(e,n){t.control.value(t,$(this),i,a?-1*n.value:n.value),t._onTimeChange()},stop:function(e,i){t._onSelectHandler()}})},options:function(t,e,i,n,s){if(t._defaults.isRTL){if("string"==typeof n)return"min"==n||"max"==n?void 0!==s?e.slider(n,-1*s):Math.abs(e.slider(n)):e.slider(n);var o=n.min,r=n.max;return n.min=n.max=null,void 0!==o&&(n.max=-1*o),void 0!==r&&(n.min=-1*r),e.slider(n)}return"string"==typeof n&&void 0!==s?e.slider(n,s):e.slider(n)},value:function(t,e,i,n){return t._defaults.isRTL?void 0!==n?e.slider("value",-1*n):Math.abs(e.slider("value")):void 0!==n?e.slider("value",n):e.slider("value")}},select:{create:function(t,e,i,n,s,o,r){for(var a='<select class="ui-timepicker-select" data-unit="'+i+'" data-min="'+s+'" data-max="'+o+'" data-step="'+r+'">',l=t._defaults.pickerTimeFormat||t._defaults.timeFormat,u=s;o>=u;u+=r)a+='<option value="'+u+'"'+(u==n?" selected":"")+">",a+="hour"==i?$.datepicker.formatTime($.trim(l.replace(/[^ht ]/gi,"")),{hour:u},t._defaults):"millisec"==i||"microsec"==i||u>=10?u:"0"+u.toString(),a+="</option>";return a+="</select>",e.children("select").remove(),$(a).appendTo(e).change(function(e){t._onTimeChange(),t._onSelectHandler()}),e},options:function(t,e,i,n,s){var o={},r=e.children("select");if("string"==typeof n){if(void 0===s)return r.data(n);o[n]=s}else o=n;return t.control.create(t,e,r.data("unit"),r.val(),o.min||r.data("min"),o.max||r.data("max"),o.step||r.data("step"))},value:function(t,e,i,n){var s=e.children("select");return void 0!==n?s.val(n):s.val()}}}}),$.fn.extend({timepicker:function(t){t=t||{};var e=Array.prototype.slice.call(arguments);return"object"==typeof t&&(e[0]=$.extend(t,{timeOnly:!0})),$(this).each(function(){$.fn.datetimepicker.apply($(this),e)})},datetimepicker:function(t){t=t||{};var e=arguments;return"string"==typeof t?"getDate"==t?$.fn.datepicker.apply($(this[0]),e):this.each(function(){var t=$(this);t.datepicker.apply(t,e)}):this.each(function(){var e=$(this);e.datepicker($.timepicker._newInst(e,t)._defaults)})}}),$.datepicker.parseDateTime=function(t,e,i,n,s){var o=parseDateTimeInternal(t,e,i,n,s);if(o.timeObj){var r=o.timeObj;o.date.setHours(r.hour,r.minute,r.second,r.millisec),o.date.setMicroseconds(r.microsec)}return o.date},$.datepicker.parseTime=function(t,e,i){var n=extendRemove(extendRemove({},$.timepicker._defaults),i||{}),s=(-1!==t.replace(/\'.*?\'/g,"").indexOf("Z"),function(t,e,i){var n,s=function(t,e){var i=[];return t&&$.merge(i,t),e&&$.merge(i,e),i=$.map(i,function(t){return t.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")}),"("+i.join("|")+")?"},o=function(t){var e=t.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),i={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(e)for(var n=0;n<e.length;n++)-1==i[e[n].toString().charAt(0)]&&(i[e[n].toString().charAt(0)]=n+1);return i},r="^"+t.toString().replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(t){var e=t.length;switch(t.charAt(0).toLowerCase()){case"h":return 1===e?"(\\d?\\d)":"(\\d{"+e+"})";case"m":return 1===e?"(\\d?\\d)":"(\\d{"+e+"})";case"s":return 1===e?"(\\d?\\d)":"(\\d{"+e+"})";case"l":return"(\\d?\\d?\\d)";case"c":return"(\\d?\\d?\\d)";case"z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case"t":return s(i.amNames,i.pmNames);default:return"("+t.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(t){return"\\"+t})+")?"}}).replace(/\s/g,"\\s?")+i.timeSuffix+"$",a=o(t),l="";n=e.match(new RegExp(r,"i"));var u={hour:0,minute:0,second:0,millisec:0,microsec:0};return n?(-1!==a.t&&(void 0===n[a.t]||0===n[a.t].length?(l="",u.ampm=""):(l=-1!==$.inArray(n[a.t].toUpperCase(),i.amNames)?"AM":"PM",u.ampm=i["AM"==l?"amNames":"pmNames"][0])),-1!==a.h&&("AM"==l&&"12"==n[a.h]?u.hour=0:"PM"==l&&"12"!=n[a.h]?u.hour=parseInt(n[a.h],10)+12:u.hour=Number(n[a.h])),-1!==a.m&&(u.minute=Number(n[a.m])),-1!==a.s&&(u.second=Number(n[a.s])),-1!==a.l&&(u.millisec=Number(n[a.l])),-1!==a.c&&(u.microsec=Number(n[a.c])),-1!==a.z&&void 0!==n[a.z]&&(u.timezone=$.timepicker.timezoneOffsetNumber(n[a.z])),u):!1}),o=function(t,e,i){try{var n=new Date("2012-01-01 "+e);if(isNaN(n.getTime())&&(n=new Date("2012-01-01T"+e),isNaN(n.getTime())&&(n=new Date("01/01/2012 "+e),isNaN(n.getTime()))))throw"Unable to parse time with native Date: "+e;return{hour:n.getHours(),minute:n.getMinutes(),second:n.getSeconds(),millisec:n.getMilliseconds(),microsec:n.getMicroseconds(),timezone:-1*n.getTimezoneOffset()}}catch(o){try{return s(t,e,i)}catch(r){$.timepicker.log("Unable to parse \ntimeString: "+e+"\ntimeFormat: "+t)}}return!1};return"function"==typeof n.parse?n.parse(t,e,n):"loose"===n.parse?o(t,e,n):s(t,e,n)},$.datepicker.formatTime=function(t,e,i){i=i||{},i=$.extend({},$.timepicker._defaults,i),e=$.extend({hour:0,minute:0,second:0,millisec:0,timezone:0},e);var n=t,s=i.amNames[0],o=parseInt(e.hour,10);return o>11&&(s=i.pmNames[0]),n=n.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|('.*?'|".*?"))/g,function(t){switch(t){case"HH":return("0"+o).slice(-2);case"H":return o;case"hh":return("0"+convert24to12(o)).slice(-2);case"h":return convert24to12(o);case"mm":return("0"+e.minute).slice(-2);case"m":return e.minute;case"ss":return("0"+e.second).slice(-2);case"s":return e.second;case"l":return("00"+e.millisec).slice(-3);case"c":return("00"+e.microsec).slice(-3);case"z":return $.timepicker.timezoneOffsetString(null===e.timezone?i.timezone:e.timezone,!1);case"Z":return $.timepicker.timezoneOffsetString(null===e.timezone?i.timezone:e.timezone,!0);case"T":return s.charAt(0).toUpperCase();case"TT":return s.toUpperCase();case"t":return s.charAt(0).toLowerCase();case"tt":return s.toLowerCase();default:return t.replace(/\'/g,"")||"'"}}),n=$.trim(n)},$.datepicker._base_selectDate=$.datepicker._selectDate,$.datepicker._selectDate=function(t,e){var i=this._getInst($(t)[0]),n=this._get(i,"timepicker");n?(n._limitMinMaxDateTime(i,!0),i.inline=i.stay_open=!0,this._base_selectDate(t,e),i.inline=i.stay_open=!1,this._notifyChange(i),this._updateDatepicker(i)):this._base_selectDate(t,e)},$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker,$.datepicker._updateDatepicker=function(t){var e=t.input[0];if(!($.datepicker._curInst&&$.datepicker._curInst!=t&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!=e||"boolean"==typeof t.stay_open&&t.stay_open!==!1)){this._base_updateDatepicker(t);var i=this._get(t,"timepicker");i&&i._addTimePicker(t)}},$.datepicker._base_doKeyPress=$.datepicker._doKeyPress,$.datepicker._doKeyPress=function(t){var e=$.datepicker._getInst(t.target),i=$.datepicker._get(e,"timepicker");if(i&&$.datepicker._get(e,"constrainInput")){var n=i.support.ampm,s=null!==i._defaults.showTimezone?i._defaults.showTimezone:i.support.timezone,o=$.datepicker._possibleChars($.datepicker._get(e,"dateFormat")),r=i._defaults.timeFormat.toString().replace(/[hms]/g,"").replace(/TT/g,n?"APM":"").replace(/Tt/g,n?"AaPpMm":"").replace(/tT/g,n?"AaPpMm":"").replace(/T/g,n?"AP":"").replace(/tt/g,n?"apm":"").replace(/t/g,n?"ap":"")+" "+i._defaults.separator+i._defaults.timeSuffix+(s?i._defaults.timezoneList.join(""):"")+i._defaults.amNames.join("")+i._defaults.pmNames.join("")+o,a=String.fromCharCode(void 0===t.charCode?t.keyCode:t.charCode);return t.ctrlKey||" ">a||!o||r.indexOf(a)>-1}return $.datepicker._base_doKeyPress(t)},$.datepicker._base_updateAlternate=$.datepicker._updateAlternate,$.datepicker._updateAlternate=function(t){var e=this._get(t,"timepicker");if(e){var i=e._defaults.altField;if(i){var n=(e._defaults.altFormat||e._defaults.dateFormat,this._getDate(t)),s=$.datepicker._getFormatConfig(t),o="",r=e._defaults.altSeparator?e._defaults.altSeparator:e._defaults.separator,a=e._defaults.altTimeSuffix?e._defaults.altTimeSuffix:e._defaults.timeSuffix,l=null!==e._defaults.altTimeFormat?e._defaults.altTimeFormat:e._defaults.timeFormat;o+=$.datepicker.formatTime(l,e,e._defaults)+a,e._defaults.timeOnly||e._defaults.altFieldTimeOnly||null===n||(o=e._defaults.altFormat?$.datepicker.formatDate(e._defaults.altFormat,n,s)+r+o:e.formattedDate+r+o),$(i).val(o)}}else $.datepicker._base_updateAlternate(t)},$.datepicker._base_doKeyUp=$.datepicker._doKeyUp,$.datepicker._doKeyUp=function(t){var e=$.datepicker._getInst(t.target),i=$.datepicker._get(e,"timepicker");if(i&&i._defaults.timeOnly&&e.input.val()!=e.lastVal)try{$.datepicker._updateDatepicker(e)}catch(n){$.timepicker.log(n)}return $.datepicker._base_doKeyUp(t)},$.datepicker._base_gotoToday=$.datepicker._gotoToday,$.datepicker._gotoToday=function(t){var e=this._getInst($(t)[0]),i=e.dpDiv;this._base_gotoToday(t);var n=this._get(e,"timepicker");selectLocalTimezone(n);var s=new Date;this._setTime(e,s),$(".ui-datepicker-today",i).click()},$.datepicker._disableTimepickerDatepicker=function(t){var e=this._getInst(t);if(e){var i=this._get(e,"timepicker");$(t).datepicker("getDate"),i&&(i._defaults.showTimepicker=!1,i._updateDateTime(e))}},$.datepicker._enableTimepickerDatepicker=function(t){var e=this._getInst(t);if(e){var i=this._get(e,"timepicker");$(t).datepicker("getDate"),i&&(i._defaults.showTimepicker=!0,i._addTimePicker(e),i._updateDateTime(e))}},$.datepicker._setTime=function(t,e){var i=this._get(t,"timepicker");if(i){var n=i._defaults;i.hour=e?e.getHours():n.hour,i.minute=e?e.getMinutes():n.minute,i.second=e?e.getSeconds():n.second,i.millisec=e?e.getMilliseconds():n.millisec,i.microsec=e?e.getMicroseconds():n.microsec,i._limitMinMaxDateTime(t,!0),i._onTimeChange(),i._updateDateTime(t)}},$.datepicker._setTimeDatepicker=function(t,e,i){var n=this._getInst(t);if(n){var s=this._get(n,"timepicker");if(s){this._setDateFromField(n);var o;e&&("string"==typeof e?(s._parseTime(e,i),o=new Date,o.setHours(s.hour,s.minute,s.second,s.millisec),o.setMicroseconds(s.microsec)):o=new Date(e.getTime()),"Invalid Date"==o.toString()&&(o=void 0),this._setTime(n,o))}}},$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker,$.datepicker._setDateDatepicker=function(t,e){var i=this._getInst(t);if(i){var n=this._get(i,"timepicker"),s=e instanceof Date?new Date(e.getTime()):e;n&&null!=n.timezone&&(e=$.timepicker.timezoneAdjust(e,n.timezone),s=$.timepicker.timezoneAdjust(s,n.timezone)),this._updateDatepicker(i),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(t,s,!0)}},$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker,$.datepicker._getDateDatepicker=function(t,e){var i=this._getInst(t);if(i){var n=this._get(i,"timepicker");if(n){void 0===i.lastVal&&this._setDateFromField(i,e);var s=this._getDate(i);return s&&n._parseTime($(t).val(),n.timeOnly)&&(s.setHours(n.hour,n.minute,n.second,n.millisec),s.setMicroseconds(n.microsec),null!=n.timezone&&(s=$.timepicker.timezoneAdjust(s,n.timezone))),s}return this._base_getDateDatepicker(t,e)}},$.datepicker._base_parseDate=$.datepicker.parseDate,$.datepicker.parseDate=function(t,e,i){var n;try{n=this._base_parseDate(t,e,i)}catch(s){if(!(s.indexOf(":")>=0))throw s;n=this._base_parseDate(t,e.substring(0,e.length-(s.length-s.indexOf(":")-2)),i)}return n},$.datepicker._base_formatDate=$.datepicker._formatDate,$.datepicker._formatDate=function(t,e,i,n){var s=this._get(t,"timepicker");return s?(s._updateDateTime(t),s.$input.val()):this._base_formatDate(t)},$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker,$.datepicker._optionDatepicker=function(t,e,i){var n,s=this._getInst(t);if(!s)return null;var o=this._get(s,"timepicker");if(o){var r,a=null,l=null,u=null,c=o._defaults.evnts,h={};if("string"==typeof e){if("minDate"===e||"minDateTime"===e)a=i;else if("maxDate"===e||"maxDateTime"===e)l=i;else if("onSelect"===e)u=i;else if(c.hasOwnProperty(e)){if("undefined"==typeof i)return c[e];h[e]=i,n={}}}else if("object"==typeof e){e.minDate?a=e.minDate:e.minDateTime?a=e.minDateTime:e.maxDate?l=e.maxDate:e.maxDateTime&&(l=e.maxDateTime);for(r in c)c.hasOwnProperty(r)&&e[r]&&(h[r]=e[r])}for(r in h)h.hasOwnProperty(r)&&(c[r]=h[r],n||(n=$.extend({},e)),delete n[r]);if(n&&isEmptyObject(n))return;a?(a=0===a?new Date:new Date(a),o._defaults.minDate=a,o._defaults.minDateTime=a):l?(l=0===l?new Date:new Date(l),o._defaults.maxDate=l,o._defaults.maxDateTime=l):u&&(o._defaults.onSelect=u)}return void 0===i?this._base_optionDatepicker.call($.datepicker,t,e):this._base_optionDatepicker.call($.datepicker,t,n||e,i)};var isEmptyObject=function(t){var e;for(e in t)if(t.hasOwnProperty(t))return!1;return!0},extendRemove=function(t,e){$.extend(t,e);for(var i in e)(null===e[i]||void 0===e[i])&&(t[i]=e[i]);return t},detectSupport=function(t){var e=t.replace(/\'.*?\'/g,"").toLowerCase(),i=function(t,e){return-1!==t.indexOf(e)?!0:!1};return{hour:i(e,"h"),minute:i(e,"m"),second:i(e,"s"),millisec:i(e,"l"),microsec:i(e,"c"),timezone:i(e,"z"),ampm:i("t")&&i(t,"h"),iso8601:i(t,"Z")}},convert24to12=function(t){return t>12&&(t-=12),0===t&&(t=12),String(t)},splitDateTime=function(t,e,i,n){try{var s=n&&n.separator?n.separator:$.timepicker._defaults.separator,o=n&&n.timeFormat?n.timeFormat:$.timepicker._defaults.timeFormat,r=o.split(s),a=r.length,l=e.split(s),u=l.length;if(u>1)return[l.splice(0,u-a).join(s),l.splice(0,a).join(s)]}catch(c){if($.timepicker.log("Could not split the date from the time. Please check the following datetimepicker options\nthrown error: "+c+"\ndateTimeString"+e+"\ndateFormat = "+t+"\nseparator = "+n.separator+"\ntimeFormat = "+n.timeFormat),c.indexOf(":")>=0){var h=e.length-(c.length-c.indexOf(":")-2);e.substring(h);return[$.trim(e.substring(0,h)),$.trim(e.substring(h))]}throw c}return[e,""]},parseDateTimeInternal=function(t,e,i,n,s){var o,r=splitDateTime(t,i,n,s);if(o=$.datepicker._base_parseDate(t,r[0],n),""!==r[1]){var a=r[1],l=$.datepicker.parseTime(e,a,s);if(null===l)throw"Wrong time format";return{date:o,timeObj:l}}return{date:o}},selectLocalTimezone=function(t,e){if(t&&t.timezone_select){var i="undefined"!=typeof e?e:new Date;t.timezone_select.val(-1*i.getTimezoneOffset())}};$.timepicker=new Timepicker,$.timepicker.timezoneOffsetString=function(t,e){if(isNaN(t)||t>840)return t;var i=t,n=i%60,s=(i-n)/60,o=e?":":"",r=(i>=0?"+":"-")+("0"+(101*s).toString()).slice(-2)+o+("0"+(101*n).toString()).slice(-2);return"+00:00"==r?"Z":r},$.timepicker.timezoneOffsetNumber=function(t){return t=t.toString().replace(":",""),"Z"===t.toUpperCase()?0:/^(\-|\+)\d{4}$/.test(t)?("-"==t.substr(0,1)?-1:1)*(60*parseInt(t.substr(1,2),10)+parseInt(t.substr(3,2),10)):t},$.timepicker.timezoneAdjust=function(t,e){var i=$.timepicker.timezoneOffsetNumber(e);if(!isNaN(i)){var n=-1*t.getTimezoneOffset(),s=n-i;t.setMinutes(t.getMinutes()+s)}return t},$.timepicker.timeRange=function(t,e,i){return $.timepicker.handleRange("timepicker",t,e,i)},$.timepicker.datetimeRange=function(t,e,i){$.timepicker.handleRange("datetimepicker",t,e,i)},$.timepicker.dateRange=function(t,e,i){$.timepicker.handleRange("datepicker",t,e,i)},$.timepicker.handleRange=function(t,e,i,n){function s(s,o){var r=e[t]("getDate"),a=i[t]("getDate"),l=s[t]("getDate");if(null!==r){var u=new Date(r.getTime()),c=new Date(r.getTime());u.setMilliseconds(u.getMilliseconds()+n.minInterval),c.setMilliseconds(c.getMilliseconds()+n.maxInterval),n.minInterval>0&&u>a?i[t]("setDate",u):n.maxInterval>0&&a>c?i[t]("setDate",c):r>a&&o[t]("setDate",l)}}function o(e,i,s){if(e.val()){var o=e[t].call(e,"getDate");null!==o&&n.minInterval>0&&("minDate"==s&&o.setMilliseconds(o.getMilliseconds()+n.minInterval),"maxDate"==s&&o.setMilliseconds(o.getMilliseconds()-n.minInterval)),o.getTime&&i[t].call(i,"option",s,o)}}return n=$.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},n),$.fn[t].call(e,$.extend({onClose:function(t,e){s($(this),i)},onSelect:function(t){o($(this),i,"minDate")}},n,n.start)),$.fn[t].call(i,$.extend({onClose:function(t,i){s($(this),e)},onSelect:function(t){o($(this),e,"maxDate")}},n,n.end)),s(e,i),o(e,i,"minDate"),o(i,e,"maxDate"),$([e.get(0),i.get(0)])},$.timepicker.log=function(t){window.console&&console.log(t)},Date.prototype.getMicroseconds||(Date.microseconds=0,Date.prototype.getMicroseconds=function(){return this.microseconds},Date.prototype.setMicroseconds=function(t){return this.microseconds=t,this}),$.timepicker.version="1.3"}}(jQuery),jQuery}),define("jrs.configs",[],function(){return"undefined"!=typeof __jrsConfigs__?__jrsConfigs__:{contextPath:"",userLocale:"en"}}),define("common/config/requestSettings",["require"],function(t){return{headers:{"X-Suppress-Basic":"true","Cache-Control":"no-cache, no-store",Pragma:"no-cache"}}}),define("requestSettings",["require","common/config/requestSettings","jrs.configs"],function(t){var e=t("common/config/requestSettings"),i=t("jrs.configs"),n=i.userLocale.replace(/_/g,"-");return e.headers["Accept-Language"]=n,e}),function(){function t(e,n){function o(t){if(o[t]!==g)return o[t];var e;if("bug-string-char-index"==t)e="a"!="a"[0];else if("json"==t)e=o("json-stringify")&&o("json-parse");else{var i,s='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var l=n.stringify,c="function"==typeof l&&b;if(c){(i=function(){return 1}).toJSON=i;try{c="0"===l(0)&&"0"===l(new r)&&'""'==l(new a)&&l(_)===g&&l(g)===g&&l()===g&&"1"===l(i)&&"[1]"==l([i])&&"[null]"==l([g])&&"null"==l(null)&&"[null,null,null]"==l([g,_,null])&&l({a:[i,!0,!1,null,"\x00\b\n\f\r	"]})==s&&"1"===l(null,i)&&"[\n 1,\n 2\n]"==l([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==l(new u(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==l(new u(864e13))&&'"-000001-01-01T00:00:00.000Z"'==l(new u(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==l(new u(-1))}catch(h){c=!1}}e=c}if("json-parse"==t){var d=n.parse;if("function"==typeof d)try{if(0===d("0")&&!d(!1)){i=d(s);var p=5==i.a.length&&1===i.a[0];if(p){try{p=!d('"	"')}catch(h){}if(p)try{p=1!==d("01")}catch(h){}if(p)try{p=1!==d("1.")}catch(h){}}}}catch(h){p=!1}e=p}}return o[t]=!!e}e||(e=s.Object()),n||(n=s.Object());var r=e.Number||s.Number,a=e.String||s.String,l=e.Object||s.Object,u=e.Date||s.Date,c=e.SyntaxError||s.SyntaxError,h=e.TypeError||s.TypeError,d=e.Math||s.Math,p=e.JSON||s.JSON;"object"==typeof p&&p&&(n.stringify=p.stringify,n.parse=p.parse);var f,m,g,v=l.prototype,_=v.toString,b=new u(-0xc782b5b800cec);try{b=-109252==b.getUTCFullYear()&&0===b.getUTCMonth()&&1===b.getUTCDate()&&10==b.getUTCHours()&&37==b.getUTCMinutes()&&6==b.getUTCSeconds()&&708==b.getUTCMilliseconds()}catch(y){}if(!o("json")){var w="[object Function]",T="[object Date]",x="[object Number]",S="[object String]",E="[object Array]",M="[object Boolean]",I=o("bug-string-char-index");if(!b)var C=d.floor,D=[0,31,59,90,120,151,181,212,243,273,304,334],k=function(t,e){return D[e]+365*(t-1970)+C((t-1969+(e=+(e>1)))/4)-C((t-1901+e)/100)+C((t-1601+e)/400)};if((f=v.hasOwnProperty)||(f=function(t){var e,i={};return(i.__proto__=null,i.__proto__={toString:1},i).toString!=_?f=function(t){var e=this.__proto__,i=t in(this.__proto__=null,this);return this.__proto__=e,i}:(e=i.constructor,f=function(t){var i=(this.constructor||e).prototype;return t in this&&!(t in i&&this[t]===i[t])}),i=null,f.call(this,t)}),m=function(t,e){var n,s,o,r=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,s=new n;for(o in s)f.call(s,o)&&r++;return n=s=null,r?m=2==r?function(t,e){var i,n={},s=_.call(t)==w;for(i in t)s&&"prototype"==i||f.call(n,i)||!(n[i]=1)||!f.call(t,i)||e(i)}:function(t,e){var i,n,s=_.call(t)==w;for(i in t)s&&"prototype"==i||!f.call(t,i)||(n="constructor"===i)||e(i);(n||f.call(t,i="constructor"))&&e(i)}:(s=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],m=function(t,e){var n,o,r=_.call(t)==w,a=!r&&"function"!=typeof t.constructor&&i[typeof t.hasOwnProperty]&&t.hasOwnProperty||f;for(n in t)r&&"prototype"==n||!a.call(t,n)||e(n);for(o=s.length;n=s[--o];a.call(t,n)&&e(n));}),m(t,e)},!o("json-stringify")){var O={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},A="000000",N=function(t,e){return(A+(e||0)).slice(-t)},L="\\u00",P=function(t){for(var e='"',i=0,n=t.length,s=!I||n>10,o=s&&(I?t.split(""):t);n>i;i++){var r=t.charCodeAt(i);switch(r){case 8:case 9:case 10:case 12:case 13:case 34:case 92:e+=O[r];break;default:if(32>r){e+=L+N(2,r.toString(16));break}e+=s?o[i]:t.charAt(i)}}return e+'"'},R=function(t,e,i,n,s,o,r){var a,l,u,c,d,p,v,b,y,w,I,D,O,A,L,F;try{a=e[t]}catch(j){}if("object"==typeof a&&a)if(l=_.call(a),l!=T||f.call(a,"toJSON"))"function"==typeof a.toJSON&&(l!=x&&l!=S&&l!=E||f.call(a,"toJSON"))&&(a=a.toJSON(t));else if(a>-1/0&&1/0>a){if(k){for(d=C(a/864e5),u=C(d/365.2425)+1970-1;k(u+1,0)<=d;u++);for(c=C((d-k(u,0))/30.42);k(u,c+1)<=d;c++);d=1+d-k(u,c),p=(a%864e5+864e5)%864e5,v=C(p/36e5)%24,b=C(p/6e4)%60,y=C(p/1e3)%60,w=p%1e3}else u=a.getUTCFullYear(),c=a.getUTCMonth(),d=a.getUTCDate(),v=a.getUTCHours(),b=a.getUTCMinutes(),y=a.getUTCSeconds(),w=a.getUTCMilliseconds();a=(0>=u||u>=1e4?(0>u?"-":"+")+N(6,0>u?-u:u):N(4,u))+"-"+N(2,c+1)+"-"+N(2,d)+"T"+N(2,v)+":"+N(2,b)+":"+N(2,y)+"."+N(3,w)+"Z"}else a=null;if(i&&(a=i.call(e,t,a)),null===a)return"null";if(l=_.call(a),l==M)return""+a;if(l==x)return a>-1/0&&1/0>a?""+a:"null";if(l==S)return P(""+a);if("object"==typeof a){for(A=r.length;A--;)if(r[A]===a)throw h();if(r.push(a),I=[],L=o,o+=s,l==E){for(O=0,A=a.length;A>O;O++)D=R(O,a,i,n,s,o,r),I.push(D===g?"null":D);F=I.length?s?"[\n"+o+I.join(",\n"+o)+"\n"+L+"]":"["+I.join(",")+"]":"[]"}else m(n||a,function(t){var e=R(t,a,i,n,s,o,r);e!==g&&I.push(P(t)+":"+(s?" ":"")+e)}),F=I.length?s?"{\n"+o+I.join(",\n"+o)+"\n"+L+"}":"{"+I.join(",")+"}":"{}";return r.pop(),F}};n.stringify=function(t,e,n){var s,o,r,a;if(i[typeof e]&&e)if((a=_.call(e))==w)o=e;else if(a==E){r={};for(var l,u=0,c=e.length;c>u;l=e[u++],a=_.call(l),(a==S||a==x)&&(r[l]=1));}if(n)if((a=_.call(n))==x){if((n-=n%1)>0)for(s="",n>10&&(n=10);s.length<n;s+=" ");}else a==S&&(s=n.length<=10?n:n.slice(0,10));return R("",(l={},l[""]=t,l),o,r,s,"",[])}}if(!o("json-parse")){var F,j,z=a.fromCharCode,H={92:"\\",34:'"',47:"/",98:"\b",116:"	",110:"\n",102:"\f",114:"\r"},$=function(){throw F=j=null,c()},B=function(){for(var t,e,i,n,s,o=j,r=o.length;r>F;)switch(s=o.charCodeAt(F)){case 9:case 10:case 13:case 32:F++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=I?o.charAt(F):o[F],F++,t;case 34:for(t="@",F++;r>F;)if(s=o.charCodeAt(F),32>s)$();else if(92==s)switch(s=o.charCodeAt(++F)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=H[s],F++;break;case 117:for(e=++F,i=F+4;i>F;F++)s=o.charCodeAt(F),s>=48&&57>=s||s>=97&&102>=s||s>=65&&70>=s||$();t+=z("0x"+o.slice(e,F));break;default:$()}else{if(34==s)break;for(s=o.charCodeAt(F),e=F;s>=32&&92!=s&&34!=s;)s=o.charCodeAt(++F);t+=o.slice(e,F)}if(34==o.charCodeAt(F))return F++,t;$();default:if(e=F,45==s&&(n=!0,s=o.charCodeAt(++F)),s>=48&&57>=s){for(48==s&&(s=o.charCodeAt(F+1),s>=48&&57>=s)&&$(),n=!1;r>F&&(s=o.charCodeAt(F),s>=48&&57>=s);F++);if(46==o.charCodeAt(F)){for(i=++F;r>i&&(s=o.charCodeAt(i),s>=48&&57>=s);i++);i==F&&$(),F=i}if(s=o.charCodeAt(F),101==s||69==s){for(s=o.charCodeAt(++F),(43==s||45==s)&&F++,i=F;r>i&&(s=o.charCodeAt(i),s>=48&&57>=s);i++);i==F&&$(),F=i}return+o.slice(e,F)}if(n&&$(),"true"==o.slice(F,F+4))return F+=4,!0;if("false"==o.slice(F,F+5))return F+=5,!1;if("null"==o.slice(F,F+4))return F+=4,null;$()}return"$"},U=function(t){var e,i;if("$"==t&&$(),"string"==typeof t){if("@"==(I?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];t=B(),"]"!=t;i||(i=!0))i&&(","==t?(t=B(),"]"==t&&$()):$()),","==t&&$(),e.push(U(t));return e}if("{"==t){for(e={};t=B(),"}"!=t;i||(i=!0))i&&(","==t?(t=B(),"}"==t&&$()):$()),(","==t||"string"!=typeof t||"@"!=(I?t.charAt(0):t[0])||":"!=B())&&$(),e[t.slice(1)]=U(B());return e}$()}return t},W=function(t,e,i){var n=V(t,e,i);n===g?delete t[e]:t[e]=n},V=function(t,e,i){var n,s=t[e];if("object"==typeof s&&s)if(_.call(s)==E)for(n=s.length;n--;)W(s,n,i);else m(s,function(t){W(s,t,i)});return i.call(t,e,s)};n.parse=function(t,e){var i,n;return F=0,j=""+t,i=U(B()),"$"!=B()&&$(),F=j=null,e&&_.call(e)==w?V((n={},n[""]=i,n),"",e):i}}}return n.runInContext=t,n}var e="function"==typeof define&&define.amd,i={"function":!0,object:!0},n=i[typeof exports]&&exports&&!exports.nodeType&&exports,s=i[typeof window]&&window||this,o=n&&i[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;if(!o||o.global!==o&&o.window!==o&&o.self!==o||(s=o),n&&!e)t(s,n);else{var r=s.JSON,a=s.JSON3,l=!1,u=t(s,s.JSON3={noConflict:function(){return l||(l=!0,s.JSON=r,s.JSON3=a,r=a=null),u}});s.JSON={parse:u.parse,stringify:u.stringify}}e&&define("json3",[],function(){return u})}.call(this),function(t,e){"function"==typeof define&&define.amd?define("common/enum/loggingLevels",[],t):(e.logging||(e.logging={}),e.logging.loggingLevels=t())}(function(){return{DEBUG:100,INFO:200,WARN:300,ERROR:400}},this),function(t,e){"function"==typeof define&&define.amd?define("common/logging/Level",["common/enum/loggingLevels"],t):(e.logging||(e.logging={}),e.logging.Level=t(e.logging.loggingLevels))}(function(t){function e(t,e){this.level=t,this.name=e.toUpperCase()}e.prototype.isGreaterOrEqual=function(t){var i=(t instanceof e?t:e.getLevel(t)).level;return this.level>=i},e.prototype.toString=function(){return this.name},e.getLevel=function(t){return e[t.toUpperCase()]};for(var i in t)t.hasOwnProperty(i)&&(e[i]=new e(t[i],i));return e},this),function(t,e){"function"==typeof define&&define.amd?define("common/logging/LogItem",[],t):(e.logging||(e.logging={}),e.logging.LogItem=t())}(function(){"use strict";function t(t){var e,i=t.getHours().toString(),n=t.getMinutes().toString(),s=t.getSeconds().toString(),o=t.getMilliseconds();return 1==i.length&&(i="0"+i),1==n.length&&(n="0"+n),1==s.length&&(s="0"+s),e=i+":"+n+":"+s+"."+o}function e(t){for(var e in t)if(t.hasOwnProperty(e)){if("args"===e)for(var i=0,n=t[e].length;n>i;i++)t[e][i]instanceof Error&&(t[e][i]=t[e][i].message);this[e]=t[e]}}return e.prototype.toArray=function(){var e=[];return e.push(t(this.time)),e.push("["+this.id+"]"),"unknown"!==this.file&&e.push("["+this.file+":"+this.line+"]"),e.push("["+this.level.toString()+"] -"),e=e.concat(this.args)},e},this),function(t,e){"function"==typeof define&&define.amd?define("common/logging/Log",["common/logging/Level","common/logging/LogItem"],t):(e.logging||(e.logging={}),e.logging.Log=t(e.logging.Level,e.logging.LogItem))}(function(t,e){function i(e){return function(){return this._prepareLogItem({level:t.getLevel(e),args:arguments})}}function n(t,e){this._id=t.id,this._callback=e}return n.prototype._prepareLogItem=function(t){t.id=this._id,t.args=Array.prototype.slice.call(t.args,0),t.time=new Date;var i=(new Error).stack;if(i){var n=i.split("\n")[2],s=n.match(/\/(\w+\.\w+):(\d+)/i);s&&(t.file=s[1],t.line=s[2])}return t.file||(t.file="unknown",t.line="0"),t=new e(t),this._callback(t),t},n.prototype.debug=i("debug"),n.prototype.info=i("info"),n.prototype.warn=i("warn"),n.prototype.error=i("error"),n},this),function(t,e){"function"==typeof define&&define.amd?define("common/logging/appender/ConsoleAppender",[],t):(e.logging||(e.logging={}),e.logging.appender||(e.logging.appender={}),e.logging.appender.ConsoleAppender=t())}(function(){function t(){}return t.prototype.console=function(){if("undefined"==typeof console){var t=function(){};return{assert:t,clear:t,count:t,debug:t,dir:t,dirxml:t,error:t,group:t,groupCollapsed:t,groupEnd:t,info:t,log:t,markTimeline:t,profile:t,profileEnd:t,table:t,time:t,timeEnd:t,timeStamp:t,trace:t,warn:t}}return console}(),t.prototype.write=function(t){var e=this.console.log;switch(t.level.toString()){case"DEBUG":e=this.console.debug||this.console.log;break;case"INFO":e=this.console.info||this.console.log;break;case"WARN":e=this.console.warn;break;case"ERROR":e=this.console.error}try{e.apply(this.console,t.toArray())}catch(i){try{Function.prototype.apply.call(e,this.console,t.toArray())}catch(n){}}},t},this),function(t,e,i){"function"==typeof define&&define.amd?define("common/logging/LoggerManager",["underscore","common/logging/Log","common/logging/Level","common/logging/appender/ConsoleAppender"],t):(e.logging||(e.logging={}),e.logging.LoggerManager=t(i,e.logging.Log,e.logging.Level,e.logging.appender.ConsoleAppender))}(function(t,e,i,n){var s={console:n},o=function(t){this.initialize(t||{})};return t.extend(o.prototype,{defaults:function(){return{enabled:!1,level:"error",appenders:{},appenderInstances:{},loggers:{}}},initialize:function(e){this.attributes=t.defaults(e,this.defaults());var i={};t.each(s,function(t,e){i[e]=new t}),this.set("appenderInstances",i)},get:function(t){return this.attributes[t]},set:function(t,e){this.attributes[t]=e},register:function(i){var n={id:"root"};if("string"==typeof i&&""!==i?n.id=i:i&&i.hasOwnProperty("id")&&(n.id=i.id),!this.get("loggers").hasOwnProperty(n.id)){var s=this.get("loggers");s[n.id]=new e(n,t.bind(this._processLogItem,this)),this.set("loggers",s)}return this.get("loggers")[n.id]},disable:function(){this.set("enabled",!1)},enable:function(t){t&&this.set("level",i.getLevel(t)),this.set("enabled",!0)},setLevel:function(t){this.set("level",t);
  },_processLogItem:function(t){this.get("enabled")&&t.level.isGreaterOrEqual(this.get("level"))&&this._appendLogItem(t)},_appendLogItem:function(t){var e=this.get("appenders"),i=this.get("appenderInstances");for(var n in e)i.hasOwnProperty(e[n])&&i[e[n]].write(t)}}),o},this,this._),define("logger",["require","exports","module","common/logging/LoggerManager"],function(t,e,i){"use strict";var n=t("common/logging/LoggerManager"),s=i.config(),o=new n(s);return o}),function(t){"use strict";define("xdm",["json3","logger"],t)}(function(t,e){function i(t,e){var i=typeof t[e];return"function"==i||!("object"!=i||!t[e])||"unknown"==i}function n(t,e){return!("object"!=typeof t[e]||!t[e])}function s(t){return"[object Array]"===Object.prototype.toString.call(t)}function o(){var t="Shockwave Flash",e="application/x-shockwave-flash";if(!m(navigator.plugins)&&"object"==typeof navigator.plugins[t]){var i=navigator.plugins[t].description;i&&!m(navigator.mimeTypes)&&navigator.mimeTypes[e]&&navigator.mimeTypes[e].enabledPlugin&&(S=i.match(/\d+/g))}if(!S){var n;try{n=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),S=Array.prototype.slice.call(n.GetVariable("$version").match(/(\d+),(\d+),(\d+),(\d+)/),1),n=null}catch(s){}}if(!S)return!1;var o=parseInt(S[0],10),r=parseInt(S[1],10);return E=o>9&&r>0,!0}function r(){if(!U){U=!0,$("firing dom_onReady");for(var t=0;t<W.length;t++)W[t]();W.length=0}}function a(t,e){return U?void t.call(e):void W.push(function(){t.call(e)})}function l(){var t=parent;if(""!==R)for(var e=0,i=R.split(".");e<i.length;e++)t=t[i[e]];return t.easyXDM}function u(t){return $("Settings namespace to '"+t+"'"),window.easyXDM=j,R=t,R&&(z="easyXDM_"+R.replace(".","_")+"_"),F}function c(t){return t.match(N)[3]}function h(t){return t.match(N)[4]||""}function d(t){var e=t.toLowerCase().match(N),i=e[2],n=e[3],s=e[4]||"";return("http:"==i&&":80"==s||"https:"==i&&":443"==s)&&(s=""),i+"//"+n+s}function p(t){if(t=t.replace(P,"$1/"),!t.match(/^(http||https):\/\//)){var e="/"===t.substring(0,1)?"":location.pathname;"/"!==e.substring(e.length-1)&&(e=e.substring(0,e.lastIndexOf("/")+1)),t=location.protocol+"//"+location.host+e+t}for(;L.test(t);)t=t.replace(L,"");return $("resolved url '"+t+"'"),t}function f(t,e){var i="",n=t.indexOf("#");-1!==n&&(i=t.substring(n),t=t.substring(0,n));var s=[];for(var o in e)e.hasOwnProperty(o)&&s.push(o+"="+encodeURIComponent(e[o]));return t+(H?"#":-1==t.indexOf("?")?"?":"&")+s.join("&")+i}function m(t){return"undefined"==typeof t}function g(t,e,i){var n;for(var s in e)e.hasOwnProperty(s)&&(s in t?(n=e[s],"object"==typeof n?g(t[s],n,i):i||(t[s]=e[s])):t[s]=e[s]);return t}function v(){var t=document.body.appendChild(document.createElement("form")),e=t.appendChild(document.createElement("input"));e.name=z+"TEST"+O,x=e!==t.elements[e.name],document.body.removeChild(t),$("HAS_NAME_PROPERTY_BUG: "+x)}function _(t){$("creating frame: "+t.props.src),m(x)&&v();var e;x?e=document.createElement('<iframe name="'+t.props.name+'"/>'):(e=document.createElement("IFRAME"),e.name=t.props.name),e.id=e.name=t.props.name,delete t.props.name,"string"==typeof t.container&&(t.container=document.getElementById(t.container)),t.container||(g(e.style,{position:"absolute",top:"-2000px",left:"0px"}),t.container=document.body);var i=t.props.src;if(t.props.src="javascript:false",g(e,t.props),e.border=e.frameBorder=0,e.allowTransparency=!0,t.container.appendChild(e),t.onLoad&&M(e,"load",t.onLoad),t.usePost){var n,s=t.container.appendChild(document.createElement("form"));if(s.target=e.name,s.action=i,s.method="POST","object"==typeof t.usePost)for(var o in t.usePost)t.usePost.hasOwnProperty(o)&&(x?n=document.createElement('<input name="'+o+'"/>'):(n=document.createElement("INPUT"),n.name=o),n.value=t.usePost[o],s.appendChild(n));s.submit(),s.parentNode.removeChild(s)}else e.src=i;return t.props.src=i,e}function b(t,e){"string"==typeof t&&(t=[t]);for(var i,n=t.length;n--;)if(i=t[n],i=new RegExp("^"==i.substr(0,1)?i:"^"+i.replace(/(\*)/g,".$1").replace(/\?/g,".")+"$"),i.test(e))return!0;return!1}function y(t){var e,n=t.protocol;if(t.isHost=t.isHost||m(K.xdm_p),H=t.hash||!1,$("preparing transport stack"),t.props||(t.props={}),t.isHost)t.remote=p(t.remote),t.channel=t.channel||"default"+O++,t.secret=Math.random().toString(16).substring(2),m(n)?(n=d(location.href)==d(t.remote)?"4":i(window,"postMessage")||i(document,"postMessage")?"1":t.swf&&i(window,"ActiveXObject")&&o()?"6":"Gecko"===navigator.product&&"frameElement"in window&&-1==navigator.userAgent.indexOf("WebKit")?"5":t.remoteHelper?"2":"0",$("selecting protocol: "+n)):$("using protocol: "+n);else if($("using parameters from query"),t.channel=K.xdm_c.replace(/["'<>\\]/g,""),t.secret=K.xdm_s,t.remote=K.xdm_e.replace(/["'<>\\]/g,""),n=K.xdm_p,t.acl&&!b(t.acl,t.remote))throw new Error("Access denied for "+t.remote);switch(t.protocol=n,n){case"0":if(g(t,{interval:100,delay:2e3,useResize:!0,useParent:!1,usePolling:!1},!0),t.isHost){if(!t.local){$("looking for image to use as local");for(var s,r=location.protocol+"//"+location.host,a=document.body.getElementsByTagName("img"),l=a.length;l--;)if(s=a[l],s.src.substring(0,r.length)===r){t.local=s.src;break}t.local||($("no image found, defaulting to using the window"),t.local=window)}var u={xdm_c:t.channel,xdm_p:0};t.local===window?(t.usePolling=!0,t.useParent=!0,t.local=location.protocol+"//"+location.host+location.pathname+location.search,u.xdm_e=t.local,u.xdm_pa=1):u.xdm_e=p(t.local),t.container&&(t.useResize=!1,u.xdm_po=1),t.remote=f(t.remote,u)}else g(t,{channel:K.xdm_c,remote:K.xdm_e,useParent:!m(K.xdm_pa),usePolling:!m(K.xdm_po),useResize:t.useParent?!1:t.useResize});e=[new F.stack.HashTransport(t),new F.stack.ReliableBehavior({}),new F.stack.QueueBehavior({encode:!0,maxLength:4e3-t.remote.length}),new F.stack.VerifyBehavior({initiate:t.isHost})];break;case"1":e=[new F.stack.PostMessageTransport(t)];break;case"2":t.isHost&&(t.remoteHelper=p(t.remoteHelper)),e=[new F.stack.NameTransport(t),new F.stack.QueueBehavior,new F.stack.VerifyBehavior({initiate:t.isHost})];break;case"3":e=[new F.stack.NixTransport(t)];break;case"4":e=[new F.stack.SameOriginTransport(t)];break;case"5":e=[new F.stack.FrameElementTransport(t)];break;case"6":S||o(),e=[new F.stack.FlashTransport(t)]}return e.push(new F.stack.QueueBehavior({lazy:t.lazy,remove:!0})),e}function w(t){for(var e,i={incoming:function(t,e){this.up.incoming(t,e)},outgoing:function(t,e){this.down.outgoing(t,e)},callback:function(t){this.up.callback(t)},init:function(){this.down.init()},destroy:function(){this.down.destroy()}},n=0,s=t.length;s>n;n++)e=t[n],g(e,i,!0),0!==n&&(e.down=t[n-1]),n!==s-1&&(e.up=t[n+1]);return e}function T(t){t.up.down=t.down,t.down.up=t.up,t.up=t.down=null}if("undefined"==typeof document)return{};var x,S,E,M,I,C=window.setTimeout,D=e.register("EasyXDM"),k=this,O=Math.floor(1e4*Math.random()),A=Function.prototype,N=/^((http.?:)\/\/([^:\/\s]+)(:\d+)*)/,L=/[\-\w]+\/\.\.\//,P=/([^:])\/\//g,R="",F={},j=window.easyXDM,z="easyXDM_",H=!1,$=A;if(i(window,"addEventListener"))M=function(t,e,i){$("adding listener "+e),t.addEventListener(e,i,!1)},I=function(t,e,i){$("removing listener "+e),t.removeEventListener(e,i,!1)};else{if(!i(window,"attachEvent"))throw new Error("Browser not supported");M=function(t,e,i){$("adding listener "+e),t.attachEvent("on"+e,i)},I=function(t,e,i){$("removing listener "+e),t.detachEvent("on"+e,i)}}var B,U=!1,W=[];if("readyState"in document?(B=document.readyState,U="complete"==B||~navigator.userAgent.indexOf("AppleWebKit/")&&("loaded"==B||"interactive"==B)):U=!!document.body,!U){if(i(window,"addEventListener"))M(document,"DOMContentLoaded",r);else if(M(document,"readystatechange",function(){"complete"==document.readyState&&r()}),document.documentElement.doScroll&&window===top){var V=function(){if(!U){try{document.documentElement.doScroll("left")}catch(t){return void C(V,1)}r()}};V()}M(window,"load",r)}var K=function(t){t=t.substring(1).split("&");for(var e,i={},n=t.length;n--;)e=t[n].split("="),i[e[0]]=decodeURIComponent(e[1]);return i}(/xdm_e=/.test(location.search)?location.search:location.hash),q=function(){var t={},e={a:[1,2,3]},i='{"a":[1,2,3]}';return"undefined"!=typeof JSON&&"function"==typeof JSON.stringify&&JSON.stringify(e).replace(/\s/g,"")===i?JSON:(Object.toJSON&&Object.toJSON(e).replace(/\s/g,"")===i&&(t.stringify=Object.toJSON),"function"==typeof String.prototype.evalJSON&&(e=i.evalJSON(),e.a&&3===e.a.length&&3===e.a[2]&&(t.parse=function(t){return t.evalJSON()})),t.stringify&&t.parse?(q=function(){return t},t):null)};g(F,{version:"2.4.19.1",query:K,stack:{},apply:g,getJSONObject:q,whenReady:a,noConflict:u});var Y={_deferred:[],flush:function(){this.trace("... deferred messages ...");for(var t=0,e=this._deferred.length;e>t;t++)this.trace(this._deferred[t]);this._deferred.length=0,this.trace("... end of deferred messages ...")},getTime:function(){var t=new Date,e=t.getHours()+"",i=t.getMinutes()+"",n=t.getSeconds()+"",s=t.getMilliseconds()+"",o="000";return 1==e.length&&(e="0"+e),1==i.length&&(i="0"+i),1==n.length&&(n="0"+n),s=o.substring(s.length)+s,e+":"+i+":"+n+"."+s},log:function(t){D.debug(location.host+(R?":"+R:"")+": "+t)},getTracer:function(t){var i=e.register(t);return function(t){i.debug(t)}}};return Y.log("easyXDM present on '"+location.href),F.Debug=Y,$=Y.getTracer("EasyXDM.{Private}"),F.DomHelper={on:M,un:I,requiresJSON:function(t){n(window,"JSON")?Y.log("native JSON found"):(Y.log("loading external JSON"),document.write('<script type="text/javascript" src="'+t+'"></script>'))}},function(){var t={};F.Fn={set:function(e,i){this._trace("storing function "+e),t[e]=i},get:function(e,i){if(this._trace("retrieving function "+e),t.hasOwnProperty(e)){var n=t[e];return n||this._trace(e+" not found"),i&&delete t[e],n}}},F.Fn._trace=Y.getTracer("easyXDM.Fn")}(),F.Socket=function(t){var e=Y.getTracer("easyXDM.Socket");e("constructor");var i=w(y(t).concat([{incoming:function(e,i){t.onMessage(e,i)},callback:function(e){t.onReady&&t.onReady(e)}}])),n=d(t.remote);this.origin=d(t.remote),this.destroy=function(){i.destroy()},this.postMessage=function(t){i.outgoing(t,n)},i.init()},F.Rpc=function(t,e){var i=Y.getTracer("easyXDM.Rpc");if(i("constructor"),e.local)for(var n in e.local)if(e.local.hasOwnProperty(n)){var s=e.local[n];"function"==typeof s&&(e.local[n]={method:s})}var o=w(y(t).concat([new F.stack.RpcBehavior(this,e),{callback:function(e){t.onReady&&t.onReady(e)}}]));this.origin=d(t.remote),this.destroy=function(){o.destroy()},o.init()},F.stack.SameOriginTransport=function(t){var e=Y.getTracer("easyXDM.stack.SameOriginTransport");e("constructor");var i,n,s,o;return i={outgoing:function(t,e,i){s(t),i&&i()},destroy:function(){e("destroy"),n&&(n.parentNode.removeChild(n),n=null)},onDOMReady:function(){e("init"),o=d(t.remote),t.isHost?(g(t.props,{src:f(t.remote,{xdm_e:location.protocol+"//"+location.host+location.pathname,xdm_c:t.channel,xdm_p:4}),name:z+t.channel+"_provider"}),n=_(t),F.Fn.set(t.channel,function(t){return s=t,C(function(){i.up.callback(!0)},0),function(t){i.up.incoming(t,o)}})):(s=l().Fn.get(t.channel,!0)(function(t){i.up.incoming(t,o)}),C(function(){i.up.callback(!0)},0))},init:function(){a(i.onDOMReady,i)}}},F.stack.FlashTransport=function(t){function e(t,e){C(function(){n("received message"),s.up.incoming(t,r)},0)}function i(e){n("creating factory with SWF from "+e);var i=t.swf+"?host="+t.isHost,s="easyXDM_swf_"+Math.floor(1e4*Math.random());F.Fn.set("flash_loaded"+e.replace(/[\-.]/g,"_"),function(){F.stack.FlashTransport[e].swf=l=u.firstChild;for(var t=F.stack.FlashTransport[e].queue,i=0;i<t.length;i++)t[i]();t.length=0}),t.swfContainer?u="string"==typeof t.swfContainer?document.getElementById(t.swfContainer):t.swfContainer:(u=document.createElement("div"),g(u.style,E&&t.swfNoThrottle?{height:"20px",width:"20px",position:"fixed",right:0,top:0}:{height:"1px",width:"1px",position:"absolute",overflow:"hidden",right:0,top:0}),document.body.appendChild(u));var o="callback=flash_loaded"+encodeURIComponent(e.replace(/[\-.]/g,"_"))+"&proto="+k.location.protocol+"&domain="+encodeURIComponent(c(k.location.href))+"&port="+encodeURIComponent(h(k.location.href))+"&ns="+encodeURIComponent(R);o+="&log=true",u.innerHTML="<object height='20' width='20' type='application/x-shockwave-flash' id='"+s+"' data='"+i+"'><param name='allowScriptAccess' value='always'></param><param name='wmode' value='transparent'><param name='movie' value='"+i+"'></param><param name='flashvars' value='"+o+"'></param><embed type='application/x-shockwave-flash' FlashVars='"+o+"' allowScriptAccess='always' wmode='transparent' src='"+i+"' height='1' width='1'></embed></object>"}var n=Y.getTracer("easyXDM.stack.FlashTransport");n("constructor");var s,o,r,l,u;return s={outgoing:function(e,i,n){l.postMessage(t.channel,e.toString()),n&&n()},destroy:function(){n("destroy");try{l.destroyChannel(t.channel)}catch(e){}l=null,o&&(o.parentNode.removeChild(o),o=null)},onDOMReady:function(){n("init"),r=t.remote,F.Fn.set("flash_"+t.channel+"_init",function(){C(function(){n("firing onReady"),s.up.callback(!0)})}),F.Fn.set("flash_"+t.channel+"_onMessage",e),t.swf=p(t.swf);var a=c(t.swf),u=function(){F.stack.FlashTransport[a].init=!0,l=F.stack.FlashTransport[a].swf,l.createChannel(t.channel,t.secret,d(t.remote),t.isHost),t.isHost&&(E&&t.swfNoThrottle&&g(t.props,{position:"fixed",right:0,top:0,height:"20px",width:"20px"}),g(t.props,{src:f(t.remote,{xdm_e:d(location.href),xdm_c:t.channel,xdm_p:6,xdm_s:t.secret}),name:z+t.channel+"_provider"}),o=_(t))};F.stack.FlashTransport[a]&&F.stack.FlashTransport[a].init?u():F.stack.FlashTransport[a]?F.stack.FlashTransport[a].queue.push(u):(F.stack.FlashTransport[a]={queue:[u]},i(a))},init:function(){a(s.onDOMReady,s)}}},F.stack.PostMessageTransport=function(t){function e(t){if(t.origin)return d(t.origin);if(t.uri)return d(t.uri);if(t.domain)return location.protocol+"//"+t.domain;throw"Unable to retrieve the origin of the event"}function i(i){var o=e(i);n("received message '"+i.data+"' from "+o),o==l&&i.data.substring(0,t.channel.length+1)==t.channel+" "&&s.up.incoming(i.data.substring(t.channel.length+1),o)}var n=Y.getTracer("easyXDM.stack.PostMessageTransport");n("constructor");var s,o,r,l;return s={outgoing:function(e,i,n){r.postMessage(t.channel+" "+e,i||l),n&&n()},destroy:function(){n("destroy"),I(window,"message",i),o&&(r=null,o.parentNode.removeChild(o),o=null)},onDOMReady:function(){if(n("init"),l=d(t.remote),t.isHost){var e=function(a){a.data==t.channel+"-ready"&&(n("firing onReady"),r="postMessage"in o.contentWindow?o.contentWindow:o.contentWindow.document,I(window,"message",e),M(window,"message",i),C(function(){s.up.callback(!0)},0))};M(window,"message",e),g(t.props,{src:f(t.remote,{xdm_e:d(location.href),xdm_c:t.channel,xdm_p:1}),name:z+t.channel+"_provider"}),o=_(t)}else M(window,"message",i),r="postMessage"in window.parent?window.parent:window.parent.document,r.postMessage(t.channel+"-ready",l),C(function(){s.up.callback(!0)},0)},init:function(){a(s.onDOMReady,s)}}},F.stack.FrameElementTransport=function(t){var e=Y.getTracer("easyXDM.stack.FrameElementTransport");e("constructor");var i,n,s,o;return i={outgoing:function(t,e,i){s.call(this,t),i&&i()},destroy:function(){e("destroy"),n&&(n.parentNode.removeChild(n),n=null)},onDOMReady:function(){e("init"),o=d(t.remote),t.isHost?(g(t.props,{src:f(t.remote,{xdm_e:d(location.href),xdm_c:t.channel,xdm_p:5}),name:z+t.channel+"_provider"}),n=_(t),n.fn=function(t){return delete n.fn,s=t,C(function(){i.up.callback(!0)},0),function(t){i.up.incoming(t,o)}}):(document.referrer&&d(document.referrer)!=K.xdm_e&&(window.top.location=K.xdm_e),s=window.frameElement.fn(function(t){i.up.incoming(t,o)}),i.up.callback(!0))},init:function(){a(i.onDOMReady,i)}}},F.stack.NameTransport=function(t){function e(e){var i=t.remoteHelper+(l?"#_3":"#_2")+t.channel;o("sending message "+e),o("navigating to  '"+i+"'"),u.contentWindow.sendMessage(e,i)}function i(){l?2!==++h&&l||r.up.callback(!0):(e("ready"),o("calling onReady"),r.up.callback(!0))}function n(t){o("received message "+t),r.up.incoming(t,b)}function s(){v&&C(function(){v(!0)},0)}var o=Y.getTracer("easyXDM.stack.NameTransport");o("constructor"),t.isHost&&m(t.remoteHelper)&&o("missing remoteHelper");var r,l,u,c,h,v,b,y;return r={outgoing:function(t,i,n){v=n,e(t)},destroy:function(){o("destroy"),u.parentNode.removeChild(u),u=null,l&&(c.parentNode.removeChild(c),c=null)},onDOMReady:function(){o("init"),l=t.isHost,h=0,b=d(t.remote),t.local=p(t.local),l?(F.Fn.set(t.channel,function(e){o("received initial message "+e),l&&"ready"===e&&(F.Fn.set(t.channel,n),i())}),y=f(t.remote,{xdm_e:t.local,xdm_c:t.channel,xdm_p:2}),g(t.props,{src:y+"#"+t.channel,name:z+t.channel+"_provider"}),c=_(t)):(t.remoteHelper=t.remote,F.Fn.set(t.channel,n));var e=function(){var n=u||this;I(n,"load",e),F.Fn.set(t.channel+"_load",s),function o(){"function"==typeof n.contentWindow.sendMessage?i():C(o,50)}()};u=_({props:{src:t.local+"#_4"+t.channel},onLoad:e})},init:function(){a(r.onDOMReady,r)}}},F.stack.HashTransport=function(t){function e(e){if(o("sending message '"+(p+1)+" "+e+"' to "+b),!m)return void o("no caller window");var i=t.remote+"#"+p++ +"_"+e;(l||!v?m.contentWindow:m).location=i}function i(t){h=t,o("received message '"+h+"' from "+b),r.up.incoming(h.substring(h.indexOf("_")+1),b)}function n(){if(f){var t=f.location.href,e="",n=t.indexOf("#");-1!=n&&(e=t.substring(n)),e&&e!=h&&(o("poll: new message"),i(e))}}function s(){o("starting polling"),u=setInterval(n,c)}var o=Y.getTracer("easyXDM.stack.HashTransport");o("constructor");var r,l,u,c,h,p,f,m,v,b;return r={outgoing:function(t,i){e(t)},destroy:function(){window.clearInterval(u),(l||!v)&&m.parentNode.removeChild(m),m=null},onDOMReady:function(){if(l=t.isHost,c=t.interval,h="#"+t.channel,p=0,v=t.useParent,b=d(t.remote),l){if(g(t.props,{src:t.remote,name:z+t.channel+"_provider"}),v)t.onLoad=function(){f=window,s(),r.up.callback(!0)};else{var e=0,i=t.delay/50;!function n(){if(++e>i)throw o("unable to get reference to _listenerWindow, giving up"),new Error("Unable to reference listenerwindow");try{f=m.contentWindow.frames[z+t.channel+"_consumer"]}catch(a){}f?(s(),o("got a reference to _listenerWindow"),r.up.callback(!0)):C(n,50)}()}m=_(t)}else f=window,s(),v?(m=parent,r.up.callback(!0)):(g(t,{props:{src:t.remote+"#"+t.channel+new Date,name:z+t.channel+"_consumer"},onLoad:function(){r.up.callback(!0)}}),m=_(t))},init:function(){a(r.onDOMReady,r)}}},F.stack.ReliableBehavior=function(t){var e=Y.getTracer("easyXDM.stack.ReliableBehavior");e("constructor");var i,n,s=0,o=0,r="";return i={incoming:function(t,a){e("incoming: "+t);var l=t.indexOf("_"),u=t.substring(0,l).split(",");t=t.substring(l+1),u[0]==s&&(e("message delivered"),r="",n&&n(!0)),t.length>0&&(e("sending ack, and passing on "+t),i.down.outgoing(u[1]+","+s+"_"+r,a),o!=u[1]&&(o=u[1],i.up.incoming(t,a)))},outgoing:function(t,e,a){r=t,n=a,i.down.outgoing(o+","+ ++s+"_"+t,e)}}},F.stack.QueueBehavior=function(t){function e(){if(t.remove&&0===o.length)return i("removing myself from the stack"),void T(n);if(!r&&0!==o.length&&!s){i("dispatching from queue"),r=!0;var a=o.shift();n.down.outgoing(a.data,a.origin,function(t){r=!1,a.callback&&C(function(){a.callback(t)},0),e()})}}var i=Y.getTracer("easyXDM.stack.QueueBehavior");i("constructor");var n,s,o=[],r=!0,a="",l=0,u=!1,c=!1;return n={init:function(){m(t)&&(t={}),t.maxLength&&(l=t.maxLength,c=!0),t.lazy?u=!0:n.down.init()},callback:function(t){r=!1;var i=n.up;e(),i.callback(t)},incoming:function(e,s){if(c){var o=e.indexOf("_"),r=parseInt(e.substring(0,o),10);a+=e.substring(o+1),0===r?(i("received the last fragment"),t.encode&&(a=decodeURIComponent(a)),n.up.incoming(a,s),a=""):i("waiting for more fragments, seq="+e)}else n.up.incoming(e,s)},outgoing:function(s,r,a){t.encode&&(s=encodeURIComponent(s));var h,d=[];if(c){for(;0!==s.length;)h=s.substring(0,l),s=s.substring(h.length),d.push(h);for(;h=d.shift();)i("enqueuing"),o.push({data:d.length+"_"+h,origin:r,callback:0===d.length?a:null})}else o.push({data:s,origin:r,callback:a});u?n.down.init():e()},destroy:function(){i("destroy"),s=!0,n.down.destroy()}}},F.stack.VerifyBehavior=function(t){function e(){i("requesting verification"),s=Math.random().toString(16).substring(2),n.down.outgoing(s)}var i=Y.getTracer("easyXDM.stack.VerifyBehavior");i("constructor");var n,s,o;return n={incoming:function(r,a){var l=r.indexOf("_");-1===l?r===s?(i("verified, calling callback"),n.up.callback(!0)):o||(i("returning secret"),o=r,t.initiate||e(),n.down.outgoing(r)):r.substring(0,l)===o&&n.up.incoming(r.substring(l+1),a)},outgoing:function(t,e,i){n.down.outgoing(s+"_"+t,e,i)},callback:function(i){t.initiate&&e()}}},F.stack.RpcBehavior=function(t,e){function i(t){t.jsonrpc="2.0",r.down.outgoing(l.stringify(t))}function n(t,e){var n=Array.prototype.slice;return a("creating method "+e),function(){a("executing method "+e);var s,o=arguments.length,r={method:e};return o>0&&"function"==typeof arguments[o-1]?(o>1&&"function"==typeof arguments[o-2]?(s={success:arguments[o-2],error:arguments[o-1]},r.params=n.call(arguments,0,o-2)):(s={success:arguments[o-1]},r.params=n.call(arguments,0,o-1)),c[""+ ++u]=s,r.id=u):r.params=n.call(arguments,0),t.namedParams&&1===r.params.length&&(r.params=r.params[0]),i(r),r.id}}function o(t,e,n,o){if(!n)return a("requested to execute non-existent procedure "+t),void(e&&i({id:e,error:{code:-32601,message:"Procedure not found."}}));a("requested to execute procedure "+t);var r,l;e?(r=function(t){r=A,i({id:e,result:t})},l=function(t,n){l=A;var s={id:e,error:{code:-32099,message:t}};n&&(s.error.data=n),i(s)}):r=l=A,s(o)||(o=[o]);try{var u=n.method.apply(n.scope,o.concat([r,l]));m(u)||r(u)}catch(c){l(c.message)}}var r,a=Y.getTracer("easyXDM.stack.RpcBehavior"),l=e.serializer||q(),u=0,c={};return r={incoming:function(t,n){var s=l.parse(t);if(s.method)a("received request to execute method "+s.method+(s.id?" using callback id "+s.id:"")),s&&s.params&&s.params[0]&&"object"==typeof s.params[0]&&(s.params[0].id=s.id),e.handle?e.handle(s,i):o(s.method,s.id,e.local[s.method],s.params);else{a("received return value destined to callback with id "+s.id);var r=c[s.id];s.error?r.error?r.error(s.error):a("unhandled error returned."):r.success&&r.success(s.result),delete c[s.id]}},init:function(){if(a("init"),e.remote){a("creating stubs");for(var i in e.remote)e.remote.hasOwnProperty(i)&&(t[i]=n(e.remote[i],i))}r.down.init()},destroy:function(){a("destroy");for(var i in e.remote)e.remote.hasOwnProperty(i)&&t.hasOwnProperty(i)&&delete t[i];r.down.destroy()}}},F}),define("fakeXhrFactory",["require","underscore"],function(t){var e=t("underscore");return function(t){var i={},n={};return e.extend(t,{getResponseHeader:function(e){var i,n=/^(.*?):[ \t]*([^\r\n]*)$/gm;if(4===t.readyState){if(!this.responseHeaders)for(this.responseHeaders={};i=n.exec(this.responseHeadersString);)this.responseHeaders[i[1].toLowerCase()]=i[2];i=this.responseHeaders[e.toLowerCase()]}return null==i?null:i},getAllResponseHeaders:function(){return 2===t.readyState?this.responseHeadersString:null},setRequestHeader:function(e,s){var o=e.toLowerCase();return t.readyState||(e=i[o]=i[o]||e,n[e]=s),this}})}}),define("transport/xdmRequest",["require","jquery","underscore","xdm","fakeXhrFactory","jrs.configs","logger"],function(t){"use strict";function e(t,e){var i=n.Deferred(),s=n.Deferred(),o=t.request(e,function(t){i.resolve(t.data,t.status,r(t.xhr))},function(t){i.reject(t.message,t.data)});return e.success&&i.done(e.success),e.error&&i.fail(e.error),e.complete&&i.always(e.complete),i.done(s.resolve).fail(s.reject).progress(s.notify),s.fail(function(){"pending"==i.state()&&t.abort(o)}),s}function i(){var t=[];return t.push({name:"logEnabled",value:l.get("enabled")}),l.get("level")&&t.push({name:"logLevel",value:l.get("level")}),n.param(t)}var n=t("jquery"),s=t("underscore"),o=t("xdm"),r=t("fakeXhrFactory"),a=t("jrs.configs"),l=t("logger"),u=function(t){if(0===arguments.length)throw new Error("Not enough arguments to perform the request.");var i=u.create(t.baseUrl?t.baseUrl:a.contextPath);return e(i,t)};return u.create=s.memoize(function(t){return new o.Rpc({remote:t+"/xdm.html?"+i(),container:document.body,props:{style:{display:"none"}}},{remote:{request:{},abort:{}}})}),u}),define("transport/xhrRequest",["require","jquery","underscore","logger"],function(t){"use strict";function e(){r.trigger.apply(r,arguments)}function i(t){(401==t.status||t.getResponseHeader("LoginRequested"))&&(n(window).trigger("sessionExpired"),o.warn("Session timed-out. Redirecting to login page."),window.location.reload())}var n=t("jquery"),s=t("underscore"),o=t("logger").register("request");if("undefined"==typeof document)return{};var r=n(document);return function(t){return s.partial(e,"request:before").apply(null,arguments),n.ajax(t).fail(i).fail(function(t,e,i){t.getResponseHeader("adhocException")?o.error(t.getResponseHeader("adhocException")):(500==t.status||t.getResponseHeader("JasperServerError")&&!t.getResponseHeader("SuppressError"))&&o.error(t.responseText)}).fail(s.partial(e,"request:failure")).done(s.partial(e,"request:success"))}}),define("request",["require","jquery","underscore","jrs.configs","requestSettings","transport/xdmRequest","transport/xhrRequest"],function(t){"use strict";var e,i=t("jquery"),n=t("underscore"),s=t("jrs.configs"),o=t("requestSettings"),r=t("transport/xdmRequest"),a=t("transport/xhrRequest");return function(){e||(e=s.isXdm?r:a);var t=n.extend({},o,arguments[0]);return o.headers&&arguments[0].headers&&(t.headers=n.extend({},o.headers,arguments[0].headers)),arguments[0]=t,e.apply(i,arguments)}}),define("settings",["require","request","requestSettings","underscore","jrs.configs"],function(t){"use strict";var e=t("request"),i=t("requestSettings"),n=t("underscore"),s=t("jrs.configs"),o=s.contextPath+"/rest_v2/settings/",r=function(t,s){var r=n.extend({},i,{type:"GET",dataType:"json",url:o+t});e(r).fail(function(){s(null)}).then(function(t){s(t)})};return r.load=function(t,e,i,n){return n.isBuild?void i():void r(t,i)},r}),define("config/datepickerSettings",["require","jrs.configs","jquery.ui","underscore","settings!dateTimeSettings"],function(t){function e(t,e){var i="en";return t&&(s.contains(e,t)?i=t:s.contains(e,t.substring(0,2))&&(i=t.substring(0,2))),i.replace("_","-")}var i=t("jrs.configs"),n=t("jquery.ui"),s=t("underscore"),o=t("settings!dateTimeSettings"),r=e(i.userLocale,i.avaliableLocales);return o&&n(function(t){t.datepicker.regional[r]=o.datepicker,t.datepicker.setDefaults(t.datepicker.regional[r])}),n.datepicker.movePickerRelativelyToTriggerIcon=function(t,e){var i=n(t).offset().left,s=parseFloat(e.dpDiv.css("width").replace("px","")),o=i+t.offsetWidth+s<n(window).width();e.dpDiv.css({marginLeft:o?t.offsetWidth+"px":0})},n}),define("config/timepickerSettings",["require","jquery.timepicker.original","settings!dateTimeSettings","config/datepickerSettings"],function(t){var e=t("jquery.timepicker.original"),i=t("settings!dateTimeSettings");return t("config/datepickerSettings"),i&&e.timepicker.setDefaults(i.timepicker),e}),jQuery.noConflict();var JRS={vars:{element_scrolled:!1,ajax_in_progress:!1,current_flow:null,contextPath:__jrsConfigs__.contextPath},i18n:{}},Calendar={};if("undefined"==typeof isEncryptionOn)var isEncryptionOn=!1;var jaspersoft={components:{},i18n:{}};"undefined"==typeof JRS&&(JRS={Mocks:{}}),"undefined"==typeof JRS.vars&&(JRS.vars={element_scrolled:!1,ajax_in_progress:!1,current_flow:null}),"undefined"==typeof JRS.Export&&(JRS.Export={i18n:{"file.name.empty":"export.file.name.empty","file.name.too.long":"export.file.name.too.long","file.name.not.valid":"export.file.name.not.valid","export.select.users":"export.select.users","export.select.roles":"export.select.roles","export.session.expired":"export.session.expired","error.timeout":"export.file.name.empty"},configs:{TIMEOUT:12e5,DELAY:3e3}}),"undefined"==typeof localContext&&(localContext={}),__jrsConfigs__.calendar&&(JRS.i18n.bundledCalendarFormat=__jrsConfigs__.calendar.i18n.bundledCalendarFormat,JRS.i18n.bundledCalendarTimeFormat=__jrsConfigs__.calendar.i18n.bundledCalendarTimeFormat),define("namespace",["config/timepickerSettings"],function(t){return function(){var e;return e||t.jaspersoft}}(this));var ajax={};ajax.cancelRequestsBefore,ajax.LOADING_ID="loading",ajax.csrfRequestHeaders=new Hash,ajax.setCsrfHeaders=function(t){ajax.csrfRequestHeaders.each(function(e){t.setRequestHeader(e.key,e.value)})},AjaxRequester.addVar("CUMULATIVE_UPDATE","c").addVar("ROW_COPY_UPDATE","r").addVar("TARGETTED_REPLACE_UPDATE","t").addVar("EVAL_JSON","j").addVar("DUMMY_POST_PARAM","dummyPostData").addVar("MAX_WAIT_TIME",2e3).addVar("errorHandler",function(){return!1}).addMethod("doGet",function(){return this.xmlhttp?(this.xmlhttp.open("GET",this.url,this.async),this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),this.xmlhttp.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT"),this.xmlhttp.setRequestHeader("x-requested-with","AJAXRequest"),ajax.setCsrfHeaders(this.xmlhttp),this.xmlhttp.send(null),!0):!1}).addMethod("doPost",function(){return this.xmlhttp?(this.postData===AjaxRequester.prototype.DUMMY_POST_PARAM&&(this.postData=null),this.xmlhttp.open("POST",this.url,this.async),this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),this.xmlhttp.setRequestHeader("x-requested-with","AJAXRequest"),ajax.setCsrfHeaders(this.xmlhttp),this.xmlhttp.send(this.postData),!0):!1}).addMethod("processResponse",function(t){return function(){if(4==t.xmlhttp.readyState){if(ajax.cancelRequestsBefore&&ajax.cancelRequestsBefore>t.requestTime)return void ajaxRequestEnded(t);handleResponse(t)}}}).addMethod("setErrorHandler",function(t){this.errorHandler=errorHandler}).addMethod("verifyAjaxResponse",function(){return this.xmlhttp.getResponseHeader("Server")||this.confirmContinue()}).addMethod("startResponseTimer",function(){this.responseTimer=window.setTimeout(function(){dialogs.popup.show($(ajax.LOADING_ID),!0)},this.MAX_WAIT_TIME)}).addMethod("cancelResponseTimer",function(){window.clearTimeout(this.responseTimer)}).addMethod("confirmContinue",function(){return confirm(serverIsNotResponding)});var clobberingResponseHandler=function(t){var e=t.params[2];document.body.innerHTML=t.xmlhttp.responseText,document.fire("dom:loaded"),invokeCallbacks(e)},evalJSONResponseHandler=function(t){var e=null;try{e=t.xmlhttp.responseText.evalJSON()}catch(i){window.console&&console.log(i)}var n=t.params[2];invokeCallbacks(n,e)},ERROR_POPUP_DIV="jsErrorPopup",ERROR_POPUP_CONTENTS="errorPopupContents",ERROR_POPUP_BACK_BUTTON="errorBack",ERROR_POPUP_CLOSE_BUTTON="errorPopupCloseButton";ajax.ajaxRequestCount=0,define("core.ajax",["jquery","prototype","utils.common","builder","namespace"],function(t){return function(){var e;return e||t.ajax}}(this));var heartbeat={DOM_ID:"heartbeatOptin",PERMIT_CHECKBOX_ID:"heartbeatCheck",initialize:function(t){this._baseUrl=t.baseUrl,this._showDialog=t.showDialog,this._sendClientInfo=t.sendClientInfo,this._dom=$(this.DOM_ID),this._permit=$(this.PERMIT_CHECKBOX_ID),this._okButton=this._dom.select(layoutModule.BUTTON_PATTERN)[0],this._okButton.observe("click",this._okHandler.bind(this))},_okHandler:function(){dialogs.popup.hide(this._dom);var t=this._baseUrl+"/heartbeat.html?permit="+this._permit.checked;ajaxNonReturningUpdate(t,{errorHandler:baseErrorHandler})},start:function(){this._showDialog&&(dialogs.popup.show(this._dom),this._okButton.focus()),this._sendClientInfo&&this._doSendClientInfo()},_doSendClientInfo:function(){try{var t={};t.navAppName=navigator.appName,t.navAppVersion=navigator.appVersion,t.scrWidth=screen.width,t.scrHeight=screen.height,t.scrColorDepth=screen.colorDepth;var e=appendPostData("",t),i=this._baseUrl+"/heartbeatInfo.html";ajaxNonReturningUpdate(i,{postData:e})}catch(n){}}};define("components.heartbeat",["prototype","core.ajax"],function(t){return function(){
  var e;return e||t.heartbeat}}(this)),String.prototype.parseColor=function(){var t="#";if("rgb("==this.slice(0,4)){var e=this.slice(4,this.length-1).split(","),i=0;do t+=parseInt(e[i]).toColorPart();while(++i<3)}else if("#"==this.slice(0,1)){if(4==this.length)for(var i=1;4>i;i++)t+=(this.charAt(i)+this.charAt(i)).toLowerCase();7==this.length&&(t=this.toLowerCase())}return 7==t.length?t:arguments[0]||this},Element.collectTextNodes=function(t){return $A($(t).childNodes).collect(function(t){return 3==t.nodeType?t.nodeValue:t.hasChildNodes()?Element.collectTextNodes(t):""}).flatten().join("")},Element.collectTextNodesIgnoreClass=function(t,e){return $A($(t).childNodes).collect(function(t){return 3==t.nodeType?t.nodeValue:t.hasChildNodes()&&!Element.hasClassName(t,e)?Element.collectTextNodesIgnoreClass(t,e):""}).flatten().join("")},Element.setContentZoom=function(t,e){return t=$(t),t.setStyle({fontSize:e/100+"em"}),Prototype.Browser.WebKit&&window.scrollBy(0,0),t},Element.getInlineOpacity=function(t){return $(t).style.opacity||""},Element.forceRerendering=function(t){try{t=$(t);var e=document.createTextNode(" ");t.appendChild(e),t.removeChild(e)}catch(i){}};var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},Transitions:{linear:Prototype.K,sinoidal:function(t){return-Math.cos(t*Math.PI)/2+.5},reverse:function(t){return 1-t},flicker:function(t){var t=-Math.cos(t*Math.PI)/4+.75+Math.random()/4;return t>1?1:t},wobble:function(t){return-Math.cos(t*Math.PI*9*t)/2+.5},pulse:function(t,e){return-Math.cos(t*((e||5)-.5)*2*Math.PI)/2+.5},spring:function(t){return 1-Math.cos(4.5*t*Math.PI)*Math.exp(6*-t)},none:function(t){return 0},full:function(t){return 1}},DefaultOptions:{duration:1,fps:100,sync:!1,from:0,to:1,delay:0,queue:"parallel"},tagifyText:function(t){var e="position:relative";Prototype.Browser.IE&&(e+=";zoom:1"),t=$(t),$A(t.childNodes).each(function(i){3==i.nodeType&&(i.nodeValue.toArray().each(function(n){t.insertBefore(new Element("span",{style:e}).update(" "==n?String.fromCharCode(160):n),i)}),Element.remove(i))})},multiple:function(t,e){var i;i=("object"==typeof t||Object.isFunction(t))&&t.length?t:$(t).childNodes;var n=Object.extend({speed:.1,delay:0},arguments[2]||{}),s=n.delay;$A(i).each(function(t,i){new e(t,Object.extend(n,{delay:i*n.speed+s}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(t,e,i){return t=$(t),e=(e||"appear").toLowerCase(),Effect[Effect.PAIRS[e][t.visible()?1:0]](t,Object.extend({queue:{position:"end",scope:t.id||"global",limit:1}},i||{}))}};if(Effect.DefaultOptions.transition=Effect.Transitions.sinoidal,Effect.ScopedQueue=Class.create(Enumerable,{initialize:function(){this.effects=[],this.interval=null},_each:function(t){this.effects._each(t)},add:function(t){var e=(new Date).getTime(),i=Object.isString(t.options.queue)?t.options.queue:t.options.queue.position;switch(i){case"front":this.effects.findAll(function(t){return"idle"==t.state}).each(function(e){e.startOn+=t.finishOn,e.finishOn+=t.finishOn});break;case"with-last":e=this.effects.pluck("startOn").max()||e;break;case"end":e=this.effects.pluck("finishOn").max()||e}t.startOn+=e,t.finishOn+=e,(!t.options.queue.limit||this.effects.length<t.options.queue.limit)&&this.effects.push(t),this.interval||(this.interval=setInterval(this.loop.bind(this),15))},remove:function(t){this.effects=this.effects.reject(function(e){return e==t}),0==this.effects.length&&(clearInterval(this.interval),this.interval=null)},loop:function(){for(var t=(new Date).getTime(),e=0,i=this.effects.length;i>e;e++)this.effects[e]&&this.effects[e].loop(t)}}),Effect.Queues={instances:$H(),get:function(t){return Object.isString(t)?this.instances.get(t)||this.instances.set(t,new Effect.ScopedQueue):t}},Effect.Queue=Effect.Queues.get("global"),Effect.Base=Class.create({position:null,start:function(t){t&&t.transition===!1&&(t.transition=Effect.Transitions.linear),this.options=Object.extend(Object.extend({},Effect.DefaultOptions),t||{}),this.currentFrame=0,this.state="idle",this.startOn=1e3*this.options.delay,this.finishOn=this.startOn+1e3*this.options.duration,this.fromToDelta=this.options.to-this.options.from,this.totalTime=this.finishOn-this.startOn,this.totalFrames=this.options.fps*this.options.duration,this.render=function(){function t(t,e){t.options[e+"Internal"]&&t.options[e+"Internal"](t),t.options[e]&&t.options[e](t)}return function(e){"idle"===this.state&&(this.state="running",t(this,"beforeSetup"),this.setup&&this.setup(),t(this,"afterSetup")),"running"===this.state&&(e=this.options.transition(e)*this.fromToDelta+this.options.from,this.position=e,t(this,"beforeUpdate"),this.update&&this.update(e),t(this,"afterUpdate"))}}(),this.event("beforeStart"),this.options.sync||Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).add(this)},loop:function(t){if(t>=this.startOn){if(t>=this.finishOn)return this.render(1),this.cancel(),this.event("beforeFinish"),this.finish&&this.finish(),void this.event("afterFinish");var e=(t-this.startOn)/this.totalTime,i=(e*this.totalFrames).round();i>this.currentFrame&&(this.render(e),this.currentFrame=i)}},cancel:function(){this.options.sync||Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).remove(this),this.state="finished"},event:function(t){this.options[t+"Internal"]&&this.options[t+"Internal"](this),this.options[t]&&this.options[t](this)},inspect:function(){var t=$H();for(property in this)Object.isFunction(this[property])||t.set(property,this[property]);return"#<Effect:"+t.inspect()+",options:"+$H(this.options).inspect()+">"}}),Effect.Parallel=Class.create(Effect.Base,{initialize:function(t){this.effects=t||[],this.start(arguments[1])},update:function(t){this.effects.invoke("render",t)},finish:function(t){this.effects.each(function(e){e.render(1),e.cancel(),e.event("beforeFinish"),e.finish&&e.finish(t),e.event("afterFinish")})}}),Effect.Tween=Class.create(Effect.Base,{initialize:function(t,e,i){t=Object.isString(t)?$(t):t;var n=$A(arguments),s=n.last(),o=5==n.length?n[3]:null;this.method=Object.isFunction(s)?s.bind(t):Object.isFunction(t[s])?t[s].bind(t):function(e){t[s]=e},this.start(Object.extend({from:e,to:i},o||{}))},update:function(t){this.method(t)}}),Effect.Event=Class.create(Effect.Base,{initialize:function(){this.start(Object.extend({duration:0},arguments[0]||{}))},update:Prototype.emptyFunction}),Effect.Opacity=Class.create(Effect.Base,{initialize:function(t){if(this.element=$(t),!this.element)throw Effect._elementDoesNotExistError;Prototype.Browser.IE&&!this.element.currentStyle.hasLayout&&this.element.setStyle({zoom:1});var e=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});this.start(e)},update:function(t){this.element.setOpacity(t)}}),Effect.Move=Class.create(Effect.Base,{initialize:function(t){if(this.element=$(t),!this.element)throw Effect._elementDoesNotExistError;var e=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(e)},setup:function(){this.element.makePositioned(),this.originalLeft=parseFloat(this.element.getStyle("left")||"0"),this.originalTop=parseFloat(this.element.getStyle("top")||"0"),"absolute"==this.options.mode&&(this.options.x=this.options.x-this.originalLeft,this.options.y=this.options.y-this.originalTop)},update:function(t){this.element.setStyle({left:(this.options.x*t+this.originalLeft).round()+"px",top:(this.options.y*t+this.originalTop).round()+"px"})}}),Effect.MoveBy=function(t,e,i){return new Effect.Move(t,Object.extend({x:i,y:e},arguments[3]||{}))},Effect.Scale=Class.create(Effect.Base,{initialize:function(t,e){if(this.element=$(t),!this.element)throw Effect._elementDoesNotExistError;var i=Object.extend({scaleX:!0,scaleY:!0,scaleContent:!0,scaleFromCenter:!1,scaleMode:"box",scaleFrom:100,scaleTo:e},arguments[2]||{});this.start(i)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||!1,this.elementPositioning=this.element.getStyle("position"),this.originalStyle={},["top","left","width","height","fontSize"].each(function(t){this.originalStyle[t]=this.element.style[t]}.bind(this)),this.originalTop=this.element.offsetTop,this.originalLeft=this.element.offsetLeft;var t=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(e){t.indexOf(e)>0&&(this.fontSize=parseFloat(t),this.fontSizeType=e)}.bind(this)),this.factor=(this.options.scaleTo-this.options.scaleFrom)/100,this.dims=null,"box"==this.options.scaleMode&&(this.dims=[this.element.offsetHeight,this.element.offsetWidth]),/^content/.test(this.options.scaleMode)&&(this.dims=[this.element.scrollHeight,this.element.scrollWidth]),this.dims||(this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth])},update:function(t){var e=this.options.scaleFrom/100+this.factor*t;this.options.scaleContent&&this.fontSize&&this.element.setStyle({fontSize:this.fontSize*e+this.fontSizeType}),this.setDimensions(this.dims[0]*e,this.dims[1]*e)},finish:function(t){this.restoreAfterFinish&&this.element.setStyle(this.originalStyle)},setDimensions:function(t,e){var i={};if(this.options.scaleX&&(i.width=e.round()+"px"),this.options.scaleY&&(i.height=t.round()+"px"),this.options.scaleFromCenter){var n=(t-this.dims[0])/2,s=(e-this.dims[1])/2;"absolute"==this.elementPositioning?(this.options.scaleY&&(i.top=this.originalTop-n+"px"),this.options.scaleX&&(i.left=this.originalLeft-s+"px")):(this.options.scaleY&&(i.top=-n+"px"),this.options.scaleX&&(i.left=-s+"px"))}this.element.setStyle(i)}}),Effect.Highlight=Class.create(Effect.Base,{initialize:function(t){if(this.element=$(t),!this.element)throw Effect._elementDoesNotExistError;var e=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(e)},setup:function(){return"none"==this.element.getStyle("display")?void this.cancel():(this.oldStyle={},this.options.keepBackgroundImage||(this.oldStyle.backgroundImage=this.element.getStyle("background-image"),this.element.setStyle({backgroundImage:"none"})),this.options.endcolor||(this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff")),this.options.restorecolor||(this.options.restorecolor=this.element.getStyle("background-color")),this._base=$R(0,2).map(function(t){return parseInt(this.options.startcolor.slice(2*t+1,2*t+3),16)}.bind(this)),void(this._delta=$R(0,2).map(function(t){return parseInt(this.options.endcolor.slice(2*t+1,2*t+3),16)-this._base[t]}.bind(this))))},update:function(t){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(e,i,n){return e+(this._base[n]+this._delta[n]*t).round().toColorPart()}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}}),Effect.ScrollTo=function(t){var e=arguments[1]||{},i=document.viewport.getScrollOffsets(),n=$(t).cumulativeOffset();return e.offset&&(n[1]+=e.offset),new Effect.Tween(null,i.top,n[1],e,function(t){scrollTo(i.left,t.round())})},Effect.Fade=function(t){t=$(t);var e=t.getInlineOpacity(),i=Object.extend({from:t.getOpacity()||1,to:0,afterFinishInternal:function(t){0==t.options.to&&t.element.hide().setStyle({opacity:e})}},arguments[1]||{});return new Effect.Opacity(t,i)},Effect.Appear=function(t){t=$(t);var e=Object.extend({from:"none"==t.getStyle("display")?0:t.getOpacity()||0,to:1,afterFinishInternal:function(t){t.element.forceRerendering()},beforeSetup:function(t){t.element.setOpacity(t.options.from).show()}},arguments[1]||{});return new Effect.Opacity(t,e)},Effect.Puff=function(t){t=$(t);var e={opacity:t.getInlineOpacity(),position:t.getStyle("position"),top:t.style.top,left:t.style.left,width:t.style.width,height:t.style.height};return new Effect.Parallel([new Effect.Scale(t,200,{sync:!0,scaleFromCenter:!0,scaleContent:!0,restoreAfterFinish:!0}),new Effect.Opacity(t,{sync:!0,to:0})],Object.extend({duration:1,beforeSetupInternal:function(t){Position.absolutize(t.effects[0].element)},afterFinishInternal:function(t){t.effects[0].element.hide().setStyle(e)}},arguments[1]||{}))},Effect.BlindUp=function(t){return t=$(t),t.makeClipping(),new Effect.Scale(t,0,Object.extend({scaleContent:!1,scaleX:!1,restoreAfterFinish:!0,afterFinishInternal:function(t){t.element.hide().undoClipping()}},arguments[1]||{}))},Effect.BlindDown=function(t){t=$(t);var e=t.getDimensions();return new Effect.Scale(t,100,Object.extend({scaleContent:!1,scaleX:!1,scaleFrom:0,scaleMode:{originalHeight:e.height,originalWidth:e.width},restoreAfterFinish:!0,afterSetup:function(t){t.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(t){t.element.undoClipping()}},arguments[1]||{}))},Effect.SwitchOff=function(t){t=$(t);var e=t.getInlineOpacity();return new Effect.Appear(t,Object.extend({duration:.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(t){new Effect.Scale(t.element,1,{duration:.3,scaleFromCenter:!0,scaleX:!1,scaleContent:!1,restoreAfterFinish:!0,beforeSetup:function(t){t.element.makePositioned().makeClipping()},afterFinishInternal:function(t){t.element.hide().undoClipping().undoPositioned().setStyle({opacity:e})}})}},arguments[1]||{}))},Effect.DropOut=function(t){t=$(t);var e={top:t.getStyle("top"),left:t.getStyle("left"),opacity:t.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(t,{x:0,y:100,sync:!0}),new Effect.Opacity(t,{sync:!0,to:0})],Object.extend({duration:.5,beforeSetup:function(t){t.effects[0].element.makePositioned()},afterFinishInternal:function(t){t.effects[0].element.hide().undoPositioned().setStyle(e)}},arguments[1]||{}))},Effect.Shake=function(t){t=$(t);var e=Object.extend({distance:20,duration:.5},arguments[1]||{}),i=parseFloat(e.distance),n=parseFloat(e.duration)/10,s={top:t.getStyle("top"),left:t.getStyle("left")};return new Effect.Move(t,{x:i,y:0,duration:n,afterFinishInternal:function(t){new Effect.Move(t.element,{x:2*-i,y:0,duration:2*n,afterFinishInternal:function(t){new Effect.Move(t.element,{x:2*i,y:0,duration:2*n,afterFinishInternal:function(t){new Effect.Move(t.element,{x:2*-i,y:0,duration:2*n,afterFinishInternal:function(t){new Effect.Move(t.element,{x:2*i,y:0,duration:2*n,afterFinishInternal:function(t){new Effect.Move(t.element,{x:-i,y:0,duration:n,afterFinishInternal:function(t){t.element.undoPositioned().setStyle(s)}})}})}})}})}})}})},Effect.SlideDown=function(t){t=$(t).cleanWhitespace();var e=t.down().getStyle("bottom"),i=t.getDimensions();return new Effect.Scale(t,100,Object.extend({scaleContent:!1,scaleX:!1,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:i.height,originalWidth:i.width},restoreAfterFinish:!0,afterSetup:function(t){t.element.makePositioned(),t.element.down().makePositioned(),window.opera&&t.element.setStyle({top:""}),t.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(t){t.element.down().setStyle({bottom:t.dims[0]-t.element.clientHeight+"px"})},afterFinishInternal:function(t){t.element.undoClipping().undoPositioned(),t.element.down().undoPositioned().setStyle({bottom:e})}},arguments[1]||{}))},Effect.SlideUp=function(t){t=$(t).cleanWhitespace();var e=t.down().getStyle("bottom"),i=t.getDimensions();return new Effect.Scale(t,window.opera?0:1,Object.extend({scaleContent:!1,scaleX:!1,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:i.height,originalWidth:i.width},restoreAfterFinish:!0,afterSetup:function(t){t.element.makePositioned(),t.element.down().makePositioned(),window.opera&&t.element.setStyle({top:""}),t.element.makeClipping().show()},afterUpdateInternal:function(t){t.element.down().setStyle({bottom:t.dims[0]-t.element.clientHeight+"px"})},afterFinishInternal:function(t){t.element.hide().undoClipping().undoPositioned(),t.element.down().undoPositioned().setStyle({bottom:e})}},arguments[1]||{}))},Effect.Squish=function(t){return new Effect.Scale(t,window.opera?1:0,{restoreAfterFinish:!0,beforeSetup:function(t){t.element.makeClipping()},afterFinishInternal:function(t){t.element.hide().undoClipping()}})},Effect.Grow=function(t){t=$(t);var e,i,n,s,o=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{}),r={top:t.style.top,left:t.style.left,height:t.style.height,width:t.style.width,opacity:t.getInlineOpacity()},a=t.getDimensions();switch(o.direction){case"top-left":e=i=n=s=0;break;case"top-right":e=a.width,i=s=0,n=-a.width;break;case"bottom-left":e=n=0,i=a.height,s=-a.height;break;case"bottom-right":e=a.width,i=a.height,n=-a.width,s=-a.height;break;case"center":e=a.width/2,i=a.height/2,n=-a.width/2,s=-a.height/2}return new Effect.Move(t,{x:e,y:i,duration:.01,beforeSetup:function(t){t.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(t){new Effect.Parallel([new Effect.Opacity(t.element,{sync:!0,to:1,from:0,transition:o.opacityTransition}),new Effect.Move(t.element,{x:n,y:s,sync:!0,transition:o.moveTransition}),new Effect.Scale(t.element,100,{scaleMode:{originalHeight:a.height,originalWidth:a.width},sync:!0,scaleFrom:window.opera?1:0,transition:o.scaleTransition,restoreAfterFinish:!0})],Object.extend({beforeSetup:function(t){t.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(t){t.effects[0].element.undoClipping().undoPositioned().setStyle(r)}},o))}})},Effect.Shrink=function(t){t=$(t);var e,i,n=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{}),s={top:t.style.top,left:t.style.left,height:t.style.height,width:t.style.width,opacity:t.getInlineOpacity()},o=t.getDimensions();switch(n.direction){case"top-left":e=i=0;break;case"top-right":e=o.width,i=0;break;case"bottom-left":e=0,i=o.height;break;case"bottom-right":e=o.width,i=o.height;break;case"center":e=o.width/2,i=o.height/2}return new Effect.Parallel([new Effect.Opacity(t,{sync:!0,to:0,from:1,transition:n.opacityTransition}),new Effect.Scale(t,window.opera?1:0,{sync:!0,transition:n.scaleTransition,restoreAfterFinish:!0}),new Effect.Move(t,{x:e,y:i,sync:!0,transition:n.moveTransition})],Object.extend({beforeStartInternal:function(t){t.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(t){t.effects[0].element.hide().undoClipping().undoPositioned().setStyle(s)}},n))},Effect.Pulsate=function(t){t=$(t);var e=arguments[1]||{},i=t.getInlineOpacity(),n=e.transition||Effect.Transitions.linear,s=function(t){return 1-n(-Math.cos(t*(e.pulses||5)*2*Math.PI)/2+.5)};return new Effect.Opacity(t,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(t){t.element.setStyle({opacity:i})}},e),{transition:s}))},Effect.Fold=function(t){t=$(t);var e={top:t.style.top,left:t.style.left,width:t.style.width,height:t.style.height};return t.makeClipping(),new Effect.Scale(t,5,Object.extend({scaleContent:!1,scaleX:!1,afterFinishInternal:function(i){new Effect.Scale(t,1,{scaleContent:!1,scaleY:!1,afterFinishInternal:function(t){t.element.hide().undoClipping().setStyle(e)}})}},arguments[1]||{}))},Effect.Morph=Class.create(Effect.Base,{initialize:function(t){if(this.element=$(t),!this.element)throw Effect._elementDoesNotExistError;var e=Object.extend({style:{}},arguments[1]||{});if(Object.isString(e.style))if(e.style.include(":"))this.style=e.style.parseStyle();else{this.element.addClassName(e.style),this.style=$H(this.element.getStyles()),this.element.removeClassName(e.style);var i=this.element.getStyles();this.style=this.style.reject(function(t){return t.value==i[t.key]}),e.afterFinishInternal=function(t){t.element.addClassName(t.options.style),t.transforms.each(function(e){t.element.style[e.style]=""})}}else this.style=$H(e.style);this.start(e)},setup:function(){function t(t){return(!t||["rgba(0, 0, 0, 0)","transparent"].include(t))&&(t="#ffffff"),t=t.parseColor(),$R(0,2).map(function(e){return parseInt(t.slice(2*e+1,2*e+3),16)})}this.transforms=this.style.map(function(e){var i=e[0],n=e[1],s=null;if("#zzzzzz"!=n.parseColor("#zzzzzz"))n=n.parseColor(),s="color";else if("opacity"==i)n=parseFloat(n),Prototype.Browser.IE&&!this.element.currentStyle.hasLayout&&this.element.setStyle({zoom:1});else if(Element.CSS_LENGTH.test(n)){var o=n.match(/^([\+\-]?[0-9\.]+)(.*)$/);n=parseFloat(o[1]),s=3==o.length?o[2]:null}var r=this.element.getStyle(i);return{style:i.camelize(),originalValue:"color"==s?t(r):parseFloat(r||0),targetValue:"color"==s?t(n):n,unit:s}}.bind(this)).reject(function(t){return t.originalValue==t.targetValue||"color"!=t.unit&&(isNaN(t.originalValue)||isNaN(t.targetValue))})},update:function(t){for(var e,i={},n=this.transforms.length;n--;)i[(e=this.transforms[n]).style]="color"==e.unit?"#"+Math.round(e.originalValue[0]+(e.targetValue[0]-e.originalValue[0])*t).toColorPart()+Math.round(e.originalValue[1]+(e.targetValue[1]-e.originalValue[1])*t).toColorPart()+Math.round(e.originalValue[2]+(e.targetValue[2]-e.originalValue[2])*t).toColorPart():(e.originalValue+(e.targetValue-e.originalValue)*t).toFixed(3)+(null===e.unit?"":e.unit);this.element.setStyle(i,!0)}}),Effect.Transform=Class.create({initialize:function(t){this.tracks=[],this.options=arguments[1]||{},this.addTracks(t)},addTracks:function(t){return t.each(function(t){t=$H(t);var e=t.values().first();this.tracks.push($H({ids:t.keys().first(),effect:Effect.Morph,options:{style:e}}))}.bind(this)),this},play:function(){return new Effect.Parallel(this.tracks.map(function(t){var e=t.get("ids"),i=t.get("effect"),n=t.get("options"),s=[$(e)||$$(e)].flatten();return s.map(function(t){return new i(t,Object.extend({sync:!0},n))})}).flatten(),this.options)}}),Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex"),Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/,String.__parseStyleElement=document.createElement("div"),String.prototype.parseStyle=function(){var t,e=$H();return Prototype.Browser.WebKit?t=new Element("div",{style:this}).style:(String.__parseStyleElement.innerHTML='<div style="'+this+'"></div>',t=String.__parseStyleElement.childNodes[0].style),Element.CSS_PROPERTIES.each(function(i){t[i]&&e.set(i,t[i])}),Prototype.Browser.IE&&this.include("opacity")&&e.set("opacity",this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]),e},document.defaultView&&document.defaultView.getComputedStyle?Element.getStyles=function(t){var e=document.defaultView.getComputedStyle($(t),null);return Element.CSS_PROPERTIES.inject({},function(t,i){return t[i]=e[i],t})}:Element.getStyles=function(t){t=$(t);var e,i=t.currentStyle;return e=Element.CSS_PROPERTIES.inject({},function(t,e){return t[e]=i[e],t}),e.opacity||(e.opacity=t.getOpacity()),e},Effect.Methods={morph:function(t,e){return t=$(t),new Effect.Morph(t,Object.extend({style:e},arguments[2]||{})),t},visualEffect:function(t,e,i){t=$(t);var n=e.dasherize().camelize(),s=n.charAt(0).toUpperCase()+n.substring(1);return new Effect[s](t,i),t},highlight:function(t,e){return t=$(t),new Effect.Highlight(t,e),t}},$w("fade appear grow shrink fold blindUp blindDown slideUp slideDown pulsate shake puff squish switchOff dropOut").each(function(t){Effect.Methods[t]=function(e,i){return e=$(e),Effect[t.charAt(0).toUpperCase()+t.substring(1)](e,i),e}}),$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(t){Effect.Methods[t]=Element[t]}),Element.addMethods(Effect.Methods),define("effects",["prototype"],function(t){return function(){var e;return e||t.Effect}}(this)),define("utils.animation",["prototype","effects"],function(t){return function(){var e;return e||t.jQuery}}(this)),Object.isUndefined(Effect))throw"dragdrop.js requires including script.aculo.us' effects.js library";var Droppables={drops:[],remove:function(t){this.drops=this.drops.reject(function(e){return e.element==$(t)})},add:function(t){t=$(t);var e=Object.extend({greedy:!0,hoverclass:null,tree:!1},arguments[1]||{});if(e.containment){e._containers=[];var i=e.containment;Object.isArray(i)?i.each(function(t){e._containers.push($(t))}):e._containers.push($(i))}e.accept&&(e.accept=[e.accept].flatten()),Element.makePositioned(t),e.element=t,this.drops.push(e)},findDeepestChild:function(t){for(deepest=t[0],i=1;i<t.length;++i)Element.isParent(t[i].element,deepest.element)&&(deepest=t[i]);return deepest},isContained:function(t,e){var i;return i=e.tree?t.treeNode:t.parentNode,e._containers.detect(function(t){return i==t})},isAffected:function(t,e,i){return i.element!=e&&(!i._containers||this.isContained(e,i))&&(!i.accept||Element.classNames(e).detect(function(t){return i.accept.include(t)}))&&Position.within(i.element,t[0],t[1])},deactivate:function(t){t.hoverclass&&Element.removeClassName(t.element,t.hoverclass),this.last_active=null},activate:function(t){t.hoverclass&&Element.addClassName(t.element,t.hoverclass),this.last_active=t},show:function(t,e){if(this.drops.length){var i,n=[];this.drops.each(function(i){Droppables.isAffected(t,e,i)&&n.push(i)}),n.length>0&&(i=Droppables.findDeepestChild(n)),this.last_active&&this.last_active!=i&&this.deactivate(this.last_active),i&&(Position.within(i.element,t[0],t[1]),i.onHover&&i.onHover(e,i.element,Position.overlap(i.overlap,i.element)),i!=this.last_active&&Droppables.activate(i))}},fire:function(t,e){if(this.last_active){var i;return Position.prepare(),i=Draggables.supportsTouch?Draggables._lastPointer:[Event.pointerX(t),Event.pointerY(t)],this.isAffected(i,e,this.last_active)&&this.last_active.onDrop?(this.last_active.onDrop(e,this.last_active.element,t),!0):void 0}},reset:function(){this.last_active&&this.deactivate(this.last_active)}},Draggables={DEFAULT_TOLERANCE:window.Prototype.BrowserFeatures.SupportsTouch?2:1,drags:[],observers:[],supportsTouch:window.Prototype.BrowserFeatures.SupportsTouch,register:function(t){0==this.drags.length&&(this.eventMouseUp=this.endDrag.bindAsEventListener(this),this.eventMouseMove=this.updateDrag.bindAsEventListener(this),this.eventKeypress=this.keyPress.bindAsEventListener(this),Draggables.supportsTouch?(Event.observe(document,"touchend",this.eventMouseUp),Event.observe(document,"touchmove",this.eventMouseMove)):Event.observe(document,"mouseup",this.eventMouseUp),Event.observe(document,"keypress",this.eventKeypress)),this.drags.push(t)},unregister:function(t){this.drags=this.drags.reject(function(e){return e==t}),0==this.drags.length&&(Draggables.supportsTouch?(Event.stopObserving(document,"touchend",this.eventMouseUp),Event.stopObserving(document,"touchmove",this.eventMouseMove)):Event.stopObserving(document,"mouseup",this.eventMouseUp),Event.stopObserving(document,"keypress",this.eventKeypress))},activate:function(t){Draggables.supportsTouch||Event.observe(document,"mousemove",this.eventMouseMove),t.options.delay?this._timeout=setTimeout(function(){Draggables._timeout=null,window.focus(),Draggables.activeDraggable=t}.bind(this),t.options.delay):(window.focus(),this.activeDraggable=t)},deactivate:function(){Draggables.supportsTouch||Event.stopObserving(document,"mousemove",this.eventMouseMove),this.activeDraggable=null},updateDrag:function(t){if(this.activeDraggable){var e=[Event.pointerX(t),Event.pointerY(t)];this.pointerInRadius(e)||(this._lastPointer=e,this.activeDraggable.updateDrag(t,e))}},pointerInRadius:function(t,e){return e=e||2,this._lastPointer&&Math.abs(this._lastPointer[0]-t[0])<=e&&Math.abs(this._lastPointer[1]-t[1])<=e},endDrag:function(t){this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this.activeDraggable&&(Draggables.supportsTouch||(this._lastPointer=null),this.activeDraggable.endDrag(t),this.activeDraggable=null)},keyPress:function(t){this.activeDraggable&&this.activeDraggable.keyPress(t)},addObserver:function(t){this.observers.push(t),this._cacheObserverCallbacks()},removeObserver:function(t){this.observers=this.observers.reject(function(e){return e.element==t||e.element&&t&&e.element.id==t.id}),this._cacheObserverCallbacks()},notify:function(t,e,i){this[t+"Count"]>0&&this.observers.each(function(n){n[t]&&n[t](t,e,i)}),e.options[t]&&e.options[t](e,i)},_cacheObserverCallbacks:function(){["onStart","onEnd","onDrag"].each(function(t){Draggables[t+"Count"]=Draggables.observers.select(function(e){return e[t]}).length})}},Draggable=Class.create({initialize:function(t){var e={handle:!1,reverteffect:function(t,e,i){var n=.02*Math.sqrt(Math.abs(2^e)+Math.abs(2^i));new Effect.Move(t,{x:-i,y:-e,duration:n,queue:{scope:"_draggable",position:"end"}})},endeffect:function(t){Draggable._dragging[t]=!1},zindex:1e3,revert:!1,quiet:!1,scroll:!1,scrollSensitivity:20,scrollSpeed:15,snap:!1,delay:0};(!arguments[1]||Object.isUndefined(arguments[1].endeffect))&&Object.extend(e,{starteffect:function(t){t._opacity=Element.getOpacity(t),Draggable._dragging[t]=!0}});var i=Object.extend(e,arguments[1]||{});this.element=$(t),i.handle&&Object.isString(i.handle)&&(this.handle=this.element.down("."+i.handle,0)),this.handle||(this.handle=$(i.handle)),this.handle||(this.handle=this.element),!i.scroll||i.scroll.scrollTo||i.scroll.outerHTML||(i.scroll=$(i.scroll),this._isScrollChild=Element.childOf(this.element,i.scroll)),Element.makePositioned(this.element),this.options=i,this.dragging=!1,this.eventMouseDown=this.initDrag.bindAsEventListener(this),Draggables.supportsTouch?Event.observe(this.handle,"touchstart",this.eventMouseDown):Event.observe(this.handle,"mousedown",this.eventMouseDown),Draggables.register(this)},destroy:function(){Draggables.supportsTouch?Event.stopObserving(this.handle,"touchstart",this.eventMouseDown):Event.stopObserving(this.handle,"mousedown",this.eventMouseDown),Draggables.unregister(this)},currentDelta:function(){var t=Element.getStyle(this.element,"left")||"",e=Element.getStyle(this.element,"top")||"";return t.include("%")&&(t=this.element.parentNode.getWidth()*parseInt(t)/100),e.include("%")&&(e=this.element.parentNode.getHeight()*parseInt(e)/100),[parseInt(t)||"0",parseInt(e)||"0"]},initDrag:function(t){if((Object.isUndefined(Draggable._dragging[this.element])||!Draggable._dragging[this.element])&&(Event.isLeftClick(t)||Draggables.supportsTouch&&t.touches&&1==t.touches.length)){var e=Event.element(t);if((tag_name=e.tagName.toUpperCase())&&("INPUT"==tag_name||"SELECT"==tag_name||"OPTION"==tag_name||"BUTTON"==tag_name||"TEXTAREA"==tag_name))return;var i=[Event.pointerX(t),Event.pointerY(t)],n=this.element.cumulativeOffset();this.offset=[0,1].map(function(t){return i[t]-n[t]}),Draggables.activate(this),this.countdown=Draggables.DEFAULT_TOLERANCE,Event.stop(t),Draggables.supportsTouch?this.handle.fire("drag:"+t.type,{targetEvent:t}):this.handle.fire("drag:mousedown",{targetEvent:t})}},startDrag:function(t){if(this.dragging=!0,this.delta||(this.delta=this.currentDelta()),this.options.zindex&&(this.originalZ=parseInt(Element.getStyle(this.element,"z-index")||0),this.element.style.zIndex=this.options.zindex),this.options.ghosting&&(this._clone=this.element.cloneNode(!0),this._originallyAbsolute="absolute"==this.element.getStyle("position"),this._originallyAbsolute||Position.absolutize(this.element),this.element.parentNode.insertBefore(this._clone,this.element),"TR"===this.element.parentNode.tagName&&document.body.appendChild(this.element)),this.options.scroll)if(this.options.scroll==window){var e=this._getWindowScroll(this.options.scroll);this.originalScrollLeft=e.left,this.originalScrollTop=e.top;
  }else this.originalScrollLeft=this.options.scroll.scrollLeft,this.originalScrollTop=this.options.scroll.scrollTop;Draggables.notify("onStart",this,t),this.options.starteffect&&this.options.starteffect(this.element)},updateDrag:function(event,pointer){if(!this.dragging)if(Draggables.supportsTouch){if(!isIE7()&&this.countdown&&this.countdown--)return;this.startDrag(event)}else{if(this.countdown&&this.countdown--)return;this.startDrag(event)}if(Draggables.supportsTouch&&event.touches.length>1&&this.endDrag(event),this.options.quiet||(Position.prepare(),Droppables.show(pointer,this.element)),Draggables.notify("onDrag",this,event),this.draw(pointer),this.options.change&&this.options.change(this),this.options.scroll){this.stopScrolling();var p;if(this.options.scroll==window)with(this._getWindowScroll(this.options.scroll))p=[left,top,left+width,top+height];else p=Position.page(this.options.scroll).toArray(),p[0]+=this.options.scroll.scrollLeft+Position.deltaX,p[1]+=this.options.scroll.scrollTop+Position.deltaY,p.push(p[0]+this.options.scroll.offsetWidth),p.push(p[1]+this.options.scroll.offsetHeight);var speed=[0,0];pointer[0]<p[0]+this.options.scrollSensitivity&&(speed[0]=pointer[0]-(p[0]+this.options.scrollSensitivity)),pointer[1]<p[1]+this.options.scrollSensitivity&&(speed[1]=pointer[1]-(p[1]+this.options.scrollSensitivity)),pointer[0]>p[2]-this.options.scrollSensitivity&&(speed[0]=pointer[0]-(p[2]-this.options.scrollSensitivity)),pointer[1]>p[3]-this.options.scrollSensitivity&&(speed[1]=pointer[1]-(p[3]-this.options.scrollSensitivity)),this.startScrolling(speed)}Prototype.Browser.WebKit&&window.scrollBy(0,0),Event.stop(event)},finishDrag:function(t,e){if(this.dragging=!1,this.options.quiet){Position.prepare();var i=[Event.pointerX(t),Event.pointerY(t)];Droppables.show(i,this.element)}this.options.ghosting&&(this._originallyAbsolute||(Position.relativize(this.element),"TR"===this._clone.parentNode.tagName&&this._clone.parentNode.insertBefore(this.element,this._clone)),delete this._originallyAbsolute,Element.remove(this._clone),this._clone=null);var n=!1;e&&(n=Droppables.fire(t,this.element),n?Draggables.supportsTouch&&(Draggables._lastPointer=null):n=!1),n&&this.options.onDropped&&this.options.onDropped(this.element),Draggables.notify("onEnd",this,t);var s=this.options.revert;s&&Object.isFunction(s)&&(s=s(this.element));var o=this.currentDelta();s&&this.options.reverteffect?(0==n||"failure"!=s)&&this.options.reverteffect(this.element,o[1]-this.delta[1],o[0]-this.delta[0]):this.delta=o,this.options.zindex&&(this.element.style.zIndex=this.originalZ),this.options.endeffect&&this.options.endeffect(this.element),Draggables.deactivate(this),Droppables.reset()},keyPress:function(t){t.keyCode==Event.KEY_ESC&&(this.finishDrag(t,!1),Event.stop(t))},endDrag:function(t){this.dragging&&(this.stopScrolling(),this.finishDrag(t,!0),Event.stop(t))},draw:function(t){var e=this.element.cumulativeOffset();if(this.options.ghosting){var i=Position.realOffset(this.element);e[0]+=i[0]-Position.deltaX,e[1]+=i[1]-Position.deltaY}var n=this.currentDelta();e[0]-=n[0],e[1]-=n[1],this.options.scroll&&this.options.scroll!=window&&this._isScrollChild&&(e[0]-=this.options.scroll.scrollLeft-this.originalScrollLeft,e[1]-=this.options.scroll.scrollTop-this.originalScrollTop);var s=[0,1].map(function(i){return t[i]-e[i]-this.offset[i]}.bind(this));this.options.snap&&(s=Object.isFunction(this.options.snap)?this.options.snap(s[0],s[1],this):Object.isArray(this.options.snap)?s.map(function(t,e){return(t/this.options.snap[e]).round()*this.options.snap[e]}.bind(this)):s.map(function(t){return(t/this.options.snap).round()*this.options.snap}.bind(this)));var o=this.element.style;this.options.constraint&&"horizontal"!=this.options.constraint||(o.left=s[0]+"px"),this.options.constraint&&"vertical"!=this.options.constraint||(o.top=s[1]+"px"),"hidden"==o.visibility&&(o.visibility="")},stopScrolling:function(){this.scrollInterval&&(clearInterval(this.scrollInterval),this.scrollInterval=null,Draggables._lastScrollPointer=null)},startScrolling:function(t){(t[0]||t[1])&&(this.scrollSpeed=[t[0]*this.options.scrollSpeed,t[1]*this.options.scrollSpeed],this.lastScrolled=new Date,this.scrollInterval=setInterval(this.scroll.bind(this),10))},scroll:function(){var current=new Date,delta=current-this.lastScrolled;if(this.lastScrolled=current,this.options.scroll==window){with(this._getWindowScroll(this.options.scroll))if(this.scrollSpeed[0]||this.scrollSpeed[1]){var d=delta/1e3;this.options.scroll.scrollTo(left+d*this.scrollSpeed[0],top+d*this.scrollSpeed[1])}}else this.options.scroll.scrollLeft+=this.scrollSpeed[0]*delta/1e3,this.options.scroll.scrollTop+=this.scrollSpeed[1]*delta/1e3;Position.prepare(),Droppables.show(Draggables._lastPointer,this.element),Draggables.notify("onDrag",this),this._isScrollChild&&(Draggables._lastScrollPointer=Draggables._lastScrollPointer||$A(Draggables._lastPointer),Draggables._lastScrollPointer[0]+=this.scrollSpeed[0]*delta/1e3,Draggables._lastScrollPointer[1]+=this.scrollSpeed[1]*delta/1e3,Draggables._lastScrollPointer[0]<0&&(Draggables._lastScrollPointer[0]=0),Draggables._lastScrollPointer[1]<0&&(Draggables._lastScrollPointer[1]=0),this.draw(Draggables._lastScrollPointer)),this.options.change&&this.options.change(this)},_getWindowScroll:function(w){var T,L,W,H;with(w.document)w.document.documentElement&&documentElement.scrollTop?(T=documentElement.scrollTop,L=documentElement.scrollLeft):w.document.body&&(T=body.scrollTop,L=body.scrollLeft),w.innerWidth?(W=w.innerWidth,H=w.innerHeight):w.document.documentElement&&documentElement.clientWidth?(W=documentElement.clientWidth,H=documentElement.clientHeight):(W=body.offsetWidth,H=body.offsetHeight);return{top:T,left:L,width:W,height:H}}});Draggable._dragging={};var SortableObserver=Class.create({initialize:function(t,e){this.element=$(t),this.observer=e,this.lastValue=Sortable.serialize(this.element)},onStart:function(){this.lastValue=Sortable.serialize(this.element)},onEnd:function(){Sortable.unmark(),this.lastValue!=Sortable.serialize(this.element)&&this.observer(this.element)}}),Sortable={SERIALIZE_RULE:/^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,sortables:{},_findRootElement:function(t){for(;"BODY"!=t.tagName.toUpperCase();){if(t.id&&Sortable.sortables[t.id])return t;t=t.parentNode}},options:function(t){return(t=Sortable._findRootElement($(t)))?Sortable.sortables[t.id]:void 0},destroy:function(t){t=$(t);var e=Sortable.sortables[t.id];e&&(Draggables.removeObserver(e.element),e.droppables.each(function(t){Droppables.remove(t)}),e.draggables.invoke("destroy"),delete Sortable.sortables[e.element.id])},create:function(t){t=$(t);var e=Object.extend({element:t,tag:"li",dropOnEmpty:!1,accept:[],tree:!1,treeTag:"ul",overlap:"vertical",constraint:"vertical",containment:t,handle:!1,only:!1,delay:0,hoverclass:null,ghosting:!1,quiet:!1,scroll:!1,scrollSensitivity:20,scrollSpeed:15,format:this.SERIALIZE_RULE,elements:!1,handles:!1,onDrop:Prototype.emptyFunction,onHover:Sortable.onHover,onChange:Prototype.emptyFunction,onUpdate:Prototype.emptyFunction},arguments[1]||{});this.destroy(t);var i={revert:!0,quiet:e.quiet,scroll:e.scroll,scrollSpeed:e.scrollSpeed,scrollSensitivity:e.scrollSensitivity,delay:e.delay,ghosting:e.ghosting,constraint:e.constraint,onStart:e.onStart,handle:e.handle};e.starteffect&&(i.starteffect=e.starteffect),e.reverteffect?i.reverteffect=e.reverteffect:e.ghosting&&(i.reverteffect=function(t){t.style.top=0,t.style.left=0}),e.endeffect&&(i.endeffect=e.endeffect),e.zindex&&(i.zindex=e.zindex);var n={overlap:e.overlap,containment:e.containment,tree:e.tree,hoverclass:e.hoverclass,onHover:e.onHover,onDrop:e.onDrop},s={onHover:e.onEmptyHover||Sortable.onEmptyHover,overlap:e.overlap,containment:e.containment,hoverclass:e.hoverclass,accept:e.accept,onDrop:e.onDrop};Element.cleanWhitespace(t),e.draggables=[],e.droppables=[],(e.dropOnEmpty||e.tree)&&(Droppables.add(t,s),e.droppables.push(t)),(e.elements||this.findElements(t,e)||[]).each(function(s,o){var r=e.handles?$(e.handles[o]):e.handle?$(s).select("."+e.handle)[0]:s;e.draggables.push(new Draggable(s,Object.extend(i,{handle:r}))),Droppables.add(s,n),e.tree&&(s.treeNode=t),e.droppables.push(s)}),e.tree&&(Sortable.findTreeElements(t,e)||[]).each(function(i){Droppables.add(i,s),i.treeNode=t,e.droppables.push(i)}),this.sortables[t.identify()]=e,Draggables.addObserver(new SortableObserver(t,e.onUpdate))},findElements:function(t,e){return Element.findChildren(t,e.only,e.tree?!0:!1,e.tag)},findTreeElements:function(t,e){return Element.findChildren(t,e.only,e.tree?!0:!1,e.treeTag)},onHover:function(t,e,i){var n=null,s=null;if(!(Element.isParent(e,t)||i>.33&&.66>i&&Sortable.options(e).tree))if(i>.5)Sortable.mark(e,"before"),e.previousSibling!=t&&(n=t.parentNode,t.style.visibility="hidden",e.parentNode.insertBefore(t,e),e.parentNode!=n&&(s=Sortable.options(n),s&&s.onChange(t)),Sortable.options(e.parentNode).onChange(t));else{Sortable.mark(e,"after");var o=e.nextSibling||null;o!=t&&(n=t.parentNode,t.style.visibility="hidden",e.parentNode.insertBefore(t,o),e.parentNode!=n&&(s=Sortable.options(n),s&&s.onChange(t)),Sortable.options(e.parentNode).onChange(t))}},onEmptyHover:function(t,e,i){var n=t.parentNode,s=Sortable.options(e);if(!Element.isParent(e,t)){var o,r=Sortable.findElements(e,{tag:s.tag,only:s.only}),a=null;if(r){var l,u=null,c=Element.offsetSize(e,s.overlap)*(1-i);for(o=0;o<r.length;o+=1)if(u=Element.offsetSize(r[o],s.overlap),l=r[o].cumulativeOffset().top,Position.ycomp>=l&&Position.ycomp<l+r[o].offsetHeight){if(!(c-u>=0)){if(c-u/2>=0){a=o+1<r.length?r[o+1]:null;break}a=r[o];break}c-=u}}e.insertBefore(t,a);var h=Sortable.options(n);h&&h.onChange(t),s.onChange(t)}},unmark:function(){Sortable._marker&&Sortable._marker.hide()},mark:function(t,e){var i=Sortable.options(t.parentNode);if(!i||i.ghosting){Sortable._marker||(Sortable._marker=($("dropmarker")||Element.extend(document.createElement("DIV"))).hide().addClassName("dropmarker").setStyle({position:"absolute"}),document.getElementsByTagName("body").item(0).appendChild(Sortable._marker));var n=t.cumulativeOffset();Sortable._marker.setStyle({left:n[0]+"px",top:n[1]+"px"}),"after"==e&&("horizontal"==i.overlap?Sortable._marker.setStyle({left:n[0]+t.clientWidth+"px"}):Sortable._marker.setStyle({top:n[1]+t.clientHeight+"px"})),Sortable._marker.show()}},_tree:function(t,e,i){for(var n=Sortable.findElements(t,e)||[],s=0;s<n.length;++s){var o=n[s].id.match(e.format);if(o){var r={id:encodeURIComponent(o?o[1]:null),element:t,parent:i,children:[],position:i.children.length,container:$(n[s]).down(e.treeTag)};r.container&&this._tree(r.container,e,r),i.children.push(r)}}return i},tree:function(t){t=$(t);var e=this.options(t),i=Object.extend({tag:e.tag,treeTag:e.treeTag,only:e.only,name:t.id,format:e.format},arguments[1]||{}),n={id:null,parent:null,children:[],container:t,position:0};return Sortable._tree(t,i,n)},_constructIndex:function(t){var e="";do t.id&&(e="["+t.position+"]"+e);while(null!=(t=t.parent));return e},sequence:function(t){t=$(t);var e=Object.extend(this.options(t),arguments[1]||{});return $(this.findElements(t,e)||[]).map(function(t){return t.id.match(e.format)?t.id.match(e.format)[1]:""})},setSequence:function(t,e){t=$(t);var i=Object.extend(this.options(t),arguments[2]||{}),n={};this.findElements(t,i).each(function(t){t.id.match(i.format)&&(n[t.id.match(i.format)[1]]=[t,t.parentNode]),t.parentNode.removeChild(t)}),e.each(function(t){var e=n[t];e&&(e[1].appendChild(e[0]),delete n[t])})},serialize:function(t){t=$(t);var e=Object.extend(Sortable.options(t),arguments[1]||{}),i=encodeURIComponent(arguments[1]&&arguments[1].name?arguments[1].name:t.id);return e.tree?Sortable.tree(t,arguments[1]).children.map(function(t){return[i+Sortable._constructIndex(t)+"[id]="+encodeURIComponent(t.id)].concat(t.children.map(arguments.callee))}).flatten().join("&"):Sortable.sequence(t,arguments[1]).map(function(t){return i+"[]="+encodeURIComponent(t)}).join("&")}};Element.isParent=function(t,e){return t.parentNode&&t!=e?t.parentNode==e?!0:Element.isParent(t.parentNode,e):!1},Element.findChildren=function(t,e,i,n){if(!t.hasChildNodes())return null;n=n.toUpperCase(),e&&(e=[e].flatten());var s=[];return $A(t.childNodes).each(function(t){if(!t.tagName||t.tagName.toUpperCase()!=n||e&&!Element.classNames(t).detect(function(t){return e.include(t)})||s.push(t),i){var o=Element.findChildren(t,e,i,n);o&&s.push(o)}}),s.length>0?s.flatten():[]},Element.offsetSize=function(t,e){return t["offset"+("vertical"==e||"height"==e?"Height":"Width")]},define("dragdrop",["prototype","effects"],function(t){return function(){var e;return e||t.Draggable}}(this)),Draggable.prototype.startDrag=function(t){this.dragging=!0,this.delta||(this.delta=this.currentDelta()),this.options.zindex&&(this.originalZ=parseInt(Element.getStyle(this.element,"z-index")||0),this.element.style.zIndex=this.options.zindex),this.options.ghosting&&(this._clone=this.element.cloneNode(!0),this.element._originallyAbsolute="absolute"==this.element.getStyle("position"),this.element._originallyAbsolute||Position.absolutize(this.element),this.element.parentNode.insertBefore(this._clone,this.element));var e=jQuery("body"),i=jQuery(this.element),n=i.offset();if(this._sizes={window:{w:e.outerWidth(!0),h:e.outerHeight(!0)},element:{w:i.outerWidth(),h:i.outerHeight()},mouseOffset:{left:Event.pointerX(t)-n.left,top:Event.pointerY(t)-n.top}},this.options.superghosting){Position.prepare();var s=[Event.pointerX(t),Event.pointerY(t)];body=document.getElementsByTagName("body")[0],me=this.element,this._clone=me.cloneNode(!0),me.parentNode.insertBefore(this._clone,me),me.id="clone_"+me.id,me.hide(),Position.absolutize(me),me.parentNode.removeChild(me),body.appendChild(me),("0px"==me.style.width||"0px"==me.style.height)&&(me.style.width=Element.getWidth(this._clone)+"px",me.style.height=Element.getHeight(this._clone)+"px"),this.originalScrollTop=Element.getHeight(this._clone)/2,this.draw(s),me.show()}if(this.options.scroll)if(this.options.scroll==window){var o=this._getWindowScroll(this.options.scroll);this.originalScrollLeft=o.left,this.originalScrollTop=o.top}else this.originalScrollLeft=this.options.scroll.scrollLeft,this.originalScrollTop=this.options.scroll.scrollTop;Draggables.notify("onStart",this,t),this.options.starteffect&&this.options.starteffect(this.element)},Draggable.prototype.draw=function(t){"undefined"==typeof this.elemSizeCaptured&&(setTimeout(function(){if(this._sizes){var t=jQuery(this.element);this._sizes.element={w:t.outerWidth(),h:t.outerHeight()}}}.bind(this),100),this.elemSizeCaptured=!0);var e=jQuery(this.element),i=e.offset(),n={left:t[0]-this._sizes.mouseOffset.left,top:t[1]-this._sizes.mouseOffset.top},s=[n.left,n.top];this.options.snap&&(s=Object.isFunction(this.options.snap)?this.options.snap(s[0],s[1],this):Object.isArray(this.options.snap)?s.map(function(t,e){return(t/this.options.snap[e]).round()*this.options.snap[e]}.bind(this)):s.map(function(t){return(t/this.options.snap).round()*this.options.snap}.bind(this))),n={left:s[0],top:s[1]},this.options.constraint&&"horizontal"==this.options.constraint&&(n.top=i.top),this.options.constraint&&"vertical"==this.options.constraint&&(n.left=i.left),this.options.mouseOffset&&(n={left:t[0],top:t[1]}),(0>n.top||0>n.left||n.top+this._sizes.element.h>this._sizes.window.h||n.left+this._sizes.element.w>this._sizes.window.w)&&(0>n.top&&(n.top=0),0>n.left&&(n.left=0),n.top+this._sizes.element.h>this._sizes.window.h&&(n.top=this._sizes.window.h-this._sizes.element.h),n.left+this._sizes.element.w>this._sizes.window.w&&(n.left=this._sizes.window.w-this._sizes.element.w)),e.offset(n),this._sequencer=this._sequencer||0,this._sequencer++,1==this._sequencer&&e.offset(n)},Droppables.isAffected=function(t,e,i){return Position.prepare(),positioned_within=Position.withinIncludingScrolloffsets(i.element,t[0],t[1]),i.element!=e&&(!i._containers||this.isContained(e,i))&&(!i.accept||Element.classNames(e).detect(function(t){return i.accept.include(t)}))&&positioned_within},Draggable.prototype.finishDrag=function(t,e){if(this.dragging=!1,delete this._sequencer,delete this._sizes,this.options.quiet){Position.prepare();var i=[Event.pointerX(t),Event.pointerY(t)];Droppables.show(i,this.element)}this.options.ghosting&&(this.element._originallyAbsolute||Position.relativize(this.element),this.element._originallyAbsolute=void 0,Element.remove(this._clone),this._clone=null),this.options.superghosting&&(body=document.getElementsByTagName("body")[0],Element.remove(this.element),new Draggable(this._clone,this.options));var n=!1;e&&(n=Droppables.fire(t,this.element),n||(n=!1)),n&&this.options.onDropped&&this.options.onDropped(this.element),Draggables.notify("onEnd",this,t);var s=this.options.revert;s&&"function"==typeof s&&(s=s(this.element));var o=this.currentDelta();s&&this.options.reverteffect?(0==n||"failure"!=s)&&this.options.reverteffect(this.element,o[1]-this.delta[1],o[0]-this.delta[0]):this.delta=o,this.options.zindex&&(this.element.style.zIndex=this.originalZ,this._clone&&(this._clone.style.zIndex=this.originalZ)),this.options.endeffect&&this.options.endeffect(this.element),Draggables.deactivate(this),Droppables.reset()},define("dragdrop.extra",["dragdrop","jquery"],function(t){return function(){var e;return e||t.Draggable}}(this));var Truncator=Class.create({initialize:function(t,e){if(t&&t[0]){var i=null;e&&(i=e),t.each(function(t){this.truncate(t,i)}.bind(this))}},truncate:function(t,e){if("ABBR"==t.nodeName){var i=t.title.replace("&quot;",'"');t=t.parentNode,t.update(i.strip().escapeHTML())}var n=Object.isUndefined(t.innerText)?t.textContent:t.innerText;t.insert(Truncator.template.evaluate({divId:Truncator.tmpDivId,spanId:Truncator.tmpSpanId}));var s=$(Truncator.tmpSpanId);s.insert(n.escapeHTML());var o=e?e:t.getWidth(),r=s.getWidth();if(o>=r)return void $(Truncator.tmpDivId).remove();for(var a=n,l=0,u=n.length,c=(u-l)/2;c>1;)c+=l,a=n.substr(0,c),isIE()?s.innerText=a:s.update(a.escapeHTML()),s.getWidth()+30>o?u=c:l=c,c=(u-l)/2;$(Truncator.tmpDivId).remove(),t.update(this.truncateString(this.ellipsifyString(a.escapeHTML()),n.escapeHTML().replace('"',"&quot;")))},untruncate:function(t){t.each(function(t){"ABBR"==t.nodeName&&t.update(t.title.strip().escapeHTML())})},ellipsifyString:function(t){return t+"&hellip;"},truncateString:function(t,e){return'<abbr title="'+e+'">'+t+"</abbr>"}});Truncator.tmpDivId="truncator-tmp-div",Truncator.tmpSpanId="truncator-tmp-span",Truncator.template=new Template('    <div id="#{divId}" style="width:9999px; left:-9999px; top:-9999px; display:block; position: absolute">        <span id="#{spanId}"></span>    </div>'),define("tools.truncator",["prototype"],function(t){return function(){var e;return e||t.jQuery}}(this)),function(){var t=Math,e=/webkit/i.test(navigator.appVersion)?"webkit":/firefox/i.test(navigator.userAgent)?"Moz":"opera"in window?"O":"",n="WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix,s="ontouchstart"in window,o=e+"Transform"in document.documentElement.style,r=/android/gi.test(navigator.appVersion),a=/iphone|ipad/gi.test(navigator.appVersion),u=/playbook/gi.test(navigator.appVersion),c=a||u,h=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return setTimeout(t,1)}}(),d=function(){return window.cancelRequestAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout}(),p="onorientationchange"in window?"orientationchange":"resize",f=s?"touchstart":"mousedown",m=s?"touchmove":"mousemove",g=s?"touchend":"mouseup",v=s?"touchcancel":"mouseup",_="Moz"==e?"DOMMouseScroll":"mousewheel",b="translate"+(n?"3d(":"("),y=n?",0)":")",w=function(t,i){var l,u=this,h=document;u.wrapper="object"==typeof t?t:h.getElementById(t),u.wrapper.style.overflow="hidden",u.scroller=u.wrapper.children[0],u.options={hScroll:!0,vScroll:!0,bounce:!0,bounceLock:!1,momentum:!0,lockDirection:!0,useTransform:!0,useTransition:!1,checkDOMChanges:!1,hScrollbar:!0,vScrollbar:!0,fixedScrollbar:r,hideScrollbar:a,fadeScrollbar:a&&n,scrollbarClass:"",zoom:!1,zoomMin:1,zoomMax:4,doubleTapZoom:2,wheelAction:"scroll",snap:!1,snapThreshold:1,onRefresh:null,onBeforeScrollStart:function(t){t.preventDefault()},onScrollStart:null,onBeforeScrollMove:null,onScrollMove:null,onBeforeScrollEnd:null,onScrollEnd:null,onTouchEnd:null,onDestroy:null,onZoomStart:null,onZoom:null,onZoomEnd:null};for(l in i)u.options[l]=i[l];u.options.useTransform=o?u.options.useTransform:!1,u.options.hScrollbar=u.options.hScroll&&u.options.hScrollbar,u.options.vScrollbar=u.options.vScroll&&u.options.vScrollbar,u.options.zoom=u.options.useTransform&&u.options.zoom,u.options.useTransition=c&&u.options.useTransition,u.scroller.style[e+"TransitionProperty"]=u.options.useTransform?"-"+e.toLowerCase()+"-transform":"top left",u.scroller.style[e+"TransitionDuration"]="0",u.scroller.style[e+"TransformOrigin"]="0 0",u.options.useTransition&&(u.scroller.style[e+"TransitionTimingFunction"]="cubic-bezier(0.33,0.66,0.66,1)"),u.options.useTransform?u.scroller.style[e+"Transform"]=b+"0,0"+y:u.scroller.style.cssText+=";position:absolute;top:0;left:0",u.options.useTransition&&(u.options.fixedScrollbar=!0),u.refresh(),u._bind(p,window),u._bind(f),s||(u._bind("mouseout",u.wrapper),u._bind(_)),u.options.checkDOMChanges&&(u.checkDOMTime=setInterval(function(){u._checkDOMChanges()},500))};w.prototype={enabled:!0,x:0,y:0,steps:[],scale:1,currPageX:0,currPageY:0,pagesX:[],pagesY:[],aniTime:null,wheelZoomCount:0,handleEvent:function(t){var e=this;switch(t.type){case f:if(!s&&0!==t.button)return;e._start(t);break;case m:e._move(t);break;case g:case v:e._end(t);break;case p:e._resize();break;case _:e._wheel(t);break;case"mouseout":e._mouseout(t);break;case"webkitTransitionEnd":e._transitionEnd(t)}},_checkDOMChanges:function(){this.moved||this.zoomed||this.animating||this.scrollerW==this.scroller.offsetWidth*this.scale&&this.scrollerH==this.scroller.offsetHeight*this.scale||this.refresh()},_scrollbar:function(i){var n,s=this,r=document;return s[i+"Scrollbar"]?(s[i+"ScrollbarWrapper"]||(n=r.createElement("div"),s.options.scrollbarClass?n.className=s.options.scrollbarClass+i.toUpperCase():n.style.cssText="position:absolute;z-index:100;"+("h"==i?"height:7px;bottom:1px;left:2px;right:"+(s.vScrollbar?"7":"2")+"px":"width:7px;bottom:"+(s.hScrollbar?"7":"2")+"px;top:2px;right:1px"),n.style.cssText+=";pointer-events:none;-"+e+"-transition-property:opacity;-"+e+"-transition-duration:"+(s.options.fadeScrollbar?"350ms":"0")+";overflow:hidden;opacity:"+(s.options.hideScrollbar?"0":"1"),s.wrapper.appendChild(n),s[i+"ScrollbarWrapper"]=n,n=r.createElement("div"),s.options.scrollbarClass||(n.style.cssText="position:absolute;z-index:100;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);-"+e+"-background-clip:padding-box;-"+e+"-box-sizing:border-box;"+("h"==i?"height:100%":"width:100%")+";-"+e+"-border-radius:3px;border-radius:3px"),n.style.cssText+=";pointer-events:none;-"+e+"-transition-property:-"+e+"-transform;-"+e+"-transition-timing-function:cubic-bezier(0.33,0.66,0.66,1);-"+e+"-transition-duration:0;-"+e+"-transform:"+b+"0,0"+y,s.options.useTransition&&(n.style.cssText+=";-"+e+"-transition-timing-function:cubic-bezier(0.33,0.66,0.66,1)"),s[i+"ScrollbarWrapper"].appendChild(n),s[i+"ScrollbarIndicator"]=n),"h"==i?(s.hScrollbarSize=s.hScrollbarWrapper.clientWidth,s.hScrollbarIndicatorSize=t.max(t.round(s.hScrollbarSize*s.hScrollbarSize/s.scrollerW),8),s.hScrollbarIndicator.style.width=s.hScrollbarIndicatorSize+"px",s.hScrollbarMaxScroll=s.hScrollbarSize-s.hScrollbarIndicatorSize,s.hScrollbarProp=s.hScrollbarMaxScroll/s.maxScrollX):(s.vScrollbarSize=s.vScrollbarWrapper.clientHeight,s.vScrollbarIndicatorSize=t.max(t.round(s.vScrollbarSize*s.vScrollbarSize/s.scrollerH),8),s.vScrollbarIndicator.style.height=s.vScrollbarIndicatorSize+"px",s.vScrollbarMaxScroll=s.vScrollbarSize-s.vScrollbarIndicatorSize,s.vScrollbarProp=s.vScrollbarMaxScroll/s.maxScrollY),void s._scrollbarPos(i,!0)):void(s[i+"ScrollbarWrapper"]&&(o&&(s[i+"ScrollbarIndicator"].style[e+"Transform"]=""),s[i+"ScrollbarWrapper"].parentNode.removeChild(s[i+"ScrollbarWrapper"]),s[i+"ScrollbarWrapper"]=null,s[i+"ScrollbarIndicator"]=null))},_resize:function(){var t=this;setTimeout(function(){t.refresh()},r?200:0)},_pos:function(i,n){i=this.hScroll?i:0,n=this.vScroll?n:0,this.options.useTransform?this.scroller.style[e+"Transform"]=b+i+"px,"+n+"px"+y+" scale("+this.scale+")":(i=t.round(i),n=t.round(n),this.scroller.style.left=i+"px",this.scroller.style.top=n+"px"),this.x=i,this.y=n,this._scrollbarPos("h"),this._scrollbarPos("v")},_scrollbarPos:function(i,n){var s,o=this,r="h"==i?o.x:o.y;o[i+"Scrollbar"]&&(r=o[i+"ScrollbarProp"]*r,0>r?(o.options.fixedScrollbar||(s=o[i+"ScrollbarIndicatorSize"]+t.round(3*r),8>s&&(s=8),o[i+"ScrollbarIndicator"].style["h"==i?"width":"height"]=s+"px"),r=0):r>o[i+"ScrollbarMaxScroll"]&&(o.options.fixedScrollbar?r=o[i+"ScrollbarMaxScroll"]:(s=o[i+"ScrollbarIndicatorSize"]-t.round(3*(r-o[i+"ScrollbarMaxScroll"])),8>s&&(s=8),o[i+"ScrollbarIndicator"].style["h"==i?"width":"height"]=s+"px",r=o[i+"ScrollbarMaxScroll"]+(o[i+"ScrollbarIndicatorSize"]-s))),o[i+"ScrollbarWrapper"].style[e+"TransitionDelay"]="0",o[i+"ScrollbarWrapper"].style.opacity=n&&o.options.hideScrollbar?"0":"1",o[i+"ScrollbarIndicator"].style[e+"Transform"]=b+("h"==i?r+"px,0":"0,"+r+"px")+y)},_start:function(i){var n,o,r,a,l,u=this,c=s?i.touches[0]:i;w.scrolling=!1,clearTimeout(w.scrollTimer),!u.enabled||Draggables.dragging||i.touches.length<2||(u.options.onBeforeScrollStart&&u.options.onBeforeScrollStart.call(u,i),(u.options.useTransition||u.options.zoom)&&u._transitionTime(0),u.moved=!1,u.animating=!1,u.zoomed=!1,u.distX=0,u.distY=0,u.absDistX=0,u.absDistY=0,u.dirX=0,u.dirY=0,u.options.zoom&&s&&i.touches.length>1&&(a=t.abs(i.touches[0].pageX-i.touches[1].pageX),l=t.abs(i.touches[0].pageY-i.touches[1].pageY),u.touchesDistStart=t.sqrt(a*a+l*l),u.originX=t.abs(i.touches[0].pageX+i.touches[1].pageX-2*u.wrapperOffsetLeft)/2-u.x,u.originY=t.abs(i.touches[0].pageY+i.touches[1].pageY-2*u.wrapperOffsetTop)/2-u.y,u.options.onZoomStart&&u.options.onZoomStart.call(u,i)),u.options.momentum&&(u.options.useTransform?(n=getComputedStyle(u.scroller,null)[e+"Transform"].replace(/[^0-9-.,]/g,"").split(","),o=1*n[4],r=1*n[5]):(o=1*getComputedStyle(u.scroller,null).left.replace(/[^0-9-]/g,""),r=1*getComputedStyle(u.scroller,null).top.replace(/[^0-9-]/g,"")),(o!=u.x||r!=u.y)&&(u.options.useTransition?u._unbind("webkitTransitionEnd"):d(u.aniTime),u.steps=[],u._pos(o,r))),u.absStartX=u.x,u.absStartY=u.y,u.startX=u.x,u.startY=u.y,u.pointX=c.pageX,u.pointY=c.pageY,u.startTime=i.timeStamp||(new Date).getTime(),u.options.onScrollStart&&u.options.onScrollStart.call(u,i),u._bind(m),u._bind(g),u._bind(v),w.scrolling=!0)},_move:function(i){var n,o,r,a=this,l=s?i.touches[0]:i,u=l.pageX-a.pointX,c=l.pageY-a.pointY,h=a.x+u,d=a.y+c,p=i.timeStamp||(new Date).getTime();return a.options.onBeforeScrollMove&&a.options.onBeforeScrollMove.call(a,i),a.options.zoom&&s&&i.touches.length>1?(n=t.abs(i.touches[0].pageX-i.touches[1].pageX),o=t.abs(i.touches[0].pageY-i.touches[1].pageY),a.touchesDist=t.sqrt(n*n+o*o),a.zoomed=!0,r=1/a.touchesDistStart*a.touchesDist*this.scale,r<a.options.scaleMin?r=.5*a.options.scaleMin*Math.pow(2,r/a.options.scaleMin):r>a.options.scaleMax&&(r=2*a.options.scaleMax*Math.pow(.5,a.options.scaleMax/r)),a.lastScale=r/this.scale,h=this.originX-this.originX*a.lastScale+this.x,d=this.originY-this.originY*a.lastScale+this.y,this.scroller.style[e+"Transform"]=b+h+"px,"+d+"px"+y+" scale("+r+")",void(a.options.onZoom&&a.options.onZoom.call(a,i))):(a.pointX=l.pageX,a.pointY=l.pageY,(h>0||h<a.maxScrollX)&&(h=a.options.bounce?a.x+u/2:h>=0||a.maxScrollX>=0?0:a.maxScrollX),(d>0||d<a.maxScrollY)&&(d=a.options.bounce?a.y+c/2:d>=0||a.maxScrollY>=0?0:a.maxScrollY),a.absDistX<6&&a.absDistY<6?(a.distX+=u,a.distY+=c,a.absDistX=t.abs(a.distX),void(a.absDistY=t.abs(a.distY))):(a.options.lockDirection&&(a.absDistX>a.absDistY+5?(d=a.y,c=0):a.absDistY>a.absDistX+5&&(h=a.x,u=0)),a.moved=!0,a._pos(h,d),a.dirX=u>0?-1:0>u?1:0,a.dirY=c>0?-1:0>c?1:0,p-a.startTime>300&&(a.startTime=p,a.startX=a.x,a.startY=a.y),void(a.options.onScrollMove&&a.options.onScrollMove.call(a,i))))},_end:function(i){if(!s||0==i.touches.length){var n,o,r,a,l,u,c=this,h=s?i.changedTouches[0]:i,d={dist:0,time:0},p={dist:0,time:0},f=(i.timeStamp||(new Date).getTime())-c.startTime,_=c.x,T=c.y;if(c._unbind(m),c._unbind(g),c._unbind(v),w.scrollTimer=setTimeout(function(){w.scrolling=!1},1e3),c.options.onBeforeScrollEnd&&c.options.onBeforeScrollEnd.call(c,i),c.zoomed)return u=c.scale*c.lastScale,u=Math.max(c.options.zoomMin,u),u=Math.min(c.options.zoomMax,u),c.lastScale=u/c.scale,c.scale=u,c.x=c.originX-c.originX*c.lastScale+c.x,c.y=c.originY-c.originY*c.lastScale+c.y,c.scroller.style[e+"TransitionDuration"]="200ms",c.scroller.style[e+"Transform"]=b+c.x+"px,"+c.y+"px"+y+" scale("+c.scale+")",c.zoomed=!1,c.refresh(),void(c.options.onZoomEnd&&c.options.onZoomEnd.call(c,i));if(!c.moved)return s&&(c.doubleTapTimer&&c.options.zoom?(clearTimeout(c.doubleTapTimer),c.doubleTapTimer=null,c.options.onZoomStart&&c.options.onZoomStart.call(c,i),c.zoom(c.pointX,c.pointY,1==c.scale?c.options.doubleTapZoom:1)):c.doubleTapTimer=setTimeout(function(){for(c.doubleTapTimer=null,n=h.target;1!=n.nodeType;)n=n.parentNode;"SELECT"!=n.tagName&&"INPUT"!=n.tagName&&"TEXTAREA"!=n.tagName&&(o=document.createEvent("MouseEvents"),o.initMouseEvent("click",!0,!0,i.view,1,h.screenX,h.screenY,h.clientX,h.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,0,null),o._fake=!0,n.dispatchEvent(o))},c.options.zoom?250:0)),c._resetPos(200),void(c.options.onTouchEnd&&c.options.onTouchEnd.call(c,i));if(i.scrollEvent=!0,300>f&&c.options.momentum&&(d=_?c._momentum(_-c.startX,f,-c.x,c.scrollerW-c.wrapperW+c.x,c.options.bounce?c.wrapperW:0):d,p=T?c._momentum(T-c.startY,f,-c.y,c.maxScrollY<0?c.scrollerH-c.wrapperH+c.y:0,c.options.bounce?c.wrapperH:0):p,_=c.x+d.dist,T=c.y+p.dist,(c.x>0&&_>0||c.x<c.maxScrollX&&_<c.maxScrollX)&&(d={dist:0,time:0}),(c.y>0&&T>0||c.y<c.maxScrollY&&T<c.maxScrollY)&&(p={dist:0,time:0})),d.dist||p.dist)return l=t.max(t.max(d.time,p.time),10),c.options.snap&&(r=_-c.absStartX,a=T-c.absStartY,t.abs(r)<c.options.snapThreshold&&t.abs(a)<c.options.snapThreshold?c.scrollTo(c.absStartX,c.absStartY,200):(snap=c._snap(_,T),_=snap.x,T=snap.y,l=t.max(snap.time,l))),c.scrollTo(_,T,l),void(c.options.onTouchEnd&&c.options.onTouchEnd.call(c,i));if(c.options.snap)return r=_-c.absStartX,a=T-c.absStartY,t.abs(r)<c.options.snapThreshold&&t.abs(a)<c.options.snapThreshold?c.scrollTo(c.absStartX,c.absStartY,200):(snap=c._snap(c.x,c.y),(snap.x!=c.x||snap.y!=c.y)&&c.scrollTo(snap.x,snap.y,snap.time)),void(c.options.onTouchEnd&&c.options.onTouchEnd.call(c,i));c._resetPos(200),c.options.onTouchEnd&&c.options.onTouchEnd.call(c,i)}},_resetPos:function(t){var i=this,n=i.x>=0?0:i.x<i.maxScrollX?i.maxScrollX:i.x,s=i.y>=0||i.maxScrollY>0?0:i.y<i.maxScrollY?i.maxScrollY:i.y;return n==i.x&&s==i.y?(i.moved&&(i.moved=!1,i.options.onScrollEnd&&i.options.onScrollEnd.call(i)),i.hScrollbar&&i.options.hideScrollbar&&("webkit"==e&&(i.hScrollbarWrapper.style[e+"TransitionDelay"]="300ms"),i.hScrollbarWrapper.style.opacity="0"),void(i.vScrollbar&&i.options.hideScrollbar&&("webkit"==e&&(i.vScrollbarWrapper.style[e+"TransitionDelay"]="300ms"),i.vScrollbarWrapper.style.opacity="0"))):void i.scrollTo(n,s,t||0)},_wheel:function(t){var e,i,n,s,o,r=this;return"wheelDeltaX"in t?(e=t.wheelDeltaX/12,i=t.wheelDeltaY/12):e=i="detail"in t?3*-t.detail:-t.wheelDelta,"zoom"==r.options.wheelAction?(o=r.scale*Math.pow(2,1/3*(i?i/Math.abs(i):0)),i<r.options.zoomMin&&(i=r.options.zoomMin),i>r.options.zoomMax&&(i=r.options.zoomMax),
  void(i!=r.scale&&(!r.wheelZoomCount&&r.options.onZoomStart&&r.options.onZoomStart.call(r,t),r.wheelZoomCount++,r.zoom(t.pageX,t.pageY,i,400),setTimeout(function(){r.wheelZoomCount--,!r.wheelZoomCount&&r.options.onZoomEnd&&r.options.onZoomEnd.call(r,t)},400)))):(n=r.x+e,s=r.y+i,n>0?n=0:n<r.maxScrollX&&(n=r.maxScrollX),s>0?s=0:s<r.maxScrollY&&(s=r.maxScrollY),void r.scrollTo(n,s,0))},_mouseout:function(t){var e=t.relatedTarget;if(!e)return void this._end(t);for(;e=e.parentNode;)if(e==this.wrapper)return;this._end(t)},_transitionEnd:function(t){var e=this;t.target==e.scroller&&(e._unbind("webkitTransitionEnd"),e._startAni())},_startAni:function(){var e,i,n=this,s=n.x,o=n.y,r=(new Date).getTime();if(!n.animating)return n.steps.length?(e=n.steps.shift(),e.x==s&&e.y==o&&(e.time=0),n.animating=!0,n.moved=!0,n.options.useTransition?(n._transitionTime(e.time),n._pos(e.x,e.y),n.animating=!1,void(e.time?n._bind("webkitTransitionEnd"):n._resetPos(0))):void function a(){var l,u,c=(new Date).getTime();return c>=r+e.time?(n._pos(e.x,e.y),n.animating=!1,n.options.onAnimationEnd&&n.options.onAnimationEnd.call(n),void n._startAni()):(c=(c-r)/e.time-1,i=t.sqrt(1-c*c),l=(e.x-s)*i+s,u=(e.y-o)*i+o,n._pos(l,u),void(n.animating&&(n.aniTime=h(a))))}()):void n._resetPos(400)},_transitionTime:function(t){t+="ms",this.scroller.style[e+"TransitionDuration"]=t,this.hScrollbar&&(this.hScrollbarIndicator.style[e+"TransitionDuration"]=t),this.vScrollbar&&(this.vScrollbarIndicator.style[e+"TransitionDuration"]=t)},_momentum:function(e,i,n,s,o){var r=6e-4,a=t.abs(e)/i,l=a*a/(2*r),u=0,c=0;return e>0&&l>n?(c=o/(6/(l/a*r)),n+=c,a=a*n/l,l=n):0>e&&l>s&&(c=o/(6/(l/a*r)),s+=c,a=a*s/l,l=s),l*=0>e?-1:1,u=a/r,{dist:l,time:t.round(u)}},_offset:function(t){for(var e=-t.offsetLeft,i=-t.offsetTop;t=t.offsetParent;)e-=t.offsetLeft,i-=t.offsetTop;return t!=this.wrapper&&(e*=this.scale,i*=this.scale),{left:e,top:i}},_snap:function(e,i){var n,s,o,r,a,l,u=this;for(o=u.pagesX.length-1,n=0,s=u.pagesX.length;s>n;n++)if(e>=u.pagesX[n]){o=n;break}for(o==u.currPageX&&o>0&&u.dirX<0&&o--,e=u.pagesX[o],a=t.abs(e-u.pagesX[u.currPageX]),a=a?t.abs(u.x-e)/a*500:0,u.currPageX=o,o=u.pagesY.length-1,n=0;o>n;n++)if(i>=u.pagesY[n]){o=n;break}return o==u.currPageY&&o>0&&u.dirY<0&&o--,i=u.pagesY[o],l=t.abs(i-u.pagesY[u.currPageY]),l=l?t.abs(u.y-i)/l*500:0,u.currPageY=o,r=t.round(t.max(a,l))||200,{x:e,y:i,time:r}},_bind:function(t,e,i){(e||this.scroller).addEventListener(t,this,!!i)},_unbind:function(t,e,i){(e||this.scroller).removeEventListener(t,this,!!i)},destroy:function(){var t=this;t.scroller.style[e+"Transform"]="",t.hScrollbar=!1,t.vScrollbar=!1,t._scrollbar("h"),t._scrollbar("v"),t._unbind(p,window),t._unbind(f),t._unbind(m),t._unbind(g),t._unbind(v),t.options.hasTouch&&(t._unbind("mouseout",t.wrapper),t._unbind(_)),t.options.useTransition&&t._unbind("webkitTransitionEnd"),t.options.checkDOMChanges&&clearInterval(t.checkDOMTime),t.options.onDestroy&&t.options.onDestroy.call(t)},refresh:function(){var n,s=this,o=0,r=0;if(w.scrolling=!1,s.scale<s.options.zoomMin&&(s.scale=s.options.zoomMin),s.wrapperW=s.wrapper.clientWidth||1,s.wrapperH=s.wrapper.clientHeight||1,s.scrollerW=t.round(s.scroller.offsetWidth*s.scale),s.scrollerH=t.round(s.scroller.offsetHeight*s.scale),s.maxScrollX=s.wrapperW-s.scrollerW,s.maxScrollY=s.wrapperH-s.scrollerH,s.dirX=0,s.dirY=0,s.hScroll=s.options.hScroll&&s.maxScrollX<0,s.vScroll=s.options.vScroll&&(!s.options.bounceLock&&!s.hScroll||s.scrollerH>s.wrapperH),s.hScrollbar=s.hScroll&&s.options.hScrollbar,s.vScrollbar=s.vScroll&&s.options.vScrollbar&&s.scrollerH>s.wrapperH,n=s._offset(s.wrapper),s.wrapperOffsetLeft=-n.left,s.wrapperOffsetTop=-n.top,"string"==typeof s.options.snap)for(s.pagesX=[],s.pagesY=[],els=s.scroller.querySelectorAll(s.options.snap),i=0,l=els.length;i<l;i++)o=s._offset(els[i]),o.left+=s.wrapperOffsetLeft,o.top+=s.wrapperOffsetTop,s.pagesX[i]=o.left<s.maxScrollX?s.maxScrollX:o.left*s.scale,s.pagesY[i]=o.top<s.maxScrollY?s.maxScrollY:o.top*s.scale;else if(s.options.snap){for(s.pagesX=[];o>=s.maxScrollX;)s.pagesX[r]=o,o-=s.wrapperW,r++;for(s.maxScrollX%s.wrapperW&&(s.pagesX[s.pagesX.length]=s.maxScrollX-s.pagesX[s.pagesX.length-1]+s.pagesX[s.pagesX.length-1]),o=0,r=0,s.pagesY=[];o>=s.maxScrollY;)s.pagesY[r]=o,o-=s.wrapperH,r++;s.maxScrollY%s.wrapperH&&(s.pagesY[s.pagesY.length]=s.maxScrollY-s.pagesY[s.pagesY.length-1]+s.pagesY[s.pagesY.length-1])}s._scrollbar("h"),s._scrollbar("v"),s.zoomed||(s.scroller.style[e+"TransitionDuration"]="0",s._resetPos(200))},scrollTo:function(t,e,i,n){var s,o,r=this,a=t;for(r.stop(),a.length||(a=[{x:t,y:e,time:i,relative:n}]),s=0,o=a.length;o>s;s++)a[s].relative&&(a[s].x=r.x-a[s].x,a[s].y=r.y-a[s].y),r.steps.push({x:a[s].x,y:a[s].y,time:a[s].time||0});r._startAni()},scrollToElement:function(e,i){var n,s=this;e=e.nodeType?e:s.scroller.querySelector(e),e&&(n=s._offset(e),n.left+=s.wrapperOffsetLeft,n.top+=s.wrapperOffsetTop,n.left=n.left>0?0:n.left<s.maxScrollX?s.maxScrollX:n.left,n.top=n.top>0?0:n.top<s.maxScrollY?s.maxScrollY:n.top,i=void 0===i?t.max(2*t.abs(n.left),2*t.abs(n.top)):i,s.scrollTo(n.left,n.top,i))},scrollToPage:function(t,e,i){var n,s,o=this;o.options.snap?(t="next"==t?o.currPageX+1:"prev"==t?o.currPageX-1:t,e="next"==e?o.currPageY+1:"prev"==e?o.currPageY-1:e,t=0>t?0:t>o.pagesX.length-1?o.pagesX.length-1:t,e=0>e?0:e>o.pagesY.length-1?o.pagesY.length-1:e,o.currPageX=t,o.currPageY=e,n=o.pagesX[t],s=o.pagesY[e]):(n=-o.wrapperW*t,s=-o.wrapperH*e,n<o.maxScrollX&&(n=o.maxScrollX),s<o.maxScrollY&&(s=o.maxScrollY)),o.scrollTo(n,s,i||400)},disable:function(){this.stop(),this._resetPos(0),this.enabled=!1,this._unbind(m),this._unbind(g),this._unbind(v)},enable:function(){this.enabled=!0},stop:function(){this.options.useTransition?this._unbind("webkitTransitionEnd"):d(this.aniTime),this.steps=[],this.moved=!1,this.animating=!1},zoom:function(t,i,n,s){var o=this,r=n/o.scale;o.options.useTransform&&(o.zoomed=!0,s=void 0===s?200:s,t=t-o.wrapperOffsetLeft-o.x,i=i-o.wrapperOffsetTop-o.y,o.x=t-t*r+o.x,o.y=i-i*r+o.y,o.scale=n,o.refresh(),o.x=o.x>0?0:o.x<o.maxScrollX?o.maxScrollX:o.x,o.y=o.y>0?0:o.y<o.maxScrollY?o.maxScrollY:o.y,o.scroller.style[e+"TransitionDuration"]=s+"ms",o.scroller.style[e+"Transform"]=b+o.x+"px,"+o.y+"px"+y+" scale("+n+")",o.zoomed=!1)},isReady:function(){return!this.moved&&!this.zoomed&&!this.animating}},"undefined"!=typeof exports?exports.iScroll=w:window.iScroll=w}(),define("iscroll",function(t){return function(){var e;return e||t.iScroll}}(this));var webHelpModule={currentContext:"default",displayWebHelp:function(){var t=__jrsConfigs__.webHelpModuleState;if(t){var e=t.hostURL+"/"+t.pagePrefix+webHelpModule.getPageForContext();window.name="";var i=window.open(e,"MCWebHelp");i.focus()}},getPageForContext:function(){return __jrsConfigs__.webHelpModuleState.contextMap[webHelpModule.currentContext]},setCurrentContext:function(t){webHelpModule.currentContext=t}};define("components.webHelp",["jrs.configs"],function(t){return function(){var e;return e||t.webHelpModule}}(this));var layoutModule={ELEMENT_CONTEXTMENU:"element:contextmenu",SIZEABLE_PATTERN:".sizeable",SIZER_PATTERN:".sizer",RESIZE_OVERLAY_PATTERN:".resizeOverlay",MOVEABLE_PATTERN:".moveable",MOVER_PATTERN:".mover",MINIMIZER_PATTERN:".maximized .minimize",MINIMIZED_PATTERN:".minimized .minimize",TRUNCATE_PATTERN:".trunc",TREE_LEAF_PATTERN:"a.>node",TREE_CONTAINER_PATTERN:".collapsible",TOOLBAR_CAPSULE_PATTERN:"#toolbar .capsule",NAVIGATION_MUTTON_PATTERN:"li.mutton",NAVIGATION_PATTERN:"#navigationOptions li",NAVIGATION_HOVER_PATTERN:"#navigationOptions li.over",META_LINKS_PATTERN:"#metaLinks #main_logOut_link",BUTTON_SET_BUTTON:".buttonSet > *",TABSET_TAB_PATTERN:".tab",BUTTON_PATTERN:".button",PRESSED_PATTERN:".pressed",SELECTED_PATTERN:".selected",LIST_ITEM_PATTERN:".list.responsive > li",LIST_ITEM_WRAP_PATTERN:".wrap",DISCLOSURE_BUTTON_PATTERN:".disclosure",MENU_LIST_PATTERN:"#menu li",SEPARATOR_PATTERN:".separator",MESSAGE_PATTERN:".message",MESSAGE_WARNING_PATTERN:".message.warning",MESSAGE_WARNING_DETAILS_PATTERN:".details",MESSAGE_SUCCESS_PATTERN:".message.success",DETAILS_PATTERN:".details",COLUMN_NODE_WRAPPER_PATTERN:".node > .wrap > .column",COLUMN_LEAF_WRAPPER_PATTERN:".leaf > .wrap > .column",SEARCH_LOCKUP_PATTERN:".searchLockup",DIALOG_PATTERN:".dialog",DIALOG_LOADING_PATTERN:".dialog.loading",SWIPE_SCROLL_PATTERN:".swipeScroll",SCROLL_WRAPPER_PATTERN:".scrollWrapper",ADHOC_MODE_OPTION_CLASS:"tab mode horizontal",DRAGGING_CLASS:"dragging",COPY_CLASS:"copy",PRESSED_CLASS:"pressed",SELECTED_CLASS:"selected",DISABLED_CLASS:"disabled",HOVERED_CLASS:"over",ERROR_CLASS:"error",SUCCESS_CLASS:"error",MESSAGE_CLASS:"error",UP_CLASS:"up",LAST_CLASS:"last",FIRST_CLASS:"first",SCHEDULED_CLASS:"scheduled",MENU_ROOT_CLASS:"menuRoot",NODE_CLASS:"node",LEAF_CLASS:"leaf",ICON_CLASS:"icon",OPEN_CLASS:"open",CLOSED_CLASS:"closed",LOADING_CLASS:"loading",NOTHING_TO_DISPLAY_CLASS:"nothingToDisplay",COLLAPSIBLE_CLASS:"collapsible",RESPONSIVE_CLASS:"responsive",HIDDEN_CLASS:"hidden",NO_GENERATORS_CLASS:"noGenerators",STACKTRACE_CLASS:"stacktrace",EMPHASIS_CLASS:"emphasis",ASCENDING_CLASS:"ascending",DESCENDING_CLASS:"descending",CANCELLABLE_CLASS:"cancellable",DROP_TARGET_CLASS:"dropTarget",BUTTON_CLASS:"button",ONE_COLUMN_CLASS:"oneColumn",CONTROL_PAGE_CLASS:"controlPage",DISABLED_ATTR_NAME:"disabled",SELECTED_ATTR_NAME:"selected",OPEN_ATTR_NAME:"open",CLOSED_ATTR_NAME:"closed",READONLY_ATTR_NAME:"readonly",DIMMER_ID:"pageDimmer",PAGE_BODY_ID:"display",MENU_ID:"menu",MAIN_NAVIGATION_ID:"mainNavigation",MAIN_NAVIGATION_HOME_ITEM_ID:"main_home",MAIN_NAVIGATION_LIBRARY_ITEM_ID:"main_library",META_LINK_LOGOUT_ID:"main_logOut_link",SCROLL_SENSITIVITY:50,DND_MOVABLE_ZINDEX:2e3,DIMMER_Z_INDEX:900,FOLDERS_RESIZABLE_PANEL_ID:"folders",FILTERS_RESIZABLE_PANEL_ID:"filters",PROPERTIES_RESIZABLE_PANEL_ID:"properties",FIELDS_RESIZABLE_PANEL_ID:"fields",FOLDERS_RESIZABLE_PANEL_COOKIE_NAME:"foldersPanelWidth",FOLDERS_MINIMIZED_PANEL_COOKIE_NAME:"foldersMinimized",FILTERS_RESIZABLE_PANEL_COOKIE_NAME:"filtersPanelWidth",FILTERS_MINIMIZED_PANEL_COOKIE_NAME:"filtersMinimized",PROPERTIES_RESIZABLE_PANEL_COOKIE_NAME:"propertiesPanelWidth",PROPERTIES_MINIMIZED_PANEL_COOKIE_NAME:"propertiesMinimized",FIELDS_RESIZABLE_PANEL_COOKIE_NAME:"fieldsPanelWidth",FIELDS_MINIMIZED_PANEL_COOKIE_NAME:"fieldsMinimized",PANEL_WIDTH:"PanelWidth",MINIMIZED:"Minimized",PANEL_STATE_CHANGED_MANUALLY:"PSCM",scrolls:$H(),initialize:function(t){t=$(t)||$(document.body),new Truncator(t.select(layoutModule.TRUNCATE_PATTERN)),isIE7()&&this.fixIE7Sizes(),t.select(this.SIZEABLE_PATTERN).each(this.createSizer.bind(this)),t.select(this.MOVEABLE_PATTERN).each(this.createMover.bind(this)),t.select(".centered_horz,.centered_vert").each(function(t){var e=parseFunc(t,"centered_fn_");e||(e=centerElement),e(t,{horz:t.match(".centered_horz"),vert:t.match(".centered_vert")})}),null!=$(layoutModule.DIMMER_ID)&&($(layoutModule.DIMMER_ID).style.zIndex=layoutModule.DIMMER_Z_INDEX),jQuery.datepicker&&jQuery.datepicker.initialized&&(jQuery.datepicker.initialized=!1),jQuery(function(){0===jQuery("#ajaxbuffer").length&&jQuery("body").append(jQuery('<div id="ajaxbuffer" style="display:none"></div>'))}),jQuery(window).resize(function(){this.resizeTo&&clearTimeout(this.resizeTo),this.resizeTo=setTimeout(function(){jQuery(this).trigger("resizeEnd")},500)})},updateOnOrientation:function(){},isVisible:function(t){return t&&!$(t).hasClassName(layoutModule.HIDDEN_CLASS)},createScroller:function(t,e){if(t){t=t.identify?t:$(t);var i=layoutModule.scrolls.get(t.identify());i&&i.destroy();var n=["mainTableContainer","resultsContainer","filtersPanel","foldersPodContent"];t.identify().startsWith("iframeScroll_")&&n.push(t.identify()),e=Object.extend({hideScrollbar:!1,useTransform:!n.include(t.identify()),bounce:["resultsContainer"].include(t.identify())},e||{});var s=new iScroll(t,e);return layoutModule.scrolls.set(t.identify(),s),s}return null},createSizer:function(t,e){t=$(t);var i=e&&e.sizer?$(e.sizer):t.down(this.SIZER_PATTERN);if(i&&!matchMeOrUp(t,"."+layoutModule.HIDDEN_CLASS)){var n=this.getSizerType(i),s=this.alignmentModule.getSizerAlignment(i,n),o=new Draggable(i);o.resizeablePanel=t,o.primaryPanel=$(t).siblings().find(function(t){return t.match(".primary")}),e&&e.fillerPattern&&(o.filler=$(jQuery(t).find(e.fillerPattern)[0]));var r=function(){return function(t){o.pointerX=t.pointerX(),o.pointerY=t.pointerY()}}();i.observe("mousedown",r),jQuery(i).bind({touchstart:function(t){r(t.originalEvent),this.style.background="#666",this.style.zIndex=9},touchend:function(){this.style.background="transparent"}}),o.sizerType=n,o.alignment=s,o.options={constraint:"diagonal"===n?"":n,onStart:layoutModule.beginSizerDragging.bind(layoutModule),onDrag:isIPad()?doNothing:layoutModule.respondToDrag.bind(layoutModule),onEnd:layoutModule.endSizerDragging.bind(layoutModule)}}},getSizerType:function(t){return t.match(".horizontal")&&"horizontal"||t.match(".vertical")&&"vertical"||t.match(".diagonal")&&"diagonal"},alignmentModule:{alignments:[["left","right"],["top","bottom"]],alignmentIndexes:{horizontal:0,vertical:1},dimensions:["width","height"],getSizerAlignment:function(t,e){var i=["",""];if("diagonal"===e)return["right","bottom"];var n=this.alignmentIndexes[e],s=this.alignments[n],o=[0,1].map(function(e){return parseInt(t.getStyle(s[e]))}),r=isNaN(o[0])||o[0]>o[1]?s[1]:s[0];return i[n]=r,i}},beginSizerDragging:function(t,e){var i=t.element;t.parentOffset=[i.getStyle(t.alignment[0]),i.getStyle(t.alignment[1])],t.offsetUnit="px",t.pointerX=t.pointerX||e.pointerX(),t.pointerY=t.pointerY||e.pointerY(),t.element.addClassName(layoutModule.DRAGGING_CLASS),$$(layoutModule.RESIZE_OVERLAY_PATTERN).each(function(t){t.removeClassName(layoutModule.HIDDEN_CLASS)})},endSizerDragging:function(t,e){layoutModule.respondToDrag(t,e),t.element.removeClassName(layoutModule.DRAGGING_CLASS),$$(layoutModule.RESIZE_OVERLAY_PATTERN).each(function(t){t.addClassName(layoutModule.HIDDEN_CLASS)}),document.fire("dragger:sizer",{targetEvent:e,element:t.element}),jQuery(window).trigger("resize",{targetEvent:e,element:t.element})},respondToDrag:function(t,e){"vertical"!==t.sizerType&&this.resizeOnDrag(t,e,"horizontal"),"horizontal"!==t.sizerType&&this.resizeOnDrag(t,e,"vertical")},resizeOnDrag:function(t,e,i){var n={};n.axis="horizontal"==i?0:1,n.myAlignments=this.alignmentModule.alignments[n.axis],n.dimension=this.alignmentModule.dimensions[n.axis],n.sizeProperty=n.axis?"offsetHeight":"offsetWidth";var s=n.axis?"pointerY":"pointerX",o={pointerY:"clientY",pointerX:"clientX"};t.element;n.sizeableAnchorage=t.alignment[n.axis]===n.myAlignments[0]?n.myAlignments[1]:n.myAlignments[0];var r=e.changedTouches?e.changedTouches[0][o[s]]:e[s](),a=t[s]?r-t[s]:0;a=t.alignment[n.axis]===n.myAlignments[1]?a:0-a,n.dragDelta=a,t[s]=e[s](),this.resizePanelsOnDrag(t,n)},resizePanelsOnDrag:function(t,e){var i=this.getSizeTracker();i.checkpoint(t.resizeablePanel[e.sizeProperty]),t.filler&&!t["fillerDelta"+e.dimension]&&(t["fillerDelta"+e.dimension]=t.resizeablePanel[e.sizeProperty]-t.filler[e.sizeProperty]);var n=getDimensionInPx(t.resizeablePanel,e.dimension);if((this.isInBounds(t,e)||!this.isInBounds(t,e)&&e.dragDelta<0)&&(t.resizeablePanel.setStyle(e.dimension+":"+(n+e.dragDelta)+"px"),t.filler&&t.filler.setStyle(e.dimension+":"+(n+e.dragDelta-t["fillerDelta"+e.dimension])+"px")),window.localStorage&&localStorage.setItem(t.resizeablePanel.identify()+layoutModule.PANEL_WIDTH,t.resizeablePanel.getWidth()),!i.changed(t.resizeablePanel[e.sizeProperty])){var s=getActualDimension(t.resizeablePanel,e.dimension);return t.alignment[e.axis]!=e.myAlignments[0]&&(t.element.style[e.myAlignments[0]]=""),t.element.setStyle(t.alignment[e.axis]+":"+t.parentOffset[e.axis]),t.resizeablePanel.setStyle(e.dimension+":"+s+"px"),t.primaryPanel&&t.primaryPanel.style.zIndex==t.resizeablePanel.style.zIndex&&t.primaryPanel.setStyle(e.sizeableAnchorage+":"+s+"px"),void(t.filler&&t.filler.setStyle(e.dimension+":"+(s-t["fillerDelta"+e.dimension])+"px"))}var o;if(t.resizeablePanel.currentStyle?o=t.resizeablePanel.currentStyle.minWidth:(o=document.defaultView.getComputedStyle(t.resizeablePanel,null),o=o["min-width"]?o["min-width"]:o.minWidth),o=o.substring(0,o.indexOf("px")),t.primaryPanel&&t.primaryPanel.style.zIndex==t.resizeablePanel.style.zIndex){var r=getDimensionInPx(t.primaryPanel,e.sizeableAnchorage)+e.dragDelta,a=o>r?o:r;t.primaryPanel.setStyle(e.sizeableAnchorage+":"+a+"px")}t.alignment[e.axis]!=e.myAlignments[0]&&(t.element.style[e.myAlignments[0]]=""),t.element.setStyle(t.alignment[e.axis]+":"+t.parentOffset[e.axis]),jQuery("body").trigger("layout_update")},isInBounds:function(t,e){var i,n,s,o,r,a=jQuery(t.primaryPanel),l=a.parent(),u=e.dimension;if(t.primaryPanel){u=u.replace(u.charAt(0),u.charAt(0).toUpperCase()),r=jQuery.fn["outer"+u],o=r.call(a,!0)-r.call(a),i=parseInt(a.css("min-"+e.dimension)),isNaN(i)&&(i=0),n=parseInt(a.css(e.sizeableAnchorage)),s=parseInt(l.css(e.dimension));var c=l.children("div:visible:not(.minimized)");return jQuery.each(c,function(){var e=jQuery(this),i=0===e.width()||0===e.height();t.resizeablePanel==this||t.primaryPanel==this||i||(s-=r.call(e,!0))}),s-n-e.dragDelta>i+o}return!0},getSizeTracker:function(){return lastSize=-1,{checkpoint:function(t){lastSize=t},changed:function(t){return t!=lastSize}}},createMover:function(t){var e=t.down(this.MOVER_PATTERN);if(e&&!matchMeOrUp(t,"."+layoutModule.HIDDEN_CLASS)){var i=Math.max(this.DND_MOVABLE_ZINDEX,t.getStyle("zIndex"));new Draggable(t,{handle:e,zindex:i})}},maximize:function(t,e){function i(){s.removeClassName("minimized_if_vertical_orientation"),s.removeClassName("minimized"),s.addClassName("maximized"),window.localStorage&&localStorage.setItem(s.identify()+layoutModule.MINIMIZED,!1),jQuery("div.content",s).show()}e=!0;var n=t.hasClassName?t:$(t),s=n.hasClassName("column")?n:n.up(".column");0===window.orientation&&("filters"==s.id&&layoutModule.minimize(document.getElementById("fields")),"fields"==s.id&&layoutModule.minimize(document.getElementById("filters")));var o,r=layoutModule.alignmentModule.alignments[0],a=r.map(function(t){return parseInt(s.getStyle(t))}),l=r[0===a[0]?0:1],u=s.siblings().find(function(t){return t.match(".primary")});u&&window.localStorage&&(o=localStorage.getItem(s.identify()+layoutModule.PANEL_WIDTH)),o&&!isNaN(o)&&(o+="px",s.setStyle({width:o}),e?(u.style[l]=o,s.removeClassName("minimized_if_vertical_orientation"),s.removeClassName("minimized"),s.addClassName("maximized"),window.localStorage&&localStorage.setItem(s.identify()+layoutModule.MINIMIZED,!1),jQuery("div.content",s).show(),jQuery("div.vtitle",s).hide()):(new Effect.Morph(u,{style:l+":"+o,duration:.6,afterFinish:function(){jQuery("body").trigger("layout_update")}}),new Effect.Opacity(s,{to:0,from:1,duration:.3,queue:{position:"front",scope:"sidePanel"},afterFinish:i}),new Effect.Opacity(s,{to:1,from:0,duration:.3,queue:{position:"end",scope:"sidePanel"}}))),jQuery(s).find(".sizer").show(),jQuery("body").trigger("layout_update",{elem:t.parentNode,type:"panel-maximize"}),jQuery(".column.secondary > div.content > .body").show().height()},minimize:function(t,e){function i(){r.addClassName("minimized"),r.removeClassName("maximized"),r.removeClassName("minimized_if_vertical_orientation"),window.localStorage&&localStorage.setItem(r.identify()+layoutModule.MINIMIZED,!0),jQuery("div.content",r).hide()}var n,s;e=!0;var o=t.hasClassName?t:$(t),r=o.hasClassName("column")?o:o.up(".column"),a=window.localStorage&&"true"==localStorage.getItem(r.identify()+layoutModule.MINIMIZED);!a&&window.localStorage&&localStorage.setItem(r.identify()+layoutModule.PANEL_WIDTH,r.getWidth());var l=layoutModule.alignmentModule.alignments[0],u=l.map(function(t){return parseInt(r.getStyle(t))}),c=l[0===u[0]?0:1];if(n=r.siblings().find(function(t){return t.match(".primary")}))if(s=n.getStyle(c),e){var h=jQuery("div.title",r).eq(0),d=jQuery("div.vtitle",r),p=h.html(),f=h.width();f=7*jQuery.trim(h.text()).length,n.style[c]="24px",r.addClassName("minimized"),r.removeClassName("maximized"),r.removeClassName("minimized_if_vertical_orientation"),window.localStorage&&localStorage.setItem(r.identify()+layoutModule.MINIMIZED,!0),d.length||(d=jQuery('<div class="vtitle"></div>').appendTo(r),d.on("mouseup touchend",function(t){layoutModule.maximize(d[0]),t.preventDefault()}),d.html(jQuery.trim(p)).width(f+24)),isIE7()||isIE8()||isIE9()?d.css({top:0,left:0}):d.css("top",f+24+"px"),location.href.indexOf("nui=1")>0?d.hide():d.show(),jQuery("div.content",r).hide()}else new Effect.Morph(n,{style:c+":0px",duration:.6,afterFinish:function(){jQuery("body").trigger("layout_update")}}),new Effect.Opacity(r,{to:0,from:1,duration:.3,queue:{position:"front",scope:"sidePanel"},afterFinish:i}),new Effect.Opacity(r,{to:1,from:0,duration:.3,queue:{position:"end",scope:"sidePanel"}});jQuery(r).find(".sizer").hide(),jQuery("body").trigger("layout_update",{elem:t.parentNode,type:"panel-minimize"})},resizeOnClient:function(t,e,i){var n,s=[],o=jQuery("#"+e),r=jQuery("#display").width()-20-parseInt(o.width());jQuery.each([t,i],function(t,e){e&&(s.push({id:e,isLeft:0===t,jo:jQuery("#"+e),width:window.localStorage?parseInt(localStorage.getItem(e+layoutModule.PANEL_WIDTH)):250}),s[t].minimized=window.localStorage?localStorage.getItem(e+layoutModule.MINIMIZED):!1,s[t].minimized=Object.isUndefined(s[t].minimized)?s[t].jo.hasClass("minimized"):"true"==s[t].minimized,n=s[t].jo[0].currentStyle?s[t].jo[0].currentStyle.minWidth:document.defaultView.getComputedStyle(s[t].jo[0],null).minWidth,s[t].minWidth=(n&&n.indexOf("px"))>0?n.substring(0,n.indexOf("px")):200,s[t].width=s[t].width?s[t].width:s[t].jo.width(),r-=s[t].width)});var a=0>r?Math.abs(r):0;r=0,jQuery.each(s,function(t,e){e.jo.length&&e.jo.is(":visible")&&(e.minimized?(e.jo.removeClass("maximized").addClass("minimized"),layoutModule.minimize(e.jo[0],!0)):(1==t&&!s[0].minimized&&s[0].jo.is(":visible")&&(e.width-=a,e.width<e.minWidth&&(r=e.width-e.minWidth,e.width=e.minWidth)),e.jo.removeClass("minimized").addClass("maximized"),o.css(e.isLeft?"left":"right",e.width+"px"),e.jo.css("width",e.width+"px")))}),0!==r&&(s[0].width+=r,s[0].width=s[0].width<s[0].minWidth?s[0].minWidth:s[0].width,o.css("left",s[0].width+"px"),s[0].jo.css("width",s[0].width+"px"))},autoMaximize:function(t){var e=window.localStorage?localStorage.getItem(t.identify()+layoutModule.MINIMIZED):"false";"true"==e?t.hasClassName("minimized")&&layoutModule.maximize(t,!0):!t.hasClassName("minimized")&&layoutModule.minimize(t,!0)},autoMinimize:function(t){var e=window.localStorage?localStorage.getItem(t.identify()+layoutModule.MINIMIZED):"false";"false"==e?layoutModule.minimize(t,!0):t.removeClassName("minimized")},fixIE7Sizes:function(){$$(".control.tabSet.buttons.vertical").each(function(t){t.immediateDescendants().each(function(e){e.style.width=t.clientWidth||t.offsetWidth})})},storePanelWidth:function(t,e){window.localStorage&&localStorage.setItem(t+layoutModule.PANEL_WIDTH,e)},getPanelWidth:function(t){return window.localStorage?localStorage.getItem(t+layoutModule.PANEL_WIDTH):void 0},getPanelMinimizedState:function(t){return window.localStorage?localStorage.getItem(t+layoutModule.MINIMIZED):void 0},storePanelMinimizedState:function(t,e){window.localStorage&&localStorage.setItem(t+layoutModule.MINIMIZED,e.toString())},manuallyChangePanelState:function(t,e,i){window.localStorage&&localStorage.setItem(t+layoutModule.PANEL_STATE_CHANGED_MANUALLY+e,i)},panelStateWasManuallyChanged:function(t,e){return window.localStorage?"true"===localStorage.getItem(t+layoutModule.PANEL_STATE_CHANGED_MANUALLY+e):!1}};define("core.layout",["jquery","prototype","utils.common","dragdrop.extra","tools.truncator","iscroll","components.webHelp"],function(t){return function(){var e;return e||t.layoutModule}}(this)),define("bundle",["require","request","requestSettings","underscore","jrs.configs"],function(t){"use strict";var e=t("request"),i=t("requestSettings"),n=t("underscore"),s=t("jrs.configs"),o=s.contextPath+"/rest_v2/bundles",r="all",a=function(t,s){var a;r===t?a="?expanded=true":(t=t.split("/"),a="/"+t[t.length-1]);var l=n.extend({},i,{type:"GET",dataType:"json",url:o+a});e(l).then(function(e){s(r!==t?e:n(e).reduce(function(t,e){return n.extend(t,e)},{}))})};return a.load=function(t,e,i,n){return n.isBuild?void i():void a(t,i)},a}),define("stdnav",["require","exports","module","jquery","underscore","logger"],function(t,e,i){"use strict";var n=t("jquery"),s=(t("underscore"),t("logger").register(i)),o=0,r=function(){o++,this.serial=o,this.menuItemCallbacks={click:{}},this.plugins={},this.modalDialogActive=!1,this.modalDialogRoot=null,this.debugElementID=null,this.chaffLength=1,this.maxChaffLength=8};n.extend(r.prototype,{_maxNavDepth:100,nullOrUndefined:function(t){return null===t||"undefined"==typeof t?!0:!1},closestAncestor:function(t,e,i,s){if(void 0===t||null===t)return void 0;for(var o=n(t).parent(),r=1;void 0!==o;){if(null!==s&&void 0!==s&&r>=s)return void 0;if(o.is(i))return void 0;if(o.is(e))return o;r++,o=o.parent()}return void 0},closestDescendant:function(t,e,i,s){if(null===t||void 0===t||null===e||void 0===e)return void 0;var o;o=null===s||void 0===s?this._maxNavDepth:s;for(var r=[],a=0,l=1,u=0,c=t;void 0!==c;){if(n(c).is(e)&&a>0)return c;if(!n(c).is(i)){var h=n(c).children();h.each(function(t,e){r.unshift(e),u++})}if(0===--l&&(a++,l=u,u=0),a>o)return void 0;c=r.pop()}return void 0},zinit:function(t){return s.debug("stdnav.init("+t+")\n"),this},navtype_nodeNames:{},updateDebugInfo:function(){if(this.debugElementID){var t=n("#"+this.debugElementID),e=n(".superfocus"),i=n(document.activeElement),s=n(".subfocus"),o="[sup:";t.length<1||(o+=e.length,o+=e.length>0?":"+e[0].nodeName+"#"+e[0].id:"?",o+=", foc:",o+=i.length,o+=i.length>0?":"+i[0].nodeName+"#"+i[0].id:"?",o+=", sub:",o+=s.length,o+=s.length>0?":"+s[0].nodeName+"#"+s[0].id:"?",e=n(this._priorSuperfocus),i=n(this._priorFocus),s=n(this._priorSubfocus),o+=" :: psup:",t.length<1||(o+=e.length,o+=e.length>0?":"+e[0].nodeName+"#"+e[0].id:"?",o+=", pfoc:",o+=i.length,o+=i.length>0?":"+i[0].nodeName+"#"+i[0].id:"?",o+=", psub:",o+=s.length,o+=s.length>0?":"+s[0].nodeName+"#"+s[0].id:"?",o+="]",t.text(o)))}},beginModalFocus:function(t){if(t){this.modalDialogActive===!0&&this.endModalFocus(this.modalDialogRoot);var e=n(t),i=n("body *").filter(function(){return!(n.contains(t,this)||e.is(this))});this.modalDialogActive=!0,this.modalDialogRoot=t,i.each(function(t,e){var i=n(e),s=i.attr("tabIndex");"undefined"==typeof s?(i.attr("js-nonmodal-tabindex","undefined"),i.attr("tabIndex","-1")):(i.attr("js-nonmodal-tabindex",s),i.attr("tabIndex","-1"))})}},endModalFocus:function(t){var e,i;t?(e=n(t),i=n("body *").filter(function(){return!(n.contains(e,this)||e.is(this))})):(e=n(),i=n("body *")),i.each(function(t,e){var i=n(e),s=i.attr("js-nonmodal-tabindex");"undefined"==typeof s||("undefined"===s?(i.removeAttr("js-nonmodal-tabindex"),i.removeAttr("tabIndex")):(i.removeAttr("js-nonmodal-tabindex"),i.attr("tabIndex",s)))}),this.modalDialogActive=!1,this.modalDialogRoot=null},isNavigable:function(t){return n(t).is(this._navigableFilter)&&!n(t).is(this._unnavigableFilter)?!0:!1},closestNavigableAncestor:function(t){return this.closestAncestor(t,this._navigableFilter,this._unnavigableFilter,this._maxNavDepth)},closestNavigableDescendant:function(t){return this.closestDescendant(t,this._navigableFilter,this._unnavigableFilter,this._maxNavDepth)},_rebuildNavigationFilters:function(){var t="";n.each(this.navtype_nodeNames,function(e,i){n.each(i,function(e,i){t+=i+","})}),t+="[js-navtype]",this._navigableFilter=t,this._unnavigableFilter='[js-stdnav="false"],[js-navtype="none"]'},registerPlugin:function(t,e){this.plugins[t]=e},unregisterPlugin:function(t){this.plugins[t].unload(),delete this.plugins[t]},registerNavtype:function(t,e,i){this.navtypeBehaviors[t.toLowerCase()]=e,this.navtype_nodeNames[t.toLowerCase()]=i,this._rebuildNavigationFilters()},unregisterNavtype:function(t,e){delete this.navtypeBehaviors[t.toLowerCase()],delete this.navtype_nodeNames[t.toLowerCase()],this._rebuildNavigationFilters()},activate:function(){this.nullBehavior={ariaprep:null,ariarefresh:null,click:null,down:null,end:null,enter:null,entered:null,exit:null,fixfocus:null,fixsubfocus:null,fixsuperfocus:null,focusin:null,focusout:null,home:null,hoverin:null,hoverout:null,inherit:null,inheritable:null,left:null,mousedown:null,mouseover:null,mouseout:null,mouseup:null,next:null,pagedown:null,pageup:null,prev:null,rejoined:null,right:null,subfocusin:null,subfocusout:null,superfocusin:null,superfocusout:null,toggle:null,touchend:null,touchstart:null,up:null},this.defaultBehavior={enter:[this,this.basicEnter,null],entered:[this,this.basicEntered,null],exit:[this,this.basicExit,null],fixfocus:[this,this.basicFixFocus,null],fixsubfocus:[this,this.basicFixSubfocus,null],fixsuperfocus:[this,this.basicFixSuperfocus,null],focusin:[this,this.basicFocusIn,{maxdepth:0}],focusout:[this,this.basicFocusOut,null],inherit:!0,inheritable:!0,rejoined:[this,this.basicRejoined,null],subfocusin:[this,this.basicSubfocusIn,null],subfocusout:[this,this.basicSubfocusOut,null],superfocusin:[this,this.basicSuperfocusIn,null],superfocusout:[this,this.basicSuperfocusOut,{ghostfocus:!1}]},this.navtypeBehaviors={block:{},global:{},inline:{},modal:{next:this._onModalNext,inherit:!1,inheritable:!0}},this._refocusing=!1,this._priorSuperfocus=null,this._priorFocus=null,this._priorSubfocus=null,this._currentSuperfocus=document.activeElement,this._currentFocus=document.activeElement,this._currentSubfocus=document.activeElement,n(this._currentSuperfocus).addClass("superfocus"),n(this._currentSubfocus).addClass("subfocus"),this._rebuildNavigationFilters(),this._bindFocusEvents(),this._bindKeyboardEvents(),this._bindMouseEvents(),this._bindTouchEvents()},start:function(){var t=n(".stdnavinitialfocus");t.length<1&&(document.activeElement&&document.activeElement!=n("body")[0]?t=n(document.activeElement):(t=n("body").children("[tabindex='0']:first"),t.length<1&&(t=n("body")))),this.forceFocus(n("body")[0]),n("#IECM").html("&nbsp;"),this._unforceFocus(n("body")[0]),n("body").blur(),n("#IECM").html("&nbsp;&nbsp;"),this.forceFocus(t[t.length-1]),n("body").attr("aria-busy",!1),n("#ariastatus").attr("aria-label","Standard Navigation initialized."),this.updateDebugInfo()},stop:function(){},deactivate:function(){this._unbindTouchEvents(),this._unbindMouseEvents(),this._unbindKeyboardEvents(),this._unbindFocusEvents()},_bindFocusEvents:function(){n("body").on("focusin",n.proxy(this._onFocusIn,this)),n("body").on("focusout",n.proxy(this._onFocusOut,this))},_bindKeyboardEvents:function(){n(document).on("keydown",n.proxy(this._onKeydown,this))},_bindMouseEvents:function(){n("body").on("click",n.proxy(this._onClick,this)),n("body").on("dblclick",n.proxy(this._onDblClick,this)),n("body").on("mousedown",n.proxy(this._onMouseDown,this)),n("body").on("mouseover",n.proxy(this._onMouseOut,this)),n("body").on("mouseout",n.proxy(this._onMouseOver,this)),n("body").on("mouseup",n.proxy(this._onMouseUp,this))},_bindTouchEvents:function(){n("body").on("touchend",n.proxy(this._onTouchStart,this)),n("body").on("touchstart",n.proxy(this._onTouchStart,this))},_unbindTouchEvents:function(){n("body").off("touchend",n.proxy(this._onTouchStart,this)),n("body").off("touchstart",n.proxy(this._onTouchStart,this))},_unbindMouseEvents:function(){n("body").off("click",n.proxy(this._onClick,this)),n("body").off("dblclick",n.proxy(this._onDblClick,this)),n("body").off("mousedown",n.proxy(this._onMouseDown,this)),n("body").off("mouseover",n.proxy(this._onMouseOut,this)),n("body").off("mouseout",n.proxy(this._onMouseOver,this)),n("body").off("mouseup",n.proxy(this._onMouseUp,this))},_unbindKeyboardEvents:function(){n(document).off("keydown",n.proxy(this._onKeydown,this))},_unbindFocusEvents:function(){n("body").off("focusin",n.proxy(this._onFocusIn,this)),
  n("body").off("focusout",n.proxy(this._onFocusOut,this))},_getExplicitBehavior:function(t){var e={};return void 0!==t.attr("js-stdanv-enter")&&(e.enter=t.attr("js-stdnav-enter")),void 0!==t.attr("js-stdanv-exit")&&(e.exit=t.attr("js-stdnav-exit")),void 0!==t.attr("js-stdanv-entered")&&(e.entered=t.attr("js-stdnav-entered")),void 0!==t.attr("js-stdanv-rejoin")&&(e.rejoin=t.attr("js-stdnav-rejoin")),void 0!==t.attr("js-stdanv-up")&&(e.up=t.attr("js-stdnav-up")),void 0!==t.attr("js-stdanv-down")&&(e.down=t.attr("js-stdnav-down")),void 0!==t.attr("js-stdanv-left")&&(e.left=t.attr("js-stdnav-left")),void 0!==t.attr("js-stdanv-right")&&(e.right=t.attr("js-stdnav-right")),void 0!==t.attr("js-stdanv-next")&&(e.next=t.attr("js-stdnav-next")),void 0!==t.attr("js-stdanv-prev")&&(e.prev=t.attr("js-stdnav-prev")),void 0!==t.attr("js-stdanv-inherit")&&(e.inherit=t.attr("js-stdnav-inherit")),void 0!==t.attr("js-stdanv-inheritable")&&(e.inheritable=t.attr("js-stdnav-inheritable")),e},_buildParentBehaviorOBSOLETE:function(t){var e=n(t.parent()[0]);if(void 0===e)return this.defaultBehavior;var i=this._buildImmediateBehavior(e);if(i.inheritable===!1)return this.defaultBehavior;if(i.inherit===!1||e.is("body,iframe"))return n.extend({},!0,this.defaultBehavior,i);var s=this._buildParentBehavior(e);return n.extend({},!0,s,i,{inherit:!1})},_buildBehavior:function(t){for(var e=n.extend(!0,{},this.nullBehavior),i=t,o=0,r=this._buildImmediateBehavior(i);o<this._maxNavDepth&&(n.each(r,function(t,i){t in e?null===e[t]&&(e[t]=i):(s.warn("StdNav: Key '"+t+"' is missing from the NULL-behavior hash"),e[t]=i)}),r.inherit!==!1)&&(o++,i=n(i).parent()[0],r=this._buildImmediateBehavior(i),r.inheritable!==!1););return n.each(this.defaultBehavior,function(t,i){t in e?null===e[t]&&(e[t]=i):(s.warn("StdNav: Key '"+t+"' is defined in defaults but missing from the NULL-behavior hash"),e[t]=i)}),n.extend(!0,{},e)},_buildImmediateBehavior:function(t){if(this.nullOrUndefined(t))return this.defaultBehavior;var e,i=n(t),s=i.prop("nodeName");n.each(this.navtype_nodeNames,function(t,i){n.inArray(s,i)>-1&&(e=t)});var o={};void 0!==e&&(o=this.navtypeBehaviors[e]);var r=i.attr("js-navtype"),a={};void 0!==r&&(a=this.navtypeBehaviors[r.toLowerCase()]);var l=this._getExplicitBehavior(i);return n.extend(!0,{inherit:!0},o,a,l)},_buildBehaviorOBSOLETE:function(t){if(void 0===t||null===t)return this.defaultBehavior;var e=n(t),i=this._buildImmediateBehavior(e),s={};return i.inherit===!0&&(s=this._buildParentBehavior(e)),n.extend(!0,s,i)},isLogicFocusable:function(t){if(this.nullOrUndefined(t))return s.error("isLogicFocusable called on a null or undefined element"),!1;var e=n(t),i=!1,o=e.prop("nodeName");e.attr("tabindex");return(e.is(":input")||n.inArray(o,["A","BUTTON","INPUT","SELECT","OBJECT","TEXTAREA"])>-1)&&e.is(":enabled")&&(i=!0),e.is("[tabindex]")&&(i=!0),i},isUserFocusable:function(t){if(this.nullOrUndefined(t))return s.error("isUserFocusable called on a null or undefined element"),!1;var e=n(t),i=!1,o=e.prop("nodeName"),r=e.attr("tabindex");return(e.is(":input")||n.inArray(o,["A","BUTTON","INPUT","SELECT","OBJECT","TEXTAREA"])>-1)&&e.is(":enabled")&&(i=!0),void 0!==r&&(i="-1"==r?!1:!0),i},suspendFocusability:function(t){if(this.nullOrUndefined(t))return void s.warn("stdnav.suspendFocusability called on null or undefined element");var e=n(t);if(!this.nullOrUndefined(e.attr("js-suspended-tabindex")))return void s.warn("stdnav.suspendFocusability called on already suspended element "+t.nodeType+"#"+t.id);var i=e.attr("tabindex");this.nullOrUndefined(i)?e.attr("js-suspended-tabindex","none"):e.attr("js-suspended-tabindex",i),e.attr("tabindex","-1")},resumeFocusability:function(t){if(this.nullOrUndefined(t))return void s.warn("stdnav.resumeFocusability called on null or undefined element");var e=n(t),i=e.attr("js-suspended-tabindex");return this.nullOrUndefined(i)?void s.warn("stdnav.resumeFocusability called on non-suspended element "+t.nodeName+"#"+t.id):("none"===i?e.removeAttr("tabindex"):e.attr("tabindex",i),void e.removeAttr("js-suspended-tabindex"))},ensureFocusabilityBeyond:function(t){var e=n("[suspended-tabindex]");e.each(function(e){if(!n.contains(e,t)){var i=n(e),s=i.attr("js-suspended-tabindex");i.attr("tabindex",s),i.removeAttr("js-suspended-tabindex")}})},forceFocus:function(t){s.debug("stdnav.forceFocus("+t.nodeName+"#"+t.id+")");var e=n(t),i=0;if(n.each(e.parents("[tabindex]"),function(t,e){var s=n(e);s.attr("tabindex")>i&&(i=s.attr("tabindex")),s.attr("js-suspended-tabindex")>i&&(i=s.attr("js-suspended-tabindex"))}),!e.is(n(document.activeElement))){if((!this.isLogicFocusable(t)||i>e.attr("tabindex"))&&!e.attr("priortabindex")){var o=e.attr("tabindex");void 0!==o?e.data("prior-tabindex",o):e.data("prior-tabindex","none"),e.attr("tabindex",i)}n(t).focus()}},_unforceFocus:function(t){var e=n(t),i=e.data("prior-tabindex");this.nullOrUndefined(i)||("none"==i?e.removeAttr("tabindex"):e.attr("tabindex",i),e.removeData("prior-tabindex"))},_onClick:function(t){var e=n(t.target);if(1==e.length){var i=this._buildBehavior(e);if(null!=i.click){var s=this.runAction("click",t.target);s===!1&&(t.stopPropagation(),t.preventDefault())}}},_onMouseDown:function(t){var e=n(t.target);if(1==e.length){var i=this._buildBehavior(e);if(null!=i.mousedown){var s=this.runAction("mousedown",t.target);s===!1&&(t.stopPropagation(),t.preventDefault())}}},_onMouseUp:function(t){var e=n(t.target);if(1==e.length){var i=this._buildBehavior(e);if(null!=i.mouseup){var s=this.runAction("mouseup",t.target);s===!1&&(t.stopPropagation(),t.preventDefault())}}},_onFocusIn:function(t){this._currentFocus=t.target;var e=null;s.info("stdnav._onFocusIn  ev.target=="+t.target.nodeName+"#"+t.target.id),this.updateDebugInfo();for(var i="",o=0;o<this.chaffLength;o++)i+="&nbsp;";if(n("#IECM").html(i),this.chaffLength=(this.chaffLength+1)%this.maxChaffLength,0===this.chaffLength&&(this.chaffLength=1),n(t.target).length<1)return void(this._refocusing=!1);var r=t.target;if(e=this.runAction("fixfocus",r),null===e&&(e=r),e!==r)this._refocusing=!0,this.forceFocus(e);else if(this._refocusing=!1,r===this._priorFocus);else{if(n(".subfocus").removeClass("subfocus"),this._priorSubfocus&&this.runAction("subfocusout",this._priorSubfocus),this._priorFocus&&(this.runAction("focusout",this._priorFocus),this._unforceFocus(this._priorFocus)),this._currentFocus=r,this._currentSuperfocus=this.runAction("fixsuperfocus",this._currentFocus),null===this._currentSuperfocus&&(this._currentSuperfocus=n("body")[0]),s.debug("stdnav._onFocusIn: fixsuperfocus("+this._currentFocus.nodeName+"#"+this._currentFocus.id+") returned "+this._currentSuperfocus.nodeName+"#"+this._currentSuperfocus.id),this._currentSuperfocus!==this._priorSuperfocus){var a=n(".superfocus");a.length>0?s.debug("Removing .superfocus from "+a[0].nodeName+"#"+a[0].id):s.warn("No current .superfocus to remove"),n(".superfocus").removeClass("superfocus"),this._priorSuperfocus&&(this.runAction("superfocusout",this._priorSuperfocus),this.resumeFocusability(this._priorSuperfocus)),s.debug("Running ARIA refresh for "+this._currentSuperfocus.nodeName+"#"+this._currentSuperfocus.id),this.runAction("ariarefresh",this._currentSuperfocus),s.debug("Adding .superfocus to "+this._currentSuperfocus.nodeName+"#"+this._currentSuperfocus.id),n(this._currentSuperfocus).addClass("superfocus"),n(this._currentSuperfocus).is(this._currentFocus)||this.suspendFocusability(this._currentSuperfocus),this.runAction("superfocusin",this._currentSuperfocus)}this._currentSubfocus=this.runAction("focusin",this._currentFocus),null===this._currentSubfocus&&(this._currentSubfocus=this._currentFocus),n(this._currentSubfocus).addClass("subfocus"),this.runAction("subfocusin",this._currentSubfocus),this.ensureFocusabilityBeyond(this._currentFocus)}this.updateDebugInfo()},_onFocusOut:function(t){this.updateDebugInfo(),this._refocusing===!0||(n(".superfocus").length>0?this._priorSuperfocus=n(".superfocus")[0]:(s.warn("no prior superfocus"),this._priorSuperfocus=n("body")[0]),this._priorFocus=t.target,n(".subfocus").length>0?this._priorSubfocus=n(".subfocus")[0]:(s.warn("no prior subfocus"),this._priorSubfocus=t.target)),this.updateDebugInfo()},_prepSubfocusIn:function(t){0===n(t).parents(":focus").length&&n(t).focus()},setSuperfocus:function(t,e){s.debug("stdnav.setSuperfocus("+t.nodeName+"#"+t.id+", "+e+")"),void 0===e&&(e=!0);var i=n(".subfocus");i.length>0&&(e&&this.runAction("subfocusout",i[0]),i.removeClass("subfocus")),n(t).addClass("subfocus"),e&&(this._prepSubfocusIn(t),this.runAction("subfocusin",t))},setSubfocus:function(t,e){s.debug("stdnav.setSubfocus("+t.nodeName+"#"+t.id+", "+e+")"),void 0===e&&(e=!0);var i=n(".subfocus");i.length>0&&(e&&this.runAction("subfocusout",i[0]),i.removeClass("subfocus")),n(t).addClass("subfocus"),e&&(this._prepSubfocusIn(t),this.runAction("subfocusin",t))},runAction:function(t,e){if(null===e)return void s.warn("tried to run action '"+t+"' on null element");if("undefined"==typeof e)return void s.warn("tried to run action '"+t+"' on undefined element");s.debug("stdnav.runAction("+t+", "+e.nodeName+"#"+e.id+")");var i=this._buildBehavior(e);return this.nullOrUndefined(i[t])?void 0:this._runActionDesc(i[t],e)},_runActionDesc:function(t,e){var i=!0;if("string"==typeof t||t instanceof String){if("#"==t.substr(0,1))if("##parent"==t)this.forceFocus(n(e).parent());else if("##child"==t){var o=n(e).children();o.length>0&&this.forceFocus(n(e).children()[0])}else if("##prev"==t){var r=n(e).prev();r.length>0&&this.forceFocus(n(e).prev()[0])}else if("##next"==t){var a=n(e).next();a.length>0&&this.forceFocus(n(e).next()[0])}else{var l=n(t);void 0!==l&&this.forceFocus(l)}else if("@"==t.substr(0,1)){var u,c,h,d,p,f,m=this;if("@"==t.substr(1,1))m=n(e).data("stdnav-context");else if(d=t.indexOf(":"),d>-1){var g=t.substr(0,d);m=this.actionContexts[g]}p=t.indexOf("("),-1==p?u=t.substr(2):(f=t.indexOf(")"),u=t.substr(2,p-2),-1==f?s.warn("Bad stdnav action: "+t):h=t.substr(p,f-p)),c=m[u],i=c.call(m,h)}}else if(t instanceof Array){void 0===t[1]&&s.warn("undefined actionDesc[1]");var m=t[0];(null===m||"undefined"==typeof m)&&(m=this);var v=t[1],_=t[2];(null===_||"undefined"==typeof _)&&(_={}),i=v.call(m,e,_)}return i},basicClick:function(t,e){var i=this.runAction("fixfocus",t);return this.nullOrUndefined(i)?s.debug("stdnav.basicClick: "+t.nodeName+"#"+t.id+" has no navigable ancestor, ignoring"):(s.debug("stdnav.basicClick("+t.nodeName+"#"+t.id+") refocusing to "+i.nodeName+"#"+i.id),this.nullOrUndefined(i)||this.forceFocus(i)),!0},basicFixFocus:function(t,e){if(this.isNavigable(t)||n(t).is(":input"))return t;var i=this.closestNavigableAncestor(t);return this.nullOrUndefined(i)?null:i},basicFixSuperfocus:function(t,e){var i=null;if(n(t).is(":input,fieldset")){var s=n(t).closest("form");n(t).closest("form"),s.length>0&&(i=s[0])}else i=this.isNavigable(t)?t:this.closestNavigableAncestor(t);return(null===i||"undefined"==typeof i)&&(i=t),i},parentFixSuperfocus:function(t,e){return this.basicFixSuperfocus(t.parentNode,e)},basicFixSubfocus:function(t,e){return t},basicFocusIn:function(t,e){return s.debug("stdnav.basicFocusIn("+t.nodeName+"#"+t.id+")"),t},basicFocusOut:function(t,e){return s.debug("stdnav.basicFocusOut("+t.nodeName+"#"+t.id+")"),null},basicMouseDown:function(t,e){var i=this.runAction("fixfocus",t);return this.nullOrUndefined(i)?s.debug("stdnav.basicClick: "+t.nodeName+"#"+t.id+" has no navigable ancestor, ignoring"):(s.debug("stdnav.basicClick("+t.nodeName+"#"+t.id+") refocusing to "+i.nodeName+"#"+i.id),this.nullOrUndefined(i)||this.forceFocus(i)),!0},basicMouseUp:function(t,e){return!0},basicSuperfocusIn:function(t,e){s.debug("stdnav.basicSuperfocusIn("+t.nodeName+"#"+t.id+")");var i=null;if("focusSelector"in e){var o=":input,fieldset,"+e.focusSelector+'[js-navigable!="false"]',r=null;"barrier"in e&&(r=e.barrier);var a=this._maxNavDepth;"maxdepth"in e&&(a=e.maxdepth),"ghostfocus"in e&&e.ghostfocus===!0&&(i=this.closestDescendant(t,o+" .ghostfocus",r,a),n(i).removeClass("ghostfocus")),null==i&&(i=this.closestDescendant(t,o,r,a))}return null==i&&(i=t),i},basicSuperfocusOut:function(t,e){return s.debug("stdnav.basicSuperfocusOut("+t.nodeName+"#"+t.id+")"),"ghostfocus"in e&&e.ghostfocus===!0&&this._priorFocus&&n(this._priorFocus).addClass("ghostfocus"),null},basicSubfocusIn:function(t,e){return s.debug("stdnav.basicSubfocusIn("+t.nodeName+"#"+t.id+")"),null},basicSubfocusOut:function(t,e){return s.debug("stdnav.basicSubfocusOut("+t.nodeName+"#"+t.id+")"),null},basicEnter:function(t,e){s.debug("stdnav.basicEnter("+t.nodeName+"#"+t.id+")");var i=this.closestNavigableDescendant(t);return void 0!==i&&this.runAction("entered",i),t},basicExit:function(t,e){s.debug("stdnav.basicExit("+t.nodeName+"#"+t.id+")");var i=this.closestNavigableAncestor(n(".superfocus"));return i||(i=n("#mainNavigation")),void 0!==i&&this.runAction("rejoined",i[0]),i[0]},basicEntered:function(t,e){s.debug("stdnav.basicEntered("+t.nodeName+"#"+t.id+")")},basicRejoined:function(t,e){s.debug("stdnav.basicRejoined("+t.nodeName+"#"+t.id+")")},_onKeydown:function(t){t.target;if(0!==n(".subfocus").length){var e=n(".subfocus")[0],i=!1,o=n(e).prop("nodeName");if(!(n(e).is(":input")||n.inArray(o,["INPUT","SELECT","OBJECT","TEXTAREA"])>-1)||"BUTTON"==o||27==t.keyCode){for(var r=n(e).parents(),a=0;a<r.length;a++)if(!this.nullOrUndefined(n(r[a]).attr("js-stdnav"))){i="true"==n(r[a]).attr("js-stdnav")?!0:!1;break}if(!i)return void s.warn("StdNav is disabled in this subdom, aborting action");var l;switch(t.keyCode){case 13:l="enter";break;case 27:l="exit";break;case 32:l="toggle";break;case 33:l="pageup";break;case 34:l="pagedown";break;case 35:l="end";break;case 36:l="home";break;case 37:l="left";break;case 38:l="up";break;case 39:l="right";break;case 40:l="down";break;case 91:l="structleft";break;case 93:l="structright"}if(!this.nullOrUndefined(l)){var u=this.runAction(l,e);this.nullOrUndefined(u)||(t.stopPropagation(),t.preventDefault(),this.forceFocus(u))}}}}});var a=new r;return a});var dialogs={};dialogs.systemConfirm={container:null,message:null,show:function(t,e){window.isEmbeddedDesigner?jQuery(document).trigger("adhocDesigner:notification",[t,e]):(this.container=this.container||jQuery("#systemMessageConsole").on("mouseup touchend",function(){dialogs.systemConfirm.container.slideUp()}),this.message=this.message||document.getElementById("systemMessage"),this.closeText||(this.closeText=this.message.innerHTML.toLowerCase()),this.message.innerHTML=xssUtil.escape(t)+' <span>| <a href="#">'+xssUtil.escape(this.closeText)+"</a></span>",dialogs.systemConfirm.container.slideDown(),setTimeout("dialogs.systemConfirm.hide()",e?e:2e3))},showWarning:function(t,e){t='<span class="warning">'+t+"</span>",this.show(t,e)},hide:function(){dialogs.systemConfirm.container&&dialogs.systemConfirm.container.slideUp()}},dialogs.errorPopup={_dom:null,_content:null,_DOM_ID:"standardAlert",_CONTENT_ID:"errorPopupContents",_PAGE_CONTENT_PATTERN:"#errorPageContent",_DIALOG_WIDTH:"546px",_DIALOG_HEIGHT:"350px",clickHandler:null,show:function(t,e,i){i||(i={});var n=Builder.node("DIV",{style:"display:none"});n.innerHTML=t,document.body.insertBefore(n,document.body.firstChild);var s=$$(this._PAGE_CONTENT_PATTERN)[0],o=s?s.innerHTML:t,r=s&&s.innerHTML;if(n.remove(),o&&(this._dom||(this._dom=$(this._DOM_ID),this._content=$(this._CONTENT_ID),this.clickHandler=this._clickHandler.bindAsEventListener(this)),this._dom)){var a=o;r||(a=Builder.node("P",{"class":"message"}),a.update(xssUtil.escape(o,{softHTMLEscape:!0}))),this._content.update(xssUtil.escape(a,{softHTMLEscape:!0})),this._dom.observe("click",this.clickHandler),this._dom.setStyle({height:i.height||this._DIALOG_HEIGHT,width:i.width||this._DIALOG_WIDTH}),e&&this._dom.addClassName(layoutModule.STACKTRACE_CLASS),dialogs.popup.show(this._dom,e);var l=document.getElementById("completeStackTrace");l&&isIPad()&&new TouchController(l,l.parentNode,{noInit3d:!0})}},_hide:function(){this._dom&&(this._dom.stopObserving("click",this.clickHandler),dialogs.popup.hide(this._dom))},_clickHandler:function(t){var e=t.element();matchAny(e,["button"],!0)&&this._hide()}},dialogs.clusterErrorPopup=_.extend({},dialogs.errorPopup,{show:function(t){var e=this;require(["bundle!jasperserver_messages","bundle!jsexceptions_messages"],function(t,i){var n=i["cluster.exception.session.attribute.missing.popup"];dialogs.errorPopup.show.call(e,n);var s=t["button.home"];jQuery("#"+e._DOM_ID).find("button span.wrap").html(s)})},_hide:function(t){dialogs.errorPopup._hide.apply(this,arguments),window.location="home.html"}}),dialogs.popup={show:function(t,e,i){require(["stdnav","jquery"],function(n,s){if(i=i||{},t=$(t)){"message"in i&&s(t).find(".body").text(i.message.unescapeHTML()),(isIE7()||isIE8())&&(jo=s(t),0==jo.children("div.msshadow").length&&jo.prepend('<div class="msshadow" style="position:absolute;top:-10px;right:10px;bottom:10px;left:-10px;border:0;background:#fff;">&nbsp;</div>')),e&&(pageDimmer.show(),t.match(layoutModule.DIALOG_LOADING_PATTERN)&&pageDimmer.setZindex(t.getStyle("zIndex")-1)),reParent(t,document.body),t.setOpacity(0),t.removeClassName(layoutModule.HIDDEN_CLASS),isIE7()&&!t.match(".sizeable")&&setWidthStyleByReflection(t,".content"),layoutModule.createMover.call(layoutModule,t),layoutModule.createSizer.call(layoutModule,t),i.cascade?cascadeElement(t,{position:i.position,number:i.number,horzOffset:40,vertOffset:40}):centerElement(t,{horz:!0,vert:!0}),dialogs.popup._setMaxZIndex(t),layoutModule.createMover.call(layoutModule,t),isIPad()?t.setOpacity(1)&&t.show():appear(t,.4),s(document.activeElement).addClass("preDialogFocus");var o=t;t&&s(".primary",t).length>0&&(o=s(".primary",t)[0]),(!i||"undefined"==typeof i.focus||i.focus)&&(t.tabIndex=0,o.tabIndex=0,isIE8()?setTimeout(function(){try{o.focus()}catch(t){}},450):o.focus()),!e&&t.observe("click",dialogs.popup.zIndexHandler),n.beginModalFocus(t)}})},hide:function(t){require(["stdnav","jquery"],function(e,i){e.endModalFocus(t);var n=i(".preDialogFocus");n.length>0&&(n[0].focus(),n.removeClass("preDialogFocus")),t&&($elem=$(t),$elem.hasClassName(layoutModule.HIDDEN_CLASS)||($elem.addClassName(layoutModule.HIDDEN_CLASS),pageDimmer.hide(),$elem.match(layoutModule.DIALOG_LOADING_PATTERN)&&pageDimmer.setZindex(layoutModule.DIMMER_Z_INDEX)),$elem.stopObserving("click",dialogs.popup.zIndexHandler))})},zIndexHandler:function(t){var e=Event.element(t),i=matchMeOrUp(e,layoutModule.DIALOG_PATTERN);dialogs.popup._setMaxZIndex(i)},_setMaxZIndex:function(t,e){if(t){var i=e?e.getStyle("zIndex"):0,n=document.body.select(layoutModule.DIALOG_PATTERN),s=function(t){t.visible()&&!t.match(layoutModule.DIALOG_LOADING_PATTERN)&&(i=Math.max(i,t.getStyle("zIndex"),layoutModule.DIMMER_Z_INDEX+1))};1==n.length?s(n[0]):n.each(s),t.setStyle({zIndex:Math.max(i+1,t.getStyle("zIndex"))})}}},dialogs.popupConfirm=_.extend({},dialogs.popup,{show:function(t,e,i){dialogs.popup.show.apply(this,arguments),i=_.extend({okButtonSelector:"button.ok",cancelButtonSelector:"button.cancel"},i);var n=jQuery(t),s=n.find(i.okButtonSelector),o=n.find(i.cancelButtonSelector),r=jQuery.Deferred();return s.on("click",function(){i.validateFunc&&i.validateFunc()===!1||(s.off("click"),o.off("click"),dialogs.popupConfirm.hide(t),r.resolve())}),o.on("click",function(){s.off("click"),o.off("click"),dialogs.popupConfirm.hide(t),r.reject()}),r}}),dialogs.childPopup=_.extend({},dialogs.popup,{cascadePopups:{},show:function(t,e,i,n){i?(n=_.extend({parent:i},n),this.cascadePopups[i.id]||(this.cascadePopups[i.id]=[]),this.cascadePopups[i.id].push(t.id),$(t).setAttribute("data-parentDialog",i.id),dialogs.popup.show.apply(this,[t,e,n]),dialogs.popup._setMaxZIndex(t,i),e&&pageDimmer.setZindex(t.getStyle("zIndex")-1),i.stopObserving("click",dialogs.popup.zIndexHandler)):dialogs.popup.show.apply(this,[t,e,n])},hide:function(t){var e=$(t).getAttribute("data-parentDialog");if(e){this.cascadePopups[e]&&(this.cascadePopups[e]=_.without(this.cascadePopups[e],t.id)),dialogs.popup.hide.apply(this,[t]);var i=$(e);pageDimmer.show(i),dialogs.popup._setMaxZIndex(i)}else dialogs.popup.hide.apply(this,[t])}}),define("components.dialogs",["jquery","prototype","underscore","utils.common","utils.animation","core.layout"],function(t){return function(){var e;return e||t.dialogs}}(this));var about={initialize:function(){about.aboutBox.registerListeners()}};about.aboutBox={show:function(){var t=jQuery("#aboutBox");t.hasClass("hidden")&&dialogs.popup.show(t[0],!0)},_hide:function(){var t=jQuery("#aboutBox");t.hasClass("hidden")||dialogs.popup.hide(t[0])},registerListeners:function(){jQuery(document).delegate("#about","click",function(t){t.preventDefault(),about.aboutBox.show()}),jQuery(document).delegate("#aboutBox button","click",function(t){about.aboutBox._hide(),t.stopPropagation()})}},jQuery(function(){"undefined"==typeof require&&about.initialize()}),define("components.about",["components.dialogs"],function(t){return function(){var e;return e||t.about}}(this)),function(){var t,e=this,i=e.Backbone,n=[],s=(n.push,n.slice);n.splice;t="undefined"!=typeof exports?exports:e.Backbone={},t.VERSION="1.1.0";var o=e._;o||"undefined"==typeof require||(o=require("underscore")),t.$=e.jQuery||e.Zepto||e.ender||e.$,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var r=t.Events={on:function(t,e,i){if(!l(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var n=this._events[t]||(this._events[t]=[]);return n.push({callback:e,context:i,ctx:i||this}),this},once:function(t,e,i){if(!l(this,"once",t,[e,i])||!e)return this;var n=this,s=o.once(function(){n.off(t,s),e.apply(this,arguments)});return s._callback=e,this.on(t,s,i)},off:function(t,e,i){var n,s,r,a,u,c,h,d;if(!this._events||!l(this,"off",t,[e,i]))return this;if(!t&&!e&&!i)return this._events={},this;for(a=t?[t]:o.keys(this._events),u=0,c=a.length;c>u;u++)if(t=a[u],r=this._events[t]){if(this._events[t]=n=[],e||i)for(h=0,d=r.length;d>h;h++)s=r[h],(e&&e!==s.callback&&e!==s.callback._callback||i&&i!==s.context)&&n.push(s);n.length||delete this._events[t]}return this},trigger:function(t){if(!this._events)return this;var e=s.call(arguments,1);if(!l(this,"trigger",t,e))return this;var i=this._events[t],n=this._events.all;return i&&u(i,e),n&&u(n,arguments),this},stopListening:function(t,e,i){var n=this._listeningTo;if(!n)return this;var s=!e&&!i;i||"object"!=typeof e||(i=this),t&&((n={})[t._listenId]=t);for(var r in n)t=n[r],t.off(e,i,this),(s||o.isEmpty(t._events))&&delete this._listeningTo[r];return this}},a=/\s+/,l=function(t,e,i,n){if(!i)return!0;if("object"==typeof i){for(var s in i)t[e].apply(t,[s,i[s]].concat(n));return!1}if(a.test(i)){for(var o=i.split(a),r=0,l=o.length;l>r;r++)t[e].apply(t,[o[r]].concat(n));return!1}return!0},u=function(t,e){var i,n=-1,s=t.length,o=e[0],r=e[1],a=e[2];switch(e.length){case 0:for(;++n<s;)(i=t[n]).callback.call(i.ctx);return;case 1:for(;++n<s;)(i=t[n]).callback.call(i.ctx,o);return;case 2:for(;++n<s;)(i=t[n]).callback.call(i.ctx,o,r);return;case 3:for(;++n<s;)(i=t[n]).callback.call(i.ctx,o,r,a);return;default:for(;++n<s;)(i=t[n]).callback.apply(i.ctx,e)}},c={listenTo:"on",listenToOnce:"once"};o.each(c,function(t,e){r[e]=function(e,i,n){var s=this._listeningTo||(this._listeningTo={}),r=e._listenId||(e._listenId=o.uniqueId("l"));return s[r]=e,n||"object"!=typeof i||(n=this),e[t](i,n,this),this}}),r.bind=r.on,r.unbind=r.off,o.extend(t,r);var h=t.Model=function(t,e){var i=t||{};e||(e={}),this.cid=o.uniqueId("c"),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(i=this.parse(i,e)||{}),i=o.defaults({},i,o.result(this,"defaults")),this.set(i,e),this.changed={},this.initialize.apply(this,arguments)};o.extend(h.prototype,r,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(t){return o.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return o.escape(this.get(t))},has:function(t){return null!=this.get(t)},set:function(t,e,i){var n,s,r,a,l,u,c,h;if(null==t)return this;if("object"==typeof t?(s=t,i=e):(s={})[t]=e,i||(i={}),!this._validate(s,i))return!1;r=i.unset,l=i.silent,a=[],u=this._changing,this._changing=!0,u||(this._previousAttributes=o.clone(this.attributes),this.changed={}),h=this.attributes,c=this._previousAttributes,this.idAttribute in s&&(this.id=s[this.idAttribute]);for(n in s)e=s[n],o.isEqual(h[n],e)||a.push(n),o.isEqual(c[n],e)?delete this.changed[n]:this.changed[n]=e,r?delete h[n]:h[n]=e;if(!l){a.length&&(this._pending=!0);for(var d=0,p=a.length;p>d;d++)this.trigger("change:"+a[d],this,h[a[d]],i)}if(u)return this;if(!l)for(;this._pending;)this._pending=!1,this.trigger("change",this,i);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,o.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var i in this.attributes)e[i]=void 0;return this.set(e,o.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!o.isEmpty(this.changed):o.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?o.clone(this.changed):!1;var e,i=!1,n=this._changing?this._previousAttributes:this.attributes;for(var s in t)o.isEqual(n[s],e=t[s])||((i||(i={}))[s]=e);return i},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return o.clone(this._previousAttributes)},fetch:function(t){t=t?o.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=this,i=t.success;return t.success=function(n){return e.set(e.parse(n,t),t)?(i&&i(e,n,t),void e.trigger("sync",e,n,t)):!1},R(this,t),this.sync("read",this,t)},save:function(t,e,i){var n,s,r,a=this.attributes;if(null==t||"object"==typeof t?(n=t,i=e):(n={})[t]=e,i=o.extend({validate:!0},i),n&&!i.wait){if(!this.set(n,i))return!1}else if(!this._validate(n,i))return!1;n&&i.wait&&(this.attributes=o.extend({},a,n)),void 0===i.parse&&(i.parse=!0);var l=this,u=i.success;return i.success=function(t){l.attributes=a;var e=l.parse(t,i);return i.wait&&(e=o.extend(n||{},e)),o.isObject(e)&&!l.set(e,i)?!1:(u&&u(l,t,i),void l.trigger("sync",l,t,i))},R(this,i),s=this.isNew()?"create":i.patch?"patch":"update","patch"===s&&(i.attrs=n),r=this.sync(s,this,i),n&&i.wait&&(this.attributes=a),r},destroy:function(t){t=t?o.clone(t):{};var e=this,i=t.success,n=function(){e.trigger("destroy",e,e.collection,t)};if(t.success=function(s){(t.wait||e.isNew())&&n(),i&&i(e,s,t),e.isNew()||e.trigger("sync",e,s,t)},this.isNew())return t.success(),!1;R(this,t);var s=this.sync("delete",this,t);return t.wait||n(),s},url:function(){var t=o.result(this,"urlRoot")||o.result(this.collection,"url")||P();return this.isNew()?t:t+("/"===t.charAt(t.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},isValid:function(t){return this._validate({},o.extend(t||{},{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=o.extend({},this.attributes,t);var i=this.validationError=this.validate(t,e)||null;return i?(this.trigger("invalid",this,i,o.extend(e,{validationError:i})),!1):!0}});var d=["keys","values","pairs","invert","pick","omit"];o.each(d,function(t){h.prototype[t]=function(){var e=s.call(arguments);return e.unshift(this.attributes),o[t].apply(o,e)}});var p=t.Collection=function(t,e){e||(e={}),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,o.extend({silent:!0},e))},f={add:!0,remove:!0,merge:!0},m={add:!0,remove:!1};o.extend(p.prototype,r,{model:h,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return t.sync.apply(this,arguments)},add:function(t,e){return this.set(t,o.extend({merge:!1},e,m))},remove:function(t,e){var i=!o.isArray(t);t=i?[t]:o.clone(t),e||(e={});var n,s,r,a;for(n=0,s=t.length;s>n;n++)a=t[n]=this.get(t[n]),a&&(delete this._byId[a.id],delete this._byId[a.cid],r=this.indexOf(a),this.models.splice(r,1),this.length--,e.silent||(e.index=r,a.trigger("remove",a,this,e)),this._removeReference(a));return i?t[0]:t},set:function(t,e){e=o.defaults({},e,f),e.parse&&(t=this.parse(t,e));var i=!o.isArray(t);t=i?t?[t]:[]:o.clone(t);var n,s,r,a,l,u,c,d=e.at,p=this.model,m=this.comparator&&null==d&&e.sort!==!1,g=o.isString(this.comparator)?this.comparator:null,v=[],_=[],b={},y=e.add,w=e.merge,T=e.remove,x=!m&&y&&T?[]:!1;for(n=0,s=t.length;s>n;n++){if(l=t[n],r=l instanceof h?a=l:l[p.prototype.idAttribute],u=this.get(r))T&&(b[u.cid]=!0),w&&(l=l===a?a.attributes:l,e.parse&&(l=u.parse(l,e)),u.set(l,e),m&&!c&&u.hasChanged(g)&&(c=!0)),t[n]=u;else if(y){if(a=t[n]=this._prepareModel(l,e),!a)continue;v.push(a),a.on("all",this._onModelEvent,this),this._byId[a.cid]=a,null!=a.id&&(this._byId[a.id]=a)}x&&x.push(u||a)}if(T){for(n=0,s=this.length;s>n;++n)b[(a=this.models[n]).cid]||_.push(a);_.length&&this.remove(_,e)}if(v.length||x&&x.length)if(m&&(c=!0),this.length+=v.length,null!=d)for(n=0,s=v.length;s>n;n++)this.models.splice(d+n,0,v[n]);else{x&&(this.models.length=0);var S=x||v;for(n=0,s=S.length;s>n;n++)this.models.push(S[n])}if(c&&this.sort({silent:!0}),!e.silent){for(n=0,s=v.length;s>n;n++)(a=v[n]).trigger("add",a,this,e);(c||x&&x.length)&&this.trigger("sort",this,e)}return i?t[0]:t},reset:function(t,e){e||(e={});for(var i=0,n=this.models.length;n>i;i++)this._removeReference(this.models[i]);return e.previousModels=this.models,this._reset(),t=this.add(t,o.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,o.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t),e},unshift:function(t,e){return this.add(t,o.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t),e},slice:function(){return s.apply(this.models,arguments)},get:function(t){return null==t?void 0:this._byId[t.id]||this._byId[t.cid]||this._byId[t]},at:function(t){return this.models[t]},where:function(t,e){return o.isEmpty(t)?e?void 0:[]:this[e?"find":"filter"](function(e){for(var i in t)if(t[i]!==e.get(i))return!1;return!0})},findWhere:function(t){return this.where(t,!0)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return t||(t={}),o.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(o.bind(this.comparator,this)),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return o.invoke(this.models,"get",t)},fetch:function(t){t=t?o.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=t.success,i=this;return t.success=function(n){var s=t.reset?"reset":"set";i[s](n,t),e&&e(i,n,t),i.trigger("sync",i,n,t)},R(this,t),this.sync("read",this,t)},create:function(t,e){if(e=e?o.clone(e):{},!(t=this._prepareModel(t,e)))return!1;e.wait||this.add(t,e);var i=this,n=e.success;return e.success=function(t,e,s){s.wait&&i.add(t,s),n&&n(t,e,s)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(t instanceof h)return t.collection||(t.collection=this),t;e=e?o.clone(e):{},e.collection=this;var i=new this.model(t,e);return i.validationError?(this.trigger("invalid",this,i.validationError,e),!1):i},_removeReference:function(t){this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,n){("add"!==t&&"remove"!==t||i===this)&&("destroy"===t&&this.remove(e,n),e&&t==="change:"+e.idAttribute&&(delete this._byId[e.previous(e.idAttribute)],null!=e.id&&(this._byId[e.id]=e)),this.trigger.apply(this,arguments))}});var g=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain"];
  o.each(g,function(t){p.prototype[t]=function(){var e=s.call(arguments);return e.unshift(this.models),o[t].apply(o,e)}});var v=["groupBy","countBy","sortBy"];o.each(v,function(t){p.prototype[t]=function(e,i){var n=o.isFunction(e)?e:function(t){return t.get(e)};return o[t](this.models,n,i)}});var _=t.View=function(t){this.cid=o.uniqueId("view"),t||(t={}),o.extend(this,o.pick(t,y)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},b=/^(\S+)\s*(.*)$/,y=["model","collection","el","id","attributes","className","tagName","events"];o.extend(_.prototype,r,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(e,i){return this.$el&&this.undelegateEvents(),this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0],i!==!1&&this.delegateEvents(),this},delegateEvents:function(t){if(!t&&!(t=o.result(this,"events")))return this;this.undelegateEvents();for(var e in t){var i=t[e];if(o.isFunction(i)||(i=this[t[e]]),i){var n=e.match(b),s=n[1],r=n[2];i=o.bind(i,this),s+=".delegateEvents"+this.cid,""===r?this.$el.on(s,i):this.$el.on(s,r,i)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_ensureElement:function(){if(this.el)this.setElement(o.result(this,"el"),!1);else{var e=o.extend({},o.result(this,"attributes"));this.id&&(e.id=o.result(this,"id")),this.className&&(e["class"]=o.result(this,"className"));var i=t.$("<"+o.result(this,"tagName")+">").attr(e);this.setElement(i,!1)}}}),t.sync=function(e,i,n){var s=T[e];o.defaults(n||(n={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var r={type:s,dataType:"json"};if(n.url||(r.url=o.result(i,"url")||P()),null!=n.data||!i||"create"!==e&&"update"!==e&&"patch"!==e||(r.contentType="application/json",r.data=JSON.stringify(n.attrs||i.toJSON(n))),n.emulateJSON&&(r.contentType="application/x-www-form-urlencoded",r.data=r.data?{model:r.data}:{}),n.emulateHTTP&&("PUT"===s||"DELETE"===s||"PATCH"===s)){r.type="POST",n.emulateJSON&&(r.data._method=s);var a=n.beforeSend;n.beforeSend=function(t){return t.setRequestHeader("X-HTTP-Method-Override",s),a?a.apply(this,arguments):void 0}}"GET"===r.type||n.emulateJSON||(r.processData=!1),"PATCH"===r.type&&w&&(r.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var l=n.xhr=t.ajax(o.extend(r,n));return i.trigger("request",i,l,n),l};var w=!("undefined"==typeof window||!window.ActiveXObject||window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent),T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var x=t.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},S=/\((.*?)\)/g,E=/(\(\?)?:\w+/g,M=/\*\w+/g,I=/[\-{}\[\]+?.,\\\^$|#\s]/g;o.extend(x.prototype,r,{initialize:function(){},route:function(e,i,n){o.isRegExp(e)||(e=this._routeToRegExp(e)),o.isFunction(i)&&(n=i,i=""),n||(n=this[i]);var s=this;return t.history.route(e,function(o){var r=s._extractParameters(e,o);n&&n.apply(s,r),s.trigger.apply(s,["route:"+i].concat(r)),s.trigger("route",i,r),t.history.trigger("route",s,i,r)}),this},navigate:function(e,i){return t.history.navigate(e,i),this},_bindRoutes:function(){if(this.routes){this.routes=o.result(this,"routes");for(var t,e=o.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(I,"\\$&").replace(S,"(?:$1)?").replace(E,function(t,e){return e?t:"([^/]+)"}).replace(M,"(.*?)"),new RegExp("^"+t+"$")},_extractParameters:function(t,e){var i=t.exec(e).slice(1);return o.map(i,function(t){return t?decodeURIComponent(t):null})}});var C=t.History=function(){this.handlers=[],o.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},D=/^[#\/]|\s+$/g,k=/^\/+|\/+$/g,O=/msie [\w.]+/,A=/\/$/,N=/[?#].*$/;C.started=!1,o.extend(C.prototype,r,{interval:50,getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(null==t)if(this._hasPushState||!this._wantsHashChange||e){t=this.location.pathname;var i=this.root.replace(A,"");t.indexOf(i)||(t=t.slice(i.length))}else t=this.getHash();return t.replace(D,"")},start:function(e){if(C.started)throw new Error("Backbone.history has already been started");C.started=!0,this.options=o.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var i=this.getFragment(),n=document.documentMode,s=O.exec(navigator.userAgent.toLowerCase())&&(!n||7>=n);this.root=("/"+this.root+"/").replace(k,"/"),s&&this._wantsHashChange&&(this.iframe=t.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(i)),this._hasPushState?t.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!s?t.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=i;var r=this.location,a=r.pathname.replace(/[^\/]$/,"$&/")===this.root;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!a)return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+"#"+this.fragment),!0;this._hasPushState&&a&&r.hash&&(this.fragment=this.getHash().replace(D,""),this.history.replaceState({},document.title,this.root+this.fragment+r.search))}return this.options.silent?void 0:this.loadUrl()},stop:function(){t.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),C.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getFragment(this.getHash(this.iframe))),e===this.fragment?!1:(this.iframe&&this.navigate(e),void this.loadUrl())},loadUrl:function(t){return t=this.fragment=this.getFragment(t),o.any(this.handlers,function(e){return e.route.test(t)?(e.callback(t),!0):void 0})},navigate:function(t,e){if(!C.started)return!1;e&&e!==!0||(e={trigger:!!e});var i=this.root+(t=this.getFragment(t||""));if(t=t.replace(N,""),this.fragment!==t){if(this.fragment=t,""===t&&"/"!==i&&(i=i.slice(0,-1)),this._hasPushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getFragment(this.getHash(this.iframe))&&(e.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,t,e.replace))}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){if(i){var n=t.href.replace(/(javascript:|#).*$/,"");t.replace(n+"#"+e)}else t.hash="#"+e}}),t.history=new C;var L=function(t,e){var i,n=this;i=t&&o.has(t,"constructor")?t.constructor:function(){return n.apply(this,arguments)},o.extend(i,n,e);var s=function(){this.constructor=i};return s.prototype=n.prototype,i.prototype=new s,t&&o.extend(i.prototype,t),i.__super__=n.prototype,i};h.extend=p.extend=x.extend=_.extend=C.extend=L;var P=function(){throw new Error('A "url" property or function must be specified')},R=function(t,e){var i=e.error;e.error=function(n){i&&i(t,n,e),t.trigger("error",t,n,e)}}}.call(this),define("backbone.original",["underscore","json3","jquery"],function(t){return function(){var e;return e||t.Backbone}}(this)),define("backbone",["require","backbone.original","request"],function(t){"use strict";var e=t("backbone.original"),i=t("request");return e.ajax=i,e});var Mustache=function(){function t(t){return String(t).replace(/&(?!\w+;)|[<>"']/g,function(t){return r[t]||t})}var e=Object.prototype.toString;Array.isArray=Array.isArray||function(t){return"[object Array]"==e.call(t)};var i,n=String.prototype.trim;if(n)i=function(t){return null==t?"":n.call(t)};else{var s,o;/\S/.test(" ")?(s=/^[\s\xA0]+/,o=/[\s\xA0]+$/):(s=/^\s+/,o=/\s+$/),i=function(t){return null==t?"":t.toString().replace(s,"").replace(o,"")}}var r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},a={},l=function(){};return l.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":!0},context:{},render:function(t,e,i,n){if(n||(this.context=e,this.buffer=[]),!this.includes("",t))return n?t:void this.send(t);t=this.render_pragmas(t);var s=this.render_section(t,e,i);return s===!1&&(s=this.render_tags(t,e,i,n)),n?s:void this.sendLines(s)},send:function(t){""!==t&&this.buffer.push(t)},sendLines:function(t){if(t)for(var e=t.split("\n"),i=0;i<e.length;i++)this.send(e[i])},render_pragmas:function(t){if(!this.includes("%",t))return t;var e=this,i=this.getCachedRegex("render_pragmas",function(t,e){return new RegExp(t+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+e,"g")});return t.replace(i,function(t,i,n){if(!e.pragmas_implemented[i])throw{message:"This implementation of mustache doesn't understand the '"+i+"' pragma"};if(e.pragmas[i]={},n){var s=n.split("=");e.pragmas[i][s[0]]=s[1]}return""})},render_partial:function(t,e,n){if(t=i(t),!n||void 0===n[t])throw{message:"unknown_partial '"+t+"'"};return e&&"object"==typeof e[t]?this.render(n[t],e[t],n,!0):this.render(n[t],e,n,!0)},render_section:function(t,e,i){if(!this.includes("#",t)&&!this.includes("^",t))return!1;var n=this,s=this.getCachedRegex("render_section",function(t,e){return new RegExp("^([\\s\\S]*?)"+t+"(\\^|\\#)\\s*(.+)\\s*"+e+"\n*([\\s\\S]*?)"+t+"\\/\\s*\\3\\s*"+e+"\\s*([\\s\\S]*)$","g")});return t.replace(s,function(t,s,o,r,a,l){var u,c=s?n.render_tags(s,e,i,!0):"",h=l?n.render(l,e,i,!0):"",d=n.find(r,e);return"^"===o?u=!d||Array.isArray(d)&&0===d.length?n.render(a,e,i,!0):"":"#"===o&&(u=Array.isArray(d)?n.map(d,function(t){return n.render(a,n.create_context(t),i,!0)}).join(""):n.is_object(d)?n.render(a,n.create_context(d),i,!0):"function"==typeof d?d.call(e,a,function(t){return n.render(t,e,i,!0)}):d?n.render(a,e,i,!0):""),c+u+h})},render_tags:function(e,i,n,s){for(var o=this,r=function(){return o.getCachedRegex("render_tags",function(t,e){return new RegExp(t+"(=|!|>|&|\\{|%)?([^#\\^]+?)\\1?"+e+"+","g")})},a=r(),l=function(e,s,l){switch(s){case"!":return"";case"=":return o.set_delimiters(l),a=r(),"";case">":return o.render_partial(l,i,n);case"{":case"&":return o.find(l,i);default:return t(o.find(l,i))}},u=e.split("\n"),c=0;c<u.length;c++)u[c]=u[c].replace(a,l,this),s||this.send(u[c]);return s?u.join("\n"):void 0},set_delimiters:function(t){var e=t.split(" ");this.otag=this.escape_regex(e[0]),this.ctag=this.escape_regex(e[1])},escape_regex:function(t){if(!arguments.callee.sRE){var e=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+e.join("|\\")+")","g")}return t.replace(arguments.callee.sRE,"\\$1")},find:function(t,e){function n(t){return t===!1||0===t||t}t=i(t);var s;if(t.match(/([a-z_]+)\./gi)){var o=this.walk_context(t,e);n(o)&&(s=o)}else n(e[t])?s=e[t]:n(this.context[t])&&(s=this.context[t]);return"function"==typeof s?s.apply(e):void 0!==s?s:""},walk_context:function(t,e){for(var i=t.split("."),n=void 0!=e[i[0]]?e:this.context,s=n[i.shift()];void 0!=s&&i.length>0;)n=s,s=s[i.shift()];return"function"==typeof s?s.apply(n):s},includes:function(t,e){return-1!=e.indexOf(this.otag+t)},create_context:function(t){if(this.is_object(t))return t;var e=".";this.pragmas["IMPLICIT-ITERATOR"]&&(e=this.pragmas["IMPLICIT-ITERATOR"].iterator);var i={};return i[e]=t,i},is_object:function(t){return t&&"object"==typeof t},map:function(t,e){if("function"==typeof t.map)return t.map(e);for(var i=[],n=t.length,s=0;n>s;s++)i.push(e(t[s]));return i},getCachedRegex:function(t,e){var i=a[this.otag];i||(i=a[this.otag]={});var n=i[this.ctag];n||(n=i[this.ctag]={});var s=n[t];return s||(s=n[t]=e(this.otag,this.ctag)),s}},{name:"mustache.js",version:"0.4.0",to_html:function(t,e,i,n){var s=new l;return n&&(s.send=n),s.render(t,e||{},i),n?void 0:s.buffer.join("\n")}}}();define("mustache",function(t){return function(){var e,i;return i=function(){return Mustache},e=i.apply(t,arguments)}}(this)),jaspersoft.components.templateEngine=function(t,e,i){return{render:function(t,n,s){if(!s)return i.to_html(t,n);if(s==this.STD_PLACEHOLDERS){var o=String(t);return e.each(n,function(t,e){var i=new RegExp("\\{"+e+"\\}");o=o.replace(i,t)}),o}},renderUrl:function(t,e,n){var s=i.to_html(t,e);return n&&(s=encodeURI(s)),s},getTemplateText:function(e){var i=t("#"+e);return i.html()},createTemplate:function(e){var n=t("#"+e),s=n.html();return s&&s.length>0?function(t){return i.to_html(s,t)}:void 0},createTemplateFromText:function(t){return t&&t.length>0?function(e){return i.to_html(t,e)}:void 0},createTemplateSection:function(t,e){var n="\\{\\{#val\\}\\}(\\s|\\S)*\\{\\{/val\\}\\}",s=n.replace(/val/g,t),o=new RegExp(s,"g"),r=this.getTemplateText(e),a=r.match(o)[0];return function(t){return i.to_html(a,t)}},STD_PLACEHOLDERS:"std_placeholder"}}(jQuery,_,Mustache),define("components.templateengine",["namespace","jquery","underscore","mustache"],function(t){return function(){var e;return e||t.jaspersoft.components.templateEngine}}(this)),define("serverSettingsCommon/enum/serverSettingGroupsEnum",{CUSTOM:"custom",LOG4J:"log4j",MONDRIAN:"mondrian",AWS:"aws",JDBC:"jdbc",ADHOC:"adhoc",JI:"ji",CUSTOM_SERVER_SETTINGS:"customServerSettings"}),define("attributes/enum/levelIdEnum",[],function(){return["tenantId","id","userName"]}),define("attributes/collection/AttributesCollection",["require","underscore","jquery","json3","backbone","request","components.templateengine","serverSettingsCommon/enum/serverSettingGroupsEnum","attributes/enum/levelIdEnum"],function(t){var e=t("underscore"),i=t("jquery"),n=t("json3"),s=t("backbone"),o=t("request"),r=t("components.templateengine"),a=t("serverSettingsCommon/enum/serverSettingGroupsEnum"),l=t("attributes/enum/levelIdEnum"),u={TENANT:"tenant:/",USER:"user:/"},c=s.Collection.extend({initialize:function(t,e){e=e||{};var i="rest_v2/attributes?_embedded=permission",n=i+"&group="+a.CUSTOM,s=e.context||{};this.urlGETTemplate=s.urlGETTemplate||n,this.urlPUTTemplate=s.urlPUTTemplate||i},parse:function(t){return t&&t.attribute?t.attribute:[]},setContext:function(t){t=t||{urlGETTemplate:this.urlGETTemplate,urlPUTTemplate:this.urlPUTTemplate};var n=new i.Deferred;return e.isEqual(this.context,t)?n.resolve():(this.context=t,this.fetch({reset:!0,headers:{Accept:"application/attributes.collection.hal+json"}}).done(n.resolve)),n},getContext:function(){return this.context},url:function(t){var i=e.extend({},this.context),n="PUT"===t?this.urlPUTTemplate:this.urlGETTemplate;return e.each(l,function(t){i[t]&&(i[t]=this.escapeLevelId(i[t]))},this),r.renderUrl(n,i,!1)},escapeLevelId:function(t){return encodeURIComponent(t).replace(/'/g,"%27")},save:function(t,e){var i="PUT",s=this._modelsToJSON(e,!0),r="application/hal+json";return o({url:this.url(i)+this._concatNames(t),type:"PUT",contentType:r,headers:{Accept:r},data:n.stringify({attribute:s})})},validateSearch:function(t,i,n,s){var o="&recursive=true",r=s&&this._concatGroups();return this.search(t,i,o,n,r).done(e.bind(this._successSearchCallback,this,t,i))},filterInheritedAttributes:function(t){var i=t&&t.attribute;return t?e.filter(i,function(t){return t.inherited&&!this.findWhere({name:t.name,inherited:!0})},this):null},search:function(t,e,i,n,s){i=i||"",s=s||"";var r="application/attributes.collection.hal+json";return o({url:this.url()+this._concatNames(t,n)+i+s,type:"GET",dataType:"json",contentType:r,headers:{Accept:r}})},getHolder:function(){return this.context.id?u.TENANT+this.context.id:this.context.tenantId?u.USER+this.context.tenantId+"/"+this.context.userName:u.TENANT},addItemsToCollection:function(t){!e.isArray(t)&&(t=[t]),e.each(t,function(t){this.addNew(t)},this)},addNew:function(t){t=t||{};var e=new this.model(t);return this.add(e),e},_modelsToJSON:function(t,i){return e.map(t,function(t){return t.toJSON({omitValue:i})})},_successSearchCallback:function(t,i,n){t=e.isArray(t)?t:[t],i=this._modelsToJSON(i);var s,o,r=this.getHolder();e.each(t,function(t){o=r?r:t.holder,t.holder=o,n&&n.attribute.length&&(t.attr=n.attribute),i&&e.where(i,{name:t.get("name"),inherited:!1}).length>1&&(s={holder:o},t.attr?t.attr.push(s):t.attr=[s])},this)},_concatGroups:function(){var t="";return e.each(e.omit(a,"CUSTOM"),function(e){t+="&group="+e}),t},_concatNames:function(t,i){t=e.isArray(t)?t:[t];var n,s="",o=this,r=function(t){return"&name="+o.escapeLevelId(t)};return e.each(t,function(t){n=t.get("id"),!i&&t.isRenamed()&&n&&(s+=r(n)),s+=r(t.get("name"))},this),s}});return c}),function(t){"object"==typeof exports?module.exports=t(require("backbone"),require("underscore")):"function"==typeof define&&define.amd&&define("backbone.validation.original",["backbone","underscore"],t)}(function(t,e){return t.Validation=function(e){"use strict";var i={forceUpdate:!1,selector:"name",labelFormatter:"sentenceCase",valid:Function.prototype,invalid:Function.prototype},n={formatLabel:function(t,e){return u[i.labelFormatter](t,e)},format:function(){var t=Array.prototype.slice.call(arguments),e=t.shift();return e.replace(/\{(\d+)\}/g,function(e,i){return"undefined"!=typeof t[i]?t[i]:e})}},s=function(i,n,o){return n=n||{},o=o||"",e.each(i,function(e,r){i.hasOwnProperty(r)&&(e&&"object"==typeof e&&!(e instanceof Array||e instanceof Date||e instanceof RegExp||e instanceof t.Model||e instanceof t.Collection)?s(e,n,o+r+"."):n[o+r]=e)}),n},o=function(){var t=function(t){return e.reduce(e.keys(e.result(t,"validation")||{}),function(t,e){return t[e]=void 0,t},{})},o=function(t,i){var n=t.validation?e.result(t,"validation")[i]||{}:{};return(e.isFunction(n)||e.isString(n))&&(n={fn:n}),e.isArray(n)||(n=[n]),e.reduce(n,function(t,i){return e.each(e.without(e.keys(i),"msg"),function(e){t.push({fn:c[e],val:i[e],msg:i.msg})}),t},[])},a=function(t,i,s,r){return e.reduce(o(t,i),function(o,a){var l=e.extend({},n,c),u=a.fn.call(l,s,i,a.val,t,r);return u===!1||o===!1?!1:u&&!o?e.result(a,"msg")||u:o},"")},l=function(t,i){var n,o={},r=!0,l=e.clone(i),u=s(i);return e.each(u,function(e,i){n=a(t,i,e,l),n&&(o[i]=n,r=!1)}),{invalidAttrs:o,isValid:r}},u=function(i,n){return{preValidate:function(t,i){var n,s=this,o={};return e.isObject(t)?(e.each(t,function(t,e){n=s.preValidate(e,t),n&&(o[e]=n)}),e.isEmpty(o)?void 0:o):a(this,t,i,e.extend({},this.attributes))},isValid:function(t){var i=s(this.attributes);return e.isString(t)?!a(this,t,i[t],e.extend({},this.attributes)):e.isArray(t)?e.reduce(t,function(t,n){return t&&!a(this,n,i[n],e.extend({},this.attributes))},!0,this):(t===!0&&this.validate(),this.validation?this._isValid:!0)},validate:function(o,r){var a=this,u=!o,c=e.extend({},n,r),h=t(a),d=e.extend({},h,a.attributes,o),p=s(o||d),f=l(a,d);return a._isValid=f.isValid,e.each(h,function(t,e){var n=f.invalidAttrs.hasOwnProperty(e);n||c.valid(i,e,c.selector)}),e.each(h,function(t,e){var n=f.invalidAttrs.hasOwnProperty(e),s=p.hasOwnProperty(e);n&&(s||u)&&c.invalid(i,e,f.invalidAttrs[e],c.selector)}),e.defer(function(){a.trigger("validated",a._isValid,a,f.invalidAttrs),a.trigger("validated:"+(a._isValid?"valid":"invalid"),a,f.invalidAttrs)}),!c.forceUpdate&&e.intersection(e.keys(f.invalidAttrs),e.keys(p)).length>0?f.invalidAttrs:void 0}}},h=function(t,i,n){e.extend(i,u(t,n))},d=function(t){delete t.validate,delete t.preValidate,delete t.isValid},p=function(t){h(this.view,t,this.options)},f=function(t){d(t)};return{version:"0.9.1",configure:function(t){e.extend(i,t)},bind:function(t,n){n=e.extend({},i,r,n);var s=n.model||t.model,o=n.collection||t.collection;if("undefined"==typeof s&&"undefined"==typeof o)throw"Before you execute the binding your view must have a model or a collection.\nSee http://thedersen.com/projects/backbone-validation/#using-form-model-validation for more information.";s?h(t,s,n):o&&(o.each(function(e){h(t,e,n)}),o.bind("add",p,{view:t,options:n}),o.bind("remove",f))},unbind:function(t,i){i=e.extend({},i);var n=i.model||t.model,s=i.collection||t.collection;n?d(n):s&&(s.each(function(t){d(t)}),s.unbind("add",p),s.unbind("remove",f))},mixin:u(null,i)}}(),r=o.callbacks={valid:function(t,e,i){t.$("["+i+'~="'+e+'"]').removeClass("invalid").removeAttr("data-error")},invalid:function(t,e,i,n){t.$("["+n+'~="'+e+'"]').addClass("invalid").attr("data-error",i)}},a=o.patterns={digits:/^\d+$/,number:/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/,email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,url:/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i},l=o.messages={required:"{0} is required",acceptance:"{0} must be accepted",min:"{0} must be greater than or equal to {1}",max:"{0} must be less than or equal to {1}",range:"{0} must be between {1} and {2}",length:"{0} must be {1} characters",minLength:"{0} must be at least {1} characters",maxLength:"{0} must be at most {1} characters",rangeLength:"{0} must be between {1} and {2} characters",oneOf:"{0} must be one of: {1}",equalTo:"{0} must be the same as {1}",digits:"{0} must only contain digits",number:"{0} must be a number",email:"{0} must be a valid email",url:"{0} must be a valid url",inlinePattern:"{0} is invalid"},u=o.labelFormatters={none:function(t){return t},sentenceCase:function(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(t,e){return 0===e?t.toUpperCase():" "+t.toLowerCase()}).replace(/_/g," ")},label:function(t,e){return e.labels&&e.labels[t]||u.sentenceCase(t,e)}},c=o.validators=function(){var t=String.prototype.trim?function(t){return null===t?"":String.prototype.trim.call(t)}:function(t){var e=/^\s+/,i=/\s+$/;return null===t?"":t.toString().replace(e,"").replace(i,"")},i=function(t){return e.isNumber(t)||e.isString(t)&&t.match(a.number)},n=function(i){return!(e.isNull(i)||e.isUndefined(i)||e.isString(i)&&""===t(i)||e.isArray(i)&&e.isEmpty(i))};return{fn:function(t,i,n,s,o){return e.isString(n)&&(n=s[n]),n.call(s,t,i,o)},required:function(t,i,s,o,r){var a=e.isFunction(s)?s.call(o,t,i,r):s;return a||n(t)?a&&!n(t)?this.format(l.required,this.formatLabel(i,o)):void 0:!1},acceptance:function(t,i,n,s){return"true"===t||e.isBoolean(t)&&t!==!1?void 0:this.format(l.acceptance,this.formatLabel(i,s))},min:function(t,e,n,s){return!i(t)||n>t?this.format(l.min,this.formatLabel(e,s),n):void 0},max:function(t,e,n,s){return!i(t)||t>n?this.format(l.max,this.formatLabel(e,s),n):void 0},range:function(t,e,n,s){return!i(t)||t<n[0]||t>n[1]?this.format(l.range,this.formatLabel(e,s),n[0],n[1]):void 0},length:function(t,i,n,s){return e.isString(t)&&t.length===n?void 0:this.format(l.length,this.formatLabel(i,s),n)},minLength:function(t,i,n,s){return!e.isString(t)||t.length<n?this.format(l.minLength,this.formatLabel(i,s),n):void 0},maxLength:function(t,i,n,s){return!e.isString(t)||t.length>n?this.format(l.maxLength,this.formatLabel(i,s),n):void 0},rangeLength:function(t,i,n,s){return!e.isString(t)||t.length<n[0]||t.length>n[1]?this.format(l.rangeLength,this.formatLabel(i,s),n[0],n[1]):void 0},oneOf:function(t,i,n,s){return e.include(n,t)?void 0:this.format(l.oneOf,this.formatLabel(i,s),n.join(", "))},equalTo:function(t,e,i,n,s){return t!==s[i]?this.format(l.equalTo,this.formatLabel(e,n),this.formatLabel(i,n)):void 0},pattern:function(t,e,i,s){return n(t)&&t.toString().match(a[i]||i)?void 0:this.format(l[i]||l.inlinePattern,this.formatLabel(e,s),i)}}}();return e.each(c,function(t,i){c[i]=e.bind(c[i],e.extend({},n,c))}),o}(e),t.Validation}),define("common/util/parse/NumberUtils",["require","underscore"],function(t){"use strict";var e=t("underscore"),i=function(t){function e(t){return"."===t?t="\\.":" "===t&&(t="\\s"),t}this.DECIMAL_SEPARATOR=t?t.decimalSeparator||".":".",this.GROUPING_SEPARATOR=t?t.groupingSeparator||",":",",this.decimalSeparator=e(this.DECIMAL_SEPARATOR),this.groupingSeparator=e(this.GROUPING_SEPARATOR),this.DECIMAL_NUMBER_PATTERN=new RegExp("^-?([1-9]{1}[0-9]{0,2}("+this.groupingSeparator+"[0-9]{3})*("+this.decimalSeparator+"[0-9]+)?|[1-9]{1}[0-9]{0,}("+this.decimalSeparator+"[0-9]+)?|0("+this.decimalSeparator+"[0-9]+)?)$"),this.INTEGER_NUMBER_PATTERN=new RegExp("^-?([1-9]{1}[0-9]{0,2}("+this.groupingSeparator+"[0-9]{3})*|[1-9]{1}[0-9]{0,}|0)$")},n=-2147483648,s=2147483647,o=9007199254740992,r=-9007199254740992;return i.prototype.number_format=function(t,e,i,n){t=(t+"").replace(/[^0-9+\-Ee.]/g,"");var s=isFinite(+t)?+t:0,o=isFinite(+e)?Math.abs(e):0,r="undefined"==typeof n?",":n,a="undefined"==typeof i?".":i,l="",u=function(t,e){var i=Math.pow(10,e);return""+(Math.round(t*i)/i).toFixed(e)};return l=(o?u(s,o):""+Math.round(s)).split("."),l[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,r)),(l[1]||"").length<o&&(l[1]=l[1]||"",l[1]+=new Array(o-l[1].length+1).join("0")),l.join(a)},i.prototype.isInt=function(t){return this.isNumberInt(t)||this.isStringInt(t)},i.prototype.isNumberInt=function(t){return e.isNumber(t)&&!isNaN(t)&&t!==Number.POSITIVE_INFINITY&&t!==Number.NEGATIVE_INFINITY&&(t===+t&&t===(0|t)||t%1===0)},i.prototype.isStringInt=function(t){return e.isString(t)&&this.INTEGER_NUMBER_PATTERN.test(t)},i.prototype.isInt32=function(t){return this.isInt(t)&&this.parseNumber(t)>=n&&this.parseNumber(t)<=s},i.prototype.isDecimal=function(t){return e.isNumber(t)&&!isNaN(t)&&t!==Number.POSITIVE_INFINITY&&t!==Number.NEGATIVE_INFINITY||e.isString(t)&&this.DECIMAL_NUMBER_PATTERN.test(t)},i.prototype.parseNumber=function(t){if(e.isNumber(t))return t;if(e.isString(t)&&this.DECIMAL_NUMBER_PATTERN.test(t)){t=t.replace(new RegExp(this.groupingSeparator,"g"),"").replace(new RegExp(this.decimalSeparator,"g"),".");var i=1*t;return i>o||r>i?(window.console&&window.console.warn(t+" is out of the ["+r+", "+o+"] bounds. Parsing results may be corrupted. Use string representation instead. For more details see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number."),!1):i}return void 0},i.prototype.formatNumber=function(t){var e=t.toString().split(".")[1];try{return this.number_format(t,e?e.length:0,this.DECIMAL_SEPARATOR,this.GROUPING_SEPARATOR)}catch(i){return t.toString()}},i}),define("backbone.validation",["require","backbone.validation.original","underscore","common/util/parse/NumberUtils"],function(t){"use strict";var e=t("backbone.validation.original"),i=t("underscore"),n=t("common/util/parse/NumberUtils"),s=new n,o=e.mixin.validate;return e.mixin.validate=function(t,e){e||(e={});var n=this;return o.call(this,t,i.extend({valid:function(t,e){n.trigger("validate:"+e,n,e)},invalid:function(t,e,i){n.trigger("validate:"+e,n,e,i)}},e))},i.extend(e.validators,{doesNotContainSymbols:function(t,e,i){return new RegExp("["+i+"]","g").test(t)?"Attribute '"+e+"' contains forbidden symbols":void 0},integerNumber:function(t){return s.isNumberInt(t)?void 0:"Value is not a valid integer number"},url:function(t){return/(http|https):\/\/.*\..*./.test(t)?void 0:"Value is not a valid url"},hexColor:function(t){return/^#[0-9a-f]{3,6}$/i.test(t)?void 0:"Value is not a valid hex color"},xRegExpPattern:function(t,e,i,n){return i.test(t)?void 0:"Value does not match pattern"},startsWithLetter:function(t,e,i,n){return t.substr(0,1).match(/[A-Za-z]/)?void 0:"Value should start with letter"},containsOnlyWordCharacters:function(t,e,i,n){return t.search(/\W/)>=0?"Value should contain only word characters (letters, digits and underscore)":void 0},arrayMinLength:function(t,e,n,s){return i.isArray(t)&&t.length<n?"Array length is less than "+n:void 0}}),e}),define("common/util/classUtil",["require","underscore"],function(t){"use strict";var e=t("underscore"),i={mixin:function(){var t,e,i=Array.prototype,n=i.shift.call(arguments);for(t=0;t<arguments.length;t+=1)if(arguments[t])for(e in arguments[t])arguments[t].hasOwnProperty(e)&&(n[e]=arguments[t][e]);return n},inherit:function(t,n){var s;s=n&&n.hasOwnProperty("constructor")?n.constructor:function(){return t.apply(this,arguments)};var o=function(){};return o.prototype=t.prototype,s.prototype=new o,n&&e.extend(s.prototype,n),s.prototype.constructor=s,s.parent=t.prototype,s.extend=function(t){return i.inherit(s,t)},s},extend:function(t){return i.inherit(function(){},t)}};return i}),define("common/util/i18nMessage",["require","common/util/classUtil"],function(t){"use strict";var e=t("common/util/classUtil"),i=e.extend({constructor:function(t){this.code=t,this.args=Array.prototype.slice.call(arguments,1)},bundle:{}});return i.prototype.toString=function(){var t=this.bundle[this.code];if(!t)return this.code;for(var e=0,i=this.args.length;i>e;e++)t=t.replace("{"+e+"}",this.args[e]);return t},i}),function(t,e){"undefined"!=typeof exports?module.exports=e(require("underscore"),require("backbone")):"function"==typeof define&&define.amd?define("backbone.epoxy.original",["underscore","backbone"],e):e(t._,t.Backbone)}(this,function(t,e){function i(t,e,i){return t._super.prototype[e].apply(t,i)}function n(e,i,s,o){for(var r in i)if(i.hasOwnProperty(r)){var a=i[r];if(e.hasComputed(r)){if(o.length&&t.contains(o,r))throw"Recursive setter: "+o.join(" > ");a=e.c()[r].set(a),a&&y(a)&&(s=n(e,a,s,o.concat(r)))}else s[r]=a}return s}function s(e,i,n,s){n=n||{},n.get&&b(n.get)&&(n._get=n.get),n.set&&b(n.set)&&(n._set=n.set),delete n.get,delete n.set,t.extend(this,n),this.model=e,this.name=i,this.deps=this.deps||[],s||this.init()}function o(e){return b(e)?e():(y(e)&&(e=t.clone(e),t.each(e,function(t,i){e[i]=o(t)})),e)}function r(t){return b(t)?{set:t}:t}function a(e){return function(){var i=arguments,n=b(e)?e:e.get,s=e.set;return function(e){return _(e)?n.apply(this,t.map(i,o)):i[0]((s?s:n).call(this,e))}}}function l(e,i,n,s,o){return(e=t.result(e,s))?(T(e)?(o=o?o+"_":"",i["$"+s]=function(){return A&&A.push([e,"change"]),e},t.each(e.toJSON({computed:!0}),function(t,s){i[o+s]=function(t){return u(e,s,t,n)}})):x(e)&&(i["$"+s]=function(){return A&&A.push([e,"reset add remove sort update"]),
  e}),e):void 0}function u(e,i,n,s){if(A&&A.push([e,"change:"+i]),!_(n)){if(!y(n)||w(n)||t.isDate(n)){var o=n;n={},n[i]=o}return s&&s.save?e.save(n,s):e.set(n,s)}return e.get(i)}function c(t,e){if(":el"===e)return t.$el;var i=t.$(e);return t.$el.is(e)&&(i=i.add(t.$el)),i}function h(e,i,n,s,o,r){try{var a=C[n]||(C[n]=new Function("$f","$c","with($f){with($c){return{"+n+"}}}")),l=a(r,s)}catch(u){throw'Error parsing bindings: "'+n+'"\n>> '+u}var c=t.map(t.union(l.events||[],["change"]),function(t){return t+".epoxy"}).join(" ");t.each(l,function(t,n){if(o.hasOwnProperty(n))e.b().push(new f(e,i,o[n],t,c,s,l));else if(!O.hasOwnProperty(n))throw'binding handler "'+n+'" is not defined.'})}function d(t,e,i){return t&&t.hasOwnProperty(e)?_(i)?o(t[e]):t[e](i):void 0}function p(t,e){var i=[];if(e&&t)for(var n=0,s=e.length;s>n;n++)i.push(e[n]in t?t[e[n]]():null);return i}function f(e,i,n,s,r,a,l){var u=this,c=i[0].tagName.toLowerCase(),h="input"==c||"select"==c||"textarea"==c||"true"==i.prop("contenteditable"),d=[],p=function(t){u.$el&&u.set(u.$el,o(s),t)};if(u.view=e,u.$el=i,u.evt=r,t.extend(u,n),s=u.init(u.$el,o(s),a,l)||s,A=d,p(),A=null,h&&n.get&&b(s)&&u.$el.on(r,function(t){s(u.get(u.$el,o(s),t))}),d.length)for(var f=0,m=d.length;m>f;f++)u.listenTo(d[f][0],d[f][1],p)}var m,g=e.Epoxy={},v=Array.prototype,_=t.isUndefined,b=t.isFunction,y=t.isObject,w=t.isArray,T=function(t){return t instanceof e.Model},x=function(t){return t instanceof e.Collection},S=function(){},E={mixin:function(t){t=t||{};for(var e in this.prototype)"bindings"===e&&t.bindings||this.prototype.hasOwnProperty(e)&&"constructor"!==e&&(t[e]=this.prototype[e]);return t}},M=["computeds"];g.Model=e.Model.extend({_super:e.Model,constructor:function(e,n){t.extend(this,t.pick(n||{},M)),i(this,"constructor",arguments),this.initComputeds(e,n)},getCopy:function(e){return t.clone(this.get(e))},get:function(t){return m&&m.push(["change:"+t,this]),this.hasComputed(t)?this.c()[t].get():i(this,"get",arguments)},set:function(e,s,o){var r=e;r&&!y(r)?(r={},r[e]=s):o=s,o=o||{};var a=this._setting=[];o.unset||(r=n(this,r,{},[])),delete this._setting;var l=i(this,"set",[r,o]);return o.silent||(!this.hasChanged()&&a.length&&this.trigger("change",this),t.each(a,function(t){this.trigger.apply(this,t)},this)),l},toJSON:function(e){var n=i(this,"toJSON",arguments);return e&&e.computed&&t.each(this.c(),function(t,e){n[e]=t.value}),n},destroy:function(){return this.clearComputeds(),i(this,"destroy",arguments)},c:function(){return this._c||(this._c={})},initComputeds:function(e,i){this.clearComputeds();var n=t.result(this,"computeds")||{};n=t.extend(n,t.pick(e||{},t.keys(n))),t.each(n,function(t,e){t._init=1,this.addComputed(e,t)},this),t.invoke(this.c(),"init")},addComputed:function(t,e,i){this.removeComputed(t);var n=e,o=n._init;if(b(e)){var r=2;n={},n._get=e,b(i)&&(n._set=i,r++),n.deps=v.slice.call(arguments,r)}return this.c()[t]=new s(this,t,n,o),this},hasComputed:function(t){return this.c().hasOwnProperty(t)},removeComputed:function(t){return this.hasComputed(t)&&(this.c()[t].dispose(),delete this.c()[t]),this},clearComputeds:function(){for(var t in this.c())this.removeComputed(t);return this},modifyArray:function(t,e,i){var n=this.get(t);if(w(n)&&b(v[e])){var s=v.slice.call(arguments,2),o=v[e].apply(n,s);return i=i||{},i.silent||this.trigger("change:"+t+" change",this,v,i),o}return null},modifyObject:function(t,e,i,n){var s=this.get(t),o=!1;return y(s)?(n=n||{},_(i)&&s.hasOwnProperty(e)?(delete s[e],o=!0):s[e]!==i&&(s[e]=i,o=!0),o&&!n.silent&&this.trigger("change:"+t+" change",this,s,n),s):null}},E),t.extend(s.prototype,e.Events,{init:function(){var e={},i=m=[];this.get(!0),m=null,i.length&&(t.each(i,function(i){var n=i[0],s=i[1];e[n]?t.contains(e[n],s)||e[n].push(s):e[n]=[s]}),t.each(e,function(e,i){for(var n=0,s=e.length;s>n;n++)this.listenTo(e[n],i,t.bind(this.get,this,!0))},this))},val:function(t){return this.model.get(t)},get:function(e){if(e===!0&&this._get){var i=this._get.apply(this.model,t.map(this.deps,this.val,this));this.change(i)}return this.value},set:function(t){if(this._get){if(this._set)return this._set.apply(this.model,arguments);throw"Cannot set read-only computed attribute."}return this.change(t),null},change:function(e){if(!t.isEqual(e,this.value)){this.value=e;var i=["change:"+this.name,this.model,e];this.model._setting?this.model._setting.push(i):(i[0]+=" change",this.model.trigger.apply(this.model,i))}},dispose:function(){this.stopListening(),this.off(),this.model=this.value=null}});var I={optionText:"label",optionValue:"value"},C={},D={attr:r(function(t,e){t.attr(e)}),checked:r({get:function(e,i){var n=!!e.prop("checked"),s=e.val();if(this.isRadio(e))return s;if(w(i)){i=i.slice();var o=t.indexOf(i,s);return n&&0>o?i.push(s):!n&&o>-1&&i.splice(o,1),i}return n},set:function(e,i){var n=!!i;this.isRadio(e)?n=i==e.val():w(i)&&(n=t.contains(i,e.val())),e.prop("checked",n)},isRadio:function(t){return"radio"===t.attr("type").toLowerCase()}}),classes:r(function(e,i){t.each(i,function(t,i){e.toggleClass(i,!!t)})}),collection:r({init:function(t,e,i,n){if(this.i=n.itemView?this.view[n.itemView]:this.view.itemView,!x(e))throw'Binding "collection" requires a Collection.';if(!b(this.i))throw'Binding "collection" requires an itemView.';this.v={}},set:function(e,i,n){var s,o=this.v,r=this.i,a=i.models,l=A;if(A=null,n=n||i,T(n))if(o.hasOwnProperty(n.cid))o[n.cid].remove(),delete o[n.cid];else{o[n.cid]=s=new r({model:n,collectionView:this.view});var u=t.indexOf(a,n),c=e.children();u<c.length?c.eq(u).before(s.$el):e.append(s.$el)}else if(x(n)){var h=a.length===t.size(o)&&i.every(function(t){return o.hasOwnProperty(t.cid)});e.children().detach();var d=document.createDocumentFragment();h?i.each(function(t){d.appendChild(o[t.cid].el)}):(this.clean(),i.each(function(t){o[t.cid]=s=new r({model:t,collectionView:this.view}),d.appendChild(s.el)},this)),e.append(d)}A=l},clean:function(){for(var t in this.v)this.v.hasOwnProperty(t)&&(this.v[t].remove(),delete this.v[t])}}),css:r(function(t,e){t.css(e)}),disabled:r(function(t,e){t.prop("disabled",!!e)}),enabled:r(function(t,e){t.prop("disabled",!e)}),html:r(function(t,e){t.html(e)}),options:r({init:function(t,e,i,n){this.e=n.optionsEmpty,this.d=n.optionsDefault,this.v=n.value},set:function(e,i){var n=this,s=o(n.e),r=o(n.d),a=o(n.v),l=x(i)?i.models:i,u=l.length,c=!0,h="";u||r||!s?(r&&(l=[r].concat(l)),t.each(l,function(t,e){h+=n.opt(t,u)})):(h+=n.opt(s,u),c=!1),e.html(h).prop("disabled",!c).val(a);var d=e.val();n.v&&!t.isEqual(a,d)&&n.v(d)},opt:function(t,e){var i=t,n=t,s=I.optionText,o=I.optionValue;return y(t)&&(i=T(t)?t.get(s):t[s],n=T(t)?t.get(o):t[o]),['<option value="',n,'">',i,"</option>"].join("")},clean:function(){this.d=this.e=this.v=0}}),template:r({init:function(e,i,n){var s=e.find("script,template");return this.t=t.template(s.length?s.html():e.html()),w(i)?t.pick(n,i):void 0},set:function(t,e){e=T(e)?e.toJSON({computed:!0}):e,t.html(this.t(e))},clean:function(){this.t=null}}),text:r({get:function(t){return t.text()},set:function(t,e){t.text(e)}}),toggle:r(function(t,e){t.toggle(!!e)}),value:r({get:function(t){return t.val()},set:function(t,e){try{t.val()+""!=e+""&&t.val(e)}catch(i){}}})},k={all:a(function(){for(var t=arguments,e=0,i=t.length;i>e;e++)if(!t[e])return!1;return!0}),any:a(function(){for(var t=arguments,e=0,i=t.length;i>e;e++)if(t[e])return!0;return!1}),length:a(function(t){return t.length||0}),none:a(function(){for(var t=arguments,e=0,i=t.length;i>e;e++)if(t[e])return!1;return!0}),not:a(function(t){return!t}),format:a(function(t){for(var e=arguments,i=1,n=e.length;n>i;i++)t=t.replace(new RegExp("\\$"+i,"g"),e[i]);return t}),select:a(function(t,e,i){return t?e:i}),csv:a({get:function(t){return t=String(t),t?t.split(","):[]},set:function(t){return w(t)?t.join(","):t}}),integer:a(function(t){return t?parseInt(t,10):0}),decimal:a(function(t){return t?parseFloat(t):0})},O={events:1,itemView:1,optionsDefault:1,optionsEmpty:1};g.binding={allowedParams:O,addHandler:function(t,e){D[t]=r(e)},addFilter:function(t,e){k[t]=a(e)},config:function(e){t.extend(I,e)},emptyCache:function(){C={}}};var A,N=["viewModel","bindings","bindingFilters","bindingHandlers","bindingSources","computeds"];return g.View=e.View.extend({_super:e.View,constructor:function(e){t.extend(this,t.pick(e||{},N)),i(this,"constructor",arguments),this.applyBindings()},b:function(){return this._b||(this._b=[])},bindings:"data-bind",setterOptions:null,applyBindings:function(){this.removeBindings();var i=this,n=t.clone(t.result(i,"bindingSources")),s=i.bindings,o=i.setterOptions,u=t.clone(D),d=t.clone(k),f=i._c={};t.each(t.result(i,"bindingHandlers")||{},function(t,e){u[e]=r(t)}),t.each(t.result(i,"bindingFilters")||{},function(t,e){d[e]=a(t)}),i.model=l(i,f,o,"model"),i.viewModel=l(i,f,o,"viewModel"),i.collection=l(i,f,o,"collection"),i.collection&&i.collection.view&&(i.itemView=i.collection.view),n&&(t.each(n,function(t,e){n[e]=l(n,f,o,e,e)}),i.bindingSources=n),t.each(t.result(i,"computeds")||{},function(t,e){var n=b(t)?t:t.get,s=t.set,o=t.deps;f[e]=function(t){return!_(t)&&s?s.call(i,t):n.apply(i,p(i._c,o))}}),y(s)?t.each(s,function(t,e){var n=c(i,e);n.length&&h(i,n,t,f,u,d)}):c(i,"["+s+"]").each(function(){var t=e.$(this);h(i,t,t.attr(s),f,u,d)})},getBinding:function(t){return d(this._c,t)},setBinding:function(t,e){return d(this._c,t,e)},removeBindings:function(){if(this._c=null,this._b)for(;this._b.length;)this._b.pop().dispose()},remove:function(){this.removeBindings(),i(this,"remove",arguments)}},E),t.extend(f.prototype,e.Events,{init:S,get:S,set:S,clean:S,dispose:function(){this.clean(),this.stopListening(),this.$el.off(this.evt),this.$el=this.view=null}}),g}),define("common/component/colorPicker/enum/colors",[],function(){return["rgb(152, 0, 0)","rgb(255, 0, 0)","rgb(255, 153, 0)","rgb(255, 255, 0)","rgb(0, 255, 0)","rgb(0, 255, 255)","rgb(74, 134, 232)","rgb(0, 0, 255)","rgb(153, 0, 255)","rgb(255, 0, 255)","rgb(0, 0, 0)","rgb(67, 67, 67)","rgb(102, 102, 102)","rgb(153, 153, 153)","rgb(183, 183, 183)","rgb(204, 204, 204)","rgb(217, 217, 217)","rgb(239, 239, 239)","rgb(243, 243, 243)","rgb(255, 255, 255)","rgb(230, 184, 175)","rgb(244, 204, 204)","rgb(252, 229, 205)","rgb(255, 242, 204)","rgb(217, 234, 211)","rgb(208, 224, 227)","rgb(201, 218, 248)","rgb(207, 226, 243)","rgb(217, 210, 233)","rgb(234, 209, 220)","rgb(221, 126, 107)","rgb(234, 153, 153)","rgb(249, 203, 156)","rgb(255, 229, 153)","rgb(182, 215, 168)","rgb(162, 196, 201)","rgb(164, 194, 244)","rgb(159, 197, 232)","rgb(180, 167, 214)","rgb(213, 166, 189)","rgb(204, 65, 37)","rgb(224, 102, 102)","rgb(246, 178, 107)","rgb(255, 217, 102)","rgb(147, 196, 125)","rgb(118, 165, 175)","rgb(109, 158, 235)","rgb(111, 168, 220)","rgb(142, 124, 195)","rgb(194, 123, 160)","rgb(166, 28, 0)","rgb(204, 0, 0)","rgb(230, 145, 56)","rgb(241, 194, 50)","rgb(106, 168, 79)","rgb(69, 129, 142)","rgb(60, 120, 216)","rgb(61, 133, 198)","rgb(103, 78, 167)","rgb(166, 77, 121)","rgb(133, 32, 12)","rgb(153, 0, 0)","rgb(180, 95, 6)","rgb(191, 144, 0)","rgb(56, 118, 29)","rgb(19, 79, 92)","rgb(17, 85, 204)","rgb(11, 83, 148)","rgb(53, 28, 117)","rgb(116, 27, 71)","rgb(91, 15, 0)","rgb(102, 0, 0)","rgb(120, 63, 4)","rgb(127, 96, 0)","rgb(39, 78, 19)","rgb(12, 52, 61)","rgb(28, 69, 135)","rgb(7, 55, 99)","rgb(32, 18, 77)","rgb(76, 17, 48)"]}),define("requirejs.plugin.text",["module"],function(t){"use strict";var e,i,n,s,o,r=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],a=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,l=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,u="undefined"!=typeof location&&location.href,c=u&&location.protocol&&location.protocol.replace(/\:/,""),h=u&&location.hostname,d=u&&(location.port||void 0),p={},f=t.config&&t.config()||{};return e={version:"2.0.9",strip:function(t){if(t){t=t.replace(a,"");var e=t.match(l);e&&(t=e[1])}else t="";return t},jsEscape:function(t){return t.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:f.createXhr||function(){var t,e,i;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(e=0;3>e;e+=1){i=r[e];try{t=new ActiveXObject(i)}catch(n){}if(t){r=[i];break}}return t},parseName:function(t){var e,i,n,s=!1,o=t.indexOf("."),r=0===t.indexOf("./")||0===t.indexOf("../");return-1!==o&&(!r||o>1)?(e=t.substring(0,o),i=t.substring(o+1,t.length)):e=t,n=i||e,o=n.indexOf("!"),-1!==o&&(s="strip"===n.substring(o+1),n=n.substring(0,o),i?i=n:e=n),{moduleName:e,ext:i,strip:s}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(t,i,n,s){var o,r,a,l=e.xdRegExp.exec(t);return l?(o=l[2],r=l[3],r=r.split(":"),a=r[1],r=r[0],!(o&&o!==i||r&&r.toLowerCase()!==n.toLowerCase()||(a||r)&&a!==s)):!0},finishLoad:function(t,i,n,s){n=i?e.strip(n):n,f.isBuild&&(p[t]=n),s(n)},load:function(t,i,n,s){if(s.isBuild&&!s.inlineText)return void n();f.isBuild=s.isBuild;var o=e.parseName(t),r=o.moduleName+(o.ext?"."+o.ext:""),a=i.toUrl(r),l=f.useXhr||e.useXhr;!u||l(a,c,h,d)?e.get(a,function(i){e.finishLoad(t,o.strip,i,n)},function(t){n.error&&n.error(t)}):i([r],function(t){e.finishLoad(o.moduleName+"."+o.ext,o.strip,t,n)})},write:function(t,i,n,s){if(p.hasOwnProperty(i)){var o=e.jsEscape(p[i]);n.asModule(t+"!"+i,"define(function () { return '"+o+"';});\n")}},writeFile:function(t,i,n,s,o){var r=e.parseName(i),a=r.ext?"."+r.ext:"",l=r.moduleName+a,u=n.toUrl(r.moduleName+a)+".js";e.load(l,n,function(i){var n=function(t){return s(u,t)};n.asModule=function(t,e){return s.asModule(t,u,e)},e.write(t,l,n,o)},o)}},"node"===f.env||!f.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]?(i=require.nodeRequire("fs"),e.get=function(t,e,n){try{var s=i.readFileSync(t,"utf8");0===s.indexOf("\ufeff")&&(s=s.substring(1)),e(s)}catch(o){n(o)}}):"xhr"===f.env||!f.env&&e.createXhr()?e.get=function(t,i,n,s){var o,r=e.createXhr();if(r.open("GET",t,!0),s)for(o in s)s.hasOwnProperty(o)&&r.setRequestHeader(o.toLowerCase(),s[o]);f.onXhr&&f.onXhr(r,t),r.onreadystatechange=function(e){var s,o;4===r.readyState&&(s=r.status,s>399&&600>s?(o=new Error(t+" HTTP status: "+s),o.xhr=r,n(o)):i(r.responseText),f.onXhrComplete&&f.onXhrComplete(r,t))},r.send(null)}:"rhino"===f.env||!f.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?e.get=function(t,e){var i,n,s="utf-8",o=new java.io.File(t),r=java.lang.System.getProperty("line.separator"),a=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(o),s)),l="";try{for(i=new java.lang.StringBuffer,n=a.readLine(),n&&n.length()&&65279===n.charAt(0)&&(n=n.substring(1)),null!==n&&i.append(n);null!==(n=a.readLine());)i.append(r),i.append(n);l=String(i.toString())}finally{a.close()}e(l)}:("xpconnect"===f.env||!f.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(n=Components.classes,s=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),o="@mozilla.org/windows-registry-key;1"in n,e.get=function(t,e){var i,r,a,l={};o&&(t=t.replace(/\//g,"\\")),a=new FileUtils.File(t);try{i=n["@mozilla.org/network/file-input-stream;1"].createInstance(s.nsIFileInputStream),i.init(a,1,0,!1),r=n["@mozilla.org/intl/converter-input-stream;1"].createInstance(s.nsIConverterInputStream),r.init(i,"utf-8",i.available(),s.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),r.readString(i.available(),l),r.close(),i.close(),e(l.value)}catch(u){throw new Error((a&&a.path||"")+": "+u)}}),e}),define("text",["require","requirejs.plugin.text","underscore","request"],function(t){"use strict";var e=t("requirejs.plugin.text"),i=t("underscore"),n=t("request"),s=e.createXhr,o=e.load;return i.extend(e,{useXhr:function(){return!0},createXhr:function(){var t=s.apply(e,arguments),o={},r={response:void 0,responseBody:void 0,responseText:void 0,responseType:void 0,responseXML:void 0,status:void 0,statusText:void 0};for(var a in t)-1==a.indexOf("response")&&-1==a.indexOf("status")&&(r[a]=t[a]);return i.extend(r,{open:function(t,e,i){o.url=e,r.status=1},send:function(){n(o).done(function(t,e,i){r.readyState=i.readyState,r.status=i.status,r.responseText=i.responseText,r.onreadystatechange()}).fail(function(t){r.onerror(t)})}})},load:function(t,e,n,s){return s.isBuild&&s.excludeText&&i.indexOf(s.excludeText,t)>=0?void n():o(t,e,n,s)}})}),define("text!common/component/colorPicker/template/simpleColorPickerTemplate.htm",[],function(){return'<div class="simpleColorPicker">\n    <div class="header">\n        <h2>{{- label || i18n["color.picker.label"]}}</h2>\n    </div>\n    <div class="body">\n        {{ if (showTransparentInput) { }}\n        <div class="color transparent">{{- i18n["color.picker.transparent"]}}</div>\n        {{ } }}\n        {{ if (showNoneInput) { }}\n        <div class="color none">{{- i18n["color.picker.none"]}}</div>\n        {{ } }}\n        {{ _.each(colors, function(color, index){ }}\n        <div class="colorWrapper" data-index="{{- index}}">\n            <div class="color" title="{{- color}}" style="background-color: {{- color}}"></div>\n        </div>\n        {{ }) }}\n    </div>\n    <div class="footer"></div>\n</div>'}),define("requirejs.plugin.css",[],function(){if("undefined"==typeof window)return{load:function(t,e,i){i()}};var t=document.getElementsByTagName("head")[0],e=window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit[\/|5]([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)|AndroidWebKit\/([^ ;]*)/)||0,i=!1,n=!0;e[1]||e[7]?i=parseInt(e[1])<6||parseInt(e[7])<=9:e[2]||e[8]?n=!1:e[4]&&(i=parseInt(e[4])<18);var s={};s.pluginBuilder="./css-builder";var o,r,a,l=function(){o=document.createElement("style"),t.appendChild(o),r=o.styleSheet||o.sheet},u=0,c=[],h=function(t){r.addImport(t+"?"+Math.random()),o.onload=function(){d()},u++,31==u&&(l(),u=0)},d=function(){a();var t=c.shift();return t?(a=t[1],void h(t[0])):void(a=null)},p=function(t,e){if(r&&r.addImport||l(),r&&r.addImport)a?c.push([t,e]):(h(t),a=e);else{o.textContent='@import "'+t+'";';var i=setInterval(function(){try{o.sheet.cssRules,clearInterval(i),e()}catch(t){}},10)}},f=function(e,i){var s=document.createElement("link");if(s.type="text/css",s.rel="stylesheet",n)s.onload=function(){s.onload=function(){},setTimeout(i,7)};else var o=setInterval(function(){for(var t=0;t<document.styleSheets.length;t++){var e=document.styleSheets[t];if(e.href==s.href)return clearInterval(o),i()}},10);s.href=e,t.appendChild(s)};return s.normalize=function(t,e){return".css"==t.substr(t.length-4,4)&&(t=t.substr(0,t.length-4)),e(t)},s.load=function(t,e,n,s){(i?p:f)(e.toUrl(t+".css"),n)},s}),define("css",["require","requirejs.plugin.css","underscore"],function(t){"use strict";var e=t("requirejs.plugin.css"),i=t("underscore"),n=i.clone(e);return n.load=function(t,i,n,s){if(!s.config.theme)return void n();var o=s.config.theme||{},r=o.baseUrl||"/",a=o.path||"themes",l=o.name||"default";"/"!==r.slice(-1)&&(r+="/"),t=r+[a,l,t].join("/"),e.load.call(this,t,i,n,s)},n}),define("common/component/colorPicker/SimpleColorPicker",["require","backbone","underscore","jquery","bundle!js-sdk/CommonBundle","./enum/colors","text!common/component/colorPicker/template/simpleColorPickerTemplate.htm","css!simpleColorPicker"],function(t){"use strict";var e=t("backbone"),i=t("underscore"),n=t("jquery"),s=t("bundle!js-sdk/CommonBundle"),o=t("./enum/colors"),r=t("text!common/component/colorPicker/template/simpleColorPickerTemplate.htm");return t("css!simpleColorPicker"),e.View.extend({events:{"click .color":"_selectColor"},constructor:function(t){t||(t={}),this.label=t&&t.label,this.showTransparentInput=t&&t.showTransparentInput,this.showNoneInput=t&&t.showNoneInput,e.View.apply(this,arguments)},el:function(){return i.template(r)({colors:o,i18n:s,label:this.label,showTransparentInput:this.showTransparentInput,showNoneInput:this.showNoneInput})},highlightColor:function(t){var e,n;null===t?e=this.$el.find(".color.none"):"rgba(0, 0, 0, 0)"===t||"transparent"===t?e=this.$el.find(".color.transparent"):(n=i.indexOf(o,t),n>=0&&(e=this.$el.find("div[data-index='"+n+"']"))),this.$el.find(".color.transparent.selected, .color.none.selected, .colorWrapper.selected").removeClass("selected"),e&&e.addClass("selected")},_selectColor:function(t){var e,i=n(t.target);e=i.is(".none")?null:i.css("background-color"),this.highlightColor(e),this.trigger("color:selected",e)},show:function(){this.$el.show()},hide:function(){this.$el.hide()}})}),define("common/component/base/AttachableComponent",["require","jquery","underscore","common/util/classUtil"],function(t){"use strict";var e=t("jquery"),i=t("underscore"),n=t("common/util/classUtil");return n.extend({constructor:function(t,i){if(this.padding=i?i:{top:5,left:5},!t||0===e(t).length)throw new Error("AttachableComponent should be attached to an element");this.$attachTo=e(t)},show:function(){var t=this.$attachTo.offset(),n=this.$attachTo.height(),s=this.$attachTo.width(),o=e("body"),r=o.height(),a=o.width(),l=this.$el.innerWidth(),u=this.$el.innerHeight(),c=t.top+n+this.padding.top,h=t.left,d=t.top+n+this.padding.top,p=t.left;u+c>r&&(d=t.top-u-this.padding.top),l+h>a&&(p=t.left-l+s),i.extend(this,{top:d,left:p}),this.$el.css({top:this.top,left:this.left}),this.$el.show(),this.trigger("show",this)},hide:function(){return this.$el.hide(),this.trigger("hide",this),this}})}),define("common/component/base/ClickComponent",["require","common/component/base/AttachableComponent","jquery","underscore"],function(t){"use strict";var e=t("common/component/base/AttachableComponent"),i=t("jquery"),n=t("underscore");return e.extend({constructor:function(t){e.apply(this,arguments),n.bindAll(this,"_onElementClick","_onDocumentMousedown"),this.$attachTo.on("click",this._onElementClick),i("body").on("mousedown",this._onDocumentMousedown)},_onElementClick:function(){this.show()},_onDocumentMousedown:function(t){i.contains(this.$el[0],t.target)||this.$el.is(t.target)||i.contains(this.$attachTo[0],t.target)||this.$attachTo.is(t.target)||this.hide()},remove:function(){this.$attachTo.off("click",this._onElementClick),i("body").off("mousedown",this._onDocumentMousedown)}})}),define("common/component/colorPicker/SimpleAttachableColorPicker",["require","common/component/colorPicker/SimpleColorPicker","common/component/base/ClickComponent","jquery","./enum/colors","text!common/component/colorPicker/template/simpleColorPickerTemplate.htm"],function(t){"use strict";var e=t("common/component/colorPicker/SimpleColorPicker"),i=t("common/component/base/ClickComponent"),n=t("jquery");t("./enum/colors"),t("text!common/component/colorPicker/template/simpleColorPickerTemplate.htm");return e.extend(i.extend({constructor:function(t,n,s){i.call(this,t,n),e.call(this,s)},initialize:function(){e.prototype.initialize.apply(this),this.hide(),n("body").append(this.$el)},_selectColor:function(t){this.hide(),e.prototype._selectColor.apply(this,arguments)},remove:function(){i.prototype.remove.apply(this,arguments),e.prototype.remove.apply(this,arguments)}}).prototype)}),define("backbone.epoxy",["require","backbone.epoxy.original","common/component/colorPicker/SimpleAttachableColorPicker","underscore"],function(t){function e(t,e){var i=t.data("bind"),n=new RegExp(e+":(\\w*)\\(?(\\w*)?\\)?");return s.last(s.compact(i.match(n)))}var i=t("backbone.epoxy.original"),n=t("common/component/colorPicker/SimpleAttachableColorPicker"),s=t("underscore");return i.binding.addHandler("validationErrorClass",{init:function(t,i,n,s){this.attr=e(t,"validationErrorClass");var o=this.view.model;this._onAttrValidated=function(e,i,n){t[n?"addClass":"removeClass"]("error")},o.on("validate:"+this.attr,this._onAttrValidated)},get:function(t,e,i){return t.val()},set:function(t,e){t.val(e)},clean:function(){this.view.model.off("validate:"+this.attr,this._onAttrValidated)}}),i.binding.addHandler("validationErrorText",{init:function(t,i,n,s){this.attr=e(t,"validationErrorText");var o=this.view.model;this._onAttrValidated=function(e,i,n){t.text(n||"")},o.on("validate:"+this.attr,this._onAttrValidated)},get:function(t,e,i){return t.val()},set:function(t,e){t.val(e)},clean:function(){this.view.model.off("validate:"+this.attr,this._onAttrValidated)}}),i.binding.addFilter("escapeCharacters",{get:function(t){return s.escape(t)},set:function(t){return s.unescape(t)}}),i.binding.addHandler("colorpicker",{init:function(t,i,o,r){var a=!!t.data("showTransparentInput"),l=t.data("label"),u=e(t,"colorpicker");this.attachableColorPicker=new n(t,{top:5,left:5},{label:l,showTransparentInput:a}),this.callback=function(t){o[u](t)},this.attachableColorPicker.on("color:selected",s.bind(this.callback,this))},get:function(t,e,i){return t.val()},set:function(t,e){var i=t.find(".colorIndicator");this.attachableColorPicker.highlightColor(e),i.css("background-color",e)},clean:function(){this.attachableColorPicker.off("color:selected",s.bind(this.callback,this)),this.attachableColorPicker.remove()}}),i.binding.addHandler("radioDiv",{init:function(t,i,n,o){var r=e(t,"radioDiv");this.callback=function(){var e=t.data("value");n[r](e)},t.on("click",s.bind(this.callback,this))},get:function(t,e,i){return t.data("value")},set:function(t,e){var i=t.siblings("div[data-bind*='radioDiv:']");t.data("value")===e&&(t.addClass("checked"),t.children(".radioChild").addClass("checked"),i.removeClass("checked"),i.children(".radioChild").removeClass("checked"))}}),i.binding.addHandler("checkboxDiv",{init:function(t,i,n,o){var r=e(t,"checkboxDiv");this.callback=function(){n[r](!n[r]())},t.on("click",s.bind(this.callback,this))},get:function(t,e,i){return t.data("value")},set:function(t,e){e?(t.addClass("checked"),t.children(".checkboxChild").addClass("checked")):(t.removeClass("checked"),t.children(".checkboxChild").removeClass("checked"))}}),i.binding.addHandler("slide",function(t,e){t[e?"slideDown":"slideUp"]({complete:function(){!e&&t.hide()}})}),i.binding.addFilter("prependText",function(t,e){return"'"===e.charAt(0)&&"'"===e.charAt(e.length-1)&&(e=e.slice(1,e.length-1)),e+" "+(s.isUndefined(t)?"":t)}),i}),define("attributes/enum/permissionMasksEnum",[],function(){return{ADMINISTRATOR:1,READ_ONLY:2,EXECUTE_ONLY:32,NO_ACCESS:0}}),define("attributes/model/AttributeModel",["require","underscore","jquery","backbone.validation","bundle!AttributeBundle","common/util/i18nMessage","backbone.epoxy","attributes/enum/permissionMasksEnum"],function(t){var e=t("underscore"),i=t("jquery"),n=t("backbone.validation"),s=t("bundle!AttributeBundle"),o=t("common/util/i18nMessage").extend({bundle:s}),r=t("backbone.epoxy"),a=t("attributes/enum/permissionMasksEnum"),l=255,u=2e3,c=r.Model.extend({defaults:{id:void 0,name:void 0,value:"",description:"",inherited:!1,permissionMask:1,secure:!1},constructor:function(){this._initModelWithPermissionDefaults&&this._initModelWithPermissionDefaults(),r.Model.apply(this,arguments)},initialize:function(){this.get("id")||this.setId(),this.validateSameNames=!1,this.setState("originalState"),this.setState("confirmedState")},url:function(){var t=encodeURIComponent(this.id).replace(/'/g,"%27");return this.collection.url(this.isNew()?"":t)},validation:{name:[{required:!0,msg:new o("attributes.error.attribute.name.empty")},{maxLength:l,msg:new o("attributes.error.attribute.name.too.long",l)},{doesNotContainSymbols:"\\\\/",msg:new o("attributes.error.attribute.name.invalid")},{fn:function(){if(this.attr){for(var t,i,n,s=this.attr.length,r=0;s>r;r++){if(n=this.attr[r],e.defaults(n,this.defaults),i=this.holder===n.holder&&this.get("inherited")===n.inherited){t="attributes.error.attribute.name.already.exist";break}if(n.inherited&&n.permissionMask===a.READ_ONLY){t="attributes.error.attribute.name.already.exist.at.higher.level";break}}return this.attr=null,this.holder=null,t&&new o(t)}}},{fn:function(){return this.validateIfSecure?new o("attributes.error.attribute.secure.renaming.not.allowed"):void 0}}],value:[{maxLength:u,msg:new o("attributes.error.attribute.value.too.long",u)},{fn:function(){return this.validateIfSecure?(this.validateIfSecure=!1," "):void 0}}],description:[{maxLength:l,msg:new o("attributes.error.attribute.description.too.long",l)}]},setId:function(){var t=this.get("name"),e=this.get("id");t!==e&&this.set("id",t)},toggleSameNamesValidation:function(){this.validateSameNames=!this.validateSameNames},resetField:function(t){this.set(t,this.defaults[t])},reset:function(t,e){var i={};return e=this.getState(e),i[t]=e[t],this.set(t?i:e),this},isRenamed:function(){return this.get("name")!==this.get("id")},isOriginallyInherited:function(){return this.originalState.inherited},isOverridden:function(){return!this.compareAttribute("inherited")},compareAttribute:function(t){return this.originalState[t]===this.confirmedState[t]},setState:function(t,i){i=i||this.attributes,this[t||"originalState"]=e.clone(i)},getState:function(t){return this[t||"originalState"]},trimAttrs:function(t,n){e.each(t,function(t){var e=this.get(t);this.set(t,i.trim(e),n)},this)},toJSON:function(t){t=t||{};var i=this.getState().value===this.getState("confirmedState").value,n=this.get("secure"),s=this.isNew()||this.isOverridden(),o=r.Model.prototype.toJSON.apply(this,arguments);return t.omitValue&&!s&&i&&n&&e.omit(o,"value")||o}});return e.extend(c.prototype,n.mixin),c}),define("common/util/browserDetection",["require","jquery"],function(t){"use strict";var e=t("jquery");return{isMozilla:function(){return"Netscape"===navigator.appName},isFirefox:function(){return-1!==navigator.userAgent.toLowerCase().indexOf("firefox")},isWebKitEngine:function(){return e.browser&&e.browser.webkit},isChrome:function(){return navigator.userAgent.toLowerCase().indexOf("chrome")},isIPad:function(){return"iPad"==navigator.platform},isIOS:function(){return navigator.userAgent.match(/(iPad|iPhone|iPod)/g)},isAndroid:function(){return navigator.userAgent.toLowerCase().indexOf("android")},isIE:function(){return"Microsoft Internet Explorer"===navigator.appName||navigator.userAgent.indexOf("Trident/")>=0},isIE6:function(){return this.isIEVersion(6)},isIE7:function(){return this.isIEVersion(7)},isIE8:function(){return this.isIEVersion(8)},isIE9:function(){return this.isIEVersion(9)},isIE10:function(){return this.isIEVersion(10)},isIE11:function(){return this.isIEVersion(11)},isIEVersion7Upwards:function(){return this.getIEVersion()>=7},isIEVersion:function(t){return this.getIEVersion()===t},getIEVersion:function(){var t=0;if(this.getIEVersion.version>=0)return this.getIEVersion.version;if(this.isIE())if("Netscape"===navigator.appName){var e=navigator.userAgent,i=new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})");null!=i.exec(e)&&(t=parseFloat(RegExp.$1))}else{var n=navigator.appVersion.split("MSIE")[1];t=parseFloat(n)}return this.getIEVersion.version=t,t}}}),define("common/util/eventAutomation",["require","common/util/browserDetection","jquery"],function(t){"use strict";var e=t("common/util/browserDetection"),i=t("jquery");return{mouseEventOptions:{bubbles:!0,cancelable:!0,view:document.defaultView,detail:0,screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null,srcElement:null},triggerNativeEvent:function(t,n,s){var o,r=e.isIE();if(n=n||(r?document.documentElement:window),document.createEvent){var a;switch(t){case"click":case"doubleclick":case"mousedown":case"mousemove":case"mouseout":case"mouseover":case"mouseup":a=i.extend({},this.mouseEventOptions,s),a.srcElement=n,"function"==typeof MouseEvent?o=new MouseEvent(t,a):(o=document.createEvent("MouseEvents"),o.initMouseEvent(t,a.bubbles,a.cancelable,a.view,a.detail,a.screenX,a.screenY,a.clientX,a.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,a.button,a.relatedTarget));break;default:a=i.extend({},this.eventOptions,s),a.srcElement=n,o=document.createEvent("HTMLEvents"),o.initEvent(t,a.bubble,a.cancelable)}n.dispatchEvent(o);
  }else o=document.createEventObject(),o.srcElement=n,"click"==t&&"undefined"!=typeof n.click?n.click():n.fireEvent("on"+t,o)},simulateClickSequence:function(t){this.triggerNativeEvent("mousedown",t),this.triggerNativeEvent("mouseup",t),this.triggerNativeEvent("click",t)},simulateDoubleClickSequence:function(t){this.triggerNativeEvent("mousedown",t),this.triggerNativeEvent("mouseup",t),this.triggerNativeEvent("click",t),this.triggerNativeEvent("mousedown",t),this.triggerNativeEvent("mouseup",t),this.triggerNativeEvent("click",t),this.triggerNativeEvent("dblclick",t)}}}),define("stdnavPluginAnchor",["require","exports","module","jquery","underscore","common/util/eventAutomation","logger","stdnav"],function(t,e,i){"use strict";var n=t("jquery"),s=(t("underscore"),t("common/util/eventAutomation")),o=t("logger").register(i),r=t("stdnav"),a=0,l=function(){a++,this.serial=a};n.extend(l.prototype,{zinit:function(t){return o.debug("stdnavPluginAnchor.init("+t+")\n"),this},activate:function(){this.behavior={ariaprep:[this,this._ariaPrep,null],ariarefresh:[this,this._ariaRefresh,null],down:[this,this._onLeftOrUp,null],enter:[this,this._onEnterOrEntered,null],entered:[this,this._onEnterOrEntered,null],inherit:!1,inheritable:!0,left:[this,this._onLeftOrUp,null],right:[this,this._onRightOrDown,null],up:[this,this._onRightOrDown,null]},r.registerNavtype(this.navtype,this.behavior,this.navtype_tags)},deactivate:function(){r.unregisterNavtype("anchor",this.behavior)},_ariaPrep:function(t){return n(t).attr("role","link"),null},_ariaRefresh:function(t){return n(t).attr("role","link"),null},_fixSubfocus:function(t){var e,i=n(t);if(i.is("A"))e=i;else if(e=n(t).closest("A"),void 0===e)return void 0;return e.find(".ghostfocus").removeClass(".ghostfocus"),e.children().find(".subfocus").removeClass(".subfocus"),e},_onFocusIn:function(t){var e,i=n(t).children(".ghostfocus");if(i.length>0)i.removeClass("ghostfocus"),e=this._fixSubfocus(i[0]);else{var s=n(t).children('li[js-navigable!="false"]');e=s.length>0?this._fixSubfocus(s[0]):t}return e},_onLeftOrUp:function(t){var e=n(t).prev("a");return e.length<1?t:e[0]},_onRightOrDown:function(t){var e=n(t).next("a");return e.length<1?t:e[0]},_onSubfocusIn:function(t){if("A"!=n(t).prop("nodeName")){var e=this._fixSubfocus(t);r.setSubfocus(e,!1)}},_onEnterOrEntered:function(t){var e=n(t);return e.is("a")&&s.simulateClickSequence(t),t}}),n.extend(l.prototype,{navtype:"anchor",navtype_tags:["A"]});var u=new l;return u}),define("stdnavPluginButton",["require","exports","module","jquery","underscore","common/util/eventAutomation","logger","stdnav"],function(t,e,i){"use strict";var n=t("jquery"),s=(t("underscore"),t("common/util/eventAutomation")),o=t("logger").register(i),r=t("stdnav"),a=0,l=function(){a++,this.serial=a};n.extend(l.prototype,{zinit:function(t){return o.debug("stdnavPluginButton.init("+t+")\n"),this},activate:function(){this.behavior={enter:[this,this._onEnterOrEntered,null],entered:[this,this._onEnterOrEntered,null],inherit:!1,inheritable:!0},r.registerNavtype(this.navtype,this.behavior,this.navtype_tags)},deactivate:function(){r.unregisterNavtype("button",this.behavior)},_fixSubfocus:function(t){var e,i=n(t);if(i.is("BUTTON,[role='button']"))e=i;else if(e=n(t).closest("BUTTON,[role='button']"),void 0===e)return void 0;return e.find(".ghostfocus").removeClass(".ghostfocus"),e.children().find(".subfocus").removeClass(".subfocus"),e},_onFocusIn:function(t){var e,i=n(t).children(".ghostfocus");if(i.length>0)i.removeClass("ghostfocus"),e=this._fixSubfocus(i[0]);else{var s=n(t).children('li[js-navigable!="false"]');e=s.length>0?this._fixSubfocus(s[0]):t}return e},_onSubfocusIn:function(t){if("BUTTON"!=n(t).prop("nodeName")){var e=this._fixSubfocus(t);r.setSubfocus(e,!1)}},_onEnterOrEntered:function(t){var e=n(t);return e.is("BUTTON,[role='button']")&&s.simulateClickSequence(t),t}}),n.extend(l.prototype,{navtype:"button",navtype_tags:["BUTTON"]});var u=new l;return u}),define("stdnavPluginForms",["require","exports","module","jquery","underscore","logger","stdnav"],function(t,e,i){"use strict";var n=t("jquery"),s=(t("underscore"),t("logger").register(i)),o=t("stdnav"),r=0,a=function(){r++,this.serial=r};n.extend(a.prototype,{zinit:function(t){return s.debug("stdnavPluginForms.init("+t+")\n"),this},activate:function(){this.behavior={ariaprep:[this,this._ariaPrep,null],ariarefresh:[this,this._ariaRefresh,null],inherit:!1,inheritable:!0,fixsuperfocus:[o,o.basicFixSuperfocus,null],superfocusin:[o,o.basicSuperfocusIn,{maxdepth:1,focusSelector:":input",ghostfocus:!1}]},o.registerNavtype(this.navtype,this.behavior,this.navtype_tags)},deactivate:function(){o.unregisterNavtype(this.navtype,this.behavior)},_ariaPrep:function(t){return n(t).attr("role","form"),null},_ariaRefresh:function(t){return n(t).attr("role","form"),null}}),n.extend(a.prototype,{navtype:"forms",navtype_tags:["FORM","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA"]});var l=new a;return l}),define("stdnavPluginGrid",["require","exports","module","jquery","underscore","logger","stdnav"],function(t,e,i){"use strict";var n=t("jquery"),s=(t("underscore"),t("logger").register(i)),o=t("stdnav"),r=0,a=function(){r++,this.serial=r};n.extend(a.prototype,{zinit:function(t){return s.debug("stdnavPluginGrid.init("+t+")\n"),this},activate:function(){this.behavior={focusin:[this,o.basicFocusIn,{maxdepth:2,subfocusclass:"gridcell"}],focusout:[this,o.ghostFocusOut,null],subfocusin:[this,this._onSubfocusIn,null],left:[this,this._onLeft,null],right:[this,this._onRight,null],up:[this,this._onUp,null],down:[this,this._onDown,null],hoverin:[this,this._onHover,null],inherit:!0,inheritable:!0},o.registerNavtype(this.navtype,this.behavior,this.navtype_tags)},deactivate:function(){o.unregisterNavtype(this.navtype,this.behavior)},_findSubfocus:function(t){var e=n(t).closest(".grid"),i=e.find(".subfocus");return void 0!==i?n(i[0]):void 0},_fixSubfocus:function(t){var e,i;if(t.hasClass("grid"))if(e=t.children(".gridrow").children(".gridcell .ghostfocus"),e.length>0)i=e[0];else{var s=t.children(".gridrow");if(s.length>0){var o=n(s[0]).children(".gridcell");i=o.length>0?o[0]:s[0]}else i=t}else t.hasClass("gridrow")?(e=t.children(".gridcell .ghostfocus"),i=e[0]):t.hasClass("gridcell")&&(i=t);return i},_onSubfocusIn:function(t){if(n(t).hasClass("gridcell")===!1){var e=this._fixSubfocus(n(t));o.setSubfocus(e,!1)}},_onLeft:function(t){var e=this._findSubfocus(t),i=n(!1);return e.hasClass("gridcell")&&(i=e.prev(".gridcell")),1===i.length&&o.setSubfocus(i),!1},_onRight:function(t){var e=this._findSubfocus(t),i=n(!1);return e.hasClass("gridcell")&&(i=e.next(".gridcell")),1===i.length&&o.setSubfocus(i),!1},_onUp:function(t){var e=this._findSubfocus(t),i=n(!1),s=n(!1),r=n(!1);if(e.hasClass("gridcell")&&(i=e.closest(".gridrow"),1===i.length&&(s=i.prev(".gridrow")),1===s.length)){var a=e,l=-1;do l++,a=n(a.prev(".gridcell")[0]);while(a.length>0);for(r=n(s.find(".gridcell")[0]);l>0;)a=r.next(".gridcell"),a.length>0&&(r=n(a[0])),l--}return 1===r.length&&o.setSubfocus(r),!1},_onDown:function(t){var e=this._findSubfocus(t),i=n(!1),s=n(!1),r=n(!1);if(e.hasClass("gridcell")&&(i=e.closest(".gridrow"),i.length>0&&(s=i.next(".gridrow")),s.length>0)){var a=e,l=-1;do l++,a=n(a.prev(".gridcell")[0]);while(a.length>0);for(r=n(s.find(".gridcell")[0]);l>0;)a=r.next(".gridcell"),a.length>0&&(r=n(a[0])),l--}return 1===r.length&&o.setSubfocus(r),!1}}),n.extend(a.prototype,{navtype:"grid",navtype_tags:[]});var l=new a;return l}),define("stdnavPluginList",["require","exports","module","jquery","underscore","logger","stdnav"],function(t,e,i){"use strict";var n=t("jquery"),s=(t("underscore"),t("logger").register(i)),o=t("stdnav"),r=0,a=function(){r++,this.serial=r};n.extend(a.prototype,{zinit:function(t){return s.debug("stdnavPluginList.init("+t+")\n"),this},activate:function(){this.behavior={ariaprep:[this,this._ariaPrep,null],ariarefresh:[this,this._ariaRefresh,null],down:[this,this._onDown,null],fixfocus:[this,this._fixFocus,null],fixsuperfocus:[this,this._fixSuperfocus,null],inherit:!0,inheritable:!0,left:[this,this._onLeft,null],right:[this,this._onRight,null],up:[this,this._onUp,null],superfocusin:[o,o.basicSuperfocusIn,{maxdepth:1,focusSelector:"li",ghostfocus:!1}],superfocusout:[o,o.basicSuperfocusOut,{ghostfocus:!1}]},o.registerNavtype(this.navtype,this.behavior,this.navtype_tags)},deactivate:function(){o.unregisterNavtype("list",this.behavior)},_ariaPrep:function(t){this._ariaRefresh(t)},_ariaRefresh:function(t){var e=n(t);e.attr("role","application");var i=e.attr("aria-label"),s=e.attr("aria-labelledby"),r=e.children("li"),a=e.attr("js-itemplural");""!==a&&a||(a="items");var l=!1;if(o.nullOrUndefined(i)&&o.nullOrUndefined(s)){var u=r.find("a");u.length===r.length?(e.attr("aria-label","List of "+r.length+" links."),l=!0):e.attr("aria-label","List of "+r.length+a)}return n.each(r,function(t,e){var i=n(e),s=i.find("a");if(s.length>0){i.attr("role","link");var l=i.attr("aria-label"),u=i.attr("aria-labelledby");if(o.nullOrUndefined(l)&&o.nullOrUndefined(u)){var c=i.text();n(s[0]).text();l=c+". "+(t+1)+" of "+r.length+" "+a+".",i.attr("aria-label",l)}}}),null},_fixFocus:function(t){var e,i,s=n(t);if(s.is("ul,ol"))if(e=s.children("li .ghostfocus"),e.length>0)i=e[0];else{var o=s.children("li");i=o.length>0?o[0]:t}else if(s.is("li"))i=t;else{var r=s.closest("li");i=r.length>0?n(r[0]).prop["js-navigable"]===!1?s.closest("ul,ol"):r[0]:s.closest("ul,ol")}return i},_fixSubfocus:function(t){return null},_fixSuperfocus:function(t){var e,i=n(t).closest("ol,ul");return e=i.length>0?i[0]:null},_onClick:function(t){n(t).closest("ul, ol").focus(),o.setSubfocus(this._fixSubfocus(t))},_onSuperfocusIn:function(t){var e,i=n(t).children("li .ghostfocus");if(i.length>0)i.removeClass("ghostfocus"),e=i[0];else{var s=n(t).children('li[js-navigable!="false"]');e=s.length>0?s[0]:t}return e},_onSuperfocusOut:function(t){},_onLeft:function(t){var e=t,i=n(t).closest("ul,ol");if(i.hasClass("horizontal")){var s=n(t).prev("li");if(0===s.length){if("wrap"==i.attr("js-stdnav-wrap")){var o=i.children("li");o.length>0&&(e=o[o.length-1])}}else e=s[0]}return e},_onRight:function(t){var e=t,i=n(t).closest("ul,ol");if(i.hasClass("horizontal")){var s=n(t).next("li");if(0===s.length){if("wrap"==i.attr("js-stdnav-wrap")){var o=i.children("li");o.length>0&&(e=o[0])}}else e=s[0]}return e},_onUp:function(t){var e=t,i=n(t).closest("ul,ol");if(!i.hasClass("horizontal")){var s=n(t).prev("li");if(0===s.length){if("wrap"==i.attr("js-stdnav-wrap")){var o=i.children("li");o.length>0&&(e=o[o.length-1])}}else e=s[0]}return e},_onDown:function(t){var e=t,i=n(t).closest("ul,ol");if(!i.hasClass("horizontal")){var s=n(t).next("li");if(0===s.length){if("wrap"==i.attr("js-stdnav-wrap")){var o=i.children("li");o.length>0&&(e=o[0])}}else e=s[0]}return e}}),n.extend(a.prototype,{navtype:"list",navtype_tags:["UL","OL"]});var l=new a;return l}),define("stdnavPluginTable",["require","exports","module","jquery","underscore","logger","stdnav"],function(t,e,i){"use strict";var n=t("jquery"),s=(t("underscore"),t("logger").register(i)),o=t("stdnav"),r=0,a=function(){r++,this.serial=r};n.extend(a.prototype,{zinit:function(t){return s.debug("stdnavPluginTable.init("+t+")\n"),this},activate:function(){this.behavior={ariaprep:[this,this._ariaPrep,null],ariarefresh:[this,this._ariaRefresh,null],down:[this,this._onDown,null],fixfocus:[this,this._fixFocus,null],fixsuperfocus:[this,this._fixSuperfocus,null],inherit:!0,inheritable:!0,left:[this,this._onLeft,null],mousedown:[o,o.basicMouseDown],right:[this,this._onRight,null],up:[this,this._onUp,null],superfocusin:[o,o.basicSuperfocusIn,{maxdepth:4,focusSelector:"td",ghostfocus:!1}],superfocusout:[o,o.basicSuperfocusOut,{ghostfocus:!1}]},o.registerNavtype(this.navtype,this.behavior,this.navtype_tags)},deactivate:function(){o.unregisterNavtype(this.navtype,this.behavior)},_ariaPrep:function(t){this._ariaRefresh(t)},_ariaRefresh:function(t){var e=n(t);e.attr("role","application");var i=e.attr("aria-label"),s=e.attr("aria-labelledby"),r=e.find("td,th"),a=!1;if(o.nullOrUndefined(i)&&o.nullOrUndefined(s)){var l=r.find("a");l.length===r.length?(e.attr("aria-label","Table of "+r.length+" links."),a=!0):e.attr("aria-label","Table of "+r.length+" cells.")}return n.each(r,function(t,e){var i=n(e),s=i.find("a");if(s.length>0){i.attr("role","link");var r=i.attr("aria-label"),a=i.attr("aria-labelledby");if(o.nullOrUndefined(r)&&o.nullOrUndefined(a)){var l=i.text();n(s[0]).text();r=l,i.attr("aria-label",r)}}}),null},_findSubfocus:function(t){var e=n(t).closest("table"),i=e.find(".subfocus");return void 0!==i?n(i[0]):void 0},_getPreviousSection:function(t){var e,i=n(t).closest("thead,tbody,tfoot");if(void 0===i)return void 0;switch(i.prop("nodeType")){case"TFOOT":e=i.parent().children("TBODY");break;case"TBODY":e=i.parent().children("THEAD");break;case"THEAD":}return void 0!==e&&e.length>0?e[0]:void 0},_getNextSection:function(t){var e,i=n(t).closest("thead,tbody,tfoot");if(void 0===i)return void 0;switch(i.prop("nodeType")){case"THEAD":e=i.parent().children("TBODY");break;case"TBODY":e=i.parent().children("TFOOT");break;case"TFOOT":}return void 0!==e&&e.length>0?e[0]:void 0},_fixSuperfocus:function(t){var e,i=n(t).closest("table");return e=i.length>0?i[0]:null},_fixFocus:function(t){var e;switch(n(t).prop("nodeName")){case"TH":case"TD":e=t;break;case"TR":e=o.closestDescendant(t,"td,th .ghostfocus",null,1),void 0===e&&(e=o.closestDescendant(t,"td,th",null,1),void 0===e&&(e=n(t).prev("tr"),void 0===e&&(e=this._fixFocus(n(t).parent()))));break;case"THEAD":case"TBODY":case"TFOOT":if(e=o.closestDescendant(t,"td,th .ghostfocus",null,2),void 0===e&&(e=o.closestDescendant(t,"td,th",null,2),void 0===e)){var i=this._getNextSection(t);e=void 0===i?this._fixFocus(n(t).closest("table")):this._fixFocus(i)}break;case"COLGROUP":case"COL":e=this._fixFocus(n(t).closest("table"));break;case"CAPTION":e=this._fixFocus(n(t).closest("table"));break;case"TABLE":e=o.closestDescendant(t,"td,th .ghostfocus",null,5),void 0===e&&(e=o.closestDescendant(t,"td,th",null,5),void 0===e&&(e=t));break;default:e=this._fixFocus(n(t).closest("td,th,table"))}return e},_onSubfocusIn:function(t){var e=t;n(t).is("td")===!1&&(e=this._fixSubfocus(n(t)),o.setSubfocus(e,!1)),n.call(this,o.basicSubfocusIn,e)},_onLeft:function(t){var e=this._findSubfocus(t),i=n(!1);return e.is("td")&&(i=e.prev("td")),1===i.length?i:t},_onRight:function(t){var e=this._findSubfocus(t),i=n(!1);return e.is("td")&&(i=e.next("td")),1===i.length?i:t},_onUp:function(t){var e=this._findSubfocus(t),i=n(!1),s=n(!1),o=n(!1);if(e.is("td")&&(i=e.closest("tr"),1===i.length&&(s=i.prev("tr")),1==s.length)){var r=e,a=-1;do a++,r=n(r.prev("td")[0]);while(r.length>0);for(o=n(s.find("td")[0]);a>0;)r=o.next("td"),r.length>0&&(o=n(r[0])),a--}return 1===o.length?o:t},_onDown:function(t){var e=this._findSubfocus(t),i=n(!1),s=n(!1),o=n(!1);if(e.is("td")&&(i=e.closest("tr"),i.length>0&&(s=i.next("tr")),s.length>0)){var r=e,a=-1;do a++,r=n(r.prev("td")[0]);while(r.length>0);for(o=n(s.find("td")[0]);a>0;)r=o.next("td"),r.length>0&&(o=n(r[0])),a--}return 1===o.length?o:t}}),n.extend(a.prototype,{navtype:"table",navtype_tags:["TABLE"]});var l=new a;return l}),JSTooltip.addVar("SEPARATOR","@@"),JSTooltip.addVar("TOOLTIP_LABEL","tooltiplabel"),JSTooltip.addVar("TOOLTIP_TEXT","tooltiptext"),JSTooltip.addVar("TOOLTIP_TEMPLATE","tooltiptemplate"),JSTooltip.addVar("TOOLTIP_TEMPLATE_ID","jsTooltip"),JSTooltip.addVar("LABEL_PATTERN",".message.label"),JSTooltip.addVar("TEXT_PATTERN",".message:not(.label)"),JSTooltip.addMethod("_toAttribute",function(t,e){this.srcElement&&(e=xssUtil.escape(e),this.srcElement.writeAttribute(t,isArray(e)?e.join(this.SEPARATOR):e))}),JSTooltip.addMethod("_fromAttribute",function(t){if(this.srcElement&&this.srcElement.hasAttribute(t)){var e=this.srcElement.readAttribute(t);return e.include(this.SEPARATOR)?e.split(this.SEPARATOR):e}return null}),JSTooltip.addMethod("_setValues",function(t,e){t.each(function(t,i){e[i]&&t.update(xssUtil.escape(e[i]))})}),JSTooltip.addMethod("_calculateZIndex",function(t){function e(t){return parseInt(jQuery(t).css("z-index"))}var i=e(t);(!_.isNumber(i)||_.isNaN(i))&&(i=1e3);var n=_.flatten([this.srcElement,jQuery(this.srcElement).parents().toArray()]),s=_.reduce(n,function(t,i){var n=e(i);return _.isNumber(n)&&!_.isNaN(n)&&(t=Math.max(t,n)),t},i);return s+1}),JSTooltip.addMethod("_escapeText",function(t){return _.isArray(t)?_.map(t,function(t){return xssUtil.escape(t)}):xssUtil.escape(t)}),JSTooltip.addMethod("show",function(t){t&&(this.offsets=t),this._element=$(this.templateId);var t;this.showBelow?(t=getBoxOffsets(this.srcElement),t[1]+=this.srcElement.clientHeight+5):t=[getScrollLeft()+5,getScrollTop()+5],this.offsets&&(t[0]+=this.offsets[0],t[1]+=this.offsets[1]),this._element.setStyle({position:"absolute",left:t[0]+"px",top:t[1]+"px",zIndex:this._calculateZIndex(this._element)});var e=this._element.select(this.LABEL_PATTERN),i=this._element.select(this.TEXT_PATTERN);if(this.label&&this._setValues(e,isArray(this.label)?this.label:[this.label]),this.text&&this._setValues(i,isArray(this.text)?this.text:[this.text]),this._element.removeClassName(layoutModule.HIDDEN_CLASS),t[0]+this._element.clientWidth>jQuery(window).width()){var n=t[0]-this._element.clientWidth>0?t[0]-this._element.clientWidth:15;this._element.setStyle({left:n+"px"})}if(t[1]+this._element.clientHeight>jQuery(window).height()){var s=t[1]-this._element.clientHeight-10;this._element.setStyle({top:s+"px"})}return this.loadTextCallback&&!this.loadTextExecuted&&(this.loadTextExecuted=!0,this.loadTextCallback(this)),this}),JSTooltip.addMethod("updateText",function(t){this.text=this._escapeText(t),this.show()}),JSTooltip.addMethod("hide",function(){this._element&&this._element.addClassName(layoutModule.HIDDEN_CLASS)}),JSTooltip.addMethod("disable",function(){tooltipModule.hideJSTooltip(this.srcElement),this.disabled=!0}),JSTooltip.addMethod("enable",function(){this.disabled=!1,tooltipModule.showJSTooltip(this.srcElement,this.offsets)}),JSTooltip.addMethod("remove",function(){var t=tooltipModule.tooltips.indexOf(this.srcElement.jsTooltip);-1!==t&&(tooltipModule.hideJSTooltip(this.srcElement),tooltipModule.tooltips.splice(t,1)),this.removed=!0}),JSTooltip.addMethod("isRemoved",function(){return this.removed});var tooltipModule={TOOLTIP_PATTERN:"*[tooltiptext] > *",ELEMENT_WITH_TOOLTIP_PATTERN:"*[tooltiptext]",actualX:0,actualY:0,tooltips:[],showJSTooltip:function(t,e){if(t.jsTooltip){if(!t.jsTooltip.disabled){this.actualX=e[0],this.actualY=e[1],this.cleanUp();var i=jQuery(t).attr("tooltipappeardelay");i=i?parseInt(i):1e3,t.jsTooltip.timer&&clearTimeout(t.jsTooltip.timer),t.jsTooltip.timer=setTimeout(function(){t.jsTooltip.show([tooltipModule.actualX,tooltipModule.actualY])},i),jQuery(t).on("mousemove",function(t){tooltipModule.actualX=t.clientX,tooltipModule.actualY=t.clientY})}}else t.jsTooltip=new JSTooltip(t,{})},hideJSTooltip:function(t){t&&t.jsTooltip&&(t.jsTooltip.timer&&clearTimeout(t.jsTooltip.timer),t.jsTooltip.hide(),jQuery(t).off("mousemove"))},cleanUp:function(){if(this.tooltips&&this.tooltips.length>0){var t=[],e="fuigasuifdughaiadbvguaidbapvuwbev";this.tooltips.each(function(i){i.srcElement.id&&document.getElementById(i.srcElement.id)||(i.srcElement.setAttribute("id",e),document.getElementById(e)||(i.hide(),t.push(i)),i.srcElement.setAttribute("id",null))}),t.length>0&&(this.tooltips=this.tooltips.reject(function(e){return t.include(e)}))}}};define("components.tooltip",["jquery","prototype","underscore","utils.common","core.layout"],function(t){return function(){var e;return e||t.JSTooltip}}(this)),document.observe(isSupportsTouch()?"drag:touchstart":"drag:mousedown",function(t){var e=t.memo.targetEvent.element();if(!isSupportsTouch()||!event.treeEvent&&!event.listEvent){var i=matchMeOrUp(e,layoutModule.LIST_ITEM_PATTERN);i&&!e.match(layoutModule.DISCLOSURE_BUTTON_PATTERN)&&buttonManager.down(i,function(t){return $(t).down(layoutModule.LIST_ITEM_WRAP_PATTERN)}),e.match(layoutModule.DISCLOSURE_BUTTON_PATTERN)&&buttonManager.down(e)}});var buttonManager={over:function(t,e){if(t&&!this.isSelected(t)){var i=e?e(t):t;$(i).addClassName(layoutModule.HOVERED_CLASS)}},out:function(t,e){if(t){var i=e?e(t):t;$(i).removeClassName(layoutModule.HOVERED_CLASS).removeClassName(layoutModule.PRESSED_CLASS)}},down:function(t,e){if(t&&!this.isSelected(t)){var i=e?e(t):t;$(i).removeClassName(layoutModule.HOVERED_CLASS).addClassName(layoutModule.PRESSED_CLASS)}},up:function(t,e){if(t&&!this.isSelected(t)){var i=e?e(t):t;i=$(i),i.removeClassName(layoutModule.PRESSED_CLASS),!isIPad()&&i.addClassName(layoutModule.HOVERED_CLASS)}},disable:function(t){t&&(buttonManager.out(t),$(t).writeAttribute(layoutModule.DISABLED_ATTR_NAME,layoutModule.DISABLED_ATTR_NAME))},enable:function(t){t&&(buttonManager.out(t),$(t).writeAttribute(layoutModule.DISABLED_ATTR_NAME,null))},isDisabled:function(t){return t?$(t).readAttribute(layoutModule.DISABLED_ATTR_NAME)===layoutModule.DISABLED_ATTR_NAME||$(t).hasClassName(layoutModule.DISABLED_CLASS):void 0},unSelect:function(t){t&&$(t).removeClassName(layoutModule.SELECTED_CLASS)},select:function(t){t&&$(t).addClassName(layoutModule.SELECTED_CLASS)},isSelected:function(t,e){if(t){var i=e?e(t):$(t),n=i.up("li");return n&&n.hasClassName(layoutModule.SELECTED_CLASS)}return!1}};document.observe("mouseup",function(t){if(isRightClick(t)){var e=t.element();document.fire(layoutModule.ELEMENT_CONTEXTMENU,{targetEvent:t,node:e})}}),document.observe("contextmenu",function(t){return Event.stop(t),!1}),document.observe("dom:loaded",function(t){isIE()&&document.body.setAttribute("oncontextmenu","return false"),jQuery("body").on("mouseover mouseout",layoutModule.BUTTON_PATTERN,function(t){hasDisabledAttributeSet(this)||("mouseover"==t.type?buttonManager.over(this):buttonManager.out(this))}),jQuery("body").on("focus",layoutModule.BUTTON_PATTERN,function(t){hasDisabledAttributeSet(this)||buttonManager.over(this)}),jQuery("body").on("blur",layoutModule.BUTTON_PATTERN+"."+layoutModule.HOVERED_CLASS,function(t){hasDisabledAttributeSet(this)||buttonManager.out(this)}),jQuery("body").on("mousedown mouseup touchstart touchend",[layoutModule.BUTTON_PATTERN,layoutModule.MENU_LIST_PATTERN,layoutModule.DISCLOSURE_BUTTON_PATTERN,layoutModule.META_LINKS_PATTERN].join(","),function(t){"mousedown"==t.type||"touchstart"==t.type?!hasDisabledAttributeSet(this)&&buttonManager.down(this):!hasDisabledAttributeSet(this)&&buttonManager.up(this),("mouseup"==t.type||"touchend"==t.type)&&(this.parentNode.id==layoutModule.MAIN_NAVIGATION_HOME_ITEM_ID&&primaryNavModule.navigationOption("home"),this.parentNode.id==layoutModule.MAIN_NAVIGATION_LIBRARY_ITEM_ID&&primaryNavModule.navigationOption("library"))}),jQuery("#frame").on("touchend mouseup",".minimize",function(t){this.parentNode.className.indexOf("maximized")>=0?layoutModule.minimize(this):layoutModule.maximize(this),t.preventDefault()}),jQuery("#frame").on("touchend mouseup",layoutModule.TABSET_TAB_PATTERN,function(t){if(!hasDisabledAttributeSet(this)&&"true"!==jQuery(this.parentNode).attr("disableCoreEvents")){jQuery(this).siblings().removeClass(layoutModule.SELECTED_CLASS).each(function(t,e){jQuery(jQuery(this).attr("tabId")).addClass("hidden")}),jQuery(this).addClass(layoutModule.SELECTED_CLASS),jQuery(jQuery(this).attr("tabId")).removeClass("hidden");var e=jQuery(this).closest(".tabs").find(".control.tabSet.anchor");"#attributesTab"===jQuery(this).attr("tabId")?e.addClass("attributesAnchor"):e.removeClass("attributesAnchor")}}),jQuery("#"+layoutModule.META_LINK_LOGOUT_ID).on("mousedown touchstart",function(t){t.preventDefault(),primaryNavModule.navigationOption("logOut")}),jQuery("body").on("mouseover mouseout click","[tooltiptext]",function(t){("mouseout"==t.type||"click"==t.type)&&tooltipModule.hideJSTooltip(this),"mouseover"==t.type&&tooltipModule.showJSTooltip(this,[t.clientX,t.clientY])}),jQuery("#mainNavigation").on("mouseover",layoutModule.NAVIGATION_MUTTON_PATTERN,function(t){primaryNavModule.showNavButtonMenu(t,this)}),isSupportsTouch()&&(document.body.addEventListener("touchstart",function(t){window.calendar&&window.calendar.hide&&!window.calendar.hidden&&window.calendar.hide(),"undefined"!=typeof TouchController&&(TouchController.element_scrolled=!1)},!1),document.body.addEventListener("touchmove",function(t){},!1)),jQuery("#filePath").on("mouseenter mouseout",function(){jQuery("#fake_upload_button").toggleClass("over")})}),define("core.events.bis",["jquery","prototype","utils.common","core.layout","components.tooltip"],function(t){return function(){var e;return e||t.buttonManager}}(this)),"undefined"==typeof localContext&&(localContext=window);var actionModel={};actionModel.SIMPLE_ACTION="simpleAction",actionModel.SELECT_ACTION="selectAction",actionModel.INPUT_ACTION="inputAction",actionModel.OPTION_ACTION="optionAction",actionModel.SEPARATOR="separator",actionModel.SINGLE_SELECT_CONSTRAINT="singleSelect",actionModel.HIGH_Z_INDEX=99999,actionModel.RES_LABEL="$label",actionModel.RES_ID="$id",actionModel.RES_SELECTED="$selected",actionModel.EVENT="$event",actionModel.selObjects=[],actionModel.lastItemWasSeparator=!1,actionModel.noItemsYet=!0,actionModel.data=null,actionModel.openedSubMenus=[],actionModel.parentMenu="",actionModel.menuDom=null,actionModel.menuListDom=null,actionModel.PARENT_MENU_CONTAINER="menuList",actionModel.PARENT_MENU_STYLE="menu vertical context hidden",actionModel.SIMPLE_ACTION_DOM_ID="menuList_simpleAction",actionModel.SEPARATOR_DOM_ID="menuList_separator",actionModel.FLYOUT_PARENT_DOM_ID="menuList_flyout",actionModel.EXTRA_INPUT_DOM_ID="menuList_extraInput",actionModel.LIST_ITEM_DOM_ID="menuList_listItem",actionModel.DISPLAY_STYLE="inline",actionModel.DROP_DOWN_MENU_CLASS="dropDown",actionModel.MOUSE_OUT_PATTERNS=["#"+layoutModule.MENU_ID,"."+layoutModule.MENU_ROOT_CLASS,".toolbar .capsule",".header > .button.mutton","#"+layoutModule.MENU_ID+" *",layoutModule.MENU_ROOT_CLASS+" *"],actionModel.showDynamicMenu=function(t,e,i,n,s,o){if(null==t){if(!isProVersion())return;var r=designerBase.getSelectedObject();if(!r||!r.menuLevel)return;t=r.menuLevel}actionModel.resetMenu(),actionModel.updateCSSClass(i),actionModel.initActionModelData(s),actionModel.assembleMenuFromActionModel(t,e,actionModel.menuListDom,o),actionModel.setMenuPosition(actionModel.menuDom,e,n),actionModel.setMenuEventHandlers(actionModel.menuDom),isIE()&&jQuery("#"+actionModel.menuDom.id).prepend('<div class="msshadow"></div>'),actionModel.makeMenuVisible(actionModel.menuDom),isIE7()&&setWidthStyleByReflection(actionModel.menuDom,".content"),actionModel.adjustMenuPosition(actionModel.menuDom),jQuery(actionModel.MOUSE_OUT_PATTERNS.join(",")).on("mouseout",actionModel.closeHandler)},actionModel.closeHandler=function(t){var e=jQuery(t.relatedTarget);(e.hasClass("mutton")||e.parents(".mutton").length)&&t.relatedTarget||"menu"===e.attr("id")||e.parents("#menu").length||(jQuery("body").trigger("actionmodel-mouseout"),actionModel.hideMenu())},actionModel.resetMenu=function(){var t=$("menu");t.parentId=void 0,t.setAttribute("tabIndex",-1),t.childElements().each(function(t){Element.remove(t)}),t.innerHTML=$("commonMenu").cloneNode(!0).innerHTML;var e=t.down("ul"),i=e.readAttribute("id");e.writeAttribute("id",actionModel.updateTemplateId(i)),t.className=actionModel.PARENT_MENU_STYLE,t.writeAttribute("style",""),actionModel.menuDom=t,actionModel.menuListDom=e,actionModel.lastInputSrc="none"},actionModel.updateTemplateId=function(t){var e=new RegExp("_template");return t.replace(e,"")},actionModel.updateCSSClass=function(t){isNotNullORUndefined(t)&&($(actionModel.menuDom).className=t+" hidden")},actionModel.setMenuPosition=function(t,e,i){var n,s=e?e:window.event;n=s?isSupportsTouch()&&s.changedTouches?{x:s.changedTouches[0].pageX+20,y:s.changedTouches[0].pageY}:Event.pointer(s):{x:0,y:0};var o,r;isNotNullORUndefined(i)?(o=isNotNullORUndefined(i.menuLeft)?i.menuLeft:n.x,r=isNotNullORUndefined(i.menuTop)?i.menuTop:n.y):(o=n.x,r=n.y),t.setStyle({left:o+"px",top:r+"px"})},actionModel.adjustMenuPosition=function(t,e,i,n,s){(!$(t).hasClassName(this.DROP_DOWN_MENU_CLASS)||$(t).hasClassName("fitable"))&&fitObjectIntoScreen(t,null,i,null,s)},actionModel.assembleMenuFromActionModel=function(t,e,i,n){actionModel.noItemsYet=!0;var s=actionModel.data[t];n&&(s=n(t,s)),s.each(function(t){actionModel.appendToMenu(t,e,i)}),actionModel.removeTrailingSeparator()},actionModel.initActionModelData=function(t){"navigationActionModel"===t?actionModel.data=primaryNavModule.JSON:actionModel.data=_.isString(t)?jQuery("#"+t).html().evalJSON():t},actionModel.appendToMenu=function(t,e,i){if(actionModel.passesClientTest(t)){var n=getMenuMouseupFunction(getAsFunction(t.action),t.actionArgs,t.text,t.id,e);actionModel.appendDesiredRowType(t,e,n,i)}},actionModel.appendDesiredRowType=function(t,e,i,n){var s=function(){actionModel.isMenuShowing()&&actionModel.hideMenu(),i&&i()};t.type==actionModel.SIMPLE_ACTION&&actionModel.addSimpleActionRow(t,s,n),t.type!=actionModel.SEPARATOR||actionModel.lastItemWasSeparator||actionModel.addSeparatorRows(t,n),t.type==actionModel.SELECT_ACTION&&actionModel.addSelector(t,n,e),t.type==actionModel.OPTION_ACTION&&actionModel.addOption(t,s,n)},actionModel.addSimpleActionRow=function(t,e,i){var n=null;n=t.className&&"requiresInput"==t.className?$(actionModel.EXTRA_INPUT_DOM_ID).cloneNode(!0):$(actionModel.SIMPLE_ACTION_DOM_ID).cloneNode(!0),isSupportsTouch()?n.ontouchend=e:n.onmouseup=e,n.onmouseup_saved=e;var s=$(n).down(".button"),o=document.createTextNode(t.text);o.nodeValue=replaceNbsps(o.nodeValue),s.appendChild(o);var r=n.readAttribute("id")+getRandomId();n.writeAttribute("id",r),actionModel.insertMenuRow(i,n,!1,t.isDisabled,t.id,null)},actionModel.addSeparatorRows=function(t,e){var i=null;if(!actionModel.noItemsYet){var n=$(actionModel.SEPARATOR_DOM_ID).cloneNode(!0),s=n.readAttribute("id")+getRandomId();n.writeAttribute("id",s),t.className&&(i=t.className),actionModel.insertMenuRow(e,n,!0,t.isDisabled,null,i)}},actionModel.addOption=function(t,e,i){if(actionModel.passesClientTest(t)){var n=null,s=$(actionModel.LIST_ITEM_DOM_ID).cloneNode(!0);t.button=t.button&&"true"==String(t.button).toLowerCase()?!0:!1,isSupportsTouch()?s.ontouchend=e:s.onmouseup=e,s.onmouseup_saved=e;var o=$(s).down(".button"),r=document.createTextNode(t.text);r.nodeValue=replaceNbsps(r.nodeValue),o.appendChild(r);var a=s.readAttribute("id")+getRandomId();s.writeAttribute("id",a),t.className&&(n=t.className),!t.button&&evaluateTest(t.isSelectedTest,t.isSelectedTestArgs,t.text,t.id,!1,!1)&&o.addClassName("down"),actionModel.insertMenuRow(i,s,!1,t.isDisabled,t.id,n)}},actionModel.addSelector=function(t,e,i){var n,s=t.className;if("flyout"==s){if(t&&t.children.length>0){n=$(actionModel.FLYOUT_PARENT_DOM_ID).cloneNode(!0);var o=$(n).down(".button"),r=document.createTextNode(t.text);r.nodeValue=replaceNbsps(r.nodeValue),o.appendChild(r);var a=n.readAttribute("id")+getRandomId();n.writeAttribute("id",a),actionModel.insertMenuRow(e,n,!1,t.isDisabled,t.id,null);var l=actionModel.menuDom.cloneNode(!1);l.writeAttribute("id",n.readAttribute("id")+"_subMenu"),l.innerHTML=$("commonMenu").cloneNode(!0).innerHTML;var u=l.down("ul"),c=u.readAttribute("id");u.writeAttribute("id",actionModel.updateTemplateId(c)),n.appendChild(l);var h=l.select("ul")[0],d=h.writeAttribute("id",h.readAttribute("id")+"_subMenu");actionModel.buildSubMenu(t,d,i)}}else t.children.each(function(t){var n=getMenuMouseupFunction(getAsFunction(t.action),t.actionArgs,t.text,t.id,i);actionModel.appendDesiredRowType(t,i,n,e)})},actionModel.getSubMenuLeft=function(t){var e=$(t).up(2).clientWidth,i=Math.abs(parseInt($(t).up(1).offsetLeft));return e+i},actionModel.getSubMenuTop=function(t){return Math.abs(parseInt($(t).offsetTop))},actionModel.showChildSubmenu=function(t){var e,i,n=t.parentNode.parentNode.parentNode.id,s=!1;for(e=0;e<actionModel.openedSubMenus.length;e++)actionModel.openedSubMenus[e]==n&&(i=e,
  s=!0,jQuery("#"+n+">div.content>ul").children("li.node").each(function(){actionModel.hideChildSubmenu(jQuery(this).get(0))})),s&&jQuery("#"+actionModel.openedSubMenus[e]+">div.content>ul").children("li.node").each(function(){actionModel.hideChildSubmenu(jQuery(this).get(0))});actionModel.openedSubMenus.splice(i,actionModel.openedSubMenus.length-i);var o=null,r=null,a=null,l=20,u=t.childElements()[1];u.setStyle({display:actionModel.DISPLAY_STYLE}),u.setStyle({position:"absolute"});var c=actionModel.getSubMenuLeft(t),h=0;u.setStyle({left:c+"px",top:h+"px"}),isIE()&&jQuery(u).prepend('<div class="msshadow"></div>'),actionModel.makeMenuVisible(u),isIE7()&&setWidthStyleByReflection(u,".content"),o=$(u).cumulativeOffset()[1],r=$(u).getHeight();var d=getWindowHeight(),p=o+r;p>d&&(h=d-p-l,u.setStyle({top:h+"px"}));var f=u.cumulativeOffset()[0];a=u.getWidth(),getWindowWidth()<f+a&&u.setStyle({left:"-"+a+"px"}),actionModel.openedSubMenus.push(n)},actionModel.hideChildSubmenu=function(t){var e=t.childElements()[1];e.setStyle({display:"none"}),e.setStyle({position:"absolute"}),e.setStyle({left:0}),actionModel.makeMenuInVisible($(e))},actionModel.makeMenuVisible=function(t){var e=t.down("ul");e.childElements().length>0&&(t.setStyle({zIndex:actionModel.HIGH_Z_INDEX}),$(t).removeClassName("hidden"))},actionModel.makeMenuInVisible=function(t){t.addClassName("hidden")},actionModel.buildSubMenu=function(t,e,i){t.children.each(function(t){actionModel.appendToMenu(t,i,$(e))})},actionModel.isMenuShowing=function(){return!("none"==$("menu").getStyle("display")||$("menu").hasClassName("hidden"))},actionModel.updateRowDom=function(t,e){if(t){t.innerHTML=e;var i=t.readAttribute("id")+getRandomId();t.writeAttribute("id",i)}return t},actionModel.launchNewMenu=function(){actionModel.hideMenu(),alert("action not implemented...")},actionModel.insertMenuRow=function(t,e,i,n,s,o){null==e.readAttribute("id")&&(s?e.setAttribute("id",s):e.identify()),n&&actionModel.disableMenuOption(e),o&&e.addClassName(o),t.appendChild(e),actionModel.lastItemWasSeparator=i,actionModel.noItemsYet=!1},actionModel.disableMenuOption=function(t){buttonManager.disable(t),_.isEmpty(t.childNodes)&&buttonManager.disable(t.childNodes[0])},actionModel.passesClientTest=function(t){var e,i=!0;if(t.clientTest){e=t.clientTest;var n=!1;e.startsWith("!")&&(e=t.clientTest.sub("!",""),n=!0),i=evaluateTest(e,t.clientTestArgs,t.text,t.id,n,null)}var s=actionModel.selObjects;return _.isEmpty(s)||i&&t.selectionConstraint&&(i=t.selectionConstraint==actionModel.SINGLE_SELECT_CONSTRAINT?1==s.length:s.length>1),i},actionModel.removeTrailingSeparator=function(){var t=actionModel.menuListDom.lastChild;if($(t)&&!actionModel.noItemsYet){var e=t.identify(),i=new RegExp("w*separatorw*");i.test(e)&&t.remove()}},actionModel.getMenuParent=function(){return $(actionModel.menuDom.parentId)},actionModel.getFirstMenuButton=function(){return actionModel.menuDom.down(layoutModule.BUTTON_PATTERN,0)},actionModel.focusMenu=function(){var t=jQuery("#"+actionModel.menuDom.id);if(!jQuery.contains(t,document.activeElement)){actionModel.lastFocused=document.activeElement;var e=t.find(layoutModule.BUTTON_PATTERN);e.length>0&&$(e[0]).focus()}},actionModel.showDropDownMenu=function(t,e,i,n,s){e=jQuery(e);var o=e.offset(),r={menuLeft:o.left,menuTop:o.top+e.height()-1};actionModel.showDynamicMenu(i,t,n,r,s)},actionModel.setMenuEventHandlers=function(t){t.select("li").each(function(t){t.hasClassName("disabled")||t.hasClassName("node")&&(isSupportsTouch()?Event.observe(t,"touchstart",function(e){e.firstCall||actionModel.showChildSubmenu(t),e.firstCall=!0}):(Event.observe(t,"mouseenter",function(e){actionModel.showChildSubmenu(t)}),Event.observe(t,"mouseleave",function(e){actionModel.hideChildSubmenu(t)})))})},actionModel.initializeOneTimeMenuHandlers=function(){},actionModel.hideMenu=function(){if(actionModel.isMenuShowing()){var t=function(){var t=actionModel.lastFocused;try{t&&t.focus()}catch(e){}};!isSupportsTouch()&&setTimeout(t,0),actionModel.makeMenuInVisible($("menu")),jQuery(actionModel.MOUSE_OUT_PATTERNS.join(",")).off("mouseout",actionModel.closeHandler)}},actionModel.createMenuElement=function(t,e){if(!t)throw new Error("Can not construct actionModel object: type can not be empty");return Object.extend({type:t},e)},actionModel.setSelected=function(t){actionModel.selObjects=t},define("actionModel.modelGenerator",["prototype","utils.common","core.events.bis"],function(t){return function(){var e;return e||t.actionModel}}(this));var primaryNavModule={NAVIGATION_MENU_CLASS:"menu vertical dropDown",ACTION_MODEL_TAG:"navigationActionModel",CONTEXT_POSTFIX:"_mutton",NAVIGATION_MUTTON_DOM_ID:"navigation_mutton",NAVIGATION_MENU_PARENT_DOM_ID:"navigationOptions",JSON:null,navigationPaths:{browse:{url:"flow.html",params:"_flowId=searchFlow"},home:{url:"home.html"},library:{url:"flow.html",params:"_flowId=searchFlow&mode=library"},logOut:{url:"exituser.html"},search:{url:"flow.html",params:"_flowId=searchFlow&mode=search"},report:{url:"flow.html",params:"_flowId=searchFlow&mode=search&filterId=resourceTypeFilter&filterOption=resourceTypeFilter-reports&searchText="},jobs:{url:"scheduler/main.html"},olap:{url:"flow.html",params:"_flowId=searchFlow&mode=search&filterId=resourceTypeFilter&filterOption=resourceTypeFilter-view&searchText="},event:{url:"flow.html",params:"_flowId=logEventFlow"},samples:{url:"flow.html",params:"_flowId=sampleFlow&page=dialogs"},adminHome:{url:"flow.html",params:"_flowId=adminHomeFlow"},organization:{url:"flow.html",params:"_flowId=tenantFlow"},etl:{url:"etl"},mondrianProperties:{url:"olap/properties.html"},flush:{url:"olap/flush.html"},user:{url:"flow.html",params:"_flowId=userListFlow"},role:{url:"flow.html",params:"_flowId=roleListFlow"},analysisOptions:{url:"flow.html",params:"_flowId=mondrianPropertiesFlow"},designerOptions:{url:"flow.html",params:"_flowId=designerOptionsFlow"},designerCache:{url:"flow.html",params:"_flowId=designerCacheFlow"},awsSettings:{url:"flow.html",params:"_flowId=awsSettingsFlow"},designer:{url:"flow.html",params:"_flowId=adhocFlow"},dashboard:{url:"dashboard/designer.html"},legacyDashboard:{url:"flow.html",params:"_flowId=dashboardDesignerFlow&createNew=true"},domain:{url:"flow.html",params:"_flowId=createSLDatasourceFlow&ParentFolderUri="},dataSource:{url:"flow.html",params:"_flowId=addDataSourceFlow&ParentFolderUri="+encodeURIComponent("/datasources")},logSettings:{url:"log_settings.html"},createReport:{url:"view/view/modules/adhoc/createReport"}},bodyIds:{designer:"designerBase.confirmAndLeave",dashboardDesigner:"designerBase.confirmAndLeave",repoBrowse:"repositorySearch.confirmAndLeave",repoSearch:"repositorySearch.confirmAndLeave",manage_users:"orgModule.confirmAndLeave",manage_roles:"orgModule.confirmAndLeave",manage_orgs:"orgModule.confirmAndLeave",domainDesigner_tables:"domain.designer.confirmAndLeave",domainDesigner_derivedTables:"domain.designer.confirmAndLeave",domainDesigner_joins:"domain.designer.confirmAndLeave",domainDesigner_calculatedFields:"domain.designer.confirmAndLeave",domainDesigner_filters:"domain.designer.confirmAndLeave",domainDesigner_display:"domain.designer.confirmAndLeave",dataChooserDisplay:"domain.chooser.confirmAndLeave",dataChooserFields:"domain.chooser.confirmAndLeave",dataChooserPreFilters:"domain.chooser.confirmAndLeave",dataChooserSaveAsTopic:"domain.chooser.confirmAndLeave",reportViewer:"Report.confirmAndLeave"},globalActions:{logOut:function(t){return primaryNavModule.bodyIds[t]}},initializeNavigation:function(){var t,e,i;this.JSON=$("navigationActionModel").text?$("navigationActionModel").text.evalJSON():{};var n=/[A-Za-z]+[_]{1}[A-Za-z]+/;for(t in this.JSON)if(e=n.exec(t)[0],i=this.JSON[t][0],isNotNullORUndefined(i))this.createMutton(e,i.text);else if("main_home"===e||"main_library"===e){var s=$(e);s&&$(s).removeClassName("hidden")}},createMutton:function(t,e){var i=$(this.NAVIGATION_MUTTON_DOM_ID).cloneNode("true"),n=$(i).down(".button");$(i).setAttribute("id",t);var s=document.createTextNode(e);n.appendChild(s);var o=$(this.NAVIGATION_MENU_PARENT_DOM_ID);o&&o.appendChild(i)},showNavButtonMenu:function(t,e){var i=jQuery(e).attr("id");actionModel.showDropDownMenu(t,e,i+this.CONTEXT_POSTFIX,this.NAVIGATION_MENU_CLASS,this.ACTION_MODEL_TAG),$("menu").parentId=i},isNavButton:function(t){return $(t).hasClassName("mutton")||$(t).hasClassName("icon")},setNewLocation:function(t,e){var i=this.navigationPaths[t],n=e||i.params;i&&(n=n?"?"+n:"",window.location.href=__jrsConfigs__.urlContext+"/"+i.url+n)},navigationOption:function(t){var e=$(document.body).readAttribute("id"),i=null;if(primaryNavModule.globalActions[t]?i=primaryNavModule.globalActions[t](e):primaryNavModule.bodyIds[e]&&(i=primaryNavModule.bodyIds[e]),i){var n=getAsFunction(i),s=n();if("function"==typeof s)return void s(function(){primaryNavModule.setNewLocation(t)});if(!s)return}primaryNavModule.setNewLocation(t)},onMenuHeaderMouseOver:function(t,e){this.showNavButtonMenu(t,e)}};define("actionModel.primaryNavigation",["actionModel.modelGenerator"],function(t){return function(){var e;return e||t.primaryNavModule}}(this)),define("stdnavPluginActionMenu",["require","exports","module","jquery","underscore","logger","stdnav","actionModel.modelGenerator","core.events.bis","core.layout","actionModel.primaryNavigation"],function(t,e,i){"use strict";var n=t("jquery"),s=t("underscore"),o=t("logger").register(i),r=t("stdnav"),a=t("actionModel.modelGenerator"),l=t("core.events.bis"),u=t("core.layout"),c=t("actionModel.primaryNavigation"),h=0,d=function(){h++,this.serial=h,this.menu_item_callbacks={click:{}}};s.extend(d.prototype,{zinit:function(t){return this},activate:function(){this.behavior={down:[this,this._onDown,null],enter:null,exit:null,fixfocus:[this,this._fixFocus,null],fixsubfocus:[this,this._fixFocus,null],fixsuperfocus:[this,this._fixSuperfocus,null],focusin:[this,this._onFocusIn,null],focusout:[this,this._onFocusOut,null],left:[this,this._onLeft,null],right:[this,this._onRight,null],superfocusout:[this,this._onSuperfocusOut,null],up:[this,this._onUp,null],inherit:!1,inheritable:!0},r.registerNavtype(this.navtype,this.behavior,this.navtype_tags)},deactivate:function(){r.unregisterNavtype(this.navtype,this)},_fixFocus:function(t){var e,i=n(t);if(i.is("div,ul,ol")){var s=i.find(".pressed");s.length>0?e=s[0]:(s=i.find("li"),e=s.length>0?s[0]:t)}else if(i.is("li"))e=t;else{var o=i.closest("li");o.length>0?e=n(o[0]).prop["js-navigable"]===!1?i.closest("ul,ol"):o[0]:(e=i.closest("ul,ol"),e=i.find("li"),e.length>0&&(e=e[0]))}return e},_fixSuperfocus:function(t){var e,i=n(t).closest(".menuRoot,.dropDown");return e=i.length>0?i[0]:null},_onFocusIn:function(t){var e,i=(n(t),n(t));if(i.length>0){var s=i.closest(u.NAVIGATION_PATTERN);if(s.length>0)l.over(s.find(u.BUTTON_PATTERN)[0]),e=s.closest(u.NAVIGATION_MUTTON_PATTERN),e.length>0?c.showNavButtonMenu(null,e[0]):a.hideMenu();else{var s=i.closest(u.MENU_LIST_PATTERN);s.length>0&&(l.over(s.find(u.BUTTON_PATTERN)[0]),e=s.closest(u.NAVIGATION_MUTTON_PATTERN))}}return t},_onFocusOut:function(t){var e=n(t).closest(u.NAVIGATION_PATTERN);if(e.length>0)this.lastMenuBarItem!==t&&l.out(e.find(u.BUTTON_PATTERN)[0]);else{var e=n(t).closest(u.MENU_LIST_PATTERN);e.length>0&&l.out(e.find(u.BUTTON_PATTERN)[0])}return null},_onSuperfocusOut:function(t){var e=(n(t),n("#"+u.MAIN_NAVIGATION_ID));if(e.length<1)return t;var i=n(document.activeElement);if(i.closest(".dropDown").length<1){var s=e.find("."+u.HOVERED_CLASS);s.length>0&&l.out(s[0])}},_focus_prev_menu_entry:function(t){var e,i=!1;if(t.hasClass("node")&&!t.children(".menu").hasClass("is-closed")&&(i=!0),e=t.prev(),0===e.length)for(e=t;e.next().length>0;)e=e.next();o.debug("Granting focus to "+e.attr("id")),r.setSubfocus(e)},_focus_next_menu_entry:function(t){var e,i=!1;if(t.hasClass("node")&&!t.children(".menu").hasClass("is-closed")&&(i=!0),e=t.next(),0===e.length)for(e=t;e.prev().length>0;)e=e.prev();o.debug("Granting focus to "+e.attr("id")),r.setSubfocus(e)},_onSubfocusIn:function(t){if("li"===n(t).prop("nodeName")==!1){var e=this._fixSubfocus(t);r.setSubfocus(e,!1)}},_onExit:function(t){n(t).closest(".menuRoot").focus()},_onLeft:function(t){var e=n(t).closest(u.NAVIGATION_PATTERN),i=n(t);return e.length>0?i=e.prev(u.NAVIGATION_PATTERN):(e=n(t).closest(u.MENU_LIST_PATTERN),e.length>0&&(i=n(this.lastMenuBarItem).prev(u.NAVIGATION_PATTERN),this.lastMenuBarItem=null)),i.length>0?i[0]:t},_onRight:function(t){var e=n(t).closest(u.NAVIGATION_PATTERN),i=n(t);return e.length>0?i=e.next(u.NAVIGATION_PATTERN):(e=n(t).closest(u.MENU_LIST_PATTERN),e.length>0&&(i=n(this.lastMenuBarItem).next(u.NAVIGATION_PATTERN),this.lastMenuBarItem=null)),i.length>0?i[0]:t},_onUp:function(t){var e=n(t),i=n(document.activeElement).closest("."+a.DROP_DOWN_MENU_CLASS);if(!(i.length>0))return t;var s=n(document.activeElement).closest(u.MENU_LIST_PATTERN);for(e=s.prev(u.MENU_LIST_PATTERN);e.is(u.SEPARATOR_PATTERN);)e=e.prev(u.MENU_LIST_PATTERN);return e.length<1&&(e=n(this.lastMenuBarItem),this.lastMenuBarItem=null),e.length>0?e[0]:t},_onDown:function(t){var e=n(t),i=n(document.activeElement).closest("."+a.DROP_DOWN_MENU_CLASS);if(i.length>0){var s=n(document.activeElement).closest(u.MENU_LIST_PATTERN);for(e=s.next(u.MENU_LIST_PATTERN);e.is(u.SEPARATOR_PATTERN);)e=e.next(u.MENU_LIST_PATTERN)}else{if(i=n(document.activeElement).closest("."+u.MENU_ROOT_CLASS),i.length<1)return t;a.isMenuShowing()&&(this.lastMenuBarItem=t,e=n(u.MENU_LIST_PATTERN))}return e.length>0?e[0]:t}}),n.extend(d.prototype,{navtype:"actionmenu",navtype_tags:[]});var p=new d;return p}),define("touchcontroller",["require","jquery"],function(t){"use strict";var e=t("jquery"),i=function(t,i,n){if(this.element=t,this.parent=i,this.children=[],this.hbar=null,this.vbar=null,n=n||{},n.absolute?this.element.style.position="absolute":this.element.style.position="relative",this.useParent=n.useParent?this.observer=i:this.observer=t,this.translate3d=n.translate3d!==!1?!0:!1,this.forceLayout=n.forceLayout!==!0?!1:!0,this.use2Fingers=n.use2Fingers!==!0?!1:!0,this.fit=n.fit,n.debug&&(i.style.border="solid 1px #f00",t.style.border="solid 1px #00f"),this.translate3d&&!n.noInit3d){var s=e(t).position();t.style.webkitTransform="translate3d("+s.left+"px,"+s.top+"px,0)",t.style.top="",t.style.left=""}if(n.scrollbars===!0){var o=e('<div style="position:absolute;bottom:4px;left:0;right:0;"><div style="position:relative;background:#3fb8fa;min-height:4px;width:24px;opacity:0.4;"></div></div>').appendTo(i),r=e('<div style="position:absolute;top:0;bottom:0;right:4px;"><div style="position:relative;background:#3fb8fa;min-width:4px;height:24px;opacity:0.4;"></div></div>').appendTo(i);this.hbar=o.children().eq(0),this.vbar=r.children().eq(0)}this.computeBoundaries(),this.dragging=!1,this.drag_sensitivity=20,this.scale=1,this.element.style.top=0,this.element.style.left=0,this.maxX=0,this.maxY=0,this.startTouchY=0,this.startTouchX=0,this.contentOffsetX=0,this.contentOffsetY=0,this.observer.addEventListener("touchstart",this,!1),this.observer.addEventListener("touchmove",this,!1),this.observer.addEventListener("touchend",this,!1)};return i.prototype.handleEvent=function(t){switch(t.type){case"touchstart":this.onTouchStart(t);break;case"touchmove":this.onTouchMove(t);break;case"touchend":this.onTouchEnd(t)}},i.prototype.computeBoundaries=function(){this.maxX=this.parent.clientWidth-this.element.clientWidth,this.maxY=this.parent.clientHeight-this.element.clientHeight,this.maxX=this.maxX<0?this.maxX:0,this.maxY=this.maxY<0?this.maxY:0,this.hbar&&0!==this.maxX?(this.hratio=this.parent.clientWidth/this.element.clientWidth,this.hbar.width(this.hratio*this.parent.clientWidth),this.hbar.show()):this.hbar&&this.hbar.hide(),this.vbar&&0!==this.maxY?(this.vratio=this.parent.clientHeight/this.element.clientHeight,this.vbar.height(this.vratio*this.parent.clientHeight),this.vbar.show()):this.vbar&&this.vbar.hide(),0===this.maxX&&0===this.maxY&&(this.element.style.minWidth=this.parent.clientWidth+"px",this.element.style.minHeight=this.parent.clientHeight+"px","reportContainer"===this.element.id&&(this.element.style.maxWidth=this.parent.clientWidth+"px",this.element.style.maxHeight=this.parent.clientHeight+"px"))},i.prototype.onTouchStart=function(t){this.scale_pre=!1,this.computeBoundaries(),this.startTouchX=t.touches[0].clientX,this.startTouchY=t.touches[0].clientY,this.contentStartOffsetX=this.contentOffsetX,this.contentStartOffsetY=this.contentOffsetY},i.prototype.onTouchMove=function(t){var e=t.touches[0].clientY,n=t.touches[0].clientX;(!this.use2Fingers||this.use2Fingers&&2==t.touches.length)&&(this.dragging?this.animateTo(n,e):this.isDragging(t)&&(i.element_scrolled=!0,this.forceLayout&&(this.element.style.top=0,this.element.style.webkitTransform="translate3d(0,"+this.contentOffsetY+"px,0)"),this.animateTo(n,e)))},i.prototype.onTouchEnd=function(t){this.dragging&&(this.forceLayout&&(this.element.style.webkitTransform="translate3d(0,0,0)",this.element.style.top=this.contentOffsetY+"px"),this.hbar&&this.hbar.hide(),this.vbar&&this.vbar.hide(),t.preventDefault(),this.shouldStartMomentum()),this.dragging=!1},i.prototype.animateTo=function(t,i){var n=t-this.startTouchX,s=i-this.startTouchY,o=n+this.contentStartOffsetX,r=s+this.contentStartOffsetY,a=e(this.element).position();this.translate3d?(o>0&&(o=0),r>0&&(r=0),o<this.maxX&&(o=this.maxX),r<this.maxY&&(r=this.maxY)):(o+a.left>0&&(o=-1*a.left),r+a.top>0&&(r=-1*a.top),a.left+o<this.maxX&&(o=this.maxX-a.left),a.top+r<this.maxY&&(r=this.maxY-a.top)),this.contentOffsetX=o,this.contentOffsetY=r,this.translate3d||this.use2Fingers?this.element.style.webkitTransform="scale("+this.scale+") translate3d("+o+"px,"+r+"px, 0)":(this.element.style.top=a.top+r+"px",this.element.style.left=a.left+o+"px"),this.hbar&&this.hbar.css("left",-1*o*this.hratio+"px"),this.vbar&&this.vbar.css("top",-1*r*this.vratio+"px")},i.prototype.isDragging=function(t){var e=t.touches[0].clientX-this.startTouchX,i=t.touches[0].clientY-this.startTouchY,n=Math.abs(e),s=Math.abs(i);return this.dragging=n>this.drag_sensitivity||s>this.drag_sensitivity?!0:!1,this.dragging},i.prototype.shouldStartMomentum=function(){return!1},i.prototype.reset=function(){var t=this.contentOffsetX,e=this.contentOffsetY;this.maxX=this.parent.clientWidth-this.element.clientWidth,this.maxY=this.parent.clientHeight-this.element.clientHeight,this.translate3d?(this.element.style.webkitTransform="scale("+this.scale+") translate3d("+t+"px,"+e+"px, 0)",this.element.style.webkitTransform="scale("+this.scale+") translate3d(0,0,0)",this.contentOffsetX=0,this.contentOffsetY=0):(this.element.style.top=0,this.element.style.left=0)},i.prototype.forceRefresh=function(){},i.prototype.isBottom=function(){return this.maxY>=0?!1:this.contentOffsetY-this.maxY<10},i.prototype.addPadding=function(t,i){var n=e("#"+t),s=n.width()+i.right,o=n.height()+i.bottom;this.element.style.width=s+"px",this.element.style.height=o+"px"},window.TouchController=i,i});var baseList={isResponsive:function(t){return $(t.up(0)).hasClassName(layoutModule.RESPONSIVE_CLASS)},isCollapsible:function(t){return $(t.up(0)).hasClassName(layoutModule.COLLAPSIBLE_CLASS)},selectItem:function(t){if(this._allowSelections){if(this.isItemDisabled(t))return;$(t).addClassName(layoutModule.SELECTED_CLASS)}},deselectItem:function(t){$(t).removeClassName(layoutModule.SELECTED_CLASS)},isItemSelected:function(t){return $(t).hasClassName(layoutModule.SELECTED_CLASS)},disableItem:function(t){buttonManager.disable(t)},enableItem:function(t){buttonManager.enable(t)},isItemDisabled:function(t){buttonManager.isDisabled(t)},openItem:function(t){$(t).removeClassName(layoutModule.CLOSED_CLASS).addClassName(layoutModule.OPEN_CLASS).isOpen=!0},isItemOpen:function(t){return $(t).hasClassName(layoutModule.OPEN_CLASS)||$(t).isOpen&&!$(t).hasClassName(layoutModule.CLOSED_CLASS)},closeItem:function(t){$(t).removeClassName(layoutModule.OPEN_CLASS).addClassName(layoutModule.CLOSED_CLASS).isOpen=!1}},dynamicList={lists:{},activeListId:null,_templateHash:{},messages:{listNItemsSelected:"#{count} items selected"},getDynamicListForElement:function(t){var e=$(t);return e.match("ul,ol")||(e=e.up("ul,ol"),0!==e.length)?dynamicList.lists[e.id]:null}};dynamicList.ListItem=function(t){this._itemId=void 0,this._list=void 0,this.first=!1,this.last=!1,t&&(this._value=t.value?t.value:{},this._label=t.label?t.label:"",this._subList=t.subList,this._cssClassName="cssClassName"in t?t.cssClassName:void 0,this._templateDomId="templateDomId"in t?t.templateDomId:void 0,this._respondOnItemEvents=Object.isUndefined(t.respondOnItemEvents)?!0:t.respondOnItemEvents,this._excludeFromEventHandling="excludeFromEventHandling"in t?t.excludeFromEventHandling:void 0,this._excludeFromSelectionTriggers="excludeFromSelectionTriggers"in t?t.excludeFromSelectionTriggers:void 0)},dynamicList.ListItem.addVar("DEFAULT_TEMPLATE_DOM_ID","dynamicListItemTemplate"),dynamicList.ListItem.addVar("DEFAULT_ITEM_ID_PREFIX","item"),dynamicList.ListItem.addVar("DEFAULT_SUB_LIST_ID_SUFFIX","SubList"),dynamicList.ListItem.addMethod("getId",function(){return this._itemId}),dynamicList.ListItem.addMethod("setList",function(t){this._list=t,this.getList()&&(this._itemId=this.getList().getNextItemId())}),dynamicList.ListItem.addMethod("unsetList",function(){this._list=null,this._itemId=void 0}),dynamicList.ListItem.addMethod("getList",function(){return this._list}),dynamicList.ListItem.addMethod("setValue",function(t){return this._value=t}),dynamicList.ListItem.addMethod("getValue",function(){return this._value}),dynamicList.ListItem.addMethod("setLabel",function(t){return this._label=t}),dynamicList.ListItem.addMethod("getLabel",function(){return this._label}),dynamicList.ListItem.addMethod("setCssClassName",function(t){this._cssClassName=t}).addMethod("getCssClassName",function(){return this._cssClassName}),dynamicList.ListItem.addMethod("setTemplateDomId",function(t){this._templateDomId=t}),dynamicList.ListItem.addMethod("getTemplateDomId",function(){return this._templateDomId}),dynamicList.ListItem.addMethod("show",function(t){if(t){this._element=this.processTemplate(this._getTemplate()),this._getElement().setAttribute("id",this._generateId()),this._getElement().setAttribute("tabindex",-1),this.first&&this.getList().tabindex&&this._getElement().writeAttribute("tabindex",this.getList().tabindex),this._getElement().listItem=this,this.refreshStyle();var e=t.childElements(),i=this.index(),n=i-1;n>-1&&n<e.length?this._getElement().insert({after:e[n]}):$(t).insert(this._getElement())}}),dynamicList.ListItem.addMethod("refresh",function(){var t=!1;this._getElement()&&(this.getList()?(document.activeElement===this._getElement()&&(t=!0),this._element=this.processTemplate(this._getElement()),this.refreshStyle(),t&&jQuery(this._getElement()).focus()):(this._getElement().remove(),this._element=null))}),dynamicList.ListItem.addMethod("refreshStyle",function(){var t=this._getElement();t&&(t.templateClassName&&(t.className=t.templateClassName),this.first&&t.addClassName(layoutModule.FIRST_CLASS),this.last&&t.addClassName(layoutModule.LAST_CLASS),this.isSelected()&&t.addClassName(layoutModule.SELECTED_CLASS),this.isDisabled()&&t.addClassName(layoutModule.DISABLED_CLASS),this.getCssClassName()&&t.addClassName(this.getCssClassName()),this.isComposite||this===this.getList().cursor&&t.addClassName("cursor"))}),dynamicList.ListItem.addMethod("isRendered",function(){return isNotNullORUndefined(this._getElement())}),dynamicList.ListItem.addMethod("disable",function(){baseList.disableItem(this._getElement())}).addMethod("enable",function(){baseList.enableItem(this._getElement())}).addMethod("isDisabled",function(){return baseList.isItemDisabled(this._getElement())}),dynamicList.ListItem.addMethod("processTemplate",function(t){var e=t.childElements()[0];e.cleanWhitespace();var i=e.childElements().length;return i==e.childNodes.length?e.insert(xssUtil.escape(this.getLabel())):e.childNodes[i].data=this.getLabel(),t}),dynamicList.ListItem.addMethod("focus",function(){this._getElement().focus()}),dynamicList.ListItem.addMethod("remove",function(){this.getList().removeItems([this])}),dynamicList.ListItem.addMethod("isSelected",function(){return this.getList().isItemSelected(this)}),dynamicList.ListItem.addMethod("select",function(){this.getList().selectItem(this,!0)}),dynamicList.ListItem.addMethod("deselect",function(){this.getList().deselectItem(this)}),dynamicList.ListItem.addMethod("index",function(){this.getList().getItems().indexOf(this)}),dynamicList.ListItem.addMethod("_getElement",function(){if(!this._element){var t=$(this._generateId());this._element=Object.isElement(t)?t:void 0}return this._element}),dynamicList.ListItem.addMethod("_getTemplate",function(){var t=this._templateDomId;dynamicList._templateHash[t]||(dynamicList._templateHash[t]=t);var e=$(dynamicList._templateHash[t]).cloneNode(!0);return e.templateId=t,e.templateClassName=e.className,e}),dynamicList.ListItem.addMethod("_generateId",function(){return this.getList()&&this.getList().getId()?this.getList().getId()+"_"+this.DEFAULT_ITEM_ID_PREFIX+this.getId():null}),dynamicList.ListItem.addMethod("_isElementInExcluded",function(t,e){var i=t.element();return this._excludeFromEventHandling&&null!=matchAny(i,this._excludeFromEventHandling)}),dynamicList.ListItem.addMethod("_isExcludedFromSelectionTriggers",function(t){var e=t.element();return this._excludeFromSelectionTriggers&&null!=matchAny(e,this._excludeFromSelectionTriggers)}),dynamicList.CompositeItem=function(t){dynamicList.ListItem.call(this,t),this.isComposite=!0,this._items=t.items,this._openUp=t.openUp,this._subList=null,this._subListOptions=t.listOptions?t.listOptions:{},this._listTagName="ul",this.OPEN_HANDLER_PATTERN=t.openHandlerPattern?t.openHandlerPattern:this.OPEN_HANDLER_PATTERN,this.CLOSE_HANDLER_PATTERN=t.closeHandlerPattern?t.closeHandlerPattern:this.CLOSE_HANDLER_PATTERN},dynamicList.CompositeItem.prototype=deepClone(dynamicList.ListItem.prototype),dynamicList.CompositeItem.addVar("OPEN_HANDLER_PATTERN","[openHandler=openHandler]"),dynamicList.CompositeItem.addVar("CLOSE_HANDLER_PATTERN","[closeHandler=closeHandler]"),dynamicList.CompositeItem.addMethod("getItems",function(){return this._items}),dynamicList.CompositeItem.addMethod("setItems",function(t){this._items=t}),dynamicList.CompositeItem.addMethod("addItem",function(t){this._items.push(t)}),dynamicList.CompositeItem.addMethod("removeItems",function(t){this._items=this._items.reject(function(e){return t.include(e)}),this._subList.removeItems(t)}),dynamicList.CompositeItem.addMethod("show",function(t){this._listTagName=t.tagName,dynamicList.ListItem.prototype.show.call(this,t),baseList.closeItem(this._getElement()),this._items&&this._showSubList()}),dynamicList.CompositeItem.addMethod("_showSubList",function(){var t=this._getSubListId(),e=new Element(this._listTagName,{id:t});this._getElement().insert(this._openUp?{top:e}:{bottom:e});var i=this._subListOptions;if(this._subList=new dynamicList.List(t,{allowSelections:"allowSelections"in i?i.allowSelections:this.getList()._allowSelections,responsive:"responsive"in i?i.responsive:this.getList()._responsive,selectionDefaultsToCursor:"selectionDefaultsToCursor"in i?i.selectionDefaultsToCursor:this.getList()._selectionDefaultsToCursor,collapsible:"collapsible"in i?i.collapsible:this.getList()._collapsible,multiSelect:"multiSelect"in i?i.multiSelect:this.getList()._multiSelect,cssClassName:"cssClassName"in i?i.cssClassName:this.getList()._cssClassName,listTemplateDomId:"listTemplateDomId"in i?i.listTemplateDomId:this.getList()._listTemplateDomId,itemTemplateDomId:"itemTemplateDomId"in i?i.itemTemplateDomId:this.getList()._itemTemplateDomId,itemCssClassName:"itemCssClassName"in i?i.itemCssClassName:this.getList()._itemCssClassName,comparator:"comparator"in i?i.comparator:this.getList()._comparator,items:this._items}),this._subList._initEvents=function(){},this._subList.show(),this._subList._parentList=this.getList(),this._subList.getItems().each(function(t){t.parentItem=this}.bind(this)),this===this.getList().cursor){var n=this.getFirstChild();if(n){if(this.deselect(),n.getList().setCursor(n),this._getElement()){var s=jQuery(this._getElement());s.removeClass("cursor"),s.addClass("supercursor")}n._getElement()&&window.setTimeout(function(){jQuery(n._getElement()).focus()},0)}}}),dynamicList.CompositeItem.addMethod("refresh",function(){dynamicList.ListItem.prototype.refresh.call(this),this._items&&(this._subList?this._subList.refresh():this._showSubList())}),dynamicList.CompositeItem.addMethod("getFirstChild",function(){return this._subList.getItems().length<1?null:this._subList.getItems()[0]}),dynamicList.CompositeItem.addMethod("refreshStyle",function(){dynamicList.ListItem.prototype.refreshStyle.call(this),this._getElement()&&(baseList.isItemOpen(this._getElement())?(baseList.openItem(this._getElement()),this===this.getList().cursor&&(this._subList&&this._subList.cursor?this._getElement().addClassName("supercursor"):this._getElement().addClassName("cursor"))):(baseList.closeItem(this._getElement()),this===this.getList().cursor&&this._getElement().addClassName("cursor")),this._subList&&this._subList.refreshStyle())}),dynamicList.CompositeItem.addMethod("_isOpenHandler",function(t){return t.match(this.OPEN_HANDLER_PATTERN)}).addMethod("_isCloseHandler",function(t){return t.match(this.CLOSE_HANDLER_PATTERN)}),dynamicList.CompositeItem.addMethod("_getSubListId",function(){return this._generateId()+"_"+this.DEFAULT_SUB_LIST_ID_SUFFIX}),dynamicList.TemplatedListItem=function(t){t&&(this.tooltipText="tooltipText"in t?t.tooltipText:null),dynamicList.ListItem.call(this,t)};var tempFunc=function(){};tempFunc.prototype=dynamicList.ListItem.prototype,dynamicList.TemplatedListItem.prototype=new tempFunc,dynamicList.TemplatedListItem.prototype.constructor=dynamicList.TemplatedListItem,dynamicList.TemplatedListItem.prototype.processTemplate=function(t){var e=Mustache.to_html(t.innerHTML,this.getValue());return t.innerHTML=xssUtil.escape(e),null!=this.tooltipText&&new JSTooltip(t,{text:xssUtil.escape(this.tooltipText)}),t},dynamicList.UnderscoreTemplatedListItem=function(t){dynamicList.TemplatedListItem.call(this,t),t&&(this._template="template"in t?t.template:"")};var tempFunc=function(){};tempFunc.prototype=dynamicList.TemplatedListItem.prototype,dynamicList.UnderscoreTemplatedListItem.prototype=new tempFunc,dynamicList.UnderscoreTemplatedListItem.prototype.constructor=dynamicList.UnderscoreTemplatedListItem,dynamicList.UnderscoreTemplatedListItem.prototype._getTemplate=function(){return this._template},dynamicList.UnderscoreTemplatedListItem.prototype.processTemplate=function(){var t=jQuery(_.template(this._template,xssUtil.escape(this.getValue())))[0];return t.templateClassName=t.className,null!=this.tooltipText&&new JSTooltip(t,{text:xssUtil.escape(this.tooltipText)}),t},dynamicList.List=function(t,e){this._id=t,this._items=[],this._selectedItems=[],this._lastSelectedItem=null,this.cursor=null,this._nextId=1,this.draggables=[],this._parentList=null,e&&(this._selectionDefaultsToCursor="selectionDefaultsToCursor"in e?e.selectionDefaultsToCursor:!0,this._allowSelections="allowSelections"in e?e.allowSelections:!0,this._cssClassName="cssClassName"in e?e.cssClassName:"",this._excludeFromEventHandling="excludeFromEventHandling"in e?e.excludeFromEventHandling:!1,this._excludeFromSelectionTriggers="excludeFromSelectionTriggers"in e?e.excludeFromSelectionTriggers:!1,this._multiSelect="multiSelect"in e?e.multiSelect:!1,this._selectOnMousedown="selectOnMousedown"in e?e.selectOnMousedown:!0,this._setCursorOnMousedown="setCursorOnMousedown"in e?e.setCursorOnMousedown:!0,this._listTemplateDomId=e.listTemplateDomId,this._itemTemplateDomId=e.itemTemplateDomId,this._itemCssClassName=e.itemCssClassName,this._comparator=e.comparator,this.dragPattern=e.dragPattern,this.scroll=e.scroll,this.setItems(e.items)),this._createFromTemplate(),this._registerCustomScroll(),
  dynamicList.activeListId=this.getId(),this._msgNItemsSelected=new Template(dynamicList.messages.listNItemsSelected),dynamicList.lists[this._id]=this},dynamicList.List.addVar("Event",{ITEM_SELECTED:"item:selected",ITEM_UNSELECTED:"item:unselected",ITEM_MOUSEUP:"item:mouseup",ITEM_MOUSEDOWN:"item:mousedown",ITEM_CLICK:"item:click",ITEM_DBLCLICK:"item:dblclick",ITEM_OPEN:"item:open",ITEM_CLOSED:"item:closed",ITEM_CONTEXTMENU:"item:contextmenu",ITEM_BEFORE_SELECT_OR_UNSELECT:"item:beforeSelectOrUnselect"}),dynamicList.List.addVar("DND_WRAPPER_TEMPLATE","column_two"),dynamicList.List.addVar("DND_ITEM_TEMPLATE","column_two:resourceName"),dynamicList.List.addMethod("getNextItemId",function(){return this._nextId++}),dynamicList.List.addMethod("getId",function(){return this._id}),dynamicList.List.addMethod("getItems",function(){return this._items}),dynamicList.List.addMethod("setItems",function(t){if(t){var e=this.cursor,i=this._getElement(),n=!1;i&&(i===document.activeElement||jQuery.contains(i,document.activeElement))&&(n=!0),this._items=[],this.resetSelected(),this.addItems(t);var s;e&&(s=this.getCursor()),n&&(s&&s._getElement()?jQuery(s._getElement()).focus():i&&jQuery(i).focus())}}),dynamicList.List.addMethod("addItems",function(t){t&&(t.compact().each(function(t){this._prepareListItem(t),this._items.push(t)}.bind(this)),this._comparator&&(this._items=this._items.sort(this._comparator)))}),dynamicList.List.addMethod("insertItems",function(t,e){e&&(e=e.compact(),e.each(function(t){this._prepareListItem(t)}.bind(this)),this._items.splice.apply(this._items,[t,0].concat(e)),this._comparator&&(this._items=this._items.sort(this._comparator)))}),dynamicList.List.addMethod("_prepareListItem",function(t){t&&(t.setList(this),this._itemTemplateDomId&&!t.getTemplateDomId()&&t.setTemplateDomId(this._itemTemplateDomId),this._itemCssClassName&&!t.getCssClassName()&&t.setCssClassName(this._itemCssClassName),this._excludeFromEventHandling&&!t._excludeFromEventHandling&&(t._excludeFromEventHandling=this._excludeFromEventHandling),this._excludeFromSelectionTriggers&&!t._excludeFromSelectionTriggers&&(t._excludeFromSelectionTriggers=this._excludeFromSelectionTriggers))}),dynamicList.List.addMethod("removeItems",function(t){if(t&&isArray(t)){var e=this.getCursor(),i=!1;t.each(function(t){this._removeItemFromSelected(t),e===t&&(e=this.getNextItem(t),e||(e=this.getPreviousItem(t)))}.bind(this)),this._items=this._items.reject(function(e){return t.include(e)}),t.each(function(t){t.unsetList(),t.refresh()}),e!==this.getCursor()&&this.setCursor(e),i&&(this.getCursor()&&this.getCursor()._getElement()?jQuery(this.getCursor()._getElement().focus()):this._getElement()&&jQuery(this._getElement().focus()))}}),dynamicList.List.addMethod("sort",function(t){t&&(this._comparator=t),this._comparator&&this.getItems().sort(this._comparator)}),dynamicList.List.addMethod("setCursor",function(t){var e=!1;document.activeElement&&jQuery.contains(this._getElement(),document.activeElement)&&(e=!0),this.cursor&&this.cursor.getList()&&this.cursor._getElement()&&jQuery(this.cursor._getElement()).removeClass("cursor"),this.cursor=t,t&&t.getList()&&t._getElement()&&(this.scrollUpTo(t),this._allowSelections&&this._selectionDefaultsToCursor&&this.getSelectedItems().length<1&&this.selectItem(t),e&&jQuery(this.cursor._getElement()).focus(),jQuery(this.cursor._getElement()).addClass("cursor"))}),dynamicList.List.addMethod("getCursor",function(){return this.cursor&&this.cursor.getList()&&this.cursor._getElement()&&jQuery(this.cursor._getElement()).closest("BODY").length>0?this.cursor:this._selectedItems.length>0&&this._selectedItems[this._selectedItems.length-1]._getElement()&&(this.setCursor(this._selectedItems[this._selectedItems.length-1]),jQuery(this.cursor._getElement()).closest("BODY").length>0)?this.cursor:this._items.length>0?(this.setCursor(this._items[0]),this.cursor):null}),dynamicList.List.addMethod("getCursorElement",function(){return this.getCursor()?this.getCursor()._getElement():null}),dynamicList.List.addMethod("getSelectedItems",function(){return this._selectedItems}),dynamicList.List.addMethod("isItemSelected",function(t){return this.getSelectedItems().include(t)}),dynamicList.List.addMethod("selectItem",function(t,e,i,n){var s=this.fire(this.Event.ITEM_BEFORE_SELECT_OR_UNSELECT,{item:t});if(!s.stopSelectOrUnselect&&(!(this._multiSelect&&this._selectedItems.length>1&&this.isItemSelected(t))||e||i||n)){var o=this.isItemSelected(t)&&n,r=!(this._multiSelect&&e||o),a=this.isItemSelected(t)&&e&&!o,l=this._multiSelect&&!a&&isNotNullORUndefined(this._lastSelectedItem)&&i,u=!a&&!l;if(r&&this.resetSelected(),a&&!r&&this._removeItemFromSelected(t),l){var c=this._items.indexOf(this._lastSelectedItem),h=this._items.indexOf(t),d=Math.min(c,h),p=Math.max(c,h);if(d>-1)for(var f=d;p>=f;f++)this._addItemToSelected(this._items[f],!1);else this._addItemToSelected(this._items[p],!1)}u&&this._addItemToSelected(t,!(i&&this._multiSelect)),this.setCursor(t)}}),dynamicList.List.addMethod("deselectItem",function(t){this._removeItemFromSelected(t),this.setCursor(t)}),dynamicList.List.addMethod("deselectOthers",function(t,e,i,n){var s=this.fire(this.Event.ITEM_BEFORE_SELECT_OR_UNSELECT,{item:t});if(!s.stopSelectOrUnselect&&this._multiSelect&&this._selectedItems.length>1&&this.isItemSelected(t)&&!(e||i||n)){var o=this._selectedItems.findAll(function(e){return e!=t});o.each(function(t){this._removeItemFromSelected(t)}.bind(this))}}),dynamicList.List.addMethod("resetSelected",function(t){var e=this._selectedItems;this._selectedItems=[],e.each(function(t){var e=t.getList();e&&e!==this&&e.resetSelected(!0),t.refreshStyle(),this.fire(this.Event.ITEM_UNSELECTED,{item:t})}.bind(this)),this._parentList&&!t&&this._parentList.resetSelected()}),dynamicList.List.addMethod("scrollDownTo",function(t){var e=this._getElement().parentNode;if(e&&t&&t._getElement()){var i=e.scrollTop,n=e.offsetHeight,s=t._getElement().offsetTop,o=t._getElement().offsetHeight,r=s+o-(i+n);r>0&&(e.scrollTop+=r)}}),dynamicList.List.addMethod("scrollUpTo",function(t){var e=this._getElement().parentNode;if(e&&t&&t._getElement()){var i=e.scrollTop,n=(e.offsetHeight,t._getElement().offsetTop),s=(t._getElement().offsetHeight,t._getElement().offsetHeight),o=i+s-n;o>0&&(e.scrollTop-=o)}}),dynamicList.List.addMethod("getNextItem",function(t){var e=this.getItems(),i=e.indexOf(t);return~i?this.getItems()[i+1]:null}),dynamicList.List.addMethod("getPreviousItem",function(t){var e=this.getItems(),i=e.indexOf(t);return~i?this.getItems()[i-1]:null}),dynamicList.List.addMethod("selectNext",function(t){var e=t.memo.targetEvent,i=this.getCursor(),n=null,s=null;if(i._subList&&i._getElement()&&jQuery(i._getElement()).hasClass(layoutModule.OPEN_CLASS)){if(!jQuery(i._getElement()).hasClass("supercursor")&&i._subList.getItems().length>0)return s=i._subList.getItems()[0],jQuery(i._getElement()).addClass("supercursor"),e.preventDefault(),e.stopPropagation(),i._subList.setCursor(s),void jQuery(i._subList.cursor._getElement()).focus();if(n=i._subList.getCursor(),s=n.getList().getNextItem(n))return n.getList().selectNext(t)}jQuery(i._getElement()).removeClass("supercursor"),i._subList&&(i._subList.cursor=null),s=i.getList().getNextItem(i),s&&(this._multiSelect&&isShiftHeld(e)?this.isItemSelected(s)?i.getList().deselectItem(i):this._addItemToSelected(s,!1):(this.resetSelected(),i.getList().selectItem(s)),this.setCursor(s)),e.preventDefault(),e.stopPropagation()}),dynamicList.List.addMethod("selectPrevious",function(t){var e=t.memo.targetEvent,i=this.getCursor(),n=null,s=null;if(jQuery(i._getElement()).hasClass("supercursor")){if(n=i._subList.getCursor(),s=n.getList().getPreviousItem(n))return n.getList().selectPrevious(t);i._subList.cursor&&(i._subList.cursor._element&&jQuery(i._subList.cursor._element).removeClass("cursor"),i._subList.cursor=null),isShiftHeld(e)&&this._multiSelect||i._subList.resetSelected(),jQuery(i._getElement()).removeClass("supercursor"),this.setCursor(i),jQuery(i._getElement()).focus()}else s=i.getList().getPreviousItem(i),s&&(this._multiSelect&&isShiftHeld(e)?this.isItemSelected(s)?i.getList().deselectItem(i):this._addItemToSelected(s,!1):(this.resetSelected(),i.getList().selectItem(s)),this.setCursor(s));e.preventDefault(),e.stopPropagation()}),dynamicList.List.addMethod("selectPageDown",function(t){var e=t.memo.targetEvent;e.preventDefault(),e.stopPropagation();var i=this.getCursor(),n=i._getElement().offsetHeight,s=this._getElement().parentNode,o=s.scrollTop+(s.offsetHeight-n);o>s.offsetHeight&&(o=s.offsetHeight),s.scrollTop=o;for(var r=i,a=null;r&&r._getElement().offsetTop+r._getElement().offsetHeight<s.scrollTop+s.offsetHeight;)a=r,isShiftHeld(e)&&(this.isItemSelected(a)?i.getList().deselectItem(i):this._addItemToSelected(a,!1)),r=a.getList().getNextItem(a);a&&(this._multiSelect&&isShiftHeld(e)||(this.resetSelected(),i.getList().selectItem(a)),this.setCursor(a))}),dynamicList.List.addMethod("selectPageUp",function(t){var e=t.memo.targetEvent;e.preventDefault(),e.stopPropagation();var i=this.getCursor(),n=i._getElement().offsetHeight,s=this._getElement().parentNode,o=s.scrollTop+(s.offsetHeight-n);o>s.offsetHeight&&(o=s.offsetHeight),s.scrollTop=o;for(var r=i,a=null;r&&r._getElement().offsetTop>s.scrollTop-s.offsetHeight;)a=r,this._multiSelect&&isShiftHeld(e)&&(this.isItemSelected(a)?i.getList().deselectItem(i):this._addItemToSelected(a,!1)),r=a.getList().getPreviousItem(a);a&&(this._multiSelect&&isShiftHeld(e)||(this.resetSelected(),i.getList().selectItem(a)),this.setCursor(a))}),dynamicList.List.addMethod("selectOutwards",function(t){if(!(this.getSelectedItems().length<1)){var e=this.getSelectedItems()[0],i=e._getElement(),n=!baseList.isItemOpen(i)&&e.parentItem;n?(e.deselect(),n.select(),n._getElement().focus()):(baseList.closeItem(i),this.fire(this.Event.ITEM_CLOSED,{targetEvent:t,item:e}))}}),dynamicList.List.addMethod("selectInwards",function(t){var e=this.cursor;if(!e){if(this.getSelectedItems().length<1)return;e=this.getSelectedItems()[0]}if(e.isComposite){var i=e._getElement();if(baseList.isItemOpen(i)){var n=e.getFirstChild();if(n){if(e.deselect(),n.getList().setCursor(n),e._getElement()){var s=jQuery(e._getElement());s.is(".cursor")&&(s.removeClass("cursor"),s.addClass("supercursor"))}n._getElement()&&jQuery(n._getElement()).focus()}}else baseList.openItem(i),this.fire(this.Event.ITEM_OPEN,{targetEvent:t,item:e})}}),dynamicList.List.addMethod("show",function(){dynamicList.activeListId=this.getId(),this._getElement().update(),this.getItems().each(function(t,e){t.first=0===e,t.last=e===this.getItems().length-1,t.show(this._getElement())}.bind(this)),this.draggables=[],this.scroll&&this.scroll.refresh(),this._initEvents()}),dynamicList.List.addMethod("refresh",function(){if(this._getElement()){this.getCursor();var t,e=this._getElement().parentNode;t=e?e.scrollTop:0,this.refreshStyle();var i=this._getElement().childElements(),n=[],s=this.getCursor(),o=!1;s&&s.getList()&&s._getElement()&&(document.activeElement===s._getElement()||jQuery.contains(s._getElement(),document.activeElement))&&(o=!0),this.getItems().each(function(t,e){if(t.first=0===e,t.last=e===this.getItems().length-1,t.isRendered())if(t.index()!=i.indexOf(t._getElement())){var s=baseList.isItemOpen(t._getElement());t._getElement().remove(),t.show(this._getElement()),s&&baseList.openItem(t._getElement())}else t.refresh();else t.show(this._getElement());n.push(t._getElement())}.bind(this)),i.each(function(t){!n.include(t)&&t.parentNode&&t.remove()}),this.setCursor(s),o&&$(this.getCursorElement()).focus(),e&&(e.scrollTop=t)}}),dynamicList.List.addMethod("refreshStyle",function(t){var e=this._getElement();e&&(e.templateClassName&&(e.className=e.templateClassName),this._cssClassName&&e.addClassName(this._cssClassName))}),dynamicList.List.addMethod("fire",function(t,e){var i=$(this._getElement());return i?i.fire(t,e):null}),dynamicList.List.addMethod("observe",function(t,e){this._getElement().observe(t,e)}),dynamicList.List.addMethod("stopObserving",function(t,e){this._getElement().stopObserving(t,e)}),dynamicList.List.addMethod("_getElement",function(){return this._element||(this._element=$(this.getId())),this._element}),dynamicList.List.addMethod("getItemByEvent",function(t){if(t)for(var e=Event.element(t);e&&e.readAttribute&&e.readAttribute("id")!==this.getId();){var i=e.listItem;if(i&&null!=i.getList())return i._label=xssUtil.unescape(i._label),i;e=$(e.parentNode)}return null}),dynamicList.List.addMethod("_createFromTemplate",function(){var t=this._getElement().readAttribute("tabindex");this.tabindex=parseInt(t&&t.length>0?t:-1),this._getElement().insert({after:this._getTemplateElement(this._getElement())}),this._getElement().remove(),this._element=null,this._getElement().update(),this.tabindex&&this.tabindex.length>0&&this._getElement().writeAttribute("tabindex",this.tabindex),disableSelectionWithoutCursorStyle(this._getElement())}),dynamicList.List.addMethod("_getTemplateElement",function(t){var e=this._listTemplateDomId;dynamicList._templateHash[e]||(dynamicList._templateHash[e]=e);var i=$(dynamicList._templateHash[e]).cloneNode(!0);return i.writeAttribute("id",this.getId()),i.templateId=e,i.templateClassName=i.className,cloneCustomAttributes(t,i),i}),dynamicList.List.addMethod("_addItemToSelected",function(t,e){t&&!this.isItemSelected(t)&&(this._selectedItems.push(t),e&&(this._lastSelectedItem=t),t.refreshStyle(),this._parentList?this._parentList._addItemToSelected(t,e):this.fire(this.Event.ITEM_SELECTED,{item:t}))}),dynamicList.List.addMethod("_removeItemFromSelected",function(t){t&&this.isItemSelected(t)&&(this._selectedItems=this._selectedItems.without(t),t.refreshStyle(),this._parentList?this._parentList._removeItemFromSelected(t):this.fire(this.Event.ITEM_UNSELECTED,{item:t}))}),dynamicList.List.addMethod("_buildDnDOverlay",function(t){t.setStyle({width:null,height:null}),t.items.length>1?t.update(this._msgNItemsSelected.evaluate({count:t.items.length})):1==t.items.length&&t.update(xssUtil.escape(t.items[0].getLabel()))}),dynamicList.List.addMethod("_registerCustomScroll",function(){if(!this.scroll&&this._getElement()){var t=this._getElement().up(layoutModule.SWIPE_SCROLL_PATTERN);if(t){var e=layoutModule.scrolls.get(t.identify());e&&(this.scroll=e)}}}),dynamicList.List.addMethod("createDraggableIfNeeded",function(t){var e=t.element();if(this.dragPattern&&!this.draggables[e.identify()]){var i=matchAny(e,[this.dragPattern],!0);if(i){if(!i||this.draggables[i.identify()])return;var n=this.getItemByEvent(t);this.draggables[i.identify()]=new Draggable(i,{superghosting:!0,mouseOffset:!0,onStart:this.setDragStartState.bind(this,n),onEnd:this.setDragEndState.bind(this,n)})}}}),dynamicList.List.addMethod("setDragStartState",function(t,e,i){var n=t._getElement().templateClassName;n&&e.element.addClassName(n),e.element.addClassName(layoutModule.DRAGGING_CLASS).addClassName(this.getId()),e.element.items=this.getSelectedItems().slice(0),this._buildDnDOverlay(e.element),e.options.scroll=this._getElement(),e.options.scrollSensitivity=layoutModule.SCROLL_SENSITIVITY,Draggables.dragging=this.regionID||!0}),dynamicList.List.addMethod("setDragEndState",function(t,e,i){delete Draggables.dragging}),dynamicList.List.addMethod("_mouseupHandler",function(t){var e=t.element(),i=matchMeOrUp(e,layoutModule.BUTTON_PATTERN)&&this.getItemByEvent(t);if(i&&!i._isElementInExcluded(t)){if(t.listEvent=!0,i._respondOnItemEvents&&!t.isInvoked){if(this.fire(this.Event.ITEM_MOUSEUP,{targetEvent:t,item:i}),!i._isExcludedFromSelectionTriggers(t)){var n=isMetaHeld(t),s=isShiftHeld(t),o=isRightClick(t),r=!this._selectOnMousedown&&!TouchController.element_scrolled&&(!isSupportsTouch()||t.changedTouches.length>=1);if(r&&i.getList().selectItem(i,n,s,o),!r&&this._multiSelect&&this._selectedItems.length>1&&this.isItemSelected(i)&&!(n||s||o)&&(this._lastSelectedItem=i),i.getList().deselectOthers(i,isMetaHeld(t),isShiftHeld(t),isRightClick(t)),this.twofingers){this.twofingers=!1;var a=jQuery(e).parents("li:first");a.hasClass("selected")&&document.fire(layoutModule.ELEMENT_CONTEXTMENU,{targetEvent:t,node:e})}}this.createDraggableIfNeeded(t)}t.isInvoked=!0}}),dynamicList.List.addMethod("_mousedownHandler",function(t){t="dataavailable"==t.type?t.memo.targetEvent:t;var e=t.element(),i=matchMeOrUp(e,layoutModule.BUTTON_PATTERN+","+layoutModule.LIST_ITEM_WRAP_PATTERN)&&this.getItemByEvent(t);i&&!i._isElementInExcluded(t)&&(t.listEvent=!0,t.touches&&2==t.touches.length?this.twofingers=!0:this.twofingers=!1,i.isComposite&&(i._isOpenHandler(t.target)||i._isCloseHandler(t.target))?(t.stopPropagation(),t.preventDefault()):i._respondOnItemEvents&&!t.isInvoked&&(this.fire(this.Event.ITEM_MOUSEDOWN,{targetEvent:t,item:i}),i._isExcludedFromSelectionTriggers(t)||(this._selectOnMousedown&&i.getList().selectItem(i,isMetaHeld(t),isShiftHeld(t),isRightClick(t)),this._setCursorOnMousedown&&!isMetaHeld(t)&&i.getList().setCursor(i)),i.focus()),t.isInvoked=!0)}),dynamicList.List.addMethod("_mouseoverHandler",function(t){matchMeOrUp(t.element(),layoutModule.BUTTON_PATTERN)&&this.createDraggableIfNeeded(t)}),dynamicList.List.addMethod("_clickHandler",function(t){var e=matchMeOrUp(t.element(),layoutModule.BUTTON_PATTERN)&&this.getItemByEvent(t);if(e&&!e._isElementInExcluded(t)){if(!t.isInvoked){if(e._respondOnItemEvents&&this.fire(this.Event.ITEM_CLICK,{targetEvent:t,item:e}),!e.isComposite)return;var i=e._getElement(),n=t.element();e._isCloseHandler(n)&&baseList.isItemOpen(i)?(baseList.closeItem(i),this.fire(this.Event.ITEM_CLOSED,{targetEvent:t,item:e})):e._isOpenHandler(n)&&!baseList.isItemOpen(i)&&(baseList.openItem(i),this.fire(this.Event.ITEM_OPEN,{targetEvent:t,item:e}))}t.isInvoked=!0}}),dynamicList.List.addMethod("_dblclickHandler",function(t){var e=matchMeOrUp(t.element(),layoutModule.BUTTON_PATTERN)&&this.getItemByEvent(t);e&&!e._isElementInExcluded(t)&&(e._respondOnItemEvents&&!t.isInvoked&&this.fire(this.Event.ITEM_DBLCLICK,{targetEvent:t,item:e}),t.isInvoked=!0)}),dynamicList.List.addMethod("_initEvents",function(){var t=this._getElement();this.draggables=[],isSupportsTouch()?(t.stopObserving("touchstart").observe("touchstart",this._mousedownHandler.bindAsEventListener(this)),t.stopObserving("drag:touchstart").observe("drag:touchstart",this._mousedownHandler.bindAsEventListener(this)),t.stopObserving("touchend").observe("touchend",this._mouseupHandler.bindAsEventListener(this))):(t.stopObserving("mouseup").observe("mouseup",this._mouseupHandler.bindAsEventListener(this)),t.stopObserving("mousedown").observe("mousedown",this._mousedownHandler.bindAsEventListener(this)),t.stopObserving("drag:mousedown").observe("drag:mousedown",this._mousedownHandler.bindAsEventListener(this))),isIPad||t.stopObserving("mouseover").observe("mouseover",this._mouseoverHandler.bindAsEventListener(this)),t.stopObserving("click").observe("click",this._clickHandler.bindAsEventListener(this)),t.stopObserving("dblclick").observe("dblclick",this._dblclickHandler.bindAsEventListener(this)),t.stopObserving("key:down").observe("key:down",this.selectNext.bindAsEventListener(this)),t.stopObserving("key:up").observe("key:up",this.selectPrevious.bindAsEventListener(this)),t.stopObserving("key:right").observe("key:right",this.selectInwards.bindAsEventListener(this)),t.stopObserving("key:left").observe("key:left",this.selectOutwards.bindAsEventListener(this)),t.stopObserving("key:pagedown").observe("key:pagedown",this.selectPageDown.bindAsEventListener(this))}),dynamicList.UnderscoreTemplatedList=function(t,e){e&&(this._template="template"in e?e.template:""),dynamicList.List.apply(this,arguments)};var tempFunc=function(){};tempFunc.prototype=dynamicList.List.prototype,dynamicList.UnderscoreTemplatedList.prototype=new tempFunc,dynamicList.UnderscoreTemplatedList.prototype.constructor=dynamicList.UnderscoreTemplatedList,dynamicList.UnderscoreTemplatedList.prototype._getTemplateElement=function(t){var e=jQuery(_.template(this._template,{}))[0];return e.writeAttribute("id",this.getId()),e.templateClassName=e.className,cloneCustomAttributes(t,e),e},define("components.list",["jquery","prototype","touchcontroller","utils.common","dragdrop.extra","core.events.bis"],function(t){return function(){var e;return e||t.dynamicList}}(this)),define("stdnavPluginDynamicList",["require","exports","module","jquery","underscore","common/util/eventAutomation","logger","stdnav","components.list"],function(t,e,i){"use strict";var n=t("jquery"),s=(t("underscore"),t("common/util/eventAutomation")),o=t("logger").register(i),r=t("stdnav"),a=t("components.list"),l=0,u=function(){l++,this.serial=l};n.extend(u.prototype,{zinit:function(t){return o.debug("stdnavPluginDynamicList.init("+t+")\n"),this},activate:function(){this.behavior={ariaprep:[this,this._ariaPrep,null],ariarefresh:[this,this._ariaRefresh,null],click:null,down:null,end:null,enter:[this,this._onEnter,null],fixfocus:[this,this._fixFocus,null],fixsuperfocus:[this,this._fixSuperfocus,null],home:null,inherit:!0,inheritable:!0,left:null,pagedown:null,pageup:null,right:null,superfocusin:[r,r.basicSuperfocusIn,{maxdepth:1,focusSelector:"li",ghostfocus:!1}],superfocusout:[r,r.basicSuperfocusOut,{ghostfocus:!1}],up:null},r.registerNavtype(this.navtype,this.behavior,this.navtype_tags)},deactivate:function(){r.unregisterNavtype(this.navtype,this.behavior)},_ariaPrep:function(t){return n(t).attr("role","application"),n(t).attr("aria-label","Dynamic List"),null},_ariaRefresh:function(t){return n(t).attr("role","application"),n(t).attr("aria-label","Dynamic List"),null},_onEnter:function(t){var e=n(t);if(e.is(".supercursor"))o.error("dynamicList item has supercursor class-- should not have focus while this is true."),e.find("ul > li.cursor")<0&&o.error("...additionally, no sublist item appears to have the cursor class.");else{var i=e.find("a,:input");i.length>0&&s.simulateClickSequence(i[0])}return t},_fixFocus:function(t){var e=n(t).closest("[js-navtype='"+this.navtype+"']");if(e.length<1)return o.warn("Can't find a dynamic list to fix focus to"),t;var i=a.getDynamicListForElement(e[0]);return r.nullOrUndefined(i)?(o.warn("Can't map a dynamic list to fix focus to"),t):i.getCursorElement()},_fixSubfocus:function(t){return null},_fixSuperfocus:function(t){var e,i=n(t).closest("ol,ul");return e=i.length>0?i[0]:null},_onSuperfocusIn:function(t){var e,i=n(t).children("li .ghostfocus");if(i.length>0)i.removeClass("ghostfocus"),e=i[0];else{var s=n(t).children('li[js-navigable!="false"]');e=s.length>0?s[0]:t}return e},_onSuperfocusOut:function(t){}}),n.extend(u.prototype,{navtype:"dynamiclist",navtype_tags:[]});var c=new u;return c}),define("commons.minimal.main",["require","commons.bare.main","!domReady","components.heartbeat","jrs.configs","components.about","components.webHelp","jquery","attributes/collection/AttributesCollection","attributes/model/AttributeModel","stdnav","stdnavPluginAnchor","stdnavPluginButton","stdnavPluginForms","stdnavPluginGrid","stdnavPluginList","stdnavPluginTable","stdnavPluginActionMenu","stdnavPluginDynamicList"],function(t){"use strict";t("commons.bare.main");var e=t("!domReady"),i=t("components.heartbeat"),n=t("jrs.configs"),s=t("components.about"),o=t("components.webHelp"),r=t("jquery");t("attributes/collection/AttributesCollection"),t("attributes/model/AttributeModel");if("true"==__jrsConfigs__.enableAccessibility)var a=t("stdnav"),l=t("stdnavPluginAnchor"),u=t("stdnavPluginButton"),c=t("stdnavPluginForms"),h=t("stdnavPluginGrid"),d=t("stdnavPluginList"),p=t("stdnavPluginTable"),f=t("stdnavPluginActionMenu"),m=t("stdnavPluginDynamicList");e(function(){i.initialize(n.heartbeatInitOptions),i.start(),n.initAdditionalUIComponents&&s.initialize();var t=r("#helpLink");t&&t.on("click",function(t){t.preventDefault(),o.displayWebHelp()}),"true"==__jrsConfigs__.enableAccessibility&&(a.activate(),l.activate(a),u.activate(a),c.activate(a),h.activate(a),d.activate(a),p.activate(a),f.activate(a),m.activate(a),a.start())})});var accessibilityModule={ATTR_TAB_INDEX:"data-tab-index",ATTR_COMPONENT_TYPE:"data-component-type",delayTime:500,components:[],currentTabIndex:-1,disabled:!0,initialize:function(){var t=$$("*["+this.ATTR_TAB_INDEX+"]");t.each(function(t){var e=this.getTabIndex(t);e>0&&(this.components[e]=t)}.bind(this)),this.enable()},enable:function(){this.disabled=!1},disable:function(){this.disabled=!0},_focusByType:{tree:function(t){var e=t.readAttribute("id"),i=dynamicTree.trees[e];if(i){var n=i.selectedNodes.last();n=n||(i.bShowRoot?i.getRootNode():i.getRootNode().getFirstChild()),n&&(n.isSelected()||n.select(),accessibilityModule._doFocus(n))}},list:function(t){var e=t.readAttribute("id"),i=dynamicList.lists[e];if(i){var n=i.getSelectedItems().last();n=n||i.getItems().first(),n&&(n.isSelected()||n.select(),accessibilityModule._doFocus(n))}},search:function(t){var e=t.down("input");e&&e.select(),accessibilityModule._doFocus(e)},navigation:function(t){var e=t.down("#main_home");buttonManager.over(e.down(layoutModule.BUTTON_PATTERN)),accessibilityModule._doFocus(e)},linkList:function(t){buttonManager.over(t.down("a")),accessibilityModule._doFocus(t)}},_blurByType:{navigation:function(t){actionModel.hideMenu(),t.select(".over").each(function(t){buttonManager.out(t)})},linkList:function(t){t.select("a.over").each(function(t){buttonManager.out(t)})}},_doFocus:function(t){setTimeout(function(){t.focus()},this.delayTime)},_focusComponent:function(t){var e=t&&this.getType(t)&&this._focusByType[this.getType(t)];return e&&e(t)},_blurComponent:function(t){var e=t&&this.getType(t)&&this._blurByType[this.getType(t)];return e&&e(t)},findTabComponent:function(t){for(var e;t&&!e;)e=t.hasAttribute&&t.hasAttribute(this.ATTR_TAB_INDEX)&&t,t=$(t.parentNode);return e},getTabIndex:function(t){var e=-1;if(t&&t.hasAttribute){t.hasAttribute(this.ATTR_TAB_INDEX)||(t=accessibilityModule.findTabComponent(t));var i=t?t.readAttribute(this.ATTR_TAB_INDEX):this.currentTabIndex;try{i&&i.length>0&&(e=parseInt(i))}catch(n){}}return e},getType:function(t){return t&&t.hasAttribute(this.ATTR_COMPONENT_TYPE)?t.readAttribute(this.ATTR_COMPONENT_TYPE):void 0},getNext:function(t){var e=-1;if(this.components.length>0)for(t||(t=this.currentTabIndex),0>t&&(t=0),e=t+1;Object.isUndefined(this.components[e])&&e!=t;)e++,e<this.components.length||(e=0);return e},getPrevious:function(t){var e=-1;if(this.components.length>0)for(t||(t=this.currentTabIndex),0>t&&(t=0),e=t-1;Object.isUndefined(this.components[e])&&e!=t;)e--,e>-1||(e=this.components.length-1);return e},focusNext:function(t){this.focusByIndex(this.getNext(t))},focusPrevious:function(t){this.focusByIndex(this.getPrevious(t))},focusByIndex:function(t){t>-1&&(this.currentTabIndex=t)&&this._focusComponent(this.components[t])},blurCurrent:function(){var t=this.components[this.currentTabIndex];t&&this._blurComponent(t)},blurByIndex:function(t){var e=this.components[t];e&&this._blurComponent(e)}};document.observe("key:tab",function(t){if(!accessibilityModule.disabled){if(!e)var e=window.event;var i=accessibilityModule.getTabIndex(t.element());return accessibilityModule.blurCurrent(),isShiftHeld(t)?accessibilityModule.focusPrevious(i):accessibilityModule.focusNext(i),t.stop(),!1}}),define("core.accessibility",["prototype","components.list","actionModel.modelGenerator","core.events.bis"],function(t){return function(){var e;return e||t.accessibilityModule}}(this));var keyManager={ignoreKeyDown:[Keys.DOM_VK_SHIFT,Keys.DOM_VK_CONTROL,Keys.DOM_VK_ALT],noBubbleOnKeyUp:[Keys.DOM_VK_F10]};document.observe("keyup",function(t){keyManager.noBubbleOnKeyUp.include(t.keyCode)&&Event.stop(t)}),document.observe("keydown",function(t){if(!keyManager.ignoreKeyDown.include(t.keyCode)){var e=t.element();return t.keyCode==Event.KEY_RETURN?void e.fire("key:enter",{targetEvent:t,node:e}):t.shiftKey&&t.keyCode==Keys.DOM_VK_F10?(Event.stop(t),void e.fire("key:contextMenu",{targetEvent:t,node:e})):t.keyCode==Event.KEY_LEFT?void e.fire("key:left",{targetEvent:t,node:e}):t.keyCode==Event.KEY_RIGHT?void e.fire("key:right",{targetEvent:t,node:e}):t.keyCode==Event.KEY_UP?void e.fire("key:up",{targetEvent:t,node:e}):t.keyCode==Event.KEY_DOWN?void e.fire("key:down",{targetEvent:t,node:e}):t.keyCode==Event.KEY_PAGEUP?void e.fire("key:pageup",{targetEvent:t,node:e}):t.keyCode==Event.KEY_PAGEDOWN?void e.fire("key:pagedown",{targetEvent:t,node:e}):t.keyCode==Event.KEY_HOME?void e.fire("key:home",{targetEvent:t,node:e}):t.keyCode==Event.KEY_END?void e.fire("key:end",{targetEvent:t,node:e}):isMetaHeld(t)&&89==t.keyCode?void e.fire("key:redo",{targetEvent:t,node:e}):isMetaHeld(t)&&90==t.keyCode?void e.fire("key:undo",{targetEvent:t,node:e}):t.keyCode==Event.KEY_ESC?void e.fire("key:escape",{targetEvent:t,node:e}):t.keyCode==Event.KEY_TAB?void e.fire("key:tab",{targetEvent:t,node:e}):t.keyCode==Event.KEY_DELETE?void e.fire("key:delete",{targetEvent:t,node:e}):65==t.keyCode&&isMetaHeld(t)?void e.fire("key:selectAll",{targetEvent:t,node:e}):83==t.keyCode&&isMetaHeld(t)&&!isShiftHeld(t)?void e.fire("key:save",{targetEvent:t,node:e}):76==t.keyCode&&isMetaHeld(t)&&isShiftHeld(t)?void e.fire("key:chartZoomIn",{targetEvent:t,node:e}):79==t.keyCode&&isMetaHeld(t)&&isShiftHeld(t)?void e.fire("key:chartZoomOut",{targetEvent:t,node:e}):void 0}}),document.observe("key:esc",function(t){actionModel.isMenuShowing()&&actionModel.hideActionModelMenu()}),document.observe("key:enter",function(t){var e,i=t.element(),n=$(layoutModule.MENU_ID);if(layoutModule.isVisible(n)){Event.stop(t);var s=n.select(":focus,."+layoutModule.HOVERED_CLASS)[0];if(s){var o=s;s.match(layoutModule.MENU_LIST_PATTERN)||(o=s.up(layoutModule.MENU_LIST_PATTERN)),setTimeout(o.onmouseup.curry(t.memo.targetEvent),0)}}e=matchMeOrUp(i,layoutModule.NAVIGATION_PATTERN),e&&(e.identify()==layoutModule.MAIN_NAVIGATION_HOME_ITEM_ID?(Event.stop(t),primaryNavModule.navigationOption("home")):e.identify()==layoutModule.MAIN_NAVIGATION_LIBRARY_ITEM_ID&&(Event.stop(t),primaryNavModule.navigationOption("library")))}),define("core.key.events",["jquery","prototype","utils.common","core.layout"],function(t){return function(){var e;return e||t.keyManager}}(this));var SearchBox=function(t){this._id=t.id,this._dom=$(this._id),this._enabled=!0,this._process(),this._assignHandlers()};SearchBox.addMethod("_process",function(){this._input=this._dom.select("input")[0],this._clearButton=this._dom.select(".button.searchClear")[0],this._searchButton=this._dom.select(".button.search")[0]}),SearchBox.addMethod("_assignHandlers",function(){this._dom.observe("submit",function(t){Event.stop(t)}),this._input.observe("keypress",this._keyPressHandler.bindAsEventListener(this)),this._clearButton.observe("click",this._clearHandler.bindAsEventListener(this)),this._searchButton.observe("click",this._searchHandler.bindAsEventListener(this))}),SearchBox.addMethod("_keyPressHandler",function(t){this._enabled&&Event.KEY_RETURN==t.keyCode&&(this._doSearch(),Event.stop(t))}),SearchBox.addMethod("_updateClearButtonVisibility",function(){this.getText().blank()?this._clearButton.removeClassName(layoutModule.UP_CLASS):this._clearButton.addClassName(layoutModule.UP_CLASS)}),SearchBox.addMethod("_clearHandler",function(){this._enabled&&(this.setText(""),this._doSearch())}),SearchBox.addMethod("_searchHandler",function(){this._enabled&&this._doSearch()}),SearchBox.addMethod("getText",function(){return this._input.getValue()}),SearchBox.addMethod("setText",function(t){this._input.setValue(t),this._updateClearButtonVisibility()}),SearchBox.addMethod("enable",function(){buttonManager.enable(this._clearButton),buttonManager.enable(this._searchButton),this._input.writeAttribute(layoutModule.READONLY_ATTR_NAME,null),this._dom.writeAttribute(layoutModule.DISABLED_ATTR_NAME,null),this._enabled=!0}),SearchBox.addMethod("disable",function(){buttonManager.disable(this._clearButton),buttonManager.disable(this._searchButton),this._input.writeAttribute(layoutModule.READONLY_ATTR_NAME,layoutModule.READONLY_ATTR_NAME),this._dom.writeAttribute(layoutModule.DISABLED_ATTR_NAME,layoutModule.DISABLED_ATTR_NAME),
  this._enabled=!1}),SearchBox.addMethod("_doSearch",function(t){this._updateClearButtonVisibility(),this.onSearch(this.getText())}),SearchBox.addMethod("onSearch",function(t){}),define("components.searchBox",["prototype","utils.common","core.events.bis"],function(t){return function(){var e;return e||t.SearchBox}}(this));var globalSearchBox={_searchBox:null,_containerId:"globalSearch",_searchInputId:"searchInput",initialize:function(){this._searchBox=new SearchBox({id:this._containerId}),this._searchBox.onSearch=function(t){$(this._searchInputId).setValue(t),primaryNavModule.navigationPaths.search.params+="&searchText="+encodeUriParameter(t),primaryNavModule.navigationOption("search")}.bind(this)},setText:function(t){this._searchBox.setText(t)}};define("repository.search.globalSearchBoxInit",["prototype","actionModel.primaryNavigation","components.searchBox"],function(t){return function(){var e;return e||t.globalSearchBox}}(this)),define("commons.main",["require","!domReady","commons.minimal.main","namespace","core.accessibility","core.events.bis","core.key.events","stdnav","actionModel.modelGenerator","actionModel.primaryNavigation","repository.search.globalSearchBoxInit","core.layout","jrs.configs","stdnavPluginActionMenu","stdnavPluginDynamicList"],function(t){"use strict";var e=t("!domReady");t("commons.minimal.main"),t("namespace"),t("core.accessibility"),t("core.events.bis"),t("core.key.events");var i=t("stdnav"),n=t("actionModel.modelGenerator"),s=t("actionModel.primaryNavigation"),o=t("repository.search.globalSearchBoxInit"),r=t("core.layout"),a=t("jrs.configs");e(function(){r.initialize(),s.initializeNavigation(),n.initializeOneTimeMenuHandlers();var e=t("stdnavPluginActionMenu"),l=t("stdnavPluginDynamicList");e.activate(i),l.activate(i),a.initAdditionalUIComponents&&o.initialize(),document.fire("dom:loaded")})});var toolbarButtonModule={UP:"up",DOWN:"down",OVER:"over",DISABLED:"disabled",PRESSED:"pressed",CONTENT_PREFIX:"toolbar_",MenuClass:"menu vertical dropDown",TOOLBAR_MENU_CLASS:"menu vertical dropDown fitable",ACTION_MODEL_TAG:"adhocActionModel",CAPSULE_PATTERN:"capsule",showButtonMenu:function(t,e){e=jQuery(e);var i=this.CONTENT_PREFIX+e.attr("id"),n="adhocActionModel"==this.ACTION_MODEL_TAG?this.actionModel:this.ACTION_MODEL_TAG;actionModel.showDropDownMenu(t,e,i,this.TOOLBAR_MENU_CLASS,n)},setActionModel:function(t){this.actionModel=t},isToolBarButton:function(t){return t?jQuery(t).hasClass("capsule"):!1},enable:function(t,e){buttonManager.enable(t)},disable:function(t){buttonManager.disable(t)},setButtonState:function(t,e){e?this.enable(t):this.disable(t)}};define("components.toolbarButtons",["jquery","prototype"],function(t){return function(){var e;return e||t.toolbarButtonModule}}(this)),toolbarButtonModule.initialize=function(t){toolbarButtonModule.actionMap=t,jQuery(".toolbar").on("mouseup mouseover mouseout","button",function(t){jQuery(this).prop("disabled")||toolbarButtonModule["mouse"+t.type.substring(5,6).toUpperCase()+t.type.substring(6)+"Handler"](t,this)}),isFirefox()&&jQuery(".toolbar li").each(function(t,e){jQuery(e).css("padding","0 2px")})},toolbarButtonModule.mouseUpHandler=function(t,e){var i=e.className.indexOf("capsule")>=0?toolbarButtonModule.actionMap[e.id]:null;if(i){var n=getAsFunction(i);n(t),t.stopPropagation()}},toolbarButtonModule.mouseOverHandler=function(t,e){e.className.indexOf("capsule")>=0&&e.className.indexOf("mutton")>=0&&!buttonManager.isDisabled(e)&&toolbarButtonModule.showButtonMenu(t.originalEvent,e)},toolbarButtonModule.mouseOutHandler=function(t,e){},define("components.toolbar",["jquery","prototype","utils.common","components.toolbarButtons"],function(t){return function(){var e;return e||t.toolbarButtonModule}}(this));var messageListModule={_list:null,_messageListId:"messageList",_flowExecutionKey:null,_systemConfirmMessages:[],toolbar:{_buttons:null,_id:"toolbar",initialize:function(){toolbarButtonModule.initialize({}),this._buttons=document.body.select(layoutModule.TOOLBAR_CAPSULE_PATTERN),this._initEventHandlers()},refresh:function(){this._buttons.each(function(t){toolbarButtonModule.setButtonState(t,messageListModule.hasSelectedMessages())}.bind(this))},_initEventHandlers:function(){$(this._id).observe("click",function(t){var e=matchAny(t.element(),[layoutModule.BUTTON_PATTERN],!0),i=e.identify();messageListModule.doAction(i,Object.toQueryString({selectedIds:messageListModule.getSelectedIds()}))}.bindAsEventListener(this))}},filter:{_id:"messageFilter",initialize:function(){this._initEventHandlers()},_initEventHandlers:function(){$(this._id).observe("change",function(t){t.element();messageListModule.doAction("changeEventsType",Object.toQueryString({messageFilter:$(this._id).getValue()}))}.bindAsEventListener(this))}},initialize:function(t){this._flowExecutionKey=t.flowExecutionKey,this._systemConfirmMessages=t.systemConfirmMessages,this._list=new dynamicList.List(this._messageListId,{listTemplateDomId:"list_fourColumn_type_message",itemTemplateDomId:"list_fourColumn_type_message:unread",multiSelect:!0});var e=this._list.selectItem;this._list.selectItem=function(t){t.getValue().isHeader||e.apply(this,arguments)},this._initListEvents(),this.toolbar.initialize(),this.filter.initialize(),this.doAction("getMessages","")},_getMessageItems:function(t){var e=function(t){var e=t.select(".subject a")[0];e.update(xssUtil.escape(this.getValue().subject)),e.writeAttribute("href","flow.html?_flowExecutionKey="+messageListModule._flowExecutionKey+"&_eventId=viewMessage&id="+this.getValue().id);var i=t.select(".date")[0];i.update(xssUtil.escape(this.getValue().date)),i.writeAttribute("title",this.getValue().timestamp);var n=t.select(".type")[0];n.update(xssUtil.escape(this.getValue().type));var s=t.select(".component")[0];return s.update(xssUtil.escape(this.getValue().component)),t};return t.unshift({isHeader:!0}),t.collect(function(t){var i;i=t.isHeader?"list_fourColumn_type_message:header":t.isRead?"list_fourColumn_type_message:read":"list_fourColumn_type_message:unread";var n=new dynamicList.ListItem({cssClassName:layoutModule.LEAF_CLASS,value:t,templateDomId:i});return t.isHeader?n.processTemplate=function(t){return t}:n.processTemplate=e,n}.bind(this))},_initListEvents:function(){this._list.observe("item:selected",function(t){this.refreshToolbar()}.bindAsEventListener(this)),this._list.observe("item:unselected",function(t){this.refreshToolbar()}.bindAsEventListener(this))},refreshToolbar:function(){messageListModule.toolbar.refresh()},hasSelectedMessages:function(){return this._list.getSelectedItems().length>0},getSelectedIds:function(){return this._list.getSelectedItems().collect(function(t){return t.getValue().id})},doAction:function(t,e){var i="flow.html?_flowExecutionKey="+messageListModule._flowExecutionKey+"&_eventId="+t;this._list.setItems([]),this.refreshToolbar(),ajaxTargettedUpdate(i,{postData:e,callback:function(t){"OK"==t.status?(this._list.setItems(this._getMessageItems(t.data)),this._list.show()):alert(t.data.message)}.bind(this),errorHandler:this._serverErrorHandler,mode:AjaxRequester.prototype.EVAL_JSON})},_serverErrorHandler:function(t){t.getResponseHeader("LoginRequested")&&(document.location="flow.html?_flowId=logEventFlow"),showErrorPopup=function(){window.alert("Server Error")};var e=baseErrorHandler(t);e||500!=t.status||(document.location="flow.html?_flowId=logEventFlow&_eventId=error",document.location="flow.html?_flowId=logEventFlow&_eventId=error")}};"undefined"==typeof require&&document.observe("dom:loaded",function(){messageListModule.initialize(localContext.initOptions)}),define("messages/list/messageList",["prototype","components.list","components.toolbar","core.layout"],function(t){return function(){var e;return e||t.messageListModule}}(this)),define("messages/list/messageList.main",["require","!domReady","messages/list/messageList","jrs.configs"],function(t){"use strict";var e=t("!domReady"),i=t("messages/list/messageList"),n=t("jrs.configs");e(function(){i.initialize(n.messagesListInitOptions)})}),define("messages/list/messageList.page",["require","commons.main","messages/list/messageList.main"],function(t){"use strict";t("commons.main"),t("messages/list/messageList.main")});