@wandelbots/wandelbots-js-react-components 2.27.1-pr.feature-add-cycle-timer.368.3779de1 → 2.27.1-pr.feature-add-cycle-timer.368.c18c8bd
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CycleTimer.d.ts +8 -1
- package/dist/components/CycleTimer.d.ts.map +1 -1
- package/dist/index.cjs +39 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1918 -1842
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CycleTimer.tsx +84 -3
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var ty=Object.create;var
|
|
1
|
+
"use strict";var ty=Object.create;var wi=Object.defineProperty;var ry=Object.getOwnPropertyDescriptor;var ny=Object.getOwnPropertyNames;var ay=Object.getPrototypeOf,sy=Object.prototype.hasOwnProperty;var oy=(e,t,r)=>t in e?wi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var iy=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ny(t))!sy.call(e,a)&&a!==r&&wi(e,a,{get:()=>t[a],enumerable:!(n=ry(t,a))||n.enumerable});return e};var Ci=(e,t,r)=>(r=e!=null?ty(ay(e)):{},iy(t||!e||!e.__esModule?wi(r,"default",{value:e,enumerable:!0}):r,e));var la=(e,t,r)=>oy(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const se=require("react"),Lt=require("@react-three/drei"),ly=require("@react-three/fiber"),kt=require("three"),cy=require("three-stdlib"),W=require("@mui/material"),Je=require("mobx-react-lite"),ze=require("react-i18next"),uy=require("i18next-browser-languagedetector"),y=require("prop-types"),dy=require("@emotion/react"),hy=require("@emotion/styled"),Xe=require("mobx"),tc=require("lodash-es"),Nr=require("@wandelbots/nova-js"),ml=require("@react-spring/three"),py=require("react-error-boundary");function Pp(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 F=Pp(se),qe=Pp(kt);function fy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ds={exports:{}},ca={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var lu;function gy(){return lu||(lu=1,process.env.NODE_ENV!=="production"&&function(){var e=se,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),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.offscreen"),m=Symbol.iterator,f="@@iterator";function g(w){if(w===null||typeof w!="object")return null;var Y=m&&w[m]||w[f];return typeof Y=="function"?Y:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function
|
|
18
|
-
`+pt+w}}var X=!1,ie;{var he=typeof WeakMap=="function"?WeakMap:Map;ie=new he}function J(w,Y){if(!w||X)return"";{var ne=ie.get(w);if(ne!==void 0)return ne}var de;X=!0;var Pe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ae;Ae=
|
|
17
|
+
*/var lu;function gy(){return lu||(lu=1,process.env.NODE_ENV!=="production"&&function(){var e=se,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),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.offscreen"),m=Symbol.iterator,f="@@iterator";function g(w){if(w===null||typeof w!="object")return null;var Y=m&&w[m]||w[f];return typeof Y=="function"?Y:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function T(w){{for(var Y=arguments.length,ne=new Array(Y>1?Y-1:0),de=1;de<Y;de++)ne[de-1]=arguments[de];O("error",w,ne)}}function O(w,Y,ne){{var de=S.ReactDebugCurrentFrame,Pe=de.getStackAddendum();Pe!==""&&(Y+="%s",ne=ne.concat([Pe]));var Ae=ne.map(function(Se){return String(Se)});Ae.unshift("Warning: "+Y),Function.prototype.apply.call(console[w],console,Ae)}}var C=!1,E=!1,R=!1,P=!1,_=!1,B;B=Symbol.for("react.module.reference");function b(w){return!!(typeof w=="string"||typeof w=="function"||w===n||w===s||_||w===a||w===c||w===u||P||w===p||C||E||R||typeof w=="object"&&w!==null&&(w.$$typeof===h||w.$$typeof===d||w.$$typeof===o||w.$$typeof===i||w.$$typeof===l||w.$$typeof===B||w.getModuleId!==void 0))}function A(w,Y,ne){var de=w.displayName;if(de)return de;var Pe=Y.displayName||Y.name||"";return Pe!==""?ne+"("+Pe+")":ne}function z(w){return w.displayName||"Context"}function I(w){if(w==null)return null;if(typeof w.tag=="number"&&T("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case a:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof w=="object")switch(w.$$typeof){case i:var Y=w;return z(Y)+".Consumer";case o:var ne=w;return z(ne._context)+".Provider";case l:return A(w,w.render,"ForwardRef");case d:var de=w.displayName||null;return de!==null?de:I(w.type)||"Memo";case h:{var Pe=w,Ae=Pe._payload,Se=Pe._init;try{return I(Se(Ae))}catch{return null}}}return null}var G=Object.assign,re=0,te,oe,Z,ae,ge,ue,De;function ct(){}ct.__reactDisabledLog=!0;function It(){{if(re===0){te=console.log,oe=console.info,Z=console.warn,ae=console.error,ge=console.group,ue=console.groupCollapsed,De=console.groupEnd;var w={configurable:!0,enumerable:!0,value:ct,writable:!0};Object.defineProperties(console,{info:w,log:w,warn:w,error:w,group:w,groupCollapsed:w,groupEnd:w})}re++}}function tt(){{if(re--,re===0){var w={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},w,{value:te}),info:G({},w,{value:oe}),warn:G({},w,{value:Z}),error:G({},w,{value:ae}),group:G({},w,{value:ge}),groupCollapsed:G({},w,{value:ue}),groupEnd:G({},w,{value:De})})}re<0&&T("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var St=S.ReactCurrentDispatcher,pt;function rt(w,Y,ne){{if(pt===void 0)try{throw Error()}catch(Pe){var de=Pe.stack.trim().match(/\n( *(at )?)/);pt=de&&de[1]||""}return`
|
|
18
|
+
`+pt+w}}var X=!1,ie;{var he=typeof WeakMap=="function"?WeakMap:Map;ie=new he}function J(w,Y){if(!w||X)return"";{var ne=ie.get(w);if(ne!==void 0)return ne}var de;X=!0;var Pe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ae;Ae=St.current,St.current=null,It();try{if(Y){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(mt){de=mt}Reflect.construct(w,[],Se)}else{try{Se.call()}catch(mt){de=mt}w.call(Se.prototype)}}else{try{throw Error()}catch(mt){de=mt}w()}}catch(mt){if(mt&&de&&typeof mt.stack=="string"){for(var xe=mt.stack.split(`
|
|
19
19
|
`),ut=de.stack.split(`
|
|
20
|
-
`),He=
|
|
21
|
-
`+
|
|
20
|
+
`),He=xe.length-1,Qe=ut.length-1;He>=1&&Qe>=0&&xe[He]!==ut[Qe];)Qe--;for(;He>=1&&Qe>=0;He--,Qe--)if(xe[He]!==ut[Qe]){if(He!==1||Qe!==1)do if(He--,Qe--,Qe<0||xe[He]!==ut[Qe]){var Rt=`
|
|
21
|
+
`+xe[He].replace(" at new "," at ");return w.displayName&&Rt.includes("<anonymous>")&&(Rt=Rt.replace("<anonymous>",w.displayName)),typeof w=="function"&&ie.set(w,Rt),Rt}while(He>=1&&Qe>=0);break}}}finally{X=!1,St.current=Ae,tt(),Error.prepareStackTrace=Pe}var dn=w?w.displayName||w.name:"",Ir=dn?rt(dn):"";return typeof w=="function"&&ie.set(w,Ir),Ir}function Oe(w,Y,ne){return J(w,!1)}function be(w){var Y=w.prototype;return!!(Y&&Y.isReactComponent)}function Ne(w,Y,ne){if(w==null)return"";if(typeof w=="function")return J(w,be(w));if(typeof w=="string")return rt(w);switch(w){case c:return rt("Suspense");case u:return rt("SuspenseList")}if(typeof w=="object")switch(w.$$typeof){case l:return Oe(w.render);case d:return Ne(w.type,Y,ne);case h:{var de=w,Pe=de._payload,Ae=de._init;try{return Ne(Ae(Pe),Y,ne)}catch{}}}return""}var ke=Object.prototype.hasOwnProperty,_e={},Mt=S.ReactDebugCurrentFrame;function er(w){if(w){var Y=w._owner,ne=Ne(w.type,w._source,Y?Y.type:null);Mt.setExtraStackFrame(ne)}else Mt.setExtraStackFrame(null)}function on(w,Y,ne,de,Pe){{var Ae=Function.call.bind(ke);for(var Se in w)if(Ae(w,Se)){var xe=void 0;try{if(typeof w[Se]!="function"){var ut=Error((de||"React class")+": "+ne+" type `"+Se+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof w[Se]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ut.name="Invariant Violation",ut}xe=w[Se](Y,Se,de,ne,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(He){xe=He}xe&&!(xe instanceof Error)&&(er(Pe),T("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",de||"React class",ne,Se,typeof xe),er(null)),xe instanceof Error&&!(xe.message in _e)&&(_e[xe.message]=!0,er(Pe),T("Failed %s type: %s",ne,xe.message),er(null))}}}var ln=Array.isArray;function mr(w){return ln(w)}function gr(w){{var Y=typeof Symbol=="function"&&Symbol.toStringTag,ne=Y&&w[Symbol.toStringTag]||w.constructor.name||"Object";return ne}}function cn(w){try{return Q(w),!1}catch{return!0}}function Q(w){return""+w}function ee(w){if(cn(w))return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",gr(w)),Q(w)}var le=S.ReactCurrentOwner,ve={key:!0,ref:!0,__self:!0,__source:!0},Ce,ce;function Ke(w){if(ke.call(w,"ref")){var Y=Object.getOwnPropertyDescriptor(w,"ref").get;if(Y&&Y.isReactWarning)return!1}return w.ref!==void 0}function at(w){if(ke.call(w,"key")){var Y=Object.getOwnPropertyDescriptor(w,"key").get;if(Y&&Y.isReactWarning)return!1}return w.key!==void 0}function Ge(w,Y){typeof w.ref=="string"&&le.current}function ft(w,Y){{var ne=function(){Ce||(Ce=!0,T("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Y))};ne.isReactWarning=!0,Object.defineProperty(w,"key",{get:ne,configurable:!0})}}function Er(w,Y){{var ne=function(){ce||(ce=!0,T("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Y))};ne.isReactWarning=!0,Object.defineProperty(w,"ref",{get:ne,configurable:!0})}}var Si=function(w,Y,ne,de,Pe,Ae,Se){var xe={$$typeof:t,type:w,key:Y,ref:ne,props:Se,_owner:Ae};return xe._store={},Object.defineProperty(xe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(xe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.defineProperty(xe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Pe}),Object.freeze&&(Object.freeze(xe.props),Object.freeze(xe)),xe};function aa(w,Y,ne,de,Pe){{var Ae,Se={},xe=null,ut=null;ne!==void 0&&(ee(ne),xe=""+ne),at(Y)&&(ee(Y.key),xe=""+Y.key),Ke(Y)&&(ut=Y.ref,Ge(Y,Pe));for(Ae in Y)ke.call(Y,Ae)&&!ve.hasOwnProperty(Ae)&&(Se[Ae]=Y[Ae]);if(w&&w.defaultProps){var He=w.defaultProps;for(Ae in He)Se[Ae]===void 0&&(Se[Ae]=He[Ae])}if(xe||ut){var Qe=typeof w=="function"?w.displayName||w.name||"Unknown":w;xe&&ft(Se,Qe),ut&&Er(Se,Qe)}return Si(w,xe,ut,Pe,de,le.current,Se)}}var sa=S.ReactCurrentOwner,un=S.ReactDebugCurrentFrame;function zt(w){if(w){var Y=w._owner,ne=Ne(w.type,w._source,Y?Y.type:null);un.setExtraStackFrame(ne)}else un.setExtraStackFrame(null)}var oa;oa=!1;function Le(w){return typeof w=="object"&&w!==null&&w.$$typeof===t}function Ye(){{if(sa.current){var w=I(sa.current.type);if(w)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+w+"`."}return""}}function ia(w){return""}var _r={};function $t(w){{var Y=Ye();if(!Y){var ne=typeof w=="string"?w:w.displayName||w.name;ne&&(Y=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+ne+">.")}return Y}}function nu(w,Y){{if(!w._store||w._store.validated||w.key!=null)return;w._store.validated=!0;var ne=$t(Y);if(_r[ne])return;_r[ne]=!0;var de="";w&&w._owner&&w._owner!==sa.current&&(de=" It was passed a child from "+I(w._owner.type)+"."),zt(w),
|
|
25
|
+
Check the top-level render call using <`+ne+">.")}return Y}}function nu(w,Y){{if(!w._store||w._store.validated||w.key!=null)return;w._store.validated=!0;var ne=$t(Y);if(_r[ne])return;_r[ne]=!0;var de="";w&&w._owner&&w._owner!==sa.current&&(de=" It was passed a child from "+I(w._owner.type)+"."),zt(w),T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ne,de),zt(null)}}function au(w,Y){{if(typeof w!="object")return;if(mr(w))for(var ne=0;ne<w.length;ne++){var de=w[ne];Le(de)&&nu(de,Y)}else if(Le(w))w._store&&(w._store.validated=!0);else if(w){var Pe=g(w);if(typeof Pe=="function"&&Pe!==w.entries)for(var Ae=Pe.call(w),Se;!(Se=Ae.next()).done;)Le(Se.value)&&nu(Se.value,Y)}}}function Jg(w){{var Y=w.type;if(Y==null||typeof Y=="string")return;var ne;if(typeof Y=="function")ne=Y.propTypes;else if(typeof Y=="object"&&(Y.$$typeof===l||Y.$$typeof===d))ne=Y.propTypes;else return;if(ne){var de=I(Y);on(ne,w.props,"prop",de,w)}else if(Y.PropTypes!==void 0&&!oa){oa=!0;var Pe=I(Y);T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Pe||"Unknown")}typeof Y.getDefaultProps=="function"&&!Y.getDefaultProps.isReactClassApproved&&T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Wg(w){{for(var Y=Object.keys(w.props),ne=0;ne<Y.length;ne++){var de=Y[ne];if(de!=="children"&&de!=="key"){zt(w),T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",de),zt(null);break}}w.ref!==null&&(zt(w),T("Invalid attribute `ref` supplied to `React.Fragment`."),zt(null))}}var su={};function ou(w,Y,ne,de,Pe,Ae){{var Se=b(w);if(!Se){var xe="";(w===void 0||typeof w=="object"&&w!==null&&Object.keys(w).length===0)&&(xe+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ut=ia();ut?xe+=ut:xe+=Ye();var He;w===null?He="null":mr(w)?He="array":w!==void 0&&w.$$typeof===t?(He="<"+(I(w.type)||"Unknown")+" />",xe=" Did you accidentally export a JSX literal instead of a component?"):He=typeof w,T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",He,xe)}var Qe=aa(w,Y,ne,Pe,Ae);if(Qe==null)return Qe;if(Se){var Rt=Y.children;if(Rt!==void 0)if(de)if(mr(Rt)){for(var dn=0;dn<Rt.length;dn++)au(Rt[dn],w);Object.freeze&&Object.freeze(Rt)}else T("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 au(Rt,w)}if(ke.call(Y,"key")){var Ir=I(w),mt=Object.keys(Y).filter(function(ey){return ey!=="key"}),Oi=mt.length>0?"{key: someKey, "+mt.join(": ..., ")+": ...}":"{key: someKey}";if(!su[Ir+Oi]){var Zg=mt.length>0?"{"+mt.join(": ..., ")+": ...}":"{}";T(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,
|
|
30
|
+
<%s key={someKey} {...props} />`,Oi,Ir,Zg,Ir),su[Ir+Oi]=!0}}return w===n?Wg(Qe):Jg(Qe),Qe}}function Kg(w,Y,ne){return ou(w,Y,ne,!0)}function Yg(w,Y,ne){return ou(w,Y,ne,!1)}var Qg=Yg,Xg=Kg;ua.Fragment=n,ua.jsx=Qg,ua.jsxs=Xg}()),ua}var cu;function yy(){return cu||(cu=1,process.env.NODE_ENV==="production"?ds.exports=my():ds.exports=gy()),ds.exports}var x=yy();function by(){return x.jsx(Lt.Environment,{children:x.jsx(vy,{})})}function vy({positions:e=[2,0,2,0,2,0,2,0]}){return x.jsxs(x.Fragment,{children:[x.jsx(Lt.Lightformer,{intensity:5,"rotation-x":Math.PI/2,position:[0,5,-9],scale:[10,10,1]}),x.jsx("group",{rotation:[0,.5,0],children:x.jsx("group",{children:e.map((t,r)=>x.jsx(Lt.Lightformer,{form:"circle",intensity:5,rotation:[Math.PI/2,0,0],position:[t,4,r*4],scale:[3,1,1]},r))})}),x.jsx(Lt.Lightformer,{intensity:40,"rotation-y":Math.PI/2,position:[-5,1,-1],scale:[20,.1,1]}),x.jsx(Lt.Lightformer,{intensity:20,"rotation-y":-Math.PI,position:[-5,-2,-1],scale:[20,.1,1]}),x.jsx(Lt.Lightformer,{"rotation-y":Math.PI/2,position:[-5,-1,-1],scale:[20,.5,1],intensity:5}),x.jsx(Lt.Lightformer,{"rotation-y":-Math.PI/2,position:[10,1,0],scale:[20,1,1],intensity:10}),x.jsx(Lt.Lightformer,{form:"ring",color:"white",intensity:5,scale:10,position:[-15,4,-18],target:[0,0,0]})]})}function xy(e){if(e.length<3)return console.log("Not enough vertices to define a plane"),{isCoplanar:!1};const t=new qe.Vector3(e[0].x,e[0].y,e[0].z),r=new qe.Vector3(e[1].x,e[1].y,e[1].z),n=new qe.Vector3(e[2].x,e[2].y,e[2].z),a=new qe.Vector3().subVectors(r,t),s=new qe.Vector3().subVectors(n,t),o=new qe.Vector3().crossVectors(a,s).normalize();for(let i=3;i<e.length;i++){const l=new qe.Vector3(e[i].x,e[i].y,e[i].z),c=new qe.Vector3().subVectors(l,t),u=o.dot(c);if(Math.abs(u)>1e-6)return console.log("Vertices are not on the same plane"),{isCoplanar:!1}}return{isCoplanar:!0,normal:o}}function Sy({safetyZones:e,...t}){return x.jsx("group",{...t,children:e.map((r,n)=>{let a=[];return r.geometry&&(r.geometry.compound?a=r.geometry.compound.child_geometries:r.geometry.convex_hull&&(a=[r.geometry])),a.map((s,o)=>{if(!s.convex_hull)return null;const i=s.convex_hull.vertices.map(u=>new qe.Vector3(u.x/1e3,u.y/1e3,u.z/1e3)),l=xy(i);if(l.isCoplanar&&l.normal){const d=new qe.Vector3().addVectors(i[0],l.normal.multiplyScalar(1e-4));i.push(d)}let c;try{c=new cy.ConvexGeometry(i)}catch(u){return console.log("Error creating ConvexGeometry:",u),null}return x.jsx("mesh",{geometry:c,children:x.jsx("meshStandardMaterial",{attach:"material",color:"#009f4d",opacity:.2,depthTest:!1,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-o},n)},`${n}-${o}`)})})})}function Oy({trajectory:e,...t}){var n;const r=((n=e.trajectory)==null?void 0:n.map(a=>a.tcp_pose?new qe.Vector3(a.tcp_pose.position.x/1e3,a.tcp_pose.position.z/1e3,-a.tcp_pose.position.y/1e3):null).filter(a=>a!==null))||[];return x.jsx("group",{...t,children:r.length>0&&x.jsx(Lt.Line,{points:r,lineWidth:3,polygonOffset:!0,polygonOffsetFactor:10,polygonOffsetUnits:10})})}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 Cr(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 wy(e,t,r=void 0){const n={};for(const a in e){const s=e[a];let o="",i=!0;for(let l=0;l<s.length;l+=1){const c=s[l];c&&(o+=(i===!0?"":" ")+t(c),i=!1,r&&r[c]&&(o+=" "+r[c]))}n[a]=o}return n}function Rp(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Rp(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Nt(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Rp(e))&&(n&&(n+=" "),n+=t);return n}function Pr(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 Tp="$$material";function Cy(e){for(var t=0,r,n=0,a=e.length;a>=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Py={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 Ry(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Ty=/[A-Z]|^ms/g,Ay=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ap=function(t){return t.charCodeAt(1)===45},uu=function(t){return t!=null&&typeof t!="boolean"},Pi=Ry(function(e){return Ap(e)?e:e.replace(Ty,"-$&").toLowerCase()}),du=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Ay,function(n,a,s){return Or={name:a,styles:s,next:Or},a})}return Py[t]!==1&&!Ap(t)&&typeof r=="number"&&r!==0?r+"px":r};function Ys(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return Or={name:a.name,styles:a.styles,next:Or},a.name;var s=r;if(s.styles!==void 0){var o=s.next;if(o!==void 0)for(;o!==void 0;)Or={name:o.name,styles:o.styles,next:Or},o=o.next;var i=s.styles+";";return i}return Vy(e,t,r)}}var l=r;return l}function Vy(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a<r.length;a++)n+=Ys(e,t,r[a])+";";else for(var s in r){var o=r[s];if(typeof o!="object"){var i=o;uu(i)&&(n+=Pi(s)+":"+du(s,i)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&t==null)for(var l=0;l<o.length;l++)uu(o[l])&&(n+=Pi(s)+":"+du(s,o[l])+";");else{var c=Ys(e,t,o);switch(s){case"animation":case"animationName":{n+=Pi(s)+":"+c+";";break}default:n+=s+"{"+c+"}"}}}return n}var hu=/label:\s*([^\s;{]+)\s*(;|$)/g,Or;function Ey(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,a="";Or=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,a+=Ys(r,t,s);else{var o=s;a+=o[0]}for(var i=1;i<e.length;i++)if(a+=Ys(r,t,e[i]),n){var l=s;a+=l[i]}hu.lastIndex=0;for(var c="",u;(u=hu.exec(a))!==null;)c+="-"+u[1];var d=Cy(a)+c;return{name:d,styles:a,next:Or}}/**
|
|
31
31
|
* @mui/styled-engine v6.4.6
|
|
32
32
|
*
|
|
33
33
|
* @license MIT
|
|
@@ -51,16 +51,16 @@ React keys must be passed directly to JSX without using spread:
|
|
|
51
51
|
* This source code is licensed under the MIT license found in the
|
|
52
52
|
* LICENSE file in the root directory of this source tree.
|
|
53
53
|
*/var gu;function $y(){return gu||(gu=1,process.env.NODE_ENV!=="production"&&function(){function e(f){if(typeof f=="object"&&f!==null){var g=f.$$typeof;switch(g){case t:switch(f=f.type,f){case n:case s:case a:case c:case u:case p:return f;default:switch(f=f&&f.$$typeof,f){case i:case l:case h:case d:return f;case o:return f;default:return g}}case r:return g}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=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"),m=Symbol.for("react.client.reference");Te.ContextConsumer=o,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=a,Te.Suspense=c,Te.SuspenseList=u,Te.isContextConsumer=function(f){return e(f)===o},Te.isContextProvider=function(f){return e(f)===i},Te.isElement=function(f){return typeof f=="object"&&f!==null&&f.$$typeof===t},Te.isForwardRef=function(f){return e(f)===l},Te.isFragment=function(f){return e(f)===n},Te.isLazy=function(f){return e(f)===h},Te.isMemo=function(f){return e(f)===d},Te.isPortal=function(f){return e(f)===r},Te.isProfiler=function(f){return e(f)===s},Te.isStrictMode=function(f){return e(f)===a},Te.isSuspense=function(f){return e(f)===c},Te.isSuspenseList=function(f){return e(f)===u},Te.isValidElementType=function(f){return typeof f=="string"||typeof f=="function"||f===n||f===s||f===a||f===c||f===u||typeof f=="object"&&f!==null&&(f.$$typeof===h||f.$$typeof===d||f.$$typeof===i||f.$$typeof===o||f.$$typeof===l||f.$$typeof===m||f.getModuleId!==void 0)},Te.typeOf=e}()),Te}var yu;function jy(){return yu||(yu=1,process.env.NODE_ENV==="production"?hs.exports=My():hs.exports=$y()),hs.exports}var Qs=jy();function Wt(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 Vp(e){if(F.isValidElement(e)||Qs.isValidElementType(e)||!Wt(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Vp(e[r])}),t}function ht(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return Wt(e)&&Wt(t)&&Object.keys(t).forEach(a=>{F.isValidElement(t[a])||Qs.isValidElementType(t[a])?n[a]=t[a]:Wt(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&Wt(e[a])?n[a]=ht(e[a],t[a],r):r.clone?n[a]=Wt(t[a])?Vp(t[a]):t[a]:n[a]=t[a]}),n}const ky=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 Ly(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...a}=e,s=ky(t),o=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 m=o.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r}) and (max-width:${(m!==-1&&typeof t[o[m]]=="number"?t[o[m]]:p)-n/100}${r})`}function u(h){return o.indexOf(h)+1<o.length?c(h,o[o.indexOf(h)+1]):i(h)}function d(h){const p=o.indexOf(h);return p===0?i(o[1]):p===o.length-1?l(o[p]):c(h,o[o.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:o,values:s,up:i,down:l,between:c,only:u,not:d,unit:r,...a}}function Uy(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,a)=>{var o,i;const s=/min-width:\s*([0-9.]+)/;return+(((o=n.match(s))==null?void 0:o[1])||0)-+(((i=a.match(s))==null?void 0:i[1])||0)});return r.length?r.reduce((n,a)=>{const s=t[a];return delete n[a],n[a]=s,n},{...t}):t}function Dy(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function Ny(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>\`.
|
|
54
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Pr(18,`(${t})`));return null}const[,n,a]=r,s=Number.isNaN(+n)?n||0:+n;return e.containerQueries(a).up(s)}function Fy(e){const t=(s,o)=>s.replace("@media",o?`@container ${o}`:"@container");function r(s,o){s.up=(...i)=>t(e.breakpoints.up(...i),o),s.down=(...i)=>t(e.breakpoints.down(...i),o),s.between=(...i)=>t(e.breakpoints.between(...i),o),s.only=(...i)=>t(e.breakpoints.only(...i),o),s.not=(...i)=>{const l=t(e.breakpoints.not(...i),o);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={},a=s=>(r(n,s),n);return r(a),{...e,containerQueries:a}}const By={borderRadius:4},Ar=process.env.NODE_ENV!=="production"?y.oneOfType([y.number,y.string,y.object,y.array]):{};function _a(e,t){return t?ht(e,t,{clone:!1}):e}const
|
|
54
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Pr(18,`(${t})`));return null}const[,n,a]=r,s=Number.isNaN(+n)?n||0:+n;return e.containerQueries(a).up(s)}function Fy(e){const t=(s,o)=>s.replace("@media",o?`@container ${o}`:"@container");function r(s,o){s.up=(...i)=>t(e.breakpoints.up(...i),o),s.down=(...i)=>t(e.breakpoints.down(...i),o),s.between=(...i)=>t(e.breakpoints.between(...i),o),s.only=(...i)=>t(e.breakpoints.only(...i),o),s.not=(...i)=>{const l=t(e.breakpoints.not(...i),o);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={},a=s=>(r(n,s),n);return r(a),{...e,containerQueries:a}}const By={borderRadius:4},Ar=process.env.NODE_ENV!=="production"?y.oneOfType([y.number,y.string,y.object,y.array]):{};function _a(e,t){return t?ht(e,t,{clone:!1}):e}const Ao={xs:0,sm:600,md:900,lg:1200,xl:1536},bu={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Ao[e]}px)`},zy={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Ao[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Ft(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||bu;return t.reduce((o,i,l)=>(o[s.up(s.keys[l])]=r(t[l]),o),{})}if(typeof t=="object"){const s=n.breakpoints||bu;return Object.keys(t).reduce((o,i)=>{if(Dy(s.keys,i)){const l=Ny(n.containerQueries?n:zy,i);l&&(o[l]=r(t[i],i))}else if(Object.keys(s.values||Ao).includes(i)){const l=s.up(i);o[l]=r(t[i],i)}else{const l=i;o[l]=t[l]}return o},{})}return r(t)}function Ep(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,a)=>{const s=e.up(a);return n[s]={},n},{}))||{}}function _p(e,t){return e.reduce((r,n)=>{const a=r[n];return(!a||Object.keys(a).length===0)&&delete r[n],r},t)}function Gy(e,...t){const r=Ep(e),n=[r,...t].reduce((a,s)=>ht(a,s),{});return _p(Object.keys(r),n)}function Hy(e,t){if(typeof e!="object")return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((a,s)=>{s<e.length&&(r[a]=!0)}):n.forEach(a=>{e[a]!=null&&(r[a]=!0)}),r}function Ri({values:e,breakpoints:t,base:r}){const n=r||Hy(e,t),a=Object.keys(n);if(a.length===0)return e;let s;return a.reduce((o,i,l)=>(Array.isArray(e)?(o[i]=e[l]!=null?e[l]:e[s],s=l):typeof e=="object"?(o[i]=e[i]!=null?e[i]:e[s],s=i):o[i]=e,o),{})}function dt(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Pr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Vo(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((a,s)=>a&&a[s]?a[s]:null,e);if(n!=null)return n}return t.split(".").reduce((n,a)=>n&&n[a]!=null?n[a]:null,e)}function Xs(e,t,r,n=r){let a;return typeof e=="function"?a=e(r):Array.isArray(e)?a=e[r]||n:a=Vo(e,r)||n,t&&(a=t(a,n,e)),a}function We(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:a}=e,s=o=>{if(o[t]==null)return null;const i=o[t],l=o.theme,c=Vo(l,n)||{};return Ft(o,i,d=>{let h=Xs(c,a,d);return d===h&&typeof d=="string"&&(h=Xs(c,a,`${t}${d==="default"?"":dt(d)}`,d)),r===!1?h:{[r]:h}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:Ar}:{},s.filterProps=[t],s}function qy(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const Jy={m:"margin",p:"padding"},Wy={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},vu={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Ky=qy(e=>{if(e.length>2)if(vu[e])e=vu[e];else return[e];const[t,r]=e.split(""),n=Jy[t],a=Wy[r]||"";return Array.isArray(a)?a.map(s=>n+s):[n+a]}),Eo=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],_o=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Yy=[...Eo,..._o];function Za(e,t,r,n){const a=Vo(e,t,!0)??r;return typeof a=="number"||typeof a=="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 a=="string"?`calc(${s} * ${a})`:a*s):Array.isArray(a)?s=>{if(typeof s=="string")return s;const o=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(o)?o>a.length-1&&console.error([`MUI: The value provided (${o}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${o} > ${a.length-1}, you need to add the missing values.`].join(`
|
|
55
55
|
`)):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(`
|
|
56
56
|
`)));const i=a[o];return s>=0?i:typeof i=="number"?-i:`-${i}`}:typeof a=="function"?a:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${a}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
57
|
-
`)),()=>{})}function _o(e){return Za(e,"spacing",8,"spacing")}function zr(e,t){return typeof t=="string"||t==null?t:e(t)}function Qy(e,t){return r=>e.reduce((n,a)=>(n[a]=zr(t,r),n),{})}function Xy(e,t,r,n){if(!t.includes(r))return null;const a=Ky(r),s=Qy(a,n),o=e[r];return Ft(e,o,s)}function Ip(e,t){const r=_o(e.theme);return Object.keys(e).map(n=>Xy(e,t,n,r)).reduce(_a,{})}function Fe(e){return Ip(e,Vo)}Fe.propTypes=process.env.NODE_ENV!=="production"?Vo.reduce((e,t)=>(e[t]=Ar,e),{}):{};Fe.filterProps=Vo;function Be(e){return Ip(e,Eo)}Be.propTypes=process.env.NODE_ENV!=="production"?Eo.reduce((e,t)=>(e[t]=Ar,e),{}):{};Be.filterProps=Eo;process.env.NODE_ENV!=="production"&&Yy.reduce((e,t)=>(e[t]=Ar,e),{});function Mp(e=8,t=_o({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 o=t(s);return typeof o=="number"?`${o}px`:o}).join(" "));return r.mui=!0,r}function Io(...e){const t=e.reduce((n,a)=>(a.filterProps.forEach(s=>{n[s]=a}),n),{}),r=n=>Object.keys(n).reduce((a,s)=>t[s]?_a(a,t[s](n)):a,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,a)=>Object.assign(n,a.propTypes),{}):{},r.filterProps=e.reduce((n,a)=>n.concat(a.filterProps),[]),r}function Tt(e){return typeof e!="number"?e:`${e}px solid`}function _t(e,t){return We({prop:e,themeKey:"borders",transform:t})}const Zy=_t("border",Tt),e0=_t("borderTop",Tt),t0=_t("borderRight",Tt),r0=_t("borderBottom",Tt),n0=_t("borderLeft",Tt),a0=_t("borderColor"),s0=_t("borderTopColor"),o0=_t("borderRightColor"),i0=_t("borderBottomColor"),l0=_t("borderLeftColor"),c0=_t("outline",Tt),u0=_t("outlineColor"),Mo=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Za(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:zr(t,n)});return Ft(e,e.borderRadius,r)}return null};Mo.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Ar}:{};Mo.filterProps=["borderRadius"];Io(Zy,e0,t0,r0,n0,a0,s0,o0,i0,l0,Mo,c0,u0);const $o=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Za(e.theme,"spacing",8,"gap"),r=n=>({gap:zr(t,n)});return Ft(e,e.gap,r)}return null};$o.propTypes=process.env.NODE_ENV!=="production"?{gap:Ar}:{};$o.filterProps=["gap"];const jo=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Za(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:zr(t,n)});return Ft(e,e.columnGap,r)}return null};jo.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Ar}:{};jo.filterProps=["columnGap"];const ko=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Za(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:zr(t,n)});return Ft(e,e.rowGap,r)}return null};ko.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Ar}:{};ko.filterProps=["rowGap"];const d0=We({prop:"gridColumn"}),h0=We({prop:"gridRow"}),p0=We({prop:"gridAutoFlow"}),f0=We({prop:"gridAutoColumns"}),m0=We({prop:"gridAutoRows"}),g0=We({prop:"gridTemplateColumns"}),y0=We({prop:"gridTemplateRows"}),b0=We({prop:"gridTemplateAreas"}),v0=We({prop:"gridArea"});Io($o,jo,ko,d0,h0,p0,f0,m0,g0,y0,b0,v0);function Mn(e,t){return t==="grey"?t:e}const S0=We({prop:"color",themeKey:"palette",transform:Mn}),x0=We({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Mn}),O0=We({prop:"backgroundColor",themeKey:"palette",transform:Mn});Io(S0,x0,O0);function wt(e){return e<=1&&e!==0?`${e*100}%`:e}const w0=We({prop:"width",transform:wt}),tc=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var a,s,o,i,l;const n=((o=(s=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:s.values)==null?void 0:o[r])||To[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:wt(r)}};return Ft(e,e.maxWidth,t)}return null};tc.filterProps=["maxWidth"];const C0=We({prop:"minWidth",transform:wt}),P0=We({prop:"height",transform:wt}),R0=We({prop:"maxHeight",transform:wt}),T0=We({prop:"minHeight",transform:wt});We({prop:"size",cssProperty:"width",transform:wt});We({prop:"size",cssProperty:"height",transform:wt});const A0=We({prop:"boxSizing"});Io(w0,tc,C0,P0,R0,T0,A0);const es={border:{themeKey:"borders",transform:Tt},borderTop:{themeKey:"borders",transform:Tt},borderRight:{themeKey:"borders",transform:Tt},borderBottom:{themeKey:"borders",transform:Tt},borderLeft:{themeKey:"borders",transform:Tt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Tt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Mo},color:{themeKey:"palette",transform:Mn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Mn},backgroundColor:{themeKey:"palette",transform:Mn},p:{style:Be},pt:{style:Be},pr:{style:Be},pb:{style:Be},pl:{style:Be},px:{style:Be},py:{style:Be},padding:{style:Be},paddingTop:{style:Be},paddingRight:{style:Be},paddingBottom:{style:Be},paddingLeft:{style:Be},paddingX:{style:Be},paddingY:{style:Be},paddingInline:{style:Be},paddingInlineStart:{style:Be},paddingInlineEnd:{style:Be},paddingBlock:{style:Be},paddingBlockStart:{style:Be},paddingBlockEnd:{style:Be},m:{style:Fe},mt:{style:Fe},mr:{style:Fe},mb:{style:Fe},ml:{style:Fe},mx:{style:Fe},my:{style:Fe},margin:{style:Fe},marginTop:{style:Fe},marginRight:{style:Fe},marginBottom:{style:Fe},marginLeft:{style:Fe},marginX:{style:Fe},marginY:{style:Fe},marginInline:{style:Fe},marginInlineStart:{style:Fe},marginInlineEnd:{style:Fe},marginBlock:{style:Fe},marginBlockStart:{style:Fe},marginBlockEnd:{style:Fe},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:$o},rowGap:{style:ko},columnGap:{style:jo},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:wt},maxWidth:{style:tc},minWidth:{transform:wt},height:{transform:wt},maxHeight:{transform:wt},minHeight:{transform:wt},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 V0(...e){const t=e.reduce((n,a)=>n.concat(Object.keys(a)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function E0(e,t){return typeof e=="function"?e(t):e}function _0(){function e(r,n,a,s){const o={[r]:n,theme:a},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=Ao(a,c)||{};return d?d(o):Ft(o,n,m=>{let f=Xs(h,u,m);return m===f&&typeof m=="string"&&(f=Xs(h,u,`${r}${m==="default"?"":dt(m)}`,m)),l===!1?f:{[l]:f}})}function t(r){const{sx:n,theme:a={}}=r||{};if(!n)return null;const s=a.unstable_sxConfig??es;function o(i){let l=i;if(typeof i=="function")l=i(a);else if(typeof i!="object")return i;if(!l)return null;const c=Ep(a.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(h=>{const p=E0(l[h],a);if(p!=null)if(typeof p=="object")if(s[h])d=_a(d,e(h,p,a,s));else{const m=Ft({theme:a},p,f=>({[h]:f}));V0(m,p)?d[h]=t({sx:p,theme:a}):d=_a(d,m)}else d=_a(d,e(h,p,a,s))}),Uy(a,_p(u,d))}return Array.isArray(n)?n.map(o):o(n)}return t}const Un=_0();Un.filterProps=["sx"];function I0(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let a=r.getColorSchemeSelector(e);return a==="&"?t:((a.includes("data-")||a.includes("."))&&(a=`*:where(${a.replace(/\s*&$/,"")}) &`),{[a]:t})}return r.palette.mode===e?t:{}}function Lo(e={},...t){const{breakpoints:r={},palette:n={},spacing:a,shape:s={},...o}=e,i=Ly(r),l=Mp(a);let c=ht({breakpoints:i,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...By,...s}},o);return c=Fy(c),c.applyStyles=I0,c=t.reduce((u,d)=>ht(u,d),c),c.unstable_sxConfig={...es,...o==null?void 0:o.unstable_sxConfig},c.unstable_sx=function(d){return Un({sx:d,theme:this})},c}function M0(e){return Object.keys(e).length===0}function $0(e=null){const t=F.useContext(dy.ThemeContext);return!t||M0(t)?e:t}const j0=Lo();function k0(e=j0){return $0(e)}const L0=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??es;return Object.keys(e).forEach(a=>{r[a]?t.systemProps[a]=e[a]:t.otherProps[a]=e[a]}),t};function U0(e){const{sx:t,...r}=e,{systemProps:n,otherProps:a}=L0(r);let s;return Array.isArray(t)?s=[n,...t]:typeof t=="function"?s=(...o)=>{const i=t(...o);return Wt(i)?{...n,...i}:n}:s={...n,...t},{...a,sx:s}}const Su=e=>e,D0=()=>{let e=Su;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Su}}},N0=D0(),F0={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 ts(e,t,r="Mui"){const n=F0[t];return n?`${r}-${n}`:`${N0.generate(e)}-${t}`}function $p(e,t,r="Mui"){const n={};return t.forEach(a=>{n[a]=ts(e,a,r)}),n}function jp(e,t=""){return e.displayName||e.name||t}function xu(e,t,r){const n=jp(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function B0(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return jp(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Qs.ForwardRef:return xu(e,e.render,"ForwardRef");case Qs.Memo:return xu(e,e.type,"memo");default:return}}}function kp(e){const{variants:t,...r}=e,n={variants:t,style:fu(r),isProcessed:!0};return n.style===r||t&&t.forEach(a=>{typeof a.style!="function"&&(a.style=fu(a.style))}),n}const z0=Lo();function Ri(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function G0(e){return e?(t,r)=>r[e]:null}function H0(e,t,r){e.theme=W0(e.theme)?r:e.theme[t]||e.theme}function Ns(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>Ns(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:a,...s}=r;n=s}return Lp(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Lp(e,t,r=[]){var a;let n;e:for(let s=0;s<t.length;s+=1){const o=t[s];if(typeof o.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!o.props(n))continue}else for(const i in o.props)if(e[i]!==o.props[i]&&((a=e.ownerState)==null?void 0:a[i])!==o.props[i])continue e;typeof o.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(o.style(n))):r.push(o.style)}return r}function Up(e={}){const{themeId:t,defaultTheme:r=z0,rootShouldForwardProp:n=Ri,slotShouldForwardProp:a=Ri}=e;function s(i){H0(i,t,r)}return(i,l={})=>{Iy(i,E=>E.filter(T=>T!==Un));const{name:c,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:p=G0(Dp(u)),...m}=l,f=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,g=h||!1;let S=Ri;u==="Root"||u==="root"?S=n:u?S=a:K0(i)&&(S=void 0);const R=_y(i,{shouldForwardProp:S,label:J0(c,u),...m}),O=E=>{if(typeof E=="function"&&E.__emotion_real!==E)return function(P){return Ns(P,E)};if(Wt(E)){const T=kp(E);return T.variants?function(_){return Ns(_,T)}:T.style}return E},C=(...E)=>{const T=[],P=E.map(O),_=[];if(T.push(s),c&&p&&_.push(function(z){var te,oe;const G=(oe=(te=z.theme.components)==null?void 0:te[c])==null?void 0:oe.styleOverrides;if(!G)return null;const re={};for(const Z in G)re[Z]=Ns(z,G[Z]);return p(z,re)}),c&&!f&&_.push(function(z){var re,te;const I=z.theme,G=(te=(re=I==null?void 0:I.components)==null?void 0:re[c])==null?void 0:te.variants;return G?Lp(z,G):null}),g||_.push(Un),Array.isArray(P[0])){const A=P.shift(),z=new Array(T.length).fill(""),I=new Array(_.length).fill("");let G;G=[...z,...A,...I],G.raw=[...z,...A.raw,...I],T.unshift(G)}const B=[...T,...P,..._],b=R(...B);return i.muiName&&(b.muiName=i.muiName),process.env.NODE_ENV!=="production"&&(b.displayName=q0(c,u,i)),b};return R.withConfig&&(C.withConfig=R.withConfig),C}}function q0(e,t,r){return e?`${e}${dt(t||"")}`:`Styled(${B0(r)})`}function J0(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Dp(t||"Root")}`),r}function W0(e){for(const t in e)return!1;return!0}function K0(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Dp(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Y0=Up();function Zs(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const a=n;if(a==="components"||a==="slots")r[a]={...e[a],...r[a]};else if(a==="componentsProps"||a==="slotProps"){const s=e[a],o=t[a];if(!o)r[a]=s||{};else if(!s)r[a]=o;else{r[a]={...o};for(const i in s)if(Object.prototype.hasOwnProperty.call(s,i)){const l=i;r[a][l]=Zs(s[l],o[l])}}}else r[a]===void 0&&(r[a]=e[a])}return r}function Q0(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:Zs(t.components[r].defaultProps,n)}function Np({props:e,name:t,defaultTheme:r,themeId:n}){let a=k0(r);return n&&(a=a[n]||a),Q0({theme:a,name:t,props:e})}const Fp=typeof window<"u"?F.useLayoutEffect:F.useEffect;function Vn(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function rc(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}].`),Vn(e,t,r)}function X0(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,a)=>a<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function Rr(e){if(e.type)return e;if(e.charAt(0)==="#")return Rr(X0(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.
|
|
57
|
+
`)),()=>{})}function Io(e){return Za(e,"spacing",8,"spacing")}function zr(e,t){return typeof t=="string"||t==null?t:e(t)}function Qy(e,t){return r=>e.reduce((n,a)=>(n[a]=zr(t,r),n),{})}function Xy(e,t,r,n){if(!t.includes(r))return null;const a=Ky(r),s=Qy(a,n),o=e[r];return Ft(e,o,s)}function Ip(e,t){const r=Io(e.theme);return Object.keys(e).map(n=>Xy(e,t,n,r)).reduce(_a,{})}function Fe(e){return Ip(e,Eo)}Fe.propTypes=process.env.NODE_ENV!=="production"?Eo.reduce((e,t)=>(e[t]=Ar,e),{}):{};Fe.filterProps=Eo;function Be(e){return Ip(e,_o)}Be.propTypes=process.env.NODE_ENV!=="production"?_o.reduce((e,t)=>(e[t]=Ar,e),{}):{};Be.filterProps=_o;process.env.NODE_ENV!=="production"&&Yy.reduce((e,t)=>(e[t]=Ar,e),{});function Mp(e=8,t=Io({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 o=t(s);return typeof o=="number"?`${o}px`:o}).join(" "));return r.mui=!0,r}function Mo(...e){const t=e.reduce((n,a)=>(a.filterProps.forEach(s=>{n[s]=a}),n),{}),r=n=>Object.keys(n).reduce((a,s)=>t[s]?_a(a,t[s](n)):a,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,a)=>Object.assign(n,a.propTypes),{}):{},r.filterProps=e.reduce((n,a)=>n.concat(a.filterProps),[]),r}function Tt(e){return typeof e!="number"?e:`${e}px solid`}function _t(e,t){return We({prop:e,themeKey:"borders",transform:t})}const Zy=_t("border",Tt),e0=_t("borderTop",Tt),t0=_t("borderRight",Tt),r0=_t("borderBottom",Tt),n0=_t("borderLeft",Tt),a0=_t("borderColor"),s0=_t("borderTopColor"),o0=_t("borderRightColor"),i0=_t("borderBottomColor"),l0=_t("borderLeftColor"),c0=_t("outline",Tt),u0=_t("outlineColor"),$o=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Za(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:zr(t,n)});return Ft(e,e.borderRadius,r)}return null};$o.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Ar}:{};$o.filterProps=["borderRadius"];Mo(Zy,e0,t0,r0,n0,a0,s0,o0,i0,l0,$o,c0,u0);const jo=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Za(e.theme,"spacing",8,"gap"),r=n=>({gap:zr(t,n)});return Ft(e,e.gap,r)}return null};jo.propTypes=process.env.NODE_ENV!=="production"?{gap:Ar}:{};jo.filterProps=["gap"];const ko=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Za(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:zr(t,n)});return Ft(e,e.columnGap,r)}return null};ko.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Ar}:{};ko.filterProps=["columnGap"];const Lo=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Za(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:zr(t,n)});return Ft(e,e.rowGap,r)}return null};Lo.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Ar}:{};Lo.filterProps=["rowGap"];const d0=We({prop:"gridColumn"}),h0=We({prop:"gridRow"}),p0=We({prop:"gridAutoFlow"}),f0=We({prop:"gridAutoColumns"}),m0=We({prop:"gridAutoRows"}),g0=We({prop:"gridTemplateColumns"}),y0=We({prop:"gridTemplateRows"}),b0=We({prop:"gridTemplateAreas"}),v0=We({prop:"gridArea"});Mo(jo,ko,Lo,d0,h0,p0,f0,m0,g0,y0,b0,v0);function Mn(e,t){return t==="grey"?t:e}const x0=We({prop:"color",themeKey:"palette",transform:Mn}),S0=We({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Mn}),O0=We({prop:"backgroundColor",themeKey:"palette",transform:Mn});Mo(x0,S0,O0);function wt(e){return e<=1&&e!==0?`${e*100}%`:e}const w0=We({prop:"width",transform:wt}),rc=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var a,s,o,i,l;const n=((o=(s=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:s.values)==null?void 0:o[r])||Ao[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:wt(r)}};return Ft(e,e.maxWidth,t)}return null};rc.filterProps=["maxWidth"];const C0=We({prop:"minWidth",transform:wt}),P0=We({prop:"height",transform:wt}),R0=We({prop:"maxHeight",transform:wt}),T0=We({prop:"minHeight",transform:wt});We({prop:"size",cssProperty:"width",transform:wt});We({prop:"size",cssProperty:"height",transform:wt});const A0=We({prop:"boxSizing"});Mo(w0,rc,C0,P0,R0,T0,A0);const es={border:{themeKey:"borders",transform:Tt},borderTop:{themeKey:"borders",transform:Tt},borderRight:{themeKey:"borders",transform:Tt},borderBottom:{themeKey:"borders",transform:Tt},borderLeft:{themeKey:"borders",transform:Tt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Tt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:$o},color:{themeKey:"palette",transform:Mn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Mn},backgroundColor:{themeKey:"palette",transform:Mn},p:{style:Be},pt:{style:Be},pr:{style:Be},pb:{style:Be},pl:{style:Be},px:{style:Be},py:{style:Be},padding:{style:Be},paddingTop:{style:Be},paddingRight:{style:Be},paddingBottom:{style:Be},paddingLeft:{style:Be},paddingX:{style:Be},paddingY:{style:Be},paddingInline:{style:Be},paddingInlineStart:{style:Be},paddingInlineEnd:{style:Be},paddingBlock:{style:Be},paddingBlockStart:{style:Be},paddingBlockEnd:{style:Be},m:{style:Fe},mt:{style:Fe},mr:{style:Fe},mb:{style:Fe},ml:{style:Fe},mx:{style:Fe},my:{style:Fe},margin:{style:Fe},marginTop:{style:Fe},marginRight:{style:Fe},marginBottom:{style:Fe},marginLeft:{style:Fe},marginX:{style:Fe},marginY:{style:Fe},marginInline:{style:Fe},marginInlineStart:{style:Fe},marginInlineEnd:{style:Fe},marginBlock:{style:Fe},marginBlockStart:{style:Fe},marginBlockEnd:{style:Fe},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:jo},rowGap:{style:Lo},columnGap:{style:ko},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:wt},maxWidth:{style:rc},minWidth:{transform:wt},height:{transform:wt},maxHeight:{transform:wt},minHeight:{transform:wt},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 V0(...e){const t=e.reduce((n,a)=>n.concat(Object.keys(a)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function E0(e,t){return typeof e=="function"?e(t):e}function _0(){function e(r,n,a,s){const o={[r]:n,theme:a},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=Vo(a,c)||{};return d?d(o):Ft(o,n,m=>{let f=Xs(h,u,m);return m===f&&typeof m=="string"&&(f=Xs(h,u,`${r}${m==="default"?"":dt(m)}`,m)),l===!1?f:{[l]:f}})}function t(r){const{sx:n,theme:a={}}=r||{};if(!n)return null;const s=a.unstable_sxConfig??es;function o(i){let l=i;if(typeof i=="function")l=i(a);else if(typeof i!="object")return i;if(!l)return null;const c=Ep(a.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(h=>{const p=E0(l[h],a);if(p!=null)if(typeof p=="object")if(s[h])d=_a(d,e(h,p,a,s));else{const m=Ft({theme:a},p,f=>({[h]:f}));V0(m,p)?d[h]=t({sx:p,theme:a}):d=_a(d,m)}else d=_a(d,e(h,p,a,s))}),Uy(a,_p(u,d))}return Array.isArray(n)?n.map(o):o(n)}return t}const Un=_0();Un.filterProps=["sx"];function I0(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let a=r.getColorSchemeSelector(e);return a==="&"?t:((a.includes("data-")||a.includes("."))&&(a=`*:where(${a.replace(/\s*&$/,"")}) &`),{[a]:t})}return r.palette.mode===e?t:{}}function Uo(e={},...t){const{breakpoints:r={},palette:n={},spacing:a,shape:s={},...o}=e,i=Ly(r),l=Mp(a);let c=ht({breakpoints:i,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...By,...s}},o);return c=Fy(c),c.applyStyles=I0,c=t.reduce((u,d)=>ht(u,d),c),c.unstable_sxConfig={...es,...o==null?void 0:o.unstable_sxConfig},c.unstable_sx=function(d){return Un({sx:d,theme:this})},c}function M0(e){return Object.keys(e).length===0}function $0(e=null){const t=F.useContext(dy.ThemeContext);return!t||M0(t)?e:t}const j0=Uo();function k0(e=j0){return $0(e)}const L0=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??es;return Object.keys(e).forEach(a=>{r[a]?t.systemProps[a]=e[a]:t.otherProps[a]=e[a]}),t};function U0(e){const{sx:t,...r}=e,{systemProps:n,otherProps:a}=L0(r);let s;return Array.isArray(t)?s=[n,...t]:typeof t=="function"?s=(...o)=>{const i=t(...o);return Wt(i)?{...n,...i}:n}:s={...n,...t},{...a,sx:s}}const xu=e=>e,D0=()=>{let e=xu;return{configure(t){e=t},generate(t){return e(t)},reset(){e=xu}}},N0=D0(),F0={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 ts(e,t,r="Mui"){const n=F0[t];return n?`${r}-${n}`:`${N0.generate(e)}-${t}`}function $p(e,t,r="Mui"){const n={};return t.forEach(a=>{n[a]=ts(e,a,r)}),n}function jp(e,t=""){return e.displayName||e.name||t}function Su(e,t,r){const n=jp(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function B0(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return jp(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Qs.ForwardRef:return Su(e,e.render,"ForwardRef");case Qs.Memo:return Su(e,e.type,"memo");default:return}}}function kp(e){const{variants:t,...r}=e,n={variants:t,style:fu(r),isProcessed:!0};return n.style===r||t&&t.forEach(a=>{typeof a.style!="function"&&(a.style=fu(a.style))}),n}const z0=Uo();function Ti(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function G0(e){return e?(t,r)=>r[e]:null}function H0(e,t,r){e.theme=W0(e.theme)?r:e.theme[t]||e.theme}function Ns(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>Ns(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:a,...s}=r;n=s}return Lp(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Lp(e,t,r=[]){var a;let n;e:for(let s=0;s<t.length;s+=1){const o=t[s];if(typeof o.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!o.props(n))continue}else for(const i in o.props)if(e[i]!==o.props[i]&&((a=e.ownerState)==null?void 0:a[i])!==o.props[i])continue e;typeof o.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(o.style(n))):r.push(o.style)}return r}function Up(e={}){const{themeId:t,defaultTheme:r=z0,rootShouldForwardProp:n=Ti,slotShouldForwardProp:a=Ti}=e;function s(i){H0(i,t,r)}return(i,l={})=>{Iy(i,E=>E.filter(R=>R!==Un));const{name:c,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:p=G0(Dp(u)),...m}=l,f=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,g=h||!1;let S=Ti;u==="Root"||u==="root"?S=n:u?S=a:K0(i)&&(S=void 0);const T=_y(i,{shouldForwardProp:S,label:J0(c,u),...m}),O=E=>{if(typeof E=="function"&&E.__emotion_real!==E)return function(P){return Ns(P,E)};if(Wt(E)){const R=kp(E);return R.variants?function(_){return Ns(_,R)}:R.style}return E},C=(...E)=>{const R=[],P=E.map(O),_=[];if(R.push(s),c&&p&&_.push(function(z){var te,oe;const G=(oe=(te=z.theme.components)==null?void 0:te[c])==null?void 0:oe.styleOverrides;if(!G)return null;const re={};for(const Z in G)re[Z]=Ns(z,G[Z]);return p(z,re)}),c&&!f&&_.push(function(z){var re,te;const I=z.theme,G=(te=(re=I==null?void 0:I.components)==null?void 0:re[c])==null?void 0:te.variants;return G?Lp(z,G):null}),g||_.push(Un),Array.isArray(P[0])){const A=P.shift(),z=new Array(R.length).fill(""),I=new Array(_.length).fill("");let G;G=[...z,...A,...I],G.raw=[...z,...A.raw,...I],R.unshift(G)}const B=[...R,...P,..._],b=T(...B);return i.muiName&&(b.muiName=i.muiName),process.env.NODE_ENV!=="production"&&(b.displayName=q0(c,u,i)),b};return T.withConfig&&(C.withConfig=T.withConfig),C}}function q0(e,t,r){return e?`${e}${dt(t||"")}`:`Styled(${B0(r)})`}function J0(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Dp(t||"Root")}`),r}function W0(e){for(const t in e)return!1;return!0}function K0(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Dp(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Y0=Up();function Zs(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const a=n;if(a==="components"||a==="slots")r[a]={...e[a],...r[a]};else if(a==="componentsProps"||a==="slotProps"){const s=e[a],o=t[a];if(!o)r[a]=s||{};else if(!s)r[a]=o;else{r[a]={...o};for(const i in s)if(Object.prototype.hasOwnProperty.call(s,i)){const l=i;r[a][l]=Zs(s[l],o[l])}}}else r[a]===void 0&&(r[a]=e[a])}return r}function Q0(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:Zs(t.components[r].defaultProps,n)}function Np({props:e,name:t,defaultTheme:r,themeId:n}){let a=k0(r);return n&&(a=a[n]||a),Q0({theme:a,name:t,props:e})}const Fp=typeof window<"u"?F.useLayoutEffect:F.useEffect;function Vn(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function nc(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}].`),Vn(e,t,r)}function X0(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,a)=>a<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function Rr(e){if(e.type)return e;if(e.charAt(0)==="#")return Rr(X0(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.
|
|
58
58
|
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Pr(9,e));let n=e.substring(t+1,e.length-1),a;if(r==="color"){if(n=n.split(" "),a=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(a))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${a}\` color space.
|
|
59
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Pr(10,a))}else n=n.split(",");return n=n.map(s=>parseFloat(s)),{type:r,values:n,colorSpace:a}}const Z0=e=>{const t=Rr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},Ta=(e,t)=>{try{return Z0(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function
|
|
59
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Pr(10,a))}else n=n.split(",");return n=n.map(s=>parseFloat(s)),{type:r,values:n,colorSpace:a}}const Z0=e=>{const t=Rr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},Ta=(e,t)=>{try{return Z0(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Do(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((a,s)=>s<3?parseInt(a,10):a):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Bp(e){e=Rr(e);const{values:t}=e,r=t[0],n=t[1]/100,a=t[2]/100,s=n*Math.min(a,1-a),o=(c,u=(c+r/30)%12)=>a-s*Math.max(Math.min(u-3,9-u,1),-1);let i="rgb";const l=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type==="hsla"&&(i+="a",l.push(t[3])),Do({type:i,values:l})}function gl(e){e=Rr(e);let t=e.type==="hsl"||e.type==="hsla"?Rr(Bp(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 Ou(e,t){const r=gl(e),n=gl(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function yl(e,t){return e=Rr(e),t=nc(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Do(e)}function ps(e,t,r){try{return yl(e,t)}catch{return e}}function ka(e,t){if(e=Rr(e),t=nc(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 Do(e)}function Ve(e,t,r){try{return ka(e,t)}catch{return e}}function La(e,t){if(e=Rr(e),t=nc(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 Do(e)}function Ee(e,t,r){try{return La(e,t)}catch{return e}}function eb(e,t=.15){return gl(e)>.5?ka(e,t):La(e,t)}function fs(e,t,r){try{return eb(e,t)}catch{return e}}function wu(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function Fs(e){return e&&e.ownerDocument||document}function tb(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function rb({controlled:e,default:t,name:r,state:n="value"}){const{current:a}=F.useRef(e!==void 0),[s,o]=F.useState(t),i=a?e:s;if(process.env.NODE_ENV!=="production"){F.useEffect(()=>{a!==(e!==void 0)&&console.error([`MUI: A component is changing the ${a?"":"un"}controlled ${n} state of ${r} to be ${a?"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"].join(`
|
|
60
60
|
`))},[n,r,e]);const{current:c}=F.useRef(t);F.useEffect(()=>{!a&&!Object.is(c,t)&&console.error([`MUI: A component is changing the default ${n} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
|
|
61
|
-
`))},[JSON.stringify(t)])}const l=F.useCallback(c=>{a||o(c)},[]);return[i,l]}function
|
|
62
|
-
`))}return!1}const nb={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function nc(e,t,r=void 0){const n={};for(const a in e){const s=e[a];let o="",i=!0;for(let l=0;l<s.length;l+=1){const c=s[l];c&&(o+=(i===!0?"":" ")+t(c),i=!1,r&&r[c]&&(o+=" "+r[c]))}n[a]=o}return n}function ab(e){return typeof e=="string"}function sb(e,t,r){return e===void 0||ab(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function Bs(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 Pu(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 ob(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:a,className:s}=e;if(!t){const p=Nt(r==null?void 0:r.className,s,a==null?void 0:a.className,n==null?void 0:n.className),m={...r==null?void 0:r.style,...a==null?void 0:a.style,...n==null?void 0:n.style},f={...r,...a,...n};return p.length>0&&(f.className=p),Object.keys(m).length>0&&(f.style=m),{props:f,internalRef:void 0}}const o=Bs({...a,...n}),i=Pu(n),l=Pu(a),c=t(o),u=Nt(c==null?void 0:c.className,r==null?void 0:r.className,s,a==null?void 0:a.className,n==null?void 0:n.className),d={...c==null?void 0:c.style,...r==null?void 0:r.style,...a==null?void 0:a.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 ib(e,t,r){return typeof e=="function"?e(t,r):e}function yr(e){var d;const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:a=!1,...s}=e,o=a?{}:ib(r,n),{props:i,internalRef:l}=ob({...s,externalSlotProps:o}),c=zp(l,o==null?void 0:o.ref,(d=e.additionalProps)==null?void 0:d.ref);return sb(t,{...i,ref:c},n)}const lb=F.createContext();process.env.NODE_ENV!=="production"&&(y.node,y.bool);const cb=()=>F.useContext(lb)??!1,ub=F.createContext(void 0);process.env.NODE_ENV!=="production"&&(y.node,y.object);function db(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const a=t.components[r];return a.defaultProps?Zs(a.defaultProps,n):!a.styleOverrides&&!a.variants?Zs(a,n):n}function hb({props:e,name:t}){const r=F.useContext(ub);return db({props:e,name:t,theme:{components:r}})}const Ru={theme:void 0};function pb(e){let t,r;return function(a){let s=t;return(s===void 0||a.theme!==r)&&(Ru.theme=a.theme,s=kp(e(Ru)),t=s,r=a.theme),s}}function fb(e=""){function t(...n){if(!n.length)return"";const a=n[0];return typeof a=="string"&&!a.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${a}${t(...n.slice(1))})`:`, ${a}`}return(n,...a)=>`var(--${e?`${e}-`:""}${n}${t(...a)})`}const Tu=(e,t,r,n=[])=>{let a=e;t.forEach((s,o)=>{o===t.length-1?Array.isArray(a)?a[Number(s)]=r:a&&typeof a=="object"&&(a[s]=r):a&&typeof a=="object"&&(a[s]||(a[s]=n.includes(s)?[]:{}),a=a[s])})},mb=(e,t,r)=>{function n(a,s=[],o=[]){Object.entries(a).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)?[...o,i]:o):t([...s,i],l,o))})}n(e)},gb=(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 Ai(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},a={},s={},o={};return mb(e,(i,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(i,l))){const u=`--${r?`${r}-`:""}${i.join("-")}`,d=gb(i,l);Object.assign(a,{[u]:d}),Tu(s,i,`var(${u})`,c),Tu(o,i,`var(${u}, ${d})`,c)}},i=>i[0]==="vars"),{css:a,vars:s,varsWithDefaults:o}}function yb(e,t={}){const{getSelector:r=g,disableCssColorScheme:n,colorSchemeSelector:a}=t,{colorSchemes:s={},components:o,defaultColorScheme:i="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=Ai(l,t);let h=d;const p={},{[i]:m,...f}=s;if(Object.entries(f||{}).forEach(([O,C])=>{const{vars:E,css:T,varsWithDefaults:P}=Ai(C,t);h=ht(h,P),p[O]={css:T,vars:E}}),m){const{css:O,vars:C,varsWithDefaults:E}=Ai(m,t);h=ht(h,E),p[i]={css:O,vars:C}}function g(O,C){var T,P;let E=a;if(a==="class"&&(E=".%s"),a==="data"&&(E="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(E=`[${a}="%s"]`),O){if(E==="media")return e.defaultColorScheme===O?":root":{[`@media (prefers-color-scheme: ${((P=(T=s[O])==null?void 0:T.palette)==null?void 0:P.mode)||O})`]:{":root":C}};if(E)return e.defaultColorScheme===O?`:root, ${E.replace("%s",String(O))}`:E.replace("%s",String(O))}return":root"}return{vars:h,generateThemeVars:()=>{let O={...c};return Object.entries(p).forEach(([,{vars:C}])=>{O=ht(O,C)}),O},generateStyleSheets:()=>{var _,B;const O=[],C=e.defaultColorScheme||"light";function E(b,A){Object.keys(A).length&&O.push(typeof b=="string"?{[b]:{...A}}:b)}E(r(void 0,{...u}),u);const{[C]:T,...P}=p;if(T){const{css:b}=T,A=(B=(_=s[C])==null?void 0:_.palette)==null?void 0:B.mode,z=!n&&A?{colorScheme:A,...b}:{...b};E(r(C,{...z}),z)}return Object.entries(P).forEach(([b,{css:A}])=>{var G,re;const z=(re=(G=s[b])==null?void 0:G.palette)==null?void 0:re.mode,I=!n&&z?{colorScheme:z,...A}:{...A};E(r(b,{...I}),I)}),O}}}function bb(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 vb=Lo(),Sb=Y0("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function xb(e){return Np({props:e,name:"MuiStack",defaultTheme:vb})}function Ob(e,t){const r=F.Children.toArray(e).filter(Boolean);return r.reduce((n,a,s)=>(n.push(a),s<r.length-1&&n.push(F.cloneElement(t,{key:`separator-${s}`})),n),[])}const wb=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],Cb=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...Ft({theme:t},Pi({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n}))};if(e.spacing){const n=_o(t),a=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=Pi({values:e.direction,base:a}),o=Pi({values:e.spacing,base:a});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=ht(r,Ft({theme:t},o,(l,c)=>e.useFlexGap?{gap:zr(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${wb(c?s[c]:e.direction)}`]:zr(n,l)}}))}return r=Gy(t.breakpoints,r),r};function Pb(e={}){const{createStyledComponent:t=Sb,useThemeProps:r=xb,componentName:n="MuiStack"}=e,a=()=>nc({root:["root"]},l=>ts(n,l),{}),s=t(Cb),o=F.forwardRef(function(l,c){const u=r(l),d=U0(u),{component:h="div",direction:p="column",spacing:m=0,divider:f,children:g,className:S,useFlexGap:R=!1,...O}=d,C={direction:p,spacing:m,useFlexGap:R},E=a();return x.jsx(s,{as:h,ownerState:C,ref:c,className:Nt(E.root,S),...O,children:f?Ob(g,f):g})});return process.env.NODE_ENV!=="production"&&(o.propTypes={children:y.node,direction:y.oneOfType([y.oneOf(["column-reverse","column","row-reverse","row"]),y.arrayOf(y.oneOf(["column-reverse","column","row-reverse","row"])),y.object]),divider:y.node,spacing:y.oneOfType([y.arrayOf(y.oneOfType([y.number,y.string])),y.number,y.object,y.string]),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object])}),o}const Ua={black:"#000",white:"#fff"},Rb={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"},hn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},pn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},da={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},fn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},mn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},gn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Gp(){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:Ua.white,default:Ua.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 Tb=Gp();function Hp(){return{text:{primary:Ua.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:Ua.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 Au=Hp();function Vu(e,t,r,n){const a=n.light||n,s=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=La(e.main,a):t==="dark"&&(e.dark=ka(e.main,s)))}function Ab(e="light"){return e==="dark"?{main:fn[200],light:fn[50],dark:fn[400]}:{main:fn[700],light:fn[400],dark:fn[800]}}function Vb(e="light"){return e==="dark"?{main:hn[200],light:hn[50],dark:hn[400]}:{main:hn[500],light:hn[300],dark:hn[700]}}function Eb(e="light"){return e==="dark"?{main:pn[500],light:pn[300],dark:pn[700]}:{main:pn[700],light:pn[400],dark:pn[800]}}function _b(e="light"){return e==="dark"?{main:mn[400],light:mn[300],dark:mn[700]}:{main:mn[700],light:mn[500],dark:mn[900]}}function Ib(e="light"){return e==="dark"?{main:gn[400],light:gn[300],dark:gn[700]}:{main:gn[800],light:gn[500],dark:gn[900]}}function Mb(e="light"){return e==="dark"?{main:da[400],light:da[300],dark:da[700]}:{main:"#ed6c02",light:da[500],dark:da[900]}}function ac(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...a}=e,s=e.primary||Ab(t),o=e.secondary||Vb(t),i=e.error||Eb(t),l=e.info||_b(t),c=e.success||Ib(t),u=e.warning||Mb(t);function d(f){const g=Ou(f,Au.text.primary)>=r?Au.text.primary:Tb.text.primary;if(process.env.NODE_ENV!=="production"){const S=Ou(f,g);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${g} on ${f}`,"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(`
|
|
63
|
-
`))}return g}const h=({color:f,name:g,mainShade:S=500,lightShade:
|
|
61
|
+
`))},[JSON.stringify(t)])}const l=F.useCallback(c=>{a||o(c)},[]);return[i,l]}function Ai(e){const t=F.useRef(e);return Fp(()=>{t.current=e}),F.useRef((...r)=>(0,t.current)(...r)).current}function zp(...e){return F.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{tb(r,t)})},e)}function Cu(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(`
|
|
62
|
+
`))}return!1}const nb={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function ac(e,t,r=void 0){const n={};for(const a in e){const s=e[a];let o="",i=!0;for(let l=0;l<s.length;l+=1){const c=s[l];c&&(o+=(i===!0?"":" ")+t(c),i=!1,r&&r[c]&&(o+=" "+r[c]))}n[a]=o}return n}function ab(e){return typeof e=="string"}function sb(e,t,r){return e===void 0||ab(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function Bs(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 Pu(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 ob(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:a,className:s}=e;if(!t){const p=Nt(r==null?void 0:r.className,s,a==null?void 0:a.className,n==null?void 0:n.className),m={...r==null?void 0:r.style,...a==null?void 0:a.style,...n==null?void 0:n.style},f={...r,...a,...n};return p.length>0&&(f.className=p),Object.keys(m).length>0&&(f.style=m),{props:f,internalRef:void 0}}const o=Bs({...a,...n}),i=Pu(n),l=Pu(a),c=t(o),u=Nt(c==null?void 0:c.className,r==null?void 0:r.className,s,a==null?void 0:a.className,n==null?void 0:n.className),d={...c==null?void 0:c.style,...r==null?void 0:r.style,...a==null?void 0:a.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 ib(e,t,r){return typeof e=="function"?e(t,r):e}function yr(e){var d;const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:a=!1,...s}=e,o=a?{}:ib(r,n),{props:i,internalRef:l}=ob({...s,externalSlotProps:o}),c=zp(l,o==null?void 0:o.ref,(d=e.additionalProps)==null?void 0:d.ref);return sb(t,{...i,ref:c},n)}const lb=F.createContext();process.env.NODE_ENV!=="production"&&(y.node,y.bool);const cb=()=>F.useContext(lb)??!1,ub=F.createContext(void 0);process.env.NODE_ENV!=="production"&&(y.node,y.object);function db(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const a=t.components[r];return a.defaultProps?Zs(a.defaultProps,n):!a.styleOverrides&&!a.variants?Zs(a,n):n}function hb({props:e,name:t}){const r=F.useContext(ub);return db({props:e,name:t,theme:{components:r}})}const Ru={theme:void 0};function pb(e){let t,r;return function(a){let s=t;return(s===void 0||a.theme!==r)&&(Ru.theme=a.theme,s=kp(e(Ru)),t=s,r=a.theme),s}}function fb(e=""){function t(...n){if(!n.length)return"";const a=n[0];return typeof a=="string"&&!a.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${a}${t(...n.slice(1))})`:`, ${a}`}return(n,...a)=>`var(--${e?`${e}-`:""}${n}${t(...a)})`}const Tu=(e,t,r,n=[])=>{let a=e;t.forEach((s,o)=>{o===t.length-1?Array.isArray(a)?a[Number(s)]=r:a&&typeof a=="object"&&(a[s]=r):a&&typeof a=="object"&&(a[s]||(a[s]=n.includes(s)?[]:{}),a=a[s])})},mb=(e,t,r)=>{function n(a,s=[],o=[]){Object.entries(a).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)?[...o,i]:o):t([...s,i],l,o))})}n(e)},gb=(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 Vi(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},a={},s={},o={};return mb(e,(i,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(i,l))){const u=`--${r?`${r}-`:""}${i.join("-")}`,d=gb(i,l);Object.assign(a,{[u]:d}),Tu(s,i,`var(${u})`,c),Tu(o,i,`var(${u}, ${d})`,c)}},i=>i[0]==="vars"),{css:a,vars:s,varsWithDefaults:o}}function yb(e,t={}){const{getSelector:r=g,disableCssColorScheme:n,colorSchemeSelector:a}=t,{colorSchemes:s={},components:o,defaultColorScheme:i="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=Vi(l,t);let h=d;const p={},{[i]:m,...f}=s;if(Object.entries(f||{}).forEach(([O,C])=>{const{vars:E,css:R,varsWithDefaults:P}=Vi(C,t);h=ht(h,P),p[O]={css:R,vars:E}}),m){const{css:O,vars:C,varsWithDefaults:E}=Vi(m,t);h=ht(h,E),p[i]={css:O,vars:C}}function g(O,C){var R,P;let E=a;if(a==="class"&&(E=".%s"),a==="data"&&(E="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(E=`[${a}="%s"]`),O){if(E==="media")return e.defaultColorScheme===O?":root":{[`@media (prefers-color-scheme: ${((P=(R=s[O])==null?void 0:R.palette)==null?void 0:P.mode)||O})`]:{":root":C}};if(E)return e.defaultColorScheme===O?`:root, ${E.replace("%s",String(O))}`:E.replace("%s",String(O))}return":root"}return{vars:h,generateThemeVars:()=>{let O={...c};return Object.entries(p).forEach(([,{vars:C}])=>{O=ht(O,C)}),O},generateStyleSheets:()=>{var _,B;const O=[],C=e.defaultColorScheme||"light";function E(b,A){Object.keys(A).length&&O.push(typeof b=="string"?{[b]:{...A}}:b)}E(r(void 0,{...u}),u);const{[C]:R,...P}=p;if(R){const{css:b}=R,A=(B=(_=s[C])==null?void 0:_.palette)==null?void 0:B.mode,z=!n&&A?{colorScheme:A,...b}:{...b};E(r(C,{...z}),z)}return Object.entries(P).forEach(([b,{css:A}])=>{var G,re;const z=(re=(G=s[b])==null?void 0:G.palette)==null?void 0:re.mode,I=!n&&z?{colorScheme:z,...A}:{...A};E(r(b,{...I}),I)}),O}}}function bb(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 vb=Uo(),xb=Y0("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function Sb(e){return Np({props:e,name:"MuiStack",defaultTheme:vb})}function Ob(e,t){const r=F.Children.toArray(e).filter(Boolean);return r.reduce((n,a,s)=>(n.push(a),s<r.length-1&&n.push(F.cloneElement(t,{key:`separator-${s}`})),n),[])}const wb=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],Cb=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...Ft({theme:t},Ri({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n}))};if(e.spacing){const n=Io(t),a=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=Ri({values:e.direction,base:a}),o=Ri({values:e.spacing,base:a});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=ht(r,Ft({theme:t},o,(l,c)=>e.useFlexGap?{gap:zr(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${wb(c?s[c]:e.direction)}`]:zr(n,l)}}))}return r=Gy(t.breakpoints,r),r};function Pb(e={}){const{createStyledComponent:t=xb,useThemeProps:r=Sb,componentName:n="MuiStack"}=e,a=()=>ac({root:["root"]},l=>ts(n,l),{}),s=t(Cb),o=F.forwardRef(function(l,c){const u=r(l),d=U0(u),{component:h="div",direction:p="column",spacing:m=0,divider:f,children:g,className:S,useFlexGap:T=!1,...O}=d,C={direction:p,spacing:m,useFlexGap:T},E=a();return x.jsx(s,{as:h,ownerState:C,ref:c,className:Nt(E.root,S),...O,children:f?Ob(g,f):g})});return process.env.NODE_ENV!=="production"&&(o.propTypes={children:y.node,direction:y.oneOfType([y.oneOf(["column-reverse","column","row-reverse","row"]),y.arrayOf(y.oneOf(["column-reverse","column","row-reverse","row"])),y.object]),divider:y.node,spacing:y.oneOfType([y.arrayOf(y.oneOfType([y.number,y.string])),y.number,y.object,y.string]),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object])}),o}const Ua={black:"#000",white:"#fff"},Rb={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"},hn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},pn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},da={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},fn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},mn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},gn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Gp(){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:Ua.white,default:Ua.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 Tb=Gp();function Hp(){return{text:{primary:Ua.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:Ua.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 Au=Hp();function Vu(e,t,r,n){const a=n.light||n,s=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=La(e.main,a):t==="dark"&&(e.dark=ka(e.main,s)))}function Ab(e="light"){return e==="dark"?{main:fn[200],light:fn[50],dark:fn[400]}:{main:fn[700],light:fn[400],dark:fn[800]}}function Vb(e="light"){return e==="dark"?{main:hn[200],light:hn[50],dark:hn[400]}:{main:hn[500],light:hn[300],dark:hn[700]}}function Eb(e="light"){return e==="dark"?{main:pn[500],light:pn[300],dark:pn[700]}:{main:pn[700],light:pn[400],dark:pn[800]}}function _b(e="light"){return e==="dark"?{main:mn[400],light:mn[300],dark:mn[700]}:{main:mn[700],light:mn[500],dark:mn[900]}}function Ib(e="light"){return e==="dark"?{main:gn[400],light:gn[300],dark:gn[700]}:{main:gn[800],light:gn[500],dark:gn[900]}}function Mb(e="light"){return e==="dark"?{main:da[400],light:da[300],dark:da[700]}:{main:"#ed6c02",light:da[500],dark:da[900]}}function sc(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...a}=e,s=e.primary||Ab(t),o=e.secondary||Vb(t),i=e.error||Eb(t),l=e.info||_b(t),c=e.success||Ib(t),u=e.warning||Mb(t);function d(f){const g=Ou(f,Au.text.primary)>=r?Au.text.primary:Tb.text.primary;if(process.env.NODE_ENV!=="production"){const S=Ou(f,g);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${g} on ${f}`,"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(`
|
|
63
|
+
`))}return g}const h=({color:f,name:g,mainShade:S=500,lightShade:T=300,darkShade:O=700})=>{if(f={...f},!f.main&&f[S]&&(f.main=f[S]),!f.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${g?` (${g})`:""} provided to augmentColor(color) is invalid.
|
|
64
64
|
The color object needs to have a \`main\` property or a \`${S}\` property.`:Pr(11,g?` (${g})`:"",S));if(typeof f.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${g?` (${g})`:""} provided to augmentColor(color) is invalid.
|
|
65
65
|
\`color.main\` should be a string, but \`${JSON.stringify(f.main)}\` was provided instead.
|
|
66
66
|
|
|
@@ -74,7 +74,7 @@ const theme1 = createTheme({ palette: {
|
|
|
74
74
|
|
|
75
75
|
const theme2 = createTheme({ palette: {
|
|
76
76
|
primary: { main: green[500] },
|
|
77
|
-
} });`:Pr(12,g?` (${g})`:"",JSON.stringify(f.main)));return Vu(f,"light",
|
|
77
|
+
} });`:Pr(12,g?` (${g})`:"",JSON.stringify(f.main)));return Vu(f,"light",T,n),Vu(f,"dark",O,n),f.contrastText||(f.contrastText=d(f.main)),f};let p;return t==="light"?p=Gp():t==="dark"&&(p=Hp()),process.env.NODE_ENV!=="production"&&(p||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),ht({common:{...Ua},mode:t,primary:h({color:s,name:"primary"}),secondary:h({color:o,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:Rb,contrastThreshold:r,getContrastText:d,augmentColor:h,tonalOffset:n,...p},a)}function $b(e){const t={};return Object.entries(e).forEach(n=>{const[a,s]=n;typeof s=="object"&&(t[a]=`${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 jb(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function kb(e){return Math.round(e*1e5)/1e5}const Eu={textTransform:"uppercase"},_u='"Roboto", "Helvetica", "Arial", sans-serif';function Lb(e,t){const{fontFamily:r=_u,fontSize:n=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:o=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||(g=>`${g/l*h}rem`),m=(g,S,T,O,C)=>({fontFamily:r,fontWeight:g,fontSize:p(S),lineHeight:T,...r===_u?{letterSpacing:`${kb(O/S)}em`}:{},...C,...c}),f={h1:m(a,96,1.167,-1.5),h2:m(a,60,1.2,-.5),h3:m(s,48,1.167,0),h4:m(s,34,1.235,.25),h5:m(s,24,1.334,0),h6:m(o,20,1.6,.15),subtitle1:m(s,16,1.75,.15),subtitle2:m(o,14,1.57,.1),body1:m(s,16,1.5,.15),body2:m(s,14,1.43,.15),button:m(o,14,1.75,.4,Eu),caption:m(s,12,1.66,.4),overline:m(s,12,2.66,1,Eu),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ht({htmlFontSize:l,pxToRem:p,fontFamily:r,fontSize:n,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:o,fontWeightBold:i,...f},d,{clone:!1})}const Ub=.2,Db=.14,Nb=.12;function Ue(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Ub})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Db})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Nb})`].join(",")}const Fb=["none",Ue(0,2,1,-1,0,1,1,0,0,1,3,0),Ue(0,3,1,-2,0,2,2,0,0,1,5,0),Ue(0,3,3,-2,0,3,4,0,0,1,8,0),Ue(0,2,4,-1,0,4,5,0,0,1,10,0),Ue(0,3,5,-1,0,5,8,0,0,1,14,0),Ue(0,3,5,-1,0,6,10,0,0,1,18,0),Ue(0,4,5,-2,0,7,10,1,0,2,16,1),Ue(0,5,5,-3,0,8,10,1,0,3,14,2),Ue(0,5,6,-3,0,9,12,1,0,3,16,2),Ue(0,6,6,-3,0,10,14,1,0,4,18,3),Ue(0,6,7,-4,0,11,15,1,0,4,20,3),Ue(0,7,8,-4,0,12,17,2,0,5,22,4),Ue(0,7,8,-4,0,13,19,2,0,5,24,4),Ue(0,7,9,-4,0,14,21,2,0,5,26,4),Ue(0,8,9,-5,0,15,22,2,0,6,28,5),Ue(0,8,10,-5,0,16,24,2,0,6,30,5),Ue(0,8,11,-5,0,17,26,2,0,6,32,5),Ue(0,9,11,-5,0,18,28,2,0,7,34,6),Ue(0,9,12,-6,0,19,29,2,0,7,36,6),Ue(0,10,13,-6,0,20,31,3,0,8,38,7),Ue(0,10,13,-6,0,21,33,3,0,8,40,7),Ue(0,10,14,-6,0,22,35,3,0,8,42,7),Ue(0,11,14,-7,0,23,36,3,0,9,44,8),Ue(0,11,15,-7,0,24,38,3,0,9,46,8)],Bb={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)"},zb={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Iu(e){return`${Math.round(e)}ms`}function Gb(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Hb(e){const t={...Bb,...e.easing},r={...zb,...e.duration};return{getAutoHeightDuration:Gb,create:(a=["all"],s={})=>{const{duration:o=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(a)&&!Array.isArray(a)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(o)&&!u(o)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${o}.`),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(`
|
|
78
78
|
`)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(a)?a:[a]).map(u=>`${u} ${typeof o=="string"?o:Iu(o)} ${i} ${typeof l=="string"?l:Iu(l)}`).join(",")},...e,easing:t,duration:r}}const qb={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Jb(e){return Wt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function qp(e={}){const t={...e};function r(n){const a=Object.entries(n);for(let s=0;s<a.length;s++){const[o,i]=a[s];!Jb(i)||o.startsWith("unstable_")?delete n[o]:Wt(i)&&(n[o]={...i},r(n[o]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
79
79
|
|
|
80
80
|
const theme = ${JSON.stringify(t,null,2)};
|
|
@@ -82,15 +82,15 @@ const theme = ${JSON.stringify(t,null,2)};
|
|
|
82
82
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
83
83
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
84
84
|
|
|
85
|
-
export default theme;`}function
|
|
86
|
-
`))}f[S]={}}}};Object.keys(h.components).forEach(f=>{const g=h.components[f].styleOverrides;g&&f.startsWith("Mui")&&m(g,f)})}return h.unstable_sxConfig={...es,...c==null?void 0:c.unstable_sxConfig},h.unstable_sx=function(m){return Un({sx:m,theme:this})},h.toRuntimeSource=qp,h}function Wb(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 Kb=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=Wb(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Jp(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Wp(e){return e==="dark"?Kb:[]}function Yb(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...a}=e,s=
|
|
87
|
-
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 tv(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Gt=e=>{try{return e()}catch{}},rv=(e="mui")=>fb(e);function Vi(e,t,r,n){if(!t)return;t=t===!0?{}:t;const a=n==="dark"?"dark":"light";if(!r){e[n]=Yb({...t,palette:{mode:a,...t==null?void 0:t.palette}});return}const{palette:s,...o}=yl({...r,palette:{mode:a,...t==null?void 0:t.palette}});return e[n]={...t,palette:s,opacity:{...Jp(a),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Wp(a)},o}function nv(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:a=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:o=Qb,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=rv(s),{[d]:p,light:m,dark:f,...g}=r,S={...g};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.`:Pr(21,d));const O=Vi(S,R,c,d);m&&!S.light&&Vi(S,m,void 0,"light"),f&&!S.dark&&Vi(S,f,void 0,"dark");let C={defaultColorScheme:d,...O,cssVarPrefix:s,colorSchemeSelector:i,rootSelector:l,getCssVar:h,colorSchemes:S,font:{...$b(O.typography),...O.font},spacing:tv(c.spacing)};Object.keys(C.colorSchemes).forEach(B=>{const b=C.colorSchemes[B].palette,A=z=>{const I=z.split("-"),G=I[1],re=I[2];return h(z,b[G][re])};if(b.mode==="light"&&(q(b.common,"background","#fff"),q(b.common,"onBackground","#000")),b.mode==="dark"&&(q(b.common,"background","#000"),q(b.common,"onBackground","#fff")),ev(b,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),b.mode==="light"){q(b.Alert,"errorColor",Ve(b.error.light,.6)),q(b.Alert,"infoColor",Ve(b.info.light,.6)),q(b.Alert,"successColor",Ve(b.success.light,.6)),q(b.Alert,"warningColor",Ve(b.warning.light,.6)),q(b.Alert,"errorFilledBg",A("palette-error-main")),q(b.Alert,"infoFilledBg",A("palette-info-main")),q(b.Alert,"successFilledBg",A("palette-success-main")),q(b.Alert,"warningFilledBg",A("palette-warning-main")),q(b.Alert,"errorFilledColor",Gt(()=>b.getContrastText(b.error.main))),q(b.Alert,"infoFilledColor",Gt(()=>b.getContrastText(b.info.main))),q(b.Alert,"successFilledColor",Gt(()=>b.getContrastText(b.success.main))),q(b.Alert,"warningFilledColor",Gt(()=>b.getContrastText(b.warning.main))),q(b.Alert,"errorStandardBg",Ee(b.error.light,.9)),q(b.Alert,"infoStandardBg",Ee(b.info.light,.9)),q(b.Alert,"successStandardBg",Ee(b.success.light,.9)),q(b.Alert,"warningStandardBg",Ee(b.warning.light,.9)),q(b.Alert,"errorIconColor",A("palette-error-main")),q(b.Alert,"infoIconColor",A("palette-info-main")),q(b.Alert,"successIconColor",A("palette-success-main")),q(b.Alert,"warningIconColor",A("palette-warning-main")),q(b.AppBar,"defaultBg",A("palette-grey-100")),q(b.Avatar,"defaultBg",A("palette-grey-400")),q(b.Button,"inheritContainedBg",A("palette-grey-300")),q(b.Button,"inheritContainedHoverBg",A("palette-grey-A100")),q(b.Chip,"defaultBorder",A("palette-grey-400")),q(b.Chip,"defaultAvatarColor",A("palette-grey-700")),q(b.Chip,"defaultIconColor",A("palette-grey-700")),q(b.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),q(b.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),q(b.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),q(b.LinearProgress,"primaryBg",Ee(b.primary.main,.62)),q(b.LinearProgress,"secondaryBg",Ee(b.secondary.main,.62)),q(b.LinearProgress,"errorBg",Ee(b.error.main,.62)),q(b.LinearProgress,"infoBg",Ee(b.info.main,.62)),q(b.LinearProgress,"successBg",Ee(b.success.main,.62)),q(b.LinearProgress,"warningBg",Ee(b.warning.main,.62)),q(b.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.11)`),q(b.Slider,"primaryTrack",Ee(b.primary.main,.62)),q(b.Slider,"secondaryTrack",Ee(b.secondary.main,.62)),q(b.Slider,"errorTrack",Ee(b.error.main,.62)),q(b.Slider,"infoTrack",Ee(b.info.main,.62)),q(b.Slider,"successTrack",Ee(b.success.main,.62)),q(b.Slider,"warningTrack",Ee(b.warning.main,.62));const z=fs(b.background.default,.8);q(b.SnackbarContent,"bg",z),q(b.SnackbarContent,"color",Gt(()=>b.getContrastText(z))),q(b.SpeedDialAction,"fabHoverBg",fs(b.background.paper,.15)),q(b.StepConnector,"border",A("palette-grey-400")),q(b.StepContent,"border",A("palette-grey-400")),q(b.Switch,"defaultColor",A("palette-common-white")),q(b.Switch,"defaultDisabledColor",A("palette-grey-100")),q(b.Switch,"primaryDisabledColor",Ee(b.primary.main,.62)),q(b.Switch,"secondaryDisabledColor",Ee(b.secondary.main,.62)),q(b.Switch,"errorDisabledColor",Ee(b.error.main,.62)),q(b.Switch,"infoDisabledColor",Ee(b.info.main,.62)),q(b.Switch,"successDisabledColor",Ee(b.success.main,.62)),q(b.Switch,"warningDisabledColor",Ee(b.warning.main,.62)),q(b.TableCell,"border",Ee(ps(b.divider,1),.88)),q(b.Tooltip,"bg",ps(b.grey[700],.92))}if(b.mode==="dark"){q(b.Alert,"errorColor",Ee(b.error.light,.6)),q(b.Alert,"infoColor",Ee(b.info.light,.6)),q(b.Alert,"successColor",Ee(b.success.light,.6)),q(b.Alert,"warningColor",Ee(b.warning.light,.6)),q(b.Alert,"errorFilledBg",A("palette-error-dark")),q(b.Alert,"infoFilledBg",A("palette-info-dark")),q(b.Alert,"successFilledBg",A("palette-success-dark")),q(b.Alert,"warningFilledBg",A("palette-warning-dark")),q(b.Alert,"errorFilledColor",Gt(()=>b.getContrastText(b.error.dark))),q(b.Alert,"infoFilledColor",Gt(()=>b.getContrastText(b.info.dark))),q(b.Alert,"successFilledColor",Gt(()=>b.getContrastText(b.success.dark))),q(b.Alert,"warningFilledColor",Gt(()=>b.getContrastText(b.warning.dark))),q(b.Alert,"errorStandardBg",Ve(b.error.light,.9)),q(b.Alert,"infoStandardBg",Ve(b.info.light,.9)),q(b.Alert,"successStandardBg",Ve(b.success.light,.9)),q(b.Alert,"warningStandardBg",Ve(b.warning.light,.9)),q(b.Alert,"errorIconColor",A("palette-error-main")),q(b.Alert,"infoIconColor",A("palette-info-main")),q(b.Alert,"successIconColor",A("palette-success-main")),q(b.Alert,"warningIconColor",A("palette-warning-main")),q(b.AppBar,"defaultBg",A("palette-grey-900")),q(b.AppBar,"darkBg",A("palette-background-paper")),q(b.AppBar,"darkColor",A("palette-text-primary")),q(b.Avatar,"defaultBg",A("palette-grey-600")),q(b.Button,"inheritContainedBg",A("palette-grey-800")),q(b.Button,"inheritContainedHoverBg",A("palette-grey-700")),q(b.Chip,"defaultBorder",A("palette-grey-700")),q(b.Chip,"defaultAvatarColor",A("palette-grey-300")),q(b.Chip,"defaultIconColor",A("palette-grey-300")),q(b.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),q(b.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),q(b.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),q(b.LinearProgress,"primaryBg",Ve(b.primary.main,.5)),q(b.LinearProgress,"secondaryBg",Ve(b.secondary.main,.5)),q(b.LinearProgress,"errorBg",Ve(b.error.main,.5)),q(b.LinearProgress,"infoBg",Ve(b.info.main,.5)),q(b.LinearProgress,"successBg",Ve(b.success.main,.5)),q(b.LinearProgress,"warningBg",Ve(b.warning.main,.5)),q(b.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.13)`),q(b.Slider,"primaryTrack",Ve(b.primary.main,.5)),q(b.Slider,"secondaryTrack",Ve(b.secondary.main,.5)),q(b.Slider,"errorTrack",Ve(b.error.main,.5)),q(b.Slider,"infoTrack",Ve(b.info.main,.5)),q(b.Slider,"successTrack",Ve(b.success.main,.5)),q(b.Slider,"warningTrack",Ve(b.warning.main,.5));const z=fs(b.background.default,.98);q(b.SnackbarContent,"bg",z),q(b.SnackbarContent,"color",Gt(()=>b.getContrastText(z))),q(b.SpeedDialAction,"fabHoverBg",fs(b.background.paper,.15)),q(b.StepConnector,"border",A("palette-grey-600")),q(b.StepContent,"border",A("palette-grey-600")),q(b.Switch,"defaultColor",A("palette-grey-300")),q(b.Switch,"defaultDisabledColor",A("palette-grey-600")),q(b.Switch,"primaryDisabledColor",Ve(b.primary.main,.55)),q(b.Switch,"secondaryDisabledColor",Ve(b.secondary.main,.55)),q(b.Switch,"errorDisabledColor",Ve(b.error.main,.55)),q(b.Switch,"infoDisabledColor",Ve(b.info.main,.55)),q(b.Switch,"successDisabledColor",Ve(b.success.main,.55)),q(b.Switch,"warningDisabledColor",Ve(b.warning.main,.55)),q(b.TableCell,"border",Ve(ps(b.divider,1),.68)),q(b.Tooltip,"bg",ps(b.grey[700],.92))}tr(b.background,"default"),tr(b.background,"paper"),tr(b.common,"background"),tr(b.common,"onBackground"),tr(b,"divider"),Object.keys(b).forEach(z=>{const I=b[z];z!=="tonalOffset"&&I&&typeof I=="object"&&(I.main&&q(b[z],"mainChannel",Ta(Aa(I.main))),I.light&&q(b[z],"lightChannel",Ta(Aa(I.light))),I.dark&&q(b[z],"darkChannel",Ta(Aa(I.dark))),I.contrastText&&q(b[z],"contrastTextChannel",Ta(Aa(I.contrastText))),z==="text"&&(tr(b[z],"primary"),tr(b[z],"secondary")),z==="action"&&(I.active&&tr(b[z],"active"),I.selected&&tr(b[z],"selected")))})}),C=t.reduce((B,b)=>ht(B,b),C);const E={prefix:s,disableCssColorScheme:a,shouldSkipGeneratingVar:o,getSelector:Zb(C)},{vars:T,generateThemeVars:P,generateStyleSheets:_}=yb(C,E);return C.vars=T,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([B,b])=>{C[B]=b}),C.generateThemeVars=P,C.generateStyleSheets=_,C.generateSpacing=function(){return Mp(c.spacing,_o(this))},C.getColorSchemeSelector=bb(i),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=o,C.unstable_sxConfig={...es,...c==null?void 0:c.unstable_sxConfig},C.unstable_sx=function(b){return Un({sx:b,theme:this})},C.toRuntimeSource=qp,C}function Mu(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:ac({...r===!0?{}:r.palette,mode:t})})}function Kp(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:a=r?void 0:{light:!0},defaultColorScheme:s=r==null?void 0:r.mode,...o}=e,i=s||"light",l=a==null?void 0:a[i],c={...a,...r?{[i]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return yl(e,...t);let u=r;"palette"in e||c[i]&&(c[i]!==!0?u=c[i].palette:i==="dark"&&(u={mode:"dark"}));const d=yl({...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},Mu(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},Mu(d,"light",c.light)),d}return!r&&!("light"in c)&&i==="light"&&(c.light=!0),nv({...o,colorSchemes:c,defaultColorScheme:i,...typeof n!="boolean"&&n},...t)}const Yp=Kp();function av({props:e,name:t}){return Np({props:e,name:t,defaultTheme:Yp,themeId:Tp})}function sc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const sv=e=>sc(e)&&e!=="classes",Pt=Up({themeId:Tp,defaultTheme:Yp,rootShouldForwardProp:sv});function Qp(...e){const t=F.useRef(void 0),r=F.useCallback(n=>{const a=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const o=s,i=o(n);return typeof i=="function"?i:()=>{o(null)}}return s.current=n,()=>{s.current=null}});return()=>{a.forEach(s=>s==null?void 0:s())}},e);return F.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}let $u=0;function ov(e){const[t,r]=F.useState(e),n=t;return F.useEffect(()=>{t==null&&($u+=1,r(`mui-${$u}`))},[t]),n}const iv={...F},ju=iv.useId;function lv(e){return ju!==void 0?ju():ov(e)}class cv{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(a=>a(n)))},this.value=t,this.listeners=new Set}}const or=typeof window<"u"?F.useLayoutEffect:F.useEffect,Do=({params:e,store:t})=>{F.useEffect(()=>{t.update(n=>K({},n,{animation:K({},n.animation,{skip:e.skipAnimation})}))},[t,e.skipAnimation]);const r=F.useCallback(()=>{let n=!1;return t.update(a=>K({},a,{animation:K({},a.animation,{skipAnimationRequests:a.animation.skipAnimationRequests+1})})),()=>{n||(n=!0,t.update(a=>K({},a,{animation:K({},a.animation,{skipAnimationRequests:a.animation.skipAnimationRequests-1})})))}},[t]);return or(()=>{if(typeof window>"u"||!(window!=null&&window.matchMedia))return;let a;const s=i=>{i.matches?a=r():a==null||a()},o=window.matchMedia("(prefers-reduced-motion)");return s(o),o.addEventListener("change",s),()=>{o.removeEventListener("change",s)}},[r,t]),{instance:{disableAnimation:r}}};Do.params={skipAnimation:!0};Do.getDefaultizedParams=({params:e})=>K({},e,{skipAnimation:e.skipAnimation??!1});Do.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 uv=(e,t,r)=>{if(t.length===1&&t[0]===r){let n=!1;try{const a={};e(a)===a&&(n=!0)}catch{}if(n){let a;try{throw new Error}catch(s){({stack:a}=s)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
85
|
+
export default theme;`}function bl(e={},...t){const{breakpoints:r,mixins:n={},spacing:a,palette:s={},transitions:o={},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.":Pr(20));const u=sc(s),d=Uo(e);let h=ht(d,{mixins:jb(d.breakpoints,n),palette:u,shadows:Fb.slice(),typography:Lb(u,i),transitions:Hb(o),zIndex:{...qb}});if(h=ht(h,c),h=t.reduce((p,m)=>ht(p,m),h),process.env.NODE_ENV!=="production"){const p=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],m=(f,g)=>{let S;for(S in f){const T=f[S];if(p.includes(S)&&Object.keys(T).length>0){if(process.env.NODE_ENV!=="production"){const O=ts("",S);console.error([`MUI: The \`${g}\` component increases the CSS specificity of the \`${S}\` internal state.`,"You can not override it like this: ",JSON.stringify(f,null,2),"",`Instead, you need to use the '&.${O}' syntax:`,JSON.stringify({root:{[`&.${O}`]:T}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
86
|
+
`))}f[S]={}}}};Object.keys(h.components).forEach(f=>{const g=h.components[f].styleOverrides;g&&f.startsWith("Mui")&&m(g,f)})}return h.unstable_sxConfig={...es,...c==null?void 0:c.unstable_sxConfig},h.unstable_sx=function(m){return Un({sx:m,theme:this})},h.toRuntimeSource=qp,h}function Wb(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 Kb=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=Wb(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Jp(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Wp(e){return e==="dark"?Kb:[]}function Yb(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...a}=e,s=sc(t);return{palette:s,opacity:{...Jp(s.mode),...r},overlays:n||Wp(s.mode),...a}}function Qb(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 Xb=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Zb=e=>(t,r)=>{const n=e.rootSelector||":root",a=e.colorSchemeSelector;let s=a;if(a==="class"&&(s=".%s"),a==="data"&&(s="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(s=`[${a}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const o={};return Xb(e.cssVarPrefix).forEach(i=>{o[i]=r[i],delete r[i]}),s==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:o}}:s?{[s.replace("%s",t)]:o,[`${n}, ${s.replace("%s",t)}`]:r}:{[n]:{...r,...o}}}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 ev(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function q(e,t,r){!e[t]&&r&&(e[t]=r)}function Aa(e){return typeof e!="string"||!e.startsWith("hsl")?e:Bp(e)}function tr(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Ta(Aa(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().
|
|
87
|
+
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 tv(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Gt=e=>{try{return e()}catch{}},rv=(e="mui")=>fb(e);function Ei(e,t,r,n){if(!t)return;t=t===!0?{}:t;const a=n==="dark"?"dark":"light";if(!r){e[n]=Yb({...t,palette:{mode:a,...t==null?void 0:t.palette}});return}const{palette:s,...o}=bl({...r,palette:{mode:a,...t==null?void 0:t.palette}});return e[n]={...t,palette:s,opacity:{...Jp(a),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Wp(a)},o}function nv(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:a=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:o=Qb,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=rv(s),{[d]:p,light:m,dark:f,...g}=r,S={...g};let T=p;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(T=!0),!T)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:Pr(21,d));const O=Ei(S,T,c,d);m&&!S.light&&Ei(S,m,void 0,"light"),f&&!S.dark&&Ei(S,f,void 0,"dark");let C={defaultColorScheme:d,...O,cssVarPrefix:s,colorSchemeSelector:i,rootSelector:l,getCssVar:h,colorSchemes:S,font:{...$b(O.typography),...O.font},spacing:tv(c.spacing)};Object.keys(C.colorSchemes).forEach(B=>{const b=C.colorSchemes[B].palette,A=z=>{const I=z.split("-"),G=I[1],re=I[2];return h(z,b[G][re])};if(b.mode==="light"&&(q(b.common,"background","#fff"),q(b.common,"onBackground","#000")),b.mode==="dark"&&(q(b.common,"background","#000"),q(b.common,"onBackground","#fff")),ev(b,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),b.mode==="light"){q(b.Alert,"errorColor",Ve(b.error.light,.6)),q(b.Alert,"infoColor",Ve(b.info.light,.6)),q(b.Alert,"successColor",Ve(b.success.light,.6)),q(b.Alert,"warningColor",Ve(b.warning.light,.6)),q(b.Alert,"errorFilledBg",A("palette-error-main")),q(b.Alert,"infoFilledBg",A("palette-info-main")),q(b.Alert,"successFilledBg",A("palette-success-main")),q(b.Alert,"warningFilledBg",A("palette-warning-main")),q(b.Alert,"errorFilledColor",Gt(()=>b.getContrastText(b.error.main))),q(b.Alert,"infoFilledColor",Gt(()=>b.getContrastText(b.info.main))),q(b.Alert,"successFilledColor",Gt(()=>b.getContrastText(b.success.main))),q(b.Alert,"warningFilledColor",Gt(()=>b.getContrastText(b.warning.main))),q(b.Alert,"errorStandardBg",Ee(b.error.light,.9)),q(b.Alert,"infoStandardBg",Ee(b.info.light,.9)),q(b.Alert,"successStandardBg",Ee(b.success.light,.9)),q(b.Alert,"warningStandardBg",Ee(b.warning.light,.9)),q(b.Alert,"errorIconColor",A("palette-error-main")),q(b.Alert,"infoIconColor",A("palette-info-main")),q(b.Alert,"successIconColor",A("palette-success-main")),q(b.Alert,"warningIconColor",A("palette-warning-main")),q(b.AppBar,"defaultBg",A("palette-grey-100")),q(b.Avatar,"defaultBg",A("palette-grey-400")),q(b.Button,"inheritContainedBg",A("palette-grey-300")),q(b.Button,"inheritContainedHoverBg",A("palette-grey-A100")),q(b.Chip,"defaultBorder",A("palette-grey-400")),q(b.Chip,"defaultAvatarColor",A("palette-grey-700")),q(b.Chip,"defaultIconColor",A("palette-grey-700")),q(b.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),q(b.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),q(b.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),q(b.LinearProgress,"primaryBg",Ee(b.primary.main,.62)),q(b.LinearProgress,"secondaryBg",Ee(b.secondary.main,.62)),q(b.LinearProgress,"errorBg",Ee(b.error.main,.62)),q(b.LinearProgress,"infoBg",Ee(b.info.main,.62)),q(b.LinearProgress,"successBg",Ee(b.success.main,.62)),q(b.LinearProgress,"warningBg",Ee(b.warning.main,.62)),q(b.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.11)`),q(b.Slider,"primaryTrack",Ee(b.primary.main,.62)),q(b.Slider,"secondaryTrack",Ee(b.secondary.main,.62)),q(b.Slider,"errorTrack",Ee(b.error.main,.62)),q(b.Slider,"infoTrack",Ee(b.info.main,.62)),q(b.Slider,"successTrack",Ee(b.success.main,.62)),q(b.Slider,"warningTrack",Ee(b.warning.main,.62));const z=fs(b.background.default,.8);q(b.SnackbarContent,"bg",z),q(b.SnackbarContent,"color",Gt(()=>b.getContrastText(z))),q(b.SpeedDialAction,"fabHoverBg",fs(b.background.paper,.15)),q(b.StepConnector,"border",A("palette-grey-400")),q(b.StepContent,"border",A("palette-grey-400")),q(b.Switch,"defaultColor",A("palette-common-white")),q(b.Switch,"defaultDisabledColor",A("palette-grey-100")),q(b.Switch,"primaryDisabledColor",Ee(b.primary.main,.62)),q(b.Switch,"secondaryDisabledColor",Ee(b.secondary.main,.62)),q(b.Switch,"errorDisabledColor",Ee(b.error.main,.62)),q(b.Switch,"infoDisabledColor",Ee(b.info.main,.62)),q(b.Switch,"successDisabledColor",Ee(b.success.main,.62)),q(b.Switch,"warningDisabledColor",Ee(b.warning.main,.62)),q(b.TableCell,"border",Ee(ps(b.divider,1),.88)),q(b.Tooltip,"bg",ps(b.grey[700],.92))}if(b.mode==="dark"){q(b.Alert,"errorColor",Ee(b.error.light,.6)),q(b.Alert,"infoColor",Ee(b.info.light,.6)),q(b.Alert,"successColor",Ee(b.success.light,.6)),q(b.Alert,"warningColor",Ee(b.warning.light,.6)),q(b.Alert,"errorFilledBg",A("palette-error-dark")),q(b.Alert,"infoFilledBg",A("palette-info-dark")),q(b.Alert,"successFilledBg",A("palette-success-dark")),q(b.Alert,"warningFilledBg",A("palette-warning-dark")),q(b.Alert,"errorFilledColor",Gt(()=>b.getContrastText(b.error.dark))),q(b.Alert,"infoFilledColor",Gt(()=>b.getContrastText(b.info.dark))),q(b.Alert,"successFilledColor",Gt(()=>b.getContrastText(b.success.dark))),q(b.Alert,"warningFilledColor",Gt(()=>b.getContrastText(b.warning.dark))),q(b.Alert,"errorStandardBg",Ve(b.error.light,.9)),q(b.Alert,"infoStandardBg",Ve(b.info.light,.9)),q(b.Alert,"successStandardBg",Ve(b.success.light,.9)),q(b.Alert,"warningStandardBg",Ve(b.warning.light,.9)),q(b.Alert,"errorIconColor",A("palette-error-main")),q(b.Alert,"infoIconColor",A("palette-info-main")),q(b.Alert,"successIconColor",A("palette-success-main")),q(b.Alert,"warningIconColor",A("palette-warning-main")),q(b.AppBar,"defaultBg",A("palette-grey-900")),q(b.AppBar,"darkBg",A("palette-background-paper")),q(b.AppBar,"darkColor",A("palette-text-primary")),q(b.Avatar,"defaultBg",A("palette-grey-600")),q(b.Button,"inheritContainedBg",A("palette-grey-800")),q(b.Button,"inheritContainedHoverBg",A("palette-grey-700")),q(b.Chip,"defaultBorder",A("palette-grey-700")),q(b.Chip,"defaultAvatarColor",A("palette-grey-300")),q(b.Chip,"defaultIconColor",A("palette-grey-300")),q(b.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),q(b.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),q(b.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),q(b.LinearProgress,"primaryBg",Ve(b.primary.main,.5)),q(b.LinearProgress,"secondaryBg",Ve(b.secondary.main,.5)),q(b.LinearProgress,"errorBg",Ve(b.error.main,.5)),q(b.LinearProgress,"infoBg",Ve(b.info.main,.5)),q(b.LinearProgress,"successBg",Ve(b.success.main,.5)),q(b.LinearProgress,"warningBg",Ve(b.warning.main,.5)),q(b.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.13)`),q(b.Slider,"primaryTrack",Ve(b.primary.main,.5)),q(b.Slider,"secondaryTrack",Ve(b.secondary.main,.5)),q(b.Slider,"errorTrack",Ve(b.error.main,.5)),q(b.Slider,"infoTrack",Ve(b.info.main,.5)),q(b.Slider,"successTrack",Ve(b.success.main,.5)),q(b.Slider,"warningTrack",Ve(b.warning.main,.5));const z=fs(b.background.default,.98);q(b.SnackbarContent,"bg",z),q(b.SnackbarContent,"color",Gt(()=>b.getContrastText(z))),q(b.SpeedDialAction,"fabHoverBg",fs(b.background.paper,.15)),q(b.StepConnector,"border",A("palette-grey-600")),q(b.StepContent,"border",A("palette-grey-600")),q(b.Switch,"defaultColor",A("palette-grey-300")),q(b.Switch,"defaultDisabledColor",A("palette-grey-600")),q(b.Switch,"primaryDisabledColor",Ve(b.primary.main,.55)),q(b.Switch,"secondaryDisabledColor",Ve(b.secondary.main,.55)),q(b.Switch,"errorDisabledColor",Ve(b.error.main,.55)),q(b.Switch,"infoDisabledColor",Ve(b.info.main,.55)),q(b.Switch,"successDisabledColor",Ve(b.success.main,.55)),q(b.Switch,"warningDisabledColor",Ve(b.warning.main,.55)),q(b.TableCell,"border",Ve(ps(b.divider,1),.68)),q(b.Tooltip,"bg",ps(b.grey[700],.92))}tr(b.background,"default"),tr(b.background,"paper"),tr(b.common,"background"),tr(b.common,"onBackground"),tr(b,"divider"),Object.keys(b).forEach(z=>{const I=b[z];z!=="tonalOffset"&&I&&typeof I=="object"&&(I.main&&q(b[z],"mainChannel",Ta(Aa(I.main))),I.light&&q(b[z],"lightChannel",Ta(Aa(I.light))),I.dark&&q(b[z],"darkChannel",Ta(Aa(I.dark))),I.contrastText&&q(b[z],"contrastTextChannel",Ta(Aa(I.contrastText))),z==="text"&&(tr(b[z],"primary"),tr(b[z],"secondary")),z==="action"&&(I.active&&tr(b[z],"active"),I.selected&&tr(b[z],"selected")))})}),C=t.reduce((B,b)=>ht(B,b),C);const E={prefix:s,disableCssColorScheme:a,shouldSkipGeneratingVar:o,getSelector:Zb(C)},{vars:R,generateThemeVars:P,generateStyleSheets:_}=yb(C,E);return C.vars=R,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([B,b])=>{C[B]=b}),C.generateThemeVars=P,C.generateStyleSheets=_,C.generateSpacing=function(){return Mp(c.spacing,Io(this))},C.getColorSchemeSelector=bb(i),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=o,C.unstable_sxConfig={...es,...c==null?void 0:c.unstable_sxConfig},C.unstable_sx=function(b){return Un({sx:b,theme:this})},C.toRuntimeSource=qp,C}function Mu(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:sc({...r===!0?{}:r.palette,mode:t})})}function Kp(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:a=r?void 0:{light:!0},defaultColorScheme:s=r==null?void 0:r.mode,...o}=e,i=s||"light",l=a==null?void 0:a[i],c={...a,...r?{[i]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return bl(e,...t);let u=r;"palette"in e||c[i]&&(c[i]!==!0?u=c[i].palette:i==="dark"&&(u={mode:"dark"}));const d=bl({...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},Mu(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},Mu(d,"light",c.light)),d}return!r&&!("light"in c)&&i==="light"&&(c.light=!0),nv({...o,colorSchemes:c,defaultColorScheme:i,...typeof n!="boolean"&&n},...t)}const Yp=Kp();function av({props:e,name:t}){return Np({props:e,name:t,defaultTheme:Yp,themeId:Tp})}function oc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const sv=e=>oc(e)&&e!=="classes",Pt=Up({themeId:Tp,defaultTheme:Yp,rootShouldForwardProp:sv});function Qp(...e){const t=F.useRef(void 0),r=F.useCallback(n=>{const a=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const o=s,i=o(n);return typeof i=="function"?i:()=>{o(null)}}return s.current=n,()=>{s.current=null}});return()=>{a.forEach(s=>s==null?void 0:s())}},e);return F.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}let $u=0;function ov(e){const[t,r]=F.useState(e),n=t;return F.useEffect(()=>{t==null&&($u+=1,r(`mui-${$u}`))},[t]),n}const iv={...F},ju=iv.useId;function lv(e){return ju!==void 0?ju():ov(e)}class cv{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(a=>a(n)))},this.value=t,this.listeners=new Set}}const or=typeof window<"u"?F.useLayoutEffect:F.useEffect,No=({params:e,store:t})=>{F.useEffect(()=>{t.update(n=>K({},n,{animation:K({},n.animation,{skip:e.skipAnimation})}))},[t,e.skipAnimation]);const r=F.useCallback(()=>{let n=!1;return t.update(a=>K({},a,{animation:K({},a.animation,{skipAnimationRequests:a.animation.skipAnimationRequests+1})})),()=>{n||(n=!0,t.update(a=>K({},a,{animation:K({},a.animation,{skipAnimationRequests:a.animation.skipAnimationRequests-1})})))}},[t]);return or(()=>{if(typeof window>"u"||!(window!=null&&window.matchMedia))return;let a;const s=i=>{i.matches?a=r():a==null||a()},o=window.matchMedia("(prefers-reduced-motion)");return s(o),o.addEventListener("change",s),()=>{o.removeEventListener("change",s)}},[r,t]),{instance:{disableAnimation:r}}};No.params={skipAnimation:!0};No.getDefaultizedParams=({params:e})=>K({},e,{skipAnimation:e.skipAnimation??!1});No.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 uv=(e,t,r)=>{if(t.length===1&&t[0]===r){let n=!1;try{const a={};e(a)===a&&(n=!0)}catch{}if(n){let a;try{throw new Error}catch(s){({stack:a}=s)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
88
88
|
\`createSelector([state => state.todos], todos => todos)\`
|
|
89
89
|
This could lead to inefficient memoization and unnecessary re-renders.
|
|
90
90
|
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:a})}}},dv=(e,t,r)=>{const{memoize:n,memoizeOptions:a}=t,{inputSelectorResults:s,inputSelectorResultsCopy:o}=e,i=n(()=>({}),...a);if(!(i.apply(null,s)===i.apply(null,o))){let c;try{throw new Error}catch(u){({stack:c}=u)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
91
91
|
This means your output selector will likely run more frequently than intended.
|
|
92
92
|
Avoid returning a new reference inside your input selector, e.g.
|
|
93
|
-
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:s,secondInputs:o,stack:c})}},hv={inputStabilityCheck:"once",identityFunctionCheck:"once"},eo=Symbol("NOT_FOUND");function pv(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function fv(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function mv(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 ku=e=>Array.isArray(e)?e:[e];function gv(e){const t=Array.isArray(e[0])?e[0]:e;return mv(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Lu(e,t){const r=[],{length:n}=e;for(let a=0;a<n;a++)r.push(e[a].apply(null,t));return r}var yv=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...hv,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:uv},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:dv}}};function bv(e){let t;return{get(r){return t&&e(t.key,r)?t.value:eo},put(r,n){t={key:r,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function vv(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 eo}function a(i,l){n(i)===eo&&(r.unshift({key:i,value:l}),r.length>e&&r.pop())}function s(){return r}function o(){r=[]}return{get:n,put:a,getEntries:s,clear:o}}var
|
|
93
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:s,secondInputs:o,stack:c})}},hv={inputStabilityCheck:"once",identityFunctionCheck:"once"},eo=Symbol("NOT_FOUND");function pv(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function fv(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function mv(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 ku=e=>Array.isArray(e)?e:[e];function gv(e){const t=Array.isArray(e[0])?e[0]:e;return mv(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Lu(e,t){const r=[],{length:n}=e;for(let a=0;a<n;a++)r.push(e[a].apply(null,t));return r}var yv=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...hv,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:uv},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:dv}}};function bv(e){let t;return{get(r){return t&&e(t.key,r)?t.value:eo},put(r,n){t={key:r,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function vv(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 eo}function a(i,l){n(i)===eo&&(r.unshift({key:i,value:l}),r.length>e&&r.pop())}function s(){return r}function o(){r=[]}return{get:n,put:a,getEntries:s,clear:o}}var xv=(e,t)=>e===t;function Sv(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;const{length:a}=r;for(let s=0;s<a;s++)if(!e(r[s],n[s]))return!1;return!0}}function Ov(e,t){const r=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:n=xv,maxSize:a=1,resultEqualityCheck:s}=r,o=Sv(n);let i=0;const l=a<=1?bv(o):vv(a,o);function c(){let u=l.get(arguments);if(u===eo){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 wv=class{constructor(e){this.value=e}deref(){return this.value}},Cv=typeof WeakRef<"u"?WeakRef:wv,Pv=0,Uu=1;function ms(){return{s:Pv,v:void 0,o:null,p:null}}function Xp(e,t={}){let r=ms();const{resultEqualityCheck:n}=t;let a,s=0;function o(){var d;let i=r;const{length:l}=arguments;for(let h=0,p=l;h<p;h++){const m=arguments[h];if(typeof m=="function"||typeof m=="object"&&m!==null){let f=i.o;f===null&&(i.o=f=new WeakMap);const g=f.get(m);g===void 0?(i=ms(),f.set(m,i)):i=g}else{let f=i.p;f===null&&(i.p=f=new Map);const g=f.get(m);g===void 0?(i=ms(),f.set(m,i)):i=g}}const c=i;let u;if(i.s===Uu)u=i.v;else if(u=e.apply(null,arguments),s++,n){const h=((d=a==null?void 0:a.deref)==null?void 0:d.call(a))??a;h!=null&&n(h,u)&&(u=h,s!==0&&s--),a=typeof u=="object"&&u!==null||typeof u=="function"?new Cv(u):u}return c.s=Uu,c.v=u,u}return o.clearCache=()=>{r=ms(),o.resetResultsCount()},o.resultsCount=()=>s,o.resetResultsCount=()=>{s=0},o}function Zp(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let s=0,o=0,i,l={},c=a.pop();typeof c=="object"&&(l=c,c=a.pop()),pv(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...r,...l},{memoize:d,memoizeOptions:h=[],argsMemoize:p=Xp,argsMemoizeOptions:m=[],devModeChecks:f={}}=u,g=ku(h),S=ku(m),T=gv(a),O=d(function(){return s++,c.apply(null,arguments)},...g);let C=!0;const E=p(function(){o++;const P=Lu(T,arguments);if(i=O.apply(null,P),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:_,inputStabilityCheck:B}=yv(C,f);if(_.shouldRun&&_.run(c,P,i),B.shouldRun){const b=Lu(T,arguments);B.run({inputSelectorResults:P,inputSelectorResultsCopy:b},{memoize:d,memoizeOptions:g},arguments)}C&&(C=!1)}return i},...S);return Object.assign(E,{resultFunc:c,memoizedResultFunc:O,dependencies:T,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>i,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:d,argsMemoize:p})};return Object.assign(n,{withTypes:()=>n}),n}var Rv=Zp(Xp),Tv=Object.assign((e,t=Rv)=>{fv(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((o,i,l)=>(o[r[l]]=i,o),{}))},{withTypes:()=>Tv});const Av=Zp({memoize:Ov,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),Du=new WeakMap,ye=(...e)=>(r,...n)=>{const a=r.cacheKey;let s=Du.get(a);s||(s=new Map,Du.set(a,s));const o=s.get(e);if(o)return o(r,...n);const i=Av(...e);return s.set(e,i),i(r,...n)},Vv=e=>e.animation,Ev=ye([Vv],e=>e.skip||e.skipAnimationRequests>0);function _v(e){return e&&e.ownerDocument||document}function Iv(e){return _v(e).defaultView||window}var gs={exports:{}},_i={},ys={exports:{}},Ii={};/**
|
|
94
94
|
* @license React
|
|
95
95
|
* use-sync-external-store-shim.production.js
|
|
96
96
|
*
|
|
@@ -98,7 +98,7 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the MIT license found in the
|
|
100
100
|
* LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/var Nu;function Mv(){if(Nu)return
|
|
101
|
+
*/var Nu;function Mv(){if(Nu)return Ii;Nu=1;var e=se;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,a=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function i(d,h){var p=h(),m=n({inst:{value:p,getSnapshot:h}}),f=m[0].inst,g=m[1];return s(function(){f.value=p,f.getSnapshot=h,l(f)&&g({inst:f})},[d,p,h]),a(function(){return l(f)&&g({inst:f}),d(function(){l(f)&&g({inst:f})})},[d]),o(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 Ii.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Ii}var Mi={};/**
|
|
102
102
|
* @license React
|
|
103
103
|
* use-sync-external-store-shim.development.js
|
|
104
104
|
*
|
|
@@ -106,7 +106,7 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
106
106
|
*
|
|
107
107
|
* This source code is licensed under the MIT license found in the
|
|
108
108
|
* LICENSE file in the root directory of this source tree.
|
|
109
|
-
*/var Fu;function $v(){return Fu||(Fu=1,process.env.NODE_ENV!=="production"&&function(){function e(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}function t(p,m){u||a.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 f=m();if(!d){var g=m();s(f,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}g=o({inst:{value:f,getSnapshot:m}});var S=g[0].inst,
|
|
109
|
+
*/var Fu;function $v(){return Fu||(Fu=1,process.env.NODE_ENV!=="production"&&function(){function e(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}function t(p,m){u||a.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 f=m();if(!d){var g=m();s(f,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}g=o({inst:{value:f,getSnapshot:m}});var S=g[0].inst,T=g[1];return l(function(){S.value=f,S.getSnapshot=m,r(S)&&T({inst:S})},[p,f,m]),i(function(){return r(S)&&T({inst:S}),p(function(){r(S)&&T({inst:S})})},[p]),c(f),f}function r(p){var m=p.getSnapshot;p=p.value;try{var f=m();return!s(p,f)}catch{return!0}}function n(p,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var a=se,s=typeof Object.is=="function"?Object.is:e,o=a.useState,i=a.useEffect,l=a.useLayoutEffect,c=a.useDebugValue,u=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;Mi.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Mi}var Bu;function ef(){return Bu||(Bu=1,process.env.NODE_ENV==="production"?ys.exports=Mv():ys.exports=$v()),ys.exports}/**
|
|
110
110
|
* @license React
|
|
111
111
|
* use-sync-external-store-shim/with-selector.production.js
|
|
112
112
|
*
|
|
@@ -114,7 +114,7 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
114
114
|
*
|
|
115
115
|
* This source code is licensed under the MIT license found in the
|
|
116
116
|
* LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/var zu;function jv(){if(zu)return
|
|
117
|
+
*/var zu;function jv(){if(zu)return _i;zu=1;var e=se,t=ef();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,a=t.useSyncExternalStore,s=e.useRef,o=e.useEffect,i=e.useMemo,l=e.useDebugValue;return _i.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var m=s(null);if(m.current===null){var f={hasValue:!1,value:null};m.current=f}else f=m.current;m=i(function(){function S(R){if(!T){if(T=!0,O=R,R=h(R),p!==void 0&&f.hasValue){var P=f.value;if(p(P,R))return C=P}return C=R}if(P=C,n(O,R))return P;var _=h(R);return p!==void 0&&p(P,_)?(O=R,P):(O=R,C=_)}var T=!1,O,C,E=d===void 0?null:d;return[function(){return S(u())},E===null?void 0:function(){return S(E())}]},[u,d,h,p]);var g=a(c,m[0],m[1]);return o(function(){f.hasValue=!0,f.value=g},[g]),l(g),g},_i}var $i={};/**
|
|
118
118
|
* @license React
|
|
119
119
|
* use-sync-external-store-shim/with-selector.development.js
|
|
120
120
|
*
|
|
@@ -122,18 +122,18 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
122
122
|
*
|
|
123
123
|
* This source code is licensed under the MIT license found in the
|
|
124
124
|
* LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/var Gu;function kv(){return Gu||(Gu=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=se,r=ef(),n=typeof Object.is=="function"?Object.is:e,a=r.useSyncExternalStore,s=t.useRef,o=t.useEffect,i=t.useMemo,l=t.useDebugValue;Mi.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var m=s(null);if(m.current===null){var f={hasValue:!1,value:null};m.current=f}else f=m.current;m=i(function(){function S(T){if(!R){if(R=!0,O=T,T=h(T),p!==void 0&&f.hasValue){var P=f.value;if(p(P,T))return C=P}return C=T}if(P=C,n(O,T))return P;var _=h(T);return p!==void 0&&p(P,_)?(O=T,P):(O=T,C=_)}var R=!1,O,C,E=d===void 0?null:d;return[function(){return S(u())},E===null?void 0:function(){return S(E())}]},[u,d,h,p]);var g=a(c,m[0],m[1]);return o(function(){f.hasValue=!0,f.value=g},[g]),l(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Mi}var Hu;function Lv(){return Hu||(Hu=1,process.env.NODE_ENV==="production"?gs.exports=jv():gs.exports=kv()),gs.exports}var Uv=Lv();const Dv=Object.is,bt=(e,t,r=[],n=Dv)=>{const a=s=>t(s,...r);return Uv.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a,n)},Nv="DEFAULT_X_AXIS_KEY",Fv="DEFAULT_Y_AXIS_KEY",Bv={top:20,bottom:20,left:20,right:20},zv=45,Gv=25,tf=20,Jn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.x},Wn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.y},Hv=ye([Wn],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)),qv=ye([Wn],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)),Jv=ye([Jn],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)),Wv=ye([Jn],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)),Kv=e=>e.dimensions,rf=e=>e.dimensions.width,nf=e=>e.dimensions.height,Yv=e=>e.dimensions.margin.top,Qv=e=>e.dimensions.margin.right,Xv=e=>e.dimensions.margin.bottom,Zv=e=>e.dimensions.margin.left,rs=ye([rf,nf,Yv,Qv,Xv,Zv,Jv,qv,Wv,Hv],(e,t,r,n,a,s,o,i,l,c)=>({width:e-s-n-c-i,left:s+c,right:n+i,height:t-r-a-o-l,top:r+o,bottom:a+l})),eS=ye([Kv],e=>({width:e.propsWidth,height:e.propsHeight})),tS=ye([rf,nf],(e,t)=>({width:e,height:t}));function af(e,t){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:t?K({},t,e):e}const rS=10,No=({params:e,store:t,svgRef:r})=>{const n=e.width!==void 0&&e.height!==void 0,a=F.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[s,o]=F.useState(0),[i,l]=F.useState(0),c=F.useCallback(()=>{const m=r==null?void 0:r.current;if(!m)return{};const g=Iv(m).getComputedStyle(m),S=Math.floor(parseFloat(g.height))||0,R=Math.floor(parseFloat(g.width))||0;return t.update(O=>O.dimensions.width===R&&O.dimensions.height===S?O:K({},O,{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]);F.useEffect(()=>{t.update(m=>{const f=e.width??m.dimensions.width,g=e.height??m.dimensions.height;return K({},m,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:f,height:g,propsHeight:e.height,propsWidth:e.width}})})},[t,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]),F.useEffect(()=>{a.current.displayError=!0},[]),or(()=>{if(n||!a.current.initialCompute||a.current.computeRun>rS)return;const m=c();m.width!==s||m.height!==i?(a.current.computeRun+=1,m.width!==void 0&&o(m.width),m.height!==void 0&&l(m.height)):a.current.initialCompute&&(a.current.initialCompute=!1)},[i,s,c,n]),or(()=>{if(n)return()=>{};c();const m=r.current;if(typeof ResizeObserver>"u")return()=>{};let f;const g=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{c()})});return m&&g.observe(m),()=>{f&&cancelAnimationFrame(f),m&&g.unobserve(m)}},[c,n,r]),process.env.NODE_ENV!=="production"&&(a.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."),a.current.displayError=!1),a.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."),a.current.displayError=!1));const u=bt(t,rs),d=F.useCallback(m=>m>=u.left-1&&m<=u.left+u.width,[u.left,u.width]),h=F.useCallback(m=>m>=u.top-1&&m<=u.top+u.height,[u.height,u.top]);return{instance:{isPointInside:F.useCallback((m,f,g)=>g&&"closest"in g&&g.closest("[data-drawing-container]")?!0:d(m)&&h(f),[d,h]),isXInside:d,isYInside:h}}};No.params={width:!0,height:!0,margin:!0};No.getDefaultizedParams=({params:e})=>K({},e,{margin:af(e.margin,Bv)});No.getInitialState=({width:e,height:t,margin:r})=>({dimensions:{margin:r,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const oc=({params:e,store:t})=>(or(()=>{t.update(r=>K({},r,{experimentalFeatures:e.experimentalFeatures}))},[t,e.experimentalFeatures]),{});oc.params={experimentalFeatures:!0};oc.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});const nS=e=>e.experimentalFeatures,sf=ye([nS],e=>!!(e!=null&&e.preferStrictDomainInLineCharts));let qu=0;const aS=()=>(qu+=1,`mui-chart-${qu}`),ic=({params:e,store:t})=>(F.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??aS()})}))},[t,e.id]),{});ic.params={id:!0};ic.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const sS=e=>e.id,oS=ye([sS],e=>e.chartId),iS=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],lS=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],of=e=>e==="dark"?lS:iS,lf=({series:e,colors:t,seriesConfig:r,dataset:n})=>{const a={};e.forEach((o,i)=>{var u;const l=r[o.type].getSeriesWithDefaultValues(o,i,t),c=l.id;if(a[o.type]===void 0&&(a[o.type]={series:{},seriesOrder:[]}),((u=a[o.type])==null?void 0:u.series[c])!==void 0)throw new Error(`MUI X Charts: series' id "${c}" is not unique.`);a[o.type].series[c]=l,a[o.type].seriesOrder.push(c)});const s={};return Object.keys(r).forEach(o=>{var l,c;const i=a[o];i!==void 0&&(s[o]=((c=(l=r[o])==null?void 0:l.seriesProcessor)==null?void 0:c.call(l,i,n))??a[o])}),s},Fo=({params:e,store:t,seriesConfig:r})=>{const{series:n,dataset:a,theme:s,colors:o}=e,i=F.useRef(!0);return F.useEffect(()=>{if(i.current){i.current=!1;return}t.update(l=>K({},l,{series:K({},l.series,{processedSeries:lf({series:n,colors:typeof o=="function"?o(s):o,seriesConfig:r,dataset:a})})}))},[o,a,n,s,r,t]),{}};Fo.params={dataset:!0,series:!0,colors:!0,theme:!0};const cS=[];Fo.getDefaultizedParams=({params:e})=>{var t;return K({},e,{series:(t=e.series)!=null&&t.length?e.series:cS,colors:e.colors??of,theme:e.theme??"light"})};Fo.getInitialState=({series:e=[],colors:t,theme:r,dataset:n},a,s)=>({series:{seriesConfig:s,processedSeries:lf({series:e,colors:typeof t=="function"?t(r):t,seriesConfig:s,dataset:n})}});const cf=e=>e.series,ns=ye([cf],e=>e.processedSeries),Bo=ye([cf],e=>e.seriesConfig),uS={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 uf{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 uS)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,a){this.element=t,this.pointerManager=r,this.gesturesRegistry=n,this.keyboardManager=a;const s=`${this.name}ChangeOptions`;this.element.addEventListener(s,this.handleOptionsChange.bind(this));const o=`${this.name}ChangeState`;this.element.addEventListener(o,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 dS{constructor(){this.activeGestures=new Map}registerActiveGesture(t,r){this.activeGestures.has(t)||this.activeGestures.set(t,new Set);const n=this.activeGestures.get(t),a={gesture:r,element:t};n.add(a)}unregisterActiveGesture(t,r){const n=this.activeGestures.get(t);n&&(n.forEach(a=>{a.gesture===r&&n.delete(a)}),n.size===0&&this.activeGestures.delete(t))}getActiveGestures(t){const r=this.activeGestures.get(t);return r?Array.from(r).reduce((n,a)=>(n[a.gesture.name]=!0,n),{}):{}}isGestureActive(t,r){const n=this.activeGestures.get(t);return n?Array.from(n).some(a=>a.gesture===r):!1}destroy(){this.activeGestures.clear()}unregisterElement(t){this.activeGestures.delete(t)}}class hS{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 pS{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}),a=this.pointers.values().next().value;if(this.pointers.size>0&&a){Object.defineProperties(n,{clientX:{value:a.clientX},clientY:{value:a.clientY},pointerId:{value:a.pointerId},pointerType:{value:a.pointerType}});for(const[s,o]of this.pointers.entries()){const i=K({},o,{type:"forceCancel"});this.pointers.set(s,i)}}this.notifyHandlers(n),this.pointers.clear()},this.handlePointerEvent=r=>{const{type:n,pointerId:a}=r;if(n==="pointerdown"){if(this.pointers.set(a,this.createPointerData(r)),r.target instanceof Element)try{r.target.setPointerCapture(a)}catch{}}else if(n==="pointermove")this.pointers.set(a,this.createPointerData(r));else if(n==="pointerup"||n==="pointercancel"||n==="forceCancel"){if(r.target instanceof Element)try{r.target.releasePointerCapture(a)}catch{}this.pointers.set(a,this.createPointerData(r)),this.notifyHandlers(r),this.pointers.delete(a);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 fS{constructor(t){this.gestureTemplates=new Map,this.elementGestureMap=new Map,this.activeGesturesRegistry=new dS,this.pointerManager=void 0,this.keyboardManager=new hS,this.pointerManager=new pS({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 a=this.elementGestureMap.get(r);if(!a||!a.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 a=this.elementGestureMap.get(r);if(!a||!a.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 o=n==null?void 0:n[s];this.registerSingleGesture(s,r,o)}),r;const a=n==null?void 0:n[t];return this.registerSingleGesture(t,r,a),r}registerSingleGesture(t,r,n){const a=this.gestureTemplates.get(t);if(!a)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 o=a.clone(n);return o.init(r,this.pointerManager,this.activeGesturesRegistry,this.keyboardManager),s.set(t,o),!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 as extends uf{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,a){super.init(t,r,n,a),this.unregisterHandler=this.pointerManager.registerGestureHandler((s,o)=>this.handlePointerEvent(s,o))}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 mS(e,t){const r=t.x-e.x,n=t.y-e.y;return Math.sqrt(r*r+n*n)}function $i(e){if(e.length<2)return 0;let t=0,r=0;for(let n=0;n<e.length;n+=1)for(let a=n+1;a<e.length;a+=1)t+=mS({x:e[n].clientX,y:e[n].clientY},{x:e[a].clientX,y:e[a].clientY}),r+=1;return r>0?t/r:0}function ir(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 Kn(e,t){return`${e}${t==="ongoing"?"":t.charAt(0).toUpperCase()+t.slice(1)}`}const bs=1e-5,br=1e-5,Ju=.15;function gS(e,t){const r=t.x-e.x,n=t.y-e.y,a={vertical:null,horizontal:null,mainAxis:null},s=yS(t,e),o=Math.abs(r)>Math.abs(n)?"horizontal":"vertical",i=s||o==="horizontal"?bs:Ju,l=s?bs:o==="horizontal"?Ju:bs;return Math.abs(r)>i&&(a.horizontal=r>0?"right":"left"),Math.abs(n)>l&&(a.vertical=n>0?"down":"up"),a.mainAxis=s?"diagonal":o,a}function yS(e,t){const r=t.x-e.x,n=t.y-e.y,a=Math.atan2(n,r)*180/Math.PI;return a>=-45+br&&a<=-22.5+br||a>=22.5+br&&a<=45+br||a>=135+br&&a<=157.5+br||a>=-157.5+br&&a<=-135+br}function bS(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 vS=0,SS=e=>e>vS?1:e<-0?-1:0;class lc extends as{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 lc(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,a){super.init(t,r,n,a),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 a={x:t.clientX,y:t.clientY};this.state.lastPosition=a,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()),a=this.getTargetElement(r);if(!a||n.length<this.minPointers||n.length>this.maxPointers)return;if(this.shouldPreventGesture(a)){if(!this.isActive)return;this.resetState(),this.emitMoveEvent(a,"end",n,r);return}const s={x:r.clientX,y:r.clientY};this.state.lastPosition=s,this.isActive||(this.isActive=!0,this.emitMoveEvent(a,"start",n,r)),this.emitMoveEvent(a,"ongoing",n,r)}emitMoveEvent(t,r,n,a){const s=this.state.lastPosition||ir(n),o=this.gesturesRegistry.getActiveGestures(t),i={gestureName:this.name,centroid:s,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,activeGestures:o,customData:this.customData},l=Kn(this.name,r),c=new CustomEvent(l,{bubbles:!0,cancelable:!0,detail:i});t.dispatchEvent(c)}}class cc extends as{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 cc(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 a=this.getTargetElement(r);if(!a)return;if(this.shouldPreventGesture(a)){this.cancel(a,n,r);return}const s=this.getRelevantPointers(n,a);if(s.length<this.minPointers||s.length>this.maxPointers){this.cancel(a,s,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(s.forEach(o=>{this.state.startPointers.set(o.pointerId,o)}),this.originalTarget=a,this.state.startCentroid=ir(s),this.state.lastCentroid=K({},this.state.startCentroid));break;case"pointermove":if(this.state.startCentroid&&s.length>=this.minPointers){const o=ir(s),i=o.x-this.state.startCentroid.x,l=o.y-this.state.startCentroid.y,c=Math.sqrt(i*i+l*l),u=gS(this.state.lastCentroid??this.state.startCentroid,o),d=this.state.lastCentroid?o.x-this.state.lastCentroid.x:0,h=this.state.lastCentroid?o.y-this.state.lastCentroid.y:0;!this.state.movementThresholdReached&&c>=this.threshold&&bS(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(a,"start",s,r,o),this.emitPanEvent(a,"ongoing",s,r,o)):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(a,"ongoing",s,r,o)),this.state.lastCentroid=o,this.state.lastDirection=u}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive&&this.state.movementThresholdReached){if(s.filter(o=>o.type!=="pointerup"&&o.type!=="pointercancel").length<this.minPointers){const o=this.state.lastCentroid||this.state.startCentroid;r.type==="pointercancel"&&this.emitPanEvent(a,"cancel",s,r,o),this.emitPanEvent(a,"end",s,r,o),this.resetState()}}else this.resetState();break}}emitPanEvent(t,r,n,a,s){var S,R;if(!this.state.startCentroid)return;const o=((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?(a.timeStamp-l.timeStamp)/1e3:0,u=c>0?o/c:0,d=c>0?i/c:0,h=Math.sqrt(u*u+d*d),p=this.gesturesRegistry.getActiveGestures(t),m={gestureName:this.name,initialCentroid:this.state.startCentroid,centroid:s,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,deltaX:o,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},f=Kn(this.name,r),g=new CustomEvent(f,{bubbles:!0,cancelable:!0,detail:m});t.dispatchEvent(g),this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation()}cancel(t,r,n){if(this.isActive){const a=t??this.element;this.emitPanEvent(a,"cancel",r,n,this.state.lastCentroid),this.emitPanEvent(a,"end",r,n,this.state.lastCentroid)}this.resetState()}}class uc extends as{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 uc(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()),a=this.getTargetElement(r);if(!a)return;if(this.shouldPreventGesture(a)){this.isActive&&(this.emitPinchEvent(a,"cancel",n,r),this.resetState());return}const s=this.getRelevantPointers(n,a);switch(r.type){case"pointerdown":if(s.length>=2&&!this.isActive){const o=$i(s);this.state.startDistance=o,this.state.lastDistance=o,this.state.lastTime=r.timeStamp,this.originalTarget=a}break;case"pointermove":if(this.state.startDistance&&s.length>=this.minPointers){const o=$i(s),i=Math.abs(o-this.state.lastDistance);if(i!==0&&i>=this.threshold){const l=this.state.startDistance?o/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=(o-this.state.lastDistance)/u;this.state.velocity=Number.isNaN(h)?0:h}this.state.lastDistance=o,this.state.deltaScale=l-this.state.lastScale,this.state.lastScale=l,this.state.lastTime=r.timeStamp,this.isActive?this.emitPinchEvent(a,"ongoing",s,r):(this.isActive=!0,this.emitPinchEvent(a,"start",s,r),this.emitPinchEvent(a,"ongoing",s,r))}}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive){const o=s.filter(i=>i.type!=="pointerup"&&i.type!=="pointercancel");if(o.length<this.minPointers)r.type==="pointercancel"&&this.emitPinchEvent(a,"cancel",s,r),this.emitPinchEvent(a,"end",s,r),this.resetState();else if(o.length>=2){const i=$i(o);this.state.startDistance=i/this.state.lastScale}}break}}emitPinchEvent(t,r,n,a){const s=ir(n),o=this.state.lastDistance,i=this.state.lastScale,l=this.gesturesRegistry.getActiveGestures(t),c={gestureName:this.name,centroid:s,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,scale:i,deltaScale:this.state.deltaScale,totalScale:this.state.totalScale,distance:o,velocity:this.state.velocity,activeGestures:l,direction:SS(this.state.velocity),customData:this.customData};this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation();const u=Kn(this.name,r),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,detail:c});t.dispatchEvent(d)}}class dc extends as{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 dc(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 a=this.getTargetElement(r);if(!a)return;if(this.shouldPreventGesture(a)){this.isActive&&this.cancelPress(a,n,r);return}const s=this.getRelevantPointers(n,a);if(s.length<this.minPointers||s.length>this.maxPointers){this.isActive&&this.cancelPress(a,s,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(this.state.startCentroid=ir(s),this.state.lastPosition=K({},this.state.startCentroid),this.state.startTime=r.timeStamp,this.isActive=!0,this.originalTarget=a,this.clearPressTimer(),this.state.timerId=setTimeout(()=>{if(this.isActive&&this.state.startCentroid){this.state.pressThresholdReached=!0;const o=this.state.lastPosition;this.emitPressEvent(a,"start",s,r,o),this.emitPressEvent(a,"ongoing",s,r,o)}},this.duration));break;case"pointermove":if(this.isActive&&this.state.startCentroid){const o=ir(s);this.state.lastPosition=o;const i=o.x-this.state.startCentroid.x,l=o.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelPress(a,s,r)}break;case"pointerup":if(this.isActive){if(this.state.pressThresholdReached){const o=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(a,"end",s,r,o)}this.resetState()}break;case"pointercancel":case"forceCancel":this.cancelPress(a,s,r);break}}emitPressEvent(t,r,n,a,s){const o=this.gesturesRegistry.getActiveGestures(t),i=a.timeStamp-this.state.startTime,l={gestureName:this.name,centroid:s,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,x:s.x,y:s.y,duration:i,activeGestures:o,customData:this.customData},c=Kn(this.name,r),u=new CustomEvent(c,{bubbles:!0,cancelable:!0,detail:l});t.dispatchEvent(u),this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation()}cancelPress(t,r,n){if(this.isActive&&this.state.pressThresholdReached){const a=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(t??this.element,"cancel",r,n,a),this.emitPressEvent(t??this.element,"end",r,n,a)}this.resetState()}}class hc extends as{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 hc(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()),a=this.getTargetElement(r);if(!a)return;const s=this.getRelevantPointers(n,a);if(this.shouldPreventGesture(a)||s.length<this.minPointers||s.length>this.maxPointers){this.isActive&&this.cancelTap(a,s,r);return}switch(r.type){case"pointerdown":this.isActive||(this.state.startCentroid=ir(s),this.state.lastPosition=K({},this.state.startCentroid),this.isActive=!0,this.originalTarget=a);break;case"pointermove":if(this.isActive&&this.state.startCentroid){const o=ir(s);this.state.lastPosition=o;const i=o.x-this.state.startCentroid.x,l=o.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelTap(a,s,r)}break;case"pointerup":if(this.isActive){this.state.currentTapCount+=1;const o=this.state.lastPosition||this.state.startCentroid;if(!o){this.cancelTap(a,s,r);return}this.state.currentTapCount>=this.taps?(this.fireTapEvent(a,s,r,o),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(a,s,r);break}}fireTapEvent(t,r,n,a){const s=this.gesturesRegistry.getActiveGestures(t),o={gestureName:this.name,centroid:a,target:n.target,srcEvent:n,phase:"end",pointers:r,timeStamp:n.timeStamp,x:a.x,y:a.y,tapCount:this.state.currentTapCount,activeGestures:s,customData:this.customData},i=new CustomEvent(this.name,{bubbles:!0,cancelable:!0,detail:o});t.dispatchEvent(i),this.preventDefault&&n.preventDefault(),this.stopPropagation&&n.stopPropagation()}cancelTap(t,r,n){if(this.state.startCentroid||this.state.lastPosition){const a=this.state.lastPosition||this.state.startCentroid,s=this.gesturesRegistry.getActiveGestures(t),o={gestureName:this.name,centroid:a,target:n.target,srcEvent:n,phase:"cancel",pointers:r,timeStamp:n.timeStamp,x:a.x,y:a.y,tapCount:this.state.currentTapCount,activeGestures:s,customData:this.customData},i=Kn(this.name,"cancel"),l=new CustomEvent(i,{bubbles:!0,cancelable:!0,detail:o});t.dispatchEvent(l)}this.resetState()}}class pc extends uf{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 pc(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,a){super.init(t,r,n,a),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(a=>{this.state[a]<this.min&&(this.state[a]=this.min),this.state[a]>this.max&&(this.state[a]=this.max)}),this.emitWheelEvent(n,t)}emitWheelEvent(t,r){const n=t.length>0?ir(t):{x:r.clientX,y:r.clientY},a=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:a,customData:this.customData};this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const o=Kn(this.name,"ongoing"),i=new CustomEvent(o,{bubbles:!0,cancelable:!0,detail:s});this.element.dispatchEvent(i)}}const yn=e=>e.preventDefault(),fc=({svgRef:e})=>{F.useEffect(()=>{const r=e.current;if(!r)return;const n=new fS({gestures:[new cc({name:"pan",threshold:0,maxPointers:1}),new lc({name:"move",preventIf:["pan","pinch"]}),new uc({name:"pinch",threshold:5,preventIf:["pan"]}),new pc({name:"turnWheel",sensitivity:.01,initialDelta:1}),new hc({name:"tap",maxDistance:10,preventIf:["pan","pinch"]}),new dc({name:"quickPress",duration:50,maxDistance:10})]});return n.registerElement(["pan","move","pinch","turnWheel","tap","quickPress"],r),()=>{n.destroy()}},[e]);const t=F.useCallback((r,n,a)=>{const s=e.current;return s==null||s.addEventListener(r,n,a),{cleanup:()=>s==null?void 0:s.removeEventListener(r,n)}},[e]);return F.useEffect(()=>{const r=e.current;return r==null||r.addEventListener("gesturestart",yn),r==null||r.addEventListener("gesturechange",yn),r==null||r.addEventListener("gestureend",yn),()=>{r==null||r.removeEventListener("gesturestart",yn),r==null||r.removeEventListener("gesturechange",yn),r==null||r.removeEventListener("gestureend",yn)}},[e]),{instance:{addInteractionListener:t}}};fc.params={};fc.getInitialState=()=>({});const xS=[ic,oc,No,Fo,fc,Do],OS=["apiRef"],wS=e=>{let{plugins:t}=e,r=Cr(e.props,OS);const n={};t.forEach(o=>{Object.assign(n,o.params)});const a={};return Object.keys(r).forEach(o=>{const i=r[o];n[o]&&(a[o]=i)}),t.reduce((o,i)=>i.getDefaultizedParams?i.getDefaultizedParams({params:o}):o,a)};let Wu=0;function CS(e,t,r){const n=lv(),a=F.useMemo(()=>[...xS,...e],[e]),s=wS({plugins:a,props:t});s.id=s.id??n;const i=F.useRef({}).current,l=RS(t.apiRef),c=F.useRef(null),u=F.useRef(null),d=F.useRef(null);if(d.current==null){Wu+=1;const m={cacheKey:{id:Wu}};a.forEach(f=>{f.getInitialState&&Object.assign(m,f.getInitialState(s,m,r))}),d.current=new cv(m)}const h=m=>{const f=m({instance:i,params:s,plugins:a,store:d.current,svgRef:u,chartRootRef:c,seriesConfig:r});f.publicAPI&&Object.assign(l.current,f.publicAPI),f.instance&&Object.assign(i,f.instance)};return a.forEach(h),{contextValue:F.useMemo(()=>({store:d.current,publicAPI:l.current,instance:i,svgRef:u,chartRootRef:c}),[i,l])}}function PS(e){return e.current==null&&(e.current={}),e}function RS(e){const t=F.useRef({});return e?PS(e):t}const mc=F.createContext(null);process.env.NODE_ENV!=="production"&&(mc.displayName="ChartContext");const Ku=new Set;function Da(e,t="warning"){if(process.env.NODE_ENV==="production")return;const r=Array.isArray(e)?e.join(`
|
|
126
|
-
`):e;Ku.has(r)||(Ku.add(r),t==="error"?console.error(r):console.warn(r))}function TS(e){const{componentName:t,propName:r,controlled:n,defaultValue:a,warningPrefix:s="MUI X"}=e,[{initialDefaultValue:o,isControlled:i}]=F.useState({initialDefaultValue:a,isControlled:n!==void 0});i!==(n!==void 0)&&Da([`${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(o)!==JSON.stringify(a)&&Da([`${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 df=process.env.NODE_ENV==="production"?()=>{}:TS,hf=4,pf=20+2*hf,AS=40+2*hf,VS="hover",vs={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",slider:{enabled:!1,preview:!1,size:pf,showTooltip:VS}},gc=(e,t,r)=>{var n;if(e)return e===!0?K({axisId:t,axisDirection:r},vs):K({axisId:t,axisDirection:r},vs,e,{slider:K({},vs.slider,{size:((n=e.slider)==null?void 0:n.preview)??vs.slider.preview?AS:pf},e.slider)})};function ff(e,t){const r={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:Nv,scaleType:"linear"}]).map((s,o)=>{var p;const i=s.dataKey,l=o===0?"bottom":"none",c=s.position??l,u=Gv+(s.label?tf:0),d=s.id??`defaultized-x-axis-${o}`,h=K({offset:r[c]},s,{id:d,position:c,height:s.height??u,zoom:gc(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(m=>m[i])})})}function mf(e,t){const r={right:0,left:0,none:0};return(e&&e.length>0?e:[{id:Fv,scaleType:"linear"}]).map((s,o)=>{var p;const i=s.dataKey,l=o===0?"left":"none",c=s.position??l,u=zv+(s.label?tf:0),d=s.id??`defaultized-y-axis-${o}`,h=K({offset:r[c]},s,{id:d,position:c,width:s.width??u,zoom:gc(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(m=>m[i])})})}function zs(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ES(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function yc(e){let t,r,n;e.length!==2?(t=zs,r=(i,l)=>zs(e(i),l),n=(i,l)=>e(i)-l):(t=e===zs||e===ES?e:_S,r=e,n=e);function a(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 o(i,l,c=0,u=i.length){const d=a(i,l,c,u-1);return d>c&&n(i[d-1],l)>-n(i[d],l)?d-1:d}return{left:a,center:o,right:s}}function _S(){return 0}function IS(e){return e===null?NaN:+e}const MS=yc(zs),gf=MS.right;yc(IS).center;class Yu extends Map{constructor(t,r=kS){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(Qu(this,t))}has(t){return super.has(Qu(this,t))}set(t,r){return super.set($S(this,t),r)}delete(t){return super.delete(jS(this,t))}}function Qu({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function $S({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function jS({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function kS(e){return e!==null&&typeof e=="object"?e.valueOf():e}const LS=Math.sqrt(50),US=Math.sqrt(10),DS=Math.sqrt(2);function to(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),s=n/Math.pow(10,a),o=s>=LS?10:s>=US?5:s>=DS?2:1;let i,l,c;return a<0?(c=Math.pow(10,-a)/o,i=Math.round(e*c),l=Math.round(t*c),i/c<e&&++i,l/c>t&&--l,c=-c):(c=Math.pow(10,a)*o,i=Math.round(e/c),l=Math.round(t/c),i*c<e&&++i,l*c>t&&--l),l<i&&.5<=r&&r<2?to(e,t,r*2):[i,l,c]}function bl(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,s,o]=n?to(t,e,r):to(e,t,r);if(!(s>=a))return[];const i=s-a+1,l=new Array(i);if(n)if(o<0)for(let c=0;c<i;++c)l[c]=(s-c)/-o;else for(let c=0;c<i;++c)l[c]=(s-c)*o;else if(o<0)for(let c=0;c<i;++c)l[c]=(a+c)/-o;else for(let c=0;c<i;++c)l[c]=(a+c)*o;return l}function vl(e,t,r){return t=+t,e=+e,r=+r,to(e,t,r)[2]}function Sl(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?vl(t,e,r):vl(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function NS(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,s=new Array(a);++n<a;)s[n]=e+n*r;return s}function Vr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function FS(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 Xu=Symbol("implicit");function ro(){var e=new Yu,t=[],r=[],n=Xu;function a(s){let o=e.get(s);if(o===void 0){if(n!==Xu)return n;e.set(s,o=t.push(s)-1)}return r[o%r.length]}return a.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new Yu;for(const o of s)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(s){return arguments.length?(r=Array.from(s),a):r.slice()},a.unknown=function(s){return arguments.length?(n=s,a):n},a.copy=function(){return ro(t,r).unknown(n)},Vr.apply(a,arguments),a}function bc(){var e=ro().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,s,o,i=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,p=a<n,m=p?a:n,f=p?n:a;s=(f-m)/Math.max(1,h-l+c*2),i&&(s=Math.floor(s)),m+=(f-m-s*(h-l))*u,o=s*(1-l),i&&(m=Math.round(m),o=Math.round(o));var g=NS(h).map(function(S){return m+s*S});return r(p?g.reverse():g)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([n,a]=h,n=+n,a=+a,d()):[n,a]},e.rangeRound=function(h){return[n,a]=h,n=+n,a=+a,i=!0,d()},e.bandwidth=function(){return o},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 bc(t(),[n,a]).round(i).paddingInner(l).paddingOuter(c).align(u)},Vr.apply(d(),arguments)}function yf(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return yf(t())},e}function BS(){return yf(bc.apply(null,arguments).paddingInner(1))}function vc(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function bf(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ss(){}var Na=.7,no=1/Na,$n="\\s*([+-]?\\d+)\\s*",Fa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zS=/^#([0-9a-f]{3,8})$/,GS=new RegExp(`^rgb\\(${$n},${$n},${$n}\\)$`),HS=new RegExp(`^rgb\\(${Qt},${Qt},${Qt}\\)$`),qS=new RegExp(`^rgba\\(${$n},${$n},${$n},${Fa}\\)$`),JS=new RegExp(`^rgba\\(${Qt},${Qt},${Qt},${Fa}\\)$`),WS=new RegExp(`^hsl\\(${Fa},${Qt},${Qt}\\)$`),KS=new RegExp(`^hsla\\(${Fa},${Qt},${Qt},${Fa}\\)$`),Zu={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};vc(ss,Ba,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ed,formatHex:ed,formatHex8:YS,formatHsl:QS,formatRgb:td,toString:td});function ed(){return this.rgb().formatHex()}function YS(){return this.rgb().formatHex8()}function QS(){return vf(this).formatHsl()}function td(){return this.rgb().formatRgb()}function Ba(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=zS.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?rd(t):r===3?new vt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ss(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ss(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=GS.exec(e))?new vt(t[1],t[2],t[3],1):(t=HS.exec(e))?new vt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=qS.exec(e))?Ss(t[1],t[2],t[3],t[4]):(t=JS.exec(e))?Ss(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=WS.exec(e))?sd(t[1],t[2]/100,t[3]/100,1):(t=KS.exec(e))?sd(t[1],t[2]/100,t[3]/100,t[4]):Zu.hasOwnProperty(e)?rd(Zu[e]):e==="transparent"?new vt(NaN,NaN,NaN,0):null}function rd(e){return new vt(e>>16&255,e>>8&255,e&255,1)}function Ss(e,t,r,n){return n<=0&&(e=t=r=NaN),new vt(e,t,r,n)}function XS(e){return e instanceof ss||(e=Ba(e)),e?(e=e.rgb(),new vt(e.r,e.g,e.b,e.opacity)):new vt}function xl(e,t,r,n){return arguments.length===1?XS(e):new vt(e,t,r,n??1)}function vt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}vc(vt,xl,bf(ss,{brighter(e){return e=e==null?no:Math.pow(no,e),new vt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Na:Math.pow(Na,e),new vt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vt(Fr(this.r),Fr(this.g),Fr(this.b),ao(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:nd,formatHex:nd,formatHex8:ZS,formatRgb:ad,toString:ad}));function nd(){return`#${Lr(this.r)}${Lr(this.g)}${Lr(this.b)}`}function ZS(){return`#${Lr(this.r)}${Lr(this.g)}${Lr(this.b)}${Lr((isNaN(this.opacity)?1:this.opacity)*255)}`}function ad(){const e=ao(this.opacity);return`${e===1?"rgb(":"rgba("}${Fr(this.r)}, ${Fr(this.g)}, ${Fr(this.b)}${e===1?")":`, ${e})`}`}function ao(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Lr(e){return e=Fr(e),(e<16?"0":"")+e.toString(16)}function sd(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ut(e,t,r,n)}function vf(e){if(e instanceof Ut)return new Ut(e.h,e.s,e.l,e.opacity);if(e instanceof ss||(e=Ba(e)),!e)return new Ut;if(e instanceof Ut)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),s=Math.max(t,r,n),o=NaN,i=s-a,l=(s+a)/2;return i?(t===s?o=(r-n)/i+(r<n)*6:r===s?o=(n-t)/i+2:o=(t-r)/i+4,i/=l<.5?s+a:2-s-a,o*=60):i=l>0&&l<1?0:o,new Ut(o,i,l,e.opacity)}function ex(e,t,r,n){return arguments.length===1?vf(e):new Ut(e,t,r,n??1)}function Ut(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}vc(Ut,ex,bf(ss,{brighter(e){return e=e==null?no:Math.pow(no,e),new Ut(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Na:Math.pow(Na,e),new Ut(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,a=2*r-n;return new vt(ji(e>=240?e-240:e+120,a,n),ji(e,a,n),ji(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Ut(od(this.h),xs(this.s),xs(this.l),ao(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=ao(this.opacity);return`${e===1?"hsl(":"hsla("}${od(this.h)}, ${xs(this.s)*100}%, ${xs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function od(e){return e=(e||0)%360,e<0?e+360:e}function xs(e){return Math.max(0,Math.min(1,e||0))}function ji(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 Sc=e=>()=>e;function tx(e,t){return function(r){return e+r*t}}function rx(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 nx(e){return(e=+e)==1?Sf:function(t,r){return r-t?rx(t,r,e):Sc(isNaN(t)?r:t)}}function Sf(e,t){var r=t-e;return r?tx(e,r):Sc(isNaN(e)?t:e)}const id=function e(t){var r=nx(t);function n(a,s){var o=r((a=xl(a)).r,(s=xl(s)).r),i=r(a.g,s.g),l=r(a.b,s.b),c=Sf(a.opacity,s.opacity);return function(u){return a.r=o(u),a.g=i(u),a.b=l(u),a.opacity=c(u),a+""}}return n.gamma=e,n}(1);function ax(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(s){for(a=0;a<r;++a)n[a]=e[a]*(1-s)+t[a]*s;return n}}function sx(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ox(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),s=new Array(r),o;for(o=0;o<n;++o)a[o]=zo(e[o],t[o]);for(;o<r;++o)s[o]=t[o];return function(i){for(o=0;o<n;++o)s[o]=a[o](i);return s}}function xc(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Dt(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function ix(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=zo(e[a],t[a]):n[a]=t[a];return function(s){for(a in r)n[a]=r[a](s);return n}}var Ol=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ki=new RegExp(Ol.source,"g");function lx(e){return function(){return e}}function cx(e){return function(t){return e(t)+""}}function ux(e,t){var r=Ol.lastIndex=ki.lastIndex=0,n,a,s,o=-1,i=[],l=[];for(e=e+"",t=t+"";(n=Ol.exec(e))&&(a=ki.exec(t));)(s=a.index)>r&&(s=t.slice(r,s),i[o]?i[o]+=s:i[++o]=s),(n=n[0])===(a=a[0])?i[o]?i[o]+=a:i[++o]=a:(i[++o]=null,l.push({i:o,x:Dt(n,a)})),r=ki.lastIndex;return r<t.length&&(s=t.slice(r),i[o]?i[o]+=s:i[++o]=s),i.length<2?l[0]?cx(l[0].x):lx(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 zo(e,t){var r=typeof t,n;return t==null||r==="boolean"?Sc(t):(r==="number"?Dt:r==="string"?(n=Ba(t))?(t=n,id):ux:t instanceof Ba?id:t instanceof Date?xc:sx(t)?ax:Array.isArray(t)?ox:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ix:Dt)(e,t)}function xf(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function dx(e){return function(){return e}}function hx(e){return+e}var ld=[0,1];function At(e){return e}function wl(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:dx(isNaN(t)?NaN:.5)}function px(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function fx(e,t,r){var n=e[0],a=e[1],s=t[0],o=t[1];return a<n?(n=wl(a,n),s=r(o,s)):(n=wl(n,a),s=r(s,o)),function(i){return s(n(i))}}function mx(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),s=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)a[o]=wl(e[o],e[o+1]),s[o]=r(t[o],t[o+1]);return function(i){var l=gf(e,i,1,n)-1;return s[l](a[l](i))}}function Go(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Oc(){var e=ld,t=ld,r=zo,n,a,s,o=At,i,l,c;function u(){var h=Math.min(e.length,t.length);return o!==At&&(o=px(e[0],e[h-1])),i=h>2?mx:fx,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?s:(l||(l=i(e.map(n),t,r)))(n(o(h)))}return d.invert=function(h){return o(a((c||(c=i(t,e.map(n),Dt)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,hx),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=xf,u()},d.clamp=function(h){return arguments.length?(o=h?!0:At,u()):o!==At},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,a=p,u()}}function Of(){return Oc()(At,At)}function gx(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function so(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 Dn(e){return e=so(Math.abs(e)),e?e[1]:NaN}function yx(e,t){return function(r,n){for(var a=r.length,s=[],o=0,i=e[0],l=0;a>0&&i>0&&(l+i+1>n&&(i=Math.max(1,n-l)),s.push(r.substring(a-=i,a+i)),!((l+=i+1)>n));)i=e[o=(o+1)%e.length];return s.reverse().join(t)}}function bx(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var vx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function za(e){if(!(t=vx.exec(e)))throw new Error("invalid format: "+e);var t;return new wc({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]})}za.prototype=wc.prototype;function wc(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+""}wc.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 Sx(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var wf;function xx(e,t){var r=so(e,t);if(!r)return e+"";var n=r[0],a=r[1],s=a-(wf=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return s===o?n:s>o?n+new Array(s-o+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+new Array(1-s).join("0")+so(e,Math.max(0,t+s-1))[0]}function cd(e,t){var r=so(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const ud={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:gx,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)=>cd(e*100,t),r:cd,s:xx,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function dd(e){return e}var hd=Array.prototype.map,pd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ox(e){var t=e.grouping===void 0||e.thousands===void 0?dd:yx(hd.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?dd:bx(hd.call(e.numerals,String)),o=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=za(d);var h=d.fill,p=d.align,m=d.sign,f=d.symbol,g=d.zero,S=d.width,R=d.comma,O=d.precision,C=d.trim,E=d.type;E==="n"?(R=!0,E="g"):ud[E]||(O===void 0&&(O=12),C=!0,E="g"),(g||h==="0"&&p==="=")&&(g=!0,h="0",p="=");var T=f==="$"?r:f==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",P=f==="$"?n:/[%p]/.test(E)?o:"",_=ud[E],B=/[defgprs%]/.test(E);O=O===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function b(A){var z=T,I=P,G,re,te;if(E==="c")I=_(A)+I,A="";else{A=+A;var oe=A<0||1/A<0;if(A=isNaN(A)?l:_(Math.abs(A),O),C&&(A=Sx(A)),oe&&+A==0&&m!=="+"&&(oe=!1),z=(oe?m==="("?m:i:m==="-"||m==="("?"":m)+z,I=(E==="s"?pd[8+wf/3]:"")+I+(oe&&m==="("?")":""),B){for(G=-1,re=A.length;++G<re;)if(te=A.charCodeAt(G),48>te||te>57){I=(te===46?a+A.slice(G+1):A.slice(G))+I,A=A.slice(0,G);break}}}R&&!g&&(A=t(A,1/0));var Z=z.length+A.length+I.length,ae=Z<S?new Array(S-Z+1).join(h):"";switch(R&&g&&(A=t(ae+A,ae.length?S-I.length:1/0),ae=""),p){case"<":A=z+A+I+ae;break;case"=":A=z+ae+A+I;break;case"^":A=ae.slice(0,Z=ae.length>>1)+z+A+I+ae.slice(Z);break;default:A=ae+z+A+I;break}return s(A)}return b.toString=function(){return d+""},b}function u(d,h){var p=c((d=za(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(Dn(h)/3)))*3,f=Math.pow(10,-m),g=pd[8+m/3];return function(S){return p(f*S)+g}}return{format:c,formatPrefix:u}}var Os,Cc,Cf;wx({thousands:",",grouping:[3],currency:["$",""]});function wx(e){return Os=Ox(e),Cc=Os.format,Cf=Os.formatPrefix,Os}function Cx(e){return Math.max(0,-Dn(Math.abs(e)))}function Px(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Dn(t)/3)))*3-Dn(Math.abs(e)))}function Rx(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Dn(t)-Dn(e))+1}function Tx(e,t,r,n){var a=Sl(e,t,r),s;switch(n=za(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(s=Px(a,o))&&(n.precision=s),Cf(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(s=Rx(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=s-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(s=Cx(a))&&(n.precision=s-(n.type==="%")*2);break}}return Cc(n)}function Pc(e){var t=e.domain;return e.ticks=function(r){var n=t();return bl(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return Tx(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,s=n.length-1,o=n[a],i=n[s],l,c,u=10;for(i<o&&(c=o,o=i,i=c,c=a,a=s,s=c);u-- >0;){if(c=vl(o,i,r),c===l)return n[a]=o,n[s]=i,t(n);if(c>0)o=Math.floor(o/c)*c,i=Math.ceil(i/c)*c;else if(c<0)o=Math.ceil(o*c)/c,i=Math.floor(i*c)/c;else break;l=c}return e},e}function Pf(){var e=Of();return e.copy=function(){return Go(e,Pf())},Vr.apply(e,arguments),Pc(e)}function Rf(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],s=e[n],o;return s<a&&(o=r,r=n,n=o,o=a,a=s,s=o),e[r]=t.floor(a),e[n]=t.ceil(s),e}function fd(e){return Math.log(e)}function md(e){return Math.exp(e)}function Ax(e){return-Math.log(-e)}function Vx(e){return-Math.exp(-e)}function Ex(e){return isFinite(e)?+("1e"+e):e<0?0:e}function _x(e){return e===10?Ex:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Ix(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 gd(e){return(t,r)=>-e(-t,r)}function Mx(e){const t=e(fd,md),r=t.domain;let n=10,a,s;function o(){return a=Ix(n),s=_x(n),r()[0]<0?(a=gd(a),s=gd(s),e(Ax,Vx)):e(fd,md),t}return t.base=function(i){return arguments.length?(n=+i,o()):n},t.domain=function(i){return arguments.length?(r(i),o()):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=a(c),p=a(u),m,f;const g=i==null?10:+i;let S=[];if(!(n%1)&&p-h<g){if(h=Math.floor(h),p=Math.ceil(p),c>0){for(;h<=p;++h)for(m=1;m<n;++m)if(f=h<0?m/s(-h):m*s(h),!(f<c)){if(f>u)break;S.push(f)}}else for(;h<=p;++h)for(m=n-1;m>=1;--m)if(f=h>0?m/s(-h):m*s(h),!(f<c)){if(f>u)break;S.push(f)}S.length*2<g&&(S=bl(c,u,g))}else S=bl(h,p,Math.min(p-h,g)).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=za(l)).precision==null&&(l.trim=!0),l=Cc(l)),i===1/0)return l;const c=Math.max(1,n*i/t.ticks().length);return u=>{let d=u/s(Math.round(a(u)));return d*n<n-.5&&(d*=n),d<=c?l(u):""}},t.nice=()=>r(Rf(r(),{floor:i=>s(Math.floor(a(i))),ceil:i=>s(Math.ceil(a(i)))})),t}function Tf(){const e=Mx(Oc()).domain([1,10]);return e.copy=()=>Go(e,Tf()).base(e.base()),Vr.apply(e,arguments),e}function yd(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function $x(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function jx(e){return e<0?-e*e:e*e}function kx(e){var t=e(At,At),r=1;function n(){return r===1?e(At,At):r===.5?e($x,jx):e(yd(r),yd(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},Pc(t)}function Rc(){var e=kx(Oc());return e.copy=function(){return Go(e,Rc()).exponent(e.exponent())},Vr.apply(e,arguments),e}function Lx(){return Rc.apply(null,arguments).exponent(.5)}function Af(){var e=[.5],t=[0,1],r,n=1;function a(s){return s!=null&&s<=s?t[gf(e,s,0,n)]:r}return a.domain=function(s){return arguments.length?(e=Array.from(s),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(s){return arguments.length?(t=Array.from(s),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(s){var o=t.indexOf(s);return[e[o-1],e[o]]},a.unknown=function(s){return arguments.length?(r=s,a):r},a.copy=function(){return Af().domain(e).range(t).unknown(r)},Vr.apply(a,arguments)}const Li=new Date,Ui=new Date;function et(e,t,r,n){function a(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return a.floor=s=>(e(s=new Date(+s)),s),a.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),a.round=s=>{const o=a(s),i=a.ceil(s);return s-o<i-s?o:i},a.offset=(s,o)=>(t(s=new Date(+s),o==null?1:Math.floor(o)),s),a.range=(s,o,i)=>{const l=[];if(s=a.ceil(s),i=i==null?1:Math.floor(i),!(s<o)||!(i>0))return l;let c;do l.push(c=new Date(+s)),t(s,i),e(s);while(c<s&&s<o);return l},a.filter=s=>et(o=>{if(o>=o)for(;e(o),!s(o);)o.setTime(o-1)},(o,i)=>{if(o>=o)if(i<0)for(;++i<=0;)for(;t(o,-1),!s(o););else for(;--i>=0;)for(;t(o,1),!s(o););}),r&&(a.count=(s,o)=>(Li.setTime(+s),Ui.setTime(+o),e(Li),e(Ui),Math.floor(r(Li,Ui))),a.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?a.filter(n?o=>n(o)%s===0:o=>a.count(0,o)%s===0):a)),a}const oo=et(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);oo.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?et(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):oo);oo.range;const nr=1e3,Vt=nr*60,ar=Vt*60,lr=ar*24,Tc=lr*7,bd=lr*30,Di=lr*365,Ur=et(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCSeconds());Ur.range;const Ac=et(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr)},(e,t)=>{e.setTime(+e+t*Vt)},(e,t)=>(t-e)/Vt,e=>e.getMinutes());Ac.range;const Vc=et(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Vt)},(e,t)=>(t-e)/Vt,e=>e.getUTCMinutes());Vc.range;const Ec=et(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr-e.getMinutes()*Vt)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getHours());Ec.range;const _c=et(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCHours());_c.range;const os=et(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Vt)/lr,e=>e.getDate()-1);os.range;const Ho=et(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lr,e=>e.getUTCDate()-1);Ho.range;const Vf=et(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lr,e=>Math.floor(e/lr));Vf.range;function Kr(e){return et(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())*Vt)/Tc)}const qo=Kr(0),io=Kr(1),Ux=Kr(2),Dx=Kr(3),Nn=Kr(4),Nx=Kr(5),Fx=Kr(6);qo.range;io.range;Ux.range;Dx.range;Nn.range;Nx.range;Fx.range;function Yr(e){return et(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)/Tc)}const Jo=Yr(0),lo=Yr(1),Bx=Yr(2),zx=Yr(3),Fn=Yr(4),Gx=Yr(5),Hx=Yr(6);Jo.range;lo.range;Bx.range;zx.range;Fn.range;Gx.range;Hx.range;const Ic=et(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());Ic.range;const Mc=et(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());Mc.range;const cr=et(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());cr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:et(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)});cr.range;const ur=et(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());ur.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:et(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)});ur.range;function Ef(e,t,r,n,a,s){const o=[[Ur,1,nr],[Ur,5,5*nr],[Ur,15,15*nr],[Ur,30,30*nr],[s,1,Vt],[s,5,5*Vt],[s,15,15*Vt],[s,30,30*Vt],[a,1,ar],[a,3,3*ar],[a,6,6*ar],[a,12,12*ar],[n,1,lr],[n,2,2*lr],[r,1,Tc],[t,1,bd],[t,3,3*bd],[e,1,Di]];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),m=p?p.range(c,+u+1):[];return h?m.reverse():m}function l(c,u,d){const h=Math.abs(u-c)/d,p=yc(([,,g])=>g).right(o,h);if(p===o.length)return e.every(Sl(c/Di,u/Di,d));if(p===0)return oo.every(Math.max(Sl(c,u,d),1));const[m,f]=o[h/o[p-1][2]<o[p][2]/h?p-1:p];return m.every(f)}return[i,l]}const[qx,Jx]=Ef(ur,Mc,Jo,Vf,_c,Vc),[Wx,Kx]=Ef(cr,Ic,qo,os,Ec,Ac);function Ni(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 Fi(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 ha(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Yx(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,s=e.days,o=e.shortDays,i=e.months,l=e.shortMonths,c=pa(a),u=fa(a),d=pa(s),h=fa(s),p=pa(o),m=fa(o),f=pa(i),g=fa(i),S=pa(l),R=fa(l),O={a:oe,A:Z,b:ae,B:ge,c:null,d:Cd,e:Cd,f:v1,g:V1,G:_1,H:g1,I:y1,j:b1,L:_f,m:S1,M:x1,p:ue,q:De,Q:Td,s:Ad,S:O1,u:w1,U:C1,V:P1,w:R1,W:T1,x:null,X:null,y:A1,Y:E1,Z:I1,"%":Rd},C={a:ct,A:It,b:tt,B:xt,c:null,d:Pd,e:Pd,f:k1,g:q1,G:W1,H:M1,I:$1,j:j1,L:Mf,m:L1,M:U1,p:pt,q:rt,Q:Td,s:Ad,S:D1,u:N1,U:F1,V:B1,w:z1,W:G1,x:null,X:null,y:H1,Y:J1,Z:K1,"%":Rd},E={a:b,A,b:z,B:I,c:G,d:Od,e:Od,f:h1,g:xd,G:Sd,H:wd,I:wd,j:l1,L:d1,m:i1,M:c1,p:B,q:o1,Q:f1,s:m1,S:u1,u:t1,U:r1,V:n1,w:e1,W:a1,x:re,X:te,y:xd,Y:Sd,Z:s1,"%":p1};O.x=T(r,O),O.X=T(n,O),O.c=T(t,O),C.x=T(r,C),C.X=T(n,C),C.c=T(t,C);function T(X,ie){return function(he){var J=[],Oe=-1,be=0,Ne=X.length,ke,_e,Mt;for(he instanceof Date||(he=new Date(+he));++Oe<Ne;)X.charCodeAt(Oe)===37&&(J.push(X.slice(be,Oe)),(_e=vd[ke=X.charAt(++Oe)])!=null?ke=X.charAt(++Oe):_e=ke==="e"?" ":"0",(Mt=ie[ke])&&(ke=Mt(he,_e)),J.push(ke),be=Oe+1);return J.push(X.slice(be,Oe)),J.join("")}}function P(X,ie){return function(he){var J=ha(1900,void 0,1),Oe=_(J,X,he+="",0),be,Ne;if(Oe!=he.length)return null;if("Q"in J)return new Date(J.Q);if("s"in J)return new Date(J.s*1e3+("L"in J?J.L:0));if(ie&&!("Z"in J)&&(J.Z=0),"p"in J&&(J.H=J.H%12+J.p*12),J.m===void 0&&(J.m="q"in J?J.q:0),"V"in J){if(J.V<1||J.V>53)return null;"w"in J||(J.w=1),"Z"in J?(be=Fi(ha(J.y,0,1)),Ne=be.getUTCDay(),be=Ne>4||Ne===0?lo.ceil(be):lo(be),be=Ho.offset(be,(J.V-1)*7),J.y=be.getUTCFullYear(),J.m=be.getUTCMonth(),J.d=be.getUTCDate()+(J.w+6)%7):(be=Ni(ha(J.y,0,1)),Ne=be.getDay(),be=Ne>4||Ne===0?io.ceil(be):io(be),be=os.offset(be,(J.V-1)*7),J.y=be.getFullYear(),J.m=be.getMonth(),J.d=be.getDate()+(J.w+6)%7)}else("W"in J||"U"in J)&&("w"in J||(J.w="u"in J?J.u%7:"W"in J?1:0),Ne="Z"in J?Fi(ha(J.y,0,1)).getUTCDay():Ni(ha(J.y,0,1)).getDay(),J.m=0,J.d="W"in J?(J.w+6)%7+J.W*7-(Ne+5)%7:J.w+J.U*7-(Ne+6)%7);return"Z"in J?(J.H+=J.Z/100|0,J.M+=J.Z%100,Fi(J)):Ni(J)}}function _(X,ie,he,J){for(var Oe=0,be=ie.length,Ne=he.length,ke,_e;Oe<be;){if(J>=Ne)return-1;if(ke=ie.charCodeAt(Oe++),ke===37){if(ke=ie.charAt(Oe++),_e=E[ke in vd?ie.charAt(Oe++):ke],!_e||(J=_e(X,he,J))<0)return-1}else if(ke!=he.charCodeAt(J++))return-1}return J}function B(X,ie,he){var J=c.exec(ie.slice(he));return J?(X.p=u.get(J[0].toLowerCase()),he+J[0].length):-1}function b(X,ie,he){var J=p.exec(ie.slice(he));return J?(X.w=m.get(J[0].toLowerCase()),he+J[0].length):-1}function A(X,ie,he){var J=d.exec(ie.slice(he));return J?(X.w=h.get(J[0].toLowerCase()),he+J[0].length):-1}function z(X,ie,he){var J=S.exec(ie.slice(he));return J?(X.m=R.get(J[0].toLowerCase()),he+J[0].length):-1}function I(X,ie,he){var J=f.exec(ie.slice(he));return J?(X.m=g.get(J[0].toLowerCase()),he+J[0].length):-1}function G(X,ie,he){return _(X,t,ie,he)}function re(X,ie,he){return _(X,r,ie,he)}function te(X,ie,he){return _(X,n,ie,he)}function oe(X){return o[X.getDay()]}function Z(X){return s[X.getDay()]}function ae(X){return l[X.getMonth()]}function ge(X){return i[X.getMonth()]}function ue(X){return a[+(X.getHours()>=12)]}function De(X){return 1+~~(X.getMonth()/3)}function ct(X){return o[X.getUTCDay()]}function It(X){return s[X.getUTCDay()]}function tt(X){return l[X.getUTCMonth()]}function xt(X){return i[X.getUTCMonth()]}function pt(X){return a[+(X.getUTCHours()>=12)]}function rt(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var ie=T(X+="",O);return ie.toString=function(){return X},ie},parse:function(X){var ie=P(X+="",!1);return ie.toString=function(){return X},ie},utcFormat:function(X){var ie=T(X+="",C);return ie.toString=function(){return X},ie},utcParse:function(X){var ie=P(X+="",!0);return ie.toString=function(){return X},ie}}}var vd={"-":"",_:" ",0:"0"},nt=/^\s*\d+/,Qx=/^%/,Xx=/[\\^$*+?|[\]().{}]/g;function we(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",s=a.length;return n+(s<r?new Array(r-s+1).join(t)+a:a)}function Zx(e){return e.replace(Xx,"\\$&")}function pa(e){return new RegExp("^(?:"+e.map(Zx).join("|")+")","i")}function fa(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function e1(e,t,r){var n=nt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function t1(e,t,r){var n=nt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function r1(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function n1(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function a1(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Sd(e,t,r){var n=nt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function xd(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function s1(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 o1(e,t,r){var n=nt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function i1(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Od(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function l1(e,t,r){var n=nt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function wd(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function c1(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function u1(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function d1(e,t,r){var n=nt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function h1(e,t,r){var n=nt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function p1(e,t,r){var n=Qx.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function f1(e,t,r){var n=nt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function m1(e,t,r){var n=nt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Cd(e,t){return we(e.getDate(),t,2)}function g1(e,t){return we(e.getHours(),t,2)}function y1(e,t){return we(e.getHours()%12||12,t,2)}function b1(e,t){return we(1+os.count(cr(e),e),t,3)}function _f(e,t){return we(e.getMilliseconds(),t,3)}function v1(e,t){return _f(e,t)+"000"}function S1(e,t){return we(e.getMonth()+1,t,2)}function x1(e,t){return we(e.getMinutes(),t,2)}function O1(e,t){return we(e.getSeconds(),t,2)}function w1(e){var t=e.getDay();return t===0?7:t}function C1(e,t){return we(qo.count(cr(e)-1,e),t,2)}function If(e){var t=e.getDay();return t>=4||t===0?Nn(e):Nn.ceil(e)}function P1(e,t){return e=If(e),we(Nn.count(cr(e),e)+(cr(e).getDay()===4),t,2)}function R1(e){return e.getDay()}function T1(e,t){return we(io.count(cr(e)-1,e),t,2)}function A1(e,t){return we(e.getFullYear()%100,t,2)}function V1(e,t){return e=If(e),we(e.getFullYear()%100,t,2)}function E1(e,t){return we(e.getFullYear()%1e4,t,4)}function _1(e,t){var r=e.getDay();return e=r>=4||r===0?Nn(e):Nn.ceil(e),we(e.getFullYear()%1e4,t,4)}function I1(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+we(t/60|0,"0",2)+we(t%60,"0",2)}function Pd(e,t){return we(e.getUTCDate(),t,2)}function M1(e,t){return we(e.getUTCHours(),t,2)}function $1(e,t){return we(e.getUTCHours()%12||12,t,2)}function j1(e,t){return we(1+Ho.count(ur(e),e),t,3)}function Mf(e,t){return we(e.getUTCMilliseconds(),t,3)}function k1(e,t){return Mf(e,t)+"000"}function L1(e,t){return we(e.getUTCMonth()+1,t,2)}function U1(e,t){return we(e.getUTCMinutes(),t,2)}function D1(e,t){return we(e.getUTCSeconds(),t,2)}function N1(e){var t=e.getUTCDay();return t===0?7:t}function F1(e,t){return we(Jo.count(ur(e)-1,e),t,2)}function $f(e){var t=e.getUTCDay();return t>=4||t===0?Fn(e):Fn.ceil(e)}function B1(e,t){return e=$f(e),we(Fn.count(ur(e),e)+(ur(e).getUTCDay()===4),t,2)}function z1(e){return e.getUTCDay()}function G1(e,t){return we(lo.count(ur(e)-1,e),t,2)}function H1(e,t){return we(e.getUTCFullYear()%100,t,2)}function q1(e,t){return e=$f(e),we(e.getUTCFullYear()%100,t,2)}function J1(e,t){return we(e.getUTCFullYear()%1e4,t,4)}function W1(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Fn(e):Fn.ceil(e),we(e.getUTCFullYear()%1e4,t,4)}function K1(){return"+0000"}function Rd(){return"%"}function Td(e){return+e}function Ad(e){return Math.floor(+e/1e3)}var bn,jf,kf;Y1({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 Y1(e){return bn=Yx(e),jf=bn.format,bn.parse,kf=bn.utcFormat,bn.utcParse,bn}function Q1(e){return new Date(e)}function X1(e){return e instanceof Date?+e:+new Date(+e)}function $c(e,t,r,n,a,s,o,i,l,c){var u=Of(),d=u.invert,h=u.domain,p=c(".%L"),m=c(":%S"),f=c("%I:%M"),g=c("%I %p"),S=c("%a %d"),R=c("%b %d"),O=c("%B"),C=c("%Y");function E(T){return(l(T)<T?p:i(T)<T?m:o(T)<T?f:s(T)<T?g:n(T)<T?a(T)<T?S:R:r(T)<T?O:C)(T)}return u.invert=function(T){return new Date(d(T))},u.domain=function(T){return arguments.length?h(Array.from(T,X1)):h().map(Q1)},u.ticks=function(T){var P=h();return e(P[0],P[P.length-1],T??10)},u.tickFormat=function(T,P){return P==null?E:c(P)},u.nice=function(T){var P=h();return(!T||typeof T.range!="function")&&(T=t(P[0],P[P.length-1],T??10)),T?h(Rf(P,T)):u},u.copy=function(){return Go(u,$c(e,t,r,n,a,s,o,i,l,c))},u}function Lf(){return Vr.apply($c(Wx,Kx,cr,Ic,qo,os,Ec,Ac,Ur,jf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Z1(){return Vr.apply($c(qx,Jx,ur,Mc,Jo,Ho,_c,Vc,Ur,kf).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function eO(){var e=0,t=1,r,n,a,s,o=At,i=!1,l;function c(d){return d==null||isNaN(d=+d)?l:o(a===0?.5:(d=(s(d)-r)*a,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),a=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?(o=d,c):o};function u(d){return function(h){var p,m;return arguments.length?([p,m]=h,o=d(p,m),c):[o(0),o(1)]}}return c.range=u(zo),c.rangeRound=u(xf),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return s=d,r=d(e),n=d(t),a=r===n?0:1/(n-r),c}}function tO(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Uf(){var e=Pc(eO()(At));return e.copy=function(){return tO(e,Uf())},FS.apply(e,arguments)}function rO(e,t){return function(n,a){return a.location==="tick"?a.scale.tickFormat(e)(n):a.location==="zoom-slider-tooltip"?t.tickFormat(2)(n):`${n}`}}function nO(e){return e.scaleType==="band"}function aO(e){return e.scaleType==="point"}function sO(e){return e.type==="piecewise"?Af(e.thresholds,e.colors):Uf([e.min??0,e.max??100],e.color)}function co(e){return e.values?ro(e.values,e.colors).unknown(e.unknownColor??null):ro(e.colors.map((t,r)=>r),e.colors).unknown(e.unknownColor??null)}function Gs(e){return e.type==="ordinal"?co(e):sO(e)}function oO(e){const{tickMaxStep:t,tickMinStep:r,tickNumber:n,range:a,domain:s}=e,o=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(a[1]-a[0])/50);return Math.min(o,Math.max(i,l))}function iO(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function Cl(e,t,r){switch(e){case"log":return Tf(t,r);case"pow":return Rc(t,r);case"sqrt":return Lx(t,r);case"time":return Lf(t,r);case"utc":return Z1(t,r);default:return Pf(t,r)}}const Vd=e=>(e==null?void 0:e[0])instanceof Date;function Ed(e,t){const r=Lf(e.data,t);return(n,{location:a})=>a==="tick"?r.tickFormat(e.tickNumber)(n):`${n.toLocaleString()}`}const Bi=(e,t)=>{const r=e[1]-e[0],n=t[1]-t[0],a=e[0]-t[0]*r/n,s=e[1]+(100-t[1])*r/n;return[a,s]};let _d,Id;class lO{constructor(){if(this.types=new Set,_d)throw new Error("You can only create one instance!");_d=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class cO{constructor(){if(this.types=new Set,Id)throw new Error("You can only create one instance!");Id=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const Wo=new lO;Wo.addType("bar");Wo.addType("line");Wo.addType("scatter");const uO=new cO;uO.addType("radar");function Df(e){return Wo.getTypes().has(e)}const dO=(e,t,r,n,a,s,o,i)=>{var m;const l=n==="x"?a[t].xExtremumGetter:a[t].yExtremumGetter,c=((m=o[t])==null?void 0:m.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)]},Nf=(e,t,r,n,a,s)=>{const i=Object.keys(r).filter(Df).reduce((l,c)=>dO(l,c,e,t,r,n,a,s),[1/0,-1/0]);return Number.isNaN(i[0])||Number.isNaN(i[1])?[1/0,-1/0]:i},hO=(e,t,r,n)=>{const a=new Set;return Object.keys(t).filter(Df).forEach(o=>{var c,u,d;const i=((c=r[o])==null?void 0:c.series)??{},l=(d=(u=t[o]).axisTooltipGetter)==null?void 0:d.call(u,i);l!==void 0&&l.forEach(({axisId:h,direction:p})=>{p===e&&a.add(h??n)})}),a},pO=(e,t,r,n)=>{var a;if(e.domainLimit!==void 0)return e.domainLimit;if(t==="x")for(const s of((a=n.line)==null?void 0:a.seriesOrder)??[]){const o=n.line.series[s];if(o.xAxisId===e.id||o.xAxisId===void 0&&r===0)return"strict"}return"nice"};function fO(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 mO=.2,gO=.1;function Ff({drawingArea:e,formattedSeries:t,axis:r,seriesConfig:n,axisDirection:a,zoomMap:s,zoomOptions:o,getFilters:i,preferStrictDomainInLineCharts:l}){if(r===void 0)return{axis:{},axisIds:[]};const c=hO(a,n,t,r[0].id),u={};return r.forEach((d,h)=>{const p=d,m=o==null?void 0:o[p.id],f=s==null?void 0:s.get(p.id),g=f?[f.start,f.end]:[0,100],S=fO(e,a,p),[R,O]=Nf(p,a,n,h,t,f===void 0&&!m?i:void 0),C=!p.ignoreTooltip&&c.has(p.id),E=p.data??[];if(nO(p)){const oe=p.categoryGapRatio??mO,Z=p.barGapRatio??gO,ae=a==="y"?[S[1],S[0]]:S,ge=Bi(ae,g);if(u[p.id]=K({offset:0,height:0,categoryGapRatio:oe,barGapRatio:Z,triggerTooltip:C},p,{data:E,scale:bc(p.data,ge).paddingInner(oe).paddingOuter(oe/2),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?co(K({values:p.data},p.colorMap)):Gs(p.colorMap))}),Vd(p.data)){const ue=Ed(p,ae);u[p.id].valueFormatter=p.valueFormatter??ue}}if(aO(p)){const oe=a==="y"?[...S].reverse():S,Z=Bi(oe,g);if(u[p.id]=K({offset:0,height:0,triggerTooltip:C},p,{data:E,scale:BS(p.data,Z),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?co(K({values:p.data},p.colorMap)):Gs(p.colorMap))}),Vd(p.data)){const ae=Ed(p,oe);u[p.id].valueFormatter=p.valueFormatter??ae}}if(p.scaleType==="band"||p.scaleType==="point")return;const T=p.scaleType??"linear",P=l?pO(p,a,h,t):p.domainLimit??"nice",_=[p.min??R,p.max??O];if(typeof P=="function"){const{min:oe,max:Z}=P(R,O);_[0]=oe,_[1]=Z}const B=oO(K({},p,{range:S,domain:_})),b=iO(B,g),A=Bi(S,g),z=Cl(T,_,A),I=P==="nice"?z.nice(B):z,[G,re]=I.domain(),te=[p.min??G,p.max??re];u[p.id]=K({offset:0,height:0,triggerTooltip:C},p,{data:E,scaleType:T,scale:I.domain(te),tickNumber:b,colorScale:p.colorMap&&Gs(p.colorMap),valueFormatter:p.valueFormatter??rO(b,Cl(T,S.map(oe=>z.invert(oe)),S))})}),{axis:u,axisIds:r.map(({id:d})=>d)}}function yO(e){return e!=null}function Bf({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:a}){return(s,o)=>{var g;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,(((g=s.data)==null?void 0:g.length)??1)-1]:c=Nf(s,a,r,o,n);let d,h;[d,h]=Cl(!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 m=d+l.start*(h-d)/100,f=d+l.end*(h-d)/100;return(S,R)=>{var C;const O=S[a]??((C=s.data)==null?void 0:C[R]);return O==null?!0:s.scaleType==="point"||s.scaleType==="band"||typeof O=="string"?R>=m&&R<=f:O>=m&&O<=f}}}const bO=e=>({currentAxisId:t,seriesXAxisId:r,seriesYAxisId:n,isDefaultAxis:a})=>(s,o)=>{var c,u;return!(t===r?n:r)||a?((u=(c=Object.values(e??{}))[0])==null?void 0:u.call(c,s,o))??!0:[n,r].filter(d=>d!==t).map(d=>e[d??""]).filter(yO).every(d=>d(s,o))},Md=e=>(t=[])=>t.reduce((r,n)=>{const{zoom:a,id:s}=n,o=gc(a,s,e);return o&&(r[s]=o),r},{}),vO=e=>{const t=new Map;return e.forEach(r=>{t.set(r.axisId,r)}),t},zf=e=>e.zoom;ye([zf],e=>e==null?void 0:e.isInteracting);const Ko=ye([zf],e=>(e==null?void 0:e.zoomData)&&vO(e==null?void 0:e.zoomData)),is=ye([Jn,Wn],(e,t)=>K({},Md("x")(e),Md("y")(t)));ye([is,(e,t)=>t],(e,t)=>e[t]);const SO=ye([Ko,is,Bo,ns],(e,t,r,n)=>e&&t&&Bf({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"x"})),xO=ye([Ko,is,Bo,ns],(e,t,r,n)=>e&&t&&Bf({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"y"})),Gf=ye([SO,xO,Jn,Wn],(e,t,r,n)=>{if(e===void 0||t===void 0)return;const a=r==null?void 0:r.reduce((o,i,l)=>{const c=e(i,l);return c!==null&&(o[i.id]=c),o},{}),s=n==null?void 0:n.reduce((o,i,l)=>{const c=t(i,l);return c!==null&&(o[i.id]=c),o},{});if(!(Object.keys(a??{}).length===0&&Object.keys(s??{}).length===0))return bO(K({},a,s))}),Qr=ye([Jn,rs,ns,Bo,Ko,is,Gf,sf],(e,t,r,n,a,s,o,i)=>Ff({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"x",zoomMap:a,zoomOptions:s,getFilters:o,preferStrictDomainInLineCharts:i})),Xr=ye([Wn,rs,ns,Bo,Ko,is,Gf,sf],(e,t,r,n,a,s,o,i)=>Ff({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"y",zoomMap:a,zoomOptions:s,getFilters:o,preferStrictDomainInLineCharts:i}));ye([Qr,Xr,(e,t)=>t],(e,t,r)=>(e==null?void 0:e.axis[r])??(t==null?void 0:t.axis[r]));ye([Jn,Wn,(e,t)=>t],(e,t,r)=>{const n=(e==null?void 0:e.find(a=>a.id===r))??(t==null?void 0:t.find(a=>a.id===r))??null;if(n)return n});function Hf(e){return e.bandwidth!==void 0}function vn(e){return e instanceof Date?e.getTime():e}function Bn(e,t){const{scale:r,data:n,reverse:a}=e;if(!Hf(r)){const o=r.invert(t);if(n===void 0)return-1;const i=vn(o);return n==null?void 0:n.findIndex((c,u)=>{const d=vn(c);return d>i&&(u===0||Math.abs(i-d)<=Math.abs(i-vn(n[u-1])))||d<=i&&(u===n.length-1||Math.abs(vn(o)-d)<Math.abs(vn(o)-vn(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:a?n.length-1-s:s}function $d(e,t,r){const{scale:n,data:a}=e;if(!Hf(n)){const s=n.invert(t);return r<0?s:a[r]}return r<0||r>=a.length?null:a[r]}function jd(e,t){const r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r.matrixTransform(e.getScreenCTM().inverse())}function En(e){const t=F.useRef(e);return or(()=>{t.current=e}),F.useRef((...r)=>(0,t.current)(...r)).current}const OO=Object.is;function qf(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let r=0,n=0;for(const a in e)if(r+=1,!OO(e[a],t[a])||!(a in t))return!1;for(const a in t)n+=1;return r===n}const jc=({store:e})=>{const t=En(function(){e.update(o=>K({},o,{interaction:{pointer:null,item:null}}))}),r=En(function(o){e.update(i=>{const l=i.interaction.item;return o?l===null||Object.keys(o).some(c=>o[c]!==l[c])?i:K({},i,{interaction:K({},i.interaction,{item:null})}):l===null?i:K({},i,{interaction:K({},i.interaction,{item:null})})})}),n=En(function(o){e.update(i=>qf(i.interaction.item,o)?i:K({},i,{interaction:K({},i.interaction,{item:o})}))}),a=En(function(o){e.update(i=>K({},i,{interaction:K({},i.interaction,{pointer:o})}))});return{instance:{cleanInteraction:t,setItemInteraction:n,removeItemInteraction:r,setPointerCoordinate:a}}};jc.getInitialState=()=>({interaction:{item:null,pointer:null}});jc.params={};const kc=e=>e.interaction,wO=ye([kc],e=>e!==void 0),CO=ye([kc],e=>(e==null?void 0:e.item)??null),Jf=ye([kc],e=>(e==null?void 0:e.pointer)??null),Yo=ye([Jf],e=>e&&e.x),Qo=ye([Jf],e=>e&&e.y);ye([CO],e=>e!==null);function Ia(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 a=e.length;if(a!==t.length)return!1;for(let s=0;s<a;s+=1)if(!Ia(e[s],t[s]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const a=Array.from(e.entries());for(let s=0;s<a.length;s+=1)if(!t.has(a[s][0]))return!1;for(let s=0;s<a.length;s+=1){const o=a[s];if(!Ia(o[1],t.get(o[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const a=Array.from(e.entries());for(let s=0;s<a.length;s+=1)if(!t.has(a[s][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const a=e.length;if(a!==t.length)return!1;for(let s=0;s<a;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 a=0;a<n;a+=1)if(!Object.prototype.hasOwnProperty.call(t,r[a]))return!1;for(let a=0;a<n;a+=1){const s=r[a];if(!Ia(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}const Xo=(e,t)=>t;function Pl(e,t,r=t.axisIds[0]){return Array.isArray(r)?r.map(n=>Bn(t.axis[n],e)):Bn(t.axis[r],e)}const Wf=(e,t,r)=>{if(e===null)return null;const n=Pl(e,t,r);return n===-1?null:n},PO=ye([Yo,Qr,Xo],Wf),RO=ye([Qo,Xr,Xo],Wf),TO=ye([Yo,Qo,Qr,Xr],(e,t,r,n)=>[...e===null?[]:r.axisIds.map(a=>({axisId:a,dataIndex:Pl(e,r,a)})),...t===null?[]:n.axisIds.map(a=>({axisId:a,dataIndex:Pl(t,n,a)}))].filter(a=>a.dataIndex!==null&&a.dataIndex>=0));function Kf(e,t,r,n=t.axisIds[0]){return Array.isArray(n)?n.map((a,s)=>$d(t.axis[a],e,r[s])):$d(t.axis[n],e,r)}ye([Yo,Qr,PO,Xo],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:Kf(e,t,r,n));ye([Qo,Xr,RO,Xo],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:Kf(e,t,r,n));const AO=ye([Yo,Qr],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:Bn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:Ia}}),VO=ye([Qo,Xr],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:Bn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:Ia}});ye([AO,VO],(e,t)=>e.length>0||t.length>0);const kd={};function EO(e,t){const r=F.useRef(kd);return r.current===kd&&(r.current=e(t)),r}const _O=()=>{};function IO(e,t,r,n){const a=EO(MO,{store:e,selector:t,skip:n}).current;a.effect=r,F.useEffect(a.onMount(n),[n])}function MO(e){const{store:t,selector:r,skip:n}=e;let a=!1,s;const o=()=>{i.dispose??(i.dispose=t.subscribe(l=>{const c=r(l);i.effect(s,c),s=c}))},i={effect:_O,dispose:null,onMount:l=>()=>{if(!l)return a||(a=!0,s=r(t.value)),o(),()=>{var c;(c=i.dispose)==null||c.call(i),i.dispose=null}}};return n||(a=!0,s=r(t.value),o()),i}const Zo=({params:e,store:t,seriesConfig:r,svgRef:n,instance:a})=>{const{xAxis:s,yAxis:o,dataset:i,onHighlightedAxisChange:l}=e;if(process.env.NODE_ENV!=="production"){const O=[...s??[],...o??[]].filter(E=>E.id).map(E=>E.id),C=new Set(O.filter((E,T)=>O.indexOf(E)!==T));C.size>0&&Da([`MUI X Charts: The following axis ids are duplicated: ${Array.from(C).join(", ")}.`,"Please make sure that each axis has a unique id."].join(`
|
|
127
|
-
`),"error")}const c=bt(t,rs),u=bt(t,ns),d=bt(t,wO),{axis:h,axisIds:p}=bt(t,Qr),{axis:m,axisIds:f}=bt(t,Xr);df({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedAxis",controlled:e.highlightedAxis,defaultValue:void 0}),or(()=>{e.highlightedAxis!==void 0&&t.update(O=>O.controlledCartesianAxisHighlight===e.highlightedAxis?O:K({},O,{controlledCartesianAxisHighlight:e.highlightedAxis}))},[t,e.highlightedAxis]);const g=F.useRef(!0);F.useEffect(()=>{if(g.current){g.current=!1;return}t.update(O=>K({},O,{cartesianAxis:K({},O.cartesianAxis,{x:ff(s,i),y:mf(o,i)})}))},[r,c,s,o,i,t]);const S=p[0],R=f[0];return IO(t,TO,(O,C)=>{if(!Object.is(O,C)){if(O.length!==C.length){l(C);return}O!=null&&O.some(({axisId:E,dataIndex:T},P)=>C[P].axisId!==E||C[P].dataIndex!==T)&&l(C)}},!l),F.useEffect(()=>{const O=n.current;if(!d||!O||e.disableAxisListener)return()=>{};const C=a.addInteractionListener("moveEnd",A=>{var z;A.detail.activeGestures.pan||(z=a.cleanInteraction)==null||z.call(a)}),E=a.addInteractionListener("panEnd",A=>{var z;A.detail.activeGestures.move||(z=a.cleanInteraction)==null||z.call(a)}),T=a.addInteractionListener("quickPressEnd",A=>{var z;!A.detail.activeGestures.move&&!A.detail.activeGestures.pan&&((z=a.cleanInteraction)==null||z.call(a))}),P=A=>{var re,te;const z=A.detail.srcEvent,I=A.detail.target,G=jd(O,z);if(A.detail.srcEvent.buttons>=1&&(I!=null&&I.hasPointerCapture(A.detail.srcEvent.pointerId))&&!(I!=null&&I.closest("[data-charts-zoom-slider]"))&&(I==null||I.releasePointerCapture(A.detail.srcEvent.pointerId)),!a.isPointInside(G.x,G.y,I)){(re=a.cleanInteraction)==null||re.call(a);return}(te=a.setPointerCoordinate)==null||te.call(a,G)},_=a.addInteractionListener("move",P),B=a.addInteractionListener("pan",P),b=a.addInteractionListener("quickPress",P);return()=>{_.cleanup(),C.cleanup(),B.cleanup(),E.cleanup(),b.cleanup(),T.cleanup()}},[n,t,h,S,m,R,a,e.disableAxisListener,d]),F.useEffect(()=>{const O=n.current,C=e.onAxisClick;if(O===null||!C)return()=>{};const E=a.addInteractionListener("tap",T=>{let P=null,_=!1;const B=jd(O,T.detail.srcEvent),b=Bn(h[S],B.x);_=b!==-1,P=_?b:Bn(m[R],B.y);const A=_?p[0]:f[0];if(P==null||P===-1)return;const z=(_?h:m)[A].data[P],I={};Object.keys(u).filter(G=>["bar","line"].includes(G)).forEach(G=>{var re;(re=u[G])==null||re.seriesOrder.forEach(te=>{const oe=u[G].series[te],Z=oe.xAxisId,ae=oe.yAxisId,ge=_?Z:ae;(ge===void 0||ge===A)&&(I[te]=oe.data[P])})}),C(T.detail.srcEvent,{dataIndex:P,axisValue:z,seriesValues:I})});return()=>{E.cleanup()}},[e.onAxisClick,u,n,h,p,m,f,S,R,a]),{}};Zo.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0};Zo.getDefaultizedParams=({params:e})=>K({},e,{colors:e.colors??of,theme:e.theme??"light",defaultizedXAxis:ff(e.xAxis,e.dataset),defaultizedYAxis:mf(e.yAxis,e.dataset)});Zo.getInitialState=e=>K({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});function Ld(e,t){return e.id!==void 0?e:K({id:t},e)}function Ud(e){return e.colorMap?K({},e,{colorScale:e.colorMap.type==="ordinal"&&e.data?co(K({values:e.data},e.colorMap)):Gs(e.colorMap.type==="continuous"?K({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function Yf(e,t){if(!e||e.length===0)return{axis:{},axisIds:[]};const r={},n=[];return e.forEach((a,s)=>{const o=a.dataKey,i=a.id??`defaultized-z-axis-${s}`;if(o===void 0||a.data!==void 0){r[i]=Ud(Ld(a,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]=Ud(Ld(K({},a,{data:t.map(l=>l[o])}),i)),n.push(i)}),{axis:r,axisIds:n}}const Lc=({params:e,store:t})=>{const{zAxis:r,dataset:n}=e,a=F.useRef(!0);return F.useEffect(()=>{if(a.current){a.current=!1;return}t.update(s=>K({},s,{zAxis:Yf(r,n)}))},[r,n,t]),{}};Lc.params={zAxis:!0,dataset:!0};Lc.getInitialState=e=>({zAxis:Yf(e.zAxis,e.dataset)});const $O=e=>e,jO=ye([$O],e=>e.zAxis),ei=({store:e,params:t})=>{df({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedItem",controlled:t.highlightedItem,defaultValue:null}),or(()=>{e.update(a=>a.highlight.item===t.highlightedItem?a:K({},a,{highlight:K({},a.highlight,{item:t.highlightedItem})}))},[e,t.highlightedItem]);const r=En(()=>{var a;(a=t.onHighlightChange)==null||a.call(t,null),e.update(s=>K({},s,{highlight:{item:null}}))}),n=En(a=>{var o;const s=e.getSnapshot().highlight.item;qf(s,a)||((o=t.onHighlightChange)==null||o.call(t,a),e.update(i=>K({},i,{highlight:{item:a}})))});return{instance:{clearHighlight:r,setHighlight:n}}};ei.getDefaultizedParams=({params:e})=>K({},e,{highlightedItem:e.highlightedItem??null});ei.getInitialState=e=>({highlight:{item:e.highlightedItem}});ei.params={highlightedItem:!0,onHighlightChange:!0};const Dd=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},Qf=e=>{var l;const{axis:t,getFilters:r,isDefaultAxis:n}=e,a=r==null?void 0:r({currentAxisId:t.id,isDefaultAxis:n}),s=a?(l=t.data)==null?void 0:l.filter((c,u)=>a({x:null,y:null},u)):t.data,o=Math.min(...s??[]),i=Math.max(...s??[]);return[o,i]},Xf=e=>t=>{const{series:r,axis:n,getFilters:a,isDefaultAxis:s}=t;return Object.keys(r).filter(o=>{const i=e==="x"?r[o].xAxisId:r[o].yAxisId;return i===n.id||s&&i===void 0}).reduce((o,i)=>{const{stackedData:l}=r[i],c=a==null?void 0:a({currentAxisId:n.id,isDefaultAxis:s,seriesXAxisId:r[i].xAxisId,seriesYAxisId:r[i].yAxisId}),[u,d]=(l==null?void 0:l.reduce((h,p,m)=>c&&(!c(Dd(p[0],e),m)||!c(Dd(p[1],e),m))?h:[Math.min(...p,h[0]),Math.max(...p,h[1])],[1/0,-1/0]))??[1/0,-1/0];return[Math.min(u,o[0]),Math.max(d,o[1])]},[1/0,-1/0])},kO=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?Xf("x")(e):Qf(e),LO=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?Qf(e):Xf("y")(e);function Ze(e){return function(){return e}}const Nd=Math.abs,ot=Math.atan2,Mr=Math.cos,UO=Math.max,zi=Math.min,Ht=Math.sin,_n=Math.sqrt,yt=1e-12,Ga=Math.PI,uo=Ga/2,Hs=2*Ga;function DO(e){return e>1?0:e<-1?Ga:Math.acos(e)}function Fd(e){return e>=1?uo:e<=-1?-uo:Math.asin(e)}const Rl=Math.PI,Tl=2*Rl,jr=1e-6,NO=Tl-jr;function Zf(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function FO(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Zf;const r=10**t;return function(n){this._+=n[0];for(let a=1,s=n.length;a<s;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class BO{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Zf:FO(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,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,s,o){this._append`C${+t},${+r},${+n},${+a},${this._x1=+s},${this._y1=+o}`}arcTo(t,r,n,a,s){if(t=+t,r=+r,n=+n,a=+a,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,i=this._y1,l=n-t,c=a-r,u=o-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>jr)if(!(Math.abs(d*l-c*u)>jr)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,m=a-i,f=l*l+c*c,g=p*p+m*m,S=Math.sqrt(f),R=Math.sqrt(h),O=s*Math.tan((Rl-Math.acos((f+h-g)/(2*S*R)))/2),C=O/R,E=O/S;Math.abs(C-1)>jr&&this._append`L${t+C*u},${r+C*d}`,this._append`A${s},${s},0,0,${+(d*p>u*m)},${this._x1=t+E*l},${this._y1=r+E*c}`}}arc(t,r,n,a,s,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let i=n*Math.cos(a),l=n*Math.sin(a),c=t+i,u=r+l,d=1^o,h=o?a-s:s-a;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>jr||Math.abs(this._y1-u)>jr)&&this._append`L${c},${u}`,n&&(h<0&&(h=h%Tl+Tl),h>NO?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>jr&&this._append`A${n},${n},0,${+(h>=Rl)},${d},${this._x1=t+n*Math.cos(s)},${this._y1=r+n*Math.sin(s)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function zO(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 BO(t)}function GO(e){return e.innerRadius}function HO(e){return e.outerRadius}function qO(e){return e.startAngle}function JO(e){return e.endAngle}function WO(e){return e&&e.padAngle}function KO(e,t,r,n,a,s,o,i){var l=r-e,c=n-t,u=o-a,d=i-s,h=d*l-u*c;if(!(h*h<yt))return h=(u*(t-s)-d*(e-a))/h,[e+h*l,t+h*c]}function ws(e,t,r,n,a,s,o){var i=e-r,l=t-n,c=(o?s:-s)/_n(i*i+l*l),u=c*l,d=-c*i,h=e+u,p=t+d,m=r+u,f=n+d,g=(h+m)/2,S=(p+f)/2,R=m-h,O=f-p,C=R*R+O*O,E=a-s,T=h*f-m*p,P=(O<0?-1:1)*_n(UO(0,E*E*C-T*T)),_=(T*O-R*P)/C,B=(-T*R-O*P)/C,b=(T*O+R*P)/C,A=(-T*R+O*P)/C,z=_-g,I=B-S,G=b-g,re=A-S;return z*z+I*I>G*G+re*re&&(_=b,B=A),{cx:_,cy:B,x01:-u,y01:-d,x11:_*(a/E-1),y11:B*(a/E-1)}}function em(){var e=GO,t=HO,r=Ze(0),n=null,a=qO,s=JO,o=WO,i=null,l=zO(c);function c(){var u,d,h=+e.apply(this,arguments),p=+t.apply(this,arguments),m=a.apply(this,arguments)-uo,f=s.apply(this,arguments)-uo,g=Nd(f-m),S=f>m;if(i||(i=u=l()),p<h&&(d=p,p=h,h=d),!(p>yt))i.moveTo(0,0);else if(g>Hs-yt)i.moveTo(p*Mr(m),p*Ht(m)),i.arc(0,0,p,m,f,!S),h>yt&&(i.moveTo(h*Mr(f),h*Ht(f)),i.arc(0,0,h,f,m,S));else{var R=m,O=f,C=m,E=f,T=g,P=g,_=o.apply(this,arguments)/2,B=_>yt&&(n?+n.apply(this,arguments):_n(h*h+p*p)),b=zi(Nd(p-h)/2,+r.apply(this,arguments)),A=b,z=b,I,G;if(B>yt){var re=Fd(B/h*Ht(_)),te=Fd(B/p*Ht(_));(T-=re*2)>yt?(re*=S?1:-1,C+=re,E-=re):(T=0,C=E=(m+f)/2),(P-=te*2)>yt?(te*=S?1:-1,R+=te,O-=te):(P=0,R=O=(m+f)/2)}var oe=p*Mr(R),Z=p*Ht(R),ae=h*Mr(E),ge=h*Ht(E);if(b>yt){var ue=p*Mr(O),De=p*Ht(O),ct=h*Mr(C),It=h*Ht(C),tt;if(g<Ga)if(tt=KO(oe,Z,ct,It,ue,De,ae,ge)){var xt=oe-tt[0],pt=Z-tt[1],rt=ue-tt[0],X=De-tt[1],ie=1/Ht(DO((xt*rt+pt*X)/(_n(xt*xt+pt*pt)*_n(rt*rt+X*X)))/2),he=_n(tt[0]*tt[0]+tt[1]*tt[1]);A=zi(b,(h-he)/(ie-1)),z=zi(b,(p-he)/(ie+1))}else A=z=0}P>yt?z>yt?(I=ws(ct,It,oe,Z,p,z,S),G=ws(ue,De,ae,ge,p,z,S),i.moveTo(I.cx+I.x01,I.cy+I.y01),z<b?i.arc(I.cx,I.cy,z,ot(I.y01,I.x01),ot(G.y01,G.x01),!S):(i.arc(I.cx,I.cy,z,ot(I.y01,I.x01),ot(I.y11,I.x11),!S),i.arc(0,0,p,ot(I.cy+I.y11,I.cx+I.x11),ot(G.cy+G.y11,G.cx+G.x11),!S),i.arc(G.cx,G.cy,z,ot(G.y11,G.x11),ot(G.y01,G.x01),!S))):(i.moveTo(oe,Z),i.arc(0,0,p,R,O,!S)):i.moveTo(oe,Z),!(h>yt)||!(T>yt)?i.lineTo(ae,ge):A>yt?(I=ws(ae,ge,ue,De,h,-A,S),G=ws(oe,Z,ct,It,h,-A,S),i.lineTo(I.cx+I.x01,I.cy+I.y01),A<b?i.arc(I.cx,I.cy,A,ot(I.y01,I.x01),ot(G.y01,G.x01),!S):(i.arc(I.cx,I.cy,A,ot(I.y01,I.x01),ot(I.y11,I.x11),!S),i.arc(0,0,h,ot(I.cy+I.y11,I.cx+I.x11),ot(G.cy+G.y11,G.cx+G.x11),S),i.arc(G.cx,G.cy,A,ot(G.y11,G.x11),ot(G.y01,G.x01),!S))):i.arc(0,0,h,E,C,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=(+a.apply(this,arguments)+ +s.apply(this,arguments))/2-Ga/2;return[Mr(d)*u,Ht(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Ze(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Ze(+u),c):t},c.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:Ze(+u),c):r},c.padRadius=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:Ze(+u),c):n},c.startAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Ze(+u),c):a},c.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Ze(+u),c):s},c.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Ze(+u),c):o},c.context=function(u){return arguments.length?(i=u??null,c):i},c}function tm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function YO(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function QO(e){return e}function XO(){var e=QO,t=YO,r=null,n=Ze(0),a=Ze(Hs),s=Ze(0);function o(i){var l,c=(i=tm(i)).length,u,d,h=0,p=new Array(c),m=new Array(c),f=+n.apply(this,arguments),g=Math.min(Hs,Math.max(-Hs,a.apply(this,arguments)-f)),S,R=Math.min(Math.abs(g)/c,s.apply(this,arguments)),O=R*(g<0?-1:1),C;for(l=0;l<c;++l)(C=m[p[l]=l]=+e(i[l],l,i))>0&&(h+=C);for(t!=null?p.sort(function(E,T){return t(m[E],m[T])}):r!=null&&p.sort(function(E,T){return r(i[E],i[T])}),l=0,d=h?(g-c*O)/h:0;l<c;++l,f=S)u=p[l],C=m[u],S=f+(C>0?C*d:0)+O,m[u]={data:i[u],index:l,value:C,startAngle:f,endAngle:S,padAngle:R};return m}return o.value=function(i){return arguments.length?(e=typeof i=="function"?i:Ze(+i),o):e},o.sortValues=function(i){return arguments.length?(t=i,r=null,o):t},o.sort=function(i){return arguments.length?(r=i,t=null,o):r},o.startAngle=function(i){return arguments.length?(n=typeof i=="function"?i:Ze(+i),o):n},o.endAngle=function(i){return arguments.length?(a=typeof i=="function"?i:Ze(+i),o):a},o.padAngle=function(i){return arguments.length?(s=typeof i=="function"?i:Ze(+i),o):s},o}function zn(e,t){if((o=e.length)>1)for(var r=1,n,a,s=e[t[0]],o,i=s.length;r<o;++r)for(a=s,s=e[t[r]],n=0;n<i;++n)s[n][1]+=s[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function Gn(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function ZO(e,t){return e[t]}function ew(e){const t=[];return t.key=e,t}function rm(){var e=Ze([]),t=Gn,r=zn,n=ZO;function a(s){var o=Array.from(e.apply(this,arguments),ew),i,l=o.length,c=-1,u;for(const d of s)for(i=0,++c;i<l;++i)(o[i][c]=[0,+n(d,o[i].key,c,s)]).data=d;for(i=0,u=tm(t(o));i<l;++i)o[u[i]].index=i;return r(o,u),o}return a.keys=function(s){return arguments.length?(e=typeof s=="function"?s:Ze(Array.from(s)),a):e},a.value=function(s){return arguments.length?(n=typeof s=="function"?s:Ze(+s),a):n},a.order=function(s){return arguments.length?(t=s==null?Gn:typeof s=="function"?s:Ze(Array.from(s)),a):t},a.offset=function(s){return arguments.length?(r=s??zn,a):r},a}function tw(e,t){if((n=e.length)>0){for(var r,n,a=0,s=e[0].length,o;a<s;++a){for(o=r=0;r<n;++r)o+=e[r][a][1]||0;if(o)for(r=0;r<n;++r)e[r][a][1]/=o}zn(e,t)}}function rw(e,t){if((l=e.length)>0)for(var r,n=0,a,s,o,i,l,c=e[t[0]].length;n<c;++n)for(o=i=0,r=0;r<l;++r)(s=(a=e[t[r]][n])[1]-a[0])>0?(a[0]=o,a[1]=o+=s):s<0?(a[1]=i,a[0]=i+=s):(a[0]=0,a[1]=s)}function nw(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,s=n.length;r<s;++r){for(var o=0,i=0;o<a;++o)i+=e[o][r][1]||0;n[r][1]+=n[r][0]=-i/2}zn(e,t)}}function aw(e,t){if(!(!((o=e.length)>0)||!((s=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,s,o;n<s;++n){for(var i=0,l=0,c=0;i<o;++i){for(var u=e[t[i]],d=u[n][1]||0,h=u[n-1][1]||0,p=(d-h)/2,m=0;m<i;++m){var f=e[t[m]],g=f[n][1]||0,S=f[n-1][1]||0;p+=g-S}l+=d,c+=p*d}a[n-1][1]+=a[n-1][0]=r,l&&(r-=c/l)}a[n-1][1]+=a[n-1][0]=r,zn(e,t)}}function nm(e){var t=e.map(sw);return Gn(e).sort(function(r,n){return t[r]-t[n]})}function sw(e){for(var t=-1,r=0,n=e.length,a,s=-1/0;++t<n;)(a=+e[t][1])>s&&(s=a,r=t);return r}function am(e){var t=e.map(sm);return Gn(e).sort(function(r,n){return t[r]-t[n]})}function sm(e){for(var t=0,r=-1,n=e.length,a;++r<n;)(a=+e[r][1])&&(t+=a);return t}function ow(e){return am(e).reverse()}function iw(e){var t=e.length,r,n,a=e.map(sm),s=nm(e),o=0,i=0,l=[],c=[];for(r=0;r<t;++r)n=s[r],o<i?(o+=a[n],l.push(n)):(i+=a[n],c.push(n));return c.reverse().concat(l)}function lw(e){return Gn(e).reverse()}const Gi={appearance:nm,ascending:am,descending:ow,insideOut:iw,none:Gn,reverse:lw},Hi={expand:tw,diverging:rw,none:zn,silhouette:nw,wiggle:aw},om=e=>{const{series:t,seriesOrder:r,defaultStrategy:n}=e,a=[],s={};return r.forEach(o=>{const{stack:i,stackOrder:l,stackOffset:c}=t[o];i===void 0?a.push({ids:[o],stackingOrder:Gi.none,stackingOffset:Hi.none}):s[i]===void 0?(s[i]=a.length,a.push({ids:[o],stackingOrder:Gi[l??(n==null?void 0:n.stackOrder)??"none"],stackingOffset:Hi[c??(n==null?void 0:n.stackOffset)??"diverging"]})):(a[s[i]].ids.push(o),l!==void 0&&(a[s[i]].stackingOrder=Gi[l]),c!==void 0&&(a[s[i]].stackingOffset=Hi[c]))}),a},cw=e=>e==null?"":e.toLocaleString(),uw=(e,t)=>{const{seriesOrder:r,series:n}=e,a=om(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(`
|
|
125
|
+
*/var Gu;function kv(){return Gu||(Gu=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=se,r=ef(),n=typeof Object.is=="function"?Object.is:e,a=r.useSyncExternalStore,s=t.useRef,o=t.useEffect,i=t.useMemo,l=t.useDebugValue;$i.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var m=s(null);if(m.current===null){var f={hasValue:!1,value:null};m.current=f}else f=m.current;m=i(function(){function S(R){if(!T){if(T=!0,O=R,R=h(R),p!==void 0&&f.hasValue){var P=f.value;if(p(P,R))return C=P}return C=R}if(P=C,n(O,R))return P;var _=h(R);return p!==void 0&&p(P,_)?(O=R,P):(O=R,C=_)}var T=!1,O,C,E=d===void 0?null:d;return[function(){return S(u())},E===null?void 0:function(){return S(E())}]},[u,d,h,p]);var g=a(c,m[0],m[1]);return o(function(){f.hasValue=!0,f.value=g},[g]),l(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),$i}var Hu;function Lv(){return Hu||(Hu=1,process.env.NODE_ENV==="production"?gs.exports=jv():gs.exports=kv()),gs.exports}var Uv=Lv();const Dv=Object.is,bt=(e,t,r=[],n=Dv)=>{const a=s=>t(s,...r);return Uv.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a,n)},Nv="DEFAULT_X_AXIS_KEY",Fv="DEFAULT_Y_AXIS_KEY",Bv={top:20,bottom:20,left:20,right:20},zv=45,Gv=25,tf=20,Jn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.x},Wn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.y},Hv=ye([Wn],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)),qv=ye([Wn],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)),Jv=ye([Jn],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)),Wv=ye([Jn],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)),Kv=e=>e.dimensions,rf=e=>e.dimensions.width,nf=e=>e.dimensions.height,Yv=e=>e.dimensions.margin.top,Qv=e=>e.dimensions.margin.right,Xv=e=>e.dimensions.margin.bottom,Zv=e=>e.dimensions.margin.left,rs=ye([rf,nf,Yv,Qv,Xv,Zv,Jv,qv,Wv,Hv],(e,t,r,n,a,s,o,i,l,c)=>({width:e-s-n-c-i,left:s+c,right:n+i,height:t-r-a-o-l,top:r+o,bottom:a+l})),ex=ye([Kv],e=>({width:e.propsWidth,height:e.propsHeight})),tx=ye([rf,nf],(e,t)=>({width:e,height:t}));function af(e,t){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:t?K({},t,e):e}const rx=10,Fo=({params:e,store:t,svgRef:r})=>{const n=e.width!==void 0&&e.height!==void 0,a=F.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[s,o]=F.useState(0),[i,l]=F.useState(0),c=F.useCallback(()=>{const m=r==null?void 0:r.current;if(!m)return{};const g=Iv(m).getComputedStyle(m),S=Math.floor(parseFloat(g.height))||0,T=Math.floor(parseFloat(g.width))||0;return t.update(O=>O.dimensions.width===T&&O.dimensions.height===S?O:K({},O,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:e.width??T,height:e.height??S,propsWidth:e.width,propsHeight:e.height}})),{height:S,width:T}},[t,r,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]);F.useEffect(()=>{t.update(m=>{const f=e.width??m.dimensions.width,g=e.height??m.dimensions.height;return K({},m,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:f,height:g,propsHeight:e.height,propsWidth:e.width}})})},[t,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]),F.useEffect(()=>{a.current.displayError=!0},[]),or(()=>{if(n||!a.current.initialCompute||a.current.computeRun>rx)return;const m=c();m.width!==s||m.height!==i?(a.current.computeRun+=1,m.width!==void 0&&o(m.width),m.height!==void 0&&l(m.height)):a.current.initialCompute&&(a.current.initialCompute=!1)},[i,s,c,n]),or(()=>{if(n)return()=>{};c();const m=r.current;if(typeof ResizeObserver>"u")return()=>{};let f;const g=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{c()})});return m&&g.observe(m),()=>{f&&cancelAnimationFrame(f),m&&g.unobserve(m)}},[c,n,r]),process.env.NODE_ENV!=="production"&&(a.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."),a.current.displayError=!1),a.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."),a.current.displayError=!1));const u=bt(t,rs),d=F.useCallback(m=>m>=u.left-1&&m<=u.left+u.width,[u.left,u.width]),h=F.useCallback(m=>m>=u.top-1&&m<=u.top+u.height,[u.height,u.top]);return{instance:{isPointInside:F.useCallback((m,f,g)=>g&&"closest"in g&&g.closest("[data-drawing-container]")?!0:d(m)&&h(f),[d,h]),isXInside:d,isYInside:h}}};Fo.params={width:!0,height:!0,margin:!0};Fo.getDefaultizedParams=({params:e})=>K({},e,{margin:af(e.margin,Bv)});Fo.getInitialState=({width:e,height:t,margin:r})=>({dimensions:{margin:r,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const ic=({params:e,store:t})=>(or(()=>{t.update(r=>K({},r,{experimentalFeatures:e.experimentalFeatures}))},[t,e.experimentalFeatures]),{});ic.params={experimentalFeatures:!0};ic.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});const nx=e=>e.experimentalFeatures,sf=ye([nx],e=>!!(e!=null&&e.preferStrictDomainInLineCharts));let qu=0;const ax=()=>(qu+=1,`mui-chart-${qu}`),lc=({params:e,store:t})=>(F.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??ax()})}))},[t,e.id]),{});lc.params={id:!0};lc.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const sx=e=>e.id,ox=ye([sx],e=>e.chartId),ix=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],lx=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],of=e=>e==="dark"?lx:ix,lf=({series:e,colors:t,seriesConfig:r,dataset:n})=>{const a={};e.forEach((o,i)=>{var u;const l=r[o.type].getSeriesWithDefaultValues(o,i,t),c=l.id;if(a[o.type]===void 0&&(a[o.type]={series:{},seriesOrder:[]}),((u=a[o.type])==null?void 0:u.series[c])!==void 0)throw new Error(`MUI X Charts: series' id "${c}" is not unique.`);a[o.type].series[c]=l,a[o.type].seriesOrder.push(c)});const s={};return Object.keys(r).forEach(o=>{var l,c;const i=a[o];i!==void 0&&(s[o]=((c=(l=r[o])==null?void 0:l.seriesProcessor)==null?void 0:c.call(l,i,n))??a[o])}),s},Bo=({params:e,store:t,seriesConfig:r})=>{const{series:n,dataset:a,theme:s,colors:o}=e,i=F.useRef(!0);return F.useEffect(()=>{if(i.current){i.current=!1;return}t.update(l=>K({},l,{series:K({},l.series,{processedSeries:lf({series:n,colors:typeof o=="function"?o(s):o,seriesConfig:r,dataset:a})})}))},[o,a,n,s,r,t]),{}};Bo.params={dataset:!0,series:!0,colors:!0,theme:!0};const cx=[];Bo.getDefaultizedParams=({params:e})=>{var t;return K({},e,{series:(t=e.series)!=null&&t.length?e.series:cx,colors:e.colors??of,theme:e.theme??"light"})};Bo.getInitialState=({series:e=[],colors:t,theme:r,dataset:n},a,s)=>({series:{seriesConfig:s,processedSeries:lf({series:e,colors:typeof t=="function"?t(r):t,seriesConfig:s,dataset:n})}});const cf=e=>e.series,ns=ye([cf],e=>e.processedSeries),zo=ye([cf],e=>e.seriesConfig),ux={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 uf{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 ux)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,a){this.element=t,this.pointerManager=r,this.gesturesRegistry=n,this.keyboardManager=a;const s=`${this.name}ChangeOptions`;this.element.addEventListener(s,this.handleOptionsChange.bind(this));const o=`${this.name}ChangeState`;this.element.addEventListener(o,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 dx{constructor(){this.activeGestures=new Map}registerActiveGesture(t,r){this.activeGestures.has(t)||this.activeGestures.set(t,new Set);const n=this.activeGestures.get(t),a={gesture:r,element:t};n.add(a)}unregisterActiveGesture(t,r){const n=this.activeGestures.get(t);n&&(n.forEach(a=>{a.gesture===r&&n.delete(a)}),n.size===0&&this.activeGestures.delete(t))}getActiveGestures(t){const r=this.activeGestures.get(t);return r?Array.from(r).reduce((n,a)=>(n[a.gesture.name]=!0,n),{}):{}}isGestureActive(t,r){const n=this.activeGestures.get(t);return n?Array.from(n).some(a=>a.gesture===r):!1}destroy(){this.activeGestures.clear()}unregisterElement(t){this.activeGestures.delete(t)}}class hx{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 px{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}),a=this.pointers.values().next().value;if(this.pointers.size>0&&a){Object.defineProperties(n,{clientX:{value:a.clientX},clientY:{value:a.clientY},pointerId:{value:a.pointerId},pointerType:{value:a.pointerType}});for(const[s,o]of this.pointers.entries()){const i=K({},o,{type:"forceCancel"});this.pointers.set(s,i)}}this.notifyHandlers(n),this.pointers.clear()},this.handlePointerEvent=r=>{const{type:n,pointerId:a}=r;if(n==="pointerdown"){if(this.pointers.set(a,this.createPointerData(r)),r.target instanceof Element)try{r.target.setPointerCapture(a)}catch{}}else if(n==="pointermove")this.pointers.set(a,this.createPointerData(r));else if(n==="pointerup"||n==="pointercancel"||n==="forceCancel"){if(r.target instanceof Element)try{r.target.releasePointerCapture(a)}catch{}this.pointers.set(a,this.createPointerData(r)),this.notifyHandlers(r),this.pointers.delete(a);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 fx{constructor(t){this.gestureTemplates=new Map,this.elementGestureMap=new Map,this.activeGesturesRegistry=new dx,this.pointerManager=void 0,this.keyboardManager=new hx,this.pointerManager=new px({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 a=this.elementGestureMap.get(r);if(!a||!a.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 a=this.elementGestureMap.get(r);if(!a||!a.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 o=n==null?void 0:n[s];this.registerSingleGesture(s,r,o)}),r;const a=n==null?void 0:n[t];return this.registerSingleGesture(t,r,a),r}registerSingleGesture(t,r,n){const a=this.gestureTemplates.get(t);if(!a)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 o=a.clone(n);return o.init(r,this.pointerManager,this.activeGesturesRegistry,this.keyboardManager),s.set(t,o),!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 as extends uf{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,a){super.init(t,r,n,a),this.unregisterHandler=this.pointerManager.registerGestureHandler((s,o)=>this.handlePointerEvent(s,o))}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 mx(e,t){const r=t.x-e.x,n=t.y-e.y;return Math.sqrt(r*r+n*n)}function ji(e){if(e.length<2)return 0;let t=0,r=0;for(let n=0;n<e.length;n+=1)for(let a=n+1;a<e.length;a+=1)t+=mx({x:e[n].clientX,y:e[n].clientY},{x:e[a].clientX,y:e[a].clientY}),r+=1;return r>0?t/r:0}function ir(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 Kn(e,t){return`${e}${t==="ongoing"?"":t.charAt(0).toUpperCase()+t.slice(1)}`}const bs=1e-5,br=1e-5,Ju=.15;function gx(e,t){const r=t.x-e.x,n=t.y-e.y,a={vertical:null,horizontal:null,mainAxis:null},s=yx(t,e),o=Math.abs(r)>Math.abs(n)?"horizontal":"vertical",i=s||o==="horizontal"?bs:Ju,l=s?bs:o==="horizontal"?Ju:bs;return Math.abs(r)>i&&(a.horizontal=r>0?"right":"left"),Math.abs(n)>l&&(a.vertical=n>0?"down":"up"),a.mainAxis=s?"diagonal":o,a}function yx(e,t){const r=t.x-e.x,n=t.y-e.y,a=Math.atan2(n,r)*180/Math.PI;return a>=-45+br&&a<=-22.5+br||a>=22.5+br&&a<=45+br||a>=135+br&&a<=157.5+br||a>=-157.5+br&&a<=-135+br}function bx(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 vx=0,xx=e=>e>vx?1:e<-0?-1:0;class cc extends as{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 cc(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,a){super.init(t,r,n,a),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 a={x:t.clientX,y:t.clientY};this.state.lastPosition=a,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()),a=this.getTargetElement(r);if(!a||n.length<this.minPointers||n.length>this.maxPointers)return;if(this.shouldPreventGesture(a)){if(!this.isActive)return;this.resetState(),this.emitMoveEvent(a,"end",n,r);return}const s={x:r.clientX,y:r.clientY};this.state.lastPosition=s,this.isActive||(this.isActive=!0,this.emitMoveEvent(a,"start",n,r)),this.emitMoveEvent(a,"ongoing",n,r)}emitMoveEvent(t,r,n,a){const s=this.state.lastPosition||ir(n),o=this.gesturesRegistry.getActiveGestures(t),i={gestureName:this.name,centroid:s,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,activeGestures:o,customData:this.customData},l=Kn(this.name,r),c=new CustomEvent(l,{bubbles:!0,cancelable:!0,detail:i});t.dispatchEvent(c)}}class uc extends as{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 uc(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 a=this.getTargetElement(r);if(!a)return;if(this.shouldPreventGesture(a)){this.cancel(a,n,r);return}const s=this.getRelevantPointers(n,a);if(s.length<this.minPointers||s.length>this.maxPointers){this.cancel(a,s,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(s.forEach(o=>{this.state.startPointers.set(o.pointerId,o)}),this.originalTarget=a,this.state.startCentroid=ir(s),this.state.lastCentroid=K({},this.state.startCentroid));break;case"pointermove":if(this.state.startCentroid&&s.length>=this.minPointers){const o=ir(s),i=o.x-this.state.startCentroid.x,l=o.y-this.state.startCentroid.y,c=Math.sqrt(i*i+l*l),u=gx(this.state.lastCentroid??this.state.startCentroid,o),d=this.state.lastCentroid?o.x-this.state.lastCentroid.x:0,h=this.state.lastCentroid?o.y-this.state.lastCentroid.y:0;!this.state.movementThresholdReached&&c>=this.threshold&&bx(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(a,"start",s,r,o),this.emitPanEvent(a,"ongoing",s,r,o)):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(a,"ongoing",s,r,o)),this.state.lastCentroid=o,this.state.lastDirection=u}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive&&this.state.movementThresholdReached){if(s.filter(o=>o.type!=="pointerup"&&o.type!=="pointercancel").length<this.minPointers){const o=this.state.lastCentroid||this.state.startCentroid;r.type==="pointercancel"&&this.emitPanEvent(a,"cancel",s,r,o),this.emitPanEvent(a,"end",s,r,o),this.resetState()}}else this.resetState();break}}emitPanEvent(t,r,n,a,s){var S,T;if(!this.state.startCentroid)return;const o=((S=this.state.lastDeltas)==null?void 0:S.x)??0,i=((T=this.state.lastDeltas)==null?void 0:T.y)??0,l=this.state.startPointers.values().next().value,c=l?(a.timeStamp-l.timeStamp)/1e3:0,u=c>0?o/c:0,d=c>0?i/c:0,h=Math.sqrt(u*u+d*d),p=this.gesturesRegistry.getActiveGestures(t),m={gestureName:this.name,initialCentroid:this.state.startCentroid,centroid:s,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,deltaX:o,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},f=Kn(this.name,r),g=new CustomEvent(f,{bubbles:!0,cancelable:!0,detail:m});t.dispatchEvent(g),this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation()}cancel(t,r,n){if(this.isActive){const a=t??this.element;this.emitPanEvent(a,"cancel",r,n,this.state.lastCentroid),this.emitPanEvent(a,"end",r,n,this.state.lastCentroid)}this.resetState()}}class dc extends as{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 dc(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()),a=this.getTargetElement(r);if(!a)return;if(this.shouldPreventGesture(a)){this.isActive&&(this.emitPinchEvent(a,"cancel",n,r),this.resetState());return}const s=this.getRelevantPointers(n,a);switch(r.type){case"pointerdown":if(s.length>=2&&!this.isActive){const o=ji(s);this.state.startDistance=o,this.state.lastDistance=o,this.state.lastTime=r.timeStamp,this.originalTarget=a}break;case"pointermove":if(this.state.startDistance&&s.length>=this.minPointers){const o=ji(s),i=Math.abs(o-this.state.lastDistance);if(i!==0&&i>=this.threshold){const l=this.state.startDistance?o/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=(o-this.state.lastDistance)/u;this.state.velocity=Number.isNaN(h)?0:h}this.state.lastDistance=o,this.state.deltaScale=l-this.state.lastScale,this.state.lastScale=l,this.state.lastTime=r.timeStamp,this.isActive?this.emitPinchEvent(a,"ongoing",s,r):(this.isActive=!0,this.emitPinchEvent(a,"start",s,r),this.emitPinchEvent(a,"ongoing",s,r))}}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive){const o=s.filter(i=>i.type!=="pointerup"&&i.type!=="pointercancel");if(o.length<this.minPointers)r.type==="pointercancel"&&this.emitPinchEvent(a,"cancel",s,r),this.emitPinchEvent(a,"end",s,r),this.resetState();else if(o.length>=2){const i=ji(o);this.state.startDistance=i/this.state.lastScale}}break}}emitPinchEvent(t,r,n,a){const s=ir(n),o=this.state.lastDistance,i=this.state.lastScale,l=this.gesturesRegistry.getActiveGestures(t),c={gestureName:this.name,centroid:s,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,scale:i,deltaScale:this.state.deltaScale,totalScale:this.state.totalScale,distance:o,velocity:this.state.velocity,activeGestures:l,direction:xx(this.state.velocity),customData:this.customData};this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation();const u=Kn(this.name,r),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,detail:c});t.dispatchEvent(d)}}class hc extends as{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 hc(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 a=this.getTargetElement(r);if(!a)return;if(this.shouldPreventGesture(a)){this.isActive&&this.cancelPress(a,n,r);return}const s=this.getRelevantPointers(n,a);if(s.length<this.minPointers||s.length>this.maxPointers){this.isActive&&this.cancelPress(a,s,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(this.state.startCentroid=ir(s),this.state.lastPosition=K({},this.state.startCentroid),this.state.startTime=r.timeStamp,this.isActive=!0,this.originalTarget=a,this.clearPressTimer(),this.state.timerId=setTimeout(()=>{if(this.isActive&&this.state.startCentroid){this.state.pressThresholdReached=!0;const o=this.state.lastPosition;this.emitPressEvent(a,"start",s,r,o),this.emitPressEvent(a,"ongoing",s,r,o)}},this.duration));break;case"pointermove":if(this.isActive&&this.state.startCentroid){const o=ir(s);this.state.lastPosition=o;const i=o.x-this.state.startCentroid.x,l=o.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelPress(a,s,r)}break;case"pointerup":if(this.isActive){if(this.state.pressThresholdReached){const o=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(a,"end",s,r,o)}this.resetState()}break;case"pointercancel":case"forceCancel":this.cancelPress(a,s,r);break}}emitPressEvent(t,r,n,a,s){const o=this.gesturesRegistry.getActiveGestures(t),i=a.timeStamp-this.state.startTime,l={gestureName:this.name,centroid:s,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,x:s.x,y:s.y,duration:i,activeGestures:o,customData:this.customData},c=Kn(this.name,r),u=new CustomEvent(c,{bubbles:!0,cancelable:!0,detail:l});t.dispatchEvent(u),this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation()}cancelPress(t,r,n){if(this.isActive&&this.state.pressThresholdReached){const a=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(t??this.element,"cancel",r,n,a),this.emitPressEvent(t??this.element,"end",r,n,a)}this.resetState()}}class pc extends as{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 pc(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()),a=this.getTargetElement(r);if(!a)return;const s=this.getRelevantPointers(n,a);if(this.shouldPreventGesture(a)||s.length<this.minPointers||s.length>this.maxPointers){this.isActive&&this.cancelTap(a,s,r);return}switch(r.type){case"pointerdown":this.isActive||(this.state.startCentroid=ir(s),this.state.lastPosition=K({},this.state.startCentroid),this.isActive=!0,this.originalTarget=a);break;case"pointermove":if(this.isActive&&this.state.startCentroid){const o=ir(s);this.state.lastPosition=o;const i=o.x-this.state.startCentroid.x,l=o.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelTap(a,s,r)}break;case"pointerup":if(this.isActive){this.state.currentTapCount+=1;const o=this.state.lastPosition||this.state.startCentroid;if(!o){this.cancelTap(a,s,r);return}this.state.currentTapCount>=this.taps?(this.fireTapEvent(a,s,r,o),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(a,s,r);break}}fireTapEvent(t,r,n,a){const s=this.gesturesRegistry.getActiveGestures(t),o={gestureName:this.name,centroid:a,target:n.target,srcEvent:n,phase:"end",pointers:r,timeStamp:n.timeStamp,x:a.x,y:a.y,tapCount:this.state.currentTapCount,activeGestures:s,customData:this.customData},i=new CustomEvent(this.name,{bubbles:!0,cancelable:!0,detail:o});t.dispatchEvent(i),this.preventDefault&&n.preventDefault(),this.stopPropagation&&n.stopPropagation()}cancelTap(t,r,n){if(this.state.startCentroid||this.state.lastPosition){const a=this.state.lastPosition||this.state.startCentroid,s=this.gesturesRegistry.getActiveGestures(t),o={gestureName:this.name,centroid:a,target:n.target,srcEvent:n,phase:"cancel",pointers:r,timeStamp:n.timeStamp,x:a.x,y:a.y,tapCount:this.state.currentTapCount,activeGestures:s,customData:this.customData},i=Kn(this.name,"cancel"),l=new CustomEvent(i,{bubbles:!0,cancelable:!0,detail:o});t.dispatchEvent(l)}this.resetState()}}class fc extends uf{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 fc(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,a){super.init(t,r,n,a),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(a=>{this.state[a]<this.min&&(this.state[a]=this.min),this.state[a]>this.max&&(this.state[a]=this.max)}),this.emitWheelEvent(n,t)}emitWheelEvent(t,r){const n=t.length>0?ir(t):{x:r.clientX,y:r.clientY},a=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:a,customData:this.customData};this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const o=Kn(this.name,"ongoing"),i=new CustomEvent(o,{bubbles:!0,cancelable:!0,detail:s});this.element.dispatchEvent(i)}}const yn=e=>e.preventDefault(),mc=({svgRef:e})=>{F.useEffect(()=>{const r=e.current;if(!r)return;const n=new fx({gestures:[new uc({name:"pan",threshold:0,maxPointers:1}),new cc({name:"move",preventIf:["pan","pinch"]}),new dc({name:"pinch",threshold:5,preventIf:["pan"]}),new fc({name:"turnWheel",sensitivity:.01,initialDelta:1}),new pc({name:"tap",maxDistance:10,preventIf:["pan","pinch"]}),new hc({name:"quickPress",duration:50,maxDistance:10})]});return n.registerElement(["pan","move","pinch","turnWheel","tap","quickPress"],r),()=>{n.destroy()}},[e]);const t=F.useCallback((r,n,a)=>{const s=e.current;return s==null||s.addEventListener(r,n,a),{cleanup:()=>s==null?void 0:s.removeEventListener(r,n)}},[e]);return F.useEffect(()=>{const r=e.current;return r==null||r.addEventListener("gesturestart",yn),r==null||r.addEventListener("gesturechange",yn),r==null||r.addEventListener("gestureend",yn),()=>{r==null||r.removeEventListener("gesturestart",yn),r==null||r.removeEventListener("gesturechange",yn),r==null||r.removeEventListener("gestureend",yn)}},[e]),{instance:{addInteractionListener:t}}};mc.params={};mc.getInitialState=()=>({});const Sx=[lc,ic,Fo,Bo,mc,No],Ox=["apiRef"],wx=e=>{let{plugins:t}=e,r=Cr(e.props,Ox);const n={};t.forEach(o=>{Object.assign(n,o.params)});const a={};return Object.keys(r).forEach(o=>{const i=r[o];n[o]&&(a[o]=i)}),t.reduce((o,i)=>i.getDefaultizedParams?i.getDefaultizedParams({params:o}):o,a)};let Wu=0;function Cx(e,t,r){const n=lv(),a=F.useMemo(()=>[...Sx,...e],[e]),s=wx({plugins:a,props:t});s.id=s.id??n;const i=F.useRef({}).current,l=Rx(t.apiRef),c=F.useRef(null),u=F.useRef(null),d=F.useRef(null);if(d.current==null){Wu+=1;const m={cacheKey:{id:Wu}};a.forEach(f=>{f.getInitialState&&Object.assign(m,f.getInitialState(s,m,r))}),d.current=new cv(m)}const h=m=>{const f=m({instance:i,params:s,plugins:a,store:d.current,svgRef:u,chartRootRef:c,seriesConfig:r});f.publicAPI&&Object.assign(l.current,f.publicAPI),f.instance&&Object.assign(i,f.instance)};return a.forEach(h),{contextValue:F.useMemo(()=>({store:d.current,publicAPI:l.current,instance:i,svgRef:u,chartRootRef:c}),[i,l])}}function Px(e){return e.current==null&&(e.current={}),e}function Rx(e){const t=F.useRef({});return e?Px(e):t}const gc=F.createContext(null);process.env.NODE_ENV!=="production"&&(gc.displayName="ChartContext");const Ku=new Set;function Da(e,t="warning"){if(process.env.NODE_ENV==="production")return;const r=Array.isArray(e)?e.join(`
|
|
126
|
+
`):e;Ku.has(r)||(Ku.add(r),t==="error"?console.error(r):console.warn(r))}function Tx(e){const{componentName:t,propName:r,controlled:n,defaultValue:a,warningPrefix:s="MUI X"}=e,[{initialDefaultValue:o,isControlled:i}]=F.useState({initialDefaultValue:a,isControlled:n!==void 0});i!==(n!==void 0)&&Da([`${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(o)!==JSON.stringify(a)&&Da([`${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 df=process.env.NODE_ENV==="production"?()=>{}:Tx,hf=4,pf=20+2*hf,Ax=40+2*hf,Vx="hover",vs={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",slider:{enabled:!1,preview:!1,size:pf,showTooltip:Vx}},yc=(e,t,r)=>{var n;if(e)return e===!0?K({axisId:t,axisDirection:r},vs):K({axisId:t,axisDirection:r},vs,e,{slider:K({},vs.slider,{size:((n=e.slider)==null?void 0:n.preview)??vs.slider.preview?Ax:pf},e.slider)})};function ff(e,t){const r={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:Nv,scaleType:"linear"}]).map((s,o)=>{var p;const i=s.dataKey,l=o===0?"bottom":"none",c=s.position??l,u=Gv+(s.label?tf:0),d=s.id??`defaultized-x-axis-${o}`,h=K({offset:r[c]},s,{id:d,position:c,height:s.height??u,zoom:yc(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(m=>m[i])})})}function mf(e,t){const r={right:0,left:0,none:0};return(e&&e.length>0?e:[{id:Fv,scaleType:"linear"}]).map((s,o)=>{var p;const i=s.dataKey,l=o===0?"left":"none",c=s.position??l,u=zv+(s.label?tf:0),d=s.id??`defaultized-y-axis-${o}`,h=K({offset:r[c]},s,{id:d,position:c,width:s.width??u,zoom:yc(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(m=>m[i])})})}function zs(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ex(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function bc(e){let t,r,n;e.length!==2?(t=zs,r=(i,l)=>zs(e(i),l),n=(i,l)=>e(i)-l):(t=e===zs||e===Ex?e:_x,r=e,n=e);function a(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 o(i,l,c=0,u=i.length){const d=a(i,l,c,u-1);return d>c&&n(i[d-1],l)>-n(i[d],l)?d-1:d}return{left:a,center:o,right:s}}function _x(){return 0}function Ix(e){return e===null?NaN:+e}const Mx=bc(zs),gf=Mx.right;bc(Ix).center;class Yu extends Map{constructor(t,r=kx){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(Qu(this,t))}has(t){return super.has(Qu(this,t))}set(t,r){return super.set($x(this,t),r)}delete(t){return super.delete(jx(this,t))}}function Qu({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function $x({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function jx({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function kx(e){return e!==null&&typeof e=="object"?e.valueOf():e}const Lx=Math.sqrt(50),Ux=Math.sqrt(10),Dx=Math.sqrt(2);function to(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),s=n/Math.pow(10,a),o=s>=Lx?10:s>=Ux?5:s>=Dx?2:1;let i,l,c;return a<0?(c=Math.pow(10,-a)/o,i=Math.round(e*c),l=Math.round(t*c),i/c<e&&++i,l/c>t&&--l,c=-c):(c=Math.pow(10,a)*o,i=Math.round(e/c),l=Math.round(t/c),i*c<e&&++i,l*c>t&&--l),l<i&&.5<=r&&r<2?to(e,t,r*2):[i,l,c]}function vl(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,s,o]=n?to(t,e,r):to(e,t,r);if(!(s>=a))return[];const i=s-a+1,l=new Array(i);if(n)if(o<0)for(let c=0;c<i;++c)l[c]=(s-c)/-o;else for(let c=0;c<i;++c)l[c]=(s-c)*o;else if(o<0)for(let c=0;c<i;++c)l[c]=(a+c)/-o;else for(let c=0;c<i;++c)l[c]=(a+c)*o;return l}function xl(e,t,r){return t=+t,e=+e,r=+r,to(e,t,r)[2]}function Sl(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?xl(t,e,r):xl(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function Nx(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,s=new Array(a);++n<a;)s[n]=e+n*r;return s}function Vr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Fx(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 Xu=Symbol("implicit");function ro(){var e=new Yu,t=[],r=[],n=Xu;function a(s){let o=e.get(s);if(o===void 0){if(n!==Xu)return n;e.set(s,o=t.push(s)-1)}return r[o%r.length]}return a.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new Yu;for(const o of s)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(s){return arguments.length?(r=Array.from(s),a):r.slice()},a.unknown=function(s){return arguments.length?(n=s,a):n},a.copy=function(){return ro(t,r).unknown(n)},Vr.apply(a,arguments),a}function vc(){var e=ro().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,s,o,i=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,p=a<n,m=p?a:n,f=p?n:a;s=(f-m)/Math.max(1,h-l+c*2),i&&(s=Math.floor(s)),m+=(f-m-s*(h-l))*u,o=s*(1-l),i&&(m=Math.round(m),o=Math.round(o));var g=Nx(h).map(function(S){return m+s*S});return r(p?g.reverse():g)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([n,a]=h,n=+n,a=+a,d()):[n,a]},e.rangeRound=function(h){return[n,a]=h,n=+n,a=+a,i=!0,d()},e.bandwidth=function(){return o},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 vc(t(),[n,a]).round(i).paddingInner(l).paddingOuter(c).align(u)},Vr.apply(d(),arguments)}function yf(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return yf(t())},e}function Bx(){return yf(vc.apply(null,arguments).paddingInner(1))}function xc(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function bf(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ss(){}var Na=.7,no=1/Na,$n="\\s*([+-]?\\d+)\\s*",Fa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zx=/^#([0-9a-f]{3,8})$/,Gx=new RegExp(`^rgb\\(${$n},${$n},${$n}\\)$`),Hx=new RegExp(`^rgb\\(${Qt},${Qt},${Qt}\\)$`),qx=new RegExp(`^rgba\\(${$n},${$n},${$n},${Fa}\\)$`),Jx=new RegExp(`^rgba\\(${Qt},${Qt},${Qt},${Fa}\\)$`),Wx=new RegExp(`^hsl\\(${Fa},${Qt},${Qt}\\)$`),Kx=new RegExp(`^hsla\\(${Fa},${Qt},${Qt},${Fa}\\)$`),Zu={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};xc(ss,Ba,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ed,formatHex:ed,formatHex8:Yx,formatHsl:Qx,formatRgb:td,toString:td});function ed(){return this.rgb().formatHex()}function Yx(){return this.rgb().formatHex8()}function Qx(){return vf(this).formatHsl()}function td(){return this.rgb().formatRgb()}function Ba(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=zx.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?rd(t):r===3?new vt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?xs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?xs(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=Gx.exec(e))?new vt(t[1],t[2],t[3],1):(t=Hx.exec(e))?new vt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=qx.exec(e))?xs(t[1],t[2],t[3],t[4]):(t=Jx.exec(e))?xs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Wx.exec(e))?sd(t[1],t[2]/100,t[3]/100,1):(t=Kx.exec(e))?sd(t[1],t[2]/100,t[3]/100,t[4]):Zu.hasOwnProperty(e)?rd(Zu[e]):e==="transparent"?new vt(NaN,NaN,NaN,0):null}function rd(e){return new vt(e>>16&255,e>>8&255,e&255,1)}function xs(e,t,r,n){return n<=0&&(e=t=r=NaN),new vt(e,t,r,n)}function Xx(e){return e instanceof ss||(e=Ba(e)),e?(e=e.rgb(),new vt(e.r,e.g,e.b,e.opacity)):new vt}function Ol(e,t,r,n){return arguments.length===1?Xx(e):new vt(e,t,r,n??1)}function vt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}xc(vt,Ol,bf(ss,{brighter(e){return e=e==null?no:Math.pow(no,e),new vt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Na:Math.pow(Na,e),new vt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vt(Fr(this.r),Fr(this.g),Fr(this.b),ao(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:nd,formatHex:nd,formatHex8:Zx,formatRgb:ad,toString:ad}));function nd(){return`#${Lr(this.r)}${Lr(this.g)}${Lr(this.b)}`}function Zx(){return`#${Lr(this.r)}${Lr(this.g)}${Lr(this.b)}${Lr((isNaN(this.opacity)?1:this.opacity)*255)}`}function ad(){const e=ao(this.opacity);return`${e===1?"rgb(":"rgba("}${Fr(this.r)}, ${Fr(this.g)}, ${Fr(this.b)}${e===1?")":`, ${e})`}`}function ao(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Lr(e){return e=Fr(e),(e<16?"0":"")+e.toString(16)}function sd(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ut(e,t,r,n)}function vf(e){if(e instanceof Ut)return new Ut(e.h,e.s,e.l,e.opacity);if(e instanceof ss||(e=Ba(e)),!e)return new Ut;if(e instanceof Ut)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),s=Math.max(t,r,n),o=NaN,i=s-a,l=(s+a)/2;return i?(t===s?o=(r-n)/i+(r<n)*6:r===s?o=(n-t)/i+2:o=(t-r)/i+4,i/=l<.5?s+a:2-s-a,o*=60):i=l>0&&l<1?0:o,new Ut(o,i,l,e.opacity)}function eS(e,t,r,n){return arguments.length===1?vf(e):new Ut(e,t,r,n??1)}function Ut(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}xc(Ut,eS,bf(ss,{brighter(e){return e=e==null?no:Math.pow(no,e),new Ut(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Na:Math.pow(Na,e),new Ut(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,a=2*r-n;return new vt(ki(e>=240?e-240:e+120,a,n),ki(e,a,n),ki(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Ut(od(this.h),Ss(this.s),Ss(this.l),ao(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=ao(this.opacity);return`${e===1?"hsl(":"hsla("}${od(this.h)}, ${Ss(this.s)*100}%, ${Ss(this.l)*100}%${e===1?")":`, ${e})`}`}}));function od(e){return e=(e||0)%360,e<0?e+360:e}function Ss(e){return Math.max(0,Math.min(1,e||0))}function ki(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 Sc=e=>()=>e;function tS(e,t){return function(r){return e+r*t}}function rS(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 nS(e){return(e=+e)==1?xf:function(t,r){return r-t?rS(t,r,e):Sc(isNaN(t)?r:t)}}function xf(e,t){var r=t-e;return r?tS(e,r):Sc(isNaN(e)?t:e)}const id=function e(t){var r=nS(t);function n(a,s){var o=r((a=Ol(a)).r,(s=Ol(s)).r),i=r(a.g,s.g),l=r(a.b,s.b),c=xf(a.opacity,s.opacity);return function(u){return a.r=o(u),a.g=i(u),a.b=l(u),a.opacity=c(u),a+""}}return n.gamma=e,n}(1);function aS(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(s){for(a=0;a<r;++a)n[a]=e[a]*(1-s)+t[a]*s;return n}}function sS(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function oS(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),s=new Array(r),o;for(o=0;o<n;++o)a[o]=Go(e[o],t[o]);for(;o<r;++o)s[o]=t[o];return function(i){for(o=0;o<n;++o)s[o]=a[o](i);return s}}function Oc(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Dt(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function iS(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=Go(e[a],t[a]):n[a]=t[a];return function(s){for(a in r)n[a]=r[a](s);return n}}var wl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Li=new RegExp(wl.source,"g");function lS(e){return function(){return e}}function cS(e){return function(t){return e(t)+""}}function uS(e,t){var r=wl.lastIndex=Li.lastIndex=0,n,a,s,o=-1,i=[],l=[];for(e=e+"",t=t+"";(n=wl.exec(e))&&(a=Li.exec(t));)(s=a.index)>r&&(s=t.slice(r,s),i[o]?i[o]+=s:i[++o]=s),(n=n[0])===(a=a[0])?i[o]?i[o]+=a:i[++o]=a:(i[++o]=null,l.push({i:o,x:Dt(n,a)})),r=Li.lastIndex;return r<t.length&&(s=t.slice(r),i[o]?i[o]+=s:i[++o]=s),i.length<2?l[0]?cS(l[0].x):lS(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 Go(e,t){var r=typeof t,n;return t==null||r==="boolean"?Sc(t):(r==="number"?Dt:r==="string"?(n=Ba(t))?(t=n,id):uS:t instanceof Ba?id:t instanceof Date?Oc:sS(t)?aS:Array.isArray(t)?oS:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?iS:Dt)(e,t)}function Sf(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function dS(e){return function(){return e}}function hS(e){return+e}var ld=[0,1];function At(e){return e}function Cl(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:dS(isNaN(t)?NaN:.5)}function pS(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function fS(e,t,r){var n=e[0],a=e[1],s=t[0],o=t[1];return a<n?(n=Cl(a,n),s=r(o,s)):(n=Cl(n,a),s=r(s,o)),function(i){return s(n(i))}}function mS(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),s=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)a[o]=Cl(e[o],e[o+1]),s[o]=r(t[o],t[o+1]);return function(i){var l=gf(e,i,1,n)-1;return s[l](a[l](i))}}function Ho(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function wc(){var e=ld,t=ld,r=Go,n,a,s,o=At,i,l,c;function u(){var h=Math.min(e.length,t.length);return o!==At&&(o=pS(e[0],e[h-1])),i=h>2?mS:fS,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?s:(l||(l=i(e.map(n),t,r)))(n(o(h)))}return d.invert=function(h){return o(a((c||(c=i(t,e.map(n),Dt)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,hS),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=Sf,u()},d.clamp=function(h){return arguments.length?(o=h?!0:At,u()):o!==At},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,a=p,u()}}function Of(){return wc()(At,At)}function gS(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function so(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 Dn(e){return e=so(Math.abs(e)),e?e[1]:NaN}function yS(e,t){return function(r,n){for(var a=r.length,s=[],o=0,i=e[0],l=0;a>0&&i>0&&(l+i+1>n&&(i=Math.max(1,n-l)),s.push(r.substring(a-=i,a+i)),!((l+=i+1)>n));)i=e[o=(o+1)%e.length];return s.reverse().join(t)}}function bS(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var vS=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function za(e){if(!(t=vS.exec(e)))throw new Error("invalid format: "+e);var t;return new Cc({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]})}za.prototype=Cc.prototype;function Cc(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+""}Cc.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 xS(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var wf;function SS(e,t){var r=so(e,t);if(!r)return e+"";var n=r[0],a=r[1],s=a-(wf=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return s===o?n:s>o?n+new Array(s-o+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+new Array(1-s).join("0")+so(e,Math.max(0,t+s-1))[0]}function cd(e,t){var r=so(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const ud={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:gS,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)=>cd(e*100,t),r:cd,s:SS,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function dd(e){return e}var hd=Array.prototype.map,pd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function OS(e){var t=e.grouping===void 0||e.thousands===void 0?dd:yS(hd.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?dd:bS(hd.call(e.numerals,String)),o=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=za(d);var h=d.fill,p=d.align,m=d.sign,f=d.symbol,g=d.zero,S=d.width,T=d.comma,O=d.precision,C=d.trim,E=d.type;E==="n"?(T=!0,E="g"):ud[E]||(O===void 0&&(O=12),C=!0,E="g"),(g||h==="0"&&p==="=")&&(g=!0,h="0",p="=");var R=f==="$"?r:f==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",P=f==="$"?n:/[%p]/.test(E)?o:"",_=ud[E],B=/[defgprs%]/.test(E);O=O===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function b(A){var z=R,I=P,G,re,te;if(E==="c")I=_(A)+I,A="";else{A=+A;var oe=A<0||1/A<0;if(A=isNaN(A)?l:_(Math.abs(A),O),C&&(A=xS(A)),oe&&+A==0&&m!=="+"&&(oe=!1),z=(oe?m==="("?m:i:m==="-"||m==="("?"":m)+z,I=(E==="s"?pd[8+wf/3]:"")+I+(oe&&m==="("?")":""),B){for(G=-1,re=A.length;++G<re;)if(te=A.charCodeAt(G),48>te||te>57){I=(te===46?a+A.slice(G+1):A.slice(G))+I,A=A.slice(0,G);break}}}T&&!g&&(A=t(A,1/0));var Z=z.length+A.length+I.length,ae=Z<S?new Array(S-Z+1).join(h):"";switch(T&&g&&(A=t(ae+A,ae.length?S-I.length:1/0),ae=""),p){case"<":A=z+A+I+ae;break;case"=":A=z+ae+A+I;break;case"^":A=ae.slice(0,Z=ae.length>>1)+z+A+I+ae.slice(Z);break;default:A=ae+z+A+I;break}return s(A)}return b.toString=function(){return d+""},b}function u(d,h){var p=c((d=za(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(Dn(h)/3)))*3,f=Math.pow(10,-m),g=pd[8+m/3];return function(S){return p(f*S)+g}}return{format:c,formatPrefix:u}}var Os,Pc,Cf;wS({thousands:",",grouping:[3],currency:["$",""]});function wS(e){return Os=OS(e),Pc=Os.format,Cf=Os.formatPrefix,Os}function CS(e){return Math.max(0,-Dn(Math.abs(e)))}function PS(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Dn(t)/3)))*3-Dn(Math.abs(e)))}function RS(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Dn(t)-Dn(e))+1}function TS(e,t,r,n){var a=Sl(e,t,r),s;switch(n=za(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(s=PS(a,o))&&(n.precision=s),Cf(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(s=RS(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=s-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(s=CS(a))&&(n.precision=s-(n.type==="%")*2);break}}return Pc(n)}function Rc(e){var t=e.domain;return e.ticks=function(r){var n=t();return vl(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return TS(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,s=n.length-1,o=n[a],i=n[s],l,c,u=10;for(i<o&&(c=o,o=i,i=c,c=a,a=s,s=c);u-- >0;){if(c=xl(o,i,r),c===l)return n[a]=o,n[s]=i,t(n);if(c>0)o=Math.floor(o/c)*c,i=Math.ceil(i/c)*c;else if(c<0)o=Math.ceil(o*c)/c,i=Math.floor(i*c)/c;else break;l=c}return e},e}function Pf(){var e=Of();return e.copy=function(){return Ho(e,Pf())},Vr.apply(e,arguments),Rc(e)}function Rf(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],s=e[n],o;return s<a&&(o=r,r=n,n=o,o=a,a=s,s=o),e[r]=t.floor(a),e[n]=t.ceil(s),e}function fd(e){return Math.log(e)}function md(e){return Math.exp(e)}function AS(e){return-Math.log(-e)}function VS(e){return-Math.exp(-e)}function ES(e){return isFinite(e)?+("1e"+e):e<0?0:e}function _S(e){return e===10?ES:e===Math.E?Math.exp:t=>Math.pow(e,t)}function IS(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 gd(e){return(t,r)=>-e(-t,r)}function MS(e){const t=e(fd,md),r=t.domain;let n=10,a,s;function o(){return a=IS(n),s=_S(n),r()[0]<0?(a=gd(a),s=gd(s),e(AS,VS)):e(fd,md),t}return t.base=function(i){return arguments.length?(n=+i,o()):n},t.domain=function(i){return arguments.length?(r(i),o()):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=a(c),p=a(u),m,f;const g=i==null?10:+i;let S=[];if(!(n%1)&&p-h<g){if(h=Math.floor(h),p=Math.ceil(p),c>0){for(;h<=p;++h)for(m=1;m<n;++m)if(f=h<0?m/s(-h):m*s(h),!(f<c)){if(f>u)break;S.push(f)}}else for(;h<=p;++h)for(m=n-1;m>=1;--m)if(f=h>0?m/s(-h):m*s(h),!(f<c)){if(f>u)break;S.push(f)}S.length*2<g&&(S=vl(c,u,g))}else S=vl(h,p,Math.min(p-h,g)).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=za(l)).precision==null&&(l.trim=!0),l=Pc(l)),i===1/0)return l;const c=Math.max(1,n*i/t.ticks().length);return u=>{let d=u/s(Math.round(a(u)));return d*n<n-.5&&(d*=n),d<=c?l(u):""}},t.nice=()=>r(Rf(r(),{floor:i=>s(Math.floor(a(i))),ceil:i=>s(Math.ceil(a(i)))})),t}function Tf(){const e=MS(wc()).domain([1,10]);return e.copy=()=>Ho(e,Tf()).base(e.base()),Vr.apply(e,arguments),e}function yd(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function $S(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function jS(e){return e<0?-e*e:e*e}function kS(e){var t=e(At,At),r=1;function n(){return r===1?e(At,At):r===.5?e($S,jS):e(yd(r),yd(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},Rc(t)}function Tc(){var e=kS(wc());return e.copy=function(){return Ho(e,Tc()).exponent(e.exponent())},Vr.apply(e,arguments),e}function LS(){return Tc.apply(null,arguments).exponent(.5)}function Af(){var e=[.5],t=[0,1],r,n=1;function a(s){return s!=null&&s<=s?t[gf(e,s,0,n)]:r}return a.domain=function(s){return arguments.length?(e=Array.from(s),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(s){return arguments.length?(t=Array.from(s),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(s){var o=t.indexOf(s);return[e[o-1],e[o]]},a.unknown=function(s){return arguments.length?(r=s,a):r},a.copy=function(){return Af().domain(e).range(t).unknown(r)},Vr.apply(a,arguments)}const Ui=new Date,Di=new Date;function et(e,t,r,n){function a(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return a.floor=s=>(e(s=new Date(+s)),s),a.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),a.round=s=>{const o=a(s),i=a.ceil(s);return s-o<i-s?o:i},a.offset=(s,o)=>(t(s=new Date(+s),o==null?1:Math.floor(o)),s),a.range=(s,o,i)=>{const l=[];if(s=a.ceil(s),i=i==null?1:Math.floor(i),!(s<o)||!(i>0))return l;let c;do l.push(c=new Date(+s)),t(s,i),e(s);while(c<s&&s<o);return l},a.filter=s=>et(o=>{if(o>=o)for(;e(o),!s(o);)o.setTime(o-1)},(o,i)=>{if(o>=o)if(i<0)for(;++i<=0;)for(;t(o,-1),!s(o););else for(;--i>=0;)for(;t(o,1),!s(o););}),r&&(a.count=(s,o)=>(Ui.setTime(+s),Di.setTime(+o),e(Ui),e(Di),Math.floor(r(Ui,Di))),a.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?a.filter(n?o=>n(o)%s===0:o=>a.count(0,o)%s===0):a)),a}const oo=et(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);oo.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?et(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):oo);oo.range;const nr=1e3,Vt=nr*60,ar=Vt*60,lr=ar*24,Ac=lr*7,bd=lr*30,Ni=lr*365,Ur=et(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCSeconds());Ur.range;const Vc=et(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr)},(e,t)=>{e.setTime(+e+t*Vt)},(e,t)=>(t-e)/Vt,e=>e.getMinutes());Vc.range;const Ec=et(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Vt)},(e,t)=>(t-e)/Vt,e=>e.getUTCMinutes());Ec.range;const _c=et(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr-e.getMinutes()*Vt)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getHours());_c.range;const Ic=et(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCHours());Ic.range;const os=et(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Vt)/lr,e=>e.getDate()-1);os.range;const qo=et(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lr,e=>e.getUTCDate()-1);qo.range;const Vf=et(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lr,e=>Math.floor(e/lr));Vf.range;function Kr(e){return et(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())*Vt)/Ac)}const Jo=Kr(0),io=Kr(1),US=Kr(2),DS=Kr(3),Nn=Kr(4),NS=Kr(5),FS=Kr(6);Jo.range;io.range;US.range;DS.range;Nn.range;NS.range;FS.range;function Yr(e){return et(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)/Ac)}const Wo=Yr(0),lo=Yr(1),BS=Yr(2),zS=Yr(3),Fn=Yr(4),GS=Yr(5),HS=Yr(6);Wo.range;lo.range;BS.range;zS.range;Fn.range;GS.range;HS.range;const Mc=et(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());Mc.range;const $c=et(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());$c.range;const cr=et(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());cr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:et(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)});cr.range;const ur=et(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());ur.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:et(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)});ur.range;function Ef(e,t,r,n,a,s){const o=[[Ur,1,nr],[Ur,5,5*nr],[Ur,15,15*nr],[Ur,30,30*nr],[s,1,Vt],[s,5,5*Vt],[s,15,15*Vt],[s,30,30*Vt],[a,1,ar],[a,3,3*ar],[a,6,6*ar],[a,12,12*ar],[n,1,lr],[n,2,2*lr],[r,1,Ac],[t,1,bd],[t,3,3*bd],[e,1,Ni]];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),m=p?p.range(c,+u+1):[];return h?m.reverse():m}function l(c,u,d){const h=Math.abs(u-c)/d,p=bc(([,,g])=>g).right(o,h);if(p===o.length)return e.every(Sl(c/Ni,u/Ni,d));if(p===0)return oo.every(Math.max(Sl(c,u,d),1));const[m,f]=o[h/o[p-1][2]<o[p][2]/h?p-1:p];return m.every(f)}return[i,l]}const[qS,JS]=Ef(ur,$c,Wo,Vf,Ic,Ec),[WS,KS]=Ef(cr,Mc,Jo,os,_c,Vc);function Fi(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 Bi(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 ha(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function YS(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,s=e.days,o=e.shortDays,i=e.months,l=e.shortMonths,c=pa(a),u=fa(a),d=pa(s),h=fa(s),p=pa(o),m=fa(o),f=pa(i),g=fa(i),S=pa(l),T=fa(l),O={a:oe,A:Z,b:ae,B:ge,c:null,d:Cd,e:Cd,f:v1,g:V1,G:_1,H:g1,I:y1,j:b1,L:_f,m:x1,M:S1,p:ue,q:De,Q:Td,s:Ad,S:O1,u:w1,U:C1,V:P1,w:R1,W:T1,x:null,X:null,y:A1,Y:E1,Z:I1,"%":Rd},C={a:ct,A:It,b:tt,B:St,c:null,d:Pd,e:Pd,f:k1,g:q1,G:W1,H:M1,I:$1,j:j1,L:Mf,m:L1,M:U1,p:pt,q:rt,Q:Td,s:Ad,S:D1,u:N1,U:F1,V:B1,w:z1,W:G1,x:null,X:null,y:H1,Y:J1,Z:K1,"%":Rd},E={a:b,A,b:z,B:I,c:G,d:Od,e:Od,f:h1,g:Sd,G:xd,H:wd,I:wd,j:l1,L:d1,m:i1,M:c1,p:B,q:o1,Q:f1,s:m1,S:u1,u:t1,U:r1,V:n1,w:e1,W:a1,x:re,X:te,y:Sd,Y:xd,Z:s1,"%":p1};O.x=R(r,O),O.X=R(n,O),O.c=R(t,O),C.x=R(r,C),C.X=R(n,C),C.c=R(t,C);function R(X,ie){return function(he){var J=[],Oe=-1,be=0,Ne=X.length,ke,_e,Mt;for(he instanceof Date||(he=new Date(+he));++Oe<Ne;)X.charCodeAt(Oe)===37&&(J.push(X.slice(be,Oe)),(_e=vd[ke=X.charAt(++Oe)])!=null?ke=X.charAt(++Oe):_e=ke==="e"?" ":"0",(Mt=ie[ke])&&(ke=Mt(he,_e)),J.push(ke),be=Oe+1);return J.push(X.slice(be,Oe)),J.join("")}}function P(X,ie){return function(he){var J=ha(1900,void 0,1),Oe=_(J,X,he+="",0),be,Ne;if(Oe!=he.length)return null;if("Q"in J)return new Date(J.Q);if("s"in J)return new Date(J.s*1e3+("L"in J?J.L:0));if(ie&&!("Z"in J)&&(J.Z=0),"p"in J&&(J.H=J.H%12+J.p*12),J.m===void 0&&(J.m="q"in J?J.q:0),"V"in J){if(J.V<1||J.V>53)return null;"w"in J||(J.w=1),"Z"in J?(be=Bi(ha(J.y,0,1)),Ne=be.getUTCDay(),be=Ne>4||Ne===0?lo.ceil(be):lo(be),be=qo.offset(be,(J.V-1)*7),J.y=be.getUTCFullYear(),J.m=be.getUTCMonth(),J.d=be.getUTCDate()+(J.w+6)%7):(be=Fi(ha(J.y,0,1)),Ne=be.getDay(),be=Ne>4||Ne===0?io.ceil(be):io(be),be=os.offset(be,(J.V-1)*7),J.y=be.getFullYear(),J.m=be.getMonth(),J.d=be.getDate()+(J.w+6)%7)}else("W"in J||"U"in J)&&("w"in J||(J.w="u"in J?J.u%7:"W"in J?1:0),Ne="Z"in J?Bi(ha(J.y,0,1)).getUTCDay():Fi(ha(J.y,0,1)).getDay(),J.m=0,J.d="W"in J?(J.w+6)%7+J.W*7-(Ne+5)%7:J.w+J.U*7-(Ne+6)%7);return"Z"in J?(J.H+=J.Z/100|0,J.M+=J.Z%100,Bi(J)):Fi(J)}}function _(X,ie,he,J){for(var Oe=0,be=ie.length,Ne=he.length,ke,_e;Oe<be;){if(J>=Ne)return-1;if(ke=ie.charCodeAt(Oe++),ke===37){if(ke=ie.charAt(Oe++),_e=E[ke in vd?ie.charAt(Oe++):ke],!_e||(J=_e(X,he,J))<0)return-1}else if(ke!=he.charCodeAt(J++))return-1}return J}function B(X,ie,he){var J=c.exec(ie.slice(he));return J?(X.p=u.get(J[0].toLowerCase()),he+J[0].length):-1}function b(X,ie,he){var J=p.exec(ie.slice(he));return J?(X.w=m.get(J[0].toLowerCase()),he+J[0].length):-1}function A(X,ie,he){var J=d.exec(ie.slice(he));return J?(X.w=h.get(J[0].toLowerCase()),he+J[0].length):-1}function z(X,ie,he){var J=S.exec(ie.slice(he));return J?(X.m=T.get(J[0].toLowerCase()),he+J[0].length):-1}function I(X,ie,he){var J=f.exec(ie.slice(he));return J?(X.m=g.get(J[0].toLowerCase()),he+J[0].length):-1}function G(X,ie,he){return _(X,t,ie,he)}function re(X,ie,he){return _(X,r,ie,he)}function te(X,ie,he){return _(X,n,ie,he)}function oe(X){return o[X.getDay()]}function Z(X){return s[X.getDay()]}function ae(X){return l[X.getMonth()]}function ge(X){return i[X.getMonth()]}function ue(X){return a[+(X.getHours()>=12)]}function De(X){return 1+~~(X.getMonth()/3)}function ct(X){return o[X.getUTCDay()]}function It(X){return s[X.getUTCDay()]}function tt(X){return l[X.getUTCMonth()]}function St(X){return i[X.getUTCMonth()]}function pt(X){return a[+(X.getUTCHours()>=12)]}function rt(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var ie=R(X+="",O);return ie.toString=function(){return X},ie},parse:function(X){var ie=P(X+="",!1);return ie.toString=function(){return X},ie},utcFormat:function(X){var ie=R(X+="",C);return ie.toString=function(){return X},ie},utcParse:function(X){var ie=P(X+="",!0);return ie.toString=function(){return X},ie}}}var vd={"-":"",_:" ",0:"0"},nt=/^\s*\d+/,QS=/^%/,XS=/[\\^$*+?|[\]().{}]/g;function we(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",s=a.length;return n+(s<r?new Array(r-s+1).join(t)+a:a)}function ZS(e){return e.replace(XS,"\\$&")}function pa(e){return new RegExp("^(?:"+e.map(ZS).join("|")+")","i")}function fa(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function e1(e,t,r){var n=nt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function t1(e,t,r){var n=nt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function r1(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function n1(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function a1(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function xd(e,t,r){var n=nt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Sd(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function s1(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 o1(e,t,r){var n=nt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function i1(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Od(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function l1(e,t,r){var n=nt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function wd(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function c1(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function u1(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function d1(e,t,r){var n=nt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function h1(e,t,r){var n=nt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function p1(e,t,r){var n=QS.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function f1(e,t,r){var n=nt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function m1(e,t,r){var n=nt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Cd(e,t){return we(e.getDate(),t,2)}function g1(e,t){return we(e.getHours(),t,2)}function y1(e,t){return we(e.getHours()%12||12,t,2)}function b1(e,t){return we(1+os.count(cr(e),e),t,3)}function _f(e,t){return we(e.getMilliseconds(),t,3)}function v1(e,t){return _f(e,t)+"000"}function x1(e,t){return we(e.getMonth()+1,t,2)}function S1(e,t){return we(e.getMinutes(),t,2)}function O1(e,t){return we(e.getSeconds(),t,2)}function w1(e){var t=e.getDay();return t===0?7:t}function C1(e,t){return we(Jo.count(cr(e)-1,e),t,2)}function If(e){var t=e.getDay();return t>=4||t===0?Nn(e):Nn.ceil(e)}function P1(e,t){return e=If(e),we(Nn.count(cr(e),e)+(cr(e).getDay()===4),t,2)}function R1(e){return e.getDay()}function T1(e,t){return we(io.count(cr(e)-1,e),t,2)}function A1(e,t){return we(e.getFullYear()%100,t,2)}function V1(e,t){return e=If(e),we(e.getFullYear()%100,t,2)}function E1(e,t){return we(e.getFullYear()%1e4,t,4)}function _1(e,t){var r=e.getDay();return e=r>=4||r===0?Nn(e):Nn.ceil(e),we(e.getFullYear()%1e4,t,4)}function I1(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+we(t/60|0,"0",2)+we(t%60,"0",2)}function Pd(e,t){return we(e.getUTCDate(),t,2)}function M1(e,t){return we(e.getUTCHours(),t,2)}function $1(e,t){return we(e.getUTCHours()%12||12,t,2)}function j1(e,t){return we(1+qo.count(ur(e),e),t,3)}function Mf(e,t){return we(e.getUTCMilliseconds(),t,3)}function k1(e,t){return Mf(e,t)+"000"}function L1(e,t){return we(e.getUTCMonth()+1,t,2)}function U1(e,t){return we(e.getUTCMinutes(),t,2)}function D1(e,t){return we(e.getUTCSeconds(),t,2)}function N1(e){var t=e.getUTCDay();return t===0?7:t}function F1(e,t){return we(Wo.count(ur(e)-1,e),t,2)}function $f(e){var t=e.getUTCDay();return t>=4||t===0?Fn(e):Fn.ceil(e)}function B1(e,t){return e=$f(e),we(Fn.count(ur(e),e)+(ur(e).getUTCDay()===4),t,2)}function z1(e){return e.getUTCDay()}function G1(e,t){return we(lo.count(ur(e)-1,e),t,2)}function H1(e,t){return we(e.getUTCFullYear()%100,t,2)}function q1(e,t){return e=$f(e),we(e.getUTCFullYear()%100,t,2)}function J1(e,t){return we(e.getUTCFullYear()%1e4,t,4)}function W1(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Fn(e):Fn.ceil(e),we(e.getUTCFullYear()%1e4,t,4)}function K1(){return"+0000"}function Rd(){return"%"}function Td(e){return+e}function Ad(e){return Math.floor(+e/1e3)}var bn,jf,kf;Y1({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 Y1(e){return bn=YS(e),jf=bn.format,bn.parse,kf=bn.utcFormat,bn.utcParse,bn}function Q1(e){return new Date(e)}function X1(e){return e instanceof Date?+e:+new Date(+e)}function jc(e,t,r,n,a,s,o,i,l,c){var u=Of(),d=u.invert,h=u.domain,p=c(".%L"),m=c(":%S"),f=c("%I:%M"),g=c("%I %p"),S=c("%a %d"),T=c("%b %d"),O=c("%B"),C=c("%Y");function E(R){return(l(R)<R?p:i(R)<R?m:o(R)<R?f:s(R)<R?g:n(R)<R?a(R)<R?S:T:r(R)<R?O:C)(R)}return u.invert=function(R){return new Date(d(R))},u.domain=function(R){return arguments.length?h(Array.from(R,X1)):h().map(Q1)},u.ticks=function(R){var P=h();return e(P[0],P[P.length-1],R??10)},u.tickFormat=function(R,P){return P==null?E:c(P)},u.nice=function(R){var P=h();return(!R||typeof R.range!="function")&&(R=t(P[0],P[P.length-1],R??10)),R?h(Rf(P,R)):u},u.copy=function(){return Ho(u,jc(e,t,r,n,a,s,o,i,l,c))},u}function Lf(){return Vr.apply(jc(WS,KS,cr,Mc,Jo,os,_c,Vc,Ur,jf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Z1(){return Vr.apply(jc(qS,JS,ur,$c,Wo,qo,Ic,Ec,Ur,kf).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function eO(){var e=0,t=1,r,n,a,s,o=At,i=!1,l;function c(d){return d==null||isNaN(d=+d)?l:o(a===0?.5:(d=(s(d)-r)*a,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),a=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?(o=d,c):o};function u(d){return function(h){var p,m;return arguments.length?([p,m]=h,o=d(p,m),c):[o(0),o(1)]}}return c.range=u(Go),c.rangeRound=u(Sf),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return s=d,r=d(e),n=d(t),a=r===n?0:1/(n-r),c}}function tO(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Uf(){var e=Rc(eO()(At));return e.copy=function(){return tO(e,Uf())},Fx.apply(e,arguments)}function rO(e,t){return function(n,a){return a.location==="tick"?a.scale.tickFormat(e)(n):a.location==="zoom-slider-tooltip"?t.tickFormat(2)(n):`${n}`}}function nO(e){return e.scaleType==="band"}function aO(e){return e.scaleType==="point"}function sO(e){return e.type==="piecewise"?Af(e.thresholds,e.colors):Uf([e.min??0,e.max??100],e.color)}function co(e){return e.values?ro(e.values,e.colors).unknown(e.unknownColor??null):ro(e.colors.map((t,r)=>r),e.colors).unknown(e.unknownColor??null)}function Gs(e){return e.type==="ordinal"?co(e):sO(e)}function oO(e){const{tickMaxStep:t,tickMinStep:r,tickNumber:n,range:a,domain:s}=e,o=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(a[1]-a[0])/50);return Math.min(o,Math.max(i,l))}function iO(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function Pl(e,t,r){switch(e){case"log":return Tf(t,r);case"pow":return Tc(t,r);case"sqrt":return LS(t,r);case"time":return Lf(t,r);case"utc":return Z1(t,r);default:return Pf(t,r)}}const Vd=e=>(e==null?void 0:e[0])instanceof Date;function Ed(e,t){const r=Lf(e.data,t);return(n,{location:a})=>a==="tick"?r.tickFormat(e.tickNumber)(n):`${n.toLocaleString()}`}const zi=(e,t)=>{const r=e[1]-e[0],n=t[1]-t[0],a=e[0]-t[0]*r/n,s=e[1]+(100-t[1])*r/n;return[a,s]};let _d,Id;class lO{constructor(){if(this.types=new Set,_d)throw new Error("You can only create one instance!");_d=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class cO{constructor(){if(this.types=new Set,Id)throw new Error("You can only create one instance!");Id=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const Ko=new lO;Ko.addType("bar");Ko.addType("line");Ko.addType("scatter");const uO=new cO;uO.addType("radar");function Df(e){return Ko.getTypes().has(e)}const dO=(e,t,r,n,a,s,o,i)=>{var m;const l=n==="x"?a[t].xExtremumGetter:a[t].yExtremumGetter,c=((m=o[t])==null?void 0:m.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)]},Nf=(e,t,r,n,a,s)=>{const i=Object.keys(r).filter(Df).reduce((l,c)=>dO(l,c,e,t,r,n,a,s),[1/0,-1/0]);return Number.isNaN(i[0])||Number.isNaN(i[1])?[1/0,-1/0]:i},hO=(e,t,r,n)=>{const a=new Set;return Object.keys(t).filter(Df).forEach(o=>{var c,u,d;const i=((c=r[o])==null?void 0:c.series)??{},l=(d=(u=t[o]).axisTooltipGetter)==null?void 0:d.call(u,i);l!==void 0&&l.forEach(({axisId:h,direction:p})=>{p===e&&a.add(h??n)})}),a},pO=(e,t,r,n)=>{var a;if(e.domainLimit!==void 0)return e.domainLimit;if(t==="x")for(const s of((a=n.line)==null?void 0:a.seriesOrder)??[]){const o=n.line.series[s];if(o.xAxisId===e.id||o.xAxisId===void 0&&r===0)return"strict"}return"nice"};function fO(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 mO=.2,gO=.1;function Ff({drawingArea:e,formattedSeries:t,axis:r,seriesConfig:n,axisDirection:a,zoomMap:s,zoomOptions:o,getFilters:i,preferStrictDomainInLineCharts:l}){if(r===void 0)return{axis:{},axisIds:[]};const c=hO(a,n,t,r[0].id),u={};return r.forEach((d,h)=>{const p=d,m=o==null?void 0:o[p.id],f=s==null?void 0:s.get(p.id),g=f?[f.start,f.end]:[0,100],S=fO(e,a,p),[T,O]=Nf(p,a,n,h,t,f===void 0&&!m?i:void 0),C=!p.ignoreTooltip&&c.has(p.id),E=p.data??[];if(nO(p)){const oe=p.categoryGapRatio??mO,Z=p.barGapRatio??gO,ae=a==="y"?[S[1],S[0]]:S,ge=zi(ae,g);if(u[p.id]=K({offset:0,height:0,categoryGapRatio:oe,barGapRatio:Z,triggerTooltip:C},p,{data:E,scale:vc(p.data,ge).paddingInner(oe).paddingOuter(oe/2),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?co(K({values:p.data},p.colorMap)):Gs(p.colorMap))}),Vd(p.data)){const ue=Ed(p,ae);u[p.id].valueFormatter=p.valueFormatter??ue}}if(aO(p)){const oe=a==="y"?[...S].reverse():S,Z=zi(oe,g);if(u[p.id]=K({offset:0,height:0,triggerTooltip:C},p,{data:E,scale:Bx(p.data,Z),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?co(K({values:p.data},p.colorMap)):Gs(p.colorMap))}),Vd(p.data)){const ae=Ed(p,oe);u[p.id].valueFormatter=p.valueFormatter??ae}}if(p.scaleType==="band"||p.scaleType==="point")return;const R=p.scaleType??"linear",P=l?pO(p,a,h,t):p.domainLimit??"nice",_=[p.min??T,p.max??O];if(typeof P=="function"){const{min:oe,max:Z}=P(T,O);_[0]=oe,_[1]=Z}const B=oO(K({},p,{range:S,domain:_})),b=iO(B,g),A=zi(S,g),z=Pl(R,_,A),I=P==="nice"?z.nice(B):z,[G,re]=I.domain(),te=[p.min??G,p.max??re];u[p.id]=K({offset:0,height:0,triggerTooltip:C},p,{data:E,scaleType:R,scale:I.domain(te),tickNumber:b,colorScale:p.colorMap&&Gs(p.colorMap),valueFormatter:p.valueFormatter??rO(b,Pl(R,S.map(oe=>z.invert(oe)),S))})}),{axis:u,axisIds:r.map(({id:d})=>d)}}function yO(e){return e!=null}function Bf({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:a}){return(s,o)=>{var g;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,(((g=s.data)==null?void 0:g.length)??1)-1]:c=Nf(s,a,r,o,n);let d,h;[d,h]=Pl(!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 m=d+l.start*(h-d)/100,f=d+l.end*(h-d)/100;return(S,T)=>{var C;const O=S[a]??((C=s.data)==null?void 0:C[T]);return O==null?!0:s.scaleType==="point"||s.scaleType==="band"||typeof O=="string"?T>=m&&T<=f:O>=m&&O<=f}}}const bO=e=>({currentAxisId:t,seriesXAxisId:r,seriesYAxisId:n,isDefaultAxis:a})=>(s,o)=>{var c,u;return!(t===r?n:r)||a?((u=(c=Object.values(e??{}))[0])==null?void 0:u.call(c,s,o))??!0:[n,r].filter(d=>d!==t).map(d=>e[d??""]).filter(yO).every(d=>d(s,o))},Md=e=>(t=[])=>t.reduce((r,n)=>{const{zoom:a,id:s}=n,o=yc(a,s,e);return o&&(r[s]=o),r},{}),vO=e=>{const t=new Map;return e.forEach(r=>{t.set(r.axisId,r)}),t},zf=e=>e.zoom;ye([zf],e=>e==null?void 0:e.isInteracting);const Yo=ye([zf],e=>(e==null?void 0:e.zoomData)&&vO(e==null?void 0:e.zoomData)),is=ye([Jn,Wn],(e,t)=>K({},Md("x")(e),Md("y")(t)));ye([is,(e,t)=>t],(e,t)=>e[t]);const xO=ye([Yo,is,zo,ns],(e,t,r,n)=>e&&t&&Bf({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"x"})),SO=ye([Yo,is,zo,ns],(e,t,r,n)=>e&&t&&Bf({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"y"})),Gf=ye([xO,SO,Jn,Wn],(e,t,r,n)=>{if(e===void 0||t===void 0)return;const a=r==null?void 0:r.reduce((o,i,l)=>{const c=e(i,l);return c!==null&&(o[i.id]=c),o},{}),s=n==null?void 0:n.reduce((o,i,l)=>{const c=t(i,l);return c!==null&&(o[i.id]=c),o},{});if(!(Object.keys(a??{}).length===0&&Object.keys(s??{}).length===0))return bO(K({},a,s))}),Qr=ye([Jn,rs,ns,zo,Yo,is,Gf,sf],(e,t,r,n,a,s,o,i)=>Ff({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"x",zoomMap:a,zoomOptions:s,getFilters:o,preferStrictDomainInLineCharts:i})),Xr=ye([Wn,rs,ns,zo,Yo,is,Gf,sf],(e,t,r,n,a,s,o,i)=>Ff({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"y",zoomMap:a,zoomOptions:s,getFilters:o,preferStrictDomainInLineCharts:i}));ye([Qr,Xr,(e,t)=>t],(e,t,r)=>(e==null?void 0:e.axis[r])??(t==null?void 0:t.axis[r]));ye([Jn,Wn,(e,t)=>t],(e,t,r)=>{const n=(e==null?void 0:e.find(a=>a.id===r))??(t==null?void 0:t.find(a=>a.id===r))??null;if(n)return n});function Hf(e){return e.bandwidth!==void 0}function vn(e){return e instanceof Date?e.getTime():e}function Bn(e,t){const{scale:r,data:n,reverse:a}=e;if(!Hf(r)){const o=r.invert(t);if(n===void 0)return-1;const i=vn(o);return n==null?void 0:n.findIndex((c,u)=>{const d=vn(c);return d>i&&(u===0||Math.abs(i-d)<=Math.abs(i-vn(n[u-1])))||d<=i&&(u===n.length-1||Math.abs(vn(o)-d)<Math.abs(vn(o)-vn(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:a?n.length-1-s:s}function $d(e,t,r){const{scale:n,data:a}=e;if(!Hf(n)){const s=n.invert(t);return r<0?s:a[r]}return r<0||r>=a.length?null:a[r]}function jd(e,t){const r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r.matrixTransform(e.getScreenCTM().inverse())}function En(e){const t=F.useRef(e);return or(()=>{t.current=e}),F.useRef((...r)=>(0,t.current)(...r)).current}const OO=Object.is;function qf(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let r=0,n=0;for(const a in e)if(r+=1,!OO(e[a],t[a])||!(a in t))return!1;for(const a in t)n+=1;return r===n}const kc=({store:e})=>{const t=En(function(){e.update(o=>K({},o,{interaction:{pointer:null,item:null}}))}),r=En(function(o){e.update(i=>{const l=i.interaction.item;return o?l===null||Object.keys(o).some(c=>o[c]!==l[c])?i:K({},i,{interaction:K({},i.interaction,{item:null})}):l===null?i:K({},i,{interaction:K({},i.interaction,{item:null})})})}),n=En(function(o){e.update(i=>qf(i.interaction.item,o)?i:K({},i,{interaction:K({},i.interaction,{item:o})}))}),a=En(function(o){e.update(i=>K({},i,{interaction:K({},i.interaction,{pointer:o})}))});return{instance:{cleanInteraction:t,setItemInteraction:n,removeItemInteraction:r,setPointerCoordinate:a}}};kc.getInitialState=()=>({interaction:{item:null,pointer:null}});kc.params={};const Lc=e=>e.interaction,wO=ye([Lc],e=>e!==void 0),CO=ye([Lc],e=>(e==null?void 0:e.item)??null),Jf=ye([Lc],e=>(e==null?void 0:e.pointer)??null),Qo=ye([Jf],e=>e&&e.x),Xo=ye([Jf],e=>e&&e.y);ye([CO],e=>e!==null);function Ia(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 a=e.length;if(a!==t.length)return!1;for(let s=0;s<a;s+=1)if(!Ia(e[s],t[s]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const a=Array.from(e.entries());for(let s=0;s<a.length;s+=1)if(!t.has(a[s][0]))return!1;for(let s=0;s<a.length;s+=1){const o=a[s];if(!Ia(o[1],t.get(o[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const a=Array.from(e.entries());for(let s=0;s<a.length;s+=1)if(!t.has(a[s][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const a=e.length;if(a!==t.length)return!1;for(let s=0;s<a;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 a=0;a<n;a+=1)if(!Object.prototype.hasOwnProperty.call(t,r[a]))return!1;for(let a=0;a<n;a+=1){const s=r[a];if(!Ia(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}const Zo=(e,t)=>t;function Rl(e,t,r=t.axisIds[0]){return Array.isArray(r)?r.map(n=>Bn(t.axis[n],e)):Bn(t.axis[r],e)}const Wf=(e,t,r)=>{if(e===null)return null;const n=Rl(e,t,r);return n===-1?null:n},PO=ye([Qo,Qr,Zo],Wf),RO=ye([Xo,Xr,Zo],Wf),TO=ye([Qo,Xo,Qr,Xr],(e,t,r,n)=>[...e===null?[]:r.axisIds.map(a=>({axisId:a,dataIndex:Rl(e,r,a)})),...t===null?[]:n.axisIds.map(a=>({axisId:a,dataIndex:Rl(t,n,a)}))].filter(a=>a.dataIndex!==null&&a.dataIndex>=0));function Kf(e,t,r,n=t.axisIds[0]){return Array.isArray(n)?n.map((a,s)=>$d(t.axis[a],e,r[s])):$d(t.axis[n],e,r)}ye([Qo,Qr,PO,Zo],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:Kf(e,t,r,n));ye([Xo,Xr,RO,Zo],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:Kf(e,t,r,n));const AO=ye([Qo,Qr],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:Bn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:Ia}}),VO=ye([Xo,Xr],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:Bn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:Ia}});ye([AO,VO],(e,t)=>e.length>0||t.length>0);const kd={};function EO(e,t){const r=F.useRef(kd);return r.current===kd&&(r.current=e(t)),r}const _O=()=>{};function IO(e,t,r,n){const a=EO(MO,{store:e,selector:t,skip:n}).current;a.effect=r,F.useEffect(a.onMount(n),[n])}function MO(e){const{store:t,selector:r,skip:n}=e;let a=!1,s;const o=()=>{i.dispose??(i.dispose=t.subscribe(l=>{const c=r(l);i.effect(s,c),s=c}))},i={effect:_O,dispose:null,onMount:l=>()=>{if(!l)return a||(a=!0,s=r(t.value)),o(),()=>{var c;(c=i.dispose)==null||c.call(i),i.dispose=null}}};return n||(a=!0,s=r(t.value),o()),i}const ei=({params:e,store:t,seriesConfig:r,svgRef:n,instance:a})=>{const{xAxis:s,yAxis:o,dataset:i,onHighlightedAxisChange:l}=e;if(process.env.NODE_ENV!=="production"){const O=[...s??[],...o??[]].filter(E=>E.id).map(E=>E.id),C=new Set(O.filter((E,R)=>O.indexOf(E)!==R));C.size>0&&Da([`MUI X Charts: The following axis ids are duplicated: ${Array.from(C).join(", ")}.`,"Please make sure that each axis has a unique id."].join(`
|
|
127
|
+
`),"error")}const c=bt(t,rs),u=bt(t,ns),d=bt(t,wO),{axis:h,axisIds:p}=bt(t,Qr),{axis:m,axisIds:f}=bt(t,Xr);df({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedAxis",controlled:e.highlightedAxis,defaultValue:void 0}),or(()=>{e.highlightedAxis!==void 0&&t.update(O=>O.controlledCartesianAxisHighlight===e.highlightedAxis?O:K({},O,{controlledCartesianAxisHighlight:e.highlightedAxis}))},[t,e.highlightedAxis]);const g=F.useRef(!0);F.useEffect(()=>{if(g.current){g.current=!1;return}t.update(O=>K({},O,{cartesianAxis:K({},O.cartesianAxis,{x:ff(s,i),y:mf(o,i)})}))},[r,c,s,o,i,t]);const S=p[0],T=f[0];return IO(t,TO,(O,C)=>{if(!Object.is(O,C)){if(O.length!==C.length){l(C);return}O!=null&&O.some(({axisId:E,dataIndex:R},P)=>C[P].axisId!==E||C[P].dataIndex!==R)&&l(C)}},!l),F.useEffect(()=>{const O=n.current;if(!d||!O||e.disableAxisListener)return()=>{};const C=a.addInteractionListener("moveEnd",A=>{var z;A.detail.activeGestures.pan||(z=a.cleanInteraction)==null||z.call(a)}),E=a.addInteractionListener("panEnd",A=>{var z;A.detail.activeGestures.move||(z=a.cleanInteraction)==null||z.call(a)}),R=a.addInteractionListener("quickPressEnd",A=>{var z;!A.detail.activeGestures.move&&!A.detail.activeGestures.pan&&((z=a.cleanInteraction)==null||z.call(a))}),P=A=>{var re,te;const z=A.detail.srcEvent,I=A.detail.target,G=jd(O,z);if(A.detail.srcEvent.buttons>=1&&(I!=null&&I.hasPointerCapture(A.detail.srcEvent.pointerId))&&!(I!=null&&I.closest("[data-charts-zoom-slider]"))&&(I==null||I.releasePointerCapture(A.detail.srcEvent.pointerId)),!a.isPointInside(G.x,G.y,I)){(re=a.cleanInteraction)==null||re.call(a);return}(te=a.setPointerCoordinate)==null||te.call(a,G)},_=a.addInteractionListener("move",P),B=a.addInteractionListener("pan",P),b=a.addInteractionListener("quickPress",P);return()=>{_.cleanup(),C.cleanup(),B.cleanup(),E.cleanup(),b.cleanup(),R.cleanup()}},[n,t,h,S,m,T,a,e.disableAxisListener,d]),F.useEffect(()=>{const O=n.current,C=e.onAxisClick;if(O===null||!C)return()=>{};const E=a.addInteractionListener("tap",R=>{let P=null,_=!1;const B=jd(O,R.detail.srcEvent),b=Bn(h[S],B.x);_=b!==-1,P=_?b:Bn(m[T],B.y);const A=_?p[0]:f[0];if(P==null||P===-1)return;const z=(_?h:m)[A].data[P],I={};Object.keys(u).filter(G=>["bar","line"].includes(G)).forEach(G=>{var re;(re=u[G])==null||re.seriesOrder.forEach(te=>{const oe=u[G].series[te],Z=oe.xAxisId,ae=oe.yAxisId,ge=_?Z:ae;(ge===void 0||ge===A)&&(I[te]=oe.data[P])})}),C(R.detail.srcEvent,{dataIndex:P,axisValue:z,seriesValues:I})});return()=>{E.cleanup()}},[e.onAxisClick,u,n,h,p,m,f,S,T,a]),{}};ei.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0};ei.getDefaultizedParams=({params:e})=>K({},e,{colors:e.colors??of,theme:e.theme??"light",defaultizedXAxis:ff(e.xAxis,e.dataset),defaultizedYAxis:mf(e.yAxis,e.dataset)});ei.getInitialState=e=>K({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});function Ld(e,t){return e.id!==void 0?e:K({id:t},e)}function Ud(e){return e.colorMap?K({},e,{colorScale:e.colorMap.type==="ordinal"&&e.data?co(K({values:e.data},e.colorMap)):Gs(e.colorMap.type==="continuous"?K({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function Yf(e,t){if(!e||e.length===0)return{axis:{},axisIds:[]};const r={},n=[];return e.forEach((a,s)=>{const o=a.dataKey,i=a.id??`defaultized-z-axis-${s}`;if(o===void 0||a.data!==void 0){r[i]=Ud(Ld(a,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]=Ud(Ld(K({},a,{data:t.map(l=>l[o])}),i)),n.push(i)}),{axis:r,axisIds:n}}const Uc=({params:e,store:t})=>{const{zAxis:r,dataset:n}=e,a=F.useRef(!0);return F.useEffect(()=>{if(a.current){a.current=!1;return}t.update(s=>K({},s,{zAxis:Yf(r,n)}))},[r,n,t]),{}};Uc.params={zAxis:!0,dataset:!0};Uc.getInitialState=e=>({zAxis:Yf(e.zAxis,e.dataset)});const $O=e=>e,jO=ye([$O],e=>e.zAxis),ti=({store:e,params:t})=>{df({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedItem",controlled:t.highlightedItem,defaultValue:null}),or(()=>{e.update(a=>a.highlight.item===t.highlightedItem?a:K({},a,{highlight:K({},a.highlight,{item:t.highlightedItem})}))},[e,t.highlightedItem]);const r=En(()=>{var a;(a=t.onHighlightChange)==null||a.call(t,null),e.update(s=>K({},s,{highlight:{item:null}}))}),n=En(a=>{var o;const s=e.getSnapshot().highlight.item;qf(s,a)||((o=t.onHighlightChange)==null||o.call(t,a),e.update(i=>K({},i,{highlight:{item:a}})))});return{instance:{clearHighlight:r,setHighlight:n}}};ti.getDefaultizedParams=({params:e})=>K({},e,{highlightedItem:e.highlightedItem??null});ti.getInitialState=e=>({highlight:{item:e.highlightedItem}});ti.params={highlightedItem:!0,onHighlightChange:!0};const Dd=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},Qf=e=>{var l;const{axis:t,getFilters:r,isDefaultAxis:n}=e,a=r==null?void 0:r({currentAxisId:t.id,isDefaultAxis:n}),s=a?(l=t.data)==null?void 0:l.filter((c,u)=>a({x:null,y:null},u)):t.data,o=Math.min(...s??[]),i=Math.max(...s??[]);return[o,i]},Xf=e=>t=>{const{series:r,axis:n,getFilters:a,isDefaultAxis:s}=t;return Object.keys(r).filter(o=>{const i=e==="x"?r[o].xAxisId:r[o].yAxisId;return i===n.id||s&&i===void 0}).reduce((o,i)=>{const{stackedData:l}=r[i],c=a==null?void 0:a({currentAxisId:n.id,isDefaultAxis:s,seriesXAxisId:r[i].xAxisId,seriesYAxisId:r[i].yAxisId}),[u,d]=(l==null?void 0:l.reduce((h,p,m)=>c&&(!c(Dd(p[0],e),m)||!c(Dd(p[1],e),m))?h:[Math.min(...p,h[0]),Math.max(...p,h[1])],[1/0,-1/0]))??[1/0,-1/0];return[Math.min(u,o[0]),Math.max(d,o[1])]},[1/0,-1/0])},kO=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?Xf("x")(e):Qf(e),LO=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?Qf(e):Xf("y")(e);function Ze(e){return function(){return e}}const Nd=Math.abs,ot=Math.atan2,Mr=Math.cos,UO=Math.max,Gi=Math.min,Ht=Math.sin,_n=Math.sqrt,yt=1e-12,Ga=Math.PI,uo=Ga/2,Hs=2*Ga;function DO(e){return e>1?0:e<-1?Ga:Math.acos(e)}function Fd(e){return e>=1?uo:e<=-1?-uo:Math.asin(e)}const Tl=Math.PI,Al=2*Tl,jr=1e-6,NO=Al-jr;function Zf(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function FO(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Zf;const r=10**t;return function(n){this._+=n[0];for(let a=1,s=n.length;a<s;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class BO{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Zf:FO(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,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,s,o){this._append`C${+t},${+r},${+n},${+a},${this._x1=+s},${this._y1=+o}`}arcTo(t,r,n,a,s){if(t=+t,r=+r,n=+n,a=+a,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,i=this._y1,l=n-t,c=a-r,u=o-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>jr)if(!(Math.abs(d*l-c*u)>jr)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,m=a-i,f=l*l+c*c,g=p*p+m*m,S=Math.sqrt(f),T=Math.sqrt(h),O=s*Math.tan((Tl-Math.acos((f+h-g)/(2*S*T)))/2),C=O/T,E=O/S;Math.abs(C-1)>jr&&this._append`L${t+C*u},${r+C*d}`,this._append`A${s},${s},0,0,${+(d*p>u*m)},${this._x1=t+E*l},${this._y1=r+E*c}`}}arc(t,r,n,a,s,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let i=n*Math.cos(a),l=n*Math.sin(a),c=t+i,u=r+l,d=1^o,h=o?a-s:s-a;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>jr||Math.abs(this._y1-u)>jr)&&this._append`L${c},${u}`,n&&(h<0&&(h=h%Al+Al),h>NO?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>jr&&this._append`A${n},${n},0,${+(h>=Tl)},${d},${this._x1=t+n*Math.cos(s)},${this._y1=r+n*Math.sin(s)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function zO(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 BO(t)}function GO(e){return e.innerRadius}function HO(e){return e.outerRadius}function qO(e){return e.startAngle}function JO(e){return e.endAngle}function WO(e){return e&&e.padAngle}function KO(e,t,r,n,a,s,o,i){var l=r-e,c=n-t,u=o-a,d=i-s,h=d*l-u*c;if(!(h*h<yt))return h=(u*(t-s)-d*(e-a))/h,[e+h*l,t+h*c]}function ws(e,t,r,n,a,s,o){var i=e-r,l=t-n,c=(o?s:-s)/_n(i*i+l*l),u=c*l,d=-c*i,h=e+u,p=t+d,m=r+u,f=n+d,g=(h+m)/2,S=(p+f)/2,T=m-h,O=f-p,C=T*T+O*O,E=a-s,R=h*f-m*p,P=(O<0?-1:1)*_n(UO(0,E*E*C-R*R)),_=(R*O-T*P)/C,B=(-R*T-O*P)/C,b=(R*O+T*P)/C,A=(-R*T+O*P)/C,z=_-g,I=B-S,G=b-g,re=A-S;return z*z+I*I>G*G+re*re&&(_=b,B=A),{cx:_,cy:B,x01:-u,y01:-d,x11:_*(a/E-1),y11:B*(a/E-1)}}function em(){var e=GO,t=HO,r=Ze(0),n=null,a=qO,s=JO,o=WO,i=null,l=zO(c);function c(){var u,d,h=+e.apply(this,arguments),p=+t.apply(this,arguments),m=a.apply(this,arguments)-uo,f=s.apply(this,arguments)-uo,g=Nd(f-m),S=f>m;if(i||(i=u=l()),p<h&&(d=p,p=h,h=d),!(p>yt))i.moveTo(0,0);else if(g>Hs-yt)i.moveTo(p*Mr(m),p*Ht(m)),i.arc(0,0,p,m,f,!S),h>yt&&(i.moveTo(h*Mr(f),h*Ht(f)),i.arc(0,0,h,f,m,S));else{var T=m,O=f,C=m,E=f,R=g,P=g,_=o.apply(this,arguments)/2,B=_>yt&&(n?+n.apply(this,arguments):_n(h*h+p*p)),b=Gi(Nd(p-h)/2,+r.apply(this,arguments)),A=b,z=b,I,G;if(B>yt){var re=Fd(B/h*Ht(_)),te=Fd(B/p*Ht(_));(R-=re*2)>yt?(re*=S?1:-1,C+=re,E-=re):(R=0,C=E=(m+f)/2),(P-=te*2)>yt?(te*=S?1:-1,T+=te,O-=te):(P=0,T=O=(m+f)/2)}var oe=p*Mr(T),Z=p*Ht(T),ae=h*Mr(E),ge=h*Ht(E);if(b>yt){var ue=p*Mr(O),De=p*Ht(O),ct=h*Mr(C),It=h*Ht(C),tt;if(g<Ga)if(tt=KO(oe,Z,ct,It,ue,De,ae,ge)){var St=oe-tt[0],pt=Z-tt[1],rt=ue-tt[0],X=De-tt[1],ie=1/Ht(DO((St*rt+pt*X)/(_n(St*St+pt*pt)*_n(rt*rt+X*X)))/2),he=_n(tt[0]*tt[0]+tt[1]*tt[1]);A=Gi(b,(h-he)/(ie-1)),z=Gi(b,(p-he)/(ie+1))}else A=z=0}P>yt?z>yt?(I=ws(ct,It,oe,Z,p,z,S),G=ws(ue,De,ae,ge,p,z,S),i.moveTo(I.cx+I.x01,I.cy+I.y01),z<b?i.arc(I.cx,I.cy,z,ot(I.y01,I.x01),ot(G.y01,G.x01),!S):(i.arc(I.cx,I.cy,z,ot(I.y01,I.x01),ot(I.y11,I.x11),!S),i.arc(0,0,p,ot(I.cy+I.y11,I.cx+I.x11),ot(G.cy+G.y11,G.cx+G.x11),!S),i.arc(G.cx,G.cy,z,ot(G.y11,G.x11),ot(G.y01,G.x01),!S))):(i.moveTo(oe,Z),i.arc(0,0,p,T,O,!S)):i.moveTo(oe,Z),!(h>yt)||!(R>yt)?i.lineTo(ae,ge):A>yt?(I=ws(ae,ge,ue,De,h,-A,S),G=ws(oe,Z,ct,It,h,-A,S),i.lineTo(I.cx+I.x01,I.cy+I.y01),A<b?i.arc(I.cx,I.cy,A,ot(I.y01,I.x01),ot(G.y01,G.x01),!S):(i.arc(I.cx,I.cy,A,ot(I.y01,I.x01),ot(I.y11,I.x11),!S),i.arc(0,0,h,ot(I.cy+I.y11,I.cx+I.x11),ot(G.cy+G.y11,G.cx+G.x11),S),i.arc(G.cx,G.cy,A,ot(G.y11,G.x11),ot(G.y01,G.x01),!S))):i.arc(0,0,h,E,C,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=(+a.apply(this,arguments)+ +s.apply(this,arguments))/2-Ga/2;return[Mr(d)*u,Ht(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Ze(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Ze(+u),c):t},c.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:Ze(+u),c):r},c.padRadius=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:Ze(+u),c):n},c.startAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Ze(+u),c):a},c.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Ze(+u),c):s},c.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Ze(+u),c):o},c.context=function(u){return arguments.length?(i=u??null,c):i},c}function tm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function YO(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function QO(e){return e}function XO(){var e=QO,t=YO,r=null,n=Ze(0),a=Ze(Hs),s=Ze(0);function o(i){var l,c=(i=tm(i)).length,u,d,h=0,p=new Array(c),m=new Array(c),f=+n.apply(this,arguments),g=Math.min(Hs,Math.max(-Hs,a.apply(this,arguments)-f)),S,T=Math.min(Math.abs(g)/c,s.apply(this,arguments)),O=T*(g<0?-1:1),C;for(l=0;l<c;++l)(C=m[p[l]=l]=+e(i[l],l,i))>0&&(h+=C);for(t!=null?p.sort(function(E,R){return t(m[E],m[R])}):r!=null&&p.sort(function(E,R){return r(i[E],i[R])}),l=0,d=h?(g-c*O)/h:0;l<c;++l,f=S)u=p[l],C=m[u],S=f+(C>0?C*d:0)+O,m[u]={data:i[u],index:l,value:C,startAngle:f,endAngle:S,padAngle:T};return m}return o.value=function(i){return arguments.length?(e=typeof i=="function"?i:Ze(+i),o):e},o.sortValues=function(i){return arguments.length?(t=i,r=null,o):t},o.sort=function(i){return arguments.length?(r=i,t=null,o):r},o.startAngle=function(i){return arguments.length?(n=typeof i=="function"?i:Ze(+i),o):n},o.endAngle=function(i){return arguments.length?(a=typeof i=="function"?i:Ze(+i),o):a},o.padAngle=function(i){return arguments.length?(s=typeof i=="function"?i:Ze(+i),o):s},o}function zn(e,t){if((o=e.length)>1)for(var r=1,n,a,s=e[t[0]],o,i=s.length;r<o;++r)for(a=s,s=e[t[r]],n=0;n<i;++n)s[n][1]+=s[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function Gn(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function ZO(e,t){return e[t]}function ew(e){const t=[];return t.key=e,t}function rm(){var e=Ze([]),t=Gn,r=zn,n=ZO;function a(s){var o=Array.from(e.apply(this,arguments),ew),i,l=o.length,c=-1,u;for(const d of s)for(i=0,++c;i<l;++i)(o[i][c]=[0,+n(d,o[i].key,c,s)]).data=d;for(i=0,u=tm(t(o));i<l;++i)o[u[i]].index=i;return r(o,u),o}return a.keys=function(s){return arguments.length?(e=typeof s=="function"?s:Ze(Array.from(s)),a):e},a.value=function(s){return arguments.length?(n=typeof s=="function"?s:Ze(+s),a):n},a.order=function(s){return arguments.length?(t=s==null?Gn:typeof s=="function"?s:Ze(Array.from(s)),a):t},a.offset=function(s){return arguments.length?(r=s??zn,a):r},a}function tw(e,t){if((n=e.length)>0){for(var r,n,a=0,s=e[0].length,o;a<s;++a){for(o=r=0;r<n;++r)o+=e[r][a][1]||0;if(o)for(r=0;r<n;++r)e[r][a][1]/=o}zn(e,t)}}function rw(e,t){if((l=e.length)>0)for(var r,n=0,a,s,o,i,l,c=e[t[0]].length;n<c;++n)for(o=i=0,r=0;r<l;++r)(s=(a=e[t[r]][n])[1]-a[0])>0?(a[0]=o,a[1]=o+=s):s<0?(a[1]=i,a[0]=i+=s):(a[0]=0,a[1]=s)}function nw(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,s=n.length;r<s;++r){for(var o=0,i=0;o<a;++o)i+=e[o][r][1]||0;n[r][1]+=n[r][0]=-i/2}zn(e,t)}}function aw(e,t){if(!(!((o=e.length)>0)||!((s=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,s,o;n<s;++n){for(var i=0,l=0,c=0;i<o;++i){for(var u=e[t[i]],d=u[n][1]||0,h=u[n-1][1]||0,p=(d-h)/2,m=0;m<i;++m){var f=e[t[m]],g=f[n][1]||0,S=f[n-1][1]||0;p+=g-S}l+=d,c+=p*d}a[n-1][1]+=a[n-1][0]=r,l&&(r-=c/l)}a[n-1][1]+=a[n-1][0]=r,zn(e,t)}}function nm(e){var t=e.map(sw);return Gn(e).sort(function(r,n){return t[r]-t[n]})}function sw(e){for(var t=-1,r=0,n=e.length,a,s=-1/0;++t<n;)(a=+e[t][1])>s&&(s=a,r=t);return r}function am(e){var t=e.map(sm);return Gn(e).sort(function(r,n){return t[r]-t[n]})}function sm(e){for(var t=0,r=-1,n=e.length,a;++r<n;)(a=+e[r][1])&&(t+=a);return t}function ow(e){return am(e).reverse()}function iw(e){var t=e.length,r,n,a=e.map(sm),s=nm(e),o=0,i=0,l=[],c=[];for(r=0;r<t;++r)n=s[r],o<i?(o+=a[n],l.push(n)):(i+=a[n],c.push(n));return c.reverse().concat(l)}function lw(e){return Gn(e).reverse()}const Hi={appearance:nm,ascending:am,descending:ow,insideOut:iw,none:Gn,reverse:lw},qi={expand:tw,diverging:rw,none:zn,silhouette:nw,wiggle:aw},om=e=>{const{series:t,seriesOrder:r,defaultStrategy:n}=e,a=[],s={};return r.forEach(o=>{const{stack:i,stackOrder:l,stackOffset:c}=t[o];i===void 0?a.push({ids:[o],stackingOrder:Hi.none,stackingOffset:qi.none}):s[i]===void 0?(s[i]=a.length,a.push({ids:[o],stackingOrder:Hi[l??(n==null?void 0:n.stackOrder)??"none"],stackingOffset:qi[c??(n==null?void 0:n.stackOffset)??"diverging"]})):(a[s[i]].ids.push(o),l!==void 0&&(a[s[i]].stackingOrder=Hi[l]),c!==void 0&&(a[s[i]].stackingOffset=qi[c]))}),a},cw=e=>e==null?"":e.toLocaleString(),uw=(e,t)=>{const{seriesOrder:r,series:n}=e,a=om(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(`
|
|
128
128
|
`))});const o={};return a.forEach(i=>{const{ids:l,stackingOffset:c,stackingOrder:u}=i,d=rm().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 m=n[h].dataKey;o[h]=K({layout:"vertical",labelMarkType:"square",minBarSize:0,valueFormatter:n[h].valueFormatter??cw},n[h],{data:m?t.map(f=>{const g=f[m];return typeof g!="number"?(process.env.NODE_ENV!=="production"&&g!==null&&Da([`MUI X Charts: your dataset key "${m}" is used for plotting bars, but contains nonnumerical elements.`,"Bar plots only support numbers and null values."]),null):g}):n[h].data,stackedData:d[p].map(([f,g])=>[f,g])})})}),{seriesOrder:r,stackingGroups:a,series:o}};function dr(e,t){return typeof e=="function"?e(t):e}const dw=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>{const s=dr(r[a].label,"legend");return s===void 0||n.push({markType:r[a].labelMarkType,id:a,seriesId:a,color:r[a].color,label:s}),n},[])},hw=(e,t,r)=>{const n=e.layout==="vertical",a=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,o=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}:a&&o?i=>{if(i===void 0)return e.color;const l=o[i],c=l===null?e.color:a(l);return c===null?e.color:c}:()=>e.color},pw=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=dr(t.label,"tooltip"),s=t.data[n.dataIndex];if(s==null)return null;const o=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:a,value:s,formattedValue:o,markType:t.labelMarkType}},fw=e=>Object.values(e).map(t=>t.layout==="horizontal"?{direction:"y",axisId:t.yAxisId}:{direction:"x",axisId:t.xAxisId}),mw=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),gw={seriesProcessor:uw,colorProcessor:hw,legendGetter:dw,tooltipGetter:pw,axisTooltipGetter:fw,xExtremumGetter:kO,yExtremumGetter:LO,getSeriesWithDefaultValues:mw},ho=(e,t)=>[t[0]===null?e[0]:Math.min(e[0],t[0]),t[1]===null?e[1]:Math.max(e[1],t[1])],yw=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:a}=e;return Object.keys(t).filter(s=>{const o=t[s].xAxisId;return o===r.id||o===void 0&&n}).reduce((s,o)=>{var c;const i=a==null?void 0:a({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[o].xAxisId,seriesYAxisId:t[o].yAxisId}),l=(c=t[o].data)==null?void 0:c.reduce((u,d,h)=>i&&!i(d,h)?u:ho(u,[d.x,d.x]),[1/0,-1/0]);return ho(s,l??[1/0,-1/0])},[1/0,-1/0])},bw=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:a}=e;return Object.keys(t).filter(s=>{const o=t[s].yAxisId;return o===r.id||o===void 0&&n}).reduce((s,o)=>{var c;const i=a==null?void 0:a({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[o].xAxisId,seriesYAxisId:t[o].yAxisId}),l=(c=t[o].data)==null?void 0:c.reduce((u,d,h)=>i&&!i(d,h)?u:ho(u,[d.y,d.y]),[1/0,-1/0]);return ho(s,l??[1/0,-1/0])},[1/0,-1/0])},vw=({series:e,seriesOrder:t},r)=>({series:Object.fromEntries(Object.entries(e).map(([a,s])=>{const o=s==null?void 0:s.datasetKeys,i=["x","y","id"].filter(c=>typeof(o==null?void 0:o[c])!="string");if(s!=null&&s.datasetKeys&&i.length>0)throw new Error([`MUI X Charts: scatter series with id='${a}' has incomplete datasetKeys.`,`Properties ${i.map(c=>`"${c}"`).join(", ")} are missing.`].join(`
|
|
129
|
-
`));const l=o?(r==null?void 0:r.map(c=>({x:c[o.x]??null,y:c[o.y]??null,z:o.z&&c[o.z],id:o.id&&c[o.id]})))??[]:s.data??[];return[a,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}),
|
|
130
|
-
`))});const o={};return a.forEach(i=>{const{ids:l,stackingOrder:c,stackingOffset:u}=i,d=rm().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 m=n[h].dataKey;o[h]=K({labelMarkType:"line"},n[h],{data:m?t.map(f=>{const g=f[m];return typeof g!="number"?(process.env.NODE_ENV!=="production"&&g!==null&&Da([`MUI X Charts: Your dataset key "${m}" is used for plotting line, but contains nonnumerical elements.`,"Line plots only support numbers and null values."]),null):g}):n[h].data,stackedData:d[p].map(([f,g])=>[f,g])})})}),{seriesOrder:r,stackingGroups:a,series:Aw(o,i=>i==null?"":i.toLocaleString())}},Ew=(e,t,r)=>{const n=r==null?void 0:r.colorScale,a=t==null?void 0:t.colorScale;return n?s=>{if(s===void 0)return e.color;const o=e.data[s],i=o===null?e.color:n(o);return i===null?e.color:i}:a?s=>{var l;if(s===void 0)return e.color;const o=(l=t.data)==null?void 0:l[s],i=o===null?e.color:a(o);return i===null?e.color:i}:()=>e.color},_w=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>{const s=dr(r[a].label,"legend");return s===void 0||n.push({markType:r[a].labelMarkType,id:a,seriesId:a,color:r[a].color,label:s}),n},[])},Iw=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=dr(t.label,"tooltip"),s=t.data[n.dataIndex],o=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:a,value:s,formattedValue:o,markType:t.labelMarkType}},Mw=e=>Object.values(e).map(t=>({direction:"x",axisId:t.xAxisId})),$w=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),jw={colorProcessor:Ew,seriesProcessor:Vw,legendGetter:_w,tooltipGetter:Iw,axisTooltipGetter:Mw,xExtremumGetter:Pw,yExtremumGetter:Tw,getSeriesWithDefaultValues:$w},kw=(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}},Lw=e=>{const{seriesOrder:t,series:r}=e,n={};return t.forEach(a=>{const s=XO().startAngle(2*Math.PI*(r[a].startAngle??0)/360).endAngle(2*Math.PI*(r[a].endAngle??360)/360).padAngle(2*Math.PI*(r[a].paddingAngle??0)/360).sortValues(kw(r[a].sortingValues??"none"))(r[a].data.map(o=>o.value));n[a]=K({labelMarkType:"circle",valueFormatter:o=>o.value.toLocaleString()},r[a],{data:r[a].data.map((o,i)=>K({},o,{id:o.id??`auto-generated-pie-id-${a}-${i}`},s[i])).map((o,i)=>{var l,c;return K({labelMarkType:"circle"},o,{formattedValue:((c=(l=r[a]).valueFormatter)==null?void 0:c.call(l,K({},o,{label:dr(o.label,"arc")}),{dataIndex:i}))??o.value.toLocaleString()})})})}),{seriesOrder:t,series:n}},Uw=e=>t=>e.data[t].color,Dw=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>(r[a].data.forEach((s,o)=>{const i=dr(s.label,"legend");i!==void 0&&n.push({markType:s.labelMarkType??r[a].labelMarkType,id:s.id??o,seriesId:a,color:s.color,label:i,itemId:s.id??o})}),n),[])},Nw=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=t.data[n.dataIndex];if(a==null)return null;const s=dr(a.label,"tooltip"),o=K({},a,{label:s}),i=t.valueFormatter(o,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:s,value:o,formattedValue:i,markType:a.labelMarkType??t.labelMarkType}},Fw=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`},e,{data:e.data.map((n,a)=>K({color:r[a%r.length]},n))}),Bw={colorProcessor:Uw,seriesProcessor:Lw,legendGetter:Dw,tooltipGetter:Nw,getSeriesWithDefaultValues:Fw},zw={bar:gw,scatter:Cw,line:jw,pie:Bw},Gw=[
|
|
129
|
+
`));const l=o?(r==null?void 0:r.map(c=>({x:c[o.x]??null,y:c[o.y]??null,z:o.z&&c[o.z],id:o.id&&c[o.id]})))??[]:s.data??[];return[a,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}),xw=(e,t,r,n)=>{const a=n==null?void 0:n.colorScale,s=r==null?void 0:r.colorScale,o=t==null?void 0:t.colorScale;return a?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=a((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:a(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}:o?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:o(l.x);return c===null?e.color:c}:()=>e.color},Sw=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>{const s=dr(r[a].label,"legend");return s===void 0||n.push({markType:r[a].labelMarkType,id:a,seriesId:a,color:r[a].color,label:s}),n},[])},Ow=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=dr(t.label,"tooltip"),s=t.data[n.dataIndex],o=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:a,value:s,formattedValue:o,markType:t.labelMarkType}},ww=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),Cw={seriesProcessor:vw,colorProcessor:xw,legendGetter:Sw,tooltipGetter:Ow,xExtremumGetter:yw,yExtremumGetter:bw,getSeriesWithDefaultValues:ww},Pw=e=>{const{axis:t}=e,r=Math.min(...t.data??[]),n=Math.max(...t.data??[]);return[r,n]};function Rw(e,t,r,n){return r.reduce((a,s,o)=>{if(t[o]===null)return a;const[i,l]=e(s);return n&&(!n({y:i,x:null},o)||!n({y:l,x:null},o))?a:[Math.min(i,l,a[0]),Math.max(i,l,a[1])]},[1/0,-1/0])}const Tw=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:a}=e;return Object.keys(t).filter(s=>{const o=t[s].yAxisId;return o===r.id||n&&o===void 0}).reduce((s,o)=>{const{area:i,stackedData:l,data:c}=t[o],u=i!==void 0,d=a==null?void 0:a({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[o].xAxisId,seriesYAxisId:t[o].yAxisId}),h=u&&r.scaleType!=="log"&&typeof t[o].baseline!="string"?g=>g:g=>[g[1],g[1]],p=Rw(h,c,l,d),[m,f]=p;return[Math.min(m,s[0]),Math.max(f,s[1])]},[1/0,-1/0])};function Aw(e,t){const r={};return Object.keys(e).forEach(n=>{r[n]=K({},e[n],{valueFormatter:e[n].valueFormatter??t})}),r}const Vw=(e,t)=>{const{seriesOrder:r,series:n}=e,a=om(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(`
|
|
130
|
+
`))});const o={};return a.forEach(i=>{const{ids:l,stackingOrder:c,stackingOffset:u}=i,d=rm().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 m=n[h].dataKey;o[h]=K({labelMarkType:"line"},n[h],{data:m?t.map(f=>{const g=f[m];return typeof g!="number"?(process.env.NODE_ENV!=="production"&&g!==null&&Da([`MUI X Charts: Your dataset key "${m}" is used for plotting line, but contains nonnumerical elements.`,"Line plots only support numbers and null values."]),null):g}):n[h].data,stackedData:d[p].map(([f,g])=>[f,g])})})}),{seriesOrder:r,stackingGroups:a,series:Aw(o,i=>i==null?"":i.toLocaleString())}},Ew=(e,t,r)=>{const n=r==null?void 0:r.colorScale,a=t==null?void 0:t.colorScale;return n?s=>{if(s===void 0)return e.color;const o=e.data[s],i=o===null?e.color:n(o);return i===null?e.color:i}:a?s=>{var l;if(s===void 0)return e.color;const o=(l=t.data)==null?void 0:l[s],i=o===null?e.color:a(o);return i===null?e.color:i}:()=>e.color},_w=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>{const s=dr(r[a].label,"legend");return s===void 0||n.push({markType:r[a].labelMarkType,id:a,seriesId:a,color:r[a].color,label:s}),n},[])},Iw=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=dr(t.label,"tooltip"),s=t.data[n.dataIndex],o=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:a,value:s,formattedValue:o,markType:t.labelMarkType}},Mw=e=>Object.values(e).map(t=>({direction:"x",axisId:t.xAxisId})),$w=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),jw={colorProcessor:Ew,seriesProcessor:Vw,legendGetter:_w,tooltipGetter:Iw,axisTooltipGetter:Mw,xExtremumGetter:Pw,yExtremumGetter:Tw,getSeriesWithDefaultValues:$w},kw=(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}},Lw=e=>{const{seriesOrder:t,series:r}=e,n={};return t.forEach(a=>{const s=XO().startAngle(2*Math.PI*(r[a].startAngle??0)/360).endAngle(2*Math.PI*(r[a].endAngle??360)/360).padAngle(2*Math.PI*(r[a].paddingAngle??0)/360).sortValues(kw(r[a].sortingValues??"none"))(r[a].data.map(o=>o.value));n[a]=K({labelMarkType:"circle",valueFormatter:o=>o.value.toLocaleString()},r[a],{data:r[a].data.map((o,i)=>K({},o,{id:o.id??`auto-generated-pie-id-${a}-${i}`},s[i])).map((o,i)=>{var l,c;return K({labelMarkType:"circle"},o,{formattedValue:((c=(l=r[a]).valueFormatter)==null?void 0:c.call(l,K({},o,{label:dr(o.label,"arc")}),{dataIndex:i}))??o.value.toLocaleString()})})})}),{seriesOrder:t,series:n}},Uw=e=>t=>e.data[t].color,Dw=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>(r[a].data.forEach((s,o)=>{const i=dr(s.label,"legend");i!==void 0&&n.push({markType:s.labelMarkType??r[a].labelMarkType,id:s.id??o,seriesId:a,color:s.color,label:i,itemId:s.id??o})}),n),[])},Nw=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=t.data[n.dataIndex];if(a==null)return null;const s=dr(a.label,"tooltip"),o=K({},a,{label:s}),i=t.valueFormatter(o,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:s,value:o,formattedValue:i,markType:a.labelMarkType??t.labelMarkType}},Fw=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`},e,{data:e.data.map((n,a)=>K({color:r[a%r.length]},n))}),Bw={colorProcessor:Uw,seriesProcessor:Lw,legendGetter:Dw,tooltipGetter:Nw,getSeriesWithDefaultValues:Fw},zw={bar:gw,scatter:Cw,line:jw,pie:Bw},Gw=[Uc,ei,kc,ti];function Hw(e){const{children:t,plugins:r=Gw,pluginParams:n={},seriesConfig:a=zw}=e,{contextValue:s}=Cx(r,n,a);return x.jsx(gc.Provider,{value:s,children:t})}const im=()=>{const e=F.useContext(gc);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(`
|
|
131
131
|
`));return e};function Zr(){const e=im();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(`
|
|
132
|
-
`));return e.store}function lm(){const e=Zr();return bt(e,rs)}function cm(){const e=Zr();return bt(e,
|
|
133
|
-
`));return e.svgRef}function Yw(){const e=cm();return F.useCallback(t=>`${e}-gradient-${t}`,[e])}function Qw(){const e=cm();return F.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var qi,Bd;function Xw(){if(Bd)return qi;Bd=1;var e=4,t=.001,r=1e-7,n=10,a=11,s=1/(a-1),o=typeof Float32Array=="function";function i(f,g){return 1-3*g+3*f}function l(f,g){return 3*g-6*f}function c(f){return 3*f}function u(f,g,S){return((i(g,S)*f+l(g,S))*f+c(g))*f}function d(f,g,S){return 3*i(g,S)*f*f+2*l(g,S)*f+c(g)}function h(f,g,S,R,O){var C,E,T=0;do E=g+(S-g)/2,C=u(E,R,O)-f,C>0?S=E:g=E;while(Math.abs(C)>r&&++T<n);return E}function p(f,g,S,R){for(var O=0;O<e;++O){var C=d(g,S,R);if(C===0)return g;var E=u(g,S,R)-f;g-=E/C}return g}function m(f){return f}return qi=function(g,S,R,O){if(!(0<=g&&g<=1&&0<=R&&R<=1))throw new Error("bezier x values must be in [0, 1] range");if(g===S&&R===O)return m;for(var C=o?new Float32Array(a):new Array(a),E=0;E<a;++E)C[E]=u(E*s,g,R);function T(P){for(var _=0,B=1,b=a-1;B!==b&&C[B]<=P;++B)_+=s;--B;var A=(P-C[B])/(C[B+1]-C[B]),z=_+A*s,I=d(z,g,R);return I>=t?p(P,z,g,R):I===0?z:h(P,_,_+s,g,R)}return function(_){return _===0?0:_===1?1:u(T(_),S,O)}},qi}var Zw=Xw();const eC=fy(Zw),tC=300,rC=eC(.66,0,.34,1);var Hn=0,Va=0,ma=0,um=1e3,po,Ea,fo=0,Gr=0,ti=0,Ha=typeof performance=="object"&&performance.now?performance:Date,dm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Uc(){return Gr||(dm(nC),Gr=Ha.now()+ti)}function nC(){Gr=0}function mo(){this._call=this._time=this._next=null}mo.prototype=hm.prototype={constructor:mo,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Uc():+r)+(t==null?0:+t),!this._next&&Ea!==this&&(Ea?Ea._next=this:po=this,Ea=this),this._call=e,this._time=r,El()},stop:function(){this._call&&(this._call=null,this._time=1/0,El())}};function hm(e,t,r){var n=new mo;return n.restart(e,t,r),n}function Vl(){Uc(),++Hn;for(var e=po,t;e;)(t=Gr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Hn}function zd(){Gr=(fo=Ha.now())+ti,Hn=Va=0;try{Vl()}finally{Hn=0,sC(),Gr=0}}function aC(){var e=Ha.now(),t=e-fo;t>um&&(ti-=t,fo=e)}function sC(){for(var e,t=po,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:po=r);Ea=e,El(n)}function El(e){if(!Hn){Va&&(Va=clearTimeout(Va));var t=e-Gr;t>24?(e<1/0&&(Va=setTimeout(zd,e-Ha.now()-ti)),ma&&(ma=clearInterval(ma))):(ma||(fo=Ha.now(),ma=setInterval(aC,um)),Hn=1,dm(zd))}}function oC(e,t,r){var n=new mo;return t=t==null?0:+t,n.restart(a=>{n.stop(),e(a+t)},t,r),n}class iC{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=Uc()-this.elapsed;return this.timer=hm(r=>this.timerCallback(r),0,t),Vl(),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),oC(()=>this.timerCallback(this.duration)),Vl(),this}}function lC(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 a=0;a<r.length;a+=1){const s=r[a];if(!Object.prototype.hasOwnProperty.call(t,s)||!Object.is(e[s],t[s]))return!1}return!0}function cC(e,{createInterpolator:t,applyProps:r,skip:n,initialProps:a=e}){const s=F.useRef(a),o=F.useRef(null),i=F.useRef(null),l=F.useRef(e);or(()=>{l.current=e},[e]),or(()=>{var d;n&&((d=o.current)==null||d.finish(),o.current=null,i.current=null,s.current=e)},[e,n]);const c=F.useCallback(d=>{const h=s.current,p=t(h,e);o.current=new iC(tC,rC,m=>{const f=p(m);s.current=f,r(d,f)})},[r,t,e]);return F.useCallback(d=>{var p,m,f,g;if(d===null){(p=o.current)==null||p.stop();return}const h=i.current;if(h===d){if(lC(l.current,e)){(m=o.current)==null||m.resume();return}(f=o.current)==null||f.stop()}h&&((g=o.current)==null||g.stop()),i.current=d,(o.current||!n)&&c(d)},[c,e,n])}function uC(e,{createInterpolator:t,transformProps:r,applyProps:n,skip:a,initialProps:s=e,ref:o}){const i=r??(u=>u),l=cC(e,{initialProps:s,createInterpolator:t,applyProps:(u,d)=>n(u,i(d)),skip:a});return K({},r(a?e:s),{ref:Qp(l,o)})}function Gd(e){const{isReversed:t,gradientId:r,size:n,direction:a,scale:s,colorMap:o}=e;return n<=0?null:x.jsx("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${a}${t?1:2}`]:`${n}px`,gradientUnits:"userSpaceOnUse",children:o.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:x.jsxs(F.Fragment,{children:[x.jsx("stop",{offset:u,stopColor:o.colors[l],stopOpacity:1}),x.jsx("stop",{offset:u,stopColor:o.colors[l+1],stopOpacity:1})]},i.toString()+l)})})}const dC=10;function Hd(e){const{gradientUnits:t,isReversed:r,gradientId:n,size:a,direction:s,scale:o,colorScale:i,colorMap:l}=e,c=[l.min??0,l.max??100],u=c.map(o).filter(m=>m!==void 0);if(u.length!==2)return null;const d=typeof c[0]=="number"?Dt(c[0],c[1]):xc(c[0],c[1]),h=Math.round((Math.max(...u)-Math.min(...u))/dC),p=`${c[0]}-${c[1]}-`;return x.jsx("linearGradient",{id:n,x1:"0",x2:"0",y1:"0",y2:"0",[`${s}${r?1:2}`]:t==="objectBoundingBox"?1:`${a}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:h+1},(m,f)=>{const g=d(f/h);if(g===void 0)return null;const S=o(g);if(S===void 0)return null;const R=r?1-S/a:S/a,O=i(g);return O===null?null:x.jsx("stop",{offset:R,stopColor:O,stopOpacity:1},p+f)})})}const hC=10,pC=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function Ji(e){const{isReversed:t,gradientId:r,colorScale:n,colorMap:a}=e,s=[a.min??0,a.max??100],o=typeof s[0]=="number"?Dt(s[0],s[1]):xc(s[0],s[1]),i=hC,l=`${s[0]}-${s[1]}-`;return x.jsx("linearGradient",K({id:r},pC(t),{gradientUnits:"objectBoundingBox",children:Array.from({length:i+1},(c,u)=>{const d=u/i,h=o(d);if(h===void 0)return null;const p=n(h);return p===null?null:x.jsx("stop",{offset:d,stopColor:p,stopOpacity:1},l+u)})}))}function fC(){const{top:e,height:t,bottom:r,left:n,width:a,right:s}=lm(),o=e+t+r,i=n+a+s,l=Yw(),c=Qw(),{xAxis:u,xAxisIds:d}=qw(),{yAxis:h,yAxisIds:p}=Jw(),{zAxis:m,zAxisIds:f}=Ww(),g=p.filter(O=>h[O].colorMap!==void 0),S=d.filter(O=>u[O].colorMap!==void 0),R=f.filter(O=>m[O].colorMap!==void 0);return g.length===0&&S.length===0&&R.length===0?null:x.jsxs("defs",{children:[g.map(O=>{const C=l(O),E=c(O),{colorMap:T,scale:P,colorScale:_,reverse:B}=h[O];return(T==null?void 0:T.type)==="piecewise"?x.jsx(Gd,{isReversed:!B,scale:P,colorMap:T,size:o,gradientId:C,direction:"y"},C):(T==null?void 0:T.type)==="continuous"?x.jsxs(F.Fragment,{children:[x.jsx(Hd,{isReversed:!B,scale:P,colorScale:_,colorMap:T,size:o,gradientId:C,direction:"y"}),x.jsx(Ji,{isReversed:B,colorScale:_,colorMap:T,gradientId:E})]},C):null}),S.map(O=>{const C=l(O),E=c(O),{colorMap:T,scale:P,reverse:_,colorScale:B}=u[O];return(T==null?void 0:T.type)==="piecewise"?x.jsx(Gd,{isReversed:_,scale:P,colorMap:T,size:i,gradientId:C,direction:"x"},C):(T==null?void 0:T.type)==="continuous"?x.jsxs(F.Fragment,{children:[x.jsx(Hd,{isReversed:_,scale:P,colorScale:B,colorMap:T,size:i,gradientId:C,direction:"x"}),x.jsx(Ji,{isReversed:_,colorScale:B,colorMap:T,gradientId:E})]},C):null}),R.map(O=>{const C=c(O),{colorMap:E,colorScale:T}=m[O];return(E==null?void 0:E.type)==="continuous"?x.jsx(Ji,{colorScale:T,colorMap:E,gradientId:C},C):null})]})}const mC=["children","className","title","desc"],gC=Pt("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"})),Dc=F.forwardRef(function(t,r){const n=Zr(),{width:a,height:s}=bt(n,tS),{width:o,height:i}=bt(n,eS),l=Kw(),c=Qp(l,r),u=av({props:t,name:"MuiChartsSurface"}),{children:d,className:h,title:p,desc:m}=u,f=Cr(u,mC),g=s>0&&a>0;return x.jsxs(gC,K({ownerState:{width:o,height:i},viewBox:`0 0 ${a} ${s}`,className:h},f,{ref:c,children:[p&&x.jsx("title",{children:p}),m&&x.jsx("desc",{children:m}),x.jsx(fC,{}),g&&d]}))});process.env.NODE_ENV!=="production"&&(Dc.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(Dc.propTypes={children:y.node,className:y.string,desc:y.string,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),title:y.string});function ga(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 Wi(e){const t=Al(e);return[Math.sin(t),-Math.cos(t)]}function yC(e,t){const r=[[0,0],Wi(e),Wi(t)],n=Math.min(e,t),a=Math.max(e,t),s=Math.floor(n/90)*90;for(let u=1;u<=4;u+=1){const d=s+u*90;d<a&&r.push(Wi(d))}const o=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:-o/(i-o),cy:-l/(c-l),minX:o,maxX:i,minY:l,maxY:c}}function bC(e,t,r,n,{minX:a,maxX:s,minY:o,maxY:i}){return Math.min(...[{ratio:Math.abs(a),space:e},{ratio:Math.abs(s),space:r-e},{ratio:Math.abs(o),space:t},{ratio:Math.abs(i),space:n-t}].map(({ratio:l,space:c})=>l<1e-5?1/0:c/l))}const Nc=F.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"&&(Nc.displayName="GaugeContext");function vC(e){const{value:t=null,valueMin:r=0,valueMax:n=100,startAngle:a=0,endAngle:s=360,outerRadius:o,innerRadius:i,cornerRadius:l,cx:c,cy:u,children:d}=e,{left:h,top:p,width:m,height:f}=lm(),g=yC(a,s),S=c?ga(c,m):g.cx*m,R=u?ga(u,f):g.cy*f;let O=h+S,C=p+R;const E=bC(S,R,m,f,g);if(c===void 0){const b=E*(g.maxX-g.minX);O=h+(m-b)/2+g.cx*b}if(u===void 0){const b=E*(g.maxY-g.minY);C=p+(f-b)/2+g.cy*b}const T=ga(o??E,E),P=ga(i??"80%",E),_=ga(l??0,T-P),B=F.useMemo(()=>{const b=Al(a),A=Al(s);return{value:t,valueMin:r,valueMax:n,startAngle:b,endAngle:A,outerRadius:T,innerRadius:P,cornerRadius:_,cx:O,cy:C,maxRadius:E,valueAngle:t===null?null:b+(A-b)*(t-r)/(n-r)}},[t,r,n,a,s,T,P,_,O,C,E]);return x.jsx(Nc.Provider,{value:B,children:d})}function Fc(){return F.useContext(Nc)}const SC=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],xC=Pt("g")(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),Bc=F.forwardRef(function(t,r){const{width:n,height:a,margin:s,title:o,desc:i,value:l,valueMin:c=0,valueMax:u=100,startAngle:d,endAngle:h,outerRadius:p,innerRadius:m,cornerRadius:f,cx:g,cy:S,children:R}=t,O=Cr(t,SC);return x.jsx(Hw,{pluginParams:{width:n,height:a,margin:af(s,{left:10,right:10,top:10,bottom:10})},plugins:[],children:x.jsx(vC,{value:l,valueMin:c,valueMax:u,startAngle:d,endAngle:h,outerRadius:p,innerRadius:m,cornerRadius:f,cx:g,cy:S,children:x.jsx(Dc,K({title:o,desc:i,role:"meter","aria-valuenow":l===null?void 0:l,"aria-valuemin":c,"aria-valuemax":u},O,{ref:r,children:x.jsx(xC,{"aria-hidden":"true",children:R})}))})})});process.env.NODE_ENV!=="production"&&(Bc.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&(Bc.propTypes={children:y.node,className:y.string,cornerRadius:y.oneOfType([y.number,y.string]),cx:y.oneOfType([y.number,y.string]),cy:y.oneOfType([y.number,y.string]),desc:y.string,endAngle:y.number,height:y.number,id:y.string,innerRadius:y.oneOfType([y.number,y.string]),margin:y.oneOfType([y.number,y.shape({bottom:y.number,left:y.number,right:y.number,top:y.number})]),outerRadius:y.oneOfType([y.number,y.string]),skipAnimation:y.bool,startAngle:y.number,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),title:y.string,value:y.number,valueMax:y.number,valueMin:y.number,width:y.number});function OC(e){const t=Zr(),r=bt(t,Ev);return e||r}function wC(e,t){const r=Dt(e.startAngle,t.startAngle),n=Dt(e.endAngle,t.endAngle),a=Dt(e.innerRadius,t.innerRadius),s=Dt(e.outerRadius,t.outerRadius),o=Dt(e.cornerRadius,t.cornerRadius);return i=>({startAngle:r(i),endAngle:n(i),innerRadius:a(i),outerRadius:s(i),cornerRadius:o(i)})}function CC(e){return uC({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:wC,transformProps:t=>({d:em().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 PC=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],RC=Pt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function pm(e){const{value:t,valueMin:r,valueMax:n,startAngle:a,endAngle:s,outerRadius:o,innerRadius:i,cornerRadius:l,cx:c,cy:u}=Fc();if(t===null)return null;const d=a+(t-r)/(n-r)*(s-a);return x.jsx(fm,K({},e,{cx:c,cy:u,startAngle:a,endAngle:d,cornerRadius:l,innerRadius:i,outerRadius:o}))}process.env.NODE_ENV!=="production"&&(pm.propTypes={skipAnimation:y.bool});function fm(e){let{cx:t,cy:r,startAngle:n,endAngle:a,cornerRadius:s,innerRadius:o,outerRadius:i,skipAnimation:l}=e,c=Cr(e,PC);const u=OC(l),d=CC({startAngle:n,endAngle:a,cornerRadius:s,innerRadius:o,outerRadius:i,skipAnimation:u});return x.jsx(RC,K({},d,{transform:`translate(${t}, ${r})`},c))}process.env.NODE_ENV!=="production"&&(fm.propTypes={cornerRadius:y.number.isRequired,cx:y.number.isRequired,cy:y.number.isRequired,endAngle:y.number.isRequired,innerRadius:y.number.isRequired,outerRadius:y.number.isRequired,skipAnimation:y.bool,startAngle:y.number.isRequired});const TC=Pt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function AC(e){const{startAngle:t,endAngle:r,outerRadius:n,innerRadius:a,cornerRadius:s,cx:o,cy:i}=Fc();return x.jsx(TC,K({transform:`translate(${o}, ${i})`,d:em().cornerRadius(s)({startAngle:t,endAngle:r,innerRadius:a,outerRadius:n})},e))}const qd=e=>e,VC=()=>{let e=qd;return{configure(t){e=t},generate(t){return e(t)},reset(){e=qd}}},EC=VC(),_C={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 mm(e,t,r="Mui"){const n=_C[t];return n?`${r}-${n}`:`${EC.generate(e)}-${t}`}function IC(e,t,r="Mui"){const n={};return t.forEach(a=>{n[a]=mm(e,a,r)}),n}function MC(e){return mm("MuiGauge",e)}IC("MuiGauge",["root","valueArc","referenceArc","valueText"]);function $C(){return typeof window>"u"}const Cs=new Map,jC=2e3,kC={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},LC=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],Jd="mui_measurement_span";function gm(e,t){return LC.indexOf(e)>=0&&t===+t?`${t}px`:t}function ym(e){return e.split("").reduce((n,a)=>a===a.toUpperCase()?[...n,"-",a.toLowerCase()]:[...n,a],[]).join("")}const UC=e=>Object.keys(e).sort().reduce((t,r)=>`${t}${ym(r)}:${gm(r,e[r])};`,"");let Ki;const DC=(e,t={})=>{if(e==null||$C())return{width:0,height:0};const r=`${e}`,n=UC(t),a=`${r}-${n}`,s=Cs.get(a);if(s)return s;try{let o=document.getElementById(Jd);o===null&&(o=document.createElement("span"),o.setAttribute("id",Jd),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));const i=K({},kC,t);Object.keys(i).map(u=>(o.style[ym(u)]=gm(u,i[u]),u)),o.textContent=r;const l=o.getBoundingClientRect(),c={width:l.width,height:l.height};return Cs.set(a,c),Cs.size+1>jC&&Cs.clear(),process.env.NODE_ENV==="test"?o.textContent="":(Ki&&clearTimeout(Ki),Ki=setTimeout(()=>{o.textContent=""},0)),c}catch{return{width:0,height:0}}};function NC({style:e,needsComputation:t,text:r}){return r.split(`
|
|
132
|
+
`));return e.store}function lm(){const e=Zr();return bt(e,rs)}function cm(){const e=Zr();return bt(e,ox)}const Vl=(e,t)=>e===void 0?t:Math.PI*e/180;function qw(){const e=Zr(),{axis:t,axisIds:r}=bt(e,Qr);return{xAxis:t,xAxisIds:r}}function Jw(){const e=Zr(),{axis:t,axisIds:r}=bt(e,Xr);return{yAxis:t,yAxisIds:r}}function Ww(){const e=Zr(),{axis:t,axisIds:r}=bt(e,jO)??{axis:{},axisIds:[]};return{zAxis:t,zAxisIds:r}}function Kw(){const e=im();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(`
|
|
133
|
+
`));return e.svgRef}function Yw(){const e=cm();return F.useCallback(t=>`${e}-gradient-${t}`,[e])}function Qw(){const e=cm();return F.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var Ji,Bd;function Xw(){if(Bd)return Ji;Bd=1;var e=4,t=.001,r=1e-7,n=10,a=11,s=1/(a-1),o=typeof Float32Array=="function";function i(f,g){return 1-3*g+3*f}function l(f,g){return 3*g-6*f}function c(f){return 3*f}function u(f,g,S){return((i(g,S)*f+l(g,S))*f+c(g))*f}function d(f,g,S){return 3*i(g,S)*f*f+2*l(g,S)*f+c(g)}function h(f,g,S,T,O){var C,E,R=0;do E=g+(S-g)/2,C=u(E,T,O)-f,C>0?S=E:g=E;while(Math.abs(C)>r&&++R<n);return E}function p(f,g,S,T){for(var O=0;O<e;++O){var C=d(g,S,T);if(C===0)return g;var E=u(g,S,T)-f;g-=E/C}return g}function m(f){return f}return Ji=function(g,S,T,O){if(!(0<=g&&g<=1&&0<=T&&T<=1))throw new Error("bezier x values must be in [0, 1] range");if(g===S&&T===O)return m;for(var C=o?new Float32Array(a):new Array(a),E=0;E<a;++E)C[E]=u(E*s,g,T);function R(P){for(var _=0,B=1,b=a-1;B!==b&&C[B]<=P;++B)_+=s;--B;var A=(P-C[B])/(C[B+1]-C[B]),z=_+A*s,I=d(z,g,T);return I>=t?p(P,z,g,T):I===0?z:h(P,_,_+s,g,T)}return function(_){return _===0?0:_===1?1:u(R(_),S,O)}},Ji}var Zw=Xw();const eC=fy(Zw),tC=300,rC=eC(.66,0,.34,1);var Hn=0,Va=0,ma=0,um=1e3,po,Ea,fo=0,Gr=0,ri=0,Ha=typeof performance=="object"&&performance.now?performance:Date,dm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Dc(){return Gr||(dm(nC),Gr=Ha.now()+ri)}function nC(){Gr=0}function mo(){this._call=this._time=this._next=null}mo.prototype=hm.prototype={constructor:mo,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Dc():+r)+(t==null?0:+t),!this._next&&Ea!==this&&(Ea?Ea._next=this:po=this,Ea=this),this._call=e,this._time=r,_l()},stop:function(){this._call&&(this._call=null,this._time=1/0,_l())}};function hm(e,t,r){var n=new mo;return n.restart(e,t,r),n}function El(){Dc(),++Hn;for(var e=po,t;e;)(t=Gr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Hn}function zd(){Gr=(fo=Ha.now())+ri,Hn=Va=0;try{El()}finally{Hn=0,sC(),Gr=0}}function aC(){var e=Ha.now(),t=e-fo;t>um&&(ri-=t,fo=e)}function sC(){for(var e,t=po,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:po=r);Ea=e,_l(n)}function _l(e){if(!Hn){Va&&(Va=clearTimeout(Va));var t=e-Gr;t>24?(e<1/0&&(Va=setTimeout(zd,e-Ha.now()-ri)),ma&&(ma=clearInterval(ma))):(ma||(fo=Ha.now(),ma=setInterval(aC,um)),Hn=1,dm(zd))}}function oC(e,t,r){var n=new mo;return t=t==null?0:+t,n.restart(a=>{n.stop(),e(a+t)},t,r),n}class iC{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=Dc()-this.elapsed;return this.timer=hm(r=>this.timerCallback(r),0,t),El(),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),oC(()=>this.timerCallback(this.duration)),El(),this}}function lC(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 a=0;a<r.length;a+=1){const s=r[a];if(!Object.prototype.hasOwnProperty.call(t,s)||!Object.is(e[s],t[s]))return!1}return!0}function cC(e,{createInterpolator:t,applyProps:r,skip:n,initialProps:a=e}){const s=F.useRef(a),o=F.useRef(null),i=F.useRef(null),l=F.useRef(e);or(()=>{l.current=e},[e]),or(()=>{var d;n&&((d=o.current)==null||d.finish(),o.current=null,i.current=null,s.current=e)},[e,n]);const c=F.useCallback(d=>{const h=s.current,p=t(h,e);o.current=new iC(tC,rC,m=>{const f=p(m);s.current=f,r(d,f)})},[r,t,e]);return F.useCallback(d=>{var p,m,f,g;if(d===null){(p=o.current)==null||p.stop();return}const h=i.current;if(h===d){if(lC(l.current,e)){(m=o.current)==null||m.resume();return}(f=o.current)==null||f.stop()}h&&((g=o.current)==null||g.stop()),i.current=d,(o.current||!n)&&c(d)},[c,e,n])}function uC(e,{createInterpolator:t,transformProps:r,applyProps:n,skip:a,initialProps:s=e,ref:o}){const i=r??(u=>u),l=cC(e,{initialProps:s,createInterpolator:t,applyProps:(u,d)=>n(u,i(d)),skip:a});return K({},r(a?e:s),{ref:Qp(l,o)})}function Gd(e){const{isReversed:t,gradientId:r,size:n,direction:a,scale:s,colorMap:o}=e;return n<=0?null:x.jsx("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${a}${t?1:2}`]:`${n}px`,gradientUnits:"userSpaceOnUse",children:o.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:x.jsxs(F.Fragment,{children:[x.jsx("stop",{offset:u,stopColor:o.colors[l],stopOpacity:1}),x.jsx("stop",{offset:u,stopColor:o.colors[l+1],stopOpacity:1})]},i.toString()+l)})})}const dC=10;function Hd(e){const{gradientUnits:t,isReversed:r,gradientId:n,size:a,direction:s,scale:o,colorScale:i,colorMap:l}=e,c=[l.min??0,l.max??100],u=c.map(o).filter(m=>m!==void 0);if(u.length!==2)return null;const d=typeof c[0]=="number"?Dt(c[0],c[1]):Oc(c[0],c[1]),h=Math.round((Math.max(...u)-Math.min(...u))/dC),p=`${c[0]}-${c[1]}-`;return x.jsx("linearGradient",{id:n,x1:"0",x2:"0",y1:"0",y2:"0",[`${s}${r?1:2}`]:t==="objectBoundingBox"?1:`${a}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:h+1},(m,f)=>{const g=d(f/h);if(g===void 0)return null;const S=o(g);if(S===void 0)return null;const T=r?1-S/a:S/a,O=i(g);return O===null?null:x.jsx("stop",{offset:T,stopColor:O,stopOpacity:1},p+f)})})}const hC=10,pC=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function Wi(e){const{isReversed:t,gradientId:r,colorScale:n,colorMap:a}=e,s=[a.min??0,a.max??100],o=typeof s[0]=="number"?Dt(s[0],s[1]):Oc(s[0],s[1]),i=hC,l=`${s[0]}-${s[1]}-`;return x.jsx("linearGradient",K({id:r},pC(t),{gradientUnits:"objectBoundingBox",children:Array.from({length:i+1},(c,u)=>{const d=u/i,h=o(d);if(h===void 0)return null;const p=n(h);return p===null?null:x.jsx("stop",{offset:d,stopColor:p,stopOpacity:1},l+u)})}))}function fC(){const{top:e,height:t,bottom:r,left:n,width:a,right:s}=lm(),o=e+t+r,i=n+a+s,l=Yw(),c=Qw(),{xAxis:u,xAxisIds:d}=qw(),{yAxis:h,yAxisIds:p}=Jw(),{zAxis:m,zAxisIds:f}=Ww(),g=p.filter(O=>h[O].colorMap!==void 0),S=d.filter(O=>u[O].colorMap!==void 0),T=f.filter(O=>m[O].colorMap!==void 0);return g.length===0&&S.length===0&&T.length===0?null:x.jsxs("defs",{children:[g.map(O=>{const C=l(O),E=c(O),{colorMap:R,scale:P,colorScale:_,reverse:B}=h[O];return(R==null?void 0:R.type)==="piecewise"?x.jsx(Gd,{isReversed:!B,scale:P,colorMap:R,size:o,gradientId:C,direction:"y"},C):(R==null?void 0:R.type)==="continuous"?x.jsxs(F.Fragment,{children:[x.jsx(Hd,{isReversed:!B,scale:P,colorScale:_,colorMap:R,size:o,gradientId:C,direction:"y"}),x.jsx(Wi,{isReversed:B,colorScale:_,colorMap:R,gradientId:E})]},C):null}),S.map(O=>{const C=l(O),E=c(O),{colorMap:R,scale:P,reverse:_,colorScale:B}=u[O];return(R==null?void 0:R.type)==="piecewise"?x.jsx(Gd,{isReversed:_,scale:P,colorMap:R,size:i,gradientId:C,direction:"x"},C):(R==null?void 0:R.type)==="continuous"?x.jsxs(F.Fragment,{children:[x.jsx(Hd,{isReversed:_,scale:P,colorScale:B,colorMap:R,size:i,gradientId:C,direction:"x"}),x.jsx(Wi,{isReversed:_,colorScale:B,colorMap:R,gradientId:E})]},C):null}),T.map(O=>{const C=c(O),{colorMap:E,colorScale:R}=m[O];return(E==null?void 0:E.type)==="continuous"?x.jsx(Wi,{colorScale:R,colorMap:E,gradientId:C},C):null})]})}const mC=["children","className","title","desc"],gC=Pt("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"})),Nc=F.forwardRef(function(t,r){const n=Zr(),{width:a,height:s}=bt(n,tx),{width:o,height:i}=bt(n,ex),l=Kw(),c=Qp(l,r),u=av({props:t,name:"MuiChartsSurface"}),{children:d,className:h,title:p,desc:m}=u,f=Cr(u,mC),g=s>0&&a>0;return x.jsxs(gC,K({ownerState:{width:o,height:i},viewBox:`0 0 ${a} ${s}`,className:h},f,{ref:c,children:[p&&x.jsx("title",{children:p}),m&&x.jsx("desc",{children:m}),x.jsx(fC,{}),g&&d]}))});process.env.NODE_ENV!=="production"&&(Nc.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(Nc.propTypes={children:y.node,className:y.string,desc:y.string,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),title:y.string});function ga(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 Ki(e){const t=Vl(e);return[Math.sin(t),-Math.cos(t)]}function yC(e,t){const r=[[0,0],Ki(e),Ki(t)],n=Math.min(e,t),a=Math.max(e,t),s=Math.floor(n/90)*90;for(let u=1;u<=4;u+=1){const d=s+u*90;d<a&&r.push(Ki(d))}const o=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:-o/(i-o),cy:-l/(c-l),minX:o,maxX:i,minY:l,maxY:c}}function bC(e,t,r,n,{minX:a,maxX:s,minY:o,maxY:i}){return Math.min(...[{ratio:Math.abs(a),space:e},{ratio:Math.abs(s),space:r-e},{ratio:Math.abs(o),space:t},{ratio:Math.abs(i),space:n-t}].map(({ratio:l,space:c})=>l<1e-5?1/0:c/l))}const Fc=F.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"&&(Fc.displayName="GaugeContext");function vC(e){const{value:t=null,valueMin:r=0,valueMax:n=100,startAngle:a=0,endAngle:s=360,outerRadius:o,innerRadius:i,cornerRadius:l,cx:c,cy:u,children:d}=e,{left:h,top:p,width:m,height:f}=lm(),g=yC(a,s),S=c?ga(c,m):g.cx*m,T=u?ga(u,f):g.cy*f;let O=h+S,C=p+T;const E=bC(S,T,m,f,g);if(c===void 0){const b=E*(g.maxX-g.minX);O=h+(m-b)/2+g.cx*b}if(u===void 0){const b=E*(g.maxY-g.minY);C=p+(f-b)/2+g.cy*b}const R=ga(o??E,E),P=ga(i??"80%",E),_=ga(l??0,R-P),B=F.useMemo(()=>{const b=Vl(a),A=Vl(s);return{value:t,valueMin:r,valueMax:n,startAngle:b,endAngle:A,outerRadius:R,innerRadius:P,cornerRadius:_,cx:O,cy:C,maxRadius:E,valueAngle:t===null?null:b+(A-b)*(t-r)/(n-r)}},[t,r,n,a,s,R,P,_,O,C,E]);return x.jsx(Fc.Provider,{value:B,children:d})}function Bc(){return F.useContext(Fc)}const xC=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],SC=Pt("g")(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),zc=F.forwardRef(function(t,r){const{width:n,height:a,margin:s,title:o,desc:i,value:l,valueMin:c=0,valueMax:u=100,startAngle:d,endAngle:h,outerRadius:p,innerRadius:m,cornerRadius:f,cx:g,cy:S,children:T}=t,O=Cr(t,xC);return x.jsx(Hw,{pluginParams:{width:n,height:a,margin:af(s,{left:10,right:10,top:10,bottom:10})},plugins:[],children:x.jsx(vC,{value:l,valueMin:c,valueMax:u,startAngle:d,endAngle:h,outerRadius:p,innerRadius:m,cornerRadius:f,cx:g,cy:S,children:x.jsx(Nc,K({title:o,desc:i,role:"meter","aria-valuenow":l===null?void 0:l,"aria-valuemin":c,"aria-valuemax":u},O,{ref:r,children:x.jsx(SC,{"aria-hidden":"true",children:T})}))})})});process.env.NODE_ENV!=="production"&&(zc.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&(zc.propTypes={children:y.node,className:y.string,cornerRadius:y.oneOfType([y.number,y.string]),cx:y.oneOfType([y.number,y.string]),cy:y.oneOfType([y.number,y.string]),desc:y.string,endAngle:y.number,height:y.number,id:y.string,innerRadius:y.oneOfType([y.number,y.string]),margin:y.oneOfType([y.number,y.shape({bottom:y.number,left:y.number,right:y.number,top:y.number})]),outerRadius:y.oneOfType([y.number,y.string]),skipAnimation:y.bool,startAngle:y.number,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),title:y.string,value:y.number,valueMax:y.number,valueMin:y.number,width:y.number});function OC(e){const t=Zr(),r=bt(t,Ev);return e||r}function wC(e,t){const r=Dt(e.startAngle,t.startAngle),n=Dt(e.endAngle,t.endAngle),a=Dt(e.innerRadius,t.innerRadius),s=Dt(e.outerRadius,t.outerRadius),o=Dt(e.cornerRadius,t.cornerRadius);return i=>({startAngle:r(i),endAngle:n(i),innerRadius:a(i),outerRadius:s(i),cornerRadius:o(i)})}function CC(e){return uC({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:wC,transformProps:t=>({d:em().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 PC=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],RC=Pt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function pm(e){const{value:t,valueMin:r,valueMax:n,startAngle:a,endAngle:s,outerRadius:o,innerRadius:i,cornerRadius:l,cx:c,cy:u}=Bc();if(t===null)return null;const d=a+(t-r)/(n-r)*(s-a);return x.jsx(fm,K({},e,{cx:c,cy:u,startAngle:a,endAngle:d,cornerRadius:l,innerRadius:i,outerRadius:o}))}process.env.NODE_ENV!=="production"&&(pm.propTypes={skipAnimation:y.bool});function fm(e){let{cx:t,cy:r,startAngle:n,endAngle:a,cornerRadius:s,innerRadius:o,outerRadius:i,skipAnimation:l}=e,c=Cr(e,PC);const u=OC(l),d=CC({startAngle:n,endAngle:a,cornerRadius:s,innerRadius:o,outerRadius:i,skipAnimation:u});return x.jsx(RC,K({},d,{transform:`translate(${t}, ${r})`},c))}process.env.NODE_ENV!=="production"&&(fm.propTypes={cornerRadius:y.number.isRequired,cx:y.number.isRequired,cy:y.number.isRequired,endAngle:y.number.isRequired,innerRadius:y.number.isRequired,outerRadius:y.number.isRequired,skipAnimation:y.bool,startAngle:y.number.isRequired});const TC=Pt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function AC(e){const{startAngle:t,endAngle:r,outerRadius:n,innerRadius:a,cornerRadius:s,cx:o,cy:i}=Bc();return x.jsx(TC,K({transform:`translate(${o}, ${i})`,d:em().cornerRadius(s)({startAngle:t,endAngle:r,innerRadius:a,outerRadius:n})},e))}const qd=e=>e,VC=()=>{let e=qd;return{configure(t){e=t},generate(t){return e(t)},reset(){e=qd}}},EC=VC(),_C={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 mm(e,t,r="Mui"){const n=_C[t];return n?`${r}-${n}`:`${EC.generate(e)}-${t}`}function IC(e,t,r="Mui"){const n={};return t.forEach(a=>{n[a]=mm(e,a,r)}),n}function MC(e){return mm("MuiGauge",e)}IC("MuiGauge",["root","valueArc","referenceArc","valueText"]);function $C(){return typeof window>"u"}const Cs=new Map,jC=2e3,kC={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},LC=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],Jd="mui_measurement_span";function gm(e,t){return LC.indexOf(e)>=0&&t===+t?`${t}px`:t}function ym(e){return e.split("").reduce((n,a)=>a===a.toUpperCase()?[...n,"-",a.toLowerCase()]:[...n,a],[]).join("")}const UC=e=>Object.keys(e).sort().reduce((t,r)=>`${t}${ym(r)}:${gm(r,e[r])};`,"");let Yi;const DC=(e,t={})=>{if(e==null||$C())return{width:0,height:0};const r=`${e}`,n=UC(t),a=`${r}-${n}`,s=Cs.get(a);if(s)return s;try{let o=document.getElementById(Jd);o===null&&(o=document.createElement("span"),o.setAttribute("id",Jd),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));const i=K({},kC,t);Object.keys(i).map(u=>(o.style[ym(u)]=gm(u,i[u]),u)),o.textContent=r;const l=o.getBoundingClientRect(),c={width:l.width,height:l.height};return Cs.set(a,c),Cs.size+1>jC&&Cs.clear(),process.env.NODE_ENV==="test"?o.textContent="":(Yi&&clearTimeout(Yi),Yi=setTimeout(()=>{o.textContent=""},0)),c}catch{return{width:0,height:0}}};function NC({style:e,needsComputation:t,text:r}){return r.split(`
|
|
134
134
|
`).map(n=>K({text:n},t?DC(n,e):{width:0,height:0}))}function FC(){const[e,t]=F.useState(typeof window<"u"||process.env.NODE_ENV==="test");return F.useEffect(()=>{t(!0)},[]),e}const BC=["x","y","style","text","ownerState"],zC=["angle","textAnchor","dominantBaseline"];function bm(e){const{x:t,y:r,style:n,text:a}=e,s=Cr(e,BC),o=n??{},{angle:i,textAnchor:l,dominantBaseline:c}=o,u=Cr(o,zC),d=FC(),h=F.useMemo(()=>NC({style:u,needsComputation:d&&a.includes(`
|
|
135
|
-
`),text:a}),[u,a,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 x.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((m,f)=>x.jsx("tspan",{x:t,dy:`${f===0?p:h[0].height}px`,dominantBaseline:c,children:m.text},f))}))}process.env.NODE_ENV!=="production"&&(bm.propTypes={lineHeight:y.number,needsComputation:y.bool,ownerState:y.any,style:y.object,text:y.string.isRequired});const GC=["text","className"];function HC({value:e}){return e===null?null:e.toLocaleString()}function vm(e){const{text:t=HC,className:r}=e,n=Cr(e,GC),{value:a,valueMin:s,valueMax:o,cx:i,cy:l}=Fc(),c=typeof t=="function"?t({value:a,valueMin:s,valueMax:o}):t;return c===null?null:x.jsx("g",{className:r,children:x.jsx(bm,K({x:i,y:l,text:c,style:{textAnchor:"middle",dominantBaseline:"central"}},n))})}process.env.NODE_ENV!=="production"&&(vm.propTypes={lineHeight:y.number,needsComputation:y.bool,ownerState:y.any,style:y.object,text:y.oneOfType([y.func,y.string])});const qC=["text","children","classes","className","skipAnimation"],JC=e=>{const{classes:t}=e;return wy({root:["root"],valueArc:["valueArc"],referenceArc:["referenceArc"],valueText:["valueText"]},MC,t)},zc=F.forwardRef(function(t,r){const{text:n,children:a,className:s,skipAnimation:o}=t,i=Cr(t,qC),l=JC(t);return x.jsxs(Bc,K({},i,{className:Nt(l.root,s),ref:r,children:[x.jsx(AC,{className:l.referenceArc}),x.jsx(pm,{className:l.valueArc,skipAnimation:o}),x.jsx(vm,{className:l.valueText,text:n}),a]}))});process.env.NODE_ENV!=="production"&&(zc.displayName="Gauge");process.env.NODE_ENV!=="production"&&(zc.propTypes={children:y.node,classes:y.object,className:y.string,cornerRadius:y.oneOfType([y.number,y.string]),cx:y.oneOfType([y.number,y.string]),cy:y.oneOfType([y.number,y.string]),desc:y.string,endAngle:y.number,height:y.number,id:y.string,innerRadius:y.oneOfType([y.number,y.string]),margin:y.oneOfType([y.number,y.shape({bottom:y.number,left:y.number,right:y.number,top:y.number})]),outerRadius:y.oneOfType([y.number,y.string]),skipAnimation:y.bool,startAngle:y.number,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),text:y.oneOfType([y.func,y.string]),title:y.string,value:y.number,valueMax:y.number,valueMin:y.number,width:y.number});const pe=e=>typeof e=="string",ya=()=>{let e,t;const r=new Promise((n,a)=>{e=n,t=a});return r.resolve=e,r.reject=t,r},Wd=e=>e==null?"":""+e,WC=(e,t,r)=>{e.forEach(n=>{t[n]&&(r[n]=t[n])})},KC=/###/g,Kd=e=>e&&e.indexOf("###")>-1?e.replace(KC,"."):e,Yd=e=>!e||pe(e),Ma=(e,t,r)=>{const n=pe(t)?t.split("."):t;let a=0;for(;a<n.length-1;){if(Yd(e))return{};const s=Kd(n[a]);!e[s]&&r&&(e[s]=new r),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={},++a}return Yd(e)?{}:{obj:e,k:Kd(n[a])}},Qd=(e,t,r)=>{const{obj:n,k:a}=Ma(e,t,Object);if(n!==void 0||t.length===1){n[a]=r;return}let s=t[t.length-1],o=t.slice(0,t.length-1),i=Ma(e,o,Object);for(;i.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),i=Ma(e,o,Object),i!=null&&i.obj&&typeof i.obj[`${i.k}.${s}`]<"u"&&(i.obj=void 0);i.obj[`${i.k}.${s}`]=r},YC=(e,t,r,n)=>{const{obj:a,k:s}=Ma(e,t,Object);a[s]=a[s]||[],a[s].push(r)},go=(e,t)=>{const{obj:r,k:n}=Ma(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},QC=(e,t,r)=>{const n=go(e,r);return n!==void 0?n:go(t,r)},Sm=(e,t,r)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?pe(e[n])||e[n]instanceof String||pe(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):Sm(e[n],t[n],r):e[n]=t[n]);return e},Sn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var XC={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const ZC=e=>pe(e)?e.replace(/[&<>"'\/]/g,t=>XC[t]):e;class eP{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const tP=[" ",",","?","!",";"],rP=new eP(20),nP=(e,t,r)=>{t=t||"",r=r||"";const n=tP.filter(o=>t.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const a=rP.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!a.test(e);if(!s){const o=e.indexOf(r);o>0&&!a.test(e.substring(0,o))&&(s=!0)}return s},_l=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const n=t.split(r);let a=e;for(let s=0;s<n.length;){if(!a||typeof a!="object")return;let o,i="";for(let l=s;l<n.length;++l)if(l!==s&&(i+=r),i+=n[l],o=a[i],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<n.length-1)continue;s+=l-s+1;break}a=o}return a},yo=e=>e==null?void 0:e.replace("_","-"),aP={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var r,n;(n=(r=console==null?void 0:console[e])==null?void 0:r.apply)==null||n.call(r,console,t)}};class bo{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,r)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||aP,this.options=r,this.debug=r.debug}log(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"log","",!0)}warn(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"warn","",!0)}error(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"error","")}deprecate(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,n,a){return a&&!this.debug?null:(pe(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new bo(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new bo(this.logger,t)}}var Yt=new bo;class ri{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const a=this.observers[n].get(r)||0;this.observers[n].set(r,a+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(o=>{let[i,l]=o;for(let c=0;c<l;c++)i(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[i,l]=o;for(let c=0;c<l;c++)i.apply(i,[t,...n])})}}class Xd extends ri{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n){var c,u;let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,o=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let i;t.indexOf(".")>-1?i=t.split("."):(i=[t,r],n&&(Array.isArray(n)?i.push(...n):pe(n)&&s?i.push(...n.split(s)):i.push(n)));const l=go(this.data,i);return!l&&!r&&!n&&t.indexOf(".")>-1&&(t=i[0],r=i[1],n=i.slice(2).join(".")),l||!o||!pe(n)?l:_l((u=(c=this.data)==null?void 0:c[t])==null?void 0:u[r],n,s)}addResource(t,r,n,a){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let i=[t,r];n&&(i=i.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(i=t.split("."),a=r,r=i[1]),this.addNamespaces(r),Qd(this.data,i,a),s.silent||this.emit("added",t,r,n,a)}addResources(t,r,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in n)(pe(n[s])||Array.isArray(n[s]))&&this.addResource(t,r,s,n[s],{silent:!0});a.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,a,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},i=[t,r];t.indexOf(".")>-1&&(i=t.split("."),a=n,n=r,r=i[1]),this.addNamespaces(r);let l=go(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),a?Sm(l,n,s):l={...l,...n},Qd(this.data,i,l),o.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(a=>r[a]&&Object.keys(r[a]).length>0)}toJSON(){return this.data}}var xm={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,a){return e.forEach(s=>{var o;t=((o=this.processors[s])==null?void 0:o.process(t,r,n,a))??t}),t}};const Zd={},eh=e=>!pe(e)&&typeof e!="boolean"&&typeof e!="number";class vo extends ri{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),WC(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Yt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const n=this.resolve(t,r);return(n==null?void 0:n.res)!==void 0}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=r.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,i=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!nP(t,n,a);if(o&&!i){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:pe(s)?[s]:s};const c=t.split(n);(n!==a||n===a&&this.options.ns.indexOf(c[0])>-1)&&(s=c.shift()),t=c.join(a)}return{key:t,namespaces:pe(s)?[s]:s}}translate(t,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const a=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:o,namespaces:i}=this.extractFromKey(t[t.length-1],r),l=i[i.length-1],c=r.lng||this.language,u=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode"){if(u){const A=r.nsSeparator||this.options.nsSeparator;return a?{res:`${l}${A}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${A}${o}`}return a?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:o}const d=this.resolve(t,r);let h=d==null?void 0:d.res;const p=(d==null?void 0:d.usedKey)||o,m=(d==null?void 0:d.exactUsedKey)||o,f=["[object Number]","[object Function]","[object RegExp]"],g=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,R=r.count!==void 0&&!pe(r.count),O=vo.hasDefaultValue(r),C=R?this.pluralResolver.getSuffix(c,r.count,r):"",E=r.ordinal&&R?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",T=R&&!r.ordinal&&r.count===0,P=T&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${C}`]||r[`defaultValue${E}`]||r.defaultValue;let _=h;S&&!h&&O&&(_=P);const B=eh(_),b=Object.prototype.toString.apply(_);if(S&&_&&B&&f.indexOf(b)<0&&!(pe(g)&&Array.isArray(_))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const A=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,_,{...r,ns:i}):`key '${o} (${this.language})' returned an object instead of string.`;return a?(d.res=A,d.usedParams=this.getUsedParamsDetails(r),d):A}if(s){const A=Array.isArray(_),z=A?[]:{},I=A?m:p;for(const G in _)if(Object.prototype.hasOwnProperty.call(_,G)){const re=`${I}${s}${G}`;O&&!h?z[G]=this.translate(re,{...r,defaultValue:eh(P)?P[G]:void 0,joinArrays:!1,ns:i}):z[G]=this.translate(re,{...r,joinArrays:!1,ns:i}),z[G]===re&&(z[G]=_[G])}h=z}}else if(S&&pe(g)&&Array.isArray(h))h=h.join(g),h&&(h=this.extendTranslation(h,t,r,n));else{let A=!1,z=!1;!this.isValidLookup(h)&&O&&(A=!0,h=P),this.isValidLookup(h)||(z=!0,h=o);const G=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&z?void 0:h,re=O&&P!==h&&this.options.updateMissing;if(z||A||re){if(this.logger.log(re?"updateKey":"missingKey",c,l,o,re?P:h),s){const ae=this.resolve(o,{...r,keySeparator:!1});ae&&ae.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let te=[];const oe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&oe&&oe[0])for(let ae=0;ae<oe.length;ae++)te.push(oe[ae]);else this.options.saveMissingTo==="all"?te=this.languageUtils.toResolveHierarchy(r.lng||this.language):te.push(r.lng||this.language);const Z=(ae,ge,ue)=>{var ct;const De=O&&ue!==h?ue:G;this.options.missingKeyHandler?this.options.missingKeyHandler(ae,l,ge,De,re,r):(ct=this.backendConnector)!=null&&ct.saveMissing&&this.backendConnector.saveMissing(ae,l,ge,De,re,r),this.emit("missingKey",ae,l,ge,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&R?te.forEach(ae=>{const ge=this.pluralResolver.getSuffixes(ae,r);T&&r[`defaultValue${this.options.pluralSeparator}zero`]&&ge.indexOf(`${this.options.pluralSeparator}zero`)<0&&ge.push(`${this.options.pluralSeparator}zero`),ge.forEach(ue=>{Z([ae],o+ue,r[`defaultValue${ue}`]||P)})}):Z(te,o,P))}h=this.extendTranslation(h,t,r,d,n),z&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${l}:${o}`),(z||A)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,A?h:void 0))}return a?(d.res=h,d.usedParams=this.getUsedParamsDetails(r),d):h}extendTranslation(t,r,n,a,s){var c,u;var o=this;if((c=this.i18nFormat)!=null&&c.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const d=pe(t)&&(((u=n==null?void 0:n.interpolation)==null?void 0:u.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(d){const m=t.match(this.interpolator.nestingRegexp);h=m&&m.length}let p=n.replace&&!pe(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,n.lng||this.language||a.usedLng,n),d){const m=t.match(this.interpolator.nestingRegexp),f=m&&m.length;h<f&&(n.nest=!1)}!n.lng&&a&&a.res&&(n.lng=this.language||a.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var m=arguments.length,f=new Array(m),g=0;g<m;g++)f[g]=arguments[g];return(s==null?void 0:s[0])===f[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${r[0]}`),null):o.translate(...f,r)},n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,l=pe(i)?[i]:i;return t!=null&&(l!=null&&l.length)&&n.applyPostProcessor!==!1&&(t=xm.handle(l,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,a,s,o,i;return pe(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(l,r),u=c.key;a=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const h=r.count!==void 0&&!pe(r.count),p=h&&!r.ordinal&&r.count===0,m=r.context!==void 0&&(pe(r.context)||typeof r.context=="number")&&r.context!=="",f=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);d.forEach(g=>{var S,R;this.isValidLookup(n)||(i=g,!Zd[`${f[0]}-${g}`]&&((S=this.utils)!=null&&S.hasLoadedNamespace)&&!((R=this.utils)!=null&&R.hasLoadedNamespace(i))&&(Zd[`${f[0]}-${g}`]=!0,this.logger.warn(`key "${a}" for languages "${f.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(O=>{var T;if(this.isValidLookup(n))return;o=O;const C=[u];if((T=this.i18nFormat)!=null&&T.addLookupKeys)this.i18nFormat.addLookupKeys(C,u,O,g,r);else{let P;h&&(P=this.pluralResolver.getSuffix(O,r.count,r));const _=`${this.options.pluralSeparator}zero`,B=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(C.push(u+P),r.ordinal&&P.indexOf(B)===0&&C.push(u+P.replace(B,this.options.pluralSeparator)),p&&C.push(u+_)),m){const b=`${u}${this.options.contextSeparator}${r.context}`;C.push(b),h&&(C.push(b+P),r.ordinal&&P.indexOf(B)===0&&C.push(b+P.replace(B,this.options.pluralSeparator)),p&&C.push(b+_))}}let E;for(;E=C.pop();)this.isValidLookup(n)||(s=E,n=this.getResource(O,g,E,r))}))})}),{res:n,usedKey:a,exactUsedKey:s,usedLng:o,usedNS:i}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n){var s;let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(t,r,n,a):this.resourceStore.getResource(t,r,n,a)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!pe(t.replace);let a=n?t.replace:t;if(n&&typeof t.count<"u"&&(a.count=t.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!n){a={...a};for(const s of r)delete a[s]}return a}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}class th{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Yt.create("languageUtils")}getScriptPartFromCode(t){if(t=yo(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=yo(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(pe(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(n=>{if(r)return;const a=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(a))&&(r=a)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return r=a;r=this.options.supportedLngs.find(s=>{if(s===a)return s;if(!(s.indexOf("-")<0&&a.indexOf("-")<0)&&(s.indexOf("-")>0&&a.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===a||s.indexOf(a)===0&&a.length>1))return s})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),pe(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],t),a=[],s=o=>{o&&(this.isSupportedCode(o)?a.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return pe(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):pe(t)&&s(this.formatLanguageCode(t)),n.forEach(o=>{a.indexOf(o)<0&&s(this.formatLanguageCode(o))}),a}}const rh={zero:0,one:1,two:2,few:3,many:4,other:5},nh={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class sP{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=r,this.logger=Yt.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=yo(t==="dev"?"en":t),a=r.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:n,type:a});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let o;try{o=new Intl.PluralRules(n,{type:a})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),nh;if(!t.match(/-|_/))return nh;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,r)}return this.pluralRulesCache[s]=o,o}needsPlural(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(a=>`${r}${a}`)}getSuffixes(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort((a,s)=>rh[a]-rh[s]).map(a=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${a}`):[]}getSuffix(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=this.getRule(t,n);return a?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,n))}}const ah=function(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=QC(e,t,r);return!s&&a&&pe(r)&&(s=_l(e,r,n),s===void 0&&(s=_l(t,r,n))),s},Yi=e=>e.replace(/\$/g,"$$$$");class oP{constructor(){var r;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yt.create("interpolator"),this.options=t,this.format=((r=t==null?void 0:t.interpolation)==null?void 0:r.format)||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:a,prefix:s,prefixEscaped:o,suffix:i,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:f,nestingOptionsSeparator:g,maxReplaces:S,alwaysFormat:R}=t.interpolation;this.escape=r!==void 0?r:ZC,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=s?Sn(s):o||"{{",this.suffix=i?Sn(i):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=h?Sn(h):p||Sn("$t("),this.nestingSuffix=m?Sn(m):f||Sn(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=S||1e3,this.alwaysFormat=R!==void 0?R:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>(r==null?void 0:r.source)===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,r,n,a){var p;let s,o,i;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=m=>{if(m.indexOf(this.formatSeparator)<0){const R=ah(r,l,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(R,void 0,n,{...a,...r,interpolationkey:m}):R}const f=m.split(this.formatSeparator),g=f.shift().trim(),S=f.join(this.formatSeparator).trim();return this.format(ah(r,l,g,this.options.keySeparator,this.options.ignoreJSONStructure),S,n,{...a,...r,interpolationkey:g})};this.resetRegExp();const u=(a==null?void 0:a.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((p=a==null?void 0:a.interpolation)==null?void 0:p.skipOnVariables)!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>Yi(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?Yi(this.escape(m)):Yi(m)}].forEach(m=>{for(i=0;s=m.regex.exec(t);){const f=s[1].trim();if(o=c(f),o===void 0)if(typeof u=="function"){const S=u(t,s,a);o=pe(S)?S:""}else if(a&&Object.prototype.hasOwnProperty.call(a,f))o="";else if(d){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${f} for interpolating ${t}`),o="";else!pe(o)&&!this.useRawValueToEscape&&(o=Wd(o));const g=m.safeValue(o);if(t=t.replace(s[0],g),d?(m.regex.lastIndex+=o.length,m.regex.lastIndex-=s[0].length):m.regex.lastIndex=0,i++,i>=this.maxReplaces)break}}),t}nest(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,o;const i=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const d=l.split(new RegExp(`${u}[ ]*{`));let h=`{${d[1]}`;l=d[0],h=this.interpolate(h,o);const p=h.match(/'/g),m=h.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!m||m.length%2!==0)&&(h=h.replace(/'/g,'"'));try{o=JSON.parse(h),c&&(o={...c,...o})}catch(f){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,f),`${l}${u}${h}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;a=this.nestingRegexp.exec(t);){let l=[];o={...n},o=o.replace&&!pe(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){const u=a[1].split(this.formatSeparator).map(d=>d.trim());a[1]=u.shift(),l=u,c=!0}if(s=r(i.call(this,a[1].trim(),o),o),s&&a[0]===t&&!pe(s))return s;pe(s)||(s=Wd(s)),s||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${t}`),s=""),c&&(s=l.reduce((u,d)=>this.format(u,d,n.lng,{...n,interpolationkey:a[1].trim()}),s.trim())),t=t.replace(a[0],s),this.regexp.lastIndex=0}return t}}const iP=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const a=n[1].substring(0,n[1].length-1);t==="currency"&&a.indexOf(":")<0?r.currency||(r.currency=a.trim()):t==="relativetime"&&a.indexOf(":")<0?r.range||(r.range=a.trim()):a.split(";").forEach(o=>{if(o){const[i,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=i.trim();r[u]||(r[u]=c),c==="false"&&(r[u]=!1),c==="true"&&(r[u]=!0),isNaN(c)||(r[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:r}},xn=e=>{const t={};return(r,n,a)=>{let s=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(s={...s,[a.interpolationkey]:void 0});const o=n+JSON.stringify(s);let i=t[o];return i||(i=e(yo(n),a),t[o]=i),i(r)}};class lP{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yt.create("formatter"),this.options=t,this.formats={number:xn((r,n)=>{const a=new Intl.NumberFormat(r,{...n});return s=>a.format(s)}),currency:xn((r,n)=>{const a=new Intl.NumberFormat(r,{...n,style:"currency"});return s=>a.format(s)}),datetime:xn((r,n)=>{const a=new Intl.DateTimeFormat(r,{...n});return s=>a.format(s)}),relativetime:xn((r,n)=>{const a=new Intl.RelativeTimeFormat(r,{...n});return s=>a.format(s,n.range||"day")}),list:xn((r,n)=>{const a=new Intl.ListFormat(r,{...n});return s=>a.format(s)})},this.init(t)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=xn(r)}format(t,r,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=r.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(i=>i.indexOf(")")>-1)){const i=s.findIndex(l=>l.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,i)].join(this.formatSeparator)}return s.reduce((i,l)=>{var d;const{formatName:c,formatOptions:u}=iP(l);if(this.formats[c]){let h=i;try{const p=((d=a==null?void 0:a.formatParams)==null?void 0:d[a.interpolationkey])||{},m=p.locale||p.lng||a.locale||a.lng||n;h=this.formats[c](i,m,{...u,...a,...p})}catch(p){this.logger.warn(p)}return h}else this.logger.warn(`there was no format function for ${c}`);return i},t)}}const cP=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class uP extends ri{constructor(t,r,n){var s,o;let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=a,this.logger=Yt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],(o=(s=this.backend)==null?void 0:s.init)==null||o.call(s,n,a.backend,a)}queueLoad(t,r,n,a){const s={},o={},i={},l={};return t.forEach(c=>{let u=!0;r.forEach(d=>{const h=`${c}|${d}`;!n.reload&&this.store.hasResourceBundle(c,d)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?o[h]===void 0&&(o[h]=!0):(this.state[h]=1,u=!1,o[h]===void 0&&(o[h]=!0),s[h]===void 0&&(s[h]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(i[c]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(l)}}loaded(t,r,n){const a=t.split("|"),s=a[0],o=a[1];r&&this.emit("failedLoading",s,o,r),!r&&n&&this.store.addResourceBundle(s,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);const i={};this.queue.forEach(l=>{YC(l.loaded,[s],o),cP(l,t),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{i[c]||(i[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{i[c][d]===void 0&&(i[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(l=>!l.done)}read(t,r,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:a,wait:s,callback:o});return}this.readingCalls++;const i=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&a<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,n,a+1,s*2,o)},s);return}o(c,u)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const c=l(t,r);c&&typeof c.then=="function"?c.then(u=>i(null,u)).catch(i):i(null,c)}catch(c){i(c)}return}return l(t,r,i)}prepareLoading(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();pe(t)&&(t=this.languageUtils.toResolveHierarchy(t)),pe(r)&&(r=[r]);const s=this.queueLoad(t,r,n,a);if(!s.toLoad.length)return s.pending.length||a(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=t.split("|"),a=n[0],s=n[1];this.read(a,s,"read",void 0,void 0,(o,i)=>{o&&this.logger.warn(`${r}loading namespace ${s} for language ${a} failed`,o),!o&&i&&this.logger.log(`${r}loaded namespace ${s} for language ${a}`,i),this.loaded(t,o,i)})}saveMissing(t,r,n,a,s){var l,c,u,d,h;let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((d=(u=this.services)==null?void 0:u.utils)!=null&&d.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((h=this.backend)!=null&&h.create){const p={...o,isUpdate:s},m=this.backend.create.bind(this.backend);if(m.length<6)try{let f;m.length===5?f=m(t,r,n,a,p):f=m(t,r,n,a),f&&typeof f.then=="function"?f.then(g=>i(null,g)).catch(i):i(null,f)}catch(f){i(f)}else m(t,r,n,a,i,p)}!t||!t[0]||this.store.addResource(t[0],r,n,a)}}}const sh=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),pe(e[1])&&(t.defaultValue=e[1]),pe(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(n=>{t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),oh=e=>{var t,r;return pe(e.ns)&&(e.ns=[e.ns]),pe(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),pe(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((r=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:r.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},Ps=()=>{},dP=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class qa extends ri{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=oh(t),this.services={},this.logger=Yt,this.modules={external:[]},dP(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(){var t=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),r.defaultNS==null&&r.ns&&(pe(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const a=sh();this.options={...a,...this.options,...oh(r)},this.options.interpolation={...a.interpolation,...this.options.interpolation},r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const s=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Yt.init(s(this.modules.logger),this.options):Yt.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=lP;const d=new th(this.options);this.store=new Xd(this.options.resources,this.options);const h=this.services;h.logger=Yt,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new sP(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(h.formatter=s(u),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new oP(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new uP(s(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(p){for(var m=arguments.length,f=new Array(m>1?m-1:0),g=1;g<m;g++)f[g-1]=arguments[g];t.emit(p,...f)}),this.modules.languageDetector&&(h.languageDetector=s(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=s(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new vo(this.services,this.options),this.translator.on("*",function(p){for(var m=arguments.length,f=new Array(m>1?m-1:0),g=1;g<m;g++)f[g-1]=arguments[g];t.emit(p,...f)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Ps),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=ya(),c=()=>{const u=(d,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(h),n(d,h)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),l}loadResources(t){var s,o;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ps;const a=pe(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if((a==null?void 0:a.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const i=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(d=>{d!=="cimode"&&i.indexOf(d)<0&&i.push(d)})};a?l(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>l(u)),(o=(s=this.options.preload)==null?void 0:s.forEach)==null||o.call(s,c=>l(c)),this.services.backendConnector.load(i,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(c)})}else n(null)}reloadResources(t,r,n){const a=ya();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=Ps),this.services.backendConnector.reload(t,r,s=>{a.resolve(),n(s)}),a}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&xm.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(t,r){var n=this;this.isLanguageChangingTo=t;const a=ya();this.emit("languageChanging",t);const s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,c)=>{c?(s(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,a.resolve(function(){return n.t(...arguments)}),r&&r(l,function(){return n.t(...arguments)})},i=l=>{var u,d;!t&&!l&&this.services.languageDetector&&(l=[]);const c=pe(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||s(c),this.translator.language||this.translator.changeLanguage(c),(d=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||d.call(u,c)),this.loadResources(c,h=>{o(h,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(t),a}getFixedT(t,r,n){var a=this;const s=function(o,i){let l;if(typeof i!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d<c;d++)u[d-2]=arguments[d];l=a.options.overloadTranslationOptionHandler([o,i].concat(u))}else l={...i};l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||s.keyPrefix);const h=a.options.keySeparator||".";let p;return l.keyPrefix&&Array.isArray(o)?p=o.map(m=>`${l.keyPrefix}${h}${m}`):p=l.keyPrefix?`${l.keyPrefix}${h}${o}`:o,a.t(p,l)};return pe(t)?s.lng=t:s.lngs=t,s.ns=r,s.keyPrefix=n,s}t(){var a;for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return(a=this.translator)==null?void 0:a.translate(...r)}exists(){var a;for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return(a=this.translator)==null?void 0:a.exists(...r)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(i,l)=>{const c=this.services.backendConnector.state[`${i}|${l}`];return c===-1||c===0||c===2};if(r.precheck){const i=r.precheck(this,o);if(i!==void 0)return i}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!a||o(s,t)))}loadNamespaces(t,r){const n=ya();return this.options.ns?(pe(t)&&(t=[t]),t.forEach(a=>{this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}),this.loadResources(a=>{n.resolve(),r&&r(a)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=ya();pe(t)&&(t=[t]);const a=this.options.preload||[],s=t.filter(o=>a.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=a.concat(s),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(t){var a,s;if(t||(t=this.resolvedLanguage||(((a=this.languages)==null?void 0:a.length)>0?this.languages[0]:this.language)),!t)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((s=this.services)==null?void 0:s.languageUtils)||new th(sh());return r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new qa(t,r)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ps;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const a={...this.options,...t,isClone:!0},s=new qa(a);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(i=>{s[i]=this[i]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n){const i=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},Object.keys(l[c]).reduce((u,d)=>(u[d]={...l[c][d]},u),{})),{});s.store=new Xd(i,a),s.services.resourceStore=s.store}return s.translator=new vo(s.services,a),s.translator.on("*",function(i){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];s.emit(i,...c)}),s.init(a,r),s.translator.options=a,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const lt=qa.createInstance();lt.createInstance=qa.createInstance;lt.createInstance;lt.dir;lt.init;lt.loadResources;lt.reloadResources;lt.use;lt.changeLanguage;lt.getFixedT;lt.t;lt.exists;lt.setDefaultNamespace;lt.hasLoadedNamespace;lt.loadNamespaces;lt.loadLanguages;const hP={"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.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.
|
|
136
|
-
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.Of.lb":"von","CycleTimer.Min.lb":"min."},pP={"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.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":"remaining time","CycleTimer.Of.lb":"of","CycleTimer.Min.lb":"min."},Gc=lt.createInstance();Gc.use(uy).init({supportedLngs:["en","de"],resources:{en:{translations:pP},de:{translations:hP}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function en(e){return r=>x.jsx(fP,{children:x.jsx(e,{...r})})}const fP=({children:e})=>x.jsx(ze.I18nextProvider,{i18n:Gc,children:e}),mP=en(Je.observer(({onCycleComplete:e,onCycleEnd:t,autoStart:r=!0,className:n})=>{var g;const a=W.useTheme(),{t:s}=ze.useTranslation(),[o,i]=se.useState(0),[l,c]=se.useState(0),[u,d]=se.useState(!1),h=se.useRef(null),p=se.useCallback(S=>{console.log(`Starting new cycle with ${S} seconds`),c(S),i(S),r?(console.log("Auto-start enabled, starting timer"),d(!0)):console.log("Auto-start disabled, timer set but not started")},[r]);se.useEffect(()=>{let S=!0;const R=setTimeout(()=>{S&&e(p)},0);return()=>{S=!1,clearTimeout(R)}},[e,p]),se.useEffect(()=>(u&&o>0?h.current=setInterval(()=>{i(S=>S<=1?(d(!1),t&&setTimeout(()=>t(),0),console.log("Cycle completed! Timer reached zero."),0):S-1)},1e3):h.current&&(clearInterval(h.current),h.current=null),()=>{h.current&&clearInterval(h.current)}),[u,o,t]);const m=S=>{const R=Math.floor(S/60),O=S%60;return`${R}:${O.toString().padStart(2,"0")}`},f=l>0?(l-o)/l*100:0;return x.jsxs(W.Box,{className:n,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[x.jsx(zc,{width:264,height:264,value:f,valueMin:0,valueMax:100,innerRadius:"71%",outerRadius:"90%",sx:{"& .MuiGauge-valueArc":{fill:a.palette.success.main},"& .MuiGauge-referenceArc":{fill:"white",stroke:"transparent"}}}),x.jsxs(W.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:187,height:187,borderRadius:"50%",backgroundColor:(g=a.palette.backgroundPaperElevation)==null?void 0:g[8],display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1},children:[x.jsx(W.Typography,{variant:"body2",sx:{fontSize:"12px",color:a.palette.text.secondary,marginBottom:.5},children:s("CycleTimer.RemainingTime.lb")}),x.jsx(W.Typography,{variant:"h1",sx:{fontSize:"48px",fontWeight:500,color:a.palette.text.primary,lineHeight:1,marginBottom:.5},children:m(o)}),x.jsxs(W.Typography,{variant:"body2",sx:{fontSize:"12px",color:a.palette.text.secondary},children:[s("CycleTimer.Of.lb")," ",m(l)," ",s("CycleTimer.Min.lb")]})]})]})}));process.env.NODE_ENV!=="production"&&(y.node,y.object.isRequired);function Hc(e){return hb(e)}const jn=Pb({createStyledComponent:Pt("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Hc({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(jn.propTypes={children:y.node,component:y.elementType,direction:y.oneOfType([y.oneOf(["column-reverse","column","row-reverse","row"]),y.arrayOf(y.oneOf(["column-reverse","column","row-reverse","row"])),y.object]),divider:y.node,spacing:y.oneOfType([y.arrayOf(y.oneOfType([y.number,y.string])),y.number,y.object,y.string]),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),useFlexGap:y.bool});const gP=({title:e,titleId:t,...r},n)=>F.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?F.createElement("title",{id:t},e):null,F.createElement("g",{id:"JogMinus"},F.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),yP=se.forwardRef(gP),bP=({title:e,titleId:t,...r},n)=>F.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?F.createElement("title",{id:t},e):null,F.createElement("g",{id:"JogPlus"},F.createElement("g",{id:"Plus"},F.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),F.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),F.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),vP=se.forwardRef(bP);function ni(e){se.useEffect(e,[])}function Om(e){ni(()=>Xe.autorun(e))}function wm(e,t,r){ni(()=>Xe.reaction(e,t,r))}function Yn(e){return ni(()=>{let t;function r(){e(),t=requestAnimationFrame(r)}return t=requestAnimationFrame(r),()=>{cancelAnimationFrame(t)}})}const Il=en(Je.observer(({colors:e,label:t,getDisplayedValue:r,startJogging:n,stopJogging:a,disabled:s,activeJoggingDirection:o,...i})=>{var O,C,E,T,P,_,B;Yn(()=>{const b=r(),A=h.current;A&&(A.textContent=b)});const l=W.useTheme(),[c,u]=se.useState(null);se.useEffect(()=>{s&&R()},[s]);const d=o||c,h=se.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const p=d?(O=e.buttonBackgroundColor)==null?void 0:O.pressed:e.borderColor,m={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},f={...m,backgroundColor:(C=e.buttonBackgroundColor)==null?void 0:C.default,":hover":{backgroundColor:(E=e.buttonBackgroundColor)==null?void 0:E.hovered},":active":{backgroundColor:(T=e.buttonBackgroundColor)==null?void 0:T.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor}},":disabled":{backgroundColor:(P=e.buttonBackgroundColor)==null?void 0:P.disabled,"svg path":{fill:l.palette.action.disabled}}},g={...m,backgroundColor:(_=e.buttonBackgroundColor)==null?void 0:_.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(B=e.buttonBackgroundColor)==null?void 0:B.pressed,"svg path":{fill:l.palette.action.disabled}}};function S(b,A){s||b.button===0&&(u(A),n(A))}function R(){u(null),a()}return x.jsxs(jn,{height:"64px",direction:"row",justifyContent:"center",...i,children:[x.jsx(W.IconButton,{disabled:s,disableRipple:!0,onPointerDown:b=>S(b,"-"),onPointerUp:R,onPointerOut:R,size:"large",sx:{...d==="-"?g:f,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:x.jsx(yP,{})}),x.jsxs(jn,{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:[x.jsx(jn,{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}),x.jsx(W.Typography,{height:"22px",sx:{fontSize:"15px",color:s?l.palette.action.disabled:e.color,fontWeight:700},ref:h,children:r()})]}),x.jsx(W.IconButton,{disableRipple:!0,disabled:s,onPointerDown:b=>S(b,"+"),onPointerUp:R,onPointerOut:R,size:"large",sx:{...d==="+"?g:f,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:x.jsx(vP,{})})]})})),tn=pb;function SP(e){return ts("MuiSvgIcon",e)}$p("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const xP=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${dt(t)}`,`fontSize${dt(r)}`]};return nc(a,SP,n)},OP=Pt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${dt(r.color)}`],t[`fontSize${dt(r.fontSize)}`]]}})(tn(({theme:e})=>{var t,r,n,a,s,o,i,l,c,u,d,h,p,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(a=(t=e.transitions)==null?void 0:t.create)==null?void 0:a.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:f=>!f.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:o.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(([,f])=>f&&f.main).map(([f])=>{var g,S;return{props:{color:f},style:{color:(S=(g=(e.vars??e).palette)==null?void 0:g[f])==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:(m=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:m.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),So=F.forwardRef(function(t,r){const n=Hc({props:t,name:"MuiSvgIcon"}),{children:a,className:s,color:o="inherit",component:i="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...p}=n,m=F.isValidElement(a)&&a.type==="svg",f={...n,color:o,component:i,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:m},g={};u||(g.viewBox=h);const S=xP(f);return x.jsxs(OP,{as:i,className:Nt(S.root,s),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...g,...p,...m&&a.props,ownerState:f,children:[m?a.props.children:a,d?x.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(So.propTypes={children:y.node,classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),y.string]),component:y.elementType,fontSize:y.oneOfType([y.oneOf(["inherit","large","medium","small"]),y.string]),htmlColor:y.string,inheritViewBox:y.bool,shapeRendering:y.string,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),titleAccess:y.string,viewBox:y.string});So.muiName="SvgIcon";function ai(e,t){function r(n,a){return x.jsx(So,{"data-testid":`${t}Icon`,ref:a,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=So.muiName,F.memo(F.forwardRef(r))}const wP=ai(x.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),CP=ai(x.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function Hr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Cm=typeof global=="object"&&global&&global.Object===Object&&global,PP=typeof self=="object"&&self&&self.Object===Object&&self,Zt=Cm||PP||Function("return this")(),Qi=function(){return Zt.Date.now()},RP=/\s/;function TP(e){for(var t=e.length;t--&&RP.test(e.charAt(t)););return t}var AP=/^\s+/;function VP(e){return e&&e.slice(0,TP(e)+1).replace(AP,"")}var Tr=Zt.Symbol,Pm=Object.prototype,EP=Pm.hasOwnProperty,_P=Pm.toString,ba=Tr?Tr.toStringTag:void 0;function IP(e){var t=EP.call(e,ba),r=e[ba];try{e[ba]=void 0;var n=!0}catch{}var a=_P.call(e);return n&&(t?e[ba]=r:delete e[ba]),a}var MP=Object.prototype,$P=MP.toString;function jP(e){return $P.call(e)}var kP="[object Null]",LP="[object Undefined]",ih=Tr?Tr.toStringTag:void 0;function rn(e){return e==null?e===void 0?LP:kP:ih&&ih in Object(e)?IP(e):jP(e)}function qr(e){return e!=null&&typeof e=="object"}var UP="[object Symbol]";function si(e){return typeof e=="symbol"||qr(e)&&rn(e)==UP}var lh=NaN,DP=/^[-+]0x[0-9a-f]+$/i,NP=/^0b[01]+$/i,FP=/^0o[0-7]+$/i,BP=parseInt;function ch(e){if(typeof e=="number")return e;if(si(e))return lh;if(Hr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Hr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=VP(e);var r=NP.test(e);return r||FP.test(e)?BP(e.slice(2),r?2:8):DP.test(e)?lh:+e}var zP="Expected a function",GP=Math.max,HP=Math.min;function qP(e,t,r){var n,a,s,o,i,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(zP);t=ch(t)||0,Hr(r)&&(u=!!r.leading,d="maxWait"in r,s=d?GP(ch(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h);function p(T){var P=n,_=a;return n=a=void 0,c=T,o=e.apply(_,P),o}function m(T){return c=T,i=setTimeout(S,t),u?p(T):o}function f(T){var P=T-l,_=T-c,B=t-P;return d?HP(B,s-_):B}function g(T){var P=T-l,_=T-c;return l===void 0||P>=t||P<0||d&&_>=s}function S(){var T=Qi();if(g(T))return R(T);i=setTimeout(S,f(T))}function R(T){return i=void 0,h&&n?p(T):(n=a=void 0,o)}function O(){i!==void 0&&clearTimeout(i),c=0,n=l=a=i=void 0}function C(){return i===void 0?o:R(Qi())}function E(){var T=Qi(),P=g(T);if(n=arguments,a=this,l=T,P){if(i===void 0)return m(l);if(d)return clearTimeout(i),i=setTimeout(S,t),p(l)}return i===void 0&&(i=setTimeout(S,t)),o}return E.cancel=O,E.flush=C,E}var JP="Expected a function";function WP(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(JP);return Hr(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),qP(e,t,{leading:n,maxWait:t,trailing:a})}const Rm=en(Je.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:r,upperLimitDegs:n,getValueDegs:a,disabled:s,...o})=>{var O,C,E,T,P,_,B,b,A,z,I,G,re,te,oe;const{t:i}=ze.useTranslation(),[l,c]=se.useState(),u=W.useTheme(),d={background:(O=u.palette.backgroundPaperElevation)==null?void 0:O[4],color:(C=u.palette.backgroundPaperElevation)==null?void 0:C[11]},h=Je.useLocalObservable(()=>({activeJoggingDir:null,startJogging(Z){this.activeJoggingDir=Z,e(Z)},stopJogging(){this.activeJoggingDir=null,t()}})),p=WP(()=>{c(a())},50);Yn(p);function m(Z){Z.button===0&&h.startJogging("-")}function f(Z){Z.button===0&&h.startJogging("+")}function g(Z){h.stopJogging()}function S(Z){h.stopJogging()}function R(Z,ae=1){if(Z===void 0||isNaN(Z))return"";const ge=i("General.degree.variable",{amount:Z.toFixed(ae)});return Z>0&&ae===0?`+${ge}`:ge}return x.jsxs(jn,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...o,sx:{"& .MuiIconButton-root":{width:"52px",color:u.palette.text.primary,alignContent:"center",backgroundColor:(E=u.palette.backgroundPaperElevation)==null?void 0:E[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(T=u.palette.backgroundPaperElevation)==null?void 0:T[11],color:u.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(P=u.palette.backgroundPaperElevation)==null?void 0:P[9]},"&:active":{...d}}},children:[x.jsx(W.IconButton,{onPointerDown:m,onPointerUp:g,onPointerOut:S,disabled:s,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:x.jsx(wP,{sx:{pointerEvents:"none",color:(A=(b=(B=(_=u.componentsExt)==null?void 0:_.JoggingPanel)==null?void 0:B.JoggingJoint)==null?void 0:b.Joint)==null?void 0:A.arrowColor}})}),x.jsxs(jn,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(z=u.palette.backgroundPaperElevation)==null?void 0:z[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[x.jsx(W.Typography,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",color:s?u.palette.action.disabled:u.palette.text.primary},children:R(l)}),x.jsx(W.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:(I=u.palette.backgroundPaperElevation)==null?void 0:I[5],opacity:1}},marks:r!==void 0&&n!==void 0&&[{value:r,label:R(r,0)},{value:n,label:R(n,0)}]})]}),x.jsx(W.IconButton,{onPointerDown:f,onPointerUp:g,onPointerOut:S,disabled:s,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:x.jsx(CP,{sx:{pointerEvents:"none",color:(oe=(te=(re=(G=u.componentsExt)==null?void 0:G.JoggingPanel)==null?void 0:re.JoggingJoint)==null?void 0:te.Joint)==null?void 0:oe.arrowColor}})})]})})),KP=ai(x.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"),YP=ai(x.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");function QP(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Tm=QP;function XP(){this.__data__=[],this.size=0}var ZP=XP;function eR(e,t){return e===t||e!==e&&t!==t}var Am=eR;function tR(e,t){for(var r=e.length;r--;)if(Am(e[r][0],t))return r;return-1}var oi=tR,rR=Array.prototype,nR=rR.splice;function aR(e){var t=this.__data__,r=oi(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():nR.call(t,r,1),--this.size,!0}var sR=aR;function oR(e){var t=this.__data__,r=oi(t,e);return r<0?void 0:t[r][1]}var iR=oR;function lR(e){return oi(this.__data__,e)>-1}var cR=lR;function uR(e,t){var r=this.__data__,n=oi(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var dR=uR;function Qn(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])}}Qn.prototype.clear=ZP;Qn.prototype.delete=sR;Qn.prototype.get=iR;Qn.prototype.has=cR;Qn.prototype.set=dR;var ii=Qn;function hR(){this.__data__=new ii,this.size=0}var pR=hR;function fR(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var mR=fR;function gR(e){return this.__data__.get(e)}var yR=gR;function bR(e){return this.__data__.has(e)}var vR=bR,SR=typeof global=="object"&&global&&global.Object===Object&&global,Vm=SR,xR=typeof self=="object"&&self&&self.Object===Object&&self,OR=Vm||xR||Function("return this")(),hr=OR,wR=hr.Symbol,qn=wR,Em=Object.prototype,CR=Em.hasOwnProperty,PR=Em.toString,va=qn?qn.toStringTag:void 0;function RR(e){var t=CR.call(e,va),r=e[va];try{e[va]=void 0;var n=!0}catch{}var a=PR.call(e);return n&&(t?e[va]=r:delete e[va]),a}var TR=RR,AR=Object.prototype,VR=AR.toString;function ER(e){return VR.call(e)}var _R=ER,IR="[object Null]",MR="[object Undefined]",uh=qn?qn.toStringTag:void 0;function $R(e){return e==null?e===void 0?MR:IR:uh&&uh in Object(e)?TR(e):_R(e)}var ls=$R,jR="[object AsyncFunction]",kR="[object Function]",LR="[object GeneratorFunction]",UR="[object Proxy]";function DR(e){if(!Tm(e))return!1;var t=ls(e);return t==kR||t==LR||t==jR||t==UR}var _m=DR,NR=hr["__core-js_shared__"],Xi=NR,dh=function(){var e=/[^.]+$/.exec(Xi&&Xi.keys&&Xi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function FR(e){return!!dh&&dh in e}var BR=FR,zR=Function.prototype,GR=zR.toString;function HR(e){if(e!=null){try{return GR.call(e)}catch{}try{return e+""}catch{}}return""}var nn=HR,qR=/[\\^$.*+?()[\]{}|]/g,JR=/^\[object .+?Constructor\]$/,WR=Function.prototype,KR=Object.prototype,YR=WR.toString,QR=KR.hasOwnProperty,XR=RegExp("^"+YR.call(QR).replace(qR,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ZR(e){if(!Tm(e)||BR(e))return!1;var t=_m(e)?XR:JR;return t.test(nn(e))}var eT=ZR;function tT(e,t){return e==null?void 0:e[t]}var rT=tT;function nT(e,t){var r=rT(e,t);return eT(r)?r:void 0}var Xn=nT,aT=Xn(hr,"Map"),Ja=aT,sT=Xn(Object,"create"),Wa=sT;function oT(){this.__data__=Wa?Wa(null):{},this.size=0}var iT=oT;function lT(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var cT=lT,uT="__lodash_hash_undefined__",dT=Object.prototype,hT=dT.hasOwnProperty;function pT(e){var t=this.__data__;if(Wa){var r=t[e];return r===uT?void 0:r}return hT.call(t,e)?t[e]:void 0}var fT=pT,mT=Object.prototype,gT=mT.hasOwnProperty;function yT(e){var t=this.__data__;return Wa?t[e]!==void 0:gT.call(t,e)}var bT=yT,vT="__lodash_hash_undefined__";function ST(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Wa&&t===void 0?vT:t,this}var xT=ST;function Zn(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])}}Zn.prototype.clear=iT;Zn.prototype.delete=cT;Zn.prototype.get=fT;Zn.prototype.has=bT;Zn.prototype.set=xT;var hh=Zn;function OT(){this.size=0,this.__data__={hash:new hh,map:new(Ja||ii),string:new hh}}var wT=OT;function CT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var PT=CT;function RT(e,t){var r=e.__data__;return PT(t)?r[typeof t=="string"?"string":"hash"]:r.map}var li=RT;function TT(e){var t=li(this,e).delete(e);return this.size-=t?1:0,t}var AT=TT;function VT(e){return li(this,e).get(e)}var ET=VT;function _T(e){return li(this,e).has(e)}var IT=_T;function MT(e,t){var r=li(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var $T=MT;function ea(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])}}ea.prototype.clear=wT;ea.prototype.delete=AT;ea.prototype.get=ET;ea.prototype.has=IT;ea.prototype.set=$T;var Im=ea,jT=200;function kT(e,t){var r=this.__data__;if(r instanceof ii){var n=r.__data__;if(!Ja||n.length<jT-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Im(n)}return r.set(e,t),this.size=r.size,this}var LT=kT;function ta(e){var t=this.__data__=new ii(e);this.size=t.size}ta.prototype.clear=pR;ta.prototype.delete=mR;ta.prototype.get=yR;ta.prototype.has=vR;ta.prototype.set=LT;var Zi=ta,UT="__lodash_hash_undefined__";function DT(e){return this.__data__.set(e,UT),this}var NT=DT;function FT(e){return this.__data__.has(e)}var BT=FT;function xo(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Im;++t<r;)this.add(e[t])}xo.prototype.add=xo.prototype.push=NT;xo.prototype.has=BT;var zT=xo;function GT(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var HT=GT;function qT(e,t){return e.has(t)}var JT=qT,WT=1,KT=2;function YT(e,t,r,n,a,s){var o=r&WT,i=e.length,l=t.length;if(i!=l&&!(o&&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&KT?new zT:void 0;for(s.set(e,t),s.set(t,e);++d<i;){var m=e[d],f=t[d];if(n)var g=o?n(f,m,d,t,e,s):n(m,f,d,e,t,s);if(g!==void 0){if(g)continue;h=!1;break}if(p){if(!HT(t,function(S,R){if(!JT(p,R)&&(m===S||a(m,S,r,n,s)))return p.push(R)})){h=!1;break}}else if(!(m===f||a(m,f,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}var Mm=YT,QT=hr.Uint8Array,ph=QT;function XT(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var ZT=XT;function eA(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var tA=eA,rA=1,nA=2,aA="[object Boolean]",sA="[object Date]",oA="[object Error]",iA="[object Map]",lA="[object Number]",cA="[object RegExp]",uA="[object Set]",dA="[object String]",hA="[object Symbol]",pA="[object ArrayBuffer]",fA="[object DataView]",fh=qn?qn.prototype:void 0,el=fh?fh.valueOf:void 0;function mA(e,t,r,n,a,s,o){switch(r){case fA:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case pA:return!(e.byteLength!=t.byteLength||!s(new ph(e),new ph(t)));case aA:case sA:case lA:return Am(+e,+t);case oA:return e.name==t.name&&e.message==t.message;case cA:case dA:return e==t+"";case iA:var i=ZT;case uA:var l=n&rA;if(i||(i=tA),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;n|=nA,o.set(e,t);var u=Mm(i(e),i(t),n,a,s,o);return o.delete(e),u;case hA:if(el)return el.call(e)==el.call(t)}return!1}var gA=mA;function yA(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var bA=yA,vA=Array.isArray,Oo=vA;function SA(e,t,r){var n=t(e);return Oo(e)?n:bA(n,r(e))}var xA=SA;function OA(e,t){for(var r=-1,n=e==null?0:e.length,a=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[a++]=o)}return s}var wA=OA;function CA(){return[]}var PA=CA,RA=Object.prototype,TA=RA.propertyIsEnumerable,mh=Object.getOwnPropertySymbols,AA=mh?function(e){return e==null?[]:(e=Object(e),wA(mh(e),function(t){return TA.call(e,t)}))}:PA,VA=AA;function EA(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var _A=EA;function IA(e){return e!=null&&typeof e=="object"}var Ka=IA,MA="[object Arguments]";function $A(e){return Ka(e)&&ls(e)==MA}var gh=$A,$m=Object.prototype,jA=$m.hasOwnProperty,kA=$m.propertyIsEnumerable,LA=gh(function(){return arguments}())?gh:function(e){return Ka(e)&&jA.call(e,"callee")&&!kA.call(e,"callee")},UA=LA;function DA(){return!1}var NA=DA,jm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yh=jm&&typeof module=="object"&&module&&!module.nodeType&&module,FA=yh&&yh.exports===jm,bh=FA?hr.Buffer:void 0,BA=bh?bh.isBuffer:void 0,zA=BA||NA,Ml=zA,GA=9007199254740991,HA=/^(?:0|[1-9]\d*)$/;function qA(e,t){var r=typeof e;return t=t??GA,!!t&&(r=="number"||r!="symbol"&&HA.test(e))&&e>-1&&e%1==0&&e<t}var JA=qA,WA=9007199254740991;function KA(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=WA}var km=KA,YA="[object Arguments]",QA="[object Array]",XA="[object Boolean]",ZA="[object Date]",eV="[object Error]",tV="[object Function]",rV="[object Map]",nV="[object Number]",aV="[object Object]",sV="[object RegExp]",oV="[object Set]",iV="[object String]",lV="[object WeakMap]",cV="[object ArrayBuffer]",uV="[object DataView]",dV="[object Float32Array]",hV="[object Float64Array]",pV="[object Int8Array]",fV="[object Int16Array]",mV="[object Int32Array]",gV="[object Uint8Array]",yV="[object Uint8ClampedArray]",bV="[object Uint16Array]",vV="[object Uint32Array]",Ie={};Ie[dV]=Ie[hV]=Ie[pV]=Ie[fV]=Ie[mV]=Ie[gV]=Ie[yV]=Ie[bV]=Ie[vV]=!0;Ie[YA]=Ie[QA]=Ie[cV]=Ie[XA]=Ie[uV]=Ie[ZA]=Ie[eV]=Ie[tV]=Ie[rV]=Ie[nV]=Ie[aV]=Ie[sV]=Ie[oV]=Ie[iV]=Ie[lV]=!1;function SV(e){return Ka(e)&&km(e.length)&&!!Ie[ls(e)]}var xV=SV;function OV(e){return function(t){return e(t)}}var wV=OV,Lm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$a=Lm&&typeof module=="object"&&module&&!module.nodeType&&module,CV=$a&&$a.exports===Lm,tl=CV&&Vm.process,PV=function(){try{var e=$a&&$a.require&&$a.require("util").types;return e||tl&&tl.binding&&tl.binding("util")}catch{}}(),vh=PV,Sh=vh&&vh.isTypedArray,RV=Sh?wV(Sh):xV,Um=RV,TV=Object.prototype,AV=TV.hasOwnProperty;function VV(e,t){var r=Oo(e),n=!r&&UA(e),a=!r&&!n&&Ml(e),s=!r&&!n&&!a&&Um(e),o=r||n||a||s,i=o?_A(e.length,String):[],l=i.length;for(var c in e)(t||AV.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||JA(c,l)))&&i.push(c);return i}var EV=VV,_V=Object.prototype;function IV(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||_V;return e===r}var MV=IV;function $V(e,t){return function(r){return e(t(r))}}var jV=$V,kV=jV(Object.keys,Object),LV=kV,UV=Object.prototype,DV=UV.hasOwnProperty;function NV(e){if(!MV(e))return LV(e);var t=[];for(var r in Object(e))DV.call(e,r)&&r!="constructor"&&t.push(r);return t}var FV=NV;function BV(e){return e!=null&&km(e.length)&&!_m(e)}var zV=BV;function GV(e){return zV(e)?EV(e):FV(e)}var HV=GV;function qV(e){return xA(e,HV,VA)}var xh=qV,JV=1,WV=Object.prototype,KV=WV.hasOwnProperty;function YV(e,t,r,n,a,s){var o=r&JV,i=xh(e),l=i.length,c=xh(t),u=c.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var h=i[d];if(!(o?h in t:KV.call(t,h)))return!1}var p=s.get(e),m=s.get(t);if(p&&m)return p==t&&m==e;var f=!0;s.set(e,t),s.set(t,e);for(var g=o;++d<l;){h=i[d];var S=e[h],R=t[h];if(n)var O=o?n(R,S,h,t,e,s):n(S,R,h,e,t,s);if(!(O===void 0?S===R||a(S,R,r,n,s):O)){f=!1;break}g||(g=h=="constructor")}if(f&&!g){var C=e.constructor,E=t.constructor;C!=E&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof E=="function"&&E instanceof E)&&(f=!1)}return s.delete(e),s.delete(t),f}var QV=YV,XV=Xn(hr,"DataView"),$l=XV,ZV=Xn(hr,"Promise"),jl=ZV,eE=Xn(hr,"Set"),kl=eE,tE=Xn(hr,"WeakMap"),Ll=tE,Oh="[object Map]",rE="[object Object]",wh="[object Promise]",Ch="[object Set]",Ph="[object WeakMap]",Rh="[object DataView]",nE=nn($l),aE=nn(Ja),sE=nn(jl),oE=nn(kl),iE=nn(Ll),kr=ls;($l&&kr(new $l(new ArrayBuffer(1)))!=Rh||Ja&&kr(new Ja)!=Oh||jl&&kr(jl.resolve())!=wh||kl&&kr(new kl)!=Ch||Ll&&kr(new Ll)!=Ph)&&(kr=function(e){var t=ls(e),r=t==rE?e.constructor:void 0,n=r?nn(r):"";if(n)switch(n){case nE:return Rh;case aE:return Oh;case sE:return wh;case oE:return Ch;case iE:return Ph}return t});var Th=kr,lE=1,Ah="[object Arguments]",Vh="[object Array]",Rs="[object Object]",cE=Object.prototype,Eh=cE.hasOwnProperty;function uE(e,t,r,n,a,s){var o=Oo(e),i=Oo(t),l=o?Vh:Th(e),c=i?Vh:Th(t);l=l==Ah?Rs:l,c=c==Ah?Rs:c;var u=l==Rs,d=c==Rs,h=l==c;if(h&&Ml(e)){if(!Ml(t))return!1;o=!0,u=!1}if(h&&!u)return s||(s=new Zi),o||Um(e)?Mm(e,t,r,n,a,s):gA(e,t,l,r,n,a,s);if(!(r&lE)){var p=u&&Eh.call(e,"__wrapped__"),m=d&&Eh.call(t,"__wrapped__");if(p||m){var f=p?e.value():e,g=m?t.value():t;return s||(s=new Zi),a(f,g,r,n,s)}}return h?(s||(s=new Zi),QV(e,t,r,n,a,s)):!1}var dE=uE;function Dm(e,t,r,n,a){return e===t?!0:e==null||t==null||!Ka(e)&&!Ka(t)?e!==e&&t!==t:dE(e,t,r,n,Dm,a)}var hE=Dm;function pE(e,t){return hE(e,t)}var fE=pE;/*! *****************************************************************************
|
|
135
|
+
`),text:a}),[u,a,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 x.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((m,f)=>x.jsx("tspan",{x:t,dy:`${f===0?p:h[0].height}px`,dominantBaseline:c,children:m.text},f))}))}process.env.NODE_ENV!=="production"&&(bm.propTypes={lineHeight:y.number,needsComputation:y.bool,ownerState:y.any,style:y.object,text:y.string.isRequired});const GC=["text","className"];function HC({value:e}){return e===null?null:e.toLocaleString()}function vm(e){const{text:t=HC,className:r}=e,n=Cr(e,GC),{value:a,valueMin:s,valueMax:o,cx:i,cy:l}=Bc(),c=typeof t=="function"?t({value:a,valueMin:s,valueMax:o}):t;return c===null?null:x.jsx("g",{className:r,children:x.jsx(bm,K({x:i,y:l,text:c,style:{textAnchor:"middle",dominantBaseline:"central"}},n))})}process.env.NODE_ENV!=="production"&&(vm.propTypes={lineHeight:y.number,needsComputation:y.bool,ownerState:y.any,style:y.object,text:y.oneOfType([y.func,y.string])});const qC=["text","children","classes","className","skipAnimation"],JC=e=>{const{classes:t}=e;return wy({root:["root"],valueArc:["valueArc"],referenceArc:["referenceArc"],valueText:["valueText"]},MC,t)},go=F.forwardRef(function(t,r){const{text:n,children:a,className:s,skipAnimation:o}=t,i=Cr(t,qC),l=JC(t);return x.jsxs(zc,K({},i,{className:Nt(l.root,s),ref:r,children:[x.jsx(AC,{className:l.referenceArc}),x.jsx(pm,{className:l.valueArc,skipAnimation:o}),x.jsx(vm,{className:l.valueText,text:n}),a]}))});process.env.NODE_ENV!=="production"&&(go.displayName="Gauge");process.env.NODE_ENV!=="production"&&(go.propTypes={children:y.node,classes:y.object,className:y.string,cornerRadius:y.oneOfType([y.number,y.string]),cx:y.oneOfType([y.number,y.string]),cy:y.oneOfType([y.number,y.string]),desc:y.string,endAngle:y.number,height:y.number,id:y.string,innerRadius:y.oneOfType([y.number,y.string]),margin:y.oneOfType([y.number,y.shape({bottom:y.number,left:y.number,right:y.number,top:y.number})]),outerRadius:y.oneOfType([y.number,y.string]),skipAnimation:y.bool,startAngle:y.number,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),text:y.oneOfType([y.func,y.string]),title:y.string,value:y.number,valueMax:y.number,valueMin:y.number,width:y.number});const pe=e=>typeof e=="string",ya=()=>{let e,t;const r=new Promise((n,a)=>{e=n,t=a});return r.resolve=e,r.reject=t,r},Wd=e=>e==null?"":""+e,WC=(e,t,r)=>{e.forEach(n=>{t[n]&&(r[n]=t[n])})},KC=/###/g,Kd=e=>e&&e.indexOf("###")>-1?e.replace(KC,"."):e,Yd=e=>!e||pe(e),Ma=(e,t,r)=>{const n=pe(t)?t.split("."):t;let a=0;for(;a<n.length-1;){if(Yd(e))return{};const s=Kd(n[a]);!e[s]&&r&&(e[s]=new r),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={},++a}return Yd(e)?{}:{obj:e,k:Kd(n[a])}},Qd=(e,t,r)=>{const{obj:n,k:a}=Ma(e,t,Object);if(n!==void 0||t.length===1){n[a]=r;return}let s=t[t.length-1],o=t.slice(0,t.length-1),i=Ma(e,o,Object);for(;i.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),i=Ma(e,o,Object),i!=null&&i.obj&&typeof i.obj[`${i.k}.${s}`]<"u"&&(i.obj=void 0);i.obj[`${i.k}.${s}`]=r},YC=(e,t,r,n)=>{const{obj:a,k:s}=Ma(e,t,Object);a[s]=a[s]||[],a[s].push(r)},yo=(e,t)=>{const{obj:r,k:n}=Ma(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},QC=(e,t,r)=>{const n=yo(e,r);return n!==void 0?n:yo(t,r)},xm=(e,t,r)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?pe(e[n])||e[n]instanceof String||pe(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):xm(e[n],t[n],r):e[n]=t[n]);return e},xn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var XC={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const ZC=e=>pe(e)?e.replace(/[&<>"'\/]/g,t=>XC[t]):e;class eP{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const tP=[" ",",","?","!",";"],rP=new eP(20),nP=(e,t,r)=>{t=t||"",r=r||"";const n=tP.filter(o=>t.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const a=rP.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!a.test(e);if(!s){const o=e.indexOf(r);o>0&&!a.test(e.substring(0,o))&&(s=!0)}return s},Il=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const n=t.split(r);let a=e;for(let s=0;s<n.length;){if(!a||typeof a!="object")return;let o,i="";for(let l=s;l<n.length;++l)if(l!==s&&(i+=r),i+=n[l],o=a[i],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<n.length-1)continue;s+=l-s+1;break}a=o}return a},bo=e=>e==null?void 0:e.replace("_","-"),aP={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var r,n;(n=(r=console==null?void 0:console[e])==null?void 0:r.apply)==null||n.call(r,console,t)}};class vo{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,r)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||aP,this.options=r,this.debug=r.debug}log(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"log","",!0)}warn(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"warn","",!0)}error(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"error","")}deprecate(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,n,a){return a&&!this.debug?null:(pe(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new vo(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new vo(this.logger,t)}}var Yt=new vo;class ni{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const a=this.observers[n].get(r)||0;this.observers[n].set(r,a+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(o=>{let[i,l]=o;for(let c=0;c<l;c++)i(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[i,l]=o;for(let c=0;c<l;c++)i.apply(i,[t,...n])})}}class Xd extends ni{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n){var c,u;let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,o=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let i;t.indexOf(".")>-1?i=t.split("."):(i=[t,r],n&&(Array.isArray(n)?i.push(...n):pe(n)&&s?i.push(...n.split(s)):i.push(n)));const l=yo(this.data,i);return!l&&!r&&!n&&t.indexOf(".")>-1&&(t=i[0],r=i[1],n=i.slice(2).join(".")),l||!o||!pe(n)?l:Il((u=(c=this.data)==null?void 0:c[t])==null?void 0:u[r],n,s)}addResource(t,r,n,a){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let i=[t,r];n&&(i=i.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(i=t.split("."),a=r,r=i[1]),this.addNamespaces(r),Qd(this.data,i,a),s.silent||this.emit("added",t,r,n,a)}addResources(t,r,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in n)(pe(n[s])||Array.isArray(n[s]))&&this.addResource(t,r,s,n[s],{silent:!0});a.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,a,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},i=[t,r];t.indexOf(".")>-1&&(i=t.split("."),a=n,n=r,r=i[1]),this.addNamespaces(r);let l=yo(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),a?xm(l,n,s):l={...l,...n},Qd(this.data,i,l),o.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(a=>r[a]&&Object.keys(r[a]).length>0)}toJSON(){return this.data}}var Sm={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,a){return e.forEach(s=>{var o;t=((o=this.processors[s])==null?void 0:o.process(t,r,n,a))??t}),t}};const Zd={},eh=e=>!pe(e)&&typeof e!="boolean"&&typeof e!="number";class xo extends ni{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),WC(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Yt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const n=this.resolve(t,r);return(n==null?void 0:n.res)!==void 0}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=r.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,i=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!nP(t,n,a);if(o&&!i){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:pe(s)?[s]:s};const c=t.split(n);(n!==a||n===a&&this.options.ns.indexOf(c[0])>-1)&&(s=c.shift()),t=c.join(a)}return{key:t,namespaces:pe(s)?[s]:s}}translate(t,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const a=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:o,namespaces:i}=this.extractFromKey(t[t.length-1],r),l=i[i.length-1],c=r.lng||this.language,u=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode"){if(u){const A=r.nsSeparator||this.options.nsSeparator;return a?{res:`${l}${A}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${A}${o}`}return a?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:o}const d=this.resolve(t,r);let h=d==null?void 0:d.res;const p=(d==null?void 0:d.usedKey)||o,m=(d==null?void 0:d.exactUsedKey)||o,f=["[object Number]","[object Function]","[object RegExp]"],g=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,T=r.count!==void 0&&!pe(r.count),O=xo.hasDefaultValue(r),C=T?this.pluralResolver.getSuffix(c,r.count,r):"",E=r.ordinal&&T?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",R=T&&!r.ordinal&&r.count===0,P=R&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${C}`]||r[`defaultValue${E}`]||r.defaultValue;let _=h;S&&!h&&O&&(_=P);const B=eh(_),b=Object.prototype.toString.apply(_);if(S&&_&&B&&f.indexOf(b)<0&&!(pe(g)&&Array.isArray(_))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const A=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,_,{...r,ns:i}):`key '${o} (${this.language})' returned an object instead of string.`;return a?(d.res=A,d.usedParams=this.getUsedParamsDetails(r),d):A}if(s){const A=Array.isArray(_),z=A?[]:{},I=A?m:p;for(const G in _)if(Object.prototype.hasOwnProperty.call(_,G)){const re=`${I}${s}${G}`;O&&!h?z[G]=this.translate(re,{...r,defaultValue:eh(P)?P[G]:void 0,joinArrays:!1,ns:i}):z[G]=this.translate(re,{...r,joinArrays:!1,ns:i}),z[G]===re&&(z[G]=_[G])}h=z}}else if(S&&pe(g)&&Array.isArray(h))h=h.join(g),h&&(h=this.extendTranslation(h,t,r,n));else{let A=!1,z=!1;!this.isValidLookup(h)&&O&&(A=!0,h=P),this.isValidLookup(h)||(z=!0,h=o);const G=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&z?void 0:h,re=O&&P!==h&&this.options.updateMissing;if(z||A||re){if(this.logger.log(re?"updateKey":"missingKey",c,l,o,re?P:h),s){const ae=this.resolve(o,{...r,keySeparator:!1});ae&&ae.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let te=[];const oe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&oe&&oe[0])for(let ae=0;ae<oe.length;ae++)te.push(oe[ae]);else this.options.saveMissingTo==="all"?te=this.languageUtils.toResolveHierarchy(r.lng||this.language):te.push(r.lng||this.language);const Z=(ae,ge,ue)=>{var ct;const De=O&&ue!==h?ue:G;this.options.missingKeyHandler?this.options.missingKeyHandler(ae,l,ge,De,re,r):(ct=this.backendConnector)!=null&&ct.saveMissing&&this.backendConnector.saveMissing(ae,l,ge,De,re,r),this.emit("missingKey",ae,l,ge,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?te.forEach(ae=>{const ge=this.pluralResolver.getSuffixes(ae,r);R&&r[`defaultValue${this.options.pluralSeparator}zero`]&&ge.indexOf(`${this.options.pluralSeparator}zero`)<0&&ge.push(`${this.options.pluralSeparator}zero`),ge.forEach(ue=>{Z([ae],o+ue,r[`defaultValue${ue}`]||P)})}):Z(te,o,P))}h=this.extendTranslation(h,t,r,d,n),z&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${l}:${o}`),(z||A)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,A?h:void 0))}return a?(d.res=h,d.usedParams=this.getUsedParamsDetails(r),d):h}extendTranslation(t,r,n,a,s){var c,u;var o=this;if((c=this.i18nFormat)!=null&&c.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const d=pe(t)&&(((u=n==null?void 0:n.interpolation)==null?void 0:u.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(d){const m=t.match(this.interpolator.nestingRegexp);h=m&&m.length}let p=n.replace&&!pe(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,n.lng||this.language||a.usedLng,n),d){const m=t.match(this.interpolator.nestingRegexp),f=m&&m.length;h<f&&(n.nest=!1)}!n.lng&&a&&a.res&&(n.lng=this.language||a.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var m=arguments.length,f=new Array(m),g=0;g<m;g++)f[g]=arguments[g];return(s==null?void 0:s[0])===f[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${r[0]}`),null):o.translate(...f,r)},n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,l=pe(i)?[i]:i;return t!=null&&(l!=null&&l.length)&&n.applyPostProcessor!==!1&&(t=Sm.handle(l,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,a,s,o,i;return pe(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(l,r),u=c.key;a=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const h=r.count!==void 0&&!pe(r.count),p=h&&!r.ordinal&&r.count===0,m=r.context!==void 0&&(pe(r.context)||typeof r.context=="number")&&r.context!=="",f=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);d.forEach(g=>{var S,T;this.isValidLookup(n)||(i=g,!Zd[`${f[0]}-${g}`]&&((S=this.utils)!=null&&S.hasLoadedNamespace)&&!((T=this.utils)!=null&&T.hasLoadedNamespace(i))&&(Zd[`${f[0]}-${g}`]=!0,this.logger.warn(`key "${a}" for languages "${f.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(O=>{var R;if(this.isValidLookup(n))return;o=O;const C=[u];if((R=this.i18nFormat)!=null&&R.addLookupKeys)this.i18nFormat.addLookupKeys(C,u,O,g,r);else{let P;h&&(P=this.pluralResolver.getSuffix(O,r.count,r));const _=`${this.options.pluralSeparator}zero`,B=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(C.push(u+P),r.ordinal&&P.indexOf(B)===0&&C.push(u+P.replace(B,this.options.pluralSeparator)),p&&C.push(u+_)),m){const b=`${u}${this.options.contextSeparator}${r.context}`;C.push(b),h&&(C.push(b+P),r.ordinal&&P.indexOf(B)===0&&C.push(b+P.replace(B,this.options.pluralSeparator)),p&&C.push(b+_))}}let E;for(;E=C.pop();)this.isValidLookup(n)||(s=E,n=this.getResource(O,g,E,r))}))})}),{res:n,usedKey:a,exactUsedKey:s,usedLng:o,usedNS:i}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n){var s;let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(t,r,n,a):this.resourceStore.getResource(t,r,n,a)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!pe(t.replace);let a=n?t.replace:t;if(n&&typeof t.count<"u"&&(a.count=t.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!n){a={...a};for(const s of r)delete a[s]}return a}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}class th{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Yt.create("languageUtils")}getScriptPartFromCode(t){if(t=bo(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=bo(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(pe(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(n=>{if(r)return;const a=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(a))&&(r=a)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return r=a;r=this.options.supportedLngs.find(s=>{if(s===a)return s;if(!(s.indexOf("-")<0&&a.indexOf("-")<0)&&(s.indexOf("-")>0&&a.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===a||s.indexOf(a)===0&&a.length>1))return s})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),pe(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],t),a=[],s=o=>{o&&(this.isSupportedCode(o)?a.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return pe(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):pe(t)&&s(this.formatLanguageCode(t)),n.forEach(o=>{a.indexOf(o)<0&&s(this.formatLanguageCode(o))}),a}}const rh={zero:0,one:1,two:2,few:3,many:4,other:5},nh={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class sP{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=r,this.logger=Yt.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=bo(t==="dev"?"en":t),a=r.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:n,type:a});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let o;try{o=new Intl.PluralRules(n,{type:a})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),nh;if(!t.match(/-|_/))return nh;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,r)}return this.pluralRulesCache[s]=o,o}needsPlural(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(a=>`${r}${a}`)}getSuffixes(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort((a,s)=>rh[a]-rh[s]).map(a=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${a}`):[]}getSuffix(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=this.getRule(t,n);return a?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,n))}}const ah=function(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=QC(e,t,r);return!s&&a&&pe(r)&&(s=Il(e,r,n),s===void 0&&(s=Il(t,r,n))),s},Qi=e=>e.replace(/\$/g,"$$$$");class oP{constructor(){var r;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yt.create("interpolator"),this.options=t,this.format=((r=t==null?void 0:t.interpolation)==null?void 0:r.format)||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:a,prefix:s,prefixEscaped:o,suffix:i,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:f,nestingOptionsSeparator:g,maxReplaces:S,alwaysFormat:T}=t.interpolation;this.escape=r!==void 0?r:ZC,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=s?xn(s):o||"{{",this.suffix=i?xn(i):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=h?xn(h):p||xn("$t("),this.nestingSuffix=m?xn(m):f||xn(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=S||1e3,this.alwaysFormat=T!==void 0?T:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>(r==null?void 0:r.source)===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,r,n,a){var p;let s,o,i;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=m=>{if(m.indexOf(this.formatSeparator)<0){const T=ah(r,l,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(T,void 0,n,{...a,...r,interpolationkey:m}):T}const f=m.split(this.formatSeparator),g=f.shift().trim(),S=f.join(this.formatSeparator).trim();return this.format(ah(r,l,g,this.options.keySeparator,this.options.ignoreJSONStructure),S,n,{...a,...r,interpolationkey:g})};this.resetRegExp();const u=(a==null?void 0:a.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((p=a==null?void 0:a.interpolation)==null?void 0:p.skipOnVariables)!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>Qi(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?Qi(this.escape(m)):Qi(m)}].forEach(m=>{for(i=0;s=m.regex.exec(t);){const f=s[1].trim();if(o=c(f),o===void 0)if(typeof u=="function"){const S=u(t,s,a);o=pe(S)?S:""}else if(a&&Object.prototype.hasOwnProperty.call(a,f))o="";else if(d){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${f} for interpolating ${t}`),o="";else!pe(o)&&!this.useRawValueToEscape&&(o=Wd(o));const g=m.safeValue(o);if(t=t.replace(s[0],g),d?(m.regex.lastIndex+=o.length,m.regex.lastIndex-=s[0].length):m.regex.lastIndex=0,i++,i>=this.maxReplaces)break}}),t}nest(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,o;const i=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const d=l.split(new RegExp(`${u}[ ]*{`));let h=`{${d[1]}`;l=d[0],h=this.interpolate(h,o);const p=h.match(/'/g),m=h.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!m||m.length%2!==0)&&(h=h.replace(/'/g,'"'));try{o=JSON.parse(h),c&&(o={...c,...o})}catch(f){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,f),`${l}${u}${h}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;a=this.nestingRegexp.exec(t);){let l=[];o={...n},o=o.replace&&!pe(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){const u=a[1].split(this.formatSeparator).map(d=>d.trim());a[1]=u.shift(),l=u,c=!0}if(s=r(i.call(this,a[1].trim(),o),o),s&&a[0]===t&&!pe(s))return s;pe(s)||(s=Wd(s)),s||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${t}`),s=""),c&&(s=l.reduce((u,d)=>this.format(u,d,n.lng,{...n,interpolationkey:a[1].trim()}),s.trim())),t=t.replace(a[0],s),this.regexp.lastIndex=0}return t}}const iP=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const a=n[1].substring(0,n[1].length-1);t==="currency"&&a.indexOf(":")<0?r.currency||(r.currency=a.trim()):t==="relativetime"&&a.indexOf(":")<0?r.range||(r.range=a.trim()):a.split(";").forEach(o=>{if(o){const[i,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=i.trim();r[u]||(r[u]=c),c==="false"&&(r[u]=!1),c==="true"&&(r[u]=!0),isNaN(c)||(r[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:r}},Sn=e=>{const t={};return(r,n,a)=>{let s=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(s={...s,[a.interpolationkey]:void 0});const o=n+JSON.stringify(s);let i=t[o];return i||(i=e(bo(n),a),t[o]=i),i(r)}};class lP{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yt.create("formatter"),this.options=t,this.formats={number:Sn((r,n)=>{const a=new Intl.NumberFormat(r,{...n});return s=>a.format(s)}),currency:Sn((r,n)=>{const a=new Intl.NumberFormat(r,{...n,style:"currency"});return s=>a.format(s)}),datetime:Sn((r,n)=>{const a=new Intl.DateTimeFormat(r,{...n});return s=>a.format(s)}),relativetime:Sn((r,n)=>{const a=new Intl.RelativeTimeFormat(r,{...n});return s=>a.format(s,n.range||"day")}),list:Sn((r,n)=>{const a=new Intl.ListFormat(r,{...n});return s=>a.format(s)})},this.init(t)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=Sn(r)}format(t,r,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=r.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(i=>i.indexOf(")")>-1)){const i=s.findIndex(l=>l.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,i)].join(this.formatSeparator)}return s.reduce((i,l)=>{var d;const{formatName:c,formatOptions:u}=iP(l);if(this.formats[c]){let h=i;try{const p=((d=a==null?void 0:a.formatParams)==null?void 0:d[a.interpolationkey])||{},m=p.locale||p.lng||a.locale||a.lng||n;h=this.formats[c](i,m,{...u,...a,...p})}catch(p){this.logger.warn(p)}return h}else this.logger.warn(`there was no format function for ${c}`);return i},t)}}const cP=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class uP extends ni{constructor(t,r,n){var s,o;let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=a,this.logger=Yt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],(o=(s=this.backend)==null?void 0:s.init)==null||o.call(s,n,a.backend,a)}queueLoad(t,r,n,a){const s={},o={},i={},l={};return t.forEach(c=>{let u=!0;r.forEach(d=>{const h=`${c}|${d}`;!n.reload&&this.store.hasResourceBundle(c,d)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?o[h]===void 0&&(o[h]=!0):(this.state[h]=1,u=!1,o[h]===void 0&&(o[h]=!0),s[h]===void 0&&(s[h]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(i[c]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(l)}}loaded(t,r,n){const a=t.split("|"),s=a[0],o=a[1];r&&this.emit("failedLoading",s,o,r),!r&&n&&this.store.addResourceBundle(s,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);const i={};this.queue.forEach(l=>{YC(l.loaded,[s],o),cP(l,t),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{i[c]||(i[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{i[c][d]===void 0&&(i[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(l=>!l.done)}read(t,r,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:a,wait:s,callback:o});return}this.readingCalls++;const i=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&a<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,n,a+1,s*2,o)},s);return}o(c,u)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const c=l(t,r);c&&typeof c.then=="function"?c.then(u=>i(null,u)).catch(i):i(null,c)}catch(c){i(c)}return}return l(t,r,i)}prepareLoading(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();pe(t)&&(t=this.languageUtils.toResolveHierarchy(t)),pe(r)&&(r=[r]);const s=this.queueLoad(t,r,n,a);if(!s.toLoad.length)return s.pending.length||a(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=t.split("|"),a=n[0],s=n[1];this.read(a,s,"read",void 0,void 0,(o,i)=>{o&&this.logger.warn(`${r}loading namespace ${s} for language ${a} failed`,o),!o&&i&&this.logger.log(`${r}loaded namespace ${s} for language ${a}`,i),this.loaded(t,o,i)})}saveMissing(t,r,n,a,s){var l,c,u,d,h;let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((d=(u=this.services)==null?void 0:u.utils)!=null&&d.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((h=this.backend)!=null&&h.create){const p={...o,isUpdate:s},m=this.backend.create.bind(this.backend);if(m.length<6)try{let f;m.length===5?f=m(t,r,n,a,p):f=m(t,r,n,a),f&&typeof f.then=="function"?f.then(g=>i(null,g)).catch(i):i(null,f)}catch(f){i(f)}else m(t,r,n,a,i,p)}!t||!t[0]||this.store.addResource(t[0],r,n,a)}}}const sh=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),pe(e[1])&&(t.defaultValue=e[1]),pe(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(n=>{t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),oh=e=>{var t,r;return pe(e.ns)&&(e.ns=[e.ns]),pe(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),pe(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((r=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:r.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},Ps=()=>{},dP=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class qa extends ni{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=oh(t),this.services={},this.logger=Yt,this.modules={external:[]},dP(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(){var t=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),r.defaultNS==null&&r.ns&&(pe(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const a=sh();this.options={...a,...this.options,...oh(r)},this.options.interpolation={...a.interpolation,...this.options.interpolation},r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const s=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Yt.init(s(this.modules.logger),this.options):Yt.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=lP;const d=new th(this.options);this.store=new Xd(this.options.resources,this.options);const h=this.services;h.logger=Yt,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new sP(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(h.formatter=s(u),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new oP(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new uP(s(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(p){for(var m=arguments.length,f=new Array(m>1?m-1:0),g=1;g<m;g++)f[g-1]=arguments[g];t.emit(p,...f)}),this.modules.languageDetector&&(h.languageDetector=s(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=s(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new xo(this.services,this.options),this.translator.on("*",function(p){for(var m=arguments.length,f=new Array(m>1?m-1:0),g=1;g<m;g++)f[g-1]=arguments[g];t.emit(p,...f)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Ps),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=ya(),c=()=>{const u=(d,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(h),n(d,h)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),l}loadResources(t){var s,o;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ps;const a=pe(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if((a==null?void 0:a.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const i=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(d=>{d!=="cimode"&&i.indexOf(d)<0&&i.push(d)})};a?l(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>l(u)),(o=(s=this.options.preload)==null?void 0:s.forEach)==null||o.call(s,c=>l(c)),this.services.backendConnector.load(i,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(c)})}else n(null)}reloadResources(t,r,n){const a=ya();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=Ps),this.services.backendConnector.reload(t,r,s=>{a.resolve(),n(s)}),a}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Sm.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(t,r){var n=this;this.isLanguageChangingTo=t;const a=ya();this.emit("languageChanging",t);const s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,c)=>{c?(s(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,a.resolve(function(){return n.t(...arguments)}),r&&r(l,function(){return n.t(...arguments)})},i=l=>{var u,d;!t&&!l&&this.services.languageDetector&&(l=[]);const c=pe(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||s(c),this.translator.language||this.translator.changeLanguage(c),(d=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||d.call(u,c)),this.loadResources(c,h=>{o(h,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(t),a}getFixedT(t,r,n){var a=this;const s=function(o,i){let l;if(typeof i!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d<c;d++)u[d-2]=arguments[d];l=a.options.overloadTranslationOptionHandler([o,i].concat(u))}else l={...i};l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||s.keyPrefix);const h=a.options.keySeparator||".";let p;return l.keyPrefix&&Array.isArray(o)?p=o.map(m=>`${l.keyPrefix}${h}${m}`):p=l.keyPrefix?`${l.keyPrefix}${h}${o}`:o,a.t(p,l)};return pe(t)?s.lng=t:s.lngs=t,s.ns=r,s.keyPrefix=n,s}t(){var a;for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return(a=this.translator)==null?void 0:a.translate(...r)}exists(){var a;for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return(a=this.translator)==null?void 0:a.exists(...r)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(i,l)=>{const c=this.services.backendConnector.state[`${i}|${l}`];return c===-1||c===0||c===2};if(r.precheck){const i=r.precheck(this,o);if(i!==void 0)return i}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!a||o(s,t)))}loadNamespaces(t,r){const n=ya();return this.options.ns?(pe(t)&&(t=[t]),t.forEach(a=>{this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}),this.loadResources(a=>{n.resolve(),r&&r(a)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=ya();pe(t)&&(t=[t]);const a=this.options.preload||[],s=t.filter(o=>a.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=a.concat(s),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(t){var a,s;if(t||(t=this.resolvedLanguage||(((a=this.languages)==null?void 0:a.length)>0?this.languages[0]:this.language)),!t)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((s=this.services)==null?void 0:s.languageUtils)||new th(sh());return r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new qa(t,r)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ps;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const a={...this.options,...t,isClone:!0},s=new qa(a);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(i=>{s[i]=this[i]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n){const i=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},Object.keys(l[c]).reduce((u,d)=>(u[d]={...l[c][d]},u),{})),{});s.store=new Xd(i,a),s.services.resourceStore=s.store}return s.translator=new xo(s.services,a),s.translator.on("*",function(i){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];s.emit(i,...c)}),s.init(a,r),s.translator.options=a,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const lt=qa.createInstance();lt.createInstance=qa.createInstance;lt.createInstance;lt.dir;lt.init;lt.loadResources;lt.reloadResources;lt.use;lt.changeLanguage;lt.getFixedT;lt.t;lt.exists;lt.setDefaultNamespace;lt.hasLoadedNamespace;lt.loadNamespaces;lt.loadLanguages;const hP={"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.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.
|
|
136
|
+
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.Of.lb":"von","CycleTimer.Min.lb":"min."},pP={"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.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":"remaining time","CycleTimer.Of.lb":"of","CycleTimer.Min.lb":"min."},Gc=lt.createInstance();Gc.use(uy).init({supportedLngs:["en","de"],resources:{en:{translations:pP},de:{translations:hP}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function en(e){return r=>x.jsx(fP,{children:x.jsx(e,{...r})})}const fP=({children:e})=>x.jsx(ze.I18nextProvider,{i18n:Gc,children:e}),mP=en(Je.observer(({onCycleComplete:e,onCycleEnd:t,autoStart:r=!0,variant:n="default",compact:a=!1,className:s})=>{var T;const o=W.useTheme(),{t:i}=ze.useTranslation(),[l,c]=se.useState(0),[u,d]=se.useState(0),[h,p]=se.useState(!1),m=se.useRef(null),f=se.useCallback(O=>{console.log(`Starting new cycle with ${O} seconds`),d(O),c(O),r?(console.log("Auto-start enabled, starting timer"),p(!0)):console.log("Auto-start disabled, timer set but not started")},[r]);se.useEffect(()=>{let O=!0;const C=setTimeout(()=>{O&&e(f)},0);return()=>{O=!1,clearTimeout(C)}},[e,f]),se.useEffect(()=>(h&&l>0?m.current=setInterval(()=>{c(O=>O<=1?(p(!1),t&&setTimeout(()=>t(),0),console.log("Cycle completed! Timer reached zero."),0):O-1)},1e3):m.current&&(clearInterval(m.current),m.current=null),()=>{m.current&&clearInterval(m.current)}),[h,l,t]);const g=O=>{const C=Math.floor(O/60),E=O%60;return`${C}:${E.toString().padStart(2,"0")}`},S=u>0?(u-l)/u*100:0;return n==="small"?x.jsxs(W.Box,{className:s,sx:{display:"flex",alignItems:"center",gap:.125},children:[x.jsx(W.Box,{sx:{position:"relative",width:40,height:40,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",overflow:"visible"},children:x.jsx(go,{width:40,height:40,value:S,valueMin:0,valueMax:100,innerRadius:"70%",outerRadius:"95%",sx:{"& .MuiGauge-valueArc":{fill:o.palette.success.main},"& .MuiGauge-referenceArc":{fill:o.palette.success.main,opacity:.3},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"},"& text":{display:"none"}}})}),x.jsx(W.Typography,{variant:"body2",sx:{color:o.palette.text.primary,fontSize:"14px"},children:a?g(l):`${g(l)} / ${g(u)} ${i("CycleTimer.Min.lb")}`})]}):x.jsxs(W.Box,{className:s,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[x.jsx(go,{width:264,height:264,value:S,valueMin:0,valueMax:100,innerRadius:"71%",outerRadius:"90%",sx:{"& .MuiGauge-valueArc":{fill:o.palette.success.main},"& .MuiGauge-referenceArc":{fill:"white",stroke:"transparent"}}}),x.jsxs(W.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:187,height:187,borderRadius:"50%",backgroundColor:(T=o.palette.backgroundPaperElevation)==null?void 0:T[8],display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1},children:[x.jsx(W.Typography,{variant:"body2",sx:{fontSize:"12px",color:o.palette.text.secondary,marginBottom:.5},children:i("CycleTimer.RemainingTime.lb")}),x.jsx(W.Typography,{variant:"h1",sx:{fontSize:"48px",fontWeight:500,color:o.palette.text.primary,lineHeight:1,marginBottom:.5},children:g(l)}),x.jsxs(W.Typography,{variant:"body2",sx:{fontSize:"12px",color:o.palette.text.secondary},children:[i("CycleTimer.Of.lb")," ",g(u)," ",i("CycleTimer.Min.lb")]})]})]})}));process.env.NODE_ENV!=="production"&&(y.node,y.object.isRequired);function Hc(e){return hb(e)}const jn=Pb({createStyledComponent:Pt("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Hc({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(jn.propTypes={children:y.node,component:y.elementType,direction:y.oneOfType([y.oneOf(["column-reverse","column","row-reverse","row"]),y.arrayOf(y.oneOf(["column-reverse","column","row-reverse","row"])),y.object]),divider:y.node,spacing:y.oneOfType([y.arrayOf(y.oneOfType([y.number,y.string])),y.number,y.object,y.string]),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),useFlexGap:y.bool});const gP=({title:e,titleId:t,...r},n)=>F.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?F.createElement("title",{id:t},e):null,F.createElement("g",{id:"JogMinus"},F.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),yP=se.forwardRef(gP),bP=({title:e,titleId:t,...r},n)=>F.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?F.createElement("title",{id:t},e):null,F.createElement("g",{id:"JogPlus"},F.createElement("g",{id:"Plus"},F.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),F.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),F.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),vP=se.forwardRef(bP);function ai(e){se.useEffect(e,[])}function Om(e){ai(()=>Xe.autorun(e))}function wm(e,t,r){ai(()=>Xe.reaction(e,t,r))}function Yn(e){return ai(()=>{let t;function r(){e(),t=requestAnimationFrame(r)}return t=requestAnimationFrame(r),()=>{cancelAnimationFrame(t)}})}const Ml=en(Je.observer(({colors:e,label:t,getDisplayedValue:r,startJogging:n,stopJogging:a,disabled:s,activeJoggingDirection:o,...i})=>{var O,C,E,R,P,_,B;Yn(()=>{const b=r(),A=h.current;A&&(A.textContent=b)});const l=W.useTheme(),[c,u]=se.useState(null);se.useEffect(()=>{s&&T()},[s]);const d=o||c,h=se.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const p=d?(O=e.buttonBackgroundColor)==null?void 0:O.pressed:e.borderColor,m={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},f={...m,backgroundColor:(C=e.buttonBackgroundColor)==null?void 0:C.default,":hover":{backgroundColor:(E=e.buttonBackgroundColor)==null?void 0:E.hovered},":active":{backgroundColor:(R=e.buttonBackgroundColor)==null?void 0:R.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor}},":disabled":{backgroundColor:(P=e.buttonBackgroundColor)==null?void 0:P.disabled,"svg path":{fill:l.palette.action.disabled}}},g={...m,backgroundColor:(_=e.buttonBackgroundColor)==null?void 0:_.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(B=e.buttonBackgroundColor)==null?void 0:B.pressed,"svg path":{fill:l.palette.action.disabled}}};function S(b,A){s||b.button===0&&(u(A),n(A))}function T(){u(null),a()}return x.jsxs(jn,{height:"64px",direction:"row",justifyContent:"center",...i,children:[x.jsx(W.IconButton,{disabled:s,disableRipple:!0,onPointerDown:b=>S(b,"-"),onPointerUp:T,onPointerOut:T,size:"large",sx:{...d==="-"?g:f,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:x.jsx(yP,{})}),x.jsxs(jn,{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:[x.jsx(jn,{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}),x.jsx(W.Typography,{height:"22px",sx:{fontSize:"15px",color:s?l.palette.action.disabled:e.color,fontWeight:700},ref:h,children:r()})]}),x.jsx(W.IconButton,{disableRipple:!0,disabled:s,onPointerDown:b=>S(b,"+"),onPointerUp:T,onPointerOut:T,size:"large",sx:{...d==="+"?g:f,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:x.jsx(vP,{})})]})})),tn=pb;function xP(e){return ts("MuiSvgIcon",e)}$p("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const SP=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${dt(t)}`,`fontSize${dt(r)}`]};return ac(a,xP,n)},OP=Pt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${dt(r.color)}`],t[`fontSize${dt(r.fontSize)}`]]}})(tn(({theme:e})=>{var t,r,n,a,s,o,i,l,c,u,d,h,p,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(a=(t=e.transitions)==null?void 0:t.create)==null?void 0:a.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:f=>!f.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:o.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(([,f])=>f&&f.main).map(([f])=>{var g,S;return{props:{color:f},style:{color:(S=(g=(e.vars??e).palette)==null?void 0:g[f])==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:(m=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:m.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),So=F.forwardRef(function(t,r){const n=Hc({props:t,name:"MuiSvgIcon"}),{children:a,className:s,color:o="inherit",component:i="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...p}=n,m=F.isValidElement(a)&&a.type==="svg",f={...n,color:o,component:i,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:m},g={};u||(g.viewBox=h);const S=SP(f);return x.jsxs(OP,{as:i,className:Nt(S.root,s),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...g,...p,...m&&a.props,ownerState:f,children:[m?a.props.children:a,d?x.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(So.propTypes={children:y.node,classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),y.string]),component:y.elementType,fontSize:y.oneOfType([y.oneOf(["inherit","large","medium","small"]),y.string]),htmlColor:y.string,inheritViewBox:y.bool,shapeRendering:y.string,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),titleAccess:y.string,viewBox:y.string});So.muiName="SvgIcon";function si(e,t){function r(n,a){return x.jsx(So,{"data-testid":`${t}Icon`,ref:a,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=So.muiName,F.memo(F.forwardRef(r))}const wP=si(x.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),CP=si(x.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function Hr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Cm=typeof global=="object"&&global&&global.Object===Object&&global,PP=typeof self=="object"&&self&&self.Object===Object&&self,Zt=Cm||PP||Function("return this")(),Xi=function(){return Zt.Date.now()},RP=/\s/;function TP(e){for(var t=e.length;t--&&RP.test(e.charAt(t)););return t}var AP=/^\s+/;function VP(e){return e&&e.slice(0,TP(e)+1).replace(AP,"")}var Tr=Zt.Symbol,Pm=Object.prototype,EP=Pm.hasOwnProperty,_P=Pm.toString,ba=Tr?Tr.toStringTag:void 0;function IP(e){var t=EP.call(e,ba),r=e[ba];try{e[ba]=void 0;var n=!0}catch{}var a=_P.call(e);return n&&(t?e[ba]=r:delete e[ba]),a}var MP=Object.prototype,$P=MP.toString;function jP(e){return $P.call(e)}var kP="[object Null]",LP="[object Undefined]",ih=Tr?Tr.toStringTag:void 0;function rn(e){return e==null?e===void 0?LP:kP:ih&&ih in Object(e)?IP(e):jP(e)}function qr(e){return e!=null&&typeof e=="object"}var UP="[object Symbol]";function oi(e){return typeof e=="symbol"||qr(e)&&rn(e)==UP}var lh=NaN,DP=/^[-+]0x[0-9a-f]+$/i,NP=/^0b[01]+$/i,FP=/^0o[0-7]+$/i,BP=parseInt;function ch(e){if(typeof e=="number")return e;if(oi(e))return lh;if(Hr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Hr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=VP(e);var r=NP.test(e);return r||FP.test(e)?BP(e.slice(2),r?2:8):DP.test(e)?lh:+e}var zP="Expected a function",GP=Math.max,HP=Math.min;function qP(e,t,r){var n,a,s,o,i,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(zP);t=ch(t)||0,Hr(r)&&(u=!!r.leading,d="maxWait"in r,s=d?GP(ch(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h);function p(R){var P=n,_=a;return n=a=void 0,c=R,o=e.apply(_,P),o}function m(R){return c=R,i=setTimeout(S,t),u?p(R):o}function f(R){var P=R-l,_=R-c,B=t-P;return d?HP(B,s-_):B}function g(R){var P=R-l,_=R-c;return l===void 0||P>=t||P<0||d&&_>=s}function S(){var R=Xi();if(g(R))return T(R);i=setTimeout(S,f(R))}function T(R){return i=void 0,h&&n?p(R):(n=a=void 0,o)}function O(){i!==void 0&&clearTimeout(i),c=0,n=l=a=i=void 0}function C(){return i===void 0?o:T(Xi())}function E(){var R=Xi(),P=g(R);if(n=arguments,a=this,l=R,P){if(i===void 0)return m(l);if(d)return clearTimeout(i),i=setTimeout(S,t),p(l)}return i===void 0&&(i=setTimeout(S,t)),o}return E.cancel=O,E.flush=C,E}var JP="Expected a function";function WP(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(JP);return Hr(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),qP(e,t,{leading:n,maxWait:t,trailing:a})}const Rm=en(Je.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:r,upperLimitDegs:n,getValueDegs:a,disabled:s,...o})=>{var O,C,E,R,P,_,B,b,A,z,I,G,re,te,oe;const{t:i}=ze.useTranslation(),[l,c]=se.useState(),u=W.useTheme(),d={background:(O=u.palette.backgroundPaperElevation)==null?void 0:O[4],color:(C=u.palette.backgroundPaperElevation)==null?void 0:C[11]},h=Je.useLocalObservable(()=>({activeJoggingDir:null,startJogging(Z){this.activeJoggingDir=Z,e(Z)},stopJogging(){this.activeJoggingDir=null,t()}})),p=WP(()=>{c(a())},50);Yn(p);function m(Z){Z.button===0&&h.startJogging("-")}function f(Z){Z.button===0&&h.startJogging("+")}function g(Z){h.stopJogging()}function S(Z){h.stopJogging()}function T(Z,ae=1){if(Z===void 0||isNaN(Z))return"";const ge=i("General.degree.variable",{amount:Z.toFixed(ae)});return Z>0&&ae===0?`+${ge}`:ge}return x.jsxs(jn,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...o,sx:{"& .MuiIconButton-root":{width:"52px",color:u.palette.text.primary,alignContent:"center",backgroundColor:(E=u.palette.backgroundPaperElevation)==null?void 0:E[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(R=u.palette.backgroundPaperElevation)==null?void 0:R[11],color:u.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(P=u.palette.backgroundPaperElevation)==null?void 0:P[9]},"&:active":{...d}}},children:[x.jsx(W.IconButton,{onPointerDown:m,onPointerUp:g,onPointerOut:S,disabled:s,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:x.jsx(wP,{sx:{pointerEvents:"none",color:(A=(b=(B=(_=u.componentsExt)==null?void 0:_.JoggingPanel)==null?void 0:B.JoggingJoint)==null?void 0:b.Joint)==null?void 0:A.arrowColor}})}),x.jsxs(jn,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(z=u.palette.backgroundPaperElevation)==null?void 0:z[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[x.jsx(W.Typography,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",color:s?u.palette.action.disabled:u.palette.text.primary},children:T(l)}),x.jsx(W.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:(I=u.palette.backgroundPaperElevation)==null?void 0:I[5],opacity:1}},marks:r!==void 0&&n!==void 0&&[{value:r,label:T(r,0)},{value:n,label:T(n,0)}]})]}),x.jsx(W.IconButton,{onPointerDown:f,onPointerUp:g,onPointerOut:S,disabled:s,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:x.jsx(CP,{sx:{pointerEvents:"none",color:(oe=(te=(re=(G=u.componentsExt)==null?void 0:G.JoggingPanel)==null?void 0:re.JoggingJoint)==null?void 0:te.Joint)==null?void 0:oe.arrowColor}})})]})})),KP=si(x.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"),YP=si(x.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");function QP(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Tm=QP;function XP(){this.__data__=[],this.size=0}var ZP=XP;function eR(e,t){return e===t||e!==e&&t!==t}var Am=eR;function tR(e,t){for(var r=e.length;r--;)if(Am(e[r][0],t))return r;return-1}var ii=tR,rR=Array.prototype,nR=rR.splice;function aR(e){var t=this.__data__,r=ii(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():nR.call(t,r,1),--this.size,!0}var sR=aR;function oR(e){var t=this.__data__,r=ii(t,e);return r<0?void 0:t[r][1]}var iR=oR;function lR(e){return ii(this.__data__,e)>-1}var cR=lR;function uR(e,t){var r=this.__data__,n=ii(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var dR=uR;function Qn(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])}}Qn.prototype.clear=ZP;Qn.prototype.delete=sR;Qn.prototype.get=iR;Qn.prototype.has=cR;Qn.prototype.set=dR;var li=Qn;function hR(){this.__data__=new li,this.size=0}var pR=hR;function fR(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var mR=fR;function gR(e){return this.__data__.get(e)}var yR=gR;function bR(e){return this.__data__.has(e)}var vR=bR,xR=typeof global=="object"&&global&&global.Object===Object&&global,Vm=xR,SR=typeof self=="object"&&self&&self.Object===Object&&self,OR=Vm||SR||Function("return this")(),hr=OR,wR=hr.Symbol,qn=wR,Em=Object.prototype,CR=Em.hasOwnProperty,PR=Em.toString,va=qn?qn.toStringTag:void 0;function RR(e){var t=CR.call(e,va),r=e[va];try{e[va]=void 0;var n=!0}catch{}var a=PR.call(e);return n&&(t?e[va]=r:delete e[va]),a}var TR=RR,AR=Object.prototype,VR=AR.toString;function ER(e){return VR.call(e)}var _R=ER,IR="[object Null]",MR="[object Undefined]",uh=qn?qn.toStringTag:void 0;function $R(e){return e==null?e===void 0?MR:IR:uh&&uh in Object(e)?TR(e):_R(e)}var ls=$R,jR="[object AsyncFunction]",kR="[object Function]",LR="[object GeneratorFunction]",UR="[object Proxy]";function DR(e){if(!Tm(e))return!1;var t=ls(e);return t==kR||t==LR||t==jR||t==UR}var _m=DR,NR=hr["__core-js_shared__"],Zi=NR,dh=function(){var e=/[^.]+$/.exec(Zi&&Zi.keys&&Zi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function FR(e){return!!dh&&dh in e}var BR=FR,zR=Function.prototype,GR=zR.toString;function HR(e){if(e!=null){try{return GR.call(e)}catch{}try{return e+""}catch{}}return""}var nn=HR,qR=/[\\^$.*+?()[\]{}|]/g,JR=/^\[object .+?Constructor\]$/,WR=Function.prototype,KR=Object.prototype,YR=WR.toString,QR=KR.hasOwnProperty,XR=RegExp("^"+YR.call(QR).replace(qR,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ZR(e){if(!Tm(e)||BR(e))return!1;var t=_m(e)?XR:JR;return t.test(nn(e))}var eT=ZR;function tT(e,t){return e==null?void 0:e[t]}var rT=tT;function nT(e,t){var r=rT(e,t);return eT(r)?r:void 0}var Xn=nT,aT=Xn(hr,"Map"),Ja=aT,sT=Xn(Object,"create"),Wa=sT;function oT(){this.__data__=Wa?Wa(null):{},this.size=0}var iT=oT;function lT(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var cT=lT,uT="__lodash_hash_undefined__",dT=Object.prototype,hT=dT.hasOwnProperty;function pT(e){var t=this.__data__;if(Wa){var r=t[e];return r===uT?void 0:r}return hT.call(t,e)?t[e]:void 0}var fT=pT,mT=Object.prototype,gT=mT.hasOwnProperty;function yT(e){var t=this.__data__;return Wa?t[e]!==void 0:gT.call(t,e)}var bT=yT,vT="__lodash_hash_undefined__";function xT(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Wa&&t===void 0?vT:t,this}var ST=xT;function Zn(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])}}Zn.prototype.clear=iT;Zn.prototype.delete=cT;Zn.prototype.get=fT;Zn.prototype.has=bT;Zn.prototype.set=ST;var hh=Zn;function OT(){this.size=0,this.__data__={hash:new hh,map:new(Ja||li),string:new hh}}var wT=OT;function CT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var PT=CT;function RT(e,t){var r=e.__data__;return PT(t)?r[typeof t=="string"?"string":"hash"]:r.map}var ci=RT;function TT(e){var t=ci(this,e).delete(e);return this.size-=t?1:0,t}var AT=TT;function VT(e){return ci(this,e).get(e)}var ET=VT;function _T(e){return ci(this,e).has(e)}var IT=_T;function MT(e,t){var r=ci(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var $T=MT;function ea(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])}}ea.prototype.clear=wT;ea.prototype.delete=AT;ea.prototype.get=ET;ea.prototype.has=IT;ea.prototype.set=$T;var Im=ea,jT=200;function kT(e,t){var r=this.__data__;if(r instanceof li){var n=r.__data__;if(!Ja||n.length<jT-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Im(n)}return r.set(e,t),this.size=r.size,this}var LT=kT;function ta(e){var t=this.__data__=new li(e);this.size=t.size}ta.prototype.clear=pR;ta.prototype.delete=mR;ta.prototype.get=yR;ta.prototype.has=vR;ta.prototype.set=LT;var el=ta,UT="__lodash_hash_undefined__";function DT(e){return this.__data__.set(e,UT),this}var NT=DT;function FT(e){return this.__data__.has(e)}var BT=FT;function Oo(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Im;++t<r;)this.add(e[t])}Oo.prototype.add=Oo.prototype.push=NT;Oo.prototype.has=BT;var zT=Oo;function GT(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var HT=GT;function qT(e,t){return e.has(t)}var JT=qT,WT=1,KT=2;function YT(e,t,r,n,a,s){var o=r&WT,i=e.length,l=t.length;if(i!=l&&!(o&&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&KT?new zT:void 0;for(s.set(e,t),s.set(t,e);++d<i;){var m=e[d],f=t[d];if(n)var g=o?n(f,m,d,t,e,s):n(m,f,d,e,t,s);if(g!==void 0){if(g)continue;h=!1;break}if(p){if(!HT(t,function(S,T){if(!JT(p,T)&&(m===S||a(m,S,r,n,s)))return p.push(T)})){h=!1;break}}else if(!(m===f||a(m,f,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}var Mm=YT,QT=hr.Uint8Array,ph=QT;function XT(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var ZT=XT;function eA(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var tA=eA,rA=1,nA=2,aA="[object Boolean]",sA="[object Date]",oA="[object Error]",iA="[object Map]",lA="[object Number]",cA="[object RegExp]",uA="[object Set]",dA="[object String]",hA="[object Symbol]",pA="[object ArrayBuffer]",fA="[object DataView]",fh=qn?qn.prototype:void 0,tl=fh?fh.valueOf:void 0;function mA(e,t,r,n,a,s,o){switch(r){case fA:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case pA:return!(e.byteLength!=t.byteLength||!s(new ph(e),new ph(t)));case aA:case sA:case lA:return Am(+e,+t);case oA:return e.name==t.name&&e.message==t.message;case cA:case dA:return e==t+"";case iA:var i=ZT;case uA:var l=n&rA;if(i||(i=tA),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;n|=nA,o.set(e,t);var u=Mm(i(e),i(t),n,a,s,o);return o.delete(e),u;case hA:if(tl)return tl.call(e)==tl.call(t)}return!1}var gA=mA;function yA(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var bA=yA,vA=Array.isArray,wo=vA;function xA(e,t,r){var n=t(e);return wo(e)?n:bA(n,r(e))}var SA=xA;function OA(e,t){for(var r=-1,n=e==null?0:e.length,a=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[a++]=o)}return s}var wA=OA;function CA(){return[]}var PA=CA,RA=Object.prototype,TA=RA.propertyIsEnumerable,mh=Object.getOwnPropertySymbols,AA=mh?function(e){return e==null?[]:(e=Object(e),wA(mh(e),function(t){return TA.call(e,t)}))}:PA,VA=AA;function EA(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var _A=EA;function IA(e){return e!=null&&typeof e=="object"}var Ka=IA,MA="[object Arguments]";function $A(e){return Ka(e)&&ls(e)==MA}var gh=$A,$m=Object.prototype,jA=$m.hasOwnProperty,kA=$m.propertyIsEnumerable,LA=gh(function(){return arguments}())?gh:function(e){return Ka(e)&&jA.call(e,"callee")&&!kA.call(e,"callee")},UA=LA;function DA(){return!1}var NA=DA,jm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yh=jm&&typeof module=="object"&&module&&!module.nodeType&&module,FA=yh&&yh.exports===jm,bh=FA?hr.Buffer:void 0,BA=bh?bh.isBuffer:void 0,zA=BA||NA,$l=zA,GA=9007199254740991,HA=/^(?:0|[1-9]\d*)$/;function qA(e,t){var r=typeof e;return t=t??GA,!!t&&(r=="number"||r!="symbol"&&HA.test(e))&&e>-1&&e%1==0&&e<t}var JA=qA,WA=9007199254740991;function KA(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=WA}var km=KA,YA="[object Arguments]",QA="[object Array]",XA="[object Boolean]",ZA="[object Date]",eV="[object Error]",tV="[object Function]",rV="[object Map]",nV="[object Number]",aV="[object Object]",sV="[object RegExp]",oV="[object Set]",iV="[object String]",lV="[object WeakMap]",cV="[object ArrayBuffer]",uV="[object DataView]",dV="[object Float32Array]",hV="[object Float64Array]",pV="[object Int8Array]",fV="[object Int16Array]",mV="[object Int32Array]",gV="[object Uint8Array]",yV="[object Uint8ClampedArray]",bV="[object Uint16Array]",vV="[object Uint32Array]",Ie={};Ie[dV]=Ie[hV]=Ie[pV]=Ie[fV]=Ie[mV]=Ie[gV]=Ie[yV]=Ie[bV]=Ie[vV]=!0;Ie[YA]=Ie[QA]=Ie[cV]=Ie[XA]=Ie[uV]=Ie[ZA]=Ie[eV]=Ie[tV]=Ie[rV]=Ie[nV]=Ie[aV]=Ie[sV]=Ie[oV]=Ie[iV]=Ie[lV]=!1;function xV(e){return Ka(e)&&km(e.length)&&!!Ie[ls(e)]}var SV=xV;function OV(e){return function(t){return e(t)}}var wV=OV,Lm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$a=Lm&&typeof module=="object"&&module&&!module.nodeType&&module,CV=$a&&$a.exports===Lm,rl=CV&&Vm.process,PV=function(){try{var e=$a&&$a.require&&$a.require("util").types;return e||rl&&rl.binding&&rl.binding("util")}catch{}}(),vh=PV,xh=vh&&vh.isTypedArray,RV=xh?wV(xh):SV,Um=RV,TV=Object.prototype,AV=TV.hasOwnProperty;function VV(e,t){var r=wo(e),n=!r&&UA(e),a=!r&&!n&&$l(e),s=!r&&!n&&!a&&Um(e),o=r||n||a||s,i=o?_A(e.length,String):[],l=i.length;for(var c in e)(t||AV.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||JA(c,l)))&&i.push(c);return i}var EV=VV,_V=Object.prototype;function IV(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||_V;return e===r}var MV=IV;function $V(e,t){return function(r){return e(t(r))}}var jV=$V,kV=jV(Object.keys,Object),LV=kV,UV=Object.prototype,DV=UV.hasOwnProperty;function NV(e){if(!MV(e))return LV(e);var t=[];for(var r in Object(e))DV.call(e,r)&&r!="constructor"&&t.push(r);return t}var FV=NV;function BV(e){return e!=null&&km(e.length)&&!_m(e)}var zV=BV;function GV(e){return zV(e)?EV(e):FV(e)}var HV=GV;function qV(e){return SA(e,HV,VA)}var Sh=qV,JV=1,WV=Object.prototype,KV=WV.hasOwnProperty;function YV(e,t,r,n,a,s){var o=r&JV,i=Sh(e),l=i.length,c=Sh(t),u=c.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var h=i[d];if(!(o?h in t:KV.call(t,h)))return!1}var p=s.get(e),m=s.get(t);if(p&&m)return p==t&&m==e;var f=!0;s.set(e,t),s.set(t,e);for(var g=o;++d<l;){h=i[d];var S=e[h],T=t[h];if(n)var O=o?n(T,S,h,t,e,s):n(S,T,h,e,t,s);if(!(O===void 0?S===T||a(S,T,r,n,s):O)){f=!1;break}g||(g=h=="constructor")}if(f&&!g){var C=e.constructor,E=t.constructor;C!=E&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof E=="function"&&E instanceof E)&&(f=!1)}return s.delete(e),s.delete(t),f}var QV=YV,XV=Xn(hr,"DataView"),jl=XV,ZV=Xn(hr,"Promise"),kl=ZV,eE=Xn(hr,"Set"),Ll=eE,tE=Xn(hr,"WeakMap"),Ul=tE,Oh="[object Map]",rE="[object Object]",wh="[object Promise]",Ch="[object Set]",Ph="[object WeakMap]",Rh="[object DataView]",nE=nn(jl),aE=nn(Ja),sE=nn(kl),oE=nn(Ll),iE=nn(Ul),kr=ls;(jl&&kr(new jl(new ArrayBuffer(1)))!=Rh||Ja&&kr(new Ja)!=Oh||kl&&kr(kl.resolve())!=wh||Ll&&kr(new Ll)!=Ch||Ul&&kr(new Ul)!=Ph)&&(kr=function(e){var t=ls(e),r=t==rE?e.constructor:void 0,n=r?nn(r):"";if(n)switch(n){case nE:return Rh;case aE:return Oh;case sE:return wh;case oE:return Ch;case iE:return Ph}return t});var Th=kr,lE=1,Ah="[object Arguments]",Vh="[object Array]",Rs="[object Object]",cE=Object.prototype,Eh=cE.hasOwnProperty;function uE(e,t,r,n,a,s){var o=wo(e),i=wo(t),l=o?Vh:Th(e),c=i?Vh:Th(t);l=l==Ah?Rs:l,c=c==Ah?Rs:c;var u=l==Rs,d=c==Rs,h=l==c;if(h&&$l(e)){if(!$l(t))return!1;o=!0,u=!1}if(h&&!u)return s||(s=new el),o||Um(e)?Mm(e,t,r,n,a,s):gA(e,t,l,r,n,a,s);if(!(r&lE)){var p=u&&Eh.call(e,"__wrapped__"),m=d&&Eh.call(t,"__wrapped__");if(p||m){var f=p?e.value():e,g=m?t.value():t;return s||(s=new el),a(f,g,r,n,s)}}return h?(s||(s=new el),QV(e,t,r,n,a,s)):!1}var dE=uE;function Dm(e,t,r,n,a){return e===t?!0:e==null||t==null||!Ka(e)&&!Ka(t)?e!==e&&t!==t:dE(e,t,r,n,Dm,a)}var hE=Dm;function pE(e,t){return hE(e,t)}var fE=pE;/*! *****************************************************************************
|
|
137
137
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
138
138
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
139
139
|
this file except in compliance with the License. You may obtain a copy of the
|
|
@@ -146,18 +146,18 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
146
146
|
|
|
147
147
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
148
148
|
and limitations under the License.
|
|
149
|
-
***************************************************************************** */var
|
|
149
|
+
***************************************************************************** */var Dl=function(e,t){return Dl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)n.hasOwnProperty(a)&&(r[a]=n[a])},Dl(e,t)};function Nm(e,t){Dl(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function mE(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 gE(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),a,s=[],o;try{for(;(t===void 0||t-- >0)&&!(a=n.next()).done;)s.push(a.value)}catch(i){o={error:i}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function yE(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(gE(arguments[t]));return e}var Fm=function(){function e(t,r){this.target=r,this.type=t}return e}(),bE=function(e){Nm(t,e);function t(r,n){var a=e.call(this,"error",n)||this;return a.message=r.message,a.error=r,a}return t}(Fm),vE=function(e){Nm(t,e);function t(r,n,a){r===void 0&&(r=1e3),n===void 0&&(n="");var s=e.call(this,"close",a)||this;return s.wasClean=!0,s.code=r,s.reason=n,s}return t}(Fm);/*!
|
|
150
150
|
* Reconnecting WebSocket
|
|
151
151
|
* by Pedro Ladaria <pedro.ladaria@gmail.com>
|
|
152
152
|
* https://github.com/pladaria/reconnecting-websocket
|
|
153
153
|
* License MIT
|
|
154
|
-
*/var SE=function(){if(typeof WebSocket<"u")return WebSocket},xE=function(e){return typeof e<"u"&&!!e&&e.CLOSING===2},$r={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},OE=function(){function e(t,r,n){var a=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){a._debug("open event");var o=a._options.minUptime,i=o===void 0?$r.minUptime:o;clearTimeout(a._connectTimeout),a._uptimeTimeout=setTimeout(function(){return a._acceptOpen()},i),a._ws.binaryType=a._binaryType,a._messageQueue.forEach(function(l){return a._ws.send(l)}),a._messageQueue=[],a.onopen&&a.onopen(s),a._listeners.open.forEach(function(l){return a._callEventListener(s,l)})},this._handleMessage=function(s){a._debug("message event"),a.onmessage&&a.onmessage(s),a._listeners.message.forEach(function(o){return a._callEventListener(s,o)})},this._handleError=function(s){a._debug("error event",s.message),a._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),a.onerror&&a.onerror(s),a._debug("exec error listeners"),a._listeners.error.forEach(function(o){return a._callEventListener(s,o)}),a._connect()},this._handleClose=function(s){a._debug("close event"),a._clearTimeouts(),a._shouldReconnect&&a._connect(),a.onclose&&a.onclose(s),a._listeners.close.forEach(function(o){return a._callEventListener(s,o)})},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?$r.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,a=this._listeners[t.type];if(a)try{for(var s=mE(a),o=s.next();!o.done;o=s.next()){var i=o.value;this._callEventListener(t,i)}}catch(l){r={error:l}}finally{try{o&&!o.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,yE(["RWS>"],t))},e.prototype._getNextDelay=function(){var t=this._options,r=t.reconnectionDelayGrowFactor,n=r===void 0?$r.reconnectionDelayGrowFactor:r,a=t.minReconnectionDelay,s=a===void 0?$r.minReconnectionDelay:a,o=t.maxReconnectionDelay,i=o===void 0?$r.maxReconnectionDelay:o,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,a=n===void 0?$r.maxRetries:n,s=r.connectionTimeout,o=s===void 0?$r.connectionTimeout:s,i=r.WebSocket,l=i===void 0?SE():i;if(this._retryCount>=a){this._debug("max retries reached",this._retryCount,">=",a);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!xE(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()},o))})}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new bE(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 vE(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}(),wE=Object.defineProperty,CE=Object.defineProperties,PE=Object.getOwnPropertyDescriptors,_h=Object.getOwnPropertySymbols,RE=Object.prototype.hasOwnProperty,TE=Object.prototype.propertyIsEnumerable,Ih=(e,t,r)=>t in e?wE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,In=(e,t)=>{for(var r in t||(t={}))RE.call(t,r)&&Ih(e,r,t[r]);if(_h)for(var r of _h(t))TE.call(t,r)&&Ih(e,r,t[r]);return e},Dl=(e,t)=>CE(e,PE(t)),$e=(e,t,r)=>new Promise((n,a)=>{var s=l=>{try{i(r.next(l))}catch(c){a(c)}},o=l=>{try{i(r.throw(l))}catch(c){a(c)}},i=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);i((r=r.apply(e,t)).next())}),AE=class extends OE{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()}opened(){return $e(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.OPEN?e():(this.addEventListener("open",()=>e()),this.addEventListener("error",t))})})}closed(){return $e(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.CLOSED?e():(this.addEventListener("close",()=>e()),this.addEventListener("error",t))})})}firstMessage(){return $e(this,null,function*(){return this.receivedFirstMessage?this.receivedFirstMessage:new Promise((e,t)=>{const r=a=>{this.receivedFirstMessage=a,this.removeEventListener("message",r),this.removeEventListener("error",n),e(a)},n=a=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(a)};this.addEventListener("message",r),this.addEventListener("error",n)})})}nextMessage(){return $e(this,null,function*(){return new Promise((e,t)=>{const r=a=>{this.removeEventListener("message",r),this.removeEventListener("error",n),e(a)},n=a=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(a)};this.addEventListener("message",r),this.addEventListener("error",n)})})}},VE=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}},rl=new VE;function wr(e){try{return JSON.parse(e)}catch{return}}function EE(e,t){return e||(e="world"),t||(t="world"),e===t}var kn="wandelbots.io",nl={dev:{domain:`https://auth.portal.dev.${kn}`,clientId:"fLbJD0RLp5r2Dpucm5j8BjwMR6Hunfha"},stg:{domain:`https://auth.portal.stg.${kn}`,clientId:"joVDeD9e786WzFNSGCqoVq7HNkWt5j6s"},prod:{domain:`https://auth.portal.${kn}`,clientId:"J7WJUi38xVQdJAEBNRT9Xw1b0fXDb4J2"}},_E=e=>{if(e.includes(`dev.${kn}`))return nl.dev;if(e.includes(`stg.${kn}`))return nl.stg;if(e.includes(kn))return nl.prod;throw new Error("Unsupported instance URL. Cannot determine Auth0 configuration.")},IE=e=>$e(void 0,null,function*(){var t;if(typeof window>"u")throw new Error("Access token must be set to use NovaClient when not in a browser environment.");const r=_E(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:n}=yield Promise.resolve().then(()=>require("./auth0-spa-js.production.esm-BLRAk7Yh.cjs")),a=new n({domain:r.domain,clientId:(t=r.clientId)!=null?t:"",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}=yield a.handleRedirectCallback();window.history.replaceState({},document.title,(o==null?void 0:o.returnTo)||window.location.pathname)}else yield a.loginWithRedirect();return yield a.getTokenSilently()});function Bm(e,t){return function(){return e.apply(t,arguments)}}const{toString:ME}=Object.prototype,{getPrototypeOf:qc}=Object,ci=(e=>t=>{const r=ME.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Bt=e=>(e=e.toLowerCase(),t=>ci(t)===e),ui=e=>t=>typeof t===e,{isArray:ra}=Array,Ya=ui("undefined");function $E(e){return e!==null&&!Ya(e)&&e.constructor!==null&&!Ya(e.constructor)&&Ct(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const zm=Bt("ArrayBuffer");function jE(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&zm(e.buffer),t}const kE=ui("string"),Ct=ui("function"),Gm=ui("number"),di=e=>e!==null&&typeof e=="object",LE=e=>e===!0||e===!1,qs=e=>{if(ci(e)!=="object")return!1;const t=qc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},UE=Bt("Date"),DE=Bt("File"),NE=Bt("Blob"),FE=Bt("FileList"),BE=e=>di(e)&&Ct(e.pipe),zE=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ct(e.append)&&((t=ci(e))==="formdata"||t==="object"&&Ct(e.toString)&&e.toString()==="[object FormData]"))},GE=Bt("URLSearchParams"),[HE,qE,JE,WE]=["ReadableStream","Request","Response","Headers"].map(Bt),KE=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function cs(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),ra(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{const s=r?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let i;for(n=0;n<o;n++)i=s[n],t.call(null,e[i],i,e)}}function Hm(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,a;for(;n-- >0;)if(a=r[n],t===a.toLowerCase())return a;return null}const Dr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,qm=e=>!Ya(e)&&e!==Dr;function Nl(){const{caseless:e}=qm(this)&&this||{},t={},r=(n,a)=>{const s=e&&Hm(t,a)||a;qs(t[s])&&qs(n)?t[s]=Nl(t[s],n):qs(n)?t[s]=Nl({},n):ra(n)?t[s]=n.slice():t[s]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&cs(arguments[n],r);return t}const YE=(e,t,r,{allOwnKeys:n}={})=>(cs(t,(a,s)=>{r&&Ct(a)?e[s]=Bm(a,r):e[s]=a},{allOwnKeys:n}),e),QE=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),XE=(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)},ZE=(e,t,r,n)=>{let a,s,o;const i={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),s=a.length;s-- >0;)o=a[s],(!n||n(o,e,t))&&!i[o]&&(t[o]=e[o],i[o]=!0);e=r!==!1&&qc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},e_=(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},t_=e=>{if(!e)return null;if(ra(e))return e;let t=e.length;if(!Gm(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},r_=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&qc(Uint8Array)),n_=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=n.next())&&!a.done;){const s=a.value;t.call(e,s[0],s[1])}},a_=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},s_=Bt("HTMLFormElement"),o_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),Mh=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),i_=Bt("RegExp"),Jm=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};cs(r,(a,s)=>{let o;(o=t(a,s,e))!==!1&&(n[s]=o||a)}),Object.defineProperties(e,n)},l_=e=>{Jm(e,(t,r)=>{if(Ct(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Ct(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+"'")})}})},c_=(e,t)=>{const r={},n=a=>{a.forEach(s=>{r[s]=!0})};return ra(e)?n(e):n(String(e).split(t)),r},u_=()=>{},d_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function h_(e){return!!(e&&Ct(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const p_=e=>{const t=new Array(10),r=(n,a)=>{if(di(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const s=ra(n)?[]:{};return cs(n,(o,i)=>{const l=r(o,a+1);!Ya(l)&&(s[i]=l)}),t[a]=void 0,s}}return n};return r(e,0)},f_=Bt("AsyncFunction"),m_=e=>e&&(di(e)||Ct(e))&&Ct(e.then)&&Ct(e.catch),Wm=((e,t)=>e?setImmediate:t?((r,n)=>(Dr.addEventListener("message",({source:a,data:s})=>{a===Dr&&s===r&&n.length&&n.shift()()},!1),a=>{n.push(a),Dr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ct(Dr.postMessage)),g_=typeof queueMicrotask<"u"?queueMicrotask.bind(Dr):typeof process<"u"&&process.nextTick||Wm,H={isArray:ra,isArrayBuffer:zm,isBuffer:$E,isFormData:zE,isArrayBufferView:jE,isString:kE,isNumber:Gm,isBoolean:LE,isObject:di,isPlainObject:qs,isReadableStream:HE,isRequest:qE,isResponse:JE,isHeaders:WE,isUndefined:Ya,isDate:UE,isFile:DE,isBlob:NE,isRegExp:i_,isFunction:Ct,isStream:BE,isURLSearchParams:GE,isTypedArray:r_,isFileList:FE,forEach:cs,merge:Nl,extend:YE,trim:KE,stripBOM:QE,inherits:XE,toFlatObject:ZE,kindOf:ci,kindOfTest:Bt,endsWith:e_,toArray:t_,forEachEntry:n_,matchAll:a_,isHTMLForm:s_,hasOwnProperty:Mh,hasOwnProp:Mh,reduceDescriptors:Jm,freezeMethods:l_,toObjectSet:c_,toCamelCase:o_,noop:u_,toFiniteNumber:d_,findKey:Hm,global:Dr,isContextDefined:qm,isSpecCompliantForm:h_,toJSONObject:p_,isAsyncFn:f_,isThenable:m_,setImmediate:Wm,asap:g_};function me(e,t,r,n,a){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),a&&(this.response=a,this.status=a.status?a.status:null)}H.inherits(me,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:H.toJSONObject(this.config),code:this.code,status:this.status}}});const Km=me.prototype,Ym={};["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=>{Ym[e]={value:e}});Object.defineProperties(me,Ym);Object.defineProperty(Km,"isAxiosError",{value:!0});me.from=(e,t,r,n,a,s)=>{const o=Object.create(Km);return H.toFlatObject(e,o,function(l){return l!==Error.prototype},i=>i!=="isAxiosError"),me.call(o,e.message,t,r,n,a),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const y_=null;function Fl(e){return H.isPlainObject(e)||H.isArray(e)}function Qm(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function $h(e,t,r){return e?e.concat(t).map(function(a,s){return a=Qm(a),!r&&s?"["+a+"]":a}).join(r?".":""):t}function b_(e){return H.isArray(e)&&!e.some(Fl)}const v_=H.toFlatObject(H,{},null,function(t){return/^is[A-Z]/.test(t)});function hi(e,t,r){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=H.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,g){return!H.isUndefined(g[f])});const n=r.metaTokens,a=r.visitor||u,s=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(a))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(H.isDate(m))return m.toISOString();if(!l&&H.isBlob(m))throw new me("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(m)||H.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,f,g){let S=m;if(m&&!g&&typeof m=="object"){if(H.endsWith(f,"{}"))f=n?f:f.slice(0,-2),m=JSON.stringify(m);else if(H.isArray(m)&&b_(m)||(H.isFileList(m)||H.endsWith(f,"[]"))&&(S=H.toArray(m)))return f=Qm(f),S.forEach(function(O,C){!(H.isUndefined(O)||O===null)&&t.append(o===!0?$h([f],C,s):o===null?f:f+"[]",c(O))}),!1}return Fl(m)?!0:(t.append($h(g,f,s),c(m)),!1)}const d=[],h=Object.assign(v_,{defaultVisitor:u,convertValue:c,isVisitable:Fl});function p(m,f){if(!H.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+f.join("."));d.push(m),H.forEach(m,function(S,R){(!(H.isUndefined(S)||S===null)&&a.call(t,S,H.isString(R)?R.trim():R,f,h))===!0&&p(S,f?f.concat(R):[R])}),d.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return p(e),t}function jh(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Jc(e,t){this._pairs=[],e&&hi(e,this,t)}const Xm=Jc.prototype;Xm.append=function(t,r){this._pairs.push([t,r])};Xm.toString=function(t){const r=t?function(n){return t.call(this,n,jh)}:jh;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function S_(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Zm(e,t,r){if(!t)return e;const n=r&&r.encode||S_;H.isFunction(r)&&(r={serialize:r});const a=r&&r.serialize;let s;if(a?s=a(t,r):s=H.isURLSearchParams(t)?t.toString():new Jc(t,r).toString(n),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class kh{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){H.forEach(this.handlers,function(n){n!==null&&t(n)})}}const eg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},x_=typeof URLSearchParams<"u"?URLSearchParams:Jc,O_=typeof FormData<"u"?FormData:null,w_=typeof Blob<"u"?Blob:null,C_={isBrowser:!0,classes:{URLSearchParams:x_,FormData:O_,Blob:w_},protocols:["http","https","file","blob","url","data"]},Wc=typeof window<"u"&&typeof document<"u",Bl=typeof navigator=="object"&&navigator||void 0,P_=Wc&&(!Bl||["ReactNative","NativeScript","NS"].indexOf(Bl.product)<0),R_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",T_=Wc&&window.location.href||"http://localhost",A_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Wc,hasStandardBrowserEnv:P_,hasStandardBrowserWebWorkerEnv:R_,navigator:Bl,origin:T_},Symbol.toStringTag,{value:"Module"})),it={...A_,...C_};function V_(e,t){return hi(e,new it.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,s){return it.isNode&&H.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function E_(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function __(e){const t={},r=Object.keys(e);let n;const a=r.length;let s;for(n=0;n<a;n++)s=r[n],t[s]=e[s];return t}function tg(e){function t(r,n,a,s){let o=r[s++];if(o==="__proto__")return!0;const i=Number.isFinite(+o),l=s>=r.length;return o=!o&&H.isArray(a)?a.length:o,l?(H.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!i):((!a[o]||!H.isObject(a[o]))&&(a[o]=[]),t(r,n,a[o],s)&&H.isArray(a[o])&&(a[o]=__(a[o])),!i)}if(H.isFormData(e)&&H.isFunction(e.entries)){const r={};return H.forEachEntry(e,(n,a)=>{t(E_(n),a,r,0)}),r}return null}function I_(e,t,r){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const us={transitional:eg,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,s=H.isObject(t);if(s&&H.isHTMLForm(t)&&(t=new FormData(t)),H.isFormData(t))return a?JSON.stringify(tg(t)):t;if(H.isArrayBuffer(t)||H.isBuffer(t)||H.isStream(t)||H.isFile(t)||H.isBlob(t)||H.isReadableStream(t))return t;if(H.isArrayBufferView(t))return t.buffer;if(H.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 V_(t,this.formSerializer).toString();if((i=H.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return hi(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||a?(r.setContentType("application/json",!1),I_(t)):t}],transformResponse:[function(t){const r=this.transitional||us.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(H.isResponse(t)||H.isReadableStream(t))return t;if(t&&H.isString(t)&&(n&&!this.responseType||a)){const o=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(i){if(o)throw i.name==="SyntaxError"?me.from(i,me.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:it.classes.FormData,Blob:it.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{us.headers[e]={}});const M_=H.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"]),$_=e=>{const t={};let r,n,a;return e&&e.split(`
|
|
155
|
-
`).forEach(function(o){a=o.indexOf(":"),r=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!r||t[r]&&M_[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Lh=Symbol("internals");function
|
|
156
|
-
`)}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(a=>n.set(a)),n}static accessor(t){const n=(this[Lh]=this[Lh]={accessors:{}}).accessors,a=this.prototype;function s(o){const i=Sa(o);n[i]||(U_(a,o),n[i]=!0)}return H.isArray(t)?t.forEach(s):s(t),this}};St.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(St.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});H.freezeMethods(St);function sl(e,t){const r=this||us,n=t||r,a=St.from(n.headers);let s=n.data;return H.forEach(e,function(i){s=i.call(r,s,a.normalize(),t?t.status:void 0)}),a.normalize(),s}function rg(e){return!!(e&&e.__CANCEL__)}function na(e,t,r){me.call(this,e??"canceled",me.ERR_CANCELED,t,r),this.name="CanceledError"}H.inherits(na,me,{__CANCEL__:!0});function ng(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new me("Request failed with status code "+r.status,[me.ERR_BAD_REQUEST,me.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function D_(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function N_(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[s];o||(o=c),r[a]=l,n[a]=c;let d=s,h=0;for(;d!==a;)h+=r[d++],d=d%e;if(a=(a+1)%e,a===s&&(s=(s+1)%e),c-o<t)return;const p=u&&c-u;return p?Math.round(h*1e3/p):void 0}}function F_(e,t){let r=0,n=1e3/t,a,s;const o=(c,u=Date.now())=>{r=u,a=null,s&&(clearTimeout(s),s=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-r;d>=n?o(c,u):(a=c,s||(s=setTimeout(()=>{s=null,o(a)},n-d)))},()=>a&&o(a)]}const wo=(e,t,r=3)=>{let n=0;const a=N_(50,250);return F_(s=>{const o=s.loaded,i=s.lengthComputable?s.total:void 0,l=o-n,c=a(l),u=o<=i;n=o;const d={loaded:o,total:i,progress:i?o/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&u?(i-o)/c:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},r)},Uh=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Dh=e=>(...t)=>H.asap(()=>e(...t)),B_=it.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,it.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(it.origin),it.navigator&&/(msie|trident)/i.test(it.navigator.userAgent)):()=>!0,z_=it.hasStandardBrowserEnv?{write(e,t,r,n,a,s){const o=[e+"="+encodeURIComponent(t)];H.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),H.isString(n)&&o.push("path="+n),H.isString(a)&&o.push("domain="+a),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function G_(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function H_(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ag(e,t,r){let n=!G_(t);return e&&n||r==!1?H_(e,t):t}const Nh=e=>e instanceof St?{...e}:e;function Jr(e,t){t=t||{};const r={};function n(c,u,d,h){return H.isPlainObject(c)&&H.isPlainObject(u)?H.merge.call({caseless:h},c,u):H.isPlainObject(u)?H.merge({},u):H.isArray(u)?u.slice():u}function a(c,u,d,h){if(H.isUndefined(u)){if(!H.isUndefined(c))return n(void 0,c,d,h)}else return n(c,u,d,h)}function s(c,u){if(!H.isUndefined(u))return n(void 0,u)}function o(c,u){if(H.isUndefined(u)){if(!H.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:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:i,headers:(c,u,d)=>a(Nh(c),Nh(u),d,!0)};return H.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||a,h=d(e[u],t[u],u);H.isUndefined(h)&&d!==i||(r[u]=h)}),r}const sg=e=>{const t=Jr({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:s,headers:o,auth:i}=t;t.headers=o=St.from(o),t.url=Zm(ag(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&o.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let l;if(H.isFormData(r)){if(it.hasStandardBrowserEnv||it.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...u].join("; "))}}if(it.hasStandardBrowserEnv&&(n&&H.isFunction(n)&&(n=n(t)),n||n!==!1&&B_(t.url))){const c=a&&s&&z_.read(s);c&&o.set(a,c)}return t},q_=typeof XMLHttpRequest<"u",J_=q_&&function(e){return new Promise(function(r,n){const a=sg(e);let s=a.data;const o=St.from(a.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=a,u,d,h,p,m;function f(){p&&p(),m&&m(),a.cancelToken&&a.cancelToken.unsubscribe(u),a.signal&&a.signal.removeEventListener("abort",u)}let g=new XMLHttpRequest;g.open(a.method.toUpperCase(),a.url,!0),g.timeout=a.timeout;function S(){if(!g)return;const O=St.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),E={data:!i||i==="text"||i==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:O,config:e,request:g};ng(function(P){r(P),f()},function(P){n(P),f()},E),g=null}"onloadend"in g?g.onloadend=S:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(S)},g.onabort=function(){g&&(n(new me("Request aborted",me.ECONNABORTED,e,g)),g=null)},g.onerror=function(){n(new me("Network Error",me.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let C=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const E=a.transitional||eg;a.timeoutErrorMessage&&(C=a.timeoutErrorMessage),n(new me(C,E.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,e,g)),g=null},s===void 0&&o.setContentType(null),"setRequestHeader"in g&&H.forEach(o.toJSON(),function(C,E){g.setRequestHeader(E,C)}),H.isUndefined(a.withCredentials)||(g.withCredentials=!!a.withCredentials),i&&i!=="json"&&(g.responseType=a.responseType),c&&([h,m]=wo(c,!0),g.addEventListener("progress",h)),l&&g.upload&&([d,p]=wo(l),g.upload.addEventListener("progress",d),g.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(u=O=>{g&&(n(!O||O.type?new na(null,e,g):O),g.abort(),g=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const R=D_(a.url);if(R&&it.protocols.indexOf(R)===-1){n(new me("Unsupported protocol "+R+":",me.ERR_BAD_REQUEST,e));return}g.send(s||null)})},W_=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,a;const s=function(c){if(!a){a=!0,i();const u=c instanceof Error?c:this.reason;n.abort(u instanceof me?u:new na(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,s(new me(`timeout ${t} of ms exceeded`,me.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=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=()=>H.asap(i),l}},K_=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,a;for(;n<r;)a=n+t,yield e.slice(n,a),n=a},Y_=async function*(e,t){for await(const r of Q_(e))yield*K_(r,t)},Q_=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()}},Fh=(e,t,r,n)=>{const a=Y_(e,t);let s=0,o,i=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await a.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),a.return()}},{highWaterMark:2})},pi=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",og=pi&&typeof ReadableStream=="function",X_=pi&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ig=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Z_=og&&ig(()=>{let e=!1;const t=new Request(it.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Bh=64*1024,zl=og&&ig(()=>H.isReadableStream(new Response("").body)),Co={stream:zl&&(e=>e.body)};pi&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Co[t]&&(Co[t]=H.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new me(`Response type '${t}' is not supported`,me.ERR_NOT_SUPPORT,n)})})})(new Response);const eI=async e=>{if(e==null)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e))return(await new Request(it.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(H.isArrayBufferView(e)||H.isArrayBuffer(e))return e.byteLength;if(H.isURLSearchParams(e)&&(e=e+""),H.isString(e))return(await X_(e)).byteLength},tI=async(e,t)=>{const r=H.toFiniteNumber(e.getContentLength());return r??eI(t)},rI=pi&&(async e=>{let{url:t,method:r,data:n,signal:a,cancelToken:s,timeout:o,onDownloadProgress:i,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:h}=sg(e);c=c?(c+"").toLowerCase():"text";let p=W_([a,s&&s.toAbortSignal()],o),m;const f=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let g;try{if(l&&Z_&&r!=="get"&&r!=="head"&&(g=await tI(u,n))!==0){let E=new Request(t,{method:"POST",body:n,duplex:"half"}),T;if(H.isFormData(n)&&(T=E.headers.get("content-type"))&&u.setContentType(T),E.body){const[P,_]=Uh(g,wo(Dh(l)));n=Fh(E.body,Bh,P,_)}}H.isString(d)||(d=d?"include":"omit");const S="credentials"in Request.prototype;m=new Request(t,{...h,signal:p,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:S?d:void 0});let R=await fetch(m);const O=zl&&(c==="stream"||c==="response");if(zl&&(i||O&&f)){const E={};["status","statusText","headers"].forEach(B=>{E[B]=R[B]});const T=H.toFiniteNumber(R.headers.get("content-length")),[P,_]=i&&Uh(T,wo(Dh(i),!0))||[];R=new Response(Fh(R.body,Bh,P,()=>{_&&_(),f&&f()}),E)}c=c||"text";let C=await Co[H.findKey(Co,c)||"text"](R,e);return!O&&f&&f(),await new Promise((E,T)=>{ng(E,T,{data:C,headers:St.from(R.headers),status:R.status,statusText:R.statusText,config:e,request:m})})}catch(S){throw f&&f(),S&&S.name==="TypeError"&&/fetch/i.test(S.message)?Object.assign(new me("Network Error",me.ERR_NETWORK,e,m),{cause:S.cause||S}):me.from(S,S&&S.code,e,m)}}),Gl={http:y_,xhr:J_,fetch:rI};H.forEach(Gl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const zh=e=>`- ${e}`,nI=e=>H.isFunction(e)||e===null||e===!1,lg={getAdapter:e=>{e=H.isArray(e)?e:[e];const{length:t}=e;let r,n;const a={};for(let s=0;s<t;s++){r=e[s];let o;if(n=r,!nI(r)&&(n=Gl[(o=String(r)).toLowerCase()],n===void 0))throw new me(`Unknown adapter '${o}'`);if(n)break;a[o||"#"+s]=n}if(!n){const s=Object.entries(a).map(([i,l])=>`adapter ${i} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?s.length>1?`since :
|
|
154
|
+
*/var xE=function(){if(typeof WebSocket<"u")return WebSocket},SE=function(e){return typeof e<"u"&&!!e&&e.CLOSING===2},$r={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},OE=function(){function e(t,r,n){var a=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){a._debug("open event");var o=a._options.minUptime,i=o===void 0?$r.minUptime:o;clearTimeout(a._connectTimeout),a._uptimeTimeout=setTimeout(function(){return a._acceptOpen()},i),a._ws.binaryType=a._binaryType,a._messageQueue.forEach(function(l){return a._ws.send(l)}),a._messageQueue=[],a.onopen&&a.onopen(s),a._listeners.open.forEach(function(l){return a._callEventListener(s,l)})},this._handleMessage=function(s){a._debug("message event"),a.onmessage&&a.onmessage(s),a._listeners.message.forEach(function(o){return a._callEventListener(s,o)})},this._handleError=function(s){a._debug("error event",s.message),a._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),a.onerror&&a.onerror(s),a._debug("exec error listeners"),a._listeners.error.forEach(function(o){return a._callEventListener(s,o)}),a._connect()},this._handleClose=function(s){a._debug("close event"),a._clearTimeouts(),a._shouldReconnect&&a._connect(),a.onclose&&a.onclose(s),a._listeners.close.forEach(function(o){return a._callEventListener(s,o)})},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?$r.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,a=this._listeners[t.type];if(a)try{for(var s=mE(a),o=s.next();!o.done;o=s.next()){var i=o.value;this._callEventListener(t,i)}}catch(l){r={error:l}}finally{try{o&&!o.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,yE(["RWS>"],t))},e.prototype._getNextDelay=function(){var t=this._options,r=t.reconnectionDelayGrowFactor,n=r===void 0?$r.reconnectionDelayGrowFactor:r,a=t.minReconnectionDelay,s=a===void 0?$r.minReconnectionDelay:a,o=t.maxReconnectionDelay,i=o===void 0?$r.maxReconnectionDelay:o,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,a=n===void 0?$r.maxRetries:n,s=r.connectionTimeout,o=s===void 0?$r.connectionTimeout:s,i=r.WebSocket,l=i===void 0?xE():i;if(this._retryCount>=a){this._debug("max retries reached",this._retryCount,">=",a);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!SE(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()},o))})}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new bE(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 vE(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}(),wE=Object.defineProperty,CE=Object.defineProperties,PE=Object.getOwnPropertyDescriptors,_h=Object.getOwnPropertySymbols,RE=Object.prototype.hasOwnProperty,TE=Object.prototype.propertyIsEnumerable,Ih=(e,t,r)=>t in e?wE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,In=(e,t)=>{for(var r in t||(t={}))RE.call(t,r)&&Ih(e,r,t[r]);if(_h)for(var r of _h(t))TE.call(t,r)&&Ih(e,r,t[r]);return e},Nl=(e,t)=>CE(e,PE(t)),$e=(e,t,r)=>new Promise((n,a)=>{var s=l=>{try{i(r.next(l))}catch(c){a(c)}},o=l=>{try{i(r.throw(l))}catch(c){a(c)}},i=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);i((r=r.apply(e,t)).next())}),AE=class extends OE{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()}opened(){return $e(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.OPEN?e():(this.addEventListener("open",()=>e()),this.addEventListener("error",t))})})}closed(){return $e(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.CLOSED?e():(this.addEventListener("close",()=>e()),this.addEventListener("error",t))})})}firstMessage(){return $e(this,null,function*(){return this.receivedFirstMessage?this.receivedFirstMessage:new Promise((e,t)=>{const r=a=>{this.receivedFirstMessage=a,this.removeEventListener("message",r),this.removeEventListener("error",n),e(a)},n=a=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(a)};this.addEventListener("message",r),this.addEventListener("error",n)})})}nextMessage(){return $e(this,null,function*(){return new Promise((e,t)=>{const r=a=>{this.removeEventListener("message",r),this.removeEventListener("error",n),e(a)},n=a=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(a)};this.addEventListener("message",r),this.addEventListener("error",n)})})}},VE=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}},nl=new VE;function wr(e){try{return JSON.parse(e)}catch{return}}function EE(e,t){return e||(e="world"),t||(t="world"),e===t}var kn="wandelbots.io",al={dev:{domain:`https://auth.portal.dev.${kn}`,clientId:"fLbJD0RLp5r2Dpucm5j8BjwMR6Hunfha"},stg:{domain:`https://auth.portal.stg.${kn}`,clientId:"joVDeD9e786WzFNSGCqoVq7HNkWt5j6s"},prod:{domain:`https://auth.portal.${kn}`,clientId:"J7WJUi38xVQdJAEBNRT9Xw1b0fXDb4J2"}},_E=e=>{if(e.includes(`dev.${kn}`))return al.dev;if(e.includes(`stg.${kn}`))return al.stg;if(e.includes(kn))return al.prod;throw new Error("Unsupported instance URL. Cannot determine Auth0 configuration.")},IE=e=>$e(void 0,null,function*(){var t;if(typeof window>"u")throw new Error("Access token must be set to use NovaClient when not in a browser environment.");const r=_E(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:n}=yield Promise.resolve().then(()=>require("./auth0-spa-js.production.esm-BLRAk7Yh.cjs")),a=new n({domain:r.domain,clientId:(t=r.clientId)!=null?t:"",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}=yield a.handleRedirectCallback();window.history.replaceState({},document.title,(o==null?void 0:o.returnTo)||window.location.pathname)}else yield a.loginWithRedirect();return yield a.getTokenSilently()});function Bm(e,t){return function(){return e.apply(t,arguments)}}const{toString:ME}=Object.prototype,{getPrototypeOf:qc}=Object,ui=(e=>t=>{const r=ME.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Bt=e=>(e=e.toLowerCase(),t=>ui(t)===e),di=e=>t=>typeof t===e,{isArray:ra}=Array,Ya=di("undefined");function $E(e){return e!==null&&!Ya(e)&&e.constructor!==null&&!Ya(e.constructor)&&Ct(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const zm=Bt("ArrayBuffer");function jE(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&zm(e.buffer),t}const kE=di("string"),Ct=di("function"),Gm=di("number"),hi=e=>e!==null&&typeof e=="object",LE=e=>e===!0||e===!1,qs=e=>{if(ui(e)!=="object")return!1;const t=qc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},UE=Bt("Date"),DE=Bt("File"),NE=Bt("Blob"),FE=Bt("FileList"),BE=e=>hi(e)&&Ct(e.pipe),zE=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ct(e.append)&&((t=ui(e))==="formdata"||t==="object"&&Ct(e.toString)&&e.toString()==="[object FormData]"))},GE=Bt("URLSearchParams"),[HE,qE,JE,WE]=["ReadableStream","Request","Response","Headers"].map(Bt),KE=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function cs(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),ra(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{const s=r?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let i;for(n=0;n<o;n++)i=s[n],t.call(null,e[i],i,e)}}function Hm(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,a;for(;n-- >0;)if(a=r[n],t===a.toLowerCase())return a;return null}const Dr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,qm=e=>!Ya(e)&&e!==Dr;function Fl(){const{caseless:e}=qm(this)&&this||{},t={},r=(n,a)=>{const s=e&&Hm(t,a)||a;qs(t[s])&&qs(n)?t[s]=Fl(t[s],n):qs(n)?t[s]=Fl({},n):ra(n)?t[s]=n.slice():t[s]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&cs(arguments[n],r);return t}const YE=(e,t,r,{allOwnKeys:n}={})=>(cs(t,(a,s)=>{r&&Ct(a)?e[s]=Bm(a,r):e[s]=a},{allOwnKeys:n}),e),QE=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),XE=(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)},ZE=(e,t,r,n)=>{let a,s,o;const i={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),s=a.length;s-- >0;)o=a[s],(!n||n(o,e,t))&&!i[o]&&(t[o]=e[o],i[o]=!0);e=r!==!1&&qc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},e_=(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},t_=e=>{if(!e)return null;if(ra(e))return e;let t=e.length;if(!Gm(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},r_=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&qc(Uint8Array)),n_=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=n.next())&&!a.done;){const s=a.value;t.call(e,s[0],s[1])}},a_=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},s_=Bt("HTMLFormElement"),o_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),Mh=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),i_=Bt("RegExp"),Jm=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};cs(r,(a,s)=>{let o;(o=t(a,s,e))!==!1&&(n[s]=o||a)}),Object.defineProperties(e,n)},l_=e=>{Jm(e,(t,r)=>{if(Ct(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Ct(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+"'")})}})},c_=(e,t)=>{const r={},n=a=>{a.forEach(s=>{r[s]=!0})};return ra(e)?n(e):n(String(e).split(t)),r},u_=()=>{},d_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function h_(e){return!!(e&&Ct(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const p_=e=>{const t=new Array(10),r=(n,a)=>{if(hi(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const s=ra(n)?[]:{};return cs(n,(o,i)=>{const l=r(o,a+1);!Ya(l)&&(s[i]=l)}),t[a]=void 0,s}}return n};return r(e,0)},f_=Bt("AsyncFunction"),m_=e=>e&&(hi(e)||Ct(e))&&Ct(e.then)&&Ct(e.catch),Wm=((e,t)=>e?setImmediate:t?((r,n)=>(Dr.addEventListener("message",({source:a,data:s})=>{a===Dr&&s===r&&n.length&&n.shift()()},!1),a=>{n.push(a),Dr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ct(Dr.postMessage)),g_=typeof queueMicrotask<"u"?queueMicrotask.bind(Dr):typeof process<"u"&&process.nextTick||Wm,H={isArray:ra,isArrayBuffer:zm,isBuffer:$E,isFormData:zE,isArrayBufferView:jE,isString:kE,isNumber:Gm,isBoolean:LE,isObject:hi,isPlainObject:qs,isReadableStream:HE,isRequest:qE,isResponse:JE,isHeaders:WE,isUndefined:Ya,isDate:UE,isFile:DE,isBlob:NE,isRegExp:i_,isFunction:Ct,isStream:BE,isURLSearchParams:GE,isTypedArray:r_,isFileList:FE,forEach:cs,merge:Fl,extend:YE,trim:KE,stripBOM:QE,inherits:XE,toFlatObject:ZE,kindOf:ui,kindOfTest:Bt,endsWith:e_,toArray:t_,forEachEntry:n_,matchAll:a_,isHTMLForm:s_,hasOwnProperty:Mh,hasOwnProp:Mh,reduceDescriptors:Jm,freezeMethods:l_,toObjectSet:c_,toCamelCase:o_,noop:u_,toFiniteNumber:d_,findKey:Hm,global:Dr,isContextDefined:qm,isSpecCompliantForm:h_,toJSONObject:p_,isAsyncFn:f_,isThenable:m_,setImmediate:Wm,asap:g_};function me(e,t,r,n,a){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),a&&(this.response=a,this.status=a.status?a.status:null)}H.inherits(me,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:H.toJSONObject(this.config),code:this.code,status:this.status}}});const Km=me.prototype,Ym={};["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=>{Ym[e]={value:e}});Object.defineProperties(me,Ym);Object.defineProperty(Km,"isAxiosError",{value:!0});me.from=(e,t,r,n,a,s)=>{const o=Object.create(Km);return H.toFlatObject(e,o,function(l){return l!==Error.prototype},i=>i!=="isAxiosError"),me.call(o,e.message,t,r,n,a),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const y_=null;function Bl(e){return H.isPlainObject(e)||H.isArray(e)}function Qm(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function $h(e,t,r){return e?e.concat(t).map(function(a,s){return a=Qm(a),!r&&s?"["+a+"]":a}).join(r?".":""):t}function b_(e){return H.isArray(e)&&!e.some(Bl)}const v_=H.toFlatObject(H,{},null,function(t){return/^is[A-Z]/.test(t)});function pi(e,t,r){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=H.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,g){return!H.isUndefined(g[f])});const n=r.metaTokens,a=r.visitor||u,s=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(a))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(H.isDate(m))return m.toISOString();if(!l&&H.isBlob(m))throw new me("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(m)||H.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,f,g){let S=m;if(m&&!g&&typeof m=="object"){if(H.endsWith(f,"{}"))f=n?f:f.slice(0,-2),m=JSON.stringify(m);else if(H.isArray(m)&&b_(m)||(H.isFileList(m)||H.endsWith(f,"[]"))&&(S=H.toArray(m)))return f=Qm(f),S.forEach(function(O,C){!(H.isUndefined(O)||O===null)&&t.append(o===!0?$h([f],C,s):o===null?f:f+"[]",c(O))}),!1}return Bl(m)?!0:(t.append($h(g,f,s),c(m)),!1)}const d=[],h=Object.assign(v_,{defaultVisitor:u,convertValue:c,isVisitable:Bl});function p(m,f){if(!H.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+f.join("."));d.push(m),H.forEach(m,function(S,T){(!(H.isUndefined(S)||S===null)&&a.call(t,S,H.isString(T)?T.trim():T,f,h))===!0&&p(S,f?f.concat(T):[T])}),d.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return p(e),t}function jh(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Jc(e,t){this._pairs=[],e&&pi(e,this,t)}const Xm=Jc.prototype;Xm.append=function(t,r){this._pairs.push([t,r])};Xm.toString=function(t){const r=t?function(n){return t.call(this,n,jh)}:jh;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function x_(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Zm(e,t,r){if(!t)return e;const n=r&&r.encode||x_;H.isFunction(r)&&(r={serialize:r});const a=r&&r.serialize;let s;if(a?s=a(t,r):s=H.isURLSearchParams(t)?t.toString():new Jc(t,r).toString(n),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class kh{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){H.forEach(this.handlers,function(n){n!==null&&t(n)})}}const eg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},S_=typeof URLSearchParams<"u"?URLSearchParams:Jc,O_=typeof FormData<"u"?FormData:null,w_=typeof Blob<"u"?Blob:null,C_={isBrowser:!0,classes:{URLSearchParams:S_,FormData:O_,Blob:w_},protocols:["http","https","file","blob","url","data"]},Wc=typeof window<"u"&&typeof document<"u",zl=typeof navigator=="object"&&navigator||void 0,P_=Wc&&(!zl||["ReactNative","NativeScript","NS"].indexOf(zl.product)<0),R_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",T_=Wc&&window.location.href||"http://localhost",A_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Wc,hasStandardBrowserEnv:P_,hasStandardBrowserWebWorkerEnv:R_,navigator:zl,origin:T_},Symbol.toStringTag,{value:"Module"})),it={...A_,...C_};function V_(e,t){return pi(e,new it.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,s){return it.isNode&&H.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function E_(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function __(e){const t={},r=Object.keys(e);let n;const a=r.length;let s;for(n=0;n<a;n++)s=r[n],t[s]=e[s];return t}function tg(e){function t(r,n,a,s){let o=r[s++];if(o==="__proto__")return!0;const i=Number.isFinite(+o),l=s>=r.length;return o=!o&&H.isArray(a)?a.length:o,l?(H.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!i):((!a[o]||!H.isObject(a[o]))&&(a[o]=[]),t(r,n,a[o],s)&&H.isArray(a[o])&&(a[o]=__(a[o])),!i)}if(H.isFormData(e)&&H.isFunction(e.entries)){const r={};return H.forEachEntry(e,(n,a)=>{t(E_(n),a,r,0)}),r}return null}function I_(e,t,r){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const us={transitional:eg,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,s=H.isObject(t);if(s&&H.isHTMLForm(t)&&(t=new FormData(t)),H.isFormData(t))return a?JSON.stringify(tg(t)):t;if(H.isArrayBuffer(t)||H.isBuffer(t)||H.isStream(t)||H.isFile(t)||H.isBlob(t)||H.isReadableStream(t))return t;if(H.isArrayBufferView(t))return t.buffer;if(H.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 V_(t,this.formSerializer).toString();if((i=H.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return pi(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||a?(r.setContentType("application/json",!1),I_(t)):t}],transformResponse:[function(t){const r=this.transitional||us.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(H.isResponse(t)||H.isReadableStream(t))return t;if(t&&H.isString(t)&&(n&&!this.responseType||a)){const o=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(i){if(o)throw i.name==="SyntaxError"?me.from(i,me.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:it.classes.FormData,Blob:it.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{us.headers[e]={}});const M_=H.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"]),$_=e=>{const t={};let r,n,a;return e&&e.split(`
|
|
155
|
+
`).forEach(function(o){a=o.indexOf(":"),r=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!r||t[r]&&M_[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Lh=Symbol("internals");function xa(e){return e&&String(e).trim().toLowerCase()}function Js(e){return e===!1||e==null?e:H.isArray(e)?e.map(Js):String(e)}function j_(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 k_=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function sl(e,t,r,n,a){if(H.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!H.isString(t)){if(H.isString(n))return t.indexOf(n)!==-1;if(H.isRegExp(n))return n.test(t)}}function L_(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function U_(e,t){const r=H.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,s,o){return this[n].call(this,t,a,s,o)},configurable:!0})})}let xt=class{constructor(t){t&&this.set(t)}set(t,r,n){const a=this;function s(i,l,c){const u=xa(l);if(!u)throw new Error("header name must be a non-empty string");const d=H.findKey(a,u);(!d||a[d]===void 0||c===!0||c===void 0&&a[d]!==!1)&&(a[d||l]=Js(i))}const o=(i,l)=>H.forEach(i,(c,u)=>s(c,u,l));if(H.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(H.isString(t)&&(t=t.trim())&&!k_(t))o($_(t),r);else if(H.isHeaders(t))for(const[i,l]of t.entries())s(l,i,n);else t!=null&&s(r,t,n);return this}get(t,r){if(t=xa(t),t){const n=H.findKey(this,t);if(n){const a=this[n];if(!r)return a;if(r===!0)return j_(a);if(H.isFunction(r))return r.call(this,a,n);if(H.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=xa(t),t){const n=H.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||sl(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let a=!1;function s(o){if(o=xa(o),o){const i=H.findKey(n,o);i&&(!r||sl(n,n[i],i,r))&&(delete n[i],a=!0)}}return H.isArray(t)?t.forEach(s):s(t),a}clear(t){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const s=r[n];(!t||sl(this,this[s],s,t,!0))&&(delete this[s],a=!0)}return a}normalize(t){const r=this,n={};return H.forEach(this,(a,s)=>{const o=H.findKey(n,s);if(o){r[o]=Js(a),delete r[s];return}const i=t?L_(s):String(s).trim();i!==s&&delete r[s],r[i]=Js(a),n[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return H.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&H.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(`
|
|
156
|
+
`)}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(a=>n.set(a)),n}static accessor(t){const n=(this[Lh]=this[Lh]={accessors:{}}).accessors,a=this.prototype;function s(o){const i=xa(o);n[i]||(U_(a,o),n[i]=!0)}return H.isArray(t)?t.forEach(s):s(t),this}};xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(xt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});H.freezeMethods(xt);function ol(e,t){const r=this||us,n=t||r,a=xt.from(n.headers);let s=n.data;return H.forEach(e,function(i){s=i.call(r,s,a.normalize(),t?t.status:void 0)}),a.normalize(),s}function rg(e){return!!(e&&e.__CANCEL__)}function na(e,t,r){me.call(this,e??"canceled",me.ERR_CANCELED,t,r),this.name="CanceledError"}H.inherits(na,me,{__CANCEL__:!0});function ng(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new me("Request failed with status code "+r.status,[me.ERR_BAD_REQUEST,me.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function D_(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function N_(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[s];o||(o=c),r[a]=l,n[a]=c;let d=s,h=0;for(;d!==a;)h+=r[d++],d=d%e;if(a=(a+1)%e,a===s&&(s=(s+1)%e),c-o<t)return;const p=u&&c-u;return p?Math.round(h*1e3/p):void 0}}function F_(e,t){let r=0,n=1e3/t,a,s;const o=(c,u=Date.now())=>{r=u,a=null,s&&(clearTimeout(s),s=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-r;d>=n?o(c,u):(a=c,s||(s=setTimeout(()=>{s=null,o(a)},n-d)))},()=>a&&o(a)]}const Co=(e,t,r=3)=>{let n=0;const a=N_(50,250);return F_(s=>{const o=s.loaded,i=s.lengthComputable?s.total:void 0,l=o-n,c=a(l),u=o<=i;n=o;const d={loaded:o,total:i,progress:i?o/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&u?(i-o)/c:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},r)},Uh=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Dh=e=>(...t)=>H.asap(()=>e(...t)),B_=it.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,it.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(it.origin),it.navigator&&/(msie|trident)/i.test(it.navigator.userAgent)):()=>!0,z_=it.hasStandardBrowserEnv?{write(e,t,r,n,a,s){const o=[e+"="+encodeURIComponent(t)];H.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),H.isString(n)&&o.push("path="+n),H.isString(a)&&o.push("domain="+a),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function G_(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function H_(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ag(e,t,r){let n=!G_(t);return e&&n||r==!1?H_(e,t):t}const Nh=e=>e instanceof xt?{...e}:e;function Jr(e,t){t=t||{};const r={};function n(c,u,d,h){return H.isPlainObject(c)&&H.isPlainObject(u)?H.merge.call({caseless:h},c,u):H.isPlainObject(u)?H.merge({},u):H.isArray(u)?u.slice():u}function a(c,u,d,h){if(H.isUndefined(u)){if(!H.isUndefined(c))return n(void 0,c,d,h)}else return n(c,u,d,h)}function s(c,u){if(!H.isUndefined(u))return n(void 0,u)}function o(c,u){if(H.isUndefined(u)){if(!H.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:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:i,headers:(c,u,d)=>a(Nh(c),Nh(u),d,!0)};return H.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||a,h=d(e[u],t[u],u);H.isUndefined(h)&&d!==i||(r[u]=h)}),r}const sg=e=>{const t=Jr({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:s,headers:o,auth:i}=t;t.headers=o=xt.from(o),t.url=Zm(ag(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&o.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let l;if(H.isFormData(r)){if(it.hasStandardBrowserEnv||it.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...u].join("; "))}}if(it.hasStandardBrowserEnv&&(n&&H.isFunction(n)&&(n=n(t)),n||n!==!1&&B_(t.url))){const c=a&&s&&z_.read(s);c&&o.set(a,c)}return t},q_=typeof XMLHttpRequest<"u",J_=q_&&function(e){return new Promise(function(r,n){const a=sg(e);let s=a.data;const o=xt.from(a.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=a,u,d,h,p,m;function f(){p&&p(),m&&m(),a.cancelToken&&a.cancelToken.unsubscribe(u),a.signal&&a.signal.removeEventListener("abort",u)}let g=new XMLHttpRequest;g.open(a.method.toUpperCase(),a.url,!0),g.timeout=a.timeout;function S(){if(!g)return;const O=xt.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),E={data:!i||i==="text"||i==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:O,config:e,request:g};ng(function(P){r(P),f()},function(P){n(P),f()},E),g=null}"onloadend"in g?g.onloadend=S:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(S)},g.onabort=function(){g&&(n(new me("Request aborted",me.ECONNABORTED,e,g)),g=null)},g.onerror=function(){n(new me("Network Error",me.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let C=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const E=a.transitional||eg;a.timeoutErrorMessage&&(C=a.timeoutErrorMessage),n(new me(C,E.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,e,g)),g=null},s===void 0&&o.setContentType(null),"setRequestHeader"in g&&H.forEach(o.toJSON(),function(C,E){g.setRequestHeader(E,C)}),H.isUndefined(a.withCredentials)||(g.withCredentials=!!a.withCredentials),i&&i!=="json"&&(g.responseType=a.responseType),c&&([h,m]=Co(c,!0),g.addEventListener("progress",h)),l&&g.upload&&([d,p]=Co(l),g.upload.addEventListener("progress",d),g.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(u=O=>{g&&(n(!O||O.type?new na(null,e,g):O),g.abort(),g=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const T=D_(a.url);if(T&&it.protocols.indexOf(T)===-1){n(new me("Unsupported protocol "+T+":",me.ERR_BAD_REQUEST,e));return}g.send(s||null)})},W_=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,a;const s=function(c){if(!a){a=!0,i();const u=c instanceof Error?c:this.reason;n.abort(u instanceof me?u:new na(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,s(new me(`timeout ${t} of ms exceeded`,me.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=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=()=>H.asap(i),l}},K_=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,a;for(;n<r;)a=n+t,yield e.slice(n,a),n=a},Y_=async function*(e,t){for await(const r of Q_(e))yield*K_(r,t)},Q_=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()}},Fh=(e,t,r,n)=>{const a=Y_(e,t);let s=0,o,i=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await a.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),a.return()}},{highWaterMark:2})},fi=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",og=fi&&typeof ReadableStream=="function",X_=fi&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ig=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Z_=og&&ig(()=>{let e=!1;const t=new Request(it.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Bh=64*1024,Gl=og&&ig(()=>H.isReadableStream(new Response("").body)),Po={stream:Gl&&(e=>e.body)};fi&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Po[t]&&(Po[t]=H.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new me(`Response type '${t}' is not supported`,me.ERR_NOT_SUPPORT,n)})})})(new Response);const eI=async e=>{if(e==null)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e))return(await new Request(it.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(H.isArrayBufferView(e)||H.isArrayBuffer(e))return e.byteLength;if(H.isURLSearchParams(e)&&(e=e+""),H.isString(e))return(await X_(e)).byteLength},tI=async(e,t)=>{const r=H.toFiniteNumber(e.getContentLength());return r??eI(t)},rI=fi&&(async e=>{let{url:t,method:r,data:n,signal:a,cancelToken:s,timeout:o,onDownloadProgress:i,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:h}=sg(e);c=c?(c+"").toLowerCase():"text";let p=W_([a,s&&s.toAbortSignal()],o),m;const f=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let g;try{if(l&&Z_&&r!=="get"&&r!=="head"&&(g=await tI(u,n))!==0){let E=new Request(t,{method:"POST",body:n,duplex:"half"}),R;if(H.isFormData(n)&&(R=E.headers.get("content-type"))&&u.setContentType(R),E.body){const[P,_]=Uh(g,Co(Dh(l)));n=Fh(E.body,Bh,P,_)}}H.isString(d)||(d=d?"include":"omit");const S="credentials"in Request.prototype;m=new Request(t,{...h,signal:p,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:S?d:void 0});let T=await fetch(m);const O=Gl&&(c==="stream"||c==="response");if(Gl&&(i||O&&f)){const E={};["status","statusText","headers"].forEach(B=>{E[B]=T[B]});const R=H.toFiniteNumber(T.headers.get("content-length")),[P,_]=i&&Uh(R,Co(Dh(i),!0))||[];T=new Response(Fh(T.body,Bh,P,()=>{_&&_(),f&&f()}),E)}c=c||"text";let C=await Po[H.findKey(Po,c)||"text"](T,e);return!O&&f&&f(),await new Promise((E,R)=>{ng(E,R,{data:C,headers:xt.from(T.headers),status:T.status,statusText:T.statusText,config:e,request:m})})}catch(S){throw f&&f(),S&&S.name==="TypeError"&&/fetch/i.test(S.message)?Object.assign(new me("Network Error",me.ERR_NETWORK,e,m),{cause:S.cause||S}):me.from(S,S&&S.code,e,m)}}),Hl={http:y_,xhr:J_,fetch:rI};H.forEach(Hl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const zh=e=>`- ${e}`,nI=e=>H.isFunction(e)||e===null||e===!1,lg={getAdapter:e=>{e=H.isArray(e)?e:[e];const{length:t}=e;let r,n;const a={};for(let s=0;s<t;s++){r=e[s];let o;if(n=r,!nI(r)&&(n=Hl[(o=String(r)).toLowerCase()],n===void 0))throw new me(`Unknown adapter '${o}'`);if(n)break;a[o||"#"+s]=n}if(!n){const s=Object.entries(a).map(([i,l])=>`adapter ${i} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?s.length>1?`since :
|
|
157
157
|
`+s.map(zh).join(`
|
|
158
|
-
`):" "+zh(s[0]):"as no adapter specified";throw new me("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:
|
|
159
|
-
`+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Jr(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:s}=r;n!==void 0&&Ws.assertOptions(n,{silentJSONParsing:qt.transitional(qt.boolean),forcedJSONParsing:qt.transitional(qt.boolean),clarifyTimeoutError:qt.transitional(qt.boolean)},!1),a!=null&&(H.isFunction(a)?r.paramsSerializer={serialize:a}:Ws.assertOptions(a,{encode:qt.function,serialize:qt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Ws.assertOptions(r,{baseUrl:qt.spelling("baseURL"),withXsrfToken:qt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=s&&H.merge(s.common,s[r.method]);s&&H.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),r.headers=St.concat(o,s);const i=[];let l=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(r)===!1||(l=l&&f.synchronous,i.unshift(f.fulfilled,f.rejected))});const c=[];this.interceptors.response.forEach(function(f){c.push(f.fulfilled,f.rejected)});let u,d=0,h;if(!l){const m=[Gh.bind(this),void 0];for(m.unshift.apply(m,i),m.push.apply(m,c),h=m.length,u=Promise.resolve(r);d<h;)u=u.then(m[d++],m[d++]);return u}h=i.length;let p=r;for(d=0;d<h;){const m=i[d++],f=i[d++];try{p=m(p)}catch(g){f.call(this,g);break}}try{u=Gh.call(this,p)}catch(m){return Promise.reject(m)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Jr(this.defaults,t);const r=ag(t.baseURL,t.url,t.allowAbsoluteUrls);return Zm(r,t.params,t.paramsSerializer)}};H.forEach(["delete","get","head","options"],function(t){Br.prototype[t]=function(r,n){return this.request(Jr(n||{},{method:t,url:r,data:(n||{}).data}))}});H.forEach(["post","put","patch"],function(t){function r(n){return function(s,o,i){return this.request(Jr(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Br.prototype[t]=r(),Br.prototype[t+"Form"]=r(!0)});let sI=class ug{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(a=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](a);n._listeners=null}),this.promise.then=a=>{let s;const o=new Promise(i=>{n.subscribe(i),s=i}).then(a);return o.cancel=function(){n.unsubscribe(s)},o},t(function(s,o,i){n.reason||(n.reason=new na(s,o,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 ug(function(a){t=a}),cancel:t}}};function oI(e){return function(r){return e.apply(null,r)}}function iI(e){return H.isObject(e)&&e.isAxiosError===!0}const Hl={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};Object.entries(Hl).forEach(([e,t])=>{Hl[t]=e});function dg(e){const t=new Br(e),r=Bm(Br.prototype.request,t);return H.extend(r,Br.prototype,t,{allOwnKeys:!0}),H.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return dg(Jr(e,a))},r}const V=dg(us);V.Axios=Br;V.CanceledError=na;V.CancelToken=sI;V.isCancel=rg;V.VERSION=cg;V.toFormData=hi;V.AxiosError=me;V.Cancel=V.CanceledError;V.all=function(t){return Promise.all(t)};V.spread=oI;V.isAxiosError=iI;V.mergeConfig=Jr;V.AxiosHeaders=St;V.formToJSON=e=>tg(H.isHTMLForm(e)?new FormData(e):e);V.getAdapter=lg.getAdapter;V.HttpStatusCode=Hl;V.default=V;const{Axios:fj,AxiosError:ql,CanceledError:mj,isCancel:gj,CancelToken:yj,VERSION:bj,all:vj,Cancel:Sj,isAxiosError:lI,spread:xj,toFormData:Oj,AxiosHeaders:wj,HttpStatusCode:Cj,formToJSON:Pj,getAdapter:Rj,mergeConfig:Tj}=V,M="/api/v1".replace(/\/+$/,"");class je{constructor(t,r=M,n=V){la(this,"basePath");la(this,"axios");la(this,"configuration");this.basePath=r,this.axios=n,t&&(this.configuration=t,this.basePath=t.basePath??r)}}class cI extends Error{constructor(r,n){super(n);la(this,"field");this.field=r,this.name="RequiredError"}}const $={},j="https://example.com",v=function(e,t,r){if(r==null)throw new cI(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},k=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})},L=async function(e,t){if(t&&t.accessToken){const r=typeof t.accessToken=="function"?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+r}};function Jl(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>Jl(e,n,r)):Object.keys(t).forEach(n=>Jl(e,t[n],`${r}${r!==""?".":""}${n}`)):e.has(r)?e.append(r,t):e.set(r,t))}const U=function(e,...t){const r=new URLSearchParams(e.search);Jl(r,t),e.search=r.toString()},fe=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||""},D=function(e){return e.pathname+e.search+e.hash},N=function(e,t,r,n){return(a=t,s=r)=>{const o={...e.options,url:(a.defaults.baseURL?"":(n==null?void 0:n.basePath)??s)+e.url};return a.request(o)}},uI=function(e){return{addApp:async(t,r,n,a={})=>{v("addApp","cell",t),v("addApp","app",r);const s="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(r,l,e),{url:D(o),options:l}},clearApps:async(t,r,n={})=>{v("clearApps","cell",t);const a="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),r!==void 0&&(c.completionTimeout=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},deleteApp:async(t,r,n,a={})=>{v("deleteApp","cell",t),v("deleteApp","app",r);const s="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.completionTimeout=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},getApp:async(t,r,n={})=>{v("getApp","cell",t),v("getApp","app",r);const a="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listApps:async(t,r={})=>{v("listApps","cell",t);const n="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},updateApp:async(t,r,n,a,s={})=>{v("updateApp","cell",t),v("updateApp","app",r),v("updateApp","app2",n);const o="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};k(c,e),await L(u,e),a!==void 0&&(d.completionTimeout=a),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=fe(n,c,e),{url:D(i),options:c}}}},On=function(e){const t=uI(e);return{async addApp(r,n,a,s){var c,u;const o=await t.addApp(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ApplicationApi.addApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async clearApps(r,n,a){var l,c;const s=await t.clearApps(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ApplicationApi.clearApps"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteApp(r,n,a,s){var c,u;const o=await t.deleteApp(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ApplicationApi.deleteApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async getApp(r,n,a){var l,c;const s=await t.getApp(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ApplicationApi.getApp"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listApps(r,n){var i,l;const a=await t.listApps(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["ApplicationApi.listApps"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async updateApp(r,n,a,s,o){var u,d;const i=await t.updateApp(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["ApplicationApi.updateApp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)}}};class qh extends je{addApp(t,r,n,a){return On(this.configuration).addApp(t,r,n,a).then(s=>s(this.axios,this.basePath))}clearApps(t,r,n){return On(this.configuration).clearApps(t,r,n).then(a=>a(this.axios,this.basePath))}deleteApp(t,r,n,a){return On(this.configuration).deleteApp(t,r,n,a).then(s=>s(this.axios,this.basePath))}getApp(t,r,n){return On(this.configuration).getApp(t,r,n).then(a=>a(this.axios,this.basePath))}listApps(t,r){return On(this.configuration).listApps(t,r).then(n=>n(this.axios,this.basePath))}updateApp(t,r,n,a,s){return On(this.configuration).updateApp(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}}const dI=function(e){return{deleteCell:async(t,r,n={})=>{v("deleteCell","cell",t);const a="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),r!==void 0&&(c.completionTimeout=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},deployCell:async(t,r,n={})=>{v("deployCell","cell",t);const a="/cells",s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),r!==void 0&&(c.completionTimeout=r),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(t,i,e),{url:D(s),options:i}},getCell:async(t,r={})=>{v("getCell","cell",t);const n="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},getCellStatus:async(t,r={})=>{v("getCellStatus","cell",t);const n="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},listCells:async(t={})=>{const r="/cells",n=new URL(r,j);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...t},o={},i={};k(s,e),await L(o,e),U(n,i);let l=a&&a.headers?a.headers:{};return s.headers={...o,...l,...t.headers},{url:D(n),options:s}},updateCell:async(t,r,n,a={})=>{v("updateCell","cell",t),v("updateCell","cell2",r);const s="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(r,l,e),{url:D(o),options:l}}}},wn=function(e){const t=dI(e);return{async deleteCell(r,n,a){var l,c;const s=await t.deleteCell(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["CellApi.deleteCell"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deployCell(r,n,a){var l,c;const s=await t.deployCell(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["CellApi.deployCell"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getCell(r,n){var i,l;const a=await t.getCell(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["CellApi.getCell"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async getCellStatus(r,n){var i,l;const a=await t.getCellStatus(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["CellApi.getCellStatus"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async listCells(r){var o,i;const n=await t.listCells(r),a=(e==null?void 0:e.serverIndex)??0,s=(i=(o=$["CellApi.listCells"])==null?void 0:o[a])==null?void 0:i.url;return(l,c)=>N(n,V,M,e)(l,s||c)},async updateCell(r,n,a,s){var c,u;const o=await t.updateCell(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["CellApi.updateCell"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class hI extends je{deleteCell(t,r,n){return wn(this.configuration).deleteCell(t,r,n).then(a=>a(this.axios,this.basePath))}deployCell(t,r,n){return wn(this.configuration).deployCell(t,r,n).then(a=>a(this.axios,this.basePath))}getCell(t,r){return wn(this.configuration).getCell(t,r).then(n=>n(this.axios,this.basePath))}getCellStatus(t,r){return wn(this.configuration).getCellStatus(t,r).then(n=>n(this.axios,this.basePath))}listCells(t){return wn(this.configuration).listCells(t).then(r=>r(this.axios,this.basePath))}updateCell(t,r,n,a){return wn(this.configuration).updateCell(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const pI=function(e){return{addRobotController:async(t,r,n,a={})=>{v("addRobotController","cell",t),v("addRobotController","robotController",r);const s="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(r,l,e),{url:D(o),options:l}},clearRobotControllers:async(t,r,n={})=>{v("clearRobotControllers","cell",t);const a="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),r!==void 0&&(c.completionTimeout=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},deleteRobotController:async(t,r,n,a={})=>{v("deleteRobotController","cell",t),v("deleteRobotController","controller",r);const s="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.completionTimeout=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},getCurrentRobotControllerState:async(t,r,n={})=>{v("getCurrentRobotControllerState","cell",t),v("getCurrentRobotControllerState","controller",r);const a="/cells/{cell}/controllers/{controller}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getMode:async(t,r,n={})=>{v("getMode","cell",t),v("getMode","controller",r);const a="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getRobotController:async(t,r,n={})=>{v("getRobotController","cell",t),v("getRobotController","controller",r);const a="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getSupportedModes:async(t,r,n={})=>{v("getSupportedModes","cell",t),v("getSupportedModes","controller",r);const a="/cells/{cell}/controllers/{controller}/controller-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getVirtualRobotConfiguration:async(t,r,n={})=>{v("getVirtualRobotConfiguration","cell",t),v("getVirtualRobotConfiguration","controller",r);const a="/cells/{cell}/controllers/{controller}/virtual-robot-configuration".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listControllers:async(t,r={})=>{v("listControllers","cell",t);const n="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},setDefaultMode:async(t,r,n,a={})=>{v("setDefaultMode","cell",t),v("setDefaultMode","controller",r),v("setDefaultMode","mode",n);const s="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.mode=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},streamFreeDrive:async(t,r,n,a={})=>{v("streamFreeDrive","cell",t),v("streamFreeDrive","controller",r);const s="/cells/{cell}/controllers/{controller}/free-drive-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.response_rate=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},streamModeChange:async(t,r,n={})=>{v("streamModeChange","cell",t),v("streamModeChange","controller",r);const a="/cells/{cell}/controllers/{controller}/mode-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},streamRobotControllerState:async(t,r,n,a={})=>{v("streamRobotControllerState","cell",t),v("streamRobotControllerState","controller",r);const s="/cells/{cell}/controllers/{controller}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.response_rate=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},updateRobotController:async(t,r,n,a,s={})=>{v("updateRobotController","cell",t),v("updateRobotController","controller",r),v("updateRobotController","robotController",n);const o="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};k(c,e),await L(u,e),a!==void 0&&(d.completionTimeout=a),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=fe(n,c,e),{url:D(i),options:c}}}},gt=function(e){const t=pI(e);return{async addRobotController(r,n,a,s){var c,u;const o=await t.addRobotController(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerApi.addRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async clearRobotControllers(r,n,a){var l,c;const s=await t.clearRobotControllers(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.clearRobotControllers"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteRobotController(r,n,a,s){var c,u;const o=await t.deleteRobotController(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerApi.deleteRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async getCurrentRobotControllerState(r,n,a){var l,c;const s=await t.getCurrentRobotControllerState(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.getCurrentRobotControllerState"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getMode(r,n,a){var l,c;const s=await t.getMode(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.getMode"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getRobotController(r,n,a){var l,c;const s=await t.getRobotController(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.getRobotController"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getSupportedModes(r,n,a){var l,c;const s=await t.getSupportedModes(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.getSupportedModes"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getVirtualRobotConfiguration(r,n,a){var l,c;const s=await t.getVirtualRobotConfiguration(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.getVirtualRobotConfiguration"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listControllers(r,n){var i,l;const a=await t.listControllers(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["ControllerApi.listControllers"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async setDefaultMode(r,n,a,s){var c,u;const o=await t.setDefaultMode(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerApi.setDefaultMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async streamFreeDrive(r,n,a,s){var c,u;const o=await t.streamFreeDrive(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerApi.streamFreeDrive"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async streamModeChange(r,n,a){var l,c;const s=await t.streamModeChange(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.streamModeChange"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async streamRobotControllerState(r,n,a,s){var c,u;const o=await t.streamRobotControllerState(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerApi.streamRobotControllerState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async updateRobotController(r,n,a,s,o){var u,d;const i=await t.updateRobotController(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["ControllerApi.updateRobotController"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)}}};class fI extends je{addRobotController(t,r,n,a){return gt(this.configuration).addRobotController(t,r,n,a).then(s=>s(this.axios,this.basePath))}clearRobotControllers(t,r,n){return gt(this.configuration).clearRobotControllers(t,r,n).then(a=>a(this.axios,this.basePath))}deleteRobotController(t,r,n,a){return gt(this.configuration).deleteRobotController(t,r,n,a).then(s=>s(this.axios,this.basePath))}getCurrentRobotControllerState(t,r,n){return gt(this.configuration).getCurrentRobotControllerState(t,r,n).then(a=>a(this.axios,this.basePath))}getMode(t,r,n){return gt(this.configuration).getMode(t,r,n).then(a=>a(this.axios,this.basePath))}getRobotController(t,r,n){return gt(this.configuration).getRobotController(t,r,n).then(a=>a(this.axios,this.basePath))}getSupportedModes(t,r,n){return gt(this.configuration).getSupportedModes(t,r,n).then(a=>a(this.axios,this.basePath))}getVirtualRobotConfiguration(t,r,n){return gt(this.configuration).getVirtualRobotConfiguration(t,r,n).then(a=>a(this.axios,this.basePath))}listControllers(t,r){return gt(this.configuration).listControllers(t,r).then(n=>n(this.axios,this.basePath))}setDefaultMode(t,r,n,a){return gt(this.configuration).setDefaultMode(t,r,n,a).then(s=>s(this.axios,this.basePath))}streamFreeDrive(t,r,n,a){return gt(this.configuration).streamFreeDrive(t,r,n,a).then(s=>s(this.axios,this.basePath))}streamModeChange(t,r,n){return gt(this.configuration).streamModeChange(t,r,n).then(a=>a(this.axios,this.basePath))}streamRobotControllerState(t,r,n,a){return gt(this.configuration).streamRobotControllerState(t,r,n,a).then(s=>s(this.axios,this.basePath))}updateRobotController(t,r,n,a,s){return gt(this.configuration).updateRobotController(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}}const mI=function(e){return{listIODescriptions:async(t,r,n,a={})=>{v("listIODescriptions","cell",t),v("listIODescriptions","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n&&(u.ios=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},listIOValues:async(t,r,n,a={})=>{v("listIOValues","cell",t),v("listIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n&&(u.ios=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},setOutputValues:async(t,r,n,a={})=>{v("setOutputValues","cell",t),v("setOutputValues","controller",r),v("setOutputValues","iOValue",n);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},streamIOValues:async(t,r,n,a={})=>{v("streamIOValues","cell",t),v("streamIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n&&(u.ios=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},waitForIOEvent:async(t,r,n,a,s,o,i,l={})=>{v("waitForIOEvent","cell",t),v("waitForIOEvent","controller",r),v("waitForIOEvent","io",n),v("waitForIOEvent","comparisonType",a);const c="/cells/{cell}/controllers/{controller}/ios/wait-for".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),u=new URL(c,j);let d;e&&(d=e.baseOptions);const h={method:"GET",...d,...l},p={},m={};k(h,e),await L(p,e),n!==void 0&&(m.io=n),a!==void 0&&(m.comparison_type=a),s!==void 0&&(m.boolean_value=s),o!==void 0&&(m.integer_value=o),i!==void 0&&(m.floating_value=i),U(u,m);let f=d&&d.headers?d.headers:{};return h.headers={...p,...f,...l.headers},{url:D(u),options:h}}}},xa=function(e){const t=mI(e);return{async listIODescriptions(r,n,a,s){var c,u;const o=await t.listIODescriptions(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerIOsApi.listIODescriptions"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async listIOValues(r,n,a,s){var c,u;const o=await t.listIOValues(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerIOsApi.listIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async setOutputValues(r,n,a,s){var c,u;const o=await t.setOutputValues(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerIOsApi.setOutputValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async streamIOValues(r,n,a,s){var c,u;const o=await t.streamIOValues(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerIOsApi.streamIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async waitForIOEvent(r,n,a,s,o,i,l,c){var p,m;const u=await t.waitForIOEvent(r,n,a,s,o,i,l,c),d=(e==null?void 0:e.serverIndex)??0,h=(m=(p=$["ControllerIOsApi.waitForIOEvent"])==null?void 0:p[d])==null?void 0:m.url;return(f,g)=>N(u,V,M,e)(f,h||g)}}};class gI extends je{listIODescriptions(t,r,n,a){return xa(this.configuration).listIODescriptions(t,r,n,a).then(s=>s(this.axios,this.basePath))}listIOValues(t,r,n,a){return xa(this.configuration).listIOValues(t,r,n,a).then(s=>s(this.axios,this.basePath))}setOutputValues(t,r,n,a){return xa(this.configuration).setOutputValues(t,r,n,a).then(s=>s(this.axios,this.basePath))}streamIOValues(t,r,n,a){return xa(this.configuration).streamIOValues(t,r,n,a).then(s=>s(this.axios,this.basePath))}waitForIOEvent(t,r,n,a,s,o,i,l){return xa(this.configuration).waitForIOEvent(t,r,n,a,s,o,i,l).then(c=>c(this.axios,this.basePath))}}const yI=function(e){return{addCoordinateSystem:async(t,r,n={})=>{v("addCoordinateSystem","cell",t),v("addCoordinateSystem","addRequest",r);const a="/cells/{cell}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},deleteCoordinateSystem:async(t,r,n={})=>{v("deleteCoordinateSystem","cell",t),v("deleteCoordinateSystem","coordinateSystem",r);const a="/cells/{cell}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getCoordinateSystem:async(t,r,n,a={})=>{v("getCoordinateSystem","cell",t),v("getCoordinateSystem","coordinateSystem",r);const s="/cells/{cell}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.rotation_type=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},listCoordinateSystems:async(t,r,n={})=>{v("listCoordinateSystems","cell",t);const a="/cells/{cell}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),r!==void 0&&(c.rotation_type=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},transformInCoordinateSystem:async(t,r,n,a={})=>{v("transformInCoordinateSystem","cell",t),v("transformInCoordinateSystem","coordinateSystem",r),v("transformInCoordinateSystem","pose",n);const s="/cells/{cell}/coordinate-systems/{coordinate-system}/transform".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}}}},Oa=function(e){const t=yI(e);return{async addCoordinateSystem(r,n,a){var l,c;const s=await t.addCoordinateSystem(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["CoordinateSystemsApi.addCoordinateSystem"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteCoordinateSystem(r,n,a){var l,c;const s=await t.deleteCoordinateSystem(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["CoordinateSystemsApi.deleteCoordinateSystem"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getCoordinateSystem(r,n,a,s){var c,u;const o=await t.getCoordinateSystem(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["CoordinateSystemsApi.getCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async listCoordinateSystems(r,n,a){var l,c;const s=await t.listCoordinateSystems(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["CoordinateSystemsApi.listCoordinateSystems"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async transformInCoordinateSystem(r,n,a,s){var c,u;const o=await t.transformInCoordinateSystem(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["CoordinateSystemsApi.transformInCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class bI extends je{addCoordinateSystem(t,r,n){return Oa(this.configuration).addCoordinateSystem(t,r,n).then(a=>a(this.axios,this.basePath))}deleteCoordinateSystem(t,r,n){return Oa(this.configuration).deleteCoordinateSystem(t,r,n).then(a=>a(this.axios,this.basePath))}getCoordinateSystem(t,r,n,a){return Oa(this.configuration).getCoordinateSystem(t,r,n,a).then(s=>s(this.axios,this.basePath))}listCoordinateSystems(t,r,n){return Oa(this.configuration).listCoordinateSystems(t,r,n).then(a=>a(this.axios,this.basePath))}transformInCoordinateSystem(t,r,n,a){return Oa(this.configuration).transformInCoordinateSystem(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const vI=function(e){return{clearDevices:async(t,r={})=>{v("clearDevices","cell",t);const n="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"DELETE",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},createDevice:async(t,r,n={})=>{v("createDevice","cell",t),v("createDevice","createDeviceRequestInner",r);const a="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},deleteDevice:async(t,r,n={})=>{v("deleteDevice","cell",t),v("deleteDevice","identifier",r);const a="/cells/{cell}/devices/{identifier}".replace("{cell}",encodeURIComponent(String(t))).replace("{identifier}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getDevice:async(t,r,n={})=>{v("getDevice","cell",t),v("getDevice","identifier",r);const a="/cells/{cell}/devices/{identifier}".replace("{cell}",encodeURIComponent(String(t))).replace("{identifier}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listDevices:async(t,r={})=>{v("listDevices","cell",t);const n="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}}}},wa=function(e){const t=vI(e);return{async clearDevices(r,n){var i,l;const a=await t.clearDevices(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["DeviceConfigurationApi.clearDevices"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async createDevice(r,n,a){var l,c;const s=await t.createDevice(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["DeviceConfigurationApi.createDevice"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteDevice(r,n,a){var l,c;const s=await t.deleteDevice(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["DeviceConfigurationApi.deleteDevice"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getDevice(r,n,a){var l,c;const s=await t.getDevice(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["DeviceConfigurationApi.getDevice"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listDevices(r,n){var i,l;const a=await t.listDevices(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["DeviceConfigurationApi.listDevices"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)}}};class SI extends je{clearDevices(t,r){return wa(this.configuration).clearDevices(t,r).then(n=>n(this.axios,this.basePath))}createDevice(t,r,n){return wa(this.configuration).createDevice(t,r,n).then(a=>a(this.axios,this.basePath))}deleteDevice(t,r,n){return wa(this.configuration).deleteDevice(t,r,n).then(a=>a(this.axios,this.basePath))}getDevice(t,r,n){return wa(this.configuration).getDevice(t,r,n).then(a=>a(this.axios,this.basePath))}listDevices(t,r){return wa(this.configuration).listDevices(t,r).then(n=>n(this.axios,this.basePath))}}const xI=function(e){return{createProgram:async(t,r,n,a={})=>{v("createProgram","cell",t),v("createProgram","body",r);const s="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.name=n),c["Content-Type"]="text/plain",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(r,l,e),{url:D(o),options:l}},deleteProgram:async(t,r,n={})=>{v("deleteProgram","cell",t),v("deleteProgram","program",r);const a="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},deleteProgramList:async(t,r,n={})=>{v("deleteProgramList","cell",t),v("deleteProgramList","programIds",r);const a="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),r&&(c.program_ids=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getProgram:async(t,r,n={})=>{v("getProgram","cell",t),v("getProgram","program",r);const a="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},updateProgram:async(t,r,n,a={})=>{v("updateProgram","cell",t),v("updateProgram","program",r),v("updateProgram","body",n);const s="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="text/plain",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}}}},Ca=function(e){const t=xI(e);return{async createProgram(r,n,a,s){var c,u;const o=await t.createProgram(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["LibraryProgramApi.createProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async deleteProgram(r,n,a){var l,c;const s=await t.deleteProgram(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryProgramApi.deleteProgram"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteProgramList(r,n,a){var l,c;const s=await t.deleteProgramList(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryProgramApi.deleteProgramList"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getProgram(r,n,a){var l,c;const s=await t.getProgram(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryProgramApi.getProgram"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async updateProgram(r,n,a,s){var c,u;const o=await t.updateProgram(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["LibraryProgramApi.updateProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class OI extends je{createProgram(t,r,n,a){return Ca(this.configuration).createProgram(t,r,n,a).then(s=>s(this.axios,this.basePath))}deleteProgram(t,r,n){return Ca(this.configuration).deleteProgram(t,r,n).then(a=>a(this.axios,this.basePath))}deleteProgramList(t,r,n){return Ca(this.configuration).deleteProgramList(t,r,n).then(a=>a(this.axios,this.basePath))}getProgram(t,r,n){return Ca(this.configuration).getProgram(t,r,n).then(a=>a(this.axios,this.basePath))}updateProgram(t,r,n,a){return Ca(this.configuration).updateProgram(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const wI=function(e){return{getProgramMetadata:async(t,r,n={})=>{v("getProgramMetadata","cell",t),v("getProgramMetadata","program",r);const a="/cells/{cell}/store/programs/{program}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listProgramMetadata:async(t,r,n={})=>{v("listProgramMetadata","cell",t);const a="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),r!==void 0&&(c.show_hidden=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},updateProgramMetadata:async(t,r,n,a={})=>{v("updateProgramMetadata","cell",t),v("updateProgramMetadata","program",r),v("updateProgramMetadata","updateProgramMetadataRequest",n);const s="/cells/{cell}/store/programs/{program}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},uploadProgramMetadataImage:async(t,r,n,a={})=>{v("uploadProgramMetadataImage","cell",t),v("uploadProgramMetadataImage","program",r),v("uploadProgramMetadataImage","file",n);const s="/cells/{cell}/store/programs/{program}/metadata/image".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={},d=new(e&&e.formDataCtor||FormData);k(l,e),await L(c,e),n!==void 0&&d.append("file",n),c["Content-Type"]="multipart/form-data",U(o,u);let h=i&&i.headers?i.headers:{};return l.headers={...c,...h,...a.headers},l.data=d,{url:D(o),options:l}}}},Ts=function(e){const t=wI(e);return{async getProgramMetadata(r,n,a){var l,c;const s=await t.getProgramMetadata(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryProgramMetadataApi.getProgramMetadata"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listProgramMetadata(r,n,a){var l,c;const s=await t.listProgramMetadata(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryProgramMetadataApi.listProgramMetadata"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async updateProgramMetadata(r,n,a,s){var c,u;const o=await t.updateProgramMetadata(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["LibraryProgramMetadataApi.updateProgramMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async uploadProgramMetadataImage(r,n,a,s){var c,u;const o=await t.uploadProgramMetadataImage(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["LibraryProgramMetadataApi.uploadProgramMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class CI extends je{getProgramMetadata(t,r,n){return Ts(this.configuration).getProgramMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramMetadata(t,r,n){return Ts(this.configuration).listProgramMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}updateProgramMetadata(t,r,n,a){return Ts(this.configuration).updateProgramMetadata(t,r,n,a).then(s=>s(this.axios,this.basePath))}uploadProgramMetadataImage(t,r,n,a){return Ts(this.configuration).uploadProgramMetadataImage(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const PI=function(e){return{createRecipe:async(t,r,n,a,s={})=>{v("createRecipe","cell",t),v("createRecipe","programId",r),v("createRecipe","body",n);const o="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"POST",...l,...s},u={},d={};k(c,e),await L(u,e),r!==void 0&&(d.program_id=r),a!==void 0&&(d.name=a),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=fe(n,c,e),{url:D(i),options:c}},deleteRecipe:async(t,r,n={})=>{v("deleteRecipe","cell",t),v("deleteRecipe","recipe",r);const a="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},deleteRecipeList:async(t,r,n={})=>{v("deleteRecipeList","cell",t),v("deleteRecipeList","recipeIds",r);const a="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),r&&(c.recipe_ids=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getRecipe:async(t,r,n={})=>{v("getRecipe","cell",t),v("getRecipe","recipe",r);const a="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},updateRecipe:async(t,r,n,a={})=>{v("updateRecipe","cell",t),v("updateRecipe","recipe",r),v("updateRecipe","body",n);const s="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}}}},Pa=function(e){const t=PI(e);return{async createRecipe(r,n,a,s,o){var u,d;const i=await t.createRecipe(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["LibraryRecipeApi.createRecipe"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)},async deleteRecipe(r,n,a){var l,c;const s=await t.deleteRecipe(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryRecipeApi.deleteRecipe"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteRecipeList(r,n,a){var l,c;const s=await t.deleteRecipeList(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryRecipeApi.deleteRecipeList"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getRecipe(r,n,a){var l,c;const s=await t.getRecipe(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryRecipeApi.getRecipe"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async updateRecipe(r,n,a,s){var c,u;const o=await t.updateRecipe(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["LibraryRecipeApi.updateRecipe"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class RI extends je{createRecipe(t,r,n,a,s){return Pa(this.configuration).createRecipe(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}deleteRecipe(t,r,n){return Pa(this.configuration).deleteRecipe(t,r,n).then(a=>a(this.axios,this.basePath))}deleteRecipeList(t,r,n){return Pa(this.configuration).deleteRecipeList(t,r,n).then(a=>a(this.axios,this.basePath))}getRecipe(t,r,n){return Pa(this.configuration).getRecipe(t,r,n).then(a=>a(this.axios,this.basePath))}updateRecipe(t,r,n,a){return Pa(this.configuration).updateRecipe(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const TI=function(e){return{getRecipeMetadata:async(t,r,n={})=>{v("getRecipeMetadata","cell",t),v("getRecipeMetadata","recipe",r);const a="/cells/{cell}/store/recipes/{recipe}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listRecipeMetadata:async(t,r={})=>{v("listRecipeMetadata","cell",t);const n="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},updateRecipeMetadata:async(t,r,n,a={})=>{v("updateRecipeMetadata","cell",t),v("updateRecipeMetadata","recipe",r),v("updateRecipeMetadata","updateRecipeMetadataRequest",n);const s="/cells/{cell}/store/recipes/{recipe}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},uploadRecipeMetadataImage:async(t,r,n,a={})=>{v("uploadRecipeMetadataImage","cell",t),v("uploadRecipeMetadataImage","recipe",r),v("uploadRecipeMetadataImage","file",n);const s="/cells/{cell}/store/recipes/{recipe}/metadata/image".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={},d=new(e&&e.formDataCtor||FormData);k(l,e),await L(c,e),n!==void 0&&d.append("file",n),c["Content-Type"]="multipart/form-data",U(o,u);let h=i&&i.headers?i.headers:{};return l.headers={...c,...h,...a.headers},l.data=d,{url:D(o),options:l}}}},As=function(e){const t=TI(e);return{async getRecipeMetadata(r,n,a){var l,c;const s=await t.getRecipeMetadata(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryRecipeMetadataApi.getRecipeMetadata"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listRecipeMetadata(r,n){var i,l;const a=await t.listRecipeMetadata(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["LibraryRecipeMetadataApi.listRecipeMetadata"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async updateRecipeMetadata(r,n,a,s){var c,u;const o=await t.updateRecipeMetadata(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["LibraryRecipeMetadataApi.updateRecipeMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async uploadRecipeMetadataImage(r,n,a,s){var c,u;const o=await t.uploadRecipeMetadataImage(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["LibraryRecipeMetadataApi.uploadRecipeMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class AI extends je{getRecipeMetadata(t,r,n){return As(this.configuration).getRecipeMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listRecipeMetadata(t,r){return As(this.configuration).listRecipeMetadata(t,r).then(n=>n(this.axios,this.basePath))}updateRecipeMetadata(t,r,n,a){return As(this.configuration).updateRecipeMetadata(t,r,n,a).then(s=>s(this.axios,this.basePath))}uploadRecipeMetadataImage(t,r,n,a){return As(this.configuration).uploadRecipeMetadataImage(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const VI=function(e){return{deleteAllMotions:async(t,r={})=>{v("deleteAllMotions","cell",t);const n="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"DELETE",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},deleteMotion:async(t,r,n={})=>{v("deleteMotion","cell",t),v("deleteMotion","motion",r);const a="/cells/{cell}/motions/{motion}/delete".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},executeTrajectory:async(t,r,n={})=>{v("executeTrajectory","cell",t),v("executeTrajectory","executeTrajectoryRequest",r);const a="/cells/{cell}/motions/executetrajectory".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},getMotionTrajectory:async(t,r,n,a,s={})=>{v("getMotionTrajectory","cell",t),v("getMotionTrajectory","motion",r),v("getMotionTrajectory","sampleTime",n);const o="/cells/{cell}/motions/{motion}/trajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};k(c,e),await L(u,e),n!==void 0&&(d.sample_time=n),a!==void 0&&(d.responses_coordinate_system=a),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:D(i),options:c}},getMotionTrajectorySample:async(t,r,n,a,s={})=>{v("getMotionTrajectorySample","cell",t),v("getMotionTrajectorySample","motion",r);const o="/cells/{cell}/motions/{motion}/trajectorysample".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};k(c,e),await L(u,e),n!==void 0&&(d.location_on_trajectory=n),a!==void 0&&(d.response_coordinate_system=a),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:D(i),options:c}},getPlannedMotion:async(t,r,n,a={})=>{v("getPlannedMotion","cell",t),v("getPlannedMotion","motion",r);const s="/cells/{cell}/motions/{motion}/planned-motion".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.sample_time=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},getPlanningMotionGroupModels:async(t,r={})=>{v("getPlanningMotionGroupModels","cell",t);const n="/cells/{cell}/motion-planning/motion-group-models".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},listMotions:async(t,r={})=>{v("listMotions","cell",t);const n="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},loadPlannedMotion:async(t,r,n={})=>{v("loadPlannedMotion","cell",t),v("loadPlannedMotion","plannedMotion",r);const a="/cells/{cell}/planned-motions".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},planCollisionFreePTP:async(t,r,n={})=>{v("planCollisionFreePTP","cell",t);const a="/cells/{cell}/motion-planning/plan-collision-free-ptp".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},planMotion:async(t,r,n={})=>{v("planMotion","cell",t),v("planMotion","planRequest",r);const a="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},planTrajectory:async(t,r,n={})=>{v("planTrajectory","cell",t);const a="/cells/{cell}/motion-planning/plan-trajectory".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},stopExecution:async(t,r,n={})=>{v("stopExecution","cell",t),v("stopExecution","motion",r);const a="/cells/{cell}/motions/{motion}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},streamMove:async(t,r,n={})=>{v("streamMove","cell",t),v("streamMove","streamMoveRequest",r);const a="/cells/{cell}/motions/streammove".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},streamMoveBackward:async(t,r,n,a,s,o,i={})=>{v("streamMoveBackward","cell",t),v("streamMoveBackward","motion",r),v("streamMoveBackward","playbackSpeedInPercent",n);const l="/cells/{cell}/motions/{motion}/executebackward".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),c=new URL(l,j);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};k(d,e),await L(h,e),n!==void 0&&(p.playback_speed_in_percent=n),a!==void 0&&(p.response_rate=a),s!==void 0&&(p.response_coordinate_system=s),o!==void 0&&(p.start_location_on_trajectory=o),U(c,p);let m=u&&u.headers?u.headers:{};return d.headers={...h,...m,...i.headers},{url:D(c),options:d}},streamMoveForward:async(t,r,n,a,s,o,i={})=>{v("streamMoveForward","cell",t),v("streamMoveForward","motion",r),v("streamMoveForward","playbackSpeedInPercent",n);const l="/cells/{cell}/motions/{motion}/executeforward".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),c=new URL(l,j);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};k(d,e),await L(h,e),n!==void 0&&(p.playback_speed_in_percent=n),a!==void 0&&(p.response_rate=a),s!==void 0&&(p.response_coordinate_system=s),o!==void 0&&(p.start_location_on_trajectory=o),U(c,p);let m=u&&u.headers?u.headers:{};return d.headers={...h,...m,...i.headers},{url:D(c),options:d}},streamMoveToTrajectoryViaJointPTP:async(t,r,n,a,s,o,i,l,c,u,d={})=>{v("streamMoveToTrajectoryViaJointPTP","cell",t),v("streamMoveToTrajectoryViaJointPTP","motion",r),v("streamMoveToTrajectoryViaJointPTP","locationOnTrajectory",n);const h="/cells/{cell}/motions/{motion}/executetotrajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),p=new URL(h,j);let m;e&&(m=e.baseOptions);const f={method:"GET",...m,...d},g={},S={};k(f,e),await L(g,e),n!==void 0&&(S.location_on_trajectory=n),a&&(S["limit_override.joint_velocity_limits.joints"]=a),s&&(S["limit_override.joint_acceleration_limits.joints"]=s),o!==void 0&&(S["limit_override.tcp_velocity_limit"]=o),i!==void 0&&(S["limit_override.tcp_acceleration_limit"]=i),l!==void 0&&(S["limit_override.tcp_orientation_velocity_limit"]=l),c!==void 0&&(S["limit_override.tcp_orientation_acceleration_limit"]=c),u!==void 0&&(S.responses_coordinate_system=u),U(p,S);let R=m&&m.headers?m.headers:{};return f.headers={...g,...R,...d.headers},{url:D(p),options:f}}}},st=function(e){const t=VI(e);return{async deleteAllMotions(r,n){var i,l;const a=await t.deleteAllMotions(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["MotionApi.deleteAllMotions"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async deleteMotion(r,n,a){var l,c;const s=await t.deleteMotion(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionApi.deleteMotion"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async executeTrajectory(r,n,a){var l,c;const s=await t.executeTrajectory(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionApi.executeTrajectory"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getMotionTrajectory(r,n,a,s,o){var u,d;const i=await t.getMotionTrajectory(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["MotionApi.getMotionTrajectory"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)},async getMotionTrajectorySample(r,n,a,s,o){var u,d;const i=await t.getMotionTrajectorySample(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["MotionApi.getMotionTrajectorySample"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)},async getPlannedMotion(r,n,a,s){var c,u;const o=await t.getPlannedMotion(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["MotionApi.getPlannedMotion"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async getPlanningMotionGroupModels(r,n){var i,l;const a=await t.getPlanningMotionGroupModels(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["MotionApi.getPlanningMotionGroupModels"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async listMotions(r,n){var i,l;const a=await t.listMotions(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["MotionApi.listMotions"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async loadPlannedMotion(r,n,a){var l,c;const s=await t.loadPlannedMotion(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionApi.loadPlannedMotion"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async planCollisionFreePTP(r,n,a){var l,c;const s=await t.planCollisionFreePTP(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionApi.planCollisionFreePTP"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async planMotion(r,n,a){var l,c;const s=await t.planMotion(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionApi.planMotion"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async planTrajectory(r,n,a){var l,c;const s=await t.planTrajectory(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionApi.planTrajectory"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async stopExecution(r,n,a){var l,c;const s=await t.stopExecution(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionApi.stopExecution"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async streamMove(r,n,a){var l,c;const s=await t.streamMove(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionApi.streamMove"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async streamMoveBackward(r,n,a,s,o,i,l){var h,p;const c=await t.streamMoveBackward(r,n,a,s,o,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=$["MotionApi.streamMoveBackward"])==null?void 0:h[u])==null?void 0:p.url;return(m,f)=>N(c,V,M,e)(m,d||f)},async streamMoveForward(r,n,a,s,o,i,l){var h,p;const c=await t.streamMoveForward(r,n,a,s,o,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=$["MotionApi.streamMoveForward"])==null?void 0:h[u])==null?void 0:p.url;return(m,f)=>N(c,V,M,e)(m,d||f)},async streamMoveToTrajectoryViaJointPTP(r,n,a,s,o,i,l,c,u,d,h){var g,S;const p=await t.streamMoveToTrajectoryViaJointPTP(r,n,a,s,o,i,l,c,u,d,h),m=(e==null?void 0:e.serverIndex)??0,f=(S=(g=$["MotionApi.streamMoveToTrajectoryViaJointPTP"])==null?void 0:g[m])==null?void 0:S.url;return(R,O)=>N(p,V,M,e)(R,f||O)}}};class EI extends je{deleteAllMotions(t,r){return st(this.configuration).deleteAllMotions(t,r).then(n=>n(this.axios,this.basePath))}deleteMotion(t,r,n){return st(this.configuration).deleteMotion(t,r,n).then(a=>a(this.axios,this.basePath))}executeTrajectory(t,r,n){return st(this.configuration).executeTrajectory(t,r,n).then(a=>a(this.axios,this.basePath))}getMotionTrajectory(t,r,n,a,s){return st(this.configuration).getMotionTrajectory(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}getMotionTrajectorySample(t,r,n,a,s){return st(this.configuration).getMotionTrajectorySample(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}getPlannedMotion(t,r,n,a){return st(this.configuration).getPlannedMotion(t,r,n,a).then(s=>s(this.axios,this.basePath))}getPlanningMotionGroupModels(t,r){return st(this.configuration).getPlanningMotionGroupModels(t,r).then(n=>n(this.axios,this.basePath))}listMotions(t,r){return st(this.configuration).listMotions(t,r).then(n=>n(this.axios,this.basePath))}loadPlannedMotion(t,r,n){return st(this.configuration).loadPlannedMotion(t,r,n).then(a=>a(this.axios,this.basePath))}planCollisionFreePTP(t,r,n){return st(this.configuration).planCollisionFreePTP(t,r,n).then(a=>a(this.axios,this.basePath))}planMotion(t,r,n){return st(this.configuration).planMotion(t,r,n).then(a=>a(this.axios,this.basePath))}planTrajectory(t,r,n){return st(this.configuration).planTrajectory(t,r,n).then(a=>a(this.axios,this.basePath))}stopExecution(t,r,n){return st(this.configuration).stopExecution(t,r,n).then(a=>a(this.axios,this.basePath))}streamMove(t,r,n){return st(this.configuration).streamMove(t,r,n).then(a=>a(this.axios,this.basePath))}streamMoveBackward(t,r,n,a,s,o,i){return st(this.configuration).streamMoveBackward(t,r,n,a,s,o,i).then(l=>l(this.axios,this.basePath))}streamMoveForward(t,r,n,a,s,o,i){return st(this.configuration).streamMoveForward(t,r,n,a,s,o,i).then(l=>l(this.axios,this.basePath))}streamMoveToTrajectoryViaJointPTP(t,r,n,a,s,o,i,l,c,u,d){return st(this.configuration).streamMoveToTrajectoryViaJointPTP(t,r,n,a,s,o,i,l,c,u,d).then(h=>h(this.axios,this.basePath))}}const _I=function(e){return{activateAllMotionGroups:async(t,r,n={})=>{v("activateAllMotionGroups","cell",t),v("activateAllMotionGroups","controller",r);const a="/cells/{cell}/motion-groups/all".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),r!==void 0&&(c.controller=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},activateMotionGroup:async(t,r,n={})=>{v("activateMotionGroup","cell",t),v("activateMotionGroup","motionGroup",r);const a="/cells/{cell}/motion-groups".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),r!==void 0&&(c.motion_group=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},deactivateMotionGroup:async(t,r,n={})=>{v("deactivateMotionGroup","cell",t),v("deactivateMotionGroup","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listMotionGroups:async(t,r={})=>{v("listMotionGroups","cell",t);const n="/cells/{cell}/motion-groups".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}}}},Vs=function(e){const t=_I(e);return{async activateAllMotionGroups(r,n,a){var l,c;const s=await t.activateAllMotionGroups(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupApi.activateAllMotionGroups"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async activateMotionGroup(r,n,a){var l,c;const s=await t.activateMotionGroup(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupApi.activateMotionGroup"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deactivateMotionGroup(r,n,a){var l,c;const s=await t.deactivateMotionGroup(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupApi.deactivateMotionGroup"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listMotionGroups(r,n){var i,l;const a=await t.listMotionGroups(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["MotionGroupApi.listMotionGroups"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)}}};class II extends je{activateAllMotionGroups(t,r,n){return Vs(this.configuration).activateAllMotionGroups(t,r,n).then(a=>a(this.axios,this.basePath))}activateMotionGroup(t,r,n){return Vs(this.configuration).activateMotionGroup(t,r,n).then(a=>a(this.axios,this.basePath))}deactivateMotionGroup(t,r,n){return Vs(this.configuration).deactivateMotionGroup(t,r,n).then(a=>a(this.axios,this.basePath))}listMotionGroups(t,r){return Vs(this.configuration).listMotionGroups(t,r).then(n=>n(this.axios,this.basePath))}}const MI=function(e){return{getActivePayload:async(t,r,n={})=>{v("getActivePayload","cell",t),v("getActivePayload","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/payloads/current".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getActiveTcp:async(t,r,n,a={})=>{v("getActiveTcp","cell",t),v("getActiveTcp","motionGroup",r);const s="/cells/{cell}/motion-groups/{motion-group}/tcps/current".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.rotation_type=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},getCurrentMotionGroupState:async(t,r,n,a,s={})=>{v("getCurrentMotionGroupState","cell",t),v("getCurrentMotionGroupState","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};k(c,e),await L(u,e),n!==void 0&&(d.tcp=n),a!==void 0&&(d.response_coordinate_system=a),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:D(i),options:c}},getInfoCapabilities:async(t,r,n={})=>{v("getInfoCapabilities","cell",t),v("getInfoCapabilities","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/info-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getMotionGroupSpecification:async(t,r,n={})=>{v("getMotionGroupSpecification","cell",t),v("getMotionGroupSpecification","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/specification".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getMounting:async(t,r,n={})=>{v("getMounting","cell",t),v("getMounting","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getOptimizerConfiguration:async(t,r,n,a={})=>{v("getOptimizerConfiguration","cell",t),v("getOptimizerConfiguration","motionGroup",r);const s="/cells/{cell}/motion-groups/{motion-group}/optimizer-setup".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.tcp=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},getSafetySetup:async(t,r,n={})=>{v("getSafetySetup","cell",t),v("getSafetySetup","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/safety-setup".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listPayloads:async(t,r,n={})=>{v("listPayloads","cell",t),v("listPayloads","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/payloads".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listTcps:async(t,r,n,a={})=>{v("listTcps","cell",t),v("listTcps","motionGroup",r);const s="/cells/{cell}/motion-groups/{motion-group}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.rotation_type=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},streamMotionGroupState:async(t,r,n,a,s,o={})=>{v("streamMotionGroupState","cell",t),v("streamMotionGroupState","motionGroup",r);const i="/cells/{cell}/motion-groups/{motion-group}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),l=new URL(i,j);let c;e&&(c=e.baseOptions);const u={method:"GET",...c,...o},d={},h={};k(u,e),await L(d,e),n!==void 0&&(h.response_rate=n),a!==void 0&&(h.response_coordinate_system=a),s!==void 0&&(h.tcp=s),U(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...o.headers},{url:D(l),options:u}}}},jt=function(e){const t=MI(e);return{async getActivePayload(r,n,a){var l,c;const s=await t.getActivePayload(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupInfosApi.getActivePayload"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getActiveTcp(r,n,a,s){var c,u;const o=await t.getActiveTcp(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["MotionGroupInfosApi.getActiveTcp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async getCurrentMotionGroupState(r,n,a,s,o){var u,d;const i=await t.getCurrentMotionGroupState(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["MotionGroupInfosApi.getCurrentMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)},async getInfoCapabilities(r,n,a){var l,c;const s=await t.getInfoCapabilities(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupInfosApi.getInfoCapabilities"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getMotionGroupSpecification(r,n,a){var l,c;const s=await t.getMotionGroupSpecification(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupInfosApi.getMotionGroupSpecification"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getMounting(r,n,a){var l,c;const s=await t.getMounting(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupInfosApi.getMounting"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getOptimizerConfiguration(r,n,a,s){var c,u;const o=await t.getOptimizerConfiguration(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["MotionGroupInfosApi.getOptimizerConfiguration"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async getSafetySetup(r,n,a){var l,c;const s=await t.getSafetySetup(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupInfosApi.getSafetySetup"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listPayloads(r,n,a){var l,c;const s=await t.listPayloads(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupInfosApi.listPayloads"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listTcps(r,n,a,s){var c,u;const o=await t.listTcps(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["MotionGroupInfosApi.listTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async streamMotionGroupState(r,n,a,s,o,i){var d,h;const l=await t.streamMotionGroupState(r,n,a,s,o,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=$["MotionGroupInfosApi.streamMotionGroupState"])==null?void 0:d[c])==null?void 0:h.url;return(p,m)=>N(l,V,M,e)(p,u||m)}}};class $I extends je{getActivePayload(t,r,n){return jt(this.configuration).getActivePayload(t,r,n).then(a=>a(this.axios,this.basePath))}getActiveTcp(t,r,n,a){return jt(this.configuration).getActiveTcp(t,r,n,a).then(s=>s(this.axios,this.basePath))}getCurrentMotionGroupState(t,r,n,a,s){return jt(this.configuration).getCurrentMotionGroupState(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}getInfoCapabilities(t,r,n){return jt(this.configuration).getInfoCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}getMotionGroupSpecification(t,r,n){return jt(this.configuration).getMotionGroupSpecification(t,r,n).then(a=>a(this.axios,this.basePath))}getMounting(t,r,n){return jt(this.configuration).getMounting(t,r,n).then(a=>a(this.axios,this.basePath))}getOptimizerConfiguration(t,r,n,a){return jt(this.configuration).getOptimizerConfiguration(t,r,n,a).then(s=>s(this.axios,this.basePath))}getSafetySetup(t,r,n){return jt(this.configuration).getSafetySetup(t,r,n).then(a=>a(this.axios,this.basePath))}listPayloads(t,r,n){return jt(this.configuration).listPayloads(t,r,n).then(a=>a(this.axios,this.basePath))}listTcps(t,r,n,a){return jt(this.configuration).listTcps(t,r,n,a).then(s=>s(this.axios,this.basePath))}streamMotionGroupState(t,r,n,a,s,o){return jt(this.configuration).streamMotionGroupState(t,r,n,a,s,o).then(i=>i(this.axios,this.basePath))}}const jI=function(e){return{directionJogging:async(t,r,n={})=>{v("directionJogging","cell",t),v("directionJogging","directionJoggingRequest",r);const a="/cells/{cell}/motion-groups/move-tcp".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},getJoggingCapabilities:async(t,r,n={})=>{v("getJoggingCapabilities","cell",t),v("getJoggingCapabilities","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/jogging-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},jointJogging:async(t,r,n={})=>{v("jointJogging","cell",t),v("jointJogging","jointJoggingRequest",r);const a="/cells/{cell}/motion-groups/move-joint".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},stopJogging:async(t,r,n={})=>{v("stopJogging","cell",t),v("stopJogging","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}}}},Es=function(e){const t=jI(e);return{async directionJogging(r,n,a){var l,c;const s=await t.directionJogging(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupJoggingApi.directionJogging"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getJoggingCapabilities(r,n,a){var l,c;const s=await t.getJoggingCapabilities(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupJoggingApi.getJoggingCapabilities"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async jointJogging(r,n,a){var l,c;const s=await t.jointJogging(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupJoggingApi.jointJogging"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async stopJogging(r,n,a){var l,c;const s=await t.stopJogging(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupJoggingApi.stopJogging"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)}}};class kI extends je{directionJogging(t,r,n){return Es(this.configuration).directionJogging(t,r,n).then(a=>a(this.axios,this.basePath))}getJoggingCapabilities(t,r,n){return Es(this.configuration).getJoggingCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}jointJogging(t,r,n){return Es(this.configuration).jointJogging(t,r,n).then(a=>a(this.axios,this.basePath))}stopJogging(t,r,n){return Es(this.configuration).stopJogging(t,r,n).then(a=>a(this.axios,this.basePath))}}const LI=function(e){return{calculateAllInverseKinematic:async(t,r,n,a={})=>{v("calculateAllInverseKinematic","cell",t),v("calculateAllInverseKinematic","motionGroup",r),v("calculateAllInverseKinematic","allJointPositionsRequest",n);const s="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-all-joint-positions".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},calculateForwardKinematic:async(t,r,n,a={})=>{v("calculateForwardKinematic","cell",t),v("calculateForwardKinematic","motionGroup",r),v("calculateForwardKinematic","tcpPoseRequest",n);const s="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-tcp-pose".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},calculateInverseKinematic:async(t,r,n,a={})=>{v("calculateInverseKinematic","cell",t),v("calculateInverseKinematic","motionGroup",r),v("calculateInverseKinematic","jointPositionRequest",n);const s="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-joint-position".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},getKinematicCapabilities:async(t,r,n={})=>{v("getKinematicCapabilities","cell",t),v("getKinematicCapabilities","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/kinematic-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}}}},_s=function(e){const t=LI(e);return{async calculateAllInverseKinematic(r,n,a,s){var c,u;const o=await t.calculateAllInverseKinematic(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["MotionGroupKinematicApi.calculateAllInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async calculateForwardKinematic(r,n,a,s){var c,u;const o=await t.calculateForwardKinematic(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["MotionGroupKinematicApi.calculateForwardKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async calculateInverseKinematic(r,n,a,s){var c,u;const o=await t.calculateInverseKinematic(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["MotionGroupKinematicApi.calculateInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async getKinematicCapabilities(r,n,a){var l,c;const s=await t.getKinematicCapabilities(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupKinematicApi.getKinematicCapabilities"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)}}};class UI extends je{calculateAllInverseKinematic(t,r,n,a){return _s(this.configuration).calculateAllInverseKinematic(t,r,n,a).then(s=>s(this.axios,this.basePath))}calculateForwardKinematic(t,r,n,a){return _s(this.configuration).calculateForwardKinematic(t,r,n,a).then(s=>s(this.axios,this.basePath))}calculateInverseKinematic(t,r,n,a){return _s(this.configuration).calculateInverseKinematic(t,r,n,a).then(s=>s(this.axios,this.basePath))}getKinematicCapabilities(t,r,n){return _s(this.configuration).getKinematicCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}}const DI=function(e){return{createProgramRunner:async(t,r,n={})=>{v("createProgramRunner","cell",t),v("createProgramRunner","request",r);const a="/cells/{cell}/programs/runners".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="text/plain",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},executeProgram:async(t,r,n={})=>{v("executeProgram","cell",t),v("executeProgram","codeWithArguments",r);const a="/cells/{cell}/programs/execute".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},getProgramRunner:async(t,r,n={})=>{v("getProgramRunner","cell",t),v("getProgramRunner","runner",r);const a="/cells/{cell}/programs/runners/{runner}".replace("{cell}",encodeURIComponent(String(t))).replace("{runner}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listProgramRunners:async(t,r={})=>{v("listProgramRunners","cell",t);const n="/cells/{cell}/programs/runners".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},migrateProgram:async(t,r,n={})=>{v("migrateProgram","cell",t),v("migrateProgram","request1",r);const a="/cells/{cell}/programs/migrate".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="text/plain",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},planProgram:async(t,r,n,a={})=>{v("planProgram","cell",t),v("planProgram","request",r);const s="/cells/{cell}/programs/plan".replace("{cell}",encodeURIComponent(String(t))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.identifier=n),c["Content-Type"]="text/plain",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(r,l,e),{url:D(o),options:l}},stopAllProgramRunner:async(t,r={})=>{v("stopAllProgramRunner","cell",t);const n="/cells/{cell}/programs/runners/stop".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"POST",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},stopProgramRunner:async(t,r,n={})=>{v("stopProgramRunner","cell",t),v("stopProgramRunner","runner",r);const a="/cells/{cell}/programs/runners/{runner}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{runner}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}}}},vr=function(e){const t=DI(e);return{async createProgramRunner(r,n,a){var l,c;const s=await t.createProgramRunner(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ProgramApi.createProgramRunner"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async executeProgram(r,n,a){var l,c;const s=await t.executeProgram(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ProgramApi.executeProgram"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getProgramRunner(r,n,a){var l,c;const s=await t.getProgramRunner(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ProgramApi.getProgramRunner"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listProgramRunners(r,n){var i,l;const a=await t.listProgramRunners(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["ProgramApi.listProgramRunners"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async migrateProgram(r,n,a){var l,c;const s=await t.migrateProgram(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ProgramApi.migrateProgram"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async planProgram(r,n,a,s){var c,u;const o=await t.planProgram(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ProgramApi.planProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async stopAllProgramRunner(r,n){var i,l;const a=await t.stopAllProgramRunner(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["ProgramApi.stopAllProgramRunner"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async stopProgramRunner(r,n,a){var l,c;const s=await t.stopProgramRunner(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ProgramApi.stopProgramRunner"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)}}};class NI extends je{createProgramRunner(t,r,n){return vr(this.configuration).createProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}executeProgram(t,r,n){return vr(this.configuration).executeProgram(t,r,n).then(a=>a(this.axios,this.basePath))}getProgramRunner(t,r,n){return vr(this.configuration).getProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramRunners(t,r){return vr(this.configuration).listProgramRunners(t,r).then(n=>n(this.axios,this.basePath))}migrateProgram(t,r,n){return vr(this.configuration).migrateProgram(t,r,n).then(a=>a(this.axios,this.basePath))}planProgram(t,r,n,a){return vr(this.configuration).planProgram(t,r,n,a).then(s=>s(this.axios,this.basePath))}stopAllProgramRunner(t,r){return vr(this.configuration).stopAllProgramRunner(t,r).then(n=>n(this.axios,this.basePath))}stopProgramRunner(t,r,n){return vr(this.configuration).stopProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}}const FI=function(e){return{clearProgramsValues:async(t,r={})=>{v("clearProgramsValues","cell",t);const n="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"DELETE",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},createProgramsValue:async(t,r,n={})=>{v("createProgramsValue","cell",t),v("createProgramsValue","requestBody",r);const a="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},deleteProgramValue:async(t,r,n={})=>{v("deleteProgramValue","cell",t),v("deleteProgramValue","key",r);const a="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getProgramValue:async(t,r,n={})=>{v("getProgramValue","cell",t),v("getProgramValue","key",r);const a="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listProgramsValues:async(t,r={})=>{v("listProgramsValues","cell",t);const n="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},updateProgramValue:async(t,r,n,a={})=>{v("updateProgramValue","cell",t),v("updateProgramValue","key",r),v("updateProgramValue","value",n);const s="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}}}},Cn=function(e){const t=FI(e);return{async clearProgramsValues(r,n){var i,l;const a=await t.clearProgramsValues(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["ProgramValuesApi.clearProgramsValues"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async createProgramsValue(r,n,a){var l,c;const s=await t.createProgramsValue(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ProgramValuesApi.createProgramsValue"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteProgramValue(r,n,a){var l,c;const s=await t.deleteProgramValue(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ProgramValuesApi.deleteProgramValue"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getProgramValue(r,n,a){var l,c;const s=await t.getProgramValue(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ProgramValuesApi.getProgramValue"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listProgramsValues(r,n){var i,l;const a=await t.listProgramsValues(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["ProgramValuesApi.listProgramsValues"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async updateProgramValue(r,n,a,s){var c,u;const o=await t.updateProgramValue(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ProgramValuesApi.updateProgramValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class BI extends je{clearProgramsValues(t,r){return Cn(this.configuration).clearProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}createProgramsValue(t,r,n){return Cn(this.configuration).createProgramsValue(t,r,n).then(a=>a(this.axios,this.basePath))}deleteProgramValue(t,r,n){return Cn(this.configuration).deleteProgramValue(t,r,n).then(a=>a(this.axios,this.basePath))}getProgramValue(t,r,n){return Cn(this.configuration).getProgramValue(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramsValues(t,r){return Cn(this.configuration).listProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}updateProgramValue(t,r,n,a){return Cn(this.configuration).updateProgramValue(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const zI=function(e){return{deleteStoredCollider:async(t,r,n={})=>{v("deleteStoredCollider","cell",t),v("deleteStoredCollider","collider",r);const a="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},deleteStoredCollisionLinkChain:async(t,r,n={})=>{v("deleteStoredCollisionLinkChain","cell",t),v("deleteStoredCollisionLinkChain","linkChain",r);const a="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},deleteStoredCollisionTool:async(t,r,n={})=>{v("deleteStoredCollisionTool","cell",t),v("deleteStoredCollisionTool","tool",r);const a="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getDefaultLinkChain:async(t,r,n={})=>{v("getDefaultLinkChain","cell",t),v("getDefaultLinkChain","motionGroupModel",r);const a="/cells/{cell}/store/collision/default-link-chains/{motion-group-model}".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group-model}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getStoredCollider:async(t,r,n={})=>{v("getStoredCollider","cell",t),v("getStoredCollider","collider",r);const a="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getStoredCollisionLinkChain:async(t,r,n={})=>{v("getStoredCollisionLinkChain","cell",t),v("getStoredCollisionLinkChain","linkChain",r);const a="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getStoredCollisionTool:async(t,r,n={})=>{v("getStoredCollisionTool","cell",t),v("getStoredCollisionTool","tool",r);const a="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listCollisionLinkChains:async(t,r={})=>{v("listCollisionLinkChains","cell",t);const n="/cells/{cell}/store/collision/link-chains".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},listStoredColliders:async(t,r={})=>{v("listStoredColliders","cell",t);const n="/cells/{cell}/store/collision/colliders".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},listStoredCollisionTools:async(t,r={})=>{v("listStoredCollisionTools","cell",t);const n="/cells/{cell}/store/collision/tools".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},storeCollider:async(t,r,n,a={})=>{v("storeCollider","cell",t),v("storeCollider","collider",r),v("storeCollider","collider2",n);const s="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},storeCollisionLinkChain:async(t,r,n,a={})=>{v("storeCollisionLinkChain","cell",t),v("storeCollisionLinkChain","linkChain",r),v("storeCollisionLinkChain","collider",n);const s="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},storeCollisionTool:async(t,r,n,a={})=>{v("storeCollisionTool","cell",t),v("storeCollisionTool","tool",r),v("storeCollisionTool","requestBody",n);const s="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}}}},Ot=function(e){const t=zI(e);return{async deleteStoredCollider(r,n,a){var l,c;const s=await t.deleteStoredCollider(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.deleteStoredCollider"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteStoredCollisionLinkChain(r,n,a){var l,c;const s=await t.deleteStoredCollisionLinkChain(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.deleteStoredCollisionLinkChain"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteStoredCollisionTool(r,n,a){var l,c;const s=await t.deleteStoredCollisionTool(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.deleteStoredCollisionTool"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getDefaultLinkChain(r,n,a){var l,c;const s=await t.getDefaultLinkChain(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.getDefaultLinkChain"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getStoredCollider(r,n,a){var l,c;const s=await t.getStoredCollider(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.getStoredCollider"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getStoredCollisionLinkChain(r,n,a){var l,c;const s=await t.getStoredCollisionLinkChain(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.getStoredCollisionLinkChain"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getStoredCollisionTool(r,n,a){var l,c;const s=await t.getStoredCollisionTool(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.getStoredCollisionTool"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listCollisionLinkChains(r,n){var i,l;const a=await t.listCollisionLinkChains(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["StoreCollisionComponentsApi.listCollisionLinkChains"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async listStoredColliders(r,n){var i,l;const a=await t.listStoredColliders(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["StoreCollisionComponentsApi.listStoredColliders"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async listStoredCollisionTools(r,n){var i,l;const a=await t.listStoredCollisionTools(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["StoreCollisionComponentsApi.listStoredCollisionTools"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async storeCollider(r,n,a,s){var c,u;const o=await t.storeCollider(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["StoreCollisionComponentsApi.storeCollider"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async storeCollisionLinkChain(r,n,a,s){var c,u;const o=await t.storeCollisionLinkChain(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["StoreCollisionComponentsApi.storeCollisionLinkChain"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async storeCollisionTool(r,n,a,s){var c,u;const o=await t.storeCollisionTool(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["StoreCollisionComponentsApi.storeCollisionTool"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class GI extends je{deleteStoredCollider(t,r,n){return Ot(this.configuration).deleteStoredCollider(t,r,n).then(a=>a(this.axios,this.basePath))}deleteStoredCollisionLinkChain(t,r,n){return Ot(this.configuration).deleteStoredCollisionLinkChain(t,r,n).then(a=>a(this.axios,this.basePath))}deleteStoredCollisionTool(t,r,n){return Ot(this.configuration).deleteStoredCollisionTool(t,r,n).then(a=>a(this.axios,this.basePath))}getDefaultLinkChain(t,r,n){return Ot(this.configuration).getDefaultLinkChain(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollider(t,r,n){return Ot(this.configuration).getStoredCollider(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionLinkChain(t,r,n){return Ot(this.configuration).getStoredCollisionLinkChain(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionTool(t,r,n){return Ot(this.configuration).getStoredCollisionTool(t,r,n).then(a=>a(this.axios,this.basePath))}listCollisionLinkChains(t,r){return Ot(this.configuration).listCollisionLinkChains(t,r).then(n=>n(this.axios,this.basePath))}listStoredColliders(t,r){return Ot(this.configuration).listStoredColliders(t,r).then(n=>n(this.axios,this.basePath))}listStoredCollisionTools(t,r){return Ot(this.configuration).listStoredCollisionTools(t,r).then(n=>n(this.axios,this.basePath))}storeCollider(t,r,n,a){return Ot(this.configuration).storeCollider(t,r,n,a).then(s=>s(this.axios,this.basePath))}storeCollisionLinkChain(t,r,n,a){return Ot(this.configuration).storeCollisionLinkChain(t,r,n,a).then(s=>s(this.axios,this.basePath))}storeCollisionTool(t,r,n,a){return Ot(this.configuration).storeCollisionTool(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const HI=function(e){return{deleteStoredCollisionScene:async(t,r,n={})=>{v("deleteStoredCollisionScene","cell",t),v("deleteStoredCollisionScene","scene",r);const a="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getStoredCollisionScene:async(t,r,n={})=>{v("getStoredCollisionScene","cell",t),v("getStoredCollisionScene","scene",r);const a="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listStoredCollisionScenes:async(t,r={})=>{v("listStoredCollisionScenes","cell",t);const n="/cells/{cell}/store/collision/scenes".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},storeCollisionScene:async(t,r,n,a={})=>{v("storeCollisionScene","cell",t),v("storeCollisionScene","scene",r),v("storeCollisionScene","collisionSceneAssembly",n);const s="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}}}},Is=function(e){const t=HI(e);return{async deleteStoredCollisionScene(r,n,a){var l,c;const s=await t.deleteStoredCollisionScene(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionScenesApi.deleteStoredCollisionScene"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getStoredCollisionScene(r,n,a){var l,c;const s=await t.getStoredCollisionScene(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionScenesApi.getStoredCollisionScene"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listStoredCollisionScenes(r,n){var i,l;const a=await t.listStoredCollisionScenes(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["StoreCollisionScenesApi.listStoredCollisionScenes"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async storeCollisionScene(r,n,a,s){var c,u;const o=await t.storeCollisionScene(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["StoreCollisionScenesApi.storeCollisionScene"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class qI extends je{deleteStoredCollisionScene(t,r,n){return Is(this.configuration).deleteStoredCollisionScene(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionScene(t,r,n){return Is(this.configuration).getStoredCollisionScene(t,r,n).then(a=>a(this.axios,this.basePath))}listStoredCollisionScenes(t,r){return Is(this.configuration).listStoredCollisionScenes(t,r).then(n=>n(this.axios,this.basePath))}storeCollisionScene(t,r,n,a){return Is(this.configuration).storeCollisionScene(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const JI=function(e){return{clearAllObjects:async(t,r={})=>{v("clearAllObjects","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"DELETE",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},deleteObject:async(t,r,n={})=>{v("deleteObject","cell",t),v("deleteObject","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getObject:async(t,r,n={})=>{v("getObject","cell",t),v("getObject","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getObjectMetadata:async(t,r,n={})=>{v("getObjectMetadata","cell",t),v("getObjectMetadata","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"HEAD",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listAllObjectKeys:async(t,r={})=>{v("listAllObjectKeys","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},storeObject:async(t,r,n,a,s={})=>{v("storeObject","cell",t),v("storeObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={},h=new(e&&e.formDataCtor||FormData);k(c,e),await L(u,e),a!==void 0&&h.append("AnyValue",new Blob([JSON.stringify(a)],{type:"application/json"})),u["Content-Type"]="multipart/form-data",n!=null&&(u["X-Metadata"]=typeof n=="string"?n:JSON.stringify(n)),U(i,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...s.headers},c.data=h,{url:D(i),options:c}}}},Pn=function(e){const t=JI(e);return{async clearAllObjects(r,n){var i,l;const a=await t.clearAllObjects(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["StoreObjectApi.clearAllObjects"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async deleteObject(r,n,a){var l,c;const s=await t.deleteObject(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreObjectApi.deleteObject"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getObject(r,n,a){var l,c;const s=await t.getObject(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreObjectApi.getObject"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getObjectMetadata(r,n,a){var l,c;const s=await t.getObjectMetadata(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreObjectApi.getObjectMetadata"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listAllObjectKeys(r,n){var i,l;const a=await t.listAllObjectKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["StoreObjectApi.listAllObjectKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async storeObject(r,n,a,s,o){var u,d;const i=await t.storeObject(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["StoreObjectApi.storeObject"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)}}};class WI extends je{clearAllObjects(t,r){return Pn(this.configuration).clearAllObjects(t,r).then(n=>n(this.axios,this.basePath))}deleteObject(t,r,n){return Pn(this.configuration).deleteObject(t,r,n).then(a=>a(this.axios,this.basePath))}getObject(t,r,n){return Pn(this.configuration).getObject(t,r,n).then(a=>a(this.axios,this.basePath))}getObjectMetadata(t,r,n){return Pn(this.configuration).getObjectMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listAllObjectKeys(t,r){return Pn(this.configuration).listAllObjectKeys(t,r).then(n=>n(this.axios,this.basePath))}storeObject(t,r,n,a,s){return Pn(this.configuration).storeObject(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}}const KI=function(e){return{checkNovaVersionUpdate:async(t,r={})=>{v("checkNovaVersionUpdate","channel",t);const n="/system/update",a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),t!==void 0&&(l.channel=t),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},getDiagnosePackage:async(t={})=>{const r="/system/diagnosis-package/zip",n=new URL(r,j);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...t},o={},i={};k(s,e),await L(o,e),U(n,i);let l=a&&a.headers?a.headers:{};return s.headers={...o,...l,...t.headers},{url:D(n),options:s}},getSystemStatus:async(t={})=>{const r="/system/status",n=new URL(r,j);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...t},o={},i={};k(s,e),await L(o,e),U(n,i);let l=a&&a.headers?a.headers:{};return s.headers={...o,...l,...t.headers},{url:D(n),options:s}},getSystemVersion:async(t={})=>{const r="/system/version",n=new URL(r,j);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...t},o={},i={};k(s,e),await L(o,e),U(n,i);let l=a&&a.headers?a.headers:{};return s.headers={...o,...l,...t.headers},{url:D(n),options:s}},updateNovaVersion:async(t,r={})=>{v("updateNovaVersion","updateNovaVersionRequest",t);const n="/system/update",a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"PUT",...s,...r},i={},l={};k(o,e),await L(i,e),i["Content-Type"]="application/json",U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},o.data=fe(t,o,e),{url:D(a),options:o}}}},Ra=function(e){const t=KI(e);return{async checkNovaVersionUpdate(r,n){var i,l;const a=await t.checkNovaVersionUpdate(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["SystemApi.checkNovaVersionUpdate"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async getDiagnosePackage(r){var o,i;const n=await t.getDiagnosePackage(r),a=(e==null?void 0:e.serverIndex)??0,s=(i=(o=$["SystemApi.getDiagnosePackage"])==null?void 0:o[a])==null?void 0:i.url;return(l,c)=>N(n,V,M,e)(l,s||c)},async getSystemStatus(r){var o,i;const n=await t.getSystemStatus(r),a=(e==null?void 0:e.serverIndex)??0,s=(i=(o=$["SystemApi.getSystemStatus"])==null?void 0:o[a])==null?void 0:i.url;return(l,c)=>N(n,V,M,e)(l,s||c)},async getSystemVersion(r){var o,i;const n=await t.getSystemVersion(r),a=(e==null?void 0:e.serverIndex)??0,s=(i=(o=$["SystemApi.getSystemVersion"])==null?void 0:o[a])==null?void 0:i.url;return(l,c)=>N(n,V,M,e)(l,s||c)},async updateNovaVersion(r,n){var i,l;const a=await t.updateNovaVersion(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["SystemApi.updateNovaVersion"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)}}};class YI extends je{checkNovaVersionUpdate(t,r){return Ra(this.configuration).checkNovaVersionUpdate(t,r).then(n=>n(this.axios,this.basePath))}getDiagnosePackage(t){return Ra(this.configuration).getDiagnosePackage(t).then(r=>r(this.axios,this.basePath))}getSystemStatus(t){return Ra(this.configuration).getSystemStatus(t).then(r=>r(this.axios,this.basePath))}getSystemVersion(t){return Ra(this.configuration).getSystemVersion(t).then(r=>r(this.axios,this.basePath))}updateNovaVersion(t,r){return Ra(this.configuration).updateNovaVersion(t,r).then(n=>n(this.axios,this.basePath))}}const QI=function(e){return{getMotionGroupState:async(t,r,n,a={})=>{v("getMotionGroupState","cell",t),v("getMotionGroupState","controller",r),v("getMotionGroupState","id",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},getMotionGroups:async(t,r,n={})=>{v("getMotionGroups","cell",t),v("getMotionGroups","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/motiongroups".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getVirtualRobotIOValue:async(t,r,n,a={})=>{v("getVirtualRobotIOValue","cell",t),v("getVirtualRobotIOValue","controller",r),v("getVirtualRobotIOValue","io",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{io}",encodeURIComponent(String(n))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},listIOs:async(t,r,n={})=>{v("listIOs","cell",t),v("listIOs","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/ios".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},setMotionGroupState:async(t,r,n,a,s={})=>{v("setMotionGroupState","cell",t),v("setMotionGroupState","controller",r),v("setMotionGroupState","id",n),v("setMotionGroupState","motionGroupJoints",a);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};k(c,e),await L(u,e),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=fe(a,c,e),{url:D(i),options:c}},setVirtualRobotIOValue:async(t,r,n,a,s,o,i={})=>{v("setVirtualRobotIOValue","cell",t),v("setVirtualRobotIOValue","controller",r),v("setVirtualRobotIOValue","io",n);const l="/cells/{cell}/controllers/{controller}/teach-pendant/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{io}",encodeURIComponent(String(n))),c=new URL(l,j);let u;e&&(u=e.baseOptions);const d={method:"PUT",...u,...i},h={},p={};k(d,e),await L(h,e),a!==void 0&&(p.bool=a),s!==void 0&&(p.integer=s),o!==void 0&&(p.double=o),U(c,p);let m=u&&u.headers?u.headers:{};return d.headers={...h,...m,...i.headers},{url:D(c),options:d}}}},Rn=function(e){const t=QI(e);return{async getMotionGroupState(r,n,a,s){var c,u;const o=await t.getMotionGroupState(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualRobotApi.getMotionGroupState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async getMotionGroups(r,n,a){var l,c;const s=await t.getMotionGroups(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualRobotApi.getMotionGroups"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getVirtualRobotIOValue(r,n,a,s){var c,u;const o=await t.getVirtualRobotIOValue(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualRobotApi.getVirtualRobotIOValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async listIOs(r,n,a){var l,c;const s=await t.listIOs(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualRobotApi.listIOs"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async setMotionGroupState(r,n,a,s,o){var u,d;const i=await t.setMotionGroupState(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualRobotApi.setMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)},async setVirtualRobotIOValue(r,n,a,s,o,i,l){var h,p;const c=await t.setVirtualRobotIOValue(r,n,a,s,o,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=$["VirtualRobotApi.setVirtualRobotIOValue"])==null?void 0:h[u])==null?void 0:p.url;return(m,f)=>N(c,V,M,e)(m,d||f)}}};class XI extends je{getMotionGroupState(t,r,n,a){return Rn(this.configuration).getMotionGroupState(t,r,n,a).then(s=>s(this.axios,this.basePath))}getMotionGroups(t,r,n){return Rn(this.configuration).getMotionGroups(t,r,n).then(a=>a(this.axios,this.basePath))}getVirtualRobotIOValue(t,r,n,a){return Rn(this.configuration).getVirtualRobotIOValue(t,r,n,a).then(s=>s(this.axios,this.basePath))}listIOs(t,r,n){return Rn(this.configuration).listIOs(t,r,n).then(a=>a(this.axios,this.basePath))}setMotionGroupState(t,r,n,a,s){return Rn(this.configuration).setMotionGroupState(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}setVirtualRobotIOValue(t,r,n,a,s,o,i){return Rn(this.configuration).setVirtualRobotIOValue(t,r,n,a,s,o,i).then(l=>l(this.axios,this.basePath))}}const ZI=function(e){return{externalJointsStream:async(t,r,n,a={})=>{v("externalJointsStream","cell",t),v("externalJointsStream","controller",r),v("externalJointsStream","externalJointStreamDatapoint",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/externalJointsStream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},getMotionGroupBehavior:async(t,r,n,a={})=>{v("getMotionGroupBehavior","cell",t),v("getMotionGroupBehavior","controller",r),v("getMotionGroupBehavior","id",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},setMotionGroupBehavior:async(t,r,n,a,s={})=>{v("setMotionGroupBehavior","cell",t),v("setMotionGroupBehavior","controller",r),v("setMotionGroupBehavior","id",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};k(c,e),await L(u,e),a!==void 0&&(d.behavior=a),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:D(i),options:c}}}},il=function(e){const t=ZI(e);return{async externalJointsStream(r,n,a,s){var c,u;const o=await t.externalJointsStream(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualRobotBehaviorApi.externalJointsStream"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async getMotionGroupBehavior(r,n,a,s){var c,u;const o=await t.getMotionGroupBehavior(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualRobotBehaviorApi.getMotionGroupBehavior"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async setMotionGroupBehavior(r,n,a,s,o){var u,d;const i=await t.setMotionGroupBehavior(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualRobotBehaviorApi.setMotionGroupBehavior"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)}}};class e2 extends je{externalJointsStream(t,r,n,a){return il(this.configuration).externalJointsStream(t,r,n,a).then(s=>s(this.axios,this.basePath))}getMotionGroupBehavior(t,r,n,a){return il(this.configuration).getMotionGroupBehavior(t,r,n,a).then(s=>s(this.axios,this.basePath))}setMotionGroupBehavior(t,r,n,a,s){return il(this.configuration).setMotionGroupBehavior(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}}const t2=function(e){return{getCycleTime:async(t,r,n={})=>{v("getCycleTime","cell",t),v("getCycleTime","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/cycle-time".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getEStop:async(t,r,n={})=>{v("getEStop","cell",t),v("getEStop","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/estop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getOperationMode:async(t,r,n={})=>{v("getOperationMode","cell",t),v("getOperationMode","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},pushEStop:async(t,r,n={})=>{v("pushEStop","cell",t),v("pushEStop","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/estop/push".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},releaseEStop:async(t,r,n={})=>{v("releaseEStop","cell",t),v("releaseEStop","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/estop/release".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},setOperationMode:async(t,r,n,a={})=>{v("setOperationMode","cell",t),v("setOperationMode","controller",r),v("setOperationMode","mode",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.mode=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}}}},Tn=function(e){const t=t2(e);return{async getCycleTime(r,n,a){var l,c;const s=await t.getCycleTime(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualRobotModeApi.getCycleTime"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getEStop(r,n,a){var l,c;const s=await t.getEStop(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualRobotModeApi.getEStop"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getOperationMode(r,n,a){var l,c;const s=await t.getOperationMode(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualRobotModeApi.getOperationMode"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async pushEStop(r,n,a){var l,c;const s=await t.pushEStop(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualRobotModeApi.pushEStop"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async releaseEStop(r,n,a){var l,c;const s=await t.releaseEStop(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualRobotModeApi.releaseEStop"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async setOperationMode(r,n,a,s){var c,u;const o=await t.setOperationMode(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualRobotModeApi.setOperationMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class r2 extends je{getCycleTime(t,r,n){return Tn(this.configuration).getCycleTime(t,r,n).then(a=>a(this.axios,this.basePath))}getEStop(t,r,n){return Tn(this.configuration).getEStop(t,r,n).then(a=>a(this.axios,this.basePath))}getOperationMode(t,r,n){return Tn(this.configuration).getOperationMode(t,r,n).then(a=>a(this.axios,this.basePath))}pushEStop(t,r,n){return Tn(this.configuration).pushEStop(t,r,n).then(a=>a(this.axios,this.basePath))}releaseEStop(t,r,n){return Tn(this.configuration).releaseEStop(t,r,n).then(a=>a(this.axios,this.basePath))}setOperationMode(t,r,n,a){return Tn(this.configuration).setOperationMode(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const n2=function(e){return{addVirtualRobotCoordinateSystem:async(t,r,n,a={})=>{v("addVirtualRobotCoordinateSystem","cell",t),v("addVirtualRobotCoordinateSystem","controller",r),v("addVirtualRobotCoordinateSystem","coordinateSystem",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},addVirtualRobotTcp:async(t,r,n,a,s={})=>{v("addVirtualRobotTcp","cell",t),v("addVirtualRobotTcp","controller",r),v("addVirtualRobotTcp","id",n),v("addVirtualRobotTcp","robotTcp",a);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};k(c,e),await L(u,e),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=fe(a,c,e),{url:D(i),options:c}},deleteVirtualRobotCoordinateSystem:async(t,r,n,a,s={})=>{v("deleteVirtualRobotCoordinateSystem","cell",t),v("deleteVirtualRobotCoordinateSystem","controller",r),v("deleteVirtualRobotCoordinateSystem","coordinateSystem",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},u={},d={};k(c,e),await L(u,e),a!==void 0&&(d.delete_dependent=a),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:D(i),options:c}},deleteVirtualRobotTcp:async(t,r,n,a,s={})=>{v("deleteVirtualRobotTcp","cell",t),v("deleteVirtualRobotTcp","controller",r),v("deleteVirtualRobotTcp","id",n),v("deleteVirtualRobotTcp","tcp",a);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/tcps/{tcp}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))).replace("{tcp}",encodeURIComponent(String(a))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},u={},d={};k(c,e),await L(u,e),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:D(i),options:c}},getVirtualRobotMounting:async(t,r,n,a={})=>{v("getVirtualRobotMounting","cell",t),v("getVirtualRobotMounting","controller",r),v("getVirtualRobotMounting","id",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},listVirtualRobotCoordinateSystems:async(t,r,n={})=>{v("listVirtualRobotCoordinateSystems","cell",t),v("listVirtualRobotCoordinateSystems","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listVirtualRobotTcps:async(t,r,n,a={})=>{v("listVirtualRobotTcps","cell",t),v("listVirtualRobotTcps","controller",r),v("listVirtualRobotTcps","id",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},setVirtualRobotMounting:async(t,r,n,a,s={})=>{v("setVirtualRobotMounting","cell",t),v("setVirtualRobotMounting","controller",r),v("setVirtualRobotMounting","id",n),v("setVirtualRobotMounting","coordinateSystem",a);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};k(c,e),await L(u,e),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=fe(a,c,e),{url:D(i),options:c}}}},Sr=function(e){const t=n2(e);return{async addVirtualRobotCoordinateSystem(r,n,a,s){var c,u;const o=await t.addVirtualRobotCoordinateSystem(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualRobotSetupApi.addVirtualRobotCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async addVirtualRobotTcp(r,n,a,s,o){var u,d;const i=await t.addVirtualRobotTcp(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualRobotSetupApi.addVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)},async deleteVirtualRobotCoordinateSystem(r,n,a,s,o){var u,d;const i=await t.deleteVirtualRobotCoordinateSystem(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualRobotSetupApi.deleteVirtualRobotCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)},async deleteVirtualRobotTcp(r,n,a,s,o){var u,d;const i=await t.deleteVirtualRobotTcp(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualRobotSetupApi.deleteVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)},async getVirtualRobotMounting(r,n,a,s){var c,u;const o=await t.getVirtualRobotMounting(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualRobotSetupApi.getVirtualRobotMounting"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async listVirtualRobotCoordinateSystems(r,n,a){var l,c;const s=await t.listVirtualRobotCoordinateSystems(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualRobotSetupApi.listVirtualRobotCoordinateSystems"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listVirtualRobotTcps(r,n,a,s){var c,u;const o=await t.listVirtualRobotTcps(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualRobotSetupApi.listVirtualRobotTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async setVirtualRobotMounting(r,n,a,s,o){var u,d;const i=await t.setVirtualRobotMounting(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualRobotSetupApi.setVirtualRobotMounting"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)}}};class a2 extends je{addVirtualRobotCoordinateSystem(t,r,n,a){return Sr(this.configuration).addVirtualRobotCoordinateSystem(t,r,n,a).then(s=>s(this.axios,this.basePath))}addVirtualRobotTcp(t,r,n,a,s){return Sr(this.configuration).addVirtualRobotTcp(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}deleteVirtualRobotCoordinateSystem(t,r,n,a,s){return Sr(this.configuration).deleteVirtualRobotCoordinateSystem(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}deleteVirtualRobotTcp(t,r,n,a,s){return Sr(this.configuration).deleteVirtualRobotTcp(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}getVirtualRobotMounting(t,r,n,a){return Sr(this.configuration).getVirtualRobotMounting(t,r,n,a).then(s=>s(this.axios,this.basePath))}listVirtualRobotCoordinateSystems(t,r,n){return Sr(this.configuration).listVirtualRobotCoordinateSystems(t,r,n).then(a=>a(this.axios,this.basePath))}listVirtualRobotTcps(t,r,n,a){return Sr(this.configuration).listVirtualRobotTcps(t,r,n,a).then(s=>s(this.axios,this.basePath))}setVirtualRobotMounting(t,r,n,a,s){return Sr(this.configuration).setVirtualRobotMounting(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}}function rr(e,t,r){return Math.max(t,Math.min(r,e))}class s2{constructor(t=0,r=0,n=0,a=1){this.isQuaternion=!0,this._x=t,this._y=r,this._z=n,this._w=a}static slerpFlat(t,r,n,a,s,o,i){let l=n[a+0],c=n[a+1],u=n[a+2],d=n[a+3];const h=s[o+0],p=s[o+1],m=s[o+2],f=s[o+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]=m,t[r+3]=f;return}if(d!==f||l!==h||c!==p||u!==m){let g=1-i;const S=l*h+c*p+u*m+d*f,R=S>=0?1:-1,O=1-S*S;if(O>Number.EPSILON){const E=Math.sqrt(O),T=Math.atan2(E,S*R);g=Math.sin(g*T)/E,i=Math.sin(i*T)/E}const C=i*R;if(l=l*g+h*C,c=c*g+p*C,u=u*g+m*C,d=d*g+f*C,g===1-i){const E=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=E,c*=E,u*=E,d*=E}}t[r]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d}static multiplyQuaternionsFlat(t,r,n,a,s,o){const i=n[a],l=n[a+1],c=n[a+2],u=n[a+3],d=s[o],h=s[o+1],p=s[o+2],m=s[o+3];return t[r]=i*m+u*d+l*p-c*h,t[r+1]=l*m+u*h+c*d-i*p,t[r+2]=c*m+u*p+i*h-l*d,t[r+3]=u*m-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,a){return this._x=t,this._y=r,this._z=n,this._w=a,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,a=t._y,s=t._z,o=t._order,i=Math.cos,l=Math.sin,c=i(n/2),u=i(a/2),d=i(s/2),h=l(n/2),p=l(a/2),m=l(s/2);switch(o){case"XYZ":this._x=h*u*d+c*p*m,this._y=c*p*d-h*u*m,this._z=c*u*m+h*p*d,this._w=c*u*d-h*p*m;break;case"YXZ":this._x=h*u*d+c*p*m,this._y=c*p*d-h*u*m,this._z=c*u*m-h*p*d,this._w=c*u*d+h*p*m;break;case"ZXY":this._x=h*u*d-c*p*m,this._y=c*p*d+h*u*m,this._z=c*u*m+h*p*d,this._w=c*u*d-h*p*m;break;case"ZYX":this._x=h*u*d-c*p*m,this._y=c*p*d+h*u*m,this._z=c*u*m-h*p*d,this._w=c*u*d+h*p*m;break;case"YZX":this._x=h*u*d+c*p*m,this._y=c*p*d+h*u*m,this._z=c*u*m-h*p*d,this._w=c*u*d-h*p*m;break;case"XZY":this._x=h*u*d-c*p*m,this._y=c*p*d-h*u*m,this._z=c*u*m+h*p*d,this._w=c*u*d+h*p*m;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return r===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,r){const n=r/2,a=Math.sin(n);return this._x=t.x*a,this._y=t.y*a,this._z=t.z*a,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const r=t.elements,n=r[0],a=r[4],s=r[8],o=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=(o-a)*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=(a+o)/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=(a+o)/p,this._y=.25*p,this._z=(l+u)/p}else{const p=2*Math.sqrt(1+d-n-i);this._w=(o-a)/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(rr(this.dot(t),-1,1)))}rotateTowards(t,r){const n=this.angleTo(t);if(n===0)return this;const a=Math.min(1,r/n);return this.slerp(t,a),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,a=t._y,s=t._z,o=t._w,i=r._x,l=r._y,c=r._z,u=r._w;return this._x=n*u+o*i+a*c-s*l,this._y=a*u+o*l+s*i-n*c,this._z=s*u+o*c+n*l-a*i,this._w=o*u-n*i-a*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,a=this._y,s=this._z,o=this._w;let i=o*t._w+n*t._x+a*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=o,this._x=n,this._y=a,this._z=s,this;const l=1-i*i;if(l<=Number.EPSILON){const p=1-r;return this._w=p*o+r*this._w,this._x=p*n+r*this._x,this._y=p*a+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=o*d+this._w*h,this._x=n*d+this._x*h,this._y=a*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(),a=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(a*Math.sin(t),a*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 Ln{constructor(t=0,r=0,n=0){Ln.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(Jh.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(Jh.setFromAxisAngle(t,r))}applyMatrix3(t){const r=this.x,n=this.y,a=this.z,s=t.elements;return this.x=s[0]*r+s[3]*n+s[6]*a,this.y=s[1]*r+s[4]*n+s[7]*a,this.z=s[2]*r+s[5]*n+s[8]*a,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const r=this.x,n=this.y,a=this.z,s=t.elements,o=1/(s[3]*r+s[7]*n+s[11]*a+s[15]);return this.x=(s[0]*r+s[4]*n+s[8]*a+s[12])*o,this.y=(s[1]*r+s[5]*n+s[9]*a+s[13])*o,this.z=(s[2]*r+s[6]*n+s[10]*a+s[14])*o,this}applyQuaternion(t){const r=this.x,n=this.y,a=this.z,s=t.x,o=t.y,i=t.z,l=t.w,c=2*(o*a-i*n),u=2*(i*r-s*a),d=2*(s*n-o*r);return this.x=r+l*c+o*d-i*u,this.y=n+l*u+i*c-s*d,this.z=a+l*d+s*u-o*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,a=this.z,s=t.elements;return this.x=s[0]*r+s[4]*n+s[8]*a,this.y=s[1]*r+s[5]*n+s[9]*a,this.z=s[2]*r+s[6]*n+s[10]*a,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=rr(this.x,t.x,r.x),this.y=rr(this.y,t.y,r.y),this.z=rr(this.z,t.z,r.z),this}clampScalar(t,r){return this.x=rr(this.x,t,r),this.y=rr(this.y,t,r),this.z=rr(this.z,t,r),this}clampLength(t,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(rr(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,a=t.y,s=t.z,o=r.x,i=r.y,l=r.z;return this.x=a*l-s*i,this.y=s*o-n*l,this.z=n*i-a*o,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 ll.copy(this).projectOnVector(t),this.sub(ll)}reflect(t){return this.sub(ll.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(rr(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const r=this.x-t.x,n=this.y-t.y,a=this.z-t.z;return r*r+n*n+a*a}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 a=Math.sin(r)*t;return this.x=a*Math.sin(n),this.y=Math.cos(r)*t,this.z=a*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(),a=this.setFromMatrixColumn(t,2).length();return this.x=r,this.y=n,this.z=a,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 ll=new Ln,Jh=new s2;function o2(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 a=e[n];if(typeof a!="string")throw new TypeError("Url must be a string. Received "+a);a!==""&&(n>0&&(a=a.replace(/^[\/]+/,"")),n<e.length-1?a=a.replace(/[\/]+$/,""):a=a.replace(/[\/]+$/,"/"),t.push(a))}var s=t.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var o=s.split("?");return s=o.shift()+(o.length>0?"?":"")+o.join("&"),s}function cl(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),o2(e)}var Jt={},Wh;function i2(){if(Wh)return Jt;Wh=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.TokenData=void 0,Jt.parse=d,Jt.compile=h,Jt.match=f,Jt.pathToRegexp=g,Jt.stringify=C;const e="/",t=P=>P,r=/^[$_\p{ID_Start}]$/u,n=/^[$\u200c\u200d\p{ID_Continue}]$/u,a="https://git.new/pathToRegexpError",s={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function o(P){return P.replace(/[{}()\[\]+?!:*]/g,"\\$&")}function i(P){return P.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}function*l(P){const _=[...P];let B=0;function b(){let A="";if(r.test(_[++B]))for(A+=_[B];n.test(_[++B]);)A+=_[B];else if(_[B]==='"'){let z=B;for(;B<_.length;){if(_[++B]==='"'){B++,z=0;break}_[B]==="\\"?A+=_[++B]:A+=_[B]}if(z)throw new TypeError(`Unterminated quote at ${z}: ${a}`)}if(!A)throw new TypeError(`Missing parameter name at ${B}: ${a}`);return A}for(;B<_.length;){const A=_[B],z=s[A];if(z)yield{type:z,index:B++,value:A};else if(A==="\\")yield{type:"ESCAPED",index:B++,value:_[B++]};else if(A===":"){const I=b();yield{type:"PARAM",index:B,value:I}}else if(A==="*"){const I=b();yield{type:"WILDCARD",index:B,value:I}}else yield{type:"CHAR",index:B,value:_[B++]}}return{type:"END",index:B,value:""}}class c{constructor(_){this.tokens=_}peek(){if(!this._peek){const _=this.tokens.next();this._peek=_.value}return this._peek}tryConsume(_){const B=this.peek();if(B.type===_)return this._peek=void 0,B.value}consume(_){const B=this.tryConsume(_);if(B!==void 0)return B;const{type:b,index:A}=this.peek();throw new TypeError(`Unexpected ${b} at ${A}, expected ${_}: ${a}`)}text(){let _="",B;for(;B=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)_+=B;return _}}class u{constructor(_){this.tokens=_}}Jt.TokenData=u;function d(P,_={}){const{encodePath:B=t}=_,b=new c(l(P));function A(I){const G=[];for(;;){const re=b.text();re&&G.push({type:"text",value:B(re)});const te=b.tryConsume("PARAM");if(te){G.push({type:"param",name:te});continue}const oe=b.tryConsume("WILDCARD");if(oe){G.push({type:"wildcard",name:oe});continue}if(b.tryConsume("{")){G.push({type:"group",tokens:A("}")});continue}return b.consume(I),G}}const z=A("END");return new u(z)}function h(P,_={}){const{encode:B=encodeURIComponent,delimiter:b=e}=_,A=P instanceof u?P:d(P,_),z=p(A.tokens,b,B);return function(G={}){const[re,...te]=z(G);if(te.length)throw new TypeError(`Missing parameters: ${te.join(", ")}`);return re}}function p(P,_,B){const b=P.map(A=>m(A,_,B));return A=>{const z=[""];for(const I of b){const[G,...re]=I(A);z[0]+=G,z.push(...re)}return z}}function m(P,_,B){if(P.type==="text")return()=>[P.value];if(P.type==="group"){const A=p(P.tokens,_,B);return z=>{const[I,...G]=A(z);return G.length?[""]:[I]}}const b=B||t;return P.type==="wildcard"&&B!==!1?A=>{const z=A[P.name];if(z==null)return["",P.name];if(!Array.isArray(z)||z.length===0)throw new TypeError(`Expected "${P.name}" to be a non-empty array`);return[z.map((I,G)=>{if(typeof I!="string")throw new TypeError(`Expected "${P.name}/${G}" to be a string`);return b(I)}).join(_)]}:A=>{const z=A[P.name];if(z==null)return["",P.name];if(typeof z!="string")throw new TypeError(`Expected "${P.name}" to be a string`);return[b(z)]}}function f(P,_={}){const{decode:B=decodeURIComponent,delimiter:b=e}=_,{regexp:A,keys:z}=g(P,_),I=z.map(G=>B===!1?t:G.type==="param"?B:re=>re.split(b).map(B));return function(re){const te=A.exec(re);if(!te)return!1;const oe=te[0],Z=Object.create(null);for(let ae=1;ae<te.length;ae++){if(te[ae]===void 0)continue;const ge=z[ae-1],ue=I[ae-1];Z[ge.name]=ue(te[ae])}return{path:oe,params:Z}}}function g(P,_={}){const{delimiter:B=e,end:b=!0,sensitive:A=!1,trailing:z=!0}=_,I=[],G=[],re=A?"":"i",oe=(Array.isArray(P)?P:[P]).map(ge=>ge instanceof u?ge:d(ge,_));for(const{tokens:ge}of oe)for(const ue of S(ge,0,[])){const De=R(ue,B,I);G.push(De)}let Z=`^(?:${G.join("|")})`;return z&&(Z+=`(?:${i(B)}$)?`),Z+=b?"$":`(?=${i(B)}|$)`,{regexp:new RegExp(Z,re),keys:I}}function*S(P,_,B){if(_===P.length)return yield B;const b=P[_];if(b.type==="group"){const A=B.slice();for(const z of S(b.tokens,0,A))yield*S(P,_+1,z)}else B.push(b);yield*S(P,_+1,B)}function R(P,_,B){let b="",A="",z=!0;for(let I=0;I<P.length;I++){const G=P[I];if(G.type==="text"){b+=i(G.value),A+=G.value,z||(z=G.value.includes(_));continue}if(G.type==="param"||G.type==="wildcard"){if(!z&&!A)throw new TypeError(`Missing text after "${G.name}": ${a}`);G.type==="param"?b+=`(${O(_,z?"":A)}+)`:b+="([\\s\\S]+)",B.push(G),A="",z=!1;continue}}return b}function O(P,_){return _.length<2?P.length<2?`[^${i(P+_)}]`:`(?:(?!${i(P)})[^${i(_)}])`:P.length<2?`(?:(?!${i(_)})[^${i(P)}])`:`(?:(?!${i(_)}|${i(P)})[\\s\\S])`}function C(P){return P.tokens.map(function _(B,b,A){if(B.type==="text")return o(B.value);if(B.type==="group")return`{${B.tokens.map(_).join("")}}`;const I=E(B.name)&&T(A[b+1])?B.name:JSON.stringify(B.name);if(B.type==="param")return`:${I}`;if(B.type==="wildcard")return`*${I}`;throw new TypeError(`Unexpected token: ${B}`)}).join("")}function E(P){const[_,...B]=P;return r.test(_)?B.every(b=>n.test(b)):!1}function T(P){return(P==null?void 0:P.type)!=="text"?!0:!n.test(P.value[0])}return Jt}var l2=i2();function hg(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 pg(e,t,r){if(e===void 0&&t||e&&t===void 0)return!1;if(e===void 0||t===void 0)return!0;let n=0;return n+=Math.abs(e.orientation.x-t.orientation.x),n+=Math.abs(e.orientation.y-t.orientation.y),n+=Math.abs(e.orientation.z-t.orientation.z),n+=Math.abs(e.position.x-t.position.x),n+=Math.abs(e.position.y-t.position.y),n+=Math.abs(e.position.z-t.position.z),n>r?!1:e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp}var Kh=1e-4,c2=class fg{constructor(t,r,n,a,s,o,i,l,c,u,d,h){this.nova=t,this.controller=r,this.motionGroup=n,this.initialMotionState=a,this.motionStateSocket=s,this.isVirtual=o,this.tcps=i,this.motionGroupSpecification=l,this.safetySetup=c,this.mounting=u,this.initialControllerState=d,this.controllerStateSocket=h,this.connectedJoggingCartesianSocket=null,this.connectedJoggingJointsSocket=null,this.joggingVelocity=10,this.activationState="inactive",this.rapidlyChangingMotionState=a,this.controllerState=d,h.addEventListener("message",p=>{var m;const f=(m=wr(p.data))==null?void 0:m.result;f&&Xe.runInAction(()=>{this.controllerState=f})}),s.addEventListener("message",p=>{var m;const f=(m=wr(p.data))==null?void 0:m.result;if(!f)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${p.data}`);hg(this.rapidlyChangingMotionState.state.joint_position.joints,f.state.joint_position.joints,Kh)||Xe.runInAction(()=>{this.rapidlyChangingMotionState.state=f.state}),pg(this.rapidlyChangingMotionState.tcp_pose,f.tcp_pose,Kh)||Xe.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=f.tcp_pose})}),Xe.makeAutoObservable(this)}static connect(t,r,n){return $e(this,null,function*(){var a,s;const[o,i]=r.split("@"),l=n.find(T=>T.controller===i),c=l==null?void 0:l.physical_motion_groups.find(T=>T.motion_group===r);if(!l||!c)throw new Error(`Controller ${i} or motion group ${r} not found`);const u=t.openReconnectingWebsocket(`/motion-groups/${r}/state-stream`),d=yield u.firstMessage(),h=(a=wr(d.data))==null?void 0:a.result;if(!h)throw new Error(`Unable to parse initial motion state message ${d.data}`);console.log(`Connected motion state websocket to motion group ${c.motion_group}. Initial state:
|
|
160
|
-
`,h);const m=(yield t.api.controller.getRobotController(l.controller)).configuration.kind==="VirtualController",f=yield $e(this,null,function*(){try{return yield t.api.motionGroupInfos.getMounting(c.motion_group)}catch(
|
|
161
|
-
`,R);const{tcps:O}=yield t.api.motionGroupInfos.listTcps(r),C=yield t.api.motionGroupInfos.getMotionGroupSpecification(r),E=yield t.api.motionGroupInfos.getSafetySetup(r);return new fg(t,l,c,h,u,m,O,C,E,f,R,g)})}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.motionGroup.model_from_controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replaceAll("-","_")}_${t}`}get joggingVelocityRads(){return this.joggingVelocity*Math.PI/180}get joints(){return this.initialMotionState.state.joint_position.joints.map((t,r)=>({index:r}))}get dhParameters(){return this.motionGroupSpecification.dh_parameters}get safetyZones(){return this.safetySetup.safety_zones}get mountingPosition(){return this.mounting?[this.mounting.pose.position.x/1e3,this.mounting.pose.position.y/1e3,this.mounting.pose.position.z/1e3]:[0,0,0]}get mountingQuaternion(){var t,r,n,a,s,o;const i=new qe.Vector3(((r=(t=this.mounting)==null?void 0:t.pose.orientation)==null?void 0:r.x)||0,((a=(n=this.mounting)==null?void 0:n.pose.orientation)==null?void 0:a.y)||0,((o=(s=this.mounting)==null?void 0:s.pose.orientation)==null?void 0:o.z)||0),l=i.length(),c=i.normalize();return new qe.Quaternion().setFromAxisAngle(c,l)}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"}deactivate(){return $e(this,null,function*(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}Xe.runInAction(()=>{this.activationState="deactivating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_MONITOR"),Xe.runInAction(()=>{this.activationState="inactive"})}catch(t){throw Xe.runInAction(()=>{this.activationState="active"}),t}})}activate(){return $e(this,null,function*(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}Xe.runInAction(()=>{this.activationState="activating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_CONTROL"),Xe.runInAction(()=>{this.activationState="active"})}catch(t){throw Xe.runInAction(()=>{this.activationState="inactive"}),t}})}toggleActivation(){this.activationState==="inactive"?this.activate():this.activationState==="active"&&this.deactivate()}dispose(){this.motionStateSocket.close(),this.connectedJoggingCartesianSocket&&this.connectedJoggingCartesianSocket.close(),this.connectedJoggingJointsSocket&&this.connectedJoggingJointsSocket.close()}setJoggingVelocity(t){this.joggingVelocity=t}},u2=class mg{constructor(t,r={}){this.motionStream=t,this.opts=r,this.cartesianWebsocket=null,this.jointWebsocket=null,this.cartesianJoggingOpts={}}static open(t,r){return $e(this,arguments,function*(n,a,s={}){const o=yield n.connectMotionStream(a);return new mg(o,s)})}get motionGroupId(){return this.motionStream.motionGroupId}get nova(){return this.motionStream.nova}get numJoints(){return this.motionStream.joints.length}get activeJoggingMode(){return this.cartesianWebsocket?"cartesian":this.jointWebsocket?"joint":"increment"}get activeWebsocket(){return this.cartesianWebsocket||this.jointWebsocket}stop(){return $e(this,null,function*(){this.cartesianWebsocket&&this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:{x:0,y:0,z:0},rotation_direction:{x:0,y:0,z:0},position_velocity:0,rotation_velocity:0,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId}),this.jointWebsocket&&this.jointWebsocket.sendJson({motion_group:this.motionGroupId,joint_velocities:new Array(this.numJoints).fill(0)})})}dispose(){this.cartesianWebsocket&&this.cartesianWebsocket.dispose(),this.jointWebsocket&&this.jointWebsocket.dispose()}setJoggingMode(t,r){console.log("Setting jogging mode to",t),r&&(fE(this.cartesianJoggingOpts,r)||this.cartesianWebsocket&&(this.cartesianWebsocket.dispose(),this.cartesianWebsocket=null),this.cartesianJoggingOpts=r),t!=="cartesian"&&this.cartesianWebsocket&&(this.cartesianWebsocket.dispose(),this.cartesianWebsocket=null),t!=="joint"&&this.jointWebsocket&&(this.jointWebsocket.dispose(),this.jointWebsocket=null),t==="cartesian"&&!this.cartesianWebsocket&&(this.cartesianWebsocket=this.nova.openReconnectingWebsocket("/motion-groups/move-tcp"),this.cartesianWebsocket.addEventListener("message",n=>{const a=wr(n.data);if(a&&"error"in a)if(this.opts.onError)this.opts.onError(n.data);else throw new Error(n.data)})),t==="joint"&&!this.jointWebsocket&&(this.jointWebsocket=this.nova.openReconnectingWebsocket("/motion-groups/move-joint"),this.jointWebsocket.addEventListener("message",n=>{const a=wr(n.data);if(a&&"error"in a)if(this.opts.onError)this.opts.onError(n.data);else throw new Error(n.data)}))}startJointRotation(t){return $e(this,arguments,function*({joint:r,direction:n,velocityRadsPerSec:a}){if(!this.jointWebsocket)throw new Error("Joint jogging websocket not connected; call setJoggingMode first");const s=new Array(this.numJoints).fill(0);s[r]=n==="-"?-a:a,this.jointWebsocket.sendJson({motion_group:this.motionGroupId,joint_velocities:s})})}startTCPTranslation(t){return $e(this,arguments,function*({axis:r,direction:n,velocityMmPerSec:a}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const s={x:0,y:0,z:0},o=Object.assign({},s);o[r]=n==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:o,rotation_direction:s,position_velocity:a,rotation_velocity:0,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}startTCPRotation(t){return $e(this,arguments,function*({axis:r,direction:n,velocityRadsPerSec:a}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const s={x:0,y:0,z:0},o=Object.assign({},s);o[r]=n==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:s,rotation_direction:o,position_velocity:0,rotation_velocity:a,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}runIncrementalCartesianMotion(t){return $e(this,arguments,function*({currentTcpPose:r,currentJoints:n,coordSystemId:a,velocityInRelevantUnits:s,axis:o,direction:i,motion:l}){var c;const u=[];if(!EE(r.coordinate_system,a))throw new Error(`Current TCP pose coordinate system ${r.coordinate_system} does not match target coordinate system ${a}`);if(l.type==="translate"){const p=Object.assign({},r.position);p[o]+=l.distanceMm*(i==="-"?-1:1),u.push({settings:{limits_override:{tcp_velocity_limit:s}},line:{position:p,orientation:r.orientation,coordinate_system:a}})}else if(l.type==="rotate"){const p=new Ln(r.orientation.x,r.orientation.y,r.orientation.z),m=p.length(),f=p.clone().normalize(),g=l.distanceRads*(i==="-"?-1:1),S=new Ln(0,0,0);S[o]=1;const R=Math.cos(.5*g)*Math.cos(.5*m),O=Math.sin(.5*g)*Math.sin(.5*m),C=Math.sin(.5*g)*Math.cos(.5*m),E=Math.cos(.5*g)*Math.sin(.5*m),T=S.dot(f),P=S.clone().cross(f),_=2*Math.acos(R-O*T),B=_/Math.sin(.5*_),b=new Ln().addScaledVector(P,O).addScaledVector(S,C).addScaledVector(f,E).multiplyScalar(B);u.push({settings:{limits_override:{tcp_orientation_velocity_limit:s}},line:{position:r.position,orientation:b,coordinate_system:a}})}const d=yield this.nova.api.motion.planMotion({motion_group:this.motionGroupId,start_joint_position:n,tcp:this.cartesianJoggingOpts.tcpId,commands:u}),h=(c=d.plan_successful_response)==null?void 0:c.motion;if(!h)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(d)}`);yield this.nova.api.motion.streamMoveForward(h,100,void 0,void 0,void 0,{timeout:1e3*60})})}runIncrementalJointRotation(t){return $e(this,arguments,function*({joint:r,currentJoints:n,velocityRadsPerSec:a,direction:s,distanceRads:o}){var i;const l=[...n.joints];l[r]+=o*(s==="-"?-1:1);const c=new Array(n.joints.length).fill(a),u=yield this.nova.api.motion.planMotion({motion_group:this.motionGroupId,start_joint_position:n,commands:[{settings:{limits_override:{joint_velocity_limits:{joints:c}}},joint_ptp:{joints:l}}]}),d=(i=u.plan_successful_response)==null?void 0:i.motion;if(!d){console.error("Failed to plan jogging increment motion",u);return}yield this.nova.api.motion.streamMoveForward(d,100,void 0,void 0,void 0,{timeout:1e3*60})})}},Yh=1e-4;function d2(e,t){const r=new kt.Vector3(t.x,t.y,t.z),n=new kt.Vector3(e.x,e.y,e.z),a=r.length(),s=r.normalize();let o=n.length(),i=n.normalize();i.dot(s)<0&&(o=-o,i=i.multiplyScalar(-1));let l=o-a;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),o=a+l,i.multiplyScalar(o)}var h2=class gg{constructor(t,r,n,a,s){this.nova=t,this.controller=r,this.motionGroup=n,this.initialMotionState=a,this.motionStateSocket=s,this.rapidlyChangingMotionState=a,s.addEventListener("message",o=>{var i;const l=(i=wr(o.data))==null?void 0:i.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${o.data}`);hg(this.rapidlyChangingMotionState.state.joint_position.joints,l.state.joint_position.joints,Yh)||Xe.runInAction(()=>{this.rapidlyChangingMotionState.state=l.state}),pg(this.rapidlyChangingMotionState.tcp_pose,l.tcp_pose,Yh)||Xe.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:d2(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation),tcp:l.tcp_pose.tcp,coordinate_system:l.tcp_pose.coordinate_system}})}),Xe.makeAutoObservable(this)}static open(t,r){return $e(this,null,function*(){var n;const{instances:a}=yield t.api.controller.listControllers(),[s,o]=r.split("@"),i=a.find(h=>h.controller===o),l=i==null?void 0:i.physical_motion_groups.find(h=>h.motion_group===r);if(!i||!l)throw new Error(`Controller ${o} or motion group ${r} not found`);const c=t.openReconnectingWebsocket(`/motion-groups/${r}/state-stream`),u=yield c.firstMessage();console.log("got first message",u);const d=(n=wr(u.data))==null?void 0:n.result;if(!d)throw new Error(`Unable to parse initial motion state message ${u.data}`);return console.log(`Connected motion state websocket to motion group ${l.motion_group}. Initial state:
|
|
162
|
-
`,d),new gg(t,i,l,d,c)})}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.motionGroup.model_from_controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replaceAll("-","_")}_${t}`}get joints(){return this.initialMotionState.state.joint_position.joints.map((t,r)=>({index:r}))}dispose(){this.motionStateSocket.close()}},p2=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(YI),this.cell=this.withUnwrappedResponsesOnly(hI),this.deviceConfig=this.withCellId(SI),this.motionGroup=this.withCellId(II),this.motionGroupInfos=this.withCellId($I),this.controller=this.withCellId(fI),this.program=this.withCellId(NI),this.programValues=this.withCellId(BI),this.controllerIOs=this.withCellId(gI),this.motionGroupKinematic=this.withCellId(UI),this.motion=this.withCellId(EI),this.coordinateSystems=this.withCellId(bI),this.application=this.withCellId(qh),this.applicationGlobal=this.withUnwrappedResponsesOnly(qh),this.motionGroupJogging=this.withCellId(kI),this.virtualRobot=this.withCellId(XI),this.virtualRobotSetup=this.withCellId(a2),this.virtualRobotMode=this.withCellId(r2),this.virtualRobotBehavior=this.withCellId(e2),this.libraryProgramMetadata=this.withCellId(CI),this.libraryProgram=this.withCellId(OI),this.libraryRecipeMetadata=this.withCellId(AI),this.libraryRecipe=this.withCellId(RI),this.storeObject=this.withCellId(WI),this.storeCollisionComponents=this.withCellId(GI),this.storeCollisionScenes=this.withCellId(qI)}withCellId(e){var t,r;const n=new e(Dl(In({},this.opts),{isJsonMime:a=>a==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:V.create());for(const a of Reflect.ownKeys(Reflect.getPrototypeOf(n)))if(a!=="constructor"&&typeof n[a]=="function"){const s=n[a];n[a]=(...o)=>s.apply(n,[this.cellId,...o]).then(i=>i.data)}return n}withUnwrappedResponsesOnly(e){var t,r;const n=new e(Dl(In({},this.opts),{isJsonMime:a=>a==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:V.create());for(const a of Reflect.ownKeys(Reflect.getPrototypeOf(n)))if(a!=="constructor"&&typeof n[a]=="function"){const s=n[a];n[a]=(...o)=>s.apply(n,o).then(i=>i.data)}return n}},f2=class{constructor(){this.connections=[]}handleAPIRequest(e){return $e(this,null,function*(){var t,r,n;const a=[{method:"GET",path:"/cells/:cellId/controllers",handle(){return{instances:[{controller:"mock-ur5e",model_name:"UniversalRobots::Controller",host:"mock-ur5e",allow_software_install_on_controller:!0,physical_motion_groups:[{motion_group:"0@mock-ur5e",name_from_controller:"UR5e",active:!1,model_from_controller:"UniversalRobots_UR5e"}],has_error:!1,error_details:""}]}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId",handle(){return{configuration:{kind:"VirtualController",manufacturer:"universalrobots",position:"[0,-1.571,-1.571,-1.571,1.571,-1.571,0]",type:"universalrobots-ur5e"},name:"mock-ur5"}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/specification",handle(){return{dh_parameters:[{alpha:1.5707963267948966,theta:0,a:0,d:162.25,reverse_rotation_direction:!1},{alpha:0,theta:0,a:-425,d:0,reverse_rotation_direction:!1},{alpha:0,theta:0,a:-392.2,d:0,reverse_rotation_direction:!1},{alpha:1.5707963267948966,theta:0,a:0,d:133.3,reverse_rotation_direction:!1},{alpha:-1.5707963267948966,theta:0,a:0,d:99.7,reverse_rotation_direction:!1},{alpha:0,theta:0,a:0,d:99.6,reverse_rotation_direction:!1}],mechanical_joint_limits:[{joint:"JOINTNAME_AXIS_1",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_2",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_3",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_4",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_5",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_6",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1}]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/safety-setup",handle(){return{safety_settings:[{safety_state:"SAFETY_NORMAL",settings:{joint_position_limits:[{joint:"JOINTNAME_AXIS_1",lower_limit:-2.96705961227417,upper_limit:2.96705961227417,unlimited:!1},{joint:"JOINTNAME_AXIS_2",lower_limit:-1.7453292608261108,upper_limit:2.7925267219543457,unlimited:!1},{joint:"JOINTNAME_AXIS_3",lower_limit:-3.3161256313323975,upper_limit:.40142571926116943,unlimited:!1},{joint:"JOINTNAME_AXIS_4",lower_limit:-3.4906585216522217,upper_limit:3.4906585216522217,unlimited:!1},{joint:"JOINTNAME_AXIS_5",lower_limit:-2.4434609413146973,upper_limit:2.4434609413146973,unlimited:!1},{joint:"JOINTNAME_AXIS_6",lower_limit:-4.71238899230957,upper_limit:4.71238899230957,unlimited:!1}],joint_velocity_limits:[{joint:"JOINTNAME_AXIS_1",limit:3.1415927410125732},{joint:"JOINTNAME_AXIS_2",limit:3.1415927410125732},{joint:"JOINTNAME_AXIS_3",limit:3.4906585216522217},{joint:"JOINTNAME_AXIS_4",limit:6.108652591705322},{joint:"JOINTNAME_AXIS_5",limit:6.108652591705322},{joint:"JOINTNAME_AXIS_6",limit:6.981317043304443}],joint_acceleration_limits:[],joint_torque_limits:[],tcp_velocity_limit:1800}}],safety_zones:[{id:1,priority:0,geometry:{compound:{child_geometries:[{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:1650,y:-1330,z:-1820},{x:1650,y:1330,z:-1820},{x:-800,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:1650,y:-1330,z:-1820},{x:1650,y:-1330,z:1500},{x:-800,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:-800,y:1330,z:-1820},{x:-800,y:1330,z:1500},{x:-800,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:-800,y:1330,z:1500},{x:-800,y:-1330,z:1500},{x:1650,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:-800,y:1330,z:1500},{x:-800,y:1330,z:-1820},{x:1650,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:1650,y:-1330,z:1500},{x:1650,y:-1330,z:-1820},{x:1650,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Cell workzone"},motion_group_uid:1},{id:2,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:1330,z:-1850},{x:865,y:1330,z:-1850},{x:865,y:-720,z:-1850},{x:1650,y:-720,z:-1850},{x:1650,y:1330,z:-920},{x:865,y:1330,z:-920},{x:865,y:-720,z:-920},{x:1650,y:-720,z:-920}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Transport"},motion_group_uid:1},{id:3,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:1330,z:-600},{x:865,y:1330,z:-600},{x:865,y:430,z:-600},{x:1650,y:430,z:-600},{x:1650,y:1330,z:-1250},{x:865,y:1330,z:-1250},{x:865,y:430,z:-1250},{x:1650,y:430,z:-1250}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Tunel"},motion_group_uid:1},{id:4,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:-760,z:-440},{x:900,y:-760,z:-440},{x:900,y:-1330,z:-440},{x:1650,y:-1330,z:-440},{x:1650,y:-760,z:-1800},{x:900,y:-760,z:-1800},{x:900,y:-1330,z:-1800},{x:1650,y:-1330,z:-1800}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Fanuc controller"},motion_group_uid:1},{id:6,priority:0,geometry:{convex_hull:{vertices:[{x:-200,y:-200,z:-1900},{x:200,y:-200,z:-1900},{x:200,y:200,z:-1900},{x:-200,y:200,z:-1900},{x:-200,y:-200,z:-350},{x:200,y:-200,z:-350},{x:200,y:200,z:-350},{x:-200,y:200,z:-350}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Robot base"},motion_group_uid:1}],robot_model_geometries:[{link_index:1,geometry:{sphere:{radius:270},init_pose:{position:{x:-70,y:-70,z:-50},orientation:{x:0,y:0,z:0,w:1}},id:"link1_sphere"}},{link_index:2,geometry:{capsule:{radius:160,cylinder_height:800},init_pose:{position:{x:-450,y:40,z:170},orientation:{x:0,y:-.7071067811865475,z:0,w:.7071067811865476}},id:"link2_capsule"}},{link_index:3,geometry:{sphere:{radius:270},init_pose:{position:{x:-110,y:10,z:-100},orientation:{x:0,y:0,z:0,w:1}},id:"link3_sphere"}},{link_index:4,geometry:{capsule:{radius:110,cylinder_height:600},init_pose:{position:{x:0,y:300,z:40},orientation:{x:-.7071067811865475,y:0,z:0,w:.7071067811865476}},id:"link4_capsule"}},{link_index:5,geometry:{sphere:{radius:75},init_pose:{position:{x:0,y:0,z:-50},orientation:{x:0,y:0,z:0,w:1}},id:"link5_sphere"}}],tool_geometries:[]}}},{method:"GET",path:"/cells/:cellId/coordinate-systems",handle(){return{coordinatesystems:[{coordinate_system:"",name:"world",reference_uid:"",position:{x:0,y:0,z:0},rotation:{angles:[0,0,0],type:"ROTATION_VECTOR"}}]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/tcps",handle(){return{tcps:[{id:"Flange",readable_name:"Default-Flange",position:{x:0,y:0,z:0},rotation:{angles:[0,0,0,0],type:"ROTATION_VECTOR"}},{id:"complex-tcp-position",readable_name:"Complex TCP Position",position:{x:-200,y:300,z:150},rotation:{angles:[-.12139440409113832,-.06356210998212003,-.2023240068185639,0],type:"ROTATION_VECTOR"}}]}}}],s=((t=e.method)==null?void 0:t.toUpperCase())||"GET",o="/cells"+((n=(r=e.url)==null?void 0:r.split("/cells")[1])==null?void 0:n.split("?")[0]);for(const i of a){const l=l2.match(i.path)(o||"");if(s===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 ql(`No mock handler matched this request: ${s} ${o}`,"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(m2)})),e.url.includes("/move-joint")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{motion_group:"0@ur",state:{controller:"ur",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",timestamp:"2024-09-18T12:48:26.096266444Z",velocity_override:100,motion_groups:[{motion_group:"0@ur",controller:"ur",joint_position:{joints:[1.3492152690887451,-1.5659207105636597,1.6653711795806885,-1.0991662740707397,-1.829018235206604,1.264623761177063]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:6.437331889439328,y:-628.4123774830913,z:577.0569957147832},orientation:{x:-1.683333649797158,y:-1.9783363827298732,z:-.4928031860165713},coordinate_system:""},tcp_pose:{position:{x:6.437331889439328,y:-628.4123774830913,z:577.0569957147832},orientation:{x:-1.683333649797158,y:-1.9783363827298732,z:-.4928031860165713},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:-0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"671259"}],sequence_number:"671259"},movement_state:"MOVEMENT_STATE_MOVING"}})})),e.url.includes("/move-tcp")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{motion_group:"0@ur",state:{controller:"ur",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",timestamp:"2024-09-18T12:43:12.188335774Z",velocity_override:100,motion_groups:[{motion_group:"0@ur",controller:"ur",joint_position:{joints:[1.3352527618408203,-1.5659207105636597,1.6653711795806885,-1.110615611076355,-1.829018235206604,1.264623761177063]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:-2.763015284002938,y:-630.2151479701106,z:577.524509114342},orientation:{x:-1.704794877102097,y:-1.9722372952861567,z:-.4852079204210754},coordinate_system:""},tcp_pose:{position:{x:-2.763015284002938,y:-630.2151479701106,z:577.524509114342},orientation:{x:-1.704794877102097,y:-1.9722372952861567,z:-.4852079204210754},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:-0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"627897"}],sequence_number:"627897"},movement_state:"MOVEMENT_STATE_MOVING"}})}))},10)}handleWebsocketMessage(e,t){console.log(`Received message on ${e.url}`,t)}},m2={result:{state:{motion_group:"0@universalrobots-ur5e",controller:"universalrobots-ur5e",joint_position:{joints:[1.1699999570846558,-1.5700000524520874,1.3600000143051147,1.0299999713897705,1.2899999618530273,1.2799999713897705]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:1.3300010259703043,y:-409.2680714682808,z:531.0203477065281},orientation:{x:1.7564919306270736,y:-1.7542521568325058,z:.7326972590614671},coordinate_system:""},tcp_pose:{position:{x:1.3300010259703043,y:-409.2680714682808,z:531.0203477065281},orientation:{x:1.7564919306270736,y:-1.7542521568325058,z:.7326972590614671},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]}},tcp_pose:{position:{x:302.90748476115556,y:-152.87065869452337,z:424.0454619321661},orientation:{x:2.3403056115045353,y:-1.1706836379431356,z:.9772511964246311},coordinate_system:"",tcp:"Flange"}}},g2=class{constructor(e){this.authPromise=null,this.accessToken=null;var t;const r=(t=e.cellId)!=null?t:"cell";this.config=In({cellId:r},e),this.accessToken=e.accessToken||rl.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"&&(this.mock=new f2);const n=V.create({baseURL:cl(this.config.instanceUrl,"/api/v1")});n.interceptors.request.use(a=>$e(this,null,function*(){return a.headers.Authorization||(this.accessToken?a.headers.Authorization=`Bearer ${this.accessToken}`:this.config.username&&this.config.password&&(a.headers.Authorization=`Basic ${btoa(e.username+":"+e.password)}`)),a})),typeof window<"u"&&n.interceptors.response.use(a=>a,a=>$e(this,null,function*(){var s,o;if(lI(a))if(((s=a.response)==null?void 0:s.status)===401)try{if(yield this.renewAuthentication(),a.config)return this.accessToken?a.config.headers.Authorization=`Bearer ${this.accessToken}`:delete a.config.headers.Authorization,n.request(a.config)}catch(i){return Promise.reject(i)}else((o=a.response)==null?void 0:o.status)===503&&(yield fetch(window.location.href)).status===503&&window.location.reload();return Promise.reject(a)})),this.api=new p2(r,Dl(In({},e),{basePath:cl(this.config.instanceUrl,"/api/v1"),isJsonMime:a=>a==="application/json",baseOptions:In(In({},this.mock?{adapter:a=>this.mock.handleAPIRequest(a)}:{}),e.baseOptions),axiosInstance:n}))}renewAuthentication(){return $e(this,null,function*(){if(!this.authPromise){this.authPromise=IE(this.config.instanceUrl);try{this.accessToken=yield this.authPromise,this.accessToken?rl.setString("wbjs.access_token",this.accessToken):rl.delete("wbjs.access_token")}finally{this.authPromise=null}}})}makeWebsocketURL(e){const t=new URL(cl(this.config.instanceUrl,`/api/v1/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 AE(this.makeWebsocketURL(e),{mock:this.mock})}connectMotionStream(e){return $e(this,null,function*(){return yield h2.open(this,e)})}connectJogger(e){return $e(this,null,function*(){return yield u2.open(this,e)})}connectMotionGroups(e){return $e(this,null,function*(){const{instances:t}=yield this.api.controller.listControllers();return Promise.all(e.map(r=>c2.connect(this,r,t)))})}connectMotionGroup(e){return $e(this,null,function*(){return(yield this.connectMotionGroups([e]))[0]})}};function y2(e){try{return JSON.stringify(e)}catch{return}}function b2(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function v2(e){var t,r,n,a;return e instanceof ql&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof ql&&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((a=e.response)==null?void 0:a.data)}`:e instanceof Error?e.message:`Unexpected error: ${y2(e)||e}`}const Kc=e=>{const t=e.softTimeout||3e3,[r,n]=se.useState(!1),a=W.useTheme();return se.useEffect(()=>{const s=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(s)}),x.jsx(W.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:a.palette.text.primary},children:e.error?x.jsx(yg,{loadingMessage:e.message,error:e.error}):x.jsxs(x.Fragment,{children:[x.jsx(W.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&x.jsx("div",{children:e.message}),x.jsx(W.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:a.palette.text.secondary},children:"This is taking longer than expected..."})]})})},yg=e=>{const t=v2(e.error),r=e.error instanceof Error?e.error.stack:null,n=W.useTheme();return x.jsxs(W.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 ${ec.lowerFirst(W.capitalize(e.loadingMessage))} - `:"")+t,x.jsx("br",{}),r&&x.jsx("pre",{children:r})]})},S2=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),x2=se.forwardRef(S2),O2=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),w2=se.forwardRef(O2),C2=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),P2=se.forwardRef(C2),R2=({title:e,titleId:t,...r},n)=>F.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?F.createElement("title",{id:t},e):null,F.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"})),T2=se.forwardRef(R2);function A2(){this.__data__=[],this.size=0}function bg(e,t){return e===t||e!==e&&t!==t}function mi(e,t){for(var r=e.length;r--;)if(bg(e[r][0],t))return r;return-1}var V2=Array.prototype,E2=V2.splice;function _2(e){var t=this.__data__,r=mi(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():E2.call(t,r,1),--this.size,!0}function I2(e){var t=this.__data__,r=mi(t,e);return r<0?void 0:t[r][1]}function M2(e){return mi(this.__data__,e)>-1}function $2(e,t){var r=this.__data__,n=mi(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function pr(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])}}pr.prototype.clear=A2;pr.prototype.delete=_2;pr.prototype.get=I2;pr.prototype.has=M2;pr.prototype.set=$2;function j2(){this.__data__=new pr,this.size=0}function k2(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function L2(e){return this.__data__.get(e)}function U2(e){return this.__data__.has(e)}var D2="[object AsyncFunction]",N2="[object Function]",F2="[object GeneratorFunction]",B2="[object Proxy]";function vg(e){if(!Hr(e))return!1;var t=rn(e);return t==N2||t==F2||t==D2||t==B2}var ul=Zt["__core-js_shared__"],Qh=function(){var e=/[^.]+$/.exec(ul&&ul.keys&&ul.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function z2(e){return!!Qh&&Qh in e}var G2=Function.prototype,H2=G2.toString;function an(e){if(e!=null){try{return H2.call(e)}catch{}try{return e+""}catch{}}return""}var q2=/[\\^$.*+?()[\]{}|]/g,J2=/^\[object .+?Constructor\]$/,W2=Function.prototype,K2=Object.prototype,Y2=W2.toString,Q2=K2.hasOwnProperty,X2=RegExp("^"+Y2.call(Q2).replace(q2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Z2(e){if(!Hr(e)||z2(e))return!1;var t=vg(e)?X2:J2;return t.test(an(e))}function eM(e,t){return e==null?void 0:e[t]}function sn(e,t){var r=eM(e,t);return Z2(r)?r:void 0}var Qa=sn(Zt,"Map"),Xa=sn(Object,"create");function tM(){this.__data__=Xa?Xa(null):{},this.size=0}function rM(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var nM="__lodash_hash_undefined__",aM=Object.prototype,sM=aM.hasOwnProperty;function oM(e){var t=this.__data__;if(Xa){var r=t[e];return r===nM?void 0:r}return sM.call(t,e)?t[e]:void 0}var iM=Object.prototype,lM=iM.hasOwnProperty;function cM(e){var t=this.__data__;return Xa?t[e]!==void 0:lM.call(t,e)}var uM="__lodash_hash_undefined__";function dM(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Xa&&t===void 0?uM:t,this}function Wr(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])}}Wr.prototype.clear=tM;Wr.prototype.delete=rM;Wr.prototype.get=oM;Wr.prototype.has=cM;Wr.prototype.set=dM;function hM(){this.size=0,this.__data__={hash:new Wr,map:new(Qa||pr),string:new Wr}}function pM(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function gi(e,t){var r=e.__data__;return pM(t)?r[typeof t=="string"?"string":"hash"]:r.map}function fM(e){var t=gi(this,e).delete(e);return this.size-=t?1:0,t}function mM(e){return gi(this,e).get(e)}function gM(e){return gi(this,e).has(e)}function yM(e,t){var r=gi(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function fr(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])}}fr.prototype.clear=hM;fr.prototype.delete=fM;fr.prototype.get=mM;fr.prototype.has=gM;fr.prototype.set=yM;var bM=200;function vM(e,t){var r=this.__data__;if(r instanceof pr){var n=r.__data__;if(!Qa||n.length<bM-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new fr(n)}return r.set(e,t),this.size=r.size,this}function sr(e){var t=this.__data__=new pr(e);this.size=t.size}sr.prototype.clear=j2;sr.prototype.delete=k2;sr.prototype.get=L2;sr.prototype.has=U2;sr.prototype.set=vM;var SM="__lodash_hash_undefined__";function xM(e){return this.__data__.set(e,SM),this}function OM(e){return this.__data__.has(e)}function Po(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new fr;++t<r;)this.add(e[t])}Po.prototype.add=Po.prototype.push=xM;Po.prototype.has=OM;function wM(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 CM(e,t){return e.has(t)}var PM=1,RM=2;function Sg(e,t,r,n,a,s){var o=r&PM,i=e.length,l=t.length;if(i!=l&&!(o&&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&RM?new Po:void 0;for(s.set(e,t),s.set(t,e);++d<i;){var m=e[d],f=t[d];if(n)var g=o?n(f,m,d,t,e,s):n(m,f,d,e,t,s);if(g!==void 0){if(g)continue;h=!1;break}if(p){if(!wM(t,function(S,R){if(!CM(p,R)&&(m===S||a(m,S,r,n,s)))return p.push(R)})){h=!1;break}}else if(!(m===f||a(m,f,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}var Xh=Zt.Uint8Array;function TM(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function AM(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var VM=1,EM=2,_M="[object Boolean]",IM="[object Date]",MM="[object Error]",$M="[object Map]",jM="[object Number]",kM="[object RegExp]",LM="[object Set]",UM="[object String]",DM="[object Symbol]",NM="[object ArrayBuffer]",FM="[object DataView]",Zh=Tr?Tr.prototype:void 0,dl=Zh?Zh.valueOf:void 0;function BM(e,t,r,n,a,s,o){switch(r){case FM:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case NM:return!(e.byteLength!=t.byteLength||!s(new Xh(e),new Xh(t)));case _M:case IM:case jM:return bg(+e,+t);case MM:return e.name==t.name&&e.message==t.message;case kM:case UM:return e==t+"";case $M:var i=TM;case LM:var l=n&VM;if(i||(i=AM),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;n|=EM,o.set(e,t);var u=Sg(i(e),i(t),n,a,s,o);return o.delete(e),u;case DM:if(dl)return dl.call(e)==dl.call(t)}return!1}function zM(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Xt=Array.isArray;function GM(e,t,r){var n=t(e);return Xt(e)?n:zM(n,r(e))}function HM(e,t){for(var r=-1,n=e==null?0:e.length,a=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[a++]=o)}return s}function qM(){return[]}var JM=Object.prototype,WM=JM.propertyIsEnumerable,ep=Object.getOwnPropertySymbols,KM=ep?function(e){return e==null?[]:(e=Object(e),HM(ep(e),function(t){return WM.call(e,t)}))}:qM;function YM(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var QM="[object Arguments]";function tp(e){return qr(e)&&rn(e)==QM}var xg=Object.prototype,XM=xg.hasOwnProperty,ZM=xg.propertyIsEnumerable,Og=tp(function(){return arguments}())?tp:function(e){return qr(e)&&XM.call(e,"callee")&&!ZM.call(e,"callee")};function e5(){return!1}var wg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,rp=wg&&typeof module=="object"&&module&&!module.nodeType&&module,t5=rp&&rp.exports===wg,np=t5?Zt.Buffer:void 0,r5=np?np.isBuffer:void 0,Wl=r5||e5,n5=9007199254740991,a5=/^(?:0|[1-9]\d*)$/;function Cg(e,t){var r=typeof e;return t=t??n5,!!t&&(r=="number"||r!="symbol"&&a5.test(e))&&e>-1&&e%1==0&&e<t}var s5=9007199254740991;function Yc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=s5}var o5="[object Arguments]",i5="[object Array]",l5="[object Boolean]",c5="[object Date]",u5="[object Error]",d5="[object Function]",h5="[object Map]",p5="[object Number]",f5="[object Object]",m5="[object RegExp]",g5="[object Set]",y5="[object String]",b5="[object WeakMap]",v5="[object ArrayBuffer]",S5="[object DataView]",x5="[object Float32Array]",O5="[object Float64Array]",w5="[object Int8Array]",C5="[object Int16Array]",P5="[object Int32Array]",R5="[object Uint8Array]",T5="[object Uint8ClampedArray]",A5="[object Uint16Array]",V5="[object Uint32Array]",Me={};Me[x5]=Me[O5]=Me[w5]=Me[C5]=Me[P5]=Me[R5]=Me[T5]=Me[A5]=Me[V5]=!0;Me[o5]=Me[i5]=Me[v5]=Me[l5]=Me[S5]=Me[c5]=Me[u5]=Me[d5]=Me[h5]=Me[p5]=Me[f5]=Me[m5]=Me[g5]=Me[y5]=Me[b5]=!1;function E5(e){return qr(e)&&Yc(e.length)&&!!Me[rn(e)]}function _5(e){return function(t){return e(t)}}var Pg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ja=Pg&&typeof module=="object"&&module&&!module.nodeType&&module,I5=ja&&ja.exports===Pg,hl=I5&&Cm.process,ap=function(){try{var e=ja&&ja.require&&ja.require("util").types;return e||hl&&hl.binding&&hl.binding("util")}catch{}}(),sp=ap&&ap.isTypedArray,Rg=sp?_5(sp):E5,M5=Object.prototype,$5=M5.hasOwnProperty;function j5(e,t){var r=Xt(e),n=!r&&Og(e),a=!r&&!n&&Wl(e),s=!r&&!n&&!a&&Rg(e),o=r||n||a||s,i=o?YM(e.length,String):[],l=i.length;for(var c in e)$5.call(e,c)&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Cg(c,l)))&&i.push(c);return i}var k5=Object.prototype;function L5(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||k5;return e===r}function U5(e,t){return function(r){return e(t(r))}}var D5=U5(Object.keys,Object),N5=Object.prototype,F5=N5.hasOwnProperty;function B5(e){if(!L5(e))return D5(e);var t=[];for(var r in Object(e))F5.call(e,r)&&r!="constructor"&&t.push(r);return t}function Tg(e){return e!=null&&Yc(e.length)&&!vg(e)}function Qc(e){return Tg(e)?j5(e):B5(e)}function op(e){return GM(e,Qc,KM)}var z5=1,G5=Object.prototype,H5=G5.hasOwnProperty;function q5(e,t,r,n,a,s){var o=r&z5,i=op(e),l=i.length,c=op(t),u=c.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var h=i[d];if(!(o?h in t:H5.call(t,h)))return!1}var p=s.get(e),m=s.get(t);if(p&&m)return p==t&&m==e;var f=!0;s.set(e,t),s.set(t,e);for(var g=o;++d<l;){h=i[d];var S=e[h],R=t[h];if(n)var O=o?n(R,S,h,t,e,s):n(S,R,h,e,t,s);if(!(O===void 0?S===R||a(S,R,r,n,s):O)){f=!1;break}g||(g=h=="constructor")}if(f&&!g){var C=e.constructor,E=t.constructor;C!=E&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof E=="function"&&E instanceof E)&&(f=!1)}return s.delete(e),s.delete(t),f}var Kl=sn(Zt,"DataView"),Yl=sn(Zt,"Promise"),Ql=sn(Zt,"Set"),Xl=sn(Zt,"WeakMap"),ip="[object Map]",J5="[object Object]",lp="[object Promise]",cp="[object Set]",up="[object WeakMap]",dp="[object DataView]",W5=an(Kl),K5=an(Qa),Y5=an(Yl),Q5=an(Ql),X5=an(Xl),xr=rn;(Kl&&xr(new Kl(new ArrayBuffer(1)))!=dp||Qa&&xr(new Qa)!=ip||Yl&&xr(Yl.resolve())!=lp||Ql&&xr(new Ql)!=cp||Xl&&xr(new Xl)!=up)&&(xr=function(e){var t=rn(e),r=t==J5?e.constructor:void 0,n=r?an(r):"";if(n)switch(n){case W5:return dp;case K5:return ip;case Y5:return lp;case Q5:return cp;case X5:return up}return t});var Z5=1,hp="[object Arguments]",pp="[object Array]",Ms="[object Object]",e$=Object.prototype,fp=e$.hasOwnProperty;function t$(e,t,r,n,a,s){var o=Xt(e),i=Xt(t),l=o?pp:xr(e),c=i?pp:xr(t);l=l==hp?Ms:l,c=c==hp?Ms:c;var u=l==Ms,d=c==Ms,h=l==c;if(h&&Wl(e)){if(!Wl(t))return!1;o=!0,u=!1}if(h&&!u)return s||(s=new sr),o||Rg(e)?Sg(e,t,r,n,a,s):BM(e,t,l,r,n,a,s);if(!(r&Z5)){var p=u&&fp.call(e,"__wrapped__"),m=d&&fp.call(t,"__wrapped__");if(p||m){var f=p?e.value():e,g=m?t.value():t;return s||(s=new sr),a(f,g,r,n,s)}}return h?(s||(s=new sr),q5(e,t,r,n,a,s)):!1}function yi(e,t,r,n,a){return e===t?!0:e==null||t==null||!qr(e)&&!qr(t)?e!==e&&t!==t:t$(e,t,r,n,yi,a)}function r$(e,t){return yi(e,t)}const Ag=({store:e})=>{const{t}=ze.useTranslation(),[r,n]=se.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),a=se.useRef(r);Yn(()=>{const o=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;r$(a.current,o)||(a.current=o,n(o))});const s=[];for(const[o,i]of r.entries())i&&s.push(o);return x.jsx(W.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(o=>o+1).join(", ")})})},n$=W.styled(W.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 $s({labelValue:e,...t}){return x.jsxs(n$,{fullWidth:!0,variant:"filled",children:[x.jsx(W.InputLabel,{id:t.labelId,children:e}),x.jsx(W.Select,{...t})]})}var mp=function(){try{var e=sn(Object,"defineProperty");return e({},"",{}),e}catch{}}();function a$(e,t,r){t=="__proto__"&&mp?mp(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function s$(e,t,r,n){for(var a=-1,s=e==null?0:e.length;++a<s;){var o=e[a];t(n,o,r(o),e)}return n}function o$(e){return function(t,r,n){for(var a=-1,s=Object(t),o=n(t),i=o.length;i--;){var l=o[++a];if(r(s[l],l,s)===!1)break}return t}}var i$=o$();function l$(e,t){return e&&i$(e,t,Qc)}function c$(e,t){return function(r,n){if(r==null)return r;if(!Tg(r))return e(r,n);for(var a=r.length,s=-1,o=Object(r);++s<a&&n(o[s],s,o)!==!1;);return r}}var u$=c$(l$);function d$(e,t,r,n){return u$(e,function(a,s,o){t(n,a,r(a),o)}),n}var h$=1,p$=2;function f$(e,t,r,n){var a=r.length,s=a;if(e==null)return!s;for(e=Object(e);a--;){var o=r[a];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<s;){o=r[a];var i=o[0],l=e[i],c=o[1];if(o[2]){if(l===void 0&&!(i in e))return!1}else{var u=new sr,d;if(!(d===void 0?yi(c,l,h$|p$,n,u):d))return!1}}return!0}function Vg(e){return e===e&&!Hr(e)}function m$(e){for(var t=Qc(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,Vg(a)]}return t}function Eg(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function g$(e){var t=m$(e);return t.length==1&&t[0][2]?Eg(t[0][0],t[0][1]):function(r){return r===e||f$(r,e,t)}}var y$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,b$=/^\w*$/;function Xc(e,t){if(Xt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||si(e)?!0:b$.test(e)||!y$.test(e)||t!=null&&e in Object(t)}var v$="Expected a function";function Zc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(v$);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],s=r.cache;if(s.has(a))return s.get(a);var o=e.apply(this,n);return r.cache=s.set(a,o)||s,o};return r.cache=new(Zc.Cache||fr),r}Zc.Cache=fr;var S$=500;function x$(e){var t=Zc(e,function(n){return r.size===S$&&r.clear(),n}),r=t.cache;return t}var O$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w$=/\\(\\)?/g,C$=x$(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(O$,function(r,n,a,s){t.push(a?s.replace(w$,"$1"):n||r)}),t});function P$(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var gp=Tr?Tr.prototype:void 0,yp=gp?gp.toString:void 0;function _g(e){if(typeof e=="string")return e;if(Xt(e))return P$(e,_g)+"";if(si(e))return yp?yp.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Ig(e){return e==null?"":_g(e)}function Mg(e,t){return Xt(e)?e:Xc(e,t)?[e]:C$(Ig(e))}function bi(e){if(typeof e=="string"||si(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function $g(e,t){t=Mg(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[bi(t[r++])];return r&&r==n?e:void 0}function R$(e,t,r){var n=e==null?void 0:$g(e,t);return n===void 0?r:n}function T$(e,t){return e!=null&&t in Object(e)}function A$(e,t,r){t=Mg(t,e);for(var n=-1,a=t.length,s=!1;++n<a;){var o=bi(t[n]);if(!(s=e!=null&&r(e,o)))break;e=e[o]}return s||++n!=a?s:(a=e==null?0:e.length,!!a&&Yc(a)&&Cg(o,a)&&(Xt(e)||Og(e)))}function V$(e,t){return e!=null&&A$(e,t,T$)}var E$=1,_$=2;function I$(e,t){return Xc(e)&&Vg(t)?Eg(bi(e),t):function(r){var n=R$(r,e);return n===void 0&&n===t?V$(r,e):yi(t,n,E$|_$)}}function M$(e){return e}function $$(e){return function(t){return t==null?void 0:t[e]}}function j$(e){return function(t){return $g(t,e)}}function k$(e){return Xc(e)?$$(bi(e)):j$(e)}function L$(e){return typeof e=="function"?e:e==null?M$:typeof e=="object"?Xt(e)?I$(e[0],e[1]):g$(e):k$(e)}function U$(e,t){return function(r,n){var a=Xt(r)?s$:d$,s={};return a(r,e,L$(n),s)}}var js=U$(function(e,t,r){a$(e,r,t)}),D$=0;function N$(e){var t=++D$;return Ig(e)+t}const Zl=[{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}],F$=[{id:"continuous"},...Zl],B$=["coordsys","tool"];class vi{constructor(t,r,n,a){var s,o;this.jogger=t,this.motionGroupSpec=r,this.coordSystems=n,this.tcps=a,this.selectedTabId="cartesian",this.activationState="inactive",this.activationError=null,this.activationCounter=0,this.locks=new Set,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=!0,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 n)if(i.coordinate_system===""){i.coordinate_system="world";break}this.selectedCoordSystemId=((s=n[0])==null?void 0:s.coordinate_system)||"world",this.selectedTcpId=((o=a[0])==null?void 0:o.id)||"",Xe.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(Xe.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[n,{coordinatesystems:a},{tcps:s}]=await Promise.all([r.api.motionGroupInfos.getMotionGroupSpecification(t.motionGroupId),r.api.coordinateSystems.listCoordinateSystems("ROTATION_VECTOR"),r.api.motionGroupInfos.listTcps(t.motionGroupId,"ROTATION_VECTOR")]);return new vi(t,n,a||[],s||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return ec.countBy(this.coordSystems,t=>t.name)}async deactivate(){const t=this.jogger.activeWebsocket;this.jogger.setJoggingMode("increment"),t&&await t.closed()}async activate(){if(this.currentTab.id==="cartesian"){const t={tcpId:this.selectedTcpId,coordSystemId:this.activeCoordSystemId};this.activeDiscreteIncrement?this.jogger.setJoggingMode("increment",t):this.jogger.setJoggingMode("cartesian",t)}else this.jogger.setJoggingMode("joint");return this.jogger}loadFromLocalStorage(){const t=Nr.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 F$}get discreteIncrementOptions(){return Zl}get incrementOptionsById(){return js(this.incrementOptions,t=>t.id)}get tabsById(){return js(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 js(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 js(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:Zl.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)}async withMotionLock(t){const r=N$();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const z$=Je.observer(({store:e})=>{var a;const{t}=ze.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(x.jsx($s,{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=>x.jsx(W.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(x.jsx($s,{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=>x.jsx(W.MenuItem,{value:s.id,children:s.id},s.id))},"tcp")),e.showOrientationSelect&&r.push(x.jsx($s,{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:B$.map(s=>x.jsx(W.MenuItem,{value:s,children:n(s)},s))},"orientation")),e.showIncrementSelect&&r.push(x.jsxs($s,{labelValue:t("Jogging.Increment.hlb"),labelId:"jogging-increment-select",size:"small",variant:"filled",value:((a=e.activeDiscreteIncrement)==null?void 0:a.id)||"continuous",onChange:s=>e.setSelectedIncrementId(s.target.value),disabled:e.isLocked,children:[x.jsx(W.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(s=>x.jsx(W.MenuItem,{value:s.id,children:e.currentMotionType==="translate"?`${s.mm}mm`:`${s.degrees}°`},s.id))]},"increment")),x.jsx(W.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,o)=>x.jsx(W.Box,{sx:{gridColumn:r.length%2===1&&o===r.length-1?"span 2":"auto"},children:s},o))})}),G$=W.styled(W.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 H$(e,t,r=(n,a)=>n===a){return e.length===t.length&&e.every((n,a)=>r(n,t[a]))}const q$=2;function An(e,t,r,n,a){return r===1?Math.min(e+t,a):Math.max(e-t,n)}function jg(e,t){return e-t}function bp(e,t){const{index:r}=e.reduce((n,a,s)=>{const o=Math.abs(t-a);return n===null||o<n.distance||o===n.distance?{distance:o,index:s}:n},null)??{};return r}function ks(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const a=r.changedTouches[n];if(a.identifier===t.current)return{x:a.clientX,y:a.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Ro(e,t,r){return(e-t)*100/(r-t)}function J$(e,t,r){return(r-t)*e+t}function W$(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 K$(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(W$(t)))}function vp({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(jg)}function Ls({sliderRef:e,activeIndex:t,setActive:r}){var a,s,o;const n=Fs(e.current);(!((a=e.current)!=null&&a.contains(n.activeElement))||Number((s=n==null?void 0:n.activeElement)==null?void 0:s.getAttribute("data-index"))!==t)&&((o=e.current)==null||o.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function Us(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?H$(e,t):!1}const Y$={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}%`})}},Q$=e=>e;let Ds;function Sp(){return Ds===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Ds=CSS.supports("touch-action","none"):Ds=!0),Ds}function X$(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:a=!1,isRtl:s=!1,marks:o=!1,max:i=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:p,scale:m=Q$,step:f=1,shiftStep:g=10,tabIndex:S,value:R}=e,O=F.useRef(void 0),[C,E]=F.useState(-1),[T,P]=F.useState(-1),[_,B]=F.useState(!1),b=F.useRef(0),A=F.useRef(null),[z,I]=rb({controlled:R,default:r??l,name:"Slider"}),G=u&&((Q,ee,le)=>{const ve=Q.nativeEvent||Q,Ce=new ve.constructor(ve.type,ve);Object.defineProperty(Ce,"target",{writable:!0,value:{value:ee,name:c}}),A.current=ee,u(Ce,ee,le)}),re=Array.isArray(z);let te=re?z.slice().sort(jg):[z];te=te.map(Q=>Q==null?l:Vn(Q,l,i));const oe=o===!0&&f!==null?[...Array(Math.floor((i-l)/f)+1)].map((Q,ee)=>({value:l+f*ee})):o||[],Z=oe.map(Q=>Q.value),[ae,ge]=F.useState(-1),ue=F.useRef(null),De=zp(p,ue),ct=Q=>ee=>{var ve;const le=Number(ee.currentTarget.getAttribute("data-index"));Cu(ee.target)&&ge(le),P(le),(ve=Q==null?void 0:Q.onFocus)==null||ve.call(Q,ee)},It=Q=>ee=>{var le;Cu(ee.target)||ge(-1),P(-1),(le=Q==null?void 0:Q.onBlur)==null||le.call(Q,ee)},tt=(Q,ee)=>{const le=Number(Q.currentTarget.getAttribute("data-index")),ve=te[le],Ce=Z.indexOf(ve);let ce=ee;if(oe&&f==null){const Ke=Z[Z.length-1];ce>=Ke?ce=Ke:ce<=Z[0]?ce=Z[0]:ce=ce<ve?Z[Ce-1]:Z[Ce+1]}if(ce=Vn(ce,l,i),re){a&&(ce=Vn(ce,te[le-1]||-1/0,te[le+1]||1/0));const Ke=ce;ce=vp({values:te,newValue:ce,index:le});let at=le;a||(at=ce.indexOf(Ke)),Ls({sliderRef:ue,activeIndex:at})}I(ce),ge(le),G&&!Us(ce,z)&&G(Q,ce,le),d&&d(Q,A.current??ce)},xt=Q=>ee=>{var le;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(ee.key)){ee.preventDefault();const ve=Number(ee.currentTarget.getAttribute("data-index")),Ce=te[ve];let ce=null;if(f!=null){const Ke=ee.shiftKey?g:f;switch(ee.key){case"ArrowUp":ce=An(Ce,Ke,1,l,i);break;case"ArrowRight":ce=An(Ce,Ke,s?-1:1,l,i);break;case"ArrowDown":ce=An(Ce,Ke,-1,l,i);break;case"ArrowLeft":ce=An(Ce,Ke,s?1:-1,l,i);break;case"PageUp":ce=An(Ce,g,1,l,i);break;case"PageDown":ce=An(Ce,g,-1,l,i);break;case"Home":ce=l;break;case"End":ce=i;break}}else if(oe){const Ke=Z[Z.length-1],at=Z.indexOf(Ce),Ge=[s?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],ft=[s?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Ge.includes(ee.key)?at===0?ce=Z[0]:ce=Z[at-1]:ft.includes(ee.key)&&(at===Z.length-1?ce=Ke:ce=Z[at+1])}ce!=null&&tt(ee,ce)}(le=Q==null?void 0:Q.onKeyDown)==null||le.call(Q,ee)};Fp(()=>{var Q;n&&ue.current.contains(document.activeElement)&&((Q=document.activeElement)==null||Q.blur())},[n]),n&&C!==-1&&E(-1),n&&ae!==-1&&ge(-1);const pt=Q=>ee=>{var le;(le=Q.onChange)==null||le.call(Q,ee),tt(ee,ee.target.valueAsNumber)},rt=F.useRef(void 0);let X=h;s&&h==="horizontal"&&(X+="-reverse");const ie=({finger:Q,move:ee=!1})=>{const{current:le}=ue,{width:ve,height:Ce,bottom:ce,left:Ke}=le.getBoundingClientRect();let at;X.startsWith("vertical")?at=(ce-Q.y)/Ce:at=(Q.x-Ke)/ve,X.includes("-reverse")&&(at=1-at);let Ge;if(Ge=J$(at,l,i),f)Ge=K$(Ge,f,l);else{const Er=bp(Z,Ge);Ge=Z[Er]}Ge=Vn(Ge,l,i);let ft=0;if(re){ee?ft=rt.current:ft=bp(te,Ge),a&&(Ge=Vn(Ge,te[ft-1]||-1/0,te[ft+1]||1/0));const Er=Ge;Ge=vp({values:te,newValue:Ge,index:ft}),a&&ee||(ft=Ge.indexOf(Er),rt.current=ft)}return{newValue:Ge,activeIndex:ft}},he=Ti(Q=>{const ee=ks(Q,O);if(!ee)return;if(b.current+=1,Q.type==="mousemove"&&Q.buttons===0){J(Q);return}const{newValue:le,activeIndex:ve}=ie({finger:ee,move:!0});Ls({sliderRef:ue,activeIndex:ve,setActive:E}),I(le),!_&&b.current>q$&&B(!0),G&&!Us(le,z)&&G(Q,le,ve)}),J=Ti(Q=>{const ee=ks(Q,O);if(B(!1),!ee)return;const{newValue:le}=ie({finger:ee,move:!0});E(-1),Q.type==="touchend"&&P(-1),d&&d(Q,A.current??le),O.current=void 0,be()}),Oe=Ti(Q=>{if(n)return;Sp()||Q.preventDefault();const ee=Q.changedTouches[0];ee!=null&&(O.current=ee.identifier);const le=ks(Q,O);if(le!==!1){const{newValue:Ce,activeIndex:ce}=ie({finger:le});Ls({sliderRef:ue,activeIndex:ce,setActive:E}),I(Ce),G&&!Us(Ce,z)&&G(Q,Ce,ce)}b.current=0;const ve=Fs(ue.current);ve.addEventListener("touchmove",he,{passive:!0}),ve.addEventListener("touchend",J,{passive:!0})}),be=F.useCallback(()=>{const Q=Fs(ue.current);Q.removeEventListener("mousemove",he),Q.removeEventListener("mouseup",J),Q.removeEventListener("touchmove",he),Q.removeEventListener("touchend",J)},[J,he]);F.useEffect(()=>{const{current:Q}=ue;return Q.addEventListener("touchstart",Oe,{passive:Sp()}),()=>{Q.removeEventListener("touchstart",Oe),be()}},[be,Oe]),F.useEffect(()=>{n&&be()},[n,be]);const Ne=Q=>ee=>{var Ce;if((Ce=Q.onMouseDown)==null||Ce.call(Q,ee),n||ee.defaultPrevented||ee.button!==0)return;ee.preventDefault();const le=ks(ee,O);if(le!==!1){const{newValue:ce,activeIndex:Ke}=ie({finger:le});Ls({sliderRef:ue,activeIndex:Ke,setActive:E}),I(ce),G&&!Us(ce,z)&&G(ee,ce,Ke)}b.current=0;const ve=Fs(ue.current);ve.addEventListener("mousemove",he,{passive:!0}),ve.addEventListener("mouseup",J)},ke=Ro(re?te[0]:l,l,i),_e=Ro(te[te.length-1],l,i)-ke,Mt=(Q={})=>{const ee=Bs(Q),le={onMouseDown:Ne(ee||{})},ve={...ee,...le};return{...Q,ref:De,...ve}},er=Q=>ee=>{var ve;(ve=Q.onMouseOver)==null||ve.call(Q,ee);const le=Number(ee.currentTarget.getAttribute("data-index"));P(le)},on=Q=>ee=>{var le;(le=Q.onMouseLeave)==null||le.call(Q,ee),P(-1)},ln=(Q={})=>{const ee=Bs(Q),le={onMouseOver:er(ee||{}),onMouseLeave:on(ee||{})};return{...Q,...ee,...le}},mr=Q=>({pointerEvents:C!==-1&&C!==Q?"none":void 0});let gr;return h==="vertical"&&(gr=s?"vertical-rl":"vertical-lr"),{active:C,axis:X,axisProps:Y$,dragging:_,focusedThumbIndex:ae,getHiddenInputProps:(Q={})=>{const ee=Bs(Q),le={onChange:pt(ee||{}),onFocus:ct(ee||{}),onBlur:It(ee||{}),onKeyDown:xt(ee||{})},ve={...ee,...le};return{tabIndex:S,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":m(i),"aria-valuemin":m(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:n,...Q,...ve,style:{...nb,direction:s?"rtl":"ltr",width:"100%",height:"100%",writingMode:gr}}},getRootProps:Mt,getThumbProps:ln,marks:oe,open:T,range:re,rootRef:De,trackLeap:_e,trackOffset:ke,values:te,getThumbStyle:mr}}function Ks(e){return typeof e=="string"}const Z$=e=>!e||!Ks(e);function e3(e){return typeof e.main=="string"}function t3(e,t=[]){if(!e3(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function eu(e=[]){return([,t])=>t&&t3(t,e)}function r3(e){return ts("MuiSlider",e)}const Et=$p("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"]),n3=e=>{const{open:t}=e;return{offset:Nt(t&&Et.valueLabelOpen),circle:Et.valueLabelCircle,label:Et.valueLabelLabel}};function kg(e){const{children:t,className:r,value:n}=e,a=n3(e);return t?F.cloneElement(t,{className:Nt(t.props.className)},x.jsxs(F.Fragment,{children:[t.props.children,x.jsx("span",{className:Nt(a.offset,r),"aria-hidden":!0,children:x.jsx("span",{className:a.circle,children:x.jsx("span",{className:a.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(kg.propTypes={children:y.element.isRequired,className:y.string,value:y.node});function xp(e){return e}const a3=Pt("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${dt(r.color)}`],r.size!=="medium"&&t[`size${dt(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(tn(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Et.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Et.dragging}`]:{[`& .${Et.thumb}, & .${Et.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(eu()).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}}]}))),s3=Pt("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.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}}]}),o3=Pt("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(tn(({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(eu()).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:La(e.palette[t].main,.62),borderColor:La(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:ka(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:ka(e.palette[t].main,.5)})}}}))]}))),i3=Pt("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${dt(r.color)}`],r.size!=="medium"&&t[`thumbSize${dt(r.size)}`]]}})(tn(({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%)"},[`&.${Et.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(eu()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${Et.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${gl(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${Et.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${gl(e.palette[t].main,.16)}`}}}}))]}))),Lg=Pt(kg,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(tn(({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%"},[`&.${Et.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%"},[`&.${Et.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"&&(Lg.propTypes={children:y.element.isRequired,index:y.number.isRequired,open:y.bool.isRequired,value:y.node});const l3=Pt("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>sc(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(tn(({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}}]}))),c3=Pt("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>sc(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(tn(({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}}]}))),u3=e=>{const{disabled:t,dragging:r,marked:n,orientation:a,track:s,classes:o,color:i,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",a==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",i&&`color${dt(i)}`,l&&`size${dt(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${dt(l)}`,i&&`thumbColor${dt(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return nc(c,r3,o)},d3=({children:e})=>e,Ug=F.forwardRef(function(t,r){const n=Hc({props:t,name:"MuiSlider"}),a=cb(),{"aria-label":s,"aria-valuetext":o,"aria-labelledby":i,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:p,disableSwap:m=!1,disabled:f=!1,getAriaLabel:g,getAriaValueText:S,marks:R=!1,max:O=100,min:C=0,name:E,onChange:T,onChangeCommitted:P,orientation:_="horizontal",shiftStep:B=10,size:b="medium",step:A=1,scale:z=xp,slotProps:I,slots:G,tabIndex:re,track:te="normal",value:oe,valueLabelDisplay:Z="off",valueLabelFormat:ae=xp,...ge}=n,ue={...n,isRtl:a,max:O,min:C,classes:h,disabled:f,disableSwap:m,orientation:_,marks:R,color:d,size:b,step:A,shiftStep:B,scale:z,track:te,valueLabelDisplay:Z,valueLabelFormat:ae},{axisProps:De,getRootProps:ct,getHiddenInputProps:It,getThumbProps:tt,open:xt,active:pt,axis:rt,focusedThumbIndex:X,range:ie,dragging:he,marks:J,values:Oe,trackOffset:be,trackLeap:Ne,getThumbStyle:ke}=X$({...ue,rootRef:r});ue.marked=J.length>0&&J.some(Le=>Le.label),ue.dragging=he,ue.focusedThumbIndex=X;const _e=u3(ue),Mt=(G==null?void 0:G.root)??c.Root??a3,er=(G==null?void 0:G.rail)??c.Rail??s3,on=(G==null?void 0:G.track)??c.Track??o3,ln=(G==null?void 0:G.thumb)??c.Thumb??i3,mr=(G==null?void 0:G.valueLabel)??c.ValueLabel??Lg,gr=(G==null?void 0:G.mark)??c.Mark??l3,cn=(G==null?void 0:G.markLabel)??c.MarkLabel??c3,Q=(G==null?void 0:G.input)??c.Input??"input",ee=(I==null?void 0:I.root)??u.root,le=(I==null?void 0:I.rail)??u.rail,ve=(I==null?void 0:I.track)??u.track,Ce=(I==null?void 0:I.thumb)??u.thumb,ce=(I==null?void 0:I.valueLabel)??u.valueLabel,Ke=(I==null?void 0:I.mark)??u.mark,at=(I==null?void 0:I.markLabel)??u.markLabel,Ge=(I==null?void 0:I.input)??u.input,ft=yr({elementType:Mt,getSlotProps:ct,externalSlotProps:ee,externalForwardedProps:ge,additionalProps:{...Z$(Mt)&&{as:l}},ownerState:{...ue,...ee==null?void 0:ee.ownerState},className:[_e.root,p]}),Er=yr({elementType:er,externalSlotProps:le,ownerState:ue,className:_e.rail}),Si=yr({elementType:on,externalSlotProps:ve,additionalProps:{style:{...De[rt].offset(be),...De[rt].leap(Ne)}},ownerState:{...ue,...ve==null?void 0:ve.ownerState},className:_e.track}),aa=yr({elementType:ln,getSlotProps:tt,externalSlotProps:Ce,ownerState:{...ue,...Ce==null?void 0:Ce.ownerState},className:_e.thumb}),sa=yr({elementType:mr,externalSlotProps:ce,ownerState:{...ue,...ce==null?void 0:ce.ownerState},className:_e.valueLabel}),un=yr({elementType:gr,externalSlotProps:Ke,ownerState:ue,className:_e.mark}),zt=yr({elementType:cn,externalSlotProps:at,ownerState:ue,className:_e.markLabel}),oa=yr({elementType:Q,getSlotProps:It,externalSlotProps:Ge,ownerState:ue});return x.jsxs(Mt,{...ft,children:[x.jsx(er,{...Er}),x.jsx(on,{...Si}),J.filter(Le=>Le.value>=C&&Le.value<=O).map((Le,Ye)=>{const ia=Ro(Le.value,C,O),_r=De[rt].offset(ia);let $t;return te===!1?$t=Oe.includes(Le.value):$t=te==="normal"&&(ie?Le.value>=Oe[0]&&Le.value<=Oe[Oe.length-1]:Le.value<=Oe[0])||te==="inverted"&&(ie?Le.value<=Oe[0]||Le.value>=Oe[Oe.length-1]:Le.value>=Oe[0]),x.jsxs(F.Fragment,{children:[x.jsx(gr,{"data-index":Ye,...un,...!Ks(gr)&&{markActive:$t},style:{..._r,...un.style},className:Nt(un.className,$t&&_e.markActive)}),Le.label!=null?x.jsx(cn,{"aria-hidden":!0,"data-index":Ye,...zt,...!Ks(cn)&&{markLabelActive:$t},style:{..._r,...zt.style},className:Nt(_e.markLabel,zt.className,$t&&_e.markLabelActive),children:Le.label}):null]},Ye)}),Oe.map((Le,Ye)=>{const ia=Ro(Le,C,O),_r=De[rt].offset(ia),$t=Z==="off"?d3:mr;return x.jsx($t,{...!Ks($t)&&{valueLabelFormat:ae,valueLabelDisplay:Z,value:typeof ae=="function"?ae(z(Le),Ye):ae,index:Ye,open:xt===Ye||pt===Ye||Z==="on",disabled:f},...sa,children:x.jsx(ln,{"data-index":Ye,...aa,className:Nt(_e.thumb,aa.className,pt===Ye&&_e.active,X===Ye&&_e.focusVisible),style:{..._r,...ke(Ye),...aa.style},children:x.jsx(Q,{"data-index":Ye,"aria-label":g?g(Ye):s,"aria-valuenow":z(Le),"aria-labelledby":i,"aria-valuetext":S?S(z(Le),Ye):o,value:Oe[Ye],...oa})})},Ye)})]})});process.env.NODE_ENV!=="production"&&(Ug.propTypes={"aria-label":wu(y.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":y.string,"aria-valuetext":wu(y.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:y.node,classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["primary","secondary","error","info","success","warning"]),y.string]),components:y.shape({Input:y.elementType,Mark:y.elementType,MarkLabel:y.elementType,Rail:y.elementType,Root:y.elementType,Thumb:y.elementType,Track:y.elementType,ValueLabel:y.elementType}),componentsProps:y.shape({input:y.oneOfType([y.func,y.object]),mark:y.oneOfType([y.func,y.object]),markLabel:y.oneOfType([y.func,y.object]),rail:y.oneOfType([y.func,y.object]),root:y.oneOfType([y.func,y.object]),thumb:y.oneOfType([y.func,y.object]),track:y.oneOfType([y.func,y.object]),valueLabel:y.oneOfType([y.func,y.shape({children:y.element,className:y.string,open:y.bool,style:y.object,value:y.node,valueLabelDisplay:y.oneOf(["auto","off","on"])})])}),defaultValue:y.oneOfType([y.arrayOf(y.number),y.number]),disabled:y.bool,disableSwap:y.bool,getAriaLabel:y.func,getAriaValueText:y.func,marks:y.oneOfType([y.arrayOf(y.shape({label:y.node,value:y.number.isRequired})),y.bool]),max:y.number,min:y.number,name:y.string,onChange:y.func,onChangeCommitted:y.func,orientation:y.oneOf(["horizontal","vertical"]),scale:y.func,shiftStep:y.number,size:y.oneOfType([y.oneOf(["small","medium"]),y.string]),slotProps:y.shape({input:y.oneOfType([y.func,y.object]),mark:y.oneOfType([y.func,y.object]),markLabel:y.oneOfType([y.func,y.object]),rail:y.oneOfType([y.func,y.object]),root:y.oneOfType([y.func,y.object]),thumb:y.oneOfType([y.func,y.object]),track:y.oneOfType([y.func,y.object]),valueLabel:y.oneOfType([y.func,y.shape({children:y.element,className:y.string,open:y.bool,style:y.object,value:y.node,valueLabelDisplay:y.oneOf(["auto","off","on"])})])}),slots:y.shape({input:y.elementType,mark:y.elementType,markLabel:y.elementType,rail:y.elementType,root:y.elementType,thumb:y.elementType,track:y.elementType,valueLabel:y.elementType}),step:y.number,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),tabIndex:y.number,track:y.oneOf(["inverted","normal",!1]),value:y.oneOfType([y.arrayOf(y.number),y.number]),valueLabelDisplay:y.oneOf(["auto","off","on"]),valueLabelFormat:y.oneOfType([y.func,y.string])});var h3="[object Number]";function p3(e){return typeof e=="number"||qr(e)&&rn(e)==h3}const Dg=Je.observer(e=>{var s,o,i;const t=W.useTheme(),{store:r}=e,{t:n}=ze.useTranslation();function a(l,c){c===e.velocity||!p3(c)||e.onVelocityChange(c)}return x.jsxs(W.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&x.jsx(W.Typography,{sx:{color:(i=(o=(s=t.componentsExt)==null?void 0:s.JoggingPanel)==null?void 0:o.VelocitySlider)==null?void 0:i.sliderLegendColor,fontSize:"14px"},children:n("Jogging.Velocity.bt")}),x.jsx(Ug,{value:e.velocity,color:"secondary",onChange:a,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):x.jsx(tu,{value:e.velocity.toString()}))]})});function tu({value:e,sx:t}){var n;const r=W.useTheme();return x.jsx(W.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:x.jsx(W.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Ng=Je.observer(({store:e})=>{const{t}=ze.useTranslation(),r=Je.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 x.jsx(Dg,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>x.jsx(tu,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),f3=Je.observer(({store:e,children:t})=>{const{t:r}=ze.useTranslation(),n=W.useTheme();function a(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}wm(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}&response_coordinate_system=${e.selectedCoordSystemId}`))},{fireImmediately:!0});async function s(h,p){const m=await e.activate(),f=m.motionStream.rapidlyChangingMotionState.tcp_pose,g=m.motionStream.rapidlyChangingMotionState.state.joint_position;f&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:f,currentJoints:g,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:Nr.degreesToRadians(p.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function o(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return s(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.startTCPTranslation({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({axis:h.axis,direction:h.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function i(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function l(h,p,m){var g,S,R;const f=(R=(S=(g=m.componentsExt)==null?void 0:g.JoggingPanel)==null?void 0:S.JoggingCartesian)==null?void 0:R.Axis;if(f)return p==="translate"?f[h]:f.CustomRotation??f[h]}const c=[{id:"x",icon:x.jsx(x2,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:x.jsx(w2,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:x.jsx(P2,{}),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:Nr.radiansToDegrees(h).toFixed(1)})}return x.jsxs(W.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[x.jsxs(W.Stack,{gap:2,children:[x.jsx(z$,{store:e}),x.jsx(Ng,{store:e}),x.jsx(W.Divider,{})]}),x.jsx(W.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:x.jsxs(W.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[x.jsxs(G$,{value:e.selectedCartesianMotionType,onChange:a,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[x.jsx(W.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),x.jsx(W.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,m;return x.jsx(Il,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:x.jsxs(x.Fragment,{children:[h.icon,x.jsx(W.Typography,{sx:{fontSize:"24px",color:((m=h.colors)==null?void 0:m.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var f;return u(((f=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:f.position[h.id])||0)},startJogging:f=>o({axis:h.id,motionType:"translate",direction:f}),stopJogging:i},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var p,m;return x.jsx(Il,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:x.jsxs(x.Fragment,{children:[x.jsx(T2,{}),x.jsx(W.Typography,{sx:{fontSize:"24px",color:((m=h.colors)==null?void 0:m.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var f,g;return d(((g=(f=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:f.orientation)==null?void 0:g[h.id])||0)},startJogging:f=>o({axis:h.id,motionType:"rotate",direction:f}),stopJogging:i},h.id)})]})}),x.jsx(Ag,{store:e}),t&&x.jsx(W.Divider,{}),t]})}),m3=Je.observer(({store:e,children:t})=>{const r=W.useTheme();async function n(s){await e.activate(),await e.jogger.startJointRotation({joint:s.joint,direction:s.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function a(){await e.jogger.stop(),await e.deactivate()}return x.jsxs(W.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[x.jsx(Ng,{store:e}),x.jsx(W.Divider,{}),x.jsx(W.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:x.jsx(W.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(s=>{var c;const o=(c=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:c[s.index],i=(o==null?void 0:o.lower_limit)!==void 0?Nr.radiansToDegrees(o.lower_limit):void 0,l=(o==null?void 0:o.upper_limit)!==void 0?Nr.radiansToDegrees(o.upper_limit):void 0;return x.jsxs(W.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&x.jsx(W.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${s.index+1}`}),x.jsx(Rm,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const u=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[s.index];return u!==void 0?Nr.radiansToDegrees(u):void 0},startJogging:u=>n({joint:s.index,direction:u}),stopJogging:a})]},`joint-${s.index}`)})})}),x.jsx(Ag,{store:e}),t&&x.jsx(W.Divider,{}),t]})}),g3=en(Je.observer(e=>{const t=ec.isString(e.nova)?new g2({instanceUrl:e.nova}):e.nova,r=Je.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){Xe.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let a=e.store;if(!a){const s=await t.connectJogger(e.motionGroupId);a=await vi.loadFor(s)}Xe.runInAction(()=>{r.joggingStore=a}),e.onSetup&&e.onSetup(a)}catch(a){r.loadingError=a}}return se.useEffect(()=>(n(),e.store?()=>null:()=>{var a;(a=r.joggingStore)==null||a.dispose()}),[e.store,e.nova,e.motionGroupId]),se.useEffect(()=>{const a=r.joggingStore;a&&(e.locked?a.lock("external"):a.unlock("external"))},[r.joggingStore,e.locked]),x.jsx(W.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?x.jsx(y3,{store:r.joggingStore,children:e.children}):x.jsx(Kc,{message:"Loading jogging",error:r.loadingError})})})),y3=Je.observer(({store:e,children:t})=>{const{t:r}=ze.useTranslation();function n(){if(e.currentTab.id==="cartesian")return x.jsx(x.Fragment,{children:x.jsx(f3,{store:e,children:t})});if(e.currentTab.id==="joint")return x.jsx(x.Fragment,{children:x.jsx(m3,{store:e,children:t})})}return x.jsxs(W.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[x.jsx(W.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(a=>{const s=a.label==="cartesian"?r("Jogging.Cartesian.bt"):r("Jogging.Joints.bt"),o=a.label==="cartesian"?x.jsx(KP,{fontSize:"small",sx:{mr:1}}):x.jsx(YP,{fontSize:"small",sx:{mr:1}});return x.jsx(W.Tab,{label:e.showTabIcons?x.jsxs(W.Stack,{direction:"row",alignItems:"center",children:[o,s]}):s,id:`jogging-tab-${a.id}`,"aria-controls":`jogging-tab-${a.id}`},a.id)})}),x.jsx(W.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()})]})}),Fg=se.forwardRef(({label:e,value:t},r)=>{var i;const n=W.useTheme(),[a,s]=se.useState(!1);async function o(){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(),u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}return!1}return se.useEffect(()=>{if(!a)return;const l=setTimeout(()=>s(!1),3e3);return()=>{l&&clearTimeout(l)}},[a]),x.jsx(W.Tooltip,{open:a,title:"Copied!",children:x.jsx(W.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:()=>o(),children:x.jsx(W.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})})})}),b3=Je.observer(({motionStream:e})=>{const t=se.useRef(null);function r(){const n=e.rapidlyChangingMotionState.tcp_pose;return n?Nr.poseToWandelscriptString(n):""}return Yn(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),x.jsx(W.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:x.jsx(Fg,{value:r(),ref:t})})}),v3=Je.observer(({motionStream:e})=>{const t=se.useRef(null);function r(){const{joints:n}=e.rapidlyChangingMotionState.state.joint_position;return`[${n.map(a=>parseFloat(a.toFixed(4))).join(", ")}]`}return Yn(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),x.jsx(W.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:x.jsx(Fg,{value:r(),ref:t})})});function S3(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function x3({baseUrl:e=S3(),...t}){return x.jsxs(W.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:[x.jsx(W.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),x.jsxs(W.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[x.jsx(W.Typography,{color:"#fff",children:"Found no devices to connect to."}),x.jsx(W.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),x.jsx(W.DialogActions,{children:x.jsxs(W.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[x.jsx(W.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),x.jsx(W.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const O3=Array(6).fill(2*Math.PI),Op="0.0.0-semantically-released";function ru(e){let t=Op;return Op.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function w3(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>zg(r))}function Bg(e){return e.name.endsWith("_FLG")}function zg(e){return/_J[0-9]+$/.test(e.name)}function C3(e,t){let r;function n(a){if(Bg(a)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${a.name}. Only one _FLG group is allowed.`);r=a}zg(a),a.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 Gg({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){fl.Globals.assign({frameLoop:"always"});const a=se.useRef([]),s=se.useRef([]),{invalidate:o}=ly.useThree();function i(h){h&&(s.current=w3(h),c(),o())}function l(h){a.current=h,d.start(Object.assign({},a.current))}function c(){const h=s.current.map((p,m)=>u[m].get());if(r)r(s.current,h);else for(const[p,m]of s.current.entries()){const f=t[p],g=f.theta||0,S=f.reverse_rotation_direction?-1:1;m.rotation.y=S*h[p]+g}}Om(()=>{const h=e.state.joint_position.joints.filter(p=>p!==void 0);requestAnimationFrame(()=>l(h))});const[u,d]=fl.useSpring(()=>({...Object.assign({},e.state.joint_position.joints),onChange:()=>{c(),o()},onResolve:()=>{c()}}));return x.jsx("group",{ref:i,children:n})}const wp="line",Cp="mesh";function P3({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new kt.Matrix4;function a(i,l){const c=new kt.Vector3,u=new kt.Quaternion,d=new kt.Vector3;n.decompose(c,u,d);const h=c.clone(),p=new kt.Matrix4().makeRotationY(i.theta+l*(i.reverse_rotation_direction?-1:1)).multiply(new kt.Matrix4().makeTranslation(0,i.d/1e3,0)).multiply(new kt.Matrix4().makeTranslation(i.a/1e3,0,0)).multiply(new kt.Matrix4().makeRotationX(i.alpha));return n.multiply(p),n.decompose(c,u,d),{a:h,b:c}}function s(i,l,c,u){if(!t)return;const d=t[i];if(!d)return;const{a:h,b:p}=a(d,u);l.geometry.setPositions([h.toArray(),p.toArray()].flat()),c.position.set(p.x,p.y,p.z)}function o(i,l){n.identity(),i.forEach((c,u)=>{s(u,c.getObjectByName(wp),c.getObjectByName(Cp),l[u])})}return x.jsx(x.Fragment,{children:x.jsx(Gg,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:o,children:x.jsxs("group",{...r,name:"Scene",children:[x.jsxs("mesh",{children:[x.jsx("sphereGeometry",{args:[.01,32,32]}),x.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((i,l)=>{const{a:c,b:u}=a(i,e.state.joint_position.joints[l]??0),d=`dhrobot_J0${l}`;return x.jsxs("group",{name:d,children:[x.jsx(Lt.Line,{name:wp,points:[c,u],color:"white",lineWidth:5}),x.jsxs("mesh",{name:Cp,position:u,children:[x.jsx("sphereGeometry",{args:[.01,32,32]}),x.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+l)]},d)})]})})})}const R3=console.warn;function T3(){return se.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&R3(e)}},[]),x.jsx(x.Fragment,{})}function A3(e){return e.type==="Mesh"}function V3({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:a}=C3(Lt.useGLTF(e),e.split("/").pop()||e),s=se.useCallback(i=>{i&&r&&r()},[e]);function o(i){return A3(i)?x.jsx("mesh",{name:i.name,geometry:i.geometry,material:i.material,position:i.position,rotation:i.rotation},i.uuid):x.jsx(fl.animated.group,{name:i.name,position:i.position,rotation:i.rotation,ref:Bg(i)?t:void 0,children:i.children.map(o)},i.uuid)}return x.jsx("group",{...n,dispose:null,ref:s,children:o(a.scene)})}const E3=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof qe.Mesh){r.material instanceof qe.Material&&(r.material.colorWrite=!1);const n=r.clone(),a=r.clone();n.material=new qe.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:qe.DoubleSide}),n.userData.isGhost=!0,a.material=new qe.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:qe.DoubleSide}),a.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(a))}}),e.userData.isGhost=!0)},_3=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof qe.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof qe.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},Hg=en(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=ru,flangeRef:a,postModelRender:s,transparentColor:o,...i})=>{const[l,c]=se.useState(null),u=se.useCallback(h=>{c(h)},[]);se.useEffect(()=>{l&&(o?E3(l,o):_3(l))},[l,o]);const d=x.jsx(P3,{rapidlyChangingMotionState:e,dhParameters:r,...i});return x.jsxs(py.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[x.jsx(se.Suspense,{fallback:d,children:x.jsx("group",{ref:u,children:x.jsx(Gg,{rapidlyChangingMotionState:e,dhParameters:r,children:x.jsx(V3,{modelURL:n(t),postModelRender:s,flangeRef:a,...i})})})}),x.jsx(T3,{})]})});function I3({connectedMotionGroup:e,getModel:t=ru,flangeRef:r,transparentColor:n,...a}){return e.dhParameters?x.jsx(Hg,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,...a}):null}const M3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),$3=se.forwardRef(M3),j3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),k3=se.forwardRef(j3),Kt=Je.observer(({id:e,icon:t,color:r,title:n,name:a,label:s,explanation:o,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=Je.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(d){u.anchorEl=d.currentTarget},closePopover(){u.anchorEl=null}}));return x.jsxs(x.Fragment,{children:[x.jsxs(W.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:[x.jsx(W.SvgIcon,{component:t,sx:{color:r}}),s&&x.jsx("div",{style:{color:r},children:s})]}),x.jsx(W.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:x.jsxs(W.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[x.jsxs("div",{children:[n&&x.jsx(W.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),x.jsx(W.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:a})]}),x.jsx(W.Typography,{fontSize:"14px",children:o}),i&&x.jsx(W.Typography,{fontSize:"12px",children:i})]})})]})}),L3=Je.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:a})=>{const s=W.useTheme(),{t:o}=ze.useTranslation();return e?x.jsx(Kt,{id:"motion-group-virtual",icon:k3,color:s.palette.tertiary.main,name:o("SafetyBar.ControllerType.Virtual.lb"),label:a?null:o("SafetyBar.ControllerType.Virtual.lb"),explanation:x.jsxs(ze.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",x.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}):x.jsx(Kt,{id:"motion-group-physical",icon:$3,color:s.palette.primary.main,name:o("SafetyBar.ControllerType.Physical.lb"),label:a?null:o("SafetyBar.ControllerType.Physical.lb"),explanation:x.jsx(ze.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:x.jsx("code",{}),strong:x.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),U3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),D3=se.forwardRef(U3),N3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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})),F3=se.forwardRef(N3),B3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),z3=se.forwardRef(B3),G3=Je.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=ze.useTranslation(),s=W.useTheme();switch(e){case"OPERATION_MODE_AUTO":return x.jsx(Kt,{id:"operation-mode-auto",icon:D3,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Automatic.ti"),label:n?null:a("SafetyBar.OperationMode.Automatic.ti"),color:s.palette.text.secondary,explanation:x.jsx(ze.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 x.jsx(Kt,{id:"operation-mode-manual",icon:z3,color:s.palette.warning.main,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Manual.lb"),label:n?null:a("SafetyBar.OperationMode.Manual.lb"),explanation:x.jsx(ze.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 x.jsx(Kt,{id:"operation-mode-error",icon:F3,color:s.palette.warning.main,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Error.lb"),label:n?null:a("SafetyBar.OperationMode.Error.lb"),explanation:x.jsx(ze.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})}}),H3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),q3=se.forwardRef(H3),J3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),F.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"}),F.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"})),W3=se.forwardRef(J3),K3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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})),Y3=se.forwardRef(K3),Q3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),X3=se.forwardRef(Q3),Z3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),ej=se.forwardRef(Z3),tj=Je.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=ze.useTranslation(),s=W.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return x.jsx(Kt,{id:"safety-state-normal",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Normal.lb"),label:n?null:a("SafetyBar.SafetyState.Normal.lb"),icon:X3,color:s.palette.text.secondary,explanation:x.jsx(ze.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 x.jsx(Kt,{id:"safety-state-estop",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Estop.lb"),label:n?null:a("SafetyBar.SafetyState.Estop.lb"),icon:W3,color:s.palette.error.main,explanation:x.jsx(ze.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 x.jsx(Kt,{id:"safety-state-stop",icon:ej,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Stop.lb"),label:n?null:a("SafetyBar.SafetyState.Stop.lb"),color:s.palette.warning.main,explanation:x.jsx(ze.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 x.jsx(Kt,{id:"safety-state-manual-action-required",icon:Y3,color:s.palette.warning.main,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:a("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:x.jsx(ze.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 x.jsx(Kt,{id:"safety-state-error",icon:q3,color:s.palette.error.main,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Error.lb"),label:n?null:a("SafetyBar.SafetyState.Error.lb"),explanation:x.jsx(ze.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:b2(e,`Unknown safety state ${e}`)}}),rj=en(Je.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:a,transformOrigin:s,compact:o=!0})=>{const i=o?1:2;return x.jsxs(W.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[x.jsx(tj,{safetyState:n,anchorOrigin:a,transformOrigin:s,compact:o}),x.jsx(W.Divider,{orientation:"vertical",flexItem:!0}),x.jsx(G3,{operationMode:r,anchorOrigin:a,transformOrigin:s,compact:o}),x.jsx(W.Divider,{orientation:"vertical",flexItem:!0}),x.jsx(L3,{isVirtual:e,motionGroupId:t,anchorOrigin:a,transformOrigin:s,compact:o})]})})),nj=W.styled(W.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:a})=>!a,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:a})=>a,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),aj=se.forwardRef((e,t)=>x.jsx(nj,{ref:t,selected:e.selected,...e,color:"secondary",variant:"circular"})),sj={$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"},oj=se.lazy(()=>import("@monaco-editor/react"));let pl=null;async function ij(){if(!pl){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);pl={shiki:await e({langs:[sj],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return pl}const lj=en(e=>{const t=W.useTheme(),[r,n]=se.useState("dark-plus"),a=t.palette.mode==="dark"?"dark-plus":"light-plus";async function s(o){var c,u;o.languages.register({id:"wandelscript"}),o.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:i,shikiToMonaco:l}=await ij();l(i,o),o.editor.defineTheme(a,((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(o),n(a)}return x.jsx(se.Suspense,{fallback:x.jsx(Kc,{}),children:x.jsx(oj,{value:e.code,onMount:(o,i)=>{s(i)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function qg(){var t,r,n,a,s,o,i;const e=W.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`}}},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:(a=e.palette.backgroundPaperElevation)==null?void 0:a[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:(o=(s=e.paletteExt)==null?void 0:s.secondary)==null?void 0:o.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":W.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function cj(){const e=qg();return e.palette.mode="light",e}function uj(e){var n,a,s,o;let t=!0;((n=e.palette)==null?void 0:n.mode)==="light"?t=!1:((a=e.palette)==null?void 0:a.mode)!=="dark"&&(t=!(typeof window<"u"&&((o=(s=window.matchMedia)==null?void 0:s.call(window,"(prefers-color-scheme: light)"))==null?void 0:o.matches)));const r=t?qg():cj();return Kp(r,e)}exports.CycleTimer=mP;exports.JoggingCartesianAxisControl=Il;exports.JoggingJointRotationControl=Rm;exports.JoggingPanel=g3;exports.JoggingStore=vi;exports.LoadingCover=Kc;exports.LoadingErrorMessage=yg;exports.NoMotionGroupModal=x3;exports.PoseCartesianValues=b3;exports.PoseJointValues=v3;exports.PresetEnvironment=by;exports.Robot=I3;exports.SafetyBar=rj;exports.SafetyZonesRenderer=xy;exports.SelectableFab=aj;exports.SupportedRobot=Hg;exports.TrajectoryRenderer=Oy;exports.VelocitySlider=Dg;exports.VelocitySliderLabel=tu;exports.WandelscriptEditor=lj;exports.createNovaMuiTheme=uj;exports.defaultAxisConfig=O3;exports.defaultGetModel=ru;exports.i18n=Gc;exports.useAnimationFrame=Yn;exports.useAutorun=Om;exports.useMounted=ni;exports.useReaction=wm;
|
|
158
|
+
`):" "+zh(s[0]):"as no adapter specified";throw new me("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:Hl};function il(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new na(null,e)}function Gh(e){return il(e),e.headers=xt.from(e.headers),e.data=ol.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),lg.getAdapter(e.adapter||us.adapter)(e).then(function(n){return il(e),n.data=ol.call(e,e.transformResponse,n),n.headers=xt.from(n.headers),n},function(n){return rg(n)||(il(e),n&&n.response&&(n.response.data=ol.call(e,e.transformResponse,n.response),n.response.headers=xt.from(n.response.headers))),Promise.reject(n)})}const cg="1.8.3",mi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{mi[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Hh={};mi.transitional=function(t,r,n){function a(s,o){return"[Axios v"+cg+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,i)=>{if(t===!1)throw new me(a(o," has been removed"+(r?" in "+r:"")),me.ERR_DEPRECATED);return r&&!Hh[o]&&(Hh[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,o,i):!0}};mi.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function aI(e,t,r){if(typeof e!="object")throw new me("options must be an object",me.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const s=n[a],o=t[s];if(o){const i=e[s],l=i===void 0||o(i,s,e);if(l!==!0)throw new me("option "+s+" must be "+l,me.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new me("Unknown option "+s,me.ERR_BAD_OPTION)}}const Ws={assertOptions:aI,validators:mi},qt=Ws.validators;let Br=class{constructor(t){this.defaults=t,this.interceptors={request:new kh,response:new kh}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const s=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
159
|
+
`+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Jr(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:s}=r;n!==void 0&&Ws.assertOptions(n,{silentJSONParsing:qt.transitional(qt.boolean),forcedJSONParsing:qt.transitional(qt.boolean),clarifyTimeoutError:qt.transitional(qt.boolean)},!1),a!=null&&(H.isFunction(a)?r.paramsSerializer={serialize:a}:Ws.assertOptions(a,{encode:qt.function,serialize:qt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Ws.assertOptions(r,{baseUrl:qt.spelling("baseURL"),withXsrfToken:qt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=s&&H.merge(s.common,s[r.method]);s&&H.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),r.headers=xt.concat(o,s);const i=[];let l=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(r)===!1||(l=l&&f.synchronous,i.unshift(f.fulfilled,f.rejected))});const c=[];this.interceptors.response.forEach(function(f){c.push(f.fulfilled,f.rejected)});let u,d=0,h;if(!l){const m=[Gh.bind(this),void 0];for(m.unshift.apply(m,i),m.push.apply(m,c),h=m.length,u=Promise.resolve(r);d<h;)u=u.then(m[d++],m[d++]);return u}h=i.length;let p=r;for(d=0;d<h;){const m=i[d++],f=i[d++];try{p=m(p)}catch(g){f.call(this,g);break}}try{u=Gh.call(this,p)}catch(m){return Promise.reject(m)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Jr(this.defaults,t);const r=ag(t.baseURL,t.url,t.allowAbsoluteUrls);return Zm(r,t.params,t.paramsSerializer)}};H.forEach(["delete","get","head","options"],function(t){Br.prototype[t]=function(r,n){return this.request(Jr(n||{},{method:t,url:r,data:(n||{}).data}))}});H.forEach(["post","put","patch"],function(t){function r(n){return function(s,o,i){return this.request(Jr(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Br.prototype[t]=r(),Br.prototype[t+"Form"]=r(!0)});let sI=class ug{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(a=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](a);n._listeners=null}),this.promise.then=a=>{let s;const o=new Promise(i=>{n.subscribe(i),s=i}).then(a);return o.cancel=function(){n.unsubscribe(s)},o},t(function(s,o,i){n.reason||(n.reason=new na(s,o,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 ug(function(a){t=a}),cancel:t}}};function oI(e){return function(r){return e.apply(null,r)}}function iI(e){return H.isObject(e)&&e.isAxiosError===!0}const ql={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};Object.entries(ql).forEach(([e,t])=>{ql[t]=e});function dg(e){const t=new Br(e),r=Bm(Br.prototype.request,t);return H.extend(r,Br.prototype,t,{allOwnKeys:!0}),H.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return dg(Jr(e,a))},r}const V=dg(us);V.Axios=Br;V.CanceledError=na;V.CancelToken=sI;V.isCancel=rg;V.VERSION=cg;V.toFormData=pi;V.AxiosError=me;V.Cancel=V.CanceledError;V.all=function(t){return Promise.all(t)};V.spread=oI;V.isAxiosError=iI;V.mergeConfig=Jr;V.AxiosHeaders=xt;V.formToJSON=e=>tg(H.isHTMLForm(e)?new FormData(e):e);V.getAdapter=lg.getAdapter;V.HttpStatusCode=ql;V.default=V;const{Axios:fj,AxiosError:Jl,CanceledError:mj,isCancel:gj,CancelToken:yj,VERSION:bj,all:vj,Cancel:xj,isAxiosError:lI,spread:Sj,toFormData:Oj,AxiosHeaders:wj,HttpStatusCode:Cj,formToJSON:Pj,getAdapter:Rj,mergeConfig:Tj}=V,M="/api/v1".replace(/\/+$/,"");class je{constructor(t,r=M,n=V){la(this,"basePath");la(this,"axios");la(this,"configuration");this.basePath=r,this.axios=n,t&&(this.configuration=t,this.basePath=t.basePath??r)}}class cI extends Error{constructor(r,n){super(n);la(this,"field");this.field=r,this.name="RequiredError"}}const $={},j="https://example.com",v=function(e,t,r){if(r==null)throw new cI(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},k=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})},L=async function(e,t){if(t&&t.accessToken){const r=typeof t.accessToken=="function"?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+r}};function Wl(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>Wl(e,n,r)):Object.keys(t).forEach(n=>Wl(e,t[n],`${r}${r!==""?".":""}${n}`)):e.has(r)?e.append(r,t):e.set(r,t))}const U=function(e,...t){const r=new URLSearchParams(e.search);Wl(r,t),e.search=r.toString()},fe=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||""},D=function(e){return e.pathname+e.search+e.hash},N=function(e,t,r,n){return(a=t,s=r)=>{const o={...e.options,url:(a.defaults.baseURL?"":(n==null?void 0:n.basePath)??s)+e.url};return a.request(o)}},uI=function(e){return{addApp:async(t,r,n,a={})=>{v("addApp","cell",t),v("addApp","app",r);const s="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(r,l,e),{url:D(o),options:l}},clearApps:async(t,r,n={})=>{v("clearApps","cell",t);const a="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),r!==void 0&&(c.completionTimeout=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},deleteApp:async(t,r,n,a={})=>{v("deleteApp","cell",t),v("deleteApp","app",r);const s="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.completionTimeout=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},getApp:async(t,r,n={})=>{v("getApp","cell",t),v("getApp","app",r);const a="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listApps:async(t,r={})=>{v("listApps","cell",t);const n="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},updateApp:async(t,r,n,a,s={})=>{v("updateApp","cell",t),v("updateApp","app",r),v("updateApp","app2",n);const o="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};k(c,e),await L(u,e),a!==void 0&&(d.completionTimeout=a),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=fe(n,c,e),{url:D(i),options:c}}}},On=function(e){const t=uI(e);return{async addApp(r,n,a,s){var c,u;const o=await t.addApp(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ApplicationApi.addApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async clearApps(r,n,a){var l,c;const s=await t.clearApps(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ApplicationApi.clearApps"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteApp(r,n,a,s){var c,u;const o=await t.deleteApp(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ApplicationApi.deleteApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async getApp(r,n,a){var l,c;const s=await t.getApp(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ApplicationApi.getApp"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listApps(r,n){var i,l;const a=await t.listApps(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["ApplicationApi.listApps"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async updateApp(r,n,a,s,o){var u,d;const i=await t.updateApp(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["ApplicationApi.updateApp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)}}};class qh extends je{addApp(t,r,n,a){return On(this.configuration).addApp(t,r,n,a).then(s=>s(this.axios,this.basePath))}clearApps(t,r,n){return On(this.configuration).clearApps(t,r,n).then(a=>a(this.axios,this.basePath))}deleteApp(t,r,n,a){return On(this.configuration).deleteApp(t,r,n,a).then(s=>s(this.axios,this.basePath))}getApp(t,r,n){return On(this.configuration).getApp(t,r,n).then(a=>a(this.axios,this.basePath))}listApps(t,r){return On(this.configuration).listApps(t,r).then(n=>n(this.axios,this.basePath))}updateApp(t,r,n,a,s){return On(this.configuration).updateApp(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}}const dI=function(e){return{deleteCell:async(t,r,n={})=>{v("deleteCell","cell",t);const a="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),r!==void 0&&(c.completionTimeout=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},deployCell:async(t,r,n={})=>{v("deployCell","cell",t);const a="/cells",s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),r!==void 0&&(c.completionTimeout=r),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(t,i,e),{url:D(s),options:i}},getCell:async(t,r={})=>{v("getCell","cell",t);const n="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},getCellStatus:async(t,r={})=>{v("getCellStatus","cell",t);const n="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},listCells:async(t={})=>{const r="/cells",n=new URL(r,j);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...t},o={},i={};k(s,e),await L(o,e),U(n,i);let l=a&&a.headers?a.headers:{};return s.headers={...o,...l,...t.headers},{url:D(n),options:s}},updateCell:async(t,r,n,a={})=>{v("updateCell","cell",t),v("updateCell","cell2",r);const s="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(r,l,e),{url:D(o),options:l}}}},wn=function(e){const t=dI(e);return{async deleteCell(r,n,a){var l,c;const s=await t.deleteCell(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["CellApi.deleteCell"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deployCell(r,n,a){var l,c;const s=await t.deployCell(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["CellApi.deployCell"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getCell(r,n){var i,l;const a=await t.getCell(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["CellApi.getCell"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async getCellStatus(r,n){var i,l;const a=await t.getCellStatus(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["CellApi.getCellStatus"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async listCells(r){var o,i;const n=await t.listCells(r),a=(e==null?void 0:e.serverIndex)??0,s=(i=(o=$["CellApi.listCells"])==null?void 0:o[a])==null?void 0:i.url;return(l,c)=>N(n,V,M,e)(l,s||c)},async updateCell(r,n,a,s){var c,u;const o=await t.updateCell(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["CellApi.updateCell"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class hI extends je{deleteCell(t,r,n){return wn(this.configuration).deleteCell(t,r,n).then(a=>a(this.axios,this.basePath))}deployCell(t,r,n){return wn(this.configuration).deployCell(t,r,n).then(a=>a(this.axios,this.basePath))}getCell(t,r){return wn(this.configuration).getCell(t,r).then(n=>n(this.axios,this.basePath))}getCellStatus(t,r){return wn(this.configuration).getCellStatus(t,r).then(n=>n(this.axios,this.basePath))}listCells(t){return wn(this.configuration).listCells(t).then(r=>r(this.axios,this.basePath))}updateCell(t,r,n,a){return wn(this.configuration).updateCell(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const pI=function(e){return{addRobotController:async(t,r,n,a={})=>{v("addRobotController","cell",t),v("addRobotController","robotController",r);const s="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(r,l,e),{url:D(o),options:l}},clearRobotControllers:async(t,r,n={})=>{v("clearRobotControllers","cell",t);const a="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),r!==void 0&&(c.completionTimeout=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},deleteRobotController:async(t,r,n,a={})=>{v("deleteRobotController","cell",t),v("deleteRobotController","controller",r);const s="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.completionTimeout=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},getCurrentRobotControllerState:async(t,r,n={})=>{v("getCurrentRobotControllerState","cell",t),v("getCurrentRobotControllerState","controller",r);const a="/cells/{cell}/controllers/{controller}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getMode:async(t,r,n={})=>{v("getMode","cell",t),v("getMode","controller",r);const a="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getRobotController:async(t,r,n={})=>{v("getRobotController","cell",t),v("getRobotController","controller",r);const a="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getSupportedModes:async(t,r,n={})=>{v("getSupportedModes","cell",t),v("getSupportedModes","controller",r);const a="/cells/{cell}/controllers/{controller}/controller-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getVirtualRobotConfiguration:async(t,r,n={})=>{v("getVirtualRobotConfiguration","cell",t),v("getVirtualRobotConfiguration","controller",r);const a="/cells/{cell}/controllers/{controller}/virtual-robot-configuration".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listControllers:async(t,r={})=>{v("listControllers","cell",t);const n="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},setDefaultMode:async(t,r,n,a={})=>{v("setDefaultMode","cell",t),v("setDefaultMode","controller",r),v("setDefaultMode","mode",n);const s="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.mode=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},streamFreeDrive:async(t,r,n,a={})=>{v("streamFreeDrive","cell",t),v("streamFreeDrive","controller",r);const s="/cells/{cell}/controllers/{controller}/free-drive-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.response_rate=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},streamModeChange:async(t,r,n={})=>{v("streamModeChange","cell",t),v("streamModeChange","controller",r);const a="/cells/{cell}/controllers/{controller}/mode-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},streamRobotControllerState:async(t,r,n,a={})=>{v("streamRobotControllerState","cell",t),v("streamRobotControllerState","controller",r);const s="/cells/{cell}/controllers/{controller}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.response_rate=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},updateRobotController:async(t,r,n,a,s={})=>{v("updateRobotController","cell",t),v("updateRobotController","controller",r),v("updateRobotController","robotController",n);const o="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};k(c,e),await L(u,e),a!==void 0&&(d.completionTimeout=a),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=fe(n,c,e),{url:D(i),options:c}}}},gt=function(e){const t=pI(e);return{async addRobotController(r,n,a,s){var c,u;const o=await t.addRobotController(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerApi.addRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async clearRobotControllers(r,n,a){var l,c;const s=await t.clearRobotControllers(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.clearRobotControllers"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteRobotController(r,n,a,s){var c,u;const o=await t.deleteRobotController(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerApi.deleteRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async getCurrentRobotControllerState(r,n,a){var l,c;const s=await t.getCurrentRobotControllerState(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.getCurrentRobotControllerState"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getMode(r,n,a){var l,c;const s=await t.getMode(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.getMode"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getRobotController(r,n,a){var l,c;const s=await t.getRobotController(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.getRobotController"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getSupportedModes(r,n,a){var l,c;const s=await t.getSupportedModes(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.getSupportedModes"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getVirtualRobotConfiguration(r,n,a){var l,c;const s=await t.getVirtualRobotConfiguration(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.getVirtualRobotConfiguration"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listControllers(r,n){var i,l;const a=await t.listControllers(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["ControllerApi.listControllers"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async setDefaultMode(r,n,a,s){var c,u;const o=await t.setDefaultMode(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerApi.setDefaultMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async streamFreeDrive(r,n,a,s){var c,u;const o=await t.streamFreeDrive(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerApi.streamFreeDrive"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async streamModeChange(r,n,a){var l,c;const s=await t.streamModeChange(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.streamModeChange"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async streamRobotControllerState(r,n,a,s){var c,u;const o=await t.streamRobotControllerState(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerApi.streamRobotControllerState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async updateRobotController(r,n,a,s,o){var u,d;const i=await t.updateRobotController(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["ControllerApi.updateRobotController"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)}}};class fI extends je{addRobotController(t,r,n,a){return gt(this.configuration).addRobotController(t,r,n,a).then(s=>s(this.axios,this.basePath))}clearRobotControllers(t,r,n){return gt(this.configuration).clearRobotControllers(t,r,n).then(a=>a(this.axios,this.basePath))}deleteRobotController(t,r,n,a){return gt(this.configuration).deleteRobotController(t,r,n,a).then(s=>s(this.axios,this.basePath))}getCurrentRobotControllerState(t,r,n){return gt(this.configuration).getCurrentRobotControllerState(t,r,n).then(a=>a(this.axios,this.basePath))}getMode(t,r,n){return gt(this.configuration).getMode(t,r,n).then(a=>a(this.axios,this.basePath))}getRobotController(t,r,n){return gt(this.configuration).getRobotController(t,r,n).then(a=>a(this.axios,this.basePath))}getSupportedModes(t,r,n){return gt(this.configuration).getSupportedModes(t,r,n).then(a=>a(this.axios,this.basePath))}getVirtualRobotConfiguration(t,r,n){return gt(this.configuration).getVirtualRobotConfiguration(t,r,n).then(a=>a(this.axios,this.basePath))}listControllers(t,r){return gt(this.configuration).listControllers(t,r).then(n=>n(this.axios,this.basePath))}setDefaultMode(t,r,n,a){return gt(this.configuration).setDefaultMode(t,r,n,a).then(s=>s(this.axios,this.basePath))}streamFreeDrive(t,r,n,a){return gt(this.configuration).streamFreeDrive(t,r,n,a).then(s=>s(this.axios,this.basePath))}streamModeChange(t,r,n){return gt(this.configuration).streamModeChange(t,r,n).then(a=>a(this.axios,this.basePath))}streamRobotControllerState(t,r,n,a){return gt(this.configuration).streamRobotControllerState(t,r,n,a).then(s=>s(this.axios,this.basePath))}updateRobotController(t,r,n,a,s){return gt(this.configuration).updateRobotController(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}}const mI=function(e){return{listIODescriptions:async(t,r,n,a={})=>{v("listIODescriptions","cell",t),v("listIODescriptions","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n&&(u.ios=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},listIOValues:async(t,r,n,a={})=>{v("listIOValues","cell",t),v("listIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n&&(u.ios=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},setOutputValues:async(t,r,n,a={})=>{v("setOutputValues","cell",t),v("setOutputValues","controller",r),v("setOutputValues","iOValue",n);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},streamIOValues:async(t,r,n,a={})=>{v("streamIOValues","cell",t),v("streamIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n&&(u.ios=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},waitForIOEvent:async(t,r,n,a,s,o,i,l={})=>{v("waitForIOEvent","cell",t),v("waitForIOEvent","controller",r),v("waitForIOEvent","io",n),v("waitForIOEvent","comparisonType",a);const c="/cells/{cell}/controllers/{controller}/ios/wait-for".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),u=new URL(c,j);let d;e&&(d=e.baseOptions);const h={method:"GET",...d,...l},p={},m={};k(h,e),await L(p,e),n!==void 0&&(m.io=n),a!==void 0&&(m.comparison_type=a),s!==void 0&&(m.boolean_value=s),o!==void 0&&(m.integer_value=o),i!==void 0&&(m.floating_value=i),U(u,m);let f=d&&d.headers?d.headers:{};return h.headers={...p,...f,...l.headers},{url:D(u),options:h}}}},Sa=function(e){const t=mI(e);return{async listIODescriptions(r,n,a,s){var c,u;const o=await t.listIODescriptions(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerIOsApi.listIODescriptions"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async listIOValues(r,n,a,s){var c,u;const o=await t.listIOValues(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerIOsApi.listIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async setOutputValues(r,n,a,s){var c,u;const o=await t.setOutputValues(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerIOsApi.setOutputValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async streamIOValues(r,n,a,s){var c,u;const o=await t.streamIOValues(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerIOsApi.streamIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async waitForIOEvent(r,n,a,s,o,i,l,c){var p,m;const u=await t.waitForIOEvent(r,n,a,s,o,i,l,c),d=(e==null?void 0:e.serverIndex)??0,h=(m=(p=$["ControllerIOsApi.waitForIOEvent"])==null?void 0:p[d])==null?void 0:m.url;return(f,g)=>N(u,V,M,e)(f,h||g)}}};class gI extends je{listIODescriptions(t,r,n,a){return Sa(this.configuration).listIODescriptions(t,r,n,a).then(s=>s(this.axios,this.basePath))}listIOValues(t,r,n,a){return Sa(this.configuration).listIOValues(t,r,n,a).then(s=>s(this.axios,this.basePath))}setOutputValues(t,r,n,a){return Sa(this.configuration).setOutputValues(t,r,n,a).then(s=>s(this.axios,this.basePath))}streamIOValues(t,r,n,a){return Sa(this.configuration).streamIOValues(t,r,n,a).then(s=>s(this.axios,this.basePath))}waitForIOEvent(t,r,n,a,s,o,i,l){return Sa(this.configuration).waitForIOEvent(t,r,n,a,s,o,i,l).then(c=>c(this.axios,this.basePath))}}const yI=function(e){return{addCoordinateSystem:async(t,r,n={})=>{v("addCoordinateSystem","cell",t),v("addCoordinateSystem","addRequest",r);const a="/cells/{cell}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},deleteCoordinateSystem:async(t,r,n={})=>{v("deleteCoordinateSystem","cell",t),v("deleteCoordinateSystem","coordinateSystem",r);const a="/cells/{cell}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getCoordinateSystem:async(t,r,n,a={})=>{v("getCoordinateSystem","cell",t),v("getCoordinateSystem","coordinateSystem",r);const s="/cells/{cell}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.rotation_type=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},listCoordinateSystems:async(t,r,n={})=>{v("listCoordinateSystems","cell",t);const a="/cells/{cell}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),r!==void 0&&(c.rotation_type=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},transformInCoordinateSystem:async(t,r,n,a={})=>{v("transformInCoordinateSystem","cell",t),v("transformInCoordinateSystem","coordinateSystem",r),v("transformInCoordinateSystem","pose",n);const s="/cells/{cell}/coordinate-systems/{coordinate-system}/transform".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}}}},Oa=function(e){const t=yI(e);return{async addCoordinateSystem(r,n,a){var l,c;const s=await t.addCoordinateSystem(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["CoordinateSystemsApi.addCoordinateSystem"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteCoordinateSystem(r,n,a){var l,c;const s=await t.deleteCoordinateSystem(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["CoordinateSystemsApi.deleteCoordinateSystem"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getCoordinateSystem(r,n,a,s){var c,u;const o=await t.getCoordinateSystem(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["CoordinateSystemsApi.getCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async listCoordinateSystems(r,n,a){var l,c;const s=await t.listCoordinateSystems(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["CoordinateSystemsApi.listCoordinateSystems"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async transformInCoordinateSystem(r,n,a,s){var c,u;const o=await t.transformInCoordinateSystem(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["CoordinateSystemsApi.transformInCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class bI extends je{addCoordinateSystem(t,r,n){return Oa(this.configuration).addCoordinateSystem(t,r,n).then(a=>a(this.axios,this.basePath))}deleteCoordinateSystem(t,r,n){return Oa(this.configuration).deleteCoordinateSystem(t,r,n).then(a=>a(this.axios,this.basePath))}getCoordinateSystem(t,r,n,a){return Oa(this.configuration).getCoordinateSystem(t,r,n,a).then(s=>s(this.axios,this.basePath))}listCoordinateSystems(t,r,n){return Oa(this.configuration).listCoordinateSystems(t,r,n).then(a=>a(this.axios,this.basePath))}transformInCoordinateSystem(t,r,n,a){return Oa(this.configuration).transformInCoordinateSystem(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const vI=function(e){return{clearDevices:async(t,r={})=>{v("clearDevices","cell",t);const n="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"DELETE",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},createDevice:async(t,r,n={})=>{v("createDevice","cell",t),v("createDevice","createDeviceRequestInner",r);const a="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},deleteDevice:async(t,r,n={})=>{v("deleteDevice","cell",t),v("deleteDevice","identifier",r);const a="/cells/{cell}/devices/{identifier}".replace("{cell}",encodeURIComponent(String(t))).replace("{identifier}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getDevice:async(t,r,n={})=>{v("getDevice","cell",t),v("getDevice","identifier",r);const a="/cells/{cell}/devices/{identifier}".replace("{cell}",encodeURIComponent(String(t))).replace("{identifier}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listDevices:async(t,r={})=>{v("listDevices","cell",t);const n="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}}}},wa=function(e){const t=vI(e);return{async clearDevices(r,n){var i,l;const a=await t.clearDevices(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["DeviceConfigurationApi.clearDevices"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async createDevice(r,n,a){var l,c;const s=await t.createDevice(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["DeviceConfigurationApi.createDevice"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteDevice(r,n,a){var l,c;const s=await t.deleteDevice(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["DeviceConfigurationApi.deleteDevice"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getDevice(r,n,a){var l,c;const s=await t.getDevice(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["DeviceConfigurationApi.getDevice"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listDevices(r,n){var i,l;const a=await t.listDevices(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["DeviceConfigurationApi.listDevices"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)}}};class xI extends je{clearDevices(t,r){return wa(this.configuration).clearDevices(t,r).then(n=>n(this.axios,this.basePath))}createDevice(t,r,n){return wa(this.configuration).createDevice(t,r,n).then(a=>a(this.axios,this.basePath))}deleteDevice(t,r,n){return wa(this.configuration).deleteDevice(t,r,n).then(a=>a(this.axios,this.basePath))}getDevice(t,r,n){return wa(this.configuration).getDevice(t,r,n).then(a=>a(this.axios,this.basePath))}listDevices(t,r){return wa(this.configuration).listDevices(t,r).then(n=>n(this.axios,this.basePath))}}const SI=function(e){return{createProgram:async(t,r,n,a={})=>{v("createProgram","cell",t),v("createProgram","body",r);const s="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.name=n),c["Content-Type"]="text/plain",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(r,l,e),{url:D(o),options:l}},deleteProgram:async(t,r,n={})=>{v("deleteProgram","cell",t),v("deleteProgram","program",r);const a="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},deleteProgramList:async(t,r,n={})=>{v("deleteProgramList","cell",t),v("deleteProgramList","programIds",r);const a="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),r&&(c.program_ids=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getProgram:async(t,r,n={})=>{v("getProgram","cell",t),v("getProgram","program",r);const a="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},updateProgram:async(t,r,n,a={})=>{v("updateProgram","cell",t),v("updateProgram","program",r),v("updateProgram","body",n);const s="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="text/plain",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}}}},Ca=function(e){const t=SI(e);return{async createProgram(r,n,a,s){var c,u;const o=await t.createProgram(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["LibraryProgramApi.createProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async deleteProgram(r,n,a){var l,c;const s=await t.deleteProgram(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryProgramApi.deleteProgram"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteProgramList(r,n,a){var l,c;const s=await t.deleteProgramList(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryProgramApi.deleteProgramList"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getProgram(r,n,a){var l,c;const s=await t.getProgram(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryProgramApi.getProgram"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async updateProgram(r,n,a,s){var c,u;const o=await t.updateProgram(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["LibraryProgramApi.updateProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class OI extends je{createProgram(t,r,n,a){return Ca(this.configuration).createProgram(t,r,n,a).then(s=>s(this.axios,this.basePath))}deleteProgram(t,r,n){return Ca(this.configuration).deleteProgram(t,r,n).then(a=>a(this.axios,this.basePath))}deleteProgramList(t,r,n){return Ca(this.configuration).deleteProgramList(t,r,n).then(a=>a(this.axios,this.basePath))}getProgram(t,r,n){return Ca(this.configuration).getProgram(t,r,n).then(a=>a(this.axios,this.basePath))}updateProgram(t,r,n,a){return Ca(this.configuration).updateProgram(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const wI=function(e){return{getProgramMetadata:async(t,r,n={})=>{v("getProgramMetadata","cell",t),v("getProgramMetadata","program",r);const a="/cells/{cell}/store/programs/{program}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listProgramMetadata:async(t,r,n={})=>{v("listProgramMetadata","cell",t);const a="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),r!==void 0&&(c.show_hidden=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},updateProgramMetadata:async(t,r,n,a={})=>{v("updateProgramMetadata","cell",t),v("updateProgramMetadata","program",r),v("updateProgramMetadata","updateProgramMetadataRequest",n);const s="/cells/{cell}/store/programs/{program}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},uploadProgramMetadataImage:async(t,r,n,a={})=>{v("uploadProgramMetadataImage","cell",t),v("uploadProgramMetadataImage","program",r),v("uploadProgramMetadataImage","file",n);const s="/cells/{cell}/store/programs/{program}/metadata/image".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={},d=new(e&&e.formDataCtor||FormData);k(l,e),await L(c,e),n!==void 0&&d.append("file",n),c["Content-Type"]="multipart/form-data",U(o,u);let h=i&&i.headers?i.headers:{};return l.headers={...c,...h,...a.headers},l.data=d,{url:D(o),options:l}}}},Ts=function(e){const t=wI(e);return{async getProgramMetadata(r,n,a){var l,c;const s=await t.getProgramMetadata(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryProgramMetadataApi.getProgramMetadata"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listProgramMetadata(r,n,a){var l,c;const s=await t.listProgramMetadata(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryProgramMetadataApi.listProgramMetadata"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async updateProgramMetadata(r,n,a,s){var c,u;const o=await t.updateProgramMetadata(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["LibraryProgramMetadataApi.updateProgramMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async uploadProgramMetadataImage(r,n,a,s){var c,u;const o=await t.uploadProgramMetadataImage(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["LibraryProgramMetadataApi.uploadProgramMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class CI extends je{getProgramMetadata(t,r,n){return Ts(this.configuration).getProgramMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramMetadata(t,r,n){return Ts(this.configuration).listProgramMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}updateProgramMetadata(t,r,n,a){return Ts(this.configuration).updateProgramMetadata(t,r,n,a).then(s=>s(this.axios,this.basePath))}uploadProgramMetadataImage(t,r,n,a){return Ts(this.configuration).uploadProgramMetadataImage(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const PI=function(e){return{createRecipe:async(t,r,n,a,s={})=>{v("createRecipe","cell",t),v("createRecipe","programId",r),v("createRecipe","body",n);const o="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"POST",...l,...s},u={},d={};k(c,e),await L(u,e),r!==void 0&&(d.program_id=r),a!==void 0&&(d.name=a),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=fe(n,c,e),{url:D(i),options:c}},deleteRecipe:async(t,r,n={})=>{v("deleteRecipe","cell",t),v("deleteRecipe","recipe",r);const a="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},deleteRecipeList:async(t,r,n={})=>{v("deleteRecipeList","cell",t),v("deleteRecipeList","recipeIds",r);const a="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),r&&(c.recipe_ids=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getRecipe:async(t,r,n={})=>{v("getRecipe","cell",t),v("getRecipe","recipe",r);const a="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},updateRecipe:async(t,r,n,a={})=>{v("updateRecipe","cell",t),v("updateRecipe","recipe",r),v("updateRecipe","body",n);const s="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}}}},Pa=function(e){const t=PI(e);return{async createRecipe(r,n,a,s,o){var u,d;const i=await t.createRecipe(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["LibraryRecipeApi.createRecipe"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)},async deleteRecipe(r,n,a){var l,c;const s=await t.deleteRecipe(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryRecipeApi.deleteRecipe"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteRecipeList(r,n,a){var l,c;const s=await t.deleteRecipeList(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryRecipeApi.deleteRecipeList"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getRecipe(r,n,a){var l,c;const s=await t.getRecipe(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryRecipeApi.getRecipe"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async updateRecipe(r,n,a,s){var c,u;const o=await t.updateRecipe(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["LibraryRecipeApi.updateRecipe"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class RI extends je{createRecipe(t,r,n,a,s){return Pa(this.configuration).createRecipe(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}deleteRecipe(t,r,n){return Pa(this.configuration).deleteRecipe(t,r,n).then(a=>a(this.axios,this.basePath))}deleteRecipeList(t,r,n){return Pa(this.configuration).deleteRecipeList(t,r,n).then(a=>a(this.axios,this.basePath))}getRecipe(t,r,n){return Pa(this.configuration).getRecipe(t,r,n).then(a=>a(this.axios,this.basePath))}updateRecipe(t,r,n,a){return Pa(this.configuration).updateRecipe(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const TI=function(e){return{getRecipeMetadata:async(t,r,n={})=>{v("getRecipeMetadata","cell",t),v("getRecipeMetadata","recipe",r);const a="/cells/{cell}/store/recipes/{recipe}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listRecipeMetadata:async(t,r={})=>{v("listRecipeMetadata","cell",t);const n="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},updateRecipeMetadata:async(t,r,n,a={})=>{v("updateRecipeMetadata","cell",t),v("updateRecipeMetadata","recipe",r),v("updateRecipeMetadata","updateRecipeMetadataRequest",n);const s="/cells/{cell}/store/recipes/{recipe}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},uploadRecipeMetadataImage:async(t,r,n,a={})=>{v("uploadRecipeMetadataImage","cell",t),v("uploadRecipeMetadataImage","recipe",r),v("uploadRecipeMetadataImage","file",n);const s="/cells/{cell}/store/recipes/{recipe}/metadata/image".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={},d=new(e&&e.formDataCtor||FormData);k(l,e),await L(c,e),n!==void 0&&d.append("file",n),c["Content-Type"]="multipart/form-data",U(o,u);let h=i&&i.headers?i.headers:{};return l.headers={...c,...h,...a.headers},l.data=d,{url:D(o),options:l}}}},As=function(e){const t=TI(e);return{async getRecipeMetadata(r,n,a){var l,c;const s=await t.getRecipeMetadata(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["LibraryRecipeMetadataApi.getRecipeMetadata"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listRecipeMetadata(r,n){var i,l;const a=await t.listRecipeMetadata(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["LibraryRecipeMetadataApi.listRecipeMetadata"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async updateRecipeMetadata(r,n,a,s){var c,u;const o=await t.updateRecipeMetadata(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["LibraryRecipeMetadataApi.updateRecipeMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async uploadRecipeMetadataImage(r,n,a,s){var c,u;const o=await t.uploadRecipeMetadataImage(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["LibraryRecipeMetadataApi.uploadRecipeMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class AI extends je{getRecipeMetadata(t,r,n){return As(this.configuration).getRecipeMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listRecipeMetadata(t,r){return As(this.configuration).listRecipeMetadata(t,r).then(n=>n(this.axios,this.basePath))}updateRecipeMetadata(t,r,n,a){return As(this.configuration).updateRecipeMetadata(t,r,n,a).then(s=>s(this.axios,this.basePath))}uploadRecipeMetadataImage(t,r,n,a){return As(this.configuration).uploadRecipeMetadataImage(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const VI=function(e){return{deleteAllMotions:async(t,r={})=>{v("deleteAllMotions","cell",t);const n="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"DELETE",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},deleteMotion:async(t,r,n={})=>{v("deleteMotion","cell",t),v("deleteMotion","motion",r);const a="/cells/{cell}/motions/{motion}/delete".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},executeTrajectory:async(t,r,n={})=>{v("executeTrajectory","cell",t),v("executeTrajectory","executeTrajectoryRequest",r);const a="/cells/{cell}/motions/executetrajectory".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},getMotionTrajectory:async(t,r,n,a,s={})=>{v("getMotionTrajectory","cell",t),v("getMotionTrajectory","motion",r),v("getMotionTrajectory","sampleTime",n);const o="/cells/{cell}/motions/{motion}/trajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};k(c,e),await L(u,e),n!==void 0&&(d.sample_time=n),a!==void 0&&(d.responses_coordinate_system=a),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:D(i),options:c}},getMotionTrajectorySample:async(t,r,n,a,s={})=>{v("getMotionTrajectorySample","cell",t),v("getMotionTrajectorySample","motion",r);const o="/cells/{cell}/motions/{motion}/trajectorysample".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};k(c,e),await L(u,e),n!==void 0&&(d.location_on_trajectory=n),a!==void 0&&(d.response_coordinate_system=a),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:D(i),options:c}},getPlannedMotion:async(t,r,n,a={})=>{v("getPlannedMotion","cell",t),v("getPlannedMotion","motion",r);const s="/cells/{cell}/motions/{motion}/planned-motion".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.sample_time=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},getPlanningMotionGroupModels:async(t,r={})=>{v("getPlanningMotionGroupModels","cell",t);const n="/cells/{cell}/motion-planning/motion-group-models".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},listMotions:async(t,r={})=>{v("listMotions","cell",t);const n="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},loadPlannedMotion:async(t,r,n={})=>{v("loadPlannedMotion","cell",t),v("loadPlannedMotion","plannedMotion",r);const a="/cells/{cell}/planned-motions".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},planCollisionFreePTP:async(t,r,n={})=>{v("planCollisionFreePTP","cell",t);const a="/cells/{cell}/motion-planning/plan-collision-free-ptp".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},planMotion:async(t,r,n={})=>{v("planMotion","cell",t),v("planMotion","planRequest",r);const a="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},planTrajectory:async(t,r,n={})=>{v("planTrajectory","cell",t);const a="/cells/{cell}/motion-planning/plan-trajectory".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},stopExecution:async(t,r,n={})=>{v("stopExecution","cell",t),v("stopExecution","motion",r);const a="/cells/{cell}/motions/{motion}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},streamMove:async(t,r,n={})=>{v("streamMove","cell",t),v("streamMove","streamMoveRequest",r);const a="/cells/{cell}/motions/streammove".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},streamMoveBackward:async(t,r,n,a,s,o,i={})=>{v("streamMoveBackward","cell",t),v("streamMoveBackward","motion",r),v("streamMoveBackward","playbackSpeedInPercent",n);const l="/cells/{cell}/motions/{motion}/executebackward".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),c=new URL(l,j);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};k(d,e),await L(h,e),n!==void 0&&(p.playback_speed_in_percent=n),a!==void 0&&(p.response_rate=a),s!==void 0&&(p.response_coordinate_system=s),o!==void 0&&(p.start_location_on_trajectory=o),U(c,p);let m=u&&u.headers?u.headers:{};return d.headers={...h,...m,...i.headers},{url:D(c),options:d}},streamMoveForward:async(t,r,n,a,s,o,i={})=>{v("streamMoveForward","cell",t),v("streamMoveForward","motion",r),v("streamMoveForward","playbackSpeedInPercent",n);const l="/cells/{cell}/motions/{motion}/executeforward".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),c=new URL(l,j);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};k(d,e),await L(h,e),n!==void 0&&(p.playback_speed_in_percent=n),a!==void 0&&(p.response_rate=a),s!==void 0&&(p.response_coordinate_system=s),o!==void 0&&(p.start_location_on_trajectory=o),U(c,p);let m=u&&u.headers?u.headers:{};return d.headers={...h,...m,...i.headers},{url:D(c),options:d}},streamMoveToTrajectoryViaJointPTP:async(t,r,n,a,s,o,i,l,c,u,d={})=>{v("streamMoveToTrajectoryViaJointPTP","cell",t),v("streamMoveToTrajectoryViaJointPTP","motion",r),v("streamMoveToTrajectoryViaJointPTP","locationOnTrajectory",n);const h="/cells/{cell}/motions/{motion}/executetotrajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),p=new URL(h,j);let m;e&&(m=e.baseOptions);const f={method:"GET",...m,...d},g={},S={};k(f,e),await L(g,e),n!==void 0&&(S.location_on_trajectory=n),a&&(S["limit_override.joint_velocity_limits.joints"]=a),s&&(S["limit_override.joint_acceleration_limits.joints"]=s),o!==void 0&&(S["limit_override.tcp_velocity_limit"]=o),i!==void 0&&(S["limit_override.tcp_acceleration_limit"]=i),l!==void 0&&(S["limit_override.tcp_orientation_velocity_limit"]=l),c!==void 0&&(S["limit_override.tcp_orientation_acceleration_limit"]=c),u!==void 0&&(S.responses_coordinate_system=u),U(p,S);let T=m&&m.headers?m.headers:{};return f.headers={...g,...T,...d.headers},{url:D(p),options:f}}}},st=function(e){const t=VI(e);return{async deleteAllMotions(r,n){var i,l;const a=await t.deleteAllMotions(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["MotionApi.deleteAllMotions"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async deleteMotion(r,n,a){var l,c;const s=await t.deleteMotion(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionApi.deleteMotion"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async executeTrajectory(r,n,a){var l,c;const s=await t.executeTrajectory(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionApi.executeTrajectory"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getMotionTrajectory(r,n,a,s,o){var u,d;const i=await t.getMotionTrajectory(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["MotionApi.getMotionTrajectory"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)},async getMotionTrajectorySample(r,n,a,s,o){var u,d;const i=await t.getMotionTrajectorySample(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["MotionApi.getMotionTrajectorySample"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)},async getPlannedMotion(r,n,a,s){var c,u;const o=await t.getPlannedMotion(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["MotionApi.getPlannedMotion"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async getPlanningMotionGroupModels(r,n){var i,l;const a=await t.getPlanningMotionGroupModels(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["MotionApi.getPlanningMotionGroupModels"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async listMotions(r,n){var i,l;const a=await t.listMotions(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["MotionApi.listMotions"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async loadPlannedMotion(r,n,a){var l,c;const s=await t.loadPlannedMotion(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionApi.loadPlannedMotion"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async planCollisionFreePTP(r,n,a){var l,c;const s=await t.planCollisionFreePTP(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionApi.planCollisionFreePTP"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async planMotion(r,n,a){var l,c;const s=await t.planMotion(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionApi.planMotion"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async planTrajectory(r,n,a){var l,c;const s=await t.planTrajectory(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionApi.planTrajectory"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async stopExecution(r,n,a){var l,c;const s=await t.stopExecution(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionApi.stopExecution"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async streamMove(r,n,a){var l,c;const s=await t.streamMove(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionApi.streamMove"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async streamMoveBackward(r,n,a,s,o,i,l){var h,p;const c=await t.streamMoveBackward(r,n,a,s,o,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=$["MotionApi.streamMoveBackward"])==null?void 0:h[u])==null?void 0:p.url;return(m,f)=>N(c,V,M,e)(m,d||f)},async streamMoveForward(r,n,a,s,o,i,l){var h,p;const c=await t.streamMoveForward(r,n,a,s,o,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=$["MotionApi.streamMoveForward"])==null?void 0:h[u])==null?void 0:p.url;return(m,f)=>N(c,V,M,e)(m,d||f)},async streamMoveToTrajectoryViaJointPTP(r,n,a,s,o,i,l,c,u,d,h){var g,S;const p=await t.streamMoveToTrajectoryViaJointPTP(r,n,a,s,o,i,l,c,u,d,h),m=(e==null?void 0:e.serverIndex)??0,f=(S=(g=$["MotionApi.streamMoveToTrajectoryViaJointPTP"])==null?void 0:g[m])==null?void 0:S.url;return(T,O)=>N(p,V,M,e)(T,f||O)}}};class EI extends je{deleteAllMotions(t,r){return st(this.configuration).deleteAllMotions(t,r).then(n=>n(this.axios,this.basePath))}deleteMotion(t,r,n){return st(this.configuration).deleteMotion(t,r,n).then(a=>a(this.axios,this.basePath))}executeTrajectory(t,r,n){return st(this.configuration).executeTrajectory(t,r,n).then(a=>a(this.axios,this.basePath))}getMotionTrajectory(t,r,n,a,s){return st(this.configuration).getMotionTrajectory(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}getMotionTrajectorySample(t,r,n,a,s){return st(this.configuration).getMotionTrajectorySample(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}getPlannedMotion(t,r,n,a){return st(this.configuration).getPlannedMotion(t,r,n,a).then(s=>s(this.axios,this.basePath))}getPlanningMotionGroupModels(t,r){return st(this.configuration).getPlanningMotionGroupModels(t,r).then(n=>n(this.axios,this.basePath))}listMotions(t,r){return st(this.configuration).listMotions(t,r).then(n=>n(this.axios,this.basePath))}loadPlannedMotion(t,r,n){return st(this.configuration).loadPlannedMotion(t,r,n).then(a=>a(this.axios,this.basePath))}planCollisionFreePTP(t,r,n){return st(this.configuration).planCollisionFreePTP(t,r,n).then(a=>a(this.axios,this.basePath))}planMotion(t,r,n){return st(this.configuration).planMotion(t,r,n).then(a=>a(this.axios,this.basePath))}planTrajectory(t,r,n){return st(this.configuration).planTrajectory(t,r,n).then(a=>a(this.axios,this.basePath))}stopExecution(t,r,n){return st(this.configuration).stopExecution(t,r,n).then(a=>a(this.axios,this.basePath))}streamMove(t,r,n){return st(this.configuration).streamMove(t,r,n).then(a=>a(this.axios,this.basePath))}streamMoveBackward(t,r,n,a,s,o,i){return st(this.configuration).streamMoveBackward(t,r,n,a,s,o,i).then(l=>l(this.axios,this.basePath))}streamMoveForward(t,r,n,a,s,o,i){return st(this.configuration).streamMoveForward(t,r,n,a,s,o,i).then(l=>l(this.axios,this.basePath))}streamMoveToTrajectoryViaJointPTP(t,r,n,a,s,o,i,l,c,u,d){return st(this.configuration).streamMoveToTrajectoryViaJointPTP(t,r,n,a,s,o,i,l,c,u,d).then(h=>h(this.axios,this.basePath))}}const _I=function(e){return{activateAllMotionGroups:async(t,r,n={})=>{v("activateAllMotionGroups","cell",t),v("activateAllMotionGroups","controller",r);const a="/cells/{cell}/motion-groups/all".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),r!==void 0&&(c.controller=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},activateMotionGroup:async(t,r,n={})=>{v("activateMotionGroup","cell",t),v("activateMotionGroup","motionGroup",r);const a="/cells/{cell}/motion-groups".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),r!==void 0&&(c.motion_group=r),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},deactivateMotionGroup:async(t,r,n={})=>{v("deactivateMotionGroup","cell",t),v("deactivateMotionGroup","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listMotionGroups:async(t,r={})=>{v("listMotionGroups","cell",t);const n="/cells/{cell}/motion-groups".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}}}},Vs=function(e){const t=_I(e);return{async activateAllMotionGroups(r,n,a){var l,c;const s=await t.activateAllMotionGroups(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupApi.activateAllMotionGroups"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async activateMotionGroup(r,n,a){var l,c;const s=await t.activateMotionGroup(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupApi.activateMotionGroup"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deactivateMotionGroup(r,n,a){var l,c;const s=await t.deactivateMotionGroup(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupApi.deactivateMotionGroup"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listMotionGroups(r,n){var i,l;const a=await t.listMotionGroups(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["MotionGroupApi.listMotionGroups"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)}}};class II extends je{activateAllMotionGroups(t,r,n){return Vs(this.configuration).activateAllMotionGroups(t,r,n).then(a=>a(this.axios,this.basePath))}activateMotionGroup(t,r,n){return Vs(this.configuration).activateMotionGroup(t,r,n).then(a=>a(this.axios,this.basePath))}deactivateMotionGroup(t,r,n){return Vs(this.configuration).deactivateMotionGroup(t,r,n).then(a=>a(this.axios,this.basePath))}listMotionGroups(t,r){return Vs(this.configuration).listMotionGroups(t,r).then(n=>n(this.axios,this.basePath))}}const MI=function(e){return{getActivePayload:async(t,r,n={})=>{v("getActivePayload","cell",t),v("getActivePayload","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/payloads/current".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getActiveTcp:async(t,r,n,a={})=>{v("getActiveTcp","cell",t),v("getActiveTcp","motionGroup",r);const s="/cells/{cell}/motion-groups/{motion-group}/tcps/current".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.rotation_type=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},getCurrentMotionGroupState:async(t,r,n,a,s={})=>{v("getCurrentMotionGroupState","cell",t),v("getCurrentMotionGroupState","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};k(c,e),await L(u,e),n!==void 0&&(d.tcp=n),a!==void 0&&(d.response_coordinate_system=a),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:D(i),options:c}},getInfoCapabilities:async(t,r,n={})=>{v("getInfoCapabilities","cell",t),v("getInfoCapabilities","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/info-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getMotionGroupSpecification:async(t,r,n={})=>{v("getMotionGroupSpecification","cell",t),v("getMotionGroupSpecification","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/specification".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getMounting:async(t,r,n={})=>{v("getMounting","cell",t),v("getMounting","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getOptimizerConfiguration:async(t,r,n,a={})=>{v("getOptimizerConfiguration","cell",t),v("getOptimizerConfiguration","motionGroup",r);const s="/cells/{cell}/motion-groups/{motion-group}/optimizer-setup".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.tcp=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},getSafetySetup:async(t,r,n={})=>{v("getSafetySetup","cell",t),v("getSafetySetup","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/safety-setup".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listPayloads:async(t,r,n={})=>{v("listPayloads","cell",t),v("listPayloads","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/payloads".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listTcps:async(t,r,n,a={})=>{v("listTcps","cell",t),v("listTcps","motionGroup",r);const s="/cells/{cell}/motion-groups/{motion-group}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.rotation_type=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},streamMotionGroupState:async(t,r,n,a,s,o={})=>{v("streamMotionGroupState","cell",t),v("streamMotionGroupState","motionGroup",r);const i="/cells/{cell}/motion-groups/{motion-group}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),l=new URL(i,j);let c;e&&(c=e.baseOptions);const u={method:"GET",...c,...o},d={},h={};k(u,e),await L(d,e),n!==void 0&&(h.response_rate=n),a!==void 0&&(h.response_coordinate_system=a),s!==void 0&&(h.tcp=s),U(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...o.headers},{url:D(l),options:u}}}},jt=function(e){const t=MI(e);return{async getActivePayload(r,n,a){var l,c;const s=await t.getActivePayload(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupInfosApi.getActivePayload"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getActiveTcp(r,n,a,s){var c,u;const o=await t.getActiveTcp(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["MotionGroupInfosApi.getActiveTcp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async getCurrentMotionGroupState(r,n,a,s,o){var u,d;const i=await t.getCurrentMotionGroupState(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["MotionGroupInfosApi.getCurrentMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)},async getInfoCapabilities(r,n,a){var l,c;const s=await t.getInfoCapabilities(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupInfosApi.getInfoCapabilities"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getMotionGroupSpecification(r,n,a){var l,c;const s=await t.getMotionGroupSpecification(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupInfosApi.getMotionGroupSpecification"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getMounting(r,n,a){var l,c;const s=await t.getMounting(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupInfosApi.getMounting"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getOptimizerConfiguration(r,n,a,s){var c,u;const o=await t.getOptimizerConfiguration(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["MotionGroupInfosApi.getOptimizerConfiguration"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async getSafetySetup(r,n,a){var l,c;const s=await t.getSafetySetup(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupInfosApi.getSafetySetup"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listPayloads(r,n,a){var l,c;const s=await t.listPayloads(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupInfosApi.listPayloads"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listTcps(r,n,a,s){var c,u;const o=await t.listTcps(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["MotionGroupInfosApi.listTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async streamMotionGroupState(r,n,a,s,o,i){var d,h;const l=await t.streamMotionGroupState(r,n,a,s,o,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=$["MotionGroupInfosApi.streamMotionGroupState"])==null?void 0:d[c])==null?void 0:h.url;return(p,m)=>N(l,V,M,e)(p,u||m)}}};class $I extends je{getActivePayload(t,r,n){return jt(this.configuration).getActivePayload(t,r,n).then(a=>a(this.axios,this.basePath))}getActiveTcp(t,r,n,a){return jt(this.configuration).getActiveTcp(t,r,n,a).then(s=>s(this.axios,this.basePath))}getCurrentMotionGroupState(t,r,n,a,s){return jt(this.configuration).getCurrentMotionGroupState(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}getInfoCapabilities(t,r,n){return jt(this.configuration).getInfoCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}getMotionGroupSpecification(t,r,n){return jt(this.configuration).getMotionGroupSpecification(t,r,n).then(a=>a(this.axios,this.basePath))}getMounting(t,r,n){return jt(this.configuration).getMounting(t,r,n).then(a=>a(this.axios,this.basePath))}getOptimizerConfiguration(t,r,n,a){return jt(this.configuration).getOptimizerConfiguration(t,r,n,a).then(s=>s(this.axios,this.basePath))}getSafetySetup(t,r,n){return jt(this.configuration).getSafetySetup(t,r,n).then(a=>a(this.axios,this.basePath))}listPayloads(t,r,n){return jt(this.configuration).listPayloads(t,r,n).then(a=>a(this.axios,this.basePath))}listTcps(t,r,n,a){return jt(this.configuration).listTcps(t,r,n,a).then(s=>s(this.axios,this.basePath))}streamMotionGroupState(t,r,n,a,s,o){return jt(this.configuration).streamMotionGroupState(t,r,n,a,s,o).then(i=>i(this.axios,this.basePath))}}const jI=function(e){return{directionJogging:async(t,r,n={})=>{v("directionJogging","cell",t),v("directionJogging","directionJoggingRequest",r);const a="/cells/{cell}/motion-groups/move-tcp".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},getJoggingCapabilities:async(t,r,n={})=>{v("getJoggingCapabilities","cell",t),v("getJoggingCapabilities","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/jogging-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},jointJogging:async(t,r,n={})=>{v("jointJogging","cell",t),v("jointJogging","jointJoggingRequest",r);const a="/cells/{cell}/motion-groups/move-joint".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},stopJogging:async(t,r,n={})=>{v("stopJogging","cell",t),v("stopJogging","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}}}},Es=function(e){const t=jI(e);return{async directionJogging(r,n,a){var l,c;const s=await t.directionJogging(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupJoggingApi.directionJogging"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getJoggingCapabilities(r,n,a){var l,c;const s=await t.getJoggingCapabilities(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupJoggingApi.getJoggingCapabilities"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async jointJogging(r,n,a){var l,c;const s=await t.jointJogging(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupJoggingApi.jointJogging"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async stopJogging(r,n,a){var l,c;const s=await t.stopJogging(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupJoggingApi.stopJogging"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)}}};class kI extends je{directionJogging(t,r,n){return Es(this.configuration).directionJogging(t,r,n).then(a=>a(this.axios,this.basePath))}getJoggingCapabilities(t,r,n){return Es(this.configuration).getJoggingCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}jointJogging(t,r,n){return Es(this.configuration).jointJogging(t,r,n).then(a=>a(this.axios,this.basePath))}stopJogging(t,r,n){return Es(this.configuration).stopJogging(t,r,n).then(a=>a(this.axios,this.basePath))}}const LI=function(e){return{calculateAllInverseKinematic:async(t,r,n,a={})=>{v("calculateAllInverseKinematic","cell",t),v("calculateAllInverseKinematic","motionGroup",r),v("calculateAllInverseKinematic","allJointPositionsRequest",n);const s="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-all-joint-positions".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},calculateForwardKinematic:async(t,r,n,a={})=>{v("calculateForwardKinematic","cell",t),v("calculateForwardKinematic","motionGroup",r),v("calculateForwardKinematic","tcpPoseRequest",n);const s="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-tcp-pose".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},calculateInverseKinematic:async(t,r,n,a={})=>{v("calculateInverseKinematic","cell",t),v("calculateInverseKinematic","motionGroup",r),v("calculateInverseKinematic","jointPositionRequest",n);const s="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-joint-position".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},getKinematicCapabilities:async(t,r,n={})=>{v("getKinematicCapabilities","cell",t),v("getKinematicCapabilities","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/kinematic-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}}}},_s=function(e){const t=LI(e);return{async calculateAllInverseKinematic(r,n,a,s){var c,u;const o=await t.calculateAllInverseKinematic(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["MotionGroupKinematicApi.calculateAllInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async calculateForwardKinematic(r,n,a,s){var c,u;const o=await t.calculateForwardKinematic(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["MotionGroupKinematicApi.calculateForwardKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async calculateInverseKinematic(r,n,a,s){var c,u;const o=await t.calculateInverseKinematic(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["MotionGroupKinematicApi.calculateInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async getKinematicCapabilities(r,n,a){var l,c;const s=await t.getKinematicCapabilities(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["MotionGroupKinematicApi.getKinematicCapabilities"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)}}};class UI extends je{calculateAllInverseKinematic(t,r,n,a){return _s(this.configuration).calculateAllInverseKinematic(t,r,n,a).then(s=>s(this.axios,this.basePath))}calculateForwardKinematic(t,r,n,a){return _s(this.configuration).calculateForwardKinematic(t,r,n,a).then(s=>s(this.axios,this.basePath))}calculateInverseKinematic(t,r,n,a){return _s(this.configuration).calculateInverseKinematic(t,r,n,a).then(s=>s(this.axios,this.basePath))}getKinematicCapabilities(t,r,n){return _s(this.configuration).getKinematicCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}}const DI=function(e){return{createProgramRunner:async(t,r,n={})=>{v("createProgramRunner","cell",t),v("createProgramRunner","request",r);const a="/cells/{cell}/programs/runners".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="text/plain",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},executeProgram:async(t,r,n={})=>{v("executeProgram","cell",t),v("executeProgram","codeWithArguments",r);const a="/cells/{cell}/programs/execute".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},getProgramRunner:async(t,r,n={})=>{v("getProgramRunner","cell",t),v("getProgramRunner","runner",r);const a="/cells/{cell}/programs/runners/{runner}".replace("{cell}",encodeURIComponent(String(t))).replace("{runner}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listProgramRunners:async(t,r={})=>{v("listProgramRunners","cell",t);const n="/cells/{cell}/programs/runners".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},migrateProgram:async(t,r,n={})=>{v("migrateProgram","cell",t),v("migrateProgram","request1",r);const a="/cells/{cell}/programs/migrate".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="text/plain",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},planProgram:async(t,r,n,a={})=>{v("planProgram","cell",t),v("planProgram","request",r);const s="/cells/{cell}/programs/plan".replace("{cell}",encodeURIComponent(String(t))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.identifier=n),c["Content-Type"]="text/plain",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(r,l,e),{url:D(o),options:l}},stopAllProgramRunner:async(t,r={})=>{v("stopAllProgramRunner","cell",t);const n="/cells/{cell}/programs/runners/stop".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"POST",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},stopProgramRunner:async(t,r,n={})=>{v("stopProgramRunner","cell",t),v("stopProgramRunner","runner",r);const a="/cells/{cell}/programs/runners/{runner}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{runner}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}}}},vr=function(e){const t=DI(e);return{async createProgramRunner(r,n,a){var l,c;const s=await t.createProgramRunner(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ProgramApi.createProgramRunner"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async executeProgram(r,n,a){var l,c;const s=await t.executeProgram(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ProgramApi.executeProgram"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getProgramRunner(r,n,a){var l,c;const s=await t.getProgramRunner(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ProgramApi.getProgramRunner"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listProgramRunners(r,n){var i,l;const a=await t.listProgramRunners(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["ProgramApi.listProgramRunners"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async migrateProgram(r,n,a){var l,c;const s=await t.migrateProgram(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ProgramApi.migrateProgram"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async planProgram(r,n,a,s){var c,u;const o=await t.planProgram(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ProgramApi.planProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async stopAllProgramRunner(r,n){var i,l;const a=await t.stopAllProgramRunner(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["ProgramApi.stopAllProgramRunner"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async stopProgramRunner(r,n,a){var l,c;const s=await t.stopProgramRunner(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ProgramApi.stopProgramRunner"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)}}};class NI extends je{createProgramRunner(t,r,n){return vr(this.configuration).createProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}executeProgram(t,r,n){return vr(this.configuration).executeProgram(t,r,n).then(a=>a(this.axios,this.basePath))}getProgramRunner(t,r,n){return vr(this.configuration).getProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramRunners(t,r){return vr(this.configuration).listProgramRunners(t,r).then(n=>n(this.axios,this.basePath))}migrateProgram(t,r,n){return vr(this.configuration).migrateProgram(t,r,n).then(a=>a(this.axios,this.basePath))}planProgram(t,r,n,a){return vr(this.configuration).planProgram(t,r,n,a).then(s=>s(this.axios,this.basePath))}stopAllProgramRunner(t,r){return vr(this.configuration).stopAllProgramRunner(t,r).then(n=>n(this.axios,this.basePath))}stopProgramRunner(t,r,n){return vr(this.configuration).stopProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}}const FI=function(e){return{clearProgramsValues:async(t,r={})=>{v("clearProgramsValues","cell",t);const n="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"DELETE",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},createProgramsValue:async(t,r,n={})=>{v("createProgramsValue","cell",t),v("createProgramsValue","requestBody",r);const a="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...n},l={},c={};k(i,e),await L(l,e),l["Content-Type"]="application/json",U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},i.data=fe(r,i,e),{url:D(s),options:i}},deleteProgramValue:async(t,r,n={})=>{v("deleteProgramValue","cell",t),v("deleteProgramValue","key",r);const a="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getProgramValue:async(t,r,n={})=>{v("getProgramValue","cell",t),v("getProgramValue","key",r);const a="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listProgramsValues:async(t,r={})=>{v("listProgramsValues","cell",t);const n="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},updateProgramValue:async(t,r,n,a={})=>{v("updateProgramValue","cell",t),v("updateProgramValue","key",r),v("updateProgramValue","value",n);const s="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}}}},Cn=function(e){const t=FI(e);return{async clearProgramsValues(r,n){var i,l;const a=await t.clearProgramsValues(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["ProgramValuesApi.clearProgramsValues"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async createProgramsValue(r,n,a){var l,c;const s=await t.createProgramsValue(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ProgramValuesApi.createProgramsValue"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteProgramValue(r,n,a){var l,c;const s=await t.deleteProgramValue(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ProgramValuesApi.deleteProgramValue"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getProgramValue(r,n,a){var l,c;const s=await t.getProgramValue(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ProgramValuesApi.getProgramValue"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listProgramsValues(r,n){var i,l;const a=await t.listProgramsValues(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["ProgramValuesApi.listProgramsValues"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async updateProgramValue(r,n,a,s){var c,u;const o=await t.updateProgramValue(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ProgramValuesApi.updateProgramValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class BI extends je{clearProgramsValues(t,r){return Cn(this.configuration).clearProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}createProgramsValue(t,r,n){return Cn(this.configuration).createProgramsValue(t,r,n).then(a=>a(this.axios,this.basePath))}deleteProgramValue(t,r,n){return Cn(this.configuration).deleteProgramValue(t,r,n).then(a=>a(this.axios,this.basePath))}getProgramValue(t,r,n){return Cn(this.configuration).getProgramValue(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramsValues(t,r){return Cn(this.configuration).listProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}updateProgramValue(t,r,n,a){return Cn(this.configuration).updateProgramValue(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const zI=function(e){return{deleteStoredCollider:async(t,r,n={})=>{v("deleteStoredCollider","cell",t),v("deleteStoredCollider","collider",r);const a="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},deleteStoredCollisionLinkChain:async(t,r,n={})=>{v("deleteStoredCollisionLinkChain","cell",t),v("deleteStoredCollisionLinkChain","linkChain",r);const a="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},deleteStoredCollisionTool:async(t,r,n={})=>{v("deleteStoredCollisionTool","cell",t),v("deleteStoredCollisionTool","tool",r);const a="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getDefaultLinkChain:async(t,r,n={})=>{v("getDefaultLinkChain","cell",t),v("getDefaultLinkChain","motionGroupModel",r);const a="/cells/{cell}/store/collision/default-link-chains/{motion-group-model}".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group-model}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getStoredCollider:async(t,r,n={})=>{v("getStoredCollider","cell",t),v("getStoredCollider","collider",r);const a="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getStoredCollisionLinkChain:async(t,r,n={})=>{v("getStoredCollisionLinkChain","cell",t),v("getStoredCollisionLinkChain","linkChain",r);const a="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getStoredCollisionTool:async(t,r,n={})=>{v("getStoredCollisionTool","cell",t),v("getStoredCollisionTool","tool",r);const a="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listCollisionLinkChains:async(t,r={})=>{v("listCollisionLinkChains","cell",t);const n="/cells/{cell}/store/collision/link-chains".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},listStoredColliders:async(t,r={})=>{v("listStoredColliders","cell",t);const n="/cells/{cell}/store/collision/colliders".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},listStoredCollisionTools:async(t,r={})=>{v("listStoredCollisionTools","cell",t);const n="/cells/{cell}/store/collision/tools".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},storeCollider:async(t,r,n,a={})=>{v("storeCollider","cell",t),v("storeCollider","collider",r),v("storeCollider","collider2",n);const s="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},storeCollisionLinkChain:async(t,r,n,a={})=>{v("storeCollisionLinkChain","cell",t),v("storeCollisionLinkChain","linkChain",r),v("storeCollisionLinkChain","collider",n);const s="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},storeCollisionTool:async(t,r,n,a={})=>{v("storeCollisionTool","cell",t),v("storeCollisionTool","tool",r),v("storeCollisionTool","requestBody",n);const s="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}}}},Ot=function(e){const t=zI(e);return{async deleteStoredCollider(r,n,a){var l,c;const s=await t.deleteStoredCollider(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.deleteStoredCollider"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteStoredCollisionLinkChain(r,n,a){var l,c;const s=await t.deleteStoredCollisionLinkChain(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.deleteStoredCollisionLinkChain"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async deleteStoredCollisionTool(r,n,a){var l,c;const s=await t.deleteStoredCollisionTool(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.deleteStoredCollisionTool"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getDefaultLinkChain(r,n,a){var l,c;const s=await t.getDefaultLinkChain(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.getDefaultLinkChain"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getStoredCollider(r,n,a){var l,c;const s=await t.getStoredCollider(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.getStoredCollider"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getStoredCollisionLinkChain(r,n,a){var l,c;const s=await t.getStoredCollisionLinkChain(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.getStoredCollisionLinkChain"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getStoredCollisionTool(r,n,a){var l,c;const s=await t.getStoredCollisionTool(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.getStoredCollisionTool"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listCollisionLinkChains(r,n){var i,l;const a=await t.listCollisionLinkChains(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["StoreCollisionComponentsApi.listCollisionLinkChains"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async listStoredColliders(r,n){var i,l;const a=await t.listStoredColliders(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["StoreCollisionComponentsApi.listStoredColliders"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async listStoredCollisionTools(r,n){var i,l;const a=await t.listStoredCollisionTools(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["StoreCollisionComponentsApi.listStoredCollisionTools"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async storeCollider(r,n,a,s){var c,u;const o=await t.storeCollider(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["StoreCollisionComponentsApi.storeCollider"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async storeCollisionLinkChain(r,n,a,s){var c,u;const o=await t.storeCollisionLinkChain(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["StoreCollisionComponentsApi.storeCollisionLinkChain"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async storeCollisionTool(r,n,a,s){var c,u;const o=await t.storeCollisionTool(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["StoreCollisionComponentsApi.storeCollisionTool"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class GI extends je{deleteStoredCollider(t,r,n){return Ot(this.configuration).deleteStoredCollider(t,r,n).then(a=>a(this.axios,this.basePath))}deleteStoredCollisionLinkChain(t,r,n){return Ot(this.configuration).deleteStoredCollisionLinkChain(t,r,n).then(a=>a(this.axios,this.basePath))}deleteStoredCollisionTool(t,r,n){return Ot(this.configuration).deleteStoredCollisionTool(t,r,n).then(a=>a(this.axios,this.basePath))}getDefaultLinkChain(t,r,n){return Ot(this.configuration).getDefaultLinkChain(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollider(t,r,n){return Ot(this.configuration).getStoredCollider(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionLinkChain(t,r,n){return Ot(this.configuration).getStoredCollisionLinkChain(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionTool(t,r,n){return Ot(this.configuration).getStoredCollisionTool(t,r,n).then(a=>a(this.axios,this.basePath))}listCollisionLinkChains(t,r){return Ot(this.configuration).listCollisionLinkChains(t,r).then(n=>n(this.axios,this.basePath))}listStoredColliders(t,r){return Ot(this.configuration).listStoredColliders(t,r).then(n=>n(this.axios,this.basePath))}listStoredCollisionTools(t,r){return Ot(this.configuration).listStoredCollisionTools(t,r).then(n=>n(this.axios,this.basePath))}storeCollider(t,r,n,a){return Ot(this.configuration).storeCollider(t,r,n,a).then(s=>s(this.axios,this.basePath))}storeCollisionLinkChain(t,r,n,a){return Ot(this.configuration).storeCollisionLinkChain(t,r,n,a).then(s=>s(this.axios,this.basePath))}storeCollisionTool(t,r,n,a){return Ot(this.configuration).storeCollisionTool(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const HI=function(e){return{deleteStoredCollisionScene:async(t,r,n={})=>{v("deleteStoredCollisionScene","cell",t),v("deleteStoredCollisionScene","scene",r);const a="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getStoredCollisionScene:async(t,r,n={})=>{v("getStoredCollisionScene","cell",t),v("getStoredCollisionScene","scene",r);const a="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listStoredCollisionScenes:async(t,r={})=>{v("listStoredCollisionScenes","cell",t);const n="/cells/{cell}/store/collision/scenes".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},storeCollisionScene:async(t,r,n,a={})=>{v("storeCollisionScene","cell",t),v("storeCollisionScene","scene",r),v("storeCollisionScene","collisionSceneAssembly",n);const s="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}}}},Is=function(e){const t=HI(e);return{async deleteStoredCollisionScene(r,n,a){var l,c;const s=await t.deleteStoredCollisionScene(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionScenesApi.deleteStoredCollisionScene"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getStoredCollisionScene(r,n,a){var l,c;const s=await t.getStoredCollisionScene(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionScenesApi.getStoredCollisionScene"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listStoredCollisionScenes(r,n){var i,l;const a=await t.listStoredCollisionScenes(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["StoreCollisionScenesApi.listStoredCollisionScenes"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async storeCollisionScene(r,n,a,s){var c,u;const o=await t.storeCollisionScene(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["StoreCollisionScenesApi.storeCollisionScene"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class qI extends je{deleteStoredCollisionScene(t,r,n){return Is(this.configuration).deleteStoredCollisionScene(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionScene(t,r,n){return Is(this.configuration).getStoredCollisionScene(t,r,n).then(a=>a(this.axios,this.basePath))}listStoredCollisionScenes(t,r){return Is(this.configuration).listStoredCollisionScenes(t,r).then(n=>n(this.axios,this.basePath))}storeCollisionScene(t,r,n,a){return Is(this.configuration).storeCollisionScene(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const JI=function(e){return{clearAllObjects:async(t,r={})=>{v("clearAllObjects","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"DELETE",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},deleteObject:async(t,r,n={})=>{v("deleteObject","cell",t),v("deleteObject","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getObject:async(t,r,n={})=>{v("getObject","cell",t),v("getObject","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getObjectMetadata:async(t,r,n={})=>{v("getObjectMetadata","cell",t),v("getObjectMetadata","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"HEAD",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listAllObjectKeys:async(t,r={})=>{v("listAllObjectKeys","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},storeObject:async(t,r,n,a,s={})=>{v("storeObject","cell",t),v("storeObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={},h=new(e&&e.formDataCtor||FormData);k(c,e),await L(u,e),a!==void 0&&h.append("AnyValue",new Blob([JSON.stringify(a)],{type:"application/json"})),u["Content-Type"]="multipart/form-data",n!=null&&(u["X-Metadata"]=typeof n=="string"?n:JSON.stringify(n)),U(i,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...s.headers},c.data=h,{url:D(i),options:c}}}},Pn=function(e){const t=JI(e);return{async clearAllObjects(r,n){var i,l;const a=await t.clearAllObjects(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["StoreObjectApi.clearAllObjects"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async deleteObject(r,n,a){var l,c;const s=await t.deleteObject(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreObjectApi.deleteObject"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getObject(r,n,a){var l,c;const s=await t.getObject(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreObjectApi.getObject"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getObjectMetadata(r,n,a){var l,c;const s=await t.getObjectMetadata(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreObjectApi.getObjectMetadata"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listAllObjectKeys(r,n){var i,l;const a=await t.listAllObjectKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["StoreObjectApi.listAllObjectKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async storeObject(r,n,a,s,o){var u,d;const i=await t.storeObject(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["StoreObjectApi.storeObject"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)}}};class WI extends je{clearAllObjects(t,r){return Pn(this.configuration).clearAllObjects(t,r).then(n=>n(this.axios,this.basePath))}deleteObject(t,r,n){return Pn(this.configuration).deleteObject(t,r,n).then(a=>a(this.axios,this.basePath))}getObject(t,r,n){return Pn(this.configuration).getObject(t,r,n).then(a=>a(this.axios,this.basePath))}getObjectMetadata(t,r,n){return Pn(this.configuration).getObjectMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listAllObjectKeys(t,r){return Pn(this.configuration).listAllObjectKeys(t,r).then(n=>n(this.axios,this.basePath))}storeObject(t,r,n,a,s){return Pn(this.configuration).storeObject(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}}const KI=function(e){return{checkNovaVersionUpdate:async(t,r={})=>{v("checkNovaVersionUpdate","channel",t);const n="/system/update",a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};k(o,e),await L(i,e),t!==void 0&&(l.channel=t),U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:D(a),options:o}},getDiagnosePackage:async(t={})=>{const r="/system/diagnosis-package/zip",n=new URL(r,j);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...t},o={},i={};k(s,e),await L(o,e),U(n,i);let l=a&&a.headers?a.headers:{};return s.headers={...o,...l,...t.headers},{url:D(n),options:s}},getSystemStatus:async(t={})=>{const r="/system/status",n=new URL(r,j);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...t},o={},i={};k(s,e),await L(o,e),U(n,i);let l=a&&a.headers?a.headers:{};return s.headers={...o,...l,...t.headers},{url:D(n),options:s}},getSystemVersion:async(t={})=>{const r="/system/version",n=new URL(r,j);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...t},o={},i={};k(s,e),await L(o,e),U(n,i);let l=a&&a.headers?a.headers:{};return s.headers={...o,...l,...t.headers},{url:D(n),options:s}},updateNovaVersion:async(t,r={})=>{v("updateNovaVersion","updateNovaVersionRequest",t);const n="/system/update",a=new URL(n,j);let s;e&&(s=e.baseOptions);const o={method:"PUT",...s,...r},i={},l={};k(o,e),await L(i,e),i["Content-Type"]="application/json",U(a,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},o.data=fe(t,o,e),{url:D(a),options:o}}}},Ra=function(e){const t=KI(e);return{async checkNovaVersionUpdate(r,n){var i,l;const a=await t.checkNovaVersionUpdate(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["SystemApi.checkNovaVersionUpdate"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)},async getDiagnosePackage(r){var o,i;const n=await t.getDiagnosePackage(r),a=(e==null?void 0:e.serverIndex)??0,s=(i=(o=$["SystemApi.getDiagnosePackage"])==null?void 0:o[a])==null?void 0:i.url;return(l,c)=>N(n,V,M,e)(l,s||c)},async getSystemStatus(r){var o,i;const n=await t.getSystemStatus(r),a=(e==null?void 0:e.serverIndex)??0,s=(i=(o=$["SystemApi.getSystemStatus"])==null?void 0:o[a])==null?void 0:i.url;return(l,c)=>N(n,V,M,e)(l,s||c)},async getSystemVersion(r){var o,i;const n=await t.getSystemVersion(r),a=(e==null?void 0:e.serverIndex)??0,s=(i=(o=$["SystemApi.getSystemVersion"])==null?void 0:o[a])==null?void 0:i.url;return(l,c)=>N(n,V,M,e)(l,s||c)},async updateNovaVersion(r,n){var i,l;const a=await t.updateNovaVersion(r,n),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=$["SystemApi.updateNovaVersion"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>N(a,V,M,e)(c,o||u)}}};class YI extends je{checkNovaVersionUpdate(t,r){return Ra(this.configuration).checkNovaVersionUpdate(t,r).then(n=>n(this.axios,this.basePath))}getDiagnosePackage(t){return Ra(this.configuration).getDiagnosePackage(t).then(r=>r(this.axios,this.basePath))}getSystemStatus(t){return Ra(this.configuration).getSystemStatus(t).then(r=>r(this.axios,this.basePath))}getSystemVersion(t){return Ra(this.configuration).getSystemVersion(t).then(r=>r(this.axios,this.basePath))}updateNovaVersion(t,r){return Ra(this.configuration).updateNovaVersion(t,r).then(n=>n(this.axios,this.basePath))}}const QI=function(e){return{getMotionGroupState:async(t,r,n,a={})=>{v("getMotionGroupState","cell",t),v("getMotionGroupState","controller",r),v("getMotionGroupState","id",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},getMotionGroups:async(t,r,n={})=>{v("getMotionGroups","cell",t),v("getMotionGroups","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/motiongroups".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getVirtualRobotIOValue:async(t,r,n,a={})=>{v("getVirtualRobotIOValue","cell",t),v("getVirtualRobotIOValue","controller",r),v("getVirtualRobotIOValue","io",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{io}",encodeURIComponent(String(n))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},listIOs:async(t,r,n={})=>{v("listIOs","cell",t),v("listIOs","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/ios".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},setMotionGroupState:async(t,r,n,a,s={})=>{v("setMotionGroupState","cell",t),v("setMotionGroupState","controller",r),v("setMotionGroupState","id",n),v("setMotionGroupState","motionGroupJoints",a);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};k(c,e),await L(u,e),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=fe(a,c,e),{url:D(i),options:c}},setVirtualRobotIOValue:async(t,r,n,a,s,o,i={})=>{v("setVirtualRobotIOValue","cell",t),v("setVirtualRobotIOValue","controller",r),v("setVirtualRobotIOValue","io",n);const l="/cells/{cell}/controllers/{controller}/teach-pendant/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{io}",encodeURIComponent(String(n))),c=new URL(l,j);let u;e&&(u=e.baseOptions);const d={method:"PUT",...u,...i},h={},p={};k(d,e),await L(h,e),a!==void 0&&(p.bool=a),s!==void 0&&(p.integer=s),o!==void 0&&(p.double=o),U(c,p);let m=u&&u.headers?u.headers:{};return d.headers={...h,...m,...i.headers},{url:D(c),options:d}}}},Rn=function(e){const t=QI(e);return{async getMotionGroupState(r,n,a,s){var c,u;const o=await t.getMotionGroupState(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualRobotApi.getMotionGroupState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async getMotionGroups(r,n,a){var l,c;const s=await t.getMotionGroups(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualRobotApi.getMotionGroups"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getVirtualRobotIOValue(r,n,a,s){var c,u;const o=await t.getVirtualRobotIOValue(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualRobotApi.getVirtualRobotIOValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async listIOs(r,n,a){var l,c;const s=await t.listIOs(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualRobotApi.listIOs"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async setMotionGroupState(r,n,a,s,o){var u,d;const i=await t.setMotionGroupState(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualRobotApi.setMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)},async setVirtualRobotIOValue(r,n,a,s,o,i,l){var h,p;const c=await t.setVirtualRobotIOValue(r,n,a,s,o,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=$["VirtualRobotApi.setVirtualRobotIOValue"])==null?void 0:h[u])==null?void 0:p.url;return(m,f)=>N(c,V,M,e)(m,d||f)}}};class XI extends je{getMotionGroupState(t,r,n,a){return Rn(this.configuration).getMotionGroupState(t,r,n,a).then(s=>s(this.axios,this.basePath))}getMotionGroups(t,r,n){return Rn(this.configuration).getMotionGroups(t,r,n).then(a=>a(this.axios,this.basePath))}getVirtualRobotIOValue(t,r,n,a){return Rn(this.configuration).getVirtualRobotIOValue(t,r,n,a).then(s=>s(this.axios,this.basePath))}listIOs(t,r,n){return Rn(this.configuration).listIOs(t,r,n).then(a=>a(this.axios,this.basePath))}setMotionGroupState(t,r,n,a,s){return Rn(this.configuration).setMotionGroupState(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}setVirtualRobotIOValue(t,r,n,a,s,o,i){return Rn(this.configuration).setVirtualRobotIOValue(t,r,n,a,s,o,i).then(l=>l(this.axios,this.basePath))}}const ZI=function(e){return{externalJointsStream:async(t,r,n,a={})=>{v("externalJointsStream","cell",t),v("externalJointsStream","controller",r),v("externalJointsStream","externalJointStreamDatapoint",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/externalJointsStream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},getMotionGroupBehavior:async(t,r,n,a={})=>{v("getMotionGroupBehavior","cell",t),v("getMotionGroupBehavior","controller",r),v("getMotionGroupBehavior","id",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},setMotionGroupBehavior:async(t,r,n,a,s={})=>{v("setMotionGroupBehavior","cell",t),v("setMotionGroupBehavior","controller",r),v("setMotionGroupBehavior","id",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};k(c,e),await L(u,e),a!==void 0&&(d.behavior=a),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:D(i),options:c}}}},ll=function(e){const t=ZI(e);return{async externalJointsStream(r,n,a,s){var c,u;const o=await t.externalJointsStream(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualRobotBehaviorApi.externalJointsStream"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async getMotionGroupBehavior(r,n,a,s){var c,u;const o=await t.getMotionGroupBehavior(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualRobotBehaviorApi.getMotionGroupBehavior"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async setMotionGroupBehavior(r,n,a,s,o){var u,d;const i=await t.setMotionGroupBehavior(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualRobotBehaviorApi.setMotionGroupBehavior"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)}}};class e2 extends je{externalJointsStream(t,r,n,a){return ll(this.configuration).externalJointsStream(t,r,n,a).then(s=>s(this.axios,this.basePath))}getMotionGroupBehavior(t,r,n,a){return ll(this.configuration).getMotionGroupBehavior(t,r,n,a).then(s=>s(this.axios,this.basePath))}setMotionGroupBehavior(t,r,n,a,s){return ll(this.configuration).setMotionGroupBehavior(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}}const t2=function(e){return{getCycleTime:async(t,r,n={})=>{v("getCycleTime","cell",t),v("getCycleTime","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/cycle-time".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getEStop:async(t,r,n={})=>{v("getEStop","cell",t),v("getEStop","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/estop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},getOperationMode:async(t,r,n={})=>{v("getOperationMode","cell",t),v("getOperationMode","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},pushEStop:async(t,r,n={})=>{v("pushEStop","cell",t),v("pushEStop","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/estop/push".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},releaseEStop:async(t,r,n={})=>{v("releaseEStop","cell",t),v("releaseEStop","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/estop/release".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},setOperationMode:async(t,r,n,a={})=>{v("setOperationMode","cell",t),v("setOperationMode","controller",r),v("setOperationMode","mode",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),n!==void 0&&(u.mode=n),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}}}},Tn=function(e){const t=t2(e);return{async getCycleTime(r,n,a){var l,c;const s=await t.getCycleTime(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualRobotModeApi.getCycleTime"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getEStop(r,n,a){var l,c;const s=await t.getEStop(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualRobotModeApi.getEStop"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async getOperationMode(r,n,a){var l,c;const s=await t.getOperationMode(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualRobotModeApi.getOperationMode"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async pushEStop(r,n,a){var l,c;const s=await t.pushEStop(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualRobotModeApi.pushEStop"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async releaseEStop(r,n,a){var l,c;const s=await t.releaseEStop(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualRobotModeApi.releaseEStop"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async setOperationMode(r,n,a,s){var c,u;const o=await t.setOperationMode(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualRobotModeApi.setOperationMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)}}};class r2 extends je{getCycleTime(t,r,n){return Tn(this.configuration).getCycleTime(t,r,n).then(a=>a(this.axios,this.basePath))}getEStop(t,r,n){return Tn(this.configuration).getEStop(t,r,n).then(a=>a(this.axios,this.basePath))}getOperationMode(t,r,n){return Tn(this.configuration).getOperationMode(t,r,n).then(a=>a(this.axios,this.basePath))}pushEStop(t,r,n){return Tn(this.configuration).pushEStop(t,r,n).then(a=>a(this.axios,this.basePath))}releaseEStop(t,r,n){return Tn(this.configuration).releaseEStop(t,r,n).then(a=>a(this.axios,this.basePath))}setOperationMode(t,r,n,a){return Tn(this.configuration).setOperationMode(t,r,n,a).then(s=>s(this.axios,this.basePath))}}const n2=function(e){return{addVirtualRobotCoordinateSystem:async(t,r,n,a={})=>{v("addVirtualRobotCoordinateSystem","cell",t),v("addVirtualRobotCoordinateSystem","controller",r),v("addVirtualRobotCoordinateSystem","coordinateSystem",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await L(c,e),c["Content-Type"]="application/json",U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=fe(n,l,e),{url:D(o),options:l}},addVirtualRobotTcp:async(t,r,n,a,s={})=>{v("addVirtualRobotTcp","cell",t),v("addVirtualRobotTcp","controller",r),v("addVirtualRobotTcp","id",n),v("addVirtualRobotTcp","robotTcp",a);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};k(c,e),await L(u,e),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=fe(a,c,e),{url:D(i),options:c}},deleteVirtualRobotCoordinateSystem:async(t,r,n,a,s={})=>{v("deleteVirtualRobotCoordinateSystem","cell",t),v("deleteVirtualRobotCoordinateSystem","controller",r),v("deleteVirtualRobotCoordinateSystem","coordinateSystem",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},u={},d={};k(c,e),await L(u,e),a!==void 0&&(d.delete_dependent=a),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:D(i),options:c}},deleteVirtualRobotTcp:async(t,r,n,a,s={})=>{v("deleteVirtualRobotTcp","cell",t),v("deleteVirtualRobotTcp","controller",r),v("deleteVirtualRobotTcp","id",n),v("deleteVirtualRobotTcp","tcp",a);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/tcps/{tcp}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))).replace("{tcp}",encodeURIComponent(String(a))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},u={},d={};k(c,e),await L(u,e),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:D(i),options:c}},getVirtualRobotMounting:async(t,r,n,a={})=>{v("getVirtualRobotMounting","cell",t),v("getVirtualRobotMounting","controller",r),v("getVirtualRobotMounting","id",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},listVirtualRobotCoordinateSystems:async(t,r,n={})=>{v("listVirtualRobotCoordinateSystems","cell",t),v("listVirtualRobotCoordinateSystems","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,j);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...n},l={},c={};k(i,e),await L(l,e),U(s,c);let u=o&&o.headers?o.headers:{};return i.headers={...l,...u,...n.headers},{url:D(s),options:i}},listVirtualRobotTcps:async(t,r,n,a={})=>{v("listVirtualRobotTcps","cell",t),v("listVirtualRobotTcps","controller",r),v("listVirtualRobotTcps","id",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),o=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await L(c,e),U(o,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(o),options:l}},setVirtualRobotMounting:async(t,r,n,a,s={})=>{v("setVirtualRobotMounting","cell",t),v("setVirtualRobotMounting","controller",r),v("setVirtualRobotMounting","id",n),v("setVirtualRobotMounting","coordinateSystem",a);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),i=new URL(o,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};k(c,e),await L(u,e),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=fe(a,c,e),{url:D(i),options:c}}}},xr=function(e){const t=n2(e);return{async addVirtualRobotCoordinateSystem(r,n,a,s){var c,u;const o=await t.addVirtualRobotCoordinateSystem(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualRobotSetupApi.addVirtualRobotCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async addVirtualRobotTcp(r,n,a,s,o){var u,d;const i=await t.addVirtualRobotTcp(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualRobotSetupApi.addVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)},async deleteVirtualRobotCoordinateSystem(r,n,a,s,o){var u,d;const i=await t.deleteVirtualRobotCoordinateSystem(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualRobotSetupApi.deleteVirtualRobotCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)},async deleteVirtualRobotTcp(r,n,a,s,o){var u,d;const i=await t.deleteVirtualRobotTcp(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualRobotSetupApi.deleteVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)},async getVirtualRobotMounting(r,n,a,s){var c,u;const o=await t.getVirtualRobotMounting(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualRobotSetupApi.getVirtualRobotMounting"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async listVirtualRobotCoordinateSystems(r,n,a){var l,c;const s=await t.listVirtualRobotCoordinateSystems(r,n,a),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualRobotSetupApi.listVirtualRobotCoordinateSystems"])==null?void 0:l[o])==null?void 0:c.url;return(u,d)=>N(s,V,M,e)(u,i||d)},async listVirtualRobotTcps(r,n,a,s){var c,u;const o=await t.listVirtualRobotTcps(r,n,a,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualRobotSetupApi.listVirtualRobotTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(o,V,M,e)(d,l||h)},async setVirtualRobotMounting(r,n,a,s,o){var u,d;const i=await t.setVirtualRobotMounting(r,n,a,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualRobotSetupApi.setVirtualRobotMounting"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,V,M,e)(h,c||p)}}};class a2 extends je{addVirtualRobotCoordinateSystem(t,r,n,a){return xr(this.configuration).addVirtualRobotCoordinateSystem(t,r,n,a).then(s=>s(this.axios,this.basePath))}addVirtualRobotTcp(t,r,n,a,s){return xr(this.configuration).addVirtualRobotTcp(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}deleteVirtualRobotCoordinateSystem(t,r,n,a,s){return xr(this.configuration).deleteVirtualRobotCoordinateSystem(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}deleteVirtualRobotTcp(t,r,n,a,s){return xr(this.configuration).deleteVirtualRobotTcp(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}getVirtualRobotMounting(t,r,n,a){return xr(this.configuration).getVirtualRobotMounting(t,r,n,a).then(s=>s(this.axios,this.basePath))}listVirtualRobotCoordinateSystems(t,r,n){return xr(this.configuration).listVirtualRobotCoordinateSystems(t,r,n).then(a=>a(this.axios,this.basePath))}listVirtualRobotTcps(t,r,n,a){return xr(this.configuration).listVirtualRobotTcps(t,r,n,a).then(s=>s(this.axios,this.basePath))}setVirtualRobotMounting(t,r,n,a,s){return xr(this.configuration).setVirtualRobotMounting(t,r,n,a,s).then(o=>o(this.axios,this.basePath))}}function rr(e,t,r){return Math.max(t,Math.min(r,e))}class s2{constructor(t=0,r=0,n=0,a=1){this.isQuaternion=!0,this._x=t,this._y=r,this._z=n,this._w=a}static slerpFlat(t,r,n,a,s,o,i){let l=n[a+0],c=n[a+1],u=n[a+2],d=n[a+3];const h=s[o+0],p=s[o+1],m=s[o+2],f=s[o+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]=m,t[r+3]=f;return}if(d!==f||l!==h||c!==p||u!==m){let g=1-i;const S=l*h+c*p+u*m+d*f,T=S>=0?1:-1,O=1-S*S;if(O>Number.EPSILON){const E=Math.sqrt(O),R=Math.atan2(E,S*T);g=Math.sin(g*R)/E,i=Math.sin(i*R)/E}const C=i*T;if(l=l*g+h*C,c=c*g+p*C,u=u*g+m*C,d=d*g+f*C,g===1-i){const E=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=E,c*=E,u*=E,d*=E}}t[r]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d}static multiplyQuaternionsFlat(t,r,n,a,s,o){const i=n[a],l=n[a+1],c=n[a+2],u=n[a+3],d=s[o],h=s[o+1],p=s[o+2],m=s[o+3];return t[r]=i*m+u*d+l*p-c*h,t[r+1]=l*m+u*h+c*d-i*p,t[r+2]=c*m+u*p+i*h-l*d,t[r+3]=u*m-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,a){return this._x=t,this._y=r,this._z=n,this._w=a,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,a=t._y,s=t._z,o=t._order,i=Math.cos,l=Math.sin,c=i(n/2),u=i(a/2),d=i(s/2),h=l(n/2),p=l(a/2),m=l(s/2);switch(o){case"XYZ":this._x=h*u*d+c*p*m,this._y=c*p*d-h*u*m,this._z=c*u*m+h*p*d,this._w=c*u*d-h*p*m;break;case"YXZ":this._x=h*u*d+c*p*m,this._y=c*p*d-h*u*m,this._z=c*u*m-h*p*d,this._w=c*u*d+h*p*m;break;case"ZXY":this._x=h*u*d-c*p*m,this._y=c*p*d+h*u*m,this._z=c*u*m+h*p*d,this._w=c*u*d-h*p*m;break;case"ZYX":this._x=h*u*d-c*p*m,this._y=c*p*d+h*u*m,this._z=c*u*m-h*p*d,this._w=c*u*d+h*p*m;break;case"YZX":this._x=h*u*d+c*p*m,this._y=c*p*d+h*u*m,this._z=c*u*m-h*p*d,this._w=c*u*d-h*p*m;break;case"XZY":this._x=h*u*d-c*p*m,this._y=c*p*d-h*u*m,this._z=c*u*m+h*p*d,this._w=c*u*d+h*p*m;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return r===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,r){const n=r/2,a=Math.sin(n);return this._x=t.x*a,this._y=t.y*a,this._z=t.z*a,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const r=t.elements,n=r[0],a=r[4],s=r[8],o=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=(o-a)*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=(a+o)/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=(a+o)/p,this._y=.25*p,this._z=(l+u)/p}else{const p=2*Math.sqrt(1+d-n-i);this._w=(o-a)/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(rr(this.dot(t),-1,1)))}rotateTowards(t,r){const n=this.angleTo(t);if(n===0)return this;const a=Math.min(1,r/n);return this.slerp(t,a),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,a=t._y,s=t._z,o=t._w,i=r._x,l=r._y,c=r._z,u=r._w;return this._x=n*u+o*i+a*c-s*l,this._y=a*u+o*l+s*i-n*c,this._z=s*u+o*c+n*l-a*i,this._w=o*u-n*i-a*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,a=this._y,s=this._z,o=this._w;let i=o*t._w+n*t._x+a*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=o,this._x=n,this._y=a,this._z=s,this;const l=1-i*i;if(l<=Number.EPSILON){const p=1-r;return this._w=p*o+r*this._w,this._x=p*n+r*this._x,this._y=p*a+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=o*d+this._w*h,this._x=n*d+this._x*h,this._y=a*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(),a=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(a*Math.sin(t),a*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 Ln{constructor(t=0,r=0,n=0){Ln.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(Jh.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(Jh.setFromAxisAngle(t,r))}applyMatrix3(t){const r=this.x,n=this.y,a=this.z,s=t.elements;return this.x=s[0]*r+s[3]*n+s[6]*a,this.y=s[1]*r+s[4]*n+s[7]*a,this.z=s[2]*r+s[5]*n+s[8]*a,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const r=this.x,n=this.y,a=this.z,s=t.elements,o=1/(s[3]*r+s[7]*n+s[11]*a+s[15]);return this.x=(s[0]*r+s[4]*n+s[8]*a+s[12])*o,this.y=(s[1]*r+s[5]*n+s[9]*a+s[13])*o,this.z=(s[2]*r+s[6]*n+s[10]*a+s[14])*o,this}applyQuaternion(t){const r=this.x,n=this.y,a=this.z,s=t.x,o=t.y,i=t.z,l=t.w,c=2*(o*a-i*n),u=2*(i*r-s*a),d=2*(s*n-o*r);return this.x=r+l*c+o*d-i*u,this.y=n+l*u+i*c-s*d,this.z=a+l*d+s*u-o*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,a=this.z,s=t.elements;return this.x=s[0]*r+s[4]*n+s[8]*a,this.y=s[1]*r+s[5]*n+s[9]*a,this.z=s[2]*r+s[6]*n+s[10]*a,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=rr(this.x,t.x,r.x),this.y=rr(this.y,t.y,r.y),this.z=rr(this.z,t.z,r.z),this}clampScalar(t,r){return this.x=rr(this.x,t,r),this.y=rr(this.y,t,r),this.z=rr(this.z,t,r),this}clampLength(t,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(rr(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,a=t.y,s=t.z,o=r.x,i=r.y,l=r.z;return this.x=a*l-s*i,this.y=s*o-n*l,this.z=n*i-a*o,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 cl.copy(this).projectOnVector(t),this.sub(cl)}reflect(t){return this.sub(cl.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(rr(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const r=this.x-t.x,n=this.y-t.y,a=this.z-t.z;return r*r+n*n+a*a}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 a=Math.sin(r)*t;return this.x=a*Math.sin(n),this.y=Math.cos(r)*t,this.z=a*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(),a=this.setFromMatrixColumn(t,2).length();return this.x=r,this.y=n,this.z=a,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 cl=new Ln,Jh=new s2;function o2(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 a=e[n];if(typeof a!="string")throw new TypeError("Url must be a string. Received "+a);a!==""&&(n>0&&(a=a.replace(/^[\/]+/,"")),n<e.length-1?a=a.replace(/[\/]+$/,""):a=a.replace(/[\/]+$/,"/"),t.push(a))}var s=t.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var o=s.split("?");return s=o.shift()+(o.length>0?"?":"")+o.join("&"),s}function ul(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),o2(e)}var Jt={},Wh;function i2(){if(Wh)return Jt;Wh=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.TokenData=void 0,Jt.parse=d,Jt.compile=h,Jt.match=f,Jt.pathToRegexp=g,Jt.stringify=C;const e="/",t=P=>P,r=/^[$_\p{ID_Start}]$/u,n=/^[$\u200c\u200d\p{ID_Continue}]$/u,a="https://git.new/pathToRegexpError",s={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function o(P){return P.replace(/[{}()\[\]+?!:*]/g,"\\$&")}function i(P){return P.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}function*l(P){const _=[...P];let B=0;function b(){let A="";if(r.test(_[++B]))for(A+=_[B];n.test(_[++B]);)A+=_[B];else if(_[B]==='"'){let z=B;for(;B<_.length;){if(_[++B]==='"'){B++,z=0;break}_[B]==="\\"?A+=_[++B]:A+=_[B]}if(z)throw new TypeError(`Unterminated quote at ${z}: ${a}`)}if(!A)throw new TypeError(`Missing parameter name at ${B}: ${a}`);return A}for(;B<_.length;){const A=_[B],z=s[A];if(z)yield{type:z,index:B++,value:A};else if(A==="\\")yield{type:"ESCAPED",index:B++,value:_[B++]};else if(A===":"){const I=b();yield{type:"PARAM",index:B,value:I}}else if(A==="*"){const I=b();yield{type:"WILDCARD",index:B,value:I}}else yield{type:"CHAR",index:B,value:_[B++]}}return{type:"END",index:B,value:""}}class c{constructor(_){this.tokens=_}peek(){if(!this._peek){const _=this.tokens.next();this._peek=_.value}return this._peek}tryConsume(_){const B=this.peek();if(B.type===_)return this._peek=void 0,B.value}consume(_){const B=this.tryConsume(_);if(B!==void 0)return B;const{type:b,index:A}=this.peek();throw new TypeError(`Unexpected ${b} at ${A}, expected ${_}: ${a}`)}text(){let _="",B;for(;B=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)_+=B;return _}}class u{constructor(_){this.tokens=_}}Jt.TokenData=u;function d(P,_={}){const{encodePath:B=t}=_,b=new c(l(P));function A(I){const G=[];for(;;){const re=b.text();re&&G.push({type:"text",value:B(re)});const te=b.tryConsume("PARAM");if(te){G.push({type:"param",name:te});continue}const oe=b.tryConsume("WILDCARD");if(oe){G.push({type:"wildcard",name:oe});continue}if(b.tryConsume("{")){G.push({type:"group",tokens:A("}")});continue}return b.consume(I),G}}const z=A("END");return new u(z)}function h(P,_={}){const{encode:B=encodeURIComponent,delimiter:b=e}=_,A=P instanceof u?P:d(P,_),z=p(A.tokens,b,B);return function(G={}){const[re,...te]=z(G);if(te.length)throw new TypeError(`Missing parameters: ${te.join(", ")}`);return re}}function p(P,_,B){const b=P.map(A=>m(A,_,B));return A=>{const z=[""];for(const I of b){const[G,...re]=I(A);z[0]+=G,z.push(...re)}return z}}function m(P,_,B){if(P.type==="text")return()=>[P.value];if(P.type==="group"){const A=p(P.tokens,_,B);return z=>{const[I,...G]=A(z);return G.length?[""]:[I]}}const b=B||t;return P.type==="wildcard"&&B!==!1?A=>{const z=A[P.name];if(z==null)return["",P.name];if(!Array.isArray(z)||z.length===0)throw new TypeError(`Expected "${P.name}" to be a non-empty array`);return[z.map((I,G)=>{if(typeof I!="string")throw new TypeError(`Expected "${P.name}/${G}" to be a string`);return b(I)}).join(_)]}:A=>{const z=A[P.name];if(z==null)return["",P.name];if(typeof z!="string")throw new TypeError(`Expected "${P.name}" to be a string`);return[b(z)]}}function f(P,_={}){const{decode:B=decodeURIComponent,delimiter:b=e}=_,{regexp:A,keys:z}=g(P,_),I=z.map(G=>B===!1?t:G.type==="param"?B:re=>re.split(b).map(B));return function(re){const te=A.exec(re);if(!te)return!1;const oe=te[0],Z=Object.create(null);for(let ae=1;ae<te.length;ae++){if(te[ae]===void 0)continue;const ge=z[ae-1],ue=I[ae-1];Z[ge.name]=ue(te[ae])}return{path:oe,params:Z}}}function g(P,_={}){const{delimiter:B=e,end:b=!0,sensitive:A=!1,trailing:z=!0}=_,I=[],G=[],re=A?"":"i",oe=(Array.isArray(P)?P:[P]).map(ge=>ge instanceof u?ge:d(ge,_));for(const{tokens:ge}of oe)for(const ue of S(ge,0,[])){const De=T(ue,B,I);G.push(De)}let Z=`^(?:${G.join("|")})`;return z&&(Z+=`(?:${i(B)}$)?`),Z+=b?"$":`(?=${i(B)}|$)`,{regexp:new RegExp(Z,re),keys:I}}function*S(P,_,B){if(_===P.length)return yield B;const b=P[_];if(b.type==="group"){const A=B.slice();for(const z of S(b.tokens,0,A))yield*S(P,_+1,z)}else B.push(b);yield*S(P,_+1,B)}function T(P,_,B){let b="",A="",z=!0;for(let I=0;I<P.length;I++){const G=P[I];if(G.type==="text"){b+=i(G.value),A+=G.value,z||(z=G.value.includes(_));continue}if(G.type==="param"||G.type==="wildcard"){if(!z&&!A)throw new TypeError(`Missing text after "${G.name}": ${a}`);G.type==="param"?b+=`(${O(_,z?"":A)}+)`:b+="([\\s\\S]+)",B.push(G),A="",z=!1;continue}}return b}function O(P,_){return _.length<2?P.length<2?`[^${i(P+_)}]`:`(?:(?!${i(P)})[^${i(_)}])`:P.length<2?`(?:(?!${i(_)})[^${i(P)}])`:`(?:(?!${i(_)}|${i(P)})[\\s\\S])`}function C(P){return P.tokens.map(function _(B,b,A){if(B.type==="text")return o(B.value);if(B.type==="group")return`{${B.tokens.map(_).join("")}}`;const I=E(B.name)&&R(A[b+1])?B.name:JSON.stringify(B.name);if(B.type==="param")return`:${I}`;if(B.type==="wildcard")return`*${I}`;throw new TypeError(`Unexpected token: ${B}`)}).join("")}function E(P){const[_,...B]=P;return r.test(_)?B.every(b=>n.test(b)):!1}function R(P){return(P==null?void 0:P.type)!=="text"?!0:!n.test(P.value[0])}return Jt}var l2=i2();function hg(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 pg(e,t,r){if(e===void 0&&t||e&&t===void 0)return!1;if(e===void 0||t===void 0)return!0;let n=0;return n+=Math.abs(e.orientation.x-t.orientation.x),n+=Math.abs(e.orientation.y-t.orientation.y),n+=Math.abs(e.orientation.z-t.orientation.z),n+=Math.abs(e.position.x-t.position.x),n+=Math.abs(e.position.y-t.position.y),n+=Math.abs(e.position.z-t.position.z),n>r?!1:e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp}var Kh=1e-4,c2=class fg{constructor(t,r,n,a,s,o,i,l,c,u,d,h){this.nova=t,this.controller=r,this.motionGroup=n,this.initialMotionState=a,this.motionStateSocket=s,this.isVirtual=o,this.tcps=i,this.motionGroupSpecification=l,this.safetySetup=c,this.mounting=u,this.initialControllerState=d,this.controllerStateSocket=h,this.connectedJoggingCartesianSocket=null,this.connectedJoggingJointsSocket=null,this.joggingVelocity=10,this.activationState="inactive",this.rapidlyChangingMotionState=a,this.controllerState=d,h.addEventListener("message",p=>{var m;const f=(m=wr(p.data))==null?void 0:m.result;f&&Xe.runInAction(()=>{this.controllerState=f})}),s.addEventListener("message",p=>{var m;const f=(m=wr(p.data))==null?void 0:m.result;if(!f)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${p.data}`);hg(this.rapidlyChangingMotionState.state.joint_position.joints,f.state.joint_position.joints,Kh)||Xe.runInAction(()=>{this.rapidlyChangingMotionState.state=f.state}),pg(this.rapidlyChangingMotionState.tcp_pose,f.tcp_pose,Kh)||Xe.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=f.tcp_pose})}),Xe.makeAutoObservable(this)}static connect(t,r,n){return $e(this,null,function*(){var a,s;const[o,i]=r.split("@"),l=n.find(R=>R.controller===i),c=l==null?void 0:l.physical_motion_groups.find(R=>R.motion_group===r);if(!l||!c)throw new Error(`Controller ${i} or motion group ${r} not found`);const u=t.openReconnectingWebsocket(`/motion-groups/${r}/state-stream`),d=yield u.firstMessage(),h=(a=wr(d.data))==null?void 0:a.result;if(!h)throw new Error(`Unable to parse initial motion state message ${d.data}`);console.log(`Connected motion state websocket to motion group ${c.motion_group}. Initial state:
|
|
160
|
+
`,h);const m=(yield t.api.controller.getRobotController(l.controller)).configuration.kind==="VirtualController",f=yield $e(this,null,function*(){try{return yield t.api.motionGroupInfos.getMounting(c.motion_group)}catch(R){return console.error(`Error fetching mounting for ${c.motion_group}`,R),null}}),g=t.openReconnectingWebsocket(`/controllers/${l.controller}/state-stream?response_rate=1000`),S=yield g.firstMessage(),T=(s=wr(S.data))==null?void 0:s.result;if(!T)throw new Error(`Unable to parse initial controller state message ${S.data}`);console.log(`Connected controller state websocket to controller ${l.controller}. Initial state:
|
|
161
|
+
`,T);const{tcps:O}=yield t.api.motionGroupInfos.listTcps(r),C=yield t.api.motionGroupInfos.getMotionGroupSpecification(r),E=yield t.api.motionGroupInfos.getSafetySetup(r);return new fg(t,l,c,h,u,m,O,C,E,f,T,g)})}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.motionGroup.model_from_controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replaceAll("-","_")}_${t}`}get joggingVelocityRads(){return this.joggingVelocity*Math.PI/180}get joints(){return this.initialMotionState.state.joint_position.joints.map((t,r)=>({index:r}))}get dhParameters(){return this.motionGroupSpecification.dh_parameters}get safetyZones(){return this.safetySetup.safety_zones}get mountingPosition(){return this.mounting?[this.mounting.pose.position.x/1e3,this.mounting.pose.position.y/1e3,this.mounting.pose.position.z/1e3]:[0,0,0]}get mountingQuaternion(){var t,r,n,a,s,o;const i=new qe.Vector3(((r=(t=this.mounting)==null?void 0:t.pose.orientation)==null?void 0:r.x)||0,((a=(n=this.mounting)==null?void 0:n.pose.orientation)==null?void 0:a.y)||0,((o=(s=this.mounting)==null?void 0:s.pose.orientation)==null?void 0:o.z)||0),l=i.length(),c=i.normalize();return new qe.Quaternion().setFromAxisAngle(c,l)}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"}deactivate(){return $e(this,null,function*(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}Xe.runInAction(()=>{this.activationState="deactivating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_MONITOR"),Xe.runInAction(()=>{this.activationState="inactive"})}catch(t){throw Xe.runInAction(()=>{this.activationState="active"}),t}})}activate(){return $e(this,null,function*(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}Xe.runInAction(()=>{this.activationState="activating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_CONTROL"),Xe.runInAction(()=>{this.activationState="active"})}catch(t){throw Xe.runInAction(()=>{this.activationState="inactive"}),t}})}toggleActivation(){this.activationState==="inactive"?this.activate():this.activationState==="active"&&this.deactivate()}dispose(){this.motionStateSocket.close(),this.connectedJoggingCartesianSocket&&this.connectedJoggingCartesianSocket.close(),this.connectedJoggingJointsSocket&&this.connectedJoggingJointsSocket.close()}setJoggingVelocity(t){this.joggingVelocity=t}},u2=class mg{constructor(t,r={}){this.motionStream=t,this.opts=r,this.cartesianWebsocket=null,this.jointWebsocket=null,this.cartesianJoggingOpts={}}static open(t,r){return $e(this,arguments,function*(n,a,s={}){const o=yield n.connectMotionStream(a);return new mg(o,s)})}get motionGroupId(){return this.motionStream.motionGroupId}get nova(){return this.motionStream.nova}get numJoints(){return this.motionStream.joints.length}get activeJoggingMode(){return this.cartesianWebsocket?"cartesian":this.jointWebsocket?"joint":"increment"}get activeWebsocket(){return this.cartesianWebsocket||this.jointWebsocket}stop(){return $e(this,null,function*(){this.cartesianWebsocket&&this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:{x:0,y:0,z:0},rotation_direction:{x:0,y:0,z:0},position_velocity:0,rotation_velocity:0,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId}),this.jointWebsocket&&this.jointWebsocket.sendJson({motion_group:this.motionGroupId,joint_velocities:new Array(this.numJoints).fill(0)})})}dispose(){this.cartesianWebsocket&&this.cartesianWebsocket.dispose(),this.jointWebsocket&&this.jointWebsocket.dispose()}setJoggingMode(t,r){console.log("Setting jogging mode to",t),r&&(fE(this.cartesianJoggingOpts,r)||this.cartesianWebsocket&&(this.cartesianWebsocket.dispose(),this.cartesianWebsocket=null),this.cartesianJoggingOpts=r),t!=="cartesian"&&this.cartesianWebsocket&&(this.cartesianWebsocket.dispose(),this.cartesianWebsocket=null),t!=="joint"&&this.jointWebsocket&&(this.jointWebsocket.dispose(),this.jointWebsocket=null),t==="cartesian"&&!this.cartesianWebsocket&&(this.cartesianWebsocket=this.nova.openReconnectingWebsocket("/motion-groups/move-tcp"),this.cartesianWebsocket.addEventListener("message",n=>{const a=wr(n.data);if(a&&"error"in a)if(this.opts.onError)this.opts.onError(n.data);else throw new Error(n.data)})),t==="joint"&&!this.jointWebsocket&&(this.jointWebsocket=this.nova.openReconnectingWebsocket("/motion-groups/move-joint"),this.jointWebsocket.addEventListener("message",n=>{const a=wr(n.data);if(a&&"error"in a)if(this.opts.onError)this.opts.onError(n.data);else throw new Error(n.data)}))}startJointRotation(t){return $e(this,arguments,function*({joint:r,direction:n,velocityRadsPerSec:a}){if(!this.jointWebsocket)throw new Error("Joint jogging websocket not connected; call setJoggingMode first");const s=new Array(this.numJoints).fill(0);s[r]=n==="-"?-a:a,this.jointWebsocket.sendJson({motion_group:this.motionGroupId,joint_velocities:s})})}startTCPTranslation(t){return $e(this,arguments,function*({axis:r,direction:n,velocityMmPerSec:a}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const s={x:0,y:0,z:0},o=Object.assign({},s);o[r]=n==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:o,rotation_direction:s,position_velocity:a,rotation_velocity:0,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}startTCPRotation(t){return $e(this,arguments,function*({axis:r,direction:n,velocityRadsPerSec:a}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const s={x:0,y:0,z:0},o=Object.assign({},s);o[r]=n==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:s,rotation_direction:o,position_velocity:0,rotation_velocity:a,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}runIncrementalCartesianMotion(t){return $e(this,arguments,function*({currentTcpPose:r,currentJoints:n,coordSystemId:a,velocityInRelevantUnits:s,axis:o,direction:i,motion:l}){var c;const u=[];if(!EE(r.coordinate_system,a))throw new Error(`Current TCP pose coordinate system ${r.coordinate_system} does not match target coordinate system ${a}`);if(l.type==="translate"){const p=Object.assign({},r.position);p[o]+=l.distanceMm*(i==="-"?-1:1),u.push({settings:{limits_override:{tcp_velocity_limit:s}},line:{position:p,orientation:r.orientation,coordinate_system:a}})}else if(l.type==="rotate"){const p=new Ln(r.orientation.x,r.orientation.y,r.orientation.z),m=p.length(),f=p.clone().normalize(),g=l.distanceRads*(i==="-"?-1:1),S=new Ln(0,0,0);S[o]=1;const T=Math.cos(.5*g)*Math.cos(.5*m),O=Math.sin(.5*g)*Math.sin(.5*m),C=Math.sin(.5*g)*Math.cos(.5*m),E=Math.cos(.5*g)*Math.sin(.5*m),R=S.dot(f),P=S.clone().cross(f),_=2*Math.acos(T-O*R),B=_/Math.sin(.5*_),b=new Ln().addScaledVector(P,O).addScaledVector(S,C).addScaledVector(f,E).multiplyScalar(B);u.push({settings:{limits_override:{tcp_orientation_velocity_limit:s}},line:{position:r.position,orientation:b,coordinate_system:a}})}const d=yield this.nova.api.motion.planMotion({motion_group:this.motionGroupId,start_joint_position:n,tcp:this.cartesianJoggingOpts.tcpId,commands:u}),h=(c=d.plan_successful_response)==null?void 0:c.motion;if(!h)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(d)}`);yield this.nova.api.motion.streamMoveForward(h,100,void 0,void 0,void 0,{timeout:1e3*60})})}runIncrementalJointRotation(t){return $e(this,arguments,function*({joint:r,currentJoints:n,velocityRadsPerSec:a,direction:s,distanceRads:o}){var i;const l=[...n.joints];l[r]+=o*(s==="-"?-1:1);const c=new Array(n.joints.length).fill(a),u=yield this.nova.api.motion.planMotion({motion_group:this.motionGroupId,start_joint_position:n,commands:[{settings:{limits_override:{joint_velocity_limits:{joints:c}}},joint_ptp:{joints:l}}]}),d=(i=u.plan_successful_response)==null?void 0:i.motion;if(!d){console.error("Failed to plan jogging increment motion",u);return}yield this.nova.api.motion.streamMoveForward(d,100,void 0,void 0,void 0,{timeout:1e3*60})})}},Yh=1e-4;function d2(e,t){const r=new kt.Vector3(t.x,t.y,t.z),n=new kt.Vector3(e.x,e.y,e.z),a=r.length(),s=r.normalize();let o=n.length(),i=n.normalize();i.dot(s)<0&&(o=-o,i=i.multiplyScalar(-1));let l=o-a;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),o=a+l,i.multiplyScalar(o)}var h2=class gg{constructor(t,r,n,a,s){this.nova=t,this.controller=r,this.motionGroup=n,this.initialMotionState=a,this.motionStateSocket=s,this.rapidlyChangingMotionState=a,s.addEventListener("message",o=>{var i;const l=(i=wr(o.data))==null?void 0:i.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${o.data}`);hg(this.rapidlyChangingMotionState.state.joint_position.joints,l.state.joint_position.joints,Yh)||Xe.runInAction(()=>{this.rapidlyChangingMotionState.state=l.state}),pg(this.rapidlyChangingMotionState.tcp_pose,l.tcp_pose,Yh)||Xe.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:d2(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation),tcp:l.tcp_pose.tcp,coordinate_system:l.tcp_pose.coordinate_system}})}),Xe.makeAutoObservable(this)}static open(t,r){return $e(this,null,function*(){var n;const{instances:a}=yield t.api.controller.listControllers(),[s,o]=r.split("@"),i=a.find(h=>h.controller===o),l=i==null?void 0:i.physical_motion_groups.find(h=>h.motion_group===r);if(!i||!l)throw new Error(`Controller ${o} or motion group ${r} not found`);const c=t.openReconnectingWebsocket(`/motion-groups/${r}/state-stream`),u=yield c.firstMessage();console.log("got first message",u);const d=(n=wr(u.data))==null?void 0:n.result;if(!d)throw new Error(`Unable to parse initial motion state message ${u.data}`);return console.log(`Connected motion state websocket to motion group ${l.motion_group}. Initial state:
|
|
162
|
+
`,d),new gg(t,i,l,d,c)})}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.motionGroup.model_from_controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replaceAll("-","_")}_${t}`}get joints(){return this.initialMotionState.state.joint_position.joints.map((t,r)=>({index:r}))}dispose(){this.motionStateSocket.close()}},p2=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(YI),this.cell=this.withUnwrappedResponsesOnly(hI),this.deviceConfig=this.withCellId(xI),this.motionGroup=this.withCellId(II),this.motionGroupInfos=this.withCellId($I),this.controller=this.withCellId(fI),this.program=this.withCellId(NI),this.programValues=this.withCellId(BI),this.controllerIOs=this.withCellId(gI),this.motionGroupKinematic=this.withCellId(UI),this.motion=this.withCellId(EI),this.coordinateSystems=this.withCellId(bI),this.application=this.withCellId(qh),this.applicationGlobal=this.withUnwrappedResponsesOnly(qh),this.motionGroupJogging=this.withCellId(kI),this.virtualRobot=this.withCellId(XI),this.virtualRobotSetup=this.withCellId(a2),this.virtualRobotMode=this.withCellId(r2),this.virtualRobotBehavior=this.withCellId(e2),this.libraryProgramMetadata=this.withCellId(CI),this.libraryProgram=this.withCellId(OI),this.libraryRecipeMetadata=this.withCellId(AI),this.libraryRecipe=this.withCellId(RI),this.storeObject=this.withCellId(WI),this.storeCollisionComponents=this.withCellId(GI),this.storeCollisionScenes=this.withCellId(qI)}withCellId(e){var t,r;const n=new e(Nl(In({},this.opts),{isJsonMime:a=>a==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:V.create());for(const a of Reflect.ownKeys(Reflect.getPrototypeOf(n)))if(a!=="constructor"&&typeof n[a]=="function"){const s=n[a];n[a]=(...o)=>s.apply(n,[this.cellId,...o]).then(i=>i.data)}return n}withUnwrappedResponsesOnly(e){var t,r;const n=new e(Nl(In({},this.opts),{isJsonMime:a=>a==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:V.create());for(const a of Reflect.ownKeys(Reflect.getPrototypeOf(n)))if(a!=="constructor"&&typeof n[a]=="function"){const s=n[a];n[a]=(...o)=>s.apply(n,o).then(i=>i.data)}return n}},f2=class{constructor(){this.connections=[]}handleAPIRequest(e){return $e(this,null,function*(){var t,r,n;const a=[{method:"GET",path:"/cells/:cellId/controllers",handle(){return{instances:[{controller:"mock-ur5e",model_name:"UniversalRobots::Controller",host:"mock-ur5e",allow_software_install_on_controller:!0,physical_motion_groups:[{motion_group:"0@mock-ur5e",name_from_controller:"UR5e",active:!1,model_from_controller:"UniversalRobots_UR5e"}],has_error:!1,error_details:""}]}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId",handle(){return{configuration:{kind:"VirtualController",manufacturer:"universalrobots",position:"[0,-1.571,-1.571,-1.571,1.571,-1.571,0]",type:"universalrobots-ur5e"},name:"mock-ur5"}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/specification",handle(){return{dh_parameters:[{alpha:1.5707963267948966,theta:0,a:0,d:162.25,reverse_rotation_direction:!1},{alpha:0,theta:0,a:-425,d:0,reverse_rotation_direction:!1},{alpha:0,theta:0,a:-392.2,d:0,reverse_rotation_direction:!1},{alpha:1.5707963267948966,theta:0,a:0,d:133.3,reverse_rotation_direction:!1},{alpha:-1.5707963267948966,theta:0,a:0,d:99.7,reverse_rotation_direction:!1},{alpha:0,theta:0,a:0,d:99.6,reverse_rotation_direction:!1}],mechanical_joint_limits:[{joint:"JOINTNAME_AXIS_1",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_2",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_3",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_4",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_5",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_6",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1}]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/safety-setup",handle(){return{safety_settings:[{safety_state:"SAFETY_NORMAL",settings:{joint_position_limits:[{joint:"JOINTNAME_AXIS_1",lower_limit:-2.96705961227417,upper_limit:2.96705961227417,unlimited:!1},{joint:"JOINTNAME_AXIS_2",lower_limit:-1.7453292608261108,upper_limit:2.7925267219543457,unlimited:!1},{joint:"JOINTNAME_AXIS_3",lower_limit:-3.3161256313323975,upper_limit:.40142571926116943,unlimited:!1},{joint:"JOINTNAME_AXIS_4",lower_limit:-3.4906585216522217,upper_limit:3.4906585216522217,unlimited:!1},{joint:"JOINTNAME_AXIS_5",lower_limit:-2.4434609413146973,upper_limit:2.4434609413146973,unlimited:!1},{joint:"JOINTNAME_AXIS_6",lower_limit:-4.71238899230957,upper_limit:4.71238899230957,unlimited:!1}],joint_velocity_limits:[{joint:"JOINTNAME_AXIS_1",limit:3.1415927410125732},{joint:"JOINTNAME_AXIS_2",limit:3.1415927410125732},{joint:"JOINTNAME_AXIS_3",limit:3.4906585216522217},{joint:"JOINTNAME_AXIS_4",limit:6.108652591705322},{joint:"JOINTNAME_AXIS_5",limit:6.108652591705322},{joint:"JOINTNAME_AXIS_6",limit:6.981317043304443}],joint_acceleration_limits:[],joint_torque_limits:[],tcp_velocity_limit:1800}}],safety_zones:[{id:1,priority:0,geometry:{compound:{child_geometries:[{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:1650,y:-1330,z:-1820},{x:1650,y:1330,z:-1820},{x:-800,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:1650,y:-1330,z:-1820},{x:1650,y:-1330,z:1500},{x:-800,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:-800,y:1330,z:-1820},{x:-800,y:1330,z:1500},{x:-800,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:-800,y:1330,z:1500},{x:-800,y:-1330,z:1500},{x:1650,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:-800,y:1330,z:1500},{x:-800,y:1330,z:-1820},{x:1650,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:1650,y:-1330,z:1500},{x:1650,y:-1330,z:-1820},{x:1650,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Cell workzone"},motion_group_uid:1},{id:2,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:1330,z:-1850},{x:865,y:1330,z:-1850},{x:865,y:-720,z:-1850},{x:1650,y:-720,z:-1850},{x:1650,y:1330,z:-920},{x:865,y:1330,z:-920},{x:865,y:-720,z:-920},{x:1650,y:-720,z:-920}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Transport"},motion_group_uid:1},{id:3,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:1330,z:-600},{x:865,y:1330,z:-600},{x:865,y:430,z:-600},{x:1650,y:430,z:-600},{x:1650,y:1330,z:-1250},{x:865,y:1330,z:-1250},{x:865,y:430,z:-1250},{x:1650,y:430,z:-1250}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Tunel"},motion_group_uid:1},{id:4,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:-760,z:-440},{x:900,y:-760,z:-440},{x:900,y:-1330,z:-440},{x:1650,y:-1330,z:-440},{x:1650,y:-760,z:-1800},{x:900,y:-760,z:-1800},{x:900,y:-1330,z:-1800},{x:1650,y:-1330,z:-1800}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Fanuc controller"},motion_group_uid:1},{id:6,priority:0,geometry:{convex_hull:{vertices:[{x:-200,y:-200,z:-1900},{x:200,y:-200,z:-1900},{x:200,y:200,z:-1900},{x:-200,y:200,z:-1900},{x:-200,y:-200,z:-350},{x:200,y:-200,z:-350},{x:200,y:200,z:-350},{x:-200,y:200,z:-350}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Robot base"},motion_group_uid:1}],robot_model_geometries:[{link_index:1,geometry:{sphere:{radius:270},init_pose:{position:{x:-70,y:-70,z:-50},orientation:{x:0,y:0,z:0,w:1}},id:"link1_sphere"}},{link_index:2,geometry:{capsule:{radius:160,cylinder_height:800},init_pose:{position:{x:-450,y:40,z:170},orientation:{x:0,y:-.7071067811865475,z:0,w:.7071067811865476}},id:"link2_capsule"}},{link_index:3,geometry:{sphere:{radius:270},init_pose:{position:{x:-110,y:10,z:-100},orientation:{x:0,y:0,z:0,w:1}},id:"link3_sphere"}},{link_index:4,geometry:{capsule:{radius:110,cylinder_height:600},init_pose:{position:{x:0,y:300,z:40},orientation:{x:-.7071067811865475,y:0,z:0,w:.7071067811865476}},id:"link4_capsule"}},{link_index:5,geometry:{sphere:{radius:75},init_pose:{position:{x:0,y:0,z:-50},orientation:{x:0,y:0,z:0,w:1}},id:"link5_sphere"}}],tool_geometries:[]}}},{method:"GET",path:"/cells/:cellId/coordinate-systems",handle(){return{coordinatesystems:[{coordinate_system:"",name:"world",reference_uid:"",position:{x:0,y:0,z:0},rotation:{angles:[0,0,0],type:"ROTATION_VECTOR"}}]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/tcps",handle(){return{tcps:[{id:"Flange",readable_name:"Default-Flange",position:{x:0,y:0,z:0},rotation:{angles:[0,0,0,0],type:"ROTATION_VECTOR"}},{id:"complex-tcp-position",readable_name:"Complex TCP Position",position:{x:-200,y:300,z:150},rotation:{angles:[-.12139440409113832,-.06356210998212003,-.2023240068185639,0],type:"ROTATION_VECTOR"}}]}}}],s=((t=e.method)==null?void 0:t.toUpperCase())||"GET",o="/cells"+((n=(r=e.url)==null?void 0:r.split("/cells")[1])==null?void 0:n.split("?")[0]);for(const i of a){const l=l2.match(i.path)(o||"");if(s===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 Jl(`No mock handler matched this request: ${s} ${o}`,"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(m2)})),e.url.includes("/move-joint")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{motion_group:"0@ur",state:{controller:"ur",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",timestamp:"2024-09-18T12:48:26.096266444Z",velocity_override:100,motion_groups:[{motion_group:"0@ur",controller:"ur",joint_position:{joints:[1.3492152690887451,-1.5659207105636597,1.6653711795806885,-1.0991662740707397,-1.829018235206604,1.264623761177063]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:6.437331889439328,y:-628.4123774830913,z:577.0569957147832},orientation:{x:-1.683333649797158,y:-1.9783363827298732,z:-.4928031860165713},coordinate_system:""},tcp_pose:{position:{x:6.437331889439328,y:-628.4123774830913,z:577.0569957147832},orientation:{x:-1.683333649797158,y:-1.9783363827298732,z:-.4928031860165713},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:-0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"671259"}],sequence_number:"671259"},movement_state:"MOVEMENT_STATE_MOVING"}})})),e.url.includes("/move-tcp")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{motion_group:"0@ur",state:{controller:"ur",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",timestamp:"2024-09-18T12:43:12.188335774Z",velocity_override:100,motion_groups:[{motion_group:"0@ur",controller:"ur",joint_position:{joints:[1.3352527618408203,-1.5659207105636597,1.6653711795806885,-1.110615611076355,-1.829018235206604,1.264623761177063]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:-2.763015284002938,y:-630.2151479701106,z:577.524509114342},orientation:{x:-1.704794877102097,y:-1.9722372952861567,z:-.4852079204210754},coordinate_system:""},tcp_pose:{position:{x:-2.763015284002938,y:-630.2151479701106,z:577.524509114342},orientation:{x:-1.704794877102097,y:-1.9722372952861567,z:-.4852079204210754},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:-0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"627897"}],sequence_number:"627897"},movement_state:"MOVEMENT_STATE_MOVING"}})}))},10)}handleWebsocketMessage(e,t){console.log(`Received message on ${e.url}`,t)}},m2={result:{state:{motion_group:"0@universalrobots-ur5e",controller:"universalrobots-ur5e",joint_position:{joints:[1.1699999570846558,-1.5700000524520874,1.3600000143051147,1.0299999713897705,1.2899999618530273,1.2799999713897705]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:1.3300010259703043,y:-409.2680714682808,z:531.0203477065281},orientation:{x:1.7564919306270736,y:-1.7542521568325058,z:.7326972590614671},coordinate_system:""},tcp_pose:{position:{x:1.3300010259703043,y:-409.2680714682808,z:531.0203477065281},orientation:{x:1.7564919306270736,y:-1.7542521568325058,z:.7326972590614671},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]}},tcp_pose:{position:{x:302.90748476115556,y:-152.87065869452337,z:424.0454619321661},orientation:{x:2.3403056115045353,y:-1.1706836379431356,z:.9772511964246311},coordinate_system:"",tcp:"Flange"}}},g2=class{constructor(e){this.authPromise=null,this.accessToken=null;var t;const r=(t=e.cellId)!=null?t:"cell";this.config=In({cellId:r},e),this.accessToken=e.accessToken||nl.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"&&(this.mock=new f2);const n=V.create({baseURL:ul(this.config.instanceUrl,"/api/v1")});n.interceptors.request.use(a=>$e(this,null,function*(){return a.headers.Authorization||(this.accessToken?a.headers.Authorization=`Bearer ${this.accessToken}`:this.config.username&&this.config.password&&(a.headers.Authorization=`Basic ${btoa(e.username+":"+e.password)}`)),a})),typeof window<"u"&&n.interceptors.response.use(a=>a,a=>$e(this,null,function*(){var s,o;if(lI(a))if(((s=a.response)==null?void 0:s.status)===401)try{if(yield this.renewAuthentication(),a.config)return this.accessToken?a.config.headers.Authorization=`Bearer ${this.accessToken}`:delete a.config.headers.Authorization,n.request(a.config)}catch(i){return Promise.reject(i)}else((o=a.response)==null?void 0:o.status)===503&&(yield fetch(window.location.href)).status===503&&window.location.reload();return Promise.reject(a)})),this.api=new p2(r,Nl(In({},e),{basePath:ul(this.config.instanceUrl,"/api/v1"),isJsonMime:a=>a==="application/json",baseOptions:In(In({},this.mock?{adapter:a=>this.mock.handleAPIRequest(a)}:{}),e.baseOptions),axiosInstance:n}))}renewAuthentication(){return $e(this,null,function*(){if(!this.authPromise){this.authPromise=IE(this.config.instanceUrl);try{this.accessToken=yield this.authPromise,this.accessToken?nl.setString("wbjs.access_token",this.accessToken):nl.delete("wbjs.access_token")}finally{this.authPromise=null}}})}makeWebsocketURL(e){const t=new URL(ul(this.config.instanceUrl,`/api/v1/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 AE(this.makeWebsocketURL(e),{mock:this.mock})}connectMotionStream(e){return $e(this,null,function*(){return yield h2.open(this,e)})}connectJogger(e){return $e(this,null,function*(){return yield u2.open(this,e)})}connectMotionGroups(e){return $e(this,null,function*(){const{instances:t}=yield this.api.controller.listControllers();return Promise.all(e.map(r=>c2.connect(this,r,t)))})}connectMotionGroup(e){return $e(this,null,function*(){return(yield this.connectMotionGroups([e]))[0]})}};function y2(e){try{return JSON.stringify(e)}catch{return}}function b2(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function v2(e){var t,r,n,a;return e instanceof Jl&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof Jl&&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((a=e.response)==null?void 0:a.data)}`:e instanceof Error?e.message:`Unexpected error: ${y2(e)||e}`}const Kc=e=>{const t=e.softTimeout||3e3,[r,n]=se.useState(!1),a=W.useTheme();return se.useEffect(()=>{const s=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(s)}),x.jsx(W.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:a.palette.text.primary},children:e.error?x.jsx(yg,{loadingMessage:e.message,error:e.error}):x.jsxs(x.Fragment,{children:[x.jsx(W.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&x.jsx("div",{children:e.message}),x.jsx(W.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:a.palette.text.secondary},children:"This is taking longer than expected..."})]})})},yg=e=>{const t=v2(e.error),r=e.error instanceof Error?e.error.stack:null,n=W.useTheme();return x.jsxs(W.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 ${tc.lowerFirst(W.capitalize(e.loadingMessage))} - `:"")+t,x.jsx("br",{}),r&&x.jsx("pre",{children:r})]})},x2=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),S2=se.forwardRef(x2),O2=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),w2=se.forwardRef(O2),C2=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),P2=se.forwardRef(C2),R2=({title:e,titleId:t,...r},n)=>F.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?F.createElement("title",{id:t},e):null,F.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"})),T2=se.forwardRef(R2);function A2(){this.__data__=[],this.size=0}function bg(e,t){return e===t||e!==e&&t!==t}function gi(e,t){for(var r=e.length;r--;)if(bg(e[r][0],t))return r;return-1}var V2=Array.prototype,E2=V2.splice;function _2(e){var t=this.__data__,r=gi(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():E2.call(t,r,1),--this.size,!0}function I2(e){var t=this.__data__,r=gi(t,e);return r<0?void 0:t[r][1]}function M2(e){return gi(this.__data__,e)>-1}function $2(e,t){var r=this.__data__,n=gi(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function pr(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])}}pr.prototype.clear=A2;pr.prototype.delete=_2;pr.prototype.get=I2;pr.prototype.has=M2;pr.prototype.set=$2;function j2(){this.__data__=new pr,this.size=0}function k2(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function L2(e){return this.__data__.get(e)}function U2(e){return this.__data__.has(e)}var D2="[object AsyncFunction]",N2="[object Function]",F2="[object GeneratorFunction]",B2="[object Proxy]";function vg(e){if(!Hr(e))return!1;var t=rn(e);return t==N2||t==F2||t==D2||t==B2}var dl=Zt["__core-js_shared__"],Qh=function(){var e=/[^.]+$/.exec(dl&&dl.keys&&dl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function z2(e){return!!Qh&&Qh in e}var G2=Function.prototype,H2=G2.toString;function an(e){if(e!=null){try{return H2.call(e)}catch{}try{return e+""}catch{}}return""}var q2=/[\\^$.*+?()[\]{}|]/g,J2=/^\[object .+?Constructor\]$/,W2=Function.prototype,K2=Object.prototype,Y2=W2.toString,Q2=K2.hasOwnProperty,X2=RegExp("^"+Y2.call(Q2).replace(q2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Z2(e){if(!Hr(e)||z2(e))return!1;var t=vg(e)?X2:J2;return t.test(an(e))}function eM(e,t){return e==null?void 0:e[t]}function sn(e,t){var r=eM(e,t);return Z2(r)?r:void 0}var Qa=sn(Zt,"Map"),Xa=sn(Object,"create");function tM(){this.__data__=Xa?Xa(null):{},this.size=0}function rM(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var nM="__lodash_hash_undefined__",aM=Object.prototype,sM=aM.hasOwnProperty;function oM(e){var t=this.__data__;if(Xa){var r=t[e];return r===nM?void 0:r}return sM.call(t,e)?t[e]:void 0}var iM=Object.prototype,lM=iM.hasOwnProperty;function cM(e){var t=this.__data__;return Xa?t[e]!==void 0:lM.call(t,e)}var uM="__lodash_hash_undefined__";function dM(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Xa&&t===void 0?uM:t,this}function Wr(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])}}Wr.prototype.clear=tM;Wr.prototype.delete=rM;Wr.prototype.get=oM;Wr.prototype.has=cM;Wr.prototype.set=dM;function hM(){this.size=0,this.__data__={hash:new Wr,map:new(Qa||pr),string:new Wr}}function pM(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function yi(e,t){var r=e.__data__;return pM(t)?r[typeof t=="string"?"string":"hash"]:r.map}function fM(e){var t=yi(this,e).delete(e);return this.size-=t?1:0,t}function mM(e){return yi(this,e).get(e)}function gM(e){return yi(this,e).has(e)}function yM(e,t){var r=yi(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function fr(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])}}fr.prototype.clear=hM;fr.prototype.delete=fM;fr.prototype.get=mM;fr.prototype.has=gM;fr.prototype.set=yM;var bM=200;function vM(e,t){var r=this.__data__;if(r instanceof pr){var n=r.__data__;if(!Qa||n.length<bM-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new fr(n)}return r.set(e,t),this.size=r.size,this}function sr(e){var t=this.__data__=new pr(e);this.size=t.size}sr.prototype.clear=j2;sr.prototype.delete=k2;sr.prototype.get=L2;sr.prototype.has=U2;sr.prototype.set=vM;var xM="__lodash_hash_undefined__";function SM(e){return this.__data__.set(e,xM),this}function OM(e){return this.__data__.has(e)}function Ro(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new fr;++t<r;)this.add(e[t])}Ro.prototype.add=Ro.prototype.push=SM;Ro.prototype.has=OM;function wM(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 CM(e,t){return e.has(t)}var PM=1,RM=2;function xg(e,t,r,n,a,s){var o=r&PM,i=e.length,l=t.length;if(i!=l&&!(o&&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&RM?new Ro:void 0;for(s.set(e,t),s.set(t,e);++d<i;){var m=e[d],f=t[d];if(n)var g=o?n(f,m,d,t,e,s):n(m,f,d,e,t,s);if(g!==void 0){if(g)continue;h=!1;break}if(p){if(!wM(t,function(S,T){if(!CM(p,T)&&(m===S||a(m,S,r,n,s)))return p.push(T)})){h=!1;break}}else if(!(m===f||a(m,f,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}var Xh=Zt.Uint8Array;function TM(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function AM(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var VM=1,EM=2,_M="[object Boolean]",IM="[object Date]",MM="[object Error]",$M="[object Map]",jM="[object Number]",kM="[object RegExp]",LM="[object Set]",UM="[object String]",DM="[object Symbol]",NM="[object ArrayBuffer]",FM="[object DataView]",Zh=Tr?Tr.prototype:void 0,hl=Zh?Zh.valueOf:void 0;function BM(e,t,r,n,a,s,o){switch(r){case FM:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case NM:return!(e.byteLength!=t.byteLength||!s(new Xh(e),new Xh(t)));case _M:case IM:case jM:return bg(+e,+t);case MM:return e.name==t.name&&e.message==t.message;case kM:case UM:return e==t+"";case $M:var i=TM;case LM:var l=n&VM;if(i||(i=AM),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;n|=EM,o.set(e,t);var u=xg(i(e),i(t),n,a,s,o);return o.delete(e),u;case DM:if(hl)return hl.call(e)==hl.call(t)}return!1}function zM(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Xt=Array.isArray;function GM(e,t,r){var n=t(e);return Xt(e)?n:zM(n,r(e))}function HM(e,t){for(var r=-1,n=e==null?0:e.length,a=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[a++]=o)}return s}function qM(){return[]}var JM=Object.prototype,WM=JM.propertyIsEnumerable,ep=Object.getOwnPropertySymbols,KM=ep?function(e){return e==null?[]:(e=Object(e),HM(ep(e),function(t){return WM.call(e,t)}))}:qM;function YM(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var QM="[object Arguments]";function tp(e){return qr(e)&&rn(e)==QM}var Sg=Object.prototype,XM=Sg.hasOwnProperty,ZM=Sg.propertyIsEnumerable,Og=tp(function(){return arguments}())?tp:function(e){return qr(e)&&XM.call(e,"callee")&&!ZM.call(e,"callee")};function e5(){return!1}var wg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,rp=wg&&typeof module=="object"&&module&&!module.nodeType&&module,t5=rp&&rp.exports===wg,np=t5?Zt.Buffer:void 0,r5=np?np.isBuffer:void 0,Kl=r5||e5,n5=9007199254740991,a5=/^(?:0|[1-9]\d*)$/;function Cg(e,t){var r=typeof e;return t=t??n5,!!t&&(r=="number"||r!="symbol"&&a5.test(e))&&e>-1&&e%1==0&&e<t}var s5=9007199254740991;function Yc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=s5}var o5="[object Arguments]",i5="[object Array]",l5="[object Boolean]",c5="[object Date]",u5="[object Error]",d5="[object Function]",h5="[object Map]",p5="[object Number]",f5="[object Object]",m5="[object RegExp]",g5="[object Set]",y5="[object String]",b5="[object WeakMap]",v5="[object ArrayBuffer]",x5="[object DataView]",S5="[object Float32Array]",O5="[object Float64Array]",w5="[object Int8Array]",C5="[object Int16Array]",P5="[object Int32Array]",R5="[object Uint8Array]",T5="[object Uint8ClampedArray]",A5="[object Uint16Array]",V5="[object Uint32Array]",Me={};Me[S5]=Me[O5]=Me[w5]=Me[C5]=Me[P5]=Me[R5]=Me[T5]=Me[A5]=Me[V5]=!0;Me[o5]=Me[i5]=Me[v5]=Me[l5]=Me[x5]=Me[c5]=Me[u5]=Me[d5]=Me[h5]=Me[p5]=Me[f5]=Me[m5]=Me[g5]=Me[y5]=Me[b5]=!1;function E5(e){return qr(e)&&Yc(e.length)&&!!Me[rn(e)]}function _5(e){return function(t){return e(t)}}var Pg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ja=Pg&&typeof module=="object"&&module&&!module.nodeType&&module,I5=ja&&ja.exports===Pg,pl=I5&&Cm.process,ap=function(){try{var e=ja&&ja.require&&ja.require("util").types;return e||pl&&pl.binding&&pl.binding("util")}catch{}}(),sp=ap&&ap.isTypedArray,Rg=sp?_5(sp):E5,M5=Object.prototype,$5=M5.hasOwnProperty;function j5(e,t){var r=Xt(e),n=!r&&Og(e),a=!r&&!n&&Kl(e),s=!r&&!n&&!a&&Rg(e),o=r||n||a||s,i=o?YM(e.length,String):[],l=i.length;for(var c in e)$5.call(e,c)&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Cg(c,l)))&&i.push(c);return i}var k5=Object.prototype;function L5(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||k5;return e===r}function U5(e,t){return function(r){return e(t(r))}}var D5=U5(Object.keys,Object),N5=Object.prototype,F5=N5.hasOwnProperty;function B5(e){if(!L5(e))return D5(e);var t=[];for(var r in Object(e))F5.call(e,r)&&r!="constructor"&&t.push(r);return t}function Tg(e){return e!=null&&Yc(e.length)&&!vg(e)}function Qc(e){return Tg(e)?j5(e):B5(e)}function op(e){return GM(e,Qc,KM)}var z5=1,G5=Object.prototype,H5=G5.hasOwnProperty;function q5(e,t,r,n,a,s){var o=r&z5,i=op(e),l=i.length,c=op(t),u=c.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var h=i[d];if(!(o?h in t:H5.call(t,h)))return!1}var p=s.get(e),m=s.get(t);if(p&&m)return p==t&&m==e;var f=!0;s.set(e,t),s.set(t,e);for(var g=o;++d<l;){h=i[d];var S=e[h],T=t[h];if(n)var O=o?n(T,S,h,t,e,s):n(S,T,h,e,t,s);if(!(O===void 0?S===T||a(S,T,r,n,s):O)){f=!1;break}g||(g=h=="constructor")}if(f&&!g){var C=e.constructor,E=t.constructor;C!=E&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof E=="function"&&E instanceof E)&&(f=!1)}return s.delete(e),s.delete(t),f}var Yl=sn(Zt,"DataView"),Ql=sn(Zt,"Promise"),Xl=sn(Zt,"Set"),Zl=sn(Zt,"WeakMap"),ip="[object Map]",J5="[object Object]",lp="[object Promise]",cp="[object Set]",up="[object WeakMap]",dp="[object DataView]",W5=an(Yl),K5=an(Qa),Y5=an(Ql),Q5=an(Xl),X5=an(Zl),Sr=rn;(Yl&&Sr(new Yl(new ArrayBuffer(1)))!=dp||Qa&&Sr(new Qa)!=ip||Ql&&Sr(Ql.resolve())!=lp||Xl&&Sr(new Xl)!=cp||Zl&&Sr(new Zl)!=up)&&(Sr=function(e){var t=rn(e),r=t==J5?e.constructor:void 0,n=r?an(r):"";if(n)switch(n){case W5:return dp;case K5:return ip;case Y5:return lp;case Q5:return cp;case X5:return up}return t});var Z5=1,hp="[object Arguments]",pp="[object Array]",Ms="[object Object]",e$=Object.prototype,fp=e$.hasOwnProperty;function t$(e,t,r,n,a,s){var o=Xt(e),i=Xt(t),l=o?pp:Sr(e),c=i?pp:Sr(t);l=l==hp?Ms:l,c=c==hp?Ms:c;var u=l==Ms,d=c==Ms,h=l==c;if(h&&Kl(e)){if(!Kl(t))return!1;o=!0,u=!1}if(h&&!u)return s||(s=new sr),o||Rg(e)?xg(e,t,r,n,a,s):BM(e,t,l,r,n,a,s);if(!(r&Z5)){var p=u&&fp.call(e,"__wrapped__"),m=d&&fp.call(t,"__wrapped__");if(p||m){var f=p?e.value():e,g=m?t.value():t;return s||(s=new sr),a(f,g,r,n,s)}}return h?(s||(s=new sr),q5(e,t,r,n,a,s)):!1}function bi(e,t,r,n,a){return e===t?!0:e==null||t==null||!qr(e)&&!qr(t)?e!==e&&t!==t:t$(e,t,r,n,bi,a)}function r$(e,t){return bi(e,t)}const Ag=({store:e})=>{const{t}=ze.useTranslation(),[r,n]=se.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),a=se.useRef(r);Yn(()=>{const o=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;r$(a.current,o)||(a.current=o,n(o))});const s=[];for(const[o,i]of r.entries())i&&s.push(o);return x.jsx(W.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(o=>o+1).join(", ")})})},n$=W.styled(W.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 $s({labelValue:e,...t}){return x.jsxs(n$,{fullWidth:!0,variant:"filled",children:[x.jsx(W.InputLabel,{id:t.labelId,children:e}),x.jsx(W.Select,{...t})]})}var mp=function(){try{var e=sn(Object,"defineProperty");return e({},"",{}),e}catch{}}();function a$(e,t,r){t=="__proto__"&&mp?mp(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function s$(e,t,r,n){for(var a=-1,s=e==null?0:e.length;++a<s;){var o=e[a];t(n,o,r(o),e)}return n}function o$(e){return function(t,r,n){for(var a=-1,s=Object(t),o=n(t),i=o.length;i--;){var l=o[++a];if(r(s[l],l,s)===!1)break}return t}}var i$=o$();function l$(e,t){return e&&i$(e,t,Qc)}function c$(e,t){return function(r,n){if(r==null)return r;if(!Tg(r))return e(r,n);for(var a=r.length,s=-1,o=Object(r);++s<a&&n(o[s],s,o)!==!1;);return r}}var u$=c$(l$);function d$(e,t,r,n){return u$(e,function(a,s,o){t(n,a,r(a),o)}),n}var h$=1,p$=2;function f$(e,t,r,n){var a=r.length,s=a;if(e==null)return!s;for(e=Object(e);a--;){var o=r[a];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<s;){o=r[a];var i=o[0],l=e[i],c=o[1];if(o[2]){if(l===void 0&&!(i in e))return!1}else{var u=new sr,d;if(!(d===void 0?bi(c,l,h$|p$,n,u):d))return!1}}return!0}function Vg(e){return e===e&&!Hr(e)}function m$(e){for(var t=Qc(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,Vg(a)]}return t}function Eg(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function g$(e){var t=m$(e);return t.length==1&&t[0][2]?Eg(t[0][0],t[0][1]):function(r){return r===e||f$(r,e,t)}}var y$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,b$=/^\w*$/;function Xc(e,t){if(Xt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||oi(e)?!0:b$.test(e)||!y$.test(e)||t!=null&&e in Object(t)}var v$="Expected a function";function Zc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(v$);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],s=r.cache;if(s.has(a))return s.get(a);var o=e.apply(this,n);return r.cache=s.set(a,o)||s,o};return r.cache=new(Zc.Cache||fr),r}Zc.Cache=fr;var x$=500;function S$(e){var t=Zc(e,function(n){return r.size===x$&&r.clear(),n}),r=t.cache;return t}var O$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w$=/\\(\\)?/g,C$=S$(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(O$,function(r,n,a,s){t.push(a?s.replace(w$,"$1"):n||r)}),t});function P$(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var gp=Tr?Tr.prototype:void 0,yp=gp?gp.toString:void 0;function _g(e){if(typeof e=="string")return e;if(Xt(e))return P$(e,_g)+"";if(oi(e))return yp?yp.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Ig(e){return e==null?"":_g(e)}function Mg(e,t){return Xt(e)?e:Xc(e,t)?[e]:C$(Ig(e))}function vi(e){if(typeof e=="string"||oi(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function $g(e,t){t=Mg(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[vi(t[r++])];return r&&r==n?e:void 0}function R$(e,t,r){var n=e==null?void 0:$g(e,t);return n===void 0?r:n}function T$(e,t){return e!=null&&t in Object(e)}function A$(e,t,r){t=Mg(t,e);for(var n=-1,a=t.length,s=!1;++n<a;){var o=vi(t[n]);if(!(s=e!=null&&r(e,o)))break;e=e[o]}return s||++n!=a?s:(a=e==null?0:e.length,!!a&&Yc(a)&&Cg(o,a)&&(Xt(e)||Og(e)))}function V$(e,t){return e!=null&&A$(e,t,T$)}var E$=1,_$=2;function I$(e,t){return Xc(e)&&Vg(t)?Eg(vi(e),t):function(r){var n=R$(r,e);return n===void 0&&n===t?V$(r,e):bi(t,n,E$|_$)}}function M$(e){return e}function $$(e){return function(t){return t==null?void 0:t[e]}}function j$(e){return function(t){return $g(t,e)}}function k$(e){return Xc(e)?$$(vi(e)):j$(e)}function L$(e){return typeof e=="function"?e:e==null?M$:typeof e=="object"?Xt(e)?I$(e[0],e[1]):g$(e):k$(e)}function U$(e,t){return function(r,n){var a=Xt(r)?s$:d$,s={};return a(r,e,L$(n),s)}}var js=U$(function(e,t,r){a$(e,r,t)}),D$=0;function N$(e){var t=++D$;return Ig(e)+t}const ec=[{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}],F$=[{id:"continuous"},...ec],B$=["coordsys","tool"];class xi{constructor(t,r,n,a){var s,o;this.jogger=t,this.motionGroupSpec=r,this.coordSystems=n,this.tcps=a,this.selectedTabId="cartesian",this.activationState="inactive",this.activationError=null,this.activationCounter=0,this.locks=new Set,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=!0,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 n)if(i.coordinate_system===""){i.coordinate_system="world";break}this.selectedCoordSystemId=((s=n[0])==null?void 0:s.coordinate_system)||"world",this.selectedTcpId=((o=a[0])==null?void 0:o.id)||"",Xe.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(Xe.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[n,{coordinatesystems:a},{tcps:s}]=await Promise.all([r.api.motionGroupInfos.getMotionGroupSpecification(t.motionGroupId),r.api.coordinateSystems.listCoordinateSystems("ROTATION_VECTOR"),r.api.motionGroupInfos.listTcps(t.motionGroupId,"ROTATION_VECTOR")]);return new xi(t,n,a||[],s||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return tc.countBy(this.coordSystems,t=>t.name)}async deactivate(){const t=this.jogger.activeWebsocket;this.jogger.setJoggingMode("increment"),t&&await t.closed()}async activate(){if(this.currentTab.id==="cartesian"){const t={tcpId:this.selectedTcpId,coordSystemId:this.activeCoordSystemId};this.activeDiscreteIncrement?this.jogger.setJoggingMode("increment",t):this.jogger.setJoggingMode("cartesian",t)}else this.jogger.setJoggingMode("joint");return this.jogger}loadFromLocalStorage(){const t=Nr.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 F$}get discreteIncrementOptions(){return ec}get incrementOptionsById(){return js(this.incrementOptions,t=>t.id)}get tabsById(){return js(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 js(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 js(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:ec.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)}async withMotionLock(t){const r=N$();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const z$=Je.observer(({store:e})=>{var a;const{t}=ze.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(x.jsx($s,{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=>x.jsx(W.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(x.jsx($s,{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=>x.jsx(W.MenuItem,{value:s.id,children:s.id},s.id))},"tcp")),e.showOrientationSelect&&r.push(x.jsx($s,{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:B$.map(s=>x.jsx(W.MenuItem,{value:s,children:n(s)},s))},"orientation")),e.showIncrementSelect&&r.push(x.jsxs($s,{labelValue:t("Jogging.Increment.hlb"),labelId:"jogging-increment-select",size:"small",variant:"filled",value:((a=e.activeDiscreteIncrement)==null?void 0:a.id)||"continuous",onChange:s=>e.setSelectedIncrementId(s.target.value),disabled:e.isLocked,children:[x.jsx(W.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(s=>x.jsx(W.MenuItem,{value:s.id,children:e.currentMotionType==="translate"?`${s.mm}mm`:`${s.degrees}°`},s.id))]},"increment")),x.jsx(W.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,o)=>x.jsx(W.Box,{sx:{gridColumn:r.length%2===1&&o===r.length-1?"span 2":"auto"},children:s},o))})}),G$=W.styled(W.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 H$(e,t,r=(n,a)=>n===a){return e.length===t.length&&e.every((n,a)=>r(n,t[a]))}const q$=2;function An(e,t,r,n,a){return r===1?Math.min(e+t,a):Math.max(e-t,n)}function jg(e,t){return e-t}function bp(e,t){const{index:r}=e.reduce((n,a,s)=>{const o=Math.abs(t-a);return n===null||o<n.distance||o===n.distance?{distance:o,index:s}:n},null)??{};return r}function ks(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const a=r.changedTouches[n];if(a.identifier===t.current)return{x:a.clientX,y:a.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function To(e,t,r){return(e-t)*100/(r-t)}function J$(e,t,r){return(r-t)*e+t}function W$(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 K$(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(W$(t)))}function vp({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(jg)}function Ls({sliderRef:e,activeIndex:t,setActive:r}){var a,s,o;const n=Fs(e.current);(!((a=e.current)!=null&&a.contains(n.activeElement))||Number((s=n==null?void 0:n.activeElement)==null?void 0:s.getAttribute("data-index"))!==t)&&((o=e.current)==null||o.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function Us(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?H$(e,t):!1}const Y$={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}%`})}},Q$=e=>e;let Ds;function xp(){return Ds===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Ds=CSS.supports("touch-action","none"):Ds=!0),Ds}function X$(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:a=!1,isRtl:s=!1,marks:o=!1,max:i=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:p,scale:m=Q$,step:f=1,shiftStep:g=10,tabIndex:S,value:T}=e,O=F.useRef(void 0),[C,E]=F.useState(-1),[R,P]=F.useState(-1),[_,B]=F.useState(!1),b=F.useRef(0),A=F.useRef(null),[z,I]=rb({controlled:T,default:r??l,name:"Slider"}),G=u&&((Q,ee,le)=>{const ve=Q.nativeEvent||Q,Ce=new ve.constructor(ve.type,ve);Object.defineProperty(Ce,"target",{writable:!0,value:{value:ee,name:c}}),A.current=ee,u(Ce,ee,le)}),re=Array.isArray(z);let te=re?z.slice().sort(jg):[z];te=te.map(Q=>Q==null?l:Vn(Q,l,i));const oe=o===!0&&f!==null?[...Array(Math.floor((i-l)/f)+1)].map((Q,ee)=>({value:l+f*ee})):o||[],Z=oe.map(Q=>Q.value),[ae,ge]=F.useState(-1),ue=F.useRef(null),De=zp(p,ue),ct=Q=>ee=>{var ve;const le=Number(ee.currentTarget.getAttribute("data-index"));Cu(ee.target)&&ge(le),P(le),(ve=Q==null?void 0:Q.onFocus)==null||ve.call(Q,ee)},It=Q=>ee=>{var le;Cu(ee.target)||ge(-1),P(-1),(le=Q==null?void 0:Q.onBlur)==null||le.call(Q,ee)},tt=(Q,ee)=>{const le=Number(Q.currentTarget.getAttribute("data-index")),ve=te[le],Ce=Z.indexOf(ve);let ce=ee;if(oe&&f==null){const Ke=Z[Z.length-1];ce>=Ke?ce=Ke:ce<=Z[0]?ce=Z[0]:ce=ce<ve?Z[Ce-1]:Z[Ce+1]}if(ce=Vn(ce,l,i),re){a&&(ce=Vn(ce,te[le-1]||-1/0,te[le+1]||1/0));const Ke=ce;ce=vp({values:te,newValue:ce,index:le});let at=le;a||(at=ce.indexOf(Ke)),Ls({sliderRef:ue,activeIndex:at})}I(ce),ge(le),G&&!Us(ce,z)&&G(Q,ce,le),d&&d(Q,A.current??ce)},St=Q=>ee=>{var le;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(ee.key)){ee.preventDefault();const ve=Number(ee.currentTarget.getAttribute("data-index")),Ce=te[ve];let ce=null;if(f!=null){const Ke=ee.shiftKey?g:f;switch(ee.key){case"ArrowUp":ce=An(Ce,Ke,1,l,i);break;case"ArrowRight":ce=An(Ce,Ke,s?-1:1,l,i);break;case"ArrowDown":ce=An(Ce,Ke,-1,l,i);break;case"ArrowLeft":ce=An(Ce,Ke,s?1:-1,l,i);break;case"PageUp":ce=An(Ce,g,1,l,i);break;case"PageDown":ce=An(Ce,g,-1,l,i);break;case"Home":ce=l;break;case"End":ce=i;break}}else if(oe){const Ke=Z[Z.length-1],at=Z.indexOf(Ce),Ge=[s?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],ft=[s?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Ge.includes(ee.key)?at===0?ce=Z[0]:ce=Z[at-1]:ft.includes(ee.key)&&(at===Z.length-1?ce=Ke:ce=Z[at+1])}ce!=null&&tt(ee,ce)}(le=Q==null?void 0:Q.onKeyDown)==null||le.call(Q,ee)};Fp(()=>{var Q;n&&ue.current.contains(document.activeElement)&&((Q=document.activeElement)==null||Q.blur())},[n]),n&&C!==-1&&E(-1),n&&ae!==-1&&ge(-1);const pt=Q=>ee=>{var le;(le=Q.onChange)==null||le.call(Q,ee),tt(ee,ee.target.valueAsNumber)},rt=F.useRef(void 0);let X=h;s&&h==="horizontal"&&(X+="-reverse");const ie=({finger:Q,move:ee=!1})=>{const{current:le}=ue,{width:ve,height:Ce,bottom:ce,left:Ke}=le.getBoundingClientRect();let at;X.startsWith("vertical")?at=(ce-Q.y)/Ce:at=(Q.x-Ke)/ve,X.includes("-reverse")&&(at=1-at);let Ge;if(Ge=J$(at,l,i),f)Ge=K$(Ge,f,l);else{const Er=bp(Z,Ge);Ge=Z[Er]}Ge=Vn(Ge,l,i);let ft=0;if(re){ee?ft=rt.current:ft=bp(te,Ge),a&&(Ge=Vn(Ge,te[ft-1]||-1/0,te[ft+1]||1/0));const Er=Ge;Ge=vp({values:te,newValue:Ge,index:ft}),a&&ee||(ft=Ge.indexOf(Er),rt.current=ft)}return{newValue:Ge,activeIndex:ft}},he=Ai(Q=>{const ee=ks(Q,O);if(!ee)return;if(b.current+=1,Q.type==="mousemove"&&Q.buttons===0){J(Q);return}const{newValue:le,activeIndex:ve}=ie({finger:ee,move:!0});Ls({sliderRef:ue,activeIndex:ve,setActive:E}),I(le),!_&&b.current>q$&&B(!0),G&&!Us(le,z)&&G(Q,le,ve)}),J=Ai(Q=>{const ee=ks(Q,O);if(B(!1),!ee)return;const{newValue:le}=ie({finger:ee,move:!0});E(-1),Q.type==="touchend"&&P(-1),d&&d(Q,A.current??le),O.current=void 0,be()}),Oe=Ai(Q=>{if(n)return;xp()||Q.preventDefault();const ee=Q.changedTouches[0];ee!=null&&(O.current=ee.identifier);const le=ks(Q,O);if(le!==!1){const{newValue:Ce,activeIndex:ce}=ie({finger:le});Ls({sliderRef:ue,activeIndex:ce,setActive:E}),I(Ce),G&&!Us(Ce,z)&&G(Q,Ce,ce)}b.current=0;const ve=Fs(ue.current);ve.addEventListener("touchmove",he,{passive:!0}),ve.addEventListener("touchend",J,{passive:!0})}),be=F.useCallback(()=>{const Q=Fs(ue.current);Q.removeEventListener("mousemove",he),Q.removeEventListener("mouseup",J),Q.removeEventListener("touchmove",he),Q.removeEventListener("touchend",J)},[J,he]);F.useEffect(()=>{const{current:Q}=ue;return Q.addEventListener("touchstart",Oe,{passive:xp()}),()=>{Q.removeEventListener("touchstart",Oe),be()}},[be,Oe]),F.useEffect(()=>{n&&be()},[n,be]);const Ne=Q=>ee=>{var Ce;if((Ce=Q.onMouseDown)==null||Ce.call(Q,ee),n||ee.defaultPrevented||ee.button!==0)return;ee.preventDefault();const le=ks(ee,O);if(le!==!1){const{newValue:ce,activeIndex:Ke}=ie({finger:le});Ls({sliderRef:ue,activeIndex:Ke,setActive:E}),I(ce),G&&!Us(ce,z)&&G(ee,ce,Ke)}b.current=0;const ve=Fs(ue.current);ve.addEventListener("mousemove",he,{passive:!0}),ve.addEventListener("mouseup",J)},ke=To(re?te[0]:l,l,i),_e=To(te[te.length-1],l,i)-ke,Mt=(Q={})=>{const ee=Bs(Q),le={onMouseDown:Ne(ee||{})},ve={...ee,...le};return{...Q,ref:De,...ve}},er=Q=>ee=>{var ve;(ve=Q.onMouseOver)==null||ve.call(Q,ee);const le=Number(ee.currentTarget.getAttribute("data-index"));P(le)},on=Q=>ee=>{var le;(le=Q.onMouseLeave)==null||le.call(Q,ee),P(-1)},ln=(Q={})=>{const ee=Bs(Q),le={onMouseOver:er(ee||{}),onMouseLeave:on(ee||{})};return{...Q,...ee,...le}},mr=Q=>({pointerEvents:C!==-1&&C!==Q?"none":void 0});let gr;return h==="vertical"&&(gr=s?"vertical-rl":"vertical-lr"),{active:C,axis:X,axisProps:Y$,dragging:_,focusedThumbIndex:ae,getHiddenInputProps:(Q={})=>{const ee=Bs(Q),le={onChange:pt(ee||{}),onFocus:ct(ee||{}),onBlur:It(ee||{}),onKeyDown:St(ee||{})},ve={...ee,...le};return{tabIndex:S,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":m(i),"aria-valuemin":m(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:n,...Q,...ve,style:{...nb,direction:s?"rtl":"ltr",width:"100%",height:"100%",writingMode:gr}}},getRootProps:Mt,getThumbProps:ln,marks:oe,open:R,range:re,rootRef:De,trackLeap:_e,trackOffset:ke,values:te,getThumbStyle:mr}}function Ks(e){return typeof e=="string"}const Z$=e=>!e||!Ks(e);function e3(e){return typeof e.main=="string"}function t3(e,t=[]){if(!e3(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function eu(e=[]){return([,t])=>t&&t3(t,e)}function r3(e){return ts("MuiSlider",e)}const Et=$p("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"]),n3=e=>{const{open:t}=e;return{offset:Nt(t&&Et.valueLabelOpen),circle:Et.valueLabelCircle,label:Et.valueLabelLabel}};function kg(e){const{children:t,className:r,value:n}=e,a=n3(e);return t?F.cloneElement(t,{className:Nt(t.props.className)},x.jsxs(F.Fragment,{children:[t.props.children,x.jsx("span",{className:Nt(a.offset,r),"aria-hidden":!0,children:x.jsx("span",{className:a.circle,children:x.jsx("span",{className:a.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(kg.propTypes={children:y.element.isRequired,className:y.string,value:y.node});function Sp(e){return e}const a3=Pt("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${dt(r.color)}`],r.size!=="medium"&&t[`size${dt(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(tn(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Et.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Et.dragging}`]:{[`& .${Et.thumb}, & .${Et.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(eu()).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}}]}))),s3=Pt("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.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}}]}),o3=Pt("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(tn(({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(eu()).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:La(e.palette[t].main,.62),borderColor:La(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:ka(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:ka(e.palette[t].main,.5)})}}}))]}))),i3=Pt("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${dt(r.color)}`],r.size!=="medium"&&t[`thumbSize${dt(r.size)}`]]}})(tn(({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%)"},[`&.${Et.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(eu()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${Et.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${yl(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${Et.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${yl(e.palette[t].main,.16)}`}}}}))]}))),Lg=Pt(kg,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(tn(({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%"},[`&.${Et.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%"},[`&.${Et.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"&&(Lg.propTypes={children:y.element.isRequired,index:y.number.isRequired,open:y.bool.isRequired,value:y.node});const l3=Pt("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>oc(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(tn(({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}}]}))),c3=Pt("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>oc(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(tn(({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}}]}))),u3=e=>{const{disabled:t,dragging:r,marked:n,orientation:a,track:s,classes:o,color:i,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",a==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",i&&`color${dt(i)}`,l&&`size${dt(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${dt(l)}`,i&&`thumbColor${dt(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return ac(c,r3,o)},d3=({children:e})=>e,Ug=F.forwardRef(function(t,r){const n=Hc({props:t,name:"MuiSlider"}),a=cb(),{"aria-label":s,"aria-valuetext":o,"aria-labelledby":i,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:p,disableSwap:m=!1,disabled:f=!1,getAriaLabel:g,getAriaValueText:S,marks:T=!1,max:O=100,min:C=0,name:E,onChange:R,onChangeCommitted:P,orientation:_="horizontal",shiftStep:B=10,size:b="medium",step:A=1,scale:z=Sp,slotProps:I,slots:G,tabIndex:re,track:te="normal",value:oe,valueLabelDisplay:Z="off",valueLabelFormat:ae=Sp,...ge}=n,ue={...n,isRtl:a,max:O,min:C,classes:h,disabled:f,disableSwap:m,orientation:_,marks:T,color:d,size:b,step:A,shiftStep:B,scale:z,track:te,valueLabelDisplay:Z,valueLabelFormat:ae},{axisProps:De,getRootProps:ct,getHiddenInputProps:It,getThumbProps:tt,open:St,active:pt,axis:rt,focusedThumbIndex:X,range:ie,dragging:he,marks:J,values:Oe,trackOffset:be,trackLeap:Ne,getThumbStyle:ke}=X$({...ue,rootRef:r});ue.marked=J.length>0&&J.some(Le=>Le.label),ue.dragging=he,ue.focusedThumbIndex=X;const _e=u3(ue),Mt=(G==null?void 0:G.root)??c.Root??a3,er=(G==null?void 0:G.rail)??c.Rail??s3,on=(G==null?void 0:G.track)??c.Track??o3,ln=(G==null?void 0:G.thumb)??c.Thumb??i3,mr=(G==null?void 0:G.valueLabel)??c.ValueLabel??Lg,gr=(G==null?void 0:G.mark)??c.Mark??l3,cn=(G==null?void 0:G.markLabel)??c.MarkLabel??c3,Q=(G==null?void 0:G.input)??c.Input??"input",ee=(I==null?void 0:I.root)??u.root,le=(I==null?void 0:I.rail)??u.rail,ve=(I==null?void 0:I.track)??u.track,Ce=(I==null?void 0:I.thumb)??u.thumb,ce=(I==null?void 0:I.valueLabel)??u.valueLabel,Ke=(I==null?void 0:I.mark)??u.mark,at=(I==null?void 0:I.markLabel)??u.markLabel,Ge=(I==null?void 0:I.input)??u.input,ft=yr({elementType:Mt,getSlotProps:ct,externalSlotProps:ee,externalForwardedProps:ge,additionalProps:{...Z$(Mt)&&{as:l}},ownerState:{...ue,...ee==null?void 0:ee.ownerState},className:[_e.root,p]}),Er=yr({elementType:er,externalSlotProps:le,ownerState:ue,className:_e.rail}),Si=yr({elementType:on,externalSlotProps:ve,additionalProps:{style:{...De[rt].offset(be),...De[rt].leap(Ne)}},ownerState:{...ue,...ve==null?void 0:ve.ownerState},className:_e.track}),aa=yr({elementType:ln,getSlotProps:tt,externalSlotProps:Ce,ownerState:{...ue,...Ce==null?void 0:Ce.ownerState},className:_e.thumb}),sa=yr({elementType:mr,externalSlotProps:ce,ownerState:{...ue,...ce==null?void 0:ce.ownerState},className:_e.valueLabel}),un=yr({elementType:gr,externalSlotProps:Ke,ownerState:ue,className:_e.mark}),zt=yr({elementType:cn,externalSlotProps:at,ownerState:ue,className:_e.markLabel}),oa=yr({elementType:Q,getSlotProps:It,externalSlotProps:Ge,ownerState:ue});return x.jsxs(Mt,{...ft,children:[x.jsx(er,{...Er}),x.jsx(on,{...Si}),J.filter(Le=>Le.value>=C&&Le.value<=O).map((Le,Ye)=>{const ia=To(Le.value,C,O),_r=De[rt].offset(ia);let $t;return te===!1?$t=Oe.includes(Le.value):$t=te==="normal"&&(ie?Le.value>=Oe[0]&&Le.value<=Oe[Oe.length-1]:Le.value<=Oe[0])||te==="inverted"&&(ie?Le.value<=Oe[0]||Le.value>=Oe[Oe.length-1]:Le.value>=Oe[0]),x.jsxs(F.Fragment,{children:[x.jsx(gr,{"data-index":Ye,...un,...!Ks(gr)&&{markActive:$t},style:{..._r,...un.style},className:Nt(un.className,$t&&_e.markActive)}),Le.label!=null?x.jsx(cn,{"aria-hidden":!0,"data-index":Ye,...zt,...!Ks(cn)&&{markLabelActive:$t},style:{..._r,...zt.style},className:Nt(_e.markLabel,zt.className,$t&&_e.markLabelActive),children:Le.label}):null]},Ye)}),Oe.map((Le,Ye)=>{const ia=To(Le,C,O),_r=De[rt].offset(ia),$t=Z==="off"?d3:mr;return x.jsx($t,{...!Ks($t)&&{valueLabelFormat:ae,valueLabelDisplay:Z,value:typeof ae=="function"?ae(z(Le),Ye):ae,index:Ye,open:St===Ye||pt===Ye||Z==="on",disabled:f},...sa,children:x.jsx(ln,{"data-index":Ye,...aa,className:Nt(_e.thumb,aa.className,pt===Ye&&_e.active,X===Ye&&_e.focusVisible),style:{..._r,...ke(Ye),...aa.style},children:x.jsx(Q,{"data-index":Ye,"aria-label":g?g(Ye):s,"aria-valuenow":z(Le),"aria-labelledby":i,"aria-valuetext":S?S(z(Le),Ye):o,value:Oe[Ye],...oa})})},Ye)})]})});process.env.NODE_ENV!=="production"&&(Ug.propTypes={"aria-label":wu(y.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":y.string,"aria-valuetext":wu(y.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:y.node,classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["primary","secondary","error","info","success","warning"]),y.string]),components:y.shape({Input:y.elementType,Mark:y.elementType,MarkLabel:y.elementType,Rail:y.elementType,Root:y.elementType,Thumb:y.elementType,Track:y.elementType,ValueLabel:y.elementType}),componentsProps:y.shape({input:y.oneOfType([y.func,y.object]),mark:y.oneOfType([y.func,y.object]),markLabel:y.oneOfType([y.func,y.object]),rail:y.oneOfType([y.func,y.object]),root:y.oneOfType([y.func,y.object]),thumb:y.oneOfType([y.func,y.object]),track:y.oneOfType([y.func,y.object]),valueLabel:y.oneOfType([y.func,y.shape({children:y.element,className:y.string,open:y.bool,style:y.object,value:y.node,valueLabelDisplay:y.oneOf(["auto","off","on"])})])}),defaultValue:y.oneOfType([y.arrayOf(y.number),y.number]),disabled:y.bool,disableSwap:y.bool,getAriaLabel:y.func,getAriaValueText:y.func,marks:y.oneOfType([y.arrayOf(y.shape({label:y.node,value:y.number.isRequired})),y.bool]),max:y.number,min:y.number,name:y.string,onChange:y.func,onChangeCommitted:y.func,orientation:y.oneOf(["horizontal","vertical"]),scale:y.func,shiftStep:y.number,size:y.oneOfType([y.oneOf(["small","medium"]),y.string]),slotProps:y.shape({input:y.oneOfType([y.func,y.object]),mark:y.oneOfType([y.func,y.object]),markLabel:y.oneOfType([y.func,y.object]),rail:y.oneOfType([y.func,y.object]),root:y.oneOfType([y.func,y.object]),thumb:y.oneOfType([y.func,y.object]),track:y.oneOfType([y.func,y.object]),valueLabel:y.oneOfType([y.func,y.shape({children:y.element,className:y.string,open:y.bool,style:y.object,value:y.node,valueLabelDisplay:y.oneOf(["auto","off","on"])})])}),slots:y.shape({input:y.elementType,mark:y.elementType,markLabel:y.elementType,rail:y.elementType,root:y.elementType,thumb:y.elementType,track:y.elementType,valueLabel:y.elementType}),step:y.number,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),tabIndex:y.number,track:y.oneOf(["inverted","normal",!1]),value:y.oneOfType([y.arrayOf(y.number),y.number]),valueLabelDisplay:y.oneOf(["auto","off","on"]),valueLabelFormat:y.oneOfType([y.func,y.string])});var h3="[object Number]";function p3(e){return typeof e=="number"||qr(e)&&rn(e)==h3}const Dg=Je.observer(e=>{var s,o,i;const t=W.useTheme(),{store:r}=e,{t:n}=ze.useTranslation();function a(l,c){c===e.velocity||!p3(c)||e.onVelocityChange(c)}return x.jsxs(W.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&x.jsx(W.Typography,{sx:{color:(i=(o=(s=t.componentsExt)==null?void 0:s.JoggingPanel)==null?void 0:o.VelocitySlider)==null?void 0:i.sliderLegendColor,fontSize:"14px"},children:n("Jogging.Velocity.bt")}),x.jsx(Ug,{value:e.velocity,color:"secondary",onChange:a,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):x.jsx(tu,{value:e.velocity.toString()}))]})});function tu({value:e,sx:t}){var n;const r=W.useTheme();return x.jsx(W.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:x.jsx(W.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Ng=Je.observer(({store:e})=>{const{t}=ze.useTranslation(),r=Je.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 x.jsx(Dg,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>x.jsx(tu,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),f3=Je.observer(({store:e,children:t})=>{const{t:r}=ze.useTranslation(),n=W.useTheme();function a(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}wm(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}&response_coordinate_system=${e.selectedCoordSystemId}`))},{fireImmediately:!0});async function s(h,p){const m=await e.activate(),f=m.motionStream.rapidlyChangingMotionState.tcp_pose,g=m.motionStream.rapidlyChangingMotionState.state.joint_position;f&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:f,currentJoints:g,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:Nr.degreesToRadians(p.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function o(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return s(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.startTCPTranslation({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({axis:h.axis,direction:h.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function i(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function l(h,p,m){var g,S,T;const f=(T=(S=(g=m.componentsExt)==null?void 0:g.JoggingPanel)==null?void 0:S.JoggingCartesian)==null?void 0:T.Axis;if(f)return p==="translate"?f[h]:f.CustomRotation??f[h]}const c=[{id:"x",icon:x.jsx(S2,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:x.jsx(w2,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:x.jsx(P2,{}),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:Nr.radiansToDegrees(h).toFixed(1)})}return x.jsxs(W.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[x.jsxs(W.Stack,{gap:2,children:[x.jsx(z$,{store:e}),x.jsx(Ng,{store:e}),x.jsx(W.Divider,{})]}),x.jsx(W.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:x.jsxs(W.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[x.jsxs(G$,{value:e.selectedCartesianMotionType,onChange:a,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[x.jsx(W.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),x.jsx(W.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,m;return x.jsx(Ml,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:x.jsxs(x.Fragment,{children:[h.icon,x.jsx(W.Typography,{sx:{fontSize:"24px",color:((m=h.colors)==null?void 0:m.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var f;return u(((f=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:f.position[h.id])||0)},startJogging:f=>o({axis:h.id,motionType:"translate",direction:f}),stopJogging:i},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var p,m;return x.jsx(Ml,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:x.jsxs(x.Fragment,{children:[x.jsx(T2,{}),x.jsx(W.Typography,{sx:{fontSize:"24px",color:((m=h.colors)==null?void 0:m.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var f,g;return d(((g=(f=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:f.orientation)==null?void 0:g[h.id])||0)},startJogging:f=>o({axis:h.id,motionType:"rotate",direction:f}),stopJogging:i},h.id)})]})}),x.jsx(Ag,{store:e}),t&&x.jsx(W.Divider,{}),t]})}),m3=Je.observer(({store:e,children:t})=>{const r=W.useTheme();async function n(s){await e.activate(),await e.jogger.startJointRotation({joint:s.joint,direction:s.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function a(){await e.jogger.stop(),await e.deactivate()}return x.jsxs(W.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[x.jsx(Ng,{store:e}),x.jsx(W.Divider,{}),x.jsx(W.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:x.jsx(W.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(s=>{var c;const o=(c=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:c[s.index],i=(o==null?void 0:o.lower_limit)!==void 0?Nr.radiansToDegrees(o.lower_limit):void 0,l=(o==null?void 0:o.upper_limit)!==void 0?Nr.radiansToDegrees(o.upper_limit):void 0;return x.jsxs(W.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&x.jsx(W.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${s.index+1}`}),x.jsx(Rm,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const u=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[s.index];return u!==void 0?Nr.radiansToDegrees(u):void 0},startJogging:u=>n({joint:s.index,direction:u}),stopJogging:a})]},`joint-${s.index}`)})})}),x.jsx(Ag,{store:e}),t&&x.jsx(W.Divider,{}),t]})}),g3=en(Je.observer(e=>{const t=tc.isString(e.nova)?new g2({instanceUrl:e.nova}):e.nova,r=Je.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){Xe.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let a=e.store;if(!a){const s=await t.connectJogger(e.motionGroupId);a=await xi.loadFor(s)}Xe.runInAction(()=>{r.joggingStore=a}),e.onSetup&&e.onSetup(a)}catch(a){r.loadingError=a}}return se.useEffect(()=>(n(),e.store?()=>null:()=>{var a;(a=r.joggingStore)==null||a.dispose()}),[e.store,e.nova,e.motionGroupId]),se.useEffect(()=>{const a=r.joggingStore;a&&(e.locked?a.lock("external"):a.unlock("external"))},[r.joggingStore,e.locked]),x.jsx(W.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?x.jsx(y3,{store:r.joggingStore,children:e.children}):x.jsx(Kc,{message:"Loading jogging",error:r.loadingError})})})),y3=Je.observer(({store:e,children:t})=>{const{t:r}=ze.useTranslation();function n(){if(e.currentTab.id==="cartesian")return x.jsx(x.Fragment,{children:x.jsx(f3,{store:e,children:t})});if(e.currentTab.id==="joint")return x.jsx(x.Fragment,{children:x.jsx(m3,{store:e,children:t})})}return x.jsxs(W.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[x.jsx(W.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(a=>{const s=a.label==="cartesian"?r("Jogging.Cartesian.bt"):r("Jogging.Joints.bt"),o=a.label==="cartesian"?x.jsx(KP,{fontSize:"small",sx:{mr:1}}):x.jsx(YP,{fontSize:"small",sx:{mr:1}});return x.jsx(W.Tab,{label:e.showTabIcons?x.jsxs(W.Stack,{direction:"row",alignItems:"center",children:[o,s]}):s,id:`jogging-tab-${a.id}`,"aria-controls":`jogging-tab-${a.id}`},a.id)})}),x.jsx(W.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()})]})}),Fg=se.forwardRef(({label:e,value:t},r)=>{var i;const n=W.useTheme(),[a,s]=se.useState(!1);async function o(){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(),u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}return!1}return se.useEffect(()=>{if(!a)return;const l=setTimeout(()=>s(!1),3e3);return()=>{l&&clearTimeout(l)}},[a]),x.jsx(W.Tooltip,{open:a,title:"Copied!",children:x.jsx(W.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:()=>o(),children:x.jsx(W.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})})})}),b3=Je.observer(({motionStream:e})=>{const t=se.useRef(null);function r(){const n=e.rapidlyChangingMotionState.tcp_pose;return n?Nr.poseToWandelscriptString(n):""}return Yn(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),x.jsx(W.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:x.jsx(Fg,{value:r(),ref:t})})}),v3=Je.observer(({motionStream:e})=>{const t=se.useRef(null);function r(){const{joints:n}=e.rapidlyChangingMotionState.state.joint_position;return`[${n.map(a=>parseFloat(a.toFixed(4))).join(", ")}]`}return Yn(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),x.jsx(W.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:x.jsx(Fg,{value:r(),ref:t})})});function x3(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function S3({baseUrl:e=x3(),...t}){return x.jsxs(W.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:[x.jsx(W.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),x.jsxs(W.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[x.jsx(W.Typography,{color:"#fff",children:"Found no devices to connect to."}),x.jsx(W.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),x.jsx(W.DialogActions,{children:x.jsxs(W.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[x.jsx(W.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),x.jsx(W.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const O3=Array(6).fill(2*Math.PI),Op="0.0.0-semantically-released";function ru(e){let t=Op;return Op.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function w3(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>zg(r))}function Bg(e){return e.name.endsWith("_FLG")}function zg(e){return/_J[0-9]+$/.test(e.name)}function C3(e,t){let r;function n(a){if(Bg(a)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${a.name}. Only one _FLG group is allowed.`);r=a}zg(a),a.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 Gg({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){ml.Globals.assign({frameLoop:"always"});const a=se.useRef([]),s=se.useRef([]),{invalidate:o}=ly.useThree();function i(h){h&&(s.current=w3(h),c(),o())}function l(h){a.current=h,d.start(Object.assign({},a.current))}function c(){const h=s.current.map((p,m)=>u[m].get());if(r)r(s.current,h);else for(const[p,m]of s.current.entries()){const f=t[p],g=f.theta||0,S=f.reverse_rotation_direction?-1:1;m.rotation.y=S*h[p]+g}}Om(()=>{const h=e.state.joint_position.joints.filter(p=>p!==void 0);requestAnimationFrame(()=>l(h))});const[u,d]=ml.useSpring(()=>({...Object.assign({},e.state.joint_position.joints),onChange:()=>{c(),o()},onResolve:()=>{c()}}));return x.jsx("group",{ref:i,children:n})}const wp="line",Cp="mesh";function P3({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new kt.Matrix4;function a(i,l){const c=new kt.Vector3,u=new kt.Quaternion,d=new kt.Vector3;n.decompose(c,u,d);const h=c.clone(),p=new kt.Matrix4().makeRotationY(i.theta+l*(i.reverse_rotation_direction?-1:1)).multiply(new kt.Matrix4().makeTranslation(0,i.d/1e3,0)).multiply(new kt.Matrix4().makeTranslation(i.a/1e3,0,0)).multiply(new kt.Matrix4().makeRotationX(i.alpha));return n.multiply(p),n.decompose(c,u,d),{a:h,b:c}}function s(i,l,c,u){if(!t)return;const d=t[i];if(!d)return;const{a:h,b:p}=a(d,u);l.geometry.setPositions([h.toArray(),p.toArray()].flat()),c.position.set(p.x,p.y,p.z)}function o(i,l){n.identity(),i.forEach((c,u)=>{s(u,c.getObjectByName(wp),c.getObjectByName(Cp),l[u])})}return x.jsx(x.Fragment,{children:x.jsx(Gg,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:o,children:x.jsxs("group",{...r,name:"Scene",children:[x.jsxs("mesh",{children:[x.jsx("sphereGeometry",{args:[.01,32,32]}),x.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((i,l)=>{const{a:c,b:u}=a(i,e.state.joint_position.joints[l]??0),d=`dhrobot_J0${l}`;return x.jsxs("group",{name:d,children:[x.jsx(Lt.Line,{name:wp,points:[c,u],color:"white",lineWidth:5}),x.jsxs("mesh",{name:Cp,position:u,children:[x.jsx("sphereGeometry",{args:[.01,32,32]}),x.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+l)]},d)})]})})})}const R3=console.warn;function T3(){return se.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&R3(e)}},[]),x.jsx(x.Fragment,{})}function A3(e){return e.type==="Mesh"}function V3({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:a}=C3(Lt.useGLTF(e),e.split("/").pop()||e),s=se.useCallback(i=>{i&&r&&r()},[e]);function o(i){return A3(i)?x.jsx("mesh",{name:i.name,geometry:i.geometry,material:i.material,position:i.position,rotation:i.rotation},i.uuid):x.jsx(ml.animated.group,{name:i.name,position:i.position,rotation:i.rotation,ref:Bg(i)?t:void 0,children:i.children.map(o)},i.uuid)}return x.jsx("group",{...n,dispose:null,ref:s,children:o(a.scene)})}const E3=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof qe.Mesh){r.material instanceof qe.Material&&(r.material.colorWrite=!1);const n=r.clone(),a=r.clone();n.material=new qe.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:qe.DoubleSide}),n.userData.isGhost=!0,a.material=new qe.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:qe.DoubleSide}),a.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(a))}}),e.userData.isGhost=!0)},_3=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof qe.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof qe.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},Hg=en(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=ru,flangeRef:a,postModelRender:s,transparentColor:o,...i})=>{const[l,c]=se.useState(null),u=se.useCallback(h=>{c(h)},[]);se.useEffect(()=>{l&&(o?E3(l,o):_3(l))},[l,o]);const d=x.jsx(P3,{rapidlyChangingMotionState:e,dhParameters:r,...i});return x.jsxs(py.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[x.jsx(se.Suspense,{fallback:d,children:x.jsx("group",{ref:u,children:x.jsx(Gg,{rapidlyChangingMotionState:e,dhParameters:r,children:x.jsx(V3,{modelURL:n(t),postModelRender:s,flangeRef:a,...i})})})}),x.jsx(T3,{})]})});function I3({connectedMotionGroup:e,getModel:t=ru,flangeRef:r,transparentColor:n,...a}){return e.dhParameters?x.jsx(Hg,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,...a}):null}const M3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),$3=se.forwardRef(M3),j3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),k3=se.forwardRef(j3),Kt=Je.observer(({id:e,icon:t,color:r,title:n,name:a,label:s,explanation:o,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=Je.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(d){u.anchorEl=d.currentTarget},closePopover(){u.anchorEl=null}}));return x.jsxs(x.Fragment,{children:[x.jsxs(W.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:[x.jsx(W.SvgIcon,{component:t,sx:{color:r}}),s&&x.jsx("div",{style:{color:r},children:s})]}),x.jsx(W.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:x.jsxs(W.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[x.jsxs("div",{children:[n&&x.jsx(W.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),x.jsx(W.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:a})]}),x.jsx(W.Typography,{fontSize:"14px",children:o}),i&&x.jsx(W.Typography,{fontSize:"12px",children:i})]})})]})}),L3=Je.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:a})=>{const s=W.useTheme(),{t:o}=ze.useTranslation();return e?x.jsx(Kt,{id:"motion-group-virtual",icon:k3,color:s.palette.tertiary.main,name:o("SafetyBar.ControllerType.Virtual.lb"),label:a?null:o("SafetyBar.ControllerType.Virtual.lb"),explanation:x.jsxs(ze.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",x.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}):x.jsx(Kt,{id:"motion-group-physical",icon:$3,color:s.palette.primary.main,name:o("SafetyBar.ControllerType.Physical.lb"),label:a?null:o("SafetyBar.ControllerType.Physical.lb"),explanation:x.jsx(ze.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:x.jsx("code",{}),strong:x.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),U3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),D3=se.forwardRef(U3),N3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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})),F3=se.forwardRef(N3),B3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),z3=se.forwardRef(B3),G3=Je.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=ze.useTranslation(),s=W.useTheme();switch(e){case"OPERATION_MODE_AUTO":return x.jsx(Kt,{id:"operation-mode-auto",icon:D3,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Automatic.ti"),label:n?null:a("SafetyBar.OperationMode.Automatic.ti"),color:s.palette.text.secondary,explanation:x.jsx(ze.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 x.jsx(Kt,{id:"operation-mode-manual",icon:z3,color:s.palette.warning.main,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Manual.lb"),label:n?null:a("SafetyBar.OperationMode.Manual.lb"),explanation:x.jsx(ze.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 x.jsx(Kt,{id:"operation-mode-error",icon:F3,color:s.palette.warning.main,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Error.lb"),label:n?null:a("SafetyBar.OperationMode.Error.lb"),explanation:x.jsx(ze.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})}}),H3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),q3=se.forwardRef(H3),J3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),F.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"}),F.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"})),W3=se.forwardRef(J3),K3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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})),Y3=se.forwardRef(K3),Q3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),X3=se.forwardRef(Q3),Z3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),ej=se.forwardRef(Z3),tj=Je.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=ze.useTranslation(),s=W.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return x.jsx(Kt,{id:"safety-state-normal",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Normal.lb"),label:n?null:a("SafetyBar.SafetyState.Normal.lb"),icon:X3,color:s.palette.text.secondary,explanation:x.jsx(ze.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 x.jsx(Kt,{id:"safety-state-estop",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Estop.lb"),label:n?null:a("SafetyBar.SafetyState.Estop.lb"),icon:W3,color:s.palette.error.main,explanation:x.jsx(ze.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 x.jsx(Kt,{id:"safety-state-stop",icon:ej,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Stop.lb"),label:n?null:a("SafetyBar.SafetyState.Stop.lb"),color:s.palette.warning.main,explanation:x.jsx(ze.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 x.jsx(Kt,{id:"safety-state-manual-action-required",icon:Y3,color:s.palette.warning.main,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:a("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:x.jsx(ze.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 x.jsx(Kt,{id:"safety-state-error",icon:q3,color:s.palette.error.main,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Error.lb"),label:n?null:a("SafetyBar.SafetyState.Error.lb"),explanation:x.jsx(ze.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:b2(e,`Unknown safety state ${e}`)}}),rj=en(Je.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:a,transformOrigin:s,compact:o=!0})=>{const i=o?1:2;return x.jsxs(W.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[x.jsx(tj,{safetyState:n,anchorOrigin:a,transformOrigin:s,compact:o}),x.jsx(W.Divider,{orientation:"vertical",flexItem:!0}),x.jsx(G3,{operationMode:r,anchorOrigin:a,transformOrigin:s,compact:o}),x.jsx(W.Divider,{orientation:"vertical",flexItem:!0}),x.jsx(L3,{isVirtual:e,motionGroupId:t,anchorOrigin:a,transformOrigin:s,compact:o})]})})),nj=W.styled(W.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:a})=>!a,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:a})=>a,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),aj=se.forwardRef((e,t)=>x.jsx(nj,{ref:t,selected:e.selected,...e,color:"secondary",variant:"circular"})),sj={$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"},oj=se.lazy(()=>import("@monaco-editor/react"));let fl=null;async function ij(){if(!fl){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);fl={shiki:await e({langs:[sj],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return fl}const lj=en(e=>{const t=W.useTheme(),[r,n]=se.useState("dark-plus"),a=t.palette.mode==="dark"?"dark-plus":"light-plus";async function s(o){var c,u;o.languages.register({id:"wandelscript"}),o.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:i,shikiToMonaco:l}=await ij();l(i,o),o.editor.defineTheme(a,((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(o),n(a)}return x.jsx(se.Suspense,{fallback:x.jsx(Kc,{}),children:x.jsx(oj,{value:e.code,onMount:(o,i)=>{s(i)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function qg(){var t,r,n,a,s,o,i;const e=W.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`}}},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:(a=e.palette.backgroundPaperElevation)==null?void 0:a[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:(o=(s=e.paletteExt)==null?void 0:s.secondary)==null?void 0:o.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":W.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function cj(){const e=qg();return e.palette.mode="light",e}function uj(e){var n,a,s,o;let t=!0;((n=e.palette)==null?void 0:n.mode)==="light"?t=!1:((a=e.palette)==null?void 0:a.mode)!=="dark"&&(t=!(typeof window<"u"&&((o=(s=window.matchMedia)==null?void 0:s.call(window,"(prefers-color-scheme: light)"))==null?void 0:o.matches)));const r=t?qg():cj();return Kp(r,e)}exports.CycleTimer=mP;exports.JoggingCartesianAxisControl=Ml;exports.JoggingJointRotationControl=Rm;exports.JoggingPanel=g3;exports.JoggingStore=xi;exports.LoadingCover=Kc;exports.LoadingErrorMessage=yg;exports.NoMotionGroupModal=S3;exports.PoseCartesianValues=b3;exports.PoseJointValues=v3;exports.PresetEnvironment=by;exports.Robot=I3;exports.SafetyBar=rj;exports.SafetyZonesRenderer=Sy;exports.SelectableFab=aj;exports.SupportedRobot=Hg;exports.TrajectoryRenderer=Oy;exports.VelocitySlider=Dg;exports.VelocitySliderLabel=tu;exports.WandelscriptEditor=lj;exports.createNovaMuiTheme=uj;exports.defaultAxisConfig=O3;exports.defaultGetModel=ru;exports.i18n=Gc;exports.useAnimationFrame=Yn;exports.useAutorun=Om;exports.useMounted=ai;exports.useReaction=wm;
|
|
163
163
|
//# sourceMappingURL=index.cjs.map
|