(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5895],{97513:function(e,t,a){"use strict";a.d(t,{_N:function(){return o},eY:function(){return s},mu:function(){return v},rm:function(){return c},zY:function(){return l}});var n=a(26150);a(91157);var h=a(6990),r=a(75056),v=function(e,t){if(e!==t){var a;null===(a=(0,n.getWindow)())||void 0===a||a.location.replace(r.CB+"/"+t+(0,n.getWindow)().location.pathname.replace(/^(\/([a-z]{2}-[A-Z]{2}|ar|es|pa|fil-PH|zh-Hans|zh-Hant))+/,"")+(0,n.getWindow)().location.search)}};function s(){var e,t=(null===(e=(0,n.getWindow)())||void 0===e?void 0:e.location.search)||"";return(0,n.isProd)()?"https://accounts.snapchat.com/plus/redeem"+t:(0,n.isProdMesh)()?"https://web-plus.mesh.sc-corp.net/plus/redeem"+t:"https://staging--web-plus.mesh.sc-corp.net/plus/redeem"+t}var c=function(){return new URL("/plus/plans","https://accounts.snapchat.com").toString()},l=function(){return new URL("/plus/redeem-options","https://accounts.snapchat.com").toString()},o=function(e){try{return decodeURIComponent(e).toLowerCase()}catch(t){return h.log.error("Error occurred while decoding URI ".concat(e),t),""}}},26069:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return eR},default:function(){return ek}});var n,h,r,v,s,c,l,o,i,p,d,u,m,A,M,z=a(95235),E=a(10626),g=a(11269),f=a(61733),C=a(85188),w=a(91157),H=a(25112),x=a(2784),b=a(83112),y=a(52005),P=a(71612),D=a(57611),j=a(97666),B=a(54887),V=a(31610),I=a(34401),R=a(42670),k=a(75056);(n=h||(h={})).WEB_GIFTCARD_REDEEM="WEB_GIFTCARD_REDEEM",n.WEB_PROD_CASHSTAR_URL="WEB_PROD_CASHSTAR_URL",n.WEB_PROD_CASHSTAR_USE_NEW_URL="WEB_GIFTCARD_REDEEM_NEW_CASHSTAR_URL_2";var G=a(48325);(r||(r={})).SNAPCHAT_PLUS_WEB_CROSS_PROMO="SNAPCHAT_PLUS_WEB_CROSS_PROMO";var Q=a(97513),L=a(67810),O=a.n(L),S=a(52322);function N(e){var t=e.pageType,a=e.webClientId,n=g.PageType[t],h=(0,Q.eY)(),v=(0,Q.zY)(),s=(0,x.useCallback)(function(){(0,g.reportWebAction)({pageType:t,actionName:g.WebActionName.ButtonClick,actionSource:g.WebActionSource.GoToGiftCardRedeemPage,webClientId:null!=a?a:"",destination:h})},[t,a,h]),c=(0,x.useCallback)(function(){(0,g.reportWebAction)({pageType:t,actionName:g.WebActionName.ButtonClick,actionSource:g.WebActionSource.GoToRedemptionOptionsPage,webClientId:null!=a?a:"",destination:v})},[t,a,v]);return(0,S.jsx)(C.webConfigContext.Experiment,{configId:r.SNAPCHAT_PLUS_WEB_CROSS_PROMO,webClientId:null!=a?a:"",pageTypeName:n,children:function(e){var t=e.treatmentValue===G.TreatmentValue.Treatment0,a=t?v:h;return(0,S.jsxs)("div",{className:O().codeRedemptionLink,children:[(0,S.jsx)("span",{className:O().codeRedemptionText,children:(0,S.jsx)(R.Z,{id:"qCaUyR",defaultMessage:[{type:0,value:"Have a code?"}]})}),(0,S.jsx)("a",{href:a,onClick:t?c:s,className:O().codeRedemptionHighlightedText,children:(0,S.jsx)(R.Z,{id:"pBnBsN",defaultMessage:[{type:0,value:"Redeem"}]})})]})}})}function Z(){return(Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t>>3){case 1:if(10!==e)break;h.allowedCountries.push(a.string());continue}if((7&e)==4||0===e)break;a.skipType(7&e)}return h},create:e=>ed.fromPartial(e??{}),fromPartial(e){let t=ep();return t.allowedCountries=e.allowedCountries?.map(e=>e)||[],t}};var eu=a(26150);function em(){var e,t=(0,x.useContext)(G.configContext).hasFetchedConfigs,a=C.webConfigContext.useConfigId("PLUS_1P_BILLING_ALLOWED_COUNTRIES"),n=null==a||null===(e=a.value)||void 0===e||null===(e=e.anyValue)||void 0===e?void 0:e.value,h=(0,x.useContext)(C.PageContext),r=h.isGdprCountry,v=h.country,s=(0,x.useMemo)(function(){if(!t)return!1;if(n){var e=ed.decode(new Uint8Array(n)).allowedCountries.map(function(e){return e.toLowerCase()});return(0,eu.isSecproxyDomain)()&&e.push("us"),e.includes(v.toLowerCase())}return r},[t,n,r,v]);return(0,D.incrementCounter)("".concat(B.m,".SnapchatPlus.IsWebBillingSupported.").concat(s.toString())),s}var eA=a(91193),eM=a.n(eA);function ez(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,n)}return a}function eE(e){for(var t=1;t0?(0,S.jsx)("div",{className:eC().bottomTray,children:s}):null]})}function eb(e){var t=e.webPageViewTraceId,a=(0,H.useGetWebClientId)(),n=g.PageType.SNAPCHAT_PLUS_LANDING_PAGE,h=(0,x.useContext)(C.PageContext),r=h.country,v=h.isMobile;(0,H.useEssentialSession)(),(0,x.useEffect)(function(){(0,D.incrementCountsByPageAndCountry)(B.m,"SnapchatPlusLandingPage",1,r)},[r]);var s=(0,j.usePageLoadMetrics)(g.PageType[n],B.m);return((0,P.useWebSession)(n,s,a),v)?(0,S.jsx)(ex,{webClientId:a,pageType:n}):(0,S.jsx)(eg,{pageType:n,webClientId:a,webPageViewTraceId:t})}var ey=a(60889),eP=a(28183),eD=a(96108),ej=a.n(eD);function eB(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,n)}return a}function eV(e){for(var t=1;t