treege 1.5.1 → 2.0.1

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +6 -2
  2. package/dist/components/DataDisplay/Tree/useTree.d.ts +1 -1
  3. package/dist/features/Treege/components/Forms/AssignValueToChildren/AssignValueToChildren.d.ts +10 -0
  4. package/dist/features/Treege/components/Forms/AssignValueToChildren/Examples/ObjectMappingExample.d.ts +2 -0
  5. package/dist/features/Treege/components/Forms/FormTreeCardMutation/FormTreeCardMutation.d.ts +3 -1
  6. package/dist/features/Treege/components/Forms/FormTreeCardMutation/useFormTreeCardMutation.d.ts +20 -9
  7. package/dist/features/Treege/components/Forms/ReceiveValueFromAncestor.d.ts +11 -0
  8. package/dist/features/Treege/components/TreeGrid/useTreeGrid.d.ts +2 -0
  9. package/dist/features/Treege/context/TreegeProvider.d.ts +5 -4
  10. package/dist/features/Treege/reducer/treeReducer.d.ts +20 -19
  11. package/dist/locales/en/form-en.d.ts +17 -2
  12. package/dist/locales/fr/form-fr.d.ts +19 -4
  13. package/dist/main.js +5332 -5583
  14. package/dist/main.umd.cjs +37 -39
  15. package/dist/utils/tree/appendNode/appendNode.d.ts +2 -2
  16. package/dist/utils/tree/getAllAncestorFromTree/getAllAncestorFromTree.d.ts +12 -0
  17. package/dist/utils/tree/index.d.ts +2 -3
  18. package/dist/utils/tree/removeNode/removeNode.d.ts +3 -3
  19. package/dist/utils/tree/removeNode/test/mock.d.ts +3 -1
  20. package/dist/utils/tree/updateNodeInTree/updateNodeInTree.d.ts +3 -3
  21. package/package.json +24 -23
  22. package/dist/context/Snackbar/SnackbarContext.d.ts +0 -19
  23. package/dist/context/Snackbar/SnackbarProvider.d.ts +0 -6
  24. package/dist/context/Snackbar/snackbarReducer.d.ts +0 -23
  25. package/dist/features/Treege/components/Feedback/DynamicSelectWarning/DynamicSelectWarning.d.ts +0 -5
  26. package/dist/features/Treege/components/Feedback/DynamicSelectWarning/index.d.ts +0 -3
  27. package/dist/features/Treege/components/Feedback/EndPointWarning/index.d.ts +0 -3
  28. package/dist/features/Treege/components/Inputs/DynamicSelectFieldFromTree/DynamicSelectFieldFromTree.d.ts +0 -8
  29. package/dist/features/Treege/components/Inputs/DynamicSelectFieldFromTree/index.d.ts +0 -3
  30. package/dist/features/Treege/components/Inputs/FieldSelectAutocompleteCreatable/index.d.ts +0 -3
  31. package/dist/hooks/useSnackbar/index.d.ts +0 -3
  32. package/dist/hooks/useSnackbar/useSnackbar.d.ts +0 -6
  33. package/dist/utils/tree/getAllAncestorNamesFromTree/getAllAncestorNamesFromTree.d.ts +0 -8
  34. package/dist/utils/tree/getAllNamesFromTree/getAllNamesFromTree.d.ts +0 -7
  35. package/dist/utils/tree/getAllNamesFromTree/test/mock.d.ts +0 -11
  36. /package/dist/features/Treege/components/Feedback/{EndPointWarning/EndPointWarning.d.ts → EndPointWarning.d.ts} +0 -0
  37. /package/dist/features/Treege/components/Inputs/{FieldSelectAutocompleteCreatable/FieldSelectAutocompleteCreatable.d.ts → FieldSelectAutocompleteCreatable.d.ts} +0 -0
  38. /package/dist/utils/tree/{getAllAncestorNamesFromTree → getAllAncestorFromTree}/test/mock.d.ts +0 -0
package/dist/main.umd.cjs CHANGED
@@ -1,54 +1,46 @@
1
- (function(Me,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("react"),require("@tanstack/react-query"),require("axios"),require("@tracktor/design-system"),require("react-d3-tree"),require("react-i18next"),require("@codemirror/lang-json"),require("@uiw/codemirror-theme-dracula"),require("@uiw/react-codemirror"),require("i18next"),require("i18next-browser-languagedetector")):typeof define=="function"&&define.amd?define(["exports","react","@tanstack/react-query","axios","@tracktor/design-system","react-d3-tree","react-i18next","@codemirror/lang-json","@uiw/codemirror-theme-dracula","@uiw/react-codemirror","i18next","i18next-browser-languagedetector"],_):(Me=typeof globalThis<"u"?globalThis:Me||self,_(Me.treege={},Me.React,Me.reactQuery,Me.axios,Me.tracktorDesignSystem,Me.ReactD3Tree,Me.reactI18next,Me.codemirrorLangJson,Me.codemirrorThemeDracula,Me.reactCodemirror,Me.i18next,Me.i18nextBrowserLanguageDetector))})(this,function(Me,_,Dt,It,p,Vi,Pe,qi,zi,Ni,Ht,Ui){"use strict";function Wi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const q=Wi(_);function Yi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ut(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}),n}var En={exports:{}},er={};/**
1
+ (function(Ce,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("@tanstack/react-query"),require("@tracktor/design-system"),require("axios"),require("react-d3-tree"),require("react-i18next"),require("@codemirror/lang-json"),require("@uiw/codemirror-theme-dracula"),require("@uiw/react-codemirror"),require("@mui/icons-material"),require("i18next"),require("i18next-browser-languagedetector")):typeof define=="function"&&define.amd?define(["exports","react","@tanstack/react-query","@tracktor/design-system","axios","react-d3-tree","react-i18next","@codemirror/lang-json","@uiw/codemirror-theme-dracula","@uiw/react-codemirror","@mui/icons-material","i18next","i18next-browser-languagedetector"],S):(Ce=typeof globalThis<"u"?globalThis:Ce||self,S(Ce.treege={},Ce.React,Ce.reactQuery,Ce.tracktorDesignSystem,Ce.axios,Ce.ReactD3Tree,Ce.reactI18next,Ce.codemirrorLangJson,Ce.codemirrorThemeDracula,Ce.reactCodemirror,Ce.iconsMaterial,Ce.i18next,Ce.i18nextBrowserLanguageDetector))})(this,function(Ce,S,ft,d,pt,po,we,ho,mo,bo,kn,At,go){"use strict";function yo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ke=yo(S);function xo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var er={exports:{}},Ot={};/**
2
2
  * @license React
3
- * react-jsx-runtime.production.min.js
3
+ * react-jsx-runtime.production.js
4
4
  *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Ua;function Ki(){if(Ua)return er;Ua=1;var e=_,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(l,c,f){var h,m={},b=null,g=null;f!==void 0&&(b=""+f),c.key!==void 0&&(b=""+c.key),c.ref!==void 0&&(g=c.ref);for(h in c)r.call(c,h)&&!o.hasOwnProperty(h)&&(m[h]=c[h]);if(l&&l.defaultProps)for(h in c=l.defaultProps,c)m[h]===void 0&&(m[h]=c[h]);return{$$typeof:t,type:l,key:b,ref:g,props:m,_owner:a.current}}return er.Fragment=n,er.jsx=s,er.jsxs=s,er}var tr={};/**
9
+ */var En;function vo(){if(En)return Ot;En=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,o){var s=null;if(o!==void 0&&(s=""+o),a.key!==void 0&&(s=""+a.key),"key"in a){o={};for(var l in a)l!=="key"&&(o[l]=a[l])}else o=a;return a=o.ref,{$$typeof:e,type:n,key:s,ref:a!==void 0?a:null,props:o}}return Ot.Fragment=t,Ot.jsx=r,Ot.jsxs=r,Ot}var Rt={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Wa;function Gi(){return Wa||(Wa=1,process.env.NODE_ENV!=="production"&&function(){var e=_,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),v=Symbol.iterator,u="@@iterator";function y(d){if(d===null||typeof d!="object")return null;var T=v&&d[v]||d[u];return typeof T=="function"?T:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(d){{for(var T=arguments.length,R=new Array(T>1?T-1:0),I=1;I<T;I++)R[I-1]=arguments[I];$("error",d,R)}}function $(d,T,R){{var I=w.ReactDebugCurrentFrame,Z=I.getStackAddendum();Z!==""&&(T+="%s",R=R.concat([Z]));var oe=R.map(function(J){return String(J)});oe.unshift("Warning: "+T),Function.prototype.apply.call(console[d],console,oe)}}var M=!1,x=!1,A=!1,F=!1,be=!1,Ie;Ie=Symbol.for("react.module.reference");function ee(d){return!!(typeof d=="string"||typeof d=="function"||d===r||d===o||be||d===a||d===f||d===h||F||d===g||M||x||A||typeof d=="object"&&d!==null&&(d.$$typeof===b||d.$$typeof===m||d.$$typeof===s||d.$$typeof===l||d.$$typeof===c||d.$$typeof===Ie||d.getModuleId!==void 0))}function te(d,T,R){var I=d.displayName;if(I)return I;var Z=T.displayName||T.name||"";return Z!==""?R+"("+Z+")":R}function he(d){return d.displayName||"Context"}function de(d){if(d==null)return null;if(typeof d.tag=="number"&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case a:return"StrictMode";case f:return"Suspense";case h:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case l:var T=d;return he(T)+".Consumer";case s:var R=d;return he(R._context)+".Provider";case c:return te(d,d.render,"ForwardRef");case m:var I=d.displayName||null;return I!==null?I:de(d.type)||"Memo";case b:{var Z=d,oe=Z._payload,J=Z._init;try{return de(J(oe))}catch{return null}}}return null}var se=Object.assign,Be=0,Te,ce,Ve,tt,E,S,z;function N(){}N.__reactDisabledLog=!0;function P(){{if(Be===0){Te=console.log,ce=console.info,Ve=console.warn,tt=console.error,E=console.group,S=console.groupCollapsed,z=console.groupEnd;var d={configurable:!0,enumerable:!0,value:N,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}Be++}}function Y(){{if(Be--,Be===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:se({},d,{value:Te}),info:se({},d,{value:ce}),warn:se({},d,{value:Ve}),error:se({},d,{value:tt}),group:se({},d,{value:E}),groupCollapsed:se({},d,{value:S}),groupEnd:se({},d,{value:z})})}Be<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var D=w.ReactCurrentDispatcher,V;function B(d,T,R){{if(V===void 0)try{throw Error()}catch(Z){var I=Z.stack.trim().match(/\n( *(at )?)/);V=I&&I[1]||""}return`
18
- `+V+d}}var G=!1,U;{var je=typeof WeakMap=="function"?WeakMap:Map;U=new je}function O(d,T){if(!d||G)return"";{var R=U.get(d);if(R!==void 0)return R}var I;G=!0;var Z=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var oe;oe=D.current,D.current=null,P();try{if(T){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(Fe){I=Fe}Reflect.construct(d,[],J)}else{try{J.call()}catch(Fe){I=Fe}d.call(J.prototype)}}else{try{throw Error()}catch(Fe){I=Fe}d()}}catch(Fe){if(Fe&&I&&typeof Fe.stack=="string"){for(var K=Fe.stack.split(`
19
- `),Ae=I.stack.split(`
20
- `),me=K.length-1,ve=Ae.length-1;me>=1&&ve>=0&&K[me]!==Ae[ve];)ve--;for(;me>=1&&ve>=0;me--,ve--)if(K[me]!==Ae[ve]){if(me!==1||ve!==1)do if(me--,ve--,ve<0||K[me]!==Ae[ve]){var ze=`
21
- `+K[me].replace(" at new "," at ");return d.displayName&&ze.includes("<anonymous>")&&(ze=ze.replace("<anonymous>",d.displayName)),typeof d=="function"&&U.set(d,ze),ze}while(me>=1&&ve>=0);break}}}finally{G=!1,D.current=oe,Y(),Error.prepareStackTrace=Z}var bt=d?d.displayName||d.name:"",lt=bt?B(bt):"";return typeof d=="function"&&U.set(d,lt),lt}function ke(d,T,R){return O(d,!1)}function He(d){var T=d.prototype;return!!(T&&T.isReactComponent)}function Ue(d,T,R){if(d==null)return"";if(typeof d=="function")return O(d,He(d));if(typeof d=="string")return B(d);switch(d){case f:return B("Suspense");case h:return B("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case c:return ke(d.render);case m:return Ue(d.type,T,R);case b:{var I=d,Z=I._payload,oe=I._init;try{return Ue(oe(Z),T,R)}catch{}}}return""}var We=Object.prototype.hasOwnProperty,jt={},Jt=w.ReactDebugCurrentFrame;function et(d){if(d){var T=d._owner,R=Ue(d.type,d._source,T?T.type:null);Jt.setExtraStackFrame(R)}else Jt.setExtraStackFrame(null)}function St(d,T,R,I,Z){{var oe=Function.call.bind(We);for(var J in d)if(oe(d,J)){var K=void 0;try{if(typeof d[J]!="function"){var Ae=Error((I||"React class")+": "+R+" type `"+J+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[J]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ae.name="Invariant Violation",Ae}K=d[J](T,J,I,R,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(me){K=me}K&&!(K instanceof Error)&&(et(Z),j("%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).",I||"React class",R,J,typeof K),et(null)),K instanceof Error&&!(K.message in jt)&&(jt[K.message]=!0,et(Z),j("Failed %s type: %s",R,K.message),et(null))}}}var mr=Array.isArray;function dt(d){return mr(d)}function br(d){{var T=typeof Symbol=="function"&&Symbol.toStringTag,R=T&&d[Symbol.toStringTag]||d.constructor.name||"Object";return R}}function kt(d){try{return ft(d),!1}catch{return!0}}function ft(d){return""+d}function $t(d){if(kt(d))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",br(d)),ft(d)}var Xt=w.ReactCurrentOwner,Mt={key:!0,ref:!0,__self:!0,__source:!0},Pt,pt;function vr(d){if(We.call(d,"ref")){var T=Object.getOwnPropertyDescriptor(d,"ref").get;if(T&&T.isReactWarning)return!1}return d.ref!==void 0}function Ot(d){if(We.call(d,"key")){var T=Object.getOwnPropertyDescriptor(d,"key").get;if(T&&T.isReactWarning)return!1}return d.key!==void 0}function gr(d,T){typeof d.ref=="string"&&Xt.current}function yr(d,T){{var R=function(){Pt||(Pt=!0,j("%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)",T))};R.isReactWarning=!0,Object.defineProperty(d,"key",{get:R,configurable:!0})}}function xr(d,T){{var R=function(){pt||(pt=!0,j("%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)",T))};R.isReactWarning=!0,Object.defineProperty(d,"ref",{get:R,configurable:!0})}}var Cr=function(d,T,R,I,Z,oe,J){var K={$$typeof:t,type:d,key:T,ref:R,props:J,_owner:oe};return K._store={},Object.defineProperty(K._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(K,"_self",{configurable:!1,enumerable:!1,writable:!1,value:I}),Object.defineProperty(K,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Z}),Object.freeze&&(Object.freeze(K.props),Object.freeze(K)),K};function _e(d,T,R,I,Z){{var oe,J={},K=null,Ae=null;R!==void 0&&($t(R),K=""+R),Ot(T)&&($t(T.key),K=""+T.key),vr(T)&&(Ae=T.ref,gr(T,Z));for(oe in T)We.call(T,oe)&&!Mt.hasOwnProperty(oe)&&(J[oe]=T[oe]);if(d&&d.defaultProps){var me=d.defaultProps;for(oe in me)J[oe]===void 0&&(J[oe]=me[oe])}if(K||Ae){var ve=typeof d=="function"?d.displayName||d.name||"Unknown":d;K&&yr(J,ve),Ae&&xr(J,ve)}return Cr(d,K,Ae,Z,I,Xt.current,J)}}var ht=w.ReactCurrentOwner,qe=w.ReactDebugCurrentFrame;function Ge(d){if(d){var T=d._owner,R=Ue(d.type,d._source,T?T.type:null);qe.setExtraStackFrame(R)}else qe.setExtraStackFrame(null)}var mt;mt=!1;function Tr(d){return typeof d=="object"&&d!==null&&d.$$typeof===t}function un(){{if(ht.current){var d=de(ht.current.type);if(d)return`
22
-
23
- Check the render method of \``+d+"`."}return""}}function Fa(d){return""}var cn={};function La(d){{var T=un();if(!T){var R=typeof d=="string"?d:d.displayName||d.name;R&&(T=`
24
-
25
- Check the top-level render call using <`+R+">.")}return T}}function dn(d,T){{if(!d._store||d._store.validated||d.key!=null)return;d._store.validated=!0;var R=La(T);if(cn[R])return;cn[R]=!0;var I="";d&&d._owner&&d._owner!==ht.current&&(I=" It was passed a child from "+de(d._owner.type)+"."),Ge(d),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',R,I),Ge(null)}}function fn(d,T){{if(typeof d!="object")return;if(dt(d))for(var R=0;R<d.length;R++){var I=d[R];Tr(I)&&dn(I,T)}else if(Tr(d))d._store&&(d._store.validated=!0);else if(d){var Z=y(d);if(typeof Z=="function"&&Z!==d.entries)for(var oe=Z.call(d),J;!(J=oe.next()).done;)Tr(J.value)&&dn(J.value,T)}}}function Ba(d){{var T=d.type;if(T==null||typeof T=="string")return;var R;if(typeof T=="function")R=T.propTypes;else if(typeof T=="object"&&(T.$$typeof===c||T.$$typeof===m))R=T.propTypes;else return;if(R){var I=de(T);St(R,d.props,"prop",I,d)}else if(T.PropTypes!==void 0&&!mt){mt=!0;var Z=de(T);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Z||"Unknown")}typeof T.getDefaultProps=="function"&&!T.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Va(d){{for(var T=Object.keys(d.props),R=0;R<T.length;R++){var I=T[R];if(I!=="children"&&I!=="key"){Ge(d),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",I),Ge(null);break}}d.ref!==null&&(Ge(d),j("Invalid attribute `ref` supplied to `React.Fragment`."),Ge(null))}}var pn={};function hn(d,T,R,I,Z,oe){{var J=ee(d);if(!J){var K="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(K+=" 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 Ae=Fa();Ae?K+=Ae:K+=un();var me;d===null?me="null":dt(d)?me="array":d!==void 0&&d.$$typeof===t?(me="<"+(de(d.type)||"Unknown")+" />",K=" Did you accidentally export a JSX literal instead of a component?"):me=typeof d,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",me,K)}var ve=_e(d,T,R,Z,oe);if(ve==null)return ve;if(J){var ze=T.children;if(ze!==void 0)if(I)if(dt(ze)){for(var bt=0;bt<ze.length;bt++)fn(ze[bt],d);Object.freeze&&Object.freeze(ze)}else j("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 fn(ze,d)}if(We.call(T,"key")){var lt=de(d),Fe=Object.keys(T).filter(function(vn){return vn!=="key"}),Zt=Fe.length>0?"{key: someKey, "+Fe.join(": ..., ")+": ...}":"{key: someKey}";if(!pn[lt+Zt]){var bn=Fe.length>0?"{"+Fe.join(": ..., ")+": ...}":"{}";j(`A props object containing a "key" prop is being spread into JSX:
17
+ */var jn;function Co(){return jn||(jn=1,process.env.NODE_ENV!=="production"&&function(){function e(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===u?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case c:return"Fragment";case k:return"Profiler";case v:return"StrictMode";case T:return"Suspense";case I:return"SuspenseList";case H:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case y:return"Portal";case j:return(h.displayName||"Context")+".Provider";case O:return(h._context.displayName||"Context")+".Consumer";case P:var w=h.render;return h=h.displayName,h||(h=w.displayName||w.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case $:return w=h.displayName||null,w!==null?w:e(h.type)||"Memo";case G:w=h._payload,h=h._init;try{return e(h(w))}catch{}}return null}function t(h){return""+h}function r(h){try{t(h);var w=!1}catch{w=!0}if(w){w=console;var _=w.error,M=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return _.call(w,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",M),t(h)}}function n(h){if(h===c)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===G)return"<...>";try{var w=e(h);return w?"<"+w+">":"<...>"}catch{return"<...>"}}function a(){var h=R.A;return h===null?null:h.getOwner()}function o(){return Error("react-stack-top-frame")}function s(h){if(Y.call(h,"key")){var w=Object.getOwnPropertyDescriptor(h,"key").get;if(w&&w.isReactWarning)return!1}return h.key!==void 0}function l(h,w){function _(){se||(se=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",w))}_.isReactWarning=!0,Object.defineProperty(h,"key",{get:_,configurable:!0})}function f(){var h=e(this.type);return ue[h]||(ue[h]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),h=this.props.ref,h!==void 0?h:null}function p(h,w,_,M,N,L,z,q){return _=L.ref,h={$$typeof:C,type:h,key:w,props:L,_owner:N},(_!==void 0?_:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:f}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:z}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:q}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function m(h,w,_,M,N,L,z,q){var F=w.children;if(F!==void 0)if(M)if(B(F)){for(M=0;M<F.length;M++)b(F[M]);Object.freeze&&Object.freeze(F)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else b(F);if(Y.call(w,"key")){F=e(h);var W=Object.keys(w).filter(function(de){return de!=="key"});M=0<W.length?"{key: someKey, "+W.join(": ..., ")+": ...}":"{key: someKey}",Re[F+M]||(W=0<W.length?"{"+W.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
26
18
  let props = %s;
27
19
  <%s {...props} />
28
20
  React keys must be passed directly to JSX without using spread:
29
21
  let props = %s;
30
- <%s key={someKey} {...props} />`,Zt,lt,bn,lt),pn[lt+Zt]=!0}}return d===r?Va(ve):Ba(ve),ve}}function qa(d,T,R){return hn(d,T,R,!0)}function za(d,T,R){return hn(d,T,R,!1)}var Na=za,mn=qa;tr.Fragment=r,tr.jsx=Na,tr.jsxs=mn}()),tr}process.env.NODE_ENV==="production"?En.exports=Ki():En.exports=Gi();var i=En.exports;const ue={background:"#0a1929",borderBlue:"#0f353e",borderGrey:"rgba(255, 255, 255, 0.1)",grey500:"#868c95",primary:"#0ed3b4",secondary:"#007ef6",tertiary:"#0f353e"},Ji={components:{MuiButton:{styleOverrides:{root:({ownerState:e})=>({...e.color==="primary"&&e.variant==="contained"&&{color:`${ue.tertiary} !important`},...e.disabled&&e.variant==="contained"&&{color:"white"}})}}},palette:{background:{default:ue.background,paper:ue.background},mode:"dark",primary:{main:ue.primary},secondary:{main:ue.secondary}}},Xi=({children:e})=>i.jsxs(i.Fragment,{children:[i.jsx(p.GlobalStyles,{styles:{"*":{scrollbarColor:"rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05)",scrollbarWidth:"thin"},"*::-webkit-scrollbar":{height:6,width:6},"*::-webkit-scrollbar-button":{height:0,width:0},"*::-webkit-scrollbar-corner":{background:"transparent"},"*::-webkit-scrollbar-thumb":{backgroundColor:"rgba(255, 255, 255, 0.2)",border:0,borderRadius:10},"*::-webkit-scrollbar-track":{background:"rgba(255, 255, 255, 0.05)"},"html, body, #root":{height:"100%"}}}),i.jsx(p.ThemeProvider,{theme:Ji,children:e})]}),Zi=new Dt.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}}),Qi={authToken:void 0},Hi=_.createContext(Qi),el=({children:e,authToken:t})=>{const n=_.useMemo(()=>({authToken:t}),[t]);return i.jsx(Hi.Provider,{value:n,children:e})},Ya={dispatchSnackbar:()=>null,snackbar:{open:!1}},Ka=_.createContext(Ya),Sr={closeSnackbar:"closeSnackbar",openSnackbar:"openSnackbar"},tl=(e,t="success")=>({message:e,severity:t,type:Sr.openSnackbar}),Ga=()=>({type:Sr.closeSnackbar}),rl=(e,t)=>{switch(t.type){case Sr.openSnackbar:{const{message:n,severity:r}=t;return{message:n,open:!0,severity:r}}case Sr.closeSnackbar:return{...e,open:!1};default:throw new Error}},nl={snackbarAlert:{width:"100%"}},al=({children:e})=>{const[t,n]=_.useReducer(rl,Ya.snackbar),{message:r,open:a,severity:o}=t,s=6e3,l=()=>n(Ga()),c=_.useMemo(()=>({dispatchSnackbar:n,snackbar:t}),[t,n]);return i.jsxs(Ka.Provider,{value:c,children:[i.jsx(p.Snackbar,{open:a,autoHideDuration:s,onClose:l,anchorOrigin:{horizontal:"center",vertical:"bottom"},children:i.jsx(p.Alert,{onClose:l,severity:o,sx:nl.snackbarAlert,variant:"filled",children:r})}),e]})},ol="data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2_65)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1302%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.4549%2046.7988C17.061%2047.1509%2017.749%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.25%20116.58%20138.64L151.39%2078.34C151.741%2077.7315%20151.926%2077.0412%20151.926%2076.3385C151.926%2075.6359%20151.74%2074.9457%20151.389%2074.3374C151.037%2073.7292%20150.531%2073.2243%20149.922%2072.8737C149.313%2072.523%20148.623%2072.339%20147.92%2072.34H92.48C91.4191%2072.34%2090.4017%2072.7614%2089.6516%2073.5116C88.9014%2074.2617%2088.48%2075.2791%2088.48%2076.34V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.468C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.32H4C3.2982%2072.3207%202.60894%2072.5061%202.00143%2072.8574C1.39393%2073.2088%200.889558%2073.7138%200.53897%2074.3218C0.188382%2074.9297%200.00391694%2075.6192%200.00409712%2076.321C0.00427729%2077.0228%200.189097%2077.7122%200.539997%2078.32L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.488C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.31C63.4773%2075.2509%2063.0548%2074.236%2062.3049%2073.488C61.555%2072.7401%2060.5391%2072.32%2059.48%2072.32Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_2_65'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",sl=()=>i.jsx("img",{src:ol,alt:"Treege",height:30,width:"auto"}),il=()=>{const[e,t]=_.useState({x:0,y:0}),[n,r]=_.useState({height:0,width:0}),a=_.useCallback(o=>{if(!o)return null;const{width:s,height:l}=o.getBoundingClientRect();return r({height:l,width:s}),t({x:s/2,y:l/2}),o},[]);return{dimensions:n,refContainer:a,translate:e}},Ja=({color:e,height:t=20,width:n=20})=>i.jsxs("svg",{focusable:"false",x:"0px",y:"0px",viewBox:"0 0 24 24",color:e,height:t,width:n,children:[i.jsx("path",{fill:"currentColor",d:`M19.1,18H14v2c0,1.1-0.9,2-2,2s-2-0.9-2-2v-2H4.9c-0.8,0-1.3-0.9-0.8-1.5L7,12l0,0c-0.8,0-1.3-0.9-0.8-1.6l5-7.2
22
+ <%s key={someKey} {...props} />`,M,F,W,F),Re[F+M]=!0)}if(F=null,_!==void 0&&(r(_),F=""+_),s(w)&&(r(w.key),F=""+w.key),"key"in w){_={};for(var U in w)U!=="key"&&(_[U]=w[U])}else _=w;return F&&l(_,typeof h=="function"?h.displayName||h.name||"Unknown":h),p(h,F,L,N,a(),_,z,q)}function b(h){typeof h=="object"&&h!==null&&h.$$typeof===C&&h._store&&(h._store.validated=1)}var g=S,C=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),j=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),u=Symbol.for("react.client.reference"),R=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=Object.prototype.hasOwnProperty,B=Array.isArray,he=console.createTask?console.createTask:function(){return null};g={"react-stack-bottom-frame":function(h){return h()}};var se,ue={},ve=g["react-stack-bottom-frame"].bind(g,o)(),je=he(n(o)),Re={};Rt.Fragment=c,Rt.jsx=function(h,w,_,M,N){var L=1e4>R.recentlyCreatedOwnerStacks++;return m(h,w,_,!1,M,N,L?Error("react-stack-top-frame"):ve,L?he(n(h)):je)},Rt.jsxs=function(h,w,_,M,N){var L=1e4>R.recentlyCreatedOwnerStacks++;return m(h,w,_,!0,M,N,L?Error("react-stack-top-frame"):ve,L?he(n(h)):je)}}()),Rt}var Sn;function To(){return Sn||(Sn=1,process.env.NODE_ENV==="production"?er.exports=vo():er.exports=Co()),er.exports}var i=To();const ne={background:"#0a1929",borderBlue:"#0f353e",borderGrey:"rgba(255, 255, 255, 0.1)",grey500:"#868c95",primary:"#0ed3b4",secondary:"#007ef6",tertiary:"#0f353e"},wo={components:{MuiButton:{styleOverrides:{root:({ownerState:e})=>({...e.color==="primary"&&e.variant==="contained"&&{color:`${ne.tertiary} !important`},...e.disabled&&e.variant==="contained"&&{color:"white"}})}}},palette:{background:{default:ne.background,paper:ne.background},mode:"dark",primary:{main:ne.primary},secondary:{main:ne.secondary}}},ko=({children:e})=>i.jsxs(i.Fragment,{children:[i.jsx(d.GlobalStyles,{styles:{"*":{scrollbarColor:"rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05)",scrollbarWidth:"thin"},"*::-webkit-scrollbar":{height:6,width:6},"*::-webkit-scrollbar-button":{height:0,width:0},"*::-webkit-scrollbar-corner":{background:"transparent"},"*::-webkit-scrollbar-thumb":{backgroundColor:"rgba(255, 255, 255, 0.2)",border:0,borderRadius:10},"*::-webkit-scrollbar-track":{background:"rgba(255, 255, 255, 0.05)"},"html, body, #root":{height:"100%"}}}),i.jsx(d.ThemeProvider,{theme:wo,children:e})]}),Eo=new ft.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}}),jo={authToken:void 0},So=S.createContext(jo),Po=({children:e,authToken:t})=>{const r=S.useMemo(()=>({authToken:t}),[t]);return i.jsx(So.Provider,{value:r,children:e})},Ao="data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2_65)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1302%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.4549%2046.7988C17.061%2047.1509%2017.749%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.25%20116.58%20138.64L151.39%2078.34C151.741%2077.7315%20151.926%2077.0412%20151.926%2076.3385C151.926%2075.6359%20151.74%2074.9457%20151.389%2074.3374C151.037%2073.7292%20150.531%2073.2243%20149.922%2072.8737C149.313%2072.523%20148.623%2072.339%20147.92%2072.34H92.48C91.4191%2072.34%2090.4017%2072.7614%2089.6516%2073.5116C88.9014%2074.2617%2088.48%2075.2791%2088.48%2076.34V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.468C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.32H4C3.2982%2072.3207%202.60894%2072.5061%202.00143%2072.8574C1.39393%2073.2088%200.889558%2073.7138%200.53897%2074.3218C0.188382%2074.9297%200.00391694%2075.6192%200.00409712%2076.321C0.00427729%2077.0228%200.189097%2077.7122%200.539997%2078.32L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.488C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.31C63.4773%2075.2509%2063.0548%2074.236%2062.3049%2073.488C61.555%2072.7401%2060.5391%2072.32%2059.48%2072.32Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_2_65'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Oo=()=>i.jsx("img",{src:Ao,alt:"Treege",height:30,width:"auto"}),Ro=()=>{const[e,t]=S.useState({x:0,y:0}),[r,n]=S.useState({height:0,width:0}),a=S.useCallback(o=>{if(!o)return;const{width:s,height:l}=o.getBoundingClientRect();n({height:l,width:s}),t({x:s/2,y:l/2})},[]);return{dimensions:r,refContainer:a,translate:e}},Pn=({color:e,height:t=20,width:r=20})=>i.jsxs("svg",{focusable:"false",x:"0px",y:"0px",viewBox:"0 0 24 24",color:e,height:t,width:r,children:[i.jsx("path",{fill:"currentColor",d:`M19.1,18H14v2c0,1.1-0.9,2-2,2s-2-0.9-2-2v-2H4.9c-0.8,0-1.3-0.9-0.8-1.5L7,12l0,0c-0.8,0-1.3-0.9-0.8-1.6l5-7.2
31
23
  c0.4-0.6,1.2-0.6,1.6,0l0.6,0.9c-0.8,0.8-1.2,2-1.2,3.2c0,2.6,2.1,4.7,4.7,4.7H17l3,4.5C20.4,17.1,19.9,18,19.1,18z`}),i.jsx("path",{fill:"currentColor",d:`M20.6,7.3c0,0.4-0.4,0.8-0.8,0.8h-2.1v2.1c0,0.4-0.4,0.8-0.8,0.8s-0.8-0.4-0.8-0.8V8.1H14c-0.5,0-0.8-0.4-0.8-0.8
32
- c0-0.5,0.4-0.8,0.8-0.8h2.1V4.4c0-0.5,0.4-0.8,0.8-0.8s0.8,0.4,0.8,0.8v2.1h2.1C20.3,6.5,20.6,6.8,20.6,7.3z`})]}),Xa=(e,t)=>{if(!e)return null;if(e.uuid===t)return e;const n=e.children||[];for(let r=0;r<n.length;r+=1){const a=n[r],o=Xa(a,t);if(o)return o}return null},Ft=(e,t)=>{var o,s,l,c,f;if(!e)return null;if(!t)return e;if(((o=e.attributes)==null?void 0:o.treePath)===t)return((s=e.attributes)==null?void 0:s.tree)||null;let n=null;const r=(l=e.attributes)==null?void 0:l.tree,a=(c=e.children)==null?void 0:c.length;if(r&&(n=Ft((f=e.attributes)==null?void 0:f.tree,t)),a){const{children:h}=e;for(let m=0;m<h.length;m+=1){const b=h[m];if(n!==null)return n;n=Ft(b,t)}}return n},kr=(e,t,n)=>{const r=Ft(e,t);return Xa(r,n)},ll=(e,t)=>{if(!e)return null;const{attributes:n}=t,r=n.isDecision;return Object.defineProperty(e,"attributes",{value:{...e.attributes,isLeaf:!1}}),r?(Object.defineProperty(e,"children",{value:[{...t,attributes:{...n,isLeaf:!1}}]}),null):(Object.defineProperty(e,"children",{value:[{...t,attributes:{...n,isLeaf:!e.children.length}}]}),null)},ul=({tree:e,path:t,uuid:n,child:r})=>{var c;const{attributes:a,children:o}=r;if(!e)return o.length?{...r}:{...r,attributes:{...a,isLeaf:!0,isRoot:!0}};const s=structuredClone(e),l=kr(s,t,n);return ll(l,{...r,...!a.isDecision&&{children:[...((c=kr(e,t,n))==null?void 0:c.children)||[]]}}),s},Za=(e,t,n=null)=>{if(!e)return null;if(e.uuid===t)return n;const r=e.children||[];for(let a=0;a<r.length;a+=1){const o=r[a],s=Za(o,t,e);if(s!==null)return s}return null},cl=(e,t)=>!e||!t?null:e.attributes.isDecision||t.attributes.isDecision?(Object.defineProperty(e,"children",{value:[...e.children.filter(n=>n.uuid!==t.uuid)]}),Object.defineProperty(e,"attributes",{value:{...e.attributes,isLeaf:!e.children.length}}),null):(Object.defineProperty(e,"children",{value:[...e.children.filter(n=>n.uuid!==t.uuid),...t.children]}),Object.defineProperty(e,"attributes",{value:{...e.attributes,isLeaf:!t.children.length}}),null),dl=(e,t,n)=>{const r=Ft(e,t);return Za(r,n)},fl=({tree:e,path:t,uuid:n})=>{const r=structuredClone(e),a=kr(r,t,n),o=dl(r,t,n);return cl(o,a),r},pl=(e,t)=>{if(!e)return null;const n=t.attributes.isDecision,r=e.attributes.isDecision,a=e.attributes.depth===0,o={value:t.uuid},s=r||n,l=s?{value:[...t.children]}:{value:[...e.children]},c=s?{value:{...t.attributes,...a&&{isRoot:!0},isLeaf:!t.children.length||!n}}:{value:{...t.attributes,...a&&{isRoot:!0},isLeaf:!e.children.length}};return Object.defineProperties(e,{attributes:c,children:l,uuid:o}),null},hl=({tree:e,path:t,uuid:n,children:r})=>{const a=structuredClone(e),o=kr(a,t,n);return pl(o,r),a},ml=(e,t)=>{if(!e)return[];const n=[],r=a=>{var o,s;if((o=a.attributes)!=null&&o.name&&n.push((s=a==null?void 0:a.attributes)==null?void 0:s.name),(a==null?void 0:a.uuid)!==t&&a.children.length){const{children:l}=a;for(let c=0;c<l.length;c+=1)r(l[c])}};return r(e),[...new Set(n)]},rt={appendTreeCard:"appendTreeCard",deleteTreeCard:"deleteTreeCard",replaceTreeCard:"replaceTreeCard",resetTree:"resetTree",setTree:"setTree"},bl=(e,t,n)=>({children:n,path:e,type:rt.appendTreeCard,uuid:t}),vl=(e,t,n)=>({children:n,path:e,type:rt.replaceTreeCard,uuid:t}),gl=(e,t)=>({path:e,type:rt.deleteTreeCard,uuid:t}),Qa=()=>({type:rt.resetTree}),wn=e=>({tree:e,type:rt.setTree}),yl=(e,t)=>{switch(t.type){case rt.appendTreeCard:{const{uuid:n,path:r,children:a}=t;return ul({child:a,path:r,tree:e,uuid:n})}case rt.deleteTreeCard:{const{path:n,uuid:r}=t;return fl({path:n,tree:e,uuid:r})}case rt.replaceTreeCard:{const{uuid:n,path:r,children:a}=t;return hl({children:a,path:r,tree:e,uuid:n})}case rt.resetTree:return null;case rt.setTree:return t.tree;default:throw new Error}},$r=(e,t)=>{const{backendConfig:n}=Re(),{endpoints:r}=n||{},{workflow:a=""}=r||{};return Dt.useQuery({enabled:!!e,queryFn:async({signal:o})=>{const{data:s}=await It.get(`${a}?id=${e}`,{signal:o});return s},queryKey:["workflow",e],...t})},xl="1.5.1",nt={backendConfig:{baseUrl:"",endpoints:{workflow:"/v1/workflow",workflows:"/v1/workflows"}},currentHierarchyPointNode:null,currentTree:{errorName:"",id:"",name:""},dispatchTree:()=>null,modalOpen:null,setCurrentHierarchyPointNode:()=>null,setCurrentTree:()=>null,setModalOpen:()=>null,setTreeModalOpen:()=>null,setTreePath:()=>null,tree:null,treeModalOpen:!1,treePath:[],version:""},jn=_.createContext(nt),Cl=({children:e,initialTree:t,initialTreeId:n,backendConfig:r})=>{const{data:a}=$r(n,{enabled:!!n}),[o,s]=_.useState(nt.currentHierarchyPointNode),[l,c]=_.useState(nt.modalOpen),[f,h]=_.useState(nt.treeModalOpen),[m,b]=_.useState(nt.treePath),[g,v]=_.useReducer(yl,t||nt.tree),[u,y]=_.useState(n?{...nt.currentTree,id:n}:nt.currentTree);_.useEffect(()=>{a&&(y({id:a.id,name:a.label}),v(wn(a.workflow||null)))},[a]);const w=_.useMemo(()=>{var j;return{backendConfig:{...nt.backendConfig,...r,endpoints:{...(j=nt.backendConfig)==null?void 0:j.endpoints,...r==null?void 0:r.endpoints}},currentHierarchyPointNode:o,currentTree:u,dispatchTree:v,modalOpen:l,setCurrentHierarchyPointNode:s,setCurrentTree:y,setModalOpen:c,setTreeModalOpen:h,setTreePath:b,tree:g,treeModalOpen:f,treePath:m,version:xl}},[r,o,u,l,g,f,m]);return i.jsx(jn.Provider,{value:w,children:e})},Re=()=>{if(!jn)throw new Error("useTreegeContext must be used within a TreegeProvider");return _.useContext(jn)},Tl=()=>{const{setModalOpen:e}=Re();return{handleClick:()=>e("add")}},_l=()=>{const{t:e}=Pe.useTranslation("button"),{handleClick:t}=Tl();return i.jsx(p.Box,{alignItems:"center",justifyContent:"center",display:"flex",height:"100%",children:i.jsx(p.Button,{onClick:t,size:"medium",variant:"contained",startIcon:i.jsx(Ja,{}),children:e("createTree",{ns:"button"})})})},On={container:{height:"100%",width:"100%"},progressContainer:{alignItems:"center",display:"flex",height:"100%",justifyContent:"center"},treeLink:{stroke:`${ue.borderGrey} !important`}},Ha="tree-link",El=({data:e,renderCustomNodeElement:t,nodeSize:n={x:300,y:300}})=>{const{dimensions:r,refContainer:a,translate:o}=il(),{currentTree:s}=Re(),{isLoading:l,data:c}=$r(s.id);return!e&&!s.id||c&&!e?i.jsx(_l,{}):s.id&&!e||l?i.jsx(p.Box,{sx:On.progressContainer,children:i.jsx(p.CircularProgress,{})}):i.jsxs("div",{style:On.container,ref:a,children:[i.jsx(p.GlobalStyles,{styles:{[`.${Ha}`]:On.treeLink}}),i.jsx(Vi,{data:e,orientation:"vertical",translate:o,dimensions:r,renderCustomNodeElement:t,pathFunc:"diagonal",pathClassFunc:()=>Ha,nodeSize:n})]})},eo=_.memo(El),wl=()=>({formatJSON:t=>JSON.stringify(t??{},null,2)}),to={fullHeight:{height:"100%"}},jl=({value:e,onChange:t})=>{const{formatJSON:n}=wl();return i.jsxs("div",{style:to.fullHeight,children:[i.jsx(p.GlobalStyles,{styles:{".cm-activeLine.cm-line, .cm-gutterElement.cm-activeLineGutter":{backgroundColor:"transparent"}}}),i.jsx(Ni,{editable:!0,value:n(e),extensions:[qi.json()],theme:zi.dracula,height:"100%",style:to.fullHeight,onChange:t})]})};var Rn={},ro={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(ro);var fe=ro.exports,Sn={};function re(){return re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},re.apply(null,arguments)}function xt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function no(e){if(q.isValidElement(e)||!xt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=no(e[n])}),t}function at(e,t,n={clone:!0}){const r=n.clone?re({},e):e;return xt(e)&&xt(t)&&Object.keys(t).forEach(a=>{q.isValidElement(t[a])?r[a]=t[a]:xt(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&xt(e[a])?r[a]=at(e[a],t[a],n):n.clone?r[a]=xt(t[a])?no(t[a]):t[a]:r[a]=t[a]}),r}const Ol=Object.freeze(Object.defineProperty({__proto__:null,default:at,isPlainObject:xt},Symbol.toStringTag,{value:"Module"}));var kn={exports:{}},Mr={exports:{}},ne={};/** @license React v16.13.1
24
+ c0-0.5,0.4-0.8,0.8-0.8h2.1V4.4c0-0.5,0.4-0.8,0.8-0.8s0.8,0.4,0.8,0.8v2.1h2.1C20.3,6.5,20.6,6.8,20.6,7.3z`})]}),tr=(e,t)=>{if(!e)return null;if(e.uuid===t)return e;const r=e.children||[];for(let n=0;n<r.length;n+=1){const a=r[n],o=tr(a,t);if(o)return o}return null},ht=(e,t)=>{if(!e)return null;if(!t)return e;if(e.attributes?.treePath===t)return e.attributes?.tree||null;let r=null;const n=e.attributes?.tree,a=e.children?.length;if(n&&(r=ht(e.attributes?.tree,t)),a){const{children:o}=e;for(let s=0;s<o.length;s+=1){const l=o[s];if(r!==null)return r;r=ht(l,t)}}return r},rr=(e,t,r)=>{const n=ht(e,t);return tr(n,r)},$o=(e,t)=>{if(!e)return null;const{attributes:r}=t,n=r.isDecision;return Object.defineProperty(e,"attributes",{value:{...e.attributes,isLeaf:!1}}),n?(Object.defineProperty(e,"children",{value:[{...t,attributes:{...r,isLeaf:!1}}]}),null):(Object.defineProperty(e,"children",{value:[{...t,attributes:{...r,isLeaf:!e.children.length}}]}),null)},_o=({tree:e,path:t,uuid:r,child:n})=>{const{attributes:a,children:o}=n;if(!e)return o.length?{...n}:{...n,attributes:{...a,isLeaf:!0,isRoot:!0}};const s=structuredClone(e),l=rr(s,t,r);return $o(l,{...n,...!a.isDecision&&{children:[...rr(e,t,r)?.children||[]]}}),s},An=(e,t,r=null)=>{if(!e)return null;if(e.uuid===t)return r;const n=e.children||[];for(let a=0;a<n.length;a+=1){const o=n[a],s=An(o,t,e);if(s!==null)return s}return null},Mo=(e,t)=>!e||!t?null:e.attributes.isDecision||t.attributes.isDecision?(Object.defineProperty(e,"children",{value:[...e.children.filter(r=>r.uuid!==t.uuid)]}),Object.defineProperty(e,"attributes",{value:{...e.attributes,isLeaf:!e.children.length}}),null):(Object.defineProperty(e,"children",{value:[...e.children.filter(r=>r.uuid!==t.uuid),...t.children]}),Object.defineProperty(e,"attributes",{value:{...e.attributes,isLeaf:!t.children.length}}),null),Do=(e,t,r)=>{const n=ht(e,t);return An(n,r)},On=(e,t)=>{const r={...e.attributes};r.defaultValueFromAncestor?.uuid===t&&delete r.defaultValueFromAncestor,r.route?.params&&(r.route={...r.route,params:r.route.params.filter(a=>a.ancestorUuid!==t)});const n=e.children?.map(a=>On(a,t))||[];return{...e,attributes:r,children:n}},Io=({tree:e,path:t,uuid:r})=>{if(!e)return null;const n=structuredClone(e),a=rr(n,t,r),o=Do(n,t,r);return Mo(o,a),On(n,r)},No=(e,t)=>{if(!e)return null;const r=t.attributes.isDecision,n=e.attributes.isDecision,a=e.attributes.depth===0,o={value:t.uuid},s=n||r,l=s?{value:[...t.children]}:{value:[...e.children]},f=s?{value:{...t.attributes,...a&&{isRoot:!0},isLeaf:!t.children.length||!r}}:{value:{...t.attributes,...a&&{isRoot:!0},isLeaf:!e.children.length}};return Object.defineProperties(e,{attributes:f,children:l,uuid:o}),null},Fo=({tree:e,path:t,uuid:r,children:n})=>{if(!e)return null;const a=structuredClone(e),o=rr(a,t,r);return No(o,n),a},Bo=(e,t,r)=>{if(!e||!t)return[];const n=[],a=o=>{const{attributes:s,uuid:l}=o;return n.push({name:s?.name,uuid:l}),l===t||(o.children?.some(p=>a(p))??!1)?!0:(n.pop(),!1)};return a(e),r?n.filter(o=>o.uuid!==r):n},Le={appendTreeCard:"appendTreeCard",deleteTreeCard:"deleteTreeCard",replaceTreeCard:"replaceTreeCard",resetTree:"resetTree",setTree:"setTree"},Lo=(e,t,r)=>({children:r,path:e,type:Le.appendTreeCard,uuid:t}),Vo=(e,t,r)=>({children:r,path:e,type:Le.replaceTreeCard,uuid:t}),zo=(e,t)=>({path:e,type:Le.deleteTreeCard,uuid:t}),Rn=()=>({type:Le.resetTree}),Nr=e=>({tree:e,type:Le.setTree}),qo=(e,t)=>{switch(t.type){case Le.appendTreeCard:{const{uuid:r,path:n,children:a}=t;return _o({child:a,path:n,tree:e,uuid:r})}case Le.deleteTreeCard:{const{path:r,uuid:n}=t;return Io({path:r,tree:e,uuid:n})}case Le.replaceTreeCard:{const{uuid:r,path:n,children:a}=t;return Fo({children:a,path:n,tree:e,uuid:r})}case Le.resetTree:return null;case Le.setTree:return t.tree;default:throw new Error}},nr=(e,t)=>{const{backendConfig:r}=ye(),{endpoints:n}=r||{},{workflow:a=""}=n||{};return ft.useQuery({enabled:!!e,queryFn:async({signal:o})=>{const{data:s}=await pt.get(`${a}?id=${e}`,{signal:o});return s},queryKey:["workflow",e],...t})},Ho="2.0.1",Ve={backendConfig:{baseUrl:"",endpoints:{workflow:"/v1/workflow",workflows:"/v1/workflows"}},currentHierarchyPointNode:null,currentTree:{errorName:"",id:"",name:""},dispatchTree:()=>null,modalOpen:null,setCurrentHierarchyPointNode:()=>null,setCurrentTree:()=>null,setModalOpen:()=>null,setTreeModalOpen:()=>null,setTreePath:()=>null,tree:null,treeModalOpen:!1,treePath:[],version:""},Fr=S.createContext(Ve),Wo=({children:e,initialTree:t,initialTreeId:r,backendConfig:n})=>{const{data:a}=nr(r,{enabled:!!r}),[o,s]=S.useState(Ve.currentHierarchyPointNode),[l,f]=S.useState(Ve.modalOpen),[p,m]=S.useState(Ve.treeModalOpen),[b,g]=S.useState(Ve.treePath),[C,y]=S.useReducer(qo,t||Ve.tree),[c,v]=S.useState(r?{...Ve.currentTree,id:r}:Ve.currentTree);S.useEffect(()=>{a&&(v({id:a.id,name:a.label}),y(Nr(a.workflow||null)))},[a]);const k=S.useMemo(()=>({backendConfig:{...Ve.backendConfig,...n,endpoints:{...Ve.backendConfig?.endpoints,...n?.endpoints}},currentHierarchyPointNode:o,currentTree:c,dispatchTree:y,modalOpen:l,setCurrentHierarchyPointNode:s,setCurrentTree:v,setModalOpen:f,setTreeModalOpen:m,setTreePath:g,tree:C,treeModalOpen:p,treePath:b,version:Ho}),[n,o,c,l,C,p,b]);return i.jsx(Fr.Provider,{value:k,children:e})},ye=()=>{if(!Fr)throw new Error("useTreegeContext must be used within a TreegeProvider");return S.useContext(Fr)},Uo=()=>{const{setModalOpen:e}=ye();return{handleClick:()=>e("add")}},Yo=()=>{const{t:e}=we.useTranslation("button"),{handleClick:t}=Uo();return i.jsx(d.Box,{alignItems:"center",justifyContent:"center",display:"flex",height:"100%",children:i.jsx(d.Button,{onClick:t,size:"medium",variant:"contained",startIcon:i.jsx(Pn,{}),children:e("createTree")})})},Br={container:{height:"100%",width:"100%"},progressContainer:{alignItems:"center",display:"flex",height:"100%",justifyContent:"center"},treeLink:{stroke:`${ne.borderGrey} !important`}},$n="tree-link",Go=({data:e,renderCustomNodeElement:t,nodeSize:r={x:300,y:300}})=>{const{dimensions:n,refContainer:a,translate:o}=Ro(),{currentTree:s}=ye(),{isLoading:l,data:f}=nr(s.id);return!e&&!s.id||f&&!e?i.jsx(Yo,{}):s.id&&!e||l?i.jsx(d.Box,{sx:Br.progressContainer,children:i.jsx(d.CircularProgress,{})}):i.jsxs("div",{style:Br.container,ref:a,children:[i.jsx(d.GlobalStyles,{styles:{[`.${$n}`]:Br.treeLink}}),i.jsx(po,{data:e,orientation:"vertical",translate:o,dimensions:n,renderCustomNodeElement:t,pathFunc:"diagonal",pathClassFunc:()=>$n,nodeSize:r})]})},_n=S.memo(Go),Ko=()=>({formatJSON:t=>JSON.stringify(t??{},null,2)}),Mn={fullHeight:{height:"100%"}},Jo=({value:e,onChange:t})=>{const{formatJSON:r}=Ko();return i.jsxs("div",{style:Mn.fullHeight,children:[i.jsx(d.GlobalStyles,{styles:{".cm-activeLine.cm-line, .cm-gutterElement.cm-activeLineGutter":{backgroundColor:"transparent"}}}),i.jsx(bo,{editable:!0,value:r(e),extensions:[ho.json()],theme:mo.dracula,height:"100%",style:Mn.fullHeight,onChange:t})]})},Dn=e=>e,Qo=(()=>{let e=Dn;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Dn}}})();function Qe(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}function ot(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Qe(7));return e.charAt(0).toUpperCase()+e.slice(1)}var ar={exports:{}},or={exports:{}},X={};/** @license React v16.13.1
33
25
  * react-is.production.min.js
34
26
  *
35
27
  * Copyright (c) Facebook, Inc. and its affiliates.
36
28
  *
37
29
  * This source code is licensed under the MIT license found in the
38
30
  * LICENSE file in the root directory of this source tree.
39
- */var ao;function Rl(){if(ao)return ne;ao=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function $(x){if(typeof x=="object"&&x!==null){var A=x.$$typeof;switch(A){case t:switch(x=x.type,x){case c:case f:case r:case o:case a:case m:return x;default:switch(x=x&&x.$$typeof,x){case l:case h:case v:case g:case s:return x;default:return A}}case n:return A}}}function M(x){return $(x)===f}return ne.AsyncMode=c,ne.ConcurrentMode=f,ne.ContextConsumer=l,ne.ContextProvider=s,ne.Element=t,ne.ForwardRef=h,ne.Fragment=r,ne.Lazy=v,ne.Memo=g,ne.Portal=n,ne.Profiler=o,ne.StrictMode=a,ne.Suspense=m,ne.isAsyncMode=function(x){return M(x)||$(x)===c},ne.isConcurrentMode=M,ne.isContextConsumer=function(x){return $(x)===l},ne.isContextProvider=function(x){return $(x)===s},ne.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},ne.isForwardRef=function(x){return $(x)===h},ne.isFragment=function(x){return $(x)===r},ne.isLazy=function(x){return $(x)===v},ne.isMemo=function(x){return $(x)===g},ne.isPortal=function(x){return $(x)===n},ne.isProfiler=function(x){return $(x)===o},ne.isStrictMode=function(x){return $(x)===a},ne.isSuspense=function(x){return $(x)===m},ne.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===f||x===o||x===a||x===m||x===b||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===g||x.$$typeof===s||x.$$typeof===l||x.$$typeof===h||x.$$typeof===y||x.$$typeof===w||x.$$typeof===j||x.$$typeof===u)},ne.typeOf=$,ne}var ae={};/** @license React v16.13.1
31
+ */var In;function Xo(){if(In)return X;In=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,b=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,C=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,c=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,k=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function j(T){if(typeof T=="object"&&T!==null){var I=T.$$typeof;switch(I){case t:switch(T=T.type,T){case f:case p:case n:case o:case a:case b:return T;default:switch(T=T&&T.$$typeof,T){case l:case m:case y:case C:case s:return T;default:return I}}case r:return I}}}function P(T){return j(T)===p}return X.AsyncMode=f,X.ConcurrentMode=p,X.ContextConsumer=l,X.ContextProvider=s,X.Element=t,X.ForwardRef=m,X.Fragment=n,X.Lazy=y,X.Memo=C,X.Portal=r,X.Profiler=o,X.StrictMode=a,X.Suspense=b,X.isAsyncMode=function(T){return P(T)||j(T)===f},X.isConcurrentMode=P,X.isContextConsumer=function(T){return j(T)===l},X.isContextProvider=function(T){return j(T)===s},X.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},X.isForwardRef=function(T){return j(T)===m},X.isFragment=function(T){return j(T)===n},X.isLazy=function(T){return j(T)===y},X.isMemo=function(T){return j(T)===C},X.isPortal=function(T){return j(T)===r},X.isProfiler=function(T){return j(T)===o},X.isStrictMode=function(T){return j(T)===a},X.isSuspense=function(T){return j(T)===b},X.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===n||T===p||T===o||T===a||T===b||T===g||typeof T=="object"&&T!==null&&(T.$$typeof===y||T.$$typeof===C||T.$$typeof===s||T.$$typeof===l||T.$$typeof===m||T.$$typeof===v||T.$$typeof===k||T.$$typeof===O||T.$$typeof===c)},X.typeOf=j,X}var Z={};/** @license React v16.13.1
40
32
  * react-is.development.js
41
33
  *
42
34
  * Copyright (c) Facebook, Inc. and its affiliates.
43
35
  *
44
36
  * This source code is licensed under the MIT license found in the
45
37
  * LICENSE file in the root directory of this source tree.
46
- */var oo;function Sl(){return oo||(oo=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function $(O){return typeof O=="string"||typeof O=="function"||O===r||O===f||O===o||O===a||O===m||O===b||typeof O=="object"&&O!==null&&(O.$$typeof===v||O.$$typeof===g||O.$$typeof===s||O.$$typeof===l||O.$$typeof===h||O.$$typeof===y||O.$$typeof===w||O.$$typeof===j||O.$$typeof===u)}function M(O){if(typeof O=="object"&&O!==null){var ke=O.$$typeof;switch(ke){case t:var He=O.type;switch(He){case c:case f:case r:case o:case a:case m:return He;default:var Ue=He&&He.$$typeof;switch(Ue){case l:case h:case v:case g:case s:return Ue;default:return ke}}case n:return ke}}}var x=c,A=f,F=l,be=s,Ie=t,ee=h,te=r,he=v,de=g,se=n,Be=o,Te=a,ce=m,Ve=!1;function tt(O){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.")),E(O)||M(O)===c}function E(O){return M(O)===f}function S(O){return M(O)===l}function z(O){return M(O)===s}function N(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function P(O){return M(O)===h}function Y(O){return M(O)===r}function D(O){return M(O)===v}function V(O){return M(O)===g}function B(O){return M(O)===n}function G(O){return M(O)===o}function U(O){return M(O)===a}function je(O){return M(O)===m}ae.AsyncMode=x,ae.ConcurrentMode=A,ae.ContextConsumer=F,ae.ContextProvider=be,ae.Element=Ie,ae.ForwardRef=ee,ae.Fragment=te,ae.Lazy=he,ae.Memo=de,ae.Portal=se,ae.Profiler=Be,ae.StrictMode=Te,ae.Suspense=ce,ae.isAsyncMode=tt,ae.isConcurrentMode=E,ae.isContextConsumer=S,ae.isContextProvider=z,ae.isElement=N,ae.isForwardRef=P,ae.isFragment=Y,ae.isLazy=D,ae.isMemo=V,ae.isPortal=B,ae.isProfiler=G,ae.isStrictMode=U,ae.isSuspense=je,ae.isValidElementType=$,ae.typeOf=M}()),ae}var so;function $n(){return so||(so=1,process.env.NODE_ENV==="production"?Mr.exports=Rl():Mr.exports=Sl()),Mr.exports}/*
38
+ */var Nn;function Zo(){return Nn||(Nn=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,b=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,C=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,c=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,k=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function j(A){return typeof A=="string"||typeof A=="function"||A===n||A===p||A===o||A===a||A===b||A===g||typeof A=="object"&&A!==null&&(A.$$typeof===y||A.$$typeof===C||A.$$typeof===s||A.$$typeof===l||A.$$typeof===m||A.$$typeof===v||A.$$typeof===k||A.$$typeof===O||A.$$typeof===c)}function P(A){if(typeof A=="object"&&A!==null){var Se=A.$$typeof;switch(Se){case t:var Fe=A.type;switch(Fe){case f:case p:case n:case o:case a:case b:return Fe;default:var lt=Fe&&Fe.$$typeof;switch(lt){case l:case m:case y:case C:case s:return lt;default:return Se}}case r:return Se}}}var T=f,I=p,$=l,G=s,H=t,u=m,R=n,Y=y,B=C,he=r,se=o,ue=a,ve=b,je=!1;function Re(A){return je||(je=!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.")),h(A)||P(A)===f}function h(A){return P(A)===p}function w(A){return P(A)===l}function _(A){return P(A)===s}function M(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function N(A){return P(A)===m}function L(A){return P(A)===n}function z(A){return P(A)===y}function q(A){return P(A)===C}function F(A){return P(A)===r}function W(A){return P(A)===o}function U(A){return P(A)===a}function de(A){return P(A)===b}Z.AsyncMode=T,Z.ConcurrentMode=I,Z.ContextConsumer=$,Z.ContextProvider=G,Z.Element=H,Z.ForwardRef=u,Z.Fragment=R,Z.Lazy=Y,Z.Memo=B,Z.Portal=he,Z.Profiler=se,Z.StrictMode=ue,Z.Suspense=ve,Z.isAsyncMode=Re,Z.isConcurrentMode=h,Z.isContextConsumer=w,Z.isContextProvider=_,Z.isElement=M,Z.isForwardRef=N,Z.isFragment=L,Z.isLazy=z,Z.isMemo=q,Z.isPortal=F,Z.isProfiler=W,Z.isStrictMode=U,Z.isSuspense=de,Z.isValidElementType=j,Z.typeOf=P}()),Z}var Fn;function Bn(){return Fn||(Fn=1,process.env.NODE_ENV==="production"?or.exports=Xo():or.exports=Zo()),or.exports}/*
47
39
  object-assign
48
40
  (c) Sindre Sorhus
49
41
  @license MIT
50
- */var Mn,io;function kl(){if(io)return Mn;io=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function a(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},l=0;l<10;l++)s["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(s).map(function(h){return s[h]});if(c.join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(h){f[h]=h}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Mn=a()?Object.assign:function(o,s){for(var l,c=r(o),f,h=1;h<arguments.length;h++){l=Object(arguments[h]);for(var m in l)t.call(l,m)&&(c[m]=l[m]);if(e){f=e(l);for(var b=0;b<f.length;b++)n.call(l,f[b])&&(c[f[b]]=l[f[b]])}}return c},Mn}var Pn,lo;function An(){if(lo)return Pn;lo=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Pn=e,Pn}var Dn,uo;function co(){return uo||(uo=1,Dn=Function.call.bind(Object.prototype.hasOwnProperty)),Dn}var In,fo;function $l(){if(fo)return In;fo=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=An(),n={},r=co();e=function(o){var s="Warning: "+o;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function a(o,s,l,c,f){if(process.env.NODE_ENV!=="production"){for(var h in o)if(r(o,h)){var m;try{if(typeof o[h]!="function"){var b=Error((c||"React class")+": "+l+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}m=o[h](s,h,c,l,null,t)}catch(v){m=v}if(m&&!(m instanceof Error)&&e((c||"React class")+": type specification of "+l+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in n)){n[m.message]=!0;var g=f?f():"";e("Failed "+l+" type: "+m.message+(g??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},In=a,In}var Fn,po;function Ml(){if(po)return Fn;po=1;var e=$n(),t=kl(),n=An(),r=co(),a=$l(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(l){var c="Warning: "+l;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function s(){return null}return Fn=function(l,c){var f=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function m(E){var S=E&&(f&&E[f]||E[h]);if(typeof S=="function")return S}var b="<<anonymous>>",g={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:j(),arrayOf:$,element:M(),elementType:x(),instanceOf:A,node:ee(),objectOf:be,oneOf:F,oneOfType:Ie,shape:he,exact:de};function v(E,S){return E===S?E!==0||1/E===1/S:E!==E&&S!==S}function u(E,S){this.message=E,this.data=S&&typeof S=="object"?S:{},this.stack=""}u.prototype=Error.prototype;function y(E){if(process.env.NODE_ENV!=="production")var S={},z=0;function N(Y,D,V,B,G,U,je){if(B=B||b,U=U||V,je!==n){if(c){var O=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 O.name="Invariant Violation",O}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ke=B+":"+V;!S[ke]&&z<3&&(o("You are manually calling a React.PropTypes validation function for the `"+U+"` prop on `"+B+"`. 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."),S[ke]=!0,z++)}}return D[V]==null?Y?D[V]===null?new u("The "+G+" `"+U+"` is marked as required "+("in `"+B+"`, but its value is `null`.")):new u("The "+G+" `"+U+"` is marked as required in "+("`"+B+"`, but its value is `undefined`.")):null:E(D,V,B,G,U)}var P=N.bind(null,!1);return P.isRequired=N.bind(null,!0),P}function w(E){function S(z,N,P,Y,D,V){var B=z[N],G=Te(B);if(G!==E){var U=ce(B);return new u("Invalid "+Y+" `"+D+"` of type "+("`"+U+"` supplied to `"+P+"`, expected ")+("`"+E+"`."),{expectedType:E})}return null}return y(S)}function j(){return y(s)}function $(E){function S(z,N,P,Y,D){if(typeof E!="function")return new u("Property `"+D+"` of component `"+P+"` has invalid PropType notation inside arrayOf.");var V=z[N];if(!Array.isArray(V)){var B=Te(V);return new u("Invalid "+Y+" `"+D+"` of type "+("`"+B+"` supplied to `"+P+"`, expected an array."))}for(var G=0;G<V.length;G++){var U=E(V,G,P,Y,D+"["+G+"]",n);if(U instanceof Error)return U}return null}return y(S)}function M(){function E(S,z,N,P,Y){var D=S[z];if(!l(D)){var V=Te(D);return new u("Invalid "+P+" `"+Y+"` of type "+("`"+V+"` supplied to `"+N+"`, expected a single ReactElement."))}return null}return y(E)}function x(){function E(S,z,N,P,Y){var D=S[z];if(!e.isValidElementType(D)){var V=Te(D);return new u("Invalid "+P+" `"+Y+"` of type "+("`"+V+"` supplied to `"+N+"`, expected a single ReactElement type."))}return null}return y(E)}function A(E){function S(z,N,P,Y,D){if(!(z[N]instanceof E)){var V=E.name||b,B=tt(z[N]);return new u("Invalid "+Y+" `"+D+"` of type "+("`"+B+"` supplied to `"+P+"`, expected ")+("instance of `"+V+"`."))}return null}return y(S)}function F(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("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])."):o("Invalid argument supplied to oneOf, expected an array.")),s;function S(z,N,P,Y,D){for(var V=z[N],B=0;B<E.length;B++)if(v(V,E[B]))return null;var G=JSON.stringify(E,function(je,O){var ke=ce(O);return ke==="symbol"?String(O):O});return new u("Invalid "+Y+" `"+D+"` of value `"+String(V)+"` "+("supplied to `"+P+"`, expected one of "+G+"."))}return y(S)}function be(E){function S(z,N,P,Y,D){if(typeof E!="function")return new u("Property `"+D+"` of component `"+P+"` has invalid PropType notation inside objectOf.");var V=z[N],B=Te(V);if(B!=="object")return new u("Invalid "+Y+" `"+D+"` of type "+("`"+B+"` supplied to `"+P+"`, expected an object."));for(var G in V)if(r(V,G)){var U=E(V,G,P,Y,D+"."+G,n);if(U instanceof Error)return U}return null}return y(S)}function Ie(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var S=0;S<E.length;S++){var z=E[S];if(typeof z!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ve(z)+" at index "+S+"."),s}function N(P,Y,D,V,B){for(var G=[],U=0;U<E.length;U++){var je=E[U],O=je(P,Y,D,V,B,n);if(O==null)return null;O.data&&r(O.data,"expectedType")&&G.push(O.data.expectedType)}var ke=G.length>0?", expected one of type ["+G.join(", ")+"]":"";return new u("Invalid "+V+" `"+B+"` supplied to "+("`"+D+"`"+ke+"."))}return y(N)}function ee(){function E(S,z,N,P,Y){return se(S[z])?null:new u("Invalid "+P+" `"+Y+"` supplied to "+("`"+N+"`, expected a ReactNode."))}return y(E)}function te(E,S,z,N,P){return new u((E||"React class")+": "+S+" type `"+z+"."+N+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+P+"`.")}function he(E){function S(z,N,P,Y,D){var V=z[N],B=Te(V);if(B!=="object")return new u("Invalid "+Y+" `"+D+"` of type `"+B+"` "+("supplied to `"+P+"`, expected `object`."));for(var G in E){var U=E[G];if(typeof U!="function")return te(P,Y,D,G,ce(U));var je=U(V,G,P,Y,D+"."+G,n);if(je)return je}return null}return y(S)}function de(E){function S(z,N,P,Y,D){var V=z[N],B=Te(V);if(B!=="object")return new u("Invalid "+Y+" `"+D+"` of type `"+B+"` "+("supplied to `"+P+"`, expected `object`."));var G=t({},z[N],E);for(var U in G){var je=E[U];if(r(E,U)&&typeof je!="function")return te(P,Y,D,U,ce(je));if(!je)return new u("Invalid "+Y+" `"+D+"` key `"+U+"` supplied to `"+P+"`.\nBad object: "+JSON.stringify(z[N],null," ")+`
51
- Valid keys: `+JSON.stringify(Object.keys(E),null," "));var O=je(V,U,P,Y,D+"."+U,n);if(O)return O}return null}return y(S)}function se(E){switch(typeof E){case"number":case"string":case"undefined":return!0;case"boolean":return!E;case"object":if(Array.isArray(E))return E.every(se);if(E===null||l(E))return!0;var S=m(E);if(S){var z=S.call(E),N;if(S!==E.entries){for(;!(N=z.next()).done;)if(!se(N.value))return!1}else for(;!(N=z.next()).done;){var P=N.value;if(P&&!se(P[1]))return!1}}else return!1;return!0;default:return!1}}function Be(E,S){return E==="symbol"?!0:S?S["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&S instanceof Symbol:!1}function Te(E){var S=typeof E;return Array.isArray(E)?"array":E instanceof RegExp?"object":Be(S,E)?"symbol":S}function ce(E){if(typeof E>"u"||E===null)return""+E;var S=Te(E);if(S==="object"){if(E instanceof Date)return"date";if(E instanceof RegExp)return"regexp"}return S}function Ve(E){var S=ce(E);switch(S){case"array":case"object":return"an "+S;case"boolean":case"date":case"regexp":return"a "+S;default:return S}}function tt(E){return!E.constructor||!E.constructor.name?b:E.constructor.name}return g.checkPropTypes=a,g.resetWarningCache=a.resetWarningCache,g.PropTypes=g,g},Fn}var Ln,ho;function Pl(){if(ho)return Ln;ho=1;var e=An();function t(){}function n(){}return n.resetWarningCache=t,Ln=function(){function r(s,l,c,f,h,m){if(m!==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}}r.isRequired=r;function a(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Ln}if(process.env.NODE_ENV!=="production"){var Al=$n(),Dl=!0;kn.exports=Ml()(Al.isElement,Dl)}else kn.exports=Pl()();var Il=kn.exports;const W=Yi(Il);function rr(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const Fl=Object.freeze(Object.defineProperty({__proto__:null,default:rr},Symbol.toStringTag,{value:"Module"}));var Bn={exports:{}},ie={};/**
42
+ */var Lr,Ln;function ei(){if(Ln)return Lr;Ln=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function a(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},l=0;l<10;l++)s["_"+String.fromCharCode(l)]=l;var f=Object.getOwnPropertyNames(s).map(function(m){return s[m]});if(f.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(m){p[m]=m}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Lr=a()?Object.assign:function(o,s){for(var l,f=n(o),p,m=1;m<arguments.length;m++){l=Object(arguments[m]);for(var b in l)t.call(l,b)&&(f[b]=l[b]);if(e){p=e(l);for(var g=0;g<p.length;g++)r.call(l,p[g])&&(f[p[g]]=l[p[g]])}}return f},Lr}var Vr,Vn;function zr(){if(Vn)return Vr;Vn=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Vr=e,Vr}var qr,zn;function qn(){return zn||(zn=1,qr=Function.call.bind(Object.prototype.hasOwnProperty)),qr}var Hr,Hn;function ti(){if(Hn)return Hr;Hn=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=zr(),r={},n=qn();e=function(o){var s="Warning: "+o;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function a(o,s,l,f,p){if(process.env.NODE_ENV!=="production"){for(var m in o)if(n(o,m)){var b;try{if(typeof o[m]!="function"){var g=Error((f||"React class")+": "+l+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}b=o[m](s,m,f,l,null,t)}catch(y){b=y}if(b&&!(b instanceof Error)&&e((f||"React class")+": type specification of "+l+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof b+". 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 instanceof Error&&!(b.message in r)){r[b.message]=!0;var C=p?p():"";e("Failed "+l+" type: "+b.message+(C??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Hr=a,Hr}var Wr,Wn;function ri(){if(Wn)return Wr;Wn=1;var e=Bn(),t=ei(),r=zr(),n=qn(),a=ti(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(l){var f="Warning: "+l;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}});function s(){return null}return Wr=function(l,f){var p=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function b(h){var w=h&&(p&&h[p]||h[m]);if(typeof w=="function")return w}var g="<<anonymous>>",C={array:k("array"),bigint:k("bigint"),bool:k("boolean"),func:k("function"),number:k("number"),object:k("object"),string:k("string"),symbol:k("symbol"),any:O(),arrayOf:j,element:P(),elementType:T(),instanceOf:I,node:u(),objectOf:G,oneOf:$,oneOfType:H,shape:Y,exact:B};function y(h,w){return h===w?h!==0||1/h===1/w:h!==h&&w!==w}function c(h,w){this.message=h,this.data=w&&typeof w=="object"?w:{},this.stack=""}c.prototype=Error.prototype;function v(h){if(process.env.NODE_ENV!=="production")var w={},_=0;function M(L,z,q,F,W,U,de){if(F=F||g,U=U||q,de!==r){if(f){var A=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 A.name="Invariant Violation",A}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Se=F+":"+q;!w[Se]&&_<3&&(o("You are manually calling a React.PropTypes validation function for the `"+U+"` prop on `"+F+"`. 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."),w[Se]=!0,_++)}}return z[q]==null?L?z[q]===null?new c("The "+W+" `"+U+"` is marked as required "+("in `"+F+"`, but its value is `null`.")):new c("The "+W+" `"+U+"` is marked as required in "+("`"+F+"`, but its value is `undefined`.")):null:h(z,q,F,W,U)}var N=M.bind(null,!1);return N.isRequired=M.bind(null,!0),N}function k(h){function w(_,M,N,L,z,q){var F=_[M],W=ue(F);if(W!==h){var U=ve(F);return new c("Invalid "+L+" `"+z+"` of type "+("`"+U+"` supplied to `"+N+"`, expected ")+("`"+h+"`."),{expectedType:h})}return null}return v(w)}function O(){return v(s)}function j(h){function w(_,M,N,L,z){if(typeof h!="function")return new c("Property `"+z+"` of component `"+N+"` has invalid PropType notation inside arrayOf.");var q=_[M];if(!Array.isArray(q)){var F=ue(q);return new c("Invalid "+L+" `"+z+"` of type "+("`"+F+"` supplied to `"+N+"`, expected an array."))}for(var W=0;W<q.length;W++){var U=h(q,W,N,L,z+"["+W+"]",r);if(U instanceof Error)return U}return null}return v(w)}function P(){function h(w,_,M,N,L){var z=w[_];if(!l(z)){var q=ue(z);return new c("Invalid "+N+" `"+L+"` of type "+("`"+q+"` supplied to `"+M+"`, expected a single ReactElement."))}return null}return v(h)}function T(){function h(w,_,M,N,L){var z=w[_];if(!e.isValidElementType(z)){var q=ue(z);return new c("Invalid "+N+" `"+L+"` of type "+("`"+q+"` supplied to `"+M+"`, expected a single ReactElement type."))}return null}return v(h)}function I(h){function w(_,M,N,L,z){if(!(_[M]instanceof h)){var q=h.name||g,F=Re(_[M]);return new c("Invalid "+L+" `"+z+"` of type "+("`"+F+"` supplied to `"+N+"`, expected ")+("instance of `"+q+"`."))}return null}return v(w)}function $(h){if(!Array.isArray(h))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("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])."):o("Invalid argument supplied to oneOf, expected an array.")),s;function w(_,M,N,L,z){for(var q=_[M],F=0;F<h.length;F++)if(y(q,h[F]))return null;var W=JSON.stringify(h,function(de,A){var Se=ve(A);return Se==="symbol"?String(A):A});return new c("Invalid "+L+" `"+z+"` of value `"+String(q)+"` "+("supplied to `"+N+"`, expected one of "+W+"."))}return v(w)}function G(h){function w(_,M,N,L,z){if(typeof h!="function")return new c("Property `"+z+"` of component `"+N+"` has invalid PropType notation inside objectOf.");var q=_[M],F=ue(q);if(F!=="object")return new c("Invalid "+L+" `"+z+"` of type "+("`"+F+"` supplied to `"+N+"`, expected an object."));for(var W in q)if(n(q,W)){var U=h(q,W,N,L,z+"."+W,r);if(U instanceof Error)return U}return null}return v(w)}function H(h){if(!Array.isArray(h))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var w=0;w<h.length;w++){var _=h[w];if(typeof _!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+je(_)+" at index "+w+"."),s}function M(N,L,z,q,F){for(var W=[],U=0;U<h.length;U++){var de=h[U],A=de(N,L,z,q,F,r);if(A==null)return null;A.data&&n(A.data,"expectedType")&&W.push(A.data.expectedType)}var Se=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new c("Invalid "+q+" `"+F+"` supplied to "+("`"+z+"`"+Se+"."))}return v(M)}function u(){function h(w,_,M,N,L){return he(w[_])?null:new c("Invalid "+N+" `"+L+"` supplied to "+("`"+M+"`, expected a ReactNode."))}return v(h)}function R(h,w,_,M,N){return new c((h||"React class")+": "+w+" type `"+_+"."+M+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+N+"`.")}function Y(h){function w(_,M,N,L,z){var q=_[M],F=ue(q);if(F!=="object")return new c("Invalid "+L+" `"+z+"` of type `"+F+"` "+("supplied to `"+N+"`, expected `object`."));for(var W in h){var U=h[W];if(typeof U!="function")return R(N,L,z,W,ve(U));var de=U(q,W,N,L,z+"."+W,r);if(de)return de}return null}return v(w)}function B(h){function w(_,M,N,L,z){var q=_[M],F=ue(q);if(F!=="object")return new c("Invalid "+L+" `"+z+"` of type `"+F+"` "+("supplied to `"+N+"`, expected `object`."));var W=t({},_[M],h);for(var U in W){var de=h[U];if(n(h,U)&&typeof de!="function")return R(N,L,z,U,ve(de));if(!de)return new c("Invalid "+L+" `"+z+"` key `"+U+"` supplied to `"+N+"`.\nBad object: "+JSON.stringify(_[M],null," ")+`
43
+ Valid keys: `+JSON.stringify(Object.keys(h),null," "));var A=de(q,U,N,L,z+"."+U,r);if(A)return A}return null}return v(w)}function he(h){switch(typeof h){case"number":case"string":case"undefined":return!0;case"boolean":return!h;case"object":if(Array.isArray(h))return h.every(he);if(h===null||l(h))return!0;var w=b(h);if(w){var _=w.call(h),M;if(w!==h.entries){for(;!(M=_.next()).done;)if(!he(M.value))return!1}else for(;!(M=_.next()).done;){var N=M.value;if(N&&!he(N[1]))return!1}}else return!1;return!0;default:return!1}}function se(h,w){return h==="symbol"?!0:w?w["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&w instanceof Symbol:!1}function ue(h){var w=typeof h;return Array.isArray(h)?"array":h instanceof RegExp?"object":se(w,h)?"symbol":w}function ve(h){if(typeof h>"u"||h===null)return""+h;var w=ue(h);if(w==="object"){if(h instanceof Date)return"date";if(h instanceof RegExp)return"regexp"}return w}function je(h){var w=ve(h);switch(w){case"array":case"object":return"an "+w;case"boolean":case"date":case"regexp":return"a "+w;default:return w}}function Re(h){return!h.constructor||!h.constructor.name?g:h.constructor.name}return C.checkPropTypes=a,C.resetWarningCache=a.resetWarningCache,C.PropTypes=C,C},Wr}var Ur,Un;function ni(){if(Un)return Ur;Un=1;var e=zr();function t(){}function r(){}return r.resetWarningCache=t,Ur=function(){function n(s,l,f,p,m,b){if(b!==e){var g=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 g.name="Invariant Violation",g}}n.isRequired=n;function a(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},Ur}var Yn;function ai(){if(Yn)return ar.exports;if(Yn=1,process.env.NODE_ENV!=="production"){var e=Bn(),t=!0;ar.exports=ri()(e.isElement,t)}else ar.exports=ni()();return ar.exports}var oi=ai();const K=xo(oi);function Gn(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Gn(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Kn(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Gn(e))&&(n&&(n+=" "),n+=t);return n}function ii(e,t,r=void 0){const n={};for(const a in e){const o=e[a];let s="",l=!0;for(let f=0;f<o.length;f+=1){const p=o[f];p&&(s+=(l===!0?"":" ")+t(p),l=!1,r&&r[p]&&(s+=" "+r[p]))}n[a]=s}return n}var ir={exports:{}},te={};/**
52
44
  * @license React
53
45
  * react-is.production.js
54
46
  *
@@ -56,7 +48,7 @@ Valid keys: `+JSON.stringify(Object.keys(E),null," "));var O=je(V,U,P,Y,D+"."+U
56
48
  *
57
49
  * This source code is licensed under the MIT license found in the
58
50
  * LICENSE file in the root directory of this source tree.
59
- */var mo;function Ll(){if(mo)return ie;mo=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),g=Symbol.for("react.client.reference");function v(u){if(typeof u=="object"&&u!==null){var y=u.$$typeof;switch(y){case e:switch(u=u.type,u){case n:case a:case r:case c:case f:return u;default:switch(u=u&&u.$$typeof,u){case s:case l:case m:case h:return u;case o:return u;default:return y}}case t:return y}}}return ie.ContextConsumer=o,ie.ContextProvider=s,ie.Element=e,ie.ForwardRef=l,ie.Fragment=n,ie.Lazy=m,ie.Memo=h,ie.Portal=t,ie.Profiler=a,ie.StrictMode=r,ie.Suspense=c,ie.SuspenseList=f,ie.isContextConsumer=function(u){return v(u)===o},ie.isContextProvider=function(u){return v(u)===s},ie.isElement=function(u){return typeof u=="object"&&u!==null&&u.$$typeof===e},ie.isForwardRef=function(u){return v(u)===l},ie.isFragment=function(u){return v(u)===n},ie.isLazy=function(u){return v(u)===m},ie.isMemo=function(u){return v(u)===h},ie.isPortal=function(u){return v(u)===t},ie.isProfiler=function(u){return v(u)===a},ie.isStrictMode=function(u){return v(u)===r},ie.isSuspense=function(u){return v(u)===c},ie.isSuspenseList=function(u){return v(u)===f},ie.isValidElementType=function(u){return typeof u=="string"||typeof u=="function"||u===n||u===a||u===r||u===c||u===f||u===b||typeof u=="object"&&u!==null&&(u.$$typeof===m||u.$$typeof===h||u.$$typeof===s||u.$$typeof===o||u.$$typeof===l||u.$$typeof===g||u.getModuleId!==void 0)},ie.typeOf=v,ie}var le={};/**
51
+ */var Jn;function si(){if(Jn)return te;Jn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),C=Symbol.for("react.client.reference");function y(c){if(typeof c=="object"&&c!==null){var v=c.$$typeof;switch(v){case e:switch(c=c.type,c){case r:case a:case n:case f:case p:case g:return c;default:switch(c=c&&c.$$typeof,c){case s:case l:case b:case m:return c;case o:return c;default:return v}}case t:return v}}}return te.ContextConsumer=o,te.ContextProvider=s,te.Element=e,te.ForwardRef=l,te.Fragment=r,te.Lazy=b,te.Memo=m,te.Portal=t,te.Profiler=a,te.StrictMode=n,te.Suspense=f,te.SuspenseList=p,te.isContextConsumer=function(c){return y(c)===o},te.isContextProvider=function(c){return y(c)===s},te.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===e},te.isForwardRef=function(c){return y(c)===l},te.isFragment=function(c){return y(c)===r},te.isLazy=function(c){return y(c)===b},te.isMemo=function(c){return y(c)===m},te.isPortal=function(c){return y(c)===t},te.isProfiler=function(c){return y(c)===a},te.isStrictMode=function(c){return y(c)===n},te.isSuspense=function(c){return y(c)===f},te.isSuspenseList=function(c){return y(c)===p},te.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===r||c===a||c===n||c===f||c===p||typeof c=="object"&&c!==null&&(c.$$typeof===b||c.$$typeof===m||c.$$typeof===s||c.$$typeof===o||c.$$typeof===l||c.$$typeof===C||c.getModuleId!==void 0)},te.typeOf=y,te}var re={};/**
60
52
  * @license React
61
53
  * react-is.development.js
62
54
  *
@@ -64,24 +56,23 @@ Valid keys: `+JSON.stringify(Object.keys(E),null," "));var O=je(V,U,P,Y,D+"."+U
64
56
  *
65
57
  * This source code is licensed under the MIT license found in the
66
58
  * LICENSE file in the root directory of this source tree.
67
- */var bo;function Bl(){return bo||(bo=1,process.env.NODE_ENV!=="production"&&function(){function e(u){if(typeof u=="object"&&u!==null){var y=u.$$typeof;switch(y){case t:switch(u=u.type,u){case r:case o:case a:case f:case h:return u;default:switch(u=u&&u.$$typeof,u){case l:case c:case b:case m:return u;case s:return u;default:return y}}case n:return y}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),v=Symbol.for("react.client.reference");le.ContextConsumer=s,le.ContextProvider=l,le.Element=t,le.ForwardRef=c,le.Fragment=r,le.Lazy=b,le.Memo=m,le.Portal=n,le.Profiler=o,le.StrictMode=a,le.Suspense=f,le.SuspenseList=h,le.isContextConsumer=function(u){return e(u)===s},le.isContextProvider=function(u){return e(u)===l},le.isElement=function(u){return typeof u=="object"&&u!==null&&u.$$typeof===t},le.isForwardRef=function(u){return e(u)===c},le.isFragment=function(u){return e(u)===r},le.isLazy=function(u){return e(u)===b},le.isMemo=function(u){return e(u)===m},le.isPortal=function(u){return e(u)===n},le.isProfiler=function(u){return e(u)===o},le.isStrictMode=function(u){return e(u)===a},le.isSuspense=function(u){return e(u)===f},le.isSuspenseList=function(u){return e(u)===h},le.isValidElementType=function(u){return typeof u=="string"||typeof u=="function"||u===r||u===o||u===a||u===f||u===h||u===g||typeof u=="object"&&u!==null&&(u.$$typeof===b||u.$$typeof===m||u.$$typeof===l||u.$$typeof===s||u.$$typeof===c||u.$$typeof===v||u.getModuleId!==void 0)},le.typeOf=e}()),le}process.env.NODE_ENV==="production"?Bn.exports=Ll():Bn.exports=Bl();var vo=Bn.exports;const Vl=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function go(e){const t=`${e}`.match(Vl);return t&&t[1]||""}function yo(e,t=""){return e.displayName||e.name||go(e)||t}function xo(e,t,n){const r=yo(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function ql(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return yo(e,"Component");if(typeof e=="object")switch(e.$$typeof){case vo.ForwardRef:return xo(e,e.render,"ForwardRef");case vo.Memo:return xo(e,e.type,"memo");default:return}}}const zl=Object.freeze(Object.defineProperty({__proto__:null,default:ql,getFunctionName:go},Symbol.toStringTag,{value:"Module"}));function Ct(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":rr(7));return e.charAt(0).toUpperCase()+e.slice(1)}const Nl=Object.freeze(Object.defineProperty({__proto__:null,default:Ct},Symbol.toStringTag,{value:"Module"}));function Ul(...e){return e.reduce((t,n)=>n==null?t:function(...a){t.apply(this,a),n.apply(this,a)},()=>{})}function Wl(e,t=166){let n;function r(...a){const o=()=>{e.apply(this,a)};clearTimeout(n),n=setTimeout(o,t)}return r.clear=()=>{clearTimeout(n)},r}function Yl(e,t){return process.env.NODE_ENV==="production"?()=>null:(n,r,a,o,s)=>{const l=a||"<<anonymous>>",c=s||r;return typeof n[r]<"u"?new Error(`The ${o} \`${c}\` of \`${l}\` is deprecated. ${t}`):null}}function Kl(e,t){var n,r;return q.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Co(e){return e&&e.ownerDocument||document}function Gl(e){return Co(e).defaultView||window}function Jl(e,t){if(process.env.NODE_ENV==="production")return()=>null;const n=t?re({},t.propTypes):null;return a=>(o,s,l,c,f,...h)=>{const m=f||s,b=n==null?void 0:n[m];if(b){const g=b(o,s,l,c,f,...h);if(g)return g}return typeof o[s]<"u"&&!o[a]?new Error(`The prop \`${m}\` of \`${e}\` can only be used together with the \`${a}\` prop.`):null}}function To(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const _o=typeof window<"u"?q.useLayoutEffect:q.useEffect;let Eo=0;function Xl(e){const[t,n]=q.useState(e),r=e||t;return q.useEffect(()=>{t==null&&(Eo+=1,n(`mui-${Eo}`))},[t]),r}const wo=q.useId;function Zl(e){if(wo!==void 0){const t=wo();return e??t}return Xl(e)}function Ql(e,t,n,r,a){if(process.env.NODE_ENV==="production")return null;const o=a||t;return typeof e[t]<"u"?new Error(`The prop \`${o}\` is not supported. Please remove it.`):null}function Hl({controlled:e,default:t,name:n,state:r="value"}){const{current:a}=q.useRef(e!==void 0),[o,s]=q.useState(t),l=a?e:o;if(process.env.NODE_ENV!=="production"){q.useEffect(()=>{a!==(e!==void 0)&&console.error([`MUI: A component is changing the ${a?"":"un"}controlled ${r} state of ${n} to be ${a?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
68
- `))},[r,n,e]);const{current:f}=q.useRef(t);q.useEffect(()=>{!a&&!Object.is(f,t)&&console.error([`MUI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
69
- `))},[JSON.stringify(t)])}const c=q.useCallback(f=>{a||s(f)},[]);return[l,c]}function eu(e){const t=q.useRef(e);return _o(()=>{t.current=e}),q.useRef((...n)=>(0,t.current)(...n)).current}function tu(...e){return q.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{To(n,t)})},e)}class Vn{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Vn}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}let Pr=!0,qn=!1;const ru=new Vn,nu={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function au(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&nu[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function ou(e){e.metaKey||e.altKey||e.ctrlKey||(Pr=!0)}function zn(){Pr=!1}function su(){this.visibilityState==="hidden"&&qn&&(Pr=!0)}function iu(e){e.addEventListener("keydown",ou,!0),e.addEventListener("mousedown",zn,!0),e.addEventListener("pointerdown",zn,!0),e.addEventListener("touchstart",zn,!0),e.addEventListener("visibilitychange",su,!0)}function lu(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Pr||au(t)}function uu(){const e=q.useCallback(a=>{a!=null&&iu(a.ownerDocument)},[]),t=q.useRef(!1);function n(){return t.current?(qn=!0,ru.start(100,()=>{qn=!1}),t.current=!1,!0):!1}function r(a){return lu(a)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Nn(e,t){const n=re({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=re({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const a=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=a:!a||!Object.keys(a)?n[r]=o:(n[r]=re({},o),Object.keys(a).forEach(s=>{n[r][s]=Nn(a[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function cu(e,t,n=void 0){const r={};return Object.keys(e).forEach(a=>{r[a]=e[a].reduce((o,s)=>{if(s){const l=t(s);l!==""&&o.push(l),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}const jo=e=>e,Oo=(()=>{let e=jo;return{configure(t){e=t},generate(t){return e(t)},reset(){e=jo}}})(),du={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 Un(e,t,n="Mui"){const r=du[t];return r?`${n}-${r}`:`${Oo.generate(e)}-${t}`}function fu(e,t,n="Mui"){const r={};return t.forEach(a=>{r[a]=Un(e,a,n)}),r}function pu(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const hu=Object.freeze(Object.defineProperty({__proto__:null,default:pu},Symbol.toStringTag,{value:"Module"}));function Tt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ro(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Ro(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function mu(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Ro(e))&&(r&&(r+=" "),r+=t);return r}const bu=q.createContext(void 0);process.env.NODE_ENV!=="production"&&(W.node,W.object);function vu(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const a=t.components[n];return a.defaultProps?Nn(a.defaultProps,r):!a.styleOverrides&&!a.variants?Nn(a,r):r}function gu({props:e,name:t}){const n=q.useContext(bu);return vu({props:e,name:t,theme:{components:n}})}process.env.NODE_ENV!=="production"&&(W.node,W.object.isRequired);function yu(e){return gu(e)}var nr={},Wn={exports:{}},So;function ko(){return So||(So=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var o in a)({}).hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Wn)),Wn.exports}var Yn={exports:{}},$o;function xu(){return $o||($o=1,function(e){function t(n,r){if(n==null)return{};var a={};for(var o in n)if({}.hasOwnProperty.call(n,o)){if(r.indexOf(o)!==-1)continue;a[o]=n[o]}return a}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Yn)),Yn.exports}function Cu(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Tu(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var _u=function(){function e(n){var r=this;this._insertTag=function(a){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(a,o),r.tags.push(a)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Tu(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Cu(a);try{o.insertRule(r,o.cssRules.length)}catch{}}else a.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var a;return(a=r.parentNode)==null?void 0:a.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Le="-ms-",Ar="-moz-",Q="-webkit-",Mo="comm",Kn="rule",Gn="decl",Eu="@import",Po="@keyframes",wu="@layer",ju=Math.abs,Dr=String.fromCharCode,Ou=Object.assign;function Ru(e,t){return De(e,0)^45?(((t<<2^De(e,0))<<2^De(e,1))<<2^De(e,2))<<2^De(e,3):0}function Ao(e){return e.trim()}function Su(e,t){return(e=t.exec(e))?e[0]:e}function H(e,t,n){return e.replace(t,n)}function Jn(e,t){return e.indexOf(t)}function De(e,t){return e.charCodeAt(t)|0}function ar(e,t,n){return e.slice(t,n)}function ot(e){return e.length}function Xn(e){return e.length}function Ir(e,t){return t.push(e),e}function ku(e,t){return e.map(t).join("")}var Fr=1,Lt=1,Do=0,Ne=0,Oe=0,Bt="";function Lr(e,t,n,r,a,o,s){return{value:e,root:t,parent:n,type:r,props:a,children:o,line:Fr,column:Lt,length:s,return:""}}function or(e,t){return Ou(Lr("",null,null,"",null,null,0),e,{length:-e.length},t)}function $u(){return Oe}function Mu(){return Oe=Ne>0?De(Bt,--Ne):0,Lt--,Oe===10&&(Lt=1,Fr--),Oe}function Ye(){return Oe=Ne<Do?De(Bt,Ne++):0,Lt++,Oe===10&&(Lt=1,Fr++),Oe}function st(){return De(Bt,Ne)}function Br(){return Ne}function sr(e,t){return ar(Bt,e,t)}function ir(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Io(e){return Fr=Lt=1,Do=ot(Bt=e),Ne=0,[]}function Fo(e){return Bt="",e}function Vr(e){return Ao(sr(Ne-1,Zn(e===91?e+2:e===40?e+1:e)))}function Pu(e){for(;(Oe=st())&&Oe<33;)Ye();return ir(e)>2||ir(Oe)>3?"":" "}function Au(e,t){for(;--t&&Ye()&&!(Oe<48||Oe>102||Oe>57&&Oe<65||Oe>70&&Oe<97););return sr(e,Br()+(t<6&&st()==32&&Ye()==32))}function Zn(e){for(;Ye();)switch(Oe){case e:return Ne;case 34:case 39:e!==34&&e!==39&&Zn(Oe);break;case 40:e===41&&Zn(e);break;case 92:Ye();break}return Ne}function Du(e,t){for(;Ye()&&e+Oe!==57;)if(e+Oe===84&&st()===47)break;return"/*"+sr(t,Ne-1)+"*"+Dr(e===47?e:Ye())}function Iu(e){for(;!ir(st());)Ye();return sr(e,Ne)}function Fu(e){return Fo(qr("",null,null,null,[""],e=Io(e),0,[0],e))}function qr(e,t,n,r,a,o,s,l,c){for(var f=0,h=0,m=s,b=0,g=0,v=0,u=1,y=1,w=1,j=0,$="",M=a,x=o,A=r,F=$;y;)switch(v=j,j=Ye()){case 40:if(v!=108&&De(F,m-1)==58){Jn(F+=H(Vr(j),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:F+=Vr(j);break;case 9:case 10:case 13:case 32:F+=Pu(v);break;case 92:F+=Au(Br()-1,7);continue;case 47:switch(st()){case 42:case 47:Ir(Lu(Du(Ye(),Br()),t,n),c);break;default:F+="/"}break;case 123*u:l[f++]=ot(F)*w;case 125*u:case 59:case 0:switch(j){case 0:case 125:y=0;case 59+h:w==-1&&(F=H(F,/\f/g,"")),g>0&&ot(F)-m&&Ir(g>32?Bo(F+";",r,n,m-1):Bo(H(F," ","")+";",r,n,m-2),c);break;case 59:F+=";";default:if(Ir(A=Lo(F,t,n,f,h,a,l,$,M=[],x=[],m),o),j===123)if(h===0)qr(F,t,A,A,M,o,m,l,x);else switch(b===99&&De(F,3)===110?100:b){case 100:case 108:case 109:case 115:qr(e,A,A,r&&Ir(Lo(e,A,A,0,0,a,l,$,a,M=[],m),x),a,x,m,l,r?M:x);break;default:qr(F,A,A,A,[""],x,0,l,x)}}f=h=g=0,u=w=1,$=F="",m=s;break;case 58:m=1+ot(F),g=v;default:if(u<1){if(j==123)--u;else if(j==125&&u++==0&&Mu()==125)continue}switch(F+=Dr(j),j*u){case 38:w=h>0?1:(F+="\f",-1);break;case 44:l[f++]=(ot(F)-1)*w,w=1;break;case 64:st()===45&&(F+=Vr(Ye())),b=st(),h=m=ot($=F+=Iu(Br())),j++;break;case 45:v===45&&ot(F)==2&&(u=0)}}return o}function Lo(e,t,n,r,a,o,s,l,c,f,h){for(var m=a-1,b=a===0?o:[""],g=Xn(b),v=0,u=0,y=0;v<r;++v)for(var w=0,j=ar(e,m+1,m=ju(u=s[v])),$=e;w<g;++w)($=Ao(u>0?b[w]+" "+j:H(j,/&\f/g,b[w])))&&(c[y++]=$);return Lr(e,t,n,a===0?Kn:l,c,f,h)}function Lu(e,t,n){return Lr(e,t,n,Mo,Dr($u()),ar(e,2,-2),0)}function Bo(e,t,n,r){return Lr(e,t,n,Gn,ar(e,0,r),ar(e,r+1,-1),r)}function Vt(e,t){for(var n="",r=Xn(e),a=0;a<r;a++)n+=t(e[a],a,e,t)||"";return n}function Bu(e,t,n,r){switch(e.type){case wu:if(e.children.length)break;case Eu:case Gn:return e.return=e.return||e.value;case Mo:return"";case Po:return e.return=e.value+"{"+Vt(e.children,r)+"}";case Kn:e.value=e.props.join(",")}return ot(n=Vt(e.children,r))?e.return=e.value+"{"+n+"}":""}function Vu(e){var t=Xn(e);return function(n,r,a,o){for(var s="",l=0;l<t;l++)s+=e[l](n,r,a,o)||"";return s}}function qu(e){return function(t){t.root||(t=t.return)&&e(t)}}function Vo(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var zu=function(t,n,r){for(var a=0,o=0;a=o,o=st(),a===38&&o===12&&(n[r]=1),!ir(o);)Ye();return sr(t,Ne)},Nu=function(t,n){var r=-1,a=44;do switch(ir(a)){case 0:a===38&&st()===12&&(n[r]=1),t[r]+=zu(Ne-1,n,r);break;case 2:t[r]+=Vr(a);break;case 4:if(a===44){t[++r]=st()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Dr(a)}while(a=Ye());return t},Uu=function(t,n){return Fo(Nu(Io(t),n))},qo=new WeakMap,Wu=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,a=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!qo.get(r))&&!a){qo.set(t,!0);for(var o=[],s=Uu(n,o),l=r.props,c=0,f=0;c<s.length;c++)for(var h=0;h<l.length;h++,f++)t.props[f]=o[c]?s[c].replace(/&\f/g,l[h]):l[h]+" "+s[c]}}},Yu=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function zo(e,t){switch(Ru(e,t)){case 5103:return Q+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Q+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Q+e+Ar+e+Le+e+e;case 6828:case 4268:return Q+e+Le+e+e;case 6165:return Q+e+Le+"flex-"+e+e;case 5187:return Q+e+H(e,/(\w+).+(:[^]+)/,Q+"box-$1$2"+Le+"flex-$1$2")+e;case 5443:return Q+e+Le+"flex-item-"+H(e,/flex-|-self/,"")+e;case 4675:return Q+e+Le+"flex-line-pack"+H(e,/align-content|flex-|-self/,"")+e;case 5548:return Q+e+Le+H(e,"shrink","negative")+e;case 5292:return Q+e+Le+H(e,"basis","preferred-size")+e;case 6060:return Q+"box-"+H(e,"-grow","")+Q+e+Le+H(e,"grow","positive")+e;case 4554:return Q+H(e,/([^-])(transform)/g,"$1"+Q+"$2")+e;case 6187:return H(H(H(e,/(zoom-|grab)/,Q+"$1"),/(image-set)/,Q+"$1"),e,"")+e;case 5495:case 3959:return H(e,/(image-set\([^]*)/,Q+"$1$`$1");case 4968:return H(H(e,/(.+:)(flex-)?(.*)/,Q+"box-pack:$3"+Le+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Q+e+e;case 4095:case 3583:case 4068:case 2532:return H(e,/(.+)-inline(.+)/,Q+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ot(e)-1-t>6)switch(De(e,t+1)){case 109:if(De(e,t+4)!==45)break;case 102:return H(e,/(.+:)(.+)-([^]+)/,"$1"+Q+"$2-$3$1"+Ar+(De(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Jn(e,"stretch")?zo(H(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(De(e,t+1)!==115)break;case 6444:switch(De(e,ot(e)-3-(~Jn(e,"!important")&&10))){case 107:return H(e,":",":"+Q)+e;case 101:return H(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Q+(De(e,14)===45?"inline-":"")+"box$3$1"+Q+"$2$3$1"+Le+"$2box$3")+e}break;case 5936:switch(De(e,t+11)){case 114:return Q+e+Le+H(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Q+e+Le+H(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Q+e+Le+H(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Q+e+Le+e+e}return e}var Ku=function(t,n,r,a){if(t.length>-1&&!t.return)switch(t.type){case Gn:t.return=zo(t.value,t.length);break;case Po:return Vt([or(t,{value:H(t.value,"@","@"+Q)})],a);case Kn:if(t.length)return ku(t.props,function(o){switch(Su(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Vt([or(t,{props:[H(o,/:(read-\w+)/,":"+Ar+"$1")]})],a);case"::placeholder":return Vt([or(t,{props:[H(o,/:(plac\w+)/,":"+Q+"input-$1")]}),or(t,{props:[H(o,/:(plac\w+)/,":"+Ar+"$1")]}),or(t,{props:[H(o,/:(plac\w+)/,Le+"input-$1")]})],a)}return""})}},Gu=[Ku],No=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(u){var y=u.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(u),u.setAttribute("data-s",""))})}var a=t.stylisPlugins||Gu,o={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(u){for(var y=u.getAttribute("data-emotion").split(" "),w=1;w<y.length;w++)o[y[w]]=!0;l.push(u)});var c,f=[Wu,Yu];{var h,m=[Bu,qu(function(u){h.insert(u)})],b=Vu(f.concat(a,m)),g=function(y){return Vt(Fu(y),b)};c=function(y,w,j,$){h=j,g(y?y+"{"+w.styles+"}":w.styles),$&&(v.inserted[w.name]=!0)}}var v={key:n,sheet:new _u({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:c};return v.sheet.hydrate(l),v},Uo=$n(),Ju={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Xu={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Wo={};Wo[Uo.ForwardRef]=Ju,Wo[Uo.Memo]=Xu;var Zu=!0;function Yo(e,t,n){var r="";return n.split(" ").forEach(function(a){e[a]!==void 0?t.push(e[a]+";"):a&&(r+=a+" ")}),r}var Qn=function(t,n,r){var a=t.key+"-"+n.name;(r===!1||Zu===!1)&&t.registered[a]===void 0&&(t.registered[a]=n.styles)},Hn=function(t,n,r){Qn(t,n,r);var a=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+a:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function Qu(e){for(var t=0,n,r=0,a=e.length;a>=4;++r,a-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Hu={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},ec=/[A-Z]|^ms/g,tc=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ko=function(t){return t.charCodeAt(1)===45},Go=function(t){return t!=null&&typeof t!="boolean"},ea=Vo(function(e){return Ko(e)?e:e.replace(ec,"-$&").toLowerCase()}),Jo=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(tc,function(r,a,o){return it={name:a,styles:o,next:it},a})}return Hu[t]!==1&&!Ko(t)&&typeof n=="number"&&n!==0?n+"px":n};function lr(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var a=n;if(a.anim===1)return it={name:a.name,styles:a.styles,next:it},a.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)it={name:s.name,styles:s.styles,next:it},s=s.next;var l=o.styles+";";return l}return rc(e,t,n)}case"function":{if(e!==void 0){var c=it,f=n(e);return it=c,lr(e,t,f)}break}}var h=n;if(t==null)return h;var m=t[h];return m!==void 0?m:h}function rc(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a<n.length;a++)r+=lr(e,t,n[a])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var l=s;t!=null&&t[l]!==void 0?r+=o+"{"+t[l]+"}":Go(l)&&(r+=ea(o)+":"+Jo(o,l)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var c=0;c<s.length;c++)Go(s[c])&&(r+=ea(o)+":"+Jo(o,s[c])+";");else{var f=lr(e,t,s);switch(o){case"animation":case"animationName":{r+=ea(o)+":"+f+";";break}default:r+=o+"{"+f+"}"}}}return r}var Xo=/label:\s*([^\s;{]+)\s*(;|$)/g,it;function zr(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,a="";it=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,a+=lr(n,t,o);else{var s=o;a+=s[0]}for(var l=1;l<e.length;l++)if(a+=lr(n,t,e[l]),r){var c=o;a+=c[l]}Xo.lastIndex=0;for(var f="",h;(h=Xo.exec(a))!==null;)f+="-"+h[1];var m=Qu(a)+f;return{name:m,styles:a,next:it}}var nc=function(t){return t()},Zo=q.useInsertionEffect?q.useInsertionEffect:!1,Qo=Zo||nc,Ho=Zo||q.useLayoutEffect,es=q.createContext(typeof HTMLElement<"u"?No({key:"css"}):null),ac=es.Provider,ta=function(t){return _.forwardRef(function(n,r){var a=_.useContext(es);return t(n,a,r)})},Nr=q.createContext({}),ra={}.hasOwnProperty,na="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",oc=function(t,n){var r={};for(var a in n)ra.call(n,a)&&(r[a]=n[a]);return r[na]=t,r},sc=function(t){var n=t.cache,r=t.serialized,a=t.isStringTag;return Qn(n,r,a),Qo(function(){return Hn(n,r,a)}),null},ic=ta(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var a=e[na],o=[r],s="";typeof e.className=="string"?s=Yo(t.registered,o,e.className):e.className!=null&&(s=e.className+" ");var l=zr(o,void 0,q.useContext(Nr));s+=t.key+"-"+l.name;var c={};for(var f in e)ra.call(e,f)&&f!=="css"&&f!==na&&(c[f]=e[f]);return c.className=s,n&&(c.ref=n),q.createElement(q.Fragment,null,q.createElement(sc,{cache:t,serialized:l,isStringTag:typeof a=="string"}),q.createElement(a,c))}),lc=ic;ko();var ts=function(t,n){var r=arguments;if(n==null||!ra.call(n,"css"))return q.createElement.apply(void 0,r);var a=r.length,o=new Array(a);o[0]=lc,o[1]=oc(t,n);for(var s=2;s<a;s++)o[s]=r[s];return q.createElement.apply(null,o)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(ts||(ts={}));var uc=ta(function(e,t){var n=e.styles,r=zr([n],void 0,q.useContext(Nr)),a=q.useRef();return Ho(function(){var o=t.key+"-global",s=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),l=!1,c=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return t.sheet.tags.length&&(s.before=t.sheet.tags[0]),c!==null&&(l=!0,c.setAttribute("data-emotion",o),s.hydrate([c])),a.current=[s,l],function(){s.flush()}},[t]),Ho(function(){var o=a.current,s=o[0],l=o[1];if(l){o[1]=!1;return}if(r.next!==void 0&&Hn(t,r.next,!0),s.tags.length){var c=s.tags[s.tags.length-1].nextElementSibling;s.before=c,s.flush()}t.insert("",r,s,!1)},[t,r.name]),null});function rs(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return zr(t)}function cc(){var e=rs.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var dc=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,fc=Vo(function(e){return dc.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),pc=fc,hc=function(t){return t!=="theme"},ns=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?pc:hc},as=function(t,n,r){var a;if(n){var o=n.shouldForwardProp;a=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof a!="function"&&r&&(a=t.__emotion_forwardProp),a},mc=function(t){var n=t.cache,r=t.serialized,a=t.isStringTag;return Qn(n,r,a),Qo(function(){return Hn(n,r,a)}),null},bc=function e(t,n){var r=t.__emotion_real===t,a=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var l=as(t,n,r),c=l||ns(a),f=!c("as");return function(){var h=arguments,m=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&m.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)m.push.apply(m,h);else{var b=h[0];m.push(b[0]);for(var g=h.length,v=1;v<g;v++)m.push(h[v],b[v])}var u=ta(function(y,w,j){var $=f&&y.as||a,M="",x=[],A=y;if(y.theme==null){A={};for(var F in y)A[F]=y[F];A.theme=q.useContext(Nr)}typeof y.className=="string"?M=Yo(w.registered,x,y.className):y.className!=null&&(M=y.className+" ");var be=zr(m.concat(x),w.registered,A);M+=w.key+"-"+be.name,s!==void 0&&(M+=" "+s);var Ie=f&&l===void 0?ns($):c,ee={};for(var te in y)f&&te==="as"||Ie(te)&&(ee[te]=y[te]);return ee.className=M,j&&(ee.ref=j),q.createElement(q.Fragment,null,q.createElement(mc,{cache:w,serialized:be,isStringTag:typeof $=="string"}),q.createElement($,ee))});return u.displayName=o!==void 0?o:"Styled("+(typeof a=="string"?a:a.displayName||a.name||"Component")+")",u.defaultProps=t.defaultProps,u.__emotion_real=u,u.__emotion_base=a,u.__emotion_styles=m,u.__emotion_forwardProp=l,Object.defineProperty(u,"toString",{value:function(){return"."+s}}),u.withComponent=function(y,w){var j=e(y,re({},n,w,{shouldForwardProp:as(u,w,!0)}));return j.apply(void 0,m)},u}},vc=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],aa=bc.bind(null);vc.forEach(function(e){aa[e]=aa(e)});let oa;typeof document=="object"&&(oa=No({key:"css",prepend:!0}));function os(e){const{injectFirst:t,children:n}=e;return t&&oa?i.jsx(ac,{value:oa,children:n}):n}process.env.NODE_ENV!=="production"&&(os.propTypes={children:W.node,injectFirst:W.bool});function gc(e){return e==null||Object.keys(e).length===0}function ss(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?a=>t(gc(a)?n:a):t;return i.jsx(uc,{styles:r})}process.env.NODE_ENV!=="production"&&(ss.propTypes={defaultTheme:W.object,styles:W.oneOfType([W.array,W.string,W.object,W.func])});/**
70
- * @mui/styled-engine v5.16.14
59
+ */var Qn;function li(){return Qn||(Qn=1,process.env.NODE_ENV!=="production"&&function(){function e(c){if(typeof c=="object"&&c!==null){var v=c.$$typeof;switch(v){case t:switch(c=c.type,c){case n:case o:case a:case p:case m:case C:return c;default:switch(c=c&&c.$$typeof,c){case l:case f:case g:case b:return c;case s:return c;default:return v}}case r:return v}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),C=Symbol.for("react.view_transition"),y=Symbol.for("react.client.reference");re.ContextConsumer=s,re.ContextProvider=l,re.Element=t,re.ForwardRef=f,re.Fragment=n,re.Lazy=g,re.Memo=b,re.Portal=r,re.Profiler=o,re.StrictMode=a,re.Suspense=p,re.SuspenseList=m,re.isContextConsumer=function(c){return e(c)===s},re.isContextProvider=function(c){return e(c)===l},re.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===t},re.isForwardRef=function(c){return e(c)===f},re.isFragment=function(c){return e(c)===n},re.isLazy=function(c){return e(c)===g},re.isMemo=function(c){return e(c)===b},re.isPortal=function(c){return e(c)===r},re.isProfiler=function(c){return e(c)===o},re.isStrictMode=function(c){return e(c)===a},re.isSuspense=function(c){return e(c)===p},re.isSuspenseList=function(c){return e(c)===m},re.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===n||c===o||c===a||c===p||c===m||typeof c=="object"&&c!==null&&(c.$$typeof===g||c.$$typeof===b||c.$$typeof===l||c.$$typeof===s||c.$$typeof===f||c.$$typeof===y||c.getModuleId!==void 0)},re.typeOf=e}()),re}var Xn;function ci(){return Xn||(Xn=1,process.env.NODE_ENV==="production"?ir.exports=si():ir.exports=li()),ir.exports}var sr=ci();function Ue(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Zn(e){if(ke.isValidElement(e)||sr.isValidElementType(e)||!Ue(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Zn(e[r])}),t}function $e(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return Ue(e)&&Ue(t)&&Object.keys(t).forEach(a=>{ke.isValidElement(t[a])||sr.isValidElementType(t[a])?n[a]=t[a]:Ue(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&Ue(e[a])?n[a]=$e(e[a],t[a],r):r.clone?n[a]=Ue(t[a])?Zn(t[a]):t[a]:n[a]=t[a]}),n}function $t(e,t){return t?$e(e,t,{clone:!1}):e}const Xe=process.env.NODE_ENV!=="production"?K.oneOfType([K.number,K.string,K.object,K.array]):{};function ea(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,a)=>{const o=/min-width:\s*([0-9.]+)/;return+(n.match(o)?.[1]||0)-+(a.match(o)?.[1]||0)});return r.length?r.reduce((n,a)=>{const o=t[a];return delete n[a],n[a]=o,n},{...t}):t}function ui(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function di(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
60
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Qe(18,`(${t})`));return null}const[,n,a]=r,o=Number.isNaN(+n)?n||0:+n;return e.containerQueries(a).up(o)}function fi(e){const t=(o,s)=>o.replace("@media",s?`@container ${s}`:"@container");function r(o,s){o.up=(...l)=>t(e.breakpoints.up(...l),s),o.down=(...l)=>t(e.breakpoints.down(...l),s),o.between=(...l)=>t(e.breakpoints.between(...l),s),o.only=(...l)=>t(e.breakpoints.only(...l),s),o.not=(...l)=>{const f=t(e.breakpoints.not(...l),s);return f.includes("not all and")?f.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):f}}const n={},a=o=>(r(n,o),n);return r(a),{...e,containerQueries:a}}const lr={xs:0,sm:600,md:900,lg:1200,xl:1536},ta={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${lr[e]}px)`},pi={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:lr[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Ye(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const o=n.breakpoints||ta;return t.reduce((s,l,f)=>(s[o.up(o.keys[f])]=r(t[f]),s),{})}if(typeof t=="object"){const o=n.breakpoints||ta;return Object.keys(t).reduce((s,l)=>{if(ui(o.keys,l)){const f=di(n.containerQueries?n:pi,l);f&&(s[f]=r(t[l],l))}else if(Object.keys(o.values||lr).includes(l)){const f=o.up(l);s[f]=r(t[l],l)}else{const f=l;s[f]=t[f]}return s},{})}return r(t)}function hi(e={}){return e.keys?.reduce((r,n)=>{const a=e.up(n);return r[a]={},r},{})||{}}function ra(e,t){return e.reduce((r,n)=>{const a=r[n];return(!a||Object.keys(a).length===0)&&delete r[n],r},t)}function cr(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((a,o)=>a&&a[o]?a[o]:null,e);if(n!=null)return n}return t.split(".").reduce((n,a)=>n&&n[a]!=null?n[a]:null,e)}function ur(e,t,r,n=r){let a;return typeof e=="function"?a=e(r):Array.isArray(e)?a=e[r]||n:a=cr(e,r)||n,t&&(a=t(a,n,e)),a}function be(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:a}=e,o=s=>{if(s[t]==null)return null;const l=s[t],f=s.theme,p=cr(f,n)||{};return Ye(s,l,b=>{let g=ur(p,a,b);return b===g&&typeof b=="string"&&(g=ur(p,a,`${t}${b==="default"?"":ot(b)}`,b)),r===!1?g:{[r]:g}})};return o.propTypes=process.env.NODE_ENV!=="production"?{[t]:Xe}:{},o.filterProps=[t],o}function mi(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const bi={m:"margin",p:"padding"},gi={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},na={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},yi=mi(e=>{if(e.length>2)if(na[e])e=na[e];else return[e];const[t,r]=e.split(""),n=bi[t],a=gi[r]||"";return Array.isArray(a)?a.map(o=>n+o):[n+a]}),dr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],fr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],xi=[...dr,...fr];function _t(e,t,r,n){const a=cr(e,t,!0)??r;return typeof a=="number"||typeof a=="string"?o=>typeof o=="string"?o:(process.env.NODE_ENV!=="production"&&typeof o!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${o}.`),typeof a=="string"?a.startsWith("var(")&&o===0?0:a.startsWith("var(")&&o===1?a:`calc(${o} * ${a})`:a*o):Array.isArray(a)?o=>{if(typeof o=="string")return o;const s=Math.abs(o);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>a.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${s} > ${a.length-1}, you need to add the missing values.`].join(`
61
+ `)):console.error([`MUI: The \`theme.${t}\` 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.${t}\` as a number.`].join(`
62
+ `)));const l=a[s];return o>=0?l:typeof l=="number"?-l:typeof l=="string"&&l.startsWith("var(")?`calc(-1 * ${l})`:`-${l}`}:typeof a=="function"?a:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${a}) is invalid.`,"It should be a number, an array or a function."].join(`
63
+ `)),()=>{})}function Yr(e){return _t(e,"spacing",8,"spacing")}function Mt(e,t){return typeof t=="string"||t==null?t:e(t)}function vi(e,t){return r=>e.reduce((n,a)=>(n[a]=Mt(t,r),n),{})}function Ci(e,t,r,n){if(!t.includes(r))return null;const a=yi(r),o=vi(a,n),s=e[r];return Ye(e,s,o)}function aa(e,t){const r=Yr(e.theme);return Object.keys(e).map(n=>Ci(e,t,n,r)).reduce($t,{})}function fe(e){return aa(e,dr)}fe.propTypes=process.env.NODE_ENV!=="production"?dr.reduce((e,t)=>(e[t]=Xe,e),{}):{},fe.filterProps=dr;function pe(e){return aa(e,fr)}pe.propTypes=process.env.NODE_ENV!=="production"?fr.reduce((e,t)=>(e[t]=Xe,e),{}):{},pe.filterProps=fr,process.env.NODE_ENV!=="production"&&xi.reduce((e,t)=>(e[t]=Xe,e),{});function pr(...e){const t=e.reduce((n,a)=>(a.filterProps.forEach(o=>{n[o]=a}),n),{}),r=n=>Object.keys(n).reduce((a,o)=>t[o]?$t(a,t[o](n)):a,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,a)=>Object.assign(n,a.propTypes),{}):{},r.filterProps=e.reduce((n,a)=>n.concat(a.filterProps),[]),r}function De(e){return typeof e!="number"?e:`${e}px solid`}function Ie(e,t){return be({prop:e,themeKey:"borders",transform:t})}const Ti=Ie("border",De),wi=Ie("borderTop",De),ki=Ie("borderRight",De),Ei=Ie("borderBottom",De),ji=Ie("borderLeft",De),Si=Ie("borderColor"),Pi=Ie("borderTopColor"),Ai=Ie("borderRightColor"),Oi=Ie("borderBottomColor"),Ri=Ie("borderLeftColor"),$i=Ie("outline",De),_i=Ie("outlineColor"),hr=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=_t(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Mt(t,n)});return Ye(e,e.borderRadius,r)}return null};hr.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Xe}:{},hr.filterProps=["borderRadius"],pr(Ti,wi,ki,Ei,ji,Si,Pi,Ai,Oi,Ri,hr,$i,_i);const mr=e=>{if(e.gap!==void 0&&e.gap!==null){const t=_t(e.theme,"spacing",8,"gap"),r=n=>({gap:Mt(t,n)});return Ye(e,e.gap,r)}return null};mr.propTypes=process.env.NODE_ENV!=="production"?{gap:Xe}:{},mr.filterProps=["gap"];const br=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=_t(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Mt(t,n)});return Ye(e,e.columnGap,r)}return null};br.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Xe}:{},br.filterProps=["columnGap"];const gr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=_t(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Mt(t,n)});return Ye(e,e.rowGap,r)}return null};gr.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Xe}:{},gr.filterProps=["rowGap"];const Mi=be({prop:"gridColumn"}),Di=be({prop:"gridRow"}),Ii=be({prop:"gridAutoFlow"}),Ni=be({prop:"gridAutoColumns"}),Fi=be({prop:"gridAutoRows"}),Bi=be({prop:"gridTemplateColumns"}),Li=be({prop:"gridTemplateRows"}),Vi=be({prop:"gridTemplateAreas"}),zi=be({prop:"gridArea"});pr(mr,br,gr,Mi,Di,Ii,Ni,Fi,Bi,Li,Vi,zi);function mt(e,t){return t==="grey"?t:e}const qi=be({prop:"color",themeKey:"palette",transform:mt}),Hi=be({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:mt}),Wi=be({prop:"backgroundColor",themeKey:"palette",transform:mt});pr(qi,Hi,Wi);function _e(e){return e<=1&&e!==0?`${e*100}%`:e}const Ui=be({prop:"width",transform:_e}),Gr=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{const n=e.theme?.breakpoints?.values?.[r]||lr[r];return n?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:_e(r)}};return Ye(e,e.maxWidth,t)}return null};Gr.filterProps=["maxWidth"];const Yi=be({prop:"minWidth",transform:_e}),Gi=be({prop:"height",transform:_e}),Ki=be({prop:"maxHeight",transform:_e}),Ji=be({prop:"minHeight",transform:_e});be({prop:"size",cssProperty:"width",transform:_e}),be({prop:"size",cssProperty:"height",transform:_e});const Qi=be({prop:"boxSizing"});pr(Ui,Gr,Yi,Gi,Ki,Ji,Qi);const yr={border:{themeKey:"borders",transform:De},borderTop:{themeKey:"borders",transform:De},borderRight:{themeKey:"borders",transform:De},borderBottom:{themeKey:"borders",transform:De},borderLeft:{themeKey:"borders",transform:De},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:De},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:hr},color:{themeKey:"palette",transform:mt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:mt},backgroundColor:{themeKey:"palette",transform:mt},p:{style:pe},pt:{style:pe},pr:{style:pe},pb:{style:pe},pl:{style:pe},px:{style:pe},py:{style:pe},padding:{style:pe},paddingTop:{style:pe},paddingRight:{style:pe},paddingBottom:{style:pe},paddingLeft:{style:pe},paddingX:{style:pe},paddingY:{style:pe},paddingInline:{style:pe},paddingInlineStart:{style:pe},paddingInlineEnd:{style:pe},paddingBlock:{style:pe},paddingBlockStart:{style:pe},paddingBlockEnd:{style:pe},m:{style:fe},mt:{style:fe},mr:{style:fe},mb:{style:fe},ml:{style:fe},mx:{style:fe},my:{style:fe},margin:{style:fe},marginTop:{style:fe},marginRight:{style:fe},marginBottom:{style:fe},marginLeft:{style:fe},marginX:{style:fe},marginY:{style:fe},marginInline:{style:fe},marginInlineStart:{style:fe},marginInlineEnd:{style:fe},marginBlock:{style:fe},marginBlockStart:{style:fe},marginBlockEnd:{style:fe},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:mr},rowGap:{style:gr},columnGap:{style:br},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:_e},maxWidth:{style:Gr},minWidth:{transform:_e},height:{transform:_e},maxHeight:{transform:_e},minHeight:{transform:_e},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 Xi(...e){const t=e.reduce((n,a)=>n.concat(Object.keys(a)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Zi(e,t){return typeof e=="function"?e(t):e}function es(){function e(r,n,a,o){const s={[r]:n,theme:a},l=o[r];if(!l)return{[r]:n};const{cssProperty:f=r,themeKey:p,transform:m,style:b}=l;if(n==null)return null;if(p==="typography"&&n==="inherit")return{[r]:n};const g=cr(a,p)||{};return b?b(s):Ye(s,n,y=>{let c=ur(g,m,y);return y===c&&typeof y=="string"&&(c=ur(g,m,`${r}${y==="default"?"":ot(y)}`,y)),f===!1?c:{[f]:c}})}function t(r){const{sx:n,theme:a={},nested:o}=r||{};if(!n)return null;const s=a.unstable_sxConfig??yr;function l(f){let p=f;if(typeof f=="function")p=f(a);else if(typeof f!="object")return f;if(!p)return null;const m=hi(a.breakpoints),b=Object.keys(m);let g=m;return Object.keys(p).forEach(C=>{const y=Zi(p[C],a);if(y!=null)if(typeof y=="object")if(s[C])g=$t(g,e(C,y,a,s));else{const c=Ye({theme:a},y,v=>({[C]:v}));Xi(c,y)?g[C]=t({sx:y,theme:a,nested:!0}):g=$t(g,c)}else g=$t(g,e(C,y,a,s))}),!o&&a.modularCssLayers?{"@layer sx":ea(a,ra(b,g))}:ea(a,ra(b,g))}return Array.isArray(n)?n.map(l):l(n)}return t}const bt=es();bt.filterProps=["sx"];function Kr(){return Kr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kr.apply(null,arguments)}function ts(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function rs(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var ns=function(){function e(r){var n=this;this._insertTag=function(a){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(a,o),n.tags.push(a)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(rs(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var o=ts(a);try{o.insertRule(n,o.cssRules.length)}catch{}}else a.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var a;return(a=n.parentNode)==null?void 0:a.removeChild(n)}),this.tags=[],this.ctr=0},e}(),Pe="-ms-",xr="-moz-",J="-webkit-",oa="comm",Jr="rule",Qr="decl",as="@import",ia="@keyframes",os="@layer",is=Math.abs,vr=String.fromCharCode,ss=Object.assign;function ls(e,t){return Ee(e,0)^45?(((t<<2^Ee(e,0))<<2^Ee(e,1))<<2^Ee(e,2))<<2^Ee(e,3):0}function sa(e){return e.trim()}function cs(e,t){return(e=t.exec(e))?e[0]:e}function Q(e,t,r){return e.replace(t,r)}function Xr(e,t){return e.indexOf(t)}function Ee(e,t){return e.charCodeAt(t)|0}function Dt(e,t,r){return e.slice(t,r)}function ze(e){return e.length}function Zr(e){return e.length}function Cr(e,t){return t.push(e),e}function us(e,t){return e.map(t).join("")}var Tr=1,gt=1,la=0,Oe=0,xe=0,yt="";function wr(e,t,r,n,a,o,s){return{value:e,root:t,parent:r,type:n,props:a,children:o,line:Tr,column:gt,length:s,return:""}}function It(e,t){return ss(wr("",null,null,"",null,null,0),e,{length:-e.length},t)}function ds(){return xe}function fs(){return xe=Oe>0?Ee(yt,--Oe):0,gt--,xe===10&&(gt=1,Tr--),xe}function Me(){return xe=Oe<la?Ee(yt,Oe++):0,gt++,xe===10&&(gt=1,Tr++),xe}function qe(){return Ee(yt,Oe)}function kr(){return Oe}function Nt(e,t){return Dt(yt,e,t)}function Ft(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ca(e){return Tr=gt=1,la=ze(yt=e),Oe=0,[]}function ua(e){return yt="",e}function Er(e){return sa(Nt(Oe-1,en(e===91?e+2:e===40?e+1:e)))}function ps(e){for(;(xe=qe())&&xe<33;)Me();return Ft(e)>2||Ft(xe)>3?"":" "}function hs(e,t){for(;--t&&Me()&&!(xe<48||xe>102||xe>57&&xe<65||xe>70&&xe<97););return Nt(e,kr()+(t<6&&qe()==32&&Me()==32))}function en(e){for(;Me();)switch(xe){case e:return Oe;case 34:case 39:e!==34&&e!==39&&en(xe);break;case 40:e===41&&en(e);break;case 92:Me();break}return Oe}function ms(e,t){for(;Me()&&e+xe!==57;)if(e+xe===84&&qe()===47)break;return"/*"+Nt(t,Oe-1)+"*"+vr(e===47?e:Me())}function bs(e){for(;!Ft(qe());)Me();return Nt(e,Oe)}function gs(e){return ua(jr("",null,null,null,[""],e=ca(e),0,[0],e))}function jr(e,t,r,n,a,o,s,l,f){for(var p=0,m=0,b=s,g=0,C=0,y=0,c=1,v=1,k=1,O=0,j="",P=a,T=o,I=n,$=j;v;)switch(y=O,O=Me()){case 40:if(y!=108&&Ee($,b-1)==58){Xr($+=Q(Er(O),"&","&\f"),"&\f")!=-1&&(k=-1);break}case 34:case 39:case 91:$+=Er(O);break;case 9:case 10:case 13:case 32:$+=ps(y);break;case 92:$+=hs(kr()-1,7);continue;case 47:switch(qe()){case 42:case 47:Cr(ys(ms(Me(),kr()),t,r),f);break;default:$+="/"}break;case 123*c:l[p++]=ze($)*k;case 125*c:case 59:case 0:switch(O){case 0:case 125:v=0;case 59+m:k==-1&&($=Q($,/\f/g,"")),C>0&&ze($)-b&&Cr(C>32?fa($+";",n,r,b-1):fa(Q($," ","")+";",n,r,b-2),f);break;case 59:$+=";";default:if(Cr(I=da($,t,r,p,m,a,l,j,P=[],T=[],b),o),O===123)if(m===0)jr($,t,I,I,P,o,b,l,T);else switch(g===99&&Ee($,3)===110?100:g){case 100:case 108:case 109:case 115:jr(e,I,I,n&&Cr(da(e,I,I,0,0,a,l,j,a,P=[],b),T),a,T,b,l,n?P:T);break;default:jr($,I,I,I,[""],T,0,l,T)}}p=m=C=0,c=k=1,j=$="",b=s;break;case 58:b=1+ze($),C=y;default:if(c<1){if(O==123)--c;else if(O==125&&c++==0&&fs()==125)continue}switch($+=vr(O),O*c){case 38:k=m>0?1:($+="\f",-1);break;case 44:l[p++]=(ze($)-1)*k,k=1;break;case 64:qe()===45&&($+=Er(Me())),g=qe(),m=b=ze(j=$+=bs(kr())),O++;break;case 45:y===45&&ze($)==2&&(c=0)}}return o}function da(e,t,r,n,a,o,s,l,f,p,m){for(var b=a-1,g=a===0?o:[""],C=Zr(g),y=0,c=0,v=0;y<n;++y)for(var k=0,O=Dt(e,b+1,b=is(c=s[y])),j=e;k<C;++k)(j=sa(c>0?g[k]+" "+O:Q(O,/&\f/g,g[k])))&&(f[v++]=j);return wr(e,t,r,a===0?Jr:l,f,p,m)}function ys(e,t,r){return wr(e,t,r,oa,vr(ds()),Dt(e,2,-2),0)}function fa(e,t,r,n){return wr(e,t,r,Qr,Dt(e,0,n),Dt(e,n+1,-1),n)}function xt(e,t){for(var r="",n=Zr(e),a=0;a<n;a++)r+=t(e[a],a,e,t)||"";return r}function xs(e,t,r,n){switch(e.type){case os:if(e.children.length)break;case as:case Qr:return e.return=e.return||e.value;case oa:return"";case ia:return e.return=e.value+"{"+xt(e.children,n)+"}";case Jr:e.value=e.props.join(",")}return ze(r=xt(e.children,n))?e.return=e.value+"{"+r+"}":""}function vs(e){var t=Zr(e);return function(r,n,a,o){for(var s="",l=0;l<t;l++)s+=e[l](r,n,a,o)||"";return s}}function Cs(e){return function(t){t.root||(t=t.return)&&e(t)}}function pa(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Ts=function(t,r,n){for(var a=0,o=0;a=o,o=qe(),a===38&&o===12&&(r[n]=1),!Ft(o);)Me();return Nt(t,Oe)},ws=function(t,r){var n=-1,a=44;do switch(Ft(a)){case 0:a===38&&qe()===12&&(r[n]=1),t[n]+=Ts(Oe-1,r,n);break;case 2:t[n]+=Er(a);break;case 4:if(a===44){t[++n]=qe()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=vr(a)}while(a=Me());return t},ks=function(t,r){return ua(ws(ca(t),r))},ha=new WeakMap,Es=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,a=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!ha.get(n))&&!a){ha.set(t,!0);for(var o=[],s=ks(r,o),l=n.props,f=0,p=0;f<s.length;f++)for(var m=0;m<l.length;m++,p++)t.props[p]=o[f]?s[f].replace(/&\f/g,l[m]):l[m]+" "+s[f]}}},js=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function ma(e,t){switch(ls(e,t)){case 5103:return J+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return J+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return J+e+xr+e+Pe+e+e;case 6828:case 4268:return J+e+Pe+e+e;case 6165:return J+e+Pe+"flex-"+e+e;case 5187:return J+e+Q(e,/(\w+).+(:[^]+)/,J+"box-$1$2"+Pe+"flex-$1$2")+e;case 5443:return J+e+Pe+"flex-item-"+Q(e,/flex-|-self/,"")+e;case 4675:return J+e+Pe+"flex-line-pack"+Q(e,/align-content|flex-|-self/,"")+e;case 5548:return J+e+Pe+Q(e,"shrink","negative")+e;case 5292:return J+e+Pe+Q(e,"basis","preferred-size")+e;case 6060:return J+"box-"+Q(e,"-grow","")+J+e+Pe+Q(e,"grow","positive")+e;case 4554:return J+Q(e,/([^-])(transform)/g,"$1"+J+"$2")+e;case 6187:return Q(Q(Q(e,/(zoom-|grab)/,J+"$1"),/(image-set)/,J+"$1"),e,"")+e;case 5495:case 3959:return Q(e,/(image-set\([^]*)/,J+"$1$`$1");case 4968:return Q(Q(e,/(.+:)(flex-)?(.*)/,J+"box-pack:$3"+Pe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+J+e+e;case 4095:case 3583:case 4068:case 2532:return Q(e,/(.+)-inline(.+)/,J+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ze(e)-1-t>6)switch(Ee(e,t+1)){case 109:if(Ee(e,t+4)!==45)break;case 102:return Q(e,/(.+:)(.+)-([^]+)/,"$1"+J+"$2-$3$1"+xr+(Ee(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Xr(e,"stretch")?ma(Q(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ee(e,t+1)!==115)break;case 6444:switch(Ee(e,ze(e)-3-(~Xr(e,"!important")&&10))){case 107:return Q(e,":",":"+J)+e;case 101:return Q(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+J+(Ee(e,14)===45?"inline-":"")+"box$3$1"+J+"$2$3$1"+Pe+"$2box$3")+e}break;case 5936:switch(Ee(e,t+11)){case 114:return J+e+Pe+Q(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return J+e+Pe+Q(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return J+e+Pe+Q(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return J+e+Pe+e+e}return e}var Ss=function(t,r,n,a){if(t.length>-1&&!t.return)switch(t.type){case Qr:t.return=ma(t.value,t.length);break;case ia:return xt([It(t,{value:Q(t.value,"@","@"+J)})],a);case Jr:if(t.length)return us(t.props,function(o){switch(cs(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return xt([It(t,{props:[Q(o,/:(read-\w+)/,":"+xr+"$1")]})],a);case"::placeholder":return xt([It(t,{props:[Q(o,/:(plac\w+)/,":"+J+"input-$1")]}),It(t,{props:[Q(o,/:(plac\w+)/,":"+xr+"$1")]}),It(t,{props:[Q(o,/:(plac\w+)/,Pe+"input-$1")]})],a)}return""})}},Ps=[Ss],As=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(c){var v=c.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(c),c.setAttribute("data-s",""))})}var a=t.stylisPlugins||Ps,o={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(c){for(var v=c.getAttribute("data-emotion").split(" "),k=1;k<v.length;k++)o[v[k]]=!0;l.push(c)});var f,p=[Es,js];{var m,b=[xs,Cs(function(c){m.insert(c)})],g=vs(p.concat(a,b)),C=function(v){return xt(gs(v),g)};f=function(v,k,O,j){m=O,C(v?v+"{"+k.styles+"}":k.styles),j&&(y.inserted[k.name]=!0)}}var y={key:r,sheet:new ns({key:r,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:f};return y.sheet.hydrate(l),y},Os=!0;function Rs(e,t,r){var n="";return r.split(" ").forEach(function(a){e[a]!==void 0?t.push(e[a]+";"):a&&(n+=a+" ")}),n}var ba=function(t,r,n){var a=t.key+"-"+r.name;(n===!1||Os===!1)&&t.registered[a]===void 0&&(t.registered[a]=r.styles)},$s=function(t,r,n){ba(t,r,n);var a=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var o=r;do t.insert(r===o?"."+a:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function _s(e){for(var t=0,r,n=0,a=e.length;a>=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Ms={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},Ds=/[A-Z]|^ms/g,Is=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ga=function(t){return t.charCodeAt(1)===45},ya=function(t){return t!=null&&typeof t!="boolean"},tn=pa(function(e){return ga(e)?e:e.replace(Ds,"-$&").toLowerCase()}),xa=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Is,function(n,a,o){return He={name:a,styles:o,next:He},a})}return Ms[t]!==1&&!ga(t)&&typeof r=="number"&&r!==0?r+"px":r};function Bt(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return He={name:a.name,styles:a.styles,next:He},a.name;var o=r;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)He={name:s.name,styles:s.styles,next:He},s=s.next;var l=o.styles+";";return l}return Ns(e,t,r)}case"function":{if(e!==void 0){var f=He,p=r(e);return He=f,Bt(e,t,p)}break}}var m=r;if(t==null)return m;var b=t[m];return b!==void 0?b:m}function Ns(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a<r.length;a++)n+=Bt(e,t,r[a])+";";else for(var o in r){var s=r[o];if(typeof s!="object"){var l=s;t!=null&&t[l]!==void 0?n+=o+"{"+t[l]+"}":ya(l)&&(n+=tn(o)+":"+xa(o,l)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var f=0;f<s.length;f++)ya(s[f])&&(n+=tn(o)+":"+xa(o,s[f])+";");else{var p=Bt(e,t,s);switch(o){case"animation":case"animationName":{n+=tn(o)+":"+p+";";break}default:n+=o+"{"+p+"}"}}}return n}var va=/label:\s*([^\s;{]+)\s*(;|$)/g,He;function Ca(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,a="";He=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,a+=Bt(r,t,o);else{var s=o;a+=s[0]}for(var l=1;l<e.length;l++)if(a+=Bt(r,t,e[l]),n){var f=o;a+=f[l]}va.lastIndex=0;for(var p="",m;(m=va.exec(a))!==null;)p+="-"+m[1];var b=_s(a)+p;return{name:b,styles:a,next:He}}var Fs=function(t){return t()},Bs=ke.useInsertionEffect?ke.useInsertionEffect:!1,Ls=Bs||Fs,Ta=ke.createContext(typeof HTMLElement<"u"?As({key:"css"}):null);Ta.Provider;var Vs=function(t){return S.forwardRef(function(r,n){var a=S.useContext(Ta);return t(r,a,n)})},zs=ke.createContext({}),qs=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Hs=pa(function(e){return qs.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Ws=Hs,Us=function(t){return t!=="theme"},wa=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Ws:Us},ka=function(t,r,n){var a;if(r){var o=r.shouldForwardProp;a=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof a!="function"&&n&&(a=t.__emotion_forwardProp),a},Ys=function(t){var r=t.cache,n=t.serialized,a=t.isStringTag;return ba(r,n,a),Ls(function(){return $s(r,n,a)}),null},Gs=function e(t,r){var n=t.__emotion_real===t,a=n&&t.__emotion_base||t,o,s;r!==void 0&&(o=r.label,s=r.target);var l=ka(t,r,n),f=l||wa(a),p=!f("as");return function(){var m=arguments,b=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&b.push("label:"+o+";"),m[0]==null||m[0].raw===void 0)b.push.apply(b,m);else{var g=m[0];b.push(g[0]);for(var C=m.length,y=1;y<C;y++)b.push(m[y],g[y])}var c=Vs(function(v,k,O){var j=p&&v.as||a,P="",T=[],I=v;if(v.theme==null){I={};for(var $ in v)I[$]=v[$];I.theme=ke.useContext(zs)}typeof v.className=="string"?P=Rs(k.registered,T,v.className):v.className!=null&&(P=v.className+" ");var G=Ca(b.concat(T),k.registered,I);P+=k.key+"-"+G.name,s!==void 0&&(P+=" "+s);var H=p&&l===void 0?wa(j):f,u={};for(var R in v)p&&R==="as"||H(R)&&(u[R]=v[R]);return u.className=P,O&&(u.ref=O),ke.createElement(ke.Fragment,null,ke.createElement(Ys,{cache:k,serialized:G,isStringTag:typeof j=="string"}),ke.createElement(j,u))});return c.displayName=o!==void 0?o:"Styled("+(typeof a=="string"?a:a.displayName||a.name||"Component")+")",c.defaultProps=t.defaultProps,c.__emotion_real=c,c.__emotion_base=a,c.__emotion_styles=b,c.__emotion_forwardProp=l,Object.defineProperty(c,"toString",{value:function(){return"."+s}}),c.withComponent=function(v,k){var O=e(v,Kr({},r,k,{shouldForwardProp:ka(c,k,!0)}));return O.apply(void 0,b)},c}},Ks=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],rn=Gs.bind(null);Ks.forEach(function(e){rn[e]=rn(e)});/**
64
+ * @mui/styled-engine v7.2.0
71
65
  *
72
66
  * @license MIT
73
67
  * This source code is licensed under the MIT license found in the
74
68
  * LICENSE file in the root directory of this source tree.
75
- */function yc(e,t){const n=aa(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const a=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${a})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
76
- `)):r.some(o=>o===void 0)&&console.error(`MUI: the styled(${a})(...args) API requires all its args to be defined.`),n(...r)}:n}const xc=ut(Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:ss,StyledEngineProvider:os,ThemeContext:Nr,css:rs,default:yc,internal_processStyles:(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},keyframes:cc},Symbol.toStringTag,{value:"Module"}))),Cc=ut(Ol),Tc=ut(Nl),_c=ut(zl),Ec=["values","unit","step"],wc=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>re({},n,{[r.key]:r.val}),{})};function is(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,a=Tt(e,Ec),o=wc(t),s=Object.keys(o);function l(b){return`@media (min-width:${typeof t[b]=="number"?t[b]:b}${n})`}function c(b){return`@media (max-width:${(typeof t[b]=="number"?t[b]:b)-r/100}${n})`}function f(b,g){const v=s.indexOf(g);return`@media (min-width:${typeof t[b]=="number"?t[b]:b}${n}) and (max-width:${(v!==-1&&typeof t[s[v]]=="number"?t[s[v]]:g)-r/100}${n})`}function h(b){return s.indexOf(b)+1<s.length?f(b,s[s.indexOf(b)+1]):l(b)}function m(b){const g=s.indexOf(b);return g===0?l(s[1]):g===s.length-1?c(s[g]):f(b,s[s.indexOf(b)+1]).replace("@media","@media not all and")}return re({keys:s,values:o,up:l,down:c,between:f,only:h,not:m,unit:n},a)}const jc={borderRadius:4},_t=process.env.NODE_ENV!=="production"?W.oneOfType([W.number,W.string,W.object,W.array]):{};function ur(e,t){return t?at(e,t,{clone:!1}):e}const sa={xs:0,sm:600,md:900,lg:1200,xl:1536},ls={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${sa[e]}px)`};function ct(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||ls;return t.reduce((s,l,c)=>(s[o.up(o.keys[c])]=n(t[c]),s),{})}if(typeof t=="object"){const o=r.breakpoints||ls;return Object.keys(t).reduce((s,l)=>{if(Object.keys(o.values||sa).indexOf(l)!==-1){const c=o.up(l);s[c]=n(t[l],l)}else{const c=l;s[c]=t[c]}return s},{})}return n(t)}function Oc(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,a)=>{const o=e.up(a);return r[o]={},r},{}))||{}}function Rc(e,t){return e.reduce((n,r)=>{const a=n[r];return(!a||Object.keys(a).length===0)&&delete n[r],n},t)}function Ur(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((a,o)=>a&&a[o]?a[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,a)=>r&&r[a]!=null?r[a]:null,e)}function Wr(e,t,n,r=n){let a;return typeof e=="function"?a=e(n):Array.isArray(e)?a=e[n]||r:a=Ur(e,n)||r,t&&(a=t(a,r,e)),a}function Ee(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:a}=e,o=s=>{if(s[t]==null)return null;const l=s[t],c=s.theme,f=Ur(c,r)||{};return ct(s,l,m=>{let b=Wr(f,a,m);return m===b&&typeof m=="string"&&(b=Wr(f,a,`${t}${m==="default"?"":Ct(m)}`,m)),n===!1?b:{[n]:b}})};return o.propTypes=process.env.NODE_ENV!=="production"?{[t]:_t}:{},o.filterProps=[t],o}function Sc(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const kc={m:"margin",p:"padding"},$c={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},us={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Mc=Sc(e=>{if(e.length>2)if(us[e])e=us[e];else return[e];const[t,n]=e.split(""),r=kc[t],a=$c[n]||"";return Array.isArray(a)?a.map(o=>r+o):[r+a]}),Yr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Kr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Pc=[...Yr,...Kr];function cr(e,t,n,r){var a;const o=(a=Ur(e,t,!1))!=null?a:n;return typeof o=="number"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${s}.`),o*s):Array.isArray(o)?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>o.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${s} > ${o.length-1}, you need to add the missing values.`].join(`
77
- `)):console.error([`MUI: The \`theme.${t}\` 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.${t}\` as a number.`].join(`
78
- `))),o[s]):typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
79
- `)),()=>{})}function cs(e){return cr(e,"spacing",8,"spacing")}function dr(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function Ac(e,t){return n=>e.reduce((r,a)=>(r[a]=dr(t,n),r),{})}function Dc(e,t,n,r){if(t.indexOf(n)===-1)return null;const a=Mc(n),o=Ac(a,r),s=e[n];return ct(e,s,o)}function ds(e,t){const n=cs(e.theme);return Object.keys(e).map(r=>Dc(e,t,r,n)).reduce(ur,{})}function ye(e){return ds(e,Yr)}ye.propTypes=process.env.NODE_ENV!=="production"?Yr.reduce((e,t)=>(e[t]=_t,e),{}):{},ye.filterProps=Yr;function xe(e){return ds(e,Kr)}xe.propTypes=process.env.NODE_ENV!=="production"?Kr.reduce((e,t)=>(e[t]=_t,e),{}):{},xe.filterProps=Kr,process.env.NODE_ENV!=="production"&&Pc.reduce((e,t)=>(e[t]=_t,e),{});function Ic(e=8){if(e.mui)return e;const t=cs({spacing:e}),n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" "));return n.mui=!0,n}function Gr(...e){const t=e.reduce((r,a)=>(a.filterProps.forEach(o=>{r[o]=a}),r),{}),n=r=>Object.keys(r).reduce((a,o)=>t[o]?ur(a,t[o](r)):a,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,a)=>Object.assign(r,a.propTypes),{}):{},n.filterProps=e.reduce((r,a)=>r.concat(a.filterProps),[]),n}function Je(e){return typeof e!="number"?e:`${e}px solid`}function Xe(e,t){return Ee({prop:e,themeKey:"borders",transform:t})}const Fc=Xe("border",Je),Lc=Xe("borderTop",Je),Bc=Xe("borderRight",Je),Vc=Xe("borderBottom",Je),qc=Xe("borderLeft",Je),zc=Xe("borderColor"),Nc=Xe("borderTopColor"),Uc=Xe("borderRightColor"),Wc=Xe("borderBottomColor"),Yc=Xe("borderLeftColor"),Kc=Xe("outline",Je),Gc=Xe("outlineColor"),Jr=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=cr(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:dr(t,r)});return ct(e,e.borderRadius,n)}return null};Jr.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:_t}:{},Jr.filterProps=["borderRadius"],Gr(Fc,Lc,Bc,Vc,qc,zc,Nc,Uc,Wc,Yc,Jr,Kc,Gc);const Xr=e=>{if(e.gap!==void 0&&e.gap!==null){const t=cr(e.theme,"spacing",8,"gap"),n=r=>({gap:dr(t,r)});return ct(e,e.gap,n)}return null};Xr.propTypes=process.env.NODE_ENV!=="production"?{gap:_t}:{},Xr.filterProps=["gap"];const Zr=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=cr(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:dr(t,r)});return ct(e,e.columnGap,n)}return null};Zr.propTypes=process.env.NODE_ENV!=="production"?{columnGap:_t}:{},Zr.filterProps=["columnGap"];const Qr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=cr(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:dr(t,r)});return ct(e,e.rowGap,n)}return null};Qr.propTypes=process.env.NODE_ENV!=="production"?{rowGap:_t}:{},Qr.filterProps=["rowGap"];const Jc=Ee({prop:"gridColumn"}),Xc=Ee({prop:"gridRow"}),Zc=Ee({prop:"gridAutoFlow"}),Qc=Ee({prop:"gridAutoColumns"}),Hc=Ee({prop:"gridAutoRows"}),ed=Ee({prop:"gridTemplateColumns"}),td=Ee({prop:"gridTemplateRows"}),rd=Ee({prop:"gridTemplateAreas"}),nd=Ee({prop:"gridArea"});Gr(Xr,Zr,Qr,Jc,Xc,Zc,Qc,Hc,ed,td,rd,nd);function qt(e,t){return t==="grey"?t:e}const ad=Ee({prop:"color",themeKey:"palette",transform:qt}),od=Ee({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:qt}),sd=Ee({prop:"backgroundColor",themeKey:"palette",transform:qt});Gr(ad,od,sd);function Ke(e){return e<=1&&e!==0?`${e*100}%`:e}const id=Ee({prop:"width",transform:Ke}),ia=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,a;const o=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||sa[n];return o?((a=e.theme)==null||(a=a.breakpoints)==null?void 0:a.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Ke(n)}};return ct(e,e.maxWidth,t)}return null};ia.filterProps=["maxWidth"];const ld=Ee({prop:"minWidth",transform:Ke}),ud=Ee({prop:"height",transform:Ke}),cd=Ee({prop:"maxHeight",transform:Ke}),dd=Ee({prop:"minHeight",transform:Ke});Ee({prop:"size",cssProperty:"width",transform:Ke}),Ee({prop:"size",cssProperty:"height",transform:Ke});const fd=Ee({prop:"boxSizing"});Gr(id,ia,ld,ud,cd,dd,fd);const fr={border:{themeKey:"borders",transform:Je},borderTop:{themeKey:"borders",transform:Je},borderRight:{themeKey:"borders",transform:Je},borderBottom:{themeKey:"borders",transform:Je},borderLeft:{themeKey:"borders",transform:Je},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Je},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Jr},color:{themeKey:"palette",transform:qt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:qt},backgroundColor:{themeKey:"palette",transform:qt},p:{style:xe},pt:{style:xe},pr:{style:xe},pb:{style:xe},pl:{style:xe},px:{style:xe},py:{style:xe},padding:{style:xe},paddingTop:{style:xe},paddingRight:{style:xe},paddingBottom:{style:xe},paddingLeft:{style:xe},paddingX:{style:xe},paddingY:{style:xe},paddingInline:{style:xe},paddingInlineStart:{style:xe},paddingInlineEnd:{style:xe},paddingBlock:{style:xe},paddingBlockStart:{style:xe},paddingBlockEnd:{style:xe},m:{style:ye},mt:{style:ye},mr:{style:ye},mb:{style:ye},ml:{style:ye},mx:{style:ye},my:{style:ye},margin:{style:ye},marginTop:{style:ye},marginRight:{style:ye},marginBottom:{style:ye},marginLeft:{style:ye},marginX:{style:ye},marginY:{style:ye},marginInline:{style:ye},marginInlineStart:{style:ye},marginInlineEnd:{style:ye},marginBlock:{style:ye},marginBlockStart:{style:ye},marginBlockEnd:{style:ye},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:Xr},rowGap:{style:Qr},columnGap:{style:Zr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ke},maxWidth:{style:ia},minWidth:{transform:Ke},height:{transform:Ke},maxHeight:{transform:Ke},minHeight:{transform:Ke},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function pd(...e){const t=e.reduce((r,a)=>r.concat(Object.keys(a)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function hd(e,t){return typeof e=="function"?e(t):e}function fs(){function e(n,r,a,o){const s={[n]:r,theme:a},l=o[n];if(!l)return{[n]:r};const{cssProperty:c=n,themeKey:f,transform:h,style:m}=l;if(r==null)return null;if(f==="typography"&&r==="inherit")return{[n]:r};const b=Ur(a,f)||{};return m?m(s):ct(s,r,v=>{let u=Wr(b,h,v);return v===u&&typeof v=="string"&&(u=Wr(b,h,`${n}${v==="default"?"":Ct(v)}`,v)),c===!1?u:{[c]:u}})}function t(n){var r;const{sx:a,theme:o={}}=n||{};if(!a)return null;const s=(r=o.unstable_sxConfig)!=null?r:fr;function l(c){let f=c;if(typeof c=="function")f=c(o);else if(typeof c!="object")return c;if(!f)return null;const h=Oc(o.breakpoints),m=Object.keys(h);let b=h;return Object.keys(f).forEach(g=>{const v=hd(f[g],o);if(v!=null)if(typeof v=="object")if(s[g])b=ur(b,e(g,v,o,s));else{const u=ct({theme:o},v,y=>({[g]:y}));pd(u,v)?b[g]=t({sx:v,theme:o}):b=ur(b,u)}else b=ur(b,e(g,v,o,s))}),Rc(m,b)}return Array.isArray(a)?a.map(l):l(a)}return t}const Hr=fs();Hr.filterProps=["sx"];function ps(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const md=["breakpoints","palette","spacing","shape"];function hs(e={},...t){const{breakpoints:n={},palette:r={},spacing:a,shape:o={}}=e,s=Tt(e,md),l=is(n),c=Ic(a);let f=at({breakpoints:l,direction:"ltr",components:{},palette:re({mode:"light"},r),spacing:c,shape:re({},jc,o)},s);return f.applyStyles=ps,f=t.reduce((h,m)=>at(h,m),f),f.unstable_sxConfig=re({},fr,s==null?void 0:s.unstable_sxConfig),f.unstable_sx=function(m){return Hr({sx:m,theme:this})},f}const bd=ut(Object.freeze(Object.defineProperty({__proto__:null,default:hs,private_createBreakpoints:is,unstable_applyStyles:ps},Symbol.toStringTag,{value:"Module"}))),vd=["sx"],gd=e=>{var t,n;const r={systemProps:{},otherProps:{}},a=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:fr;return Object.keys(e).forEach(o=>{a[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function yd(e){const{sx:t}=e,n=Tt(e,vd),{systemProps:r,otherProps:a}=gd(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const l=t(...s);return xt(l)?re({},r,l):r}:o=re({},r,t),re({},a,{sx:o})}const xd=ut(Object.freeze(Object.defineProperty({__proto__:null,default:Hr,extendSxProp:yd,unstable_createStyleFunctionSx:fs,unstable_defaultSxConfig:fr},Symbol.toStringTag,{value:"Module"})));var zt=fe;Object.defineProperty(nr,"__esModule",{value:!0});var Cd=nr.default=Dd;nr.shouldForwardProp=en,nr.systemDefaultTheme=void 0;var Ze=zt(ko()),la=zt(xu()),ms=kd(xc),Td=Cc,_d=zt(Tc),Ed=zt(_c),wd=zt(bd),jd=zt(xd);const Od=["ownerState"],Rd=["variants"],Sd=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function bs(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(bs=function(r){return r?n:t})(e)}function kd(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=bs(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function $d(e){return Object.keys(e).length===0}function Md(e){return typeof e=="string"&&e.charCodeAt(0)>96}function en(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Pd=nr.systemDefaultTheme=(0,wd.default)(),vs=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function tn({defaultTheme:e,theme:t,themeId:n}){return $d(t)?e:t[n]||t}function Ad(e){return e?(t,n)=>n[e]:null}function rn(e,t){let{ownerState:n}=t,r=(0,la.default)(t,Od);const a=typeof e=="function"?e((0,Ze.default)({ownerState:n},r)):e;if(Array.isArray(a))return a.flatMap(o=>rn(o,(0,Ze.default)({ownerState:n},r)));if(a&&typeof a=="object"&&Array.isArray(a.variants)){const{variants:o=[]}=a;let l=(0,la.default)(a,Rd);return o.forEach(c=>{let f=!0;typeof c.props=="function"?f=c.props((0,Ze.default)({ownerState:n},r,n)):Object.keys(c.props).forEach(h=>{(n==null?void 0:n[h])!==c.props[h]&&r[h]!==c.props[h]&&(f=!1)}),f&&(Array.isArray(l)||(l=[l]),l.push(typeof c.style=="function"?c.style((0,Ze.default)({ownerState:n},r,n)):c.style))}),l}return a}function Dd(e={}){const{themeId:t,defaultTheme:n=Pd,rootShouldForwardProp:r=en,slotShouldForwardProp:a=en}=e,o=s=>(0,jd.default)((0,Ze.default)({},s,{theme:tn((0,Ze.default)({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,l={})=>{(0,ms.internal_processStyles)(s,x=>x.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:c,slot:f,skipVariantsResolver:h,skipSx:m,overridesResolver:b=Ad(vs(f))}=l,g=(0,la.default)(l,Sd),v=h!==void 0?h:f&&f!=="Root"&&f!=="root"||!1,u=m||!1;let y;process.env.NODE_ENV!=="production"&&c&&(y=`${c}-${vs(f||"Root")}`);let w=en;f==="Root"||f==="root"?w=r:f?w=a:Md(s)&&(w=void 0);const j=(0,ms.default)(s,(0,Ze.default)({shouldForwardProp:w,label:y},g)),$=x=>typeof x=="function"&&x.__emotion_real!==x||(0,Td.isPlainObject)(x)?A=>rn(x,(0,Ze.default)({},A,{theme:tn({theme:A.theme,defaultTheme:n,themeId:t})})):x,M=(x,...A)=>{let F=$(x);const be=A?A.map($):[];c&&b&&be.push(te=>{const he=tn((0,Ze.default)({},te,{defaultTheme:n,themeId:t}));if(!he.components||!he.components[c]||!he.components[c].styleOverrides)return null;const de=he.components[c].styleOverrides,se={};return Object.entries(de).forEach(([Be,Te])=>{se[Be]=rn(Te,(0,Ze.default)({},te,{theme:he}))}),b(te,se)}),c&&!v&&be.push(te=>{var he;const de=tn((0,Ze.default)({},te,{defaultTheme:n,themeId:t})),se=de==null||(he=de.components)==null||(he=he[c])==null?void 0:he.variants;return rn({variants:se},(0,Ze.default)({},te,{theme:de}))}),u||be.push(o);const Ie=be.length-A.length;if(Array.isArray(x)&&Ie>0){const te=new Array(Ie).fill("");F=[...x,...te],F.raw=[...x.raw,...te]}const ee=j(F,...be);if(process.env.NODE_ENV!=="production"){let te;c&&(te=`${c}${(0,_d.default)(f||"")}`),te===void 0&&(te=`Styled(${(0,Ed.default)(s)})`),ee.displayName=te}return s.muiName&&(ee.muiName=s.muiName),ee};return j.withConfig&&(M.withConfig=j.withConfig),M}}function Id(e,t){return re({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var we={};const Fd=ut(Fl),Ld=ut(hu);var gs=fe;Object.defineProperty(we,"__esModule",{value:!0}),we.alpha=Es,we.blend=Xd,we.colorChannel=void 0;var Bd=we.darken=ca;we.decomposeColor=Qe,we.emphasize=ws;var ys=we.getContrastRatio=Wd;we.getLuminance=nn,we.hexToRgb=Cs,we.hslToRgb=_s;var Vd=we.lighten=da;we.private_safeAlpha=Yd,we.private_safeColorChannel=void 0,we.private_safeDarken=Kd,we.private_safeEmphasize=Jd,we.private_safeLighten=Gd,we.recomposeColor=Nt,we.rgbToHex=Ud;var xs=gs(Fd),qd=gs(Ld);function ua(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),(0,qd.default)(e,t,n)}function Cs(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,a)=>a<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function zd(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function Qe(e){if(e.type)return e;if(e.charAt(0)==="#")return Qe(Cs(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
80
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:(0,xs.default)(9,e));let r=e.substring(t+1,e.length-1),a;if(n==="color"){if(r=r.split(" "),a=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(a)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${a}\` color space.
81
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:(0,xs.default)(10,a))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:a}}const Ts=e=>{const t=Qe(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};we.colorChannel=Ts;const Nd=(e,t)=>{try{return Ts(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};we.private_safeColorChannel=Nd;function Nt(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((a,o)=>o<3?parseInt(a,10):a):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Ud(e){if(e.indexOf("#")===0)return e;const{values:t}=Qe(e);return`#${t.map((n,r)=>zd(r===3?Math.round(255*n):n)).join("")}`}function _s(e){e=Qe(e);const{values:t}=e,n=t[0],r=t[1]/100,a=t[2]/100,o=r*Math.min(a,1-a),s=(f,h=(f+n/30)%12)=>a-o*Math.max(Math.min(h-3,9-h,1),-1);let l="rgb";const c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),Nt({type:l,values:c})}function nn(e){e=Qe(e);let t=e.type==="hsl"||e.type==="hsla"?Qe(_s(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Wd(e,t){const n=nn(e),r=nn(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Es(e,t){return e=Qe(e),t=ua(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Nt(e)}function Yd(e,t,n){try{return Es(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function ca(e,t){if(e=Qe(e),t=ua(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Nt(e)}function Kd(e,t,n){try{return ca(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function da(e,t){if(e=Qe(e),t=ua(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Nt(e)}function Gd(e,t,n){try{return da(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function ws(e,t=.15){return nn(e)>.5?ca(e,t):da(e,t)}function Jd(e,t,n){try{return ws(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function Xd(e,t,n,r=1){const a=(c,f)=>Math.round((c**(1/r)*(1-n)+f**(1/r)*n)**r),o=Qe(e),s=Qe(t),l=[a(o.values[0],s.values[0]),a(o.values[1],s.values[1]),a(o.values[2],s.values[2])];return Nt({type:"rgb",values:l})}const pr={black:"#000",white:"#fff"},Zd={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"},Ut={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Wt={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},hr={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Yt={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Kt={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Gt={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},Qd=["mode","contrastThreshold","tonalOffset"],js={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:pr.white,default:pr.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}},fa={text:{primary:pr.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:pr.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}};function Os(e,t,n,r){const a=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Vd(e.main,a):t==="dark"&&(e.dark=Bd(e.main,o)))}function Hd(e="light"){return e==="dark"?{main:Yt[200],light:Yt[50],dark:Yt[400]}:{main:Yt[700],light:Yt[400],dark:Yt[800]}}function ef(e="light"){return e==="dark"?{main:Ut[200],light:Ut[50],dark:Ut[400]}:{main:Ut[500],light:Ut[300],dark:Ut[700]}}function tf(e="light"){return e==="dark"?{main:Wt[500],light:Wt[300],dark:Wt[700]}:{main:Wt[700],light:Wt[400],dark:Wt[800]}}function rf(e="light"){return e==="dark"?{main:Kt[400],light:Kt[300],dark:Kt[700]}:{main:Kt[700],light:Kt[500],dark:Kt[900]}}function nf(e="light"){return e==="dark"?{main:Gt[400],light:Gt[300],dark:Gt[700]}:{main:Gt[800],light:Gt[500],dark:Gt[900]}}function af(e="light"){return e==="dark"?{main:hr[400],light:hr[300],dark:hr[700]}:{main:"#ed6c02",light:hr[500],dark:hr[900]}}function of(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,a=Tt(e,Qd),o=e.primary||Hd(t),s=e.secondary||ef(t),l=e.error||tf(t),c=e.info||rf(t),f=e.success||nf(t),h=e.warning||af(t);function m(u){const y=ys(u,fa.text.primary)>=n?fa.text.primary:js.text.primary;if(process.env.NODE_ENV!=="production"){const w=ys(u,y);w<3&&console.error([`MUI: The contrast ratio of ${w}:1 for ${y} on ${u}`,"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(`
82
- `))}return y}const b=({color:u,name:y,mainShade:w=500,lightShade:j=300,darkShade:$=700})=>{if(u=re({},u),!u.main&&u[w]&&(u.main=u[w]),!u.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${y?` (${y})`:""} provided to augmentColor(color) is invalid.
83
- The color object needs to have a \`main\` property or a \`${w}\` property.`:rr(11,y?` (${y})`:"",w));if(typeof u.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${y?` (${y})`:""} provided to augmentColor(color) is invalid.
84
- \`color.main\` should be a string, but \`${JSON.stringify(u.main)}\` was provided instead.
69
+ */function Js(e,t){const r=rn(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const a=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${a})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
70
+ `)):n.some(o=>o===void 0)&&console.error(`MUI: the styled(${a})(...args) API requires all its args to be defined.`),r(...n)}:r}function Qs(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Ea=[];function it(e){return Ea[0]=e,Ca(Ea)}const Xs=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function Zs(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...a}=e,o=Xs(t),s=Object.keys(o);function l(g){return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${r})`}function f(g){return`@media (max-width:${(typeof t[g]=="number"?t[g]:g)-n/100}${r})`}function p(g,C){const y=s.indexOf(C);return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${r}) and (max-width:${(y!==-1&&typeof t[s[y]]=="number"?t[s[y]]:C)-n/100}${r})`}function m(g){return s.indexOf(g)+1<s.length?p(g,s[s.indexOf(g)+1]):l(g)}function b(g){const C=s.indexOf(g);return C===0?l(s[1]):C===s.length-1?f(s[C]):p(g,s[s.indexOf(g)+1]).replace("@media","@media not all and")}return{keys:s,values:o,up:l,down:f,between:p,only:m,not:b,unit:r,...a}}const el={borderRadius:4};function ja(e=8,t=Yr({spacing:e})){if(e.mui)return e;const r=(...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(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" "));return r.mui=!0,r}function tl(e,t){const r=this;if(r.vars){if(!r.colorSchemes?.[e]||typeof r.getColorSchemeSelector!="function")return{};let n=r.getColorSchemeSelector(e);return n==="&"?t:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:t})}return r.palette.mode===e?t:{}}function Sa(e={},...t){const{breakpoints:r={},palette:n={},spacing:a,shape:o={},...s}=e,l=Zs(r),f=ja(a);let p=$e({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:f,shape:{...el,...o}},s);return p=fi(p),p.applyStyles=tl,p=t.reduce((m,b)=>$e(m,b),p),p.unstable_sxConfig={...yr,...s?.unstable_sxConfig},p.unstable_sx=function(b){return bt({sx:b,theme:this})},p}const rl={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 nn(e,t,r="Mui"){const n=rl[t];return n?`${r}-${n}`:`${Qo.generate(e)}-${t}`}function nl(e,t,r="Mui"){const n={};return t.forEach(a=>{n[a]=nn(e,a,r)}),n}function Pa(e,t=""){return e.displayName||e.name||t}function Aa(e,t,r){const n=Pa(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function al(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Pa(e,"Component");if(typeof e=="object")switch(e.$$typeof){case sr.ForwardRef:return Aa(e,e.render,"ForwardRef");case sr.Memo:return Aa(e,e.type,"memo");default:return}}}function Oa(e){const{variants:t,...r}=e,n={variants:t,style:it(r),isProcessed:!0};return n.style===r||t&&t.forEach(a=>{typeof a.style!="function"&&(a.style=it(a.style))}),n}const ol=Sa();function an(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function st(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function il(e){return e?(t,r)=>r[e]:null}function sl(e,t,r){e.theme=dl(e.theme)?r:e.theme[t]||e.theme}function Sr(e,t,r){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(a=>Sr(e,a,r));if(Array.isArray(n?.variants)){let a;if(n.isProcessed)a=r?st(n.style,r):n.style;else{const{variants:o,...s}=n;a=r?st(it(s),r):s}return Ra(e,n.variants,[a],r)}return n?.isProcessed?r?st(it(n.style),r):n.style:r?st(it(n),r):n}function Ra(e,t,r=[],n=void 0){let a;e:for(let o=0;o<t.length;o+=1){const s=t[o];if(typeof s.props=="function"){if(a??={...e,...e.ownerState,ownerState:e.ownerState},!s.props(a))continue}else for(const l in s.props)if(e[l]!==s.props[l]&&e.ownerState?.[l]!==s.props[l])continue e;typeof s.style=="function"?(a??={...e,...e.ownerState,ownerState:e.ownerState},r.push(n?st(it(s.style(a)),n):s.style(a))):r.push(n?st(it(s.style),n):s.style)}return r}function ll(e={}){const{themeId:t,defaultTheme:r=ol,rootShouldForwardProp:n=an,slotShouldForwardProp:a=an}=e;function o(l){sl(l,t,r)}return(l,f={})=>{Qs(l,I=>I.filter($=>$!==bt));const{name:p,slot:m,skipVariantsResolver:b,skipSx:g,overridesResolver:C=il($a(m)),...y}=f,c=p&&p.startsWith("Mui")||m?"components":"custom",v=b!==void 0?b:m&&m!=="Root"&&m!=="root"||!1,k=g||!1;let O=an;m==="Root"||m==="root"?O=n:m?O=a:fl(l)&&(O=void 0);const j=Js(l,{shouldForwardProp:O,label:ul(p,m),...y}),P=I=>{if(I.__emotion_real===I)return I;if(typeof I=="function")return function(G){return Sr(G,I,G.theme.modularCssLayers?c:void 0)};if(Ue(I)){const $=Oa(I);return function(H){return $.variants?Sr(H,$,H.theme.modularCssLayers?c:void 0):H.theme.modularCssLayers?st($.style,c):$.style}}return I},T=(...I)=>{const $=[],G=I.map(P),H=[];if($.push(o),p&&C&&H.push(function(B){const se=B.theme.components?.[p]?.styleOverrides;if(!se)return null;const ue={};for(const ve in se)ue[ve]=Sr(B,se[ve],B.theme.modularCssLayers?"theme":void 0);return C(B,ue)}),p&&!v&&H.push(function(B){const se=B.theme?.components?.[p]?.variants;return se?Ra(B,se,[],B.theme.modularCssLayers?"theme":void 0):null}),k||H.push(bt),Array.isArray(G[0])){const Y=G.shift(),B=new Array($.length).fill(""),he=new Array(H.length).fill("");let se;se=[...B,...Y,...he],se.raw=[...B,...Y.raw,...he],$.unshift(se)}const u=[...$,...G,...H],R=j(...u);return l.muiName&&(R.muiName=l.muiName),process.env.NODE_ENV!=="production"&&(R.displayName=cl(p,m,l)),R};return j.withConfig&&(T.withConfig=j.withConfig),T}}function cl(e,t,r){return e?`${e}${ot(t||"")}`:`Styled(${al(r)})`}function ul(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${$a(t||"Root")}`),r}function dl(e){for(const t in e)return!1;return!0}function fl(e){return typeof e=="string"&&e.charCodeAt(0)>96}function $a(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function on(e,t,r=!1){const n={...t};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const o=a;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const s=e[o],l=t[o];if(!l)n[o]=s||{};else if(!s)n[o]=l;else{n[o]={...l};for(const f in s)if(Object.prototype.hasOwnProperty.call(s,f)){const p=f;n[o][p]=on(s[p],l[p],r)}}}else o==="className"&&r&&t.className?n.className=Kn(e?.className,t?.className):o==="style"&&r&&t.style?n.style={...e?.style,...t?.style}:n[o]===void 0&&(n[o]=e[o])}return n}function pl(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function sn(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),pl(e,t,r)}function hl(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.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.`),r?`rgb${r.length===4?"a":""}(${r.map((n,a)=>a<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(hl(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
71
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Qe(9,e));let n=e.substring(t+1,e.length-1),a;if(r==="color"){if(n=n.split(" "),a=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(a))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${a}\` color space.
72
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Qe(10,a))}else n=n.split(",");return n=n.map(o=>parseFloat(o)),{type:r,values:n,colorSpace:a}}const ml=e=>{const t=Ze(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},Lt=(e,t)=>{try{return ml(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Pr(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((a,o)=>o<3?parseInt(a,10):a):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function _a(e){e=Ze(e);const{values:t}=e,r=t[0],n=t[1]/100,a=t[2]/100,o=n*Math.min(a,1-a),s=(p,m=(p+r/30)%12)=>a-o*Math.max(Math.min(m-3,9-m,1),-1);let l="rgb";const f=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",f.push(t[3])),Pr({type:l,values:f})}function ln(e){e=Ze(e);let t=e.type==="hsl"||e.type==="hsla"?Ze(_a(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Ma(e,t){const r=ln(e),n=ln(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function bl(e,t){return e=Ze(e),t=sn(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Pr(e)}function Ar(e,t,r){try{return bl(e,t)}catch{return e}}function cn(e,t){if(e=Ze(e),t=sn(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return Pr(e)}function ae(e,t,r){try{return cn(e,t)}catch{return e}}function un(e,t){if(e=Ze(e),t=sn(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return Pr(e)}function oe(e,t,r){try{return un(e,t)}catch{return e}}function gl(e,t=.15){return ln(e)>.5?cn(e,t):un(e,t)}function Or(e,t,r){try{return gl(e,t)}catch{return e}}const yl=ke.createContext(void 0);process.env.NODE_ENV!=="production"&&(K.node,K.object);function xl(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const a=t.components[r];return a.defaultProps?on(a.defaultProps,n,t.components.mergeClassNameAndStyle):!a.styleOverrides&&!a.variants?on(a,n,t.components.mergeClassNameAndStyle):n}function vl({props:e,name:t}){const r=ke.useContext(yl);return xl({props:e,name:t,theme:{components:r}})}const Da={theme:void 0};function Cl(e){let t,r;return function(a){let o=t;return(o===void 0||a.theme!==r)&&(Da.theme=a.theme,o=Oa(e(Da)),t=o,r=a.theme),o}}function Tl(e=""){function t(...n){if(!n.length)return"";const a=n[0];return typeof a=="string"&&!a.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}-`:""}${a}${t(...n.slice(1))})`:`, ${a}`}return(n,...a)=>`var(--${e?`${e}-`:""}${n}${t(...a)})`}const Ia=(e,t,r,n=[])=>{let a=e;t.forEach((o,s)=>{s===t.length-1?Array.isArray(a)?a[Number(o)]=r:a&&typeof a=="object"&&(a[o]=r):a&&typeof a=="object"&&(a[o]||(a[o]=n.includes(o)?[]:{}),a=a[o])})},wl=(e,t,r)=>{function n(a,o=[],s=[]){Object.entries(a).forEach(([l,f])=>{(!r||r&&!r([...o,l]))&&f!=null&&(typeof f=="object"&&Object.keys(f).length>0?n(f,[...o,l],Array.isArray(f)?[...s,l]:s):t([...o,l],f,s))})}n(e)},kl=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function dn(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},a={},o={},s={};return wl(e,(l,f,p)=>{if((typeof f=="string"||typeof f=="number")&&(!n||!n(l,f))){const m=`--${r?`${r}-`:""}${l.join("-")}`,b=kl(l,f);Object.assign(a,{[m]:b}),Ia(o,l,`var(${m})`,p),Ia(s,l,`var(${m}, ${b})`,p)}},l=>l[0]==="vars"),{css:a,vars:o,varsWithDefaults:s}}function El(e,t={}){const{getSelector:r=v,disableCssColorScheme:n,colorSchemeSelector:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:l="light",...f}=e,{vars:p,css:m,varsWithDefaults:b}=dn(f,t);let g=b;const C={},{[l]:y,...c}=o;if(Object.entries(c||{}).forEach(([j,P])=>{const{vars:T,css:I,varsWithDefaults:$}=dn(P,t);g=$e(g,$),C[j]={css:I,vars:T}}),y){const{css:j,vars:P,varsWithDefaults:T}=dn(y,t);g=$e(g,T),C[l]={css:j,vars:P}}function v(j,P){let T=a;if(a==="class"&&(T=".%s"),a==="data"&&(T="[data-%s]"),a?.startsWith("data-")&&!a.includes("%s")&&(T=`[${a}="%s"]`),j){if(T==="media")return e.defaultColorScheme===j?":root":{[`@media (prefers-color-scheme: ${o[j]?.palette?.mode||j})`]:{":root":P}};if(T)return e.defaultColorScheme===j?`:root, ${T.replace("%s",String(j))}`:T.replace("%s",String(j))}return":root"}return{vars:g,generateThemeVars:()=>{let j={...p};return Object.entries(C).forEach(([,{vars:P}])=>{j=$e(j,P)}),j},generateStyleSheets:()=>{const j=[],P=e.defaultColorScheme||"light";function T(G,H){Object.keys(H).length&&j.push(typeof G=="string"?{[G]:{...H}}:G)}T(r(void 0,{...m}),m);const{[P]:I,...$}=C;if(I){const{css:G}=I,H=o[P]?.palette?.mode,u=!n&&H?{colorScheme:H,...G}:{...G};T(r(P,{...u}),u)}return Object.entries($).forEach(([G,{css:H}])=>{const u=o[G]?.palette?.mode,R=!n&&u?{colorScheme:u,...H}:{...H};T(r(G,{...R}),R)}),j}}}function jl(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const Vt={black:"#000",white:"#fff"},Sl={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"},vt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Ct={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},zt={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Tt={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},wt={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},kt={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Na(){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:Vt.white,default:Vt.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 Pl=Na();function Fa(){return{text:{primary:Vt.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:Vt.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 Ba=Fa();function La(e,t,r,n){const a=n.light||n,o=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=un(e.main,a):t==="dark"&&(e.dark=cn(e.main,o)))}function Al(e="light"){return e==="dark"?{main:Tt[200],light:Tt[50],dark:Tt[400]}:{main:Tt[700],light:Tt[400],dark:Tt[800]}}function Ol(e="light"){return e==="dark"?{main:vt[200],light:vt[50],dark:vt[400]}:{main:vt[500],light:vt[300],dark:vt[700]}}function Rl(e="light"){return e==="dark"?{main:Ct[500],light:Ct[300],dark:Ct[700]}:{main:Ct[700],light:Ct[400],dark:Ct[800]}}function $l(e="light"){return e==="dark"?{main:wt[400],light:wt[300],dark:wt[700]}:{main:wt[700],light:wt[500],dark:wt[900]}}function _l(e="light"){return e==="dark"?{main:kt[400],light:kt[300],dark:kt[700]}:{main:kt[800],light:kt[500],dark:kt[900]}}function Ml(e="light"){return e==="dark"?{main:zt[400],light:zt[300],dark:zt[700]}:{main:"#ed6c02",light:zt[500],dark:zt[900]}}function fn(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...a}=e,o=e.primary||Al(t),s=e.secondary||Ol(t),l=e.error||Rl(t),f=e.info||$l(t),p=e.success||_l(t),m=e.warning||Ml(t);function b(c){const v=Ma(c,Ba.text.primary)>=r?Ba.text.primary:Pl.text.primary;if(process.env.NODE_ENV!=="production"){const k=Ma(c,v);k<3&&console.error([`MUI: The contrast ratio of ${k}:1 for ${v} on ${c}`,"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(`
73
+ `))}return v}const g=({color:c,name:v,mainShade:k=500,lightShade:O=300,darkShade:j=700})=>{if(c={...c},!c.main&&c[k]&&(c.main=c[k]),!c.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${v?` (${v})`:""} provided to augmentColor(color) is invalid.
74
+ The color object needs to have a \`main\` property or a \`${k}\` property.`:Qe(11,v?` (${v})`:"",k));if(typeof c.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${v?` (${v})`:""} provided to augmentColor(color) is invalid.
75
+ \`color.main\` should be a string, but \`${JSON.stringify(c.main)}\` was provided instead.
85
76
 
86
77
  Did you intend to use one of the following approaches?
87
78
 
@@ -93,7 +84,14 @@ const theme1 = createTheme({ palette: {
93
84
 
94
85
  const theme2 = createTheme({ palette: {
95
86
  primary: { main: green[500] },
96
- } });`:rr(12,y?` (${y})`:"",JSON.stringify(u.main)));return Os(u,"light",j,r),Os(u,"dark",$,r),u.contrastText||(u.contrastText=m(u.main)),u},g={dark:fa,light:js};return process.env.NODE_ENV!=="production"&&(g[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),at(re({common:re({},pr),mode:t,primary:b({color:o,name:"primary"}),secondary:b({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:b({color:l,name:"error"}),warning:b({color:h,name:"warning"}),info:b({color:c,name:"info"}),success:b({color:f,name:"success"}),grey:Zd,contrastThreshold:n,getContrastText:m,augmentColor:b,tonalOffset:r},g[t]),a)}const sf=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function lf(e){return Math.round(e*1e5)/1e5}const Rs={textTransform:"uppercase"},Ss='"Roboto", "Helvetica", "Arial", sans-serif';function uf(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=Ss,fontSize:a=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:c=700,htmlFontSize:f=16,allVariants:h,pxToRem:m}=n,b=Tt(n,sf);process.env.NODE_ENV!=="production"&&(typeof a!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof f!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const g=a/14,v=m||(w=>`${w/f*g}rem`),u=(w,j,$,M,x)=>re({fontFamily:r,fontWeight:w,fontSize:v(j),lineHeight:$},r===Ss?{letterSpacing:`${lf(M/j)}em`}:{},x,h),y={h1:u(o,96,1.167,-1.5),h2:u(o,60,1.2,-.5),h3:u(s,48,1.167,0),h4:u(s,34,1.235,.25),h5:u(s,24,1.334,0),h6:u(l,20,1.6,.15),subtitle1:u(s,16,1.75,.15),subtitle2:u(l,14,1.57,.1),body1:u(s,16,1.5,.15),body2:u(s,14,1.43,.15),button:u(l,14,1.75,.4,Rs),caption:u(s,12,1.66,.4),overline:u(s,12,2.66,1,Rs),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return at(re({htmlFontSize:f,pxToRem:v,fontFamily:r,fontSize:a,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:c},y),b,{clone:!1})}const cf=.2,df=.14,ff=.12;function pe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${cf})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${df})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${ff})`].join(",")}const pf=["none",pe(0,2,1,-1,0,1,1,0,0,1,3,0),pe(0,3,1,-2,0,2,2,0,0,1,5,0),pe(0,3,3,-2,0,3,4,0,0,1,8,0),pe(0,2,4,-1,0,4,5,0,0,1,10,0),pe(0,3,5,-1,0,5,8,0,0,1,14,0),pe(0,3,5,-1,0,6,10,0,0,1,18,0),pe(0,4,5,-2,0,7,10,1,0,2,16,1),pe(0,5,5,-3,0,8,10,1,0,3,14,2),pe(0,5,6,-3,0,9,12,1,0,3,16,2),pe(0,6,6,-3,0,10,14,1,0,4,18,3),pe(0,6,7,-4,0,11,15,1,0,4,20,3),pe(0,7,8,-4,0,12,17,2,0,5,22,4),pe(0,7,8,-4,0,13,19,2,0,5,24,4),pe(0,7,9,-4,0,14,21,2,0,5,26,4),pe(0,8,9,-5,0,15,22,2,0,6,28,5),pe(0,8,10,-5,0,16,24,2,0,6,30,5),pe(0,8,11,-5,0,17,26,2,0,6,32,5),pe(0,9,11,-5,0,18,28,2,0,7,34,6),pe(0,9,12,-6,0,19,29,2,0,7,36,6),pe(0,10,13,-6,0,20,31,3,0,8,38,7),pe(0,10,13,-6,0,21,33,3,0,8,40,7),pe(0,10,14,-6,0,22,35,3,0,8,42,7),pe(0,11,14,-7,0,23,36,3,0,9,44,8),pe(0,11,15,-7,0,24,38,3,0,9,46,8)],hf=["duration","easing","delay"],mf={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)"},bf={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ks(e){return`${Math.round(e)}ms`}function vf(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function gf(e){const t=re({},mf,e.easing),n=re({},bf,e.duration);return re({getAutoHeightDuration:vf,create:(a=["all"],o={})=>{const{duration:s=n.standard,easing:l=t.easeInOut,delay:c=0}=o,f=Tt(o,hf);if(process.env.NODE_ENV!=="production"){const h=b=>typeof b=="string",m=b=>!isNaN(parseFloat(b));!h(a)&&!Array.isArray(a)&&console.error('MUI: Argument "props" must be a string or Array.'),!m(s)&&!h(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),h(l)||console.error('MUI: Argument "easing" must be a string.'),!m(c)&&!h(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof o!="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(`
97
- `)),Object.keys(f).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(f).join(",")}].`)}return(Array.isArray(a)?a:[a]).map(h=>`${h} ${typeof s=="string"?s:ks(s)} ${l} ${typeof c=="string"?c:ks(c)}`).join(",")}},e,{easing:t,duration:n})}const yf={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},xf=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Cf(e={},...t){const{mixins:n={},palette:r={},transitions:a={},typography:o={}}=e,s=Tt(e,xf);if(e.vars)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":rr(18));const l=of(r),c=hs(e);let f=at(c,{mixins:Id(c.breakpoints,n),palette:l,shadows:pf.slice(),typography:uf(l,o),transitions:gf(a),zIndex:re({},yf)});if(f=at(f,s),f=t.reduce((h,m)=>at(h,m),f),process.env.NODE_ENV!=="production"){const h=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],m=(b,g)=>{let v;for(v in b){const u=b[v];if(h.indexOf(v)!==-1&&Object.keys(u).length>0){if(process.env.NODE_ENV!=="production"){const y=Un("",v);console.error([`MUI: The \`${g}\` component increases the CSS specificity of the \`${v}\` internal state.`,"You can not override it like this: ",JSON.stringify(b,null,2),"",`Instead, you need to use the '&.${y}' syntax:`,JSON.stringify({root:{[`&.${y}`]:u}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
98
- `))}b[v]={}}}};Object.keys(f.components).forEach(b=>{const g=f.components[b].styleOverrides;g&&b.indexOf("Mui")===0&&m(g,b)})}return f.unstable_sxConfig=re({},fr,s==null?void 0:s.unstable_sxConfig),f.unstable_sx=function(m){return Hr({sx:m,theme:this})},f}const Tf=Cf(),_f="$$material";function Ef(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const wf=Cd({themeId:_f,defaultTheme:Tf,rootShouldForwardProp:e=>Ef(e)&&e!=="classes"});function jf(e){return Un("MuiSvgIcon",e)}fu("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Of=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Rf=e=>{const{color:t,fontSize:n,classes:r}=e,a={root:["root",t!=="inherit"&&`color${Ct(t)}`,`fontSize${Ct(n)}`]};return cu(a,jf,r)},Sf=wf("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ct(n.color)}`],t[`fontSize${Ct(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,a,o,s,l,c,f,h,m,b,g,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(a=e.transitions)==null||(a=a.duration)==null?void 0:a.shorter}),fontSize:{inherit:"inherit",small:((o=e.typography)==null||(s=o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem",medium:((l=e.typography)==null||(c=l.pxToRem)==null?void 0:c.call(l,24))||"1.5rem",large:((f=e.typography)==null||(h=f.pxToRem)==null?void 0:h.call(f,35))||"2.1875rem"}[t.fontSize],color:(m=(b=(e.vars||e).palette)==null||(b=b[t.color])==null?void 0:b.main)!=null?m:{action:(g=(e.vars||e).palette)==null||(g=g.action)==null?void 0:g.active,disabled:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[t.color]}}),an=q.forwardRef(function(t,n){const r=yu({props:t,name:"MuiSvgIcon"}),{children:a,className:o,color:s="inherit",component:l="svg",fontSize:c="medium",htmlColor:f,inheritViewBox:h=!1,titleAccess:m,viewBox:b="0 0 24 24"}=r,g=Tt(r,Of),v=q.isValidElement(a)&&a.type==="svg",u=re({},r,{color:s,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:h,viewBox:b,hasSvgAsChild:v}),y={};h||(y.viewBox=b);const w=Rf(u);return i.jsxs(Sf,re({as:l,className:mu(w.root,o),focusable:"false",color:f,"aria-hidden":m?void 0:!0,role:m?"img":void 0,ref:n},y,g,v&&a.props,{ownerState:u,children:[v?a.props.children:a,m?i.jsx("title",{children:m}):null]}))});process.env.NODE_ENV!=="production"&&(an.propTypes={children:W.node,classes:W.object,className:W.string,color:W.oneOfType([W.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),W.string]),component:W.elementType,fontSize:W.oneOfType([W.oneOf(["inherit","large","medium","small"]),W.string]),htmlColor:W.string,inheritViewBox:W.bool,shapeRendering:W.string,sx:W.oneOfType([W.arrayOf(W.oneOfType([W.func,W.object,W.bool])),W.func,W.object]),titleAccess:W.string,viewBox:W.string}),an.muiName="SvgIcon";function kf(e,t){function n(r,a){return i.jsx(an,re({"data-testid":`${t}Icon`,ref:a},r,{children:e}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=an.muiName,q.memo(q.forwardRef(n))}const $f=ut(Object.freeze(Object.defineProperty({__proto__:null,capitalize:Ct,createChainedFunction:Ul,createSvgIcon:kf,debounce:Wl,deprecatedPropType:Yl,isMuiElement:Kl,ownerDocument:Co,ownerWindow:Gl,requirePropFactory:Jl,setRef:To,unstable_ClassNameGenerator:{configure:e=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
99
- `)),Oo.configure(e)}},unstable_useEnhancedEffect:_o,unstable_useId:Zl,unsupportedProp:Ql,useControlled:Hl,useEventCallback:eu,useForkRef:tu,useIsFocusVisible:uu},Symbol.toStringTag,{value:"Module"})));var $s;function Ce(){return $s||($s=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=$f}(Sn)),Sn}var Mf=fe;Object.defineProperty(Rn,"__esModule",{value:!0});var Ms=Rn.default=void 0,Pf=Mf(Ce()),Af=i;Ms=Rn.default=(0,Pf.default)((0,Af.jsx)("path",{d:"M15 1H4c-1.1 0-2 .9-2 2v13c0 .55.45 1 1 1s1-.45 1-1V4c0-.55.45-1 1-1h10c.55 0 1-.45 1-1s-.45-1-1-1m.59 4.59 4.83 4.83c.37.37.58.88.58 1.41V21c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h6.17c.53 0 1.04.21 1.42.59M15 12h4.5L14 6.5V11c0 .55.45 1 1 1"}),"FileCopyRounded");var pa={},Df=fe;Object.defineProperty(pa,"__esModule",{value:!0});var Ps=pa.default=void 0,If=Df(Ce()),Ff=i;Ps=pa.default=(0,If.default)((0,Ff.jsx)("path",{d:"M6.56 7.98C6.1 7.52 5.31 7.6 5 8.17c-.28.51-.5 1.03-.67 1.58-.19.63.31 1.25.96 1.25h.01c.43 0 .82-.28.94-.7.12-.4.28-.79.48-1.17.22-.37.15-.84-.16-1.15M5.31 13h-.02c-.65 0-1.15.62-.96 1.25.16.54.38 1.07.66 1.58.31.57 1.11.66 1.57.2.3-.31.38-.77.17-1.15-.2-.37-.36-.76-.48-1.16-.12-.44-.51-.72-.94-.72m2.85 6.02c.51.28 1.04.5 1.59.66.62.18 1.24-.32 1.24-.96v-.03c0-.43-.28-.82-.7-.94-.4-.12-.78-.28-1.15-.48-.38-.21-.86-.14-1.16.17l-.03.03c-.45.45-.36 1.24.21 1.55M13 4.07v-.66c0-.89-1.08-1.34-1.71-.71L9.17 4.83c-.4.4-.4 1.04 0 1.43l2.13 2.08c.63.62 1.7.17 1.7-.72V6.09c2.84.48 5 2.94 5 5.91 0 2.73-1.82 5.02-4.32 5.75-.41.12-.68.51-.68.94v.02c0 .65.61 1.14 1.23.96C17.57 18.71 20 15.64 20 12c0-4.08-3.05-7.44-7-7.93"}),"RotateLeftRounded");var ha={},Lf=fe;Object.defineProperty(ha,"__esModule",{value:!0});var As=ha.default=void 0,Bf=Lf(Ce()),Vf=i;As=ha.default=(0,Bf.default)((0,Vf.jsx)("path",{d:"M17.59 3.59c-.38-.38-.89-.59-1.42-.59H5c-1.11 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7.83c0-.53-.21-1.04-.59-1.41zM12 19c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m1-10H7c-1.1 0-2-.9-2-2s.9-2 2-2h6c1.1 0 2 .9 2 2s-.9 2-2 2"}),"SaveRounded");var ma={},qf=fe;Object.defineProperty(ma,"__esModule",{value:!0});var Ds=ma.default=void 0,zf=qf(Ce()),Nf=i;Ds=ma.default=(0,zf.default)((0,Nf.jsx)("path",{d:"M18 2h-7.17c-.53 0-1.04.21-1.42.59L4.59 7.41C4.21 7.79 4 8.3 4 8.83V20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-6.35 14.65-2.79-2.79c-.32-.32-.1-.86.35-.86H11v-2.99c0-.55.44-.99.99-1 .56-.01 1.01.44 1.01 1V13h1.79c.45 0 .67.54.35.85l-2.79 2.79c-.19.2-.51.2-.7.01"}),"SimCardDownloadRounded");const Uf=()=>{const{backendConfig:e}=Re(),{endpoints:t}=e||{},{workflow:n=""}=t||{};return Dt.useMutation({mutationFn:async r=>{const{data:a}=await It.patch(n,r);return a},mutationKey:["patchWorkflow"]})},Wf=()=>{const{backendConfig:e}=Re(),{endpoints:t}=e||{},{workflow:n=""}=t||{};return Dt.useMutation({mutationFn:async r=>{const{data:a}=await It.post(n,r);return a},mutationKey:["postWorkflow"]})},Yf=()=>{const{t:e}=Pe.useTranslation(["snackMessage"]),{openSnackbar:t}=p.useSnackbar(),{setCurrentTree:n,currentTree:r,tree:a,dispatchTree:o}=Re(),[s,l]=_.useState(!1),{version:c}=Re(),{mutate:f}=Wf(),{mutate:h}=Uf(),m=j=>JSON.stringify(j,null,2),b=j=>`data:text/json;charset=utf-8,${encodeURIComponent(m(j))}`,g=j=>()=>{navigator.clipboard.writeText(m(j)).then(),t({message:e("success.copyToClipboard",{ns:"snackMessage"})})},v=()=>{l(!1)};return{copyToClipboard:g,formatJSON:m,getDownloadLink:b,handleClose:v,handleOpen:()=>{l(!0)},handleResetTree:()=>{o(Qa()),v()},handleSubmit:()=>{const{name:j,id:$}=r;if(!j){n(M=>({...M,errorName:"Champs Requis"}));return}if(a){if($){h({id:$,label:j,version:c,workflow:a},{onError:()=>{t({message:e("error.updateTree",{ns:"snackMessage"}),severity:"error"})},onSuccess:()=>{t({message:e("success.updateTree",{ns:"snackMessage"})})}});return}f({label:j,version:c,workflow:a},{onError:()=>{t({message:e("error.updateTree",{ns:"snackMessage"}),severity:"error"})},onSuccess:()=>{t({message:e("success.updateTree",{ns:"snackMessage"})})}})}},openModal:s}},Kf=({downloadedFileName:e="export",value:t})=>{const{t:n}=Pe.useTranslation(),{getDownloadLink:r,handleSubmit:a,handleClose:o,handleOpen:s,handleResetTree:l,copyToClipboard:c,openModal:f}=Yf(),{currentTree:h,backendConfig:m,tree:b}=Re(),{id:g}=h;return i.jsxs(p.Stack,{direction:"row",spacing:1,justifyContent:"center",children:[i.jsx(p.Tooltip,{title:n("resetTree",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:i.jsx(p.Box,{children:i.jsx(p.IconButton,{disabled:!b,onClick:s,color:"warning",children:i.jsx(Ps,{})})})}),i.jsx(p.Divider,{orientation:"vertical",flexItem:!0}),i.jsx(p.Tooltip,{title:n("copyToClipboard",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:i.jsx(p.Box,{children:i.jsx(p.IconButton,{href:"",download:`${e}.json`,disabled:!t,onClick:c(t),children:i.jsx(Ms,{})})})}),i.jsx(p.Tooltip,{title:n("downloadJSONFile",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:i.jsx(p.Box,{children:i.jsx(p.IconButton,{href:r(t),download:`${e}.json`,disabled:!t,children:i.jsx(Ds,{})})})}),i.jsx(p.Tooltip,{title:g?n("update",{ns:"button"}):n("save",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:i.jsx(p.Box,{children:i.jsx(p.IconButton,{onClick:a,disabled:!t||!(m!=null&&m.baseUrl),children:i.jsx(As,{})})})}),i.jsxs(p.Dialog,{maxWidth:"xs",fullWidth:!0,open:f,onClose:o,children:[i.jsx(p.DialogTitle,{variant:"h3",children:n("resetTree",{ns:"button"})}),i.jsx(p.DialogContent,{children:i.jsx(p.DialogContentText,{children:n("resetTreeContent",{ns:"modal"})})}),i.jsxs(p.DialogActions,{children:[i.jsx(p.Button,{onClick:o,children:n("close",{ns:"button"})}),i.jsx(p.Button,{variant:"contained",color:"warning",onClick:l,children:n("reset",{ns:"button"})})]})]})]})},Gf={box:{backgroundColor:ue.background,border:`solid 1px ${ue.borderBlue}`}},Is=({children:e,description:t,open:n,onClose:r,title:a})=>i.jsx(p.Dialog,{open:n,onClose:r,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",scroll:"body",maxWidth:"sm",fullWidth:!0,children:i.jsxs(p.Box,{sx:Gf.box,p:4,children:[i.jsx("h3",{children:a}),i.jsx("p",{children:t}),e]})});var ba={},Jf=fe;Object.defineProperty(ba,"__esModule",{value:!0});var Fs=ba.default=void 0,Xf=Jf(Ce()),Zf=i;Fs=ba.default=(0,Xf.default)((0,Zf.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded");const on={container:{display:"flex",flexDirection:"column",height:"100%",margin:1},main:{border:`solid 1px ${ue.borderBlue}`,height:" 100%",margin:1},toolbar:{backgroundColor:ue.background,boxShadow:"none",display:"flex",padding:"0 ! important"},toolbarBox:{backgroundColor:ue.tertiary,border:`solid 1px ${ue.primary}`,margin:1,paddingX:2,paddingY:1,width:"100%"}},Qf=({children:e,appear:t,in:n,onEnter:r,onExited:a,onFocus:o,role:s,tabIndex:l,timeout:c},f)=>i.jsx(p.Slide,{direction:"up",ref:f,appear:t,in:n,onEnter:r,onExited:a,onFocus:o,role:s,tabIndex:l,timeout:c,children:e}),Hf=_.forwardRef(Qf),e0=({children:e,open:t,onClose:n,title:r})=>i.jsx(p.Dialog,{PaperProps:{sx:{backgroundColor:ue.background,backgroundImage:"none"}},open:t,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",fullScreen:!0,TransitionComponent:Hf,children:i.jsxs(p.Box,{sx:on.container,children:[i.jsx(p.AppBar,{position:"sticky",elevation:0,children:i.jsx(p.Toolbar,{sx:on.toolbar,children:i.jsxs(p.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:on.toolbarBox,children:[i.jsx(p.Typography,{variant:"h5",children:i.jsx("strong",{children:r})}),i.jsx(p.IconButton,{edge:"end",color:"inherit",onClick:n,"aria-label":"close",children:i.jsx(Fs,{})})]})})}),i.jsx(p.Box,{sx:on.main,children:e})]})}),t0={box:{border:`solid 1px ${ue.borderBlue}`,flexGrow:0}},r0=({children:e})=>i.jsx(p.Box,{p:2,role:"group",sx:t0.box,children:e}),n0={box:{border:`solid 1px ${ue.borderBlue}`,flexGrow:0}},a0=({children:e})=>i.jsx(p.Box,{sx:n0.box,padding:2,component:"header",children:e}),o0={box:{border:`solid 1px ${ue.borderBlue}`,flexGrow:1}},s0=({children:e})=>i.jsx(p.Box,{sx:o0.box,component:"main",role:"tree",children:e}),Ls={stack:{width:"100%"}},i0=({children:e})=>{const t=_.Children.toArray(e);return i.jsxs(p.Grid,{container:!0,padding:1,flexWrap:"nowrap",height:"100%",role:"treegrid",children:[i.jsx(p.Grid,{item:!0,xs:9,padding:1,display:"flex",children:i.jsxs(p.Stack,{sx:Ls.stack,spacing:2,children:[t[0],t[1]]})}),i.jsx(p.Grid,{item:!0,xs:3,padding:1,display:"flex",children:i.jsxs(p.Stack,{sx:Ls.stack,spacing:2,children:[t[2],t[3]]})})]})},l0={box:{border:`solid 1px ${ue.borderBlue}`,flexGrow:1,overflow:"auto"}},u0=({children:e})=>i.jsx(p.Box,{sx:l0.box,component:"aside",children:e}),c0=()=>{const{dispatchTree:e,setModalOpen:t,currentHierarchyPointNode:n,treePath:r}=Re();return{handleSubmit:o=>{var c,f;o.preventDefault();const s=((c=n==null?void 0:n.data)==null?void 0:c.uuid)||"",l=((f=r==null?void 0:r.at(-1))==null?void 0:f.path)||"";e(gl(l,s)),t(null)}}},d0=({onClose:e})=>{const{t}=Pe.useTranslation(),{handleSubmit:n}=c0();return i.jsx("form",{onSubmit:n,children:i.jsxs(p.Stack,{spacing:2,direction:"row",justifyContent:"flex-end",children:[i.jsx(p.Button,{variant:"text",onClick:e,children:t("cancel")}),i.jsx(p.Button,{variant:"contained",color:"error",type:"submit",children:t("remove")})]})})};var va={},f0=fe;Object.defineProperty(va,"__esModule",{value:!0});var ga=va.default=void 0,p0=f0(Ce()),h0=i;ga=va.default=(0,p0.default)((0,h0.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m4 11h-3v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H8c-.55 0-1-.45-1-1s.45-1 1-1h3V8c0-.55.45-1 1-1s1 .45 1 1v3h3c.55 0 1 .45 1 1s-.45 1-1 1"}),"AddCircleRounded");var ya={},m0=fe;Object.defineProperty(ya,"__esModule",{value:!0});var Bs=ya.default=void 0,b0=m0(Ce()),v0=i;Bs=ya.default=(0,b0.default)((0,v0.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");var xa={},g0=fe;Object.defineProperty(xa,"__esModule",{value:!0});var Vs=xa.default=void 0,y0=g0(Ce()),x0=i;Vs=xa.default=(0,y0.default)((0,x0.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");var Ca={},C0=fe;Object.defineProperty(Ca,"__esModule",{value:!0});var Ta=Ca.default=void 0,T0=C0(Ce()),_0=i;Ta=Ca.default=(0,T0.default)((0,_0.jsx)("path",{d:"M17 7h-3c-.55 0-1 .45-1 1s.45 1 1 1h3c1.65 0 3 1.35 3 3s-1.35 3-3 3h-3c-.55 0-1 .45-1 1s.45 1 1 1h3c2.76 0 5-2.24 5-5s-2.24-5-5-5m-9 5c0 .55.45 1 1 1h6c.55 0 1-.45 1-1s-.45-1-1-1H9c-.55 0-1 .45-1 1m2 3H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h3c.55 0 1-.45 1-1s-.45-1-1-1H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h3c.55 0 1-.45 1-1s-.45-1-1-1"}),"LinkRounded");var _a={},E0=fe;Object.defineProperty(_a,"__esModule",{value:!0});var qs=_a.default=void 0,w0=E0(Ce()),j0=i;qs=_a.default=(0,w0.default)((0,j0.jsx)("path",{d:"M7.92 7.54c-.8-.34-1.14-1.33-.66-2.05C8.23 4.05 9.85 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.15.27-.24.49-.3.94-.09.73-.69 1.3-1.43 1.3-.87 0-1.58-.75-1.48-1.62.06-.51.18-1.04.46-1.54.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.17 0-1.93.61-2.4 1.34-.35.57-1.08.75-1.69.5M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMarkRounded");var Ea={},O0=fe;Object.defineProperty(Ea,"__esModule",{value:!0});var wa=Ea.default=void 0,R0=O0(Ce()),S0=i;wa=Ea.default=(0,R0.default)((0,S0.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m4 11H8c-.55 0-1-.45-1-1s.45-1 1-1h8c.55 0 1 .45 1 1s-.45 1-1 1"}),"RemoveCircleRounded");const sn={container:{backgroundColor:"#282c34",borderRadius:.5,color:"#abb2bf",display:"inline-block",lineHeight:1.5,marginBottom:.2,paddingX:.5,paddingY:.2,width:"fit-content"},property:{color:"#56b6c2"},type:{color:"#c678dd"}},k0=({value:e})=>{const{t}=Pe.useTranslation(["translation","form"]);return i.jsx(p.Alert,{severity:"warning",variant:"outlined",children:i.jsxs(p.Typography,{component:"div",variant:"body2",gutterBottom:!0,sx:{lineHeight:2},children:[t("form:warningApiSelect.url")," ",t("form:warningApiSelect.warning")," ",t("form:warningApiSelect.response"),i.jsxs(p.Box,{sx:sn.container,children:["https://api.example.com/","{{",i.jsx(p.Box,{component:"span",sx:sn.type,children:e||"value"}),i.jsx(p.Box,{component:"span",sx:sn.property,children:": string"}),"}}","/endpoint ",i.jsx(p.Box,{component:"span",sx:sn.property})]})]})})},Et={container:{backgroundColor:"#282c34",borderRadius:.5,color:"#abb2bf",display:"inline-block",lineHeight:1.5,marginBottom:.2,paddingX:.5,paddingY:.2,width:"fit-content"},property:{color:"#56b6c2"},type:{color:"#c678dd"}},$0=({endPoint:e})=>{const{t}=Pe.useTranslation(["translation","form"]),{url:n,searchKey:r}=e,a=`${n}?${r}`;return i.jsx(p.Alert,{severity:"warning",variant:"outlined",children:i.jsxs(p.Typography,{component:"div",variant:"body2",gutterBottom:!0,sx:{lineHeight:2},children:[t("form:warningApiAutocomplete.url")," ",n&&i.jsxs(i.Fragment,{children:[i.jsx(p.Box,{component:"span",sx:Et.container,children:a})," "]}),t("form:warningApiAutocomplete.response"),i.jsxs(p.Box,{sx:Et.container,children:["{ ",i.jsx(p.Box,{component:"span",sx:Et.property,children:"label"}),":"," ",i.jsx(p.Box,{component:"span",sx:Et.type,children:"string"}),";"," ",i.jsx(p.Box,{component:"span",sx:Et.property,children:"value"}),":"," ",i.jsx(p.Box,{component:"span",sx:Et.type,children:"string"}),";"," ",i.jsx(p.Box,{component:"span",sx:Et.property,children:"img"}),i.jsx(p.Box,{component:"span",className:"semicolon",children:"?"}),":"," ",i.jsx(p.Box,{component:"span",sx:Et.type,children:"string"}),"; }"]})]})})};var ja={},M0=fe;Object.defineProperty(ja,"__esModule",{value:!0});var zs=ja.default=void 0,P0=M0(Ce()),A0=i;zs=ja.default=(0,P0.default)((0,A0.jsx)("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1"}),"AddRounded");const Ns=()=>{const{dispatchSnackbar:e}=_.useContext(Ka);return{close:()=>e(Ga()),open:(r,a="success")=>e(tl(r,a))}},D0=e=>{const{backendConfig:t}=Re(),{endpoints:n}=t||{},{workflows:r=""}=n||{};return Dt.useQuery({queryFn:async({signal:a})=>{const{data:o}=await It.get(r,{signal:a});return o},queryKey:["workflows"],...e})},I0=({isControlled:e,fetchWorkflowsOnOpen:t})=>{const{t:n}=Pe.useTranslation("snackMessage"),{open:r}=Ns(),{currentTree:a,setCurrentTree:o,dispatchTree:s}=Re(),[l,c]=_.useState(""),f=!!l&&!e&&l!==a.id,{data:h,isError:m}=$r(l,{enabled:f}),{data:b,isLoading:g,refetch:v}=D0({enabled:!t}),u=_.useCallback(async({target:w})=>{var $;const{value:j}=w;if(j==="add-new-tree"){c(""),o({name:""}),s(Qa());return}c(j),o({id:j,name:($=b==null?void 0:b.find(M=>M.id===j))==null?void 0:$.label})},[s,o,b]),y=_.useCallback(async()=>{if(t)try{await v(),a.id&&!l&&c(a.id)}catch{r(n("error.fetchTree",{ns:"snackMessage"}),"error")}},[t,v,a.id,l,r,n]);return _.useEffect(()=>{if(h&&l!==a.id){const{id:w,label:j,workflow:$}=h;o({id:w,name:j}),s(wn($))}},[a.id,s,e,o,l,h]),_.useEffect(()=>{m&&r(n("error.fetchTree",{ns:"snackMessage"}),"error")},[m,r,n]),{currentTree:a,fetchWorkflowSuggestions:v,handleChangeTree:u,handleOnOpen:y,setTreeSelected:c,treeSelected:l,workflowsSuggestions:b,workflowsSuggestionsLoading:g}},Us={formControl:{flex:1},select:{".MuiOutlinedInput-notchedOutline":{border:0,paddingLeft:5},".MuiSelect-select":{opacity:0,width:0},boxShadow:"none"}},Ws=({arrowOnly:e,required:t,size:n,showBtnAddNewTree:r,onChange:a,value:o,fetchWorkflowsOnOpen:s})=>{const{t:l}=Pe.useTranslation("form"),c=_.useMemo(()=>!!a,[a]),{handleChangeTree:f,handleOnOpen:h,workflowsSuggestions:m,workflowsSuggestionsLoading:b,treeSelected:g}=I0({fetchWorkflowsOnOpen:s,isControlled:c});return i.jsxs(p.FormControl,{size:n,required:t,sx:Us.formControl,children:[!e&&i.jsx(p.InputLabel,{children:l("tree",{ns:"form"})}),i.jsxs(p.Select,{value:c?o:g,id:"tree-select",onChange:v=>c?a==null?void 0:a(v):f(v),sx:e?Us.select:void 0,label:l("tree",{ns:"form"}),onOpen:h,children:[(o&&b||b)&&i.jsx(p.MenuItem,{value:o,children:i.jsx(p.Skeleton,{width:"100%"})}),m==null?void 0:m.map(({label:v,id:u})=>i.jsx(p.MenuItem,{value:u,children:v},u)),r&&i.jsx(p.MenuItem,{disabled:!0,children:i.jsx(p.Box,{sx:{height:1,width:"100%"},children:i.jsx(p.Divider,{})})}),r&&i.jsxs(p.MenuItem,{value:"add-new-tree",children:[i.jsx(p.Typography,{mr:1,children:l("newTree",{ns:"form"})}),i.jsx(zs,{color:"primary"})]})]})]})},F0=({id:e,helperText:t,hiddenValue:n,isHiddenField:r,isTreeField:a,treeSelected:o,handleChangeTreeSelect:s,handleChangeHelperText:l,handleChangeHiddenValue:c})=>{const{t:f}=Pe.useTranslation(["translation","form"]);return a?i.jsx(Ws,{required:!0,value:o,onChange:s}):r?i.jsx(p.TextField,{required:!0,size:"small",id:e,sx:{flex:1},label:f("hiddenValue",{ns:"form"}),onChange:c,value:n}):i.jsx(p.TextField,{sx:{flex:1},label:f("helperText",{ns:"form"}),size:"small",onChange:l,value:t})},wt=[{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"text"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"number"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"email"},{isBooleanField:!1,isDecisionField:!1,isMultiple:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"file"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"password"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"tel"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"address"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"url"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"date"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"dateRange"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"time"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"timeRange"},{isBooleanField:!0,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"switch"},{isBooleanField:!0,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"checkbox"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"hidden"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"tree"},{isBooleanField:!1,isDecisionField:!0,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!1,type:"radio"},{isBooleanField:!1,isDecisionField:!0,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!1,type:"select"},{initialQueryEnable:!0,isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!1,type:"autocomplete"},{isBooleanField:!1,isDecisionField:!1,isMultiple:!1,isPatternEnabled:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"dynamicSelect"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"title"}],L0=()=>{const e=Date.now(),t=performance.now();return`${e}${Math.random().toString(36).substring(2,9)}${t}`},B0=()=>{var Z,oe,J,K,Ae,me,ve,ze,bt,lt,Fe,Zt,bn,vn,ui,ci,di,fi,pi,hi,mi,bi,vi,gi,yi,xi,Ci,Ti,_i,Ei,wi,ji,Oi,Ri;const e=L0(),t=_.useMemo(()=>[{id:"0",label:"",message:"",value:""}],[]),{dispatchTree:n,currentHierarchyPointNode:r,modalOpen:a,treePath:o,setModalOpen:s}=Re(),{open:l}=Ns(),{t:c}=Pe.useTranslation(["translation","form"]),f=r!=null&&r.data&&((Z=r==null?void 0:r.data)!=null&&Z.attributes)&&"isMultiple"in r.data.attributes?!!r.data.attributes.isMultiple:null,[h,m]=_.useState(t),[b,g]=_.useState(""),[v,u]=_.useState(""),[y,w]=_.useState(""),[j,$]=_.useState(!1),[M,x]=_.useState(!1),[A,F]=_.useState(!1),[be,Ie]=_.useState(!1),[ee,te]=_.useState("text"),[he,de]=_.useState(null),[se,Be]=_.useState(null),[Te,ce]=_.useState({url:""}),[Ve,tt]=_.useState(""),[E,S]=_.useState(""),[z,N]=_.useState({off:"",on:""}),[P,Y]=_.useState(!1),[D,V]=_.useState(!1),[B,G]=_.useState(""),[U,je]=_.useState(""),O=a==="edit",ke=ee==="tree",He=ee==="hidden",Ue=ee==="autocomplete",We=ee==="dateRange",jt=ee==="dynamicSelect",Jt=wt.some(C=>C.type===ee&&(C==null?void 0:C.isBooleanField)),et=wt.some(C=>C.type===ee&&(C==null?void 0:C.isDecisionField)),St=wt.some(C=>C.type===ee&&(C==null?void 0:C.isRequiredDisabled)),mr=wt.some(C=>C.type===ee&&(C==null?void 0:C.isRepeatableDisabled)),dt=wt.some(C=>C.type===ee&&(C==null?void 0:C.isPatternEnabled)),br=((J=(oe=r==null?void 0:r.data)==null?void 0:oe.attributes)==null?void 0:J.isLeaf)??!0,kt=wt.some(C=>C.type===ee&&"isMultiple"in C),ft=_.useCallback(C=>!et&&C>0,[et]),{refetch:$t,isLoading:Xt}=$r(Ve,{enabled:!1}),Mt=_.useMemo(()=>[{label:c("form:number"),value:"^\\d+$"},{label:c("form:letter"),value:"^[A-Za-zÀ-ÖØ-öø-ÿ' -]+$"},{label:c("form:numberAndLetter"),value:"^[A-Za-z0-9]+$"},{label:c("form:cardNumber"),value:"^\\d{16}$"},{label:c("form:type.date"),value:"\\d{4}-\\d{2}-\\d{2}"}],[c]),Pt=_.useCallback(C=>k=>{m(L=>L.map(X=>{const{id:ge}=X;return k.target.dataset.id===ge?{...X,id:ge,[C]:k.target.value}:{...X}}))},[]),pt=_.useCallback((C,k)=>{typeof k=="string"?de(k):k&&k.inputValue?de(k.inputValue):de(null)},[]),vr=_.useCallback((C,k)=>{ce(L=>({...L,url:L.url?L.url.replace(/{{[^{}]+}}/,`{{${k||""}}}`):`https://example.com/{{${k||""}}}`})),Be(k??null)},[]),Ot=_.useCallback(({target:C})=>{g(C.value)},[]),gr=_.useCallback(({target:C})=>{u(C.value)},[]),yr=_.useCallback(({target:C})=>{w(C.value)},[]),xr=_.useCallback(({target:C})=>{ce(k=>({...k,url:C.value}))},[]),Cr=_.useCallback(({target:C})=>{const k=C.value;if(k.includes("{{}}")){const L=k.replace("{{}}",`{{${se||""}}}`);ce(X=>({...X,url:L}))}else if(k.includes("{{")){const L=k.replace(/{{[^{}]+}}/,`{{${se||""}}}`);ce(X=>({...X,url:L}))}else ce(L=>({...L,url:k}))},[se]),_e=_.useCallback(({target:C})=>{ce(k=>({...k,searchKey:C.value}))},[]),ht=_.useCallback((C,k)=>{ce(L=>{const X={...L.pathKey,[C]:k.target.value};if(k.target.value===""&&C in X){const{pathKey:ge,...$e}=L;return{...$e}}return{...L,pathKey:X}})},[ce]),qe=_.useCallback((C,k,L)=>{ce(X=>{const ge=[...X.params??[]];return ge[C]={...ge[C],[k]:L.target.value},{...X,params:ge}})},[ce]),Ge=_.useCallback((C,k)=>{G(k)},[]),mt=_.useCallback(({target:C})=>{je(C.value)},[]),Tr=_.useCallback(({target:C})=>{Ie(C.checked)},[]),un=_.useCallback(({target:C})=>{x(C.checked)},[]),Fa=_.useCallback(({target:C})=>{V(C.checked)},[]),cn=_.useCallback(({target:C})=>{F(C.checked)},[]),La=_.useCallback(({target:C})=>{$(C.checked)},[]),dn=_.useCallback(({target:C})=>{Y(C.checked)},[]),fn=_.useCallback((C,k)=>{te(k.type),F(!1),x(!1),Y(!1),$(!1)},[]),Ba=_.useCallback(({target:C})=>{tt(C.value)},[]),Va=_.useCallback(C=>({target:k})=>{N(L=>({...L,[C]:k.value}))},[]),pn=_.useCallback(({target:C})=>{S(C.value)},[]),hn=_.useCallback(()=>{m(C=>{const k=Number(C[C.length-1].id),L=String(k+1);return[...C,{...t[0],id:L}]})},[t]),qa=_.useCallback(()=>{ce(C=>{var ge,$e;const k=Number((($e=(ge=C.params)==null?void 0:ge[C.params.length-1])==null?void 0:$e.id)||0),L=String(k+1),X=[...C.params||[],{id:L,key:"",value:""}];return{...C,params:X}})},[]),za=_.useCallback(({currentTarget:C})=>{m(k=>k.filter(({id:L})=>C.value!==L))},[]),Na=_.useCallback(C=>{const k=C.currentTarget.value;ce(L=>{const X=(L.params??[]).filter(({id:$e})=>$e!==k),ge=X.length>0?X:void 0;return{...L,params:ge}})},[]),mn=_.useCallback((C,k)=>{var X,ge,$e;const L=($e=(ge=(X=C==null?void 0:C.children)==null?void 0:X[k])==null?void 0:ge.data)==null?void 0:$e.children;return L?L.map(({uuid:vt,attributes:gt,children:Rt})=>({attributes:gt,children:Rt,uuid:vt})):[]},[]),d=_.useCallback(C=>{var k;return A?(k=h==null?void 0:h.filter((L,X)=>!ft(X)))==null?void 0:k.map(({message:L,value:X,label:ge},$e)=>{const vt=`${e}:${X}`,gt=mn(r,$e);return{attributes:{depth:C+1,label:ge,name:`${y}:${X}`,value:X,...L&&{message:L},...gt.length===0&&{isLeaf:!0}},children:gt,uuid:vt}}):[]},[r,ft,mn,A,y,e,h]),T=_.useCallback(C=>C.map(({message:k,...L})=>({...L,...k&&{message:k}})),[]),R=_.useCallback((C,k,L)=>{var X;if(C&&(!k||L))try{return $t()}catch{l(c("error.fetchTree",{ns:"snackMessage"}),"error")}return C&&k&&!L?{data:{workflow:(X=r==null?void 0:r.data.attributes)==null?void 0:X.tree},isError:null}:{data:null,isError:null}},[(K=r==null?void 0:r.data.attributes)==null?void 0:K.tree,$t,l,c]),I=_.useCallback(async C=>{var Er,wr,jr,Or;C.preventDefault();const{on:k,off:L}=z,X=((Er=r==null?void 0:r.data)==null?void 0:Er.uuid)||"",ge=(r==null?void 0:r.depth)||0,$e=a==="edit",vt=ge+($e||r===null?0:1),gt=d(vt),Rt=(wr=o==null?void 0:o.at(-1))==null?void 0:wr.path,gn=o.length?`${Rt}/${e}`:`/${e}`,yn=((Or=(jr=r==null?void 0:r.data.attributes)==null?void 0:jr.tree)==null?void 0:Or.treeId)!==Ve,{data:Qt,isError:xn}=await R(ke,$e,yn);if(xn)return;const _r={attributes:{depth:vt,name:y,type:ee,...v&&{label:v},...Ue&&{route:Te},...jt&&{route:Te},...E&&{helperText:E},...A&&{isDecision:A},...M&&{required:M},...j&&We&&{isDisabledPast:j},...P&&{repeatable:P},...He&&{hiddenValue:b},...he&&{tag:he},...se&&{parentRef:se},...be&&kt&&{isMultiple:be},...D&&{initialQuery:D},...et&&!A&&{values:T(h)},...(L||k)&&{messages:{...L&&{off:L},...k&&{on:k}}},...B&&{pattern:typeof B=="object"?B.value:B},...U&&{patternMessage:U},...ke&&{tree:{...Qt==null?void 0:Qt.workflow,treeId:Ve},treePath:gn}},children:gt,uuid:$e?X:e};n($e?vl(Rt||"",X,_r):bl(Rt||null,X,_r)),s(null)},[r,n,d,T,R,E,b,D,Ue,We,A,et,j,jt,He,be,kt,ke,v,z,a,y,se,B,U,P,M,Te,s,he,o,Ve,ee,e,h]);return _.useEffect(()=>{var C,k,L,X,ge,$e,vt,gt,Rt,gn,yn,Qt,xn,_r,Er,wr,jr,Or,Si,ki,$i,Mi,Pi,Ai,Di;if(a==="edit"){const Cn=((k=(C=r==null?void 0:r.data)==null?void 0:C.attributes)==null?void 0:k.values)||((ge=(X=(L=r==null?void 0:r.data)==null?void 0:L.children)==null?void 0:X.filter(({attributes:yt})=>!(yt!=null&&yt.type)))==null?void 0:ge.map(({attributes:yt},At)=>{const{label:Tn,value:_n,message:Rr}=yt||{};return{id:String(At),label:String(Tn),value:String(_n),...Rr&&{message:String(Rr)}}}));de((($e=r==null?void 0:r.data.attributes)==null?void 0:$e.tag)||null),te(((vt=r==null?void 0:r.data.attributes)==null?void 0:vt.type)||"text"),S(((gt=r==null?void 0:r.data.attributes)==null?void 0:gt.helperText)||""),x(((Rt=r==null?void 0:r.data.attributes)==null?void 0:Rt.required)||!1),$(((gn=r==null?void 0:r.data.attributes)==null?void 0:gn.isDisabledPast)||!1),u(((yn=r==null?void 0:r.data.attributes)==null?void 0:yn.label)||""),w(((Qt=r==null?void 0:r.data.attributes)==null?void 0:Qt.name)||""),F(((xn=r==null?void 0:r.data.attributes)==null?void 0:xn.isDecision)||!1),m(Cn!=null&&Cn.length?Cn:t),tt(((Er=(_r=r==null?void 0:r.data.attributes)==null?void 0:_r.tree)==null?void 0:Er.treeId)||""),Y(((wr=r==null?void 0:r.data.attributes)==null?void 0:wr.repeatable)||!1),g(((jr=r==null?void 0:r.data.attributes)==null?void 0:jr.hiddenValue)||""),Be(((Or=r==null?void 0:r.data.attributes)==null?void 0:Or.parentRef)||null),G(Mt.find(({value:yt})=>{var At;return yt===((At=r==null?void 0:r.data.attributes)==null?void 0:At.pattern)})||((Si=r==null?void 0:r.data.attributes)==null?void 0:Si.pattern)||""),je(((ki=r==null?void 0:r.data.attributes)==null?void 0:ki.patternMessage)||""),N({off:((Mi=($i=r==null?void 0:r.data.attributes)==null?void 0:$i.messages)==null?void 0:Mi.off)||"",on:((Ai=(Pi=r==null?void 0:r.data.attributes)==null?void 0:Pi.messages)==null?void 0:Ai.on)||""}),ce(yt=>{var At,Tn,_n,Rr,Ii,Fi,Li,Bi;return{...yt,params:(Tn=(At=r==null?void 0:r.data.attributes)==null?void 0:At.route)==null?void 0:Tn.params,pathKey:(Rr=(_n=r==null?void 0:r.data.attributes)==null?void 0:_n.route)==null?void 0:Rr.pathKey,searchKey:(Fi=(Ii=r==null?void 0:r.data.attributes)==null?void 0:Ii.route)==null?void 0:Fi.searchKey,url:((Bi=(Li=r==null?void 0:r.data.attributes)==null?void 0:Li.route)==null?void 0:Bi.url)||""}}),Ie(f||!1),V(((Di=r==null?void 0:r.data.attributes)==null?void 0:Di.initialQuery)||!1)}},[(Ae=r==null?void 0:r.data.attributes)==null?void 0:Ae.helperText,(me=r==null?void 0:r.data.attributes)==null?void 0:me.hiddenValue,(ve=r==null?void 0:r.data.attributes)==null?void 0:ve.initialQuery,(ze=r==null?void 0:r.data.attributes)==null?void 0:ze.isDecision,(bt=r==null?void 0:r.data.attributes)==null?void 0:bt.isDisabledPast,(lt=r==null?void 0:r.data.attributes)==null?void 0:lt.label,(Zt=(Fe=r==null?void 0:r.data.attributes)==null?void 0:Fe.messages)==null?void 0:Zt.off,(vn=(bn=r==null?void 0:r.data.attributes)==null?void 0:bn.messages)==null?void 0:vn.on,(ui=r==null?void 0:r.data.attributes)==null?void 0:ui.name,(ci=r==null?void 0:r.data.attributes)==null?void 0:ci.parentRef,(di=r==null?void 0:r.data.attributes)==null?void 0:di.pattern,(fi=r==null?void 0:r.data.attributes)==null?void 0:fi.patternMessage,(pi=r==null?void 0:r.data.attributes)==null?void 0:pi.repeatable,(hi=r==null?void 0:r.data.attributes)==null?void 0:hi.required,(bi=(mi=r==null?void 0:r.data.attributes)==null?void 0:mi.route)==null?void 0:bi.params,(gi=(vi=r==null?void 0:r.data.attributes)==null?void 0:vi.route)==null?void 0:gi.pathKey,(xi=(yi=r==null?void 0:r.data.attributes)==null?void 0:yi.route)==null?void 0:xi.searchKey,(Ti=(Ci=r==null?void 0:r.data.attributes)==null?void 0:Ci.route)==null?void 0:Ti.url,(_i=r==null?void 0:r.data.attributes)==null?void 0:_i.tag,(wi=(Ei=r==null?void 0:r.data.attributes)==null?void 0:Ei.tree)==null?void 0:wi.treeId,(ji=r==null?void 0:r.data.attributes)==null?void 0:ji.type,(Oi=r==null?void 0:r.data.attributes)==null?void 0:Oi.values,(Ri=r==null?void 0:r.data)==null?void 0:Ri.children,t,f,a,Mt]),{getDisabledValueField:ft,handleAddParams:qa,handleAddValue:hn,handleChangeHelperText:pn,handleChangeHiddenValue:Ot,handleChangeInitialQuery:Fa,handleChangeIsDecisionField:cn,handleChangeIsDisabledPast:La,handleChangeLabel:gr,handleChangeMessage:Va,handleChangeMultiple:Tr,handleChangeName:yr,handleChangeParam:qe,handleChangeParentRef:vr,handleChangePath:ht,handleChangePattern:Ge,handleChangePatternMessage:mt,handleChangeRepeatable:dn,handleChangeRequired:un,handleChangeSearchKey:_e,handleChangeTag:pt,handleChangeTreeSelect:Ba,handleChangeType:fn,handleChangeUrl:xr,handleChangeUrlSelect:Cr,handleDeleteParam:Na,handleDeleteValue:za,handlePresetValues:Pt,handleSubmit:I,helperText:E,hiddenValue:b,initialQuery:D,isAutocomplete:Ue,isBooleanField:Jt,isDateRangePicker:We,isDecision:A,isDecisionField:et,isDisabledPast:j,isDynamicSelect:jt,isEditModal:O,isHiddenField:He,isLeaf:br,isMultiple:be,isMultiplePossible:kt,isPatternEnabled:dt,isRepeatableDisabled:mr,isRequiredDisabled:St,isTreeField:ke,isWorkflowLoading:Xt,label:v,messages:z,name:y,parentRef:se,pattern:B,patternMessage:U,patternOptions:Mt,repeatable:P,required:M,route:Te,tag:he,treeSelected:Ve,type:ee,uuid:e,values:h}},V0=e=>{const{backendConfig:t}=Re(),n=wt.filter(a=>!(a.type==="tree"&&!(t!=null&&t.baseUrl)))||[];return{currentValue:n.find(a=>a.type===e)||wt[0],options:n}},q0=({id:e,onChange:t,value:n,sx:r})=>{const{t:a}=Pe.useTranslation(["translation","form"]),{currentValue:o,options:s}=V0(n);return i.jsx(p.Autocomplete,{disableClearable:!0,fullWidth:!0,size:"small",id:e,sx:r,options:s,value:o,onChange:t,getOptionLabel:l=>a(`form:type.${l.type}`),renderInput:l=>i.jsx(p.TextField,{...l,required:!0,size:"small",label:a("type")}),renderOption:(l,c)=>i.jsxs(p.MenuItem,{...l,children:[a(`form:type.${c.type}`),c.isDecisionField&&i.jsx(p.Chip,{label:a("decisionField",{ns:"form"}),size:"small",color:"info",sx:{marginLeft:1}})]})})},z0=({id:e,value:t,onChange:n})=>{var g;const[r,a]=_.useState(t||""),{t:o}=Pe.useTranslation(["form"]),{tree:s,treePath:l,currentHierarchyPointNode:c}=Re(),{uuid:f}=(c==null?void 0:c.data)||{},h=Ft(s,(g=l==null?void 0:l.at(-1))==null?void 0:g.path),m=ml(h,f),b=v=>{const u=v.target.value;a(u),n==null||n(v,u)};return i.jsxs(p.FormControl,{sx:{flex:1.5},required:!0,children:[i.jsx(p.InputLabel,{children:o("form:ancestor")}),i.jsx(p.Select,{id:e,variant:"outlined",size:"small",sx:{flex:2},value:r,label:o("form:ancestor"),onChange:b,MenuProps:{PaperProps:{sx:{maxHeight:300}}},children:m.length?m.map((v,u)=>{const y=`${v}-${u}`;return i.jsx(p.MenuItem,{value:v,children:v},y)}):i.jsx(p.MenuItem,{disabled:!0,value:"",children:o("form:noAncestorFound")})})]})},N0=e=>{if(!e)return[];const t=new Set,n=r=>{var a,o;if((a=r==null?void 0:r.attributes)!=null&&a.tag&&t.add(r.attributes.tag),(o=r==null?void 0:r.children)!=null&&o.length){const{children:s}=r;for(let l=0;l<s.length;l+=1)n(s[l])}};return n(e),[...t]},U0=p.createFilterOptions(),W0=({id:e,value:t,onChange:n})=>{const{t:r}=Pe.useTranslation(["translation","form"]),{tree:a}=Re(),o=N0(a).reduce((s,l)=>[...s,{inputValue:l,label:l}],[]);return i.jsx(p.Autocomplete,{freeSolo:!0,fullWidth:!0,id:e,sx:{flex:1},size:"small",value:t,onChange:n,filterOptions:(s,l)=>{const c=U0(s,l),{inputValue:f}=l,h=s.some(m=>typeof m!="string"&&f===m.label);return f!==""&&!h&&c.push({inputValue:f,label:`${r("add")} "${f}"`}),c},getOptionLabel:s=>typeof s=="string"?s:s.inputValue?s.inputValue:s.label,renderOption:(s,l)=>i.jsx("li",{...s,children:typeof l!="string"&&l.label}),renderInput:s=>i.jsx(p.TextField,{...s,label:r("tag")}),options:o})},Ys={marginRight:"-20px !important",minWidth:"auto !important"},ln={iconButton:Ys,iconButtonDelete:{...Ys,"&:before":{borderRadius:"50%",content:'""',height:20,position:"absolute",width:20,zIndex:-1},backgroundColor:ue.background,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)"}},Y0=({onClose:e})=>{const{t}=Pe.useTranslation(["translation","form"]),{patternOptions:n,values:r,required:a,tag:o,type:s,helperText:l,label:c,name:f,hiddenValue:h,isBooleanField:m,isDisabledPast:b,handleChangeIsDisabledPast:g,isDecision:v,isEditModal:u,isDecisionField:y,isHiddenField:w,isRequiredDisabled:j,isRepeatableDisabled:$,isAutocomplete:M,isDateRangePicker:x,isDynamicSelect:A,isTreeField:F,treeSelected:be,isWorkflowLoading:Ie,repeatable:ee,isLeaf:te,isMultiplePossible:he,isPatternEnabled:de,isMultiple:se,initialQuery:Be,handleChangeTreeSelect:Te,handleChangeHelperText:ce,handleChangeRequired:Ve,handleChangeName:tt,handleChangeType:E,handleChangeIsDecisionField:S,handleDeleteValue:z,handleDeleteParam:N,handleChangeMessage:P,handleSubmit:Y,handleAddValue:D,handleAddParams:V,handleChangeLabel:B,handleChangeRepeatable:G,handleChangeHiddenValue:U,handleChangeTag:je,handleChangeSearchKey:O,handleChangeUrl:ke,handleChangeUrlSelect:He,handleChangeParam:Ue,handleChangePath:We,handleChangeMultiple:jt,handleChangeParentRef:Jt,handleChangeInitialQuery:et,parentRef:St,route:mr,handlePresetValues:dt,patternMessage:br,pattern:kt,handleChangePattern:ft,handleChangePatternMessage:$t,messages:{on:Xt,off:Mt}}=B0(),{searchKey:Pt,url:pt,pathKey:vr,params:Ot}=mr||{},{object:gr="",label:yr="",value:xr="",image:Cr=""}=vr||{};return i.jsxs("form",{onSubmit:Y,children:[i.jsx(q0,{id:"type",value:s,onChange:E,sx:{marginBottom:1}}),i.jsxs(p.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[i.jsx(p.TextField,{autoComplete:"off",id:"name",label:t("name"),sx:{flex:1},onChange:tt,value:f,size:"small",required:!0}),i.jsx(p.TextField,{id:"label",sx:{flex:1},label:t("label",{ns:"form"}),onChange:B,value:c,size:"small"})]}),i.jsxs(p.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[s!=="title"&&i.jsx(W0,{id:"tag",value:o,onChange:je}),i.jsx(F0,{id:"helperText",helperText:l,hiddenValue:h,isHiddenField:w,isTreeField:F,treeSelected:be,handleChangeTreeSelect:Te,handleChangeHelperText:ce,handleChangeHiddenValue:U})]}),de&&i.jsxs(p.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[i.jsx(p.Autocomplete,{freeSolo:!0,id:"patternMessage",size:"small",sx:{flex:1},onChange:ft,onInputChange:ft,value:kt,options:n,renderInput:_e=>i.jsx(p.TextField,{..._e,label:t("form:pattern")})}),i.jsx(p.TextField,{id:"patternMessage",label:t("form:patternMessage"),sx:{flex:1},onChange:$t,value:br,size:"small"})]}),M&&i.jsx(p.Stack,{spacing:1,paddingY:1,children:i.jsxs(p.Stack,{spacing:1,direction:{sm:"row",xs:"column"},alignItems:"center",children:[i.jsx(p.TextField,{id:"url",size:"small",sx:{flex:3},InputProps:{startAdornment:i.jsx(p.InputAdornment,{position:"start",children:i.jsx(Ta,{})})},placeholder:"https://api.fr/enpoint",type:"url",label:t("form:apiRoute"),onChange:ke,value:pt,required:!0}),i.jsx(qs,{}),i.jsx(p.TextField,{id:"searchKey",size:"small",InputLabelProps:{shrink:!0},sx:{flex:1},placeholder:t("form:searchKeyPlaceholder"),type:"text",label:t("form:key"),onChange:O,value:Pt})]})}),A&&i.jsxs(p.Stack,{spacing:1,paddingY:1,children:[i.jsx("h4",{children:t("form:urlConstruction")}),i.jsxs(p.Stack,{spacing:1,direction:{sm:"row",xs:"column"},alignItems:"center",children:[i.jsx(z0,{id:"parentRef",value:St,onChange:Jt}),i.jsx(Bs,{}),i.jsx(p.TextField,{id:"urlSelect",size:"small",sx:{flex:3},InputProps:{startAdornment:i.jsx(p.InputAdornment,{position:"start",children:i.jsx(Ta,{})})},placeholder:`https://api.fr/{{${St||""}}}/enpoint`,type:"url",label:t("form:apiRoute"),onChange:He,value:pt})]}),pt&&i.jsx(k0,{value:St})]}),(M||A)&&i.jsxs(p.Stack,{spacing:1,paddingY:1,children:[i.jsxs(p.Accordion,{elevation:0,square:!0,children:[i.jsx(p.AccordionSummary,{expandIcon:i.jsx(Vs,{}),"aria-controls":"panel-content",sx:{"& .MuiAccordionSummary-content":{flexGrow:0},display:"inline-flex",justifyContent:"flex-start",padding:0},children:i.jsx(p.Typography,{sx:{textDecoration:"underline"},children:t("form:dataMapping")})}),i.jsxs(p.Stack,{spacing:1,paddingY:1,children:[i.jsxs(p.Stack,{spacing:1,sx:{pb:1},direction:{sm:"row",xs:"column"},alignItems:"center",children:[i.jsx(p.TextField,{id:"objectArrayPath",size:"small",sx:{flex:3},InputLabelProps:{shrink:!0},label:"Object Array Path",value:gr,onChange:_e=>We("object",_e),placeholder:"elements.features[]",type:"text"}),i.jsx(p.TextField,{id:"labelPath",size:"small",sx:{flex:3},InputLabelProps:{shrink:!0},label:"Label Path",value:yr,onChange:_e=>We("label",_e),placeholder:"client.name",type:"text"})]}),i.jsxs(p.Stack,{spacing:1,direction:{sm:"row",xs:"column"},alignItems:"center",children:[i.jsx(p.TextField,{id:"valuePath",size:"small",sx:{flex:3},InputLabelProps:{shrink:!0},label:"Value Path",value:xr,onChange:_e=>We("value",_e),placeholder:"client.id",type:"text"}),i.jsx(p.TextField,{id:"imagePath",size:"small",sx:{flex:3},InputLabelProps:{shrink:!0},label:"Image Path",value:Cr,onChange:_e=>We("image",_e),placeholder:"client.src.profile",type:"text"})]}),i.jsx($0,{endPoint:{searchKey:Pt||"",url:pt||""}})]})]}),i.jsxs(p.Stack,{children:[i.jsxs(p.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},position:"relative",alignItems:{sm:"center",xs:"flex-start"},children:[i.jsx("h4",{children:t("form:additionalParams")}),i.jsx(p.Box,{justifyContent:"flex-end",children:i.jsx(p.IconButton,{color:"success",sx:ln.iconButton,onClick:V,children:i.jsx(ga,{})})})]}),Ot==null?void 0:Ot.map(({id:_e,key:ht,value:qe},Ge)=>i.jsxs(p.Stack,{direction:{sm:"row",xs:"column"},spacing:1,paddingY:1,position:"relative",children:[i.jsx(p.TextField,{id:`param-key-${_e}`,label:"Key",size:"small",sx:{flex:1},onChange:mt=>Ue(Ge,"key",mt),value:ht,inputProps:{"data-id":_e}}),i.jsx(p.TextField,{id:`param-value-${_e}`,label:t("value",{ns:"form"}),size:"small",sx:{flex:1},onChange:mt=>Ue(Ge,"value",mt),value:qe,inputProps:{"data-id":_e}}),Ot.length>0&&i.jsx(p.IconButton,{color:"warning",sx:ln.iconButtonDelete,value:_e,onClick:N,children:i.jsx(wa,{})})]},_e))]})]}),m&&i.jsxs(p.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[i.jsx(p.TextField,{id:"onMessage",size:"small",sx:{flex:1},label:t("onMessage",{ns:"form"}),onChange:P("on"),value:Xt}),i.jsx(p.TextField,{id:"offMessage",size:"small",sx:{flex:1},label:t("offMessage",{ns:"form"}),onChange:P("off"),value:Mt})]}),i.jsx(p.Stack,{paddingY:1,children:i.jsxs(p.FormGroup,{children:[he&&i.jsx(p.FormControlLabel,{control:i.jsx(p.Checkbox,{checked:se,onChange:jt}),label:t("multiple")}),M&&i.jsx(p.FormControlLabel,{control:i.jsx(p.Checkbox,{id:"isInitialQuery",checked:Be,onChange:et}),label:t("initialQueryEnable")}),i.jsx(p.FormControlLabel,{disabled:j,control:i.jsx(p.Checkbox,{id:"isRequired",checked:a,onChange:Ve}),label:t("required")}),i.jsx(p.FormControlLabel,{disabled:$,control:i.jsx(p.Checkbox,{id:"isRepeatable",checked:ee,onChange:G}),label:t("repeatable",{ns:"form"})}),(te||u)&&i.jsx(p.FormControlLabel,{disabled:!y,control:i.jsx(p.Checkbox,{id:"isDecision",checked:v,onChange:S}),label:t("decisionField",{ns:"form"})}),x&&i.jsx(p.FormControlLabel,{control:i.jsx(p.Checkbox,{id:"disabledPast",checked:b,onChange:g}),label:t("disabledPast",{ns:"form"})})]})}),y&&i.jsxs(i.Fragment,{children:[i.jsx("h4",{children:t("values")}),r==null?void 0:r.map(({value:_e,label:ht,id:qe,message:Ge})=>i.jsxs(p.Stack,{direction:{sm:"row",xs:"column"},spacing:1,paddingY:1,position:"relative",children:[i.jsx(p.TextField,{id:`decision-label-${qe}`,label:t("label",{ns:"form"}),size:"small",sx:{flex:1},onChange:dt("label"),value:ht,inputProps:{"data-id":qe},required:!0}),i.jsx(p.TextField,{id:`decision-value-${qe}`,label:t("value",{ns:"form"}),size:"small",sx:{flex:1},onChange:dt("value"),value:_e,inputProps:{"data-id":qe},required:!0}),i.jsx(p.TextField,{id:`decision-message-${qe}`,label:t("message",{ns:"form"}),size:"small",sx:{flex:1},onChange:dt("message"),value:Ge,inputProps:{"data-id":qe}}),r.length>1&&i.jsx(p.IconButton,{color:"warning",sx:ln.iconButtonDelete,value:qe,onClick:z,children:i.jsx(wa,{})})]},qe))]}),y&&i.jsx(p.Box,{justifyContent:"flex-end",display:"flex",children:i.jsx(p.IconButton,{color:"success",sx:ln.iconButton,onClick:D,children:i.jsx(ga,{})})}),i.jsxs(p.Stack,{spacing:2,direction:"row",justifyContent:"flex-end",paddingTop:3,children:[i.jsx(p.Button,{variant:"text",onClick:e,children:t("cancel")}),i.jsx(p.Button,{variant:"contained",type:"submit",disabled:Ie,isLoading:Ie,loadingIndicator:i.jsx(p.CircularProgress,{size:14}),children:t("validate")})]})]})};var Oa={},K0=fe;Object.defineProperty(Oa,"__esModule",{value:!0});var Ks=Oa.default=void 0,G0=K0(Ce()),J0=i;Ks=Oa.default=(0,G0.default)((0,J0.jsx)("path",{d:"M17 11h3c1.11 0 2-.9 2-2V5c0-1.11-.9-2-2-2h-3c-1.11 0-2 .9-2 2v1H9.01V5c0-1.11-.9-2-2-2H4c-1.1 0-2 .9-2 2v4c0 1.11.9 2 2 2h3c1.11 0 2-.9 2-2V8h2v7.01c0 1.65 1.34 2.99 2.99 2.99H15v1c0 1.11.9 2 2 2h3c1.11 0 2-.9 2-2v-4c0-1.11-.9-2-2-2h-3c-1.11 0-2 .9-2 2v1h-1.01c-.54 0-.99-.45-.99-.99V8h2v1c0 1.1.9 2 2 2"}),"AccountTreeRounded");var Ra={},X0=fe;Object.defineProperty(Ra,"__esModule",{value:!0});var Gs=Ra.default=void 0,Z0=X0(Ce()),Q0=i;Gs=Ra.default=(0,Z0.default)((0,Q0.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-3 10h-3v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H8c-.55 0-1-.45-1-1s.45-1 1-1h3V8c0-.55.45-1 1-1s1 .45 1 1v3h3c.55 0 1 .45 1 1s-.45 1-1 1"}),"AddBoxRounded");var Sa={},H0=fe;Object.defineProperty(Sa,"__esModule",{value:!0});var Js=Sa.default=void 0,ep=H0(Ce()),tp=i;Js=Sa.default=(0,ep.default)((0,tp.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2zM9 9h6c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1H9c-.55 0-1-.45-1-1v-8c0-.55.45-1 1-1m6.5-5-.71-.71c-.18-.18-.44-.29-.7-.29H9.91c-.26 0-.52.11-.7.29L8.5 4H6c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1z"}),"DeleteOutlineRounded");var ka={},rp=fe;Object.defineProperty(ka,"__esModule",{value:!0});var Xs=ka.default=void 0,np=rp(Ce()),ap=i;Xs=ka.default=(0,np.default)((0,ap.jsx)("path",{d:"M3 17.46v3.04c0 .28.22.5.5.5h3.04c.13 0 .26-.05.35-.15L17.81 9.94l-3.75-3.75L3.15 17.1c-.1.1-.15.22-.15.36M20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"EditRounded");var $a={},op=fe;Object.defineProperty($a,"__esModule",{value:!0});var Zs=$a.default=void 0,sp=op(Ce()),ip=i;Zs=$a.default=(0,sp.default)((0,ip.jsx)("path",{d:"M12 3c-4.8 0-9 3.86-9 9 0 2.12.74 4.07 1.97 5.61l-1.68 1.68c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0l1.68-1.68C7.93 20.26 9.88 21 12 21c2.3 0 4.61-.88 6.36-2.64C20.12 16.61 21 14.3 21 12V5c0-1.1-.9-2-2-2zm3.83 9.26-5.16 4.63c-.16.15-.41.14-.56-.01-.14-.14-.16-.36-.04-.52l2.44-3.33-4.05-.4c-.44-.04-.63-.59-.3-.89l5.16-4.63c.16-.15.41-.14.56.01.14.14.16.36.04.52l-2.44 3.33 4.05.4c.45.04.63.59.3.89"}),"EnergySavingsLeafRounded");var Ma={},lp=fe;Object.defineProperty(Ma,"__esModule",{value:!0});var Qs=Ma.default=void 0,up=lp(Ce()),Hs=i;Qs=Ma.default=(0,up.default)([(0,Hs.jsx)("path",{d:"M14.14 12h-.06c.81 0 1.28-.91.82-1.57L9.82 3.17c-.4-.57-1.24-.57-1.64 0L3.1 10.43c-.46.66.01 1.57.82 1.57h-.06L.99 16.46c-.43.66.05 1.54.84 1.54H7v2c0 1.1.9 2 2 2s2-.9 2-2v-2h5.17c.79 0 1.27-.88.84-1.54z"},"0"),(0,Hs.jsx)("path",{d:"M23.01 16.46 20.14 12h-.06c.81 0 1.28-.91.82-1.57l-5.08-7.26c-.4-.57-1.24-.57-1.64 0l-1.57 2.24 3.11 4.44c.43.61.48 1.41.14 2.07-.08.16-.18.3-.3.43l2.29 3.57c.4.62.42 1.4.07 2.04-.01.02-.02.03-.03.04h4.28c.79 0 1.27-.88.84-1.54M13 20c0 1.1.9 2 2 2s2-.9 2-2v-1h-4z"},"1")],"ForestRounded");var Pa={},cp=fe;Object.defineProperty(Pa,"__esModule",{value:!0});var ei=Pa.default=void 0,dp=cp(Ce()),fp=i;ei=Pa.default=(0,dp.default)((0,fp.jsx)("path",{d:"M12 4V2.21c0-.45-.54-.67-.85-.35l-2.8 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.32.31.86.09.86-.36V6c3.31 0 6 2.69 6 6 0 .79-.15 1.56-.44 2.25-.15.36-.04.77.23 1.04.51.51 1.37.33 1.64-.34.37-.91.57-1.91.57-2.95 0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-.79.15-1.56.44-2.25.15-.36.04-.77-.23-1.04-.51-.51-1.37-.33-1.64.34C4.2 9.96 4 10.96 4 12c0 4.42 3.58 8 8 8v1.79c0 .45.54.67.85.35l2.79-2.79c.2-.2.2-.51 0-.71l-2.79-2.79c-.31-.31-.85-.09-.85.36z"}),"LoopRounded");var Aa={},pp=fe;Object.defineProperty(Aa,"__esModule",{value:!0});var ti=Aa.default=void 0,hp=pp(Ce()),mp=i;ti=Aa.default=(0,hp.default)((0,mp.jsx)("path",{d:"M16.96 12h.08c.81 0 1.28-.91.82-1.57l-5.08-7.25c-.4-.57-1.24-.57-1.64 0L6.1 10.43c-.46.66.02 1.57.83 1.57h.04l-2.9 4.46c-.44.66.04 1.54.84 1.54h5.08v2.02c0 1.09.89 1.98 1.98 1.98 1.09 0 1.98-.89 1.98-1.98V18h5.15c.8 0 1.28-.89.83-1.55z"}),"ParkRounded");var Da={},bp=fe;Object.defineProperty(Da,"__esModule",{value:!0});var ri=Da.default=void 0,vp=bp(Ce()),gp=i;ri=Da.default=(0,vp.default)((0,gp.jsx)("path",{d:"M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24M2.71 3.16c-.39.39-.39 1.02 0 1.41l1.97 1.97C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l2.72 2.72c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L4.13 3.16c-.39-.39-1.03-.39-1.42 0M12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5m2.97-5.33c-.15-1.4-1.25-2.49-2.64-2.64z"}),"VisibilityOffRounded");var Ia={},yp=fe;Object.defineProperty(Ia,"__esModule",{value:!0});var ni=Ia.default=void 0,xp=yp(Ce()),Cp=i;ni=Ia.default=(0,xp.default)((0,Cp.jsx)("path",{d:"M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"VisibilityRounded");const ai={400:"#8d6e63",700:"#5d4037"},Se={actionButton:{minWidth:"auto !important"},containerField:{background:ue.background,border:`solid 1px ${ue.primary}`,borderRadius:"1rem"},containerHidden:{background:ue.background,border:`solid 1px ${ue.borderGrey}`,borderRadius:"1rem"},containerTitle:{background:ai[700],border:`solid 1px ${ai[400]}`,borderRadius:"1rem"},containerTree:{background:ue.tertiary,border:`solid 1px ${ue.primary}`,borderRadius:"1rem"},containerValue:{background:ue.background,border:`solid 1px ${ue.secondary}`,borderRadius:"1rem"},icon:{color:ue.grey500},nodeSvg:{stroke:"transparent !important"},stepChip:{fontSize:".7rem !important",fontWeight:"bold",height:"20px !important"},title:{display:"-webkit-box",margin:0,overflow:"hidden",textAlign:"right",textOverflow:"ellipsis",webkitBoxOrient:"vertical",webkitLineClamp:2}},Tp=e=>{const t=!!e,n=e==="tree",r=e==="hidden";return e==="title"?Se.containerTitle:r?Se.containerHidden:n?Se.containerTree:t?Se.containerField:Se.containerValue},_p=({nodeDatum:e,onAddChildren:t,onEditChildren:n,onDeleteChildren:r,onOpenTreeModal:a,hierarchyPointNode:o,size:s=220})=>{var F;const{t:l}=Pe.useTranslation(["translation","form"]),{attributes:c}=e||{},{isRoot:f,isLeaf:h,required:m,isDecision:b,step:g,type:v,label:u,repeatable:y,tag:w}=c||{},j=!!v,$=v==="tree",M=v==="hidden",x=!j,A=!f&&!h;return i.jsxs("g",{children:[i.jsx(p.GlobalStyles,{styles:{".rd3t-node svg":Se.nodeSvg}}),i.jsx(p.Box,{component:"foreignObject",height:s,width:s,x:`-${s/2}`,y:`-${s/2}`,sx:Tp(v),children:i.jsxs(p.Box,{flex:1,display:"flex",p:2,height:"100%",flexDirection:"column",justifyContent:"space-between",children:[i.jsxs(p.Stack,{alignItems:"flex-end",spacing:.5,children:[j&&i.jsxs(p.Stack,{direction:"row",spacing:1,alignItems:"center",children:[g&&i.jsx(p.Tooltip,{title:`${l("step",{ns:"form"})} ${(F=e==null?void 0:e.attributes)==null?void 0:F.step}`,placement:"left",arrow:!0,children:i.jsx(p.Chip,{color:"primary",size:"small",label:g,sx:Se.stepChip})}),i.jsx(p.Typography,{variant:"subtitle2",sx:Se.title,children:i.jsx("strong",{children:u})})]}),j&&i.jsx(p.Chip,{color:"info",size:"small",label:l(`type.${v}`,{ns:"form"})}),w&&i.jsx(p.Chip,{variant:"outlined",color:"warning",size:"small",label:w}),m&&i.jsx(p.Stack,{direction:"row",spacing:.5,children:m&&i.jsx(p.Typography,{variant:"body2",sx:{color:({palette:be})=>be.error.main},children:l("required")})}),i.jsx(p.Stack,{spacing:.5,alignItems:"flex-end",children:x&&i.jsx(p.Typography,{variant:"subtitle2",sx:Se.title,children:i.jsx("strong",{children:u})})}),i.jsxs(p.Stack,{paddingTop:.5,spacing:.5,direction:"row",children:[y&&i.jsx(p.Tooltip,{title:l("isARepeatable"),placement:"bottom",arrow:!0,children:i.jsx(ei,{style:Se.icon})}),h&&i.jsx(p.Tooltip,{title:l("isALeaf"),placement:"bottom",arrow:!0,children:i.jsx(Zs,{style:Se.icon})}),M&&i.jsx(p.Tooltip,{title:l("isAHidden"),placement:"bottom",arrow:!0,children:i.jsx(ri,{style:Se.icon})}),f&&i.jsx(p.Tooltip,{title:l("isTheRoot"),placement:"bottom",arrow:!0,children:i.jsx(ti,{style:Se.icon})}),A&&i.jsx(p.Tooltip,{title:l("isABranch"),placement:"bottom",arrow:!0,children:i.jsx(Ks,{style:Se.icon})}),$&&i.jsx(p.Tooltip,{title:l("isATree"),placement:"bottom",arrow:!0,children:i.jsx(Qs,{style:Se.icon})})]})]}),i.jsxs(p.Stack,{direction:"row",justifyContent:"flex-end",spacing:0,alignSelf:"flex-end",children:[!f&&i.jsx(p.Tooltip,{title:l("remove"),arrow:!0,children:i.jsx(p.Button,{variant:"text",sx:Se.actionButton,size:"small",color:"error",onClick:()=>r==null?void 0:r(o),children:i.jsx(Js,{})})}),!x&&i.jsx(p.Tooltip,{title:l("edit"),arrow:!0,children:i.jsx(p.Button,{variant:"text",color:"secondary",sx:Se.actionButton,size:"small",onClick:()=>n==null?void 0:n(o),children:i.jsx(Xs,{})})}),!b&&i.jsx(p.Tooltip,{title:l("add"),arrow:!0,children:i.jsx(p.Button,{variant:"text",color:"success",sx:Se.actionButton,size:"small",onClick:()=>t==null?void 0:t(o),children:i.jsx(Gs,{})})}),$&&i.jsx(p.Tooltip,{title:l("show"),arrow:!0,children:i.jsx(p.Button,{variant:"text",color:"info",sx:Se.actionButton,size:"small",onClick:()=>a==null?void 0:a(o),children:i.jsx(ni,{})})})]})]})})]})},Ep=_.memo(_p),oi=()=>{const{setModalOpen:e,setCurrentHierarchyPointNode:t,setTreeModalOpen:n,setTreePath:r}=Re();return{handleAddChildren:f=>{t(f),e("add")},handleCloseTreeModal:()=>{r([]),n(!1)},handleDeleteChildren:f=>{t(f),e("delete")},handleEditChildren:f=>{t(f),e("edit")},handleOpenTreeModal:f=>{var m,b,g;const h={label:((m=f==null?void 0:f.data.attributes)==null?void 0:m.label)||"",path:((g=(b=f==null?void 0:f.data)==null?void 0:b.attributes)==null?void 0:g.treePath)||""};r(v=>[...v,h]),n(!0)}}},wp=({nodeDatum:e,hierarchyPointNode:t,toggleNode:n,onNodeClick:r,onNodeMouseOver:a,onNodeMouseOut:o,addChildren:s})=>{const{handleDeleteChildren:l,handleEditChildren:c,handleAddChildren:f,handleOpenTreeModal:h}=oi();return i.jsx(Ep,{addChildren:s,nodeDatum:e,hierarchyPointNode:t,toggleNode:n,onNodeClick:r,onNodeMouseOver:a,onNodeMouseOut:o,onAddChildren:f,onOpenTreeModal:h,onDeleteChildren:l,onEditChildren:c})},si=({nodeDatum:e,hierarchyPointNode:t,toggleNode:n,onNodeClick:r,onNodeMouseOver:a,onNodeMouseOut:o,addChildren:s})=>i.jsx(wp,{addChildren:s,nodeDatum:e,hierarchyPointNode:t,toggleNode:n,onNodeClick:r,onNodeMouseOver:a,onNodeMouseOut:o}),jp=()=>{const{t:e}=Pe.useTranslation(["modal","snackMessage"]),{currentHierarchyPointNode:t,modalOpen:n,setModalOpen:r,dispatchTree:a}=Re(),o=n==="edit";return{closeModal:()=>{r(null)},getTitleModalDelete:()=>{var u;const{label:g,name:v}=((u=t==null?void 0:t.data)==null?void 0:u.attributes)||{};return e("deleteTitle",{name:g||v,ns:"modal"})},getTitleModalMutation:()=>{var y;const{label:g,name:v}=((y=t==null?void 0:t.data)==null?void 0:y.attributes)||{};return o?e(o?"editTitle":"addTitle",{name:g||v,ns:"modal"}):e("addFirstTitle",{ns:"modal"})},handleChangeTree:g=>{try{a(wn(JSON.parse(g)))}catch{return!1}},isDeleteModal:n==="delete",isModalMutationOpen:o||n==="add"}},Op=()=>{const{currentTree:e,setCurrentTree:t,tree:n}=Re(),{name:r,errorName:a,id:o}=e;return{disabled:!!e.id&&!n,errorName:a,handleChangeName:c=>{const{value:f}=c.target;if(!f){t(h=>({...h,errorName:"Champs requis",name:c.target.value}));return}t(h=>({...h,errorName:"",name:c.target.value}))},id:o,name:r}},Rp=()=>{const{t:e}=Pe.useTranslation("form"),{name:t,handleChangeName:n,errorName:r,disabled:a}=Op();return i.jsx(p.TextField,{required:!0,label:e("treeName",{ns:"form"}),size:"small",onChange:n,value:t,error:!!r,disabled:a})},Sp=()=>{const{tree:e,treeModalOpen:t,treePath:n,backendConfig:r}=Re(),{handleCloseTreeModal:a}=oi(),{getTitleModalMutation:o,closeModal:s,getTitleModalDelete:l,isModalMutationOpen:c,isDeleteModal:f,handleChangeTree:h}=jp(),m=n==null?void 0:n.at(-1),b=m==null?void 0:m.path,g=m==null?void 0:m.label,v=Ft(e,b);return i.jsxs(i.Fragment,{children:[i.jsxs(i0,{children:[i.jsx(a0,{children:i.jsxs(p.Stack,{justifyContent:"space-between",direction:"row",alignItems:"center",children:[i.jsx(sl,{}),!!(r!=null&&r.baseUrl)&&i.jsxs(p.Stack,{direction:"row",alignItems:"center",spacing:2,children:[i.jsx(Rp,{}),i.jsx(Ws,{size:"small",arrowOnly:!0,showBtnAddNewTree:!0,fetchWorkflowsOnOpen:!0})]})]})}),i.jsx(s0,{children:i.jsx(eo,{data:e,renderCustomNodeElement:si})}),i.jsx(u0,{children:i.jsx(jl,{value:e,onChange:h})}),i.jsx(r0,{children:i.jsx(Kf,{value:e})})]}),i.jsx(Is,{open:c,onClose:s,title:o(),children:i.jsx(Y0,{onClose:s})}),i.jsx(Is,{open:f,onClose:s,title:l(),children:i.jsx(d0,{onClose:s})}),i.jsx(e0,{open:t,onClose:a,title:g,children:i.jsx(eo,{data:v,renderCustomNodeElement:si})})]})},kp={close:"Close",copyToClipboard:"Copy tree to clipboard",createTree:"Create Tree",downloadJSONFile:"Download JSON File",reset:"Reset",resetTree:"Reset tree",save:"Save",update:"Update"},$p={error:{fetchTree:"An error has occurred. Please try again",saveTree:"An error has occurred. Please try again",updateTree:"An error has occurred. Please try again"},success:{copyToClipboard:"Copied to clipboard",saveTree:"Tree registered",updateTree:"Tree updated"}},Mp={add:"Add",cancel:"Cancel",disabled:"Disabled",edit:"Edit",initialQueryEnable:"Enable initial API call",isABranch:"Is a branch",isAHidden:"Is a hidden field",isALeaf:"Is a leaf",isARepeatable:"Is a repeatable",isATree:"Is a tree",isTheRoot:"Is the root",label:"Label",multiple:"Multiple",name:"Name",parentRef:"Parent element",remove:"Remove",required:"Required",save:"Save",show:"Show",tag:"Tag",type:"Type",uuid:"UUID",validate:"Validate",value:"Value",values:"Values"},Pp={close:"Fermer",copyToClipboard:"Copier l'arbre dans le presse-papiers",createTree:"Créer un arbre",downloadJSONFile:"Télécharger le fichier JSON",reset:"Réinitialiser",resetTree:"Réinitialiser l'arbre",save:"Enregistrer",update:"Modifier"},ii={additionalParams:"Paramètres additionnels",ancestor:"Ancêtre",apiRoute:"Api route",cardNumber:"Numéro de carte",dataMapping:"Mapping de données",decisionField:"Champs de décision",disabledPast:"Passé désactivé",email:"Email",firstNameAndLastName:"Prénom et nom",helperText:"Texte d'information",hiddenValue:"Valeur caché",key:"Clé",label:"Label",letter:"Lettre",message:"Message",mustBeUnique:"Doit être unique",newTree:"Nouvel arbre",noAncestorFound:"Aucun parent trouvé",number:"Chiffre",numberAndLetter:"Chiffre et lettre",offMessage:"Message (désactiver)",onMessage:"Message (activer)",pattern:"Expression régulière",patternMessage:"Message d'aide invalide",phoneNumber:"Numéro de téléphone",repeatable:"Répétable",searchKeyPlaceholder:"text",staticFields:"Champs statiques",step:"Étape",tree:"Arbre",treeName:"Nom de l'arbre",type:{address:"Adresse",autocomplete:"Autocomplétion",checkbox:"Case à cocher",date:"Date",dateRange:"Plage de dates",dynamicSelect:"Sélection dynamique",email:"Email",file:"Fichier",hidden:"Champs caché",number:"Nombre",password:"Mot de passe",radio:"Radio",select:"Select",switch:"Switch",tel:"Téléphone",text:"Texte",time:"Temps",timeRange:"Plage de temps",title:"Titre",tree:"Arbre",url:"URL"},url:"URL",urlConstruction:"Construction de l'URL",value:"Valeur",values:"Valeurs",warningApiAutocomplete:{response:"dois avoir comme réponse",url:"La route de l'API"},warningApiSelect:{response:"à l'emplacement de votre variable.",url:"Pour intégrer automatiquement la valeur du parent dans l'URL",warning:"placez {{}}"}},li={addFirstTitle:"Ajouter un champ",addTitle:"Ajouter un champ à « {{name}} »",deleteTitle:"Voulez vraiment supprimer « {{name}} »",editTitle:"Éditer le champ « {{name}} »",resetTreeContent:"Êtes-vous sûr de vouloir réinitialiser l'arbre ?",saveTree:"Enregistrer l'arbre"},Ap={error:{fetchTree:"Une erreur est survenue veuillez réessayer",saveTree:"Une erreur est survenue veuillez réessayer",updateTree:"Une erreur est survenue veuillez réessayer"},success:{copyToClipboard:"Copié dans le presse-papiers",saveTree:"Arbre enregistré",updateTree:"Arbre mis à jour"}},Dp={add:"Ajouter",cancel:"Annuler",disabled:"Désactivé",edit:"Éditer",initialQueryEnable:"Activer un appel API intiale",isABranch:"Est une branche",isAHidden:"Est un champs caché",isALeaf:"Est une feuille",isARepeatable:"Est répétable",isATree:"Est un arbre",isTheRoot:"Est la racine",label:"Label",multiple:"Multiple",name:"Nom",parentRef:"Element parent",remove:"Supprimer",required:"Requis",save:"Enregistrer",show:"Afficher",tag:"Tag",type:"Type",uuid:"UUID",validate:"Valider",value:"Valeur",values:"Valeurs"};Ht.use(Ui).use(Pe.initReactI18next).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{useSuspense:!0},resources:{en:{button:kp,form:ii,modal:li,snackMessage:$p,translation:Mp},fr:{button:Pp,form:ii,modal:li,snackMessage:Ap,translation:Dp}},returnNull:!1}).then(()=>{document.documentElement.lang!==Ht.resolvedLanguage&&Ht.resolvedLanguage&&document.documentElement.setAttribute("lang",Ht.resolvedLanguage)}),Ht.on("languageChanged",e=>{document.documentElement.setAttribute("lang",e)});const Ip=({initialTree:e,initialTreeId:t,backendConfig:n})=>(_.useLayoutEffect(()=>{It.defaults.baseURL=n==null?void 0:n.baseUrl,n!=null&&n.authToken&&(It.defaults.headers.common.Authorization=`Bearer ${n==null?void 0:n.authToken}`)},[n==null?void 0:n.authToken,n==null?void 0:n.baseUrl]),i.jsx(Dt.QueryClientProvider,{client:Zi,children:i.jsx(el,{authToken:n==null?void 0:n.authToken,children:i.jsx(Cl,{backendConfig:n,initialTree:e,initialTreeId:t,children:i.jsx(Xi,{children:i.jsx(al,{children:i.jsx(Sp,{})})})})})}));Me.TreePlusIcon=Ja,Me.Treege=Ip,Object.defineProperty(Me,Symbol.toStringTag,{value:"Module"})});
87
+ } });`:Qe(12,v?` (${v})`:"",JSON.stringify(c.main)));return La(c,"light",O,n),La(c,"dark",j,n),c.contrastText||(c.contrastText=b(c.main)),c};let C;return t==="light"?C=Na():t==="dark"&&(C=Fa()),process.env.NODE_ENV!=="production"&&(C||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),$e({common:{...Vt},mode:t,primary:g({color:o,name:"primary"}),secondary:g({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:l,name:"error"}),warning:g({color:m,name:"warning"}),info:g({color:f,name:"info"}),success:g({color:p,name:"success"}),grey:Sl,contrastThreshold:r,getContrastText:b,augmentColor:g,tonalOffset:n,...C},a)}function Dl(e){const t={};return Object.entries(e).forEach(n=>{const[a,o]=n;typeof o=="object"&&(t[a]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function Il(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Nl(e){return Math.round(e*1e5)/1e5}const Va={textTransform:"uppercase"},za='"Roboto", "Helvetica", "Arial", sans-serif';function Fl(e,t){const{fontFamily:r=za,fontSize:n=14,fontWeightLight:a=300,fontWeightRegular:o=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:f=16,allVariants:p,pxToRem:m,...b}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof n!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof f!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const g=n/14,C=m||(v=>`${v/f*g}rem`),y=(v,k,O,j,P)=>({fontFamily:r,fontWeight:v,fontSize:C(k),lineHeight:O,...r===za?{letterSpacing:`${Nl(j/k)}em`}:{},...P,...p}),c={h1:y(a,96,1.167,-1.5),h2:y(a,60,1.2,-.5),h3:y(o,48,1.167,0),h4:y(o,34,1.235,.25),h5:y(o,24,1.334,0),h6:y(s,20,1.6,.15),subtitle1:y(o,16,1.75,.15),subtitle2:y(s,14,1.57,.1),body1:y(o,16,1.5,.15),body2:y(o,14,1.43,.15),button:y(s,14,1.75,.4,Va),caption:y(o,12,1.66,.4),overline:y(o,12,2.66,1,Va),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return $e({htmlFontSize:f,pxToRem:C,fontFamily:r,fontSize:n,fontWeightLight:a,fontWeightRegular:o,fontWeightMedium:s,fontWeightBold:l,...c},b,{clone:!1})}const Bl=.2,Ll=.14,Vl=.12;function ce(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Bl})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Ll})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Vl})`].join(",")}const zl=["none",ce(0,2,1,-1,0,1,1,0,0,1,3,0),ce(0,3,1,-2,0,2,2,0,0,1,5,0),ce(0,3,3,-2,0,3,4,0,0,1,8,0),ce(0,2,4,-1,0,4,5,0,0,1,10,0),ce(0,3,5,-1,0,5,8,0,0,1,14,0),ce(0,3,5,-1,0,6,10,0,0,1,18,0),ce(0,4,5,-2,0,7,10,1,0,2,16,1),ce(0,5,5,-3,0,8,10,1,0,3,14,2),ce(0,5,6,-3,0,9,12,1,0,3,16,2),ce(0,6,6,-3,0,10,14,1,0,4,18,3),ce(0,6,7,-4,0,11,15,1,0,4,20,3),ce(0,7,8,-4,0,12,17,2,0,5,22,4),ce(0,7,8,-4,0,13,19,2,0,5,24,4),ce(0,7,9,-4,0,14,21,2,0,5,26,4),ce(0,8,9,-5,0,15,22,2,0,6,28,5),ce(0,8,10,-5,0,16,24,2,0,6,30,5),ce(0,8,11,-5,0,17,26,2,0,6,32,5),ce(0,9,11,-5,0,18,28,2,0,7,34,6),ce(0,9,12,-6,0,19,29,2,0,7,36,6),ce(0,10,13,-6,0,20,31,3,0,8,38,7),ce(0,10,13,-6,0,21,33,3,0,8,40,7),ce(0,10,14,-6,0,22,35,3,0,8,42,7),ce(0,11,14,-7,0,23,36,3,0,9,44,8),ce(0,11,15,-7,0,24,38,3,0,9,46,8)],ql={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)"},Hl={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function qa(e){return`${Math.round(e)}ms`}function Wl(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Ul(e){const t={...ql,...e.easing},r={...Hl,...e.duration};return{getAutoHeightDuration:Wl,create:(a=["all"],o={})=>{const{duration:s=r.standard,easing:l=t.easeInOut,delay:f=0,...p}=o;if(process.env.NODE_ENV!=="production"){const m=g=>typeof g=="string",b=g=>!Number.isNaN(parseFloat(g));!m(a)&&!Array.isArray(a)&&console.error('MUI: Argument "props" must be a string or Array.'),!b(s)&&!m(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),m(l)||console.error('MUI: Argument "easing" must be a string.'),!b(f)&&!m(f)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof o!="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(`
88
+ `)),Object.keys(p).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(p).join(",")}].`)}return(Array.isArray(a)?a:[a]).map(m=>`${m} ${typeof s=="string"?s:qa(s)} ${l} ${typeof f=="string"?f:qa(f)}`).join(",")},...e,easing:t,duration:r}}const Yl={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Gl(e){return Ue(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Ha(e={}){const t={...e};function r(n){const a=Object.entries(n);for(let o=0;o<a.length;o++){const[s,l]=a[o];!Gl(l)||s.startsWith("unstable_")?delete n[s]:Ue(l)&&(n[s]={...l},r(n[s]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
89
+
90
+ const theme = ${JSON.stringify(t,null,2)};
91
+
92
+ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
93
+ theme.transitions = createTransitions(theme.transitions || {});
94
+
95
+ export default theme;`}function pn(e={},...t){const{breakpoints:r,mixins:n={},spacing:a,palette:o={},transitions:s={},typography:l={},shape:f,...p}=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.":Qe(20));const m=fn(o),b=Sa(e);let g=$e(b,{mixins:Il(b.breakpoints,n),palette:m,shadows:zl.slice(),typography:Fl(m,l),transitions:Ul(s),zIndex:{...Yl}});if(g=$e(g,p),g=t.reduce((C,y)=>$e(C,y),g),process.env.NODE_ENV!=="production"){const C=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],y=(c,v)=>{let k;for(k in c){const O=c[k];if(C.includes(k)&&Object.keys(O).length>0){if(process.env.NODE_ENV!=="production"){const j=nn("",k);console.error([`MUI: The \`${v}\` component increases the CSS specificity of the \`${k}\` internal state.`,"You can not override it like this: ",JSON.stringify(c,null,2),"",`Instead, you need to use the '&.${j}' syntax:`,JSON.stringify({root:{[`&.${j}`]:O}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
96
+ `))}c[k]={}}}};Object.keys(g.components).forEach(c=>{const v=g.components[c].styleOverrides;v&&c.startsWith("Mui")&&y(v,c)})}return g.unstable_sxConfig={...yr,...p?.unstable_sxConfig},g.unstable_sx=function(y){return bt({sx:y,theme:this})},g.toRuntimeSource=Ha,g}function Kl(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Jl=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=Kl(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Wa(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Ua(e){return e==="dark"?Jl:[]}function Ql(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...a}=e,o=fn(t);return{palette:o,opacity:{...Wa(o.mode),...r},overlays:n||Ua(o.mode),...a}}function Xl(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 Zl=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],ec=e=>(t,r)=>{const n=e.rootSelector||":root",a=e.colorSchemeSelector;let o=a;if(a==="class"&&(o=".%s"),a==="data"&&(o="[data-%s]"),a?.startsWith("data-")&&!a.includes("%s")&&(o=`[${a}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return Zl(e.cssVarPrefix).forEach(l=>{s[l]=r[l],delete r[l]}),o==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:s}}:o?{[o.replace("%s",t)]:s,[`${n}, ${o.replace("%s",t)}`]:r}:{[n]:{...r,...s}}}if(o&&o!=="media")return`${n}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(o)return o.replace("%s",String(t))}return n};function tc(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function x(e,t,r){!e[t]&&r&&(e[t]=r)}function qt(e){return typeof e!="string"||!e.startsWith("hsl")?e:_a(e)}function Ge(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Lt(qt(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
97
+ To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function rc(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const We=e=>{try{return e()}catch{}},nc=(e="mui")=>Tl(e);function hn(e,t,r,n){if(!t)return;t=t===!0?{}:t;const a=n==="dark"?"dark":"light";if(!r){e[n]=Ql({...t,palette:{mode:a,...t?.palette}});return}const{palette:o,...s}=pn({...r,palette:{mode:a,...t?.palette}});return e[n]={...t,palette:o,opacity:{...Wa(a),...t?.opacity},overlays:t?.overlays||Ua(a)},s}function ac(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:a=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:s=Xl,colorSchemeSelector:l=r.light&&r.dark?"media":void 0,rootSelector:f=":root",...p}=e,m=Object.keys(r)[0],b=n||(r.light&&m!=="light"?"light":m),g=nc(o),{[b]:C,light:y,dark:c,...v}=r,k={...v};let O=C;if((b==="dark"&&!("dark"in r)||b==="light"&&!("light"in r))&&(O=!0),!O)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${b}\` option is either missing or invalid.`:Qe(21,b));const j=hn(k,O,p,b);y&&!k.light&&hn(k,y,void 0,"light"),c&&!k.dark&&hn(k,c,void 0,"dark");let P={defaultColorScheme:b,...j,cssVarPrefix:o,colorSchemeSelector:l,rootSelector:f,getCssVar:g,colorSchemes:k,font:{...Dl(j.typography),...j.font},spacing:rc(p.spacing)};Object.keys(P.colorSchemes).forEach(H=>{const u=P.colorSchemes[H].palette,R=Y=>{const B=Y.split("-"),he=B[1],se=B[2];return g(Y,u[he][se])};if(u.mode==="light"&&(x(u.common,"background","#fff"),x(u.common,"onBackground","#000")),u.mode==="dark"&&(x(u.common,"background","#000"),x(u.common,"onBackground","#fff")),tc(u,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),u.mode==="light"){x(u.Alert,"errorColor",ae(u.error.light,.6)),x(u.Alert,"infoColor",ae(u.info.light,.6)),x(u.Alert,"successColor",ae(u.success.light,.6)),x(u.Alert,"warningColor",ae(u.warning.light,.6)),x(u.Alert,"errorFilledBg",R("palette-error-main")),x(u.Alert,"infoFilledBg",R("palette-info-main")),x(u.Alert,"successFilledBg",R("palette-success-main")),x(u.Alert,"warningFilledBg",R("palette-warning-main")),x(u.Alert,"errorFilledColor",We(()=>u.getContrastText(u.error.main))),x(u.Alert,"infoFilledColor",We(()=>u.getContrastText(u.info.main))),x(u.Alert,"successFilledColor",We(()=>u.getContrastText(u.success.main))),x(u.Alert,"warningFilledColor",We(()=>u.getContrastText(u.warning.main))),x(u.Alert,"errorStandardBg",oe(u.error.light,.9)),x(u.Alert,"infoStandardBg",oe(u.info.light,.9)),x(u.Alert,"successStandardBg",oe(u.success.light,.9)),x(u.Alert,"warningStandardBg",oe(u.warning.light,.9)),x(u.Alert,"errorIconColor",R("palette-error-main")),x(u.Alert,"infoIconColor",R("palette-info-main")),x(u.Alert,"successIconColor",R("palette-success-main")),x(u.Alert,"warningIconColor",R("palette-warning-main")),x(u.AppBar,"defaultBg",R("palette-grey-100")),x(u.Avatar,"defaultBg",R("palette-grey-400")),x(u.Button,"inheritContainedBg",R("palette-grey-300")),x(u.Button,"inheritContainedHoverBg",R("palette-grey-A100")),x(u.Chip,"defaultBorder",R("palette-grey-400")),x(u.Chip,"defaultAvatarColor",R("palette-grey-700")),x(u.Chip,"defaultIconColor",R("palette-grey-700")),x(u.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),x(u.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),x(u.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),x(u.LinearProgress,"primaryBg",oe(u.primary.main,.62)),x(u.LinearProgress,"secondaryBg",oe(u.secondary.main,.62)),x(u.LinearProgress,"errorBg",oe(u.error.main,.62)),x(u.LinearProgress,"infoBg",oe(u.info.main,.62)),x(u.LinearProgress,"successBg",oe(u.success.main,.62)),x(u.LinearProgress,"warningBg",oe(u.warning.main,.62)),x(u.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),x(u.Slider,"primaryTrack",oe(u.primary.main,.62)),x(u.Slider,"secondaryTrack",oe(u.secondary.main,.62)),x(u.Slider,"errorTrack",oe(u.error.main,.62)),x(u.Slider,"infoTrack",oe(u.info.main,.62)),x(u.Slider,"successTrack",oe(u.success.main,.62)),x(u.Slider,"warningTrack",oe(u.warning.main,.62));const Y=Or(u.background.default,.8);x(u.SnackbarContent,"bg",Y),x(u.SnackbarContent,"color",We(()=>u.getContrastText(Y))),x(u.SpeedDialAction,"fabHoverBg",Or(u.background.paper,.15)),x(u.StepConnector,"border",R("palette-grey-400")),x(u.StepContent,"border",R("palette-grey-400")),x(u.Switch,"defaultColor",R("palette-common-white")),x(u.Switch,"defaultDisabledColor",R("palette-grey-100")),x(u.Switch,"primaryDisabledColor",oe(u.primary.main,.62)),x(u.Switch,"secondaryDisabledColor",oe(u.secondary.main,.62)),x(u.Switch,"errorDisabledColor",oe(u.error.main,.62)),x(u.Switch,"infoDisabledColor",oe(u.info.main,.62)),x(u.Switch,"successDisabledColor",oe(u.success.main,.62)),x(u.Switch,"warningDisabledColor",oe(u.warning.main,.62)),x(u.TableCell,"border",oe(Ar(u.divider,1),.88)),x(u.Tooltip,"bg",Ar(u.grey[700],.92))}if(u.mode==="dark"){x(u.Alert,"errorColor",oe(u.error.light,.6)),x(u.Alert,"infoColor",oe(u.info.light,.6)),x(u.Alert,"successColor",oe(u.success.light,.6)),x(u.Alert,"warningColor",oe(u.warning.light,.6)),x(u.Alert,"errorFilledBg",R("palette-error-dark")),x(u.Alert,"infoFilledBg",R("palette-info-dark")),x(u.Alert,"successFilledBg",R("palette-success-dark")),x(u.Alert,"warningFilledBg",R("palette-warning-dark")),x(u.Alert,"errorFilledColor",We(()=>u.getContrastText(u.error.dark))),x(u.Alert,"infoFilledColor",We(()=>u.getContrastText(u.info.dark))),x(u.Alert,"successFilledColor",We(()=>u.getContrastText(u.success.dark))),x(u.Alert,"warningFilledColor",We(()=>u.getContrastText(u.warning.dark))),x(u.Alert,"errorStandardBg",ae(u.error.light,.9)),x(u.Alert,"infoStandardBg",ae(u.info.light,.9)),x(u.Alert,"successStandardBg",ae(u.success.light,.9)),x(u.Alert,"warningStandardBg",ae(u.warning.light,.9)),x(u.Alert,"errorIconColor",R("palette-error-main")),x(u.Alert,"infoIconColor",R("palette-info-main")),x(u.Alert,"successIconColor",R("palette-success-main")),x(u.Alert,"warningIconColor",R("palette-warning-main")),x(u.AppBar,"defaultBg",R("palette-grey-900")),x(u.AppBar,"darkBg",R("palette-background-paper")),x(u.AppBar,"darkColor",R("palette-text-primary")),x(u.Avatar,"defaultBg",R("palette-grey-600")),x(u.Button,"inheritContainedBg",R("palette-grey-800")),x(u.Button,"inheritContainedHoverBg",R("palette-grey-700")),x(u.Chip,"defaultBorder",R("palette-grey-700")),x(u.Chip,"defaultAvatarColor",R("palette-grey-300")),x(u.Chip,"defaultIconColor",R("palette-grey-300")),x(u.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),x(u.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),x(u.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),x(u.LinearProgress,"primaryBg",ae(u.primary.main,.5)),x(u.LinearProgress,"secondaryBg",ae(u.secondary.main,.5)),x(u.LinearProgress,"errorBg",ae(u.error.main,.5)),x(u.LinearProgress,"infoBg",ae(u.info.main,.5)),x(u.LinearProgress,"successBg",ae(u.success.main,.5)),x(u.LinearProgress,"warningBg",ae(u.warning.main,.5)),x(u.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),x(u.Slider,"primaryTrack",ae(u.primary.main,.5)),x(u.Slider,"secondaryTrack",ae(u.secondary.main,.5)),x(u.Slider,"errorTrack",ae(u.error.main,.5)),x(u.Slider,"infoTrack",ae(u.info.main,.5)),x(u.Slider,"successTrack",ae(u.success.main,.5)),x(u.Slider,"warningTrack",ae(u.warning.main,.5));const Y=Or(u.background.default,.98);x(u.SnackbarContent,"bg",Y),x(u.SnackbarContent,"color",We(()=>u.getContrastText(Y))),x(u.SpeedDialAction,"fabHoverBg",Or(u.background.paper,.15)),x(u.StepConnector,"border",R("palette-grey-600")),x(u.StepContent,"border",R("palette-grey-600")),x(u.Switch,"defaultColor",R("palette-grey-300")),x(u.Switch,"defaultDisabledColor",R("palette-grey-600")),x(u.Switch,"primaryDisabledColor",ae(u.primary.main,.55)),x(u.Switch,"secondaryDisabledColor",ae(u.secondary.main,.55)),x(u.Switch,"errorDisabledColor",ae(u.error.main,.55)),x(u.Switch,"infoDisabledColor",ae(u.info.main,.55)),x(u.Switch,"successDisabledColor",ae(u.success.main,.55)),x(u.Switch,"warningDisabledColor",ae(u.warning.main,.55)),x(u.TableCell,"border",ae(Ar(u.divider,1),.68)),x(u.Tooltip,"bg",Ar(u.grey[700],.92))}Ge(u.background,"default"),Ge(u.background,"paper"),Ge(u.common,"background"),Ge(u.common,"onBackground"),Ge(u,"divider"),Object.keys(u).forEach(Y=>{const B=u[Y];Y!=="tonalOffset"&&B&&typeof B=="object"&&(B.main&&x(u[Y],"mainChannel",Lt(qt(B.main))),B.light&&x(u[Y],"lightChannel",Lt(qt(B.light))),B.dark&&x(u[Y],"darkChannel",Lt(qt(B.dark))),B.contrastText&&x(u[Y],"contrastTextChannel",Lt(qt(B.contrastText))),Y==="text"&&(Ge(u[Y],"primary"),Ge(u[Y],"secondary")),Y==="action"&&(B.active&&Ge(u[Y],"active"),B.selected&&Ge(u[Y],"selected")))})}),P=t.reduce((H,u)=>$e(H,u),P);const T={prefix:o,disableCssColorScheme:a,shouldSkipGeneratingVar:s,getSelector:ec(P)},{vars:I,generateThemeVars:$,generateStyleSheets:G}=El(P,T);return P.vars=I,Object.entries(P.colorSchemes[P.defaultColorScheme]).forEach(([H,u])=>{P[H]=u}),P.generateThemeVars=$,P.generateStyleSheets=G,P.generateSpacing=function(){return ja(p.spacing,Yr(this))},P.getColorSchemeSelector=jl(l),P.spacing=P.generateSpacing(),P.shouldSkipGeneratingVar=s,P.unstable_sxConfig={...yr,...p?.unstable_sxConfig},P.unstable_sx=function(u){return bt({sx:u,theme:this})},P.toRuntimeSource=Ha,P}function Ya(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:fn({...r===!0?{}:r.palette,mode:t})})}function oc(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:a=r?void 0:{light:!0},defaultColorScheme:o=r?.mode,...s}=e,l=o||"light",f=a?.[l],p={...a,...r?{[l]:{...typeof f!="boolean"&&f,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return pn(e,...t);let m=r;"palette"in e||p[l]&&(p[l]!==!0?m=p[l].palette:l==="dark"&&(m={mode:"dark"}));const b=pn({...e,palette:m},...t);return b.defaultColorScheme=l,b.colorSchemes=p,b.palette.mode==="light"&&(b.colorSchemes.light={...p.light!==!0&&p.light,palette:b.palette},Ya(b,"dark",p.dark)),b.palette.mode==="dark"&&(b.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:b.palette},Ya(b,"light",p.light)),b}return!r&&!("light"in p)&&l==="light"&&(p.light=!0),ac({...s,colorSchemes:p,defaultColorScheme:l,...typeof n!="boolean"&&n},...t)}const ic=oc(),sc="$$material";function lc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const cc=ll({themeId:sc,defaultTheme:ic,rootShouldForwardProp:e=>lc(e)&&e!=="classes"}),uc=Cl;process.env.NODE_ENV!=="production"&&(K.node,K.object.isRequired);function dc(e){return vl(e)}function fc(e){return nn("MuiSvgIcon",e)}nl("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const pc=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${ot(t)}`,`fontSize${ot(r)}`]};return ii(a,fc,n)},hc=cc("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${ot(r.color)}`],t[`fontSize${ot(r.fontSize)}`]]}})(uc(({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:t=>!t.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(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.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}}]}))),Rr=ke.forwardRef(function(t,r){const n=dc({props:t,name:"MuiSvgIcon"}),{children:a,className:o,color:s="inherit",component:l="svg",fontSize:f="medium",htmlColor:p,inheritViewBox:m=!1,titleAccess:b,viewBox:g="0 0 24 24",...C}=n,y=ke.isValidElement(a)&&a.type==="svg",c={...n,color:s,component:l,fontSize:f,instanceFontSize:t.fontSize,inheritViewBox:m,viewBox:g,hasSvgAsChild:y},v={};m||(v.viewBox=g);const k=pc(c);return i.jsxs(hc,{as:l,className:Kn(k.root,o),focusable:"false",color:p,"aria-hidden":b?void 0:!0,role:b?"img":void 0,ref:r,...v,...C,...y&&a.props,ownerState:c,children:[y?a.props.children:a,b?i.jsx("title",{children:b}):null]})});process.env.NODE_ENV!=="production"&&(Rr.propTypes={children:K.node,classes:K.object,className:K.string,color:K.oneOfType([K.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),K.string]),component:K.elementType,fontSize:K.oneOfType([K.oneOf(["inherit","large","medium","small"]),K.string]),htmlColor:K.string,inheritViewBox:K.bool,shapeRendering:K.string,sx:K.oneOfType([K.arrayOf(K.oneOfType([K.func,K.object,K.bool])),K.func,K.object]),titleAccess:K.string,viewBox:K.string}),Rr.muiName="SvgIcon";function ge(e,t){function r(n,a){return i.jsx(Rr,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:a,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Rr.muiName,ke.memo(ke.forwardRef(r))}const mc=ge(i.jsx("path",{d:"M15 1H4c-1.1 0-2 .9-2 2v13c0 .55.45 1 1 1s1-.45 1-1V4c0-.55.45-1 1-1h10c.55 0 1-.45 1-1s-.45-1-1-1m.59 4.59 4.83 4.83c.37.37.58.88.58 1.41V21c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h6.17c.53 0 1.04.21 1.42.59M15 12h4.5L14 6.5V11c0 .55.45 1 1 1"}),"FileCopyRounded"),bc=ge(i.jsx("path",{d:"M6.56 7.98C6.1 7.52 5.31 7.6 5 8.17c-.28.51-.5 1.03-.67 1.58-.19.63.31 1.25.96 1.25h.01c.43 0 .82-.28.94-.7q.18-.6.48-1.17c.22-.37.15-.84-.16-1.15M5.31 13h-.02c-.65 0-1.15.62-.96 1.25.16.54.38 1.07.66 1.58.31.57 1.11.66 1.57.2.3-.31.38-.77.17-1.15-.2-.37-.36-.76-.48-1.16-.12-.44-.51-.72-.94-.72m2.85 6.02q.765.42 1.59.66c.62.18 1.24-.32 1.24-.96v-.03c0-.43-.28-.82-.7-.94-.4-.12-.78-.28-1.15-.48-.38-.21-.86-.14-1.16.17l-.03.03c-.45.45-.36 1.24.21 1.55M13 4.07v-.66c0-.89-1.08-1.34-1.71-.71L9.17 4.83c-.4.4-.4 1.04 0 1.43l2.13 2.08c.63.62 1.7.17 1.7-.72V6.09c2.84.48 5 2.94 5 5.91 0 2.73-1.82 5.02-4.32 5.75-.41.12-.68.51-.68.94v.02c0 .65.61 1.14 1.23.96C17.57 18.71 20 15.64 20 12c0-4.08-3.05-7.44-7-7.93"}),"RotateLeftRounded"),gc=ge(i.jsx("path",{d:"M17.59 3.59c-.38-.38-.89-.59-1.42-.59H5c-1.11 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7.83c0-.53-.21-1.04-.59-1.41zM12 19c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m1-10H7c-1.1 0-2-.9-2-2s.9-2 2-2h6c1.1 0 2 .9 2 2s-.9 2-2 2"}),"SaveRounded"),yc=ge(i.jsx("path",{d:"M18 2h-7.17c-.53 0-1.04.21-1.42.59L4.59 7.41C4.21 7.79 4 8.3 4 8.83V20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-6.35 14.65-2.79-2.79c-.32-.32-.1-.86.35-.86H11v-2.99c0-.55.44-.99.99-1 .56-.01 1.01.44 1.01 1V13h1.79c.45 0 .67.54.35.85l-2.79 2.79c-.19.2-.51.2-.7.01"}),"SimCardDownloadRounded"),xc=()=>{const{backendConfig:e}=ye(),{endpoints:t}=e||{},{workflow:r=""}=t||{};return ft.useMutation({mutationFn:async n=>{const{data:a}=await pt.patch(r,n);return a},mutationKey:["patchWorkflow"]})},vc=()=>{const{backendConfig:e}=ye(),{endpoints:t}=e||{},{workflow:r=""}=t||{};return ft.useMutation({mutationFn:async n=>{const{data:a}=await pt.post(r,n);return a},mutationKey:["postWorkflow"]})},Cc=()=>{const{t:e}=we.useTranslation(["snackMessage"]),{openSnackbar:t}=d.useSnackbar(),{setCurrentTree:r,currentTree:n,tree:a,dispatchTree:o}=ye(),[s,l]=S.useState(!1),{version:f}=ye(),{mutate:p}=vc(),{mutate:m}=xc(),b=O=>JSON.stringify(O,null,2),g=O=>`data:text/json;charset=utf-8,${encodeURIComponent(b(O))}`,C=O=>()=>{navigator.clipboard.writeText(b(O)).then(),t({message:e("success.copyToClipboard",{ns:"snackMessage"})})},y=()=>{l(!1)};return{copyToClipboard:C,formatJSON:b,getDownloadLink:g,handleClose:y,handleOpen:()=>{l(!0)},handleResetTree:()=>{o(Rn()),y()},handleSubmit:()=>{const{name:O,id:j}=n;if(!O){r(P=>({...P,errorName:"Champs Requis"}));return}if(a){if(j){m({id:j,label:O,version:f,workflow:a},{onError:()=>{t({message:e("error.updateTree",{ns:"snackMessage"}),severity:"error"})},onSuccess:()=>{t({message:e("success.updateTree",{ns:"snackMessage"})})}});return}p({label:O,version:f,workflow:a},{onError:()=>{t({message:e("error.updateTree",{ns:"snackMessage"}),severity:"error"})},onSuccess:()=>{t({message:e("success.updateTree",{ns:"snackMessage"})})}})}},openModal:s}},Tc=({downloadedFileName:e="export",value:t})=>{const{t:r}=we.useTranslation(),{getDownloadLink:n,handleSubmit:a,handleClose:o,handleOpen:s,handleResetTree:l,copyToClipboard:f,openModal:p}=Cc(),{currentTree:m,backendConfig:b,tree:g}=ye(),{id:C}=m;return i.jsxs(d.Stack,{direction:"row",spacing:1,justifyContent:"center",children:[i.jsx(d.Tooltip,{title:r("resetTree",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:i.jsx(d.Box,{children:i.jsx(d.IconButton,{disabled:!g,onClick:s,color:"warning",children:i.jsx(bc,{})})})}),i.jsx(d.Divider,{orientation:"vertical",flexItem:!0}),i.jsx(d.Tooltip,{title:r("copyToClipboard",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:i.jsx(d.Box,{children:i.jsx(d.IconButton,{href:"#",download:`${e}.json`,disabled:!t,onClick:f(t),children:i.jsx(mc,{})})})}),i.jsx(d.Tooltip,{title:r("downloadJSONFile",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:i.jsx(d.Box,{children:i.jsx(d.IconButton,{href:n(t),download:`${e}.json`,disabled:!t,children:i.jsx(yc,{})})})}),i.jsx(d.Tooltip,{title:C?r("update",{ns:"button"}):r("save",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:i.jsx(d.Box,{children:i.jsx(d.IconButton,{onClick:a,disabled:!t||!b?.baseUrl,children:i.jsx(gc,{})})})}),i.jsxs(d.Dialog,{maxWidth:"xs",fullWidth:!0,open:p,onClose:o,children:[i.jsx(d.DialogTitle,{variant:"h3",children:r("resetTree",{ns:"button"})}),i.jsx(d.DialogContent,{children:i.jsx(d.DialogContentText,{children:r("resetTreeContent",{ns:"modal"})})}),i.jsxs(d.DialogActions,{children:[i.jsx(d.Button,{onClick:o,children:r("close",{ns:"button"})}),i.jsx(d.Button,{variant:"contained",color:"warning",onClick:l,children:r("reset",{ns:"button"})})]})]})]})},wc=({children:e,description:t,open:r,onClose:n,title:a})=>i.jsx(d.Dialog,{open:r,onClose:n,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",maxWidth:"sm",fullWidth:!0,scroll:"paper",children:i.jsxs(d.DialogContent,{sx:{backgroundColor:ne.background,border:`solid 1px ${ne.borderBlue}`,maxHeight:"80vh",overflowY:"auto"},children:[i.jsx(d.Typography,{variant:"h3",pb:2,children:a}),i.jsx(d.Typography,{pb:2,children:t}),e]})}),kc=ge(i.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),$r={container:{display:"flex",flexDirection:"column",height:"100%",margin:1},main:{border:`solid 1px ${ne.borderBlue}`,height:" 100%",margin:1},toolbar:{backgroundColor:ne.background,boxShadow:"none",display:"flex",padding:"0 ! important"},toolbarBox:{backgroundColor:ne.tertiary,border:`solid 1px ${ne.primary}`,margin:1,paddingX:2,paddingY:1,width:"100%"}},Ec=({children:e,appear:t,in:r,onEnter:n,onExited:a,onFocus:o,role:s,tabIndex:l,timeout:f},p)=>i.jsx(d.Slide,{direction:"up",ref:p,appear:t,in:r,onEnter:n,onExited:a,onFocus:o,role:s,tabIndex:l,timeout:f,children:e}),jc=S.forwardRef(Ec),Sc=({children:e,open:t,onClose:r,title:n})=>i.jsx(d.Dialog,{PaperProps:{sx:{backgroundColor:ne.background,backgroundImage:"none"}},open:t,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",fullScreen:!0,TransitionComponent:jc,children:i.jsxs(d.Box,{sx:$r.container,children:[i.jsx(d.AppBar,{position:"sticky",elevation:0,children:i.jsx(d.Toolbar,{sx:$r.toolbar,children:i.jsxs(d.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:$r.toolbarBox,children:[i.jsx(d.Typography,{variant:"h5",children:i.jsx("strong",{children:n})}),i.jsx(d.IconButton,{edge:"end",color:"inherit",onClick:r,"aria-label":"close",children:i.jsx(kc,{})})]})})}),i.jsx(d.Box,{sx:$r.main,children:e})]})}),Pc={box:{border:`solid 1px ${ne.borderBlue}`,flexGrow:0}},Ac=({children:e})=>i.jsx(d.Box,{p:2,role:"group",sx:Pc.box,children:e}),Oc={box:{border:`solid 1px ${ne.borderBlue}`,flexGrow:0}},Rc=({children:e})=>i.jsx(d.Box,{sx:Oc.box,padding:2,component:"header",children:e}),$c={box:{border:`solid 1px ${ne.borderBlue}`,flexGrow:1}},_c=({children:e})=>i.jsx(d.Box,{sx:$c.box,component:"main",role:"tree",children:e}),Ga={stack:{width:"100%"}},Mc=({children:e})=>{const t=S.Children.toArray(e);return i.jsxs(d.Grid,{container:!0,padding:1,flexWrap:"nowrap",height:"100%",role:"treegrid",children:[i.jsx(d.Grid,{size:{xs:9},padding:1,display:"flex",children:i.jsxs(d.Stack,{sx:Ga.stack,spacing:2,children:[t[0],t[1]]})}),i.jsx(d.Grid,{size:{xs:3},padding:1,display:"flex",children:i.jsxs(d.Stack,{sx:Ga.stack,spacing:2,children:[t[2],t[3]]})})]})},Dc={box:{border:`solid 1px ${ne.borderBlue}`,flexGrow:1,overflow:"auto"}},Ic=({children:e})=>i.jsx(d.Box,{sx:Dc.box,component:"aside",children:e}),Nc=()=>{const{dispatchTree:e,setModalOpen:t,currentHierarchyPointNode:r,treePath:n}=ye();return{handleSubmit:o=>{o.preventDefault();const s=r?.data?.uuid||"",l=n?.at(-1)?.path||"";e(zo(l,s)),t(null)}}},Fc=({onClose:e})=>{const{t}=we.useTranslation(),{handleSubmit:r}=Nc();return i.jsx("form",{onSubmit:r,children:i.jsxs(d.Stack,{spacing:2,direction:"row",justifyContent:"flex-end",children:[i.jsx(d.Button,{variant:"text",onClick:e,children:t("cancel")}),i.jsx(d.Button,{variant:"contained",color:"error",type:"submit",children:t("remove")})]})})},Ka=ge(i.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m4 11h-3v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H8c-.55 0-1-.45-1-1s.45-1 1-1h3V8c0-.55.45-1 1-1s1 .45 1 1v3h3c.55 0 1 .45 1 1s-.45 1-1 1"}),"AddCircleRounded"),Bc=ge(i.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),Lc=ge(i.jsx("path",{d:"M17 7h-3c-.55 0-1 .45-1 1s.45 1 1 1h3c1.65 0 3 1.35 3 3s-1.35 3-3 3h-3c-.55 0-1 .45-1 1s.45 1 1 1h3c2.76 0 5-2.24 5-5s-2.24-5-5-5m-9 5c0 .55.45 1 1 1h6c.55 0 1-.45 1-1s-.45-1-1-1H9c-.55 0-1 .45-1 1m2 3H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h3c.55 0 1-.45 1-1s-.45-1-1-1H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h3c.55 0 1-.45 1-1s-.45-1-1-1"}),"LinkRounded"),Vc=ge(i.jsx("path",{d:"M7.92 7.54c-.8-.34-1.14-1.33-.66-2.05C8.23 4.05 9.85 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.15.27-.24.49-.3.94-.09.73-.69 1.3-1.43 1.3-.87 0-1.58-.75-1.48-1.62.06-.51.18-1.04.46-1.54.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.17 0-1.93.61-2.4 1.34-.35.57-1.08.75-1.69.5M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMarkRounded"),zc=ge(i.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m4 11H8c-.55 0-1-.45-1-1s.45-1 1-1h8c.55 0 1 .45 1 1s-.45 1-1 1"}),"RemoveCircleRounded"),mn={address:{city:"Paris",countryCode:"FR",route:"Rue Saint-Sabin",streetNumber:"6",zipcode:"75011"},entityId:"0",id:"0",internalCode:"B11X.PE0138",name:"worksite-0"},Ja=(e,t=new Set)=>(Object.keys(e).forEach(r=>{t.add(r);const n=e[r];n!==null&&typeof n=="object"&&Ja(n,t)}),Array.from(t)),Qa=(e,t,r="")=>{let n=null;return Object.keys(e).some(a=>{const o=r?`${r}.${a}`:a;if(a===t)return n=o,!0;const s=e[a];if(s!==null&&typeof s=="object"){const l=Qa(s,t,o);if(l)return n=l,!0}return!1}),n},qc=()=>{const[e,t]=S.useState(""),[r,n]=S.useState(""),a=Ja(mn),o=s=>{const l=s.target.value;t(l);const f=Qa(mn,l);n(f||"")};return i.jsx(d.Card,{children:i.jsx(d.CardContent,{children:i.jsxs(d.Stack,{spacing:1,children:[i.jsx(d.Typography,{variant:"h6",children:"🔑 Pick a key"}),i.jsxs(d.FormControl,{fullWidth:!0,children:[i.jsx(d.InputLabel,{children:"Choisir une clé"}),i.jsx(d.Select,{value:e,label:"Choisir une clé",onChange:o,children:a.map(s=>i.jsx(d.MenuItem,{value:s,children:s},s))})]}),i.jsx(d.Typography,{variant:"h6",children:"Map to value desired 🔑"}),i.jsx(d.TextField,{label:"Chemin complet",variant:"outlined",value:r}),i.jsx(d.Typography,{variant:"h6",children:"API model example:"}),i.jsx(d.Box,{component:"pre",sx:{borderRadius:2},children:JSON.stringify(mn,null,2)})]})})})},Hc=["address","dynamicSelect","autocomplete"],Wc=({onChange:e,value:t,ancestorName:r,displayTopDivider:n,currentType:a})=>{const{t:o}=we.useTranslation(["form"]),{tree:s}=ye(),f=tr(s,t?.uuid||"")?.attributes?.type||"",[p,m]=S.useState(!1),[b,g]=S.useState(!1),{sourceValue:C}=t||{},y=v=>{const k=v.target.value;e?.(k)},c=()=>a==="address"?i.jsxs(d.Alert,{severity:"warning",variant:"outlined",children:[i.jsx(d.Typography,{variant:"subtitle2",gutterBottom:!0,children:o("addressStructureHint")}),i.jsx(d.Box,{component:"pre",sx:{borderRadius:2,p:2},children:JSON.stringify({city:"string",country:"string",postalCode:"string",state:"string",street:"string"},null,2)})]}):a==="dynamicSelect"?i.jsx(d.Alert,{severity:"warning",variant:"outlined",children:i.jsx(d.Typography,{variant:"subtitle2",gutterBottom:!0,children:o("dynamicSelectStructureHint")})}):a==="select"||f==="radio"?i.jsx(d.Alert,{severity:"warning",variant:"outlined",children:i.jsx(d.Typography,{variant:"subtitle2",gutterBottom:!0,children:o("selectStructureHint")})}):null;return i.jsx(d.Grid,{container:!0,children:i.jsxs(d.Grid,{size:12,pt:2,children:[n&&i.jsx(d.Divider,{sx:{my:2}}),i.jsx(d.Typography,{variant:"h5",gutterBottom:!0,children:o("ancestorValue",{ancestorName:r})}),i.jsxs(d.Typography,{color:"text.secondary",sx:{mb:2},children:["Input type: ",i.jsx("strong",{children:f})]}),Hc.includes(f||"")&&i.jsxs(d.Box,{component:"section",sx:{display:"flex",flexDirection:"column",gap:3},children:[i.jsxs(d.Stack,{spacing:1,children:[i.jsx(d.Typography,{children:o("mapObject")}),i.jsx(d.TextField,{fullWidth:!0,label:o("keyPathObject"),value:C??"",onChange:y})]}),i.jsx(d.FormControlLabel,{control:i.jsx(d.IconButton,{onClick:()=>m(v=>!v),sx:{transform:p?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s"},children:i.jsx(kn.KeyboardArrowDown,{})}),label:o("objectDemo")}),i.jsx(d.Collapse,{in:p,children:i.jsx(d.Box,{mt:1,children:i.jsx(qc,{})})}),i.jsxs(d.Typography,{children:["Output type: ",i.jsx("strong",{children:a})]}),c()]}),["text","number","email","tel","url","switch","checkbox","radio","select","date"].includes(f||"")&&i.jsxs(d.Box,{component:"section",sx:{display:"flex",flexDirection:"column",gap:3},children:[i.jsx(d.Typography,{variant:"body2",children:o("staticValueDescription")}),!["switch","checkbox"].includes(f||"")&&i.jsx(d.TextField,{fullWidth:!0,label:o("staticValue"),value:C??"",onChange:y}),["switch","checkbox"].includes(f||"")&&i.jsx(d.FormControlLabel,{control:i.jsx(d.Checkbox,{checked:b,onChange:v=>{const{checked:k}=v.target;g(k),e?.(k?String(k):void 0)}}),label:o("staticValue")}),c()]})]})})},Uc=ge(i.jsx("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1"}),"AddRounded"),Yc=e=>{const{backendConfig:t}=ye(),{endpoints:r}=t||{},{workflows:n=""}=r||{};return ft.useQuery({queryFn:async({signal:a})=>{const{data:o}=await pt.get(n,{signal:a});return o},queryKey:["workflows"],...e})},Gc=({isControlled:e,fetchWorkflowsOnOpen:t})=>{const{t:r}=we.useTranslation("snackMessage"),{openSnackbar:n}=d.useSnackbar(),{currentTree:a,setCurrentTree:o,dispatchTree:s}=ye(),[l,f]=S.useState(""),p=!!l&&!e&&l!==a.id,{data:m,isError:b}=nr(l,{enabled:p}),{data:g,isLoading:C,refetch:y}=Yc({enabled:!t}),c=S.useCallback(async({target:k})=>{const{value:O}=k;if(O==="add-new-tree"){f(""),o({name:""}),s(Rn());return}f(O),o({id:O,name:g?.find(j=>j.id===O)?.label})},[s,o,g]),v=S.useCallback(async()=>{if(t)try{await y(),a.id&&!l&&f(a.id)}catch{n({message:r("error.fetchTree",{ns:"snackMessage"}),severity:"error"})}},[t,y,a.id,l,n,r]);return S.useEffect(()=>{if(m&&l!==a.id){const{id:k,label:O,workflow:j}=m;o({id:k,name:O}),s(Nr(j))}},[a.id,s,e,o,l,m]),S.useEffect(()=>{b&&n({message:r("error.fetchTree",{ns:"snackMessage"}),severity:"error"})},[b,n,r]),{currentTree:a,fetchWorkflowSuggestions:y,handleChangeTree:c,handleOnOpen:v,setTreeSelected:f,treeSelected:l,workflowsSuggestions:g,workflowsSuggestionsLoading:C}},Xa={formControl:{flex:1},select:{".MuiOutlinedInput-notchedOutline":{border:0,paddingLeft:5},".MuiSelect-select":{opacity:0,width:0},boxShadow:"none"}},Za=({arrowOnly:e,required:t,size:r,showBtnAddNewTree:n,onChange:a,value:o,fetchWorkflowsOnOpen:s})=>{const{t:l}=we.useTranslation("form"),f=S.useMemo(()=>!!a,[a]),{handleChangeTree:p,handleOnOpen:m,workflowsSuggestions:b,workflowsSuggestionsLoading:g,treeSelected:C}=Gc({fetchWorkflowsOnOpen:s,isControlled:f});return i.jsxs(d.FormControl,{size:r,required:t,sx:Xa.formControl,children:[!e&&i.jsx(d.InputLabel,{children:l("tree",{ns:"form"})}),i.jsxs(d.Select,{value:f?o:C,id:"tree-select",onChange:y=>f?a?.(y):p(y),sx:e?Xa.select:void 0,label:l("tree",{ns:"form"}),onOpen:m,children:[(o&&g||g)&&i.jsx(d.MenuItem,{value:o,children:i.jsx(d.Skeleton,{width:"100%"})}),b?.map(({label:y,id:c})=>i.jsx(d.MenuItem,{value:c,children:y},c)),n&&i.jsx(d.MenuItem,{disabled:!0,children:i.jsx(d.Box,{sx:{height:1,width:"100%"},children:i.jsx(d.Divider,{})})}),n&&i.jsxs(d.MenuItem,{value:"add-new-tree",children:[i.jsx(d.Typography,{mr:1,children:l("newTree",{ns:"form"})}),i.jsx(Uc,{color:"primary"})]})]})]})},Kc=({id:e,helperText:t,hiddenValue:r,isHiddenField:n,isTreeField:a,treeSelected:o,handleChangeTreeSelect:s,handleChangeHelperText:l,handleChangeHiddenValue:f})=>{const{t:p}=we.useTranslation(["translation","form"]);return a?i.jsx(Za,{required:!0,value:o,onChange:s}):n?i.jsx(d.TextField,{required:!0,size:"small",id:e,sx:{flex:1},label:p("hiddenValue",{ns:"form"}),onChange:f,value:r}):i.jsx(d.TextField,{sx:{flex:1},label:p("helperText",{ns:"form"}),size:"small",onChange:l,value:t})},et=[{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"text"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"number"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"email"},{isBooleanField:!1,isDecisionField:!1,isMultiple:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"file"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"password"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"tel"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"address"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"url"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"date"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"dateRange"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"time"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"timeRange"},{isBooleanField:!0,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"switch"},{isBooleanField:!0,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"checkbox"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"hidden"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"tree"},{isBooleanField:!1,isDecisionField:!0,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!1,type:"radio"},{isBooleanField:!1,isDecisionField:!0,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!1,type:"select"},{initialQueryEnable:!0,isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!1,type:"autocomplete"},{isBooleanField:!1,isDecisionField:!1,isMultiple:!1,isPatternEnabled:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"dynamicSelect"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"title"}],Jc=()=>{const e=Date.now(),t=performance.now();return`${e}${Math.random().toString(36).substring(2,9)}${t}`},Qc=({setIsLarge:e})=>{const r=S.useRef(Jc()).current,n=S.useMemo(()=>[{id:"0",label:"",message:"",value:""}],[]),{dispatchTree:a,currentHierarchyPointNode:o,modalOpen:s,treePath:l,setModalOpen:f,tree:p}=ye(),{openSnackbar:m}=d.useSnackbar(),{t:b}=we.useTranslation(["translation","form"]),g=o?.data&&o?.data?.attributes&&"isMultiple"in o.data.attributes?!!o.data.attributes.isMultiple:null,[C,y]=S.useState(n),[c,v]=S.useState(""),[k,O]=S.useState(""),[j,P]=S.useState(""),[T,I]=S.useState(!1),[$,G]=S.useState(!1),[H,u]=S.useState(!1),[R,Y]=S.useState(!1),[B,he]=S.useState("text"),[se,ue]=S.useState(null),[ve,je]=S.useState(void 0),[Re,h]=S.useState(""),[w,_]=S.useState(""),[M,N]=S.useState({off:"",on:""}),[L,z]=S.useState(!1),[q,F]=S.useState(!1),[W,U]=S.useState(""),[de,A]=S.useState(""),[Se,Fe]=S.useState(void 0),[lt,ct]=S.useState(""),[Et,gn]=S.useState(!1),jt=B==="tree",Ht=B==="hidden",tt=B==="autocomplete",Wt=B==="dateRange",St=B==="dynamicSelect",_r=et.some(E=>E.type===B&&E?.isBooleanField),ut=et.some(E=>E.type===B&&E?.isDecisionField),yn=et.some(E=>E.type===B&&E?.isRequiredDisabled),xn=et.some(E=>E.type===B&&E?.isRepeatableDisabled),Mr=et.some(E=>E.type===B&&E?.isPatternEnabled),Ut=et.some(E=>E.type===B&&"isMultiple"in E),rt=s==="edit",Ke=o?.data?.uuid||"",nt=ht(p,l?.at(-1)?.path),Yt=Bo(nt,Ke,!rt&&!!Ke?void 0:Ke),Cn=S.useMemo(()=>Yt.map(({name:E})=>E||""),[Yt]),Gt=S.useCallback(E=>!ut&&E>0,[ut]),Tn=!!Cn.length,Kt=tt||St||!!lt,{refetch:Dr,isLoading:wn}=nr(Re,{enabled:!1}),Jt=S.useMemo(()=>[{label:b("form:number"),value:"^\\d+$"},{label:b("form:letter"),value:"^[A-Za-zÀ-ÖØ-öø-ÿ' -]+$"},{label:b("form:numberAndLetter"),value:"^[A-Za-z0-9]+$"},{label:b("form:cardNumber"),value:"^\\d{16}$"},{label:b("form:type.date"),value:"\\d{4}-\\d{2}-\\d{2}"}],[b]),le=S.useCallback(E=>D=>{y(V=>V.map(ee=>{const{id:me}=ee;return D.target.dataset.id===me?{...ee,id:me,[E]:D.target.value}:{...ee}}))},[]),Qt=S.useCallback((E,D)=>{typeof D=="string"?ue(D):D&&D.inputValue?ue(D.inputValue):ue(null)},[]),Ne=S.useCallback(({target:E})=>{v(E.value)},[]),Xt=S.useCallback(({target:E})=>{O(E.value)},[]),Zt=S.useCallback(({target:E})=>{P(E.value)},[]),Pt=S.useCallback(({target:E})=>{const D=E.value;je(V=>({...V,url:D}))},[]),Be=S.useCallback(({target:E})=>{je(D=>{const{searchKey:V,...ee}=D??{},{value:me}=E;return me===""?Object.keys(ee).length>0?ee:void 0:{...ee,searchKey:me}})},[]),Ir=S.useCallback((E,D)=>{je(V=>{const ee=V??{},ie={...ee.pathKey??{},[E]:D.target.value};if(D.target.value===""&&E in ie){const{pathKey:Ae,...Je}=ee;return Object.keys(Je).length>0?Je:void 0}return{...ee,pathKey:ie}})},[]),Ou=S.useCallback((E,D,V)=>{je(ee=>{const me=ee??{},ie=[...me.params??[]],Ae={...ie[E]??{}};if(V===""||V===!1?delete Ae[D]:Ae[D]=V,Object.values(Ae).every(at=>at===""||at===!1||at===void 0)?ie.splice(E,1):ie[E]=Ae,ie.length===0){const{params:at,...dt}=me;return Object.keys(dt).length>0?dt:void 0}return{...me,params:ie}})},[]),Ru=(E,D)=>{U(D)},$u=({target:E})=>{A(E.value)},_u=({target:E})=>{Y(E.checked)},Mu=({target:E})=>{G(E.checked)},Du=({target:E})=>{F(E.checked)},Iu=({target:E})=>{u(E.checked)},Nu=({target:E})=>{I(E.checked)},Fu=({target:E})=>{z(E.checked)},Bu=(E,D)=>{he(D.type),u(!1),G(!1),z(!1),I(!1)},Lu=({target:E})=>{h(E.value)},Vu=E=>({target:D})=>{N(V=>({...V,[E]:D.value}))},zu=({target:E})=>{_(E.value)},qu=S.useCallback(()=>{y(E=>{const D=Number(E[E.length-1].id),V=String(D+1);return[...E,{...n[0],id:V}]})},[n]),Hu=()=>{je(E=>{const D=E??{},V=[...D.params??[]],ee=Number(V[V.length-1]?.id||0),me=String(ee+1),ie=[...V,{id:me,key:""}];return{...D,params:ie}})},Wu=({currentTarget:E})=>{y(D=>D.filter(({id:V})=>E.value!==V))},Uu=E=>{const D=E.currentTarget.value;je(V=>{const ee=V??{},ie=(ee.params??[]).filter(({id:Je})=>Je!==D),Ae=ie.length>0?ie:void 0;return{...ee,params:Ae}})},so=S.useCallback((E,D)=>{const V=E?.children?.[D]?.data?.children;return V?V.map(({uuid:ee,attributes:me,children:ie})=>({attributes:me,children:ie,uuid:ee})):[]},[]),lo=S.useCallback(E=>H?C?.filter((D,V)=>!Gt(V))?.map(({message:D,value:V,label:ee},me)=>{const ie=`${r}:${V}`,Ae=so(o,me);return{attributes:{depth:E+1,label:ee,name:`${j}:${V}`,value:V,...D&&{message:D},...Ae.length===0&&{isLeaf:!0}},children:Ae,uuid:ie}}):[],[o,Gt,so,H,j,r,C]),co=S.useCallback(E=>E.map(({message:D,...V})=>({...V,...D&&{message:D}})),[]),uo=S.useCallback((E,D,V)=>{if(E&&(!D||V))try{return Dr()}catch{m({message:b("error.fetchTree",{ns:"snackMessage"}),severity:"error"})}return E&&D&&!V?{data:{workflow:o?.data.attributes?.tree},isError:null}:{data:null,isError:null}},[o?.data.attributes?.tree,Dr,m,b]),Yu=E=>{Fe(D=>{const V={...D??{}};return E?V.sourceValue=E:delete V.sourceValue,Object.keys(V).length>0?V:void 0})},Gu=(E,D)=>{Fe(V=>{const ee={...V??{}};return E?ee.uuid=E:delete ee.uuid,Object.keys(ee).length>0?ee:void 0}),ct(D)},Ku=S.useCallback(async E=>{E.preventDefault();const{on:D,off:V}=M,me=(o?.depth||0)+(rt||o===null?0:1),ie=lo(me),Ae=l?.at(-1)?.path,Je=l.length?`${Ae}/${r}`:`/${r}`,at=o?.data.attributes?.tree?.treeId!==Re,{data:dt,isError:Ju}=await uo(jt,rt,at);if(Ju)return;const fo={attributes:{depth:me,name:j,type:B,...k&&{label:k},...tt&&{route:ve},...St&&{route:ve},...w&&{helperText:w},...H&&{isDecision:H},...$&&{required:$},...T&&Wt&&{isDisabledPast:T},...L&&{repeatable:L},...Ht&&{hiddenValue:c},...se&&{tag:se},...R&&Ut&&{isMultiple:R},...q&&{initialQuery:q},...ut&&!H&&{values:co(C)},...(V||D)&&{messages:{...V&&{off:V},...D&&{on:D}}},...W&&{pattern:typeof W=="object"?W.value:W},...de&&{patternMessage:de},...Se&&{defaultValueFromAncestor:Se},...jt&&{tree:{...dt?.workflow,treeId:Re},treePath:Je}},children:ie,uuid:rt?Ke:r};a(rt?Vo(Ae||"",Ke,fo):Lo(Ae||null,Ke,fo)),f(null)},[rt,o,Ke,Se,a,lo,co,uo,w,c,q,tt,Wt,H,ut,T,St,Ht,R,Ut,jt,k,M,j,W,de,L,$,ve,f,se,l,Re,B,r,C]);return S.useEffect(()=>{if(s==="edit"){const D=o?.data?.attributes?.values||o?.data?.children?.filter(({attributes:ie})=>!ie?.type)?.map(({attributes:ie},Ae)=>{const{label:Je,value:at,message:dt}=ie||{};return{id:String(Ae),label:String(Je),value:String(at),...dt&&{message:String(dt)}}}),V=o?.data?.attributes?.defaultValueFromAncestor?.uuid,me=(V?tr(nt,V):void 0)?.attributes?.name;ct(me),Fe(o?.data?.attributes?.defaultValueFromAncestor||void 0),ue(o?.data.attributes?.tag||null),he(o?.data.attributes?.type||"text"),_(o?.data.attributes?.helperText||""),G(o?.data.attributes?.required||!1),I(o?.data.attributes?.isDisabledPast||!1),O(o?.data.attributes?.label||""),P(o?.data.attributes?.name||""),u(o?.data.attributes?.isDecision||!1),y(D?.length?D:n),h(o?.data.attributes?.tree?.treeId||""),z(o?.data.attributes?.repeatable||!1),v(o?.data.attributes?.hiddenValue||""),U(Jt.find(({value:ie})=>ie===o?.data.attributes?.pattern)||o?.data.attributes?.pattern||""),A(o?.data.attributes?.patternMessage||""),N({off:o?.data.attributes?.messages?.off||"",on:o?.data.attributes?.messages?.on||""}),je(ie=>({...ie,params:o?.data.attributes?.route?.params,pathKey:o?.data.attributes?.route?.pathKey,searchKey:o?.data.attributes?.route?.searchKey,url:o?.data.attributes?.route?.url||""})),Y(g||!1),F(o?.data.attributes?.initialQuery||!1),Fe(o?.data?.attributes?.defaultValueFromAncestor||void 0)}},[o?.data.attributes?.defaultValueFromAncestor,o?.data.attributes?.helperText,o?.data.attributes?.hiddenValue,o?.data.attributes?.initialQuery,o?.data.attributes?.isDecision,o?.data.attributes?.isDisabledPast,o?.data.attributes?.label,o?.data.attributes?.messages?.off,o?.data.attributes?.messages?.on,o?.data.attributes?.name,o?.data.attributes?.pattern,o?.data.attributes?.patternMessage,o?.data.attributes?.repeatable,o?.data.attributes?.required,o?.data.attributes?.route?.params,o?.data.attributes?.route?.pathKey,o?.data.attributes?.route?.searchKey,o?.data.attributes?.route?.url,o?.data.attributes?.tag,o?.data.attributes?.tree?.treeId,o?.data.attributes?.type,o?.data.attributes?.values,o?.data?.children,nt,n,g,s,Jt]),S.useEffect(()=>{e&&e(Kt)},[Kt,e]),{ancestors:Yt,collapseOptions:Et,currentTree:nt,defaultValueFromAncestor:Se,getDisabledValueField:Gt,handleAddParams:Hu,handleAddValue:qu,handleAncestorRef:Gu,handleChangeHelperText:zu,handleChangeHiddenValue:Ne,handleChangeInitialQuery:Du,handleChangeIsDecisionField:Iu,handleChangeIsDisabledPast:Nu,handleChangeLabel:Xt,handleChangeMessage:Vu,handleChangeMultiple:_u,handleChangeName:Zt,handleChangeParam:Ou,handleChangePath:Ir,handleChangePattern:Ru,handleChangePatternMessage:$u,handleChangeRepeatable:Fu,handleChangeRequired:Mu,handleChangeSearchKey:Be,handleChangeTag:Qt,handleChangeTreeSelect:Lu,handleChangeType:Bu,handleChangeUrlSelect:Pt,handleDeleteParam:Uu,handleDeleteValue:Wu,handlePresetValues:le,handleSubmit:Ku,handleValueFromAncestor:Yu,hasAncestors:Tn,helperText:w,hiddenValue:c,initialQuery:q,isAutocomplete:tt,isBooleanField:_r,isDateRangePicker:Wt,isDecision:H,isDecisionField:ut,isDisabledPast:T,isDynamicSelect:St,isHiddenField:Ht,isLargeView:Kt,isMultiple:R,isMultiplePossible:Ut,isPatternEnabled:Mr,isRepeatableDisabled:xn,isRequiredDisabled:yn,isTreeField:jt,isWorkflowLoading:wn,label:k,messages:M,name:j,pattern:W,patternMessage:de,patternOptions:Jt,repeatable:L,required:$,route:ve,selectAncestorName:lt,setCollapseOptions:gn,tag:se,treeSelected:Re,type:B,uuid:r,values:C}},Xc=({onChange:e,id:t,value:r,ancestors:n})=>{const{t:a}=we.useTranslation(["form"]),{tree:o,currentHierarchyPointNode:s}=ye(),{uuid:l}=s?.data||{},f=`label-${t}`;if(!o||!l)return null;const p=m=>{const{value:b}=m.target,C=n.find(y=>y.name===b)?.uuid;e?.(C,b)};return i.jsxs(d.Stack,{spacing:1,pb:2,pt:3,children:[i.jsxs(d.InputLabel,{id:f,children:[" ",a("receiveValueFromParent")]}),i.jsxs(d.Select,{id:t,labelId:f,variant:"outlined",size:"xSmall",value:r||"",onChange:p,MenuProps:{PaperProps:{sx:{maxHeight:300}}},children:[n.length&&i.jsx(d.MenuItem,{value:"",children:" "}),n.length?n.map(({name:m})=>i.jsx(d.MenuItem,{value:m,children:m},`${m}-${l}`)):i.jsx(d.MenuItem,{disabled:!0,value:"",children:a("form:noAncestorFound")})]})]})},Zc=e=>{const{backendConfig:t}=ye(),r=et.filter(a=>!(a.type==="tree"&&!t?.baseUrl))||[];return{currentValue:r.find(a=>a.type===e)||et[0],options:r}},eu=({id:e,onChange:t,value:r,sx:n})=>{const{t:a}=we.useTranslation(["translation","form"]),{currentValue:o,options:s}=Zc(r);return i.jsx(d.Autocomplete,{disableClearable:!0,fullWidth:!0,size:"small",id:e,sx:n,options:s,value:o,onChange:t,getOptionLabel:l=>a(`form:type.${l.type}`),renderInput:l=>i.jsx(d.TextField,{...l,required:!0,size:"small",label:a("type")}),renderOption:(l,f)=>{const{key:p,...m}=l;return i.jsxs(d.MenuItem,{...m,children:[a(`form:type.${f.type}`),f.isDecisionField&&i.jsx(d.Chip,{label:a("decisionField",{ns:"form"}),size:"small",color:"info",sx:{marginLeft:1}})]},p)}})},tu=e=>{if(!e)return[];const t=new Set,r=n=>{if(n?.attributes?.tag&&t.add(n.attributes.tag),n?.children?.length){const{children:a}=n;for(let o=0;o<a.length;o+=1)r(a[o])}};return r(e),[...t]},ru=d.createFilterOptions(),nu=({id:e,value:t,onChange:r})=>{const{t:n}=we.useTranslation(["translation","form"]),{tree:a}=ye(),o=tu(a).reduce((s,l)=>[...s,{inputValue:l,label:l}],[]);return i.jsx(d.Autocomplete,{freeSolo:!0,fullWidth:!0,id:e,sx:{flex:1},size:"small",value:t,onChange:r,filterOptions:(s,l)=>{const f=ru(s,l),{inputValue:p}=l,m=s.some(b=>typeof b!="string"&&p===b.label);return p!==""&&!m&&f.push({inputValue:p,label:`${n("add")} "${p}"`}),f},getOptionLabel:s=>typeof s=="string"?s:s.inputValue?s.inputValue:s.label,renderOption:(s,l)=>i.jsx("li",{...s,children:typeof l!="string"&&l.label}),renderInput:s=>i.jsx(d.TextField,{...s,label:n("tag")}),options:o})},eo={marginRight:"-20px !important",minWidth:"auto !important"},bn={iconButton:eo,iconButtonDelete:{...eo,"&:before":{borderRadius:"50%",content:'""',height:20,position:"absolute",width:20,zIndex:-1},backgroundColor:ne.background,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)"}},au=({onClose:e,title:t,setIsLarge:r})=>{const{t:n}=we.useTranslation(["translation","form"]),{ancestors:a,hasAncestors:o,patternOptions:s,values:l,required:f,tag:p,type:m,helperText:b,label:g,name:C,hiddenValue:y,isBooleanField:c,isDisabledPast:v,handleChangeIsDisabledPast:k,isDecision:O,isDecisionField:j,isHiddenField:P,isRequiredDisabled:T,isRepeatableDisabled:I,isAutocomplete:$,isDateRangePicker:G,isDynamicSelect:H,isTreeField:u,treeSelected:R,isWorkflowLoading:Y,repeatable:B,isMultiplePossible:he,isPatternEnabled:se,isMultiple:ue,initialQuery:ve,handleChangeTreeSelect:je,handleChangeHelperText:Re,handleChangeRequired:h,handleChangeName:w,handleChangeType:_,handleChangeIsDecisionField:M,handleDeleteValue:N,handleDeleteParam:L,handleChangeMessage:z,handleSubmit:q,handleAddValue:F,handleAddParams:W,handleChangeLabel:U,handleChangeRepeatable:de,handleChangeHiddenValue:A,handleChangeTag:Se,handleChangeSearchKey:Fe,handleChangeUrlSelect:lt,handleChangeParam:ct,handleChangePath:Et,handleChangeMultiple:gn,handleChangeInitialQuery:jt,route:Ht,handlePresetValues:tt,patternMessage:Wt,pattern:St,handleChangePattern:_r,handleChangePatternMessage:ut,messages:{on:yn,off:xn},isLargeView:Mr,handleValueFromAncestor:Ut,defaultValueFromAncestor:rt,handleAncestorRef:Ke,selectAncestorName:nt,collapseOptions:vn,setCollapseOptions:io}=Qc({setIsLarge:r}),{searchKey:Yt,url:Cn,pathKey:Gt,params:Tn}=Ht||{},{object:Kt="",label:Dr="",value:wn="",image:Jt=""}=Gt||{};return i.jsx(d.Box,{component:"form",onSubmit:q,children:i.jsxs(d.Grid,{container:!0,height:600,children:[i.jsxs(d.Grid,{size:Mr?6:12,sx:{display:"flex",flexDirection:"column",height:"100%"},children:[i.jsxs(d.DialogContent,{children:[i.jsx(d.Typography,{variant:"h3",pb:2,children:t}),i.jsx(eu,{id:"type",value:m,onChange:_,sx:{marginBottom:1}}),i.jsxs(d.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[i.jsx(d.TextField,{autoComplete:"off",id:"name",label:n("name"),sx:{flex:1},onChange:w,value:C,size:"small",required:!0}),i.jsx(d.TextField,{id:"label",sx:{flex:1},label:n("label",{ns:"form"}),onChange:U,value:g,size:"small"})]}),i.jsxs(d.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[m!=="title"&&i.jsx(nu,{id:"tag",value:p,onChange:Se}),i.jsx(Kc,{id:"helperText",helperText:b,hiddenValue:y,isHiddenField:P,isTreeField:u,treeSelected:R,handleChangeTreeSelect:je,handleChangeHelperText:Re,handleChangeHiddenValue:A})]}),se&&i.jsxs(d.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[i.jsx(d.Autocomplete,{freeSolo:!0,id:"autoCompletePatternMessage",size:"small",sx:{flex:1},onChange:_r,onInputChange:_r,value:St,options:s,renderInput:le=>i.jsx(d.TextField,{...le,label:n("form:pattern")})}),i.jsx(d.TextField,{id:"patternMessageText",label:n("form:patternMessage"),sx:{flex:1},onChange:ut,value:Wt,size:"small"})]}),c&&i.jsxs(d.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[i.jsx(d.TextField,{id:"onMessage",size:"small",sx:{flex:1},label:n("onMessage",{ns:"form"}),onChange:z("on"),value:yn}),i.jsx(d.TextField,{id:"offMessage",size:"small",sx:{flex:1},label:n("offMessage",{ns:"form"}),onChange:z("off"),value:xn})]}),i.jsx(d.Stack,{paddingY:1,children:i.jsxs(d.FormGroup,{row:!0,children:[he&&i.jsx(d.FormControlLabel,{control:i.jsx(d.Checkbox,{checked:ue,onChange:gn}),label:n("multiple")}),$&&i.jsx(d.FormControlLabel,{control:i.jsx(d.Checkbox,{id:"isInitialQuery",checked:ve,onChange:jt}),label:n("initialQueryEnable")}),i.jsx(d.FormControlLabel,{disabled:T,control:i.jsx(d.Checkbox,{id:"isRequired",checked:f,onChange:h}),label:n("required")}),i.jsx(d.FormControlLabel,{disabled:I,control:i.jsx(d.Checkbox,{id:"isRepeatable",checked:B,onChange:de}),label:n("repeatable",{ns:"form"})}),j&&i.jsx(d.FormControlLabel,{control:i.jsx(d.Checkbox,{id:"isDecision",checked:O,onChange:M}),label:n("decisionField",{ns:"form"})}),G&&i.jsx(d.FormControlLabel,{control:i.jsx(d.Checkbox,{id:"disabledPast",checked:v,onChange:k}),label:n("disabledPast",{ns:"form"})})]})}),j&&i.jsxs(i.Fragment,{children:[i.jsx(d.Typography,{variant:"h4",children:n("values")}),l?.map(({value:le,label:Qt,id:Ne,message:Xt})=>i.jsxs(d.Stack,{direction:{sm:"row",xs:"column"},spacing:1,paddingY:1,position:"relative",children:[i.jsx(d.TextField,{id:`decision-label-${Ne}`,label:n("label",{ns:"form"}),size:"small",sx:{flex:1},onChange:tt("label"),value:Qt,inputProps:{"data-id":Ne},required:!0}),i.jsx(d.TextField,{id:`decision-value-${Ne}`,label:n("value",{ns:"form"}),size:"small",sx:{flex:1},onChange:tt("value"),value:le,inputProps:{"data-id":Ne},required:!0}),i.jsx(d.TextField,{id:`decision-message-${Ne}`,label:n("message",{ns:"form"}),size:"small",sx:{flex:1},onChange:tt("message"),value:Xt,inputProps:{"data-id":Ne}}),l.length>1&&i.jsx(d.IconButton,{color:"warning",sx:bn.iconButtonDelete,value:Ne,onClick:N,children:i.jsx(zc,{})})]},Ne))]}),j&&i.jsx(d.Box,{justifyContent:"flex-end",display:"flex",children:i.jsx(d.IconButton,{color:"success",sx:bn.iconButton,onClick:F,children:i.jsx(Ka,{})})}),o&&i.jsx(Xc,{id:"receive-value",onChange:Ke,value:nt,ancestors:a})]}),i.jsxs(d.DialogActions,{children:[i.jsx(d.Button,{variant:"text",onClick:e,children:n("cancel")}),i.jsx(d.Button,{variant:"contained",type:"submit",disabled:Y,isLoading:Y,loadingIndicator:i.jsx(d.CircularProgress,{size:14}),children:n("validate")})]})]}),Mr&&i.jsx(d.Grid,{size:6,maxHeight:600,sx:{display:"flex"},children:i.jsxs(d.DialogContent,{children:[(H||$)&&i.jsxs(d.Grid,{container:!0,spacing:1,paddingY:1,children:[i.jsx(d.Grid,{size:12,children:i.jsx(d.Typography,{variant:"h5",pb:1,children:n("form:urlConstruction")})}),i.jsx(d.Grid,{size:$?7:12,children:i.jsx(d.TextField,{id:"urlSelect",size:"small",fullWidth:!0,InputProps:{startAdornment:i.jsx(d.InputAdornment,{position:"start",children:i.jsx(Lc,{})})},placeholder:"https://api.com/",type:"url",label:n("form:apiRoute"),onChange:lt,value:Cn||""})}),$&&i.jsx(d.Grid,{size:5,children:i.jsxs(d.Stack,{direction:"row",spacing:1,alignItems:"center",children:[i.jsx(Vc,{}),i.jsx(d.TextField,{id:"searchKey",size:"small",InputLabelProps:{shrink:!0},sx:{flex:1,minWidth:0},placeholder:n("form:searchKeyPlaceholder"),type:"text",label:n("form:key"),onChange:Fe,value:Yt||""})]})})]}),($||H)&&i.jsxs(i.Fragment,{children:[i.jsxs(d.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},position:"relative",alignItems:{sm:"center",xs:"flex-start"},children:[i.jsx(d.Typography,{variant:"h5",children:n("form:additionalParams")}),i.jsx(d.Box,{justifyContent:"flex-end",children:i.jsx(d.IconButton,{color:"success",sx:bn.iconButton,onClick:W,children:i.jsx(Ka,{})})})]}),Tn?.map(({id:le,key:Qt,staticValue:Ne,ancestorUuid:Xt,useAncestorValue:Zt},Pt)=>i.jsx(d.Paper,{elevation:1,sx:{marginY:1},children:i.jsxs(d.Grid,{container:!0,pb:2,justifyContent:"space-between",alignItems:"center",padding:1,spacing:1,children:[i.jsx(d.Grid,{size:6,children:i.jsx(d.Tooltip,{title:Zt?n("form:keyPathApiDescription"):"",children:i.jsx(d.TextField,{id:`param-key-${le}`,label:"Key",size:"small",onChange:({target:Be})=>ct(Pt,"key",Be.value),value:Qt||"",inputProps:{"data-id":le}})})}),i.jsx(d.Grid,{size:6,children:Zt?i.jsx(d.Select,{fullWidth:!0,id:le,variant:"outlined",size:"small",value:Xt||"",onChange:({target:Be})=>ct(Pt,"ancestorUuid",Be.value),MenuProps:{PaperProps:{sx:{maxHeight:300}}},children:a.length?a.map(({name:Be,uuid:Ir})=>i.jsx(d.MenuItem,{value:Ir,children:Be},Ir)):i.jsx(d.MenuItem,{disabled:!0,value:"",children:n("form:noAncestorFound")})}):i.jsx(d.TextField,{id:`param-value-${le}`,label:n("value",{ns:"form"}),size:"small",fullWidth:!0,onChange:({target:Be})=>ct(Pt,"staticValue",Be.value),value:Ne||"",inputProps:{"data-id":le}})}),!!a.length&&i.jsx(d.FormControlLabel,{control:i.jsx(d.Checkbox,{id:`useAncestorAsParam-${le}`,disabled:!a.length,checked:Zt||!1,onChange:({target:Be})=>ct(Pt,"useAncestorValue",Be.checked)}),label:i.jsx(d.Typography,{variant:"body2",color:"textSecondary",children:n("form:useAncestorValueAsParam")})}),i.jsx(d.IconButton,{color:"error",value:le,onClick:L,children:i.jsx(Bc,{})})]},le)},le)),i.jsxs(d.Box,{display:"flex",alignItems:"center",children:[i.jsx(d.IconButton,{"aria-label":n("form:dataMapping"),onClick:()=>io(le=>!le),sx:{transform:vn?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s"},children:i.jsx(kn.KeyboardArrowDown,{})}),i.jsx(d.Typography,{sx:{ml:1},children:n("form:dataMapping")})]}),i.jsx(d.Collapse,{in:vn,children:i.jsxs(d.Stack,{spacing:1,paddingY:1,children:[i.jsxs(d.Stack,{spacing:1,sx:{pb:1},direction:{sm:"row",xs:"column"},alignItems:"center",children:[i.jsx(d.TextField,{id:"objectArrayPath",size:"small",sx:{flex:3},InputLabelProps:{shrink:!0},label:"Object Array Path",value:Kt||"",onChange:le=>Et("object",le),placeholder:"elements.features[]",type:"text"}),i.jsx(d.TextField,{id:"labelPath",size:"small",sx:{flex:3},InputLabelProps:{shrink:!0},label:"Label Path",value:Dr||"",onChange:le=>Et("label",le),placeholder:"client.name",type:"text"})]}),i.jsxs(d.Stack,{spacing:1,direction:{sm:"row",xs:"column"},alignItems:"center",children:[i.jsx(d.TextField,{id:"valuePath",size:"small",sx:{flex:3},InputLabelProps:{shrink:!0},label:"Value Path",value:wn||"",onChange:le=>Et("value",le),placeholder:"client.id",type:"text"}),i.jsx(d.TextField,{id:"imagePath",size:"small",sx:{flex:3},InputLabelProps:{shrink:!0},label:"Image Path",value:Jt||"",onChange:le=>Et("image",le),placeholder:"client.src.profile",type:"text"})]})]})})]}),nt&&i.jsx(Wc,{ancestorName:nt,onChange:Ut,value:rt,displayTopDivider:$||H,currentType:m})]})})]})})},ou=ge(i.jsx("path",{d:"M17 11h3c1.11 0 2-.9 2-2V5c0-1.11-.9-2-2-2h-3c-1.11 0-2 .9-2 2v1H9.01V5c0-1.11-.9-2-2-2H4c-1.1 0-2 .9-2 2v4c0 1.11.9 2 2 2h3c1.11 0 2-.9 2-2V8h2v7.01c0 1.65 1.34 2.99 2.99 2.99H15v1c0 1.11.9 2 2 2h3c1.11 0 2-.9 2-2v-4c0-1.11-.9-2-2-2h-3c-1.11 0-2 .9-2 2v1h-1.01c-.54 0-.99-.45-.99-.99V8h2v1c0 1.1.9 2 2 2"}),"AccountTreeRounded"),iu=ge(i.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-3 10h-3v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H8c-.55 0-1-.45-1-1s.45-1 1-1h3V8c0-.55.45-1 1-1s1 .45 1 1v3h3c.55 0 1 .45 1 1s-.45 1-1 1"}),"AddBoxRounded"),su=ge(i.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2zM9 9h6c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1H9c-.55 0-1-.45-1-1v-8c0-.55.45-1 1-1m6.5-5-.71-.71c-.18-.18-.44-.29-.7-.29H9.91c-.26 0-.52.11-.7.29L8.5 4H6c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1z"}),"DeleteOutlineRounded"),lu=ge(i.jsx("path",{d:"M3 17.46v3.04c0 .28.22.5.5.5h3.04c.13 0 .26-.05.35-.15L17.81 9.94l-3.75-3.75L3.15 17.1q-.15.15-.15.36M20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"EditRounded"),cu=ge(i.jsx("path",{d:"M12 3c-4.8 0-9 3.86-9 9 0 2.12.74 4.07 1.97 5.61l-1.68 1.68c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0l1.68-1.68C7.93 20.26 9.88 21 12 21c2.3 0 4.61-.88 6.36-2.64C20.12 16.61 21 14.3 21 12V5c0-1.1-.9-2-2-2zm3.83 9.26-5.16 4.63c-.16.15-.41.14-.56-.01-.14-.14-.16-.36-.04-.52l2.44-3.33-4.05-.4c-.44-.04-.63-.59-.3-.89l5.16-4.63c.16-.15.41-.14.56.01.14.14.16.36.04.52l-2.44 3.33 4.05.4c.45.04.63.59.3.89"}),"EnergySavingsLeafRounded"),uu=ge([i.jsx("path",{d:"M14.14 12h-.06c.81 0 1.28-.91.82-1.57L9.82 3.17c-.4-.57-1.24-.57-1.64 0L3.1 10.43c-.46.66.01 1.57.82 1.57h-.06L.99 16.46c-.43.66.05 1.54.84 1.54H7v2c0 1.1.9 2 2 2s2-.9 2-2v-2h5.17c.79 0 1.27-.88.84-1.54z"},"0"),i.jsx("path",{d:"M23.01 16.46 20.14 12h-.06c.81 0 1.28-.91.82-1.57l-5.08-7.26c-.4-.57-1.24-.57-1.64 0l-1.57 2.24 3.11 4.44c.43.61.48 1.41.14 2.07-.08.16-.18.3-.3.43l2.29 3.57c.4.62.42 1.4.07 2.04-.01.02-.02.03-.03.04h4.28c.79 0 1.27-.88.84-1.54M13 20c0 1.1.9 2 2 2s2-.9 2-2v-1h-4z"},"1")],"ForestRounded"),du=ge(i.jsx("path",{d:"M12 4V2.21c0-.45-.54-.67-.85-.35l-2.8 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.32.31.86.09.86-.36V6c3.31 0 6 2.69 6 6 0 .79-.15 1.56-.44 2.25-.15.36-.04.77.23 1.04.51.51 1.37.33 1.64-.34.37-.91.57-1.91.57-2.95 0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-.79.15-1.56.44-2.25.15-.36.04-.77-.23-1.04-.51-.51-1.37-.33-1.64.34C4.2 9.96 4 10.96 4 12c0 4.42 3.58 8 8 8v1.79c0 .45.54.67.85.35l2.79-2.79c.2-.2.2-.51 0-.71l-2.79-2.79c-.31-.31-.85-.09-.85.36z"}),"LoopRounded"),fu=ge(i.jsx("path",{d:"M16.96 12h.08c.81 0 1.28-.91.82-1.57l-5.08-7.25c-.4-.57-1.24-.57-1.64 0L6.1 10.43c-.46.66.02 1.57.83 1.57h.04l-2.9 4.46c-.44.66.04 1.54.84 1.54h5.08v2.02c0 1.09.89 1.98 1.98 1.98s1.98-.89 1.98-1.98V18h5.15c.8 0 1.28-.89.83-1.55z"}),"ParkRounded"),pu=ge(i.jsx("path",{d:"M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24M2.71 3.16c-.39.39-.39 1.02 0 1.41l1.97 1.97C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l2.72 2.72c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L4.13 3.16c-.39-.39-1.03-.39-1.42 0M12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5m2.97-5.33c-.15-1.4-1.25-2.49-2.64-2.64z"}),"VisibilityOffRounded"),hu=ge(i.jsx("path",{d:"M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"VisibilityRounded"),to={400:"#8d6e63",700:"#5d4037"},Te={actionButton:{minWidth:"auto !important"},containerField:{background:ne.background,border:`solid 1px ${ne.primary}`,borderRadius:"1rem"},containerHidden:{background:ne.background,border:`solid 1px ${ne.borderGrey}`,borderRadius:"1rem"},containerTitle:{background:to[700],border:`solid 1px ${to[400]}`,borderRadius:"1rem"},containerTree:{background:ne.tertiary,border:`solid 1px ${ne.primary}`,borderRadius:"1rem"},containerValue:{background:ne.background,border:`solid 1px ${ne.secondary}`,borderRadius:"1rem"},icon:{color:ne.grey500},nodeSvg:{stroke:"transparent !important"},stepChip:{fontSize:".7rem !important",fontWeight:"bold",height:"20px !important"},title:{display:"-webkit-box",margin:0,overflow:"hidden",textAlign:"right",textOverflow:"ellipsis",webkitBoxOrient:"vertical",webkitLineClamp:2}},mu=e=>{const t=!!e,r=e==="tree",n=e==="hidden";return e==="title"?Te.containerTitle:n?Te.containerHidden:r?Te.containerTree:t?Te.containerField:Te.containerValue},bu=({nodeDatum:e,onAddChildren:t,onEditChildren:r,onDeleteChildren:n,onOpenTreeModal:a,hierarchyPointNode:o,size:s=220})=>{const{t:l}=we.useTranslation(["translation","form"]),{attributes:f}=e||{},{isRoot:p,isLeaf:m,required:b,isDecision:g,step:C,type:y,label:c,repeatable:v,tag:k,name:O}=f||{},j=!!y,P=y==="tree",T=y==="hidden",I=!j,$=!p&&!m;return i.jsxs("g",{children:[i.jsx(d.GlobalStyles,{styles:{".rd3t-node svg":Te.nodeSvg}}),i.jsx(d.Box,{component:"foreignObject",height:s,width:s,x:`-${s/2}`,y:`-${s/2}`,sx:mu(y),children:i.jsxs(d.Box,{flex:1,display:"flex",p:2,height:"100%",flexDirection:"column",justifyContent:"space-between",children:[i.jsxs(d.Stack,{alignItems:"flex-end",spacing:.5,children:[j&&i.jsxs(d.Stack,{direction:"row",spacing:1,alignItems:"center",children:[C&&i.jsx(d.Tooltip,{title:`${l("step",{ns:"form"})} ${e?.attributes?.step}`,placement:"left",arrow:!0,children:i.jsx(d.Chip,{color:"primary",size:"small",label:C,sx:Te.stepChip})}),i.jsx(d.Typography,{variant:"subtitle2",sx:Te.title,children:i.jsx("strong",{children:c||O})})]}),j&&i.jsx(d.Chip,{color:"info",size:"small",label:l(`type.${y}`,{ns:"form"})}),k&&i.jsx(d.Chip,{variant:"outlined",color:"warning",size:"small",label:k}),b&&i.jsx(d.Stack,{direction:"row",spacing:.5,children:b&&i.jsx(d.Typography,{variant:"body2",sx:{color:({palette:G})=>G.error.main},children:l("required")})}),i.jsx(d.Stack,{spacing:.5,alignItems:"flex-end",children:I&&i.jsx(d.Typography,{variant:"subtitle2",sx:Te.title,children:i.jsx("strong",{children:c})})}),i.jsxs(d.Stack,{paddingTop:.5,spacing:.5,direction:"row",children:[v&&i.jsx(d.Tooltip,{title:l("isARepeatable"),placement:"bottom",arrow:!0,children:i.jsx(du,{style:Te.icon})}),m&&i.jsx(d.Tooltip,{title:l("isALeaf"),placement:"bottom",arrow:!0,children:i.jsx(cu,{style:Te.icon})}),T&&i.jsx(d.Tooltip,{title:l("isAHidden"),placement:"bottom",arrow:!0,children:i.jsx(pu,{style:Te.icon})}),p&&i.jsx(d.Tooltip,{title:l("isTheRoot"),placement:"bottom",arrow:!0,children:i.jsx(fu,{style:Te.icon})}),$&&i.jsx(d.Tooltip,{title:l("isABranch"),placement:"bottom",arrow:!0,children:i.jsx(ou,{style:Te.icon})}),P&&i.jsx(d.Tooltip,{title:l("isATree"),placement:"bottom",arrow:!0,children:i.jsx(uu,{style:Te.icon})})]})]}),i.jsxs(d.Stack,{direction:"row",justifyContent:"flex-end",spacing:0,alignSelf:"flex-end",children:[!p&&i.jsx(d.Tooltip,{title:l("remove"),arrow:!0,children:i.jsx(d.Button,{variant:"text",sx:Te.actionButton,size:"small",color:"error",onClick:()=>n?.(o),children:i.jsx(su,{})})}),!I&&i.jsx(d.Tooltip,{title:l("edit"),arrow:!0,children:i.jsx(d.Button,{variant:"text",color:"secondary",sx:Te.actionButton,size:"small",onClick:()=>r?.(o),children:i.jsx(lu,{})})}),!g&&i.jsx(d.Tooltip,{title:l("add"),arrow:!0,children:i.jsx(d.Button,{variant:"text",color:"success",sx:Te.actionButton,size:"small",onClick:()=>t?.(o),children:i.jsx(iu,{})})}),P&&i.jsx(d.Tooltip,{title:l("show"),arrow:!0,children:i.jsx(d.Button,{variant:"text",color:"info",sx:Te.actionButton,size:"small",onClick:()=>a?.(o),children:i.jsx(hu,{})})})]})]})})]})},gu=S.memo(bu),ro=()=>{const{setModalOpen:e,setCurrentHierarchyPointNode:t,setTreeModalOpen:r,setTreePath:n}=ye();return{handleAddChildren:p=>{t(p),e("add")},handleCloseTreeModal:()=>{n([]),r(!1)},handleDeleteChildren:p=>{t(p),e("delete")},handleEditChildren:p=>{t(p),e("edit")},handleOpenTreeModal:p=>{const m={label:p?.data.attributes?.label||"",path:p?.data?.attributes?.treePath||""};n(b=>[...b,m]),r(!0)}}},yu=({nodeDatum:e,hierarchyPointNode:t,toggleNode:r,onNodeClick:n,onNodeMouseOver:a,onNodeMouseOut:o,addChildren:s})=>{const{handleDeleteChildren:l,handleEditChildren:f,handleAddChildren:p,handleOpenTreeModal:m}=ro();return i.jsx(gu,{addChildren:s,nodeDatum:e,hierarchyPointNode:t,toggleNode:r,onNodeClick:n,onNodeMouseOver:a,onNodeMouseOut:o,onAddChildren:p,onOpenTreeModal:m,onDeleteChildren:l,onEditChildren:f})},no=({nodeDatum:e,hierarchyPointNode:t,toggleNode:r,onNodeClick:n,onNodeMouseOver:a,onNodeMouseOut:o,addChildren:s})=>i.jsx(yu,{addChildren:s,nodeDatum:e,hierarchyPointNode:t,toggleNode:r,onNodeClick:n,onNodeMouseOver:a,onNodeMouseOut:o}),xu=()=>{const{t:e}=we.useTranslation(["modal","snackMessage"]),{currentHierarchyPointNode:t,modalOpen:r,setModalOpen:n,dispatchTree:a}=ye(),[o,s]=S.useState(!1),l=r==="edit";return{closeModal:()=>{n(null),s(!1)},getTitleModalDelete:()=>{const{label:c,name:v}=t?.data?.attributes||{};return e("deleteTitle",{name:c||v,ns:"modal"})},getTitleModalMutation:()=>{const{label:c,name:v}=t?.data?.attributes||{};return l?e(l?"editTitle":"addTitle",{name:c||v,ns:"modal"}):e("addFirstTitle",{ns:"modal"})},handleChangeTree:c=>{try{a(Nr(JSON.parse(c)))}catch{return!1}},isDeleteModal:r==="delete",isLargeView:o,isModalMutationOpen:l||r==="add",setIsLargeView:s}},vu=()=>{const{currentTree:e,setCurrentTree:t,tree:r}=ye(),{name:n,errorName:a,id:o}=e;return{disabled:!!e.id&&!r,errorName:a,handleChangeName:f=>{const{value:p}=f.target;if(!p){t(m=>({...m,errorName:"Champs requis",name:f.target.value}));return}t(m=>({...m,errorName:"",name:f.target.value}))},id:o,name:n}},Cu=()=>{const{t:e}=we.useTranslation("form"),{name:t,handleChangeName:r,errorName:n,disabled:a}=vu();return i.jsx(d.TextField,{required:!0,label:e("treeName",{ns:"form"}),size:"small",onChange:r,value:t,error:!!n,disabled:a})},Tu=()=>{const{tree:e,treeModalOpen:t,treePath:r,backendConfig:n}=ye(),{handleCloseTreeModal:a}=ro(),{getTitleModalMutation:o,closeModal:s,getTitleModalDelete:l,isModalMutationOpen:f,isDeleteModal:p,handleChangeTree:m,isLargeView:b,setIsLargeView:g}=xu(),C=r?.at(-1),y=C?.path,c=C?.label,v=ht(e,y);return i.jsxs(i.Fragment,{children:[i.jsxs(Mc,{children:[i.jsx(Rc,{children:i.jsxs(d.Stack,{justifyContent:"space-between",direction:"row",alignItems:"center",children:[i.jsx(Oo,{}),!!n?.baseUrl&&i.jsxs(d.Stack,{direction:"row",alignItems:"center",spacing:2,children:[i.jsx(Cu,{}),i.jsx(Za,{size:"small",arrowOnly:!0,showBtnAddNewTree:!0,fetchWorkflowsOnOpen:!0})]})]})}),i.jsx(_c,{children:i.jsx(_n,{data:e,renderCustomNodeElement:no})}),i.jsx(Ic,{children:i.jsx(Jo,{value:e,onChange:m})}),i.jsx(Ac,{children:i.jsx(Tc,{value:e})})]}),i.jsx(d.Dialog,{open:f,onClose:s,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",maxWidth:b?"md":"sm",fullWidth:!0,scroll:"paper",children:i.jsx(au,{setIsLarge:g,onClose:s,title:o()})}),i.jsx(wc,{open:p,onClose:s,title:l(),children:i.jsx(Fc,{onClose:s})}),i.jsx(Sc,{open:t,onClose:a,title:c,children:i.jsx(_n,{data:v,renderCustomNodeElement:no})})]})},wu={close:"Close",copyToClipboard:"Copy tree to clipboard",createTree:"Create Tree",downloadJSONFile:"Download JSON File",reset:"Reset",resetTree:"Reset tree",save:"Save",update:"Update"},ku={error:{fetchTree:"An error has occurred. Please try again",saveTree:"An error has occurred. Please try again",updateTree:"An error has occurred. Please try again"},success:{copyToClipboard:"Copied to clipboard",saveTree:"Tree registered",updateTree:"Tree updated"}},Eu={add:"Add",cancel:"Cancel",disabled:"Disabled",edit:"Edit",initialQueryEnable:"Enable initial API call",isABranch:"Is a branch",isAHidden:"Is a hidden field",isALeaf:"Is a leaf",isARepeatable:"Is a repeatable",isATree:"Is a tree",isTheRoot:"Is the root",label:"Label",multiple:"Multiple",name:"Name",parentRef:"Parent element",remove:"Remove",required:"Required",save:"Save",show:"Show",tag:"Tag",type:"Type",uuid:"UUID",validate:"Validate",value:"Value",values:"Values"},ju={close:"Fermer",copyToClipboard:"Copier l'arbre dans le presse-papiers",createTree:"Créer un arbre",downloadJSONFile:"Télécharger le fichier JSON",reset:"Réinitialiser",resetTree:"Réinitialiser l'arbre",save:"Enregistrer",update:"Modifier"},ao={additionalParams:"Paramètres API",addressStructureHint:"Un type d'adresse doit être :",ancestor:"Ancêtre",ancestorValue:"Récupération de la valeur de : {{ancestorName}}",apiRoute:"Api route",cardNumber:"Numéro de carte",dataMapping:"Mapping des options",decisionField:"Champs de décision",disabledPast:"Passé désactivé",dynamicSelectStructureHint:"Assurez-vous que le champ accepte la valeur de l'ancêtre.",email:"Email",firstNameAndLastName:"Prénom et nom",helperText:"Texte d'information",hiddenValue:"Valeur caché",key:"Clé",keyPath:"Chemin de la clé (string | number)",keyPathApiDescription:"Pour insérer une valeur dans une URL, utilisez la syntaxe {paramName}. Par exemple : http://api.com/userId={userId}, ajouter {userId} en params.",keyPathAssignment:"Chemin vers la valeur : {{keyPath}}",keyPathObject:"Clé vers la valeur",label:"Label",letter:"Lettre",mapObject:"Mapper l'objet",message:"Message",mustBeUnique:"Doit être unique",newTree:"Nouvel arbre",noAncestorFound:"Aucun parent trouvé ",number:"Chiffre",numberAndLetter:"Chiffre et lettre",objectDemo:"Exemple de mapping d'objet",offMessage:"Message (désactiver)",onMessage:"Message (activer)",pattern:"Expression régulière",patternMessage:"Message d'aide invalide",phoneNumber:"Numéro de téléphone",receiveValueFromParent:"Valeur par défaut depuis l'ancêtre",repeatable:"Répétable",searchKeyPlaceholder:"text",selectStructureHint:"Doit être une valeur existante dans les options de valeurs.",staticFields:"Champs statiques",staticValue:"(Option) Valeur statique",staticValueDescription:"Par défaut, il utilisera la valeur de l'ancêtre, mais vous pouvez assigner une valeur statique.",step:"Étape",tree:"Arbre",treeName:"Nom de l'arbre",type:{address:"Adresse",autocomplete:"Autocomplétion",checkbox:"Case à cocher",date:"Date",dateRange:"Plage de dates",dynamicSelect:"Sélection dynamique",email:"Email",file:"Fichier",hidden:"Champs caché",number:"Nombre",password:"Mot de passe",radio:"Radio",select:"Select",switch:"Switch",tel:"Téléphone",text:"Texte",time:"Temps",timeRange:"Plage de temps",title:"Titre",tree:"Arbre",url:"URL"},typeStructureWarning:"Le type d'input doit être : {{type}}",url:"URL",urlConstruction:"Construction de l'URL",useAncestorValueAsParam:"Utiliser une valeur ancêtre",value:"Valeur",values:"Valeurs",warningApiAutocomplete:{response:"dois avoir comme réponse",url:"La route de l'API"},warningApiSelect:{response:"à l'emplacement de votre variable.",url:"Pour intégrer la valeur du parent dans l'URL",warning:"placez {{}}"}},oo={addFirstTitle:"Ajouter un champ",addTitle:"Ajouter un champ à « {{name}} »",deleteTitle:"Voulez vraiment supprimer « {{name}} »",editTitle:"Éditer le champ « {{name}} »",resetTreeContent:"Êtes-vous sûr de vouloir réinitialiser l'arbre ?",saveTree:"Enregistrer l'arbre"},Su={error:{fetchTree:"Une erreur est survenue veuillez réessayer",saveTree:"Une erreur est survenue veuillez réessayer",updateTree:"Une erreur est survenue veuillez réessayer"},success:{copyToClipboard:"Copié dans le presse-papiers",saveTree:"Arbre enregistré",updateTree:"Arbre mis à jour"}},Pu={add:"Ajouter",cancel:"Annuler",disabled:"Désactivé",edit:"Éditer",initialQueryEnable:"Activer un appel API intiale",isABranch:"Est une branche",isAHidden:"Est un champs caché",isALeaf:"Est une feuille",isARepeatable:"Est répétable",isATree:"Est un arbre",isTheRoot:"Est la racine",label:"Label",multiple:"Multiple",name:"Nom",parentRef:"Element parent",remove:"Supprimer",required:"Requis",save:"Enregistrer",show:"Afficher",tag:"Tag",type:"Type",uuid:"UUID",validate:"Valider",value:"Valeur",values:"Valeurs"};At.use(go).use(we.initReactI18next).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{useSuspense:!0},resources:{en:{button:wu,form:ao,modal:oo,snackMessage:ku,translation:Eu},fr:{button:ju,form:ao,modal:oo,snackMessage:Su,translation:Pu}},returnNull:!1}).then(()=>{document.documentElement.lang!==At.resolvedLanguage&&At.resolvedLanguage&&document.documentElement.setAttribute("lang",At.resolvedLanguage)}),At.on("languageChanged",e=>{document.documentElement.setAttribute("lang",e)});const Au=({initialTree:e,initialTreeId:t,backendConfig:r})=>(S.useLayoutEffect(()=>{pt.defaults.baseURL=r?.baseUrl,r?.authToken&&(pt.defaults.headers.common.Authorization=`Bearer ${r?.authToken}`)},[r?.authToken,r?.baseUrl]),i.jsx(ft.QueryClientProvider,{client:Eo,children:i.jsx(Po,{authToken:r?.authToken,children:i.jsx(Wo,{backendConfig:r,initialTree:e,initialTreeId:t,children:i.jsx(ko,{children:i.jsx(d.SnackbarProvider,{children:i.jsx(Tu,{})})})})})}));Ce.TreePlusIcon=Pn,Ce.Treege=Au,Object.defineProperty(Ce,Symbol.toStringTag,{value:"Module"})});