@suportepos/split-checkout 0.1.7 → 0.1.8
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/dist/index.es.js +1711 -1706
- package/dist/index.umd.js +31 -31
- package/dist/standalone/suportepos-checkout.js +27 -27
- package/dist/types/CheckoutFlow.d.ts +16 -1
- package/dist/types/SplitCardForm.d.ts +3 -2
- package/dist/types/SplitPixForm.d.ts +3 -2
- package/dist/types/lib/CheckoutFlow.d.ts +16 -1
- package/dist/types/lib/SplitCardForm.d.ts +3 -2
- package/dist/types/lib/SplitPixForm.d.ts +3 -2
- package/package.json +48 -42
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Se,Ye){typeof exports=="object"&&typeof module<"u"?Ye(exports,require("react"),require("@mui/material"),require("@emotion/styled"),require("@emotion/react")):typeof define=="function"&&define.amd?define(["exports","react","@mui/material","@emotion/styled","@emotion/react"],Ye):(Se=typeof globalThis<"u"?globalThis:Se||self,Ye(Se.SplitCheckout={},Se.React,Se.material,Se.emStyled))})(this,(function(Se,Ye,p,Yn){"use strict";function Gn(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const Y=Gn(Ye);function qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vr={exports:{}},lr={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
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
|
|
9
|
+
*/var Rt;function Hn(){if(Rt)return lr;Rt=1;var e=Ye,r=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(l,d,h){var m,g={},b=null,T=null;h!==void 0&&(b=""+h),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(T=d.ref);for(m in d)n.call(d,m)&&!i.hasOwnProperty(m)&&(g[m]=d[m]);if(l&&l.defaultProps)for(m in d=l.defaultProps,d)g[m]===void 0&&(g[m]=d[m]);return{$$typeof:r,type:l,key:b,ref:T,props:g,_owner:o.current}}return lr.Fragment=t,lr.jsx=a,lr.jsxs=a,lr}var ur={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,39 +14,39 @@
|
|
|
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 jt;function
|
|
18
|
-
`+
|
|
19
|
-
`),Ee=
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var jt;function Kn(){return jt||(jt=1,process.env.NODE_ENV!=="production"&&(function(){var e=Ye,r=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),E=Symbol.iterator,u="@@iterator";function O(c){if(c===null||typeof c!="object")return null;var w=E&&c[E]||c[u];return typeof w=="function"?w:null}var A=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function k(c){{for(var w=arguments.length,j=new Array(w>1?w-1:0),B=1;B<w;B++)j[B-1]=arguments[B];V("error",c,j)}}function V(c,w,j){{var B=A.ReactDebugCurrentFrame,te=B.getStackAddendum();te!==""&&(w+="%s",j=j.concat([te]));var le=j.map(function(J){return String(J)});le.unshift("Warning: "+w),Function.prototype.apply.call(console[c],console,le)}}var _=!1,S=!1,I=!1,re=!1,ce=!1,X;X=Symbol.for("react.module.reference");function ue(c){return!!(typeof c=="string"||typeof c=="function"||c===n||c===i||ce||c===o||c===h||c===m||re||c===T||_||S||I||typeof c=="object"&&c!==null&&(c.$$typeof===b||c.$$typeof===g||c.$$typeof===a||c.$$typeof===l||c.$$typeof===d||c.$$typeof===X||c.getModuleId!==void 0))}function ie(c,w,j){var B=c.displayName;if(B)return B;var te=w.displayName||w.name||"";return te!==""?j+"("+te+")":j}function s(c){return c.displayName||"Context"}function $(c){if(c==null)return null;if(typeof c.tag=="number"&&k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case n:return"Fragment";case t:return"Portal";case i:return"Profiler";case o:return"StrictMode";case h:return"Suspense";case m:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case l:var w=c;return s(w)+".Consumer";case a:var j=c;return s(j._context)+".Provider";case d:return ie(c,c.render,"ForwardRef");case g:var B=c.displayName||null;return B!==null?B:$(c.type)||"Memo";case b:{var te=c,le=te._payload,J=te._init;try{return $(J(le))}catch{return null}}}return null}var C=Object.assign,N=0,G,pe,ve,Be,P,R,L;function U(){}U.__reactDisabledLog=!0;function D(){{if(N===0){G=console.log,pe=console.info,ve=console.warn,Be=console.error,P=console.group,R=console.groupCollapsed,L=console.groupEnd;var c={configurable:!0,enumerable:!0,value:U,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}N++}}function q(){{if(N--,N===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:C({},c,{value:G}),info:C({},c,{value:pe}),warn:C({},c,{value:ve}),error:C({},c,{value:Be}),group:C({},c,{value:P}),groupCollapsed:C({},c,{value:R}),groupEnd:C({},c,{value:L})})}N<0&&k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var F=A.ReactCurrentDispatcher,z;function M(c,w,j){{if(z===void 0)try{throw Error()}catch(te){var B=te.stack.trim().match(/\n( *(at )?)/);z=B&&B[1]||""}return`
|
|
18
|
+
`+z+c}}var K=!1,W;{var xe=typeof WeakMap=="function"?WeakMap:Map;W=new xe}function v(c,w){if(!c||K)return"";{var j=W.get(c);if(j!==void 0)return j}var B;K=!0;var te=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var le;le=F.current,F.current=null,D();try{if(w){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(Pe){B=Pe}Reflect.construct(c,[],J)}else{try{J.call()}catch(Pe){B=Pe}c.call(J.prototype)}}else{try{throw Error()}catch(Pe){B=Pe}c()}}catch(Pe){if(Pe&&B&&typeof Pe.stack=="string"){for(var H=Pe.stack.split(`
|
|
19
|
+
`),Ee=B.stack.split(`
|
|
20
|
+
`),ge=H.length-1,be=Ee.length-1;ge>=1&&be>=0&&H[ge]!==Ee[be];)be--;for(;ge>=1&&be>=0;ge--,be--)if(H[ge]!==Ee[be]){if(ge!==1||be!==1)do if(ge--,be--,be<0||H[ge]!==Ee[be]){var Ie=`
|
|
21
|
+
`+H[ge].replace(" at new "," at ");return c.displayName&&Ie.includes("<anonymous>")&&(Ie=Ie.replace("<anonymous>",c.displayName)),typeof c=="function"&&W.set(c,Ie),Ie}while(ge>=1&&be>=0);break}}}finally{K=!1,F.current=le,q(),Error.prepareStackTrace=te}var cr=c?c.displayName||c.name:"",Qe=cr?M(cr):"";return typeof c=="function"&&W.set(c,Qe),Qe}function Ce(c,w,j){return v(c,!1)}function je(c){var w=c.prototype;return!!(w&&w.isReactComponent)}function Ae(c,w,j){if(c==null)return"";if(typeof c=="function")return v(c,je(c));if(typeof c=="string")return M(c);switch(c){case h:return M("Suspense");case m:return M("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case d:return Ce(c.render);case g:return Ae(c.type,w,j);case b:{var B=c,te=B._payload,le=B._init;try{return Ae(le(te),w,j)}catch{}}}return""}var Je=Object.prototype.hasOwnProperty,Ur={},Yr=A.ReactDebugCurrentFrame;function sr(c){if(c){var w=c._owner,j=Ae(c.type,c._source,w?w.type:null);Yr.setExtraStackFrame(j)}else Yr.setExtraStackFrame(null)}function St(c,w,j,B,te){{var le=Function.call.bind(Je);for(var J in c)if(le(c,J)){var H=void 0;try{if(typeof c[J]!="function"){var Ee=Error((B||"React class")+": "+j+" type `"+J+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[J]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ee.name="Invariant Violation",Ee}H=c[J](w,J,B,j,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ge){H=ge}H&&!(H instanceof Error)&&(sr(te),k("%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).",B||"React class",j,J,typeof H),sr(null)),H instanceof Error&&!(H.message in Ur)&&(Ur[H.message]=!0,sr(te),k("Failed %s type: %s",j,H.message),sr(null))}}}var Ct=Array.isArray;function br(c){return Ct(c)}function Tt(c){{var w=typeof Symbol=="function"&&Symbol.toStringTag,j=w&&c[Symbol.toStringTag]||c.constructor.name||"Object";return j}}function Et(c){try{return Gr(c),!1}catch{return!0}}function Gr(c){return""+c}function qr(c){if(Et(c))return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Tt(c)),Gr(c)}var Hr=A.ReactCurrentOwner,wt={key:!0,ref:!0,__self:!0,__source:!0},Kr,x;function de(c){if(Je.call(c,"ref")){var w=Object.getOwnPropertyDescriptor(c,"ref").get;if(w&&w.isReactWarning)return!1}return c.ref!==void 0}function Te(c){if(Je.call(c,"key")){var w=Object.getOwnPropertyDescriptor(c,"key").get;if(w&&w.isReactWarning)return!1}return c.key!==void 0}function ke(c,w){typeof c.ref=="string"&&Hr.current}function Ue(c,w){{var j=function(){Kr||(Kr=!0,k("%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)",w))};j.isReactWarning=!0,Object.defineProperty(c,"key",{get:j,configurable:!0})}}function Ms(c,w){{var j=function(){x||(x=!0,k("%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)",w))};j.isReactWarning=!0,Object.defineProperty(c,"ref",{get:j,configurable:!0})}}var Ds=function(c,w,j,B,te,le,J){var H={$$typeof:r,type:c,key:w,ref:j,props:J,_owner:le};return H._store={},Object.defineProperty(H._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(H,"_self",{configurable:!1,enumerable:!1,writable:!1,value:B}),Object.defineProperty(H,"_source",{configurable:!1,enumerable:!1,writable:!1,value:te}),Object.freeze&&(Object.freeze(H.props),Object.freeze(H)),H};function Fs(c,w,j,B,te){{var le,J={},H=null,Ee=null;j!==void 0&&(qr(j),H=""+j),Te(w)&&(qr(w.key),H=""+w.key),de(w)&&(Ee=w.ref,ke(w,te));for(le in w)Je.call(w,le)&&!wt.hasOwnProperty(le)&&(J[le]=w[le]);if(c&&c.defaultProps){var ge=c.defaultProps;for(le in ge)J[le]===void 0&&(J[le]=ge[le])}if(H||Ee){var be=typeof c=="function"?c.displayName||c.name||"Unknown":c;H&&Ue(J,be),Ee&&Ms(J,be)}return Ds(c,H,Ee,te,B,Hr.current,J)}}var Pt=A.ReactCurrentOwner,Fn=A.ReactDebugCurrentFrame;function ar(c){if(c){var w=c._owner,j=Ae(c.type,c._source,w?w.type:null);Fn.setExtraStackFrame(j)}else Fn.setExtraStackFrame(null)}var $t;$t=!1;function Ot(c){return typeof c=="object"&&c!==null&&c.$$typeof===r}function Bn(){{if(Pt.current){var c=$(Pt.current.type);if(c)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+c+"`."}return""}}function Bs(c){return""}var Vn={};function Vs(c){{var w=Bn();if(!w){var j=typeof c=="string"?c:c.displayName||c.name;j&&(w=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+j+">.")}return w}}function Wn(c,w){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var j=Vs(w);if(Vn[j])return;Vn[j]=!0;var B="";c&&c._owner&&c._owner!==Pt.current&&(B=" It was passed a child from "+$(c._owner.type)+"."),ar(c),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',j,B),ar(null)}}function Ln(c,w){{if(typeof c!="object")return;if(br(c))for(var j=0;j<c.length;j++){var B=c[j];Ot(B)&&Wn(B,w)}else if(Ot(c))c._store&&(c._store.validated=!0);else if(c){var te=O(c);if(typeof te=="function"&&te!==c.entries)for(var le=te.call(c),J;!(J=le.next()).done;)Ot(J.value)&&Wn(J.value,w)}}}function Ws(c){{var w=c.type;if(w==null||typeof w=="string")return;var j;if(typeof w=="function")j=w.propTypes;else if(typeof w=="object"&&(w.$$typeof===d||w.$$typeof===g))j=w.propTypes;else return;if(j){var B=$(w);St(j,c.props,"prop",B,c)}else if(w.PropTypes!==void 0&&!$t){$t=!0;var te=$(w);k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",te||"Unknown")}typeof w.getDefaultProps=="function"&&!w.getDefaultProps.isReactClassApproved&&k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ls(c){{for(var w=Object.keys(c.props),j=0;j<w.length;j++){var B=w[j];if(B!=="children"&&B!=="key"){ar(c),k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",B),ar(null);break}}c.ref!==null&&(ar(c),k("Invalid attribute `ref` supplied to `React.Fragment`."),ar(null))}}var zn={};function Un(c,w,j,B,te,le){{var J=ue(c);if(!J){var H="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(H+=" 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 Ee=Bs();Ee?H+=Ee:H+=Bn();var ge;c===null?ge="null":br(c)?ge="array":c!==void 0&&c.$$typeof===r?(ge="<"+($(c.type)||"Unknown")+" />",H=" Did you accidentally export a JSX literal instead of a component?"):ge=typeof c,k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ge,H)}var be=Fs(c,w,j,te,le);if(be==null)return be;if(J){var Ie=w.children;if(Ie!==void 0)if(B)if(br(Ie)){for(var cr=0;cr<Ie.length;cr++)Ln(Ie[cr],c);Object.freeze&&Object.freeze(Ie)}else k("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 Ln(Ie,c)}if(Je.call(w,"key")){var Qe=$(c),Pe=Object.keys(w).filter(function(Hs){return Hs!=="key"}),_t=Pe.length>0?"{key: someKey, "+Pe.join(": ..., ")+": ...}":"{key: someKey}";if(!zn[Qe+_t]){var qs=Pe.length>0?"{"+Pe.join(": ..., ")+": ...}":"{}";k(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,
|
|
30
|
+
<%s key={someKey} {...props} />`,_t,Qe,qs,Qe),zn[Qe+_t]=!0}}return c===n?Ls(be):Ws(be),be}}function zs(c,w,j){return Un(c,w,j,!0)}function Us(c,w,j){return Un(c,w,j,!1)}var Ys=Us,Gs=zs;ur.Fragment=n,ur.jsx=Ys,ur.jsxs=Gs})()),ur}var At;function Jn(){return At||(At=1,process.env.NODE_ENV==="production"?vr.exports=Hn():vr.exports=Kn()),vr.exports}var f=Jn();const kt=e=>e,Qn=(()=>{let e=kt;return{configure(r){e=r},generate(r){return e(r)},reset(){e=kt}}})();function Ve(e,...r){const t=new URL(`https://mui.com/production-error/?code=${e}`);return r.forEach(n=>t.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${t} for the full message.`}function Ge(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Ve(7));return e.charAt(0).toUpperCase()+e.slice(1)}var xr={exports:{}},Sr={exports:{}},Z={};/** @license React v16.13.1
|
|
31
31
|
* react-is.production.min.js
|
|
32
32
|
*
|
|
33
33
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the MIT license found in the
|
|
36
36
|
* LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/var
|
|
37
|
+
*/var It;function Xn(){if(It)return Z;It=1;var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,T=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,O=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function V(S){if(typeof S=="object"&&S!==null){var I=S.$$typeof;switch(I){case r:switch(S=S.type,S){case d:case h:case n:case i:case o:case g:return S;default:switch(S=S&&S.$$typeof,S){case l:case m:case E:case T:case a:return S;default:return I}}case t:return I}}}function _(S){return V(S)===h}return Z.AsyncMode=d,Z.ConcurrentMode=h,Z.ContextConsumer=l,Z.ContextProvider=a,Z.Element=r,Z.ForwardRef=m,Z.Fragment=n,Z.Lazy=E,Z.Memo=T,Z.Portal=t,Z.Profiler=i,Z.StrictMode=o,Z.Suspense=g,Z.isAsyncMode=function(S){return _(S)||V(S)===d},Z.isConcurrentMode=_,Z.isContextConsumer=function(S){return V(S)===l},Z.isContextProvider=function(S){return V(S)===a},Z.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===r},Z.isForwardRef=function(S){return V(S)===m},Z.isFragment=function(S){return V(S)===n},Z.isLazy=function(S){return V(S)===E},Z.isMemo=function(S){return V(S)===T},Z.isPortal=function(S){return V(S)===t},Z.isProfiler=function(S){return V(S)===i},Z.isStrictMode=function(S){return V(S)===o},Z.isSuspense=function(S){return V(S)===g},Z.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===n||S===h||S===i||S===o||S===g||S===b||typeof S=="object"&&S!==null&&(S.$$typeof===E||S.$$typeof===T||S.$$typeof===a||S.$$typeof===l||S.$$typeof===m||S.$$typeof===O||S.$$typeof===A||S.$$typeof===k||S.$$typeof===u)},Z.typeOf=V,Z}var ee={};/** @license React v16.13.1
|
|
38
38
|
* react-is.development.js
|
|
39
39
|
*
|
|
40
40
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
41
41
|
*
|
|
42
42
|
* This source code is licensed under the MIT license found in the
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/var
|
|
44
|
+
*/var Nt;function Zn(){return Nt||(Nt=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,T=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,O=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function V(v){return typeof v=="string"||typeof v=="function"||v===n||v===h||v===i||v===o||v===g||v===b||typeof v=="object"&&v!==null&&(v.$$typeof===E||v.$$typeof===T||v.$$typeof===a||v.$$typeof===l||v.$$typeof===m||v.$$typeof===O||v.$$typeof===A||v.$$typeof===k||v.$$typeof===u)}function _(v){if(typeof v=="object"&&v!==null){var Ce=v.$$typeof;switch(Ce){case r:var je=v.type;switch(je){case d:case h:case n:case i:case o:case g:return je;default:var Ae=je&&je.$$typeof;switch(Ae){case l:case m:case E:case T:case a:return Ae;default:return Ce}}case t:return Ce}}}var S=d,I=h,re=l,ce=a,X=r,ue=m,ie=n,s=E,$=T,C=t,N=i,G=o,pe=g,ve=!1;function Be(v){return ve||(ve=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(v)||_(v)===d}function P(v){return _(v)===h}function R(v){return _(v)===l}function L(v){return _(v)===a}function U(v){return typeof v=="object"&&v!==null&&v.$$typeof===r}function D(v){return _(v)===m}function q(v){return _(v)===n}function F(v){return _(v)===E}function z(v){return _(v)===T}function M(v){return _(v)===t}function K(v){return _(v)===i}function W(v){return _(v)===o}function xe(v){return _(v)===g}ee.AsyncMode=S,ee.ConcurrentMode=I,ee.ContextConsumer=re,ee.ContextProvider=ce,ee.Element=X,ee.ForwardRef=ue,ee.Fragment=ie,ee.Lazy=s,ee.Memo=$,ee.Portal=C,ee.Profiler=N,ee.StrictMode=G,ee.Suspense=pe,ee.isAsyncMode=Be,ee.isConcurrentMode=P,ee.isContextConsumer=R,ee.isContextProvider=L,ee.isElement=U,ee.isForwardRef=D,ee.isFragment=q,ee.isLazy=F,ee.isMemo=z,ee.isPortal=M,ee.isProfiler=K,ee.isStrictMode=W,ee.isSuspense=xe,ee.isValidElementType=V,ee.typeOf=_})()),ee}var Mt;function Dt(){return Mt||(Mt=1,process.env.NODE_ENV==="production"?Sr.exports=Xn():Sr.exports=Zn()),Sr.exports}/*
|
|
45
45
|
object-assign
|
|
46
46
|
(c) Sindre Sorhus
|
|
47
47
|
@license MIT
|
|
48
|
-
*/var
|
|
49
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
48
|
+
*/var Jr,Ft;function eo(){if(Ft)return Jr;Ft=1;var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},l=0;l<10;l++)a["_"+String.fromCharCode(l)]=l;var d=Object.getOwnPropertyNames(a).map(function(m){return a[m]});if(d.join("")!=="0123456789")return!1;var h={};return"abcdefghijklmnopqrst".split("").forEach(function(m){h[m]=m}),Object.keys(Object.assign({},h)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Jr=o()?Object.assign:function(i,a){for(var l,d=n(i),h,m=1;m<arguments.length;m++){l=Object(arguments[m]);for(var g in l)r.call(l,g)&&(d[g]=l[g]);if(e){h=e(l);for(var b=0;b<h.length;b++)t.call(l,h[b])&&(d[h[b]]=l[h[b]])}}return d},Jr}var Qr,Bt;function Xr(){if(Bt)return Qr;Bt=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Qr=e,Qr}var Zr,Vt;function Wt(){return Vt||(Vt=1,Zr=Function.call.bind(Object.prototype.hasOwnProperty)),Zr}var et,Lt;function ro(){if(Lt)return et;Lt=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var r=Xr(),t={},n=Wt();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,l,d,h){if(process.env.NODE_ENV!=="production"){for(var m in i)if(n(i,m)){var g;try{if(typeof i[m]!="function"){var b=Error((d||"React class")+": "+l+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}g=i[m](a,m,d,l,null,r)}catch(E){g=E}if(g&&!(g instanceof Error)&&e((d||"React class")+": type specification of "+l+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in t)){t[g.message]=!0;var T=h?h():"";e("Failed "+l+" type: "+g.message+(T??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},et=o,et}var rt,zt;function to(){if(zt)return rt;zt=1;var e=Dt(),r=eo(),t=Xr(),n=Wt(),o=ro(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var d="Warning: "+l;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}});function a(){return null}return rt=function(l,d){var h=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function g(P){var R=P&&(h&&P[h]||P[m]);if(typeof R=="function")return R}var b="<<anonymous>>",T={array:A("array"),bigint:A("bigint"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:k(),arrayOf:V,element:_(),elementType:S(),instanceOf:I,node:ue(),objectOf:ce,oneOf:re,oneOfType:X,shape:s,exact:$};function E(P,R){return P===R?P!==0||1/P===1/R:P!==P&&R!==R}function u(P,R){this.message=P,this.data=R&&typeof R=="object"?R:{},this.stack=""}u.prototype=Error.prototype;function O(P){if(process.env.NODE_ENV!=="production")var R={},L=0;function U(q,F,z,M,K,W,xe){if(M=M||b,W=W||z,xe!==t){if(d){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ce=M+":"+z;!R[Ce]&&L<3&&(i("You are manually calling a React.PropTypes validation function for the `"+W+"` prop on `"+M+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),R[Ce]=!0,L++)}}return F[z]==null?q?F[z]===null?new u("The "+K+" `"+W+"` is marked as required "+("in `"+M+"`, but its value is `null`.")):new u("The "+K+" `"+W+"` is marked as required in "+("`"+M+"`, but its value is `undefined`.")):null:P(F,z,M,K,W)}var D=U.bind(null,!1);return D.isRequired=U.bind(null,!0),D}function A(P){function R(L,U,D,q,F,z){var M=L[U],K=G(M);if(K!==P){var W=pe(M);return new u("Invalid "+q+" `"+F+"` of type "+("`"+W+"` supplied to `"+D+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return O(R)}function k(){return O(a)}function V(P){function R(L,U,D,q,F){if(typeof P!="function")return new u("Property `"+F+"` of component `"+D+"` has invalid PropType notation inside arrayOf.");var z=L[U];if(!Array.isArray(z)){var M=G(z);return new u("Invalid "+q+" `"+F+"` of type "+("`"+M+"` supplied to `"+D+"`, expected an array."))}for(var K=0;K<z.length;K++){var W=P(z,K,D,q,F+"["+K+"]",t);if(W instanceof Error)return W}return null}return O(R)}function _(){function P(R,L,U,D,q){var F=R[L];if(!l(F)){var z=G(F);return new u("Invalid "+D+" `"+q+"` of type "+("`"+z+"` supplied to `"+U+"`, expected a single ReactElement."))}return null}return O(P)}function S(){function P(R,L,U,D,q){var F=R[L];if(!e.isValidElementType(F)){var z=G(F);return new u("Invalid "+D+" `"+q+"` of type "+("`"+z+"` supplied to `"+U+"`, expected a single ReactElement type."))}return null}return O(P)}function I(P){function R(L,U,D,q,F){if(!(L[U]instanceof P)){var z=P.name||b,M=Be(L[U]);return new u("Invalid "+q+" `"+F+"` of type "+("`"+M+"` supplied to `"+D+"`, expected ")+("instance of `"+z+"`."))}return null}return O(R)}function re(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function R(L,U,D,q,F){for(var z=L[U],M=0;M<P.length;M++)if(E(z,P[M]))return null;var K=JSON.stringify(P,function(xe,v){var Ce=pe(v);return Ce==="symbol"?String(v):v});return new u("Invalid "+q+" `"+F+"` of value `"+String(z)+"` "+("supplied to `"+D+"`, expected one of "+K+"."))}return O(R)}function ce(P){function R(L,U,D,q,F){if(typeof P!="function")return new u("Property `"+F+"` of component `"+D+"` has invalid PropType notation inside objectOf.");var z=L[U],M=G(z);if(M!=="object")return new u("Invalid "+q+" `"+F+"` of type "+("`"+M+"` supplied to `"+D+"`, expected an object."));for(var K in z)if(n(z,K)){var W=P(z,K,D,q,F+"."+K,t);if(W instanceof Error)return W}return null}return O(R)}function X(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var R=0;R<P.length;R++){var L=P[R];if(typeof L!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ve(L)+" at index "+R+"."),a}function U(D,q,F,z,M){for(var K=[],W=0;W<P.length;W++){var xe=P[W],v=xe(D,q,F,z,M,t);if(v==null)return null;v.data&&n(v.data,"expectedType")&&K.push(v.data.expectedType)}var Ce=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new u("Invalid "+z+" `"+M+"` supplied to "+("`"+F+"`"+Ce+"."))}return O(U)}function ue(){function P(R,L,U,D,q){return C(R[L])?null:new u("Invalid "+D+" `"+q+"` supplied to "+("`"+U+"`, expected a ReactNode."))}return O(P)}function ie(P,R,L,U,D){return new u((P||"React class")+": "+R+" type `"+L+"."+U+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+D+"`.")}function s(P){function R(L,U,D,q,F){var z=L[U],M=G(z);if(M!=="object")return new u("Invalid "+q+" `"+F+"` of type `"+M+"` "+("supplied to `"+D+"`, expected `object`."));for(var K in P){var W=P[K];if(typeof W!="function")return ie(D,q,F,K,pe(W));var xe=W(z,K,D,q,F+"."+K,t);if(xe)return xe}return null}return O(R)}function $(P){function R(L,U,D,q,F){var z=L[U],M=G(z);if(M!=="object")return new u("Invalid "+q+" `"+F+"` of type `"+M+"` "+("supplied to `"+D+"`, expected `object`."));var K=r({},L[U],P);for(var W in K){var xe=P[W];if(n(P,W)&&typeof xe!="function")return ie(D,q,F,W,pe(xe));if(!xe)return new u("Invalid "+q+" `"+F+"` key `"+W+"` supplied to `"+D+"`.\nBad object: "+JSON.stringify(L[U],null," ")+`
|
|
49
|
+
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var v=xe(z,W,D,q,F+"."+W,t);if(v)return v}return null}return O(R)}function C(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(C);if(P===null||l(P))return!0;var R=g(P);if(R){var L=R.call(P),U;if(R!==P.entries){for(;!(U=L.next()).done;)if(!C(U.value))return!1}else for(;!(U=L.next()).done;){var D=U.value;if(D&&!C(D[1]))return!1}}else return!1;return!0;default:return!1}}function N(P,R){return P==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function G(P){var R=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":N(R,P)?"symbol":R}function pe(P){if(typeof P>"u"||P===null)return""+P;var R=G(P);if(R==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return R}function ve(P){var R=pe(P);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function Be(P){return!P.constructor||!P.constructor.name?b:P.constructor.name}return T.checkPropTypes=o,T.resetWarningCache=o.resetWarningCache,T.PropTypes=T,T},rt}var tt,Ut;function no(){if(Ut)return tt;Ut=1;var e=Xr();function r(){}function t(){}return t.resetWarningCache=r,tt=function(){function n(a,l,d,h,m,g){if(g!==e){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}}n.isRequired=n;function o(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:t,resetWarningCache:r};return i.PropTypes=i,i},tt}var Yt;function oo(){if(Yt)return xr.exports;if(Yt=1,process.env.NODE_ENV!=="production"){var e=Dt(),r=!0;xr.exports=to()(e.isElement,r)}else xr.exports=no()();return xr.exports}var io=oo();const Q=qn(io);function Gt(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(r=0;r<o;r++)e[r]&&(t=Gt(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function qt(){for(var e,r,t=0,n="",o=arguments.length;t<o;t++)(e=arguments[t])&&(r=Gt(e))&&(n&&(n+=" "),n+=r);return n}function so(e,r,t=void 0){const n={};for(const o in e){const i=e[o];let a="",l=!0;for(let d=0;d<i.length;d+=1){const h=i[d];h&&(a+=(l===!0?"":" ")+r(h),l=!1,t&&t[h]&&(a+=" "+t[h]))}n[o]=a}return n}var Cr={exports:{}},se={};/**
|
|
50
50
|
* @license React
|
|
51
51
|
* react-is.production.js
|
|
52
52
|
*
|
|
@@ -54,7 +54,7 @@ Valid keys: `+JSON.stringify(Object.keys(T),null," "));var _=Se(M,H,V,G,L+"."+H
|
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the MIT license found in the
|
|
56
56
|
* LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/var
|
|
57
|
+
*/var Ht;function ao(){if(Ht)return se;Ht=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.view_transition"),T=Symbol.for("react.client.reference");function E(u){if(typeof u=="object"&&u!==null){var O=u.$$typeof;switch(O){case e:switch(u=u.type,u){case t:case o:case n:case d:case h:case b:return u;default:switch(u=u&&u.$$typeof,u){case a:case l:case g:case m:return u;case i:return u;default:return O}}case r:return O}}}return se.ContextConsumer=i,se.ContextProvider=a,se.Element=e,se.ForwardRef=l,se.Fragment=t,se.Lazy=g,se.Memo=m,se.Portal=r,se.Profiler=o,se.StrictMode=n,se.Suspense=d,se.SuspenseList=h,se.isContextConsumer=function(u){return E(u)===i},se.isContextProvider=function(u){return E(u)===a},se.isElement=function(u){return typeof u=="object"&&u!==null&&u.$$typeof===e},se.isForwardRef=function(u){return E(u)===l},se.isFragment=function(u){return E(u)===t},se.isLazy=function(u){return E(u)===g},se.isMemo=function(u){return E(u)===m},se.isPortal=function(u){return E(u)===r},se.isProfiler=function(u){return E(u)===o},se.isStrictMode=function(u){return E(u)===n},se.isSuspense=function(u){return E(u)===d},se.isSuspenseList=function(u){return E(u)===h},se.isValidElementType=function(u){return typeof u=="string"||typeof u=="function"||u===t||u===o||u===n||u===d||u===h||typeof u=="object"&&u!==null&&(u.$$typeof===g||u.$$typeof===m||u.$$typeof===a||u.$$typeof===i||u.$$typeof===l||u.$$typeof===T||u.getModuleId!==void 0)},se.typeOf=E,se}var ae={};/**
|
|
58
58
|
* @license React
|
|
59
59
|
* react-is.development.js
|
|
60
60
|
*
|
|
@@ -62,23 +62,23 @@ Valid keys: `+JSON.stringify(Object.keys(T),null," "));var _=Se(M,H,V,G,L+"."+H
|
|
|
62
62
|
*
|
|
63
63
|
* This source code is licensed under the MIT license found in the
|
|
64
64
|
* LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/var
|
|
66
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:
|
|
65
|
+
*/var Kt;function co(){return Kt||(Kt=1,process.env.NODE_ENV!=="production"&&(function(){function e(u){if(typeof u=="object"&&u!==null){var O=u.$$typeof;switch(O){case r:switch(u=u.type,u){case n:case i:case o:case h:case m:case T:return u;default:switch(u=u&&u.$$typeof,u){case l:case d:case b:case g:return u;case a:return u;default:return O}}case t:return O}}}var r=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),T=Symbol.for("react.view_transition"),E=Symbol.for("react.client.reference");ae.ContextConsumer=a,ae.ContextProvider=l,ae.Element=r,ae.ForwardRef=d,ae.Fragment=n,ae.Lazy=b,ae.Memo=g,ae.Portal=t,ae.Profiler=i,ae.StrictMode=o,ae.Suspense=h,ae.SuspenseList=m,ae.isContextConsumer=function(u){return e(u)===a},ae.isContextProvider=function(u){return e(u)===l},ae.isElement=function(u){return typeof u=="object"&&u!==null&&u.$$typeof===r},ae.isForwardRef=function(u){return e(u)===d},ae.isFragment=function(u){return e(u)===n},ae.isLazy=function(u){return e(u)===b},ae.isMemo=function(u){return e(u)===g},ae.isPortal=function(u){return e(u)===t},ae.isProfiler=function(u){return e(u)===i},ae.isStrictMode=function(u){return e(u)===o},ae.isSuspense=function(u){return e(u)===h},ae.isSuspenseList=function(u){return e(u)===m},ae.isValidElementType=function(u){return typeof u=="string"||typeof u=="function"||u===n||u===i||u===o||u===h||u===m||typeof u=="object"&&u!==null&&(u.$$typeof===b||u.$$typeof===g||u.$$typeof===l||u.$$typeof===a||u.$$typeof===d||u.$$typeof===E||u.getModuleId!==void 0)},ae.typeOf=e})()),ae}var Jt;function lo(){return Jt||(Jt=1,process.env.NODE_ENV==="production"?Cr.exports=ao():Cr.exports=co()),Cr.exports}var Tr=lo();function Me(e){if(typeof e!="object"||e===null)return!1;const r=Object.getPrototypeOf(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Qt(e){if(Y.isValidElement(e)||Tr.isValidElementType(e)||!Me(e))return e;const r={};return Object.keys(e).forEach(t=>{r[t]=Qt(e[t])}),r}function $e(e,r,t={clone:!0}){const n=t.clone?{...e}:e;return Me(e)&&Me(r)&&Object.keys(r).forEach(o=>{Y.isValidElement(r[o])||Tr.isValidElementType(r[o])?n[o]=r[o]:Me(r[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Me(e[o])?n[o]=$e(e[o],r[o],t):t.clone?n[o]=Me(r[o])?Qt(r[o]):r[o]:n[o]=r[o]}),n}function fr(e,r){return r?$e(e,r,{clone:!1}):e}const We=process.env.NODE_ENV!=="production"?Q.oneOfType([Q.number,Q.string,Q.object,Q.array]):{};function Xt(e,r){if(!e.containerQueries)return r;const t=Object.keys(r).filter(n=>n.startsWith("@container")).sort((n,o)=>{const i=/min-width:\s*([0-9.]+)/;return+(n.match(i)?.[1]||0)-+(o.match(i)?.[1]||0)});return t.length?t.reduce((n,o)=>{const i=r[o];return delete n[o],n[o]=i,n},{...r}):r}function uo(e,r){return r==="@"||r.startsWith("@")&&(e.some(t=>r.startsWith(`@${t}`))||!!r.match(/^@\d/))}function fo(e,r){const t=r.match(/^@([^/]+)?\/?(.+)?$/);if(!t){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${r})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
66
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Ve(18,`(${r})`));return null}const[,n,o]=t,i=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(i)}function po(e){const r=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function t(i,a){i.up=(...l)=>r(e.breakpoints.up(...l),a),i.down=(...l)=>r(e.breakpoints.down(...l),a),i.between=(...l)=>r(e.breakpoints.between(...l),a),i.only=(...l)=>r(e.breakpoints.only(...l),a),i.not=(...l)=>{const d=r(e.breakpoints.not(...l),a);return d.includes("not all and")?d.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):d}}const n={},o=i=>(t(n,i),n);return t(o),{...e,containerQueries:o}}const Er={xs:0,sm:600,md:900,lg:1200,xl:1536},Zt={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Er[e]}px)`},ho={containerQueries:e=>({up:r=>{let t=typeof r=="number"?r:Er[r]||r;return typeof t=="number"&&(t=`${t}px`),e?`@container ${e} (min-width:${t})`:`@container (min-width:${t})`}})};function De(e,r,t){const n=e.theme||{};if(Array.isArray(r)){const i=n.breakpoints||Zt;return r.reduce((a,l,d)=>(a[i.up(i.keys[d])]=t(r[d]),a),{})}if(typeof r=="object"){const i=n.breakpoints||Zt;return Object.keys(r).reduce((a,l)=>{if(uo(i.keys,l)){const d=fo(n.containerQueries?n:ho,l);d&&(a[d]=t(r[l],l))}else if(Object.keys(i.values||Er).includes(l)){const d=i.up(l);a[d]=t(r[l],l)}else{const d=l;a[d]=r[d]}return a},{})}return t(r)}function mo(e={}){return e.keys?.reduce((t,n)=>{const o=e.up(n);return t[o]={},t},{})||{}}function en(e,r){return e.reduce((t,n)=>{const o=t[n];return(!o||Object.keys(o).length===0)&&delete t[n],t},r)}function wr(e,r,t=!0){if(!r||typeof r!="string")return null;if(e&&e.vars&&t){const n=`vars.${r}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(n!=null)return n}return r.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function Pr(e,r,t,n=t){let o;return typeof e=="function"?o=e(t):Array.isArray(e)?o=e[t]||n:o=wr(e,t)||n,r&&(o=r(o,n,e)),o}function ye(e){const{prop:r,cssProperty:t=e.prop,themeKey:n,transform:o}=e,i=a=>{if(a[r]==null)return null;const l=a[r],d=a.theme,h=wr(d,n)||{};return De(a,l,g=>{let b=Pr(h,o,g);return g===b&&typeof g=="string"&&(b=Pr(h,o,`${r}${g==="default"?"":Ge(g)}`,g)),t===!1?b:{[t]:b}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[r]:We}:{},i.filterProps=[r],i}function yo(e){const r={};return t=>(r[t]===void 0&&(r[t]=e(t)),r[t])}const go={m:"margin",p:"padding"},bo={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},rn={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},vo=yo(e=>{if(e.length>2)if(rn[e])e=rn[e];else return[e];const[r,t]=e.split(""),n=go[r],o=bo[t]||"";return Array.isArray(o)?o.map(i=>n+i):[n+o]}),$r=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Or=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],xo=[...$r,...Or];function dr(e,r,t,n){const o=wr(e,r,!0)??t;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${i}.`),typeof o=="string"?o.startsWith("var(")&&i===0?0:o.startsWith("var(")&&i===1?o:`calc(${i} * ${o})`:o*i):Array.isArray(o)?i=>{if(typeof i=="string")return i;const a=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(a)?a>o.length-1&&console.error([`MUI: The value provided (${a}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${a} > ${o.length-1}, you need to add the missing values.`].join(`
|
|
67
67
|
`)):console.error([`MUI: The \`theme.${r}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${r}\` as a number.`].join(`
|
|
68
|
-
`)));const l=o[
|
|
69
|
-
`)),()=>{})}function ot(e){return dr(e,"spacing",8,"spacing")}function pr(e,r){return typeof r=="string"||r==null?r:e(r)}function Co(e,r){return t=>e.reduce((n,o)=>(n[o]=pr(r,t),n),{})}function To(e,r,t,n){if(!r.includes(t))return null;const o=xo(t),i=Co(o,n),c=e[t];return Be(e,c,i)}function nn(e,r){const t=ot(e.theme);return Object.keys(e).map(n=>To(e,r,n,t)).reduce(fr,{})}function me(e){return nn(e,$r)}me.propTypes=process.env.NODE_ENV!=="production"?$r.reduce((e,r)=>(e[r]=Le,e),{}):{},me.filterProps=$r;function ge(e){return nn(e,Or)}ge.propTypes=process.env.NODE_ENV!=="production"?Or.reduce((e,r)=>(e[r]=Le,e),{}):{},ge.filterProps=Or,process.env.NODE_ENV!=="production"&&So.reduce((e,r)=>(e[r]=Le,e),{});function _r(...e){const r=e.reduce((n,o)=>(o.filterProps.forEach(i=>{n[i]=o}),n),{}),t=n=>Object.keys(n).reduce((o,i)=>r[i]?fr(o,r[i](n)):o,{});return t.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},t.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),t}function Re(e){return typeof e!="number"?e:`${e}px solid`}function Ae(e,r){return ye({prop:e,themeKey:"borders",transform:r})}const Eo=Ae("border",Re),wo=Ae("borderTop",Re),Po=Ae("borderRight",Re),$o=Ae("borderBottom",Re),Oo=Ae("borderLeft",Re),_o=Ae("borderColor"),Ro=Ae("borderTopColor"),Ao=Ae("borderRightColor"),jo=Ae("borderBottomColor"),ko=Ae("borderLeftColor"),Io=Ae("outline",Re),No=Ae("outlineColor"),Rr=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const r=dr(e.theme,"shape.borderRadius",4,"borderRadius"),t=n=>({borderRadius:pr(r,n)});return Be(e,e.borderRadius,t)}return null};Rr.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Le}:{},Rr.filterProps=["borderRadius"],_r(Eo,wo,Po,$o,Oo,_o,Ro,Ao,jo,ko,Rr,Io,No);const Ar=e=>{if(e.gap!==void 0&&e.gap!==null){const r=dr(e.theme,"spacing",8,"gap"),t=n=>({gap:pr(r,n)});return Be(e,e.gap,t)}return null};Ar.propTypes=process.env.NODE_ENV!=="production"?{gap:Le}:{},Ar.filterProps=["gap"];const jr=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const r=dr(e.theme,"spacing",8,"columnGap"),t=n=>({columnGap:pr(r,n)});return Be(e,e.columnGap,t)}return null};jr.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Le}:{},jr.filterProps=["columnGap"];const kr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const r=dr(e.theme,"spacing",8,"rowGap"),t=n=>({rowGap:pr(r,n)});return Be(e,e.rowGap,t)}return null};kr.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Le}:{},kr.filterProps=["rowGap"];const Mo=ye({prop:"gridColumn"}),Do=ye({prop:"gridRow"}),Fo=ye({prop:"gridAutoFlow"}),Bo=ye({prop:"gridAutoColumns"}),Vo=ye({prop:"gridAutoRows"}),Wo=ye({prop:"gridTemplateColumns"}),Lo=ye({prop:"gridTemplateRows"}),zo=ye({prop:"gridTemplateAreas"}),Uo=ye({prop:"gridArea"});_r(Ar,jr,kr,Mo,Do,Fo,Bo,Vo,Wo,Lo,zo,Uo);function Xe(e,r){return r==="grey"?r:e}const Yo=ye({prop:"color",themeKey:"palette",transform:Xe}),Go=ye({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Xe}),qo=ye({prop:"backgroundColor",themeKey:"palette",transform:Xe});_r(Yo,Go,qo);function Oe(e){return e<=1&&e!==0?`${e*100}%`:e}const Ho=ye({prop:"width",transform:Oe}),it=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const r=t=>{const n=e.theme?.breakpoints?.values?.[t]||Er[t];return n?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:Oe(t)}};return Be(e,e.maxWidth,r)}return null};it.filterProps=["maxWidth"];const Ko=ye({prop:"minWidth",transform:Oe}),Jo=ye({prop:"height",transform:Oe}),Qo=ye({prop:"maxHeight",transform:Oe}),Xo=ye({prop:"minHeight",transform:Oe});ye({prop:"size",cssProperty:"width",transform:Oe}),ye({prop:"size",cssProperty:"height",transform:Oe});const Zo=ye({prop:"boxSizing"});_r(Ho,it,Ko,Jo,Qo,Xo,Zo);const Ir={border:{themeKey:"borders",transform:Re},borderTop:{themeKey:"borders",transform:Re},borderRight:{themeKey:"borders",transform:Re},borderBottom:{themeKey:"borders",transform:Re},borderLeft:{themeKey:"borders",transform:Re},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Re},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Rr},color:{themeKey:"palette",transform:Xe},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Xe},backgroundColor:{themeKey:"palette",transform:Xe},p:{style:ge},pt:{style:ge},pr:{style:ge},pb:{style:ge},pl:{style:ge},px:{style:ge},py:{style:ge},padding:{style:ge},paddingTop:{style:ge},paddingRight:{style:ge},paddingBottom:{style:ge},paddingLeft:{style:ge},paddingX:{style:ge},paddingY:{style:ge},paddingInline:{style:ge},paddingInlineStart:{style:ge},paddingInlineEnd:{style:ge},paddingBlock:{style:ge},paddingBlockStart:{style:ge},paddingBlockEnd:{style:ge},m:{style:me},mt:{style:me},mr:{style:me},mb:{style:me},ml:{style:me},mx:{style:me},my:{style:me},margin:{style:me},marginTop:{style:me},marginRight:{style:me},marginBottom:{style:me},marginLeft:{style:me},marginX:{style:me},marginY:{style:me},marginInline:{style:me},marginInlineStart:{style:me},marginInlineEnd:{style:me},marginBlock:{style:me},marginBlockStart:{style:me},marginBlockEnd:{style:me},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ar},rowGap:{style:kr},columnGap:{style:jr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Oe},maxWidth:{style:it},minWidth:{transform:Oe},height:{transform:Oe},maxHeight:{transform:Oe},minHeight:{transform:Oe},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function ei(...e){const r=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),t=new Set(r);return e.every(n=>t.size===Object.keys(n).length)}function ri(e,r){return typeof e=="function"?e(r):e}function ti(){function e(t,n,o,i){const c={[t]:n,theme:o},l=i[t];if(!l)return{[t]:n};const{cssProperty:d=t,themeKey:h,transform:g,style:y}=l;if(n==null)return null;if(h==="typography"&&n==="inherit")return{[t]:n};const b=wr(o,h)||{};return y?y(c):Be(c,n,v=>{let u=Pr(b,g,v);return v===u&&typeof v=="string"&&(u=Pr(b,g,`${t}${v==="default"?"":qe(v)}`,v)),d===!1?u:{[d]:u}})}function r(t){const{sx:n,theme:o={},nested:i}=t||{};if(!n)return null;const c=o.unstable_sxConfig??Ir;function l(d){let h=d;if(typeof d=="function")h=d(o);else if(typeof d!="object")return d;if(!h)return null;const g=go(o.breakpoints),y=Object.keys(g);let b=g;return Object.keys(h).forEach(w=>{const v=ri(h[w],o);if(v!=null)if(typeof v=="object")if(c[w])b=fr(b,e(w,v,o,c));else{const u=Be({theme:o},v,C=>({[w]:C}));ei(u,v)?b[w]=r({sx:v,theme:o,nested:!0}):b=fr(b,u)}else b=fr(b,e(w,v,o,c))}),!i&&o.modularCssLayers?{"@layer sx":Zt(o,rn(y,b))}:Zt(o,rn(y,b))}return Array.isArray(n)?n.map(l):l(n)}return r}const Ze=ti();Ze.filterProps=["sx"];function ni(e){for(var r=0,t,n=0,o=e.length;o>=4;++n,o-=4)t=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,r=(t&65535)*1540483477+((t>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(o){case 3:r^=(e.charCodeAt(n+2)&255)<<16;case 2:r^=(e.charCodeAt(n+1)&255)<<8;case 1:r^=e.charCodeAt(n)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}var oi={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function ii(e){var r=Object.create(null);return function(t){return r[t]===void 0&&(r[t]=e(t)),r[t]}}var si=/[A-Z]|^ms/g,ai=/_EMO_([^_]+?)_([^]*?)_EMO_/g,on=function(r){return r.charCodeAt(1)===45},sn=function(r){return r!=null&&typeof r!="boolean"},st=ii(function(e){return on(e)?e:e.replace(si,"-$&").toLowerCase()}),an=function(r,t){switch(r){case"animation":case"animationName":if(typeof t=="string")return t.replace(ai,function(n,o,i){return ze={name:o,styles:i,next:ze},o})}return oi[r]!==1&&!on(r)&&typeof t=="number"&&t!==0?t+"px":t};function Nr(e,r,t){if(t==null)return"";var n=t;if(n.__emotion_styles!==void 0)return n;switch(typeof t){case"boolean":return"";case"object":{var o=t;if(o.anim===1)return ze={name:o.name,styles:o.styles,next:ze},o.name;var i=t;if(i.styles!==void 0){var c=i.next;if(c!==void 0)for(;c!==void 0;)ze={name:c.name,styles:c.styles,next:ze},c=c.next;var l=i.styles+";";return l}return ci(e,r,t)}}var d=t;return d}function ci(e,r,t){var n="";if(Array.isArray(t))for(var o=0;o<t.length;o++)n+=Nr(e,r,t[o])+";";else for(var i in t){var c=t[i];if(typeof c!="object"){var l=c;sn(l)&&(n+=st(i)+":"+an(i,l)+";")}else if(Array.isArray(c)&&typeof c[0]=="string"&&r==null)for(var d=0;d<c.length;d++)sn(c[d])&&(n+=st(i)+":"+an(i,c[d])+";");else{var h=Nr(e,r,c);switch(i){case"animation":case"animationName":{n+=st(i)+":"+h+";";break}default:n+=i+"{"+h+"}"}}}return n}var cn=/label:\s*([^\s;{]+)\s*(;|$)/g,ze;function li(e,r,t){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";ze=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=Nr(t,r,i);else{var c=i;o+=c[0]}for(var l=1;l<e.length;l++)if(o+=Nr(t,r,e[l]),n){var d=i;o+=d[l]}cn.lastIndex=0;for(var h="",g;(g=cn.exec(o))!==null;)h+="-"+g[1];var y=ni(o)+h;return{name:y,styles:o,next:ze}}/**
|
|
68
|
+
`)));const l=o[a];return i>=0?l:typeof l=="number"?-l:typeof l=="string"&&l.startsWith("var(")?`calc(-1 * ${l})`:`-${l}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${r}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
69
|
+
`)),()=>{})}function nt(e){return dr(e,"spacing",8,"spacing")}function pr(e,r){return typeof r=="string"||r==null?r:e(r)}function So(e,r){return t=>e.reduce((n,o)=>(n[o]=pr(r,t),n),{})}function Co(e,r,t,n){if(!r.includes(t))return null;const o=vo(t),i=So(o,n),a=e[t];return De(e,a,i)}function tn(e,r){const t=nt(e.theme);return Object.keys(e).map(n=>Co(e,r,n,t)).reduce(fr,{})}function he(e){return tn(e,$r)}he.propTypes=process.env.NODE_ENV!=="production"?$r.reduce((e,r)=>(e[r]=We,e),{}):{},he.filterProps=$r;function me(e){return tn(e,Or)}me.propTypes=process.env.NODE_ENV!=="production"?Or.reduce((e,r)=>(e[r]=We,e),{}):{},me.filterProps=Or,process.env.NODE_ENV!=="production"&&xo.reduce((e,r)=>(e[r]=We,e),{});function _r(...e){const r=e.reduce((n,o)=>(o.filterProps.forEach(i=>{n[i]=o}),n),{}),t=n=>Object.keys(n).reduce((o,i)=>r[i]?fr(o,r[i](n)):o,{});return t.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},t.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),t}function _e(e){return typeof e!="number"?e:`${e}px solid`}function Re(e,r){return ye({prop:e,themeKey:"borders",transform:r})}const To=Re("border",_e),Eo=Re("borderTop",_e),wo=Re("borderRight",_e),Po=Re("borderBottom",_e),$o=Re("borderLeft",_e),Oo=Re("borderColor"),_o=Re("borderTopColor"),Ro=Re("borderRightColor"),jo=Re("borderBottomColor"),Ao=Re("borderLeftColor"),ko=Re("outline",_e),Io=Re("outlineColor"),Rr=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const r=dr(e.theme,"shape.borderRadius",4,"borderRadius"),t=n=>({borderRadius:pr(r,n)});return De(e,e.borderRadius,t)}return null};Rr.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:We}:{},Rr.filterProps=["borderRadius"],_r(To,Eo,wo,Po,$o,Oo,_o,Ro,jo,Ao,Rr,ko,Io);const jr=e=>{if(e.gap!==void 0&&e.gap!==null){const r=dr(e.theme,"spacing",8,"gap"),t=n=>({gap:pr(r,n)});return De(e,e.gap,t)}return null};jr.propTypes=process.env.NODE_ENV!=="production"?{gap:We}:{},jr.filterProps=["gap"];const Ar=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const r=dr(e.theme,"spacing",8,"columnGap"),t=n=>({columnGap:pr(r,n)});return De(e,e.columnGap,t)}return null};Ar.propTypes=process.env.NODE_ENV!=="production"?{columnGap:We}:{},Ar.filterProps=["columnGap"];const kr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const r=dr(e.theme,"spacing",8,"rowGap"),t=n=>({rowGap:pr(r,n)});return De(e,e.rowGap,t)}return null};kr.propTypes=process.env.NODE_ENV!=="production"?{rowGap:We}:{},kr.filterProps=["rowGap"];const No=ye({prop:"gridColumn"}),Mo=ye({prop:"gridRow"}),Do=ye({prop:"gridAutoFlow"}),Fo=ye({prop:"gridAutoColumns"}),Bo=ye({prop:"gridAutoRows"}),Vo=ye({prop:"gridTemplateColumns"}),Wo=ye({prop:"gridTemplateRows"}),Lo=ye({prop:"gridTemplateAreas"}),zo=ye({prop:"gridArea"});_r(jr,Ar,kr,No,Mo,Do,Fo,Bo,Vo,Wo,Lo,zo);function Xe(e,r){return r==="grey"?r:e}const Uo=ye({prop:"color",themeKey:"palette",transform:Xe}),Yo=ye({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Xe}),Go=ye({prop:"backgroundColor",themeKey:"palette",transform:Xe});_r(Uo,Yo,Go);function Oe(e){return e<=1&&e!==0?`${e*100}%`:e}const qo=ye({prop:"width",transform:Oe}),ot=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const r=t=>{const n=e.theme?.breakpoints?.values?.[t]||Er[t];return n?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:Oe(t)}};return De(e,e.maxWidth,r)}return null};ot.filterProps=["maxWidth"];const Ho=ye({prop:"minWidth",transform:Oe}),Ko=ye({prop:"height",transform:Oe}),Jo=ye({prop:"maxHeight",transform:Oe}),Qo=ye({prop:"minHeight",transform:Oe});ye({prop:"size",cssProperty:"width",transform:Oe}),ye({prop:"size",cssProperty:"height",transform:Oe});const Xo=ye({prop:"boxSizing"});_r(qo,ot,Ho,Ko,Jo,Qo,Xo);const Ir={border:{themeKey:"borders",transform:_e},borderTop:{themeKey:"borders",transform:_e},borderRight:{themeKey:"borders",transform:_e},borderBottom:{themeKey:"borders",transform:_e},borderLeft:{themeKey:"borders",transform:_e},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:_e},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Rr},color:{themeKey:"palette",transform:Xe},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Xe},backgroundColor:{themeKey:"palette",transform:Xe},p:{style:me},pt:{style:me},pr:{style:me},pb:{style:me},pl:{style:me},px:{style:me},py:{style:me},padding:{style:me},paddingTop:{style:me},paddingRight:{style:me},paddingBottom:{style:me},paddingLeft:{style:me},paddingX:{style:me},paddingY:{style:me},paddingInline:{style:me},paddingInlineStart:{style:me},paddingInlineEnd:{style:me},paddingBlock:{style:me},paddingBlockStart:{style:me},paddingBlockEnd:{style:me},m:{style:he},mt:{style:he},mr:{style:he},mb:{style:he},ml:{style:he},mx:{style:he},my:{style:he},margin:{style:he},marginTop:{style:he},marginRight:{style:he},marginBottom:{style:he},marginLeft:{style:he},marginX:{style:he},marginY:{style:he},marginInline:{style:he},marginInlineStart:{style:he},marginInlineEnd:{style:he},marginBlock:{style:he},marginBlockStart:{style:he},marginBlockEnd:{style:he},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:jr},rowGap:{style:kr},columnGap:{style:Ar},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Oe},maxWidth:{style:ot},minWidth:{transform:Oe},height:{transform:Oe},maxHeight:{transform:Oe},minHeight:{transform:Oe},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Zo(...e){const r=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),t=new Set(r);return e.every(n=>t.size===Object.keys(n).length)}function ei(e,r){return typeof e=="function"?e(r):e}function ri(){function e(t,n,o,i){const a={[t]:n,theme:o},l=i[t];if(!l)return{[t]:n};const{cssProperty:d=t,themeKey:h,transform:m,style:g}=l;if(n==null)return null;if(h==="typography"&&n==="inherit")return{[t]:n};const b=wr(o,h)||{};return g?g(a):De(a,n,E=>{let u=Pr(b,m,E);return E===u&&typeof E=="string"&&(u=Pr(b,m,`${t}${E==="default"?"":Ge(E)}`,E)),d===!1?u:{[d]:u}})}function r(t){const{sx:n,theme:o={},nested:i}=t||{};if(!n)return null;const a=o.unstable_sxConfig??Ir;function l(d){let h=d;if(typeof d=="function")h=d(o);else if(typeof d!="object")return d;if(!h)return null;const m=mo(o.breakpoints),g=Object.keys(m);let b=m;return Object.keys(h).forEach(T=>{const E=ei(h[T],o);if(E!=null)if(typeof E=="object")if(a[T])b=fr(b,e(T,E,o,a));else{const u=De({theme:o},E,O=>({[T]:O}));Zo(u,E)?b[T]=r({sx:E,theme:o,nested:!0}):b=fr(b,u)}else b=fr(b,e(T,E,o,a))}),!i&&o.modularCssLayers?{"@layer sx":Xt(o,en(g,b))}:Xt(o,en(g,b))}return Array.isArray(n)?n.map(l):l(n)}return r}const Ze=ri();Ze.filterProps=["sx"];function ti(e){for(var r=0,t,n=0,o=e.length;o>=4;++n,o-=4)t=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,r=(t&65535)*1540483477+((t>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(o){case 3:r^=(e.charCodeAt(n+2)&255)<<16;case 2:r^=(e.charCodeAt(n+1)&255)<<8;case 1:r^=e.charCodeAt(n)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}var ni={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function oi(e){var r=Object.create(null);return function(t){return r[t]===void 0&&(r[t]=e(t)),r[t]}}var ii=/[A-Z]|^ms/g,si=/_EMO_([^_]+?)_([^]*?)_EMO_/g,nn=function(r){return r.charCodeAt(1)===45},on=function(r){return r!=null&&typeof r!="boolean"},it=oi(function(e){return nn(e)?e:e.replace(ii,"-$&").toLowerCase()}),sn=function(r,t){switch(r){case"animation":case"animationName":if(typeof t=="string")return t.replace(si,function(n,o,i){return Le={name:o,styles:i,next:Le},o})}return ni[r]!==1&&!nn(r)&&typeof t=="number"&&t!==0?t+"px":t};function Nr(e,r,t){if(t==null)return"";var n=t;if(n.__emotion_styles!==void 0)return n;switch(typeof t){case"boolean":return"";case"object":{var o=t;if(o.anim===1)return Le={name:o.name,styles:o.styles,next:Le},o.name;var i=t;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Le={name:a.name,styles:a.styles,next:Le},a=a.next;var l=i.styles+";";return l}return ai(e,r,t)}}var d=t;return d}function ai(e,r,t){var n="";if(Array.isArray(t))for(var o=0;o<t.length;o++)n+=Nr(e,r,t[o])+";";else for(var i in t){var a=t[i];if(typeof a!="object"){var l=a;on(l)&&(n+=it(i)+":"+sn(i,l)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&r==null)for(var d=0;d<a.length;d++)on(a[d])&&(n+=it(i)+":"+sn(i,a[d])+";");else{var h=Nr(e,r,a);switch(i){case"animation":case"animationName":{n+=it(i)+":"+h+";";break}default:n+=i+"{"+h+"}"}}}return n}var an=/label:\s*([^\s;{]+)\s*(;|$)/g,Le;function ci(e,r,t){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";Le=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=Nr(t,r,i);else{var a=i;o+=a[0]}for(var l=1;l<e.length;l++)if(o+=Nr(t,r,e[l]),n){var d=i;o+=d[l]}an.lastIndex=0;for(var h="",m;(m=an.exec(o))!==null;)h+="-"+m[1];var g=ti(o)+h;return{name:g,styles:o,next:Le}}/**
|
|
70
70
|
* @mui/styled-engine v7.3.1
|
|
71
71
|
*
|
|
72
72
|
* @license MIT
|
|
73
73
|
* This source code is licensed under the MIT license found in the
|
|
74
74
|
* LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/function
|
|
76
|
-
`)):n.some(i=>i===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),t(...n)}:t}function
|
|
77
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:
|
|
78
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:
|
|
79
|
-
`))}return
|
|
80
|
-
The color object needs to have a \`main\` property or a \`${
|
|
81
|
-
\`color.main\` should be a string, but \`${JSON.stringify(
|
|
75
|
+
*/function li(e,r){const t=Yn(e,r);return process.env.NODE_ENV!=="production"?(...n)=>{const o=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
76
|
+
`)):n.some(i=>i===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),t(...n)}:t}function ui(e,r){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=r(e.__emotion_styles))}const cn=[];function qe(e){return cn[0]=e,ci(cn)}const fi=e=>{const r=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return r.sort((t,n)=>t.val-n.val),r.reduce((t,n)=>({...t,[n.key]:n.val}),{})};function di(e){const{values:r={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:t="px",step:n=5,...o}=e,i=fi(r),a=Object.keys(i);function l(b){return`@media (min-width:${typeof r[b]=="number"?r[b]:b}${t})`}function d(b){return`@media (max-width:${(typeof r[b]=="number"?r[b]:b)-n/100}${t})`}function h(b,T){const E=a.indexOf(T);return`@media (min-width:${typeof r[b]=="number"?r[b]:b}${t}) and (max-width:${(E!==-1&&typeof r[a[E]]=="number"?r[a[E]]:T)-n/100}${t})`}function m(b){return a.indexOf(b)+1<a.length?h(b,a[a.indexOf(b)+1]):l(b)}function g(b){const T=a.indexOf(b);return T===0?l(a[1]):T===a.length-1?d(a[T]):h(b,a[a.indexOf(b)+1]).replace("@media","@media not all and")}return{keys:a,values:i,up:l,down:d,between:h,only:m,not:g,unit:t,...o}}const pi={borderRadius:4};function ln(e=8,r=nt({spacing:e})){if(e.mui)return e;const t=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(i=>{const a=r(i);return typeof a=="number"?`${a}px`:a}).join(" "));return t.mui=!0,t}function hi(e,r){const t=this;if(t.vars){if(!t.colorSchemes?.[e]||typeof t.getColorSchemeSelector!="function")return{};let n=t.getColorSchemeSelector(e);return n==="&"?r:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:r})}return t.palette.mode===e?r:{}}function un(e={},...r){const{breakpoints:t={},palette:n={},spacing:o,shape:i={},...a}=e,l=di(t),d=ln(o);let h=$e({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:d,shape:{...pi,...i}},a);return h=po(h),h.applyStyles=hi,h=r.reduce((m,g)=>$e(m,g),h),h.unstable_sxConfig={...Ir,...a?.unstable_sxConfig},h.unstable_sx=function(g){return Ze({sx:g,theme:this})},h}const mi={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function st(e,r,t="Mui"){const n=mi[r];return n?`${t}-${n}`:`${Qn.generate(e)}-${r}`}function yi(e,r,t="Mui"){const n={};return r.forEach(o=>{n[o]=st(e,o,t)}),n}function fn(e,r=""){return e.displayName||e.name||r}function dn(e,r,t){const n=fn(r);return e.displayName||(n!==""?`${t}(${n})`:t)}function gi(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return fn(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Tr.ForwardRef:return dn(e,e.render,"ForwardRef");case Tr.Memo:return dn(e,e.type,"memo");default:return}}}function pn(e){const{variants:r,...t}=e,n={variants:r,style:qe(t),isProcessed:!0};return n.style===t||r&&r.forEach(o=>{typeof o.style!="function"&&(o.style=qe(o.style))}),n}const bi=un();function at(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function He(e,r){return r&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${r}{${String(e.styles)}}`),e}function vi(e){return e?(r,t)=>t[e]:null}function xi(e,r,t){e.theme=Ei(e.theme)?t:e.theme[r]||e.theme}function Mr(e,r,t){const n=typeof r=="function"?r(e):r;if(Array.isArray(n))return n.flatMap(o=>Mr(e,o,t));if(Array.isArray(n?.variants)){let o;if(n.isProcessed)o=t?He(n.style,t):n.style;else{const{variants:i,...a}=n;o=t?He(qe(a),t):a}return hn(e,n.variants,[o],t)}return n?.isProcessed?t?He(qe(n.style),t):n.style:t?He(qe(n),t):n}function hn(e,r,t=[],n=void 0){let o;e:for(let i=0;i<r.length;i+=1){const a=r[i];if(typeof a.props=="function"){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!a.props(o))continue}else for(const l in a.props)if(e[l]!==a.props[l]&&e.ownerState?.[l]!==a.props[l])continue e;typeof a.style=="function"?(o??={...e,...e.ownerState,ownerState:e.ownerState},t.push(n?He(qe(a.style(o)),n):a.style(o))):t.push(n?He(qe(a.style),n):a.style)}return t}function Si(e={}){const{themeId:r,defaultTheme:t=bi,rootShouldForwardProp:n=at,slotShouldForwardProp:o=at}=e;function i(l){xi(l,r,t)}return(l,d={})=>{ui(l,I=>I.filter(re=>re!==Ze));const{name:h,slot:m,skipVariantsResolver:g,skipSx:b,overridesResolver:T=vi(mn(m)),...E}=d,u=h&&h.startsWith("Mui")||m?"components":"custom",O=g!==void 0?g:m&&m!=="Root"&&m!=="root"||!1,A=b||!1;let k=at;m==="Root"||m==="root"?k=n:m?k=o:wi(l)&&(k=void 0);const V=li(l,{shouldForwardProp:k,label:Ti(h,m),...E}),_=I=>{if(I.__emotion_real===I)return I;if(typeof I=="function")return function(ce){return Mr(ce,I,ce.theme.modularCssLayers?u:void 0)};if(Me(I)){const re=pn(I);return function(X){return re.variants?Mr(X,re,X.theme.modularCssLayers?u:void 0):X.theme.modularCssLayers?He(re.style,u):re.style}}return I},S=(...I)=>{const re=[],ce=I.map(_),X=[];if(re.push(i),h&&T&&X.push(function($){const N=$.theme.components?.[h]?.styleOverrides;if(!N)return null;const G={};for(const pe in N)G[pe]=Mr($,N[pe],$.theme.modularCssLayers?"theme":void 0);return T($,G)}),h&&!O&&X.push(function($){const N=$.theme?.components?.[h]?.variants;return N?hn($,N,[],$.theme.modularCssLayers?"theme":void 0):null}),A||X.push(Ze),Array.isArray(ce[0])){const s=ce.shift(),$=new Array(re.length).fill(""),C=new Array(X.length).fill("");let N;N=[...$,...s,...C],N.raw=[...$,...s.raw,...C],re.unshift(N)}const ue=[...re,...ce,...X],ie=V(...ue);return l.muiName&&(ie.muiName=l.muiName),process.env.NODE_ENV!=="production"&&(ie.displayName=Ci(h,m,l)),ie};return V.withConfig&&(S.withConfig=V.withConfig),S}}function Ci(e,r,t){return e?`${e}${Ge(r||"")}`:`Styled(${gi(t)})`}function Ti(e,r){let t;return process.env.NODE_ENV!=="production"&&e&&(t=`${e}-${mn(r||"Root")}`),t}function Ei(e){for(const r in e)return!1;return!0}function wi(e){return typeof e=="string"&&e.charCodeAt(0)>96}function mn(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function ct(e,r,t=!1){const n={...r};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const i=o;if(i==="components"||i==="slots")n[i]={...e[i],...n[i]};else if(i==="componentsProps"||i==="slotProps"){const a=e[i],l=r[i];if(!l)n[i]=a||{};else if(!a)n[i]=l;else{n[i]={...l};for(const d in a)if(Object.prototype.hasOwnProperty.call(a,d)){const h=d;n[i][h]=ct(a[h],l[h],t)}}}else i==="className"&&t&&r.className?n.className=qt(e?.className,r?.className):i==="style"&&t&&r.style?n.style={...e?.style,...r?.style}:n[i]===void 0&&(n[i]=e[i])}return n}function Pi(e,r=Number.MIN_SAFE_INTEGER,t=Number.MAX_SAFE_INTEGER){return Math.max(r,Math.min(e,t))}function lt(e,r=0,t=1){return process.env.NODE_ENV!=="production"&&(e<r||e>t)&&console.error(`MUI: The value provided ${e} is out of range [${r}, ${t}].`),Pi(e,r,t)}function $i(e){e=e.slice(1);const r=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let t=e.match(r);return t&&t[0].length===1&&(t=t.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),t?`rgb${t.length===4?"a":""}(${t.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function ze(e){if(e.type)return e;if(e.charAt(0)==="#")return ze($i(e));const r=e.indexOf("("),t=e.substring(0,r);if(!["rgb","rgba","hsl","hsla","color"].includes(t))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
77
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Ve(9,e));let n=e.substring(r+1,e.length-1),o;if(t==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
|
|
78
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Ve(10,o))}else n=n.split(",");return n=n.map(i=>parseFloat(i)),{type:t,values:n,colorSpace:o}}const Oi=e=>{const r=ze(e);return r.values.slice(0,3).map((t,n)=>r.type.includes("hsl")&&n!==0?`${t}%`:t).join(" ")},hr=(e,r)=>{try{return Oi(e)}catch{return r&&process.env.NODE_ENV!=="production"&&console.warn(r),e}};function Dr(e){const{type:r,colorSpace:t}=e;let{values:n}=e;return r.includes("rgb")?n=n.map((o,i)=>i<3?parseInt(o,10):o):r.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),r.includes("color")?n=`${t} ${n.join(" ")}`:n=`${n.join(", ")}`,`${r}(${n})`}function yn(e){e=ze(e);const{values:r}=e,t=r[0],n=r[1]/100,o=r[2]/100,i=n*Math.min(o,1-o),a=(h,m=(h+t/30)%12)=>o-i*Math.max(Math.min(m-3,9-m,1),-1);let l="rgb";const d=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(l+="a",d.push(r[3])),Dr({type:l,values:d})}function ut(e){e=ze(e);let r=e.type==="hsl"||e.type==="hsla"?ze(yn(e)).values:e.values;return r=r.map(t=>(e.type!=="color"&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*r[0]+.7152*r[1]+.0722*r[2]).toFixed(3))}function gn(e,r){const t=ut(e),n=ut(r);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)}function bn(e,r){return e=ze(e),r=lt(r),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${r}`:e.values[3]=r,Dr(e)}function Ke(e,r,t){try{return bn(e,r)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}}function Fr(e,r){if(e=ze(e),r=lt(r),e.type.includes("hsl"))e.values[2]*=1-r;else if(e.type.includes("rgb")||e.type.includes("color"))for(let t=0;t<3;t+=1)e.values[t]*=1-r;return Dr(e)}function ne(e,r,t){try{return Fr(e,r)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}}function Br(e,r){if(e=ze(e),r=lt(r),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*r;else if(e.type.includes("rgb"))for(let t=0;t<3;t+=1)e.values[t]+=(255-e.values[t])*r;else if(e.type.includes("color"))for(let t=0;t<3;t+=1)e.values[t]+=(1-e.values[t])*r;return Dr(e)}function oe(e,r,t){try{return Br(e,r)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}}function _i(e,r=.15){return ut(e)>.5?Fr(e,r):Br(e,r)}function Vr(e,r,t){try{return _i(e,r)}catch{return e}}const Ri=Y.createContext(void 0);process.env.NODE_ENV!=="production"&&(Q.node,Q.object);function ji(e){const{theme:r,name:t,props:n}=e;if(!r||!r.components||!r.components[t])return n;const o=r.components[t];return o.defaultProps?ct(o.defaultProps,n,r.components.mergeClassNameAndStyle):!o.styleOverrides&&!o.variants?ct(o,n,r.components.mergeClassNameAndStyle):n}function Ai({props:e,name:r}){const t=Y.useContext(Ri);return ji({props:e,name:r,theme:{components:t}})}const vn={theme:void 0};function ki(e){let r,t;return function(o){let i=r;return(i===void 0||o.theme!==t)&&(vn.theme=o.theme,i=pn(e(vn)),r=i,t=o.theme),i}}function Ii(e=""){function r(...n){if(!n.length)return"";const o=n[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${r(...n.slice(1))})`:`, ${o}`}return(n,...o)=>`var(--${e?`${e}-`:""}${n}${r(...o)})`}const xn=(e,r,t,n=[])=>{let o=e;r.forEach((i,a)=>{a===r.length-1?Array.isArray(o)?o[Number(i)]=t:o&&typeof o=="object"&&(o[i]=t):o&&typeof o=="object"&&(o[i]||(o[i]=n.includes(i)?[]:{}),o=o[i])})},Ni=(e,r,t)=>{function n(o,i=[],a=[]){Object.entries(o).forEach(([l,d])=>{(!t||t&&!t([...i,l]))&&d!=null&&(typeof d=="object"&&Object.keys(d).length>0?n(d,[...i,l],Array.isArray(d)?[...a,l]:a):r([...i,l],d,a))})}n(e)},Mi=(e,r)=>typeof r=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?r:`${r}px`:r;function ft(e,r){const{prefix:t,shouldSkipGeneratingVar:n}=r||{},o={},i={},a={};return Ni(e,(l,d,h)=>{if((typeof d=="string"||typeof d=="number")&&(!n||!n(l,d))){const m=`--${t?`${t}-`:""}${l.join("-")}`,g=Mi(l,d);Object.assign(o,{[m]:g}),xn(i,l,`var(${m})`,h),xn(a,l,`var(${m}, ${g})`,h)}},l=>l[0]==="vars"),{css:o,vars:i,varsWithDefaults:a}}function Di(e,r={}){const{getSelector:t=A,disableCssColorScheme:n,colorSchemeSelector:o,enableContrastVars:i}=r,{colorSchemes:a={},components:l,defaultColorScheme:d="light",...h}=e,{vars:m,css:g,varsWithDefaults:b}=ft(h,r);let T=b;const E={},{[d]:u,...O}=a;if(Object.entries(O||{}).forEach(([_,S])=>{const{vars:I,css:re,varsWithDefaults:ce}=ft(S,r);T=$e(T,ce),E[_]={css:re,vars:I}}),u){const{css:_,vars:S,varsWithDefaults:I}=ft(u,r);T=$e(T,I),E[d]={css:_,vars:S}}function A(_,S){let I=o;if(o==="class"&&(I=".%s"),o==="data"&&(I="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(I=`[${o}="%s"]`),_){if(I==="media")return e.defaultColorScheme===_?":root":{[`@media (prefers-color-scheme: ${a[_]?.palette?.mode||_})`]:{":root":S}};if(I)return e.defaultColorScheme===_?`:root, ${I.replace("%s",String(_))}`:I.replace("%s",String(_))}return":root"}return{vars:T,generateThemeVars:()=>{let _={...m};return Object.entries(E).forEach(([,{vars:S}])=>{_=$e(_,S)}),_},generateStyleSheets:()=>{const _=[],S=e.defaultColorScheme||"light";function I(X,ue){Object.keys(ue).length&&_.push(typeof X=="string"?{[X]:{...ue}}:X)}I(t(void 0,{...g}),g);const{[S]:re,...ce}=E;if(re){const{css:X}=re,ue=a[S]?.palette?.mode,ie=!n&&ue?{colorScheme:ue,...X}:{...X};I(t(S,{...ie}),ie)}return Object.entries(ce).forEach(([X,{css:ue}])=>{const ie=a[X]?.palette?.mode,s=!n&&ie?{colorScheme:ie,...ue}:{...ue};I(t(X,{...s}),s)}),i&&_.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),_}}}function Fi(e){return function(t){return e==="media"?(process.env.NODE_ENV!=="production"&&t!=="light"&&t!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${t}'.`),`@media (prefers-color-scheme: ${t})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:e==="class"?`.${t} &`:e==="data"?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}const mr={black:"#000",white:"#fff"},Bi={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},er={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},rr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},yr={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},tr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},nr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},or={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Sn(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:mr.white,default:mr.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Cn=Sn();function Tn(){return{text:{primary:mr.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:mr.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const dt=Tn();function En(e,r,t,n){const o=n.light||n,i=n.dark||n*1.5;e[r]||(e.hasOwnProperty(t)?e[r]=e[t]:r==="light"?e.light=Br(e.main,o):r==="dark"&&(e.dark=Fr(e.main,i)))}function wn(e,r,t,n,o){const i=o.light||o,a=o.dark||o*1.5;r[t]||(r.hasOwnProperty(n)?r[t]=r[n]:t==="light"?r.light=`color-mix(in ${e}, ${r.main}, #fff ${(i*100).toFixed(0)}%)`:t==="dark"&&(r.dark=`color-mix(in ${e}, ${r.main}, #000 ${(a*100).toFixed(0)}%)`))}function Vi(e="light"){return e==="dark"?{main:tr[200],light:tr[50],dark:tr[400]}:{main:tr[700],light:tr[400],dark:tr[800]}}function Wi(e="light"){return e==="dark"?{main:er[200],light:er[50],dark:er[400]}:{main:er[500],light:er[300],dark:er[700]}}function Li(e="light"){return e==="dark"?{main:rr[500],light:rr[300],dark:rr[700]}:{main:rr[700],light:rr[400],dark:rr[800]}}function zi(e="light"){return e==="dark"?{main:nr[400],light:nr[300],dark:nr[700]}:{main:nr[700],light:nr[500],dark:nr[900]}}function Ui(e="light"){return e==="dark"?{main:or[400],light:or[300],dark:or[700]}:{main:or[800],light:or[500],dark:or[900]}}function Yi(e="light"){return e==="dark"?{main:yr[400],light:yr[300],dark:yr[700]}:{main:"#ed6c02",light:yr[500],dark:yr[900]}}function Gi(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function pt(e){const{mode:r="light",contrastThreshold:t=3,tonalOffset:n=.2,colorSpace:o,...i}=e,a=e.primary||Vi(r),l=e.secondary||Wi(r),d=e.error||Li(r),h=e.info||zi(r),m=e.success||Ui(r),g=e.warning||Yi(r);function b(O){if(o)return Gi(O);const A=gn(O,dt.text.primary)>=t?dt.text.primary:Cn.text.primary;if(process.env.NODE_ENV!=="production"){const k=gn(O,A);k<3&&console.error([`MUI: The contrast ratio of ${k}:1 for ${A} on ${O}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
79
|
+
`))}return A}const T=({color:O,name:A,mainShade:k=500,lightShade:V=300,darkShade:_=700})=>{if(O={...O},!O.main&&O[k]&&(O.main=O[k]),!O.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${A?` (${A})`:""} provided to augmentColor(color) is invalid.
|
|
80
|
+
The color object needs to have a \`main\` property or a \`${k}\` property.`:Ve(11,A?` (${A})`:"",k));if(typeof O.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${A?` (${A})`:""} provided to augmentColor(color) is invalid.
|
|
81
|
+
\`color.main\` should be a string, but \`${JSON.stringify(O.main)}\` was provided instead.
|
|
82
82
|
|
|
83
83
|
Did you intend to use one of the following approaches?
|
|
84
84
|
|
|
@@ -90,14 +90,14 @@ const theme1 = createTheme({ palette: {
|
|
|
90
90
|
|
|
91
91
|
const theme2 = createTheme({ palette: {
|
|
92
92
|
primary: { main: green[500] },
|
|
93
|
-
} });`:
|
|
94
|
-
`)),Object.keys(h).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(h).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(
|
|
93
|
+
} });`:Ve(12,A?` (${A})`:"",JSON.stringify(O.main)));return o?(wn(o,O,"light",V,n),wn(o,O,"dark",_,n)):(En(O,"light",V,n),En(O,"dark",_,n)),O.contrastText||(O.contrastText=b(O.main)),O};let E;return r==="light"?E=Sn():r==="dark"&&(E=Tn()),process.env.NODE_ENV!=="production"&&(E||console.error(`MUI: The palette mode \`${r}\` is not supported.`)),$e({common:{...mr},mode:r,primary:T({color:a,name:"primary"}),secondary:T({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:T({color:d,name:"error"}),warning:T({color:g,name:"warning"}),info:T({color:h,name:"info"}),success:T({color:m,name:"success"}),grey:Bi,contrastThreshold:t,getContrastText:b,augmentColor:T,tonalOffset:n,...E},i)}function qi(e){const r={};return Object.entries(e).forEach(n=>{const[o,i]=n;typeof i=="object"&&(r[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),r}function Hi(e,r){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...r}}function Ki(e){return Math.round(e*1e5)/1e5}const Pn={textTransform:"uppercase"},$n='"Roboto", "Helvetica", "Arial", sans-serif';function Ji(e,r){const{fontFamily:t=$n,fontSize:n=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:d=16,allVariants:h,pxToRem:m,...g}=typeof r=="function"?r(e):r;process.env.NODE_ENV!=="production"&&(typeof n!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof d!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const b=n/14,T=m||(O=>`${O/d*b}rem`),E=(O,A,k,V,_)=>({fontFamily:t,fontWeight:O,fontSize:T(A),lineHeight:k,...t===$n?{letterSpacing:`${Ki(V/A)}em`}:{},..._,...h}),u={h1:E(o,96,1.167,-1.5),h2:E(o,60,1.2,-.5),h3:E(i,48,1.167,0),h4:E(i,34,1.235,.25),h5:E(i,24,1.334,0),h6:E(a,20,1.6,.15),subtitle1:E(i,16,1.75,.15),subtitle2:E(a,14,1.57,.1),body1:E(i,16,1.5,.15),body2:E(i,14,1.43,.15),button:E(a,14,1.75,.4,Pn),caption:E(i,12,1.66,.4),overline:E(i,12,2.66,1,Pn),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return $e({htmlFontSize:d,pxToRem:T,fontFamily:t,fontSize:n,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:l,...u},g,{clone:!1})}const Qi=.2,Xi=.14,Zi=.12;function fe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Qi})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Xi})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Zi})`].join(",")}const es=["none",fe(0,2,1,-1,0,1,1,0,0,1,3,0),fe(0,3,1,-2,0,2,2,0,0,1,5,0),fe(0,3,3,-2,0,3,4,0,0,1,8,0),fe(0,2,4,-1,0,4,5,0,0,1,10,0),fe(0,3,5,-1,0,5,8,0,0,1,14,0),fe(0,3,5,-1,0,6,10,0,0,1,18,0),fe(0,4,5,-2,0,7,10,1,0,2,16,1),fe(0,5,5,-3,0,8,10,1,0,3,14,2),fe(0,5,6,-3,0,9,12,1,0,3,16,2),fe(0,6,6,-3,0,10,14,1,0,4,18,3),fe(0,6,7,-4,0,11,15,1,0,4,20,3),fe(0,7,8,-4,0,12,17,2,0,5,22,4),fe(0,7,8,-4,0,13,19,2,0,5,24,4),fe(0,7,9,-4,0,14,21,2,0,5,26,4),fe(0,8,9,-5,0,15,22,2,0,6,28,5),fe(0,8,10,-5,0,16,24,2,0,6,30,5),fe(0,8,11,-5,0,17,26,2,0,6,32,5),fe(0,9,11,-5,0,18,28,2,0,7,34,6),fe(0,9,12,-6,0,19,29,2,0,7,36,6),fe(0,10,13,-6,0,20,31,3,0,8,38,7),fe(0,10,13,-6,0,21,33,3,0,8,40,7),fe(0,10,14,-6,0,22,35,3,0,8,42,7),fe(0,11,14,-7,0,23,36,3,0,9,44,8),fe(0,11,15,-7,0,24,38,3,0,9,46,8)],rs={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},ts={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function On(e){return`${Math.round(e)}ms`}function ns(e){if(!e)return 0;const r=e/36;return Math.min(Math.round((4+15*r**.25+r/5)*10),3e3)}function os(e){const r={...rs,...e.easing},t={...ts,...e.duration};return{getAutoHeightDuration:ns,create:(o=["all"],i={})=>{const{duration:a=t.standard,easing:l=r.easeInOut,delay:d=0,...h}=i;if(process.env.NODE_ENV!=="production"){const m=b=>typeof b=="string",g=b=>!Number.isNaN(parseFloat(b));!m(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!g(a)&&!m(a)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${a}.`),m(l)||console.error('MUI: Argument "easing" must be a string.'),!g(d)&&!m(d)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof i!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
94
|
+
`)),Object.keys(h).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(h).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(m=>`${m} ${typeof a=="string"?a:On(a)} ${l} ${typeof d=="string"?d:On(d)}`).join(",")},...e,easing:r,duration:t}}const is={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function ss(e){return Me(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function _n(e={}){const r={...e};function t(n){const o=Object.entries(n);for(let i=0;i<o.length;i++){const[a,l]=o[i];!ss(l)||a.startsWith("unstable_")?delete n[a]:Me(l)&&(n[a]={...l},t(n[a]))}}return t(r),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
95
95
|
|
|
96
96
|
const theme = ${JSON.stringify(r,null,2)};
|
|
97
97
|
|
|
98
98
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
99
99
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
100
100
|
|
|
101
|
-
export default theme;`}function
|
|
102
|
-
`))}
|
|
103
|
-
To suppress this warning, you need to explicitly provide the \`palette.${r}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function ys(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Ne=e=>{try{return e()}catch{}},bs=(e="mui")=>Ni(e);function gt(e,r,t,n,o){if(!t)return;t=t===!0?{}:t;const i=o==="dark"?"dark":"light";if(!n){r[o]=ds({...t,palette:{mode:i,...t?.palette},colorSpace:e});return}const{palette:c,...l}=mt({...n,palette:{mode:i,...t?.palette},colorSpace:e});return r[o]={...t,palette:c,opacity:{...jn(i),...t?.opacity},overlays:t?.overlays||kn(i)},l}function vs(e={},...r){const{colorSchemes:t={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",nativeColor:c=!1,shouldSkipGeneratingVar:l=ps,colorSchemeSelector:d=t.light&&t.dark?"media":void 0,rootSelector:h=":root",...g}=e,y=Object.keys(t)[0],b=n||(t.light&&y!=="light"?"light":y),w=bs(i),{[b]:v,light:u,dark:C,...k}=t,I={...k};let F=v;if((b==="dark"&&!("dark"in t)||b==="light"&&!("light"in t))&&(F=!0),!F)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${b}\` option is either missing or invalid.`:We(21,b));let O;c&&(O="oklch");const E=gt(O,I,F,g,b);u&&!I.light&>(O,I,u,void 0,"light"),C&&!I.dark&>(O,I,C,void 0,"dark");let j={defaultColorScheme:b,...E,cssVarPrefix:i,colorSchemeSelector:d,rootSelector:h,getCssVar:w,colorSchemes:I,font:{...Hi(E.typography),...E.font},spacing:ys(g.spacing)};Object.keys(j.colorSchemes).forEach(re=>{const s=j.colorSchemes[re].palette,$=N=>{const K=N.split("-"),ue=K[1],xe=K[2];return w(N,s[ue][xe])};s.mode==="light"&&(m(s.common,"background","#fff"),m(s.common,"onBackground","#000")),s.mode==="dark"&&(m(s.common,"background","#000"),m(s.common,"onBackground","#fff"));function P(N,K,ue){if(O){let xe;return N===Je&&(xe=`transparent ${((1-ue)*100).toFixed(0)}%`),N===ie&&(xe=`#000 ${(ue*100).toFixed(0)}%`),N===se&&(xe=`#fff ${(ue*100).toFixed(0)}%`),`color-mix(in ${O}, ${K}, ${xe})`}return N(K,ue)}if(gs(s,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),s.mode==="light"){m(s.Alert,"errorColor",P(ie,s.error.light,.6)),m(s.Alert,"infoColor",P(ie,s.info.light,.6)),m(s.Alert,"successColor",P(ie,s.success.light,.6)),m(s.Alert,"warningColor",P(ie,s.warning.light,.6)),m(s.Alert,"errorFilledBg",$("palette-error-main")),m(s.Alert,"infoFilledBg",$("palette-info-main")),m(s.Alert,"successFilledBg",$("palette-success-main")),m(s.Alert,"warningFilledBg",$("palette-warning-main")),m(s.Alert,"errorFilledColor",Ne(()=>s.getContrastText(s.error.main))),m(s.Alert,"infoFilledColor",Ne(()=>s.getContrastText(s.info.main))),m(s.Alert,"successFilledColor",Ne(()=>s.getContrastText(s.success.main))),m(s.Alert,"warningFilledColor",Ne(()=>s.getContrastText(s.warning.main))),m(s.Alert,"errorStandardBg",P(se,s.error.light,.9)),m(s.Alert,"infoStandardBg",P(se,s.info.light,.9)),m(s.Alert,"successStandardBg",P(se,s.success.light,.9)),m(s.Alert,"warningStandardBg",P(se,s.warning.light,.9)),m(s.Alert,"errorIconColor",$("palette-error-main")),m(s.Alert,"infoIconColor",$("palette-info-main")),m(s.Alert,"successIconColor",$("palette-success-main")),m(s.Alert,"warningIconColor",$("palette-warning-main")),m(s.AppBar,"defaultBg",$("palette-grey-100")),m(s.Avatar,"defaultBg",$("palette-grey-400")),m(s.Button,"inheritContainedBg",$("palette-grey-300")),m(s.Button,"inheritContainedHoverBg",$("palette-grey-A100")),m(s.Chip,"defaultBorder",$("palette-grey-400")),m(s.Chip,"defaultAvatarColor",$("palette-grey-700")),m(s.Chip,"defaultIconColor",$("palette-grey-700")),m(s.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),m(s.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),m(s.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),m(s.LinearProgress,"primaryBg",P(se,s.primary.main,.62)),m(s.LinearProgress,"secondaryBg",P(se,s.secondary.main,.62)),m(s.LinearProgress,"errorBg",P(se,s.error.main,.62)),m(s.LinearProgress,"infoBg",P(se,s.info.main,.62)),m(s.LinearProgress,"successBg",P(se,s.success.main,.62)),m(s.LinearProgress,"warningBg",P(se,s.warning.main,.62)),m(s.Skeleton,"bg",O?P(Je,s.text.primary,.11):`rgba(${$("palette-text-primaryChannel")} / 0.11)`),m(s.Slider,"primaryTrack",P(se,s.primary.main,.62)),m(s.Slider,"secondaryTrack",P(se,s.secondary.main,.62)),m(s.Slider,"errorTrack",P(se,s.error.main,.62)),m(s.Slider,"infoTrack",P(se,s.info.main,.62)),m(s.Slider,"successTrack",P(se,s.success.main,.62)),m(s.Slider,"warningTrack",P(se,s.warning.main,.62));const N=O?P(ie,s.background.default,.6825):Vr(s.background.default,.8);m(s.SnackbarContent,"bg",N),m(s.SnackbarContent,"color",Ne(()=>O?pt.text.primary:s.getContrastText(N))),m(s.SpeedDialAction,"fabHoverBg",Vr(s.background.paper,.15)),m(s.StepConnector,"border",$("palette-grey-400")),m(s.StepContent,"border",$("palette-grey-400")),m(s.Switch,"defaultColor",$("palette-common-white")),m(s.Switch,"defaultDisabledColor",$("palette-grey-100")),m(s.Switch,"primaryDisabledColor",P(se,s.primary.main,.62)),m(s.Switch,"secondaryDisabledColor",P(se,s.secondary.main,.62)),m(s.Switch,"errorDisabledColor",P(se,s.error.main,.62)),m(s.Switch,"infoDisabledColor",P(se,s.info.main,.62)),m(s.Switch,"successDisabledColor",P(se,s.success.main,.62)),m(s.Switch,"warningDisabledColor",P(se,s.warning.main,.62)),m(s.TableCell,"border",P(se,P(Je,s.divider,1),.88)),m(s.Tooltip,"bg",P(Je,s.grey[700],.92))}if(s.mode==="dark"){m(s.Alert,"errorColor",P(se,s.error.light,.6)),m(s.Alert,"infoColor",P(se,s.info.light,.6)),m(s.Alert,"successColor",P(se,s.success.light,.6)),m(s.Alert,"warningColor",P(se,s.warning.light,.6)),m(s.Alert,"errorFilledBg",$("palette-error-dark")),m(s.Alert,"infoFilledBg",$("palette-info-dark")),m(s.Alert,"successFilledBg",$("palette-success-dark")),m(s.Alert,"warningFilledBg",$("palette-warning-dark")),m(s.Alert,"errorFilledColor",Ne(()=>s.getContrastText(s.error.dark))),m(s.Alert,"infoFilledColor",Ne(()=>s.getContrastText(s.info.dark))),m(s.Alert,"successFilledColor",Ne(()=>s.getContrastText(s.success.dark))),m(s.Alert,"warningFilledColor",Ne(()=>s.getContrastText(s.warning.dark))),m(s.Alert,"errorStandardBg",P(ie,s.error.light,.9)),m(s.Alert,"infoStandardBg",P(ie,s.info.light,.9)),m(s.Alert,"successStandardBg",P(ie,s.success.light,.9)),m(s.Alert,"warningStandardBg",P(ie,s.warning.light,.9)),m(s.Alert,"errorIconColor",$("palette-error-main")),m(s.Alert,"infoIconColor",$("palette-info-main")),m(s.Alert,"successIconColor",$("palette-success-main")),m(s.Alert,"warningIconColor",$("palette-warning-main")),m(s.AppBar,"defaultBg",$("palette-grey-900")),m(s.AppBar,"darkBg",$("palette-background-paper")),m(s.AppBar,"darkColor",$("palette-text-primary")),m(s.Avatar,"defaultBg",$("palette-grey-600")),m(s.Button,"inheritContainedBg",$("palette-grey-800")),m(s.Button,"inheritContainedHoverBg",$("palette-grey-700")),m(s.Chip,"defaultBorder",$("palette-grey-700")),m(s.Chip,"defaultAvatarColor",$("palette-grey-300")),m(s.Chip,"defaultIconColor",$("palette-grey-300")),m(s.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),m(s.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),m(s.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),m(s.LinearProgress,"primaryBg",P(ie,s.primary.main,.5)),m(s.LinearProgress,"secondaryBg",P(ie,s.secondary.main,.5)),m(s.LinearProgress,"errorBg",P(ie,s.error.main,.5)),m(s.LinearProgress,"infoBg",P(ie,s.info.main,.5)),m(s.LinearProgress,"successBg",P(ie,s.success.main,.5)),m(s.LinearProgress,"warningBg",P(ie,s.warning.main,.5)),m(s.Skeleton,"bg",O?P(Je,s.text.primary,.13):`rgba(${$("palette-text-primaryChannel")} / 0.13)`),m(s.Slider,"primaryTrack",P(ie,s.primary.main,.5)),m(s.Slider,"secondaryTrack",P(ie,s.secondary.main,.5)),m(s.Slider,"errorTrack",P(ie,s.error.main,.5)),m(s.Slider,"infoTrack",P(ie,s.info.main,.5)),m(s.Slider,"successTrack",P(ie,s.success.main,.5)),m(s.Slider,"warningTrack",P(ie,s.warning.main,.5));const N=O?P(se,s.background.default,.985):Vr(s.background.default,.98);m(s.SnackbarContent,"bg",N),m(s.SnackbarContent,"color",Ne(()=>O?Tn.text.primary:s.getContrastText(N))),m(s.SpeedDialAction,"fabHoverBg",Vr(s.background.paper,.15)),m(s.StepConnector,"border",$("palette-grey-600")),m(s.StepContent,"border",$("palette-grey-600")),m(s.Switch,"defaultColor",$("palette-grey-300")),m(s.Switch,"defaultDisabledColor",$("palette-grey-600")),m(s.Switch,"primaryDisabledColor",P(ie,s.primary.main,.55)),m(s.Switch,"secondaryDisabledColor",P(ie,s.secondary.main,.55)),m(s.Switch,"errorDisabledColor",P(ie,s.error.main,.55)),m(s.Switch,"infoDisabledColor",P(ie,s.info.main,.55)),m(s.Switch,"successDisabledColor",P(ie,s.success.main,.55)),m(s.Switch,"warningDisabledColor",P(ie,s.warning.main,.55)),m(s.TableCell,"border",P(ie,P(Je,s.divider,1),.68)),m(s.Tooltip,"bg",P(Je,s.grey[700],.92))}Ve(s.background,"default"),Ve(s.background,"paper"),Ve(s.common,"background"),Ve(s.common,"onBackground"),Ve(s,"divider"),Object.keys(s).forEach(N=>{const K=s[N];N!=="tonalOffset"&&K&&typeof K=="object"&&(K.main&&m(s[N],"mainChannel",hr(yr(K.main))),K.light&&m(s[N],"lightChannel",hr(yr(K.light))),K.dark&&m(s[N],"darkChannel",hr(yr(K.dark))),K.contrastText&&m(s[N],"contrastTextChannel",hr(yr(K.contrastText))),N==="text"&&(Ve(s[N],"primary"),Ve(s[N],"secondary")),N==="action"&&(K.active&&Ve(s[N],"active"),K.selected&&Ve(s[N],"selected")))})}),j=r.reduce((re,s)=>$e(re,s),j);const X={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:l,getSelector:ms(j),enableContrastVars:c},{vars:pe,generateThemeVars:Q,generateStyleSheets:he}=Fi(j,X);return j.vars=pe,Object.entries(j.colorSchemes[j.defaultColorScheme]).forEach(([re,s])=>{j[re]=s}),j.generateThemeVars=Q,j.generateStyleSheets=he,j.generateSpacing=function(){return un(g.spacing,ot(this))},j.getColorSchemeSelector=Bi(d),j.spacing=j.generateSpacing(),j.shouldSkipGeneratingVar=l,j.unstable_sxConfig={...Ir,...g?.unstable_sxConfig},j.unstable_sx=function(s){return Ze({sx:s,theme:this})},j.toRuntimeSource=Rn,j}function In(e,r,t){e.colorSchemes&&t&&(e.colorSchemes[r]={...t!==!0&&t,palette:ht({...t===!0?{}:t.palette,mode:r})})}function Nn(e={},...r){const{palette:t,cssVariables:n=!1,colorSchemes:o=t?void 0:{light:!0},defaultColorScheme:i=t?.mode,...c}=e,l=i||"light",d=o?.[l],h={...o,...t?{[l]:{...typeof d!="boolean"&&d,palette:t}}:void 0};if(n===!1){if(!("colorSchemes"in e))return mt(e,...r);let g=t;"palette"in e||h[l]&&(h[l]!==!0?g=h[l].palette:l==="dark"&&(g={mode:"dark"}));const y=mt({...e,palette:g},...r);return y.defaultColorScheme=l,y.colorSchemes=h,y.palette.mode==="light"&&(y.colorSchemes.light={...h.light!==!0&&h.light,palette:y.palette},In(y,"dark",h.dark)),y.palette.mode==="dark"&&(y.colorSchemes.dark={...h.dark!==!0&&h.dark,palette:y.palette},In(y,"light",h.light)),y}return!t&&!("light"in h)&&l==="light"&&(h.light=!0),vs({...c,colorSchemes:h,defaultColorScheme:l,...typeof n!="boolean"&&n},...r)}const xs=Nn(),Ss="$$material";function Cs(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ts=Ci({themeId:Ss,defaultTheme:xs,rootShouldForwardProp:e=>Cs(e)&&e!=="classes"}),Es=Ii;process.env.NODE_ENV!=="production"&&(ee.node,ee.object.isRequired);function ws(e){return ki(e)}function Ps(e){return at("MuiSvgIcon",e)}yi("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const $s=e=>{const{color:r,fontSize:t,classes:n}=e,o={root:["root",r!=="inherit"&&`color${qe(r)}`,`fontSize${qe(t)}`]};return ao(o,Ps,n)},Os=Ts("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,t.color!=="inherit"&&r[`color${qe(t.color)}`],r[`fontSize${qe(t.fontSize)}`]]}})(Es(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:r=>!r.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,r])=>r&&r.main).map(([r])=>({props:{color:r},style:{color:(e.vars??e).palette?.[r]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Wr=z.forwardRef(function(r,t){const n=ws({props:r,name:"MuiSvgIcon"}),{children:o,className:i,color:c="inherit",component:l="svg",fontSize:d="medium",htmlColor:h,inheritViewBox:g=!1,titleAccess:y,viewBox:b="0 0 24 24",...w}=n,v=z.isValidElement(o)&&o.type==="svg",u={...n,color:c,component:l,fontSize:d,instanceFontSize:r.fontSize,inheritViewBox:g,viewBox:b,hasSvgAsChild:v},C={};g||(C.viewBox=b);const k=$s(u);return f.jsxs(Os,{as:l,className:Ht(k.root,i),focusable:"false",color:h,"aria-hidden":y?void 0:!0,role:y?"img":void 0,ref:t,...C,...w,...v&&o.props,ownerState:u,children:[v?o.props.children:o,y?f.jsx("title",{children:y}):null]})});process.env.NODE_ENV!=="production"&&(Wr.propTypes={children:ee.node,classes:ee.object,className:ee.string,color:ee.oneOfType([ee.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ee.string]),component:ee.elementType,fontSize:ee.oneOfType([ee.oneOf(["inherit","large","medium","small"]),ee.string]),htmlColor:ee.string,inheritViewBox:ee.bool,shapeRendering:ee.string,sx:ee.oneOfType([ee.arrayOf(ee.oneOfType([ee.func,ee.object,ee.bool])),ee.func,ee.object]),titleAccess:ee.string,viewBox:ee.string}),Wr.muiName="SvgIcon";function ir(e,r){function t(n,o){return f.jsx(Wr,{"data-testid":process.env.NODE_ENV!=="production"?`${r}Icon`:void 0,ref:o,...n,children:e})}return process.env.NODE_ENV!=="production"&&(t.displayName=`${r}Icon`),t.muiName=Wr.muiName,z.memo(z.forwardRef(t))}const _s=ir(f.jsx("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2m0 14H4v-6h16zm0-10H4V6h16z"}),"CreditCard"),Mn=ir(f.jsx("path",{d:"M15 21h-2v-2h2zm-2-7h-2v5h2zm8-2h-2v4h2zm-2-2h-2v2h2zM7 12H5v2h2zm-2-2H3v2h2zm7-5h2V3h-2zm-7.5-.5v3h3v-3zM9 9H3V3h6zm-4.5 7.5v3h3v-3zM9 21H3v-6h6zm7.5-16.5v3h3v-3zM21 9h-6V3h6zm-2 10v-3h-4v2h2v3h4v-2zm-2-7h-4v2h4zm-4-2H7v2h2v2h2v-2h2zm1-1V7h-2V5h-2v4zM6.75 5.25h-1.5v1.5h1.5zm0 12h-1.5v1.5h1.5zm12-12h-1.5v1.5h1.5z"}),"QrCode2"),Rs=ir(f.jsx("path",{d:"M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2zm-9-2h10V8H12zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"AccountBalanceWallet"),As=ir(f.jsx("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"}),"Apple"),js=ir(f.jsx("path",{d:"M12.545,10.239v3.821h5.445c-0.712,2.315-2.647,3.972-5.445,3.972c-3.332,0-6.033-2.701-6.033-6.032s2.701-6.032,6.033-6.032c1.498,0,2.866,0.549,3.921,1.453l2.814-2.814C17.503,2.988,15.139,2,12.545,2C7.021,2,2.543,6.477,2.543,12s4.478,10,10.002,10c8.396,0,10.249-7.85,9.426-11.748L12.545,10.239z"}),"Google"),we={primary:"#6C4CE7",primaryHover:"#5a3ed4",ink:"#111827",muted:"#6b7280",bg:"#f6f7fb",surface:"#ffffff",border:"#e5e7eb",ring:"rgba(108,76,231,.25)"},yt=Nn({palette:{mode:"light",primary:{main:we.primary},text:{primary:we.ink,secondary:we.muted},background:{default:we.bg,paper:we.surface}},shape:{borderRadius:10},typography:{fontFamily:'"Inter","Segoe UI",Roboto,Ubuntu,Helvetica,Arial,sans-serif',h6:{fontWeight:700},button:{textTransform:"none",fontWeight:700}},components:{MuiCard:{styleOverrides:{root:{border:`1px solid ${we.border}`,boxShadow:"0 10px 30px rgba(2,6,23,.06)"}}},MuiTextField:{defaultProps:{size:"medium"}},MuiOutlinedInput:{styleOverrides:{root:{background:"#fff","& fieldset":{borderColor:we.border},"&:hover fieldset":{borderColor:we.primary},"&.Mui-focused fieldset":{borderColor:we.primary,boxShadow:`0 0 0 3px ${we.ring}`}},input:{paddingTop:14,paddingBottom:14}}},MuiButton:{styleOverrides:{root:{borderRadius:12,paddingBlock:14},containedPrimary:{boxShadow:"0 10px 24px rgba(108,76,231,.22)"}}},MuiDivider:{styleOverrides:{root:{borderColor:we.border}}}}}),bt=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"});function Lr({amount:e,merchantName:r,sticky:t,items:n=[]}){return f.jsx(p.Card,{elevation:0,sx:{background:"#f9fafb",border:`1px solid ${we.border}`,position:t?"sticky":"static",top:24},children:f.jsxs(p.CardContent,{children:[f.jsx(p.Typography,{variant:"subtitle2",color:"text.secondary",sx:{mb:1},children:r}),f.jsx(p.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Enviou uma solicitação de pagamento"}),f.jsx(p.Divider,{sx:{mb:2}}),f.jsx(p.Typography,{variant:"body2",color:"text.primary",sx:{mb:.5},children:"Descrição do produto ou serviço"}),n.length>0?f.jsx(p.Stack,{spacing:1.2,sx:{mb:1},children:n.map((o,i)=>{const c=o.quantity??1,l=o.unitPrice*c;return f.jsxs(p.Stack,{direction:"row",justifyContent:"space-between",children:[f.jsxs(p.Typography,{variant:"body2",color:"text.secondary",children:[c>1?`${c}× `:"",o.name]}),f.jsx(p.Typography,{variant:"body2",children:bt.format(l)})]},o.id??`${o.name}-${i}`)})}):f.jsxs(p.Stack,{direction:"row",justifyContent:"space-between",sx:{mb:1},children:[f.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"(1) Pagamento"}),f.jsx(p.Typography,{variant:"body2",children:bt.format(e)})]}),f.jsx(p.Divider,{sx:{my:2}}),f.jsxs(p.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[f.jsx(p.Typography,{variant:"h5",sx:{fontWeight:800},children:"Valor total"}),f.jsx(p.Typography,{variant:"h5",sx:{fontWeight:800},children:bt.format(e)})]}),f.jsx(p.Typography,{variant:"caption",color:"text.secondary",sx:{display:"block",mt:2,textAlign:"center"},children:"Desenvolvido por SuportePOS | Pagamento Seguro"})]})})}function vt(e){if(e=e.replace(/\D/g,""),!e||e.length!==11||/^(\d)\1{10}$/.test(e))return!1;let r=0;for(let n=0;n<9;n++)r+=parseInt(e[n])*(10-n);let t=r*10%11;if((t===10||t===11)&&(t=0),t!==parseInt(e[9]))return!1;r=0;for(let n=0;n<10;n++)r+=parseInt(e[n])*(11-n);return t=r*10%11,(t===10||t===11)&&(t=0),t===parseInt(e[10])}function xt(e){if(e=e.replace(/\D/g,""),!e||e.length!==14||/^(\d)\1{13}$/.test(e))return!1;let r=e.length-2,t=e.substring(0,r),n=e.substring(r),o=0,i=r-7;for(let l=r;l>=1;l--)o+=parseInt(t[r-l])*i--,i<2&&(i=9);let c=o%11<2?0:11-o%11;if(c!==parseInt(n[0]))return!1;r=r+1,t=e.substring(0,r),o=0,i=r-7;for(let l=r;l>=1;l--)o+=parseInt(t[r-l])*i--,i<2&&(i=9);return c=o%11<2?0:11-o%11,c===parseInt(n[1])}function St(e){return/^[A-Z0-9]{6,9}$/i.test(e.trim())}const ks=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}),Is=["AC","AL","AP","AM","BA","CE","DF","ES","GO","MA","MT","MS","MG","PA","PB","PR","PE","PI","RJ","RN","RS","RO","RR","SC","SP","SE","TO"];function Dn({merchantId:e,amount:r,splits:t,summaryItems:n,merchantName:o,installmentsOptions:i=[1,2,3,6,10,12],onBack:c,onResponse:l}){const d=p.useMediaQuery("(max-width:900px)"),[h,g]=z.useState("card"),[y,b]=z.useState(""),[w,v]=z.useState(""),[u,C]=z.useState(""),[k,I]=z.useState(""),[F,O]=z.useState(1),[E,j]=z.useState(""),[X,pe]=z.useState(""),[Q,he]=z.useState(""),[re,s]=z.useState(""),[$,P]=z.useState(""),[N,K]=z.useState(""),[ue,xe]=z.useState(""),[Ie,T]=z.useState(""),[R,U]=z.useState(""),[B,V]=z.useState(""),[G,L]=z.useState(""),[M,q]=z.useState(""),[Y,H]=z.useState(""),[Se,_]=z.useState(!1),[W,Me]=z.useState({}),[_e,De]=z.useState(!1),Ur=x=>x.replace(/\D/g,"").trim(),Yr=x=>x.replace(/\D/g,"").slice(0,6).replace(/(\d{2})(\d{0,4})/,(de,Te,je)=>je?`${Te}/${je}`:Te),sr=x=>x.replace(/\D/g,"").slice(0,8).replace(/(\d{5})(\d{1,3})?/,(de,Te,je)=>je?`${Te}-${je}`:Te),Ct=x=>x.replace(/\D/g,"").slice(0,11).replace(/^(\d{2})(\d{5})(\d{0,4}).*/,"($1) $2-$3").replace(/-$/,""),Tt=x=>x.replace(/\D/g,"").slice(0,11).replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})$/,"$1-$2"),br=x=>x.replace(/\D/g,"").slice(0,14).replace(/^(\d{2})(\d)/,"$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/,"$1.$2.$3").replace(/\.(\d{3})(\d)/,".$1/$2").replace(/(\d{4})(\d)/,"$1-$2"),Et=x=>x.replace(/[^a-zA-Z0-9]/g,"").slice(0,9).toUpperCase();z.useEffect(()=>{const x=document.createElement("script");return x.src="https://www.pagador.com.br/post/scripts/silentorderpost-1.0.min.js",x.async=!0,document.body.appendChild(x),x.onload=async()=>{try{const Te=await(await fetch(`http://127.0.0.1:8003/api/token-cartao?uuid=${e}`)).json();j(Te?.AccessToken)}catch(de){console.error("Erro ao buscar accessToken:",de)}},()=>{document.body.removeChild(x)}},[]);function wt(){const x={};return y.replace(/\D/g,"").length<15&&(x.cardNumber="Número inválido"),w.trim()||(x.holderName="Informe o nome"),/^\d{2}\/\d{4}$/.test(u)||(x.expiry="Use MM/AAAA"),/^\d{3,4}$/.test(k)||(x.cvv="CVV inválido"),Me(x),Object.keys(x).length===0}function Gr(){const x={};return(!X||!/^\d{5}-?\d{3}$/.test(X))&&(x.cep="CEP inválido"),Q.trim()||(x.address="Informe o endereço"),re.trim()||(x.number="O campo Número é obrigatório"),N.trim()||(x.neighborhood="O campo Bairro é obrigatório"),ue.trim()||(x.city="Informe a cidade"),Ie||(x.uf="Selecione o estado (UF)"),Me(x),Object.keys(x).length===0}function qr(){const x={};return R.trim()||(x.buyerName="Informe o nome"),/^\S+@\S+\.\S+$/.test(B)||(x.buyerEmail="E-mail inválido"),G.replace(/\D/g,"").length<10&&(x.buyerPhone="Telefone inválido"),M||(x.docType="Selecione o tipo de documento"),R.trim()||(x.buyerName="Informe o nome"),/^\S+@\S+\.\S+$/.test(B)||(x.buyerEmail="E-mail inválido"),G.replace(/\D/g,"").length<10&&(x.buyerPhone="Telefone inválido"),M||(x.docType="Selecione o tipo de documento"),Y.trim()?(M==="CPF"&&!vt(Y)&&(x.docNumber="CPF inválido"),M==="CNPJ"&&!xt(Y)&&(x.docNumber="CNPJ inválido"),M==="PASSAPORTE"&&!St(Y)&&(x.docNumber="Passaporte inválido")):x.docNumber="Informe o número do documento",Me(x),Object.keys(x).length===0}const Hr=()=>wt()&&g("billing"),Pt=()=>Gr()&&g("buyer"),Kr=async x=>{const de=sr(x);pe(de);const Te=de.replace(/\D/g,"");if(Te.length===8)try{const Ye=await(await fetch(`http://127.0.0.1:8003/api/cep/${Te}?uuid=${e}`)).json();Ye.error||(he(Ye.street||""),K(Ye.neighborhood||""),xe(Ye.city||""),T(Ye.state||""),P(Ye.complement||""))}catch(je){console.error("Erro ao buscar CEP:",je)}},Jr=async()=>{if(!qr())return;De(!0);const x={accessToken:E,environment:"sandbox",language:"PT",enableBinQuery:!1,enableVerifyCard:!1,enableTokenize:!1,cvvrequired:!0,onSuccess:async de=>{try{const je=await(await fetch("http://127.0.0.1:8003/api/pagar",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uuid:e,paymentToken:de.CardToken??de.PaymentToken,amount:r,installments:F,buyerName:R,buyerEmail:B,buyerPhone:G,docType:M,docNumber:Y,splits:t,cep:X,address:Q,number:re,complement:$,neighborhood:N,city:ue,state:Ie})})).json();l?.(je)}catch(Te){console.error("Erro chamando backend:",Te),l?.({success:!1,message:"Erro ao comunicar backend"})}finally{De(!1)}},onError:de=>{console.error("Erro SOP:",de),l?.({success:!1,message:"Erro SOP"}),De(!1)},onInvalid:de=>{console.warn("Campos inválidos:",de),l?.({success:!1,message:"Campos inválidos"}),De(!1)}};window.bpSop_silentOrderPost(x)};return f.jsx(p.ThemeProvider,{theme:yt,children:f.jsx(p.Box,{sx:{bgcolor:"background.default",minHeight:"100vh"},children:f.jsx(p.Container,{maxWidth:"lg",children:f.jsxs(p.Grid,{container:!0,spacing:3,children:[f.jsx(p.Grid,{item:!0,xs:12,md:7,size:7,children:f.jsx(p.Card,{elevation:0,sx:{border:"1px solid #e2e8f0"},children:f.jsxs(p.CardContent,{children:[f.jsx(p.Box,{sx:{display:h==="card"?"block":"none"},children:f.jsxs(f.Fragment,{children:[f.jsx(p.Typography,{variant:"h6",sx:{mb:2},children:"Pagamento com cartão de crédito"}),f.jsxs(p.Stack,{spacing:2,children:[f.jsx(p.TextField,{label:"Número do cartão",value:y,onChange:x=>b(Ur(x.target.value)),error:!!W.cardNumber,inputProps:{className:"bp-sop-cardnumber",maxLength:19,inputMode:"numeric"},helperText:W.cardNumber,fullWidth:!0}),f.jsx(p.TextField,{label:"Nome como está no cartão",value:w,onChange:x=>v(x.target.value),error:!!W.holderName,helperText:W.holderName,inputProps:{className:"bp-sop-cardholdername"},fullWidth:!0}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,children:[f.jsx(p.TextField,{label:"Vencimento",placeholder:"MM/AAAA",value:u,onChange:x=>C(Yr(x.target.value)),error:!!W.expiry,helperText:W.expiry,inputProps:{className:"bp-sop-cardexpirationdate",maxLength:7},fullWidth:!0}),f.jsx(p.TextField,{label:"CVV",value:k,onChange:x=>I(x.target.value.replace(/\D/g,"").slice(0,4)),error:!!W.cvv,helperText:W.cvv,inputProps:{className:"bp-sop-cardcvv",maxLength:4,inputMode:"numeric"},fullWidth:!0})]}),f.jsxs(p.FormControl,{fullWidth:!0,children:[f.jsx(p.InputLabel,{children:"Quantidade de Parcelas"}),f.jsx(p.Select,{label:"Quantidade de Parcelas",value:F,onChange:x=>O(Number(x.target.value)),children:i.map(x=>f.jsxs(p.MenuItem,{value:x,children:[x,"x de R$ ",ks.format(r/x)]},x))}),f.jsx(p.FormHelperText,{children:"Informe o número do cartão para verificar o valor das parcelas"})]}),f.jsx("input",{type:"hidden",className:"bp-sop-cardtype",value:"CreditCard"}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,sx:{mt:1},children:[f.jsx(p.Button,{variant:"outlined",onClick:c,fullWidth:!0,sx:{py:1.4},children:"Voltar"}),f.jsx(p.Button,{variant:"contained",onClick:Hr,disabled:_e,fullWidth:!0,sx:{py:1.4},children:"Continuar"})]})]})]})}),f.jsx(p.Box,{sx:{display:h==="billing"?"block":"none"},children:f.jsxs(f.Fragment,{children:[f.jsx(p.Typography,{variant:"h6",sx:{mb:2},children:"Endereço de cobrança"}),f.jsxs(p.Stack,{spacing:2,children:[f.jsx(p.Stack,{direction:"row",spacing:2,alignItems:"flex-start",children:f.jsx(p.TextField,{label:"CEP",placeholder:"00000-000",value:X,onChange:x=>Kr(x.target.value),error:!!W.cep,helperText:W.cep,fullWidth:!0})}),f.jsx(p.TextField,{label:"Endereço",value:Q,onChange:x=>he(x.target.value),error:!!W.address,helperText:W.address,fullWidth:!0}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,children:[f.jsx(p.TextField,{label:"Número",value:re,onChange:x=>s(x.target.value),error:!!W.number,helperText:W.number,fullWidth:!0}),f.jsx(p.TextField,{label:"Complemento",value:$,onChange:x=>P(x.target.value),fullWidth:!0})]}),f.jsx(p.TextField,{label:"Bairro",value:N,onChange:x=>K(x.target.value),error:!!W.neighborhood,helperText:W.neighborhood,fullWidth:!0}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,children:[f.jsx(p.TextField,{label:"Cidade",value:ue,onChange:x=>xe(x.target.value),error:!!W.city,helperText:W.city,fullWidth:!0}),f.jsxs(p.FormControl,{fullWidth:!0,error:!!W.uf,children:[f.jsx(p.InputLabel,{children:"Estado"}),f.jsx(p.Select,{label:"Estado",value:Ie,onChange:x=>T(String(x.target.value)),children:Is.map(x=>f.jsx(p.MenuItem,{value:x,children:x},x))}),f.jsx(p.FormHelperText,{children:W.uf})]})]}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,sx:{mt:1},children:[f.jsx(p.Button,{variant:"outlined",onClick:()=>g("card"),fullWidth:!0,sx:{py:1.4},children:"Voltar"}),f.jsx(p.Button,{variant:"contained",onClick:Pt,fullWidth:!0,sx:{py:1.4},disabled:_e||!X||!!W.cep||!Q||!re||!N||!ue||!Ie,children:"Continuar"})]})]})]})}),f.jsx(p.Box,{sx:{display:h==="buyer"?"block":"none"},children:f.jsxs(f.Fragment,{children:[f.jsx(p.Typography,{variant:"h6",sx:{mb:2},children:"Falta pouco! Insira seus dados antes de concluir"}),f.jsxs(p.Stack,{spacing:2,children:[f.jsx(p.TextField,{label:"Nome Completo",value:R,onChange:x=>U(x.target.value),error:!!W.buyerName,helperText:W.buyerName,fullWidth:!0}),f.jsx(p.TextField,{label:"E-mail",value:B,onChange:x=>V(x.target.value),error:!!W.buyerEmail,helperText:W.buyerEmail,fullWidth:!0}),f.jsx(p.TextField,{label:"Celular",value:G,onChange:x=>L(Ct(x.target.value)),error:!!W.buyerPhone,helperText:W.buyerPhone,fullWidth:!0}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,children:[f.jsxs(p.FormControl,{fullWidth:!0,error:!!W.docType,children:[f.jsx(p.InputLabel,{children:"Escolha o tipo de documento"}),f.jsxs(p.Select,{label:"Escolha o tipo de documento",value:M,onChange:x=>q(x.target.value),children:[f.jsx(p.MenuItem,{value:"CPF",children:"CPF"}),f.jsx(p.MenuItem,{value:"CNPJ",children:"CNPJ"}),f.jsx(p.MenuItem,{value:"PASSAPORTE",children:"Passaporte"})]}),f.jsx(p.FormHelperText,{children:W.docType})]}),f.jsx(p.TextField,{label:"Número do documento",value:Y,onChange:x=>{let de=x.target.value;M==="CPF"&&(de=Tt(de)),M==="CNPJ"&&(de=br(de)),M==="PASSAPORTE"&&(de=Et(de)),H(de)},error:!!W.docNumber,helperText:W.docNumber,fullWidth:!0})]}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,sx:{mt:1},children:[f.jsx(p.Button,{variant:"outlined",disabled:_e,onClick:()=>g("billing"),fullWidth:!0,sx:{py:1.4},children:"Voltar"}),f.jsx(p.Button,{variant:"contained",onClick:Jr,disabled:_e,fullWidth:!0,sx:{py:1.4},children:_e?"Processando...":"Concluir compra"})]})]})]})})]})})}),f.jsx(p.Grid,{item:!0,xs:12,md:5,size:5,children:f.jsx(Lr,{amount:r,merchantName:o,sticky:!d,items:n})})]})})})})}const Ns=ir(f.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy");function Fn({merchantId:e,amount:r,merchantName:t="SUPORTEPOS",summaryItems:n,splits:o,onBack:i,onResponse:c}){const l=p.useMediaQuery("(max-width:900px)"),[d,h]=z.useState(!1),[g,y]=z.useState(""),[b,w]=z.useState(""),[v,u]=z.useState(""),[C,k]=z.useState({}),[I,F]=z.useState(!1),[O,E]=z.useState(null),j=s=>s.replace(/\D/g,"").slice(0,11).replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})$/,"$1-$2"),X=s=>s.replace(/\D/g,"").slice(0,14).replace(/^(\d{2})(\d)/,"$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/,"$1.$2.$3").replace(/\.(\d{3})(\d)/,".$1/$2").replace(/(\d{4})(\d)/,"$1-$2"),pe=s=>s.replace(/[^a-zA-Z0-9]/g,"").slice(0,9).toUpperCase(),Q=()=>{const s={};return g.trim()||(s.buyerName="Informe o nome"),b||(s.docType="Selecione o tipo de documento"),v.trim()?(b==="CPF"&&!vt(v)&&(s.docNumber="CPF inválido"),b==="CNPJ"&&!xt(v)&&(s.docNumber="CNPJ inválido"),b==="PASSAPORTE"&&!St(v)&&(s.docNumber="Passaporte inválido")):s.docNumber="Informe o número do documento",k(s),Object.keys(s).length===0},he=async()=>{if(Q()){F(!0);try{const $=await(await fetch("http://127.0.0.1:8003/api/pix",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uuid:e,amount:r,buyerName:g,docType:b,docNumber:v,splits:o})})).json();$.copyPasteCode&&$.qrCodeSrc&&E($)}catch(s){console.error("Erro ao gerar PIX:",s)}finally{F(!1)}}},re=async()=>{if(O?.copyPasteCode)try{await navigator.clipboard.writeText(O.copyPasteCode),h(!0),setTimeout(()=>h(!1),1500)}catch{}};return f.jsx(p.ThemeProvider,{theme:yt,children:f.jsx(p.Box,{sx:{bgcolor:"background.default",minHeight:"100%",py:0},children:f.jsx(p.Container,{maxWidth:"lg",children:f.jsxs(p.Grid,{container:!0,spacing:3,children:[f.jsx(p.Grid,{item:!0,xs:12,md:7,size:7,children:f.jsx(p.Card,{elevation:0,sx:{border:"1px solid #e2e8f0"},children:f.jsxs(p.CardContent,{children:[!O&&f.jsxs(f.Fragment,{children:[f.jsx(p.Typography,{variant:"h6",sx:{mb:2},children:"Preencha seus dados para gerar o PIX"}),f.jsxs(p.Stack,{spacing:2,children:[f.jsx(p.TextField,{label:"Nome Completo",value:g,onChange:s=>y(s.target.value),error:!!C.buyerName,helperText:C.buyerName,fullWidth:!0}),f.jsxs(p.FormControl,{fullWidth:!0,error:!!C.docType,children:[f.jsx(p.InputLabel,{children:"Tipo de Documento"}),f.jsxs(p.Select,{value:b,onChange:s=>w(s.target.value),children:[f.jsx(p.MenuItem,{value:"CPF",children:"CPF"}),f.jsx(p.MenuItem,{value:"CNPJ",children:"CNPJ"}),f.jsx(p.MenuItem,{value:"PASSAPORTE",children:"Passaporte"})]}),f.jsx(p.FormHelperText,{children:C.docType})]}),f.jsx(p.TextField,{label:"Número do Documento",value:v,onChange:s=>{let $=s.target.value;b==="CPF"&&($=j($)),b==="CNPJ"&&($=X($)),b==="PASSAPORTE"&&($=pe($)),u($)},error:!!C.docNumber,helperText:C.docNumber,fullWidth:!0}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,children:[f.jsx(p.Button,{variant:"outlined",onClick:i,disabled:I,fullWidth:!0,sx:{py:1.4},children:"Voltar"}),f.jsx(p.Button,{variant:"contained",onClick:he,disabled:I,fullWidth:!0,sx:{py:1.4},children:I?"Gerando PIX...":"Gerar PIX"})]})]})]}),O&&f.jsxs(f.Fragment,{children:[f.jsx(p.Typography,{variant:"h6",sx:{mb:2},children:"Para concluir seu pagamento escaneie o QR Code abaixo"}),f.jsx(p.Box,{sx:{border:"1px solid #e5e7eb",borderRadius:2,bgcolor:"#f8fafc",p:{xs:2,md:3},mb:3},children:f.jsx(p.Box,{sx:{width:{xs:"100%",sm:360},height:{xs:"auto",sm:360},mx:"auto",display:"flex",alignItems:"center",justifyContent:"center",bgcolor:"#fff",borderRadius:2,overflow:"hidden"},children:f.jsx("img",{alt:"QR Code PIX",src:O.qrCodeSrc,style:{width:"100%",height:"100%",objectFit:"contain"}})})}),f.jsx(p.Typography,{variant:"body2",color:"text.secondary",sx:{mb:1},children:"Código copia-e-cola"}),f.jsx(p.Box,{sx:{fontFamily:"monospace",fontSize:14,lineHeight:1.5,bgcolor:"#f8fafc",border:"1px solid #e5e7eb",borderRadius:1,p:1.5,wordBreak:"break-all",mb:1.5,userSelect:"text"},children:O.copyPasteCode}),f.jsx(p.Button,{variant:"outlined",startIcon:f.jsx(Ns,{}),onClick:re,sx:{mb:2},children:d?"Copiado!":"Copiar código"}),f.jsx(p.Divider,{sx:{my:2}}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,children:[f.jsx(p.Button,{variant:"outlined",onClick:i,fullWidth:!0,sx:{py:1.4},children:"Voltar"}),f.jsx(p.Button,{variant:"contained",onClick:()=>{},fullWidth:!0,sx:{py:1.4},children:"Já paguei"})]})]})]})})}),f.jsx(p.Grid,{item:!0,xs:12,md:5,size:5,children:f.jsx(Lr,{amount:r,merchantName:t,items:n,sticky:!l})})]})})})})}function Ms({merchantId:e,products:r,merchantName:t="SUPORTEPOS",amountOverride:n,splits:o,onResponse:i}){const[c,l]=z.useState("select"),d=p.useMediaQuery("(max-width:900px)"),[h]=z.useState({gpay:!1,applepay:!1,clickToPay:!1,creditCard:!0,qrCredit:!1,pix:!0}),g=z.useMemo(()=>r.reduce((F,O)=>F+O.unitPrice*(O.quantity??1),0),[r]),y=n??g,b=()=>alert("Google Pay"),w=()=>alert("Apple Pay"),v=()=>alert("Click to Pay"),u=()=>alert("QR Crédito"),C=[];h.gpay&&C.push(f.jsx(p.Button,{fullWidth:!0,variant:"contained",onClick:b,startIcon:f.jsx(js,{}),color:"primary",sx:{py:1.4},children:"Finalizar compra com o GPay"},"gpay")),h.applepay&&C.push(f.jsx(p.Button,{fullWidth:!0,variant:"contained",onClick:w,startIcon:f.jsx(As,{}),color:"primary",sx:{py:1.4},children:"Pay"},"applepay"));const k=[];h.clickToPay&&k.push(f.jsxs(p.ListItemButton,{onClick:v,sx:zr,children:[f.jsx(p.ListItemIcon,{children:f.jsx(Rs,{})}),f.jsx(p.ListItemText,{primary:"Click to Pay",secondary:"Pague com cartão salvo",primaryTypographyProps:{fontWeight:600}})]},"ctp")),h.creditCard&&k.push(f.jsxs(p.ListItemButton,{onClick:()=>l("card"),sx:zr,children:[f.jsx(p.ListItemIcon,{children:f.jsx(_s,{})}),f.jsx(p.ListItemText,{primary:"Cartão de crédito",secondary:"Insira os dados do cartão",primaryTypographyProps:{fontWeight:600}})]},"card")),h.qrCredit&&k.push(f.jsxs(p.ListItemButton,{onClick:u,sx:zr,children:[f.jsx(p.ListItemIcon,{children:f.jsx(Mn,{})}),f.jsx(p.ListItemText,{primary:"Qr Code Crédito",secondary:"Escaneie o QR Code",primaryTypographyProps:{fontWeight:600}})]},"qrcredit")),h.pix&&k.push(f.jsxs(p.ListItemButton,{onClick:()=>l("pix"),sx:zr,children:[f.jsx(p.ListItemIcon,{children:f.jsx(Mn,{})}),f.jsx(p.ListItemText,{primary:"PIX",secondary:"Escaneie o QR Code",primaryTypographyProps:{fontWeight:600}})]},"pix"));const I=C.length===0&&k.length===0;return f.jsx(p.ThemeProvider,{theme:yt,children:f.jsx(p.Box,{sx:{bgcolor:"background.default",minHeight:"100vh",py:4},children:f.jsx(p.Container,{maxWidth:"lg",children:c==="select"?f.jsxs(p.Grid,{container:!0,spacing:3,children:[f.jsx(p.Grid,{item:!0,xs:12,md:7,size:7,children:f.jsx(p.Card,{elevation:0,sx:{p:{xs:1,md:2},border:"1px solid #e2e8f0"},children:f.jsxs(p.CardContent,{children:[f.jsx(p.Typography,{variant:"h6",sx:{mb:2},children:"Como você quer pagar?"}),I&&f.jsx(p.Alert,{severity:"warning",sx:{mb:2},children:"Nenhum meio de pagamento está disponível no momento."}),C.length>0&&f.jsx(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,sx:{mb:2},children:C}),C.length>0&&k.length>0&&f.jsx(p.Divider,{sx:{my:1},children:f.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"ou"})}),k.length>0&&f.jsx(p.List,{sx:{mt:C.length?1:0},children:k})]})})}),f.jsx(p.Grid,{item:!0,xs:12,md:5,size:5,children:f.jsx(Lr,{amount:y,merchantName:t,sticky:!d,items:r})})]}):c==="card"?f.jsx(Dn,{merchantId:e,amount:y,splits:o,merchantName:t,summaryItems:r,onBack:()=>l("select"),onResponse:i}):f.jsx(Fn,{merchantId:e,amount:y,splits:o,merchantName:t,summaryItems:r,onBack:()=>l("select"),onResponse:i})})})})}const zr={border:`1px solid ${we.border}`,borderRadius:14,mb:1.5,paddingBlock:1.2,boxShadow:"0 6px 18px rgba(2,6,23,.04)","& .MuiListItemIcon-root":{minWidth:44,"& svg":{opacity:.9}},"&:hover":{backgroundColor:"#f8fafc",boxShadow:"0 12px 24px rgba(2,6,23,.06)"}};Ce.CheckoutFlow=Ms,Ce.OrderSummary=Lr,Ce.SplitCardForm=Dn,Ce.SplitPixForm=Fn,Ce.brand=we,Ce.isValidCNPJ=xt,Ce.isValidCPF=vt,Ce.isValidPassport=St,Object.defineProperty(Ce,Symbol.toStringTag,{value:"Module"})}));
|
|
101
|
+
export default theme;`}function Rn(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const as=e=>{if(!Number.isNaN(+e))return+e;const r=e.match(/\d*\.?\d+/g);if(!r)return 0;let t=0;for(let n=0;n<r.length;n+=1)t+=+r[n];return t};function cs(e){Object.assign(e,{alpha(r,t){const n=this||e;return n.colorSpace?`oklch(from ${r} l c h / ${typeof t=="string"?`calc(${t})`:t})`:n.vars?`rgba(${r.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof t=="string"?`calc(${t})`:t})`:bn(r,as(t))},lighten(r,t){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${r}, #fff ${Rn(t)})`:Br(r,t)},darken(r,t){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${r}, #000 ${Rn(t)})`:Fr(r,t)}})}function ht(e={},...r){const{breakpoints:t,mixins:n={},spacing:o,palette:i={},transitions:a={},typography:l={},shape:d,colorSpace:h,...m}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Ve(20));const g=pt({...i,colorSpace:h}),b=un(e);let T=$e(b,{mixins:Hi(b.breakpoints,n),palette:g,shadows:es.slice(),typography:Ji(g,l),transitions:os(a),zIndex:{...is}});if(T=$e(T,m),T=r.reduce((E,u)=>$e(E,u),T),process.env.NODE_ENV!=="production"){const E=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],u=(O,A)=>{let k;for(k in O){const V=O[k];if(E.includes(k)&&Object.keys(V).length>0){if(process.env.NODE_ENV!=="production"){const _=st("",k);console.error([`MUI: The \`${A}\` component increases the CSS specificity of the \`${k}\` internal state.`,"You can not override it like this: ",JSON.stringify(O,null,2),"",`Instead, you need to use the '&.${_}' syntax:`,JSON.stringify({root:{[`&.${_}`]:V}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
102
|
+
`))}O[k]={}}}};Object.keys(T.components).forEach(O=>{const A=T.components[O].styleOverrides;A&&O.startsWith("Mui")&&u(A,O)})}return T.unstable_sxConfig={...Ir,...m?.unstable_sxConfig},T.unstable_sx=function(u){return Ze({sx:u,theme:this})},T.toRuntimeSource=_n,cs(T),T}function ls(e){let r;return e<1?r=5.11916*e**2:r=4.5*Math.log(e+1)+2,Math.round(r*10)/1e3}const us=[...Array(25)].map((e,r)=>{if(r===0)return"none";const t=ls(r);return`linear-gradient(rgba(255 255 255 / ${t}), rgba(255 255 255 / ${t}))`});function jn(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function An(e){return e==="dark"?us:[]}function fs(e){const{palette:r={mode:"light"},opacity:t,overlays:n,colorSpace:o,...i}=e,a=pt({...r,colorSpace:o});return{palette:a,opacity:{...jn(a.mode),...t},overlays:n||An(a.mode),...i}}function ds(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const ps=e=>[...[...Array(25)].map((r,t)=>`--${e?`${e}-`:""}overlays-${t}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],hs=e=>(r,t)=>{const n=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===r){if(r==="dark"){const a={};return ps(e.cssVarPrefix).forEach(l=>{a[l]=t[l],delete t[l]}),i==="media"?{[n]:t,"@media (prefers-color-scheme: dark)":{[n]:a}}:i?{[i.replace("%s",r)]:a,[`${n}, ${i.replace("%s",r)}`]:t}:{[n]:{...t,...a}}}if(i&&i!=="media")return`${n}, ${i.replace("%s",String(r))}`}else if(r){if(i==="media")return{[`@media (prefers-color-scheme: ${String(r)})`]:{[n]:t}};if(i)return i.replace("%s",String(r))}return n};function ms(e,r){r.forEach(t=>{e[t]||(e[t]={})})}function y(e,r,t){!e[r]&&t&&(e[r]=t)}function gr(e){return typeof e!="string"||!e.startsWith("hsl")?e:yn(e)}function Fe(e,r){`${r}Channel`in e||(e[`${r}Channel`]=hr(gr(e[r]),`MUI: Can't create \`palette.${r}Channel\` because \`palette.${r}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
103
|
+
To suppress this warning, you need to explicitly provide the \`palette.${r}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function ys(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Ne=e=>{try{return e()}catch{}},gs=(e="mui")=>Ii(e);function mt(e,r,t,n,o){if(!t)return;t=t===!0?{}:t;const i=o==="dark"?"dark":"light";if(!n){r[o]=fs({...t,palette:{mode:i,...t?.palette},colorSpace:e});return}const{palette:a,...l}=ht({...n,palette:{mode:i,...t?.palette},colorSpace:e});return r[o]={...t,palette:a,opacity:{...jn(i),...t?.opacity},overlays:t?.overlays||An(i)},l}function bs(e={},...r){const{colorSchemes:t={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",nativeColor:a=!1,shouldSkipGeneratingVar:l=ds,colorSchemeSelector:d=t.light&&t.dark?"media":void 0,rootSelector:h=":root",...m}=e,g=Object.keys(t)[0],b=n||(t.light&&g!=="light"?"light":g),T=gs(i),{[b]:E,light:u,dark:O,...A}=t,k={...A};let V=E;if((b==="dark"&&!("dark"in t)||b==="light"&&!("light"in t))&&(V=!0),!V)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${b}\` option is either missing or invalid.`:Ve(21,b));let _;a&&(_="oklch");const S=mt(_,k,V,m,b);u&&!k.light&&mt(_,k,u,void 0,"light"),O&&!k.dark&&mt(_,k,O,void 0,"dark");let I={defaultColorScheme:b,...S,cssVarPrefix:i,colorSchemeSelector:d,rootSelector:h,getCssVar:T,colorSchemes:k,font:{...qi(S.typography),...S.font},spacing:ys(m.spacing)};Object.keys(I.colorSchemes).forEach(ie=>{const s=I.colorSchemes[ie].palette,$=N=>{const G=N.split("-"),pe=G[1],ve=G[2];return T(N,s[pe][ve])};s.mode==="light"&&(y(s.common,"background","#fff"),y(s.common,"onBackground","#000")),s.mode==="dark"&&(y(s.common,"background","#000"),y(s.common,"onBackground","#fff"));function C(N,G,pe){if(_){let ve;return N===Ke&&(ve=`transparent ${((1-pe)*100).toFixed(0)}%`),N===ne&&(ve=`#000 ${(pe*100).toFixed(0)}%`),N===oe&&(ve=`#fff ${(pe*100).toFixed(0)}%`),`color-mix(in ${_}, ${G}, ${ve})`}return N(G,pe)}if(ms(s,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),s.mode==="light"){y(s.Alert,"errorColor",C(ne,s.error.light,.6)),y(s.Alert,"infoColor",C(ne,s.info.light,.6)),y(s.Alert,"successColor",C(ne,s.success.light,.6)),y(s.Alert,"warningColor",C(ne,s.warning.light,.6)),y(s.Alert,"errorFilledBg",$("palette-error-main")),y(s.Alert,"infoFilledBg",$("palette-info-main")),y(s.Alert,"successFilledBg",$("palette-success-main")),y(s.Alert,"warningFilledBg",$("palette-warning-main")),y(s.Alert,"errorFilledColor",Ne(()=>s.getContrastText(s.error.main))),y(s.Alert,"infoFilledColor",Ne(()=>s.getContrastText(s.info.main))),y(s.Alert,"successFilledColor",Ne(()=>s.getContrastText(s.success.main))),y(s.Alert,"warningFilledColor",Ne(()=>s.getContrastText(s.warning.main))),y(s.Alert,"errorStandardBg",C(oe,s.error.light,.9)),y(s.Alert,"infoStandardBg",C(oe,s.info.light,.9)),y(s.Alert,"successStandardBg",C(oe,s.success.light,.9)),y(s.Alert,"warningStandardBg",C(oe,s.warning.light,.9)),y(s.Alert,"errorIconColor",$("palette-error-main")),y(s.Alert,"infoIconColor",$("palette-info-main")),y(s.Alert,"successIconColor",$("palette-success-main")),y(s.Alert,"warningIconColor",$("palette-warning-main")),y(s.AppBar,"defaultBg",$("palette-grey-100")),y(s.Avatar,"defaultBg",$("palette-grey-400")),y(s.Button,"inheritContainedBg",$("palette-grey-300")),y(s.Button,"inheritContainedHoverBg",$("palette-grey-A100")),y(s.Chip,"defaultBorder",$("palette-grey-400")),y(s.Chip,"defaultAvatarColor",$("palette-grey-700")),y(s.Chip,"defaultIconColor",$("palette-grey-700")),y(s.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),y(s.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),y(s.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),y(s.LinearProgress,"primaryBg",C(oe,s.primary.main,.62)),y(s.LinearProgress,"secondaryBg",C(oe,s.secondary.main,.62)),y(s.LinearProgress,"errorBg",C(oe,s.error.main,.62)),y(s.LinearProgress,"infoBg",C(oe,s.info.main,.62)),y(s.LinearProgress,"successBg",C(oe,s.success.main,.62)),y(s.LinearProgress,"warningBg",C(oe,s.warning.main,.62)),y(s.Skeleton,"bg",_?C(Ke,s.text.primary,.11):`rgba(${$("palette-text-primaryChannel")} / 0.11)`),y(s.Slider,"primaryTrack",C(oe,s.primary.main,.62)),y(s.Slider,"secondaryTrack",C(oe,s.secondary.main,.62)),y(s.Slider,"errorTrack",C(oe,s.error.main,.62)),y(s.Slider,"infoTrack",C(oe,s.info.main,.62)),y(s.Slider,"successTrack",C(oe,s.success.main,.62)),y(s.Slider,"warningTrack",C(oe,s.warning.main,.62));const N=_?C(ne,s.background.default,.6825):Vr(s.background.default,.8);y(s.SnackbarContent,"bg",N),y(s.SnackbarContent,"color",Ne(()=>_?dt.text.primary:s.getContrastText(N))),y(s.SpeedDialAction,"fabHoverBg",Vr(s.background.paper,.15)),y(s.StepConnector,"border",$("palette-grey-400")),y(s.StepContent,"border",$("palette-grey-400")),y(s.Switch,"defaultColor",$("palette-common-white")),y(s.Switch,"defaultDisabledColor",$("palette-grey-100")),y(s.Switch,"primaryDisabledColor",C(oe,s.primary.main,.62)),y(s.Switch,"secondaryDisabledColor",C(oe,s.secondary.main,.62)),y(s.Switch,"errorDisabledColor",C(oe,s.error.main,.62)),y(s.Switch,"infoDisabledColor",C(oe,s.info.main,.62)),y(s.Switch,"successDisabledColor",C(oe,s.success.main,.62)),y(s.Switch,"warningDisabledColor",C(oe,s.warning.main,.62)),y(s.TableCell,"border",C(oe,C(Ke,s.divider,1),.88)),y(s.Tooltip,"bg",C(Ke,s.grey[700],.92))}if(s.mode==="dark"){y(s.Alert,"errorColor",C(oe,s.error.light,.6)),y(s.Alert,"infoColor",C(oe,s.info.light,.6)),y(s.Alert,"successColor",C(oe,s.success.light,.6)),y(s.Alert,"warningColor",C(oe,s.warning.light,.6)),y(s.Alert,"errorFilledBg",$("palette-error-dark")),y(s.Alert,"infoFilledBg",$("palette-info-dark")),y(s.Alert,"successFilledBg",$("palette-success-dark")),y(s.Alert,"warningFilledBg",$("palette-warning-dark")),y(s.Alert,"errorFilledColor",Ne(()=>s.getContrastText(s.error.dark))),y(s.Alert,"infoFilledColor",Ne(()=>s.getContrastText(s.info.dark))),y(s.Alert,"successFilledColor",Ne(()=>s.getContrastText(s.success.dark))),y(s.Alert,"warningFilledColor",Ne(()=>s.getContrastText(s.warning.dark))),y(s.Alert,"errorStandardBg",C(ne,s.error.light,.9)),y(s.Alert,"infoStandardBg",C(ne,s.info.light,.9)),y(s.Alert,"successStandardBg",C(ne,s.success.light,.9)),y(s.Alert,"warningStandardBg",C(ne,s.warning.light,.9)),y(s.Alert,"errorIconColor",$("palette-error-main")),y(s.Alert,"infoIconColor",$("palette-info-main")),y(s.Alert,"successIconColor",$("palette-success-main")),y(s.Alert,"warningIconColor",$("palette-warning-main")),y(s.AppBar,"defaultBg",$("palette-grey-900")),y(s.AppBar,"darkBg",$("palette-background-paper")),y(s.AppBar,"darkColor",$("palette-text-primary")),y(s.Avatar,"defaultBg",$("palette-grey-600")),y(s.Button,"inheritContainedBg",$("palette-grey-800")),y(s.Button,"inheritContainedHoverBg",$("palette-grey-700")),y(s.Chip,"defaultBorder",$("palette-grey-700")),y(s.Chip,"defaultAvatarColor",$("palette-grey-300")),y(s.Chip,"defaultIconColor",$("palette-grey-300")),y(s.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),y(s.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),y(s.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),y(s.LinearProgress,"primaryBg",C(ne,s.primary.main,.5)),y(s.LinearProgress,"secondaryBg",C(ne,s.secondary.main,.5)),y(s.LinearProgress,"errorBg",C(ne,s.error.main,.5)),y(s.LinearProgress,"infoBg",C(ne,s.info.main,.5)),y(s.LinearProgress,"successBg",C(ne,s.success.main,.5)),y(s.LinearProgress,"warningBg",C(ne,s.warning.main,.5)),y(s.Skeleton,"bg",_?C(Ke,s.text.primary,.13):`rgba(${$("palette-text-primaryChannel")} / 0.13)`),y(s.Slider,"primaryTrack",C(ne,s.primary.main,.5)),y(s.Slider,"secondaryTrack",C(ne,s.secondary.main,.5)),y(s.Slider,"errorTrack",C(ne,s.error.main,.5)),y(s.Slider,"infoTrack",C(ne,s.info.main,.5)),y(s.Slider,"successTrack",C(ne,s.success.main,.5)),y(s.Slider,"warningTrack",C(ne,s.warning.main,.5));const N=_?C(oe,s.background.default,.985):Vr(s.background.default,.98);y(s.SnackbarContent,"bg",N),y(s.SnackbarContent,"color",Ne(()=>_?Cn.text.primary:s.getContrastText(N))),y(s.SpeedDialAction,"fabHoverBg",Vr(s.background.paper,.15)),y(s.StepConnector,"border",$("palette-grey-600")),y(s.StepContent,"border",$("palette-grey-600")),y(s.Switch,"defaultColor",$("palette-grey-300")),y(s.Switch,"defaultDisabledColor",$("palette-grey-600")),y(s.Switch,"primaryDisabledColor",C(ne,s.primary.main,.55)),y(s.Switch,"secondaryDisabledColor",C(ne,s.secondary.main,.55)),y(s.Switch,"errorDisabledColor",C(ne,s.error.main,.55)),y(s.Switch,"infoDisabledColor",C(ne,s.info.main,.55)),y(s.Switch,"successDisabledColor",C(ne,s.success.main,.55)),y(s.Switch,"warningDisabledColor",C(ne,s.warning.main,.55)),y(s.TableCell,"border",C(ne,C(Ke,s.divider,1),.68)),y(s.Tooltip,"bg",C(Ke,s.grey[700],.92))}Fe(s.background,"default"),Fe(s.background,"paper"),Fe(s.common,"background"),Fe(s.common,"onBackground"),Fe(s,"divider"),Object.keys(s).forEach(N=>{const G=s[N];N!=="tonalOffset"&&G&&typeof G=="object"&&(G.main&&y(s[N],"mainChannel",hr(gr(G.main))),G.light&&y(s[N],"lightChannel",hr(gr(G.light))),G.dark&&y(s[N],"darkChannel",hr(gr(G.dark))),G.contrastText&&y(s[N],"contrastTextChannel",hr(gr(G.contrastText))),N==="text"&&(Fe(s[N],"primary"),Fe(s[N],"secondary")),N==="action"&&(G.active&&Fe(s[N],"active"),G.selected&&Fe(s[N],"selected")))})}),I=r.reduce((ie,s)=>$e(ie,s),I);const re={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:l,getSelector:hs(I),enableContrastVars:a},{vars:ce,generateThemeVars:X,generateStyleSheets:ue}=Di(I,re);return I.vars=ce,Object.entries(I.colorSchemes[I.defaultColorScheme]).forEach(([ie,s])=>{I[ie]=s}),I.generateThemeVars=X,I.generateStyleSheets=ue,I.generateSpacing=function(){return ln(m.spacing,nt(this))},I.getColorSchemeSelector=Fi(d),I.spacing=I.generateSpacing(),I.shouldSkipGeneratingVar=l,I.unstable_sxConfig={...Ir,...m?.unstable_sxConfig},I.unstable_sx=function(s){return Ze({sx:s,theme:this})},I.toRuntimeSource=_n,I}function kn(e,r,t){e.colorSchemes&&t&&(e.colorSchemes[r]={...t!==!0&&t,palette:pt({...t===!0?{}:t.palette,mode:r})})}function In(e={},...r){const{palette:t,cssVariables:n=!1,colorSchemes:o=t?void 0:{light:!0},defaultColorScheme:i=t?.mode,...a}=e,l=i||"light",d=o?.[l],h={...o,...t?{[l]:{...typeof d!="boolean"&&d,palette:t}}:void 0};if(n===!1){if(!("colorSchemes"in e))return ht(e,...r);let m=t;"palette"in e||h[l]&&(h[l]!==!0?m=h[l].palette:l==="dark"&&(m={mode:"dark"}));const g=ht({...e,palette:m},...r);return g.defaultColorScheme=l,g.colorSchemes=h,g.palette.mode==="light"&&(g.colorSchemes.light={...h.light!==!0&&h.light,palette:g.palette},kn(g,"dark",h.dark)),g.palette.mode==="dark"&&(g.colorSchemes.dark={...h.dark!==!0&&h.dark,palette:g.palette},kn(g,"light",h.light)),g}return!t&&!("light"in h)&&l==="light"&&(h.light=!0),bs({...a,colorSchemes:h,defaultColorScheme:l,...typeof n!="boolean"&&n},...r)}const vs=In(),xs="$$material";function Ss(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Cs=Si({themeId:xs,defaultTheme:vs,rootShouldForwardProp:e=>Ss(e)&&e!=="classes"}),Ts=ki;process.env.NODE_ENV!=="production"&&(Q.node,Q.object.isRequired);function Es(e){return Ai(e)}function ws(e){return st("MuiSvgIcon",e)}yi("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Ps=e=>{const{color:r,fontSize:t,classes:n}=e,o={root:["root",r!=="inherit"&&`color${Ge(r)}`,`fontSize${Ge(t)}`]};return so(o,ws,n)},$s=Cs("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,t.color!=="inherit"&&r[`color${Ge(t.color)}`],r[`fontSize${Ge(t.fontSize)}`]]}})(Ts(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:r=>!r.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,r])=>r&&r.main).map(([r])=>({props:{color:r},style:{color:(e.vars??e).palette?.[r]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Wr=Y.forwardRef(function(r,t){const n=Es({props:r,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:l="svg",fontSize:d="medium",htmlColor:h,inheritViewBox:m=!1,titleAccess:g,viewBox:b="0 0 24 24",...T}=n,E=Y.isValidElement(o)&&o.type==="svg",u={...n,color:a,component:l,fontSize:d,instanceFontSize:r.fontSize,inheritViewBox:m,viewBox:b,hasSvgAsChild:E},O={};m||(O.viewBox=b);const A=Ps(u);return f.jsxs($s,{as:l,className:qt(A.root,i),focusable:"false",color:h,"aria-hidden":g?void 0:!0,role:g?"img":void 0,ref:t,...O,...T,...E&&o.props,ownerState:u,children:[E?o.props.children:o,g?f.jsx("title",{children:g}):null]})});process.env.NODE_ENV!=="production"&&(Wr.propTypes={children:Q.node,classes:Q.object,className:Q.string,color:Q.oneOfType([Q.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),Q.string]),component:Q.elementType,fontSize:Q.oneOfType([Q.oneOf(["inherit","large","medium","small"]),Q.string]),htmlColor:Q.string,inheritViewBox:Q.bool,shapeRendering:Q.string,sx:Q.oneOfType([Q.arrayOf(Q.oneOfType([Q.func,Q.object,Q.bool])),Q.func,Q.object]),titleAccess:Q.string,viewBox:Q.string}),Wr.muiName="SvgIcon";function ir(e,r){function t(n,o){return f.jsx(Wr,{"data-testid":process.env.NODE_ENV!=="production"?`${r}Icon`:void 0,ref:o,...n,children:e})}return process.env.NODE_ENV!=="production"&&(t.displayName=`${r}Icon`),t.muiName=Wr.muiName,Y.memo(Y.forwardRef(t))}const Os=ir(f.jsx("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2m0 14H4v-6h16zm0-10H4V6h16z"}),"CreditCard"),Nn=ir(f.jsx("path",{d:"M15 21h-2v-2h2zm-2-7h-2v5h2zm8-2h-2v4h2zm-2-2h-2v2h2zM7 12H5v2h2zm-2-2H3v2h2zm7-5h2V3h-2zm-7.5-.5v3h3v-3zM9 9H3V3h6zm-4.5 7.5v3h3v-3zM9 21H3v-6h6zm7.5-16.5v3h3v-3zM21 9h-6V3h6zm-2 10v-3h-4v2h2v3h4v-2zm-2-7h-4v2h4zm-4-2H7v2h2v2h2v-2h2zm1-1V7h-2V5h-2v4zM6.75 5.25h-1.5v1.5h1.5zm0 12h-1.5v1.5h1.5zm12-12h-1.5v1.5h1.5z"}),"QrCode2"),_s=ir(f.jsx("path",{d:"M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2zm-9-2h10V8H12zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"AccountBalanceWallet"),Rs=ir(f.jsx("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"}),"Apple"),js=ir(f.jsx("path",{d:"M12.545,10.239v3.821h5.445c-0.712,2.315-2.647,3.972-5.445,3.972c-3.332,0-6.033-2.701-6.033-6.032s2.701-6.032,6.033-6.032c1.498,0,2.866,0.549,3.921,1.453l2.814-2.814C17.503,2.988,15.139,2,12.545,2C7.021,2,2.543,6.477,2.543,12s4.478,10,10.002,10c8.396,0,10.249-7.85,9.426-11.748L12.545,10.239z"}),"Google"),we={primary:"#6C4CE7",primaryHover:"#5a3ed4",ink:"#111827",muted:"#6b7280",bg:"#f6f7fb",surface:"#ffffff",border:"#e5e7eb",ring:"rgba(108,76,231,.25)"},yt=In({palette:{mode:"light",primary:{main:we.primary},text:{primary:we.ink,secondary:we.muted},background:{default:we.bg,paper:we.surface}},shape:{borderRadius:10},typography:{fontFamily:'"Inter","Segoe UI",Roboto,Ubuntu,Helvetica,Arial,sans-serif',h6:{fontWeight:700},button:{textTransform:"none",fontWeight:700}},components:{MuiCard:{styleOverrides:{root:{border:`1px solid ${we.border}`,boxShadow:"0 10px 30px rgba(2,6,23,.06)"}}},MuiTextField:{defaultProps:{size:"medium"}},MuiOutlinedInput:{styleOverrides:{root:{background:"#fff","& fieldset":{borderColor:we.border},"&:hover fieldset":{borderColor:we.primary},"&.Mui-focused fieldset":{borderColor:we.primary,boxShadow:`0 0 0 3px ${we.ring}`}},input:{paddingTop:14,paddingBottom:14}}},MuiButton:{styleOverrides:{root:{borderRadius:12,paddingBlock:14},containedPrimary:{boxShadow:"0 10px 24px rgba(108,76,231,.22)"}}},MuiDivider:{styleOverrides:{root:{borderColor:we.border}}}}}),gt=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"});function Lr({amount:e,merchantName:r,sticky:t,items:n=[]}){return f.jsx(p.Card,{elevation:0,sx:{background:"#f9fafb",border:`1px solid ${we.border}`,position:t?"sticky":"static",top:24},children:f.jsxs(p.CardContent,{children:[f.jsx(p.Typography,{variant:"subtitle2",color:"text.secondary",sx:{mb:1},children:r}),f.jsx(p.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Enviou uma solicitação de pagamento"}),f.jsx(p.Divider,{sx:{mb:2}}),f.jsx(p.Typography,{variant:"body2",color:"text.primary",sx:{mb:.5},children:"Descrição do produto ou serviço"}),n.length>0?f.jsx(p.Stack,{spacing:1.2,sx:{mb:1},children:n.map((o,i)=>{const a=o.quantity??1,l=o.unitPrice*a;return f.jsxs(p.Stack,{direction:"row",justifyContent:"space-between",children:[f.jsxs(p.Typography,{variant:"body2",color:"text.secondary",children:[a>1?`${a}× `:"",o.name]}),f.jsx(p.Typography,{variant:"body2",children:gt.format(l)})]},o.id??`${o.name}-${i}`)})}):f.jsxs(p.Stack,{direction:"row",justifyContent:"space-between",sx:{mb:1},children:[f.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"(1) Pagamento"}),f.jsx(p.Typography,{variant:"body2",children:gt.format(e)})]}),f.jsx(p.Divider,{sx:{my:2}}),f.jsxs(p.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[f.jsx(p.Typography,{variant:"h5",sx:{fontWeight:800},children:"Valor total"}),f.jsx(p.Typography,{variant:"h5",sx:{fontWeight:800},children:gt.format(e)})]}),f.jsx(p.Typography,{variant:"caption",color:"text.secondary",sx:{display:"block",mt:2,textAlign:"center"},children:"Desenvolvido por SuportePOS | Pagamento Seguro"})]})})}function bt(e){if(e=e.replace(/\D/g,""),!e||e.length!==11||/^(\d)\1{10}$/.test(e))return!1;let r=0;for(let n=0;n<9;n++)r+=parseInt(e[n])*(10-n);let t=r*10%11;if((t===10||t===11)&&(t=0),t!==parseInt(e[9]))return!1;r=0;for(let n=0;n<10;n++)r+=parseInt(e[n])*(11-n);return t=r*10%11,(t===10||t===11)&&(t=0),t===parseInt(e[10])}function vt(e){if(e=e.replace(/\D/g,""),!e||e.length!==14||/^(\d)\1{13}$/.test(e))return!1;let r=e.length-2,t=e.substring(0,r),n=e.substring(r),o=0,i=r-7;for(let l=r;l>=1;l--)o+=parseInt(t[r-l])*i--,i<2&&(i=9);let a=o%11<2?0:11-o%11;if(a!==parseInt(n[0]))return!1;r=r+1,t=e.substring(0,r),o=0,i=r-7;for(let l=r;l>=1;l--)o+=parseInt(t[r-l])*i--,i<2&&(i=9);return a=o%11<2?0:11-o%11,a===parseInt(n[1])}function xt(e){return/^[A-Z0-9]{6,9}$/i.test(e.trim())}const As=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}),ks=["AC","AL","AP","AM","BA","CE","DF","ES","GO","MA","MT","MS","MG","PA","PB","PR","PE","PI","RJ","RN","RS","RO","RR","SC","SP","SE","TO"];function Mn({merchantId:e,amount:r,splits:t,summaryItems:n,merchantName:o,customer:i,installmentsOptions:a=[1,2,3,6,10,12],onBack:l,onResponse:d}){const h=p.useMediaQuery("(max-width:900px)"),[m,g]=Y.useState("card"),[b,T]=Y.useState(""),[E,u]=Y.useState(""),[O,A]=Y.useState(""),[k,V]=Y.useState(""),[_,S]=Y.useState(1),[I,re]=Y.useState(""),[ce,X]=Y.useState(i?.cep??""),[ue,ie]=Y.useState(i?.address??""),[s,$]=Y.useState(i?.number??""),[C,N]=Y.useState(i?.complement??""),[G,pe]=Y.useState(i?.neighborhood??""),[ve,Be]=Y.useState(i?.city??""),[P,R]=Y.useState(i?.uf??""),[L,U]=Y.useState(i?.buyerName??""),[D,q]=Y.useState(i?.buyerEmail??""),[F,z]=Y.useState(i?.buyerPhone??""),[M,K]=Y.useState(i?.docType??""),[W,xe]=Y.useState(i?.docNumber??""),[v,Ce]=Y.useState({}),[je,Ae]=Y.useState(!1),Je=x=>x.replace(/\D/g,"").trim(),Ur=x=>x.replace(/\D/g,"").slice(0,6).replace(/(\d{2})(\d{0,4})/,(de,Te,ke)=>ke?`${Te}/${ke}`:Te),Yr=x=>x.replace(/\D/g,"").slice(0,8).replace(/(\d{5})(\d{1,3})?/,(de,Te,ke)=>ke?`${Te}-${ke}`:Te),sr=x=>x.replace(/\D/g,"").slice(0,11).replace(/^(\d{2})(\d{5})(\d{0,4}).*/,"($1) $2-$3").replace(/-$/,""),St=x=>x.replace(/\D/g,"").slice(0,11).replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})$/,"$1-$2"),Ct=x=>x.replace(/\D/g,"").slice(0,14).replace(/^(\d{2})(\d)/,"$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/,"$1.$2.$3").replace(/\.(\d{3})(\d)/,".$1/$2").replace(/(\d{4})(\d)/,"$1-$2"),br=x=>x.replace(/[^a-zA-Z0-9]/g,"").slice(0,9).toUpperCase();Y.useEffect(()=>{const x=document.createElement("script");return x.src="https://www.pagador.com.br/post/scripts/silentorderpost-1.0.min.js",x.async=!0,document.body.appendChild(x),x.onload=async()=>{try{const Te=await(await fetch(`http://localhost:8003/api/token-cartao?uuid=${e}`)).json();re(Te?.AccessToken)}catch(de){console.error("Erro ao buscar accessToken:",de)}},()=>{document.body.removeChild(x)}},[]);function Tt(){const x={};return b.replace(/\D/g,"").length<15&&(x.cardNumber="Número inválido"),E.trim()||(x.holderName="Informe o nome"),/^\d{2}\/\d{4}$/.test(O)||(x.expiry="Use MM/AAAA"),/^\d{3,4}$/.test(k)||(x.cvv="CVV inválido"),Ce(x),Object.keys(x).length===0}function Et(){const x={};return(!ce||!/^\d{5}-?\d{3}$/.test(ce))&&(x.cep="CEP inválido"),ue.trim()||(x.address="Informe o endereço"),s.trim()||(x.number="O campo Número é obrigatório"),G.trim()||(x.neighborhood="O campo Bairro é obrigatório"),ve.trim()||(x.city="Informe a cidade"),P||(x.uf="Selecione o estado (UF)"),Ce(x),Object.keys(x).length===0}function Gr(){const x={};return L.trim()||(x.buyerName="Informe o nome"),/^\S+@\S+\.\S+$/.test(D)||(x.buyerEmail="E-mail inválido"),F.replace(/\D/g,"").length<10&&(x.buyerPhone="Telefone inválido"),M||(x.docType="Selecione o tipo de documento"),L.trim()||(x.buyerName="Informe o nome"),/^\S+@\S+\.\S+$/.test(D)||(x.buyerEmail="E-mail inválido"),F.replace(/\D/g,"").length<10&&(x.buyerPhone="Telefone inválido"),M||(x.docType="Selecione o tipo de documento"),W.trim()?(M==="CPF"&&!bt(W)&&(x.docNumber="CPF inválido"),M==="CNPJ"&&!vt(W)&&(x.docNumber="CNPJ inválido"),M==="PASSAPORTE"&&!xt(W)&&(x.docNumber="Passaporte inválido")):x.docNumber="Informe o número do documento",Ce(x),Object.keys(x).length===0}const qr=()=>Tt()&&g("billing"),Hr=()=>Et()&&g("buyer"),wt=async x=>{const de=Yr(x);X(de);const Te=de.replace(/\D/g,"");if(Te.length===8)try{const Ue=await(await fetch(`http://localhost:8003/api/cep/${Te}?uuid=${e}`)).json();Ue.error||(ie(Ue.street||""),pe(Ue.neighborhood||""),Be(Ue.city||""),R(Ue.state||""),N(Ue.complement||""))}catch(ke){console.error("Erro ao buscar CEP:",ke)}},Kr=async()=>{if(!Gr())return;Ae(!0);const x={accessToken:I,environment:"sandbox",language:"PT",enableBinQuery:!1,enableVerifyCard:!1,enableTokenize:!1,cvvrequired:!0,onSuccess:async de=>{try{const ke=await(await fetch("http://localhost:8003/api/pagar",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uuid:e,paymentToken:de.CardToken??de.PaymentToken,amount:r,installments:_,buyerName:L,buyerEmail:D,buyerPhone:F,docType:M,docNumber:W,splits:t,cep:ce,address:ue,number:s,complement:C,neighborhood:G,city:ve,state:P})})).json();d?.(ke)}catch(Te){console.error("Erro chamando backend:",Te),d?.({success:!1,message:"Erro ao comunicar backend"})}finally{Ae(!1)}},onError:de=>{console.error("Erro SOP:",de),d?.({success:!1,message:"Erro SOP"}),Ae(!1)},onInvalid:de=>{console.warn("Campos inválidos:",de),d?.({success:!1,message:"Campos inválidos"}),Ae(!1)}};window.bpSop_silentOrderPost(x)};return f.jsx(p.ThemeProvider,{theme:yt,children:f.jsx(p.Box,{sx:{bgcolor:"background.default",minHeight:"100vh"},children:f.jsx(p.Container,{maxWidth:"lg",children:f.jsxs(p.Grid,{container:!0,spacing:3,children:[f.jsx(p.Grid,{item:!0,xs:12,md:7,size:7,children:f.jsx(p.Card,{elevation:0,sx:{border:"1px solid #e2e8f0"},children:f.jsxs(p.CardContent,{children:[f.jsx(p.Box,{sx:{display:m==="card"?"block":"none"},children:f.jsxs(f.Fragment,{children:[f.jsx(p.Typography,{variant:"h6",sx:{mb:2},children:"Pagamento com cartão de crédito"}),f.jsxs(p.Stack,{spacing:2,children:[f.jsx(p.TextField,{label:"Número do cartão",value:b,onChange:x=>T(Je(x.target.value)),error:!!v.cardNumber,inputProps:{className:"bp-sop-cardnumber",maxLength:19,inputMode:"numeric"},helperText:v.cardNumber,fullWidth:!0}),f.jsx(p.TextField,{label:"Nome como está no cartão",value:E,onChange:x=>u(x.target.value),error:!!v.holderName,helperText:v.holderName,inputProps:{className:"bp-sop-cardholdername"},fullWidth:!0}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,children:[f.jsx(p.TextField,{label:"Vencimento",placeholder:"MM/AAAA",value:O,onChange:x=>A(Ur(x.target.value)),error:!!v.expiry,helperText:v.expiry,inputProps:{className:"bp-sop-cardexpirationdate",maxLength:7},fullWidth:!0}),f.jsx(p.TextField,{label:"CVV",value:k,onChange:x=>V(x.target.value.replace(/\D/g,"").slice(0,4)),error:!!v.cvv,helperText:v.cvv,inputProps:{className:"bp-sop-cardcvv",maxLength:4,inputMode:"numeric"},fullWidth:!0})]}),f.jsxs(p.FormControl,{fullWidth:!0,children:[f.jsx(p.InputLabel,{children:"Quantidade de Parcelas"}),f.jsx(p.Select,{label:"Quantidade de Parcelas",value:_,onChange:x=>S(Number(x.target.value)),children:a.map(x=>f.jsxs(p.MenuItem,{value:x,children:[x,"x de R$ ",As.format(r/x)]},x))}),f.jsx(p.FormHelperText,{children:"Informe o número do cartão para verificar o valor das parcelas"})]}),f.jsx("input",{type:"hidden",className:"bp-sop-cardtype",value:"CreditCard"}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,sx:{mt:1},children:[f.jsx(p.Button,{variant:"outlined",onClick:l,fullWidth:!0,sx:{py:1.4},children:"Voltar"}),f.jsx(p.Button,{variant:"contained",onClick:qr,disabled:je,fullWidth:!0,sx:{py:1.4},children:"Continuar"})]})]})]})}),f.jsx(p.Box,{sx:{display:m==="billing"?"block":"none"},children:f.jsxs(f.Fragment,{children:[f.jsx(p.Typography,{variant:"h6",sx:{mb:2},children:"Endereço de cobrança"}),f.jsxs(p.Stack,{spacing:2,children:[f.jsx(p.Stack,{direction:"row",spacing:2,alignItems:"flex-start",children:f.jsx(p.TextField,{label:"CEP",placeholder:"00000-000",value:ce,onChange:x=>wt(x.target.value),error:!!v.cep,helperText:v.cep,fullWidth:!0})}),f.jsx(p.TextField,{label:"Endereço",value:ue,onChange:x=>ie(x.target.value),error:!!v.address,helperText:v.address,fullWidth:!0}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,children:[f.jsx(p.TextField,{label:"Número",value:s,onChange:x=>$(x.target.value),error:!!v.number,helperText:v.number,fullWidth:!0}),f.jsx(p.TextField,{label:"Complemento",value:C,onChange:x=>N(x.target.value),fullWidth:!0})]}),f.jsx(p.TextField,{label:"Bairro",value:G,onChange:x=>pe(x.target.value),error:!!v.neighborhood,helperText:v.neighborhood,fullWidth:!0}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,children:[f.jsx(p.TextField,{label:"Cidade",value:ve,onChange:x=>Be(x.target.value),error:!!v.city,helperText:v.city,fullWidth:!0}),f.jsxs(p.FormControl,{fullWidth:!0,error:!!v.uf,children:[f.jsx(p.InputLabel,{children:"Estado"}),f.jsx(p.Select,{label:"Estado",value:P,onChange:x=>R(String(x.target.value)),children:ks.map(x=>f.jsx(p.MenuItem,{value:x,children:x},x))}),f.jsx(p.FormHelperText,{children:v.uf})]})]}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,sx:{mt:1},children:[f.jsx(p.Button,{variant:"outlined",onClick:()=>g("card"),fullWidth:!0,sx:{py:1.4},children:"Voltar"}),f.jsx(p.Button,{variant:"contained",onClick:Hr,fullWidth:!0,sx:{py:1.4},disabled:je||!ce||!!v.cep||!ue||!s||!G||!ve||!P,children:"Continuar"})]})]})]})}),f.jsx(p.Box,{sx:{display:m==="buyer"?"block":"none"},children:f.jsxs(f.Fragment,{children:[f.jsx(p.Typography,{variant:"h6",sx:{mb:2},children:"Falta pouco! Insira seus dados antes de concluir"}),f.jsxs(p.Stack,{spacing:2,children:[f.jsx(p.TextField,{label:"Nome Completo",value:L,onChange:x=>U(x.target.value),error:!!v.buyerName,helperText:v.buyerName,fullWidth:!0}),f.jsx(p.TextField,{label:"E-mail",value:D,onChange:x=>q(x.target.value),error:!!v.buyerEmail,helperText:v.buyerEmail,fullWidth:!0}),f.jsx(p.TextField,{label:"Celular",value:F,onChange:x=>z(sr(x.target.value)),error:!!v.buyerPhone,helperText:v.buyerPhone,fullWidth:!0}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,children:[f.jsxs(p.FormControl,{fullWidth:!0,error:!!v.docType,children:[f.jsx(p.InputLabel,{children:"Escolha o tipo de documento"}),f.jsxs(p.Select,{label:"Escolha o tipo de documento",value:M,onChange:x=>K(x.target.value),children:[f.jsx(p.MenuItem,{value:"CPF",children:"CPF"}),f.jsx(p.MenuItem,{value:"CNPJ",children:"CNPJ"}),f.jsx(p.MenuItem,{value:"PASSAPORTE",children:"Passaporte"})]}),f.jsx(p.FormHelperText,{children:v.docType})]}),f.jsx(p.TextField,{label:"Número do documento",value:W,onChange:x=>{let de=x.target.value;M==="CPF"&&(de=St(de)),M==="CNPJ"&&(de=Ct(de)),M==="PASSAPORTE"&&(de=br(de)),xe(de)},error:!!v.docNumber,helperText:v.docNumber,fullWidth:!0})]}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,sx:{mt:1},children:[f.jsx(p.Button,{variant:"outlined",disabled:je,onClick:()=>g("billing"),fullWidth:!0,sx:{py:1.4},children:"Voltar"}),f.jsx(p.Button,{variant:"contained",onClick:Kr,disabled:je,fullWidth:!0,sx:{py:1.4},children:je?"Processando...":"Concluir compra"})]})]})]})})]})})}),f.jsx(p.Grid,{item:!0,xs:12,md:5,size:5,children:f.jsx(Lr,{amount:r,merchantName:o,sticky:!h,items:n})})]})})})})}const Is=ir(f.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy");function Dn({merchantId:e,amount:r,merchantName:t="SUPORTEPOS",summaryItems:n,splits:o,customer:i,onBack:a,onResponse:l}){const d=p.useMediaQuery("(max-width:900px)"),[h,m]=Y.useState(!1),[g,b]=Y.useState(i?.buyerName??""),[T,E]=Y.useState(i?.docType??""),[u,O]=Y.useState(i?.docNumber??""),[A,k]=Y.useState({}),[V,_]=Y.useState(!1),[S,I]=Y.useState(null),re=$=>$.replace(/\D/g,"").slice(0,11).replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})$/,"$1-$2"),ce=$=>$.replace(/\D/g,"").slice(0,14).replace(/^(\d{2})(\d)/,"$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/,"$1.$2.$3").replace(/\.(\d{3})(\d)/,".$1/$2").replace(/(\d{4})(\d)/,"$1-$2"),X=$=>$.replace(/[^a-zA-Z0-9]/g,"").slice(0,9).toUpperCase(),ue=()=>{const $={};return g.trim()||($.buyerName="Informe o nome"),T||($.docType="Selecione o tipo de documento"),u.trim()?(T==="CPF"&&!bt(u)&&($.docNumber="CPF inválido"),T==="CNPJ"&&!vt(u)&&($.docNumber="CNPJ inválido"),T==="PASSAPORTE"&&!xt(u)&&($.docNumber="Passaporte inválido")):$.docNumber="Informe o número do documento",k($),Object.keys($).length===0},ie=async()=>{if(ue()){_(!0);try{const C=await(await fetch("http://localhost:8003/api/pix",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uuid:e,amount:r,buyerName:g,docType:T,docNumber:u,splits:o})})).json();C.copyPasteCode&&C.qrCodeSrc&&I(C)}catch($){console.error("Erro ao gerar PIX:",$)}finally{_(!1)}}},s=async()=>{if(S?.copyPasteCode)try{await navigator.clipboard.writeText(S.copyPasteCode),m(!0),setTimeout(()=>m(!1),1500)}catch{}};return f.jsx(p.ThemeProvider,{theme:yt,children:f.jsx(p.Box,{sx:{bgcolor:"background.default",minHeight:"100%",py:0},children:f.jsx(p.Container,{maxWidth:"lg",children:f.jsxs(p.Grid,{container:!0,spacing:3,children:[f.jsx(p.Grid,{item:!0,xs:12,md:7,size:7,children:f.jsx(p.Card,{elevation:0,sx:{border:"1px solid #e2e8f0"},children:f.jsxs(p.CardContent,{children:[!S&&f.jsxs(f.Fragment,{children:[f.jsx(p.Typography,{variant:"h6",sx:{mb:2},children:"Preencha seus dados para gerar o PIX"}),f.jsxs(p.Stack,{spacing:2,children:[f.jsx(p.TextField,{label:"Nome Completo",value:g,onChange:$=>b($.target.value),error:!!A.buyerName,helperText:A.buyerName,fullWidth:!0}),f.jsxs(p.FormControl,{fullWidth:!0,error:!!A.docType,children:[f.jsx(p.InputLabel,{children:"Tipo de Documento"}),f.jsxs(p.Select,{value:T,onChange:$=>E($.target.value),children:[f.jsx(p.MenuItem,{value:"CPF",children:"CPF"}),f.jsx(p.MenuItem,{value:"CNPJ",children:"CNPJ"}),f.jsx(p.MenuItem,{value:"PASSAPORTE",children:"Passaporte"})]}),f.jsx(p.FormHelperText,{children:A.docType})]}),f.jsx(p.TextField,{label:"Número do Documento",value:u,onChange:$=>{let C=$.target.value;T==="CPF"&&(C=re(C)),T==="CNPJ"&&(C=ce(C)),T==="PASSAPORTE"&&(C=X(C)),O(C)},error:!!A.docNumber,helperText:A.docNumber,fullWidth:!0}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,children:[f.jsx(p.Button,{variant:"outlined",onClick:a,disabled:V,fullWidth:!0,sx:{py:1.4},children:"Voltar"}),f.jsx(p.Button,{variant:"contained",onClick:ie,disabled:V,fullWidth:!0,sx:{py:1.4},children:V?"Gerando PIX...":"Gerar PIX"})]})]})]}),S&&f.jsxs(f.Fragment,{children:[f.jsx(p.Typography,{variant:"h6",sx:{mb:2},children:"Para concluir seu pagamento escaneie o QR Code abaixo"}),f.jsx(p.Box,{sx:{border:"1px solid #e5e7eb",borderRadius:2,bgcolor:"#f8fafc",p:{xs:2,md:3},mb:3},children:f.jsx(p.Box,{sx:{width:{xs:"100%",sm:360},height:{xs:"auto",sm:360},mx:"auto",display:"flex",alignItems:"center",justifyContent:"center",bgcolor:"#fff",borderRadius:2,overflow:"hidden"},children:f.jsx("img",{alt:"QR Code PIX",src:S.qrCodeSrc,style:{width:"100%",height:"100%",objectFit:"contain"}})})}),f.jsx(p.Typography,{variant:"body2",color:"text.secondary",sx:{mb:1},children:"Código copia-e-cola"}),f.jsx(p.Box,{sx:{fontFamily:"monospace",fontSize:14,lineHeight:1.5,bgcolor:"#f8fafc",border:"1px solid #e5e7eb",borderRadius:1,p:1.5,wordBreak:"break-all",mb:1.5,userSelect:"text"},children:S.copyPasteCode}),f.jsx(p.Button,{variant:"outlined",startIcon:f.jsx(Is,{}),onClick:s,sx:{mb:2},children:h?"Copiado!":"Copiar código"}),f.jsx(p.Divider,{sx:{my:2}}),f.jsxs(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,children:[f.jsx(p.Button,{variant:"outlined",onClick:a,fullWidth:!0,sx:{py:1.4},children:"Voltar"}),f.jsx(p.Button,{variant:"contained",onClick:()=>{},fullWidth:!0,sx:{py:1.4},children:"Já paguei"})]})]})]})})}),f.jsx(p.Grid,{item:!0,xs:12,md:5,size:5,children:f.jsx(Lr,{amount:r,merchantName:t,items:n,sticky:!d})})]})})})})}function Ns({merchantId:e,products:r,customer:t,merchantName:n="SUPORTEPOS",amountOverride:o,splits:i,onResponse:a}){const[l,d]=Y.useState("select"),h=p.useMediaQuery("(max-width:900px)"),[m]=Y.useState({gpay:!1,applepay:!1,clickToPay:!1,creditCard:!0,qrCredit:!1,pix:!0}),g=Y.useMemo(()=>r.reduce((_,S)=>_+S.unitPrice*(S.quantity??1),0),[r]),b=o??g,T=()=>alert("Google Pay"),E=()=>alert("Apple Pay"),u=()=>alert("Click to Pay"),O=()=>alert("QR Crédito"),A=[];m.gpay&&A.push(f.jsx(p.Button,{fullWidth:!0,variant:"contained",onClick:T,startIcon:f.jsx(js,{}),color:"primary",sx:{py:1.4},children:"Finalizar compra com o GPay"},"gpay")),m.applepay&&A.push(f.jsx(p.Button,{fullWidth:!0,variant:"contained",onClick:E,startIcon:f.jsx(Rs,{}),color:"primary",sx:{py:1.4},children:"Pay"},"applepay"));const k=[];m.clickToPay&&k.push(f.jsxs(p.ListItemButton,{onClick:u,sx:zr,children:[f.jsx(p.ListItemIcon,{children:f.jsx(_s,{})}),f.jsx(p.ListItemText,{primary:"Click to Pay",secondary:"Pague com cartão salvo",primaryTypographyProps:{fontWeight:600}})]},"ctp")),m.creditCard&&k.push(f.jsxs(p.ListItemButton,{onClick:()=>d("card"),sx:zr,children:[f.jsx(p.ListItemIcon,{children:f.jsx(Os,{})}),f.jsx(p.ListItemText,{primary:"Cartão de crédito",secondary:"Insira os dados do cartão",primaryTypographyProps:{fontWeight:600}})]},"card")),m.qrCredit&&k.push(f.jsxs(p.ListItemButton,{onClick:O,sx:zr,children:[f.jsx(p.ListItemIcon,{children:f.jsx(Nn,{})}),f.jsx(p.ListItemText,{primary:"Qr Code Crédito",secondary:"Escaneie o QR Code",primaryTypographyProps:{fontWeight:600}})]},"qrcredit")),m.pix&&k.push(f.jsxs(p.ListItemButton,{onClick:()=>d("pix"),sx:zr,children:[f.jsx(p.ListItemIcon,{children:f.jsx(Nn,{})}),f.jsx(p.ListItemText,{primary:"PIX",secondary:"Escaneie o QR Code",primaryTypographyProps:{fontWeight:600}})]},"pix"));const V=A.length===0&&k.length===0;return f.jsx(p.ThemeProvider,{theme:yt,children:f.jsx(p.Box,{sx:{bgcolor:"background.default",minHeight:"100vh",py:4},children:f.jsx(p.Container,{maxWidth:"lg",children:l==="select"?f.jsxs(p.Grid,{container:!0,spacing:3,children:[f.jsx(p.Grid,{item:!0,xs:12,md:7,size:7,children:f.jsx(p.Card,{elevation:0,sx:{p:{xs:1,md:2},border:"1px solid #e2e8f0"},children:f.jsxs(p.CardContent,{children:[f.jsx(p.Typography,{variant:"h6",sx:{mb:2},children:"Como você quer pagar?"}),V&&f.jsx(p.Alert,{severity:"warning",sx:{mb:2},children:"Nenhum meio de pagamento está disponível no momento."}),A.length>0&&f.jsx(p.Stack,{direction:{xs:"column",sm:"row"},spacing:2,sx:{mb:2},children:A}),A.length>0&&k.length>0&&f.jsx(p.Divider,{sx:{my:1},children:f.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"ou"})}),k.length>0&&f.jsx(p.List,{sx:{mt:A.length?1:0},children:k})]})})}),f.jsx(p.Grid,{item:!0,xs:12,md:5,size:5,children:f.jsx(Lr,{amount:b,merchantName:n,sticky:!h,items:r})})]}):l==="card"?f.jsx(Mn,{merchantId:e,amount:b,splits:i,customer:t,merchantName:n,summaryItems:r,onBack:()=>d("select"),onResponse:a}):f.jsx(Dn,{merchantId:e,amount:b,splits:i,customer:t,merchantName:n,summaryItems:r,onBack:()=>d("select"),onResponse:a})})})})}const zr={border:`1px solid ${we.border}`,borderRadius:14,mb:1.5,paddingBlock:1.2,boxShadow:"0 6px 18px rgba(2,6,23,.04)","& .MuiListItemIcon-root":{minWidth:44,"& svg":{opacity:.9}},"&:hover":{backgroundColor:"#f8fafc",boxShadow:"0 12px 24px rgba(2,6,23,.06)"}};Se.CheckoutFlow=Ns,Se.OrderSummary=Lr,Se.SplitCardForm=Mn,Se.SplitPixForm=Dn,Se.brand=we,Se.isValidCNPJ=vt,Se.isValidCPF=bt,Se.isValidPassport=xt,Object.defineProperty(Se,Symbol.toStringTag,{value:"Module"})}));
|