1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8345],{789:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSP:()=>b,default:()=>N});var r=n(37876),a=n(14232),l=n(71004),i=n(37062),o=n(18401),c=n(40880),s=n(81667),u=n(8349),d=n(78634),p=n(81249),h=n(20884),m=n(52066),f=n(12365),w=n(51410),y=n(4309),v=n(89099),g=n(88876),_=n(67685),A=n(54368),x=n.n(A),b=!0;let N=e=>{let{globalData:t}=e,{siteTitle:n,publisherCurrency:A}=t,{query:{siteSlug:b}}=(0,v.useRouter)(),[N,j]=(0,a.useState)(!1),[I,P]=(0,a.useState)(null),[S,k]=(0,a.useState)(null),O=(0,g.A)("subscription_downgrade"),C=(0,g.A)("subscription_interval_switch"),{userData:{productCart:D,productInterval:X},updateUserData:E}=(0,y.u)(),T=(0,d.A)(I),M=(0,a.useCallback)(async()=>{try{let t=await fetch("/api/subscriptionSchedule",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteSlug:b,order:I,newProduct:D,newInterval:X,cyoAmount:null==D?void 0:D.cyoPrice})}),n=await t.json();if("success"===n.status){var e;j(!0),E({productCart:null,productInterval:_.IX.Annual});let t=(0,s.A)(I.interval,X,I.product,D,{existingAmount:T,newAmount:null!=(e=null==D?void 0:D.cyoPrice)?e:null}),n=(0,u.A)(D,X,A),r={currency:n.currency,value:parseFloat(n.price.toString()),transaction_id:I.stripeId,items:[n]};switch(t){case s.c.Downgrade:O(r);break;case s.c.IntervalSwitch:C(r)}}}catch(e){(0,c.v)(e,{order:I,product:D})}},[b,I,D,X,T,j,E,s.A]);return(0,a.useEffect)(()=>{k(null),D&&b&&!D.chooseYourOwnPricing&&fetch((0,i.c)("priceIncrease",{siteSlug:b,productId:D.id,interval:X})).then(e=>e.ok?e.json():null).then(e=>{(null==e?void 0:e.pending)&&null!==e.price&&k(e.price)}).catch(e=>(0,c.v)(e,{}))},[D,X,b]),(0,r.jsx)(p.A,{...t,title:"".concat(n," | Payment"),headerTheme:"simple",footerTheme:"simple",hideAds:!0,children:N?(0,r.jsxs)("div",{className:x().pageWrapper,children:[(0,r.jsx)("h1",{className:x().pageTitle,children:"Your subscription update is confirmed."}),(0,r.jsx)("p",{className:x().pageCopy,children:"If you upgraded to a product with any additional perks, stay tuned to your inbox for details within the next couple of hours."}),(0,r.jsx)("p",{children:(0,r.jsx)(h.A,{href:"/account#subscription",children:"Back to account management"})})]}):(0,r.jsxs)("div",{className:x().pageWrapper,children:[(0,r.jsx)("h1",{className:x().pageTitle,children:"Review subscription updates"}),(0,r.jsx)(m.A,{step:2,total:2}),D?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h4",{className:x().pageSubtitle,children:"Your current subscription and renewal date:"}),(0,r.jsx)(f.A,{showEditLink:!1,variant:"modify",setParentOrder:P}),(0,r.jsx)("h4",{className:x().pageSubtitle,children:"Your new subscription after renewal:"}),(0,r.jsxs)("div",{className:x().newOrderWrapper,children:[(0,r.jsx)("h5",{className:x().newOrderName,children:D.displayName}),(0,r.jsxs)("p",{className:x().newOrderInterval,children:[(0,l.TT)(X)," for ",null!==S?(0,l.Nx)(A,"".concat(S,"/").concat((0,l.oA)(X))):"".concat((0,o.A)(A)).concat((0,l.$g)(D,X))]})]}),(0,r.jsx)(w.A,{interval:X,product:D,priceOverride:null!==S?S:void 0}),(0,r.jsx)("button",{className:x().paymentBtn,type:"button",disabled:!I,onClick:e=>{e.preventDefault(),M()},children:"Confirm"})]}):null]})})}},10769:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_sites/[siteSlug]/modify",function(){return n(789)}])},25619:e=>{e.exports={wrapper:"LegalNotice_wrapper__IkdC9"}},37035:e=>{e.exports={wrapper:"ProgressMeter_wrapper__tX6xX",text:"ProgressMeter_text__DHWBl"}},39459:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(67685);let a=(e,t)=>t===r.IX.Annual?parseFloat(e.annualPrice):t===r.IX.Monthly?parseFloat(e.monthlyPrice):0},48220:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(67685);let a=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e)return null;if(n){let a=e.find(e=>e.id===n&&(e.interval===t||e.interval===r.IX.All));if(a)return a}let a=e.filter(e=>e.automatic).filter(e=>e.interval===t||e.interval===r.IX.All).filter(e=>new Date(e.expirationDate)>new Date).filter(e=>!e.startDate||new Date(e.startDate)<new Date).filter(e=>!(e.introPrice&&e.nextPrice)).filter(e=>!e.gift);return 0===a.length?null:a[0]}},51260:()=>{},51410:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(37876),a=n(48220),l=n(7126),i=n(71004),o=n(39459),c=n(67685),s=n(63037),u=n(25619),d=n.n(u),p=n(99639);let h=e=>{let{interval:t,product:n,futureGift:u=!1,applyCoupon:h=!0,customerEnteredCouponId:m
1=null,priceOverride:f=null}=e,{publisherCurrency:w,promoSettings:y}=(0,s.Xe)();if(!t||!n)return null;let v=null!=f?f:(0,o.A)(n,t),g=h&&!u?(0,a.A)(n.coupons,t,m):null,_=(0,i.vy)(t),A=null!=f?"".concat(f,"/").concat((0,i.oA)(t)):(0,i.$g)(n,t),x=e=>e>1?"s":"",b=(0,i.Nx)(w,A),N=null==y?void 0:y.promoDescriptionDisplay,j="".concat(_," at ").concat(b);if(g&&(null==g?void 0:g.duration)!=="once"){let e=(0,l.A)(v,g.discountAmount,g.discountPercent),n=(0,i.Nx)(w,e);switch(g.duration){case"forever":j="".concat(_," at ").concat(n);break;case"repeating":if(t===c.IX.Monthly&&(j="".concat(_," for ").concat(g.durationMonths," month").concat(x(g.durationMonths)," at ").concat(n,", then will automatically renew ").concat(t," at ").concat(b)),t===c.IX.Annual&&g.durationMonths>12){let e=Math.floor(g.durationMonths/12);j="".concat(_," for ").concat(e," year").concat(x(e)," at ").concat(n,", then will automatically renew ").concat(t," at ").concat(b)}}}if(g&&g.nextPrice){let e=c.IX.Annual,t=(0,i.vy)(e),r=(0,i.$g)(n,e),a=(0,i.Nx)(w,r);j="".concat(t," at ").concat(a)}return u&&(j="for a free ".concat(t===c.IX.Annual?"year":"month",", then will automatically renew ").concat(_," at ").concat(b)),(0,r.jsxs)("div",{className:d().wrapper,children:[t&&v&&!N?(0,r.jsxs)("p",{children:["After your initial term, your subscription will automatically renew ",j,". ",(0,r.jsx)(p.A,{})]}):null,t&&v&&N?(0,r.jsx)("p",{children:"After your initial term, your subscription will automatically renew. Your subscription continues until you cancel, and the term and rate may change. Before any annual renewal, we will send a reminder with the term and rate. If you do nothing, we will charge the payment method you selected."}):null]})}},52066:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(37876),a=n(96043),l=n(37035),i=n.n(l);let o=e=>{let{step:t,total:n}=e,{hideCheckoutProgress:l=!1}=(0,a.A)();return l?null:(0,r.jsx)("div",{className:i().wrapper,children:(0,r.jsxs)("p",{className:i().text,children:["Step ",t," of ",n]})})}},54368:e=>{e.exports={pageWrapper:"modify_pageWrapper__L5kNo",pageTitle:"modify_pageTitle__rX_1K",pageSubtitle:"modify_pageSubtitle__UW4oP",pageCopy:"modify_pageCopy__OLZ7C",paymentBtn:"modify_paymentBtn__LaVSL",newOrderWrapper:"modify_newOrderWrapper__DQBMD",newOrderName:"modify_newOrderName__UwH1C"}},78634:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(14232),a=n(37062),l=n(17708);let i=e=>{var t;let[n,i]=(0,r.useState)(null),o=(0,l.A)();return(0,r.useEffect)(()=>{var t;if(!(null==e?void 0:e.stripeId)||!(null==e||null==(t=e.product)?void 0:t.chooseYourOwnPricing))return void i(null);fetch((0,a.c)("subscriptionSchedule",{stripeSubscriptionId:e.stripeId,siteSlug:o})).then(e=>e.ok?e.json():null).then(e=>{i("number"==typeof(null==e?void 0:e.currentAmount)?e.currentAmount:null)}).catch(()=>i(null))},[null==e?void 0:e.stripeId,null==e||null==(t=e.product)?void 0:t.chooseYourOwnPricing,o]),n}},81667:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,c:()=>a});var r=n(39459),a=function(e){return e.None="none",e.IntervalSwitch="interval_switch",e.Upgrade="upgrade",e.Downgrade="downgrade",e}({});let l=(e,t,n,a,l)=>{var i,o;if(!n||!e)return"none";let c=null!=(i=null==l?void 0:l.existingAmount)?i:null,s=null!=(o=null==l?void 0:l.newAmount)?o:null;return n.name===a.name&&e===t?a.chooseYourOwnPricing&&null!==c&&null!==s&&s!==c?s>c?"upgrade":"downgrade":"none":e!==t?"interval_switch":(null!=c?c:(0,r.A)(n,e))>=(null!=s?s:(0,r.A)(a,t))?"downgrade":"upgrade"}},96010:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(14232);let a=r.createContext({});function l({count:e=1,wrapper:t,className:n,containerClassName:l,containerTestId:i,circle:o=!1,style:c,...s}){var u,d,p;let h=r.useContext(a),m={...s};for(let[e,t]of Object.entries(s))void 0===t&&delete m[e];let f={...h,...m,circle:o},w={...c,...function({baseColor:e,highlightColor:t,width:n,height:r,borderRadius:a,circle:l,direction:i,duration:o,enableAnimation:c=!0}){let s={};return"rtl"===i&&(s["--animation-direction"]="reverse"),"number"==typeof o&&(s["--animation-duration"]=`${o}s`),c||(s["--pseudo-element-display"]="none"),("string"==typeof n||"number"==typeof n)&&(s.width=n),("string"==typeof r||"number"==typeof r)&&(s.height=r),("string"==typeof a||"number"==typeof a)&&(s.borderRadius=a),l&&(s.borderRadius="50%"),void 0!==e&&(s["--base-color"]=e),void 0!==t&&(s["--highlight-color"]=t),s}(f)},y="react-loading-skeleton";n&&(y+=` ${n}`);let v=null!=(u=f.inline)&&u,g=[],_=Math.ceil(e);for(let t=0;t<_;t++){let n=w;if(_>e&&t===_-1){let t=null!=(d=n.width)?d:"100%",r=e%1,a="number"==typeof t?t*r:`calc(${t} * ${r})`;n={...n,width:a}}let a=r.createElement("span",{className:y,style:n,key:t},"â");
1v?g.push(a):g.push(r.createElement(r.Fragment,{key:t},a,r.createElement("br",null)))}return r.createElement("span",{className:l,"data-testid":i,"aria-live":"polite","aria-busy":null==(p=f.enableAnimation)||p},t?g.map((e,n)=>r.createElement(t,{key:n},e)):g)}},99639:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(37876);let a=()=>(0,r.jsx)(r.Fragment,{children:"Your subscription continues until you cancel, and after your first renewal the term and rate may change. Before any annual renewal, we will send a reminder with the term and rate. If you do nothing, we will charge the payment method you selected."})}},e=>{e.O(0,[1596,6071,1249,2617,636,6593,8792],()=>e(e.s=10769)),_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.