vendor: 6,567 bytes, lines 1-57
1/*! jQuery UI - v1.10.2 - 2013-03-14 2* http://jqueryui.com 3* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ 4(function(e,t){function i(t,i){var a,n,r,o=t.nodeName.toLowerCase();return"area"===o?(a=t.parentNode,n=a.name,t.href&&n&&"map"===a.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&s(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var a=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var s,a,n=e(this[0]);n.length&&n[0]!==document;){if(s=n.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(a=parseInt(n.css("zIndex"),10),!isNaN(a)&&0!==a))return a;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var s=e.attr(t,"tabindex"),a=isNaN(s);return(a||s>=0)&&i(t,!a)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,s){function a(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===s?["Left","Right"]:["Top","Bottom"],r=s.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+s]=function(i){return i===t?o["inner"+s].call(this):this.each(function(){e(this).css(r,a(this,i)+"px")})},e.fn["outer"+s]=function(t,i){return"number"!=typeof t?o["outer"+s].call(this,t):this.each(function(){e(this).css(r,a(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,s){var a,n=e.ui[t].prototype;for(a in s)n.plugins[a]=n.plugins[a]||[],n.plugins[a].push([i,s[a]])},call:function(e,t,i){var s,a=e.plugins[t];if(a&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(s=0;a.length>s;s++)e.options[a[s][0]]&&a[s][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",a=!1;return t[s]>0?!0:(t[s]=1,a=t[s]>0,t[s]=0,a)}})})(jQuery);; 5/*jslint browser: true */ /*global jQuery: true */ 6 7/** 8 * jQuery Cookie plugin 9 * 10 * Copyright (c) 2010 Klaus Hartl (stilbuero.de) 11 * Dual licensed under the MIT and GPL licenses: 12 * http://www.opensource.org/licenses/mit-license.php 13 * http://www.gnu.org/licenses/gpl.html 14 * 15 */ 16 17// TODO JsDoc 18 19/** 20 * Create a cookie with the given key and value and other optional parameters. 21 * 22 * @example $.cookie('the_cookie', 'the_value'); 23 * @desc Set the value of a cookie. 24 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); 25 * @desc Create a cookie with all available options. 26 * @example $.cookie('the_cookie', 'the_value'); 27 * @desc Create a session cookie. 28 * @example $.cookie('the_cookie', null); 29 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain 30 * used when the cookie was set. 31 * 32 * @param String key The key of the cookie. 33 * @param String value The value of the cookie. 34 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. 35 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. 36 * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. 37 * If set to null or omitted, the cookie will be a session cookie and will not be retained 38 * when the the browser exits. 39 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). 40 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). 41 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will 42 * require a secure protocol (like HTTPS). 43 * @type undefined 44 * 45 * @name $.cookie 46 * @cat Plugins/Cookie 47 * @author Klaus Hartl/[email protected] 48 */ 49 50/** 51 * Get the value of a cookie with the given key. 52 * 53 * @example $.cookie('the_cookie'); 54 * @desc Get the value of a cookie. 55 * 56 * @param String key The key of the cookie. 57 * @return The value of the cookie.
58 * @type String 59 * 60 * @name $.cookie 61 * @cat Plugins/Cookie 62 * @author Klaus Hartl/[email protected] 63 */ 64jQuery.cookie = function (key, value, options) { 65 66 // key and value given, set cookie... 67 if (arguments.length > 1 && (value === null || typeof value !== "object")) { 68 options = jQuery.extend({}, options); 69 70 if (value === null) { 71 options.expires = -1; 72 } 73 74 if (typeof options.expires === 'number') { 75 var days = options.expires, t = options.expires = new Date(); 76 t.setDate(t.getDate() + days); 77 } 78 79 return (document.cookie = [ 80 encodeURIComponent(key), '=', 81 options.raw ? String(value) : encodeURIComponent(String(value)), 82 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 83 options.path ? '; path=' + options.path : '', 84 options.domain ? '; domain=' + options.domain : '', 85 options.secure ? '; secure' : '' 86 ].join('')); 87 } 88 89 // key and possibly options given, get cookie... 90 options = value || {}; 91 var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; 92 return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; 93}; 94; 95/*! 96 * jQuery Form Plugin 97 * version: 2.69 (06-APR-2011) 98 * @requires jQuery v1.3.2 or later 99 * 100 * Examples and documentation at: http://malsup.com/jquery/form/ 101 * Dual licensed under the MIT and GPL licenses: 102 * http://www.opensource.org/licenses/mit-license.php 103 * http://www.gnu.org/licenses/gpl.html 104 */ 105(function(a){function b(){if(a.fn.ajaxSubmit.debug){var b="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(b):window.opera&&window.opera.postError&&window.opera.postError(b)}}a.fn.ajaxSubmit=function(c){function r(){function t(){if(!j.aborted){var c=i.contentWindow?i.contentWindow.document:i.contentDocument?i.contentDocument:i.document;if(!c||c.location.href==e.iframeSrc)if(!m)return;i.detachEvent?i.detachEvent("onload",t):i.removeEventListener("load",t,!1);var d=!0;try{if(m)throw"timeout";var f=e.dataType=="xml"||c.XMLDocument||a.isXMLDoc(c);b("isXml="+f);if(!f&&window.opera&&(c.body==null||c.body.innerHTML=="")&&--s){b("requeing onLoad callback, DOM not available"),setTimeout(t,250);return}j.responseText=c.body?c.body.innerHTML:c.documentElement?c.documentElement.innerHTML:null,j.responseXML=c.XMLDocument?c.XMLDocument:c,j.getResponseHeader=function(a){var b={"content-type":e.dataType};return b[a]};var g=/(json|script)/.test(e.dataType);if(g||e.textarea){var l=c.getElementsByTagName("textarea")[0];if(l)j.responseText=l.value;else if(g){var n=c.getElementsByTagName("pre")[0],o=c.getElementsByTagName("body")[0];n?j.responseText=n.textContent:o&&(j.responseText=o.innerHTML)}}else e.dataType=="xml"&&!j.responseXML&&j.responseText!=null&&(j.responseXML=u(j.responseText));q=w(j,e.dataType,e)}catch(p){b("error caught:",p),d=!1,j.error=p,e.error&&e.error.call(e.context,j,"error",p),k&&a.event.trigger("ajaxError",[j,e,p])}j.aborted&&(b("upload aborted"),d=!1),d&&(e.success&&e.success.call(e.context,q,"success",j),k&&a.event.trigger("ajaxSuccess",[j,e])),k&&a.event.trigger("ajaxComplete",[j,e]),k&&!--a.active&&a.event.trigger("ajaxStop"),e.complete&&e.complete.call(e.context,j,d?"success":"error"),setTimeout(function(){h.removeData("form-plugin-onload"),h.remove(),j.responseXML=null},100)}}function p(){var b=l.attr("target"),c=l.attr("action");d.setAttribute("target",f),d.getAttribute("method")!="POST"&&d.setAttribute("method","POST"),d.getAttribute("action")!=e.url&&d.setAttribute("action",e.url),e.skipEncodingOverride||l.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),e.timeout&&setTimeout(function(){m=!0,t()},e.timeout);var g=[];try{if(e.extraData)for(var j in e.extraData)g.push(a('<input type="hidden" name="'+j+'" value="'+e.extraData[j]+'" />').appendTo(d)[0]);h.appendTo("body"),i.attachEvent?i.attachEvent("onload",t):i.addEventListener("load",t,!1),d.submit()}finally{d.setAttribute("action",c),b?d.setAttribute("target",b):l.removeAttr("target"),a(g).remove()}}var d=l[0];if(a(":input[name=submit],:input[id=submit]",d).length)alert('Error: Form elements must not have name or id of "submit".');else{var e=a.extend(!0,{},a.ajaxSettings,c);e.context=e.context||e;var f="jqFormIO"+(new Date).getTime(),g="_"+f,h=a('<iframe id="'+f+'" name="'+f+'" src="'+e.iframeSrc+'" />'),i=h[0];h.css({position:"absolute",top:"-1000px",left:"-1000px"});var j={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){b("aborting upload...");var c="aborted";this.aborted=1,h.attr("src",e.iframeSrc),j.error=c,e.error&&e.error.call(e.context,j,"error",c),k&&a.event.trigger("ajaxError",[j,e,c]),e.complete&&e.complete.call(e.context,j,"error")}},k=e.global;k&&!(a.active++)&&a.event.trigger("ajaxStart"),k&&a.event.trigger("ajaxSend",[j,e]);
105if(e.beforeSend&&e.beforeSend.call(e.context,j,e)===!1){e.global&&a.active--;return}if(j.aborted)return;var m=0,n=d.clk;if(n){var o=n.name;o&&!n.disabled&&(e.extraData=e.extraData||{},e.extraData[o]=n.value,n.type=="image"&&(e.extraData[o+".x"]=d.clk_x,e.extraData[o+".y"]=d.clk_y))}e.forceSync?p():setTimeout(p,10);var q,r,s=50,u=a.parseXML||function(a,b){window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)):b=(new DOMParser).parseFromString(a,"text/xml");return b&&b.documentElement&&b.documentElement.nodeName!="parsererror"?b:null},v=a.parseJSON||function(a){return window.eval("("+a+")")},w=function(b,c,d){var e=b.getResponseHeader("content-type")||"",f=c==="xml"||!c&&e.indexOf("xml")>=0,g=f?b.responseXML:b.responseText;f&&g.documentElement.nodeName==="parsererror"&&a.error&&a.error("parsererror"),d&&d.dataFilter&&(g=d.dataFilter(g,c)),typeof g=="string"&&(c==="json"||!c&&e.indexOf("json")>=0?g=v(g):(c==="script"||!c&&e.indexOf("javascript")>=0)&&a.globalEval(g));return g}}}if(!this.length){b("ajaxSubmit: skipping submit process - no element selected");return this}typeof c=="function"&&(c={success:c});var d=this.attr("action"),e=typeof d=="string"?a.trim(d):"";e&&(e=(e.match(/^([^#]+)/)||[])[1]),e=e||window.location.href||"",c=a.extend(!0,{url:e,success:a.ajaxSettings.success,type:this[0].getAttribute("method")||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},c);var f={};this.trigger("form-pre-serialize",[this,c,f]);if(f.veto){b("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(c.beforeSerialize&&c.beforeSerialize(this,c)===!1){b("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var g,h,i=this.formToArray(c.semantic);if(c.data){c.extraData=c.data;for(g in c.data)if(c.data[g]instanceof Array)for(var j in c.data[g])i.push({name:g,value:c.data[g][j]});else h=c.data[g],h=a.isFunction(h)?h():h,i.push({name:g,value:h})}if(c.beforeSubmit&&c.beforeSubmit(i,this,c)===!1){b("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[i,this,c,f]);if(f.veto){b("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var k=a.param(i);c.type.toUpperCase()=="GET"?(c.url+=(c.url.indexOf("?")>=0?"&":"?")+k,c.data=null):c.data=k;var l=this,m=[];c.resetForm&&m.push(function(){l.resetForm()}),c.clearForm&&m.push(function(){l.clearForm()});if(!c.dataType&&c.target){var n=c.success||function(){};m.push(function(b){var d=c.replaceTarget?"replaceWith":"html";a(c.target)[d](b).each(n,arguments)})}else c.success&&m.push(c.success);c.success=function(a,b,d){var e=c.context||c;for(var f=0,g=m.length;f<g;f++)m[f].apply(e,[a,b,d||l,l])};var o=a("input:file",this).length>0,p="multipart/form-data",q=l.attr("enctype")==p||l.attr("encoding")==p;c.iframe!==!1&&(o||c.iframe||q)?c.closeKeepAlive?a.get(c.closeKeepAlive,r):r():a.ajax(c),this.trigger("form-submit-notify",[this,c]);return this},a.fn.ajaxForm=function(c){if(this.length===0){var d={s:this.selector,c:this.context};if(!a.isReady&&d.s){b("DOM not ready, queuing ajaxForm"),a(function(){a(d.s,d.c).ajaxForm(c)});return this}b("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)"));return this}return this.ajaxFormUnbind().bind("submit.form-plugin",function(b){b.isDefaultPrevented()||(b.preventDefault(),a(this).ajaxSubmit(c))}).bind("click.form-plugin",function(b){var c=b.target,d=a(c);if(!d.is(":submit,input:image")){var e=d.closest(":submit");if(e.length==0)return;c=e[0]}var f=this;f.clk=c;if(c.type=="image")if(b.offsetX!=undefined)f.clk_x=b.offsetX,f.clk_y=b.offsetY;else if(typeof a.fn.offset=="function"){var g=d.offset();f.clk_x=b.pageX-g.left,f.clk_y=b.pageY-g.top}else f.clk_x=b.pageX-c.offsetLeft,f.clk_y=b.pageY-c.offsetTop;setTimeout(function(){f.clk=f.clk_x=f.clk_y=null},100)})},a.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},a.fn.formToArray=function(b){var c=[];if(this.length===0)return c;var d=this[0],e=b?d.getElementsByTagName("*"):d.elements;if(!e)return c;var f,g,h,i,j,k,l;
105for(f=0,k=e.length;f<k;f++){j=e[f],h=j.name;if(!h)continue;if(b&&d.clk&&j.type=="image"){!j.disabled&&d.clk==j&&(c.push({name:h,value:a(j).val()}),c.push({name:h+".x",value:d.clk_x},{name:h+".y",value:d.clk_y}));continue}i=a.fieldValue(j,!0);if(i&&i.constructor==Array)for(g=0,l=i.length;g<l;g++)c.push({name:h,value:i[g]});else i!==null&&typeof i!="undefined"&&c.push({name:h,value:i})}if(!b&&d.clk){var m=a(d.clk),n=m[0];h=n.name,h&&!n.disabled&&n.type=="image"&&(c.push({name:h,value:m.val()}),c.push({name:h+".x",value:d.clk_x},{name:h+".y",value:d.clk_y}))}return c},a.fn.formSerialize=function(b){return a.param(this.formToArray(b))},a.fn.fieldSerialize=function(b){var c=[];this.each(function(){var d=this.name;if(!!d){var e=a.fieldValue(this,b);if(e&&e.constructor==Array)for(var f=0,g=e.length;f<g;f++)c.push({name:d,value:e[f]});else e!==null&&typeof e!="undefined"&&c.push({name:this.name,value:e})}});return a.param(c)},a.fn.fieldValue=function(b){for(var c=[],d=0,e=this.length;d<e;d++){var f=this[d],g=a.fieldValue(f,b);if(g===null||typeof g=="undefined"||g.constructor==Array&&!g.length)continue;
105g.constructor==Array?a.merge(c,g):c.push(g)}return c},a.fieldValue=function(b,c){var d=b.name,e=b.type,f=b.tagName.toLowerCase();c===undefined&&(c=!0);if(c&&(!d||b.disabled||e=="reset"||e=="button"||(e=="checkbox"||e=="radio")&&!b.checked||(e=="submit"||e=="image")&&b.form&&b.form.clk!=b||f=="select"&&b.selectedIndex==-1))return null;if(f=="select"){var g=b.selectedIndex;if(g<0)return null;var h=[],i=b.options,j=e=="select-one",k=j?g+1:i.length;for(var l=j?g:0;l<k;l++){var m=i[l];if(m.selected){var n=m.value;n||(n=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value);if(j)return n;h.push(n)}}return h}return a(b).val()},a.fn.clearForm=function(){return this.each(function(){a("input,select,textarea",this).clearFields()})},a.fn.clearFields=a.fn.clearInputs=function(){return this.each(function(){var a=this.type,b=this.tagName.toLowerCase();a=="text"||a=="password"||b=="textarea"?this.value="":a=="checkbox"||a=="radio"?this.checked=!1:b=="select"&&(this.selectedIndex=-1)})},a.fn.resetForm=function(){return this.each(function(){(typeof this.reset=="function"||typeof this.reset=="object"&&!this.reset.nodeType)&&this.reset()})},a.fn.enable=function(a){a===undefined&&(a=!0);return this.each(function(){this.disabled=!a})},a.fn.selected=function(b){b===undefined&&(b=!0);return this.each(function(){var c=this.type;if(c=="checkbox"||c=="radio")this.checked=b;else if(this.tagName.toLowerCase()=="option"){var d=a(this).parent("select");b&&d[0]&&d[0].type=="select-one"&&d.find("option").selected(!1),this.selected=b}})}})(jQuery); 106/*! jQuery UI - v1.10.2 - 2013-03-14 107* http://jqueryui.com 108* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ 109(function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(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(a.inline?e.parent()[0]:a.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 n(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.extend(t.ui,{datepicker:{version:"1.10.2"}});var a,r="datepicker",o=(new Date).getTime()
vendor: 9,455 bytes, line 109
109;t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return n(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,a;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),a=this._newInst(t(e),n),a.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,a):n&&this._inlineDatepicker(e,a)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(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 s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.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 s,n,a,r=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t("<span class='"+this._appendClass+"'>"+r+"</span>"),e[o?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:a,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(a?t("<img/>").attr({src:a,alt:n,title:n}):n)),e[o?"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,s,n,a=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},a.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),t.input.attr("size",this._formatDate(t,a).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.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,s,a,o){var h,l,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+h+"' 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)),n(p.settings,a||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=s,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,s=t(e),n=t.data(e,r);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,r),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,s,n=t(e),a=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.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,s,n=t(e),a=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.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;this._disabledInputs.length>e;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,s,a){var r,o,h,l,c=this._getInst(i);return 2===arguments.length&&"string"==typeof s?"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?t.extend({},c.settings):this._get(c,s):null:(r=s||{},"string"==typeof s&&(r={},r[s]=a),c&&(this._curInst===c&&this._hideDatepicker(),o=this._getDateDatepicker(i,!0),h=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),n(c.settings,r),null!==h&&r.dateFormat!==e&&r.minDate===e&&(c.settings.minDate=this._formatDate(c,h)),null!==l&&r.dateFormat!==e&&r.maxDate===e&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,o),this._updateAlternate(c),this._updateDatepicker(c)),e)},_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,s,n,a=t.datepicker._getInst(e.target),r=!0,o=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),r=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",a.dpDiv),n[0]&&t.datepicker._selectDay(e.target,a.selectedMonth,a.selectedYear,n[0]),i=t.datepicker._get(a,"onSelect"),i?(s=t.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(a,"stepBigMonths"):-t.datepicker._get(a,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(a,"stepBigMonths"):+t.datepicker._get(a,"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,o?1:-1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(a,"stepBigMonths"):-t.datepicker._get(a,"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,o?-1:1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(a,"stepBigMonths"):+t.datepicker._get(a,"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(i){var s,n,a=t.datepicker._getInst(i.target);return t.datepicker._get(a,"constrainInput")?(s=t.datepicker._possibleChars(t.datepicker._get(a,"dateFormat")),n=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">n||!s||s.indexOf(n)>-1):e},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0}
vendor: 23,617 bytes, lines 109-110
109,_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,s,a,r,o,h,l;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])),s=t.datepicker._get(i,"beforeShow"),a=s?s.apply(e,[e,i]):{},a!==!1&&(n(i.settings,a),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}),o={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),o=t.datepicker._checkOffset(i,o,r),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?l:null),i.input.is(":visible")&&!i.input.is(":disabled")&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,a=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,s=this._getNumberOfMonths(e),n=s[1],r=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",r*n+"em"),e.dpDiv[(1!==s[0]||1!==s[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&&e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&e.input[0]!==document.activeElement&&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))},_getBorders:function(t){var e=function(t){return{thin:1,medium:2,thick:3}[t]||t};return[parseFloat(e(t.css("border-left-width"))),parseFloat(e(t.css("border-top-width")))]},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),a=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,o=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-r:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+o?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+o):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,a,o=this._curInst;!o||e&&o!==t.data(e,r)||this._datepickerShowing&&(i=this._get(o,"showAnim"),s=this._get(o,"duration"),n=function(){t.datepicker._tidyDialog(o)},t.effects&&(t.effects.effect[i]||t.effects[i])?o.dpDiv.hide(i,t.datepicker._get(o,"showOptions"),s,n):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(o,"onClose"),a&&a.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),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),s=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!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(e,i,s,n){var a,r=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(a=this._getInst(r[0]),a.selectedDay=a.currentDay=t("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(e,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,"onSelect"),s?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,a=this._get(e,"altField");a&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(a).each(function(){t(this).val(n)}))},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(i,s,n){if(null==i||null==s)throw"Invalid arguments";if(s="object"==typeof s?""+s:s+"",""===s)return null;var a,r,o,h,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,m=(n?n.monthNames:null)||this._defaults.monthNames,g=-1,v=-1,_=-1,b=-1,y=!1,w=function(t){var e=i.length>a+1&&i.charAt(a+1)===t;return e&&a++,e},k=function(t){var e=w(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=RegExp("^\\d{1,"+i+"}"),a=s.substring(l).match(n);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},x=function(i,n,a){var r=-1,o=t.map(w(i)?a:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(o,function(t,i){var n=i[1];return s.substr(l,n.length).toLowerCase()===n.toLowerCase()?(r=i[0],l+=n.length,!1):e}),-1!==r)return r+1;throw"Unknown name at position "+l},D=function(){if(s.charAt(l)!==i.charAt(a))throw"Unexpected literal at position "+l;l++};for(a=0;i.length>a;a++)if(y)"'"!==i.charAt(a)||w("'")?D():y=!1;else switch(i.charAt(a)){case"d":_=k("d");break;case"D":x("D",d,p);break;case"o":b=k("o");break;case"m":v=k("m");break;case"M":v=x("M",f,m);break;case"y":g=k("y");break;case"@":h=new Date(k("@")),g=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"!":h=new Date((k("!")-this._ticksTo1970)/1e4),g=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"'":w("'")?D():y=!0;break;default:D()}if(s.length>l&&(o=s.substr(l),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=g?0:-100)),b>-1)for(v=1,_=b;;){if(r=this._getDaysInMonth(g,v-1),r>=_)break;v++,_-=r}if(h=this._daylightSavingAdjust(new Date(g,v-1,_)),h.getFullYear()!==g||h.getMonth()+1!==v||h.getDate()!==_)throw"Invalid date";return h},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:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,a);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),r,o);break;case"y":u+=h("y")?e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!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"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),a=n,r=this._getFormatConfig(t);try{a=this.parseDate(i,s,r)||n}catch(o){s=e?"":s}t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),t.currentDay=s?a.getDate():0,t.currentMonth=s?a.getMonth():0,t.currentYear=s?a.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,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},a=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,a=n.getFullYear(),r=n.getMonth(),o=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":o+=parseInt(l[1],10);break;case"w":case"W":o+=7*parseInt(l[1],10);break;case"m":case"M":r+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(a,r));break;case"y":case"Y":a+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(a,r))}l=h.exec(i)}return new Date(a,r,o)},r=null==i||""===i?s:"string"==typeof i?a(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?s: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 s=!e,n=t.selectedMonth,a=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(),n===t.selectedMonth&&a===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){window["DP_jQuery_"+o].datepicker._adjustDate(s,-i,"M")},next:function(){window["DP_jQuery_"+o].datepicker._adjustDate(s,+i,"M")},hide:function(){window["DP_jQuery_"+o].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+o].datepicker._gotoToday(s)},selectDay:function(){return window["DP_jQuery_"+o].datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+o].datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+o].datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,a,r,o,h,l,c,u,d,p,f,m,g,v,_,b,y,w,k,x,D,T,C,S,M,N,I,P,A,z,H,E,F,O,W,j,R=new Date,L=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),J=this._get(t,"hideIfNoPrevNext"),Q=this._get(t,"navigationAsDateFormat"),K=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),U=this._get(t,"stepMonths"),q=1!==K[0]||1!==K[1],X=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),$=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),$)for(e=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-K[0]*K[1]+1,$.getDate())),e=G&&G>e?G:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=Q?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-U,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,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-"+(Y?"e":"w")+"'>"+i+"</span></a>":J?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=Q?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+U,1)),this._getFormatConfig(t)):n,a=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":J?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",r=this._get(t,"currentText"),o=this._get(t,"gotoCurrent")&&t.currentDay?X:L,r=Q?this.formatDate(r,o,this._getFormatConfig(t)):r,h=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>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=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="",k=0;K[0]>k;k++){for(x="",this.maxRows=4,D=0;K[1]>D;D++){if(T=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),C=" ui-corner-all",S="",q){if(S+="<div class='ui-datepicker-group",K[1]>1)switch(D){case 0:S+=" ui-datepicker-group-first",C=" ui-corner-"+(Y?"right":"left");break;case K[1]-1:S+=" ui-datepicker-group-last",C=" ui-corner-"+(Y?"left":"right");break;default:S+=" ui-datepicker-group-middle",C=""}S+="'>"}for(S+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+C+"'>"+(/all|left/.test(C)&&0===k?Y?a:s:"")+(/all|right/.test(C)&&0===k?Y?s:a:"")+this._generateMonthYearHeader(t,Z,te,G,$,k>0||D>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",M=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)N=(w+c)%7,M+="<th"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[N]+"'>"+p[N]+"</span></th>";for(S+=M+"</tr></thead><tbody>",I=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,I)),P=(this._getFirstDayOfMonth(te,Z)-c+7)%7,A=Math.ceil((P+I)/7),z=q?this.maxRows>A?this.maxRows:A:A,this.maxRows=z,H=this._daylightSavingAdjust(new Date(te,Z,1-P)),E=0;z>E;E++){for(S+="<tr>",F=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(H)+"</td>":"",w=0;7>w;w++)O=g?g.apply(t.input?t.input[0]:null,[H]):[!0,""],W=H.getMonth()!==Z,j=W&&!_||!O[0]||G&&G>H||$&&H>$,F+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(W?" ui-datepicker-other-month":"")+(H.getTime()===T.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===H.getTime()&&b.getTime()===T.getTime()?" "+this._dayOverClass:"")+(j?" "+this._unselectableClass+" ui-state-disabled":"")+(W&&!v?"":" "+O[1]+(H.getTime()===X.getTime()?" "+this._currentClass:"")+(H.getTime()===L.getTime()?" ui-datepicker-today":""))+"'"+(W&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"'")+"'")+(j?"":" data-handler='selectDay' data-event='click' data-month='"+H.getMonth()+"' data-year='"+H.getFullYear()+"'")+">"+(W&&!v?" ":j?"<span class='ui-state-default'>"+H.getDate()+"</span>":"<a class='ui-state-default"+(H.getTime()===L.getTime()?" ui-state-highlight":"")+(H.getTime()===X.getTime()?" ui-state-active":"")+(W?" ui-priority-secondary":"")+"' href='#'>"+H.getDate()+"</a>")+"</td>",H.setDate(H.getDate()+1),H=this._daylightSavingAdjust(H);S+=F+"</tr>"}Z++,Z>11&&(Z=0,te++),S+="</tbody></table>"+(q?"</div>"+(K[0]>0&&D===K[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=S}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,a,r,o){var h,l,c,u,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(a||!g)y+="<span class='ui-datepicker-month'>"+r[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+o[c]+"</option>"); 110y+="</select>"}if(_||(b+=y+(!a&&g&&v?"":" ")),!t.yearshtml)if(t.yearshtml="",a||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=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(u[0]),m=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.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+=(!a&&g&&v?"":" ")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),a=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,a)));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"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),a=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(t,a)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),a=this._getMinMaxDate(t,"max"),r=null,o=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=s),i[1].match(/[+\-].*/)&&(o+=s)),(!n||e.getTime()>=n.getTime())&&(!a||e.getTime()<=a.getTime())&&(!r||e.getFullYear()>=r)&&(!o||o>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),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.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="1.10.2",window["DP_jQuery_"+o]=t})(jQuery);
110; 111(function ($) { 112 113/** 114 * Attaches language support to the jQuery UI datepicker component. 115 */ 116Drupal.behaviors.localeDatepicker = { 117 attach: function(context, settings) { 118 // This code accesses Drupal.settings and localized strings via Drupal.t(). 119 // So this code should run after these are initialized. By placing it in an 120 // attach behavior this is assured. 121 $.datepicker.regional['drupal-locale'] = $.extend({ 122 closeText: Drupal.t('Done'), 123 prevText: Drupal.t('Prev'), 124 nextText: Drupal.t('Next'), 125 currentText: Drupal.t('Today'), 126 monthNames: [ 127 Drupal.t('January'), 128 Drupal.t('February'), 129 Drupal.t('March'), 130 Drupal.t('April'), 131 Drupal.t('May'), 132 Drupal.t('June'), 133 Drupal.t('July'), 134 Drupal.t('August'), 135 Drupal.t('September'), 136 Drupal.t('October'), 137 Drupal.t('November'), 138 Drupal.t('December') 139 ], 140 monthNamesShort: [ 141 Drupal.t('Jan'), 142 Drupal.t('Feb'), 143 Drupal.t('Mar'), 144 Drupal.t('Apr'), 145 Drupal.t('May'), 146 Drupal.t('Jun'), 147 Drupal.t('Jul'), 148 Drupal.t('Aug'), 149 Drupal.t('Sep'), 150 Drupal.t('Oct'), 151 Drupal.t('Nov'), 152 Drupal.t('Dec') 153 ], 154 dayNames: [ 155 Drupal.t('Sunday'), 156 Drupal.t('Monday'), 157 Drupal.t('Tuesday'), 158 Drupal.t('Wednesday'), 159 Drupal.t('Thursday'), 160 Drupal.t('Friday'), 161 Drupal.t('Saturday') 162 ], 163 dayNamesShort: [ 164 Drupal.t('Sun'), 165 Drupal.t('Mon'), 166 Drupal.t('Tue'), 167 Drupal.t('Wed'), 168 Drupal.t('Thu'), 169 Drupal.t('Fri'), 170 Drupal.t('Sat') 171 ], 172 dayNamesMin: [ 173 Drupal.t('Su'), 174 Drupal.t('Mo'), 175 Drupal.t('Tu'), 176 Drupal.t('We'), 177 Drupal.t('Th'), 178 Drupal.t('Fr'), 179 Drupal.t('Sa') 180 ], 181 dateFormat: Drupal.t('mm/dd/yy'), 182 firstDay: 0, 183 isRTL: 0 184 }, Drupal.settings.jquery.ui.datepicker); 185 $.datepicker.setDefaults($.datepicker.regional['drupal-locale']); 186 } 187}; 188 189})(jQuery); 190; 191(function ($) { 192 193/** 194 * Provides Ajax page updating via jQuery $.ajax (Asynchronous JavaScript and XML). 195 * 196 * Ajax is a method of making a request via JavaScript while viewing an HTML 197 * page. The request returns an array of commands encoded in JSON, which is 198 * then executed to make any changes that are necessary to the page. 199 * 200 * Drupal uses this file to enhance form elements with #ajax['path'] and 201 * #ajax['wrapper'] properties. If set, this file will automatically be included 202 * to provide Ajax capabilities. 203 */ 204 205Drupal.ajax = Drupal.ajax || {}; 206 207Drupal.settings.urlIsAjaxTrusted = Drupal.settings.urlIsAjaxTrusted || {}; 208 209/** 210 * Attaches the Ajax behavior to each Ajax form element. 211 */ 212Drupal.behaviors.AJAX = { 213 attach: function (context, settings) { 214 // Load all Ajax behaviors specified in the settings. 215 for (var base in settings.ajax) { 216 if (!$('#' + base + '.ajax-processed').length) { 217 var element_settings = settings.ajax[base]; 218 219 if (typeof element_settings.selector == 'undefined') { 220 element_settings.selector = '#' + base; 221 } 222 $(element_settings.selector).each(function () { 223 element_settings.element = this; 224 Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings); 225 }); 226 227 $('#' + base).addClass('ajax-processed'); 228 } 229 } 230 231 // Bind Ajax behaviors to all items showing the class. 232 $('.use-ajax:not(.ajax-processed)').addClass('ajax-processed').each(function () { 233 var element_settings = {}; 234 // Clicked links look better with the throbber than the progress bar. 235 element_settings.progress = { 'type': 'throbber' }; 236 237 // For anchor tags, these will go to the target of the anchor rather 238 // than the usual location. 239 if ($(this).attr('href')) { 240 element_settings.url = $(this).attr('href'); 241 element_settings.event = 'click'; 242 } 243 var base = $(this).attr('id'); 244 Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings); 245 }); 246 247 // This class means to submit the form to the action using Ajax. 248 $('.use-ajax-submit:not(.ajax-processed)').addClass('ajax-processed').each(function () { 249 var element_settings = {}; 250 251 // Ajax submits specified in this manner automatically submit to the 252 // normal form action. 253 element_settings.url = $(this.form).attr('action'); 254 // Form submit button clicks need to tell the form what was clicked so 255 // it gets passed in the POST request. 256 element_settings.setClick = true; 257 // Form buttons use the 'click' event rather than mousedown. 258 element_settings.event = 'click'; 259 // Clicked form buttons look better with the throbber than the progress bar. 260 element_settings.progress = { 'type': 'throbber' }; 261 262 var base = $(this).attr('id'); 263 Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings); 264 }); 265 } 266}; 267 268/** 269 * Ajax object. 270 * 271 * All Ajax objects on a page are accessible through the global Drupal.ajax 272 * object and are keyed by the submit button's ID. You can access them from 273 * your module's JavaScript file to override properties or functions. 274 * 275 * For example, if your Ajax enabled button has the ID 'edit-submit', you can 276 * redefine the function that is called to insert the new content like this 277 * (inside a Drupal.behaviors attach block): 278 * @code 279 * Drupal.behaviors.myCustomAJAXStuff = { 280 * attach: function (context, settings) { 281 * Drupal.ajax['edit-submit'].commands.insert = function (ajax, response, status) { 282 * new_content = $(response.data); 283 * $('#my-wrapper').append(new_content); 284 * alert('New content was appended to #my-wrapper'); 285 * } 286 * } 287 * }; 288 * @endcode 289 */ 290Drupal.ajax = function (base, element, element_settings) { 291 var defaults = { 292 url: 'system/ajax', 293 event: 'mousedown', 294 keypress: true, 295 selector: '#' + base, 296 effect: 'none', 297 speed: 'none', 298 method: 'replaceWith', 299 progress: { 300 type: 'throbber', 301 message: Drupal.t('Please wait...') 302 }, 303 submit: { 304 'js': true 305 } 306 }; 307 308 $.extend(this, defaults, element_settings); 309 310 this.element = element; 311 this.element_settings = element_settings; 312 313 // Replacing 'nojs' with 'ajax' in the URL allows for an easy method to let 314 // the server detect when it needs to degrade gracefully. 315 // There are five scenarios to check for: 316 // 1. /nojs/ 317 // 2. /nojs$ - The end of a URL string. 318 // 3. /nojs? - Followed by a query (with clean URLs enabled). 319 // E.g.: path/nojs?destination=foobar 320 // 4. /nojs& - Followed by a query (without clean URLs enabled). 321 // E.g.: ?q=path/nojs&destination=foobar 322 // 5. /nojs# - Followed by a fragment. 323 // E.g.: path/nojs#myfragment 324 this.url = element_settings.url.replace(/\/nojs(\/|$|\?|&|#)/g, '/ajax$1'); 325 // If the 'nojs' version of the URL is trusted, also trust the 'ajax' version. 326 if (Drupal.settings.urlIsAjaxTrusted[element_settings.url]) { 327 Drupal.settings.urlIsAjaxTrusted[this.url] = true; 328 } 329 330 this.wrapper = '#' + element_settings.wrapper; 331 332 // If there isn't a form, jQuery.ajax() will be used instead, allowing us to 333 // bind Ajax to links as well. 334 if (this.element.form) { 335 this.form = $(this.element.form); 336 } 337 338 // Set the options for the ajaxSubmit function. 339 // The 'this' variable will not persist inside of the options object. 340 var ajax = this; 341 ajax.options = { 342 url: Drupal.sanitizeAjaxUrl(ajax.url), 343 data: ajax.submit, 344 beforeSerialize: function (element_settings, options) { 345 return ajax.beforeSerialize(element_settings, options); 346 }, 347 beforeSubmit: function (form_values, element_settings, options) { 348 ajax.ajaxing = true; 349 return ajax.beforeSubmit(form_values, element_settings, options); 350 }, 351 beforeSend: function (xmlhttprequest, options) { 352 ajax.ajaxing = true; 353 return ajax.beforeSend(xmlhttprequest, options); 354 }, 355 success: function (response, status, xmlhttprequest) { 356 // Sanity check for browser support (object expected). 357 // When using iFrame uploads, responses must be returned as a string. 358 if (typeof response == 'string') { 359 response = $.parseJSON(response); 360 } 361 362 // Prior to invoking the response's commands, verify that they can be 363 // trusted by checking for a response header. See 364 // ajax_set_verification_header() for details. 365 // - Empty responses are harmless so can bypass verification. This avoids 366 // an alert message for server-generated no-op responses that skip Ajax 367 // rendering. 368 // - Ajax objects with trusted URLs (e.g., ones defined server-side via 369 // #ajax) can bypass header verification. This is especially useful for 370 // Ajax with multipart forms. Because IFRAME transport is used, the 371 // response headers cannot be accessed for verification. 372 if (response !== null && !Drupal.settings.urlIsAjaxTrusted[ajax.url]) { 373 if (xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token') !== '1') { 374 var customMessage = Drupal.t("The response failed verification so will not be processed."); 375 return ajax.error(xmlhttprequest, ajax.url, customMessage); 376 } 377 } 378 379 return ajax.success(response, status); 380 }, 381 complete: function (xmlhttprequest, status) { 382 ajax.ajaxing = false;
383 if (status == 'error' || status == 'parsererror') { 384 return ajax.error(xmlhttprequest, ajax.url); 385 } 386 }, 387 dataType: 'json', 388 jsonp: false, 389 type: 'POST' 390 }; 391 392 // For multipart forms (e.g., file uploads), jQuery Form targets the form 393 // submission to an iframe instead of using an XHR object. The initial "src" 394 // of the iframe, prior to the form submission, is set to options.iframeSrc. 395 // "about:blank" is the semantically correct, standards-compliant, way to 396 // initialize a blank iframe; however, some old IE versions (possibly only 6) 397 // incorrectly report a mixed content warning when iframes with an 398 // "about:blank" src are added to a parent document with an https:// origin. 399 // jQuery Form works around this by defaulting to "javascript:false" instead, 400 // but that breaks on Chrome 83, so here we force the semantically correct 401 // behavior for all browsers except old IE. 402 // @see https://www.drupal.org/project/drupal/issues/3143016 403 // @see https://github.com/jquery-form/form/blob/df9cb101b9c9c085c8d75ad980c7ff1cf62063a1/jquery.form.js#L68 404 // @see https://bugs.chromium.org/p/chromium/issues/detail?id=1084874 405 // @see https://html.spec.whatwg.org/multipage/browsers.html#creating-browsing-contexts 406 // @see https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy 407 if (navigator.userAgent.indexOf("MSIE") === -1) { 408 ajax.options.iframeSrc = 'about:blank'; 409 } 410 411 // Bind the ajaxSubmit function to the element event. 412 $(ajax.element).bind(element_settings.event, function (event) { 413 if (!Drupal.settings.urlIsAjaxTrusted[ajax.url] && !Drupal.urlIsLocal(ajax.url)) { 414 throw new Error(Drupal.t('The callback URL is not local and not trusted: !url', {'!url': ajax.url})); 415 } 416 return ajax.eventResponse(this, event); 417 }); 418 419 // If necessary, enable keyboard submission so that Ajax behaviors 420 // can be triggered through keyboard input as well as e.g. a mousedown 421 // action. 422 if (element_settings.keypress) { 423 $(ajax.element).keypress(function (event) { 424 return ajax.keypressResponse(this, event); 425 }); 426 } 427 428 // If necessary, prevent the browser default action of an additional event. 429 // For example, prevent the browser default action of a click, even if the 430 // AJAX behavior binds to mousedown. 431 if (element_settings.prevent) { 432 $(ajax.element).bind(element_settings.prevent, false); 433 } 434}; 435 436/** 437 * Handle a key press. 438 * 439 * The Ajax object will, if instructed, bind to a key press response. This 440 * will test to see if the key press is valid to trigger this event and 441 * if it is, trigger it for us and prevent other keypresses from triggering. 442 * In this case we're handling RETURN and SPACEBAR keypresses (event codes 13 443 * and 32. RETURN is often used to submit a form when in a textfield, and 444 * SPACE is often used to activate an element without submitting. 445 */ 446Drupal.ajax.prototype.keypressResponse = function (element, event) { 447 // Create a synonym for this to reduce code confusion. 448 var ajax = this; 449 450 // Detect enter key and space bar and allow the standard response for them, 451 // except for form elements of type 'text' and 'textarea', where the 452 // spacebar activation causes inappropriate activation if #ajax['keypress'] is 453 // TRUE. On a text-type widget a space should always be a space. 454 if (event.which == 13 || (event.which == 32 && element.type != 'text' && element.type != 'textarea')) { 455 $(ajax.element_settings.element).trigger(ajax.element_settings.event); 456 return false; 457 } 458}; 459 460/** 461 * Handle an event that triggers an Ajax response. 462 * 463 * When an event that triggers an Ajax response happens, this method will 464 * perform the actual Ajax call. It is bound to the event using 465 * bind() in the constructor, and it uses the options specified on the 466 * ajax object. 467 */ 468Drupal.ajax.prototype.eventResponse = function (element, event) { 469 // Create a synonym for this to reduce code confusion. 470 var ajax = this; 471 472 // Do not perform another ajax command if one is already in progress. 473 if (ajax.ajaxing) { 474 return false; 475 } 476 477 try { 478 if (ajax.form) { 479 // If setClick is set, we must set this to ensure that the button's 480 // value is passed. 481 if (ajax.setClick) { 482 // Mark the clicked button. 'form.clk' is a special variable for 483 // ajaxSubmit that tells the system which element got clicked to 484 // trigger the submit. Without it there would be no 'op' or
485 // equivalent. 486 element.form.clk = element; 487 } 488 489 ajax.form.ajaxSubmit(ajax.options); 490 } 491 else { 492 ajax.beforeSerialize(ajax.element, ajax.options); 493 $.ajax(ajax.options); 494 } 495 } 496 catch (e) { 497 // Unset the ajax.ajaxing flag here because it won't be unset during 498 // the complete response. 499 ajax.ajaxing = false; 500 alert("An error occurred while attempting to process " + ajax.options.url + ": " + e.message); 501 } 502 503 // For radio/checkbox, allow the default event. On IE, this means letting 504 // it actually check the box. 505 if (typeof element.type != 'undefined' && (element.type == 'checkbox' || element.type == 'radio')) { 506 return true; 507 } 508 else { 509 return false; 510 } 511 512}; 513 514/** 515 * Handler for the form serialization. 516 * 517 * Runs before the beforeSend() handler (see below), and unlike that one, runs 518 * before field data is collected. 519 */ 520Drupal.ajax.prototype.beforeSerialize = function (element, options) { 521 // Allow detaching behaviors to update field values before collecting them. 522 // This is only needed when field values are added to the POST data, so only 523 // when there is a form such that this.form.ajaxSubmit() is used instead of 524 // $.ajax(). When there is no form and $.ajax() is used, beforeSerialize() 525 // isn't called, but don't rely on that: explicitly check this.form. 526 if (this.form) { 527 var settings = this.settings || Drupal.settings; 528 Drupal.detachBehaviors(this.form, settings, 'serialize'); 529 } 530 531 // Prevent duplicate HTML ids in the returned markup. 532 // @see drupal_html_id() 533 options.data['ajax_html_ids[]'] = []; 534 $('[id]').each(function () { 535 options.data['ajax_html_ids[]'].push(this.id); 536 }); 537 538 // Allow Drupal to return new JavaScript and CSS files to load without 539 // returning the ones already loaded. 540 // @see ajax_base_page_theme() 541 // @see drupal_get_css() 542 // @see drupal_get_js() 543 options.data['ajax_page_state[theme]'] = Drupal.settings.ajaxPageState.theme; 544 options.data['ajax_page_state[theme_token]'] = Drupal.settings.ajaxPageState.theme_token; 545 for (var key in Drupal.settings.ajaxPageState.css) { 546 options.data['ajax_page_state[css][' + key + ']'] = 1; 547 } 548 for (var key in Drupal.settings.ajaxPageState.js) { 549 options.data['ajax_page_state[js][' + key + ']'] = 1; 550 } 551}; 552 553/** 554 * Modify form values prior to form submission. 555 */ 556Drupal.ajax.prototype.beforeSubmit = function (form_values, element, options) { 557 // This function is left empty to make it simple to override for modules 558 // that wish to add functionality here. 559}; 560 561/** 562 * Prepare the Ajax request before it is sent. 563 */ 564Drupal.ajax.prototype.beforeSend = function (xmlhttprequest, options) { 565 // For forms without file inputs, the jQuery Form plugin serializes the form 566 // values, and then calls jQuery's $.ajax() function, which invokes this 567 // handler. In this circumstance, options.extraData is never used. For forms 568 // with file inputs, the jQuery Form plugin uses the browser's normal form 569 // submission mechanism, but captures the response in a hidden IFRAME. In this 570 // circumstance, it calls this handler first, and then appends hidden fields 571 // to the form to submit the values in options.extraData. There is no simple 572 // way to know which submission mechanism will be used, so we add to extraData 573 // regardless, and allow it to be ignored in the former case. 574 if (this.form) { 575 options.extraData = options.extraData || {}; 576 577 // Let the server know when the IFRAME submission mechanism is used. The 578 // server can use this information to wrap the JSON response in a TEXTAREA, 579 // as per http://jquery.malsup.com/form/#file-upload. 580 options.extraData.ajax_iframe_upload = '1'; 581 582 // The triggering element is about to be disabled (see below), but if it 583 // contains a value (e.g., a checkbox, textfield, select, etc.), ensure that 584 // value is included in the submission. As per above, submissions that use 585 // $.ajax() are already serialized prior to the element being disabled, so 586 // this is only needed for IFRAME submissions. 587 var v = $.fieldValue(this.element); 588 if (v !== null) { 589 options.extraData[this.element.name] = Drupal.checkPlain(v); 590 } 591 } 592 593 // Disable the element that received the change to prevent user interface 594 // interaction while the Ajax request is in progress. ajax.ajaxing prevents 595 // the element from triggering a new request, but does not prevent the user 596 // from changing its value. 597 $(this.element).addClass('progress-disabled').attr('disabled', true); 598 599 // Insert progressbar or throbber. 600 if (this.progress.type == 'bar') { 601 var progressBar = new Drupal.progressBar('ajax-progress-' + this.element.i
601d, eval(this.progress.update_callback), this.progress.method, eval(this.progress.error_callback)); 602 if (this.progress.message) { 603 progressBar.setProgress(-1, this.progress.message); 604 } 605 if (this.progress.url) { 606 progressBar.startMonitoring(this.progress.url, this.progress.interval || 1500); 607 } 608 this.progress.element = $(progressBar.element).addClass('ajax-progress ajax-progress-bar'); 609 this.progress.object = progressBar; 610 $(this.element).after(this.progress.element); 611 } 612 else if (this.progress.type == 'throbber') { 613 this.progress.element = $('<div class="ajax-progress ajax-progress-throbber"><div class="throbber"> </div></div>'); 614 if (this.progress.message) { 615 $('.throbber', this.progress.element).after('<div class="message">' + this.progress.message + '</div>'); 616 } 617 $(this.element).after(this.progress.element); 618 } 619}; 620 621/** 622 * Handler for the form redirection completion. 623 */ 624Drupal.ajax.prototype.success = function (response, status) { 625 // Remove the progress element. 626 if (this.progress.element) { 627 $(this.progress.element).remove(); 628 } 629 if (this.progress.object) { 630 this.progress.object.stopMonitoring(); 631 } 632 $(this.element).removeClass('progress-disabled').removeAttr('disabled'); 633 634 Drupal.freezeHeight(); 635 636 for (var i in response) { 637 if (response.hasOwnProperty(i) && response[i]['command'] && this.commands[response[i]['command']]) { 638 this.commands[response[i]['command']](this, response[i], status); 639 } 640 } 641 642 // Reattach behaviors, if they were detached in beforeSerialize(). The 643 // attachBehaviors() called on the new content from processing the response 644 // commands is not sufficient, because behaviors from the entire form need 645 // to be reattached. 646 if (this.form) { 647 var settings = this.settings || Drupal.settings; 648 Drupal.attachBehaviors(this.form, settings); 649 } 650 651 Drupal.unfreezeHeight(); 652 653 // Remove any response-specific settings so they don't get used on the next 654 // call by mistake. 655 this.settings = null; 656}; 657 658/** 659 * Build an effect object which tells us how to apply the effect when adding new HTML. 660 */ 661Drupal.ajax.prototype.getEffect = function (response) { 662 var type = response.effect || this.effect; 663 var speed = response.speed || this.speed; 664 665 var effect = {}; 666 if (type == 'none') { 667 effect.showEffect = 'show'; 668 effect.hideEffect = 'hide'; 669 effect.showSpeed = ''; 670 } 671 else if (type == 'fade') { 672 effect.showEffect = 'fadeIn'; 673 effect.hideEffect = 'fadeOut'; 674 effect.showSpeed = speed; 675 } 676 else { 677 effect.showEffect = type + 'Toggle'; 678 effect.hideEffect = type + 'Toggle'; 679 effect.showSpeed = speed; 680 } 681 682 return effect; 683}; 684 685/** 686 * Handler for the form redirection error. 687 */ 688Drupal.ajax.prototype.error = function (xmlhttprequest, uri, customMessage) { 689 Drupal.displayAjaxError(Drupal.ajaxError(xmlhttprequest, uri, customMessage)); 690 // Remove the progress element. 691 if (this.progress.element) { 692 $(this.progress.element).remove(); 693 } 694 if (this.progress.object) { 695 this.progress.object.stopMonitoring(); 696 } 697 // Undo hide. 698 $(this.wrapper).show(); 699 // Re-enable the element. 700 $(this.element).removeClass('progress-disabled').removeAttr('disabled'); 701 // Reattach behaviors, if they were detached in beforeSerialize(). 702 if (this.form) { 703 var settings = this.settings || Drupal.settings; 704 Drupal.attachBehaviors(this.form, settings); 705 } 706}; 707 708/** 709 * Provide a series of commands that the server can request the client perform. 710 */ 711Drupal.ajax.prototype.commands = { 712 /** 713 * Command to insert new content into the DOM. 714 */ 715 insert: function (ajax, response, status) { 716 // Get information from the response. If it is not there, default to 717 // our presets. 718 var wrapper = response.selector ? $(response.selector) : $(ajax.wrapper); 719 var method = response.method || ajax.method; 720 var effect = ajax.getEffect(response); 721 722 // We don't know what response.data contains: it might be a string of text 723 // without HTML, so don't rely on jQuery correctly iterpreting 724 // $(response.data) as new HTML rather than a CSS selector. Also, if 725 // response.data contains top-level text nodes, they get lost with either 726 // $(response.data) or $('<div></div>').replaceWith(response.data). 727 var new_content_wrapped = $('<div></div>').html(response.data); 728 var new_content = new_content_wrapped.contents(); 729 730 // For legacy reasons, the effects processing code assumes that new_content 731 // consists of a single top-level element. Also, it has not been 732 // sufficiently tested whether attachBehaviors() can be successfully called 733 // with a context object that includes top-level text nodes. However, to 734 // give developers full control of the HTML appearing in the page, and to 735 // enable Ajax content to be inserted in places where DIV elements are not 736 // allowed (e.g., within TABLE, TR, and SPAN parents), we check if the new 737 // content satisfies the requirement of a single top-level element, and 738 // only use the container DIV created above when it doesn't. For more 739 // information, please see http://drupal.org/node/736066. 740 if (new_content.length != 1 || new_content.get(0).nodeType != 1) { 741 new_content = new_content_wrapped; 742 } 743 744 // If removing content from the wrapper, detach behaviors first. 745 switch (method) { 746 case 'html': 747 case 'replaceWith': 748 case 'replaceAll': 749 case 'empty': 750 case 'remove': 751 var settings = response.settings || ajax.settings || Drupal.settings; 752 Drupal.detachBehaviors(wrapper, settings); 753 } 754 755 // Add the new content to the page. 756 wrapper[method](new_content); 757 758 // Immediately hide the new content if we're using any effects. 759 if (effect.showEffect != 'show') { 760 new_content.hide(); 761 } 762 763 // Determine which effect to use and what content will receive the 764 // effect, then show the new content. 765 if ($('.ajax-new-content', new_content).length > 0) { 766 $('.ajax-new-content', new_content).hide(); 767 new_content.show(); 768 $('.ajax-new-content', new_content)[effect.showEffect](effect.showSpeed); 769 } 770 else if (effect.showEffect != 'show') { 771 new_content[effect.showEffect](effect.showSpeed); 772 } 773 774 // Attach all JavaScript behaviors to the new content, if it was successfully 775 // added to the page, this if statement allows #ajax['wrapper'] to be 776 // optional. 777 if (new_content.parents('html').length > 0) { 778 // Apply any settings from the returned JSON if available. 779 var settings = response.settings || ajax.settings || Drupal.settings; 780 Drupal.attachBehaviors(new_content, settings); 781 } 782 }, 783 784 /** 785 * Command to remove a chunk from the page. 786 */ 787 remove: function (ajax, response, status) { 788 var settings = response.settings || ajax.settings || Drupal.settings; 789 Drupal.detachBehaviors($(response.selector), settings); 790 $(response.selector).remove(); 791 }, 792 793 /** 794 * Command to mark a chunk changed. 795 */ 796 changed: function (ajax, response, status) { 797 if (!$(response.selector).hasClass('ajax-changed')) { 798 $(response.selector).addClass('ajax-changed'); 799 if (response.asterisk) { 800 $(response.selector).find(response.asterisk).append(' <span class="ajax-changed">*</span> '); 801 } 802 } 803 }, 804 805 /** 806 * Command to provide an alert. 807 */ 808 alert: function (ajax, response, status) { 809 alert(response.text, response.title); 810 }, 811 812 /** 813 * Command to provide the jQuery css() function. 814 */ 815 css: function (ajax, response, status) { 816 $(response.selector).css(response.argument); 817 }, 818 819 /** 820 * Command to set the settings that will be used for other commands in this response. 821 */ 822 settings: function (ajax, response, status) { 823 if (response.merge) { 824 $.extend(true, Drupal.settings, response.settings); 825 } 826 else { 827 ajax.settings = response.settings; 828 } 829 }, 830 831 /** 832 * Command to attach data using jQuery's data API. 833 */ 834 data: function (ajax, response, status) { 835 $(response.selector).data(response.name, response.value); 836 }, 837 838 /** 839 * Command to apply a jQuery method. 840 */ 841 invoke: function (ajax, response, status) { 842 var $element = $(response.selector); 843 $element[response.method].apply($element, response.arguments); 844 }, 845 846 /** 847 * Command to restripe a table. 848 */ 849 restripe: function (ajax, response, status) { 850 // :even and :odd are reversed because jQuery counts from 0 and 851 // we count from 1, so we're out of sync. 852 // Match immediate children of the parent element to allow nesting. 853 $('> tbody > tr:visible, > tr:visible', $(response.selector)) 854 .removeClass('odd even') 855 .filter(':even').addClass('odd').end() 856 .filter(':odd').addClass('even'); 857 }, 858 859 /** 860 * Command to add css. 861 * 862 * Uses the proprietary addImport method if available as browsers which 863 * support that method ignore @import statements in dynamically added 864 * stylesheets. 865 */ 866 add_css: function (ajax, response, status) { 867 // Add the styles in the normal way. 868 $('head').prepend(response.data); 869 // Add imports in the styles using the addImport method if available. 870 var match, importMatch = /^@import url\("(.*)"\);$/igm; 871 if (document.styleSheets[0].addImport && importMatch.test(response.data)) { 872 importMatch.lastIndex = 0; 873 while (match = importMatch.exec(response.data)) { 874 document.styleSheets[0].addImport(match[1]); 875 } 876 } 877 }, 878 879 /** 880 * Command to update a form's build ID. 881 */ 882 updateBuildId: function(ajax, response, status) { 883 $('input[name="form_build_id"][value="' + response['old'] + '"]').val(response['new']); 884 } 885}; 886 887})(jQuery); 888; 889(function (D) { 890 var beforeSerialize = D.ajax.prototype.beforeSerialize;
891 D.ajax.prototype.beforeSerialize = function (element, options) { 892 beforeSerialize.call(this, element, options); 893 options.data['ajax_page_state[jquery_version]'] = D.settings.ajaxPageState.jquery_version; 894 } 895})(Drupal); 896;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.