var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opens = _____WB$wombat$assign$function_____("opens");
"use strict";(self.webpackChunkextract_css=self.webpackChunkextract_css||[]).push([["90246"],{692853:function(r){r.exports={}},664350:function(r){r.exports={}},16544:function(r,_,o){var s=o(205650)},205650:function(r,_,o){var s=o(714605),d=o(331566),E=o(664350),k=o.n(E),p=o(692853),L=o.n(p),g=o(936312);YUI.add("squarespace-simple-liking",function(t){var l=t.config.win.Static;t.Squarespace.SimpleLike={TEXT_LIKE_VERB_NONE:(0,s.t)("No Likes",null,{project:"scripts-v6-root"}),TEXT_LIKE_VERB_SINGULAR:(0,s.t)("Like",null,{project:"scripts-v6-root"}),TEXT_LIKE_VERB_PLURAL:(0,s.t)("Likes",null,{project:"scripts-v6-root"}),TEXT_LIKE_ACTIVATED:(0,s.t)("You like this",null,{project:"scripts-v6-root"}),TEXT_LIKE_SUGGEST:(0,s.t)("Click to like",null,{project:"scripts-v6-root"}),attached:!1,attach:function(){if(!this.attached){this.attached=!0;var e;try{localStorage&&(e=t.JSON.parse(localStorage.getItem("squarespace-likes")),e||(e={}),localStorage.setItem("squarespace-likes",t.JSON.stringify(e)))}catch(a){e={}}this.eventHandlers=[];var i=t.delegate("click",function(c){var n=c.currentTarget,u=n.getAttribute("data-item-id");if(u){for(var m=0;m<5;++m)t.Squarespace.SimpleLike.burst(n);n.hasClass("clicked")||n.hasClass("float")||d.Z.like(u).then(function(f){if(f.commited===!0){if(n&&n.getDOMNode()){var v=parseInt(n.getAttribute("data-like-count"),10);n.setAttribute("data-like-count",v+1),t.Squarespace.SimpleLike.renderLikeCount(n),n.addClass("clicked")}try{localStorage&&(e[u]=!0,localStorage.setItem("squarespace-likes",t.JSON.stringify(e)))}catch(h){console.warn("Unable to save like to local storage: ",h)}}f.error&&((0,g.z)()||t.config.win.alert((0,s.t)("You need to enable cookies to be able to like something.",null,{project:"scripts-v6-root"})))}).catch(function(f){})}},"body",".sqs-simple-like");this.eventHandlers.push(i),t.all(".sqs-simple-like").each(function(a){var c=a.getAttribute("data-item-id");c&&(l.SQUARESPACE_CONTEXT.websiteSettings.simpleLikingEnabled||a.remove(),e[c]&&a.addClass("clicked"),d.Z.getLikeCount(c).then(function(u){a.setAttribute("data-like-count",u),t.Squarespace.SimpleLike.renderLikeCount(a)}).catch(function(){t.Squarespace.SimpleLike.renderLikeCount(a)}))})}},detach:function(){this.attached=!1,this.eventHandlers.forEach(function(e){e.detach()})},renderLikeCount:function(i){var a=i&&i.getDOMNode?i.getDOMNode():i;if(!(!a||!a.ownerDocument||!a.ownerDocument.defaultView)){var c=i.getAttribute("data-item-id"),n=i.getAttribute("data-like-count"),u=i.one(".like-count");!c||!u||u.setContent(this.formatLikeText(n))}},formatLikeText:function(e){return e===0?t.Squarespace.SimpleLike.TEXT_LIKE_VERB_NONE:e===1?"1 "+t.Squarespace.SimpleLike.TEXT_LIKE_VERB_SINGULAR:e+" "+t.Squarespace.SimpleLike.TEXT_LIKE_VERB_PLURAL},burst:function(e){var i=e.cloneNode(!0);i.one(".like-count")&&i.one(".like-count").remove();var a=e.one(".like-icon");(!a||a.getStyle("display")==="none")&&(a=e),i.setStyles({position:"absolute",left:a.getX()+"px",top:a.getY()+"px"}),t.one(t.config.doc.body).append(i);var c=new t.Anim({node:i,duration:2,easing:t.Easing.easeOut});c.set("to",{curve:t.Squarespace.SimpleLike.randomCurve(i)}),c.on("end",function(){this.get("node").remove()}),c.run(),i.removeClass("clicked"),i.addClass("float")},randomCurve:function(e){for(var i=[],a=3,c=30,n=Math.floor(Math.random()*2)?1:-1,u=Math.floor(Math.random()*2)?1:-1,m=e.getX(),f=e.getY(),v=0;v<a;++v)m+=Math.floor(Math.random()*c)*n,f+=Math.floor(Math.random()*c)*u,i.push([m,f]);return i}},t.config.win.Squarespace.onInitialize(t,function(){l.SQUARESPACE_CONTEXT.websiteSettings.simpleLikingEnabled&&t.Squarespace.SimpleLike.attach()}),t.config.win.Squarespace.onDestroy(t,function(){t.Squarespace.SimpleLike.attached===!0&&t.Squarespace.SimpleLike.detach()})},"1.0",{requires:["anim","json","node","squarespace-util"]})},331566:function(r,_,o){var s=o(456903),d=",",E=l=>s.default.post("/api/content-items/"+l+"/sentiment/like").then(e=>{var i=e.data;return i}),k=[],p=null,L=()=>{var l=k.map(e=>e.itemId).join(d);s.default.get("/api/blog-like-count/".concat(l)).then(e=>{var i=e.data;k.forEach(a=>{if(i.hasOwnProperty(a.itemId)){a.resolve(i[a.itemId]);return}a.reject()}),k=[],p=null})},g=l=>new Promise((e,i)=>{k.push({itemId:l,resolve:e,reject:i}),p!==null&&clearTimeout(p),p=setTimeout(L,100)}),t=l=>g(l);_.Z={like:E,getLikeCount:t}},936312:function(r,_,o){o.d(_,{z:()=>s});function s(){try{if(!("cookie"in document))return!1;var d="_testCookieName";return document.cookie=d,document.cookie.includes(d)}catch(E){return!1}}},392338:function(r){r.exports=void 0}},function(r){var _=function(s){return r(r.s=s)};r.O(0,["96135","98338"],function(){return _(16544)});var o=r.O()}]);

//# sourceMappingURL=https://sourcemaps.squarespace.net/universal/scripts-compressed/sourcemaps/000bf1e656c976b5/simple-liking-9da30ee383bc0df1-min.en-US.js.map
}