@wandelbots/wandelbots-js-react-components 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +92 -7
  2. package/dist/3d.cjs.js +2 -0
  3. package/dist/3d.cjs.js.map +1 -0
  4. package/dist/3d.d.ts +11 -0
  5. package/dist/3d.d.ts.map +1 -0
  6. package/dist/3d.es.js +16 -0
  7. package/dist/3d.es.js.map +1 -0
  8. package/dist/LoadingCover-CbvPNfkO.cjs +2 -0
  9. package/dist/LoadingCover-CbvPNfkO.cjs.map +1 -0
  10. package/dist/LoadingCover-DkXwZXg8.js +87 -0
  11. package/dist/LoadingCover-DkXwZXg8.js.map +1 -0
  12. package/dist/WandelscriptEditor-DepOICD0.cjs +2 -0
  13. package/dist/WandelscriptEditor-DepOICD0.cjs.map +1 -0
  14. package/dist/WandelscriptEditor-DomKLwOz.js +140 -0
  15. package/dist/WandelscriptEditor-DomKLwOz.js.map +1 -0
  16. package/dist/components/jogging/JoggingStore.d.ts +1 -1
  17. package/dist/core.cjs.js +2 -0
  18. package/dist/core.cjs.js.map +1 -0
  19. package/dist/core.d.ts +33 -0
  20. package/dist/core.d.ts.map +1 -0
  21. package/dist/core.es.js +54 -0
  22. package/dist/core.es.js.map +1 -0
  23. package/dist/index-BHtHALJk.cjs +2 -0
  24. package/dist/index-BHtHALJk.cjs.map +1 -0
  25. package/dist/index-BSgNMmxG.js +2263 -0
  26. package/dist/index-BSgNMmxG.js.map +1 -0
  27. package/dist/index-DS_xdVel.cjs +29 -0
  28. package/dist/index-DS_xdVel.cjs.map +1 -0
  29. package/dist/index-obAnXT9_.js +5333 -0
  30. package/dist/index-obAnXT9_.js.map +1 -0
  31. package/dist/index.cjs.js +2 -0
  32. package/dist/index.cjs.js.map +1 -0
  33. package/dist/index.d.ts +3 -43
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.es.js +69 -0
  36. package/dist/index.es.js.map +1 -0
  37. package/dist/lib/JoggerConnection.d.ts +1 -1
  38. package/dist/lib/JoggerConnection.d.ts.map +1 -1
  39. package/dist/lib/MotionStreamConnection.d.ts +1 -1
  40. package/dist/lib/MotionStreamConnection.d.ts.map +1 -1
  41. package/dist/manufacturerHomePositions-4m2Kt5Pk.js +976 -0
  42. package/dist/manufacturerHomePositions-4m2Kt5Pk.js.map +1 -0
  43. package/dist/manufacturerHomePositions-AGIQC0U_.cjs +2 -0
  44. package/dist/manufacturerHomePositions-AGIQC0U_.cjs.map +1 -0
  45. package/dist/theming-CO0a0eRg.js +21801 -0
  46. package/dist/theming-CO0a0eRg.js.map +1 -0
  47. package/dist/theming-ZJr8jTwS.cjs +128 -0
  48. package/dist/theming-ZJr8jTwS.cjs.map +1 -0
  49. package/dist/wandelscript.cjs.js +2 -0
  50. package/dist/wandelscript.cjs.js.map +1 -0
  51. package/dist/wandelscript.d.ts +2 -0
  52. package/dist/wandelscript.d.ts.map +1 -0
  53. package/dist/wandelscript.es.js +5 -0
  54. package/dist/wandelscript.es.js.map +1 -0
  55. package/package.json +35 -7
  56. package/src/3d.ts +15 -0
  57. package/src/components/AppHeader.md +1 -1
  58. package/src/core.ts +33 -0
  59. package/src/index.ts +4 -47
  60. package/src/lib/JoggerConnection.ts +1 -1
  61. package/src/lib/MotionStreamConnection.ts +4 -1
  62. package/src/wandelscript.ts +2 -0
  63. package/dist/index.cjs +0 -155
  64. package/dist/index.cjs.map +0 -1
  65. package/dist/index.js +0 -30530
  66. package/dist/index.js.map +0 -1
package/dist/index.cjs DELETED
@@ -1,155 +0,0 @@
1
- "use strict";var Jf=Object.create;var Yl=Object.defineProperty;var Yf=Object.getOwnPropertyDescriptor;var Kf=Object.getOwnPropertyNames;var Qf=Object.getPrototypeOf,Xf=Object.prototype.hasOwnProperty;var Zf=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Kf(t))!Xf.call(e,o)&&o!==r&&Yl(e,o,{get:()=>t[o],enumerable:!(n=Yf(t,o))||n.enumerable});return e};var xa=(e,t,r)=>(r=e!=null?Jf(Qf(e)):{},Zf(t||!e||!e.__esModule?Yl(r,"default",{value:e,enumerable:!0}):r,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),wt=require("three"),Ld=require("three-stdlib"),ht=require("@react-three/drei"),Xo=require("@react-three/fiber"),T=require("@mui/material"),me=require("mobx-react-lite"),we=require("react-i18next"),em=require("i18next"),tm=require("i18next-browser-languagedetector"),x=require("prop-types"),rm=require("@emotion/styled"),nm=require("@emotion/react"),Ct=require("@mui/x-data-grid"),Ee=require("mobx"),Ui=require("lodash-es"),$e=require("@wandelbots/nova-js"),Gt=require("@mui/icons-material"),om=require("react-error-boundary"),sm=require("@mui/x-charts");function Fd(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 V=Fd(j),Ce=Fd(wt);function am(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var So={exports:{}},Sn={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Kl;function im(){if(Kl)return Sn;Kl=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var i in o)i!=="key"&&(s[i]=o[i])}else s=o;return o=s.ref,{$$typeof:e,type:n,key:a,ref:o!==void 0?o:null,props:s}}return Sn.Fragment=t,Sn.jsx=r,Sn.jsxs=r,Sn}var vn={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Ql;function lm(){return Ql||(Ql=1,process.env.NODE_ENV!=="production"&&function(){function e(F){if(F==null)return null;if(typeof F=="function")return F.$$typeof===b?null:F.displayName||F.name||null;if(typeof F=="string")return F;switch(F){case m:return"Fragment";case S:return"Profiler";case y:return"StrictMode";case I:return"Suspense";case E:return"SuspenseList";case k:return"Activity"}if(typeof F=="object")switch(typeof F.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),F.$$typeof){case f:return"Portal";case v:return(F.displayName||"Context")+".Provider";case R:return(F._context.displayName||"Context")+".Consumer";case O:var ee=F.render;return F=F.displayName,F||(F=ee.displayName||ee.name||"",F=F!==""?"ForwardRef("+F+")":"ForwardRef"),F;case w:return ee=F.displayName||null,ee!==null?ee:e(F.type)||"Memo";case P:ee=F._payload,F=F._init;try{return e(F(ee))}catch{}}return null}function t(F){return""+F}function r(F){try{t(F);var ee=!1}catch{ee=!0}if(ee){ee=console;var ce=ee.error,be=typeof Symbol=="function"&&Symbol.toStringTag&&F[Symbol.toStringTag]||F.constructor.name||"Object";return ce.call(ee,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",be),t(F)}}function n(F){if(F===m)return"<>";if(typeof F=="object"&&F!==null&&F.$$typeof===P)return"<...>";try{var ee=e(F);return ee?"<"+ee+">":"<...>"}catch{return"<...>"}}function o(){var F=A.A;return F===null?null:F.getOwner()}function s(){return Error("react-stack-top-frame")}function a(F){if(_.call(F,"key")){var ee=Object.getOwnPropertyDescriptor(F,"key").get;if(ee&&ee.isReactWarning)return!1}return F.key!==void 0}function i(F,ee){function ce(){ne||(ne=!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)",ee))}ce.isReactWarning=!0,Object.defineProperty(F,"key",{get:ce,configurable:!0})}function l(){var F=e(this.type);return Q[F]||(Q[F]=!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.")),F=this.props.ref,F!==void 0?F:null}function c(F,ee,ce,be,_e,xe,ut,nt){return ce=xe.ref,F={$$typeof:p,type:F,key:ee,props:xe,_owner:_e},(ce!==void 0?ce:null)!==null?Object.defineProperty(F,"ref",{enumerable:!1,get:l}):Object.defineProperty(F,"ref",{enumerable:!1,value:null}),F._store={},Object.defineProperty(F._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(F,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(F,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ut}),Object.defineProperty(F,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:nt}),Object.freeze&&(Object.freeze(F.props),Object.freeze(F)),F}function u(F,ee,ce,be,_e,xe,ut,nt){var Se=ee.children;if(Se!==void 0)if(be)if(M(Se)){for(be=0;be<Se.length;be++)d(Se[be]);Object.freeze&&Object.freeze(Se)}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 d(Se);if(_.call(ee,"key")){Se=e(F);var te=Object.keys(ee).filter(function(ue){return ue!=="key"});be=0<te.length?"{key: someKey, "+te.join(": ..., ")+": ...}":"{key: someKey}",se[Se+be]||(te=0<te.length?"{"+te.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
- let props = %s;
19
- <%s {...props} />
20
- React keys must be passed directly to JSX without using spread:
21
- let props = %s;
22
- <%s key={someKey} {...props} />`,be,Se,te,Se),se[Se+be]=!0)}if(Se=null,ce!==void 0&&(r(ce),Se=""+ce),a(ee)&&(r(ee.key),Se=""+ee.key),"key"in ee){ce={};for(var ae in ee)ae!=="key"&&(ce[ae]=ee[ae])}else ce=ee;return Se&&i(ce,typeof F=="function"?F.displayName||F.name||"Unknown":F),c(F,Se,xe,_e,o(),ce,ut,nt)}function d(F){typeof F=="object"&&F!==null&&F.$$typeof===p&&F._store&&(F._store.validated=1)}var h=j,p=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),v=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),b=Symbol.for("react.client.reference"),A=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_=Object.prototype.hasOwnProperty,M=Array.isArray,D=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(F){return F()}};var ne,Q={},oe=h["react-stack-bottom-frame"].bind(h,s)(),X=D(n(s)),se={};vn.Fragment=m,vn.jsx=function(F,ee,ce,be,_e){var xe=1e4>A.recentlyCreatedOwnerStacks++;return u(F,ee,ce,!1,be,_e,xe?Error("react-stack-top-frame"):oe,xe?D(n(F)):X)},vn.jsxs=function(F,ee,ce,be,_e){var xe=1e4>A.recentlyCreatedOwnerStacks++;return u(F,ee,ce,!0,be,_e,xe?Error("react-stack-top-frame"):oe,xe?D(n(F)):X)}}()),vn}var Xl;function cm(){return Xl||(Xl=1,process.env.NODE_ENV==="production"?So.exports=im():So.exports=lm()),So.exports}var g=cm();function um(e){switch(e.shape_type){case"convex_hull":return new Ld.ConvexGeometry(e.vertices.map(r=>new Ce.Vector3(r[0]/1e3,r[1]/1e3,r[2]/1e3)));case"box":return new Ce.BoxGeometry(e.size_x/1e3,e.size_y/1e3,e.size_z/1e3);case"sphere":return new Ce.SphereGeometry(e.radius/1e3);case"capsule":return new Ce.CapsuleGeometry(e.radius/1e3,e.cylinder_height/1e3);case"cylinder":return new Ce.CylinderGeometry(e.radius/1e3,e.radius/1e3,e.height/1e3);case"rectangle":return new Ce.BoxGeometry(e.size_x/1e3,e.size_y/1e3,0);default:return console.warn(`${e.shape_type} is not supported`),new Ce.BufferGeometry}}function dm({name:e,collider:t,children:r}){var s,a;const n=((s=t.pose)==null?void 0:s.position)??[0,0,0],o=((a=t.pose)==null?void 0:a.orientation)??[0,0,0];return t.margin&&console.warn(`${e} margin is not supported`),g.jsx("mesh",{name:e,position:new Ce.Vector3(n[0],n[1],n[2]).divideScalar(1e3),rotation:new Ce.Euler(o[0],o[1],o[2],"XYZ"),geometry:um(t.shape),children:r})}function hm({name:e,colliders:t,meshChildrenProvider:r,...n}){return g.jsx("group",{name:e,...n,children:Object.entries(t).map(([o,s])=>g.jsx(dm,{name:o,collider:s,children:r(o,s)},o))})}function pm({scene:e,meshChildrenProvider:t}){const r=e.colliders;return g.jsx("group",{children:r&&g.jsx(hm,{meshChildrenProvider:t,colliders:r})})}function si(){return g.jsx(ht.Environment,{children:g.jsx(fm,{})})}function fm({positions:e=[2,0,2,0,2,0,2,0]}){return g.jsxs(g.Fragment,{children:[g.jsx(ht.Lightformer,{intensity:5,"rotation-x":Math.PI/2,position:[0,5,-9],scale:[10,10,1]}),g.jsx("group",{rotation:[0,.5,0],children:g.jsx("group",{children:e.map((t,r)=>g.jsx(ht.Lightformer,{form:"circle",intensity:5,rotation:[Math.PI/2,0,0],position:[t,4,r*4],scale:[3,1,1]},r))})}),g.jsx(ht.Lightformer,{intensity:40,"rotation-y":Math.PI/2,position:[-5,1,-1],scale:[20,.1,1]}),g.jsx(ht.Lightformer,{intensity:20,"rotation-y":-Math.PI,position:[-5,-2,-1],scale:[20,.1,1]}),g.jsx(ht.Lightformer,{"rotation-y":Math.PI/2,position:[-5,-1,-1],scale:[20,.5,1],intensity:5}),g.jsx(ht.Lightformer,{"rotation-y":-Math.PI/2,position:[10,1,0],scale:[20,1,1],intensity:10}),g.jsx(ht.Lightformer,{form:"ring",color:"white",intensity:5,scale:10,position:[-15,4,-18],target:[0,0,0]})]})}function mm(e){if(e.length<3)return console.log("Not enough vertices to define a plane"),{isCoplanar:!1};const t=new Ce.Vector3(e[0].x,e[0].y,e[0].z),r=new Ce.Vector3(e[1].x,e[1].y,e[1].z),n=new Ce.Vector3(e[2].x,e[2].y,e[2].z),o=new Ce.Vector3().subVectors(r,t),s=new Ce.Vector3().subVectors(n,t),a=new Ce.Vector3().crossVectors(o,s).normalize();for(let i=3;i<e.length;i++){const l=new Ce.Vector3(e[i].x,e[i].y,e[i].z),c=new Ce.Vector3().subVectors(l,t),u=a.dot(c);if(Math.abs(u)>1e-6)return console.log("Vertices are not on the same plane"),{isCoplanar:!1}}return{isCoplanar:!0,normal:a}}function gm({safetyZones:e,...t}){return g.jsx("group",{...t,children:e.map((r,n)=>{let o=[];return r.geometry&&(r.geometry.compound?o=r.geometry.compound.child_geometries:r.geometry.convex_hull&&(o=[r.geometry])),o.map((s,a)=>{if(!s.convex_hull)return null;const i=s.convex_hull.vertices.map(u=>new Ce.Vector3(u.x/1e3,u.y/1e3,u.z/1e3)),l=mm(i);if(l.isCoplanar&&l.normal){const d=new Ce.Vector3().addVectors(i[0],l.normal.multiplyScalar(1e-4));i.push(d)}let c;try{c=new Ld.ConvexGeometry(i)}catch(u){return console.log("Error creating ConvexGeometry:",u),null}return g.jsx("mesh",{geometry:c,children:g.jsx("meshStandardMaterial",{attach:"material",color:"#009f4d",opacity:.2,depthTest:!1,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-a},n)},`${n}-${a}`)})})})}function ym({trajectory:e,...t}){var n;const r=((n=e.trajectory)==null?void 0:n.map(o=>o.tcp_pose?new Ce.Vector3(o.tcp_pose.position.x/1e3,o.tcp_pose.position.z/1e3,-o.tcp_pose.position.y/1e3):null).filter(o=>o!==null))||[];return g.jsx("group",{...t,children:r.length>0&&g.jsx(ht.Line,{points:r,lineWidth:3,polygonOffset:!0,polygonOffsetFactor:10,polygonOffsetUnits:10})})}const bm={"Jogging.Cartesian.Translation.velocityMmPerSec.lb":"{{amount}} mm/s","Jogging.Cartesian.Rotation.velocityDegPerSec.lb":"{{amount}}°/s","Jogging.Velocity.lb":"Geschwindigkeit","General.degree.variable":"{{amount}}°","General.mm.variable":"{{amount}} mm","Jogging.Blocked.ti":"Verbindung blockiert","Jogging.Blocked.lb":"Ein anderer Client kontrolliert das Jogging.","Jogging.Blocked.Reenable.bt":"Neu verbinden","Jogging.Cartesian.MotionType.lb":"Bewegungstyp","Jogging.Cartesian.Translation.bt":"Translation","Jogging.Cartesian.Rotation.bt":"Rotation","Jogging.Joints.JointValues.lb":"Gelenkwerte","Jogging.Increment.Continuous.dd":"Fortlaufend","Jogging.Cartesian.Orientation.lb":"Orientierung","Jogging.JointLimitsReached.lb":"Gelenkgrenzen für Gelenk {{jointNumbers}} erreicht","Jogging.Orientation.coordsys":"Roboterbasis","Jogging.Orientation.tool":"Werkzeug","SafetyBar.ActivationToggle.Activate.bt":"Aktivieren","SafetyBar.ActivationToggle.Activated.bt":"Aktiviert","SafetyBar.ActivationToggle.Activating.bt":"Wird aktiviert…","SafetyBar.ActivationToggle.Deactivating.bt":"Wird deaktiviert…","SafetyBar.ControllerType.Physical.lb":"Physisch","SafetyBar.ControllerType.Virtual.lb":"Virtuell","SafetyBar.MotionGroup.Physical.Explanation.lb":"<code>{{motionGroupId}}</code> ist ein physische Robotersteuerung. Für die Bewegung dieses Roboters sind <strong>Sicherheitsmaßnahmen</strong> aktiv.","SafetyBar.MotionGroup.Virtual.Explanation.lb":"<1>{{motionGroupId}}</1> ist eine virtuelle Robotersteuerung ohne physisches Gegenstück. Der Roboter kann ohne Sicherheitsmaßnahmen bewegt werden.","SafetyBar.OperationMode.Auto.Explanation.lb":"Automatischer Betriebsmodus der Robotersteuerung aktiv. Automatisierte Bewegung ohne manuelle Bestätigung freigegeben.","SafetyBar.OperationMode.Automatic.ti":"Automatisch","SafetyBar.OperationMode.Error.Explanation.lb":"Fehler beim Abrufen des Betriebsmodus. Originalhandbediengerät des Roboters verwenden, um Fehler zu lösen.","SafetyBar.OperationMode.Error.lb":"Fehler","SafetyBar.OperationMode.Manual.Explanation.lb":`Die Robotersteuerung befindet sich im manuellen Betriebsmodus.
23
- Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabeschalter gedrückt werden muss, damit sich der Roboter erfolgreich bewegen kann.`,"SafetyBar.OperationMode.Manual.lb":"Manuell","SafetyBar.OperationMode.ti":"Betriebsmodus","SafetyBar.SafetyState.Error.Explanation.lb":"Die Robotersteuerung ist in einen unerwarteten Sicherheitszustand eingetreten.","SafetyBar.SafetyState.Error.lb":"Fehler","SafetyBar.SafetyState.Estop.lb":"NOT-AUS","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"Die Robotersteuerung ist in einen Sicherheitszustand eingetreten, der manuelle Maßnahmen zur Behebung erfordert.","SafetyBar.SafetyState.ManualActionRequired.lb":"Aktion erforderlich","SafetyBar.SafetyState.Normal.Explanation.lb":"Die Robotersteuerung befindet sich in einem sicheren Zustand. Roboterbewegungen sind möglich.","SafetyBar.SafetyState.Normal.lb":"Sicher","SafetyBar.SafetyState.Stop.Explanation.lb":"Die Robotersteuerung ist in einen Stoppzustand übergegangen. Bis der Stoppzustand aufgelöst ist, ist keine Bewegung mehr möglich.","SafetyBar.SafetyState.Stop.lb":"Stopp","SafetyBar.SafetyState.ti":"Sicherheitszustand","SafetyBar.StopState.Estop.Explanation.lb":"NOT-AUS aktiviert. NOT-AUS freischalten, um Roboter zu bewegen.","Jogging.Increment.hlb":"Schrittgröße","Jogging.CoordinateSystem.hlb":"Koordinatensystem","Jogging.Cartesian.bt":"Kartesisch","Jogging.Joints.bt":"Gelenke","Jogging.Velocity.bt":"Geschwindigkeit","CycleTimer.RemainingTime.lb":"Verbleibende Zeit","CycleTimer.OfTime.lb":"von {{time}}","CycleTimer.Time.lb":"{{time}}","CycleTimer.Error.lb":"Fehler","CycleTimer.WaitingForCycle.lb":"Warten auf Programmzyklus","CycleTimer.CycleTime.lb":"Zykluszeit","CycleTimer.Measuring.lb":"wird gemessen...","CycleTimer.Determined.lb":"bestimmt","Timer.error":"Fehler","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Weiter","ProgramControl.Retry.bt":"Wiederholen","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stopp","ProgramStateIndicator.Preparing.lb":"Vorbereitung","ProgramStateIndicator.Starting.lb":"Startet","ProgramStateIndicator.Running.lb":"In Betrieb","ProgramStateIndicator.Pausing.lb":"Pausiert","ProgramStateIndicator.Stopping.lb":"Stoppt","ProgramStateIndicator.Completed.lb":"Abgeschlossen","ProgramStateIndicator.Failed.lb":"Fehlgeschlagen","ProgramStateIndicator.Error.lb":"Fehler","ProgramStateIndicator.EStop.lb":"Not-Aus","ProgramStateIndicator.Idle.lb":"Leerlauf","ProgramStateIndicator.Paused.lb":"Pausiert","ProgramStateIndicator.Ready.lb":"Bereit","ProgramStateIndicator.Stopped.lb":"Gestoppt","ProgramStateIndicator.Auto.lb":"Auto","ProgramStateIndicator.Manual.lb":"Manuell","ProgramStateIndicator.ManualT1.lb":"Manuell T1","ProgramStateIndicator.ManualT2.lb":"Manuell T2","RobotSetupReadinessIndicator.Ready.lb":"Bereit","RobotSetupReadinessIndicator.RobotDisconnected.lb":"Roboter getrennt","RobotSetupReadinessIndicator.CellOpen.lb":"Zelle offen","RobotSetupReadinessIndicator.EStop.lb":"Not-Stopp","RobotSetupReadinessIndicator.ManualMode.lb":"Manueller Modus","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Voraussetzung nicht erfüllt","RobotCard.Runtime.lb":"Laufzeit","RobotCard.DriveToHome.bt":"Zur Home-Position fahren"},xm={"Jogging.Cartesian.Translation.velocityMmPerSec.lb":"{{amount}} mm/s","Jogging.Cartesian.Rotation.velocityDegPerSec.lb":"{{amount}}°/s","Jogging.Velocity.lb":"Velocity","General.degree.variable":"{{amount}}°","General.mm.variable":"{{amount}} mm","Jogging.Blocked.ti":"Connection blocked","Jogging.Blocked.lb":"Another client is currently controlling the jogging.","Jogging.Blocked.Reenable.bt":"Reconnect","Jogging.Cartesian.MotionType.lb":"Motion type","Jogging.Cartesian.Translation.bt":"Translation","Jogging.Cartesian.Rotation.bt":"Rotation","Jogging.Joints.JointValues.lb":"Joint values","Jogging.Increment.Continuous.dd":"Continuous","Jogging.Cartesian.Orientation.lb":"Orientation","Jogging.Activating.lb":"Activating jogging","Jogging.JointLimitsReached.lb":"Joint limit reached for joint {{jointNumbers}}","Jogging.Orientation.coordsys":"Robot base","Jogging.Orientation.tool":"Tool","SafetyBar.ActivationToggle.Activate.bt":"Activate","SafetyBar.ActivationToggle.Activated.bt":"Activated","SafetyBar.ActivationToggle.Activating.bt":"Activating","SafetyBar.ActivationToggle.Deactivating.bt":"Deactivating","SafetyBar.ControllerType.Physical.lb":"Physical","SafetyBar.ControllerType.Virtual.lb":"Virtual","SafetyBar.MotionGroup.Physical.Explanation.lb":"<code>{{motionGroupId}}</code> is a physical robot controller. <strong>Safety precautions</strong> are active for the movement of this robot.","SafetyBar.MotionGroup.Virtual.Explanation.lb":"<1>{{motionGroupId}}</1> is a virtual robot controller with no physical counterpart. It can be freely manipulated without safety precautions.","SafetyBar.OperationMode.Auto.Explanation.lb":"Automatic operation mode active. Automated movement without manual confirmation enabled.","SafetyBar.OperationMode.Automatic.ti":"Automatic","SafetyBar.OperationMode.Error.Explanation.lb":"Failed to get operation mode. Use the original control panel to resolve the error.","SafetyBar.OperationMode.Error.lb":"Error","SafetyBar.OperationMode.Manual.Explanation.lb":"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully.","SafetyBar.OperationMode.Manual.lb":"Manual","SafetyBar.OperationMode.ti":"Operation mode","SafetyBar.SafetyState.Error.Explanation.lb":"The robot controller has entered an unexpected safety state.","SafetyBar.SafetyState.Error.lb":"Error","SafetyBar.SafetyState.Estop.lb":"E-Stop","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"The robot controller has entered a safety state requiring manual action to resolve.","SafetyBar.SafetyState.ManualActionRequired.lb":"Action required","SafetyBar.SafetyState.Normal.Explanation.lb":"The robot controller is in a safe state. Robot movement is enabled.","SafetyBar.SafetyState.Normal.lb":"Safe","SafetyBar.SafetyState.Stop.Explanation.lb":"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved.","SafetyBar.SafetyState.Stop.lb":"Stop","SafetyBar.SafetyState.ti":"Safety state","SafetyBar.StopState.Estop.Explanation.lb":"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released.","Jogging.Increment.hlb":"Increment","Jogging.CoordinateSystem.hlb":"Coordinate system","Jogging.Cartesian.bt":"Cartesian","Jogging.Joints.bt":"Joints","Jogging.Velocity.bt":"Velocity","CycleTimer.RemainingTime.lb":"Time remaining","CycleTimer.OfTime.lb":"of {{time}}","CycleTimer.Time.lb":"{{time}}","CycleTimer.Error.lb":"Error","CycleTimer.WaitingForCycle.lb":"Waiting for program cycle","CycleTimer.CycleTime.lb":"Cycle Time","CycleTimer.Measuring.lb":"measuring...","CycleTimer.Determined.lb":"determined","Timer.error":"Error","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Resume","ProgramControl.Retry.bt":"Retry","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stop","ProgramStateIndicator.Preparing.lb":"Preparing","ProgramStateIndicator.Starting.lb":"Starting","ProgramStateIndicator.Running.lb":"Running","ProgramStateIndicator.Pausing.lb":"Pausing","ProgramStateIndicator.Stopping.lb":"Stopping","ProgramStateIndicator.Completed.lb":"Completed","ProgramStateIndicator.Failed.lb":"Failed","ProgramStateIndicator.Error.lb":"Error","ProgramStateIndicator.EStop.lb":"E-Stop","ProgramStateIndicator.Idle.lb":"Idle","ProgramStateIndicator.Paused.lb":"Paused","ProgramStateIndicator.Ready.lb":"Ready","ProgramStateIndicator.Stopped.lb":"Stopped","ProgramStateIndicator.Auto.lb":"Auto","ProgramStateIndicator.Manual.lb":"Manual","ProgramStateIndicator.ManualT1.lb":"Manual T1","ProgramStateIndicator.ManualT2.lb":"Manual T2","RobotSetupReadinessIndicator.Ready.lb":"Ready","RobotSetupReadinessIndicator.RobotDisconnected.lb":"Robot disconnected","RobotSetupReadinessIndicator.CellOpen.lb":"Cell open","RobotSetupReadinessIndicator.EStop.lb":"E-Stop","RobotSetupReadinessIndicator.ManualMode.lb":"Manual mode","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Precondition not fulfilled","RobotCard.Runtime.lb":"Runtime","RobotCard.DriveToHome.bt":"Drive to Home"},Li=em.createInstance();Li.use(tm).init({supportedLngs:["en","de"],resources:{en:{translations:xm},de:{translations:bm}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function Ue(e){return r=>g.jsx(Sm,{children:g.jsx(e,{...r})})}const Sm=({children:e})=>g.jsx(we.I18nextProvider,{i18n:Li,children:e}),vm=e=>g.jsx(T.SvgIcon,{...e,viewBox:"0 0 10 8",children:g.jsx("path",{d:"M8.825 0.9125L5 4.72917L1.175 0.9125L0 2.0875L5 7.0875L10 2.0875L8.825 0.9125Z",fill:"currentColor",fillOpacity:"0.56"})}),Cm=Ue(me.observer(e=>{const{appIcon:t,appName:r,apps:n=[],onAppSelect:o,disabled:s=!1,sx:a}=e,[i,l]=j.useState(null),c=!!i,u=p=>{l(p.currentTarget)},d=()=>{l(null)},h=p=>{d(),p.onClick?p.onClick():p.href&&(window.location.href=p.href),o==null||o(p)};return g.jsxs(g.Fragment,{children:[g.jsx(T.AppBar,{position:"static",sx:{boxShadow:"none",backgroundImage:"none","& .MuiAppBar-root":{backgroundImage:"none",backgroundColor:"transparent"},...a},children:g.jsxs(T.Toolbar,{sx:{minHeight:"62px !important"},children:[g.jsx(T.Box,{sx:{mr:1,display:"flex",alignItems:"center"},children:t}),g.jsxs(T.Box,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[g.jsx(T.Typography,{component:"h1",sx:{fontWeight:"bold",fontSize:"1rem"},children:r}),n.length>0&&g.jsx(T.IconButton,{color:"inherit","aria-label":"switch app","aria-controls":"app-menu","aria-haspopup":"true",onClick:u,disabled:s,sx:{ml:1,width:28,height:28,borderRadius:"6px",padding:0,backgroundColor:p=>T.alpha(p.palette.common.white,.1),opacity:1,"&:hover":{backgroundColor:p=>T.alpha(p.palette.common.white,.16)},"& .MuiSvgIcon-root":{fontSize:"8px",width:"8px",height:"6px"}},children:g.jsx(vm,{})})]})]})}),g.jsx(T.Backdrop,{open:c,onClick:d,sx:{backdropFilter:"blur(4px)",backgroundColor:"rgba(0, 0, 0, 0.3)",zIndex:p=>p.zIndex.modal-1}}),g.jsx(T.Menu,{id:"app-menu",anchorEl:i,open:c,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{zIndex:p=>p.zIndex.modal,"& .MuiPaper-root":{minWidth:200,mt:1}},children:n.map(p=>g.jsxs(T.MenuItem,{onClick:()=>h(p),children:[g.jsx(T.Box,{sx:{display:"flex",alignItems:"center"},children:p.icon}),g.jsx(T.Typography,{variant:"body1",sx:{ml:2},children:p.name})]},p.id))})]})}));function K(){return K=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},K.apply(null,arguments)}function ir(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ws(e,t,r=void 0){const n={};for(const o in e){const s=e[o];let a="",i=!0;for(let l=0;l<s.length;l+=1){const c=s[l];c&&(a+=(i===!0?"":" ")+t(c),i=!1,r&&r[c]&&(a+=" "+r[c]))}n[o]=a}return n}function $d(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=$d(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Et(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=$d(e))&&(n&&(n+=" "),n+=t);return n}function lr(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.`}const Fi="$$material";function wm(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=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(o){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 Om={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Tm(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Em=/[A-Z]|^ms/g,Im=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Nd=function(t){return t.charCodeAt(1)===45},Zl=function(t){return t!=null&&typeof t!="boolean"},Sa=Tm(function(e){return Nd(e)?e:e.replace(Em,"-$&").toLowerCase()}),ec=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Im,function(n,o,s){return ar={name:o,styles:s,next:ar},o})}return Om[t]!==1&&!Nd(t)&&typeof r=="number"&&r!==0?r+"px":r};function Zo(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 o=r;if(o.anim===1)return ar={name:o.name,styles:o.styles,next:ar},o.name;var s=r;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)ar={name:a.name,styles:a.styles,next:ar},a=a.next;var i=s.styles+";";return i}return Am(e,t,r)}}var l=r;return l}function Am(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Zo(e,t,r[o])+";";else for(var s in r){var a=r[s];if(typeof a!="object"){var i=a;Zl(i)&&(n+=Sa(s)+":"+ec(s,i)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var l=0;l<a.length;l++)Zl(a[l])&&(n+=Sa(s)+":"+ec(s,a[l])+";");else{var c=Zo(e,t,a);switch(s){case"animation":case"animationName":{n+=Sa(s)+":"+c+";";break}default:n+=s+"{"+c+"}"}}}return n}var tc=/label:\s*([^\s;{]+)\s*(;|$)/g,ar;function Rm(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,o="";ar=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,o+=Zo(r,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=Zo(r,t,e[i]),n){var l=s;o+=l[i]}tc.lastIndex=0;for(var c="",u;(u=tc.exec(o))!==null;)c+="-"+u[1];var d=wm(o)+c;return{name:d,styles:o,next:ar}}/**
24
- * @mui/styled-engine v7.1.1
25
- *
26
- * @license MIT
27
- * This source code is licensed under the MIT license found in the
28
- * LICENSE file in the root directory of this source tree.
29
- */function Pm(e,t){const r=rm(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const o=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
30
- `)):n.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}function Mm(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const rc=[];function nc(e){return rc[0]=e,Rm(rc)}var vo={exports:{}},Oe={};/**
31
- * @license React
32
- * react-is.production.js
33
- *
34
- * Copyright (c) Meta Platforms, Inc. and affiliates.
35
- *
36
- * This source code is licensed under the MIT license found in the
37
- * LICENSE file in the root directory of this source tree.
38
- */var oc;function _m(){if(oc)return Oe;oc=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function f(m){if(typeof m=="object"&&m!==null){var y=m.$$typeof;switch(y){case e:switch(m=m.type,m){case r:case o:case n:case l:case c:case h:return m;default:switch(m=m&&m.$$typeof,m){case a:case i:case d:case u:return m;case s:return m;default:return y}}case t:return y}}}return Oe.ContextConsumer=s,Oe.ContextProvider=a,Oe.Element=e,Oe.ForwardRef=i,Oe.Fragment=r,Oe.Lazy=d,Oe.Memo=u,Oe.Portal=t,Oe.Profiler=o,Oe.StrictMode=n,Oe.Suspense=l,Oe.SuspenseList=c,Oe.isContextConsumer=function(m){return f(m)===s},Oe.isContextProvider=function(m){return f(m)===a},Oe.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Oe.isForwardRef=function(m){return f(m)===i},Oe.isFragment=function(m){return f(m)===r},Oe.isLazy=function(m){return f(m)===d},Oe.isMemo=function(m){return f(m)===u},Oe.isPortal=function(m){return f(m)===t},Oe.isProfiler=function(m){return f(m)===o},Oe.isStrictMode=function(m){return f(m)===n},Oe.isSuspense=function(m){return f(m)===l},Oe.isSuspenseList=function(m){return f(m)===c},Oe.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===o||m===n||m===l||m===c||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===u||m.$$typeof===a||m.$$typeof===s||m.$$typeof===i||m.$$typeof===p||m.getModuleId!==void 0)},Oe.typeOf=f,Oe}var Te={};/**
39
- * @license React
40
- * react-is.development.js
41
- *
42
- * Copyright (c) Meta Platforms, Inc. and affiliates.
43
- *
44
- * This source code is licensed under the MIT license found in the
45
- * LICENSE file in the root directory of this source tree.
46
- */var sc;function Vm(){return sc||(sc=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var y=m.$$typeof;switch(y){case t:switch(m=m.type,m){case n:case s:case o:case c:case u:case p:return m;default:switch(m=m&&m.$$typeof,m){case i:case l:case h:case d:return m;case a:return m;default:return y}}case r:return y}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),f=Symbol.for("react.client.reference");Te.ContextConsumer=a,Te.ContextProvider=i,Te.Element=t,Te.ForwardRef=l,Te.Fragment=n,Te.Lazy=h,Te.Memo=d,Te.Portal=r,Te.Profiler=s,Te.StrictMode=o,Te.Suspense=c,Te.SuspenseList=u,Te.isContextConsumer=function(m){return e(m)===a},Te.isContextProvider=function(m){return e(m)===i},Te.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},Te.isForwardRef=function(m){return e(m)===l},Te.isFragment=function(m){return e(m)===n},Te.isLazy=function(m){return e(m)===h},Te.isMemo=function(m){return e(m)===d},Te.isPortal=function(m){return e(m)===r},Te.isProfiler=function(m){return e(m)===s},Te.isStrictMode=function(m){return e(m)===o},Te.isSuspense=function(m){return e(m)===c},Te.isSuspenseList=function(m){return e(m)===u},Te.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===s||m===o||m===c||m===u||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===d||m.$$typeof===i||m.$$typeof===a||m.$$typeof===l||m.$$typeof===f||m.getModuleId!==void 0)},Te.typeOf=e}()),Te}var ac;function km(){return ac||(ac=1,process.env.NODE_ENV==="production"?vo.exports=_m():vo.exports=Vm()),vo.exports}var es=km();function Vt(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 zd(e){if(V.isValidElement(e)||es.isValidElementType(e)||!Vt(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=zd(e[r])}),t}function rt(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return Vt(e)&&Vt(t)&&Object.keys(t).forEach(o=>{V.isValidElement(t[o])||es.isValidElementType(t[o])?n[o]=t[o]:Vt(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Vt(e[o])?n[o]=rt(e[o],t[o],r):r.clone?n[o]=Vt(t[o])?zd(t[o]):t[o]:n[o]=t[o]}),n}const jm=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 Dm(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...o}=e,s=jm(t),a=Object.keys(s);function i(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r})`}function l(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-n/100}${r})`}function c(h,p){const f=a.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r}) and (max-width:${(f!==-1&&typeof t[a[f]]=="number"?t[a[f]]:p)-n/100}${r})`}function u(h){return a.indexOf(h)+1<a.length?c(h,a[a.indexOf(h)+1]):i(h)}function d(h){const p=a.indexOf(h);return p===0?i(a[1]):p===a.length-1?l(a[p]):c(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:a,values:s,up:i,down:l,between:c,only:u,not:d,unit:r,...o}}function Bm(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,o)=>{var a,i;const s=/min-width:\s*([0-9.]+)/;return+(((a=n.match(s))==null?void 0:a[1])||0)-+(((i=o.match(s))==null?void 0:i[1])||0)});return r.length?r.reduce((n,o)=>{const s=t[o];return delete n[o],n[o]=s,n},{...t}):t}function Um(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function Lm(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>\`.
47
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:lr(18,`(${t})`));return null}const[,n,o]=r,s=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(s)}function Fm(e){const t=(s,a)=>s.replace("@media",a?`@container ${a}`:"@container");function r(s,a){s.up=(...i)=>t(e.breakpoints.up(...i),a),s.down=(...i)=>t(e.breakpoints.down(...i),a),s.between=(...i)=>t(e.breakpoints.between(...i),a),s.only=(...i)=>t(e.breakpoints.only(...i),a),s.not=(...i)=>{const l=t(e.breakpoints.not(...i),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const n={},o=s=>(r(n,s),n);return r(o),{...e,containerQueries:o}}const $m={borderRadius:4},dr=process.env.NODE_ENV!=="production"?x.oneOfType([x.number,x.string,x.object,x.array]):{};function Bn(e,t){return t?rt(e,t,{clone:!1}):e}const Os={xs:0,sm:600,md:900,lg:1200,xl:1536},ic={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Os[e]}px)`},Nm={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Os[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function It(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||ic;return t.reduce((a,i,l)=>(a[s.up(s.keys[l])]=r(t[l]),a),{})}if(typeof t=="object"){const s=n.breakpoints||ic;return Object.keys(t).reduce((a,i)=>{if(Um(s.keys,i)){const l=Lm(n.containerQueries?n:Nm,i);l&&(a[l]=r(t[i],i))}else if(Object.keys(s.values||Os).includes(i)){const l=s.up(i);a[l]=r(t[i],i)}else{const l=i;a[l]=t[l]}return a},{})}return r(t)}function Gd(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,o)=>{const s=e.up(o);return n[s]={},n},{}))||{}}function Hd(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function zm(e,...t){const r=Gd(e),n=[r,...t].reduce((o,s)=>rt(o,s),{});return Hd(Object.keys(r),n)}function Gm(e,t){if(typeof e!="object")return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((o,s)=>{s<e.length&&(r[o]=!0)}):n.forEach(o=>{e[o]!=null&&(r[o]=!0)}),r}function va({values:e,breakpoints:t,base:r}){const n=r||Gm(e,t),o=Object.keys(n);if(o.length===0)return e;let s;return o.reduce((a,i,l)=>(Array.isArray(e)?(a[i]=e[l]!=null?e[l]:e[s],s=l):typeof e=="object"?(a[i]=e[i]!=null?e[i]:e[s],s=i):a[i]=e,a),{})}function tt(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":lr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ts(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function ts(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=Ts(e,r)||n,t&&(o=t(o,n,e)),o}function De(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,s=a=>{if(a[t]==null)return null;const i=a[t],l=a.theme,c=Ts(l,n)||{};return It(a,i,d=>{let h=ts(c,o,d);return d===h&&typeof d=="string"&&(h=ts(c,o,`${t}${d==="default"?"":tt(d)}`,d)),r===!1?h:{[r]:h}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:dr}:{},s.filterProps=[t],s}function Hm(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const qm={m:"margin",p:"padding"},Wm={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},lc={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Jm=Hm(e=>{if(e.length>2)if(lc[e])e=lc[e];else return[e];const[t,r]=e.split(""),n=qm[t],o=Wm[r]||"";return Array.isArray(o)?o.map(s=>n+s):[n+o]}),Es=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Is=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ym=[...Es,...Is];function eo(e,t,r,n){const o=Ts(e,t,!0)??r;return typeof o=="number"||typeof o=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${s}.`),typeof o=="string"?o.startsWith("var(")&&s===0?0:o.startsWith("var(")&&s===1?o:`calc(${s} * ${o})`:o*s):Array.isArray(o)?s=>{if(typeof s=="string")return s;const a=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(a)?a>o.length-1&&console.error([`MUI: The value provided (${a}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${a} > ${o.length-1}, you need to add the missing values.`].join(`
48
- `)):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(`
49
- `)));const i=o[a];return s>=0?i:typeof i=="number"?-i:typeof i=="string"&&i.startsWith("var(")?`calc(-1 * ${i})`:`-${i}`}: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(`
50
- `)),()=>{})}function As(e){return eo(e,"spacing",8,"spacing")}function wr(e,t){return typeof t=="string"||t==null?t:e(t)}function Km(e,t){return r=>e.reduce((n,o)=>(n[o]=wr(t,r),n),{})}function Qm(e,t,r,n){if(!t.includes(r))return null;const o=Jm(r),s=Km(o,n),a=e[r];return It(e,a,s)}function qd(e,t){const r=As(e.theme);return Object.keys(e).map(n=>Qm(e,t,n,r)).reduce(Bn,{})}function ke(e){return qd(e,Es)}ke.propTypes=process.env.NODE_ENV!=="production"?Es.reduce((e,t)=>(e[t]=dr,e),{}):{};ke.filterProps=Es;function je(e){return qd(e,Is)}je.propTypes=process.env.NODE_ENV!=="production"?Is.reduce((e,t)=>(e[t]=dr,e),{}):{};je.filterProps=Is;process.env.NODE_ENV!=="production"&&Ym.reduce((e,t)=>(e[t]=dr,e),{});function Wd(e=8,t=As({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(s=>{const a=t(s);return typeof a=="number"?`${a}px`:a}).join(" "));return r.mui=!0,r}function Rs(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(s=>{n[s]=o}),n),{}),r=n=>Object.keys(n).reduce((o,s)=>t[s]?Bn(o,t[s](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function yt(e){return typeof e!="number"?e:`${e}px solid`}function vt(e,t){return De({prop:e,themeKey:"borders",transform:t})}const Xm=vt("border",yt),Zm=vt("borderTop",yt),eg=vt("borderRight",yt),tg=vt("borderBottom",yt),rg=vt("borderLeft",yt),ng=vt("borderColor"),og=vt("borderTopColor"),sg=vt("borderRightColor"),ag=vt("borderBottomColor"),ig=vt("borderLeftColor"),lg=vt("outline",yt),cg=vt("outlineColor"),Ps=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=eo(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:wr(t,n)});return It(e,e.borderRadius,r)}return null};Ps.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:dr}:{};Ps.filterProps=["borderRadius"];Rs(Xm,Zm,eg,tg,rg,ng,og,sg,ag,ig,Ps,lg,cg);const Ms=e=>{if(e.gap!==void 0&&e.gap!==null){const t=eo(e.theme,"spacing",8,"gap"),r=n=>({gap:wr(t,n)});return It(e,e.gap,r)}return null};Ms.propTypes=process.env.NODE_ENV!=="production"?{gap:dr}:{};Ms.filterProps=["gap"];const _s=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=eo(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:wr(t,n)});return It(e,e.columnGap,r)}return null};_s.propTypes=process.env.NODE_ENV!=="production"?{columnGap:dr}:{};_s.filterProps=["columnGap"];const Vs=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=eo(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:wr(t,n)});return It(e,e.rowGap,r)}return null};Vs.propTypes=process.env.NODE_ENV!=="production"?{rowGap:dr}:{};Vs.filterProps=["rowGap"];const ug=De({prop:"gridColumn"}),dg=De({prop:"gridRow"}),hg=De({prop:"gridAutoFlow"}),pg=De({prop:"gridAutoColumns"}),fg=De({prop:"gridAutoRows"}),mg=De({prop:"gridTemplateColumns"}),gg=De({prop:"gridTemplateRows"}),yg=De({prop:"gridTemplateAreas"}),bg=De({prop:"gridArea"});Rs(Ms,_s,Vs,ug,dg,hg,pg,fg,mg,gg,yg,bg);function Xr(e,t){return t==="grey"?t:e}const xg=De({prop:"color",themeKey:"palette",transform:Xr}),Sg=De({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Xr}),vg=De({prop:"backgroundColor",themeKey:"palette",transform:Xr});Rs(xg,Sg,vg);function pt(e){return e<=1&&e!==0?`${e*100}%`:e}const Cg=De({prop:"width",transform:pt}),$i=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var o,s,a,i,l;const n=((a=(s=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:s.values)==null?void 0:a[r])||Os[r];return n?((l=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:pt(r)}};return It(e,e.maxWidth,t)}return null};$i.filterProps=["maxWidth"];const wg=De({prop:"minWidth",transform:pt}),Og=De({prop:"height",transform:pt}),Tg=De({prop:"maxHeight",transform:pt}),Eg=De({prop:"minHeight",transform:pt});De({prop:"size",cssProperty:"width",transform:pt});De({prop:"size",cssProperty:"height",transform:pt});const Ig=De({prop:"boxSizing"});Rs(Cg,$i,wg,Og,Tg,Eg,Ig);const to={border:{themeKey:"borders",transform:yt},borderTop:{themeKey:"borders",transform:yt},borderRight:{themeKey:"borders",transform:yt},borderBottom:{themeKey:"borders",transform:yt},borderLeft:{themeKey:"borders",transform:yt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:yt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ps},color:{themeKey:"palette",transform:Xr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Xr},backgroundColor:{themeKey:"palette",transform:Xr},p:{style:je},pt:{style:je},pr:{style:je},pb:{style:je},pl:{style:je},px:{style:je},py:{style:je},padding:{style:je},paddingTop:{style:je},paddingRight:{style:je},paddingBottom:{style:je},paddingLeft:{style:je},paddingX:{style:je},paddingY:{style:je},paddingInline:{style:je},paddingInlineStart:{style:je},paddingInlineEnd:{style:je},paddingBlock:{style:je},paddingBlockStart:{style:je},paddingBlockEnd:{style:je},m:{style:ke},mt:{style:ke},mr:{style:ke},mb:{style:ke},ml:{style:ke},mx:{style:ke},my:{style:ke},margin:{style:ke},marginTop:{style:ke},marginRight:{style:ke},marginBottom:{style:ke},marginLeft:{style:ke},marginX:{style:ke},marginY:{style:ke},marginInline:{style:ke},marginInlineStart:{style:ke},marginInlineEnd:{style:ke},marginBlock:{style:ke},marginBlockStart:{style:ke},marginBlockEnd:{style:ke},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:Ms},rowGap:{style:Vs},columnGap:{style:_s},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:pt},maxWidth:{style:$i},minWidth:{transform:pt},height:{transform:pt},maxHeight:{transform:pt},minHeight:{transform:pt},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 Ag(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Rg(e,t){return typeof e=="function"?e(t):e}function Pg(){function e(r,n,o,s){const a={[r]:n,theme:o},i=s[r];if(!i)return{[r]:n};const{cssProperty:l=r,themeKey:c,transform:u,style:d}=i;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[r]:n};const h=Ts(o,c)||{};return d?d(a):It(a,n,f=>{let m=ts(h,u,f);return f===m&&typeof f=="string"&&(m=ts(h,u,`${r}${f==="default"?"":tt(f)}`,f)),l===!1?m:{[l]:m}})}function t(r){const{sx:n,theme:o={}}=r||{};if(!n)return null;const s=o.unstable_sxConfig??to;function a(i){let l=i;if(typeof i=="function")l=i(o);else if(typeof i!="object")return i;if(!l)return null;const c=Gd(o.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(h=>{const p=Rg(l[h],o);if(p!=null)if(typeof p=="object")if(s[h])d=Bn(d,e(h,p,o,s));else{const f=It({theme:o},p,m=>({[h]:m}));Ag(f,p)?d[h]=t({sx:p,theme:o}):d=Bn(d,f)}else d=Bn(d,e(h,p,o,s))}),Bm(o,Hd(u,d))}return Array.isArray(n)?n.map(a):a(n)}return t}const nn=Pg();nn.filterProps=["sx"];function Mg(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let o=r.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return r.palette.mode===e?t:{}}function ks(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={},...a}=e,i=Dm(r),l=Wd(o);let c=rt({breakpoints:i,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...$m,...s}},a);return c=Fm(c),c.applyStyles=Mg,c=t.reduce((u,d)=>rt(u,d),c),c.unstable_sxConfig={...to,...a==null?void 0:a.unstable_sxConfig},c.unstable_sx=function(d){return nn({sx:d,theme:this})},c}function _g(e){return Object.keys(e).length===0}function Vg(e=null){const t=V.useContext(nm.ThemeContext);return!t||_g(t)?e:t}const kg=ks();function Jd(e=kg){return Vg(e)}const jg=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??to;return Object.keys(e).forEach(o=>{r[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function Dg(e){const{sx:t,...r}=e,{systemProps:n,otherProps:o}=jg(r);let s;return Array.isArray(t)?s=[n,...t]:typeof t=="function"?s=(...a)=>{const i=t(...a);return Vt(i)?{...n,...i}:n}:s={...n,...t},{...o,sx:s}}const cc=e=>e,Bg=()=>{let e=cc;return{configure(t){e=t},generate(t){return e(t)},reset(){e=cc}}},Ug=Bg(),Lg={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 pn(e,t,r="Mui"){const n=Lg[t];return n?`${r}-${n}`:`${Ug.generate(e)}-${t}`}function Ni(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=pn(e,o,r)}),n}function Yd(e,t=""){return e.displayName||e.name||t}function uc(e,t,r){const n=Yd(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Fg(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Yd(e,"Component");if(typeof e=="object")switch(e.$$typeof){case es.ForwardRef:return uc(e,e.render,"ForwardRef");case es.Memo:return uc(e,e.type,"memo");default:return}}}function Kd(e){const{variants:t,...r}=e,n={variants:t,style:nc(r),isProcessed:!0};return n.style===r||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=nc(o.style))}),n}const $g=ks();function Ca(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Ng(e){return e?(t,r)=>r[e]:null}function zg(e,t,r){e.theme=qg(e.theme)?r:e.theme[t]||e.theme}function zo(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>zo(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:o,...s}=r;n=s}return Qd(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Qd(e,t,r=[]){var o;let n;e:for(let s=0;s<t.length;s+=1){const a=t[s];if(typeof a.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!a.props(n))continue}else for(const i in a.props)if(e[i]!==a.props[i]&&((o=e.ownerState)==null?void 0:o[i])!==a.props[i])continue e;typeof a.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(a.style(n))):r.push(a.style)}return r}function Xd(e={}){const{themeId:t,defaultTheme:r=$g,rootShouldForwardProp:n=Ca,slotShouldForwardProp:o=Ca}=e;function s(i){zg(i,t,r)}return(i,l={})=>{Mm(i,I=>I.filter(E=>E!==nn));const{name:c,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:p=Ng(Zd(u)),...f}=l,m=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,y=h||!1;let S=Ca;u==="Root"||u==="root"?S=n:u?S=o:Wg(i)&&(S=void 0);const R=Pm(i,{shouldForwardProp:S,label:Hg(c,u),...f}),v=I=>{if(I.__emotion_real===I)return I;if(typeof I=="function")return function(w){return zo(w,I)};if(Vt(I)){const E=Kd(I);return E.variants?function(P){return zo(P,E)}:E.style}return I},O=(...I)=>{const E=[],w=I.map(v),P=[];if(E.push(s),c&&p&&P.push(function(_){var Q,oe;const D=(oe=(Q=_.theme.components)==null?void 0:Q[c])==null?void 0:oe.styleOverrides;if(!D)return null;const ne={};for(const X in D)ne[X]=zo(_,D[X]);return p(_,ne)}),c&&!m&&P.push(function(_){var ne,Q;const M=_.theme,D=(Q=(ne=M==null?void 0:M.components)==null?void 0:ne[c])==null?void 0:Q.variants;return D?Qd(_,D):null}),y||P.push(nn),Array.isArray(w[0])){const A=w.shift(),_=new Array(E.length).fill(""),M=new Array(P.length).fill("");let D;D=[..._,...A,...M],D.raw=[..._,...A.raw,...M],E.unshift(D)}const k=[...E,...w,...P],b=R(...k);return i.muiName&&(b.muiName=i.muiName),process.env.NODE_ENV!=="production"&&(b.displayName=Gg(c,u,i)),b};return R.withConfig&&(O.withConfig=R.withConfig),O}}function Gg(e,t,r){return e?`${e}${tt(t||"")}`:`Styled(${Fg(r)})`}function Hg(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Zd(t||"Root")}`),r}function qg(e){for(const t in e)return!1;return!0}function Wg(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Zd(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Jg=Xd();function rs(e,t,r=!1){const n={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const s=o;if(s==="components"||s==="slots")n[s]={...e[s],...n[s]};else if(s==="componentsProps"||s==="slotProps"){const a=e[s],i=t[s];if(!i)n[s]=a||{};else if(!a)n[s]=i;else{n[s]={...i};for(const l in a)if(Object.prototype.hasOwnProperty.call(a,l)){const c=l;n[s][c]=rs(a[c],i[c],r)}}}else s==="className"&&r&&t.className?n.className=Et(e==null?void 0:e.className,t==null?void 0:t.className):s==="style"&&r&&t.style?n.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:n[s]===void 0&&(n[s]=e[s])}return n}function Yg(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:rs(t.components[r].defaultProps,n)}function eh({props:e,name:t,defaultTheme:r,themeId:n}){let o=Jd(r);return n&&(o=o[n]||o),Yg({theme:o,name:t,props:e})}const Bt=typeof window<"u"?V.useLayoutEffect:V.useEffect;function Kr(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function zi(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}].`),Kr(e,t,r)}function Kg(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,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function cr(e){if(e.type)return e;if(e.charAt(0)==="#")return cr(Kg(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.
51
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:lr(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
52
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:lr(10,o))}else n=n.split(",");return n=n.map(s=>parseFloat(s)),{type:r,values:n,colorSpace:o}}const Qg=e=>{const t=cr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},Vn=(e,t)=>{try{return Qg(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function js(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((o,s)=>s<3?parseInt(o,10):o):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function th(e){e=cr(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,s=n*Math.min(o,1-o),a=(c,u=(c+r/30)%12)=>o-s*Math.max(Math.min(u-3,9-u,1),-1);let i="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(i+="a",l.push(t[3])),js({type:i,values:l})}function ai(e){e=cr(e);let t=e.type==="hsl"||e.type==="hsla"?cr(th(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 dc(e,t){const r=ai(e),n=ai(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function ii(e,t){return e=cr(e),t=zi(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,js(e)}function Co(e,t,r){try{return ii(e,t)}catch{return e}}function $n(e,t){if(e=cr(e),t=zi(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 js(e)}function Ae(e,t,r){try{return $n(e,t)}catch{return e}}function Nn(e,t){if(e=cr(e),t=zi(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 js(e)}function Re(e,t,r){try{return Nn(e,t)}catch{return e}}function Xg(e,t=.15){return ai(e)>.5?$n(e,t):Nn(e,t)}function wo(e,t,r){try{return Xg(e,t)}catch{return e}}const Zg=V.createContext();process.env.NODE_ENV!=="production"&&(x.node,x.bool);const ey=()=>V.useContext(Zg)??!1,ty=V.createContext(void 0);process.env.NODE_ENV!=="production"&&(x.node,x.object);function ry(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?rs(o.defaultProps,n):!o.styleOverrides&&!o.variants?rs(o,n):n}function ny({props:e,name:t}){const r=V.useContext(ty);return ry({props:e,name:t,theme:{components:r}})}const hc={theme:void 0};function oy(e){let t,r;return function(o){let s=t;return(s===void 0||o.theme!==r)&&(hc.theme=o.theme,s=Kd(e(hc)),t=s,r=o.theme),s}}function sy(e=""){function t(...n){if(!n.length)return"";const o=n[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...n.slice(1))})`:`, ${o}`}return(n,...o)=>`var(--${e?`${e}-`:""}${n}${t(...o)})`}const pc=(e,t,r,n=[])=>{let o=e;t.forEach((s,a)=>{a===t.length-1?Array.isArray(o)?o[Number(s)]=r:o&&typeof o=="object"&&(o[s]=r):o&&typeof o=="object"&&(o[s]||(o[s]=n.includes(s)?[]:{}),o=o[s])})},ay=(e,t,r)=>{function n(o,s=[],a=[]){Object.entries(o).forEach(([i,l])=>{(!r||r&&!r([...s,i]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...s,i],Array.isArray(l)?[...a,i]:a):t([...s,i],l,a))})}n(e)},iy=(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 wa(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},s={},a={};return ay(e,(i,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(i,l))){const u=`--${r?`${r}-`:""}${i.join("-")}`,d=iy(i,l);Object.assign(o,{[u]:d}),pc(s,i,`var(${u})`,c),pc(a,i,`var(${u}, ${d})`,c)}},i=>i[0]==="vars"),{css:o,vars:s,varsWithDefaults:a}}function ly(e,t={}){const{getSelector:r=y,disableCssColorScheme:n,colorSchemeSelector:o}=t,{colorSchemes:s={},components:a,defaultColorScheme:i="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=wa(l,t);let h=d;const p={},{[i]:f,...m}=s;if(Object.entries(m||{}).forEach(([v,O])=>{const{vars:I,css:E,varsWithDefaults:w}=wa(O,t);h=rt(h,w),p[v]={css:E,vars:I}}),f){const{css:v,vars:O,varsWithDefaults:I}=wa(f,t);h=rt(h,I),p[i]={css:v,vars:O}}function y(v,O){var E,w;let I=o;if(o==="class"&&(I=".%s"),o==="data"&&(I="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(I=`[${o}="%s"]`),v){if(I==="media")return e.defaultColorScheme===v?":root":{[`@media (prefers-color-scheme: ${((w=(E=s[v])==null?void 0:E.palette)==null?void 0:w.mode)||v})`]:{":root":O}};if(I)return e.defaultColorScheme===v?`:root, ${I.replace("%s",String(v))}`:I.replace("%s",String(v))}return":root"}return{vars:h,generateThemeVars:()=>{let v={...c};return Object.entries(p).forEach(([,{vars:O}])=>{v=rt(v,O)}),v},generateStyleSheets:()=>{var P,k;const v=[],O=e.defaultColorScheme||"light";function I(b,A){Object.keys(A).length&&v.push(typeof b=="string"?{[b]:{...A}}:b)}I(r(void 0,{...u}),u);const{[O]:E,...w}=p;if(E){const{css:b}=E,A=(k=(P=s[O])==null?void 0:P.palette)==null?void 0:k.mode,_=!n&&A?{colorScheme:A,...b}:{...b};I(r(O,{..._}),_)}return Object.entries(w).forEach(([b,{css:A}])=>{var D,ne;const _=(ne=(D=s[b])==null?void 0:D.palette)==null?void 0:ne.mode,M=!n&&_?{colorScheme:_,...A}:{...A};I(r(b,{...M}),M)}),v}}}function cy(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 uy=ks(),dy=Jg("div",{name:"MuiStack",slot:"Root"});function hy(e){return eh({props:e,name:"MuiStack",defaultTheme:uy})}function py(e,t){const r=V.Children.toArray(e).filter(Boolean);return r.reduce((n,o,s)=>(n.push(o),s<r.length-1&&n.push(V.cloneElement(t,{key:`separator-${s}`})),n),[])}const fy=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],my=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...It({theme:t},va({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n}))};if(e.spacing){const n=As(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),s=va({values:e.direction,base:o}),a=va({values:e.spacing,base:o});typeof s=="object"&&Object.keys(s).forEach((l,c,u)=>{if(!s[l]){const h=c>0?s[u[c-1]]:"column";s[l]=h}}),r=rt(r,It({theme:t},a,(l,c)=>e.useFlexGap?{gap:wr(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${fy(c?s[c]:e.direction)}`]:wr(n,l)}}))}return r=zm(t.breakpoints,r),r};function gy(e={}){const{createStyledComponent:t=dy,useThemeProps:r=hy,componentName:n="MuiStack"}=e,o=()=>ws({root:["root"]},l=>pn(n,l),{}),s=t(my),a=V.forwardRef(function(l,c){const u=r(l),d=Dg(u),{component:h="div",direction:p="column",spacing:f=0,divider:m,children:y,className:S,useFlexGap:R=!1,...v}=d,O={direction:p,spacing:f,useFlexGap:R},I=o();return g.jsx(s,{as:h,ownerState:O,ref:c,className:Et(I.root,S),...v,children:m?py(y,m):y})});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:x.node,direction:x.oneOfType([x.oneOf(["column-reverse","column","row-reverse","row"]),x.arrayOf(x.oneOf(["column-reverse","column","row-reverse","row"])),x.object]),divider:x.node,spacing:x.oneOfType([x.arrayOf(x.oneOfType([x.number,x.string])),x.number,x.object,x.string]),sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object])}),a}const zn={black:"#000",white:"#fff"},yy={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"},Lr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Fr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Cn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},$r={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Nr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},zr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function rh(){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:zn.white,default:zn.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 by=rh();function nh(){return{text:{primary:zn.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:zn.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 fc=nh();function mc(e,t,r,n){const o=n.light||n,s=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Nn(e.main,o):t==="dark"&&(e.dark=$n(e.main,s)))}function xy(e="light"){return e==="dark"?{main:$r[200],light:$r[50],dark:$r[400]}:{main:$r[700],light:$r[400],dark:$r[800]}}function Sy(e="light"){return e==="dark"?{main:Lr[200],light:Lr[50],dark:Lr[400]}:{main:Lr[500],light:Lr[300],dark:Lr[700]}}function vy(e="light"){return e==="dark"?{main:Fr[500],light:Fr[300],dark:Fr[700]}:{main:Fr[700],light:Fr[400],dark:Fr[800]}}function Cy(e="light"){return e==="dark"?{main:Nr[400],light:Nr[300],dark:Nr[700]}:{main:Nr[700],light:Nr[500],dark:Nr[900]}}function wy(e="light"){return e==="dark"?{main:zr[400],light:zr[300],dark:zr[700]}:{main:zr[800],light:zr[500],dark:zr[900]}}function Oy(e="light"){return e==="dark"?{main:Cn[400],light:Cn[300],dark:Cn[700]}:{main:"#ed6c02",light:Cn[500],dark:Cn[900]}}function Gi(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...o}=e,s=e.primary||xy(t),a=e.secondary||Sy(t),i=e.error||vy(t),l=e.info||Cy(t),c=e.success||wy(t),u=e.warning||Oy(t);function d(m){const y=dc(m,fc.text.primary)>=r?fc.text.primary:by.text.primary;if(process.env.NODE_ENV!=="production"){const S=dc(m,y);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${y} on ${m}`,"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(`
53
- `))}return y}const h=({color:m,name:y,mainShade:S=500,lightShade:R=300,darkShade:v=700})=>{if(m={...m},!m.main&&m[S]&&(m.main=m[S]),!m.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${y?` (${y})`:""} provided to augmentColor(color) is invalid.
54
- The color object needs to have a \`main\` property or a \`${S}\` property.`:lr(11,y?` (${y})`:"",S));if(typeof m.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${y?` (${y})`:""} provided to augmentColor(color) is invalid.
55
- \`color.main\` should be a string, but \`${JSON.stringify(m.main)}\` was provided instead.
56
-
57
- Did you intend to use one of the following approaches?
58
-
59
- import { green } from "@mui/material/colors";
60
-
61
- const theme1 = createTheme({ palette: {
62
- primary: green,
63
- } });
64
-
65
- const theme2 = createTheme({ palette: {
66
- primary: { main: green[500] },
67
- } });`:lr(12,y?` (${y})`:"",JSON.stringify(m.main)));return mc(m,"light",R,n),mc(m,"dark",v,n),m.contrastText||(m.contrastText=d(m.main)),m};let p;return t==="light"?p=rh():t==="dark"&&(p=nh()),process.env.NODE_ENV!=="production"&&(p||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),rt({common:{...zn},mode:t,primary:h({color:s,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:i,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:yy,contrastThreshold:r,getContrastText:d,augmentColor:h,tonalOffset:n,...p},o)}function Ty(e){const t={};return Object.entries(e).forEach(n=>{const[o,s]=n;typeof s=="object"&&(t[o]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),t}function Ey(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Iy(e){return Math.round(e*1e5)/1e5}const gc={textTransform:"uppercase"},yc='"Roboto", "Helvetica", "Arial", sans-serif';function Ay(e,t){const{fontFamily:r=yc,fontSize:n=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:i=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}=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 l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const h=n/14,p=u||(y=>`${y/l*h}rem`),f=(y,S,R,v,O)=>({fontFamily:r,fontWeight:y,fontSize:p(S),lineHeight:R,...r===yc?{letterSpacing:`${Iy(v/S)}em`}:{},...O,...c}),m={h1:f(o,96,1.167,-1.5),h2:f(o,60,1.2,-.5),h3:f(s,48,1.167,0),h4:f(s,34,1.235,.25),h5:f(s,24,1.334,0),h6:f(a,20,1.6,.15),subtitle1:f(s,16,1.75,.15),subtitle2:f(a,14,1.57,.1),body1:f(s,16,1.5,.15),body2:f(s,14,1.43,.15),button:f(a,14,1.75,.4,gc),caption:f(s,12,1.66,.4),overline:f(s,12,2.66,1,gc),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return rt({htmlFontSize:l,pxToRem:p,fontFamily:r,fontSize:n,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:i,...m},d,{clone:!1})}const Ry=.2,Py=.14,My=.12;function Me(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Ry})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Py})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${My})`].join(",")}const _y=["none",Me(0,2,1,-1,0,1,1,0,0,1,3,0),Me(0,3,1,-2,0,2,2,0,0,1,5,0),Me(0,3,3,-2,0,3,4,0,0,1,8,0),Me(0,2,4,-1,0,4,5,0,0,1,10,0),Me(0,3,5,-1,0,5,8,0,0,1,14,0),Me(0,3,5,-1,0,6,10,0,0,1,18,0),Me(0,4,5,-2,0,7,10,1,0,2,16,1),Me(0,5,5,-3,0,8,10,1,0,3,14,2),Me(0,5,6,-3,0,9,12,1,0,3,16,2),Me(0,6,6,-3,0,10,14,1,0,4,18,3),Me(0,6,7,-4,0,11,15,1,0,4,20,3),Me(0,7,8,-4,0,12,17,2,0,5,22,4),Me(0,7,8,-4,0,13,19,2,0,5,24,4),Me(0,7,9,-4,0,14,21,2,0,5,26,4),Me(0,8,9,-5,0,15,22,2,0,6,28,5),Me(0,8,10,-5,0,16,24,2,0,6,30,5),Me(0,8,11,-5,0,17,26,2,0,6,32,5),Me(0,9,11,-5,0,18,28,2,0,7,34,6),Me(0,9,12,-6,0,19,29,2,0,7,36,6),Me(0,10,13,-6,0,20,31,3,0,8,38,7),Me(0,10,13,-6,0,21,33,3,0,8,40,7),Me(0,10,14,-6,0,22,35,3,0,8,42,7),Me(0,11,14,-7,0,23,36,3,0,9,44,8),Me(0,11,15,-7,0,24,38,3,0,9,46,8)],Vy={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)"},ky={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function bc(e){return`${Math.round(e)}ms`}function jy(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Dy(e){const t={...Vy,...e.easing},r={...ky,...e.duration};return{getAutoHeightDuration:jy,create:(o=["all"],s={})=>{const{duration:a=r.standard,easing:i=t.easeInOut,delay:l=0,...c}=s;if(process.env.NODE_ENV!=="production"){const u=h=>typeof h=="string",d=h=>!Number.isNaN(parseFloat(h));!u(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(a)&&!u(a)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${a}.`),u(i)||console.error('MUI: Argument "easing" must be a string.'),!d(l)&&!u(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="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(`
68
- `)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof a=="string"?a:bc(a)} ${i} ${typeof l=="string"?l:bc(l)}`).join(",")},...e,easing:t,duration:r}}const By={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Uy(e){return Vt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function oh(e={}){const t={...e};function r(n){const o=Object.entries(n);for(let s=0;s<o.length;s++){const[a,i]=o[s];!Uy(i)||a.startsWith("unstable_")?delete n[a]:Vt(i)&&(n[a]={...i},r(n[a]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
69
-
70
- const theme = ${JSON.stringify(t,null,2)};
71
-
72
- theme.breakpoints = createBreakpoints(theme.breakpoints || {});
73
- theme.transitions = createTransitions(theme.transitions || {});
74
-
75
- export default theme;`}function li(e={},...t){const{breakpoints:r,mixins:n={},spacing:o,palette:s={},transitions:a={},typography:i={},shape:l,...c}=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.":lr(20));const u=Gi(s),d=ks(e);let h=rt(d,{mixins:Ey(d.breakpoints,n),palette:u,shadows:_y.slice(),typography:Ay(u,i),transitions:Dy(a),zIndex:{...By}});if(h=rt(h,c),h=t.reduce((p,f)=>rt(p,f),h),process.env.NODE_ENV!=="production"){const p=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],f=(m,y)=>{let S;for(S in m){const R=m[S];if(p.includes(S)&&Object.keys(R).length>0){if(process.env.NODE_ENV!=="production"){const v=pn("",S);console.error([`MUI: The \`${y}\` component increases the CSS specificity of the \`${S}\` internal state.`,"You can not override it like this: ",JSON.stringify(m,null,2),"",`Instead, you need to use the '&.${v}' syntax:`,JSON.stringify({root:{[`&.${v}`]:R}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
76
- `))}m[S]={}}}};Object.keys(h.components).forEach(m=>{const y=h.components[m].styleOverrides;y&&m.startsWith("Mui")&&f(y,m)})}return h.unstable_sxConfig={...to,...c==null?void 0:c.unstable_sxConfig},h.unstable_sx=function(f){return nn({sx:f,theme:this})},h.toRuntimeSource=oh,h}function Ly(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 Fy=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=Ly(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function sh(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function ah(e){return e==="dark"?Fy:[]}function $y(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...o}=e,s=Gi(t);return{palette:s,opacity:{...sh(s.mode),...r},overlays:n||ah(s.mode),...o}}function Ny(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const zy=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Gy=e=>(t,r)=>{const n=e.rootSelector||":root",o=e.colorSchemeSelector;let s=o;if(o==="class"&&(s=".%s"),o==="data"&&(s="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(s=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return zy(e.cssVarPrefix).forEach(i=>{a[i]=r[i],delete r[i]}),s==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:a}}:s?{[s.replace("%s",t)]:a,[`${n}, ${s.replace("%s",t)}`]:r}:{[n]:{...r,...a}}}if(s&&s!=="media")return`${n}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(s)return s.replace("%s",String(t))}return n};function Hy(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function L(e,t,r){!e[t]&&r&&(e[t]=r)}function kn(e){return typeof e!="string"||!e.startsWith("hsl")?e:th(e)}function $t(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Vn(kn(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().
77
- 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 qy(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Rt=e=>{try{return e()}catch{}},Wy=(e="mui")=>sy(e);function Oa(e,t,r,n){if(!t)return;t=t===!0?{}:t;const o=n==="dark"?"dark":"light";if(!r){e[n]=$y({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:s,...a}=li({...r,palette:{mode:o,...t==null?void 0:t.palette}});return e[n]={...t,palette:s,opacity:{...sh(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||ah(o)},a}function Jy(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:a=Ny,colorSchemeSelector:i=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...c}=e,u=Object.keys(r)[0],d=n||(r.light&&u!=="light"?"light":u),h=Wy(s),{[d]:p,light:f,dark:m,...y}=r,S={...y};let R=p;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(R=!0),!R)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:lr(21,d));const v=Oa(S,R,c,d);f&&!S.light&&Oa(S,f,void 0,"light"),m&&!S.dark&&Oa(S,m,void 0,"dark");let O={defaultColorScheme:d,...v,cssVarPrefix:s,colorSchemeSelector:i,rootSelector:l,getCssVar:h,colorSchemes:S,font:{...Ty(v.typography),...v.font},spacing:qy(c.spacing)};Object.keys(O.colorSchemes).forEach(k=>{const b=O.colorSchemes[k].palette,A=_=>{const M=_.split("-"),D=M[1],ne=M[2];return h(_,b[D][ne])};if(b.mode==="light"&&(L(b.common,"background","#fff"),L(b.common,"onBackground","#000")),b.mode==="dark"&&(L(b.common,"background","#000"),L(b.common,"onBackground","#fff")),Hy(b,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),b.mode==="light"){L(b.Alert,"errorColor",Ae(b.error.light,.6)),L(b.Alert,"infoColor",Ae(b.info.light,.6)),L(b.Alert,"successColor",Ae(b.success.light,.6)),L(b.Alert,"warningColor",Ae(b.warning.light,.6)),L(b.Alert,"errorFilledBg",A("palette-error-main")),L(b.Alert,"infoFilledBg",A("palette-info-main")),L(b.Alert,"successFilledBg",A("palette-success-main")),L(b.Alert,"warningFilledBg",A("palette-warning-main")),L(b.Alert,"errorFilledColor",Rt(()=>b.getContrastText(b.error.main))),L(b.Alert,"infoFilledColor",Rt(()=>b.getContrastText(b.info.main))),L(b.Alert,"successFilledColor",Rt(()=>b.getContrastText(b.success.main))),L(b.Alert,"warningFilledColor",Rt(()=>b.getContrastText(b.warning.main))),L(b.Alert,"errorStandardBg",Re(b.error.light,.9)),L(b.Alert,"infoStandardBg",Re(b.info.light,.9)),L(b.Alert,"successStandardBg",Re(b.success.light,.9)),L(b.Alert,"warningStandardBg",Re(b.warning.light,.9)),L(b.Alert,"errorIconColor",A("palette-error-main")),L(b.Alert,"infoIconColor",A("palette-info-main")),L(b.Alert,"successIconColor",A("palette-success-main")),L(b.Alert,"warningIconColor",A("palette-warning-main")),L(b.AppBar,"defaultBg",A("palette-grey-100")),L(b.Avatar,"defaultBg",A("palette-grey-400")),L(b.Button,"inheritContainedBg",A("palette-grey-300")),L(b.Button,"inheritContainedHoverBg",A("palette-grey-A100")),L(b.Chip,"defaultBorder",A("palette-grey-400")),L(b.Chip,"defaultAvatarColor",A("palette-grey-700")),L(b.Chip,"defaultIconColor",A("palette-grey-700")),L(b.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),L(b.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),L(b.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),L(b.LinearProgress,"primaryBg",Re(b.primary.main,.62)),L(b.LinearProgress,"secondaryBg",Re(b.secondary.main,.62)),L(b.LinearProgress,"errorBg",Re(b.error.main,.62)),L(b.LinearProgress,"infoBg",Re(b.info.main,.62)),L(b.LinearProgress,"successBg",Re(b.success.main,.62)),L(b.LinearProgress,"warningBg",Re(b.warning.main,.62)),L(b.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.11)`),L(b.Slider,"primaryTrack",Re(b.primary.main,.62)),L(b.Slider,"secondaryTrack",Re(b.secondary.main,.62)),L(b.Slider,"errorTrack",Re(b.error.main,.62)),L(b.Slider,"infoTrack",Re(b.info.main,.62)),L(b.Slider,"successTrack",Re(b.success.main,.62)),L(b.Slider,"warningTrack",Re(b.warning.main,.62));const _=wo(b.background.default,.8);L(b.SnackbarContent,"bg",_),L(b.SnackbarContent,"color",Rt(()=>b.getContrastText(_))),L(b.SpeedDialAction,"fabHoverBg",wo(b.background.paper,.15)),L(b.StepConnector,"border",A("palette-grey-400")),L(b.StepContent,"border",A("palette-grey-400")),L(b.Switch,"defaultColor",A("palette-common-white")),L(b.Switch,"defaultDisabledColor",A("palette-grey-100")),L(b.Switch,"primaryDisabledColor",Re(b.primary.main,.62)),L(b.Switch,"secondaryDisabledColor",Re(b.secondary.main,.62)),L(b.Switch,"errorDisabledColor",Re(b.error.main,.62)),L(b.Switch,"infoDisabledColor",Re(b.info.main,.62)),L(b.Switch,"successDisabledColor",Re(b.success.main,.62)),L(b.Switch,"warningDisabledColor",Re(b.warning.main,.62)),L(b.TableCell,"border",Re(Co(b.divider,1),.88)),L(b.Tooltip,"bg",Co(b.grey[700],.92))}if(b.mode==="dark"){L(b.Alert,"errorColor",Re(b.error.light,.6)),L(b.Alert,"infoColor",Re(b.info.light,.6)),L(b.Alert,"successColor",Re(b.success.light,.6)),L(b.Alert,"warningColor",Re(b.warning.light,.6)),L(b.Alert,"errorFilledBg",A("palette-error-dark")),L(b.Alert,"infoFilledBg",A("palette-info-dark")),L(b.Alert,"successFilledBg",A("palette-success-dark")),L(b.Alert,"warningFilledBg",A("palette-warning-dark")),L(b.Alert,"errorFilledColor",Rt(()=>b.getContrastText(b.error.dark))),L(b.Alert,"infoFilledColor",Rt(()=>b.getContrastText(b.info.dark))),L(b.Alert,"successFilledColor",Rt(()=>b.getContrastText(b.success.dark))),L(b.Alert,"warningFilledColor",Rt(()=>b.getContrastText(b.warning.dark))),L(b.Alert,"errorStandardBg",Ae(b.error.light,.9)),L(b.Alert,"infoStandardBg",Ae(b.info.light,.9)),L(b.Alert,"successStandardBg",Ae(b.success.light,.9)),L(b.Alert,"warningStandardBg",Ae(b.warning.light,.9)),L(b.Alert,"errorIconColor",A("palette-error-main")),L(b.Alert,"infoIconColor",A("palette-info-main")),L(b.Alert,"successIconColor",A("palette-success-main")),L(b.Alert,"warningIconColor",A("palette-warning-main")),L(b.AppBar,"defaultBg",A("palette-grey-900")),L(b.AppBar,"darkBg",A("palette-background-paper")),L(b.AppBar,"darkColor",A("palette-text-primary")),L(b.Avatar,"defaultBg",A("palette-grey-600")),L(b.Button,"inheritContainedBg",A("palette-grey-800")),L(b.Button,"inheritContainedHoverBg",A("palette-grey-700")),L(b.Chip,"defaultBorder",A("palette-grey-700")),L(b.Chip,"defaultAvatarColor",A("palette-grey-300")),L(b.Chip,"defaultIconColor",A("palette-grey-300")),L(b.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),L(b.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),L(b.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),L(b.LinearProgress,"primaryBg",Ae(b.primary.main,.5)),L(b.LinearProgress,"secondaryBg",Ae(b.secondary.main,.5)),L(b.LinearProgress,"errorBg",Ae(b.error.main,.5)),L(b.LinearProgress,"infoBg",Ae(b.info.main,.5)),L(b.LinearProgress,"successBg",Ae(b.success.main,.5)),L(b.LinearProgress,"warningBg",Ae(b.warning.main,.5)),L(b.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.13)`),L(b.Slider,"primaryTrack",Ae(b.primary.main,.5)),L(b.Slider,"secondaryTrack",Ae(b.secondary.main,.5)),L(b.Slider,"errorTrack",Ae(b.error.main,.5)),L(b.Slider,"infoTrack",Ae(b.info.main,.5)),L(b.Slider,"successTrack",Ae(b.success.main,.5)),L(b.Slider,"warningTrack",Ae(b.warning.main,.5));const _=wo(b.background.default,.98);L(b.SnackbarContent,"bg",_),L(b.SnackbarContent,"color",Rt(()=>b.getContrastText(_))),L(b.SpeedDialAction,"fabHoverBg",wo(b.background.paper,.15)),L(b.StepConnector,"border",A("palette-grey-600")),L(b.StepContent,"border",A("palette-grey-600")),L(b.Switch,"defaultColor",A("palette-grey-300")),L(b.Switch,"defaultDisabledColor",A("palette-grey-600")),L(b.Switch,"primaryDisabledColor",Ae(b.primary.main,.55)),L(b.Switch,"secondaryDisabledColor",Ae(b.secondary.main,.55)),L(b.Switch,"errorDisabledColor",Ae(b.error.main,.55)),L(b.Switch,"infoDisabledColor",Ae(b.info.main,.55)),L(b.Switch,"successDisabledColor",Ae(b.success.main,.55)),L(b.Switch,"warningDisabledColor",Ae(b.warning.main,.55)),L(b.TableCell,"border",Ae(Co(b.divider,1),.68)),L(b.Tooltip,"bg",Co(b.grey[700],.92))}$t(b.background,"default"),$t(b.background,"paper"),$t(b.common,"background"),$t(b.common,"onBackground"),$t(b,"divider"),Object.keys(b).forEach(_=>{const M=b[_];_!=="tonalOffset"&&M&&typeof M=="object"&&(M.main&&L(b[_],"mainChannel",Vn(kn(M.main))),M.light&&L(b[_],"lightChannel",Vn(kn(M.light))),M.dark&&L(b[_],"darkChannel",Vn(kn(M.dark))),M.contrastText&&L(b[_],"contrastTextChannel",Vn(kn(M.contrastText))),_==="text"&&($t(b[_],"primary"),$t(b[_],"secondary")),_==="action"&&(M.active&&$t(b[_],"active"),M.selected&&$t(b[_],"selected")))})}),O=t.reduce((k,b)=>rt(k,b),O);const I={prefix:s,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:Gy(O)},{vars:E,generateThemeVars:w,generateStyleSheets:P}=ly(O,I);return O.vars=E,Object.entries(O.colorSchemes[O.defaultColorScheme]).forEach(([k,b])=>{O[k]=b}),O.generateThemeVars=w,O.generateStyleSheets=P,O.generateSpacing=function(){return Wd(c.spacing,As(this))},O.getColorSchemeSelector=cy(i),O.spacing=O.generateSpacing(),O.shouldSkipGeneratingVar=a,O.unstable_sxConfig={...to,...c==null?void 0:c.unstable_sxConfig},O.unstable_sx=function(b){return nn({sx:b,theme:this})},O.toRuntimeSource=oh,O}function xc(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Gi({...r===!0?{}:r.palette,mode:t})})}function ih(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:o=r?void 0:{light:!0},defaultColorScheme:s=r==null?void 0:r.mode,...a}=e,i=s||"light",l=o==null?void 0:o[i],c={...o,...r?{[i]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return li(e,...t);let u=r;"palette"in e||c[i]&&(c[i]!==!0?u=c[i].palette:i==="dark"&&(u={mode:"dark"}));const d=li({...e,palette:u},...t);return d.defaultColorScheme=i,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},xc(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},xc(d,"light",c.light)),d}return!r&&!("light"in c)&&i==="light"&&(c.light=!0),Jy({...a,colorSchemes:c,defaultColorScheme:i,...typeof n!="boolean"&&n},...t)}const Hi=ih();function lh(){const e=Jd(Hi);return process.env.NODE_ENV!=="production"&&V.useDebugValue(e),e[Fi]||e}function Yy({props:e,name:t}){return eh({props:e,name:t,defaultTheme:Hi,themeId:Fi})}function qi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ky=e=>qi(e)&&e!=="classes",ft=Xd({themeId:Fi,defaultTheme:Hi,rootShouldForwardProp:Ky});function Ds(...e){const t=V.useRef(void 0),r=V.useCallback(n=>{const o=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const a=s,i=a(n);return typeof i=="function"?i:()=>{a(null)}}return s.current=n,()=>{s.current=null}});return()=>{o.forEach(s=>s==null?void 0:s())}},e);return V.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}let Sc=0;function Qy(e){const[t,r]=V.useState(e),n=t;return V.useEffect(()=>{t==null&&(Sc+=1,r(`mui-${Sc}`))},[t]),n}const Xy={...V},vc=Xy.useId;function Zy(e){return vc!==void 0?vc():Qy(e)}class e0{constructor(t){this.value=void 0,this.listeners=void 0,this.subscribe=r=>(this.listeners.add(r),()=>{this.listeners.delete(r)}),this.getSnapshot=()=>this.value,this.update=r=>{const n=r(this.value);n!==this.value&&(this.value=n,this.listeners.forEach(o=>o(n)))},this.value=t,this.listeners=new Set}}const Bs=({params:e,store:t})=>{V.useEffect(()=>{t.update(n=>K({},n,{animation:K({},n.animation,{skip:e.skipAnimation})}))},[t,e.skipAnimation]);const r=V.useCallback(()=>{let n=!1;return t.update(o=>K({},o,{animation:K({},o.animation,{skipAnimationRequests:o.animation.skipAnimationRequests+1})})),()=>{n||(n=!0,t.update(o=>K({},o,{animation:K({},o.animation,{skipAnimationRequests:o.animation.skipAnimationRequests-1})})))}},[t]);return Bt(()=>{if(typeof window>"u"||!(window!=null&&window.matchMedia))return;let o;const s=i=>{i.matches?o=r():o==null||o()},a=window.matchMedia("(prefers-reduced-motion)");return s(a),a.addEventListener("change",s),()=>{a.removeEventListener("change",s)}},[r,t]),{instance:{disableAnimation:r}}};Bs.params={skipAnimation:!0};Bs.getDefaultizedParams=({params:e})=>K({},e,{skipAnimation:e.skipAnimation??!1});Bs.getInitialState=({skipAnimation:e})=>{const t=typeof window>"u"||!(window!=null&&window.matchMedia),r=process.env.NODE_ENV==="test"?t:!1;return{animation:{skip:e,skipAnimationRequests:r?1:0}}};var t0=(e,t,r)=>{if(t.length===1&&t[0]===r){let n=!1;try{const o={};e(o)===o&&(n=!0)}catch{}if(n){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
78
- \`createSelector([state => state.todos], todos => todos)\`
79
- This could lead to inefficient memoization and unnecessary re-renders.
80
- Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},r0=(e,t,r)=>{const{memoize:n,memoizeOptions:o}=t,{inputSelectorResults:s,inputSelectorResultsCopy:a}=e,i=n(()=>({}),...o);if(!(i.apply(null,s)===i.apply(null,a))){let c;try{throw new Error}catch(u){({stack:c}=u)}console.warn(`An input selector returned a different result when passed same arguments.
81
- This means your output selector will likely run more frequently than intended.
82
- Avoid returning a new reference inside your input selector, e.g.
83
- \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:s,secondInputs:a,stack:c})}},n0={inputStabilityCheck:"once",identityFunctionCheck:"once"},ns=Symbol("NOT_FOUND");function o0(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function s0(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function a0(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Cc=e=>Array.isArray(e)?e:[e];function i0(e){const t=Array.isArray(e[0])?e[0]:e;return a0(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function wc(e,t){const r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var l0=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...n0,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:t0},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:r0}}};function c0(e){let t;return{get(r){return t&&e(t.key,r)?t.value:ns},put(r,n){t={key:r,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function u0(e,t){let r=[];function n(i){const l=r.findIndex(c=>t(i,c.key));if(l>-1){const c=r[l];return l>0&&(r.splice(l,1),r.unshift(c)),c.value}return ns}function o(i,l){n(i)===ns&&(r.unshift({key:i,value:l}),r.length>e&&r.pop())}function s(){return r}function a(){r=[]}return{get:n,put:o,getEntries:s,clear:a}}var d0=(e,t)=>e===t;function h0(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;const{length:o}=r;for(let s=0;s<o;s++)if(!e(r[s],n[s]))return!1;return!0}}function p0(e,t){const r=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:n=d0,maxSize:o=1,resultEqualityCheck:s}=r,a=h0(n);let i=0;const l=o<=1?c0(a):u0(o,a);function c(){let u=l.get(arguments);if(u===ns){if(u=e.apply(null,arguments),i++,s){const h=l.getEntries().find(p=>s(p.value,u));h&&(u=h.value,i!==0&&i--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>i,c.resetResultsCount=()=>{i=0},c}var f0=class{constructor(e){this.value=e}deref(){return this.value}},m0=typeof WeakRef<"u"?WeakRef:f0,g0=0,Oc=1;function Oo(){return{s:g0,v:void 0,o:null,p:null}}function ch(e,t={}){let r=Oo();const{resultEqualityCheck:n}=t;let o,s=0;function a(){var d;let i=r;const{length:l}=arguments;for(let h=0,p=l;h<p;h++){const f=arguments[h];if(typeof f=="function"||typeof f=="object"&&f!==null){let m=i.o;m===null&&(i.o=m=new WeakMap);const y=m.get(f);y===void 0?(i=Oo(),m.set(f,i)):i=y}else{let m=i.p;m===null&&(i.p=m=new Map);const y=m.get(f);y===void 0?(i=Oo(),m.set(f,i)):i=y}}const c=i;let u;if(i.s===Oc)u=i.v;else if(u=e.apply(null,arguments),s++,n){const h=((d=o==null?void 0:o.deref)==null?void 0:d.call(o))??o;h!=null&&n(h,u)&&(u=h,s!==0&&s--),o=typeof u=="object"&&u!==null||typeof u=="function"?new m0(u):u}return c.s=Oc,c.v=u,u}return a.clearCache=()=>{r=Oo(),a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function uh(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let s=0,a=0,i,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),o0(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...r,...l},{memoize:d,memoizeOptions:h=[],argsMemoize:p=ch,argsMemoizeOptions:f=[],devModeChecks:m={}}=u,y=Cc(h),S=Cc(f),R=i0(o),v=d(function(){return s++,c.apply(null,arguments)},...y);let O=!0;const I=p(function(){a++;const w=wc(R,arguments);if(i=v.apply(null,w),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:P,inputStabilityCheck:k}=l0(O,m);if(P.shouldRun&&P.run(c,w,i),k.shouldRun){const b=wc(R,arguments);k.run({inputSelectorResults:w,inputSelectorResultsCopy:b},{memoize:d,memoizeOptions:y},arguments)}O&&(O=!1)}return i},...S);return Object.assign(I,{resultFunc:c,memoizedResultFunc:v,dependencies:R,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>i,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:d,argsMemoize:p})};return Object.assign(n,{withTypes:()=>n}),n}var y0=uh(ch),b0=Object.assign((e,t=y0)=>{s0(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(s=>e[s]);return t(n,(...s)=>s.reduce((a,i,l)=>(a[r[l]]=i,a),{}))},{withTypes:()=>b0});const x0=uh({memoize:p0,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),Tc=new WeakMap,he=(...e)=>(r,...n)=>{const o=r.cacheKey;let s=Tc.get(o);s||(s=new Map,Tc.set(o,s));const a=s.get(e);if(a)return a(r,...n);const i=x0(...e);return s.set(e,i),i(r,...n)},S0=e=>e.animation,v0=he([S0],e=>e.skip||e.skipAnimationRequests>0);function Un(e){return e&&e.ownerDocument||document}function C0(e){return Un(e).defaultView||window}var To={exports:{}},Ta={},Eo={exports:{}},Ea={};/**
84
- * @license React
85
- * use-sync-external-store-shim.production.js
86
- *
87
- * Copyright (c) Meta Platforms, Inc. and affiliates.
88
- *
89
- * This source code is licensed under the MIT license found in the
90
- * LICENSE file in the root directory of this source tree.
91
- */var Ec;function w0(){if(Ec)return Ea;Ec=1;var e=j;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,o=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function i(d,h){var p=h(),f=n({inst:{value:p,getSnapshot:h}}),m=f[0].inst,y=f[1];return s(function(){m.value=p,m.getSnapshot=h,l(m)&&y({inst:m})},[d,p,h]),o(function(){return l(m)&&y({inst:m}),d(function(){l(m)&&y({inst:m})})},[d]),a(p),p}function l(d){var h=d.getSnapshot;d=d.value;try{var p=h();return!r(d,p)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:i;return Ea.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Ea}var Ia={};/**
92
- * @license React
93
- * use-sync-external-store-shim.development.js
94
- *
95
- * Copyright (c) Meta Platforms, Inc. and affiliates.
96
- *
97
- * This source code is licensed under the MIT license found in the
98
- * LICENSE file in the root directory of this source tree.
99
- */var Ic;function O0(){return Ic||(Ic=1,process.env.NODE_ENV!=="production"&&function(){function e(p,f){return p===f&&(p!==0||1/p===1/f)||p!==p&&f!==f}function t(p,f){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=f();if(!d){var y=f();s(m,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}y=a({inst:{value:m,getSnapshot:f}});var S=y[0].inst,R=y[1];return l(function(){S.value=m,S.getSnapshot=f,r(S)&&R({inst:S})},[p,m,f]),i(function(){return r(S)&&R({inst:S}),p(function(){r(S)&&R({inst:S})})},[p]),c(m),m}function r(p){var f=p.getSnapshot;p=p.value;try{var m=f();return!s(p,m)}catch{return!0}}function n(p,f){return f()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=j,s=typeof Object.is=="function"?Object.is:e,a=o.useState,i=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;Ia.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ia}var Ac;function dh(){return Ac||(Ac=1,process.env.NODE_ENV==="production"?Eo.exports=w0():Eo.exports=O0()),Eo.exports}/**
100
- * @license React
101
- * use-sync-external-store-shim/with-selector.production.js
102
- *
103
- * Copyright (c) Meta Platforms, Inc. and affiliates.
104
- *
105
- * This source code is licensed under the MIT license found in the
106
- * LICENSE file in the root directory of this source tree.
107
- */var Rc;function T0(){if(Rc)return Ta;Rc=1;var e=j,t=dh();function r(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,s=e.useRef,a=e.useEffect,i=e.useMemo,l=e.useDebugValue;return Ta.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var f=s(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function S(E){if(!R){if(R=!0,v=E,E=h(E),p!==void 0&&m.hasValue){var w=m.value;if(p(w,E))return O=w}return O=E}if(w=O,n(v,E))return w;var P=h(E);return p!==void 0&&p(w,P)?(v=E,w):(v=E,O=P)}var R=!1,v,O,I=d===void 0?null:d;return[function(){return S(u())},I===null?void 0:function(){return S(I())}]},[u,d,h,p]);var y=o(c,f[0],f[1]);return a(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},Ta}var Aa={};/**
108
- * @license React
109
- * use-sync-external-store-shim/with-selector.development.js
110
- *
111
- * Copyright (c) Meta Platforms, Inc. and affiliates.
112
- *
113
- * This source code is licensed under the MIT license found in the
114
- * LICENSE file in the root directory of this source tree.
115
- */var Pc;function E0(){return Pc||(Pc=1,process.env.NODE_ENV!=="production"&&function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=j,r=dh(),n=typeof Object.is=="function"?Object.is:e,o=r.useSyncExternalStore,s=t.useRef,a=t.useEffect,i=t.useMemo,l=t.useDebugValue;Aa.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var f=s(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function S(E){if(!R){if(R=!0,v=E,E=h(E),p!==void 0&&m.hasValue){var w=m.value;if(p(w,E))return O=w}return O=E}if(w=O,n(v,E))return w;var P=h(E);return p!==void 0&&p(w,P)?(v=E,w):(v=E,O=P)}var R=!1,v,O,I=d===void 0?null:d;return[function(){return S(u())},I===null?void 0:function(){return S(I())}]},[u,d,h,p]);var y=o(c,f[0],f[1]);return a(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Aa}var Mc;function I0(){return Mc||(Mc=1,process.env.NODE_ENV==="production"?To.exports=T0():To.exports=E0()),To.exports}var A0=I0();const R0=Object.is,at=(e,t,r=[],n=R0)=>{const o=s=>t(s,...r);return A0.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o,n)},P0="DEFAULT_X_AXIS_KEY",M0="DEFAULT_Y_AXIS_KEY",_0={top:20,bottom:20,left:20,right:20},V0=45,k0=25,hh=20,fn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.x},mn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.y},j0=he([mn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="left"?t+(r.width||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),D0=he([mn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="right"?t+(r.width||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),B0=he([fn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="top"?t+(r.height||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),U0=he([fn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="bottom"?t+(r.height||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),L0=e=>e.dimensions,ph=e=>e.dimensions.width,fh=e=>e.dimensions.height,F0=e=>e.dimensions.margin.top,$0=e=>e.dimensions.margin.right,N0=e=>e.dimensions.margin.bottom,z0=e=>e.dimensions.margin.left,ro=he([ph,fh,F0,$0,N0,z0,B0,D0,U0,j0],(e,t,r,n,o,s,a,i,l,c)=>({width:e-s-n-c-i,left:s+c,right:n+i,height:t-r-o-a-l,top:r+a,bottom:o+l})),G0=he([L0],e=>({width:e.propsWidth,height:e.propsHeight})),H0=he([ph,fh],(e,t)=>({width:e,height:t}));function mh(e,t){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:t?K({},t,e):e}const q0=10,Us=({params:e,store:t,svgRef:r})=>{const n=e.width!==void 0&&e.height!==void 0,o=V.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[s,a]=V.useState(0),[i,l]=V.useState(0),c=V.useCallback(()=>{const f=r==null?void 0:r.current;if(!f)return{};const y=C0(f).getComputedStyle(f),S=Math.floor(parseFloat(y.height))||0,R=Math.floor(parseFloat(y.width))||0;return t.update(v=>v.dimensions.width===R&&v.dimensions.height===S?v:K({},v,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:e.width??R,height:e.height??S,propsWidth:e.width,propsHeight:e.height}})),{height:S,width:R}},[t,r,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]);V.useEffect(()=>{t.update(f=>{const m=e.width??f.dimensions.width,y=e.height??f.dimensions.height;return K({},f,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:m,height:y,propsHeight:e.height,propsWidth:e.width}})})},[t,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]),V.useEffect(()=>{o.current.displayError=!0},[]),Bt(()=>{if(n||!o.current.initialCompute||o.current.computeRun>q0)return;const f=c();f.width!==s||f.height!==i?(o.current.computeRun+=1,f.width!==void 0&&a(f.width),f.height!==void 0&&l(f.height)):o.current.initialCompute&&(o.current.initialCompute=!1)},[i,s,c,n]),Bt(()=>{if(n)return()=>{};c();const f=r.current;if(typeof ResizeObserver>"u")return()=>{};let m;const y=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{c()})});return f&&y.observe(f),()=>{m&&cancelAnimationFrame(m),f&&y.unobserve(f)}},[c,n,r]),process.env.NODE_ENV!=="production"&&(o.current.displayError&&e.width===void 0&&s===0&&(console.error("MUI X Charts: ChartContainer does not have `width` prop, and its container has no `width` defined."),o.current.displayError=!1),o.current.displayError&&e.height===void 0&&i===0&&(console.error("MUI X Charts: ChartContainer does not have `height` prop, and its container has no `height` defined."),o.current.displayError=!1));const u=at(t,ro),d=V.useCallback(f=>f>=u.left-1&&f<=u.left+u.width,[u.left,u.width]),h=V.useCallback(f=>f>=u.top-1&&f<=u.top+u.height,[u.height,u.top]);return{instance:{isPointInside:V.useCallback((f,m,y)=>y&&"closest"in y&&y.closest("[data-drawing-container]")?!0:d(f)&&h(m),[d,h]),isXInside:d,isYInside:h}}};Us.params={width:!0,height:!0,margin:!0};Us.getDefaultizedParams=({params:e})=>K({},e,{margin:mh(e.margin,_0)});Us.getInitialState=({width:e,height:t,margin:r})=>({dimensions:{margin:r,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const Wi=({params:e,store:t})=>(Bt(()=>{t.update(r=>K({},r,{experimentalFeatures:e.experimentalFeatures}))},[t,e.experimentalFeatures]),{});Wi.params={experimentalFeatures:!0};Wi.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});const W0=e=>e.experimentalFeatures,gh=he([W0],e=>!!(e!=null&&e.preferStrictDomainInLineCharts));let _c=0;const J0=()=>(_c+=1,`mui-chart-${_c}`),Ji=({params:e,store:t})=>(V.useEffect(()=>{t.update(r=>e.id===void 0||e.id===r.id.providedChartId&&r.id.chartId!==void 0?r:K({},r,{id:K({},r.id,{chartId:e.id??J0()})}))},[t,e.id]),{});Ji.params={id:!0};Ji.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const Y0=e=>e.id,K0=he([Y0],e=>e.chartId),Q0=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],X0=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],yh=e=>e==="dark"?X0:Q0,bh=({series:e,colors:t,seriesConfig:r,dataset:n})=>{const o={};e.forEach((a,i)=>{var u;const l=r[a.type].getSeriesWithDefaultValues(a,i,t),c=l.id;if(o[a.type]===void 0&&(o[a.type]={series:{},seriesOrder:[]}),((u=o[a.type])==null?void 0:u.series[c])!==void 0)throw new Error(`MUI X Charts: series' id "${c}" is not unique.`);o[a.type].series[c]=l,o[a.type].seriesOrder.push(c)});const s={};return Object.keys(r).forEach(a=>{var l,c;const i=o[a];i!==void 0&&(s[a]=((c=(l=r[a])==null?void 0:l.seriesProcessor)==null?void 0:c.call(l,i,n))??o[a])}),s},Ls=({params:e,store:t,seriesConfig:r})=>{const{series:n,dataset:o,theme:s,colors:a}=e,i=V.useRef(!0);return V.useEffect(()=>{if(i.current){i.current=!1;return}t.update(l=>K({},l,{series:K({},l.series,{processedSeries:bh({series:n,colors:typeof a=="function"?a(s):a,seriesConfig:r,dataset:o})})}))},[a,o,n,s,r,t]),{}};Ls.params={dataset:!0,series:!0,colors:!0,theme:!0};const Z0=[];Ls.getDefaultizedParams=({params:e})=>{var t;return K({},e,{series:(t=e.series)!=null&&t.length?e.series:Z0,colors:e.colors??yh,theme:e.theme??"light"})};Ls.getInitialState=({series:e=[],colors:t,theme:r,dataset:n},o,s)=>({series:{seriesConfig:s,processedSeries:bh({series:e,colors:typeof t=="function"?t(r):t,seriesConfig:s,dataset:n})}});const xh=e=>e.series,no=he([xh],e=>e.processedSeries),Fs=he([xh],e=>e.seriesConfig),eb={abort:!0,animationcancel:!0,animationend:!0,animationiteration:!0,animationstart:!0,auxclick:!0,beforeinput:!0,beforetoggle:!0,blur:!0,cancel:!0,canplay:!0,canplaythrough:!0,change:!0,click:!0,close:!0,compositionend:!0,compositionstart:!0,compositionupdate:!0,contextlost:!0,contextmenu:!0,contextrestored:!0,copy:!0,cuechange:!0,cut:!0,dblclick:!0,drag:!0,dragend:!0,dragenter:!0,dragleave:!0,dragover:!0,dragstart:!0,drop:!0,durationchange:!0,emptied:!0,ended:!0,error:!0,focus:!0,focusin:!0,focusout:!0,formdata:!0,gotpointercapture:!0,input:!0,invalid:!0,keydown:!0,keypress:!0,keyup:!0,load:!0,loadeddata:!0,loadedmetadata:!0,loadstart:!0,lostpointercapture:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,paste:!0,pause:!0,play:!0,playing:!0,pointercancel:!0,pointerdown:!0,pointerenter:!0,pointerleave:!0,pointermove:!0,pointerout:!0,pointerover:!0,pointerup:!0,progress:!0,ratechange:!0,reset:!0,resize:!0,scroll:!0,scrollend:!0,securitypolicyviolation:!0,seeked:!0,seeking:!0,select:!0,selectionchange:!0,selectstart:!0,slotchange:!0,stalled:!0,submit:!0,suspend:!0,timeupdate:!0,toggle:!0,touchcancel:!0,touchend:!0,touchmove:!0,touchstart:!0,transitioncancel:!0,transitionend:!0,transitionrun:!0,transitionstart:!0,volumechange:!0,waiting:!0,webkitanimationend:!0,webkitanimationiteration:!0,webkitanimationstart:!0,webkittransitionend:!0,wheel:!0};class Sh{constructor(t){if(this.name=void 0,this.preventDefault=void 0,this.stopPropagation=void 0,this.preventIf=void 0,this.requiredKeys=void 0,this.keyboardManager=void 0,this.pointerMode=void 0,this.customData={},this.pointerManager=void 0,this.gesturesRegistry=void 0,this.element=void 0,this.state=void 0,this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,!t||!t.name)throw new Error("Gesture must be initialized with a valid name.");if(t.name in eb)throw new Error(`Gesture can't be created with a native event name. Tried to use "${t.name}". Please use a custom name instead.`);this.name=t.name,this.preventDefault=t.preventDefault??!1,this.stopPropagation=t.stopPropagation??!1,this.preventIf=t.preventIf??[],this.requiredKeys=t.requiredKeys??[],this.pointerMode=t.pointerMode??[]}init(t,r,n,o){this.element=t,this.pointerManager=r,this.gesturesRegistry=n,this.keyboardManager=o;const s=`${this.name}ChangeOptions`;this.element.addEventListener(s,this.handleOptionsChange.bind(this));const a=`${this.name}ChangeState`;this.element.addEventListener(a,this.handleStateChange.bind(this))}handleOptionsChange(t){t&&t.detail&&this.updateOptions(t.detail)}updateOptions(t){this.preventDefault=t.preventDefault??this.preventDefault,this.stopPropagation=t.stopPropagation??this.stopPropagation,this.preventIf=t.preventIf??this.preventIf,this.requiredKeys=t.requiredKeys??this.requiredKeys,this.pointerMode=t.pointerMode??this.pointerMode}handleStateChange(t){t&&t.detail&&this.updateState(t.detail)}updateState(t){Object.assign(this.state,t)}getTargetElement(t){return this.isActive||this.element===t.target||this.element.contains(t.target)?this.element:null}set isActive(t){t?this.gesturesRegistry.registerActiveGesture(this.element,this):this.gesturesRegistry.unregisterActiveGesture(this.element,this)}get isActive(){return this.gesturesRegistry.isGestureActive(this.element,this)??!1}shouldPreventGesture(t){if(!this.keyboardManager.areKeysPressed(this.requiredKeys))return!0;if(this.preventIf.length===0)return!1;const r=this.gesturesRegistry.getActiveGestures(t);return this.preventIf.some(n=>r[n])}isPointerTypeAllowed(t){return!this.pointerMode||this.pointerMode.length===0?!0:this.pointerMode.includes(t)}destroy(){const t=`${this.name}ChangeOptions`;this.element.removeEventListener(t,this.handleOptionsChange.bind(this));const r=`${this.name}ChangeState`;this.element.removeEventListener(r,this.handleStateChange.bind(this))}}class tb{constructor(){this.activeGestures=new Map}registerActiveGesture(t,r){this.activeGestures.has(t)||this.activeGestures.set(t,new Set);const n=this.activeGestures.get(t),o={gesture:r,element:t};n.add(o)}unregisterActiveGesture(t,r){const n=this.activeGestures.get(t);n&&(n.forEach(o=>{o.gesture===r&&n.delete(o)}),n.size===0&&this.activeGestures.delete(t))}getActiveGestures(t){const r=this.activeGestures.get(t);return r?Array.from(r).reduce((n,o)=>(n[o.gesture.name]=!0,n),{}):{}}isGestureActive(t,r){const n=this.activeGestures.get(t);return n?Array.from(n).some(o=>o.gesture===r):!1}destroy(){this.activeGestures.clear()}unregisterElement(t){this.activeGestures.delete(t)}}class rb{constructor(){this.pressedKeys=new Set,this.handleKeyDown=t=>{this.pressedKeys.add(t.key)},this.handleKeyUp=t=>{this.pressedKeys.delete(t.key)},this.clearKeys=()=>{this.pressedKeys.clear()},this.initialize()}initialize(){typeof window>"u"||(window.addEventListener("keydown",this.handleKeyDown),window.addEventListener("keyup",this.handleKeyUp),window.addEventListener("blur",this.clearKeys))}areKeysPressed(t){return!t||t.length===0?!0:t.every(r=>r==="ControlOrMeta"?this.pressedKeys.has("Control")||this.pressedKeys.has("Meta"):this.pressedKeys.has(r))}destroy(){typeof window<"u"&&(window.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("keyup",this.handleKeyUp),window.removeEventListener("blur",this.clearKeys)),this.clearKeys()}}class nb{constructor(t){this.root=void 0,this.touchAction=void 0,this.passive=void 0,this.preventEventInterruption=!0,this.pointers=new Map,this.gestureHandlers=new Set,this.handleInterruptEvents=r=>{if(this.preventEventInterruption&&"pointerType"in r&&r.pointerType==="touch"){r.preventDefault();return}const n=new PointerEvent("forceCancel",{bubbles:!1,cancelable:!1}),o=this.pointers.values().next().value;if(this.pointers.size>0&&o){Object.defineProperties(n,{clientX:{value:o.clientX},clientY:{value:o.clientY},pointerId:{value:o.pointerId},pointerType:{value:o.pointerType}});for(const[s,a]of this.pointers.entries()){const i=K({},a,{type:"forceCancel"});this.pointers.set(s,i)}}this.notifyHandlers(n),this.pointers.clear()},this.handlePointerEvent=r=>{const{type:n,pointerId:o}=r;if(n==="pointerdown"){if(this.pointers.set(o,this.createPointerData(r)),r.target instanceof Element)try{r.target.setPointerCapture(o)}catch{}}else if(n==="pointermove")this.pointers.set(o,this.createPointerData(r));else if(n==="pointerup"||n==="pointercancel"||n==="forceCancel"){if(r.target instanceof Element)try{r.target.releasePointerCapture(o)}catch{}this.pointers.set(o,this.createPointerData(r)),this.notifyHandlers(r),this.pointers.delete(o);return}this.notifyHandlers(r)},this.root=t.root??document.documentElement,this.touchAction=t.touchAction||"auto",this.passive=t.passive!==!1,this.preventEventInterruption=t.preventEventInterruption!==!1,this.setupEventListeners()}registerGestureHandler(t){return this.gestureHandlers.add(t),()=>{this.gestureHandlers.delete(t)}}getPointers(){return new Map(this.pointers)}setupEventListeners(){this.touchAction!=="auto"&&(this.root.style.touchAction=this.touchAction),this.root.addEventListener("pointerdown",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointermove",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointerup",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointercancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("forceCancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("blur",this.handleInterruptEvents),this.root.addEventListener("contextmenu",this.handleInterruptEvents)}notifyHandlers(t){this.gestureHandlers.forEach(r=>r(this.pointers,t))}createPointerData(t){return{pointerId:t.pointerId,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,target:t.target,timeStamp:t.timeStamp,type:t.type,isPrimary:t.isPrimary,pressure:t.pressure,width:t.width,height:t.height,pointerType:t.pointerType,srcEvent:t}}destroy(){this.root.removeEventListener("pointerdown",this.handlePointerEvent),this.root.removeEventListener("pointermove",this.handlePointerEvent),this.root.removeEventListener("pointerup",this.handlePointerEvent),this.root.removeEventListener("pointercancel",this.handlePointerEvent),this.root.removeEventListener("forceCancel",this.handlePointerEvent),this.root.removeEventListener("blur",this.handleInterruptEvents),this.root.removeEventListener("contextmenu",this.handleInterruptEvents),this.pointers.clear(),this.gestureHandlers.clear()}}class ob{constructor(t){this.gestureTemplates=new Map,this.elementGestureMap=new Map,this.activeGesturesRegistry=new tb,this.pointerManager=void 0,this.keyboardManager=new rb,this.pointerManager=new nb({root:t.root,touchAction:t.touchAction,passive:t.passive}),t.gestures&&t.gestures.length>0&&t.gestures.forEach(r=>{this.addGestureTemplate(r)})}addGestureTemplate(t){this.gestureTemplates.has(t.name)&&console.warn(`Gesture template with name "${t.name}" already exists. It will be overwritten.`),this.gestureTemplates.set(t.name,t)}setGestureOptions(t,r,n){const o=this.elementGestureMap.get(r);if(!o||!o.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const s=new CustomEvent(`${t}ChangeOptions`,{detail:n,bubbles:!1,cancelable:!1});r.dispatchEvent(s)}setGestureState(t,r,n){const o=this.elementGestureMap.get(r);if(!o||!o.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const s=new CustomEvent(`${t}ChangeState`,{detail:n,bubbles:!1,cancelable:!1});r.dispatchEvent(s)}registerElement(t,r,n){if(Array.isArray(t))return t.forEach(s=>{const a=n==null?void 0:n[s];this.registerSingleGesture(s,r,a)}),r;const o=n==null?void 0:n[t];return this.registerSingleGesture(t,r,o),r}registerSingleGesture(t,r,n){const o=this.gestureTemplates.get(t);if(!o)return console.error(`Gesture template "${t}" not found.`),!1;this.elementGestureMap.has(r)||this.elementGestureMap.set(r,new Map);const s=this.elementGestureMap.get(r);s.has(t)&&(console.warn(`Element already has gesture "${t}" registered. It will be replaced.`),this.unregisterElement(t,r));const a=o.clone(n);return a.init(r,this.pointerManager,this.activeGesturesRegistry,this.keyboardManager),s.set(t,a),!0}unregisterElement(t,r){const n=this.elementGestureMap.get(r);return!n||!n.has(t)?!1:(n.get(t).destroy(),n.delete(t),this.activeGesturesRegistry.unregisterElement(r),n.size===0&&this.elementGestureMap.delete(r),!0)}unregisterAllGestures(t){const r=this.elementGestureMap.get(t);if(r){for(const[,n]of r)n.destroy(),this.activeGesturesRegistry.unregisterElement(t);this.elementGestureMap.delete(t)}}destroy(){for(const[t]of this.elementGestureMap)this.unregisterAllGestures(t);this.gestureTemplates.clear(),this.elementGestureMap.clear(),this.activeGesturesRegistry.destroy(),this.keyboardManager.destroy()}}class oo extends Sh{constructor(t){super(t),this.unregisterHandler=null,this.originalTarget=null,this.optionsType=void 0,this.mutableOptionsType=void 0,this.minPointers=void 0,this.maxPointers=void 0,this.minPointers=t.minPointers??1,this.maxPointers=t.maxPointers??1/0}init(t,r,n,o){super.init(t,r,n,o),this.unregisterHandler=this.pointerManager.registerGestureHandler((s,a)=>this.handlePointerEvent(s,a))}updateOptions(t){super.updateOptions(t),this.minPointers=t.minPointers??this.minPointers,this.maxPointers=t.maxPointers??this.maxPointers}getRelevantPointers(t,r){return t.filter(n=>this.isPointerTypeAllowed(n.pointerType)&&(r===n.target||n.target===this.originalTarget||r===this.originalTarget||r.contains(n.target)))}destroy(){this.unregisterHandler&&(this.unregisterHandler(),this.unregisterHandler=null),super.destroy()}}function sb(e,t){const r=t.x-e.x,n=t.y-e.y;return Math.sqrt(r*r+n*n)}function Ra(e){if(e.length<2)return 0;let t=0,r=0;for(let n=0;n<e.length;n+=1)for(let o=n+1;o<e.length;o+=1)t+=sb({x:e[n].clientX,y:e[n].clientY},{x:e[o].clientX,y:e[o].clientY}),r+=1;return r>0?t/r:0}function Yt(e){if(e.length===0)return{x:0,y:0};const t=e.reduce((r,n)=>(r.x+=n.clientX,r.y+=n.clientY,r),{x:0,y:0});return{x:t.x/e.length,y:t.y/e.length}}function gn(e,t){return`${e}${t==="ongoing"?"":t.charAt(0).toUpperCase()+t.slice(1)}`}const Io=1e-5,nr=1e-5,Vc=.15;function ab(e,t){const r=t.x-e.x,n=t.y-e.y,o={vertical:null,horizontal:null,mainAxis:null},s=ib(t,e),a=Math.abs(r)>Math.abs(n)?"horizontal":"vertical",i=s||a==="horizontal"?Io:Vc,l=s?Io:a==="horizontal"?Vc:Io;return Math.abs(r)>i&&(o.horizontal=r>0?"right":"left"),Math.abs(n)>l&&(o.vertical=n>0?"down":"up"),o.mainAxis=s?"diagonal":a,o}function ib(e,t){const r=t.x-e.x,n=t.y-e.y,o=Math.atan2(n,r)*180/Math.PI;return o>=-45+nr&&o<=-22.5+nr||o>=22.5+nr&&o<=45+nr||o>=135+nr&&o<=157.5+nr||o>=-157.5+nr&&o<=-135+nr}function lb(e,t){if(!e.vertical&&!e.horizontal)return!1;if(t.length===0)return!0;const r=e.vertical===null||t.includes(e.vertical),n=e.horizontal===null||t.includes(e.horizontal);return r&&n}const cb=0,ub=e=>e>cb?1:e<-0?-1:0;class Yi extends oo{constructor(t){super(t),this.state={lastPosition:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.handleElementEnterBound=void 0,this.handleElementLeaveBound=void 0,this.handleElementEnterBound=this.handleElementEnter.bind(this),this.handleElementLeaveBound=this.handleElementLeave.bind(this),this.threshold=t.threshold||0}clone(t){return new Yi(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}init(t,r,n,o){super.init(t,r,n,o),this.element.addEventListener("pointerenter",this.handleElementEnterBound),this.element.addEventListener("pointerleave",this.handleElementLeaveBound)}destroy(){this.element.removeEventListener("pointerenter",this.handleElementEnterBound),this.element.removeEventListener("pointerleave",this.handleElementLeaveBound),this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t)}resetState(){this.isActive=!1,this.state={lastPosition:null}}handleElementEnter(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen")return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());if(n.length>=this.minPointers&&n.length<=this.maxPointers){this.isActive=!0;const o={x:t.clientX,y:t.clientY};this.state.lastPosition=o,this.emitMoveEvent(this.element,"start",n,t),this.emitMoveEvent(this.element,"ongoing",n,t)}}handleElementLeave(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen"||!this.isActive)return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());this.emitMoveEvent(this.element,"end",n,t),this.resetState()}handlePointerEvent(t,r){if(r.type!=="pointermove"||r.pointerType!=="mouse"&&r.pointerType!=="pen")return;this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const n=Array.from(t.values()),o=this.getTargetElement(r);if(!o||n.length<this.minPointers||n.length>this.maxPointers)return;if(this.shouldPreventGesture(o)){if(!this.isActive)return;this.resetState(),this.emitMoveEvent(o,"end",n,r);return}const s={x:r.clientX,y:r.clientY};this.state.lastPosition=s,this.isActive||(this.isActive=!0,this.emitMoveEvent(o,"start",n,r)),this.emitMoveEvent(o,"ongoing",n,r)}emitMoveEvent(t,r,n,o){const s=this.state.lastPosition||Yt(n),a=this.gesturesRegistry.getActiveGestures(t),i={gestureName:this.name,centroid:s,target:o.target,srcEvent:o,phase:r,pointers:n,timeStamp:o.timeStamp,activeGestures:a,customData:this.customData},l=gn(this.name,r),c=new CustomEvent(l,{bubbles:!0,cancelable:!0,detail:i});t.dispatchEvent(c)}}class Ki extends oo{constructor(t){super(t),this.state={startPointers:new Map,startCentroid:null,lastCentroid:null,movementThresholdReached:!1,totalDeltaX:0,totalDeltaY:0,activeDeltaX:0,activeDeltaY:0,lastDirection:{vertical:null,horizontal:null,mainAxis:null},lastDeltas:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.direction=void 0,this.direction=t.direction||["up","down","left","right"],this.threshold=t.threshold||0}clone(t){return new Ki(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,direction:[...this.direction],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.direction=t.direction||this.direction}resetState(){this.isActive=!1,this.state=K({},this.state,{startPointers:new Map,startCentroid:null,lastCentroid:null,lastDeltas:null,activeDeltaX:0,activeDeltaY:0,movementThresholdReached:!1,lastDirection:{vertical:null,horizontal:null,mainAxis:null}})}handlePointerEvent(t,r){const n=Array.from(t.values());if(r.type==="forceCancel"){this.cancel(r.target,n,r);return}const o=this.getTargetElement(r);if(!o)return;if(this.shouldPreventGesture(o)){this.cancel(o,n,r);return}const s=this.getRelevantPointers(n,o);if(s.length<this.minPointers||s.length>this.maxPointers){this.cancel(o,s,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(s.forEach(a=>{this.state.startPointers.set(a.pointerId,a)}),this.originalTarget=o,this.state.startCentroid=Yt(s),this.state.lastCentroid=K({},this.state.startCentroid));break;case"pointermove":if(this.state.startCentroid&&s.length>=this.minPointers){const a=Yt(s),i=a.x-this.state.startCentroid.x,l=a.y-this.state.startCentroid.y,c=Math.sqrt(i*i+l*l),u=ab(this.state.lastCentroid??this.state.startCentroid,a),d=this.state.lastCentroid?a.x-this.state.lastCentroid.x:0,h=this.state.lastCentroid?a.y-this.state.lastCentroid.y:0;!this.state.movementThresholdReached&&c>=this.threshold&&lb(u,this.direction)?(this.state.movementThresholdReached=!0,this.isActive=!0,this.state.lastDeltas={x:d,y:h},this.state.totalDeltaX+=d,this.state.totalDeltaY+=h,this.state.activeDeltaX+=d,this.state.activeDeltaY+=h,this.emitPanEvent(o,"start",s,r,a),this.emitPanEvent(o,"ongoing",s,r,a)):this.state.movementThresholdReached&&this.isActive&&(this.state.lastDeltas={x:d,y:h},this.state.totalDeltaX+=d,this.state.totalDeltaY+=h,this.state.activeDeltaX+=d,this.state.activeDeltaY+=h,this.emitPanEvent(o,"ongoing",s,r,a)),this.state.lastCentroid=a,this.state.lastDirection=u}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive&&this.state.movementThresholdReached){if(s.filter(a=>a.type!=="pointerup"&&a.type!=="pointercancel").length<this.minPointers){const a=this.state.lastCentroid||this.state.startCentroid;r.type==="pointercancel"&&this.emitPanEvent(o,"cancel",s,r,a),this.emitPanEvent(o,"end",s,r,a),this.resetState()}}else this.resetState();break}}emitPanEvent(t,r,n,o,s){var S,R;if(!this.state.startCentroid)return;const a=((S=this.state.lastDeltas)==null?void 0:S.x)??0,i=((R=this.state.lastDeltas)==null?void 0:R.y)??0,l=this.state.startPointers.values().next().value,c=l?(o.timeStamp-l.timeStamp)/1e3:0,u=c>0?a/c:0,d=c>0?i/c:0,h=Math.sqrt(u*u+d*d),p=this.gesturesRegistry.getActiveGestures(t),f={gestureName:this.name,initialCentroid:this.state.startCentroid,centroid:s,target:o.target,srcEvent:o,phase:r,pointers:n,timeStamp:o.timeStamp,deltaX:a,deltaY:i,direction:this.state.lastDirection,velocityX:u,velocityY:d,velocity:h,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,activeDeltaX:this.state.activeDeltaX,activeDeltaY:this.state.activeDeltaY,activeGestures:p,customData:this.customData},m=gn(this.name,r),y=new CustomEvent(m,{bubbles:!0,cancelable:!0,detail:f});t.dispatchEvent(y),this.preventDefault&&o.preventDefault(),this.stopPropagation&&o.stopPropagation()}cancel(t,r,n){if(this.isActive){const o=t??this.element;this.emitPanEvent(o,"cancel",r,n,this.state.lastCentroid),this.emitPanEvent(o,"end",r,n,this.state.lastCentroid)}this.resetState()}}class Qi extends oo{constructor(t){super(K({},t,{minPointers:t.minPointers??2})),this.state={startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,totalScale:1,deltaScale:0},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.threshold=t.threshold??0}clone(t){return new Qi(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t)}resetState(){this.isActive=!1,this.state=K({},this.state,{startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,deltaScale:0})}handlePointerEvent(t,r){const n=Array.from(t.values()),o=this.getTargetElement(r);if(!o)return;if(this.shouldPreventGesture(o)){this.isActive&&(this.emitPinchEvent(o,"cancel",n,r),this.resetState());return}const s=this.getRelevantPointers(n,o);switch(r.type){case"pointerdown":if(s.length>=2&&!this.isActive){const a=Ra(s);this.state.startDistance=a,this.state.lastDistance=a,this.state.lastTime=r.timeStamp,this.originalTarget=o}break;case"pointermove":if(this.state.startDistance&&s.length>=this.minPointers){const a=Ra(s),i=Math.abs(a-this.state.lastDistance);if(i!==0&&i>=this.threshold){const l=this.state.startDistance?a/this.state.startDistance:1,c=l/this.state.lastScale;this.state.totalScale*=c;const u=(r.timeStamp-this.state.lastTime)/1e3;if(this.state.lastDistance){const h=(a-this.state.lastDistance)/u;this.state.velocity=Number.isNaN(h)?0:h}this.state.lastDistance=a,this.state.deltaScale=l-this.state.lastScale,this.state.lastScale=l,this.state.lastTime=r.timeStamp,this.isActive?this.emitPinchEvent(o,"ongoing",s,r):(this.isActive=!0,this.emitPinchEvent(o,"start",s,r),this.emitPinchEvent(o,"ongoing",s,r))}}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive){const a=s.filter(i=>i.type!=="pointerup"&&i.type!=="pointercancel");if(a.length<this.minPointers)r.type==="pointercancel"&&this.emitPinchEvent(o,"cancel",s,r),this.emitPinchEvent(o,"end",s,r),this.resetState();else if(a.length>=2){const i=Ra(a);this.state.startDistance=i/this.state.lastScale}}break}}emitPinchEvent(t,r,n,o){const s=Yt(n),a=this.state.lastDistance,i=this.state.lastScale,l=this.gesturesRegistry.getActiveGestures(t),c={gestureName:this.name,centroid:s,target:o.target,srcEvent:o,phase:r,pointers:n,timeStamp:o.timeStamp,scale:i,deltaScale:this.state.deltaScale,totalScale:this.state.totalScale,distance:a,velocity:this.state.velocity,activeGestures:l,direction:ub(this.state.velocity),customData:this.customData};this.preventDefault&&o.preventDefault(),this.stopPropagation&&o.stopPropagation();const u=gn(this.name,r),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,detail:c});t.dispatchEvent(d)}}class Xi extends oo{constructor(t){super(t),this.state={startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.duration=void 0,this.maxDistance=void 0,this.duration=t.duration??500,this.maxDistance=t.maxDistance??10}clone(t){return new Xi(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,duration:this.duration,maxDistance:this.maxDistance,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.clearPressTimer(),this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.duration=t.duration??this.duration,this.maxDistance=t.maxDistance??this.maxDistance}resetState(){this.clearPressTimer(),this.isActive=!1,this.state=K({},this.state,{startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1})}clearPressTimer(){this.state.timerId!==null&&(clearTimeout(this.state.timerId),this.state.timerId=null)}handlePointerEvent(t,r){const n=Array.from(t.values());if(r.type==="forceCancel"){this.cancelPress(r.target,n,r);return}const o=this.getTargetElement(r);if(!o)return;if(this.shouldPreventGesture(o)){this.isActive&&this.cancelPress(o,n,r);return}const s=this.getRelevantPointers(n,o);if(s.length<this.minPointers||s.length>this.maxPointers){this.isActive&&this.cancelPress(o,s,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(this.state.startCentroid=Yt(s),this.state.lastPosition=K({},this.state.startCentroid),this.state.startTime=r.timeStamp,this.isActive=!0,this.originalTarget=o,this.clearPressTimer(),this.state.timerId=setTimeout(()=>{if(this.isActive&&this.state.startCentroid){this.state.pressThresholdReached=!0;const a=this.state.lastPosition;this.emitPressEvent(o,"start",s,r,a),this.emitPressEvent(o,"ongoing",s,r,a)}},this.duration));break;case"pointermove":if(this.isActive&&this.state.startCentroid){const a=Yt(s);this.state.lastPosition=a;const i=a.x-this.state.startCentroid.x,l=a.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelPress(o,s,r)}break;case"pointerup":if(this.isActive){if(this.state.pressThresholdReached){const a=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(o,"end",s,r,a)}this.resetState()}break;case"pointercancel":case"forceCancel":this.cancelPress(o,s,r);break}}emitPressEvent(t,r,n,o,s){const a=this.gesturesRegistry.getActiveGestures(t),i=o.timeStamp-this.state.startTime,l={gestureName:this.name,centroid:s,target:o.target,srcEvent:o,phase:r,pointers:n,timeStamp:o.timeStamp,x:s.x,y:s.y,duration:i,activeGestures:a,customData:this.customData},c=gn(this.name,r),u=new CustomEvent(c,{bubbles:!0,cancelable:!0,detail:l});t.dispatchEvent(u),this.preventDefault&&o.preventDefault(),this.stopPropagation&&o.stopPropagation()}cancelPress(t,r,n){if(this.isActive&&this.state.pressThresholdReached){const o=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(t??this.element,"cancel",r,n,o),this.emitPressEvent(t??this.element,"end",r,n,o)}this.resetState()}}class Zi extends oo{constructor(t){super(t),this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.maxDistance=void 0,this.taps=void 0,this.maxDistance=t.maxDistance??10,this.taps=t.taps??1}clone(t){return new Zi(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,maxDistance:this.maxDistance,taps:this.taps,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.maxDistance=t.maxDistance??this.maxDistance,this.taps=t.taps??this.taps}resetState(){this.isActive=!1,this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null}}handlePointerEvent(t,r){const n=Array.from(t.values()),o=this.getTargetElement(r);if(!o)return;const s=this.getRelevantPointers(n,o);if(this.shouldPreventGesture(o)||s.length<this.minPointers||s.length>this.maxPointers){this.isActive&&this.cancelTap(o,s,r);return}switch(r.type){case"pointerdown":this.isActive||(this.state.startCentroid=Yt(s),this.state.lastPosition=K({},this.state.startCentroid),this.isActive=!0,this.originalTarget=o);break;case"pointermove":if(this.isActive&&this.state.startCentroid){const a=Yt(s);this.state.lastPosition=a;const i=a.x-this.state.startCentroid.x,l=a.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelTap(o,s,r)}break;case"pointerup":if(this.isActive){this.state.currentTapCount+=1;const a=this.state.lastPosition||this.state.startCentroid;if(!a){this.cancelTap(o,s,r);return}this.state.currentTapCount>=this.taps?(this.fireTapEvent(o,s,r,a),this.resetState()):(this.state.lastTapTime=r.timeStamp,this.isActive=!1,this.state.startCentroid=null,setTimeout(()=>{this.state&&this.state.currentTapCount>0&&this.state.currentTapCount<this.taps&&(this.state.currentTapCount=0)},300))}break;case"pointercancel":case"forceCancel":this.cancelTap(o,s,r);break}}fireTapEvent(t,r,n,o){const s=this.gesturesRegistry.getActiveGestures(t),a={gestureName:this.name,centroid:o,target:n.target,srcEvent:n,phase:"end",pointers:r,timeStamp:n.timeStamp,x:o.x,y:o.y,tapCount:this.state.currentTapCount,activeGestures:s,customData:this.customData},i=new CustomEvent(this.name,{bubbles:!0,cancelable:!0,detail:a});t.dispatchEvent(i),this.preventDefault&&n.preventDefault(),this.stopPropagation&&n.stopPropagation()}cancelTap(t,r,n){if(this.state.startCentroid||this.state.lastPosition){const o=this.state.lastPosition||this.state.startCentroid,s=this.gesturesRegistry.getActiveGestures(t),a={gestureName:this.name,centroid:o,target:n.target,srcEvent:n,phase:"cancel",pointers:r,timeStamp:n.timeStamp,x:o.x,y:o.y,tapCount:this.state.currentTapCount,activeGestures:s,customData:this.customData},i=gn(this.name,"cancel"),l=new CustomEvent(i,{bubbles:!0,cancelable:!0,detail:a});t.dispatchEvent(l)}this.resetState()}}class el extends Sh{constructor(t){super(t),this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.sensitivity=void 0,this.max=void 0,this.min=void 0,this.initialDelta=void 0,this.invert=void 0,this.handleWheelEventBound=void 0,this.sensitivity=t.sensitivity??1,this.max=t.max??Number.MAX_SAFE_INTEGER,this.min=t.min??Number.MIN_SAFE_INTEGER,this.initialDelta=t.initialDelta??0,this.invert=t.invert??!1,this.state.totalDeltaX=this.initialDelta,this.state.totalDeltaY=this.initialDelta,this.state.totalDeltaZ=this.initialDelta,this.handleWheelEventBound=this.handleWheelEvent.bind(this)}clone(t){return new el(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,sensitivity:this.sensitivity,max:this.max,min:this.min,initialDelta:this.initialDelta,invert:this.invert,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}init(t,r,n,o){super.init(t,r,n,o),this.element.addEventListener("wheel",this.handleWheelEventBound)}destroy(){this.element.removeEventListener("wheel",this.handleWheelEventBound),this.resetState(),super.destroy()}resetState(){this.isActive=!1,this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0}}updateOptions(t){super.updateOptions(t),this.sensitivity=t.sensitivity??this.sensitivity,this.max=t.max??this.max,this.min=t.min??this.min,this.initialDelta=t.initialDelta??this.initialDelta,this.invert=t.invert??this.invert}handleWheelEvent(t){if(this.shouldPreventGesture(this.element))return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());this.state.totalDeltaX+=t.deltaX*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaY+=t.deltaY*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaZ+=t.deltaZ*this.sensitivity*(this.invert?-1:1),["totalDeltaX","totalDeltaY","totalDeltaZ"].forEach(o=>{this.state[o]<this.min&&(this.state[o]=this.min),this.state[o]>this.max&&(this.state[o]=this.max)}),this.emitWheelEvent(n,t)}emitWheelEvent(t,r){const n=t.length>0?Yt(t):{x:r.clientX,y:r.clientY},o=this.gesturesRegistry.getActiveGestures(this.element),s={gestureName:this.name,centroid:n,target:r.target,srcEvent:r,phase:"ongoing",pointers:t,timeStamp:r.timeStamp,deltaX:r.deltaX*this.sensitivity*(this.invert?-1:1),deltaY:r.deltaY*this.sensitivity*(this.invert?-1:1),deltaZ:r.deltaZ*this.sensitivity*(this.invert?-1:1),deltaMode:r.deltaMode,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,totalDeltaZ:this.state.totalDeltaZ,activeGestures:o,customData:this.customData};this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const a=gn(this.name,"ongoing"),i=new CustomEvent(a,{bubbles:!0,cancelable:!0,detail:s});this.element.dispatchEvent(i)}}const Gr=e=>e.preventDefault(),tl=({svgRef:e})=>{V.useEffect(()=>{const r=e.current;if(!r)return;const n=new ob({gestures:[new Ki({name:"pan",threshold:0,maxPointers:1}),new Yi({name:"move",preventIf:["pan","pinch"]}),new Qi({name:"pinch",threshold:5,preventIf:["pan"]}),new el({name:"turnWheel",sensitivity:.01,initialDelta:1}),new Zi({name:"tap",maxDistance:10,preventIf:["pan","pinch"]}),new Xi({name:"quickPress",duration:50,maxDistance:10})]});return n.registerElement(["pan","move","pinch","turnWheel","tap","quickPress"],r),()=>{n.destroy()}},[e]);const t=V.useCallback((r,n,o)=>{const s=e.current;return s==null||s.addEventListener(r,n,o),{cleanup:()=>s==null?void 0:s.removeEventListener(r,n)}},[e]);return V.useEffect(()=>{const r=e.current;return r==null||r.addEventListener("gesturestart",Gr),r==null||r.addEventListener("gesturechange",Gr),r==null||r.addEventListener("gestureend",Gr),()=>{r==null||r.removeEventListener("gesturestart",Gr),r==null||r.removeEventListener("gesturechange",Gr),r==null||r.removeEventListener("gestureend",Gr)}},[e]),{instance:{addInteractionListener:t}}};tl.params={};tl.getInitialState=()=>({});const db=[Ji,Wi,Us,Ls,tl,Bs],hb=["apiRef"],pb=e=>{let{plugins:t}=e,r=ir(e.props,hb);const n={};t.forEach(a=>{Object.assign(n,a.params)});const o={};return Object.keys(r).forEach(a=>{const i=r[a];n[a]&&(o[a]=i)}),t.reduce((a,i)=>i.getDefaultizedParams?i.getDefaultizedParams({params:a}):a,o)};let kc=0;function fb(e,t,r){const n=Zy(),o=V.useMemo(()=>[...db,...e],[e]),s=pb({plugins:o,props:t});s.id=s.id??n;const i=V.useRef({}).current,l=gb(t.apiRef),c=V.useRef(null),u=V.useRef(null),d=V.useRef(null);if(d.current==null){kc+=1;const f={cacheKey:{id:kc}};o.forEach(m=>{m.getInitialState&&Object.assign(f,m.getInitialState(s,f,r))}),d.current=new e0(f)}const h=f=>{const m=f({instance:i,params:s,plugins:o,store:d.current,svgRef:u,chartRootRef:c,seriesConfig:r});m.publicAPI&&Object.assign(l.current,m.publicAPI),m.instance&&Object.assign(i,m.instance)};return o.forEach(h),{contextValue:V.useMemo(()=>({store:d.current,publicAPI:l.current,instance:i,svgRef:u,chartRootRef:c}),[i,l])}}function mb(e){return e.current==null&&(e.current={}),e}function gb(e){const t=V.useRef({});return e?mb(e):t}const rl=V.createContext(null);process.env.NODE_ENV!=="production"&&(rl.displayName="ChartContext");const jc=new Set;function Gn(e,t="warning"){if(process.env.NODE_ENV==="production")return;const r=Array.isArray(e)?e.join(`
116
- `):e;jc.has(r)||(jc.add(r),t==="error"?console.error(r):console.warn(r))}function yb(e){const{componentName:t,propName:r,controlled:n,defaultValue:o,warningPrefix:s="MUI X"}=e,[{initialDefaultValue:a,isControlled:i}]=V.useState({initialDefaultValue:o,isControlled:n!==void 0});i!==(n!==void 0)&&Gn([`${s}: A component is changing the ${i?"":"un"}controlled ${r} state of ${t} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} 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"],"error"),JSON.stringify(a)!==JSON.stringify(o)&&Gn([`${s}: A component is changing the default ${r} state of an uncontrolled ${t} after being initialized. To suppress this warning opt to use a controlled ${t}.`],"error")}const vh=process.env.NODE_ENV==="production"?()=>{}:yb,Ch=4,wh=20+2*Ch,bb=40+2*Ch,xb="hover",Ao={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",slider:{enabled:!1,preview:!1,size:wh,showTooltip:xb}},nl=(e,t,r)=>{var n;if(e)return e===!0?K({axisId:t,axisDirection:r},Ao):K({axisId:t,axisDirection:r},Ao,e,{slider:K({},Ao.slider,{size:((n=e.slider)==null?void 0:n.preview)??Ao.slider.preview?bb:wh},e.slider)})};function Oh(e,t){const r={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:P0,scaleType:"linear"}]).map((s,a)=>{var p;const i=s.dataKey,l=a===0?"bottom":"none",c=s.position??l,u=k0+(s.label?hh:0),d=s.id??`defaultized-x-axis-${a}`,h=K({offset:r[c]},s,{id:d,position:c,height:s.height??u,zoom:nl(s.zoom,d,"x")});if(c!=="none"&&(r[c]+=h.height,(p=h.zoom)!=null&&p.slider.enabled&&(r[c]+=h.zoom.slider.size)),i===void 0||s.data!==void 0)return h;if(t===void 0)throw new Error("MUI X Charts: x-axis uses `dataKey` but no `dataset` is provided.");return K({},h,{data:t.map(f=>f[i])})})}function Th(e,t){const r={right:0,left:0,none:0};return(e&&e.length>0?e:[{id:M0,scaleType:"linear"}]).map((s,a)=>{var p;const i=s.dataKey,l=a===0?"left":"none",c=s.position??l,u=V0+(s.label?hh:0),d=s.id??`defaultized-y-axis-${a}`,h=K({offset:r[c]},s,{id:d,position:c,width:s.width??u,zoom:nl(s.zoom,d,"y")});if(c!=="none"&&(r[c]+=h.width,(p=h.zoom)!=null&&p.slider.enabled&&(r[c]+=h.zoom.slider.size)),i===void 0||s.data!==void 0)return h;if(t===void 0)throw new Error("MUI X Charts: y-axis uses `dataKey` but no `dataset` is provided.");return K({},h,{data:t.map(f=>f[i])})})}function Go(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Sb(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ol(e){let t,r,n;e.length!==2?(t=Go,r=(i,l)=>Go(e(i),l),n=(i,l)=>e(i)-l):(t=e===Go||e===Sb?e:vb,r=e,n=e);function o(i,l,c=0,u=i.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(i[d],l)<0?c=d+1:u=d}while(c<u)}return c}function s(i,l,c=0,u=i.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(i[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(i,l,c=0,u=i.length){const d=o(i,l,c,u-1);return d>c&&n(i[d-1],l)>-n(i[d],l)?d-1:d}return{left:o,center:a,right:s}}function vb(){return 0}function Cb(e){return e===null?NaN:+e}const wb=ol(Go),Eh=wb.right;ol(Cb).center;class Dc extends Map{constructor(t,r=Eb){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,o]of t)this.set(n,o)}get(t){return super.get(Bc(this,t))}has(t){return super.has(Bc(this,t))}set(t,r){return super.set(Ob(this,t),r)}delete(t){return super.delete(Tb(this,t))}}function Bc({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Ob({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Tb({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function Eb(e){return e!==null&&typeof e=="object"?e.valueOf():e}const Ib=Math.sqrt(50),Ab=Math.sqrt(10),Rb=Math.sqrt(2);function os(e,t,r){const n=(t-e)/Math.max(0,r),o=Math.floor(Math.log10(n)),s=n/Math.pow(10,o),a=s>=Ib?10:s>=Ab?5:s>=Rb?2:1;let i,l,c;return o<0?(c=Math.pow(10,-o)/a,i=Math.round(e*c),l=Math.round(t*c),i/c<e&&++i,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*a,i=Math.round(e/c),l=Math.round(t/c),i*c<e&&++i,l*c>t&&--l),l<i&&.5<=r&&r<2?os(e,t,r*2):[i,l,c]}function ci(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[o,s,a]=n?os(t,e,r):os(e,t,r);if(!(s>=o))return[];const i=s-o+1,l=new Array(i);if(n)if(a<0)for(let c=0;c<i;++c)l[c]=(s-c)/-a;else for(let c=0;c<i;++c)l[c]=(s-c)*a;else if(a<0)for(let c=0;c<i;++c)l[c]=(o+c)/-a;else for(let c=0;c<i;++c)l[c]=(o+c)*a;return l}function ui(e,t,r){return t=+t,e=+e,r=+r,os(e,t,r)[2]}function di(e,t,r){t=+t,e=+e,r=+r;const n=t<e,o=n?ui(t,e,r):ui(e,t,r);return(n?-1:1)*(o<0?1/-o:o)}function Pb(e,t,r){e=+e,t=+t,r=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+r;for(var n=-1,o=Math.max(0,Math.ceil((t-e)/r))|0,s=new Array(o);++n<o;)s[n]=e+n*r;return s}function hr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Mb(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Uc=Symbol("implicit");function ss(){var e=new Dc,t=[],r=[],n=Uc;function o(s){let a=e.get(s);if(a===void 0){if(n!==Uc)return n;e.set(s,a=t.push(s)-1)}return r[a%r.length]}return o.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new Dc;for(const a of s)e.has(a)||e.set(a,t.push(a)-1);return o},o.range=function(s){return arguments.length?(r=Array.from(s),o):r.slice()},o.unknown=function(s){return arguments.length?(n=s,o):n},o.copy=function(){return ss(t,r).unknown(n)},hr.apply(o,arguments),o}function sl(){var e=ss().unknown(void 0),t=e.domain,r=e.range,n=0,o=1,s,a,i=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,p=o<n,f=p?o:n,m=p?n:o;s=(m-f)/Math.max(1,h-l+c*2),i&&(s=Math.floor(s)),f+=(m-f-s*(h-l))*u,a=s*(1-l),i&&(f=Math.round(f),a=Math.round(a));var y=Pb(h).map(function(S){return f+s*S});return r(p?y.reverse():y)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([n,o]=h,n=+n,o=+o,d()):[n,o]},e.rangeRound=function(h){return[n,o]=h,n=+n,o=+o,i=!0,d()},e.bandwidth=function(){return a},e.step=function(){return s},e.round=function(h){return arguments.length?(i=!!h,d()):i},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),d()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,d()):c},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return sl(t(),[n,o]).round(i).paddingInner(l).paddingOuter(c).align(u)},hr.apply(d(),arguments)}function Ih(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ih(t())},e}function _b(){return Ih(sl.apply(null,arguments).paddingInner(1))}function al(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Ah(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function so(){}var Hn=.7,as=1/Hn,Zr="\\s*([+-]?\\d+)\\s*",qn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Dt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vb=/^#([0-9a-f]{3,8})$/,kb=new RegExp(`^rgb\\(${Zr},${Zr},${Zr}\\)$`),jb=new RegExp(`^rgb\\(${Dt},${Dt},${Dt}\\)$`),Db=new RegExp(`^rgba\\(${Zr},${Zr},${Zr},${qn}\\)$`),Bb=new RegExp(`^rgba\\(${Dt},${Dt},${Dt},${qn}\\)$`),Ub=new RegExp(`^hsl\\(${qn},${Dt},${Dt}\\)$`),Lb=new RegExp(`^hsla\\(${qn},${Dt},${Dt},${qn}\\)$`),Lc={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};al(so,Wn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Fc,formatHex:Fc,formatHex8:Fb,formatHsl:$b,formatRgb:$c,toString:$c});function Fc(){return this.rgb().formatHex()}function Fb(){return this.rgb().formatHex8()}function $b(){return Rh(this).formatHsl()}function $c(){return this.rgb().formatRgb()}function Wn(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Vb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Nc(t):r===3?new it(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ro(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ro(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=kb.exec(e))?new it(t[1],t[2],t[3],1):(t=jb.exec(e))?new it(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Db.exec(e))?Ro(t[1],t[2],t[3],t[4]):(t=Bb.exec(e))?Ro(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ub.exec(e))?Hc(t[1],t[2]/100,t[3]/100,1):(t=Lb.exec(e))?Hc(t[1],t[2]/100,t[3]/100,t[4]):Lc.hasOwnProperty(e)?Nc(Lc[e]):e==="transparent"?new it(NaN,NaN,NaN,0):null}function Nc(e){return new it(e>>16&255,e>>8&255,e&255,1)}function Ro(e,t,r,n){return n<=0&&(e=t=r=NaN),new it(e,t,r,n)}function Nb(e){return e instanceof so||(e=Wn(e)),e?(e=e.rgb(),new it(e.r,e.g,e.b,e.opacity)):new it}function hi(e,t,r,n){return arguments.length===1?Nb(e):new it(e,t,r,n??1)}function it(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}al(it,hi,Ah(so,{brighter(e){return e=e==null?as:Math.pow(as,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Hn:Math.pow(Hn,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new it(vr(this.r),vr(this.g),vr(this.b),is(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:zc,formatHex:zc,formatHex8:zb,formatRgb:Gc,toString:Gc}));function zc(){return`#${br(this.r)}${br(this.g)}${br(this.b)}`}function zb(){return`#${br(this.r)}${br(this.g)}${br(this.b)}${br((isNaN(this.opacity)?1:this.opacity)*255)}`}function Gc(){const e=is(this.opacity);return`${e===1?"rgb(":"rgba("}${vr(this.r)}, ${vr(this.g)}, ${vr(this.b)}${e===1?")":`, ${e})`}`}function is(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function br(e){return e=vr(e),(e<16?"0":"")+e.toString(16)}function Hc(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ot(e,t,r,n)}function Rh(e){if(e instanceof Ot)return new Ot(e.h,e.s,e.l,e.opacity);if(e instanceof so||(e=Wn(e)),!e)return new Ot;if(e instanceof Ot)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),s=Math.max(t,r,n),a=NaN,i=s-o,l=(s+o)/2;return i?(t===s?a=(r-n)/i+(r<n)*6:r===s?a=(n-t)/i+2:a=(t-r)/i+4,i/=l<.5?s+o:2-s-o,a*=60):i=l>0&&l<1?0:a,new Ot(a,i,l,e.opacity)}function Gb(e,t,r,n){return arguments.length===1?Rh(e):new Ot(e,t,r,n??1)}function Ot(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}al(Ot,Gb,Ah(so,{brighter(e){return e=e==null?as:Math.pow(as,e),new Ot(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Hn:Math.pow(Hn,e),new Ot(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new it(Pa(e>=240?e-240:e+120,o,n),Pa(e,o,n),Pa(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new Ot(qc(this.h),Po(this.s),Po(this.l),is(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=is(this.opacity);return`${e===1?"hsl(":"hsla("}${qc(this.h)}, ${Po(this.s)*100}%, ${Po(this.l)*100}%${e===1?")":`, ${e})`}`}}));function qc(e){return e=(e||0)%360,e<0?e+360:e}function Po(e){return Math.max(0,Math.min(1,e||0))}function Pa(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const il=e=>()=>e;function Hb(e,t){return function(r){return e+r*t}}function qb(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function Wb(e){return(e=+e)==1?Ph:function(t,r){return r-t?qb(t,r,e):il(isNaN(t)?r:t)}}function Ph(e,t){var r=t-e;return r?Hb(e,r):il(isNaN(e)?t:e)}const Wc=function e(t){var r=Wb(t);function n(o,s){var a=r((o=hi(o)).r,(s=hi(s)).r),i=r(o.g,s.g),l=r(o.b,s.b),c=Ph(o.opacity,s.opacity);return function(u){return o.r=a(u),o.g=i(u),o.b=l(u),o.opacity=c(u),o+""}}return n.gamma=e,n}(1);function Jb(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),o;return function(s){for(o=0;o<r;++o)n[o]=e[o]*(1-s)+t[o]*s;return n}}function Yb(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Kb(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,o=new Array(n),s=new Array(r),a;for(a=0;a<n;++a)o[a]=$s(e[a],t[a]);for(;a<r;++a)s[a]=t[a];return function(i){for(a=0;a<n;++a)s[a]=o[a](i);return s}}function ll(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Tt(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Qb(e,t){var r={},n={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?r[o]=$s(e[o],t[o]):n[o]=t[o];return function(s){for(o in r)n[o]=r[o](s);return n}}var pi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ma=new RegExp(pi.source,"g");function Xb(e){return function(){return e}}function Zb(e){return function(t){return e(t)+""}}function ex(e,t){var r=pi.lastIndex=Ma.lastIndex=0,n,o,s,a=-1,i=[],l=[];for(e=e+"",t=t+"";(n=pi.exec(e))&&(o=Ma.exec(t));)(s=o.index)>r&&(s=t.slice(r,s),i[a]?i[a]+=s:i[++a]=s),(n=n[0])===(o=o[0])?i[a]?i[a]+=o:i[++a]=o:(i[++a]=null,l.push({i:a,x:Tt(n,o)})),r=Ma.lastIndex;return r<t.length&&(s=t.slice(r),i[a]?i[a]+=s:i[++a]=s),i.length<2?l[0]?Zb(l[0].x):Xb(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)i[(d=l[u]).i]=d.x(c);return i.join("")})}function $s(e,t){var r=typeof t,n;return t==null||r==="boolean"?il(t):(r==="number"?Tt:r==="string"?(n=Wn(t))?(t=n,Wc):ex:t instanceof Wn?Wc:t instanceof Date?ll:Yb(t)?Jb:Array.isArray(t)?Kb:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Qb:Tt)(e,t)}function Mh(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function tx(e){return function(){return e}}function rx(e){return+e}var Jc=[0,1];function bt(e){return e}function fi(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:tx(isNaN(t)?NaN:.5)}function nx(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function ox(e,t,r){var n=e[0],o=e[1],s=t[0],a=t[1];return o<n?(n=fi(o,n),s=r(a,s)):(n=fi(n,o),s=r(s,a)),function(i){return s(n(i))}}function sx(e,t,r){var n=Math.min(e.length,t.length)-1,o=new Array(n),s=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)o[a]=fi(e[a],e[a+1]),s[a]=r(t[a],t[a+1]);return function(i){var l=Eh(e,i,1,n)-1;return s[l](o[l](i))}}function Ns(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function cl(){var e=Jc,t=Jc,r=$s,n,o,s,a=bt,i,l,c;function u(){var h=Math.min(e.length,t.length);return a!==bt&&(a=nx(e[0],e[h-1])),i=h>2?sx:ox,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?s:(l||(l=i(e.map(n),t,r)))(n(a(h)))}return d.invert=function(h){return a(o((c||(c=i(t,e.map(n),Tt)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,rx),u()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),r=Mh,u()},d.clamp=function(h){return arguments.length?(a=h?!0:bt,u()):a!==bt},d.interpolate=function(h){return arguments.length?(r=h,u()):r},d.unknown=function(h){return arguments.length?(s=h,d):s},function(h,p){return n=h,o=p,u()}}function _h(){return cl()(bt,bt)}function ax(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ls(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function on(e){return e=ls(Math.abs(e)),e?e[1]:NaN}function ix(e,t){return function(r,n){for(var o=r.length,s=[],a=0,i=e[0],l=0;o>0&&i>0&&(l+i+1>n&&(i=Math.max(1,n-l)),s.push(r.substring(o-=i,o+i)),!((l+=i+1)>n));)i=e[a=(a+1)%e.length];return s.reverse().join(t)}}function lx(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var cx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Jn(e){if(!(t=cx.exec(e)))throw new Error("invalid format: "+e);var t;return new ul({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Jn.prototype=ul.prototype;function ul(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}ul.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function ux(e){e:for(var t=e.length,r=1,n=-1,o;r<t;++r)switch(e[r]){case".":n=o=r;break;case"0":n===0&&(n=r),o=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(o+1):e}var Vh;function dx(e,t){var r=ls(e,t);if(!r)return e+"";var n=r[0],o=r[1],s=o-(Vh=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=n.length;return s===a?n:s>a?n+new Array(s-a+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+new Array(1-s).join("0")+ls(e,Math.max(0,t+s-1))[0]}function Yc(e,t){var r=ls(e,t);if(!r)return e+"";var n=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}const Kc={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:ax,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Yc(e*100,t),r:Yc,s:dx,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Qc(e){return e}var Xc=Array.prototype.map,Zc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function hx(e){var t=e.grouping===void 0||e.thousands===void 0?Qc:ix(Xc.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?Qc:lx(Xc.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",i=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=Jn(d);var h=d.fill,p=d.align,f=d.sign,m=d.symbol,y=d.zero,S=d.width,R=d.comma,v=d.precision,O=d.trim,I=d.type;I==="n"?(R=!0,I="g"):Kc[I]||(v===void 0&&(v=12),O=!0,I="g"),(y||h==="0"&&p==="=")&&(y=!0,h="0",p="=");var E=m==="$"?r:m==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",w=m==="$"?n:/[%p]/.test(I)?a:"",P=Kc[I],k=/[defgprs%]/.test(I);v=v===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function b(A){var _=E,M=w,D,ne,Q;if(I==="c")M=P(A)+M,A="";else{A=+A;var oe=A<0||1/A<0;if(A=isNaN(A)?l:P(Math.abs(A),v),O&&(A=ux(A)),oe&&+A==0&&f!=="+"&&(oe=!1),_=(oe?f==="("?f:i:f==="-"||f==="("?"":f)+_,M=(I==="s"?Zc[8+Vh/3]:"")+M+(oe&&f==="("?")":""),k){for(D=-1,ne=A.length;++D<ne;)if(Q=A.charCodeAt(D),48>Q||Q>57){M=(Q===46?o+A.slice(D+1):A.slice(D))+M,A=A.slice(0,D);break}}}R&&!y&&(A=t(A,1/0));var X=_.length+A.length+M.length,se=X<S?new Array(S-X+1).join(h):"";switch(R&&y&&(A=t(se+A,se.length?S-M.length:1/0),se=""),p){case"<":A=_+A+M+se;break;case"=":A=_+se+A+M;break;case"^":A=se.slice(0,X=se.length>>1)+_+A+M+se.slice(X);break;default:A=se+_+A+M;break}return s(A)}return b.toString=function(){return d+""},b}function u(d,h){var p=c((d=Jn(d),d.type="f",d)),f=Math.max(-8,Math.min(8,Math.floor(on(h)/3)))*3,m=Math.pow(10,-f),y=Zc[8+f/3];return function(S){return p(m*S)+y}}return{format:c,formatPrefix:u}}var Mo,dl,kh;px({thousands:",",grouping:[3],currency:["$",""]});function px(e){return Mo=hx(e),dl=Mo.format,kh=Mo.formatPrefix,Mo}function fx(e){return Math.max(0,-on(Math.abs(e)))}function mx(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(on(t)/3)))*3-on(Math.abs(e)))}function gx(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,on(t)-on(e))+1}function yx(e,t,r,n){var o=di(e,t,r),s;switch(n=Jn(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(s=mx(o,a))&&(n.precision=s),kh(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(s=gx(o,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=s-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(s=fx(o))&&(n.precision=s-(n.type==="%")*2);break}}return dl(n)}function hl(e){var t=e.domain;return e.ticks=function(r){var n=t();return ci(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var o=t();return yx(o[0],o[o.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),o=0,s=n.length-1,a=n[o],i=n[s],l,c,u=10;for(i<a&&(c=a,a=i,i=c,c=o,o=s,s=c);u-- >0;){if(c=ui(a,i,r),c===l)return n[o]=a,n[s]=i,t(n);if(c>0)a=Math.floor(a/c)*c,i=Math.ceil(i/c)*c;else if(c<0)a=Math.ceil(a*c)/c,i=Math.floor(i*c)/c;else break;l=c}return e},e}function jh(){var e=_h();return e.copy=function(){return Ns(e,jh())},hr.apply(e,arguments),hl(e)}function Dh(e,t){e=e.slice();var r=0,n=e.length-1,o=e[r],s=e[n],a;return s<o&&(a=r,r=n,n=a,a=o,o=s,s=a),e[r]=t.floor(o),e[n]=t.ceil(s),e}function eu(e){return Math.log(e)}function tu(e){return Math.exp(e)}function bx(e){return-Math.log(-e)}function xx(e){return-Math.exp(-e)}function Sx(e){return isFinite(e)?+("1e"+e):e<0?0:e}function vx(e){return e===10?Sx:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Cx(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function ru(e){return(t,r)=>-e(-t,r)}function wx(e){const t=e(eu,tu),r=t.domain;let n=10,o,s;function a(){return o=Cx(n),s=vx(n),r()[0]<0?(o=ru(o),s=ru(s),e(bx,xx)):e(eu,tu),t}return t.base=function(i){return arguments.length?(n=+i,a()):n},t.domain=function(i){return arguments.length?(r(i),a()):r()},t.ticks=i=>{const l=r();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=o(c),p=o(u),f,m;const y=i==null?10:+i;let S=[];if(!(n%1)&&p-h<y){if(h=Math.floor(h),p=Math.ceil(p),c>0){for(;h<=p;++h)for(f=1;f<n;++f)if(m=h<0?f/s(-h):f*s(h),!(m<c)){if(m>u)break;S.push(m)}}else for(;h<=p;++h)for(f=n-1;f>=1;--f)if(m=h>0?f/s(-h):f*s(h),!(m<c)){if(m>u)break;S.push(m)}S.length*2<y&&(S=ci(c,u,y))}else S=ci(h,p,Math.min(p-h,y)).map(s);return d?S.reverse():S},t.tickFormat=(i,l)=>{if(i==null&&(i=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Jn(l)).precision==null&&(l.trim=!0),l=dl(l)),i===1/0)return l;const c=Math.max(1,n*i/t.ticks().length);return u=>{let d=u/s(Math.round(o(u)));return d*n<n-.5&&(d*=n),d<=c?l(u):""}},t.nice=()=>r(Dh(r(),{floor:i=>s(Math.floor(o(i))),ceil:i=>s(Math.ceil(o(i)))})),t}function Bh(){const e=wx(cl()).domain([1,10]);return e.copy=()=>Ns(e,Bh()).base(e.base()),hr.apply(e,arguments),e}function nu(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Ox(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Tx(e){return e<0?-e*e:e*e}function Ex(e){var t=e(bt,bt),r=1;function n(){return r===1?e(bt,bt):r===.5?e(Ox,Tx):e(nu(r),nu(1/r))}return t.exponent=function(o){return arguments.length?(r=+o,n()):r},hl(t)}function pl(){var e=Ex(cl());return e.copy=function(){return Ns(e,pl()).exponent(e.exponent())},hr.apply(e,arguments),e}function Ix(){return pl.apply(null,arguments).exponent(.5)}function Uh(){var e=[.5],t=[0,1],r,n=1;function o(s){return s!=null&&s<=s?t[Eh(e,s,0,n)]:r}return o.domain=function(s){return arguments.length?(e=Array.from(s),n=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(s){return arguments.length?(t=Array.from(s),n=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(s){var a=t.indexOf(s);return[e[a-1],e[a]]},o.unknown=function(s){return arguments.length?(r=s,o):r},o.copy=function(){return Uh().domain(e).range(t).unknown(r)},hr.apply(o,arguments)}const _a=new Date,Va=new Date;function Ne(e,t,r,n){function o(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return o.floor=s=>(e(s=new Date(+s)),s),o.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),o.round=s=>{const a=o(s),i=o.ceil(s);return s-a<i-s?a:i},o.offset=(s,a)=>(t(s=new Date(+s),a==null?1:Math.floor(a)),s),o.range=(s,a,i)=>{const l=[];if(s=o.ceil(s),i=i==null?1:Math.floor(i),!(s<a)||!(i>0))return l;let c;do l.push(c=new Date(+s)),t(s,i),e(s);while(c<s&&s<a);return l},o.filter=s=>Ne(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,i)=>{if(a>=a)if(i<0)for(;++i<=0;)for(;t(a,-1),!s(a););else for(;--i>=0;)for(;t(a,1),!s(a););}),r&&(o.count=(s,a)=>(_a.setTime(+s),Va.setTime(+a),e(_a),e(Va),Math.floor(r(_a,Va))),o.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?o.filter(n?a=>n(a)%s===0:a=>o.count(0,a)%s===0):o)),o}const cs=Ne(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);cs.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ne(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):cs);cs.range;const Ht=1e3,xt=Ht*60,qt=xt*60,Kt=qt*24,fl=Kt*7,ou=Kt*30,ka=Kt*365,xr=Ne(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ht)},(e,t)=>(t-e)/Ht,e=>e.getUTCSeconds());xr.range;const ml=Ne(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ht)},(e,t)=>{e.setTime(+e+t*xt)},(e,t)=>(t-e)/xt,e=>e.getMinutes());ml.range;const gl=Ne(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*xt)},(e,t)=>(t-e)/xt,e=>e.getUTCMinutes());gl.range;const yl=Ne(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ht-e.getMinutes()*xt)},(e,t)=>{e.setTime(+e+t*qt)},(e,t)=>(t-e)/qt,e=>e.getHours());yl.range;const bl=Ne(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*qt)},(e,t)=>(t-e)/qt,e=>e.getUTCHours());bl.range;const ao=Ne(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xt)/Kt,e=>e.getDate()-1);ao.range;const zs=Ne(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Kt,e=>e.getUTCDate()-1);zs.range;const Lh=Ne(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Kt,e=>Math.floor(e/Kt));Lh.range;function Rr(e){return Ne(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*xt)/fl)}const Gs=Rr(0),us=Rr(1),Ax=Rr(2),Rx=Rr(3),sn=Rr(4),Px=Rr(5),Mx=Rr(6);Gs.range;us.range;Ax.range;Rx.range;sn.range;Px.range;Mx.range;function Pr(e){return Ne(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/fl)}const Hs=Pr(0),ds=Pr(1),_x=Pr(2),Vx=Pr(3),an=Pr(4),kx=Pr(5),jx=Pr(6);Hs.range;ds.range;_x.range;Vx.range;an.range;kx.range;jx.range;const xl=Ne(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());xl.range;const Sl=Ne(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Sl.range;const Qt=Ne(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Qt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ne(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Qt.range;const Xt=Ne(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Xt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ne(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Xt.range;function Fh(e,t,r,n,o,s){const a=[[xr,1,Ht],[xr,5,5*Ht],[xr,15,15*Ht],[xr,30,30*Ht],[s,1,xt],[s,5,5*xt],[s,15,15*xt],[s,30,30*xt],[o,1,qt],[o,3,3*qt],[o,6,6*qt],[o,12,12*qt],[n,1,Kt],[n,2,2*Kt],[r,1,fl],[t,1,ou],[t,3,3*ou],[e,1,ka]];function i(c,u,d){const h=u<c;h&&([c,u]=[u,c]);const p=d&&typeof d.range=="function"?d:l(c,u,d),f=p?p.range(c,+u+1):[];return h?f.reverse():f}function l(c,u,d){const h=Math.abs(u-c)/d,p=ol(([,,y])=>y).right(a,h);if(p===a.length)return e.every(di(c/ka,u/ka,d));if(p===0)return cs.every(Math.max(di(c,u,d),1));const[f,m]=a[h/a[p-1][2]<a[p][2]/h?p-1:p];return f.every(m)}return[i,l]}const[Dx,Bx]=Fh(Xt,Sl,Hs,Lh,bl,gl),[Ux,Lx]=Fh(Qt,xl,Gs,ao,yl,ml);function ja(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Da(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function wn(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Fx(e){var t=e.dateTime,r=e.date,n=e.time,o=e.periods,s=e.days,a=e.shortDays,i=e.months,l=e.shortMonths,c=On(o),u=Tn(o),d=On(s),h=Tn(s),p=On(a),f=Tn(a),m=On(i),y=Tn(i),S=On(l),R=Tn(l),v={a:oe,A:X,b:se,B:F,c:null,d:uu,e:uu,f:c1,g:x1,G:v1,H:a1,I:i1,j:l1,L:$h,m:u1,M:d1,p:ee,q:ce,Q:pu,s:fu,S:h1,u:p1,U:f1,V:m1,w:g1,W:y1,x:null,X:null,y:b1,Y:S1,Z:C1,"%":hu},O={a:be,A:_e,b:xe,B:ut,c:null,d:du,e:du,f:E1,g:D1,G:U1,H:w1,I:O1,j:T1,L:zh,m:I1,M:A1,p:nt,q:Se,Q:pu,s:fu,S:R1,u:P1,U:M1,V:_1,w:V1,W:k1,x:null,X:null,y:j1,Y:B1,Z:L1,"%":hu},I={a:b,A,b:_,B:M,c:D,d:lu,e:lu,f:r1,g:iu,G:au,H:cu,I:cu,j:Xx,L:t1,m:Qx,M:Zx,p:k,q:Kx,Q:o1,s:s1,S:e1,u:Hx,U:qx,V:Wx,w:Gx,W:Jx,x:ne,X:Q,y:iu,Y:au,Z:Yx,"%":n1};v.x=E(r,v),v.X=E(n,v),v.c=E(t,v),O.x=E(r,O),O.X=E(n,O),O.c=E(t,O);function E(te,ae){return function(ue){var Y=[],ve=-1,pe=0,We=te.length,Ge,Ve,rr;for(ue instanceof Date||(ue=new Date(+ue));++ve<We;)te.charCodeAt(ve)===37&&(Y.push(te.slice(pe,ve)),(Ve=su[Ge=te.charAt(++ve)])!=null?Ge=te.charAt(++ve):Ve=Ge==="e"?" ":"0",(rr=ae[Ge])&&(Ge=rr(ue,Ve)),Y.push(Ge),pe=ve+1);return Y.push(te.slice(pe,ve)),Y.join("")}}function w(te,ae){return function(ue){var Y=wn(1900,void 0,1),ve=P(Y,te,ue+="",0),pe,We;if(ve!=ue.length)return null;if("Q"in Y)return new Date(Y.Q);if("s"in Y)return new Date(Y.s*1e3+("L"in Y?Y.L:0));if(ae&&!("Z"in Y)&&(Y.Z=0),"p"in Y&&(Y.H=Y.H%12+Y.p*12),Y.m===void 0&&(Y.m="q"in Y?Y.q:0),"V"in Y){if(Y.V<1||Y.V>53)return null;"w"in Y||(Y.w=1),"Z"in Y?(pe=Da(wn(Y.y,0,1)),We=pe.getUTCDay(),pe=We>4||We===0?ds.ceil(pe):ds(pe),pe=zs.offset(pe,(Y.V-1)*7),Y.y=pe.getUTCFullYear(),Y.m=pe.getUTCMonth(),Y.d=pe.getUTCDate()+(Y.w+6)%7):(pe=ja(wn(Y.y,0,1)),We=pe.getDay(),pe=We>4||We===0?us.ceil(pe):us(pe),pe=ao.offset(pe,(Y.V-1)*7),Y.y=pe.getFullYear(),Y.m=pe.getMonth(),Y.d=pe.getDate()+(Y.w+6)%7)}else("W"in Y||"U"in Y)&&("w"in Y||(Y.w="u"in Y?Y.u%7:"W"in Y?1:0),We="Z"in Y?Da(wn(Y.y,0,1)).getUTCDay():ja(wn(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(We+5)%7:Y.w+Y.U*7-(We+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,Da(Y)):ja(Y)}}function P(te,ae,ue,Y){for(var ve=0,pe=ae.length,We=ue.length,Ge,Ve;ve<pe;){if(Y>=We)return-1;if(Ge=ae.charCodeAt(ve++),Ge===37){if(Ge=ae.charAt(ve++),Ve=I[Ge in su?ae.charAt(ve++):Ge],!Ve||(Y=Ve(te,ue,Y))<0)return-1}else if(Ge!=ue.charCodeAt(Y++))return-1}return Y}function k(te,ae,ue){var Y=c.exec(ae.slice(ue));return Y?(te.p=u.get(Y[0].toLowerCase()),ue+Y[0].length):-1}function b(te,ae,ue){var Y=p.exec(ae.slice(ue));return Y?(te.w=f.get(Y[0].toLowerCase()),ue+Y[0].length):-1}function A(te,ae,ue){var Y=d.exec(ae.slice(ue));return Y?(te.w=h.get(Y[0].toLowerCase()),ue+Y[0].length):-1}function _(te,ae,ue){var Y=S.exec(ae.slice(ue));return Y?(te.m=R.get(Y[0].toLowerCase()),ue+Y[0].length):-1}function M(te,ae,ue){var Y=m.exec(ae.slice(ue));return Y?(te.m=y.get(Y[0].toLowerCase()),ue+Y[0].length):-1}function D(te,ae,ue){return P(te,t,ae,ue)}function ne(te,ae,ue){return P(te,r,ae,ue)}function Q(te,ae,ue){return P(te,n,ae,ue)}function oe(te){return a[te.getDay()]}function X(te){return s[te.getDay()]}function se(te){return l[te.getMonth()]}function F(te){return i[te.getMonth()]}function ee(te){return o[+(te.getHours()>=12)]}function ce(te){return 1+~~(te.getMonth()/3)}function be(te){return a[te.getUTCDay()]}function _e(te){return s[te.getUTCDay()]}function xe(te){return l[te.getUTCMonth()]}function ut(te){return i[te.getUTCMonth()]}function nt(te){return o[+(te.getUTCHours()>=12)]}function Se(te){return 1+~~(te.getUTCMonth()/3)}return{format:function(te){var ae=E(te+="",v);return ae.toString=function(){return te},ae},parse:function(te){var ae=w(te+="",!1);return ae.toString=function(){return te},ae},utcFormat:function(te){var ae=E(te+="",O);return ae.toString=function(){return te},ae},utcParse:function(te){var ae=w(te+="",!0);return ae.toString=function(){return te},ae}}}var su={"-":"",_:" ",0:"0"},qe=/^\s*\d+/,$x=/^%/,Nx=/[\\^$*+?|[\]().{}]/g;function ye(e,t,r){var n=e<0?"-":"",o=(n?-e:e)+"",s=o.length;return n+(s<r?new Array(r-s+1).join(t)+o:o)}function zx(e){return e.replace(Nx,"\\$&")}function On(e){return new RegExp("^(?:"+e.map(zx).join("|")+")","i")}function Tn(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Gx(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Hx(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function qx(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Wx(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function Jx(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function au(e,t,r){var n=qe.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function iu(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Yx(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Kx(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function Qx(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function lu(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function Xx(e,t,r){var n=qe.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function cu(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function Zx(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function e1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function t1(e,t,r){var n=qe.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function r1(e,t,r){var n=qe.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function n1(e,t,r){var n=$x.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function o1(e,t,r){var n=qe.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function s1(e,t,r){var n=qe.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function uu(e,t){return ye(e.getDate(),t,2)}function a1(e,t){return ye(e.getHours(),t,2)}function i1(e,t){return ye(e.getHours()%12||12,t,2)}function l1(e,t){return ye(1+ao.count(Qt(e),e),t,3)}function $h(e,t){return ye(e.getMilliseconds(),t,3)}function c1(e,t){return $h(e,t)+"000"}function u1(e,t){return ye(e.getMonth()+1,t,2)}function d1(e,t){return ye(e.getMinutes(),t,2)}function h1(e,t){return ye(e.getSeconds(),t,2)}function p1(e){var t=e.getDay();return t===0?7:t}function f1(e,t){return ye(Gs.count(Qt(e)-1,e),t,2)}function Nh(e){var t=e.getDay();return t>=4||t===0?sn(e):sn.ceil(e)}function m1(e,t){return e=Nh(e),ye(sn.count(Qt(e),e)+(Qt(e).getDay()===4),t,2)}function g1(e){return e.getDay()}function y1(e,t){return ye(us.count(Qt(e)-1,e),t,2)}function b1(e,t){return ye(e.getFullYear()%100,t,2)}function x1(e,t){return e=Nh(e),ye(e.getFullYear()%100,t,2)}function S1(e,t){return ye(e.getFullYear()%1e4,t,4)}function v1(e,t){var r=e.getDay();return e=r>=4||r===0?sn(e):sn.ceil(e),ye(e.getFullYear()%1e4,t,4)}function C1(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ye(t/60|0,"0",2)+ye(t%60,"0",2)}function du(e,t){return ye(e.getUTCDate(),t,2)}function w1(e,t){return ye(e.getUTCHours(),t,2)}function O1(e,t){return ye(e.getUTCHours()%12||12,t,2)}function T1(e,t){return ye(1+zs.count(Xt(e),e),t,3)}function zh(e,t){return ye(e.getUTCMilliseconds(),t,3)}function E1(e,t){return zh(e,t)+"000"}function I1(e,t){return ye(e.getUTCMonth()+1,t,2)}function A1(e,t){return ye(e.getUTCMinutes(),t,2)}function R1(e,t){return ye(e.getUTCSeconds(),t,2)}function P1(e){var t=e.getUTCDay();return t===0?7:t}function M1(e,t){return ye(Hs.count(Xt(e)-1,e),t,2)}function Gh(e){var t=e.getUTCDay();return t>=4||t===0?an(e):an.ceil(e)}function _1(e,t){return e=Gh(e),ye(an.count(Xt(e),e)+(Xt(e).getUTCDay()===4),t,2)}function V1(e){return e.getUTCDay()}function k1(e,t){return ye(ds.count(Xt(e)-1,e),t,2)}function j1(e,t){return ye(e.getUTCFullYear()%100,t,2)}function D1(e,t){return e=Gh(e),ye(e.getUTCFullYear()%100,t,2)}function B1(e,t){return ye(e.getUTCFullYear()%1e4,t,4)}function U1(e,t){var r=e.getUTCDay();return e=r>=4||r===0?an(e):an.ceil(e),ye(e.getUTCFullYear()%1e4,t,4)}function L1(){return"+0000"}function hu(){return"%"}function pu(e){return+e}function fu(e){return Math.floor(+e/1e3)}var Hr,Hh,qh;F1({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function F1(e){return Hr=Fx(e),Hh=Hr.format,Hr.parse,qh=Hr.utcFormat,Hr.utcParse,Hr}function $1(e){return new Date(e)}function N1(e){return e instanceof Date?+e:+new Date(+e)}function vl(e,t,r,n,o,s,a,i,l,c){var u=_h(),d=u.invert,h=u.domain,p=c(".%L"),f=c(":%S"),m=c("%I:%M"),y=c("%I %p"),S=c("%a %d"),R=c("%b %d"),v=c("%B"),O=c("%Y");function I(E){return(l(E)<E?p:i(E)<E?f:a(E)<E?m:s(E)<E?y:n(E)<E?o(E)<E?S:R:r(E)<E?v:O)(E)}return u.invert=function(E){return new Date(d(E))},u.domain=function(E){return arguments.length?h(Array.from(E,N1)):h().map($1)},u.ticks=function(E){var w=h();return e(w[0],w[w.length-1],E??10)},u.tickFormat=function(E,w){return w==null?I:c(w)},u.nice=function(E){var w=h();return(!E||typeof E.range!="function")&&(E=t(w[0],w[w.length-1],E??10)),E?h(Dh(w,E)):u},u.copy=function(){return Ns(u,vl(e,t,r,n,o,s,a,i,l,c))},u}function Wh(){return hr.apply(vl(Ux,Lx,Qt,xl,Gs,ao,yl,ml,xr,Hh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function z1(){return hr.apply(vl(Dx,Bx,Xt,Sl,Hs,zs,bl,gl,xr,qh).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function G1(){var e=0,t=1,r,n,o,s,a=bt,i=!1,l;function c(d){return d==null||isNaN(d=+d)?l:a(o===0?.5:(d=(s(d)-r)*o,i?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,r=s(e=+e),n=s(t=+t),o=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(d){return arguments.length?(i=!!d,c):i},c.interpolator=function(d){return arguments.length?(a=d,c):a};function u(d){return function(h){var p,f;return arguments.length?([p,f]=h,a=d(p,f),c):[a(0),a(1)]}}return c.range=u($s),c.rangeRound=u(Mh),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return s=d,r=d(e),n=d(t),o=r===n?0:1/(n-r),c}}function H1(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Jh(){var e=hl(G1()(bt));return e.copy=function(){return H1(e,Jh())},Mb.apply(e,arguments)}function q1(e,t){return function(n,o){return o.location==="tick"?o.scale.tickFormat(e)(n):o.location==="zoom-slider-tooltip"?t.tickFormat(2)(n):`${n}`}}function W1(e){return e.scaleType==="band"}function J1(e){return e.scaleType==="point"}function Y1(e){return e.type==="piecewise"?Uh(e.thresholds,e.colors):Jh([e.min??0,e.max??100],e.color)}function hs(e){return e.values?ss(e.values,e.colors).unknown(e.unknownColor??null):ss(e.colors.map((t,r)=>r),e.colors).unknown(e.unknownColor??null)}function Ho(e){return e.type==="ordinal"?hs(e):Y1(e)}function K1(e){const{tickMaxStep:t,tickMinStep:r,tickNumber:n,range:o,domain:s}=e,a=r===void 0?999:Math.floor(Math.abs(s[1]-s[0])/r),i=t===void 0?2:Math.ceil(Math.abs(s[1]-s[0])/t),l=n??Math.floor(Math.abs(o[1]-o[0])/50);return Math.min(a,Math.max(i,l))}function Q1(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function mi(e,t,r){switch(e){case"log":return Bh(t,r);case"pow":return pl(t,r);case"sqrt":return Ix(t,r);case"time":return Wh(t,r);case"utc":return z1(t,r);default:return jh(t,r)}}const mu=e=>(e==null?void 0:e[0])instanceof Date;function gu(e,t){const r=Wh(e.data,t);return(n,{location:o})=>o==="tick"?r.tickFormat(e.tickNumber)(n):`${n.toLocaleString()}`}const Ba=(e,t)=>{const r=e[1]-e[0],n=t[1]-t[0],o=e[0]-t[0]*r/n,s=e[1]+(100-t[1])*r/n;return[o,s]};let yu,bu;class X1{constructor(){if(this.types=new Set,yu)throw new Error("You can only create one instance!");yu=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class Z1{constructor(){if(this.types=new Set,bu)throw new Error("You can only create one instance!");bu=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const qs=new X1;qs.addType("bar");qs.addType("line");qs.addType("scatter");const eS=new Z1;eS.addType("radar");function Yh(e){return qs.getTypes().has(e)}const tS=(e,t,r,n,o,s,a,i)=>{var f;const l=n==="x"?o[t].xExtremumGetter:o[t].yExtremumGetter,c=((f=a[t])==null?void 0:f.series)??{},[u,d]=(l==null?void 0:l({series:c,axis:r,axisIndex:s,isDefaultAxis:s===0,getFilters:i}))??[1/0,-1/0],[h,p]=e;return[Math.min(u,h),Math.max(d,p)]},Kh=(e,t,r,n,o,s)=>{const i=Object.keys(r).filter(Yh).reduce((l,c)=>tS(l,c,e,t,r,n,o,s),[1/0,-1/0]);return Number.isNaN(i[0])||Number.isNaN(i[1])?[1/0,-1/0]:i},rS=(e,t,r,n)=>{const o=new Set;return Object.keys(t).filter(Yh).forEach(a=>{var c,u,d;const i=((c=r[a])==null?void 0:c.series)??{},l=(d=(u=t[a]).axisTooltipGetter)==null?void 0:d.call(u,i);l!==void 0&&l.forEach(({axisId:h,direction:p})=>{p===e&&o.add(h??n)})}),o},nS=(e,t,r,n)=>{var o;if(e.domainLimit!==void 0)return e.domainLimit;if(t==="x")for(const s of((o=n.line)==null?void 0:o.seriesOrder)??[]){const a=n.line.series[s];if(a.xAxisId===e.id||a.xAxisId===void 0&&r===0)return"strict"}return"nice"};function oS(e,t,r){const n=t==="x"?[e.left,e.left+e.width]:[e.top+e.height,e.top];return r.reverse?[n[1],n[0]]:n}const sS=.2,aS=.1;function Qh({drawingArea:e,formattedSeries:t,axis:r,seriesConfig:n,axisDirection:o,zoomMap:s,zoomOptions:a,getFilters:i,preferStrictDomainInLineCharts:l}){if(r===void 0)return{axis:{},axisIds:[]};const c=rS(o,n,t,r[0].id),u={};return r.forEach((d,h)=>{const p=d,f=a==null?void 0:a[p.id],m=s==null?void 0:s.get(p.id),y=m?[m.start,m.end]:[0,100],S=oS(e,o,p),[R,v]=Kh(p,o,n,h,t,m===void 0&&!f?i:void 0),O=!p.ignoreTooltip&&c.has(p.id),I=p.data??[];if(W1(p)){const oe=p.categoryGapRatio??sS,X=p.barGapRatio??aS,se=o==="y"?[S[1],S[0]]:S,F=Ba(se,y);if(u[p.id]=K({offset:0,height:0,categoryGapRatio:oe,barGapRatio:X,triggerTooltip:O},p,{data:I,scale:sl(p.data,F).paddingInner(oe).paddingOuter(oe/2),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?hs(K({values:p.data},p.colorMap)):Ho(p.colorMap))}),mu(p.data)){const ee=gu(p,se);u[p.id].valueFormatter=p.valueFormatter??ee}}if(J1(p)){const oe=o==="y"?[...S].reverse():S,X=Ba(oe,y);if(u[p.id]=K({offset:0,height:0,triggerTooltip:O},p,{data:I,scale:_b(p.data,X),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?hs(K({values:p.data},p.colorMap)):Ho(p.colorMap))}),mu(p.data)){const se=gu(p,oe);u[p.id].valueFormatter=p.valueFormatter??se}}if(p.scaleType==="band"||p.scaleType==="point")return;const E=p.scaleType??"linear",w=l?nS(p,o,h,t):p.domainLimit??"nice",P=[p.min??R,p.max??v];if(typeof w=="function"){const{min:oe,max:X}=w(R,v);P[0]=oe,P[1]=X}const k=K1(K({},p,{range:S,domain:P})),b=Q1(k,y),A=Ba(S,y),_=mi(E,P,A),M=w==="nice"?_.nice(k):_,[D,ne]=M.domain(),Q=[p.min??D,p.max??ne];u[p.id]=K({offset:0,height:0,triggerTooltip:O},p,{data:I,scaleType:E,scale:M.domain(Q),tickNumber:b,colorScale:p.colorMap&&Ho(p.colorMap),valueFormatter:p.valueFormatter??q1(b,mi(E,S.map(oe=>_.invert(oe)),S))})}),{axis:u,axisIds:r.map(({id:d})=>d)}}function iS(e){return e!=null}function Xh({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:o}){return(s,a)=>{var y;const i=t[s.id];if(!i||i.filterMode!=="discard")return null;const l=e==null?void 0:e.get(s.id);if(l===void 0||l.start<=0&&l.end>=100)return null;let c=[];const u=s.scaleType;u==="point"||u==="band"?c=[0,(((y=s.data)==null?void 0:y.length)??1)-1]:c=Kh(s,o,r,a,n);let d,h;[d,h]=mi(!u||u==="band"||u==="point"?"linear":u,c,[0,100]).nice().domain(),d=d instanceof Date?d.getTime():d,h=h instanceof Date?h.getTime():h;const f=d+l.start*(h-d)/100,m=d+l.end*(h-d)/100;return(S,R)=>{var O;const v=S[o]??((O=s.data)==null?void 0:O[R]);return v==null?!0:s.scaleType==="point"||s.scaleType==="band"||typeof v=="string"?R>=f&&R<=m:v>=f&&v<=m}}}const lS=e=>({currentAxisId:t,seriesXAxisId:r,seriesYAxisId:n,isDefaultAxis:o})=>(s,a)=>{var c,u;return!(t===r?n:r)||o?((u=(c=Object.values(e??{}))[0])==null?void 0:u.call(c,s,a))??!0:[n,r].filter(d=>d!==t).map(d=>e[d??""]).filter(iS).every(d=>d(s,a))},xu=e=>(t=[])=>t.reduce((r,n)=>{const{zoom:o,id:s}=n,a=nl(o,s,e);return a&&(r[s]=a),r},{}),cS=e=>{const t=new Map;return e.forEach(r=>{t.set(r.axisId,r)}),t},Zh=e=>e.zoom;he([Zh],e=>e==null?void 0:e.isInteracting);const Ws=he([Zh],e=>(e==null?void 0:e.zoomData)&&cS(e==null?void 0:e.zoomData)),io=he([fn,mn],(e,t)=>K({},xu("x")(e),xu("y")(t)));he([io,(e,t)=>t],(e,t)=>e[t]);const uS=he([Ws,io,Fs,no],(e,t,r,n)=>e&&t&&Xh({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"x"})),dS=he([Ws,io,Fs,no],(e,t,r,n)=>e&&t&&Xh({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"y"})),ep=he([uS,dS,fn,mn],(e,t,r,n)=>{if(e===void 0||t===void 0)return;const o=r==null?void 0:r.reduce((a,i,l)=>{const c=e(i,l);return c!==null&&(a[i.id]=c),a},{}),s=n==null?void 0:n.reduce((a,i,l)=>{const c=t(i,l);return c!==null&&(a[i.id]=c),a},{});if(!(Object.keys(o??{}).length===0&&Object.keys(s??{}).length===0))return lS(K({},o,s))}),Mr=he([fn,ro,no,Fs,Ws,io,ep,gh],(e,t,r,n,o,s,a,i)=>Qh({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"x",zoomMap:o,zoomOptions:s,getFilters:a,preferStrictDomainInLineCharts:i})),_r=he([mn,ro,no,Fs,Ws,io,ep,gh],(e,t,r,n,o,s,a,i)=>Qh({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"y",zoomMap:o,zoomOptions:s,getFilters:a,preferStrictDomainInLineCharts:i}));he([Mr,_r,(e,t)=>t],(e,t,r)=>(e==null?void 0:e.axis[r])??(t==null?void 0:t.axis[r]));he([fn,mn,(e,t)=>t],(e,t,r)=>{const n=(e==null?void 0:e.find(o=>o.id===r))??(t==null?void 0:t.find(o=>o.id===r))??null;if(n)return n});function tp(e){return e.bandwidth!==void 0}function qr(e){return e instanceof Date?e.getTime():e}function ln(e,t){const{scale:r,data:n,reverse:o}=e;if(!tp(r)){const a=r.invert(t);if(n===void 0)return-1;const i=qr(a);return n==null?void 0:n.findIndex((c,u)=>{const d=qr(c);return d>i&&(u===0||Math.abs(i-d)<=Math.abs(i-qr(n[u-1])))||d<=i&&(u===n.length-1||Math.abs(qr(a)-d)<Math.abs(qr(a)-qr(n[u+1])))})}const s=r.bandwidth()===0?Math.floor((t-Math.min(...r.range())+r.step()/2)/r.step()):Math.floor((t-Math.min(...r.range()))/r.step());return s<0||s>=n.length?-1:o?n.length-1-s:s}function Su(e,t,r){const{scale:n,data:o}=e;if(!tp(n)){const s=n.invert(t);return r<0?s:o[r]}return r<0||r>=o.length?null:o[r]}function vu(e,t){const r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r.matrixTransform(e.getScreenCTM().inverse())}function Wt(e){const t=V.useRef(e);return Bt(()=>{t.current=e}),V.useRef((...r)=>(0,t.current)(...r)).current}const hS=Object.is;function rp(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let r=0,n=0;for(const o in e)if(r+=1,!hS(e[o],t[o])||!(o in t))return!1;for(const o in t)n+=1;return r===n}const Cl=({store:e})=>{const t=Wt(function(){e.update(a=>K({},a,{interaction:{pointer:null,item:null}}))}),r=Wt(function(a){e.update(i=>{const l=i.interaction.item;return a?l===null||Object.keys(a).some(c=>a[c]!==l[c])?i:K({},i,{interaction:K({},i.interaction,{item:null})}):l===null?i:K({},i,{interaction:K({},i.interaction,{item:null})})})}),n=Wt(function(a){e.update(i=>rp(i.interaction.item,a)?i:K({},i,{interaction:K({},i.interaction,{item:a})}))}),o=Wt(function(a){e.update(i=>K({},i,{interaction:K({},i.interaction,{pointer:a})}))});return{instance:{cleanInteraction:t,setItemInteraction:n,removeItemInteraction:r,setPointerCoordinate:o}}};Cl.getInitialState=()=>({interaction:{item:null,pointer:null}});Cl.params={};const wl=e=>e.interaction,pS=he([wl],e=>e!==void 0),fS=he([wl],e=>(e==null?void 0:e.item)??null),np=he([wl],e=>(e==null?void 0:e.pointer)??null),Js=he([np],e=>e&&e.x),Ys=he([np],e=>e&&e.y);he([fS],e=>e!==null);function Ln(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let s=0;s<o;s+=1)if(!Ln(e[s],t[s]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let s=0;s<o.length;s+=1)if(!t.has(o[s][0]))return!1;for(let s=0;s<o.length;s+=1){const a=o[s];if(!Ln(a[1],t.get(a[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let s=0;s<o.length;s+=1)if(!t.has(o[s][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const o=e.length;if(o!==t.length)return!1;for(let s=0;s<o;s+=1)if(e[s]!==t[s])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),n=r.length;if(n!==Object.keys(t).length)return!1;for(let o=0;o<n;o+=1)if(!Object.prototype.hasOwnProperty.call(t,r[o]))return!1;for(let o=0;o<n;o+=1){const s=r[o];if(!Ln(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}const Ks=(e,t)=>t;function gi(e,t,r=t.axisIds[0]){return Array.isArray(r)?r.map(n=>ln(t.axis[n],e)):ln(t.axis[r],e)}const op=(e,t,r)=>{if(e===null)return null;const n=gi(e,t,r);return n===-1?null:n},mS=he([Js,Mr,Ks],op),gS=he([Ys,_r,Ks],op),yS=he([Js,Ys,Mr,_r],(e,t,r,n)=>[...e===null?[]:r.axisIds.map(o=>({axisId:o,dataIndex:gi(e,r,o)})),...t===null?[]:n.axisIds.map(o=>({axisId:o,dataIndex:gi(t,n,o)}))].filter(o=>o.dataIndex!==null&&o.dataIndex>=0));function sp(e,t,r,n=t.axisIds[0]){return Array.isArray(n)?n.map((o,s)=>Su(t.axis[o],e,r[s])):Su(t.axis[n],e,r)}he([Js,Mr,mS,Ks],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:sp(e,t,r,n));he([Ys,_r,gS,Ks],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:sp(e,t,r,n));const bS=he([Js,Mr],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:ln(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:Ln}}),xS=he([Ys,_r],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:ln(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:Ln}});he([bS,xS],(e,t)=>e.length>0||t.length>0);const Cu={};function SS(e,t){const r=V.useRef(Cu);return r.current===Cu&&(r.current=e(t)),r}const vS=()=>{};function CS(e,t,r,n){const o=SS(wS,{store:e,selector:t,skip:n}).current;o.effect=r,V.useEffect(o.onMount(n),[n])}function wS(e){const{store:t,selector:r,skip:n}=e;let o=!1,s;const a=()=>{i.dispose??(i.dispose=t.subscribe(l=>{const c=r(l);i.effect(s,c),s=c}))},i={effect:vS,dispose:null,onMount:l=>()=>{if(!l)return o||(o=!0,s=r(t.value)),a(),()=>{var c;(c=i.dispose)==null||c.call(i),i.dispose=null}}};return n||(o=!0,s=r(t.value),a()),i}const Qs=({params:e,store:t,seriesConfig:r,svgRef:n,instance:o})=>{const{xAxis:s,yAxis:a,dataset:i,onHighlightedAxisChange:l}=e;if(process.env.NODE_ENV!=="production"){const v=[...s??[],...a??[]].filter(I=>I.id).map(I=>I.id),O=new Set(v.filter((I,E)=>v.indexOf(I)!==E));O.size>0&&Gn([`MUI X Charts: The following axis ids are duplicated: ${Array.from(O).join(", ")}.`,"Please make sure that each axis has a unique id."].join(`
117
- `),"error")}const c=at(t,ro),u=at(t,no),d=at(t,pS),{axis:h,axisIds:p}=at(t,Mr),{axis:f,axisIds:m}=at(t,_r);vh({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedAxis",controlled:e.highlightedAxis,defaultValue:void 0}),Bt(()=>{e.highlightedAxis!==void 0&&t.update(v=>v.controlledCartesianAxisHighlight===e.highlightedAxis?v:K({},v,{controlledCartesianAxisHighlight:e.highlightedAxis}))},[t,e.highlightedAxis]);const y=V.useRef(!0);V.useEffect(()=>{if(y.current){y.current=!1;return}t.update(v=>K({},v,{cartesianAxis:K({},v.cartesianAxis,{x:Oh(s,i),y:Th(a,i)})}))},[r,c,s,a,i,t]);const S=p[0],R=m[0];return CS(t,yS,(v,O)=>{if(!Object.is(v,O)){if(v.length!==O.length){l(O);return}v!=null&&v.some(({axisId:I,dataIndex:E},w)=>O[w].axisId!==I||O[w].dataIndex!==E)&&l(O)}},!l),V.useEffect(()=>{const v=n.current;if(!d||!v||e.disableAxisListener)return()=>{};const O=o.addInteractionListener("moveEnd",A=>{var _;A.detail.activeGestures.pan||(_=o.cleanInteraction)==null||_.call(o)}),I=o.addInteractionListener("panEnd",A=>{var _;A.detail.activeGestures.move||(_=o.cleanInteraction)==null||_.call(o)}),E=o.addInteractionListener("quickPressEnd",A=>{var _;!A.detail.activeGestures.move&&!A.detail.activeGestures.pan&&((_=o.cleanInteraction)==null||_.call(o))}),w=A=>{var ne,Q;const _=A.detail.srcEvent,M=A.detail.target,D=vu(v,_);if(A.detail.srcEvent.buttons>=1&&(M!=null&&M.hasPointerCapture(A.detail.srcEvent.pointerId))&&!(M!=null&&M.closest("[data-charts-zoom-slider]"))&&(M==null||M.releasePointerCapture(A.detail.srcEvent.pointerId)),!o.isPointInside(D.x,D.y,M)){(ne=o.cleanInteraction)==null||ne.call(o);return}(Q=o.setPointerCoordinate)==null||Q.call(o,D)},P=o.addInteractionListener("move",w),k=o.addInteractionListener("pan",w),b=o.addInteractionListener("quickPress",w);return()=>{P.cleanup(),O.cleanup(),k.cleanup(),I.cleanup(),b.cleanup(),E.cleanup()}},[n,t,h,S,f,R,o,e.disableAxisListener,d]),V.useEffect(()=>{const v=n.current,O=e.onAxisClick;if(v===null||!O)return()=>{};const I=o.addInteractionListener("tap",E=>{let w=null,P=!1;const k=vu(v,E.detail.srcEvent),b=ln(h[S],k.x);P=b!==-1,w=P?b:ln(f[R],k.y);const A=P?p[0]:m[0];if(w==null||w===-1)return;const _=(P?h:f)[A].data[w],M={};Object.keys(u).filter(D=>["bar","line"].includes(D)).forEach(D=>{var ne;(ne=u[D])==null||ne.seriesOrder.forEach(Q=>{const oe=u[D].series[Q],X=oe.xAxisId,se=oe.yAxisId,F=P?X:se;(F===void 0||F===A)&&(M[Q]=oe.data[w])})}),O(E.detail.srcEvent,{dataIndex:w,axisValue:_,seriesValues:M})});return()=>{I.cleanup()}},[e.onAxisClick,u,n,h,p,f,m,S,R,o]),{}};Qs.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0};Qs.getDefaultizedParams=({params:e})=>K({},e,{colors:e.colors??yh,theme:e.theme??"light",defaultizedXAxis:Oh(e.xAxis,e.dataset),defaultizedYAxis:Th(e.yAxis,e.dataset)});Qs.getInitialState=e=>K({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});function wu(e,t){return e.id!==void 0?e:K({id:t},e)}function Ou(e){return e.colorMap?K({},e,{colorScale:e.colorMap.type==="ordinal"&&e.data?hs(K({values:e.data},e.colorMap)):Ho(e.colorMap.type==="continuous"?K({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function ap(e,t){if(!e||e.length===0)return{axis:{},axisIds:[]};const r={},n=[];return e.forEach((o,s)=>{const a=o.dataKey,i=o.id??`defaultized-z-axis-${s}`;if(a===void 0||o.data!==void 0){r[i]=Ou(wu(o,i)),n.push(i);return}if(t===void 0)throw new Error("MUI X Charts: z-axis uses `dataKey` but no `dataset` is provided.");r[i]=Ou(wu(K({},o,{data:t.map(l=>l[a])}),i)),n.push(i)}),{axis:r,axisIds:n}}const Ol=({params:e,store:t})=>{const{zAxis:r,dataset:n}=e,o=V.useRef(!0);return V.useEffect(()=>{if(o.current){o.current=!1;return}t.update(s=>K({},s,{zAxis:ap(r,n)}))},[r,n,t]),{}};Ol.params={zAxis:!0,dataset:!0};Ol.getInitialState=e=>({zAxis:ap(e.zAxis,e.dataset)});const OS=e=>e,TS=he([OS],e=>e.zAxis),Xs=({store:e,params:t})=>{vh({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedItem",controlled:t.highlightedItem,defaultValue:null}),Bt(()=>{e.update(o=>o.highlight.item===t.highlightedItem?o:K({},o,{highlight:K({},o.highlight,{item:t.highlightedItem})}))},[e,t.highlightedItem]);const r=Wt(()=>{var o;(o=t.onHighlightChange)==null||o.call(t,null),e.update(s=>K({},s,{highlight:{item:null}}))}),n=Wt(o=>{var a;const s=e.getSnapshot().highlight.item;rp(s,o)||((a=t.onHighlightChange)==null||a.call(t,o),e.update(i=>K({},i,{highlight:{item:o}})))});return{instance:{clearHighlight:r,setHighlight:n}}};Xs.getDefaultizedParams=({params:e})=>K({},e,{highlightedItem:e.highlightedItem??null});Xs.getInitialState=e=>({highlight:{item:e.highlightedItem}});Xs.params={highlightedItem:!0,onHighlightChange:!0};const Tu=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},ip=e=>{var l;const{axis:t,getFilters:r,isDefaultAxis:n}=e,o=r==null?void 0:r({currentAxisId:t.id,isDefaultAxis:n}),s=o?(l=t.data)==null?void 0:l.filter((c,u)=>o({x:null,y:null},u)):t.data,a=Math.min(...s??[]),i=Math.max(...s??[]);return[a,i]},lp=e=>t=>{const{series:r,axis:n,getFilters:o,isDefaultAxis:s}=t;return Object.keys(r).filter(a=>{const i=e==="x"?r[a].xAxisId:r[a].yAxisId;return i===n.id||s&&i===void 0}).reduce((a,i)=>{const{stackedData:l}=r[i],c=o==null?void 0:o({currentAxisId:n.id,isDefaultAxis:s,seriesXAxisId:r[i].xAxisId,seriesYAxisId:r[i].yAxisId}),[u,d]=(l==null?void 0:l.reduce((h,p,f)=>c&&(!c(Tu(p[0],e),f)||!c(Tu(p[1],e),f))?h:[Math.min(...p,h[0]),Math.max(...p,h[1])],[1/0,-1/0]))??[1/0,-1/0];return[Math.min(u,a[0]),Math.max(d,a[1])]},[1/0,-1/0])},ES=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?lp("x")(e):ip(e),IS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?ip(e):lp("y")(e);function Fe(e){return function(){return e}}const Eu=Math.abs,Ye=Math.atan2,fr=Math.cos,AS=Math.max,Ua=Math.min,Pt=Math.sin,Qr=Math.sqrt,st=1e-12,Yn=Math.PI,ps=Yn/2,qo=2*Yn;function RS(e){return e>1?0:e<-1?Yn:Math.acos(e)}function Iu(e){return e>=1?ps:e<=-1?-ps:Math.asin(e)}const yi=Math.PI,bi=2*yi,yr=1e-6,PS=bi-yr;function cp(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function MS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return cp;const r=10**t;return function(n){this._+=n[0];for(let o=1,s=n.length;o<s;++o)this._+=Math.round(arguments[o]*r)/r+n[o]}}class _S{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?cp:MS(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,o){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+o}`}bezierCurveTo(t,r,n,o,s,a){this._append`C${+t},${+r},${+n},${+o},${this._x1=+s},${this._y1=+a}`}arcTo(t,r,n,o,s){if(t=+t,r=+r,n=+n,o=+o,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,i=this._y1,l=n-t,c=o-r,u=a-t,d=i-r,h=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>yr)if(!(Math.abs(d*l-c*u)>yr)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-a,f=o-i,m=l*l+c*c,y=p*p+f*f,S=Math.sqrt(m),R=Math.sqrt(h),v=s*Math.tan((yi-Math.acos((m+h-y)/(2*S*R)))/2),O=v/R,I=v/S;Math.abs(O-1)>yr&&this._append`L${t+O*u},${r+O*d}`,this._append`A${s},${s},0,0,${+(d*p>u*f)},${this._x1=t+I*l},${this._y1=r+I*c}`}}arc(t,r,n,o,s,a){if(t=+t,r=+r,n=+n,a=!!a,n<0)throw new Error(`negative radius: ${n}`);let i=n*Math.cos(o),l=n*Math.sin(o),c=t+i,u=r+l,d=1^a,h=a?o-s:s-o;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>yr||Math.abs(this._y1-u)>yr)&&this._append`L${c},${u}`,n&&(h<0&&(h=h%bi+bi),h>PS?this._append`A${n},${n},0,1,${d},${t-i},${r-l}A${n},${n},0,1,${d},${this._x1=c},${this._y1=u}`:h>yr&&this._append`A${n},${n},0,${+(h>=yi)},${d},${this._x1=t+n*Math.cos(s)},${this._y1=r+n*Math.sin(s)}`)}rect(t,r,n,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+o}h${-n}Z`}toString(){return this._}}function VS(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new _S(t)}function kS(e){return e.innerRadius}function jS(e){return e.outerRadius}function DS(e){return e.startAngle}function BS(e){return e.endAngle}function US(e){return e&&e.padAngle}function LS(e,t,r,n,o,s,a,i){var l=r-e,c=n-t,u=a-o,d=i-s,h=d*l-u*c;if(!(h*h<st))return h=(u*(t-s)-d*(e-o))/h,[e+h*l,t+h*c]}function _o(e,t,r,n,o,s,a){var i=e-r,l=t-n,c=(a?s:-s)/Qr(i*i+l*l),u=c*l,d=-c*i,h=e+u,p=t+d,f=r+u,m=n+d,y=(h+f)/2,S=(p+m)/2,R=f-h,v=m-p,O=R*R+v*v,I=o-s,E=h*m-f*p,w=(v<0?-1:1)*Qr(AS(0,I*I*O-E*E)),P=(E*v-R*w)/O,k=(-E*R-v*w)/O,b=(E*v+R*w)/O,A=(-E*R+v*w)/O,_=P-y,M=k-S,D=b-y,ne=A-S;return _*_+M*M>D*D+ne*ne&&(P=b,k=A),{cx:P,cy:k,x01:-u,y01:-d,x11:P*(o/I-1),y11:k*(o/I-1)}}function up(){var e=kS,t=jS,r=Fe(0),n=null,o=DS,s=BS,a=US,i=null,l=VS(c);function c(){var u,d,h=+e.apply(this,arguments),p=+t.apply(this,arguments),f=o.apply(this,arguments)-ps,m=s.apply(this,arguments)-ps,y=Eu(m-f),S=m>f;if(i||(i=u=l()),p<h&&(d=p,p=h,h=d),!(p>st))i.moveTo(0,0);else if(y>qo-st)i.moveTo(p*fr(f),p*Pt(f)),i.arc(0,0,p,f,m,!S),h>st&&(i.moveTo(h*fr(m),h*Pt(m)),i.arc(0,0,h,m,f,S));else{var R=f,v=m,O=f,I=m,E=y,w=y,P=a.apply(this,arguments)/2,k=P>st&&(n?+n.apply(this,arguments):Qr(h*h+p*p)),b=Ua(Eu(p-h)/2,+r.apply(this,arguments)),A=b,_=b,M,D;if(k>st){var ne=Iu(k/h*Pt(P)),Q=Iu(k/p*Pt(P));(E-=ne*2)>st?(ne*=S?1:-1,O+=ne,I-=ne):(E=0,O=I=(f+m)/2),(w-=Q*2)>st?(Q*=S?1:-1,R+=Q,v-=Q):(w=0,R=v=(f+m)/2)}var oe=p*fr(R),X=p*Pt(R),se=h*fr(I),F=h*Pt(I);if(b>st){var ee=p*fr(v),ce=p*Pt(v),be=h*fr(O),_e=h*Pt(O),xe;if(y<Yn)if(xe=LS(oe,X,be,_e,ee,ce,se,F)){var ut=oe-xe[0],nt=X-xe[1],Se=ee-xe[0],te=ce-xe[1],ae=1/Pt(RS((ut*Se+nt*te)/(Qr(ut*ut+nt*nt)*Qr(Se*Se+te*te)))/2),ue=Qr(xe[0]*xe[0]+xe[1]*xe[1]);A=Ua(b,(h-ue)/(ae-1)),_=Ua(b,(p-ue)/(ae+1))}else A=_=0}w>st?_>st?(M=_o(be,_e,oe,X,p,_,S),D=_o(ee,ce,se,F,p,_,S),i.moveTo(M.cx+M.x01,M.cy+M.y01),_<b?i.arc(M.cx,M.cy,_,Ye(M.y01,M.x01),Ye(D.y01,D.x01),!S):(i.arc(M.cx,M.cy,_,Ye(M.y01,M.x01),Ye(M.y11,M.x11),!S),i.arc(0,0,p,Ye(M.cy+M.y11,M.cx+M.x11),Ye(D.cy+D.y11,D.cx+D.x11),!S),i.arc(D.cx,D.cy,_,Ye(D.y11,D.x11),Ye(D.y01,D.x01),!S))):(i.moveTo(oe,X),i.arc(0,0,p,R,v,!S)):i.moveTo(oe,X),!(h>st)||!(E>st)?i.lineTo(se,F):A>st?(M=_o(se,F,ee,ce,h,-A,S),D=_o(oe,X,be,_e,h,-A,S),i.lineTo(M.cx+M.x01,M.cy+M.y01),A<b?i.arc(M.cx,M.cy,A,Ye(M.y01,M.x01),Ye(D.y01,D.x01),!S):(i.arc(M.cx,M.cy,A,Ye(M.y01,M.x01),Ye(M.y11,M.x11),!S),i.arc(0,0,h,Ye(M.cy+M.y11,M.cx+M.x11),Ye(D.cy+D.y11,D.cx+D.x11),S),i.arc(D.cx,D.cy,A,Ye(D.y11,D.x11),Ye(D.y01,D.x01),!S))):i.arc(0,0,h,I,O,S)}if(i.closePath(),u)return i=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+o.apply(this,arguments)+ +s.apply(this,arguments))/2-Yn/2;return[fr(d)*u,Pt(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Fe(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Fe(+u),c):t},c.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:Fe(+u),c):r},c.padRadius=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:Fe(+u),c):n},c.startAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Fe(+u),c):o},c.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Fe(+u),c):s},c.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Fe(+u),c):a},c.context=function(u){return arguments.length?(i=u??null,c):i},c}function dp(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function FS(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function $S(e){return e}function NS(){var e=$S,t=FS,r=null,n=Fe(0),o=Fe(qo),s=Fe(0);function a(i){var l,c=(i=dp(i)).length,u,d,h=0,p=new Array(c),f=new Array(c),m=+n.apply(this,arguments),y=Math.min(qo,Math.max(-qo,o.apply(this,arguments)-m)),S,R=Math.min(Math.abs(y)/c,s.apply(this,arguments)),v=R*(y<0?-1:1),O;for(l=0;l<c;++l)(O=f[p[l]=l]=+e(i[l],l,i))>0&&(h+=O);for(t!=null?p.sort(function(I,E){return t(f[I],f[E])}):r!=null&&p.sort(function(I,E){return r(i[I],i[E])}),l=0,d=h?(y-c*v)/h:0;l<c;++l,m=S)u=p[l],O=f[u],S=m+(O>0?O*d:0)+v,f[u]={data:i[u],index:l,value:O,startAngle:m,endAngle:S,padAngle:R};return f}return a.value=function(i){return arguments.length?(e=typeof i=="function"?i:Fe(+i),a):e},a.sortValues=function(i){return arguments.length?(t=i,r=null,a):t},a.sort=function(i){return arguments.length?(r=i,t=null,a):r},a.startAngle=function(i){return arguments.length?(n=typeof i=="function"?i:Fe(+i),a):n},a.endAngle=function(i){return arguments.length?(o=typeof i=="function"?i:Fe(+i),a):o},a.padAngle=function(i){return arguments.length?(s=typeof i=="function"?i:Fe(+i),a):s},a}function cn(e,t){if((a=e.length)>1)for(var r=1,n,o,s=e[t[0]],a,i=s.length;r<a;++r)for(o=s,s=e[t[r]],n=0;n<i;++n)s[n][1]+=s[n][0]=isNaN(o[n][1])?o[n][0]:o[n][1]}function un(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function zS(e,t){return e[t]}function GS(e){const t=[];return t.key=e,t}function hp(){var e=Fe([]),t=un,r=cn,n=zS;function o(s){var a=Array.from(e.apply(this,arguments),GS),i,l=a.length,c=-1,u;for(const d of s)for(i=0,++c;i<l;++i)(a[i][c]=[0,+n(d,a[i].key,c,s)]).data=d;for(i=0,u=dp(t(a));i<l;++i)a[u[i]].index=i;return r(a,u),a}return o.keys=function(s){return arguments.length?(e=typeof s=="function"?s:Fe(Array.from(s)),o):e},o.value=function(s){return arguments.length?(n=typeof s=="function"?s:Fe(+s),o):n},o.order=function(s){return arguments.length?(t=s==null?un:typeof s=="function"?s:Fe(Array.from(s)),o):t},o.offset=function(s){return arguments.length?(r=s??cn,o):r},o}function HS(e,t){if((n=e.length)>0){for(var r,n,o=0,s=e[0].length,a;o<s;++o){for(a=r=0;r<n;++r)a+=e[r][o][1]||0;if(a)for(r=0;r<n;++r)e[r][o][1]/=a}cn(e,t)}}function qS(e,t){if((l=e.length)>0)for(var r,n=0,o,s,a,i,l,c=e[t[0]].length;n<c;++n)for(a=i=0,r=0;r<l;++r)(s=(o=e[t[r]][n])[1]-o[0])>0?(o[0]=a,o[1]=a+=s):s<0?(o[1]=i,o[0]=i+=s):(o[0]=0,o[1]=s)}function WS(e,t){if((o=e.length)>0){for(var r=0,n=e[t[0]],o,s=n.length;r<s;++r){for(var a=0,i=0;a<o;++a)i+=e[a][r][1]||0;n[r][1]+=n[r][0]=-i/2}cn(e,t)}}function JS(e,t){if(!(!((a=e.length)>0)||!((s=(o=e[t[0]]).length)>0))){for(var r=0,n=1,o,s,a;n<s;++n){for(var i=0,l=0,c=0;i<a;++i){for(var u=e[t[i]],d=u[n][1]||0,h=u[n-1][1]||0,p=(d-h)/2,f=0;f<i;++f){var m=e[t[f]],y=m[n][1]||0,S=m[n-1][1]||0;p+=y-S}l+=d,c+=p*d}o[n-1][1]+=o[n-1][0]=r,l&&(r-=c/l)}o[n-1][1]+=o[n-1][0]=r,cn(e,t)}}function pp(e){var t=e.map(YS);return un(e).sort(function(r,n){return t[r]-t[n]})}function YS(e){for(var t=-1,r=0,n=e.length,o,s=-1/0;++t<n;)(o=+e[t][1])>s&&(s=o,r=t);return r}function fp(e){var t=e.map(mp);return un(e).sort(function(r,n){return t[r]-t[n]})}function mp(e){for(var t=0,r=-1,n=e.length,o;++r<n;)(o=+e[r][1])&&(t+=o);return t}function KS(e){return fp(e).reverse()}function QS(e){var t=e.length,r,n,o=e.map(mp),s=pp(e),a=0,i=0,l=[],c=[];for(r=0;r<t;++r)n=s[r],a<i?(a+=o[n],l.push(n)):(i+=o[n],c.push(n));return c.reverse().concat(l)}function XS(e){return un(e).reverse()}const La={appearance:pp,ascending:fp,descending:KS,insideOut:QS,none:un,reverse:XS},Fa={expand:HS,diverging:qS,none:cn,silhouette:WS,wiggle:JS},gp=e=>{const{series:t,seriesOrder:r,defaultStrategy:n}=e,o=[],s={};return r.forEach(a=>{const{stack:i,stackOrder:l,stackOffset:c}=t[a];i===void 0?o.push({ids:[a],stackingOrder:La.none,stackingOffset:Fa.none}):s[i]===void 0?(s[i]=o.length,o.push({ids:[a],stackingOrder:La[l??(n==null?void 0:n.stackOrder)??"none"],stackingOffset:Fa[c??(n==null?void 0:n.stackOffset)??"diverging"]})):(o[s[i]].ids.push(a),l!==void 0&&(o[s[i]].stackingOrder=La[l]),c!==void 0&&(o[s[i]].stackingOffset=Fa[c]))}),o},ZS=e=>e==null?"":e.toLocaleString(),ev=(e,t)=>{const{seriesOrder:r,series:n}=e,o=gp(e),s=t??[];r.forEach(i=>{const l=n[i].data;if(l!==void 0)l.forEach((c,u)=>{s.length<=u?s.push({[i]:c}):s[u][i]=c});else if(t===void 0)throw new Error([`MUI X Charts: bar series with id='${i}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
118
- `))});const a={};return o.forEach(i=>{const{ids:l,stackingOffset:c,stackingOrder:u}=i,d=hp().keys(l.map(h=>{const p=n[h].dataKey;return n[h].data===void 0&&p!==void 0?p:h})).value((h,p)=>h[p]??0).order(u).offset(c)(s);l.forEach((h,p)=>{const f=n[h].dataKey;a[h]=K({layout:"vertical",labelMarkType:"square",minBarSize:0,valueFormatter:n[h].valueFormatter??ZS},n[h],{data:f?t.map(m=>{const y=m[f];return typeof y!="number"?(process.env.NODE_ENV!=="production"&&y!==null&&Gn([`MUI X Charts: your dataset key "${f}" is used for plotting bars, but contains nonnumerical elements.`,"Bar plots only support numbers and null values."]),null):y}):n[h].data,stackedData:d[p].map(([m,y])=>[m,y])})})}),{seriesOrder:r,stackingGroups:o,series:a}};function Zt(e,t){return typeof e=="function"?e(t):e}const tv=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>{const s=Zt(r[o].label,"legend");return s===void 0||n.push({markType:r[o].labelMarkType,id:o,seriesId:o,color:r[o].color,label:s}),n},[])},rv=(e,t,r)=>{const n=e.layout==="vertical",o=n?t==null?void 0:t.colorScale:r==null?void 0:r.colorScale,s=n?r==null?void 0:r.colorScale:t==null?void 0:t.colorScale,a=n?t==null?void 0:t.data:r==null?void 0:r.data;return s?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:s(l);return c===null?e.color:c}:o&&a?i=>{if(i===void 0)return e.color;const l=a[i],c=l===null?e.color:o(l);return c===null?e.color:c}:()=>e.color},nv=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=Zt(t.label,"tooltip"),s=t.data[n.dataIndex];if(s==null)return null;const a=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:s,formattedValue:a,markType:t.labelMarkType}},ov=e=>Object.values(e).map(t=>t.layout==="horizontal"?{direction:"y",axisId:t.yAxisId}:{direction:"x",axisId:t.xAxisId}),sv=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),av={seriesProcessor:ev,colorProcessor:rv,legendGetter:tv,tooltipGetter:nv,axisTooltipGetter:ov,xExtremumGetter:ES,yExtremumGetter:IS,getSeriesWithDefaultValues:sv},fs=(e,t)=>[t[0]===null?e[0]:Math.min(e[0],t[0]),t[1]===null?e[1]:Math.max(e[1],t[1])],iv=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:o}=e;return Object.keys(t).filter(s=>{const a=t[s].xAxisId;return a===r.id||a===void 0&&n}).reduce((s,a)=>{var c;const i=o==null?void 0:o({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[a].xAxisId,seriesYAxisId:t[a].yAxisId}),l=(c=t[a].data)==null?void 0:c.reduce((u,d,h)=>i&&!i(d,h)?u:fs(u,[d.x,d.x]),[1/0,-1/0]);return fs(s,l??[1/0,-1/0])},[1/0,-1/0])},lv=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:o}=e;return Object.keys(t).filter(s=>{const a=t[s].yAxisId;return a===r.id||a===void 0&&n}).reduce((s,a)=>{var c;const i=o==null?void 0:o({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[a].xAxisId,seriesYAxisId:t[a].yAxisId}),l=(c=t[a].data)==null?void 0:c.reduce((u,d,h)=>i&&!i(d,h)?u:fs(u,[d.y,d.y]),[1/0,-1/0]);return fs(s,l??[1/0,-1/0])},[1/0,-1/0])},cv=({series:e,seriesOrder:t},r)=>({series:Object.fromEntries(Object.entries(e).map(([o,s])=>{const a=s==null?void 0:s.datasetKeys,i=["x","y","id"].filter(c=>typeof(a==null?void 0:a[c])!="string");if(s!=null&&s.datasetKeys&&i.length>0)throw new Error([`MUI X Charts: scatter series with id='${o}' has incomplete datasetKeys.`,`Properties ${i.map(c=>`"${c}"`).join(", ")} are missing.`].join(`
119
- `));const l=a?(r==null?void 0:r.map(c=>({x:c[a.x]??null,y:c[a.y]??null,z:a.z&&c[a.z],id:a.id&&c[a.id]})))??[]:s.data??[];return[o,K({labelMarkType:"circle",markerSize:4},s,{preview:K({markerSize:1},s==null?void 0:s.preview),data:l,valueFormatter:s.valueFormatter??(c=>c&&`(${c.x}, ${c.y})`)})]})),seriesOrder:t}),uv=(e,t,r,n)=>{const o=n==null?void 0:n.colorScale,s=r==null?void 0:r.colorScale,a=t==null?void 0:t.colorScale;return o?i=>{var u,d;if(i===void 0)return e.color;if(((u=n==null?void 0:n.data)==null?void 0:u[i])!==void 0){const h=o((d=n==null?void 0:n.data)==null?void 0:d[i]);if(h!==null)return h}const l=e.data[i],c=l===null?e.color:o(l.z);return c===null?e.color:c}:s?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:s(l.y);return c===null?e.color:c}:a?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:a(l.x);return c===null?e.color:c}:()=>e.color},dv=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>{const s=Zt(r[o].label,"legend");return s===void 0||n.push({markType:r[o].labelMarkType,id:o,seriesId:o,color:r[o].color,label:s}),n},[])},hv=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=Zt(t.label,"tooltip"),s=t.data[n.dataIndex],a=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:s,formattedValue:a,markType:t.labelMarkType}},pv=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),fv={seriesProcessor:cv,colorProcessor:uv,legendGetter:dv,tooltipGetter:hv,xExtremumGetter:iv,yExtremumGetter:lv,getSeriesWithDefaultValues:pv},mv=e=>{const{axis:t}=e,r=Math.min(...t.data??[]),n=Math.max(...t.data??[]);return[r,n]};function gv(e,t,r,n){return r.reduce((o,s,a)=>{if(t[a]===null)return o;const[i,l]=e(s);return n&&(!n({y:i,x:null},a)||!n({y:l,x:null},a))?o:[Math.min(i,l,o[0]),Math.max(i,l,o[1])]},[1/0,-1/0])}const yv=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:o}=e;return Object.keys(t).filter(s=>{const a=t[s].yAxisId;return a===r.id||n&&a===void 0}).reduce((s,a)=>{const{area:i,stackedData:l,data:c}=t[a],u=i!==void 0,d=o==null?void 0:o({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[a].xAxisId,seriesYAxisId:t[a].yAxisId}),h=u&&r.scaleType!=="log"&&typeof t[a].baseline!="string"?y=>y:y=>[y[1],y[1]],p=gv(h,c,l,d),[f,m]=p;return[Math.min(f,s[0]),Math.max(m,s[1])]},[1/0,-1/0])};function bv(e,t){const r={};return Object.keys(e).forEach(n=>{r[n]=K({},e[n],{valueFormatter:e[n].valueFormatter??t})}),r}const xv=(e,t)=>{const{seriesOrder:r,series:n}=e,o=gp(K({},e,{defaultStrategy:{stackOffset:"none"}})),s=t??[];r.forEach(i=>{const l=n[i].data;if(l!==void 0)l.forEach((c,u)=>{s.length<=u?s.push({[i]:c}):s[u][i]=c});else if(t===void 0&&process.env.NODE_ENV!=="production")throw new Error([`MUI X Charts: line series with id='${i}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
120
- `))});const a={};return o.forEach(i=>{const{ids:l,stackingOrder:c,stackingOffset:u}=i,d=hp().keys(l.map(h=>{const p=n[h].dataKey;return n[h].data===void 0&&p!==void 0?p:h})).value((h,p)=>h[p]??0).order(c).offset(u)(s);l.forEach((h,p)=>{const f=n[h].dataKey;a[h]=K({labelMarkType:"line"},n[h],{data:f?t.map(m=>{const y=m[f];return typeof y!="number"?(process.env.NODE_ENV!=="production"&&y!==null&&Gn([`MUI X Charts: Your dataset key "${f}" is used for plotting line, but contains nonnumerical elements.`,"Line plots only support numbers and null values."]),null):y}):n[h].data,stackedData:d[p].map(([m,y])=>[m,y])})})}),{seriesOrder:r,stackingGroups:o,series:bv(a,i=>i==null?"":i.toLocaleString())}},Sv=(e,t,r)=>{const n=r==null?void 0:r.colorScale,o=t==null?void 0:t.colorScale;return n?s=>{if(s===void 0)return e.color;const a=e.data[s],i=a===null?e.color:n(a);return i===null?e.color:i}:o?s=>{var l;if(s===void 0)return e.color;const a=(l=t.data)==null?void 0:l[s],i=a===null?e.color:o(a);return i===null?e.color:i}:()=>e.color},vv=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>{const s=Zt(r[o].label,"legend");return s===void 0||n.push({markType:r[o].labelMarkType,id:o,seriesId:o,color:r[o].color,label:s}),n},[])},Cv=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=Zt(t.label,"tooltip"),s=t.data[n.dataIndex],a=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:s,formattedValue:a,markType:t.labelMarkType}},wv=e=>Object.values(e).map(t=>({direction:"x",axisId:t.xAxisId})),Ov=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),Tv={colorProcessor:Sv,seriesProcessor:xv,legendGetter:vv,tooltipGetter:Cv,axisTooltipGetter:wv,xExtremumGetter:mv,yExtremumGetter:yv,getSeriesWithDefaultValues:Ov},Ev=(e="none")=>{if(typeof e=="function")return e;switch(e){case"none":return null;case"desc":return(t,r)=>r-t;case"asc":return(t,r)=>t-r;default:return null}},Iv=e=>{const{seriesOrder:t,series:r}=e,n={};return t.forEach(o=>{const s=NS().startAngle(2*Math.PI*(r[o].startAngle??0)/360).endAngle(2*Math.PI*(r[o].endAngle??360)/360).padAngle(2*Math.PI*(r[o].paddingAngle??0)/360).sortValues(Ev(r[o].sortingValues??"none"))(r[o].data.map(a=>a.value));n[o]=K({labelMarkType:"circle",valueFormatter:a=>a.value.toLocaleString()},r[o],{data:r[o].data.map((a,i)=>K({},a,{id:a.id??`auto-generated-pie-id-${o}-${i}`},s[i])).map((a,i)=>{var l,c;return K({labelMarkType:"circle"},a,{formattedValue:((c=(l=r[o]).valueFormatter)==null?void 0:c.call(l,K({},a,{label:Zt(a.label,"arc")}),{dataIndex:i}))??a.value.toLocaleString()})})})}),{seriesOrder:t,series:n}},Av=e=>t=>e.data[t].color,Rv=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>(r[o].data.forEach((s,a)=>{const i=Zt(s.label,"legend");i!==void 0&&n.push({markType:s.labelMarkType??r[o].labelMarkType,id:s.id??a,seriesId:o,color:s.color,label:i,itemId:s.id??a})}),n),[])},Pv=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=t.data[n.dataIndex];if(o==null)return null;const s=Zt(o.label,"tooltip"),a=K({},o,{label:s}),i=t.valueFormatter(a,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:s,value:a,formattedValue:i,markType:o.labelMarkType??t.labelMarkType}},Mv=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`},e,{data:e.data.map((n,o)=>K({color:r[o%r.length]},n))}),_v={colorProcessor:Av,seriesProcessor:Iv,legendGetter:Rv,tooltipGetter:Pv,getSeriesWithDefaultValues:Mv},Vv={bar:av,scatter:fv,line:Tv,pie:_v},kv=[Ol,Qs,Cl,Xs];function jv(e){const{children:t,plugins:r=kv,pluginParams:n={},seriesConfig:o=Vv}=e,{contextValue:s}=fb(r,n,o);return g.jsx(rl.Provider,{value:s,children:t})}const yp=()=>{const e=V.useContext(rl);if(e==null)throw new Error(["MUI X Charts: Could not find the Chart context.","It looks like you rendered your component outside of a ChartDataProvider.","This can also happen if you are bundling multiple versions of the library."].join(`
121
- `));return e};function Vr(){const e=yp();if(!e)throw new Error(["MUI X Charts: Could not find the charts context.","It looks like you rendered your component outside of a ChartContainer parent component."].join(`
122
- `));return e.store}function bp(){const e=Vr();return at(e,ro)}function xp(){const e=Vr();return at(e,K0)}const xi=(e,t)=>e===void 0?t:Math.PI*e/180;function Dv(){const e=Vr(),{axis:t,axisIds:r}=at(e,Mr);return{xAxis:t,xAxisIds:r}}function Bv(){const e=Vr(),{axis:t,axisIds:r}=at(e,_r);return{yAxis:t,yAxisIds:r}}function Uv(){const e=Vr(),{axis:t,axisIds:r}=at(e,TS)??{axis:{},axisIds:[]};return{zAxis:t,zAxisIds:r}}function Lv(){const e=yp();if(!e)throw new Error(["MUI X Charts: Could not find the svg ref context.","It looks like you rendered your component outside of a ChartContainer parent component."].join(`
123
- `));return e.svgRef}function Fv(){const e=xp();return V.useCallback(t=>`${e}-gradient-${t}`,[e])}function $v(){const e=xp();return V.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var $a,Au;function Nv(){if(Au)return $a;Au=1;var e=4,t=.001,r=1e-7,n=10,o=11,s=1/(o-1),a=typeof Float32Array=="function";function i(m,y){return 1-3*y+3*m}function l(m,y){return 3*y-6*m}function c(m){return 3*m}function u(m,y,S){return((i(y,S)*m+l(y,S))*m+c(y))*m}function d(m,y,S){return 3*i(y,S)*m*m+2*l(y,S)*m+c(y)}function h(m,y,S,R,v){var O,I,E=0;do I=y+(S-y)/2,O=u(I,R,v)-m,O>0?S=I:y=I;while(Math.abs(O)>r&&++E<n);return I}function p(m,y,S,R){for(var v=0;v<e;++v){var O=d(y,S,R);if(O===0)return y;var I=u(y,S,R)-m;y-=I/O}return y}function f(m){return m}return $a=function(y,S,R,v){if(!(0<=y&&y<=1&&0<=R&&R<=1))throw new Error("bezier x values must be in [0, 1] range");if(y===S&&R===v)return f;for(var O=a?new Float32Array(o):new Array(o),I=0;I<o;++I)O[I]=u(I*s,y,R);function E(w){for(var P=0,k=1,b=o-1;k!==b&&O[k]<=w;++k)P+=s;--k;var A=(w-O[k])/(O[k+1]-O[k]),_=P+A*s,M=d(_,y,R);return M>=t?p(w,_,y,R):M===0?_:h(w,P,P+s,y,R)}return function(P){return P===0?0:P===1?1:u(E(P),S,v)}},$a}var zv=Nv();const Gv=am(zv),Hv=300,qv=Gv(.66,0,.34,1);var dn=0,jn=0,En=0,Sp=1e3,ms,Dn,gs=0,Or=0,Zs=0,Kn=typeof performance=="object"&&performance.now?performance:Date,vp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Tl(){return Or||(vp(Wv),Or=Kn.now()+Zs)}function Wv(){Or=0}function ys(){this._call=this._time=this._next=null}ys.prototype=Cp.prototype={constructor:ys,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Tl():+r)+(t==null?0:+t),!this._next&&Dn!==this&&(Dn?Dn._next=this:ms=this,Dn=this),this._call=e,this._time=r,vi()},stop:function(){this._call&&(this._call=null,this._time=1/0,vi())}};function Cp(e,t,r){var n=new ys;return n.restart(e,t,r),n}function Si(){Tl(),++dn;for(var e=ms,t;e;)(t=Or-e._time)>=0&&e._call.call(void 0,t),e=e._next;--dn}function Ru(){Or=(gs=Kn.now())+Zs,dn=jn=0;try{Si()}finally{dn=0,Yv(),Or=0}}function Jv(){var e=Kn.now(),t=e-gs;t>Sp&&(Zs-=t,gs=e)}function Yv(){for(var e,t=ms,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:ms=r);Dn=e,vi(n)}function vi(e){if(!dn){jn&&(jn=clearTimeout(jn));var t=e-Or;t>24?(e<1/0&&(jn=setTimeout(Ru,e-Kn.now()-Zs)),En&&(En=clearInterval(En))):(En||(gs=Kn.now(),En=setInterval(Jv,Sp)),dn=1,vp(Ru))}}function Kv(e,t,r){var n=new ys;return t=t==null?0:+t,n.restart(o=>{n.stop(),e(o+t)},t,r),n}class Qv{constructor(t,r,n){this.duration=void 0,this.elapsed=0,this.easingFn=void 0,this.timer=null,this.onTickCallback=void 0,this.duration=t,this.easingFn=r,this.onTickCallback=n,this.resume()}get running(){return this.timer!==null}timerCallback(t){this.elapsed=Math.min(t,this.duration);const r=this.duration===0?1:this.elapsed/this.duration,n=this.easingFn(r);this.onTickCallback(n),this.elapsed>=this.duration&&this.stop()}resume(){if(this.running||this.elapsed>=this.duration)return this;const t=Tl()-this.elapsed;return this.timer=Cp(r=>this.timerCallback(r),0,t),Si(),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),Kv(()=>this.timerCallback(this.duration)),Si(),this}}function Xv(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o+=1){const s=r[o];if(!Object.prototype.hasOwnProperty.call(t,s)||!Object.is(e[s],t[s]))return!1}return!0}function Zv(e,{createInterpolator:t,applyProps:r,skip:n,initialProps:o=e}){const s=V.useRef(o),a=V.useRef(null),i=V.useRef(null),l=V.useRef(e);Bt(()=>{l.current=e},[e]),Bt(()=>{var d;n&&((d=a.current)==null||d.finish(),a.current=null,i.current=null,s.current=e)},[e,n]);const c=V.useCallback(d=>{const h=s.current,p=t(h,e);a.current=new Qv(Hv,qv,f=>{const m=p(f);s.current=m,r(d,m)})},[r,t,e]);return V.useCallback(d=>{var p,f,m,y;if(d===null){(p=a.current)==null||p.stop();return}const h=i.current;if(h===d){if(Xv(l.current,e)){(f=a.current)==null||f.resume();return}(m=a.current)==null||m.stop()}h&&((y=a.current)==null||y.stop()),i.current=d,(a.current||!n)&&c(d)},[c,e,n])}function eC(e,{createInterpolator:t,transformProps:r,applyProps:n,skip:o,initialProps:s=e,ref:a}){const i=r??(u=>u),l=Zv(e,{initialProps:s,createInterpolator:t,applyProps:(u,d)=>n(u,i(d)),skip:o});return K({},r(o?e:s),{ref:Ds(l,a)})}function Pu(e){const{isReversed:t,gradientId:r,size:n,direction:o,scale:s,colorMap:a}=e;return n<=0?null:g.jsx("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${o}${t?1:2}`]:`${n}px`,gradientUnits:"userSpaceOnUse",children:a.thresholds.map((i,l)=>{const c=s(i);if(c===void 0)return null;const u=t?1-c/n:c/n;return Number.isNaN(u)?null:g.jsxs(V.Fragment,{children:[g.jsx("stop",{offset:u,stopColor:a.colors[l],stopOpacity:1}),g.jsx("stop",{offset:u,stopColor:a.colors[l+1],stopOpacity:1})]},i.toString()+l)})})}const tC=10;function Mu(e){const{gradientUnits:t,isReversed:r,gradientId:n,size:o,direction:s,scale:a,colorScale:i,colorMap:l}=e,c=[l.min??0,l.max??100],u=c.map(a).filter(f=>f!==void 0);if(u.length!==2)return null;const d=typeof c[0]=="number"?Tt(c[0],c[1]):ll(c[0],c[1]),h=Math.round((Math.max(...u)-Math.min(...u))/tC),p=`${c[0]}-${c[1]}-`;return g.jsx("linearGradient",{id:n,x1:"0",x2:"0",y1:"0",y2:"0",[`${s}${r?1:2}`]:t==="objectBoundingBox"?1:`${o}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:h+1},(f,m)=>{const y=d(m/h);if(y===void 0)return null;const S=a(y);if(S===void 0)return null;const R=r?1-S/o:S/o,v=i(y);return v===null?null:g.jsx("stop",{offset:R,stopColor:v,stopOpacity:1},p+m)})})}const rC=10,nC=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function Na(e){const{isReversed:t,gradientId:r,colorScale:n,colorMap:o}=e,s=[o.min??0,o.max??100],a=typeof s[0]=="number"?Tt(s[0],s[1]):ll(s[0],s[1]),i=rC,l=`${s[0]}-${s[1]}-`;return g.jsx("linearGradient",K({id:r},nC(t),{gradientUnits:"objectBoundingBox",children:Array.from({length:i+1},(c,u)=>{const d=u/i,h=a(d);if(h===void 0)return null;const p=n(h);return p===null?null:g.jsx("stop",{offset:d,stopColor:p,stopOpacity:1},l+u)})}))}function oC(){const{top:e,height:t,bottom:r,left:n,width:o,right:s}=bp(),a=e+t+r,i=n+o+s,l=Fv(),c=$v(),{xAxis:u,xAxisIds:d}=Dv(),{yAxis:h,yAxisIds:p}=Bv(),{zAxis:f,zAxisIds:m}=Uv(),y=p.filter(v=>h[v].colorMap!==void 0),S=d.filter(v=>u[v].colorMap!==void 0),R=m.filter(v=>f[v].colorMap!==void 0);return y.length===0&&S.length===0&&R.length===0?null:g.jsxs("defs",{children:[y.map(v=>{const O=l(v),I=c(v),{colorMap:E,scale:w,colorScale:P,reverse:k}=h[v];return(E==null?void 0:E.type)==="piecewise"?g.jsx(Pu,{isReversed:!k,scale:w,colorMap:E,size:a,gradientId:O,direction:"y"},O):(E==null?void 0:E.type)==="continuous"?g.jsxs(V.Fragment,{children:[g.jsx(Mu,{isReversed:!k,scale:w,colorScale:P,colorMap:E,size:a,gradientId:O,direction:"y"}),g.jsx(Na,{isReversed:k,colorScale:P,colorMap:E,gradientId:I})]},O):null}),S.map(v=>{const O=l(v),I=c(v),{colorMap:E,scale:w,reverse:P,colorScale:k}=u[v];return(E==null?void 0:E.type)==="piecewise"?g.jsx(Pu,{isReversed:P,scale:w,colorMap:E,size:i,gradientId:O,direction:"x"},O):(E==null?void 0:E.type)==="continuous"?g.jsxs(V.Fragment,{children:[g.jsx(Mu,{isReversed:P,scale:w,colorScale:k,colorMap:E,size:i,gradientId:O,direction:"x"}),g.jsx(Na,{isReversed:P,colorScale:k,colorMap:E,gradientId:I})]},O):null}),R.map(v=>{const O=c(v),{colorMap:I,colorScale:E}=f[v];return(I==null?void 0:I.type)==="continuous"?g.jsx(Na,{colorScale:E,colorMap:I,gradientId:O},O):null})]})}const sC=["children","className","title","desc"],aC=ft("svg",{name:"MuiChartsSurface",slot:"Root"})(({ownerState:e})=>({width:e.width??"100%",height:e.height??"100%",display:"flex",position:"relative",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",touchAction:"pan-y",userSelect:"none"})),El=V.forwardRef(function(t,r){const n=Vr(),{width:o,height:s}=at(n,H0),{width:a,height:i}=at(n,G0),l=Lv(),c=Ds(l,r),u=Yy({props:t,name:"MuiChartsSurface"}),{children:d,className:h,title:p,desc:f}=u,m=ir(u,sC),y=s>0&&o>0;return g.jsxs(aC,K({ownerState:{width:a,height:i},viewBox:`0 0 ${o} ${s}`,className:h},m,{ref:c,children:[p&&g.jsx("title",{children:p}),f&&g.jsx("desc",{children:f}),g.jsx(oC,{}),y&&d]}))});process.env.NODE_ENV!=="production"&&(El.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(El.propTypes={children:x.node,className:x.string,desc:x.string,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),title:x.string});function In(e,t){if(typeof e=="number")return e;if(e==="100%")return t;if(e.endsWith("%")){const r=Number.parseFloat(e.slice(0,e.length-1));if(!Number.isNaN(r))return r*t/100}if(e.endsWith("px")){const r=Number.parseFloat(e.slice(0,e.length-2));if(!Number.isNaN(r))return r}throw new Error(`MUI X Charts: Received an unknown value "${e}". It should be a number, or a string with a percentage value.`)}function za(e){const t=xi(e);return[Math.sin(t),-Math.cos(t)]}function iC(e,t){const r=[[0,0],za(e),za(t)],n=Math.min(e,t),o=Math.max(e,t),s=Math.floor(n/90)*90;for(let u=1;u<=4;u+=1){const d=s+u*90;d<o&&r.push(za(d))}const a=Math.min(...r.map(([u])=>u)),i=Math.max(...r.map(([u])=>u)),l=Math.min(...r.map(([,u])=>u)),c=Math.max(...r.map(([,u])=>u));return{cx:-a/(i-a),cy:-l/(c-l),minX:a,maxX:i,minY:l,maxY:c}}function lC(e,t,r,n,{minX:o,maxX:s,minY:a,maxY:i}){return Math.min(...[{ratio:Math.abs(o),space:e},{ratio:Math.abs(s),space:r-e},{ratio:Math.abs(a),space:t},{ratio:Math.abs(i),space:n-t}].map(({ratio:l,space:c})=>l<1e-5?1/0:c/l))}const Il=V.createContext({value:null,valueMin:0,valueMax:0,startAngle:0,endAngle:0,innerRadius:0,outerRadius:0,cornerRadius:0,cx:0,cy:0,maxRadius:0,valueAngle:null});process.env.NODE_ENV!=="production"&&(Il.displayName="GaugeContext");function cC(e){const{value:t=null,valueMin:r=0,valueMax:n=100,startAngle:o=0,endAngle:s=360,outerRadius:a,innerRadius:i,cornerRadius:l,cx:c,cy:u,children:d}=e,{left:h,top:p,width:f,height:m}=bp(),y=iC(o,s),S=c?In(c,f):y.cx*f,R=u?In(u,m):y.cy*m;let v=h+S,O=p+R;const I=lC(S,R,f,m,y);if(c===void 0){const b=I*(y.maxX-y.minX);v=h+(f-b)/2+y.cx*b}if(u===void 0){const b=I*(y.maxY-y.minY);O=p+(m-b)/2+y.cy*b}const E=In(a??I,I),w=In(i??"80%",I),P=In(l??0,E-w),k=V.useMemo(()=>{const b=xi(o),A=xi(s);return{value:t,valueMin:r,valueMax:n,startAngle:b,endAngle:A,outerRadius:E,innerRadius:w,cornerRadius:P,cx:v,cy:O,maxRadius:I,valueAngle:t===null?null:b+(A-b)*(t-r)/(n-r)}},[t,r,n,o,s,E,w,P,v,O,I]);return g.jsx(Il.Provider,{value:k,children:d})}function Al(){return V.useContext(Il)}const uC=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],dC=ft("g")(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),Rl=V.forwardRef(function(t,r){const{width:n,height:o,margin:s,title:a,desc:i,value:l,valueMin:c=0,valueMax:u=100,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:y,cy:S,children:R}=t,v=ir(t,uC);return g.jsx(jv,{pluginParams:{width:n,height:o,margin:mh(s,{left:10,right:10,top:10,bottom:10})},plugins:[],children:g.jsx(cC,{value:l,valueMin:c,valueMax:u,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:y,cy:S,children:g.jsx(El,K({title:a,desc:i,role:"meter","aria-valuenow":l===null?void 0:l,"aria-valuemin":c,"aria-valuemax":u},v,{ref:r,children:g.jsx(dC,{"aria-hidden":"true",children:R})}))})})});process.env.NODE_ENV!=="production"&&(Rl.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&(Rl.propTypes={children:x.node,className:x.string,cornerRadius:x.oneOfType([x.number,x.string]),cx:x.oneOfType([x.number,x.string]),cy:x.oneOfType([x.number,x.string]),desc:x.string,endAngle:x.number,height:x.number,id:x.string,innerRadius:x.oneOfType([x.number,x.string]),margin:x.oneOfType([x.number,x.shape({bottom:x.number,left:x.number,right:x.number,top:x.number})]),outerRadius:x.oneOfType([x.number,x.string]),skipAnimation:x.bool,startAngle:x.number,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),title:x.string,value:x.number,valueMax:x.number,valueMin:x.number,width:x.number});function hC(e){const t=Vr(),r=at(t,v0);return e||r}function pC(e,t){const r=Tt(e.startAngle,t.startAngle),n=Tt(e.endAngle,t.endAngle),o=Tt(e.innerRadius,t.innerRadius),s=Tt(e.outerRadius,t.outerRadius),a=Tt(e.cornerRadius,t.cornerRadius);return i=>({startAngle:r(i),endAngle:n(i),innerRadius:o(i),outerRadius:s(i),cornerRadius:a(i)})}function fC(e){return eC({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:pC,transformProps:t=>({d:up().cornerRadius(t.cornerRadius)({innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle,endAngle:t.endAngle})}),applyProps(t,r){t.setAttribute("d",r.d)},initialProps:{startAngle:e.startAngle,endAngle:e.startAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},skip:e.skipAnimation,ref:e.ref})}const mC=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],gC=ft("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function wp(e){const{value:t,valueMin:r,valueMax:n,startAngle:o,endAngle:s,outerRadius:a,innerRadius:i,cornerRadius:l,cx:c,cy:u}=Al();if(t===null)return null;const d=o+(t-r)/(n-r)*(s-o);return g.jsx(Op,K({},e,{cx:c,cy:u,startAngle:o,endAngle:d,cornerRadius:l,innerRadius:i,outerRadius:a}))}process.env.NODE_ENV!=="production"&&(wp.propTypes={skipAnimation:x.bool});function Op(e){let{cx:t,cy:r,startAngle:n,endAngle:o,cornerRadius:s,innerRadius:a,outerRadius:i,skipAnimation:l}=e,c=ir(e,mC);const u=hC(l),d=fC({startAngle:n,endAngle:o,cornerRadius:s,innerRadius:a,outerRadius:i,skipAnimation:u});return g.jsx(gC,K({},d,{transform:`translate(${t}, ${r})`},c))}process.env.NODE_ENV!=="production"&&(Op.propTypes={cornerRadius:x.number.isRequired,cx:x.number.isRequired,cy:x.number.isRequired,endAngle:x.number.isRequired,innerRadius:x.number.isRequired,outerRadius:x.number.isRequired,skipAnimation:x.bool,startAngle:x.number.isRequired});const yC=ft("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function bC(e){const{startAngle:t,endAngle:r,outerRadius:n,innerRadius:o,cornerRadius:s,cx:a,cy:i}=Al();return g.jsx(yC,K({transform:`translate(${a}, ${i})`,d:up().cornerRadius(s)({startAngle:t,endAngle:r,innerRadius:o,outerRadius:n})},e))}function xC(e){return pn("MuiGauge",e)}Ni("MuiGauge",["root","valueArc","referenceArc","valueText"]);function SC(){return typeof window>"u"}const Vo=new Map,vC=2e3,CC={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},wC=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],_u="mui_measurement_span";function Tp(e,t){return wC.indexOf(e)>=0&&t===+t?`${t}px`:t}function Ep(e){return e.split("").reduce((n,o)=>o===o.toUpperCase()?[...n,"-",o.toLowerCase()]:[...n,o],[]).join("")}const OC=e=>Object.keys(e).sort().reduce((t,r)=>`${t}${Ep(r)}:${Tp(r,e[r])};`,"");let Ga;const TC=(e,t={})=>{if(e==null||SC())return{width:0,height:0};const r=`${e}`,n=OC(t),o=`${r}-${n}`,s=Vo.get(o);if(s)return s;try{let a=document.getElementById(_u);a===null&&(a=document.createElement("span"),a.setAttribute("id",_u),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));const i=K({},CC,t);Object.keys(i).map(u=>(a.style[Ep(u)]=Tp(u,i[u]),u)),a.textContent=r;const l=a.getBoundingClientRect(),c={width:l.width,height:l.height};return Vo.set(o,c),Vo.size+1>vC&&Vo.clear(),process.env.NODE_ENV==="test"?a.textContent="":(Ga&&clearTimeout(Ga),Ga=setTimeout(()=>{a.textContent=""},0)),c}catch{return{width:0,height:0}}};function EC({style:e,needsComputation:t,text:r}){return r.split(`
124
- `).map(n=>K({text:n},t?TC(n,e):{width:0,height:0}))}function IC(){const[e,t]=V.useState(typeof window<"u"||process.env.NODE_ENV==="test");return V.useEffect(()=>{t(!0)},[]),e}const AC=["x","y","style","text","ownerState"],RC=["angle","textAnchor","dominantBaseline"];function Ip(e){const{x:t,y:r,style:n,text:o}=e,s=ir(e,AC),a=n??{},{angle:i,textAnchor:l,dominantBaseline:c}=a,u=ir(a,RC),d=IC(),h=V.useMemo(()=>EC({style:u,needsComputation:d&&o.includes(`
125
- `),text:o}),[u,o,d]);let p;switch(c){case"hanging":case"text-before-edge":p=0;break;case"central":p=(h.length-1)/2*-h[0].height;break;default:p=(h.length-1)*-h[0].height;break}return g.jsx("text",K({},s,{transform:i?`rotate(${i}, ${t}, ${r})`:void 0,x:t,y:r,textAnchor:l,dominantBaseline:c,style:u,children:h.map((f,m)=>g.jsx("tspan",{x:t,dy:`${m===0?p:h[0].height}px`,dominantBaseline:c,children:f.text},m))}))}process.env.NODE_ENV!=="production"&&(Ip.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.string.isRequired});const PC=["text","className"];function MC({value:e}){return e===null?null:e.toLocaleString()}function Ap(e){const{text:t=MC,className:r}=e,n=ir(e,PC),{value:o,valueMin:s,valueMax:a,cx:i,cy:l}=Al(),c=typeof t=="function"?t({value:o,valueMin:s,valueMax:a}):t;return c===null?null:g.jsx("g",{className:r,children:g.jsx(Ip,K({x:i,y:l,text:c,style:{textAnchor:"middle",dominantBaseline:"central"}},n))})}process.env.NODE_ENV!=="production"&&(Ap.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.oneOfType([x.func,x.string])});const _C=["text","children","classes","className","skipAnimation"],VC=e=>{const{classes:t}=e;return ws({root:["root"],valueArc:["valueArc"],referenceArc:["referenceArc"],valueText:["valueText"]},xC,t)},Pl=V.forwardRef(function(t,r){const{text:n,children:o,className:s,skipAnimation:a}=t,i=ir(t,_C),l=VC(t);return g.jsxs(Rl,K({},i,{className:Et(l.root,s),ref:r,children:[g.jsx(bC,{className:l.referenceArc}),g.jsx(wp,{className:l.valueArc,skipAnimation:a}),g.jsx(Ap,{className:l.valueText,text:n}),o]}))});process.env.NODE_ENV!=="production"&&(Pl.displayName="Gauge");process.env.NODE_ENV!=="production"&&(Pl.propTypes={children:x.node,classes:x.object,className:x.string,cornerRadius:x.oneOfType([x.number,x.string]),cx:x.oneOfType([x.number,x.string]),cy:x.oneOfType([x.number,x.string]),desc:x.string,endAngle:x.number,height:x.number,id:x.string,innerRadius:x.oneOfType([x.number,x.string]),margin:x.oneOfType([x.number,x.shape({bottom:x.number,left:x.number,right:x.number,top:x.number})]),outerRadius:x.oneOfType([x.number,x.string]),skipAnimation:x.bool,startAngle:x.number,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),text:x.oneOfType([x.func,x.string]),title:x.string,value:x.number,valueMax:x.number,valueMin:x.number,width:x.number});const kC=e=>{const t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60),o=e%60,s=[];return t>0?(s.push(t.toString()),s.push(r.toString().padStart(2,"0")),s.push(n.toString().padStart(2,"0")),s.push(o.toString().padStart(2,"0"))):r>0?(s.push(r.toString()),s.push(n.toString().padStart(2,"0")),s.push(o.toString().padStart(2,"0"))):(s.push(n.toString()),s.push(o.toString().padStart(2,"0"))),s.join(":")},_t=(e,t)=>{const r=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60),s=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const i={};return r>0&&(i.days=r),n>0&&(i.hours=n),o>0&&(i.minutes=o),(s>0||Object.keys(i).length===0)&&(i.seconds=s),new Intl.DurationFormat(t,{style:"narrow"}).format(i)}catch{}const a=[];return r>0&&a.push(`${r}d`),n>0&&a.push(`${n}h`),o>0&&a.push(`${o}m`),(s>0||a.length===0)&&a.push(`${s}s`),a.join(" ")},jC=(e,t,r)=>e==="countdown"&&r!==null?Math.min(100,t/r*100):e==="measuring"?t/60%1*100:0,DC=({timerState:e,animationState:t,hasError:r,className:n})=>{const{t:o,i18n:s}=we.useTranslation(),a=T.useTheme(),{currentState:i,remainingTime:l,maxTime:c,currentProgress:u}=e,{showErrorAnimation:d,showPauseAnimation:h,showPulsatingText:p,pulsatingFinished:f,showLabels:m,showMainText:y,showIdlePulsating:S,idleDotsCount:R}=t;return g.jsxs(T.Box,{className:n,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(Pl,{width:264,height:264,value:i==="idle"?0:u,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:h||d?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:r?a.palette.error.light:a.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),g.jsxs(T.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:[g.jsx(T.Box,{sx:{height:"16px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:1},children:g.jsx(T.Fade,{in:m&&!r&&i!=="idle"&&i!=="success",timeout:300,children:g.jsx(T.Typography,{variant:"body2",sx:{fontSize:"12px",color:i==="measured"&&(p||f)?a.palette.success.main:a.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:i==="measured"&&f?p?1:.6:1,transition:"opacity 2s ease-in-out"},children:i==="measuring"||i==="measured"?o("CycleTimer.CycleTime.lb","Cycle Time"):i==="countdown"?o("CycleTimer.RemainingTime.lb","Remaining Time"):""})})})}),g.jsxs(T.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsx(T.Fade,{in:y&&i==="idle"&&!r,timeout:200,children:g.jsxs(T.Typography,{variant:"body2",sx:{position:"absolute",fontSize:"12px",fontWeight:400,color:"rgba(255, 255, 255, 0.7)",lineHeight:"166%",letterSpacing:"0.17px",textAlign:"center",width:"200px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx("span",{style:{opacity:S?1:.6,transition:"opacity 2s ease-in-out"},children:o("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),g.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left",opacity:S?1:.6,transition:"opacity 2s ease-in-out"},children:".".repeat(R)})]})}),g.jsx(T.Fade,{in:y&&r,timeout:200,children:g.jsx(T.Typography,{variant:"h3",sx:{position:"absolute",fontSize:"40px",fontWeight:400,color:"#FFFFFF",lineHeight:"116.7%"},children:o("CycleTimer.Error.lb","Error")})}),g.jsx(T.Fade,{in:y&&!r&&i!=="idle"&&i!=="success",timeout:300,children:g.jsx(T.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:a.palette.text.primary,lineHeight:1,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:1,transition:"opacity 2s ease-in-out"},children:kC(l)})})})]}),g.jsx(T.Box,{sx:{height:"16px",display:"flex",marginTop:.5,alignItems:"center",justifyContent:"center"},children:g.jsx(T.Fade,{in:m&&!r&&i!=="idle"&&i!=="success",timeout:300,children:g.jsx(T.Typography,{variant:"body2",sx:{fontSize:"12px",color:i==="measured"&&(p||f)?a.palette.success.main:a.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:i==="measured"&&f?p?1:.6:1,transition:"opacity 2s ease-in-out"},children:i==="measuring"?o("CycleTimer.Measuring.lb","measuring..."):i==="measured"?o("CycleTimer.Determined.lb","determined"):i==="countdown"&&c!==null?o("CycleTimer.OfTime.lb",{time:_t(c,s.language)}):""})})})})]})]})},BC=({timerState:e,animationState:t,hasError:r,compact:n,className:o})=>{const{t:s,i18n:a}=we.useTranslation(),i=T.useTheme(),{currentState:l,remainingTime:c,maxTime:u}=e,{showErrorAnimation:d,showPauseAnimation:h,showPulsatingText:p,pulsatingFinished:f,showIdlePulsating:m,idleDotsCount:y}=t;return n&&l==="idle"?g.jsx(T.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0},children:g.jsx(T.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:i.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:r?s("CycleTimer.Error.lb","Error"):l==="idle"?"0s":_t(c,a.language)})}):g.jsxs(T.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[!(l==="idle"&&n)&&g.jsx(T.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:h||d?.6:1,transition:"opacity 0.5s ease-out"},children:g.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?i.palette.error.light:l==="measured"?p||f?i.palette.success.main:i.palette.text.secondary:i.palette.success.main,strokeWidth:"2",opacity:l==="measured"&&f?p?1:.6:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?i.palette.error.light:l==="measured"?p||f?i.palette.success.main:i.palette.text.secondary:i.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-(l==="idle"?0:e.currentProgress)/100)}`,style:{opacity:l==="measured"&&f?p?1:.6:1,transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),g.jsx(T.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:l==="idle"?"rgba(255, 255, 255, 0.7)":l==="measured"?p||f?i.palette.success.main:i.palette.text.secondary:i.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",opacity:l==="idle"?m?1:.6:l==="measured"&&f?p?1:.6:1,transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:r?s("CycleTimer.Error.lb","Error"):l==="idle"?g.jsxs(g.Fragment,{children:[g.jsx("span",{children:s("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),g.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left"},children:".".repeat(y)})]}):l==="measuring"?n?_t(c,a.language):`${_t(c,a.language)} / ${s("CycleTimer.Measuring.lb","measuring...")}`:l==="measured"?n?_t(c,a.language):`${_t(c,a.language)} / ${s("CycleTimer.Determined.lb","determined")}`:l==="countdown"&&u!==null?n?_t(c,a.language):`${_t(c,a.language)} / ${s("CycleTimer.Time.lb",{time:_t(u,a.language)})}`:_t(c,a.language)})]})},UC=()=>{const[e,t]=j.useState({showPauseAnimation:!1,showErrorAnimation:!1,showPulsatingText:!1,pulsatingFinished:!1,showLabels:!0,showMainText:!0,showIdlePulsating:!1,idleDotsCount:0}),r=j.useRef(null),n=j.useRef(null),o=j.useRef(null),s=j.useRef(null),a=j.useRef(0),i=j.useRef(null),l=j.useRef(null),c=j.useCallback(()=>{t(v=>({...v,showPauseAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(v=>({...v,showPauseAnimation:!1}))},800)},[]),u=j.useCallback(()=>{t(v=>({...v,showErrorAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(v=>({...v,showErrorAnimation:!1}))},600)},[]),d=j.useCallback(()=>{t(v=>({...v,showErrorAnimation:!1})),n.current&&clearTimeout(n.current)},[]),h=j.useCallback(v=>{a.current=0,t(O=>({...O,showPulsatingText:!0,pulsatingFinished:!1})),setTimeout(()=>{t(O=>({...O,pulsatingFinished:!0})),o.current=setInterval(()=>{t(O=>({...O,showPulsatingText:!O.showPulsatingText}))},2e3),v&&v()},800)},[]),p=j.useCallback(()=>{o.current&&(clearInterval(o.current),o.current=null),t(v=>({...v,showPulsatingText:!1,pulsatingFinished:!1})),a.current=0},[]),f=j.useCallback(()=>{t(v=>({...v,showIdlePulsating:!0})),i.current=setInterval(()=>{t(v=>({...v,showIdlePulsating:!v.showIdlePulsating}))},2e3),l.current=setInterval(()=>{t(v=>({...v,idleDotsCount:(v.idleDotsCount+1)%4}))},800)},[]),m=j.useCallback(()=>{i.current&&(clearInterval(i.current),i.current=null),l.current&&(clearInterval(l.current),l.current=null),t(v=>({...v,showIdlePulsating:!1,idleDotsCount:0}))},[]),y=j.useCallback(()=>{t(v=>({...v,showLabels:!1,showMainText:!1})),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{t(v=>({...v,showLabels:!0,showMainText:!0}))},200)},[]),S=j.useCallback(()=>{t(v=>({...v,showLabels:!0,showMainText:!0}))},[]),R=j.useCallback(()=>{r.current&&clearTimeout(r.current),n.current&&clearTimeout(n.current),s.current&&clearTimeout(s.current),o.current&&clearInterval(o.current),i.current&&clearInterval(i.current),l.current&&clearInterval(l.current)},[]);return{animationState:e,triggerPauseAnimation:c,triggerErrorAnimation:u,clearErrorAnimation:d,startPulsatingAnimation:h,stopPulsatingAnimation:p,startIdleAnimations:f,stopIdleAnimations:m,triggerFadeTransition:y,setInitialAnimationState:S,cleanup:R}};class Ml{constructor(t=[],r={}){this.currentValues=[],this.targetValues=[],this.previousTargetValues=[],this.targetUpdateTime=0,this.animationId=null,this.updateCount=0,this.velocities=[],this.animate=()=>{this.update(.016666666666666666)?this.animationId=null:this.animationId=requestAnimationFrame(this.animate)},this.options={tension:120,friction:20,threshold:.001,onChange:()=>{},onComplete:()=>{},...r},this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0}update(t=1/60){let r=!1,n=!0;this.updateCount++;const o=Math.min(t,1/15),s=this.updateCount===1?.7:1;for(let a=0;a<this.currentValues.length;a++){const i=this.currentValues[a],l=this.targetValues[a],c=this.velocities[a],u=l-i,d=u*this.options.tension*s,h=c*this.options.friction,p=d-h,f=c+p*o,m=i+f*o;Math.abs(u)<this.options.threshold&&Math.abs(f)<this.options.threshold*10?this.currentValues[a]!==l&&(this.currentValues[a]=l,this.velocities[a]=0,r=!0):(n=!1,this.currentValues[a]=m,this.velocities[a]=f,r=!0)}return r&&this.options.onChange(this.currentValues),n&&this.options.onComplete(this.currentValues),n}setTarget(t){const r=performance.now(),n=r-this.targetUpdateTime;this.previousTargetValues=[...this.targetValues],this.targetValues=[...t],this.targetUpdateTime=r,this.updateCount=0;const o=this.previousTargetValues.every((s,a)=>s===this.currentValues[a]);if(n<8&&n>0&&this.previousTargetValues.length>0&&!o){const s=Math.min(n/8,1);for(let a=0;a<this.targetValues.length;a++){const i=this.previousTargetValues[a]||0,l=t[a]||0;Math.abs(l-i)>.1&&(this.targetValues[a]=i+(l-i)*s)}}for(;this.currentValues.length<t.length;)this.currentValues.push(t[this.currentValues.length]),this.velocities.push(0);this.currentValues.length>t.length&&(this.currentValues=this.currentValues.slice(0,t.length),this.velocities=this.velocities.slice(0,t.length))}getCurrentValues(){return[...this.currentValues]}getValue(t){return this.currentValues[t]??0}isInterpolating(){return this.animationId!==null}stop(){this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null)}setImmediate(t){this.stop(),this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0,this.options.onChange(this.currentValues)}updateOptions(t){this.options={...this.options,...t}}startAutoInterpolation(){this.startInterpolation()}destroy(){this.stop()}startInterpolation(){this.animationId===null&&this.animate()}}function _l(e=[],t={}){const r=j.useRef(null);return r.current||(r.current=new Ml(e,t)),j.useEffect(()=>{var n;(n=r.current)==null||n.updateOptions(t)},[t]),j.useEffect(()=>()=>{var n;(n=r.current)==null||n.destroy()},[]),[r.current]}const LC=({autoStart:e,onCycleEnd:t,onMeasuringComplete:r,hasError:n,onPauseAnimation:o,onErrorAnimation:s,onClearErrorAnimation:a,onStartPulsating:i})=>{const[l,c]=j.useState({currentState:"idle",remainingTime:0,maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),u=j.useRef(null),d=j.useRef(null),h=j.useRef(0),[p]=_l([0],{tension:80,friction:18,onChange:([I])=>{c(E=>({...E,currentProgress:I}))}}),f=j.useCallback(()=>{c(I=>({...I,currentState:"idle",maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0})),h.current=0,d.current=null,p.setImmediate([0])},[p]),m=j.useCallback((I=0)=>{const E=I/60%1*100;c(w=>({...w,currentState:"measuring",maxTime:null,remainingTime:I,isPausedState:!1,currentProgress:E})),h.current=0,p.setImmediate([E]),e?(d.current=Date.now()-I*1e3,c(w=>({...w,isRunning:!0}))):d.current=null},[e,p]),y=j.useCallback((I,E=0)=>{c(k=>({...k,isRunning:!1})),d.current=null,c(k=>({...k,currentState:"countdown",maxTime:I,isPausedState:!1})),h.current=0;const w=Math.max(0,I-E),P=E>0?E/I*100:0;c(k=>({...k,remainingTime:w,currentProgress:P})),p.setImmediate([P]),w===0?(c(k=>({...k,isRunning:!1})),d.current=null,t&&queueMicrotask(()=>t())):e?setTimeout(()=>{d.current=Date.now()-E*1e3,c(k=>({...k,isRunning:!0}))},0):d.current=null},[e,t,p]),S=j.useCallback(()=>{c(I=>({...I,isRunning:!1,currentState:"measured"})),d.current=null,i(()=>{r&&r()})},[i,r]),R=j.useCallback(()=>{if(d.current&&l.isRunning){const E=Date.now()-d.current;h.current+=E;const w=h.current/1e3,P=jC(l.currentState,w,l.maxTime);p.setTarget([P])}c(I=>({...I,isRunning:!1,isPausedState:!0})),o()},[l.isRunning,l.currentState,l.maxTime,p,o]),v=j.useCallback(()=>{l.isPausedState&&(l.remainingTime>0||l.currentState!=="countdown")&&(d.current=Date.now(),c(I=>({...I,isRunning:!0,isPausedState:!1})))},[l.isPausedState,l.remainingTime,l.currentState]),O=j.useCallback(()=>l.isPausedState,[l.isPausedState]);return j.useEffect(()=>{n?(l.isRunning&&!l.isPausedState&&(c(I=>({...I,wasRunningBeforeError:!0})),R()),s()):(l.wasRunningBeforeError&&l.isPausedState&&(c(I=>({...I,wasRunningBeforeError:!1})),v()),a())},[n,l.isRunning,l.isPausedState,l.wasRunningBeforeError,R,v,s,a]),j.useEffect(()=>{if(l.isRunning){const I=()=>{if(d.current){const w=(Date.now()-d.current+h.current)/1e3;if(l.currentState==="countdown"&&l.maxTime!==null){const P=Math.max(0,l.maxTime-w);c(b=>({...b,remainingTime:Math.ceil(P)}));const k=Math.min(100,w/l.maxTime*100);if(p.setTarget([k]),P<=0){c(b=>({...b,isRunning:!1,remainingTime:0})),d.current=null,p.setTarget([100]),t&&queueMicrotask(()=>t());return}}else if(l.currentState==="measuring"){c(k=>({...k,remainingTime:Math.floor(w)}));const P=w/60%1*100;p.setTarget([P])}l.isRunning&&(u.current=requestAnimationFrame(I))}};u.current=requestAnimationFrame(I)}else u.current&&(cancelAnimationFrame(u.current),u.current=null);return()=>{u.current&&cancelAnimationFrame(u.current)}},[l.isRunning,t,l.currentState,l.maxTime,p]),j.useEffect(()=>{let I=null;const E=()=>{p.update(1/60),I=requestAnimationFrame(E)};return I=requestAnimationFrame(E),()=>{I&&cancelAnimationFrame(I)}},[p]),{timerState:l,controls:{startNewCycle:y,startMeasuring:m,setIdle:f,completeMeasuring:S,pause:R,resume:v,isPaused:O}}},FC=Ue(me.observer(({onCycleComplete:e,onCycleEnd:t,onMeasuringComplete:r,autoStart:n=!0,variant:o="default",compact:s=!1,className:a,hasError:i=!1})=>{const l=j.useRef(void 0),{animationState:c,triggerPauseAnimation:u,triggerErrorAnimation:d,clearErrorAnimation:h,startPulsatingAnimation:p,stopPulsatingAnimation:f,startIdleAnimations:m,stopIdleAnimations:y,triggerFadeTransition:S,setInitialAnimationState:R,cleanup:v}=UC(),{timerState:O,controls:I}=LC({autoStart:n,onCycleEnd:t,onMeasuringComplete:r,hasError:i,onPauseAnimation:u,onErrorAnimation:d,onClearErrorAnimation:h,onStartPulsating:p});return j.useEffect(()=>{const E=l.current;l.current!==void 0&&E!==O.currentState?(E==="measured"&&f(),E==="idle"&&y(),S()):R(),O.currentState==="idle"&&m(),l.current=O.currentState},[O.currentState,f,y,m,S,R]),j.useEffect(()=>{let E=!0;const w=setTimeout(()=>{E&&e(I)},0);return()=>{E=!1,clearTimeout(w)}},[e,I]),j.useEffect(()=>v,[v]),o==="small"?g.jsx(BC,{timerState:O,animationState:c,hasError:i,compact:s,className:a}):g.jsx(DC,{timerState:O,animationState:c,hasError:i,className:a})})),kr=oy;process.env.NODE_ENV!=="production"&&(x.node,x.object.isRequired);function Vl(e){return ny(e)}function $C(e){return pn("MuiSvgIcon",e)}Ni("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const NC=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${tt(t)}`,`fontSize${tt(r)}`]};return ws(o,$C,n)},zC=ft("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${tt(r.color)}`],t[`fontSize${tt(r.fontSize)}`]]}})(kr(({theme:e})=>{var t,r,n,o,s,a,i,l,c,u,d,h,p,f;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:a.call(s,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:l.call(i,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var y,S;return{props:{color:m},style:{color:(S=(y=(e.vars??e).palette)==null?void 0:y[m])==null?void 0:S.main}}}),{props:{color:"action"},style:{color:(h=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(f=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:f.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),bs=V.forwardRef(function(t,r){const n=Vl({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:a="inherit",component:i="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...p}=n,f=V.isValidElement(o)&&o.type==="svg",m={...n,color:a,component:i,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:f},y={};u||(y.viewBox=h);const S=NC(m);return g.jsxs(zC,{as:i,className:Et(S.root,s),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...y,...p,...f&&o.props,ownerState:m,children:[f?o.props.children:o,d?g.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(bs.propTypes={children:x.node,classes:x.object,className:x.string,color:x.oneOfType([x.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),x.string]),component:x.elementType,fontSize:x.oneOfType([x.oneOf(["inherit","large","medium","small"]),x.string]),htmlColor:x.string,inheritViewBox:x.bool,shapeRendering:x.string,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),titleAccess:x.string,viewBox:x.string});bs.muiName="SvgIcon";function pr(e,t){function r(n,o){return g.jsx(bs,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:o,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=bs.muiName,V.memo(V.forwardRef(r))}function GC(e){const{controlled:t,default:r,name:n,state:o="value"}=e,{current:s}=V.useRef(t!==void 0),[a,i]=V.useState(r),l=s?t:a;if(process.env.NODE_ENV!=="production"){V.useEffect(()=>{s!==(t!==void 0)&&console.error([`MUI: A component is changing the ${s?"":"un"}controlled ${o} state of ${n} to be ${s?"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(`
126
- `))},[o,n,t]);const{current:u}=V.useRef(r);V.useEffect(()=>{!s&&!Object.is(u,r)&&console.error([`MUI: A component is changing the default ${o} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
127
- `))},[JSON.stringify(r)])}const c=V.useCallback(u=>{s||i(u)},[]);return[l,c]}const HC=pr(g.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),qC=pr(g.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),Vu=pr(g.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search"),Rp=Ue(me.observer(({data:e,columns:t,getRowData:r,onRowClick:n,selectedItem:o,getItemId:s,title:a,showCount:i=!0,searchPlaceholder:l="Search programs",dataGridProps:c,CustomToolbar:u,selectFirstByDefault:d=!1,sx:h})=>{var P;const p=T.useTheme(),f=Ct.useGridApiRef(),m=j.useRef(null),[y,S]=j.useState(null),R=j.useMemo(()=>e.map(r),[e,r]);j.useEffect(()=>{f.current&&R.length>0&&f.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(k=>k.field)})},[R,t,f]),j.useEffect(()=>{if(!m.current||!f.current)return;const k=new ResizeObserver(()=>{setTimeout(()=>{f.current&&R.length>0&&f.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(b=>b.field)})},100)});return k.observe(m.current),()=>{k.disconnect()}},[f,R.length,t]);const v=j.useMemo(()=>{if(o!==void 0)return o;if(y!==null)return y;if(d&&e.length>0){const k=e[0];return S(k),k}return null},[d,e,o,y]),O=k=>{const b=e.find(A=>r(A).id===k.id);b&&(o===void 0&&S(b),n&&n(b,k))},I=j.useMemo(()=>!v||!s?null:s(v),[v,s]);function E(){return g.jsx(Ct.Toolbar,{children:g.jsxs(T.Box,{sx:{display:"flex",width:"100%",gap:1,p:.5,alignItems:"center"},children:[a&&g.jsxs(T.Typography,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[a,i&&` (${e.length})`]}),g.jsxs(T.Box,{sx:{ml:"auto",display:"flex",gap:.5,alignItems:"center",pr:1},children:[g.jsx(Ct.FilterPanelTrigger,{render:g.jsx(Ct.ToolbarButton,{"aria-label":"Show filters",children:g.jsx(qC,{fontSize:"small"})})}),g.jsx(T.Divider,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),g.jsx(Ct.QuickFilter,{render:(k,b)=>g.jsxs(T.Box,{...k,sx:{display:"flex",overflow:"hidden"},children:[!b.expanded&&g.jsx(Ct.QuickFilterTrigger,{render:g.jsx(Ct.ToolbarButton,{"aria-label":"Search",children:g.jsx(Vu,{fontSize:"small"})})}),g.jsxs(T.Box,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:b.expanded?"200px":"0px",position:"relative"},children:[g.jsxs(T.Box,{sx:{flex:1,position:"relative","& .MuiInputBase-root":{height:"32px",borderRadius:"16px",backgroundColor:"#171927",paddingLeft:"40px",paddingRight:b.expanded&&b.value!==""?"40px":"12px",color:"white",fontSize:"14px",border:"none !important",outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"},"&:hover":{"&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&:focus-within":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&.Mui-focused":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"& .MuiInputBase-input":{padding:"8px 0",border:"none !important",outline:"none !important",boxShadow:"none !important","&:focus":{outline:"none !important",boxShadow:"none !important",border:"none !important"},"&::placeholder":{color:"rgba(255, 255, 255, 0.3)",opacity:1}},"& fieldset":{border:"none !important",display:"none !important"},"& .MuiOutlinedInput-notchedOutline":{border:"none !important",display:"none !important"}}},children:[b.expanded&&g.jsx(Vu,{fontSize:"small",sx:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"rgba(255, 255, 255, 0.6)",zIndex:1,pointerEvents:"none"}}),g.jsx(Ct.QuickFilterControl,{placeholder:l})]}),b.expanded&&b.value!==""&&g.jsx(Ct.QuickFilterClear,{render:g.jsx(T.Box,{sx:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",zIndex:1},children:g.jsx(T.Box,{sx:{minWidth:"24px",width:"24px",height:"24px",padding:0,color:"rgba(255, 255, 255, 0.6)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},children:g.jsx(Ct.ToolbarButton,{"aria-label":"Clear",children:g.jsx(HC,{fontSize:"small"})})})})})]})]})})]})]})})}const w=u||E;return g.jsx(T.Box,{ref:m,sx:{height:"100%",display:"flex",flexDirection:"column","& *":{scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},"&:hover *":{scrollbarWidth:"thin",scrollbarColor:`${p.palette.divider} transparent`,"&::-webkit-scrollbar":{display:"block",width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:p.palette.divider,borderRadius:"4px"},"&::-webkit-scrollbar-thumb:hover":{background:p.palette.action.hover}},...h},children:g.jsx(Ct.DataGrid,{apiRef:f,rows:R,columns:t,onRowClick:O,disableColumnMenu:!1,disableRowSelectionOnClick:!0,disableMultipleRowSelection:!0,hideFooterSelectedRowCount:!0,filterMode:"client",sortingOrder:["desc","asc"],hideFooter:!1,showToolbar:!0,slots:{toolbar:w},initialState:{sorting:{sortModel:[]},filter:{filterModel:{items:[]}},...c==null?void 0:c.initialState},...c,autosizeOnMount:!0,autosizeOptions:{...(c==null?void 0:c.autosizeOptions)||{},includeOutliers:!0,includeHeaders:!0,expand:!0,columns:((P=c==null?void 0:c.autosizeOptions)==null?void 0:P.columns)||t.map(k=>k.field)},sx:{border:"none",width:"100%","& .MuiPaper-root":{boxShadow:"none !important"},"& .MuiDataGrid-overlay":{},"& .MuiDataGrid-main":{border:"none","& .MuiPaper-root":{}},"& .MuiDataGrid-container--top [role=row]":{},"& .MuiDataGrid-topContainer":{borderBottom:"none !important"},"& .MuiDataGrid-columnHeaders":{border:"none",borderBottom:"none !important"},"& .MuiDataGrid-row":{cursor:n?"pointer":"default",border:"none",margin:"1px 0",position:"relative",backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"action.hover",borderRadius:"16px",zIndex:0}},"&.Mui-selected":{backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important"}},...I!==null&&{[`&[data-id="${I}"]`]:{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"rgba(255, 255, 255, 0.08) !important",borderRadius:"16px",zIndex:0},"&:hover":{backgroundColor:"transparent !important"},"&:hover::before":{backgroundColor:"rgba(255, 255, 255, 0.12) !important"}}}},"& .MuiDataGrid-cell--textLeft":{paddingLeft:"40px"},"& .MuiDataGrid-cell":{border:"none",position:"relative",zIndex:1,"&:focus":{outline:"none"},"&:focus-within":{outline:"none"},"&:hover":{backgroundColor:"transparent !important"}},"& .MuiDataGrid-columnHeader":{border:"none",paddingLeft:"40px",paddingRight:"40px","& .MuiDataGrid-columnHeaderTitle":{color:"rgba(255, 255, 255, 0.6)"}},"& .MuiDataGrid-toolbarContainer":{padding:"8px",border:"none !important",borderBottom:"none !important","& .MuiBox-root":{},"& .MuiFormControl-root":{},"& .MuiInputBase-root":{},"& .MuiPaper-root":{boxShadow:"none !important"},"& *":{borderBottom:"none !important"}},"& .MuiDataGrid-toolbar":{borderBottom:"none !important"},"& .MuiDataGrid-toolbarFilterList":{border:"none"},"& .MuiDataGrid-withBorderColor":{borderColor:"transparent !important"},"& .MuiDataGrid-columnSeparator":{display:"none"},"& .MuiDataGrid-footerContainer":{display:"none"},"& .MuiDataGrid-filler":{border:"none !important",borderTop:"none !important",borderBottom:"none !important",borderLeft:"none !important",borderRight:"none !important","--rowBorderColor":"none !important"},"& .MuiBackdrop-root":{},"& .MuiModal-backdrop":{},...c==null?void 0:c.sx}})})}));Rp.displayName="WandelbotsDataGrid";const en=gy({createStyledComponent:ft("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Vl({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(en.propTypes={children:x.node,component:x.elementType,direction:x.oneOfType([x.oneOf(["column-reverse","column","row-reverse","row"]),x.arrayOf(x.oneOf(["column-reverse","column","row-reverse","row"])),x.object]),divider:x.node,spacing:x.oneOfType([x.arrayOf(x.oneOfType([x.number,x.string])),x.number,x.object,x.string]),sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),useFlexGap:x.bool});const WC=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("g",{id:"JogMinus"},V.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),JC=j.forwardRef(WC),YC=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("g",{id:"JogPlus"},V.createElement("g",{id:"Plus"},V.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),V.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),V.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),KC=j.forwardRef(YC);function ea(e){j.useEffect(e,[])}function Pp(e){ea(()=>Ee.autorun(e))}function Mp(e,t,r){ea(()=>Ee.reaction(e,t,r))}function ta(e){return ea(()=>{let t;function r(){e(),t=requestAnimationFrame(r)}return t=requestAnimationFrame(r),()=>{cancelAnimationFrame(t)}})}const Ci=Ue(me.observer(({colors:e,label:t,getDisplayedValue:r,startJogging:n,stopJogging:o,disabled:s,activeJoggingDirection:a,...i})=>{var v,O,I,E,w,P,k;ta(()=>{const b=r(),A=h.current;A&&(A.textContent=b)});const l=T.useTheme(),[c,u]=j.useState(null);j.useEffect(()=>{s&&R()},[s]);const d=a||c,h=j.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const p=d?(v=e.buttonBackgroundColor)==null?void 0:v.pressed:e.borderColor,f={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},m={...f,backgroundColor:(O=e.buttonBackgroundColor)==null?void 0:O.default,":hover":{backgroundColor:(I=e.buttonBackgroundColor)==null?void 0:I.hovered},":active":{backgroundColor:(E=e.buttonBackgroundColor)==null?void 0:E.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor}},":disabled":{backgroundColor:(w=e.buttonBackgroundColor)==null?void 0:w.disabled,"svg path":{fill:l.palette.action.disabled}}},y={...f,backgroundColor:(P=e.buttonBackgroundColor)==null?void 0:P.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(k=e.buttonBackgroundColor)==null?void 0:k.pressed,"svg path":{fill:l.palette.action.disabled}}};function S(b,A){s||b.button===0&&(u(A),n(A))}function R(){u(null),o()}return g.jsxs(en,{height:"64px",direction:"row",justifyContent:"center",...i,children:[g.jsx(T.IconButton,{disabled:s,disableRipple:!0,onPointerDown:b=>S(b,"-"),onPointerUp:R,onPointerOut:R,size:"large",sx:{...d==="-"?y:m,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(JC,{})}),g.jsxs(en,{spacing:"6px",sx:{width:"150px",backgroundColor:e.backgroundColor,alignItems:"center",justifyContent:"center",opacity:"0.9",borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:[g.jsx(en,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:e.color,".MuiTypography-root":{fontWeight:700,...s?{color:l.palette.action.disabled}:{}},...s?{"svg path":{fill:l.palette.action.disabled}}:{}},children:t}),g.jsx(T.Typography,{height:"22px",sx:{fontSize:"15px",color:s?l.palette.action.disabled:e.color,fontWeight:700},ref:h,children:r()})]}),g.jsx(T.IconButton,{disableRipple:!0,disabled:s,onPointerDown:b=>S(b,"+"),onPointerUp:R,onPointerOut:R,size:"large",sx:{...d==="+"?y:m,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(KC,{})})]})})),QC=pr(g.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),XC=pr(g.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function Tr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var _p=typeof global=="object"&&global&&global.Object===Object&&global,ZC=typeof self=="object"&&self&&self.Object===Object&&self,Lt=_p||ZC||Function("return this")(),Ha=function(){return Lt.Date.now()},ew=/\s/;function tw(e){for(var t=e.length;t--&&ew.test(e.charAt(t)););return t}var rw=/^\s+/;function nw(e){return e&&e.slice(0,tw(e)+1).replace(rw,"")}var ur=Lt.Symbol,Vp=Object.prototype,ow=Vp.hasOwnProperty,sw=Vp.toString,An=ur?ur.toStringTag:void 0;function aw(e){var t=ow.call(e,An),r=e[An];try{e[An]=void 0;var n=!0}catch{}var o=sw.call(e);return n&&(t?e[An]=r:delete e[An]),o}var iw=Object.prototype,lw=iw.toString;function cw(e){return lw.call(e)}var uw="[object Null]",dw="[object Undefined]",ku=ur?ur.toStringTag:void 0;function jr(e){return e==null?e===void 0?dw:uw:ku&&ku in Object(e)?aw(e):cw(e)}function Er(e){return e!=null&&typeof e=="object"}var hw="[object Symbol]";function ra(e){return typeof e=="symbol"||Er(e)&&jr(e)==hw}var ju=NaN,pw=/^[-+]0x[0-9a-f]+$/i,fw=/^0b[01]+$/i,mw=/^0o[0-7]+$/i,gw=parseInt;function Du(e){if(typeof e=="number")return e;if(ra(e))return ju;if(Tr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Tr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=nw(e);var r=fw.test(e);return r||mw.test(e)?gw(e.slice(2),r?2:8):pw.test(e)?ju:+e}var yw="Expected a function",bw=Math.max,xw=Math.min;function Sw(e,t,r){var n,o,s,a,i,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(yw);t=Du(t)||0,Tr(r)&&(u=!!r.leading,d="maxWait"in r,s=d?bw(Du(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h);function p(E){var w=n,P=o;return n=o=void 0,c=E,a=e.apply(P,w),a}function f(E){return c=E,i=setTimeout(S,t),u?p(E):a}function m(E){var w=E-l,P=E-c,k=t-w;return d?xw(k,s-P):k}function y(E){var w=E-l,P=E-c;return l===void 0||w>=t||w<0||d&&P>=s}function S(){var E=Ha();if(y(E))return R(E);i=setTimeout(S,m(E))}function R(E){return i=void 0,h&&n?p(E):(n=o=void 0,a)}function v(){i!==void 0&&clearTimeout(i),c=0,n=l=o=i=void 0}function O(){return i===void 0?a:R(Ha())}function I(){var E=Ha(),w=y(E);if(n=arguments,o=this,l=E,w){if(i===void 0)return f(l);if(d)return clearTimeout(i),i=setTimeout(S,t),p(l)}return i===void 0&&(i=setTimeout(S,t)),a}return I.cancel=v,I.flush=O,I}var vw="Expected a function";function Cw(e,t,r){var n=!0,o=!0;if(typeof e!="function")throw new TypeError(vw);return Tr(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Sw(e,t,{leading:n,maxWait:t,trailing:o})}const kp=Ue(me.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:r,upperLimitDegs:n,getValueDegs:o,disabled:s,...a})=>{var v,O,I,E,w,P,k,b,A,_,M,D,ne,Q,oe;const{t:i}=we.useTranslation(),[l,c]=j.useState(),u=T.useTheme(),d={background:(v=u.palette.backgroundPaperElevation)==null?void 0:v[4],color:(O=u.palette.backgroundPaperElevation)==null?void 0:O[11]},h=me.useLocalObservable(()=>({activeJoggingDir:null,startJogging(X){this.activeJoggingDir=X,e(X)},stopJogging(){this.activeJoggingDir=null,t()}})),p=Cw(()=>{c(o())},50);ta(p);function f(X){X.button===0&&h.startJogging("-")}function m(X){X.button===0&&h.startJogging("+")}function y(X){h.stopJogging()}function S(X){h.stopJogging()}function R(X,se=1){if(X===void 0||isNaN(X))return"";const F=i("General.degree.variable",{amount:X.toFixed(se)});return X>0&&se===0?`+${F}`:F}return g.jsxs(en,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...a,sx:{"& .MuiIconButton-root":{width:"52px",color:u.palette.text.primary,alignContent:"center",backgroundColor:(I=u.palette.backgroundPaperElevation)==null?void 0:I[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(E=u.palette.backgroundPaperElevation)==null?void 0:E[11],color:u.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(w=u.palette.backgroundPaperElevation)==null?void 0:w[9]},"&:active":{...d}}},children:[g.jsx(T.IconButton,{onPointerDown:f,onPointerUp:y,onPointerOut:S,disabled:s,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:g.jsx(QC,{sx:{pointerEvents:"none",color:(A=(b=(k=(P=u.componentsExt)==null?void 0:P.JoggingPanel)==null?void 0:k.JoggingJoint)==null?void 0:b.Joint)==null?void 0:A.arrowColor}})}),g.jsxs(en,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(_=u.palette.backgroundPaperElevation)==null?void 0:_[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[g.jsx(T.Typography,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",color:s?u.palette.action.disabled:u.palette.text.primary},children:R(l)}),g.jsx(T.Slider,{disabled:!0,"aria-label":"Joint position",min:r,max:n,value:l||0,track:!1,sx:{"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{width:"5px",height:"12px",borderRadius:"2px",color:s?u.palette.action.disabled:u.palette.text.primary},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:s?u.palette.action.disabled:u.palette.text.secondary},"& .MuiSlider-rail":{backgroundColor:(M=u.palette.backgroundPaperElevation)==null?void 0:M[5],opacity:1}},marks:r!==void 0&&n!==void 0&&[{value:r,label:R(r,0)},{value:n,label:R(n,0)}]})]}),g.jsx(T.IconButton,{onPointerDown:m,onPointerUp:y,onPointerOut:S,disabled:s,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:g.jsx(XC,{sx:{pointerEvents:"none",color:(oe=(Q=(ne=(D=u.componentsExt)==null?void 0:D.JoggingPanel)==null?void 0:ne.JoggingJoint)==null?void 0:Q.Joint)==null?void 0:oe.arrowColor}})})]})})),ww=pr(g.jsx("path",{d:"M10 9h4V6h3l-5-5-5 5h3zm-1 1H6V7l-5 5 5 5v-3h3zm14 2-5-5v3h-3v4h3v3zm-9 3h-4v3H7l5 5 5-5h-3z"}),"OpenWith"),Ow=pr(g.jsx("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92"}),"Share");/*! *****************************************************************************
128
- Copyright (c) Microsoft Corporation. All rights reserved.
129
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
130
- this file except in compliance with the License. You may obtain a copy of the
131
- License at http://www.apache.org/licenses/LICENSE-2.0
132
-
133
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
134
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
135
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
136
- MERCHANTABLITY OR NON-INFRINGEMENT.
137
-
138
- See the Apache Version 2.0 License for specific language governing permissions
139
- and limitations under the License.
140
- ***************************************************************************** */var wi=function(e,t){return wi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)n.hasOwnProperty(o)&&(r[o]=n[o])},wi(e,t)};function jp(e,t){wi(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Tw(e){var t=typeof Symbol=="function"&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function Ew(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(i){a={error:i}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s}function Iw(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ew(arguments[t]));return e}var Dp=function(){function e(t,r){this.target=r,this.type=t}return e}(),Aw=function(e){jp(t,e);function t(r,n){var o=e.call(this,"error",n)||this;return o.message=r.message,o.error=r,o}return t}(Dp),Rw=function(e){jp(t,e);function t(r,n,o){r===void 0&&(r=1e3),n===void 0&&(n="");var s=e.call(this,"close",o)||this;return s.wasClean=!0,s.code=r,s.reason=n,s}return t}(Dp);/*!
141
- * Reconnecting WebSocket
142
- * by Pedro Ladaria <pedro.ladaria@gmail.com>
143
- * https://github.com/pladaria/reconnecting-websocket
144
- * License MIT
145
- */var Pw=function(){if(typeof WebSocket<"u")return WebSocket},Mw=function(e){return typeof e<"u"&&!!e&&e.CLOSING===2},mr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},_w=function(){function e(t,r,n){var o=this;n===void 0&&(n={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(s){o._debug("open event");var a=o._options.minUptime,i=a===void 0?mr.minUptime:a;clearTimeout(o._connectTimeout),o._uptimeTimeout=setTimeout(function(){return o._acceptOpen()},i),o._ws.binaryType=o._binaryType,o._messageQueue.forEach(function(l){return o._ws.send(l)}),o._messageQueue=[],o.onopen&&o.onopen(s),o._listeners.open.forEach(function(l){return o._callEventListener(s,l)})},this._handleMessage=function(s){o._debug("message event"),o.onmessage&&o.onmessage(s),o._listeners.message.forEach(function(a){return o._callEventListener(s,a)})},this._handleError=function(s){o._debug("error event",s.message),o._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),o.onerror&&o.onerror(s),o._debug("exec error listeners"),o._listeners.error.forEach(function(a){return o._callEventListener(s,a)}),o._connect()},this._handleClose=function(s){o._debug("close event"),o._clearTimeouts(),o._shouldReconnect&&o._connect(),o.onclose&&o.onclose(s),o._listeners.close.forEach(function(a){return o._callEventListener(s,a)})},this._url=t,this._protocols=r,this._options=n,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(e,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(e,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CONNECTING",{get:function(){return e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OPEN",{get:function(){return e.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSING",{get:function(){return e.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSED",{get:function(){return e.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(t){this._binaryType=t,this._ws&&(this._ws.binaryType=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bufferedAmount",{get:function(){var t=this._messageQueue.reduce(function(r,n){return typeof n=="string"?r+=n.length:n instanceof Blob?r+=n.size:r+=n.byteLength,r},0);return t+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?e.CLOSED:e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),e.prototype.close=function(t,r){if(t===void 0&&(t=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(t,r)},e.prototype.reconnect=function(t,r){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(t,r),this._connect())},e.prototype.send=function(t){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",t),this._ws.send(t);else{var r=this._options.maxEnqueuedMessages,n=r===void 0?mr.maxEnqueuedMessages:r;this._messageQueue.length<n&&(this._debug("enqueue",t),this._messageQueue.push(t))}},e.prototype.addEventListener=function(t,r){this._listeners[t]&&this._listeners[t].push(r)},e.prototype.dispatchEvent=function(t){var r,n,o=this._listeners[t.type];if(o)try{for(var s=Tw(o),a=s.next();!a.done;a=s.next()){var i=a.value;this._callEventListener(t,i)}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return!0},e.prototype.removeEventListener=function(t,r){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(function(n){return n!==r}))},e.prototype._debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._options.debug&&console.log.apply(console,Iw(["RWS>"],t))},e.prototype._getNextDelay=function(){var t=this._options,r=t.reconnectionDelayGrowFactor,n=r===void 0?mr.reconnectionDelayGrowFactor:r,o=t.minReconnectionDelay,s=o===void 0?mr.minReconnectionDelay:o,a=t.maxReconnectionDelay,i=a===void 0?mr.maxReconnectionDelay:a,l=0;return this._retryCount>0&&(l=s*Math.pow(n,this._retryCount-1),l>i&&(l=i)),this._debug("next delay",l),l},e.prototype._wait=function(){var t=this;return new Promise(function(r){setTimeout(r,t._getNextDelay())})},e.prototype._getNextUrl=function(t){if(typeof t=="string")return Promise.resolve(t);if(typeof t=="function"){var r=t();if(typeof r=="string")return Promise.resolve(r);if(r.then)return r}throw Error("Invalid URL")},e.prototype._connect=function(){var t=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var r=this._options,n=r.maxRetries,o=n===void 0?mr.maxRetries:n,s=r.connectionTimeout,a=s===void 0?mr.connectionTimeout:s,i=r.WebSocket,l=i===void 0?Pw():i;if(this._retryCount>=o){this._debug("max retries reached",this._retryCount,">=",o);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!Mw(l))throw Error("No valid WebSocket class provided");this._wait().then(function(){return t._getNextUrl(t._url)}).then(function(c){t._closeCalled||(t._debug("connect",{url:c,protocols:t._protocols}),t._ws=t._protocols?new l(c,t._protocols):new l(c),t._ws.binaryType=t._binaryType,t._connectLock=!1,t._addListeners(),t._connectTimeout=setTimeout(function(){return t._handleTimeout()},a))})}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new Aw(Error("TIMEOUT"),this))},e.prototype._disconnect=function(t,r){if(t===void 0&&(t=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(t,r),this._handleClose(new Rw(t,r,this))}catch{}}},e.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},e.prototype._callEventListener=function(t,r){"handleEvent"in r?r.handleEvent(t):r(t)},e.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},e.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},e.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},e}(),Vw=class extends _w{constructor(e,t={}){console.log("Opening websocket to",e),super(()=>this.targetUrl||e,void 0,{startClosed:!0}),this.opts=t,this.disposed=!1,Object.defineProperty(this,"url",{get(){return this.targetUrl}}),this.targetUrl=e,this.addEventListener("open",()=>{console.log(`Websocket to ${this.url} opened`)}),this.addEventListener("message",n=>{this.receivedFirstMessage||(this.receivedFirstMessage=n)}),this.addEventListener("close",()=>{console.log(`Websocket to ${this.url} closed`)});const r=this.reconnect;this.reconnect=()=>{this.opts.mock?this.opts.mock.handleWebsocketConnection(this):r.apply(this)},this.reconnect()}changeUrl(e){this.receivedFirstMessage=void 0,this.targetUrl=e,this.reconnect()}sendJson(e){this.opts.mock?this.opts.mock.handleWebsocketMessage(this,JSON.stringify(e)):this.send(JSON.stringify(e))}dispose(){this.close(),this.disposed=!0,this.opts.onDispose&&this.opts.onDispose()}async opened(){return new Promise((e,t)=>{this.readyState===WebSocket.OPEN?e():(this.addEventListener("open",()=>e()),this.addEventListener("error",t))})}async closed(){return new Promise((e,t)=>{this.readyState===WebSocket.CLOSED?e():(this.addEventListener("close",()=>e()),this.addEventListener("error",t))})}async firstMessage(){return this.receivedFirstMessage?this.receivedFirstMessage:new Promise((e,t)=>{const r=o=>{this.receivedFirstMessage=o,this.removeEventListener("message",r),this.removeEventListener("error",n),e(o)},n=o=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(o)};this.addEventListener("message",r),this.addEventListener("error",n)})}async nextMessage(){return new Promise((e,t)=>{const r=o=>{this.removeEventListener("message",r),this.removeEventListener("error",n),e(o)},n=o=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(o)};this.addEventListener("message",r),this.addEventListener("error",n)})}},kw=class{constructor(){this.available=typeof window<"u"&&!!window.localStorage}getJSON(e){if(!this.available)return null;const t=window.localStorage.getItem(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}setJSON(e,t){if(!this.available)return null;window.localStorage.setItem(e,JSON.stringify(t))}delete(e){if(!this.available)return null;window.localStorage.removeItem(e)}setString(e,t){if(!this.available)return null;window.localStorage.setItem(e,t)}getString(e){return this.available?window.localStorage.getItem(e):null}};const qa=new kw,tn="wandelbots.io",Wa={dev:{domain:`https://auth.portal.dev.${tn}`,clientId:"fLbJD0RLp5r2Dpucm5j8BjwMR6Hunfha"},stg:{domain:`https://auth.portal.stg.${tn}`,clientId:"joVDeD9e786WzFNSGCqoVq7HNkWt5j6s"},prod:{domain:`https://auth.portal.${tn}`,clientId:"J7WJUi38xVQdJAEBNRT9Xw1b0fXDb4J2"}},jw=e=>{if(e.endsWith(`dev.${tn}`))return Wa.dev;if(e.endsWith(`stg.${tn}`))return Wa.stg;if(e.endsWith(tn))return Wa.prod;throw new Error("Unsupported instance URL. Cannot determine Auth0 configuration.")},Dw=async e=>{if(typeof window>"u")throw new Error("Access token must be set to use NovaClient when not in a browser environment.");const t=jw(e);if(new URL(e).origin===window.location.origin)throw window.location.reload(),new Error("Failed to reload page to get auth details, please refresh manually");const{Auth0Client:r}=await Promise.resolve().then(()=>require("./auth0-spa-js.production.esm-CEI5Uihg.cjs")),n=new r({domain:t.domain,clientId:t.clientId??"",useRefreshTokens:!1,authorizationParams:{audience:"nova-api",redirect_uri:window.location.origin}});if(window.location.search.includes("code=")&&window.location.search.includes("state=")){const{appState:o}=await n.handleRedirectCallback();window.history.replaceState({},document.title,(o==null?void 0:o.returnTo)||window.location.pathname)}else await n.loginWithRedirect();return await n.getTokenSilently()};function Bp(e,t){return function(){return e.apply(t,arguments)}}const{toString:Bw}=Object.prototype,{getPrototypeOf:kl}=Object,{iterator:na,toStringTag:Up}=Symbol,oa=(e=>t=>{const r=Bw.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),At=e=>(e=e.toLowerCase(),t=>oa(t)===e),sa=e=>t=>typeof t===e,{isArray:yn}=Array,hn=sa("undefined");function lo(e){return e!==null&&!hn(e)&&e.constructor!==null&&!hn(e.constructor)&&lt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Lp=At("ArrayBuffer");function Uw(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Lp(e.buffer),t}const Lw=sa("string"),lt=sa("function"),Fp=sa("number"),co=e=>e!==null&&typeof e=="object",Fw=e=>e===!0||e===!1,Wo=e=>{if(oa(e)!=="object")return!1;const t=kl(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Up in e)&&!(na in e)},$w=e=>{if(!co(e)||lo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Nw=At("Date"),zw=At("File"),Gw=At("Blob"),Hw=At("FileList"),qw=e=>co(e)&&lt(e.pipe),Ww=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||lt(e.append)&&((t=oa(e))==="formdata"||t==="object"&&lt(e.toString)&&e.toString()==="[object FormData]"))},Jw=At("URLSearchParams"),[Yw,Kw,Qw,Xw]=["ReadableStream","Request","Response","Headers"].map(At),Zw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function uo(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),yn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(lo(e))return;const s=r?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let i;for(n=0;n<a;n++)i=s[n],t.call(null,e[i],i,e)}}function $p(e,t){if(lo(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const Sr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Np=e=>!hn(e)&&e!==Sr;function Oi(){const{caseless:e,skipUndefined:t}=Np(this)&&this||{},r={},n=(o,s)=>{const a=e&&$p(r,s)||s;Wo(r[a])&&Wo(o)?r[a]=Oi(r[a],o):Wo(o)?r[a]=Oi({},o):yn(o)?r[a]=o.slice():(!t||!hn(o))&&(r[a]=o)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&uo(arguments[o],n);return r}const eO=(e,t,r,{allOwnKeys:n}={})=>(uo(t,(o,s)=>{r&&lt(o)?e[s]=Bp(o,r):e[s]=o},{allOwnKeys:n}),e),tO=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),rO=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},nO=(e,t,r,n)=>{let o,s,a;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!n||n(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=r!==!1&&kl(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},oO=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},sO=e=>{if(!e)return null;if(yn(e))return e;let t=e.length;if(!Fp(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},aO=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&kl(Uint8Array)),iO=(e,t)=>{const n=(e&&e[na]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},lO=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},cO=At("HTMLFormElement"),uO=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),Bu=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),dO=At("RegExp"),zp=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};uo(r,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(n[s]=a||o)}),Object.defineProperties(e,n)},hO=e=>{zp(e,(t,r)=>{if(lt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(lt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},pO=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return yn(e)?n(e):n(String(e).split(t)),r},fO=()=>{},mO=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function gO(e){return!!(e&&lt(e.append)&&e[Up]==="FormData"&&e[na])}const yO=e=>{const t=new Array(10),r=(n,o)=>{if(co(n)){if(t.indexOf(n)>=0)return;if(lo(n))return n;if(!("toJSON"in n)){t[o]=n;const s=yn(n)?[]:{};return uo(n,(a,i)=>{const l=r(a,o+1);!hn(l)&&(s[i]=l)}),t[o]=void 0,s}}return n};return r(e,0)},bO=At("AsyncFunction"),xO=e=>e&&(co(e)||lt(e))&&lt(e.then)&&lt(e.catch),Gp=((e,t)=>e?setImmediate:t?((r,n)=>(Sr.addEventListener("message",({source:o,data:s})=>{o===Sr&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),Sr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",lt(Sr.postMessage)),SO=typeof queueMicrotask<"u"?queueMicrotask.bind(Sr):typeof process<"u"&&process.nextTick||Gp,vO=e=>e!=null&&lt(e[na]),U={isArray:yn,isArrayBuffer:Lp,isBuffer:lo,isFormData:Ww,isArrayBufferView:Uw,isString:Lw,isNumber:Fp,isBoolean:Fw,isObject:co,isPlainObject:Wo,isEmptyObject:$w,isReadableStream:Yw,isRequest:Kw,isResponse:Qw,isHeaders:Xw,isUndefined:hn,isDate:Nw,isFile:zw,isBlob:Gw,isRegExp:dO,isFunction:lt,isStream:qw,isURLSearchParams:Jw,isTypedArray:aO,isFileList:Hw,forEach:uo,merge:Oi,extend:eO,trim:Zw,stripBOM:tO,inherits:rO,toFlatObject:nO,kindOf:oa,kindOfTest:At,endsWith:oO,toArray:sO,forEachEntry:iO,matchAll:lO,isHTMLForm:cO,hasOwnProperty:Bu,hasOwnProp:Bu,reduceDescriptors:zp,freezeMethods:hO,toObjectSet:pO,toCamelCase:uO,noop:fO,toFiniteNumber:mO,findKey:$p,global:Sr,isContextDefined:Np,isSpecCompliantForm:gO,toJSONObject:yO,isAsyncFn:bO,isThenable:xO,setImmediate:Gp,asap:SO,isIterable:vO};function de(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}U.inherits(de,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:U.toJSONObject(this.config),code:this.code,status:this.status}}});const Hp=de.prototype,qp={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{qp[e]={value:e}});Object.defineProperties(de,qp);Object.defineProperty(Hp,"isAxiosError",{value:!0});de.from=(e,t,r,n,o,s)=>{const a=Object.create(Hp);U.toFlatObject(e,a,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const i=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return de.call(a,i,l,r,n,o),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",s&&Object.assign(a,s),a};const CO=null;function Ti(e){return U.isPlainObject(e)||U.isArray(e)}function Wp(e){return U.endsWith(e,"[]")?e.slice(0,-2):e}function Uu(e,t,r){return e?e.concat(t).map(function(o,s){return o=Wp(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function wO(e){return U.isArray(e)&&!e.some(Ti)}const OO=U.toFlatObject(U,{},null,function(t){return/^is[A-Z]/.test(t)});function aa(e,t,r){if(!U.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=U.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!U.isUndefined(y[m])});const n=r.metaTokens,o=r.visitor||u,s=r.dots,a=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&U.isSpecCompliantForm(t);if(!U.isFunction(o))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(U.isDate(f))return f.toISOString();if(U.isBoolean(f))return f.toString();if(!l&&U.isBlob(f))throw new de("Blob is not supported. Use a Buffer instead.");return U.isArrayBuffer(f)||U.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,y){let S=f;if(f&&!y&&typeof f=="object"){if(U.endsWith(m,"{}"))m=n?m:m.slice(0,-2),f=JSON.stringify(f);else if(U.isArray(f)&&wO(f)||(U.isFileList(f)||U.endsWith(m,"[]"))&&(S=U.toArray(f)))return m=Wp(m),S.forEach(function(v,O){!(U.isUndefined(v)||v===null)&&t.append(a===!0?Uu([m],O,s):a===null?m:m+"[]",c(v))}),!1}return Ti(f)?!0:(t.append(Uu(y,m,s),c(f)),!1)}const d=[],h=Object.assign(OO,{defaultVisitor:u,convertValue:c,isVisitable:Ti});function p(f,m){if(!U.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),U.forEach(f,function(S,R){(!(U.isUndefined(S)||S===null)&&o.call(t,S,U.isString(R)?R.trim():R,m,h))===!0&&p(S,m?m.concat(R):[R])}),d.pop()}}if(!U.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Lu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function jl(e,t){this._pairs=[],e&&aa(e,this,t)}const Jp=jl.prototype;Jp.append=function(t,r){this._pairs.push([t,r])};Jp.toString=function(t){const r=t?function(n){return t.call(this,n,Lu)}:Lu;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function TO(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Yp(e,t,r){if(!t)return e;const n=r&&r.encode||TO;U.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let s;if(o?s=o(t,r):s=U.isURLSearchParams(t)?t.toString():new jl(t,r).toString(n),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Fu{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){U.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Kp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},EO=typeof URLSearchParams<"u"?URLSearchParams:jl,IO=typeof FormData<"u"?FormData:null,AO=typeof Blob<"u"?Blob:null,RO={isBrowser:!0,classes:{URLSearchParams:EO,FormData:IO,Blob:AO},protocols:["http","https","file","blob","url","data"]},Dl=typeof window<"u"&&typeof document<"u",Ei=typeof navigator=="object"&&navigator||void 0,PO=Dl&&(!Ei||["ReactNative","NativeScript","NS"].indexOf(Ei.product)<0),MO=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_O=Dl&&window.location.href||"http://localhost",VO=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Dl,hasStandardBrowserEnv:PO,hasStandardBrowserWebWorkerEnv:MO,navigator:Ei,origin:_O},Symbol.toStringTag,{value:"Module"})),Qe={...VO,...RO};function kO(e,t){return aa(e,new Qe.classes.URLSearchParams,{visitor:function(r,n,o,s){return Qe.isNode&&U.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function jO(e){return U.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function DO(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}function Qp(e){function t(r,n,o,s){let a=r[s++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),l=s>=r.length;return a=!a&&U.isArray(o)?o.length:a,l?(U.hasOwnProp(o,a)?o[a]=[o[a],n]:o[a]=n,!i):((!o[a]||!U.isObject(o[a]))&&(o[a]=[]),t(r,n,o[a],s)&&U.isArray(o[a])&&(o[a]=DO(o[a])),!i)}if(U.isFormData(e)&&U.isFunction(e.entries)){const r={};return U.forEachEntry(e,(n,o)=>{t(jO(n),o,r,0)}),r}return null}function BO(e,t,r){if(U.isString(e))try{return(t||JSON.parse)(e),U.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const ho={transitional:Kp,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=U.isObject(t);if(s&&U.isHTMLForm(t)&&(t=new FormData(t)),U.isFormData(t))return o?JSON.stringify(Qp(t)):t;if(U.isArrayBuffer(t)||U.isBuffer(t)||U.isStream(t)||U.isFile(t)||U.isBlob(t)||U.isReadableStream(t))return t;if(U.isArrayBufferView(t))return t.buffer;if(U.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return kO(t,this.formSerializer).toString();if((i=U.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return aa(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),BO(t)):t}],transformResponse:[function(t){const r=this.transitional||ho.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(U.isResponse(t)||U.isReadableStream(t))return t;if(t&&U.isString(t)&&(n&&!this.responseType||o)){const a=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(i){if(a)throw i.name==="SyntaxError"?de.from(i,de.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qe.classes.FormData,Blob:Qe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};U.forEach(["delete","get","head","post","put","patch"],e=>{ho.headers[e]={}});const UO=U.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),LO=e=>{const t={};let r,n,o;return e&&e.split(`
146
- `).forEach(function(a){o=a.indexOf(":"),r=a.substring(0,o).trim().toLowerCase(),n=a.substring(o+1).trim(),!(!r||t[r]&&UO[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},$u=Symbol("internals");function Rn(e){return e&&String(e).trim().toLowerCase()}function Jo(e){return e===!1||e==null?e:U.isArray(e)?e.map(Jo):String(e)}function FO(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const $O=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ja(e,t,r,n,o){if(U.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!U.isString(t)){if(U.isString(n))return t.indexOf(n)!==-1;if(U.isRegExp(n))return n.test(t)}}function NO(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function zO(e,t){const r=U.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,s,a){return this[n].call(this,t,o,s,a)},configurable:!0})})}let ct=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function s(i,l,c){const u=Rn(l);if(!u)throw new Error("header name must be a non-empty string");const d=U.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||l]=Jo(i))}const a=(i,l)=>U.forEach(i,(c,u)=>s(c,u,l));if(U.isPlainObject(t)||t instanceof this.constructor)a(t,r);else if(U.isString(t)&&(t=t.trim())&&!$O(t))a(LO(t),r);else if(U.isObject(t)&&U.isIterable(t)){let i={},l,c;for(const u of t){if(!U.isArray(u))throw TypeError("Object iterator must return a key-value pair");i[c=u[0]]=(l=i[c])?U.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}a(i,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=Rn(t),t){const n=U.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return FO(o);if(U.isFunction(r))return r.call(this,o,n);if(U.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Rn(t),t){const n=U.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Ja(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function s(a){if(a=Rn(a),a){const i=U.findKey(n,a);i&&(!r||Ja(n,n[i],i,r))&&(delete n[i],o=!0)}}return U.isArray(t)?t.forEach(s):s(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const s=r[n];(!t||Ja(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const r=this,n={};return U.forEach(this,(o,s)=>{const a=U.findKey(n,s);if(a){r[a]=Jo(o),delete r[s];return}const i=t?NO(s):String(s).trim();i!==s&&delete r[s],r[i]=Jo(o),n[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return U.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&U.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
147
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[$u]=this[$u]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=Rn(a);n[i]||(zO(o,a),n[i]=!0)}return U.isArray(t)?t.forEach(s):s(t),this}};ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);U.reduceDescriptors(ct.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});U.freezeMethods(ct);function Ya(e,t){const r=this||ho,n=t||r,o=ct.from(n.headers);let s=n.data;return U.forEach(e,function(i){s=i.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Xp(e){return!!(e&&e.__CANCEL__)}function bn(e,t,r){de.call(this,e??"canceled",de.ERR_CANCELED,t,r),this.name="CanceledError"}U.inherits(bn,de,{__CANCEL__:!0});function Zp(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new de("Request failed with status code "+r.status,[de.ERR_BAD_REQUEST,de.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function GO(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function HO(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[s];a||(a=c),r[o]=l,n[o]=c;let d=s,h=0;for(;d!==o;)h+=r[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-a<t)return;const p=u&&c-u;return p?Math.round(h*1e3/p):void 0}}function qO(e,t){let r=0,n=1e3/t,o,s;const a=(c,u=Date.now())=>{r=u,o=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-r;d>=n?a(c,u):(o=c,s||(s=setTimeout(()=>{s=null,a(o)},n-d)))},()=>o&&a(o)]}const xs=(e,t,r=3)=>{let n=0;const o=HO(50,250);return qO(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,l=a-n,c=o(l),u=a<=i;n=a;const d={loaded:a,total:i,progress:i?a/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&u?(i-a)/c:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},r)},Nu=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},zu=e=>(...t)=>U.asap(()=>e(...t)),WO=Qe.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Qe.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Qe.origin),Qe.navigator&&/(msie|trident)/i.test(Qe.navigator.userAgent)):()=>!0,JO=Qe.hasStandardBrowserEnv?{write(e,t,r,n,o,s,a){if(typeof document>"u")return;const i=[`${e}=${encodeURIComponent(t)}`];U.isNumber(r)&&i.push(`expires=${new Date(r).toUTCString()}`),U.isString(n)&&i.push(`path=${n}`),U.isString(o)&&i.push(`domain=${o}`),s===!0&&i.push("secure"),U.isString(a)&&i.push(`SameSite=${a}`),document.cookie=i.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function YO(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function KO(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ef(e,t,r){let n=!YO(t);return e&&(n||r==!1)?KO(e,t):t}const Gu=e=>e instanceof ct?{...e}:e;function Ir(e,t){t=t||{};const r={};function n(c,u,d,h){return U.isPlainObject(c)&&U.isPlainObject(u)?U.merge.call({caseless:h},c,u):U.isPlainObject(u)?U.merge({},u):U.isArray(u)?u.slice():u}function o(c,u,d,h){if(U.isUndefined(u)){if(!U.isUndefined(c))return n(void 0,c,d,h)}else return n(c,u,d,h)}function s(c,u){if(!U.isUndefined(u))return n(void 0,u)}function a(c,u){if(U.isUndefined(u)){if(!U.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function i(c,u,d){if(d in t)return n(c,u);if(d in e)return n(void 0,c)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(c,u,d)=>o(Gu(c),Gu(u),d,!0)};return U.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||o,h=d(e[u],t[u],u);U.isUndefined(h)&&d!==i||(r[u]=h)}),r}const tf=e=>{const t=Ir({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;if(t.headers=a=ct.from(a),t.url=Yp(ef(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),U.isFormData(r)){if(Qe.hasStandardBrowserEnv||Qe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(U.isFunction(r.getHeaders)){const l=r.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&a.set(u,d)})}}if(Qe.hasStandardBrowserEnv&&(n&&U.isFunction(n)&&(n=n(t)),n||n!==!1&&WO(t.url))){const l=o&&s&&JO.read(s);l&&a.set(o,l)}return t},QO=typeof XMLHttpRequest<"u",XO=QO&&function(e){return new Promise(function(r,n){const o=tf(e);let s=o.data;const a=ct.from(o.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=o,u,d,h,p,f;function m(){p&&p(),f&&f(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function S(){if(!y)return;const v=ct.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),I={data:!i||i==="text"||i==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:v,config:e,request:y};Zp(function(w){r(w),m()},function(w){n(w),m()},I),y=null}"onloadend"in y?y.onloadend=S:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(S)},y.onabort=function(){y&&(n(new de("Request aborted",de.ECONNABORTED,e,y)),y=null)},y.onerror=function(O){const I=O&&O.message?O.message:"Network Error",E=new de(I,de.ERR_NETWORK,e,y);E.event=O||null,n(E),y=null},y.ontimeout=function(){let O=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const I=o.transitional||Kp;o.timeoutErrorMessage&&(O=o.timeoutErrorMessage),n(new de(O,I.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,e,y)),y=null},s===void 0&&a.setContentType(null),"setRequestHeader"in y&&U.forEach(a.toJSON(),function(O,I){y.setRequestHeader(I,O)}),U.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),i&&i!=="json"&&(y.responseType=o.responseType),c&&([h,f]=xs(c,!0),y.addEventListener("progress",h)),l&&y.upload&&([d,p]=xs(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(u=v=>{y&&(n(!v||v.type?new bn(null,e,y):v),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const R=GO(o.url);if(R&&Qe.protocols.indexOf(R)===-1){n(new de("Unsupported protocol "+R+":",de.ERR_BAD_REQUEST,e));return}y.send(s||null)})},ZO=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const s=function(c){if(!o){o=!0,i();const u=c instanceof Error?c:this.reason;n.abort(u instanceof de?u:new bn(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,s(new de(`timeout ${t} of ms exceeded`,de.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=n;return l.unsubscribe=()=>U.asap(i),l}},eT=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},tT=async function*(e,t){for await(const r of rT(e))yield*eT(r,t)},rT=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Hu=(e,t,r,n)=>{const o=tT(e,t);let s=0,a,i=l=>{a||(a=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){i(),l.close();return}let d=u.byteLength;if(r){let h=s+=d;r(h)}l.enqueue(new Uint8Array(u))}catch(c){throw i(c),c}},cancel(l){return i(l),o.return()}},{highWaterMark:2})},qu=64*1024,{isFunction:ko}=U,nT=(({Request:e,Response:t})=>({Request:e,Response:t}))(U.global),{ReadableStream:Wu,TextEncoder:Ju}=U.global,Yu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},oT=e=>{e=U.merge.call({skipUndefined:!0},nT,e);const{fetch:t,Request:r,Response:n}=e,o=t?ko(t):typeof fetch=="function",s=ko(r),a=ko(n);if(!o)return!1;const i=o&&ko(Wu),l=o&&(typeof Ju=="function"?(f=>m=>f.encode(m))(new Ju):async f=>new Uint8Array(await new r(f).arrayBuffer())),c=s&&i&&Yu(()=>{let f=!1;const m=new r(Qe.origin,{body:new Wu,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!m}),u=a&&i&&Yu(()=>U.isReadableStream(new n("").body)),d={stream:u&&(f=>f.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!d[f]&&(d[f]=(m,y)=>{let S=m&&m[f];if(S)return S.call(m);throw new de(`Response type '${f}' is not supported`,de.ERR_NOT_SUPPORT,y)})});const h=async f=>{if(f==null)return 0;if(U.isBlob(f))return f.size;if(U.isSpecCompliantForm(f))return(await new r(Qe.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(U.isArrayBufferView(f)||U.isArrayBuffer(f))return f.byteLength;if(U.isURLSearchParams(f)&&(f=f+""),U.isString(f))return(await l(f)).byteLength},p=async(f,m)=>{const y=U.toFiniteNumber(f.getContentLength());return y??h(m)};return async f=>{let{url:m,method:y,data:S,signal:R,cancelToken:v,timeout:O,onDownloadProgress:I,onUploadProgress:E,responseType:w,headers:P,withCredentials:k="same-origin",fetchOptions:b}=tf(f),A=t||fetch;w=w?(w+"").toLowerCase():"text";let _=ZO([R,v&&v.toAbortSignal()],O),M=null;const D=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let ne;try{if(E&&c&&y!=="get"&&y!=="head"&&(ne=await p(P,S))!==0){let ee=new r(m,{method:"POST",body:S,duplex:"half"}),ce;if(U.isFormData(S)&&(ce=ee.headers.get("content-type"))&&P.setContentType(ce),ee.body){const[be,_e]=Nu(ne,xs(zu(E)));S=Hu(ee.body,qu,be,_e)}}U.isString(k)||(k=k?"include":"omit");const Q=s&&"credentials"in r.prototype,oe={...b,signal:_,method:y.toUpperCase(),headers:P.normalize().toJSON(),body:S,duplex:"half",credentials:Q?k:void 0};M=s&&new r(m,oe);let X=await(s?A(M,b):A(m,oe));const se=u&&(w==="stream"||w==="response");if(u&&(I||se&&D)){const ee={};["status","statusText","headers"].forEach(xe=>{ee[xe]=X[xe]});const ce=U.toFiniteNumber(X.headers.get("content-length")),[be,_e]=I&&Nu(ce,xs(zu(I),!0))||[];X=new n(Hu(X.body,qu,be,()=>{_e&&_e(),D&&D()}),ee)}w=w||"text";let F=await d[U.findKey(d,w)||"text"](X,f);return!se&&D&&D(),await new Promise((ee,ce)=>{Zp(ee,ce,{data:F,headers:ct.from(X.headers),status:X.status,statusText:X.statusText,config:f,request:M})})}catch(Q){throw D&&D(),Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)?Object.assign(new de("Network Error",de.ERR_NETWORK,f,M),{cause:Q.cause||Q}):de.from(Q,Q&&Q.code,f,M)}}},sT=new Map,rf=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:o}=t,s=[n,o,r];let a=s.length,i=a,l,c,u=sT;for(;i--;)l=s[i],c=u.get(l),c===void 0&&u.set(l,c=i?new Map:oT(t)),u=c;return c};rf();const Bl={http:CO,xhr:XO,fetch:{get:rf}};U.forEach(Bl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ku=e=>`- ${e}`,aT=e=>U.isFunction(e)||e===null||e===!1;function iT(e,t){e=U.isArray(e)?e:[e];const{length:r}=e;let n,o;const s={};for(let a=0;a<r;a++){n=e[a];let i;if(o=n,!aT(n)&&(o=Bl[(i=String(n)).toLowerCase()],o===void 0))throw new de(`Unknown adapter '${i}'`);if(o&&(U.isFunction(o)||(o=o.get(t))))break;s[i||"#"+a]=o}if(!o){const a=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=r?a.length>1?`since :
148
- `+a.map(Ku).join(`
149
- `):" "+Ku(a[0]):"as no adapter specified";throw new de("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o}const nf={getAdapter:iT,adapters:Bl};function Ka(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new bn(null,e)}function Qu(e){return Ka(e),e.headers=ct.from(e.headers),e.data=Ya.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),nf.getAdapter(e.adapter||ho.adapter,e)(e).then(function(n){return Ka(e),n.data=Ya.call(e,e.transformResponse,n),n.headers=ct.from(n.headers),n},function(n){return Xp(n)||(Ka(e),n&&n.response&&(n.response.data=Ya.call(e,e.transformResponse,n.response),n.response.headers=ct.from(n.response.headers))),Promise.reject(n)})}const of="1.13.2",ia={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ia[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Xu={};ia.transitional=function(t,r,n){function o(s,a){return"[Axios v"+of+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return(s,a,i)=>{if(t===!1)throw new de(o(a," has been removed"+(r?" in "+r:"")),de.ERR_DEPRECATED);return r&&!Xu[a]&&(Xu[a]=!0,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,a,i):!0}};ia.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function lT(e,t,r){if(typeof e!="object")throw new de("options must be an object",de.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],a=t[s];if(a){const i=e[s],l=i===void 0||a(i,s,e);if(l!==!0)throw new de("option "+s+" must be "+l,de.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new de("Unknown option "+s,de.ERR_BAD_OPTION)}}const Yo={assertOptions:lT,validators:ia},Mt=Yo.validators;let Cr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Fu,response:new Fu}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
150
- `+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ir(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Yo.assertOptions(n,{silentJSONParsing:Mt.transitional(Mt.boolean),forcedJSONParsing:Mt.transitional(Mt.boolean),clarifyTimeoutError:Mt.transitional(Mt.boolean)},!1),o!=null&&(U.isFunction(o)?r.paramsSerializer={serialize:o}:Yo.assertOptions(o,{encode:Mt.function,serialize:Mt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Yo.assertOptions(r,{baseUrl:Mt.spelling("baseURL"),withXsrfToken:Mt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=s&&U.merge(s.common,s[r.method]);s&&U.forEach(["delete","get","head","post","put","patch","common"],f=>{delete s[f]}),r.headers=ct.concat(a,s);const i=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,i.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const f=[Qu.bind(this),void 0];for(f.unshift(...i),f.push(...c),h=f.length,u=Promise.resolve(r);d<h;)u=u.then(f[d++],f[d++]);return u}h=i.length;let p=r;for(;d<h;){const f=i[d++],m=i[d++];try{p=f(p)}catch(y){m.call(this,y);break}}try{u=Qu.call(this,p)}catch(f){return Promise.reject(f)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Ir(this.defaults,t);const r=ef(t.baseURL,t.url,t.allowAbsoluteUrls);return Yp(r,t.params,t.paramsSerializer)}};U.forEach(["delete","get","head","options"],function(t){Cr.prototype[t]=function(r,n){return this.request(Ir(n||{},{method:t,url:r,data:(n||{}).data}))}});U.forEach(["post","put","patch"],function(t){function r(n){return function(s,a,i){return this.request(Ir(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Cr.prototype[t]=r(),Cr.prototype[t+"Form"]=r(!0)});let cT=class sf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(i=>{n.subscribe(i),s=i}).then(o);return a.cancel=function(){n.unsubscribe(s)},a},t(function(s,a,i){n.reason||(n.reason=new bn(s,a,i),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new sf(function(o){t=o}),cancel:t}}};function uT(e){return function(r){return e.apply(null,r)}}function dT(e){return U.isObject(e)&&e.isAxiosError===!0}const Ii={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ii).forEach(([e,t])=>{Ii[t]=e});function af(e){const t=new Cr(e),r=Bp(Cr.prototype.request,t);return U.extend(r,Cr.prototype,t,{allOwnKeys:!0}),U.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return af(Ir(e,o))},r}const B=af(ho);B.Axios=Cr;B.CanceledError=bn;B.CancelToken=cT;B.isCancel=Xp;B.VERSION=of;B.toFormData=aa;B.AxiosError=de;B.Cancel=B.CanceledError;B.all=function(t){return Promise.all(t)};B.spread=uT;B.isAxiosError=dT;B.mergeConfig=Ir;B.AxiosHeaders=ct;B.formToJSON=e=>Qp(U.isHTMLForm(e)?new FormData(e):e);B.getAdapter=nf.getAdapter;B.HttpStatusCode=Ii;B.default=B;const{Axios:UP,AxiosError:Ai,CanceledError:LP,isCancel:FP,CancelToken:$P,VERSION:NP,all:zP,Cancel:GP,isAxiosError:hT,spread:HP,toFormData:qP,AxiosHeaders:WP,HttpStatusCode:JP,formToJSON:YP,getAdapter:KP,mergeConfig:QP}=B;function pT(e){var t=[];if(e.length===0)return"";if(typeof e[0]!="string")throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var r=e.shift();e[0]=r+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var n=0;n<e.length;n++){var o=e[n];if(typeof o!="string")throw new TypeError("Url must be a string. Received "+o);o!==""&&(n>0&&(o=o.replace(/^[\/]+/,"")),n<e.length-1?o=o.replace(/[\/]+$/,""):o=o.replace(/[\/]+$/,"/"),t.push(o))}var s=t.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function Qa(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),pT(e)}var gt={},Zu;function fT(){if(Zu)return gt;Zu=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.PathError=gt.TokenData=void 0,gt.parse=c,gt.compile=u,gt.match=p,gt.pathToRegexp=f,gt.stringify=O;const e="/",t=w=>w,r=/^[$_\p{ID_Start}]$/u,n=/^[$\u200c\u200d\p{ID_Continue}]$/u,o={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function s(w){return w.replace(/[{}()\[\]+?!:*\\]/g,"\\$&")}function a(w){return w.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class i{constructor(P,k){this.tokens=P,this.originalPath=k}}gt.TokenData=i;class l extends TypeError{constructor(P,k){let b=P;k&&(b+=`: ${k}`),b+="; visit https://git.new/pathToRegexpError for info",super(b),this.originalPath=k}}gt.PathError=l;function c(w,P={}){const{encodePath:k=t}=P,b=[...w],A=[];let _=0,M=0;function D(){let Q="";if(r.test(b[_]))do Q+=b[_++];while(n.test(b[_]));else if(b[_]==='"'){let oe=_;for(;_++<b.length;){if(b[_]==='"'){_++,oe=0;break}b[_]==="\\"&&_++,Q+=b[_]}if(oe)throw new l(`Unterminated quote at index ${oe}`,w)}if(!Q)throw new l(`Missing parameter name at index ${_}`,w);return Q}for(;_<b.length;){const Q=b[_],oe=o[Q];oe?A.push({type:oe,index:_++,value:Q}):Q==="\\"?A.push({type:"escape",index:_++,value:b[_++]}):Q===":"?A.push({type:"param",index:_++,value:D()}):Q==="*"?A.push({type:"wildcard",index:_++,value:D()}):A.push({type:"char",index:_++,value:Q})}A.push({type:"end",index:_,value:""});function ne(Q){const oe=[];for(;;){const X=A[M++];if(X.type===Q)break;if(X.type==="char"||X.type==="escape"){let se=X.value,F=A[M];for(;F.type==="char"||F.type==="escape";)se+=F.value,F=A[++M];oe.push({type:"text",value:k(se)});continue}if(X.type==="param"||X.type==="wildcard"){oe.push({type:X.type,name:X.value});continue}if(X.type==="{"){oe.push({type:"group",tokens:ne("}")});continue}throw new l(`Unexpected ${X.type} at index ${X.index}, expected ${Q}`,w)}return oe}return new i(ne("end"),w)}function u(w,P={}){const{encode:k=encodeURIComponent,delimiter:b=e}=P,A=typeof w=="object"?w:c(w,P),_=d(A.tokens,b,k);return function(D={}){const[ne,...Q]=_(D);if(Q.length)throw new TypeError(`Missing parameters: ${Q.join(", ")}`);return ne}}function d(w,P,k){const b=w.map(A=>h(A,P,k));return A=>{const _=[""];for(const M of b){const[D,...ne]=M(A);_[0]+=D,_.push(...ne)}return _}}function h(w,P,k){if(w.type==="text")return()=>[w.value];if(w.type==="group"){const A=d(w.tokens,P,k);return _=>{const[M,...D]=A(_);return D.length?[""]:[M]}}const b=k||t;return w.type==="wildcard"&&k!==!1?A=>{const _=A[w.name];if(_==null)return["",w.name];if(!Array.isArray(_)||_.length===0)throw new TypeError(`Expected "${w.name}" to be a non-empty array`);return[_.map((M,D)=>{if(typeof M!="string")throw new TypeError(`Expected "${w.name}/${D}" to be a string`);return b(M)}).join(P)]}:A=>{const _=A[w.name];if(_==null)return["",w.name];if(typeof _!="string")throw new TypeError(`Expected "${w.name}" to be a string`);return[b(_)]}}function p(w,P={}){const{decode:k=decodeURIComponent,delimiter:b=e}=P,{regexp:A,keys:_}=f(w,P),M=_.map(D=>k===!1?t:D.type==="param"?k:ne=>ne.split(b).map(k));return function(ne){const Q=A.exec(ne);if(!Q)return!1;const oe=Q[0],X=Object.create(null);for(let se=1;se<Q.length;se++){if(Q[se]===void 0)continue;const F=_[se-1],ee=M[se-1];X[F.name]=ee(Q[se])}return{path:oe,params:X}}}function f(w,P={}){const{delimiter:k=e,end:b=!0,sensitive:A=!1,trailing:_=!0}=P,M=[],D=A?"":"i",ne=[];for(const X of m(w,[])){const se=typeof X=="object"?X:c(X,P);for(const F of y(se.tokens,0,[]))ne.push(S(F,k,M,se.originalPath))}let Q=`^(?:${ne.join("|")})`;return _&&(Q+=`(?:${a(k)}$)?`),Q+=b?"$":`(?=${a(k)}|$)`,{regexp:new RegExp(Q,D),keys:M}}function m(w,P){if(Array.isArray(w))for(const k of w)m(k,P);else P.push(w);return P}function*y(w,P,k){if(P===w.length)return yield k;const b=w[P];if(b.type==="group")for(const A of y(b.tokens,0,k.slice()))yield*y(w,P+1,A);else k.push(b);yield*y(w,P+1,k)}function S(w,P,k,b){let A="",_="",M=!0;for(const D of w){if(D.type==="text"){A+=a(D.value),_+=D.value,M||(M=D.value.includes(P));continue}if(D.type==="param"||D.type==="wildcard"){if(!M&&!_)throw new l(`Missing text before "${D.name}" ${D.type}`,b);D.type==="param"?A+=`(${R(P,M?"":_)}+)`:A+="([\\s\\S]+)",k.push(D),_="",M=!1;continue}}return A}function R(w,P){return P.length<2?w.length<2?`[^${a(w+P)}]`:`(?:(?!${a(w)})[^${a(P)}])`:w.length<2?`(?:(?!${a(P)})[^${a(w)}])`:`(?:(?!${a(P)}|${a(w)})[\\s\\S])`}function v(w){let P="",k=0;function b(A){return I(A)&&E(w[k])?A:JSON.stringify(A)}for(;k<w.length;){const A=w[k++];if(A.type==="text"){P+=s(A.value);continue}if(A.type==="group"){P+=`{${v(A.tokens)}}`;continue}if(A.type==="param"){P+=`:${b(A.name)}`;continue}if(A.type==="wildcard"){P+=`*${b(A.name)}`;continue}throw new TypeError(`Unknown token type: ${A.type}`)}return P}function O(w){return v(w.tokens)}function I(w){const[P,...k]=w;return r.test(P)&&k.every(b=>n.test(b))}function E(w){return w&&w.type==="text"?!n.test(w.value[0]):!0}return gt}var mT=fT();function Qn(e){"@babel/helpers - typeof";return Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qn(e)}function gT(e,t){if(Qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yT(e){var t=gT(e,"string");return Qn(t)=="symbol"?t:t+""}function bT(e,t,r){return(t=yT(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const $="/api/v2".replace(/\/+$/,""),ed={csv:","};var ze=class{constructor(e,t=$,r=B){this.basePath=t,this.axios=r,bT(this,"configuration",void 0),e&&(this.configuration=e,this.basePath=e.basePath??t)}},xT=class extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}};const N={},z="https://example.com",C=function(e,t,r){if(r==null)throw new xT(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},G=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})},H=async function(e,t){t&&t.accessToken&&(e.Authorization="Bearer "+(typeof t.accessToken=="function"?await t.accessToken():await t.accessToken))};function Ri(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>Ri(e,n,r)):Object.keys(t).forEach(n=>Ri(e,t[n],`${r}${r!==""?".":""}${n}`)):e.has(r)?e.append(r,t):e.set(r,t))}const q=function(e,...t){const r=new URLSearchParams(e.search);Ri(r,t),e.search=r.toString()},ge=function(e,t,r){const n=typeof e!="string";return(n&&r&&r.isJsonMime?r.isJsonMime(t.headers["Content-Type"]):n)?JSON.stringify(e!==void 0?e:{}):e||""},W=function(e){return e.pathname+e.search+e.hash},J=function(e,t,r,n){return(o=t,s=r)=>{const a={...e.options,url:(o.defaults.baseURL?"":(n==null?void 0:n.basePath)??s)+e.url};return o.request(a)}},kt={Abb:"abb",Fanuc:"fanuc",Kuka:"kuka",Universalrobots:"universalrobots",Yaskawa:"yaskawa"},ST=function(e){return{addApp:async(t,r,n,o={})=>{C("addApp","cell",t),C("addApp","app",r);const s="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(r,l,e),{url:W(a),options:l}},clearApps:async(t,r,n={})=>{C("clearApps","cell",t);const o="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteApp:async(t,r,n,o={})=>{C("deleteApp","cell",t),C("deleteApp","app",r);const s="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getApp:async(t,r,n={})=>{C("getApp","cell",t),C("getApp","app",r);const o="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listApps:async(t,r={})=>{C("listApps","cell",t);const n="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},updateApp:async(t,r,n,o,s={})=>{C("updateApp","cell",t),C("updateApp","app",r),C("updateApp","app2",n);const a="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.completion_timeout=o),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ge(n,c,e),{url:W(i),options:c}}}},Wr=function(e){const t=ST(e);return{async addApp(r,n,o,s){var c,u;const a=await t.addApp(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ApplicationApi.addApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async clearApps(r,n,o){var l,c;const s=await t.clearApps(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ApplicationApi.clearApps"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteApp(r,n,o,s){var c,u;const a=await t.deleteApp(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ApplicationApi.deleteApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async getApp(r,n,o){var l,c;const s=await t.getApp(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ApplicationApi.getApp"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listApps(r,n){var i,l;const o=await t.listApps(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["ApplicationApi.listApps"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async updateApp(r,n,o,s,a){var u,d;const i=await t.updateApp(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["ApplicationApi.updateApp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)}}};var td=class extends ze{addApp(e,t,r,n){return Wr(this.configuration).addApp(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearApps(e,t,r){return Wr(this.configuration).clearApps(e,t,r).then(n=>n(this.axios,this.basePath))}deleteApp(e,t,r,n){return Wr(this.configuration).deleteApp(e,t,r,n).then(o=>o(this.axios,this.basePath))}getApp(e,t,r){return Wr(this.configuration).getApp(e,t,r).then(n=>n(this.axios,this.basePath))}listApps(e,t){return Wr(this.configuration).listApps(e,t).then(r=>r(this.axios,this.basePath))}updateApp(e,t,r,n,o){return Wr(this.configuration).updateApp(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const vT=function(e){return{addBusIOService:async(t,r,n,o={})=>{C("addBusIOService","cell",t),C("addBusIOService","busIOType",r);const s="/cells/{cell}/bus-ios".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(r,l,e),{url:W(a),options:l}},addModbusIO:async(t,r,n,o={})=>{C("addModbusIO","cell",t),C("addModbusIO","io",r),C("addModbusIO","modbusIOData",n);const s="/cells/{cell}/bus-ios/modbus/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},addProfinetIO:async(t,r,n,o={})=>{C("addProfinetIO","cell",t),C("addProfinetIO","io",r),C("addProfinetIO","profinetIOData",n);const s="/cells/{cell}/bus-ios/profinet/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},clearBusIOService:async(t,r,n={})=>{C("clearBusIOService","cell",t);const o="/cells/{cell}/bus-ios".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteModbusIO:async(t,r,n={})=>{C("deleteModbusIO","cell",t),C("deleteModbusIO","io",r);const o="/cells/{cell}/bus-ios/modbus/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteProfinetIO:async(t,r,n={})=>{C("deleteProfinetIO","cell",t),C("deleteProfinetIO","io",r);const o="/cells/{cell}/bus-ios/profinet/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getBusIOService:async(t,r={})=>{C("getBusIOService","cell",t);const n="/cells/{cell}/bus-ios".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getBusIOState:async(t,r={})=>{C("getBusIOState","cell",t);const n="/cells/{cell}/bus-ios/state".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getBusIOValues:async(t,r,n={})=>{C("getBusIOValues","cell",t);const o="/cells/{cell}/bus-ios/ios/values".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),r&&(c.ios=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getProfinetDescription:async(t,r={})=>{C("getProfinetDescription","cell",t);const n="/cells/{cell}/bus-ios/profinet/description".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getProfinetIOsFromFile:async(t,r,n,o={})=>{C("getProfinetIOsFromFile","cell",t);const s="/cells/{cell}/bus-ios/profinet/iofile".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),r!==void 0&&(u.input_offset=r),n!==void 0&&(u.output_offset=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listBusIODescriptions:async(t,r={})=>{C("listBusIODescriptions","cell",t);const n="/cells/{cell}/bus-ios/ios/description".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listModbusIOs:async(t,r={})=>{C("listModbusIOs","cell",t);const n="/cells/{cell}/bus-ios/modbus/ios".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listProfinetIOs:async(t,r={})=>{C("listProfinetIOs","cell",t);const n="/cells/{cell}/bus-ios/profinet/ios".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},setBusIOValues:async(t,r,n={})=>{C("setBusIOValues","cell",t),C("setBusIOValues","iOValue",r);const o="/cells/{cell}/bus-ios/ios/values".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}},setProfinetIOsFromFile:async(t,r,n={})=>{C("setProfinetIOsFromFile","cell",t),C("setProfinetIOsFromFile","profinetInputOutputConfig",r);const o="/cells/{cell}/bus-ios/profinet/iofile".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}}}},Ke=function(e){const t=vT(e);return{async addBusIOService(r,n,o,s){var c,u;const a=await t.addBusIOService(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["BUSInputsOutputsApi.addBusIOService"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async addModbusIO(r,n,o,s){var c,u;const a=await t.addModbusIO(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["BUSInputsOutputsApi.addModbusIO"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async addProfinetIO(r,n,o,s){var c,u;const a=await t.addProfinetIO(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["BUSInputsOutputsApi.addProfinetIO"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async clearBusIOService(r,n,o){var l,c;const s=await t.clearBusIOService(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.clearBusIOService"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteModbusIO(r,n,o){var l,c;const s=await t.deleteModbusIO(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.deleteModbusIO"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteProfinetIO(r,n,o){var l,c;const s=await t.deleteProfinetIO(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.deleteProfinetIO"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getBusIOService(r,n){var i,l;const o=await t.getBusIOService(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.getBusIOService"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getBusIOState(r,n){var i,l;const o=await t.getBusIOState(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.getBusIOState"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getBusIOValues(r,n,o){var l,c;const s=await t.getBusIOValues(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.getBusIOValues"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getProfinetDescription(r,n){var i,l;const o=await t.getProfinetDescription(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.getProfinetDescription"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getProfinetIOsFromFile(r,n,o,s){var c,u;const a=await t.getProfinetIOsFromFile(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["BUSInputsOutputsApi.getProfinetIOsFromFile"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async listBusIODescriptions(r,n){var i,l;const o=await t.listBusIODescriptions(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.listBusIODescriptions"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listModbusIOs(r,n){var i,l;const o=await t.listModbusIOs(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.listModbusIOs"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listProfinetIOs(r,n){var i,l;const o=await t.listProfinetIOs(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.listProfinetIOs"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async setBusIOValues(r,n,o){var l,c;const s=await t.setBusIOValues(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.setBusIOValues"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async setProfinetIOsFromFile(r,n,o){var l,c;const s=await t.setProfinetIOsFromFile(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.setProfinetIOsFromFile"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)}}};var CT=class extends ze{addBusIOService(e,t,r,n){return Ke(this.configuration).addBusIOService(e,t,r,n).then(o=>o(this.axios,this.basePath))}addModbusIO(e,t,r,n){return Ke(this.configuration).addModbusIO(e,t,r,n).then(o=>o(this.axios,this.basePath))}addProfinetIO(e,t,r,n){return Ke(this.configuration).addProfinetIO(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearBusIOService(e,t,r){return Ke(this.configuration).clearBusIOService(e,t,r).then(n=>n(this.axios,this.basePath))}deleteModbusIO(e,t,r){return Ke(this.configuration).deleteModbusIO(e,t,r).then(n=>n(this.axios,this.basePath))}deleteProfinetIO(e,t,r){return Ke(this.configuration).deleteProfinetIO(e,t,r).then(n=>n(this.axios,this.basePath))}getBusIOService(e,t){return Ke(this.configuration).getBusIOService(e,t).then(r=>r(this.axios,this.basePath))}getBusIOState(e,t){return Ke(this.configuration).getBusIOState(e,t).then(r=>r(this.axios,this.basePath))}getBusIOValues(e,t,r){return Ke(this.configuration).getBusIOValues(e,t,r).then(n=>n(this.axios,this.basePath))}getProfinetDescription(e,t){return Ke(this.configuration).getProfinetDescription(e,t).then(r=>r(this.axios,this.basePath))}getProfinetIOsFromFile(e,t,r,n){return Ke(this.configuration).getProfinetIOsFromFile(e,t,r,n).then(o=>o(this.axios,this.basePath))}listBusIODescriptions(e,t){return Ke(this.configuration).listBusIODescriptions(e,t).then(r=>r(this.axios,this.basePath))}listModbusIOs(e,t){return Ke(this.configuration).listModbusIOs(e,t).then(r=>r(this.axios,this.basePath))}listProfinetIOs(e,t){return Ke(this.configuration).listProfinetIOs(e,t).then(r=>r(this.axios,this.basePath))}setBusIOValues(e,t,r){return Ke(this.configuration).setBusIOValues(e,t,r).then(n=>n(this.axios,this.basePath))}setProfinetIOsFromFile(e,t,r){return Ke(this.configuration).setProfinetIOsFromFile(e,t,r).then(n=>n(this.axios,this.basePath))}};const wT=function(e){return{deleteCell:async(t,r,n={})=>{C("deleteCell","cell",t);const o="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deployCell:async(t,r,n={})=>{C("deployCell","cell",t);const o=new URL("/cells",z);let s;e&&(s=e.baseOptions);const a={method:"POST",...s,...n},i={},l={};G(a,e),await H(i,e),r!==void 0&&(l.completion_timeout=r),i["Content-Type"]="application/json",q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...n.headers},a.data=ge(t,a,e),{url:W(o),options:a}},getCell:async(t,r={})=>{C("getCell","cell",t);const n="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getCellStatus:async(t,r={})=>{C("getCellStatus","cell",t);const n="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listCells:async(t={})=>{const r=new URL("/cells",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},setCellStatus:async(t,r,n={})=>{C("setCellStatus","cell",t),C("setCellStatus","operatingState",r);const o="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.operating_state=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},updateCell:async(t,r,n,o={})=>{C("updateCell","cell",t),C("updateCell","cell2",r);const s="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(r,l,e),{url:W(a),options:l}}}},gr=function(e){const t=wT(e);return{async deleteCell(r,n,o){var l,c;const s=await t.deleteCell(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["CellApi.deleteCell"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deployCell(r,n,o){var l,c;const s=await t.deployCell(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["CellApi.deployCell"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getCell(r,n){var i,l;const o=await t.getCell(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["CellApi.getCell"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getCellStatus(r,n){var i,l;const o=await t.getCellStatus(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["CellApi.getCellStatus"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listCells(r){var a,i;const n=await t.listCells(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["CellApi.listCells"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)},async setCellStatus(r,n,o){var l,c;const s=await t.setCellStatus(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["CellApi.setCellStatus"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async updateCell(r,n,o,s){var c,u;const a=await t.updateCell(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["CellApi.updateCell"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var OT=class extends ze{deleteCell(e,t,r){return gr(this.configuration).deleteCell(e,t,r).then(n=>n(this.axios,this.basePath))}deployCell(e,t,r){return gr(this.configuration).deployCell(e,t,r).then(n=>n(this.axios,this.basePath))}getCell(e,t){return gr(this.configuration).getCell(e,t).then(r=>r(this.axios,this.basePath))}getCellStatus(e,t){return gr(this.configuration).getCellStatus(e,t).then(r=>r(this.axios,this.basePath))}listCells(e){return gr(this.configuration).listCells(e).then(t=>t(this.axios,this.basePath))}setCellStatus(e,t,r){return gr(this.configuration).setCellStatus(e,t,r).then(n=>n(this.axios,this.basePath))}updateCell(e,t,r,n){return gr(this.configuration).updateCell(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const TT=function(e){return{addRobotController:async(t,r,n,o={})=>{C("addRobotController","cell",t),C("addRobotController","robotController",r);const s="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(r,l,e),{url:W(a),options:l}},clearRobotControllers:async(t,r,n={})=>{C("clearRobotControllers","cell",t);const o="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteRobotController:async(t,r,n,o={})=>{C("deleteRobotController","cell",t),C("deleteRobotController","controller",r);const s="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getControllerDescription:async(t,r,n={})=>{C("getControllerDescription","cell",t),C("getControllerDescription","controller",r);const o="/cells/{cell}/controllers/{controller}/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getCoordinateSystem:async(t,r,n,o,s={})=>{C("getCoordinateSystem","cell",t),C("getCoordinateSystem","controller",r),C("getCoordinateSystem","coordinateSystem",n);const a="/cells/{cell}/controllers/{controller}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.orientation_type=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},getCurrentRobotControllerState:async(t,r,n={})=>{C("getCurrentRobotControllerState","cell",t),C("getCurrentRobotControllerState","controller",r);const o="/cells/{cell}/controllers/{controller}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getRobotController:async(t,r,n={})=>{C("getRobotController","cell",t),C("getRobotController","controller",r);const o="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getVirtualControllerConfiguration:async(t,r,n={})=>{C("getVirtualControllerConfiguration","cell",t),C("getVirtualControllerConfiguration","controller",r);const o="/cells/{cell}/controllers/{controller}/virtual-robot-configuration".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listCoordinateSystems:async(t,r,n,o={})=>{C("listCoordinateSystems","cell",t),C("listCoordinateSystems","controller",r);const s="/cells/{cell}/controllers/{controller}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.orientation_type=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listRobotControllers:async(t,r={})=>{C("listRobotControllers","cell",t);const n="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},setDefaultMode:async(t,r,n,o={})=>{C("setDefaultMode","cell",t),C("setDefaultMode","controller",r),C("setDefaultMode","mode",n);const s="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.mode=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},streamFreeDrive:async(t,r,n,o={})=>{C("streamFreeDrive","cell",t),C("streamFreeDrive","controller",r);const s="/cells/{cell}/controllers/{controller}/free-drive-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.response_rate=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},streamRobotControllerState:async(t,r,n,o,s={})=>{C("streamRobotControllerState","cell",t),C("streamRobotControllerState","controller",r);const a="/cells/{cell}/controllers/{controller}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};G(c,e),await H(u,e),n!==void 0&&(d.response_rate=n),o!==void 0&&(d.add_controller_timeout=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},updateRobotController:async(t,r,n,o,s={})=>{C("updateRobotController","cell",t),C("updateRobotController","controller",r),C("updateRobotController","robotController",n);const a="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.completion_timeout=o),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ge(n,c,e),{url:W(i),options:c}}}},ot=function(e){const t=TT(e);return{async addRobotController(r,n,o,s){var c,u;const a=await t.addRobotController(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.addRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async clearRobotControllers(r,n,o){var l,c;const s=await t.clearRobotControllers(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.clearRobotControllers"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteRobotController(r,n,o,s){var c,u;const a=await t.deleteRobotController(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.deleteRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async getControllerDescription(r,n,o){var l,c;const s=await t.getControllerDescription(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.getControllerDescription"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getCoordinateSystem(r,n,o,s,a){var u,d;const i=await t.getCoordinateSystem(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["ControllerApi.getCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async getCurrentRobotControllerState(r,n,o){var l,c;const s=await t.getCurrentRobotControllerState(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.getCurrentRobotControllerState"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getRobotController(r,n,o){var l,c;const s=await t.getRobotController(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.getRobotController"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getVirtualControllerConfiguration(r,n,o){var l,c;const s=await t.getVirtualControllerConfiguration(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.getVirtualControllerConfiguration"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listCoordinateSystems(r,n,o,s){var c,u;const a=await t.listCoordinateSystems(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.listCoordinateSystems"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async listRobotControllers(r,n){var i,l;const o=await t.listRobotControllers(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["ControllerApi.listRobotControllers"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async setDefaultMode(r,n,o,s){var c,u;const a=await t.setDefaultMode(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.setDefaultMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async streamFreeDrive(r,n,o,s){var c,u;const a=await t.streamFreeDrive(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.streamFreeDrive"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async streamRobotControllerState(r,n,o,s,a){var u,d;const i=await t.streamRobotControllerState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["ControllerApi.streamRobotControllerState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async updateRobotController(r,n,o,s,a){var u,d;const i=await t.updateRobotController(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["ControllerApi.updateRobotController"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)}}};var ET=class extends ze{addRobotController(e,t,r,n){return ot(this.configuration).addRobotController(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearRobotControllers(e,t,r){return ot(this.configuration).clearRobotControllers(e,t,r).then(n=>n(this.axios,this.basePath))}deleteRobotController(e,t,r,n){return ot(this.configuration).deleteRobotController(e,t,r,n).then(o=>o(this.axios,this.basePath))}getControllerDescription(e,t,r){return ot(this.configuration).getControllerDescription(e,t,r).then(n=>n(this.axios,this.basePath))}getCoordinateSystem(e,t,r,n,o){return ot(this.configuration).getCoordinateSystem(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}getCurrentRobotControllerState(e,t,r){return ot(this.configuration).getCurrentRobotControllerState(e,t,r).then(n=>n(this.axios,this.basePath))}getRobotController(e,t,r){return ot(this.configuration).getRobotController(e,t,r).then(n=>n(this.axios,this.basePath))}getVirtualControllerConfiguration(e,t,r){return ot(this.configuration).getVirtualControllerConfiguration(e,t,r).then(n=>n(this.axios,this.basePath))}listCoordinateSystems(e,t,r,n){return ot(this.configuration).listCoordinateSystems(e,t,r,n).then(o=>o(this.axios,this.basePath))}listRobotControllers(e,t){return ot(this.configuration).listRobotControllers(e,t).then(r=>r(this.axios,this.basePath))}setDefaultMode(e,t,r,n){return ot(this.configuration).setDefaultMode(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamFreeDrive(e,t,r,n){return ot(this.configuration).streamFreeDrive(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamRobotControllerState(e,t,r,n,o){return ot(this.configuration).streamRobotControllerState(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}updateRobotController(e,t,r,n,o){return ot(this.configuration).updateRobotController(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const IT=function(e){return{listIODescriptions:async(t,r,n,o,s,a,i={})=>{C("listIODescriptions","cell",t),C("listIODescriptions","controller",r);const l="/cells/{cell}/controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),c=new URL(l,z);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};G(d,e),await H(h,e),n&&(p.ios=n),o!==void 0&&(p.direction=o),s!==void 0&&(p.value_type=s),a!==void 0&&(p.group=a),q(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:W(c),options:d}},listIOValues:async(t,r,n,o={})=>{C("listIOValues","cell",t),C("listIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n&&(u.ios=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setOutputValues:async(t,r,n,o={})=>{C("setOutputValues","cell",t),C("setOutputValues","controller",r),C("setOutputValues","iOValue",n);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},streamIOValues:async(t,r,n,o={})=>{C("streamIOValues","cell",t),C("streamIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n&&(u.ios=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},waitForIOEvent:async(t,r,n,o={})=>{C("waitForIOEvent","cell",t),C("waitForIOEvent","controller",r),C("waitForIOEvent","waitForIOEventRequest",n);const s="/cells/{cell}/controllers/{controller}/ios/wait-for".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},Pn=function(e){const t=IT(e);return{async listIODescriptions(r,n,o,s,a,i,l){var h,p;const c=await t.listIODescriptions(r,n,o,s,a,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=N["ControllerInputsOutputsApi.listIODescriptions"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>J(c,B,$,e)(f,d||m)},async listIOValues(r,n,o,s){var c,u;const a=await t.listIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerInputsOutputsApi.listIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async setOutputValues(r,n,o,s){var c,u;const a=await t.setOutputValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerInputsOutputsApi.setOutputValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async streamIOValues(r,n,o,s){var c,u;const a=await t.streamIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerInputsOutputsApi.streamIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async waitForIOEvent(r,n,o,s){var c,u;const a=await t.waitForIOEvent(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerInputsOutputsApi.waitForIOEvent"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var AT=class extends ze{listIODescriptions(e,t,r,n,o,s,a){return Pn(this.configuration).listIODescriptions(e,t,r,n,o,s,a).then(i=>i(this.axios,this.basePath))}listIOValues(e,t,r,n){return Pn(this.configuration).listIOValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}setOutputValues(e,t,r,n){return Pn(this.configuration).setOutputValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamIOValues(e,t,r,n){return Pn(this.configuration).streamIOValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}waitForIOEvent(e,t,r,n){return Pn(this.configuration).waitForIOEvent(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const RT=function(e){return{executeJogging:async(t,r,n,o={})=>{C("executeJogging","cell",t),C("executeJogging","controller",r),C("executeJogging","executeJoggingRequest",n);const s="/cells/{cell}/controllers/{controller}/execution/jogging".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},PT=function(e){const t=RT(e);return{async executeJogging(r,n,o,s){var c,u;const a=await t.executeJogging(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["JoggingApi.executeJogging"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var MT=class extends ze{executeJogging(e,t,r,n){return PT(this.configuration).executeJogging(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const _T=function(e){return{forwardKinematics:async(t,r,n={})=>{C("forwardKinematics","cell",t),C("forwardKinematics","forwardKinematicsRequest",r);const o="/cells/{cell}/kinematic/forward".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}},inverseKinematics:async(t,r,n={})=>{C("inverseKinematics","cell",t),C("inverseKinematics","inverseKinematicsRequest",r);const o="/cells/{cell}/kinematic/inverse".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}}}},rd=function(e){const t=_T(e);return{async forwardKinematics(r,n,o){var l,c;const s=await t.forwardKinematics(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["KinematicsApi.forwardKinematics"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async inverseKinematics(r,n,o){var l,c;const s=await t.inverseKinematics(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["KinematicsApi.inverseKinematics"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)}}};var VT=class extends ze{forwardKinematics(e,t,r){return rd(this.configuration).forwardKinematics(e,t,r).then(n=>n(this.axios,this.basePath))}inverseKinematics(e,t,r){return rd(this.configuration).inverseKinematics(e,t,r).then(n=>n(this.axios,this.basePath))}};const kT=function(e){return{getCurrentMotionGroupState:async(t,r,n,o,s={})=>{C("getCurrentMotionGroupState","cell",t),C("getCurrentMotionGroupState","controller",r),C("getCurrentMotionGroupState","motionGroup",n);const a="/cells/{cell}/controllers/{controller}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.response_coordinate_system=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},getMotionGroupDescription:async(t,r,n,o={})=>{C("getMotionGroupDescription","cell",t),C("getMotionGroupDescription","controller",r),C("getMotionGroupDescription","motionGroup",n);const s="/cells/{cell}/controllers/{controller}/motion-groups/{motion-group}/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},streamMotionGroupState:async(t,r,n,o,s,a={})=>{C("streamMotionGroupState","cell",t),C("streamMotionGroupState","controller",r),C("streamMotionGroupState","motionGroup",n);const i="/cells/{cell}/controllers/{controller}/motion-groups/{motion-group}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),l=new URL(i,z);let c;e&&(c=e.baseOptions);const u={method:"GET",...c,...a},d={},h={};G(u,e),await H(d,e),o!==void 0&&(h.response_rate=o),s!==void 0&&(h.response_coordinate_system=s),q(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...a.headers},{url:W(l),options:u}}}},Xa=function(e){const t=kT(e);return{async getCurrentMotionGroupState(r,n,o,s,a){var u,d;const i=await t.getCurrentMotionGroupState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["MotionGroupApi.getCurrentMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async getMotionGroupDescription(r,n,o,s){var c,u;const a=await t.getMotionGroupDescription(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["MotionGroupApi.getMotionGroupDescription"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async streamMotionGroupState(r,n,o,s,a,i){var d,h;const l=await t.streamMotionGroupState(r,n,o,s,a,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=N["MotionGroupApi.streamMotionGroupState"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>J(l,B,$,e)(p,u||f)}}};var jT=class extends ze{getCurrentMotionGroupState(e,t,r,n,o){return Xa(this.configuration).getCurrentMotionGroupState(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}getMotionGroupDescription(e,t,r,n){return Xa(this.configuration).getMotionGroupDescription(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamMotionGroupState(e,t,r,n,o,s){return Xa(this.configuration).streamMotionGroupState(e,t,r,n,o,s).then(a=>a(this.axios,this.basePath))}};const DT=function(e){return{getMotionGroupCollisionModel:async(t,r={})=>{C("getMotionGroupCollisionModel","motionGroupModel",t);const n="/motion-group-models/{motion-group-model}/collision".replace("{motion-group-model}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getMotionGroupModels:async(t={})=>{const r=new URL("/motion-group-models",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}}}},nd=function(e){const t=DT(e);return{async getMotionGroupCollisionModel(r,n){var i,l;const o=await t.getMotionGroupCollisionModel(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["MotionGroupModelsApi.getMotionGroupCollisionModel"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getMotionGroupModels(r){var a,i;const n=await t.getMotionGroupModels(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["MotionGroupModelsApi.getMotionGroupModels"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)}}};var BT=class extends ze{getMotionGroupCollisionModel(e,t){return nd(this.configuration).getMotionGroupCollisionModel(e,t).then(r=>r(this.axios,this.basePath))}getMotionGroupModels(e){return nd(this.configuration).getMotionGroupModels(e).then(t=>t(this.axios,this.basePath))}};const UT=function(e){return{deleteStoredCollider:async(t,r,n={})=>{C("deleteStoredCollider","cell",t),C("deleteStoredCollider","collider",r);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteStoredCollisionLinkChain:async(t,r,n={})=>{C("deleteStoredCollisionLinkChain","cell",t),C("deleteStoredCollisionLinkChain","linkChain",r);const o="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteStoredCollisionTool:async(t,r,n={})=>{C("deleteStoredCollisionTool","cell",t),C("deleteStoredCollisionTool","tool",r);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollider:async(t,r,n={})=>{C("getStoredCollider","cell",t),C("getStoredCollider","collider",r);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollisionLinkChain:async(t,r,n={})=>{C("getStoredCollisionLinkChain","cell",t),C("getStoredCollisionLinkChain","linkChain",r);const o="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollisionTool:async(t,r,n={})=>{C("getStoredCollisionTool","cell",t),C("getStoredCollisionTool","tool",r);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listCollisionLinkChains:async(t,r={})=>{C("listCollisionLinkChains","cell",t);const n="/cells/{cell}/store/collision/link-chains".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listCollisionLinkChainsKeys:async(t,r={})=>{C("listCollisionLinkChainsKeys","cell",t);const n="/cells/{cell}/store/collision/link-chains-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredColliders:async(t,r={})=>{C("listStoredColliders","cell",t);const n="/cells/{cell}/store/collision/colliders".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollidersKeys:async(t,r={})=>{C("listStoredCollidersKeys","cell",t);const n="/cells/{cell}/store/collision/colliders-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollisionTools:async(t,r={})=>{C("listStoredCollisionTools","cell",t);const n="/cells/{cell}/store/collision/tools".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollisionToolsKeys:async(t,r={})=>{C("listStoredCollisionToolsKeys","cell",t);const n="/cells/{cell}/store/collision/tools-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},storeCollider:async(t,r,n,o={})=>{C("storeCollider","cell",t),C("storeCollider","collider",r),C("storeCollider","collider2",n);const s="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},storeCollisionLinkChain:async(t,r,n,o={})=>{C("storeCollisionLinkChain","cell",t),C("storeCollisionLinkChain","linkChain",r),C("storeCollisionLinkChain","collider",n);const s="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},storeCollisionTool:async(t,r,n,o={})=>{C("storeCollisionTool","cell",t),C("storeCollisionTool","tool",r),C("storeCollisionTool","requestBody",n);const s="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},Ze=function(e){const t=UT(e);return{async deleteStoredCollider(r,n,o){var l,c;const s=await t.deleteStoredCollider(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.deleteStoredCollider"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteStoredCollisionLinkChain(r,n,o){var l,c;const s=await t.deleteStoredCollisionLinkChain(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.deleteStoredCollisionLinkChain"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteStoredCollisionTool(r,n,o){var l,c;const s=await t.deleteStoredCollisionTool(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.deleteStoredCollisionTool"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getStoredCollider(r,n,o){var l,c;const s=await t.getStoredCollider(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.getStoredCollider"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getStoredCollisionLinkChain(r,n,o){var l,c;const s=await t.getStoredCollisionLinkChain(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.getStoredCollisionLinkChain"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getStoredCollisionTool(r,n,o){var l,c;const s=await t.getStoredCollisionTool(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.getStoredCollisionTool"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listCollisionLinkChains(r,n){var i,l;const o=await t.listCollisionLinkChains(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listCollisionLinkChains"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listCollisionLinkChainsKeys(r,n){var i,l;const o=await t.listCollisionLinkChainsKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listCollisionLinkChainsKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listStoredColliders(r,n){var i,l;const o=await t.listStoredColliders(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listStoredColliders"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listStoredCollidersKeys(r,n){var i,l;const o=await t.listStoredCollidersKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listStoredCollidersKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listStoredCollisionTools(r,n){var i,l;const o=await t.listStoredCollisionTools(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listStoredCollisionTools"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listStoredCollisionToolsKeys(r,n){var i,l;const o=await t.listStoredCollisionToolsKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listStoredCollisionToolsKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async storeCollider(r,n,o,s){var c,u;const a=await t.storeCollider(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["StoreCollisionComponentsApi.storeCollider"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async storeCollisionLinkChain(r,n,o,s){var c,u;const a=await t.storeCollisionLinkChain(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["StoreCollisionComponentsApi.storeCollisionLinkChain"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async storeCollisionTool(r,n,o,s){var c,u;const a=await t.storeCollisionTool(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["StoreCollisionComponentsApi.storeCollisionTool"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var LT=class extends ze{deleteStoredCollider(e,t,r){return Ze(this.configuration).deleteStoredCollider(e,t,r).then(n=>n(this.axios,this.basePath))}deleteStoredCollisionLinkChain(e,t,r){return Ze(this.configuration).deleteStoredCollisionLinkChain(e,t,r).then(n=>n(this.axios,this.basePath))}deleteStoredCollisionTool(e,t,r){return Ze(this.configuration).deleteStoredCollisionTool(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollider(e,t,r){return Ze(this.configuration).getStoredCollider(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollisionLinkChain(e,t,r){return Ze(this.configuration).getStoredCollisionLinkChain(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollisionTool(e,t,r){return Ze(this.configuration).getStoredCollisionTool(e,t,r).then(n=>n(this.axios,this.basePath))}listCollisionLinkChains(e,t){return Ze(this.configuration).listCollisionLinkChains(e,t).then(r=>r(this.axios,this.basePath))}listCollisionLinkChainsKeys(e,t){return Ze(this.configuration).listCollisionLinkChainsKeys(e,t).then(r=>r(this.axios,this.basePath))}listStoredColliders(e,t){return Ze(this.configuration).listStoredColliders(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollidersKeys(e,t){return Ze(this.configuration).listStoredCollidersKeys(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollisionTools(e,t){return Ze(this.configuration).listStoredCollisionTools(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollisionToolsKeys(e,t){return Ze(this.configuration).listStoredCollisionToolsKeys(e,t).then(r=>r(this.axios,this.basePath))}storeCollider(e,t,r,n){return Ze(this.configuration).storeCollider(e,t,r,n).then(o=>o(this.axios,this.basePath))}storeCollisionLinkChain(e,t,r,n){return Ze(this.configuration).storeCollisionLinkChain(e,t,r,n).then(o=>o(this.axios,this.basePath))}storeCollisionTool(e,t,r,n){return Ze(this.configuration).storeCollisionTool(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const FT=function(e){return{deleteStoredCollisionSetup:async(t,r,n={})=>{C("deleteStoredCollisionSetup","cell",t),C("deleteStoredCollisionSetup","setup",r);const o="/cells/{cell}/store/collision/setups/{setup}".replace("{cell}",encodeURIComponent(String(t))).replace("{setup}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollisionSetup:async(t,r,n={})=>{C("getStoredCollisionSetup","cell",t),C("getStoredCollisionSetup","setup",r);const o="/cells/{cell}/store/collision/setups/{setup}".replace("{cell}",encodeURIComponent(String(t))).replace("{setup}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listStoredCollisionSetups:async(t,r={})=>{C("listStoredCollisionSetups","cell",t);const n="/cells/{cell}/store/collision/setups".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollisionSetupsKeys:async(t,r={})=>{C("listStoredCollisionSetupsKeys","cell",t);const n="/cells/{cell}/store/collision/setups-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},storeCollisionSetup:async(t,r,n,o={})=>{C("storeCollisionSetup","cell",t),C("storeCollisionSetup","setup",r),C("storeCollisionSetup","collisionSetup",n);const s="/cells/{cell}/store/collision/setups/{setup}".replace("{cell}",encodeURIComponent(String(t))).replace("{setup}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},Mn=function(e){const t=FT(e);return{async deleteStoredCollisionSetup(r,n,o){var l,c;const s=await t.deleteStoredCollisionSetup(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionSetupsApi.deleteStoredCollisionSetup"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getStoredCollisionSetup(r,n,o){var l,c;const s=await t.getStoredCollisionSetup(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionSetupsApi.getStoredCollisionSetup"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listStoredCollisionSetups(r,n){var i,l;const o=await t.listStoredCollisionSetups(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionSetupsApi.listStoredCollisionSetups"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listStoredCollisionSetupsKeys(r,n){var i,l;const o=await t.listStoredCollisionSetupsKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionSetupsApi.listStoredCollisionSetupsKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async storeCollisionSetup(r,n,o,s){var c,u;const a=await t.storeCollisionSetup(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["StoreCollisionSetupsApi.storeCollisionSetup"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var $T=class extends ze{deleteStoredCollisionSetup(e,t,r){return Mn(this.configuration).deleteStoredCollisionSetup(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollisionSetup(e,t,r){return Mn(this.configuration).getStoredCollisionSetup(e,t,r).then(n=>n(this.axios,this.basePath))}listStoredCollisionSetups(e,t){return Mn(this.configuration).listStoredCollisionSetups(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollisionSetupsKeys(e,t){return Mn(this.configuration).listStoredCollisionSetupsKeys(e,t).then(r=>r(this.axios,this.basePath))}storeCollisionSetup(e,t,r,n){return Mn(this.configuration).storeCollisionSetup(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const NT=function(e){return{clearAllObjects:async(t,r={})=>{C("clearAllObjects","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"DELETE",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},deleteObject:async(t,r,n={})=>{C("deleteObject","cell",t),C("deleteObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getObject:async(t,r,n={})=>{C("getObject","cell",t),C("getObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getObjectMetadata:async(t,r,n={})=>{C("getObjectMetadata","cell",t),C("getObjectMetadata","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"HEAD",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listAllObjectKeys:async(t,r={})=>{C("listAllObjectKeys","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},storeObject:async(t,r,n,o,s={})=>{C("storeObject","cell",t),C("storeObject","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={},h=new(e&&e.formDataCtor||FormData);G(c,e),await H(u,e),o!==void 0&&h.append("any_value",new Blob([JSON.stringify(o)],{type:"application/json"})),u["Content-Type"]="multipart/form-data",n!=null&&(u["X-Metadata"]=typeof n=="string"?n:JSON.stringify(n)),q(i,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...s.headers},c.data=h,{url:W(i),options:c}}}},Jr=function(e){const t=NT(e);return{async clearAllObjects(r,n){var i,l;const o=await t.clearAllObjects(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreObjectApi.clearAllObjects"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async deleteObject(r,n,o){var l,c;const s=await t.deleteObject(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreObjectApi.deleteObject"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getObject(r,n,o){var l,c;const s=await t.getObject(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreObjectApi.getObject"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getObjectMetadata(r,n,o){var l,c;const s=await t.getObjectMetadata(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreObjectApi.getObjectMetadata"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listAllObjectKeys(r,n){var i,l;const o=await t.listAllObjectKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreObjectApi.listAllObjectKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async storeObject(r,n,o,s,a){var u,d;const i=await t.storeObject(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["StoreObjectApi.storeObject"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)}}};var zT=class extends ze{clearAllObjects(e,t){return Jr(this.configuration).clearAllObjects(e,t).then(r=>r(this.axios,this.basePath))}deleteObject(e,t,r){return Jr(this.configuration).deleteObject(e,t,r).then(n=>n(this.axios,this.basePath))}getObject(e,t,r){return Jr(this.configuration).getObject(e,t,r).then(n=>n(this.axios,this.basePath))}getObjectMetadata(e,t,r){return Jr(this.configuration).getObjectMetadata(e,t,r).then(n=>n(this.axios,this.basePath))}listAllObjectKeys(e,t){return Jr(this.configuration).listAllObjectKeys(e,t).then(r=>r(this.axios,this.basePath))}storeObject(e,t,r,n,o){return Jr(this.configuration).storeObject(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const GT=function(e){return{backupConfiguration:async(t,r,n={})=>{const o=new URL("/system/configuration",z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...n},i={},l={};G(a,e),await H(i,e),t&&(l.resources=t.join(ed.csv)),r!==void 0&&(l.metadata=r),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...n.headers},{url:W(o),options:a}},checkNovaVersionUpdate:async(t,r={})=>{C("checkNovaVersionUpdate","channel",t);const n=new URL("/system/update",z);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},a={},i={};G(s,e),await H(a,e),t!==void 0&&(i.channel=t),q(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...r.headers},{url:W(n),options:s}},getConfigurationBackupStatus:async(t,r={})=>{C("getConfigurationBackupStatus","operationId",t);const n=new URL("/system/configuration/status",z);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},a={},i={};G(s,e),await H(a,e),t!==void 0&&(i.operation_id=t),q(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...r.headers},{url:W(n),options:s}},getDiagnosePackage:async(t={})=>{const r=new URL("/system/diagnosis-package/zip",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},getSystemStatus:async(t={})=>{const r=new URL("/system/status",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},getSystemVersion:async(t={})=>{const r=new URL("/system/version",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},listConfigurationResources:async(t={})=>{const r=new URL("/system/configuration/resources",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},restoreConfiguration:async(t,r,n={})=>{C("restoreConfiguration","resources",t),C("restoreConfiguration","body",r);const o=new URL("/system/configuration",z);let s;e&&(s=e.baseOptions);const a={method:"POST",...s,...n},i={},l={};G(a,e),await H(i,e),t&&(l.resources=t.join(ed.csv)),i["Content-Type"]="application/gzip",q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...n.headers},a.data=ge(r,a,e),{url:W(o),options:a}},updateNovaVersion:async(t,r={})=>{C("updateNovaVersion","updateNovaVersionRequest",t);const n=new URL("/system/update",z);let o;e&&(o=e.baseOptions);const s={method:"PUT",...o,...r},a={},i={};G(s,e),await H(a,e),a["Content-Type"]="application/json",q(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...r.headers},s.data=ge(t,s,e),{url:W(n),options:s}}}},Nt=function(e){const t=GT(e);return{async backupConfiguration(r,n,o){var l,c;const s=await t.backupConfiguration(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["SystemApi.backupConfiguration"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async checkNovaVersionUpdate(r,n){var i,l;const o=await t.checkNovaVersionUpdate(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["SystemApi.checkNovaVersionUpdate"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getConfigurationBackupStatus(r,n){var i,l;const o=await t.getConfigurationBackupStatus(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["SystemApi.getConfigurationBackupStatus"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getDiagnosePackage(r){var a,i;const n=await t.getDiagnosePackage(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["SystemApi.getDiagnosePackage"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)},async getSystemStatus(r){var a,i;const n=await t.getSystemStatus(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["SystemApi.getSystemStatus"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)},async getSystemVersion(r){var a,i;const n=await t.getSystemVersion(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["SystemApi.getSystemVersion"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)},async listConfigurationResources(r){var a,i;const n=await t.listConfigurationResources(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["SystemApi.listConfigurationResources"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)},async restoreConfiguration(r,n,o){var l,c;const s=await t.restoreConfiguration(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["SystemApi.restoreConfiguration"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async updateNovaVersion(r,n){var i,l;const o=await t.updateNovaVersion(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["SystemApi.updateNovaVersion"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)}}};var HT=class extends ze{backupConfiguration(e,t,r){return Nt(this.configuration).backupConfiguration(e,t,r).then(n=>n(this.axios,this.basePath))}checkNovaVersionUpdate(e,t){return Nt(this.configuration).checkNovaVersionUpdate(e,t).then(r=>r(this.axios,this.basePath))}getConfigurationBackupStatus(e,t){return Nt(this.configuration).getConfigurationBackupStatus(e,t).then(r=>r(this.axios,this.basePath))}getDiagnosePackage(e){return Nt(this.configuration).getDiagnosePackage(e).then(t=>t(this.axios,this.basePath))}getSystemStatus(e){return Nt(this.configuration).getSystemStatus(e).then(t=>t(this.axios,this.basePath))}getSystemVersion(e){return Nt(this.configuration).getSystemVersion(e).then(t=>t(this.axios,this.basePath))}listConfigurationResources(e){return Nt(this.configuration).listConfigurationResources(e).then(t=>t(this.axios,this.basePath))}restoreConfiguration(e,t,r){return Nt(this.configuration).restoreConfiguration(e,t,r).then(n=>n(this.axios,this.basePath))}updateNovaVersion(e,t){return Nt(this.configuration).updateNovaVersion(e,t).then(r=>r(this.axios,this.basePath))}};const qT=function(e){return{addTrajectory:async(t,r,n,o={})=>{C("addTrajectory","cell",t),C("addTrajectory","controller",r),C("addTrajectory","addTrajectoryRequest",n);const s="/cells/{cell}/controllers/{controller}/trajectories".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},clearTrajectories:async(t,r,n={})=>{C("clearTrajectories","cell",t),C("clearTrajectories","controller",r);const o="/cells/{cell}/controllers/{controller}/trajectories".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteTrajectory:async(t,r,n,o={})=>{C("deleteTrajectory","cell",t),C("deleteTrajectory","controller",r),C("deleteTrajectory","trajectory",n);const s="/cells/{cell}/controllers/{controller}/trajectories/{trajectory}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{trajectory}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getTrajectory:async(t,r,n,o={})=>{C("getTrajectory","cell",t),C("getTrajectory","controller",r),C("getTrajectory","trajectory",n);const s="/cells/{cell}/controllers/{controller}/trajectories/{trajectory}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{trajectory}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listTrajectories:async(t,r,n={})=>{C("listTrajectories","cell",t),C("listTrajectories","controller",r);const o="/cells/{cell}/controllers/{controller}/trajectories".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}}}},_n=function(e){const t=qT(e);return{async addTrajectory(r,n,o,s){var c,u;const a=await t.addTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["TrajectoryCachingApi.addTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async clearTrajectories(r,n,o){var l,c;const s=await t.clearTrajectories(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["TrajectoryCachingApi.clearTrajectories"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteTrajectory(r,n,o,s){var c,u;const a=await t.deleteTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["TrajectoryCachingApi.deleteTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async getTrajectory(r,n,o,s){var c,u;const a=await t.getTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["TrajectoryCachingApi.getTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async listTrajectories(r,n,o){var l,c;const s=await t.listTrajectories(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["TrajectoryCachingApi.listTrajectories"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)}}};var WT=class extends ze{addTrajectory(e,t,r,n){return _n(this.configuration).addTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearTrajectories(e,t,r){return _n(this.configuration).clearTrajectories(e,t,r).then(n=>n(this.axios,this.basePath))}deleteTrajectory(e,t,r,n){return _n(this.configuration).deleteTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}getTrajectory(e,t,r,n){return _n(this.configuration).getTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}listTrajectories(e,t,r){return _n(this.configuration).listTrajectories(e,t,r).then(n=>n(this.axios,this.basePath))}};const JT=function(e){return{executeTrajectory:async(t,r,n,o={})=>{C("executeTrajectory","cell",t),C("executeTrajectory","controller",r),C("executeTrajectory","executeTrajectoryRequest",n);const s="/cells/{cell}/controllers/{controller}/execution/trajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},YT=function(e){const t=JT(e);return{async executeTrajectory(r,n,o,s){var c,u;const a=await t.executeTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["TrajectoryExecutionApi.executeTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var KT=class extends ze{executeTrajectory(e,t,r,n){return YT(this.configuration).executeTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const QT=function(e){return{planCollisionFree:async(t,r,n={})=>{C("planCollisionFree","cell",t),C("planCollisionFree","planCollisionFreeRequest",r);const o="/cells/{cell}/trajectory-planning/plan-collision-free".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}},planTrajectory:async(t,r,n={})=>{C("planTrajectory","cell",t),C("planTrajectory","planTrajectoryRequest",r);const o="/cells/{cell}/trajectory-planning/plan-trajectory".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}}}},od=function(e){const t=QT(e);return{async planCollisionFree(r,n,o){var l,c;const s=await t.planCollisionFree(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["TrajectoryPlanningApi.planCollisionFree"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async planTrajectory(r,n,o){var l,c;const s=await t.planTrajectory(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["TrajectoryPlanningApi.planTrajectory"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)}}};var XT=class extends ze{planCollisionFree(e,t,r){return od(this.configuration).planCollisionFree(e,t,r).then(n=>n(this.axios,this.basePath))}planTrajectory(e,t,r){return od(this.configuration).planTrajectory(e,t,r).then(n=>n(this.axios,this.basePath))}};const ZT=function(e){return{addVirtualControllerCoordinateSystem:async(t,r,n,o,s={})=>{C("addVirtualControllerCoordinateSystem","cell",t),C("addVirtualControllerCoordinateSystem","controller",r),C("addVirtualControllerCoordinateSystem","coordinateSystem",n),C("addVirtualControllerCoordinateSystem","coordinateSystemData",o);const a="/cells/{cell}/virtual-controllers/{controller}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ge(o,c,e),{url:W(i),options:c}},addVirtualControllerTcp:async(t,r,n,o,s,a={})=>{C("addVirtualControllerTcp","cell",t),C("addVirtualControllerTcp","controller",r),C("addVirtualControllerTcp","motionGroup",n),C("addVirtualControllerTcp","tcp",o),C("addVirtualControllerTcp","robotTcpData",s);const i="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/tcps/{tcp}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))).replace("{tcp}",encodeURIComponent(String(o))),l=new URL(i,z);let c;e&&(c=e.baseOptions);const u={method:"PUT",...c,...a},d={},h={};G(u,e),await H(d,e),d["Content-Type"]="application/json",q(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...a.headers},u.data=ge(s,u,e),{url:W(l),options:u}},deleteVirtualControllerCoordinateSystem:async(t,r,n,o,s={})=>{C("deleteVirtualControllerCoordinateSystem","cell",t),C("deleteVirtualControllerCoordinateSystem","controller",r),C("deleteVirtualControllerCoordinateSystem","coordinateSystem",n);const a="/cells/{cell}/virtual-controllers/{controller}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.delete_dependent=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},deleteVirtualControllerTcp:async(t,r,n,o,s={})=>{C("deleteVirtualControllerTcp","cell",t),C("deleteVirtualControllerTcp","controller",r),C("deleteVirtualControllerTcp","motionGroup",n),C("deleteVirtualControllerTcp","tcp",o);const a="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/tcps/{tcp}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))).replace("{tcp}",encodeURIComponent(String(o))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},u={},d={};G(c,e),await H(u,e),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},getEmergencyStop:async(t,r,n={})=>{C("getEmergencyStop","cell",t),C("getEmergencyStop","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/emergency-stop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getMotionGroupState:async(t,r,n,o={})=>{C("getMotionGroupState","cell",t),C("getMotionGroupState","controller",r),C("getMotionGroupState","motionGroup",n);const s="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getMotionGroups:async(t,r,n={})=>{C("getMotionGroups","cell",t),C("getMotionGroups","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/motion-groups".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getOperationMode:async(t,r,n={})=>{C("getOperationMode","cell",t),C("getOperationMode","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getVirtualControllerMounting:async(t,r,n,o={})=>{C("getVirtualControllerMounting","cell",t),C("getVirtualControllerMounting","controller",r),C("getVirtualControllerMounting","motionGroup",n);const s="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listVirtualControllerCoordinateSystems:async(t,r,n={})=>{C("listVirtualControllerCoordinateSystems","cell",t),C("listVirtualControllerCoordinateSystems","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listVirtualControllerTcps:async(t,r,n,o={})=>{C("listVirtualControllerTcps","cell",t),C("listVirtualControllerTcps","controller",r),C("listVirtualControllerTcps","motionGroup",n);const s="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setEmergencyStop:async(t,r,n,o={})=>{C("setEmergencyStop","cell",t),C("setEmergencyStop","controller",r);const s="/cells/{cell}/virtual-controllers/{controller}/emergency-stop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.active=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setMotionGroupState:async(t,r,n,o,s={})=>{C("setMotionGroupState","cell",t),C("setMotionGroupState","controller",r),C("setMotionGroupState","motionGroup",n),C("setMotionGroupState","motionGroupJoints",o);const a="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ge(o,c,e),{url:W(i),options:c}},setOperationMode:async(t,r,n,o={})=>{C("setOperationMode","cell",t),C("setOperationMode","controller",r),C("setOperationMode","mode",n);const s="/cells/{cell}/virtual-controllers/{controller}/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.mode=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setVirtualControllerMounting:async(t,r,n,o,s={})=>{C("setVirtualControllerMounting","cell",t),C("setVirtualControllerMounting","controller",r),C("setVirtualControllerMounting","motionGroup",n),C("setVirtualControllerMounting","coordinateSystem",o);const a="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ge(o,c,e),{url:W(i),options:c}}}},et=function(e){const t=ZT(e);return{async addVirtualControllerCoordinateSystem(r,n,o,s,a){var u,d;const i=await t.addVirtualControllerCoordinateSystem(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.addVirtualControllerCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async addVirtualControllerTcp(r,n,o,s,a,i){var d,h;const l=await t.addVirtualControllerTcp(r,n,o,s,a,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=N["VirtualControllerApi.addVirtualControllerTcp"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>J(l,B,$,e)(p,u||f)},async deleteVirtualControllerCoordinateSystem(r,n,o,s,a){var u,d;const i=await t.deleteVirtualControllerCoordinateSystem(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.deleteVirtualControllerCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async deleteVirtualControllerTcp(r,n,o,s,a){var u,d;const i=await t.deleteVirtualControllerTcp(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.deleteVirtualControllerTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async getEmergencyStop(r,n,o){var l,c;const s=await t.getEmergencyStop(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerApi.getEmergencyStop"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getMotionGroupState(r,n,o,s){var c,u;const a=await t.getMotionGroupState(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.getMotionGroupState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async getMotionGroups(r,n,o){var l,c;const s=await t.getMotionGroups(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerApi.getMotionGroups"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getOperationMode(r,n,o){var l,c;const s=await t.getOperationMode(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerApi.getOperationMode"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getVirtualControllerMounting(r,n,o,s){var c,u;const a=await t.getVirtualControllerMounting(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.getVirtualControllerMounting"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async listVirtualControllerCoordinateSystems(r,n,o){var l,c;const s=await t.listVirtualControllerCoordinateSystems(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerApi.listVirtualControllerCoordinateSystems"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listVirtualControllerTcps(r,n,o,s){var c,u;const a=await t.listVirtualControllerTcps(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.listVirtualControllerTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async setEmergencyStop(r,n,o,s){var c,u;const a=await t.setEmergencyStop(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.setEmergencyStop"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async setMotionGroupState(r,n,o,s,a){var u,d;const i=await t.setMotionGroupState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.setMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async setOperationMode(r,n,o,s){var c,u;const a=await t.setOperationMode(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.setOperationMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async setVirtualControllerMounting(r,n,o,s,a){var u,d;const i=await t.setVirtualControllerMounting(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.setVirtualControllerMounting"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)}}};var eE=class extends ze{addVirtualControllerCoordinateSystem(e,t,r,n,o){return et(this.configuration).addVirtualControllerCoordinateSystem(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}addVirtualControllerTcp(e,t,r,n,o,s){return et(this.configuration).addVirtualControllerTcp(e,t,r,n,o,s).then(a=>a(this.axios,this.basePath))}deleteVirtualControllerCoordinateSystem(e,t,r,n,o){return et(this.configuration).deleteVirtualControllerCoordinateSystem(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}deleteVirtualControllerTcp(e,t,r,n,o){return et(this.configuration).deleteVirtualControllerTcp(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}getEmergencyStop(e,t,r){return et(this.configuration).getEmergencyStop(e,t,r).then(n=>n(this.axios,this.basePath))}getMotionGroupState(e,t,r,n){return et(this.configuration).getMotionGroupState(e,t,r,n).then(o=>o(this.axios,this.basePath))}getMotionGroups(e,t,r){return et(this.configuration).getMotionGroups(e,t,r).then(n=>n(this.axios,this.basePath))}getOperationMode(e,t,r){return et(this.configuration).getOperationMode(e,t,r).then(n=>n(this.axios,this.basePath))}getVirtualControllerMounting(e,t,r,n){return et(this.configuration).getVirtualControllerMounting(e,t,r,n).then(o=>o(this.axios,this.basePath))}listVirtualControllerCoordinateSystems(e,t,r){return et(this.configuration).listVirtualControllerCoordinateSystems(e,t,r).then(n=>n(this.axios,this.basePath))}listVirtualControllerTcps(e,t,r,n){return et(this.configuration).listVirtualControllerTcps(e,t,r,n).then(o=>o(this.axios,this.basePath))}setEmergencyStop(e,t,r,n){return et(this.configuration).setEmergencyStop(e,t,r,n).then(o=>o(this.axios,this.basePath))}setMotionGroupState(e,t,r,n,o){return et(this.configuration).setMotionGroupState(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}setOperationMode(e,t,r,n){return et(this.configuration).setOperationMode(e,t,r,n).then(o=>o(this.axios,this.basePath))}setVirtualControllerMounting(e,t,r,n,o){return et(this.configuration).setVirtualControllerMounting(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const tE=function(e){return{externalJointsStream:async(t,r,n,o={})=>{C("externalJointsStream","cell",t),C("externalJointsStream","controller",r),C("externalJointsStream","externalJointStreamRequest",n);const s="/cells/{cell}/virtual-controllers/{controller}/external-joints-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},getCycleTime:async(t,r,n={})=>{C("getCycleTime","cell",t),C("getCycleTime","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/cycle-time".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getVirtualControllerBehavior:async(t,r,n={})=>{C("getVirtualControllerBehavior","cell",t),C("getVirtualControllerBehavior","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},setVirtualControllerBehavior:async(t,r,n,o={})=>{C("setVirtualControllerBehavior","cell",t),C("setVirtualControllerBehavior","controller",r);const s="/cells/{cell}/virtual-controllers/{controller}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.behavior=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}}}},jo=function(e){const t=tE(e);return{async externalJointsStream(r,n,o,s){var c,u;const a=await t.externalJointsStream(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerBehaviorApi.externalJointsStream"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async getCycleTime(r,n,o){var l,c;const s=await t.getCycleTime(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerBehaviorApi.getCycleTime"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getVirtualControllerBehavior(r,n,o){var l,c;const s=await t.getVirtualControllerBehavior(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerBehaviorApi.getVirtualControllerBehavior"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async setVirtualControllerBehavior(r,n,o,s){var c,u;const a=await t.setVirtualControllerBehavior(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerBehaviorApi.setVirtualControllerBehavior"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var rE=class extends ze{externalJointsStream(e,t,r,n){return jo(this.configuration).externalJointsStream(e,t,r,n).then(o=>o(this.axios,this.basePath))}getCycleTime(e,t,r){return jo(this.configuration).getCycleTime(e,t,r).then(n=>n(this.axios,this.basePath))}getVirtualControllerBehavior(e,t,r){return jo(this.configuration).getVirtualControllerBehavior(e,t,r).then(n=>n(this.axios,this.basePath))}setVirtualControllerBehavior(e,t,r,n){return jo(this.configuration).setVirtualControllerBehavior(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const nE=function(e){return{listIOs:async(t,r,n,o={})=>{C("listIOs","cell",t),C("listIOs","controller",r),C("listIOs","ios",n);const s="/cells/{cell}/virtual-controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n&&(u.ios=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listVirtualControllerIODescriptions:async(t,r,n,o,s,a,i={})=>{C("listVirtualControllerIODescriptions","cell",t),C("listVirtualControllerIODescriptions","controller",r);const l="/cells/{cell}/virtual-controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),c=new URL(l,z);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};G(d,e),await H(h,e),n&&(p.ios=n),o!==void 0&&(p.direction=o),s!==void 0&&(p.value_type=s),a!==void 0&&(p.group=a),q(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:W(c),options:d}},setIOValues:async(t,r,n,o={})=>{C("setIOValues","cell",t),C("setIOValues","controller",r),C("setIOValues","iOValue",n);const s="/cells/{cell}/virtual-controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},Za=function(e){const t=nE(e);return{async listIOs(r,n,o,s){var c,u;const a=await t.listIOs(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerInputsOutputsApi.listIOs"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async listVirtualControllerIODescriptions(r,n,o,s,a,i,l){var h,p;const c=await t.listVirtualControllerIODescriptions(r,n,o,s,a,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=N["VirtualControllerInputsOutputsApi.listVirtualControllerIODescriptions"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>J(c,B,$,e)(f,d||m)},async setIOValues(r,n,o,s){var c,u;const a=await t.setIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerInputsOutputsApi.setIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var oE=class extends ze{listIOs(e,t,r,n){return Za(this.configuration).listIOs(e,t,r,n).then(o=>o(this.axios,this.basePath))}listVirtualControllerIODescriptions(e,t,r,n,o,s,a){return Za(this.configuration).listVirtualControllerIODescriptions(e,t,r,n,o,s,a).then(i=>i(this.axios,this.basePath))}setIOValues(e,t,r,n){return Za(this.configuration).setIOValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}},sE=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(HT),this.cell=this.withUnwrappedResponsesOnly(OT),this.motionGroup=this.withCellId(jT),this.motionGroupModels=this.withCellId(BT),this.controller=this.withCellId(ET),this.controllerIOs=this.withCellId(AT),this.trajectoryPlanning=this.withCellId(XT),this.trajectoryExecution=this.withCellId(KT),this.trajectoryCaching=this.withCellId(WT),this.application=this.withCellId(td),this.applicationGlobal=this.withUnwrappedResponsesOnly(td),this.jogging=this.withCellId(MT),this.kinematics=this.withCellId(VT),this.busInputsOutputs=this.withCellId(CT),this.virtualController=this.withCellId(eE),this.virtualControllerBehavior=this.withCellId(rE),this.virtualControllerIOs=this.withCellId(oE),this.storeObject=this.withCellId(zT),this.storeCollisionComponents=this.withCellId(LT),this.storeCollisionSetups=this.withCellId($T)}withCellId(e){const t=new e({...this.opts,isJsonMime:r=>r==="application/json"},this.opts.basePath??"",this.opts.axiosInstance??B.create());for(const r of Reflect.ownKeys(Reflect.getPrototypeOf(t)))if(r!=="constructor"&&typeof t[r]=="function"){const n=t[r];t[r]=(...o)=>n.apply(t,[this.cellId,...o]).then(s=>s.data)}return t}withUnwrappedResponsesOnly(e){const t=new e({...this.opts,isJsonMime:r=>r==="application/json"},this.opts.basePath??"",this.opts.axiosInstance??B.create());for(const r of Reflect.ownKeys(Reflect.getPrototypeOf(t)))if(r!=="constructor"&&typeof t[r]=="function"){const n=t[r];t[r]=(...o)=>n.apply(t,o).then(s=>s.data)}return t}},aE=class{constructor(){this.connections=[]}async handleAPIRequest(e){var o,s,a;const t=[{method:"GET",path:"/cells/:cellId/controllers",handle(){return["mock-ur5e"]}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId",handle(){return{configuration:{initial_joint_position:"[0,-1.571,-1.571,-1.571,1.571,-1.571,0]",kind:"VirtualController",manufacturer:"universalrobots",type:"universalrobots-ur5e"},name:"mock-ur5"}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId/state",handle(){return{mode:"MODE_CONTROL",last_error:[],timestamp:"2025-10-16T09:19:26.634534092Z",sequence_number:1054764,controller:"mock-ur5e",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",velocity_override:100,motion_groups:[{timestamp:"2025-10-16T09:19:26.634534092Z",sequence_number:1054764,motion_group:"0@mock-ur5e",controller:"mock-ur5e",joint_position:[1.487959623336792,-1.8501918315887451,1.8003005981445312,6.034560203552246,1.4921919107437134,1.593459963798523],joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_torque:[],joint_current:[0,0,0,0,0,0],flange_pose:{position:[107.6452433732927,-409.0402987746852,524.2402132330305],orientation:[.9874434028353319,-.986571714997442,1.3336589451098142]},tcp:"Flange",tcp_pose:{position:[107.6452433732927,-409.0402987746852,524.2402132330305],orientation:[.9874434028353319,-.986571714997442,1.3336589451098142]},payload:"",coordinate_system:"",standstill:!0}]}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId/motion-groups/:motionGroupId/description",handle(){return{motion_group_model:"UniversalRobots_UR5e",mounting:{position:[0,0,0],orientation:[0,0,0]},tcps:{Flange:{name:"Default-Flange",pose:{position:[0,0,0],orientation:[0,0,0]}}},payloads:{"FPay-0":{name:"FPay-0",payload:0,center_of_mass:[0,0,0],moment_of_inertia:[0,0,0]}},cycle_time:8,dh_parameters:[{alpha:1.5707963267948966,d:162.25},{a:-425},{a:-392.2},{alpha:1.5707963267948966,d:133.3},{alpha:-1.5707963267948966,d:99.7},{d:99.6}],operation_limits:{auto_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3},elbow:{velocity:5e3},flange:{velocity:5e3}},manual_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3}},manual_t1_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3}},manual_t2_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3}}},serial_number:"WBVirtualRobot"}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId/coordinate-systems",handle(){return[{coordinate_system:"",name:"world",reference_coordinate_system:"",position:[0,0,0],orientation:[0,0,0],orientation_type:"ROTATION_VECTOR"},{coordinate_system:"CS-0",name:"Default-CS",reference_coordinate_system:"",position:[0,0,0],orientation:[0,0,0],orientation_type:"ROTATION_VECTOR"}]}}],r=((o=e.method)==null?void 0:o.toUpperCase())||"GET",n=`/cells${(a=(s=e.url)==null?void 0:s.split("/cells")[1])==null?void 0:a.split("?")[0]}`;for(const i of t){const l=mT.match(i.path)(n||"");if(r===i.method&&l){const c=i.handle();return{status:200,statusText:"Success",data:JSON.stringify(c),headers:{},config:e,request:{responseURL:e.url}}}}throw new Ai(`No mock handler matched this request: ${r} ${n}`,"404",e)}handleWebsocketConnection(e){this.connections.push(e),setTimeout(()=>{e.dispatchEvent(new Event("open")),console.log("Websocket connection opened from",e.url),e.url.includes("/state-stream")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify(iE)})),e.url.includes("/execution/jogging")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{message:"string",kind:"INITIALIZE_RECEIVED"}})}))},10)}handleWebsocketMessage(e,t){console.log(`Received message on ${e.url}`,t)}};const iE={result:{motion_group:"0@universalrobots-ur5e",controller:"universalrobots-ur5e",timestamp:new Date().toISOString(),sequence_number:1,joint_position:[1.1699999570846558,-1.5700000524520874,1.3600000143051147,1.0299999713897705,1.2899999618530273,1.2799999713897705],joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},standstill:!1,flange_pose:{position:[1.3300010259703043,-409.2680714682808,531.0203477065281],orientation:[1.7564919306270736,-1.7542521568325058,.7326972590614671]},tcp_pose:{position:[1.3300010259703043,-409.2680714682808,531.0203477065281],orientation:[1.7564919306270736,-1.7542521568325058,.7326972590614671]}}};function lE(e){return e.startsWith("http")||(e=`http://${e}`),new URL(e).toString()}var cE=class{constructor(e){this.authPromise=null,this.accessToken=null;const t=e.cellId??"cell";this.config={cellId:t,...e},this.accessToken=e.accessToken||qa.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"?this.mock=new aE:this.config.instanceUrl=lE(this.config.instanceUrl);const r=B.create({baseURL:Qa(this.config.instanceUrl,"/api/v2"),headers:typeof window<"u"&&window.location.origin.includes("localhost")?{}:{"X-Wandelbots-Client":"Wandelbots-Nova-JS-SDK"}});r.interceptors.request.use(async n=>(n.headers.Authorization||(this.accessToken?n.headers.Authorization=`Bearer ${this.accessToken}`:this.config.username&&this.config.password&&(n.headers.Authorization=`Basic ${btoa(`${e.username}:${e.password}`)}`)),n)),typeof window<"u"&&r.interceptors.response.use(n=>n,async n=>{var o,s;if(hT(n))if(((o=n.response)==null?void 0:o.status)===401)try{if(await this.renewAuthentication(),n.config)return this.accessToken?n.config.headers.Authorization=`Bearer ${this.accessToken}`:delete n.config.headers.Authorization,r.request(n.config)}catch(a){return Promise.reject(a)}else((s=n.response)==null?void 0:s.status)===503&&(await fetch(window.location.href)).status===503&&window.location.reload();return Promise.reject(n)}),this.api=new sE(t,{...e,basePath:Qa(this.config.instanceUrl,"/api/v2"),isJsonMime:n=>n==="application/json",baseOptions:{...this.mock?{adapter:n=>this.mock.handleAPIRequest(n)}:{},...e.baseOptions},axiosInstance:r})}async renewAuthentication(){if(!this.authPromise){this.authPromise=Dw(this.config.instanceUrl);try{this.accessToken=await this.authPromise,this.accessToken?qa.setString("wbjs.access_token",this.accessToken):qa.delete("wbjs.access_token")}finally{this.authPromise=null}}}makeWebsocketURL(e){const t=new URL(Qa(this.config.instanceUrl,`/api/v2/cells/${this.config.cellId}`,e));return t.protocol=t.protocol.replace("http","ws"),t.protocol=t.protocol.replace("https","wss"),this.accessToken?t.searchParams.append("token",this.accessToken):this.config.username&&this.config.password&&(t.username=this.config.username,t.password=this.config.password),t.toString()}openReconnectingWebsocket(e){return new Vw(this.makeWebsocketURL(e),{mock:this.mock})}};function uE(e){var s,a,i,l,c,u;const t=[((s=e.position)==null?void 0:s[0])??0,((a=e.position)==null?void 0:a[1])??0,((i=e.position)==null?void 0:i[2])??0],r=[((l=e.orientation)==null?void 0:l[0])??0,((c=e.orientation)==null?void 0:c[1])??0,((u=e.orientation)==null?void 0:u[2])??0],n=t.map(d=>d.toFixed(1)),o=r.map(d=>d.toFixed(4));return`(${n.concat(o).join(", ")})`}function zt(e,t,r){return Math.max(t,Math.min(r,e))}class dE{constructor(t=0,r=0,n=0,o=1){this.isQuaternion=!0,this._x=t,this._y=r,this._z=n,this._w=o}static slerpFlat(t,r,n,o,s,a,i){let l=n[o+0],c=n[o+1],u=n[o+2],d=n[o+3];const h=s[a+0],p=s[a+1],f=s[a+2],m=s[a+3];if(i===0){t[r+0]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d;return}if(i===1){t[r+0]=h,t[r+1]=p,t[r+2]=f,t[r+3]=m;return}if(d!==m||l!==h||c!==p||u!==f){let y=1-i;const S=l*h+c*p+u*f+d*m,R=S>=0?1:-1,v=1-S*S;if(v>Number.EPSILON){const I=Math.sqrt(v),E=Math.atan2(I,S*R);y=Math.sin(y*E)/I,i=Math.sin(i*E)/I}const O=i*R;if(l=l*y+h*O,c=c*y+p*O,u=u*y+f*O,d=d*y+m*O,y===1-i){const I=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=I,c*=I,u*=I,d*=I}}t[r]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d}static multiplyQuaternionsFlat(t,r,n,o,s,a){const i=n[o],l=n[o+1],c=n[o+2],u=n[o+3],d=s[a],h=s[a+1],p=s[a+2],f=s[a+3];return t[r]=i*f+u*d+l*p-c*h,t[r+1]=l*f+u*h+c*d-i*p,t[r+2]=c*f+u*p+i*h-l*d,t[r+3]=u*f-i*d-l*h-c*p,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,r,n,o){return this._x=t,this._y=r,this._z=n,this._w=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,r=!0){const n=t._x,o=t._y,s=t._z,a=t._order,i=Math.cos,l=Math.sin,c=i(n/2),u=i(o/2),d=i(s/2),h=l(n/2),p=l(o/2),f=l(s/2);switch(a){case"XYZ":this._x=h*u*d+c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d-h*p*f;break;case"YXZ":this._x=h*u*d+c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d+h*p*f;break;case"ZXY":this._x=h*u*d-c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d-h*p*f;break;case"ZYX":this._x=h*u*d-c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d+h*p*f;break;case"YZX":this._x=h*u*d+c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d-h*p*f;break;case"XZY":this._x=h*u*d-c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d+h*p*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return r===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,r){const n=r/2,o=Math.sin(n);return this._x=t.x*o,this._y=t.y*o,this._z=t.z*o,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const r=t.elements,n=r[0],o=r[4],s=r[8],a=r[1],i=r[5],l=r[9],c=r[2],u=r[6],d=r[10],h=n+i+d;if(h>0){const p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(u-l)*p,this._y=(s-c)*p,this._z=(a-o)*p}else if(n>i&&n>d){const p=2*Math.sqrt(1+n-i-d);this._w=(u-l)/p,this._x=.25*p,this._y=(o+a)/p,this._z=(s+c)/p}else if(i>d){const p=2*Math.sqrt(1+i-n-d);this._w=(s-c)/p,this._x=(o+a)/p,this._y=.25*p,this._z=(l+u)/p}else{const p=2*Math.sqrt(1+d-n-i);this._w=(a-o)/p,this._x=(s+c)/p,this._y=(l+u)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(t,r){let n=t.dot(r)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*r.z-t.z*r.y,this._y=t.z*r.x-t.x*r.z,this._z=t.x*r.y-t.y*r.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(zt(this.dot(t),-1,1)))}rotateTowards(t,r){const n=this.angleTo(t);if(n===0)return this;const o=Math.min(1,r/n);return this.slerp(t,o),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,r){const n=t._x,o=t._y,s=t._z,a=t._w,i=r._x,l=r._y,c=r._z,u=r._w;return this._x=n*u+a*i+o*c-s*l,this._y=o*u+a*l+s*i-n*c,this._z=s*u+a*c+n*l-o*i,this._w=a*u-n*i-o*l-s*c,this._onChangeCallback(),this}slerp(t,r){if(r===0)return this;if(r===1)return this.copy(t);const n=this._x,o=this._y,s=this._z,a=this._w;let i=a*t._w+n*t._x+o*t._y+s*t._z;if(i<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,i=-i):this.copy(t),i>=1)return this._w=a,this._x=n,this._y=o,this._z=s,this;const l=1-i*i;if(l<=Number.EPSILON){const p=1-r;return this._w=p*a+r*this._w,this._x=p*n+r*this._x,this._y=p*o+r*this._y,this._z=p*s+r*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,i),d=Math.sin((1-r)*u)/c,h=Math.sin(r*u)/c;return this._w=a*d+this._w*h,this._x=n*d+this._x*h,this._y=o*d+this._y*h,this._z=s*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(t,r,n){return this.copy(t).slerp(r,n)}random(){const t=2*Math.PI*Math.random(),r=2*Math.PI*Math.random(),n=Math.random(),o=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(o*Math.sin(t),o*Math.cos(t),s*Math.sin(r),s*Math.cos(r))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,r=0){return this._x=t[r],this._y=t[r+1],this._z=t[r+2],this._w=t[r+3],this._onChangeCallback(),this}toArray(t=[],r=0){return t[r]=this._x,t[r+1]=this._y,t[r+2]=this._z,t[r+3]=this._w,t}fromBufferAttribute(t,r){return this._x=t.getX(r),this._y=t.getY(r),this._z=t.getZ(r),this._w=t.getW(r),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class rn{constructor(t=0,r=0,n=0){rn.prototype.isVector3=!0,this.x=t,this.y=r,this.z=n}set(t,r,n){return n===void 0&&(n=this.z),this.x=t,this.y=r,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,r){switch(t){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,r){return this.x=t.x+r.x,this.y=t.y+r.y,this.z=t.z+r.z,this}addScaledVector(t,r){return this.x+=t.x*r,this.y+=t.y*r,this.z+=t.z*r,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,r){return this.x=t.x-r.x,this.y=t.y-r.y,this.z=t.z-r.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,r){return this.x=t.x*r.x,this.y=t.y*r.y,this.z=t.z*r.z,this}applyEuler(t){return this.applyQuaternion(sd.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(sd.setFromAxisAngle(t,r))}applyMatrix3(t){const r=this.x,n=this.y,o=this.z,s=t.elements;return this.x=s[0]*r+s[3]*n+s[6]*o,this.y=s[1]*r+s[4]*n+s[7]*o,this.z=s[2]*r+s[5]*n+s[8]*o,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const r=this.x,n=this.y,o=this.z,s=t.elements,a=1/(s[3]*r+s[7]*n+s[11]*o+s[15]);return this.x=(s[0]*r+s[4]*n+s[8]*o+s[12])*a,this.y=(s[1]*r+s[5]*n+s[9]*o+s[13])*a,this.z=(s[2]*r+s[6]*n+s[10]*o+s[14])*a,this}applyQuaternion(t){const r=this.x,n=this.y,o=this.z,s=t.x,a=t.y,i=t.z,l=t.w,c=2*(a*o-i*n),u=2*(i*r-s*o),d=2*(s*n-a*r);return this.x=r+l*c+a*d-i*u,this.y=n+l*u+i*c-s*d,this.z=o+l*d+s*u-a*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const r=this.x,n=this.y,o=this.z,s=t.elements;return this.x=s[0]*r+s[4]*n+s[8]*o,this.y=s[1]*r+s[5]*n+s[9]*o,this.z=s[2]*r+s[6]*n+s[10]*o,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,r){return this.x=zt(this.x,t.x,r.x),this.y=zt(this.y,t.y,r.y),this.z=zt(this.z,t.z,r.z),this}clampScalar(t,r){return this.x=zt(this.x,t,r),this.y=zt(this.y,t,r),this.z=zt(this.z,t,r),this}clampLength(t,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(zt(n,t,r))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,r){return this.x+=(t.x-this.x)*r,this.y+=(t.y-this.y)*r,this.z+=(t.z-this.z)*r,this}lerpVectors(t,r,n){return this.x=t.x+(r.x-t.x)*n,this.y=t.y+(r.y-t.y)*n,this.z=t.z+(r.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,r){const n=t.x,o=t.y,s=t.z,a=r.x,i=r.y,l=r.z;return this.x=o*l-s*i,this.y=s*a-n*l,this.z=n*i-o*a,this}projectOnVector(t){const r=t.lengthSq();if(r===0)return this.set(0,0,0);const n=t.dot(this)/r;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return ei.copy(this).projectOnVector(t),this.sub(ei)}reflect(t){return this.sub(ei.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const r=Math.sqrt(this.lengthSq()*t.lengthSq());if(r===0)return Math.PI/2;const n=this.dot(t)/r;return Math.acos(zt(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const r=this.x-t.x,n=this.y-t.y,o=this.z-t.z;return r*r+n*n+o*o}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,r,n){const o=Math.sin(r)*t;return this.x=o*Math.sin(n),this.y=Math.cos(r)*t,this.z=o*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,r,n){return this.x=t*Math.sin(r),this.y=n,this.z=t*Math.cos(r),this}setFromMatrixPosition(t){const r=t.elements;return this.x=r[12],this.y=r[13],this.z=r[14],this}setFromMatrixScale(t){const r=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),o=this.setFromMatrixColumn(t,2).length();return this.x=r,this.y=n,this.z=o,this}setFromMatrixColumn(t,r){return this.fromArray(t.elements,r*4)}setFromMatrix3Column(t,r){return this.fromArray(t.elements,r*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,r=0){return this.x=t[r],this.y=t[r+1],this.z=t[r+2],this}toArray(t=[],r=0){return t[r]=this.x,t[r+1]=this.y,t[r+2]=this.z,t}fromBufferAttribute(t,r){return this.x=t.getX(r),this.y=t.getY(r),this.z=t.getZ(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,r=Math.random()*2-1,n=Math.sqrt(1-r*r);return this.x=n*Math.cos(t),this.y=r,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const ei=new rn,sd=new dE;function Ul(e,t,r){if(t.length!==e.length)return!0;for(let n=0;n<t.length;n++)if(Math.abs(t[n]-e[n])>r)return!1;return!0}function lf(e,t,r){if(e===void 0&&t||e&&t===void 0||(e==null?void 0:e.orientation)===void 0||(t==null?void 0:t.orientation)===void 0||(e==null?void 0:e.position)===void 0||(t==null?void 0:t.position)===void 0)return!1;if(e===void 0||t===void 0)return!0;let n=0;return n+=Math.abs(e.orientation[0]-t.orientation[0]),n+=Math.abs(e.orientation[1]-t.orientation[1]),n+=Math.abs(e.orientation[2]-t.orientation[2]),n+=Math.abs(e.position[0]-t.position[0]),n+=Math.abs(e.position[1]-t.position[1]),n+=Math.abs(e.position[2]-t.position[2]),n<=r}function Ll(e,t,r){return e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp&&lf(e.tcp_pose,t.tcp_pose,r)}function cf(e,t){const r=new wt.Vector3(t[0],t[1],t[2]),n=new wt.Vector3(e[0],e[1],e[2]),o=r.length(),s=r.normalize();let a=n.length(),i=n.normalize();i.dot(s)<0&&(a=-a,i=i.multiplyScalar(-1));let l=a-o;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),a=o+l,[...i.multiplyScalar(a)]}const ad=1e-4;class la{constructor(t,r,n,o,s,a){this.nova=t,this.controller=r,this.motionGroup=n,this.description=o,this.initialMotionState=s,this.motionStateSocket=a,this.rapidlyChangingMotionState=s,a.addEventListener("message",i=>{var c;const l=(c=$e.tryParseJson(i.data))==null?void 0:c.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${i.data}`);Ul(this.rapidlyChangingMotionState.joint_position,l.joint_position,ad)||Ee.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=l.joint_position}),Ll(this.rapidlyChangingMotionState,l,ad)||Ee.runInAction(()=>{var u,d,h;this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:(u=l.tcp_pose)!=null&&u.orientation&&((d=l.tcp_pose)!=null&&d.position)&&((h=this.rapidlyChangingMotionState.tcp_pose)!=null&&h.orientation)?this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:cf(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation)}:console.warn("Received incomplete tcp_pose, ignoring",l.tcp_pose)}),this.rapidlyChangingMotionState.standstill!==l.standstill&&Ee.runInAction(()=>{this.rapidlyChangingMotionState.standstill=l.standstill})}),Ee.makeAutoObservable(this)}static async open(t,r){var d;const[n,o]=r.split("@"),s=await t.api.controller.getCurrentRobotControllerState(o),a=s==null?void 0:s.motion_groups.find(h=>h.motion_group===r);if(!s||!a)throw new Error(`Controller ${o} or motion group ${r} not found`);const i=t.openReconnectingWebsocket(`/controllers/${o}/motion-groups/${r}/state-stream`),l=await i.firstMessage(),c=(d=$e.tryParseJson(l.data))==null?void 0:d.result;if(!c)throw new Error(`Unable to parse initial motion state message ${l.data}`);console.log(`Connected motion state websocket to motion group ${a.motion_group}. Initial state:
151
- `,c);const u=await t.api.motionGroup.getMotionGroupDescription(o,a.motion_group);return new la(t,s,a,u,c,i)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replace(/-/g,"_")}_${t}`}get joints(){return this.initialMotionState.joint_position.map((t,r)=>({index:r}))}dispose(){this.motionStateSocket.close()}}const id="Movement request rejected. Another client is currently executing a 'Jogging' motion!";class ca{constructor(t,r={}){this.motionStream=t,this.options=r,this.ENDPOINT_JOGGING="/execution/jogging",this.ENDPOINT_TRAJECTORY="/execution/trajectory",this.DEFAULT_MODE="off",this.DEFAULT_TCP="Flange",this.DEFAULT_INIT_TIMEOUT=5e3,this.DEFAULT_ORIENTATION="coordsys",this.mode="off",this.joggingSocket=null,this.trajectorySocket=null,this.timeout=this.DEFAULT_INIT_TIMEOUT,this.tcp=(r==null?void 0:r.tcp)||t.motionGroup.tcp||this.DEFAULT_TCP,this.orientation=(r==null?void 0:r.orientation)||this.DEFAULT_ORIENTATION,this.timeout=(r==null?void 0:r.timeout)||this.DEFAULT_INIT_TIMEOUT,this.mode=(r==null?void 0:r.mode)||this.DEFAULT_MODE,this.onError=r==null?void 0:r.onError}static async open(t,r,n={}){const o=await la.open(t,r),s=new ca(o,n);return await s.setJoggingMode(s.mode),s}async setOptions(t){t.tcp&&(this.tcp=t.tcp),t.orientation&&(this.orientation=t.orientation),t.timeout&&(this.timeout=t.timeout),t.mode&&(this.mode=t.mode),t.onError&&(this.onError=t.onError),this.setJoggingMode(this.mode,!1)}get motionGroupId(){return this.motionStream.motionGroupId}get nova(){return this.motionStream.nova}get numJoints(){return this.motionStream.joints.length}async stop(){if(this.joggingSocket){const t=new Array(this.numJoints).fill(0);this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:t})}this.trajectorySocket&&this.trajectorySocket.sendJson({message_type:"PauseMovementRequest"})}async dispose(){const t=[this.joggingSocket,this.trajectorySocket].filter(r=>r!==null);return t.forEach(r=>{r.dispose()}),this.joggingSocket=null,this.trajectorySocket=null,Promise.all(t.map(r=>r.closed()))}async setJoggingMode(t,r=!0){if(!(this.mode===t&&r)&&(this.dispose(),this.mode=t,this.mode==="jogging"))return this.initializeJoggingWebsocket()}async initializeJoggingWebsocket(){return new Promise((t,r)=>{const n=setTimeout(()=>{r(new Error(`Jogging initialization timeout after ${this.timeout} seconds`))},this.timeout);this.joggingSocket=this.nova.openReconnectingWebsocket(this.ENDPOINT_JOGGING),this.joggingSocket.addEventListener("message",o=>{var a,i,l,c;const s=$e.tryParseJson(o.data);if(((a=s==null?void 0:s.result)==null?void 0:a.kind)==="INITIALIZE_RECEIVED"){clearTimeout(n),t();return}if(((i=s==null?void 0:s.result)==null?void 0:i.kind)==="MOTION_ERROR")if(clearTimeout(n),this.onBlocked&&((l=s==null?void 0:s.result)!=null&&l.message.includes(id))){(c=this.joggingSocket)==null||c.dispose(),this.onBlocked();return}else this.onError?this.onError(o.data):r(new Error(o.data))}),this.joggingSocket.sendJson({message_type:"InitializeJoggingRequest",motion_group:this.motionGroupId,tcp:this.tcp})})}async rotateJoints({joint:t,direction:r,velocityRadsPerSec:n}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Joint jogging websocket not connected; create one by setting jogging mode to 'jogging'");const o=new Array(this.numJoints).fill(0);o[t]=r==="-"?-n:n,this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:o})}async translateTCP({axis:t,direction:r,velocityMmPerSec:n}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");const o=[0,0,0],s=[0,0,0];s[$e.XYZ_TO_VECTOR[t]]=r==="-"?-n:n,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:s,rotation:o,use_tool_coordinate_system:this.orientation==="tool"})}async rotateTCP({axis:t,direction:r,velocityRadsPerSec:n}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");const o=[0,0,0],s=[0,0,0];o[$e.XYZ_TO_VECTOR[t]]=r==="-"?-n:n,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:s,rotation:o})}async runIncrementalCartesianMotion({currentTcpPose:t,currentJoints:r,velocityInRelevantUnits:n,axis:o,direction:s,motion:a}){const i=[];if(this.mode!=="trajectory")throw new Error("Set jogging mode to 'trajectory' to run incremental cartesian motions");if(a.type==="translate"){if(!t.position)throw new Error("Current pose has no position, cannot perform translation");const y=[...t.position];y[$e.XYZ_TO_VECTOR[o]]+=a.distanceMm*(s==="-"?-1:1),i.push({limits_override:{tcp_velocity_limit:n},path:{path_definition_name:"PathLine",target_pose:{position:y,orientation:t.orientation}}})}else if(a.type==="rotate"){if(!t.orientation)throw new Error("Current pose has no orientation, cannot perform rotation");const y=new rn(t.orientation[0],t.orientation[1],t.orientation[2]),S=y.length(),R=y.clone().normalize(),v=a.distanceRads*(s==="-"?-1:1),O=new rn(0,0,0);O[o]=1;const I=Math.cos(.5*v)*Math.cos(.5*S),E=Math.sin(.5*v)*Math.sin(.5*S),w=Math.sin(.5*v)*Math.cos(.5*S),P=Math.cos(.5*v)*Math.sin(.5*S),k=O.dot(R),b=O.clone().cross(R),A=2*Math.acos(I-E*k),_=A/Math.sin(.5*A),M=new rn().addScaledVector(b,E).addScaledVector(O,w).addScaledVector(R,P).multiplyScalar(_);i.push({limits_override:{tcp_orientation_velocity_limit:n},path:{path_definition_name:"PathLine",target_pose:{position:t.position,orientation:[...M]}}})}const l=this.motionStream.description;if(l.cycle_time===void 0){console.warn("Current motion group has no cycle time, cannot plan jogging motion");return}const c={motion_group_model:l.motion_group_model,cycle_time:l.cycle_time,mounting:l.mounting,global:l.operation_limits.auto_limits},u=await this.nova.api.trajectoryPlanning.planTrajectory({motion_group_setup:c,start_joint_position:r,motion_commands:i}),d=u.response;if(!d)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(u)}`);this.trajectorySocket&&(console.warn("Trajectory jogging websocket already open; will close"),this.trajectorySocket.dispose()),this.trajectorySocket=this.nova.openReconnectingWebsocket(this.ENDPOINT_TRAJECTORY);const h=y=>{var S;if(!y||y.add_trajectory_error||y.message)if(this.onError)this.onError(y);else throw new Error(((S=y==null?void 0:y.add_trajectory_error)==null?void 0:S.message)||(y==null?void 0:y.message)||"Failed to execute trajectory, unknown error");if(!this.trajectorySocket)throw new Error("Failed to execute trajectory, websocket not available anymore");this.trajectorySocket.sendJson({message_type:"StartMovementRequest",direction:"DIRECTION_FORWARD"})},p=async()=>{var y;await Ee.when(()=>!this.motionStream.rapidlyChangingMotionState.standstill),await Ee.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(y=this.trajectorySocket)==null||y.dispose(),this.trajectorySocket=null},f=async()=>{var y;await Ee.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(y=this.trajectorySocket)==null||y.dispose(),this.trajectorySocket=null},m=async y=>{if(y!=null&&y.message)if(this.onError){this.onError(y);return}else throw new Error(y.message||"Failed to execute trajectory, unknown error");this.motionStream.rapidlyChangingMotionState.standstill?await p():await f()};this.trajectorySocket.addEventListener("message",y=>{var R,v;const S=$e.tryParseJson(y.data);if(!((R=S==null?void 0:S.result)!=null&&R.kind))throw new Error(`Failed to execute trajectory: Received invalid message ${y.data}`);if(this.onBlocked&&((v=S.result.message)!=null&&v.includes(id))){this.onBlocked();return}if(S.result.kind==="INITIALIZE_RECEIVED")h(S.result);else if(S.result.kind==="START_RECEIVED")m(S);else if(S.result.kind!=="PAUSE_RECEIVED")if(S.result.kind==="MOTION_ERROR"&&S.result.message)if(this.onError){this.onError(S);return}else throw new Error(S.result.message);else throw new Error(`Failed to execute trajectory, cannot handle message type "${S.result.kind}"`)}),this.trajectorySocket.sendJson({message_type:"InitializeMovementRequest",trajectory:{message_type:"TrajectoryData",motion_group:this.motionGroupId,data:d,tcp:this.tcp}})}}function hE(e){try{return JSON.stringify(e)}catch{return}}function pE(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function fE(e){var t,r,n,o;return e instanceof Ai&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof Ai&&e.response?`${(t=e.response)==null?void 0:t.status} ${(r=e.response)==null?void 0:r.statusText} from ${(n=e.response)==null?void 0:n.config.url}: ${JSON.stringify((o=e.response)==null?void 0:o.data)}`:e instanceof Error?e.message:`Unexpected error: ${hE(e)||e}`}const Fl=e=>{const t=e.softTimeout||3e3,[r,n]=j.useState(!1),o=T.useTheme();return j.useEffect(()=>{const s=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(s)}),g.jsx(T.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:o.palette.text.primary},children:e.error?g.jsx(uf,{loadingMessage:e.message,error:e.error}):g.jsxs(g.Fragment,{children:[g.jsx(T.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&g.jsx("div",{children:e.message}),g.jsx(T.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:o.palette.text.secondary},children:"This is taking longer than expected..."})]})})},uf=e=>{const t=fE(e.error),r=e.error instanceof Error?e.error.stack:null,n=T.useTheme();return g.jsxs(T.Stack,{sx:{maxHeight:"100%",maxWidth:"min(100%, 800px)",padding:2,overflow:"auto",color:n.palette.error.main,"& pre":{whiteSpace:"pre-wrap",wordBreak:"break-word",paddingBottom:"3rem"}},children:[(e.loadingMessage?`Error while ${Ui.lowerFirst(T.capitalize(e.loadingMessage))} - `:"")+t,g.jsx("br",{}),r&&g.jsx("pre",{children:r})]})};var mE="[object AsyncFunction]",gE="[object Function]",yE="[object GeneratorFunction]",bE="[object Proxy]";function df(e){if(!Tr(e))return!1;var t=jr(e);return t==gE||t==yE||t==mE||t==bE}var ti=Lt["__core-js_shared__"],ld=function(){var e=/[^.]+$/.exec(ti&&ti.keys&&ti.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function xE(e){return!!ld&&ld in e}var SE=Function.prototype,vE=SE.toString;function Dr(e){if(e!=null){try{return vE.call(e)}catch{}try{return e+""}catch{}}return""}var CE=/[\\^$.*+?()[\]{}|]/g,wE=/^\[object .+?Constructor\]$/,OE=Function.prototype,TE=Object.prototype,EE=OE.toString,IE=TE.hasOwnProperty,AE=RegExp("^"+EE.call(IE).replace(CE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function RE(e){if(!Tr(e)||xE(e))return!1;var t=df(e)?AE:wE;return t.test(Dr(e))}function PE(e,t){return e==null?void 0:e[t]}function Br(e,t){var r=PE(e,t);return RE(r)?r:void 0}var cd=function(){try{var e=Br(Object,"defineProperty");return e({},"",{}),e}catch{}}();function ME(e,t,r){t=="__proto__"&&cd?cd(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function _E(e,t,r,n){for(var o=-1,s=e==null?0:e.length;++o<s;){var a=e[o];t(n,a,r(a),e)}return n}function VE(e){return function(t,r,n){for(var o=-1,s=Object(t),a=n(t),i=a.length;i--;){var l=a[++o];if(r(s[l],l,s)===!1)break}return t}}var kE=VE();function jE(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var DE="[object Arguments]";function ud(e){return Er(e)&&jr(e)==DE}var hf=Object.prototype,BE=hf.hasOwnProperty,UE=hf.propertyIsEnumerable,pf=ud(function(){return arguments}())?ud:function(e){return Er(e)&&BE.call(e,"callee")&&!UE.call(e,"callee")},Ut=Array.isArray;function LE(){return!1}var ff=typeof exports=="object"&&exports&&!exports.nodeType&&exports,dd=ff&&typeof module=="object"&&module&&!module.nodeType&&module,FE=dd&&dd.exports===ff,hd=FE?Lt.Buffer:void 0,$E=hd?hd.isBuffer:void 0,Pi=$E||LE,NE=9007199254740991,zE=/^(?:0|[1-9]\d*)$/;function mf(e,t){var r=typeof e;return t=t??NE,!!t&&(r=="number"||r!="symbol"&&zE.test(e))&&e>-1&&e%1==0&&e<t}var GE=9007199254740991;function $l(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=GE}var HE="[object Arguments]",qE="[object Array]",WE="[object Boolean]",JE="[object Date]",YE="[object Error]",KE="[object Function]",QE="[object Map]",XE="[object Number]",ZE="[object Object]",e2="[object RegExp]",t2="[object Set]",r2="[object String]",n2="[object WeakMap]",o2="[object ArrayBuffer]",s2="[object DataView]",a2="[object Float32Array]",i2="[object Float64Array]",l2="[object Int8Array]",c2="[object Int16Array]",u2="[object Int32Array]",d2="[object Uint8Array]",h2="[object Uint8ClampedArray]",p2="[object Uint16Array]",f2="[object Uint32Array]",Pe={};Pe[a2]=Pe[i2]=Pe[l2]=Pe[c2]=Pe[u2]=Pe[d2]=Pe[h2]=Pe[p2]=Pe[f2]=!0;Pe[HE]=Pe[qE]=Pe[o2]=Pe[WE]=Pe[s2]=Pe[JE]=Pe[YE]=Pe[KE]=Pe[QE]=Pe[XE]=Pe[ZE]=Pe[e2]=Pe[t2]=Pe[r2]=Pe[n2]=!1;function m2(e){return Er(e)&&$l(e.length)&&!!Pe[jr(e)]}function g2(e){return function(t){return e(t)}}var gf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fn=gf&&typeof module=="object"&&module&&!module.nodeType&&module,y2=Fn&&Fn.exports===gf,ri=y2&&_p.process,pd=function(){try{var e=Fn&&Fn.require&&Fn.require("util").types;return e||ri&&ri.binding&&ri.binding("util")}catch{}}(),fd=pd&&pd.isTypedArray,yf=fd?g2(fd):m2,b2=Object.prototype,x2=b2.hasOwnProperty;function S2(e,t){var r=Ut(e),n=!r&&pf(e),o=!r&&!n&&Pi(e),s=!r&&!n&&!o&&yf(e),a=r||n||o||s,i=a?jE(e.length,String):[],l=i.length;for(var c in e)x2.call(e,c)&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||mf(c,l)))&&i.push(c);return i}var v2=Object.prototype;function C2(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||v2;return e===r}function w2(e,t){return function(r){return e(t(r))}}var O2=w2(Object.keys,Object),T2=Object.prototype,E2=T2.hasOwnProperty;function I2(e){if(!C2(e))return O2(e);var t=[];for(var r in Object(e))E2.call(e,r)&&r!="constructor"&&t.push(r);return t}function bf(e){return e!=null&&$l(e.length)&&!df(e)}function Nl(e){return bf(e)?S2(e):I2(e)}function A2(e,t){return e&&kE(e,t,Nl)}function R2(e,t){return function(r,n){if(r==null)return r;if(!bf(r))return e(r,n);for(var o=r.length,s=-1,a=Object(r);++s<o&&n(a[s],s,a)!==!1;);return r}}var P2=R2(A2);function M2(e,t,r,n){return P2(e,function(o,s,a){t(n,o,r(o),a)}),n}function _2(){this.__data__=[],this.size=0}function xf(e,t){return e===t||e!==e&&t!==t}function ua(e,t){for(var r=e.length;r--;)if(xf(e[r][0],t))return r;return-1}var V2=Array.prototype,k2=V2.splice;function j2(e){var t=this.__data__,r=ua(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():k2.call(t,r,1),--this.size,!0}function D2(e){var t=this.__data__,r=ua(t,e);return r<0?void 0:t[r][1]}function B2(e){return ua(this.__data__,e)>-1}function U2(e,t){var r=this.__data__,n=ua(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function er(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}er.prototype.clear=_2;er.prototype.delete=j2;er.prototype.get=D2;er.prototype.has=B2;er.prototype.set=U2;function L2(){this.__data__=new er,this.size=0}function F2(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function $2(e){return this.__data__.get(e)}function N2(e){return this.__data__.has(e)}var Xn=Br(Lt,"Map"),Zn=Br(Object,"create");function z2(){this.__data__=Zn?Zn(null):{},this.size=0}function G2(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var H2="__lodash_hash_undefined__",q2=Object.prototype,W2=q2.hasOwnProperty;function J2(e){var t=this.__data__;if(Zn){var r=t[e];return r===H2?void 0:r}return W2.call(t,e)?t[e]:void 0}var Y2=Object.prototype,K2=Y2.hasOwnProperty;function Q2(e){var t=this.__data__;return Zn?t[e]!==void 0:K2.call(t,e)}var X2="__lodash_hash_undefined__";function Z2(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Zn&&t===void 0?X2:t,this}function Ar(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ar.prototype.clear=z2;Ar.prototype.delete=G2;Ar.prototype.get=J2;Ar.prototype.has=Q2;Ar.prototype.set=Z2;function eI(){this.size=0,this.__data__={hash:new Ar,map:new(Xn||er),string:new Ar}}function tI(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function da(e,t){var r=e.__data__;return tI(t)?r[typeof t=="string"?"string":"hash"]:r.map}function rI(e){var t=da(this,e).delete(e);return this.size-=t?1:0,t}function nI(e){return da(this,e).get(e)}function oI(e){return da(this,e).has(e)}function sI(e,t){var r=da(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function tr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}tr.prototype.clear=eI;tr.prototype.delete=rI;tr.prototype.get=nI;tr.prototype.has=oI;tr.prototype.set=sI;var aI=200;function iI(e,t){var r=this.__data__;if(r instanceof er){var n=r.__data__;if(!Xn||n.length<aI-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new tr(n)}return r.set(e,t),this.size=r.size,this}function Jt(e){var t=this.__data__=new er(e);this.size=t.size}Jt.prototype.clear=L2;Jt.prototype.delete=F2;Jt.prototype.get=$2;Jt.prototype.has=N2;Jt.prototype.set=iI;var lI="__lodash_hash_undefined__";function cI(e){return this.__data__.set(e,lI),this}function uI(e){return this.__data__.has(e)}function Ss(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new tr;++t<r;)this.add(e[t])}Ss.prototype.add=Ss.prototype.push=cI;Ss.prototype.has=uI;function dI(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function hI(e,t){return e.has(t)}var pI=1,fI=2;function Sf(e,t,r,n,o,s){var a=r&pI,i=e.length,l=t.length;if(i!=l&&!(a&&l>i))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=r&fI?new Ss:void 0;for(s.set(e,t),s.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var y=a?n(m,f,d,t,e,s):n(f,m,d,e,t,s);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!dI(t,function(S,R){if(!hI(p,R)&&(f===S||o(f,S,r,n,s)))return p.push(R)})){h=!1;break}}else if(!(f===m||o(f,m,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}var md=Lt.Uint8Array;function mI(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function gI(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var yI=1,bI=2,xI="[object Boolean]",SI="[object Date]",vI="[object Error]",CI="[object Map]",wI="[object Number]",OI="[object RegExp]",TI="[object Set]",EI="[object String]",II="[object Symbol]",AI="[object ArrayBuffer]",RI="[object DataView]",gd=ur?ur.prototype:void 0,ni=gd?gd.valueOf:void 0;function PI(e,t,r,n,o,s,a){switch(r){case RI:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case AI:return!(e.byteLength!=t.byteLength||!s(new md(e),new md(t)));case xI:case SI:case wI:return xf(+e,+t);case vI:return e.name==t.name&&e.message==t.message;case OI:case EI:return e==t+"";case CI:var i=mI;case TI:var l=n&yI;if(i||(i=gI),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=bI,a.set(e,t);var u=Sf(i(e),i(t),n,o,s,a);return a.delete(e),u;case II:if(ni)return ni.call(e)==ni.call(t)}return!1}function MI(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function _I(e,t,r){var n=t(e);return Ut(e)?n:MI(n,r(e))}function VI(e,t){for(var r=-1,n=e==null?0:e.length,o=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[o++]=a)}return s}function kI(){return[]}var jI=Object.prototype,DI=jI.propertyIsEnumerable,yd=Object.getOwnPropertySymbols,BI=yd?function(e){return e==null?[]:(e=Object(e),VI(yd(e),function(t){return DI.call(e,t)}))}:kI;function bd(e){return _I(e,Nl,BI)}var UI=1,LI=Object.prototype,FI=LI.hasOwnProperty;function $I(e,t,r,n,o,s){var a=r&UI,i=bd(e),l=i.length,c=bd(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=i[d];if(!(a?h in t:FI.call(t,h)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var m=!0;s.set(e,t),s.set(t,e);for(var y=a;++d<l;){h=i[d];var S=e[h],R=t[h];if(n)var v=a?n(R,S,h,t,e,s):n(S,R,h,e,t,s);if(!(v===void 0?S===R||o(S,R,r,n,s):v)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var O=e.constructor,I=t.constructor;O!=I&&"constructor"in e&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof I=="function"&&I instanceof I)&&(m=!1)}return s.delete(e),s.delete(t),m}var Mi=Br(Lt,"DataView"),_i=Br(Lt,"Promise"),Vi=Br(Lt,"Set"),ki=Br(Lt,"WeakMap"),xd="[object Map]",NI="[object Object]",Sd="[object Promise]",vd="[object Set]",Cd="[object WeakMap]",wd="[object DataView]",zI=Dr(Mi),GI=Dr(Xn),HI=Dr(_i),qI=Dr(Vi),WI=Dr(ki),sr=jr;(Mi&&sr(new Mi(new ArrayBuffer(1)))!=wd||Xn&&sr(new Xn)!=xd||_i&&sr(_i.resolve())!=Sd||Vi&&sr(new Vi)!=vd||ki&&sr(new ki)!=Cd)&&(sr=function(e){var t=jr(e),r=t==NI?e.constructor:void 0,n=r?Dr(r):"";if(n)switch(n){case zI:return wd;case GI:return xd;case HI:return Sd;case qI:return vd;case WI:return Cd}return t});var JI=1,Od="[object Arguments]",Td="[object Array]",Do="[object Object]",YI=Object.prototype,Ed=YI.hasOwnProperty;function KI(e,t,r,n,o,s){var a=Ut(e),i=Ut(t),l=a?Td:sr(e),c=i?Td:sr(t);l=l==Od?Do:l,c=c==Od?Do:c;var u=l==Do,d=c==Do,h=l==c;if(h&&Pi(e)){if(!Pi(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new Jt),a||yf(e)?Sf(e,t,r,n,o,s):PI(e,t,l,r,n,o,s);if(!(r&JI)){var p=u&&Ed.call(e,"__wrapped__"),f=d&&Ed.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,y=f?t.value():t;return s||(s=new Jt),o(m,y,r,n,s)}}return h?(s||(s=new Jt),$I(e,t,r,n,o,s)):!1}function ha(e,t,r,n,o){return e===t?!0:e==null||t==null||!Er(e)&&!Er(t)?e!==e&&t!==t:KI(e,t,r,n,ha,o)}var QI=1,XI=2;function ZI(e,t,r,n){var o=r.length,s=o;if(e==null)return!s;for(e=Object(e);o--;){var a=r[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<s;){a=r[o];var i=a[0],l=e[i],c=a[1];if(a[2]){if(l===void 0&&!(i in e))return!1}else{var u=new Jt,d;if(!(d===void 0?ha(c,l,QI|XI,n,u):d))return!1}}return!0}function vf(e){return e===e&&!Tr(e)}function eA(e){for(var t=Nl(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,vf(o)]}return t}function Cf(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function tA(e){var t=eA(e);return t.length==1&&t[0][2]?Cf(t[0][0],t[0][1]):function(r){return r===e||ZI(r,e,t)}}var rA=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nA=/^\w*$/;function zl(e,t){if(Ut(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ra(e)?!0:nA.test(e)||!rA.test(e)||t!=null&&e in Object(t)}var oA="Expected a function";function Gl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(oA);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],s=r.cache;if(s.has(o))return s.get(o);var a=e.apply(this,n);return r.cache=s.set(o,a)||s,a};return r.cache=new(Gl.Cache||tr),r}Gl.Cache=tr;var sA=500;function aA(e){var t=Gl(e,function(n){return r.size===sA&&r.clear(),n}),r=t.cache;return t}var iA=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lA=/\\(\\)?/g,cA=aA(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(iA,function(r,n,o,s){t.push(o?s.replace(lA,"$1"):n||r)}),t});function uA(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Id=ur?ur.prototype:void 0,Ad=Id?Id.toString:void 0;function wf(e){if(typeof e=="string")return e;if(Ut(e))return uA(e,wf)+"";if(ra(e))return Ad?Ad.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Of(e){return e==null?"":wf(e)}function Tf(e,t){return Ut(e)?e:zl(e,t)?[e]:cA(Of(e))}function pa(e){if(typeof e=="string"||ra(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Ef(e,t){t=Tf(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[pa(t[r++])];return r&&r==n?e:void 0}function dA(e,t,r){var n=e==null?void 0:Ef(e,t);return n===void 0?r:n}function hA(e,t){return e!=null&&t in Object(e)}function pA(e,t,r){t=Tf(t,e);for(var n=-1,o=t.length,s=!1;++n<o;){var a=pa(t[n]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++n!=o?s:(o=e==null?0:e.length,!!o&&$l(o)&&mf(a,o)&&(Ut(e)||pf(e)))}function fA(e,t){return e!=null&&pA(e,t,hA)}var mA=1,gA=2;function yA(e,t){return zl(e)&&vf(t)?Cf(pa(e),t):function(r){var n=dA(r,e);return n===void 0&&n===t?fA(r,e):ha(t,n,mA|gA)}}function bA(e){return e}function xA(e){return function(t){return t==null?void 0:t[e]}}function SA(e){return function(t){return Ef(t,e)}}function vA(e){return zl(e)?xA(pa(e)):SA(e)}function CA(e){return typeof e=="function"?e:e==null?bA:typeof e=="object"?Ut(e)?yA(e[0],e[1]):tA(e):vA(e)}function wA(e,t){return function(r,n){var o=Ut(r)?_E:M2,s={};return o(r,e,CA(n),s)}}var Bo=wA(function(e,t,r){ME(e,r,t)}),OA=0;function TA(e){var t=++OA;return Of(e)+t}const ji=[{id:"0.1",mm:.1,degrees:.05},{id:"1",mm:1,degrees:.5},{id:"5",mm:5,degrees:2.5},{id:"10",mm:10,degrees:5}],EA=[{id:"continuous"},...ji],IA=["coordsys","tool"];class fa{constructor(t,r,n,o){var s,a;this.jogger=t,this.coordSystems=r,this.motionGroupDescription=n,this.tcps=o,this.selectedTabId="cartesian",this.activationState="inactive",this.activationError=null,this.activationCounter=0,this.locks=new Set,this.blocked=!1,this.selectedCoordSystemId="world",this.selectedTcpId="",this.selectedOrientation="coordsys",this.selectedIncrementId="continuous",this.selectedCartesianMotionType="translate",this.incrementJogInProgress=null,this.translationVelocityMmPerSec=10,this.rotationVelocityDegPerSec=1,this.minTranslationVelocityMmPerSec=5,this.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,this.showCoordSystemSelect=!1,this.showTcpSelect=!0,this.showOrientationSelect=!0,this.showIncrementSelect=!0,this.showTabIcons=!1,this.showVelocitySliderLabel=!0,this.showVelocityLegend=!1,this.showJointsLegend=!1,this.disposers=[];for(const i of r)if(i.coordinate_system===""){i.coordinate_system="world";break}this.selectedCoordSystemId=((s=r[0])==null?void 0:s.coordinate_system)||"world",this.selectedTcpId=((a=o[0])==null?void 0:a.id)||"",Ee.makeAutoObservable(this,{},{autoBind:!0}),this.jogger.onBlocked=()=>{this.block()},this.loadFromLocalStorage(),this.disposers.push(Ee.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[n,o]=await Promise.all([r.api.controller.listCoordinateSystems(t.motionStream.controllerId,"ROTATION_VECTOR"),r.api.motionGroup.getMotionGroupDescription(t.motionStream.controllerId,t.motionGroupId)]),s=Object.entries(o.tcps||{}).map(([a,i])=>({id:a,readable_name:i.name,position:i.pose.position,orientation:i.pose.orientation}));return new fa(t,n||[],o,s)}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return Ui.countBy(this.coordSystems,t=>t.name)}async deactivate(){if(this.jogger.mode==="jogging")return this.jogger.stop()}async activate(){return this.currentTab.id==="cartesian"?((this.jogger.tcp!==this.selectedTcpId||this.jogger.orientation!==this.selectedOrientation)&&this.jogger.setOptions({tcp:this.selectedTcpId,orientation:this.selectedOrientation}),this.activeDiscreteIncrement?this.jogger.setJoggingMode("trajectory"):this.jogger.setJoggingMode("jogging")):this.jogger.setJoggingMode("jogging"),this.jogger}loadFromLocalStorage(){const t=$e.tryParseJson(localStorage.getItem("joggingToolStore"));t&&(this.tabsById[t.selectedTabId]&&(this.selectedTabId=t.selectedTabId),this.coordSystemsById[t.selectedCoordSystemId]&&(this.selectedCoordSystemId=t.selectedCoordSystemId),this.tcpsById[t.selectedTcpId]&&(this.selectedTcpId=t.selectedTcpId),this.incrementOptionsById[t.selectedIncrementId]&&(this.selectedIncrementId=t.selectedIncrementId),["translate","rotate"].includes(t.selectedCartesianMotionType)&&(this.selectedCartesianMotionType=t.selectedCartesianMotionType),["coordsys","tool"].includes(t.selectedOrientation)&&(this.selectedOrientation=t.selectedOrientation))}saveToLocalStorage(){localStorage.setItem("joggingToolStore",JSON.stringify(this.localStorageSave))}get isLocked(){return this.locks.size>0}get localStorageSave(){return{selectedTabId:this.selectedTabId,selectedCoordSystemId:this.selectedCoordSystemId,selectedTcpId:this.selectedTcpId,selectedOrientation:this.selectedOrientation,selectedIncrementId:this.selectedIncrementId,selectedCartesianMotionType:this.selectedCartesianMotionType}}get tabs(){return[{id:"cartesian",label:"cartesian"},{id:"joint",label:"joint"}]}get incrementOptions(){return EA}get discreteIncrementOptions(){return ji}get incrementOptionsById(){return Bo(this.incrementOptions,t=>t.id)}get tabsById(){return Bo(this.tabs,t=>t.id)}get currentTab(){return this.tabsById[this.selectedTabId]||this.tabs[0]}get tabIndex(){return this.tabs.indexOf(this.currentTab)}get coordSystemsById(){return Bo(this.coordSystems,t=>t.coordinate_system)}get selectedCoordSystem(){return this.coordSystemsById[this.selectedCoordSystemId]}get activeCoordSystemId(){return this.selectedOrientation==="tool"?"tool":this.selectedCoordSystemId}get tcpsById(){return Bo(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:ji.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}get velocityInDisplayUnits(){return this.currentMotionType==="translate"?this.translationVelocityMmPerSec:this.rotationVelocityDegPerSec}get minVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.minTranslationVelocityMmPerSec:this.minRotationVelocityDegPerSec}get maxVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.maxTranslationVelocityMmPerSec:this.maxRotationVelocityDegPerSec}get currentMotionType(){return this.selectedTabId==="cartesian"&&this.selectedCartesianMotionType==="translate"?"translate":"rotate"}onTabChange(t,r){const n=this.tabs[r]||this.tabs[0];this.selectedTabId=n.id}setSelectedCoordSystemId(t){this.selectedCoordSystemId=t}setSelectedTcpId(t){this.selectedTcpId=t}setSelectedOrientation(t){this.selectedOrientation=t}setSelectedIncrementId(t){this.selectedIncrementId=t}setCurrentIncrementJog(t){this.incrementJogInProgress=t}setVelocityFromSlider(t){this.currentMotionType==="translate"?this.translationVelocityMmPerSec=t:this.rotationVelocityDegPerSec=t}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}lock(t){this.locks.add(t)}unlock(t){this.locks.delete(t)}block(){this.blocked=!0}unblock(){this.blocked=!1,this.jogger.mode==="jogging"&&this.jogger.initializeJoggingWebsocket()}async withMotionLock(t){const r=TA();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const AA=me.observer(({store:e})=>{const{t}=we.useTranslation();return g.jsx(T.Backdrop,{open:!0,sx:{position:"absolute",zIndex:r=>r.zIndex.drawer+1,color:"#fff",background:"rgba(15, 15, 15, 0.88)",justifyContent:"flex-start",alignItems:"flex-start"},children:g.jsxs(T.Stack,{sx:{m:2,width:"100%"},children:[g.jsxs(T.Alert,{severity:"error",sx:{mb:2},children:[g.jsx(T.AlertTitle,{children:t("Jogging.Blocked.ti")}),t("Jogging.Blocked.lb")]}),g.jsx(T.Button,{variant:"contained",color:"secondary",onClick:()=>e.unblock(),children:t("Jogging.Blocked.Reenable.bt")})]})})}),RA=({title:e,titleId:t,...r},n)=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),PA=j.forwardRef(RA),MA=({title:e,titleId:t,...r},n)=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),_A=j.forwardRef(MA),VA=({title:e,titleId:t,...r},n)=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M9.522 14.811A.899.899 0 1 0 8.25 13.54L6.19 15.601V3.16L8.25 5.221A.9.9 0 0 0 9.522 3.95L5.926.354a.9.9 0 0 0-1.272 0L1.058 3.95a.9.9 0 1 0 1.271 1.271L4.391 3.16v12.442L2.329 13.54a.899.899 0 1 0-1.271 1.271l3.596 3.597a.9.9 0 0 0 1.272 0z",clipRule:"evenodd"})),kA=j.forwardRef(VA),jA=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("path",{d:"M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C11.0583 14.1 12.5083 12.1667 11.475 12.9L12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z",fill:"white"})),DA=j.forwardRef(jA);function BA(e,t){return ha(e,t)}const If=({store:e})=>{const{t}=we.useTranslation(),[r,n]=j.useState(e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached),o=j.useRef(r);ta(()=>{const a=e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached;BA(o.current,a)||(o.current=a,n(a))});const s=[];for(const[a,i]of r.entries())i&&s.push(a);return g.jsx(T.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:s.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:s.map(a=>a+1).join(", ")})})},UA=T.styled(T.FormControl)(({theme:e})=>({"&.MuiFormControl-root":{".MuiSelect-select":{paddingTop:"20px",paddingLeft:"12px"},label:{pointerEvents:"none",fontSize:"16px"},".MuiInputLabel-root":{"&.Mui-focused":{color:e.palette.text.primary}}}}));function Uo({labelValue:e,...t}){return g.jsxs(UA,{fullWidth:!0,variant:"filled",children:[g.jsx(T.InputLabel,{id:t.labelId,children:e}),g.jsx(T.Select,{...t})]})}const LA=me.observer(({store:e})=>{var o;const{t}=we.useTranslation(),r=[];function n(s){switch(s){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return s}}return e.showCoordSystemSelect&&r.push(g.jsx(Uo,{labelId:"jogging-coord-select",labelValue:t("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:s=>e.setSelectedCoordSystemId(s.target.value),disabled:e.isLocked,children:e.coordSystems.map(s=>g.jsx(T.MenuItem,{value:s.coordinate_system,children:s.name&&e.coordSystemCountByName[s.name]>1?`${s.name} / ${s.coordinate_system}`:s.name||s.coordinate_system},s.coordinate_system))},"coord")),e.showTcpSelect&&r.push(g.jsx(Uo,{labelId:"jogging-tcp-select",labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:s=>e.setSelectedTcpId(s.target.value),disabled:e.isLocked,children:e.tcps.map(s=>g.jsx(T.MenuItem,{value:s.id,children:s.id},s.id))},"tcp")),e.showOrientationSelect&&r.push(g.jsx(Uo,{labelValue:t("Jogging.Cartesian.Orientation.lb"),id:"orientation-select",labelId:"orientation-select",value:e.selectedOrientation,onChange:s=>e.setSelectedOrientation(s.target.value),disabled:e.isLocked,children:IA.map(s=>g.jsx(T.MenuItem,{value:s,children:n(s)},s))},"orientation")),e.showIncrementSelect&&r.push(g.jsxs(Uo,{labelValue:t("Jogging.Increment.hlb"),labelId:"jogging-increment-select",size:"small",variant:"filled",value:((o=e.activeDiscreteIncrement)==null?void 0:o.id)||"continuous",onChange:s=>e.setSelectedIncrementId(s.target.value),disabled:e.isLocked,children:[g.jsx(T.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(s=>g.jsx(T.MenuItem,{value:s.id,children:e.currentMotionType==="translate"?`${s.mm}mm`:`${s.degrees}°`},s.id))]},"increment")),g.jsx(T.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:r.map((s,a)=>g.jsx(T.Box,{sx:{gridColumn:r.length%2===1&&a===r.length-1?"span 2":"auto"},children:s},a))})}),FA=T.styled(T.ToggleButtonGroup)(({theme:e})=>{var t;return{"&.MuiToggleButtonGroup-root":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[8],borderRadius:"8px",padding:"4px",gap:"4px",button:{border:"none",borderRadius:"4px",flex:"1 1 0px",minWidth:0,"&.MuiToggleButtonGroup-firstButton":{borderRadius:"8px 4px 4px 8px"},"&.MuiToggleButtonGroup-lastButton":{borderRadius:"4px 8px 8px 4px"}}}}});function Rd(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function $A(e){return typeof e=="string"}function NA(e,t,r){return e===void 0||$A(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function Ko(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function Pd(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function zA(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:s}=e;if(!t){const p=Et(r==null?void 0:r.className,s,o==null?void 0:o.className,n==null?void 0:n.className),f={...r==null?void 0:r.style,...o==null?void 0:o.style,...n==null?void 0:n.style},m={...r,...o,...n};return p.length>0&&(m.className=p),Object.keys(f).length>0&&(m.style=f),{props:m,internalRef:void 0}}const a=Ko({...o,...n}),i=Pd(n),l=Pd(o),c=t(a),u=Et(c==null?void 0:c.className,r==null?void 0:r.className,s,o==null?void 0:o.className,n==null?void 0:n.className),d={...c==null?void 0:c.style,...r==null?void 0:r.style,...o==null?void 0:o.style,...n==null?void 0:n.style},h={...c,...r,...l,...i};return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}}function GA(e,t,r){return typeof e=="function"?e(t,r):e}function or(e){var d;const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:o=!1,...s}=e,a=o?{}:GA(r,n),{props:i,internalRef:l}=zA({...s,externalSlotProps:a}),c=Ds(l,a==null?void 0:a.ref,(d=e.additionalProps)==null?void 0:d.ref);return NA(t,{...i,ref:c},n)}function Md(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
152
- `))}return!1}const HA={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function qA(e,t,r=(n,o)=>n===o){return e.length===t.length&&e.every((n,o)=>r(n,t[o]))}const WA=2;function Yr(e,t,r,n,o){return r===1?Math.min(e+t,o):Math.max(e-t,n)}function Af(e,t){return e-t}function _d(e,t){const{index:r}=e.reduce((n,o,s)=>{const a=Math.abs(t-o);return n===null||a<n.distance||a===n.distance?{distance:a,index:s}:n},null)??{};return r}function Lo(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const o=r.changedTouches[n];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function vs(e,t,r){return(e-t)*100/(r-t)}function JA(e,t,r){return(r-t)*e+t}function YA(e){if(Math.abs(e)<1){const r=e.toExponential().split("e-"),n=r[0].split(".")[1];return(n?n.length:0)+parseInt(r[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function KA(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(YA(t)))}function Vd({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(Af)}function Fo({sliderRef:e,activeIndex:t,setActive:r}){var o,s,a;const n=Un(e.current);(!((o=e.current)!=null&&o.contains(n.activeElement))||Number((s=n==null?void 0:n.activeElement)==null?void 0:s.getAttribute("data-index"))!==t)&&((a=e.current)==null||a.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function $o(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?qA(e,t):!1}const QA={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},XA=e=>e;let No;function kd(){return No===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?No=CSS.supports("touch-action","none"):No=!0),No}function ZA(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:o=!1,isRtl:s=!1,marks:a=!1,max:i=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:p,scale:f=XA,step:m=1,shiftStep:y=10,tabIndex:S,value:R}=e,v=V.useRef(void 0),[O,I]=V.useState(-1),[E,w]=V.useState(-1),[P,k]=V.useState(!1),b=V.useRef(0),A=V.useRef(null),[_,M]=GC({controlled:R,default:r??l,name:"Slider"}),D=u&&((Z,re,ie)=>{const fe=Z.nativeEvent||Z,Ie=new fe.constructor(fe.type,fe);Object.defineProperty(Ie,"target",{writable:!0,value:{value:re,name:c}}),A.current=re,u(Ie,re,ie)}),ne=Array.isArray(_);let Q=ne?_.slice().sort(Af):[_];Q=Q.map(Z=>Z==null?l:Kr(Z,l,i));const oe=a===!0&&m!==null?[...Array(Math.floor((i-l)/m)+1)].map((Z,re)=>({value:l+m*re})):a||[],X=oe.map(Z=>Z.value),[se,F]=V.useState(-1),ee=V.useRef(null),ce=Ds(p,ee),be=Z=>re=>{var fe;const ie=Number(re.currentTarget.getAttribute("data-index"));Md(re.target)&&F(ie),w(ie),(fe=Z==null?void 0:Z.onFocus)==null||fe.call(Z,re)},_e=Z=>re=>{var ie;Md(re.target)||F(-1),w(-1),(ie=Z==null?void 0:Z.onBlur)==null||ie.call(Z,re)},xe=(Z,re)=>{const ie=Number(Z.currentTarget.getAttribute("data-index")),fe=Q[ie],Ie=X.indexOf(fe);let le=re;if(oe&&m==null){const He=X[X.length-1];le>=He?le=He:le<=X[0]?le=X[0]:le=le<fe?X[Ie-1]:X[Ie+1]}if(le=Kr(le,l,i),ne){o&&(le=Kr(le,Q[ie-1]||-1/0,Q[ie+1]||1/0));const He=le;le=Vd({values:Q,newValue:le,index:ie});let Xe=ie;o||(Xe=le.indexOf(He)),Fo({sliderRef:ee,activeIndex:Xe})}M(le),F(ie),D&&!$o(le,_)&&D(Z,le,ie),d&&d(Z,A.current??le)},ut=Z=>re=>{var ie;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(re.key)){re.preventDefault();const fe=Number(re.currentTarget.getAttribute("data-index")),Ie=Q[fe];let le=null;if(m!=null){const He=re.shiftKey?y:m;switch(re.key){case"ArrowUp":le=Yr(Ie,He,1,l,i);break;case"ArrowRight":le=Yr(Ie,He,s?-1:1,l,i);break;case"ArrowDown":le=Yr(Ie,He,-1,l,i);break;case"ArrowLeft":le=Yr(Ie,He,s?1:-1,l,i);break;case"PageUp":le=Yr(Ie,y,1,l,i);break;case"PageDown":le=Yr(Ie,y,-1,l,i);break;case"Home":le=l;break;case"End":le=i;break}}else if(oe){const He=X[X.length-1],Xe=X.indexOf(Ie),Le=[s?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],mt=[s?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Le.includes(re.key)?Xe===0?le=X[0]:le=X[Xe-1]:mt.includes(re.key)&&(Xe===X.length-1?le=He:le=X[Xe+1])}le!=null&&xe(re,le)}(ie=Z==null?void 0:Z.onKeyDown)==null||ie.call(Z,re)};Bt(()=>{var Z;n&&ee.current.contains(document.activeElement)&&((Z=document.activeElement)==null||Z.blur())},[n]),n&&O!==-1&&I(-1),n&&se!==-1&&F(-1);const nt=Z=>re=>{var ie;(ie=Z.onChange)==null||ie.call(Z,re),xe(re,re.target.valueAsNumber)},Se=V.useRef(void 0);let te=h;s&&h==="horizontal"&&(te+="-reverse");const ae=({finger:Z,move:re=!1})=>{const{current:ie}=ee,{width:fe,height:Ie,bottom:le,left:He}=ie.getBoundingClientRect();let Xe;te.startsWith("vertical")?Xe=(le-Z.y)/Ie:Xe=(Z.x-He)/fe,te.includes("-reverse")&&(Xe=1-Xe);let Le;if(Le=JA(Xe,l,i),m)Le=KA(Le,m,l);else{const xn=_d(X,Le);Le=X[xn]}Le=Kr(Le,l,i);let mt=0;if(ne){re?mt=Se.current:mt=_d(Q,Le),o&&(Le=Kr(Le,Q[mt-1]||-1/0,Q[mt+1]||1/0));const xn=Le;Le=Vd({values:Q,newValue:Le,index:mt}),o&&re||(mt=Le.indexOf(xn),Se.current=mt)}return{newValue:Le,activeIndex:mt}},ue=Wt(Z=>{const re=Lo(Z,v);if(!re)return;if(b.current+=1,Z.type==="mousemove"&&Z.buttons===0){Y(Z);return}const{newValue:ie,activeIndex:fe}=ae({finger:re,move:!0});Fo({sliderRef:ee,activeIndex:fe,setActive:I}),M(ie),!P&&b.current>WA&&k(!0),D&&!$o(ie,_)&&D(Z,ie,fe)}),Y=Wt(Z=>{const re=Lo(Z,v);if(k(!1),!re)return;const{newValue:ie}=ae({finger:re,move:!0});I(-1),Z.type==="touchend"&&w(-1),d&&d(Z,A.current??ie),v.current=void 0,pe()}),ve=Wt(Z=>{if(n)return;kd()||Z.preventDefault();const re=Z.changedTouches[0];re!=null&&(v.current=re.identifier);const ie=Lo(Z,v);if(ie!==!1){const{newValue:Ie,activeIndex:le}=ae({finger:ie});Fo({sliderRef:ee,activeIndex:le,setActive:I}),M(Ie),D&&!$o(Ie,_)&&D(Z,Ie,le)}b.current=0;const fe=Un(ee.current);fe.addEventListener("touchmove",ue,{passive:!0}),fe.addEventListener("touchend",Y,{passive:!0})}),pe=V.useCallback(()=>{const Z=Un(ee.current);Z.removeEventListener("mousemove",ue),Z.removeEventListener("mouseup",Y),Z.removeEventListener("touchmove",ue),Z.removeEventListener("touchend",Y)},[Y,ue]);V.useEffect(()=>{const{current:Z}=ee;return Z.addEventListener("touchstart",ve,{passive:kd()}),()=>{Z.removeEventListener("touchstart",ve),pe()}},[pe,ve]),V.useEffect(()=>{n&&pe()},[n,pe]);const We=Z=>re=>{var Ie;if((Ie=Z.onMouseDown)==null||Ie.call(Z,re),n||re.defaultPrevented||re.button!==0)return;re.preventDefault();const ie=Lo(re,v);if(ie!==!1){const{newValue:le,activeIndex:He}=ae({finger:ie});Fo({sliderRef:ee,activeIndex:He,setActive:I}),M(le),D&&!$o(le,_)&&D(re,le,He)}b.current=0;const fe=Un(ee.current);fe.addEventListener("mousemove",ue,{passive:!0}),fe.addEventListener("mouseup",Y)},Ge=vs(ne?Q[0]:l,l,i),Ve=vs(Q[Q.length-1],l,i)-Ge,rr=(Z={})=>{const re=Ko(Z),ie={onMouseDown:We(re||{})},fe={...re,...ie};return{...Z,ref:ce,...fe}},fo=Z=>re=>{var fe;(fe=Z.onMouseOver)==null||fe.call(Z,re);const ie=Number(re.currentTarget.getAttribute("data-index"));w(ie)},mo=Z=>re=>{var ie;(ie=Z.onMouseLeave)==null||ie.call(Z,re),w(-1)},go=(Z={})=>{const re=Ko(Z),ie={onMouseOver:fo(re||{}),onMouseLeave:mo(re||{})};return{...Z,...re,...ie}},yo=Z=>({pointerEvents:O!==-1&&O!==Z?"none":void 0});let Ur;return h==="vertical"&&(Ur=s?"vertical-rl":"vertical-lr"),{active:O,axis:te,axisProps:QA,dragging:P,focusedThumbIndex:se,getHiddenInputProps:(Z={})=>{const re=Ko(Z),ie={onChange:nt(re||{}),onFocus:be(re||{}),onBlur:_e(re||{}),onKeyDown:ut(re||{})},fe={...re,...ie};return{tabIndex:S,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":f(i),"aria-valuemin":f(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:n,...Z,...fe,style:{...HA,direction:s?"rtl":"ltr",width:"100%",height:"100%",writingMode:Ur}}},getRootProps:rr,getThumbProps:go,marks:oe,open:E,range:ne,rootRef:ce,trackLeap:Ve,trackOffset:Ge,values:Q,getThumbStyle:yo}}function Qo(e){return typeof e=="string"}const eR=e=>!e||!Qo(e);function tR(e){return typeof e.main=="string"}function rR(e,t=[]){if(!tR(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Hl(e=[]){return([,t])=>t&&rR(t,e)}function nR(e){return pn("MuiSlider",e)}const St=Ni("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),oR=e=>{const{open:t}=e;return{offset:Et(t&&St.valueLabelOpen),circle:St.valueLabelCircle,label:St.valueLabelLabel}};function Rf(e){const{children:t,className:r,value:n}=e,o=oR(e);return t?V.cloneElement(t,{className:t.props.className},g.jsxs(V.Fragment,{children:[t.props.children,g.jsx("span",{className:Et(o.offset,r),"aria-hidden":!0,children:g.jsx("span",{className:o.circle,children:g.jsx("span",{className:o.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(Rf.propTypes={children:x.element.isRequired,className:x.string,value:x.node});function jd(e){return e}const sR=ft("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${tt(r.color)}`],r.size!=="medium"&&t[`size${tt(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(kr(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${St.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${St.dragging}`]:{[`& .${St.thumb}, & .${St.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Hl()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),aR=ft("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),iR=ft("span",{name:"MuiSlider",slot:"Track"})(kr(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(Hl()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:Nn(e.palette[t].main,.62),borderColor:Nn(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:$n(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:$n(e.palette[t].main,.5)})}}}))]}))),lR=ft("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${tt(r.color)}`],r.size!=="medium"&&t[`thumbSize${tt(r.size)}`]]}})(kr(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${St.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(Hl()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${St.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${ii(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${St.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${ii(e.palette[t].main,.16)}`}}}}))]}))),Pf=ft(Rf,{name:"MuiSlider",slot:"ValueLabel"})(kr(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${St.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${St.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})));process.env.NODE_ENV!=="production"&&(Pf.propTypes={children:x.element.isRequired,index:x.number.isRequired,open:x.bool.isRequired,value:x.node});const cR=ft("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>qi(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(kr(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),uR=ft("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>qi(e)&&e!=="markLabelActive"})(kr(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),dR=e=>{const{disabled:t,dragging:r,marked:n,orientation:o,track:s,classes:a,color:i,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",o==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",i&&`color${tt(i)}`,l&&`size${tt(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${tt(l)}`,i&&`thumbColor${tt(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return ws(c,nR,a)},hR=({children:e})=>e,Mf=V.forwardRef(function(t,r){const n=Vl({props:t,name:"MuiSlider"}),o=ey(),{"aria-label":s,"aria-valuetext":a,"aria-labelledby":i,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:p,disableSwap:f=!1,disabled:m=!1,getAriaLabel:y,getAriaValueText:S,marks:R=!1,max:v=100,min:O=0,name:I,onChange:E,onChangeCommitted:w,orientation:P="horizontal",shiftStep:k=10,size:b="medium",step:A=1,scale:_=jd,slotProps:M,slots:D,tabIndex:ne,track:Q="normal",value:oe,valueLabelDisplay:X="off",valueLabelFormat:se=jd,...F}=n,ee={...n,isRtl:o,max:v,min:O,classes:h,disabled:m,disableSwap:f,orientation:P,marks:R,color:d,size:b,step:A,shiftStep:k,scale:_,track:Q,valueLabelDisplay:X,valueLabelFormat:se},{axisProps:ce,getRootProps:be,getHiddenInputProps:_e,getThumbProps:xe,open:ut,active:nt,axis:Se,focusedThumbIndex:te,range:ae,dragging:ue,marks:Y,values:ve,trackOffset:pe,trackLeap:We,getThumbStyle:Ge}=ZA({...ee,rootRef:r});ee.marked=Y.length>0&&Y.some(Be=>Be.label),ee.dragging=ue,ee.focusedThumbIndex=te;const Ve=dR(ee),rr=(D==null?void 0:D.root)??c.Root??sR,fo=(D==null?void 0:D.rail)??c.Rail??aR,mo=(D==null?void 0:D.track)??c.Track??iR,go=(D==null?void 0:D.thumb)??c.Thumb??lR,yo=(D==null?void 0:D.valueLabel)??c.ValueLabel??Pf,Ur=(D==null?void 0:D.mark)??c.Mark??cR,bo=(D==null?void 0:D.markLabel)??c.MarkLabel??uR,Z=(D==null?void 0:D.input)??c.Input??"input",re=(M==null?void 0:M.root)??u.root,ie=(M==null?void 0:M.rail)??u.rail,fe=(M==null?void 0:M.track)??u.track,Ie=(M==null?void 0:M.thumb)??u.thumb,le=(M==null?void 0:M.valueLabel)??u.valueLabel,He=(M==null?void 0:M.mark)??u.mark,Xe=(M==null?void 0:M.markLabel)??u.markLabel,Le=(M==null?void 0:M.input)??u.input,mt=or({elementType:rr,getSlotProps:be,externalSlotProps:re,externalForwardedProps:F,additionalProps:{...eR(rr)&&{as:l}},ownerState:{...ee,...re==null?void 0:re.ownerState},className:[Ve.root,p]}),xn=or({elementType:fo,externalSlotProps:ie,ownerState:ee,className:Ve.rail}),Hf=or({elementType:mo,externalSlotProps:fe,additionalProps:{style:{...ce[Se].offset(pe),...ce[Se].leap(We)}},ownerState:{...ee,...fe==null?void 0:fe.ownerState},className:Ve.track}),ma=or({elementType:go,getSlotProps:xe,externalSlotProps:Ie,ownerState:{...ee,...Ie==null?void 0:Ie.ownerState},className:Ve.thumb}),qf=or({elementType:yo,externalSlotProps:le,ownerState:{...ee,...le==null?void 0:le.ownerState},className:Ve.valueLabel}),ga=or({elementType:Ur,externalSlotProps:He,ownerState:ee,className:Ve.mark}),ya=or({elementType:bo,externalSlotProps:Xe,ownerState:ee,className:Ve.markLabel}),Wf=or({elementType:Z,getSlotProps:_e,externalSlotProps:Le,ownerState:ee});return g.jsxs(rr,{...mt,children:[g.jsx(fo,{...xn}),g.jsx(mo,{...Hf}),Y.filter(Be=>Be.value>=O&&Be.value<=v).map((Be,Je)=>{const ba=vs(Be.value,O,v),xo=ce[Se].offset(ba);let Ft;return Q===!1?Ft=ve.includes(Be.value):Ft=Q==="normal"&&(ae?Be.value>=ve[0]&&Be.value<=ve[ve.length-1]:Be.value<=ve[0])||Q==="inverted"&&(ae?Be.value<=ve[0]||Be.value>=ve[ve.length-1]:Be.value>=ve[0]),g.jsxs(V.Fragment,{children:[g.jsx(Ur,{"data-index":Je,...ga,...!Qo(Ur)&&{markActive:Ft},style:{...xo,...ga.style},className:Et(ga.className,Ft&&Ve.markActive)}),Be.label!=null?g.jsx(bo,{"aria-hidden":!0,"data-index":Je,...ya,...!Qo(bo)&&{markLabelActive:Ft},style:{...xo,...ya.style},className:Et(Ve.markLabel,ya.className,Ft&&Ve.markLabelActive),children:Be.label}):null]},Je)}),ve.map((Be,Je)=>{const ba=vs(Be,O,v),xo=ce[Se].offset(ba),Ft=X==="off"?hR:yo;return g.jsx(Ft,{...!Qo(Ft)&&{valueLabelFormat:se,valueLabelDisplay:X,value:typeof se=="function"?se(_(Be),Je):se,index:Je,open:ut===Je||nt===Je||X==="on",disabled:m},...qf,children:g.jsx(go,{"data-index":Je,...ma,className:Et(Ve.thumb,ma.className,nt===Je&&Ve.active,te===Je&&Ve.focusVisible),style:{...xo,...Ge(Je),...ma.style},children:g.jsx(Z,{"data-index":Je,"aria-label":y?y(Je):s,"aria-valuenow":_(Be),"aria-labelledby":i,"aria-valuetext":S?S(_(Be),Je):a,value:ve[Je],...Wf})})},Je)})]})});process.env.NODE_ENV!=="production"&&(Mf.propTypes={"aria-label":Rd(x.string,e=>Array.isArray(e.value||e.defaultValue)&&e["aria-label"]!=null?new Error("MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider."):null),"aria-labelledby":x.string,"aria-valuetext":Rd(x.string,e=>Array.isArray(e.value||e.defaultValue)&&e["aria-valuetext"]!=null?new Error("MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider."):null),children:x.node,classes:x.object,className:x.string,color:x.oneOfType([x.oneOf(["primary","secondary","error","info","success","warning"]),x.string]),components:x.shape({Input:x.elementType,Mark:x.elementType,MarkLabel:x.elementType,Rail:x.elementType,Root:x.elementType,Thumb:x.elementType,Track:x.elementType,ValueLabel:x.elementType}),componentsProps:x.shape({input:x.oneOfType([x.func,x.object]),mark:x.oneOfType([x.func,x.object]),markLabel:x.oneOfType([x.func,x.object]),rail:x.oneOfType([x.func,x.object]),root:x.oneOfType([x.func,x.object]),thumb:x.oneOfType([x.func,x.object]),track:x.oneOfType([x.func,x.object]),valueLabel:x.oneOfType([x.func,x.shape({children:x.element,className:x.string,open:x.bool,style:x.object,value:x.node,valueLabelDisplay:x.oneOf(["auto","off","on"])})])}),defaultValue:x.oneOfType([x.arrayOf(x.number),x.number]),disabled:x.bool,disableSwap:x.bool,getAriaLabel:x.func,getAriaValueText:x.func,marks:x.oneOfType([x.arrayOf(x.shape({label:x.node,value:x.number.isRequired})),x.bool]),max:x.number,min:x.number,name:x.string,onChange:x.func,onChangeCommitted:x.func,orientation:x.oneOf(["horizontal","vertical"]),scale:x.func,shiftStep:x.number,size:x.oneOfType([x.oneOf(["small","medium"]),x.string]),slotProps:x.shape({input:x.oneOfType([x.func,x.object]),mark:x.oneOfType([x.func,x.object]),markLabel:x.oneOfType([x.func,x.object]),rail:x.oneOfType([x.func,x.object]),root:x.oneOfType([x.func,x.object]),thumb:x.oneOfType([x.func,x.object]),track:x.oneOfType([x.func,x.object]),valueLabel:x.oneOfType([x.func,x.shape({children:x.element,className:x.string,open:x.bool,style:x.object,value:x.node,valueLabelDisplay:x.oneOf(["auto","off","on"])})])}),slots:x.shape({input:x.elementType,mark:x.elementType,markLabel:x.elementType,rail:x.elementType,root:x.elementType,thumb:x.elementType,track:x.elementType,valueLabel:x.elementType}),step:x.number,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),tabIndex:x.number,track:x.oneOf(["inverted","normal",!1]),value:x.oneOfType([x.arrayOf(x.number),x.number]),valueLabelDisplay:x.oneOf(["auto","off","on"]),valueLabelFormat:x.oneOfType([x.func,x.string])});var pR="[object Number]";function fR(e){return typeof e=="number"||Er(e)&&jr(e)==pR}const _f=me.observer(e=>{var s,a,i;const t=T.useTheme(),{store:r}=e,{t:n}=we.useTranslation();function o(l,c){c===e.velocity||!fR(c)||e.onVelocityChange(c)}return g.jsxs(T.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&g.jsx(T.Typography,{sx:{color:(i=(a=(s=t.componentsExt)==null?void 0:s.JoggingPanel)==null?void 0:a.VelocitySlider)==null?void 0:i.sliderLegendColor,fontSize:"14px"},children:n("Jogging.Velocity.bt")}),g.jsx(Mf,{value:e.velocity,color:"secondary",onChange:o,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),r.showVelocitySliderLabel&&(e.renderValue?e.renderValue(e.velocity):g.jsx(ql,{value:e.velocity.toString()}))]})});function ql({value:e,sx:t}){var n;const r=T.useTheme();return g.jsx(T.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(n=r.palette.backgroundPaperElevation)==null?void 0:n[8],borderRadius:"10px",minWidth:"111px",...t},children:g.jsx(T.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Vf=me.observer(({store:e})=>{const{t}=we.useTranslation(),r=me.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?n=>`v = ${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:n})}`:n=>`ω = ${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:n})}`}}));return g.jsx(_f,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>g.jsx(ql,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),mR=me.observer(({store:e,children:t})=>{const{t:r}=we.useTranslation(),n=T.useTheme();function o(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}Mp(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/controllers/${e.jogger.motionStream.controllerId}/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}`))},{fireImmediately:!0});async function s(h,p){const f=await e.activate(),m=f.motionStream.rapidlyChangingMotionState.tcp_pose,y=f.motionStream.rapidlyChangingMotionState.joint_position;m&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:m,currentJoints:y,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:h.axis,direction:h.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:p.mm}:{type:"rotate",distanceRads:$e.degreesToRadians(p.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function a(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return s(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.translateTCP({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.rotateTCP({axis:h.axis,direction:h.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function i(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function l(h,p,f){var y,S,R;const m=(R=(S=(y=f.componentsExt)==null?void 0:y.JoggingPanel)==null?void 0:S.JoggingCartesian)==null?void 0:R.Axis;if(m)return p==="translate"?m[h]:m.CustomRotation??m[h]}const c=[{id:"x",icon:g.jsx(PA,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:g.jsx(_A,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:g.jsx(kA,{}),colors:l("Z",e.selectedCartesianMotionType,n)}];function u(h){return r("General.mm.variable",{amount:h.toFixed(1)})}function d(h){return r("General.degree.variable",{amount:$e.radiansToDegrees(h).toFixed(1)})}return g.jsxs(T.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxs(T.Stack,{gap:2,children:[g.jsx(LA,{store:e}),g.jsx(Vf,{store:e}),g.jsx(T.Divider,{})]}),g.jsx(T.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxs(T.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxs(FA,{value:e.selectedCartesianMotionType,onChange:o,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsx(T.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),g.jsx(T.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,f;return g.jsx(Ci,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[h.icon,g.jsx(T.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,y;return u(((y=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.position)==null?void 0:y[$e.XYZ_TO_VECTOR[h.id]])||0)},startJogging:m=>a({axis:h.id,motionType:"translate",direction:m}),stopJogging:i},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var p,f;return g.jsx(Ci,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[g.jsx(DA,{}),g.jsx(T.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,y;return d(((y=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.orientation)==null?void 0:y[$e.XYZ_TO_VECTOR[h.id]])||0)},startJogging:m=>a({axis:h.id,motionType:"rotate",direction:m}),stopJogging:i},h.id)})]})}),g.jsx(If,{store:e}),t&&g.jsx(T.Divider,{}),t]})}),gR=me.observer(({store:e,children:t})=>{const r=T.useTheme();async function n(s){await e.activate(),await e.jogger.rotateJoints({joint:s.joint,direction:s.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function o(){await e.jogger.stop(),await e.deactivate()}return g.jsxs(T.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsx(Vf,{store:e}),g.jsx(T.Divider,{}),g.jsx(T.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:g.jsx(T.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(s=>{var c,u,d;const a=(d=(u=(c=e.motionGroupDescription.operation_limits.auto_limits)==null?void 0:c.joints)==null?void 0:u[s.index])==null?void 0:d.position,i=(a==null?void 0:a.lower_limit)!==void 0?$e.radiansToDegrees(a.lower_limit):void 0,l=(a==null?void 0:a.upper_limit)!==void 0?$e.radiansToDegrees(a.upper_limit):void 0;return g.jsxs(T.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsx(T.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${s.index+1}`}),g.jsx(kp,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const h=e.jogger.motionStream.rapidlyChangingMotionState.joint_position[s.index];return h!==void 0?$e.radiansToDegrees(h):void 0},startJogging:h=>n({joint:s.index,direction:h}),stopJogging:o})]},`joint-${s.index}`)})})}),g.jsx(If,{store:e}),t&&g.jsx(T.Divider,{}),t]})}),yR=Ue(me.observer(e=>{const t=Ui.isString(e.nova)?new cE({instanceUrl:e.nova}):e.nova,r=me.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){Ee.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let o=e.store;if(!o){const s=await ca.open(t,e.motionGroupId);o=await fa.loadFor(s)}Ee.runInAction(()=>{r.joggingStore=o}),e.onSetup&&e.onSetup(o)}catch(o){r.loadingError=o}}return j.useEffect(()=>(n(),e.store?()=>null:()=>{var o;(o=r.joggingStore)==null||o.dispose()}),[e.store,e.nova,e.motionGroupId]),j.useEffect(()=>{const o=r.joggingStore;o&&(e.locked?o.lock("external"):o.unlock("external"))},[r.joggingStore,e.locked]),g.jsx(T.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?g.jsx(bR,{store:r.joggingStore,children:e.children}):g.jsx(Fl,{message:"Loading jogging",error:r.loadingError})})})),bR=me.observer(({store:e,children:t})=>{const{t:r}=we.useTranslation();function n(){if(e.currentTab.id==="cartesian")return g.jsx(g.Fragment,{children:g.jsx(mR,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsx(g.Fragment,{children:g.jsx(gR,{store:e,children:t})})}return g.jsxs(T.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsx(T.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(o=>{const s=o.label==="cartesian"?r("Jogging.Cartesian.bt"):r("Jogging.Joints.bt"),a=o.label==="cartesian"?g.jsx(ww,{fontSize:"small",sx:{mr:1}}):g.jsx(Ow,{fontSize:"small",sx:{mr:1}});return g.jsx(T.Tab,{label:e.showTabIcons?g.jsxs(T.Stack,{direction:"row",alignItems:"center",children:[a,s]}):s,id:`jogging-tab-${o.id}`,"aria-controls":`jogging-tab-${o.id}`},o.id)})}),g.jsx(T.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()}),e.blocked&&g.jsx(AA,{store:e})]})}),kf=e=>{var i;const{value:t,ref:r}=e,n=T.useTheme(),[o,s]=j.useState(!1);async function a(){if(!r||!("current"in r))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),s(!0),!0}catch(l){console.error(l);const c=window.getSelection();if(c&&r&&"current"in r&&r.current){const u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}}return!1}return j.useEffect(()=>{if(!o)return;const l=setTimeout(()=>s(!1),3e3);return()=>{l&&clearTimeout(l)}},[o]),g.jsx(T.Tooltip,{open:o,title:"Copied!",children:g.jsx(T.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(i=n.palette.backgroundPaperElevation)==null?void 0:i[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>a(),children:g.jsx(T.Typography,{ref:r,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:n.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:t})})})},xR=Ue(me.observer(({tcpPose:e,showCopyButton:t=!1})=>{const[r,n]=j.useState(null),o=uE(e),s=async()=>{try{await navigator.clipboard.writeText(o),n("Copied!"),setTimeout(()=>n(null),2e3)}catch{n("Copy failed"),setTimeout(()=>n(null),2e3)}};return g.jsxs(T.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-cartesian-values",children:[g.jsx(kf,{value:o}),t&&g.jsx(T.Button,{variant:"contained",color:"secondary",size:"small",onClick:s,sx:{flexShrink:0},children:r||"Copy"})]})})),SR=Ue(me.observer(({joints:e,showCopyButton:t=!1})=>{const[r,n]=j.useState(null),o=`[${e.map(a=>parseFloat(a.toFixed(4))).join(", ")}]`,s=async()=>{try{await navigator.clipboard.writeText(o),n("Copied!"),setTimeout(()=>n(null),2e3)}catch{n("Copy failed"),setTimeout(()=>n(null),2e3)}};return g.jsxs(T.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-joint-values",children:[g.jsx(kf,{value:o}),t&&g.jsx(T.Button,{variant:"contained",color:"secondary",size:"small",onClick:s,sx:{flexShrink:0},children:r||"Copy"})]})}));class jf{constructor(){this.messages=[],this.addMessage=(t,r="info")=>{const n={id:Math.random().toString(36).substring(2,11),timestamp:new Date,message:t,level:r};this.messages.push(n)},this.clearMessages=()=>{this.messages=[]},this.addInfo=t=>{this.addMessage(t,"info")},this.addWarning=t=>{this.addMessage(t,"warning")},this.addError=t=>{this.addMessage(t,"error")},this.addDebug=t=>{this.addMessage(t,"debug")},Ee.makeObservable(this,{messages:Ee.observable,addMessage:Ee.action,clearMessages:Ee.action})}}const po=(e,t,r)=>({id:r||`${Date.now()}-${Math.random().toString(36).substring(2,11)}`,timestamp:new Date,message:e,level:t}),vR=(e,t)=>po(e,"debug",t),CR=(e,t)=>po(e,"info",t),wR=(e,t)=>po(e,"warning",t),OR=(e,t)=>po(e,"error",t),Df=Ue(me.observer(e=>{var u;const{messages:t=[],onClear:r,height:n=400,sx:o}=e,s=T.useTheme(),a=j.useRef(null);j.useEffect(()=>{if(t.length===0)return;const d=a.current;if(!d)return;const h=setTimeout(()=>{d.scrollTop=d.scrollHeight},10);return()=>clearTimeout(h)},[t.length]);const i=d=>d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),l=d=>{switch(d){case"error":return s.palette.error.main;case"warning":return s.palette.warning.main;case"info":return s.palette.info.main;case"debug":return s.palette.text.disabled;default:return s.palette.text.secondary}},c=({message:d})=>{const[h,p]=j.useState(!1),[f,m]=j.useState(!1),[y,S]=j.useState(!1),R=d.message.length>150,v=async()=>{try{await navigator.clipboard.writeText(d.message),m(!0),setTimeout(()=>m(!1),2e3)}catch(I){console.error("Failed to copy message:",I)}},O=R&&!h?d.message.substring(0,150)+"...":d.message;return g.jsx(T.Box,{onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:s.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:g.jsxs(T.Box,{sx:{display:"flex",gap:1},children:[g.jsxs(T.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:s.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",i(d.timestamp),"]"]}),g.jsx(T.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:l(d.level),wordBreak:"break-word",overflowWrap:"anywhere",hyphens:"auto",flex:1,whiteSpace:"pre-wrap"},children:O}),g.jsxs(T.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:y?1:0,transition:"opacity 0.2s ease-in-out",visibility:y?"visible":"hidden"},children:[g.jsx(T.IconButton,{size:"small",onClick:v,sx:{padding:"2px",color:s.palette.text.secondary,"&:hover":{backgroundColor:s.palette.action.hover}},title:f?"Copied!":"Copy message",children:g.jsx(Gt.ContentCopy,{sx:{fontSize:12}})}),R&&g.jsx(T.IconButton,{size:"small",onClick:()=>p(!h),sx:{padding:"2px",color:s.palette.text.secondary,"&:hover":{backgroundColor:s.palette.action.hover}},title:h?"Collapse":"Expand",children:h?g.jsx(Gt.ExpandLess,{sx:{fontSize:12}}):g.jsx(Gt.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return g.jsxs(T.Paper,{sx:{backgroundColor:((u=s.palette.backgroundPaperElevation)==null?void 0:u[2])||"#171927",backgroundImage:"none",height:n,display:"flex",flexDirection:"column",overflow:"hidden",...o},children:[g.jsxs(T.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[g.jsxs(T.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(Gt.DescriptionOutlined,{sx:{fontSize:16,color:s.palette.action.active,opacity:.56}}),g.jsx(T.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:s.palette.text.primary},children:"Log"})]}),g.jsx(T.Button,{onClick:r,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:s.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:s.palette.primary.main+"14"}},children:"Clear"})]}),g.jsx(T.Box,{ref:a,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${s.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:s.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:s.palette.divider}}},children:t.length===0?g.jsx(T.Typography,{sx:{color:s.palette.text.disabled,fontSize:"12px",fontStyle:"italic",textAlign:"center",marginTop:2},children:"No log messages"}):t.map(d=>g.jsx(c,{message:d},d.id))})]})})),TR=Ue(me.observer(e=>{const{store:t,onStoreReady:r,...n}=e,o=j.useRef(r);j.useEffect(()=>{o.current=r},[r]);const s=j.useMemo(()=>{var l;const i=t||new jf;return(l=o.current)==null||l.call(o,i),i},[t]),a=()=>{s.clearMessages()};return g.jsx(Df,{...n,messages:s.messages,onClear:a})}));function ER(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function IR({baseUrl:e=ER(),...t}){return g.jsxs(T.Dialog,{"aria-labelledby":"no-motion-group-modal-title",open:!0,fullWidth:!0,sx:{"& .MuiModal-backdrop":{backdropFilter:"blur(10px)"},"& .MuiDialog-paper":{"::before":{content:'""',height:"8px",width:"100%",background:"linear-gradient(90deg, #FF0E65 0%, #47D3FF 100%)"},background:"#101629"}},children:[g.jsx(T.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxs(T.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsx(T.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsx(T.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsx(T.DialogActions,{children:g.jsxs(T.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsx(T.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsx(T.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}var dt=(e=>(e.IDLE="idle",e.PREPARING="preparing",e.STARTING="starting",e.RUNNING="running",e.PAUSING="pausing",e.PAUSED="paused",e.STOPPING="stopping",e.COMPLETED="completed",e.FAILED="failed",e.STOPPED="stopped",e.ERROR="error",e))(dt||{});const AR=Ue(me.observer(({state:e,onRun:t,onPause:r,onStop:n,onReset:o,requiresManualReset:s=!1,variant:a="with_pause",className:i})=>{const l=T.useTheme(),{t:c}=we.useTranslation(),u=()=>{const p={run:{enabled:e==="idle"||e==="stopped"||e==="paused"||e==="completed"||e==="failed"||e==="error",label:c(e==="paused"?"ProgramControl.Resume.bt":e==="error"||e==="failed"?"ProgramControl.Retry.bt":"ProgramControl.Start.bt"),color:l.palette.success.main,onClick:t},pause:{enabled:e==="running",label:c("ProgramControl.Pause.bt"),color:"#FFFFFF33",onClick:r||(()=>{})},stop:{enabled:e==="preparing"||e==="starting"||e==="running"||e==="pausing"||e==="paused",label:c("ProgramControl.Stop.bt"),color:l.palette.error.main,onClick:n}};return a==="without_pause"?[p.run,p.stop]:[p.run,p.pause,p.stop]},d=p=>{const f={sx:{fontSize:"55px"}};if(a==="without_pause")return p===0?g.jsx(Gt.PlayArrow,{...f}):g.jsx(Gt.Stop,{...f});switch(p){case 0:return g.jsx(Gt.PlayArrow,{...f});case 1:return g.jsx(Gt.Pause,{...f});case 2:return g.jsx(Gt.Stop,{...f});default:return null}},h=u();return g.jsx(T.Box,{className:i,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:g.jsx(T.Box,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:h.map((p,f)=>g.jsxs(T.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[g.jsx(T.Button,{variant:"contained",disabled:!p.enabled||e==="preparing"||e==="starting"||e==="pausing"||e==="stopping"&&!s,onClick:p.onClick,sx:{width:"88px",height:"88px",borderRadius:"88px",backgroundColor:p.color,opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?1:.3,"&:hover":{backgroundColor:p.color,opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?.8:.3},"&:disabled":{backgroundColor:p.color,opacity:.3},minWidth:"88px",flexShrink:0},children:d(f)}),g.jsx(T.Typography,{variant:"body1",sx:{color:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?p.color:l.palette.text.disabled,textAlign:"center",opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?1:.3},children:p.label})]},p.label))})})})),Di=Ue(me.observer(({programState:e,safetyState:t,operationMode:r,className:n})=>{const o=T.useTheme(),{t:s}=we.useTranslation(),a=()=>{if(t==="SAFETY_STATE_DEVICE_EMERGENCY_STOP"||t==="SAFETY_STATE_ROBOT_EMERGENCY_STOP"||t==="SAFETY_STATE_STOP_0"||t==="SAFETY_STATE_STOP_1"||t==="SAFETY_STATE_STOP_2"||t==="SAFETY_STATE_PROTECTIVE_STOP"||t==="SAFETY_STATE_STOP"||t==="SAFETY_STATE_REDUCED"||t==="SAFETY_STATE_MASTERING"||t==="SAFETY_STATE_CONFIRM_SAFETY"||t==="SAFETY_STATE_OPERATOR_SAFETY"||t==="SAFETY_STATE_RECOVERY"||t==="SAFETY_STATE_VIOLATION")return{label:s("ProgramStateIndicator.EStop.lb"),color:o.palette.error.main};if(t==="SAFETY_STATE_UNKNOWN"||t==="SAFETY_STATE_FAULT")return{label:s("ProgramStateIndicator.Error.lb"),color:o.palette.error.main};if(t==="SAFETY_STATE_NORMAL")switch(e){case dt.PREPARING:return{label:s("ProgramStateIndicator.Preparing.lb"),color:o.palette.warning.main};case dt.STARTING:return{label:s("ProgramStateIndicator.Starting.lb"),color:o.palette.warning.main};case dt.RUNNING:return{label:s("ProgramStateIndicator.Running.lb"),color:o.palette.success.main};case dt.PAUSING:return{label:s("ProgramStateIndicator.Pausing.lb"),color:o.palette.warning.main};case dt.PAUSED:return{label:s("ProgramStateIndicator.Paused.lb"),color:o.palette.grey[600]};case dt.STOPPING:return{label:s("ProgramStateIndicator.Stopping.lb"),color:o.palette.warning.main};case dt.COMPLETED:return{label:s("ProgramStateIndicator.Completed.lb"),color:o.palette.success.main};case dt.FAILED:return{label:s("ProgramStateIndicator.Failed.lb"),color:o.palette.error.main};case dt.STOPPED:return{label:s("ProgramStateIndicator.Stopped.lb"),color:o.palette.warning.main};case dt.ERROR:return{label:s("ProgramStateIndicator.Error.lb"),color:o.palette.error.main};case dt.IDLE:default:return{label:s("ProgramStateIndicator.Ready.lb"),color:o.palette.success.main}}return{label:s("ProgramStateIndicator.Idle.lb"),color:o.palette.grey[600]}},{label:i,color:l}=a(),u=`${i} / ${(()=>{switch(r){case"OPERATION_MODE_AUTO":return s("ProgramStateIndicator.Auto.lb");case"OPERATION_MODE_MANUAL":return s("ProgramStateIndicator.Manual.lb");case"OPERATION_MODE_MANUAL_T1":return s("ProgramStateIndicator.ManualT1.lb");case"OPERATION_MODE_MANUAL_T2":return s("ProgramStateIndicator.ManualT2.lb");default:return s("ProgramStateIndicator.Auto.lb")}})()}`;return g.jsx(T.Chip,{className:n,label:g.jsx(T.Typography,{variant:"body2",sx:{fontSize:"0.75rem",lineHeight:1.2},children:u}),variant:"filled",sx:{backgroundColor:l,color:o.palette.getContrastText(l),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),Dd="0.0.0-semantically-released";function Wl(e){let t=Dd;return Dd.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function RR(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>Uf(r))}function Bf(e){return e.name.endsWith("_FLG")}function Uf(e){return/_J[0-9]+$/.test(e.name)}function PR(e,t){let r;function n(o){if(Bf(o)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${o.name}. Only one _FLG group is allowed.`);r=o}Uf(o),o.children.map(n)}if(n(e.scene),!r)throw Error(`No flange group found in robot model ${t}. Flange must be identified with a name ending in _FLG.`);return{gltf:e}}function Lf({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){const o=j.useRef([]),s=j.useRef([]),a=j.useRef(null),{invalidate:i}=Xo.useThree();j.useEffect(()=>{const d=e.joint_position.filter(h=>h!==void 0);return a.current=new Ml(d,{tension:120,friction:20,threshold:.001}),()=>{var h;(h=a.current)==null||h.destroy()}},[]),Xo.useFrame((d,h)=>{if(a.current){const p=a.current.update(h);u(),p||i()}});function l(d){d&&(s.current=RR(d),u(),i())}function c(d){var h;o.current=d,(h=a.current)==null||h.setTarget(d)}function u(){var h;const d=((h=a.current)==null?void 0:h.getCurrentValues())||[];if(r)r(s.current,d);else for(const[p,f]of s.current.entries()){const m=t[p],y=m.theta||0,S=m.reverse_rotation_direction?-1:1;f.rotation.y=S*(d[p]||0)+y}}return Pp(()=>{const d=e.joint_position.filter(h=>h!==void 0);requestAnimationFrame(()=>c(d))}),g.jsx("group",{ref:l,children:n})}const MR="line",_R="mesh";function VR({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new wt.Matrix4,o=j.useRef([]),s=j.useRef([]);j.useEffect(()=>{o.current=new Array(t.length).fill(null),s.current=new Array(t.length).fill(null)},[t.length]);function a(c,u){const d=new wt.Vector3,h=new wt.Quaternion,p=new wt.Vector3;n.decompose(d,h,p);const f=d.clone(),m=new wt.Matrix4().makeRotationY(c.theta+u*(c.reverse_rotation_direction?-1:1)).multiply(new wt.Matrix4().makeTranslation(0,c.d/1e3,0)).multiply(new wt.Matrix4().makeTranslation(c.a/1e3,0,0)).multiply(new wt.Matrix4().makeRotationX(c.alpha));return n.multiply(m),n.decompose(d,h,p),{a:f,b:d}}function i(c,u,d,h){if(!t)return;const p=t[c];if(!p)return;const{a:f,b:m}=a(p,h);u.geometry.setPositions([f.toArray(),m.toArray()].flat()),d.position.set(m.x,m.y,m.z)}function l(c,u){n.identity();for(let d=0;d<Math.min(c.length,u.length);d++){const h=o.current[d],p=s.current[d];h&&p&&i(d,h,p,u[d])}}return g.jsx(g.Fragment,{children:g.jsx(Lf,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:l,children:g.jsxs("group",{...r,name:"Scene",children:[g.jsxs("mesh",{children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((c,u)=>{const{a:d,b:h}=a(c,e.joint_position[u]??0),p=`dhrobot_J0${u}`;return g.jsxs("group",{name:p,children:[g.jsx(ht.Line,{ref:f=>{o.current[u]=f},name:MR,points:[d,h],color:"white",lineWidth:5}),g.jsxs("mesh",{ref:f=>{s.current[u]=f},name:_R,position:h,children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+u)]},p)})]})})})}const kR=console.warn;function jR(){return j.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&kR(e)}},[]),g.jsx(g.Fragment,{})}function DR(e){return e.type==="Mesh"}function BR({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:o}=PR(ht.useGLTF(e),e.split("/").pop()||e),s=j.useCallback(i=>{i&&r&&r()},[e]);function a(i){return DR(i)?g.jsx("mesh",{name:i.name,geometry:i.geometry,material:i.material,position:i.position,rotation:i.rotation},i.uuid):g.jsx("group",{name:i.name,position:i.position,rotation:i.rotation,ref:Bf(i)?t:void 0,children:i.children.map(a)},i.uuid)}return g.jsx("group",{...n,dispose:null,ref:s,children:a(o.scene)})}const UR=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof Ce.Mesh){r.material instanceof Ce.Material&&(r.material.colorWrite=!1);const n=r.clone(),o=r.clone();n.material=new Ce.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:Ce.DoubleSide}),n.userData.isGhost=!0,o.material=new Ce.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:Ce.DoubleSide}),o.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(o))}}),e.userData.isGhost=!0)},LR=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof Ce.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof Ce.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},Ff=Ue(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=Wl,flangeRef:o,postModelRender:s,transparentColor:a,...i})=>{const[l,c]=j.useState(null),u=j.useCallback(h=>{c(h)},[]);j.useEffect(()=>{l&&(a?UR(l,a):LR(l))},[l,a]);const d=g.jsx(VR,{rapidlyChangingMotionState:e,dhParameters:r,...i});return g.jsxs(om.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[g.jsx(j.Suspense,{fallback:d,children:g.jsx("group",{ref:u,children:g.jsx(Lf,{rapidlyChangingMotionState:e,dhParameters:r,children:g.jsx(BR,{modelURL:n(t),postModelRender:s,flangeRef:o,...i})})})}),g.jsx(jR,{})]})});function $f({connectedMotionGroup:e,getModel:t=Wl,flangeRef:r,transparentColor:n,postModelRender:o,...s}){return e.dhParameters?g.jsx(Ff,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,postModelRender:o,...s}):null}const FR=Ue(me.observer(({robotName:e,programState:t,safetyState:r,operationMode:n,driveToHomeEnabled:o=!1,onDriveToHomePress:s,onDriveToHomeRelease:a,connectedMotionGroup:i,robotComponent:l=$f,customContentComponent:c,className:u})=>{var M;const d=T.useTheme(),{t:h}=we.useTranslation(),[p,f]=j.useState(!1),m=j.useRef(null),y=j.useRef(null),[S,R]=j.useState(!1),[v,O]=j.useState({width:400,height:600}),[I,E]=j.useState(0);j.useEffect(()=>{const D=()=>{if(y.current){const{offsetWidth:Q,offsetHeight:oe}=y.current;R(Q>oe),O({width:Q,height:oe})}};D();const ne=new ResizeObserver(D);return y.current&&ne.observe(y.current),()=>{ne.disconnect()}},[]);const w=j.useCallback(()=>{E(D=>D+1)},[]),P=j.useCallback(()=>{!o||!s||(f(!0),s())},[o,s]),k=j.useCallback(()=>{!o||!a||(f(!1),a())},[o,a]),b=j.useCallback(()=>{p&&a&&(f(!1),a())},[p,a]),A=S?v.width<350:v.height<200,_=S?v.height<310:v.height<450;return g.jsx(T.Card,{ref:y,className:u,sx:{width:"100%",height:"100%",display:"flex",flexDirection:S?"row":"column",position:"relative",overflow:"hidden",minWidth:{xs:180,sm:220,md:250},minHeight:S?{xs:200,sm:240,md:260}:{xs:150,sm:180,md:220},border:`1px solid ${d.palette.divider}`,borderRadius:"18px",boxShadow:"none",backgroundColor:((M=d.palette.backgroundPaperElevation)==null?void 0:M[8])||"#2A2A3F",backgroundImage:"none"},children:S?g.jsxs(g.Fragment,{children:[g.jsx(T.Box,{sx:{flex:"0 0 50%",position:"relative",height:"100%",minHeight:"100%",maxHeight:"100%",borderRadius:1,m:{xs:1.5,sm:2,md:3},mr:{xs:.75,sm:1,md:1.5},overflow:"hidden",display:A?"none":"block"},children:!A&&g.jsxs(Xo.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute",top:0,left:0},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(si,{}),g.jsx(ht.Bounds,{fit:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:w})})]})}),g.jsxs(T.Box,{sx:{flex:"1",display:"flex",flexDirection:"column",justifyContent:"flex-start",width:A?"100%":"50%"},children:[g.jsxs(T.Box,{sx:{p:{xs:1.5,sm:2,md:3},pb:{xs:1,sm:1.5,md:2},textAlign:"left"},children:[g.jsx(T.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Di,{programState:t,safetyState:r,operationMode:n})]}),g.jsxs(T.Box,{sx:{p:{xs:1.5,sm:2,md:3},pt:0,flex:"1",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[!_&&c&&g.jsxs(T.Box,{children:[g.jsx(c,{}),g.jsx(T.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(T.Box,{sx:{mt:!_&&c?"auto":0},children:g.jsx(T.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:{xs:1,sm:1.5,md:2},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(T.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!o,onMouseDown:P,onMouseUp:k,onMouseLeave:b,onTouchStart:P,onTouchEnd:k,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})})]})]})]}):g.jsx(g.Fragment,{children:g.jsxs(T.Box,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[g.jsxs(T.Box,{children:[g.jsx(T.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Di,{programState:t,safetyState:r,operationMode:n})]}),g.jsx(T.Box,{sx:{flex:A?0:1,position:"relative",minHeight:A?0:{xs:120,sm:150,md:200},height:A?0:"auto",borderRadius:1,overflow:"hidden",display:A?"none":"block"},children:!A&&g.jsxs(Xo.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute"},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(si,{}),g.jsx(ht.Bounds,{fit:!0,clip:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:w})})]})}),g.jsxs(T.Box,{children:[!_&&c&&g.jsxs(g.Fragment,{children:[g.jsx(c,{}),g.jsx(T.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(T.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:!_&&c?{xs:1,sm:2,md:5}:{xs:.5,sm:1,md:2},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(T.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!o,onMouseDown:P,onMouseUp:k,onMouseLeave:b,onTouchStart:P,onTouchEnd:k,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})]})]})})})})),$R=pr(g.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),NR=({title:e,titleId:t,...r},n)=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("path",{fill:"#38C6F4",fillRule:"evenodd",d:"M6.359 14.25v2.934h7.63v-3.521L10.196 9.87 9 8.674l.859-.859.337-.337.858-.858.565.565.631.63.565.565 1.196-1.195.543-.544 1.196-1.195-1.196-1.196-2.304-2.304L11.054.75 9.86 1.946 3.446 8.359 2.25 9.554l1.196 1.196 2.913 2.913zm1.69 0v1.244h4.249v-1.13L7.804 9.87 6.608 8.674l1.196-1.196L9.86 5.424l.007-.008-.543-.543-4.681 4.681 2.912 2.913.496.496v.113h2.124l1.174 1.174zm3.005-10.022-.294.294-.543-.543.837-.837 2.304 2.304-.543.543-.565-.565z",clipRule:"evenodd"})),zR=j.forwardRef(NR);var Jl=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.CELL_OPEN="CELL_OPEN",e.E_STOP="E_STOP",e.MANUAL_MODE="MANUAL_MODE",e.READY="READY",e))(Jl||{});const Nf=Ue(me.observer(({setupState:e,className:t})=>{const r=T.useTheme(),{t:n}=we.useTranslation(),o=()=>{var c,u,d,h,p,f,m;switch(e){case"READY":return{label:n("RobotSetupReadinessIndicator.Ready.lb"),indicatorColor:((c=r.palette.tertiary)==null?void 0:c.main)||r.palette.primary.main,backgroundColor:((u=r.palette.backgroundPaperElevation)==null?void 0:u[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"ROBOT_DISCONNECTED":return{label:n("RobotSetupReadinessIndicator.RobotDisconnected.lb"),indicatorColor:r.palette.error.main,backgroundColor:((d=r.palette.backgroundPaperElevation)==null?void 0:d[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"CELL_OPEN":return{label:n("RobotSetupReadinessIndicator.CellOpen.lb"),indicatorColor:r.palette.error.main,backgroundColor:((h=r.palette.backgroundPaperElevation)==null?void 0:h[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"E_STOP":return{label:n("RobotSetupReadinessIndicator.EStop.lb"),indicatorColor:r.palette.error.main,backgroundColor:((p=r.palette.backgroundPaperElevation)==null?void 0:p[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"MANUAL_MODE":return{label:n("RobotSetupReadinessIndicator.ManualMode.lb"),indicatorColor:r.palette.error.main,backgroundColor:((f=r.palette.backgroundPaperElevation)==null?void 0:f[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"PRECONDITION_NOT_FULFILLED":default:return{label:n("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:r.palette.error.main,backgroundColor:((m=r.palette.backgroundPaperElevation)==null?void 0:m[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText}}},{label:s,indicatorColor:a,backgroundColor:i,textColor:l}=o();return g.jsx(T.Chip,{className:t,label:g.jsxs(T.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(T.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:a,flexShrink:0}}),g.jsx(T.Typography,{variant:"body2",sx:{color:l,fontSize:"0.75rem",lineHeight:1.2},children:s})]}),variant:"filled",sx:{backgroundColor:i,color:r.palette.getContrastText(i),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),GR=Ue(me.observer(({robotName:e,robotType:t,setupState:r,PreconditionComponent:n=Nf,className:o})=>{var l;const s=T.useTheme(),a=t||"Robot",i=r===Jl.READY;return g.jsxs(T.Box,{className:o,sx:{border:`1px solid ${s.palette.divider}`,background:((l=s.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxs(T.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[i?g.jsx(T.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${s.palette.primary.main} !important`},"& svg path":{fill:`${s.palette.primary.main} !important`}},children:g.jsx(zR,{})}):g.jsx($R,{sx:{color:s.palette.error.main,fontSize:24}}),g.jsx(T.Typography,{variant:"body1",sx:{fontWeight:500,color:s.palette.text.primary},children:e}),g.jsx(T.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:s.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsx(T.Typography,{variant:"body2",sx:{color:s.palette.text.secondary},children:a})]}),n&&g.jsx(n,{setupState:r})]})})),HR=Array(6).fill(2*Math.PI),Bi={[kt.Abb]:[0,0,0,0,Math.PI/2,0,0],[kt.Fanuc]:[0,0,0,0,-Math.PI/2,0,0],[kt.Yaskawa]:[0,0,0,0,-Math.PI/2,0,0],[kt.Kuka]:[0,-Math.PI/2,Math.PI/2,0,Math.PI/2,0,0],[kt.Universalrobots]:[0,-Math.PI/2,-Math.PI/2,-Math.PI/2,Math.PI/2,-Math.PI/2,0]};function zf(e){const[t]=e.split("_");switch(t){case"ABB":return kt.Abb;case"FANUC":return kt.Fanuc;case"YASKAWA":return kt.Yaskawa;case"KUKA":return kt.Kuka;case"UniversalRobots":return kt.Universalrobots;default:return null}}function qR(e,t){const r=zf(e);return r&&r in Bi?Bi[r]:t||null}const WR=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("path",{d:"M5.248 21c-.334 0-.619-.116-.853-.35a1.153 1.153 0 0 1-.351-.848c0-.333.117-.616.351-.85.234-.233.519-.35.853-.35H7.24L4.558 9.87a2.881 2.881 0 0 1-1.126-1.042A2.77 2.77 0 0 1 3 7.317c0-.793.28-1.467.838-2.023a2.774 2.774 0 0 1 2.033-.834 2.71 2.71 0 0 1 1.728.585c.494.389.832.887 1.014 1.493h3.58V5.239c0-.22.076-.406.226-.555a.76.76 0 0 1 .558-.224c.136 0 .263.035.381.104.118.07.209.167.273.292v.14l1.835-1.702a.979.979 0 0 1 .52-.279.881.881 0 0 1 .58.091l4.01 1.85a.74.74 0 0 1 .36.364.537.537 0 0 1-.002.474.592.592 0 0 1-.366.323.657.657 0 0 1-.477-.039l-3.858-1.774L13.76 6.59v1.454l2.473 2.233 3.858-1.774a.648.648 0 0 1 .485-.03.571.571 0 0 1 .358.314.513.513 0 0 1 .01.482.79.79 0 0 1-.367.357l-4.011 1.882a.881.881 0 0 1-.58.09.979.979 0 0 1-.52-.278L13.63 9.638v.14a.92.92 0 0 1-.273.275.665.665 0 0 1-.381.12.76.76 0 0 1-.558-.224.752.752 0 0 1-.225-.555V8.096h-3.58a2.82 2.82 0 0 1-.215.54 2.552 2.552 0 0 1-.323.479l5.139 9.488h2.673c.335 0 .62.116.854.35.234.233.35.516.35.849 0 .332-.116.615-.35.849a1.167 1.167 0 0 1-.854.349H5.248Zm.623-12.385c.362 0 .67-.126.924-.378a1.25 1.25 0 0 0 .38-.92 1.25 1.25 0 0 0-.38-.92 1.261 1.261 0 0 0-.924-.379 1.26 1.26 0 0 0-.925.379 1.25 1.25 0 0 0-.38.92c0 .36.127.667.38.92.254.252.562.378.925.378Z"})),JR=j.forwardRef(WR),YR=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("path",{d:"m13.37 9.12 1.69 1.69 2.99-2.99-3.73-3.73-.95-.95-7.66 7.66-.95.95 3.99 3.99v3.44h7.55v-3.55l-4.72-4.72 1.79-1.79Zm-.91-2.99.91-.91 2.6 2.6-.91.91-2.6-2.6Zm-2.25 10.24h3.74l-1.34-1.34-.04-.04h-2.5l-3.25-3.25 4.59-4.59.92.92L9.5 10.9l5.33 5.33v1.48H10.2v-1.35l.01.01ZM2 2v4.99h1.41V3.4h3.58V2H2ZM22.21 2h-4.98v1.41h3.59v3.58h1.4V2h-.01ZM20.81 20.65h-3.58v1.4h4.98v-4.99h-1.4v3.59ZM3.4 17.06H2v4.98h4.99v-1.4H3.4v-3.58Z"})),KR=j.forwardRef(YR),jt=me.observer(({id:e,icon:t,color:r,title:n,name:o,label:s,explanation:a,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=me.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(d){u.anchorEl=d.currentTarget},closePopover(){u.anchorEl=null}}));return g.jsxs(g.Fragment,{children:[g.jsxs(T.Stack,{"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[g.jsx(T.SvgIcon,{component:t,sx:{color:r}}),s&&g.jsx("div",{style:{color:r},children:s})]}),g.jsx(T.Popover,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:l??{vertical:"bottom",horizontal:"left"},transformOrigin:c??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:g.jsxs(T.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxs("div",{children:[n&&g.jsx(T.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),g.jsx(T.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:o})]}),g.jsx(T.Typography,{fontSize:"14px",children:a}),i&&g.jsx(T.Typography,{fontSize:"12px",children:i})]})})]})}),QR=me.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:o})=>{const s=T.useTheme(),{t:a}=we.useTranslation();return e?g.jsx(jt,{id:"motion-group-virtual",icon:KR,color:s.palette.tertiary.main,name:a("SafetyBar.ControllerType.Virtual.lb"),label:o?null:a("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxs(we.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",g.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:r,transformOrigin:n}):g.jsx(jt,{id:"motion-group-physical",icon:JR,color:s.palette.primary.main,name:a("SafetyBar.ControllerType.Physical.lb"),label:o?null:a("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsx(we.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsx("code",{}),strong:g.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),XR=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.306 2.768c0-.424.344-.768.768-.768h.406C19.53 2 22 4.551 22 7.699c0 3.237-2.51 5.587-5.31 5.703-.84 1.595-2.478 2.677-4.36 2.677a4.845 4.845 0 0 1-3.146-1.163c-.6 1.783 0 3.922 1.79 4.99 1.929 1.149 4.395.467 5.508-1.524l.212-.378a.75.75 0 1 1 1.308.732l-.231.414c-1.524 2.725-4.9 3.66-7.54 2.085-2.716-1.618-3.432-5.037-2.129-7.599a5.22 5.22 0 0 1-.73-2.677c0-2.192 1.335-4.063 3.212-4.793-1.195-1.427-3.29-1.96-5.08-.892-1.928 1.15-2.589 3.696-1.475 5.687l.231.413a.75.75 0 0 1-1.308.732l-.212-.377c-1.524-2.726-.62-6.211 2.02-7.785 2.716-1.619 5.943-.55 7.44 1.897l.13-.001c2.739 0 4.96 2.292 4.96 5.12 0 .284-.023.563-.066.834 1.795-.354 3.288-1.96 3.288-4.095 0-2.3-1.805-4.163-4.032-4.163h-.406a.768.768 0 0 1-.768-.768Zm.496 8.191c0 .286-.033.564-.094.831a3.62 3.62 0 0 1-.672 1.415 3.425 3.425 0 0 1-2.706 1.338 3.402 3.402 0 0 1-2.384-.98 3.598 3.598 0 0 1-.852-1.306 3.677 3.677 0 0 1-.235-1.298c0-1.623 1.046-2.994 2.48-3.435a3.37 3.37 0 0 1 1.522-.107c1.665.264 2.94 1.75 2.94 3.542Z"})),ZR=j.forwardRef(XR),eP=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z",fill:"#fff",fillOpacity:.56})),tP=j.forwardRef(eP),rP=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("path",{d:"M12.953 5.09a1.497 1.497 0 0 0-1.653-.518l-1.35.43a1.504 1.504 0 0 0-1.726-.376L2.858 6.97c-.736.321-1.06 1.155-.726 1.862.334.707 1.202 1.02 1.937.698l4.27-1.865 1.466 1.973v.402c0 .873-.627 1.63-1.512 1.827l-2.56.567c-1.329.295-2.27 1.431-2.27 2.74v.107c0 .26.22.469.489.469h11.117c1.329 0 2.618.435 3.656 1.233l1.665 1.28A1 1 0 0 0 22 17.47V11.062c0-.312-.108-.616-.308-.863l-3.415-4.218a1.5 1.5 0 0 0-1.618-.471l-.378.12-.866-.475a1.516 1.516 0 0 0-1.188-.114l-1.06.338-.214-.289Z"})),nP=j.forwardRef(rP),oP=me.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:o}=we.useTranslation(),s=T.useTheme();switch(e){case"OPERATION_MODE_AUTO":return g.jsx(jt,{id:"operation-mode-auto",icon:ZR,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Automatic.ti"),label:n?null:o("SafetyBar.OperationMode.Automatic.ti"),color:s.palette.text.secondary,explanation:g.jsx(we.Trans,{i18nKey:"SafetyBar.OperationMode.Auto.Explanation.lb",children:"The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode."}),anchorOrigin:t,transformOrigin:r});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return g.jsx(jt,{id:"operation-mode-manual",icon:nP,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Manual.lb"),label:n?null:o("SafetyBar.OperationMode.Manual.lb"),explanation:g.jsx(we.Trans,{i18nKey:"SafetyBar.OperationMode.Manual.Explanation.lb",children:"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:return g.jsx(jt,{id:"operation-mode-error",icon:tP,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Error.lb"),label:n?null:o("SafetyBar.OperationMode.Error.lb"),explanation:g.jsx(we.Trans,{i18nKey:"SafetyBar.OperationMode.Error.Explanation.lb",children:"The robot controller has entered an unexpected operation mode. Motion group movement may not be possible."}),literalValue:e,anchorOrigin:t,transformOrigin:r})}}),sP=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z"})),aP=j.forwardRef(sP),iP=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),V.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.364 12a6.364 6.364 0 1 1-12.728 0 6.364 6.364 0 0 1 12.728 0ZM7.909 9.273 12 16.546l4.09-7.273H7.91Z"}),V.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.364 0a8.636 8.636 0 1 1-17.273 0 8.636 8.636 0 0 1 17.273 0Z"})),lP=j.forwardRef(iP),cP=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("path",{d:"M9.057 15.115c-1.681 0-3.111-.59-4.29-1.768C3.59 12.17 3 10.74 3 9.057c0-.29.021-.582.064-.876a4.1 4.1 0 0 1 .214-.844.78.78 0 0 1 .273-.36c.115-.077.244-.133.389-.168a.857.857 0 0 1 .437.008c.146.04.28.12.4.24l2.806 2.787 2.26-2.261-2.775-2.786a.903.903 0 0 1-.241-.405.875.875 0 0 1-.008-.442 1.13 1.13 0 0 1 .174-.389.82.82 0 0 1 .355-.273c.268-.107.548-.182.838-.224.29-.043.581-.064.871-.064 1.682 0 3.112.59 4.29 1.768 1.179 1.178 1.768 2.608 1.768 4.29 0 .444-.042.858-.126 1.241-.084.384-.21.755-.377 1.113l5.726 5.692A2.2 2.2 0 0 1 21 18.721a2.2 2.2 0 0 1-.662 1.617A2.2 2.2 0 0 1 18.72 21a2.173 2.173 0 0 1-1.617-.679l-5.692-5.709c-.372.161-.75.285-1.133.372-.383.087-.79.13-1.222.13Z",fill:"#fff",fillOpacity:.56})),uP=j.forwardRef(cP),dP=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("path",{d:"m10.6 13.8-2.15-2.15a.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275.948.948 0 0 0-.275.7c0 .283.092.517.275.7L9.9 15.9c.2.2.433.3.7.3.267 0 .5-.1.7-.3l5.65-5.65a.948.948 0 0 0 .275-.7.948.948 0 0 0-.275-.7.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275L10.6 13.8ZM12 22a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),hP=j.forwardRef(dP),pP=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("path",{d:"M9 16h6c.283 0 .52-.096.713-.287A.968.968 0 0 0 16 15V9a.967.967 0 0 0-.287-.713A.968.968 0 0 0 15 8H9a.968.968 0 0 0-.713.287A.968.968 0 0 0 8 9v6c0 .283.096.52.287.713.192.191.43.287.713.287Zm3 6a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),fP=j.forwardRef(pP),mP=me.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:o}=we.useTranslation(),s=T.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return g.jsx(jt,{id:"safety-state-normal",title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Normal.lb"),label:n?null:o("SafetyBar.SafetyState.Normal.lb"),icon:hP,color:s.palette.text.secondary,explanation:g.jsx(we.Trans,{i18nKey:"SafetyBar.SafetyState.Normal.Explanation.lb",children:"The robot controller is in a normal safety state. Movement is not prevented by this state."}),anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return g.jsx(jt,{id:"safety-state-estop",title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Estop.lb"),label:n?null:o("SafetyBar.SafetyState.Estop.lb"),icon:lP,color:s.palette.error.main,explanation:g.jsx(we.Trans,{i18nKey:"SafetyBar.StopState.Estop.Explanation.lb",children:"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_STOP_0":case"SAFETY_STATE_STOP_1":case"SAFETY_STATE_STOP_2":case"SAFETY_STATE_PROTECTIVE_STOP":case"SAFETY_STATE_STOP":return g.jsx(jt,{id:"safety-state-stop",icon:fP,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Stop.lb"),label:n?null:o("SafetyBar.SafetyState.Stop.lb"),color:s.palette.warning.main,explanation:g.jsx(we.Trans,{i18nKey:"SafetyBar.SafetyState.Stop.Explanation.lb",children:"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_REDUCED":case"SAFETY_STATE_MASTERING":case"SAFETY_STATE_CONFIRM_SAFETY":case"SAFETY_STATE_OPERATOR_SAFETY":case"SAFETY_STATE_RECOVERY":case"SAFETY_STATE_VIOLATION":return g.jsx(jt,{id:"safety-state-manual-action-required",icon:uP,color:s.palette.warning.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:o("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:g.jsx(we.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return g.jsx(jt,{id:"safety-state-error",icon:aP,color:s.palette.error.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Error.lb"),label:n?null:o("SafetyBar.SafetyState.Error.lb"),explanation:g.jsx(we.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:pE(e,`Unknown safety state ${e}`)}}),gP=Ue(me.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:o,transformOrigin:s,compact:a=!0})=>{const i=a?1:2;return g.jsxs(T.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[g.jsx(mP,{safetyState:n,anchorOrigin:o,transformOrigin:s,compact:a}),g.jsx(T.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(oP,{operationMode:r,anchorOrigin:o,transformOrigin:s,compact:a}),g.jsx(T.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(QR,{isVirtual:e,motionGroupId:t,anchorOrigin:o,transformOrigin:s,compact:a})]})})),yP=T.styled(T.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,r,n;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:o})=>!o,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:o})=>o,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),bP=e=>{const{ref:t,...r}=e;return g.jsx(yP,{ref:t,selected:e.selected,...r,color:"secondary",variant:"circular"})};function xP(e){const{children:t,value:r,index:n,...o}=e;return g.jsx("div",{role:"tabpanel",hidden:r!==n,id:`tabpanel-${n}`,"aria-labelledby":`tab-${n}`,...o,children:r===n&&g.jsx(T.Box,{children:t})})}function SP({children:e,...t}){const{fullWidth:r,indicator:n,onChange:o,orientation:s,scrollButtons:a,selectionFollowsFocus:i,textColor:l,value:c,variant:u,...d}=t;return g.jsx(T.Box,{...d,children:e})}const vP=Ue(me.observer(e=>{const{items:t,activeTab:r,defaultActiveTab:n=0,onTabChange:o,sx:s,ref:a}=e,i=r!==void 0,[l,c]=j.useState(n),u=i?r:l;j.useEffect(()=>{i||t.length!==0&&(l<0||l>t.length-1)&&c(0)},[t.length,i,l]);const d=(h,p)=>{i||c(p),o==null||o(p)};return g.jsxs(T.Box,{ref:a,sx:{height:"100%",display:"flex",flexDirection:"column",...s},children:[g.jsx(T.Box,{sx:{px:0,py:0,overflow:"visible",position:"relative",paddingTop:h=>h.spacing(2),paddingRight:h=>h.spacing(2.5)},children:g.jsx(T.Tabs,{value:u,onChange:d,sx:{minHeight:"32px",backgroundColor:"transparent",overflow:"visible","& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:2,overflow:"visible",paddingTop:0,paddingBottom:0},"& .MuiTabs-scroller":{overflow:"visible !important"},"& .MuiTab-root":{overflow:"visible"}},children:t.map((h,p)=>{var O,I,E;const f=()=>{if(!h.badge)return;const w=h.badge.content,P=h.badge.max;return typeof w=="number"&&P&&w>P?`${P}+`:w},m=()=>{if(!h.badge)return!1;const w=h.badge.content,P=h.badge.showZero;return!(w===0&&!P)},y=f(),S=m(),R=()=>{i||c(p),o==null||o(p)},v=g.jsx(T.Tab,{label:h.label,icon:h.icon,iconPosition:"start",disableRipple:!0,onClick:R,sx:{minHeight:"32px",height:"32px",padding:"0px 10px",borderRadius:"12px",backgroundColor:w=>{var P;return((P=w.palette.backgroundPaperElevation)==null?void 0:P[11])||"#32344B"},color:"text.primary",opacity:u===p?1:.38,fontSize:"13px",transition:"all 0.2s ease-in-out",position:"relative",overflow:"visible","&:hover":{opacity:u===p?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:w=>{var P;return((P=w.palette.backgroundPaperElevation)==null?void 0:P[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},h.id);return S?g.jsx(SP,{component:"span",sx:{display:"inline-flex"},children:g.jsx(T.Badge,{badgeContent:y,color:((O=h.badge)==null?void 0:O.color)||"error",max:(I=h.badge)==null?void 0:I.max,showZero:(E=h.badge)==null?void 0:E.showZero,anchorOrigin:{vertical:"top",horizontal:"right"},overlap:"rectangular",sx:{"& .MuiBadge-badge":{opacity:"1 !important"}},children:v})},h.id):v})})}),g.jsx(T.Box,{sx:{mt:h=>h.spacing(2),borderBottom:1,borderColor:"divider"}}),g.jsx(T.Box,{sx:{flex:1,overflow:"auto"},children:t.map((h,p)=>g.jsx(xP,{value:u,index:p,children:h.content},h.id))})]})})),CP=e=>{const t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60),o=e%60,s=[];return t>0?(s.push(t.toString()),s.push(r.toString().padStart(2,"0")),s.push(n.toString().padStart(2,"0")),s.push(o.toString().padStart(2,"0"))):r>0?(s.push(r.toString()),s.push(n.toString().padStart(2,"0")),s.push(o.toString().padStart(2,"0"))):(s.push(n.toString()),s.push(o.toString().padStart(2,"0"))),s.join(":")},Bd=(e,t)=>{const r=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60),s=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const i={};return r>0&&(i.days=r),n>0&&(i.hours=n),o>0&&(i.minutes=o),(s>0||Object.keys(i).length===0)&&(i.seconds=s),new Intl.DurationFormat(t,{style:"narrow"}).format(i)}catch{}const a=[];return r>0&&a.push(`${r}d`),n>0&&a.push(`${n}h`),o>0&&a.push(`${o}m`),(s>0||a.length===0)&&a.push(`${s}s`),a.join(" ")},wP=({timerState:e,animationState:t,hasError:r,className:n})=>{const{t:o}=we.useTranslation(),s=lh(),{elapsedTime:a,currentProgress:i}=e,{showErrorAnimation:l,showPauseAnimation:c,showMainText:u}=t;return g.jsxs(T.Box,{className:n,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(sm.Gauge,{width:264,height:264,value:i,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:c||l?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:r?s.palette.error.light:s.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),g.jsx(T.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:g.jsxs(T.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsx(T.Fade,{in:u&&r,timeout:200,children:g.jsx(T.Typography,{variant:"h6",sx:{position:"absolute",fontSize:"16px",fontWeight:500,color:s.palette.error.light},children:o("timer.error")})}),g.jsx(T.Fade,{in:u&&!r,timeout:300,children:g.jsx(T.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:s.palette.text.primary,lineHeight:1,letterSpacing:"-0.5px"},children:CP(a)})})]})})]})},OP=({timerState:e,animationState:t,hasError:r,compact:n,className:o})=>{const{t:s,i18n:a}=we.useTranslation(),i=lh(),{elapsedTime:l,currentProgress:c}=e,{showErrorAnimation:u,showPauseAnimation:d}=t;return n?g.jsx(T.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0},children:g.jsx(T.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:i.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:r?s("timer.error"):Bd(l,a.language)})}):g.jsxs(T.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[g.jsx(T.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:d||u?.6:1,transition:"opacity 0.5s ease-out"},children:g.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?i.palette.error.light:i.palette.success.main,strokeWidth:"2",opacity:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?i.palette.error.light:i.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-c/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),g.jsx(T.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:i.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:r?s("timer.error"):Bd(l,a.language)})]})},TP=()=>{const[e,t]=j.useState({showPauseAnimation:!1,showErrorAnimation:!1,showMainText:!0}),r=j.useRef(null),n=j.useRef(null),o=j.useRef(null),s=j.useCallback(()=>{t(d=>({...d,showPauseAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(d=>({...d,showPauseAnimation:!1}))},800)},[]),a=j.useCallback(()=>{t(d=>({...d,showErrorAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(d=>({...d,showErrorAnimation:!1}))},600)},[]),i=j.useCallback(()=>{t(d=>({...d,showErrorAnimation:!1})),n.current&&clearTimeout(n.current)},[]),l=j.useCallback(()=>{t(d=>({...d,showMainText:!1})),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{t(d=>({...d,showMainText:!0}))},200)},[]),c=j.useCallback(()=>{t(d=>({...d,showMainText:!0}))},[]),u=j.useCallback(()=>{r.current&&clearTimeout(r.current),n.current&&clearTimeout(n.current),o.current&&clearTimeout(o.current)},[]);return{animationState:e,triggerPauseAnimation:s,triggerErrorAnimation:a,clearErrorAnimation:i,triggerFadeTransition:l,setInitialAnimationState:c,cleanup:u}},EP=({autoStart:e,hasError:t,onPauseAnimation:r,onErrorAnimation:n,onClearErrorAnimation:o})=>{const[s,a]=j.useState({elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),i=j.useRef(null),l=j.useRef(null),c=j.useRef(0),u=j.useRef(0),[d]=_l([0],{tension:80,friction:18,onChange:([S])=>{a(R=>({...R,currentProgress:S}))}}),h=j.useCallback((S=0)=>{const R=S/60%1*100;a(v=>({...v,elapsedTime:S,isPausedState:!1,currentProgress:R})),c.current=0,u.current=R,d.setImmediate([R]),e?(l.current=Date.now()-S*1e3,a(v=>({...v,isRunning:!0}))):l.current=null},[e,d]),p=j.useCallback(()=>{if(l.current&&s.isRunning){const R=(Date.now()-l.current)/1e3+c.current,v=R/60%1*100;d.setTarget([v]),a(O=>({...O,elapsedTime:Math.floor(R)}))}a(S=>({...S,isRunning:!1,isPausedState:!0})),r()},[s.isRunning,d,r]),f=j.useCallback(()=>{s.isPausedState&&(c.current=s.elapsedTime,l.current=Date.now(),a(S=>({...S,isRunning:!0,isPausedState:!1})))},[s.isPausedState,s.elapsedTime]),m=j.useCallback(()=>{a(S=>({...S,elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0})),c.current=0,l.current=null,u.current=0,d.setImmediate([0])},[d]),y=j.useCallback(()=>s.isPausedState,[s.isPausedState]);return j.useEffect(()=>{t?(s.isRunning&&(a(S=>({...S,wasRunningBeforeError:!0})),p()),n()):(s.wasRunningBeforeError&&!s.isRunning&&(a(S=>({...S,wasRunningBeforeError:!1})),f()),o())},[t,s.isRunning,s.wasRunningBeforeError,p,f,n,o]),j.useEffect(()=>{if(s.isRunning){const S=()=>{if(l.current){const v=(Date.now()-l.current)/1e3+c.current,O=v/60%1*100;a(E=>({...E,elapsedTime:Math.floor(v)})),Math.abs(O-u.current)>.1&&(d.setTarget([O]),u.current=O)}i.current=requestAnimationFrame(S)};i.current=requestAnimationFrame(S)}else i.current&&(cancelAnimationFrame(i.current),i.current=null);return()=>{i.current&&(cancelAnimationFrame(i.current),i.current=null)}},[s.isRunning,d]),j.useEffect(()=>{let S=null;const R=()=>{d.update(),S=requestAnimationFrame(R)};return S=requestAnimationFrame(R),()=>{S&&cancelAnimationFrame(S)}},[d]),{timerState:s,controls:{start:h,pause:p,resume:f,reset:m,isPaused:y}}},IP=Ue(me.observer(({onTimerReady:e,autoStart:t=!0,variant:r="default",compact:n=!1,className:o,hasError:s=!1})=>{const{animationState:a,triggerPauseAnimation:i,triggerErrorAnimation:l,clearErrorAnimation:c,setInitialAnimationState:u,cleanup:d}=TP(),{timerState:h,controls:p}=EP({autoStart:t,hasError:s,onPauseAnimation:i,onErrorAnimation:l,onClearErrorAnimation:c});return j.useEffect(()=>{u()},[u]),j.useEffect(()=>{let f=!0;const m=setTimeout(()=>{f&&e(p)},0);return()=>{f=!1,clearTimeout(m)}},[e,p]),j.useEffect(()=>d,[d]),r==="small"?g.jsx(OP,{timerState:h,animationState:a,hasError:s,compact:n,className:o}):g.jsx(wP,{timerState:h,animationState:a,hasError:s,className:o})})),AP={$schema:"https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",name:"wandelscript",patterns:[{include:"#keywords"},{include:"#strings"},{include:"#comments"},{include:"#functions"}],repository:{keywords:{patterns:[{name:"keyword.control.flow.wandelscript",match:"\\b(move|via|to|interrupt|def|False|True|for|if|else|elif|while|return|switch|activate|deactivate|print|and|or|not)\\b"}]},strings:{name:"string.quoted.double.wandelscript",begin:'"',end:'"',patterns:[{name:"constant.character.escape.wandelscript",match:"\\\\."}]},comments:{patterns:[{begin:"#",beginCaptures:{0:{name:"punctuation.definition.comment.wandelscript"}},end:"$",name:"comment.line.number-sign.wandelscript"}]},functions:{patterns:[{match:"[a-zA-Z_-]+\\(",name:"entity.name.function.wandelscript"}]}},scopeName:"source.wandelscript"},RP=j.lazy(()=>import("@monaco-editor/react"));let oi=null;async function PP(){if(!oi){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);oi={shiki:await e({langs:[AP],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return oi}const MP=Ue(e=>{const t=T.useTheme(),[r,n]=j.useState("dark-plus"),o=t.palette.mode==="dark"?"dark-plus":"light-plus";async function s(a){var c,u;a.languages.register({id:"wandelscript"}),a.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:i,shikiToMonaco:l}=await PP();l(i,a),a.editor.defineTheme(o,((u=(c=t.componentsExt)==null?void 0:c.WandelscriptEditor)==null?void 0:u.monacoTheme)??{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:{}}),e.monacoSetup&&e.monacoSetup(a),n(o)}return g.jsx(j.Suspense,{fallback:g.jsx(Fl,{}),children:g.jsx(RP,{value:e.code,onMount:(a,i)=>{s(i)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})}),Ud=1e-4,_P={a:0,d:0,alpha:0,theta:0,reverse_rotation_direction:!1};class Cs{constructor(t,r,n,o,s,a,i,l,c,u){this.nova=t,this.controller=r,this.motionGroup=n,this.initialMotionState=o,this.motionStateSocket=s,this.isVirtual=a,this.tcps=i,this.description=l,this.initialControllerState=c,this.controllerStateSocket=u,this.connectedJoggingSocket=null,this.joggingVelocity=10,this.activationState="inactive",this.rapidlyChangingMotionState=o,this.controllerState=c,u.addEventListener("message",d=>{var p;const h=(p=$e.tryParseJson(d.data))==null?void 0:p.result;h&&Ee.runInAction(()=>{this.controllerState=h})}),s.addEventListener("message",d=>{var p;const h=(p=$e.tryParseJson(d.data))==null?void 0:p.result;if(!h)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${d.data}`);Ul(this.rapidlyChangingMotionState.joint_position,h.joint_position,Ud)||Ee.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=h.joint_position}),Ll(this.rapidlyChangingMotionState,h,Ud)||Ee.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=h.tcp_pose}),this.rapidlyChangingMotionState.standstill!==h.standstill&&Ee.runInAction(()=>{this.rapidlyChangingMotionState.standstill=h.standstill})}),Ee.makeAutoObservable(this)}static async connectMultiple(t,r){return Promise.all(r.map(n=>Cs.connect(t,n)))}static async connect(t,r){var S,R;const[n,o]=r.split("@"),s=await t.api.controller.getCurrentRobotControllerState(o),a=s==null?void 0:s.motion_groups.find(v=>v.motion_group===r);if(!s||!a)throw new Error(`Controller ${o} or motion group ${r} not found`);const i=t.openReconnectingWebsocket(`/controllers/${o}/motion-groups/${r}/state-stream`),l=await i.firstMessage(),c=(S=$e.tryParseJson(l.data))==null?void 0:S.result;if(!c)throw new Error(`Unable to parse initial motion state message ${l.data}`);console.log(`Connected motion state websocket to motion group ${a.motion_group}. Initial state:
153
- `,c);const d=(await t.api.controller.getRobotController(s.controller)).configuration.kind==="VirtualController",h=await t.api.motionGroup.getMotionGroupDescription(o,a.motion_group),p=Object.entries(h.tcps||{}).map(([v,O])=>({id:v,readable_name:O.name,position:O.pose.position,orientation:O.pose.orientation})),f=t.openReconnectingWebsocket(`/controllers/${s.controller}/state-stream?response_rate=1000`),m=await f.firstMessage(),y=(R=$e.tryParseJson(m.data))==null?void 0:R.result;if(!y)throw new Error(`Unable to parse initial controller state message ${m.data}`);return console.log(`Connected controller state websocket to controller ${s.controller}. Initial state:
154
- `,y),new Cs(t,s,a,c,i,d,p,h,y,f)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.description.motion_group_model}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replace(/-/g,"_")}_${t}`}get joggingVelocityRads(){return this.joggingVelocity*Math.PI/180}get joints(){return this.initialMotionState.joint_position.map((t,r)=>({index:r}))}get dhParameters(){if(this.description.dh_parameters!==void 0)return this.description.dh_parameters.map(t=>({..._P,...t}))}get safetyZones(){return this.description.safety_zones}get mountingPosition(){var t,r,n;return this.description.mounting?[(((t=this.description.mounting.position)==null?void 0:t[0])||0)/1e3,(((r=this.description.mounting.position)==null?void 0:r[1])||0)/1e3,(((n=this.description.mounting.position)==null?void 0:n[2])||0)/1e3]:[0,0,0]}get mountingQuaternion(){var o,s,a,i,l,c;const t=new Ce.Vector3(((s=(o=this.description.mounting)==null?void 0:o.orientation)==null?void 0:s[0])||0,((i=(a=this.description.mounting)==null?void 0:a.orientation)==null?void 0:i[1])||0,((c=(l=this.description.mounting)==null?void 0:l.orientation)==null?void 0:c[2])||0),r=t.length(),n=t.normalize();return new Ce.Quaternion().setFromAxisAngle(n,r)}get isEstopActive(){return["SAFETY_STATE_ROBOT_EMERGENCY_STOP","SAFETY_STATE_DEVICE_EMERGENCY_STOP"].includes(this.controllerState.safety_state)}get isMoveableSafetyState(){return["SAFETY_STATE_NORMAL","SAFETY_STATE_REDUCED"].includes(this.controllerState.safety_state)}get isMoveableOperationMode(){return["OPERATION_MODE_AUTO","OPERATION_MODE_MANUAL","OPERATION_MODE_MANUAL_T1","OPERATION_MODE_MANUAL_T2"].includes(this.controllerState.operation_mode)}get canBeMoved(){return this.isMoveableSafetyState&&this.isMoveableOperationMode&&this.activationState==="active"}async deactivate(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}Ee.runInAction(()=>{this.activationState="deactivating"});try{await this.nova.api.controller.setDefaultMode(this.controllerId,"ROBOT_SYSTEM_MODE_MONITOR"),Ee.runInAction(()=>{this.activationState="inactive"})}catch(t){throw Ee.runInAction(()=>{this.activationState="active"}),t}}async activate(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}Ee.runInAction(()=>{this.activationState="activating"});try{await this.nova.api.controller.setDefaultMode(this.controllerId,"ROBOT_SYSTEM_MODE_CONTROL"),Ee.runInAction(()=>{this.activationState="active"})}catch(t){throw Ee.runInAction(()=>{this.activationState="inactive"}),t}}toggleActivation(){this.activationState==="inactive"?this.activate():this.activationState==="active"&&this.deactivate()}dispose(){this.motionStateSocket.close(),this.connectedJoggingSocket&&this.connectedJoggingSocket.close()}setJoggingVelocity(t){this.joggingVelocity=t}}function Gf(){var t,r,n,o,s,a,i;const e=T.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.palette.divider} transparent`},".MuiDataGrid-panelContent":{borderRadius:"16px !important","& .MuiPaper-root":{borderRadius:"16px !important"}},".MuiDataGrid-filterForm":{borderRadius:"16px !important","& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}},"& .MuiTextField-root":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}},".MuiDataGrid-filterFormValueInput":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}}},MuiDataGrid:{styleOverrides:{root:{},panelContent:{borderRadius:"16px !important"},filterForm:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}},filterFormValueInput:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",borderRadius:"10px"}},variants:[{props:{color:"secondary",variant:"contained"},style:{border:`1px solid ${e.palette.divider}`,background:(n=(r=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:r.tonal)==null?void 0:n.toString()}},{props:{color:"secondary",variant:"outlined"},style:{border:`1px solid ${e.palette.divider}`}}]},MuiTab:{styleOverrides:{root:{textTransform:"none",color:e.palette.text.secondary,"&.Mui-selected":{color:e.palette.text.primary}}}},MuiTabs:{styleOverrides:{root:{background:(o=e.palette.backgroundPaperElevation)==null?void 0:o[1]}}},MuiToggleButtonGroup:{styleOverrides:{root:{".MuiToggleButtonGroup-firstButton":{borderRadius:"10px 0 0 10px"},".MuiToggleButtonGroup-lastButton":{borderRadius:"0 10px 10px 0"}}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none",padding:"6px 16px"}}},MuiSelect:{variants:[{props:{variant:"filled"},style:{borderRadius:"10px","::before, ::after":{visibility:"collapse"},".MuiInputBase-input":{padding:"6px 16px",borderRadius:"10px"}}}]},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"4px 0 8px -4px rgba(0, 0, 0, 0.3)"}}},MuiFab:{styleOverrides:{root:{background:(a=(s=e.paletteExt)==null?void 0:s.secondary)==null?void 0:a.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingPanel:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)",labelColor:e.palette.text.primary},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)",labelColor:e.palette.text.primary},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)",labelColor:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":T.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function VP(){const e=Gf();return e.palette.mode="light",e}function kP(e){var n,o,s,a;let t=!0;((n=e.palette)==null?void 0:n.mode)==="light"?t=!1:((o=e.palette)==null?void 0:o.mode)!=="dark"&&(t=!(typeof window<"u"&&((a=(s=window.matchMedia)==null?void 0:s.call(window,"(prefers-color-scheme: light)"))==null?void 0:a.matches)));const r=t?Gf():VP();return ih(r,e)}exports.AppHeader=Cm;exports.CollisionSceneRenderer=pm;exports.ConnectedMotionGroup=Cs;exports.CycleTimer=FC;exports.JoggerConnection=ca;exports.JoggingCartesianAxisControl=Ci;exports.JoggingJointRotationControl=kp;exports.JoggingPanel=yR;exports.JoggingStore=fa;exports.LoadingCover=Fl;exports.LoadingErrorMessage=uf;exports.LogPanel=TR;exports.LogStore=jf;exports.LogViewer=Df;exports.MANUFACTURER_HOME_CONFIGS=Bi;exports.MotionStreamConnection=la;exports.NoMotionGroupModal=IR;exports.PoseCartesianValues=xR;exports.PoseJointValues=SR;exports.PresetEnvironment=si;exports.ProgramControl=AR;exports.ProgramState=dt;exports.ProgramStateIndicator=Di;exports.Robot=$f;exports.RobotCard=FR;exports.RobotListItem=GR;exports.RobotSetupReadinessIndicator=Nf;exports.RobotSetupReadinessState=Jl;exports.SafetyBar=gP;exports.SafetyZonesRenderer=gm;exports.SelectableFab=bP;exports.SupportedRobot=Ff;exports.TabBar=vP;exports.Timer=IP;exports.TrajectoryRenderer=ym;exports.ValueInterpolator=Ml;exports.VelocitySlider=_f;exports.VelocitySliderLabel=ql;exports.WandelbotsDataGrid=Rp;exports.WandelscriptEditor=MP;exports.createDebugMessage=vR;exports.createErrorMessage=OR;exports.createInfoMessage=CR;exports.createLogMessage=po;exports.createNovaMuiTheme=kP;exports.createWarningMessage=wR;exports.defaultAxisConfig=HR;exports.defaultGetModel=Wl;exports.extractManufacturer=zf;exports.getDefaultHomeConfig=qR;exports.i18n=Li;exports.jointValuesEqual=Ul;exports.poseEqual=lf;exports.tcpMotionEqual=Ll;exports.unwrapRotationVector=cf;exports.useAnimationFrame=ta;exports.useAutorun=Pp;exports.useInterpolation=_l;exports.useMounted=ea;exports.useReaction=Mp;
155
- //# sourceMappingURL=index.cjs.map