| a’,property:”@ACTIONS@“,sortable:!1,width:this.list_actions_width};d.push(p)}for(l=(h=e(‘ ’)).find(”tr“),a=0,r=d.length;aCHECKBOX0)){var o=this.$canvas.find(”.repeater-list-wrapper“).outerWidth();for(n=Math.floor((o-a)/s),i=0;in&&(n=r[i].minWidth),r[i].col.outerWidth(n),this.list_columns[r[i].index]._auto_width=n}},d=function(){var e=window.navigator.userAgent,t=e.indexOf(”MSIE “),i=e.indexOf(”Firefox“);return t>0?”ie-“+parseInt(e.substring(t+5,e.indexOf(”.“,t)),10):i>0?”firefox“:”“},h=function(){var e=”.repeater-list-wrapper > table .selected“,t=this.$element.find(”.table-actions“);”action“===this.viewOptions.list_selectable&&(e=”.repeater-list-wrapper > table tr“),this.$canvas.find(e).length>0?t.find(”thead .btn“).removeAttr(”disabled“):t.find(”thead .btn“).attr(”disabled“,”disabled“)}}(e),function(e){function t(t,i){for(var s=!1;!s&&i.search(”{{“)>=0;)!function(){var n,a,r;a=i.indexOf(”{{“),n=i.indexOf(”}}“,a+2),a>-1&&n>-1?(r=e.trim(i.substring(a+2,n)),r=void 0!==t[r]?t[r]:”“,i=i.substring(0,a)+r+i.substring(n+2)):s=!0}();return i}e.fn.repeater&&(e.fn.repeater.Constructor.prototype.thumbnail_clearSelectedItems=function(){this.$canvas.find(”.repeater-thumbnail-cont .selectable.selected“).removeClass(”selected“)},e.fn.repeater.Constructor.prototype.thumbnail_getSelectedItems=function(){var t=[];return this.$canvas.find(”.repeater-thumbnail-cont .selectable.selected“).each(function(){t.push(e(this))}),t},e.fn.repeater.Constructor.prototype.thumbnail_setSelectedItems=function(t,i){function s(e,t){(t=void 0===t||t)?(i||”multi“===o||d.thumbnail_clearSelectedItems(),e.addClass(”selected“)):e.removeClass(”selected“)}var n,a,r,l,o=this.viewOptions.thumbnail_selectable,d=this;for(e.isArray(t)||(t=[t]),r=!0===i||”multi“===o?t.length:o&&t.length>0?1:0,n=0;n0&&s(a,t[n].selected)):t[n].selector&&this.$canvas.find(”.repeater-thumbnail-cont .selectable“).each(function(){(a=e(this)).is(t[n].selector)&&s(a,t[n].selected)})},e.fn.repeater.defaults=e.extend({},e.fn.repeater.defaults,{thumbnail_alignment:”left“,thumbnail_infiniteScroll:!1,thumbnail_itemRendered:null,thumbnail_noItemsHTML:”no items found“,thumbnail_selectable:!1,thumbnail_template:‘ {{name}} ’}),e.fn.repeater.viewTypes.thumbnail={selected:function(){var e,t=this.viewOptions.thumbnail_infiniteScroll;t&&(e=”object“==typeof t?t:{},this.infiniteScrolling(!0,e))},before:function(t){var i,s=this.viewOptions.thumbnail_alignment,n=this.$canvas.find(”.repeater-thumbnail-cont“),a=t.data,r={};return n.length<1?(n=e('’),s&&”none“!==s?(s={center:1,justify:1,left:1,right:1}[s”>@“===e.property})?s:”justify“,n.addClass(”align-“+s),this.thumbnail_injectSpacers=!0):this.thumbnail_injectSpacers=!1,r.item=n):r.action=”none“,a.items&&a.items.length<1?((i=e('<div class=”empty“></div>')).append(this.viewOptions.thumbnail_noItemsHTML),n.append(i)):n.find(”.empty:first“).remove(),r},renderItem:function(i){var s=this.viewOptions.thumbnail_selectable,n=this,a=e(t(i.subset,this.viewOptions.thumbnail_template));return a.data(”item_data“,i.data.items),s&&(a.addClass(”selectable“),a.on(”click“,function(){n.isDisabled||(a.hasClass(”selected“)?(a.removeClass(”selected“),n.$element.trigger(”deselected.fu.repeaterThumbnail“,a)):(”multi“!==s&&n.$canvas.find(”.repeater-thumbnail-cont .selectable.selected“).each(function(){var t=e(this);t.removeClass(”selected“),n.$element.trigger(”deselected.fu.repeaterThumbnail“,t)}),a.addClass(”selected“),n.$element.trigger(”selected.fu.repeaterThumbnail“,a)))})),i.container.append(a),this.thumbnail_injectSpacers&&a.after('<span class=”spacer“> </span>'),this.viewOptions.thumbnail_itemRendered&&this.viewOptions.thumbnail_itemRendered({container:i.container,item:a,itemData:i.subset},function(){}),!1}})}(e),function(e){var t=e.fn.scheduler,i=function(t,i){var s=this;this.$element=e(t),this.options=e.extend({},e.fn.scheduler.defaults,i),this.$startDate=this.$element.find(”.start-datetime .start-date“),this.$startTime=this.$element.find(”.start-datetime .start-time“),this.$timeZone=this.$element.find(”.timezone-container .timezone“),this.$repeatIntervalPanel=this.$element.find(”.repeat-every-panel“),this.$repeatIntervalSelect=this.$element.find(”.repeat-options“),this.$repeatIntervalSpinbox=this.$element.find(”.repeat-every“),this.$repeatIntervalTxt=this.$element.find(”.repeat-every-text“),this.$end=this.$element.find(”.repeat-end“),this.$endSelect=this.$end.find(”.end-options“),this.$endAfter=this.$end.find(”.end-after“),this.$endDate=this.$end.find(”.end-on-date“),this.$recurrencePanels=this.$element.find(”.repeat-panel“),this.$repeatIntervalSelect.selectlist(),this.$element.find(”.selectlist“).selectlist(),this.$startDate.datepicker(this.options.startDateOptions);var n=”function“==typeof this.options.startDateChanged?this.options.startDateChanged:this._guessEndDate;this.$startDate.on(”change changed.fu.datepicker dateClicked.fu.datepicker“,e.proxy(n,this)),this.$startTime.combobox(),”“===this.$startTime.find(”input“).val()&&this.$startTime.combobox(”selectByIndex“,0),”0“===this.$repeatIntervalSpinbox.find(”input“).val()?this.$repeatIntervalSpinbox.spinbox({value:1,min:1,limitToStep:!0}):this.$repeatIntervalSpinbox.spinbox({min:1,limitToStep:!0}),this.$endAfter.spinbox({value:1,min:1,limitToStep:!0}),this.$endDate.datepicker(this.options.endDateOptions),this.$element.find(”.radio-custom“).radio(),this.$repeatIntervalSelect.on(”changed.fu.selectlist“,e.proxy(this.repeatIntervalSelectChanged,this)),this.$endSelect.on(”changed.fu.selectlist“,e.proxy(this.endSelectChanged,this)),this.$element.find(”.repeat-days-of-the-week .btn-group .btn“).on(”change.fu.scheduler“,function(e,t){s.changed(e,t,!0)}),this.$element.find(”.combobox“).on(”changed.fu.combobox“,e.proxy(this.changed,this)),this.$element.find(”.datepicker“).on(”changed.fu.datepicker“,e.proxy(this.changed,this)),this.$element.find(”.datepicker“).on(”dateClicked.fu.datepicker“,e.proxy(this.changed,this)),this.$element.find(”.selectlist“).on(”changed.fu.selectlist“,e.proxy(this.changed,this)),this.$element.find(”.spinbox“).on(”changed.fu.spinbox“,e.proxy(this.changed,this)),this.$element.find(”.repeat-monthly .radio-custom, .repeat-yearly .radio-custom“).on(”change.fu.scheduler“,e.proxy(this.changed,this))},s=function(e,t){var i,s=”“;return s+=e.getFullYear(),s+=t,i=e.getMonth()+1,s+=i<10?”0“+i:i,s+=t,i=e.getDate(),s+=i<10?”0“+i:i},n={secondly:1e3,minutely:6e4,hourly:36e5,daily:864e5,weekly:6048e5,monthly:3024e6,yearly:314496e5},a=function(e,t,i,s){return new Date(e.getTime()+n*s)};i.prototype={constructor:i,destroy:function(){var t;return this.$element.find(”input“).each(function(){e(this).attr(”value“,e(this).val())}),this.$element.find(”.datepicker .calendar“).empty(),t=this.$element.outerHTML,this.$element.find(”.combobox“).combobox(”destroy“),this.$element.find(”.datepicker“).datepicker(”destroy“),this.$element.find(”.selectlist“).selectlist(”destroy“),this.$element.find(”.spinbox“).spinbox(”destroy“),this.$element.find(”.radio-custom“).radio(”destroy“),this.$element.remove(),t},changed:function(t,i,s){s||t.stopPropagation(),this.$element.trigger(”changed.fu.scheduler“,{data:void 0!==i?i:e(t.currentTarget).data(),originalEvent:t,value:this.getValue()})},disable:function(){this.toggleState(”disable“)},enable:function(){this.toggleState(”enable“)},setUtcTime:function(e,t,i){var s=e.split(”-“),n=t.split(”:“),a=new Date(Date.UTC(s,s-1,s,n,n,n?n:0));if(”Z“===i)a.setUTCHours(a.getUTCHours()+0);else{var r=[];r=”(.)“,r=”.*?“,r=”\d“,r=”.*?“,r=”(\d)“;var l=new RegExp(r.join(”“),).exec(i);if(null!==l){var o=l,d=l,h=”+“===o?1:-1;a.setUTCHours(a.getUTCHours()+h*parseInt(d,10))}}var c=a.getTimezoneOffset();return a.setMinutes©,a},endSelectChanged:function(e,t){var i;i=t?t.value:this.$endSelect.selectlist(”selectedItem“).value,this.$endAfter.parent().addClass(”hidden“),this.$endAfter.parent().attr(”aria-hidden“,”true“),this.$endDate.parent().addClass(”hidden“),this.$endDate.parent().attr(”aria-hidden“,”true“),”after“===i?(this.$endAfter.parent().removeClass(”hide hidden“),this.$endAfter.parent().attr(”aria-hidden“,”false“)):”date“===i&&(this.$endDate.parent().removeClass(”hide hidden“),this.$endDate.parent().attr(”aria-hidden“,”false“))},_guessEndDate:function(){var e=this.$repeatIntervalSelect.selectlist(”selectedItem“).value,t=new Date(this.$endDate.datepicker(”getDate“)),i=new Date(this.$startDate.datepicker(”getDate“)),s=this.$repeatIntervalSpinbox.find(”input“).val();”none“!==e&&t<=i&&(this.$repeatIntervalSpinbox.is(”:visible“)||(s=1),”weekdays“===e&&(s=1,e=”weekly“),t=a(i,0,e,s),this.$endDate.datepicker(”setDate“,t))},getValue:function(){var t,i=this.$repeatIntervalSpinbox.spinbox(”value“),n=”“,a=this.$repeatIntervalSelect.selectlist(”selectedItem“).value;t=this.$startTime.combobox(”selectedItem“).value?(t=this.$startTime.combobox(”selectedItem“).value).toLowerCase():this.$startTime.combobox(”selectedItem“).text.toLowerCase();var r,l,o,d,h,c,p,u=this.$timeZone.selectlist(”selectedItem“);c=”“+s(this.$startDate.datepicker(”getDate“),”-“),c+=”T“,l=t.search(”am“)>=0,o=t.search(”pm“)>=0,(t=e.trim(t.replace(/am/g,”“).replace(/pm/g,”“)).split(”:“))=parseInt(t,10),t=parseInt(t,10),l&&t>11?t=0:o&&t<12&&(t+=12),c+=t<10?”0“+t:t,c+=”:“,c+=t<10?”0“+t:t,c+=”+00:00“===u.offset?”Z“:u.offset,”none“===a?n=”FREQ=DAILY;INTERVAL=1;COUNT=1;“:”secondly“===a?(n=”FREQ=SECONDLY;“,n+=”INTERVAL=“i ”;“):”minutely“===a?(n=”FREQ=MINUTELY;“,n+=”INTERVAL=“i ”;“):”hourly“===a?(n=”FREQ=HOURLY;“,n+=”INTERVAL=“i ”;“):”daily“===a?(n+=”FREQ=DAILY;“,n+=”INTERVAL=“i ”;“):”weekdays“===a?(n+=”FREQ=WEEKLY;“,n+=”BYDAY=MO,TU,WE,TH,FR;“,n+=”INTERVAL=1;“):”weekly“===a?(r=[],this.$element.find(”.repeat-days-of-the-week .btn-group input:checked“).each(function(){r.push(e(this).data().value)}),n+=”FREQ=WEEKLY;“,n+=”BYDAY=“+r.join(”,“)+”;“,n+=”INTERVAL=“i ”;“):”monthly“===a?(n+=”FREQ=MONTHLY;“,n+=”INTERVAL=“i ”;“,”bymonthday“===(p=this.$element.find(”input:checked“).val())?n+=”BYMONTHDAY=“+parseInt(this.$element.find(”.repeat-monthly-date .selectlist“).selectlist(”selectedItem“).text,10)+”;“:”bysetpos“===p&&(r=this.$element.find(”.repeat-monthly-day .month-days“).selectlist(”selectedItem“).value,h=this.$element.find(”.repeat-monthly-day .month-day-pos“).selectlist(”selectedItem“).value,n+=”BYDAY=“r ”;“,n+=”BYSETPOS=“h ”;“)):”yearly“===a&&(n+=”FREQ=YEARLY;“,”bymonthday“===(p=this.$element.find(”input:checked“).val())?(n+=”BYMONTH=“+(d=this.$element.find(”.repeat-yearly-date .year-month“).selectlist(”selectedItem“).value)+”;“,n+=”BYMONTHDAY=“+this.$element.find(”.repeat-yearly-date .year-month-day“).selectlist(”selectedItem“).text+”;“):”bysetpos“===p&&(r=this.$element.find(”.repeat-yearly-day .year-month-days“).selectlist(”selectedItem“).value,h=this.$element.find(”.repeat-yearly-day .year-month-day-pos“).selectlist(”selectedItem“).value,d=this.$element.find(”.repeat-yearly-day .year-month“).selectlist(”selectedItem“).value,n+=”BYDAY=“r ”;“,n+=”BYSETPOS=“h ”;“,n+=”BYMONTH=“d ”;“));var f=this.$endSelect.selectlist(”selectedItem“).value,m=”“;return”none“!==a&&(”after“===f?m=”COUNT=“+this.$endAfter.spinbox(”value“)+”;“:”date“===f&&(m=”UNTIL=“+s(this.$endDate.datepicker(”getDate“),”“)+”;“)),{startDateTime:c,timeZone:u,recurrencePattern:n=”;“===(n+=m).substring(n.length-1)?n.substring(0,n.length-1):n}},repeatIntervalSelectChanged:function(e,t){var i,s,n;switch(t?(s=t.value,n=t.text):(s=(i=this.$repeatIntervalSelect.selectlist(”selectedItem“)).value||”“,n=i.text||”“),this.$repeatIntervalTxt.text(n),s.toLowerCase()){case”hourly“:case”daily“:case”weekly“:case”monthly“:this.$repeatIntervalPanel.removeClass(”hide hidden“),this.$repeatIntervalPanel.attr(”aria-hidden“,”false“);break;default:this.$repeatIntervalPanel.addClass(”hidden“),this.$repeatIntervalPanel.attr(”aria-hidden“,”true“)}this.$recurrencePanels.addClass(”hidden“),this.$recurrencePanels.attr(”aria-hidden“,”true“),this.$element.find(”.repeat-“+s).removeClass(”hide hidden“),this.$element.find(”.repeat-“+s).attr(”aria-hidden“,”false“),”none“===s?(this.$end.addClass(”hidden“),this.$end.attr(”aria-hidden“,”true“)):(this.$end.removeClass(”hide hidden“),this.$end.attr(”aria-hidden“,”false“)),this._guessEndDate()},_parseAndSetRecurrencePattern:function(e,t){var i,s,n,a,r={},l=0,o=”“,d=e.toUpperCase().split(”;“);for(l=0;l&&(r[(o=d.split(”=“))]=o);if(”DAILY“===r.FREQ)o=”MO,TU,WE,TH,FR“===r.BYDAY?”weekdays“:”1“===r.INTERVAL&&”1“===r.COUNT?”none“:”daily“;else if(”SECONDLY“===r.FREQ)o=”secondly“;else if(”MINUTELY“===r.FREQ)o=”minutely“;else if(”HOURLY“===r.FREQ)o=”hourly“;else if(”WEEKLY“===r.FREQ){if(o=”weekly“,r.BYDAY)if(”MO,TU,WE,TH,FR“===r.BYDAY)o=”weekdays“;else{var h=this.$element.find(”.repeat-days-of-the-week .btn-group“);for(h.find(”label“).removeClass(”active“),i=r.BYDAY.split(”,“),l=0;li[l]'”]').prop(“checked”,!0).parent().addClass(“active”)}}else if(“MONTHLY”===r.FREQ){if(this.$element.find(“.repeat-monthly input”).removeAttr(“checked”).removeClass(“checked”),this.$element.find(“.repeat-monthly label.radio-custom”).removeClass(“checked”),r.BYMONTHDAY)(s=this.$element.find(“.repeat-monthly-date”)).find(“input”).addClass(“checked”).prop(“checked”,!0),s.find(“label.radio-custom”).addClass(“checked”),s.find(“.selectlist”).selectlist(“selectByValue”,r.BYMONTHDAY);else if(r.BYDAY){var c=this.$element.find(“.repeat-monthly-day”);c.find(“input”).addClass(“checked”).prop(“checked”,!0),c.find(“label.radio-custom”).addClass(“checked”),r.BYSETPOS&&c.find(“.month-day-pos”).selectlist(“selectByValue”,r.BYSETPOS),c.find(“.month-days”).selectlist(“selectByValue”,r.BYDAY)}o=“monthly”}else“YEARLY”===r.FREQ?(this.$element.find(“.repeat-yearly input”).removeAttr(“checked”).removeClass(“checked”),this.$element.find(“.repeat-yearly label.radio-custom”).removeClass(“checked”),r.BYMONTHDAY?((n=this.$element.find(“.repeat-yearly-date”)).find(“input”).addClass(“checked”).prop(“checked”,!0),n.find(“label.radio-custom”).addClass(“checked”),r.BYMONTH&&n.find(“.year-month”).selectlist(“selectByValue”,r.BYMONTH),n.find(“.year-month-day”).selectlist(“selectByValue”,r.BYMONTHDAY)):r.BYSETPOS&&((a=this.$element.find(“.repeat-yearly-day”)).find(“input”).addClass(“checked”).prop(“checked”,!0),a.find(“label.radio-custom”).addClass(“checked”),a.find(“.year-month-day-pos”).selectlist(“selectByValue”,r.BYSETPOS),r.BYDAY&&a.find(“.year-month-days”).selectlist(“selectByValue”,r.BYDAY),r.BYMONTH&&a.find(“.year-month”).selectlist(“selectByValue”,r.BYMONTH)),o=“yearly”):o=“none”;if(r.COUNT)this.$endAfter.spinbox(“value”,parseInt(r.COUNT,10)),this.$endSelect.selectlist(“selectByValue”,“after”);else if(r.UNTIL){var p,u;8===r.UNTIL.length&&((p=r.UNTIL.split(“”)).splice(4,0,“-”),p.splice(7,0,“-”),u=p.join(“”));var f=this.$timeZone.selectlist(“selectedItem”),m=“+00:00”===f.offset?“Z”:f.offset,v=this.setUtcTime(u,t.time24HourFormat,m);this.$endDate.datepicker(“setDate”,v),this.$endSelect.selectlist(“selectByValue”,“date”)}else this.$endSelect.selectlist(“selectByValue”,“never”);this.endSelectChanged(),r.INTERVAL&&this.$repeatIntervalSpinbox.spinbox(“value”,parseInt(r.INTERVAL,10)),this.$repeatIntervalSelect.selectlist(“selectByValue”,o),this.repeatIntervalSelectChanged()},_parseStartDateTime:function(t){var i,s,n,a={};return a.time24HourFormat=t.split(“+”).split(“-”),t.search(/+/)>-1?a.timeZoneOffset=“+”+e.trim(t.split(“+”)):t.search(/-/)>-1?a.timeZoneOffset=“-”+e.trim(t.split(“-”)):a.timeZoneOffset=“+00:00”,a.time24HourFormatSplit=a.time24HourFormat.split(“:”),i=parseInt(a.time24HourFormatSplit,10),s=a.time24HourFormatSplit?parseInt(a.time24HourFormatSplit.split(“+”).split(“-”).split(“Z”),10):0,n=i<12?“AM”:“PM”,0===i?i=12:i>12&&(i-=12),s=s<10?“0”+s:s,a.time12HourFormat=i+“:”+s,a.time12HourFormatWithPeriod=i+“:”s “ ”+n,a},_parseTimeZone:function(t,i){return i.timeZoneQuerySelector=“”,t.timeZone?(“string”==typeof t.timeZone?i.timeZoneQuerySelector+=‘li[data-name=“’t.timeZone ‘”]':e.each(t.timeZone,function(e,t){i.timeZoneQuerySelector+=“li[data-”e ’=“‘t ’”]'}),i.timeZoneOffset=t.timeZone.offset):t.startDateTime?(i.timeZoneOffset=“+00:00”===i.timeZoneOffset?“Z”:i.timeZoneOffset,i.timeZoneQuerySelector+=‘li[data-offset=“’i.timeZoneOffset ‘”]'):i.timeZoneOffset=“Z”,i.timeZoneOffset},_setTimeUI:function(e){this.$startTime.find(“input”).val(e),this.$startTime.combobox(“selectByText”,e)},_setTimeZoneUI:function(e){this.$timeZone.selectlist(“selectBySelector”,e)},setValue:function(e){var t,i,s,n,a={};if(e.startDateTime)i=(t=e.startDateTime.split(“T”)),(s=t)?(a=this._parseStartDateTime(s),this._setTimeUI(a.time12HourFormatWithPeriod)):(a.time12HourFormat=“00:00”,a.time24HourFormat=“00:00”);else{a.time12HourFormat=“00:00”,a.time24HourFormat=“00:00”;var r=this.$startDate.datepicker(“getDate”);i=r.getFullYear()+“-”+r.getMonth()+“-”+r.getDate()}this._parseTimeZone(e,a),a.timeZoneQuerySelector&&this._setTimeZoneUI(a.timeZoneQuerySelector),e.recurrencePattern&&this._parseAndSetRecurrencePattern(e.recurrencePattern,a),n=this.setUtcTime(i,a.time24HourFormat,a.timeZoneOffset),this.$startDate.datepicker(“setDate”,n)},toggleState:function(e){this.$element.find(“.combobox”).combobox(e),this.$element.find(“.datepicker”).datepicker(e),this.$element.find(“.selectlist”).selectlist(e),this.$element.find(“.spinbox”).spinbox(e),this.$element.find(“.radio-custom”).radio(e),e=“disable”===e?“addClass”:“removeClass”,this.$element.find(“.repeat-days-of-the-week .btn-group”)(“disabled”)},value:function(e){return e?this.setValue(e):this.getValue()}},e.fn.scheduler=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data(“fu.scheduler”),l=“object”==typeof t&&t;r||a.data(“fu.scheduler”,r=new i(this,l)),“string”==typeof t&&(s=r.apply(r,n))});return void 0===s?a:s},e.fn.scheduler.defaults={},e.fn.scheduler.Constructor=i,e.fn.scheduler.noConflict=function(){return e.fn.scheduler=t,this},e(document).on(“mousedown.fu.scheduler.data-api”,“”,function(t){var i=e(t.target).closest(“.scheduler”);i.data(“fu.scheduler”)||i.scheduler(i.data())}),e(function(){e(“”).each(function(){var t=e(this);t.data(“scheduler”)||t.scheduler(t.data())})})}(e),function(e){var t=e.fn.picker,i=function(t,i){var s=this;this.$element=e(t),this.options=e.extend({},e.fn.picker.defaults,i),this.$accept=this.$element.find(“.picker-accept”),this.$cancel=this.$element.find(“.picker-cancel”),this.$trigger=this.$element.find(“.picker-trigger”),this.$footer=this.$element.find(“.picker-footer”),this.$header=this.$element.find(“.picker-header”),this.$popup=this.$element.find(“.picker-popup”),this.$body=this.$element.find(“.picker-body”),this.clickStamp=“_”,this.isInput=this.$trigger.is(“input”),this.$trigger.on(“keydown.fu.picker”,e.proxy(this.keyComplete,this)),this.$trigger.on(“focus.fu.picker”,e.proxy(function(t){(void 0===t||e(t.target).is(“input”))&&e.proxy(this.show(),this)},this)),this.$trigger.on(“click.fu.picker”,e.proxy(function(t){e(t.target).is(“input”)?e.proxy(this.show(),this):e.proxy(this.toggle(),this)},this)),this.$accept.on(“click.fu.picker”,e.proxy(this.complete,this,“accepted”)),this.$cancel.on(“click.fu.picker”,function(e){e.preventDefault(),s.complete(“cancelled”)})},s=function(t){var i=Math.max(document.documentElement.clientHeight,window.innerHeight||0),s=e(document).scrollTop(),n=t.$popup.offset();return n.top+t.$popup.outerHeight(!0)>i+s||n.top<s},n=function(e){e.$popup.css(“visibility”,“hidden”),r(e),s(e)&&(a(e),s(e)&&r(e)),e.$popup.css(“visibility”,“visible”)},a=function(e){e.$popup.css(“top”,-e.$popup.outerHeight(!0)+“px”)},r=function(e){e.$popup.css(“top”,e.$trigger.outerHeight(!0)+“px”)};i.prototype={constructor:i,complete:function(e){var t={accepted:“onAccept”,cancelled:“onCancel”,exited:“onExit”},i=this.options[t],s={contents:this.$body};i?(i(s),this.$element.trigger(e+“.fu.picker”,s)):(this.$element.trigger(e+“.fu.picker”,s),this.hide())},keyComplete:function(e){this.isInput&&13===e.keyCode?(this.complete(“accepted”),this.$trigger.blur()):27===e.keyCode&&(this.complete(“exited”),this.$trigger.blur())},destroy:function(){return this.$element.remove(),e(document).off(“click.fu.picker.externalClick.”+this.clickStamp),this.$element.outerHTML},disable:function(){this.$element.addClass(“disabled”),this.$trigger.attr(“disabled”,“disabled”)},enable:function(){this.$element.removeClass(“disabled”),this.$trigger.removeAttr(“disabled”)},toggle:function(){this.$element.hasClass(“showing”)?this.hide():this.show()},hide:function(){this.$element.hasClass(“showing”)&&(this.$element.removeClass(“showing”),e(document).off(“click.fu.picker.externalClick.”+this.clickStamp),this.$element.trigger(“hidden.fu.picker”))},externalClickListener:function(e,t){(!0===t||this.isExternalClick(e))&&this.complete(“exited”)},isExternalClick:function(t){var i,s,n=this.$element.get(0),a=this.options.externalClickExceptions||[],r=e(t.target);if(t.target===n||r.parents(“.picker:first”).get(0)===n)return!1;for(i=0,s=a.length;i)||r.parents(a).length>0)return!1;return!0},show:function(){var t;if((t=e(document).find(“.picker.showing”)).length>0){if(t.data(“fu.picker”)&&t.data(“fu.picker”).options.explicit)return;t.picker(“externalClickListener”,{},!0)}this.$element.addClass(“showing”),n(this),this.$element.trigger(“shown.fu.picker”),this.clickStamp=(new Date).getTime()+(Math.floor(100*Math.random())+1),this.options.explicit||e(document).on(“click.fu.picker.externalClick.”+this.clickStamp,e.proxy(this.externalClickListener,this))}},e.fn.picker=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data(“fu.picker”),l=“object”==typeof t&&t;r||a.data(“fu.picker”,r=new i(this,l)),“string”==typeof t&&(s=r.apply(r,n))});return void 0===s?a:s},e.fn.picker.defaults={onAccept:void 0,onCancel:void 0,onExit:void 0,externalClickExceptions:[],explicit:!1},e.fn.picker.Constructor=i,e.fn.picker.noConflict=function(){return e.fn.picker=t,this},e(document).on(“focus.fu.picker.data-api”,“”,function(t){var i=e(t.target).closest(“.picker”);i.data(“fu.picker”)||i.picker(i.data())}),e(function(){e(“”).each(function(){var t=e(this);t.data(“fu.picker”)||t.picker(t.data())})})}(e)});
|