PageSourceSearch

https://cdn.shapermint.com/ssr/v8.51.4/_next/static/chunks/pages/a…/manage-memberships-c275d3ba6bdb8a0d.js

js shapermint.com collected 2026-10-01 10:24:52 UTC 125,499 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4741],{9182:function(e,n,t){"use strict";t.d(n,{t:function(){return f}});var i,l,s,o,r=t(97582),a=t(85893),c=t(67294),d=t(72832),u=t(83566),_=t(26601),h=t(54350),p=_.Z.div(i||(i=(0,r.cy)(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  user-select: none;\n"],["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  user-select: none;\n"]))),m=_.Z.div(l||(l=(0,r.cy)(["\n  width: 0.531rem;\n  height: 0.875rem;\n  display: flex;\n  align-items: center;\n  cursor: pointer;\n"],["\n  width: 0.531rem;\n  height: 0.875rem;\n  display: flex;\n  align-items: center;\n  cursor: pointer;\n"]))),C=_.Z.div(s||(s=(0,r.cy)(["\n  display: flex;\n  ",";\n"],["\n  display: flex;\n  ",";\n"])),(0,h.w)({margin:["0 0.75rem","0 1.25rem"]})),x=_.Z.span(o||(o=(0,r.cy)(["\n  font-weight: ",";\n  color: ",";\n  text-align: center;\n  cursor: pointer;\n  margin: 0 2px;\n  border-bottom: ",";\n  ",";\n  background: ",";\n"],["\n  font-weight: ",";\n  color: ",";\n  text-align: center;\n  cursor: pointer;\n  margin: 0 2px;\n  border-bottom: ",";\n  ",";\n  background: ",";\n"])),function(e){return e.bold?"700":"500"},function(e){return e.color},function(e){var n=e.underline,t=e.borderColor;return n?"0.063rem solid ".concat(t):"none"},(0,h.w)({fontSize:["1rem","1.25rem"],lineHeight:["1.5rem","1.75rem"],minWidth:["1.5rem","1.875rem"]}),function(e){return e.background||"unset"}),f=function(e){var n=e.from,t=e.to,i=e.currentPage,l=e.onChange,s=e.underlineActive,o=void 0===s||s,_=e.boldActive,h=void 0===_||_,f=e.disabled,v=void 0!==f&&f,g=e.showReducedPages,b=void 0!==g&&g,S=(0,d.Fg)(),y=(0,c.useState)(void 0===i?n:i),E=y[0],T=y[1],M=function(e){v||e<n||e>t||(T(e),l(e))},j=(0,c.useMemo)(function(){if(!b)return[];var e=[];return Array(t-n+1).fill(0).map(function(t,i){n+i>E-3&&n+i<E+3&&e.push(n+i)}),e[0]===n+3-1?e=[n,n+1].concat(e):e[0]>n+3-1?e=[n,-2].concat(e):e[0]===n+1&&(e=[n].concat(e)),e[e.length-1]===t-3+1?e=e.concat([t-1,t]):e[e.length-1]<t-3+1?e=e.concat([-2,t]):e[e.length-1]===t-1&&(e=e.concat([t])),e},[n,E,b,t]);return(0,a.jsxs)(p,(0,r.pi)({"data-testid":"PaginationContainer"},{children:[(0,a.jsx)(m,(0,r.pi)({onClick:function(){return M(E-1)},"data-testid":"LeftChevron"},{children:(0,a.jsx)(u.J.Arrows.ChevronLeft,{fill:v?S.colors.shades[250].color:S.colors.shades[700].color},void 0)}),void 0),!b&&(0,a.jsx)(C,(0,r.pi)({"data-testid":"PageNumbersContainer",theme:S},{children:Array(t-n+1).fill(0).map(function(e,t){return(0,a.jsx)(x,(0,r.pi)({onClick:function(){return M(t+n)},bold:h&&E===t+n,underline:o&&E===t+n,role:"button",color:v?S.colors.shades[250].color:S.colors.shades[700].color,borderColor:v?S.colors.shades[250].color:S.colors.shades[700].color,theme:S},{children:t+n}),t)})}),void 0),b&&(0,a.jsx)(C,(0,r.pi)({"data-testid":"PageNumbersContainer",theme:S},{children:j.map(function(e,n){return(0,a.jsx)(x,(0,r.pi)({onClick:function(){return M(e)},bold:h&&E===e,underline:o&&E===e,role:"button",color:v?S.colors.shades[250].color:S.colors.shades[700].color,borderColor:v?S.colors.shades[250].color:S.colors.shades[700].color,theme:S},{children:-2!==e?e:"..."}),n)})}),void 0),(0,a.jsx)(m,(0,r.pi)({onClick:function(){return M(E+1)},"data-testid":"RightChevron"},{children:(0,a.jsx)(u.J.Arrows.ChevronRight,{fill:v?S.colors.shades[250].color:S.colors.shades[700].color},void 0)}),void 0)]}),void 0)}},37224:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/manage-memberships",function(){return t(48937)}])},71218:function(e,n,t){"use strict";t.d(n,{o:function(){return i}});let i=e=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(String(e).toLowerCase())},48937:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return lh},default:function(){return lp}});var i={};t.r(i),t.d(i,{cancelConfirmationOptionsInitialValue:function(){return i9},cancelOptions:function(){return i0},clubPlusReasons:function(){return i3},feedbackInitialValue:function(){return i1},getFeedbackValues:function(){return i2}});
1var l=t(85893),s=t(67294),o=t(11163),r=t(28825),a=t(57742),c=t(72832),d=t(60814),u=t(91769),_=t(80496),h=t(19927),p=t(87027);let m=e=>{let{height:n=32,width:t=239,fill:i=""}=e;return(0,l.jsxs)("svg",{width:t,height:n,viewBox:"0 0 253 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M151.518 6.6611C153.221 6.6611 154.602 5.28189 154.602 3.58055C154.602 1.87921 153.221 0.5 151.518 0.5C149.814 0.5 148.433 1.87921 148.433 3.58055C148.433 5.28189 149.814 6.6611 151.518 6.6611Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M65.152 25.9616H60.9029L60.9344 23.7926C60.5882 24.7671 58.2591 26.4646 55.4894 26.4646C50.8626 26.4646 47.1172 22.3781 47.1172 17.3486C47.1172 12.2877 50.8312 8.13843 56.1503 8.13843C61.438 8.13843 65.1205 12.2877 65.1205 17.3486V25.9616H65.152ZM56.1503 12.3192C53.6638 12.3192 51.618 14.4881 51.618 17.3801C51.618 20.1777 53.6638 22.2838 56.1503 22.2838C58.6368 22.2838 60.6512 20.1148 60.6512 17.3801C60.6512 14.6139 58.6368 12.3192 56.1503 12.3192Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M145.978 25.9616H141.478V15.6512C141.478 14.6453 141.131 12.2249 137.984 12.3192C136.19 12.382 134.774 13.8909 134.774 15.6826V25.9616H130.304V15.6512C130.304 14.6767 129.989 12.3192 127.031 12.3192C125.017 12.3192 123.632 13.6708 123.632 15.6512V25.9616H119.131V15.9655C119.131 11.5019 122.215 8.13843 127.031 8.13843C129.423 8.13843 131.343 9.08145 132.602 10.6217C133.924 9.08145 135.907 8.13843 138.173 8.13843C143.083 8.13843 145.978 11.3761 145.978 15.9655V25.9616Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M164.894 8.16968C169.804 8.16968 172.7 11.376 172.7 15.9654V25.9614H168.199V15.8711C168.199 14.8652 167.853 12.3504 164.705 12.3504C162.911 12.3504 161.495 14.1422 161.495 15.9339V25.9929H156.994V15.9654C157.026 11.5017 160.142 8.16968 164.894 8.16968Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M72.6117 32.4999V24.2327C73.4615 25.1443 75.287 26.4646 77.8049 26.4646C82.4317 26.4646 86.1142 22.3467 86.1142 17.2858C86.1142 12.2563 82.4002 8.13843 77.144 8.13843C71.8248 8.13843 68.1108 12.2563 68.1108 17.2858V32.4685L72.6117 32.4999ZM77.144 22.2838C74.6575 22.2838 72.6117 20.0834 72.6117 17.2858C72.6117 14.5824 74.6575 12.3192 77.144 12.3192C79.6305 12.3192 81.6448 14.4567 81.6448 17.2858C81.6448 20.1463 79.6305 22.2838 77.144 22.2838Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M44.8195 25.9616H40.3187V15.9026C40.3187 14.8967 40.0039 12.3506 37.0768 12.3506C35.0625 12.3506 33.6776 13.9223 33.6776 15.9026V25.9616H29.1768V1.85156H33.6776V10.2445C34.5589 8.89282 36.4159 8.16983 37.9266 8.16983C42.2071 8.16983 44.8195 11.2818 44.8195 15.8712V25.9616Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M184.565 26.3073C178.931 26.8417 175.5 23.7612 175.5 18.9517V4.14624H180.001V8.67276H184.565V12.8535H180.001V19.0146C180.001 21.4665 181.827 22.3781 184.565 22.2523V26.3073Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M105.848 18.9832C105.911 18.4803 105.974 17.6315 105.974 17.2858C105.974 11.5962 101.819 8.13843 97.3501 8.13843C92.3771 8.13843 88.3799 12.2877 88.3799 17.3486C88.3799 22.4095 92.503 26.4331 98.011 26.4331C100.592 26.4331 103.488 25.5215 105.03 23.9184L102.827 20.6807C101.914 21.5294 100.749 22.2838 98.3258 22.2838C94.3915 22.2838 93.2899 19.8634 93.1955 18.9518H105.848V18.9832ZM93.101 15.6826C93.3528 14.1109 94.7377 12.3192 97.1927 12.3192C100.025 12.3192 101.347 14.2367 101.505 15.7141L93.101 15.6826Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M153.752 25.9617H151.517H149.283V17.3173V8.67285H151.517H153.752V17.3173V25.9617Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M117.651 12.3193C114.787 11.8163 112.899 13.3252 112.899 15.8085V25.9617H108.398V15.8399C108.398 10.8733 111.829 7.41556 117.651 8.13854V12.3193Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M19.0734 26.999C23.9834 27.1876 26.6588 24.2328 26.6588 20.2092C26.6588 16.1856 22.4412 14.9282 20.3639 14.2367C17.8774 13.388 15.9575 12.9164 15.9575 11.5019C15.9575 10.3703 16.9647 9.64729 18.6013 9.64729C20.175 9.64729 22.1894 10.3388 24.1408 11.5333L24.2667 11.6276L26.2181 8.10702L26.1237 8.01271C23.952 6.56674 21.1822 5.71802 18.6958 5.71802C14.4152 5.71802 11.4252 8.32705 11.4252 12.0363C11.4252 16.2799 15.7057 17.5687 17.783 18.0717C20.3009 18.6689 22.1265 19.2662 22.1265 20.8064C22.1265 22.0638 20.9619 23.1326 19.0734 22.8496C16.1149 22.441 10.8901 19.0775 7.08172 19.0775C3.77692 19.0775 1.3534 20.5235 0 23.2269L3.6825 25.1129C4.12314 24.1699 4.87852 23.2269 6.60961 23.2269C10.5439 23.2269 14.3523 26.8418 19.0734 26.999Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M197.596 26.3704C192.371 26.3704 188.625 22.3468 188.625 17.3173C188.625 12.2879 192.371 8.20142 197.596 8.20142C201.782 8.20142 204.929 10.559 205.936 14.4568H201.184C200.586 13.2938 199.201 12.2564 197.564 12.2564C195.109 12.2564 193.126 14.5511 193.126 17.3488C193.126 20.0835 195.109 22.3154 197.564 22.3154C199.201 22.3154 200.617 21.3095 201.215 20.0835H205.968C204.961 24.0757 201.813 26.3704 197.596 26.3704Z",fill:"#882A2B"}),(0,l.jsx)("path",{d:"M223.657 26.3702C218.809 26.3702 215.945 23.164 215.945 18.6374V8.64136H220.383V18.7632C220.383 19.7376 220.729 22.0638 223.657 22.0638C225.608 22.0638 227.024 20.6807 227.024 18.7632V8.64136H231.462V18.6374C231.494 23.0382 228.378 26.3702 223.657 26.3702Z",fill:"#882A2B"}),(0,l.jsx)("path",{d:"M243.328 26.3702C238.072 26.3702 234.389 22.3466 234.389 17.3172V1.85156H238.89V10.3074C240.212 8.92425 241.912 8.29557 243.957 8.29557C248.553 8.29557 252.235 12.382 252.235 17.3486C252.235 22.3466 248.553 26.3702 243.328 26.3702ZM243.328 12.382C240.873 12.382 238.89 14.6138 238.89 17.3486C238.89 20.052 240.873 22.2209 243.328 22.2209C245.783 22.2209 247.766 20.1148 247.766 17.3486C247.766 14.5195 245.783 12.382 243.328 12.382Z",fill:"#882A2B"}),(0,l.jsx)("path",{d:"M212.389 25.9616H210.155H207.92V17.3172V1.85156H210.155H212.389V17.3172V25.9616Z",fill:"#882A2B"})]})},C=e=>{let{height:n=30,width:t=233,fill:i=""}=e;
1return(0,l.jsxs)("svg",{width:t,height:n,viewBox:"0 0 254 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M143.679 8.54727C145.292 8.54727 146.6 7.27004 146.6 5.6916C146.6 4.11317 145.292 2.83594 143.679 2.83594C142.067 2.83594 140.758 4.11317 140.758 5.6916C140.758 7.27004 142.067 8.54727 143.679 8.54727Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M61.9122 26.4375H57.889L57.9201 24.4283C57.593 25.3319 55.3886 26.9065 52.7636 26.9065C48.382 26.9065 44.8379 23.1205 44.8379 18.4577C44.8379 13.7948 48.3548 9.92114 53.3906 9.92114C58.4264 9.92114 61.8849 13.7681 61.8849 18.4577V26.4413H61.916L61.9122 26.4375ZM53.3906 13.7948C51.0382 13.7948 49.0987 15.8041 49.0987 18.4843C49.0987 21.1646 51.0343 23.029 53.3906 23.029C55.7469 23.029 57.6514 21.0198 57.6514 18.4843C57.6514 15.9489 55.743 13.7948 53.3906 13.7948Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M138.434 26.4375H134.173V16.883C134.173 15.9489 133.846 13.7071 130.866 13.7948C129.168 13.852 127.829 15.2512 127.829 16.9135V26.4413H123.599V16.8868C123.599 15.9833 123.299 13.7986 120.499 13.7986C118.59 13.7986 117.282 15.053 117.282 16.8868V26.4413H113.021V17.1766C113.021 13.0399 115.942 9.92114 120.499 9.92114C122.762 9.92114 124.58 10.7943 125.772 12.224C127.022 10.7981 128.9 9.92114 131.046 9.92114C135.696 9.92114 138.438 12.9217 138.438 17.1766V26.4413L138.434 26.4375Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M156.343 9.9474C160.994 9.9474 163.732 12.9174 163.732 17.1724V26.4371H159.471V17.0847C159.471 16.1506 159.144 13.8211 156.164 13.8211C154.466 13.8211 153.126 15.4834 153.126 17.1419V26.4638H148.866V17.1685C148.897 13.0318 151.845 9.9436 156.343 9.9436V9.9474Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M68.9707 32.4962V24.8328C69.7769 25.6792 71.5023 26.903 73.8858 26.903C78.2673 26.903 81.7531 23.0866 81.7531 18.397C81.7531 13.7075 78.2362 9.91772 73.2588 9.91772C68.2814 9.91772 64.7061 13.7342 64.7061 18.397V32.4695L68.9668 32.5L68.9707 32.4962ZM73.2627 23.0294C70.9103 23.0294 68.9707 20.9896 68.9707 18.397C68.9707 15.8044 70.9064 13.7952 73.2627 13.7952C75.6189 13.7952 77.5234 15.7778 77.5234 18.397C77.5234 21.0163 75.615 23.0294 73.2627 23.0294Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M42.6586 26.4382H38.3979V17.1163C38.3979 16.1822 38.098 13.826 35.3289 13.826C33.4205 13.826 32.1119 15.2824 32.1119 17.1163V26.4382H27.8511V4.09229H32.1119V11.8701C32.9453 10.6157 34.7057 9.9485 36.1351 9.9485C40.1894 9.9485 42.6625 12.8347 42.6625 17.0858V26.4382H42.6586Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M174.965 26.757C169.629 27.2526 166.385 24.3969 166.385 19.94V6.21826H170.646V10.4122H174.965V14.2858H170.646V19.9972C170.646 22.2695 172.375 23.1159 174.965 22.9977V26.757Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M100.442 19.9678C100.5 19.5026 100.562 18.7134 100.562 18.3931C100.562 13.1202 96.6287 9.91382 92.3991 9.91382C87.6904 9.91382 83.9048 13.7608 83.9048 18.4503C83.9048 23.1399 87.8072 26.8686 93.0222 26.8686C95.4642 26.8686 98.206 26.0222 99.6665 24.5391L97.579 21.5386C96.7144 22.324 95.6122 23.0255 93.3182 23.0255C89.5949 23.0255 88.5511 20.7837 88.4616 19.9372H100.442V19.9678ZM88.372 16.91C88.6096 15.4536 89.9221 13.7913 92.2472 13.7913C94.9306 13.7913 96.1808 15.568 96.3288 16.9367L88.372 16.9062V16.91Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M145.795 26.4369H141.565V10.4124H145.795V26.4369Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M111.617 13.7951C108.906 13.3299 107.118 14.7292 107.118 17.0282V26.4378H102.857V17.0549C102.857 12.453 106.106 9.24661 111.617 9.91763V13.7913V13.7951Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M18.2872 27.3977C22.9374 27.573 25.469 24.8356 25.469 21.103C25.469 17.3704 21.4769 16.2076 19.5101 15.567C17.1577 14.7816 15.3389 14.3432 15.3389 13.0316C15.3389 11.9832 16.2931 11.3121 17.8432 11.3121C19.3933 11.3121 21.2393 11.9527 23.0893 13.0583L23.21 13.146L25.0561 9.88238L24.9665 9.7947C22.9102 8.45646 20.289 7.66724 17.9328 7.66724C13.8784 7.66724 11.0509 10.0844 11.0509 13.5235C11.0509 17.4581 15.1052 18.6515 17.072 19.1166C19.4556 19.6694 21.1848 20.2223 21.1848 21.652C21.1848 22.8187 20.0826 23.8062 18.295 23.5469C15.4947 23.1695 10.5485 20.0507 6.94198 20.0507C3.81456 20.0507 1.5167 21.3928 0.235352 23.8977L3.72109 25.6439C4.13782 24.7708 4.85444 23.8977 6.4941 23.8977C10.2174 23.8977 13.8239 27.249 18.295 27.3938L18.2872 27.3977Z",fill:"#292929"}),(0,l.jsx)("path",{d:"M187.305 26.8153C182.359 26.8153 178.811 23.0865 178.811 18.4237C178.811 13.7608 182.355 9.97485 187.305 9.97485C191.266 9.97485 194.249 12.1595 195.203 15.7739H190.705C190.14 14.6949 188.828 13.7341 187.278 13.7341C184.952 13.7341 183.075 15.8616 183.075 18.4542C183.075 21.0468 184.952 23.056 187.278 23.056C188.828 23.056 190.167 22.1219 190.732 20.9858H195.231C194.276 24.684 191.297 26.8115 187.305 26.8115V26.8153Z",fill:"#D4605B"}),(0,l.jsx)("path",{d:"M211.978 26.8151C207.39 26.8151 204.679 23.845 204.679 19.6473V10.3826H208.882V19.7655C208.882 20.6691 209.209 22.8232 211.982 22.8232C213.832 22.8232 215.171 21.5422 215.171 19.7655V10.3826H219.374V19.6473C219.405 23.7268 216.453 26.8151 211.982 26.8151H211.978Z",fill:"#D4605B"}),(0,l.jsx)("path",{d:"M230.601 26.8148C225.624 26.8148 222.138 23.0861 222.138 18.4232V4.08765H226.399V11.9264C227.649 10.6454 229.258 10.0621 231.197 10.0621C235.548 10.
10621 239.033 13.848 239.033 18.4537C239.033 23.0594 235.548 26.8148 230.601 26.8148ZM230.601 13.8518C228.276 13.8518 226.399 15.9221 226.399 18.4537C226.399 20.9853 228.276 22.9679 230.601 22.9679C232.926 22.9679 234.804 21.0158 234.804 18.4537C234.804 15.8916 232.926 13.8518 230.601 13.8518Z",fill:"#D4605B"}),(0,l.jsx)("path",{d:"M201.311 26.4382H197.081V4.09229H201.311V26.4382Z",fill:"#D4605B"}),(0,l.jsx)("path",{d:"M244.279 9.74184H240.953C239.824 9.74184 238.905 8.84587 238.905 7.73639C238.905 6.63072 239.82 5.73094 240.953 5.73094H244.279V2.50545C244.279 1.39979 245.195 0.5 246.328 0.5H246.445C247.574 0.5 248.493 1.39597 248.493 2.50545V5.73094H251.82C252.949 5.73094 253.868 6.62691 253.868 7.73639C253.868 8.84206 252.953 9.74184 251.82 9.74184H248.493V12.9673C248.493 14.073 247.578 14.9728 246.445 14.9728H246.328C245.199 14.9728 244.279 14.0768 244.279 12.9673V9.74184Z",fill:"#D4605B"})]})};var x=t(24635),f=t.n(x),v=t(39332),g=t(57829),b=t(14126),S=t(94123),y=t(96410),E=t(99521),T=t(99397),M=t(63013),j=t(98740),N=t(8077),B=t(310),w=t(61867),I=t(14761),A=e=>{let{goToManage:n}=e,{isClubMember:t,isShaperboxMember:i,autoshipMembershipIds:r,clubMembershipStarted:a,shaperboxMembershipStarted:x,email:A,clubMembershipId:R,subscriptions:L}=(0,p.q3)(),U=r.length>0,H=(0,I.lU)(null==L?void 0:L.clubMembership),P=!!t&&!H,O=P||i||U,{colors:k}=(0,c.Fg)(),{isMobile:D,isDesktop:V}=(0,y.v)({hasBooleanFlags:!0}),{locale:Z}=(0,o.useRouter)(),{localePrefix:F}=(0,w.Cm)(Z),z=(0,v.useSearchParams)().get("cancel"),{translate:W}=(0,b.T)(),q={width:V?"24px":"22px",height:V?"24px":"22px"},K=()=>{globalThis.location.assign("/account/home")};z&&n("manage-club-plus"===z?"Manage Club +":"Manage Club");let G=(0,g.U)({date:a,format:"MMMM yyyy"}),Y=(0,g.U)({date:x,format:"MMMM yyyy"});(0,s.useEffect)(()=>{let e=(0,E.getLocalStorage)("retentionOffers",{});if(null===e.clubMembership&&(0,T.Z)()){if(null==L?void 0:L.clubMembership)return;let{clubMembership:n,...i}=null!=e?e:{};(0,E.setLocalStorage)("retentionOffers",i);let l=(0,N.xK)(Z,t)&&(0,B.l)({locale:Z,isClubMember:t})?"/pages/join-club":"".concat(F,"/account/home");globalThis.location.assign(l)}},[t,Z,F,null==L?void 0:L.clubMembership]);let J=W(i||P&&U?S.dg.ACCOUNT.MEMBERSHIPS_ACTIVE_PLANS:S.dg.ACCOUNT.MEMBERSHIPS_ACTIVE_PLAN),Q=(e,n)=>(0,l.jsxs)(d.x,{variant:"body",size:"regular",weight:"demi",className:f().sectionTitleRow,children:[e,(0,l.jsx)("span",{className:f().sectionTitleIcon,children:n})]}),X=(0,l.jsx)(u.J,{name:"actions/circle_solid_clear",width:"18px",height:"18px",fill:"#5A5A5A","aria-hidden":"true"}),$=(0,l.jsx)(u.J,{name:"actions/circle_solid_check",width:"14px",height:"14px",fill:"#4CBEA4","aria-hidden":"true"});return(0,l.jsxs)(l.Fragment,{children:[V?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:f().title,children:[D&&(0,l.jsx)(_.h,{onClick:K,"aria-label":W(S.dg.COMMON.BUTTONS_GO_BACK),backgroundColor:{active:"transparent",hover:"transparent"},size:h.dr.Small,children:(0,l.jsx)(u.J,{name:"arrows/chevron_left",width:q.width,height:q.height,"aria-hidden":"true"})}),(0,l.jsx)(d.x,{variant:"heading3",weight:"demi",role:"heading","aria-level":1,children:W(S.dg.ACCOUNT.MEMBERSHIPS_TITLE)})]}),O?(0,l.jsxs)(d.x,{variant:"heading6",size:"regular",weight:"demi",style:{marginTop:"2rem"},children:[J," ",(0,l.jsx)(u.J,{name:"actions/circle_solid_check",width:"14px",height:"14px",fill:"#4CBEA4"})]}):null]}):(0,l.jsxs)("div",{className:f().mobileMembershipTitle,children:[(0,l.jsxs)("div",{className:f().title,children:[(0,l.jsx)(_.h,{onClick:K,"aria-label":W(S.dg.COMMON.BUTTONS_GO_BACK),backgroundColor:{active:"transparent",hover:"transparent"},size:h.dr.Small,children:(0,l.jsx)(u.J,{name:"arrows/chevron_left",width:q.width,height:q.height,"aria-hidden":"true"})}),(0,l.jsx)(d.x,{variant:"heading3",weight:"demi",role:"heading","aria-level":1,children:W(S.dg.ACCOUNT.MEMBERSHIPS_TITLE)})]}),(0,l.jsx)("span",{className:f().separator}),O?Q(J,$):null]}),O?(0,l.jsxs)("div",{className:f().subscriptionsContainer,children:[P&&(0,l.jsxs)("div",{className:f().subscription,children:[(0,l.jsx)("div",{className:f().subscriptionLeftSide,children:(0,l.jsxs)("div",{children:[(0,l.jsx)(m,{width:126,height:16}),(0,l.jsx)(d.x,{variant:"body",className:f().subscriptionDate,children:W(S.dg.ACCOUNT.MEMBERSHIPS_MEMBER_SINCE,{date:G})})]})}),(0,l.jsxs)("div",{className:f().subscriptionLinks,children:[(0,l.jsxs)("div",{className:f().subscriptionActiveBox,children:[(0,l.jsx)(u.J,{name:"actions/circle_check",width:"14px",height:"14px",fill:k.semantic.positive.color}),W(S.dg.ACCOUNT.MEMBERSHIPS_ACTIVE)]}),(0,l.jsx)(d.x,{variant:"link",size:"small",weight:"demi",underline:!0,id:"button-go-to-manage-club",testId:"button-go-to-manage-club",className:f().subscriptionManageText,onClick:()=>{(0,M.lQ)((0,j.Xg)({email:String(A),subscriptionType:"clubMembership",subscriptionId:R,location:"my_account"})),n("Manage Club")},children:W(S.dg.ACCOUNT.MEMBERSHIPS_CANCEL_MEMBERSHIP)})]})]}),i&&(0,l.jsxs)("div",{className:f().subscription,children:[(0,l.jsx)("div",{className:f().subscriptionLeftSide,children:(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{width:126,height:16}),(0,l.jsx)(d.x,{variant:"body",className:f().subscriptionDate,children:W(S.dg.ACCOUNT.MEMBERSHIPS_MEMBER_SINCE,{date:Y})})]})}),(0,l.jsxs)("div",{className:f().subscriptionLinks,children:[(0,l.jsxs)("div",{className:f().subscriptionActiveBox,children:[(0,l.jsx)(u.J,{name:"actions/circle_check",width:"14px",height:"14px",fill:k.semantic.positive.color}),W(S.dg.ACCOUNT.MEMBERSHIPS_ACTIVE)]}),(0,l.jsx)(d.x,{variant:"link",size:"small",weight:"demi",underline:!0,"data-testid":"manage-club-plus-button",className:f().subscriptionManageText,onClick:()=>n("Manage Club +"),children:W(S.dg.ACCOUNT.MEMBERSHIPS_MANAGE)})]})]}),U&&(0,l.jsxs)("div",{className:f().subscription,children:[(0,l.jsx)("div",{className:f().subscriptionLeftSide,children:(0,l.jsx)("div",{children:(0,l.jsxs)(d.x,{variant:"body",
1size:"regular",weight:"bold",className:f().subscriptionTitle,children:[(0,l.jsx)(u.J,{name:"custom/return_policy",width:"14px",height:"14px",fill:"#767676"})," ",W(S.dg.ACCOUNT.MEMBERSHIPS_AUTOSHIP)]})})}),(0,l.jsxs)("div",{className:f().subscriptionLinks,children:[(0,l.jsxs)("div",{className:f().subscriptionActiveBox,children:[(0,l.jsx)(u.J,{name:"actions/circle_check",width:"14px",height:"14px",fill:k.semantic.positive.color}),W(S.dg.ACCOUNT.MEMBERSHIPS_ACTIVE)]}),(0,l.jsx)(d.x,{variant:"link",size:"small",weight:"demi",underline:!0,"data-testid":"manage-club-plus-button",className:f().subscriptionManageText,onClick:()=>window.location.assign("/account/autoship"),children:W(S.dg.ACCOUNT.MEMBERSHIPS_MANAGE)})]})]})]}):null,H?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:f().cancelledPlansTitle,style:{marginTop:O?"2rem":void 0},children:Q(W(S.dg.ACCOUNT.MEMBERSHIPS_CANCELLED_PLANS),X)}),(0,l.jsx)("div",{className:f().subscriptionsContainer,children:(0,l.jsxs)("div",{className:f().subscription,children:[(0,l.jsx)("div",{className:f().subscriptionLeftSide,children:(0,l.jsxs)("div",{children:[(0,l.jsx)(m,{width:126,height:16}),(0,l.jsx)(d.x,{variant:"body",className:f().subscriptionDate,children:W(S.dg.ACCOUNT.MEMBERSHIPS_MEMBER_SINCE,{date:G})})]})}),(0,l.jsxs)("div",{className:f().subscriptionLinks,children:[(0,l.jsxs)("div",{className:f().subscriptionCancelledBox,children:[(0,l.jsx)(u.J,{name:"actions/circle_solid_clear",width:"12px",height:"12px",fill:"#5A5A5A","aria-hidden":"true"}),W(S.dg.ACCOUNT.MEMBERSHIPS_CANCELLED)]}),(0,l.jsx)(d.x,{variant:"link",size:"small",weight:"demi",underline:!0,id:"button-view-cancelled-club",testId:"button-view-cancelled-club",className:f().subscriptionManageText,onClick:()=>{n("Manage Club")},children:W(S.dg.ACCOUNT.MEMBERSHIPS_VIEW_DETAILS)})]})]})})]}):null]})},R=t(83566),L=t(40976),U=t(90128),H=t(73755),P=t(33231),O=t.n(P),k=()=>(0,l.jsxs)("div",{className:O().reclaimCouponStage4SkeletonContainer,children:[(0,l.jsx)(H.Z,{width:355,height:50}),(0,l.jsxs)("div",{className:O().innerContainer,children:[(0,l.jsx)(H.Z,{width:355,height:30}),(0,l.jsx)(H.Z,{width:355,height:30})]}),(0,l.jsxs)("div",{className:O().innerContainer,children:[(0,l.jsx)(H.Z,{width:355,height:40}),(0,l.jsx)(H.Z,{width:355,height:40}),(0,l.jsx)(H.Z,{width:355,height:40})]}),(0,l.jsx)("div",{className:O().innerContainer,children:(0,l.jsx)(H.Z,{width:355,height:40})})]}),D=t(12602),V=t.n(D),Z=t(92490),F=t(23427),z=t(1355),W=t.n(z),q=t(20243),K=t(57491);let G=()=>{let{translate:e,TRANSLATION_KEYS:n}=(0,q.T)(),{firstName:t,credits:i,clubMembershipStarted:s,isClubMemberPro:o}=(0,p.q3)(),{isMobile:r}=(0,Z.d)(),a=(0,g.U)({date:s,format:"MMM. yyyy"}),c=()=>{window.location.assign("/collections/club-exclusive-deals")},u=e(n.ACCOUNT.MEMBERSHIPS_CLUB_USE_CREDITS);return(0,l.jsxs)("div",{className:W().container,children:[(0,l.jsx)("div",{children:(0,l.jsx)(R.J.Other.ShapermintLogo,{width:r?F.c.width:4.625,height:r?F.c.height:4.625,fill:F.c.fill})}),(0,l.jsxs)("div",{className:W().clubMemberGreetings,children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)(d.x,{variant:"body",className:W().usernameTitle,children:[e(n.ACCOUNT.MEMBERSHIPS_CLUB_HELLO)," ",t]}),(0,l.jsxs)(d.x,{variant:"body",className:o?"".concat(W().clubSinceTitle," ").concat(W().clubPro):W().clubSinceTitle,children:[e(n.ACCOUNT.MEMBERSHIPS_CLUB_SHAPERMINT)," ",(0,l.jsx)("span",{className:W().clubWord,children:e(n.ACCOUNT.MEMBERSHIPS_CLUB_LABEL)})," ",e(n.ACCOUNT.MEMBERSHIPS_CLUB_SINCE)," ",a]})]}),(0,l.jsxs)("div",{className:W().creditsContainer,children:[(0,l.jsxs)(d.x,{variant:"body",className:W().creditsTotal,children:[e(1===i?n.ACCOUNT.MEMBERSHIPS_CLUB_CREDIT_SINGULAR:n.ACCOUNT.MEMBERSHIPS_CLUB_CREDITS_PLURAL)," ",null!=i?i:0]}),(0,l.jsx)("button",{type:"button",className:W().useCredits,onClick:c,onKeyDown:e=>(0,K.$)(e,c,["Enter"," "]),"aria-label":u,children:u})]})]})]})};var Y=t(9788),J=t(75550),Q=t(6304),X=t(5793),$=t(46546);let ee=e=>{window.location.href=e};var en={Unhappy:{heading:"Discover More Value with an Extra Month",text:"We're adding an extra month to your membership and throwing in a $10 Off on your next purchase, so you can explore more of Shapermint Club and snag even more savings!",ctaText:"get my 1 free month + $10 Off on next purchase",retentionSuccessMsg:"Your extra 1 month is live! Plus, enjoy $10 off your next purchase—happy shopping!",type:"month",value:1,extraType:"value",extraValue:10,code:"free_month_and_ten_usd_off"},NoValue:{heading:"Discover More Value with an Extra Month",text:"We're adding an extra month to your membership and throwing in a Free Gift, so you can explore more of Shapermint Club and snag even more savings!",ctaText:"get my 1 free month + Free gift",retentionSuccessMsg:"Keep an eye on your inbox! We'll be sending you a confirmation email with a link for your FREE gift within 24 to 48 hours!",type:"month",value:1,extraType:"Free gift",extraValue:1,code:"free_month_and_free_gift"},CannotAfford:{heading:"Enjoy 2 Extra Months on Us!",text:"We're giving you two additional months of Shapermint Club membership—completely free! Enjoy more savings and explore what you love.",ctaText:"get my 2 free months",retentionSuccessMsg:"Your extra 2 months are live! Enjoy all the perks of the Shapermint Club—happy shopping!",type:"month",value:2,code:"two_free_months"},Other:{heading:"Discover More Value with an Extra Month",text:"We understand that everyone's journey is unique. Whatever your reason, we're here to supp
1ort you with an extra month of membership and $10 off your next order.",ctaText:"get my 1 free month + $10 Off on next purchase",retentionSuccessMsg:"Your extra 1 month is live! Plus, enjoy $10 off your next purchase—happy shopping!",type:"month",value:1,extraType:"value",extraValue:10,code:"free_month_and_ten_usd_off"}},et=t(73564),ei=t.n(et),el=t(38414),es=t(79153),eo=t(19819),er=t(65584),ea=t(75693);let ec="clubMembership";var ed=e=>{var n,t,i,r,a,c,_,m,C,x;let{setOpenPopup:f}=e,{email:v,clubMembershipId:g,subscriptions:b,retentionHistory:S}=(0,p.q3)(),[y,E]=(0,s.useState)(""),[T,j]=(0,s.useState)(""),[N,B]=(0,s.useState)(!1),[w,I]=(0,s.useState)(!1),[A,L]=(0,s.useState)(!1),[U,H]=(0,s.useState)(!1),[P,O]=(0,s.useState)(!1),{locale:k}=(0,o.useRouter)(),{isMobile:D}=(0,Z.d)(),V=en[y],F=null==V?void 0:V.retentionSuccessMsg,z={subscription_start_date:null!==(c=null==b?void 0:null===(n=b[ec])||void 0===n?void 0:n.createdAt)&&void 0!==c?c:"",price:null!==(_=null==b?void 0:null===(t=b[ec])||void 0===t?void 0:t.price)&&void 0!==_?_:0,frequencyUnit:(0,eo.s)(null!==(m=null==b?void 0:null===(i=b[ec])||void 0===i?void 0:i.frequencyUnit)&&void 0!==m?m:""),frequencyValue:null!==(C=null==b?void 0:null===(r=b[ec])||void 0===r?void 0:r.frequencyValue)&&void 0!==C?C:0,currency:null!==(x=null==b?void 0:null===(a=b[ec])||void 0===a?void 0:a.currency)&&void 0!==x?x:"",email:v},W=e=>{(0,er.fd)({event:e,email:String(v),selectedReason:y,comments:T,clubMembershipId:g,subscriptionType:ec,setOpenPopup:f,setIsFormDataSent:O,getClubCancellationRequested:el.LA})};return(0,s.useEffect)(()=>{P&&f(!1)},[P]),(0,s.useEffect)(()=>{var e,n,t,i,l;let s=null!==(i=null===(n=b[ec])||void 0===n?void 0:null===(e=n.scheduleStatus)||void 0===e?void 0:e.nextPaymentDate)&&void 0!==i?i:"",o=null!==(l=null===(t=b[ec])||void 0===t?void 0:t.id)&&void 0!==l?l:"";H((0,es.n)({nextPaymentDate:s,subscriptionId:o,retentionHistory:S}))},[b,ec,S]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:ei().overlay}),(0,l.jsx)("div",{className:ei().popupContainer,children:!P&&(0,l.jsxs)("div",{className:ei().popupInnerContainer,children:[(0,l.jsxs)("div",{id:"cancellation-club-header",className:ei().popupHeader,children:[(0,l.jsx)("div",{style:{width:"10%"},children:(0,l.jsx)("button",{className:ei().closeButton,onClick:()=>f(!1),children:(0,l.jsx)(R.J.Actions.Close,{fill:"#292929"})})}),(0,l.jsx)("div",{style:{width:"80%"},className:ei().clubLogo,children:(0,l.jsx)(R.J.Other.ShapermintClubIcon,{width:D?"100%":"50%"})}),(0,l.jsx)("div",{style:{width:"10%"}})]}),!N&&!w&&!A&&(0,l.jsx)("div",{className:ei().popupContent,children:(0,l.jsxs)("form",{onSubmit:W,className:ei().formContent,children:["en-US"===k&&(0,l.jsxs)("div",{className:ei().retentionByCreditsContainer,children:[(0,l.jsx)("div",{className:ei().leavingText,children:"You are still thinking about leaving?"}),(0,l.jsx)("div",{className:ei().newCreditsOfferContainer,children:(0,l.jsxs)("div",{className:ei().newCreditsOffer,children:[(0,l.jsxs)("div",{className:ei().newCreditsOfferText,children:[(0,l.jsx)("div",{children:(0,l.jsx)(u.J,{name:"other/shapermint_logo",width:"28px",height:"30px",fill:"#D4605B"})}),(0,l.jsxs)("div",{children:["Wait! Here are"," ",(0,l.jsx)("span",{className:ei().newCreditsCount,children:"10 credits ($10.00)"})," ","free just for you"]})]}),(0,l.jsxs)("div",{className:ei().newCreditsCtaContainer,children:[(0,l.jsxs)("div",{className:ei().newCreditsOfferCta,children:[(0,l.jsx)(Q.Z,{text:"Claim My Credits Now",size:h.dr.Medium,onClick:()=>(0,er.rF)({clubMembershipId:g,subscriptionType:ec,subscriptionData:z,email:String(v),setSelectedCreditsCta:I,setIsRetentionOfferConflict:H,getClubCancellationOfferAccepted:el.TH,location:"my_account"}),wide:!0,disabled:U}),U&&(0,l.jsx)(d.x,{variant:"body",weight:"regular",children:"You have already redeemed the offer"})]}),(0,l.jsx)("div",{className:ei().newCreditsMotivationText,children:"Plus, stay today and keep free shipping, higher discounts and more for being a club member!"})]})]})})]}),(0,l.jsxs)("div",{className:ei().cancellationReasonContainer,children:[(0,l.jsx)("div",{className:ei().cancellationHeading,children:"Sorry you're not loving your experience - are you having any of the below issues?"}),(0,l.jsxs)("div",{className:ei().cancellationReasons,children:[(0,l.jsxs)("label",{className:"".concat(ei().reasonBtn," ").concat("Unhappy"===y?ei().selected:""),children:[(0,l.jsx)("input",{type:"radio",name:"cancellationReason",value:"Unhappy",checked:"Unhappy"===y,onChange:()=>{E("Unhappy"),(0,er.HC)({email:String(v),cancellationReason:"Unhappy",
1subscriptionType:ec,subscriptionId:g,location:"my_account",getClubCancellationReason:el.jR})},className:ei().radioInput}),(0,l.jsx)(X.E,{src:"https://cdn.shopify.com/s/files/1/2679/8624/files/cancellation-frown.svg?v=1727695369",alt:"frown-icon"}),"Unhappy with the product, quality, or fit"]}),(0,l.jsxs)("label",{className:"".concat(ei().reasonBtn," ").concat("NoValue"===y?ei().selected:""),children:[(0,l.jsx)("input",{type:"radio",name:"cancellationReason",value:"NoValue",checked:"NoValue"===y,onChange:()=>{E("NoValue"),(0,er.HC)({email:String(v),cancellationReason:"NoValue",subscriptionType:ec,subscriptionId:g,location:"my_account",getClubCancellationReason:el.jR})},className:ei().radioInput}),(0,l.jsx)(X.E,{src:"https://cdn.shopify.com/s/files/1/2679/8624/files/cancellation-star.svg?v=1727695384",alt:"star-icon"}),"Don't see the value in the membership"]}),(0,l.jsxs)("label",{className:"".concat(ei().reasonBtn," ").concat("CannotAfford"===y?ei().selected:""),children:[(0,l.jsx)("input",{type:"radio",name:"cancellationReason",value:"CannotAfford",checked:"CannotAfford"===y,onChange:()=>{E("CannotAfford"),(0,er.HC)({email:String(v),cancellationReason:"CannotAfford",subscriptionType:ec,subscriptionId:g,location:"my_account",getClubCancellationReason:el.jR})},className:ei().radioInput}),(0,l.jsx)(X.E,{src:"https://cdn.shopify.com/s/files/1/2679/8624/files/cancellation-wallet.svg?v=1727695400",alt:"wallet-icon"}),"Cannot afford monthly subscription fee"]}),(0,l.jsxs)("label",{className:"".concat(ei().reasonBtn," ").concat("Other"===y?ei().selected:""),children:[(0,l.jsx)("input",{type:"radio",name:"cancellationReason",value:"Other",checked:"Other"===y,onChange:()=>{E("Other"),(0,er.HC)({email:String(v),cancellationReason:"Other",subscriptionType:ec,subscriptionId:g,location:"my_account",getClubCancellationReason:el.jR})},className:ei().radioInput}),"Other"]})]})]}),y&&(0,l.jsxs)("div",{className:ei().commentsContainer,children:[(0,l.jsx)("div",{className:ei().commentsHeading,children:"So sorry if we fell short of your expectations. Can you share more details to help us improve? Your comments are invaluable to us."}),(0,l.jsx)("div",{className:ei().commentsBox,children:(0,l.jsx)("textarea",{className:ei().commentsTextArea,placeholder:"Your comments",value:T,onChange:e=>j(e.target.value)})})]}),(0,l.jsxs)("div",{className:ei().ctasContainer,children:[(0,l.jsx)(Q.Z,{text:"continue to cancel",size:h.dr.Medium,onClick:()=>{(0,M.lQ)((0,el.HO)({email:String(v),cancellation_reason:String(y),offerType:V.code,subscriptionType:ec,subscriptionId:g,location:"my_account"})),B(!0),(0,ea.kI)("cancellation-club-header")},disabled:!y}),(0,l.jsx)($.Z,{text:"Return to My account",size:h.dr.Medium,onClick:()=>{f(!1),ee("/account/home")}})]})]})}),N&&!w&&!A&&(0,l.jsx)("div",{className:ei().popupContent,children:(0,l.jsxs)("div",{className:ei().cancellationConfirmation,children:[(0,l.jsx)("div",{className:ei().cancellationHeading,children:V.heading}),(0,l.jsx)("div",{className:ei().cancellationText,children:V.text}),(0,l.jsxs)("div",{className:ei().retentionCta,children:[(0,l.jsx)(Q.Z,{text:V.ctaText,size:h.dr.Medium,onClick:()=>(0,er.x2)({clubMembershipId:g,subscriptionType:ec,subscriptionData:z,email:String(v),retentionOfferObj:V,setRetentionOfferRedeemed:L,setIsRetentionOfferConflict:H,getClubCancellationOfferAccepted:el.TH,location:"my_account"}),wide:!0,disabled:U}),U&&(0,l.jsx)(d.x,{variant:"body",weight:"regular",children:"You have already redeemed the offer"})]}),(0,l.jsx)("div",{className:ei().proceedWithCancellationTxt,children:(0,l.jsx)("button",{type:"button",className:ei().proceedWithCancellationTxt,onClick:W,children:"No thanks, I'd like to cancel"})}),(0,l.jsx)("div",{className:ei().returnToAcCta,children:(0,l.jsx)($.Z,{text:"Return to My account",size:h.dr.Medium,onClick:()=>{f(!1),ee("/account/home")},wide:!0})})]})}),w&&!A&&(0,l.jsxs)("div",{className:ei().newCreditsConfirmationContainer,children:[(0,l.jsx)("div",{className:ei().newCreditsConfirmation,children:(0,l.jsxs)("div",{className:ei().newCreditsConfirmationContent,children:[(0,l.jsx)("div",{className:ei().newCreditsConfirmationHeading,children:"Thank y
1ou for staying! \uD83C\uDF89"}),(0,l.jsxs)("div",{className:ei().newCreditsConfirmationText,children:[(0,l.jsx)("span",{className:ei().newCreditsIssueText,children:"Your credits will be issued in your account in 24 hours."})," ","If you have any questions, reach out to our customer support in the chat."]})]})}),(0,l.jsxs)("div",{className:ei().newCreditsReturnToAcCta,children:[(0,l.jsx)(Q.Z,{text:"Explore unique deals",size:h.dr.Medium,onClick:()=>ee("/collections/club-exclusive-deals"),wide:!0}),(0,l.jsx)($.Z,{text:"Return to My account",size:h.dr.Medium,onClick:()=>{f(!1),ee("/account/home")},wide:!0})]})]}),A&&(0,l.jsxs)("div",{className:ei().retentionSuccessContainer,children:[(0,l.jsx)("div",{className:ei().retentionSuccessHeading,children:"Awesome \uD83C\uDF89 Thank you for choosing to stay with us!"}),(0,l.jsx)("div",{className:ei().retentionSuccessTxt,children:F}),"NoValue"===y&&(0,l.jsxs)("div",{children:["Want to start shopping?"," ",(0,l.jsx)("a",{className:ei().clickHereLink,href:"/collections/club-exclusive-deals?utm_content=cluboffer",children:"CLICK HERE"})]}),(0,l.jsx)("div",{className:ei().retentionReturnToAcCta,children:(0,l.jsx)(Q.Z,{text:"Return to My account",size:h.dr.Medium,onClick:()=>{f(!1),ee("/account/home")},wide:!0})})]})]})})]})},eu=t(97137),e_=t(20638),eh=t.n(e_),ep=t(70079);let em={Unhappy:{heading:"Discover More Value with an Extra Month",text:"We're adding an extra month to your membership and throwing in a $10 Off on your next purchase, so you can explore more of Shapermint Club and snag even more savings!",ctaText:"get my 1 free month + $10 Off on next purchase",retentionSuccessMsg:"Your extra 2 months are live! Enjoy all the perks of the Shapermint Club—happy shopping!",type:"month",value:1,extraType:"value",extraValue:10},NoValue:{heading:"Discover More Value with an Extra Month",text:"We're adding an extra month to your membership and throwing in a Free Gift, so you can explore more of Shapermint Club and snag even more savings!",ctaText:"get my 1 free month + Free gift",retentionSuccessMsg:"Keep an eye on your inbox! We'll be sending you a confirmation email with a link for your FREE gift within 24 to 48 hours!",type:"month",value:1,extraType:"Free gift",extraValue:1},CannotAfford:{heading:"Enjoy 2 Extra Months on Us!",text:"We're giving you two additional months of Shapermint Club membership—completely free! Enjoy more savings and explore what you love.",ctaText:"get my 2 free months",retentionSuccessMsg:"Your extra 2 months are live! Enjoy all the perks of the Shapermint Club—happy shopping!",type:"month",value:2},Other:{heading:"Discover More Value with an Extra Month",text:"We understand that everyone's journey is unique. Whatever your reason, we're here to support you with an extra month of membership and $10 off your next order.",ctaText:"get my 1 free month + $10 Off on next purchase",retentionSuccessMsg:"Your extra 2 months are live! Enjoy all the perks of the Shapermint Club—happy shopping!",type:"month",value:1,extraType:"value",extraValue:10}},eC=[{key:1,description:"Unhappy with the product, quality, or fit",value:"Unhappy"},{key:2,description:"Don't see the value in the membership",value:"NoValue"},{key:3,description:"Cannot afford monthly subscription fee",value:"CannotAfford"},{key:4,description:"Other",value:"Other"}],ex={shapermint:em,shapees:em},ef={author:"Tessa L.",country:"United States",title:"I HAVE SAVED HOUNDERS OF DOLLARS WITH SHAPERMINT CLUB",message:"The unlimited priority shipping alone makes this a must-have. The extra discounts and exclusive content are just icing on the cake."},ev={shapermint:ef,shapees:ef};var eg=()=>{let{isDesktop:e}=(0,Z.d)(),n=ev[(0,ep.bh)()];return(0,l.jsxs)("div",{className:eh().comment,children:[e&&(0,l.jsx)("div",{className:eh().imageRow,children:(0,l.jsx)(X.E,{src:"https://cdn.shapermint.com/assets/shapermint/images/cancellation_flow_review.png",alt:"#",width:"700px",height:"400px"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:eh().commentFirstRow,children:(0,l.jsxs)("div",{className:eh().authorContainer,children:[(0,l.jsx)(d.x,{variant:"body",weight:"bold",children:n.author}),(0,l.jsx)(d.x,{variant:"body",children:n.country}),(0,l.jsxs)("div",{className:eh().verifiedBuyerContainer,children:[(0,l.jsx)(R.J.Actions.Check,{fill:"#5DAC63",width:1,height:1}),(0,l.jsx)(d.x,{variant:"body",children:"Verified Buyer"})]})]})}),(0,l.jsxs)("div",{className:eh().ratingsAndDaysOld,children:[(0,l.jsx)(R.J.PDP.Star,{fill:"#F2D96F"}),(0,l.jsx)(R.J.PDP.Star,{fill:"#F2D96F"}),(0,l.jsx)(R.J.PDP.Star,{fill:"#F2D96F"}),(0,l.jsx)(R.J.PDP.StarHalf,{fill:"#F2D96F"}),(0,l.jsx)(R.J.PDP.StarEmpty,{fill:"#F2D96F"})]}),!e&&(0,l.jsx)("div",{className:eh().commentImage,children:(0,l.jsx)(X.E,{src:"https://cdn.shapermint.com/assets/shapermint/images/cancellation_flow_review.png",alt:"#",width:"700px",height:"400px"})}),(0,l.jsx)(d.x,{variant:"heading5",weight:"bold",className:eh().commentTitle,children:n.title}
1),(0,l.jsx)(d.x,{variant:"body",size:"regular",weight:"regular",className:eh().commentContent,children:n.message})]})]})},eb=t(11753),eS=t.n(eb),ey=e=>{let{setSubscriptionCancelled:n,handleFormSubmit:t,backToHome:i}=e;return(0,l.jsxs)("div",{className:eS().popupContent,children:[(0,l.jsxs)("div",{className:eS().cancellationReasonContainer,children:[(0,l.jsx)("div",{className:eS().cancellationMainHeading,children:"Are you sure you want to cancel?"}),(0,l.jsxs)("div",{className:eS().cancellationHeading,children:["As a club user have you enjoyed what other +80.000 people are using"," ","every month?"]})]}),(0,l.jsx)(eg,{}),(0,l.jsxs)("div",{className:eS().ctasContainer,children:[(0,l.jsx)(Q.Z,{text:"Keep Shapermint club",size:h.dr.Large,onClick:i}),(0,l.jsx)(d.x,{variant:"link",className:eS().continueToCancel,onClick:()=>{t(),n(!0)},children:"Continue to cancel"})]})]})},eE=t(43298),eT=t(59396),eM=t.n(eT),ej=e=>{let{backToHome:n}=e;return(0,l.jsxs)("div",{className:eM().creditsConfirmationContainer,children:[(0,l.jsxs)("div",{className:eM().creditsConfirmation,children:[(0,l.jsx)(X.E,{src:(0,eE.zk)("https://cdn.shopify.com/s/files/1/2679/8624/files/retention-verified.svg?v=1727696460",140,100),alt:"retention-verified-icon"}),(0,l.jsxs)("div",{className:eM().creditsConfirmationContent,children:[(0,l.jsx)("div",{className:eM().creditsHeading,children:"Thank you for staying!"}),(0,l.jsxs)("div",{className:eM().creditsText,children:["Your credits will be issued in your account in"," ",(0,l.jsx)("strong",{children:"24 hours"}),". If you have any questions, reach out to"," ","our customer support in the chat."]}),(0,l.jsx)("div",{children:(0,l.jsx)(Q.Z,{text:"Explore unique deals",size:h.dr.Medium,onClick:()=>{window.location.assign("/collections/club-exclusive-deals")}})})]})]}),(0,l.jsx)("div",{className:eM().creditsReturnToAcCta,children:(0,l.jsx)($.Z,{text:"Return to My account",size:h.dr.Medium,onClick:n,wide:!0})})]})},eN=t(14447),eB=t(52030),ew=t(95555),eI=t.n(ew),eA=e=>{let{reasons:n,selectedReason:t,setSelectedReason:i,setComments:o,setSelectedCancelCta:r,scrollToTop:a,backToHome:c,email:u,clubMembershipId:_}=e,[p,m]=(0,s.useState)(""),[C,x]=(0,s.useState)(t),f=e=>{x(e);try{u&&e&&(0,eB.lQ)((0,el.jR)({email:u,cancellation_reason:String(e),subscriptionType:"clubMembership",subscriptionId:_,location:"my_account"}))}catch(e){ep.Yd.error("[Club Cancellation Form][tracking]: ",e)}},v=e=>{let n=eI().reasonBtn;return C===e&&(n+=" ".concat(eI().selected)),n};return(0,l.jsx)("div",{className:eI().popupContent,children:(0,l.jsxs)("form",{className:eI().formContent,children:[(0,l.jsxs)("div",{className:eI().cancellationReasonContainer,children:[(0,l.jsx)("div",{className:eI().cancellationMainHeading,children:"Why are you leaving?"}),(0,l.jsxs)("div",{className:eI().cancellationHeading,children:["Sorry you're not loving your experience - are you having any of"," ","the below issues?"]}),(0,l.jsx)("div",{className:eI().cancellationReasons,children:n.map(e=>(0,l.jsx)("div",{className:v(e.value),children:(0,l.jsx)(eN.N,{label:e.description,name:"reason-cancellation",value:e.value,checked:C===e.value,size:h.dr.Medium,onChange:()=>f(e.value),id:e.value})},e.value))})]}),C&&(0,l.jsxs)("div",{className:eI().commentsContainer,children:[(0,l.jsxs)("div",{className:eI().commentsHeading,children:["So sorry if we fell short of your expectations. Can you share more"," ","details to help us improve? Your comments are invaluable to us."]}),(0,l.jsx)("div",{className:eI().commentsBox,children:(0,l.jsx)("textarea",{className:eI().commentsTextArea,placeholder:"Your comments",value:p,onChange:e=>m(e.target.value)})})]}),(0,l.jsxs)("div",{className:eI().ctasContainer,children:[(0,l.jsx)(Q.Z,{text:"Keep Shapermint club",size:h.dr.Large,onClick:c}),(0,l.jsx)(d.x,{variant:"link",className:eI().continueToCancel,onClick:()=>{C&&(i(C),o(p),r(!0),a())},disabled:!C,children:"Continue to cancel"})]})]})})},eR=t(9819),eL=t.n(eR),eU=e=>{let{retentionSuccessMsg:n,selectedReason:t,backToHome:i}=e;return(0,l.jsxs)("div",{className:eL().retentionSuccessContainer,children:[(0,l.jsx)("div",{className:eL().retentionSuccessHeading,children:"Awesome \uD83C\uDF89 Thank y
1ou for choosing to stay with us!"}),(0,l.jsx)("div",{className:eL().retentionSuccessTxt,children:n}),"NoValue"===t&&(0,l.jsxs)("div",{children:["Want to start shopping?"," ",(0,l.jsx)("a",{className:eL().clickHereLink,href:"/collections/club-exclusive-deals?utm_content=cluboffer",children:"CLICK HERE"})]}),(0,l.jsx)("div",{className:eL().retentionReturnToAcCta,children:(0,l.jsx)(Q.Z,{text:"Return to My account",size:h.dr.Medium,onClick:i,wide:!0})})]})},eH=t(76519),eP=t.n(eH),eO=e=>{let{backToHome:n}=e;return(0,l.jsxs)("div",{className:eP().popupContent,children:[(0,l.jsx)("div",{className:eP().cancellationReasonContainer,children:(0,l.jsxs)("div",{className:eP().cancellationMainHeading,children:["You're subscription is cancelled. You'll receive confirmation"," ","in 24 hours."]})}),(0,l.jsx)("div",{className:eP().ctasContainer,children:(0,l.jsx)(Q.Z,{text:"Back to home",size:h.dr.Large,onClick:n})})]})},ek=t(37557),eD=t(71218),eV=t(63071),eZ=t.n(eV),eF=e=>{let{setOpenPopup:n,email:t,clubMembershipId:i}=e,[o,r]=(0,s.useState)(""),[a,c]=(0,s.useState)(""),[d,u]=(0,s.useState)(!1),[_,h]=(0,s.useState)(!1),[p]=(0,s.useState)(!1),[m,C]=(0,s.useState)(!1),[x,f]=(0,s.useState)(!1),{isMobile:v}=(0,Z.d)(),g=ex[o||"Other"],b=null==g?void 0:g.retentionSuccessMsg,S=async e=>{e.subscription_id=i,e.flowVersion="version-B",ek.b.Club.sendFormToZendesk(JSON.stringify(e)).then(()=>{f(!0),(0,eu.dispatchCustomEvent)("trigger/toast",{summary:"We have received your request and will process it within 24 hours. To resubscribe, please visit the products section in our store.",severity:"success"})}).catch(e=>{ep.Yd.error("[sendFormToZendesk]",e),n(!1),f(!1),(0,eu.dispatchCustomEvent)("trigger/toast",{summary:"There was an error processing your request. Please try again later.",severity:"error"})})},y=()=>{h(!0);let e="YES! I WANT TO RECEIVE 10 CREDITS";(0,eB.lQ)((0,el.TH)({email:String(t),subscriptionType:"clubMembership",subscriptionId:i,offerType:"credits",offerValue:10,offerDescription:e,location:"my_account"})),T({subject:"Club Retention Offer",email:String(t),retention_type:e})},E=(0,s.useCallback)(()=>{let{areAllValid:e,isValidEmail:n}=function(e){let{email:n}=e,t=(0,eD.o)(n);return{areAllValid:t,isValidEmail:t}}({email:String(t)});e&&(S({subject:"Club Membership Cancellation Form Response",email:String(t),comment:"".concat(o,": ").concat(a)}),(0,eB.lQ)((0,el.LA)({email:String(t),subscriptionType:"clubMembership",subscriptionId:i,comments:a,location:"my_account"})),n||(0,eu.dispatchCustomEvent)("trigger/toast",{summary:"There was an error processing your request due to invalid email.",severity:"error"}))},[t,o,a,S]),T=async e=>{e.subscription_id=i,ek.b.Club.createZendeskTicketForCX(JSON.stringify(e)).then(()=>{}).catch(e=>{ep.Yd.error("[createZendeskTicketForCX][RetentionOffer]",e)})},M=()=>{let e=document.getElementById("cancellation-club-header");e&&e.scrollIntoView({behavior:"smooth"})},j=()=>{n(!1),window.location.assign("/account/home")};return(0,s.useEffect)(()=>{x&&n(!1)},[x]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:eZ().overlay}),(0,l.jsx)("div",{className:eZ().popupContainer,children:!x&&(0,l.jsxs)("div",{className:eZ().popupInnerContainer,children:[(0,l.jsxs)("div",{id:"cancellation-club-header",className:eZ().popupHeader,children:[(0,l.jsx)("div",{style:{width:"10%"},children:(0,l.jsx)("button",{className:eZ().closeButton,onClick:()=>n(!1),children:(0,l.jsx)(R.J.Actions.Close,{fill:"#292929"})})}),(0,l.jsx)("div",{style:{width:"80%"},className:eZ().clubLogo,children:(0,l.jsx)(R.J.Other.ShapermintClubIcon,{width:v?"100%":"50%"})}),(0,l.jsx)("div",{style:{width:"10%"}})]}),(0,l.jsx)(()=>p?(0,l.jsx)(eU,{retentionSuccessMsg:b,selectedReason:o,backToHome:j}):_?(0,l.jsx)(ej,{backToHome:j}):m?(0,l.jsx)(eO,{backToHome:j}):d?(0,l.jsx)(ey,{setSubscriptionCancelled:C,handleFormSubmit:E,backToHome:j}):(0,l.jsx)(eA,{reasons:eC,handleCreditsAccepted:y,selectedReason:o,setSelectedReason:r,setComments:c,setSelectedCancelCta:u,scrollToTop:M,backToHome:j,email:t,clubMembershipId:i}),{})]})})]})},ez=t(50577),eW=t(6543);eW.k.MEMBERSHIPS_CLUB_FREE_SHIPPING,eW.k.MEMBERSHIPS_CLUB_SAVE_ON_PURCHASE,eW.k.MEMBERSHIPS_CLUB_MEMBER_CREDITS,eW.k.MEMBERSHIPS_CLUB_ENJOY_CREDITS,eW.k.MEMBERSHIPS_CLUB_HIGHER_DISCOUNTS,eW.k.MEMBERSHIPS_CLUB_HIGHER_DISCOUNTS_DESC,eW.k.MEMBERSHIPS_CLUB_FREE_RETURNS,eW.k.MEMBERSHIPS_CLUB_FREE_RETURNS_DESC,eW.k.MEMBERSHIPS_CLUB_STAY_WITH_MEMBERSHIP,eW.k.MEMBERSHIPS_CLUB_FINISH_CANCELLATION;let eq=eW.k.MEMBERSHIPS_CLUB_CANCEL_SUBSCRIPTION;var eK=t(82729),eG=t(26601);function eY(){let e=(0,eK._)(["\n  margin-bottom: 32px;\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  width: 100%;\n"]);return eY=function(){return e},e}let eJ=eG.Z.div(eY());var eQ=t(50161),eX=t(21226);function e$(){let e=(0,eK._)(["\n  width: 100%;\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  padding: 14px;\n  box-sizing: border-box;\n  border-radius: 8px;\n  background-color: ",";\n  border: 1px solid\n    ",";\n\n  @media (max-width: ","px) {\n    flex-direction: column;
1\n    align-items: stretch;\n    gap: 8px;\n    padding: 16px 12px;\n    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);\n  }\n"]);return e$=function(){return e},e}function e0(){let e=(0,eK._)(["\n  flex: 1;\n  display: flex;\n  align-items: flex-start;\n  gap: 12px;\n  min-width: 0;\n"]);return e0=function(){return e},e}function e1(){let e=(0,eK._)(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  flex-shrink: 0;\n  padding: 8px;\n  border-radius: 6px;\n  background-color: ",";\n"]);return e1=function(){return e},e}function e2(){let e=(0,eK._)(["\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n  min-width: 0;\n"]);return e2=function(){return e},e}function e9(){let e=(0,eK._)(["\n  margin: 0;\n  font-size: 16px;\n  font-weight: 700;\n  line-height: 24px;\n  color: ",";\n"]);return e9=function(){return e},e}function e3(){let e=(0,eK._)(["\n  margin: 0;\n  font-size: 14px;\n  font-weight: 400;\n  line-height: normal;\n  color: ",";\n\n  @media (max-width: ","px) {\n    font-size: 12px;\n    line-height: 16px;\n    color: ",";\n  }\n"]);return e3=function(){return e},e}function e8(){let e=(0,eK._)(["\n  flex: 1 0 0;\n  min-width: 0;\n  height: 36px;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  padding: 14px 32px;\n  border: 0;\n  border-radius: 8px;\n  cursor: pointer;\n  background-color: ",";\n  color: ",";\n  font-size: 14px;\n  font-weight: 600;\n  line-height: 18px;\n  text-transform: uppercase;\n  white-space: nowrap;\n\n  @media (max-width: ","px) {\n    flex: none;\n    width: 100%;\n  }\n"]);return e8=function(){return e},e}let e6=eG.Z.div(e$(),e=>{var n,t,i;let{theme:l}=e;return(null===(i=l.colors.pallete.primary)||void 0===i?void 0:null===(t=i[20])||void 0===t?void 0:null===(n=t.soft)||void 0===n?void 0:n.color)||"#fdf1ef"},e=>{var n;let{theme:t}=e,i=(null===(n=t.colors.pallete.wine)||void 0===n?void 0:n.color)||"#882A2B";return"".concat(i,"80")},e=>{let{theme:n}=e;return n.mediaQueries.mobile}),e4=eG.Z.div(e0()),e5=eG.Z.div(e1(),e=>{var n,t,i;let{theme:l}=e;return(null===(i=l.colors.semantic)||void 0===i?void 0:null===(t=i.urgent)||void 0===t?void 0:null===(n=t.soft)||void 0===n?void 0:n.color)||"#D4605B"}),e7=eG.Z.div(e2()),ne=eG.Z.p(e9(),e=>{let{theme:n}=e;return n.colors.shades[700].color}),nn=eG.Z.p(e3(),e=>{let{theme:n}=e;return n.colors.shades[700].color},e=>{let{theme:n}=e;return n.mediaQueries.mobile},e=>{let{theme:n}=e;return n.colors.shades[500].color}),nt=eG.Z.button(e8(),e=>{let{theme:n}=e;return n.colors.pallete.secondary.color},e=>{let{theme:n}=e;return n.colors.shades.white.color},e=>{let{theme:n}=e;return n.mediaQueries.mobile}),ni=e=>{let{data:n,onShopNow:t}=e,{colors:i}=(0,c.Fg)();return(0,l.jsxs)(e6,{children:[(0,l.jsxs)(e4,{children:[(0,l.jsx)(e5,{children:(0,l.jsx)(u.J,{name:"custom/gift_thin",width:"18px",height:"20px",fill:i.shades.white.color})}),(0,l.jsxs)(e7,{children:[(0,l.jsx)(ne,{children:n.title}),(0,l.jsx)(nn,{children:n.subtitle})]})]}),(0,l.jsx)(nt,{type:"button",onClick:t,children:n.shopNowLabel})]})};function nl(){let e=(0,eK._)(["\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  gap: 16px;\n"]);return nl=function(){return e},e}function ns(){let e=(0,eK._)(["\n  margin: 8px 0 0;\n  width: 100%;\n  font-size: 14px;\n  font-weight: 700;\n  line-height: 22px;\n  color: ",";\n"]);return ns=function(){return e},e}function no(){let e=(0,eK._)(["\n  margin: 0;\n  width: 100%;\n  text-align: left;\n  font-size: 20px;\n  font-weight: 600;\n  line-height: 28px;\n  color: ",";\n"]);return no=function(){return e},e}function nr(){let e=(0,eK._)(["\n  width: 100%;\n  display: grid;\n  grid-template-columns: repeat(4, minmax(0, 1fr));\n  gap: 4px;\n\n  @media (max-width: ","px) {\n    grid-template-columns: repeat(2, minmax(0, 1fr));\n    column-gap: 26px;\n    row-gap: 14px;\n  }\n\n  @media (max-width: ","px) {\n    column-gap: 26px;\n    row-gap: 14px;\n  }\n"]);return nr=function(){return e},e}function na(){let e=(0,eK._)(["\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  gap: 4px;\n  min-width: 0;\n"]);return na=function(){return e},e}function nc(){let e=(0,eK._)(["\n  font-size: 16px;\n  font-weight: 500;\n  line-height: 22px;\n  color: ",";\n\n  @media (max-width: ","px) {\n    font-size: 14px;\n  }\n"]);return nc=function(){return e},e}
1function nd(){let e=(0,eK._)(["\n  font-size: 18px;\n  font-weight: ",";\n  line-height: 28px;\n  color: ",";\n\n  @media (max-width: ","px) {\n    font-size: 16px;\n  }\n"]);return nd=function(){return e},e}function nu(){let e=(0,eK._)(["\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n"]);return nu=function(){return e},e}function n_(){let e=(0,eK._)(["\n  font-size: 12px;\n  font-weight: 500;\n  line-height: 22px;\n  color: ",";\n"]);return n_=function(){return e},e}function nh(){let e=(0,eK._)(["\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  min-width: 109px;\n  min-height: 28px;\n  padding: 0 8px;\n  border-radius: 4px;\n  background-color: ",";\n  color: ",";\n  font-size: 14px;\n  font-weight: 700;\n  line-height: 28px;\n  text-transform: uppercase;\n  text-align: center;\n"]);return nh=function(){return e},e}function np(){let e=(0,eK._)(["\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  margin-top: 2px;\n  padding: 3px 5px;\n  border-radius: 4px;\n  background-color: ",";\n  color: ",";\n  font-size: 10px;\n  font-weight: 700;\n  line-height: 12px;\n  text-transform: uppercase;\n"]);return np=function(){return e},e}let nm=eG.Z.div(nl()),nC=eG.Z.p(ns(),e=>{var n;let{theme:t}=e;return(null===(n=t.colors.shades[500])||void 0===n?void 0:n.color)||"#666"}),nx=eG.Z.h3(no(),e=>{let{theme:n}=e;return n.colors.shades[700].color}),nf=eG.Z.div(nr(),e=>{let{theme:n}=e;return n.mediaQueries.tablet},e=>{let{theme:n}=e;return n.mediaQueries.mobile}),nv=eG.Z.div(na()),ng=eG.Z.span(nc(),e=>{let{theme:n}=e;return n.colors.shades[450].color},e=>{let{theme:n}=e;return n.mediaQueries.mobile}),nb=eG.Z.span(nd(),e=>{let{$positive:n}=e;return n?700:600},e=>{let{theme:n,$positive:t}=e;return t?n.colors.semantic.positive.color:n.colors.shades[700].color},e=>{let{theme:n}=e;return n.mediaQueries.mobile}),nS=eG.Z.div(nu()),ny=eG.Z.span(n_(),e=>{let{theme:n}=e;return n.colors.shades.black.color}),nE=eG.Z.span(nh(),e=>{var n,t,i,l;let{theme:s,$variant:o}=e;return"neutral"===o?(null===(n=s.colors.shades[50])||void 0===n?void 0:n.color)||"#f0f0f0":(null===(l=s.colors.semantic)||void 0===l?void 0:null===(i=l.positive)||void 0===i?void 0:null===(t=i.soft)||void 0===t?void 0:t.color)||"#e0efe7"},e=>{var n;let{theme:t,$variant:i}=e;return"neutral"===i?(null===(n=t.colors.shades[500])||void 0===n?void 0:n.color)||"#767676":t.colors.semantic.positive.color}),nT=eG.Z.span(np(),e=>{var n,t,i;let{theme:l}=e;return(null===(i=l.colors.semantic)||void 0===i?void 0:null===(t=i.positive)||void 0===t?void 0:null===(n=t.soft)||void 0===n?void 0:n.color)||"#e0efe7"},e=>{let{theme:n}=e;return n.colors.semantic.positive.color}),nM=e=>{let{title:n="Subscription Details",fields:t,message:i}=e;return(0,l.jsxs)(nm,{children:[(0,l.jsx)(nx,{children:n}),(0,l.jsx)(nf,{children:t.map(e=>{var n;return(0,l.jsxs)(nv,{children:[(0,l.jsx)(ng,{children:e.label}),e.badge?(0,l.jsx)(nE,{$variant:null!==(n=e.badge.variant)&&void 0!==n?n:"positive",children:e.badge.label}):(0,l.jsxs)(nS,{children:[(0,l.jsx)(nb,{$positive:"positive"===e.valueColor,children:e.value}
1),e.subtitle?(0,l.jsx)(ny,{children:e.subtitle}):null,e.secondaryBadge?(0,l.jsx)(nT,{children:e.secondaryBadge.label}):null]})]},"".concat(e.label,"-").concat(e.value))})}),i?(0,l.jsx)(nC,{children:i}):null]})};function nj(){let e=(0,eK._)(["\n  width: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 49px;\n  padding: 24px 32px;\n  box-sizing: border-box;\n  border-radius: 8px;\n  background-color: ",";\n\n  @media (max-width: ","px) {\n    flex-direction: column;\n    gap: 12px;\n    padding: 16px 15px;\n  }\n\n  @media (max-width: ","px) {\n    width: 100%;\n    padding: 16px 15px;\n  }\n"]);return nj=function(){return e},e}function nN(){let e=(0,eK._)(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  text-align: center;\n  gap: 14px;\n  flex-shrink: 0;\n\n  @media (max-width: ","px) {\n    gap: 6px;\n  }\n"]);return nN=function(){return e},e}function nB(){let e=(0,eK._)(["\n  margin: 0;\n  font-size: 22px;\n  font-weight: 500;\n  line-height: 28px;\n  color: ",";\n  text-align: center;\n\n  strong {\n    display: block;\n    font-weight: 700;\n    color: ",";\n  }\n\n  @media (max-width: ","px) {\n    strong {\n      display: inline;\n    }\n  }\n"]);return nB=function(){return e},e}function nw(){let e=(0,eK._)(["\n  margin: 0;\n  font-size: 14px;\n  font-weight: 700;\n  line-height: 22px;\n  color: ",";\n"]);return nw=function(){return e},e}function nI(){let e=(0,eK._)(["\n  flex: 1;\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 8px;\n  min-width: 0;\n"]);return nI=function(){return e},e}function nA(){let e=(0,eK._)(["\n  margin: 0;\n  width: 100%;\n  font-size: 14px;\n  font-weight: 700;\n  line-height: 16px;\n  color: ",";\n"]);return nA=function(){return e},e}function nR(){let e=(0,eK._)(["\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n"]);return nR=function(){return e},e}function nL(){let e=(0,eK._)(["\n  width: 100%;\n  display: flex;\n  align-items: flex-start;\n  justify-content: space-between;\n  gap: 12px;\n  padding: 10px 0;\n  border-bottom: ",";\n"]);return nL=function(){return e},e}function nU(){let e=(0,eK._)(["\n  font-size: 14px;\n  font-weight: 600;\n  line-height: normal;\n  color: ",";\n"]);return nU=function(){return e},e}function nH(){let e=(0,eK._)(["\n  font-size: 14px;\n  font-weight: 600;\n  line-height: normal;\n  color: ",";\n  white-space: nowrap;\n"]);return nH=function(){return e},e}function nP(){let e=(0,eK._)(["\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 16px;\n  margin-top: 8px;\n"]);return nP=function(){return e},e}function nO(){let e=(0,eK._)(["\n  width: 100%;\n  height: 2px;\n  background-color: ",";\n"]);return nO=function(){return e},e}function nk(){let e=(0,eK._)(["\n  width: 100%;\n  display: flex;\n  align-items: flex-start;\n  justify-content: space-between;\n  gap: 12px;\n"]);return nk=function(){return e},e}function nD(){let e=(0,eK._)(["\n  font-size: 20px;\n  font-weight: 600;\n  line-height: 16px;\n  color: ",";\n"]);return nD=function(){return e},e}function nV(){let e=(0,eK._)(["\n  font-size: 26px;\n  font-weight: 600;\n  line-height: 16px;\n  color: ",";\n  text-align: right;\n"]);return nV=function(){return e},e}function nZ(){let e=(0,eK._)(["\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  padding: 6px 8px;\n  border-radius: 4px;\n  background-color: ",";\n  color: ",";\n  font-size: 11px;\n  font-weight: 700;\n  line-height: normal;\n  letter-spacing: 0.11px;\n  text-align: center;\n"]);return nZ=function(){return e},e}let nF=eG.Z.div(nj(),e=>{let{theme:n}=e;return n.colors.shades[10].color},e=>{let{theme:n}=e;return n.mediaQueries.tablet},e=>{let{theme:n}=e;return n.mediaQueries.mobile}),nz=eG.Z.div(nN(),e=>{let{theme:n}=e;return n.mediaQueries.tablet}),nW=eG.Z.p(nB(),e=>{let{theme:n}=e;return n.colors.shades[750].color},e=>{let{theme:n}=e;return n.colors.shades[700].color},e=>{let{theme:n}=e;return n.mediaQueries.mobile}),nq=eG.Z.p(nw(),e=>{let{theme:n}=e;return n.colors.semantic.positive.color}),nK=eG.Z.div(nI()),nG=eG.Z.p(nA(),e=>{let{theme:n}=e;return n.colors.shades[700].color}),nY=eG.Z.div(nR()),nJ=eG.Z.div(nL(),e=>{let{theme:n,$border:t}=e;return t?"1px solid ".concat(n.colors.shades[100].color):"0"}),nQ=eG.Z.span(nU(),e=>{let{theme:n}=e;return n.colors.shades[700].color}),nX=eG.Z.span(nH(),e=>{let{theme:n}=e;return n.colors.semantic.positive.color}),n$=eG.Z.div(nP()),n0=eG.Z.div(nO(),e=>{let{theme:n}=e;return n.colors.semantic.positive.color}),n1=eG.Z.div(nk()),n2=eG.Z.span(nD(),e=>{let{theme:n}=e;return n.colors.shades[700].color}
1),n9=eG.Z.span(nV(),e=>{let{theme:n}=e;return n.colors.semantic.positive.color}),n3=eG.Z.span(nZ(),e=>{var n,t,i;let{theme:l}=e;return(null===(i=l.colors.semantic)||void 0===i?void 0:null===(t=i.positive)||void 0===t?void 0:null===(n=t.soft)||void 0===n?void 0:n.color)||"#e0efe7"},e=>{let{theme:n}=e;return n.colors.semantic.positive.color}),n8=e=>{let{data:n}=e;return(0,l.jsxs)(nF,{children:[(0,l.jsxs)(nz,{children:[(0,l.jsxs)(nW,{children:[n.titlePrefix," ",(0,l.jsx)("strong",{children:n.titleHighlight})]}),(0,l.jsx)(nq,{children:n.subtitle})]}),(0,l.jsxs)(nK,{children:[(0,l.jsx)(nG,{children:n.ordersLabel}),(0,l.jsx)(nY,{children:n.lineItems.map((e,t)=>(0,l.jsxs)(nJ,{$border:t<n.lineItems.length-1,children:[(0,l.jsx)(nQ,{children:e.label}),(0,l.jsx)(nX,{children:e.value})]},e.label))}),(0,l.jsxs)(n$,{children:[(0,l.jsx)(n0,{}),(0,l.jsxs)(n1,{children:[(0,l.jsx)(n2,{children:n.totalLabel}),(0,l.jsx)(n9,{children:n.totalValue})]}),(0,l.jsx)(n3,{children:n.badgeLabel})]})]})]})};function n6(){let e=(0,eK._)(["\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 16px;\n  padding: 16px 12px 24px;\n  box-sizing: border-box;\n  border-radius: 8px;\n  background-color: ",";\n\n  @media (max-width: ","px) {\n    border-radius: 16px;\n  }\n"]);return n6=function(){return e},e}function n4(){let e=(0,eK._)(["\n  margin: 0;\n  max-width: 560px;\n  text-align: center;\n  font-size: 18px;\n  font-weight: 600;\n  line-height: 28px;\n  color: ",";\n"]);return n4=function(){return e},e}function n5(){let e=(0,eK._)(["\n  width: 100%;\n  display: grid;\n  grid-template-columns: repeat(4, minmax(0, 1fr));\n  gap: 16px 11px;\n  justify-items: center;\n\n  @media (max-width: ","px) {\n    grid-template-columns: repeat(2, minmax(0, 137px));\n    justify-content: center;\n    gap: 16px 24px;\n  }\n"]);return n5=function(){return e},e}function n7(){let e=(0,eK._)(["\n  width: 100%;\n  max-width: 137px;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 10px;\n  text-align: center;\n"]);return n7=function(){return e},e}function te(){let e=(0,eK._)(["\n  width: 48px;\n  height: 48px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  border-radius: 50%;\n  background-color: ",";\n  overflow: hidden;\n"]);return te=function(){return e},e}function tn(){let e=(0,eK._)(["\n  display: flex;\n  width: 32px;\n  height: 32px;\n"]);return tn=function(){return e},e}function tt(){let e=(0,eK._)(["\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 4px;\n"]);return tt=function(){return e},e}function ti(){let e=(0,eK._)(["\n  margin: 0;\n  width: 100%;\n  font-size: 14px;\n  font-weight: 600;\n  line-height: normal;\n  color: ",";\n"]);return ti=function(){return e},e}function tl(){let e=(0,eK._)(["\n  margin: 0;\n  width: 100%;\n  font-size: 12px;\n  font-weight: 400;\n  line-height: normal;\n  color: ",";\n"]);return tl=function(){return e},e}let ts=eG.Z.div(n6(),e=>{let{theme:n}=e;return n.colors.shades[10].color},e=>{let{theme:n}=e;return n.mediaQueries.mobile}),to=eG.Z.h3(n4(),e=>{let{theme:n}=e;return n.colors.shades[700].color}),tr=eG.Z.div(n5(),e=>{let{theme:n}=e;return n.mediaQueries.tablet}),ta=eG.Z.div(n7()),tc=eG.Z.div(te(),e=>{var n;let{theme:t}=e;return(null===(n=t.colors.pallete.primary.soft)||void 0===n?void 0:n.color)||"#fcd9d1"}),td=(0,eG.Z)(u.J)(tn()),tu=eG.Z.div(tt()),t_=eG.Z.p(ti(),e=>{let{theme:n}=e;return n.colors.shades[700].color}),th=eG.Z.p(tl(),e=>{let{theme:n}=e;return n.colors.shades[700].color}),tp=e=>{var n;let{title:t,benefits:i}=e,{colors:s}=(0,c.Fg)(),o=(null===(n=s.pallete.wine)||void 0===n?void 0:n.color)||"#882A2B";return(0,l.jsxs)(ts,{children:[(0,l.jsx)(to,{children:t}),(0,l.jsx)(tr,{children:i.map(e=>(0,l.jsxs)(ta,{children:[(0,l.jsx)(tc,{children:(0,l.jsx)(td,{name:e.icon,width:"32px",height:"32px",fill:o})}),(0,l.jsxs)(tu,{children:[(0,l.jsx)(t_,{children:e.title}),(0,l.jsx)(th,{children:e.description})]})]},e.title))})]})};function tm(){let e=(0,eK._)(["\n  width: 100%;\n  max-width: 396px;\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n  box-sizing: border-box;\n\n  @media (max-width: ","px) {\n    max-width: 100%;\n    gap: 16px;\n  }\n"]);return tm=function(){return e},e}function tC(){let e=(0,eK._)(["\n  width: 100%;\n  min-height: 56px;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  padding: 14px 32px;\n  border: 0;\n  border-radius: 8px;\n  cursor: ",";\n  background-color: ",";\n  color: ",";\n  font-size: 16px;\n  font-weight: 600;\n  line-height: 20px;\n  text-transform: uppercase;\n  text-align: center;\n\n  &:disabled {\n    background-color: ",";\n    color: ",";\n  }\n"]);return tC=function(){return e},e}function tx(){let e=(0,eK._)(["\n  width: 100%;\n  min-height: 56px;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  padding: 14px 32px;\n  border: 0;\n  border-radius: 8px;\n  cursor: ",";\n  background-color: ",";\n  color: ",";\n  font-size: 16px;\n  font-weight: 600;\n  line-height: 20px;\n  text-transform: uppercase;\n  text-align: center;\n\n  &:disabled {\n    background-color: ",";\n    color: ",";\n  }\n"]);return tx=function(){return e},e}function tf(){let e=(0,eK._)(["\n  margin: 0;\n  font-size: 14px;\n  font-weight: 500;\n  line-height: 22px;\n  text-align: center;\n  text-decoration: underline;\n  color: ",";\n"]);return tf=function(){return e},e}function tv(){let e=(0,eK._)(["\n  margin: 0;\n  font-size: 16px;\n  font-weight: 400;\n  line-height: 22px;\n  text-align: center;
1\n  color: ",";\n"]);return tv=function(){return e},e}let tg=eG.Z.div(tm(),e=>{let{theme:n}=e;return n.mediaQueries.mobile}),tb=eG.Z.button(tC(),e=>{let{$disabled:n}=e;return n?"not-allowed":"pointer"},e=>{let{theme:n,$disabled:t}=e;return t?n.colors.background.disabled:n.colors.pallete.primary.color},e=>{let{theme:n,$disabled:t}=e;return t?n.colors.text.disabled:n.colors.shades[700].color},e=>{let{theme:n}=e;return n.colors.background.disabled},e=>{let{theme:n}=e;return n.colors.text.disabled}),tS=eG.Z.button(tx(),e=>{let{$disabled:n}=e;return n?"not-allowed":"pointer"},e=>{let{theme:n,$disabled:t}=e;return t?n.colors.shades[50].color:n.colors.pallete.secondary.color},e=>{var n,t;let{theme:i,$disabled:l}=e;return l?i.colors.shades[250].color:(null===(t=i.colors.pallete.primary)||void 0===t?void 0:null===(n=t[80])||void 0===n?void 0:n.color)||"#f6f0e7"},e=>{let{theme:n}=e;return n.colors.shades[50].color},e=>{let{theme:n}=e;return n.colors.shades[250].color}),ty=eG.Z.a(tf(),e=>{let{theme:n}=e;return n.colors.shades[700].color}),tE=eG.Z.p(tv(),e=>{let{theme:n}=e;return n.colors.shades[700].color}),tT=e=>{let{data:n,mode:t="cancellation",onStay:i,onConfirmCancellation:s,isStayDisabled:o=!1,isConfirmDisabled:r=!1,showRetentionConflictMessage:a=!1,retentionConflictMessage:c}=e;if("cancelled"===t){var d;return n.termsHref?(0,l.jsx)(tg,{children:(0,l.jsx)(ty,{href:n.termsHref,target:"_blank",rel:"noreferrer",children:null!==(d=n.termsLabel)&&void 0!==d?d:"See Terms & Conditions here"})}):null}return(0,l.jsxs)(tg,{children:[(0,l.jsx)(tb,{type:"button",onClick:i,disabled:o,$disabled:o,children:n.stayLabel}),a&&c?(0,l.jsx)(tE,{children:c}):null,(0,l.jsx)(tS,{type:"button",onClick:s,disabled:r,$disabled:r,children:n.confirmLabel})]})};var tM=t(37455);let tj=function(){let{frequencyValue:e,frequencyUnit:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 3===Number(e)&&(!n||n.toLowerCase().startsWith("month"))},tN=e=>{let{frequencyValue:n,frequencyUnit:t,locale:i}=e;return tj({frequencyValue:n,frequencyUnit:t})&&(0,tM.S)(i)},tB=(e,n)=>{let t=Number(n);return e&&t&&!(t<=1)?Number((e/t).toFixed(2)):e},tw=e=>{let{completedOrderCount:n}=e;return(null!=n?n:0)===0?"free_trial":"active"},tI=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t.toLocaleDateString(n,{month:"short",day:"numeric",year:"numeric"})},tA={creditsCount:10,trialStartedDate:"Jun 29, 2026",priceAfterTrial:"$4.99",freeTrialEndsDate:"Sep 29, 2026",showUpdatedBadge:!0,ordersCount:"XX",freeShippingSavings:"$18.50",creditsUsedCount:12,creditsUsedAmount:"12.00",returnFeeSavings:"$6.00",totalSavings:"$46.50"},tR=(e,n)=>"".concat((0,L.T)(e,{locale:"en",currency:n})," ").concat(n,"/month"),tL=e=>{if(e)return e},tU=e=>null!=e&&!!e.code&&"active"!==e.code,tH=(e,n,t)=>e<=0?null:{creditsCount:e,title:n(t.MEMBERSHIPS_CLUB90_CREDITS_AVAILABLE,{credits:e}),subtitle:n(t.MEMBERSHIPS_CLUB90_CREDITS_SUBTITLE),shopNowLabel:n(t.MEMBERSHIPS_CLUB90_SHOP_NOW)},tP=e=>{var n,t,i,l,s,o,r,a,c,d,u;let{translate:_,keys:h,locale:p,clubSubscription:m,retentionOffers:C}=e,x=tL(C),f=tU(x),v=tw({completedOrderCount:null==m?void 0:m.completedOrderCount}),g={free_trial:_(h.MEMBERSHIPS_FREE_TRIAL_BADGE),active:_(h.MEMBERSHIPS_ACTIVE_BADGE)}[v],b=tN({frequencyValue:null!==(t=null==m?void 0:m.frequencyValue)&&void 0!==t?t:null==x?void 0:x.frequencyValue,frequencyUnit:null==m?void 0:m.frequencyUnit,locale:p}),S=tB(Number(null!==(l=null!==(i=null==x?void 0:x.price)&&void 0!==i?i:null==m?void 0:m.price)&&void 0!==l?l:0),null!==(s=null==m?void 0:m.frequencyValue)&&void 0!==s?s:null==x?void 0:x.frequencyValue),y=null!==(r=tI(null!==(o=null==x?void 0:x.subscription_start_date)&&void 0!==o?o:null==m?void 0:m.createdAt,p))&&void 0!==r?r:_(h.MEMBERSHIPS_NOT_AVAILABLE),E=null!==(c=tI(null!==(a=null==x?void 0:x.subscription_new_due_date)&&void 0!==a?a:null==m?void 0:null===(n=m.scheduleStatus)||void 0===n?void 0:n.nextPaymentDate,p))&&void 0!==c?c:_(h.MEMBERSHIPS_NOT_AVAILABLE),T=null!==(u=null!==(d=null==x?void 0:x.currency)&&void 0!==d?d:null==m?void 0:m.currency)&&void 0!==u?u:"USD",M=(null==x?void 0:x.price)?tR(S,T):_(h.MEMBERSHIPS_NOT_AVAILABLE);return[{label:_(h.MEMBERSHIPS_MEMBERSHIP_STATUS),value:g,badge:{label:g,variant:"positive"}},{label:_(h.MEMBERSHIPS_CLUB90_TRIAL_STARTED),value:y},{label:_(h.MEMBERSHIPS_CLUB90_PRICE_AFTER_TRIAL),value:M,subtitle:b?_(h.MEMBERSHIPS_BILLED_QUARTERLY):void 0},{label:_(h.MEMBERSHIPS_CLUB90_FREE_TRIAL_ENDS),value:E,valueColor:"positive",secondaryBadge:f?{label:_(h.MEMBERSHIPS_UPDATED_BADGE),variant:"positive"}:void 0}]},tO=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tA;return{creditsCount:t.creditsCount,title:e(n.MEMBERSHIPS_CLUB90_CREDITS_AVAILABLE,{credits:t.creditsCount}),subtitle:e(n.MEMBERSHIPS_CLUB90_CREDITS_SUBTITLE),shopNowLabel:e(n.MEMBERSHIPS_CLUB90_SHOP_NOW)}},tk=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tA;return[{label:e(n.MEMBERSHIPS_MEMBERSHIP_STATUS),value:e(n.MEMBERSHIPS_FREE_TRIAL_BADGE),badge:{label:e(n.MEMBERSHIPS_FREE_TRIAL_BADGE),variant:"positive"}},{label:e(n.MEMBERSHIPS_CLUB90_TRIAL_STARTED),value:t.trialStartedDate},{label:e(n.MEMBERSHIPS_CLUB90_PRICE_AFTER_TRIAL),value:e(n.MEMBERSHIPS_CLUB90_PRICE_MONTHLY,{price:t.priceAfterTrial}),subtitle:e(n.MEMBERSHIPS_BILLED_QUARTERLY)},{label:e(n.MEMBERSHIPS_CLUB90_FREE_TRIAL_ENDS),value:t.freeTrialEndsDate,valueColor:"positive",secondaryBadge:t.showUpdatedBadge?{label:e(n.MEMBERSHIPS_UPDATED_BADGE),variant:"positive"}:void 0}]},tD=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"USD";return(0,L.T)(e,{locale:"en",currency:n})},tV=e=>{if("number"==typeof e)return e;
1let n=Number(String(e).replace(/[^0-9.-]/g,""));return Number.isNaN(n)?0:n},tZ=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tA,i=tV(t.freeShippingSavings),l=tV(t.returnFeeSavings),s=Number(t.creditsUsedCount||0),o=tV(t.creditsUsedAmount),r=tV(t.totalSavings),a="string"==typeof t.freeShippingSavings&&t.freeShippingSavings.trim().startsWith("$")?t.freeShippingSavings:tD(i,"USD"),c="string"==typeof t.returnFeeSavings&&t.returnFeeSavings.trim().startsWith("$")?t.returnFeeSavings:tD(l,"USD"),d="string"==typeof t.creditsUsedAmount&&t.creditsUsedAmount.includes(".")?t.creditsUsedAmount:o.toFixed(2),u="string"==typeof t.totalSavings&&t.totalSavings.trim().startsWith("$")?t.totalSavings:tD(r,"USD"),_=[];return i>0&&_.push({label:e(n.MEMBERSHIPS_CLUB90_FREE_SHIPPING_SAVINGS),value:a}),(s>0||o>0)&&_.push({label:e(n.MEMBERSHIPS_CLUB90_CREDITS_USED),value:e(n.MEMBERSHIPS_CLUB90_CREDITS_USED_VALUE,{credits:s,amount:d})}),l>0&&_.push({label:e(n.MEMBERSHIPS_CLUB90_RETURN_FEE_SAVINGS),value:c}),{titlePrefix:e(n.MEMBERSHIPS_CLUB90_SAVINGS_TITLE_PREFIX),titleHighlight:e(n.MEMBERSHIPS_CLUB90_SAVINGS_TITLE_HIGHLIGHT),subtitle:e(n.MEMBERSHIPS_CLUB90_SAVINGS_SUBTITLE),ordersLabel:e(n.MEMBERSHIPS_CLUB90_ORDERS_LABEL,{count:t.ordersCount}),lineItems:_,totalLabel:e(n.MEMBERSHIPS_CLUB90_TOTAL_SAVINGS),totalValue:u,badgeLabel:e(n.MEMBERSHIPS_CLUB90_PAYING_FOR_ITSELF)}},tF=(e,n)=>({title:e(n.MEMBERSHIPS_CLUB_LOSE_BENEFITS),benefits:[{icon:"pdp/shipping_empty",title:e(n.MEMBERSHIPS_CLUB_FREE_SHIPPING),description:e(n.MEMBERSHIPS_CLUB_SAVE_ON_PURCHASE)},{icon:"other/shapermint_logo_fill",title:e(n.MEMBERSHIPS_CLUB_MEMBER_CREDITS),description:e(n.MEMBERSHIPS_CLUB_ENJOY_CREDITS)},{icon:"custom/discount_badge",title:e(n.MEMBERSHIPS_CLUB_HIGHER_DISCOUNTS),description:e(n.MEMBERSHIPS_CLUB_HIGHER_DISCOUNTS_DESC)},{icon:"custom/return_policy",title:e(n.MEMBERSHIPS_CLUB_FREE_RETURNS),description:e(n.MEMBERSHIPS_CLUB90_FREE_RETURNS_DESC)}]}),tz=(e,n)=>({stayLabel:e(n.MEMBERSHIPS_CLUB_STAY_WITH_MEMBERSHIP),confirmLabel:e(n.MEMBERSHIPS_CLUB_FINISH_CANCELLATION)}),tW=e=>{var n,t,i,l;let{translate:s,keys:o,locale:r,clubSubscription:a,benefitsStillActive:c}=e,d=s(o.MEMBERSHIPS_CANCELLED_BADGE),u=null!==(t=tI(null==a?void 0:a.createdAt,r))&&void 0!==t?t:s(o.MEMBERSHIPS_NOT_AVAILABLE),_=null!==(i=tI(null==a?void 0:a.cancellationDate,r))&&void 0!==i?i:s(o.MEMBERSHIPS_NOT_AVAILABLE),h=null!==(l=tI(null==a?void 0:null===(n=a.cancellation)||void 0===n?void 0:n.benefitsActiveUntil,r))&&void 0!==l?l:s(o.MEMBERSHIPS_NOT_AVAILABLE);return[{label:s(o.MEMBERSHIPS_MEMBERSHIP_STATUS),value:d,badge:{label:d,variant:"neutral"}},{label:s(o.MEMBERSHIPS_MEMBER_SINCE_LABEL),value:u},{label:s(o.MEMBERSHIPS_MEMBERSHIP_ENDED),value:_},{label:s(c?o.MEMBERSHIPS_PERKS_ACTIVE_UNTIL:o.MEMBERSHIPS_PERKS_ENDED),value:h,valueColor:c?"positive":"default"}]},tq=(e,n,t)=>({termsLabel:e(n.MEMBERSHIPS_SEE_TERMS),termsHref:t});function tK(){let e=(0,eK._)(["\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 24px;\n  box-sizing: border-box;\n\n  @media (max-width: ","px) {\n    padding: 0 16px;\n    gap: 24px;\n  }\n"]);return tK=function(){return e},e}function tG(){let e=(0,eK._)(["\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 32px;\n  box-sizing: border-box;\n\n  @media (max-width: ","px) {\n    gap: 24px;\n  }\n"]);return tG=function(){return e},e}function tY(){let e=(0,eK._)(["\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  gap: 16px;\n  box-sizing: border-box;\n\n  @media (max-width: ","px) {\n    padding: 24px 16px;\n    border: 1px solid ",";\n    border-radius: 8px;\n    background-color: ",";\n  }\n"]);return tY=function(){return e},e}function tJ(){let e=(0,eK._)(["\n  display: flex;\n  align-items: center;\n  height: 24px;\n  width: 189px;\n  overflow: hidden;\n\n  svg {\n    width: 189px;\n    height: 24px;\n  }\n"]);return tJ=function(){return e},e}function tQ(){let e=(0,eK._)(["\n  width: 100%;\n  margin: 0;\n  border: 0;\n  border-top: 1px solid ",";\n"]);return tQ=function(){return e},e}let tX=eG.Z.div(tK(),e=>{let{theme:n}=e;return n.mediaQueries.mobile}),t$=eG.Z.div(tG(),e=>{let{theme:n}=e;return n.mediaQueries.mobile}),t0=eG.Z.div(tY(),e=>{let{theme:n}=e;return n.mediaQueries.mobile},e=>{let{theme:n}=e;return n.colors.shades[100].color},e=>{let{theme:n}=e;return n.colors.shades.white.color}),t1=eG.Z.div(tJ()),t2=eG.Z.hr(tQ(),e=>{let{theme:n}=e;return n.colors.shades[100].color}),t9=e=>{let{credits:n,details:t,detailsMessage:i,savings:o,showSavings:r=!0,benefits:a,benefitsTitle:c,cta:d,logo:u,variant:_="active",onShopNow:h,onStay:p,onConfirmCancellation:m,isStayDisabled:C=!1,isConfirmDisabled:x=!1,showRetentionConflictMessage:f=!1,retentionConflictMessage:v}=e,{translate:g,TRANSLATION_KEYS:b}=(0,q.T)(),S=b.ACCOUNT,y="cancelled"===_,E=(0,s.useMemo)(()=>null===n?null:null!=n?n:tO(g,S),[S,n,g]),T=(0,s.useMemo)(()=>null!=t?t:tk(g,S),[S,t,g]),M=(0,s.useMemo)(()=>y||null===o?null:null!=o?o:tZ(g,S),[S,y,o,g]),j=(0,s.useMemo)(()=>{let e=tF(g,S);return{title:null!=c?c:e.title,benefits:null!=a?a:e.benefits}},[S,a,c,g]),N=(0,s.useMemo)(()=>null!=d?d:tz(g,S),[S,d,g]),B=!y&&r&&!!M&&M.lineItems.length>0;return(0,l.jsxs)(tX,{children:[(0,l.jsxs)(t$,{children:[(0,l.jsxs)(t0,{children:[u?(0,l.jsx)(t1,{children:u}):null,u?(0,l.jsx)(t2,{}):null,E?(0,l.jsx)(ni,{data:E,onShopNow:h}):null,(0,l.jsx)(nM,{title:g(b.ACCOUNT.MEMBERSHIPS_SUBSCRIPTION_DETAILS),fields:T,message:i})]}),B?(0,l.jsx)(n8,{data:M}):null,(0,l.jsx)(tp,{title:j.title,benefits:j.benefits})]}),(0,l.jsx)(tT,{data:N,mode:y?"cancelled":"cancellation",onStay:p,onConfirmCancellation:m,isStayDisabled:C,isConfirmDisabled:x,showRetentionConflictMessage:f,retentionConflictMessage:v})]})};var t3=t(41070);let t8=(e,n)=>"".concat("membership_savings_usd_v1",":").concat(e,":").concat(n||"unknown"),t6=e=>{try{let n=(0,t3.rV)(e);if(!n||"object"!=typeof n)return null;return n}catch(e){return null}},t4=(e,n)=>{try{(0,t3.LS)(e,n)}catch(e){}},t5=e=>{let{cache:n,clubStartedAt:t,latestOrderPurchaseDate:i}=e;return!!n&&n.clubStartedAt===t&&n.latestOrderPurchaseDate===i};var t7=t(79778),ie=t(21172),it=t(32490),ii=t(72357);let il=(e,n)=>{if(!e)return!1;if(!n)return!0;let t=new Date(e).getTime(),i=new Date(n).getTime();return!(Number.isNaN(t)||Number.isNaN(i))&&t>=i},is=(e,n)=>(null==e?void 0:e.length)?e.filter(e=>il(e.purchaseDate,n)):[],io=e=>{var n,t;return e.length?e.reduce((e,n)=>e?new Date(n.purchaseDate).getTime()>
1new Date(e).getTime()?n.purchaseDate:e:n.purchaseDate,null!==(t=null===(n=e[0])||void 0===n?void 0:n.purchaseDate)&&void 0!==t?t:null):null},ir=e=>{var n,t,i,l,s;let o=Number(null===(n=e.totals)||void 0===n?void 0:n.shipping),r=Number(null===(t=e.shippingMethod)||void 0===t?void 0:t.amount);return!(!(null!==(s=null===(l=e.shippingMethod)||void 0===l?void 0:null===(i=l.type)||void 0===i?void 0:i.toLowerCase())&&void 0!==s?s:"").includes("free")&&(Number.isNaN(o)||0!==o)&&(Number.isNaN(r)||0!==r))},ia=(e,n)=>n?Number((e.filter(ir).length*n).toFixed(2)):0,ic=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:6,i=0;return e.forEach(e=>{var l;null==e||null===(l=e.return_requests)||void 0===l||l.forEach(e=>{var l;if(e.created_at&&!il(e.created_at,n))return;let s=Number(null===(l=e.financials)||void 0===l?void 0:l.handling_fee);i+=s>0?s:t})}),Number(i.toFixed(2))},id=(e,n)=>{var t;let i=(null!==(t=null==e?void 0:e.filter(e=>"spend"===e.type&&il(e.issued_at,n)))&&void 0!==t?t:[]).reduce((e,n)=>e+Number(n.amount||0),0);return{creditsUsedCount:i,creditsUsedAmount:Number(i.toFixed(2))}},iu=e=>{let{price:n,completedOrderCount:t}=e,i=Number(null!=n?n:0),l=Number(null!=t?t:0);return!i||l<=0?0:Number((i*l).toFixed(2))},i_=e=>{let{ordersCount:n,freeShippingSavings:t,returnFeeSavings:i,creditsUsedCount:l,creditsUsedAmount:s,feesCollected:o}=e,r=Number((t+i+s).toFixed(2));return{ordersCount:n,freeShippingSavings:t,returnFeeSavings:i,creditsUsedCount:l,creditsUsedAmount:s,totalSavings:r,feesCollected:o}},ih=(e,n)=>({...e,latestOrderPurchaseDate:n,shouldShow:e.totalSavings>e.feesCollected}),ip=(e,n)=>(null===t7.fc||void 0===t7.fc?void 0:t7.fc.url)?"".concat(t7.fc.url,"?user=").concat(encodeURIComponent(e),"&order_number=").concat(encodeURIComponent(n)):null,im=()=>{var e;let{countrySubs:n}=(0,w.Cm)("en-US"),t=null==n?void 0:n.find(e=>{var n;return String(null!==(n=null==e?void 0:e.name)&&void 0!==n?n:"").includes("club_membership")});return Number(null!==(e=null==t?void 0:t.save)&&void 0!==e?e:9.95)},iC=async(e,n)=>await Promise.all(n.map(async n=>{let t=ip(e,n.number);if(!t)return null;try{let e=await (0,it.o)(t);return null!=e?e:null}catch(e){return ea.Yd.error("[useMembershipSavings] track order failed",{orderNumber:n.number,error:e}),null}})),ix=e=>{let{email:n,clubMembershipId:t,clubStartedAt:i,subscriptionPrice:l,completedOrderCount:o,enabled:r=!0}=e,[a,c]=(0,s.useState)(null),[d,u]=(0,s.useState)(!1),_=(0,s.useCallback)(async()=>{if(!r||!n||!i){c(null);return}u(!0);try{let{orders:e}=await (0,ii.X)({email:n}),s=is(e,i),r=io(s),a=t8(n,t),d=t6(a);if(t5({cache:d,clubStartedAt:i,latestOrderPurchaseDate:r})&&d){c(ih(d,d.latestOrderPurchaseDate));return}let[u,_]=await Promise.all([iC(n,s),(0,ie.f)()]),h=im(),p=ia(s,h),m=ic(u,i),{creditsUsedCount:C,creditsUsedAmount:x}=id(_.balanceHistory,i),f=iu({price:l,completedOrderCount:o}),v=i_({ordersCount:s.length,freeShippingSavings:p,returnFeeSavings:m,creditsUsedCount:C,creditsUsedAmount:x,feesCollected:f});t4(a,{...v,latestOrderPurchaseDate:r,clubStartedAt:i,computedAt:new Date().toISOString()}),c(ih(v,r))}catch(e){ea.Yd.error("[useMembershipSavings] calculation failed",e),c(null)}finally{u(!1)}},[t,i,o,n,r,l]);return(0,s.useEffect)(()=>{_()},[_]),{savings:a,isLoading:d,refresh:_}},iv=eW.k.MEMBERSHIPS_FEEDBACK_TITLE,ig=eW.k.MEMBERSHIPS_FEEDBACK_SUBTITLE,ib=eW.k.MEMBERSHIPS_FEEDBACK_SUBMIT,iS=eW.k.MEMBERSHIPS_FEEDBACK_RETURN_TO_ACCOUNT,iy="feedback-form-modal";var iE=t(32182);let iT=e=>{let{retentionOfferDetails:n,subscription:t}=e;return(null==n?void 0:n.code)?{decision:"set_and_stop",offers:n}:t?{decision:"set_and_continue",offers:t}:{decision:"clear_and_stop"}};var iM=t(72102),ij=t(16976);let iN="clubMembership";var iB=e=>{var n,t,i,r,a,c,d,u,_,h,C,x,f,g,b,S,y;let{setDisplayCancellationFlowSubmitted:E,switchPage:T,isCancellationFlowIntEnabled:N}=e,{translate:B,TRANSLATION_KEYS:A}=(0,q.T)(),R=(0,o.useRouter)(),{locale:H}=R,{localePrefix:P}
1=(0,w.Cm)(H),[O,D]=(0,s.useState)(!1),[Z,F]=(0,s.useState)(!1),[z,W]=(0,s.useState)(!1),K=(0,v.useSearchParams)(),{email:Q,clubMembershipId:X,clubMembershipStarted:$,retentionHistory:ee,subscriptions:et,credits:ei}=(0,p.q3)(),{updateUserInfo:el}=(0,p.x7)(),er="manage-club"===K.get("cancel"),[ea,ec]=(0,s.useState)(!1),eu=(0,ez.fr)(iN),[e_,eh]=(0,s.useState)(eu),[ep,em]=(0,s.useState)(!1),[eC,ex]=(0,s.useState)(!1),[ef,ev]=(0,s.useState)(null),[eg,eb]=(0,s.useState)(null),[eS,ey]=(0,s.useState)(null),eE=en.CannotAfford,eT=(null==eE?void 0:eE.code)===(null==e_?void 0:e_.code),eM=eT||eC||ep,ej={subscription_start_date:null!==(c=null==et?void 0:null===(n=et[iN])||void 0===n?void 0:n.createdAt)&&void 0!==c?c:"",price:null!==(d=null==et?void 0:null===(t=et[iN])||void 0===t?void 0:t.price)&&void 0!==d?d:0,frequencyUnit:(0,eo.s)(null!==(u=null==et?void 0:null===(i=et[iN])||void 0===i?void 0:i.frequencyUnit)&&void 0!==u?u:""),frequencyValue:null!==(_=null==et?void 0:null===(r=et[iN])||void 0===r?void 0:r.frequencyValue)&&void 0!==_?_:0,currency:null!==(h=null==et?void 0:null===(a=et[iN])||void 0===a?void 0:a.currency)&&void 0!==h?h:"",email:Q},eN=(0,s.useMemo)(()=>O,[O]),eB=e=>{let n=iT({retentionOfferDetails:eu,subscription:null==e?void 0:e[iN],retentionHistory:ee});if("set_and_stop"===n.decision){eh(n.offers);return}if("set_and_continue"===n.decision)eh(n.offers);else if("clear_and_stop"===n.decision){eh(!1);return}let t=ee.length>0&&(null==ee?void 0:ee.find(n=>{var t;return n.subscription_id===(null==e?void 0:null===(t=e[iN])||void 0===t?void 0:t.id)}))||(null==e?void 0:e[iN]);if(t){var i,l,s,o,r,a,c,d,u,_,h,p,m,C,x,f;let n={subscription_id:null!==(u=null==t?void 0:t.subscription_id)&&void 0!==u?u:null==e?void 0:null===(i=e[iN])||void 0===i?void 0:i.id,subscription_new_due_date:null!==(_=null===(s=e[iN])||void 0===s?void 0:null===(l=s.scheduleStatus)||void 0===l?void 0:l.nextPaymentDate)&&void 0!==_?_:"",code:null!==(h=null==t?void 0:t.action)&&void 0!==h?h:"active",subscription_start_date:null!==(p=null==e?void 0:null===(o=e[iN])||void 0===o?void 0:o.createdAt)&&void 0!==p?p:"",price:null!==(m=null==e?void 0:null===(r=e.clubMembership)||void 0===r?void 0:r.price)&&void 0!==m?m:0,frequencyUnit:(0,eo.s)(null!==(C=null==e?void 0:null===(a=e[iN])||void 0===a?void 0:a.frequencyUnit)&&void 0!==C?C:""),frequencyValue:null!==(x=null==e?void 0:null===(c=e[iN])||void 0===c?void 0:c.frequencyValue)&&void 0!==x?x:0,currency:null!==(f=null==e?void 0:null===(d=e[iN])||void 0===d?void 0:d.currency)&&void 0!==f?f:"",subscription_rescheduled:!1};(0,ez.IK)(n,iN),eh((0,ez.fr)(iN))}},ew=async()=>(0,eX.F)({clubMembershipId:X,subscriptionKey:iN,retentionOffers:e_,subscriptions:et,email:Q,subscriptionData:ej,retentionOfferObj:eE,currentRetentionOfferCode:"two_free_months",skipMonthsForCurrentRetentionOffer:3,feedbackFormModalId:iy,retentionOfferRedeemed:eC,isRetentionOfferConflict:ep,setRetentionOfferRedeemed:ex,setIsRetentionOfferConflict:em,setRetentionOffers:eh,getClubCancellationOfferAccepted:j.TH,location:"my_account"}),eI=async()=>{var e;if(eb(null),ey(null),!Q)return;let n=await (0,iM.Q)({userEmail:Q});if(!n)return;let t=(0,ij.Hk)(n);el(t);let i=null===(e=t.subscriptions)||void 0===e?void 0:e.clubMembership;if(!(0,I.lU)(i))return;let l=tI((0,I._z)(i),H);l&&(ey(l),eb(B(A.ACCOUNT.MEMBERSHIPS_CANCEL_BENEFITS_UNTIL,{date:l})))},eA=async()=>(0,eX.b)({clubMembershipId:X,subscriptionKey:iN,retentionOffers:e_,subscriptions:et,email:Q,cancelSubscriptionReason:B(eq),feedbackFormModalId:iy,setIsCancelSubscriptionSuccess:ev,setRetentionOfferRedeemed:ex,getClubCancellationRequested:j.LA,location:"my_account",onBeforeOpenFeedback:eI});(0,s.useEffect)(()=>{eN&&window.scrollTo({top:0,behavior:"smooth"})},[eN]),(0,s.useEffect)(()=>{E({display:eN&&!Z,isSentSuccessfully:z,isClubPlus:!1,isLoading:Z})},[eN,Z,z,E]),(0,s.useEffect)(()=>{er&&R.replace("/account/manage-memberships",void 0,{shallow:!0})},[er]),(0,s.useEffect)(()=>{!(0,I.lU)(null==et?void 0:et[iN])&&(eT||(eB(et),(0,M.lQ)((0,j.HO)({email:String(Q),cancellation_reason:"N/A",offerType:eE.code,subscriptionType:iN,subscriptionId:X,location:"my_account"}))))},[et]),(0,s.useEffect)(()=>{var e,n,t,i,l;let s=null!==(i=null===(n=et[iN])||void 0===n?void 0:null===(e=n.scheduleStatus)||void 0===e?void 0:e.nextPaymentDate)&&void 0!==i?i:"",o=null!==(l=null===(t=et[
1iN])||void 0===t?void 0:t.id)&&void 0!==l?l:"";em((0,es.n)({nextPaymentDate:s,subscriptionId:o,retentionHistory:ee}))},[et,iN,ee]);let eR=null==et?void 0:et[iN],eL=(0,I.lU)(eR),eU=(0,I._z)(eR),eH=eL&&(0,I._c)(eU),eP=null!==(C=null!=$?$:null==eR?void 0:eR.createdAt)&&void 0!==C?C:null,{savings:eO}=ix({email:Q,clubMembershipId:X,clubStartedAt:eP,subscriptionPrice:null==eR?void 0:eR.price,completedOrderCount:null==eR?void 0:eR.completedOrderCount,enabled:!!(Q&&eP)&&!eL}),ek=tN({frequencyValue:null!==(x=null==eR?void 0:eR.frequencyValue)&&void 0!==x?x:null==e_?void 0:e_.frequencyValue,frequencyUnit:null==eR?void 0:eR.frequencyUnit,locale:H}),eD=tB(Number(null!==(g=null!==(f=null==e_?void 0:e_.price)&&void 0!==f?f:null==eR?void 0:eR.price)&&void 0!==g?g:0),null!==(b=null==eR?void 0:eR.frequencyValue)&&void 0!==b?b:null==e_?void 0:e_.frequencyValue),eV=null!==(y=null!==(S=null==e_?void 0:e_.currency)&&void 0!==S?S:null==eR?void 0:eR.currency)&&void 0!==y?y:"USD",eZ=(null==e_?void 0:e_.price)?"".concat((0,L.T)(eD,{locale:"en",currency:eV})," ").concat(eV,"/month"):"$4.99 USD/month",eW=tH(ei,B,A.ACCOUNT),eK=eL?tW({translate:B,keys:A.ACCOUNT,locale:H,clubSubscription:eR,benefitsStillActive:eH}):tP({translate:B,keys:A.ACCOUNT,locale:H,clubSubscription:eR,retentionOffers:e_}),eG=eL&&eH?B(A.ACCOUNT.MEMBERSHIPS_CANCELLED_PERKS_MESSAGE):null,eY=eL?tq(B,A.ACCOUNT,"".concat(P,"/pages/shapermint-terms-and-conditions")):tz(B,A.ACCOUNT),e$=eL?B(A.ACCOUNT.MEMBERSHIPS_KEEP_GOING_WHEN_REJOIN):void 0,e0=(null==eO?void 0:eO.shouldShow)?tZ(B,A.ACCOUNT,{ordersCount:eO.ordersCount,freeShippingSavings:eO.freeShippingSavings,creditsUsedCount:eO.creditsUsedCount,creditsUsedAmount:eO.creditsUsedAmount,returnFeeSavings:eO.returnFeeSavings,totalSavings:eO.totalSavings,currency:"USD"}):null,e1=!N&&(eT||ep),e2=()=>{ec(!0),(0,M.lQ)({event:"subscription_cancellation_requested",email:String(Q),subscriptionType:iN,subscriptionId:X,location:"my_account"})},e9=()=>ec(!1);return ea?(window.scrollTo({top:0,behavior:"smooth"}),N)?(0,l.jsx)(eF,{setOpenPopup:e9,email:Q,clubMembershipId:X}):(0,l.jsx)(ed,{setOpenPopup:e9}):(0,l.jsxs)(l.Fragment,{children:[Z&&(0,l.jsx)(k,{}),!eN&&!Z&&(0,l.jsxs)("div",{className:V().manageClubContainer,children:[(0,J.hQ)(H)?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:V().creditsBannerContainer,children:(0,l.jsx)(G,{})}),(0,l.jsx)("div",{id:"credits-balance-container",className:V().creditsBalanceWrapper,children:(0,l.jsx)(Y.U,{seeMoreAction:()=>{if(!T)return null;T("Balance")},quantity:5})})]}):(0,l.jsx)(m,{}),(0,l.jsx)("span",{className:V().separator}),(0,l.jsx)(eJ,{children:(0,l.jsx)(t9,{variant:eL?"cancelled":"active",logo:(0,l.jsx)(m,{width:189,height:24}),credits:eW,details:eK,detailsMessage:eG,savings:eL?null:e0,showSavings:!eL&&!!(null==eO?void 0:eO.shouldShow),benefitsTitle:e$,cta:eY,onShopNow:()=>{(0,M.lQ)((0,j.bL)({email:String(Q),subscriptionId:String(null!=X?X:""),subscriptionType:iN,creditsAvailable:Number(null!=ei?ei:0),offerType:eE.code,location:"my_account",locale:String(null!=H?H:"en-US")})),globalThis.location.assign("".concat(P,"/collections/club-exclusive-deals"))},onStay:()=>{if(N){window.location.assign("/account/home");return}ew()},onConfirmCancellation:()=>{if(N){e2();return}eA()},isStayDisabled:!N&&eM,isConfirmDisabled:ef||(0,eQ.H)(ee,X),showRetentionConflictMessage:e1,retentionConflictMessage:B(A.ACCOUNT.MEMBERSHIPS_CLUB_ALREADY_REDEEMED)})})]}),(0,l.jsx)(U.u_,{id:iy,children:(0,l.jsx)(iE.q,{retentionAccepted:eC,modalId:iy,membershipId:X,subscriptionType:iN,email:Q,feedbackTitle:B(iv),feedbackSubtitle:B(ig),primaryButtonText:B(ib),secondaryButtonText:B(iS),localePrefix:P,priceLabel:"<strong>".concat(ek?"".concat(eZ," billed quarterly"):eZ," after</strong>"),benefitsActiveUntilLabel:eg,benefitsActiveUntilDate:eS})})]})},iw=t(72189),iI=t(21278),iA=t(9884),iR=t(67694),iL=t(74572),iU=t(74665),iH=t(99155),iP=t(23510),iO=t(46946);let ik=e=>{var n,t,i,l,o;let{handleReturnToAccount:r,email:a,subscriptionId:c,constants:d,zendeskTags:u,zendeskUrl:_="https://hook.us1.make.com/zdbxn1mnqekk7ofb3cg2yczqb78padzl",subscriptions:h,subscriptionType:p,isAutomated:m,switchPage:C,retentionHistory:x}
1=e,[f,v]=(0,s.useState)(d.cancelConfirmationOptionsInitialValue),[g,b]=(0,s.useState)(d.feedbackInitialValue),[S,y]=(0,s.useState)(!1),E={subscription_start_date:null==h?void 0:null===(n=h[p])||void 0===n?void 0:n.createdAt,price:null==h?void 0:null===(t=h[p])||void 0===t?void 0:t.price,frequencyUnit:(0,eo.s)(null==h?void 0:null===(i=h[p])||void 0===i?void 0:i.frequencyUnit),frequencyValue:null==h?void 0:null===(l=h[p])||void 0===l?void 0:l.frequencyValue,currency:null==h?void 0:null===(o=h[p])||void 0===o?void 0:o.currency,email:a},T=async e=>{try{if(!a||!c)throw Error("Email or subscriptionId is required");let n=await iP.o.cancel({type:e.type,subscriptionId:e.subscriptionId,email:e.email,option:e.option,reason:e.reason});return(null==n?void 0:n.status)===iU.W.OK&&m&&(0,M.lQ)({event:"club_cancellation_requested",email:String(a),subscriptionType:p,subscriptionId:c,comments:e.reason,location:"my_account"}),n}catch(e){ea.Yd.error("[sendFormToZendesk]",e)}},j=async(e,n)=>(m&&(0,M.lQ)({event:"club_cancellation_offer_accepted",email:String(a),subscriptionType:p,subscriptionId:c,offerType:e.type,offerValue:e.option,offerDescription:e.reason,location:"my_account"}),await (0,iH.S)(JSON.stringify({subject:e.subject,retention_type:e.reason,email:a,subscription_id:c,type:e.type,tag:m?n?"shm_ma_success":"shm_ma_failed":void 0}),_)),N=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];b(d.getFeedbackValues(e,r))};return(0,s.useEffect)(()=>{var e,n,t;let i=null==h?void 0:null===(n=h[p])||void 0===n?void 0:null===(e=n.scheduleStatus)||void 0===e?void 0:e.nextPaymentDate,l=null==h?void 0:null===(t=h[p])||void 0===t?void 0:t.id;y((0,es.n)({nextPaymentDate:i,subscriptionId:l,retentionHistory:x}))},[h,p,x]),{cancelConfirmationOptions:f,setCancelConfirmationOptions:v,feedbackProps:g,setFeedbackProps:b,getCancelConfirmationOptions:e=>{var n,t,i,l;let{reason:s}=e,o=d.cancelOptions,r=Object.keys(o).find(e=>e.includes(s)),_=o[s];return{title:null!==(n=_.title)&&void 0!==n?n:"",subtitle:null!==(t=_.subtitle)&&void 0!==t?t:"",buttonText:null!==(i=_.buttonText)&&void 0!==i?i:"",linkText:null!==(l=_.linkText)&&void 0!==l?l:"",isBookCall:_.isBookCall,linkOnClick:async e=>{let{storePrefix:n}=e,t=u.cancellation["".concat(n,"-").concat(r)];b(d.feedbackInitialValue);let i={type:t,option:r,reason:"".concat(t,": ").concat(_.linkText),email:a,subscriptionId:c};return await T(i)},buttonOnClick:async e=>{var n;let{storePrefix:t,subject:i}=e,l=u.retention["".concat(t,"-").concat(r)],s={subject:i,type:l,option:r,reason:"".concat(l,": ").concat(_.buttonText)};if(_.isBookCall){await j(s,!0),N(!0),null==C||C("book-call");return}let o=m?await (0,iO.D)({subscriptionId:c,code:null!==(n=null==_?void 0:_.code)&&void 0!==n?n:"",subscriptionType:p,subscriptionData:E}):{success:!1,status:void 0,isRetentionOfferConflict:!1};if(y(!!(o&&"object"==typeof o&&o.isRetentionOfferConflict)),!("object"==typeof o&&(null==o?void 0:o.isRetentionOfferConflict))){let e="object"==typeof o&&!!o.success;await j(s,e),N(!1),null==C||C("cancel-confirmation")}}}},isRetentionOfferConflict:S}};function iD(){let e=(0,eK._)(["\n  display: flex;\n  justify-content: flex-start;\n  border-bottom: 1px solid #f2f2f2;\n  padding-bottom: 1rem;\n"]);return iD=function(){return e},e}function iV(){let e=(0,eK._)(["\n  flex: 1;\n  display: flex;\n  justify-content: center;\n  font-family: 'Inter', Arial, sans-serif;\n  font-weight: 600;\n  color: #222;\n  letter-spacing: 0.01em;\n  user-select: none;\n  pointer-events: none;\n"]);return iV=function(){return e},e}function iZ(){let e=(0,eK._)(["\n  cursor: pointer;\n"]);return iZ=function(){return e},e}let iF=eG.Z.header(iD()),iz=eG.Z.div(iV()),iW=eG.Z.div(iZ()),iq=e=>{let{title:n,onClose:t,closeIcon:i=(0,l.jsx)(R.J.Actions.Close,{height:1,width:1},"close-button")}=e;return(0,l.jsxs)(iF,{children:[i&&(0,l.jsx)(iW,{onClick:t,children:i}),(0,l.jsx)(iz,{children:n})]})};var iK=t(94229),iG=t(80638),iY=t(29646);let iJ=e=>{let{handleReturnToMyAccount:n}=e,{translate:t,TRANSLATION_KEYS:i}=(0,q.T)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(iY.A,{onClick:n,buttonLabel:t
1(i.ACCOUNT.COMMON_RETURN_TO_ACCOUNT)}),(0,l.jsx)(iG.d,{})]})};var iQ=t(31298),iX=t(24481);let i$=eW.k.MEMBERSHIPS_CLUB_PLUS_ISSUES_QUESTION,i0={unhappy:{title:eW.k.CLUB_PLUS_CANCEL_FIT_EXPERTS_TITLE,selectionTitle:i$,subtitle:eW.k.CLUB_PLUS_CANCEL_FIT_EXPERTS_SUBTITLE,buttonText:eW.k.MEMBERSHIPS_CLUB_PLUS_BOOK_CALL,linkText:eW.k.MEMBERSHIPS_CLUB_PLUS_NO_THANKS_CANCEL,isBookCall:!0,code:null},"order-when-needed":{title:eW.k.CLUB_PLUS_CANCEL_SKIP_TITLE,selectionTitle:i$,subtitle:eW.k.CLUB_PLUS_CANCEL_SKIP_SUBTITLE,buttonText:eW.k.MEMBERSHIPS_CLUB_PLUS_SKIP_SHIPMENT,linkText:eW.k.MEMBERSHIPS_CLUB_PLUS_NO_THANKS_CANCEL,code:"skip_next_shipment"},"cannot-afford":{title:eW.k.CLUB_PLUS_CANCEL_CREDITS_TITLE,selectionTitle:i$,subtitle:(0,l.jsx)(d.x,{variant:"body",children:(0,l.jsx)(iX.cC,{i18nKey:eW.k.CLUB_PLUS_CANCEL_CREDITS_SUBTITLE[0],defaults:eW.k.CLUB_PLUS_CANCEL_CREDITS_SUBTITLE[1],components:{bold:(0,l.jsx)("b",{})}})}),buttonText:eW.k.MEMBERSHIPS_CLUB_PLUS_GET_CREDITS,linkText:eW.k.MEMBERSHIPS_CLUB_PLUS_NO_THANKS_CANCEL,code:"fifteen_credits"},"other-problem":{title:eW.k.CLUB_PLUS_CANCEL_FIT_EXPERTS_TITLE,selectionTitle:i$,subtitle:eW.k.CLUB_PLUS_CANCEL_FIT_EXPERTS_SUBTITLE,buttonText:eW.k.MEMBERSHIPS_CLUB_PLUS_BOOK_CALL,linkText:eW.k.MEMBERSHIPS_CLUB_PLUS_NO_THANKS_CANCEL,isBookCall:!0,code:null},"no-value":{title:eW.k.CLUB_PLUS_CANCEL_REWARDS_TITLE,selectionTitle:i$,linkText:eW.k.MEMBERSHIPS_CLUB_PLUS_NO_THANKS_CANCEL,buttonText:eW.k.MEMBERSHIPS_CLUB_PLUS_FREE_GIFT_OFFER,subtitle:(0,l.jsx)(d.x,{variant:"body",children:(0,l.jsx)(iX.cC,{i18nKey:eW.k.CLUB_PLUS_CANCEL_REWARDS_SUBTITLE[0],defaults:eW.k.CLUB_PLUS_CANCEL_REWARDS_SUBTITLE[1],components:{bold:(0,l.jsx)("b",{}),br:(0,l.jsx)("br",{})}})}),code:"free_gift_plus_10_off"}},i1={title:eW.k.MEMBERSHIPS_CLUB_PLUS_SAD_TO_SEE_GO,subtitle:eW.k.CLUB_PLUS_FEEDBACK_REQUEST_PROCESSED,buttonOnClick:()=>{},buttonText:eW.k.COMMON_RETURN_TO_ACCOUNT},i2=(e,n)=>({title:e?eW.k.CLUB_PLUS_FEEDBACK_AWESOME_BOOK_CALL:eW.k.CLUB_PLUS_FEEDBACK_AWESOME_STAY,subtitle:e?eW.k.CLUB_PLUS_FEEDBACK_BOOKING_PAGE:eW.k.CLUB_PLUS_FEEDBACK_REQUEST_IN_PROGRESS,buttonOnClick:n,buttonText:eW.k.COMMON_RETURN_TO_ACCOUNT}),i9={title:"",subtitle:"",buttonOnClick:()=>Promise.resolve(),linkOnClick:()=>Promise.resolve(),buttonText:eW.k.COMMON_RETURN_TO_ACCOUNT,linkText:""},i3=[{id:iQ._.unhappy,label:eW.k.MEMBERSHIPS_CLUB_PLUS_REASON_UNHAPPY,icon:{height:4,name:"myaccount/club_plus_frowing",svgProps:{f
1ill:"#DB9D87"},width:4}},{id:iQ._.noValue,label:eW.k.MEMBERSHIPS_CLUB_PLUS_REASON_NO_VALUE,icon:{height:4,name:"myaccount/club_plus_star_light",svgProps:{fill:"#DB9D87"},width:4}},{id:iQ._.cannotAfford,label:eW.k.MEMBERSHIPS_CLUB_PLUS_REASON_CANNOT_AFFORD,icon:{height:4,name:"myaccount/club_plus_wallet_thin",svgProps:{fill:"#DB9D87"},width:4}},{id:iQ._.orderWhenNeeded,label:eW.k.MEMBERSHIPS_CLUB_PLUS_REASON_PREFER_ON_DEMAND,icon:{height:4,name:"myaccount/club_plus_cursor_click",svgProps:{fill:"#DB9D87"},width:4}}],i8={cancellation:{"sbx-unhappy":"sbx_can_unhappy","sbx-cannot-afford":"sbx_can_cannot_afford","sbx-no-value":"sbx_can_novalue","sbx-order-when-needed":"sbx_can_orderwhenneeded","sbx-cfr-cancelled":"sbx_cfr_cancelled","sbx-other-problem":"sbx_can_others"},retention:{"sbx-cannot-afford":"sbx_cfr_15credits","sbx-unhappy":"sbx_cfr_booked","sbx-no-value":"sbx_cfr_freegift","sbx-order-when-needed":"sbx_cfr_skipped","sbx-other-problem":"sbx_cfr_others"}};var i6=t(76671),i4=t(93898),i5=t(45117),i7=t(80040);let le=["https://cdn.shapermint.com/assets/images/shapermint/howItWorks1.png?v=1709085246","https://cdn.shapermint.com/assets/images/shapermint/HowItWorks2.png?v=1709085246","https://cdn.shapermint.com/assets/images/shapermint/howItWorks3.png?v=1709085246","https://cdn.shapermint.com/assets/images/shapermint/howItWorks4.png?v=1709085246"],ln="shaperboxMembership";var lt=e=>{var n,t;let{switchPageTo:r}=e,{translate:a,TRANSLATION_KEYS:c}=(0,q.T)(),_=(0,y.v)(),h=(0,o.useRouter)(),m="manage-club-plus"===(0,v.useSearchParams)().get("cancel"),[x,f]=(0,s.useState)("cancel-subscription-reasons"),{email:g,shaperboxMembershipId:b,subscriptions:S,retentionHistory:E}=(0,p.q3)(),{locale:T}=(0,o.useRouter)(),{localePrefix:j}=(0,w.Cm)(T),N=(0,ez.fr)(ln),[B,I]=(0,s.useState)(N),A=()=>{(0,U.L5)("cancel-subscription-modal",{type:"open"}),(0,M.lQ)({event:"subscription_cancellation_requested",email:String(g),subscriptionType:ln,subscriptionId:b,location:"my_account"})};function R(){if(!r)return null;r("Balance")}let H=()=>{window.location.assign("".concat(j,"/account/home"))},P=()=>{if(null==N?void 0:N.code)I(N);else{if(0===E.length||!S[ln]){I(!1);return}let m=E.find(e=>{var n;return e.subscription_id===(null===(n=S[ln])||void 0===n?void 0:n.id)});if(m){var e,n,t,i,l,s,o,r,a,c,d,u,_,h,p;let C={subscription_id:null!==(r=null==m?void 0:m.subscription_id)&&void 0!==r?r:"",subscription_new_due_date:null!==(a=null===(n=S[ln])||void 0===n?void 0:null===(e=n.scheduleStatus)||void 0===e?void 0:e.nextPaymentDate)&&void 0!==a?a:"",code:null!==(c=null==m?void 0:m.action)&&void 0!==c?c:"",subscription_start_date:null!==(d=null===(t=S[ln])||void 0===t?void 0:t.createdAt)&&void 0!==d?d:"",price:null!==(u=null==S?void 0:null===(i=S.clubMembership)||void 0===i?void 0:i.price)&&void 0!==u?u:0,frequencyUnit:(0,eo.s)(null!==(_=null===(l=S[ln])||void 0===l?void 0:l.frequencyUnit)&&void 0!==_?_:""),frequencyValue:null!==(h=null===(s=S[ln])||void 0===s?void 0:s.frequencyValue)&&void 0!==h?h:0,currency:null!==(p=null===(o=S[ln])||void 0===o?void 0:o.currency)&&void 0!==p?p:"",subscription_rescheduled:!1};(0,ez.IK)(C,ln),I((0,ez.fr)(ln))}}};(0,s.useEffect)(()=>{m&&h.replace("".concat(j,"/account/manage-memberships"),void 0,{shallow:!0})},[m]),(0,s.useEffect)(()=>{P()},[E,S]);let{cancelConfirmationOptions:O,feedbackProps:k,getCancelConfirmationOptions:D,setCancelConfirmationOptions:Z,isRetentionOfferConflict:F}=ik({type:"clubPlus",email:g,subscriptionId:b,handleReturnToAccount:H,constants:i,zendeskTags:i8,subscriptions:S,subscriptionType:ln,isAutomated:!0,switchPage:f,retentionHistory:E}),z=i3.map(e=>({...e,label:a(e.label)})),W={"cancel-feedback-retention":(0,l.jsx)(iL.l,{title:a(O.title),subtitle:s.isValidElement(O.subtitle)?O.subtitle:a(O.subtitle),buttonText:a(O.buttonText),buttonOnClick:()=>{O.buttonOnClick({storePrefix:"sbx",subject:"We're glad you stayed! ".concat(a(O.buttonText)," Confirmed")})},linkText:a(O.linkText),linkOnClick:()=>{O.linkOnClick({storePrefix:"sbx"}).then(()=>{f("cancel-confirmation")})},onReturnToAccount:H,isRetentionOfferConflict:F}),"cancel-confirmation":(0,l.jsx)(iR.S,{title:a(k.title),subtitle:a(k.subtitle),buttonText:a(k.buttonText),buttonOnClick:H,isRetentionOfferConflict:F}),"book-call":(0,l.jsx)("div",{className:V().bookCallContent,children:(0,l.jsx)(iA.Y,{title:a(k.title),subtitle:a(k.subtitle),loadingTitle:a(c.ACCOUNT.MEMBERSHIPS_CLUB_PLUS_TAKING_TO_BOOKING),loadingTime:5e3,children:(0,l.jsx)(iJ,{handleReturnToMyAccount:H})})}),"cancel-subscription-reasons":(0,l.jsx)(iI.S,{handleOnCancel:e=>{var n,t;Z(D({reason:e.reason})),(0,M.lQ)((0,el.jR)({email:g,cancellation_reason:String(e.reason),subscriptionType:ln,subscriptionId:null!=b?b:"",location:"my_account"})),(0,M.lQ)((0,el.HO)({email:g,cancellation_reason:String(e.reason),offerType:null!==(t=null===(n=i0[e.reason])||void 0===n?void 0:n.code)&&void 0!==t?t:"",subscriptionType:ln,subscriptionId:null!=b?b:"",location:"my_account"})),f("cancel-feedback-retention"),(0,iw.k)()},handleOnReturnMyAccount:H,reasons:z,cancelButtonText:a(c.ACCOUNT.MEMBERSHIPS_CLUB_PLUS_CONTINUE_CANCEL),returnToAccountButtonText:a(c.ACCOUNT.MEMBERSHIPS_CLUB_PLUS_RETURN_TO_ACCOUNT),otherProblemButtonText:a(c.ACCOUNT.MEMBERSHIPS_CLUB_PLUS_OTHER),title:a(c.ACCOUNT.MEMBERSHIPS_CLUB_PLUS_ISSUES_QUESTION)})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:V().subscriptionFlashcard,children:B&&(0,l.jsxs)(eJ,{children:[(0,l.jsx)(C,{width:189,height:24}),(0,l.jsx)(i5.b,{subscriptionId:null!=b?b:"",banner:{logoUrl:(0,l.jsx)(u.J,{name:"custom/gift_thin",width:"24px",height:"24px",fill:"#882A2B"}),title:null===(n=i6.V[null==B?void 0:B.code])||void 0===n?void 0:n.title,subtitle:(0,i4.B)({offerCode:null==B?void 0:B.code,subscriptionType:ln,switchPage:R})},title:a(c.ACCOUNT.MEMBERSHIPS_SUBSCRIPTION_DETAILS),subscriptionDetail
1s:[{label:a(c.ACCOUNT.MEMBERSHIPS_NEXT_BILLING_PERIOD),value:(null==B?void 0:B.subscription_new_due_date)?(0,i7.xN)(null==B?void 0:B.subscription_new_due_date):a(c.ACCOUNT.MEMBERSHIPS_NOT_AVAILABLE)},{label:a(c.ACCOUNT.MEMBERSHIPS_START_DATE),value:(null==B?void 0:B.subscription_start_date)?(0,i7.xN)(null==B?void 0:B.subscription_start_date):a(c.ACCOUNT.MEMBERSHIPS_NOT_AVAILABLE)},{label:a(c.ACCOUNT.MEMBERSHIPS_TOTAL),value:(null==B?void 0:B.price)?"".concat((0,L.T)(Number(null==B?void 0:B.price),{locale:"en",currency:null!==(t=null==B?void 0:B.currency)&&void 0!==t?t:"USD"}),"/").concat((0,eo.s)(null==B?void 0:B.frequencyUnit)):a(c.ACCOUNT.MEMBERSHIPS_NOT_AVAILABLE)}]}),(0,l.jsx)("div",{id:"credits-balance-container",className:V().creditsBalanceWrapper,children:(0,l.jsx)(Y.U,{seeMoreAction:R,quantity:5})})]})}),(0,l.jsxs)("div",{className:V().manageClubPlusContainer,children:[(0,l.jsx)("div",{className:V().mainBanner,children:(0,l.jsx)(X.E,{src:"https://cdn.shapermint.com/assets/images/shapermint/shapermint-club-plus-banner.png",alt:a(c.ACCOUNT.MEMBERSHIPS_CLUB_PLUS_IMAGE_ALT),width:"100%",height:"100%"})}),(0,l.jsxs)("div",{className:V().mainContent,children:[(0,l.jsx)("div",{className:V().header,children:(0,l.jsx)("div",{children:(0,l.jsx)(d.x,{variant:_===iK.Yi.Desktop?"heading3":"heading5",weight:"bold",children:a(c.ACCOUNT.MEMBERSHIPS_CLUB_PLUS_TAGLINE)})})}),(0,l.jsxs)("div",{className:V().benefitsPlus,children:[(0,l.jsx)(d.x,{variant:"body",weight:"demi",size:"regular",children:a(c.ACCOUNT.MEMBERSHIPS_CLUB_PLUS_BENEFITS_INTRO)}),(0,l.jsx)(d.x,{variant:"body",weight:"regular",size:"regular",children:a(c.ACCOUNT.MEMBERSHIPS_CLUB_PLUS_TRY_ON)}),(0,l.jsx)(d.x,{variant:"body",weight:"regular",size:"regular",children:a(c.ACCOUNT.MEMBERSHIPS_CLUB_PLUS_MIX_MATCH)}),(0,l.jsx)(d.x,{variant:"body",weight:"demi",size:"regular",children:a(c.ACCOUNT.MEMBERSHIPS_CLUB_PLUS_BEST_PRICES)})]}),(0,l.jsx)("div",{className:V().howItWorks,children:le.map((e,n)=>(0,l.jsx)(X.E,{className:V().howItWorksImage,src:e,alt:"How it works ".concat(n),width:"100%",height:"100%"},n))}),(0,l.jsx)("span",{className:V().separator}),(0,l.jsx)("div",{className:V().cancellationBox,children:(0,l.jsx)(Q.Z,{text:a(c.ACCOUNT.MEMBERSHIPS_CLUB_PLUS_CANCEL_SUBSCRIPTION),onClick:()=>A(),disabled:(0,eQ.H)(E,b)})})]})]}),(0,l.jsx)(U.u_,{id:"cancel-subscription-modal",className:V().cancelSubscriptionModal,onClickOverlayHandler:()=>{f("cancel-subscription-reasons")},children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(iq,{title:(0,l.jsx)(C,{width:146,height:20}),onClose:()=>{(0,U.L5)("cancel-subscription-modal",{type:"close"}),f("cancel-subscription-reasons")}}),W[x]]})})]})},li=t(72897),ll=t.n(li),ls=e=>{let{message:n}=e,t=()=>{window.location.href="/"},i=()=>{window.location.href="/account/home"};return(0,l.jsxs)("div",{className:ll().container,children:[(0,l.jsxs)("div",{className:ll().message,children:[(0,l.jsx)(d.x,{variant:"heading5",size:"regular",weight:"demi",children:n.title}),(0,l.jsx)("div",{className:ll().subtitle,children:(0,l.jsx)(d.x,{variant:"body",size:"regular",weight:"regular",children:n.subtitle})})]}),(0,l.jsx)(Q.Z,{text:"Back to Account",type:"submit",onClick:()=>{n.title.includes("Successful")?t():i()},size:h.dr.Medium,className:ll().returnCta})]})},lo=e=>{let{title:n="Unsubscribe Successful",subtitle:t="You can subscribe again by tapping on Shapermint Club in the account section",isSentSuccessfully:i}=e;return(0,l.jsx)(l.Fragment,{children:i?(0,l.jsx)(ls,{message:{title:n,subtitle:t}}):(0,l.jsx)(ls,{message:{title:"Something Went Wrong...",subtitle:"Please try again later"}})})},lr=t(76277),la=e=>{let{switchPage:n}=e;return(0,l.jsx)("div",{className:V().creditsBalanceContainer,children:(0,l.jsx)(Y.U,{pagination:!0})})},lc=e=>{let{subscriptionType:n,switchPage:t,isCancellationFlowIntEnabled:i}=e;(0,lr.Z)();let{translate:o}
1=(0,b.T)(),[r,a]=(0,s.useState)({display:!1,isSentSuccessfully:!1,isClubPlus:!1,isLoading:!1}),c={Club:(0,l.jsx)(iB,{setDisplayCancellationFlowSubmitted:a,switchPage:t,isCancellationFlowIntEnabled:i}),"Club+":(0,l.jsx)(lt,{setDisplayCancellationFlowSubmitted:a,switchPageTo:t}),Balance:(0,l.jsx)(la,{switchPage:t})},d={Club:o(S.dg.ACCOUNT.MANAGE_ONLINE_SHAPERMINT_CLUB),"Club+":o(S.dg.ACCOUNT.MANAGE_ONLINE_MANAGE_CLUB_PLUS),Balance:o(S.dg.ACCOUNT.MANAGE_ONLINE_BALANCE)};function u(){t&&t({Club:"Main Content","Club+":"Main Content",Balance:"Main Content"}[n])}return(0,l.jsx)("div",{children:r.display?(0,l.jsx)("div",{className:V().cancellationFormSubmittedContainer,children:(0,l.jsx)(lo,{title:o(S.dg.ACCOUNT.MEMBERSHIPS_REQUEST_PROCESSED),subtitle:o(S.dg.ACCOUNT.MEMBERSHIPS_RESUBSCRIBE_HINT,{clubName:"Shapermint Club".concat(r.isClubPlus?"+":"")}),isSentSuccessfully:r.isSentSuccessfully})}):(0,l.jsxs)("div",{children:[(0,l.jsxs)("button",{type:"button","data-testid":"page-main-button-title",className:V().manageOnline,onClick:u,onKeyDown:e=>(0,K.$)(e,u,["Enter"," "]),"aria-label":o(S.dg.COMMON.BUTTONS_GO_BACK),children:[(0,l.jsx)(R.J.Arrows.ChevronLeft,{width:1.3,height:1.3,fill:"#292929","aria-hidden":"true"}),d[n]]}),c[n]]})})},ld=t(92409),lu=t(59945),l_=e=>{let{testMode:n}=e,t=(0,lr.Z)(),{locale:i}=(0,o.useRouter)(),[r,c]=(0,s.useState)("Main Content"),{isFeatureEnabled:d}=(0,lu.s)("cancellation_flow:v1:en-GB-en-AU-en-CA"),u={"Main Content":(0,l.jsx)(A,{goToManage:e=>c(e)}),"Manage Club":(0,l.jsx)(lc,{subscriptionType:"Club",switchPage:c,isCancellationFlowIntEnabled:d}),"Manage Club +":(0,l.jsx)(lc,{subscriptionType:"Club+",switchPage:c,isCancellationFlowIntEnabled:d}),Balance:(0,l.jsx)(lc,{subscriptionType:"Balance",switchPage:c,isCancellationFlowIntEnabled:d})};return"desktop"===t?(0,l.jsx)(a.Z,{testMode:n,children:u[r]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ld.Z,{}),(0,l.jsx)("div",{children:u[r]})]})},lh=!0,lp=()=>{var e;let{locale:n}=(0,o.useRouter)(),{localePrefix:t}=(0,w.Cm)(n),{isClubMember:i,isLoggedIn:a,isShaperboxMember:c,autoshipMembershipIds:d}=(0,p.q3)(),u=i||c||(null!==(e=null==d?void 0:d.length)&&void 0!==e?e:0)>0;return((0,s.useEffect)(()=>{if(!a){let e="".concat(t,"/account/manage-memberships");globalThis.location.assign("".concat(t,"/account/login?").concat((0,r.ZB)(e)));return}if(u)return;let e=(0,N.xK)(n,i)&&(0,B.l)({locale:n,isClubMember:i})?"".concat(t,"/pages/join-club"):"".concat(t,"/account/home");window.location.assign(e)},[u,i,a,n,t]),a&&u)?(0,l.jsx)(l_,{}):null}},9788:function(e,n,t){"use strict";t.d(n,{U:function(){return B}});var i=t(85893),l=t(67294),s=t(60814),o=t(73539),r=t(9182),a=t(14126),c=t(91769),d=t(11163),u=t(60498),_=t.n(u),h=t(42298),p=t(61867),m=t(94123);let C="earn",x=e=>{let{id:n,type:t,amount:l,issuedAt:o}=e,{locale:r}=(0,d.useRouter)(),{currencyFormat:u}=(0,p.Cm)(r),{translate:x}=(0,a.T)(),f=function(){var e;let n={earn:x(m.dg.ACCOUNT.CREDITS_BALANCE_RECEIVED),spend:x(m.dg.ACCOUNT.CREDITS_BALANCE_USED)};return x(m.dg.ACCOUNT.CREDITS_BALANCE_CREDIT_ACTION,{action:null!==(e=n[t])&&void 0!==e?e:n[C],amount:String(l),plural:1!==l?"s":""})}(),v=function(){var e;let n={earn:x(m.dg.ACCOUNT.CREDITS_BALANCE_EARNINGS),spend:x(m.dg.ACCOUNT.CREDITS_BALANCE_EXPENSES)},i=(0,h.Z)(new Date(o),"dd-MM-yyyy");return"".concat(i," - ").concat(null!==(e=n[t])&&void 0!==e?e:n[C])}(),g=function(){var e;let n={earn:"+",spend:"-"};return null!==(e=n[t])&&void 0!==e?e:n[C]}(),b=function(){var e;let n={earn:"#227A7A",spend:"#C64844"};return null!==(e=n[t])&&void 0!==e?e:n[C]}(),S=function(){var e;let n={earn:_().chevronEarn,spend:_().chevronSpend};return null!==(e=n[t])&&void 0!==e?e:n[C]}();return(0,i.jsxs)("div",{className:_().container,children:[(0,i.jsxs)("div",{className:_().leftSideContainer,children:[(0,i.jsx)(c.J,{name:"other/arrow_outward",width:"36px",height:"36px",fill:b,className:S}),(0,i.jsxs)("div",{children:[(0,i.jsx)(s.x,{variant:"body",className:_().title,children:f}),(0,i.jsx)(s.x,{variant:"body",className:_().description,children:v})]})]}),(0,i.jsxs)("div",{className:_().priceCreditsBalanceContainer,children:[(0,i.jsxs)(s.x,{variant:"body",className:_().price,children:[g," ",l]}),(0,i.jsxs)(s.x,{variant:"body",className:_().credits,children:[g," ",u,l]})]})]})};var f=t(72189),v=t(50361),g=t.n(v),b=t(73755);let S=()=>(0,i.jsx)("div",{className:g().container,children:(0,i.jsx)(b.Z,{height:53})});var y=t(63013),E=t(12420),T=t(87027),M=t(10653),j=t(82356),N=t.n(j);let B=e=>{let{seeMoreAction:n,quantity:t=10,pagination:c=!1,tableHeading:d}=e,[u,_]=(0,l.useState)(1),{email:h,clubMembershipId:p}=(0,T.q3)(),{translate:m,TRANSLATION_KEYS:C}=(0,a.T)(),v=null!=d?d:m(C.ACCOUNT.MY_CREDITS_WIDGET_HEADING),{creditBalanceHistory:g,isLoading:b}=(0,M.Y)(),j=null==g?void 0:g.slice((u-1)*t,u*t),B={from:1,to:Math.ceil((null==g?void 0:g.length)/t),onChange:_,currentPage:u};return(0,l.useEffect)(()=>{let e=null==g?void 0:g.slice((u-1)*t,u*t);(null==e?void 0:e.length)!==t&&(0,f.k)()},[u]),(0,l.useEffect)(()=>{(null==g?void 0:g.length)&&(0,y.lQ)((0,E.zT)({email:String(h),subscriptionId:p,location:c?"my_account_credit_balance":"my_account_membership",balanceHistory:g,subscriptionType:"clubMembership"}))},[g,h,p]),(0,i.jsxs)("div",{className:N().container,children:[(0,i.jsxs)("div",{className:N().header,children:[(0,i.jsx)(s.x,{variant:"body",children:v}),n&&(0,i.jsx)(o.Z,{text:m(C.COMMON.BUTTONS_SEE_MORE),onClick:function(){if(!n)return null;n()},uppercase:!1})]}),b?(0,i.jsx)(i.Fragment,{children:Array(t).fill(!0).map((e,n)=>(0,i.jsx)(S,{},n))}):(0,i.jsx)(i.Fragment,{children:null==j?void 0:j.map(e=>(0,i.jsx)(x,{id:e.id,amount:e.amount,issuedAt:e.issued_at,type:e.type},e.id))}),c&&(0,i.jsx)("div",{className:N().paginationContainer,children:(0,i.jsx)(r.t,{from:B.from,to:B.to,onChange:B.onChange,currentPage:B.currentPage})})]})}},20638:function(e){e.exports={comment:"styles_comment__TK6QB",verifiedBuyerContainer:"styles_verifiedBuyerContainer__kI91Z",commentFirstRow:"styles_commentFirstRow__6O8uZ",authorContainer:"styles_authorContainer__FPAZD",commentTitle:"styles_commentTitle__uvf7R",commentContent:"styles_commentContent___tTSm",ratingsAndDaysOld:"styles_ratingsAndDaysOld__bYnJv",commentImage:"styles_commentImage__I_pEY",toggleButton:"styles_toggleButton__TZAEy",imageRow:"styles_imageRow__7Llqx"}},11753:function(e){e.exports={popupContent:"styles_popupContent__LUeOA",formContent:"styles_formContent__zVVk3",cancellationReasonContainer:"styles_cancellationReasonContainer__Fitw4",cancellationMainHeading:"styles_cancellationMainHeading__nwCq5",cancellationHeading:"styles_cancellationHeading__EhBXD",cancellationReasons:"styles_cancellationReasons__sA9kj",reasonBtn:"styles_reasonBtn__3uLio",selected:"styles_selected__bQlGX",commentsContainer:"styles_commentsContainer__M1AXw",commentsHeading:"styles_commentsHeading__jfaew",commentsBox:"styles_commentsBox__1lcza",commentsTextArea:"styles_commentsTextArea__t4ODf",ctasContainer:"styles_ctasContainer__KnNGI",continueToCancel:"styles_continueToCancel__MnNkB"}},59396:function(e){e.exports={creditsConfirmationContainer:"styles_creditsConfirmationContainer__QbX9l",creditsConfirmation:"styles_creditsConfirmation__IX9CF",creditsConfirmationContent:"styles_creditsConfirmationContent__L83BU",creditsText:"styles_creditsText__IzKHz",creditsHeading:"styles_creditsHeading__uWxs8",creditsReturnToAcCta:"styles_creditsReturnToAcCta__lmk23"}},95555:function(e){e.exports={popupContent:"styles_popupContent__5z2zS",formContent:"styles_formContent__Jxw65",cancellationReasonContainer:"styles_cancellationReasonContainer__vw0Wi",cancellationMainHeading:"styles_cancellationMainHeading__lmI1i",cancellationHeading:"styles_cancellationHeading__5IOJK",cancellationReasons:"styles_cancellationReasons__Mt3r9",reasonBtn:"styles_reasonBtn__FJwJX",selected:"styles_selected__5lPJK",commentsContainer:"styles_commentsContainer__Ndmko",commentsHeading:"styles_commentsHeading__o4Ae6",commentsBox:"styles_commentsBox__HLg42",commentsTextArea:"styles_commentsTextArea__FVsMs",ctasContainer:"styles_ctasContainer__10uJ3",continueToCancel:"styles_continueToCancel__2_AtL"}},9819:function(e){e.exports={retentionSuccessContainer:"styles_retentionSuccessContainer__s9nK9",retentionSuccessHeading:"styles_retentionSuccessHeading__GiYat",retentionSuccessTxt:"styles_retentionSuccessTxt__c7iww",clickHereLink:"styles_clickHereLink___WD2y",retentionReturnToAcCta:"styles_retentionReturnToAcCta__ql8oY"}},76519:function(e){e.exports={popupContent:"styles_popupContent__cYVOy",formContent:"styles_formContent__hGD63",cancellationReasonContainer:"styles_cancellationReasonContainer__G61QW",cancellationMainHeading:"styles_cancellationMainHeading__n7B99",cancellationSubHeading:"styles_cancellationSubHeading__4mtzu",cancellationHeading:"styles_cancellationHeading__08UFC",cancellationReasons:"styles_cancellationReasons__CVEji",reasonBtn:"styles_reasonBtn__ibhHN",selected:"styles_selected__8D8dt",commentsContainer:"styles_commentsContainer__hUsYA",commentsHeading:"styles_commentsHeading__JIeN9",commentsBox:"styles_commentsBox__7_Q2r",commentsTextArea:"styles_commentsTextArea__S56sB",ctasContainer:"styles_ctasContainer__AfW1p",continueToCancel:"styles_continueToCancel__IFG1r",giftContainer:"styles_giftContainer__inLt2",giftHeader:"styles_giftHeader__2TrJE",giftBody:"styles_giftBody__waT3e",giftBodyImage:"styles_giftBodyImage__0_JXc",giftBodyText:"styles_giftBodyText__OWrXs"}},63071:function(e){e.exports={overlay:"styles_overlay__kPxCL",popupContainer:"styles_popupContainer__19n7D",popupInnerContainer:"styles_popupInnerContainer__EUxBo",popupHeader:"styles_popupHeader__JwKT_",closeButton:"styles_closeButton__tKNcy",clubLogo:"styles_clubLogo__8LnAU",toastContainer:"styles_toastContainer__HVy1C",returnToAcCta:"styles_returnToAcCta__PXDEd",retentionSuccessContainer:"styles_retentionSuccessContainer__lI93Z"}},33231:function(e){e.exports={reclaimCouponStage4SkeletonContainer:"styles_reclaimCouponStage4SkeletonContainer__ON3vm",innerContainer:"styles_innerContainer__peTB6"}},72897:function(e){e.exports={container:"styles_container__xxon5",message:"styles_message__znVPj",subtitle:"styles_subt
1itle__iuwdH",returnCta:"styles_returnCta__IiCgX"}},73564:function(e){e.exports={overlay:"styles_overlay__XM2m8",popupContainer:"styles_popupContainer__zDU7Q",popupInnerContainer:"styles_popupInnerContainer__iYM5c",popupHeader:"styles_popupHeader___e_6P",popupContent:"styles_popupContent__zp0yv",formContent:"styles_formContent__e5dSX",closeButton:"styles_closeButton__kKkPK",clubLogo:"styles_clubLogo__tuS_a",retentionByCreditsContainer:"styles_retentionByCreditsContainer__TAUBL",leavingText:"styles_leavingText__oYH5z",newCreditsOfferContainer:"styles_newCreditsOfferContainer__E9yTQ",newCreditsOffer:"styles_newCreditsOffer__gwpAC",newCreditsOfferText:"styles_newCreditsOfferText__MSpPY",newCreditsCount:"styles_newCreditsCount__JoD59",cancellationReasonContainer:"styles_cancellationReasonContainer__s46dL",cancellationHeading:"styles_cancellationHeading__ecqae",cancellationReasons:"styles_cancellationReasons__ZV23z",reasonBtn:"styles_reasonBtn__rhfWs",selected:"styles_selected__ADzKu",radioInput:"styles_radioInput__fP3nM",ctasContainer:"styles_ctasContainer__uDYN6",commentsContainer:"styles_commentsContainer__8apbz",commentsHeading:"styles_commentsHeading__vsjPj",commentsBox:"styles_commentsBox__w6VgA",commentsTextArea:"styles_commentsTextArea__hNybO",cancellationConfirmation:"styles_cancellationConfirmation__Qc_Ka",proceedWithCancellationTxt:"styles_proceedWithCancellationTxt__KAla8",cancellationText:"styles_cancellationText__D8WVE",retentionCta:"styles_retentionCta__stqzp",returnToAcCta:"styles_returnToAcCta__N5UQR",newCreditsConfirmationContainer:"styles_newCreditsConfirmationContainer__1OVzL",newCreditsConfirmation:"styles_newCreditsConfirmation__SS949",newCreditsConfirmationContent:"styles_newCreditsConfirmationContent__XnWWT",newCreditsConfirmationHeading:"styles_newCreditsConfirmationHeading__iXB8W",newCreditsConfirmationText:"styles_newCreditsConfirmationText__kD7_c",newCreditsIssueText:"styles_newCreditsIssueText__Xgo_3",retentionSuccessContainer:"styles_retentionSuccessContainer__eaPXm",retentionReturnToAcCta:"styles_retentionReturnToAcCta__rWMyx",retentionSuccessHeading:"styles_retentionSuccessHeading__KD029",retentionSuccessTxt:"styles_retentionSuccessTxt__8H8UH",toastContainer:"styles_toastContainer__KlQqJ",newCreditsReturnToAcCta:"styles_newCreditsReturnToAcCta__3_zsx",newCreditsCtaContainer:"styles_newCreditsCtaContainer__JLhAs",newCreditsMotivationText:"styles_newCreditsMotivationText__CluUI",newCreditsOfferCta:"styles_newCreditsOfferCta__9FeBl",clickHereLink:"styles_clickHereLink__Z3Ex_"}},1355:function(e){e.exports={clubPro:"styles_clubPro__heH_K",clubWord:"styles_clubWord__5aRrX",container:"styles_container__lBKCY",clubMemberGreetings:"styles_clubMemberGreetings__nw_qF",clubMemberText:"styles_clubMemberText__rhB4c",usernameTitle:"styles_usernameTitle__s_XVi",clubSinceTitle:"styles_clubSinceTitle__ZdEuz",creditsContainer:"styles_creditsContainer__9uHSI",creditsTotal:"styles_creditsTotal__3eeDr",useCredits:"styles_useCredits__QZIXN"}},60498:function(e){e.exports={container:"styles_container__5xKr5",priceCreditsBalanceContainer:"styles_priceCreditsBalanceContainer__qfsh9",price:"styles_price__jc1Wd",credits:"styles_credits__WStIS",leftSideContainer:"styles_leftSideContainer__vulkU",title:"styles_title__4oHxo",description:"styles_description__jcIzj",chevronEarn:"styles_chevronEarn__oPNqw",chevronSpend:"styles_chevronSpend__4r_7T"}},50361:function(e){e.exports={container:"styles_container__0KXVS"}},82356:function(e){e.exports={container:"styles_container__LDI3t",header:"styles_header__3mmGr",paginationContainer:"styles_paginationContainer__jP1FC"}},12602:function(e){e.exports={manageOnline:"styles_manageOnline__UIlnj",creditsBalanceWrapper:"styles_creditsBalanceWrapper__2Ds_5",manageClubContainer:"styles_manageClubContainer__GgTEu",manageClubPlusContainer:"styles_manageClubPlusContainer__fCONn",separator:"styles_separator__rwimL",header:"styles_header__g0W4v",mainContent:"styles_mainContent__wO2HB",benefits:"styles_benefits__1hhIn",cancellationForm:"styles_cancellationForm__LFeuZ",benefitList:"styles_benefitList__r_QMq",bold:"styles_bold__Y2K9E",exclusiveOffers:"styles_exclusiveOffers__p0VY9",swiperContainer:"styles_swiperContainer__vHM_z",swiperInnerContainer:"styles_swiperInnerContainer__9c9I2",swiperSlide:"styles_swiperSlide__P88n_",redeemOffer:"styles_redeemOffer__OL1_X",couponCopyButton:"styles_couponCopyButton__pKTyf",copyText:"styles_copyText__4r501",mainBanner:"styles_mainBanner__RAd87",benefitsPlus:"styles_benefitsPlus__YwyqO",howItWorks:"styles_howItWorks__CjMIP",howItWorksImage:"styles_howItWorksImage__5zVI2",cancellationBox:"styles_cancellationBox__VrHTU",creditsBalanceContainer:"styles_creditsBalanceContainer__rqSUw",creditsBannerContainer:"styles_creditsBannerContainer__gWlQJ",clubCancellationCta:"styles_clubCancellationCta__Jwh4s",cancellationSuccessToastContainer:"styles_cancellationSuccessToastContainer__hsKc_",clubCancellationCta2:"styles_clubCancellationCta2__n7VS7",continueToCancel:"styles_continueToCancel__f6NjD",subscriptionFlashcard:"styles_subscriptionFlashcard__Oc13i",cancelSubscriptionModal:"styles_cancelSubscriptionModal__NaErL",bookCallContent:"styles_bookCallContent__JK06L"}},24635:function(e){e.exports={clubPro:"styles_clubPro__jBGUs",clubWord:"styles_clubWord__f7krB",subscriptionsContainer:"styles_subscriptionsContainer__WFcgC",title:"styles_title___YYhG",subscriptionLeftSide:"styles_subscriptionLeftSide__bjmMW",subscriptionTitle:"styles_subscriptionTitle__5OVa9",subscriptionDate:"styles_subscriptionDate__USPmB",subscription:"styles_subscription__LBKFi",subscriptionActiveBox:"styles_subscriptionActiveBox__um5fA",subscriptionCancelledBox:"styles_subscriptionCancelledBox__4AWyj",
1subscriptionLinks:"styles_subscriptionLinks__WyMKT",subscriptionManageText:"styles_subscriptionManageText__sE2rv",verticalLine:"styles_verticalLine__HUq4O",cancellationSwiperContainer:"styles_cancellationSwiperContainer__OB8lQ",cancellationSwiperWrapper:"styles_cancellationSwiperWrapper__6Lwt_",cancelSubscriptionBenefitsTitle:"styles_cancelSubscriptionBenefitsTitle__r_RHH",accordionsWrapper:"styles_accordionsWrapper__RBFDP",formWrapper:"styles_formWrapper__Z1Hk6",cancellationFormSubmittedContainer:"styles_cancellationFormSubmittedContainer__7Bj9v",mobileMembershipTitle:"styles_mobileMembershipTitle__G_ZPt",separator:"styles_separator__gTaAJ",sectionTitleRow:"styles_sectionTitleRow__SVEld",sectionTitleIcon:"styles_sectionTitleIcon__2cO6O",cancelledPlansTitle:"styles_cancelledPlansTitle__neU11"}}},function(e){e.O(0,[2647,38,4038,2888,9774,179],function(){return e(e.s=37224)}),_N_E=e.O()}]);

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.