@rebilly/instruments 9.32.2 → 9.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [9.33.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v9.32.2...instruments/core-v9.33.0) (2024-04-16)
2
+
3
+
4
+ ### Features
5
+
6
+ * **api-metadata, rebilly-js-sdk:** Update resources based on latest api definitions ([#4628](https://github.com/Rebilly/rebilly/issues/4628)) ([a56cc8c](https://github.com/Rebilly/rebilly/commit/a56cc8c46c1db17f5ec2b38850b942ef9c487f7b))
7
+
1
8
  ## [9.32.2](https://github.com/Rebilly/rebilly/compare/instruments/core-v9.32.1...instruments/core-v9.32.2) (2024-04-15)
2
9
 
3
10
  ## [9.32.1](https://github.com/Rebilly/rebilly/compare/instruments/core-v9.32.0...instruments/core-v9.32.1) (2024-04-15)
package/dist/index.js CHANGED
@@ -24222,7 +24222,7 @@ function handleComputedProperty(options) {
24222
24222
  var _a;
24223
24223
  return Object.assign({}, options, {
24224
24224
  _computed: {
24225
- version: "9.32.1",
24225
+ version: "9.32.2",
24226
24226
  paymentMethodsUrl: ((_a = options._dev) == null ? void 0 : _a.paymentMethodsUrl) ?? "https://forms.secure-payments.app"
24227
24227
  }
24228
24228
  });
@@ -27564,7 +27564,7 @@ class RebillyInstrumentsInstance {
27564
27564
  await show({ componentName, payload });
27565
27565
  }
27566
27566
  get version() {
27567
- return `RebillyInstruments Ver.${"9.32.1"}`;
27567
+ return `RebillyInstruments Ver.${"9.32.2"}`;
27568
27568
  }
27569
27569
  on(eventName, callback) {
27570
27570
  on({ eventName, callback });
package/dist/index.min.js CHANGED
@@ -25,7 +25,7 @@ var RebillyInstruments=function(){"use strict";function e(e,t){const n=Object.cr
25
25
  !function(e,t){!function(e){function t(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length>1){t[0]=t[0].slice(0,-1);for(var r=t.length-1,a=1;a<r;++a)t[a]=t[a].slice(1,-1);return t[r]=t[r].slice(1),t.join("")}return t[0]}function n(e){return"(?:"+e+")"}function r(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function a(e){return e.toUpperCase()}function o(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function s(e,t){var n=e;if(t)for(var r in t)n[r]=t[r];return n}function i(e){var r="[A-Za-z]",a="[0-9]",o=t(a,"[A-Fa-f]"),s=n(n("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+n("%[89A-Fa-f]"+o+"%"+o+o)+"|"+n("%"+o+o)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",l=t("[\\:\\/\\?\\#\\[\\]\\@]",i),c=e?"[\\uE000-\\uF8FF]":"[]",u=t(r,a,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");n(r+t(r,a,"[\\+\\-\\.]")+"*"),n(n(s+"|"+t(u,i,"[\\:]"))+"*");var d=n(n("25[0-5]")+"|"+n("2[0-4]"+a)+"|"+n("1"+a+a)+"|"+n("0?[1-9]"+a)+"|0?0?"+a),p=n(d+"\\."+d+"\\."+d+"\\."+d),m=n(o+"{1,4}"),f=n(n(m+"\\:"+m)+"|"+p),h=n(n(m+"\\:")+"{6}"+f),y=n("\\:\\:"+n(m+"\\:")+"{5}"+f),g=n(n(m)+"?\\:\\:"+n(m+"\\:")+"{4}"+f),b=n(n(n(m+"\\:")+"{0,1}"+m)+"?\\:\\:"+n(m+"\\:")+"{3}"+f),v=n(n(n(m+"\\:")+"{0,2}"+m)+"?\\:\\:"+n(m+"\\:")+"{2}"+f),w=n(n(n(m+"\\:")+"{0,3}"+m)+"?\\:\\:"+m+"\\:"+f),k=n(n(n(m+"\\:")+"{0,4}"+m)+"?\\:\\:"+f),$=n(n(n(m+"\\:")+"{0,5}"+m)+"?\\:\\:"+m),E=n(n(n(m+"\\:")+"{0,6}"+m)+"?\\:\\:"),S=n([h,y,g,b,v,w,k,$,E].join("|")),_=n(n(u+"|"+s)+"+");n("[vV]"+o+"+\\."+t(u,i,"[\\:]")+"+"),n(n(s+"|"+t(u,i))+"*");var P=n(s+"|"+t(u,i,"[\\:\\@]"));return n(n(s+"|"+t(u,i,"[\\@]"))+"+"),n(n(P+"|"+t("[\\/\\?]",c))+"*"),{NOT_SCHEME:new RegExp(t("[^]",r,a,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",u,i),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",u,i),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",u,i),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",u,i),"g"),NOT_QUERY:new RegExp(t("[^\\%]",u,i,"[\\:\\@\\/\\?]",c),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",u,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",u,i),"g"),UNRESERVED:new RegExp(u,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",u,l),"g"),PCT_ENCODED:new RegExp(s,"g"),IPV4ADDRESS:new RegExp("^("+p+")$"),IPV6ADDRESS:new RegExp("^\\[?("+S+")"+n(n("\\%25|\\%(?!"+o+"{2})")+"("+_+")")+"?\\]?$")}}var l=i(!1),c=i(!0),u=function(){function e(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var s,i=e[Symbol.iterator]();!(r=(s=i.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){a=!0,o=l}finally{try{!r&&i.return&&i.return()}finally{if(a)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},p=2147483647,m=36,f=1,h=26,y=38,g=700,b=72,v=128,w="-",k=/^xn--/,$=/[^\0-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=m-f,P=Math.floor,x=String.fromCharCode;function A(e){throw new RangeError(S[e])}function I(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}function R(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+I((e=e.replace(E,".")).split("."),t).join(".")}function T(e){for(var t=[],n=0,r=e.length;n<r;){var a=e.charCodeAt(n++);if(a>=55296&&a<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&a)<<10)+(1023&o)+65536):(t.push(a),n--)}else t.push(a)}return t}var C=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:m},O=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},N=function(e,t,n){var r=0;for(e=n?P(e/g):e>>1,e+=P(e/t);e>_*h>>1;r+=m)e=P(e/_);return P(r+(_+1)*e/(e+y))},L=function(e){var t=[],n=e.length,r=0,a=v,o=b,s=e.lastIndexOf(w);s<0&&(s=0);for(var i=0;i<s;++i)e.charCodeAt(i)>=128&&A("not-basic"),t.push(e.charCodeAt(i));for(var l=s>0?s+1:0;l<n;){for(var c=r,u=1,d=m;;d+=m){l>=n&&A("invalid-input");var y=C(e.charCodeAt(l++));(y>=m||y>P((p-r)/u))&&A("overflow"),r+=y*u;var g=d<=o?f:d>=o+h?h:d-o;if(y<g)break;var k=m-g;u>P(p/k)&&A("overflow"),u*=k}var $=t.length+1;o=N(r-c,$,0==c),P(r/$)>p-a&&A("overflow"),a+=P(r/$),r%=$,t.splice(r++,0,a)}return String.fromCodePoint.apply(String,t)},j=function(e){var t=[],n=(e=T(e)).length,r=v,a=0,o=b,s=!0,i=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(s=(c=u.next()).done);s=!0){var d=c.value;d<128&&t.push(x(d))}}catch(W){i=!0,l=W}finally{try{!s&&u.return&&u.return()}finally{if(i)throw l}}var y=t.length,g=y;for(y&&t.push(w);g<n;){var k=p,$=!0,E=!1,S=void 0;try{for(var _,I=e[Symbol.iterator]();!($=(_=I.next()).done);$=!0){var R=_.value;R>=r&&R<k&&(k=R)}}catch(W){E=!0,S=W}finally{try{!$&&I.return&&I.return()}finally{if(E)throw S}}var C=g+1;k-r>P((p-a)/C)&&A("overflow"),a+=(k-r)*C,r=k;var L=!0,j=!1,F=void 0;try{for(var M,H=e[Symbol.iterator]();!(L=(M=H.next()).done);L=!0){var B=M.value;if(B<r&&++a>p&&A("overflow"),B==r){for(var D=a,q=m;;q+=m){var U=q<=o?f:q>=o+h?h:q-o;if(D<U)break;var z=D-U,V=m-U;t.push(x(O(U+z%V,0))),D=P(z/V)}t.push(x(O(D,0))),o=N(a,C,g==y),a=0,++g}}}catch(W){j=!0,F=W}finally{try{!L&&H.return&&H.return()}finally{if(j)throw F}}++a,++r}return t.join("")},F=function(e){return R(e,(function(e){return k.test(e)?L(e.slice(4).toLowerCase()):e}))},M=function(e){return R(e,(function(e){return $.test(e)?"xn--"+j(e):e}))},H={version:"2.1.0",ucs2:{decode:T,encode:function(e){return String.fromCodePoint.apply(String,d(e))}},decode:L,encode:j,toASCII:M,toUnicode:F},B={};function D(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function q(e){for(var t="",n=0,r=e.length;n<r;){var a=parseInt(e.substr(n+1,2),16);if(a<128)t+=String.fromCharCode(a),n+=3;else if(a>=194&&a<224){if(r-n>=6){var o=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((31&a)<<6|63&o)}else t+=e.substr(n,6);n+=6}else if(a>=224){if(r-n>=9){var s=parseInt(e.substr(n+4,2),16),i=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((15&a)<<12|(63&s)<<6|63&i)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function U(e,t){function n(e){var n=q(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,D).replace(t.PCT_ENCODED,a)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,D).replace(t.PCT_ENCODED,a)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,D).replace(t.PCT_ENCODED,a)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,D).replace(t.PCT_ENCODED,a)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,D).replace(t.PCT_ENCODED,a)),e}function z(e){return e.replace(/^0*(.*)/,"$1")||"0"}function V(e,t){var n=e.match(t.IPV4ADDRESS)||[],r=u(n,2)[1];return r?r.split(".").map(z).join("."):e}function W(e,t){var n=e.match(t.IPV6ADDRESS)||[],r=u(n,3),a=r[1],o=r[2];if(a){for(var s=a.toLowerCase().split("::").reverse(),i=u(s,2),l=i[0],c=i[1],d=c?c.split(":").map(z):[],p=l.split(":").map(z),m=t.IPV4ADDRESS.test(p[p.length-1]),f=m?7:8,h=p.length-f,y=Array(f),g=0;g<f;++g)y[g]=d[g]||p[h+g]||"";m&&(y[f-1]=V(y[f-1],t));var b=y.reduce((function(e,t,n){if(!t||"0"===t){var r=e[e.length-1];r&&r.index+r.length===n?r.length++:e.push({index:n,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],v=void 0;if(b&&b.length>1){var w=y.slice(0,b.index),k=y.slice(b.index+b.length);v=w.join(":")+"::"+k.join(":")}else v=y.join(":");return o&&(v+="%"+o),v}return e}var K=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,G=void 0==="".match(/(){0}/)[1];function J(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=!1!==t.iri?c:l;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var a=e.match(K);if(a){G?(n.scheme=a[1],n.userinfo=a[3],n.host=a[4],n.port=parseInt(a[5],10),n.path=a[6]||"",n.query=a[7],n.fragment=a[8],isNaN(n.port)&&(n.port=a[5])):(n.scheme=a[1]||void 0,n.userinfo=-1!==e.indexOf("@")?a[3]:void 0,n.host=-1!==e.indexOf("//")?a[4]:void 0,n.port=parseInt(a[5],10),n.path=a[6]||"",n.query=-1!==e.indexOf("?")?a[7]:void 0,n.fragment=-1!==e.indexOf("#")?a[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?a[4]:void 0)),n.host&&(n.host=W(V(n.host,r),r)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");var o=B[(t.scheme||n.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)U(n,r);else{if(n.host&&(t.domainHost||o&&o.domainHost))try{n.host=H.toASCII(n.host.replace(r.PCT_ENCODED,q).toLowerCase())}catch(s){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+s}U(n,l)}o&&o.parse&&o.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}function X(e,t){var n=!1!==t.iri?c:l,r=[];return void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host&&r.push(W(V(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,n){return"["+t+(n?"%25"+n:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(r.push(":"),r.push(String(e.port))),r.length?r.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,Z=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(Z))e=e.replace(Z,"/"),t.pop();else if("."===e||".."===e)e="";else{var n=e.match(ee);if(!n)throw new Error("Unexpected dot segment condition");var r=n[0];e=e.slice(r.length),t.push(r)}return t.join("")}function ne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.iri?c:l,r=[],a=B[(t.scheme||e.scheme||"").toLowerCase()];if(a&&a.serialize&&a.serialize(e,t),e.host)if(n.IPV6ADDRESS.test(e.host));else if(t.domainHost||a&&a.domainHost)try{e.host=t.iri?H.toUnicode(e.host):H.toASCII(e.host.replace(n.PCT_ENCODED,q).toLowerCase())}catch(i){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+i}U(e,n),"suffix"!==t.reference&&e.scheme&&(r.push(e.scheme),r.push(":"));var o=X(e,t);if(void 0!==o&&("suffix"!==t.reference&&r.push("//"),r.push(o),e.path&&"/"!==e.path.charAt(0)&&r.push("/")),void 0!==e.path){var s=e.path;t.absolutePath||a&&a.absolutePath||(s=te(s)),void 0===o&&(s=s.replace(/^\/\//,"/%2F")),r.push(s)}return void 0!==e.query&&(r.push("?"),r.push(e.query)),void 0!==e.fragment&&(r.push("#"),r.push(e.fragment)),r.join("")}function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={};return arguments[3]||(e=J(ne(e,n),n),t=J(ne(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=te(t.path||""),r.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=te(t.path||""),r.query=t.query):(t.path?("/"===t.path.charAt(0)?r.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:r.path=t.path:r.path="/"+t.path,r.path=te(r.path)),r.query=t.query):(r.path=e.path,void 0!==t.query?r.query=t.query:r.query=e.query),r.userinfo=e.userinfo,r.host=e.host,r.port=e.port),r.scheme=e.scheme),r.fragment=t.fragment,r}function ae(e,t,n){var r=s({scheme:"null"},n);return ne(re(J(e,r),J(t,r),r,!0),r)}function oe(e,t){return"string"==typeof e?e=ne(J(e,t),t):"object"===r(e)&&(e=J(ne(e,t),t)),e}function se(e,t,n){return"string"==typeof e?e=ne(J(e,n),n):"object"===r(e)&&(e=ne(e,n)),"string"==typeof t?t=ne(J(t,n),n):"object"===r(t)&&(t=ne(t,n)),e===t}function ie(e,t){return e&&e.toString().replace(t&&t.iri?c.ESCAPE:l.ESCAPE,D)}function le(e,t){return e&&e.toString().replace(t&&t.iri?c.PCT_ENCODED:l.PCT_ENCODED,q)}var ce={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var n="https"===String(e.scheme).toLowerCase();return e.port!==(n?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},ue={scheme:"https",domainHost:ce.domainHost,parse:ce.parse,serialize:ce.serialize};function de(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var pe={scheme:"ws",domainHost:!0,parse:function(e,t){var n=e;return n.secure=de(n),n.resourceName=(n.path||"/")+(n.query?"?"+n.query:""),n.path=void 0,n.query=void 0,n},serialize:function(e,t){if(e.port!==(de(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var n=e.resourceName.split("?"),r=u(n,2),a=r[0],o=r[1];e.path=a&&"/"!==a?a:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},me={scheme:"wss",domainHost:pe.domainHost,parse:pe.parse,serialize:pe.serialize},fe={},he="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",ge=n(n("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+n("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+n("%"+ye+ye)),be="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",ve=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",ke=new RegExp(he,"g"),$e=new RegExp(ge,"g"),Ee=new RegExp(t("[^]",be,"[\\.]",'[\\"]',ve),"g"),Se=new RegExp(t("[^]",he,we),"g"),_e=Se;function Pe(e){var t=q(e);return t.match(ke)?t:e}var xe={scheme:"mailto",parse:function(e,t){var n=e,r=n.to=n.path?n.path.split(","):[];if(n.path=void 0,n.query){for(var a=!1,o={},s=n.query.split("&"),i=0,l=s.length;i<l;++i){var c=s[i].split("=");switch(c[0]){case"to":for(var u=c[1].split(","),d=0,p=u.length;d<p;++d)r.push(u[d]);break;case"subject":n.subject=le(c[1],t);break;case"body":n.body=le(c[1],t);break;default:a=!0,o[le(c[0],t)]=le(c[1],t)}}a&&(n.headers=o)}n.query=void 0;for(var m=0,f=r.length;m<f;++m){var h=r[m].split("@");if(h[0]=le(h[0]),t.unicodeSupport)h[1]=le(h[1],t).toLowerCase();else try{h[1]=H.toASCII(le(h[1],t).toLowerCase())}catch(y){n.error=n.error||"Email address's domain name can not be converted to ASCII via punycode: "+y}r[m]=h.join("@")}return n},serialize:function(e,t){var n=e,r=o(e.to);if(r){for(var s=0,i=r.length;s<i;++s){var l=String(r[s]),c=l.lastIndexOf("@"),u=l.slice(0,c).replace($e,Pe).replace($e,a).replace(Ee,D),d=l.slice(c+1);try{d=t.iri?H.toUnicode(d):H.toASCII(le(d,t).toLowerCase())}catch(h){n.error=n.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+h}r[s]=u+"@"+d}n.path=r.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var m=[];for(var f in p)p[f]!==fe[f]&&m.push(f.replace($e,Pe).replace($e,a).replace(Se,D)+"="+p[f].replace($e,Pe).replace($e,a).replace(_e,D));return m.length&&(n.query=m.join("&")),n}},Ae=/^([^\:]+)\:(.*)/,Ie={scheme:"urn",parse:function(e,t){var n=e.path&&e.path.match(Ae),r=e;if(n){var a=t.scheme||r.scheme||"urn",o=n[1].toLowerCase(),s=n[2],i=a+":"+(t.nid||o),l=B[i];r.nid=o,r.nss=s,r.path=void 0,l&&(r=l.parse(r,t))}else r.error=r.error||"URN can not be parsed.";return r},serialize:function(e,t){var n=t.scheme||e.scheme||"urn",r=e.nid,a=n+":"+(t.nid||r),o=B[a];o&&(e=o.serialize(e,t));var s=e,i=e.nss;return s.path=(r||t.nid)+":"+i,s}},Re=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Te={scheme:"urn:uuid",parse:function(e,t){var n=e;return n.uuid=n.nss,n.nss=void 0,t.tolerant||n.uuid&&n.uuid.match(Re)||(n.error=n.error||"UUID is not valid."),n},serialize:function(e,t){var n=e;return n.nss=(e.uuid||"").toLowerCase(),n}};B[ce.scheme]=ce,B[ue.scheme]=ue,B[pe.scheme]=pe,B[me.scheme]=me,B[xe.scheme]=xe,B[Ie.scheme]=Ie,B[Te.scheme]=Te,e.SCHEMES=B,e.pctEncChar=D,e.pctDecChars=q,e.parse=J,e.removeDotSegments=te,e.serialize=ne,e.resolveComponents=re,e.resolve=ae,e.normalize=oe,e.equal=se,e.escapeComponent=ie,e.unescapeComponent=le,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,xy.exports);var Ay=xy.exports;Object.defineProperty(Py,"__esModule",{value:!0});const Iy=Ay;Iy.code='require("ajv/dist/runtime/uri").default',Py.default=Iy,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=wf;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=Ef;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=oy,a=iy,o=jf,s=uy,i=Ef,l=dh,c=Lf,u=Pf,d=_y,p=Py,m=(e,t)=>new RegExp(e,t);m.code="new RegExp";const f=["removeAdditional","useDefaults","coerceTypes"],h=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function b(e){var t,n,r,a,o,s,i,l,c,u,d,f,h,y,g,b,v,w,k,$,E,S,_,P,x;const A=e.strict,I=null===(t=e.code)||void 0===t?void 0:t.optimize,R=!0===I||void 0===I?1:I||0,T=null!==(r=null===(n=e.code)||void 0===n?void 0:n.regExp)&&void 0!==r?r:m,C=null!==(a=e.uriResolver)&&void 0!==a?a:p.default;return{strictSchema:null===(s=null!==(o=e.strictSchema)&&void 0!==o?o:A)||void 0===s||s,strictNumbers:null===(l=null!==(i=e.strictNumbers)&&void 0!==i?i:A)||void 0===l||l,strictTypes:null!==(u=null!==(c=e.strictTypes)&&void 0!==c?c:A)&&void 0!==u?u:"log",strictTuples:null!==(f=null!==(d=e.strictTuples)&&void 0!==d?d:A)&&void 0!==f?f:"log",strictRequired:null!==(y=null!==(h=e.strictRequired)&&void 0!==h?h:A)&&void 0!==y&&y,code:e.code?{...e.code,optimize:R,regExp:T}:{optimize:R,regExp:T},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===(w=e.messages)||void 0===w||w,inlineRefs:null===(k=e.inlineRefs)||void 0===k||k,schemaId:null!==($=e.schemaId)&&void 0!==$?$:"$id",addUsedSchema:null===(E=e.addUsedSchema)||void 0===E||E,validateSchema:null===(S=e.validateSchema)||void 0===S||S,validateFormats:null===(_=e.validateFormats)||void 0===_||_,unicodeRegExp:null===(P=e.unicodeRegExp)||void 0===P||P,int32range:null===(x=e.int32range)||void 0===x||x,uriResolver:C}}class v{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};const{es5:t,lines:n}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:h,es5:t,lines:n}),this.logger=function(e){if(!1===e)return P;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,o.getRules)(),w.call(this,y,e,"NOT SUPPORTED"),w.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=_.call(this),e.formats&&E.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&S.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),$.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:n}=this.opts;let r=d;"id"===n&&(r={...d},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let n;if("string"==typeof e){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);const r=n(t);return"$async"in n||(this.errors=n.errors),r}compile(e,t){const n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await o.call(this,e.$schema);const n=this._addSchema(e,t);return n.validate||s.call(this,n)}async function o(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function s(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return i.call(this,t),await l.call(this,t.missingSchema),s.call(this,e)}}function i({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){const n=await c.call(this,e);this.refs[e]||await o.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,n,r);return this}let a;if("object"==typeof e){const{schemaId:t}=this.opts;if(a=e[t],void 0!==a&&"string"!=typeof a)throw new Error(`schema ${t} must be string`)}return t=(0,l.normalizeId)(t||a),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let n;if(n=e.$schema,void 0!==n&&"string"!=typeof n)throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const r=this.validate(n,e);if(!r&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return r}getSchema(e){let t;for(;"string"==typeof(t=k.call(this,e));)e=t;if(void 0===t){const{schemaId:n}=this.opts,r=new s.SchemaEnv({schema:{},schemaId:n});if(t=s.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=k.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,l.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if("string"==typeof e)n=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(n=(t=e).keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(A.call(this,n,t),!t)return(0,u.eachItem)(n,(e=>I.call(this,e))),this;T.call(this,t);const r={...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(n,0===r.type.length?e=>I.call(this,e,r):e=>r.type.forEach((t=>I.call(this,e,r,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const n of t.rules){const t=n.rules.findIndex((t=>t.keyword===e));t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return e&&0!==e.length?e.map((e=>`${n}${e.instancePath} ${e.message}`)).reduce(((e,n)=>e+t+n)):"No errors"}$dataMetaSchema(e,t){const n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const r of t){const t=r.split("/").slice(1);let a=e;for(const e of t)a=a[e];for(const e in n){const t=n[e];if("object"!=typeof t)continue;const{$data:r}=t.definition,o=a[e];r&&o&&(a[e]=O(o))}}return e}_removeAllSchemas(e,t){for(const n in e){const r=e[n];t&&!t.test(n)||("string"==typeof r?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,a=this.opts.addUsedSchema){let o;const{schemaId:i}=this.opts;if("object"==typeof e)o=e[i];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(void 0!==c)return c;n=(0,l.normalizeId)(o||n);const u=l.getSchemaRefs.call(this,e,n);return c=new s.SchemaEnv({schema:e,schemaId:i,meta:t,baseId:n,localRefs:u}),this._cache.set(c.schema,c),a&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),r&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):s.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,e)}finally{this.opts=t}}}function w(e,t,n,r="error"){for(const a in e){const o=a;o in t&&this.logger[r](`${n}: option ${a}. ${e[o]}`)}}function k(e){return e=(0,l.normalizeId)(e),this.schemas[e]||this.refs[e]}function $(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function E(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function S(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}}function _(){const e={...this.opts};for(const t of f)delete e[t];return e}e.default=v,v.ValidationError=r.default,v.MissingRefError=a.default;const P={log(){},warn(){},error(){}};const x=/^[a-z_$][a-z0-9_$:-]*$/i;function A(e,t){const{RULES:n}=this;if((0,u.eachItem)(e,(e=>{if(n.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!x.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function I(e,t,n){var r;const a=null==t?void 0:t.post;if(n&&a)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let s=a?o.post:o.rules.find((({type:e})=>e===n));if(s||(s={type:n,rules:[]},o.rules.push(s)),o.keywords[e]=!0,!t)return;const i={keyword:e,definition:{...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)}};t.before?R.call(this,s,i,t.before):s.rules.push(i),o.all[e]=i,null===(r=t.implements)||void 0===r||r.forEach((e=>this.addKeyword(e)))}function R(e,t,n){const r=e.rules.findIndex((e=>e.keyword===n));r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function T(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=O(t)),e.validateSchema=this.compile(t,!0))}const C={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function O(e){return{anyOf:[e,C]}}}(vf);var Ry={},Ty={},Cy={};Object.defineProperty(Cy,"__esModule",{value:!0});const Oy={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Cy.default=Oy;var Ny={};Object.defineProperty(Ny,"__esModule",{value:!0}),Ny.callRef=Ny.getValidate=void 0;const Ly=iy,jy=Wf,Fy=Ef,My=xf,Hy=uy,By=Pf,Dy={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:n,it:r}=e,{baseId:a,schemaEnv:o,validateName:s,opts:i,self:l}=r,{root:c}=o;if(("#"===n||"#/"===n)&&a===c.baseId)return function(){if(o===c)return Uy(e,s,o,o.$async);const n=t.scopeValue("root",{ref:c});return Uy(e,Fy._`${n}.validate`,c,c.$async)}();const u=Hy.resolveRef.call(l,c,a,n);if(void 0===u)throw new Ly.default(r.opts.uriResolver,a,n);return u instanceof Hy.SchemaEnv?function(t){const n=qy(e,t);Uy(e,n,t,t.$async)}(u):function(r){const a=t.scopeValue("schema",!0===i.code.source?{ref:r,code:(0,Fy.stringify)(r)}:{ref:r}),o=t.name("valid"),s=e.subschema({schema:r,dataTypes:[],schemaPath:Fy.nil,topSchemaRef:a,errSchemaPath:n},o);e.mergeEvaluated(s),e.ok(o)}(u)}};function qy(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):Fy._`${n.scopeValue("wrapper",{ref:t})}.validate`}function Uy(e,t,n,r){const{gen:a,it:o}=e,{allErrors:s,schemaEnv:i,opts:l}=o,c=l.passContext?My.default.this:Fy.nil;function u(e){const t=Fy._`${e}.errors`;a.assign(My.default.vErrors,Fy._`${My.default.vErrors} === null ? ${t} : ${My.default.vErrors}.concat(${t})`),a.assign(My.default.errors,Fy._`${My.default.vErrors}.length`)}function d(e){var t;if(!o.opts.unevaluated)return;const r=null===(t=null==n?void 0:n.validate)||void 0===t?void 0:t.evaluated;if(!0!==o.props)if(r&&!r.dynamicProps)void 0!==r.props&&(o.props=By.mergeEvaluated.props(a,r.props,o.props));else{const t=a.var("props",Fy._`${e}.evaluated.props`);o.props=By.mergeEvaluated.props(a,t,o.props,Fy.Name)}if(!0!==o.items)if(r&&!r.dynamicItems)void 0!==r.items&&(o.items=By.mergeEvaluated.items(a,r.items,o.items));else{const t=a.var("items",Fy._`${e}.evaluated.items`);o.items=By.mergeEvaluated.items(a,t,o.items,Fy.Name)}}r?function(){if(!i.$async)throw new Error("async schema referenced by sync schema");const n=a.let("valid");a.try((()=>{a.code(Fy._`await ${(0,jy.callValidateCode)(e,t,c)}`),d(t),s||a.assign(n,!0)}),(e=>{a.if(Fy._`!(${e} instanceof ${o.ValidationError})`,(()=>a.throw(e))),u(e),s||a.assign(n,!1)})),e.ok(n)}():e.result((0,jy.callValidateCode)(e,t,c),(()=>d(t)),(()=>u(t)))}Ny.getValidate=qy,Ny.callRef=Uy,Ny.default=Dy,Object.defineProperty(Ty,"__esModule",{value:!0});const zy=Ny,Vy=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Cy.default,zy.default];Ty.default=Vy;var Wy={},Ky={};Object.defineProperty(Ky,"__esModule",{value:!0});const Gy=Ef,Jy=Gy.operators,Xy={maximum:{okStr:"<=",ok:Jy.LTE,fail:Jy.GT},minimum:{okStr:">=",ok:Jy.GTE,fail:Jy.LT},exclusiveMaximum:{okStr:"<",ok:Jy.LT,fail:Jy.GTE},exclusiveMinimum:{okStr:">",ok:Jy.GT,fail:Jy.LTE}},Qy={message:({keyword:e,schemaCode:t})=>Gy.str`must be ${Xy[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>Gy._`{comparison: ${Xy[e].okStr}, limit: ${t}}`},Yy={keyword:Object.keys(Xy),type:"number",schemaType:"number",$data:!0,error:Qy,code(e){const{keyword:t,data:n,schemaCode:r}=e;e.fail$data(Gy._`${n} ${Xy[t].fail} ${r} || isNaN(${n})`)}};Ky.default=Yy;var Zy={};Object.defineProperty(Zy,"__esModule",{value:!0});const eg=Ef,tg={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>eg.str`must be multiple of ${e}`,params:({schemaCode:e})=>eg._`{multipleOf: ${e}}`},code(e){const{gen:t,data:n,schemaCode:r,it:a}=e,o=a.opts.multipleOfPrecision,s=t.let("res"),i=o?eg._`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:eg._`${s} !== parseInt(${s})`;e.fail$data(eg._`(${r} === 0 || (${s} = ${n}/${r}, ${i}))`)}};Zy.default=tg;var ng={},rg={};function ag(e){const t=e.length;let n,r=0,a=0;for(;a<t;)r++,n=e.charCodeAt(a++),n>=55296&&n<=56319&&a<t&&(n=e.charCodeAt(a),56320==(64512&n)&&a++);return r}Object.defineProperty(rg,"__esModule",{value:!0}),rg.default=ag,ag.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(ng,"__esModule",{value:!0});const og=Ef,sg=Pf,ig=rg,lg={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>og.str`must NOT have ${"maxLength"===e?"more":"fewer"} than ${t} characters`,params:({schemaCode:e})=>og._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:r,it:a}=e,o="maxLength"===t?og.operators.GT:og.operators.LT,s=!1===a.opts.unicode?og._`${n}.length`:og._`${(0,sg.useFunc)(e.gen,ig.default)}(${n})`;e.fail$data(og._`${s} ${o} ${r}`)}};ng.default=lg;var cg={};Object.defineProperty(cg,"__esModule",{value:!0});const ug=Wf,dg=Ef,pg={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>dg.str`must match pattern "${e}"`,params:({schemaCode:e})=>dg._`{pattern: ${e}}`},code(e){const{data:t,$data:n,schema:r,schemaCode:a,it:o}=e,s=o.opts.unicodeRegExp?"u":"",i=n?dg._`(new RegExp(${a}, ${s}))`:(0,ug.usePattern)(e,r);e.fail$data(dg._`!${i}.test(${t})`)}};cg.default=pg;var mg={};Object.defineProperty(mg,"__esModule",{value:!0});const fg=Ef,hg={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>fg.str`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${t} properties`,params:({schemaCode:e})=>fg._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:r}=e,a="maxProperties"===t?fg.operators.GT:fg.operators.LT;e.fail$data(fg._`Object.keys(${n}).length ${a} ${r}`)}};mg.default=hg;var yg={};Object.defineProperty(yg,"__esModule",{value:!0});const gg=Wf,bg=Ef,vg=Pf,wg={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>bg.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>bg._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:n,schemaCode:r,data:a,$data:o,it:s}=e,{opts:i}=s;if(!o&&0===n.length)return;const l=n.length>=i.loopRequired;if(s.allErrors?function(){if(l||o)e.block$data(bg.nil,c);else for(const t of n)(0,gg.checkReportMissingProp)(e,t)}():function(){const s=t.let("missing");if(l||o){const n=t.let("valid",!0);e.block$data(n,(()=>function(n,o){e.setParams({missingProperty:n}),t.forOf(n,r,(()=>{t.assign(o,(0,gg.propertyInData)(t,a,n,i.ownProperties)),t.if((0,bg.not)(o),(()=>{e.error(),t.break()}))}),bg.nil)}(s,n))),e.ok(n)}else t.if((0,gg.checkMissingProp)(e,n,s)),(0,gg.reportMissingProp)(e,s),t.else()}(),i.strictRequired){const t=e.parentSchema.properties,{definedProperties:r}=e.it;for(const e of n)if(void 0===(null==t?void 0:t[e])&&!r.has(e)){const t=s.schemaEnv.baseId+s.errSchemaPath;(0,vg.checkStrictMode)(s,`required property "${e}" is not defined at "${t}" (strictRequired)`,s.opts.strictRequired)}}function c(){t.forOf("prop",r,(n=>{e.setParams({missingProperty:n}),t.if((0,gg.noPropertyInData)(t,a,n,i.ownProperties),(()=>e.error()))}))}}};yg.default=wg;var kg={};Object.defineProperty(kg,"__esModule",{value:!0});const $g=Ef,Eg={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>$g.str`must NOT have ${"maxItems"===e?"more":"fewer"} than ${t} items`,params:({schemaCode:e})=>$g._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:r}=e,a="maxItems"===t?$g.operators.GT:$g.operators.LT;e.fail$data($g._`${n}.length ${a} ${r}`)}};kg.default=Eg;var Sg={},_g={};Object.defineProperty(_g,"__esModule",{value:!0});const Pg=ph;Pg.code='require("ajv/dist/runtime/equal").default',_g.default=Pg,Object.defineProperty(Sg,"__esModule",{value:!0});const xg=Lf,Ag=Ef,Ig=Pf,Rg=_g,Tg={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>Ag.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>Ag._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:n,$data:r,schema:a,parentSchema:o,schemaCode:s,it:i}=e;if(!r&&!a)return;const l=t.let("valid"),c=o.items?(0,xg.getSchemaTypes)(o.items):[];function u(r,a){const o=t.name("item"),s=(0,xg.checkDataTypes)(c,o,i.opts.strictNumbers,xg.DataType.Wrong),u=t.const("indices",Ag._`{}`);t.for(Ag._`;${r}--;`,(()=>{t.let(o,Ag._`${n}[${r}]`),t.if(s,Ag._`continue`),c.length>1&&t.if(Ag._`typeof ${o} == "string"`,Ag._`${o} += "_"`),t.if(Ag._`typeof ${u}[${o}] == "number"`,(()=>{t.assign(a,Ag._`${u}[${o}]`),e.error(),t.assign(l,!1).break()})).code(Ag._`${u}[${o}] = ${r}`)}))}function d(r,a){const o=(0,Ig.useFunc)(t,Rg.default),s=t.name("outer");t.label(s).for(Ag._`;${r}--;`,(()=>t.for(Ag._`${a} = ${r}; ${a}--;`,(()=>t.if(Ag._`${o}(${n}[${r}], ${n}[${a}])`,(()=>{e.error(),t.assign(l,!1).break(s)}))))))}e.block$data(l,(function(){const r=t.let("i",Ag._`${n}.length`),a=t.let("j");e.setParams({i:r,j:a}),t.assign(l,!0),t.if(Ag._`${r} > 1`,(()=>(c.length>0&&!c.some((e=>"object"===e||"array"===e))?u:d)(r,a)))}),Ag._`${s} === false`),e.ok(l)}};Sg.default=Tg;var Cg={};Object.defineProperty(Cg,"__esModule",{value:!0});const Og=Ef,Ng=Pf,Lg=_g,jg={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>Og._`{allowedValue: ${e}}`},code(e){const{gen:t,data:n,$data:r,schemaCode:a,schema:o}=e;r||o&&"object"==typeof o?e.fail$data(Og._`!${(0,Ng.useFunc)(t,Lg.default)}(${n}, ${a})`):e.fail(Og._`${o} !== ${n}`)}};Cg.default=jg;var Fg={};Object.defineProperty(Fg,"__esModule",{value:!0});const Mg=Ef,Hg=Pf,Bg=_g,Dg={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>Mg._`{allowedValues: ${e}}`},code(e){const{gen:t,data:n,$data:r,schema:a,schemaCode:o,it:s}=e;if(!r&&0===a.length)throw new Error("enum must have non-empty array");const i=a.length>=s.opts.loopEnum;let l;const c=()=>null!=l?l:l=(0,Hg.useFunc)(t,Bg.default);let u;if(i||r)u=t.let("valid"),e.block$data(u,(function(){t.assign(u,!1),t.forOf("v",o,(e=>t.if(Mg._`${c()}(${n}, ${e})`,(()=>t.assign(u,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",o);u=(0,Mg.or)(...a.map(((t,r)=>function(e,t){const r=a[t];return"object"==typeof r&&null!==r?Mg._`${c()}(${n}, ${e}[${t}])`:Mg._`${n} === ${r}`}(e,r))))}e.pass(u)}};Fg.default=Dg,Object.defineProperty(Wy,"__esModule",{value:!0});const qg=Zy,Ug=ng,zg=cg,Vg=mg,Wg=yg,Kg=kg,Gg=Sg,Jg=Cg,Xg=Fg,Qg=[Ky.default,qg.default,Ug.default,zg.default,Vg.default,Wg.default,Kg.default,Gg.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Jg.default,Xg.default];Wy.default=Qg;var Yg={},Zg={};Object.defineProperty(Zg,"__esModule",{value:!0}),Zg.validateAdditionalItems=void 0;const eb=Ef,tb=Pf,nb={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>eb.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>eb._`{limit: ${e}}`},code(e){const{parentSchema:t,it:n}=e,{items:r}=t;Array.isArray(r)?rb(e,r):(0,tb.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas')}};function rb(e,t){const{gen:n,schema:r,data:a,keyword:o,it:s}=e;s.items=!0;const i=n.const("len",eb._`${a}.length`);if(!1===r)e.setParams({len:t.length}),e.pass(eb._`${i} <= ${t.length}`);else if("object"==typeof r&&!(0,tb.alwaysValidSchema)(s,r)){const r=n.var("valid",eb._`${i} <= ${t.length}`);n.if((0,eb.not)(r),(()=>function(r){n.forRange("i",t.length,i,(t=>{e.subschema({keyword:o,dataProp:t,dataPropType:tb.Type.Num},r),s.allErrors||n.if((0,eb.not)(r),(()=>n.break()))}))}(r))),e.ok(r)}}Zg.validateAdditionalItems=rb,Zg.default=nb;var ab={},ob={};Object.defineProperty(ob,"__esModule",{value:!0}),ob.validateTuple=void 0;const sb=Ef,ib=Pf,lb=Wf,cb={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:n}=e;if(Array.isArray(t))return ub(e,"additionalItems",t);n.items=!0,(0,ib.alwaysValidSchema)(n,t)||e.ok((0,lb.validateArray)(e))}};function ub(e,t,n=e.schema){const{gen:r,parentSchema:a,data:o,keyword:s,it:i}=e;!function(e){const{opts:r,errSchemaPath:a}=i,o=n.length,l=o===e.minItems&&(o===e.maxItems||!1===e[t]);if(r.strictTuples&&!l){const e=`"${s}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${a}"`;(0,ib.checkStrictMode)(i,e,r.strictTuples)}}(a),i.opts.unevaluated&&n.length&&!0!==i.items&&(i.items=ib.mergeEvaluated.items(r,n.length,i.items));const l=r.name("valid"),c=r.const("len",sb._`${o}.length`);n.forEach(((t,n)=>{(0,ib.alwaysValidSchema)(i,t)||(r.if(sb._`${c} > ${n}`,(()=>e.subschema({keyword:s,schemaProp:n,dataProp:n},l))),e.ok(l))}))}ob.validateTuple=ub,ob.default=cb,Object.defineProperty(ab,"__esModule",{value:!0});const db=ob,pb={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,db.validateTuple)(e,"items")};ab.default=pb;var mb={};Object.defineProperty(mb,"__esModule",{value:!0});const fb=Ef,hb=Pf,yb=Wf,gb=Zg,bb={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>fb.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>fb._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:n,it:r}=e,{prefixItems:a}=n;r.items=!0,(0,hb.alwaysValidSchema)(r,t)||(a?(0,gb.validateAdditionalItems)(e,a):e.ok((0,yb.validateArray)(e)))}};mb.default=bb;var vb={};Object.defineProperty(vb,"__esModule",{value:!0});const wb=Ef,kb=Pf,$b={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?wb.str`must contain at least ${e} valid item(s)`:wb.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?wb._`{minContains: ${e}}`:wb._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:n,parentSchema:r,data:a,it:o}=e;let s,i;const{minContains:l,maxContains:c}=r;o.opts.next?(s=void 0===l?1:l,i=c):s=1;const u=t.const("len",wb._`${a}.length`);if(e.setParams({min:s,max:i}),void 0===i&&0===s)return void(0,kb.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==i&&s>i)return(0,kb.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,kb.alwaysValidSchema)(o,n)){let t=wb._`${u} >= ${s}`;return void 0!==i&&(t=wb._`${t} && ${u} <= ${i}`),void e.pass(t)}o.items=!0;const d=t.name("valid");function p(){const e=t.name("_valid"),n=t.let("count",0);m(e,(()=>t.if(e,(()=>function(e){t.code(wb._`${e}++`),void 0===i?t.if(wb._`${e} >= ${s}`,(()=>t.assign(d,!0).break())):(t.if(wb._`${e} > ${i}`,(()=>t.assign(d,!1).break())),1===s?t.assign(d,!0):t.if(wb._`${e} >= ${s}`,(()=>t.assign(d,!0))))}(n)))))}function m(n,r){t.forRange("i",0,u,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:kb.Type.Num,compositeRule:!0},n),r()}))}void 0===i&&1===s?m(d,(()=>t.if(d,(()=>t.break())))):0===s?(t.let(d,!0),void 0!==i&&t.if(wb._`${a}.length > 0`,p)):(t.let(d,!1),p()),e.result(d,(()=>e.reset()))}};vb.default=$b;var Eb={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Ef,n=Pf,r=Wf;e.error={message:({params:{property:e,depsCount:n,deps:r}})=>t.str`must have ${1===n?"property":"properties"} ${r} when property ${e} is present`,params:({params:{property:e,depsCount:n,deps:r,missingProperty:a}})=>t._`{property: ${e},
26
26
  missingProperty: ${a},
27
27
  depsCount: ${n},
28
- deps: ${r}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,n]=function({schema:e}){const t={},n={};for(const r in e){if("__proto__"===r)continue;(Array.isArray(e[r])?t:n)[r]=e[r]}return[t,n]}(e);o(e,t),s(e,n)}};function o(e,n=e.schema){const{gen:a,data:o,it:s}=e;if(0===Object.keys(n).length)return;const i=a.let("missing");for(const l in n){const c=n[l];if(0===c.length)continue;const u=(0,r.propertyInData)(a,o,l,s.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),s.allErrors?a.if(u,(()=>{for(const t of c)(0,r.checkReportMissingProp)(e,t)})):(a.if(t._`${u} && (${(0,r.checkMissingProp)(e,c,i)})`),(0,r.reportMissingProp)(e,i),a.else())}}function s(e,t=e.schema){const{gen:a,data:o,keyword:s,it:i}=e,l=a.name("valid");for(const c in t)(0,n.alwaysValidSchema)(i,t[c])||(a.if((0,r.propertyInData)(a,o,c,i.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:c},l);e.mergeValidEvaluated(t,l)}),(()=>a.var(l,!0))),e.ok(l))}e.validatePropertyDeps=o,e.validateSchemaDeps=s,e.default=a}(Eb);var Sb={};Object.defineProperty(Sb,"__esModule",{value:!0});const _b=Ef,Pb=Pf,xb={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>_b._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:n,data:r,it:a}=e;if((0,Pb.alwaysValidSchema)(a,n))return;const o=t.name("valid");t.forIn("key",r,(n=>{e.setParams({propertyName:n}),e.subschema({keyword:"propertyNames",data:n,dataTypes:["string"],propertyName:n,compositeRule:!0},o),t.if((0,_b.not)(o),(()=>{e.error(!0),a.allErrors||t.break()}))})),e.ok(o)}};Sb.default=xb;var Ab={};Object.defineProperty(Ab,"__esModule",{value:!0});const Ib=Wf,Rb=Ef,Tb=xf,Cb=Pf,Ob={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>Rb._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:n,parentSchema:r,data:a,errsCount:o,it:s}=e;if(!o)throw new Error("ajv implementation error");const{allErrors:i,opts:l}=s;if(s.props=!0,"all"!==l.removeAdditional&&(0,Cb.alwaysValidSchema)(s,n))return;const c=(0,Ib.allSchemaProperties)(r.properties),u=(0,Ib.allSchemaProperties)(r.patternProperties);function d(e){t.code(Rb._`delete ${a}[${e}]`)}function p(r){if("all"===l.removeAdditional||l.removeAdditional&&!1===n)d(r);else{if(!1===n)return e.setParams({additionalProperty:r}),e.error(),void(i||t.break());if("object"==typeof n&&!(0,Cb.alwaysValidSchema)(s,n)){const n=t.name("valid");"failing"===l.removeAdditional?(m(r,n,!1),t.if((0,Rb.not)(n),(()=>{e.reset(),d(r)}))):(m(r,n),i||t.if((0,Rb.not)(n),(()=>t.break())))}}}function m(t,n,r){const a={keyword:"additionalProperties",dataProp:t,dataPropType:Cb.Type.Str};!1===r&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}t.forIn("key",a,(n=>{c.length||u.length?t.if(function(n){let a;if(c.length>8){const e=(0,Cb.schemaRefOrVal)(s,r.properties,"properties");a=(0,Ib.isOwnProperty)(t,e,n)}else a=c.length?(0,Rb.or)(...c.map((e=>Rb._`${n} === ${e}`))):Rb.nil;return u.length&&(a=(0,Rb.or)(a,...u.map((t=>Rb._`${(0,Ib.usePattern)(e,t)}.test(${n})`)))),(0,Rb.not)(a)}(n),(()=>p(n))):p(n)})),e.ok(Rb._`${o} === ${Tb.default.errors}`)}};Ab.default=Ob;var Nb={};Object.defineProperty(Nb,"__esModule",{value:!0});const Lb=wf,jb=Wf,Fb=Pf,Mb=Ab,Hb={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,parentSchema:r,data:a,it:o}=e;"all"===o.opts.removeAdditional&&void 0===r.additionalProperties&&Mb.default.code(new Lb.KeywordCxt(o,Mb.default,"additionalProperties"));const s=(0,jb.allSchemaProperties)(n);for(const d of s)o.definedProperties.add(d);o.opts.unevaluated&&s.length&&!0!==o.props&&(o.props=Fb.mergeEvaluated.props(t,(0,Fb.toHash)(s),o.props));const i=s.filter((e=>!(0,Fb.alwaysValidSchema)(o,n[e])));if(0===i.length)return;const l=t.name("valid");for(const d of i)c(d)?u(d):(t.if((0,jb.propertyInData)(t,a,d,o.opts.ownProperties)),u(d),o.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(l);function c(e){return o.opts.useDefaults&&!o.compositeRule&&void 0!==n[e].default}function u(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},l)}}};Nb.default=Hb;var Bb={};Object.defineProperty(Bb,"__esModule",{value:!0});const Db=Wf,qb=Ef,Ub=Pf,zb=Pf,Vb={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,data:r,parentSchema:a,it:o}=e,{opts:s}=o,i=(0,Db.allSchemaProperties)(n),l=i.filter((e=>(0,Ub.alwaysValidSchema)(o,n[e])));if(0===i.length||l.length===i.length&&(!o.opts.unevaluated||!0===o.props))return;const c=s.strictSchema&&!s.allowMatchingProperties&&a.properties,u=t.name("valid");!0===o.props||o.props instanceof qb.Name||(o.props=(0,zb.evaluatedPropsToName)(t,o.props));const{props:d}=o;function p(e){for(const t in c)new RegExp(e).test(t)&&(0,Ub.checkStrictMode)(o,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function m(n){t.forIn("key",r,(r=>{t.if(qb._`${(0,Db.usePattern)(e,n)}.test(${r})`,(()=>{const a=l.includes(n);a||e.subschema({keyword:"patternProperties",schemaProp:n,dataProp:r,dataPropType:zb.Type.Str},u),o.opts.unevaluated&&!0!==d?t.assign(qb._`${d}[${r}]`,!0):a||o.allErrors||t.if((0,qb.not)(u),(()=>t.break()))}))}))}!function(){for(const e of i)c&&p(e),o.allErrors?m(e):(t.var(u,!0),m(e),t.if(u))}()}};Bb.default=Vb;var Wb={};Object.defineProperty(Wb,"__esModule",{value:!0});const Kb=Pf,Gb={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:n,it:r}=e;if((0,Kb.alwaysValidSchema)(r,n))return void e.fail();const a=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};Wb.default=Gb;var Jb={};Object.defineProperty(Jb,"__esModule",{value:!0});const Xb={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Wf.validateUnion,error:{message:"must match a schema in anyOf"}};Jb.default=Xb;var Qb={};Object.defineProperty(Qb,"__esModule",{value:!0});const Yb=Ef,Zb=Pf,ev={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>Yb._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:n,parentSchema:r,it:a}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(a.opts.discriminator&&r.discriminator)return;const o=n,s=t.let("valid",!1),i=t.let("passing",null),l=t.name("_valid");e.setParams({passing:i}),t.block((function(){o.forEach(((n,r)=>{let o;(0,Zb.alwaysValidSchema)(a,n)?t.var(l,!0):o=e.subschema({keyword:"oneOf",schemaProp:r,compositeRule:!0},l),r>0&&t.if(Yb._`${l} && ${s}`).assign(s,!1).assign(i,Yb._`[${i}, ${r}]`).else(),t.if(l,(()=>{t.assign(s,!0),t.assign(i,r),o&&e.mergeEvaluated(o,Yb.Name)}))}))})),e.result(s,(()=>e.reset()),(()=>e.error(!0)))}};Qb.default=ev;var tv={};Object.defineProperty(tv,"__esModule",{value:!0});const nv=Pf,rv={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:n,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");const a=t.name("valid");n.forEach(((t,n)=>{if((0,nv.alwaysValidSchema)(r,t))return;const o=e.subschema({keyword:"allOf",schemaProp:n},a);e.ok(a),e.mergeEvaluated(o)}))}};tv.default=rv;var av={};Object.defineProperty(av,"__esModule",{value:!0});const ov=Ef,sv=Pf,iv={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>ov.str`must match "${e.ifClause}" schema`,params:({params:e})=>ov._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:n,it:r}=e;void 0===n.then&&void 0===n.else&&(0,sv.checkStrictMode)(r,'"if" without "then" and "else" is ignored');const a=lv(r,"then"),o=lv(r,"else");if(!a&&!o)return;const s=t.let("valid",!0),i=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},i);e.mergeEvaluated(t)}(),e.reset(),a&&o){const n=t.let("ifClause");e.setParams({ifClause:n}),t.if(i,l("then",n),l("else",n))}else a?t.if(i,l("then")):t.if((0,ov.not)(i),l("else"));function l(n,r){return()=>{const a=e.subschema({keyword:n},i);t.assign(s,i),e.mergeValidEvaluated(a,s),r?t.assign(r,ov._`${n}`):e.setParams({ifClause:n})}}e.pass(s,(()=>e.error(!0)))}};function lv(e,t){const n=e.schema[t];return void 0!==n&&!(0,sv.alwaysValidSchema)(e,n)}av.default=iv;var cv={};Object.defineProperty(cv,"__esModule",{value:!0});const uv=Pf,dv={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){void 0===t.if&&(0,uv.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};cv.default=dv,Object.defineProperty(Yg,"__esModule",{value:!0});const pv=Zg,mv=ab,fv=ob,hv=mb,yv=vb,gv=Eb,bv=Sb,vv=Ab,wv=Nb,kv=Bb,$v=Wb,Ev=Jb,Sv=Qb,_v=tv,Pv=av,xv=cv;Yg.default=function(e=!1){const t=[$v.default,Ev.default,Sv.default,_v.default,Pv.default,xv.default,bv.default,vv.default,gv.default,wv.default,kv.default];return e?t.push(mv.default,hv.default):t.push(pv.default,fv.default),t.push(yv.default),t};var Av={},Iv={};Object.defineProperty(Iv,"__esModule",{value:!0});const Rv=Ef,Tv={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>Rv.str`must match format "${e}"`,params:({schemaCode:e})=>Rv._`{format: ${e}}`},code(e,t){const{gen:n,data:r,$data:a,schema:o,schemaCode:s,it:i}=e,{opts:l,errSchemaPath:c,schemaEnv:u,self:d}=i;l.validateFormats&&(a?function(){const a=n.scopeValue("formats",{ref:d.formats,code:l.code.formats}),o=n.const("fDef",Rv._`${a}[${s}]`),i=n.let("fType"),c=n.let("format");n.if(Rv._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>n.assign(i,Rv._`${o}.type || "string"`).assign(c,Rv._`${o}.validate`)),(()=>n.assign(i,Rv._`"string"`).assign(c,o))),e.fail$data((0,Rv.or)(!1===l.strictSchema?Rv.nil:Rv._`${s} && !${c}`,function(){const e=u.$async?Rv._`(${o}.async ? await ${c}(${r}) : ${c}(${r}))`:Rv._`${c}(${r})`,n=Rv._`(typeof ${c} == "function" ? ${e} : ${c}.test(${r}))`;return Rv._`${c} && ${c} !== true && ${i} === ${t} && !${n}`}()))}():function(){const a=d.formats[o];if(!a)return void function(){if(!1===l.strictSchema)return void d.logger.warn(e());throw new Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${c}"`}}();if(!0===a)return;const[s,i,p]=function(e){const t=e instanceof RegExp?(0,Rv.regexpCode)(e):l.code.formats?Rv._`${l.code.formats}${(0,Rv.getProperty)(o)}`:void 0,r=n.scopeValue("formats",{key:o,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,Rv._`${r}.validate`];return["string",e,r]}(a);s===t&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!u.$async)throw new Error("async format in sync schema");return Rv._`await ${p}(${r})`}return"function"==typeof i?Rv._`${p}(${r})`:Rv._`${p}.test(${r})`}())}())}};Iv.default=Tv,Object.defineProperty(Av,"__esModule",{value:!0});const Cv=[Iv.default];Av.default=Cv;var Ov={};Object.defineProperty(Ov,"__esModule",{value:!0}),Ov.contentVocabulary=Ov.metadataVocabulary=void 0,Ov.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Ov.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(Ry,"__esModule",{value:!0});const Nv=Wy,Lv=Yg,jv=Av,Fv=Ov,Mv=[Ty.default,Nv.default,(0,Lv.default)(),jv.default,Fv.metadataVocabulary,Fv.contentVocabulary];Ry.default=Mv;var Hv={},Bv={};Object.defineProperty(Bv,"__esModule",{value:!0}),Bv.dynamicAnchor=void 0;const Dv=Ef,qv=xf,Uv=uy,zv=Ny,Vv={keyword:"$dynamicAnchor",schemaType:"string",code:e=>Wv(e,e.schema)};function Wv(e,t){const{gen:n,it:r}=e;r.schemaEnv.root.dynamicAnchors[t]=!0;const a=Dv._`${qv.default.dynamicAnchors}${(0,Dv.getProperty)(t)}`,o="#"===r.errSchemaPath?r.validateName:function(e){const{schemaEnv:t,schema:n,self:r}=e.it,{root:a,baseId:o,localRefs:s,meta:i}=t.root,{schemaId:l}=r.opts,c=new Uv.SchemaEnv({schema:n,schemaId:l,root:a,baseId:o,localRefs:s,meta:i});return Uv.compileSchema.call(r,c),(0,zv.getValidate)(e,c)}(e);n.if(Dv._`!${a}`,(()=>n.assign(a,o)))}Bv.dynamicAnchor=Wv,Bv.default=Vv;var Kv={};Object.defineProperty(Kv,"__esModule",{value:!0}),Kv.dynamicRef=void 0;const Gv=Ef,Jv=xf,Xv=Ny,Qv={keyword:"$dynamicRef",schemaType:"string",code:e=>Yv(e,e.schema)};function Yv(e,t){const{gen:n,keyword:r,it:a}=e;if("#"!==t[0])throw new Error(`"${r}" only supports hash fragment reference`);const o=t.slice(1);if(a.allErrors)s();else{const t=n.let("valid",!1);s(t),e.ok(t)}function s(e){if(a.schemaEnv.root.dynamicAnchors[o]){const t=n.let("_v",Gv._`${Jv.default.dynamicAnchors}${(0,Gv.getProperty)(o)}`);n.if(t,i(t,e),i(a.validateName,e))}else i(a.validateName,e)()}function i(t,r){return r?()=>n.block((()=>{(0,Xv.callRef)(e,t),n.let(r,!0)})):()=>(0,Xv.callRef)(e,t)}}Kv.dynamicRef=Yv,Kv.default=Qv;var Zv={};Object.defineProperty(Zv,"__esModule",{value:!0});const ew=Bv,tw=Pf,nw={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,ew.dynamicAnchor)(e,""):(0,tw.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};Zv.default=nw;var rw={};Object.defineProperty(rw,"__esModule",{value:!0});const aw=Kv,ow={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,aw.dynamicRef)(e,e.schema)};rw.default=ow,Object.defineProperty(Hv,"__esModule",{value:!0});const sw=Kv,iw=Zv,lw=rw,cw=[Bv.default,sw.default,iw.default,lw.default];Hv.default=cw;var uw={},dw={};Object.defineProperty(dw,"__esModule",{value:!0});const pw=Eb,mw={keyword:"dependentRequired",type:"object",schemaType:"object",error:pw.error,code:e=>(0,pw.validatePropertyDeps)(e)};dw.default=mw;var fw={};Object.defineProperty(fw,"__esModule",{value:!0});const hw=Eb,yw={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,hw.validateSchemaDeps)(e)};fw.default=yw;var gw={};Object.defineProperty(gw,"__esModule",{value:!0});const bw=Pf,vw={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:n}){void 0===t.contains&&(0,bw.checkStrictMode)(n,`"${e}" without "contains" is ignored`)}};gw.default=vw,Object.defineProperty(uw,"__esModule",{value:!0});const ww=fw,kw=gw,$w=[dw.default,ww.default,kw.default];uw.default=$w;var Ew={},Sw={};Object.defineProperty(Sw,"__esModule",{value:!0});const _w=Ef,Pw=Pf,xw=xf,Aw={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:e})=>_w._`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){const{gen:t,schema:n,data:r,errsCount:a,it:o}=e;if(!a)throw new Error("ajv implementation error");const{allErrors:s,props:i}=o;function l(r){if(!1===n)return e.setParams({unevaluatedProperty:r}),e.error(),void(s||t.break());if(!(0,Pw.alwaysValidSchema)(o,n)){const n=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:r,dataPropType:Pw.Type.Str},n),s||t.if((0,_w.not)(n),(()=>t.break()))}}i instanceof _w.Name?t.if(_w._`${i} !== true`,(()=>t.forIn("key",r,(e=>t.if(function(e,t){return _w._`!${e} || !${e}[${t}]`}(i,e),(()=>l(e))))))):!0!==i&&t.forIn("key",r,(e=>void 0===i?l(e):t.if(function(e,t){const n=[];for(const r in e)!0===e[r]&&n.push(_w._`${t} !== ${r}`);return(0,_w.and)(...n)}(i,e),(()=>l(e))))),o.props=!0,e.ok(_w._`${a} === ${xw.default.errors}`)}};Sw.default=Aw;var Iw={};Object.defineProperty(Iw,"__esModule",{value:!0});const Rw=Ef,Tw=Pf,Cw={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:e}})=>Rw.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>Rw._`{limit: ${e}}`},code(e){const{gen:t,schema:n,data:r,it:a}=e,o=a.items||0;if(!0===o)return;const s=t.const("len",Rw._`${r}.length`);if(!1===n)e.setParams({len:o}),e.fail(Rw._`${s} > ${o}`);else if("object"==typeof n&&!(0,Tw.alwaysValidSchema)(a,n)){const n=t.var("valid",Rw._`${s} <= ${o}`);t.if((0,Rw.not)(n),(()=>function(n,r){t.forRange("i",r,s,(r=>{e.subschema({keyword:"unevaluatedItems",dataProp:r,dataPropType:Tw.Type.Num},n),a.allErrors||t.if((0,Rw.not)(n),(()=>t.break()))}))}(n,o))),e.ok(n)}a.items=!0}};Iw.default=Cw,Object.defineProperty(Ew,"__esModule",{value:!0});const Ow=Iw,Nw=[Sw.default,Ow.default];Ew.default=Nw;var Lw={},jw={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(t=e.DiscrError||(e.DiscrError={})).Tag="tag",t.Mapping="mapping"}(jw),Object.defineProperty(Lw,"__esModule",{value:!0});const Fw=Ef,Mw=jw,Hw=uy,Bw=Pf,Dw={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===Mw.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>Fw._`{error: ${e}, tag: ${n}, tagValue: ${t}}`},code(e){const{gen:t,data:n,schema:r,parentSchema:a,it:o}=e,{oneOf:s}=a;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");const i=r.propertyName;if("string"!=typeof i)throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",!1),c=t.const("tag",Fw._`${n}${(0,Fw.getProperty)(i)}`);function u(n){const r=t.name("valid"),a=e.subschema({keyword:"oneOf",schemaProp:n},r);return e.mergeEvaluated(a,Fw.Name),r}t.if(Fw._`typeof ${c} == "string"`,(()=>function(){const n=function(){var e;const t={},n=l(a);let r=!0;for(let a=0;a<s.length;a++){let t=s[a];(null==t?void 0:t.$ref)&&!(0,Bw.schemaHasRulesButRef)(t,o.self.RULES)&&(t=Hw.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,null==t?void 0:t.$ref),t instanceof Hw.SchemaEnv&&(t=t.schema));const u=null===(e=null==t?void 0:t.properties)||void 0===e?void 0:e[i];if("object"!=typeof u)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${i}"`);r=r&&(n||l(t)),c(u,a)}if(!r)throw new Error(`discriminator: "${i}" must be required`);return t;function l({required:e}){return Array.isArray(e)&&e.includes(i)}function c(e,t){if(e.const)u(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${i}" must have "const" or "enum"`);for(const n of e.enum)u(n,t)}}function u(e,n){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${i}" values must be unique strings`);t[e]=n}}();t.if(!1);for(const e in n)t.elseIf(Fw._`${c} === ${e}`),t.assign(l,u(n[e]));t.else(),e.error(!1,{discrError:Mw.DiscrError.Mapping,tag:c,tagName:i}),t.endIf()}()),(()=>e.error(!1,{discrError:Mw.DiscrError.Tag,tag:c,tagName:i}))),e.ok(l)}};Lw.default=Dw;var qw={};const Uw={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}},zw={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}},Vw={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}},Ww={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}},Kw={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}},Gw={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},Jw={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};Object.defineProperty(qw,"__esModule",{value:!0});const Xw=Uw,Qw=zw,Yw=Vw,Zw=Ww,ek=Kw,tk=Gw,nk=Jw,rk=["/properties"];qw.default=function(e){return[Xw,Qw,Yw,Zw,t(this,ek),tk,t(this,nk)].forEach((e=>this.addMetaSchema(e,void 0,!1))),this;function t(t,n){return e?t.$dataMetaSchema(n,rk):n}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=vf,r=Ry,a=Hv,o=uw,s=Ew,i=Lw,l=qw,c="https://json-schema.org/draft/2019-09/schema";class u extends n.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(a.default),r.default.forEach((e=>this.addVocabulary(e))),this.addVocabulary(o.default),this.addVocabulary(s.default),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(l.default.call(this,e),this.refs["http://json-schema.org/schema"]=c)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var d=wf;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var p=Ef;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}});var m=oy;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return m.default}});var f=iy;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}(bf,bf.exports);const ak=ve(bf.exports),ok={type:"array",items:{type:"object",properties:{planId:{type:"string"},quantity:{type:"number"},thumbnail:{type:"string"}},required:["planId","quantity"]},default:[]},sk={type:"object",patternProperties:{"^[a-z]{2}(-[A-Z]{2})?$":{type:"object",properties:{summary:{type:"object"},form:{type:"object"},confirmation:{type:"object"},result:{type:"object"},validations:{type:"object"},paymentMethods:{type:"object"}},required:[]}},required:[]},ik={type:"object",properties:{colorPrimary:{type:"string",default:"#0044d4"},colorBackground:{type:"string",default:"#FFFFFF"},colorText:{type:"string",default:"#0D2B3E"},colorDanger:{type:"string",default:"#CD5C5C"},borderRadius:{type:"string",default:"4px"},labels:{type:"string",enum:["stacked","floating"],default:"stacked"},fontFamily:{type:"string",default:"-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial sans-serif"},fontSizeBase:{type:"string",default:"16px"},fontWeightBase:{type:"string",default:"400"},fontLineHeightBase:{type:"string",default:"24px"},fontSmooth:{type:"string",enum:["auto","never","always"],default:"auto"},headingFontFamily:{type:"string"},headingFontWeight:{type:"string",default:"500"},headingColorText:{type:"string"},buttonColorBackground:{type:"string"},buttonColorText:{type:"string",default:"#FFFFFF"},buttonFontFamily:{type:"string"},buttonFontSize:{type:"string"},buttonFontLineHeight:{type:"string"},buttonFontWeight:{type:"string"},buttonBorder:{type:"string",default:"1px solid transparent"},buttonBorderColor:{type:"string"},buttonBorderWidth:{type:"string"},buttonBorderType:{type:"string"},buttonBorderRadius:{type:"string"},buttonBoxShadow:{type:"string",default:"none"},buttonSecondaryColorText:{type:"string"},buttonSecondaryFontFamily:{type:"string"},buttonSecondaryFontSize:{type:"string"},buttonSecondaryFontLineHeight:{type:"string"},buttonSecondaryFontWeight:{type:"string"},buttonSecondaryBorder:{type:"string"},buttonSecondaryBorderColor:{type:"string"},buttonSecondaryBorderWidth:{type:"string"},buttonSecondaryBorderType:{type:"string"},buttonSecondaryBorderRadius:{type:"string"},buttonSecondaryBoxShadow:{type:"string",default:"none"},buttonHoverColorBackground:{type:"string"},buttonHoverColorText:{type:"string"},buttonHoverFontFamily:{type:"string"},buttonHoverFontSize:{type:"string"},buttonHoverFontLineHeight:{type:"string"},buttonHoverFontWeight:{type:"string"},buttonHoverBorder:{type:"string"},buttonHoverBorderColor:{type:"string"},buttonHoverBorderWidth:{type:"string"},buttonHoverBorderType:{type:"string"},buttonHoverBorderRadius:{type:"string"},buttonHoverBoxShadow:{type:"string",default:"none"},buttonSecondaryHoverColorBackground:{type:"string"},buttonSecondaryHoverColorText:{type:"string"},buttonSecondaryHoverFontFamily:{type:"string"},buttonSecondaryHoverFontSize:{type:"string"},buttonSecondaryHoverFontLineHeight:{type:"string"},buttonSecondaryHoverFontWeight:{type:"string"},buttonSecondaryHoverBorder:{type:"string"},buttonSecondaryHoverBorderColor:{type:"string"},buttonSecondaryHoverBorderWidth:{type:"string"},buttonSecondaryHoverBorderType:{type:"string"},buttonSecondaryHoverBorderRadius:{type:"string"},buttonSecondaryHoverBoxShadow:{type:"string",default:"none"},buttonActiveColorBackground:{type:"string"},buttonActiveColorText:{type:"string"},buttonActiveFontFamily:{type:"string"},buttonActiveFontSize:{type:"string"},buttonActiveFontLineHeight:{type:"string"},buttonActiveFontWeight:{type:"string"},buttonActiveBorder:{type:"string"},buttonActiveBorderColor:{type:"string"},buttonActiveBorderWidth:{type:"string"},buttonActiveBorderType:{type:"string"},buttonActiveBorderRadius:{type:"string"},buttonActiveBoxShadow:{type:"string",default:"none"},buttonSecondaryActiveColorBackground:{type:"string"},buttonSecondaryActiveColorText:{type:"string"},buttonSecondaryActiveFontFamily:{type:"string"},buttonSecondaryActiveFontSize:{type:"string"},buttonSecondaryActiveFontLineHeight:{type:"string"},buttonSecondaryActiveFontWeight:{type:"string"},buttonSecondaryActiveBorder:{type:"string"},buttonSecondaryActiveBorderColor:{type:"string"},buttonSecondaryActiveBorderWidth:{type:"string"},buttonSecondaryActiveBorderType:{type:"string"},buttonSecondaryActiveBorderRadius:{type:"string"},buttonSecondaryActiveBoxShadow:{type:"string",default:"none"},inputColorBackground:{type:"string"},inputColorText:{type:"string"},inputFontFamily:{type:"string"},inputFontSize:{type:"string"},inputFontLineHeight:{type:"string"},inputFontWeight:{type:"string"},inputBorder:{type:"string"},inputBorderRadius:{type:"string"},inputBoxShadow:{type:"string"},inputHoverColorBackground:{type:"string"},inputHoverColorText:{type:"string"},inputHoverFontFamily:{type:"string"},inputHoverFontSize:{type:"string"},inputHoverFontLineHeight:{type:"string"},inputHoverFontWeight:{type:"string"},inputHoverBorder:{type:"string"},inputHoverBorderRadius:{type:"string"},inputHoverBoxShadow:{type:"string"},inputFocusColorBackground:{type:"string"},inputFocusColorText:{type:"string"},inputFocusFontFamily:{type:"string"},inputFocusFontSize:{type:"string"},inputFocusFontLineHeight:{type:"string"},inputFocusFontWeight:{type:"string"},inputFocusBorder:{type:"string"},inputFocusBorderRadius:{type:"string"},inputFocusBoxShadow:{type:"string"},inputPlaceholderColorText:{type:"string"},inputPlaceholderFontFamily:{type:"string"},inputPlaceholderFontSize:{type:"string"},inputPlaceholderFontLineHeight:{type:"string"},inputPlaceholderFontWeight:{type:"string"},inputSelectionColorText:{type:"string"},inputSelectionColorBackground:{type:"string"},inputErrorColorBackground:{type:"string"},inputErrorColorText:{type:"string"},inputErrorFontFamily:{type:"string"},inputErrorFontSize:{type:"string"},inputErrorFontLineHeight:{type:"string"},inputErrorFontWeight:{type:"string"},inputErrorBorder:{type:"string"},inputErrorBorderRadius:{type:"string"},inputErrorBoxShadow:{type:"string"},inputErrorHoverColorBackground:{type:"string"},inputErrorHoverColorText:{type:"string"},inputErrorHoverFontFamily:{type:"string"},inputErrorHoverFontSize:{type:"string"},inputErrorHoverFontLineHeight:{type:"string"},inputErrorHoverFontWeight:{type:"string"},inputErrorHoverBorder:{type:"string"},inputErrorHoverBorderRadius:{type:"string"},inputErrorHoverBoxShadow:{type:"string"},inputErrorFocusColorBackground:{type:"string"},inputErrorFocusColorText:{type:"string"},inputErrorFocusFontFamily:{type:"string"},inputErrorFocusFontSize:{type:"string"},inputErrorFocusFontLineHeight:{type:"string"},inputErrorFocusFontWeight:{type:"string"},inputErrorFocusBorder:{type:"string"},inputErrorFocusBorderRadius:{type:"string"},inputErrorFocusBoxShadow:{type:"string"},inputErrorPlaceholderColorText:{type:"string"},inputErrorPlaceholderFontFamily:{type:"string"},inputErrorPlaceholderFontSize:{type:"string"},inputErrorPlaceholderFontLineHeight:{type:"string"},inputErrorPlaceholderFontWeight:{type:"string"},inputErrorSelectionColorText:{type:"string"},inputErrorSelectionColorBackground:{type:"string"}},default:{},required:[]},lk=["email","organization","phoneNumber","city","country","region","postalCode","address","address2"],ck=["poNumber"],uk={type:"object",properties:{displayOptions:{type:"object",properties:{buttonColor:{type:"string",default:"black"},buttonHeight:{type:"string",pattern:"^[0-9]+px$",default:"48px"},buttonType:{type:"string",default:"plain"}},default:{}}},default:{},required:[]},dk={type:"object",properties:{compactExpressInstruments:{type:"boolean",default:!1},address:{type:"object",properties:{name:{type:"string",enum:["default","combined","stacked"],default:"default"},region:{type:"string",enum:["default","split","stacked"],default:"default"},show:{type:"array",default:[],items:{type:"string",enum:["all",...lk]}},hide:{type:"array",default:[],items:{type:"string",enum:["all",...lk]}},require:{type:"array",default:[],items:{type:"string",enum:lk}}},default:{},required:[]},paypal:{type:"object",properties:{buttonHeight:{type:"number",default:48}},default:{},required:[]},googlePay:uk,applePay:uk,additionalFields:{type:"object",properties:{show:{type:"array",default:[],items:{type:"string",enum:[...ck]}},require:{type:"array",default:[],items:{type:"string",enum:[...ck]}}}}},default:{},required:[]},pk=["items","transactionId","invoiceId","money","deposit","payout"],mk={title:"Mount Options Schema",type:"object",properties:{organizationId:{type:"string"},publishableKey:{type:"string"},websiteId:{type:"string"},items:{type:"array",items:{type:"object",oneOf:[{properties:{planId:{type:"string"},thumbnail:{type:"string"},quantity:{type:"number"}}},{properties:{planId:{type:"string"},thumbnail:{type:"string"},quantity:{type:"object",properties:{default:{type:"number"},minimum:{type:"number"},maximum:{type:"number"},multipleOf:{type:"number"}}}}}],required:["planId","quantity"]},minItems:1},money:{type:"object",properties:{amount:{type:"number"},currency:{type:"string",minLength:3,maxLength:3}},required:["amount","currency"]},invoiceId:{type:"string"},transactionId:{type:"string"},deposit:zm,payout:{type:"object",properties:{payoutRequestId:{type:"string"}},required:["payoutRequestId"]},jwt:{type:"string"},addons:ok,bumpOffer:ok,form:{default:".rebilly-instruments",type:["string","object"],oneOf:[{type:"string"},{type:"object",properties:{id:{type:"string"}}}]},summary:{default:".rebilly-instruments-summary",type:["string","object"],oneOf:[{type:"string"},{type:"object",properties:{id:{type:"string"}}}]},apiMode:{type:"string",enum:["sandbox","live"]},transactionType:{type:"string",enum:["purchase","setup"],default:"purchase"},css:{type:"string"},theme:ik,i18n:sk,countryCode:{type:"string",default:"US"},locale:{type:"string",default:"auto"},paymentInstruments:dk,features:{type:"object",properties:{enableTelemetry:{type:"boolean",default:!0},hideConfirmation:{type:"boolean",default:!1},hideResult:{type:"boolean",default:!1},fullPageRedirect:{type:"boolean",default:!1},showCoupons:{type:"array",items:{type:"string",enum:["summary","confirmation"]}}},default:{}},_dev:{type:"object",properties:{paymentMethodsUrl:{type:"string",default:"https://forms.local.rebilly.dev:3000"},liveUrl:{type:"string"},sandboxUrl:{type:"string"},framePayScriptLink:{type:"string"},framePayStyleLink:{type:"string"}}}},required:["apiMode"],dependentRequired:{...["invoiceId","transactionId","deposit","payout"].reduce(((e,t)=>({...e,[`${t}`]:["jwt"]})),{})},anyOf:[...pk.map((e=>{const t=pk.filter((t=>t!==e));return{if:{required:[e]},then:{properties:{...t.reduce(((e,t)=>({...e,[t]:!1})),{})}},else:!1}})),{required:["jwt"]}]};class fk extends Error{constructor(e){super(e),this.name="Rebilly Instruments Configuration Error"}trimStack(){return Error.captureStackTrace(this,fk),this}}const hk=new ak({allErrors:!0,removeAdditional:!0,useDefaults:!0}).compile(mk);function yk(e){const t=function(e){return Object.assign(JSON.parse(JSON.stringify(e)),{form:e.form,summary:e.summary})}(e);return hk(t)?t:(hk.errors.forEach((t=>{let n,r,a,o="",s=t.instancePath.substring(1).replace(/\//gi,".");switch(s=s.replace(/\.\d+/gi,(e=>`[${e.replace(".","")}]`)),s.length||(s="options"),t.keyword){case"if":case"false schema":break;case"required":if(t.schemaPath.match(/(oneOf|anyOf)/))break;o=`${s} ${t.message}`;break;case"oneOf":case"anyOf":console.error(new fk(`${s} ${t.message}, see schemas below.`).trimStack()),r=t.schemaPath.replace("#/","").split("/"),n=mk,r.forEach((e=>{n=n[e]})),n.forEach((e=>{const n=JSON.stringify(e,null,2);console.error(`${s} ${t.keyword} schema.\n${n}`)}));break;case"enum":a=s.split(".").reduce(((e,t)=>e[t]),e),o=`${s} ${t.message}: ${t.params.allowedValues}. received: ${a}`;break;case"dependentRequired":case"maxLength":case"minItems":case"pattern":o=`${s} ${t.message}`;break;default:o=`Error with ${s} - See error message`,console.error(t)}o&&console.error(new fk(o).trimStack())})),console.error(new fk("Configuration is invalid").trimStack()),null)}const gk=({options:e={}}={})=>{let t=yk(e);return t&&(t=function(e){if(e.jwt&&!e.publishableKey){const{merchant:t,claims:{transactionId:n,invoiceId:r,websiteId:a,cashierRequestId:o}}=gf(e.jwt);Object.entries({organizationId:t,transactionId:n,invoiceId:r,websiteId:a}).forEach((([t,n])=>{n&&(e[t]=n)})),o&&!e.deposit&&(e.deposit=Object.assign({},{depositRequestId:o}))}return e}(t),t=function(e){var t;return!Um(e.deposit)&&(null==(t=e.deposit)?void 0:t.currency)?(e.deposit=to({editable:!0,buttons:[],customAmount:{minimum:1,maximum:1e12,multipleOf:1}},e.deposit||{}),Number.isNaN(e.deposit.amount)&&e.deposit.buttons&&e.deposit.buttons.length>0&&([e.deposit.amount]=e.deposit.buttons)):Um(e.deposit)&&(e.deposit=to({customAmount:{minimum:1,maximum:1e12,multipleOf:1}},e.deposit||{})),e.items&&(e.items=e.items.map((e=>({...e,quantity:Xd(e)})))),e}(t),t=function(e){var t;return Object.assign({},e,{_computed:{version:"9.32.1",paymentMethodsUrl:(null==(t=e._dev)?void 0:t.paymentMethodsUrl)??"https://forms.secure-payments.app"}})}(t)),t};async function bk(){const{_dev:e}=lo.options||{},t={script:(null==e?void 0:e.framePayScriptLink)||"https://framepay.rebilly.com/framepay.js",style:(null==e?void 0:e.framePayStyleLink)||"https://framepay.rebilly.com/framepay.css"};return new Promise((e=>{const n=document.createElement("link");n.setAttribute("href",t.style),n.setAttribute("rel","stylesheet"),document.head.prepend(n);const r=document.createElement("script");r.setAttribute("src",t.script),r.onload=()=>e(),document.head.append(r)}))}const vk=ve({aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),wk="a-f\\d",kk=`#?[${wk}]{3}[${wk}]?`,$k=`#?[${wk}]{6}([${wk}]{2})?`,Ek=new RegExp(`[^#${wk}]`,"gi"),Sk=new RegExp(`^${kk}$|^${$k}$`,"i");const _k=ve(((e,t={})=>{if("string"!=typeof e||Ek.test(e)||!Sk.test(e))throw new TypeError("Expected a valid hex string");let n=1;8===(e=e.replace(/^#/,"")).length&&(n=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),4===e.length&&(n=Number.parseInt(e.slice(3,4).repeat(2),16)/255,e=e.slice(0,3)),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const r=Number.parseInt(e,16),a=r>>16,o=r>>8&255,s=255&r,i="number"==typeof t.alpha?t.alpha:n;if("array"===t.format)return[a,o,s,i];if("css"===t.format){return`rgb(${a} ${o} ${s}${1===i?"":` / ${Number((100*i).toFixed(2))}%`})`}return{red:a,green:o,blue:s,alpha:i}}));var Pk=new RegExp(/^#([a-f0-9]{3,4}|[a-f0-9]{4}(?:[a-f0-9]{2}){1,2})\b$/,"i");const xk="-?\\d*(?:\\.\\d+)",Ak=`(${xk}?)`,Ik=`(${xk}?%)`,Rk=`(${xk}?%?)`,Tk=`^\n hsla?\\(\n \\s*(-?\\d*(?:\\.\\d+)?(?:deg|rad|turn)?)\\s*,\n \\s*${Ik}\\s*,\n \\s*${Ik}\\s*\n (?:,\\s*${Rk}\\s*)?\n \\)\n $\n`.replace(/\n|\s/g,"");var Ck=new RegExp(Tk);const Ok=`^\n hsla?\\(\n \\s*(-?\\d*(?:\\.\\d+)?(?:deg|rad|turn)?)\\s*\n \\s+${Ik}\n \\s+${Ik}\n \\s*(?:\\s*\\/\\s*${Rk}\\s*)?\n \\)\n $\n`.replace(/\n|\s/g,"");var Nk=new RegExp(Ok);const Lk=`^\n rgba?\\(\n \\s*${Ak}\\s*,\n \\s*${Ak}\\s*,\n \\s*${Ak}\\s*\n (?:,\\s*${Rk}\\s*)?\n \\)\n $\n`.replace(/\n|\s/g,"");var jk=new RegExp(Lk);const Fk=`^\n rgba?\\(\n \\s*${Ik}\\s*,\n \\s*${Ik}\\s*,\n \\s*${Ik}\\s*\n (?:,\\s*${Rk}\\s*)?\n \\)\n $\n`.replace(/\n|\s/g,"");var Mk=new RegExp(Fk);const Hk=`^\n rgba?\\(\n \\s*${Ak}\n \\s+${Ak}\n \\s+${Ak}\n \\s*(?:\\s*\\/\\s*${Rk}\\s*)?\n \\)\n$\n`.replace(/\n|\s/g,"");var Bk=new RegExp(Hk);const Dk=`^\n rgba?\\(\n \\s*${Ik}\n \\s+${Ik}\n \\s+${Ik}\n \\s*(?:\\s*\\/\\s*${Rk}\\s*)?\n \\)\n$\n`.replace(/\n|\s/g,"");var qk=new RegExp(Dk);var Uk=new RegExp(/^transparent$/,"i");const zk=(e,t,n)=>Math.min(Math.max(t,e),n),Vk=e=>{let t=e;return"number"!=typeof t&&(t=t.endsWith("%")?255*parseFloat(t)/100:parseFloat(t)),zk(Math.round(t),0,255)},Wk=e=>zk(parseFloat(e),0,100);function Kk(e){let t=e;return"number"!=typeof t&&(t=t.endsWith("%")?parseFloat(t)/100:parseFloat(t)),zk(t,0,1)}function Gk([,e,t,n,r=1]){return{type:"rgb",values:[e,t,n].map(Vk),alpha:Kk(null===r?1:r)}}
28
+ deps: ${r}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,n]=function({schema:e}){const t={},n={};for(const r in e){if("__proto__"===r)continue;(Array.isArray(e[r])?t:n)[r]=e[r]}return[t,n]}(e);o(e,t),s(e,n)}};function o(e,n=e.schema){const{gen:a,data:o,it:s}=e;if(0===Object.keys(n).length)return;const i=a.let("missing");for(const l in n){const c=n[l];if(0===c.length)continue;const u=(0,r.propertyInData)(a,o,l,s.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),s.allErrors?a.if(u,(()=>{for(const t of c)(0,r.checkReportMissingProp)(e,t)})):(a.if(t._`${u} && (${(0,r.checkMissingProp)(e,c,i)})`),(0,r.reportMissingProp)(e,i),a.else())}}function s(e,t=e.schema){const{gen:a,data:o,keyword:s,it:i}=e,l=a.name("valid");for(const c in t)(0,n.alwaysValidSchema)(i,t[c])||(a.if((0,r.propertyInData)(a,o,c,i.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:c},l);e.mergeValidEvaluated(t,l)}),(()=>a.var(l,!0))),e.ok(l))}e.validatePropertyDeps=o,e.validateSchemaDeps=s,e.default=a}(Eb);var Sb={};Object.defineProperty(Sb,"__esModule",{value:!0});const _b=Ef,Pb=Pf,xb={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>_b._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:n,data:r,it:a}=e;if((0,Pb.alwaysValidSchema)(a,n))return;const o=t.name("valid");t.forIn("key",r,(n=>{e.setParams({propertyName:n}),e.subschema({keyword:"propertyNames",data:n,dataTypes:["string"],propertyName:n,compositeRule:!0},o),t.if((0,_b.not)(o),(()=>{e.error(!0),a.allErrors||t.break()}))})),e.ok(o)}};Sb.default=xb;var Ab={};Object.defineProperty(Ab,"__esModule",{value:!0});const Ib=Wf,Rb=Ef,Tb=xf,Cb=Pf,Ob={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>Rb._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:n,parentSchema:r,data:a,errsCount:o,it:s}=e;if(!o)throw new Error("ajv implementation error");const{allErrors:i,opts:l}=s;if(s.props=!0,"all"!==l.removeAdditional&&(0,Cb.alwaysValidSchema)(s,n))return;const c=(0,Ib.allSchemaProperties)(r.properties),u=(0,Ib.allSchemaProperties)(r.patternProperties);function d(e){t.code(Rb._`delete ${a}[${e}]`)}function p(r){if("all"===l.removeAdditional||l.removeAdditional&&!1===n)d(r);else{if(!1===n)return e.setParams({additionalProperty:r}),e.error(),void(i||t.break());if("object"==typeof n&&!(0,Cb.alwaysValidSchema)(s,n)){const n=t.name("valid");"failing"===l.removeAdditional?(m(r,n,!1),t.if((0,Rb.not)(n),(()=>{e.reset(),d(r)}))):(m(r,n),i||t.if((0,Rb.not)(n),(()=>t.break())))}}}function m(t,n,r){const a={keyword:"additionalProperties",dataProp:t,dataPropType:Cb.Type.Str};!1===r&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}t.forIn("key",a,(n=>{c.length||u.length?t.if(function(n){let a;if(c.length>8){const e=(0,Cb.schemaRefOrVal)(s,r.properties,"properties");a=(0,Ib.isOwnProperty)(t,e,n)}else a=c.length?(0,Rb.or)(...c.map((e=>Rb._`${n} === ${e}`))):Rb.nil;return u.length&&(a=(0,Rb.or)(a,...u.map((t=>Rb._`${(0,Ib.usePattern)(e,t)}.test(${n})`)))),(0,Rb.not)(a)}(n),(()=>p(n))):p(n)})),e.ok(Rb._`${o} === ${Tb.default.errors}`)}};Ab.default=Ob;var Nb={};Object.defineProperty(Nb,"__esModule",{value:!0});const Lb=wf,jb=Wf,Fb=Pf,Mb=Ab,Hb={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,parentSchema:r,data:a,it:o}=e;"all"===o.opts.removeAdditional&&void 0===r.additionalProperties&&Mb.default.code(new Lb.KeywordCxt(o,Mb.default,"additionalProperties"));const s=(0,jb.allSchemaProperties)(n);for(const d of s)o.definedProperties.add(d);o.opts.unevaluated&&s.length&&!0!==o.props&&(o.props=Fb.mergeEvaluated.props(t,(0,Fb.toHash)(s),o.props));const i=s.filter((e=>!(0,Fb.alwaysValidSchema)(o,n[e])));if(0===i.length)return;const l=t.name("valid");for(const d of i)c(d)?u(d):(t.if((0,jb.propertyInData)(t,a,d,o.opts.ownProperties)),u(d),o.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(l);function c(e){return o.opts.useDefaults&&!o.compositeRule&&void 0!==n[e].default}function u(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},l)}}};Nb.default=Hb;var Bb={};Object.defineProperty(Bb,"__esModule",{value:!0});const Db=Wf,qb=Ef,Ub=Pf,zb=Pf,Vb={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,data:r,parentSchema:a,it:o}=e,{opts:s}=o,i=(0,Db.allSchemaProperties)(n),l=i.filter((e=>(0,Ub.alwaysValidSchema)(o,n[e])));if(0===i.length||l.length===i.length&&(!o.opts.unevaluated||!0===o.props))return;const c=s.strictSchema&&!s.allowMatchingProperties&&a.properties,u=t.name("valid");!0===o.props||o.props instanceof qb.Name||(o.props=(0,zb.evaluatedPropsToName)(t,o.props));const{props:d}=o;function p(e){for(const t in c)new RegExp(e).test(t)&&(0,Ub.checkStrictMode)(o,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function m(n){t.forIn("key",r,(r=>{t.if(qb._`${(0,Db.usePattern)(e,n)}.test(${r})`,(()=>{const a=l.includes(n);a||e.subschema({keyword:"patternProperties",schemaProp:n,dataProp:r,dataPropType:zb.Type.Str},u),o.opts.unevaluated&&!0!==d?t.assign(qb._`${d}[${r}]`,!0):a||o.allErrors||t.if((0,qb.not)(u),(()=>t.break()))}))}))}!function(){for(const e of i)c&&p(e),o.allErrors?m(e):(t.var(u,!0),m(e),t.if(u))}()}};Bb.default=Vb;var Wb={};Object.defineProperty(Wb,"__esModule",{value:!0});const Kb=Pf,Gb={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:n,it:r}=e;if((0,Kb.alwaysValidSchema)(r,n))return void e.fail();const a=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};Wb.default=Gb;var Jb={};Object.defineProperty(Jb,"__esModule",{value:!0});const Xb={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Wf.validateUnion,error:{message:"must match a schema in anyOf"}};Jb.default=Xb;var Qb={};Object.defineProperty(Qb,"__esModule",{value:!0});const Yb=Ef,Zb=Pf,ev={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>Yb._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:n,parentSchema:r,it:a}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(a.opts.discriminator&&r.discriminator)return;const o=n,s=t.let("valid",!1),i=t.let("passing",null),l=t.name("_valid");e.setParams({passing:i}),t.block((function(){o.forEach(((n,r)=>{let o;(0,Zb.alwaysValidSchema)(a,n)?t.var(l,!0):o=e.subschema({keyword:"oneOf",schemaProp:r,compositeRule:!0},l),r>0&&t.if(Yb._`${l} && ${s}`).assign(s,!1).assign(i,Yb._`[${i}, ${r}]`).else(),t.if(l,(()=>{t.assign(s,!0),t.assign(i,r),o&&e.mergeEvaluated(o,Yb.Name)}))}))})),e.result(s,(()=>e.reset()),(()=>e.error(!0)))}};Qb.default=ev;var tv={};Object.defineProperty(tv,"__esModule",{value:!0});const nv=Pf,rv={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:n,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");const a=t.name("valid");n.forEach(((t,n)=>{if((0,nv.alwaysValidSchema)(r,t))return;const o=e.subschema({keyword:"allOf",schemaProp:n},a);e.ok(a),e.mergeEvaluated(o)}))}};tv.default=rv;var av={};Object.defineProperty(av,"__esModule",{value:!0});const ov=Ef,sv=Pf,iv={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>ov.str`must match "${e.ifClause}" schema`,params:({params:e})=>ov._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:n,it:r}=e;void 0===n.then&&void 0===n.else&&(0,sv.checkStrictMode)(r,'"if" without "then" and "else" is ignored');const a=lv(r,"then"),o=lv(r,"else");if(!a&&!o)return;const s=t.let("valid",!0),i=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},i);e.mergeEvaluated(t)}(),e.reset(),a&&o){const n=t.let("ifClause");e.setParams({ifClause:n}),t.if(i,l("then",n),l("else",n))}else a?t.if(i,l("then")):t.if((0,ov.not)(i),l("else"));function l(n,r){return()=>{const a=e.subschema({keyword:n},i);t.assign(s,i),e.mergeValidEvaluated(a,s),r?t.assign(r,ov._`${n}`):e.setParams({ifClause:n})}}e.pass(s,(()=>e.error(!0)))}};function lv(e,t){const n=e.schema[t];return void 0!==n&&!(0,sv.alwaysValidSchema)(e,n)}av.default=iv;var cv={};Object.defineProperty(cv,"__esModule",{value:!0});const uv=Pf,dv={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){void 0===t.if&&(0,uv.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};cv.default=dv,Object.defineProperty(Yg,"__esModule",{value:!0});const pv=Zg,mv=ab,fv=ob,hv=mb,yv=vb,gv=Eb,bv=Sb,vv=Ab,wv=Nb,kv=Bb,$v=Wb,Ev=Jb,Sv=Qb,_v=tv,Pv=av,xv=cv;Yg.default=function(e=!1){const t=[$v.default,Ev.default,Sv.default,_v.default,Pv.default,xv.default,bv.default,vv.default,gv.default,wv.default,kv.default];return e?t.push(mv.default,hv.default):t.push(pv.default,fv.default),t.push(yv.default),t};var Av={},Iv={};Object.defineProperty(Iv,"__esModule",{value:!0});const Rv=Ef,Tv={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>Rv.str`must match format "${e}"`,params:({schemaCode:e})=>Rv._`{format: ${e}}`},code(e,t){const{gen:n,data:r,$data:a,schema:o,schemaCode:s,it:i}=e,{opts:l,errSchemaPath:c,schemaEnv:u,self:d}=i;l.validateFormats&&(a?function(){const a=n.scopeValue("formats",{ref:d.formats,code:l.code.formats}),o=n.const("fDef",Rv._`${a}[${s}]`),i=n.let("fType"),c=n.let("format");n.if(Rv._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>n.assign(i,Rv._`${o}.type || "string"`).assign(c,Rv._`${o}.validate`)),(()=>n.assign(i,Rv._`"string"`).assign(c,o))),e.fail$data((0,Rv.or)(!1===l.strictSchema?Rv.nil:Rv._`${s} && !${c}`,function(){const e=u.$async?Rv._`(${o}.async ? await ${c}(${r}) : ${c}(${r}))`:Rv._`${c}(${r})`,n=Rv._`(typeof ${c} == "function" ? ${e} : ${c}.test(${r}))`;return Rv._`${c} && ${c} !== true && ${i} === ${t} && !${n}`}()))}():function(){const a=d.formats[o];if(!a)return void function(){if(!1===l.strictSchema)return void d.logger.warn(e());throw new Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${c}"`}}();if(!0===a)return;const[s,i,p]=function(e){const t=e instanceof RegExp?(0,Rv.regexpCode)(e):l.code.formats?Rv._`${l.code.formats}${(0,Rv.getProperty)(o)}`:void 0,r=n.scopeValue("formats",{key:o,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,Rv._`${r}.validate`];return["string",e,r]}(a);s===t&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!u.$async)throw new Error("async format in sync schema");return Rv._`await ${p}(${r})`}return"function"==typeof i?Rv._`${p}(${r})`:Rv._`${p}.test(${r})`}())}())}};Iv.default=Tv,Object.defineProperty(Av,"__esModule",{value:!0});const Cv=[Iv.default];Av.default=Cv;var Ov={};Object.defineProperty(Ov,"__esModule",{value:!0}),Ov.contentVocabulary=Ov.metadataVocabulary=void 0,Ov.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Ov.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(Ry,"__esModule",{value:!0});const Nv=Wy,Lv=Yg,jv=Av,Fv=Ov,Mv=[Ty.default,Nv.default,(0,Lv.default)(),jv.default,Fv.metadataVocabulary,Fv.contentVocabulary];Ry.default=Mv;var Hv={},Bv={};Object.defineProperty(Bv,"__esModule",{value:!0}),Bv.dynamicAnchor=void 0;const Dv=Ef,qv=xf,Uv=uy,zv=Ny,Vv={keyword:"$dynamicAnchor",schemaType:"string",code:e=>Wv(e,e.schema)};function Wv(e,t){const{gen:n,it:r}=e;r.schemaEnv.root.dynamicAnchors[t]=!0;const a=Dv._`${qv.default.dynamicAnchors}${(0,Dv.getProperty)(t)}`,o="#"===r.errSchemaPath?r.validateName:function(e){const{schemaEnv:t,schema:n,self:r}=e.it,{root:a,baseId:o,localRefs:s,meta:i}=t.root,{schemaId:l}=r.opts,c=new Uv.SchemaEnv({schema:n,schemaId:l,root:a,baseId:o,localRefs:s,meta:i});return Uv.compileSchema.call(r,c),(0,zv.getValidate)(e,c)}(e);n.if(Dv._`!${a}`,(()=>n.assign(a,o)))}Bv.dynamicAnchor=Wv,Bv.default=Vv;var Kv={};Object.defineProperty(Kv,"__esModule",{value:!0}),Kv.dynamicRef=void 0;const Gv=Ef,Jv=xf,Xv=Ny,Qv={keyword:"$dynamicRef",schemaType:"string",code:e=>Yv(e,e.schema)};function Yv(e,t){const{gen:n,keyword:r,it:a}=e;if("#"!==t[0])throw new Error(`"${r}" only supports hash fragment reference`);const o=t.slice(1);if(a.allErrors)s();else{const t=n.let("valid",!1);s(t),e.ok(t)}function s(e){if(a.schemaEnv.root.dynamicAnchors[o]){const t=n.let("_v",Gv._`${Jv.default.dynamicAnchors}${(0,Gv.getProperty)(o)}`);n.if(t,i(t,e),i(a.validateName,e))}else i(a.validateName,e)()}function i(t,r){return r?()=>n.block((()=>{(0,Xv.callRef)(e,t),n.let(r,!0)})):()=>(0,Xv.callRef)(e,t)}}Kv.dynamicRef=Yv,Kv.default=Qv;var Zv={};Object.defineProperty(Zv,"__esModule",{value:!0});const ew=Bv,tw=Pf,nw={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,ew.dynamicAnchor)(e,""):(0,tw.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};Zv.default=nw;var rw={};Object.defineProperty(rw,"__esModule",{value:!0});const aw=Kv,ow={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,aw.dynamicRef)(e,e.schema)};rw.default=ow,Object.defineProperty(Hv,"__esModule",{value:!0});const sw=Kv,iw=Zv,lw=rw,cw=[Bv.default,sw.default,iw.default,lw.default];Hv.default=cw;var uw={},dw={};Object.defineProperty(dw,"__esModule",{value:!0});const pw=Eb,mw={keyword:"dependentRequired",type:"object",schemaType:"object",error:pw.error,code:e=>(0,pw.validatePropertyDeps)(e)};dw.default=mw;var fw={};Object.defineProperty(fw,"__esModule",{value:!0});const hw=Eb,yw={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,hw.validateSchemaDeps)(e)};fw.default=yw;var gw={};Object.defineProperty(gw,"__esModule",{value:!0});const bw=Pf,vw={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:n}){void 0===t.contains&&(0,bw.checkStrictMode)(n,`"${e}" without "contains" is ignored`)}};gw.default=vw,Object.defineProperty(uw,"__esModule",{value:!0});const ww=fw,kw=gw,$w=[dw.default,ww.default,kw.default];uw.default=$w;var Ew={},Sw={};Object.defineProperty(Sw,"__esModule",{value:!0});const _w=Ef,Pw=Pf,xw=xf,Aw={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:e})=>_w._`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){const{gen:t,schema:n,data:r,errsCount:a,it:o}=e;if(!a)throw new Error("ajv implementation error");const{allErrors:s,props:i}=o;function l(r){if(!1===n)return e.setParams({unevaluatedProperty:r}),e.error(),void(s||t.break());if(!(0,Pw.alwaysValidSchema)(o,n)){const n=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:r,dataPropType:Pw.Type.Str},n),s||t.if((0,_w.not)(n),(()=>t.break()))}}i instanceof _w.Name?t.if(_w._`${i} !== true`,(()=>t.forIn("key",r,(e=>t.if(function(e,t){return _w._`!${e} || !${e}[${t}]`}(i,e),(()=>l(e))))))):!0!==i&&t.forIn("key",r,(e=>void 0===i?l(e):t.if(function(e,t){const n=[];for(const r in e)!0===e[r]&&n.push(_w._`${t} !== ${r}`);return(0,_w.and)(...n)}(i,e),(()=>l(e))))),o.props=!0,e.ok(_w._`${a} === ${xw.default.errors}`)}};Sw.default=Aw;var Iw={};Object.defineProperty(Iw,"__esModule",{value:!0});const Rw=Ef,Tw=Pf,Cw={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:e}})=>Rw.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>Rw._`{limit: ${e}}`},code(e){const{gen:t,schema:n,data:r,it:a}=e,o=a.items||0;if(!0===o)return;const s=t.const("len",Rw._`${r}.length`);if(!1===n)e.setParams({len:o}),e.fail(Rw._`${s} > ${o}`);else if("object"==typeof n&&!(0,Tw.alwaysValidSchema)(a,n)){const n=t.var("valid",Rw._`${s} <= ${o}`);t.if((0,Rw.not)(n),(()=>function(n,r){t.forRange("i",r,s,(r=>{e.subschema({keyword:"unevaluatedItems",dataProp:r,dataPropType:Tw.Type.Num},n),a.allErrors||t.if((0,Rw.not)(n),(()=>t.break()))}))}(n,o))),e.ok(n)}a.items=!0}};Iw.default=Cw,Object.defineProperty(Ew,"__esModule",{value:!0});const Ow=Iw,Nw=[Sw.default,Ow.default];Ew.default=Nw;var Lw={},jw={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(t=e.DiscrError||(e.DiscrError={})).Tag="tag",t.Mapping="mapping"}(jw),Object.defineProperty(Lw,"__esModule",{value:!0});const Fw=Ef,Mw=jw,Hw=uy,Bw=Pf,Dw={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===Mw.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>Fw._`{error: ${e}, tag: ${n}, tagValue: ${t}}`},code(e){const{gen:t,data:n,schema:r,parentSchema:a,it:o}=e,{oneOf:s}=a;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");const i=r.propertyName;if("string"!=typeof i)throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",!1),c=t.const("tag",Fw._`${n}${(0,Fw.getProperty)(i)}`);function u(n){const r=t.name("valid"),a=e.subschema({keyword:"oneOf",schemaProp:n},r);return e.mergeEvaluated(a,Fw.Name),r}t.if(Fw._`typeof ${c} == "string"`,(()=>function(){const n=function(){var e;const t={},n=l(a);let r=!0;for(let a=0;a<s.length;a++){let t=s[a];(null==t?void 0:t.$ref)&&!(0,Bw.schemaHasRulesButRef)(t,o.self.RULES)&&(t=Hw.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,null==t?void 0:t.$ref),t instanceof Hw.SchemaEnv&&(t=t.schema));const u=null===(e=null==t?void 0:t.properties)||void 0===e?void 0:e[i];if("object"!=typeof u)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${i}"`);r=r&&(n||l(t)),c(u,a)}if(!r)throw new Error(`discriminator: "${i}" must be required`);return t;function l({required:e}){return Array.isArray(e)&&e.includes(i)}function c(e,t){if(e.const)u(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${i}" must have "const" or "enum"`);for(const n of e.enum)u(n,t)}}function u(e,n){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${i}" values must be unique strings`);t[e]=n}}();t.if(!1);for(const e in n)t.elseIf(Fw._`${c} === ${e}`),t.assign(l,u(n[e]));t.else(),e.error(!1,{discrError:Mw.DiscrError.Mapping,tag:c,tagName:i}),t.endIf()}()),(()=>e.error(!1,{discrError:Mw.DiscrError.Tag,tag:c,tagName:i}))),e.ok(l)}};Lw.default=Dw;var qw={};const Uw={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}},zw={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}},Vw={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}},Ww={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}},Kw={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}},Gw={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},Jw={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};Object.defineProperty(qw,"__esModule",{value:!0});const Xw=Uw,Qw=zw,Yw=Vw,Zw=Ww,ek=Kw,tk=Gw,nk=Jw,rk=["/properties"];qw.default=function(e){return[Xw,Qw,Yw,Zw,t(this,ek),tk,t(this,nk)].forEach((e=>this.addMetaSchema(e,void 0,!1))),this;function t(t,n){return e?t.$dataMetaSchema(n,rk):n}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=vf,r=Ry,a=Hv,o=uw,s=Ew,i=Lw,l=qw,c="https://json-schema.org/draft/2019-09/schema";class u extends n.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(a.default),r.default.forEach((e=>this.addVocabulary(e))),this.addVocabulary(o.default),this.addVocabulary(s.default),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(l.default.call(this,e),this.refs["http://json-schema.org/schema"]=c)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var d=wf;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var p=Ef;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}});var m=oy;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return m.default}});var f=iy;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}(bf,bf.exports);const ak=ve(bf.exports),ok={type:"array",items:{type:"object",properties:{planId:{type:"string"},quantity:{type:"number"},thumbnail:{type:"string"}},required:["planId","quantity"]},default:[]},sk={type:"object",patternProperties:{"^[a-z]{2}(-[A-Z]{2})?$":{type:"object",properties:{summary:{type:"object"},form:{type:"object"},confirmation:{type:"object"},result:{type:"object"},validations:{type:"object"},paymentMethods:{type:"object"}},required:[]}},required:[]},ik={type:"object",properties:{colorPrimary:{type:"string",default:"#0044d4"},colorBackground:{type:"string",default:"#FFFFFF"},colorText:{type:"string",default:"#0D2B3E"},colorDanger:{type:"string",default:"#CD5C5C"},borderRadius:{type:"string",default:"4px"},labels:{type:"string",enum:["stacked","floating"],default:"stacked"},fontFamily:{type:"string",default:"-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial sans-serif"},fontSizeBase:{type:"string",default:"16px"},fontWeightBase:{type:"string",default:"400"},fontLineHeightBase:{type:"string",default:"24px"},fontSmooth:{type:"string",enum:["auto","never","always"],default:"auto"},headingFontFamily:{type:"string"},headingFontWeight:{type:"string",default:"500"},headingColorText:{type:"string"},buttonColorBackground:{type:"string"},buttonColorText:{type:"string",default:"#FFFFFF"},buttonFontFamily:{type:"string"},buttonFontSize:{type:"string"},buttonFontLineHeight:{type:"string"},buttonFontWeight:{type:"string"},buttonBorder:{type:"string",default:"1px solid transparent"},buttonBorderColor:{type:"string"},buttonBorderWidth:{type:"string"},buttonBorderType:{type:"string"},buttonBorderRadius:{type:"string"},buttonBoxShadow:{type:"string",default:"none"},buttonSecondaryColorText:{type:"string"},buttonSecondaryFontFamily:{type:"string"},buttonSecondaryFontSize:{type:"string"},buttonSecondaryFontLineHeight:{type:"string"},buttonSecondaryFontWeight:{type:"string"},buttonSecondaryBorder:{type:"string"},buttonSecondaryBorderColor:{type:"string"},buttonSecondaryBorderWidth:{type:"string"},buttonSecondaryBorderType:{type:"string"},buttonSecondaryBorderRadius:{type:"string"},buttonSecondaryBoxShadow:{type:"string",default:"none"},buttonHoverColorBackground:{type:"string"},buttonHoverColorText:{type:"string"},buttonHoverFontFamily:{type:"string"},buttonHoverFontSize:{type:"string"},buttonHoverFontLineHeight:{type:"string"},buttonHoverFontWeight:{type:"string"},buttonHoverBorder:{type:"string"},buttonHoverBorderColor:{type:"string"},buttonHoverBorderWidth:{type:"string"},buttonHoverBorderType:{type:"string"},buttonHoverBorderRadius:{type:"string"},buttonHoverBoxShadow:{type:"string",default:"none"},buttonSecondaryHoverColorBackground:{type:"string"},buttonSecondaryHoverColorText:{type:"string"},buttonSecondaryHoverFontFamily:{type:"string"},buttonSecondaryHoverFontSize:{type:"string"},buttonSecondaryHoverFontLineHeight:{type:"string"},buttonSecondaryHoverFontWeight:{type:"string"},buttonSecondaryHoverBorder:{type:"string"},buttonSecondaryHoverBorderColor:{type:"string"},buttonSecondaryHoverBorderWidth:{type:"string"},buttonSecondaryHoverBorderType:{type:"string"},buttonSecondaryHoverBorderRadius:{type:"string"},buttonSecondaryHoverBoxShadow:{type:"string",default:"none"},buttonActiveColorBackground:{type:"string"},buttonActiveColorText:{type:"string"},buttonActiveFontFamily:{type:"string"},buttonActiveFontSize:{type:"string"},buttonActiveFontLineHeight:{type:"string"},buttonActiveFontWeight:{type:"string"},buttonActiveBorder:{type:"string"},buttonActiveBorderColor:{type:"string"},buttonActiveBorderWidth:{type:"string"},buttonActiveBorderType:{type:"string"},buttonActiveBorderRadius:{type:"string"},buttonActiveBoxShadow:{type:"string",default:"none"},buttonSecondaryActiveColorBackground:{type:"string"},buttonSecondaryActiveColorText:{type:"string"},buttonSecondaryActiveFontFamily:{type:"string"},buttonSecondaryActiveFontSize:{type:"string"},buttonSecondaryActiveFontLineHeight:{type:"string"},buttonSecondaryActiveFontWeight:{type:"string"},buttonSecondaryActiveBorder:{type:"string"},buttonSecondaryActiveBorderColor:{type:"string"},buttonSecondaryActiveBorderWidth:{type:"string"},buttonSecondaryActiveBorderType:{type:"string"},buttonSecondaryActiveBorderRadius:{type:"string"},buttonSecondaryActiveBoxShadow:{type:"string",default:"none"},inputColorBackground:{type:"string"},inputColorText:{type:"string"},inputFontFamily:{type:"string"},inputFontSize:{type:"string"},inputFontLineHeight:{type:"string"},inputFontWeight:{type:"string"},inputBorder:{type:"string"},inputBorderRadius:{type:"string"},inputBoxShadow:{type:"string"},inputHoverColorBackground:{type:"string"},inputHoverColorText:{type:"string"},inputHoverFontFamily:{type:"string"},inputHoverFontSize:{type:"string"},inputHoverFontLineHeight:{type:"string"},inputHoverFontWeight:{type:"string"},inputHoverBorder:{type:"string"},inputHoverBorderRadius:{type:"string"},inputHoverBoxShadow:{type:"string"},inputFocusColorBackground:{type:"string"},inputFocusColorText:{type:"string"},inputFocusFontFamily:{type:"string"},inputFocusFontSize:{type:"string"},inputFocusFontLineHeight:{type:"string"},inputFocusFontWeight:{type:"string"},inputFocusBorder:{type:"string"},inputFocusBorderRadius:{type:"string"},inputFocusBoxShadow:{type:"string"},inputPlaceholderColorText:{type:"string"},inputPlaceholderFontFamily:{type:"string"},inputPlaceholderFontSize:{type:"string"},inputPlaceholderFontLineHeight:{type:"string"},inputPlaceholderFontWeight:{type:"string"},inputSelectionColorText:{type:"string"},inputSelectionColorBackground:{type:"string"},inputErrorColorBackground:{type:"string"},inputErrorColorText:{type:"string"},inputErrorFontFamily:{type:"string"},inputErrorFontSize:{type:"string"},inputErrorFontLineHeight:{type:"string"},inputErrorFontWeight:{type:"string"},inputErrorBorder:{type:"string"},inputErrorBorderRadius:{type:"string"},inputErrorBoxShadow:{type:"string"},inputErrorHoverColorBackground:{type:"string"},inputErrorHoverColorText:{type:"string"},inputErrorHoverFontFamily:{type:"string"},inputErrorHoverFontSize:{type:"string"},inputErrorHoverFontLineHeight:{type:"string"},inputErrorHoverFontWeight:{type:"string"},inputErrorHoverBorder:{type:"string"},inputErrorHoverBorderRadius:{type:"string"},inputErrorHoverBoxShadow:{type:"string"},inputErrorFocusColorBackground:{type:"string"},inputErrorFocusColorText:{type:"string"},inputErrorFocusFontFamily:{type:"string"},inputErrorFocusFontSize:{type:"string"},inputErrorFocusFontLineHeight:{type:"string"},inputErrorFocusFontWeight:{type:"string"},inputErrorFocusBorder:{type:"string"},inputErrorFocusBorderRadius:{type:"string"},inputErrorFocusBoxShadow:{type:"string"},inputErrorPlaceholderColorText:{type:"string"},inputErrorPlaceholderFontFamily:{type:"string"},inputErrorPlaceholderFontSize:{type:"string"},inputErrorPlaceholderFontLineHeight:{type:"string"},inputErrorPlaceholderFontWeight:{type:"string"},inputErrorSelectionColorText:{type:"string"},inputErrorSelectionColorBackground:{type:"string"}},default:{},required:[]},lk=["email","organization","phoneNumber","city","country","region","postalCode","address","address2"],ck=["poNumber"],uk={type:"object",properties:{displayOptions:{type:"object",properties:{buttonColor:{type:"string",default:"black"},buttonHeight:{type:"string",pattern:"^[0-9]+px$",default:"48px"},buttonType:{type:"string",default:"plain"}},default:{}}},default:{},required:[]},dk={type:"object",properties:{compactExpressInstruments:{type:"boolean",default:!1},address:{type:"object",properties:{name:{type:"string",enum:["default","combined","stacked"],default:"default"},region:{type:"string",enum:["default","split","stacked"],default:"default"},show:{type:"array",default:[],items:{type:"string",enum:["all",...lk]}},hide:{type:"array",default:[],items:{type:"string",enum:["all",...lk]}},require:{type:"array",default:[],items:{type:"string",enum:lk}}},default:{},required:[]},paypal:{type:"object",properties:{buttonHeight:{type:"number",default:48}},default:{},required:[]},googlePay:uk,applePay:uk,additionalFields:{type:"object",properties:{show:{type:"array",default:[],items:{type:"string",enum:[...ck]}},require:{type:"array",default:[],items:{type:"string",enum:[...ck]}}}}},default:{},required:[]},pk=["items","transactionId","invoiceId","money","deposit","payout"],mk={title:"Mount Options Schema",type:"object",properties:{organizationId:{type:"string"},publishableKey:{type:"string"},websiteId:{type:"string"},items:{type:"array",items:{type:"object",oneOf:[{properties:{planId:{type:"string"},thumbnail:{type:"string"},quantity:{type:"number"}}},{properties:{planId:{type:"string"},thumbnail:{type:"string"},quantity:{type:"object",properties:{default:{type:"number"},minimum:{type:"number"},maximum:{type:"number"},multipleOf:{type:"number"}}}}}],required:["planId","quantity"]},minItems:1},money:{type:"object",properties:{amount:{type:"number"},currency:{type:"string",minLength:3,maxLength:3}},required:["amount","currency"]},invoiceId:{type:"string"},transactionId:{type:"string"},deposit:zm,payout:{type:"object",properties:{payoutRequestId:{type:"string"}},required:["payoutRequestId"]},jwt:{type:"string"},addons:ok,bumpOffer:ok,form:{default:".rebilly-instruments",type:["string","object"],oneOf:[{type:"string"},{type:"object",properties:{id:{type:"string"}}}]},summary:{default:".rebilly-instruments-summary",type:["string","object"],oneOf:[{type:"string"},{type:"object",properties:{id:{type:"string"}}}]},apiMode:{type:"string",enum:["sandbox","live"]},transactionType:{type:"string",enum:["purchase","setup"],default:"purchase"},css:{type:"string"},theme:ik,i18n:sk,countryCode:{type:"string",default:"US"},locale:{type:"string",default:"auto"},paymentInstruments:dk,features:{type:"object",properties:{enableTelemetry:{type:"boolean",default:!0},hideConfirmation:{type:"boolean",default:!1},hideResult:{type:"boolean",default:!1},fullPageRedirect:{type:"boolean",default:!1},showCoupons:{type:"array",items:{type:"string",enum:["summary","confirmation"]}}},default:{}},_dev:{type:"object",properties:{paymentMethodsUrl:{type:"string",default:"https://forms.local.rebilly.dev:3000"},liveUrl:{type:"string"},sandboxUrl:{type:"string"},framePayScriptLink:{type:"string"},framePayStyleLink:{type:"string"}}}},required:["apiMode"],dependentRequired:{...["invoiceId","transactionId","deposit","payout"].reduce(((e,t)=>({...e,[`${t}`]:["jwt"]})),{})},anyOf:[...pk.map((e=>{const t=pk.filter((t=>t!==e));return{if:{required:[e]},then:{properties:{...t.reduce(((e,t)=>({...e,[t]:!1})),{})}},else:!1}})),{required:["jwt"]}]};class fk extends Error{constructor(e){super(e),this.name="Rebilly Instruments Configuration Error"}trimStack(){return Error.captureStackTrace(this,fk),this}}const hk=new ak({allErrors:!0,removeAdditional:!0,useDefaults:!0}).compile(mk);function yk(e){const t=function(e){return Object.assign(JSON.parse(JSON.stringify(e)),{form:e.form,summary:e.summary})}(e);return hk(t)?t:(hk.errors.forEach((t=>{let n,r,a,o="",s=t.instancePath.substring(1).replace(/\//gi,".");switch(s=s.replace(/\.\d+/gi,(e=>`[${e.replace(".","")}]`)),s.length||(s="options"),t.keyword){case"if":case"false schema":break;case"required":if(t.schemaPath.match(/(oneOf|anyOf)/))break;o=`${s} ${t.message}`;break;case"oneOf":case"anyOf":console.error(new fk(`${s} ${t.message}, see schemas below.`).trimStack()),r=t.schemaPath.replace("#/","").split("/"),n=mk,r.forEach((e=>{n=n[e]})),n.forEach((e=>{const n=JSON.stringify(e,null,2);console.error(`${s} ${t.keyword} schema.\n${n}`)}));break;case"enum":a=s.split(".").reduce(((e,t)=>e[t]),e),o=`${s} ${t.message}: ${t.params.allowedValues}. received: ${a}`;break;case"dependentRequired":case"maxLength":case"minItems":case"pattern":o=`${s} ${t.message}`;break;default:o=`Error with ${s} - See error message`,console.error(t)}o&&console.error(new fk(o).trimStack())})),console.error(new fk("Configuration is invalid").trimStack()),null)}const gk=({options:e={}}={})=>{let t=yk(e);return t&&(t=function(e){if(e.jwt&&!e.publishableKey){const{merchant:t,claims:{transactionId:n,invoiceId:r,websiteId:a,cashierRequestId:o}}=gf(e.jwt);Object.entries({organizationId:t,transactionId:n,invoiceId:r,websiteId:a}).forEach((([t,n])=>{n&&(e[t]=n)})),o&&!e.deposit&&(e.deposit=Object.assign({},{depositRequestId:o}))}return e}(t),t=function(e){var t;return!Um(e.deposit)&&(null==(t=e.deposit)?void 0:t.currency)?(e.deposit=to({editable:!0,buttons:[],customAmount:{minimum:1,maximum:1e12,multipleOf:1}},e.deposit||{}),Number.isNaN(e.deposit.amount)&&e.deposit.buttons&&e.deposit.buttons.length>0&&([e.deposit.amount]=e.deposit.buttons)):Um(e.deposit)&&(e.deposit=to({customAmount:{minimum:1,maximum:1e12,multipleOf:1}},e.deposit||{})),e.items&&(e.items=e.items.map((e=>({...e,quantity:Xd(e)})))),e}(t),t=function(e){var t;return Object.assign({},e,{_computed:{version:"9.32.2",paymentMethodsUrl:(null==(t=e._dev)?void 0:t.paymentMethodsUrl)??"https://forms.secure-payments.app"}})}(t)),t};async function bk(){const{_dev:e}=lo.options||{},t={script:(null==e?void 0:e.framePayScriptLink)||"https://framepay.rebilly.com/framepay.js",style:(null==e?void 0:e.framePayStyleLink)||"https://framepay.rebilly.com/framepay.css"};return new Promise((e=>{const n=document.createElement("link");n.setAttribute("href",t.style),n.setAttribute("rel","stylesheet"),document.head.prepend(n);const r=document.createElement("script");r.setAttribute("src",t.script),r.onload=()=>e(),document.head.append(r)}))}const vk=ve({aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),wk="a-f\\d",kk=`#?[${wk}]{3}[${wk}]?`,$k=`#?[${wk}]{6}([${wk}]{2})?`,Ek=new RegExp(`[^#${wk}]`,"gi"),Sk=new RegExp(`^${kk}$|^${$k}$`,"i");const _k=ve(((e,t={})=>{if("string"!=typeof e||Ek.test(e)||!Sk.test(e))throw new TypeError("Expected a valid hex string");let n=1;8===(e=e.replace(/^#/,"")).length&&(n=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),4===e.length&&(n=Number.parseInt(e.slice(3,4).repeat(2),16)/255,e=e.slice(0,3)),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const r=Number.parseInt(e,16),a=r>>16,o=r>>8&255,s=255&r,i="number"==typeof t.alpha?t.alpha:n;if("array"===t.format)return[a,o,s,i];if("css"===t.format){return`rgb(${a} ${o} ${s}${1===i?"":` / ${Number((100*i).toFixed(2))}%`})`}return{red:a,green:o,blue:s,alpha:i}}));var Pk=new RegExp(/^#([a-f0-9]{3,4}|[a-f0-9]{4}(?:[a-f0-9]{2}){1,2})\b$/,"i");const xk="-?\\d*(?:\\.\\d+)",Ak=`(${xk}?)`,Ik=`(${xk}?%)`,Rk=`(${xk}?%?)`,Tk=`^\n hsla?\\(\n \\s*(-?\\d*(?:\\.\\d+)?(?:deg|rad|turn)?)\\s*,\n \\s*${Ik}\\s*,\n \\s*${Ik}\\s*\n (?:,\\s*${Rk}\\s*)?\n \\)\n $\n`.replace(/\n|\s/g,"");var Ck=new RegExp(Tk);const Ok=`^\n hsla?\\(\n \\s*(-?\\d*(?:\\.\\d+)?(?:deg|rad|turn)?)\\s*\n \\s+${Ik}\n \\s+${Ik}\n \\s*(?:\\s*\\/\\s*${Rk}\\s*)?\n \\)\n $\n`.replace(/\n|\s/g,"");var Nk=new RegExp(Ok);const Lk=`^\n rgba?\\(\n \\s*${Ak}\\s*,\n \\s*${Ak}\\s*,\n \\s*${Ak}\\s*\n (?:,\\s*${Rk}\\s*)?\n \\)\n $\n`.replace(/\n|\s/g,"");var jk=new RegExp(Lk);const Fk=`^\n rgba?\\(\n \\s*${Ik}\\s*,\n \\s*${Ik}\\s*,\n \\s*${Ik}\\s*\n (?:,\\s*${Rk}\\s*)?\n \\)\n $\n`.replace(/\n|\s/g,"");var Mk=new RegExp(Fk);const Hk=`^\n rgba?\\(\n \\s*${Ak}\n \\s+${Ak}\n \\s+${Ak}\n \\s*(?:\\s*\\/\\s*${Rk}\\s*)?\n \\)\n$\n`.replace(/\n|\s/g,"");var Bk=new RegExp(Hk);const Dk=`^\n rgba?\\(\n \\s*${Ik}\n \\s+${Ik}\n \\s+${Ik}\n \\s*(?:\\s*\\/\\s*${Rk}\\s*)?\n \\)\n$\n`.replace(/\n|\s/g,"");var qk=new RegExp(Dk);var Uk=new RegExp(/^transparent$/,"i");const zk=(e,t,n)=>Math.min(Math.max(t,e),n),Vk=e=>{let t=e;return"number"!=typeof t&&(t=t.endsWith("%")?255*parseFloat(t)/100:parseFloat(t)),zk(Math.round(t),0,255)},Wk=e=>zk(parseFloat(e),0,100);function Kk(e){let t=e;return"number"!=typeof t&&(t=t.endsWith("%")?parseFloat(t)/100:parseFloat(t)),zk(t,0,1)}function Gk([,e,t,n,r=1]){return{type:"rgb",values:[e,t,n].map(Vk),alpha:Kk(null===r?1:r)}}
29
29
  /**
30
30
  * parse-css-color
31
31
  * @version v0.1.2
@@ -49,4 +49,4 @@ var RebillyInstruments=function(){"use strict";function e(e,t){const n=Object.cr
49
49
  * @version v2.1.1
50
50
  * @link http://noeldelgado.github.io/values.js/
51
51
  * @license MIT
52
- */class I${constructor(e="#000",t="base",n=0){[this.rgb,this.alpha,this.type,this.weight]=[[0,0,0],1,t,n];const r=null===e?"#000":e;if("string"!=typeof r)throw new TypeError(`Input should be a string: ${r}`);const a=x$(r);if(!a)throw new Error(`Unable to parse color from string: ${r}`);return this[`_setFrom${a.type.toUpperCase()}`]([...a.values,a.alpha])}get hex(){return this.hexString().replace(/^#/,"")}setColor(e){const t=x$(e);return t?this[`_setFrom${t.type.toUpperCase()}`]([...t.values,t.alpha]):null}tint(e,t=A$(e,50)){return new I$(`rgb(${r$("#fff",this.rgbString(),t).rgba})`,"tint",t)}shade(e,t=A$(e,50)){return new I$(`rgb(${r$("#000",this.rgbString(),t).rgba})`,"shade",t)}tints(e,t=A$(e,10)){return Array.from({length:100/t},((e,n)=>this.tint((n+1)*t)))}shades(e,t=A$(e,10)){return Array.from({length:100/t},((e,n)=>this.shade((n+1)*t)))}all(e=10){return[...this.tints(e).reverse(),Object.assign(this),...this.shades(e)]}hexString(){return Zk(this.alpha>=1?this.rgb:[...this.rgb,this.alpha])}rgbString(){const e=(this.alpha>=1?this.rgb:[...this.rgb,this.alpha]).join(", ");return`${this.alpha>=1?"rgb":"rgba"}(${e})`}getBrightness(){return Math.round(this.rgb.reduce(((e,t)=>e+t))/765*100)}_setFromRGB([e,t,n,r]){return[this.rgb,this.alpha]=[[e,t,n],r],this}_setFromHSL([e,t,n,r]){return[this.rgb,this.alpha]=[Xk([e,t,n]).map(Math.round),r],this}}I$.VERSION="v2.1.1";const R$=e=>new I$(e);function T$(e,t=1){if(null===e)return e;const n=R$(e);return n.alpha=t,n.rgbString()}const C$=e=>T$(e,.5),O$=(e,t)=>{if(null===e)return e;return R$(e).shade(t).hexString()};class N${constructor(e){this.allStyles=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial","inherit"],this.str=e||"";const t=this.allStyles.find((e=>this.str.includes(e)));if(null==t)throw new Error("Invalid border style.");const n=this.str.split(t).map((e=>e.trim()));this.border=[n[0],t,n[1]]}get stylePosition(){let e=0;return 3===this.border.length?e=1:2===this.border.length&&(e=this.allStyles.includes(this.border[0])?0:1),e}updateColor(e){return this.border[this.stylePosition+1]=e,this}get value(){return this.border.join(" ")}}const L$=new Proxy({colorPrimary:{fallback:{type:"static",value:"#0044D4"}},colorBackground:{fallback:{type:"static",value:"#FFFFFF"}},colorText:{fallback:{type:"static",value:"#0D2B3E"}},colorMutedText:{fallback:{type:"func",value:e=>C$(e.colorText)}},colorMutedBorder:{fallback:{type:"func",value:e=>e.colorTextProvided?T$(e.colorText,.25):"#DCE3EA"}},colorDanger:{fallback:{type:"static",value:"#CD5C5C"}},fontFamily:{fallback:{type:"static",value:"-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial sans-serif"}},fontSizeBase:{fallback:{type:"static",value:"16px"}},fontWeightBase:{fallback:{type:"static",value:"500"}},fontLineHeightBase:{fallback:{type:"func",value:e=>`calc(${e.fontSizeBase} * 1.5)`}},fontSmooth:{fallback:{type:"static",value:"auto"}},borderRadius:{fallback:{type:"static",value:"6px"}},headingFontFamily:{fallback:{type:"variable",value:"fontFamily"}},headingFontWeight:{fallback:{type:"static",value:"600"}},headingColorText:{fallback:{type:"variable",value:"colorText"}},buttonColorBackground:{fallback:{type:"variable",value:"colorPrimary"}},buttonColorText:{fallback:{type:"static",value:"#FFFFFF"}},buttonFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonBorder:{fallback:{type:"static",value:"1px solid transparent"}},buttonBorderColor:{fallback:{type:"variable",value:"colorPrimary"}},buttonBorderWidth:{fallback:{type:"static",value:"1px"}},buttonBorderType:{fallback:{type:"static",value:"solid"}},buttonBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonBoxShadow:{fallback:{type:"static",value:"none"}},buttonSecondaryColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryColorText:{fallback:{type:"variable",value:"colorText"}},buttonSecondaryFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonSecondaryFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonSecondaryFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonSecondaryFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonSecondaryBorder:{fallback:{type:"func",value:e=>`1px solid ${e.colorMutedBorder}`}},buttonSecondaryBorderColor:{fallback:{type:"variable",value:"colorMutedBorder"}},buttonSecondaryBorderWidth:{fallback:{type:"static",value:"1px"}},buttonSecondaryBorderType:{fallback:{type:"static",value:"solid"}},buttonSecondaryBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonSecondaryBoxShadow:{fallback:{type:"static",value:"none"}},buttonHoverColorBackground:{fallback:{type:"func",value:e=>e.buttonColorBackgroundProvided?O$(e.buttonColorBackground,20):O$(e.colorPrimary,20)}},buttonHoverColorText:{fallback:{type:"variable",value:"buttonColorText"}},buttonHoverFontFamily:{fallback:{type:"variable",value:"buttonFontFamily"}},buttonHoverFontSize:{fallback:{type:"variable",value:"buttonFontSize"}},buttonHoverFontLineHeight:{fallback:{type:"variable",value:"buttonFontLineHeight"}},buttonHoverFontWeight:{fallback:{type:"variable",value:"buttonFontWeight"}},buttonHoverBorder:{fallback:{type:"func",value:e=>{if(e.buttonBorderProvided)return e.buttonBorder;return new N$(e.buttonBorder).updateColor(e.buttonHoverColorBackground).value}}},buttonHoverBorderColor:{fallback:{type:"variable",value:"colorPrimary"}},buttonHoverBorderWidth:{fallback:{type:"variable",value:"buttonBorderWidth"}},buttonHoverBorderType:{fallback:{type:"variable",value:"buttonBorderType"}},buttonHoverBorderRadius:{fallback:{type:"variable",value:"buttonBorderRadius"}},buttonHoverBoxShadow:{fallback:{type:"variable",value:"buttonBoxShadow"}},buttonSecondaryHoverColorBackground:{fallback:{type:"func",value:e=>(e.colorBackgroundProvided,O$(e.colorBackground,3))}},buttonSecondaryHoverColorText:{fallback:{type:"variable",value:"colorText"}},buttonSecondaryHoverFontFamily:{fallback:{type:"variable",value:"buttonSecondaryFontFamily"}},buttonSecondaryHoverFontSize:{fallback:{type:"variable",value:"buttonSecondaryFontSize"}},buttonSecondaryHoverFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryFontLineHeight"}},buttonSecondaryHoverFontWeight:{fallback:{type:"variable",value:"buttonSecondaryFontWeight"}},buttonSecondaryHoverBorder:{fallback:{type:"variable",value:"buttonSecondaryBorder"}},buttonSecondaryHoverBorderColor:{fallback:{type:"variable",value:"buttonSecondaryBorderColor"}},buttonSecondaryHoverBorderWidth:{fallback:{type:"variable",value:"buttonSecondaryBorderWidth"}},buttonSecondaryHoverBorderType:{fallback:{type:"variable",value:"buttonSecondaryBorderType"}},buttonSecondaryHoverBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryBorderRadius"}},buttonSecondaryHoverBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryBoxShadow"}},buttonActiveColorBackground:{fallback:{type:"variable",value:"buttonHoverColorBackground"}},buttonActiveColorText:{fallback:{type:"variable",value:"buttonHoverColorText"}},buttonActiveFontFamily:{fallback:{type:"variable",value:"buttonHoverFontFamily"}},buttonActiveFontSize:{fallback:{type:"variable",value:"buttonHoverFontSize"}},buttonActiveFontLineHeight:{fallback:{type:"variable",value:"buttonHoverFontLineHeight"}},buttonActiveFontWeight:{fallback:{type:"variable",value:"buttonHoverFontWeight"}},buttonActiveBorder:{fallback:{type:"variable",value:"buttonHoverBorder"}},buttonActiveBorderColor:{fallback:{type:"variable",value:"buttonHoverBorderColor"}},buttonActiveBorderWidth:{fallback:{type:"variable",value:"buttonHoverBorderWidth"}},buttonActiveBorderType:{fallback:{type:"variable",value:"buttonHoverBorderType"}},buttonActiveBorderRadius:{fallback:{type:"variable",value:"buttonHoverBorderRadius"}},buttonActiveBoxShadow:{fallback:{type:"variable",value:"buttonHoverBoxShadow"}},buttonSecondaryActiveColorBackground:{fallback:{type:"variable",value:"buttonSecondaryHoverColorBackground"}},buttonSecondaryActiveColorText:{fallback:{type:"variable",value:"buttonSecondaryHoverColorText"}},buttonSecondaryActiveFontFamily:{fallback:{type:"variable",value:"buttonSecondaryHoverFontFamily"}},buttonSecondaryActiveFontSize:{fallback:{type:"variable",value:"buttonSecondaryHoverFontSize"}},buttonSecondaryActiveFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontLineHeight"}},buttonSecondaryActiveFontWeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontWeight"}},buttonSecondaryActiveBorder:{fallback:{type:"variable",value:"buttonSecondaryHoverBorder"}},buttonSecondaryActiveBorderColor:{fallback:{type:"variable",value:"buttonSecondaryHoverBorderColor"}},buttonSecondaryActiveBorderWidth:{fallback:{type:"variable",value:"buttonSecondaryHoverBorderWidth"}},buttonSecondaryActiveBorderType:{fallback:{type:"variable",value:"buttonSecondaryHoverBorderType"}},buttonSecondaryActiveBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryHoverBorderRadius"}},buttonSecondaryActiveBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryHoverBoxShadow"}},inputColorBackground:{fallback:{type:"static",value:"transparent"}},inputColorText:{fallback:{type:"variable",value:"colorText"}},inputFontFamily:{fallback:{type:"variable",value:"fontFamily"}},inputFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},inputFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},inputFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},inputBorder:{fallback:{type:"func",value:e=>`1px solid ${O$(e.colorMutedBorder,4)}`}},inputBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},inputBoxShadow:{fallback:{type:"static",value:"none"}},inputHoverColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputHoverColorText:{fallback:{type:"variable",value:"inputColorText"}},inputHoverFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputHoverFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputHoverFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputHoverFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputHoverBorder:{fallback:{type:"variable",value:"inputBorder"}},inputHoverBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputHoverBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputFocusColorBackground:{fallback:{type:"variable",value:"inputHoverColorBackground"}},inputFocusColorText:{fallback:{type:"variable",value:"inputHoverColorText"}},inputFocusFontFamily:{fallback:{type:"variable",value:"inputHoverFontFamily"}},inputFocusFontSize:{fallback:{type:"variable",value:"inputHoverFontSize"}},inputFocusFontLineHeight:{fallback:{type:"variable",value:"inputHoverFontLineHeight"}},inputFocusFontWeight:{fallback:{type:"variable",value:"inputHoverFontWeight"}},inputFocusBorder:{fallback:{type:"func",value:e=>{if(e.inputHoverBorderProvided)return e.inputHoverBorder;return new N$(e.inputBorder).updateColor(e.colorPrimary).value}}},inputFocusBorderRadius:{fallback:{type:"variable",value:"inputHoverBorderRadius"}},inputFocusBoxShadow:{fallback:{type:"func",value:e=>`0 0 0 1px ${e.colorPrimary}`}},inputPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputColorTextProvided?C$(e.inputColorText):e.colorMutedText}},inputPlaceholderFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputPlaceholderFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputPlaceholderFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputSelectionColorText:{fallback:{type:"static",value:"initial"}},inputSelectionColorBackground:{fallback:{type:"static",value:"highlight"}},inputErrorColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputErrorColorText:{fallback:{type:"variable",value:"colorDanger"}},inputErrorFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputErrorFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputErrorFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputErrorFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputErrorBorder:{fallback:{type:"func",value:e=>{if(e.inputBorderProvided){return new N$(e.inputBorder).updateColor(e.colorDanger).value}return`1px solid ${e.colorDanger}`}}},inputErrorBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputErrorBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputErrorHoverColorBackground:{fallback:{type:"variable",value:"inputErrorColorBackground"}},inputErrorHoverColorText:{fallback:{type:"variable",value:"inputErrorColorText"}},inputErrorHoverFontFamily:{fallback:{type:"variable",value:"inputErrorFontFamily"}},inputErrorHoverFontSize:{fallback:{type:"variable",value:"inputErrorFontSize"}},inputErrorHoverFontLineHeight:{fallback:{type:"variable",value:"inputErrorFontLineHeight"}},inputErrorHoverFontWeight:{fallback:{type:"variable",value:"inputErrorFontWeight"}},inputErrorHoverBorder:{fallback:{type:"variable",value:"inputErrorBorder"}},inputErrorHoverBorderRadius:{fallback:{type:"variable",value:"inputErrorBorderRadius"}},inputErrorHoverBoxShadow:{fallback:{type:"variable",value:"inputErrorBoxShadow"}},inputErrorFocusColorBackground:{fallback:{type:"variable",value:"inputErrorHoverColorBackground"}},inputErrorFocusColorText:{fallback:{type:"variable",value:"inputErrorHoverColorText"}},inputErrorFocusFontFamily:{fallback:{type:"variable",value:"inputErrorHoverFontFamily"}},inputErrorFocusFontSize:{fallback:{type:"variable",value:"inputErrorHoverFontSize"}},inputErrorFocusFontLineHeight:{fallback:{type:"variable",value:"inputErrorHoverFontLineHeight"}},inputErrorFocusFontWeight:{fallback:{type:"variable",value:"inputErrorHoverFontWeight"}},inputErrorFocusBorder:{fallback:{type:"variable",value:"inputErrorHoverBorder"}},inputErrorFocusBorderRadius:{fallback:{type:"variable",value:"inputErrorHoverBorderRadius"}},inputErrorFocusBoxShadow:{fallback:{type:"variable",value:"inputErrorHoverBoxShadow"}},inputErrorPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputErrorColorTextProvided?C$(e.inputErrorColorText):C$(e.colorDanger)}},inputErrorPlaceholderFontFamily:{fallback:{type:"variable",value:"inputPlaceholderFontFamily"}},inputErrorPlaceholderFontSize:{fallback:{type:"variable",value:"inputPlaceholderFontSize"}},inputErrorPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputPlaceholderFontLineHeight"}},inputErrorPlaceholderFontWeight:{fallback:{type:"variable",value:"inputPlaceholderFontWeight"}},inputErrorSelectionColorText:{fallback:{type:"variable",value:"inputSelectionColorText"}},inputErrorSelectionColorBackground:{fallback:{type:"variable",value:"inputSelectionColorBackground"}},labels:{fallback:{type:"static",value:"floating"}}},{get(e,t,n){if(t in e){if(e[t].value)return e[t].value;const{type:r,value:a}=e[t].fallback;if("static"===r)return a;if("variable"===r)return`var(--rebilly-${a})`;if("func"===r&&"function"==typeof a)return a(n)}if(t.endsWith("Provided")){const n=t.replace("Provided","");if(n in e)return e[n].isProvided}},set:(e,t,n)=>{if(!(t in e)||!n)throw new Error(`Invalid theme option provided: ${t}`);return e[t].value=n,e[t].isProvided=!0,!0}}),j$=class e{constructor(e={}){this.overrides=e,this.theme=L$}overrideTheme(){Object.keys(this.overrides).forEach((e=>{this.theme[e]=this.overrides[e]}))}get cssVars(){return Object.keys(this.theme).filter((t=>!e.nonCssProperties.includes(t))).map(((e,t)=>`${t?" ":""}--rebilly-${e}: ${this.theme[e]};`)).join("\n")}build(){return this.overrideTheme(),{cssVars:this.cssVars}}};j$.nonCssProperties=["labels"];let F$=j$;function M$(e){let t=e;return t=t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,""),t=t.replace(/\s{2,}/g," "),t=t.replace(/\s([{:}])\s/g,"$1"),t=t.replace(/([;,])\s/g,"$1"),t=t.replace(/\s!/g,"!"),t}const H$=()=>{io(lo.options);const{theme:e={},css:t}=lo.options,n=(e=>{const t=new F$(e).build();var n;return`\n ${n=t,`\n/* Instruments 'global' variables\n------------------------------------------------------------ */\n:root, :host {\n ${n.cssVars}\n\n --rebilly-fontWeight400: 400;\n --rebilly-fontWeight500: 500;\n --rebilly-fontWeight600: 600;\n --rebilly-fontScaleFactor: 1.5;\n --rebilly-fontScaleFactorS: 0.875;\n --rebilly-fontSizeS: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactorS));\n --rebilly-fontLineHeightS: calc(var(--rebilly-fontSizeS) * 1);\n\n --rebilly-fontSizeL: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactor));\n --rebilly-fontLineHeightL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-fontMarginTopL: 0;\n --rebilly-fontMarginBottomL: var(--rebilly-fontLineHeightBase);\n\n --rebilly-spacing2xs: calc(var(--rebilly-fontLineHeightBase) / 6);\n --rebilly-spacingXs: calc(var(--rebilly-fontLineHeightBase) / 4);\n --rebilly-spacingS: calc(var(--rebilly-fontLineHeightBase) / 2);\n --rebilly-spacingM: var(--rebilly-fontLineHeightBase);\n --rebilly-spacingL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-spacingXl: calc(var(--rebilly-fontLineHeightBase) * 4);\n\n --rebilly-spacingFormElementMinHeight: calc(var(--rebilly-spacingM) * 1.83333);\n\n --rebilly-summaryLoaderMinHeight: var(--rebilly-fontLineHeightBase);\n --rebilly-methodLoaderMinHeight: calc((4 * var(--rebilly-spacingFormElementMinHeight)) + (2 * var(--rebilly-fontLineHeightBase)) + (2 * var(--rebilly-spacingM)) + var(--rebilly-spacing2xs) + var(--rebilly-fontSizeS) + calc(2 * (var(--rebilly-spacingXs) + var(--rebilly-spacingS))) + var(--rebilly-spacingL));\n}\n\n/* Base, Typography\n------------------------------------------------------------ */\n/* Base setup for top level elements */\n.rebilly-instruments-content {\n color: var(--rebilly-colorText);\n background: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeBase);\n font-weight: var(--rebilly-fontWeightBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-fontFamily);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-align: left;\n transition: all 200ms;\n font-smooth: var(--rebilly-fontSmooth);\n padding: 2px;\n font-display: swap;\n}\n\n/* Views. Method Selector\n------------------------------------------------------------ */\n.rebilly-instruments-method-selector.has-express-compact {\n padding-top: var(--rebilly-spacingS);\n}\n\n.rebilly-instruments-amount-selector {\n padding: 2px;\n}\n\n/* Express Methods\n------------------------------------------------------------ */\n@-webkit-keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n\n@keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n\n.rebilly-instruments-express-methods { padding: 2px; }\n\n.rebilly-instruments-express-methods.is-compact {\n border: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS);\n padding-top: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS));\n padding-top: calc(var(--rebilly-fontSizeBase) + var(--rebilly-spacing2xs));\n border-radius: var(--rebilly-borderRadius);\n position: relative;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-iframe {\n display: block;\n margin-bottom: 0;\n height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > * {\n border-radius: 6px;\n margin-bottom: var(--rebilly-spacingS);\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n min-height: 48px;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 0px;\n flex: 1 1 0px;\n max-width: 260px;\n margin: 0 var(--rebilly-spacingXs);\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:first-child {\n margin-left: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin-right: 0;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-label {\n display: none;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-label {\n position: absolute;\n font-family: var(--rebilly-fontFamily);\n top: 0; left: 50%;\n -webkit-transform: translateX(-50%) translateY(-50%);\n transform: translateX(-50%) translateY(-50%);\n color: var(--rebilly-colorText);\n padding: var(--rebilly-spacing2xs) var(--rebilly-spacingM);\n line-height: 1;\n background: var(--rebilly-colorBackground);\n display: inline-block;\n font-weight: var(--rebilly-fontWeightBase);\n min-height: auto;\n margin: 0;\n white-space: nowrap;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-google-pay-method {\n border-radius: 100px;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-google-pay-method iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n@media (max-width: 600px) {\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n max-width: 100%;\n margin: 0 0 var(--rebilly-spacingS);\n }\n \n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n }\n}\n\n/* Components. Divider\n------------------------------------------------------------ */\n.rebilly-instruments-divider {\n line-height: var(--rebilly-fontLineHeightBase);\n padding: var(--rebilly-spacingM) 0;\n margin: 0;\n position: relative;\n outline: 0;\n border: 0;\n text-align: center;\n font-family: var(--rebilly-fontFamily);\n}\n\n.rebilly-instruments-divider-s { padding: var(--rebilly-spacingS) 0; }\n.rebilly-instruments-divider-xs { padding: var(--rebilly-spacingXs) 0; }\n\n.rebilly-instruments-divider::before {\n background: var(--rebilly-colorMutedBorder);\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n height: 1px;\n}\n\n.rebilly-instruments-divider .rebilly-instruments-divider-label {\n color: var(--rebilly-colorMutedText);\n font-weight: var(--rebilly-fontWeightBase);\n padding: 0 var(--rebilly-spacingM);\n line-height: var(--rebilly-fontLineHeightS);\n background-color: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeS);\n position: relative;\n display: inline-block;\n}\n\n/* Components. Icons\n------------------------------------------------------------ */\n.rebilly-instruments-icon {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n/* Components. Forms. Checkboxes\n------------------------------------------------------------ */\n.rebilly-instruments-form-field-checkbox {\n position: relative;\n opacity: 1;\n align-items: center;\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-start;\n cursor: pointer;\n transform: none;\n}\n\n.rebilly-instruments-form-field-checkbox > * {\n cursor: pointer;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"] {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.rebilly-instruments-form-field-checkbox span {\n position: relative;\n top: 0;\n left: 0;\n width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n min-width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n border-radius: 4px;\n box-shadow: inset 0 0 0 2px var(--rebilly-colorMutedBorder);\n margin-right: var(--rebilly-spacingS);\n background-color: transparent;\n transition: all 200ms;\n}\n\n.rebilly-instruments-form-field-checkbox span:after {\n content: '';\n position: absolute;\n border: solid var(--rebilly-colorPrimary);\n width: calc(var(--rebilly-spacingXs) + var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingXs) - var(--rebilly-spacing2xs) + 2px);\n border-width: 2px 2px 0 0;\n border-radius: 2px;\n top: 50%;\n left: 50%;\n opacity: 0;\n transform: translateY(-60%) translateX(-50%) rotate(135deg);\n transition: all 0.2s ease;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:focus ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span:after {\n opacity: 1;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:disabled ~ span {\n opacity: 0.6;\n}\n\n/* Vendor, Postmate\n------------------------------------------------------------ */\n.rebilly-instruments-iframe {\n border: none;\n width: 100%;\n height: 0;\n padding: 0;\n}\n\n.rebilly-instruments-iframe-overlay {\n top: -2px;\n left: -2px;\n width: calc(100vw + 2px);\n height: 100vh;\n min-height: calc(100vh + 4px);\n position: fixed;\n z-index: 99999999999999;\n}\n\n/* Views. Modal\n------------------------------------------------------------ */\n.rebilly-instruments-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n overflow-x: hidden;\n overflow-y: auto;\n z-index: 1055;\n padding: 30px;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n -webkit-transition: all 0.12s ease-in-out;\n transition: all 0.12s ease-in-out;\n background-color: rgba(0,0,0,0.7);\n opacity: 0\n}\n\n.rebilly-instruments-modal-overlay.is-visible {\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container {\n -webkit-transition: all .24s ease-in-out;\n transition: all .24s ease-in-out;\n position: relative;\n max-width: 750px;\n background: var(--rebilly-colorBackground);\n margin: 50px auto 20px;\n -webkit-box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n border-radius: 4px;\n -webkit-transform: translateY(-50px);\n transform: translateY(-50px);\n opacity: 0;\n}\n\n.rebilly-instruments-modal-container.is-visible {\n -webkit-transform: translateY(0);\n transform: translateY(0);\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container.is-redirect {\n max-width: 60vw;\n width: auto;\n}\n\n.rebilly-instruments-modal-content {\n -webkit-transition: all .15s;\n transition: all .15s;\n padding: 20px;\n overflow: hidden;\n background-color: var(--rebilly-colorBackground);\n text-align: center;\n border-radius: 4px;\n}\n\n.rebilly-instruments-modal-content .rebilly-instruments-iframe {\n -webkit-transition: all .15s;\n transition: all .15s;\n height: auto;\n min-height: 360px;\n}\n\n.rebilly-instruments-modal-container.is-redirect .rebilly-instruments-modal-content {\n padding: 0;\n}\n\n.rebilly-instruments-modal-close {\n position: absolute;\n width: 30px;\n height: 30px;\n top: -40px;\n right: 0;\n fill: #FFF;\n cursor: pointer;\n}\n\n.rebilly-instruments-modal-close:hover{\n color: #000;\n}\n\n@media screen and (max-width: 480px) {\n .rebilly-instruments-modal-container.is-redirect {\n max-width: 96vw;\n margin: 20px auto 20px;\n }\n}\n\n/* Components. Loader\n------------------------------------------------------------ */\n.rebilly-instruments-loader {\n text-align: left;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background-color: var(--rebilly-colorBackground);\n z-index: 1000;\n -webkit-transition: all 200ms;\n transition: all 200ms;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader.is-active {\n display: block;\n}\n\n/* Type */\n.rebilly-instruments-loader p {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n.rebilly-instruments-loader small {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: 1;\n}\n\n/* Summary */\n.rebilly-instruments-summary-loader-total p.total {\n font-family: var(--rebilly-fontFamily);\n font-size: var(--rebilly-fontSizeL);\n font-weight: var(--rebilly-headingFontWeight);\n}\n\n/* Methods */\n.rebilly-instruments-methods-loader-card-icon {\n width: calc(var(--rebilly-fontLineHeightBase) + 10px);\n height: var(--rebilly-fontLineHeightBase);\n margin-left: var(--rebilly-spacing2xs);\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-methods-loader-form-fields { margin: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS)) 0; }\n\n/* Spinner */\n.rebilly-instruments-loader-spinner {\n top: 50%;\n left: 50%;\n position: absolute;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: 2px solid transparent;\n border-top: 2px solid var(--rebilly-colorPrimary);\n border-radius: 50%;\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n margin-top: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n margin-left: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n -webkit-animation: spin 0.5s ease infinite;\n animation: spin 0.5s ease infinite;\n}\n\n@-webkit-keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n@keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n/* Utils */\n.rebilly-instruments-loader-display-flex { display: -webkit-box; display: -ms-flexbox; display: flex; }\n.rebilly-instruments-loader-align-center { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }\n.rebilly-instruments-loader-justify-space-between { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }\n.rebilly-instruments-loader-justify-end { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; }\n\n.is-el-loading {\n position: relative;\n color: transparent!important;\n}\n\n.is-el-loading::before {\n position: absolute;\n content: '';\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader-form-el {\n width: 100%;\n min-height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-loader-form-label {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-loader-form-el.is-button {\n margin-top: var(--rebilly-spacingL);\n text-align: center;\n font-size: var(--rebilly-buttonFontSize);\n font-family: var(--rebilly-buttonFontFamily);\n line-height: var(--rebilly-buttonFontLineHeight);\n padding: var(--rebilly-spacingS);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n background: var(--rebilly-buttonColorBackground);\n color: transparent;\n border-radius: var(--rebilly-buttonBorderRadius);\n font-weight: var(--rebilly-buttonFontWeight);\n border: var(--rebilly-buttonBorder);\n -webkit-box-shadow: var(--rebilly-buttonBoxShadow);\n box-shadow: var(--rebilly-buttonBoxShadow);\n outline: none;\n cursor: not-allowed;\n opacity: 0.6; \n}\n\n.rebilly-instruments-methods-loader-card-icon.is-el-loading::before {\n border-radius: calc(var(--rebilly-borderRadius) / 2);\n}\n\n/* Error\n------------------------------------------------------------ */\n.rebilly-instruments-error-card {\n border: 1px solid var(--rebilly-colorDanger);\n border-radius: var(--rebilly-borderRadius);\n text-align: left;\n padding: var(--rebilly-spacingS);\n margin-bottom: var(--rebilly-spacingL);\n}\n.rebilly-instruments-error-card.not-closeable {\n margin-bottom: 0;\n}\n\n.rebilly-instruments-error-card-header {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n width: 100%;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n\n.rebilly-instruments-error-card-title {\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-headingFontFamily);\n margin: 0 0 var(--rebilly-spacingS);\n color: var(--rebilly-colorDanger);\n}\n\n.rebilly-instruments-error-card-close-button {\n cursor: pointer;\n background: transparent;\n border: none;\n padding: 0;\n}\n\n.rebilly-instruments-error-card-close-button svg {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n.rebilly-instruments-error-card-details {\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n.rebilly-instruments-error-card-details li,\n.rebilly-instruments-error-card-message {\n color: var(--rebilly-colorText);\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n\n/* Bump offer\n------------------------------------------------------------ */\n.rebilly-instruments-bump-offers {\n text-align: left;\n margin-bottom: calc(var(--rebilly-spacingM) + var(--rebilly-fontSizeS));\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-form-field-checkbox {\n margin-bottom: var(--rebilly-spacingS);\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-bump-offer-label {\n width: 100%;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item {\n border-bottom: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS) 0;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.rebilly-instruments-bump-offer-line-item:first-child {\n padding-top: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure {\n margin: 0 var(--rebilly-spacingS) 0 0;\n flex: 0 0 auto;\n width: 48px;\n height: 48px;\n border-radius: var(--rebilly-borderRadius);\n border: 1px solid var(--rebilly-colorMutedBorder);\n overflow: hidden;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure img {\n width: 100%;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis {\n flex: 1 2 auto;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-title {\n margin: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-description {\n color: var(--rebilly-colorMutedText);\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: var(--rebilly-fontLineHeightS);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown {\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--rebilly-colorMutedText);\n margin: 0 0 0 var(--rebilly-spacingS);\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown .rebilly-instruments-icon {\n fill: var(--rebilly-colorMutedText);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown-unit-price {\n color: var(--rebilly-colorText);\n}\n`}\n `})(e||{});return df({element:"style",attributes:{type:"text/css"},content:M$(n),target:lo.shadowRoot||"head"}),t&&df({element:"style",attributes:{type:"text/css"},content:M$(t),target:lo.shadowRoot||"head"}),n},B$=()=>{lo.translate.init(lo.options.locale,lo.options.i18n),lo.translate.translateItems()},D$=()=>{var e,t;if("auto"===lo.options.locale&&(null==(t=null==(e=lo.data.riskMetadata)?void 0:e.browserData)?void 0:t.language)){const{browserData:{language:e}}=lo.data.riskMetadata;lo.options.locale=e}return lo.translate.init(lo.options.locale,lo.options.i18n),B$};function q$(e){const t={};return function(e){const t={};function n(e){const r=e.match(/var\((.+?)\)/g);if(r){let a=e;return r.forEach((n=>{const r=n.match(/\((.*)\)/i);r&&(a=e.replace(n,t[r[1]]))})),n(a)}return e}return Array.from(e.matchAll(/(--rebilly.*(?=:))[:\s](.*(?=;))/g)).forEach((e=>{t[e[1]]=e[2].trim()})),Object.entries(t).map((([e,t])=>[e,n(t)]))}(e).forEach((([e,n])=>{t[e]=n})),t}const U$=(e,t="")=>({color:e[`--rebilly-${t}ColorText`],fontFamily:e[`--rebilly-${t}FontFamily`],fontSize:e[`--rebilly-${t}FontSize`],fontWeight:e[`--rebilly-${t}FontWeight`],lineHeight:e[`--rebilly-${t}FontLineHeight`],background:e[`--rebilly-${t}ColorBackground`],boxShadow:e[`--rebilly-${t}BoxShadow`],borderColor:e[`--rebilly-${t}BorderColor`],borderWidth:e[`--rebilly-${t}BorderWidth`],borderType:e[`--rebilly-${t}BorderType`]}),z$=()=>{var e;const t=q$(`\n ${lo.mainStyleVars}\n ${(null==(e=lo.options)?void 0:e.css)||""}\n `);return{base:{...U$(t,"input"),":hover":U$(t,"inputHover"),":focus":U$(t,"inputFocus"),"::placeholder":U$(t,"inputPlaceholder"),"::selection":U$(t,"inputSelection")},invalid:{...U$(t,"inputError"),":hover":U$(t,"inputErrorHover"),":focus":U$(t,"inputErrorFocus"),"::placeholder":U$(t,"inputErrorPlaceholder"),"::selection":U$(t,"inputErrorSelection")},buttons:{base:{...U$(t,"buttonSecondary"),":hover":U$(t,"buttonSecondaryHover"),":focus":U$(t,"buttonSecondaryActive")},focus:{...U$(t,"buttonSecondary")},active:{...U$(t,"button"),":hover":U$(t,"buttonHover"),":focus":U$(t,"buttonActive")}}}};function V$({eventName:e,callback:t}){if(!Ys.includes(e))throw new Error(`${e} is not a supported event`);const n=Ks(e);Qs[n].addEventListener(t)}const W$=(e,t)=>`\n <div class="rebilly-instruments-modal-overlay">\n <div class="rebilly-instruments-modal-container ${t?`rebilly-instruments-${t}`:""} ${e?"is-redirect":""}">\n ${e?"":'\n <svg class="rebilly-instruments-modal-close" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <path d="m15 13.5858 7.2929-7.293c.3905-.3904 1.0237-.3904 1.4142 0 .3905.3906.3905 1.0238 0 1.4143L16.4142 15l7.293 7.2929c.3904.3905.3904 1.0237 0 1.4142-.3906.3905-1.0238.3905-1.4143 0L15 16.4142l-7.2929 7.293c-.3905.3904-1.0237.3904-1.4142 0-.3905-.3906-.3905-1.0238 0-1.4143L13.5858 15l-7.293-7.2929c-.3904-.3905-.3904-1.0237 0-1.4142.3906-.3905 1.0238-.3905 1.4143 0L15 13.5858Z" fill-rule="nonzero"/>\n </svg>\n '}\n <div class="rebilly-instruments-modal-content"></div>\n </div>\n </div>\n`;async function K$({name:e="",url:t="",model:n={},classListArray:r=[],close:a=(()=>{})}={}){var o,s;const i=null==(o=null==n?void 0:n.method)?void 0:o.method,l="rebilly-instruments-approval-url"===e;lo.form.insertAdjacentHTML("beforeend",W$(l,i));const c=lo.form.querySelector(".rebilly-instruments-modal-overlay"),u=lo.form.querySelector(".rebilly-instruments-modal-container"),d=lo.form.querySelector(".rebilly-instruments-modal-close"),p=lo.form.querySelector(".rebilly-instruments-modal-content");document.body.style.overflow="hidden",setTimeout((()=>{c.classList.add("is-visible"),u.classList.add("is-visible")}),240),lo.loader.addDOMElement({section:"modal",el:p}),lo.loader.startLoading({section:"modal",id:e});const m={options:lo.toModel().options,...n},f=await new si({name:e,url:t,model:m,classListArray:r,container:p}),h=(...e)=>{u.classList.remove("is-visible"),c.classList.remove("is-visible"),setTimeout((()=>{document.body.style.overflow="auto";const t=c.children;for(let e=0;e<t.length;e+=1)t[e].remove();c.remove(),a(...e),f.destroy()}),300)};return f.bindEventListeners({close:h,loader:lo.loader}),l||d.addEventListener("click",h),null==(s=f.component)||s.call("route",{name:"approval-url"}),f}async function G$({payload:e}){let t={websiteId:lo.options.websiteId,paymentInstruction:{token:e._raw.id},...e};lo.data.acceptBumpOffer?t.items=lo.options.bumpOffer:t.items=Yd(lo.options.items),lo.data.couponIds&&Array.isArray(lo.data.couponIds)&&(t.couponIds=lo.data.couponIds),lo.options.addons&&lo.data.addons&&Array.isArray(lo.data.addons)&&lo.options.addons.forEach((e=>{lo.data.addons.includes(e.planId)&&t.items.push(e)})),t.additionalFields&&(t={...t,...t.additionalFields});const{fields:n}=await async function({data:e}){return Wd((async()=>{so(lo.storefront);const t=["websiteId","paymentInstruction","items","billingAddress","deliveryAddress","shippingRateId","couponIds","password","redirectUrl","poNumber"];return Object.keys(e).forEach((n=>{t.includes(n)||delete e[n]})),lo.storefront.purchase.purchase({data:e})}))}({data:t});return n}async function J$({payload:e}){var t,n,r,a,o,s;const{_raw:{id:i},isExistingInstrument:l}=e;delete e.isExistingInstrument,delete e._raw;const c={...e};l?c.paymentInstrumentId=i:c.token=i,(null==(t=lo.options)?void 0:t.invoiceId)&&(c.invoiceId=lo.options.invoiceId),(null==(n=lo.options)?void 0:n.transactionId)&&(c.transactionId=lo.options.transactionId),(null==(r=lo.options)?void 0:r.money)&&(c.websiteId=lo.options.websiteId,c.amount=lo.options.money.amount,c.currency=lo.options.money.currency),(null==(a=lo.options)?void 0:a.deposit)&&(c.websiteId=lo.options.websiteId,c.amount=lo.data.amountAndCurrency.amount,c.currency=lo.data.amountAndCurrency.currency),(null==(o=lo.data)?void 0:o.couponIds)&&Array.isArray(lo.data.couponIds)&&(c.couponIds=lo.data.couponIds),(null==(s=lo.data)?void 0:s.riskMetadata)&&(c.riskMetadata=lo.data.riskMetadata);let{fields:u}=await async function({data:e}){return Wd((async()=>{so(lo.storefront);const{token:t,transactionId:n,invoiceId:r,websiteId:a,paymentInstrumentId:o}=e,s=["riskMetadata","redirectUrl"];return t&&s.push("token"),o&&s.push("paymentInstrumentId"),n&&s.push("transactionId"),r&&s.push("invoiceId"),a&&s.push("amount","currency","websiteId"),Object.keys(e).forEach((t=>{s.includes(t)||delete e[t]})),lo.storefront.purchase.payment({data:e})}))}({data:c});return u={transaction:u,token:u.token||lo.options.jwt},lo.data.invoice&&(u.invoice=lo.data.invoice),u}async function X$({payload:{isExistingInstrument:e,_raw:{id:t}}}){if(!e){const{id:e}=await async function({data:e}){return Wd((async()=>{so(lo.storefront);const{fields:t}=await lo.storefront.paymentInstruments.create({data:e});return t}))}({data:{token:t}});t=e}return await async function(e){return Wd((async()=>{so(lo.storefront);const{fields:t}=await lo.storefront.payoutRequests.update(e);return new Dm(t)}))}({id:lo.data.payout.id,data:{paymentInstrumentId:t}})}async function Q$({payload:e}){var t,n;Object.keys(e).forEach((t=>{null===e[t]&&delete e[t]}));try{let r,a,o;lo.options.payout?(r=await X$({payload:e}),a=Qs.payoutCompleted,o="payout"):lo.data.isPayment?(r=await J$({payload:e}),a=Qs.purchaseCompleted,o="payment"):(r=await G$({payload:e}),a=Qs.purchaseCompleted,o="purchase"),(null==(t=r.transaction)?void 0:t.approvalUrl)&&"unknown"===(null==(n=r.transaction)?void 0:n.result)?lo.options.features.fullPageRedirect?window.location=r.transaction.approvalUrl:function({fields:e,payload:t}){var n,r,a,o,s;if(lo.options.features.fullPageRedirect&&(t.redirectUrl||(null==(n=e.transaction)?void 0:n.approvalUrl)))window.location=t.redirectUrl||(null==(r=e.transaction)?void 0:r.approvalUrl);else if(t.redirectUrl||!(null==(a=e.transaction)?void 0:a.approvalUrl)){const{paymentMethodsUrl:t}=lo.options._computed,n=JSON.parse(JSON.stringify(e)),r={};lo.data.isPayment?r.payment=n:r.purchase=n,lo.data=new Gm({...e});const a="rebilly-instruments-approval-url";K$({name:a,url:`${t}?name=${a}`,model:r,close:e=>{Qs.purchaseCompleted.dispatch(e)}})}else(null==(o=e.transaction)?void 0:o.approvalUrl)&&(window.location=null==(s=e.transaction)?void 0:s.approvalUrl)}({fields:r,payload:e}):"payout"!==o&&r.selectedPaymentInstrumentRedirectUrl?window.location=r.selectedPaymentInstrumentRedirectUrl:a.dispatch(r)}catch(r){return ni(r),r}}async function Y$({payload:e}){var t;try{const{_raw:{id:n},isExistingInstrument:r}=e;delete e.isExistingInstrument,delete e._raw;const a={...e};r?a.paymentInstrumentId=n:a.token=n;const{instrument:o,transaction:s}=await async function({data:e}){return Wd((async()=>{var t,n,r;so(lo.storefront),io(lo.options);const{fields:a}=await lo.storefront.paymentInstruments.create({data:e});lo.storefront.setSessionToken(a.token||lo.options.jwt);const o={id:a.id,data:{websiteId:lo.options.websiteId,...e}};(null==(t=lo.data)?void 0:t.amountAndCurrency)&&(o.data={...o.data,...lo.data.amountAndCurrency}),(null==(r=null==(n=lo.data)?void 0:n.transaction)?void 0:r.redirectUrl)&&(o.data.redirectUrl=`${o.data.redirectUrl}&originalRedirectUrl=${lo.data.transaction.redirectUrl}`);const{fields:s}=await lo.storefront.paymentInstruments.setup(o);return{instrument:a,transaction:s}}))}({data:{websiteId:null==(t=lo.options)?void 0:t.websiteId,...a}});if(lo.data=new Gm({instrument:o,transaction:s}),s.approvalUrl&&"unknown"===s.result)if(lo.options.features.fullPageRedirect)window.location=s.approvalUrl;else{const{paymentMethodsUrl:e}=lo.options._computed;K$({name:"rebilly-instruments-approval-url",url:`${e}/approval-url`,model:{setup:{transaction:s}},close:({transaction:e=s})=>{Qs.setupCompleted.dispatch({instrument:o,transaction:e})}})}else Qs.setupCompleted.dispatch({instrument:o,transaction:s});return{instrument:o,transaction:s}}catch(n){return ni(n,!1),n}}async function Z$({componentName:e,payload:t}){switch(e){case"result":af(),async function({payload:e}){var t,n;const r=oo.form;r||await uf();const a=lo.toModel(),o={data:a.data,options:a.options};lo.data.payout?o.payoutRequest=e:o[lo.options.transactionType]=e,null==(t=null==r?void 0:r.component)||t.call("route",{name:"result"}),null==(n=null==r?void 0:r.component)||n.call("update",o)}({payload:t});break;case"confirmation":af(),async function({payload:e}){var t,n,r,a,o,s,i,l;e.billingAddress&&lo.summary&&lo.data.isPurchase&&rp({instrument:e});const c=oo.form;c||await uf();const u=lo.toModel(),d={options:u.options,data:u.data,instrument:e};null==(t=null==c?void 0:c.component)||t.call("update",d),null==(n=null==c?void 0:c.component)||n.call("route",{name:"confirmation"}),(null==(a=null==(r=null==c?void 0:c.component)?void 0:r.events)?void 0:a[`${c.name}-confirm-purchase`])||null==(o=null==c?void 0:c.component)||o.on(`${c.name}-confirm-purchase`,(e=>{Q$({payload:e})})),(null==(i=null==(s=null==c?void 0:c.component)?void 0:s.events)?void 0:i[`${c.name}-confirm-setup`])||null==(l=null==c?void 0:c.component)||l.on(`${c.name}-confirm-setup`,(e=>{Y$({payload:e})}))}({payload:t});break;default:throw new Error(`'${e}' not a supported component`)}}function eE({payload:e}){Z$({componentName:"result",payload:e})}const tE=({state:e={}})=>{var t,n,r,a;(null==(n=null==(t=null==e?void 0:e.options)?void 0:t.features)?void 0:n.hideConfirmation)||V$({eventName:"instrument-ready",callback:t=>{var n,r,a,o;if("paypal"===(null==(n=t._raw)?void 0:n.method)&&!(null==(r=e.data)?void 0:r.isShippingRequired))return"setup"===(null==(a=e.options)?void 0:a.transactionType)?Y$({payload:t}):Q$({payload:t}),void(null==(o=e.loader)||o.startLoading({id:"express-purchase"}));Z$({componentName:"confirmation",payload:t})}}),(null==(a=null==(r=null==e?void 0:e.options)?void 0:r.features)?void 0:a.hideResult)||(V$({eventName:"payout-completed",callback:e=>{eE({payload:e=JSON.parse(JSON.stringify(e))})}}),V$({eventName:"purchase-completed",callback:e=>{eE({payload:e=JSON.parse(JSON.stringify(e))})}}),V$({eventName:"setup-completed",callback:e=>{eE({payload:e=JSON.parse(JSON.stringify(e))})}}))};async function nE({setupFramepay:e=bk,...t}={}){var n,r,a,o,s,i,l,c,u,d,p,m,f,h,y,g,b,v,w,k,$;try{lo.data={},lo.options={},lo.options=gk({options:t}),lo.form=pf({element:"form"}),lo.summary=pf({element:"summary"}),lo.shadowRoot=($=lo.form).getRootNode()instanceof ShadowRoot?$.getRootNode():null,lo.form&&(lo.form.style.maxWidth="750px"),lo.summary&&(lo.summary.style.maxWidth="750px"),lo.storefront=mf(),lo.mainStyleVars=H$(),lo.options&&(lo.options.themeFramepay=z$()),lo.loader.addDOMElement({el:lo.form}),lo.loader.addDOMElement({section:"summary",el:lo.summary}),lo.loader.startLoading({section:"summary",id:"rebilly-instruments-summary"}),lo.loader.startLoading({id:"rebilly-instruments-form"});const[E]=await Promise.all([Jm(),e()]);lo.data=E,Qs.dataReady.dispatch(lo.data),lo.i18n=D$(),lo.options&&!lo.options.websiteId&&(null==(n=lo.data.transaction)?void 0:n.websiteId)?lo.options.websiteId=lo.data.transaction.websiteId:lo.options&&!lo.options.websiteId&&(null==(r=lo.data.invoice)?void 0:r.websiteId)&&(lo.options.websiteId=lo.data.invoice.websiteId),lo.options&&lo.data.transaction&&"setup"===(null==(a=lo.data.transaction)?void 0:a.type)&&(lo.options.transactionType="setup"),lo.form&&uf().then((()=>function(){var e;(null==(e=lo.options)?void 0:e.deposit)?tf():lf()}())),lo.summary&&np(),lo.i18n(),lo.hasMounted=!0;const S=e=>{lo.loader.stopLoading({id:"rebilly-instruments-form"}),lo.form.querySelector('[data-rebilly-instruments="form"]').remove(),ni(lo.translate.getTranslation(e),!1)},_=(null==(o=lo.options)?void 0:o.invoiceId)||(null==(i=null==(s=lo.data)?void 0:s.transaction)?void 0:i.invoiceId);_&&(null==(l=lo.data.invoice)?void 0:l.isPaid)?S("form.error.invoiceIsPaid"):_&&(null==(c=lo.data.invoice)?void 0:c.isAbandoned)?S("form.error.invoiceIsAbandoned"):_&&(null==(u=lo.data.invoice)?void 0:u.isVoid)?S("form.error.invoiceIsVoid"):_&&(null==(d=lo.data.invoice)?void 0:d.isRefunded)&&S("form.error.invoiceIsRefunded");((null==(p=lo.options)?void 0:p.transactionId)||(null==(f=null==(m=lo.data)?void 0:m.transaction)?void 0:f.id))&&(null==(y=null==(h=lo.data)?void 0:h.transaction)?void 0:y.transactionIsCompleted)&&S("form.error.transactionIsCompleted"),(null==(b=null==(g=lo.options)?void 0:g.payout)?void 0:b.payoutRequestId)&&!(null==(v=lo.data.payout)?void 0:v.isPending)&&S("form.error.payoutNotPending");let P=!1;P=E.payout?!(null==(w=E.readyToPayout)?void 0:w.length):!(null==(k=E.readyToPay)?void 0:k.length),P&&(lo.loader.stopLoading({id:"rebilly-instruments-form"}),ni(lo.translate.getTranslation("form.error.noPaymentMethods"),!1))}catch(E){throw ni(E,!1),E}tE({state:lo})}async function rE(){var e;await(e=1e3,new Promise((t=>{setTimeout(t,e)}))),Object.keys(oo).forEach((e=>{oo.hasFrame(e)&&(oo[e].destroy(),oo[e]=null)})),Js.removeAll(document),lo.hasMounted=!1,lo.summary&&(lo.summary.textContent=""),lo.form.textContent="",Cd.cancelAll(),lo.loader.clearAll()}return new class{constructor(){this.state=lo,this.iframes=oo}async mount(e){await nE(e)}async destroy(){await rE()}async update(e){await async function({newOptions:e={}}={}){if(!lo.hasMounted)throw Error("Update method cannot be called before mounting instruments");const t=to({...lo.options},e);await rE(),nE({form:lo.form,summary:lo.summary,...t})}({newOptions:e})}async purchase(e){await Q$({payload:e})}async setup(e){await Y$({payload:e})}async show(e,t){await Z$({componentName:e,payload:t})}get version(){return"RebillyInstruments Ver.9.32.1"}on(e,t){V$({eventName:e,callback:t})}}}();
52
+ */class I${constructor(e="#000",t="base",n=0){[this.rgb,this.alpha,this.type,this.weight]=[[0,0,0],1,t,n];const r=null===e?"#000":e;if("string"!=typeof r)throw new TypeError(`Input should be a string: ${r}`);const a=x$(r);if(!a)throw new Error(`Unable to parse color from string: ${r}`);return this[`_setFrom${a.type.toUpperCase()}`]([...a.values,a.alpha])}get hex(){return this.hexString().replace(/^#/,"")}setColor(e){const t=x$(e);return t?this[`_setFrom${t.type.toUpperCase()}`]([...t.values,t.alpha]):null}tint(e,t=A$(e,50)){return new I$(`rgb(${r$("#fff",this.rgbString(),t).rgba})`,"tint",t)}shade(e,t=A$(e,50)){return new I$(`rgb(${r$("#000",this.rgbString(),t).rgba})`,"shade",t)}tints(e,t=A$(e,10)){return Array.from({length:100/t},((e,n)=>this.tint((n+1)*t)))}shades(e,t=A$(e,10)){return Array.from({length:100/t},((e,n)=>this.shade((n+1)*t)))}all(e=10){return[...this.tints(e).reverse(),Object.assign(this),...this.shades(e)]}hexString(){return Zk(this.alpha>=1?this.rgb:[...this.rgb,this.alpha])}rgbString(){const e=(this.alpha>=1?this.rgb:[...this.rgb,this.alpha]).join(", ");return`${this.alpha>=1?"rgb":"rgba"}(${e})`}getBrightness(){return Math.round(this.rgb.reduce(((e,t)=>e+t))/765*100)}_setFromRGB([e,t,n,r]){return[this.rgb,this.alpha]=[[e,t,n],r],this}_setFromHSL([e,t,n,r]){return[this.rgb,this.alpha]=[Xk([e,t,n]).map(Math.round),r],this}}I$.VERSION="v2.1.1";const R$=e=>new I$(e);function T$(e,t=1){if(null===e)return e;const n=R$(e);return n.alpha=t,n.rgbString()}const C$=e=>T$(e,.5),O$=(e,t)=>{if(null===e)return e;return R$(e).shade(t).hexString()};class N${constructor(e){this.allStyles=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial","inherit"],this.str=e||"";const t=this.allStyles.find((e=>this.str.includes(e)));if(null==t)throw new Error("Invalid border style.");const n=this.str.split(t).map((e=>e.trim()));this.border=[n[0],t,n[1]]}get stylePosition(){let e=0;return 3===this.border.length?e=1:2===this.border.length&&(e=this.allStyles.includes(this.border[0])?0:1),e}updateColor(e){return this.border[this.stylePosition+1]=e,this}get value(){return this.border.join(" ")}}const L$=new Proxy({colorPrimary:{fallback:{type:"static",value:"#0044D4"}},colorBackground:{fallback:{type:"static",value:"#FFFFFF"}},colorText:{fallback:{type:"static",value:"#0D2B3E"}},colorMutedText:{fallback:{type:"func",value:e=>C$(e.colorText)}},colorMutedBorder:{fallback:{type:"func",value:e=>e.colorTextProvided?T$(e.colorText,.25):"#DCE3EA"}},colorDanger:{fallback:{type:"static",value:"#CD5C5C"}},fontFamily:{fallback:{type:"static",value:"-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial sans-serif"}},fontSizeBase:{fallback:{type:"static",value:"16px"}},fontWeightBase:{fallback:{type:"static",value:"500"}},fontLineHeightBase:{fallback:{type:"func",value:e=>`calc(${e.fontSizeBase} * 1.5)`}},fontSmooth:{fallback:{type:"static",value:"auto"}},borderRadius:{fallback:{type:"static",value:"6px"}},headingFontFamily:{fallback:{type:"variable",value:"fontFamily"}},headingFontWeight:{fallback:{type:"static",value:"600"}},headingColorText:{fallback:{type:"variable",value:"colorText"}},buttonColorBackground:{fallback:{type:"variable",value:"colorPrimary"}},buttonColorText:{fallback:{type:"static",value:"#FFFFFF"}},buttonFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonBorder:{fallback:{type:"static",value:"1px solid transparent"}},buttonBorderColor:{fallback:{type:"variable",value:"colorPrimary"}},buttonBorderWidth:{fallback:{type:"static",value:"1px"}},buttonBorderType:{fallback:{type:"static",value:"solid"}},buttonBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonBoxShadow:{fallback:{type:"static",value:"none"}},buttonSecondaryColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryColorText:{fallback:{type:"variable",value:"colorText"}},buttonSecondaryFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonSecondaryFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonSecondaryFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonSecondaryFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonSecondaryBorder:{fallback:{type:"func",value:e=>`1px solid ${e.colorMutedBorder}`}},buttonSecondaryBorderColor:{fallback:{type:"variable",value:"colorMutedBorder"}},buttonSecondaryBorderWidth:{fallback:{type:"static",value:"1px"}},buttonSecondaryBorderType:{fallback:{type:"static",value:"solid"}},buttonSecondaryBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonSecondaryBoxShadow:{fallback:{type:"static",value:"none"}},buttonHoverColorBackground:{fallback:{type:"func",value:e=>e.buttonColorBackgroundProvided?O$(e.buttonColorBackground,20):O$(e.colorPrimary,20)}},buttonHoverColorText:{fallback:{type:"variable",value:"buttonColorText"}},buttonHoverFontFamily:{fallback:{type:"variable",value:"buttonFontFamily"}},buttonHoverFontSize:{fallback:{type:"variable",value:"buttonFontSize"}},buttonHoverFontLineHeight:{fallback:{type:"variable",value:"buttonFontLineHeight"}},buttonHoverFontWeight:{fallback:{type:"variable",value:"buttonFontWeight"}},buttonHoverBorder:{fallback:{type:"func",value:e=>{if(e.buttonBorderProvided)return e.buttonBorder;return new N$(e.buttonBorder).updateColor(e.buttonHoverColorBackground).value}}},buttonHoverBorderColor:{fallback:{type:"variable",value:"colorPrimary"}},buttonHoverBorderWidth:{fallback:{type:"variable",value:"buttonBorderWidth"}},buttonHoverBorderType:{fallback:{type:"variable",value:"buttonBorderType"}},buttonHoverBorderRadius:{fallback:{type:"variable",value:"buttonBorderRadius"}},buttonHoverBoxShadow:{fallback:{type:"variable",value:"buttonBoxShadow"}},buttonSecondaryHoverColorBackground:{fallback:{type:"func",value:e=>(e.colorBackgroundProvided,O$(e.colorBackground,3))}},buttonSecondaryHoverColorText:{fallback:{type:"variable",value:"colorText"}},buttonSecondaryHoverFontFamily:{fallback:{type:"variable",value:"buttonSecondaryFontFamily"}},buttonSecondaryHoverFontSize:{fallback:{type:"variable",value:"buttonSecondaryFontSize"}},buttonSecondaryHoverFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryFontLineHeight"}},buttonSecondaryHoverFontWeight:{fallback:{type:"variable",value:"buttonSecondaryFontWeight"}},buttonSecondaryHoverBorder:{fallback:{type:"variable",value:"buttonSecondaryBorder"}},buttonSecondaryHoverBorderColor:{fallback:{type:"variable",value:"buttonSecondaryBorderColor"}},buttonSecondaryHoverBorderWidth:{fallback:{type:"variable",value:"buttonSecondaryBorderWidth"}},buttonSecondaryHoverBorderType:{fallback:{type:"variable",value:"buttonSecondaryBorderType"}},buttonSecondaryHoverBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryBorderRadius"}},buttonSecondaryHoverBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryBoxShadow"}},buttonActiveColorBackground:{fallback:{type:"variable",value:"buttonHoverColorBackground"}},buttonActiveColorText:{fallback:{type:"variable",value:"buttonHoverColorText"}},buttonActiveFontFamily:{fallback:{type:"variable",value:"buttonHoverFontFamily"}},buttonActiveFontSize:{fallback:{type:"variable",value:"buttonHoverFontSize"}},buttonActiveFontLineHeight:{fallback:{type:"variable",value:"buttonHoverFontLineHeight"}},buttonActiveFontWeight:{fallback:{type:"variable",value:"buttonHoverFontWeight"}},buttonActiveBorder:{fallback:{type:"variable",value:"buttonHoverBorder"}},buttonActiveBorderColor:{fallback:{type:"variable",value:"buttonHoverBorderColor"}},buttonActiveBorderWidth:{fallback:{type:"variable",value:"buttonHoverBorderWidth"}},buttonActiveBorderType:{fallback:{type:"variable",value:"buttonHoverBorderType"}},buttonActiveBorderRadius:{fallback:{type:"variable",value:"buttonHoverBorderRadius"}},buttonActiveBoxShadow:{fallback:{type:"variable",value:"buttonHoverBoxShadow"}},buttonSecondaryActiveColorBackground:{fallback:{type:"variable",value:"buttonSecondaryHoverColorBackground"}},buttonSecondaryActiveColorText:{fallback:{type:"variable",value:"buttonSecondaryHoverColorText"}},buttonSecondaryActiveFontFamily:{fallback:{type:"variable",value:"buttonSecondaryHoverFontFamily"}},buttonSecondaryActiveFontSize:{fallback:{type:"variable",value:"buttonSecondaryHoverFontSize"}},buttonSecondaryActiveFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontLineHeight"}},buttonSecondaryActiveFontWeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontWeight"}},buttonSecondaryActiveBorder:{fallback:{type:"variable",value:"buttonSecondaryHoverBorder"}},buttonSecondaryActiveBorderColor:{fallback:{type:"variable",value:"buttonSecondaryHoverBorderColor"}},buttonSecondaryActiveBorderWidth:{fallback:{type:"variable",value:"buttonSecondaryHoverBorderWidth"}},buttonSecondaryActiveBorderType:{fallback:{type:"variable",value:"buttonSecondaryHoverBorderType"}},buttonSecondaryActiveBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryHoverBorderRadius"}},buttonSecondaryActiveBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryHoverBoxShadow"}},inputColorBackground:{fallback:{type:"static",value:"transparent"}},inputColorText:{fallback:{type:"variable",value:"colorText"}},inputFontFamily:{fallback:{type:"variable",value:"fontFamily"}},inputFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},inputFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},inputFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},inputBorder:{fallback:{type:"func",value:e=>`1px solid ${O$(e.colorMutedBorder,4)}`}},inputBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},inputBoxShadow:{fallback:{type:"static",value:"none"}},inputHoverColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputHoverColorText:{fallback:{type:"variable",value:"inputColorText"}},inputHoverFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputHoverFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputHoverFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputHoverFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputHoverBorder:{fallback:{type:"variable",value:"inputBorder"}},inputHoverBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputHoverBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputFocusColorBackground:{fallback:{type:"variable",value:"inputHoverColorBackground"}},inputFocusColorText:{fallback:{type:"variable",value:"inputHoverColorText"}},inputFocusFontFamily:{fallback:{type:"variable",value:"inputHoverFontFamily"}},inputFocusFontSize:{fallback:{type:"variable",value:"inputHoverFontSize"}},inputFocusFontLineHeight:{fallback:{type:"variable",value:"inputHoverFontLineHeight"}},inputFocusFontWeight:{fallback:{type:"variable",value:"inputHoverFontWeight"}},inputFocusBorder:{fallback:{type:"func",value:e=>{if(e.inputHoverBorderProvided)return e.inputHoverBorder;return new N$(e.inputBorder).updateColor(e.colorPrimary).value}}},inputFocusBorderRadius:{fallback:{type:"variable",value:"inputHoverBorderRadius"}},inputFocusBoxShadow:{fallback:{type:"func",value:e=>`0 0 0 1px ${e.colorPrimary}`}},inputPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputColorTextProvided?C$(e.inputColorText):e.colorMutedText}},inputPlaceholderFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputPlaceholderFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputPlaceholderFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputSelectionColorText:{fallback:{type:"static",value:"initial"}},inputSelectionColorBackground:{fallback:{type:"static",value:"highlight"}},inputErrorColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputErrorColorText:{fallback:{type:"variable",value:"colorDanger"}},inputErrorFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputErrorFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputErrorFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputErrorFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputErrorBorder:{fallback:{type:"func",value:e=>{if(e.inputBorderProvided){return new N$(e.inputBorder).updateColor(e.colorDanger).value}return`1px solid ${e.colorDanger}`}}},inputErrorBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputErrorBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputErrorHoverColorBackground:{fallback:{type:"variable",value:"inputErrorColorBackground"}},inputErrorHoverColorText:{fallback:{type:"variable",value:"inputErrorColorText"}},inputErrorHoverFontFamily:{fallback:{type:"variable",value:"inputErrorFontFamily"}},inputErrorHoverFontSize:{fallback:{type:"variable",value:"inputErrorFontSize"}},inputErrorHoverFontLineHeight:{fallback:{type:"variable",value:"inputErrorFontLineHeight"}},inputErrorHoverFontWeight:{fallback:{type:"variable",value:"inputErrorFontWeight"}},inputErrorHoverBorder:{fallback:{type:"variable",value:"inputErrorBorder"}},inputErrorHoverBorderRadius:{fallback:{type:"variable",value:"inputErrorBorderRadius"}},inputErrorHoverBoxShadow:{fallback:{type:"variable",value:"inputErrorBoxShadow"}},inputErrorFocusColorBackground:{fallback:{type:"variable",value:"inputErrorHoverColorBackground"}},inputErrorFocusColorText:{fallback:{type:"variable",value:"inputErrorHoverColorText"}},inputErrorFocusFontFamily:{fallback:{type:"variable",value:"inputErrorHoverFontFamily"}},inputErrorFocusFontSize:{fallback:{type:"variable",value:"inputErrorHoverFontSize"}},inputErrorFocusFontLineHeight:{fallback:{type:"variable",value:"inputErrorHoverFontLineHeight"}},inputErrorFocusFontWeight:{fallback:{type:"variable",value:"inputErrorHoverFontWeight"}},inputErrorFocusBorder:{fallback:{type:"variable",value:"inputErrorHoverBorder"}},inputErrorFocusBorderRadius:{fallback:{type:"variable",value:"inputErrorHoverBorderRadius"}},inputErrorFocusBoxShadow:{fallback:{type:"variable",value:"inputErrorHoverBoxShadow"}},inputErrorPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputErrorColorTextProvided?C$(e.inputErrorColorText):C$(e.colorDanger)}},inputErrorPlaceholderFontFamily:{fallback:{type:"variable",value:"inputPlaceholderFontFamily"}},inputErrorPlaceholderFontSize:{fallback:{type:"variable",value:"inputPlaceholderFontSize"}},inputErrorPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputPlaceholderFontLineHeight"}},inputErrorPlaceholderFontWeight:{fallback:{type:"variable",value:"inputPlaceholderFontWeight"}},inputErrorSelectionColorText:{fallback:{type:"variable",value:"inputSelectionColorText"}},inputErrorSelectionColorBackground:{fallback:{type:"variable",value:"inputSelectionColorBackground"}},labels:{fallback:{type:"static",value:"floating"}}},{get(e,t,n){if(t in e){if(e[t].value)return e[t].value;const{type:r,value:a}=e[t].fallback;if("static"===r)return a;if("variable"===r)return`var(--rebilly-${a})`;if("func"===r&&"function"==typeof a)return a(n)}if(t.endsWith("Provided")){const n=t.replace("Provided","");if(n in e)return e[n].isProvided}},set:(e,t,n)=>{if(!(t in e)||!n)throw new Error(`Invalid theme option provided: ${t}`);return e[t].value=n,e[t].isProvided=!0,!0}}),j$=class e{constructor(e={}){this.overrides=e,this.theme=L$}overrideTheme(){Object.keys(this.overrides).forEach((e=>{this.theme[e]=this.overrides[e]}))}get cssVars(){return Object.keys(this.theme).filter((t=>!e.nonCssProperties.includes(t))).map(((e,t)=>`${t?" ":""}--rebilly-${e}: ${this.theme[e]};`)).join("\n")}build(){return this.overrideTheme(),{cssVars:this.cssVars}}};j$.nonCssProperties=["labels"];let F$=j$;function M$(e){let t=e;return t=t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,""),t=t.replace(/\s{2,}/g," "),t=t.replace(/\s([{:}])\s/g,"$1"),t=t.replace(/([;,])\s/g,"$1"),t=t.replace(/\s!/g,"!"),t}const H$=()=>{io(lo.options);const{theme:e={},css:t}=lo.options,n=(e=>{const t=new F$(e).build();var n;return`\n ${n=t,`\n/* Instruments 'global' variables\n------------------------------------------------------------ */\n:root, :host {\n ${n.cssVars}\n\n --rebilly-fontWeight400: 400;\n --rebilly-fontWeight500: 500;\n --rebilly-fontWeight600: 600;\n --rebilly-fontScaleFactor: 1.5;\n --rebilly-fontScaleFactorS: 0.875;\n --rebilly-fontSizeS: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactorS));\n --rebilly-fontLineHeightS: calc(var(--rebilly-fontSizeS) * 1);\n\n --rebilly-fontSizeL: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactor));\n --rebilly-fontLineHeightL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-fontMarginTopL: 0;\n --rebilly-fontMarginBottomL: var(--rebilly-fontLineHeightBase);\n\n --rebilly-spacing2xs: calc(var(--rebilly-fontLineHeightBase) / 6);\n --rebilly-spacingXs: calc(var(--rebilly-fontLineHeightBase) / 4);\n --rebilly-spacingS: calc(var(--rebilly-fontLineHeightBase) / 2);\n --rebilly-spacingM: var(--rebilly-fontLineHeightBase);\n --rebilly-spacingL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-spacingXl: calc(var(--rebilly-fontLineHeightBase) * 4);\n\n --rebilly-spacingFormElementMinHeight: calc(var(--rebilly-spacingM) * 1.83333);\n\n --rebilly-summaryLoaderMinHeight: var(--rebilly-fontLineHeightBase);\n --rebilly-methodLoaderMinHeight: calc((4 * var(--rebilly-spacingFormElementMinHeight)) + (2 * var(--rebilly-fontLineHeightBase)) + (2 * var(--rebilly-spacingM)) + var(--rebilly-spacing2xs) + var(--rebilly-fontSizeS) + calc(2 * (var(--rebilly-spacingXs) + var(--rebilly-spacingS))) + var(--rebilly-spacingL));\n}\n\n/* Base, Typography\n------------------------------------------------------------ */\n/* Base setup for top level elements */\n.rebilly-instruments-content {\n color: var(--rebilly-colorText);\n background: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeBase);\n font-weight: var(--rebilly-fontWeightBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-fontFamily);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-align: left;\n transition: all 200ms;\n font-smooth: var(--rebilly-fontSmooth);\n padding: 2px;\n font-display: swap;\n}\n\n/* Views. Method Selector\n------------------------------------------------------------ */\n.rebilly-instruments-method-selector.has-express-compact {\n padding-top: var(--rebilly-spacingS);\n}\n\n.rebilly-instruments-amount-selector {\n padding: 2px;\n}\n\n/* Express Methods\n------------------------------------------------------------ */\n@-webkit-keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n\n@keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n\n.rebilly-instruments-express-methods { padding: 2px; }\n\n.rebilly-instruments-express-methods.is-compact {\n border: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS);\n padding-top: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS));\n padding-top: calc(var(--rebilly-fontSizeBase) + var(--rebilly-spacing2xs));\n border-radius: var(--rebilly-borderRadius);\n position: relative;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-iframe {\n display: block;\n margin-bottom: 0;\n height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > * {\n border-radius: 6px;\n margin-bottom: var(--rebilly-spacingS);\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n min-height: 48px;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 0px;\n flex: 1 1 0px;\n max-width: 260px;\n margin: 0 var(--rebilly-spacingXs);\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:first-child {\n margin-left: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin-right: 0;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-label {\n display: none;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-label {\n position: absolute;\n font-family: var(--rebilly-fontFamily);\n top: 0; left: 50%;\n -webkit-transform: translateX(-50%) translateY(-50%);\n transform: translateX(-50%) translateY(-50%);\n color: var(--rebilly-colorText);\n padding: var(--rebilly-spacing2xs) var(--rebilly-spacingM);\n line-height: 1;\n background: var(--rebilly-colorBackground);\n display: inline-block;\n font-weight: var(--rebilly-fontWeightBase);\n min-height: auto;\n margin: 0;\n white-space: nowrap;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-google-pay-method {\n border-radius: 100px;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-google-pay-method iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n@media (max-width: 600px) {\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n max-width: 100%;\n margin: 0 0 var(--rebilly-spacingS);\n }\n \n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n }\n}\n\n/* Components. Divider\n------------------------------------------------------------ */\n.rebilly-instruments-divider {\n line-height: var(--rebilly-fontLineHeightBase);\n padding: var(--rebilly-spacingM) 0;\n margin: 0;\n position: relative;\n outline: 0;\n border: 0;\n text-align: center;\n font-family: var(--rebilly-fontFamily);\n}\n\n.rebilly-instruments-divider-s { padding: var(--rebilly-spacingS) 0; }\n.rebilly-instruments-divider-xs { padding: var(--rebilly-spacingXs) 0; }\n\n.rebilly-instruments-divider::before {\n background: var(--rebilly-colorMutedBorder);\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n height: 1px;\n}\n\n.rebilly-instruments-divider .rebilly-instruments-divider-label {\n color: var(--rebilly-colorMutedText);\n font-weight: var(--rebilly-fontWeightBase);\n padding: 0 var(--rebilly-spacingM);\n line-height: var(--rebilly-fontLineHeightS);\n background-color: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeS);\n position: relative;\n display: inline-block;\n}\n\n/* Components. Icons\n------------------------------------------------------------ */\n.rebilly-instruments-icon {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n/* Components. Forms. Checkboxes\n------------------------------------------------------------ */\n.rebilly-instruments-form-field-checkbox {\n position: relative;\n opacity: 1;\n align-items: center;\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-start;\n cursor: pointer;\n transform: none;\n}\n\n.rebilly-instruments-form-field-checkbox > * {\n cursor: pointer;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"] {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.rebilly-instruments-form-field-checkbox span {\n position: relative;\n top: 0;\n left: 0;\n width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n min-width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n border-radius: 4px;\n box-shadow: inset 0 0 0 2px var(--rebilly-colorMutedBorder);\n margin-right: var(--rebilly-spacingS);\n background-color: transparent;\n transition: all 200ms;\n}\n\n.rebilly-instruments-form-field-checkbox span:after {\n content: '';\n position: absolute;\n border: solid var(--rebilly-colorPrimary);\n width: calc(var(--rebilly-spacingXs) + var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingXs) - var(--rebilly-spacing2xs) + 2px);\n border-width: 2px 2px 0 0;\n border-radius: 2px;\n top: 50%;\n left: 50%;\n opacity: 0;\n transform: translateY(-60%) translateX(-50%) rotate(135deg);\n transition: all 0.2s ease;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:focus ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span:after {\n opacity: 1;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:disabled ~ span {\n opacity: 0.6;\n}\n\n/* Vendor, Postmate\n------------------------------------------------------------ */\n.rebilly-instruments-iframe {\n border: none;\n width: 100%;\n height: 0;\n padding: 0;\n}\n\n.rebilly-instruments-iframe-overlay {\n top: -2px;\n left: -2px;\n width: calc(100vw + 2px);\n height: 100vh;\n min-height: calc(100vh + 4px);\n position: fixed;\n z-index: 99999999999999;\n}\n\n/* Views. Modal\n------------------------------------------------------------ */\n.rebilly-instruments-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n overflow-x: hidden;\n overflow-y: auto;\n z-index: 1055;\n padding: 30px;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n -webkit-transition: all 0.12s ease-in-out;\n transition: all 0.12s ease-in-out;\n background-color: rgba(0,0,0,0.7);\n opacity: 0\n}\n\n.rebilly-instruments-modal-overlay.is-visible {\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container {\n -webkit-transition: all .24s ease-in-out;\n transition: all .24s ease-in-out;\n position: relative;\n max-width: 750px;\n background: var(--rebilly-colorBackground);\n margin: 50px auto 20px;\n -webkit-box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n border-radius: 4px;\n -webkit-transform: translateY(-50px);\n transform: translateY(-50px);\n opacity: 0;\n}\n\n.rebilly-instruments-modal-container.is-visible {\n -webkit-transform: translateY(0);\n transform: translateY(0);\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container.is-redirect {\n max-width: 60vw;\n width: auto;\n}\n\n.rebilly-instruments-modal-content {\n -webkit-transition: all .15s;\n transition: all .15s;\n padding: 20px;\n overflow: hidden;\n background-color: var(--rebilly-colorBackground);\n text-align: center;\n border-radius: 4px;\n}\n\n.rebilly-instruments-modal-content .rebilly-instruments-iframe {\n -webkit-transition: all .15s;\n transition: all .15s;\n height: auto;\n min-height: 360px;\n}\n\n.rebilly-instruments-modal-container.is-redirect .rebilly-instruments-modal-content {\n padding: 0;\n}\n\n.rebilly-instruments-modal-close {\n position: absolute;\n width: 30px;\n height: 30px;\n top: -40px;\n right: 0;\n fill: #FFF;\n cursor: pointer;\n}\n\n.rebilly-instruments-modal-close:hover{\n color: #000;\n}\n\n@media screen and (max-width: 480px) {\n .rebilly-instruments-modal-container.is-redirect {\n max-width: 96vw;\n margin: 20px auto 20px;\n }\n}\n\n/* Components. Loader\n------------------------------------------------------------ */\n.rebilly-instruments-loader {\n text-align: left;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background-color: var(--rebilly-colorBackground);\n z-index: 1000;\n -webkit-transition: all 200ms;\n transition: all 200ms;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader.is-active {\n display: block;\n}\n\n/* Type */\n.rebilly-instruments-loader p {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n.rebilly-instruments-loader small {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: 1;\n}\n\n/* Summary */\n.rebilly-instruments-summary-loader-total p.total {\n font-family: var(--rebilly-fontFamily);\n font-size: var(--rebilly-fontSizeL);\n font-weight: var(--rebilly-headingFontWeight);\n}\n\n/* Methods */\n.rebilly-instruments-methods-loader-card-icon {\n width: calc(var(--rebilly-fontLineHeightBase) + 10px);\n height: var(--rebilly-fontLineHeightBase);\n margin-left: var(--rebilly-spacing2xs);\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-methods-loader-form-fields { margin: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS)) 0; }\n\n/* Spinner */\n.rebilly-instruments-loader-spinner {\n top: 50%;\n left: 50%;\n position: absolute;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: 2px solid transparent;\n border-top: 2px solid var(--rebilly-colorPrimary);\n border-radius: 50%;\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n margin-top: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n margin-left: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n -webkit-animation: spin 0.5s ease infinite;\n animation: spin 0.5s ease infinite;\n}\n\n@-webkit-keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n@keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n/* Utils */\n.rebilly-instruments-loader-display-flex { display: -webkit-box; display: -ms-flexbox; display: flex; }\n.rebilly-instruments-loader-align-center { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }\n.rebilly-instruments-loader-justify-space-between { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }\n.rebilly-instruments-loader-justify-end { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; }\n\n.is-el-loading {\n position: relative;\n color: transparent!important;\n}\n\n.is-el-loading::before {\n position: absolute;\n content: '';\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader-form-el {\n width: 100%;\n min-height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-loader-form-label {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-loader-form-el.is-button {\n margin-top: var(--rebilly-spacingL);\n text-align: center;\n font-size: var(--rebilly-buttonFontSize);\n font-family: var(--rebilly-buttonFontFamily);\n line-height: var(--rebilly-buttonFontLineHeight);\n padding: var(--rebilly-spacingS);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n background: var(--rebilly-buttonColorBackground);\n color: transparent;\n border-radius: var(--rebilly-buttonBorderRadius);\n font-weight: var(--rebilly-buttonFontWeight);\n border: var(--rebilly-buttonBorder);\n -webkit-box-shadow: var(--rebilly-buttonBoxShadow);\n box-shadow: var(--rebilly-buttonBoxShadow);\n outline: none;\n cursor: not-allowed;\n opacity: 0.6; \n}\n\n.rebilly-instruments-methods-loader-card-icon.is-el-loading::before {\n border-radius: calc(var(--rebilly-borderRadius) / 2);\n}\n\n/* Error\n------------------------------------------------------------ */\n.rebilly-instruments-error-card {\n border: 1px solid var(--rebilly-colorDanger);\n border-radius: var(--rebilly-borderRadius);\n text-align: left;\n padding: var(--rebilly-spacingS);\n margin-bottom: var(--rebilly-spacingL);\n}\n.rebilly-instruments-error-card.not-closeable {\n margin-bottom: 0;\n}\n\n.rebilly-instruments-error-card-header {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n width: 100%;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n\n.rebilly-instruments-error-card-title {\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-headingFontFamily);\n margin: 0 0 var(--rebilly-spacingS);\n color: var(--rebilly-colorDanger);\n}\n\n.rebilly-instruments-error-card-close-button {\n cursor: pointer;\n background: transparent;\n border: none;\n padding: 0;\n}\n\n.rebilly-instruments-error-card-close-button svg {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n.rebilly-instruments-error-card-details {\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n.rebilly-instruments-error-card-details li,\n.rebilly-instruments-error-card-message {\n color: var(--rebilly-colorText);\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n\n/* Bump offer\n------------------------------------------------------------ */\n.rebilly-instruments-bump-offers {\n text-align: left;\n margin-bottom: calc(var(--rebilly-spacingM) + var(--rebilly-fontSizeS));\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-form-field-checkbox {\n margin-bottom: var(--rebilly-spacingS);\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-bump-offer-label {\n width: 100%;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item {\n border-bottom: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS) 0;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.rebilly-instruments-bump-offer-line-item:first-child {\n padding-top: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure {\n margin: 0 var(--rebilly-spacingS) 0 0;\n flex: 0 0 auto;\n width: 48px;\n height: 48px;\n border-radius: var(--rebilly-borderRadius);\n border: 1px solid var(--rebilly-colorMutedBorder);\n overflow: hidden;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure img {\n width: 100%;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis {\n flex: 1 2 auto;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-title {\n margin: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-description {\n color: var(--rebilly-colorMutedText);\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: var(--rebilly-fontLineHeightS);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown {\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--rebilly-colorMutedText);\n margin: 0 0 0 var(--rebilly-spacingS);\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown .rebilly-instruments-icon {\n fill: var(--rebilly-colorMutedText);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown-unit-price {\n color: var(--rebilly-colorText);\n}\n`}\n `})(e||{});return df({element:"style",attributes:{type:"text/css"},content:M$(n),target:lo.shadowRoot||"head"}),t&&df({element:"style",attributes:{type:"text/css"},content:M$(t),target:lo.shadowRoot||"head"}),n},B$=()=>{lo.translate.init(lo.options.locale,lo.options.i18n),lo.translate.translateItems()},D$=()=>{var e,t;if("auto"===lo.options.locale&&(null==(t=null==(e=lo.data.riskMetadata)?void 0:e.browserData)?void 0:t.language)){const{browserData:{language:e}}=lo.data.riskMetadata;lo.options.locale=e}return lo.translate.init(lo.options.locale,lo.options.i18n),B$};function q$(e){const t={};return function(e){const t={};function n(e){const r=e.match(/var\((.+?)\)/g);if(r){let a=e;return r.forEach((n=>{const r=n.match(/\((.*)\)/i);r&&(a=e.replace(n,t[r[1]]))})),n(a)}return e}return Array.from(e.matchAll(/(--rebilly.*(?=:))[:\s](.*(?=;))/g)).forEach((e=>{t[e[1]]=e[2].trim()})),Object.entries(t).map((([e,t])=>[e,n(t)]))}(e).forEach((([e,n])=>{t[e]=n})),t}const U$=(e,t="")=>({color:e[`--rebilly-${t}ColorText`],fontFamily:e[`--rebilly-${t}FontFamily`],fontSize:e[`--rebilly-${t}FontSize`],fontWeight:e[`--rebilly-${t}FontWeight`],lineHeight:e[`--rebilly-${t}FontLineHeight`],background:e[`--rebilly-${t}ColorBackground`],boxShadow:e[`--rebilly-${t}BoxShadow`],borderColor:e[`--rebilly-${t}BorderColor`],borderWidth:e[`--rebilly-${t}BorderWidth`],borderType:e[`--rebilly-${t}BorderType`]}),z$=()=>{var e;const t=q$(`\n ${lo.mainStyleVars}\n ${(null==(e=lo.options)?void 0:e.css)||""}\n `);return{base:{...U$(t,"input"),":hover":U$(t,"inputHover"),":focus":U$(t,"inputFocus"),"::placeholder":U$(t,"inputPlaceholder"),"::selection":U$(t,"inputSelection")},invalid:{...U$(t,"inputError"),":hover":U$(t,"inputErrorHover"),":focus":U$(t,"inputErrorFocus"),"::placeholder":U$(t,"inputErrorPlaceholder"),"::selection":U$(t,"inputErrorSelection")},buttons:{base:{...U$(t,"buttonSecondary"),":hover":U$(t,"buttonSecondaryHover"),":focus":U$(t,"buttonSecondaryActive")},focus:{...U$(t,"buttonSecondary")},active:{...U$(t,"button"),":hover":U$(t,"buttonHover"),":focus":U$(t,"buttonActive")}}}};function V$({eventName:e,callback:t}){if(!Ys.includes(e))throw new Error(`${e} is not a supported event`);const n=Ks(e);Qs[n].addEventListener(t)}const W$=(e,t)=>`\n <div class="rebilly-instruments-modal-overlay">\n <div class="rebilly-instruments-modal-container ${t?`rebilly-instruments-${t}`:""} ${e?"is-redirect":""}">\n ${e?"":'\n <svg class="rebilly-instruments-modal-close" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <path d="m15 13.5858 7.2929-7.293c.3905-.3904 1.0237-.3904 1.4142 0 .3905.3906.3905 1.0238 0 1.4143L16.4142 15l7.293 7.2929c.3904.3905.3904 1.0237 0 1.4142-.3906.3905-1.0238.3905-1.4143 0L15 16.4142l-7.2929 7.293c-.3905.3904-1.0237.3904-1.4142 0-.3905-.3906-.3905-1.0238 0-1.4143L13.5858 15l-7.293-7.2929c-.3904-.3905-.3904-1.0237 0-1.4142.3906-.3905 1.0238-.3905 1.4143 0L15 13.5858Z" fill-rule="nonzero"/>\n </svg>\n '}\n <div class="rebilly-instruments-modal-content"></div>\n </div>\n </div>\n`;async function K$({name:e="",url:t="",model:n={},classListArray:r=[],close:a=(()=>{})}={}){var o,s;const i=null==(o=null==n?void 0:n.method)?void 0:o.method,l="rebilly-instruments-approval-url"===e;lo.form.insertAdjacentHTML("beforeend",W$(l,i));const c=lo.form.querySelector(".rebilly-instruments-modal-overlay"),u=lo.form.querySelector(".rebilly-instruments-modal-container"),d=lo.form.querySelector(".rebilly-instruments-modal-close"),p=lo.form.querySelector(".rebilly-instruments-modal-content");document.body.style.overflow="hidden",setTimeout((()=>{c.classList.add("is-visible"),u.classList.add("is-visible")}),240),lo.loader.addDOMElement({section:"modal",el:p}),lo.loader.startLoading({section:"modal",id:e});const m={options:lo.toModel().options,...n},f=await new si({name:e,url:t,model:m,classListArray:r,container:p}),h=(...e)=>{u.classList.remove("is-visible"),c.classList.remove("is-visible"),setTimeout((()=>{document.body.style.overflow="auto";const t=c.children;for(let e=0;e<t.length;e+=1)t[e].remove();c.remove(),a(...e),f.destroy()}),300)};return f.bindEventListeners({close:h,loader:lo.loader}),l||d.addEventListener("click",h),null==(s=f.component)||s.call("route",{name:"approval-url"}),f}async function G$({payload:e}){let t={websiteId:lo.options.websiteId,paymentInstruction:{token:e._raw.id},...e};lo.data.acceptBumpOffer?t.items=lo.options.bumpOffer:t.items=Yd(lo.options.items),lo.data.couponIds&&Array.isArray(lo.data.couponIds)&&(t.couponIds=lo.data.couponIds),lo.options.addons&&lo.data.addons&&Array.isArray(lo.data.addons)&&lo.options.addons.forEach((e=>{lo.data.addons.includes(e.planId)&&t.items.push(e)})),t.additionalFields&&(t={...t,...t.additionalFields});const{fields:n}=await async function({data:e}){return Wd((async()=>{so(lo.storefront);const t=["websiteId","paymentInstruction","items","billingAddress","deliveryAddress","shippingRateId","couponIds","password","redirectUrl","poNumber"];return Object.keys(e).forEach((n=>{t.includes(n)||delete e[n]})),lo.storefront.purchase.purchase({data:e})}))}({data:t});return n}async function J$({payload:e}){var t,n,r,a,o,s;const{_raw:{id:i},isExistingInstrument:l}=e;delete e.isExistingInstrument,delete e._raw;const c={...e};l?c.paymentInstrumentId=i:c.token=i,(null==(t=lo.options)?void 0:t.invoiceId)&&(c.invoiceId=lo.options.invoiceId),(null==(n=lo.options)?void 0:n.transactionId)&&(c.transactionId=lo.options.transactionId),(null==(r=lo.options)?void 0:r.money)&&(c.websiteId=lo.options.websiteId,c.amount=lo.options.money.amount,c.currency=lo.options.money.currency),(null==(a=lo.options)?void 0:a.deposit)&&(c.websiteId=lo.options.websiteId,c.amount=lo.data.amountAndCurrency.amount,c.currency=lo.data.amountAndCurrency.currency),(null==(o=lo.data)?void 0:o.couponIds)&&Array.isArray(lo.data.couponIds)&&(c.couponIds=lo.data.couponIds),(null==(s=lo.data)?void 0:s.riskMetadata)&&(c.riskMetadata=lo.data.riskMetadata);let{fields:u}=await async function({data:e}){return Wd((async()=>{so(lo.storefront);const{token:t,transactionId:n,invoiceId:r,websiteId:a,paymentInstrumentId:o}=e,s=["riskMetadata","redirectUrl"];return t&&s.push("token"),o&&s.push("paymentInstrumentId"),n&&s.push("transactionId"),r&&s.push("invoiceId"),a&&s.push("amount","currency","websiteId"),Object.keys(e).forEach((t=>{s.includes(t)||delete e[t]})),lo.storefront.purchase.payment({data:e})}))}({data:c});return u={transaction:u,token:u.token||lo.options.jwt},lo.data.invoice&&(u.invoice=lo.data.invoice),u}async function X$({payload:{isExistingInstrument:e,_raw:{id:t}}}){if(!e){const{id:e}=await async function({data:e}){return Wd((async()=>{so(lo.storefront);const{fields:t}=await lo.storefront.paymentInstruments.create({data:e});return t}))}({data:{token:t}});t=e}return await async function(e){return Wd((async()=>{so(lo.storefront);const{fields:t}=await lo.storefront.payoutRequests.update(e);return new Dm(t)}))}({id:lo.data.payout.id,data:{paymentInstrumentId:t}})}async function Q$({payload:e}){var t,n;Object.keys(e).forEach((t=>{null===e[t]&&delete e[t]}));try{let r,a,o;lo.options.payout?(r=await X$({payload:e}),a=Qs.payoutCompleted,o="payout"):lo.data.isPayment?(r=await J$({payload:e}),a=Qs.purchaseCompleted,o="payment"):(r=await G$({payload:e}),a=Qs.purchaseCompleted,o="purchase"),(null==(t=r.transaction)?void 0:t.approvalUrl)&&"unknown"===(null==(n=r.transaction)?void 0:n.result)?lo.options.features.fullPageRedirect?window.location=r.transaction.approvalUrl:function({fields:e,payload:t}){var n,r,a,o,s;if(lo.options.features.fullPageRedirect&&(t.redirectUrl||(null==(n=e.transaction)?void 0:n.approvalUrl)))window.location=t.redirectUrl||(null==(r=e.transaction)?void 0:r.approvalUrl);else if(t.redirectUrl||!(null==(a=e.transaction)?void 0:a.approvalUrl)){const{paymentMethodsUrl:t}=lo.options._computed,n=JSON.parse(JSON.stringify(e)),r={};lo.data.isPayment?r.payment=n:r.purchase=n,lo.data=new Gm({...e});const a="rebilly-instruments-approval-url";K$({name:a,url:`${t}?name=${a}`,model:r,close:e=>{Qs.purchaseCompleted.dispatch(e)}})}else(null==(o=e.transaction)?void 0:o.approvalUrl)&&(window.location=null==(s=e.transaction)?void 0:s.approvalUrl)}({fields:r,payload:e}):"payout"!==o&&r.selectedPaymentInstrumentRedirectUrl?window.location=r.selectedPaymentInstrumentRedirectUrl:a.dispatch(r)}catch(r){return ni(r),r}}async function Y$({payload:e}){var t;try{const{_raw:{id:n},isExistingInstrument:r}=e;delete e.isExistingInstrument,delete e._raw;const a={...e};r?a.paymentInstrumentId=n:a.token=n;const{instrument:o,transaction:s}=await async function({data:e}){return Wd((async()=>{var t,n,r;so(lo.storefront),io(lo.options);const{fields:a}=await lo.storefront.paymentInstruments.create({data:e});lo.storefront.setSessionToken(a.token||lo.options.jwt);const o={id:a.id,data:{websiteId:lo.options.websiteId,...e}};(null==(t=lo.data)?void 0:t.amountAndCurrency)&&(o.data={...o.data,...lo.data.amountAndCurrency}),(null==(r=null==(n=lo.data)?void 0:n.transaction)?void 0:r.redirectUrl)&&(o.data.redirectUrl=`${o.data.redirectUrl}&originalRedirectUrl=${lo.data.transaction.redirectUrl}`);const{fields:s}=await lo.storefront.paymentInstruments.setup(o);return{instrument:a,transaction:s}}))}({data:{websiteId:null==(t=lo.options)?void 0:t.websiteId,...a}});if(lo.data=new Gm({instrument:o,transaction:s}),s.approvalUrl&&"unknown"===s.result)if(lo.options.features.fullPageRedirect)window.location=s.approvalUrl;else{const{paymentMethodsUrl:e}=lo.options._computed;K$({name:"rebilly-instruments-approval-url",url:`${e}/approval-url`,model:{setup:{transaction:s}},close:({transaction:e=s})=>{Qs.setupCompleted.dispatch({instrument:o,transaction:e})}})}else Qs.setupCompleted.dispatch({instrument:o,transaction:s});return{instrument:o,transaction:s}}catch(n){return ni(n,!1),n}}async function Z$({componentName:e,payload:t}){switch(e){case"result":af(),async function({payload:e}){var t,n;const r=oo.form;r||await uf();const a=lo.toModel(),o={data:a.data,options:a.options};lo.data.payout?o.payoutRequest=e:o[lo.options.transactionType]=e,null==(t=null==r?void 0:r.component)||t.call("route",{name:"result"}),null==(n=null==r?void 0:r.component)||n.call("update",o)}({payload:t});break;case"confirmation":af(),async function({payload:e}){var t,n,r,a,o,s,i,l;e.billingAddress&&lo.summary&&lo.data.isPurchase&&rp({instrument:e});const c=oo.form;c||await uf();const u=lo.toModel(),d={options:u.options,data:u.data,instrument:e};null==(t=null==c?void 0:c.component)||t.call("update",d),null==(n=null==c?void 0:c.component)||n.call("route",{name:"confirmation"}),(null==(a=null==(r=null==c?void 0:c.component)?void 0:r.events)?void 0:a[`${c.name}-confirm-purchase`])||null==(o=null==c?void 0:c.component)||o.on(`${c.name}-confirm-purchase`,(e=>{Q$({payload:e})})),(null==(i=null==(s=null==c?void 0:c.component)?void 0:s.events)?void 0:i[`${c.name}-confirm-setup`])||null==(l=null==c?void 0:c.component)||l.on(`${c.name}-confirm-setup`,(e=>{Y$({payload:e})}))}({payload:t});break;default:throw new Error(`'${e}' not a supported component`)}}function eE({payload:e}){Z$({componentName:"result",payload:e})}const tE=({state:e={}})=>{var t,n,r,a;(null==(n=null==(t=null==e?void 0:e.options)?void 0:t.features)?void 0:n.hideConfirmation)||V$({eventName:"instrument-ready",callback:t=>{var n,r,a,o;if("paypal"===(null==(n=t._raw)?void 0:n.method)&&!(null==(r=e.data)?void 0:r.isShippingRequired))return"setup"===(null==(a=e.options)?void 0:a.transactionType)?Y$({payload:t}):Q$({payload:t}),void(null==(o=e.loader)||o.startLoading({id:"express-purchase"}));Z$({componentName:"confirmation",payload:t})}}),(null==(a=null==(r=null==e?void 0:e.options)?void 0:r.features)?void 0:a.hideResult)||(V$({eventName:"payout-completed",callback:e=>{eE({payload:e=JSON.parse(JSON.stringify(e))})}}),V$({eventName:"purchase-completed",callback:e=>{eE({payload:e=JSON.parse(JSON.stringify(e))})}}),V$({eventName:"setup-completed",callback:e=>{eE({payload:e=JSON.parse(JSON.stringify(e))})}}))};async function nE({setupFramepay:e=bk,...t}={}){var n,r,a,o,s,i,l,c,u,d,p,m,f,h,y,g,b,v,w,k,$;try{lo.data={},lo.options={},lo.options=gk({options:t}),lo.form=pf({element:"form"}),lo.summary=pf({element:"summary"}),lo.shadowRoot=($=lo.form).getRootNode()instanceof ShadowRoot?$.getRootNode():null,lo.form&&(lo.form.style.maxWidth="750px"),lo.summary&&(lo.summary.style.maxWidth="750px"),lo.storefront=mf(),lo.mainStyleVars=H$(),lo.options&&(lo.options.themeFramepay=z$()),lo.loader.addDOMElement({el:lo.form}),lo.loader.addDOMElement({section:"summary",el:lo.summary}),lo.loader.startLoading({section:"summary",id:"rebilly-instruments-summary"}),lo.loader.startLoading({id:"rebilly-instruments-form"});const[E]=await Promise.all([Jm(),e()]);lo.data=E,Qs.dataReady.dispatch(lo.data),lo.i18n=D$(),lo.options&&!lo.options.websiteId&&(null==(n=lo.data.transaction)?void 0:n.websiteId)?lo.options.websiteId=lo.data.transaction.websiteId:lo.options&&!lo.options.websiteId&&(null==(r=lo.data.invoice)?void 0:r.websiteId)&&(lo.options.websiteId=lo.data.invoice.websiteId),lo.options&&lo.data.transaction&&"setup"===(null==(a=lo.data.transaction)?void 0:a.type)&&(lo.options.transactionType="setup"),lo.form&&uf().then((()=>function(){var e;(null==(e=lo.options)?void 0:e.deposit)?tf():lf()}())),lo.summary&&np(),lo.i18n(),lo.hasMounted=!0;const S=e=>{lo.loader.stopLoading({id:"rebilly-instruments-form"}),lo.form.querySelector('[data-rebilly-instruments="form"]').remove(),ni(lo.translate.getTranslation(e),!1)},_=(null==(o=lo.options)?void 0:o.invoiceId)||(null==(i=null==(s=lo.data)?void 0:s.transaction)?void 0:i.invoiceId);_&&(null==(l=lo.data.invoice)?void 0:l.isPaid)?S("form.error.invoiceIsPaid"):_&&(null==(c=lo.data.invoice)?void 0:c.isAbandoned)?S("form.error.invoiceIsAbandoned"):_&&(null==(u=lo.data.invoice)?void 0:u.isVoid)?S("form.error.invoiceIsVoid"):_&&(null==(d=lo.data.invoice)?void 0:d.isRefunded)&&S("form.error.invoiceIsRefunded");((null==(p=lo.options)?void 0:p.transactionId)||(null==(f=null==(m=lo.data)?void 0:m.transaction)?void 0:f.id))&&(null==(y=null==(h=lo.data)?void 0:h.transaction)?void 0:y.transactionIsCompleted)&&S("form.error.transactionIsCompleted"),(null==(b=null==(g=lo.options)?void 0:g.payout)?void 0:b.payoutRequestId)&&!(null==(v=lo.data.payout)?void 0:v.isPending)&&S("form.error.payoutNotPending");let P=!1;P=E.payout?!(null==(w=E.readyToPayout)?void 0:w.length):!(null==(k=E.readyToPay)?void 0:k.length),P&&(lo.loader.stopLoading({id:"rebilly-instruments-form"}),ni(lo.translate.getTranslation("form.error.noPaymentMethods"),!1))}catch(E){throw ni(E,!1),E}tE({state:lo})}async function rE(){var e;await(e=1e3,new Promise((t=>{setTimeout(t,e)}))),Object.keys(oo).forEach((e=>{oo.hasFrame(e)&&(oo[e].destroy(),oo[e]=null)})),Js.removeAll(document),lo.hasMounted=!1,lo.summary&&(lo.summary.textContent=""),lo.form.textContent="",Cd.cancelAll(),lo.loader.clearAll()}return new class{constructor(){this.state=lo,this.iframes=oo}async mount(e){await nE(e)}async destroy(){await rE()}async update(e){await async function({newOptions:e={}}={}){if(!lo.hasMounted)throw Error("Update method cannot be called before mounting instruments");const t=to({...lo.options},e);await rE(),nE({form:lo.form,summary:lo.summary,...t})}({newOptions:e})}async purchase(e){await Q$({payload:e})}async setup(e){await Y$({payload:e})}async show(e,t){await Z$({componentName:e,payload:t})}get version(){return"RebillyInstruments Ver.9.32.2"}on(e,t){V$({eventName:e,callback:t})}}}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebilly/instruments",
3
- "version": "9.32.2",
3
+ "version": "9.33.0",
4
4
  "author": "Rebilly",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",