@heliofi/checkout-react 3.1.0 → 4.0.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.
@@ -1,31 +1,25 @@
1
- (function(_,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],f):(_=typeof globalThis<"u"?globalThis:_||self,f(_["react-library-scaffold"]={},_.React))})(this,function(_,f){"use strict";var W={exports:{}},R={};/**
1
+ (function(x,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],E):(x=typeof globalThis<"u"?globalThis:x||self,E(x["react-library-scaffold"]={},x.React))})(this,function(x,E){"use strict";var J={exports:{}},L={};/**
2
2
  * @license React
3
- * react-jsx-runtime.production.js
3
+ * react-jsx-runtime.production.min.js
4
4
  *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Q;function Ce(){if(Q)return R;Q=1;var a=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function h(j,u,d){var E=null;if(d!==void 0&&(E=""+d),u.key!==void 0&&(E=""+u.key),"key"in u){d={};for(var v in u)v!=="key"&&(d[v]=u[v])}else d=u;return u=d.ref,{$$typeof:a,type:j,key:E,ref:u!==void 0?u:null,props:d}}return R.Fragment=c,R.jsx=h,R.jsxs=h,R}var O={};/**
9
+ */var re;function Pe(){if(re)return L;re=1;var f=E,d=Symbol.for("react.element"),k=Symbol.for("react.fragment"),O=Object.prototype.hasOwnProperty,y=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,F={key:!0,ref:!0,__self:!0,__source:!0};function w(R,l,_){var v,m={},S=null,g=null;_!==void 0&&(S=""+_),l.key!==void 0&&(S=""+l.key),l.ref!==void 0&&(g=l.ref);for(v in l)O.call(l,v)&&!F.hasOwnProperty(v)&&(m[v]=l[v]);if(R&&R.defaultProps)for(v in l=R.defaultProps,l)m[v]===void 0&&(m[v]=l[v]);return{$$typeof:d,type:R,key:S,ref:g,props:m,_owner:y.current}}return L.Fragment=k,L.jsx=w,L.jsxs=w,L}var W={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var q;function Te(){return q||(q=1,process.env.NODE_ENV!=="production"&&function(){function a(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Pe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case L:return"Fragment";case Ae:return"Portal";case ne:return"Profiler";case oe:return"StrictMode";case V:return"Suspense";case B:return"SuspenseList"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case se:return(e.displayName||"Context")+".Provider";case ae:return(e._context.displayName||"Context")+".Consumer";case z:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return r=e.displayName||null,r!==null?r:a(e.type)||"Memo";case J:r=e._payload,e=e._init;try{return a(e(r))}catch{}}return null}function c(e){return""+e}function h(e){try{c(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),c(e)}}function j(){}function u(){if(N===0){ie=console.log,le=console.info,fe=console.warn,de=console.error,Ee=console.group,ve=console.groupCollapsed,be=console.groupEnd;var e={configurable:!0,enumerable:!0,value:j,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}N++}function d(){if(N--,N===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:x({},e,{value:ie}),info:x({},e,{value:le}),warn:x({},e,{value:fe}),error:x({},e,{value:de}),group:x({},e,{value:Ee}),groupCollapsed:x({},e,{value:ve}),groupEnd:x({},e,{value:be})})}0>N&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function E(e){if(Z===void 0)try{throw Error()}catch(t){var r=t.stack.trim().match(/\n( *(at )?)/);Z=r&&r[1]||"",me=-1<t.stack.indexOf(`
18
- at`)?" (<anonymous>)":-1<t.stack.indexOf("@")?"@unknown:0:0":""}return`
19
- `+Z+e+me}function v(e,r){if(!e||$)return"";var t=K.get(e);if(t!==void 0)return t;$=!0,t=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var n=null;n=S.H,S.H=null,u();try{var i={DetermineComponentFrameRoot:function(){try{if(r){var p=function(){throw Error()};if(Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(g){var U=g}Reflect.construct(e,[],p)}else{try{p.call()}catch(g){U=g}e.call(p.prototype)}}else{try{throw Error()}catch(g){U=g}(p=e())&&typeof p.catch=="function"&&p.catch(function(){})}}catch(g){if(g&&U&&typeof g.stack=="string")return[g.stack,U.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=i.DetermineComponentFrameRoot(),m=o[0],w=o[1];if(m&&w){var l=m.split(`
20
- `),y=w.split(`
21
- `);for(o=s=0;s<l.length&&!l[s].includes("DetermineComponentFrameRoot");)s++;for(;o<y.length&&!y[o].includes("DetermineComponentFrameRoot");)o++;if(s===l.length||o===y.length)for(s=l.length-1,o=y.length-1;1<=s&&0<=o&&l[s]!==y[o];)o--;for(;1<=s&&0<=o;s--,o--)if(l[s]!==y[o]){if(s!==1||o!==1)do if(s--,o--,0>o||l[s]!==y[o]){var P=`
22
- `+l[s].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&K.set(e,P),P}while(1<=s&&0<=o);break}}}finally{$=!1,S.H=n,d(),Error.prepareStackTrace=t}return l=(l=e?e.displayName||e.name:"")?E(l):"",typeof e=="function"&&K.set(e,l),l}function k(e){if(e==null)return"";if(typeof e=="function"){var r=e.prototype;return v(e,!(!r||!r.isReactComponent))}if(typeof e=="string")return E(e);switch(e){case V:return E("Suspense");case B:return E("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case z:return e=v(e.render,!1),e;case G:return k(e.type);case J:r=e._payload,e=e._init;try{return k(e(r))}catch{}}return""}function T(){var e=S.A;return e===null?null:e.getOwner()}function M(e){if(ce.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Y(e,r){function t(){ge||(ge=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function H(){var e=a(this.type);return he[e]||(he[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function b(e,r,t,n,i,s){return t=s.ref,e={$$typeof:I,type:e,key:r,props:s,_owner:i},(t!==void 0?t:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:H}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function A(e,r,t,n,i,s){if(typeof e=="string"||typeof e=="function"||e===L||e===ne||e===oe||e===V||e===B||e===Ne||typeof e=="object"&&e!==null&&(e.$$typeof===J||e.$$typeof===G||e.$$typeof===se||e.$$typeof===ae||e.$$typeof===z||e.$$typeof===Me||e.getModuleId!==void 0)){var o=r.children;if(o!==void 0)if(n)if(X(o)){for(n=0;n<o.length;n++)re(o[n],e);Object.freeze&&Object.freeze(o)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else re(o,e)}else o="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?n="null":X(e)?n="array":e!==void 0&&e.$$typeof===I?(n="<"+(a(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):n=typeof e,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",n,o);if(ce.call(r,"key")){o=a(e);var m=Object.keys(r).filter(function(l){return l!=="key"});n=0<m.length?"{key: someKey, "+m.join(": ..., ")+": ...}":"{key: someKey}",pe[o+n]||(m=0<m.length?"{"+m.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
23
- let props = %s;
24
- <%s {...props} />
25
- React keys must be passed directly to JSX without using spread:
26
- let props = %s;
27
- <%s key={someKey} {...props} />`,n,o,m,o),pe[o+n]=!0)}if(o=null,t!==void 0&&(h(t),o=""+t),M(r)&&(h(r.key),o=""+r.key),"key"in r){t={};for(var w in r)w!=="key"&&(t[w]=r[w])}else t=r;return o&&Y(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),b(e,o,s,i,T(),t)}function re(e,r){if(typeof e=="object"&&e&&e.$$typeof!==Ye){if(X(e))for(var t=0;t<e.length;t++){var n=e[t];F(n)&&te(n,r)}else if(F(e))e._store&&(e._store.validated=1);else if(e===null||typeof e!="object"?t=null:(t=ue&&e[ue]||e["@@iterator"],t=typeof t=="function"?t:null),typeof t=="function"&&t!==e.entries&&(t=t.call(e),t!==e))for(;!(e=t.next()).done;)F(e.value)&&te(e.value,r)}}function F(e){return typeof e=="object"&&e!==null&&e.$$typeof===I}function te(e,r){if(e._store&&!e._store.validated&&e.key==null&&(e._store.validated=1,r=Re(r),!_e[r])){_e[r]=!0;var t="";e&&e._owner!=null&&e._owner!==T()&&(t=null,typeof e._owner.tag=="number"?t=a(e._owner.type):typeof e._owner.name=="string"&&(t=e._owner.name),t=" It was passed a child from "+t+".");var n=S.getCurrentStack;S.getCurrentStack=function(){var i=k(e.type);return n&&(i+=n()||""),i},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',r,t),S.getCurrentStack=n}}function Re(e){var r="",t=T();return t&&(t=a(t.type))&&(r=`
17
+ */var te;function je(){return te||(te=1,process.env.NODE_ENV!=="production"&&function(){var f=E,d=Symbol.for("react.element"),k=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),R=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),Y=Symbol.iterator,We="@@iterator";function Ye(e){if(e===null||typeof e!="object")return null;var r=Y&&e[Y]||e[We];return typeof r=="function"?r:null}var D=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Me("error",e,t)}}function Me(e,r,t){{var n=D.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var u=t.map(function(o){return String(o)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var Ue=!1,Ne=!1,Ve=!1,Be=!1,He=!1,oe;oe=Symbol.for("react.module.reference");function $e(e){return!!(typeof e=="string"||typeof e=="function"||e===O||e===F||He||e===y||e===_||e===v||Be||e===g||Ue||Ne||Ve||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===m||e.$$typeof===w||e.$$typeof===R||e.$$typeof===l||e.$$typeof===oe||e.getModuleId!==void 0))}function Je(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function ie(e){return e.displayName||"Context"}function T(e){if(e==null)return null;if(typeof e.tag=="number"&&p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case k:return"Portal";case F:return"Profiler";case y:return"StrictMode";case _:return"Suspense";case v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case R:var r=e;return ie(r)+".Consumer";case w:var t=e;return ie(t._context)+".Provider";case l:return Je(e,e.render,"ForwardRef");case m:var n=e.displayName||null;return n!==null?n:T(e.type)||"Memo";case S:{var i=e,u=i._payload,o=i._init;try{return T(o(u))}catch{return null}}}return null}var j=Object.assign,M=0,ue,se,ce,fe,le,de,ve;function pe(){}pe.__reactDisabledLog=!0;function Ge(){{if(M===0){ue=console.log,se=console.info,ce=console.warn,fe=console.error,le=console.group,de=console.groupCollapsed,ve=console.groupEnd;var e={configurable:!0,enumerable:!0,value:pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}M++}}function ze(){{if(M--,M===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:j({},e,{value:ue}),info:j({},e,{value:se}),warn:j({},e,{value:ce}),error:j({},e,{value:fe}),group:j({},e,{value:le}),groupCollapsed:j({},e,{value:de}),groupEnd:j({},e,{value:ve})})}M<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=D.ReactCurrentDispatcher,z;function N(e,r,t){{if(z===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);z=n&&n[1]||""}return`
18
+ `+z+e}}var K=!1,V;{var Ke=typeof WeakMap=="function"?WeakMap:Map;V=new Ke}function he(e,r){if(!e||K)return"";{var t=V.get(e);if(t!==void 0)return t}var n;K=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=G.current,G.current=null,Ge();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(C){n=C}Reflect.construct(e,[],o)}else{try{o.call()}catch(C){n=C}e.call(o.prototype)}}else{try{throw Error()}catch(C){n=C}e()}}catch(C){if(C&&n&&typeof C.stack=="string"){for(var a=C.stack.split(`
19
+ `),h=n.stack.split(`
20
+ `),s=a.length-1,c=h.length-1;s>=1&&c>=0&&a[s]!==h[c];)c--;for(;s>=1&&c>=0;s--,c--)if(a[s]!==h[c]){if(s!==1||c!==1)do if(s--,c--,c<0||a[s]!==h[c]){var b=`
21
+ `+a[s].replace(" at new "," at ");return e.displayName&&b.includes("<anonymous>")&&(b=b.replace("<anonymous>",e.displayName)),typeof e=="function"&&V.set(e,b),b}while(s>=1&&c>=0);break}}}finally{K=!1,G.current=u,ze(),Error.prepareStackTrace=i}var I=e?e.displayName||e.name:"",xe=I?N(I):"";return typeof e=="function"&&V.set(e,xe),xe}function Xe(e,r,t){return he(e,!1)}function Ze(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function B(e,r,t){if(e==null)return"";if(typeof e=="function")return he(e,Ze(e));if(typeof e=="string")return N(e);switch(e){case _:return N("Suspense");case v:return N("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return Xe(e.render);case m:return B(e.type,r,t);case S:{var n=e,i=n._payload,u=n._init;try{return B(u(i),r,t)}catch{}}}return""}var H=Object.prototype.hasOwnProperty,Ee={},me=D.ReactDebugCurrentFrame;function $(e){if(e){var r=e._owner,t=B(e.type,e._source,r?r.type:null);me.setExtraStackFrame(t)}else me.setExtraStackFrame(null)}function qe(e,r,t,n,i){{var u=Function.call.bind(H);for(var o in e)if(u(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var h=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&($(i),p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,o,typeof a),$(null)),a instanceof Error&&!(a.message in Ee)&&(Ee[a.message]=!0,$(i),p("Failed %s type: %s",t,a.message),$(null))}}}var Qe=Array.isArray;function X(e){return Qe(e)}function er(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function rr(e){try{return ge(e),!1}catch{return!0}}function ge(e){return""+e}function be(e){if(rr(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",er(e)),ge(e)}var U=D.ReactCurrentOwner,tr={key:!0,ref:!0,__self:!0,__source:!0},ye,Re,Z;Z={};function nr(e){if(H.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ar(e){if(H.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function or(e,r){if(typeof e.ref=="string"&&U.current&&r&&U.current.stateNode!==r){var t=T(U.current.type);Z[t]||(p('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(U.current.type),e.ref),Z[t]=!0)}}function ir(e,r){{var t=function(){ye||(ye=!0,p("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ur(e,r){{var t=function(){Re||(Re=!0,p("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var sr=function(e,r,t,n,i,u,o){var a={$$typeof:d,type:e,key:r,ref:t,props:o,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function cr(e,r,t,n,i){{var u,o={},a=null,h=null;t!==void 0&&(be(t),a=""+t),ar(r)&&(be(r.key),a=""+r.key),nr(r)&&(h=r.ref,or(r,i));for(u in r)H.call(r,u)&&!tr.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)o[u]===void 0&&(o[u]=s[u])}if(a||h){var c=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&ir(o,c),h&&ur(o,c)}return sr(e,a,h,i,n,U.current,o)}}var q=D.ReactCurrentOwner,_e=D.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=B(e.type,e._source,r?r.type:null);_e.setExtraStackFrame(t)}else _e.setExtraStackFrame(null)}var Q;Q=!1;function ee(e){return typeof e=="object"&&e!==null&&e.$$typeof===d}function Se(){{if(q.current){var e=T(q.current.type);if(e)return`
28
22
 
29
- Check the render method of \``+t+"`."),r||(e=a(e))&&(r=`
23
+ Check the render method of \``+e+"`."}return""}}function fr(e){return""}var Te={};function lr(e){{var r=Se();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
30
24
 
31
- Check the top-level render call using <`+e+">."),r}var Oe=f,I=Symbol.for("react.transitional.element"),Ae=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),oe=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),ae=Symbol.for("react.consumer"),se=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),Ne=Symbol.for("react.offscreen"),ue=Symbol.iterator,Pe=Symbol.for("react.client.reference"),S=Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=Object.prototype.hasOwnProperty,x=Object.assign,Me=Symbol.for("react.client.reference"),X=Array.isArray,N=0,ie,le,fe,de,Ee,ve,be;j.__reactDisabledLog=!0;var Z,me,$=!1,K=new(typeof WeakMap=="function"?WeakMap:Map),Ye=Symbol.for("react.client.reference"),ge,he={},pe={},_e={};O.Fragment=L,O.jsx=function(e,r,t,n,i){return A(e,r,t,!1,n,i)},O.jsxs=function(e,r,t,n,i){return A(e,r,t,!0,n,i)}}()),O}process.env.NODE_ENV==="production"?W.exports=Ce():W.exports=Te();var C=W.exports;const D=({children:a})=>C.jsxs("div",{children:["Error loading Helio Checkout for React",a?`: ${a}`:""]});class Se extends f.Component{constructor(c){super(c),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?C.jsx(D,{}):this.props.children}}const xe="https://embed.hel.io/assets/index-v1.js",ee="helio-checkout-react-v1",ye=(a=xe)=>{const c=document.createElement("script");return c.setAttribute("type","module"),c.setAttribute("id",ee),c.setAttribute("src",a),document.body.appendChild(c),c},je=({config:a})=>{const c=f.useRef(null),[h,j]=f.useState(!1),[u,d]=f.useState(),[E,v]=f.useState("");return f.useEffect(()=>j(!0),[]),f.useEffect(()=>{let k=!1;if(u)return;const T=()=>{if(k)return;const b=window.helioCheckout;if(!b){v("Unable to load helio checkout - missing init function on window.helioCheckout");return}d(()=>b)},M=b=>{const A=()=>v("Error loading script tag");return b.addEventListener("load",T),b.addEventListener("error",A),()=>{k=!0,b.removeEventListener("load",T),b.removeEventListener("error",A)}},Y=document.querySelector(`script#${ee}`);if(Y){window.helioCheckout?T():M(Y);return}const H=ye(a.embedScriptSource);return M(H)},[u,a.embedScriptSource]),f.useLayoutEffect(()=>{if(!(!u||!h)){if(!c.current){v("Missing element to mount Helio checkout");return}u(c.current,a)}},[u,h,a]),E?C.jsx(D,{children:E}):u?C.jsx("div",{ref:c}):null},ke=a=>C.jsx(Se,{children:C.jsx(je,{config:a.config})}),we=a=>C.jsx(ke,{config:a.config});_.HelioCheckout=we,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
25
+ Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=lr(r);if(Te[t])return;Te[t]=!0;var n="";e&&e._owner&&e._owner!==q.current&&(n=" It was passed a child from "+T(e._owner.type)+"."),A(e),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),A(null)}}function Oe(e,r){{if(typeof e!="object")return;if(X(e))for(var t=0;t<e.length;t++){var n=e[t];ee(n)&&Ce(n,r)}else if(ee(e))e._store&&(e._store.validated=!0);else if(e){var i=Ye(e);if(typeof i=="function"&&i!==e.entries)for(var u=i.call(e),o;!(o=u.next()).done;)ee(o.value)&&Ce(o.value,r)}}}function dr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===l||r.$$typeof===m))t=r.propTypes;else return;if(t){var n=T(r);qe(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Q){Q=!0;var i=T(r);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){A(e),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),A(null);break}}e.ref!==null&&(A(e),p("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function we(e,r,t,n,i,u){{var o=$e(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var h=fr();h?a+=h:a+=Se();var s;e===null?s="null":X(e)?s="array":e!==void 0&&e.$$typeof===d?(s="<"+(T(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var c=cr(e,r,t,i,u);if(c==null)return c;if(o){var b=r.children;if(b!==void 0)if(n)if(X(b)){for(var I=0;I<b.length;I++)Oe(b[I],e);Object.freeze&&Object.freeze(b)}else p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Oe(b,e)}return e===O?vr(c):dr(c),c}}function pr(e,r,t){return we(e,r,t,!0)}function hr(e,r,t){return we(e,r,t,!1)}var Er=hr,mr=pr;W.Fragment=O,W.jsx=Er,W.jsxs=mr}()),W}process.env.NODE_ENV==="production"?J.exports=Pe():J.exports=je();var P=J.exports;const ne=({children:f})=>P.jsxs("div",{children:["Error loading Helio Checkout for React",f?`: ${f}`:""]});class ke extends E.Component{constructor(d){super(d),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?P.jsx(ne,{}):this.props.children}}const Fe="https://embed.hel.io/assets/index-v1.js",ae="helio-checkout-react-v1",De=(f=Fe)=>{const d=document.createElement("script");return d.setAttribute("type","module"),d.setAttribute("id",ae),d.setAttribute("src",f),document.body.appendChild(d),d},Ae=({config:f})=>{const d=E.useRef(null),[k,O]=E.useState(!1),[y,F]=E.useState(),[w,R]=E.useState("");return E.useEffect(()=>O(!0),[]),E.useEffect(()=>{let l=!1;if(y)return;const _=()=>{if(l)return;const g=window.helioCheckout;if(!g){R("Unable to load helio checkout - missing init function on window.helioCheckout");return}F(()=>g)},v=g=>{const Y=()=>R("Error loading script tag");return g.addEventListener("load",_),g.addEventListener("error",Y),()=>{l=!0,g.removeEventListener("load",_),g.removeEventListener("error",Y)}},m=document.querySelector(`script#${ae}`);if(m){window.helioCheckout?_():v(m);return}const S=De(f.embedScriptSource);return v(S)},[y,f.embedScriptSource]),E.useLayoutEffect(()=>{if(!(!y||!k)){if(!d.current){R("Missing element to mount Helio checkout");return}y(d.current,f)}},[y,k,f]),w?P.jsx(ne,{children:w}):y?P.jsx("div",{ref:d}):null},Ie=f=>P.jsx(ke,{children:P.jsx(Ae,{config:f.config})}),Le=f=>P.jsx(Ie,{config:f.config});x.HelioCheckout=Le,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@heliofi/checkout-react",
3
3
  "private": false,
4
- "version": "3.1.0",
4
+ "version": "4.0.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -16,7 +16,8 @@
16
16
  "prepublishOnly": "rimraf dist && yarn build",
17
17
  "test": "vitest run",
18
18
  "test:watch": "vitest",
19
- "typecheck": "tsc -p tsconfig.json --noEmit"
19
+ "typecheck": "tsc -p tsconfig.json --noEmit",
20
+ "typecheck:fast": "tsc --noEmit --incremental"
20
21
  },
21
22
  "main": "./dist/helio-checkout-react.umd.js",
22
23
  "module": "./dist/helio-checkout-react.es.js",
@@ -33,15 +34,15 @@
33
34
  "dist/helio-checkout-react.umd.js"
34
35
  ],
35
36
  "peerDependencies": {
36
- "react": "^19",
37
- "react-dom": "^19"
37
+ "@types/react": "18.2.0 || ^19.0.0",
38
+ "@types/react-dom": "18.2.0 || ^19.0.0",
39
+ "react": "^18.2.0 || ^19.0.0",
40
+ "react-dom": "^18.2.0 || ^19.0.0"
38
41
  },
39
42
  "devDependencies": {
40
43
  "@testing-library/dom": "^9.3.3",
41
44
  "@testing-library/jest-dom": "5.16.5",
42
45
  "@testing-library/react": "^14.0.0",
43
- "@types/react": "^19",
44
- "@types/react-dom": "^19",
45
46
  "@typescript-eslint/eslint-plugin": "^6.0.0",
46
47
  "@typescript-eslint/parser": "^6.0.0",
47
48
  "@vitejs/plugin-react": "^4.3.2",
@@ -52,6 +53,6 @@
52
53
  "typescript": "5.1.6",
53
54
  "vite": "5.4.8",
54
55
  "vite-plugin-dts": "^3.7.1",
55
- "vitest": "1.2.1"
56
+ "vitest": "3.2.4"
56
57
  }
57
58
  }