Google
Edit File: calendar-block-renderer-f385fd9f4055ee58eef0-min.js
webpackJsonp([24],{0:function(A,B,a){a(1536);a(1192);a(1246);a(1245);a(595);a(518);a(594);a(1247);a(1146);a(229);a(296)},229:function(A,B){YUI.add("squarespace-spinner",function(a){a.namespace("Squarespace").Spinner=a.Base.create("Spinner",a.Widget,[],{renderUI:function(){this.get("boundingBox").addClass(this.get("color"));0<a.UA.ie&&10>a.UA.ie&&(this.get("contentBox").append(a.Node.create('<img class="sqs-ie-spinner" src="../universal/images-v6/configuration/crappy-ie-spinner.gif"/>')),this.get("boundingBox").addClass("degraded")); var l=this.get("size");a.Lang.isNumber(l)||this.get("boundingBox").addClass(l)},spin:function(){this.get("boundingBox").show()},stop:function(){this.get("boundingBox").hide()},addClass:function(a){this.get("boundingBox").addClass(a)}},{CSS_PREFIX:"sqs-spin",NS:"spinner",ATTRS:{size:{value:"default",setter:function(l){a.Lang.isNumber(l)&&(this.set("width",l),this.set("height",l));return l}},color:{value:"light"}}})},"1.0",{requires:["base-build","widget"]})},296:function(A,B){YUI.add("squarespace-widgets-alert", function(a){a.namespace("Squarespace.Widgets");var l=a.Squarespace.Widgets.Alert=a.Base.create("alert",a.Squarespace.Widgets.Confirmation,[],{},{CSS_PREFIX:"sqs-widgets-confirmation",TYPE:a.Squarespace.Widgets.Confirmation.TYPE,ANCHOR:a.Squarespace.Widgets.Confirmation.ANCHOR,show:function(a){return new l(a)},ATTRS:{className:{value:"alert"},style:{value:a.Squarespace.Widgets.Confirmation.TYPE.CONFIRM_ONLY},"strings.confirm":{value:"Okay"}}})},"1.0",{requires:["base","squarespace-widgets-confirmation"]})}, 518:function(A,B){YUI.add("datatype-date-format",function(a,l){var d=function(b,f,e){"undefined"===typeof e&&(e=10);for(f+="";parseInt(b,10)<e&&1<e;e/=10)b=f+b;return b.toString()},e={formats:{a:function(b,f){return f.a[b.getDay()]},A:function(b,f){return f.A[b.getDay()]},b:function(b,f){return f.b[b.getMonth()]},B:function(b,f){return f.B[b.getMonth()]},C:function(b){return d(parseInt(b.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(b){return d(parseInt(e.formats.G(b)%100, 10),0)},G:function(b){var f=b.getFullYear(),a=parseInt(e.formats.V(b),10);b=parseInt(e.formats.W(b),10);b>a?f++:0===b&&52<=a&&f--;return f},H:["getHours","0"],I:function(b){b=b.getHours()%12;return d(0===b?12:b,0)},j:function(b){var f=new Date(""+b.getFullYear()+"/1/1 GMT");b=new Date(""+b.getFullYear()+"/"+(b.getMonth()+1)+"/"+b.getDate()+" GMT")-f;b=parseInt(b/6E4/60/24,10)+1;return d(b,0,100)},k:["getHours"," "],l:function(b){b=b.getHours()%12;return d(0===b?12:b," ")},m:function(b){return d(b.getMonth()+ 1,0)},M:["getMinutes","0"],p:function(b,f){return f.p[12<=b.getHours()?1:0]},P:function(b,f){return f.P[12<=b.getHours()?1:0]},s:function(b,f){return parseInt(b.getTime()/1E3,10)},S:["getSeconds","0"],u:function(b){b=b.getDay();return 0===b?7:b},U:function(b){var f=parseInt(e.formats.j(b),10);b=6-b.getDay();f=parseInt((f+b)/7,10);return d(f,0)},V:function(b){var f=parseInt(e.formats.W(b),10),a=(new Date(""+b.getFullYear()+"/1/1")).getDay(),f=f+(4<a||1>=a?0:1);53===f&&4>(new Date(""+b.getFullYear()+ "/12/31")).getDay()?f=1:0===f&&(f=e.formats.V(new Date(""+(b.getFullYear()-1)+"/12/31")));return d(f,0)},w:"getDay",W:function(b){var f=parseInt(e.formats.j(b),10);b=7-e.formats.u(b);f=parseInt((f+b)/7,10);return d(f,0,10)},y:function(b){return d(b.getFullYear()%100,0)},Y:"getFullYear",z:function(b){b=b.getTimezoneOffset();var f=d(parseInt(Math.abs(b/60),10),0),e=d(Math.abs(b%60),0);return(0<b?"-":"+")+f+e},Z:function(b){var f=b.toString().replace(/^.*:\d\d( GMT[+-]\d+)? \(?([A-Za-z ]+)\)?\d*$/,"$2").replace(/[a-z ]/g, "");4<f.length&&(f=e.formats.z(b));return f},"%":function(b){return"%"}},aggregates:{c:"locale",D:"%m/%d/%y",F:"%Y-%m-%d",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"},format:function(b,f){f=f||{};if(!a.Lang.isDate(b))return a.Lang.isValue(b)?b:"";var w,p;w=f.format||"%Y-%m-%d";p=a.Intl.get("datatype-date-format");for(var l=function(f,b){var a=e.aggregates[b];return"locale"===a?p[b]:a},t=function(f,w){var l=e.formats[w];switch(a.Lang.type(l)){case "string":return b[l](); case "function":return l.call(b,b,p);case "array":if("string"===a.Lang.type(l[0]))return d(b[l[0]](),l[1]);default:return w}};w.match(/%[cDFhnrRtTxX]/);)w=w.replace(/%([cDFhnrRtTxX])/g,l);w=w.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g,t);l=t=void 0;return w}};a.mix(a.namespace("Date"),e);a.namespace("DataType");a.DataType.Date=a.Date},"3.17.2",{lang:"ar ar-JO ca ca-ES da da-DK de de-AT de-DE el el-GR en en-AU en-CA en-GB en-IE en-IN en-JO en-MY en-NZ en-PH en-SG en-US es es-AR es-BO es-CL es-CO es-EC es-ES es-MX es-PE es-PY es-US es-UY es-VE fi fi-FI fr fr-BE fr-CA fr-FR hi hi-IN hu id id-ID it it-IT ja ja-JP ko ko-KR ms ms-MY nb nb-NO nl nl-BE nl-NL pl pl-PL pt pt-BR ro ro-RO ru ru-RU sv sv-SE th th-TH tr tr-TR vi vi-VN zh-Hans zh-Hans-CN zh-Hant zh-Hant-HK zh-Hant-TW".split(" ")})}, 594:function(A,B){YUI.add("datatype-date-math",function(a,l){var d=a.Lang;a.mix(a.namespace("Date"),{isValidDate:function(e){return d.isDate(e)&&isFinite(e)&&"Invalid Date"!=e&&!isNaN(e)&&null!=e?!0:!1},areEqual:function(e,b){return this.isValidDate(e)&&this.isValidDate(b)&&e.getTime()==b.getTime()},isGreater:function(e,b){return this.isValidDate(e)&&this.isValidDate(b)&&e.getTime()>b.getTime()},isGreaterOrEqual:function(e,b){return this.isValidDate(e)&&this.isValidDate(b)&&e.getTime()>=b.getTime()}, isInRange:function(e,b,f){return this.isGreaterOrEqual(e,b)&&this.isGreaterOrEqual(f,e)},addDays:function(e,b){return new Date(e.getTime()+864E5*b)},addMonths:function(e,b){var f=e.getFullYear(),a=e.getMonth()+b,f=Math.floor(f+a/12),a=(a%12+12)%12,d=new Date(e.getTime());d.setFullYear(f);d.setMonth(a);return d},addYears:function(a,b){var f=a.getFullYear()+b,d=new Date(a.getTime());d.setFullYear(f);return d},listOfDatesInMonth:function(a){if(!this.isValidDate(a))return[];var b=this.daysInMonth(a), f=a.getFullYear();a=a.getMonth();for(var d=[],p=1;p<=b;p++)d.push(new Date(f,a,p,12,0,0));return d},daysInMonth:function(a){if(!this.isValidDate(a))return 0;var b=a.getMonth(),f=[31,28,31,30,31,30,31,31,30,31,30,31];if(1!=b)return f[b];a=a.getFullYear();return 0===a%400?29:0===a%100?28:0===a%4?29:28}});a.namespace("DataType");a.DataType.Date=a.Date},"3.17.2",{requires:["yui-base"]})},595:function(A,B){YUI.add("datatype-date-parse",function(a,l){a.mix(a.namespace("Date"),{parse:function(d){d=new Date(+d|| d);return a.Lang.isDate(d)?d:null}});a.namespace("Parsers").date=a.Date.parse;a.namespace("DataType");a.DataType.Date=a.Date},"3.17.2")},1146:function(A,B){YUI.add("squarespace-calendar-day-template",function(a){var l=a.Handlebars;(function(){var a=l.template;(l.templates=l.templates||{})["calendar-day.html"]=a(function(a,b,f,d,p){function l(f,a){return""}function t(I,a){var g,c,b;g='\n\t<div class="background';if((b=f["if"].call(I,(c=(c=(c=I.events,null==c||!1===c?c:c[0]),null==c||!1===c?c:c.structuredContent), null==c||!1===c?c:c.startDate),{hash:{},inverse:k.noop,fn:k.program(5,n,a),data:a}))||0===b)g+=b;return g+='">\n\t\t<a href="'+r((c=(c=(c=I.events,null==c||!1===c?c:c[0]),null==c||!1===c?c:c.fullUrl),typeof c===y?c.apply(I):c))+'" class="background-image-link"><img data-src="'+r((c=(c=(c=I.events,null==c||!1===c?c:c[0]),null==c||!1===c?c:c.assetUrl),typeof c===y?c.apply(I):c))+'" data-image-dimensions="'+r((c=(c=(c=I.events,null==c||!1===c?c:c[0]),null==c||!1===c?c:c.originalSize),typeof c===y?c.apply(I): c))+'" data-load="false" class="background-image"></a>\n\t</div>\n\t'}function n(f,a){return" background--iseventscollection"}function C(f,a){return" itemlist--iseventscollection"}function F(a,g){var b,c,d;b='\n\t<li class="item';if((c=f["if"].call(a,a.isMultiday,{hash:{},inverse:k.noop,fn:k.program(11,h,g),data:g}))||0===c)b+=c;if((c=f["if"].call(a,a.isSubsequentDayOfMultidayEvent,{hash:{},inverse:k.noop,fn:k.program(13,m,g),data:g}))||0===c)b+=c;b+='">\n\t\t<a href="';(c=f.fullUrl)?c=c.call(a,{hash:{}, data:g}):(c=a.fullUrl,c=typeof c===y?c.apply(a):c);b+=r(c)+'" class="item-link">\n\t\t\t<span class="item-time item-time--12hr">';d={hash:{},data:g};b+=r((c=f["calendar-compact-time-format"]||a["calendar-compact-time-format"],c?c.call(a,(c=a.structuredContent,null==c||!1===c?c:c.startDate),d):D.call(a,"calendar-compact-time-format",(c=a.structuredContent,null==c||!1===c?c:c.startDate),d)))+' </span>\n\t\t\t<span class="item-time item-time--24hr">';d={hash:{format:"%H:%M"},data:g};b+=r((c=f["date-format"]|| a["date-format"],c?c.call(a,(c=a.structuredContent,null==c||!1===c?c:c.startDate),d):D.call(a,"date-format",(c=a.structuredContent,null==c||!1===c?c:c.startDate),d)))+' </span>\n\t\t\t<span class="item-title">';(c=f.title)?c=c.call(a,{hash:{},data:g}):(c=a.title,c=typeof c===y?c.apply(a):c);b+=r(c)+"</span>\n\t\t\t";if((c=f["if"].call(a,a.isMultiday,{hash:{},inverse:k.noop,fn:k.program(15,z,g),data:g}))||0===c)b+=c;return b+"\n\t\t</a>\n\t</li>\n\t"}function h(f,a){return" item--multiday"}function m(f, a){return" item--ongoing"}function z(a,g){var b,c;b={hash:{format:"%b %e"},data:g};return b='<span class="item-enddate"> '+(r((c=f["date-format"]||a["date-format"],c?c.call(a,(c=a.structuredContent,null==c||!1===c?c:c.endDate),b):D.call(a,"date-format",(c=a.structuredContent,null==c||!1===c?c:c.endDate),b)))+"</span>")}function v(f,a){return" flyoutitemlist--iseventscollection"}function N(f,a){return" \n\t\tflyoutitemlist--hasmorecontent\n\t"}function s(a,b){var g,c,d;g="\n\t\t";d={hash:{},inverse:k.noop, fn:k.program(22,A,b),data:b};(c=f.events)?c=c.call(a,d):(c=a.events,c=typeof c===y?c.apply(a):c);f.events||(c=O.call(a,c,d));if(c||0===c)g+=c;return g+"\n\t"}function A(a,g){var b,c;b="\n\t\t\t";if((c=f["if"].call(a,a.excerpt,{hash:{},inverse:k.program(25,G,g),fn:k.program(23,B,g),data:g}))||0===c)b+=c;return b+"\n\t\t"}function B(f,a){return" \n\t\t\t\tflyoutitemlist--hasmorecontent\n\t\t\t"}function G(a,b){var g,c,d;g="\n\t\t\t\t";if((d=f["if"].call(a,(c=a.location,null==c||!1===c?c:c.addressLine1), {hash:{},inverse:k.noop,fn:k.program(26,E,b),data:b}))||0===d)g+=d;return g+"\n\t\t\t"}function E(f,a){return" \n\t\t\t\t\tflyoutitemlist--hasmorecontent\n\t\t\t\t"}function J(a,b){var d,c,h;d='\n\t<li class="flyoutitem';if((c=f["if"].call(a,a.isMultiday,{hash:{},inverse:k.noop,fn:k.program(29,K,b),data:b}))||0===c)d+=c;if((c=f["if"].call(a,a.isSubsequentDayOfMultidayEvent,{hash:{},inverse:k.noop,fn:k.program(31,L,b),data:b}))||0===c)d+=c;d+='">\n\t\t<h1 class="flyoutitem-title"><a href="';(c=f.fullUrl)? c=c.call(a,{hash:{},data:b}):(c=a.fullUrl,c=typeof c===y?c.apply(a):c);d+=r(c)+'" class="flyoutitem-link">';(c=f.title)?c=c.call(a,{hash:{},data:b}):(c=a.title,c=typeof c===y?c.apply(a):c);d+=r(c);if((c=f["if"].call(a,a.isMultiday,{hash:{},inverse:k.noop,fn:k.program(33,H,b),data:b}))||0===c)d+=c;d+=' <span class="flyoutitem-link-arrow"></span></a></h1>\n\t\t<div class="flyoutitem-datetime flyoutitem-datetime--12hr">\n\t\t\t';if((c=f["if"].call(a,a.isMultiday,{hash:{},inverse:k.program(37,M, b),fn:k.program(35,P,b),data:b}))||0===c)d+=c;d+='\n\t\t</div>\n\t\t<div class="flyoutitem-datetime flyoutitem-datetime--24hr">\n\t\t\t';if((c=f["if"].call(a,a.isMultiday,{hash:{},inverse:k.program(41,g,b),fn:k.program(39,x,b),data:b}))||0===c)d+=c;d+='\n\t\t</div>\n\t\t<div class="flyoutitem-location">\n\t\t\t';if((h=f["if"].call(a,(c=a.location,null==c||!1===c?c:c.addressTitle),{hash:{},inverse:k.noop,fn:k.program(43,Q,b),data:b}))||0===h)d+=h;d+="\n\t\t\t";if((h=f["if"].call(a,(c=a.location,null== c||!1===c?c:c.addressLine1),{hash:{},inverse:k.noop,fn:k.program(45,R,b),data:b}))||0===h)d+=h;d+="\n\t\t\t";if((h=f["if"].call(a,(c=a.location,null==c||!1===c?c:c.addressLine2),{hash:{},inverse:k.noop,fn:k.program(47,S,b),data:b}))||0===h)d+=h;d+="\n\t\t\t";if((h=f["if"].call(a,(c=a.location,null==c||!1===c?c:c.addressCountry),{hash:{},inverse:k.noop,fn:k.program(49,T,b),data:b}))||0===h)d+=h;d+="\n\t\t</div>\n\t\t";if((h=f["if"].call(a,a.excerpt,{hash:{},inverse:k.noop,fn:k.program(51,U,b),data:b}))|| 0===h)d+=h;return d+"\n\t</li>\n\t"}function K(a,f){return" flyoutitem--multiday"}function L(a,f){return" flyoutitem--ongoing"}function H(a,b){var g,c;g={hash:{format:"%b %e"},data:b};return g=' <span class="flyoutitem-enddate">'+(r((c=f["date-format"]||a["date-format"],c?c.call(a,(c=a.structuredContent,null==c||!1===c?c:c.endDate),g):D.call(a,"date-format",(c=a.structuredContent,null==c||!1===c?c:c.endDate),g)))+"</span>")}function P(a,b){var g,c,d;d={hash:{format:"%a, %b %e, %l:%M%P"},data:b};g= "\n\t\t\t\t"+(r((c=f["date-format"]||a["date-format"],c?c.call(a,(c=a.structuredContent,null==c||!1===c?c:c.startDate),d):D.call(a,"date-format",(c=a.structuredContent,null==c||!1===c?c:c.startDate),d)))+" – ");d={hash:{format:"%a, %b %e, %l:%M%P"},data:b};return g+=r((c=f["date-format"]||a["date-format"],c?c.call(a,(c=a.structuredContent,null==c||!1===c?c:c.endDate),d):D.call(a,"date-format",(c=a.structuredContent,null==c||!1===c?c:c.endDate),d)))+"\n\t\t\t"}function M(a,b){var g,c,d;d={hash:{format:"%l:%M%P"}, data:b};g="\n\t\t\t\t"+(r((c=f["date-format"]||a["date-format"],c?c.call(a,(c=a.structuredContent,null==c||!1===c?c:c.startDate),d):D.call(a,"date-format",(c=a.structuredContent,null==c||!1===c?c:c.startDate),d)))+" – ");d={hash:{format:"%l:%M%P"},data:b};return g+=r((c=f["date-format"]||a["date-format"],c?c.call(a,(c=a.structuredContent,null==c||!1===c?c:c.endDate),d):D.call(a,"date-format",(c=a.structuredContent,null==c||!1===c?c:c.endDate),d)))+"\n\t\t\t"}function x(a,b){var g,c,d;d={hash:{format:"%a, %b %e, %H:%M"}, data:b};g="\n\t\t\t\t"+(r((c=f["date-format"]||a["date-format"],c?c.call(a,(c=a.structuredContent,null==c||!1===c?c:c.startDate),d):D.call(a,"date-format",(c=a.structuredContent,null==c||!1===c?c:c.startDate),d)))+" – ");d={hash:{format:"%a, %b %e, %H:%M"},data:b};return g+=r((c=f["date-format"]||a["date-format"],c?c.call(a,(c=a.structuredContent,null==c||!1===c?c:c.endDate),d):D.call(a,"date-format",(c=a.structuredContent,null==c||!1===c?c:c.endDate),d)))+"\n\t\t\t"}function g(a,b){var g,c, d;d={hash:{format:"%H:%M"},data:b};g="\n\t\t\t\t"+(r((c=f["date-format"]||a["date-format"],c?c.call(a,(c=a.structuredContent,null==c||!1===c?c:c.startDate),d):D.call(a,"date-format",(c=a.structuredContent,null==c||!1===c?c:c.startDate),d)))+" – ");d={hash:{format:"%H:%M"},data:b};return g+=r((c=f["date-format"]||a["date-format"],c?c.call(a,(c=a.structuredContent,null==c||!1===c?c:c.endDate),d):D.call(a,"date-format",(c=a.structuredContent,null==c||!1===c?c:c.endDate),d)))+"\n\t\t\t"}function Q(a, b){var f,c;return f=""+('<div class="flyoutitem-location-addresstitle">'+r((c=(c=a.location,null==c||!1===c?c:c.addressTitle),typeof c===y?c.apply(a):c))+"</div>")}function R(a,f){var b,c;return b=""+('<div class="flyoutitem-location-address1">'+r((c=(c=a.location,null==c||!1===c?c:c.addressLine1),typeof c===y?c.apply(a):c))+"</div>")}function S(a,b){var f,c;return f=""+('<div class="flyoutitem-location-address2">'+r((c=(c=a.location,null==c||!1===c?c:c.addressLine2),typeof c===y?c.apply(a):c))+"</div>")} function T(a,f){var b,c;return b=""+('<div class="flyoutitem-location-addresscountry">'+r((c=(c=a.location,null==c||!1===c?c:c.addressCountry),typeof c===y?c.apply(a):c))+"</div>")}function U(a,b){var g,c;g='<div class="flyoutitem-excerpt">';(c=f.excerpt)?c=c.call(a,{hash:{},data:b}):(c=a.excerpt,c=typeof c===y?c.apply(a):c);if(c||0===c)g+=c;return g+"</div>"}this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,a.helpers);p=p||{};a="";var q,k=this,y="function",r=this.escapeExpression,D=f.helperMissing, O=f.blockHelperMissing;if((d=f["if"].call(b,(q=(q=b.events,null==q||!1===q?q:q[0]),null==q||!1===q?q:q.systemDataId),{hash:{},inverse:k.noop,fn:k.program(1,function(a,b){var g,c,d;g="\n\t";if((d=f["if"].call(a,(c=(c=a.events,null==c||!1===c?c:c[1]),null==c||!1===c?c:c.title),{hash:{},inverse:k.program(4,t,b),fn:k.program(2,l,b),data:b}))||0===d)g+=d;return g+"\n"},p),data:p}))||0===d)a+=d;d={hash:{format:"%a"},data:p};a=a+'\n\n<div class="marker">\n\t<div class="marker-dayname">'+(r((q=f["day-of-month-format"]|| b["day-of-month-format"],q?q.call(b,b.date,d):D.call(b,"day-of-month-format",b.date,d)))+'</div>\n\t<div class="marker-daynum">');d={hash:{format:"%e"},data:p};a+=r((q=f["day-of-month-format"]||b["day-of-month-format"],q?q.call(b,b.date,d):D.call(b,"day-of-month-format",b.date,d)))+"</div>\n</div>\n\n";if((d=f["if"].call(b,b.events,{hash:{},inverse:k.noop,fn:k.program(7,function(a,b){var g,c,d,h;g='\n<ul class="itemlist';if((d=f["if"].call(a,(c=(c=(c=a.events,null==c||!1===c?c:c[0]),null==c||!1=== c?c:c.structuredContent),null==c||!1===c?c:c.startDate),{hash:{},inverse:k.noop,fn:k.program(8,C,b),data:b}))||0===d)g+=d;g+='">\n\t';h={hash:{},inverse:k.noop,fn:k.program(10,F,b),data:b};(d=f.events)?d=d.call(a,h):(d=a.events,d=typeof d===y?d.apply(a):d);f.events||(d=O.call(a,d,h));if(d||0===d)g+=d;g+='\n</ul>\n\n<ul class="\n\tflyoutitemlist\n\t';if((d=f["if"].call(a,(c=(c=(c=a.events,null==c||!1===c?c:c[0]),null==c||!1===c?c:c.structuredContent),null==c||!1===c?c:c.startDate),{hash:{},inverse:k.noop, fn:k.program(17,v,b),data:b}))||0===d)g+=d;g+="\n\t";if((d=f["if"].call(a,(c=(c=a.events,null==c||!1===c?c:c[1]),null==c||!1===c?c:c.title),{hash:{},inverse:k.program(21,s,b),fn:k.program(19,N,b),data:b}))||0===d)g+=d;g+='\n">\n\t';h={hash:{},inverse:k.noop,fn:k.program(28,J,b),data:b};(d=f.events)?d=d.call(a,h):(d=a.events,d=typeof d===y?d.apply(a):d);f.events||(d=O.call(a,d,h));if(d||0===d)g+=d;return g+='\n</ul>\n\n<div class="itemcount">'+r((c=(c=a.events,null==c||!1===c?c:c.length),typeof c=== y?c.apply(a):c))+"</div>\n"},p),data:p}))||0===d)a+=d;return a+="\n"})})();a.Handlebars.registerPartial("calendar-day.html".replace("/","."),l.templates["calendar-day.html"])},"1.0",{requires:["handlebars-base"]})},1192:function(A,B,a){var l=a(139);YUI.add("squarespace-calendar-core-renderer",function(a){var e=function(a){return a.recordType===l.EVENT?a.structuredContent.startDate:a.addedOn};a.Squarespace.SquarespaceCalendar=a.Base.create("SquarespaceCalendar",a.Calendar,[],{initializer:function(){this._fetchEvents()}, bindUI:function(){a.Calendar.superclass.bindUI.call(this);this.before("dateChange",this._clearEvents,this);this.after("dateChange",this._fetchEvents,this);this.after("collectionIdChange",this._fetchEvents,this)},_clearEvents:function(){this.set("events",[])},_fetchEvents:function(){var b=this.get("date"),b=a.DataType.Date.format(b,{format:"%B-%Y",locale:"en"});a.Data.get({url:this._getFetchUrl(b),success:this._parseResponse,failure:this._handleResponseError},this)},_parseResponse:function(a){this.set("events", a)},_handleResponseError:function(a){this.fire("fetchEventsFailure");console.error("Failed fetch data: "+a)},_getFetchUrl:function(b){var e=this.get("collectionId"),p=this.get("pageCollectionId");b="/api/open/GetItemsByMonth?collectionId="+e+"&month="+b;a.Lang.isValue(p)&&(b+="&pageCollectionId="+p);return b}},{ATTRS:{events:{value:[],validator:a.Lang.isArray},collectionId:{value:null,validator:a.Lang.isString},pageCollectionId:{value:null,validator:a.Lang.isString}}});a.Squarespace.CalendarBaseRenderer= a.Base.create("CalendarBaseRenderer",a.Plugin.Base,[],{initializer:function(a){this.host=a.host;this.afterHostEvent("eventsChange",this._onEventsChange,this)},_onEventsChange:function(b){var e=null;a.Lang.isArray(b.newVal)&&0<b.newVal.length&&(e=a.bind(this._calendarFilterFunction,this));this.host.set("customRenderer",{rules:{all:"events"},filterFunction:e})},_calendarFilterFunction:function(a,b,d){d=this.host.get("events");d=this._getEventsOfDay(d,a);this._sortEvents(d);this._renderDay(a,b,d)},_renderDay:function(a, b,d){0<d.length&&b.setStyle("background","gray")},_sortEvents:function(a){a.sort(function(a,b){var d=e(a);return e(b)-d})},_getEventsOfDay:function(b,e){var p=a.DataType.Date.format(e,{format:"%Y-%m-%d"});return a.Lang.isArray(b)&&0<b.length?a.Array.filter(b,function(a){return this._isEventPartOfDay(a,p)},this):[]},_isEventPartOfDay:function(b,e){var p,u;u=b.structuredContent;if(b.recordType!==l.EVENT)return p=a.Squarespace.DateUtils.dateFormat(b.addedOn,{format:"%Y-%m-%d"}),p===e;p=a.Squarespace.DateUtils.dateFormat(u.startDate, {format:"%Y-%m-%d"});u=a.Squarespace.DateUtils.dateFormat(u.endDate,{format:"%Y-%m-%d"});return e==p||e==u||new Date(e)>new Date(p)&&new Date(e)<new Date(u)?!0:!1},_getEventDisplayTime:function(b){b=e(b);return a.Squarespace.DateUtils.dateFormat(b,{format:"%l:%M%P"}).trim()},_isSameDay:function(b,e){if(b.recordType!==l.EVENT)return!0;var p=a.Squarespace.DateUtils.dateFormat(b.structuredContent.startDate,{format:"%Y-%m-%d"}),u=a.DataType.Date.format(e,{format:"%Y-%m-%d"});return p===u}},{NS:"calendarPlugin"}); var b=a.namespace("Squarespace").SquarespaceCalendarRenderer=a.Base.create("squarespaceCalendarRenderer",a.Squarespace.CalendarBaseRenderer,[],{initializer:function(b){this._loadingSpinner=new a.Squarespace.Spinner({color:"dark",size:"extra-large",render:this.host.get("contentBox")});this.onceAfterHostEvent("eventsChange",this._renderCalendar);this.onceAfterHostEvent("fetchEventsFailure",function(){this._loadingSpinner&&this._loadingSpinner.destroy(!0);window.SQUARESPACE_LOGIN&&window.SQUARESPACE_LOGIN.isLoggedIn()&& this.host.get("boundingBox").ancestor().append('<div class="sqs-state-message">Please choose a valid collection for this calendar to display. It is possible that this calendar is pointing to a deleted collection.</div>');this.host.destroy()},this);this._bindUI()},destructor:function(){this._loadingSpinner&&this._loadingSpinner.destroy(!0);this._resizeEvent.detach()},_bindUI:function(){this._resizeEvent=a.on("resize",this._syncUI,a.config.win,this)},_syncUI:function(){this.host.get("contentBox").getDOMNode()&& (this._fitToContainer(),this._setupCells(),this.host.get("contentBox").hasClass(b.COMPACT_LAYOUT_CLASS)||this._loadImages(),this._setFlyoutHeights())},_onEventsChange:function(b){b=a.bind(this._calendarFilterFunction,this);this.host.set("customRenderer",{rules:{all:{all:{all:{0:"sunday",1:"monday",2:"tuesday",3:"wednesday",4:"thursday",5:"friday",6:"saturday"}}}},filterFunction:b});this.get("isRendered")&&this._syncUI()},_calendarFilterFunction:function(a,d,e){b.superclass._calendarFilterFunction.apply(this, arguments);0<=e.indexOf("sunday")?d.addClass("sunday"):0<=e.indexOf("monday")?d.addClass("monday"):0<=e.indexOf("friday")?d.addClass("friday"):0<=e.indexOf("saturday")&&d.addClass("saturday")},_fitToContainer:function(){var a=this.host.get("contentBox");a.toggleClass(b.SMALL_LAYOUT_CLASS,770>=a.get("offsetWidth"));a.toggleClass(b.COMPACT_LAYOUT_CLASS,600>=a.get("offsetWidth"));a.toggleClass(b.TINY_LAYOUT_CLASS,300>=a.get("offsetWidth"))},_setupHeader:function(){this.host.get("contentBox").one(".yui3-calendar-header-label").wrap("<h1></h1>")}, _setupCells:function(){var a=this.host.get("contentBox").one("table");a.setStyle("width",null);this.cellSpacing=parseInt(a.getComputedStyle("borderSpacing"),10);var b=7*parseInt((a.get("offsetWidth")-8*this.cellSpacing)/7,10)+8*this.cellSpacing;a.setStyle("width",b);a.all("td").setStyles({width:parseInt(b/7,10)-this.cellSpacing,height:parseInt(b/7,10)-this.cellSpacing})},_loadImages:function(){this.host.get("contentBox").all("img[data-src]").each(function(a){ImageLoader.load(a,{mode:"fill",load:!0})}, this)},_setFlyoutHeights:function(){this.host.get("contentBox").all(".flyoutitemlist--hasmorecontent").each(function(a){var b=a.ancestor("tr"),d=this._getRowHeight(b),b=a.ancestor("tr:nth-child(4)")||a.ancestor("tr:nth-child(5)")||a.ancestor("tr:nth-child(6)")?this._getRowHeight(b.previous("tr")):this._getRowHeight(b.next("tr"));a.setStyle("height",d+b+this.cellSpacing)},this);this.host.get("contentBox").all("tr").removeAttribute("data-row-height")},_getRowHeight:function(a){if(a.getAttribute("data-row-height"))return parseInt(a.getAttribute("data-row-height"), 10);var b=a.get("offsetHeight");a.setAttribute("data-row-height",b);return b},_renderCalendar:function(){this._setupHeader();this._syncUI();this._loadingSpinner&&this._loadingSpinner.destroy(!0);this.host.get("boundingBox").addClass("loaded");this.set("isRendered",!0)},_renderDay:function(a,b,d){this.setAttrs({date:a,node:b,events:this._groupEvents(d,a)});this._highlightToday();this._highlightDaysWithEvents();a=this._getTemplateInfo().template(this._getHBTemplateContext());b.empty().append(a)},_highlightToday:function(){var f= new Date,f=new Date(f.setMinutes(f.getMinutes()+a.Squarespace.DateUtils.getTimeOffsetToWebsiteTimezone(f)));this.get("date").setHours(0,0,0,0)===f.setHours(0,0,0,0)&&this.get("node").addClass(b.TODAY_CLASS)},_highlightDaysWithEvents:function(){0<this.get("events").length&&this.get("node").addClass(b.HAS_EVENT_CLASS)},_getTemplateInfo:function(){return{template:a.Squarespace.UITemplates.getCompiledTemplate(b.HANDLEBARS_TEMPLATE)}},_getHBTemplateContext:function(){return{date:this.get("date"),events:this.get("events")}}, _groupEvents:function(b,e){var l=[],u=[];a.Array.each(b,function(a){this._isSameDay(a,e)?l.unshift(a):(a.isSubsequentDayOfMultidayEvent=!0,u.unshift(a));this._isMultidayEvent(a)&&(a.isMultiday=!0)},this);return u.concat(l)},_isMultidayEvent:function(b){if(b.recordType===l.EVENT){var e=b.structuredContent;b=a.Squarespace.DateUtils.dateFormat(e.startDate,{format:"%d%m%Y"});e=a.Squarespace.DateUtils.dateFormat(e.endDate,{format:"%d%m%Y"});return b!==e}}},{NS:"calendarPlugin",TODAY_CLASS:"today",HAS_EVENT_CLASS:"has-event", SMALL_LAYOUT_CLASS:"small-layout",COMPACT_LAYOUT_CLASS:"compact-layout",TINY_LAYOUT_CLASS:"tiny-layout",HANDLEBARS_TEMPLATE:"calendar-day.html"});a.Handlebars.registerHelper("day-of-month-format",function(b,e){return a.DataType.Date.format(b,{format:e.hash.format||"%B %e, %Y"})});a.Handlebars.registerHelper("date-format",function(b,e){return a.Squarespace.DateUtils.dateFormat(b,{format:e.hash.format||"%B %e, %Y"})});a.Handlebars.registerHelper("calendar-compact-time-format",function(b){var e="PM"== a.Squarespace.DateUtils.dateFormat(b,{format:"%p"})?"p":"a";return 0===(new Date(b)).getMinutes()?a.Squarespace.DateUtils.dateFormat(b,{format:"%l"})+e:a.Squarespace.DateUtils.dateFormat(b,{format:"%l:%M"})+e})},"1.0",{requires:"calendar node squarespace-attr-validators squarespace-calendar-day-template squarespace-date-utils squarespace-ui-base squarespace-spinner squarespace-widgets-alert".split(" ")})},1245:function(A,B){YUI.add("calendar-base",function(a,l){function d(){d.superclass.constructor.apply(this, arguments)}var e=a.ClassNameManager.getClassName,b=e("calendar","grid"),f=e("calendar","left-grid"),w=e("calendar","right-grid"),p=e("calendar","body"),u=e("calendar","header"),t=e("calendar","header-label"),n=e("calendar","weekdayrow"),C=e("calendar","weekday"),F=e("calendar","column-hidden"),h=e("calendar","day-selected"),m=e("calendar","selection-disabled"),z=e("calendar","row"),v=e("calendar","day"),N=e("calendar","prevmonth-day"),s=e("calendar","nextmonth-day"),A=e("calendar","anchor"),B=e("calendar", "pane"),e=e("calendar","status"),G=a.Lang,E=G.sub,J=a.Array.each,K=a.Object.each,L=a.Array.indexOf,H=a.Object.hasKey,P=a.Object.setValue,M=a.Object.isEmpty,x=a.DataType.Date;a.CalendarBase=a.extend(d,a.Widget,{_paneProperties:{},_paneNumber:1,_calendarId:null,_selectedDates:{},_rules:{},_filterFunction:null,_storedDateCells:{},initializer:function(){this._paneProperties={};this._calendarId=a.guid("calendar");this._selectedDates={};M(this._rules)&&(this._rules={});this._storedDateCells={}},renderUI:function(){this.get("contentBox").appendChild(this._initCalendarHTML(this.get("date"))); this.get("showPrevMonth")&&this._afterShowPrevMonthChange();this.get("showNextMonth")&&this._afterShowNextMonthChange();this._renderCustomRules();this._renderSelectedDates();this.get("boundingBox").setAttribute("aria-labelledby",this._calendarId+"_header")},bindUI:function(){this.after("dateChange",this._afterDateChange);this.after("showPrevMonthChange",this._afterShowPrevMonthChange);this.after("showNextMonthChange",this._afterShowNextMonthChange);this.after("headerRendererChange",this._afterHeaderRendererChange); this.after("customRendererChange",this._afterCustomRendererChange);this.after("enabledDatesRuleChange",this._afterCustomRendererChange);this.after("disabledDatesRuleChange",this._afterCustomRendererChange);this.after("focusedChange",this._afterFocusedChange);this.after("selectionChange",this._renderSelectedDates);this._bindCalendarEvents()},_getSelectedDatesList:function(){var a=[];K(this._selectedDates,function(b){K(b,function(b){K(b,function(b){a.push(b)},this)},this)},this);return a},_getSelectedDatesInMonth:function(b){var d= b.getFullYear();b=b.getMonth();return H(this._selectedDates,d)&&H(this._selectedDates[d],b)?a.Object.values(this._selectedDates[d][b]):[]},_isNumInList:function(a,b){if("all"===b)return!0;for(var d=b.split(","),f=d.length,e;f--;)if(e=d[f].split("-"),2===e.length&&a>=parseInt(e[0],10)&&a<=parseInt(e[1],10)||1===e.length&&parseInt(d[f],10)===a)return!0;return!1},_getRulesForDate:function(a){var b=a.getFullYear(),d=a.getMonth(),f=a.getDate();a=a.getDay();var e=this._rules,h=[],q,k,m,v;for(q in e)if(this._isNumInList(b, q))if(G.isString(e[q]))h.push(e[q]);else for(k in e[q])if(this._isNumInList(d,k))if(G.isString(e[q][k]))h.push(e[q][k]);else for(m in e[q][k])if(this._isNumInList(f,m))if(G.isString(e[q][k][m]))h.push(e[q][k][m]);else for(v in e[q][k][m])this._isNumInList(a,v)&&G.isString(e[q][k][m][v])&&h.push(e[q][k][m][v]);return h},_matchesRule:function(a,b){return 0<=L(this._getRulesForDate(a),b)},_canBeSelected:function(a){var b=this.get("enabledDatesRule"),d=this.get("disabledDatesRule");return b?this._matchesRule(a, b):d?!this._matchesRule(a,d):!0},selectDates:function(a){x.isValidDate(a)?this._addDateToSelection(a):G.isArray(a)&&this._addDatesToSelection(a);return this},deselectDates:function(a){a?x.isValidDate(a)?this._removeDateFromSelection(a):G.isArray(a)&&this._removeDatesFromSelection(a):this._clearSelection();return this},_addDateToSelection:function(a,b){a=this._normalizeTime(a);if(this._canBeSelected(a)){var d=a.getFullYear(),e=a.getMonth(),f=a.getDate();H(this._selectedDates,d)?H(this._selectedDates[d], e)||(this._selectedDates[d][e]={}):(this._selectedDates[d]={},this._selectedDates[d][e]={});this._selectedDates[d][e][f]=a;this._selectedDates=P(this._selectedDates,[d,e,f],a);b||this._fireSelectionChange()}},_addDatesToSelection:function(a){J(a,this._addDateToSelection,this);this._fireSelectionChange()},_addDateRangeToSelection:function(a,b){var d=6E4*(b.getTimezoneOffset()-a.getTimezoneOffset()),e=a.getTime(),f=b.getTime(),h;e>f?(h=e,e=f,f=h+d):f-=d;for(d=e;d<=f;d+=864E5)e=new Date(d),e.setHours(12), this._addDateToSelection(e,d);this._fireSelectionChange()},_removeDateFromSelection:function(a,b){var d=a.getFullYear(),e=a.getMonth(),f=a.getDate();H(this._selectedDates,d)&&(H(this._selectedDates[d],e)&&H(this._selectedDates[d][e],f))&&(delete this._selectedDates[d][e][f],b||this._fireSelectionChange())},_removeDatesFromSelection:function(a){J(a,this._removeDateFromSelection,this);this._fireSelectionChange()},_removeDateRangeFromSelection:function(a,b){for(var d=a.getTime(),e=b.getTime();d<=e;d+= 864E5)this._removeDateFromSelection(new Date(d),d);this._fireSelectionChange()},_clearSelection:function(a){this._selectedDates={};this.get("contentBox").all("."+h).removeClass(h).setAttribute("aria-selected",!1);a||this._fireSelectionChange()},_fireSelectionChange:function(){this.fire("selectionChange",{newSelection:this._getSelectedDatesList()})},_restoreModifiedCells:function(){var a=this.get("contentBox"),b;for(b in this._storedDateCells)a.one("#"+b).replace(this._storedDateCells[b]),delete this._storedDateCells[b]}, _renderCustomRules:function(){this.get("contentBox").all("."+v+",."+s).removeClass(m).setAttribute("aria-disabled",!1);if(!M(this._rules)){var b,d;for(b=0;b<this._paneNumber;b++)d=x.addMonths(this.get("date"),b),d=x.listOfDatesInMonth(d),J(d,a.bind(this._renderCustomRulesHelper,this))}},_renderCustomRulesHelper:function(a){var b=this.get("enabledDatesRule"),d=this.get("disabledDatesRule"),e;e=this._getRulesForDate(a);0<e.length?((b&&0>L(e,b)||!b&&d&&0<=L(e,d))&&this._disableDate(a),G.isFunction(this._filterFunction)&& (b=this._dateToNode(a),this._storedDateCells[b.get("id")]=b.cloneNode(!0),this._filterFunction(a,b,e))):b&&this._disableDate(a)},_renderSelectedDates:function(){this.get("contentBox").all("."+h).removeClass(h).setAttribute("aria-selected",!1);var b,d;for(b=0;b<this._paneNumber;b++)d=x.addMonths(this.get("date"),b),d=this._getSelectedDatesInMonth(d),J(d,a.bind(this._renderSelectedDatesHelper,this))},_renderSelectedDatesHelper:function(a){this._dateToNode(a).addClass(h).setAttribute("aria-selected", !0)},_disableDate:function(a){this._dateToNode(a).addClass(m).setAttribute("aria-disabled",!0)},_dateToNode:function(a){var b=a.getDate(),d=0,e=b%7;a=(12+a.getMonth()-this.get("date").getMonth())%12;var f=this._paneProperties[this._calendarId+"_pane_"+a].cutoffCol;switch(e){case 0:d=6<=f?12:5;break;case 1:d=6;break;case 2:d=0<f?7:0;break;case 3:d=1<f?8:1;break;case 4:d=2<f?9:2;break;case 5:d=3<f?10:3;break;case 6:d=4<f?11:4}return this.get("contentBox").one("#"+this._calendarId+"_pane_"+a+"_"+d+"_"+ b)},_nodeToDate:function(a){a=a.get("id").split("_").reverse();var b=parseInt(a[2],10);a=parseInt(a[0],10);var d=x.addMonths(this.get("date"),b),b=d.getFullYear(),d=d.getMonth();return new Date(b,d,a,12,0,0,0)},_bindCalendarEvents:function(){},_normalizeDate:function(a){return a?new Date(a.getFullYear(),a.getMonth(),1,12,0,0,0):null},_normalizeTime:function(a){return a?new Date(a.getFullYear(),a.getMonth(),a.getDate(),12,0,0,0):null},_getCutoffColumn:function(a,b){return 6-(this._normalizeDate(a).getDay()- b+7)%7},_turnPrevMonthOn:function(a){var b=a.get("id"),d=x.daysInMonth(x.addMonths(this._paneProperties[b].paneDate,-1)),e;this._paneProperties[b].hasOwnProperty("daysInPrevMonth")||(this._paneProperties[b].daysInPrevMonth=0);if(d!==this._paneProperties[b].daysInPrevMonth){this._paneProperties[b].daysInPrevMonth=d;for(e=5;0<=e;e--)a.one("#"+b+"_"+e+"_"+(e-5)).set("text",d--)}},_turnPrevMonthOff:function(a){var b=a.get("id"),d;this._paneProperties[b].daysInPrevMonth=0;for(d=5;0<=d;d--)a.one("#"+b+ "_"+d+"_"+(d-5)).setContent(" ")},_cleanUpNextMonthCells:function(a){var b=a.get("id");a.one("#"+b+"_6_29").removeClass(s);a.one("#"+b+"_7_30").removeClass(s);a.one("#"+b+"_8_31").removeClass(s);a.one("#"+b+"_0_30").removeClass(s);a.one("#"+b+"_1_31").removeClass(s)},_turnNextMonthOn:function(a){var b=1,d=a.get("id"),e=this._paneProperties[d].daysInMonth,f=this._paneProperties[d].cutoffCol,h;for(h=e-22;h<f+7;h++)a.one("#"+d+"_"+h+"_"+(h+23)).set("text",b++).addClass(s);h=f;for(31===e&&1>=f?h= 2:30===e&&0===f&&(h=1);h<f+7;h++)a.one("#"+d+"_"+h+"_"+(h+30)).set("text",b++).addClass(s)},_turnNextMonthOff:function(a){var b=a.get("id"),d=this._paneProperties[b].daysInMonth,e=this._paneProperties[b].cutoffCol,f;for(f=d-22;12>=f;f++)a.one("#"+b+"_"+f+"_"+(f+23)).setContent(" ").addClass(s);f=0;for(31===d&&1>=e?f=2:30===d&&0===e&&(f=1);12>=f;f++)a.one("#"+b+"_"+f+"_"+(f+30)).setContent(" ").addClass(s)},_afterShowNextMonthChange:function(){var a=this.get("contentBox").one("#"+this._calendarId+ "_pane_"+(this._paneNumber-1));this._cleanUpNextMonthCells(a);this.get("showNextMonth")?this._turnNextMonthOn(a):this._turnNextMonthOff(a)},_afterShowPrevMonthChange:function(){var a=this.get("contentBox").one("#"+this._calendarId+"_pane_0");this.get("showPrevMonth")?this._turnPrevMonthOn(a):this._turnPrevMonthOff(a)},_afterHeaderRendererChange:function(){this.get("contentBox").one("."+t).setContent(this._updateCalendarHeader(this.get("date")))},_afterCustomRendererChange:function(){this._restoreModifiedCells(); this._renderCustomRules()},_afterDateChange:function(){var a=this.get("contentBox"),d=a.one("."+u).one("."+t),e=a.all("."+b),f=this.get("date"),h=0;a.setStyle("visibility","hidden");d.setContent(this._updateCalendarHeader(f));this._restoreModifiedCells();e.each(function(a){this._rerenderCalendarPane(x.addMonths(f,h++),a)},this);this._afterShowPrevMonthChange();this._afterShowNextMonthChange();this._renderCustomRules();this._renderSelectedDates();a.setStyle("visibility","inherit")},_initCalendarPane:function(b, e){var f=this.get("strings.very_short_weekdays")||"Su Mo Tu We Th Fr Sa".split(" "),h=a.Intl.get("datatype-date-format").A,m=this.get("strings.first_weekday")||0,l=this._getCutoffColumn(b,m),q=x.daysInMonth(b),k=" ".split(" "),z={},n,C,p;z.weekday_row="";for(n=m;n<=m+6;n++)z.weekday_row+=E(d.WEEKDAY_TEMPLATE,{short_weekdayname:f[n%7],weekdayname:h[n%7]});z.weekday_row_template=E(d.WEEKDAY_ROW_TEMPLATE,z);for(f=0;5>=f;f++)for(h=0;12>=h;h++){m=7*f-5+h;n=e+"_"+h+"_"+m;C=v;1>m?C=N:m>q&&(C=s);if(1> m||m>q)m=" ";p=h>=l&&h<l+7?"":F;k[f]+=E(d.CALDAY_TEMPLATE,{day_content:m,calendar_col_class:"calendar_col"+h,calendar_col_visibility_class:p,calendar_day_class:C,calendar_day_id:n})}z.body_template="";J(k,function(a){z.body_template+=E(d.CALDAY_ROW_TEMPLATE,{calday_row:a})});z.calendar_pane_id=e;z.calendar_pane_tabindex=this.get("tabIndex");z.pane_arialabel=x.format(b,{format:"%B %Y"});k=E(E(d.CALENDAR_GRID_TEMPLATE,z),d.CALENDAR_STRINGS);this._paneProperties[e]={cutoffCol:l,daysInMonth:q,paneDate:b}; return k},_rerenderCalendarPane:function(a,b){var d=this.get("strings.first_weekday")||0,d=this._getCutoffColumn(a,d),f=x.daysInMonth(a),e=b.get("id"),h,m;b.setStyle("visibility","hidden");b.setAttribute("aria-label",x.format(a,{format:"%B %Y"}));for(h=0;12>=h;h++)if(m=b.all(".calendar_col"+h),m.removeClass(F),h<d||h>=d+7)m.addClass(F);else switch(h){case 0:m=b.one("#"+e+"_0_30");30<=f?(m.set("text","30"),m.removeClass(s).addClass(v)):(m.setContent(" "),m.removeClass(v).addClass(s));break;case 1:m= b.one("#"+e+"_1_31");31<=f?(m.set("text","31"),m.removeClass(s).addClass(v)):(m.setContent(" "),m.removeClass(v).addClass(s));break;case 6:m=b.one("#"+e+"_6_29");29<=f?(m.set("text","29"),m.removeClass(s).addClass(v)):(m.setContent(" "),m.removeClass(v).addClass(s));break;case 7:m=b.one("#"+e+"_7_30");30<=f?(m.set("text","30"),m.removeClass(s).addClass(v)):(m.setContent(" "),m.removeClass(v).addClass(s));break;case 8:m=b.one("#"+e+"_8_31"),31<=f?(m.set("text","31"),m.removeClass(s).addClass(v)): (m.setContent(" "),m.removeClass(v).addClass(s))}this._paneProperties[e].cutoffCol=d;this._paneProperties[e].daysInMonth=f;this._paneProperties[e].paneDate=a;b.setStyle("visibility","inherit")},_updateCalendarHeader:function(b){var d="",e=this.get("headerRenderer");a.Lang.isString(e)?d=x.format(b,{format:e}):e instanceof Function&&(d=e.call(this,b));return d},_initCalendarHeader:function(a){return E(E(d.HEADER_TEMPLATE,{calheader:this._updateCalendarHeader(a),calendar_id:this._calendarId}),d.CALENDAR_STRINGS)}, _initCalendarHTML:function(b){var e={},f=0,h,m;e.header_template=this._initCalendarHeader(b);e.calendar_id=this._calendarId;e.body_template=E(E(d.CONTENT_TEMPLATE,e),d.CALENDAR_STRINGS);m=e.body_template.replace(/\{calendar_grid_template\}/g,a.bind(function(){h=this._initCalendarPane(x.addMonths(b,f),e.calendar_id+"_pane_"+f);f++;return h},this));this._paneNumber=f;return m}},{CALENDAR_STRINGS:{calendar_grid_class:b,calendar_body_class:p,calendar_hd_class:u,calendar_hd_label_class:t,calendar_weekdayrow_class:n, calendar_weekday_class:C,calendar_row_class:z,calendar_day_class:v,calendar_dayanchor_class:A,calendar_pane_class:B,calendar_right_grid_class:w,calendar_left_grid_class:f,calendar_status_class:e},CONTENT_TEMPLATE:'<div class="yui3-g {calendar_pane_class}" id="{calendar_id}">{header_template}<div class="yui3-u-1">{calendar_grid_template}</div></div>',ONE_PANE_TEMPLATE:'<div class="yui3-g {calendar_pane_class}" id="{calendar_id}">{header_template}<div class="yui3-u-1">{calendar_grid_template}</div></div>', TWO_PANE_TEMPLATE:'<div class="yui3-g {calendar_pane_class}" id="{calendar_id}">{header_template}<div class="yui3-u-1-2"><div class = "{calendar_left_grid_class}">{calendar_grid_template}</div></div><div class="yui3-u-1-2"><div class = "{calendar_right_grid_class}">{calendar_grid_template}</div></div></div>',THREE_PANE_TEMPLATE:'<div class="yui3-g {calendar_pane_class}" id="{calendar_id}">{header_template}<div class="yui3-u-1-3"><div class="{calendar_left_grid_class}">{calendar_grid_template}</div></div><div class="yui3-u-1-3">{calendar_grid_template}</div><div class="yui3-u-1-3"><div class="{calendar_right_grid_class}">{calendar_grid_template}</div></div></div>', CALENDAR_GRID_TEMPLATE:'<table class="{calendar_grid_class}" id="{calendar_pane_id}" role="grid" aria-readonly="true" aria-label="{pane_arialabel}" tabindex="{calendar_pane_tabindex}"><thead>{weekday_row_template}</thead><tbody>{body_template}</tbody></table>',HEADER_TEMPLATE:'<div class="yui3-g {calendar_hd_class}"><div class="yui3-u {calendar_hd_label_class}" id="{calendar_id}_header" aria-role="heading">{calheader}</div></div>',WEEKDAY_ROW_TEMPLATE:'<tr class="{calendar_weekdayrow_class}" role="row">{weekday_row}</tr>', CALDAY_ROW_TEMPLATE:'<tr class="{calendar_row_class}" role="row">{calday_row}</tr>',WEEKDAY_TEMPLATE:'<th class="{calendar_weekday_class}" role="columnheader" aria-label="{weekdayname}">{short_weekdayname}</th>',CALDAY_TEMPLATE:'<td class="{calendar_col_class} {calendar_day_class} {calendar_col_visibility_class}" id="{calendar_day_id}" role="gridcell" tabindex="-1">{day_content}</td>',NAME:"calendarBase",ATTRS:{tabIndex:{value:1},date:{value:new Date,setter:function(a){a=this._normalizeDate(a);return x.areEqual(a, this.get("date"))?this.get("date"):a}},showPrevMonth:{value:!1},showNextMonth:{value:!1},strings:{valueFn:function(){return a.Intl.get("calendar-base")}},headerRenderer:{value:"%B %Y"},enabledDatesRule:{value:null},disabledDatesRule:{value:null},selectedDates:{readOnly:!0,getter:function(){return this._getSelectedDatesList()}},customRenderer:{lazyAdd:!1,value:{},setter:function(a){this._rules=a.rules;this._filterFunction=a.filterFunction}}}})},"3.17.2",{requires:["widget","datatype-date","datatype-date-math", "cssgrids"],lang:"de en es es-AR fr hu it ja nb-NO nl pt-BR ru zh-Hans zh-Hans-CN zh-Hant zh-Hant-HK zh-HANT-TW".split(" "),skinnable:!0})},1246:function(A,B){YUI.add("calendar",function(a,l){function d(){d.superclass.constructor.apply(this,arguments)}var e=a.ClassNameManager.getClassName,b=e("calendar","day-selected"),f=e("calendar","day-highlighted"),w=e("calendar","day"),p=e("calendar","prevmonth-day"),u=e("calendar","nextmonth-day"),t=e("calendar","grid"),n=a.DataType.Date,C=e("calendar","pane"), F=a.UA.os;a.Calendar=a.extend(d,a.CalendarBase,{_keyEvents:[],_highlightedDateNode:null,_lastSelectedDate:null,initializer:function(){this.plug(a.Plugin.CalendarNavigator);this._keyEvents=[];this._lastSelectedDate=this._highlightedDateNode=null},_bindCalendarEvents:function(){var a=this.get("contentBox").one("."+C);a.on("selectstart",this._preventSelectionStart);a.delegate("click",this._clickCalendar,"."+w+", ."+p+", ."+u,this);a.delegate("keydown",this._keydownCalendar,"."+t,this);a.delegate("focus", this._focusCalendarGrid,"."+t,this);a.delegate("focus",this._focusCalendarCell,"."+w,this);a.delegate("blur",this._blurCalendarGrid,"."+t+",."+w,this);this.after(["minimumDateChange","maximumDateChange"],this._afterCustomRendererChange)},_preventSelectionStart:function(a){a.preventDefault()},_highlightDateNode:function(a){this._unhighlightCurrentDateNode();a=this._dateToNode(a);a.focus();a.addClass(f)},_unhighlightCurrentDateNode:function(){var a=this.get("contentBox").all("."+f);a&&a.removeClass(f)}, _getGridNumber:function(a){a=a.get("id").split("_").reverse();return parseInt(a[0],10)},_blurCalendarGrid:function(){this._unhighlightCurrentDateNode()},_focusCalendarCell:function(a){this._highlightedDateNode=a.target;a.stopPropagation()},_focusCalendarGrid:function(){this._unhighlightCurrentDateNode();this._highlightedDateNode=null},_keydownCalendar:function(a){var d=this._getGridNumber(a.target),e=!this._highlightedDateNode?null:this._nodeToDate(this._highlightedDateNode),f=a.keyCode,l=0,C;switch(f){case 40:l= 7;break;case 38:l=-7;break;case 37:l=-1;break;case 39:l=1;break;case 32:case 13:if(a.preventDefault(),this._highlightedDateNode)if(C=this.get("selectionMode"),"single"===C&&!this._highlightedDateNode.hasClass(b))this._clearSelection(!0),this._addDateToSelection(e);else if("multiple"===C||"multiple-sticky"===C)this._highlightedDateNode.hasClass(b)?this._removeDateFromSelection(e):this._addDateToSelection(e)}if(40===f||38===f||37===f||39===f)e||(e=n.addMonths(this.get("date"),d),l=0),a.preventDefault(), a=n.addDays(e,l),d=this.get("date"),e=n.addMonths(this.get("date"),this._paneNumber-1),f=new Date(e),e.setDate(n.daysInMonth(e)),n.isInRange(a,d,e)?this._highlightDateNode(a):n.isGreater(d,a)?n.isGreaterOrEqual(this.get("minimumDate"),d)||(this.set("date",n.addMonths(d,-1)),this._highlightDateNode(a)):n.isGreater(a,e)&&!n.isGreaterOrEqual(f,this.get("maximumDate"))&&(this.set("date",n.addMonths(d,1)),this._highlightDateNode(a))},_clickCalendar:function(a){var d=a.currentTarget,e=d.hasClass(w)&&!d.hasClass(p)&& !d.hasClass(u),f=d.hasClass(b);switch(this.get("selectionMode")){case "single":e&&!f&&(this._clearSelection(!0),this._addDateToSelection(this._nodeToDate(d)));break;case "multiple-sticky":e&&(f?this._removeDateFromSelection(this._nodeToDate(d)):this._addDateToSelection(this._nodeToDate(d)));break;case "multiple":e&&(!a.metaKey&&!a.ctrlKey&&!a.shiftKey?(this._clearSelection(!0),this._lastSelectedDate=this._nodeToDate(d),this._addDateToSelection(this._lastSelectedDate)):("macintosh"===F&&a.metaKey|| "macintosh"!==F&&a.ctrlKey)&&!a.shiftKey?f?(this._removeDateFromSelection(this._nodeToDate(d)),this._lastSelectedDate=null):(this._lastSelectedDate=this._nodeToDate(d),this._addDateToSelection(this._lastSelectedDate)):("macintosh"===F&&a.metaKey||"macintosh"!==F&&a.ctrlKey)&&a.shiftKey?this._lastSelectedDate?(a=this._nodeToDate(d),this._addDateRangeToSelection(a,this._lastSelectedDate),this._lastSelectedDate=a):(this._lastSelectedDate=this._nodeToDate(d),this._addDateToSelection(this._lastSelectedDate)): a.shiftKey&&(this._lastSelectedDate?(a=this._nodeToDate(d),this._clearSelection(!0),this._addDateRangeToSelection(a,this._lastSelectedDate),this._lastSelectedDate=a):(this._clearSelection(!0),this._lastSelectedDate=this._nodeToDate(d),this._addDateToSelection(this._lastSelectedDate))))}e?this.fire("dateClick",{cell:d,date:this._nodeToDate(d)}):d.hasClass(p)?this.fire("prevMonthClick"):d.hasClass(u)&&this.fire("nextMonthClick")},_canBeSelected:function(a){var b=this.get("minimumDate"),e=this.get("maximumDate"); return b&&!n.isGreaterOrEqual(a,b)||e&&n.isGreater(a,e)?!1:d.superclass._canBeSelected.call(this,a)},_renderCustomRules:function(){d.superclass._renderCustomRules.call(this);var a=this.get("minimumDate"),b=this.get("maximumDate"),e=[],f,l;if(a||b){for(l=0;l<this._paneNumber;l++)f=n.addMonths(this.get("date"),l),e=e.concat(n.listOfDatesInMonth(f));if(a){f=0;for(l=e.length;f<l&&!n.isGreaterOrEqual(e[f],a);f++)this._disableDate(e[f])}if(b)for(f=e.length-1;0<=f;f--)if(n.isGreater(e[f],b))this._disableDate(e[f]); else break}},subtractMonth:function(a){this.set("date",n.addMonths(this.get("date"),-1));a&&a.halt();return this},subtractYear:function(a){this.set("date",n.addYears(this.get("date"),-1));a&&a.halt();return this},addMonth:function(a){this.set("date",n.addMonths(this.get("date"),1));a&&a.halt();return this},addYear:function(a){this.set("date",n.addYears(this.get("date"),1));a&&a.halt();return this}},{NAME:"calendar",ATTRS:{selectionMode:{value:"single"},date:{value:new Date,lazyAdd:!1,setter:function(a){a= this._normalizeDate(a);var b=n.addMonths(a,this._paneNumber-1),d=this.get("minimumDate"),e=this.get("maximumDate");if((!d||n.isGreaterOrEqual(a,d))&&(!e||n.isGreaterOrEqual(e,b)))return a;if(d&&n.isGreater(d,a))return this._normalizeDate(d);if(e&&n.isGreater(b,e))return n.addMonths(this._normalizeDate(e),1-this._paneNumber)}},minimumDate:{value:null,setter:function(b){if(a.Lang.isDate(b)){var d=this.get("date"),e=this._normalizeTime(b);d&&!n.isGreaterOrEqual(d,e)&&this.set("date",b);return e}return null}}, maximumDate:{value:null,setter:function(b){if(a.Lang.isDate(b)){var d=this.get("date");d&&!n.isGreaterOrEqual(b,n.addMonths(d,this._paneNumber-1))&&this.set("date",n.addMonths(this._normalizeDate(b),1-this._paneNumber));return this._normalizeTime(b)}return null}}}})},"3.17.2",{requires:["calendar-base","calendarnavigator"],skinnable:!0})},1247:function(A,B){YUI.add("calendarnavigator",function(a,l){function d(){d.superclass.constructor.apply(this,arguments)}var e=a.ClassNameManager.getClassName,b= a.Lang.sub,f=a.Node.create,w=e("calendar","header"),p=e("calendarnav","prevmonth"),u=e("calendarnav","nextmonth"),t=e("calendarnav","month-disabled"),n=a.DataType.Date;d.NS="navigator";d.NAME="pluginCalendarNavigator";d.ATTRS={shiftByMonths:{value:1}};d.CALENDARNAV_STRINGS={prev_month_class:p,next_month_class:u};d.PREV_MONTH_CONTROL_TEMPLATE='<a class="yui3-u {prev_month_class}" role="button" aria-label="{prev_month_arialabel}" tabindex="{control_tabindex}" />';d.NEXT_MONTH_CONTROL_TEMPLATE='<a class="yui3-u {next_month_class}" role="button" aria-label="{next_month_arialabel}" tabindex="{control_tabindex}" />'; a.extend(d,a.Plugin.Base,{_eventAttachments:{},_controls:{},initializer:function(){this._controls={};this._eventAttachments={};this.afterHostMethod("renderUI",this._initNavigationControls)},destructor:function(){},_focusNavigation:function(a){a.currentTarget.focus()},_subtractMonths:function(a){if("click"===a.type||"keydown"===a.type&&(13===a.keyCode||32===a.keyCode)){var b=this.get("host"),d=b.get("date");b.set("date",n.addMonths(d,-1*this.get("shiftByMonths")));a.preventDefault()}},_addMonths:function(a){if("click"=== a.type||"keydown"===a.type&&(13===a.keyCode||32===a.keyCode)){var b=this.get("host"),d=b.get("date");b.set("date",n.addMonths(d,this.get("shiftByMonths")));a.preventDefault()}},_updateControlState:function(){var a=this.get("host"),b=a.get("date"),d=n.addMonths(b,a._paneNumber-1),e=a._normalizeDate(a.get("minimumDate")),a=a._normalizeDate(a.get("maximumDate"));n.areEqual(e,b)?(this._eventAttachments.prevMonth&&(this._eventAttachments.prevMonth.detach(),this._eventAttachments.prevMonth=!1),this._controls.prevMonth.hasClass(t)|| this._controls.prevMonth.addClass(t).setAttribute("aria-disabled","true")):(this._eventAttachments.prevMonth||(this._eventAttachments.prevMonth=this._controls.prevMonth.on(["click","keydown"],this._subtractMonths,this)),this._controls.prevMonth.hasClass(t)&&this._controls.prevMonth.removeClass(t).setAttribute("aria-disabled","false"));n.areEqual(a,d)?(this._eventAttachments.nextMonth&&(this._eventAttachments.nextMonth.detach(),this._eventAttachments.nextMonth=!1),this._controls.nextMonth.hasClass(t)|| this._controls.nextMonth.addClass(t).setAttribute("aria-disabled","true")):(this._eventAttachments.nextMonth||(this._eventAttachments.nextMonth=this._controls.nextMonth.on(["click","keydown"],this._addMonths,this)),this._controls.nextMonth.hasClass(t)&&this._controls.nextMonth.removeClass(t).setAttribute("aria-disabled","false"));this._controls.prevMonth.on(["click","keydown"],this._focusNavigation,this);this._controls.nextMonth.on(["click","keydown"],this._focusNavigation,this)},_renderPrevControls:function(){var a= f(b(d.PREV_MONTH_CONTROL_TEMPLATE,d.CALENDARNAV_STRINGS));a.on("selectstart",this.get("host")._preventSelectionStart);return a},_renderNextControls:function(){var a=f(b(d.NEXT_MONTH_CONTROL_TEMPLATE,d.CALENDARNAV_STRINGS));a.on("selectstart",this.get("host")._preventSelectionStart);return a},_initNavigationControls:function(){var a=this.get("host"),b=a.get("contentBox").one("."+w);d.CALENDARNAV_STRINGS.control_tabindex=a.get("tabIndex");d.CALENDARNAV_STRINGS.prev_month_arialabel="Go to previous month"; d.CALENDARNAV_STRINGS.next_month_arialabel="Go to next month";this._controls.prevMonth=this._renderPrevControls();this._controls.nextMonth=this._renderNextControls();this._updateControlState();a.after(["dateChange","minimumDateChange","maximumDateChange"],this._updateControlState,this);b.prepend(this._controls.prevMonth);b.append(this._controls.nextMonth)}});a.namespace("Plugin").CalendarNavigator=d},"3.17.2",{requires:["plugin","classnamemanager","datatype-date","node"],skinnable:!0})},1536:function(A, B){YUI.add("squarespace-calendar-block-renderer",function(a){a.namespace("Squarespace");a.Squarespace.CalendarBlockRenderer={};a.Squarespace.CalendarBlockRenderer.renderCalendar=function(d,e,b){if(!a.Lang.isString(e))if(a.Object.hasKey(e,"collectionId"))if(null!==e.collectionId)e=e.collectionId;else{d.empty().setHTML('<div class="sqs-state-message">Please choose a collection for this calendar to display.</div>');return}else e=a.instanceOf(e,a.Squarespace.Models.ContentCollection)?e.get("id"):CONFIG_PANEL.getPreviewFrameCollection().get("id"); e={date:new Date,collectionId:e};a.Lang.isValue(b)&&a.merge(e,{pageCollectionId:b});b=new a.Squarespace.SquarespaceCalendar(e);b.plug(a.Squarespace.SquarespaceCalendarRenderer);b.render(d);return b};var l;a.config.win.Squarespace.onInitialize(a,function(){l=[];var d=a.all(".sqs-block.calendar-block[data-block-json]");d.size()&&d.each(function(d){var b=d.one(".sqs-block-content");d=a.JSON.parse(d.getAttribute("data-block-json"));l.push(a.Squarespace.CalendarBlockRenderer.renderCalendar(b,d))},this)}); a.config.win.Squarespace.onDestroy(a,function(){l.forEach(function(a){a.destroy()});l=null})},"1.0",{requires:["squarespace-calendar-core-renderer"]})}});