Google
Edit File: commerce-f6eb8db50315139eb8d5-min.js
webpackJsonp([16],{0:function(k,m,b){b(1949);b(815);b(825);b(824);b(823);b(2201);b(1417);b(209);b(1355);b(1588);b(2227);b(2115);b(2225);b(2203);b(796);b(670);b(375);b(374);b(220);b(1587);b(1586);b(184);b(688);b(1351);b(2067);b(1940);b(1403);b(1943);b(1423);b(1566);b(1562);b(1406);b(1508);b(1071);b(818);b(817);b(1944);b(1939);b(1057);b(1385);b(1504);b(1427);b(1509);b(2119);b(2212);b(1590);b(1589);b(1941);b(1564);b(1567);b(1942);b(1324);b(392);b(1055);b(2118);b(1563);b(1996);b(1570);b(1422);b(1044); b(1565)},184:function(k,m){YUI.add("squarespace-spinner",function(b){b.namespace("Squarespace").Spinner=b.Base.create("Spinner",b.Widget,[],{renderUI:function(){this.get("boundingBox").addClass(this.get("color"));0<b.UA.ie&&10>b.UA.ie&&(this.get("contentBox").append(b.Node.create('<img class="sqs-ie-spinner" src="../../universal/images-v6/configuration/crappy-ie-spinner.gif"/>')),this.get("boundingBox").addClass("degraded"));var f=this.get("size");b.Lang.isNumber(f)||this.get("boundingBox").addClass(f)}, spin:function(){this.get("boundingBox").show()},stop:function(){this.get("boundingBox").hide()},addClass:function(b){this.get("boundingBox").addClass(b)}},{CSS_PREFIX:"sqs-spin",NS:"spinner",ATTRS:{size:{value:"default",setter:function(f){b.Lang.isNumber(f)&&(this.set("width",f),this.set("height",f));return f}},color:{value:"light"}}})},"1.0",{requires:["base-build","widget"]})},209:function(k,m){YUI.add("model",function(b,f){function a(){a.superclass.constructor.apply(this,arguments)}var c=YUI.namespace("Env.Model"), d=b.Lang,e=b.Array,h=b.Object,g="error";b.Model=b.extend(a,b.Base,{idAttribute:"id",_allowAdHocAttrs:!0,_isYUIModel:!0,initializer:function(a){this.changed={};this.lastChange={};this.lists=[]},destroy:function(b,c){var g=this;"function"===typeof b&&(c=b,b=null);g.onceAfter("destroy",function(){function a(d){d||e.each(g.lists.concat(),function(a){a.remove(g,b)});c&&c.apply(null,arguments)}b&&(b.remove||b["delete"])?g.sync("delete",b,a):a()});return a.superclass.destroy.call(g)},generateClientId:function(){c.lastId|| (c.lastId=0);return this.constructor.NAME+"_"+(c.lastId+=1)},getAsHTML:function(a){a=this.get(a);return b.Escape.html(d.isValue(a)?String(a):"")},getAsURL:function(a){a=this.get(a);return encodeURIComponent(d.isValue(a)?String(a):"")},isModified:function(){return this.isNew()||!h.isEmpty(this.changed)},isNew:function(){return!d.isValue(this.get("id"))},load:function(a,b){var c=this;"function"===typeof a&&(b=a,a={});a||(a={});c.sync("read",a,function(e,d){var h={options:a,response:d},f;e?(h.error= e,h.src="load",c.fire(g,h)):(c._loadEvent||(c._loadEvent=c.publish("load",{preventable:!1})),f=h.parsed=c._parse(d),c.setAttrs(f,a),c.changed={},c.fire("load",h));b&&b.apply(null,arguments)});return c},parse:function(a){if("string"===typeof a)try{return b.JSON.parse(a)}catch(c){return this.fire(g,{error:c,response:a,src:"parse"}),null}return a},save:function(a,b){var c=this;"function"===typeof a&&(b=a,a={});a||(a={});c._validate(c.toJSON(),function(e){e?b&&b.call(null,e):c.sync(c.isNew()?"create": "update",a,function(e,d){var h={options:a,response:d},f;e?(h.error=e,h.src="save",c.fire(g,h)):(c._saveEvent||(c._saveEvent=c.publish("save",{preventable:!1})),d&&(f=h.parsed=c._parse(d),c.setAttrs(f,a)),c.changed={},c.fire("save",h));b&&b.apply(null,arguments)})});return c},set:function(a,b,c){var g={};g[a]=b;return this.setAttrs(g,c)},setAttrs:function(a,c){var g=this.idAttribute,e,d,f,u;c=b.merge(c);u=c._transaction={};"id"!==g&&(a=b.merge(a),h.owns(a,g)?a.id=a[g]:h.owns(a,"id")&&(a[g]=a.id)); for(d in a)h.owns(a,d)&&this._setAttr(d,a[d],c);if(!h.isEmpty(u)){g=this.changed;f=this.lastChange={};for(d in u)h.owns(u,d)&&(e=u[d],g[d]=e.newVal,f[d]={newVal:e.newVal,prevVal:e.prevVal,src:e.src||null});c.silent||(this._changeEvent||(this._changeEvent=this.publish("change",{preventable:!1})),c.changed=f,this.fire("change",c))}return this},sync:function(){var a=e(arguments,0,!0).pop();"function"===typeof a&&a()},toJSON:function(){var a=this.getAttrs();delete a.clientId;delete a.destroyed;delete a.initialized; "id"!==this.idAttribute&&delete a.id;return a},undo:function(a,b){var c=this.lastChange,g=this.idAttribute,d={},f;a||(a=h.keys(c));e.each(a,function(a){h.owns(c,a)&&(a=a===g?"id":a,f=!0,d[a]=c[a].prevVal)});return f?this.setAttrs(d,b):this},validate:function(a,b){b&&b()},addAttr:function(b,c,g){var e=this.idAttribute,h;e&&b===e&&(e=this._isLazyAttr("id")||this._getAttrCfg("id"),h=c.value===c.defaultValue?null:c.value,d.isValue(h)||(h=e.value===e.defaultValue?null:e.value,d.isValue(h)||(h=d.isValue(c.defaultValue)? c.defaultValue:e.defaultValue)),c.value=h,e.value!==h&&(e.value=h,this._isLazyAttr("id")?this._state.add("id","lazy",e):this._state.add("id","value",h)));return a.superclass.addAttr.apply(this,arguments)},_parse:function(a){return this.parse(a)},_validate:function(a,b){function c(h){d.isValue(h)?(e.fire(g,{attributes:a,error:h,src:"validate"}),b(h)):b()}var e=this;1===e.validate.length?c(e.validate(a,c)):e.validate(a,c)},_setAttrVal:function(b,c,e,g,d,h){var f=a.superclass._setAttrVal.apply(this, arguments),t=d&&d._transaction,w=h&&h.initializing;f&&(t&&!w)&&(t[b]={newVal:this.get(b),prevVal:e,src:d.src||null});return f}},{NAME:"model",ATTRS:{clientId:{valueFn:"generateClientId",readOnly:!0},id:{value:null}}})},"3.17.2",{requires:["base-build","escape","json-parse"]})},220:function(k,m){YUI.add("squarespace-widgets-alert",function(b){b.namespace("Squarespace.Widgets");var f=b.Squarespace.Widgets.Alert=b.Base.create("alert",b.Squarespace.Widgets.Confirmation,[],{},{CSS_PREFIX:"sqs-widgets-confirmation", TYPE:b.Squarespace.Widgets.Confirmation.TYPE,ANCHOR:b.Squarespace.Widgets.Confirmation.ANCHOR,show:function(a){return new f(a)},ATTRS:{className:{value:"alert"},style:{value:b.Squarespace.Widgets.Confirmation.TYPE.CONFIRM_ONLY},"strings.confirm":{value:"Okay"}}})},"1.0",{requires:["base","squarespace-widgets-confirmation"]})},232:function(k,m){k.exports={AF:"Afghanistan",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina", AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AX:"Aland Islands",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",BN:"Brunei Darussalam",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CA:"Canada",CI:"Cote d'Ivoire",CM:"Cameroon",CV:"Cape Verde",KY:"Cayman Islands", CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos (Keeling) Islands",CO:"Colombia",KM:"Comoros",CG:"Congo",CD:"Congo, Democratic Republic",CK:"Cook Islands",CR:"Costa Rica",HR:"Croatia",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",TL:"Timor-Leste",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands (Malvinas)",FO:"Faroe Islands",FJ:"Fiji", FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GG:"Guernsey",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard and McDonald Islands",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica", JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KP:"Korea (the Democratic People's Republic of)",KR:"Korea (the Republic of)",KV:"Kosovo",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Laos",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macau",MK:"Macedonia",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte", MX:"Mexico",FM:"Micronesia",MD:"Moldova",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",AN:"Netherlands Antilles",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PA:"Panama",PG:"Papua New Guinea",PS:"Palestine, State of",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn", PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Reunion",RO:"Romania",RU:"Russian Federation",RW:"Rwanda",GS:"South Georgia and the South Sandwich Islands",BL:"Saint Barthelemy",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",ES:"Spain", LK:"Sri Lanka",SH:"Saint Helena",PM:"Saint Pierre and Miquelon",SR:"Suriname",SJ:"Svalbard and Jan Mayen Islands",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",TW:"Taiwan",TJ:"Tajikistan",TZ:"Tanzania",TH:"Thailand",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",US:"United States",UM:"United States Minor Outlying Islands",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",UY:"Uruguay", UZ:"Uzbekistan",VU:"Vanuatu",VA:"Vatican City State (Holy See)",VE:"Venezuela",VN:"Vietnam",VG:"Virgin Islands (British)",VI:"Virgin Islands (U.S.)",WF:"Wallis and Futuna Islands",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"}},350:function(k,m){k.exports={LIVE:1,TEST_MODE:2,NOT_CONNECTED:3}},374:function(k,m){YUI.add("squarespace-rendering",function(b){b.Squarespace.Rendering={getWidthForHeight:function(b,a,c){return b/a*c},getHeightForWidth:function(b,a,c){return a/b*c},getDimensionsFromNode:function(f){if(f= f.getAttribute("data-image-dimensions")){if(b.Lang.isString(f))return f=f.split("x"),{width:parseInt(f[0],10),height:parseInt(f[1],10)}}else return{width:null,height:null}},getSquarespaceSizeForWidth:function(f){b.config.win.devicePixelRatio&&(f*=b.config.win.devicePixelRatio);return 1500<f?"2500w":1E3<f?"1500w":750<f?"1000w":500<f?"750w":300<f?"500w":100<f?"300w":"100w"},splitScriptsAndHTML:function(b){for(var a=b.indexOf("<script>"),c=-1,d="",e="",h=0;;){c=b.indexOf("\x3c/script>",h);if(-1==c|| -1==a)return{html:b,script:""};var g=b.substring(a+8,c),e=e+g,d=d+b.substring(h,a),h=c+9,a=b.indexOf("<script>",h);if(-1===a)return 0===e.length&&(e=null),d+=b.substring(h),{html:d,script:e}}},getPixelSize:function(b){b=b.split("x");return parseInt(b[0],10)*parseInt(b[1],10)},scaleEmbed:function(b,a){var c=/height="([0-9]+)"/.exec(b);if(!c)return b;var c=parseInt(c[1],10),d=/width="([0-9]+)"/.exec(b);if(!d)return b;d=parseInt(d[1],10);return b.replace(/height="([0-9]+)"/,'height="'+c*(a/d)+'"').replace(/width="([0-9]+)"/, 'width="'+a+'"')},applyStyleToMap:function(b,a){var c=new google.maps.StyledMapType(a,{name:"Custom"});b.mapTypes.set("custom",c);b.setMapTypeId("custom")},createGrayscaleMap:function(b){this.applyStyleToMap(b,[{featureType:"landscape.man_made",elementType:"all",stylers:[{lightness:51}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"all",stylers:[{gamma:2.51}]},{featureType:"road.arterial",elementType:"all",stylers:[{gamma:1.9}]},{featureType:"water", elementType:"all",stylers:[{gamma:1.36}]},{featureType:"road.highway",elementType:"all",stylers:[{gamma:1.33}]},{featureType:"transit.station.rail",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"transit.station.bus",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"transit",elementType:"all",stylers:[{gamma:1.2},{hue:"#0033ff"}]},{featureType:"administrative.neighborhood",elementType:"labels",stylers:[{gamma:1.43}]},{featureType:"water",elementType:"all",stylers:[{lightness:-47}]}, {featureType:"all",elementType:"all",stylers:[{saturation:-100}]},{featureType:"road.arterial",elementType:"labels",stylers:[{lightness:23}]}])},getIconUrl:function(b,a,c){return"/universal/images-v6/icons/icon-"+b+"-"+a+"-"+c+".png"},onMapConfigure:function(f){if(f=b.one(f)){var a=f.getAncestorData("layout-engine");f=f.getAncestorData("manager");a&&f&&a.lm.configureBlock(null,f.boundingEl)}},renderMap:function(f,a,c,d){a=b.merge({location:{mapLat:40.720882,mapLng:-74.000988,mapZoom:12},vSize:12}, a);if(f){c=c||{};var e=f._node;if(e.__map)google.maps.event.trigger(e.__map,"resize");else{f.addClass("page-map");f.set("innerHTML"," ");var h=b.bind(function(){e.__geocoder=new google.maps.Geocoder;e.__map=new google.maps.Map(e,{zoom:a.location.mapZoom,center:new google.maps.LatLng(a.location.mapLat,a.location.mapLng),mapTypeId:google.maps.MapTypeId.ROADMAP,draggable:!0,scrollwheel:!0,disableDefaultUI:!0});b.Lang.isUndefined(d)?b.Squarespace.Rendering.createGrayscaleMap(e.__map):this.applyStyleToMap(e.__map, d);var g=a.location,h;g.addressLine1||g.addressLine2?(h=g.addressLine1+" "+g.addressLine2,g.addressCountry&&(h+=", "+g.addressCountry)):h=a.location.mapLat+","+a.location.mapLng;if(a.location.markerLat&&a.location.markerLng){var f=new google.maps.LatLng(a.location.markerLat,a.location.markerLng);e.__marker=new google.maps.Marker({map:e.__map,animation:google.maps.Animation.DROP,draggable:!1,position:f,title:g.addressTitle?g.addressTitle+" "+h:h,icon:{url:"../../universal/images-v6/icons/icon-map-marker-2x.png", size:new google.maps.Size(52,68),scaledSize:new google.maps.Size(26,34),anchor:new google.maps.Point(13,34)}});b.Lang.isObject(c.infoWindow)&&(e.__infoWindow=new google.maps.InfoWindow(b.merge({pixelOffset:new google.maps.Size(-13,10)},c.infoWindow)),c.infoWindow.autoOpen&&e.__infoWindow.open(e.__map,e.__marker));google.maps.event.addListener(e.__marker,"click",b.bind(function(a,c){if(e.__infoWindow)e.__infoWindow.open(e.__map,e.__marker);else{a=a.toUrlValue();var g=c.getZoom(),g=b.QueryString.stringify({sll:a, q:h,z:g});window.open("http://maps.google.com/maps?"+g)}},this,f,e.__map))}e.startEditing=function(){e.__map.setOptions({draggable:!0,scrollwheel:!0,disableDefaultUI:!1});e.__marker&&e.__marker.setOptions({draggable:!0})};e.stopEditing=function(){e.__map.setOptions({draggable:!1,scrollwheel:!1,disableDefaultUI:!0});e.__marker&&e.__marker.setOptions({draggable:!1})};b.one(e).fire("maps-loaded");google.maps.event.addListener(e.__map,"rightclick",b.bind(this.onMapConfigure,this,e))},this);b.Squarespace.GoogleMap.loaded? h():(e.__loadingMap=!0,b.Squarespace.GoogleMap.on("load-success",function(){e.__loadingMap=!1;h()}),b.Squarespace.GoogleMap.load())}}else console.error("Page map node missing...")}}},"1.0",{requires:[]})},375:function(k,m){YUI.add("datatype-date-format",function(b,f){var a=function(a,b,c){"undefined"===typeof c&&(c=10);for(b+="";parseInt(a,10)<c&&1<c;c/=10)a=b+a;return a.toString()},c={formats:{a:function(a,b){return b.a[a.getDay()]},A:function(a,b){return b.A[a.getDay()]},b:function(a,b){return b.b[a.getMonth()]}, B:function(a,b){return b.B[a.getMonth()]},C:function(b){return a(parseInt(b.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(b){return a(parseInt(c.formats.G(b)%100,10),0)},G:function(a){var b=a.getFullYear(),h=parseInt(c.formats.V(a),10);a=parseInt(c.formats.W(a),10);a>h?b++:0===a&&52<=h&&b--;return b},H:["getHours","0"],I:function(b){b=b.getHours()%12;return a(0===b?12:b,0)},j:function(b){var c=new Date(""+b.getFullYear()+"/1/1 GMT");b=new Date(""+b.getFullYear()+"/"+(b.getMonth()+ 1)+"/"+b.getDate()+" GMT")-c;b=parseInt(b/6E4/60/24,10)+1;return a(b,0,100)},k:["getHours"," "],l:function(b){b=b.getHours()%12;return a(0===b?12:b," ")},m:function(b){return a(b.getMonth()+1,0)},M:["getMinutes","0"],p:function(a,b){return b.p[12<=a.getHours()?1:0]},P:function(a,b){return b.P[12<=a.getHours()?1:0]},s:function(a,b){return parseInt(a.getTime()/1E3,10)},S:["getSeconds","0"],u:function(a){a=a.getDay();return 0===a?7:a},U:function(b){var e=parseInt(c.formats.j(b),10);b=6-b.getDay();e= parseInt((e+b)/7,10);return a(e,0)},V:function(b){var e=parseInt(c.formats.W(b),10),h=(new Date(""+b.getFullYear()+"/1/1")).getDay(),e=e+(4<h||1>=h?0:1);53===e&&4>(new Date(""+b.getFullYear()+"/12/31")).getDay()?e=1:0===e&&(e=c.formats.V(new Date(""+(b.getFullYear()-1)+"/12/31")));return a(e,0)},w:"getDay",W:function(b){var e=parseInt(c.formats.j(b),10);b=7-c.formats.u(b);e=parseInt((e+b)/7,10);return a(e,0,10)},y:function(b){return a(b.getFullYear()%100,0)},Y:"getFullYear",z:function(b){b=b.getTimezoneOffset(); var c=a(parseInt(Math.abs(b/60),10),0),h=a(Math.abs(b%60),0);return(0<b?"-":"+")+c+h},Z:function(a){var b=a.toString().replace(/^.*:\d\d( GMT[+-]\d+)? \(?([A-Za-z ]+)\)?\d*$/,"$2").replace(/[a-z ]/g,"");4<b.length&&(b=c.formats.z(a));return b},"%":function(a){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(d,e){e=e||{};if(!b.Lang.isDate(d))return b.Lang.isValue(d)?d:"";var h,g;h=e.format|| "%Y-%m-%d";g=b.Intl.get("datatype-date-format");for(var q=function(a,b){var e=c.aggregates[b];return"locale"===e?g[b]:e},f=function(e,h){var q=c.formats[h];switch(b.Lang.type(q)){case "string":return d[q]();case "function":return q.call(d,d,g);case "array":if("string"===b.Lang.type(q[0]))return a(d[q[0]](),q[1]);default:return h}};h.match(/%[cDFhnrRtTxX]/);)h=h.replace(/%([cDFhnrRtTxX])/g,q);h=h.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g,f);q=f=void 0;return h}};b.mix(b.namespace("Date"),c);b.namespace("DataType"); b.DataType.Date=b.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(" ")})},392:function(k,m){YUI.add("squarespace-dialog-check-template", function(b){var f=b.Handlebars;(function(){var a=f.template;(f.templates=f.templates||{})["dialog-check.html"]=a(function(a,b,e,h,g){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,a.helpers);g=g||{};var q,f=this.escapeExpression;a='<div class="check-element ';if((h=e["if"].call(b,b.data,{hash:{},inverse:this.noop,fn:this.program(1,function(a,b){return"active"},g),data:g}))||0===h)a+=h;a+='">\n ';if((q=e["if"].call(b,(h=b.strings,null==h||!1===h?h:h.title),{hash:{},inverse:this.noop,fn:this.program(3, function(a,b){var c,g;return c=""+('\n <div class="title">'+f((g=(g=a.strings,null==g||!1===g?g:g.title),"function"===typeof g?g.apply(a):g))+"</div>\n ")},g),data:g}))||0===q)a+=q;a+="\n ";if((q=e["if"].call(b,(h=b.strings,null==h||!1===h?h:h.description),{hash:{},inverse:this.noop,fn:this.program(5,function(a,b){var c,g,e;c='\n <div class="description">';if((e=(g=(g=a.strings,null==g||!1===g?g:g.description),"function"===typeof g?g.apply(a):g))||0===e)c+=e;return c+"</div>\n "},g),data:g}))|| 0===q)a+=q;return a+"\n</div>\n"})})();b.Handlebars.registerPartial("dialog-check.html".replace("/","."),f.templates["dialog-check.html"])},"1.0",{requires:["handlebars-base"]})},670:function(k,m){YUI.add("squarespace-json-template",function(b){function f(a){return a.replace(/([\{\}\(\)\[\]\|\^\$\-\+\?])/g,"\\$1")}function a(a,b){var c=r[a+b];void 0===c&&(c="("+f(a)+"\\S.*?"+f(b)+"\n?)",c=RegExp(c,"g"));return c}function c(a,b){var c=[{context:a,index:-1}];return{PushSection:function(a){if(void 0=== a||null===a)return null;a="@"==a?c[c.length-1].context:c[c.length-1].context[a]||null;c.push({context:a,index:-1});return a},Pop:function(){c.pop()},next:function(){var a=c[c.length-1];-1==a.index&&(a={context:null,index:0},c.push(a));var b=c[c.length-2].context;if(a.index==b.length)c.pop();else return a.context=b[a.index++],!0},_Undefined:function(a){return void 0===b?null:b},_LookUpStack:function(a){for(var b=c.length-1;;){var g=c[b];if("@index"==a){if(-1!=g.index)return g.index}else if(g=g.context, "object"===typeof g&&(g=g[a],void 0!==g))return g;b--;if(-1>=b)return this._Undefined(a)}},get:function(a){if("@"==a)return c[c.length-1].context;var b=a.split("."),g=this._LookUpStack(b[0]);if(1<b.length)for(var e=1;e<b.length;e++){if(null===g)return"[JSONT: Can't resolve '"+a+"'.]";g=g[b[e]];if(void 0===g)return this._Undefined(b[e])}return g}}}function d(a,b,c){for(var g=0;g<a.length;g++){var e=a[g];if("string"==typeof e)c(e);else(0,e[0])(e[1],b,c)}}function e(a,b,c){var g;g=b.get(a.name);for(var e= 0;e<a.formatters.length;e++){var h=a.formatters[e];g=(0,h[0])(g,b,h[1])}c(g)}function h(a,b,c){var g=b.PushSection(a.section_name),e=!1;g&&(e=!0);g&&0===g.length&&(e=!1);e?(d(a.Statements(),b,c),b.Pop()):(b.Pop(),d(a.Statements("or"),b,c))}function g(a,b,c){for(var g=b.get("@"),e=0;e<a.clauses.length;e++){var h=a.clauses[e],q=h[1];if((0,h[0][0])(g,b,h[0][1])){d(q,b,c);break}}}function q(a,b,c){var g=b.PushSection(a.section_name);if(g&&0<g.length){var g=g.length-1,e=a.Statements();a=a.Statements("alternate"); for(var h=0;void 0!==b.next();h++)d(e,b,c),h!=g&&d(a,b,c)}else d(a.Statements("or"),b,c);b.Pop()}function v(c,d){function f(a){if(a.startsWith(l)){var c=d.partials[a.substr(l.length)];if(c)return[function(a,g,e){return b.JSONTemplate.evaluateJsonTemplate(c,a)},null];throw{name:"BadPartialInclude",message:a.substr(l)+" is not a valid partial. Remember, loops are not supported (a partial include cannot be included inside itself)."};}var g=t.lookup(a);if(!g[0])throw{name:"BadFormatter",message:a+" is not a valid formatter"}; return g}function v(a){var b=r.lookup(a);if(!b[0])throw{name:"BadPredicate",message:a+" is not a valid predicate"};return b}var t=new u([n(b.JSONTemplate.DEFAULT_FORMATTERS),p(b.JSONTemplate.DEFAULT_PREFIX_FORMATTERS)]),r=u([n(b.JSONTemplate.DEFAULT_PREDICATES),p(b.JSONTemplate.DEFAULT_PARAMETRIC_PREDICATES)]),H=d.format_char||"|";if(":"!=H&&"|"!=H)throw{name:"ConfigurationError",message:"Only format characters : and | are accepted"};var D=d.meta||"{}",E=D.length;if(1==E%2)throw{name:"ConfigurationError", message:D+" has an odd number of metacharacters"};for(var I=D.substring(0,E/2),D=D.substring(E/2,E),E=a(I,D),y=w({}),B=[y],J=I.length,x,s,G=0;;){x=E.exec(c);if(null===x)break;else s=x[0];x.index>G&&(G=c.slice(G,x.index),y.Append(G));G=E.lastIndex;x=!1;"\n"==s.slice(-1)&&(s=s.slice(null,-1),x=!0);s=s.slice(J,-J);if("#"!=s.charAt(0)){if("."==s.charAt(0)){s=s.substring(1,s.length);var z={"meta-left":I,"meta-right":D,space:" ",tab:"\t",newline:"\n"}[s];if(void 0!==z){y.Append(z);continue}if(z=s.match(L)){s= z[3];z[1]?(x=q,s=A({section_name:s})):(x=h,s=w({section_name:s}));y.Append([x,s]);B.push(s);y=s;continue}var C;if(z=s.match(k)){x=(C=z[1])?v(C):null;y.NewOrClause(x);continue}var z=!1,F=s.match(m);if(F){if(C=F[1],z=!0,-1==C.indexOf("?")){x=[function(a){return function(b,c){var g,e,h;if(-1!==a.indexOf(" || ")){g=a.split("||");for(h=0;h<g.length;h++)if(e=g[h].trim(),c.get(e))return!0;return!1}if(-1!==a.indexOf(" && ")){g=a.split(" && ");for(h=0;h<g.length;h++)if(e=g[h].trim(),!c.get(e))return!1;return!0}return c.get(a)}}(C), null];s=K();s.NewOrClause(x);y.Append([g,s]);B.push(s);y=s;continue}}else if("?"==s.charAt(s.length-1)||"?"==s.split(" ")[0].charAt(s.split(" ")[0].length-1))C=s,z=!0;if(z){x=C?v(C):null;s=K();s.NewOrClause(x);y.Append([g,s]);B.push(s);y=s;continue}if("alternates with"==s){y.AlternatesWith();continue}if("end"==s){B.pop();if(0<B.length)y=B[B.length-1];else throw{name:"TemplateSyntaxError",message:"Got too many {end} statements"};continue}}F=s.split(H);if(1==F.length)z=[f("str")];else{z=[];for(s=1;s< F.length;s++)z.push(f(F[s]));s=F[0]}y.Append([e,{name:s,formatters:z}]);x&&y.Append("\n")}}y.Append(c.slice(G));if(1!==B.length)throw{name:"TemplateSyntaxError",message:"Got too few {end} statements."};return y}b.namespace("JSONTemplate");var l="apply ",r={};b.JSONTemplate.DEFAULT_FORMATTERS=b.Squarespace.TEMPLATE_FORMATTERS;b.JSONTemplate.DEFAULT_PREFIX_FORMATTERS=[].concat(b.Squarespace.TEMPLATE_PREFIX_FORMATTERS,[{name:"pluralize",func:function(a,b,c){switch(c.length){case 0:b="";c="s";break;case 1:b= "";c=c[0];break;case 2:b=c[0];c=c[1];break;default:throw{name:"EvaluationError",message:"pluralize got too many args"};}return 1==a?b:c}},{name:"encode-space",func:function(a,b,c){return a.replace(/\s/g," ")}},{name:"truncate",func:function(a,b,c){b=c[0]||100;c=c[1]||"...";a&&a.length>b&&(a=a.substring(0,b),a=a.replace(/\w+$/,""),a+=c);return a}},{name:"date",func:function(a,c,g){var e=0,e=(new Date(a)).getTimezoneOffset();if(!b.Lang.isNumber(a))return"Invalid date.";if("undefined"!==typeof TimezoneJS){var h; try{h=new TimezoneJS.Date(a,c.get("website.timeZone"))}catch(d){return"Invalid Timezone"}e=(isNaN(h.getTimezoneOffset())?0:h.getTimezoneOffset())-e}else c=-parseInt(c.get("website.timeZoneOffset"),10)/6E4,h=(new Date).getTimezoneOffset(),e=c-h;a=new Date(a-6E4*e);g=g.join(" ");return b.DataType.Date.format(a,{format:g})}},{name:"image",func:function(a,c,g){var e;a.mediaFocalPoint&&(e=a.mediaFocalPoint.x+","+a.mediaFocalPoint.y);return'<img class="'+(g[0]?g[0]:"thumb-image")+'" '+(a.title?'alt="'+ b.Squarespace.Escaping.escapeForHtmlTag(a.title)+'" ':"")+' data-image="'+a.assetUrl+'" data-image-dimensions="'+a.originalSize+'" data-image-focal-point="'+e+'"/>'}},{name:"timesince",func:function(a,c,g){if(!b.Lang.isNumber(a))return"Invalid date.";g.join(" ");return'<span class="timesince" data-date="'+a+'">'+b.Squarespace.DateUtils.humanizeDate(a)+"</span>"}},{name:"resizedHeightForWidth",func:function(a,b,c){b=a.split("x");if(2!=b.length)return"Invalid source parameter. Pass in 'originalSize'."; a=parseInt(b[0],10);b=parseInt(b[1],10);c=parseInt(c[0],10)/a;return parseInt(b*c,10)}},{name:"resizedWidthForHeight",func:function(a,b,c){b=a.split("x");if(2!=b.length)return"Invalid source parameter. Pass in 'originalSize'.";a=parseInt(b[0],10);b=parseInt(b[1],10);c=parseInt(c[0],10)/b;return parseInt(a*c,10)}},{name:"squarespaceThumbnailForWidth",func:function(a,c,g){return b.Squarespace.Rendering.getSquarespaceSizeForWidth(parseInt(g[0],10))}},{name:"squarespaceThumbnailForHeight",func:function(a, c,g){c=a.split("x");if(2!=c.length)return"Invalid source parameter. Pass in 'originalSize'.";a=parseInt(c[0],10);c=parseInt(c[1],10);g=parseInt(g[0],10)/c;g=parseInt(a*g,10);return b.Squarespace.Rendering.getSquarespaceSizeForWidth(g)}},{name:"cycle",func:function(a,b,c){return c[(a-1)%c.length]}}]);var n=function(a){return{lookup:function(b){return[a[b]||null,null]}}},p=function(a){return{lookup:function(b){for(var c=0;c<a.length;c++){var g=a[c].name,e=a[c].func;if(b.slice(0,g.length)==g)return c= b.charAt(g.length),b=""===c?[]:b.split(c).slice(1),[e,b]}return[null,null]}}},u=function(a){return{lookup:function(b){for(var c=0;c<a.length;c++){var g=a[c].lookup(b);if(g[0])return g}return[null,null]}}},t=function(a){var b={current_clause:[],Append:function(a){b.current_clause.push(a)},AlternatesWith:function(){throw{name:"TemplateSyntaxError",message:"{.alternates with} can only appear with in {.repeated section ...}"};},NewOrClause:function(a){throw{name:"NotImplemented"};}};return b},w=function(a){var b= t(a);b.statements={"default":b.current_clause};b.section_name=a.section_name;b.Statements=function(a){return b.statements[a||"default"]||[]};b.NewOrClause=function(a){if(a)throw{name:"TemplateSyntaxError",message:"{.or} clause only takes a predicate inside predicate blocks"};b.current_clause=[];b.statements.or=b.current_clause};return b},A=function(a){var b=w(a);b.AlternatesWith=function(){b.current_clause=[];b.statements.alternate=b.current_clause};return b},K=function(a){var b=t(a);b.clauses=[]; b.NewOrClause=function(a){a=a||[function(a){return!0},null];b.current_clause=[];b.clauses.push([a,b.current_clause])};return b},L=/(repeated)?\s*(section)\s+(\S+)?/,k=/^or(?:[\s\-]+(.+))?/,m=/^if(?:[\s\-]+(.+))?/;b.JSONTemplate.Template=Class.create({initialize:function(a,b,c){a=this.removeMultilineComments(a);this._options=b||{};this._program=v(a,this._options)},removeMultilineComments:function(a){for(var b=a.search("{##"),c;0<=b;)c=a.substr(b),a=a.substr(0,b)+c.substr(c.search("##}")+3),b=a.search("{##"); return a},render:function(a,b){var g=c(a,this._options.undefined_str);d(this._program.Statements(),g,b)},expand:function(a){var b=[];this.render(a,function(a){b.push(a)});return b.join("")}});b.JSONTemplate.DEFAULT_PREDICATES=b.Squarespace.TEMPLATE_PREDICATES;b.JSONTemplate.DEFAULT_PARAMETRIC_PREDICATES=b.Squarespace.TEMPLATE_PARAMETRIC_PREDICATES;b.JSONTemplate.evaluateJsonTemplate=function(a,c,g){return"string"!=typeof a?"JSON Template Error: Processing failed because no input was provided. (type: "+ typeof a+", template: "+JSON.stringify(a)+", dictionary: "+JSON.stringify(c)+", partials: "+JSON.stringify(g)+")":(new b.JSONTemplate.Template(a,{partials:g})).expand(c)}},"1.0",{requires:"datatype-date-format json squarespace-common squarespace-date-utils squarespace-rendering squarespace-template-helpers squarespace-util".split(" ")})},688:function(k,m,b){var f=b(74);YUI.add("squarespace-product-utils",function(a){a.Squarespace.ProductUtils={getProductAveragePrice:function(b){b=b.get("structuredContent"); if(b.get("productType")===f.DIGITAL)return b.get("priceCents");b=b.get("variants");return a.Array.reduce(b,0,function(a,b){return a+(b.onSale?b.salePrice:b.price)})/b.length},getProductEffectiveStock:function(b){b=b.get("structuredContent");if(b.get("productType")===f.DIGITAL)return Number.MAX_VALUE;b=b.get("variants");var d=0;a.Array.some(b,function(a){if(a.unlimited)return d=Number.MAX_VALUE,!0;d+=a.qtyInStock});return d},initializeVariantDropdowns:function(){a.all(".product-variants[data-variants]").each(function(b){var d= JSON.parse(b.getAttribute("data-variants")),e=b.all("select"),h=b.siblings(".product-price").item(0),g;h&&(g=h.getHTML());a.Squarespace.ProductUtils._checkVariantStockAndPrice(b,d,e,h,g);e.detach("change");e.each(function(q){q.after("change",function(q){a.Squarespace.ProductUtils._checkVariantStockAndPrice(b,d,e,h,g)},this)},this)},this)},_checkVariantStockAndPrice:function(b,d,e,h,g){b.removeAttribute("data-unselected-options");b.removeAttribute("data-selected-variant");b.removeAttribute("data-variant-in-stock"); var q=b.one(".variant-out-of-stock");q&&q.remove();var f=[],q=null,l=!1,r={};e.each(function(a){var b=a.get("value"),c=a.getAttribute("data-variant-option-name");0===a.get("selectedIndex")?f.push(c):r[c]=b},this);if(0===f.length){for(e=0;e<d.length;e++){g=d[e];var n=!0,p;for(p in r)if(r[p]!=g.attributes[p]){n=!1;break}if(n){q=g;if(g.unlimited||0<g.qtyInStock)l=!0;break}}!q&&h?h.set("text","Unavailable"):h&&(h.empty(),q.onSale?(h.setHTML(a.Squarespace.Commerce.moneyString(q.salePrice)),h.append(a.Node.create('<span> </span><span class="original-price">'+ a.Squarespace.Commerce.moneyString(q.price)+"</span>"))):h.setHTML(a.Squarespace.Commerce.moneyString(q.price)));q&&!l&&b.append(a.Node.create('<div class="variant-out-of-stock">Out of stock.</div>'))}else h&&h.getHTML()!==g&&h.empty().setHTML(g);b.setAttribute("data-unselected-options",JSON.stringify(f));q&&b.setAttribute("data-selected-variant",JSON.stringify(q));l&&b.setAttribute("data-variant-in-stock",l)}}},"1.0",{requires:["base","node","squarespace-commerce-utils"]})},796:function(k,m){YUI.add("squarespace-async-form", function(b){b.namespace("Squarespace.Widgets");var f=b.Squarespace.Widgets.AsyncForm=b.Base.create("AsyncForm",b.Squarespace.Widgets.SSWidget,[],{initializer:function(){this._typeGetterMap={date:this._getMultiFieldVal,name:this._getMultiFieldVal,time:this._getMultiFieldVal,address:this._getMultiFieldVal,checkbox:this._getOptionFieldVal,likert:this._getLikertFieldVal,radio:this._getRadioFieldVal,select:this._getSelectVal,phone:this._getPhoneFieldVal};this._typeSetterMap={date:this._setMultiFieldVal, name:this._setMultiFieldVal,time:this._setMultiFieldVal,address:this._setMultiFieldVal,checkbox:this._setOptionFieldVal,likert:this._setLikertFieldVal,radio:this._setRadioFieldVal,select:this._setSelectVal,phone:this._setPhoneFieldVal};this._defaultGetter=this._getSingleFieldVal;this._defaultSetter=this._setSingleFieldVal},renderUI:function(){f.superclass.renderUI.call(this);var a=this.get("form"),c=a.fields;b.Lang.isString(c[0])&&(c=b.Array.map(c,b.JSON.parse));var c={showTitle:this.get("showTitle"), preventSubmit:this.get("preventDefaultSubmit")||this.get("preventAllSubmits"),hideSubmitButton:this.get("hideSubmitButton"),formId:a.id,formName:this.get("formName"),formFields:c,formSubmitButtonText:this.get("formSubmitButtonText"),formSubmissionMessage:a.parsedSubmissionMessage,formSubmissionHTML:a.submissionHTML},a=this.get("contentBox"),d=this.get("formTemplate").html,c=b.JSONTemplate.evaluateJsonTemplate(d,c);a.append(c);this._formEl=a.one("form");this._setFormData()},bindUI:function(){this._formEl.on("submit", function(a){if(this.get("preventDefaultSubmit")&&!this.get("preventAllSubmits")){this._clearErrors();var c=this._validateForm(),d=c.errors;0<d.length?this._renderErrors(d):this.fetchValidatedFormSubmission(this.get("form").id,b.bind(function(){this.fire("submission",{data:c.data})},this),b.bind(function(a){var c=[];b.Object.each(a.errors,function(a,b){c.push({fieldId:b,message:a})});this._renderErrors(c)},this))}a.halt()},this);this.after("formDataChange",this._setFormData,this)},setStateSaving:function(){var a= this.get("contentBox");a.addClass("saving");a.one('input[type="submit"]').set("value","Saving...")},setStateEditing:function(){var a=this.get("contentBox"),b=this.get("formSubmitButtonText");a.one('input[type="submit"]').set("value",b);a.removeClass("saving")},getLocalValidationErrors:function(){return this._validateForm().errors},fetchValidatedFormSubmission:function(a,c,d){b.Data.post({url:"/api/rest/forms/validate/"+a,headers:{"Content-Type":"application/json"},data:JSON.stringify(this.getFormData()), success:c,failure:d})},getFormData:function(){return this._validateForm().data},_renderErrors:function(a){b.Array.each(a,function(a){this.get("contentBox").one("#"+a.fieldId).one(".title").insert('<div class="field-error">'+a.message+"</div>","before")},this)},_clearErrors:function(){this.get("contentBox").all(".field-error").remove(!0)},_validateForm:function(){var a={},b=[];this._formEl.all(".form-item").each(function(d){var e=d.getAttribute("id");if(d=this._getFieldData(d)){var h=d.error;h&&b.push({fieldId:e, message:h});a[e]=d.data}},this);return{data:a,errors:b}},_getFieldData:function(a){var c=a.get("className").split(" "),d=null,e,h=!1;b.Array.each(c,function(a){b.Object.hasKey(this._typeGetterMap,a)?(d=a,e=this._typeGetterMap[d]):"section"===a&&(h=!0)},this);if(!h)return null===d&&(e=this._defaultGetter),e.call(this,a)},_getSingleFieldVal:function(a){var c=a.one(".field-element");if(c){var d=c.get("value"),e,d=!b.Lang.isValue(d)||""===d;a.hasClass("required")&&d&&(e="Required");return{data:c.get("value"), error:e}}return null},_getMultiFieldVal:function(a){var c=[],d,e=!1;a.all(".field-element").each(function(a){var g=a.get("value");b.Lang.isValue(g)&&""!==g&&(e=!0);c.push(a.get("value"))});a.hasClass("required")&&!e&&(d="Required");return{data:c,error:d}},_getOptionFieldVal:function(a){var b=[],d;a.all("input").each(function(a){a.get("checked")&&b.push(a.get("value"))},this);a.hasClass("required")&&0===b.length&&(d="Required");return{data:b,error:d}},_getLikertFieldVal:function(a){var c={};a.all(".item").each(function(a){var e; a.all("input").each(function(a){a.get("checked")&&(e=a.get("value"))});b.Lang.isValue(e)&&(c[a.getAttribute("data-question")]=e)});return{data:c,error:void 0}},_getRadioFieldVal:function(a){var c,d;a.all("input").each(function(a){a.get("checked")&&(c=a.get("value"))},this);a.hasClass("required")&&!b.Lang.isValue(c)&&(d="Required");return{data:c,error:d}},_getSelectVal:function(a){var c=a.one("select").get("value"),d,e=!b.Lang.isValue(c)||""===c;a.hasClass("required")&&e&&(d="Required");return{data:c, error:d}},_getPhoneFieldVal:function(a){a=this._getMultiFieldVal(a);var b=a.data;b&&3===b.length&&b.unshift("");return a},_setFormData:function(){var a=this.get("formData");null!==a&&this._formEl.all(".form-item").each(function(c){var d=a[c.getAttribute("id")];if(d){var e=d.value,d=b.Lang.isValue(e)?e:d.values||[];this._setFieldData(c,d)}},this)},_setFieldData:function(a,c){var d=a.get("className").split(" "),e=null,h,g;b.Array.each(d,function(d){b.Object.hasKey(this._typeSetterMap,d)?(e=d,h=this._typeSetterMap[e]): "section"===d&&(g=!0);if(!g)return null===e&&(h=this._defaultSetter),h.call(this,a,c)},this)},_setSingleFieldVal:function(a,b){var d=a.one(".field-element");if(d)return d.set("value",b)},_setMultiFieldVal:function(a,b){a.all(".field-element").each(function(a){a.set("value",b[a.getData("title")])})},_setOptionFieldVal:function(a,b){a.all("input").each(function(a){-1!==b.indexOf(a.get("value"))&&a.setAttribute("checked","checked")},this)},_setLikertFieldVal:function(a,c){a.all(".item").each(function(a){var e= a.getAttribute("data-question"),e=c[e];b.Lang.isValue(e)&&""!==e&&(e=parseInt(e,10)+2,a.all("input").item(e).setAttribute("checked","checked"))})},_setRadioFieldVal:function(a,b){a.all("input").each(function(a){a.get("value")===b&&a.setAttribute("checked","checked")},this)},_setSelectVal:function(a,b){a.one("select").set("value",b)},_setPhoneFieldVal:function(a,b){3===a.all(".field").size()&&4===b.length&&b.shift();this._setMultiFieldVal(a,b)}},{CSS_PREFIX:"sqs-async-form",ATTRS:{form:{value:{fields:[]}, validator:b.Lang.isValue},formTemplate:{value:null},hideSubmitButton:{value:!1},formSubmitButtonText:{value:"Add to Cart"},formName:{value:"My Form Name"},formData:{value:null},showTitle:{value:!0},preventDefaultSubmit:{value:!0},preventAllSubmits:{value:!1}}})},"1.0",{requires:["base","node","json","squarespace-ss-widget","squarespace-json-template"]})},815:function(k,m){YUI.add("overlay",function(b,f){b.Overlay=b.Base.create("overlay",b.Widget,[b.WidgetStdMod,b.WidgetPosition,b.WidgetStack,b.WidgetPositionAlign, b.WidgetPositionConstrain])},"3.17.2",{requires:"widget widget-stdmod widget-position widget-position-align widget-stack widget-position-constrain".split(" "),skinnable:!0})},817:function(k,m){YUI.add("text-data-wordbreak",function(b,f){b.namespace("Text.Data").WordBreak={aletter:"[A-Za-z\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f3\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u10a0-\u10c5\u10d0-\u10fa\u10fc\u1100-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bc0-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u24b6-\u24e9\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2d00-\u2d25\u2d30-\u2d65\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005\u303b\u303c\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790\ua791\ua7a0-\ua7a9\ua7fa-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]", midnumlet:"['\\.\u2018\u2019\u2024\ufe52\uff07\uff0e]",midletter:"[:\u00b7\u00b7\u05f4\u2027\ufe13\ufe55\uff1a]",midnum:"[,;;\u0589\u060c\u060d\u066c\u07f8\u2044\ufe10\ufe14\ufe50\ufe54\uff0c\uff1b]",numeric:"[0-9\u0660-\u0669\u066b\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9]", cr:"\\r",lf:"\\n",newline:"[\x0B\f\u0085\u2028\u2029]",extend:"[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f\u109a-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b6-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u192b\u1930-\u193b\u19b0-\u19c0\u19c8\u19c9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f\u1b00-\u1b04\u1b34-\u1b44\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1baa\u1be6-\u1bf3\u1c24-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe3-\uabea\uabec\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]", format:"[\u00ad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200e\u200f\u202a-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb]",katakana:"[\u3031-\u3035\u309b\u309c\u30a0-\u30fa\u30fc-\u30ff\u31f0-\u31ff\u32d0-\u32fe\u3300-\u3357\uff66-\uff9d]",extendnumlet:"[_\u203f\u2040\u2054\ufe33\ufe34\ufe4d-\ufe4f\uff3f]",punctuation:"[!-#%-*,-\\/:;?@\\[-\\]_{}\u00a1\u00ab\u00b7\u00bb\u00bf;\u00b7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]"}}, "3.17.2",{requires:["yui-base"]})},818:function(k,m){YUI.add("text-wordbreak",function(b,f){var a=b.Text,c=a.Data.WordBreak,d=[RegExp(c.aletter),RegExp(c.midnumlet),RegExp(c.midletter),RegExp(c.midnum),RegExp(c.numeric),RegExp(c.cr),RegExp(c.lf),RegExp(c.newline),RegExp(c.extend),RegExp(c.format),RegExp(c.katakana),RegExp(c.extendnumlet)],e=RegExp("^"+c.punctuation+"$"),h=/\s/,g={getWords:function(a,b){var c=0,d=g._classify(a),f=d.length,p=[],u=[],t,w,A;b||(b={});b.ignoreCase&&(a=a.toLowerCase()); w=b.includePunctuation;for(A=b.includeWhitespace;c<f;++c)t=a.charAt(c),p.push(t),g._isWordBoundary(d,c)&&((p=p.join(""))&&((A||!h.test(p))&&(w||!e.test(p)))&&u.push(p),p=[]);return u},getUniqueWords:function(a,c){return b.Array.unique(g.getWords(a,c))},isWordBoundary:function(a,b){return g._isWordBoundary(g._classify(a),b)},_classify:function(a){for(var b,c=[],g=0,e,h,f=a.length,t=d.length,w;g<f;++g){b=a.charAt(g);w=12;for(e=0;e<t;++e)if((h=d[e])&&h.test(b)){w=e;break}c.push(w)}return c},_isWordBoundary:function(a, b){var c,g=a[b],e=a[b+1],h;if(0>b||b>a.length-1&&0!==b||0===g&&0===e)return!1;h=a[b+2];if(0===g&&(2===e||1===e)&&0===h)return!1;c=a[b-1];return(2===g||1===g)&&0===e&&0===c||(4===g||0===g)&&(4===e||0===e)||(3===g||1===g)&&4===e&&4===c||4===g&&(3===e||1===e)&&4===h||(8===g||9===g||8===c||9===c||8===e||9===e)||5===g&&6===e?!1:7===g||5===g||6===g||7===e||5===e||6===e?!0:10===g&&10===e||11===e&&(0===g||4===g||10===g||11===g)||11===g&&(0===e||4===e||10===e)?!1:!0}};a.WordBreak=g},"3.17.2",{requires:["array-extras", "text-data-wordbreak"]})},823:function(k,m){YUI.add("widget-position-constrain",function(b,f){function a(a){}var c=b.Node,d;a.ATTRS={constrain:{value:null,setter:"_setConstrain"},preventOverlap:{value:!1}};d=a._PREVENT_OVERLAP={x:{tltr:1,blbr:1,brbl:1,trtl:1},y:{trbr:1,tlbl:1,bltl:1,brtr:1}};a.prototype={initializer:function(){this._posNode||b.error("WidgetPosition needs to be added to the Widget, before WidgetPositionConstrain is added");b.after(this._bindUIPosConstrained,this,"bindUI")},getConstrainedXY:function(a, b){b=b||this.get("constrain");var c=this._getRegion(!0===b?null:b),d=this._posNode.get("region");return[this._constrain(a[0],"x",d,c),this._constrain(a[1],"y",d,c)]},constrain:function(a,b){var c,d;if(d=b||this.get("constrain"))c=a||this.get("xy"),d=this.getConstrainedXY(c,d),(d[0]!==c[0]||d[1]!==c[1])&&this.set("xy",d,{constrained:!0})},_setConstrain:function(a){return!0===a?a:c.one(a)},_constrain:function(a,b,c,d){if(d){this.get("preventOverlap")&&(a=this._preventOverlap(a,b,c,d));var f="x"==b; b=f?d.width:d.height;c=f?c.width:c.height;var l=f?d.left:d.top;d=f?d.right-c:d.bottom-c;if(a<l||a>d)c<b?a<l?a=l:a>d&&(a=d):a=l}return a},_preventOverlap:function(a,b,c,q){var f=this.get("align"),l="x"===b,r,n,p,u,t;if(f&&f.points&&d[b][f.points.join("")]){if(b=this._getRegion(f.node))r=l?c.width:c.height,n=l?b.left:b.top,p=l?b.right:b.bottom,u=l?b.left-q.left:b.top-q.top,t=l?q.right-b.right:q.bottom-b.bottom;a>n?t<r&&u>r&&(a=n-r):u<r&&t>r&&(a=p)}return a},_bindUIPosConstrained:function(){this.after("constrainChange", this._afterConstrainChange);this._enableConstraints(this.get("constrain"))},_afterConstrainChange:function(a){this._enableConstraints(a.newVal)},_enableConstraints:function(a){a?(this.constrain(),this._cxyHandle=this._cxyHandle||this.on("constrain|xyChange",this._constrainOnXYChange)):this._cxyHandle&&(this._cxyHandle.detach(),this._cxyHandle=null)},_constrainOnXYChange:function(a){a.constrained||(a.newVal=this.getConstrainedXY(a.newVal))},_getRegion:function(a){var b;a?(a=c.one(a))&&(b=a.get("region")): b=this._posNode.get("viewportRegion");return b}};b.WidgetPositionConstrain=a},"3.17.2",{requires:["widget-position"]})},824:function(k,m){YUI.add("widget-stack",function(b,f){function a(a){}var c=b.Lang,d=b.UA,e=b.Node,h=b.Widget;a.ATTRS={shim:{value:6==d.ie},zIndex:{value:0,setter:"_setZIndex"}};a.HTML_PARSER={zIndex:function(a){return this._parseZIndex(a)}};a.SHIM_CLASS_NAME=h.getClassName("shim");a.STACKED_CLASS_NAME=h.getClassName("stacked");a.SHIM_TEMPLATE='<iframe class="'+a.SHIM_CLASS_NAME+ '" frameborder="0" title="Widget Stacking Shim" src="javascript:false" tabindex="-1" role="presentation"></iframe>';a.prototype={initializer:function(){this._stackNode=this.get("boundingBox");this._stackHandles={};b.after(this._renderUIStack,this,"renderUI");b.after(this._syncUIStack,this,"syncUI");b.after(this._bindUIStack,this,"bindUI")},_syncUIStack:function(){this._uiSetShim(this.get("shim"));this._uiSetZIndex(this.get("zIndex"))},_bindUIStack:function(){this.after("shimChange",this._afterShimChange); this.after("zIndexChange",this._afterZIndexChange)},_renderUIStack:function(){this._stackNode.addClass(a.STACKED_CLASS_NAME)},_parseZIndex:function(a){a=!a.inDoc()||"static"===a.getStyle("position")?"auto":a.getComputedStyle("zIndex");return"auto"===a?null:a},_setZIndex:function(a){c.isString(a)&&(a=parseInt(a,10));c.isNumber(a)||(a=0);return a},_afterShimChange:function(a){this._uiSetShim(a.newVal)},_afterZIndexChange:function(a){this._uiSetZIndex(a.newVal)},_uiSetZIndex:function(a){this._stackNode.setStyle("zIndex", a)},_uiSetShim:function(a){a?(this.get("visible")?this._renderShim():this._renderShimDeferred(),6==d.ie&&this._addShimResizeHandlers()):this._destroyShim()},_renderShimDeferred:function(){this._stackHandles.shimdeferred=this._stackHandles.shimdeferred||[];this._stackHandles.shimdeferred.push(this.on("visibleChange",function(a){a.newVal&&this._renderShim()}))},_addShimResizeHandlers:function(){this._stackHandles.shimresize=this._stackHandles.shimresize||[];var a=this.sizeShim,b=this._stackHandles.shimresize; b.push(this.after("visibleChange",a));b.push(this.after("widthChange",a));b.push(this.after("heightChange",a));b.push(this.after("contentUpdate",a))},_detachStackHandles:function(a){a=this._stackHandles[a];var b;if(a&&0<a.length)for(;b=a.pop();)b.detach()},_renderShim:function(){var a=this._shimNode,b=this._stackNode;a||(a=this._shimNode=this._getShimTemplate(),b.insertBefore(a,b.get("firstChild")),this._detachStackHandles("shimdeferred"),this.sizeShim())},_destroyShim:function(){this._shimNode&& (this._shimNode.get("parentNode").removeChild(this._shimNode),this._shimNode=null,this._detachStackHandles("shimdeferred"),this._detachStackHandles("shimresize"))},sizeShim:function(){var a=this._shimNode,b=this._stackNode;a&&(6===d.ie&&this.get("visible"))&&(a.setStyle("width",b.get("offsetWidth")+"px"),a.setStyle("height",b.get("offsetHeight")+"px"))},_getShimTemplate:function(){return e.create(a.SHIM_TEMPLATE,this._stackNode.get("ownerDocument"))}};b.WidgetStack=a},"3.17.2",{requires:["base-build", "widget"],skinnable:!0})},825:function(k,m){YUI.add("widget-stdmod",function(b,f){function a(a){}var c=b.Lang,d=b.Node,e=b.UA,h=b.Widget,g=b.Widget.UI_SRC;a.HEADER="header";a.BODY="body";a.FOOTER="footer";a.AFTER="after";a.BEFORE="before";a.REPLACE="replace";var q=a.HEADER,v=a.BODY,l=a.FOOTER,r=q+"Content",n=l+"Content",p=v+"Content";a.ATTRS={headerContent:{value:null},footerContent:{value:null},bodyContent:{value:null},fillHeight:{value:a.BODY,validator:function(a){return this._validateFillHeight(a)}}}; a.HTML_PARSER={headerContent:function(a){return this._parseStdModHTML(q)},bodyContent:function(a){return this._parseStdModHTML(v)},footerContent:function(a){return this._parseStdModHTML(l)}};a.SECTION_CLASS_NAMES={header:h.getClassName("hd"),body:h.getClassName("bd"),footer:h.getClassName("ft")};a.TEMPLATES={header:'<div class="'+a.SECTION_CLASS_NAMES[q]+'"></div>',body:'<div class="'+a.SECTION_CLASS_NAMES[v]+'"></div>',footer:'<div class="'+a.SECTION_CLASS_NAMES[l]+'"></div>'};a.prototype={initializer:function(){this._stdModNode= this.get("contentBox");b.before(this._renderUIStdMod,this,"renderUI");b.before(this._bindUIStdMod,this,"bindUI");b.before(this._syncUIStdMod,this,"syncUI")},_syncUIStdMod:function(){var a=this._stdModParsed;(!a||!a[r])&&this._uiSetStdMod(q,this.get(r));(!a||!a[p])&&this._uiSetStdMod(v,this.get(p));(!a||!a[n])&&this._uiSetStdMod(l,this.get(n));this._uiSetFillHeight(this.get("fillHeight"))},_renderUIStdMod:function(){this._stdModNode.addClass(h.getClassName("stdmod"));this._renderStdModSections();this.after("headerContentChange", this._afterHeaderChange);this.after("bodyContentChange",this._afterBodyChange);this.after("footerContentChange",this._afterFooterChange)},_renderStdModSections:function(){c.isValue(this.get(r))&&this._renderStdMod(q);c.isValue(this.get(p))&&this._renderStdMod(v);c.isValue(this.get(n))&&this._renderStdMod(l)},_bindUIStdMod:function(){this.after("fillHeightChange",this._afterFillHeightChange);this.after("heightChange",this._fillHeight);this.after("contentUpdate",this._fillHeight)},_afterHeaderChange:function(a){a.src!== g&&this._uiSetStdMod(q,a.newVal,a.stdModPosition)},_afterBodyChange:function(a){a.src!==g&&this._uiSetStdMod(v,a.newVal,a.stdModPosition)},_afterFooterChange:function(a){a.src!==g&&this._uiSetStdMod(l,a.newVal,a.stdModPosition)},_afterFillHeightChange:function(a){this._uiSetFillHeight(a.newVal)},_validateFillHeight:function(b){return!b||b==a.BODY||b==a.HEADER||b==a.FOOTER},_uiSetFillHeight:function(a){a=this.getStdModNode(a);var b=this._currFillNode;b&&a!==b&&b.setStyle("height","");a&&(this._currFillNode= a);this._fillHeight()},_fillHeight:function(){if(this.get("fillHeight")){var a=this.get("height");""!=a&&"auto"!=a&&this.fillHeight(this.getStdModNode(this.get("fillHeight")))}},_uiSetStdMod:function(a,b,e){if(c.isValue(b)){var h=this.getStdModNode(a,!0);this._addStdModContent(h,b,e);this.set(a+"Content",this._getStdModContent(a),{src:g})}else this._eraseStdMod(a);this.fire("contentUpdate")},_renderStdMod:function(a){var b=this.get("contentBox"),c=this._findStdModSection(a);c||(c=this._getStdModTemplate(a)); this._insertStdModSection(b,a,c);this[a+"Node"]=c;return this[a+"Node"]},_eraseStdMod:function(a){var b=this.getStdModNode(a);b&&(b.remove(!0),delete this[a+"Node"])},_insertStdModSection:function(a,b,c){var g=a.get("firstChild");b===l||!g?a.appendChild(c):b===q?a.insertBefore(c,g):(b=this[l+"Node"])?a.insertBefore(c,b):a.appendChild(c)},_getStdModTemplate:function(b){return d.create(a.TEMPLATES[b],this._stdModNode.get("ownerDocument"))},_addStdModContent:function(b,c,g){switch(g){case a.BEFORE:g= 0;break;case a.AFTER:g=void 0;break;default:g=a.REPLACE}b.insert(c,g)},_getPreciseHeight:function(a){var b=a?a.get("offsetHeight"):0;a&&a.hasMethod("getBoundingClientRect")&&(a=a.invoke("getBoundingClientRect"))&&(b=a.bottom-a.top);return b},_findStdModSection:function(b){return this.get("contentBox").one("> ."+a.SECTION_CLASS_NAMES[b])},_parseStdModHTML:function(a){var c=this._findStdModSection(a);return c?(this._stdModParsed||(this._stdModParsed={},b.before(this._applyStdModParsedConfig,this,"_applyParsedConfig")), this._stdModParsed[a+"Content"]=1,c.get("innerHTML")):null},_applyStdModParsedConfig:function(a,b,c){if(a=this._stdModParsed)a[r]=!(r in b)&&r in a,a[p]=!(p in b)&&p in a,a[n]=!(n in b)&&n in a},_getStdModContent:function(a){return this[a+"Node"]?this[a+"Node"].get("childNodes"):null},setStdModContent:function(a,b,c){this.set(a+"Content",b,{stdModPosition:c})},getStdModNode:function(a,b){var c=this[a+"Node"]||null;!c&&b&&(c=this._renderStdMod(a));return c},fillHeight:function(a){if(a){var b=this.get("contentBox"), g=[this.headerNode,this.bodyNode,this.footerNode],h,d=0;h=0;for(var f=!1,q=0,v=g.length;q<v;q++)(h=g[q])&&(h!==a?d+=this._getPreciseHeight(h):f=!0);f&&((e.ie||e.opera)&&a.set("offsetHeight",0),b=b.get("offsetHeight")-parseInt(b.getComputedStyle("paddingTop"),10)-parseInt(b.getComputedStyle("paddingBottom"),10)-parseInt(b.getComputedStyle("borderBottomWidth"),10)-parseInt(b.getComputedStyle("borderTopWidth"),10),c.isNumber(b)&&(h=b-d,0<=h&&a.set("offsetHeight",h)))}}};b.WidgetStdMod=a},"3.17.2",{requires:["base-build", "widget"]})},1044:function(k,m){YUI.add("squarespace-plugin-numeric-formatter",function(b){b.namespace("Squarespace.Plugin");var f=function(){var a=[];[9,13,8,46,37,39,48,49,50,51,52,53,54,55,56,57,96,97,98,99,100,101,102,103,104,105].forEach(function(b){a[b]=!0});return a}();b.Squarespace.Plugin.NumericFormatter=b.Base.create("numericFormatter",b.Plugin.Base,[],{initializer:function(){b.Lang.isNumber(Number(this.get("host").get("value")))?this.set("data",Number(this.get("host").get("value"))):this.set("data", 0);this.set("displayString",this._format(this.get("data")));this._bindUI();this._syncUI()},_format:function(a){return this.get("displayFormatter")(a)},_syncUI:function(){var a=this.get("data"),c=this.get("displayString");this.get("hasFocus")?this.get("host").set("value",0<a?c:""):(c="",b.Lang.isNull(this.get("prefixUnit"))||(c+=this.get("prefixUnit")),c+=this._format(a),b.Lang.isNull(this.get("postfixUnit"))||(c+=" "+this.get("postfixUnit")),this.get("host").set("value",c))},_bindUI:function(){var a= this.get("host");this.on("displayStringChange",this._syncUI,this);a.on("valuechange",this._onValueChange,this);a.on("keydown",this._onKeyDown,this);a.on("focus",this._onFocus,this);a.on("blur",this._onBlur,this)},_onFocus:function(){this.set("hasFocus",!0);this._syncUI();setTimeout(b.bind(function(){this.get("host").select()},this),0)},_onBlur:function(){this.set("hasFocus",!1);this.set("displayString",this._format(this.get("data")))},_onKeyDown:function(a){if(a.shiftKey||!f[a.keyCode])if(!((110=== a.keyCode||190===a.keyCode)&&-1===this.get("host").get("value").indexOf("."))&&!isFinite(Number(String.fromCharCode(a.keyCode))))a.stopPropagation(),a.preventDefault()},_onValueChange:function(){var a=this.get("host").get("value"),a=this._transformToData(a);this.set("data",a)},_displayFormatter:function(a){return a},_transformToData:function(a){var c;b.Lang.isUndefined(this.get("prefixUnit"))||(c=String(a).replace(RegExp(this.get("prefixUnit"))));b.Lang.isUndefined(this.get("postfixUnit"))||(c=String(a).replace(RegExp(this.get("postfixUnit")))); return Number(c)}},{NS:"numericFormatterPlugin",ATTRS:{hasFocus:{value:!1},data:{value:null},displayString:{value:null},prefixUnit:{value:null},postfixUnit:{value:null},displayFormatter:{value:function(a){return a}}}})},"1.0",{requires:["plugin","squarespace-util"]})},1055:function(k,m){YUI.add("squarespace-widgets-data-widget",function(b){b.namespace("Squarespace.Widgets");var f=b.Squarespace.Widgets.DataWidget=b.Base.create("dataWidget",b.Squarespace.Widgets.SSWidget,[],{initializer:function(a){a.dataState|| (this.getProperty("ASYNC_DATA")?this.set("dataState",this.getProperty("DATA_STATES").INITIALIZED):this.set("dataState",this.getProperty("DATA_STATES").LOADED))},renderUI:function(){f.superclass.renderUI.call(this);this._updateDataStateClassName()},bindUI:function(){f.superclass.bindUI.call(this);var a=this.get("id");this.after(a+"|dataChange",function(a){a.noSyncUI||this.syncUI()},this);this.after(a+"|dataStateChange",this._updateDataStateClassName,this)},_updateDataStateClassName:function(){var a= this.get("boundingBox"),c=this.get("dataState");b.Object.each(this.getProperty("DATA_STATES"),function(b){a.removeClass("data-state-"+b)});a.addClass("data-state-"+c)},setLoadingState:function(){return this.set("dataState",this.getProperty("DATA_STATES").LOADING)},setLoadedState:function(){return this.set("dataState",this.getProperty("DATA_STATES").LOADED)},setLoadFailedState:function(){return this.set("dataState",this.getProperty("DATA_STATES").LOAD_FAILED)},loadedSuccessfully:function(){return this.get("dataState")=== this.getProperty("DATA_STATES").LOADED},isLoading:function(){return this.get("dataState")===this.getProperty("DATA_STATES").LOADING},loadFailed:function(){return this.get("dataState")===this.getProperty("DATA_STATES").LOAD_FAILED}},{CSS_PREFIX:"sqs-data-widget",ASYNC_DATA:!1,DATA_STATES:{INITIALIZED:"initialized",LOADING:"loading",LOADED:"loaded",LOAD_FAILED:"load-failed"},ATTRS:{data:{value:null,validator:function(a){return b.Lang.isUndefined(a)?(console.warn(this.name+": Will not set data to undefined."), !1):!0}},dataState:{valueFn:function(){return this.getProperty("DATA_STATES").INITIALIZED}},preventRenderTemplate:{value:!1,validator:b.Squarespace.AttrValidators.isBoolean}}})},"1.0",{requires:["base","node","widget","squarespace-ss-widget","squarespace-attr-validators"]})},1057:function(k,m){YUI.add("autocomplete-sources",function(b,f){var a=b.AutoCompleteBase,c=b.Lang,d="_sourceSuccess",e="maxResults";b.mix(a.prototype,{_YQL_SOURCE_REGEX:/^(?:select|set|use)\s+/i,_beforeCreateObjectSource:function(a){return a instanceof b.Node&&"select"===a.get("nodeName").toLowerCase()?this._createSelectSource(a):b.JSONPRequest&&a instanceof b.JSONPRequest?this._createJSONPSource(a):this._createObjectSource(a)},_createIOSource:function(a){function c(g){var e=g.request;if(f._cache&&e in f._cache)f[d](f._cache[e],g);else l&&l.isInProgress()&&l.abort(),l=b.io(f._getXHRUrl(a,g),{on:{success:function(a,c){var h;try{h=b.JSON.parse(c.responseText)}catch(q){b.error("JSON parse error",q)}h&&(f._cache&&(f._cache[e]=h),f[d](h,g))}}})}var e= {type:"io"},f=this,l,r,n;e.sendRequest=function(a){r=a;n||(n=!0,b.use("io-base","json-parse",function(){e.sendRequest=c;c(r)}))};return e},_createJSONPSource:function(a){function c(b){var g=b.request,e=b.query;if(f._cache&&g in f._cache)f[d](f._cache[g],b);else a._config.on.success=function(a){f._cache&&(f._cache[g]=a);f[d](a,b)},a.send(e)}var e={type:"jsonp"},f=this,l,r;e.sendRequest=function(d){l=d;r||(r=!0,b.use("jsonp",function(){a instanceof b.JSONPRequest||(a=new b.JSONPRequest(a,{format:b.bind(f._jsonpFormatter, f)}));e.sendRequest=c;c(l)}))};return e},_createSelectSource:function(a){var b=this;return{type:"select",sendRequest:function(c){var e=[];a.get("options").each(function(a){e.push({html:a.get("innerHTML"),index:a.get("index"),node:a,selected:a.get("selected"),text:a.get("text"),value:a.get("value")})});b[d](e,c)}}},_createStringSource:function(a){return this._YQL_SOURCE_REGEX.test(a)?this._createYQLSource(a):-1!==a.indexOf("{callback}")?this._createJSONPSource(a):this._createIOSource(a)},_createYQLSource:function(a){function g(g){var v= g.query,l=f.get("yqlEnv"),w=f.get(e),A;A=c.sub(a,{maxResults:0<w?w:1E3,request:g.request,query:v});if(f._cache&&A in f._cache)f[d](f._cache[A],g);else v=function(a){f._cache&&(f._cache[A]=a);f[d](a,g)},w={proto:f.get("yqlProtocol")},n?(n._callback=v,n._opts=w,n._params.q=A,l&&(n._params.env=l)):n=new b.YQLRequest(A,{on:{success:v},allowCache:!1},l?{env:l}:null,w),n.send()}var f=this,v={type:"yql"},l,r,n;f.get("resultListLocator")||f.set("resultListLocator",f._defaultYQLLocator);v.sendRequest=function(a){l= a;r||(r=!0,b.use("yql",function(){v.sendRequest=g;g(l)}))};return v},_defaultYQLLocator:function(a){(a=a&&a.query&&a.query.results)&&c.isObject(a)?(a=b.Object.values(a)||[],a=1===a.length?a[0]:a,c.isArray(a)||(a=[a])):a=[];return a},_getXHRUrl:function(a,b){var d=this.get(e);b.query!==b.request&&(a+=b.request);return c.sub(a,{maxResults:0<d?d:1E3,query:encodeURIComponent(b.query)})},_jsonpFormatter:function(a,b,d){var f=this.get(e),l=this.get("requestTemplate");l&&(a+=l(d));return c.sub(a,{callback:b, maxResults:0<f?f:1E3,query:encodeURIComponent(d)})}});b.mix(a.ATTRS,{yqlEnv:{value:null},yqlProtocol:{value:"http"}});b.mix(a.SOURCE_TYPES,{io:"_createIOSource",jsonp:"_createJSONPSource",object:"_beforeCreateObjectSource",select:"_createSelectSource",string:"_createStringSource",yql:"_createYQLSource"},!0)},"3.17.2",{optional:["io-base","json-parse","jsonp","yql"],requires:["autocomplete-base"]})},1071:function(k,m){YUI.add("highlight-base",function(b,f){var a=b.Array,c=b.Escape,d=b.Text.WordBreak, e=b.Lang.isArray,h={},g={_REGEX:"(&[^;\\s]*)?(%needles)",_REPLACER:function(a,b,c){return b&&!/\s/.test(c)?a:g._TEMPLATE.replace(/\{s\}/g,c)},_START_REGEX:"^(&[^;\\s]*)?(%needles)",_TEMPLATE:'<b class="'+b.ClassNameManager.getClassName("highlight")+'">{s}</b>',all:function(a,b,d){var f=[],n,p,k,t,w,A;d||(d=h);n=!1!==d.escapeHTML;w=d.startsWith?g._START_REGEX:g._REGEX;A=d.replacer||g._REPLACER;b=e(b)?b:[b];p=0;for(k=b.length;p<k;++p)(t=b[p])&&f.push(c.regex(n?c.html(t):t));n&&(a=c.html(a));return!f.length? a:a.replace(RegExp(w.replace("%needles",f.join("|")),d.caseSensitive?"g":"gi"),A)},allCase:function(a,c,e){return g.all(a,c,b.merge(e||h,{caseSensitive:!0}))},start:function(a,c,e){return g.all(a,c,b.merge(e||h,{startsWith:!0}))},startCase:function(a,b){return g.start(a,b,{caseSensitive:!0})},words:function(b,f,l){var r,n,p=g._TEMPLATE;l||(l=h);r=!!l.caseSensitive;f=a.hash(e(f)?f:d.getUniqueWords(f,{ignoreCase:!r}));n=l.mapper||function(a,b){return b.hasOwnProperty(r?a:a.toLowerCase())?p.replace(/\{s\}/g, c.html(a)):c.html(a)};b=d.getWords(b,{includePunctuation:!0,includeWhitespace:!0});return a.map(b,function(a){return n(a,f)}).join("")},wordsCase:function(a,b){return g.words(a,b,{caseSensitive:!0})}};b.Highlight=g},"3.17.2",{requires:["array-extras","classnamemanager","escape","text-wordbreak"]})},1324:function(k,m){YUI.add("squarespace-basic-check",function(b){var f=function(a){return function(b){b.halt();a.call(this,b)}};b.namespace("Squarespace.Widgets");var a=b.Squarespace.Widgets.BasicCheck= b.Base.create("basicCheck",b.Squarespace.Widgets.DataWidget,[],{bindUI:function(){a.superclass.bindUI.call(this);this.get("boundingBox").on("click",f(this._toggleActive),this)},renderUI:function(){var a=this.get("contentBox");b.Lang.isValue(this.get("title"))&&a.append('<div class="title">'+this.get("title")+"</div>");var d=b.Node.create('<div class="check-element"></div>');a.append(d);b.Lang.isValue(this.get("label"))&&d.append('<div class="label">'+this.get("label")+"</div>")},syncUI:function(){a.superclass.syncUI.call(this); this.get("contentBox").one(".check-element").toggleClass("active",this.get("data"))},_toggleActive:function(){this.set("data",!this.get("data"))}},{CSS_PREFIX:"sqs-basic-check",ATTRS:{data:{value:!1,validator:b.Lang.isBoolean},name:{value:null},title:{value:null},label:{value:null}}})},"1.0",{requires:["base","squarespace-dialog-check-template","squarespace-widgets-data-widget"]})},1351:function(k,m,b){var f=b(233);YUI.add("squarespace-cart-utils",function(a){var b,d,e;a.namespace("Squarespace.CartUtils"); a.Squarespace.CartUtils={initializeAddToCartButtons:function(){var d=a.Squarespace.Commerce.isExpressCheckout(),g=!1;a.all(".sqs-add-to-cart-button").each(function(b){var c=b.one(".sqs-add-to-cart-button-inner");c.plug(a.Squarespace.Animations.Scalable,{duration:0.2});d&&"Add To Cart"===b.getData("original-label")&&(c.setContent("Purchase"),b.setData("original-label","Purchase"));b.hasClass("use-form")&&(g=!0)},this);g&&!e&&a.Squarespace.CartUtils._getAdditionalFieldsFormTemplateSchema(function(a){e= a},this);b||(b=a.one("body").delegate("click",a.Squarespace.CartUtils._addCartEntry,".sqs-add-to-cart-button",this))},_addCartEntry:function(b){var c=b.currentTarget;if(!c.get("parentNode").hasClass("cart-added")){var e=function(b){new a.Squarespace.Widgets.Alert({"strings.title":"Unable to "+(a.Squarespace.Commerce.isExpressCheckout()?"Purchase":"Add")+" Item","strings.message":b})};b=function(a){var b="Please select the ",c=a.length;if(1==c)b+=a[0]+" option.";else if(2==c)b+=a[0]+" and "+a[1]+" options."; else for(var g=0;g<c;g++)b=g==c-1?b+("and "+a[g]+" options."):b+(a[g]+", ");return b};var d=c.getAttribute("data-item-id"),f,r,n=a.one(c.get("parentNode").siblings(".product-variants").item(0));if(a.Lang.isValue(n)){var p=JSON.parse(n.getAttribute("data-unselected-options")),k=p.length,t=n.getAttribute("data-selected-variant"),n=n.getAttribute("data-variant-in-stock"),t=t?JSON.parse(t):null,n=n?!0:!1;if(0<k){e(b(p));return}if(t)if(n)f=t;else{e("Sorry, we do not have enough of that item available."); return}else{e("Sorry, that item variant is unavailable. Please select another variant.");return}}if(b=c.get("parentNode").siblings(".product-quantity-input").item(0))if(r=a.one(b).one("input").get("value"),!a.Lang.isNumber(Number(r))){e("Quantity must be a number.");return}c.hasClass("use-form")?this._verifyItemInStock({itemId:d,variant:f,inStockCb:a.bind(function(){a.Squarespace.CartUtils._openAdditionalFieldsForm(c,function(b){a.Squarespace.CartUtils._goToCheckoutOrAddToCart(c,d,f,r,b,e)},this)}, this),outOfStockCb:function(){e("Sorry, we do not have enough of that item available.")}}):a.Squarespace.CartUtils._goToCheckoutOrAddToCart(c,d,f,r,null,e)}},_verifyItemInStock:function(b){var c=a.Squarespace.Singletons.ShoppingCart;a.Data.get({url:a.Squarespace.API_ROOT+"commerce/inventory/stock/",data:{itemId:b.itemId},success:function(e){a.Array.some(e.results,function(a){return a.unlimited?!0:a.qtyInStock>c.totalForItem(b.itemId,b.variant)})?b.inStockCb():b.outOfStockCb()}})},_goToCheckoutOrAddToCart:function(b, c,e,d,f,r){a.Squarespace.CartUtils._setButtonStateAdding(b);if(a.Lang.isValue(d)&&0!==d%1)r("Quantity must be a whole number"),a.Squarespace.CartUtils._setButtonStateIdle(b);else{var n=a.Squarespace.Commerce.isExpressCheckout();a.Squarespace.Singletons.ShoppingCart.addEntry(c,e,d,f,n,function(c){b.one(".sqs-add-to-cart-button-inner");c?(r(c),a.later(1E3,this,function(){a.Squarespace.CartUtils._setButtonStateIdle(b)})):a.Squarespace.Commerce.isExpressCheckout()?a.Squarespace.Commerce.goToCheckoutPage(): a.later(1E3,this,function(){a.Lang.isNull(b._node)||(a.Squarespace.CartUtils._setButtonStateAdded(b),a.later(2E3,this,function(){a.Squarespace.CartUtils._setButtonStateIdle(b)}))})},this)}},_setButtonStateAdding:function(b){var c=b.one(".sqs-add-to-cart-button-inner");c.once("hidden",function(){c.empty();b.addClass("cart-adding");(new a.Squarespace.Spinner({size:20,color:"light",render:c})).spin();c.append('<div class="status-text">Adding...</div>');c.show()},this);c.hide()},_setButtonStateAdded:function(a){var b= a.one(".sqs-add-to-cart-button-inner");b.empty();a.addClass("cart-added");b.append('<div class="status-text">Added!</div>')},_setButtonStateIdle:function(a){var b=a.one(".sqs-add-to-cart-button-inner");b.once("hidden",function(){b.empty();a.removeClass("cart-adding");a.removeClass("cart-added");b.setContent(a.getData("original-label"));b.show()},this);b.hide()},_openAdditionalFieldsForm:function(b,c,f){d||(d=new a.Squarespace.Widgets.ModalLightbox({render:a.one("body")}));var v=a.JSON.parse(b.getData("form")), l=new a.Squarespace.Widgets.AsyncForm({form:v,formTemplate:e,formSubmitButtonText:b.getData("original-label"),formName:v.name,showTitle:!0});l.on("submission",function(a){c&&c.call(f||this,a.data);d.close()},this);d.set("content",l);d.once("close",function(){l.destroy()},this);d.open()},_getAdditionalFieldsFormTemplateSchema:function(b,c){a.Data.get({url:"/api/template/GetTemplateSchema",data:{componentType:"widget",type:f.FORM},success:function(a){b.call(c||this,a)}},this)}}},"1.0",{requires:"base node json squarespace-commerce-utils squarespace-modal-lightbox squarespace-async-form squarespace-animations squarespace-spinner squarespace-widgets-alert".split(" ")})}, 1355:function(k,m,b){var f=b(74),a=b(125);YUI.add("squarespace-commerce-analytics",function(b){var d=new b.Base.create("commerceTrack",b.Base,[],{itemViewed:function(a){this.fire("commerce-item-viewed",a)},itemAdded:function(a){this.fire("commerce-item-added",a)},itemRemoved:function(a){this.fire("commerce-item-removed",a)},itemModified:function(a){this.fire("commerce-item-modified",a)},checkoutStarted:function(a){this.fire("commerce-checkout-started",a)},checkoutConfirmed:function(a){this.fire("commerce-checkout-confirmed", a)},contributionConfirmed:function(a){this.fire("commerce-contribution-confirmed",a)}},{ATTRS:{}});b.namespace("Squarespace");b.Squarespace.CommerceAnalytics=new d;var e=b.Base.create("commerceAnalytics",b.Base,[],{initializer:function(){this._events=[b.Squarespace.CommerceAnalytics.on("commerce-item-viewed",this._getProtectedTracker("onItemViewed"),this),b.Squarespace.CommerceAnalytics.on("commerce-item-added",this._getProtectedTracker("onItemAdded"),this),b.Squarespace.CommerceAnalytics.on("commerce-item-removed", this._getProtectedTracker("onItemRemoved"),this),b.Squarespace.CommerceAnalytics.on("commerce-item-modified",this._getProtectedTracker("onItemModified"),this),b.Squarespace.CommerceAnalytics.on("commerce-checkout-started",this._getProtectedTracker("onCheckoutStarted"),this),b.Squarespace.CommerceAnalytics.on("commerce-checkout-confirmed",this._getProtectedTracker("onCheckoutConfirmed"),this),b.Squarespace.CommerceAnalytics.on("commerce-contribution-confirmed",this._getProtectedTracker("onContributionConfirmed"), this)];this._setCartMode()},destructor:function(){b.Array.invoke(this._events,"detach")},_setCartMode:function(){var a=!0;try{a=Static.SQUARESPACE_CONTEXT.websiteSettings.storeSettings.testModeOn}catch(b){}this.cartMode=a?"test":"live"},_getProtectedTracker:function(a){return function(b){try{this[a].call(this,b)}catch(c){}}},onItemViewed:function(a){},onItemAdded:function(a){},onItemRemoved:function(a){},onItemModified:function(a){},onCheckoutStarted:function(a){},onCheckoutConfirmed:function(a){}, onContributionConfirmed:function(a){}},{ATTRS:{}}),d=b.Base.create("commerceAnalyticsInternal",e,[],{_createCartData:function(a){return{CartOrderId:a.id,CartSubtotal:a.subtotalCents/100,CartTax:a.taxCents/100,CartCurrency:"USD",CartMode:this.cartMode}},_createProductData:function(a){var b=a.productType;return{ProductId:a.itemId,ProductName:a.title,ProductType:b===f.PHYSICAL?"PHYSICAL":b===f.DIGITAL?"DIGITAL":"SERVICE",ProductSKU:a.chosenVariant?a.chosenVariant.sku:"",ProductPrice:a.purchasePriceCents/ 100,ProductQuantity:a.quantity}},_getItemVariantPrice:function(a){return b.Object.hasKey(a,"onSale")&&a.onSale?(b.Object.hasKey(a,"salePrice")?a.salePrice:a.salePriceCents)/100:(b.Object.hasKey(a,"price")?a.price:a.priceCents)/100},_getItemPrice:function(a){var e=0;b.Object.hasKey(a,"variants")&&0<a.variants.length?(b.Array.each(a.variants,function(a){e+=this._getItemVariantPrice(a)},this),e/=a.variants.length):e=this._getItemVariantPrice(a);return e},_createItemData:function(a){return{ProductId:a.id, ProductName:a.title}},_createItemAddedData:function(a){return b.merge(this._createCartData(a.shoppingCart),this._createProductData(a.newlyAdded))},_createItemRemovedData:function(a){return b.merge(this._createCartData(a.shoppingCart),this._createProductData(a.updatedEntry))},_createItemModifiedData:function(a){return b.merge(this._createCartData(a.shoppingCart),this._createProductData(a.updatedEntry))},_createItemCheckoutStartedData:function(a,e){return b.merge(this._createCartData(a),this._createProductData(e))}, _createItemCheckoutCompletedData:function(a,e){return b.merge(this._createCartData(a),this._createProductData(e))},_track:function(a,e){b.Squarespace.Analytics.trackInternal(a,e)},onItemViewed:function(a){}},{ATTRS:{}}),h=b.Base.create("commerceAnalyticsMixpanel",d,[],{_track:function(a,e){b.Squarespace.Analytics.track(a,e)},onItemViewed:function(a){this._track("shopper_product_viewed",this._createItemData(a))},onItemAdded:function(a){this._track("shopper_product_added",this._createItemAddedData(a))}, onItemRemoved:function(a){this._track("shopper_product_removed",this._createItemRemovedData(a))},onItemModified:function(a){this._track("shopper_product_modified",this._createItemModifiedData(a))},onCheckoutStarted:function(a){b.each(a.entries,function(b){this._track("shopper_product_checkout_started",this._createItemCheckoutStartedData(a,b))},this)},onCheckoutConfirmed:function(a){b.each(a.purchasedCart.entries,function(b){this._track("shopper_product_purchased",this._createItemCheckoutCompletedData(a.purchasedCart, b))},this);this._track("shopper_order_submitted",{CartOrderId:a.purchasedCart.id,CartCurrency:"USD",CartGrandTotal:a.purchasedCart.grandTotalCents/100,CartSubtotal:a.purchasedCart.subtotalCents/100,CartTax:a.purchasedCart.taxCents/100,CartShipping:a.purchasedCart.shippingCostCents/100,CartTotalQuantity:a.purchasedCart.totalQuantity,CartMode:this.cartMode})},onContributionConfirmed:function(a){this._track("donation_submitted",{Currency:"USD",Total:a.amountCents/100,CartMode:this.cartMode})}},{ATTRS:{}}), e=b.Base.create("commerceAnalyticsGoogle",e,[],{onCheckoutConfirmed:function(a){_gaq&&(_gaq.push(["_addTrans",a.id,"",a.purchasedCart.subtotalCents/100,a.purchasedCart.taxCents/100,a.purchasedCart.shippingCostCents/100,a.customer.billingAddress.city,a.customer.billingAddress.state,a.customer.billingAddress.country]),b.each(a.purchasedCart.entries,function(b){_gaq.push(["_addItem",a.id,b.chosenVariant?b.chosenVariant.sku:"digital",b.title,"",b.purchasePriceCents/100,b.quantity])}),_gaq.push(["_trackTrans"]))}}, {ATTRS:{}});new d;new h;new e;b.Lang.isObject(Static)&&b.Object.hasKey(Static,"SQUARESPACE_CONTEXT")&&b.Object.hasKey(Static.SQUARESPACE_CONTEXT,"item")&&Static.SQUARESPACE_CONTEXT.item.recordType===a.STORE_ITEM&&b.Squarespace.CommerceAnalytics.itemViewed(Static.SQUARESPACE_CONTEXT.item)},"1.0",{requires:["array-invoke","event-custom","node","base","squarespace-util"]})},1385:function(k,m){YUI.add("squarespace-email-utils",function(b){b.namespace("Squarespace");var f=b.Squarespace.EmailUtils={VALID_EMAIL_REGEX:/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/, isValid:function(a){return 3>a.length||256<a.length?!1:f.VALID_EMAIL_REGEX.test(a)}}},"1.0",{requires:[]})},1403:function(k,m,b){var f=b(232),a=b(192);YUI.add("squarespace-localities",function(b){b.namespace("Squarespace");b.Squarespace.Localities={COUNTRY_OPTIONS:b.merge({"":{title:"Not Specified",empty:!0}},a(f,function(a){return{title:a}})),STATE_OPTIONS:{AL:{title:"Alabama"},AK:{title:"Alaska"},AZ:{title:"Arizona"},AR:{title:"Arkansas"},CA:{title:"California"},CO:{title:"Colorado"},CT:{title:"Connecticut"}, DE:{title:"Delaware"},FL:{title:"Florida"},GA:{title:"Georgia"},HI:{title:"Hawaii"},ID:{title:"Idaho"},IL:{title:"Illinois"},IN:{title:"Indiana"},IA:{title:"Iowa"},KS:{title:"Kansas"},KY:{title:"Kentucky"},LA:{title:"Louisiana"},ME:{title:"Maine"},MD:{title:"Maryland"},MA:{title:"Massachusetts"},MI:{title:"Michigan"},MN:{title:"Minnesota"},MS:{title:"Mississippi"},MO:{title:"Missouri"},MT:{title:"Montana"},NE:{title:"Nebraska"},NV:{title:"Nevada"},NH:{title:"New Hampshire"},NJ:{title:"New Jersey"}, NM:{title:"New Mexico"},NY:{title:"New York"},NC:{title:"North Carolina"},ND:{title:"North Dakota"},OH:{title:"Ohio"},OK:{title:"Oklahoma"},OR:{title:"Oregon"},PA:{title:"Pennsylvania"},RI:{title:"Rhode Island"},SC:{title:"South Carolina"},SD:{title:"South Dakota"},TN:{title:"Tennessee"},TX:{title:"Texas"},UT:{title:"Utah"},VT:{title:"Vermont"},VA:{title:"Virginia"},WA:{title:"Washington"},DC:{title:"Washington, District of Columbia"},WV:{title:"West Virginia"},WI:{title:"Wisconsin"},WY:{title:"Wyoming"}, AA:{title:"Armed Forces Europe"},AE:{title:"Armed Forces Americas"},AP:{title:"Armed Forces Pacific"}}};b.Squarespace.Localities.COUNTRIES_TO_STATES={US:b.Squarespace.Localities.STATE_OPTIONS,CA:{ON:{title:"Ontario"},QC:{title:"Quebec"},NS:{title:"Nova Scotia"},NB:{title:"New Brunswick"},MB:{title:"Manitoba"},BC:{title:"British Columbia"},PE:{title:"Prince Edward Island"},SK:{title:"Saskatchewan"},AB:{title:"Alberta"},NL:{title:"Newfoundland and Labrador"},NT:{title:"Northwest Territories"},YT:{title:"Yukon"}, NU:{title:"Nunavut"}}};b.Squarespace.Localities.countryCodeFromName=function(a){for(var e in b.Squarespace.Localities.COUNTRY_OPTIONS)if(b.Squarespace.Localities.COUNTRY_OPTIONS[e].title===a)return e};var d=function(a){return b.Array.reduce(b.Object.keys(a).sort(),[],function(b,c){b.push({label:a[c].title,value:c});return b})},e=function(a){return a.sort(function(a,b){return a.label<b.label?-1:1})};b.Squarespace.Localities.getAllCountryNames=function(){var a=[];b.Object.each(b.Squarespace.Localities.COUNTRY_OPTIONS, function(b){b.empty||a.push(b.title)});return a};b.Squarespace.Localities.getNewCountryOptions=function(){return e(d(b.Squarespace.Localities.COUNTRY_OPTIONS))};b.Squarespace.Localities.getNewStateOptionsForCountry=function(a){return e(d(b.Squarespace.Localities.COUNTRIES_TO_STATES[a]))};b.Squarespace.Localities.getAmericentricSortedCountryOptions=function(){var a=b.Array.filter(b.Squarespace.Localities.getNewCountryOptions(),function(a){return""!==a.value});a.sort(function(a,b){return a.label>b.label? 1:a.label<b.label?-1:0});return a}})},1406:function(k,m,b){var f=b(1096);YUI.add("squarespace-mixins-google-places-autocomplete",function(a){a.namespace("Squarespace.Mixins");var b={POSTAL_CODE:"postal_code",COUNTRY:"country",LOCALITY:"locality",ROUTE:"route",STREET_NUMBER:"street_number",ADMIN_LEVEL_1:"administrative_area_level_1",SUBLOCALITY:"sublocality",POSTAL_TOWN:"postal_town",NEIGHBORHOOD:"neighborhood"},d=a.Object.values(b),e=a.Squarespace.Localities.COUNTRY_OPTIONS,h=["geocode"];a.Squarespace.Mixins.GooglePlacesAutocomplete= a.Base.create("GooglePlacesAutocomplete",a.Base,[],{initializer:function(){this.publish("placeDetails");a.Do.after(this._afterRenderUI,this,"renderUI",this);a.Do.after(this._afterBindUI,this,"bindUI",this);this.after("render",this._enableBrowserAutoComplete,this);this.setAttrs({source:a.bind(this._accessAutocompleteService,this),enableCache:!1,resultTextLocator:"description",resultFilters:this._filterResults,resultFormatter:this._formatResults,minQueryLength:3})},_afterRenderUI:function(){var a=this.get("contentBox"); a.addClass("sqs-google-places-autocomplete-mixin");a.one(".sqs-scroll-ac-scroll-container").append('<div class="google-required-elements"><div class="google-attributions"></div><div class="powered-by-google"></div></div>')},_afterBindUI:function(){this.before("select",this._getDetailsForPrediction,this);this.on("placeDetails",this._fillWithAddressLine1,this);this._inputNode.on("focus",function(){this._inputNode.setAttribute("autocomplete","off");this._inputIsFocused=!0},this);this._inputNode.on("blur", function(){this._inputNode.setAttribute("autocomplete","on");this._inputIsFocused=!1},this)},_enableBrowserAutoComplete:function(){this._inputNode.setAttribute("autocomplete","on")},_getDetailsForPrediction:function(b){b.halt();var c=b.result.raw;this._accessPlaceDetailsService(c,function(b,e){if(e===a.config.win.google.maps.places.PlacesServiceStatus.OK){var d=this._extractPlaceComponents(b),d=this._buildLocationPayload(d,c);this.fire("placeDetails",{place:d})}else console.warn("Error communicating with Google Places API")})}, _extractPlaceComponents:function(g){return a.Array.reduce(g.address_components,{},function(g,h){var f=a.Array.find(h.types,function(b){return-1!==a.Array.indexOf(d,b)});g[f]=f?f===b.ADMIN_LEVEL_1?h.short_name:f===b.COUNTRY?e[h.short_name].title:h.long_name:"";return g})},_buildLocationPayload:function(e,d){var h=a.Object.getValue(e,"street_number")||"",f=a.Object.getValue(e,"route")||"",r=a.Object.getValue(e,"country")||"",n=a.Object.getValue(e,"locality")||"",p=a.Object.getValue(e,"sublocality")|| "",k=a.Object.getValue(e,"neighborhood")||"",p=[a.Object.getValue(e,"postal_town")||"",n,p,k],n=a.Array.find(p,function(b){return a.Array.find(d.terms,function(a){return a.value===b})})||n,h=this._getPreferredStreetNumber(f,h),p=a.Object.getValue(e,b.ADMIN_LEVEL_1)||"",k=a.Object.getValue(e,b.POSTAL_CODE)||"",t=a.Array.filter([n,p,k],function(a){return!!a}).join(", ").trim();return{address:(h+" "+f).trim(),country:r,city:n,state:p,zip:k,fullLocality:t}},_getPreferredStreetNumber:function(a,b){var c= this.get("query"),e=a.split(" ")[0],e=c.toLowerCase().indexOf(e.toLowerCase()),c=c.substring(0,e).trim();return c.length>b.length?c:b},_accessAutocompleteService:function(b,c){this._autocompleteService?this._performAutoComplete(b,c):f().then(a.bind(function(a){this._initAutocompleteService(a);this._performAutoComplete(b,c)},this))},_initAutocompleteService:function(a){this._autocompleteService=new a.places.AutocompleteService},_performAutoComplete:function(b,c){var e={input:b,types:h},d=a.bind(function(){this._inputIsFocused&& c.apply(this,arguments)},this);this._autocompleteService.getPlacePredictions(e,d)},_accessPlaceDetailsService:function(b,c){this._placeDetailsService?this._getPlaceDetails(b,c):f().then(a.bind(function(a){this._initPlaceDetailsService(a);this._getPlaceDetails(b,c)},this))},_initPlaceDetailsService:function(a){this._placeDetailsService=new a.places.PlacesService(this.get("contentBox").one(".google-attributions"))},_getPlaceDetails:function(b,c){this._placeDetailsService.getDetails(b,a.bind(c,this))}, _formatResults:function(b,c){return a.Array.map(c,function(b){var c=b.raw.terms,e=b.raw.matched_substrings,d=-1!==a.Array.indexOf(b.raw.types,"street_address"),g=c[0].offset+c[0].value.length,c=c[1].offset+c[1].value.length,h=d?c:g;return a.Array.map(b.text.split(""),function(a,c){var d=["google-ac-character"];this._indexWithinMatchedSubstring(c,e)&&d.push("google-ac-matched-character");d='<span class="'+d.join(" ").trim()+'">'+a+"</span>";return 0===c?'<div class="google-ac-address">'+d:c===h?d+ "</div>":c===h+1?'<div class="google-ac-trailing">'+d:c===b.text.length?d+"</div>":d},this).join("")},this)},_indexWithinMatchedSubstring:function(b,c){return a.Array.some(c,function(a){return b>=a.offset&&b<a.offset+a.length})},_filterResults:function(b,c){return a.Array.filter(c,function(a){return this._predictionHasRouteComponent(a.raw)&&this._predictionContainsCountryInList(a.raw)},this)},_predictionContainsCountryInList:function(b){var c=this.get("countriesAllowed");return!a.Lang.isArray(c)|| 0===c.length?!0:a.Array.find(c,function(a){return-1!==b.description.indexOf(a)})},_predictionHasRouteComponent:function(e){return-1!==a.Array.indexOf(e.types,b.ROUTE)}},{ATTRS:{countriesAllowed:{validator:a.Squarespace.AttrValidators.isNullOrArray}}})},"1.0",{requires:"autocomplete-highlighters base event-custom squarespace-attr-validators squarespace-localities squarespace-util".split(" ")})},1417:function(k,m){YUI.add("squarespace-models-shopping-cart",function(b){b.namespace("Squarespace.Models"); b.namespace("Squarespace.Singletons");var f=b.Squarespace.Models.ShoppingCart=b.Base.create("shoppingCart",b.Model,[],{initializer:function(){this.publish("item-added",{emitFacade:!0});this.publish("loaded",{emitFacade:!0});this.publish("recalculate-start",{emitFacade:!0});this.publish("recalculate-end",{emitFacade:!0});this._isRecalculating=this._readInProgress=!1;this.on("recalculate-start",function(){this._isRecalculating=!0},this);this.on("recalculate-end",function(){this._isRecalculating=!1}, this)},toJSON:function(){var a=f.superclass.toJSON.call(this),c=a.created;b.Lang.isNull(c)||(a.created=c.getTime());return a},sync:function(a,b,d){switch(a){case "read":this._read(b,d)}},load:function(a,c,d){"function"===typeof a&&(c=a,a={});this._readinProgress?this.after("load",c,d):b.Model.prototype.load.call(this,a,c?b.bind(c,d||this):null)},isRecalculating:function(){return this._isRecalculating},hasEntry:function(a,c){return b.Array.reduce(this.get("entries"),!1,function(d,e){return b.Lang.isValue(c)? d||e.itemId==a&&c.sku==e.chosenVariant.sku:d||e.itemId==a})},addEntry:function(a,c,d,e,h,g,f){b.Data.post({url:"/api/commerce/shopping-cart/entries"+(h?"?isExpress=true":""),headers:{"Content-Type":"application/json"},data:b.JSON.stringify({itemId:a,sku:b.Lang.isValue(c)?c.sku:null,quantity:d,additionalFields:b.JSON.stringify(e)}),success:function(a){b.Squarespace.CommerceAnalytics.itemAdded(a);this.setAttrs(a.shoppingCart);this.fire("item-added");b.Lang.isFunction(g)&&g.call(f||this,null,a.newlyAdded)}, failure:function(a){a.crumbFail&&(b.Squarespace.Utils.areCookiesEnabled()?a.error="Your session has expired. Please reload the page and try again.":a.error="Please enable cookies in your browser, reload the page, and try again.");b.Lang.isFunction(g)&&g.call(f||this,a.message,null)}},this)},updateFormSubmission:function(a,c,d,e){var h=a.chosenVariant;this.fire("recalculate-start");b.Data.put({headers:{"Content-Type":"application/json"},url:b.Lang.sub("/api/commerce/shopping-cart/entries/{entryId}/additionalFields", {entryId:a.id}),data:b.JSON.stringify({itemId:a.itemId,sku:b.Lang.isValue(h)?h.sku:null,additionalFields:b.JSON.stringify(c)}),success:function(a){this.fire("recalculate-end");this.setAttrs(a.shoppingCart);b.Lang.isFunction(d)&&d.call(e||this,null,a.updatedEntry)},failure:function(a){this.fire("recalculate-end");b.Lang.isFunction(d)&&d.call(e||this,a.message,null)}},this)},updateQuantity:function(a,c,d,e){var h=a.chosenVariant;this.fire("recalculate-start");b.Data.put({headers:{"Content-Type":"application/json"}, url:b.Lang.sub("/api/commerce/shopping-cart/entries/{entryId}",{entryId:a.id}),data:b.JSON.stringify({itemId:a.itemId,sku:b.Lang.isValue(h)?h.sku:null,quantity:c}),success:function(a){this.fire("recalculate-end");0===c?b.Squarespace.CommerceAnalytics.itemRemoved(a):b.Squarespace.CommerceAnalytics.itemModified(a);this.setAttrs(a.shoppingCart);b.Lang.isFunction(d)&&d.call(e||this,null,a.updatedEntry)},failure:function(a){this.fire("recalculate-end");b.Lang.isFunction(d)&&d.call(e||this,a.message,null)}}, this)},updateShippingLocation:function(a,c,d){this.fire("recalculate-start");b.Data.put({url:"/api/commerce/shopping-cart/shipping-location",data:a,success:function(a){this.fire("recalculate-end");this.setAttrs(a);b.Lang.isFunction(c)&&c.call(d||this,null)},failure:function(a){this.fire("recalculate-end");b.Lang.isFunction(c)&&c.call(d||this,a.message,null)}},this)},updateShippingMethod:function(a,c,d){this.fire("recalculate-start");b.Data.put({url:"/api/commerce/shopping-cart/selected-shipping-option", data:{shippingOptionKey:a},success:function(a){this.fire("recalculate-end");this.setAttrs(a);b.Lang.isFunction(c)&&c.call(d||this,null)},failure:function(a){this.fire("recalculate-end");b.Lang.isFunction(c)&&c.call(d||this,a.message,null)}},this)},addCoupon:function(a,c,d){b.Data.post({url:"/api/commerce/shopping-cart/coupons",data:{promoCode:a},success:function(a){this.setAttrs(a);b.Lang.isFunction(c)&&c.call(d||this,null)},failure:function(a){b.Lang.isFunction(c)&&c.call(d||this,a.message,null)}}, this)},removeCoupon:function(a,c,d){b.Data.del({url:"/api/commerce/shopping-cart/coupons/"+a,success:function(a){this.setAttrs(a);b.Lang.isFunction(c)&&c.call(d||this,null)},failure:function(a){b.Lang.isFunction(c)&&c.call(d||this,a.message,null)}},this)},updateCustomerInfo:function(a){b.Data.put({url:"/api/commerce/shopping-cart/customer",data:{email:a},success:this.setAttrs.bind(this),failure:function(a){console.warn("An error happened when adding the customer info: ",a)}},this)},totalForItem:function(a, c){var d=b.Lang.isValue(c);return b.Array.reduce(this.get("entries"),0,function(b,h){return h.item.id===a&&(!d||d&&h.chosenVariant.sku===c.sku)?b+h.quantity:b})},hasShippingOptions:function(){var a=this.get("shippingOptions");return b.Lang.isArray(a)&&0<a.length},_read:function(a,c){this._readInProgress=!0;this.fire("loading");b.Data.get({url:"/api/commerce/shopping-cart",data:{mock:a.mock?"true":"false"},success:function(a){this.fire("loaded");this._readInProgress=!1;c(null,a)},failure:function(a){this.fire("loaded"); this._readInProgress=!1;c(a.message,null)}},this)}},{ATTRS:{id:{validator:b.Lang.isString},websiteId:{validator:b.Lang.isString},orderId:{validator:b.Lang.isString},created:{getter:function(a){return b.Lang.isValue(a)?new Date(a):null},setter:function(a){return b.Lang.isDate(a)?a.getTime():a},validator:b.Lang.isNumber},isPurchased:{value:!1,validator:b.Lang.isBoolean},entries:{value:[],validator:b.Lang.isArray},shippingOptions:{value:[],validator:b.Lang.isArray},selectedShippingOption:{validator:b.Lang.isObject}, shippingLocation:{validator:b.Lang.isObject},applicableTaxRules:{value:[],validator:b.Lang.isArray},coupons:{value:[],validator:b.Lang.isArray},validCoupons:{value:[],validator:b.Lang.isArray},invalidCoupons:{value:[],validator:b.Lang.isArray},subtotalCents:{validator:b.Lang.isNumber,value:0},taxCents:{validator:b.Lang.isNumber,value:0},shippingCostCents:{validator:b.Lang.isNumber,value:0},discountCents:{validator:b.Lang.isNumber,value:0},grandTotalCents:{validator:b.Lang.isNumber,value:0},totalQuantity:{validator:b.Lang.isNumber, value:0},hasDigital:{validator:b.Lang.isBoolean,value:!1},purelyDigital:{validator:b.Lang.isBoolean,value:!1},requiresShipping:{validator:b.Lang.isBoolean,value:!1}}});b.Squarespace.Singletons.ShoppingCart=new f},"1.0",{requires:["base","model","squarespace-commerce-utils","squarespace-commerce-analytics","squarespace-util"]})},1422:function(k,m){YUI.add("squarespace-plugin-money-formatter",function(b){b.namespace("Squarespace.Plugin");b.Squarespace.Plugin.MoneyFormatter=b.Base.create("moneyFormatter", b.Squarespace.Plugin.NumericFormatter,[],{_transformToData:function(b){return Number(this.convertToCents(b))},convertToCents:function(b){b=String(b).replace(/[^\d\.]/g,"");if(""===b)return 0;b=b.split(".");var a=b[0];1<b.length&&(a+="."+b[1].substr(0,2));return Math.round(100*parseFloat(a,10))}},{NS:"moneyFormatterPlugin",ATTRS:{prefixUnit:{valueFn:function(){return b.Squarespace.Commerce.currencySymbol()}},displayFormatter:{value:b.Squarespace.Commerce.moneyFormat}}})},"1.0",{requires:["plugin", "squarespace-util","squarespace-commerce-utils","squarespace-plugin-numeric-formatter"]})},1423:function(k,m){YUI.add("squarespace-plugin-pulsewarn",function(b){b.namespace("Squarespace.Plugin");b.Squarespace.Plugin.PulseWarn=b.Base.create("pulseWarn",b.Plugin.Base,[],{initializer:function(f){this.config=f;this.set("color",f.color);this.set("useClass",f.useClass);this.set("targetClass",f.targetClass);this.set("iterations",f.iterations);this.get("host").addClass("pulse-warnable");b.Lang.isUndefined(f.interval)|| this.set("interval",f.interval);this._timer=null},destructor:function(){this._timer&&(this._timer.cancel(),this._timer=null)},warn:function(){var f=this.get("host"),a=this.get("iterations"),c=f.getStyle("backgroundColor"),d=this.get("color");b.Lang.isNull(this._timer)||(this._timer.cancel(),this._timer=null);if(this.get("useClass")){var e=this.get("targetClass"),c=this.get("interval");this.fire("start");f.addClass(e);this._timer=b.later(c,this,function(){0===a?(f.removeClass(e),this.fire("stop"), this._timer.cancel(),this._timer=null):(f.hasClass(e)?f.removeClass(e):f.addClass(e),a--)},{},!0)}else{var h=new b.Anim({node:f,to:{backgroundColor:d,opacity:0.8},easing:this.get("easingUp"),duration:this.get("duration")}),g=new b.Anim({node:f,to:{backgroundColor:c,opacity:1},easing:this.get("easingDown"),duration:this.get("duration")});h.on("end",function(){0<a&&g.run();a--});g.on("end",function(){0<a?h.run():this.fire("stop")},this);this.fire("start");h.run()}}},{NS:"pulseWarn",ATTRS:{useClass:{value:!1}, iterations:{value:3},color:{value:"#c1b12e"},interval:{value:2E3},duration:{value:0.7},easingUp:{value:b.Easing.easeInSine},easingDown:{value:b.Easing.easeOutSine}}})},"1.0",{requires:["base","plugin","anim"]})},1427:function(k,m){YUI.add("squarespace-scrolling-auto-complete-list",function(b){b.namespace("Squarespace.Widgets");var f=b.Squarespace.Widgets.ScrollingAutoCompleteList=b.Base.create("ScrollingAutoCompleteList",b.AutoCompleteList,[],{initializer:function(){this.publish("keyboardContinue"); this.publish("listMouseUp");this.publish("listMouseDown")},renderUI:function(){f.superclass.renderUI.call(this);var a=this._scrollNode=b.Node.create('<div class="'+this.getClassName()+'-scroll-container"></div>');this.get("listNode").wrap(a);a.hide();(a=this.get("className"))&&this.get("contentBox").addClass(a)},bindUI:function(){f.superclass.bindUI.call(this);var a=this._scrollNode,b=this.get("inputNode");this.after("activeItemChange",function(a){a.newVal&&this._scrollToActiveItem()},this);this.on("results", function(b){0<b.results.length?a.show():a.hide()},this);this.on(["select","clear"],function(){a.hide()});this.get("boundingBox").on(["focusoutside","clickoutside"],function(b){a.hide()});b.on("keydown",function(a){switch(a.keyCode){case 13:this.selectItem();this.fire("keyboardContinue");break;case 9:this.get("activeItem")&&(this.selectItem(),this.fire("keyboardContinue"));break;case 27:this.hide();break;case 38:this._activatePrevItem();break;case 40:this._activateNextItem()}},this);this._listNode.delegate("mouseup", function(a){this.fire("listMouseUp");a.preventDefault()},this._SELECTOR_ITEM,this);this._listNode.delegate("mousedown",function(a){this.fire("listMouseDown")},this._SELECTOR_ITEM,this)},_activateNextItem:function(){f.superclass._activateNextItem.call(this);b.Lang.isNull(this.get("activeItem"))&&this.set("activeItem",this._getFirstItemNode())},_activatePrevItem:function(){f.superclass._activatePrevItem.call(this);b.Lang.isNull(this.get("activeItem"))&&this.set("activeItem",this._getLastItemNode())}, _scrollToActiveItem:function(){this.get("activeItem").scrollIntoView();var a=this._scrollNode,b=a.get("scrollTop"),d=a.one("li:first-child").get("offsetHeight");a.set("scrollTop",d*Math.round(b/d))}},{CSS_PREFIX:"sqs-scroll-ac",ATTRS:{className:{validator:b.Squarespace.AttrValidators.isNullOrString}}})},"1.0",{requires:["base","autocomplete","lang/autocomplete-list","squarespace-attr-validators","event-outside"]})},1504:function(k,m){YUI.add("squarespace-widgets-google-places-autocomplete",function(b){b.namespace("Squarespace.Widgets"); b.Squarespace.Widgets.GooglePlacesAutocomplete=b.Base.create("GooglePlacesAutoCompleteWidget",b.Squarespace.Widgets.ScrollingAutoCompleteList,[b.Squarespace.Mixins.GooglePlacesAutocomplete],{},{CSS_PREFIX:b.Squarespace.Widgets.ScrollingAutoCompleteList.CSS_PREFIX})},"1.0",{requires:["base","squarespace-scrolling-auto-complete-list","squarespace-mixins-google-places-autocomplete"]})},1508:function(k,m){YUI.add("autocomplete-highlighters",function(b,f){var a=b.Array,c=b.Highlight,d=b.mix(b.namespace("AutoCompleteHighlighters"), {charMatch:function(b,d,g){var f=a.unique((g?b:b.toLowerCase()).split(""));return a.map(d,function(a){return c.all(a.text,f,{caseSensitive:g})})},charMatchCase:function(a,b){return d.charMatch(a,b,!0)},phraseMatch:function(b,d,g){return a.map(d,function(a){return c.all(a.text,[b],{caseSensitive:g})})},phraseMatchCase:function(a,b){return d.phraseMatch(a,b,!0)},startsWith:function(b,d,g){return a.map(d,function(a){return c.all(a.text,[b],{caseSensitive:g,startsWith:!0})})},startsWithCase:function(a, b){return d.startsWith(a,b,!0)},subWordMatch:function(e,d,g){var f=b.Text.WordBreak.getUniqueWords(e,{ignoreCase:!g});return a.map(d,function(a){return c.all(a.text,f,{caseSensitive:g})})},subWordMatchCase:function(a,b){return d.subWordMatch(a,b,!0)},wordMatch:function(b,d,g){return a.map(d,function(a){return c.words(a.text,b,{caseSensitive:g})})},wordMatchCase:function(a,b){return d.wordMatch(a,b,!0)}})},"3.17.2",{requires:["array-extras","highlight-base"]})},1509:function(k,m){YUI.add("lang/autocomplete-list", function(b){b.Intl.add("autocomplete-list","",{item_selected:"{item} selected.",items_available:"Suggestions are available. Use the up and down arrow keys to select suggestions."})},"3.17.2")},1562:function(k,m){YUI.add("squarespace-checkout-form-custom-form-template",function(b){var f=b.Handlebars;(function(){var a=f.template;(f.templates=f.templates||{})["checkout-form-custom-form.html"]=a(function(a,b,e,h,g){this.compilerInfo=[4,">= 1.0.0"];this.merge(e,a.helpers);var f;a=this.escapeExpression; return b=""+('<div class="title">'+a((f=(f=b.strings,null==f||!1===f?f:f.name),"function"===typeof f?f.apply(b):f))+'<a class="edit-button">edit</a></div>\n\n<fieldset>\n\n <div class="custom-form">\n </div>\n\n \x3c!-- Continue --\x3e\n <div class="btn-container">\n <div class="button continue-button">Continue</div>\n </div>\n\n</fieldset>\n')})})();b.Handlebars.registerPartial("checkout-form-custom-form.html".replace("/","."),f.templates["checkout-form-custom-form.html"])},"1.0",{requires:["handlebars-base"]})}, 1563:function(k,m){YUI.add("squarespace-checkout-form-payment-template",function(b){var f=b.Handlebars;(function(){var a=f.template;(f.templates=f.templates||{})["checkout-form-payment.html"]=a(function(a,b,e,h,g){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,a.helpers);g=g||{};var f,k=this.escapeExpression,l=e.helperMissing;a='<div class="title">\n <a class="edit-button">edit</a>\n\n <div class="cards">\n <img src="../../universal/images-v6/checkout/discover.png" />\n <img src="../../universal/images-v6/checkout/mastercard.png" />\n <img src="../../universal/images-v6/checkout/visa.png" />\n <img src="../../universal/images-v6/checkout/americanexpress.png" />\n </div>\n\n Billing\n</div>\n\n<fieldset>\n\n <div class="subtitle">Billing Address</div>\n\n \x3c!-- bill to shipping --\x3e\n '; if((h=e["if"].call(b,b.requiresShipping,{hash:{},inverse:this.noop,fn:this.program(1,function(a,b){return'\n <div class="bill-to-shipping">\n <label>\n <input name="billToShipping" class="field-element" type="checkbox" value="true"/>\n Use Shipping Address\n </label>\n </div>\n '},g),data:g}))||0===h)a+=h;f={hash:{"short":"true"},data:g};a=a+'\n\n \x3c!-- Billing Information --\x3e\n <div id="billing-address">\n\n \x3c!-- First Name --\x3e\n <div id="billing-first-name" data-label="First Name" class="field first-name required">\n <label>First Name</label>\n <input name="billingFirstName" class="field-element" placeholder="First Name"\n x-autocompletetype="given-name" type="text" spellcheck="false" maxlength="30" />\n </div>\n\n\n \x3c!-- Last Name --\x3e\n <div id="billing-last-name" data-label="Last Name" class="field last-name required">\n <label>Last Name</label>\n <input name="billingLastName" class="field-element" placeholder="Last Name"\n x-autocompletetype="surname"a type="text" spellcheck="false" maxlength="30" />\n </div>\n\n\n \x3c!-- Billing Address 1 --\x3e\n <div id="billing-address-1" data-label="Address Line 1" class="field required">\n <label>Address Line 1</label>\n <input name="billingAddress1" class="field-element address-line1"\n placeholder="Address Line 1" x-autocompletetype="address-line1" type="text" spellcheck="false" maxlength="50" />\n </div>\n\n\n \x3c!-- Billing Address 2 --\x3e\n <div id="billing-address-2" data-label="Address Line 2" class="field">\n <label>Address Line 2</label>\n <input name="billingAddress2" class="field-element address-line2"\n placeholder="Address Line 2" type="text" x-autocompletetype="address-line2" spellcheck="false" maxlength="50" />\n </div>\n\n\n \x3c!-- Country --\x3e\n <div id="billing-country" data-label="Country" class="field country required">\n <label>Country</label>\n <select name="billingCountry" class="field-element" x-autocompletetype="country-name">\n </select>\n </div>\n\n\n \x3c!-- City --\x3e\n <div id="billing-city" data-label="City" class="field city required">\n <label>City</label>\n <input name="billingCity" class="field-element" placeholder="City" type="text"\n spellcheck="false" maxlength="30" />\n </div>\n\n\n \x3c!-- State/Province --\x3e\n <div id="billing-state" data-label="State/Province" class="field state required">\n <label>State/Province</label>\n <select name="billingState" class="field-element" x-autocompletetype="state">\n </select>\n </div>\n\n\n \x3c!-- Zip Code --\x3e\n <div id="billing-zip" data-label="Zip Code" class="field zip required">\n <label>Zip / Postal</label>\n <input name="billingZip" class="field-element" placeholder="Zip / Postal" type="text"\n spellcheck="false" maxlength="10" />\n </div>\n\n </div>\n\n <div class="subtitle">Secure Payment</div>\n\n \x3c!--\n Credit Card Fields\n NOTA BENE: These INPUTs are left without \'name\' because we ABSOLUTELY must NOT\n transmit these values to our own servers.\n --\x3e\n <div id="credit-card">\n\n \x3c!-- Name --\x3e\n <input name="cardHolderName" type="hidden" />\n\n \x3c!-- Card Number --\x3e\n <div id="card-number" data-label="Card Number" class="field required">\n <label>Card Number</label>\n\n <input class="field-element" size="20"\n autocomplete="off" placeholder="Card Number" value="" />\n </div>\n\n \x3c!-- Expiry/CVC --\x3e\n <div id="expiry-cvc">\n\n \x3c!-- Expiry Month --\x3e\n <div id="card-expiry-month" data-label="Exp. Mo." class="field">\n <label>Exp. Mo.</label>\n <select class="field-element" value="04" >\n '+ (k((h=e["month-options"]||b["month-options"],h?h.call(b,f):l.call(b,"month-options",f)))+'\n </select>\n </div>\n\n \x3c!-- Expiry Year --\x3e\n <div id="card-expiry-year" data-label="Exp. Yr." class="field">\n <label>Exp. Yr.</label>\n <select class="field-element" value="2015" >\n ');(f=e["year-options"])?f=f.call(b,{hash:{},data:g}):(f=b["year-options"],f="function"===typeof f?f.apply(b):f);a+=k(f)+'\n </select>\n </div>\n\n \x3c!-- CVC --\x3e\n <div id="cvc" data-label="CVC" class="field required">\n <label>CVC</label>\n <input class="field-element" size="4" autocomplete="off"\n placeholder="CVC" value="" />\n </div>\n\n </div>\n\n </div> \x3c!-- end #credit-card --\x3e\n\n\n \x3c!-- Secure payment conditions --\x3e\n <div id="comfort">\n All transactions are secure and encrypted, and we never store your credit card information. Payments are\n processed through Stripe. Payment information is also governed by\n <a target="_blank" href="https://stripe.com/privacy">Stripe\'s privacy policy</a>.\n </div>\n\n\n \x3c!-- Place Order --\x3e\n <div id="place-order">\n <div id="place-order-button" class="button continue-button" value="Place Order" >'+ k((h=(h=b.strings,null==h||!1===h?h:h.submitText),"function"===typeof h?h.apply(b):h))+'</div>\n\n <div class="wait-in-queue-message" style="display: none">\n Due to heavy traffic, your payment will be accepted shortly. Please don\'t hit the "back" button or leave the page.\n </div>\n\n \x3c!-- hidden field to convey the Stripe Token so we may submit the charge --\x3e\n <input name="stripeToken" type="hidden" />\n\n \x3c!-- optional hidden fields --\x3e\n ';if((f=e.each.call(b, b.optionalHiddenFields,{hash:{},inverse:this.noop,fn:this.program(3,function(a,b){var c;return c=""+('\n <input name="'+k("function"===typeof a?a.apply(a):a)+'" type="hidden" />\n ')},g),data:g}))||0===f)a+=f;return a+="\n\n </div>\n\n</fieldset>\n"})})();b.Handlebars.registerPartial("checkout-form-payment.html".replace("/","."),f.templates["checkout-form-payment.html"])},"1.0",{requires:["handlebars-base"]})},1564:function(k,m){YUI.add("squarespace-checkout-form-shipping-info-template", function(b){var f=b.Handlebars;(function(){var a=f.template;(f.templates=f.templates||{})["checkout-form-shipping-info.html"]=a(function(a,b,e,h,g){function f(a,b){return'checked="checked"'}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,a.helpers);g=g||{};var k,l=this;a='<div class="title">\n Contact & Shipping\n <a class="edit-button">edit</a>\n</div>\n\n<fieldset>\n\n <div class="subtitle contact-info-subtitle">Your Email Address</div>\n \x3c!-- Email Address --\x3e\n <div id="email" data-label="Email Address" class="field email required">\n <label>Email Address</label>\n <input name="email" class="field-element" placeholder="Email"\n x-autocompletetype="email" type="email" spellcheck="false" maxlength="50" type="email" />\n </div>\n <div class="description">Receipts and notifications will be sent to this email address.</div>\n\n '; if((b=e["if"].call(b,(k=b.optionalFields,null==k||!1===k?k:k.showMailingList),{hash:{},inverse:l.noop,fn:l.program(1,function(a,b){var c,d;c='\n \x3c!-- Mailchimp (optional) --\x3e\n <div class="join-mailing-list">\n <label>\n <input type="checkbox" name="joinMailingList" class="field-element" ';if((d=e["if"].call(a,a.enableMailingListOptInByDefault,{hash:{},inverse:l.noop,fn:l.program(2,f,b),data:b}))||0===d)c+=d;return c+' value="true"></input>\n Join our mailing list\n </label>\n </div>\n '}, g),data:g}))||0===b)a+=b;return a+'\n\n <div class="subtitle shipping-address-subtitle">Shipping Address</div>\n\n \x3c!-- Shipping Address --\x3e\n <div id="shipping-address-wrapper">\n\n <div class="shipping-fields">\n\n \x3c!-- First Name --\x3e\n <div id="shipping-first-name" data-label="First Name" class="field first-name required">\n <label>First Name</label>\n <input name="shippingFirstName" class="field-element"\n placeholder="First Name" x-autocompletetype="given-name" type="text" spellcheck="false" maxlength="30" />\n </div>\n\n\n \x3c!-- Last Name --\x3e\n <div id="shipping-last-name" data-label="Last Name" class="field last-name required">\n <label>Last Name</label>\n <input name="shippingLastName" class="field-element" placeholder="Last Name"\n x-autocompletetype="surname" type="text" spellcheck="false" maxlength="30" />\n </div>\n\n\n \x3c!-- Shipping Address 1 --\x3e\n <div id="shipping-address-1" data-label="Address Line 1" class="field address required">\n <label>Address Line 1</label>\n <input name="shippingAddress1" class="field-element address-line1" type="text"\n x-autocompletetype="address-line1" placeholder="Street Address 1" spellcheck="false" maxlength="50" />\n </div>\n\n\n \x3c!-- Shipping Address 2 --\x3e\n <div id="shipping-address-2" data-label="Address Line 2" class="field address">\n <label>Address Line 2</label>\n <input name="shippingAddress2" class="field-element address-line2" type="text"\n placeholder="Street Address 2" x-autocompletetype="address-line2" spellcheck="false" maxlength="50" />\n </div>\n\n\n \x3c!-- Country --\x3e\n <div id="shipping-country" data-label="Country" class="field country required">\n <label>Country</label>\n <select name="shippingCountry" class="field-element"\n x-autocompletetype="country-name">\n </select>\n </div>\n\n\n \x3c!-- City --\x3e\n <div id="shipping-city" data-label="City" class="field city required">\n <label>City</label>\n <input name="shippingCity" class="field-element" placeholder="City"\n x-autocompletetype="city" type="text" spellcheck="false" maxlength="30" />\n </div>\n\n\n \x3c!-- State/Province --\x3e\n <div id="shipping-state" data-label="State/Province" class="field state required">\n <label>State/Province</label>\n <select name="shippingState" class="field-element"\n x-autocompletetype="state">\n </select>\n </div>\n\n\n \x3c!-- Zip Code --\x3e\n <div id="shipping-zip" data-label="Zip Code" class="field zip required">\n <label>Zip / Postal</label>\n <input name="shippingZip" class="field-element"\n x-autocompletetype="postal-code" placeholder="Zip / Postal" type="text" spellcheck="false" maxlength="10" />\n </div>\n\n <div id="phone" data-label="Phone Number" class="field phone">\n <label>Phone Number</label>\n <input name="phone" class="field-element" placeholder="Phone Number"\n x-autocompletetype="phone" spellcheck="false" maxlength="20" type="tel" />\n </div>\n\n </div>\n\n\n </div> \x3c!-- end #shipping-address --\x3e\n\n\n\n \x3c!-- Continue --\x3e\n <div class="btn-container">\n <div class="button continue-button">Continue</div>\n </div>\n\n</fieldset>\n'})})(); b.Handlebars.registerPartial("checkout-form-shipping-info.html".replace("/","."),f.templates["checkout-form-shipping-info.html"])},"1.0",{requires:["handlebars-base"]})},1565:function(k,m){YUI.add("squarespace-checkout-saved-contribution-template",function(b){var f=b.Handlebars;(function(){var a=f.template;(f.templates=f.templates||{})["checkout-saved-contribution.html"]=a(function(a,b,e,h,g){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,a.helpers);g=g||{};var f=this.escapeExpression;a='<div class="saved-fieldset">\n\n You will donate '; (h=e.donationAmount)?h=h.call(b,{hash:{},data:g}):(h=b.donationAmount,h="function"===typeof h?h.apply(b):h);if(h||0===h)a+=h;a+=" to ";(h=e.title)?h=h.call(b,{hash:{},data:g}):(h=b.title,h="function"===typeof h?h.apply(b):h);return a+=f(h)+"\n\n</div>\n"})})();b.Handlebars.registerPartial("checkout-saved-contribution.html".replace("/","."),f.templates["checkout-saved-contribution.html"])},"1.0",{requires:["handlebars-base"]})},1566:function(k,m){YUI.add("squarespace-checkout-saved-custom-form-template", function(b){var f=b.Handlebars;(function(){var a=f.template;(f.templates=f.templates||{})["checkout-saved-custom-form.html"]=a(function(a,b,e,h,g){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,a.helpers);g=g||{};a='<div class="saved-fieldset">\n\n ';if((b=e.each.call(b,b.fields,{hash:{},inverse:this.noop,fn:this.program(1,function(a,b){var c,e;c="\n <div>\n ";if((e="function"===typeof a?a.apply(a):a)||0===e)c+=e;return c+"\n </div> \n "},g),data:g}))||0===b)a+=b;return a+"\n\n</div>\n"})})(); b.Handlebars.registerPartial("checkout-saved-custom-form.html".replace("/","."),f.templates["checkout-saved-custom-form.html"])},"1.0",{requires:["handlebars-base"]})},1567:function(k,m){YUI.add("squarespace-checkout-saved-shipping-info-template",function(b){var f=b.Handlebars;(function(){var a=f.template;(f.templates=f.templates||{})["checkout-saved-shipping-info.html"]=a(function(a,b,e,h,g){function f(a,b){var c;(c=e.shippingCity)?c=c.call(a,{hash:{},data:b}):(c=a.shippingCity,c=typeof c===n?c.apply(a): c);return p(c)}function k(a,b){var c,d;c=", ";(d=e.shippingState)?d=d.call(a,{hash:{},data:b}):(d=a.shippingState,d=typeof d===n?d.apply(a):d);return c+=p(d)}function l(a,b){var c,d;c=" ";(d=e.shippingZip)?d=d.call(a,{hash:{},data:b}):(d=a.shippingZip,d=typeof d===n?d.apply(a):d);return c+=p(d)}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,a.helpers);g=g||{};var m,n="function",p=this.escapeExpression,u=this;h=e.blockHelperMissing;a='<div class="saved-fieldset">\n\n ';m={hash:{}, inverse:u.noop,fn:u.program(1,function(a,b){var c,d;c='\n\n <div class="subtitle">Your Email Address</div>\n <div>';(d=e.email)?d=d.call(a,{hash:{},data:b}):(d=a.email,d=typeof d===n?d.apply(a):d);c+=p(d)+'</div>\n <br />\n \n\n <div class="subtitle">Shipping Address</div>\n <div>\n ';(d=e.shippingFirstName)?d=d.call(a,{hash:{},data:b}):(d=a.shippingFirstName,d=typeof d===n?d.apply(a):d);c+=p(d)+" ";(d=e.shippingLastName)?d=d.call(a,{hash:{},data:b}):(d=a.shippingLastName, d=typeof d===n?d.apply(a):d);c+=p(d)+"\n </div>\n <div>";(d=e.shippingAddress1)?d=d.call(a,{hash:{},data:b}):(d=a.shippingAddress1,d=typeof d===n?d.apply(a):d);c+=p(d)+"</div>\n <div>";(d=e.shippingAddress2)?d=d.call(a,{hash:{},data:b}):(d=a.shippingAddress2,d=typeof d===n?d.apply(a):d);c+=p(d)+"</div>\n\n <div>\n ";if((d=e["if"].call(a,a.shippingCity,{hash:{},inverse:u.noop,fn:u.program(2,f,b),data:b}))||0===d)c+=d;if((d=e["if"].call(a,a.shippingState,{hash:{},inverse:u.noop,fn:u.program(4, k,b),data:b}))||0===d)c+=d;if((d=e["if"].call(a,a.shippingZip,{hash:{},inverse:u.noop,fn:u.program(6,l,b),data:b}))||0===d)c+=d;c+="\n </div>\n\n <div>";(d=e.shippingCountry)?d=d.call(a,{hash:{},data:b}):(d=a.shippingCountry,d=typeof d===n?d.apply(a):d);c+=p(d)+"</div>\n <div>";(d=e.phone)?d=d.call(a,{hash:{},data:b}):(d=a.phone,d=typeof d===n?d.apply(a):d);return c+=p(d)+"</div>\n\n <br />\n\n "},g),data:g};(g=e.requiresShipping)?g=g.call(b,m):(g=b.requiresShipping,g=typeof g===n?g.apply(b): g);e.requiresShipping||(g=h.call(b,g,m));if(g||0===g)a+=g;return a+"\n\n</div>\n"})})();b.Handlebars.registerPartial("checkout-saved-shipping-info.html".replace("/","."),f.templates["checkout-saved-shipping-info.html"])},"1.0",{requires:["handlebars-base"]})},1570:function(k,m){YUI.add("squarespace-contribution-summary-template",function(b){var f=b.Handlebars;(function(){var a=f.template;(f.templates=f.templates||{})["contribution-summary.html"]=a(function(a,b,e,h,g){function f(a,b){var c,d;c="\n<p>\n "; (d=e.description)?d=d.call(a,{hash:{},data:b}):(d=a.description,d=typeof d===p?d.apply(a):d);return c+=u(d)+"\n</p>\n"}function k(a,b){var c,d;c='\n <div class="suggested-contributions">\n ';if((d=e.each.call(a,a.suggestedContributions,{hash:{},inverse:t.noop,fn:t.program(5,l,b),data:b}))||0===d)c+=d;return c+'\n\n <div class="option">\n <input type="radio" name="contribution" id="other" value="other" />\n <label for="other">Other \n <input type="text" placeholder="Enter Other Amount" name="contributionAmount" />\n </label>\n <br />\n </div>\n </div>\n '} function l(a,b){var c,d;c='\n <div class="option">\n <input type="radio" name="contribution" id="';(d=e.amountCents)?d=d.call(a,{hash:{},data:b}):(d=a.amountCents,d=typeof d===p?d.apply(a):d);c+=u(d)+'" value="';(d=e.amountCents)?d=d.call(a,{hash:{},data:b}):(d=a.amountCents,d=typeof d===p?d.apply(a):d);c+=u(d)+'" />\n <label for="';(d=e.amountCents)?d=d.call(a,{hash:{},data:b}):(d=a.amountCents,d=typeof d===p?d.apply(a):d);c+=u(d)+'"><span class="sqs-money-native">'; (d=e.amountDollars)?d=d.call(a,{hash:{},data:b}):(d=a.amountDollars,d=typeof d===p?d.apply(a):d);c+=u(d)+"</span> ";if((d=e["if"].call(a,a.label,{hash:{},inverse:t.noop,fn:t.program(6,m,b),data:b}))||0===d)c+=d;return c+"</label><br />\n </div>\n "}function m(a,b){var c,d;c="(";(d=e.label)?d=d.call(a,{hash:{},data:b}):(d=a.label,d=typeof d===p?d.apply(a):d);return c+=u(d)+")"}function n(a,b){return'\n \n <input type="text" placeholder="Enter Other Amount" name="contributionAmount" /><br />\n '} this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,a.helpers);g=g||{};a="";var p="function",u=this.escapeExpression,t=this;if((b=e["with"].call(b,b.donatePage,{hash:{},inverse:t.noop,fn:t.program(1,function(a,b){var c,d;c='\n\n<div class="title">Your Contribution<a class="edit-button">edit</a></div>\n\n<fieldset>\n\n';if((d=e["if"].call(a,a.description,{hash:{},inverse:t.noop,fn:t.program(2,f,b),data:b}))||0===d)c+=d;c+='\n\n<div class="choices">\n\n <div class="title prompt"></div>\n <div class="contribution-option-list">\n\n \n '; if((d=e["if"].call(a,a.suggestedContributions,{hash:{},inverse:t.program(8,n,b),fn:t.program(4,k,b),data:b}))||0===d)c+=d;return c+'\n\n </div>\n\n</div>\n\n\n\x3c!-- Continue --\x3e\n<div class="btn-container">\n <div class="button continue-button">Continue</div>\n</div>\n\n</fieldset>\n'},g),data:g}))||0===b)a+=b;return a+"\n"})})();b.Handlebars.registerPartial("contribution-summary.html".replace("/","."),f.templates["contribution-summary.html"])},"1.0",{requires:["handlebars-base"]})},1586:function(k, m){YUI.add("squarespace-full-page-shopping-cart-item-template",function(b){var f=b.Handlebars;(function(){var a=f.template;(f.templates=f.templates||{})["full-page-shopping-cart-item.html"]=a(function(a,b,e,h,g){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,a.helpers);g=g||{};a='<tr>\n\n <td class="item">\n <div class="item-image"></div>\n </td>\n\n <td class="item-desc"></td>\n\n <td class="quantity">\n ';if((b=e["if"].call(b,b.isPhysicalProduct,{hash:{},inverse:this.program(3,function(a, b){return'\n <div class="not-applicable">N/A</div>\n '},g),fn:this.program(1,function(a,b){return'\n <input />\n <div class="cooldown">•</div>\n '},g),data:g}))||0===b)a+=b;return a+'\n </td>\n\n <td class="price"></td>\n\n <td class="remove">\n <div class="remove-item">\u00d7</div>\n </td>\n\n</tr>\n'})})();b.Handlebars.registerPartial("full-page-shopping-cart-item.html".replace("/","."),f.templates["full-page-shopping-cart-item.html"])},"1.0",{requires:["handlebars-base"]})}, 1587:function(k,m){YUI.add("squarespace-full-page-shopping-cart-template",function(b){var f=b.Handlebars;(function(){var a=f.template;(f.templates=f.templates||{})["full-page-shopping-cart.html"]=a(function(a,b,e,h,g){this.compilerInfo=[4,">= 1.0.0"];this.merge(e,a.helpers);return'<div class="loading-spinner"></div>\n\n<h2>Shopping Cart</h2>\n\n<div class="cart-container">\n\n <table>\n\n <thead> \n <tr>\n <td class="item">Item</td>\n <td></td>\n <td class="quantity">Quantity</td>\n <td class="price">Price</td>\n <td></td>\n </tr>\n </thead>\n\n <tbody></tbody>\n\n </table>\n\n <div class="subtotal">\n <span class="label">Subtotal</span>\n <span class="price"></span>\n </div>\n\n <div class="checkout">\n <div class="checkout-button sqs-system-button sqs-editable-button">CHECKOUT</div>\n </div>\n\n</div>\n\n<div class="empty-message">\n You have nothing in your shopping cart. \n <a href="/">Continue Shopping</a>\n</div>\n'})})(); b.Handlebars.registerPartial("full-page-shopping-cart.html".replace("/","."),f.templates["full-page-shopping-cart.html"])},"1.0",{requires:["handlebars-base"]})},1588:function(k,m){YUI.add("squarespace-pill-shopping-cart-template",function(b){var f=b.Handlebars;(function(){var a=f.template;(f.templates=f.templates||{})["pill-shopping-cart.html"]=a(function(a,b,e,h,g){this.compilerInfo=[4,">= 1.0.0"];this.merge(e,a.helpers);return'<div class="icon"></div>\n\n<div class="details">\n Cart - \n <span class="total-quantity"></span>\n <span class="suffix"></span>\n</div>\n\n<span class="subtotal">\n <span class="price"></span>\n</span>\n'})})(); b.Handlebars.registerPartial("pill-shopping-cart.html".replace("/","."),f.templates["pill-shopping-cart.html"])},"1.0",{requires:["handlebars-base"]})},1589:function(k,m){YUI.add("squarespace-shipping-options-list-option-template",function(b){var f=b.Handlebars;(function(){var a=f.template;(f.templates=f.templates||{})["shipping-options-list-option.html"]=a(function(a,b,e,h,g){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,a.helpers);g=g||{};var f=this.escapeExpression,k=e.helperMissing;a='<div class="shipping-option '; if((h=e["if"].call(b,b.showAlert,{hash:{},inverse:this.noop,fn:this.program(1,function(a,b){return"disabled"},g),data:g}))||0===h)a+=h;a+='">\n\n <div class="option">\n\n <label class="shipping-option-label">\n\n <input type="radio" value="';(h=e.id)?h=h.call(b,{hash:{},data:g}):(h=b.id,h="function"===typeof h?h.apply(b):h);a+=f(h)+'" title="';(h=e.name)?h=h.call(b,{hash:{},data:g}):(h=b.name,h="function"===typeof h?h.apply(b):h);a+=f(h)+'" data-computed-cost="';(h=e.computedCost)?h=h.call(b, {hash:{},data:g}):(h=b.computedCost,h="function"===typeof h?h.apply(b):h);a+=f(h)+'"\n name="selectedShippingOption" ';if((h=e["if"].call(b,b.showAlert,{hash:{},inverse:this.noop,fn:this.program(3,function(a,b){return'disabled="true"'},g),data:g}))||0===h)a+=h;a+=' />\n <span class="option-name" title="';(h=e.name)?h=h.call(b,{hash:{},data:g}):(h=b.name,h="function"===typeof h?h.apply(b):h);a+=f(h)+'">';(h=e.name)?h=h.call(b,{hash:{},data:g}):(h=b.name,h="function"===typeof h?h.apply(b): h);a+=f(h)+'</span>\n\n <div class="shipping-failure">\n <img src="../../universal/images-v6/dialog/tiny-alert-inverted.png" />\n </div>\n\n <span class="cost">— <strong>';g={hash:{},data:g};return a+=f((h=e["money-string"]||b["money-string"],h?h.call(b,b.computedCost,g):k.call(b,"money-string",b.computedCost,g)))+"</strong></span>\n\n </label>\n\n </div>\n\n</div>"})})();b.Handlebars.registerPartial("shipping-options-list-option.html".replace("/","."),f.templates["shipping-options-list-option.html"])}, "1.0",{requires:["handlebars-base"]})},1590:function(k,m){YUI.add("squarespace-shipping-options-list-template",function(b){var f=b.Handlebars;(function(){var a=f.template;(f.templates=f.templates||{})["shipping-options-list.html"]=a(function(a,b,e,h,g){this.compilerInfo=[4,">= 1.0.0"];this.merge(e,a.helpers);return'<div class="empty-message">\n You cannot continue checkout because this store has not configured any\n shipping options for your country.\n</div>\n\n<div class="loading-spinner"></div>\n<div class="options-container"></div>\n'})})(); b.Handlebars.registerPartial("shipping-options-list.html".replace("/","."),f.templates["shipping-options-list.html"])},"1.0",{requires:["handlebars-base"]})},1939:function(k,m){YUI.add("squarespace-checkout-form-address",function(b){b.namespace("Squarespace.Widgets");var f=b.Squarespace.Localities,a=f.COUNTRY_OPTIONS.US,c=f.COUNTRY_OPTIONS.CA,d=b.Squarespace.Widgets.CheckoutFormAddress=b.Base.create("checkoutFormAddress",b.Squarespace.Widgets.CheckoutFormSection,[],{renderUI:function(){d.superclass.renderUI.call(this); try{this._autoComplete=new b.Squarespace.Widgets.GooglePlacesAutocomplete({inputNode:this.get("contentBox").one("input.address-line1"),render:!0,countriesAllowed:this.get("countriesAllowed")})}catch(a){console.error(a)}},bindUI:function(){d.superclass.bindUI.call(this);this._bindUseAddressForShippingChange();this._bindZipChange();this._bindCountryChange();this._bindStateChange();try{this._bindGoogleAutoComplete()}catch(a){console.error(a)}},syncUI:function(){d.superclass.syncUI.call(this);this._populateCountrySelect(); this._updateStateFieldForSelectedCountry();this._syncRequiredFieldsForSelectedCountry()},setValues:function(a){d.superclass.setValues.call(this,a);this.get("useAddressForShipping")&&this.fire("shippingLocationChange")},_bindUseAddressForShippingChange:function(){this.after("useAddressForShippingChange",function(a){!0===a.newVal&&this.fire("shippingLocationChange")},this)},_bindZipChange:function(){this.get("contentBox").one(".zip input").after("change",function(){this.get("useAddressForShipping")&& this.fire("shippingLocationChange")},this)},_bindCountryChange:function(){this.get("contentBox").one(".country select").after("change",function(){this.syncUI();this.get("useAddressForShipping")&&this.fire("shippingLocationChange")},this)},_bindStateChange:function(){this.get("contentBox").delegate("change",function(){this.get("useAddressForShipping")&&this.fire("shippingLocationChange")},".state .field-element",this)},_bindGoogleAutoComplete:function(){this._autoComplete.on("placeDetails",function(a){this._setSelectedCountry(a.place.country); this.syncUI();this._populateFieldsFromAc(a.place)},this);this._autoComplete.on(["keyboardContinue","listMouseUp"],function(){this.get("contentBox").one("input.address-line2").focus()},this)},_getSelectedCountry:function(){return this.get("contentBox").one(".country select").get("value")},_setSelectedCountry:function(a){this.get("contentBox").one(".country select").set("value",a)},_getSelectedState:function(){return this.get("contentBox").one(".state select").get("value")},_countryRequiresStateAndZip:function(b){return b=== a.title||b===c.title},_shouldValidateStateZipEnclosure:function(){return this._getSelectedCountry()===a.title},_syncRequiredFieldsForSelectedCountry:function(){this.get("contentBox").all(".state, .zip").toggleClass("required",this._countryRequiresStateAndZip(this._getSelectedCountry()))},_zipFieldIsInvalid:function(b){var c=/^\d{5}(-\d{4})?$/;return this._getSelectedCountry()===a.title?!c.test(b.one(".field-element").get("value").trim()):!1},_emailFieldIsInvalid:function(a){return!b.Squarespace.EmailUtils.isValid(a.one(".field-element").get("value"))}, _validateField:function(a){var b=d.superclass._validateField.call(this,a);if(b)return b;if(a.hasClass("zip")&&this._zipFieldIsInvalid(a)||a.hasClass("email")&&this._emailFieldIsInvalid(a))return{type:this.getProperty("FIELD_ERROR_TYPES").VALIDATION,field:a}},_buildSingleOptionString:function(a){return'<option value="'+a+'">'+a+"</option>"},_buildOptionString:function(a){return b.Array.reduce(a,"",function(a,b){return"Not Specified"===b?a:a+this._buildSingleOptionString(b)},this)},_getCountryTitles:function(){var a= b.Array.filter(b.Object.values(f.COUNTRY_OPTIONS),function(a){return!a.empty});return b.Array.map(a,function(a){return a.title})},_getStateCodesForSelectedCountry:function(){var a=f.countryCodeFromName(this._getSelectedCountry());if(""===a||!b.Lang.isValue(a))a="US";a=f.COUNTRIES_TO_STATES[a];return b.Lang.isValue(a)?(a=b.Object.keys(a),a.sort(),a):[]},_fetchAsyncValidatedErrors:function(){var a=this.getLocationForShipping();return!this._shouldValidateStateZipEnclosure()?b.when([]):new b.Promise(b.bind(function(c){b.Data.get({url:b.Squarespace.API_ROOT+ "commerce/shipping/address/validate",headers:{"Content-Type":"application/json"},data:{state:a.state,zip:a.zip},success:b.bind(function(a){a.stateOwnsZip?c([]):c([{type:this.getProperty("FIELD_ERROR_TYPES").CUSTOM,message:"ZIP Code does not belong to that State."}])},this)})},this))},_populateCountrySelect:function(){var c=this.get("contentBox").one(".country select"),d=this._getSelectedCountry(),g=this.get("countriesAllowed");c.empty();0===g.length?c.setHTML(this._buildSingleOptionString(a.title)): (c.setHTML(this._buildOptionString(g)),-1!==b.Array.indexOf(g,d)?c.set("value",d):-1!==b.Array.indexOf(g,a.title)?c.set("value",a.title):c.set("value",g[0]))},_updateStateFieldForSelectedCountry:function(a){var c=this.get("contentBox").one(".state .field-element");a=b.Lang.isValue(a)?f.countryCodeFromName(a):f.countryCodeFromName(this._getSelectedCountry());var d;f.COUNTRIES_TO_STATES[a]?c.test("select")||(d=b.Node.create('<select class="field-element state required" name="'+c.getAttribute("name")+ '"></select>')):c.test("input")||(d=b.Node.create('<input class="field-element state" placeholder="State" name="'+c.getAttribute("name")+'" />'));d&&(d.plug(b.Squarespace.Plugin.PulseWarn,{iterations:1,useClass:!0,targetClass:"warn",interval:1300}),c.replace(d),c=d);if(c.test("select")){d=this._getSelectedState();a=this._getStateCodesForSelectedCountry();c.empty();var q=this._buildSingleOptionString("")+this._buildOptionString(a);c.setHTML(q);-1!==b.Array.indexOf(a,d)&&c.set("value",d)}}},{CSS_PREFIX:"sqs-checkout-form-address", ATTRS:{strings:{value:null},countriesAllowed:{value:[]},getCountriesAllowed:{value:function(){}},useAddressForShipping:{value:!1}}})},"1.0",{requires:"autocomplete cookie node squarespace-email-utils squarespace-localities squarespace-util squarespace-checkout-form-section squarespace-widgets-google-places-autocomplete".split(" ")})},1940:function(k,m,b){var f=b(233);YUI.add("squarespace-checkout-form-custom-form",function(a){a.namespace("Squarespace.Widgets");var b=a.Squarespace.Widgets.CheckoutCustomForm= a.Base.create("CheckoutCustomForm",a.Squarespace.Widgets.CheckoutFormSection,[],{renderUI:function(){b.superclass.renderUI.call(this);var d=this.get("contentBox");a.Data.get({url:"/api/template/GetTemplateSchema",data:{componentType:"widget",type:f.FORM},success:function(b){this._formWidget=new a.Squarespace.Widgets.AsyncForm({form:this.get("customForm"),formTemplate:b,formSubmitButtonText:"Submit",hideSubmitButton:!0,showTitle:!1});this._formWidget.render(d.one(".custom-form"))}},this)},syncUI:function(){b.superclass.syncUI.call(this); this.get("boundingBox").toggleClass("no-form",0===this.get("customForm").fields.length)},_renderSavedFieldset:function(b){var c=this.getProperty("HANDLEBARS_SAVED_FIELDSET_TEMPLATE"),h=this.get("formId");this._formWidget.fetchValidatedFormSubmission(h,a.bind(function(g){var h=[];a.Object.each(g,function(b,c){h.push(a.Squarespace.Commerce.summaryFormFieldString(b))});this.get("contentBox").append(a.Squarespace.UITemplates.render(c,{fields:h}));b.call(this)},this))},_getLocalErrors:function(){return[]}, _fetchAsyncValidatedErrors:function(){return new a.Promise(a.bind(function(b){this._formWidget.fetchValidatedFormSubmission(this.get("formId"),function(){b([])},a.bind(function(c){var h=a.Array.map(a.Object.keys(c.errors),function(a){return{type:this.getProperty("FIELD_ERROR_TYPES").FORM_FIELD,fieldId:a,message:c.errors[a]}},this);h.push({type:this.getProperty("FIELD_ERROR_TYPES").CUSTOM,message:"Your form has encountered a problem. Please scroll up to review."});h.push({type:this.getProperty("FIELD_ERROR_TYPES").HEADER, message:"Your form has encountered a problem. Please scroll down to review."});b(h)},this))},this))},getCustomFormSubmission:function(){return a.Lang.isValue(this._formWidget)?this._formWidget.getFormData():null}},{CSS_PREFIX:"sqs-checkout-form-custom-form",HANDLEBARS_TEMPLATE:"checkout-form-custom-form.html",HANDLEBARS_SAVED_FIELDSET_TEMPLATE:"checkout-saved-custom-form.html",ATTRS:{"strings.name":{value:"More"},customForm:{value:{fields:[]},validator:a.Lang.isValue},formId:{value:null}}})},"1.0", {requires:"base node squarespace-localities squarespace-util squarespace-checkout-form-section squarespace-checkout-saved-custom-form-template squarespace-checkout-form-custom-form-template squarespace-mixins-google-places-autocomplete".split(" ")})},1941:function(k,m){YUI.add("squarespace-checkout-form-customer-info",function(b){b.namespace("Squarespace.Widgets");b.Squarespace.Widgets.CheckoutFormCustomerInfo=b.Base.create("CheckoutFormCustomerInfo",b.Base,[],{_bindCustomerInfoEvents:function(){var b= this.get("contentBox").one('input[name="email"]');b&&this._registerEvent(b.on("blur",this._handleEmailBlur,this))},_handleEmailBlur:function(f){f=(f=f.target)&&f.get("value").trim();if(b.Squarespace.EmailUtils.isValid(f)){var a=this.get("model");null!==a&&a.updateCustomerInfo(f)}}},{})},"1.0",{requires:["base","node"]})},1942:function(k,m,b){var f=b(350);YUI.add("squarespace-checkout-form-payment",function(a){a.namespace("Squarespace.Widgets");var b=a.Squarespace.Widgets.CheckoutFormPayment=a.Base.create("checkoutFormPayment", a.Squarespace.Widgets.CheckoutFormAddress,[],{initializer:function(){this.get("requiresShipping")||this.set("useAddressForShipping",!0)},renderUI:function(){b.superclass.renderUI.call(this);var d=this.get("contentBox");this._creditCardInputs={cardNumber:d.one("#card-number input"),cardExpiryMonth:d.one("#card-expiry-month select"),cardExpiryYear:d.one("#card-expiry-year select"),cvc:d.one("#cvc input")};this._creditCardFields={cardNumber:d.one("#card-number"),cardExpiryMonth:d.one("#card-expiry-month"), cardExpiryYear:d.one("#card-expiry-year"),cvc:d.one("#cvc")};this._hiddenInputs={cardHolderName:d.one('input[name="cardHolderName"]'),stripeToken:d.one('input[name="stripeToken"]')};a.Array.each(this.get("optionalHiddenFields"),function(b){var c=d.one('input[name="'+b+'"]');if(a.Lang.isValue(c))this._hiddenInputs[b]=c;else throw Error("Optional hidden field input element could not be found.");},this);this._toggleLockedFields();this._syncBillingFieldsWithCheckbox()},bindUI:function(){b.superclass.bindUI.call(this); this.after("inTestModeChange",this._toggleLockedFields,this);this.get("requiresShipping")&&this.get("contentBox").one('input[name="billToShipping"]').after("change",this._syncBillingFieldsWithCheckbox,this);this.after("stateChange",this._syncBillingFieldsWithCheckbox,this);this.after("paymentRequiredChange",this.syncUI,this);this._bindLockedToolTip()},syncUI:function(){b.superclass.syncUI.call(this);this._toggleRequiredFields()},_syncBillingFieldsWithCheckbox:function(){var a=this.get("contentBox").one("#billing-address"); if(this.get("isLinkedToShipping")){var b=this.get("shippingSection").getValues();this._updateStateFieldForSelectedCountry(b.shippingCountry);this._syncRequiredFieldsForSelectedCountry();this.setValues({billingFirstName:b.shippingFirstName,billingLastName:b.shippingLastName,billingAddress1:b.shippingAddress1,billingAddress2:b.shippingAddress2,billingCity:b.shippingCity,billingState:b.shippingState,billingZip:b.shippingZip,billingCountry:b.shippingCountry});a.toggleClass("locked",!0);a.all("input, select").each(function(a){a.setAttribute("readonly", !0);a.setAttribute("disabled","disabled")})}else a.toggleClass("locked",!1),a.all("input, select").each(function(a){a.removeAttribute("readonly");a.removeAttribute("disabled")}),this.setValues({billingFirstName:"",billingLastName:"",billingAddress1:"",billingAddress2:"",billingCity:"",billingState:"",billingZip:""})},setCreditCardValues:function(b){a.Object.each(b,a.bind(function(a,b){this._setFieldValue(this._creditCardInputs[b],a)},this))},getCreditCardValues:function(){return this._extractValuesFromFields(this._creditCardInputs)}, setHiddenValues:function(b){a.Object.each(b,a.bind(function(a,b){this._setFieldValue(this._hiddenInputs[b],a)},this))},getValues:function(){var a=b.superclass.getValues.call(this);this._extractValuesFromFields(this._hiddenInputs);if(this.get("isLinkedToShipping")){var e=this.get("shippingSection").getValues();a.cardHolderName=e.shippingFirstName+" "+e.shippingLastName}else a.cardHolderName=a.billingFirstName+" "+a.billingLastName;return a},_extractValuesFromFields:function(b){return a.Array.hash(a.Object.keys(b), a.Array.map(a.Object.values(b),function(a){return a.get("value")}))},getLocationForShipping:function(){var a=this.getValues();return{country:a.billingCountry,state:a.billingState,zip:a.billingZip}},_getSelectedCountry:function(){return this.get("isLinkedToShipping")?this.get("shippingSection").getValues().shippingCountry:this.getValues().billingCountry},_onContinue:function(){this.fire("continue")},_populateFieldsFromAc:function(a){this.setValues({billingAddress1:a.address,billingCountry:a.country, billingCity:a.city,billingState:a.state,billingZip:a.zip})},_toggleRequiredFields:function(){var a=this.get("paymentRequired"),b=this._creditCardFields;b.cvc.toggleClass("required",a);b.cardNumber.toggleClass("required",a)},_toggleLockedFields:function(){var a=this.get("inTestMode"),b=this.get("storeState")===f.NOT_CONNECTED,c=this.get("contentBox"),g=this._creditCardInputs,q=this._creditCardInputs.cardNumber;c.one("#credit-card").toggleClass("locked",a||b);a||b?(this.setCreditCardValues({cardNumber:"4242424242424242", cardExpiryMonth:"4",cardExpiryYear:(new Date).getFullYear()+1,cvc:"323"}),q.setAttribute("readonly",!0),g.cardExpiryMonth.setAttribute("disabled","disabled"),g.cardExpiryYear.setAttribute("disabled","disabled"),g.cvc.setAttribute("readonly",!0)):(this.setCreditCardValues({cardNumber:"",cardExpiryMonth:(new Date).getMonth(),cardExpiryYear:(new Date).getFullYear(),cvc:""}),q.removeAttribute("readonly"),g.cardExpiryMonth.removeAttribute("disabled"),g.cardExpiryYear.removeAttribute("disabled"),g.cvc.removeAttribute("readonly"))}, _bindLockedToolTip:function(){this._creditCardInputs.cardNumber.on("click",function(){var b=this.get("contentBox").one("#credit-card");this.get("inTestMode")&&new a.Squarespace.Widgets.Information({"strings.title":"Store Not Live","strings.message":'This store has not yet gone live. You may try the checkout process and place a test order. We have prefilled a "Test" credit card number for you.',hideAfterTime:7E3,position:a.Squarespace.Widgets.Confirmation.ANCHOR.ELEMENT,anchor:b});this.get("storeState")=== f.NOT_CONNECTED&&new a.Squarespace.Widgets.Information({"strings.title":"Payments Not Connected","strings.message":"A payment gateway is not connected. Checkout will be disabled. Please go to Store Settings to connect Stripe.",hideAfterTime:7E3,position:a.Squarespace.Widgets.Confirmation.ANCHOR.ELEMENT,anchor:b})},this)},showQueueExplanation:function(){this.get("contentBox").one(".wait-in-queue-message").show()},lock:function(){this.get("contentBox").one("#place-order-button").setContent(this.get("strings.pendingText")).set("disabled", !0)},unlock:function(){this.get("contentBox").one("#place-order-button").setContent(this.get("strings.submitText")).set("disabled",!1)}},{CSS_PREFIX:"sqs-checkout-form-payment",HANDLEBARS_TEMPLATE:"checkout-form-payment.html",ATTRS:{strings:{value:{submitText:"Place Order",pendingText:"Placing Order ..."}},optionalHiddenFields:{value:[]},isLinkedToShipping:{getter:function(){return this.get("requiresShipping")&&this.get("billToShippingAddress")}},billToShippingAddress:{getter:function(){var b=this.get("contentBox").one('input[name="billToShipping"]'); return!a.Lang.isValue(b)?!1:b.get("checked")}},inTestMode:{validator:a.Squarespace.AttrValidators.isBoolean},storeState:{value:null},shippingSection:{value:null},requiresShipping:{value:!1},paymentRequired:{value:!0}}})},"1.0",{requires:"base node squarespace-attr-validators squarespace-basic-check squarespace-hb-date-options squarespace-checkout-form-section squarespace-checkout-form-payment-template squarespace-widgets-information".split(" ")})},1943:function(k,m){YUI.add("squarespace-checkout-form-section", function(b){b.namespace("Squarespace.Widgets");var f=b.Squarespace.Widgets.CheckoutFormSection=b.Base.create("checkoutFormSection",b.Squarespace.Widgets.SSWidget,[],{initializer:function(){this.publish("continue-clicked",{preventable:!0,defaultFn:this._onContinue})},renderUI:function(){f.superclass.renderUI.call(this);Modernizr&&!Modernizr.input.placeholder&&this.get("boundingBox").addClass("show-labels");this.get("contentBox").all(".field-element").plug(b.Squarespace.Plugin.PulseWarn,{iterations:1, useClass:!0,targetClass:"warn",interval:1300});switch(this.get("state")){case "editing":this.setStateEditing();break;case "complete":this.setStateComplete();break;case "incomplete":this.setStateIncomplete()}},bindUI:function(){f.superclass.bindUI.call(this);if(b.Lang.isValue(this.get("model")))this.get("model").on("change",this.syncUI,this);var a=this.get("contentBox");a.one(".continue-button").on("click",function(){this.fire("continue-clicked")},this);a.one(".edit-button").on("click",this._onEdit, this)},setStateEditing:function(){var a=this.get("boundingBox");this._removeSaved();a.removeClass("complete");a.removeClass("incomplete");a.addClass("editing");this.set("state","editing");return this},scrollIntoView:function(){this.get("boundingBox").scrollIntoView(!0)},setStateComplete:function(){var a=this.get("contentBox").one(".saved-fieldset");a&&a.remove(!0);this._renderSavedFieldset(function(){var a=this.get("boundingBox");a.removeClass("editing");a.removeClass("incomplete");a.addClass("complete"); this.set("state","complete")});return this},_renderSavedFieldset:function(a){var c=this.getProperty("HANDLEBARS_SAVED_FIELDSET_TEMPLATE");c&&this.get("contentBox").append(b.Squarespace.UITemplates.render(c,this.getValues()));b.Lang.isValue(a)&&a.call(this)},setStateIncomplete:function(){var a=this.get("boundingBox");this._removeSaved();this._clearErrors();a.removeClass("editing");a.removeClass("complete");a.addClass("incomplete");this.set("state","incomplete");return this},getValues:function(){var a= {};this.get("contentBox").all(".field").each(function(b){b=b.one(".field-element");var d=b.get("type"),e=b.get("name"),h=null,h="checkbox"===d?b.get("checked"):b.get("value").trim();""===h&&(h=null);a[e]=h},this);return a},setValues:function(a){this.get("contentBox").all(".field-element").each(function(c){var d=c.get("name");b.Object.hasKey(a,d)&&this._setFieldValue(c,a[d])},this)},_setFieldValue:function(a,c){if("select-one"===a.get("type")){var d=a.one('option[value="'+c+'"]');b.Lang.isValue(d)&& d.set("selected",!0)}else a.set("value",c)},renderErrors:function(a){this._clearErrors();var c=[],d=[],e=[],h=[],g=[],f=[];b.Array.each(a,function(a){var b=this.getProperty("FIELD_ERROR_TYPES"),k=a.type,l=a.field;l&&this._renderFieldError(l);k===b.REQUIRED?c.push(l.getData("label")):k===b.VALIDATION?d.push(l.getData("label")):k===b.STRIPE?e.push(a.message):k===b.CUSTOM?h.push(a.message):k===b.FORM_FIELD?g.push(a):k===b.HEADER&&f.push(a)},this);var k=a="",l="",m="";0<c.length&&(a=b.Array.dedupe(c).join(", ")+ " required. ");0<d.length&&(k=b.Array.dedupe(d).join(", ")+" invalid.");0<e.length&&(l=b.Array.dedupe(e).join(". "));0<h.length&&(m=b.Array.dedupe(h).join(". "));a=b.Node.create('<div class="error-summary">'+a+k+l+m+"</div>");this.get("contentBox").one(".button").insert(a,"before");b.Array.each(g,function(a){b.one("#"+a.fieldId).addClass("error").insert('<div class="form-field-error">'+a.message+"</div>",0)});b.Array.each(f,function(a){this.get("contentBox").one(".custom-form").insert('<div class="header-error">'+ a.message+"</div>",0)},this)},_onContinue:function(){this.validate().then(b.bind(function(a){0<a.length?this.renderErrors(a):(this._clearErrors(),this.fire("continue"))},this))},_onEdit:function(){this.fire("edit")},_fetchAsyncValidatedErrors:function(){return new b.Promise(function(a){a([])})},_getLocalErrors:function(){var a=[];this.get("contentBox").all(".field").each(function(b){b.hasClass("required")&&(b=this._validateField(b))&&a.push(b)},this);return a},validate:function(){var a=this._getLocalErrors(); return new b.Promise(b.bind(function(c){this._fetchAsyncValidatedErrors().then(b.bind(function(b){b=a.concat(b);c(b)},this))},this))},_validateField:function(a){var b=a.one(".field-element");b.get("name");if(""===b.get("value").trim())return{type:this.getProperty("FIELD_ERROR_TYPES").REQUIRED,field:a}},_clearErrors:function(){var a=this.get("contentBox");a.all(".error-summary, .form-field-error, .header-error").remove(!0);a.all(".field, .form-item").removeClass("error")},_renderFieldError:function(a){var b= a.one(".field-element");b.pulseWarn.warn();a.addClass("error");b.once(["click","change","focus"],function(){a.removeClass("error")},this)},_removeSaved:function(){var a=this.get("contentBox").one(".saved-fieldset");a&&a.remove(!0)}},{CSS_PREFIX:"sqs-checkout-form-section card",FIELD_ERROR_TYPES:{REQUIRED:1,VALIDATION:2,STRIPE:3,CUSTOM:4,FORM_FIELD:5,HEADER:6},ATTRS:{model:{value:null},state:{value:"incomplete"}}})},"1.0",{requires:"node base thirdparty-modernizr squarespace-ss-widget squarespace-ui-templates squarespace-plugin-pulsewarn".split(" ")})}, 1944:function(k,m){YUI.add("squarespace-checkout-form-shipping-info",function(b){b.namespace("Squarespace.Widgets");var f=b.Squarespace.Widgets.CheckoutFormShippingInfo=b.Base.create("checkoutFormShipping",b.Squarespace.Widgets.CheckoutFormAddress,[b.Squarespace.Widgets.CheckoutFormCustomerInfo],{bindUI:function(){f.superclass.bindUI.call(this);this._bindCustomerInfoEvents()},_onContinue:function(){if(this.get("model").isRecalculating())return!1;f.superclass._onContinue.call(this)},getValues:function(){var a= f.superclass.getValues.call(this);a.requiresShipping=this.get("model").get("requiresShipping");return a},setValues:function(a){f.superclass.setValues.call(this,a);b.Object.hasKey(a,"selectedShippingOption")&&this._shippingOptionsWidget.setSelectedOption(a.selectedShippingOption)},getLocationForShipping:function(){var a=this.getValues();return{country:a.shippingCountry,state:a.shippingState,zip:a.shippingZip}},_populateFieldsFromAc:function(a){this.setValues({shippingAddress1:a.address,shippingCountry:a.country, shippingCity:a.city,shippingState:a.state,shippingZip:a.zip})}},{CSS_PREFIX:"sqs-checkout-form-shipping-info",HANDLEBARS_TEMPLATE:"checkout-form-shipping-info.html",HANDLEBARS_SAVED_FIELDSET_TEMPLATE:"checkout-saved-shipping-info.html",ATTRS:{useAddressForShipping:{value:!0},optionalFields:{value:{showMailingList:!0}},enableMailingListOptInByDefault:{validator:b.Squarespace.AttrValidators.isBoolean}}})},"1.0",{requires:"base node squarespace-checkout-form-address squarespace-models-shopping-cart squarespace-hb-money-string squarespace-shipping-options-list squarespace-checkout-form-customer-info squarespace-checkout-form-shipping-info-template squarespace-checkout-saved-shipping-info-template".split(" ")})}, 1949:function(k,m){YUI.add("squarespace-commerce",function(b){b.namespace("Squarespace.Commerce");var f=b.config.win.Static;b.Squarespace.Commerce.initializeCommerce=function(){b.Squarespace.ProductUtils.initializeVariantDropdowns();b.Squarespace.CartUtils.initializeAddToCartButtons();if(!b.Squarespace.Commerce.isExpressCheckout()&&!b.Lang.isValue(b.one(".show-cart-page"))&&!b.Lang.isValue(b.one(".sqs-custom-cart"))){var a=b.one(".sqs-cart-dropzone");b.Lang.isNull(a)&&(b.Lang.isValue(b.one(".absolute-cart-box"))? a=b.one(".absolute-cart-box"):(a=b.Node.create('<div class="absolute-cart-box"></div>'),b.one(b.config.doc.body).append(a)));var c=a.one(".sqs-pill-shopping-cart");b.Widget.getByNode(c)||new b.Squarespace.Widgets.PillShoppingCart({model:b.Squarespace.Singletons.ShoppingCart,useLightCart:f.SQUARESPACE_CONTEXT.websiteSettings.storeSettings.useLightCart,render:a})}b.Lang.isValue(b.one(".sqs-custom-cart"))&&b.all(".sqs-custom-cart").each(function(a){(new b.Squarespace.Widgets.TemplateIntegratedShoppingCart({model:b.Squarespace.Singletons.ShoppingCart, boundingBox:a,srcNode:a})).render()});b.Lang.isNull(b.Cookie.get("CART"))?b.all(".sqs-add-to-cart-button-wrapper").setStyle("visibility","visible"):b.Squarespace.Singletons.ShoppingCart.load(function(){b.all(".sqs-add-to-cart-button-wrapper").setStyle("visibility","visible")},this);b.Lang.isValue(b.one("#sqs-shopping-cart-wrapper"))&&new b.Squarespace.Widgets.FullPageShoppingCart({model:b.Squarespace.Singletons.ShoppingCart,linkItems:!0,render:b.one("#sqs-shopping-cart-wrapper")})};b.config.win.Squarespace.onInitialize(b, b.Squarespace.Commerce.initializeCommerce)},"1.0",{requires:"event-base-ie overlay squarespace-pill-shopping-cart squarespace-template-integrated-shopping-cart squarespace-full-page-shopping-cart squarespace-product-utils squarespace-cart-utils squarespace-donate-form".split(" ")})},1996:function(k,m){YUI.add("squarespace-contribution-summary",function(b){b.namespace("Squarespace.Widgets");var f=b.Squarespace.Widgets.ContributionSummary=b.Base.create("ContributionSummary",b.Squarespace.Widgets.CheckoutFormSection, [],{_getHBTemplateContext:function(){var a=f.superclass._getHBTemplateContext.call(this);b.Array.each(a.donatePage.suggestedContributions,function(a){a.amountDollars=b.Squarespace.Commerce.moneyFormat(a.amountCents)});return a},bindUI:function(){f.superclass.bindUI.call(this);var a=this.get("contentBox");a.delegate("click",function(b){"other"==b.target.get("value")&&a.one('input[name="contributionAmount"]').select()},'input[type="radio"]')},renderUI:function(){f.superclass.renderUI.call(this);var a= this.get("contentBox");a.one('input[name="contributionAmount"]').plug(b.Squarespace.Plugin.MoneyFormatter);var c=this.get("donatePage").suggestedContributions;b.Lang.isValue(c)&&0<c.length?a.one(".prompt").setContent("Select an amount:"):a.one(".prompt").setContent("Enter an amount:")},_getLocalErrors:function(){var a=f.superclass._getLocalErrors.call(this);return 50>this.getDonationAmountCents()?[{type:this.getProperty("FIELD_ERROR_TYPES").CUSTOM,message:"You must donate at least 0.50"}]:a},getDonationAmountCents:function(){var a= this.get("contentBox"),c=this.get("donatePage").suggestedContributions;return b.Lang.isValue(c)&&0<c.length?(c=this._getCheckedRadio(),!b.Lang.isValue(c)?0:"other"==c.get("value")?a.one('input[name="contributionAmount"]').moneyFormatterPlugin.get("data"):c.get("value")):a.one('input[name="contributionAmount"]').moneyFormatterPlugin.get("data")},_getCheckedRadio:function(){var a;this.get("contentBox").one(".contribution-option-list").all('input[type="radio"]').each(function(b){b.get("checked")&&(a= b)});return a},getValues:function(){return{donationAmount:b.Squarespace.Commerce.moneyString(this.getDonationAmountCents()),title:this.get("donatePage").title}}},{CSS_PREFIX:"sqs-contribution-summary",HANDLEBARS_TEMPLATE:"contribution-summary.html",HANDLEBARS_SAVED_FIELDSET_TEMPLATE:"checkout-saved-contribution.html",ATTRS:{strings:{value:{prompt:null}},donatePage:{value:null}}})},"1.0",{requires:"base node squarespace-commerce-utils squarespace-ui-templates squarespace-hb-money-string squarespace-checkout-form-section squarespace-contribution-summary-template squarespace-plugin-money-formatter squarespace-async-form squarespace-checkout-saved-contribution-template".split(" ")})}, 2067:function(k,m,b){var f=b(350);YUI.add("squarespace-donate-form",function(a){a.namespace("Squarespace.Widgets");var b=a.Squarespace.Widgets.DonateForm=a.Base.create("DonateForm",a.Squarespace.Widgets.SSWidget,[],{initializer:function(){var b=this.get("donatePage");this._contributionSection=new a.Squarespace.Widgets.ContributionSummary({donatePage:b,state:"editing"});this._contactSection=new a.Squarespace.Widgets.CheckoutFormContactInfo({enableMailingListOptInByDefault:this.get("enableMailingListOptInByDefault"), optionalFields:this.get("optionalFields"),state:"incomplete"});this._customFormSection=new a.Squarespace.Widgets.CheckoutCustomForm({state:"incomplete",customForm:b.customForm,formId:b.customFormId});this._paymentSection=new a.Squarespace.Widgets.CheckoutFormPayment({strings:{submitText:b.buttonLabel,pendingText:"Submitting ..."},state:"incomplete",optionalHiddenFields:["donationAmountCents","donatePageId","email","phone","joinMailingList"],inTestMode:this.get("inTestMode"),countriesAllowed:a.Squarespace.Localities.getAllCountryNames()}); this.formSubmitted=!1},destructor:function(){this._contributionSection.destroy(!0);this._contributionSection=null;this._contactSection.destroy(!0);this._contactSection=null;this._customFormSection.destroy(!0);this._customFormSection=null;this._paymentSection.destroy(!0);this._paymentSection=null},renderUI:function(){b.superclass.renderUI.call(this);var d;d=a.Data.addCrumb("/commerce/submit-donation");d=a.Node.create('<form action="'+d+'" method="POST"></form>');d.append(a.Node.create('<input type="hidden" name="customFormSubmission" />')); this._contributionSection.render(a.one("#summary-wrapper"));this._contactSection.render(a.one("#summary-wrapper"));this._customFormSection.render(a.one("#summary-wrapper"));this._paymentSection.render(d);this._customFormSection.setStateIncomplete();this._paymentSection.setStateIncomplete();this.get("contentBox").append(d)},bindUI:function(){b.superclass.bindUI.call(this);var a=this._contributionSection,e=this._contactSection,f=this._customFormSection,g=this._paymentSection;a.on("continue",function(){a.setStateComplete(); e.setStateEditing()});a.on("edit",function(){a.setStateEditing();e.setStateIncomplete();f.setStateIncomplete();g.setStateIncomplete()});e.on("edit",function(){e.setStateEditing();f.setStateIncomplete();g.setStateIncomplete()});e.on("continue",function(){e.setStateComplete();this._hasCustomForm()?f.setStateEditing():g.setStateEditing()},this);f.on("continue",function(){f.setStateComplete();g.setStateEditing()});f.on("edit",function(){f.setStateEditing();g.setStateIncomplete()});g.on("continue",this._submit, this)},lock:function(){var a=this.get("contentBox");this.fire("lock");a.addClass("submitting");this._paymentSection.lock()},unlock:function(){var a=this.get("contentBox");this.fire("unlock");a.removeClass("submitting");this._paymentSection.unlock()},_hasCustomForm:function(){var b=this.get("donatePage").customForm;return!a.Lang.isValue(b)?!1:0<b.fields.length},_submit:function(){var b=this.get("donatePage"),c=a.bind(function(b){b=this._paymentSection.getCreditCardValues();var c=this._paymentSection.getValues(); Stripe.createToken({number:b.cardNumber,cvc:b.cvc,exp_month:b.cardExpiryMonth,exp_year:b.cardExpiryYear,name:c.cardHolderName,address_line1:c.billingAddress1,address_line2:c.billingAddress2,address_state:c.billingState,address_city:c.billingCity,address_country:c.billingCountry,address_zip:c.billingZip},a.bind(this._stripeResponseHandler,this))},this);this._validateSubmit().then(a.bind(function(f){if(f)if(this.lock(),!0===b.queuedSubmitEnabled){var g=new a.Squarespace.TokenQueue;g.on("estimatedWaitChanged", function(){this._showCountdown(g.estimatedTime)},this);g.waitInQueue().then(a.bind(c,this))}else c()},this))},_validateSubmit:function(){return new a.Promise(a.bind(function(b){this._contributionSection.validate()||b(!1);this._paymentSection.validate().then(a.bind(function(c){0<c.length&&(this._paymentSection.renderErrors(c),b(!1));50>this._contributionSection.getDonationAmountCents()&&(new a.Squarespace.Widgets.Alert({"strings.title":"Cannot Complete Donation","strings.message":"Your contribution must be at least "+ a.Squarespace.Commerce.currencySymbol()+"0.50 to continue."}),b(!1));Static.SQUARESPACE_CONTEXT.websiteSettings.storeSettings.storeState===f.NOT_CONNECTED&&(new a.Squarespace.Widgets.Alert({"strings.title":"Payments Not Connected","strings.message":"This site has not connected a payment gateway. Transactions are disabled and you cannot complete this donation."}),b(!1));b(!0)},this))},this))},_stripeResponseHandler:function(a,b){var c=b.error,g=this.get("contentBox").one("form"),f=this._contributionSection; if(c)this.unlock(),g=this._paymentSection,g.renderErrors([{type:g.getProperty("FIELD_ERROR_TYPES").STRIPE,message:c.message}]);else{var c=this._contactSection.getValues(),k=this._paymentSection.getValues();this._paymentSection.setHiddenValues({stripeToken:b.id,cardHolderName:k.cardHolderName,donationAmountCents:f.getDonationAmountCents(),email:c.email,joinMailingList:c.joinMailingList,phone:c.phone,donatePageId:this.get("donatePage").id});f=this._customFormSection.getCustomFormSubmission();g.one('input[name="customFormSubmission"]').set("value", JSON.stringify(f));this._submitForm()}},_submitForm:function(){var a=this.get("contentBox").one("form");!1===this.formSubmitted&&(this.formSubmitted=!0,a.submit())}},{CSS_PREFIX:"sqs-checkout-form",ATTRS:{countriesAllowed:{value:[]},optionalFields:{value:null},donatePage:{value:null},inTestMode:{value:!1},enableMailingListOptInByDefault:{validator:a.Squarespace.AttrValidators.isBoolean,value:!0}}})},"1.0",{requires:"base node squarespace-attr-validators squarespace-ss-widget squarespace-util squarespace-commerce-utils squarespace-ui-base squarespace-checkout-form-custom-form squarespace-checkout-form-shipping-info squarespace-checkout-form-payment squarespace-contribution-summary squarespace-widgets-alert".split(" ")})}, 2115:function(k,m){YUI.add("squarespace-full-page-shopping-cart",function(b){b.namespace("Squarespace.Widgets");var f=b.Squarespace.Widgets.FullPageShoppingCart=b.Base.create("fullPageShoppingCart",b.Squarespace.Widgets.TableShoppingCart,[],{renderUI:function(){f.superclass.renderUI.call(this);this._spinner=new b.Squarespace.Spinner({render:this.get("contentBox").one(".loading-spinner"),size:50,color:"dark"})},bindUI:function(){f.superclass.bindUI.call(this);var a=this.get("model");this.get("contentBox").one(".checkout-button").on("click", b.Squarespace.Commerce.goToCheckoutPage,this);a.on("recalculate-start",this._setLoadingState,this);a.on("recalculate-end",this._setLoadedState,this)},_setLoadingState:function(){var a=this.get("contentBox");a.all("input").setAttribute("disabled",!0);a.addClass("loading-cart")},_setLoadedState:function(){var a=this.get("contentBox");b.later(350,this,function(){a.all("input").removeAttribute("disabled");a.removeClass("loading-cart")})}},{CSS_PREFIX:"sqs-fullpage-shopping-cart",HANDLEBARS_TEMPLATE:"full-page-shopping-cart.html", HANDLEBARS_ITEM_TEMPLATE:"full-page-shopping-cart-item.html"})},"1.0",{requires:"base node cookie squarespace-commerce-utils squarespace-table-shopping-cart squarespace-full-page-shopping-cart-template squarespace-full-page-shopping-cart-item-template squarespace-spinner".split(" ")})},2118:function(k,m){YUI.add("squarespace-hb-date-options",function(b){b.Handlebars.registerHelper("month-options",function(f){var a="";b.Array.each("January February March April May June July August September October November December".split(" "), function(c,d){var e=d+1,h=e.toString();1===h.length&&(h="0"+h);b.Lang.isUndefined(f.hash["short"])&&(h+=" "+c);a+='<option value="'+e+'">'+h+"</option>"});return new b.Handlebars.SafeString(a)});b.Handlebars.registerHelper("year-options",function(f){f=(new Date).getFullYear();for(var a="",c=f;c<f+10;c++)a+='<option value="'+c+'">'+c+"</option>";return new b.Handlebars.SafeString(a)},this)},"1.0",{requires:["handlebars-base"]})},2119:function(k,m){YUI.add("squarespace-hb-money-string",function(b){b.Handlebars.registerHelper("money-string", function(f,a){return new b.Handlebars.SafeString(b.Squarespace.Commerce.moneyString(f))})},"1.0",{requires:["handlebars-base","squarespace-commerce-utils"]})},2201:function(k,m){YUI.add("squarespace-pill-shopping-cart",function(b){b.namespace("Squarespace.Widgets");var f=b.Squarespace.Widgets.PillShoppingCart=b.Base.create("pillShoppingCart",b.Squarespace.Widgets.SSWidget,[],{renderUI:function(){f.superclass.renderUI.call(this);this.get("boundingBox").plug(b.Squarespace.Animations.Scalable,{duration:0.25}); this._hide(!0);this.get("contentBox").addClass(this.get("useLightCart")?"light":"dark")},bindUI:function(){f.superclass.bindUI.call(this);this.get("model").on("change",this.syncUI,this);this.get("contentBox").on("click",function(){b.config.win.location="/commerce/show-cart"})},syncUI:function(){f.superclass.syncUI.call(this);var a=this.get("model"),c=a.get("totalQuantity"),d=this.get("contentBox"),e=function(){d.one(".total-quantity").setContent(100<c?"100+":c);d.one(".suffix").setContent(1===c?"item": "items");d.one(".subtotal .price").setContent(b.Squarespace.Commerce.moneyString(a.get("subtotalCents")))};0<c?(e(),this._show()):(this._hide(),e())},_show:function(){var a=this.get("boundingBox");if(a.hasClass("sqs-scalable-hidden"))a.show();else{var c=b.Easing.easeOutStrong,d=new b.Anim({node:a,to:{opacity:0.7},duration:0.2,easing:c}),e=new b.Anim({node:a,to:{opacity:1},duration:0.5,easing:c});d.on("end",function(){e.run()});d.run()}},_hide:function(a){var b=this.get("boundingBox");b.hasClass("sqs-scalable-hidden")|| b.hide(a)}},{CSS_PREFIX:"sqs-pill-shopping-cart",HANDLEBARS_TEMPLATE:"pill-shopping-cart.html",ATTRS:{model:{value:null,validator:function(a){return b.instanceOf(a,b.Squarespace.Models.ShoppingCart)}},useLightCart:{value:!1}}})},"1.0",{requires:"base node cookie squarespace-ss-widget squarespace-commerce-utils squarespace-animations squarespace-models-shopping-cart squarespace-pill-shopping-cart-template".split(" ")})},2203:function(k,m){YUI.add("squarespace-plugin-integer-restrictor",function(b){b.namespace("Squarespace.Plugin"); b.Squarespace.Plugin.IntegerRestrictor=b.Base.create("integerRestrictor",b.Plugin.Base,[],{initializer:function(){this.get("host").on("keydown",function(b){var a=b.keyCode;-1!==[9,13,8,46,37,39].indexOf(a)||(48<=a&&57>=a||96<=a&&105>=a)||b.halt(!0)},this)}},{NS:"integerRestrictorPlugin"})},"1.0",{requires:["base","plugin","squarespace-ui-base"]})},2212:function(k,m,b){b(701);YUI.add("squarespace-shipping-options-list",function(b){b.namespace("Squarespace.Widgets");var a=b.Squarespace.Widgets.ShippingOptionsList= b.Base.create("shippingOptionsList",b.Squarespace.Widgets.SSWidget,[],{renderUI:function(){a.superclass.renderUI.call(this);this._spinner=new b.Squarespace.Spinner({render:this.get("contentBox").one(".loading-spinner"),size:1<this.get("model").get("shippingOptions").length?35:15,color:"dark"})},bindUI:function(){a.superclass.bindUI.call(this);var b=this.get("model"),d=this.get("contentBox");b.on("change",this.syncUI,this);b.on("recalculate-start",this._setLoadingState,this);b.on("recalculate-end", this._setLoadedState,this);this.on("shippingCountryChange",this.syncUI,this);d.delegate("click",function(a){b.updateShippingMethod(a.target.get("value"))},"input",this)},syncUI:function(){a.superclass.syncUI.call(this);var c=this.get("contentBox"),d=this.get("model"),e=d.get("shippingOptions"),h=(d=d.get("selectedShippingOption"))?d.key:null,g=c.one(".options-container");c.all(".shipping-option").remove(!0);c.toggleClass("empty",0===e.length);b.Array.each(e,function(a,c){var d=a.key,e=b.Squarespace.UITemplates.renderAsNodeOrDocFrag(this.getProperty("HANDLEBARS_SHIPPING_OPT_TEMPLATE"), {name:a.name,id:d,computedCost:a.computedCost});(h&&d===h||!h&&0===c)&&e.one("input").set("checked",!0);g.append(e)},this)},getSelectedOption:function(){var a=this.get("contentBox").one("input:checked");if(b.Lang.isValue(a)&&a.get("disabled"))return null;if(a)return{value:a.get("value"),title:a.get("title"),cost:Number(a.getData("computed-cost"))}},setSelectedOption:function(a){this.get("contentBox").all("input").each(function(b){b.set("checked",b.get("value")===a)},this)},_setLoadingState:function(){var a= this.get("contentBox"),b=1<this.get("model").get("shippingOptions").length;this._spinner.set("size",b?35:15);a.all("input").setAttribute("disabled",!0);a.toggleClass("multiple-options",b);a.addClass("loading-options")},_setLoadedState:function(){b.later(350,this,function(){var a=this.get("contentBox");a.removeClass("loading-options");a.all(".shipping-option").each(function(a){a.hasClass("disabled")||a.one("input").removeAttribute("disabled")},this)})}},{CSS_PREFIX:"sqs-shipping-options-list",HANDLEBARS_TEMPLATE:"shipping-options-list.html", HANDLEBARS_SHIPPING_OPT_TEMPLATE:"shipping-options-list-option.html",ATTRS:{model:{value:null,validator:function(a){return b.instanceOf(a,b.Squarespace.Models.ShoppingCart)}}}})},"1.0",{requires:"base node squarespace-ss-widget squarespace-models-shopping-cart squarespace-shipping-options-list-template squarespace-shipping-options-list-option-template squarespace-hb-money-string squarespace-spinner".split(" ")})},2225:function(k,m,b){var f=b(74),a=b(233);YUI.add("squarespace-table-shopping-cart", function(b){b.namespace("Squarespace.Widgets");var d=b.Squarespace.Widgets.TableShoppingCart=b.Base.create("tableShoppingCart",b.Squarespace.Widgets.SSWidget,[],{initializer:function(){this._getAdditionalFieldsFormTemplateSchema(function(a){this._additionalFieldsFormTemplate=a},this);this._additionalFieldsModalLightbox=new b.Squarespace.Widgets.ModalLightbox;this._formWidget=null},destructor:function(){this._additionalFieldsModalLightbox.destroy();this._formWidget&&this._formWidget.destroy()},renderUI:function(){d.superclass.renderUI.call(this); this._additionalFieldsModalLightbox.render(b.one("body"))},bindUI:function(){d.superclass.bindUI.call(this);this.get("model").on("change",this.syncUI,this);var a=this.get("contentBox");a.delegate("click",function(b){a.hasClass("loading-cart")||this._removeEntryRow(b.target.ancestor("tr"))},".remove-item",this);a.delegate("click",function(a){a.target.select()},".quantity input",this);var f=0,g;a.delegate("valuechange",function(a){var d=a.target.get("parentNode");f+=1300;g&&g.stop();d.one("input").setStyle("opacity", 0.3);setTimeout(b.bind(function(){g=new b.Anim({node:d.one("input"),to:{opacity:1},easing:b.Easing.easeOutSine,duration:0.5});g.run();setTimeout(b.bind(function(){f-=1300;0===f&&this._onQuantityChange(a)},this),1E3)},this),300)},".quantity input",this);a.delegate("click",this._onAdditionalFieldsEdit,".additional-fields",this);this._additionalFieldsModalLightbox.on("close",function(){this._formWidget&&this._formWidget.destroy()},this)},syncUI:function(){d.superclass.syncUI.call(this);var a=this.get("model"), f=this.get("contentBox");f.one(".subtotal .price").setContent(b.Squarespace.Commerce.moneyString(a.get("subtotalCents")));f.one("tbody").empty();0===a.get("totalQuantity")?f.addClass("empty"):(f.removeClass("empty"),b.Array.each(a.get("entries"),function(a){0<a.quantity&&this._appendEntryRow(a)},this),this._focusedInputItemId&&(a=this._getEntryRowByItemId(this._focusedInputItemId))&&a.one(".quantity input").focus());f.all(".cooldown").addClass("hidden")},showError:function(a,d){new b.Squarespace.Widgets.Alert({"strings.title":a, "strings.message":d})},_appendEntryRow:function(a){var d=a.item,g=d.items,k=d.structuredContent.productType,m=k===f.PHYSICAL,l=a.chosenVariant,r=b.Lang.isValue(l),n=b.Squarespace.UITemplates.renderAsNodeOrDocFrag(this.getProperty("HANDLEBARS_ITEM_TEMPLATE"),{isPhysicalProduct:m});n.setData("entry",a);n.setAttribute("data-item-id",d.id);r&&n.setAttribute("data-chosen-variant-sku",l.sku);d=n.one(".item-image");g=b.Lang.isValue(g)&&0<g.length?g[0].assetUrl.replace("http://","https://")+"?format=100w": "../../universal/images-v6/configuration/no-image.png";d.append('<img src="'+g+'" />');g=n.one(".item-desc");d=this.get("linkItems")?'<a href="'+a.item.fullUrl+'">'+b.Escape.html(a.item.title)+"</a>":"<div>"+b.Escape.html(a.item.title)+"</div>";g.append(d);var p;r?p='<div class="variant-info">'+b.Squarespace.Commerce.variantFormat(l)+"</div>":k===f.DIGITAL&&(p='<div class="variant-info">Digital Download</div>');p&&g.append(p);a.additionalFields&&g.append('<div class="additional-fields"><a>Edit Details</a></div>'); k=a.quantity;m&&(m=n.one(".quantity input"),m.setAttrs({maxlength:4,size:String(k).length,value:k}),m.plug(b.Squarespace.Plugin.IntegerRestrictor));n.one(".price").setContent(b.Squarespace.Commerce.moneyString(k*a.purchasePriceCents));this.get("contentBox").one("tbody").append(n)},_removeEntryRow:function(a){a.plug(b.Squarespace.Animations.Fadeable,{duration:0.25});a.once("hidden",function(){this._updateEntryQuantity(a.getData("entry"),0)},this);a.hide()},_getEntryRowByItemId:function(a){var b;this.get("contentBox").all("tbody tr").each(function(c){c.getData("entry").itemId=== a&&(b=c)},this);return b},_onQuantityChange:function(a){var d=a.target;a=d.get("value");var g=d.ancestor("tr"),f=g.getData("entry"),k=Number(a),l=f.quantity;this._focusedInputItemId=f.itemId;""===a||k===l||(0===k?(a=new b.Squarespace.Widgets.Confirmation({"strings.title":"Remove Item","strings.message":"You have set this item's quantity to 0. This will remove it from your cart. Would you like to continue?"}),a.on("confirm",function(){this._removeEntryRow(g)},this),a.on("cancel",function(){d.set("value", l)},this)):this._updateEntryQuantity(f,k,l,d))},_onAdditionalFieldsEdit:function(a){if(this._additionalFieldsFormTemplate&&!this.get("contentBox").hasClass("loading-cart")){var d=a.target.ancestor("tr").getData("entry");a=d.item.structuredContent.additionalFieldsForm;var g=this._formWidget=new b.Squarespace.Widgets.AsyncForm({form:a,formTemplate:this._additionalFieldsFormTemplate,formSubmitButtonText:"Save",formData:b.JSON.parse(d.additionalFields),formName:a.name,showTitle:!0});g.on("submission", function(a){g.setStateSaving();this.get("model").updateFormSubmission(d,a.data,function(a,b){g.setStateEditing();this._additionalFieldsModalLightbox.close()},this)},this);this._additionalFieldsModalLightbox.set("content",g);this._additionalFieldsModalLightbox.open()}},_updateEntryQuantity:function(a,b,c,d){this.get("model").updateQuantity(a,b,function(a){a&&(this.showError("Unable to Update Quantity",a),d&&d.inDoc()&&d.set("value",c))},this)},_getAdditionalFieldsFormTemplateSchema:function(d,f){b.Data.get({url:"/api/template/GetTemplateSchema", data:{componentType:"widget",type:a.FORM},success:function(a){d.call(f||this,a)}},this)}},{ATTRS:{model:{value:null,validator:function(a){return b.instanceOf(a,b.Squarespace.Models.ShoppingCart)}},linkItems:{value:!1}}})},"1.0",{requires:"anim base escape node squarespace-animations squarespace-commerce-utils squarespace-ui-base squarespace-ui-templates squarespace-models-shopping-cart squarespace-plugin-integer-restrictor squarespace-modal-lightbox squarespace-async-form squarespace-widgets-alert squarespace-widgets-confirmation".split(" ")})}, 2227:function(k,m){YUI.add("squarespace-template-integrated-shopping-cart",function(b){b.namespace("Squarespace.Widgets");var f=b.Squarespace.Widgets.TemplateIntegratedShoppingCart=b.Base.create("templateIntegratedShoppingCart",b.Widget,[],{bindUI:function(){f.superclass.bindUI.call(this);this.get("model").on("change",this.syncUI,this);this.get("model").after("loaded",this._markInitialized,this)},syncUI:function(){f.superclass.syncUI.call(this);var a=this.get("quantityEl"),c=this.get("subtotalEl"), d=this.get("model"),e=d.get("totalQuantity"),d=d.get("subtotalCents");b.Lang.isValue(a)&&a.setContent(100<e?"100+":e);b.Lang.isValue(c)&&c.setContent(b.Squarespace.Commerce.moneyString(d))},_markInitialized:function(){this.get("boundingBox").addClass("sqs-cart-initialized")}},{CSS_PREFIX:"sqs-template-integrated-shopping-cart",HTML_PARSER:{quantityEl:".sqs-cart-quantity",subtotalEl:".sqs-cart-subtotal"},ATTRS:{quantityEl:{value:null,validator:b.Squarespace.AttrValidators.isNullOrNode,writeOnce:"initOnly"}, subtotalEl:{value:null,validator:b.Squarespace.AttrValidators.isNullOrNode,writeOnce:"initOnly"},model:{value:null,validator:function(a){return b.instanceOf(a,b.Squarespace.Models.ShoppingCart)}}}})},"1.0",{requires:"base node widget squarespace-attr-validators squarespace-commerce-utils squarespace-models-shopping-cart".split(" ")})}});