PageSourceSearch

https://www.velocityfrequentflyer.com/etc.clientlibs/my-velocity/c…yPointsCallToAction.62f6beeccdfe9b9c96b1.js

js velocityfrequentflyer.com collected 2026-09-24 10:07:58 UTC 9,044 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkvff_my_velocity=self.webpackChunkvff_my_velocity||[]).push([[6095],{90078(e,n,t){t.d(n,{A:()=>B});var o=t(74848),i=t(96540),a=t(4452),l=t.n(a),s=t(15504),c=t(17911),r=t(40276),u=t(32002),y=t(96758),d=t(69147),m=t(26707),C=t(49184),A=t(38092),T=t(3848),P=t(31242),p=t(77353);const v="src-components-BuyPointsCallToAction-BuyPointsCallToAction_alignButtonCenter",g="src-components-BuyPointsCallToAction-BuyPointsCallToAction_buyPointsMessageCenter",b={title:"Uh oh. Something went wrong...",description:"<p>Please wait a moment and try again.</p>"},B=({authenticatedCtaContainer:e={ctaType:"secondary",ctaLabel:"Buy Points",ctaOpenInNewTab:!1,ctaAsLink:!1,ctaUrl:"https://storefront.points.com/velocity-frequent-flyer/sso/mv-delegate/buy"},unauthenticatedCtaContainer:n={ctaType:"secondary",ctaLabel:"Login to buy points",ctaOpenInNewTab:!1,ctaAsLink:!1},errorMessages:t={defaultErrorMessage:b},containerClass:a,className:B,centreAligned:f=!1,ineligibleMemberMessage:h,ineligibleMemberCta:w,parameters:M})=>{var N,_;const x=(0,c.A)(e=>e.user),L=(0,T.S_)(x),k=(0,T.R$)(x),V=(0,T.LU)(x),j=!!(0,T.XL)(x),E=L?e:n,I=(0,i.useRef)(null),[$,U]=(0,i.useState)(!1),[S,D]=(0,i.useState)(!1),Q=L&&$;return(0,o.jsxs)(o.Fragment,{children:[L&&!j&&(0,o.jsx)(p.A,{className:l()({[g]:f}),ineligibleMemberMessage:h,ineligibleMemberCta:w}),(!L||j)&&(0,o.jsxs)("div",{className:l()("src-components-BuyPointsCallToAction-BuyPointsCallToAction_buyPointsCallToActionContainer",{[v]:f},a),children:[(0,o.jsxs)("button",{onClick:t=>{t.preventDefault(),(0,u.A)({eventComponentName:"buy-points",eventElementInteraction:"cta-interaction",eventElementIdentifier:null==E?void 0:E.ctaLabel,eventElementLocation:"buy-points",eventElementDestination:(null==e?void 0:e.ctaUrl)||"",vaMetaDataVersion:"2"}),L?(async()=>{var n,t;U(!0);const o=(0,A.bP)(M),i=s.A.parse(window.location.search,{ignoreQueryPrefix:!0}),a=(0,A.xv)(i);try{const l=await y.A.vffPointsBoosterApi.post("/loyalty/v2/pointsbooster/mvdelegate",{accountCreationDate:V,...M||{},...a}),c=null==(n=null==l?void 0:l.data)?void 0:n.links;if(c){const n=(null==(t=c.self)?void 0:t.href)||"",a=`${(null==e?void 0:e.ctaUrl)||""}${s.A.stringify({token:n,...o||{},...i},{addQueryPrefix:!0})}`;window.open(a,null!=e&&e.ctaOpenInNewTab?"_blank":"_self")}}catch{D(!0)}finally{U(!1)}})():(()=>{var e;const t=(null==n?void 0:n.ctaUrl)||`${window.location.origin}${window.location.pathname}`,o=s.A.parse(window.location.search,{ignoreQueryPrefix:!0});(0,r.T)("pointStoreQueryParam",s.A.stringify(o),null,!1,!1,300),(0,u.A)({eventCategory:"login",eventName:"login",navigationElementName:null==E?void 0:E.ctaLabel});const i=(0,m.aX)(t);null==(e=d.Ay)||e.login({url:i,authFlowName:"passwordProtectedPage"})})()},title:(null==E?void 0:E.ctaTitle)||(null==E?void 0:E.ctaLabel),className:l()("src-components-BuyPointsCallToAction-BuyPointsCallToAction_buyPointsCallToAction","src-components-BuyPointsCallToAction-BuyPointsCallToAction_buttonType--secondary",B),disabled:Q,ref:I,children:[(k||Q)&&(0,o.jsx)(C.A,{containerClassName:"src-components-BuyPointsCallToAction-BuyPointsCallToAction_loaderContainer",className:"src-components-BuyPointsCallToAction-BuyPointsCallToAction_loader"}),null==E?void 0:E.ctaLabel]}),S&&(0,o.jsx)(P.A,{message:`<h2>${(null==(N=null==t?void 0:t.defaultErrorMessage)?void 0:N.title)||(null==b?void 0:b.title)}</h2> ${(null==(_=null==t?void 0:t.defaultErrorMessage)?void 0:_.description)||(null==b?void 0:b.description)}`,onClick:()=>{D(!1)},snackbarType:"error",autoClose:!0,duration:5e3,targetRef:I,maxWidth:400})]})]})}},47020(e,n,t){t.d(n,{A:()=>h});var o=t(74848),i=t(96540),a=t(4452),l=t.n(a),s=t(15504),c=t(17911),r=t(40276),u=t(32002),y=t(96758),d=t(69147),m=t(26707),C=t(6961),A=t(71735),T=t(49184),P=t(85486),p=t(38092),v=t(3848),g=t(77353);const b="src-components-BuyPointsCallToAction-BuyPointsCallToActionV2-BuyPointsCallToActionV2_alignButtonCenter",B="src-components-BuyPointsCallToAction-BuyPointsCallToActionV2-BuyPointsCallToActionV2_buyPointsMessageCenter",f={title:"Uh oh. Something went wrong...",description:"<p>Please wait a moment and try again.</p>"},h=({authenticatedCtaContainer:e={ctaType:"secondary",ctaLabel:"Buy Points",ctaOpenInNewTab:!1,ctaAsLink:!1,ctaUrl:"https://storefront.points.com/velocity-frequent-flyer/sso/mv-delegate/buy"},unauthenticatedCtaContainer:n={ctaType:"secondary",ctaLabel:"Login to buy points",ctaOpenInNewTab:!1,ctaAsLink:!1},errorMessages:t={defaultErrorMessage:f},containerClass:a,className:h,centreAligned:w=!1,ineligibleMemberMessage:M,ineligibleMemberCta:N,parameters:_,buttonType:x="primary"})=>
1{var L,k;const V=(0,c.A)(e=>e.user),j=(0,v.S_)(V),E=(0,v.R$)(V),I=(0,v.LU)(V),$=!!(0,v.XL)(V),U=j?e:n;let S;const[D,Q]=(0,i.useState)(!1),[O,R]=(0,i.useState)(!1);(0,i.useEffect)(()=>(O&&(S=setTimeout(()=>{R(!1)},5e3)),()=>{S&&clearTimeout(S)}),[O]);const F=j&&D;return(0,o.jsxs)(o.Fragment,{children:[j&&!$&&(0,o.jsx)(g.A,{className:l()({[B]:w}),ineligibleMemberMessage:M,ineligibleMemberCta:N}),(!j||$)&&(0,o.jsxs)("div",{className:l()("src-components-BuyPointsCallToAction-BuyPointsCallToActionV2-BuyPointsCallToActionV2_buyPointsCallToActionContainer",{[b]:w},a),children:[(0,o.jsxs)(C.A,{onClick:t=>{t.preventDefault(),(0,u.A)({eventComponentName:"buy-points",eventElementInteraction:"cta-interaction",eventElementIdentifier:null==U?void 0:U.ctaLabel,eventElementLocation:"buy-points",eventElementDestination:(null==e?void 0:e.ctaUrl)||"",vaMetaDataVersion:"2"}),j?(async()=>{var n,t;Q(!0),R(!1);const o=(0,p.bP)(_),i=s.A.parse(window.location.search,{ignoreQueryPrefix:!0}),a=(0,p.xv)(i);try{const l=await y.A.vffPointsBoosterApi.post("/loyalty/v2/pointsbooster/mvdelegate",{accountCreationDate:I,..._||{},...a}),c=null==(n=null==l?void 0:l.data)?void 0:n.links;if(c){const n=(null==(t=c.self)?void 0:t.href)||"",a=`${(null==e?void 0:e.ctaUrl)||""}${s.A.stringify({token:n,...o||{},...i},{addQueryPrefix:!0})}`;window.open(a,null!=e&&e.ctaOpenInNewTab?"_blank":"_self")}Q(!1)}catch{R(!0),Q(!1)}})():(()=>{var e;const t=(null==n?void 0:n.ctaUrl)||`${window.location.origin}${window.location.pathname}`,o=s.A.parse(window.location.search,{ignoreQueryPrefix:!0});(0,r.T)("pointStoreQueryParam",s.A.stringify(o),null,!1,!1,300),(0,u.A)({eventCategory:"login",eventName:"login",navigationElementName:null==U?void 0:U.ctaLabel});const i=(0,m.aX)(t);null==(e=d.Ay)||e.login({url:i,authFlowName:"passwordProtectedPage"})})()},title:(null==U?void 0:U.ctaTitle)||(null==U?void 0:U.ctaLabel),buttonType:x,className:l()("src-components-BuyPointsCallToAction-BuyPointsCallToActionV2-BuyPointsCallToActionV2_buyPointsCallToAction",h),disabled:F,children:[(E||F)&&(0,o.jsx)(T.A,{containerClassName:"src-components-BuyPointsCallToAction-BuyPointsCallToActionV2-BuyPointsCallToActionV2_loaderContainer",className:"src-components-BuyPointsCallToAction-BuyPointsCallToActionV2-BuyPointsCallToActionV2_loader"}),null==U?void 0:U.ctaLabel]}),O&&(0,o.jsxs)("div",{className:"src-components-BuyPointsCallToAction-BuyPointsCallToActionV2-BuyPointsCallToActionV2_errorInfoContainer",children:[(0,o.jsx)(P.A,{className:"src-components-BuyPointsCallToAction-BuyPointsCallToActionV2-BuyPointsCallToActionV2_errorInfo",content:`<h2>${null==(L=null==t?void 0:t.defaultErrorMessage)?void 0:L.title}</h2> ${null==(k=null==t?void 0:t.defaultErrorMessage)?void 0:k.description}`}),(0,o.jsx)("button",{className:"src-components-BuyPointsCallToAction-BuyPointsCallToActionV2-BuyPointsCallToActionV2_errorCloseButton",onClick:()=>{clearTimeout(S),R(!1)},children:(0,o.jsx)(A.A,{className:"src-components-BuyPointsCallToAction-BuyPointsCallToActionV2-BuyPointsCallToActionV2_errorCloseIcon",name:"cross",size:"smallest"})})]})]})]})}},77353(e,n,t){t.d(n,{A:()=>u});var o=t(74848),i=t(4452),a=t.n(i),l=t(40724),s=t(71735),c=t(85486),r=t(38092);const u=({className:e,ineligibleMemberMessage:n,ineligibleMemberCta:t})=>(0,o.jsxs)("div",{className:a()("src-components-BuyPointsCallToAction-BuyPointsMessageTile-BuyPointsMessageTile_buyPointsMessageTileContainer",e),children:[(0,o.jsxs)("div",{className:"src-components-BuyPointsCallToAction-BuyPointsMessageTile-BuyPointsMessageTile_messageSection",children:[(0,o.jsx)(s.A,{className:"src-components-BuyPointsCallToAction-BuyPointsMessageTile-BuyPointsMessageTile_messageIcon",name:"infoCircleClosed",size:"smallest"}),n&&(0,o.jsx)(c.A,{className:"src-components-BuyPointsCallToAction-BuyPointsMessageTile-BuyPointsMessageTile_buyPointsMessage",content:n})]}),(0,r.C)(t)&&(0,o.jsx)("div",{className:"src-components-BuyPointsCallToAction-BuyPointsMessageTile-BuyPointsMessageTile_btnSection",children:(0,o.jsx)(l.A,{buttonType:"purple-link",iconName:"arrowRight",linkClassName:"src-components-BuyPointsCallToAction-BuyPointsMessageTile-BuyPointsMessageTile_startEarningCta",target:null!=t&&t.ctaOpenInNewTab?"_blank":"_self",href:null==t?void 0:t.ctaUrl,title:null==t?void 0:t.ctaTitle,ctaAsLink:!0,children:null==t?void 0:t.ctaLabel})})]})},40652(e,n,t){t.r(n),t.d(n,{default:()=>o.A});var o=t(90078)}}]);

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.