{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./js/packages/utils/src/number.js","webpack:///./js/packages/utils/src/api-request.js","webpack:///./js/packages/cart/src/line-item.js","webpack:///./js/packages/cart/src/cart.js","webpack:///./js/frontend/payment-forms/stripe-checkout/cart/line-item.js","webpack:///./js/frontend/payment-forms/stripe-checkout/cart/index.js","webpack:///./js/frontend/payments/customer.js","webpack:///./js/frontend/payments/session.js","webpack:///./js/frontend/payment-forms/stripe-checkout/submit.js","webpack:///./js/frontend/payment-forms/stripe-checkout/index.js","webpack:///./js/frontend/payment-forms/stripe-checkout/setup.js","webpack:///./js/packages/cart/src/index.js","webpack:///./js/frontend/payment-forms/index.js","webpack:///external \"jQuery\"","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/defineProperty.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/classCallCheck.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/createClass.js","webpack:///./js/frontend/index.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/typeof.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/validateNamespace.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/validateHookName.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/createAddHook.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/createRemoveHook.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/createHasHook.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/createRunHook.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/createCurrentHook.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/createDoingHook.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/createDidHook.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/createHooks.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/index.js","webpack:///./js/packages/hooks/src/index.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/regenerator/index.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/form-serialize/index.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/inherits.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack:///./js/packages/utils/src/index.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/regenerator-runtime/runtime.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","Number","isInteger","isFinite","Math","floor","isSafeInteger","abs","MAX_SAFE_INTEGER","apiRequest","route","data","a","jQuery","ajax","method","url","wpApiSettings","root","beforeSend","xhr","setRequestHeader","nonce","responseJSON","LineItem","args","cart","this","id","title","amount","quantity","subscription","message","update","remainingItems","getLineItems","filter","items","tax","taxDecimal","getTaxDecimal","getQuantity","subtotal","getSubtotal","round","Cart","currency","taxPercent","coupon","isNonDecimalCurrency","isNaN","parseFloat","filteredItems","length","item","lineitem","push","unitPrice","getUnitPrice","BaseLineItem","forEach","getCoupon","percentOff","percent_off","amountOff","amount_off","discount","getDiscount","BaseCart","spFormElem","formData","form_values","serialize","hash","form_data","form_id","formId","window","simpayApp","enableForm","disableForm","triggerBrowserValidation","checkValidity","trigger","isValid","customer_id","hasCustomerFields","createCustomer","createSession","session","stripeInstance","redirectToCheckout","sessionId","then","error","onPaymentFormError","setup","e","submitBtn","find","spShared","debugLog","getPaymentFormType","convertToCents","spGeneral","booleans","isZeroDecimal","stripeParams","isSubscription","isTrial","planInterval","planIntervalCount","feePercent","feeAmount","setupFee","interval","intervalCount","singleAmount","convertFormDataToCartData","addLineItem","addEventListener","preventDefault","simpayGoogleRecaptcha","siteKey","i18n","grecaptcha","ready","execute","action","token","append","getPaymentForms","submit","catch","onError","undefined","formDisplayType","stripeCheckout","showError","stripeErrorMessages","code","obj","configurable","writable","instance","Constructor","TypeError","_defineProperties","target","props","descriptor","protoProps","staticProps","$","body","formCount","spFormElList","spFormData","spFormElems","init","document","setupPaymentForm","on","each","setupCoreForm","isStripeCheckoutForm","attr","localizedFormData","simplePayForms","formInstance","stripe","strings","bools","form","integers","config","elementsLocale","Stripe","locale","setCoreFinalAmount","finalAmount","getTotal","setSubmitButtonAsLoading","loadingText","paymentButtonLoadingText","addClass","checkoutButtonLoadingText","prop","html","buttonText","paymentButtonText","removeClass","checkoutButtonText","embeddedHtml","createElement","innerHTML","convertToDollars","formatted","formatCurrency","replace","errorMessage","type","style","display","appendTo","click","remove","wpsp","hooks","_setPrototypeOf","setPrototypeOf","__proto__","self","ReferenceError","_typeof","iterator","constructor","namespace","console","test","hookName","callback","priority","arguments","handler","handlers","splice","__current","hookInfo","currentIndex","runs","doAction","removeAll","handlersRemoved","_loop","some","hook","returnFirstArg","_len","Array","_key","result","apply","pop","actions","filters","addAction","addFilter","removeAction","removeFilter","hasAction","hasFilter","removeAllActions","removeAllFilters","applyFilters","currentAction","currentFilter","doingAction","doingFilter","didAction","didFilter","_createHooks","createHooks","_getPrototypeOf","getPrototypeOf","k_r_submitter","k_r_success_contrls","brackets","hash_serializer","match","hash_assign","keys","shift","between","isArray","_values","string","index","children","RegExp","exec","parse_keys","existing","str_serialize","encodeURIComponent","options","serializer","elements","radio_store","element","disabled","nodeName","val","checked","empty","selectOptions","isSelectedOptions","j","option","allowedEmpty","hasValue","selected","slice","subClass","superClass","assertThisInitialized","asyncGeneratorStep","gen","resolve","reject","_next","_throw","arg","info","done","Promise","fn","err","runtime","Op","hasOwn","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","define","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","context","Context","_invoke","state","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","NativeIteratorPrototype","values","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","invoke","__await","unwrapped","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","displayName","isGeneratorFunction","genFun","ctor","mark","awrap","async","iter","toString","reverse","skipTempReset","prev","charAt","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","Function"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,G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,KAAKZ,OAAS,SACdY,KAAKqV,KAAO,OACa,WAAhBnB,EAAOnJ,MAAqB8K,IACrC7V,KAAKqV,KAAOQ,GAGPhC,GAGT+D,OAAQ,SAAShC,GACf,IAAK,IAAItZ,EAAI0D,KAAK8V,WAAWnU,OAAS,EAAGrF,GAAK,IAAKA,EAAG,CACpD,IAAImZ,EAAQzV,KAAK8V,WAAWxZ,GAC5B,GAAImZ,EAAMG,aAAeA,EAGvB,OAFA5V,KAAK2X,SAASlC,EAAMO,WAAYP,EAAMI,UACtCE,EAAcN,GACP5B,IAKb,MAAS,SAAS6B,GAChB,IAAK,IAAIpZ,EAAI0D,KAAK8V,WAAWnU,OAAS,EAAGrF,GAAK,IAAKA,EAAG,CACpD,IAAImZ,EAAQzV,KAAK8V,WAAWxZ,GAC5B,GAAImZ,EAAMC,SAAWA,EAAQ,CAC3B,IAAIxB,EAASuB,EAAMO,WACnB,GAAoB,UAAhB9B,EAAOnJ,KAAkB,CAC3B,IAAI8M,EAAS3D,EAAOpC,IACpBiE,EAAcN,GAEhB,OAAOoC,GAMX,MAAM,IAAIrE,MAAM,0BAGlBsE,cAAe,SAAS5B,EAAUd,EAAYE,GAa5C,OAZAtV,KAAK0T,SAAW,CACd7H,SAAU6I,EAAOwB,GACjBd,WAAYA,EACZE,QAASA,GAGS,SAAhBtV,KAAKZ,SAGPY,KAAK8R,SA7rBPjL,GAgsBOgN,IAQJzX,EA7sBK,CAotBiBC,EAAOD,SAGtC,IACE2b,mBAAqB3F,EACrB,MAAO4F,GAUPC,SAAS,IAAK,yBAAdA,CAAwC7F","file":"simpay-public.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 331);\n","// @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger#Polyfill\nNumber.isInteger = Number.isInteger || function( value ) {\n\treturn typeof value === 'number' &&\n\t\tisFinite( value ) &&\n\t\tMath.floor( value ) === value;\n};\n\n// @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger#Polyfill\nNumber.isSafeInteger = Number.isSafeInteger || function( value ) {\n\treturn Number.isInteger( value ) && Math.abs( value ) <= Number.MAX_SAFE_INTEGER;\n};\n\n// @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER#Polyfill\nif ( ! Number.MAX_SAFE_INTEGER ) {\n\tNumber.MAX_SAFE_INTEGER = 9007199254740991; // Math.pow(2, 53) - 1;\n}\n","/* global jQuery, wpApiSettings */\n\n/**\n * Make an API request to the REST API.\n *\n * @param {string} route REST route.\n * @param {Object} data Data to send to the request.\n * @return {Promise} jQuery promise.\n */\nexport async function apiRequest( route, data ) {\n\ttry {\n\t\treturn await jQuery.ajax( {\n\t\t\tdata,\n\t\t\tmethod: 'POST',\n\t\t\turl: `${ wpApiSettings.root }wpsp/${ route }`,\n\t\t\tbeforeSend: ( xhr ) => {\n\t\t\t\txhr.setRequestHeader( 'X-WP-Nonce', wpApiSettings.nonce );\n\t\t\t},\n\t\t} );\n\t} catch ( { responseJSON } ) {\n\t\tthrow responseJSON;\n\t}\n}\n","/**\n * Internal dependencies\n */\nimport { Cart } from './cart.js';\n\n/**\n * LineItem\n */\nexport const LineItem = class LineItem {\n\t/**\n\t * Create a line item.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @param {Object} args Line item arguments.\n\t * @param {string} args.id Cart line item ID.\n\t * @param {string} args.title Cart line item title.\n\t * @param {number} args.amount Cart line item amount.\n\t * @param {number} args.quantity Cart line item quantity.\n\t * @param {boolean|Object} args.subscription Cart line item subscription data.\n\t * @param {boolean} args.subscription.isTrial Cart line item subscription trial designation.\n\t * @param {number} args.subscription.intervalCount Cart line item subscription interval count.\n\t * @param {number} args.subscription.interval Cart line item subscription interval.\n\t * @param {Cart} cart Cart this line item is attached to.\n\t * @return {LineItem} LineItem\n\t */\n\tconstructor( args, cart ) {\n\t\t// Set defaults.\n\t\t// @todo add support for classProperties.\n\t\tthis.cart = null;\n\t\tthis.id = null;\n\t\tthis.title = null;\n\t\tthis.amount = 0;\n\t\tthis.quantity = 1;\n\t\tthis.subscription = false;\n\n\t\tif ( 'object' !== typeof cart ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-line-item-cart',\n\t\t\t\tmessage: 'Item must have an cart.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.cart = cart;\n\t\t}\n\n\t\tthis.update( args );\n\t}\n\n\t/**\n\t * Updates a line item.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @param {Object} args Cart line item arguments.\n\t * @param {string} args.id Cart line item ID.\n\t * @param {string} args.title Cart line item title.\n\t * @param {number} args.amount Cart line item amount.\n\t * @param {number} args.quantity Cart line item quantity.\n\t * @param {boolean|Object} args.subscription Cart line item subscription data.\n\t * @param {boolean} args.subscription.isTrial Cart line item subscription trial designation.\n\t * @param {number} args.subscription.intervalCount Cart line item subscription interval count.\n\t * @param {number} args.subscription.interval Cart line item subscription interval.\n\t * @return {LineItem} Line item.\n\t */\n\tupdate( args ) {\n\t\t// Parse and retrieve specific arguments.\n\t\tconst {\n\t\t\tid,\n\t\t\ttitle,\n\t\t\tamount,\n\t\t\tquantity,\n\t\t\tsubscription,\n\t\t} = {\n\t\t\t...this,\n\t\t\t...args,\n\t\t};\n\n\t\t// ID must be a string.\n\t\tif ( 'string' !== typeof id ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-line-item-id',\n\t\t\t\tmessage: 'Item ID must be a string.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.id = id;\n\t\t}\n\n\t\t// Title must be a string.\n\t\t// Not currently shown in any UI, but may be in the future.\n\t\tif ( 'string' !== typeof title ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-line-item-title',\n\t\t\t\tmessage: 'Item title must be a string.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.title = title;\n\t\t}\n\n\t\t// Amount must be a number.\n\t\tif ( ! Number.isSafeInteger( amount ) ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-line-item-amount',\n\t\t\t\tmessage: 'Item amount must be an integer.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.amount = amount;\n\t\t}\n\n\t\t// Quantity must be a number.\n\t\tif ( ! Number.isSafeInteger( quantity ) ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-line-item-quantity',\n\t\t\t\tmessage: 'Item quantity must be an integer.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.quantity = quantity;\n\t\t}\n\n\t\t// Subscription must be false or contain subscription data.\n\t\t// @todo Validate subscription data.\n\t\tif ( ! ( false === subscription || 'object' === typeof subscription ) ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-line-item-subscription',\n\t\t\t\tmessage: 'Item subscription data must be a false or contain subscription data.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.subscription = subscription;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes the line item from the cart.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {LineItem} Removed line item.\n\t */\n\tremove() {\n\t\tconst allItems = this.cart.getLineItems();\n\t\tconst remainingItems = allItems.filter( ( { id } ) => ( this.id !== id ) );\n\n\t\tthis.cart.items = remainingItems;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Retrieves a cart line item's unit price.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart line item unit price.\n\t */\n\tgetUnitPrice() {\n\t\treturn this.amount;\n\t}\n\n\t/**\n\t * Retrieves the cart line item's quantity.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart line item quantity.\n\t */\n\tgetQuantity() {\n\t\treturn this.quantity;\n\t}\n\t\n\t/**\n\t * Retrieves a cart line item's tax.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart line item tax.\n\t */\n\tgetTax() {\n\t\tlet tax = 0;\n\t\tlet i = 0;\n\n\t\tconst taxDecimal = this.cart.getTaxDecimal();\n\t\tconst quantity = this.getQuantity();\n\t\tconst subtotal = this.getSubtotal();\n\n\t\tfor ( i = 0; i < quantity; i++ ) {\n\t\t\ttax += Math.round( subtotal * taxDecimal );\n\t\t}\n\n\t\treturn tax;\n\t}\n};\n\nexport default LineItem;\n","/**\n * Internal dependencies\n */\nimport LineItem from './line-item.js';\n\n/**\n * Cart\n */\nexport const Cart = class Cart {\n\t/**\n\t * Creates a cart.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @see `update()`\n\t *\n\t * @param {Object} args Cart arguments.\n\t * @return {Cart} Cart.\n\t */\n\tconstructor( args ) {\n\t\t// Set defaults.\n\t\t// @todo add support for classProperties.\n\t\tthis.items = [];\n\t\tthis.currency = 'usd';\n\t\tthis.taxPercent = 0;\n\t\tthis.coupon = false;\n\t\tthis.isNonDecimalCurrency = false;\n\n\t\tthis.update( args );\n\t}\n\n\t/**\n\t * Updates the cart.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @param {Object} args Cart arguments.\n\t * @param {number} args.taxPercent Tax percentage.\n\t * @param {false|Object} args.coupon Stripe Coupon.\n\t * @param {boolean} args.isNonDecimalCurrency If the currency is non-decimal based.\n\t * @return {Cart} Cart.\n\t */\n\tupdate( args ) {\n\t\t// Parse and retrieve specific arguments.\n\t\tconst {\n\t\t\tcurrency,\n\t\t\ttaxPercent,\n\t\t\tcoupon,\n\t\t\tisNonDecimalCurrency,\n\t\t} = {\n\t\t\t...this,\n\t\t\t...args,\n\t\t};\n\n\t\t// Set currency.\n\t\tif ( 'string' !== typeof currency ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-currency',\n\t\t\t\tmessage: 'Currency must be a string.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.currency = currency;\n\t\t}\n\n\t\t// Set fees.\n\t\tif ( isNaN( taxPercent ) ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-tax-percent',\n\t\t\t\tmessage: 'Tax percentage must be a number.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.taxPercent = parseFloat( taxPercent );\n\t\t}\n\n\t\t// Set coupon.\n\t\t// @todo Validate coupon data.\n\t\tif ( ! ( false === coupon || 'object' === typeof coupon ) ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-coupon',\n\t\t\t\tmessage: 'Coupon must be a false or contain coupon data.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.coupon = coupon;\n\t\t}\n\n\t\tif ( 'boolean' !== typeof isNonDecimalCurrency ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-non-decimal-currency',\n\t\t\t\tmessage: 'Declaring a non-decimal currency must be a boolean.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.isNonDecimalCurrency = isNonDecimalCurrency;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Resets the cart.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {Cart} Cart.\n\t */\n\treset() {\n\t\treturn new Cart;\n\t}\n\n\t/**\n\t * Retrieves coupon information.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {Object} Stripe Coupon.\n\t */\n\tgetCoupon() {\n\t\treturn this.coupon;\n\t}\n\n\t/**\n\t * Retrieves the cart's tax percent amount.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number}\n\t */\n\tgetTaxPercent() {\n\t\treturn this.taxPercent;\n\t}\n\n\t/**\n\t * Retrieves the cart's tax decimal amount for calculations.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number}\n\t */\n\tgetTaxDecimal() {\n\t\treturn ( this.taxPercent / 100 );\n\t}\n\n\t/**\n\t * Retrieves the items in the cart.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {Array} List of cart items.\n\t */\n\tgetLineItems() {\n\t\treturn this.items;\n\t}\n\n\t/**\n\t * Retrieves an item.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @param {string} id Cart line item ID.\n\t * @return {LineItem} Cart line item.\n\t */\n\tgetLineItem( id ) {\n\t\tconst items = this.getLineItems();\n\n\t\t// Can't use `find` because it is not supported in IE.\n\t\tconst filteredItems = items.filter( ( { id: itemId } ) => ( itemId === id ) );\n\n\t\tif ( 0 === filteredItems.length ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-line-item',\n\t\t\t\tmessage: `Unable to retrieve line item \"${ id }\"`,\n\t\t\t};\n\t\t}\n\n\t\treturn filteredItems[ 0 ];\n\t}\n\n\t/**\n\t * Adds a line item to the cart.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @param {Object|LineItem} item Cart line item or arguments to create one.\n\t * @return {LineItem} Added line item.\n\t */\n\taddLineItem( item ) {\n\t\tlet lineitem;\n\n\t\tif ( true === item instanceof LineItem ) {\n\t\t\tlineitem = item;\n\t\t} else {\n\t\t\tlineitem = new this.LineItem( item, this );\n\t\t}\n\n\t\tthis.items.push( lineitem );\n\n\t\treturn lineitem;\n\t}\n};\n","/**\n * Internal dependencies\n */\nimport { LineItem as BaseLineItem } from '@wpsimplepay/cart';\n\n/**\n * LineItem\n */\nclass LineItem extends BaseLineItem {\n\t/**\n\t * Retrieves a cart line item's subtotal.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart line item subtotal.\n\t */\n\tgetSubtotal() {\n\t\tlet subtotal = 0;\n\t\tlet i = 0;\n\n\t\tconst taxDecimal = this.cart.getTaxDecimal();\n\n\t\t// Calculate tax for each unit and create a sum.\n\t\tfor ( i = 0; i < this.getQuantity(); i++ ) {\n\t\t\tconst unitPrice = this.getUnitPrice();\n\t\t\tconst unitPriceTaxAmount = Math.round( unitPrice * taxDecimal );\n\n\t\t\tsubtotal += unitPrice + unitPriceTaxAmount;\n\t\t}\n\n\t\treturn subtotal;\n\t}\n\n\t/**\n\t * Retrieves a cart line item's total.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart line item total.\n\t */\n\tgetTotal() {\n\t\treturn Math.round( this.getSubtotal() );\n\t}\n}\n\nexport default LineItem;\n","/**\n * Internal dependencies\n */\nimport { Cart as BaseCart } from '@wpsimplepay/cart';\nimport LineItem from './line-item.js';\n\n/**\n * Cart for Stripe Checkout form types.\n *\n * @since 3.7.0\n */\nexport const Cart = class Cart extends BaseCart {\n\t/**\n\t * @since 3.7.0\n\t *\n\t * @param {Object} args Cart arguments.\n\t */\n\tconstructor( args ) {\n\t\tsuper( args );\n\n\t\t// Define the type of line item to use.\n\t\tthis.LineItem = LineItem;\n\t}\n\n\t/**\n\t * Retrieves subtotal.\n\t *\n\t * Taxes are added to each line item amount to create a subtotal.\n\t * This is done because Stripe Checkout Sessions do not support\n\t * `tax_percent` or `tax_rates`.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart subtotal.\n\t */\n\tgetSubtotal() {\n\t\tlet subtotal = 0;\n\n\t\tthis.getLineItems().forEach( ( item ) => {\n\t\t\tsubtotal += item.getSubtotal();\n\t\t} );\n\n\t\treturn subtotal;\n\t}\n\n\t/**\n\t * Retrieves the total discount amount.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart discount amount.\n\t */\n\tgetDiscount() {\n\t\tconst coupon = this.getCoupon();\n\n\t\tconst {\n\t\t\tpercent_off: percentOff,\n\t\t\tamount_off: amountOff,\n\t\t} = coupon;\n\n\t\tlet discount = 0;\n\n\t\tif ( false === coupon ) {\n\t\t\treturn discount;\n\t\t}\n\n\t\tif ( percentOff ) {\n\t\t\tdiscount += Math.round( this.getSubtotal() * ( percentOff / 100 ) );\n\t\t} else if ( amountOff ) {\n\t\t\tdiscount += amountOff;\n\t\t}\n\n\t\treturn discount;\n\t}\n\n\t/**\n\t * Retrieves the total tax amount.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart tax.\n\t */\n\tgetTax() {\n\t\tlet tax = 0;\n\t\tlet i = 0;\n\n\t\tconst taxDecimal = this.getTaxDecimal();\n\t\tconst lineItems = this.getLineItems();\n\n\t\tlineItems.forEach( ( item ) => {\n\t\t\tfor ( i = 0; i < item.getQuantity(); i++ ) {\n\t\t\t\ttax += Math.round( item.getUnitPrice() * taxDecimal );\n\t\t\t}\n\t\t} );\n\n\t\treturn tax;\n\t}\n\n\t/**\n\t * Retrieves the total.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart total.\n\t */\n\tgetTotal() {\n\t\tconst subtotal = this.getSubtotal();\n\t\tconst discount = this.getDiscount();\n\n\t\treturn Math.round( subtotal - discount );\n\t}\n};\n","/**\n * External dependencies.\n */\nimport serialize from 'form-serialize';\n\n/**\n * Internal dependencies.\n */\nimport { apiRequest } from '@wpsimplepay/utils';\n\n/**\n * Create a Customer object based on current formData.\n *\n * @param {Object} data Data to pass to REST endpoint.\n * @param {jQuery} spFormElem Form element jQuery object.\n * @param {Object} formData Configured form data.\n * @return {Promise} AJAX promise.\n */\nexport function create( data = {}, spFormElem, formData ) {\n\treturn apiRequest( 'v2/customer', {\n\t\tform_values: serialize( spFormElem[ 0 ], { hash: true } ),\n\t\tform_data: formData,\n\t\tform_id: formData.formId,\n\t\t...data,\n\t} );\n}\n","/**\n * External dependencies.\n */\nimport serialize from 'form-serialize';\n\n/**\n * Internal dependencies.\n */\nimport { apiRequest } from '@wpsimplepay/utils';\n\n/**\n * Create a Customer object based on current formData.\n *\n * @param {Object} data Data to pass to REST endpoint.\n * @param {jQuery} spFormElem Form element jQuery object.\n * @param {Object} formData Configured form data.\n * @return {Promise} AJAX promise.\n */\nexport function create( data = {}, spFormElem, formData ) {\n\treturn apiRequest( 'v2/checkout-session', {\n\t\tform_values: serialize( spFormElem[ 0 ], { hash: true } ),\n\t\tform_data: formData,\n\t\tform_id: formData.formId,\n\t\t...data,\n\t} );\n}\n","/* global _ */\n\n/**\n * External dependencies.\n */\nimport serialize from 'form-serialize';\n\n/**\n * Internal dependencies.\n */\nimport { onPaymentFormError } from '@wpsimplepay/core/frontend/payment-forms';\nimport { create as createCustomer } from '@wpsimplepay/core/frontend/payments/customer.js';\nimport { create as createSession } from '@wpsimplepay/core/frontend/payments/session.js';\n\n/**\n * Submit Stripe Checkout Payment Form.\n *\n * @todo DRY presubmission validation checks?\n *\n * @since 3.8.0\n *\n * @param {Element} cardElementInstance Stripe Elements card.\n * @param {jQuery} spFormElem Form element jQuery object.\n * @param {Object} formData Configured form data.\n */\nexport async function submit( spFormElem, formData ) {\n\tconst {\n\t\tenableForm,\n\t\tdisableForm,\n\t\ttriggerBrowserValidation,\n\t} = window.simpayApp;\n\n\t// Disable form while processing.\n\tdisableForm( spFormElem, formData, true );\n\n\t// HTML5 validation check.\n\tif ( ! spFormElem[ 0 ].checkValidity() ) {\n\t\ttriggerBrowserValidation( spFormElem, formData );\n\t\tenableForm( spFormElem, formData );\n\n\t\treturn;\n\t}\n\n\t// Allow further validation.\n\t//\n\t// jQuery( document.body ).on( 'simpayBeforeStripePayment', function( e, spFormElem, formData ) {\n\t// formData.isValid = false;\n\t// } );\n\tspFormElem.trigger( 'simpayBeforeStripePayment', [ spFormElem, formData ] );\n\n\tif ( ! formData.isValid ) {\n\t\tenableForm( spFormElem, formData );\n\n\t\treturn;\n\t}\n\n\ttry {\n\n\t\t// @todo Implement as a \"Stripe Checkout\" Payment Method?\n\n\t\tlet customer_id = null;\n\t\tconst { hasCustomerFields } = formData;\n\n\t\t// Only generate a custom Customer if we need to map on-page form fields.\n\t\tif ( hasCustomerFields ) {\n\t\t\tconst { id } = await createCustomer( {}, spFormElem, formData );\n\t\t\tcustomer_id = id;\n\t\t}\n\n\t\t// Generate a Checkout Session.\n\t\tconst session = await createSession(\n\t\t\t{\n\t\t\t\tcustomer_id,\n\t\t\t},\n\t\t\tspFormElem,\n\t\t\tformData\n\t\t);\n\n\t\t// Redirect to Stripe.\n\t\tspFormElem.stripeInstance\n\t\t\t.redirectToCheckout( {\n\t\t\t\tsessionId: session.sessionId,\n\t\t\t} )\n\t\t\t.then( ( { error } ) => {\n\t\t\t\tif ( error ) {\n\t\t\t\t\tonPaymentFormError( error, spFormElem, formData );\n\t\t\t\t}\n\t\t\t} );\n\n\t} catch ( error ) {\n\t\tonPaymentFormError( error, spFormElem, formData );\n\t}\n}\n","/**\n * Internal dependencies\n */\nimport { setup } from './setup.js';\nimport { submit } from './submit.js';\nimport { onPaymentFormError as onError } from '@wpsimplepay/core/frontend/payment-forms';\n\nexport default {\n\tsetup,\n\tsubmit,\n\tonError,\n};\n","/**\n * Internal dependencies\n */\nimport { convertFormDataToCartData } from '@wpsimplepay/cart';\nimport { Cart } from '@wpsimplepay/core/frontend/payment-forms/stripe-checkout/cart';\nimport { onPaymentFormError, getPaymentFormType, getPaymentForms } from '@wpsimplepay/core/frontend/payment-forms';\n\n/**\n * Bind events for Stripe Checkout.\n *\n * @param {Event} e simpayBindCoreFormEventsAndTriggers Event.\n * @param {jQuery} spFormElem Form element jQuery object.\n * @param {Object} formData Configured form data.\n */\nexport function setup( e, spFormElem, formData ) {\n\tconst submitBtn = spFormElem.find( '.simpay-payment-btn' )[0];\n\n\tconst { enableForm, disableForm } = window.simpayApp;\n\tconst { debugLog } = window.spShared;\n\n\t// Don't continue if this form is not using Stripe Checkout.\n\t// We need to check here due to legacy implementation of form setups.\n\tif ( 'stripe-checkout' !== getPaymentFormType( spFormElem, formData ) ) {\n\t\treturn;\n\t}\n\n\t// Disable Payment Form during setup.\n\tdisableForm( spFormElem, formData, true );\n\n\ttry {\n\t\t// Convert legacay data in to Cart data.\n\t\tconst {\n\t\t\titems,\n\t\t\tcurrency,\n\t\t\ttaxPercent,\n\t\t\tisNonDecimalCurrency,\n\t\t} = convertFormDataToCartData( formData );\n\n\t\t// Create a cart.\n\t\tconst cart = new Cart( {\n\t\t\tcurrency,\n\t\t\ttaxPercent,\n\t\t\tisNonDecimalCurrency,\n\t\t} );\n\n\t\t// Add items to the Cart.\n\t\tif ( items.length > 0 ) {\n\t\t\titems.forEach( ( item ) => {\n\t\t\t\tcart.addLineItem( item );\n\t\t\t} );\n\t\t}\n\n\t\t// Attach cart to the Payment Form instance.\n\t\tspFormElem.cart = cart;\n\n\t\t// Reenable form.\n\t\tenableForm( spFormElem, formData );\n\n\t\t// Attach submission handler.\n\t\tsubmitBtn.addEventListener( 'click', ( e ) => {\n\t\t\te.preventDefault();\n\n\t\t\tif ( window.simpayGoogleRecaptcha ) {\n\t\t\t\tconst { siteKey, i18n } = simpayGoogleRecaptcha;\n\n\t\t\t\t// @todo Complete syncronously inside of separate reCAPTCHA script.\n\t\t\t\t//\n\t\t\t\t// This is a temporary measure to ensure reCAPTCHA tokens are generated\n\t\t\t\t// at the time of submission to avoid them being invalidated after 120 seconds.\n\t\t\t\tgrecaptcha.ready( () => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tgrecaptcha.execute( siteKey, {\n\t\t\t\t\t\t\taction: `simple_pay_form_${ formData.formId }_customer`,\n\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t.then( ( token ) => {\n\t\t\t\t\t\t\t\tspFormElem.append( '' );\n\n\t\t\t\t\t\t\t\tgrecaptcha.execute( siteKey, {\n\t\t\t\t\t\t\t\t\taction: `simple_pay_form_${ formData.formId }_payment`,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t.then( ( token ) => {\n\t\t\t\t\t\t\t\t\t\tspFormElem.append( '' );\n\n\t\t\t\t\t\t\t\t\t\t// Find and submit the Payment Form.\n\t\t\t\t\t\t\t\t\t\tgetPaymentForms()[ getPaymentFormType( spFormElem, formData ) ]\n\t\t\t\t\t\t\t\t\t\t\t.submit( spFormElem, formData );\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t.catch( ( error ) => {\n\t\t\t\t\t\t\t\tonPaymentFormError( i18n.error, spFormElem, formData );\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t} catch ( error ) {\n\t\t\t\t\t\tonPaymentFormError( i18n.error, spFormElem, formData );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tgetPaymentForms()[ getPaymentFormType( spFormElem, formData ) ]\n\t\t\t\t\t.submit( spFormElem, formData );\n\t\t\t}\n\t\t} );\n\t} catch ( error ) {\n\t\tonPaymentFormError( error, spFormElem, formData );\n\t}\n}\n","export * from './cart.js';\nexport * from './line-item.js';\n\n/**\n * Converts current `formData` to a structured cart.\n *\n * @since 3.7.0\n *\n * @param {Object} formData Legacy form data.\n * @return {Object} data Cart data.\n */\nexport function convertFormDataToCartData( formData ) {\n\tconst {\n\t\tdebugLog,\n\t\tconvertToCents,\n\t} = window.spShared;\n\n\tconst {\n\t\tbooleans: {\n\t\t\tisZeroDecimal: isNonDecimalCurrency,\n\t\t},\n\t} = window.spGeneral;\n\n\tconst {\n\t\tstripeParams: {\n\t\t\tcurrency,\n\t\t},\n\n\t\t// Items.\n\t\tamount,\n\t\tisSubscription,\n\t\tquantity,\n\t\tisTrial,\n\t\tplanInterval,\n\t\tplanIntervalCount,\n\n\t\t// Fees.\n\t\tfeePercent,\n\t\tfeeAmount,\n\t\ttaxPercent,\n\t\tsetupFee,\n\t} = formData;\n\n\tconst data = {\n\t\tcurrency,\n\t\titems: [],\n\t\ttaxPercent: 0,\n\t\tisNonDecimalCurrency,\n\t};\n\n\t//\n\t// Add items.\n\t//\n\n\t// Initial Setup Fee.\n\tif ( ! isNaN( setupFee ) ) {\n\t\tdata.items.push( {\n\t\t\tid: 'setup-fee',\n\t\t\ttitle: 'Initial Setup Fee',\n\t\t\tamount: convertToCents( setupFee ),\n\t\t\tquantity: 1,\n\t\t\tsubscription: false,\n\t\t} );\n\t}\n\n\t// Plan Setup Fee.\n\tdata.items.push( {\n\t\tid: 'plan-setup-fee',\n\t\ttitle: 'Plan Setup Fee',\n\t\tamount: 0,\n\t\tquantity: 1,\n\t\tsubscription: false,\n\t} );\n\n\t// Base item.\n\tif ( isSubscription ) {\n\t\tdata.items.push( {\n\t\t\tid: 'base',\n\t\t\ttitle: 'Subscription',\n\t\t\tamount: convertToCents( amount ),\n\t\t\tquantity,\n\t\t\tsubscription: {\n\t\t\t\tisTrial,\n\t\t\t\tinterval: planInterval,\n\t\t\t\tintervalCount: planIntervalCount,\n\t\t\t},\n\t\t} );\n\t} else {\n\t\tlet singleAmount = amount;\n\n\t\tif ( ! isNaN( feeAmount ) && feeAmount > 0 ) {\n\t\t\tsingleAmount += feeAmount;\n\n\t\t\tdebugLog( 'feeAmount:', 'Arbitrary fee amounts should be added to the base amount directly.' );\n\t\t}\n\n\t\tdata.items.push( {\n\t\t\tid: 'base',\n\t\t\ttitle: 'One-time amount',\n\t\t\tamount: convertToCents( singleAmount ),\n\t\t\tquantity,\n\t\t\tsubscription: false,\n\t\t} );\n\t}\n\n\t// Tax.\n\tif ( ! isNaN( taxPercent ) ) {\n\t\tdata.taxPercent = taxPercent;\n\t}\n\n\t// Add any arbitrary fee percentage to tax percentage.\n\t// @link https://github.com/wpsimplepay/wp-simple-pay-pro/issues/1161\n\tif ( ! isNaN( feePercent ) && feePercent > 0 ) {\n\t\tdata.taxPercent = data.taxPercent + feePercent;\n\t\tdebugLog( 'feePercent:', 'Arbitrary fee percentages should be added to the taxPercent directly.' );\n\t};\n\n\treturn data;\n}\n","/* global _ */\n\n/**\n * Internal dependencies\n */\nimport { default as stripeCheckout } from './stripe-checkout';\n\n/**\n * Returns the current form type.\n *\n * @since 3.8.0\n *\n * @param {jQuery} spFormElem Form element jQuery object.\n * @param {Object} formData Configured form data.\n * @return {string} Form type. Currently supports `stripe-checkout` or `stripe-elements`.\n */\nexport function getPaymentFormType( spFormElem, formData ) {\n\tif (\n\t\tundefined === formData.formDisplayType ||\n\t\t'stripe_checkout' === formData.formDisplayType\n\t) {\n\t\treturn 'stripe-checkout';\n\t} else {\n\t\treturn 'stripe-elements';\n\t}\n};\n\n/**\n * Returns available Payment Forms.\n *\n * @todo Create a registry/datastore.\n *\n * @since 3.8.0\n *\n * @return {Object} List of available Payment Forms.\n */\nexport const getPaymentForms = () => ( {\n\t'stripe-checkout': stripeCheckout,\n} );\n\n/**\n * Handles an error on submission.\n *\n * @since 3.8.0\n *\n * @param {Object} error Error data.\n * @param {jQuery} spFormElem Form element jQuery object.\n * @param {Object} formData Configured form data.\n */\nexport function onPaymentFormError( error = {}, spFormElem, formData ) {\n\tconst { showError, enableForm } = window.simpayApp;\n\tconst { debugLog } = window.spShared;\n\n\tconst { stripeErrorMessages } = formData;\n\tlet message = error.message || '';\n\n\t// Use localized message if code exists.\n\tif ( error.code && stripeErrorMessages[ error.code ] ) {\n\t\tmessage = stripeErrorMessages[ error.code ];\n\t}\n\n\tshowError( spFormElem, formData, message );\n\tenableForm( spFormElem, formData );\n}\n","module.exports = jQuery;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","/* global simplePayForms, spGeneral, jQuery */\n\n/**\n * Internal dependencies.\n */\nimport hooks from '@wpsimplepay/hooks';\nimport { getPaymentForms } from '@wpsimplepay/core/frontend/payment-forms';\n\nlet simpayApp;\n\n( function( $ ) {\n\t'use strict';\n\n\tlet body;\n\n\tsimpayApp = {\n\n\t\tformCount: 0,\n\n\t\t// Collection of DOM elements of all payment forms.\n\t\tspFormElList: {},\n\n\t\t// Internal organized collection of all form data.\n\t\tspFormData: {},\n\t\tspFormElems: {},\n\n\t\t/**\n\t\t *\n\t\t */\n\t\tinit() {\n\t\t\tbody = $( document.body );\n\n\t\t\t// Skip \"Update Payment Method Forms\"\n\t\t\t// We need to keep .simpay-checkout-form so styles are applied.\n\t\t\tsimpayApp.spFormElList = body.find( '.simpay-checkout-form:not(.simpay-update-payment-method)' );\n\n\t\t\tconst stripeCheckout = getPaymentForms()['stripe-checkout'];\n\t\t\tconst { setup: setupPaymentForm } = stripeCheckout;\n\n\t\t\t// Setup Stripe Checkout when formData is available.\n\t\t\tbody.on( 'simpayCoreFormVarsInitialized', setupPaymentForm );\n\n\t\t\tsimpayApp.spFormElList.each( function( i ) {\n\t\t\t\tconst spFormElem = $( this );\n\n\t\t\t\tsimpayApp.setupCoreForm( spFormElem );\n\t\t\t\tsimpayApp.formCount++;\n\n\t\t\t\tbody.trigger( 'simpaySetupCoreForm', [ spFormElem ] );\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Does this payment form use the Stripe Checkout overlay?\n\t\t *\n\t\t * @param {Object} formData Configured form data.\n\t\t */\n\t\tisStripeCheckoutForm( formData ) {\n\t\t\treturn ( undefined === formData.formDisplayType ) || ( 'stripe_checkout' === formData.formDisplayType );\n\t\t},\n\n\t\t/**\n\t\t * Setup form object properties and additional data.\n\t\t *\n\t\t * @param {jQuery} spFormElem Form element jQuery object.\n\t\t */\n\t\tsetupCoreForm( spFormElem ) {\n\t\t\t// Add a unique identifier to the form for unique selectors.\n\t\t\tspFormElem.attr( 'data-simpay-form-instance', simpayApp.formCount );\n\n\t\t\tconst formId = spFormElem.data( 'simpay-form-id' );\n\n\t\t\t// Grab the localized data for this form ID.\n\t\t\tconst localizedFormData = simplePayForms[ formId ];\n\n\t\t\t// Merge form data from bootstrapped data (separated based on type... for some reason).\n\t\t\tconst formData = {\n\t\t\t\tformId,\n\t\t\t\tformInstance: simpayApp.formCount,\n\t\t\t\tquantity: 1,\n\t\t\t\tisValid: true,\n\t\t\t\tstripeParams: {\n\t\t\t\t\t...localizedFormData.stripe.strings,\n\t\t\t\t\t...localizedFormData.stripe.bools,\n\t\t\t\t},\n\t\t\t\t...localizedFormData.form.bools,\n\t\t\t\t...localizedFormData.form.integers,\n\t\t\t\t...localizedFormData.form.i18n,\n\t\t\t\t...localizedFormData.form.strings,\n\t\t\t\t...localizedFormData.form.config,\n\t\t\t};\n\n\t\t\tconst {\n\t\t\t\tstripeParams: {\n\t\t\t\t\tkey,\n\t\t\t\t\telementsLocale,\n\t\t\t\t}\n\t\t\t} = formData;\n\n\t\t\t// Attach Stripe instance to spFormElem to avoid tampering when adjusting formData.\n\t\t\tspFormElem.stripeInstance = Stripe( key, {\n\t\t\t\tlocale: elementsLocale || 'auto',\n\t\t\t} );\n\n\t\t\t// Track in global namespace.\n\t\t\twindow.simpayApp.spFormData[ formId ] = formData;\n\t\t\twindow.simpayApp.spFormElems[ formId ] = spFormElem;\n\n\t\t\tbody.trigger( 'simpayCoreFormVarsInitialized', [ spFormElem, formData ] );\n\t\t\tbody.trigger( 'simpayBindCoreFormEventsAndTriggers', [ spFormElem, formData ] );\n\t\t},\n\n\t\t/**\n\t\t * Set the final amount for the Payment Form.\n\t\t *\n\t\t * @param {jQuery} spFormElem Form element jQuery object.\n\t\t * @param {Object} formData Configured form data.\n\t\t */\n\t\tsetCoreFinalAmount( spFormElem, formData ) {\n\t\t\t// Backwards compat.\n\t\t\tformData.finalAmount = spFormElem.cart.getTotal();\n\n\t\t\tbody.trigger( 'simpayFinalizeCoreAmount', [ spFormElem, formData ] );\n\t\t},\n\n\t\t/**\n\t\t * Disable Payment Form.\n\t\t *\n\t\t * @param {jQuery} spFormElem Form element jQuery object.\n\t\t * @param {Object} formData Configured form data.\n\t\t * @param {bool} setSubmitAsLoading Adjust button text to Processing text state.\n\t\t */\n\t\tdisableForm( spFormElem, formData, setSubmitButtonAsLoading ) {\n\t\t\tlet submitBtn = spFormElem.find( '.simpay-payment-btn' );\n\t\t\tlet loadingText = formData.paymentButtonLoadingText;\n\n\t\t\tspFormElem.addClass( 'simpay-checkout-form--loading' );\n\n\t\t\tif ( ! window.simpayApp.isStripeCheckoutForm( formData ) ) {\n\t\t\t\tsubmitBtn = spFormElem.find( '.simpay-checkout-btn' );\n\t\t\t\tloadingText = formData.checkoutButtonLoadingText;\n\t\t\t}\n\n\t\t\t// Disable the form submit button upon initial form load or form submission.\n\t\t\tsubmitBtn\n\t\t\t\t.prop( 'disabled', true );\n\n\t\t\tif ( true === setSubmitButtonAsLoading ) {\n\t\t\t\tsubmitBtn\n\t\t\t\t\t.addClass( 'simpay-disabled' )\n\t\t\t\t\t.find( 'span' )\n\t\t\t\t\t.html( loadingText );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Enable Payment Form.\n\t\t *\n\t\t * @param {jQuery} spFormElem Form element jQuery object.\n\t\t * @param {Object} formData Configured form data.\n\t\t */\n\t\tenableForm( spFormElem, formData ) {\n\t\t\tconst { cart } = spFormElem;\n\n\t\t\t// Do nothing if Cart is unavailable.\n\t\t\tif ( undefined === cart ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet submitBtn = spFormElem.find( '.simpay-payment-btn' );\n\t\t\tlet loadingText = formData.paymentButtonLoadingText;\n\t\t\tlet buttonText = formData.paymentButtonText;\n\n\t\t\tspFormElem.removeClass( 'simpay-checkout-form--loading' );\n\n\t\t\tif ( ! window.simpayApp.isStripeCheckoutForm( formData ) ) {\n\t\t\t\tsubmitBtn = spFormElem.find( '.simpay-checkout-btn' );\n\t\t\t\tloadingText = formData.checkoutButtonLoadingText;\n\t\t\t\tbuttonText = formData.checkoutButtonText;\n\t\t\t}\n\n\t\t\t// Re-enable button.\n\t\t\tsubmitBtn\n\t\t\t\t.prop( 'disabled', false )\n\t\t\t\t.removeClass( 'simpay-disabled' );\n\n\t\t\t// Embed in to an arbitrary node to retrieve parsed entities.\n\t\t\tconst embeddedHtml = document.createElement( 'div' );\n\t\t\tembeddedHtml.innerHTML = loadingText;\n\n\t\t\t// Reset button text back to original if needed during validation.\n\t\t\tif ( $( embeddedHtml ).html() === submitBtn.find( 'span' ).html() ) {\n\t\t\t\tconst {\n\t\t\t\t\tconvertToDollars,\n\t\t\t\t\tformatCurrency,\n\t\t\t\t} = window.spShared;\n\n\t\t\t\tconst total = convertToDollars( cart.getTotal() );\n\t\t\t\tconst formatted = formatCurrency( total, true );\n\t\t\t\tconst amount = `${ formatted }`;\n\n\t\t\t\tbuttonText = buttonText\n\t\t\t\t\t.replace( '{{amount}}', amount );\n\n\t\t\t\treturn submitBtn\n\t\t\t\t\t.find( 'span' )\n\t\t\t\t\t.html( buttonText );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Show an error.\n\t\t *\n\t\t * @param {jQuery} spFormElem Form element jQuery object.\n\t\t * @param {Object} formData Configured form data.\n\t\t * @param {string} errorMessage Message to show.\n\t\t */\n\t\tshowError( spFormElem, formData, errorMessage ) {\n\t\t\treturn spFormElem\n\t\t\t\t.find( '.simpay-errors' )\n\t\t\t\t.html( errorMessage );\n\t\t},\n\n\t\t/**\n\t\t * Ref triggerBrowserValidation in https://stripe.github.io/elements-examples/\n\t\t *\n\t\t * @param {jQuery} spFormElem Form element jQuery object.\n\t\t * @param {Object} formData Configured form data.\n\t\t */\n\t\ttriggerBrowserValidation( spFormElem, formData ) {\n\t\t\treturn $( '' )\n\t\t\t\t.attr( {\n\t\t\t\t\ttype: 'submit',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t} )\n\t\t\t\t.appendTo( spFormElem )\n\t\t\t\t.click()\n\t\t\t\t.remove();\n\t\t},\n\t};\n\n\t// Initialize form.\n\t$( document ).ready( () => simpayApp.init() );\n}( jQuery ) );\n\nwindow.simpayApp = simpayApp;\n\n/**\n * Globally accessible object of WP Simple Pay-related functionality.\n */\nwindow.wpsp = {\n\thooks,\n};\n","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","/**\n * Validate a namespace string.\n *\n * @param {string} namespace The namespace to validate - should take the form\n * `vendor/plugin/function`.\n *\n * @return {boolean} Whether the namespace is valid.\n */\nfunction validateNamespace(namespace) {\n if ('string' !== typeof namespace || '' === namespace) {\n // eslint-disable-next-line no-console\n console.error('The namespace must be a non-empty string.');\n return false;\n }\n\n if (!/^[a-zA-Z][a-zA-Z0-9_.\\-\\/]*$/.test(namespace)) {\n // eslint-disable-next-line no-console\n console.error('The namespace can only contain numbers, letters, dashes, periods, underscores and slashes.');\n return false;\n }\n\n return true;\n}\n\nexport default validateNamespace;\n//# sourceMappingURL=validateNamespace.js.map","/**\n * Validate a hookName string.\n *\n * @param {string} hookName The hook name to validate. Should be a non empty string containing\n * only numbers, letters, dashes, periods and underscores. Also,\n * the hook name cannot begin with `__`.\n *\n * @return {boolean} Whether the hook name is valid.\n */\nfunction validateHookName(hookName) {\n if ('string' !== typeof hookName || '' === hookName) {\n // eslint-disable-next-line no-console\n console.error('The hook name must be a non-empty string.');\n return false;\n }\n\n if (/^__/.test(hookName)) {\n // eslint-disable-next-line no-console\n console.error('The hook name cannot begin with `__`.');\n return false;\n }\n\n if (!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(hookName)) {\n // eslint-disable-next-line no-console\n console.error('The hook name can only contain numbers, letters, dashes, periods and underscores.');\n return false;\n }\n\n return true;\n}\n\nexport default validateHookName;\n//# sourceMappingURL=validateHookName.js.map","/**\n * Internal dependencies\n */\nimport validateNamespace from './validateNamespace.js';\nimport validateHookName from './validateHookName.js';\nimport { doAction } from './';\n/**\n * Returns a function which, when invoked, will add a hook.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n *\n * @return {Function} Function that adds a new hook.\n */\n\nfunction createAddHook(hooks) {\n /**\n * Adds the hook to the appropriate hooks container.\n *\n * @param {string} hookName Name of hook to add\n * @param {string} namespace The unique namespace identifying the callback in the form `vendor/plugin/function`.\n * @param {Function} callback Function to call when the hook is run\n * @param {?number} priority Priority of this hook (default=10)\n */\n return function addHook(hookName, namespace, callback) {\n var priority = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 10;\n\n if (!validateHookName(hookName)) {\n return;\n }\n\n if (!validateNamespace(namespace)) {\n return;\n }\n\n if ('function' !== typeof callback) {\n // eslint-disable-next-line no-console\n console.error('The hook callback must be a function.');\n return;\n } // Validate numeric priority\n\n\n if ('number' !== typeof priority) {\n // eslint-disable-next-line no-console\n console.error('If specified, the hook priority must be a number.');\n return;\n }\n\n var handler = {\n callback: callback,\n priority: priority,\n namespace: namespace\n };\n\n if (hooks[hookName]) {\n // Find the correct insert index of the new hook.\n var handlers = hooks[hookName].handlers;\n var i;\n\n for (i = handlers.length; i > 0; i--) {\n if (priority >= handlers[i - 1].priority) {\n break;\n }\n }\n\n if (i === handlers.length) {\n // If append, operate via direct assignment.\n handlers[i] = handler;\n } else {\n // Otherwise, insert before index via splice.\n handlers.splice(i, 0, handler);\n } // We may also be currently executing this hook. If the callback\n // we're adding would come after the current callback, there's no\n // problem; otherwise we need to increase the execution index of\n // any other runs by 1 to account for the added element.\n\n\n (hooks.__current || []).forEach(function (hookInfo) {\n if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {\n hookInfo.currentIndex++;\n }\n });\n } else {\n // This is the first hook of its type.\n hooks[hookName] = {\n handlers: [handler],\n runs: 0\n };\n }\n\n if (hookName !== 'hookAdded') {\n doAction('hookAdded', hookName, namespace, callback, priority);\n }\n };\n}\n\nexport default createAddHook;\n//# sourceMappingURL=createAddHook.js.map","/**\n * Internal dependencies\n */\nimport validateNamespace from './validateNamespace.js';\nimport validateHookName from './validateHookName.js';\nimport { doAction } from './';\n/**\n * Returns a function which, when invoked, will remove a specified hook or all\n * hooks by the given name.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n * @param {boolean} removeAll Whether to remove all callbacks for a hookName, without regard to namespace. Used to create `removeAll*` functions.\n *\n * @return {Function} Function that removes hooks.\n */\n\nfunction createRemoveHook(hooks, removeAll) {\n /**\n * Removes the specified callback (or all callbacks) from the hook with a\n * given hookName and namespace.\n *\n * @param {string} hookName The name of the hook to modify.\n * @param {string} namespace The unique namespace identifying the callback in the form `vendor/plugin/function`.\n *\n * @return {number} The number of callbacks removed.\n */\n return function removeHook(hookName, namespace) {\n if (!validateHookName(hookName)) {\n return;\n }\n\n if (!removeAll && !validateNamespace(namespace)) {\n return;\n } // Bail if no hooks exist by this name\n\n\n if (!hooks[hookName]) {\n return 0;\n }\n\n var handlersRemoved = 0;\n\n if (removeAll) {\n handlersRemoved = hooks[hookName].handlers.length;\n hooks[hookName] = {\n runs: hooks[hookName].runs,\n handlers: []\n };\n } else {\n // Try to find the specified callback to remove.\n var handlers = hooks[hookName].handlers;\n\n var _loop = function _loop(i) {\n if (handlers[i].namespace === namespace) {\n handlers.splice(i, 1);\n handlersRemoved++; // This callback may also be part of a hook that is\n // currently executing. If the callback we're removing\n // comes after the current callback, there's no problem;\n // otherwise we need to decrease the execution index of any\n // other runs by 1 to account for the removed element.\n\n (hooks.__current || []).forEach(function (hookInfo) {\n if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {\n hookInfo.currentIndex--;\n }\n });\n }\n };\n\n for (var i = handlers.length - 1; i >= 0; i--) {\n _loop(i);\n }\n }\n\n if (hookName !== 'hookRemoved') {\n doAction('hookRemoved', hookName, namespace);\n }\n\n return handlersRemoved;\n };\n}\n\nexport default createRemoveHook;\n//# sourceMappingURL=createRemoveHook.js.map","/**\n * Returns a function which, when invoked, will return whether any handlers are\n * attached to a particular hook.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n *\n * @return {Function} Function that returns whether any handlers are\n * attached to a particular hook and optional namespace.\n */\nfunction createHasHook(hooks) {\n /**\n * Returns whether any handlers are attached for the given hookName and optional namespace.\n *\n * @param {string} hookName The name of the hook to check for.\n * @param {?string} namespace Optional. The unique namespace identifying the callback\n * in the form `vendor/plugin/function`.\n *\n * @return {boolean} Whether there are handlers that are attached to the given hook.\n */\n return function hasHook(hookName, namespace) {\n // Use the namespace if provided.\n if ('undefined' !== typeof namespace) {\n return hookName in hooks && hooks[hookName].handlers.some(function (hook) {\n return hook.namespace === namespace;\n });\n }\n\n return hookName in hooks;\n };\n}\n\nexport default createHasHook;\n//# sourceMappingURL=createHasHook.js.map","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\n\n/**\n * Returns a function which, when invoked, will execute all callbacks\n * registered to a hook of the specified type, optionally returning the final\n * value of the call chain.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n * @param {?boolean} returnFirstArg Whether each hook callback is expected to\n * return its first argument.\n *\n * @return {Function} Function that runs hook callbacks.\n */\nfunction createRunHook(hooks, returnFirstArg) {\n /**\n * Runs all callbacks for the specified hook.\n *\n * @param {string} hookName The name of the hook to run.\n * @param {...*} args Arguments to pass to the hook callbacks.\n *\n * @return {*} Return value of runner, if applicable.\n */\n return function runHooks(hookName) {\n if (!hooks[hookName]) {\n hooks[hookName] = {\n handlers: [],\n runs: 0\n };\n }\n\n hooks[hookName].runs++;\n var handlers = hooks[hookName].handlers; // The following code is stripped from production builds.\n\n if ('production' !== process.env.NODE_ENV) {\n // Handle any 'all' hooks registered.\n if ('hookAdded' !== hookName && hooks.all) {\n handlers.push.apply(handlers, _toConsumableArray(hooks.all.handlers));\n }\n }\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (!handlers || !handlers.length) {\n return returnFirstArg ? args[0] : undefined;\n }\n\n var hookInfo = {\n name: hookName,\n currentIndex: 0\n };\n\n hooks.__current.push(hookInfo);\n\n while (hookInfo.currentIndex < handlers.length) {\n var handler = handlers[hookInfo.currentIndex];\n var result = handler.callback.apply(null, args);\n\n if (returnFirstArg) {\n args[0] = result;\n }\n\n hookInfo.currentIndex++;\n }\n\n hooks.__current.pop();\n\n if (returnFirstArg) {\n return args[0];\n }\n };\n}\n\nexport default createRunHook;\n//# sourceMappingURL=createRunHook.js.map","/**\n * Returns a function which, when invoked, will return the name of the\n * currently running hook, or `null` if no hook of the given type is currently\n * running.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n *\n * @return {Function} Function that returns the current hook.\n */\nfunction createCurrentHook(hooks) {\n /**\n * Returns the name of the currently running hook, or `null` if no hook of\n * the given type is currently running.\n *\n * @return {?string} The name of the currently running hook, or\n * `null` if no hook is currently running.\n */\n return function currentHook() {\n if (!hooks.__current || !hooks.__current.length) {\n return null;\n }\n\n return hooks.__current[hooks.__current.length - 1].name;\n };\n}\n\nexport default createCurrentHook;\n//# sourceMappingURL=createCurrentHook.js.map","/**\n * Returns a function which, when invoked, will return whether a hook is\n * currently being executed.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n *\n * @return {Function} Function that returns whether a hook is currently\n * being executed.\n */\nfunction createDoingHook(hooks) {\n /**\n * Returns whether a hook is currently being executed.\n *\n * @param {?string} hookName The name of the hook to check for. If\n * omitted, will check for any hook being executed.\n *\n * @return {boolean} Whether the hook is being executed.\n */\n return function doingHook(hookName) {\n // If the hookName was not passed, check for any current hook.\n if ('undefined' === typeof hookName) {\n return 'undefined' !== typeof hooks.__current[0];\n } // Return the __current hook.\n\n\n return hooks.__current[0] ? hookName === hooks.__current[0].name : false;\n };\n}\n\nexport default createDoingHook;\n//# sourceMappingURL=createDoingHook.js.map","/**\n * Internal dependencies\n */\nimport validateHookName from './validateHookName.js';\n/**\n * Returns a function which, when invoked, will return the number of times a\n * hook has been called.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n *\n * @return {Function} Function that returns a hook's call count.\n */\n\nfunction createDidHook(hooks) {\n /**\n * Returns the number of times an action has been fired.\n *\n * @param {string} hookName The hook name to check.\n *\n * @return {number} The number of times the hook has run.\n */\n return function didHook(hookName) {\n if (!validateHookName(hookName)) {\n return;\n }\n\n return hooks[hookName] && hooks[hookName].runs ? hooks[hookName].runs : 0;\n };\n}\n\nexport default createDidHook;\n//# sourceMappingURL=createDidHook.js.map","/**\n * Internal dependencies\n */\nimport createAddHook from './createAddHook';\nimport createRemoveHook from './createRemoveHook';\nimport createHasHook from './createHasHook';\nimport createRunHook from './createRunHook';\nimport createCurrentHook from './createCurrentHook';\nimport createDoingHook from './createDoingHook';\nimport createDidHook from './createDidHook';\n/**\n * Returns an instance of the hooks object.\n *\n * @return {Object} Object that contains all hooks.\n */\n\nfunction createHooks() {\n var actions = Object.create(null);\n var filters = Object.create(null);\n actions.__current = [];\n filters.__current = [];\n return {\n addAction: createAddHook(actions),\n addFilter: createAddHook(filters),\n removeAction: createRemoveHook(actions),\n removeFilter: createRemoveHook(filters),\n hasAction: createHasHook(actions),\n hasFilter: createHasHook(filters),\n removeAllActions: createRemoveHook(actions, true),\n removeAllFilters: createRemoveHook(filters, true),\n doAction: createRunHook(actions),\n applyFilters: createRunHook(filters, true),\n currentAction: createCurrentHook(actions),\n currentFilter: createCurrentHook(filters),\n doingAction: createDoingHook(actions),\n doingFilter: createDoingHook(filters),\n didAction: createDidHook(actions),\n didFilter: createDidHook(filters),\n actions: actions,\n filters: filters\n };\n}\n\nexport default createHooks;\n//# sourceMappingURL=createHooks.js.map","/**\n * Internal dependencies\n */\nimport createHooks from './createHooks';\n\nvar _createHooks = createHooks(),\n addAction = _createHooks.addAction,\n addFilter = _createHooks.addFilter,\n removeAction = _createHooks.removeAction,\n removeFilter = _createHooks.removeFilter,\n hasAction = _createHooks.hasAction,\n hasFilter = _createHooks.hasFilter,\n removeAllActions = _createHooks.removeAllActions,\n removeAllFilters = _createHooks.removeAllFilters,\n doAction = _createHooks.doAction,\n applyFilters = _createHooks.applyFilters,\n currentAction = _createHooks.currentAction,\n currentFilter = _createHooks.currentFilter,\n doingAction = _createHooks.doingAction,\n doingFilter = _createHooks.doingFilter,\n didAction = _createHooks.didAction,\n didFilter = _createHooks.didFilter,\n actions = _createHooks.actions,\n filters = _createHooks.filters;\n\nexport { createHooks, addAction, addFilter, removeAction, removeFilter, hasAction, hasFilter, removeAllActions, removeAllFilters, doAction, applyFilters, currentAction, currentFilter, doingAction, doingFilter, didAction, didFilter, actions, filters };\n//# sourceMappingURL=index.js.map","/**\n * WordPress dependencies\n */\nimport { createHooks } from '@wordpress/hooks';\n\nexport default createHooks();\n","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","module.exports = require(\"regenerator-runtime\");\n","// get successful control from form and assemble into object\n// http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2\n\n// types which indicate a submit action and are not successful controls\n// these will be ignored\nvar k_r_submitter = /^(?:submit|button|image|reset|file)$/i;\n\n// node names which could be successful controls\nvar k_r_success_contrls = /^(?:input|select|textarea|keygen)/i;\n\n// Matches bracket notation.\nvar brackets = /(\\[[^\\[\\]]*\\])/g;\n\n// serializes form fields\n// @param form MUST be an HTMLForm element\n// @param options is an optional argument to configure the serialization. Default output\n// with no options specified is a url encoded string\n// - hash: [true | false] Configure the output type. If true, the output will\n// be a js object.\n// - serializer: [function] Optional serializer function to override the default one.\n// The function takes 3 arguments (result, key, value) and should return new result\n// hash and url encoded str serializers are provided with this module\n// - disabled: [true | false]. If true serialize disabled fields.\n// - empty: [true | false]. If true serialize empty fields\nfunction serialize(form, options) {\n if (typeof options != 'object') {\n options = { hash: !!options };\n }\n else if (options.hash === undefined) {\n options.hash = true;\n }\n\n var result = (options.hash) ? {} : '';\n var serializer = options.serializer || ((options.hash) ? hash_serializer : str_serialize);\n\n var elements = form && form.elements ? form.elements : [];\n\n //Object store each radio and set if it's empty or not\n var radio_store = Object.create(null);\n\n for (var i=0 ; i result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n"],"sourceRoot":""}