File "paylater-configurator.js"

Full Path: /home/siazco/grocery.siazco.se/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-paylater-configurator/assets/js/paylater-configurator.js
File size: 31.77 KB
MIME-type: text/plain
Charset: utf-8

(()=>{"use strict";var t={9306:(t,r,e)=>{var n=e(4901),o=e(6823),i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not a function")}},5548:(t,r,e)=>{var n=e(3517),o=e(6823),i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not a constructor")}},3506:(t,r,e)=>{var n=e(3925),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw new i("Can't set "+o(t)+" as a prototype")}},679:(t,r,e)=>{var n=e(1625),o=TypeError;t.exports=function(t,r){if(n(r,t))return t;throw new o("Incorrect invocation")}},8551:(t,r,e)=>{var n=e(34),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not an object")}},9617:(t,r,e)=>{var n=e(5397),o=e(5610),i=e(6198),a=function(t){return function(r,e,a){var c=n(r),u=i(c);if(0===u)return!t&&-1;var s,f=o(a,u);if(t&&e!=e){for(;u>f;)if((s=c[f++])!=s)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===e)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},7680:(t,r,e)=>{var n=e(9504);t.exports=n([].slice)},4428:(t,r,e)=>{var n=e(8227)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,r){try{if(!r&&!o)return!1}catch(t){return!1}var e=!1;try{var i={};i[n]=function(){return{next:function(){return{done:e=!0}}}},t(i)}catch(t){}return e}},2195:(t,r,e)=>{var n=e(9504),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},6955:(t,r,e)=>{var n=e(2140),o=e(4901),i=e(2195),a=e(8227)("toStringTag"),c=Object,u="Arguments"===i(function(){return arguments}());t.exports=n?i:function(t){var r,e,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,r){try{return t[r]}catch(t){}}(r=c(t),a))?e:u?i(r):"Object"===(n=i(r))&&o(r.callee)?"Arguments":n}},7740:(t,r,e)=>{var n=e(9297),o=e(5031),i=e(7347),a=e(4913);t.exports=function(t,r,e){for(var c=o(r),u=a.f,s=i.f,f=0;f<c.length;f++){var p=c[f];n(t,p)||e&&n(e,p)||u(t,p,s(r,p))}}},6699:(t,r,e)=>{var n=e(3724),o=e(4913),i=e(6980);t.exports=n?function(t,r,e){return o.f(t,r,i(1,e))}:function(t,r,e){return t[r]=e,t}},6980:t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},2106:(t,r,e)=>{var n=e(283),o=e(4913);t.exports=function(t,r,e){return e.get&&n(e.get,r,{getter:!0}),e.set&&n(e.set,r,{setter:!0}),o.f(t,r,e)}},6840:(t,r,e)=>{var n=e(4901),o=e(4913),i=e(283),a=e(9433);t.exports=function(t,r,e,c){c||(c={});var u=c.enumerable,s=void 0!==c.name?c.name:r;if(n(e)&&i(e,s,c),c.global)u?t[r]=e:a(r,e);else{try{c.unsafe?t[r]&&(u=!0):delete t[r]}catch(t){}u?t[r]=e:o.f(t,r,{value:e,enumerable:!1,configurable:!c.nonConfigurable,writable:!c.nonWritable})}return t}},9433:(t,r,e)=>{var n=e(4576),o=Object.defineProperty;t.exports=function(t,r){try{o(n,t,{value:r,configurable:!0,writable:!0})}catch(e){n[t]=r}return r}},3724:(t,r,e)=>{var n=e(9039);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4055:(t,r,e)=>{var n=e(4576),o=e(34),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},8727:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},4265:(t,r,e)=>{var n=e(2839);t.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},9544:(t,r,e)=>{var n=e(2839);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},8574:(t,r,e)=>{var n=e(4215);t.exports="NODE"===n},7860:(t,r,e)=>{var n=e(2839);t.exports=/web0s(?!.*chrome)/i.test(n)},2839:(t,r,e)=>{var n=e(4576).navigator,o=n&&n.userAgent;t.exports=o?String(o):""},9519:(t,r,e)=>{var n,o,i=e(4576),a=e(2839),c=i.process,u=i.Deno,s=c&&c.versions||u&&u.version,f=s&&s.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},4215:(t,r,e)=>{var n=e(4576),o=e(2839),i=e(2195),a=function(t){return o.slice(0,t.length)===t};t.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},6193:(t,r,e)=>{var n=e(9504),o=Error,i=n("".replace),a=String(new o("zxcasd").stack),c=/\n\s*at [^:]*:[^\n]*/,u=c.test(a);t.exports=function(t,r){if(u&&"string"==typeof t&&!o.prepareStackTrace)for(;r--;)t=i(t,c,"");return t}},747:(t,r,e)=>{var n=e(6699),o=e(6193),i=e(4659),a=Error.captureStackTrace;t.exports=function(t,r,e,c){i&&(a?a(t,r):n(t,"stack",o(e,c)))}},4659:(t,r,e)=>{var n=e(9039),o=e(6980);t.exports=!n((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",o(1,7)),7!==t.stack)}))},6518:(t,r,e)=>{var n=e(4576),o=e(7347).f,i=e(6699),a=e(6840),c=e(9433),u=e(7740),s=e(2796);t.exports=function(t,r){var e,f,p,v,l,h=t.target,d=t.global,y=t.stat;if(e=d?n:y?n[h]||c(h,{}):n[h]&&n[h].prototype)for(f in r){if(v=r[f],p=t.dontCallGetSet?(l=o(e,f))&&l.value:e[f],!s(d?f:h+(y?".":"#")+f,t.forced)&&void 0!==p){if(typeof v==typeof p)continue;u(v,p)}(t.sham||p&&p.sham)&&i(v,"sham",!0),a(e,f,v,t)}}},9039:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},8745:(t,r,e)=>{var n=e(616),o=Function.prototype,i=o.apply,a=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})},6080:(t,r,e)=>{var n=e(7476),o=e(9306),i=e(616),a=n(n.bind);t.exports=function(t,r){return o(t),void 0===r?t:i?a(t,r):function(){return t.apply(r,arguments)}}},616:(t,r,e)=>{var n=e(9039);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},9565:(t,r,e)=>{var n=e(616),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},350:(t,r,e)=>{var n=e(3724),o=e(9297),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,c=o(i,"name"),u=c&&"something"===function(){}.name,s=c&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:c,PROPER:u,CONFIGURABLE:s}},6706:(t,r,e)=>{var n=e(9504),o=e(9306);t.exports=function(t,r,e){try{return n(o(Object.getOwnPropertyDescriptor(t,r)[e]))}catch(t){}}},7476:(t,r,e)=>{var n=e(2195),o=e(9504);t.exports=function(t){if("Function"===n(t))return o(t)}},9504:(t,r,e)=>{var n=e(616),o=Function.prototype,i=o.call,a=n&&o.bind.bind(i,i);t.exports=n?a:function(t){return function(){return i.apply(t,arguments)}}},7751:(t,r,e)=>{var n=e(4576),o=e(4901);t.exports=function(t,r){return arguments.length<2?(e=n[t],o(e)?e:void 0):n[t]&&n[t][r];var e}},851:(t,r,e)=>{var n=e(6955),o=e(5966),i=e(4117),a=e(6269),c=e(8227)("iterator");t.exports=function(t){if(!i(t))return o(t,c)||o(t,"@@iterator")||a[n(t)]}},81:(t,r,e)=>{var n=e(9565),o=e(9306),i=e(8551),a=e(6823),c=e(851),u=TypeError;t.exports=function(t,r){var e=arguments.length<2?c(t):r;if(o(e))return i(n(e,t));throw new u(a(t)+" is not iterable")}},6933:(t,r,e)=>{var n=e(9504),o=e(4376),i=e(4901),a=e(2195),c=e(655),u=n([].push);t.exports=function(t){if(i(t))return t;if(o(t)){for(var r=t.length,e=[],n=0;n<r;n++){var s=t[n];"string"==typeof s?u(e,s):"number"!=typeof s&&"Number"!==a(s)&&"String"!==a(s)||u(e,c(s))}var f=e.length,p=!0;return function(t,r){if(p)return p=!1,r;if(o(this))return r;for(var n=0;n<f;n++)if(e[n]===t)return r}}}},5966:(t,r,e)=>{var n=e(9306),o=e(4117);t.exports=function(t,r){var e=t[r];return o(e)?void 0:n(e)}},4576:function(t,r,e){var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e.g&&e.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:(t,r,e)=>{var n=e(9504),o=e(8981),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,r){return i(o(t),r)}},421:t=>{t.exports={}},3138:t=>{t.exports=function(t,r){try{1===arguments.length?console.error(t):console.error(t,r)}catch(t){}}},397:(t,r,e)=>{var n=e(7751);t.exports=n("document","documentElement")},5917:(t,r,e)=>{var n=e(3724),o=e(9039),i=e(4055);t.exports=!n&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},7055:(t,r,e)=>{var n=e(9504),o=e(9039),i=e(2195),a=Object,c=n("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?c(t,""):a(t)}:a},3167:(t,r,e)=>{var n=e(4901),o=e(34),i=e(2967);t.exports=function(t,r,e){var a,c;return i&&n(a=r.constructor)&&a!==e&&o(c=a.prototype)&&c!==e.prototype&&i(t,c),t}},3706:(t,r,e)=>{var n=e(9504),o=e(4901),i=e(7629),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},7584:(t,r,e)=>{var n=e(34),o=e(6699);t.exports=function(t,r){n(r)&&"cause"in r&&o(t,"cause",r.cause)}},1181:(t,r,e)=>{var n,o,i,a=e(8622),c=e(4576),u=e(34),s=e(6699),f=e(9297),p=e(7629),v=e(6119),l=e(421),h="Object already initialized",d=c.TypeError,y=c.WeakMap;if(a||p.state){var g=p.state||(p.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,n=function(t,r){if(g.has(t))throw new d(h);return r.facade=t,g.set(t,r),r},o=function(t){return g.get(t)||{}},i=function(t){return g.has(t)}}else{var m=v("state");l[m]=!0,n=function(t,r){if(f(t,m))throw new d(h);return r.facade=t,s(t,m,r),r},o=function(t){return f(t,m)?t[m]:{}},i=function(t){return f(t,m)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(r){var e;if(!u(r)||(e=o(r)).type!==t)throw new d("Incompatible receiver, "+t+" required");return e}}}},4209:(t,r,e)=>{var n=e(8227),o=e(6269),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},4376:(t,r,e)=>{var n=e(2195);t.exports=Array.isArray||function(t){return"Array"===n(t)}},4901:t=>{var r="object"==typeof document&&document.all;t.exports=void 0===r&&void 0!==r?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}},3517:(t,r,e)=>{var n=e(9504),o=e(9039),i=e(4901),a=e(6955),c=e(7751),u=e(3706),s=function(){},f=c("Reflect","construct"),p=/^\s*(?:class|function)\b/,v=n(p.exec),l=!p.test(s),h=function(t){if(!i(t))return!1;try{return f(s,[],t),!0}catch(t){return!1}},d=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return l||!!v(p,u(t))}catch(t){return!0}};d.sham=!0,t.exports=!f||o((function(){var t;return h(h.call)||!h(Object)||!h((function(){t=!0}))||t}))?d:h},2796:(t,r,e)=>{var n=e(9039),o=e(4901),i=/#|\.prototype\./,a=function(t,r){var e=u[c(t)];return e===f||e!==s&&(o(r)?n(r):!!r)},c=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=a.data={},s=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},4117:t=>{t.exports=function(t){return null==t}},34:(t,r,e)=>{var n=e(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},3925:(t,r,e)=>{var n=e(34);t.exports=function(t){return n(t)||null===t}},6395:t=>{t.exports=!1},757:(t,r,e)=>{var n=e(7751),o=e(4901),i=e(1625),a=e(7040),c=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var r=n("Symbol");return o(r)&&i(r.prototype,c(t))}},2652:(t,r,e)=>{var n=e(6080),o=e(9565),i=e(8551),a=e(6823),c=e(4209),u=e(6198),s=e(1625),f=e(81),p=e(851),v=e(9539),l=TypeError,h=function(t,r){this.stopped=t,this.result=r},d=h.prototype;t.exports=function(t,r,e){var y,g,m,b,x,w,S,O=e&&e.that,E=!(!e||!e.AS_ENTRIES),j=!(!e||!e.IS_RECORD),P=!(!e||!e.IS_ITERATOR),T=!(!e||!e.INTERRUPTED),C=n(r,O),N=function(t){return y&&v(y,"normal",t),new h(!0,t)},R=function(t){return E?(i(t),T?C(t[0],t[1],N):C(t[0],t[1])):T?C(t,N):C(t)};if(j)y=t.iterator;else if(P)y=t;else{if(!(g=p(t)))throw new l(a(t)+" is not iterable");if(c(g)){for(m=0,b=u(t);b>m;m++)if((x=R(t[m]))&&s(d,x))return x;return new h(!1)}y=f(t,g)}for(w=j?t.next:y.next;!(S=o(w,y)).done;){try{x=R(S.value)}catch(t){v(y,"throw",t)}if("object"==typeof x&&x&&s(d,x))return x}return new h(!1)}},9539:(t,r,e)=>{var n=e(9565),o=e(8551),i=e(5966);t.exports=function(t,r,e){var a,c;o(t);try{if(!(a=i(t,"return"))){if("throw"===r)throw e;return e}a=n(a,t)}catch(t){c=!0,a=t}if("throw"===r)throw e;if(c)throw a;return o(a),e}},6269:t=>{t.exports={}},6198:(t,r,e)=>{var n=e(8014);t.exports=function(t){return n(t.length)}},283:(t,r,e)=>{var n=e(9504),o=e(9039),i=e(4901),a=e(9297),c=e(3724),u=e(350).CONFIGURABLE,s=e(3706),f=e(1181),p=f.enforce,v=f.get,l=String,h=Object.defineProperty,d=n("".slice),y=n("".replace),g=n([].join),m=c&&!o((function(){return 8!==h((function(){}),"length",{value:8}).length})),b=String(String).split("String"),x=t.exports=function(t,r,e){"Symbol("===d(l(r),0,7)&&(r="["+y(l(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),e&&e.getter&&(r="get "+r),e&&e.setter&&(r="set "+r),(!a(t,"name")||u&&t.name!==r)&&(c?h(t,"name",{value:r,configurable:!0}):t.name=r),m&&e&&a(e,"arity")&&t.length!==e.arity&&h(t,"length",{value:e.arity});try{e&&a(e,"constructor")&&e.constructor?c&&h(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=p(t);return a(n,"source")||(n.source=g(b,"string"==typeof r?r:"")),t};Function.prototype.toString=x((function(){return i(this)&&v(this).source||s(this)}),"toString")},741:t=>{var r=Math.ceil,e=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?e:r)(n)}},1955:(t,r,e)=>{var n,o,i,a,c,u=e(4576),s=e(3389),f=e(6080),p=e(9225).set,v=e(8265),l=e(9544),h=e(4265),d=e(7860),y=e(8574),g=u.MutationObserver||u.WebKitMutationObserver,m=u.document,b=u.process,x=u.Promise,w=s("queueMicrotask");if(!w){var S=new v,O=function(){var t,r;for(y&&(t=b.domain)&&t.exit();r=S.get();)try{r()}catch(t){throw S.head&&n(),t}t&&t.enter()};l||y||d||!g||!m?!h&&x&&x.resolve?((a=x.resolve(void 0)).constructor=x,c=f(a.then,a),n=function(){c(O)}):y?n=function(){b.nextTick(O)}:(p=f(p,u),n=function(){p(O)}):(o=!0,i=m.createTextNode(""),new g(O).observe(i,{characterData:!0}),n=function(){i.data=o=!o}),w=function(t){S.head||n(),S.add(t)}}t.exports=w},6043:(t,r,e)=>{var n=e(9306),o=TypeError,i=function(t){var r,e;this.promise=new t((function(t,n){if(void 0!==r||void 0!==e)throw new o("Bad Promise constructor");r=t,e=n})),this.resolve=n(r),this.reject=n(e)};t.exports.f=function(t){return new i(t)}},2603:(t,r,e)=>{var n=e(655);t.exports=function(t,r){return void 0===t?arguments.length<2?"":r:n(t)}},4913:(t,r,e)=>{var n=e(3724),o=e(5917),i=e(8686),a=e(8551),c=e(6969),u=TypeError,s=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p="enumerable",v="configurable",l="writable";r.f=n?i?function(t,r,e){if(a(t),r=c(r),a(e),"function"==typeof t&&"prototype"===r&&"value"in e&&l in e&&!e[l]){var n=f(t,r);n&&n[l]&&(t[r]=e.value,e={configurable:v in e?e[v]:n[v],enumerable:p in e?e[p]:n[p],writable:!1})}return s(t,r,e)}:s:function(t,r,e){if(a(t),r=c(r),a(e),o)try{return s(t,r,e)}catch(t){}if("get"in e||"set"in e)throw new u("Accessors not supported");return"value"in e&&(t[r]=e.value),t}},7347:(t,r,e)=>{var n=e(3724),o=e(9565),i=e(8773),a=e(6980),c=e(5397),u=e(6969),s=e(9297),f=e(5917),p=Object.getOwnPropertyDescriptor;r.f=n?p:function(t,r){if(t=c(t),r=u(r),f)try{return p(t,r)}catch(t){}if(s(t,r))return a(!o(i.f,t,r),t[r])}},8480:(t,r,e)=>{var n=e(1828),o=e(8727).concat("length","prototype");r.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},3717:(t,r)=>{r.f=Object.getOwnPropertySymbols},1625:(t,r,e)=>{var n=e(9504);t.exports=n({}.isPrototypeOf)},1828:(t,r,e)=>{var n=e(9504),o=e(9297),i=e(5397),a=e(9617).indexOf,c=e(421),u=n([].push);t.exports=function(t,r){var e,n=i(t),s=0,f=[];for(e in n)!o(c,e)&&o(n,e)&&u(f,e);for(;r.length>s;)o(n,e=r[s++])&&(~a(f,e)||u(f,e));return f}},8773:(t,r)=>{var e={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!e.call({1:2},1);r.f=o?function(t){var r=n(this,t);return!!r&&r.enumerable}:e},2967:(t,r,e)=>{var n=e(6706),o=e(34),i=e(7750),a=e(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,e={};try{(t=n(Object.prototype,"__proto__","set"))(e,[]),r=e instanceof Array}catch(t){}return function(e,n){return i(e),a(n),o(e)?(r?t(e,n):e.__proto__=n,e):e}}():void 0)},3179:(t,r,e)=>{var n=e(2140),o=e(6955);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},4270:(t,r,e)=>{var n=e(9565),o=e(4901),i=e(34),a=TypeError;t.exports=function(t,r){var e,c;if("string"===r&&o(e=t.toString)&&!i(c=n(e,t)))return c;if(o(e=t.valueOf)&&!i(c=n(e,t)))return c;if("string"!==r&&o(e=t.toString)&&!i(c=n(e,t)))return c;throw new a("Can't convert object to primitive value")}},5031:(t,r,e)=>{var n=e(7751),o=e(9504),i=e(8480),a=e(3717),c=e(8551),u=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var r=i.f(c(t)),e=a.f;return e?u(r,e(t)):r}},1103:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},916:(t,r,e)=>{var n=e(4576),o=e(550),i=e(4901),a=e(2796),c=e(3706),u=e(8227),s=e(4215),f=e(6395),p=e(9519),v=o&&o.prototype,l=u("species"),h=!1,d=i(n.PromiseRejectionEvent),y=a("Promise",(function(){var t=c(o),r=t!==String(o);if(!r&&66===p)return!0;if(f&&(!v.catch||!v.finally))return!0;if(!p||p<51||!/native code/.test(t)){var e=new o((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((e.constructor={})[l]=n,!(h=e.then((function(){}))instanceof n))return!0}return!(r||"BROWSER"!==s&&"DENO"!==s||d)}));t.exports={CONSTRUCTOR:y,REJECTION_EVENT:d,SUBCLASSING:h}},550:(t,r,e)=>{var n=e(4576);t.exports=n.Promise},3438:(t,r,e)=>{var n=e(8551),o=e(34),i=e(6043);t.exports=function(t,r){if(n(t),o(r)&&r.constructor===t)return r;var e=i.f(t);return(0,e.resolve)(r),e.promise}},537:(t,r,e)=>{var n=e(550),o=e(4428),i=e(916).CONSTRUCTOR;t.exports=i||!o((function(t){n.all(t).then(void 0,(function(){}))}))},1056:(t,r,e)=>{var n=e(4913).f;t.exports=function(t,r,e){e in t||n(t,e,{configurable:!0,get:function(){return r[e]},set:function(t){r[e]=t}})}},8265:t=>{var r=function(){this.head=null,this.tail=null};r.prototype={add:function(t){var r={item:t,next:null},e=this.tail;e?e.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=r},7750:(t,r,e)=>{var n=e(4117),o=TypeError;t.exports=function(t){if(n(t))throw new o("Can't call method on "+t);return t}},3389:(t,r,e)=>{var n=e(4576),o=e(3724),i=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!o)return n[t];var r=i(n,t);return r&&r.value}},7633:(t,r,e)=>{var n=e(7751),o=e(2106),i=e(8227),a=e(3724),c=i("species");t.exports=function(t){var r=n(t);a&&r&&!r[c]&&o(r,c,{configurable:!0,get:function(){return this}})}},687:(t,r,e)=>{var n=e(4913).f,o=e(9297),i=e(8227)("toStringTag");t.exports=function(t,r,e){t&&!e&&(t=t.prototype),t&&!o(t,i)&&n(t,i,{configurable:!0,value:r})}},6119:(t,r,e)=>{var n=e(5745),o=e(3392),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},7629:(t,r,e)=>{var n=e(6395),o=e(4576),i=e(9433),a="__core-js_shared__",c=t.exports=o[a]||i(a,{});(c.versions||(c.versions=[])).push({version:"3.39.0",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:(t,r,e)=>{var n=e(7629);t.exports=function(t,r){return n[t]||(n[t]=r||{})}},2293:(t,r,e)=>{var n=e(8551),o=e(5548),i=e(4117),a=e(8227)("species");t.exports=function(t,r){var e,c=n(t).constructor;return void 0===c||i(e=n(c)[a])?r:o(e)}},4495:(t,r,e)=>{var n=e(9519),o=e(9039),i=e(4576).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},9225:(t,r,e)=>{var n,o,i,a,c=e(4576),u=e(8745),s=e(6080),f=e(4901),p=e(9297),v=e(9039),l=e(397),h=e(7680),d=e(4055),y=e(2812),g=e(9544),m=e(8574),b=c.setImmediate,x=c.clearImmediate,w=c.process,S=c.Dispatch,O=c.Function,E=c.MessageChannel,j=c.String,P=0,T={},C="onreadystatechange";v((function(){n=c.location}));var N=function(t){if(p(T,t)){var r=T[t];delete T[t],r()}},R=function(t){return function(){N(t)}},_=function(t){N(t.data)},D=function(t){c.postMessage(j(t),n.protocol+"//"+n.host)};b&&x||(b=function(t){y(arguments.length,1);var r=f(t)?t:O(t),e=h(arguments,1);return T[++P]=function(){u(r,void 0,e)},o(P),P},x=function(t){delete T[t]},m?o=function(t){w.nextTick(R(t))}:S&&S.now?o=function(t){S.now(R(t))}:E&&!g?(a=(i=new E).port2,i.port1.onmessage=_,o=s(a.postMessage,a)):c.addEventListener&&f(c.postMessage)&&!c.importScripts&&n&&"file:"!==n.protocol&&!v(D)?(o=D,c.addEventListener("message",_,!1)):o=C in d("script")?function(t){l.appendChild(d("script"))[C]=function(){l.removeChild(this),N(t)}}:function(t){setTimeout(R(t),0)}),t.exports={set:b,clear:x}},5610:(t,r,e)=>{var n=e(1291),o=Math.max,i=Math.min;t.exports=function(t,r){var e=n(t);return e<0?o(e+r,0):i(e,r)}},5397:(t,r,e)=>{var n=e(7055),o=e(7750);t.exports=function(t){return n(o(t))}},1291:(t,r,e)=>{var n=e(741);t.exports=function(t){var r=+t;return r!=r||0===r?0:n(r)}},8014:(t,r,e)=>{var n=e(1291),o=Math.min;t.exports=function(t){var r=n(t);return r>0?o(r,9007199254740991):0}},8981:(t,r,e)=>{var n=e(7750),o=Object;t.exports=function(t){return o(n(t))}},2777:(t,r,e)=>{var n=e(9565),o=e(34),i=e(757),a=e(5966),c=e(4270),u=e(8227),s=TypeError,f=u("toPrimitive");t.exports=function(t,r){if(!o(t)||i(t))return t;var e,u=a(t,f);if(u){if(void 0===r&&(r="default"),e=n(u,t,r),!o(e)||i(e))return e;throw new s("Can't convert object to primitive value")}return void 0===r&&(r="number"),c(t,r)}},6969:(t,r,e)=>{var n=e(2777),o=e(757);t.exports=function(t){var r=n(t,"string");return o(r)?r:r+""}},2140:(t,r,e)=>{var n={};n[e(8227)("toStringTag")]="z",t.exports="[object z]"===String(n)},655:(t,r,e)=>{var n=e(6955),o=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},6823:t=>{var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},3392:(t,r,e)=>{var n=e(9504),o=0,i=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},7040:(t,r,e)=>{var n=e(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:(t,r,e)=>{var n=e(3724),o=e(9039);t.exports=n&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},2812:t=>{var r=TypeError;t.exports=function(t,e){if(t<e)throw new r("Not enough arguments");return t}},8622:(t,r,e)=>{var n=e(4576),o=e(4901),i=n.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},8227:(t,r,e)=>{var n=e(4576),o=e(5745),i=e(9297),a=e(3392),c=e(4495),u=e(7040),s=n.Symbol,f=o("wks"),p=u?s.for||s:s&&s.withoutSetter||a;t.exports=function(t){return i(f,t)||(f[t]=c&&i(s,t)?s[t]:p("Symbol."+t)),f[t]}},4601:(t,r,e)=>{var n=e(7751),o=e(9297),i=e(6699),a=e(1625),c=e(2967),u=e(7740),s=e(1056),f=e(3167),p=e(2603),v=e(7584),l=e(747),h=e(3724),d=e(6395);t.exports=function(t,r,e,y){var g="stackTraceLimit",m=y?2:1,b=t.split("."),x=b[b.length-1],w=n.apply(null,b);if(w){var S=w.prototype;if(!d&&o(S,"cause")&&delete S.cause,!e)return w;var O=n("Error"),E=r((function(t,r){var e=p(y?r:t,void 0),n=y?new w(t):new w;return void 0!==e&&i(n,"message",e),l(n,E,n.stack,2),this&&a(S,this)&&f(n,this,E),arguments.length>m&&v(n,arguments[m]),n}));if(E.prototype=S,"Error"!==x?c?c(E,O):u(E,O,{name:!0}):h&&g in w&&(s(E,w,g),s(E,w,"prepareStackTrace")),u(E,w),!d)try{S.name!==x&&i(S,"name",x),S.constructor=E}catch(t){}return E}}},739:(t,r,e)=>{var n=e(6518),o=e(9039),i=e(8981),a=e(2777);n({target:"Date",proto:!0,arity:1,forced:o((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var r=i(this),e=a(r,"number");return"number"!=typeof e||isFinite(e)?r.toISOString():null}})},6280:(t,r,e)=>{var n=e(6518),o=e(4576),i=e(8745),a=e(4601),c="WebAssembly",u=o[c],s=7!==new Error("e",{cause:7}).cause,f=function(t,r){var e={};e[t]=a(t,r,s),n({global:!0,constructor:!0,arity:1,forced:s},e)},p=function(t,r){if(u&&u[t]){var e={};e[t]=a(c+"."+t,r,s),n({target:c,stat:!0,constructor:!0,arity:1,forced:s},e)}};f("Error",(function(t){return function(r){return i(t,this,arguments)}})),f("EvalError",(function(t){return function(r){return i(t,this,arguments)}})),f("RangeError",(function(t){return function(r){return i(t,this,arguments)}})),f("ReferenceError",(function(t){return function(r){return i(t,this,arguments)}})),f("SyntaxError",(function(t){return function(r){return i(t,this,arguments)}})),f("TypeError",(function(t){return function(r){return i(t,this,arguments)}})),f("URIError",(function(t){return function(r){return i(t,this,arguments)}})),p("CompileError",(function(t){return function(r){return i(t,this,arguments)}})),p("LinkError",(function(t){return function(r){return i(t,this,arguments)}})),p("RuntimeError",(function(t){return function(r){return i(t,this,arguments)}}))},3110:(t,r,e)=>{var n=e(6518),o=e(7751),i=e(8745),a=e(9565),c=e(9504),u=e(9039),s=e(4901),f=e(757),p=e(7680),v=e(6933),l=e(4495),h=String,d=o("JSON","stringify"),y=c(/./.exec),g=c("".charAt),m=c("".charCodeAt),b=c("".replace),x=c(1..toString),w=/[\uD800-\uDFFF]/g,S=/^[\uD800-\uDBFF]$/,O=/^[\uDC00-\uDFFF]$/,E=!l||u((function(){var t=o("Symbol")("stringify detection");return"[null]"!==d([t])||"{}"!==d({a:t})||"{}"!==d(Object(t))})),j=u((function(){return'"\\udf06\\ud834"'!==d("\udf06\ud834")||'"\\udead"'!==d("\udead")})),P=function(t,r){var e=p(arguments),n=v(r);if(s(n)||void 0!==t&&!f(t))return e[1]=function(t,r){if(s(n)&&(r=a(n,this,h(t),r)),!f(r))return r},i(d,null,e)},T=function(t,r,e){var n=g(e,r-1),o=g(e,r+1);return y(S,t)&&!y(O,o)||y(O,t)&&!y(S,n)?"\\u"+x(m(t,0),16):t};d&&n({target:"JSON",stat:!0,arity:3,forced:E||j},{stringify:function(t,r,e){var n=p(arguments),o=i(E?P:d,null,n);return j&&"string"==typeof o?b(o,w,T):o}})},6099:(t,r,e)=>{var n=e(2140),o=e(6840),i=e(3179);n||o(Object.prototype,"toString",i,{unsafe:!0})},6499:(t,r,e)=>{var n=e(6518),o=e(9565),i=e(9306),a=e(6043),c=e(1103),u=e(2652);n({target:"Promise",stat:!0,forced:e(537)},{all:function(t){var r=this,e=a.f(r),n=e.resolve,s=e.reject,f=c((function(){var e=i(r.resolve),a=[],c=0,f=1;u(t,(function(t){var i=c++,u=!1;f++,o(e,r,t).then((function(t){u||(u=!0,a[i]=t,--f||n(a))}),s)})),--f||n(a)}));return f.error&&s(f.value),e.promise}})},2003:(t,r,e)=>{var n=e(6518),o=e(6395),i=e(916).CONSTRUCTOR,a=e(550),c=e(7751),u=e(4901),s=e(6840),f=a&&a.prototype;if(n({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(t){return this.then(void 0,t)}}),!o&&u(a)){var p=c("Promise").prototype.catch;f.catch!==p&&s(f,"catch",p,{unsafe:!0})}},436:(t,r,e)=>{var n,o,i,a=e(6518),c=e(6395),u=e(8574),s=e(4576),f=e(9565),p=e(6840),v=e(2967),l=e(687),h=e(7633),d=e(9306),y=e(4901),g=e(34),m=e(679),b=e(2293),x=e(9225).set,w=e(1955),S=e(3138),O=e(1103),E=e(8265),j=e(1181),P=e(550),T=e(916),C=e(6043),N="Promise",R=T.CONSTRUCTOR,_=T.REJECTION_EVENT,D=T.SUBCLASSING,k=j.getterFor(N),L=j.set,F=P&&P.prototype,I=P,A=F,M=s.TypeError,U=s.document,B=s.process,z=C.f,J=z,W=!!(U&&U.createEvent&&s.dispatchEvent),q="unhandledrejection",G=function(t){var r;return!(!g(t)||!y(r=t.then))&&r},$=function(t,r){var e,n,o,i=r.value,a=1===r.state,c=a?t.ok:t.fail,u=t.resolve,s=t.reject,p=t.domain;try{c?(a||(2===r.rejection&&Y(r),r.rejection=1),!0===c?e=i:(p&&p.enter(),e=c(i),p&&(p.exit(),o=!0)),e===t.promise?s(new M("Promise-chain cycle")):(n=G(e))?f(n,e,u,s):u(e)):s(i)}catch(t){p&&!o&&p.exit(),s(t)}},H=function(t,r){t.notified||(t.notified=!0,w((function(){for(var e,n=t.reactions;e=n.get();)$(e,t);t.notified=!1,r&&!t.rejection&&K(t)})))},V=function(t,r,e){var n,o;W?((n=U.createEvent("Event")).promise=r,n.reason=e,n.initEvent(t,!1,!0),s.dispatchEvent(n)):n={promise:r,reason:e},!_&&(o=s["on"+t])?o(n):t===q&&S("Unhandled promise rejection",e)},K=function(t){f(x,s,(function(){var r,e=t.facade,n=t.value;if(X(t)&&(r=O((function(){u?B.emit("unhandledRejection",n,e):V(q,e,n)})),t.rejection=u||X(t)?2:1,r.error))throw r.value}))},X=function(t){return 1!==t.rejection&&!t.parent},Y=function(t){f(x,s,(function(){var r=t.facade;u?B.emit("rejectionHandled",r):V("rejectionhandled",r,t.value)}))},Q=function(t,r,e){return function(n){t(r,n,e)}},Z=function(t,r,e){t.done||(t.done=!0,e&&(t=e),t.value=r,t.state=2,H(t,!0))},tt=function(t,r,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===r)throw new M("Promise can't be resolved itself");var n=G(r);n?w((function(){var e={done:!1};try{f(n,r,Q(tt,e,t),Q(Z,e,t))}catch(r){Z(e,r,t)}})):(t.value=r,t.state=1,H(t,!1))}catch(r){Z({done:!1},r,t)}}};if(R&&(A=(I=function(t){m(this,A),d(t),f(n,this);var r=k(this);try{t(Q(tt,r),Q(Z,r))}catch(t){Z(r,t)}}).prototype,(n=function(t){L(this,{type:N,done:!1,notified:!1,parent:!1,reactions:new E,rejection:!1,state:0,value:null})}).prototype=p(A,"then",(function(t,r){var e=k(this),n=z(b(this,I));return e.parent=!0,n.ok=!y(t)||t,n.fail=y(r)&&r,n.domain=u?B.domain:void 0,0===e.state?e.reactions.add(n):w((function(){$(n,e)})),n.promise})),o=function(){var t=new n,r=k(t);this.promise=t,this.resolve=Q(tt,r),this.reject=Q(Z,r)},C.f=z=function(t){return t===I||void 0===t?new o(t):J(t)},!c&&y(P)&&F!==Object.prototype)){i=F.then,D||p(F,"then",(function(t,r){var e=this;return new I((function(t,r){f(i,e,t,r)})).then(t,r)}),{unsafe:!0});try{delete F.constructor}catch(t){}v&&v(F,A)}a({global:!0,constructor:!0,wrap:!0,forced:R},{Promise:I}),l(I,N,!1,!0),h(N)},3362:(t,r,e)=>{e(436),e(6499),e(2003),e(7743),e(1481),e(280)},7743:(t,r,e)=>{var n=e(6518),o=e(9565),i=e(9306),a=e(6043),c=e(1103),u=e(2652);n({target:"Promise",stat:!0,forced:e(537)},{race:function(t){var r=this,e=a.f(r),n=e.reject,s=c((function(){var a=i(r.resolve);u(t,(function(t){o(a,r,t).then(e.resolve,n)}))}));return s.error&&n(s.value),e.promise}})},1481:(t,r,e)=>{var n=e(6518),o=e(6043);n({target:"Promise",stat:!0,forced:e(916).CONSTRUCTOR},{reject:function(t){var r=o.f(this);return(0,r.reject)(t),r.promise}})},280:(t,r,e)=>{var n=e(6518),o=e(7751),i=e(6395),a=e(550),c=e(916).CONSTRUCTOR,u=e(3438),s=o("Promise"),f=i&&!c;n({target:"Promise",stat:!0,forced:i||c},{resolve:function(t){return u(f&&this===s?a:this,t)}})}},r={};function e(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return t[n].call(i.exports,i,i.exports,e),i.exports}e.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},e.d=(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),e(6280),e(739),e(3110),e(6099),e(3362),document.addEventListener("DOMContentLoaded",(function(){var t=document.querySelector("#mainform"),r=t.querySelector(".form-table").querySelector("#field-pay_later_messaging_heading"),e=t.querySelector(".woocommerce-save-button"),n=PcpPayLaterConfigurator.publishButtonClassName,o=document.createElement("div");o.innerHTML="<div id='messaging-configurator'></div>";var i=o.firstChild;r.parentNode.insertBefore(i,r.nextSibling);var a=!1;e.addEventListener("click",(function(){a||(a=!0,t.querySelector("."+n).click(),e.click(),a=!1)})),fetch(PcpPayLaterConfigurator.ajax.get_config.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"ppc-get-message-config",nonce:PcpPayLaterConfigurator.ajax.get_config.nonce})}).then((function(t){if(!t.ok)throw new Error("HTTP error! Status: ".concat(t.status));return t.json()})).then((function(t){if(t.success){var r=t.data;merchantConfigurators.Messaging({config:r,merchantClientId:PcpPayLaterConfigurator.merchantClientId,partnerClientId:PcpPayLaterConfigurator.partnerClientId,partnerName:"WooCommerce",bnCode:PcpPayLaterConfigurator.bnCode,placements:["cart","checkout","product","shop","home","custom_placement"],styleOverrides:{button:n,header:PcpPayLaterConfigurator.headerClassName,subheader:PcpPayLaterConfigurator.subheaderClassName},onSave:function(t){fetch(PcpPayLaterConfigurator.ajax.save_config.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({nonce:PcpPayLaterConfigurator.ajax.save_config.nonce,config:t})})}})}else console.error("Failed to fetch configuration:",t)})).catch((function(t){console.error("Error fetching configuration:",t)}))}))})();
//# sourceMappingURL=paylater-configurator.js.map