PageSourceSearch

https://posthog.com/component---src-pages-merch-tsx-741ccb262eb318d4efb5.js

js posthog.com collected 2026-10-01 08:30:28 UTC 69,935 bytes, 2 lines download raw bytes

vendor: 5,071 bytes, line 1
1"use strict";(self.webpackChunkposthog_com=self.webpackChunkposthog_com||[]).push([[4256],{39632:function(e,t,n){var r=n(30758);function a(e){return Array.prototype.slice.call(e)}function s(e,t){var n=Math.floor(e);return n===t||n+1===t?e:t}function i(){return Date.now()}function o(e,t,n){if(t="data-keen-slider-"+t,null===n)return e.removeAttribute(t);e.setAttribute(t,n||"")}function l(e,t){return t=t||document,"function"==typeof e&&(e=e(t)),Array.isArray(e)?e:"string"==typeof e?a(t.querySelectorAll(e)):e instanceof HTMLElement?[e]:e instanceof NodeList?a(e):[]}function c(e){e.raw&&(e=e.raw),e.cancelable&&!e.defaultPrevented&&e.preventDefault()}function d(e){e.raw&&(e=e.raw),e.stopPropagation&&e.stopPropagation()}function u(){var e=[];return{add:function(t,n,r,a){t.addListener?t.addListener(r):t.addEventListener(n,r,a),e.push([t,n,r,a])},input:function(e,t,n,r){this.add(e,t,function(e){return function(t){t.nativeEvent&&(t=t.nativeEvent);var n=t.changedTouches||[],r=t.targetTouches||[],a=t.detail&&t.detail.x?t.detail:null;return e({id:a?a.identifier?a.identifier:"i":r[0]?r[0]?r[0].identifier:"e":"d",idChanged:a?a.identifier?a.identifier:"i":n[0]?n[0]?n[0].identifier:"e":"d",raw:t,x:a&&a.x?a.x:r[0]?r[0].screenX:a?a.x:t.pageX,y:a&&a.y?a.y:r[0]?r[0].screenY:a?a.y:t.pageY})}}(n),r)},purge:function(){e.forEach(function(e){e[0].removeListener?e[0].removeListener(e[2]):e[0].removeEventListener(e[1],e[2],e[3])}),e=[]}}}function m(e,t,n){return Math.min(Math.max(e,t),n)}function p(e){return(e>0?1:0)-(e<0?1:0)||+e}function f(e){var t=e.getBoundingClientRect();return{height:s(t.height,e.offsetHeight),width:s(t.width,e.offsetWidth)}}function h(e,t,n,r){var a=e&&e[t];return null==a?n:r&&"function"==typeof a?a():a}function x(e){return Math.round(1e6*e)/1e6}function v(e,t){if(e===t)return!0;var n=typeof e;if(n!==typeof t)return!1;if("object"!==n||null===e||null===t)return"function"===n&&e.toString()===t.toString();if(e.length!==t.length||Object.getOwnPropertyNames(e).length!==Object.getOwnPropertyNames(t).length)return!1;for(var r in e)if(!v(e[r],t[r]))return!1;return!0}var g=function(){return g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},g.apply(this,arguments)};function b(e,t,n){if(n||2===arguments.length)for(var r,a=0,s=t.length;a<s;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}function y(e){var t,n,r,a,s,o,l,c,d,u,f,v,g,y,j=1/0,w=[],N=null,O=0;function k(e){L(O+e)}function P(e){var t=C(O+e).abs;return M(t)?t:null}function C(e){var t=Math.floor(Math.abs(x(e/n))),r=x((e%n+n)%n);r===n&&(r=0);var a=p(e),s=l.indexOf(b([],l,!0).reduce(function(e,t){return Math.abs(t-r)<Math.abs(e-r)?t:e})),i=s;return a<0&&t++,s===o&&(i=0,t+=a>0?1:-1),{abs:i+t*o*a,origin:s,rel:i}}function S(e,t,n){var r;if(t||!D())return I(e,n);if(!M(e))return null;var a=C(null!=n?n:O),s=a.abs,i=e-a.rel,l=s+i;r=I(l);var c=I(l-o*p(i));return(null!==c&&Math.abs(c)<Math.abs(r)||null===r)&&(r=c),x(r)}function I(e,t){if(null==t&&(t=x(O)),!M(e)||null===e)return null;e=Math.round(e);var r=C(t),a=r.abs,s=r.rel,i=r.origin,c=E(e),d=(t%n+n)%n,u=l[i],m=Math.floor((e-(a-s))/o)*n;return x(u-d-u+l[c]+m+(i===o?n:0))}function M(e){return A(e)===e}function A(e){return m(e,d,u)}function D(){return a.loop}function E(e){return(e%o+o)%o}function L(t){var n;n=t-O,w.push({distance:n,timestamp:i()}),w.length>6&&(w=w.slice(-6)),O=x(t);var r=T().abs;if(r!==N){var a=null!==N;N=r,a&&e.emit("slideChanged")}}function T(i){var l=i?null:function(){if(o){var e=D(),t=e?(O%n+n)%n:O,i=(e?O%n:O)-s[0][2],l=0-(i<0&&e?n-Math.abs(i):i),c=0,m=C(O),h=m.abs,x=m.rel,b=s[x][2],j=s.map(function(t,r){var s=l+c;(s<0-t[0]||s>1)&&(s+=(Math.abs(s)>n-1&&e?n:0)*p(-s));var i=r-x,d=p(i),u=i+h;e&&(-1===d&&s>b&&(u+=o),1===d&&s<b&&(u-=o),null!==f&&u<f&&(s+=n),null!==v&&u>v&&(s-=n));var m=s+t[0]+t[1],g=Math.max(s>=0&&m<=1?1:m<0||s>1?0:s<0?Math.min(1,(t[0]+s)/t[0]):(1-s)/t[0],0);return c+=t[0]+t[1],{abs:u,distance:a.rtl?-1*s+1-t[0]:s,portion:g,size:t[0]}});return h=A(h),x=E(h),{abs:A(h),length:r,max:y,maxIdx:u,min:g,minIdx:d,position:O,progress:e?t/n:O/r,rel:x,slides:j,slidesLength:n}}}();return t.details=l,e.emit("detailsChanged"),l}return t={absToRel:E,add:k,details:null,distToIdx:P,idxToDist:S,init:function(t){if(function(){if(a=e.options,s=(a.trackConfig||[]).map(function(e){return[h(e,"size",1),h(e,"spacing",0),h(e,"origin",0)]}),o=s.length){n=x(s.reduce(function(e,t){return e+t[0]+t[1]},0));var t,i=o-1;r=x(n+s[0][2]-s[i][0]-s[i][2]-s[i][1]),l=s.reduce(function(e,n){if(!e)return[0];var r=s[e.length-1],a=e[e.length-1]+(r[0]+r[2])+r[1];return a-=n[2],e[e.length-1]>a&&(a=e[e.length-1]),a=x(a),e.push(a),(!t||t<a)&&(c=e.length-1),t=a,e},null),0===r&&(c=0),l.push(x(n))}}(),!o)return T(!0);var i;!function(){var t=e.options.range,n=e.options.loop;f=d=n?h(n,"min",-1/0):0,v=u=n?h(n,"max",j):c;var r=h(t,"min",null),a=h(t,"max",null);null!==r&&(d=r),null!==a&&(u=a),g=d===-1/0?d:e.track.idxToDist(d||0,!0,0),y=u
vendor: 5,236 bytes, line 1
1===j?u:S(u,!0,0),null===a&&(v=u),h(t,"align",!1)&&u!==j&&0===s[E(u)][2]&&(y-=1-s[E(u)][0],u=P(y-O)),g=x(g),y=x(y)}(),i=t,Number(i)===i?k(I(A(t))):T()},to:L,velocity:function(){var e=i(),t=w.reduce(function(t,n){var r=n.distance,a=n.timestamp;return e-a>200||(p(r)!==p(t.distance)&&t.distance&&(t={distance:0,lastTimestamp:0,time:0}),t.time&&(t.distance+=r),t.lastTimestamp&&(t.time+=a-t.lastTimestamp),t.lastTimestamp=a),t},{distance:0,lastTimestamp:0,time:0});return t.distance/t.time||0}}}function j(e){var t,n,r,a,s,i,o,l;function c(e){return 2*e}function d(e){return m(e,o,l)}function u(e){return 1-Math.pow(1-e,3)}function f(){return r?e.track.velocity():0}function h(e,t){void 0===t&&(t=1e3);var n=147e-9+(e=Math.abs(e))/t;return{dist:Math.pow(e,2)/n,dur:e/n}}function x(){var t=e.track.details;t&&(s=t.min,i=t.max,o=t.minIdx,l=t.maxIdx)}function v(){e.animator.stop()}e.on("updated",x),e.on("optionsChanged",x),e.on("created",x),e.on("dragStarted",function(){r=!1,v(),t=n=e.track.details.abs}),e.on("dragChecked",function(){r=!0}),e.on("dragEnded",function(){var r=e.options.mode;"snap"===r&&function(){var r=e.track,a=e.track.details,o=a.position,l=p(f());(o>i||o<s)&&(l=0);var c=t+l;0===a.slides[r.absToRel(c)].portion&&(c-=l),t!==n&&(c=n),p(r.idxToDist(c,!0))!==l&&(c+=l),c=d(c);var u=r.idxToDist(c,!0);e.animator.start([{distance:u,duration:500,easing:function(e){return 1+--e*e*e*e*e}}])}(),"free"!==r&&"free-snap"!==r||function(){v();var t="free-snap"===e.options.mode,n=e.track,r=f();a=p(r);var o=e.track.details,l=[];if(r||!t){var m=h(r),x=m.dist,g=m.dur;if(g=c(g),x*=a,t){var b=n.idxToDist(n.distToIdx(x),!0);b&&(x=b)}l.push({distance:x,duration:g,easing:u});var y=o.position,j=y+x;if(j<s||j>i){var w=j<s?s-y:i-y,N=0,O=r;if(p(w)===a){var k=Math.min(Math.abs(w)/Math.abs(x),1),P=function(e){return 1-Math.pow(1-e,1/3)}(k)*g;l[0].earlyExit=P,O=r*(1-k)}else l[0].earlyExit=0,N+=w;var C=h(O,100),S=C.dist*a;e.options.rubberband&&(l.push({distance:S,duration:c(C.dur),easing:u}),l.push({distance:-S+N,duration:500,easing:u}))}e.animator.start(l)}else e.moveToIdx(d(o.abs),!0,{duration:500,easing:function(e){return 1+--e*e*e*e*e}})}()}),e.on("dragged",function(){n=e.track.details.abs})}function w(e){var t,n,r,a,s,i,o,f,h,x,v,g,b,y,j,w,N,O,k=u();function P(t){if(i&&f===t.id){var l=M(t);if(h){if(!I(t))return S(t);x=l,h=!1,e.emit("dragChecked")}if(w)return x=l;c(t);var u=function(t){if(N===-1/0&&O===1/0)return t;var r=e.track.details,i=r.length,o=r.position,l=m(t,N-o,O-o);if(0===i)return 0;if(!e.options.rubberband)return l;if(o<=O&&o>=N)return t;if(o<N&&n>0||o>O&&n<0)return t;var c=(o<N?o-N:o-O)/i,d=a*i,u=Math.abs(c*d),p=Math.max(0,1-u/s*2);return p*p*t}(o(x-l)/a*r);n=p(u);var b=e.track.details.position;(b>N&&b<O||b===N&&n>0||b===O&&n<0)&&d(t),v+=u,!g&&Math.abs(v*a)>5&&(g=!0),e.track.add(u),x=l,e.emit("dragged")}}function C(t){!i&&e.track.details&&e.track.details.length&&(v=0,i=!0,g=!1,h=!0,f=t.id,I(t),x=M(t),e.emit("dragStarted"))}function S(t){i&&f===t.idChanged&&(i=!1,e.emit("dragEnded"))}function I(e){var t=A(),n=t?e.y:e.x,r=t?e.x:e.y,a=void 0!==b&&void 0!==y&&Math.abs(y-r)<=Math.abs(b-n);return b=n,y=r,a}function M(e){return A()?e.y:e.x}function A(){return e.options.vertical}function D(){a=e.size,s=A()?window.innerHeight:window.innerWidth;var t=e.track.details;t&&(N=t.min,O=t.max)}function E(e){g&&(d(e),c(e))}function L(){if(k.purge(),e.options.drag&&!e.options.disabled){var n;n=e.options.dragSpeed||1,o="function"==typeof n?n:function(e){return e*n},r=e.options.rtl?-1:1,D(),t=e.container,function(){var e="data-keen-slider-clickable";l("[".concat(e,"]:not([").concat(e,"=false])"),t).map(function(e){k.add(e,"dragstart",d),k.add(e,"mousedown",d),k.add(e,"touchstart",d)})}(),k.add(t,"dragstart",function(e){c(e)}),k.add(t,"click",E,{capture:!0}),k.input(t,"ksDragStart",C),k.input(t,"ksDrag",P),k.input(t,"ksDragEnd",S),k.input(t,"mousedown",C),k.input(t,"mousemove",P),k.input(t,"mouseleave",S),k.input(t,"mouseup",S),k.input(t,"touchstart",C,{passive:!0}),k.input(t,"touchmove",P,{passive:!1}),k.input(t,"touchend",S),k.input(t,"touchcancel",S),k.add(window,"wheel",function(e){i&&c(e)});var a="data-keen-slider-scrollable";l("[".concat(a,"]:not([").concat(a,"=false])"),e.container).map(function(e){return function(e){var t;k.input(e,"touchstart",function(e){t=M(e),w=!0,j=!0},{passive:!0}),k.input(e,"touchmove",function(n){var r=A(),a=r?e.scrollHeight-e.clientHeight:e.scrollWidth-e.clientWidth,s=t-M(n),i=r?e.scrollTop:e.scrollLeft,o=r&&"scroll"===e.style.overflowY||!r&&"scroll"===e.style.overflowX;if(t=M(n),(s<0&&i>0||s>0&&i<a)&&j&&o)return w=!0;j=!1,c(n),w=!1}),k.input(e,"touchend",function(){w=!1})}(e)})}}e.on("updated",D),e.on("optionsChanged",L),e.on("created",L),e.on("destroyed",k.purge)}function N(e){var t,n,r=null;function a(t,n,r){e.animator.active?i(t,n,r):requestAnimationFrame(function(){return i(t,n,r)})}function s(){a(!1,!1,n)}function i(n,a,s){var i=0,o=e.size,d=e.track.details;if(d&&t){var u=d.slides;t.forEach(function(e,t){if(n)!r&&a&&l(e,null,s),c(e,null,s);else{if(!u[t])return;var d=u[t].size*o;!r&&a&&l(e,d,s),c(e,u[t].distance*o-i,s),i+=d}})}}function o(t){return"performance"===e.options.renderMode?Math.round(t):t}function l(e,t,n){var r=n?"height":"width";
vendor: 4,592 bytes, line 1
1null!==t&&(t=o(t)+"px"),e.style["min-"+r]=t,e.style["max-"+r]=t}function c(e,t,n){if(null!==t){t=o(t);var r=n?t:0;t="translate3d(".concat(n?0:t,"px, ").concat(r,"px, 0)")}e.style.transform=t,e.style["-webkit-transform"]=t}function d(){t&&(i(!0,!0,n),t=null),e.on("detailsChanged",s,!0)}function u(){a(!1,!0,n)}function m(){d(),n=e.options.vertical,e.options.disabled||"custom"===e.options.renderMode||(r="auto"===h(e.options.slides,"perView",null),e.on("detailsChanged",s),(t=e.slides).length&&u())}e.on("created",m),e.on("optionsChanged",m),e.on("beforeOptionsChanged",function(){d()}),e.on("updated",u),e.on("destroyed",d)}function O(e,t){return function(n){var r,a,s,i,c,d=u();function m(e){var t;o(n.container,"reverse","rtl"!==(t=n.container,window.getComputedStyle(t,null).getPropertyValue("direction"))||e?null:""),o(n.container,"v",n.options.vertical&&!e?"":null),o(n.container,"disabled",n.options.disabled&&!e?"":null)}function p(){x()&&w()}function x(){var e=null;if(i.forEach(function(t){t.matches&&(e=t.__media)}),e===r)return!1;r||n.emit("beforeOptionsChanged"),r=e;var t=e?s.breakpoints[e]:s;return n.options=g(g({},s),t),m(),C(),S(),O(),!0}function v(e){var t=f(e);return(n.options.vertical?t.height:t.width)/n.size||1}function b(){return n.options.trackConfig.length}function y(e){for(var o in r=!1,s=g(g({},t),e),d.purge(),a=n.size,i=[],s.breakpoints||[]){var l=window.matchMedia(o);l.__media=o,i.push(l),d.add(l,"change",p)}d.add(window,"orientationchange",P),d.add(window,"resize",k),x()}function j(e){n.animator.stop();var t=n.track.details;n.track.init(null!=e?e:t?t.abs:0)}function w(e){j(e),n.emit("optionsChanged")}function N(e,t){if(e)return y(e),void w(t);C(),S();var r=b();O(),b()!==r?w(t):j(t),n.emit("updated")}function O(){var e=n.options.slides;if("function"==typeof e)return n.options.trackConfig=e(n.size,n.slides);for(var t=n.slides,r=t.length,a="number"==typeof e?e:h(e,"number",r,!0),s=[],i=h(e,"perView",1,!0),o=h(e,"spacing",0,!0)/n.size||0,l="auto"===i?o:o/i,c=h(e,"origin","auto"),d=0,u=0;u<a;u++){var m="auto"===i?v(t[u]):1/i-o+l,p="center"===c?.5-m/2:"auto"===c?0:c;s.push({origin:p,size:m,spacing:o}),d+=m}if(d+=o*(a-1),"auto"===c&&!n.options.loop&&1!==i){var f=0;s.map(function(e){var t=d-f;return f+=e.size+o,t>=1||(e.origin=1-t-(d>1?0:1-d)),e})}n.options.trackConfig=s}function k(){C();var e=n.size;n.options.disabled||e===a||(a=e,N())}function P(){k(),setTimeout(k,500),setTimeout(k,2e3)}function C(){var e=f(n.container);n.size=(n.options.vertical?e.height:e.width)||1}function S(){n.slides=l(n.options.selector,n.container)}n.container=(c=l(e,document)).length?c[0]:null,n.destroy=function(){d.purge(),n.emit("destroyed"),m(!0)},n.prev=function(){n.moveToIdx(n.track.details.abs-1,!0)},n.next=function(){n.moveToIdx(n.track.details.abs+1,!0)},n.update=N,y(n.options)}}var k=function(e,t,n){try{return function(e,t){var n,r={};return n={emit:function(e){r[e]&&r[e].forEach(function(e){e(n)});var t=n.options&&n.options[e];t&&t(n)},moveToIdx:function(e,t,r){var a=n.track.idxToDist(e,t);if(a){var s=n.options.defaultAnimation;n.animator.start([{distance:a,duration:h(r||s,"duration",500),easing:h(r||s,"easing",function(e){return 1+--e*e*e*e*e})}])}},on:function(e,t,n){void 0===n&&(n=!1),r[e]||(r[e]=[]);var a=r[e].indexOf(t);a>-1?n&&delete r[e][a]:n||r[e].push(t)},options:e},function(){if(n.track=y(n),n.animator=function(e){var t,n,r,a,s,i;function o(t){i||(i=t),l(!0);var s=t-i;s>r&&(s=r);var u=a[n];if(u[3]<s)return n++,o(t);var m=u[2],p=u[4],f=u[0],h=u[1]*(0,u[5])(0===p?1:(s-m)/p);if(h&&e.track.to(f+h),s<r)return d();i=null,l(!1),c(null),e.emit("animationEnded")}function l(e){t.active=e}function c(e){t.targetIdx=e}function d(){var e;e=o,s=window.requestAnimationFrame(e)}function u(){var t;t=s,window.cancelAnimationFrame(t),l(!1),c(null),i&&e.emit("animationStopped"),i=null}return t={active:!1,start:function(t){if(u(),e.track.details){var s=0,i=e.track.details.position;n=0,r=0,a=t.map(function(e){var t,n=Number(i),a=null!==(t=e.earlyExit)&&void 0!==t?t:e.duration,o=e.easing,l=e.distance*o(a/e.duration)||0;i+=l;var c=r;return r+=a,s+=l,[n,e.distance,c,r,e.duration,o]}),c(e.track.distToIdx(s)),d(),e.emit("animationStarted")}},stop:u,targetIdx:null}}(n),t)for(var e=0,r=t;e<r.length;e++)(0,r[e])(n);n.track.init(n.options.initial||0),n.emit("created")}(),n}(t,b([O(e,{drag:!0,mode:"snap",renderMode:"precision",rubberband:!0,selector:".keen-slider__slide"}),N,w,j],n||[],!0))}catch(e){console.error(e)}};t.E=function(e,t){var n=r.useRef(null),a=r.useRef(!1),s=r.useRef(e),i=r.useCallback(function(r){r?(s.current=e,n.current=ne
1w k(r,e,t),a.current=!1):(n.current&&n.current.destroy&&n.current.destroy(),n.current=null)},[]);return r.useEffect(function(){v(s.current,e)||(s.current=e,n.current&&n.current.update(s.current))},[e]),[i,n]}},59145:function(e,t,n){n.d(t,{A:function(){return s}});var r=n(96549),a=n(86070);function s(e){let{selectOptions:t,currentPath:n,handleValueChange:s,selectedCategory:i}=e;return(0,a.jsx)("div",{"data-scheme":"secondary",className:"bg-primary px-2 pb-2 border-b border-primary",children:(0,a.jsx)(r.l,{groups:t,placeholder:"Select...",ariaLabel:"Products",defaultValue:i||n,onValueChange:s,className:"w-full",dataScheme:"primary"})})}},66637:function(e,t,n){n.r(t),n.d(t,{default:function(){return st}});var r=n(95114),a=n(30758),s=n(59527),i=n(19371),o=n(79599),l=n(1083),c=n(73747),d=n(47301),u=n(64992);const m=["mediaContentType"],p=["image"];function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){(0,i.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function x(e,t){var n;const r=null===(n=e.metafields)||void 0===n?void 0:n.find(e=>e.key===t);return r?r.value:void 0}function v(e,t,n){var r;const a=null===(r=e.metafields)||void 0===r?void 0:r.find(e=>e.namespace===t&&e.key===n);return a?a.value:void 0}const g=async e=>{try{const{data:t}=await fetch("https://posthog.myshopify.com/api/2023-10/graphql.json",{method:"POST",headers:u.bL,body:JSON.stringify({query:"\n                query GetVariantById($id: ID!) {\n                    node(id: $id) {\n                    ... on ProductVariant {\n                        quantityAvailable\n                    }\n                    }\n                }",variables:{id:e}})}).then(e=>e.json());return t.node.quantityAvailable}catch(t){return console.error("Error fetching inventory from Shopify:",t),0}},b=new Set(["jpg","jpeg","png","webp","auto"]);function y(e){let{width:t,height:n,baseUrl:r,format:a}=e;b.has(a)||(console.warn(a+" is not a valid format. Valid formats are: "+Array.from(b).join(", ")),a="auto");let s,i="",o="";const[l,c]=r.split("?");s=l;const d=s.lastIndexOf(".");return-1!==d&&(i=s.slice(d+1),s=s.slice(0,d)),o=a===i||"auto"===a?"."+i:"."+i+"."+a,s+"_"+t+"x"+n+"_crop_center"+o+"?"+c}function j(e,t){void 0===t&&(t=500);const{width:n,height:r}=e;if(!n||!r)return{width:t,height:t};const a=r/n;return{width:t,height:Math.round(t*a)}}function w(e){let{image:t}=e,n=(0,d.A)(e,p);const{originalSrc:r,width:a,height:s}=t;return(0,c.f)(h(h({},n),{},{baseUrl:r,sourceWidth:a,sourceHeight:s,urlBuilder:y,formats:["auto"]}))}function N(e){const t=x(e,"name"),n=x(e,"extension");return t&&n?t+"."+n:e.title}var O=n(86070);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach(function(t){(0,i.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function C(e){var t;const{className:n,product:r,onClick:s,selected:i=!1}=e,o=(x(r,"subtitle"),null===(t=r.tags)||void 0===t?void 0:t.includes("new")),l="string"==typeof r.type&&"kit"===r.type.toLowerCase(),d=N(r),u=(0,a.useMemo)(()=>r.variants&&0!==r.variants.length?r.variants.every(e=>!e.availableForSale):0===r.totalInventory,[r]),m=(0,a.useMemo)(()=>w({image:P(P({},r.featuredMedia.preview.image),{},{width:500,height:500})}),[r]);return(0,O.jsxs)("button",{className:"group px-2 pt-2 pb-1 border-[1.5px] rounded "+(i?"border-blue bg-blue/10":"border-transparent")+" relative flex flex-col gap-2 "+n,onClick:s,children:[(0,O.jsxs)("div",{className:"cursor-default image-wrapper relative",children:[o&&(0,O.jsx)("div",{className:"z-10 rotate-12 uppercase text-xs flex text-primary items-center justify-center bg-yellow rounded-full p-2 font-bold aspect-square absolute top-1 right-1 -translate-y-1/2 translate-x-1/2",children:"New"}),(0,O.jsx)("div",{className:"relative aspect-square bg-white flex items-center",children:(0,O.jsx)(c.G,{className:"aspect-square overflow-hidden",image:m,alt:r.title,loading:"lazy"})})]}),(0,O.jsxs)("div",{className:"cursor-default mb-2 text-center",children:[(0,O.jsx)("h3",{className:"text-sm font-medium leading-tight",children:d}),(0,O.jsx)("p",{className:"text-sm text-secondary mb-0",children:u?(0,O.jsx)("span",{className:"text-muted italic",children:"Out of stock"}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)("span",{className:l?"line-through":"",children:["$",r.priceRangeV2.minVariantPrice.amount]})," ",l?(0,O.jsx)("span",{className:"text-green font-bold",children:"FREE"}):null]})})]})]},r.shopifyId)}var S=n(37720);const I="dibqzlkov4",M=960/402;function A(){return(0,O.jsx)("div",{className:"col-span-full px-2 pt-2 pb-1 border-[1.5px] border-transparent",children:(0,O.jsx)("div",{className:"relative w-full overflow-hidden",children:(0,O.jsx)(S.A,{mediaId:I,aspectRatio:M,className:"w-full",controlsVisibleOnLoad:!1,playerBorderRadius:0})})})}var D=n(93747),E=n(72753),L=n(49271);function T(e){const{className:t,lineItems:n}=e,r=n.filter(e=>e.remove),a=n.filter(e=>null!==e.newCount&&!r.some(t=>t.item.shopifyId===e.item.shopifyId)),s=(0,l.cn)("space-y-4",t);return(0,O.jsxs)("div",{className:s,children:[(null==a?void 0:a.length)>0&&(0,O.jsx)("div",{className:"border border-primary bg-accent rounded-md p-4 text-primary dark:text-primary-dark",children:(0,O.jsxs)("div",{className:"flex",children:[(0,O.jsx)("div",{className:"flex-shrink-0",children:(0,O.jsx)(L.IconInfo,{className:"size-7"})}),(0,O.jsxs)("div",{className:"ml-3",children:[(0,O.jsxs)("div",{className:"text-sm",children:[a.length>1?"Some items' quantities have been adjusted ":"An item's quantity has been adjusted ","to reflect what's available in stock:"]}),(0,O.jsx)("div",{className:"mt-2 text-sm",children:a.map(e=>(0,O.jsxs)("div",{children:[(0,O.jsx)("div",{className:"font-bold",children:e.item.product.title+" - "+e.item.title}),(0,O.jsxs)("div",{children:["New quantity: ",e.newCount]})]},e.item.shopifyId))})]})]})}),(null==r?void 0:r.length)>0&&(0,O.jsx)("div",{className:"border border-primary bg-accent rounded-md p-4 text-primary dark:text-primary-dark",children:(0,O.jsxs)("div",{className:"flex",children:[(0,O.jsx)("div",{className:"flex-shrink-0",children:(0,O.jsx)(L.IconInfo,{className:"size-7"})}),(0,O.jsxs)("div",{className:"ml-3",children:[(0,O.jsxs)("div",{className:"mb-1 text-sm font-medium",children:["The following ",r.length>1?"items have":"item has"," been removed because"," ",r.length>1?"they are":"it is"," no longer in-stock:"]}),(0,O.jsx)("div",{className:"text-sm",children:r.map(e=>(0,O.jsx)("div",{className:"font-bold",children:e.item.product.title+("Default Title"!=e.item.title?" - "+e.item.title:"")}
1,e.item.shopifyId))})]})]})})]})}function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach(function(t){(0,i.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const _=(e,t)=>(0,O.jsxs)("svg",F(F({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},e),{},{children:[(0,O.jsx)("title",{children:"loader"}),(0,O.jsx)("g",{id:"icon/loader",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,O.jsx)("path",{d:"M12,6 L12,3 M16.25,7.75 L18.4,5.6 M18,12 L21,12 M16.25,16.25 L18.4,18.4 M12,18 L12,21 M7.75,16.25 L5.6,18.4 M6,12 L3,12 M7.75,7.75 L5.6,5.6",id:"Combined-Shape",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:(0,O.jsx)("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:"0 12 12",to:"360 12 12",dur:"3s",repeatCount:"indefinite"})})})]})),R=(0,a.forwardRef)(_);var q=n(94852),V=n(63629);function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach(function(t){(0,i.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function H(e){return null!=e}function G(e){const{className:t}=e,[n,r]=a.useState([]),{cartItems:s,setCartItems:i,removeAll:o,cartId:c,setCartId:d}=(0,q.x)(e=>({cartItems:e.cartItems,setCartItems:e.setCartItems,removeAll:e.removeAll,cartId:e.cartId,setCartId:e.setCartId})),[m,p]=a.useState(!1),[f,h]=a.useState(!1),x=(0,q.x)(e=>e.discountCode),{allProducts:v}=(0,V.useStaticQuery)("3994929132"),b=(0,a.useCallback)(()=>{p(!0),h(!1),async function(){p(!0);let e=null;if(c&&(e=await(0,u.DS)(c)),!e){const t=function(e,t){const n={input:{lines:e.map(e=>({merchandiseId:e.shopifyId,quantity:e.count}))}};return t&&(n.input.discountCodes=[t]),n}(s);e=await(0,u.Bc)(t);const n=e.id;d(n)}const t=[];if(null===e)return;for(const r of s){var n;if(null!==(n=r.product.tags)&&void 0!==n&&n.includes("digital"))continue;if(v.nodes.some(e=>e.variants.some(e=>e.shopifyId===r.shopifyId&&"continue"===e.inventoryPolicy.toLowerCase())))continue;const e=r.kit?100:await g(r.shopifyId);e<r.count&&(e<=0?t.push({item:r,remove:!0,newCount:e}):t.push({item:r,remove:!1,newCount:e}))}if(t.length>0&&(r(t),p(!1)),h(t.length>0),t.length>0){const e=s.map(e=>{const n=t.find(t=>t.item.shopifyId===e.shopifyId);return n?n.remove?null:W(W({},e),{},{count:n.newCount}):e}).filter(H);return i(null!=e?e:[]),void p(!1)}const a=function(e,t){const n=null==e?void 0:e.checkoutUrl;if(!n)return null;if(t){const e=new URL(n);return e.searchParams.set("discount",t),e.toString()}return n}(e,x);a&&(window.location.href=a)}()},[p,x,s]),y=(0,l.cn)(" py-2.5 text-sm font-semibold text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-black",t);return(0,O.jsxs)("div",{className:y,children:[n.length>0&&(0,O.jsx)(T,{className:"my-4",lineItems:n}),(0,O.jsx)("div",{className:"flex justify-end",children:(0,O.jsx)(E.E0,{onClick:b,type:"primary",className:(0,l.cn)("relative text-center w-full",t),children:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("span",{className:(0,l.cn)("mx-16",f&&"invisible",m&&"invisible"),children:"Checkout"}),(0,O.jsx)("span",{className:(0,l.cn)("invisible absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2 w-full",f&&"visible",m&&"invisible"),children:"Proceed to Checkout"}),(0,O.jsx)(R,{className:(0,l.cn)("invisible absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2",!f&&m&&"visible")})]})})})]})}const B=e=>{let{price:t}=e;const n="string"==typeof t?parseFloat(t):t;return null===n||isNaN(n)?null:(0,O.jsxs)("strong",{children:["$",n.toFixed(2)]})};var $=n(5482),Y=function(e){return"function"==typeof e},X=function(e){var t=(0,a.useRef)(e);t.current=(0,a.useMemo)(function(){return e},[e]);var n=(0,a.useRef)(void 0);return n.current||(n.current=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.current.apply(this,e)}),n.current},J=function(){var e=(0,$.zs)((0,a.useState)({}),2)[1];return(0,a.useCallback)(function(){return e({})},[])};var Q=function(e,t){void 0===t&&(t={});var n=null!=e?e:{},r=t.defaultValue,s=t.defaultValuePropName,i=void 0===s?"defaultValue":s,o=t.valuePropName,l=void 0===o?"value":o,c=t.trigger,d=void 0===c?"onChange":c,u=n[l],m=Object.prototype.hasOwnProperty.call(n,l),p=(0,a.useMemo)(function(){return m?u:Object.prototype.hasOwnProperty.call(n,i)?n[i]:r},[]),f=(0,a.useRef)(p);m&&(f.current=u);var h=J();return[f.current,X(function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var a=Y(e)?e(f.current):e;m||(f.current=a,h()),n[d]&&n[d].apply(n,(0,$.fX)([a],(0,$.zs)(t),!1))})]};const Z=["className","disabled"];function K(e){const{className:t,disabled:n}=e,r=(0,d.A)(e,Z),[a,s]=Q(r,{defaultValue:1}),i=(0,l.cn)("",t);return(0,O.jsxs)("div",{className:i+" bg-light dark:bg-dark inline-flex items-center border border-primary rounded px-2",children:[(0,O.jsx)("button",{disabled:n,onClick:()=>{a>1&&s(a-1)},className:"disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none w-8 h-8 inline-flex justify-center items-center hover:bg-accent border border-transparent hover:border border-b-[3px] rounded relative hover:top-[-1px] hover:scale-[1.05] active:top-[1px] active:scale-[.99]",children:(0,O.jsx)(L.IconMinus,{className:"w-4 h-4"})}),(0,O.jsx)("input",{disabled:n,className:"disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none w-12 [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none appearance-textfield focus:outline-none border-none bg-transparent font-bold text-center",type:"number",min:"1",value:a,onChange:e=>{const t=Number(e.target.value);t>=1&&s(t)}}),(0,O.jsx)("button",{disabled:n,onClick:()=>{s(a+1)},className:"disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none w-8 h-8 inline-flex justify-center items-center hover:bg-accent border border-transparent hover:border border-b-[3px] rounded relative hover:top-[-1px] hover:scale-[1.05] active:top-[1px] active:scale-[.99]",children:(0,O.jsx)(L.IconPlus,{className:"w-4 h-4"})})]})}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?ee(Object(n),!0).forEach(function(t){(0,i.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ne(e){return te(te({},e),{},{variants:e.variants.map(t=>function(e,t){return te(te({},e),{},{product:te(te({},e.product),{},{tags:t.tags})})}(t,e))})}function re(e){var t;const{className:n,item:r}=e,s=(0,q.x)(e=>e.remove),i=(0,q.x)(e=>e.update),o=null===(t=r.product.tags)||void 0===t?void 0:t.includes("new"),d=(u=r).media.length?w({image:u.media[0].preview.image}):u.product.featuredMedia?w({image:u.product.featuredMedia.preview.image}):null;var u;const{0:m,1:p}=(0,a.useState)(r.count);(0,a.useEffect)(()=>{i(r,m)},[m]);const f=(0,l.cn)("grid grid-cols-[50px_1fr] sm:grid-cols-[100px_1fr] gap-4",n);return(0,O.jsxs)("div",{className:f,children:[d?(0,O.jsxs)("div",{className:"self-start grid place-content-center image-wrapper relative bg-white rounded-md border border-primary",children:[o&&(0,O.jsx)("div",{className:"z-10 uppercase text-xs flex items-center justify-center bg-yellow rounded-full py-2 px-1 font-bold aspect-square absolute top-0 right-0 -translate-y-1/2 translate-x-1/2",children:"new"}),(0,O.jsx)(c.G,{className:"w-full rounded-md overflow-hidden aspect-square",image:d,alt:r.product.title+" - "+r.title})]}):(0,O.jsx)("div",{className:"border-2 rounded grid place-content-center text-gray-400",children:"placeholder image"}),(0,O.jsxs)("div",{className:"relative flex flex-col justify-between gap-2",children:[(0,O.jsxs)("div",{className:"flex",children:[(0,O.jsxs)("div",{className:"flex-1",children:[(0,O.jsx)("div",{className:"font-bold",children:r.product.title}),"Default Title"!==r.title&&(0,O.jsx)("div",{className:"text-[15px]",children:r.title.replace(/\(.*?\)/g,"")})]}),(0,O.jsxs)("div",{className:"text-right",children:[r.count>1&&(0,O.jsxs)("span",{children:[r.count," x"]}),r.kit?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("span",{className:"line-through",children:(0,O.jsx)(B,{price:r.price})})," ",(0,O.jsx)("span",{className:"text-green font-bold",children:"FREE"})]}):(0,O.jsx)(B,{price:r.price})]})]}),(0,O.jsxs)("div",{className:"flex items-center gap-4",children:[(0,O.jsx)(K,{defaultValue:r.count,onChange:p,disabled:r.kit}),(0,O.jsx)("div",{className:"cursor-pointer text-sm",onClick:()=>{s(r.shopifyId)},children:"Remove"})]})]})]})}function ae(e){const{className:t}=e,n=(0,q.x)(e=>e.cartItems),r=(0,q.x)(e=>e.subtotal),a=(0,q.x)(e=>e.discountCode),s=(0,q.x)(e=>e.setDiscountCode),i=0===n.length,o=(0,l.cn)("text-primary h-full p-4",t);return(0,O.jsxs)("div",{className:o,children:[i&&(0,O.jsxs)("div",{className:"border border-primary bg-tan dark:bg-dark rounded p-4 text-center flex flex-col gap-2 mb-4",children:[(0,O.jsx)("div",{className:"w-48 mx-auto",children:(0,O.jsx)(D.A,{src:"https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/src/images/shopahogic.png",alt:"Empty cart"})}),(0,O.jsx)("p",{className:"font-medium mb-0 text-balance",children:"This cart would look better with something in it..."})]}),(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("div",{children:n.map(e=>(0,O.jsx)(re,{className:"py-4 border-primary border-b-0 border-r-0 border-l-0 border-t-1 first:border-t-0",item:e},e.shopifyId))}),a&&(0,O.jsx)("div",{className:"mb-2 py-2 px-3 bg-green/10 dark:bg-green/20 border border-green/30 rounded text-sm",children:(0,O.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,O.jsxs)("div",{children:[(0,O.jsx)("p",{className:"text-xs text-muted m-0",children:"Discount code"}),(0,O.jsx)("span",{className:"text-green font-bold",children:a})]}),(0,O.jsx)("button",{onClick:()=>s(null),className:"p-0.5 hover:opacity-80 opacity-50 transition-opacity","aria-label":"Remove discount code",children:(0,O.jsx)(L.IconX,{className:"size-4"})})]})}),!i&&(0,O.jsxs)("div",{className:"mt-4 mb-1 pt-4 border-t border-primary",children:[(0,O.jsxs)("div",{className:"flex justify-end gap-3",children:[(0,O.jsx)("span",{children:"Subtotal"})," ",(0,O.jsx)("strong",{children:(0,O.jsx)(B,{price:r})})]}),(0,O.jsx)("div",{className:"text-right italic text-sm mt-1",children:"Shipping, taxes, and discounts calculated at checkout"})]}),!i&&(0,O.jsx)(G,{className:"my-2"})]})]})}var se=n(85084),ie=n(61112),oe=n(7822);const le=oe.Ik().shape({email:oe.Yj().email("Please enter a valid email address").required("Email is required")});function ce(e){let{variant:t,product:n}=e;const{0:r,1:s}=(0,a.useState)(""),{0:i,1:o}=(0,a.useState)(!1),{0:l,1:c}=(0,a.useState)(""),d=(0,se.A)();return(0,O.jsx)("div",{"data-scheme":"primary",className:"border border-primary p-4 bg-primary rounded-md text-primary",children:i?(0,O.jsx)("p",{className:"m-0 text-sm",children:"Thanks! We'll email you when it's back in stock."}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("h4",{className:"m-0",children:"Get notified!"}),(0,O.jsx)("p",{className:"m-0 my-1.5 text-sm",children:"Enter your email and we'll get back to you as soon as this product is back in stock"}),(0,O.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),c("");try{var a,s,i,l;await le.validate({email:r});const e=(null==t||null===(a=t.product)||void 0===a?void 0:a.title)||(null==t||null===(s=t.title)||void 0===s?void 0:s.replace("Default Title",""))||(null==n?void 0:n.title),c=(null==t?void 0:t.shopifyId)||(null==n?void 0:n.shopifyId),u={title:e,size:(null==t||null===(i=t.selectedOptions)||void 0===i||null===(l=i.find(e=>"Size"===e.name))||void 0===l?void 0:l.value)||"N/A",shopifyId:c};null==d||d.capture("back_in_stock_form_submitted",{email:r,product:u}),o(!0)}catch(u){c(u.message)}},className:"flex space-x-2 items-center m-0",children:[(0,O.jsx)(ie.A,{label:"Email",type:"email",placeholder:"Email",value:r,onChange:e=>s(e.target.value),showLabel:!1,dataScheme:"secondary",containerClassName:"flex-1"}),(0,O.jsx)("div",{className:"shrink-0",children:(0,O.jsx)(E.E0,{size:"lg",type:"primary",children:"Notify me"})})]}),l&&(0,O.jsx)("p",{className:"m-0 my-2 text-sm text-red font-bold",children:l})]})})}var de=n(39632);function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?ue(Object(n),!0).forEach(function(t){(0,i.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const pe=e=>{let{index:t,image:n,title:r}=e;const s=(0,a.useMemo)(()=>{const{width:e,height:t}=j(n.preview.image,1500);return w({image:me(me({},n.preview.image),{},{width:e,height:t})})},[n]);return(0,O.jsx)("div",{className:"keen-slider__slide number-slide"+t+"} max-w-full bg-white",children:(0,O.jsx)(c.G,{className:"w-full aspect-square",image:s,alt:r})})};function fe(e){const{className:t,product:n,containerWidth:r}=e,{media:s,title:i}=n,o=(0,a.useMemo)(()=>function(e){return e&&Array.isArray(e)?e.filter(e=>"IMAGE"===e.mediaContentType).map(e=>{const{mediaContentType:t}=e;return(0,d.A)(e,m)}):null}(s),[s]),{0:u,1:p}=(0,a.useState)(0),{0:f,1:h}=(0,a.useState)(!1),[x,v]=(0,de.E)({initial:0,loop:!0,slideChanged(e){p(e.track.details.rel)},created(e){h(!0),setTimeout(e.update,0)}});(0,a.useEffect)(()=>{var e,t;p(0),null===(e=v.current)||void 0===e||e.update(),null===(t=v.current)||void 0===t||t.moveToIdx(0)},[n]),(0,a.useEffect)(()=>{var e;v.current&&r&&(null===(e=v.current)||void 0===e||e.update())},[r,v]);const g=(0,l.cn)("relative rounded overflow-hidden",t),b=(0,a.useMemo)(()=>{const{width:e,height:t}=j(n.featuredMedia.preview.image,1500);return w({image:me(me({},n.featuredMedia.preview.image),{},{width:e,height:t})})},[n]);return o&&0!==o.length?1===o.length?(0,O.jsx)(c.G,{className:"w-full rounded-md overflow-hidden aspect-square",image:b,alt:n.title}):(0,O.jsxs)("div",{className:"relative",children:[(0,O.jsxs)("div",{className:g,children:[(0,O.jsx)("div",{ref:x,className:"keen-slider",children:o.map((e,t)=>(0,O.jsx)(pe,{index:t,image:e,title:i},t))}),f&&v.current&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(he,{left:!0,onClick:e=>{var t;e.stopPropagation(),null===(t=v.current)||void 0===t||t.prev()}}),(0,O.jsx)(he,{onClick:e=>{var t;e.stopPropagation(),null===(t=v.current)||void 0===t||t.next()}})]})]}),f&&v.current&&o.length>1&&(0,O.jsx)("div",{className:"flex justify-center space-x-1.5 absolute -bottom-6 left-0 w-full",children:o.map((e,t)=>(0,O.jsx)("button",{className:(0,l.cn)("size-3 rounded-full transition-transform duration-200",u===t?"bg-red dark:bg-yellow scale-125":"bg-accent hover:bg-secondary dark:bg-white/20 dark:hover:bg-white/40 hover:scale-125"),onClick:()=>{var e;return null===(e=v.current)||void 0===e?void 0:e.moveToIdx(t)},"aria-label":"Go to slide "+(t+1)},t))})]}):null}function he(e){const{className:t,left:n}=e,r=(0,l.cn)("relative absolute h-8 w-8 top-1/2 -translate-y-1/2 cursor-pointer left-auto right-2",n&&"left-2 right-auto",t);return(0,O.jsxs)("svg",{className:r,onClick:e.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[e.left&&(0,O.jsx)("path",{d:"M16.67 0l2.83 2.829-9.339 9.175 9.339 9.167-2.83 2.829-12.17-11.996z"}),!e.left&&(0,O.jsx)("path",{d:"M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z"})]})}var xe=n(6368);const ve={white:"bg-[#FFF]",navy:"bg-[#363646]"};function ge(e){const{className:t,option:n,onChange:r,value:a}=e;if(!n)return null;let s=!1;"color"===n.name.toLowerCase()&&(s=!0);const i=(0,l.cn)("",t);return(0,O.jsxs)(xe.z,{value:a,onChange:r,className:i,children:[(0,O.jsx)(xe.z.Label,{className:"sr-only",children:"Choose a size"}),(0,O.jsx)("div",{className:"flex flex-wrap gap-2",children:n.values.map((e,t)=>{const n=!1;return(0,O.jsx)(xe.z.Option,{value:e,disabled:n,className:t=>{let{active:n}=t;return(0,l.cn)(s&&ve[e.toLowerCase()],"cursor-pointer","flex-0 group relative border border-b-3 border-primary hover:top-[-1px] hover:scale-[1.005] active:top-[.5px] active:scale-[.99] rounded-md py-2 px-3 flex items-center justify-center text-xs uppercase hover:bg-primary-100 focus:outline-none")},children:t=>{let{active:n,checked:r}=t;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(xe.z.Label,{as:"span",className:"z-10 text-primary "+(r?"font-bold":"font-medium"),children:e.replace(/\(.*?\)/g,"")}),(0,O.jsx)("span",{className:(0,l.cn)("border",r?"bg-light dark:bg-dark":"border-transparent","pointer-events-none absolute -inset-px rounded-md"),"aria-hidden":"true"})]})}},t)})})]})}function be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?be(Object(n),!0).forEach(function(t){(0,i.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):be(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function je(e){var t;const{product:n,loading:r}=function(e){const{0:t,1:n}=(0,a.useState)(null),{0:r,1:s}=(0,a.useState)(!0),{0:i,1:o}=(0,a.useState)(),{allProducts:l}=(0,V.useStaticQuery)("3994929132");return(0,a.useEffect)(()=>{const t=async()=>{const t={query:'\n                {\n                    node(id: "'+e+'") {\n                        ... on Product {\n                            availableForSale\n                            options {\n                                id\n                                name\n                                values \n                            }\n                            tags\n                            totalInventory\n                            variants(first: 250) {\n                                edges {\n                                    node {\n                                        availableForSale\n                                        currentlyNotInStock\n                                        id\n                                        price {\n                                            amount\n                                        }\n                                        product {\n                                            tags\n                                        }\n                                        quantityAvailable\n                                        selectedOptions {\n                                            name\n                                            value\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n                '};try{const e=await fetch(u.CH,{method:"POST",headers:u.bL,body:JSON.stringify(t)}),r=function(e){return ye(ye({},e.node),{},{variants:Ne(e.node.variants)})}((await e.json()).data);await async function(e,t){e.map(e=>{if(!e.product.tags.includes("digital")){const n=t.some(t=>t.variants.some(t=>t.shopifyId===e.id&&"continue"===t.inventoryPolicy.toLowerCase()));e.quantityAvailable=n?100:e.quantityAvailable}})}(r.variants,l.nodes),n(r),s(!1)}catch(r){o(r),s(!1)}};t()},[e]),{product:t,loading:r}}(e),{0:s,1:i}=(0,a.useState)(),{0:o,1:l}=(0,a.useState)(),{0:c,1:d}=(0,a.useState)([]);(0,a.useEffect)(()=>{if(!n)return;const e=n.variants.find(e=>e.availableForSale)||n.variants[0],t=[];
1n.variants.forEach(e=>{e.selectedOptions.forEach(e=>{t.find(t=>t.name===e.name)||t.push({id:"",name:e.name,values:[]});const n=t.findIndex(t=>t.name===e.name);t[n].values.includes(e.value)||t[n].values.push(e.value)})}),d(t),i(e),l(t.map((n,r)=>we({name:t[r].name,value:e.selectedOptions[r].value,options:t})))},[n]),(0,a.useEffect)(()=>{if(!n)return;const e=n.variants.find(e=>e.selectedOptions.every(e=>null==o?void 0:o.some(t=>t.option.name===e.name&&t.selectedValue===e.value)));i(e)},[o]);const m=(null==n||null===(t=n.tags)||void 0===t||!t.includes("gift"))&&((null==s?void 0:s.quantityAvailable)||0)<=0;return{selectedOptions:o,setOptionAtIndex:function(){if(!n)return;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[a,s,i]=t;l(e=>null==e?void 0:e.map((e,t)=>t===a?we({name:s.name,value:i,options:c}):e))},selectedVariant:s,loading:r,outOfStock:m}}function we(e){let{name:t,value:n,options:r}=e;return{selectedValue:n,option:r.find(e=>e.name.toLowerCase()===t.toLowerCase())||r[0]}}function Ne(e){return e.edges.map(e=>e.node)}var Oe=n(3751);const ke={"t-shirt":["https://res.cloudinary.com/dmukukwp6/image/upload/5026_SIZE_GUIDE_c922fdf762.jpg"],hoodie:["https://res.cloudinary.com/dmukukwp6/image/upload/5102_SIZE_GUIDE_31cdfc2740.jpg"],"track.suit":["https://res.cloudinary.com/dmukukwp6/image/upload/IMG_3315_b6230804cf.png","https://res.cloudinary.com/dmukukwp6/image/upload/IMG_3316_3d564f9e41.png"],"posthog_xmas.sweater":["https://res.cloudinary.com/dmukukwp6/image/upload/sweater_sizes_efd7c22922.jpg"]};function Pe(e){let{title:t}=e;const{0:n,1:r}=(0,a.useState)(!1),s=ke[Object.keys(ke).find(e=>t.toLowerCase().includes(e))];return(null==s?void 0:s.length)>0?(0,O.jsxs)("div",{className:n?"":"!mt-1",children:[n&&(0,O.jsx)("ul",{className:"list-none p-0 m-0",children:null==s?void 0:s.map(e=>(0,O.jsx)("li",{className:"w-full",children:(0,O.jsx)(Oe.T,{children:(0,O.jsx)(D.A,{src:e})})},e))}),(0,O.jsxs)("button",{className:"text-sm opacity-70 underline",onClick:()=>r(!n),children:[n?"Hide":"View"," size guide"]})]}):null}var Ce=n(2212);function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach(function(t){(0,i.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Me=e=>{let{alt:t,image:n}=e;const r=(0,a.useMemo)(()=>{const{width:e,height:t}=j(n,500);return w({image:Ie(Ie({},n),{},{width:e,height:t})})},[n]);return(0,O.jsx)(c.G,{alt:t,image:r})};function Ae(e){var t,n,r;const{className:s,product:i,setIsCart:o,updateURL:c,onCartOpen:d,containerWidth:u}=e,{0:m,1:p}=(0,a.useState)(!1),{0:f,1:h}=(0,a.useState)(!1),{0:v,1:g}=(0,a.useState)(1),b=(0,q.x)(e=>e.update),y=x(i,"subtitle"),j=null===(t=i.tags)||void 0===t?void 0:t.includes("new"),{selectedOptions:w,setOptionAtIndex:k,selectedVariant:P,loading:C,outOfStock:S}=je(i.shopifyId),I=(x(i,"name"),x(i,"extension"),x(i,"brand")),M=x(i,"model_info"),A="string"==typeof i.type&&"kit"===i.type.toLowerCase();let D="not tracked";P&&"number"==typeof P.quantityAvailable?D=P.quantityAvailable.toString():"number"==typeof i.totalInventory&&i.totalInventory>0&&(D=i.totalInventory.toString());const T=i.createdAt?new Date(i.createdAt).toLocaleDateString():"not tracked",z=i.variants.find(e=>e.shopifyId===(null==P?void 0:P.id)),F=(0,l.cn)("p-8 pt-20 relative space-y-4 overflow-y-auto text-primary",s);return(0,O.jsxs)("div",{className:F,children:[(0,O.jsxs)("div",{className:"image-wrapper mb-8 relative bg-white rounded-md border border-primary",children:[j&&(0,O.jsx)("div",{className:"z-10 rotate-12 uppercase text-xs flex text-primary items-center justify-center bg-yellow rounded-full p-2 font-bold aspect-square absolute top-1 right-1 -translate-y-1/2 translate-x-1/2",children:"New"}),(0,O.jsx)(fe,{product:i,containerWidth:u})]}),(0,O.jsxs)("div",{className:"space-y-0.5 text-center",children:[(0,O.jsx)("h3",{className:"text-base leading-snug",children:N(i)}),(0,O.jsx)("p",{className:"leading-tight text-sm",children:y})]}),C&&(0,O.jsxs)("div",{role:"status",className:"max-w-sm animate-pulse",children:[(0,O.jsx)("div",{className:"h-7 bg-accent rounded-md  w-32"}),i.variants.length>
11&&(0,O.jsx)("div",{className:"h-9 bg-accent rounded-md  mt-4"}),(0,O.jsx)("span",{className:"sr-only",children:"Loading..."})]}),(null==w?void 0:w.length)&&w.map((e,t)=>"Default Title"===e.selectedValue?null:(0,O.jsx)(ge,{option:e.option,onChange:n=>k(t,e.option,n),value:e.selectedValue},t)).filter(Boolean),(0,O.jsx)(Pe,{title:i.title}),(0,O.jsx)("div",{className:"hidden",children:(0,O.jsx)(K,{value:v,onChange:g,disabled:A})}),(0,O.jsx)(E.E0,{disabled:C||S,onClick:()=>{p(!0),setTimeout(()=>{const e=z||i.variants[0];b(e,v),o(!0),p(!1),h(!0)},500)},type:"primary",className:"relative w-full",children:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("span",{className:(0,l.cn)("",m&&"invisible"),children:C?(0,O.jsx)(L.IconSpinner,{className:"w-5 mx-auto animate-spin"}):S?"Out of stock":(0,O.jsxs)(O.Fragment,{children:["Add to cart",P&&(0,O.jsxs)("span",{className:"text-sm",children:[" ","–"," ",A?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("span",{className:"line-through",children:(0,O.jsx)(B,{price:P.price.amount})})," ",(0,O.jsx)("span",{className:"text-green font-bold",children:"FREE"})]}):(0,O.jsx)(B,{price:P.price.amount})]})]})}),(0,O.jsx)(R,{className:(0,l.cn)("invisible absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2",m&&"visible")})]})}),!C&&S&&(0,O.jsx)(ce,{variant:z,product:i}),f&&!S&&(0,O.jsx)("div",{className:"text-center py-2",children:(0,O.jsx)("button",{onClick:()=>{null==d||d(),h(!1)},className:"text-red dark:text-yellow font-semibold hover:underline text-sm",children:"Go to cart →"})}),(0,O.jsxs)("div",{className:"grid grid-cols-4 gap-y-1 gap-x-2 text-sm [&_a]:underline [&_a]:font-semibold",children:[(0,O.jsx)("div",{className:"text-secondary",children:"Available"}),(0,O.jsx)("div",{className:"col-span-3",children:D}),I&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("div",{className:"text-secondary",children:"Brand"}),(0,O.jsx)("div",{className:"col-span-3",children:I})]}),M&&"string"==typeof M&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("div",{className:"text-secondary",children:"Model info"}),(0,O.jsx)("div",{className:"col-span-3",children:M.split("\n").map((e,t)=>(0,O.jsx)("div",{children:e},t))})]}),i.createdAt&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("div",{className:"text-secondary",children:"Added on"}),(0,O.jsx)("div",{className:"col-span-3",children:T})]}),i.description&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("div",{className:"text-secondary",children:"Description"}),(0,O.jsx)("div",{className:"col-span-3 product-description",dangerouslySetInnerHTML:{__html:i.descriptionHtml}})]})]}),(null===(n=i.imageProducts)||void 0===n?void 0:n.length)>0&&(0,O.jsxs)("div",{className:"border-t border-primary pt-4 mt-4",children:[(0,O.jsx)("h3",{className:"text-base text-center mb-0",children:"See something else you liked?"}),(0,O.jsx)("p",{className:"mt-0 text-secondary text-sm text-center",children:"You may have spotted these other fine PostHog products in the photos above."}),(0,O.jsx)("ul",{className:"list-none m-0 p-0 grid grid-cols-2 gap-x-2",children:null===(r=i.imageProducts)||void 0===r?void 0:r.filter(Boolean).map(e=>{const{handle:t}=e,n=e.featuredImage;return(0,O.jsx)("li",{children:(0,O.jsx)(Ce.A,{to:"?product="+t,children:(0,O.jsx)(Me,{alt:t,image:n})})},t)})})]})]})}function De(e){const{className:t,product:n,updateURL:r}=e,{0:s,1:i}=(0,a.useState)(!1);return n?(0,O.jsx)("div",{className:(0,l.cn)("absolute inset-0 bg-light dark:bg-accent-dark border-l border-primary shadow-xl",s&&"overflow-hidden"),children:(0,O.jsxs)("div",{className:(0,l.cn)("w-[200%] h-full flex [&>*]:[flex-basis:50%] [&>*]:flex-shrink-0 absolute left-0 top-0 transition duration-300 ease-out‘",s&&"-translate-x-1/2 ease-out",t),children:[(0,O.jsx)(Ae,{product:n,onClick:function(){i(e=>!e)},setIsCart:i,updateURL:r}),(0,O.jsx)(ae,{className:"h-full overflow-y-scroll"})]})}):null}function Ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Ee(Object(n),!0).forEach(function(t){(0,i.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ee(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Te(e){const{className:t,products:n,onProductClick:r,selectedProduct:s}=e,{0:i,1:c}=(0,a.useState)({isOpen:!1,product:null,animateOpen:!0}),d=e=>{if(r)r(e);else{if("undefined"!=typeof window){const t=new URL(window.location.href);t.searchParams.set("product",e.handle),window.history.pushState({},"",t)}c({product:e,isOpen:!0})}},u=(0,l.cn)("grid @xs:grid-cols-2 @2xl:grid-cols-3 @4xl:grid-cols-4 @7xl:grid-cols-5 @2xl:gap-1 p-2",t);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)("div",{className:u,children:[(0,O.jsx)(A,{}),n.map((e,t)=>{let n=!1;return t%4!=2&&t%4!=3||(n=!0),(0,O.jsx)(C,{className:(0,l.cn)(n&&" sm:[&_.image-wrapper]:aspect-square"),product:e,onClick:()=>d(e),selected:(null==s?void 0:s.shopifyId)===e.shopifyId},e.shopifyId)})]}),!r&&(0,O.jsx)(o._,{removeScroll:!0,isOpen:i.isOpen,animateOpen:i.animateOpen,onClose:()=>{const e=new URL(window.location.href);e.searchParams.delete("product"),window.history.pushState({},"",e),c(e=>Le(Le({},e),{},{isOpen:!1,animateOpen:!0}))},children:(0,O.jsx)(De,{className:"",product:i.product,updateURL:d})})]})}var ze=n(8462),Fe=n(1350),_e=n(14038),Re=n(93058),qe=n(5356),Ve=n(4856),Ue=n(59145),We=n(2074),He=n(8275),Ge=n(11826),Be=n(40232),$e=n.n(Be);function Ye(e){let{orders:t}=e;const n=e=>(parseFloat(e)||0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}),r=e=>{if(!e)return"Processing";return{fulfilled:"Shipped",unfulfilled:"Processing","partially fulfilled":"Partially fulfilled",scheduled:"Scheduled","on hold":"On hold"}[e.toLowerCase()]||"Processing"};return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)("div",{className:"grid grid-cols-1 @xl:grid-cols-2 gap-4 p-4",children:t.map(e=>{const t=e.orderDetails;return(0,O.jsx)("a",{href:t.orderStatusUrl||e.statusURL,target:"_blank",rel:"noopener noreferrer",className:"group active:translate-y-[1px]",children:(0,O.jsx)("article",{className:"bg-white dark:bg-black/40 relative h-full",style:{clipPath:"polygon(0% 1.3%, 1.25% 0.3%, 3% 1.5%, 4.5% 0.2%, 6.25% 1.2%, 8% 0.5%, 9.5% 1.3%, 11.25% 0.3%, 13% 1%, 14.5% 0.2%, 16.25% 1.5%, 18% 0.7%, 19.5% 1.3%, 21.25% 0.2%, 23% 1.2%, 24.5% 0.5%, 26.25% 1.3%, 28% 0.2%, 29.5% 1%, 31.25% 1.5%, 33% 0.3%, 34.5% 1.2%, 36.25% 0.7%, 38% 1.3%, 39.5% 0.2%, 41.25% 1%, 43% 1.5%, 44.5% 0.5%, 46.25% 1.3%, 48% 0.3%, 49.5% 1.2%, 51.25% 0.2%, 53% 1.3%, 54.5% 0.7%, 56.25% 1.5%, 58% 0.3%, 59.5% 1%, 61.25% 0.5%, 63% 1.3%, 64.5% 0.2%, 66.25% 1.2%, 68% 0.7%, 69.5% 1.5%, 71.25% 0.3%, 73% 1%, 74.5% 0.5%, 76.25% 1.3%, 78% 0.2%, 79.5% 1.2%, 81.25% 0.7%, 83% 1.5%, 84.5% 0.3%, 86.25% 1%, 88% 0.5%, 89.5% 1.3%, 91.25% 0.2%, 93% 1.2%, 94.5% 0.7%, 96.25% 1.5%, 98% 0.3%, 100% 1%, 100% 99%, 98% 99.7%, 96.25% 98.5%, 94.5% 99.3%, 93% 98.8%, 91.25% 99.8%, 89.5% 98.7%, 88% 99.5%, 86.25% 99%, 84.5% 99.8%, 83% 98.5%, 81.25% 99.3%, 79.5% 98.8%, 78% 99.8%, 76.25% 98.7%, 74.5% 99.5%, 73% 99%, 71.25% 99.7%, 69.5% 98.5%, 68% 99.3%, 66.25% 98.8%, 64.5% 99.8%, 63% 98.7%, 61.25% 99.5%, 59.5% 99%, 58% 99.7%, 56.25% 98.5%, 54.5% 99.3%, 53% 98.7%, 51.25% 99.8%, 49.5% 98.8%, 48% 99.7%, 46.25% 98.7%, 44.5% 99.5%, 43% 98.5%, 41.25% 99%, 39.5% 99.8%, 38% 98.7%, 36.25% 99.3%, 34.5% 98.8%, 33% 99.7%, 31.25% 98.5%, 29.5% 99%, 28% 99.8%, 26.25% 98.7%, 24.5% 99.5%, 23% 98.8%, 21.25% 99.8%, 19.5% 98.7%, 18% 99.3%, 16.25% 98.5%, 14.5% 99.8%, 13% 99%, 11.25% 99.7%, 9.5% 98.7%, 8% 99.5%, 6.25% 98.8%, 4.5% 99.8%, 3% 98.5%, 1.25% 99.7%, 0% 99%)"},children:(0,O.jsxs)("div",{className:"p-6 font-mono text-sm",children:[(0,O.jsx)("header",{className:"text-center mb-6",children:(0,O.jsx)("div",{className:"flex justify-center",children:(0,O.jsx)(Ge.g,{variant:"mono",color:"currentColor",width:"auto",className:"text-primary"})})}),(0,O.jsx)("section",{className:"mb-3",children:(0,O.jsxs)("dl",{className:"space-y-1 text-xs",children:[(0,O.jsxs)("div",{className:"flex justify-between",children:[(0,O.jsx)("dt",{className:"text-muted",children:"Order #:"}),(0,O.jsx)("dd",{className:"font-medium",children:t.orderNumber})]}),(0,O.jsxs)("div",{className:"flex justify-between",children:[(0,O.jsx)("dt",{className:"text-muted",children:"Date:"}),(0,O.jsx)("dd",{className:"font-medium",children:(a=t.createdAt,$e()(a).format("MMM D, YYYY h:mm A"))})]}),(0,O.jsxs)("div",{className:"flex justify-between",children:[(0,O.jsx)("dt",{className:"text-muted",children:"Email:"}),(0,O.jsx)("dd",{className:"font-medium truncate ml-2",children:t.email})]}),(0,O.jsxs)("div",{className:"flex justify-between",children:[(0,O.jsx)("dt",{className:"text-muted",children:"Status:"}),(0,O.jsx)("dd",{className:"font-medium",children:t.isDelivered?"Delivered":r(t.fulfillmentStatus)})]})]})}),(0,O.jsxs)("section",{className:"border-t border-b border-dotted border-primary py-3 mb-3",children:[(0,O.jsx)("h4",{className:"text-xs text-muted mb-2 font-semibold",children:"ITEMS"}),(0,O.jsx)("ul",{className:"space-y-2",children:t.lineItems.map(e=>(0,O.jsxs)("li",{children:[(0,O.jsxs)("div",{className:"flex justify-between items-start",children:[(0,O.jsxs)("div",{className:"flex-1 pr-2",children:[(0,O.jsx)("h5",{className:"font-medium text-xs leading-tight",children:e.name}),(0,O.jsxs)("p",{className:"text-xs text-muted m-0 mt-1",children:[e.sku&&e.sku+" • ","Qty: ",e.quantity]})]}),(0,O.jsxs)("div",{className:"flex flex-col",children:[(0,O.jsxs)("span",{className:"text-right font-medium text-xs",children:["$",n(e.price)]}),e.quantity>1&&(0,O.jsxs)("span",{className:"text-xs text-muted mt-1 ml-2",children:["$",n(e.totalPrice)]})]})]}),parseFloat(e.totalDiscount)>0&&(0,O.jsx)("div",{className:"text-xs text-muted mt-1 ml-2",children:(0,O.jsxs)("div",{className:"flex justify-between",children:[(0,O.jsx)("span",{children:"Discount:"}),(0,O.jsxs)("span",{children:["-$",n(e.totalDiscount)]})]})})]},e.id))})]}),(0,O.jsx)("section",{children:(0,O.jsxs)("dl",{className:"space-y-3 text-xs",children:[(0,O.jsxs)("div",{className:"flex justify-between",children:[(0,O.jsx)("dt",{className:"text-muted",children:"Subtotal:"}),(0,O.jsxs)("dd",{className:"font-medium",children:["$",n(t.subtotalPrice)]})]}),parseFloat(t.totalDiscounts)>0&&(0,O.jsxs)("div",{className:"flex justify-between !mt-1",children:[(0,O.jsx)("dt",{className:"text-muted",children:"Discounts:"}),(0,O.jsxs)("dd",{className:"font-medium",children:["-$",n(t.totalDiscounts)]})]}),parseFloat(t.totalTax)>0&&(0,O.jsxs)("div",{className:"flex justify-between !mt-1",children:[(0,O.jsxs)("dt",{className:"text-muted",children:["Taxes",t.taxesIncluded?" (included)":""]}),(0,O.jsxs)("dd",{className:"font-medium",children:["$",n(t.totalTax)]})]}),(0,O.jsxs)("div",{className:"flex justify-between border-t border-dotted border-primary pt-3 font-bold",children:[(0,O.jsx)("dt",{children:"Total:"}),(0,O.jsxs)("dd",{children:["$",n(t.totalPrice)]})]})]})}),t.orderStatusUrl&&(0,O.jsx)("section",{className:"mt-3 pt-3 border-t border-dotted border-primary",children:(0,O.jsx)("div",{className:"text-xs group-hover:underline block text-center",children:"View order status →"})}),(0,O.jsx)("footer",{className:"text-center mt-3 pt-3 border-t border-dotted border-primary",children:(0,O.jsx)("p",{className:"text-xs text-muted m-0",children:"Thank y
1ou for your order!"})})]})})},e.id);var a})})})}var Xe=n(83795),Je=n(76761);const Qe={all:{label:"All products",icon:"IconShop",color:"blue",order:1,slug:"all"},Apparel:{label:"Apparel",icon:"IconShirt",color:"purple",order:2,slug:"apparel"},Stickers:{label:"Stickers",icon:"IconSticker",color:"yellow",order:3,slug:"stickers"},Goods:{label:"Goods",icon:"IconMug",color:"orange",order:4,slug:"goods"},Novelty:{label:"Novelty",icon:"IconCouch",color:"teal",order:5,slug:"novelty"}};function Ze(e,t){return e.find(e=>e.handle===t)||null}function Ke(e){if("undefined"!=typeof window){const n=new URL(window.location.href);var t;if(n.searchParams.delete("product"),n.searchParams.delete("state"),n.searchParams.delete("category"),e.product&&n.searchParams.set("product",e.product),e.state&&n.searchParams.set("state",e.state),e.category&&"all"!==e.category)n.searchParams.set("category",(null===(t=Qe[e.category])||void 0===t?void 0:t.slug)||e.category.toLowerCase());window.history.pushState({},"",n.toString())}}const et=[{title:"About our merch",content:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("p",{className:"text-sm mb-2",children:"A tech startup with merch you actually want to wear? Now that's a novel idea..."}),(0,O.jsx)("p",{className:"text-sm mb-0",children:"We won't stop until our merch store reaches product-market fit."})]})},{title:"Shipping",content:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)("p",{className:"prose dark:prose-invert text-primary text-sm mb-2",children:["Merch is shipped from Ohio via our fulfillment partner,"," ",(0,O.jsx)("a",{href:"https://www.micromerch.com/",target:"_blank",rel:"noopener noreferrer",children:"MicroMerch"}),"."]}),(0,O.jsx)("p",{children:(0,O.jsx)("strong",{children:"Estimated shipping times:"})}),(0,O.jsxs)("div",{className:"grid grid-cols-2 gap-2 mb-2",children:[(0,O.jsx)("strong",{children:"Within the US:"}),(0,O.jsx)("span",{children:"1 week"}),(0,O.jsx)("strong",{children:"Outside the US:"}),(0,O.jsx)("span",{children:"2 weeks"})]})]})},{title:"Returns & cancellations",content:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("p",{children:"Returns?? We've literally never had a return. Not sure if it's because our products are that awesome or because we don't have an official return policy."}),(0,O.jsxs)("p",{children:["But if you need to cancel or return something, you can"," ",(0,O.jsx)(Ce.A,{to:"/merch/orders",state:{newWindow:!0},className:"font-semibold underline",children:"look up your order"})," ","and handle it yourself."]})]})}],tt=e=>{let{content:t}=e;return t?Array.isArray(t)?(0,O.jsx)(Re.nD,{"data-scheme":"primary",type:"multiple",className:"[&>*:first-child_button]:!pt-0",triggerClassName:"!text-sm !font-semibold",contentClassName:"!text-sm [&_p]:!text-sm",items:t.map((e,t)=>({value:"item-"+t,trigger:e.title,content:e.content}))}):(0,O.jsx)(O.Fragment,{children:t}):null},nt=396;function rt(e){var t,n;const{pageContext:r}=e,{0:i,1:o}=(0,a.useState)(null),{0:l,1:c}=(0,a.useState)(!1),{0:d,1:u}=(0,a.useState)(!1),{0:m,1:p}=(0,a.useState)("all"),{0:f,1:h}=(0,a.useState)(!1),{0:x,1:g}=(0,a.useState)(""),{0:b,1:y}=(0,a.useState)(nt),{0:j,1:w}=(0,a.useState)([]),{appWindow:N}=(0,qe.ox)(),{isMobile:k}=(0,He.nm)(),{getJwt:P,user:C}=(0,Xe.Jd)(),S=k||(null==N||null===(t=N.size)||void 0===t?void 0:t.width)&&N.size.width<=768,I=(0,q.x)(e=>e.update),M=(0,a.useRef)(!1),A=(null==N||null===(n=N.path)||void 0===n?void 0:n.replace(/^\//,""))||"",D=r.productsForCurrentPage,E=(0,a.useMemo)(()=>null==D?void 0:D.map(e=>ne(e)),[D]),L=(0,a.useMemo)(()=>new We.A(D,{keys:["title","description","id"],includeMatches:!0,threshold:.3}),[D]);(0,a.useEffect)(()=>{if("undefined"!=typeof window&&E&&!f){const n=new URLSearchParams(window.location.search),r=n.get("product"),a=n.get("state"),s=n.get("category"),i=n.get("add"),l=n.get("variant"),d=parseInt(n.get("qty")||"1",10)||1;if(s){var e;const t=null===(e=Object.entries(Qe).find(e=>{let[t,n]=e;return n.slug===s.toLowerCase()}))||void 0===e?void 0:e[0];t&&Qe[t]&&p(t)}if(i&&!M.current){var t;const e=Ze(E,i);if(e&&(null===(t=e.variants)||void 0===t?void 0:t.length)>0){let t=e.variants[0];if(l){const n=e.variants.find(e=>e.shopifyId===l||e.id===l);n&&(t=n)}
1I(t,d),M.current=!0,c(!0),o(null);const n=new URL(window.location.href);n.searchParams.delete("add"),n.searchParams.delete("variant"),n.searchParams.delete("qty"),n.searchParams.set("state","cart"),window.history.replaceState({},"",n.toString())}}else if(r){const e=Ze(E,r);e&&(o(e),c(!1))}else"cart"===a&&(c(!0),o(null));h(!0)}},[E,f,I]),(0,a.useEffect)(()=>{"undefined"!=typeof window&&f&&Ke(i?{product:i.handle,category:m}:l?{state:"cart",category:m}:{category:m})},[i,l,m,f]);const T=(0,a.useMemo)(()=>{const e=new Set;e.add("all"),null==E||E.forEach(t=>{const n=v(t,"product","category");if(n&&"string"==typeof n)e.add(n);else{var r,a;const n=null===(r=t.metafields)||void 0===r?void 0:r.find(e=>"category"===e.key);n&&"string"==typeof n.value?e.add(n.value):null!==(a=t.category)&&void 0!==a&&a.name?e.add(t.category.name):t.type&&e.add(t.type)}});return[{label:"Categories",items:Array.from(e).filter(e=>Qe[e]).sort((e,t)=>Qe[e].order-Qe[t].order).map(e=>{const t=Qe[e];return{value:e,label:t.label,icon:t.icon,color:t.color}})}]},[E]),z=(0,a.useMemo)(()=>{let e=E;var t;"all"!==m&&(e=null===(t=e)||void 0===t?void 0:t.filter(e=>{var t,n;const r=v(e,"product","category");if(r&&"string"==typeof r)return r===m;const a=null===(t=e.metafields)||void 0===t?void 0:t.find(e=>"category"===e.key);return a&&"string"==typeof a.value?a.value===m:null!==(n=e.category)&&void 0!==n&&n.name?e.category.name===m:!!e.type&&e.type===m}));return""!==x.trim()&&e?L.search(x).map(e=>e.item):e},[E,m,x]),F=e=>{o(e),u(!1),c(!1)},_=()=>{c(!0),u(!1),o(null)},R=()=>c(!1),V=()=>{u(!1),c(!1),o(null)},U=(0,a.useMemo)(()=>{var e;return null!=N&&null!==(e=N.size)&&void 0!==e&&e.width&&N.size.width<=768?_e.A:a.Fragment},[N]),W=_e.A;return(0,a.useEffect)(()=>{C&&(async()=>{try{const{data:e}=await fetch("https://better-animal-d658c56969.strapiapp.com/api/orders",{headers:{Authorization:"Bearer "+await P()}}).then(e=>e.json());w(e)}catch(e){console.error("Failed to fetch orders:",e),w([])}})()},[C]),(0,O.jsxs)("div",{className:"@container w-full h-full flex flex-col min-h-1 border-t border-primary",children:[(0,O.jsx)(Fe.A,{showBack:!0,showForward:!0,showCustomLeft:(0,O.jsx)("h1",{className:"text-primary",children:"Merch store"}),onCartOpen:_,onCartClose:R,isCartOpen:l,isOrderHistoryOpen:d,onOrderHistoryOpen:()=>{u(!0),c(!1),o(null)},onOrderHistoryClose:V,showCart:!0,showOrderHistory:(null==j?void 0:j.length)>0,showSearch:!0,onSearch:e=>{g(e)}}),(0,O.jsx)(Ue.A,{selectOptions:T,currentPath:A,handleValueChange:e=>{p(e)},selectedCategory:m}),(0,O.jsx)(U,{children:(0,O.jsxs)("div",{"data-scheme":"secondary",className:"flex flex-col @3xl:flex-row-reverse flex-grow min-h-0",children:[!S&&(l||i||d)&&(0,O.jsxs)(s.P.aside,{"data-scheme":"secondary",className:"not-prose bg-primary border-l border-primary h-full text-primary relative",style:{width:b},initial:!1,children:[(0,O.jsx)("div",{className:"h-full flex flex-col",children:(0,O.jsx)("div",{className:"flex-1 overflow-auto",children:l?(0,O.jsx)(ae,{className:"h-full overflow-y-auto"}):d?(0,O.jsx)("div",{className:"h-full overflow-y-auto @container",children:(0,O.jsx)(Ye,{orders:j})}):i?(0,O.jsx)(Ae,{product:i,setIsCart:()=>{},onClick:()=>{},updateURL:F,onCartOpen:_,className:"!p-4 !pt-4",containerWidth:b}):null})}),(0,O.jsx)(s.P.div,{"data-scheme":"tertiary",className:"w-1.5 cursor-ew-resize top-0 left-0 !transform-none absolute z-20 h-full hover:bg-accent active:bg-accent",drag:"x",dragMomentum:!1,dragConstraints:{left:0,right:0},onDrag:(e,t)=>{var n;const r=Math.max(Math.min(b-t.delta.x,((null==N||null===(n=N.size)||void 0===n?void 0:n.width)||0)/2),nt);y(r)}})]}),S&&(0,O.jsx)(Je.A,{isOpen:l||null!==i||d,onClose:()=>{l&&R(),i&&o(null),d&&V()},title:l?"Cart":d?"Order History":(null==i?void 0:i.title)||"Product",children:l?(0,O.jsx)(ae,{className:"h-full overflow-y-auto"}):d?(0,O.jsx)("div",{className:"h-full overflow-y-auto @container",children:(0,O.jsx)(Ye,{orders:j})}):i?(0,O.jsx)(Ae,{product:i,setIsCart:()=>{},onClick:()=>{},updateURL:F,onCartOpen:_,className:"!p-4 !pt-4",containerWidth:b}):null}),(0,O.jsx)("main",{"data-app":"Explorer","data-scheme":"primary",className:"@container flex-1 bg-primary relative h-full",children:(0,O.jsx)(W,{children:(0,O.jsxs)("div",{className:(0,Ve.WN)()+" max-w-none h-full",children:[(0,O.jsx)(ze.Ay,{title:"Merch - PostHog",image:"/images/merch.png"}),(0,O.jsx)("div",{className:"flex gap-4",children:(0,O.jsx)("div",{className:"@container flex-1 not-prose",children:(0,O.jsx)(Te,{products:z,onProductClick:F,selectedProduct:i})})})]})})}),et&&(0,O.jsx)("aside",{"data-scheme":"secondary",className:"@3xl:w-64 w-full bg-primary  @3xl:border-r border-t @3xl:border-t-0 border-primary h-full",children:(0,O.jsx)(_e.A,{className:"p-4",children:(0,O.jsx)(tt,{content:et})})})]})})]})}var at=n(9287);function st(e){let{data:t}=e;const n=(0,q.x)(e=>e.setDiscountCode),{search:s}=(0,at.useLocation)(),i=t.main,o=t.kits;if(!i||!o)return null;const{products:l,handle:c}=i,d=(0,a.useMemo)(()=>{const e=new URLSearchParams(s).get("product"),t=e?o.products.find(t=>t.handle===e):null;return t?(t.kit=!0,[t]):[]},[]);return(0,a.useEffect)(()=>{const e=new URLSearchParams(s).get("coupon");e&&n(e)},[]),(0,O.jsx)(rt,{pageContext:{handle:c,productsForCurrentPage:[].concat((0,r.A)(l),(0,r.A)(d))}})}},76761:function(e,t,n){var r=n(59527),a=n(9716),s=n(39106),i=n(49271),o=n(86070);t.A=e=>{let{isOpen:t,onClose:n,title:l,children:c,className:d=""}=e;return(0,o.jsx)(a.N,{children:t&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.P.div,{className:"fixed inset-0 bg-black/50 z-40",initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},onClick:n}),(0,o.jsxs)(r.P.div,{className:"fixed bottom-0 left-0 right-0 z-50 bg-primary border border-primary rounded-t-md max-h-[80vh] flex flex-col mx-1 "+d,"data-scheme":"secondary",initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:30,stiffness:300},children:[(0,o.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 border-b border-primary flex-shrink-0",children:[(0,o.jsx)("h3",{className:"text-lg font-semibold text-primary",children:l}),(0,o.jsx)(s.A,{icon:(0,o.jsx)(i.IconX,{}),onClick:n})]}),(0,o.jsx)("div",{className:"flex-1 min-h-0 overflow-auto text-primary",children:c})]})]})})}}}]);
2//# sourceMappingURL=component---src-pages-merch-tsx-741ccb262eb318d4efb5.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.