PageSourceSearch

https://www.smashingmagazine.com/js/MemberSubscriptionCheckout.2259edf171b5e77ebeac.js

js smashingmagazine.com collected 2026-09-24 06:18:52 UTC 44,269 bytes, 2 lines download raw bytes

1(self.webpackChunk=self.webpackChunk||[]).push([["MemberSubscriptionCheckout"],{
1"./js/actions/subscriptions.js":(e,t,a)=>{"use strict";a.d(t,{Ld:()=>u,EO:()=>p,$0:()=>f});var l=a("../node_modules/lodash/get.js"),n=a.n(l),r=a("./js/actions/fetch.js"),s=a("./js/actions/user.js"),c=a("./js/constants/index.js"),i=a("./js/constants/actionTypes.js"),m=a("./js/utils/auth.js"),o=a("./js/utils/stripe.js"),d=a("./js/helpers/index.js");const{API_URL_ME_SUBSCRIPTIONS:h}=c.Z,u=e=>t=>{localStorage.getItem("auth.return_to");return t({type:i.Z.SUBSCRIBE_START}),(e=>{const t=m.Z.currentUser();return t?Promise.resolve(t):m.Z.login(e.email,e.password,!0).then((t=>((0,s.D5)(t,!0,e.password),t))).catch((t=>{const a=n()(t,"message")||n()(t,"description")||n()(t,"error_description");if(a&&a.match(/No user/))return m.Z.signup(e.email,e.password,{firstname:e.firstname,lastname:e.lastname}).then((()=>m.Z.login(e.email,e.password,!0).then((t=>((0,s.D5)(t,!0,e.password),t)))));throw t}))})(e).then((t=>t.jwt().then((a=>(0,o.Iw)(o.f4,{email:t.email}).then((t=>(0,r.Z)(h,{method:"POST",body:{planId:e.planId,plan:e.plan,type:e.type,paymentMethodId:t.id,recaptcha:e.recaptcha},token:a}).then((e=>e.requiresAction?o.Ag.handleCardPayment(e.secret).then((t=>t.error?Promise.reject(t.error):e)):e)).then((t=>(0,r.Z)(h,{method:"POST",body:{subscriptionId:t.subscriptionId,intentId:t.id,plan:e.plan,planId:e.planId,type:e.type},token:a}))))))))).then((()=>{const e=m.Z.currentUser();return(0,s.D5)(e),e.getUserData()})).then((a=>{t({type:i.Z.SUBSCRIBE_SUCCESS,plan:e.plan,planType:e.type,user:a})})).catch((e=>t({type:i.Z.SUBSCRIBE_FAIL,error:(0,d.jN)(e)})))},p=()=>e=>{const t=m.Z.currentUser();return e({type:i.Z.SUBSCRIPTION_CANCELLATION_START}),t.jwt().then((a=>(0,r.Z)(h,{method:"DELETE",token:a}).then((()=>t.getUserData())).then((t=>{(0,s.D5)(t),e({type:i.Z.SUBSCRIPTION_CANCELLATION_SUCCESS,user:t})})))).catch((t=>e({type:i.Z.SUBSCRIPTION_CANCELLATION_FAIL,error:(0,d.jN)(t)})))},f=()=>e=>{const t=m.Z.currentUser();return e({type:i.Z.SUBSCRIPTION_RENEWAL_START}),t.jwt().then((a=>(0,r.Z)(h,{method:"PUT",token:a}).then((()=>t.getUserData())).then((t=>{(0,s.D5)(t),e({type:i.Z.SUBSCRIPTION_RENEWAL_SUCCESS,user:t})})))).catch((t=>e({type:i.Z.SUBSCRIPTION_RENEWAL_FAIL,error:(0,d.jN)(t)})))}},
1"./js/containers/MemberSubscriptionCheckout.js":(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>O});var l=a("../node_modules/@babel/runtime/helpers/esm/extends.js"),n=a("../node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=a("../node_modules/react/index.js"),s=a("../node_modules/react-redux/es/index.js"),c=a("../node_modules/formik/dist/formik.esm.js"),i=a("../node_modules/lodash/omit.js"),m=a.n(i),o=a("../node_modules/lodash/get.js"),d=a.n(o),h=a("../node_modules/react-google-recaptcha/lib/esm/index.js"),u=a("../node_modules/smooth-scroll/dist/smooth-scroll.polyfills.min.js"),p=a.n(u),f=a("./js/utils/floatingLabels.js"),E=a("./js/constants/data/countries.json"),g=a.n(E),b=a("./js/actions/index.js"),y=a("./js/helpers/index.js"),v=a("./js/actions/subscriptions.js"),Z=a("./js/schemas/index.js"),_=a("./js/constants/index.js"),w=a("./js/forms/Checkbox.js"),j=a("./js/forms/Input.js"),N=a("./js/forms/Autocomplete.js"),S=a("./js/components/CreditCardForm.js");function M({type:e}){return r.createElement("svg",{className:"pricing__card__image member-option",width:"353",height:"359.61",viewBox:"0 0 353 359.61","aria-describedby":"title"},r.createElement("title",null,"Member Plan"),r.createElement("image",{width:"100%",height:"100%",x:"-1%",y:"0",xlinkHref:"/images/smashing-cat/member-cat.svg"}),r.createElement("text",{x:"137",y:"312",fontSize:"1em",fill:"#38B34A",className:"option option--title"},"Member"),r.createElement("g",{className:"pricing__label--member"},r.createElement("circle",{fill:"#FFFFFF",cx:"279.71",cy:"296.24",r:"45.24",className:"view--monthly"}),r.createElement("circle",{fill:"#39b349",cx:"279.71",cy:"296.24",r:"40.94",className:"fill__circle view--monthly"}),r.createElement("text",{x:"254",y:"310",fill:"#fff",className:"option option--price monthly "+("yearly"===e?"hidden":"")},r.createElement("tspan",null,"$"),"5"),r.createElement("text",{x:"250",y:"307",fill:"#fff",className:"option option--price yearly "+("yearly"===e?"":"hidden")},r.createElement("tspan",null,"$"),"50")))}function x({type:e}){return r.createElement("svg",{className:"pricing__card__image supporter-option",width:"353",height:"359.61",viewBox:"0 0 353 359.61","aria-describedby":"title"},r.createElement("title",null,"Supporter Plan"),r.createElement("image",{width:"100%",height:"100%",x:"-10%",y:"0",xlinkHref:"/images/smashing-cat/supporter-cat.svg"}),r.createElement("text",{x:"84",y:"312",fontSize:"1em",fill:"#E95D2F",className:"option option--title"},"Supporter"),r.createElement("g",{className:"pricing__label--supporter"},r.createElement("circle",{fill:"#FFFFFF",cx:"239.71",cy:"296.24",r:"44.87",className:"view--monthly"}),r.createElement("circle",{fill:"#E95D2F",cx:"239.71",cy:"296.24",r:"40.94",className:"fill__circle view--monthly"}),r.createElement("text",{x:"214",y:"310",fill:"#fff",className:"option option--price monthly "+("yearly"===e?"hidden":"")},r.createElement("tspan",null,"$"),"3"),r.createElement("text",{x:"211",y:"308",fill:"#fff",className:"option option--price yearly "+("yearly"===e?"":"hidden")},r.createElement("tspan",null,"$"),"30")))}function k({type:e}){return r.createElement("svg",{className:"pricing__card__image smashing-option",width:"353",height:"359.61",viewBox:"0 0 372.95001 357.42999","aria-describedby":"title"},r.createElement("title",null,"Smashing Plan"),r.createElement("path",{fill:"#ffd05a",d:"M185.98442,345.05761c147.64887-74.77497,140.04464-278.80263,140.04464-278.80263-77.9434-5.05021-140.04464-53.8826-140.04464-53.8826,0,0-62.10124,48.83239-140.04464,53.8826,0,0-7.60423,204.02766,140.04464,278.80263Z"}),r.createElement("g",null,r.createElement("g",null,r.createElement("path",{fill:"#db2331",d:"M62.9785,56.66295c4.9032,3.37091,11.13404-.4448,14.04431-4.68982,1.27693-1.85422,2.09547-4.52342,3.68415-6.00413,2.21403-2.20837,4.82065.03241,4.06291,2.75383-.65351,2.60049-2.86775,4.80865-4.95928,6.38428,1.97043-1.67968,5.42233-2.50761,7.74458-1.03911,3.26607,1.96378,1.01615,5.19485-1.37014,6.62249-2.10894,1.34994-4.47606,1.52846-6.90414,1.65568,2.50577.15121,5.41034.32787,6.68169,2.89695,1.36488,2.73905-.57576,4.87509-2.83015,6.28549-1.29538.81169-2.80916,1.20732-4.32521,1.31028-3.06446.20957-5.99169-.81293-8.5335-2.47355-2.15372-1.40729-4.33886-3.00532-5.74577-5.20313-1.16787-1.95196-2.45503-5.48297-1.4291-7.6581l-.12038-.84117h.00002Z"}),r.createElement("path",{fill:"#fff",d:"M30.99699,81.25491s14.25675,1.48779,10.26914-25.11979c-3.98762-26.60773,32.41636-16.5666,31.87162,2.4318-.54493,18.99836-20.87011,36.84312-42.14076,22.68799Z"}),r.createElement("path",{fill:"#db2331",d:"M32.59585,81.17525c3.60543-.54329,11.81653-4.04647,8.67028-25.04013-3.13509-20.91837,18.69368-19.18447,27.90807-8.25566-.27875-.15692-.5697-.29281-.87559-.40323-2.56495-.92485-3.03229,1.74305-3.05787,3.66271-.3163-1.13731-1.51904-2.10716-2.43049-2.78373-2.0502-1.52158-5.03004-2.19224-7.49693-1.4051-1.42894.45614-2.87266,1.80143-3.43628,3.16974-1.106,2.68514-.72208,6.19441-.30661,8.99549.65071,4.39037,1.57966,8.77799,1.38929,13.24638-.12891,3.02355-.81431,6.26759-2.4854,8.83595-.94346,1.45029-2.97236,2.77694-4.60039,3.26676-3.09177.9281-6.52711-.21579-9.39873-1.37657-1.30186-.52622-2.63219-1.15274-3.87935-1.91261Z"}),r.createElement("path",{fill:"#db2331",d:"M33.22709,81.6723c.08466-.91515.54577-1.80049.92366-2.62226.41262-.89807.85974-1.81328,1.04896-2.78986.15419-.79638.22338-1.80264-.36864-2.45143-.6277-.6886-1.21761.14009-1.4292.73648-.28661.80808-.37633,1.71183-.37037,2.56481.00615.87438.11236,1.74423.12973,2.61855-.01816-.91489-.4009-1.89169-.76634-2.71753-.17032-.38555-.5104-1.16522-1.02347-1.19542-1.0315-.0597-.28175,1.99-.13869,2.37988.33989.92564.6541,1.85771.95148,2.79835-.42977-.34441-.74693-.82932
1-1.12998-1.22224-.31612-.32399-.63115-.80321-1.11412-.89188-.36823-.06686-.59273.17288-.58391.53385.01766.76823.72972,1.26441,1.31526,1.63196.74168.46619,1.49158.93878,2.30722,1.26668l.24837-.63994h.00005Z"}),r.createElement("polygon",{fill:"#dc6927",points:"67.90713 59.29352 62.01737 59.83035 65.42846 65.17217 67.90713 59.29352"}),r.createElement("path",{fill:"#a0212a",d:"M40.92146,72.9169s7.63732-2.22102,7.83506-12.7297l-7.18127,9.2009s.00221,1.10256-.65379,3.5288Z"}),r.createElement("path",{fill:"#db2331",d:"M48.73186,59.65536c-5.51673,2.22958-10.77395-2.8441-12.69669-7.6185-.84523-2.0862-1.06649-4.86955-2.29739-6.65886-1.68341-2.63512-4.71385-1.01187-4.56263,1.80918.07541,2.68028,1.75882,5.31536,3.46047,7.3059-1.56064-2.06613-4.75174-3.6214-7.33631-2.69069-3.61393,1.21067-2.11666,4.85226-.09551,6.76267,1.7663,1.77429,4.03898,2.46125,6.38206,3.11054-2.47886-.39515-5.35307-.85066-7.15017,1.38134-1.92605,2.37953-.49281,4.88486,1.40239,6.74983,1.08978,1.07278,2.48192,1.78604,3.93929,2.2151,2.94644.86796,6.02605.50313,8.8665-.56824,2.40699-.90736,4.88675-1.99501,6.73542-3.83606,1.56306-1.65316,3.85079-5.58262,3.31987-7.92813l.03271-.03408Z"})),r.createElement("path",{fill:"#818181",d:"M66.56631,57.05095c.1721-.01738.32528-.13733.37589-.31458.26787-.93485.97379-2.45092,1.72744-2.53558l.00679-.00069c.48578-.04905,1.09045.53649,1.70486,1.65117.11627.21007.38104.28782.59283.17137.21091-.11636.28773-.3819.17137-.59282-.82735-1.50169-1.66314-2.18808-2.55502-2.09802l-.01272.00128c-1.57998.17924-2.38761,2.85917-2.47498,3.16431-.06566.23187.06829.4727.30023.5392.05462.01504.1099.01973.16331.01435Z"}),r.createElement("path",{fill:"#818181",d:"M62.66543,57.26414c.0373-.00377.0741-.01262.11046-.02571.22596-.08619.33933-.33744.25407-.56263-.61269-1.61501-1.34923-2.41247-2.25368-2.43847-1.56825-.05233-2.75915,2.49588-2.88835,2.78555-.09856.21978.00028.47785.22082.57549.21866.09611.47862-.00122.57547-.22083.39755-.88886,1.34342-2.29297,2.06795-2.26765.48957.01394,1.00816.68011,1.46105,1.87448.07216.18884.26059.29913.45217.27978h.00002Z"})),r.createElement("path",{fill:"#fff",d:"M306.37685,83.69972c-.81123,19.20615-3.77045,52.86543-14.01903,89.79243-7.8607,28.32362-18.612,53.77952-32.04832,75.84202-1.47393,2.42219-2.98202,4.7987-4.51306,7.12946-.46841.71981-.94833,1.45105-1.42818,2.15942-.21709.30851-.42274.61695-.62838.92546-.09142.1371-.18285.2742-.28564.4113-4.3874,6.43252-9.03756,12.54517-13.95048,18.32644-8.75185,10.34-18.30356,19.62888-28.62069,27.83234-3.13056,2.49074-6.32966,4.89005-9.59739,7.17514h-.01137c-4.93579,3.47338-10.03156,6.70672-15.28723,9.71162-3.62191-2.068-7.16377-4.25023-10.63707-6.54675-19.9717-13.15068-37.48684-29.93465-52.3171-50.1348l-.01144-.01144h-.01137c-.92553-1.26821-1.83955-2.54785-2.75357-3.83893-.67406-.95977-1.34819-1.94234-2.02232-2.92491-.98257-1.45105-1.96514-2.92491-2.92491-4.4102-15.15006-23.36502-27.1582-50.7975-35.70447-81.64616-10.24858-36.927-13.2078-70.57492-14.00752-89.79243,54.92199-7.975,99.83536-33.88787,120.38977-47.52984,20.55434,13.64197,65.46771,39.55484,120.38977,47.52984Z"}),r.createElement("path",{fill:"#fff",d:"M294.39381,93.28998c-.44,6.35999-1.13995,13.91998-2.19,22.35004-1.59998,12.62994-4.02997,27.20996-7.71997,42.63995-.96002,4-2,8.06-3.14001,12.16003-.07001.25-.14001.5-.21997.73999-6.26001,22.41998-14.42004,42.96002-24.31,61.27997-2.01001,3.73004-4.10004,7.38-6.26001,10.93005-1.10004,1.79999-2.25,3.63995-3.47998,5.50995-.26001.42004-.54004.86005-.83002,1.29004-.42999.67999-.85999,1.32996-1.28003,1.94-.23999.34998-.46997.69-.69995,1.02997,0,0-.19.26001-.25.37-.24005.34003-.48004.69-.72003,1.04004-.41998.63-.84998,1.23999-1.28998,1.85999-.19.27002-.39001.53998-.58002.81-.53003.73999-1.06,1.46997-1.60999,2.21002-2.73004,3.73999-5.59003,7.37-8.5,10.82996-.17004.20001-.34003.41003-.52002.61005-.04999.06995-.12.14996-.19.21997-.96997,1.14001-1.95001,2.27002-2.94,3.39001-.12.14001-.25.28998-.37.42999-.82001.89996-1.63,1.79999-2.46002,2.67999-.29999.34003-.62.67999-.94,1.01001-.82996.90997-1.69995,1.79999-2.56995,2.69-.59003.62-1.21002,1.23999-1.81,1.83002-1.34003,1.32996-2.68005,2.62994-4.05005,3.90997-3.77997,3.54999-7.67999,6.92999-11.69,10.12-.32996.27002-.65997.53003-.98999.78003-1.89001,1.47998-3.77997,2.91998-5.66998,4.27997-.70001.51001-1.38,1.01001-2.08002,1.48999-.10999.08002-.22998.15002-.33002.23004-2.81995,1.98999-5.75,3.90997-8.71997,5.75995-1.45001-.90997-2.90002-1.82996-4.34003-2.77997-.97998-.65002-1.94995-1.29999-2.91998-1.97998-7.58997-5.21002-14.79999-11-21.62-17.35004-8.70001-8.09998-16.72998-17.10999-24.04999-26.96997-.10004-.12-.21002-.26001-.29999-.38-.17999-.23004-.34003-.46002-.51001-.69-.09003-.13-.17999-.23999-.28003-.37-.41998-.57001-.82996-1.15002-1.23999-1.73004-.39001-.52997-.77002-1.04999-1.14001-1.58997-.25995-.35004-.50995-.72003-.75995-1.09003-.36005-.52997-.74005-1.07996-1.12006-1.63-.94995-1.38995-1.87994-2.79999-2.79999-4.21997-3.20001-4.91998-6.25-10.04999-9.14996-15.35004-9.88-18.07996-18.05005-38.29999-24.35004-60.37-.26996-.91998-.52997-1.83997-.77997-2.76996-1.14001-4.10004-2.17999-8.16003-3.14001-12.16003-3.70001-15.44-6.13-30.01996-7.70001-42.63995-1.07001-8.43005-1.76001-15.98004-2.20001-22.35004,47.03003-8.78998,85.90002-29.33997,108.40002-43.51001,22.51001,14.17004,61.37,34.72003,108.40997,43.51001Z"}),r.createElement("g",null,r.createElement("path",{fill:"#39b54a",d:"M161.67059,64.50898v-2.86816h4.96484v2.86816c4.30176.88281,6.50879,4.19238,6.50879,9.43262v1.21387h-5.7373v-1.59961c0-2.75781-1.10254-3.80664-3.0332-3.80664s-3.03418,1.04883-3.03418,3.80664,1.10352,4.68848,5.18555,7.94336c4.96387,3.9707,6.67383,7.00488,6.67383,11.41797,0,5.24023-2.26172,8.60449-6.56348,9.4873v2.81348h-4.96484v-2.81348c-4.35742-.88281-6.56445-4.24707-6.56445-9.4873v-2.64746h5.7373v3.0332c0,2.75781,1.21289,3.75098,3.14355,3.75098s3.14453-.99316,3.14453-3.75098-1.10352-4.74316-5.18457-7.94336c-4.96484-3.91602-6.6748-7.00488-6.6748-11.41797,0-5.18457,2.15137-8.49414,6.39844-9.43262Z"}),r.createElement("path",{fill:"#39b54a",d:"M195.09734,93.13788c0,6.50879-2.97852,10.03906-9.26758,10.03906-5.95703,0-9.0459-3.53027-9.0459-9.70801v-.99316h5.73633v1.37891c0,2.75781,1.21387,3.80566,3.14453,3.80566,2.15137,0,3.36523-1.04785,3.36523-4.74316v-7.00586h-.11035c-1.04883,2.20703-2.81348,3.36523-5.5166,3.36523-4.46777,0-6.72949-3.14453-6.72949-8.82617v-7.06055c0-6.17773,3.25488-9.70801,9.21191-9.70801s9.21191,3.53027,9.21191,9.70801v19.74805ZM189.02996,79.95429v-6.9502c0-2.75781-1.21387-3.75098-3.14453-3.75098s-3.14453.99316-3.14453,3.75098v6.9502c0,2.75781,1.21387,3.80566,3.14453,3.80566s3.14453-1.04785,3.14453-3.80566Z"}),r.createElement("path",{fill:"#39b54a",d:"M216.93914,93.13788c0,6.50879-2.97852,10.03906-9.26758,10.03906-5.95703,0-9.0459-3.53027-9.0459-9.70801v-.99316h5.73633v1.37891c0,2.75781,1.21387,3.80566,3.14453,3.80566,2.15137,0,3.36523-1.04785,3.36523-4.74316v-7.00586h-.11035c-1.04883,2.20703-2.81348,3.36523-5.5166,3.36523-4.46777,0-6.72949-3.14453-6.72949-8.82617v-7.06055c0-6.17773,3.25488-9.70801,9.21191-9.70801s9.21191,3.53027,9.21191,9.70801v19.74805ZM210.87176,79.95429v-6.9502c0-2.75781-1.21387-3.75098-3.14453-3.75098s-3.14453.99316-3.14453,3.75098v6.9502c0,2.75781,1.21387,3.80566,3.14453,3.80566s3.14453-1.04785,3.14453-3.80566Z"})),r.createElement("g",null,r.createElement("path",{fill:"#f99746",d:"M115.75491,171.18419v62.39434c-9.88296-18.07504-18.05217-38.29807-24.34759-60.37201v-2.02232h24.34759Z"}),r.createElement("path",{fill:"#f76252",d:"M157.10355,171.18419v116.41374c-8.69474-8.10059-16.72685-17.10384-24.05052-26.96399-.10286-.12566-.20565-.26283-.29707-.3885v-89.06126h24.34759Z"}),r.createElement("rect",{fill:"#f99746",x:"174.11046",y:"171.18687",width:"24.34454",height:"120.35718"}),r.createElement("path",{fill:"#f76252",d:"M239.81227,171.18419v88.26146c-2.73069,3.74758-5.58705,7.36942-8.50052,10.83136-.17141.20565-.34275.4113-.51416.61695-.05711.06855-.12566.14854-.19421.21709-.9712,1.14254-1.95377,2.27365-2.93634,3.39339-.12566.1371-.2514.28564-.37706.42274-.81116.90258-1.62239,1.80517-2.45643,2.68495-.29707.34275-.61702.67413-.93689,1.00544-.8341.91402-1.70238,1.80524-2.57072,2.69639-.59414.61702-1.21109,1.23397-1.81667,1.82811-1.33676,1.32532-2.67351,2.62784-4.04458,3.90748v-115.86534h24.34759Z"}),r.createElement("path",{fill:"#f99746",d:"M281.1266,171.18419c-6.26111,22.41669-14.41889,42.95967-24.31328,61.2746v-61.2746h24.31328Z"})),r.createElement("path",{fill:"#fff",d:"M252.54022,224.88372c-.01144.03431-.18285.62845-.18285.62845-.44561,1.57672-1.00544,3.23335-1.72525,5.11857-.75405,1.96514-1.63383,4.03314-2.6164,6.14689-1.32532,2.78781-2.85636,5.72415-4.59305,8.76329,1.08543,1.02832,2.27365,2.22797,3.46194,3.57617-.26283.42274-.54847.85691-.8341,1.29108-.4341.67413-.85691,1.32532-1.27964,1.94234-.23989.34275-.46841.6855-.69693,1.02825,0,0-.19421.26283-.25133.36562-.23996.34275-.47992.69693-.71981,1.03975-.42274.62838-.85691,1.24533-1.29108,1.86235-.19421.2742-.3885.53696-.58271.81116-3.23342,4.5245-6.62674,8.90046-10.11148,13.03646-.17141.20565-.34282.4113-.51416.61695-.9712,1.14254-1.95377,2.27365-2.93634,3.39339-.12566.1371-.2514.28564-.37706.42274-.81116.90258-1.62239,1.80517-2.45643,2.68495-.29707.34275-.61702.67413-.93689,1.00544-.8341.91402-1.70238,1.80524-2.57072,2.69639-.59414.61702-1.21109,1.23397-1.81667,1.82811-5.02715,5.00428-10.28289,9.70018-15.73284,14.03039-.33131.26276-.66262.52559-.99401.77692-1.88515,1.48529-3.78182,2.92491-5.66697,4.28454-.69693.50272-1.3825,1.00544-2.07944,1.48529-.1143.07999-.22852.14854-.33131.22852-2.82212,1.98801-5.74703,3.90748-8.71761,5.75846-1.45105-.90265-2.9021-1.82811-4.34172-2.77644-.98257-.65119-1.9537-1.30245-2.92491-1.97658-17.25237-11.83673-32.59672-26.7241-45.66742-44.31923-.28564-.35419-.5484-.71981-.81123-1.07399-.09135-.12566-.18278-.23996-.2742-.36562-.42274-.57127-.83403-1.15398-1.24533-1.73669-.3885-.52553-.76555-1.05112-1.14254-1.58815-.2514-.35419-.50272-.71974-.75412-1.08536.77692-1.15398,1.62239-2.26228,2.52505-3.32484-.3885-1.82804.0228-3.79325,1.22253-5.35853.49129-.63982,4.50162-5.63273,11.98527-8.74041l.30844-1.54248c-.86827-.31988-1.67951-.8226-2.365-1.48529-1.6339-1.58815-2.33083-3.89604-1.83955-6.11258.3885-1.81667,1.66814-4.2731,5.17575-6.82102-1.15398-6.15832-.58271-13.0707.25133-18.34924.21709-1.39387.39993-2.25078.42274-2.3422.62845-2.94778,3.18774-5.08433,6.1812-5.19856.
162838-.01144,1.17678-.03431,1.70238-.03431h.50272c.35419,0,.70837,0,1.05112.01144h.1371c16.29268.34275,24.30192,8.06635,27.84377,13.2078.04575.01144.07999.01144.1143.02287,1.00544-1.02832,2.33076-1.72525,3.83893-1.9309.26276-.04575,1.2454-.14854,2.76494-.14854,3.65615,0,12.29378.74268,20.48579,7.01523,4.45595-2.05663,11.87104-4.89012,20.29158-5.64417,1.43962-.1371,2.89067-.20565,4.28454-.20565,4.89012,0,9.52884.79972,13.77907,2.37644,2.3194.85691,3.95322,2.93634,4.23886,5.3814.09142.81123.29707,3.85036-1.18822,9.32312Z"}),r.createElement("g",null,r.createElement("g",null,r.createElement("path",{fill:"#fff",d:"M244.61096,219.44527l-10.12299,21.82255-1.13111,11.39112-2.04513,17.61807c-.17141.20565-.34275.4113-.51416.61695-8.24913,9.73449-17.33236,18.57776-27.02117,26.27849-.33131.26276-.66262.52559-.99401.77692-1.88515,1.48529-3.78182,2.92491-5.66697,4.28454l-6.54682-.73124h-.01137l-15.96136-1.77093-22.26816-22.69089-5.31285-22.79375,9.44885-22.73657-.31988-29.67188,14.07607,9.71162,27.7981,19.21758,20.69144-11.03694,19.18334-5.06153,6.71816,4.77589Z"}),r.createElement("path",{fill:"#db2331",d:"M247.39877,216.12043c-5.06153-1.87379-10.30576-2.23941-15.18444-1.7938-12.00814,1.08543-21.85686,6.98092-21.85686,6.98092-9.68874-9.80297-21.39981-8.22626-21.39981-8.22626,4.42164.90258,8.29487,4.77582,8.42054,4.89005-6.94668-1.98801-12.63652-2.93634-17.24094-3.30197-1.40538-3.05057-7.08378-12.47655-23.99341-12.83074-.47992-.01144-.99408-.02287-1.4968-.01144-.50265,0-1.00537.02287-1.51953.03431,0,0-.15997.74261-.35419,1.98801-.67413,4.21599-1.82811,14.16756,1.00544,20.4058-5.99835,2.83355-6.51251,5.15288-6.51251,5.15288l6.14689-1.5196-3.00489,14.23611c-7.91782,2.14799-12.15668,7.42653-12.41944,7.75784,1.40531-.86834,6.0669-.55984,6.0669-.55984-5.81558,3.34764-9.14035,7.75791-11.0027,11.31121,13.0707,17.59512,28.41504,32.48249,45.66742,44.31923.9712.67413,1.94234,1.32539,2.92491,1.97658,1.43962.94833,2.89067,1.87379,4.34172,2.77644,2.97058-1.85098,5.89549-3.77045,8.71761-5.75846.10279-.07999.21702-.14854.33131-.22852.69693-.47985,1.3825-.98257,2.07944-1.48529,1.88515-1.35963,3.78182-2.79924,5.66697-4.28454.33138-.25133.66269-.51416.99401-.77692,9.68881-7.70073,18.77205-16.544,27.02117-26.27849.17141-.20565.34275-.4113.51416-.61695,3.48474-4.136,6.87813-8.51196,10.11148-13.03646-1.19966-1.8166-2.0908-2.93634-2.17079-3.03913.84547.46841,1.78236,1.26821,2.7535,2.22797.43417-.61702.86834-1.23397,1.29108-1.86235-3.91891-4.71871-8.12347-7.92925-8.12347-7.92925,3.06201-4.92436,5.35853-9.19746,7.08378-12.86505.99401-2.10231,1.78236-3.9989,2.43362-5.70128.65119-1.69101,1.15391-3.19911,1.53097-4.5245.05711-.20565.11423-.39986.17141-.59414,1.26821-4.67296,1.00544-6.83239,1.00544-6.83239ZM200.13177,256.98922c-.63989,4.36452-2.61647,7.81496-5.31285,10.21434-3.43907,3.03913-8.04348,4.37589-12.63652,3.70183-1.34819-.20565-2.6164-.57127-3.78182-1.08543-5.86125-2.5936-9.12891-8.96894-7.90638-17.21813,1.47386-9.89439,10.22571-23.22785,18.41779-22.01676,8.18058,1.22246,12.69364,16.50969,11.21978,26.40416ZM173.65899,216.87455c-3.82749,1.371-13.68765,8.90039-13.68765,8.90039-4.7987-5.17575-1.86235-18.54345-1.86235-18.54345,10.81985.8226,17.19526,9.03749,15.55,9.64307ZM231.10609,238.24005s-5.14144-7.9978-11.81393-12.44224c0,0,7.16377-4.73015,14.49888-5.62136h.01144c2.39931-.29707,4.83294-.17134,7.02667.67413,0,0-.9712,3.53042-2.84499,7.60931q0,.01144-.01137.01144c-1.61102,3.49618-3.90755,7.39229-6.8667,9.76873Z"}),r.createElement("path",{fill:"#db2331",d:"M202.7824,297.94937c-1.88515,1.48529-3.78182,2.92491-5.66697,4.28454-.69693.50272-1.3825,1.00544-2.07944,1.48529-.1143.07999-.22852.14854-.33131.22852-2.82212,1.98801-5.74703,3.90748-8.71761,5.75846-1.45105-.90265-2.9021-1.82811-4.34172-2.77644-.98257-.65119-1.9537-1.30245-2.92491-1.97658l11.8368-3.4505h.01137l12.21379-3.55329Z"})),r.createElement("path",{fill:"#fff",d:"M166.94999,265.71075c6.56723,2.70413-8.56607,7.2631-8.56607,7.2631,0,0-3.42679-4.63168-4.3702-8.72953-.94276-4.09976,6.37011-1.2387,12.93627,1.46643Z"}),r.createElement("path",{fill:"#fff",d:"M210.37511,268.03949c10.11663-13.52992,13.72851,4.78337,13.72851,4.78337h0c-6.41345-14.03367-13.72851-4.78337-13.72851-4.78337Z"}),r.createElement("path",{fill:"#fff",d:"M195.98558,292.74247c-7.90976,2.37426-17.49085,1.58152-28.5858-2.37928-.32138-.11475-.48892-.46832-.37418-.78975.11472-.32131.46826-.4888.78975-.37418,13.62636,4.8
1644,24.86049,4.8555,33.38948-.0269,10.89335-6.23558,14.01757-18.68412,14.71555-22.35079.06387-.33548.38779-.55523.72258-.49157.33526.06383.5554.38732.49157.72258-.45549,2.39273-1.63214,7.12956-4.39488,11.97119-2.79443,4.89737-6.46875,8.67268-10.92082,11.22116-1.82881,1.04684-3.77506,1.87973-5.83325,2.49753Z"}),r.createElement("ellipse",{fill:"#db2331",cx:"192.98862",cy:"260.92603",rx:"5.76233",ry:"3.35384",transform:"translate(-109.55102 378.38567) rotate(-74.73075)"}),r.createElement("ellipse",{fill:"#fff",cx:"165.31967",cy:"252.46559",rx:"5.76233",ry:"3.33677",transform:"translate(-121.77143 345.46113) rotate(-74.73075)"})),r.createElement("path",{fill:"#39b54a",d:"M292.20381,115.64001c-1.59998,12.62994-4.02997,27.20996-7.71997,42.63995H87.48384c-3.70001-15.44-6.13-30.01996-7.70001-42.63995h212.41998Z"}),r.createElement("g",null,r.createElement("path",{fill:"#fff",d:"M139.03387,143.00208h.09082l3.33887-20.17969h6.90332v28.42285h-4.69238v-20.38281h-.09082l-3.33887,20.38281h-4.69238l-3.60938-20.09863h-.09082v20.09863h-4.33106v-28.42285h6.90333l3.60938,20.17969Z"}),r.createElement("path",{fill:"#fff",d:"M157.93523,134.80091h6.81348v4.05957h-6.81348v8.32422h8.57324v4.06055h-13.53613v-28.42285
1h13.53613v4.06055h-8.57324v7.91797Z"}),r.createElement("path",{fill:"#fff",d:"M180.04168,143.00208h.09082l3.33887-20.17969h6.90332v28.42285h-4.69238v-20.38281h-.09082l-3.33887,20.38281h-4.69238l-3.60938-20.09863h-.09082v20.09863h-4.33105v-28.42285h6.90332l3.60938,20.17969Z"}),r.createElement("path",{fill:"#fff",d:"M208.82391,129.3595v1.01562c0,2.92285-.99316,4.75-3.20312,5.68457v.08105c2.66211.93359,3.69922,3.04492,3.69922,6.0498v2.31445c0,4.38477-2.57129,6.74023-7.53516,6.74023h-7.80566v-28.42285h7.49023c5.14355,0,7.35449,2.15234,7.35449,6.53711ZM198.94207,126.88294v7.51172h1.94043c1.85059,0,2.97852-.73145,2.97852-3.00488v-1.58301c0-2.03027-.76758-2.92383-2.52734-2.92383h-2.3916ZM198.94207,138.4552v8.72949h2.84277c1.66992,0,2.57227-.69043,2.57227-2.80176v-2.47656c0-2.63965-.94727-3.45117-3.2041-3.45117h-2.21094Z"}),r.createElement("path",{fill:"#fff",d:"M217.25848,134.80091h6.81348v4.05957h-6.81348v8.32422h8.57324v4.06055h-13.53613v-28.42285h13.53613v4.06055h-8.57324v7.91797Z"}),r.createElement("path",{fill:"#fff",d:"M239.27508,151.24524c-.27051-.73145-.45117-1.17773-.45117-3.49219v-4.4668c0-2.63867-.99316-3.61328-3.24902-3.61328h-1.71484v11.57227h-4.96289v-28.42285h7.49023c5.14355,0,7.35449,2.15234,7.35449,6.53711v2.2334c0,2.92383-1.03809,4.79102-3.24902,5.72461v.08203c2.48145.93359,3.29395,3.04492,3.29395,6.00879v4.38574c0,1.37988.04492,2.39551.54199,3.45117h-5.05371ZM233.86004,126.88294v8.72949h1.94043c1.85059,0,2.97852-.73047,2.97852-3.00488v-2.80078c0-2.03027-.76758-2.92383-2.52734-2.92383h-2.3916Z"})),r.createElement("g",null,r.createElement("g",null,r.createElement("path",{fill:"#39b54a",d:"M136.72654,334.77464c-40.22559-11.62305-63.86621-32.71875-76.61523-48.37012-13.82227-16.96875-18.18555-31.39258-18.22852-31.53711l.6582-.19336c.04199.14258,4.37695,14.45898,18.125,31.32617,12.68652,15.56445,36.21289,36.54688,76.25,48.11621l-.18945.6582Z"}),r.createElement("path",{fill:"#39b54a",d:"M42.07599,253.69574s-15.90906-3.90995-10.1737-23.40254c0,0,16.92922,8.09586,10.1737,23.40254Z"}),r.createElement("g",null,r.createElement("path",{fill:"#39b54a",d:"M45.98457,266.38438s-12.71197,10.33401-24.8041-5.99498c0,0,16.66645-8.62385,24.8041,5.99498Z"}),r.createElement("path",{fill:"#39b54a",d:"M48.07663,265.40382s16.16876-2.63762,11.99529-22.52323c0,0-17.51726,6.72958-11.99529,22.52323Z"})),r.createElement("g",null,r.createElement("path",{fill:"#39b54a",d:"M54.94277,280.89439s-12.20824,10.92451-25.06021-4.81342c0,0,16.23928-9.40357,25.06021,4.81342Z"}),r.createElement("path",{fill:"#39b54a",d:"M56.98603,279.81584s16.02569-3.40048,10.91503-23.0661c0,0-17.17885,7.55172-10.91503,23.0661Z"})),r.createElement("g",null,r.createElement("path",{fill:"#39b54a",d:"M66.51823,295.08712s-10.9672,12.1699-25.43172-2.1001c0,0,15.13802-11.08972,25.43172,2.1001Z"}),r.createElement("path",{fill:"#39b54a",d:"M68.43415,293.79582s15.56898-5.0983,8.38027-24.10299c0,0-16.27064,9.34922-8.38027,24.10299Z"})),r.createElement("g",null,r.createElement("path",{fill:"#39b54a",d:"M81.12232,308.22639s-9.16656,13.57793-25.47648,1.4601c0,0,13.44713-13.08878,25.47648-1.4601Z"}),r.createElement("path",{fill:"#39b54a",d:"M82.83985,306.68098s14.70782-7.21567,4.94389-25.03479c0,0-14.81097,11.52287-4.94389,25.03479Z"})),r.createElement("g",null,r.createElement("path",{fill:"#39b54a",d:"M98.2285,319.91618s-7.46486,16.80882-27.8732,6.61849c0,0,12.29241-17.10903,27.8732-6.61849Z"}),r.createElement("path",{fill:"#39b54a",d:"M99.82337,317.87061s14.83961-10.86493.54682-28.64298c0,0-14.10752,15.64608-.54682,28.64298Z"})),r.createElement("g",null,r.createElement("path",{fill:"#39b54a",d:"M118.59632,329.82596s-3.21849,18.10806-25.47439,13.10629c0,0,7.83337-19.5566,25.47439-13.10629Z"}),r.createElement("path",{fill:"#39b54a",d:"M119.65441,327.45774s11.80292-14.10503-6.33435-27.93914c0,0-9.94621,18.57135,6.33435,27.93914Z"}))),r.createElement("g",null,r.createElement("path",{fill:"#39b54a",d:"M236.22348,334.77464c40.22559-11.62305,63.86621-32.71875,76.61523-48.37012,13.82227-16.96875,18.18555-31.39258,18.22852-31.53711l-.6582-.19336c-.04199.14258-4.37695,14.45898-18.125,31.32617-12.68652,15.56445-36.21289,36.54688-76.25,48.11621l.18945.6582Z"}),r.createElement("path",{fill:"#39b54a",d:"M330.87403,253.69574s15.90906-3.90995,10.1737-23.40254c0,0-16.92922,8.09586-10.1737,23.40254Z"}),r.createElement("g",null,r.createElement("path",{fill:"#39b54a",d:"M326.96544,266.38438s12.71197,10.33401,24.8041-5.99498c0,0-16.66645-8.62385-24.8041,5.99498Z"}),r.createElement("path",{fill:"#39b54a",d:"M324.87339,265.40382s-16.16876-2.63762-11.99529-22.52323c0,0,17.51726,6.72958,11.99529,22.52323Z"})),r.createElement("g",null,r.createElement("path",{fill:"#39b54a",d:"M318.00724,280.89439s12.20824,10.92451,25.06021-4.81342c0,0-16.23928-9.40357-25.06021,4.81342Z"}),r.createElement("path",{fill:"#39b54a",d:"M315.96398,279.81584s-16.02569-3.40048-10.91503-23.0661c0,
10,17.17885,7.55172,10.91503,23.0661Z"})),r.createElement("g",null,r.createElement("path",{fill:"#39b54a",d:"M306.43178,295.08712s10.9672,12.1699,25.43172-2.1001c0,0-15.13802-11.08972-25.43172,2.1001Z"}),r.createElement("path",{fill:"#39b54a",d:"M304.51587,293.79582s-15.56898-5.0983-8.38027-24.10299c0,0,16.27064,9.34922,8.38027,24.10299Z"})),r.createElement("g",null,r.createElement("path",{fill:"#39b54a",d:"M291.82769,308.22639s9.16656,13.57793,25.47648,1.4601c0,0-13.44713-13.08878-25.47648-1.4601Z"}),r.createElement("path",{fill:"#39b54a",d:"M290.11016,306.68098s-14.70782-7.21567-4.94389-25.03479c0,0,14.81097,11.52287,4.94389,25.03479Z"})),r.createElement("g",null,r.createElement("path",{fill:"#39b54a",d:"M274.72151,319.91618s7.46486,16.80882,27.8732,6.61849c0,0-12.29241-17.10903-27.8732-6.61849Z"}),r.createElement("path",{fill:"#39b54a",d:"M273.12664,317.87061s-14.83961-10.86493-.54682-28.64298c0,0,14.10752,15.64608.54682,28.64298Z"})),r.createElement("g",null,r.createElement("path",{fill:"#39b54a",d:"M254.35369,329.82596s3.21849,18.10806,25.47439,13.10629c0,0-7.83337-19.5566-25.47439-13.10629Z"}),r.createElement("path",{fill:"#39b54a",d:"M253.2956,327.45774s-11.80292-14.10503,6.33435-27.93914c0,0,9.94621,18.57135-6.33435,27.93914Z"})))))}var A=a("./js/common/LaddaButton.js"),I=a("./js/components/Confetti.js"),L=a("./js/selectors/index.js");function C(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,l)}return a}const P=new(p());function U(e){return{supporter:"Become a Supporter →",member:"Become a Member →",smashing:"Become Smashing →"}[e]}class T extends r.Component{constructor(e){super(e),this.state={savingPlan:!1,saved:!1,executing:!1},this.handleSubmit=async e=>{const{subscribe:t,plan:a,type:l,planId:r}=this.props;this.setState({executing:!0});t(function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?C(Object(a),!0).forEach((function(t){(0,n.Z)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):C(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({recaptcha:await this.captcha.current.executeAsync(),plan:a,type:l,planId:r},m()(e,["cc","isDogPerson"]))),this.setState({executing:!1})},this.resetCaptcha=()=>{this.captcha.current&&this.captcha.current.reset()},this.renderSuccessText=()=>{const{isDowngraded:e,isUpdated:t,isUpgraded:a}=this.props;return e?r.createElement("p",null,r.createElement("em",null,"Alrighty!")," The ",r.createElement("strong",null,"new plan is active")," now! Let's start the new journey, together — and thanks for being smashing, now and ",r.createElement("em",null,"ever"),"."):a?r.createElement("p",null,r.createElement("strong",null,"Yaaay!")," We've searched ",r.createElement("em",null,"everywhere"),", but found only these flowers on such a short notice. The
1se are for you."," ",r.createElement("strong",null,"Thanks for being smashing.")):t?r.createElement("p",null,r.createElement("em",null,"Alrighty!")," The ",r.createElement("strong",null,"new plan is active")," now! Let's start the new journey, together — and thanks for being smashing — now and ",r.createElement("em",null,"ever"),"!"):r.createElement("p",null,r.createElement("strong",null,"Wow, you really are on fire today!"),r.createElement("br",null),"Thank you so much for joining our family — we'll make it worth your stay. You' re one of us now. ",r.createElement("strong",null,"Welcome."))},this.getImageURL=()=>{const{isDowngraded:e,isUpdated:t,isUpgraded:a}=this.props,l="/images/smashing-cat/";return e?`${l}cat-rollercoaster.svg`:a?`${l}cat-with-the-flower.svg`:t?`${l}cat-pouring-water.svg`:`${l}cat-explorer.svg`},this.captcha=r.createRef()}componentDidMount(){const{getUser:e}=this.props;e(),(0,f.Z)()}componentDidUpdate(){const{error:e}=this.props;if(e){this.resetCaptcha();const e=document.querySelector(".membership-checkout-summary__explanation");e&&P.animateScroll(e)}}static getDerivedStateFromProps(e,t){const{error:a,updating:l,loading:n,element:r}=e,{savingPlan:s}=t,c=!a&&s&&!l;if(c){const e=document.querySelector('[data-component="MemberSubscriptionCheckout"]');e&&P.animateScroll(e)}if(!n){const e=r.querySelector("#loader");e&&e.remove()}return{savingPlan:l,saved:c}}render(){const{error:e,plan:t,type:a,isUpdate:n,user:s,loading:i,firstname:o,lastname:u,country:p,updating:f,isDowngraded:E,isTypeUpdate:b,isSubscribed:y,subscription:v}=this.props,{saved:_,executing:L}=this.state;if(i)return null;let C={isDogPerson:!1,ccname:s?`${o} ${u}`:"",firstname:o,lastname:u,country:p,cc:null};return s&&(C=m()(C,["firstname","lastname","country"])),r.createElement("div",null,_&&!e?r.createElement(I.Z,null):null,r.createElement(c.J9,{validateOnChange:!1,validationSchema:(0,Z.w)({firstname:!s,lastname:!s,country:!s,email:!s,password:!s,isDogPerson:!s,ccname:!0,cc:!0}),initialValues:C,onSubmit:this.handleSubmit,render:i=>{const{values:{isDogPerson:m},errors:h,touched:u,handleSubmit:p}=i;return r.createElement("section",{className:"block bg--red"},r.createElement("div",{className:"container"},r.createElement("div",{className:"auth-modal-wrapper auth-modal-wrapper--membership-checkout",id:"auth-modal-wrapper"},r.createElement("div",{className:"auth-modal auth-modal--white",id:"meow"},!_&&r.createElement("div",{className:"membership-checkout-summary"},r.createElement("div",{className:"membership-checkout-plan"},r.createElement("h2",{className:"membership-checkout-summary__heading"},n?"Update Your Credit Card":"Great choice, Tiger!"),r.createElement("div",{className:"membership-checkout-summary__callout"},n?r.createElement("div",{className:"membership-checkout-summary__explanation"},r.createElement("p",null,"You need to update your credit card? For sure! Please enter the new one and you’re set! You"," ",r.createElement("em",null,"really")," know how to make a cat happy, don’t you?")):r.createElement("div",{className:"membership-checkout-summary__explanation"},r.createElement("p",null,"You're going for the"," ",r.createElement("strong",null,function(e,t){return d()(t,"description")||{supporter:"Smashing Supporter",member:"Smashing Member",smashing:"Smashing"}[e]}(t,v))," ","membership for"," ",r.createElement("strong",{className:"small-caps"},function(e,t,a){return d()(a,"price")?`$${d()(a,"price")}`:{supporter:"yearly"===t?"$30":"$3",member:"yearly"===t?"$50":"$5",smashing:"yearly"===t?"$99":"$9"}[e]}(t,a,v))," ","per ","yearly"===a?"year":"month",". You ",r.createElement("em",null,"really")," know how to make a cat happy, don't you?")))),r.createElement("div",{className:"membership-checkout-summary__visual
1s"},r.createElement("div",{className:"pricing-image-svg-container"},function(e,t){return{supporter:r.createElement(x,{type:t}),member:r.createElement(M,{type:t}),smashing:r.createElement(k,{type:t})}[e]}(t,a)))),!_&&r.createElement(c.l0,{className:"auth__modal__form membership-checkout-form"},s&&!n&&r.createElement("p",{className:"auth-modal__desc auth-modal__desc--hint"},r.createElement("small",null,r.createElement("strong",null,"Why enter card again?")," Because we don't store it. ",r.createElement("em",null,"We protect your data."))),e&&r.createElement("p",{className:"error-server error-msg error-msg__standalone"},e),!s&&r.createElement("fieldset",null,r.createElement("legend",{className:"membership-checkout__hint membership-checkout__hint--personal"},"Oh, we can't read your mind just yet...",r.createElement("br",null),r.createElement("small",null,"We call people by their real names around here. It is a ",r.createElement("em",null,"family")," after all.")),r.createElement("div",{className:"form__row"},r.createElement(j.Z,{name:"firstname",label:"Your first name",className:"field--half"}),r.createElement(j.Z,{name:"lastname",label:"Your family name",className:"field--half"})),r.createElement("div",{className:"form__row"},r.createElement(N.Z,{name:"country",label:"Your country (for taxes & silly jokes ⛺)",items:g()}))),!s&&r.createElement("div",{className:"btn--lined btn--lined__membership"},r.createElement("a",{onClick:e=>!e.preventDefault()&&P.animateScroll(document.querySelector("#set-up-credentials")),href:"#set-up-credentials",className:"add-scrolling",tabIndex:"-1"},r.createElement("button",{type:"button",className:"btn btn--green btn--text-shadow btn--large"},r.createElement("span",{className:"sr-only"},"Scroll to")," Set up credentials ↓"))),!s&&r.createElement("fieldset",{id:"set-up-credentials"},r.createElement("legend",{className:"title--secure membership-checkout__hint"},"Set up your login & password",r.createElement("br",null),r.createElement("small",null,"No annoying requirements. Just pick a password you can easily remember. Yep, ",r.createElement("em",null,"that")," one works. We don't judge.")),r.createElement("div",{className:"form__row"},r.createElement(j.Z,{name:"email",label:"Email",type:"email",className:"field--half"}),r.createElement(j.Z,{name:"password",label:"Password",type:"password",className:"field--half"}))),!s&&r.createElement("div",{id:"the-cat-checkbox"},r.createElement(w.Z,{className:"section-hider",name:"isDogPerson",label:"I don't even like cats. I'm a dog person!"})),!s&&r.createElement("div",{className:"btn--lined btn--lined__membership"},r.createElement("a",{onClick:e=>!e.preventDefault()&&P.animateScroll(document.querySelector("#enter-credit-card")),href:"#enter-credit-card",className:"add-scrolling",tabIndex:"-1"},r.createElement("button",{type:"button",className:"btn btn--green btn--text-shadow btn--large"},r.createElement("span",{className:"sr-only"},"Scroll to")," ","Payment details ↓"))),r.createElement(S.Z,(0,l.Z)({title:`Enter your ${n?"new":""} credit card details`},i)),r.createElement("div",{className:"btn--lined"},r.createElement(A.Z,{className:"btn--secure btn--large",text:n||b?"Update settings →":U(t),processing:f||L}))),_&&!e&&r.createElement("div",null,r.createElement("div",{className:"membership-checkout-summary"},r.createElement("div",{className:"membership-checkout-plan"},r.createElement("h2",{className:"membership-checkout-summary__heading"},E||y?`High Five, ${o}!`:"Wow, you are smashing!"),r.createElement("div",{className:"membership-checkout-summary__callout"},r.createElement("div",{className:"membership-checkout-summary__explanation"},this.renderSuccessText()))),r.createElement("div",{className:"membership-checkout-summary__visual
1s"},r.createElement("div",{className:"membership-checkout-summary__thanks"},r.createElement("img",{src:m?"/images/smashing-cat/cat-with-dog-outfit.svg":this.getImageURL(),alt:"Welcome to the family!"})))),r.createElement("div",{className:"btn--lined"},r.createElement("a",{href:"/membership/",className:"btn btn--green btn--large"},"To your dashboard →")))))))}}),r.createElement(h.Z,{ref:this.captcha,sitekey:"6LemEuIZAAAAAD-wDy0y4Igbw4sGPAxKRgpRxkom",render:"onload",size:"invisible",render:"explicit",badge:"inline",onExpired:this.resetCaptcha(),onErrored:this.resetCaptcha()}))}}const O=(0,s.$j)((e=>{const{auth:t}=e,{user:a}=t,l=window.location.pathname.replace(/\/+$/,"").split("/"),n=d()(_.Z.MEMBERSHIP_STRIPE_SUNBSCRIPTION_PLANS,(0,y.re)("subscription")),r=d()(n,"type")||(l.includes("yearly")?"yearly":"monthly"),s=d()(n,"plan")||(l.includes("smashing")?"smashing":l.includes("supporter")?"supporter":l.includes("member")?"member":null);return{type:r,plan:s||d()(a,"plan")||"member",isUpdate:s===d()(a,"plan")&&r===d()(a,"app_metadata.subscription.type"),isTypeUpdate:s===d()(a,"plan")&&r!==d()(a,"app_metadata.subscription.type"),user:a,subscription:n,planId:d()(n,"planId"),isDowngraded:d()(a,"isDowngraded"),isUpgraded:d()(a,"isUpgraded"),isUpdated:d()(a,"isUpdated"),isSubscribed:d()(a,"isSubscribed"),firstname:(0,L.AX)(e),lastname:(0,L.RH)(e),country:(0,L.GG)(e),loading:t.loading,updating:t.savingPlan,error:(0,L.zh)(e,"auth")}}),(e=>({getUser:()=>e((0,b.PR)()),subscribe:t=>e((0,v.Ld)(t))})))(T)},
1"./js/utils/floatingLabels.js":(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});var l=a("./js/utils/index.js");const n=function(){const e=document.querySelectorAll(".js-form-field input");let t=!1;function a(){const e=document.getElementById("auth-modal-wrapper");e&&((0,l.As)(this,".auth-modal-wrapper")?(e.classList.add("hover"),t=!0):e.classList.remove("hover"))}function n(){const e=document.getElementById("auth-modal-wrapper");e&&((0,l.As)(this,".auth-modal-wrapper")&&(t=!1),t||e.classList.remove("hover"))}function r(){const e=(0,l.As)(this,".js-form-field");e.classList.add("float"),e.classList.add("focused")}function s(){const e=this.value.trim(),t=(0,l.As)(this,".js-form-field");e.length||(t.classList.remove("float"),t.classList.remove("focused"),t.classList.remove("blurred")),0!==e.length&&(t.classList.add("float"),t.classList.remove("focused"),t.classList.add("blurred"))}Array.from(document.querySelectorAll("input, a")).forEach((e=>(e.addEventListener("focus",a,!1),e.addEventListener("blur",n,!1),!0))),e&&Array.from(e).forEach((e=>{e.addEventListener("focus",r,!1),e.addEventListener("blur",s,!1),e.addEventListener("change",s,!1)}))}},
1"./js/utils/index.js":(e,t,a)=>{"use strict";a.d(t,{$E:()=>s,As:()=>c,t7:()=>m});var l=a("../node_modules/lodash/throttle.js"),n=a.n(l),r=a("./js/constants/index.js");function s(e){const t=document,a=t.querySelector('meta[name="viewport"]'),{content:l}=a,n=",maximum-scale=",r=/,*maximum-scale=\d*\.*\d*/;function s(e){a.content=l+("blur"===e.type?l.match(r,"")?"":n+10:n+1)}e.addEventListener&&t.querySelector&&(e.addEventListener("focus",s,!0),e.addEventListener("blur",s,!1))}function c(e,t){const a=t.charAt(0),l="classList"in document.documentElement;let n,r;for("["===a&&(n=(t=t.substr(1,t.length-2)).split("="),n.length>1&&(r=!0,n[1]=n[1].replace(/"/g,"").replace(/'/g,"")));e&&e!==document&&1===e.nodeType;e=e.parentNode){if("."===a)if(l){if(e.classList.contains(t.substr(1)))return e}else if(new RegExp(`(^|\\s)${t.substr(1)}(\\s|$)`).test(e.className))return e;if("#"===a&&e.id===t.substr(1))return e;if("["===a&&e.hasAttribute(n[0])){if(!r)return e;if(e.getAttribute(n[0])===n[1])return e}if(e.tagName.toLowerCase()===t)return e}return null}let i=!1;try{const e=Object.defineProperty({},"passive",{get(){i=!0}});window.addEventListener("test",null,e)}catch(e){}function m(){[].forEach.call(document.querySelectorAll("iframe[data-src]"),(e=>{e.src=e.getAttribute("data-src")}));const e=document.querySelectorAll("img[data-src], div[data-src]"),t=()=>{e.length&&[].forEach.call(e,(e=>{if(function(e,t){t=t||1;const a=e.getBoundingClientRect(),l=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth,r=a.top-t<=l&&a.top+a.height>=0,s=a.left-t<=n&&a.left+a.width>=0;return r&&s}(e,800)&&!e.getAttribute("data-loaded")){const t=e.getAttribute("data-src"),a=e.getAttribute("data-size"),l=e.getAttribute("data-alt")||e.getAttribute("alt"),n=document.createElement("img");n.src=t.replace(/(s=)[\d]+/,`$1${a||r.Z.GRAVATAR_THUMB_SMALL}`),n.alt=l,e.className&&(n.className=e.className),n.addEventListener("load",(()=>{e.parentNode&&e.parentNode.replaceChild(n,e)})),e.setAttribute("data-loaded","true")}}))};var a;e.length&&(t(),a=t,window.addEventListener("scroll",n()(a,100),!!i&&{passive:!0}))}}
1}]);
2//# sourceMappingURL=MemberSubscriptionCheckout.2259edf171b5e77ebeac.js.map

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