Files
php_assessment_2/wp-content/plugins/woocommerce-payments/dist/express-checkout.js
T

1 line
49 KiB
JavaScript
Raw Normal View History

2025-02-05 23:15:46 +01:00
(()=>{var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{var t;e.g.importScripts&&(t=e.g.location+"");var o=e.g.document;if(!t&&o&&(o.currentScript&&(t=o.currentScript.src),!t)){var n=o.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!t||!/^http(s?):/.test(t));)t=n[r--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t})(),e.p=window.wcpayAssets.url,(()=>{"use strict";const e=window.wp.i18n,t=window.lodash,o=e=>"undefined"!=typeof wcpayConfig?wcpayConfig[e]:n(e),n=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},r=e=>"object"==typeof wcpayExpressCheckoutParams&&wcpayExpressCheckoutParams.hasOwnProperty(e)?wcpayExpressCheckoutParams[e]:"object"==typeof wcpayPaymentRequestParams&&wcpayPaymentRequestParams.hasOwnProperty(e)?wcpayPaymentRequestParams[e]:null,a=e=>r("wc_ajax_url").toString().replace("%%endpoint%%","wcpay_"+e),i=(e,t,o="wcpay_")=>e.toString().replace("%%endpoint%%",o+t),s=["color","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"],c=["fontFamily","fontSize","lineHeight","letterSpacing","fontWeight","fontVariation","textDecoration","textShadow","textTransform","-webkit-font-smoothing","-moz-osx-font-smoothing","transition"],l=["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"],u={".Label":[...s,...c],".Text":[...s,...c],".Input":[...s,...c,...l],".Error":[...s,...c,...l],".Tab":[...s,...c,...l],".TabIcon":[...s],".TabLabel":[...s,...c],".Block":[...s.slice(1),...l.slice(1)],".Container":[...l],".Header":[...s,...l,...c],".Footer":[...s,...l,...c]},d={".Label":u[".Label"],".Label--floating":[...u[".Label"],"transform"],".Input":[...u[".Input"],"outlineColor","outlineWidth","outlineStyle"],".Error":u[".Error"],".Tab":["backgroundColor","color","fontFamily"],".Tab--selected":["outlineColor","outlineWidth","outlineStyle","backgroundColor","color",l],".TabIcon":u[".TabIcon"],".TabIcon--selected":["color"],".TabLabel":u[".TabLabel"],".Block":u[".Block"],".Container":u[".Container"],".Header":u[".Header"],".Footer":u[".Footer"],".Footer--link":u[".Text"],".Text":u[".Text"],".Text--redirect":u[".Text"]};function p(e){return p="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},p(e)}var h=/^\s+/,m=/\s+$/;function f(e,t){if(t=t||{},(e=e||"")instanceof f)return e;if(!(this instanceof f))return new f(e,t);var o=function(e){var t,o,n,r={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(h,"").replace(m,"").toLowerCase();var t,o=!1;if(q[e])e=q[e],o=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=W.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=W.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=W.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=W.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=W.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=W.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=W.hex8.exec(e))?{r:B(t[1]),g:B(t[2]),b:B(t[3]),a:z(t[4]),format:o?"name":"hex8"}:(t=W.hex6.exec(e))?{r:B(t[1]),g:B(t[2]),b:B(t[3]),format:o?"name":"hex"}:(t=W.hex4.exec(e))?{r:B(t[1]+""+t[1]),g:B(t[2]+""+t[2]),b:B(t[3]+""+t[3]),a:z(t[4]+""+t[4]),format:o?"name":"hex8"}:!!(t