HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/bwcdev/wp-content/plugins/woocommerce-payments-old/dist/woopay-express-button.js
/*! For license information please see woopay-express-button.js.LICENSE.txt */
(()=>{var e={2485:(e,t)=>{var r;!function(){"use strict";var o={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)){if(r.length){var i=n.apply(null,r);i&&e.push(i)}}else if("object"===a)if(r.toString===Object.prototype.toString)for(var s in r)o.call(r,s)&&r[s]&&e.push(s);else e.push(r.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(r=function(){return n}.apply(t,[]))||(e.exports=r)}()},5228:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var a,i,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var l in a=Object(arguments[c]))r.call(a,l)&&(s[l]=a[l]);if(t){i=t(a);for(var u=0;u<i.length;u++)o.call(a,i[u])&&(s[i[u]]=a[i[u]])}}return s}},1020:(e,t,r)=>{"use strict";r(5228);var o=r(1609),n=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var a=Symbol.for;n=a("react.element"),t.Fragment=a("react.fragment")}var i=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,r){var o,a={},l=null,u=null;for(o in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,o)&&!c.hasOwnProperty(o)&&(a[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===a[o]&&(a[o]=t[o]);return{$$typeof:n,type:e,key:l,ref:u,props:a,_owner:i.current}}t.jsx=l,t.jsxs=l},4848:(e,t,r)=>{"use strict";e.exports=r(1020)},6255:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r,o;(0,n.default)(e),"object"===a(t)?(r=t.min||0,o=t.max):(r=arguments[1],o=arguments[2]);var i=encodeURI(e).split(/%..|./).length-1;return i>=r&&(void 0===o||i<=o)};var o,n=(o=r(3399))&&o.__esModule?o:{default:o};function a(e){return a="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},a(e)}e.exports=t.default,e.exports.default=t.default},9517:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,o.default)(e),(t=(0,s.default)(t,l)).require_display_name||t.allow_display_name){var r=e.match(u);if(r){var c=r[1];if(e=e.replace(c,"").replace(/(^<|>$)/g,""),c.endsWith(" ")&&(c=c.slice(0,-1)),!function(e){var t=e.replace(/^"(.+)"$/,"$1");if(!t.trim())return!1;if(/[\.";<>]/.test(t)){if(t===e)return!1;if(t.split('"').length!==t.split('\\"').length)return!1}return!0}(c))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>g)return!1;var b=e.split("@"),_=b.pop(),y=_.toLowerCase();if(t.host_blacklist.includes(y))return!1;if(t.host_whitelist.length>0&&!t.host_whitelist.includes(y))return!1;var w=b.join("@");if(t.domain_specific_validation&&("gmail.com"===y||"googlemail.com"===y)){var v=(w=w.toLowerCase()).split("+")[0];if(!(0,n.default)(v.replace(/\./g,""),{min:6,max:30}))return!1;for(var C=v.split("."),k=0;k<C.length;k++)if(!p.test(C[k]))return!1}if(!(!1!==t.ignore_max_length||(0,n.default)(w,{max:64})&&(0,n.default)(_,{max:254})))return!1;if(!(0,a.default)(_,{require_tld:t.require_tld,ignore_max_length:t.ignore_max_length,allow_underscores:t.allow_underscores})){if(!t.allow_ip_domain)return!1;if(!(0,i.default)(_)){if(!_.startsWith("[")||!_.endsWith("]"))return!1;var x=_.slice(1,-1);if(0===x.length||!(0,i.default)(x))return!1}}if('"'===w[0])return w=w.slice(1,w.length-1),t.allow_utf8_local_part?m.test(w):h.test(w);for(var S=t.allow_utf8_local_part?f:d,F=w.split("."),P=0;P<F.length;P++)if(!S.test(F[P]))return!1;return!t.blacklisted_chars||-1===w.search(new RegExp("[".concat(t.blacklisted_chars,"]+"),"g"))};var o=c(r(3399)),n=c(r(6255)),a=c(r(7658)),i=c(r(5372)),s=c(r(3610));function c(e){return e&&e.__esModule?e:{default:e}}var l={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},u=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,d=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,p=/^[a-z\d]+$/,h=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,f=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,m=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,g=254;e.exports=t.default,e.exports.default=t.default},7658:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(e),(t=(0,n.default)(t,i)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1)),!0===t.allow_wildcard&&0===e.indexOf("*.")&&(e=e.substring(2));var r=e.split("."),a=r[r.length-1];if(t.require_tld){if(r.length<2)return!1;if(!t.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(a))return!1;if(/\s/.test(a))return!1}return!(!t.allow_numeric_tld&&/^\d+$/.test(a))&&r.every((function(e){return!(e.length>63&&!t.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)||/[\uff01-\uff5e]/.test(e)||/^-|-$/.test(e)||!t.allow_underscores&&/_/.test(e))}))};var o=a(r(3399)),n=a(r(3610));function a(e){return e&&e.__esModule?e:{default:e}}var i={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default},5372:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,n.default)(t),(r=String(r))?"4"===r?s.test(t):"6"===r&&l.test(t):e(t,4)||e(t,6)};var o,n=(o=r(3399))&&o.__esModule?o:{default:o},a="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",i="(".concat(a,"[.]){3}").concat(a),s=new RegExp("^".concat(i,"$")),c="(?:[0-9a-fA-F]{1,4})",l=new RegExp("^("+"(?:".concat(c,":){7}(?:").concat(c,"|:)|")+"(?:".concat(c,":){6}(?:").concat(i,"|:").concat(c,"|:)|")+"(?:".concat(c,":){5}(?::").concat(i,"|(:").concat(c,"){1,2}|:)|")+"(?:".concat(c,":){4}(?:(:").concat(c,"){0,1}:").concat(i,"|(:").concat(c,"){1,3}|:)|")+"(?:".concat(c,":){3}(?:(:").concat(c,"){0,2}:").concat(i,"|(:").concat(c,"){1,4}|:)|")+"(?:".concat(c,":){2}(?:(:").concat(c,"){0,3}:").concat(i,"|(:").concat(c,"){1,5}|:)|")+"(?:".concat(c,":){1}(?:(:").concat(c,"){0,4}:").concat(i,"|(:").concat(c,"){1,6}|:)|")+"(?::((?::".concat(c,"){0,5}:").concat(i,"|(?::").concat(c,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");e.exports=t.default,e.exports.default=t.default},3399:(e,t)=>{"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!("string"==typeof e||e instanceof String)){var t=r(e);throw null===e?t="null":"object"===t&&(t=e.constructor.name),new TypeError("Expected a string but received a ".concat(t))}},e.exports=t.default,e.exports.default=t.default},3610:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},e.exports=t.default,e.exports.default=t.default},1609:e=>{"use strict";e.exports=window.React}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.p=window.wcpayAssets.url,(()=>{"use strict";var e={};r.r(e),r.d(e,{R:()=>ge});const t=window.ReactDOM;var o=r.n(t);const n=e=>"undefined"!=typeof wcpayConfig?wcpayConfig[e]:a(e),a=e=>{let t=null;if("undefined"!=typeof wcpay_upe_config)t=wcpay_upe_config;else{if("object"!=typeof wc||void 0===wc.wcSettings)return null;t=wc.wcSettings.getSetting("woocommerce_payments_data")||{}}return t[e]||null},i=window.wp.i18n;var s=r(1609),c=r(2485),l=r.n(c),u=r(4848);const d=e=>(0,u.jsxs)("svg",{width:"62",height:"22",viewBox:"0 0 62 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,u.jsx)("path",{d:"M42.0633 3.53594C43.2337 3.53594 44.1719 3.81454 44.8778 4.37194C45.5837 4.92924 45.9367 5.66304 45.9367 6.57334C45.9367 7.53004 45.5744 8.28244 44.8592 8.82114C44.144 9.35994 43.1501 9.63864 41.8775 9.63864H41.4131V13.3819H38.7287V3.53594H42.0633ZM41.4224 5.42154V7.74374C42.0262 7.73444 42.472 7.64154 42.7507 7.45574C43.0386 7.26994 43.178 6.98204 43.178 6.59194C43.178 6.16464 43.0386 5.86734 42.76 5.70014C42.4906 5.52374 42.0447 5.43084 41.4224 5.42154Z",fill:"white"}),(0,u.jsx)("path",{d:"M54.2687 13.3726H51.4821L51.0269 11.7285H48.1939L47.7294 13.3726H44.9985L48.1288 3.52664H51.1384L54.2687 13.3726ZM50.516 9.96374C50.1166 8.49604 49.8101 7.10274 49.615 5.78374H49.5779C49.3642 7.14924 49.067 8.54254 48.6862 9.96374H50.516Z",fill:"white"}),(0,u.jsx)("path",{d:"M52.6617 3.53594H55.6712C56.34 4.94774 56.823 6.04384 57.1203 6.80554H57.1574C57.4547 6.01604 57.9377 4.92924 58.5879 3.53594H61.6625L58.495 8.92334V13.3726H55.7827V8.92334L52.6617 3.53594Z",fill:"white"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.7879 0.116043H4.20652C2.39522 0.116043 0.92762 1.58364 0.92762 3.38574V14.2906C0.92762 16.0926 2.39522 17.5602 4.19732 17.5602H17.7402L23.9357 21.0063L22.5331 17.5602H32.7879C34.5899 17.5602 36.0575 16.0926 36.0575 14.2906V3.38574C36.0575 1.58364 34.5899 0.116043 32.7879 0.116043ZM3.60282 2.63334C3.24982 2.64264 2.92472 2.80984 2.70182 3.07914C2.48812 3.35784 2.40452 3.71084 2.47892 4.06374C3.32412 9.45124 4.11372 13.0831 4.84752 14.9594C5.11682 15.6467 5.45122 15.9718 5.84142 15.944C6.43582 15.8975 7.16042 15.0708 8.00562 13.4453C8.19362 13.0694 8.42272 12.6128 8.69172 12.0766L8.69352 12.073C9.07562 11.3114 9.53802 10.3898 10.077 9.31184C10.8573 12.0149 11.9162 14.0491 13.2537 15.4145C13.6346 15.7954 14.0061 15.9718 14.387 15.944C14.7121 15.9254 15.0093 15.721 15.1486 15.4238C15.288 15.1359 15.353 14.8108 15.3158 14.4857C15.2229 13.1759 15.3623 11.3461 15.7152 9.01464C16.0775 6.59964 16.5419 4.87194 17.0993 3.83154C17.2107 3.62724 17.2572 3.38574 17.2386 3.14424C17.22 2.81914 17.0621 2.51254 16.802 2.31754C16.5512 2.10384 16.2261 2.00164 15.901 2.02954C15.4923 2.04814 15.1301 2.28964 14.9536 2.66114C14.0711 4.28674 13.4395 6.92474 13.0587 10.5658C12.4549 8.97754 11.9998 7.33344 11.7025 5.66144C11.5446 4.80684 11.1545 4.40744 10.5229 4.45394C10.0863 4.48174 9.73332 4.76974 9.44542 5.30844L6.29652 11.2903C5.78562 9.20044 5.30262 6.65534 4.85682 3.66434C4.74532 2.93054 4.32732 2.58684 3.60282 2.63334ZM24.5582 5.33634C24.0751 4.47244 23.2392 3.85944 22.2639 3.67364C22.0038 3.61794 21.7437 3.59004 21.4836 3.59004C20.1089 3.59004 18.9849 4.30524 18.1118 5.73574C17.3687 6.95254 16.9786 8.35514 16.9972 9.77634C16.9972 10.8816 17.2294 11.8291 17.6845 12.6186C18.1675 13.4825 19.0035 14.0955 19.9788 14.2813C20.2389 14.337 20.499 14.3649 20.7591 14.3649C22.1431 14.3649 23.267 13.6497 24.1309 12.2192C24.874 10.9931 25.2641 9.59054 25.2455 8.15084C25.2455 7.04544 25.0133 6.10724 24.5582 5.33634ZM22.7469 9.32114C22.5518 10.2593 22.1895 10.9652 21.6508 11.4482C21.2328 11.8291 20.8427 11.9777 20.4897 11.9127C20.1367 11.8477 19.8581 11.5318 19.6444 10.9838C19.4865 10.5658 19.3936 10.1292 19.3936 9.67414C19.3936 9.32114 19.4308 8.96824 19.4958 8.62454C19.6352 8.01144 19.8859 7.43554 20.2575 6.91544C20.7312 6.21874 21.2328 5.92154 21.753 6.03294C22.1059 6.10724 22.3846 6.41384 22.5982 6.96184C22.7562 7.37984 22.849 7.81644 22.849 8.26224C22.849 8.61524 22.8212 8.96824 22.7469 9.32114ZM31.2552 3.67364C32.2305 3.85944 33.0665 4.47244 33.5495 5.33634C34.0047 6.10724 34.2369 7.04544 34.2369 8.15084C34.2555 9.59054 33.8654 10.9931 33.1223 12.2192C32.2584 13.6497 31.1345 14.3649 29.7505 14.3649C29.4904 14.3649 29.2303 14.337 28.9702 14.2813C27.9949 14.0955 27.1589 13.4825 26.6759 12.6186C26.2208 11.8291 25.9885 10.8816 25.9885 9.77634C25.97 8.35514 26.3601 6.95254 27.1032 5.73574C27.9763 4.30524 29.1003 3.59004 30.475 3.59004C30.7351 3.59004 30.9951 3.61794 31.2552 3.67364ZM30.6422 11.4482C31.1809 10.9652 31.5432 10.2593 31.7382 9.32114C31.8126 8.96824 31.8404 8.61524 31.8404 8.26224C31.8404 7.81644 31.7475 7.37984 31.5896 6.96184C31.376 6.41384 31.0973 6.10724 30.7444 6.03294C30.2242 5.92154 29.7226 6.21874 29.2489 6.91544C28.8773 7.43554 28.6265 8.01144 28.4872 8.62454C28.4222 8.96824 28.385 9.32114 28.385 9.67414C28.385 10.1292 28.4779 10.5658 28.6358 10.9838C28.8495 11.5318 29.1281 11.8477 29.4811 11.9127C29.8341 11.9777 30.2242 11.8291 30.6422 11.4482Z",fill:"white"})]}),p=e=>(0,u.jsxs)("svg",{width:"62",height:"22",viewBox:"0 0 62 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,u.jsx)("path",{d:"M41.7108 4.7031C42.8812 4.7031 43.8194 4.9817 44.5253 5.539C45.2312 6.0964 45.5842 6.8302 45.5842 7.7405C45.5842 8.6972 45.2219 9.4496 44.5067 9.9883C43.7915 10.5271 42.7976 10.8057 41.525 10.8057H41.0606V14.5491H38.3762V4.7031H41.7108ZM41.0699 6.5887V8.9108C41.6737 8.9016 42.1195 8.8087 42.3982 8.6229C42.6861 8.4371 42.8255 8.1492 42.8255 7.759C42.8255 7.3318 42.6861 7.0345 42.4075 6.8673C42.1381 6.6908 41.6922 6.598 41.0699 6.5887Z",fill:"black"}),(0,u.jsx)("path",{d:"M53.9162 14.5398H51.1296L50.6744 12.8957H47.8414L47.3769 14.5398H44.646L47.7763 4.6938H50.7859L53.9162 14.5398ZM50.1635 11.1308C49.7641 9.6632 49.4576 8.2699 49.2625 6.9509H49.2254C49.0117 8.3164 48.7145 9.7097 48.3337 11.1308H50.1635Z",fill:"black"}),(0,u.jsx)("path",{d:"M52.3092 4.7031H55.3187C55.9875 6.1149 56.4705 7.211 56.7678 7.9727H56.8049C57.1022 7.1832 57.5852 6.0964 58.2354 4.7031H61.31L58.1425 10.0905V14.5398H55.4302V10.0905L52.3092 4.7031Z",fill:"black"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.5621 0.783203H32.1435C33.9455 0.783203 35.4131 2.2508 35.4131 4.0529V14.9578C35.4131 16.7598 33.9455 18.2274 32.1435 18.2274H21.8887L23.2913 21.6735L17.0958 18.2274H3.5529C1.7508 18.2274 0.283203 16.7598 0.283203 14.9578V4.0529C0.283203 2.2508 1.7508 0.783203 3.5621 0.783203Z",fill:"#7F54B3"}),(0,u.jsx)("path",{d:"M2.0574 3.74629C2.2803 3.47699 2.6054 3.30979 2.9584 3.30049C3.6829 3.25399 4.1009 3.59769 4.2124 4.33149C4.6582 7.32249 5.1412 9.8676 5.6521 11.9575L8.801 5.9756C9.0889 5.4369 9.4419 5.1489 9.8785 5.1211C10.5101 5.0746 10.9002 5.47399 11.0581 6.32859C11.3554 8.00049 11.8105 9.6446 12.4143 11.233C12.7951 7.59179 13.4267 4.9539 14.3092 3.3283C14.4857 2.9568 14.8479 2.7153 15.2566 2.6967C15.5817 2.6688 15.9068 2.771 16.1576 2.9847C16.4177 3.1797 16.5756 3.4862 16.5942 3.8113C16.6128 4.0529 16.5663 4.2944 16.4549 4.4987C15.8975 5.539 15.4331 7.2667 15.0708 9.6818C14.7179 12.0133 14.5785 13.8431 14.6714 15.1528C14.7086 15.4779 14.6436 15.803 14.5042 16.091C14.3649 16.3882 14.0677 16.5926 13.7426 16.6112C13.3617 16.639 12.9902 16.4625 12.6093 16.0817C11.2718 14.7163 10.2129 12.682 9.4326 9.97899C8.513 11.8182 7.8164 13.2022 7.3612 14.1125C6.516 15.738 5.7914 16.5647 5.197 16.6112C4.8068 16.639 4.4724 16.3139 4.2031 15.6266C3.4693 13.7502 2.6797 10.1184 1.8344 4.73089C1.7601 4.37799 1.8437 4.02499 2.0574 3.74629Z",fill:"white"}),(0,u.jsx)("path",{d:"M23.9138 6.0035C23.4308 5.1396 22.5948 4.5266 21.6195 4.3408C21.3594 4.2851 21.0993 4.2572 20.8392 4.2572C19.4645 4.2572 18.3405 4.9724 17.4674 6.4029C16.7243 7.6197 16.3342 9.0223 16.3528 10.4435C16.3528 11.5488 16.585 12.4963 17.0401 13.2858C17.5231 14.1497 18.3591 14.7627 19.3344 14.9485C19.5945 15.0042 19.8546 15.0321 20.1147 15.0321C21.4987 15.0321 22.6226 14.3169 23.4865 12.8864C24.2296 11.6603 24.6197 10.2577 24.6011 8.818C24.6011 7.7126 24.3689 6.7744 23.9138 6.0035ZM22.1025 9.9883C21.9074 10.9265 21.5451 11.6324 21.0064 12.1154C20.5884 12.4963 20.1983 12.6449 19.8453 12.5799C19.4923 12.5149 19.2137 12.199 19 11.651C18.8421 11.233 18.7492 10.7964 18.7492 10.3413C18.7492 9.9883 18.7864 9.6354 18.8514 9.2917C18.9908 8.6786 19.2415 8.1027 19.6131 7.5826C20.0868 6.8859 20.5884 6.5887 21.1086 6.7001C21.4615 6.7744 21.7402 7.081 21.9538 7.629C22.1118 8.047 22.2046 8.4836 22.2046 8.9294C22.2046 9.2824 22.1768 9.6354 22.1025 9.9883Z",fill:"white"}),(0,u.jsx)("path",{d:"M32.9051 6.0035C32.4221 5.1396 31.5861 4.5266 30.6108 4.3408C30.3507 4.2851 30.0907 4.2572 29.8306 4.2572C28.4559 4.2572 27.3319 4.9724 26.4588 6.4029C25.7157 7.6197 25.3256 9.0223 25.3441 10.4435C25.3441 11.5488 25.5764 12.4963 26.0315 13.2858C26.5145 14.1497 27.3505 14.7627 28.3258 14.9485C28.5859 15.0042 28.846 15.0321 29.1061 15.0321C30.4901 15.0321 31.614 14.3169 32.4779 12.8864C33.221 11.6603 33.6111 10.2577 33.5925 8.818C33.5925 7.7126 33.3603 6.7744 32.9051 6.0035ZM31.0938 9.9883C30.8988 10.9265 30.5365 11.6324 29.9978 12.1154C29.5798 12.4963 29.1897 12.6449 28.8367 12.5799C28.4837 12.5149 28.2051 12.199 27.9914 11.651C27.8335 11.233 27.7406 10.7964 27.7406 10.3413C27.7406 9.9883 27.7778 9.6354 27.8428 9.2917C27.9821 8.6786 28.2329 8.1027 28.6045 7.5826C29.0782 6.8859 29.5798 6.5887 30.1 6.7001C30.4529 6.7744 30.7316 7.081 30.9452 7.629C31.1031 8.047 31.196 8.4836 31.196 8.9294C31.196 9.2824 31.1682 9.6354 31.0938 9.9883Z",fill:"white"})]});function h(e,t="",r){for(const o in e){const n=e[o],a=t?t+"["+o+"]":o;"string"==typeof n||"number"==typeof n?r.append(a,n):"object"==typeof n&&h(n,a,r)}return r}async function f(e,t,r){const o=h(t,"",new FormData),n=await fetch(e,{method:"POST",body:o,...r});return await n.json()}const m=(e,t)=>{"wcSettings"in window&&wcSettings.wcBlocksConfig&&"product"!==e?wp.data.dispatch("core/notices")?.createNotice("error",t,{context:`wc/${e}`}):fetch(n("ajaxUrl"),{method:"POST",body:new URLSearchParams({action:"woopay_express_checkout_button_show_error_notice",_ajax_nonce:n("woopayButtonNonce"),context:e,message:t})}).then((e=>e.json())).then((e=>{if(e.success){const t=document.querySelector(".woocommerce-notices-wrapper"),r=document.createElement("div");r.innerHTML=e.data.notice,t.insertBefore(r,null),t.scrollIntoView({behavior:"smooth",block:"center"})}}))},g=e=>"object"==typeof wcpayExpressCheckoutParams&&wcpayExpressCheckoutParams.hasOwnProperty(e)?wcpayExpressCheckoutParams[e]:"object"==typeof wcpayPaymentRequestParams&&wcpayPaymentRequestParams.hasOwnProperty(e)?wcpayPaymentRequestParams[e]:null,b=e=>g("wc_ajax_url").toString().replace("%%endpoint%%","wcpay_"+e),_=e=>g(e),y=e=>b(e),w=(e,t,r="wcpay_")=>e.toString().replace("%%endpoint%%",r+t),v=e=>{const t=window.wcpayConfig.pay_for_order,r=window.wcpayConfig.order_id,o=window.wcpayConfig.key,n=window.wcpayConfig.billing_email;if(!t||!r||!o)return e;const a=new URL(e);return a.searchParams.append("pay_for_order",t),a.searchParams.append("order_id",r),a.searchParams.append("key",o),a.searchParams.append("billing_email",n),a.href},C=()=>{(()=>{const e=document.cookie.split(";").find((e=>e.includes("skip_woopay")));if(!e)return!1;const t=e?.split("=");return"skip_woopay"===t[0].trim()&&"1"===t[1].trim()})()&&(document.cookie="skip_woopay=; path=/; expires=Thu, 01 Jan 1970 00:00:00 UTC;")};window.wp.domReady;const k=(e,t={})=>{var r,o,a;const i=null!==(r=n("platformTrackerNonce"))&&void 0!==r?r:null===(o=_("nonce"))||void 0===o?void 0:o.platform_tracker,s=null!==(a=n("ajaxUrl"))&&void 0!==a?a:_("ajax_url"),c=new FormData;c.append("tracksNonce",i),c.append("action","platform_tracks"),c.append("tracksEventName",e),c.append("tracksEventProp",JSON.stringify(t)),fetch(s,{method:"post",body:c})},x=()=>{return e=void 0,t=void 0,o=function*(){var e,t,r;let o=(()=>{const e=document.cookie.split(";");for(let t=0;t<e.length;t++){let r=e[t];for(;" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf("tk_ai="))return r.substring(6,r.length)}})();if(o){const e={_ut:"anon",_ui:o};return JSON.stringify(e)}const a=null!==(e=n("platformTrackerNonce"))&&void 0!==e?e:null===(t=_("nonce"))||void 0===t?void 0:t.platform_tracker,i=null!==(r=n("ajaxUrl"))&&void 0!==r?r:_("ajax_url"),s=new FormData;s.append("tracksNonce",a),s.append("action","get_identity");try{const e=yield fetch(i,{method:"post",body:s});if(!e.ok)return;const t=yield e.json();return t.success&&t.data&&t.data._ui&&t.data._ut?JSON.stringify(t.data):void 0}catch(e){return}},new((r=void 0)||(r=Promise))((function(n,a){function i(e){try{c(o.next(e))}catch(e){a(e)}}function s(e){try{c(o.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}c((o=o.apply(e,t||[])).next())}));var e,t,r,o},S=["color","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"],F=["fontFamily","fontSize","lineHeight","letterSpacing","fontWeight","fontVariation","textDecoration","textShadow","textTransform","-webkit-font-smoothing","-moz-osx-font-smoothing","transition"],P=["backgroundColor","border","borderTop","borderRight","borderBottom","borderLeft","borderRadius","borderWidth","borderColor","borderStyle","borderTopWidth","borderTopColor","borderTopStyle","borderRightWidth","borderRightColor","borderRightStyle","borderBottomWidth","borderBottomColor","borderBottomStyle","borderLeftWidth","borderLeftColor","borderLeftStyle","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","outline","outlineOffset","boxShadow"],M={".Label":[...S,...F],".Input":[...S,...F,...P],".Error":[...S,...F,...P],".Tab":[...S,...F,...P],".TabIcon":[...S],".TabLabel":[...S,...F],".Block":[...S.slice(1),...P.slice(1)]},E={".Label":M[".Label"],".Input":[...M[".Input"],"outlineColor","outlineWidth","outlineStyle"],".Error":M[".Error"],".Tab":["backgroundColor","color","fontFamily"],".Tab--selected":["outlineColor","outlineWidth","outlineStyle","backgroundColor","color",P],".TabIcon":M[".TabIcon"],".TabIcon--selected":["color"],".TabLabel":M[".TabLabel"],".Block":M[".Block"]};function T(e){return T="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},T(e)}var A=/^\s+/,j=/\s+$/;function L(e,t){if(t=t||{},(e=e||"")instanceof L)return e;if(!(this instanceof L))return new L(e,t);var r=function(e){var t,r,o,n={r:0,g:0,b:0},a=1,i=null,s=null,c=null,l=!1,u=!1;return"string"==typeof e&&(e=function(e){e=e.replace(A,"").replace(j,"").toLowerCase();var t,r=!1;if(K[e])e=K[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=le.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=le.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=le.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=le.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=le.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=le.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=le.hex8.exec(e))?{r:te(t[1]),g:te(t[2]),b:te(t[3]),a:ae(t[4]),format:r?"name":"hex8"}:(t=le.hex6.exec(e))?{r:te(t[1]),g:te(t[2]),b:te(t[3]),format:r?"name":"hex"}:(t=le.hex4.exec(e))?{r:te(t[1]+""+t[1]),g:te(t[2]+""+t[2]),b:te(t[3]+""+t[3]),a:ae(t[4]+""+t[4]),format:r?"name":"hex8"}:!!(t=le.hex3.exec(e))&&{r:te(t[1]+""+t[1]),g:te(t[2]+""+t[2]),b:te(t[3]+""+t[3]),format:r?"name":"hex"}}(e)),"object"==T(e)&&(ue(e.r)&&ue(e.g)&&ue(e.b)?(t=e.r,r=e.g,o=e.b,n={r:255*Y(t,255),g:255*Y(r,255),b:255*Y(o,255)},l=!0,u="%"===String(e.r).substr(-1)?"prgb":"rgb"):ue(e.h)&&ue(e.s)&&ue(e.v)?(i=oe(e.s),s=oe(e.v),n=function(e,t,r){e=6*Y(e,360),t=Y(t,100),r=Y(r,100);var o=Math.floor(e),n=e-o,a=r*(1-t),i=r*(1-n*t),s=r*(1-(1-n)*t),c=o%6;return{r:255*[r,i,a,a,s,r][c],g:255*[s,r,r,i,a,a][c],b:255*[a,a,s,r,r,i][c]}}(e.h,i,s),l=!0,u="hsv"):ue(e.h)&&ue(e.s)&&ue(e.l)&&(i=oe(e.s),c=oe(e.l),n=function(e,t,r){var o,n,a;function i(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=Y(e,360),t=Y(t,100),r=Y(r,100),0===t)o=n=a=r;else{var s=r<.5?r*(1+t):r+t-r*t,c=2*r-s;o=i(c,s,e+1/3),n=i(c,s,e),a=i(c,s,e-1/3)}return{r:255*o,g:255*n,b:255*a}}(e.h,i,c),l=!0,u="hsl"),e.hasOwnProperty("a")&&(a=e.a)),a=Q(a),{ok:l,format:e.format||u,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}function R(e,t,r){e=Y(e,255),t=Y(t,255),r=Y(r,255);var o,n,a=Math.max(e,t,r),i=Math.min(e,t,r),s=(a+i)/2;if(a==i)o=n=0;else{var c=a-i;switch(n=s>.5?c/(2-a-i):c/(a+i),a){case e:o=(t-r)/c+(t<r?6:0);break;case t:o=(r-e)/c+2;break;case r:o=(e-t)/c+4}o/=6}return{h:o,s:n,l:s}}function q(e,t,r){e=Y(e,255),t=Y(t,255),r=Y(r,255);var o,n,a=Math.max(e,t,r),i=Math.min(e,t,r),s=a,c=a-i;if(n=0===a?0:c/a,a==i)o=0;else{switch(a){case e:o=(t-r)/c+(t<r?6:0);break;case t:o=(r-e)/c+2;break;case r:o=(e-t)/c+4}o/=6}return{h:o,s:n,v:s}}function I(e,t,r,o){var n=[re(Math.round(e).toString(16)),re(Math.round(t).toString(16)),re(Math.round(r).toString(16))];return o&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function D(e,t,r,o){return[re(ne(o)),re(Math.round(e).toString(16)),re(Math.round(t).toString(16)),re(Math.round(r).toString(16))].join("")}function W(e,t){t=0===t?0:t||10;var r=L(e).toHsl();return r.s-=t/100,r.s=ee(r.s),L(r)}function H(e,t){t=0===t?0:t||10;var r=L(e).toHsl();return r.s+=t/100,r.s=ee(r.s),L(r)}function O(e){return L(e).desaturate(100)}function $(e,t){t=0===t?0:t||10;var r=L(e).toHsl();return r.l+=t/100,r.l=ee(r.l),L(r)}function N(e,t){t=0===t?0:t||10;var r=L(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-t/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-t/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-t/100*255))),L(r)}function B(e,t){t=0===t?0:t||10;var r=L(e).toHsl();return r.l-=t/100,r.l=ee(r.l),L(r)}function z(e,t){var r=L(e).toHsl(),o=(r.h+t)%360;return r.h=o<0?360+o:o,L(r)}function U(e){var t=L(e).toHsl();return t.h=(t.h+180)%360,L(t)}function V(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=L(e).toHsl(),o=[L(e)],n=360/t,a=1;a<t;a++)o.push(L({h:(r.h+a*n)%360,s:r.s,l:r.l}));return o}function Z(e){var t=L(e).toHsl(),r=t.h;return[L(e),L({h:(r+72)%360,s:t.s,l:t.l}),L({h:(r+216)%360,s:t.s,l:t.l})]}function J(e,t,r){t=t||6,r=r||30;var o=L(e).toHsl(),n=360/r,a=[L(e)];for(o.h=(o.h-(n*t>>1)+720)%360;--t;)o.h=(o.h+n)%360,a.push(L(o));return a}function G(e,t){t=t||6;for(var r=L(e).toHsv(),o=r.h,n=r.s,a=r.v,i=[],s=1/t;t--;)i.push(L({h:o,s:n,v:a})),a=(a+s)%1;return i}L.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,o=this.toRgb();return e=o.r/255,t=o.g/255,r=o.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=Q(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=q(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=q(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),o=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+o+"%)":"hsva("+t+", "+r+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var e=R(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=R(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),o=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+o+"%)":"hsla("+t+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(e){return I(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,o,n){var a=[re(Math.round(e).toString(16)),re(Math.round(t).toString(16)),re(Math.round(r).toString(16)),re(ne(o))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*Y(this._r,255))+"%",g:Math.round(100*Y(this._g,255))+"%",b:Math.round(100*Y(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*Y(this._r,255))+"%, "+Math.round(100*Y(this._g,255))+"%, "+Math.round(100*Y(this._b,255))+"%)":"rgba("+Math.round(100*Y(this._r,255))+"%, "+Math.round(100*Y(this._g,255))+"%, "+Math.round(100*Y(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(X[I(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+D(this._r,this._g,this._b,this._a),r=t,o=this._gradientType?"GradientType = 1, ":"";if(e){var n=L(e);r="#"+D(n._r,n._g,n._b,n._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,o=this._a<1&&this._a>=0;return t||!o||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return L(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification($,arguments)},brighten:function(){return this._applyModification(N,arguments)},darken:function(){return this._applyModification(B,arguments)},desaturate:function(){return this._applyModification(W,arguments)},saturate:function(){return this._applyModification(H,arguments)},greyscale:function(){return this._applyModification(O,arguments)},spin:function(){return this._applyModification(z,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(J,arguments)},complement:function(){return this._applyCombination(U,arguments)},monochromatic:function(){return this._applyCombination(G,arguments)},splitcomplement:function(){return this._applyCombination(Z,arguments)},triad:function(){return this._applyCombination(V,[3])},tetrad:function(){return this._applyCombination(V,[4])}},L.fromRatio=function(e,t){if("object"==T(e)){var r={};for(var o in e)e.hasOwnProperty(o)&&(r[o]="a"===o?e[o]:oe(e[o]));e=r}return L(e,t)},L.equals=function(e,t){return!(!e||!t)&&L(e).toRgbString()==L(t).toRgbString()},L.random=function(){return L.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},L.mix=function(e,t,r){r=0===r?0:r||50;var o=L(e).toRgb(),n=L(t).toRgb(),a=r/100;return L({r:(n.r-o.r)*a+o.r,g:(n.g-o.g)*a+o.g,b:(n.b-o.b)*a+o.b,a:(n.a-o.a)*a+o.a})},L.readability=function(e,t){var r=L(e),o=L(t);return(Math.max(r.getLuminance(),o.getLuminance())+.05)/(Math.min(r.getLuminance(),o.getLuminance())+.05)},L.isReadable=function(e,t,r){var o,n,a,i,s,c=L.readability(e,t);switch(n=!1,(a=r,"AA"!==(i=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(s=(a.size||"small").toLowerCase())&&"large"!==s&&(s="small"),o={level:i,size:s}).level+o.size){case"AAsmall":case"AAAlarge":n=c>=4.5;break;case"AAlarge":n=c>=3;break;case"AAAsmall":n=c>=7}return n},L.mostReadable=function(e,t,r){var o,n,a,i,s=null,c=0;n=(r=r||{}).includeFallbackColors,a=r.level,i=r.size;for(var l=0;l<t.length;l++)(o=L.readability(e,t[l]))>c&&(c=o,s=L(t[l]));return L.isReadable(e,s,{level:a,size:i})||!n?s:(r.includeFallbackColors=!1,L.mostReadable(e,["#fff","#000"],r))};var K=L.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},X=L.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(K);function Q(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Y(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function ee(e){return Math.min(1,Math.max(0,e))}function te(e){return parseInt(e,16)}function re(e){return 1==e.length?"0"+e:""+e}function oe(e){return e<=1&&(e=100*e+"%"),e}function ne(e){return Math.round(255*parseFloat(e)).toString(16)}function ae(e){return te(e)/255}var ie,se,ce,le=(se="[\\s|\\(]+("+(ie="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+ie+")[,|\\s]+("+ie+")\\s*\\)?",ce="[\\s|\\(]+("+ie+")[,|\\s]+("+ie+")[,|\\s]+("+ie+")[,|\\s]+("+ie+")\\s*\\)?",{CSS_UNIT:new RegExp(ie),rgb:new RegExp("rgb"+se),rgba:new RegExp("rgba"+ce),hsl:new RegExp("hsl"+se),hsla:new RegExp("hsla"+ce),hsv:new RegExp("hsv"+se),hsva:new RegExp("hsva"+ce),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function ue(e){return!!le.CSS_UNIT.exec(e)}const de=e=>{const t=e.match(/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0?(\.\d+)?|1?(\.0+)?)\s*\)$/);if(t){const r=t[4]||1;e=`rgb(${t.slice(1,4).map((e=>Math.round(e*r+255*(1-r)))).join(", ")})`}return e},pe={default:{hiddenContainer:"#wcpay-hidden-div",hiddenInput:"#wcpay-hidden-input",hiddenInvalidInput:"#wcpay-hidden-invalid-input"},classicCheckout:{appendTarget:".woocommerce-billing-fields__field-wrapper",upeThemeInputSelector:"#billing_first_name",upeThemeLabelSelector:".woocommerce-checkout .form-row label",rowElement:"p",validClasses:["form-row"],invalidClasses:["form-row","woocommerce-invalid","woocommerce-invalid-required-field"],backgroundSelectors:["li.wc_payment_method .wc-payment-form","li.wc_payment_method .payment_box","#payment","#order_review","form.checkout","body"]},blocksCheckout:{appendTarget:"#billing.wc-block-components-address-form",upeThemeInputSelector:"#billing-first_name",upeThemeLabelSelector:".wc-block-components-checkout-step__description",rowElement:"div",validClasses:["wc-block-components-text-input"],invalidClasses:["wc-block-components-text-input","has-error"],alternateSelectors:{appendTarget:"#shipping.wc-block-components-address-form",upeThemeInputSelector:"#shipping-first_name",upeThemeLabelSelector:".wc-block-components-checkout-step__description"},backgroundSelectors:["#payment-method .wc-block-components-radio-control-accordion-option","#payment-method","form.wc-block-checkout__form",".wc-block-checkout","body"]},bnplProductPage:{appendTarget:".product .cart .quantity",upeThemeInputSelector:".product .cart .quantity .qty",upeThemeLabelSelector:".product .cart .quantity label",rowElement:"div",validClasses:["input-text"],invalidClasses:["input-text","has-error"],backgroundSelectors:["#payment-method-message","#main > .product > div.summary.entry-summary","#main > .product","#main","body"]},bnplClassicCart:{appendTarget:".cart .quantity",upeThemeInputSelector:".cart .quantity .qty",upeThemeLabelSelector:".cart .quantity label",rowElement:"div",validClasses:["input-text"],invalidClasses:["input-text","has-error"],backgroundSelectors:["#payment-method-message","#main .entry-content .cart_totals","#main .entry-content","#main","body"]},bnplCartBlock:{appendTarget:".wc-block-cart .wc-block-components-quantity-selector",upeThemeInputSelector:".wc-block-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__input",upeThemeLabelSelector:".wc-block-components-text-input",rowElement:"div",validClasses:["wc-block-components-text-input"],invalidClasses:["wc-block-components-text-input","has-error"],backgroundSelectors:[".wc-block-components-bnpl-wrapper",".wc-block-components-order-meta",".wc-block-components-totals-wrapper",".wp-block-woocommerce-cart-order-summary-block",".wp-block-woocommerce-cart-totals-block",".wp-block-woocommerce-cart .wc-block-cart",".wp-block-woocommerce-cart","body"]},updateSelectors:function(e){return e.hasOwnProperty("alternateSelectors")&&(Object.entries(e.alternateSelectors).forEach((t=>{const[r,o]=t;document.querySelector(e[r])||(e[r]=o)})),delete e.alternateSelectors),e},getSelectors:function(e){let t=this.blocksCheckout;switch(e){case"blocks_checkout":t=this.blocksCheckout;break;case"shortcode_checkout":t=this.classicCheckout;break;case"bnpl_product_page":t=this.bnplProductPage;break;case"bnpl_classic_cart":t=this.bnplClassicCart;break;case"bnpl_cart_block":t=this.bnplCartBlock}return{...this.default,...this.updateSelectors(t)}}},he={getHiddenContainer:function(e){const t=document.createElement("div");return t.setAttribute("id",this.getIDFromSelector(e)),t.style.border=0,t.style.clip="rect(0 0 0 0)",t.style.height="1px",t.style.margin="-1px",t.style.overflow="hidden",t.style.padding="0",t.style.position="absolute",t.style.width="1px",t},createRow:function(e,t=[]){const r=document.createElement(e);return t.length&&r.classList.add(...t),r},appendClone:function(e,t,r){const o=document.querySelector(t);if(o){const t=o.cloneNode(!0);t.id=this.getIDFromSelector(r),t.value="",e.appendChild(t)}},getIDFromSelector:function(e){return e.startsWith("#")||e.startsWith(".")?e.slice(1):e},init:function(e){const t=pe.getSelectors(e),r=document.querySelector(t.appendTarget),o=document.querySelector(t.upeThemeInputSelector);if(!r||!o)return;document.querySelector(t.hiddenContainer)&&this.cleanup();const n=this.getHiddenContainer(t.hiddenContainer);r.appendChild(n);const a=this.createRow(t.rowElement,t.validClasses);n.appendChild(a);const i=this.createRow(t.rowElement,t.invalidClasses);n.appendChild(i),this.appendClone(a,t.upeThemeInputSelector,t.hiddenInput),this.appendClone(i,t.upeThemeInputSelector,t.hiddenInvalidInput),this.appendClone(i,t.upeThemeLabelSelector,t.hiddenInvalidInput),document.querySelector(t.hiddenInput).style.transition="none"},cleanup:function(){const e=document.querySelector(pe.default.hiddenContainer);e&&e.remove()}},fe=(e,t,r=null)=>{if(!document.querySelector(e))return{};const o=E[t],n=document.querySelector(e),a=window.getComputedStyle(n),i={};for(let e=0;e<a.length;e++){const t=a[e].replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}));o.includes(t)&&(i[t]=de(a.getPropertyValue(a[e])))}if(".Input"===t||".Tab--selected"===t){const e=((e,t="solid",r)=>e&&r?[e,t,r].join(" "):"")(i.outlineWidth,i.outlineStyle,i.outlineColor);""!==e&&(i.outline=e),delete i.outlineWidth,delete i.outlineColor,delete i.outlineStyle}const s=a.getPropertyValue("text-indent");return"0px"!==s&&"0px"===i.paddingLeft&&"0px"===i.paddingRight&&(i.paddingLeft=s,i.paddingRight=s),".Block"===t&&(i.backgroundColor=r),i},me=e=>{const t=pe.getSelectors(e);he.init(e);const r=fe(t.hiddenInput,".Input"),o=fe(t.hiddenInvalidInput,".Input"),n=fe(t.upeThemeLabelSelector,".Label"),a=fe(t.upeThemeInputSelector,".Tab"),i=fe(t.hiddenInput,".Tab--selected"),s=(e=>{const t=Object.assign({},e);if(!e.backgroundColor||!e.color)return e;const r=((e,t)=>{const r={backgroundColor:e,color:t},o=L(e),n=L(t);if(!o.isValid()||!n.isValid())return{backgroundColor:"",color:""};const a=o.getBrightness()>50?L(o).darken(7):L(o).lighten(7),i=L.mostReadable(a,[n],{includeFallbackColors:!0});return r.backgroundColor=a.toRgbString(),r.color=i.toRgbString(),r})(e.backgroundColor,e.color);return t.backgroundColor=r.backgroundColor,t.color=r.color,t})(a),c={color:s.color},l={color:i.color},u=(e=>{let t=null,r=0;for(;!t&&r<e.length;){const o=document.querySelector(e[r]);if(!o){r++;continue}const n=window.getComputedStyle(o).backgroundColor;n&&L(n).getAlpha()>0&&(t=n),r++}return t||"#ffffff"})(t.backgroundSelectors),d=fe(t.upeThemeLabelSelector,".Block",u),p={variables:{colorBackground:u,colorText:n.color,fontFamily:n.fontFamily,fontSizeBase:n.fontSize},theme:(h=u,L(h).getBrightness()>125?"stripe":"night"),rules:{".Input":r,".Input--invalid":o,".Label":n,".Block":d,".Tab":a,".Tab:hover":s,".Tab--selected":i,".TabIcon:hover":c,".TabIcon--selected":l,".Text":n,".Text--redirect":n}};var h;return he.cleanup(),p},ge=()=>document.querySelector(".wp-block-woocommerce-checkout")?"blocks_checkout":document.querySelector(".woocommerce-billing-fields")?"shortcode_checkout":document.querySelector(".wp-block-woocommerce-cart")?"bnpl_cart_block":document.querySelector(".woocommerce-cart-form")?"bnpl_classic_cart":document.querySelector(".wp-block-woocommerce-product-details")?"bnpl_product_page":void 0,be=async(t,r,o)=>{const a=await(s=o,s?new Promise((e=>{if(document.querySelector(s))return e(document.querySelector(s));const t=document.querySelector('[data-block-name="woocommerce/checkout"]');if(!t)return e(null);new MutationObserver(((t,r)=>{document.querySelector(s)&&(e(document.querySelector(s)),r.disconnect())})).observe(t,{childList:!0,subtree:!0})})):null);var s;const c=await x();let l="";const u=document.body,d=document.createElement("div");d.setAttribute("role","dialog"),d.setAttribute("aria-modal","true"),d.classList.add("woopay-otp-iframe-wrapper");const p=document.createElement("iframe");p.title=(0,i.__)("WooPay SMS code verification","woocommerce-payments"),p.classList.add("woopay-otp-iframe"),p.classList.add("intrinsic-ignore");const h=768;let g=!0;const b=()=>{(h<=window.innerWidth&&g||h>window.innerWidth&&!g)&&(g=!g,p.contentWindow.postMessage({action:"setHeader",value:g},n("woopayHost"))),document.body.style.overflow="hidden"},_=()=>{if(!p)return;if(h>window.innerWidth)return p.style.left="0",p.style.right="",void(p.style.top="0");const e=p.getBoundingClientRect();p.style.top=Math.floor(window.innerHeight/2-e.height/2)+"px",p.style.left=Math.floor(window.innerWidth/2-e.width/2)+"px"};p.addEventListener("load",(()=>{g=!0;const t=(0,e.default)();n("isWoopayFirstPartyAuthEnabled")&&f(w(n("wcAjaxUrl"),"get_woopay_session"),{_ajax_nonce:n("woopaySessionNonce"),order_id:n("order_id"),key:n("key"),billing_email:n("billing_email"),appearance:me(t)}).then((e=>{e?.data?.session&&p.contentWindow.postMessage({action:"setSessionData",value:e},n("woopayHost"))})),b(),window.addEventListener("resize",b),_(),window.addEventListener("resize",_),p.classList.add("open")})),d.insertBefore(p,null);const y=()=>{window.removeEventListener("resize",b),window.removeEventListener("resize",_),window.removeEventListener("pageshow",k),window.removeEventListener("message",C),document.removeEventListener("keyup",S),d.remove(),p.classList.remove("open"),document.body.style.overflow=""};function C(e){if(n("woopayHost").startsWith(e.origin))switch(e.data.action){case"otp_email_submitted":l=e.data.userEmail;break;case"redirect_to_woopay_skip_session_init":e.data.redirectUrl&&(window.location=v(e.data.redirectUrl));break;case"redirect_to_platform_checkout":case"redirect_to_woopay":t.initWooPay(l||e.data.userEmail,e.data.platformCheckoutUserSession).then((e=>{if(document.querySelector(".woopay-otp-iframe"))if("success"===e.result)window.location=v(e.url);else{const e=(0,i.__)("WooPay is unavailable at this time. Sorry for the inconvenience.","woocommerce-payments");m(r,e),y()}}));break;case"otp_validation_failed":break;case"close_modal":y();break;case"iframe_height":e.data.height>300&&(h<=window.innerWidth?(p.style.height=e.data.height+"px",p.style.top=Math.floor(window.innerHeight/2-e.data.height/2)+"px"):(p.style.height="",p.style.top=""))}}function k(e){e.persisted&&y()}function S(e){"Escape"===e.key&&y()&&e.stopPropagation()}d.addEventListener("click",y),((e="")=>{if(document.querySelector(".woopay-otp-iframe"))return;window.addEventListener("pageshow",k),window.addEventListener("message",C),document.addEventListener("keyup",S);const t=window.document.documentElement.clientWidth,o=window.document.documentElement.clientHeight,a=new URLSearchParams;var i;a.append("testMode",n("testMode")),a.append("needsHeader",h>window.innerWidth),a.append("wcpayVersion",n("wcpayVersionNumber")),e&&(i=e,new RegExp(/^([a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.[a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)*|"((([ \t]*\r\n)?[ \t]+)?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*(([ \t]*\r\n)?[ \t]+)?")@(([a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.)+([a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]){2,}\.?$/i).test(i))&&(l=e,a.append("email",e)),a.append("is_blocks",!!window.wcSettings?.wcBlocksConfig),a.append("is_express","true"),a.append("express_context",r),a.append("source_url",window.location.href),a.append("viewport",`${t}x${o}`),c&&a.append("tracksUserIdentity",c),p.src=`${n("woopayHost")}/otp/?${a.toString()}`,u.insertBefore(d,null),_(),p.focus()})(a?.value)};var _e=r(9517),ye=r.n(_e);function we(e){return e.startsWith("{{/")?{type:"componentClose",value:e.replace(/\W/g,"")}:e.endsWith("/}}")?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.startsWith("{{")?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}function ve(e,t){let r,o,n=[];for(let a=0;a<e.length;a++){const i=e[a];if("string"!==i.type){if(void 0===t[i.value])throw new Error(`Invalid interpolation, missing component node: \`${i.value}\``);if("object"!=typeof t[i.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${i.value}\``);if("componentClose"===i.type)throw new Error(`Missing opening component token: \`${i.value}\``);if("componentOpen"===i.type){r=t[i.value],o=a;break}n.push(t[i.value])}else n.push(i.value)}if(r){const a=function(e,t){const r=t[e];let o=0;for(let n=e+1;n<t.length;n++){const e=t[n];if(e.value===r.value){if("componentOpen"===e.type){o++;continue}if("componentClose"===e.type){if(0===o)return n;o--}}}throw new Error("Missing closing component token `"+r.value+"`")}(o,e),i=ve(e.slice(o+1,a),t),c=(0,s.cloneElement)(r,{},i);if(n.push(c),a<e.length-1){const r=ve(e.slice(a+1),t);n=n.concat(r)}}return n=n.filter(Boolean),0===n.length?null:1===n.length?n[0]:(0,s.createElement)(s.Fragment,null,...n)}function Ce(e){const{mixedString:t,components:r,throwErrors:o}=e;if(!r)return t;if("object"!=typeof r){if(o)throw new Error(`Interpolation Error: unable to process \`${t}\` because components is not an object`);return t}const n=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(we)}(t);try{return ve(n,r)}catch(e){if(o)throw new Error(`Interpolation Error: unable to process \`${t}\` because of error \`${e.message}\``);return t}}function ke(e){window.WooPayConnect||(window.WooPayConnect={}),window.WooPayConnect.iframeInjectedState=e}function xe(){return window?.WooPayConnect?.postMessageTimeout||5e3}const Se=()=>{const e=(0,s.useRef)(),[t,r]=(0,s.useState)("");return(0,s.useEffect)((()=>{(async()=>{const e=n("testMode"),t=n("woopayHost"),o=n("woopayMerchantId"),a=new URLSearchParams({testMode:e,source_url:window.location.href,blogId:o}),i=await x();i&&a.append("tracksUserIdentity",i),r(`${t}/connect/?${a.toString()}`)})()}),[]),(0,s.useEffect)((()=>{if(!e.current)return;const t=e.current;t.addEventListener("load",(()=>{ke(2),window.dispatchEvent(new MessageEvent("message",{source:window,origin:n("woopayHost"),data:{action:"get_iframe_post_message_success",value:e=>t.contentWindow.postMessage(e,n("woopayHost"))}}))}))}),[t]),(0,u.jsx)("iframe",{ref:e,id:"woopay-connect-iframe",src:t,style:{height:0,width:0,border:"none",margin:0,padding:0,overflow:"hidden",display:"block",visibility:"hidden",position:"fixed",pointerEvents:"none",userSelect:"none"},title:(0,i.__)("WooPay Connect Direct Checkout","woocommerce-payments")})},Fe=class{iframePostMessage=null;listeners={};constructor(){this.listeners={getIframePostMessageCallback:()=>{},getPostMessageTimeoutCallback:()=>{}},this.removeMessageListener=this.attachMessageListener(),this.injectWooPayConnectIframe()}attachMessageListener(){const e=e=>{n("woopayHost").startsWith(e.origin)&&this.callbackFn(e.data)};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}}detachMessageListener(){"function"==typeof this.removeMessageListener&&this.removeMessageListener()}injectWooPayConnectIframe(){const e=window?.WooPayConnect?.iframeInjectedState||0;if(2===e){const e=document.querySelector("#woopay-connect-iframe");return void(e&&(this.iframePostMessage=Promise.resolve((t=>{e.contentWindow.postMessage(t,n("woopayHost"))}))))}if(1===e)return void(this.iframePostMessage=new Promise((e=>{this.listeners.getIframePostMessageCallback=e})));ke(1);const t=document.createElement("div");t.style.visibility="hidden",t.style.position="fixed",t.style.height="0",t.style.width="0",t.style.bottom="0",t.style.right="0",t.id="woopay-connect-iframe-container",document.body.appendChild(t);const r=this;this.iframePostMessage=new Promise((e=>{r.listeners.getIframePostMessageCallback=e})),o().render((0,u.jsx)(Se,{}),t)}injectTemporaryWooPayConnectIframe(){let e;const t=new Promise((t=>{e=t})),r=document.createElement("iframe");return r.id="temp-woopay-connect-iframe",r.src=n("woopayHost")+"/connect/",r.height=0,r.width=0,r.border="none",r.margin=0,r.padding=0,r.overflow="hidden",r.display="block",r.visibility="hidden",r.position="fixed",r.pointerEvents="none",r.userSelect="none",r.addEventListener("load",(()=>{e((e=>r.contentWindow.postMessage(e,n("woopayHost"))))})),document.body.appendChild(r),{resolvePostMessagePromise:t,removeTemporaryIframe:()=>{document.body.removeChild(r)}}}async sendMessageAndListenWith(e,t){const r=new Promise(((e,r)=>{let o=!1;const n=setTimeout((()=>{o=!0,r(new Error("WooPayConnectIframe did not respond within the allotted time."))}),xe());this.listeners[t]=t=>{o||(n&&clearTimeout(n),e(t))}}));if("function"!=typeof this.iframePostMessage?.then)throw new Error("iframePostMessage is not set");return(await this.iframePostMessage)(e),await r}async getPostMessageTimeout(){try{return await this.sendMessageAndListenWith({action:"getPostMessageTimeout"},"getPostMessageTimeoutCallback")}catch(e){return null}}callbackFn(e){switch(e.action){case"get_iframe_post_message_success":this.listeners.getIframePostMessageCallback(e.value);break;case"get_post_message_timeout_success":this.listeners.getPostMessageTimeoutCallback(e.value)}}},Pe=class extends Fe{constructor(){super(),this.listeners={...this.listeners,setRedirectSessionDataCallback:()=>{},setTempThirdPartyCookieCallback:()=>{},getIsWooPayReachableCallback:()=>{},getIsThirdPartyCookiesEnabledCallback:()=>{},setPreemptiveSessionDataCallback:()=>{}}}async isWooPayThirdPartyCookiesEnabled(){const{resolvePostMessagePromise:e,removeTemporaryIframe:t}=this.injectTemporaryWooPayConnectIframe(),r=new Promise(((e,t)=>{let r=!1;const o=setTimeout((()=>{r=!0,t(new Error("WooPayConnectIframe did not respond within the allotted time."))}),xe());this.listeners.setTempThirdPartyCookieCallback=t=>{r||(o&&clearTimeout(o),e(t))}}));if("function"!=typeof e?.then)return!1;const o=await e;o({action:"setTempThirdPartyCookie"});try{if(!await r)return t(),!1}catch(e){return t(),!1}const n=new Promise(((e,t)=>{let r=!1;const o=setTimeout((()=>{r=!0,t(new Error("WooPayConnectIframe did not respond within the allotted time."))}),xe());this.listeners.getIsThirdPartyCookiesEnabledCallback=t=>{r||(o&&clearTimeout(o),e(t))}}));o({action:"getIsThirdPartyCookiesEnabled"});try{return await n}catch(e){return!1}finally{t()}}async sendRedirectSessionDataToWooPay(e){try{return await super.sendMessageAndListenWith({action:"setRedirectSessionData",value:e},"setRedirectSessionDataCallback")}catch(e){return null}}async setPreemptiveSessionData(e){try{return await super.sendMessageAndListenWith({action:"setPreemptiveSessionData",value:e},"setPreemptiveSessionDataCallback")}catch(e){return null}}async isWooPayReachable(){try{return await this.sendMessageAndListenWith({action:"isWooPayReachable"},"getIsWooPayReachableCallback")}catch(e){return!1}}callbackFn(e){switch(super.callbackFn(e),e.action){case"set_redirect_session_data_success":this.listeners.setRedirectSessionDataCallback(e.value);break;case"set_redirect_session_data_error":this.listeners.setRedirectSessionDataCallback({is_error:!0});break;case"set_temp_third_party_cookie_success":this.listeners.setTempThirdPartyCookieCallback(e.value);break;case"get_is_third_party_cookies_enabled_success":this.listeners.getIsThirdPartyCookiesEnabledCallback(e.value);break;case"get_is_woopay_reachable_success":this.listeners.getIsWooPayReachableCallback(e.value);break;case"set_preemptive_session_data_success":this.listeners.setPreemptiveSessionDataCallback(e.value);break;case"set_preemptive_session_data_error":this.listeners.setPreemptiveSessionDataCallback({is_error:!0})}}},Me=class{static sessionConnect;static init(){this.getSessionConnect()}static getSessionConnect(){return this.sessionConnect||(this.sessionConnect=new Pe),this.sessionConnect}static async sendPreemptiveSessionDataToWooPay(e){return this.getSessionConnect().setPreemptiveSessionData(e)}static async getWooPaySessionFromMerchant(e){return f(w(n("wcAjaxUrl"),"get_woopay_session"),e)}},Ee={default:(0,i.__)("WooPay","woocommerce-payments"),buy:(0,i.__)("Buy with WooPay","woocommerce-payments"),donate:(0,i.__)("Donate with WooPay","woocommerce-payments"),book:(0,i.__)("Book with WooPay","woocommerce-payments")},Te=({listenForCartChanges:e,isPreview:t=!1,buttonSettings:r,api:o,isProductPage:a=!1,emailSelector:c="#email"})=>{var h;const f="narrow",g="wide",b=(0,s.useRef)(null),_=(0,s.useRef)(null),y=(0,s.useRef)(!1),{type:w,height:x,size:S,theme:F,context:P,radius:M}=r,[E,T]=(0,s.useState)(!1),[A,j]=(0,s.useState)(g),L=null!==(h=Ee[w||"default"])&&void 0!==h?h:Ee.default,R="dark"===F?d:p,{addToCart:q,getProductData:I}=(e=>({addToCart:t=>e.expressCheckoutAddToCart(t),getProductData:()=>{const e=document.querySelector(".single_add_to_cart_button").value,t=document.querySelector(".bundle_form"),r=document.querySelector(".single_variation_wrap");let o={product_id:e,quantity:document.querySelector(".quantity .qty").value};if(r&&!t)o.product_id=r.querySelector('input[name="product_id"]').value,o.attributes=document.querySelector(".variations_form")?(()=>{const e=document.querySelector(".variations_form")?.querySelectorAll(".variations select"),t={};return e&&e.forEach((e=>{const r=e.name,o=e.value||"";t[r]=o})),t})():[];else{const e=new FormData(document.querySelector("form.cart"));e.delete("add-to-cart");const t={};for(const r of e.entries())t[r[0]]=r[1];o={...o,...t}}const n=document.querySelector("form.cart");return!(n&&(new FormData(n).forEach(((e,t)=>{if(/^(addon-|wc_)/.test(t))if(/\[\]$/.test(t)){const r=t.substring(0,t.length-2);o[r]?o[r].push(e):o[r]=[e]}else o[t]=e})),!(e=>{const t=["wc_gc_giftcard_to","wc_gc_giftcard_from","wc_gc_giftcard_to_multiple"];for(const r of t)if(e.hasOwnProperty(r)&&!e[r])return alert((0,i.__)("Please fill out all required fields","woocommerce-payments")),!1;return e.hasOwnProperty("wc_gc_giftcard_to_multiple")&&!e.wc_gc_giftcard_to_multiple.split(",").every((e=>ye()(e.trim())))?(alert((0,i.__)("Please type only valid emails","woocommerce-payments")),!1):!(e.hasOwnProperty("wc_gc_giftcard_to")&&!ye()(e.wc_gc_giftcard_to)&&(alert((0,i.__)("Please type only valid emails","woocommerce-payments")),1))})(o)))&&o}}))(o),D=(0,s.useRef)(I),W=(0,s.useRef)(q);(0,s.useEffect)((()=>{if(!_.current)return;const e=_.current.getBoundingClientRect().width;j(e>140?g:f)}),[f,g]),(0,s.useEffect)((()=>{t||k("woopay_button_load",{source:P})}),[t,P]);const H=(0,s.useCallback)((()=>{if(!a)return!0;const e=document.querySelector(".single_add_to_cart_button");return!e||!e.disabled&&!e.classList.contains("disabled")||(e.classList.contains("wc-variation-is-unavailable")?window.alert(window?.wc_add_to_cart_variation_params?.i18n_unavailable_text||(0,i.__)("Sorry, this product is unavailable. Please choose a different combination.","woocommerce-payments")):window.alert((0,i.__)("Please select your product options before proceeding.","woocommerce-payments")),!1)}),[a]),O=(0,s.useCallback)((e=>{if(e?.preventDefault(),!t&&(k("woopay_button_click",{source:P}),C(),H()))if(a){const e=D.current();if(!e)return;W.current(e).then((e=>{e.error?e.submit&&document.querySelector("form.cart").submit():be(o,P,c)}))}else be(o,P,c)}),[o,P,c,t,a,H]),$=(0,s.useCallback)((r=>{if(r.preventDefault(),t||y.current)return;if(k("woopay_button_click",{source:P}),C(),!H())return;y.current=!0,T(!0);const o=ge();if(a){const t=D.current();if(!t)return;"function"==typeof e?.stop&&e.stop(),W.current(t).then((()=>{"function"==typeof e?.start&&e.start(),Me.getWooPaySessionFromMerchant({_ajax_nonce:n("woopaySessionNonce"),appearance:me(o)}).then((async e=>{if(!e?.blog_id||!e?.data?.session)throw b.current=O,new Error(e?.data);{const t=await Me.sendPreemptiveSessionDataToWooPay(e);if(t?.is_error)return O(null),b.current=O,y.current=!1,void T(!1);window.location.href=v(t.redirect_url)}})).catch((()=>{const e=(0,i.__)("Something went wrong. Please try again.","woocommerce-payments");m(P,e),y.current=!1,T(!1)}))}))}else Me.getWooPaySessionFromMerchant({_ajax_nonce:n("woopaySessionNonce"),order_id:n("order_id"),key:n("key"),billing_email:n("billing_email"),appearance:me(o)}).then((async e=>{if(!e?.blog_id||!e?.data?.session)throw b.current=O,new Error(e?.data);{const t=await Me.sendPreemptiveSessionDataToWooPay(e);if(t?.is_error)return O(null),b.current=O,y.current=!1,void T(!1);window.location.href=v(t.redirect_url)}}))?.catch((()=>{const e=(0,i.__)("Something went wrong. Please try again.","woocommerce-payments");m(P,e),y.current=!1,T(!1)}))}),[H,P,t,a,e,O]);return(0,s.useEffect)((()=>{n("isWoopayFirstPartyAuthEnabled")?(b.current=$,Me.init()):b.current=O}),[$,O]),(0,s.useEffect)((()=>{const e=e=>{e?.persisted&&(y.current=!1,T(!1))};return window.addEventListener("pageshow",e),()=>{window.removeEventListener("pageshow",e)}}),[]),(0,u.jsx)("button",{ref:_,"aria-label":L,onClick:e=>b.current(e),className:l()("woopay-express-button",{"is-loading":E}),"data-type":w,"data-size":S,"data-theme":F,"data-width-type":A,style:{height:`${x}px`,borderRadius:`${M}px`},disabled:E,type:"button",children:E?(0,u.jsx)("span",{className:"wc-block-components-spinner"}):(0,u.jsx)(u.Fragment,{children:Ce({mixedString:L.replace(Ee.default,"{{wooPayLogo /}}"),components:{wooPayLogo:(0,u.jsx)(R,{})}})})},`${w}-${F}-${S}`)};class Ae{constructor(e,t){this.options=e,this.stripe=null,this.stripePlatform=null,this.request=t,this.isWooPayRequesting=!1}createStripe(e,t,r="",o=[]){const n={locale:t};return r&&(n.stripeAccount=r),o&&(n.betas=o),new Stripe(e,n)}getStripeForUPE(e){return this.options.forceNetworkSavedCards=a("paymentMethodsConfig")[e].forceNetworkSavedCards,this.getStripe()}getStripe(e=!1){const{publishableKey:t,accountId:r,forceNetworkSavedCards:o,locale:n,isStripeLinkEnabled:a}=this.options;if(o&&!e)return this.stripePlatform||(this.stripePlatform=this.createStripe(t,n)),this.stripePlatform;if(!this.stripe){let e=["card_country_event_beta_1"];a&&(e=e.concat(["link_autofill_modal_beta_1"])),this.stripe=this.createStripe(t,n,r,e)}return this.stripe}loadStripe(e=!1){return new Promise((t=>{try{t(this.getStripe(e))}catch(e){t({error:e})}}))}confirmIntent(e,t){const r=e.match(/#wcpay-confirm-(pi|si):(.+):(.+):(.+)$/);if(!r)return!0;const o="si"===r[1];let a=r[2];const i=r[3],s=r[4],c=e.indexOf("order-pay"),l=c>-1&&e.substring(c).match(/\d+/);return l&&(a=l[0]),(()=>{const{locale:e,publishableKey:t}=this.options,r=n("accountIdForIntentConfirmation");return o?this.getStripe().handleNextAction({clientSecret:i}):r?this.createStripe(t,e,r).confirmCardPayment(i):this.getStripe(!0).handleNextAction({clientSecret:i})})().then((e=>{var r;const o=e.paymentIntent&&e.paymentIntent.id||e.setupIntent&&e.setupIntent.id||e.error&&e.error.payment_intent&&e.error.payment_intent.id||e.error.setup_intent&&e.error.setup_intent.id,i=null!==(r=_("ajax_url"))&&void 0!==r?r:n("ajaxUrl");return[this.request(i,{action:"update_order_status",order_id:a,_ajax_nonce:s,intent_id:o,payment_method_id:t||null}),e.error]})).then((([e,t])=>{if(t)throw t;return e.then((e=>{const t="string"==typeof e?JSON.parse(e):e;if(t.error)throw t.error;return t.return_url}))}))}setupIntent(e){return this.request(n("ajaxUrl"),{action:"create_setup_intent","wcpay-payment-method":e,_ajax_nonce:n("createSetupIntentNonce")}).then((e=>{if(!e.success)throw e.data.error;return"succeeded"===e.data.status?e.data:this.getStripe().confirmCardSetup(e.data.client_secret).then((e=>{const{setupIntent:t,error:r}=e;if(r)throw r;return t}))}))}saveUPEAppearance(e,t){return this.request(n("ajaxUrl"),{elements_location:t,appearance:JSON.stringify(e),action:"save_upe_appearance",_ajax_nonce:n("saveUPEAppearanceNonce")}).then((e=>e.data)).catch((e=>{throw e.message?e:new Error(e.statusText)}))}paymentRequestCalculateShippingOptions(e){return this.request(y("get_shipping_options"),{security:_("nonce")?.shipping,is_product_page:_("is_product_page"),...e})}paymentRequestUpdateShippingDetails(e){return this.request(y("update_shipping_method"),{security:_("nonce")?.update_shipping,shipping_method:[e.id],is_product_page:_("is_product_page")})}paymentRequestGetCartDetails(){return this.request(y("get_cart_details"),{security:_("nonce")?.get_cart_details})}paymentRequestAddToCart(e){return this.request(y("add_to_cart"),{security:_("nonce")?.add_to_cart,...e})}paymentRequestEmptyCart(e){return this.request(y("empty_cart"),{security:_("nonce")?.empty_cart,booking_id:e})}paymentRequestGetSelectedProductData(e){return this.request(y("get_selected_product_data"),{security:_("nonce")?.get_selected_product_data,...e})}paymentRequestCreateOrder(e){return this.request(y("create_order"),{_wpnonce:_("nonce")?.checkout,...e})}expressCheckoutECECalculateShippingOptions(e){return this.request(b("get_shipping_options"),{security:g("nonce")?.shipping,is_product_page:g("is_product_page"),...e})}expressCheckoutECECreateOrder(e){return this.request(b("create_order"),{_wpnonce:g("nonce")?.checkout,...e})}expressCheckoutECEPayForOrder(e,t){return this.request(b("pay_for_order"),{_wpnonce:g("nonce")?.pay_for_order,order:e,...t})}initWooPay(e,t){if(!this.isWooPayRequesting){this.isWooPayRequesting=!0;const r=n("wcAjaxUrl"),o=n("initWooPayNonce"),a=ge();return this.request(w(r,"init_woopay"),{_wpnonce:o,appearance:me(a),email:e,user_session:t,order_id:n("order_id"),key:n("key"),billing_email:n("billing_email")}).finally((()=>{this.isWooPayRequesting=!1}))}}expressCheckoutAddToCart(e){const t=n("wcAjaxUrl"),r=n("addToCartNonce");return this.request(w(t,"add_to_cart"),{security:r,...e})}paymentRequestPayForOrder(e,t){return this.request(y("pay_for_order"),{_wpnonce:_("nonce")?.pay_for_order,order:e,...t})}pmmeGetCartData(){return fetch(`${a("storeApiURL")}/cart`,{method:"GET",credentials:"same-origin",headers:{"Content-Type":"application/json"}}).then((e=>{if(!e.ok)throw new Error(e.statusText);return e.json()}))}}const je=[];let Le=null;const Re=()=>{((e={})=>{const t=new Ae({publishableKey:n("publishableKey"),accountId:n("accountId"),forceNetworkSavedCards:n("forceNetworkSavedCards"),locale:n("locale")},f),r=document.getElementById("wcpay-woopay-button");if(r){for(;je.length>0;){const e=je.pop();o().unmountComponentAtNode(e)}je.push(r),o().render((0,u.jsx)(Te,{listenForCartChanges:e,buttonSettings:n("woopayButton"),api:t,isProductPage:!!r.getAttribute("data-product_page"),emailSelector:"#billing_email"}),r)}})(Le)};jQuery((e=>{Le={start:()=>{e(document.body).on("updated_cart_totals updated_checkout",Re)},stop:()=>{e(document.body).off("updated_cart_totals updated_checkout",Re)}},Le.start()})),window.addEventListener("load",Re)})()})();