PluginProbe ʕ •ᴥ•ʔ
GiveWP – Donation Plugin and Fundraising Platform / 4.16.5.1
GiveWP – Donation Plugin and Fundraising Platform v4.16.5.1
4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 2.32.0 2.33.0 2.33.1 2.33.2 2.33.3 2.33.4 2.33.5 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.2 2.6.3 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.10.0 3.11.0 3.12.0 3.12.1 3.12.2 3.12.3 3.13.0 3.14.0 3.14.1 3.14.2 3.15.0 3.15.1 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.17.0 3.17.1 3.17.2 3.18.0 3.19.0 3.19.1 3.19.2 3.19.3 3.19.4 3.2.0 3.2.1 3.2.2 3.20.0 3.21.0 3.21.1 3.22.0 3.22.1 3.22.2 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.6.0 3.6.1 3.6.2 3.7.0 3.8.0 3.9.0 4.0.0 4.1.0 4.1.1 4.10.0 4.10.1 4.11.0 4.12.0 4.13.0 4.13.1 4.13.2 4.14.0 4.14.1 4.14.2 4.14.3 4.14.4 4.14.5 4.14.6 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.1 4.7.0 4.7.1 4.8.0 4.8.1 4.9.0 trunk 1.9.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.2 2.11.3 2.12.0 2.12.1 2.12.2 2.12.3 2.13.0 2.13.1 2.13.2 2.13.3 2.13.4 2.14.0 2.15.0 2.16.0 2.16.1 2.17.0 2.17.1 2.17.3 2.18.0 2.18.1 2.19.1 2.19.2 2.19.3 2.19.4 2.19.5 2.19.6 2.19.7 2.19.8 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.20.0 2.20.1 2.20.2 2.21.0 2.21.1 2.21.2 2.21.3 2.21.4 2.22.0 2.22.1 2.22.2 2.22.3 2.23.0 2.23.1 2.23.2 2.24.0 2.24.1 2.24.2 2.25.0 2.25.1 2.25.2 2.25.3 2.26.0 2.27.0 2.27.1 2.27.2 2.27.3 2.28.0 2.29.0 2.29.1 2.29.2
give / build / stripePaymentElementGateway.js
give / build Last commit date
Campaigns 2 months ago DonationForms 8 months ago EventTickets 2 years ago assets 1 month ago fonts 1 year ago images 1 year ago adminBlocks-rtl.css 6 months ago adminBlocks.asset.php 6 months ago adminBlocks.css 6 months ago adminBlocks.js 8 months ago angieMcp.asset.php 9 months ago angieMcp.js 9 months ago baseFormDesignCss-rtl.css 1 month ago baseFormDesignCss.asset.php 1 month ago baseFormDesignCss.css 1 month ago baseFormDesignCss.js 2 years ago bfcm2025-rtl.css 10 months ago bfcm2025.asset.php 10 months ago bfcm2025.css 10 months ago bfcm2025.js 10 months ago campaignBlock-rtl.css 1 year ago campaignBlock.asset.php 8 months ago campaignBlock.css 1 year ago campaignBlock.js 8 months ago campaignBlockApp-rtl.css 1 year ago campaignBlockApp.asset.php 11 months ago campaignBlockApp.css 1 year ago campaignBlockApp.js 11 months ago campaignBlocks-rtl.css 6 months ago campaignBlocks.asset.php 6 months ago campaignBlocks.css 6 months ago campaignBlocks.js 8 months ago campaignBlocksLandingPage-rtl.css 1 year ago campaignBlocksLandingPage.asset.php 8 months ago campaignBlocksLandingPage.css 1 year ago campaignBlocksLandingPage.js 8 months ago campaignCommentsBlockApp-rtl.css 1 year ago campaignCommentsBlockApp.asset.php 8 months ago campaignCommentsBlockApp.css 1 year ago campaignCommentsBlockApp.js 8 months ago campaignCoverBlock-rtl.css 1 year ago campaignCoverBlock.asset.php 8 months ago campaignCoverBlock.css 1 year ago campaignCoverBlock.js 8 months ago campaignDetails-rtl.css 9 months ago campaignDetails.asset.php 6 months ago campaignDetails.css 9 months ago campaignDetails.js 6 months ago campaignDonateButtonBlock-rtl.css 1 year ago campaignDonateButtonBlock.asset.php 8 months ago campaignDonateButtonBlock.css 1 year ago campaignDonateButtonBlock.js 8 months ago campaignDonateButtonBlockApp-rtl.css 1 year ago campaignDonateButtonBlockApp.asset.php 1 year ago campaignDonateButtonBlockApp.css 1 year ago campaignDonateButtonBlockApp.js 1 year ago campaignDonationsBlockApp-rtl.css 11 months ago campaignDonationsBlockApp.asset.php 11 months ago campaignDonationsBlockApp.css 11 months ago campaignDonationsBlockApp.js 1 year ago campaignDonorsBlockApp-rtl.css 11 months ago campaignDonorsBlockApp.asset.php 11 months ago campaignDonorsBlockApp.css 11 months ago campaignDonorsBlockApp.js 1 year ago campaignFormBlock-rtl.css 6 months ago campaignFormBlock.asset.php 6 months ago campaignFormBlock.css 6 months ago campaignFormBlock.js 8 months ago campaignFormBlockApp-rtl.css 1 year ago campaignFormBlockApp.asset.php 1 year ago campaignFormBlockApp.css 1 year ago campaignFormBlockApp.js 1 year ago campaignGoalBlock-rtl.css 1 year ago campaignGoalBlock.asset.php 8 months ago campaignGoalBlock.css 1 year ago campaignGoalBlock.js 8 months ago campaignGoalBlockApp-rtl.css 1 year ago campaignGoalBlockApp.asset.php 11 months ago campaignGoalBlockApp.css 1 year ago campaignGoalBlockApp.js 11 months ago campaignGridApp-rtl.css 10 months ago campaignGridApp.asset.php 9 months ago campaignGridApp.css 10 months ago campaignGridApp.js 9 months ago campaignGridBlock-rtl.css 10 months ago campaignGridBlock.asset.php 9 months ago campaignGridBlock.css 10 months ago campaignGridBlock.js 9 months ago campaignListTable-rtl.css 9 months ago campaignListTable.asset.php 9 months ago campaignListTable.css 9 months ago campaignListTable.js 9 months ago campaignPagePostTypeEditor.asset.php 1 year ago campaignPagePostTypeEditor.js 1 year ago campaignStatsBlockApp-rtl.css 1 year ago campaignStatsBlockApp.asset.php 1 year ago campaignStatsBlockApp.css 1 year ago campaignStatsBlockApp.js 1 year ago campaignTitleBlock.asset.php 1 year ago campaignTitleBlock.js 1 year ago campaignWelcomeBannerCss-rtl.css 1 year ago campaignWelcomeBannerCss.asset.php 1 year ago campaignWelcomeBannerCss.css 1 year ago campaignWelcomeBannerCss.js 1 year ago classicFormDesignCss-rtl.css 1 year ago classicFormDesignCss.asset.php 1 year ago classicFormDesignCss.css 1 year ago classicFormDesignCss.js 2 years ago classicFormDesignJs.asset.php 1 year ago classicFormDesignJs.js 1 year ago donationConfirmationReceiptApp.asset.php 1 year ago donationConfirmationReceiptApp.js 1 year ago donationDetails-rtl.css 7 months ago donationDetails.asset.php 7 months ago donationDetails.css 7 months ago donationDetails.js 7 months ago donationFormApp-rtl.css 1 year ago donationFormApp.asset.php 6 months ago donationFormApp.css 1 year ago donationFormApp.js 6 months ago donationFormBlock-rtl.css 6 months ago donationFormBlock.asset.php 6 months ago donationFormBlock.css 6 months ago donationFormBlock.js 8 months ago donationFormBlockApp-rtl.css 6 months ago donationFormBlockApp.asset.php 6 months ago donationFormBlockApp.css 6 months ago donationFormBlockApp.js 1 year ago donationFormEmbed.asset.php 1 year ago donationFormEmbed.js 1 year ago donationFormEmbedInside.asset.php 1 year ago donationFormEmbedInside.js 1 year ago donationFormRegistrars-rtl.css 1 year ago donationFormRegistrars.asset.php 1 month ago donationFormRegistrars.css 1 year ago donationFormRegistrars.js 1 month ago donorDetails-rtl.css 9 months ago donorDetails.asset.php 7 months ago donorDetails.css 9 months ago donorDetails.js 7 months ago elementorCampaignCommentsWidget-rtl.css 1 year ago elementorCampaignCommentsWidget.asset.php 8 months ago elementorCampaignCommentsWidget.css 1 year ago elementorCampaignCommentsWidget.js 8 months ago elementorCampaignGoalWidget-rtl.css 1 year ago elementorCampaignGoalWidget.asset.php 11 months ago elementorCampaignGoalWidget.css 1 year ago elementorCampaignGoalWidget.js 11 months ago elementorCampaignGridWidget-rtl.css 10 months ago elementorCampaignGridWidget.asset.php 9 months ago elementorCampaignGridWidget.css 10 months ago elementorCampaignGridWidget.js 9 months ago elementorCampaignWidget-rtl.css 1 year ago elementorCampaignWidget.asset.php 11 months ago elementorCampaignWidget.css 1 year ago elementorCampaignWidget.js 11 months ago elementorDonationFormWidget-rtl.css 6 months ago elementorDonationFormWidget.asset.php 6 months ago elementorDonationFormWidget.css 6 months ago elementorDonationFormWidget.js 1 year ago elementorLegacyGiveFormWidget-rtl.css 6 months ago elementorLegacyGiveFormWidget.asset.php 6 months ago elementorLegacyGiveFormWidget.css 6 months ago elementorLegacyGiveFormWidget.js 11 months ago entitiesAdmin.asset.php 9 months ago entitiesAdmin.js 9 months ago entitiesPublic.asset.php 9 months ago entitiesPublic.js 9 months ago eventTicketsBlock-rtl.css 1 year ago eventTicketsBlock.asset.php 1 year ago eventTicketsBlock.css 1 year ago eventTicketsBlock.js 1 year ago eventTicketsTemplate-rtl.css 1 year ago eventTicketsTemplate.asset.php 1 year ago eventTicketsTemplate.css 1 year ago eventTicketsTemplate.js 1 year ago formBuilderApp-rtl.css 1 year ago formBuilderApp.asset.php 6 months ago formBuilderApp.css 1 year ago formBuilderApp.js 6 months ago formBuilderRegistrars-rtl.css 1 year ago formBuilderRegistrars.asset.php 7 months ago formBuilderRegistrars.css 1 year ago formBuilderRegistrars.js 7 months ago formTaxonomySettings-rtl.css 1 year ago formTaxonomySettings.asset.php 1 year ago formTaxonomySettings.css 1 year ago formTaxonomySettings.js 1 year ago multiStepFormDesignCss-rtl.css 1 year ago multiStepFormDesignCss.asset.php 1 year ago multiStepFormDesignCss.css 1 year ago multiStepFormDesignCss.js 2 years ago offlineGateway.asset.php 1 year ago offlineGateway.js 1 year ago offlineGatewayFormBuilder-rtl.css 1 year ago offlineGatewayFormBuilder.asset.php 1 year ago offlineGatewayFormBuilder.css 1 year ago offlineGatewayFormBuilder.js 1 year ago payPalCommerceGateway.asset.php 1 year ago payPalCommerceGateway.js 1 year ago payPalStandardGateway.asset.php 2 years ago payPalStandardGateway.js 2 years ago stripePaymentElementFormBuilder-rtl.css 1 year ago stripePaymentElementFormBuilder.asset.php 1 year ago stripePaymentElementFormBuilder.css 2 years ago stripePaymentElementFormBuilder.js 2 years ago stripePaymentElementGateway.asset.php 1 year ago stripePaymentElementGateway.js 1 year ago subscriptionDetails-rtl.css 9 months ago subscriptionDetails.asset.php 7 months ago subscriptionDetails.css 9 months ago subscriptionDetails.js 7 months ago testGateway.asset.php 2 years ago testGateway.js 2 years ago testOffsiteGateway.asset.php 2 years ago testOffsiteGateway.js 2 years ago twoPanelStepsFormLayoutCss-rtl.css 1 year ago twoPanelStepsFormLayoutCss.asset.php 1 year ago twoPanelStepsFormLayoutCss.css 1 year ago twoPanelStepsFormLayoutCss.js 2 years ago
stripePaymentElementGateway.js
1 lines
1 (()=>{var e={22926:function(e,t,n){!function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,a=[],_n=!0,i=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);_n=!0);}catch(e){i=!0,o=e}finally{try{_n||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;function c(){}function u(){}u.resetWarningCache=c;var l,p,f=(l=function(e){e.exports=function(){function e(e,t,n,r,o,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:u,resetWarningCache:c};return n.PropTypes=n,n}()},l(p={exports:{}},p.exports),p.exports),m=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),n.current},d=function(e){return null!==e&&"object"===o(e)},y="[object Object]",h=function e(t,n){if(!d(t)||!d(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var o=Object.prototype.toString.call(t)===y;if(o!==(Object.prototype.toString.call(n)===y))return!1;if(!o&&!r)return t===n;var a=Object.keys(t),i=Object.keys(n);if(a.length!==i.length)return!1;for(var s={},c=0;c<a.length;c+=1)s[a[c]]=!0;for(var u=0;u<i.length;u+=1)s[i[u]]=!0;var l=Object.keys(s);if(l.length!==a.length)return!1;var p=t,f=n;return l.every((function(t){return e(p[t],f[t])}))},g=function(e,t,n){return d(e)?Object.keys(e).reduce((function(o,i){var s=!d(t)||!h(e[i],t[i]);return n.includes(i)?(s&&console.warn("Unsupported prop change: options.".concat(i," is not a mutable property.")),o):s?r(r({},o||{}),{},a({},i,e[i])):o}),null):null},v=function(e){if(null===e||d(t=e)&&"function"==typeof t.elements&&"function"==typeof t.createToken&&"function"==typeof t.createPaymentMethod&&"function"==typeof t.confirmCardPayment)return e;var t;throw new Error("Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},E=function(e){if(function(e){return d(e)&&"function"==typeof e.then}(e))return{tag:"async",stripePromise:Promise.resolve(e).then(v)};var t=v(e);return null===t?{tag:"empty"}:{tag:"sync",stripe:t}},w=t.createContext(null);w.displayName="ElementsContext";var b=t.createContext(null);b.displayName="CartElementContext";var C=function(e){var n=e.stripe,r=e.options,o=e.children,a=t.useMemo((function(){return E(n)}),[n]),s=i(t.useState(null),2),c=s[0],u=s[1],l=i(t.useState(null),2),p=l[0],f=l[1],d=i(t.useState((function(){return{stripe:"sync"===a.tag?a.stripe:null,elements:"sync"===a.tag?a.stripe.elements(r):null}})),2),y=d[0],h=d[1];t.useEffect((function(){var e=!0,t=function(e){h((function(t){return t.stripe?t:{stripe:e,elements:e.elements(r)}}))};return"async"!==a.tag||y.stripe?"sync"!==a.tag||y.stripe||t(a.stripe):a.stripePromise.then((function(n){n&&e&&t(n)})),function(){e=!1}}),[a,y,r]);var v=m(n);t.useEffect((function(){null!==v&&v!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")}),[v,n]);var C=m(r);return t.useEffect((function(){if(y.elements){var e=g(r,C,["clientSecret","fonts"]);e&&y.elements.update(e)}}),[r,C,y.elements]),t.useEffect((function(){var e=y.stripe;e&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"2.1.2"}),e.registerAppInfo({name:"react-stripe-js",version:"2.1.2",url:"https://stripe.com/docs/stripe-js/react"}))}),[y.stripe]),t.createElement(w.Provider,{value:y},t.createElement(b.Provider,{value:{cart:c,setCart:u,cartState:p,setCartState:f}},o))};C.propTypes={stripe:f.any,options:f.object};var S=function(e){return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e}(t.useContext(w),e)},P=function(e){return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e}(t.useContext(b),e)},j=function(e){return(0,e.children)(S("mounts <ElementsConsumer>"))};j.propTypes={children:f.func.isRequired};var k=function(e,n,r){var o=!!r,a=t.useRef(r);t.useEffect((function(){a.current=r}),[r]),t.useEffect((function(){if(!o||!e)return function(){};var t=function(){a.current&&a.current.apply(a,arguments)};return e.on(n,t),function(){e.off(n,t)}}),[o,n,e,a])},O=function(e,n){var r,o="".concat((r=e).charAt(0).toUpperCase()+r.slice(1),"Element"),a=n?function(e){S("mounts <".concat(o,">")),P("mounts <".concat(o,">"));var n=e.id,r=e.className;return t.createElement("div",{id:n,className:r})}:function(n){var r,a=n.id,s=n.className,c=n.options,u=void 0===c?{}:c,l=n.onBlur,p=n.onFocus,f=n.onReady,d=n.onChange,y=n.onEscape,h=n.onClick,v=n.onLoadError,E=n.onLoaderStart,w=n.onNetworksChange,b=n.onCheckout,C=n.onLineItemClick,j=n.onConfirm,O=n.onCancel,_=n.onShippingAddressChange,x=n.onShippingRateChange,A=S("mounts <".concat(o,">")).elements,I=i(t.useState(null),2),R=I[0],T=I[1],D=t.useRef(null),B=t.useRef(null),L=P("mounts <".concat(o,">")),M=L.setCart,N=L.setCartState;k(R,"blur",l),k(R,"focus",p),k(R,"escape",y),k(R,"click",h),k(R,"loaderror",v),k(R,"loaderstart",E),k(R,"networkschange",w),k(R,"lineitemclick",C),k(R,"confirm",j),k(R,"cancel",O),k(R,"shippingaddresschange",_),k(R,"shippingratechange",x),"cart"===e?r=function(e){N(e),f&&f(e)}:f&&(r="expressCheckout"===e?f:function(){f(R)}),k(R,"ready",r),k(R,"change","cart"===e?function(e){N(e),d&&d(e)}:d),k(R,"checkout","cart"===e?function(e){N(e),b&&b(e)}:b),t.useLayoutEffect((function(){if(null===D.current&&A&&null!==B.current){var t=A.create(e,u);"cart"===e&&M&&M(t),D.current=t,T(t),t.mount(B.current)}}),[A,u,M]);var F=m(u);return t.useEffect((function(){if(D.current){var e=g(u,F,["paymentRequest"]);e&&D.current.update(e)}}),[u,F]),t.useLayoutEffect((function(){return function(){if(D.current&&"function"==typeof D.current.destroy)try{D.current.destroy(),D.current=null}catch(e){}}}),[]),t.createElement("div",{id:a,className:s,ref:B})};return a.propTypes={id:f.string,className:f.string,onChange:f.func,onBlur:f.func,onFocus:f.func,onReady:f.func,onEscape:f.func,onClick:f.func,onLoadError:f.func,onLoaderStart:f.func,onNetworksChange:f.func,onCheckout:f.func,onLineItemClick:f.func,onConfirm:f.func,onCancel:f.func,onShippingAddressChange:f.func,onShippingRateChange:f.func,options:f.object},a.displayName=o,a.__elementType=e,a},_="undefined"==typeof window,x=O("auBankAccount",_),A=O("card",_),I=O("cardNumber",_),R=O("cardExpiry",_),T=O("cardCvc",_),D=O("fpxBank",_),B=O("iban",_),L=O("idealBank",_),M=O("p24Bank",_),N=O("epsBank",_),F=O("payment",_),U=O("expressCheckout",_),W=O("paymentRequestButton",_),q=O("linkAuthentication",_),Y=O("address",_),z=O("shippingAddress",_),$=O("cart",_),H=O("paymentMethodMessaging",_),K=O("affirmMessage",_),V=O("afterpayClearpayMessage",_);e.AddressElement=Y,e.AffirmMessageElement=K,e.AfterpayClearpayMessageElement=V,e.AuBankAccountElement=x,e.CardCvcElement=T,e.CardElement=A,e.CardExpiryElement=R,e.CardNumberElement=I,e.CartElement=$,e.Elements=C,e.ElementsConsumer=j,e.EpsBankElement=N,e.ExpressCheckoutElement=U,e.FpxBankElement=D,e.IbanElement=B,e.IdealBankElement=L,e.LinkAuthenticationElement=q,e.P24BankElement=M,e.PaymentElement=F,e.PaymentMethodMessagingElement=H,e.PaymentRequestButtonElement=W,e.ShippingAddressElement=z,e.useCartElement=function(){return P("calls useCartElement()").cart},e.useCartElementState=function(){return P("calls useCartElementState()").cartState},e.useElements=function(){return S("calls useElements()").elements},e.useStripe=function(){return S("calls useStripe()").stripe},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(51609))},51609:e=>{"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}(()=>{"use strict";var e=n(51609),t="https://js.stripe.com/v3",r=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,o="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",a=null,i=Promise.resolve().then((function(){return e=null,null!==a||(a=new Promise((function(n,a){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(o),window.Stripe)n(window.Stripe);else try{var i=function(){for(var e=document.querySelectorAll('script[src^="'.concat(t,'"]')),n=0;n<e.length;n++){var o=e[n];if(r.test(o.src))return o}return null}();i&&e?console.warn(o):i||(i=function(e){var n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(t).concat(n);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(r),r}(e)),i.addEventListener("load",(function(){window.Stripe?n(window.Stripe):a(new Error("Stripe.js not available"))})),i.addEventListener("error",(function(){a(new Error("Failed to load Stripe.js"))}))}catch(e){return void a(e)}else n(null)}))),a;var e})),s=!1;i.catch((function(e){s||console.warn(e)}));var c=n(22926);const u=window.wp.hooks,l=window.wp.i18n;let p=null,f=null,m=!1;const d=({gateway:t})=>{const n=(0,c.useStripe)(),r=(0,c.useElements)();return t.stripe=n,t.elements=r,(0,e.createElement)(c.PaymentElement,{onChange:e=>{f=e.value.type,m="card"===e.value.type},options:{fields:{billingDetails:{name:"never",email:"never"}}}})};let y={};const h={id:"stripe_payment_element",initialize(){const{stripeKey:e,stripeConnectedAccountId:t,formId:n}=this.settings;if(!e&&!t)throw new Error("Stripe gateway settings are missing. Check your Stripe settings.");y=(0,u.applyFilters)("givewp_stripe_payment_element_appearance_options",{},n),p=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];s=!0;var r=Date.now();return i.then((function(e){return function(e,t,n){if(null===e)return null;var r=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"1.54.2",startTime:t})}(r,n),r}(e,t,r)}))}(e,t?{stripeAccount:t}:{})},beforeCreatePayment:async function(e){if(!this.stripe||!this.elements)throw new Error("Stripe was not able to load.");const{error:t}=await this.elements.submit();if(t){let e=(0,l.__)("Invalid Payment Data.","give");throw"string"==typeof t&&(e=(0,l.sprintf)((0,l.__)("Invalid Payment Data. Error Details: %s","give"),t)),t.hasOwnProperty("code")&&t.hasOwnProperty("message")&&(e=(0,l.sprintf)((0,l.__)("Invalid Payment Data. Error Details: %s (code: %s)","give"),t.message,t.code)),new Error(e)}return{stripePaymentMethod:f,stripePaymentMethodIsCreditCard:m,...this.settings}},afterCreatePayment:async function(e){const{error:t}=await this.stripe.confirmPayment({elements:this.elements,clientSecret:e.data.clientSecret,confirmParams:{payment_method_data:{billing_details:e.data.billingDetails},return_url:e.data.returnUrl}});if(console.error(t),"card_error"===t.type||"validation_error"===t.type)throw new Error(t.message);if(t)throw new Error(t.message)},Fields(){if(!p)throw new Error("Stripe library was not able to load. Check your Stripe settings.");const{isRecurring:t,currency:n,amountInMinorUnits:r}=window.givewp.form.hooks.useFormData(),o={mode:t?"subscription":"payment",amount:r,currency:n.toLowerCase(),appearance:y};return r<=0?(0,e.createElement)(e.Fragment,null,(0,l.__)("Donation amount must be greater than zero to proceed.","give")):(0,e.createElement)(c.Elements,{stripe:p,options:o},(0,e.createElement)(d,{gateway:h}))}};window.givewp.gateways.register(h)})()})();