@seedtactics/insight-client 17.0.1-beta.7 → 17.0.1-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index-MFZreX-b.js +388 -0
- package/dist/cell-status/inspections.js +0 -20
- package/dist/cell-status/material-summary.js +1 -87
- package/dist/cell-status/station-cycles.d.ts +1 -0
- package/dist/cell-status/station-cycles.js +11 -14
- package/dist/components/operations/AllMaterial.js +2 -4
- package/dist/components/station-monitor/BasketLoadStationWork.js +7 -4
- package/dist/components/station-monitor/InvalidateCycle.d.ts +1 -17
- package/dist/components/station-monitor/InvalidateCycle.js +1 -91
- package/dist/components/station-monitor/LoadStation.js +3 -5
- package/dist/components/station-monitor/Material.js +5 -3
- package/dist/components/station-monitor/SystemOverview.js +2 -4
- package/dist/index.html +1 -1
- package/dist/network/api.d.ts +2 -32
- package/dist/network/api.js +2 -116
- package/dist/network/backend-mock.js +0 -3
- package/dist/network/backend.d.ts +0 -1
- package/docs/operator-procedures.md +6 -6
- package/package.json +1 -1
- package/dist/assets/index-CNJT3DX_.js +0 -388
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function u(e){return`init`in e}function d(e){return typeof e.write==`function`}function f(e){return!!e.onMount}function p(e){return`v`in e||`e`in e}function m(e){if(`e`in e)throw e.e;return e.v}function h(e){return typeof e?.then==`function`}function g(e){if(!(e instanceof Error))return!1;let t=e.name,n=e.message.toLowerCase();return(t===`RangeError`||t===`InternalError`)&&(n.includes(`call stack`)||n.includes(`too much recursion`)||n.includes(`stack overflow`))}function _(e,t,n){if(!n.p.has(e)){n.p.add(e);let r=()=>n.p.delete(e);t.then(r,r)}}function v(e,t,n){let r=n.get(e)?.t,i=t.p;if(!r?.size)return i;if(!i.size)return r;let a=new Set(r);for(let e of i)a.add(e);return a}function y(e){return!!e.INTERNAL_onInit}var b=(e,t,n,...r)=>n.read(...r),x=(e,t,n,...r)=>n.write(...r),S=(e,t,n)=>n.INTERNAL_onInit(t),C=(e,t,n,r)=>n.onMount?.call(n,r),w=(e,t,n)=>{var r;let i=e[0],a=i.get(n);if(!a){let o=e[6],s=e[9];a={d:new Map,p:new Set,n:0},i.set(n,a),(r=o.i)==null||r.call(o,n),y(n)&&s(e,t,n)}return a},T=(e,t)=>{let n=e[1],r=e[3],i=e[4],a=e[5],o=e[6],s=e[13];if(!o.f&&!r.size&&!i.size&&!a.size)return;let c=[],l=e=>{try{e()}catch(e){c.push(e)}};do{o.f&&l(o.f);let c=new Set;for(let e of r){let t=n.get(e)?.l;if(t)for(let e of t)c.add(e)}r.clear();for(let e of a)c.add(e);a.clear();for(let e of i)c.add(e);i.clear();for(let e of c)l(e);r.size&&s(e,t)}while(r.size||a.size||i.size);if(c.length)throw AggregateError(c)},E=(e,t)=>{let n=e[1],r=e[2],i=e[3],a=e[11],o=e[14],s=e[17];if(!i.size)return;let c=[],l=[],u=new WeakSet,d=new WeakSet,f=[],p=[];for(let n of i)f.push(n),p.push(a(e,t,n));for(;f.length;){let i=f.length-1,o=f[i],s=p[i];if(d.has(o)){f.pop(),p.pop();continue}if(u.has(o)){r.get(o)===s.n&&(c.push(o),l.push(s)),d.add(o),f.pop(),p.pop();continue}u.add(o);for(let r of v(o,s,n))u.has(r)||(f.push(r),p.push(a(e,t,r)))}for(let n=c.length-1;n>=0;--n){let a=c[n],u=l[n],d=!1;for(let e of u.d.keys())if(e!==a&&i.has(e)){d=!0;break}d&&(r.set(a,u.n),o(e,t,a),s(e,t,a)),r.delete(a)}},D=(e,t,n)=>{var r,i;let a=e[1],o=e[2],s=e[3],c=e[6],l=e[7],f=e[11],v=e[12],y=e[13],b=e[14],x=e[16],S=e[17],C=e[20],w=e[26],T=e[28],E=f(e,t,n),D=T[0];if(p(E)){if(a.has(n)&&o.get(n)!==E.n||E.m===D)return E.m=D,E;let r=!1;for(let[n,i]of E.d)if(b(e,t,n).n!==i){r=!0;break}if(!r)return E.m=D,E}let O=!0,ee=new Set(E.d.keys()),te=()=>{for(let e of ee)E.d.delete(e)},k=()=>{if(a.has(n)){let r=!s.size;S(e,t,n),r&&(y(e,t),v(e,t))}},A=r=>{var i;if(r===n){let n=f(e,t,r);if(!p(n)){if(u(r))C(e,t,r,r.init);else throw Error(`no atom init`)}return m(n)}let o=b(e,t,r);try{return m(o)}finally{ee.delete(r),E.d.set(r,o.n),h(E.v)&&_(n,E.v,o),a.has(n)&&((i=a.get(r))==null||i.t.add(n)),O||k()}},j,M,ne={get signal(){return j||=new AbortController,j.signal},get setSelf(){return!M&&d(n)&&(M=(...r)=>{if(!O)try{return x(e,t,n,r)}finally{y(e,t),v(e,t)}}),M}},re=E.n,ie=o.get(n)===re;try{let i=l(e,t,n,A,ne);if(C(e,t,n,i),h(i)){w(e,t,i,()=>j?.abort());let n=()=>{te(),k()};i.then(n,n)}else te();return(r=c.r)==null||r.call(c,n),E.m=D,E}catch(e){if(g(e))throw e;return delete E.v,E.e=e,++E.n,E.m=D,E}finally{O=!1,E.n!==re&&ie&&(o.set(n,E.n),s.add(n),(i=c.c)==null||i.call(c,n))}},O=(e,t,n)=>{let r=e[1],i=e[2],a=e[11],o=[n];for(;o.length;){let n=o.pop(),s=a(e,t,n);for(let c of v(n,s,r)){let n=a(e,t,c);i.get(c)!==n.n&&(i.set(c,n.n),o.push(c))}}},ee=(e,t,n,r)=>{let i=e[3],a=e[6],o=e[8],s=e[11],c=e[12],l=e[13],d=e[14],f=e[15],p=e[16],h=e[17],g=e[20],_=e[28],v=!0,y=n=>m(d(e,t,n)),b=(r,...o)=>{var d;let m=s(e,t,r);try{if(r===n){if(!u(r))throw Error(`atom not writable`);let n=m.n,s=o[0];g(e,t,r,s),h(e,t,r),n!==m.n&&(++_[0],i.add(r),f(e,t,r),(d=a.c)==null||d.call(a,r));return}return p(e,t,r,o)}finally{v||(l(e,t),c(e,t))}};try{return o(e,t,n,y,b,...r)}finally{v=!1}},te=(e,t,n)=>{var r;let i=e[1],a=e[3],o=e[6],s=e[11],c=e[15],l=e[18],u=e[19],d=s(e,t,n),f=i.get(n);if(f&&d.d.size>0){for(let[i,u]of d.d)if(!f.d.has(i)){let d=s(e,t,i);l(e,t,i).t.add(n),f.d.add(i),u!==d.n&&(a.add(i),c(e,t,i),(r=o.c)==null||r.call(o,i))}for(let r of f.d)d.d.has(r)||(f.d.delete(r),u(e,t,r)?.t.delete(n))}},k=(e,t,n)=>{var r;let i=e[1],a=e[4],o=e[6],s=e[10],c=e[11],l=e[12],u=e[13],p=e[14],m=e[16],h=e[18],g=c(e,t,n),_=i.get(n);if(!_){p(e,t,n);for(let r of g.d.keys())h(e,t,r).t.add(n);_={l:new Set,d:new Set(g.d.keys()),t:new Set},i.set(n,_),d(n)&&f(n)&&a.add(()=>{let r=!0,i=(...i)=>{try{return m(e,t,n,i)}finally{r||(u(e,t),l(e,t))}};try{let a=s(e,t,n,i);a&&(_.u=()=>{r=!0;try{a()}finally{r=!1}})}finally{r=!1}}),(r=o.m)==null||r.call(o,n)}return _},A=(e,t,n)=>{var r;let i=e[1],a=e[5],o=e[6],s=e[11],c=e[19],l=s(e,t,n),u=i.get(n);if(!u||u.l.size)return u;let d=!1;for(let e of u.t)if(i.get(e)?.d.has(n)){d=!0;break}if(!d){u.u&&a.add(u.u),u=void 0,i.delete(n);for(let r of l.d.keys())c(e,t,r)?.t.delete(n);(r=o.u)==null||r.call(o,n);return}return u},j=(e,t,n,r)=>{let i=e[11],a=e[27],o=i(e,t,n),s=`v`in o,c=o.v;if(h(r))for(let a of o.d.keys())_(n,r,i(e,t,a));o.v=r,delete o.e,(!s||!Object.is(c,o.v))&&(++o.n,h(c)&&a(e,t,c))},M=(e,t,n)=>{let r=e[14];return m(r(e,t,n))},ne=(e,t,n,...r)=>{let i=e[3],a=e[12],o=e[13],s=e[16],c=i.size;try{return s(e,t,n,r)}finally{i.size!==c&&(o(e,t),a(e,t))}},re=(e,t,n,r)=>{let i=e[12],a=e[13],o=e[18],s=e[19],c=o(e,t,n).l;return c.add(r),a(e,t),i(e,t),()=>{c.delete(r),s(e,t,n),a(e,t),i(e,t)}},ie=(e,t,n,r)=>{let i=e[25],a=i.get(n);if(!a){a=new Set,i.set(n,a);let e=()=>i.delete(n);n.then(e,e)}a.add(r)},ae=(e,t,n)=>{e[25].get(n)?.forEach(e=>e())},N=new WeakMap;function oe(e){let t=N.get(e),n=t[24];return n?n(t,e):t}function se(...e){let t={get(e){return r(n,t,e)},set(e,...r){return i(n,t,e,...r)},sub(e,r){return a(n,t,e,r)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},b,x,S,C,w,T,E,D,O,ee,te,k,A,j,M,ne,re,void 0,new WeakMap,ie,ae,[0]].map((t,n)=>e[n]||t);N.set(t,Object.freeze(n));let r=n[21],i=n[22],a=n[23];return t}var ce=0;function P(e,t){let n=`atom${++ce}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=le,r.write=ue),t&&(r.write=t),r}function le(e){return e(this)}function ue(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}function F(){return se()}var I;function de(){return I||=F(),I}var fe=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var te=/\/+/g;function k(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function A(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+k(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(te,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+k(a,u),c+=j(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+k(a,u++),c+=j(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return j(A(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ne(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var re=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ie={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ie,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ne}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,re)}catch(e){re(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),pe=o(((e,t)=>{t.exports=fe()})),L=l(pe(),1),me=(0,L.createContext)(void 0);function he(e){let t=(0,L.useContext)(me);return e?.store||t||de()}function ge({children:e,store:t}){let n=(0,L.useRef)(null);return t?(0,L.createElement)(me.Provider,{value:t},e):(n.current===null&&(n.current=F()),(0,L.createElement)(me.Provider,{value:n.current},e))}var _e=e=>typeof e?.then==`function`,ve=e=>{e.status||(e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}))},ye=L.use||(e=>{if(e.status===`pending`)throw e;if(e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:(ve(e),e)}),be=new WeakMap,xe=(e,t,n)=>{let r=oe(e),i=r[26],a=be.get(t);return a||(a=new Promise((o,s)=>{let c=t,l=e=>t=>{c===e&&o(t)},u=e=>t=>{c===e&&s(t)},d=()=>{try{let t=n();_e(t)?(be.set(t,a),c=t,t.then(l(t),u(t)),i(r,e,t,d)):o(t)}catch(e){s(e)}};t.then(l(t),u(t)),i(r,e,t,d)}),be.set(t,a)),a};function R(e,t){let{delay:n,unstable_promiseStatus:r=!L.use}=t||{},i=he(t),[[a,o,s],c]=(0,L.useReducer)(t=>{let n=i.get(e);return Object.is(t[0],n)&&t[1]===i&&t[2]===e?t:[n,i,e]},void 0,()=>[i.get(e),i,e]),l=a;if((o!==i||s!==e)&&(c(),l=i.get(e)),(0,L.useEffect)(()=>{let t=i.sub(e,()=>{if(r)try{let t=i.get(e);_e(t)&&ve(xe(i,t,()=>i.get(e)))}catch{}if(typeof n==`number`){console.warn(`[DEPRECATED] delay option is deprecated and will be removed in v3.
|
|
2
|
+
|
|
3
|
+
Migration guide:
|
|
4
|
+
|
|
5
|
+
Create a custom hook like the following.
|
|
6
|
+
|
|
7
|
+
function useAtomValueWithDelay<Value>(
|
|
8
|
+
atom: Atom<Value>,
|
|
9
|
+
options: { delay: number },
|
|
10
|
+
): Value {
|
|
11
|
+
const { delay } = options
|
|
12
|
+
const store = useStore(options)
|
|
13
|
+
const [value, setValue] = useState(() => store.get(atom))
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const unsub = store.sub(atom, () => {
|
|
16
|
+
setTimeout(() => setValue(store.get(atom)), delay)
|
|
17
|
+
})
|
|
18
|
+
return unsub
|
|
19
|
+
}, [store, atom, delay])
|
|
20
|
+
return value
|
|
21
|
+
}
|
|
22
|
+
`),setTimeout(c,n);return}c()});return c(),t},[i,e,n,r]),(0,L.useDebugValue)(l),_e(l)){let t=xe(i,l,()=>i.get(e));return r&&ve(t),ye(t)}return l}function z(e,t){let n=he(t);return(0,L.useCallback)((...t)=>n.set(e,...t),[n,e])}function B(e,t){return[R(e,t),z(e,t)]}var Se=class{constructor(e,t){this.jsonParseReviver=void 0,this.http=t||window,this.baseUrl=e??``}fMSInformation(e){let t=this.baseUrl+`/api/v1/fms/fms-information`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processFMSInformation(e))}processFMSInformation(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Ee.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}findInstructions(e,t,n,r,i,a,o){let s=this.baseUrl+`/api/v1/fms/find-instructions/{part}?`;if(e==null)throw new globalThis.Error(`The parameter 'part' must be defined.`);if(s=s.replace(`{part}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'type' must be defined and cannot be null.`);if(s+=`type=`+encodeURIComponent(``+t)+`&`,n!=null&&(s+=`process=`+encodeURIComponent(``+n)+`&`),r!=null&&(s+=`materialID=`+encodeURIComponent(``+r)+`&`),i!=null&&(s+=`operatorName=`+encodeURIComponent(``+i)+`&`),a===null)throw new globalThis.Error(`The parameter 'pallet' cannot be null.`);a!==void 0&&(s+=`pallet=`+encodeURIComponent(``+a)+`&`),s=s.replace(/[?&]$/,``);let c={method:`GET`,signal:o,headers:{}};return this.http.fetch(s,c).then(e=>this.processFindInstructions(e))}processFindInstructions(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===302?e.text().then(e=>Vt(`A server side error occurred.`,t,e,n)):t===404?e.text().then(e=>{let r=null,i=e===``?null:JSON.parse(e,this.jsonParseReviver);return r=bt.fromJS(i),Vt(`A server side error occurred.`,t,e,n,r)}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}printLabel(e,t,n){let r=this.baseUrl+`/api/v1/fms/print-label/{materialId}?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);if(r=r.replace(`{materialId}`,encodeURIComponent(``+e)),t===null)throw new globalThis.Error(`The parameter 'process' cannot be null.`);t!==void 0&&(r+=`process=`+encodeURIComponent(``+t)+`&`),r=r.replace(/[?&]$/,``);let i={method:`POST`,signal:n,headers:{}};return this.http.fetch(r,i).then(e=>this.processPrintLabel(e))}processPrintLabel(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t===400?e.text().then(e=>{let r=null,i=e===``?null:JSON.parse(e,this.jsonParseReviver);return r=bt.fromJS(i),Vt(`A server side error occurred.`,t,e,n,r)}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}parseBarcode(e,t,n){let r=this.baseUrl+`/api/v1/fms/parse-barcode?`;if(e==null)throw new globalThis.Error(`The parameter 'barcode' must be defined and cannot be null.`);r+=`barcode=`+encodeURIComponent(``+e)+`&`,t!=null&&t&&t.forEach(e=>{r+=`queuesToAddTo=`+encodeURIComponent(``+e)+`&`}),r=r.replace(/[?&]$/,``);let i={method:`POST`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processParseBarcode(e))}processParseBarcode(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=n?xt.fromJS(n):null,t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}enableVerboseLoggingForFiveMinutes(e){let t=this.baseUrl+`/api/v1/fms/enable-verbose-logging-for-five-minutes`;t=t.replace(/[?&]$/,``);let n={method:`POST`,signal:e,headers:{}};return this.http.fetch(t,n).then(e=>this.processEnableVerboseLoggingForFiveMinutes(e))}processEnableVerboseLoggingForFiveMinutes(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},Ce=class{constructor(e,t){this.jsonParseReviver=void 0,this.http=t||window,this.baseUrl=e??``}history(e,t,n){let r=this.baseUrl+`/api/v1/jobs/history?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);if(r+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,t==null)throw new globalThis.Error(`The parameter 'endUTC' must be defined and cannot be null.`);r+=`endUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`,r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processHistory(e))}processHistory(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Tt.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}filteredHistory(e,t,n,r){let i=this.baseUrl+`/api/v1/jobs/history?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);if(i+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,t==null)throw new globalThis.Error(`The parameter 'endUTC' must be defined and cannot be null.`);i+=`endUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`,i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`POST`,signal:r,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(i,a).then(e=>this.processFilteredHistory(e))}processFilteredHistory(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Tt.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recent(e,t,n){let r=this.baseUrl+`/api/v1/jobs/recent?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);r+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,r=r.replace(/[?&]$/,``);let i={body:JSON.stringify(t),method:`POST`,signal:n,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processRecent(e))}processRecent(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Et.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}latestSchedule(e){let t=this.baseUrl+`/api/v1/jobs/latest-schedule`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processLatestSchedule(e))}processLatestSchedule(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Dt.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}currentStatus(e){let t=this.baseUrl+`/api/v1/jobs/status`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processCurrentStatus(e))}processCurrentStatus(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Ye.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}unscheduledRebookings(e){let t=this.baseUrl+`/api/v1/jobs/unscheduled-rebookings`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processUnscheduledRebookings(e))}processUnscheduledRebookings(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(kt.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}addFromSim(e,t,n){let r=this.baseUrl+`/api/v1/jobs/add-from-sim?`;if(e===void 0)throw new globalThis.Error(`The parameter 'expectedPreviousScheduleId' must be defined.`);e!==null&&(r+=`expectedPreviousScheduleId=`+encodeURIComponent(``+e)+`&`),r=r.replace(/[?&]$/,``);let i={body:JSON.stringify(t),method:`POST`,signal:n,headers:{"Content-Type":`application/json`}};return this.http.fetch(r,i).then(e=>this.processAddFromSim(e))}processAddFromSim(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}add(e,t,n){let r=this.baseUrl+`/api/v1/jobs/add?`;if(e===void 0)throw new globalThis.Error(`The parameter 'expectedPreviousScheduleId' must be defined.`);e!==null&&(r+=`expectedPreviousScheduleId=`+encodeURIComponent(``+e)+`&`),r=r.replace(/[?&]$/,``);let i={body:JSON.stringify(t),method:`POST`,signal:n,headers:{"Content-Type":`application/json`}};return this.http.fetch(r,i).then(e=>this.processAdd(e))}processAdd(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}addUnallocatedCastingToQueue(e,t,n,r,i,a,o){let s=this.baseUrl+`/api/v1/jobs/casting/{castingName}?`;if(e==null)throw new globalThis.Error(`The parameter 'castingName' must be defined.`);if(s=s.replace(`{castingName}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'queue' must be defined and cannot be null.`);if(s+=`queue=`+encodeURIComponent(``+t)+`&`,n===null)throw new globalThis.Error(`The parameter 'qty' cannot be null.`);n!==void 0&&(s+=`qty=`+encodeURIComponent(``+n)+`&`),r!=null&&(s+=`operName=`+encodeURIComponent(``+r)+`&`),i!=null&&(s+=`workorder=`+encodeURIComponent(``+i)+`&`),s=s.replace(/[?&]$/,``);let c={body:JSON.stringify(a),method:`POST`,signal:o,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(s,c).then(e=>this.processAddUnallocatedCastingToQueue(e))}processAddUnallocatedCastingToQueue(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(nt.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getJobPlan(e,t){let n=this.baseUrl+`/api/v1/jobs/job/{jobUnique}/plan`;if(e==null)throw new globalThis.Error(`The parameter 'jobUnique' must be defined.`);n=n.replace(`{jobUnique}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processGetJobPlan(e))}processGetJobPlan(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Xe.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}addUnprocessedMaterialToQueue(e,t,n,r,i,a,o,s){let c=this.baseUrl+`/api/v1/jobs/job/{jobUnique}/unprocessed-material?`;if(e==null)throw new globalThis.Error(`The parameter 'jobUnique' must be defined.`);if(c=c.replace(`{jobUnique}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'lastCompletedProcess' must be defined and cannot be null.`);if(c+=`lastCompletedProcess=`+encodeURIComponent(``+t)+`&`,n==null)throw new globalThis.Error(`The parameter 'queue' must be defined and cannot be null.`);if(c+=`queue=`+encodeURIComponent(``+n)+`&`,r==null)throw new globalThis.Error(`The parameter 'pos' must be defined and cannot be null.`);c+=`pos=`+encodeURIComponent(``+r)+`&`,i!=null&&(c+=`operName=`+encodeURIComponent(``+i)+`&`),a!=null&&(c+=`workorder=`+encodeURIComponent(``+a)+`&`),c=c.replace(/[?&]$/,``);let l={body:JSON.stringify(o),method:`POST`,signal:s,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(c,l).then(e=>this.processAddUnprocessedMaterialToQueue(e))}processAddUnprocessedMaterialToQueue(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=nt.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}setJobComment(e,t,n){let r=this.baseUrl+`/api/v1/jobs/job/{jobUnique}/comment`;if(e==null)throw new globalThis.Error(`The parameter 'jobUnique' must be defined.`);r=r.replace(`{jobUnique}`,encodeURIComponent(``+e)),r=r.replace(/[?&]$/,``);let i={body:JSON.stringify(t),method:`PUT`,signal:n,headers:{"Content-Type":`application/json`}};return this.http.fetch(r,i).then(e=>this.processSetJobComment(e))}processSetJobComment(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}setMaterialInQueue(e,t,n,r){let i=this.baseUrl+`/api/v1/jobs/material/{materialId}/queue?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);i=i.replace(`{materialId}`,encodeURIComponent(``+e)),t!=null&&(i+=`operName=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`PUT`,signal:r,headers:{"Content-Type":`application/json`}};return this.http.fetch(i,a).then(e=>this.processSetMaterialInQueue(e))}processSetMaterialInQueue(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}removeMaterialFromAllQueues(e,t,n){let r=this.baseUrl+`/api/v1/jobs/material/{materialId}/queue?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);r=r.replace(`{materialId}`,encodeURIComponent(``+e)),t!=null&&(r+=`operName=`+encodeURIComponent(``+t)+`&`),r=r.replace(/[?&]$/,``);let i={method:`DELETE`,signal:n,headers:{}};return this.http.fetch(r,i).then(e=>this.processRemoveMaterialFromAllQueues(e))}processRemoveMaterialFromAllQueues(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t===400||t===409?e.text().then(e=>Vt(`A server side error occurred.`,t,e,n)):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}signalMaterialForQuarantine(e,t,n,r){let i=this.baseUrl+`/api/v1/jobs/material/{materialId}/signal-quarantine?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);i=i.replace(`{materialId}`,encodeURIComponent(``+e)),t!=null&&(i+=`operName=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`PUT`,signal:r,headers:{"Content-Type":`application/json`}};return this.http.fetch(i,a).then(e=>this.processSignalMaterialForQuarantine(e))}processSignalMaterialForQuarantine(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t===400||t===409?e.text().then(e=>Vt(`A server side error occurred.`,t,e,n)):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}quarantineQueuedMaterial(e,t,n,r){let i=this.baseUrl+`/api/v1/jobs/material/{materialId}/quarantine-queued?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);i=i.replace(`{materialId}`,encodeURIComponent(``+e)),t!=null&&(i+=`operName=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`PUT`,signal:r,headers:{"Content-Type":`application/json`}};return this.http.fetch(i,a).then(e=>this.processQuarantineQueuedMaterial(e))}processQuarantineQueuedMaterial(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t===400||t===409?e.text().then(e=>Vt(`A server side error occurred.`,t,e,n)):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}cancelLoad(e,t,n,r){let i=this.baseUrl+`/api/v1/jobs/material/{materialId}/cancel-load?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);i=i.replace(`{materialId}`,encodeURIComponent(``+e)),t!=null&&(i+=`operName=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`PUT`,signal:r,headers:{"Content-Type":`application/json`}};return this.http.fetch(i,a).then(e=>this.processCancelLoad(e))}processCancelLoad(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t===400||t===409||t===500?e.text().then(e=>Vt(`A server side error occurred.`,t,e,n)):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}invalidatePalletCycle(e,t,n,r,i,a){let o=this.baseUrl+`/api/v1/jobs/material/{materialId}/invalidate-process?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);o=o.replace(`{materialId}`,encodeURIComponent(``+e)),t!=null&&(o+=`operName=`+encodeURIComponent(``+t)+`&`),n!=null&&(o+=`changeCastingTo=`+encodeURIComponent(``+n)+`&`),r!=null&&(o+=`changeJobUniqueTo=`+encodeURIComponent(``+r)+`&`),o=o.replace(/[?&]$/,``);let s={body:JSON.stringify(i),method:`PUT`,signal:a,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(o,s).then(e=>this.processInvalidatePalletCycle(e))}processInvalidatePalletCycle(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=St.fromJS(n),t}):t===400||t===409?e.text().then(e=>Vt(`A server side error occurred.`,t,e,n)):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}bulkRemoveMaterialFromQueues(e,t,n){let r=this.baseUrl+`/api/v1/jobs/material?`;e!=null&&(r+=`operName=`+encodeURIComponent(``+e)+`&`),r=r.replace(/[?&]$/,``);let i={body:JSON.stringify(t),method:`DELETE`,signal:n,headers:{"Content-Type":`application/json`}};return this.http.fetch(r,i).then(e=>this.processBulkRemoveMaterialFromQueues(e))}processBulkRemoveMaterialFromQueues(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}decrementQuantities(e,t,n){let r=this.baseUrl+`/api/v1/jobs/planned-cycles?`;e!=null&&(r+=`loadDecrementsStrictlyAfterDecrementId=`+encodeURIComponent(``+e)+`&`),t!=null&&(r+=`loadDecrementsAfterTimeUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`),r=r.replace(/[?&]$/,``);let i={method:`DELETE`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processDecrementQuantities(e))}processDecrementQuantities(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(Mt.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},we=class{constructor(e,t){this.jsonParseReviver=void 0,this.http=t||window,this.baseUrl=e??``}get(e,t,n){let r=this.baseUrl+`/api/v1/log/events/all?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);if(r+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,t==null)throw new globalThis.Error(`The parameter 'endUTC' must be defined and cannot be null.`);r+=`endUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`,r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processGet(e))}processGet(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(ke.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getEventCSV(e,t,n){let r=this.baseUrl+`/api/v1/log/events.csv?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);if(r+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,t==null)throw new globalThis.Error(`The parameter 'endUTC' must be defined and cannot be null.`);r+=`endUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`,r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/octet-stream`}};return this.http.fetch(r,i).then(e=>this.processGetEventCSV(e))}processGetEventCSV(e){let t=e.status,n={};if(e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200||t===206){let r=e.headers?e.headers.get(`content-disposition`):void 0,i=r?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(r):void 0,a=i&&i.length>1?i[3]||i[2]:void 0;return a?a=decodeURIComponent(a):(i=r?/filename="?([^"]*?)"?(;|$)/g.exec(r):void 0,a=i&&i.length>1?i[1]:void 0),e.blob().then(e=>({fileName:a,data:e,status:t,headers:n}))}return t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getCompletedParts(e,t,n){let r=this.baseUrl+`/api/v1/log/events/all-completed-parts?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);if(r+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,t==null)throw new globalThis.Error(`The parameter 'endUTC' must be defined and cannot be null.`);r+=`endUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`,r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processGetCompletedParts(e))}processGetCompletedParts(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(ke.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recent(e,t,n){let r=this.baseUrl+`/api/v1/log/events/recent?`;if(e==null)throw new globalThis.Error(`The parameter 'lastSeenCounter' must be defined and cannot be null.`);r+=`lastSeenCounter=`+encodeURIComponent(``+e)+`&`,t!=null&&(r+=`expectedEndUTCofLastSeen=`+encodeURIComponent(t?``+t.toISOString():``)+`&`),r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processRecent(e))}processRecent(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(ke.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}logForMaterial(e,t){let n=this.baseUrl+`/api/v1/log/events/for-material/{materialID}`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);n=n.replace(`{materialID}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processLogForMaterial(e))}processLogForMaterial(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(ke.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}logForMaterials(e,t){let n=this.baseUrl+`/api/v1/log/events/for-material?`;e!=null&&e&&e.forEach(e=>{n+=`id=`+encodeURIComponent(``+e)+`&`}),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processLogForMaterials(e))}processLogForMaterials(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(ke.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}logForSerial(e,t){let n=this.baseUrl+`/api/v1/log/events/for-serial/{serial}`;if(e==null)throw new globalThis.Error(`The parameter 'serial' must be defined.`);n=n.replace(`{serial}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processLogForSerial(e))}processLogForSerial(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(ke.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}logForWorkorder(e,t){let n=this.baseUrl+`/api/v1/log/events/for-workorder/{workorder}`;if(e==null)throw new globalThis.Error(`The parameter 'workorder' must be defined.`);n=n.replace(`{workorder}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processLogForWorkorder(e))}processLogForWorkorder(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(ke.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}materialDetails(e,t){let n=this.baseUrl+`/api/v1/log/material-details/{materialID}`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);n=n.replace(`{materialID}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processMaterialDetails(e))}processMaterialDetails(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=St.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}materialDetailsForJob(e,t){let n=this.baseUrl+`/api/v1/log/material-for-job/{jobUnique}`;if(e==null)throw new globalThis.Error(`The parameter 'jobUnique' must be defined.`);n=n.replace(`{jobUnique}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processMaterialDetailsForJob(e))}processMaterialDetailsForJob(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(St.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}materialForSerial(e,t){let n=this.baseUrl+`/api/v1/log/material-for-serial/{serial}`;if(e==null)throw new globalThis.Error(`The parameter 'serial' must be defined.`);n=n.replace(`{serial}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processMaterialForSerial(e))}processMaterialForSerial(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(St.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}setSerial(e,t,n,r){let i=this.baseUrl+`/api/v1/log/material-details/{materialID}/serial?`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);if(i=i.replace(`{materialID}`,encodeURIComponent(``+e)),t===null)throw new globalThis.Error(`The parameter 'process' cannot be null.`);t!==void 0&&(i+=`process=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`POST`,signal:r,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(i,a).then(e=>this.processSetSerial(e))}processSetSerial(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=ke.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}setWorkorder(e,t,n,r){let i=this.baseUrl+`/api/v1/log/material-details/{materialID}/workorder?`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);if(i=i.replace(`{materialID}`,encodeURIComponent(``+e)),t===null)throw new globalThis.Error(`The parameter 'process' cannot be null.`);t!==void 0&&(i+=`process=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`POST`,signal:r,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(i,a).then(e=>this.processSetWorkorder(e))}processSetWorkorder(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=ke.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}setInspectionDecision(e,t,n,r,i){let a=this.baseUrl+`/api/v1/log/material-details/{materialID}/inspections/{inspType}?`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);if(a=a.replace(`{materialID}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'inspType' must be defined.`);if(a=a.replace(`{inspType}`,encodeURIComponent(``+t)),n===null)throw new globalThis.Error(`The parameter 'process' cannot be null.`);n!==void 0&&(a+=`process=`+encodeURIComponent(``+n)+`&`),a=a.replace(/[?&]$/,``);let o={body:JSON.stringify(r),method:`POST`,signal:i,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(a,o).then(e=>this.processSetInspectionDecision(e))}processSetInspectionDecision(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=ke.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recordOperatorNotes(e,t,n,r,i){let a=this.baseUrl+`/api/v1/log/material-details/{materialID}/notes?`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);if(a=a.replace(`{materialID}`,encodeURIComponent(``+e)),t===null)throw new globalThis.Error(`The parameter 'process' cannot be null.`);t!==void 0&&(a+=`process=`+encodeURIComponent(``+t)+`&`),n!=null&&(a+=`operatorName=`+encodeURIComponent(``+n)+`&`),a=a.replace(/[?&]$/,``);let o={body:JSON.stringify(r),method:`POST`,signal:i,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(a,o).then(e=>this.processRecordOperatorNotes(e))}processRecordOperatorNotes(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=ke.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}requestRebooking(e,t,n,r,i,a){let o=this.baseUrl+`/api/v1/log/events/rebooking?`;if(e==null)throw new globalThis.Error(`The parameter 'partName' must be defined and cannot be null.`);if(o+=`partName=`+encodeURIComponent(``+e)+`&`,t===null)throw new globalThis.Error(`The parameter 'qty' cannot be null.`);t!==void 0&&(o+=`qty=`+encodeURIComponent(``+t)+`&`),n!=null&&(o+=`workorder=`+encodeURIComponent(``+n)+`&`),r!=null&&(o+=`priority=`+encodeURIComponent(``+r)+`&`),o=o.replace(/[?&]$/,``);let s={body:JSON.stringify(i),method:`POST`,signal:a,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(o,s).then(e=>this.processRequestRebooking(e))}processRequestRebooking(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=ke.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}cancelRebooking(e,t){let n=this.baseUrl+`/api/v1/log/events/cancel-rebooking/{bookingId}`;if(e==null)throw new globalThis.Error(`The parameter 'bookingId' must be defined.`);n=n.replace(`{bookingId}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`POST`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processCancelRebooking(e))}processCancelRebooking(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=ke.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recordInspectionCompleted(e,t){let n=this.baseUrl+`/api/v1/log/events/inspection-result`;n=n.replace(/[?&]$/,``);let r={body:JSON.stringify(e),method:`POST`,signal:t,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processRecordInspectionCompleted(e))}processRecordInspectionCompleted(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=ke.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recordCloseoutCompleted(e,t){let n=this.baseUrl+`/api/v1/log/events/closeout`;n=n.replace(/[?&]$/,``);let r={body:JSON.stringify(e),method:`POST`,signal:t,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processRecordCloseoutCompleted(e))}processRecordCloseoutCompleted(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=ke.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recordWorkorderComment(e,t,n,r){let i=this.baseUrl+`/api/v1/log/workorder/{workorder}/comment?`;if(e==null)throw new globalThis.Error(`The parameter 'workorder' must be defined.`);i=i.replace(`{workorder}`,encodeURIComponent(``+e)),t!=null&&(i+=`operatorName=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`POST`,signal:r,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(i,a).then(e=>this.processRecordWorkorderComment(e))}processRecordWorkorderComment(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=ke.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getActiveWorkorder(e,t){let n=this.baseUrl+`/api/v1/log/workorder/{workorder}`;if(e==null)throw new globalThis.Error(`The parameter 'workorder' must be defined.`);n=n.replace(`{workorder}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processGetActiveWorkorder(e))}processGetActiveWorkorder(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(ut.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},Te=class{constructor(e,t){this.jsonParseReviver=void 0,this.http=t||window,this.baseUrl=e??``}getToolsInMachines(e){let t=this.baseUrl+`/api/v1/machines/tools`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processGetToolsInMachines(e))}processGetToolsInMachines(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(It.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getProgramsInCellController(e){let t=this.baseUrl+`/api/v1/machines/programs-in-cell-controller`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processGetProgramsInCellController(e))}processGetProgramsInCellController(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(Lt.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getProgramRevisionsInDescendingOrderOfRevision(e,t,n,r){let i=this.baseUrl+`/api/v1/machines/program/{programName}/revisions?`;if(e==null)throw new globalThis.Error(`The parameter 'programName' must be defined.`);if(i=i.replace(`{programName}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'count' must be defined and cannot be null.`);i+=`count=`+encodeURIComponent(``+t)+`&`,n!=null&&(i+=`revisionToStart=`+encodeURIComponent(``+n)+`&`),i=i.replace(/[?&]$/,``);let a={method:`GET`,signal:r,headers:{Accept:`application/json`}};return this.http.fetch(i,a).then(e=>this.processGetProgramRevisionsInDescendingOrderOfRevision(e))}processGetProgramRevisionsInDescendingOrderOfRevision(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(Rt.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getProgramRevisionContent(e,t,n){let r=this.baseUrl+`/api/v1/machines/program/{programName}/revision/{revision}/content`;if(e==null)throw new globalThis.Error(`The parameter 'programName' must be defined.`);if(r=r.replace(`{programName}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'revision' must be defined.`);r=r.replace(`{revision}`,encodeURIComponent(``+t)),r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processGetProgramRevisionContent(e))}processGetProgramRevisionContent(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=n===void 0?null:n,t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getLatestProgramRevisionContent(e,t){let n=this.baseUrl+`/api/v1/machines/program/{programName}/latest-revision/content`;if(e==null)throw new globalThis.Error(`The parameter 'programName' must be defined.`);n=n.replace(`{programName}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processGetLatestProgramRevisionContent(e))}processGetLatestProgramRevisionContent(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=n===void 0?null:n,t}):t!==200&&t!==204?e.text().then(e=>Vt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},Ee=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e){if(this.name=e.Name,this.version=e.Version,this.licenseExpires=e.LicenseExpires?new Date(e.LicenseExpires.toString()):void 0,Array.isArray(e.AdditionalLogServers)){this.additionalLogServers=[];for(let t of e.AdditionalLogServers)this.additionalLogServers.push(t)}if(this.openIDConnectAuthority=e.OpenIDConnectAuthority,this.localhostOpenIDConnectAuthority=e.LocalhostOpenIDConnectAuthority,this.openIDConnectClientId=e.OpenIDConnectClientId,this.usingLabelPrinterForSerials=e.UsingLabelPrinterForSerials,this.useClientPrinterForLabels=e.UseClientPrinterForLabels,this.quarantineQueue=e.QuarantineQueue,this.customStationMonitorDialogUrl=e.CustomStationMonitorDialogUrl,this.supportsRebookings=e.SupportsRebookings,this.allowChangeWorkorderAtLoadStation=e.AllowChangeWorkorderAtLoadStation,this.allowInvalidateMaterialAtLoadStation=e.AllowInvalidateMaterialAtLoadStation,e.LoadStationNames){this.loadStationNames={};for(let t in e.LoadStationNames)e.LoadStationNames.hasOwnProperty(t)&&(this.loadStationNames[t]=e.LoadStationNames[t])}this.requireScanAtCloseout=e.RequireScanAtCloseout,this.requireWorkorderBeforeAllowCloseoutComplete=e.RequireWorkorderBeforeAllowCloseoutComplete,this.addToQueueButton=e.AddToQueueButton,this.requireOperatorNamePromptWhenAddingMaterial=e.RequireOperatorNamePromptWhenAddingMaterial,this.allowEditJobPlanQuantityFromQueuesPage=e.AllowEditJobPlanQuantityFromQueuesPage,this.allowInvalidateMaterialOnQueuesPage=e.AllowInvalidateMaterialOnQueuesPage,this.basketName=e.BasketName}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.Name=this.name,e.Version=this.version,e.LicenseExpires=this.licenseExpires?this.licenseExpires.toISOString():void 0,Array.isArray(this.additionalLogServers)){e.AdditionalLogServers=[];for(let t of this.additionalLogServers)e.AdditionalLogServers.push(t)}if(e.OpenIDConnectAuthority=this.openIDConnectAuthority,e.LocalhostOpenIDConnectAuthority=this.localhostOpenIDConnectAuthority,e.OpenIDConnectClientId=this.openIDConnectClientId,e.UsingLabelPrinterForSerials=this.usingLabelPrinterForSerials,e.UseClientPrinterForLabels=this.useClientPrinterForLabels,e.QuarantineQueue=this.quarantineQueue,e.CustomStationMonitorDialogUrl=this.customStationMonitorDialogUrl,e.SupportsRebookings=this.supportsRebookings,e.AllowChangeWorkorderAtLoadStation=this.allowChangeWorkorderAtLoadStation,e.AllowInvalidateMaterialAtLoadStation=this.allowInvalidateMaterialAtLoadStation,this.loadStationNames){e.LoadStationNames={};for(let t in this.loadStationNames)this.loadStationNames.hasOwnProperty(t)&&(e.LoadStationNames[t]=this.loadStationNames[t])}return e.RequireScanAtCloseout=this.requireScanAtCloseout,e.RequireWorkorderBeforeAllowCloseoutComplete=this.requireWorkorderBeforeAllowCloseoutComplete,e.AddToQueueButton=this.addToQueueButton,e.RequireOperatorNamePromptWhenAddingMaterial=this.requireOperatorNamePromptWhenAddingMaterial,e.AllowEditJobPlanQuantityFromQueuesPage=this.allowEditJobPlanQuantityFromQueuesPage,e.AllowInvalidateMaterialOnQueuesPage=this.allowInvalidateMaterialOnQueuesPage,e.BasketName=this.basketName,e}},De=function(e){return e.DoNotShow=`DoNotShow`,e.AddBulkUnassigned=`AddBulkUnassigned`,e.LookupExistingSerial=`LookupExistingSerial`,e.ManualBarcodeScan=`ManualBarcodeScan`,e}({}),Oe=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.logEntry=e.LogEntry?ke.fromJS(e.LogEntry):void 0,this.newJobs=e.NewJobs?Pe.fromJS(e.NewJobs):void 0,this.newCurrentStatus=e.NewCurrentStatus?Ye.fromJS(e.NewCurrentStatus):void 0)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.LogEntry=this.logEntry?this.logEntry.toJSON():void 0,e.NewJobs=this.newJobs?this.newJobs.toJSON():void 0,e.NewCurrentStatus=this.newCurrentStatus?this.newCurrentStatus.toJSON():void 0,e}},ke=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.material=[])}init(e){if(e){if(this.counter=e.counter,Array.isArray(e.material)){this.material=[];for(let t of e.material)this.material.push(Ae.fromJS(t))}if(this.type=e.type,this.startofcycle=e.startofcycle,this.endUTC=e.endUTC?new Date(e.endUTC.toString()):void 0,this.loc=e.loc,this.locnum=e.locnum,this.pal=e.pal,this.program=e.program,this.result=e.result,this.elapsed=e.elapsed,this.active=e.active,e.details){this.details={};for(let t in e.details)e.details.hasOwnProperty(t)&&(this.details[t]=e.details[t])}if(Array.isArray(e.tooluse)){this.tooluse=[];for(let t of e.tooluse)this.tooluse.push(je.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.counter=this.counter,Array.isArray(this.material)){e.material=[];for(let t of this.material)e.material.push(t?t.toJSON():void 0)}if(e.type=this.type,e.startofcycle=this.startofcycle,e.endUTC=this.endUTC?this.endUTC.toISOString():void 0,e.loc=this.loc,e.locnum=this.locnum,e.pal=this.pal,e.program=this.program,e.result=this.result,e.elapsed=this.elapsed,e.active=this.active,this.details){e.details={};for(let t in this.details)this.details.hasOwnProperty(t)&&(e.details[t]=this.details[t])}if(Array.isArray(this.tooluse)){e.tooluse=[];for(let t of this.tooluse)e.tooluse.push(t?t.toJSON():void 0)}return e}},Ae=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.id=e.id,this.uniq=e.uniq,this.part=e.part,this.proc=e.proc,this.path=e.path,this.numproc=e.numproc,this.face=e.face,this.serial=e.serial,this.workorder=e.workorder)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.id=this.id,e.uniq=this.uniq,e.part=this.part,e.proc=this.proc,e.path=this.path,e.numproc=this.numproc,e.face=this.face,e.serial=this.serial,e.workorder=this.workorder,e}},V=function(e){return e.LoadUnloadCycle=`LoadUnloadCycle`,e.MachineCycle=`MachineCycle`,e.PartMark=`PartMark`,e.Inspection=`Inspection`,e.OrderAssignment=`OrderAssignment`,e.GeneralMessage=`GeneralMessage`,e.PalletCycle=`PalletCycle`,e.WorkorderComment=`WorkorderComment`,e.InspectionResult=`InspectionResult`,e.CloseOut=`CloseOut`,e.AddToQueue=`AddToQueue`,e.RemoveFromQueue=`RemoveFromQueue`,e.InspectionForce=`InspectionForce`,e.PalletOnRotaryInbound=`PalletOnRotaryInbound`,e.PalletInStocker=`PalletInStocker`,e.SignalQuarantine=`SignalQuarantine`,e.InvalidateCycle=`InvalidateCycle`,e.SwapMaterialOnPallet=`SwapMaterialOnPallet`,e.Rebooking=`Rebooking`,e.CancelRebooking=`CancelRebooking`,e.BasketLoadUnload=`BasketLoadUnload`,e.BasketCycle=`BasketCycle`,e}({}),je=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.tool=e.Tool,this.pocket=e.Pocket,this.toolChangeOccurred=e.ToolChangeOccurred,this.toolSerialAtStartOfCycle=e.ToolSerialAtStartOfCycle,this.toolSerialAtEndOfCycle=e.ToolSerialAtEndOfCycle,this.toolUseDuringCycle=e.ToolUseDuringCycle,this.totalToolUseAtEndOfCycle=e.TotalToolUseAtEndOfCycle,this.configuredToolLife=e.ConfiguredToolLife,this.toolUseCountDuringCycle=e.ToolUseCountDuringCycle,this.totalToolUseCountAtEndOfCycle=e.TotalToolUseCountAtEndOfCycle,this.configuredToolLifeCount=e.ConfiguredToolLifeCount)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Tool=this.tool,e.Pocket=this.pocket,e.ToolChangeOccurred=this.toolChangeOccurred,e.ToolSerialAtStartOfCycle=this.toolSerialAtStartOfCycle,e.ToolSerialAtEndOfCycle=this.toolSerialAtEndOfCycle,e.ToolUseDuringCycle=this.toolUseDuringCycle,e.TotalToolUseAtEndOfCycle=this.totalToolUseAtEndOfCycle,e.ConfiguredToolLife=this.configuredToolLife,e.ToolUseCountDuringCycle=this.toolUseCountDuringCycle,e.TotalToolUseCountAtEndOfCycle=this.totalToolUseCountAtEndOfCycle,e.ConfiguredToolLifeCount=this.configuredToolLifeCount,e}},Me=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.stops=[])}init(e){if(e){if(this.materialID=e.MaterialID,this.process=e.Process,this.pallet=e.Pallet,this.loadStation=e.LoadStation,Array.isArray(e.Stops)){this.stops=[];for(let t of e.Stops)this.stops.push(Ne.fromJS(t))}this.unloadStation=e.UnloadStation}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.Process=this.process,e.Pallet=this.pallet,e.LoadStation=this.loadStation,Array.isArray(this.stops)){e.Stops=[];for(let t of this.stops)e.Stops.push(t?t.toJSON():void 0)}return e.UnloadStation=this.unloadStation,e}},Ne=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.stationName=e.StationName,this.stationNum=e.StationNum)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.StationName=this.stationName,e.StationNum=this.stationNum,e}},Pe=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.jobs=[])}init(e){if(e){if(this.scheduleId=e.ScheduleId,Array.isArray(e.Jobs)){this.jobs=[];for(let t of e.Jobs)this.jobs.push(Fe.fromJS(t))}if(e.ExtraParts){this.extraParts={};for(let t in e.ExtraParts)e.ExtraParts.hasOwnProperty(t)&&(this.extraParts[t]=e.ExtraParts[t])}if(Array.isArray(e.StationUse)){this.stationUse=[];for(let t of e.StationUse)this.stationUse.push(He.fromJS(t))}if(Array.isArray(e.StationUseForCurrentStatus)){this.stationUseForCurrentStatus=[];for(let t of e.StationUseForCurrentStatus)this.stationUseForCurrentStatus.push(He.fromJS(t))}if(Array.isArray(e.SimDayUsage)){this.simDayUsage=[];for(let t of e.SimDayUsage)this.simDayUsage.push(We.fromJS(t))}if(Array.isArray(e.SimWorkordersFilled)){this.simWorkordersFilled=[];for(let t of e.SimWorkordersFilled)this.simWorkordersFilled.push(Ge.fromJS(t))}if(Array.isArray(e.CurrentUnfilledWorkorders)){this.currentUnfilledWorkorders=[];for(let t of e.CurrentUnfilledWorkorders)this.currentUnfilledWorkorders.push(Ke.fromJS(t))}if(Array.isArray(e.Programs)){this.programs=[];for(let t of e.Programs)this.programs.push(Je.fromJS(t))}if(Array.isArray(e.AllocationWarning)){this.allocationWarning=[];for(let t of e.AllocationWarning)this.allocationWarning.push(t)}this.debugMessage=e.DebugMessage}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.ScheduleId=this.scheduleId,Array.isArray(this.jobs)){e.Jobs=[];for(let t of this.jobs)e.Jobs.push(t?t.toJSON():void 0)}if(this.extraParts){e.ExtraParts={};for(let t in this.extraParts)this.extraParts.hasOwnProperty(t)&&(e.ExtraParts[t]=this.extraParts[t])}if(Array.isArray(this.stationUse)){e.StationUse=[];for(let t of this.stationUse)e.StationUse.push(t?t.toJSON():void 0)}if(Array.isArray(this.stationUseForCurrentStatus)){e.StationUseForCurrentStatus=[];for(let t of this.stationUseForCurrentStatus)e.StationUseForCurrentStatus.push(t?t.toJSON():void 0)}if(Array.isArray(this.simDayUsage)){e.SimDayUsage=[];for(let t of this.simDayUsage)e.SimDayUsage.push(t?t.toJSON():void 0)}if(Array.isArray(this.simWorkordersFilled)){e.SimWorkordersFilled=[];for(let t of this.simWorkordersFilled)e.SimWorkordersFilled.push(t?t.toJSON():void 0)}if(Array.isArray(this.currentUnfilledWorkorders)){e.CurrentUnfilledWorkorders=[];for(let t of this.currentUnfilledWorkorders)e.CurrentUnfilledWorkorders.push(t?t.toJSON():void 0)}if(Array.isArray(this.programs)){e.Programs=[];for(let t of this.programs)e.Programs.push(t?t.toJSON():void 0)}if(Array.isArray(this.allocationWarning)){e.AllocationWarning=[];for(let t of this.allocationWarning)e.AllocationWarning.push(t)}return e.DebugMessage=this.debugMessage,e}},Fe=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.procsAndPaths=[])}init(e){if(e){if(this.unique=e.Unique,this.routeStartUTC=e.RouteStartUTC?new Date(e.RouteStartUTC.toString()):void 0,this.routeEndUTC=e.RouteEndUTC?new Date(e.RouteEndUTC.toString()):void 0,this.archived=e.Archived,this.partName=e.PartName,this.comment=e.Comment,this.allocationAlgorithm=e.AllocationAlgorithm,Array.isArray(e.Bookings)){this.bookings=[];for(let t of e.Bookings)this.bookings.push(t)}if(this.provisionalWorkorderId=e.ProvisionalWorkorderId,this.artifactRunDate=e.ArtifactRunDate?new Date(e.ArtifactRunDate.toString()):void 0,this.manuallyCreated=e.ManuallyCreated,this.holdEntireJob=e.HoldEntireJob?Ie.fromJS(e.HoldEntireJob):void 0,this.cycles=e.Cycles,Array.isArray(e.ProcsAndPaths)){this.procsAndPaths=[];for(let t of e.ProcsAndPaths)this.procsAndPaths.push(Le.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.Unique=this.unique,e.RouteStartUTC=this.routeStartUTC?this.routeStartUTC.toISOString():void 0,e.RouteEndUTC=this.routeEndUTC?this.routeEndUTC.toISOString():void 0,e.Archived=this.archived,e.PartName=this.partName,e.Comment=this.comment,e.AllocationAlgorithm=this.allocationAlgorithm,Array.isArray(this.bookings)){e.Bookings=[];for(let t of this.bookings)e.Bookings.push(t)}if(e.ProvisionalWorkorderId=this.provisionalWorkorderId,e.ArtifactRunDate=this.artifactRunDate?zt(this.artifactRunDate):void 0,e.ManuallyCreated=this.manuallyCreated,e.HoldEntireJob=this.holdEntireJob?this.holdEntireJob.toJSON():void 0,e.Cycles=this.cycles,Array.isArray(this.procsAndPaths)){e.ProcsAndPaths=[];for(let t of this.procsAndPaths)e.ProcsAndPaths.push(t?t.toJSON():void 0)}return e}},Ie=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.holdUnholdPattern=[])}init(e){if(e){if(this.userHold=e.UserHold,this.reasonForUserHold=e.ReasonForUserHold,Array.isArray(e.HoldUnholdPattern)){this.holdUnholdPattern=[];for(let t of e.HoldUnholdPattern)this.holdUnholdPattern.push(t)}this.holdUnholdPatternStartUTC=e.HoldUnholdPatternStartUTC?new Date(e.HoldUnholdPatternStartUTC.toString()):void 0,this.holdUnholdPatternRepeats=e.HoldUnholdPatternRepeats}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.UserHold=this.userHold,e.ReasonForUserHold=this.reasonForUserHold,Array.isArray(this.holdUnholdPattern)){e.HoldUnholdPattern=[];for(let t of this.holdUnholdPattern)e.HoldUnholdPattern.push(t)}return e.HoldUnholdPatternStartUTC=this.holdUnholdPatternStartUTC?this.holdUnholdPatternStartUTC.toISOString():void 0,e.HoldUnholdPatternRepeats=this.holdUnholdPatternRepeats,e}},Le=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.paths=[])}init(e){if(e){if(e.ExtraFields){this.extraFields={};for(let t in e.ExtraFields)e.ExtraFields.hasOwnProperty(t)&&(this.extraFields[t]=e.ExtraFields[t])}if(Array.isArray(e.BasketLoadStations)){this.basketLoadStations=[];for(let t of e.BasketLoadStations)this.basketLoadStations.push(t)}if(this.expectedBasketLoadTime=e.ExpectedBasketLoadTime,Array.isArray(e.BasketUnloadStations)){this.basketUnloadStations=[];for(let t of e.BasketUnloadStations)this.basketUnloadStations.push(t)}if(this.expectedBasketUnloadTime=e.ExpectedBasketUnloadTime,Array.isArray(e.paths)){this.paths=[];for(let t of e.paths)this.paths.push(Re.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},this.extraFields){e.ExtraFields={};for(let t in this.extraFields)this.extraFields.hasOwnProperty(t)&&(e.ExtraFields[t]=this.extraFields[t])}if(Array.isArray(this.basketLoadStations)){e.BasketLoadStations=[];for(let t of this.basketLoadStations)e.BasketLoadStations.push(t)}if(e.ExpectedBasketLoadTime=this.expectedBasketLoadTime,Array.isArray(this.basketUnloadStations)){e.BasketUnloadStations=[];for(let t of this.basketUnloadStations)e.BasketUnloadStations.push(t)}if(e.ExpectedBasketUnloadTime=this.expectedBasketUnloadTime,Array.isArray(this.paths)){e.paths=[];for(let t of this.paths)e.paths.push(t?t.toJSON():void 0)}return e}},Re=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.palletNums=[],this.load=[],this.unload=[],this.stops=[])}init(e){if(e){if(Array.isArray(e.PalletNums)){this.palletNums=[];for(let t of e.PalletNums)this.palletNums.push(t)}if(this.fixture=e.Fixture,this.face=e.Face,Array.isArray(e.Load)){this.load=[];for(let t of e.Load)this.load.push(t)}if(this.expectedLoadTime=e.ExpectedLoadTime,Array.isArray(e.Unload)){this.unload=[];for(let t of e.Unload)this.unload.push(t)}if(this.expectedUnloadTime=e.ExpectedUnloadTime,Array.isArray(e.Stops)){this.stops=[];for(let t of e.Stops)this.stops.push(ze.fromJS(t))}if(Array.isArray(e.SimulatedProduction)){this.simulatedProduction=[];for(let t of e.SimulatedProduction)this.simulatedProduction.push(Be.fromJS(t))}if(e.SimulatedStartTimePerPallet){this.simulatedStartTimePerPallet={};for(let t in e.SimulatedStartTimePerPallet)e.SimulatedStartTimePerPallet.hasOwnProperty(t)&&(this.simulatedStartTimePerPallet[t]=e.SimulatedStartTimePerPallet[t]?new Date(e.SimulatedStartTimePerPallet[t].toString()):void 0)}if(this.simulatedStartingUTC=e.SimulatedStartingUTC?new Date(e.SimulatedStartingUTC.toString()):void 0,this.simulatedAverageFlowTime=e.SimulatedAverageFlowTime,this.holdMachining=e.HoldMachining?Ie.fromJS(e.HoldMachining):void 0,this.holdLoadUnload=e.HoldLoadUnload?Ie.fromJS(e.HoldLoadUnload):void 0,this.partsPerPallet=e.PartsPerPallet,this.inputQueue=e.InputQueue,this.outputQueue=e.OutputQueue,Array.isArray(e.Inspections)){this.inspections=[];for(let t of e.Inspections)this.inspections.push(Ve.fromJS(t))}this.casting=e.Casting}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},Array.isArray(this.palletNums)){e.PalletNums=[];for(let t of this.palletNums)e.PalletNums.push(t)}if(e.Fixture=this.fixture,e.Face=this.face,Array.isArray(this.load)){e.Load=[];for(let t of this.load)e.Load.push(t)}if(e.ExpectedLoadTime=this.expectedLoadTime,Array.isArray(this.unload)){e.Unload=[];for(let t of this.unload)e.Unload.push(t)}if(e.ExpectedUnloadTime=this.expectedUnloadTime,Array.isArray(this.stops)){e.Stops=[];for(let t of this.stops)e.Stops.push(t?t.toJSON():void 0)}if(Array.isArray(this.simulatedProduction)){e.SimulatedProduction=[];for(let t of this.simulatedProduction)e.SimulatedProduction.push(t?t.toJSON():void 0)}if(this.simulatedStartTimePerPallet){e.SimulatedStartTimePerPallet={};for(let t in this.simulatedStartTimePerPallet)this.simulatedStartTimePerPallet.hasOwnProperty(t)&&(e.SimulatedStartTimePerPallet[t]=this.simulatedStartTimePerPallet[t]?this.simulatedStartTimePerPallet[t].toISOString():void 0)}if(e.SimulatedStartingUTC=this.simulatedStartingUTC?this.simulatedStartingUTC.toISOString():void 0,e.SimulatedAverageFlowTime=this.simulatedAverageFlowTime,e.HoldMachining=this.holdMachining?this.holdMachining.toJSON():void 0,e.HoldLoadUnload=this.holdLoadUnload?this.holdLoadUnload.toJSON():void 0,e.PartsPerPallet=this.partsPerPallet,e.InputQueue=this.inputQueue,e.OutputQueue=this.outputQueue,Array.isArray(this.inspections)){e.Inspections=[];for(let t of this.inspections)e.Inspections.push(t?t.toJSON():void 0)}return e.Casting=this.casting,e}},ze=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.stationNums=[])}init(e){if(e){if(this.stationGroup=e.StationGroup,Array.isArray(e.StationNums)){this.stationNums=[];for(let t of e.StationNums)this.stationNums.push(t)}this.expectedCycleTime=e.ExpectedCycleTime,this.program=e.Program,this.programRevision=e.ProgramRevision}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.StationGroup=this.stationGroup,Array.isArray(this.stationNums)){e.StationNums=[];for(let t of this.stationNums)e.StationNums.push(t)}return e.ExpectedCycleTime=this.expectedCycleTime,e.Program=this.program,e.ProgramRevision=this.programRevision,e}},Be=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.timeUTC=e.TimeUTC?new Date(e.TimeUTC.toString()):void 0,this.quantity=e.Quantity)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.TimeUTC=this.timeUTC?this.timeUTC.toISOString():void 0,e.Quantity=this.quantity,e}},Ve=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.inspectionType=e.InspectionType,this.counter=e.Counter,this.maxVal=e.MaxVal,this.randomFreq=e.RandomFreq,this.timeInterval=e.TimeInterval,this.expectedInspectionTime=e.ExpectedInspectionTime)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.InspectionType=this.inspectionType,e.Counter=this.counter,e.MaxVal=this.maxVal,e.RandomFreq=this.randomFreq,e.TimeInterval=this.timeInterval,e.ExpectedInspectionTime=this.expectedInspectionTime,e}},He=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e&&(this.scheduleId=e.ScheduleId,this.stationGroup=e.StationGroup,this.stationNum=e.StationNum,this.startUTC=e.StartUTC?new Date(e.StartUTC.toString()):void 0,this.endUTC=e.EndUTC?new Date(e.EndUTC.toString()):void 0,this.planDown=e.PlanDown,this.pallet=e.Pallet,Array.isArray(e.Parts))){this.parts=[];for(let t of e.Parts)this.parts.push(Ue.fromJS(t))}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.ScheduleId=this.scheduleId,e.StationGroup=this.stationGroup,e.StationNum=this.stationNum,e.StartUTC=this.startUTC?this.startUTC.toISOString():void 0,e.EndUTC=this.endUTC?this.endUTC.toISOString():void 0,e.PlanDown=this.planDown,e.Pallet=this.pallet,Array.isArray(this.parts)){e.Parts=[];for(let t of this.parts)e.Parts.push(t?t.toJSON():void 0)}return e}},Ue=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.jobUnique=e.JobUnique,this.process=e.Process,this.path=e.Path)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.JobUnique=this.jobUnique,e.Process=this.process,e.Path=this.path,e}},We=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.day=e.Day?new Date(e.Day.toString()):void 0,this.machineGroup=e.MachineGroup,this.usage=e.Usage)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Day=this.day?zt(this.day):void 0,e.MachineGroup=this.machineGroup,e.Usage=this.usage,e}},Ge=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.workorderId=e.WorkorderId,this.part=e.Part,this.started=e.Started?new Date(e.Started.toString()):void 0,this.filled=e.Filled?new Date(e.Filled.toString()):void 0)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.WorkorderId=this.workorderId,e.Part=this.part,e.Started=this.started?zt(this.started):void 0,e.Filled=this.filled?zt(this.filled):void 0,e}},Ke=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e&&(this.workorderId=e.WorkorderId,this.part=e.Part,this.quantity=e.Quantity,this.dueDate=e.DueDate?new Date(e.DueDate.toString()):void 0,this.priority=e.Priority,Array.isArray(e.Programs))){this.programs=[];for(let t of e.Programs)this.programs.push(qe.fromJS(t))}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.WorkorderId=this.workorderId,e.Part=this.part,e.Quantity=this.quantity,e.DueDate=this.dueDate?this.dueDate.toISOString():void 0,e.Priority=this.priority,Array.isArray(this.programs)){e.Programs=[];for(let t of this.programs)e.Programs.push(t?t.toJSON():void 0)}return e}},qe=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.processNumber=e.ProcessNumber,this.stopIndex=e.StopIndex,this.programName=e.ProgramName,this.revision=e.Revision)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.ProcessNumber=this.processNumber,e.StopIndex=this.stopIndex,e.ProgramName=this.programName,e.Revision=this.revision,e}},Je=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.programName=e.ProgramName,this.comment=e.Comment,this.programContent=e.ProgramContent,this.revision=e.Revision)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.ProgramName=this.programName,e.Comment=this.comment,e.ProgramContent=this.programContent,e.Revision=this.revision,e}},Ye=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.jobs={},this.pallets={},this.material=[],this.alarms=[],this.queues={})}init(e){if(e){if(this.timeOfCurrentStatusUTC=e.TimeOfCurrentStatusUTC?new Date(e.TimeOfCurrentStatusUTC.toString()):void 0,e.Jobs){this.jobs={};for(let t in e.Jobs)e.Jobs.hasOwnProperty(t)&&(this.jobs[t]=e.Jobs[t]?Ze.fromJS(e.Jobs[t]):new Ze)}if(e.Pallets){this.pallets={};for(let t in e.Pallets)e.Pallets.hasOwnProperty(t)&&(this.pallets[t]=e.Pallets[t]?$e.fromJS(e.Pallets[t]):new $e)}if(Array.isArray(e.Material)){this.material=[];for(let t of e.Material)this.material.push(nt.fromJS(t))}if(Array.isArray(e.Alarms)){this.alarms=[];for(let t of e.Alarms)this.alarms.push(t)}if(e.Queues){this.queues={};for(let t in e.Queues)e.Queues.hasOwnProperty(t)&&(this.queues[t]=e.Queues[t]?st.fromJS(e.Queues[t]):new st)}if(Array.isArray(e.MachineLocations)){this.machineLocations=[];for(let t of e.MachineLocations)this.machineLocations.push(lt.fromJS(t))}if(Array.isArray(e.Workorders)){this.workorders=[];for(let t of e.Workorders)this.workorders.push(ut.fromJS(t))}if(e.Baskets){this.baskets={};for(let t in e.Baskets)e.Baskets.hasOwnProperty(t)&&(this.baskets[t]=e.Baskets[t]?mt.fromJS(e.Baskets[t]):new mt)}if(Array.isArray(e.BasketMoveInstructions)){this.basketMoveInstructions=[];for(let t of e.BasketMoveInstructions)this.basketMoveInstructions.push(yt.fromJS(t))}this.customState=e.CustomState}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.TimeOfCurrentStatusUTC=this.timeOfCurrentStatusUTC?this.timeOfCurrentStatusUTC.toISOString():void 0,this.jobs){e.Jobs={};for(let t in this.jobs)this.jobs.hasOwnProperty(t)&&(e.Jobs[t]=this.jobs[t]?this.jobs[t].toJSON():void 0)}if(this.pallets){e.Pallets={};for(let t in this.pallets)this.pallets.hasOwnProperty(t)&&(e.Pallets[t]=this.pallets[t]?this.pallets[t].toJSON():void 0)}if(Array.isArray(this.material)){e.Material=[];for(let t of this.material)e.Material.push(t?t.toJSON():void 0)}if(Array.isArray(this.alarms)){e.Alarms=[];for(let t of this.alarms)e.Alarms.push(t)}if(this.queues){e.Queues={};for(let t in this.queues)this.queues.hasOwnProperty(t)&&(e.Queues[t]=this.queues[t]?this.queues[t].toJSON():void 0)}if(Array.isArray(this.machineLocations)){e.MachineLocations=[];for(let t of this.machineLocations)e.MachineLocations.push(t?t.toJSON():void 0)}if(Array.isArray(this.workorders)){e.Workorders=[];for(let t of this.workorders)e.Workorders.push(t?t.toJSON():void 0)}if(this.baskets){e.Baskets={};for(let t in this.baskets)this.baskets.hasOwnProperty(t)&&(e.Baskets[t]=this.baskets[t]?this.baskets[t].toJSON():void 0)}if(Array.isArray(this.basketMoveInstructions)){e.BasketMoveInstructions=[];for(let t of this.basketMoveInstructions)e.BasketMoveInstructions.push(t?t.toJSON():void 0)}return e.CustomState=this.customState,e}},Xe=class e extends Fe{constructor(e){super(e)}init(e){if(super.init(e),e&&(this.scheduleId=e.ScheduleId,this.copiedToSystem=e.CopiedToSystem,Array.isArray(e.Decrements))){this.decrements=[];for(let t of e.Decrements)this.decrements.push(Qe.fromJS(t))}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.ScheduleId=this.scheduleId,e.CopiedToSystem=this.copiedToSystem,Array.isArray(this.decrements)){e.Decrements=[];for(let t of this.decrements)e.Decrements.push(t?t.toJSON():void 0)}return super.toJSON(e),e}},Ze=class e extends Xe{constructor(e){super(e)}init(e){if(super.init(e),e){if(Array.isArray(e.Completed)){this.completed=[];for(let t of e.Completed)this.completed.push(t)}if(Array.isArray(e.Precedence)){this.precedence=[];for(let t of e.Precedence)this.precedence.push(t)}if(Array.isArray(e.AssignedWorkorders)){this.assignedWorkorders=[];for(let t of e.AssignedWorkorders)this.assignedWorkorders.push(t)}this.remainingToStart=e.RemainingToStart}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},Array.isArray(this.completed)){e.Completed=[];for(let t of this.completed)e.Completed.push(t)}if(Array.isArray(this.precedence)){e.Precedence=[];for(let t of this.precedence)e.Precedence.push(t)}if(Array.isArray(this.assignedWorkorders)){e.AssignedWorkorders=[];for(let t of this.assignedWorkorders)e.AssignedWorkorders.push(t)}return e.RemainingToStart=this.remainingToStart,super.toJSON(e),e}},Qe=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.decrementId=e.DecrementId,this.timeUTC=e.TimeUTC?new Date(e.TimeUTC.toString()):void 0,this.quantity=e.Quantity)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.DecrementId=this.decrementId,e.TimeUTC=this.timeUTC?this.timeUTC.toISOString():void 0,e.Quantity=this.quantity,e}},$e=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.currentPalletLocation=new et)}init(e){if(e){if(this.palletNum=e.PalletNum,this.fixtureOnPallet=e.FixtureOnPallet,this.onHold=e.OnHold,this.currentPalletLocation=e.CurrentPalletLocation?et.fromJS(e.CurrentPalletLocation):new et,this.newFixture=e.NewFixture,this.numFaces=e.NumFaces,Array.isArray(e.FaceNames)){this.faceNames=[];for(let t of e.FaceNames)this.faceNames.push(t)}this.targetLocation=e.TargetLocation?et.fromJS(e.TargetLocation):void 0,this.percentMoveCompleted=e.PercentMoveCompleted}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.PalletNum=this.palletNum,e.FixtureOnPallet=this.fixtureOnPallet,e.OnHold=this.onHold,e.CurrentPalletLocation=this.currentPalletLocation?this.currentPalletLocation.toJSON():void 0,e.NewFixture=this.newFixture,e.NumFaces=this.numFaces,Array.isArray(this.faceNames)){e.FaceNames=[];for(let t of this.faceNames)e.FaceNames.push(t)}return e.TargetLocation=this.targetLocation?this.targetLocation.toJSON():void 0,e.PercentMoveCompleted=this.percentMoveCompleted,e}},et=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.loc=e.loc,this.group=e.group,this.num=e.num)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.loc=this.loc,e.group=this.group,e.num=this.num,e}},tt=function(e){return e.LoadUnload=`LoadUnload`,e.Machine=`Machine`,e.MachineQueue=`MachineQueue`,e.Buffer=`Buffer`,e.Cart=`Cart`,e}({}),nt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.signaledInspections=[],this.location=new rt,this.action=new at)}init(e){if(e){if(this.materialID=e.MaterialID,this.jobUnique=e.JobUnique,this.partName=e.PartName,this.process=e.Process,this.path=e.Path,this.serial=e.Serial,this.workorderId=e.WorkorderId,Array.isArray(e.SignaledInspections)){this.signaledInspections=[];for(let t of e.SignaledInspections)this.signaledInspections.push(t)}this.quarantineAfterUnload=e.QuarantineAfterUnload,this.problem=e.Problem,this.lastCompletedMachiningRouteStopIndex=e.LastCompletedMachiningRouteStopIndex,this.location=e.Location?rt.fromJS(e.Location):new rt,this.action=e.Action?at.fromJS(e.Action):new at}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.JobUnique=this.jobUnique,e.PartName=this.partName,e.Process=this.process,e.Path=this.path,e.Serial=this.serial,e.WorkorderId=this.workorderId,Array.isArray(this.signaledInspections)){e.SignaledInspections=[];for(let t of this.signaledInspections)e.SignaledInspections.push(t)}return e.QuarantineAfterUnload=this.quarantineAfterUnload,e.Problem=this.problem,e.LastCompletedMachiningRouteStopIndex=this.lastCompletedMachiningRouteStopIndex,e.Location=this.location?this.location.toJSON():void 0,e.Action=this.action?this.action.toJSON():void 0,e}},rt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.type=e.Type,this.palletNum=e.PalletNum,this.face=e.Face,this.currentQueue=e.CurrentQueue,this.queuePosition=e.QueuePosition,this.basketId=e.BasketId,this.basketSlot=e.BasketSlot)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Type=this.type,e.PalletNum=this.palletNum,e.Face=this.face,e.CurrentQueue=this.currentQueue,e.QueuePosition=this.queuePosition,e.BasketId=this.basketId,e.BasketSlot=this.basketSlot,e}},it=function(e){return e.Free=`Free`,e.OnPallet=`OnPallet`,e.InQueue=`InQueue`,e.InBasket=`InBasket`,e}({}),at=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.type=e.Type,this.workId=e.WorkId,this.loadCancellationId=e.LoadCancellationId,this.loadOntoPalletNum=e.LoadOntoPalletNum,this.loadOntoFace=e.LoadOntoFace,this.processAfterLoad=e.ProcessAfterLoad,this.pathAfterLoad=e.PathAfterLoad,this.loadFromBasketId=e.LoadFromBasketId,this.loadToBasketId=e.LoadToBasketId,this.loadToBasketSlot=e.LoadToBasketSlot,this.unloadIntoQueue=e.UnloadIntoQueue,this.unloadToBasketId=e.UnloadToBasketId,this.unloadToBasketSlot=e.UnloadToBasketSlot,this.elapsedLoadUnloadTime=e.ElapsedLoadUnloadTime,this.program=e.Program,this.elapsedMachiningTime=e.ElapsedMachiningTime,this.expectedRemainingMachiningTime=e.ExpectedRemainingMachiningTime)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Type=this.type,e.WorkId=this.workId,e.LoadCancellationId=this.loadCancellationId,e.LoadOntoPalletNum=this.loadOntoPalletNum,e.LoadOntoFace=this.loadOntoFace,e.ProcessAfterLoad=this.processAfterLoad,e.PathAfterLoad=this.pathAfterLoad,e.LoadFromBasketId=this.loadFromBasketId,e.LoadToBasketId=this.loadToBasketId,e.LoadToBasketSlot=this.loadToBasketSlot,e.UnloadIntoQueue=this.unloadIntoQueue,e.UnloadToBasketId=this.unloadToBasketId,e.UnloadToBasketSlot=this.unloadToBasketSlot,e.ElapsedLoadUnloadTime=this.elapsedLoadUnloadTime,e.Program=this.program,e.ElapsedMachiningTime=this.elapsedMachiningTime,e.ExpectedRemainingMachiningTime=this.expectedRemainingMachiningTime,e}},ot=function(e){return e.Waiting=`Waiting`,e.Loading=`Loading`,e.UnloadToInProcess=`UnloadToInProcess`,e.UnloadToCompletedMaterial=`UnloadToCompletedMaterial`,e.Machining=`Machining`,e.LoadingToBasket=`LoadingToBasket`,e}({}),st=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.maxSizeBeforeStopUnloading=e.MaxSizeBeforeStopUnloading,this.role=e.Role)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.MaxSizeBeforeStopUnloading=this.maxSizeBeforeStopUnloading,e.Role=this.role,e}},ct=function(e){return e.RawMaterial=`RawMaterial`,e.InProcessTransfer=`InProcessTransfer`,e.Quarantine=`Quarantine`,e.Other=`Other`,e}({}),lt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.possibleLoadStations=[])}init(e){if(e){if(this.machineGroup=e.MachineGroup,this.machineNum=e.MachineNum,this.moving=e.Moving,Array.isArray(e.PossibleLoadStations)){this.possibleLoadStations=[];for(let t of e.PossibleLoadStations)this.possibleLoadStations.push(t)}this.currentLoadStation=e.CurrentLoadStation}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MachineGroup=this.machineGroup,e.MachineNum=this.machineNum,e.Moving=this.moving,Array.isArray(this.possibleLoadStations)){e.PossibleLoadStations=[];for(let t of this.possibleLoadStations)e.PossibleLoadStations.push(t)}return e.CurrentLoadStation=this.currentLoadStation,e}},ut=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.elapsedStationTime={},this.activeStationTime={})}init(e){if(e){if(this.workorderId=e.WorkorderId,this.part=e.Part,this.plannedQuantity=e.PlannedQuantity,this.dueDate=e.DueDate?new Date(e.DueDate.toString()):void 0,this.priority=e.Priority,this.simulatedStart=e.SimulatedStart?new Date(e.SimulatedStart.toString()):void 0,this.simulatedFilled=e.SimulatedFilled?new Date(e.SimulatedFilled.toString()):void 0,this.completedQuantity=e.CompletedQuantity,Array.isArray(e.Comments)){this.comments=[];for(let t of e.Comments)this.comments.push(dt.fromJS(t))}if(e.ElapsedStationTime){this.elapsedStationTime={};for(let t in e.ElapsedStationTime)e.ElapsedStationTime.hasOwnProperty(t)&&(this.elapsedStationTime[t]=e.ElapsedStationTime[t])}if(e.ActiveStationTime){this.activeStationTime={};for(let t in e.ActiveStationTime)e.ActiveStationTime.hasOwnProperty(t)&&(this.activeStationTime[t]=e.ActiveStationTime[t])}if(Array.isArray(e.Material)){this.material=[];for(let t of e.Material)this.material.push(ft.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.WorkorderId=this.workorderId,e.Part=this.part,e.PlannedQuantity=this.plannedQuantity,e.DueDate=this.dueDate?this.dueDate.toISOString():void 0,e.Priority=this.priority,e.SimulatedStart=this.simulatedStart?zt(this.simulatedStart):void 0,e.SimulatedFilled=this.simulatedFilled?zt(this.simulatedFilled):void 0,e.CompletedQuantity=this.completedQuantity,Array.isArray(this.comments)){e.Comments=[];for(let t of this.comments)e.Comments.push(t?t.toJSON():void 0)}if(this.elapsedStationTime){e.ElapsedStationTime={};for(let t in this.elapsedStationTime)this.elapsedStationTime.hasOwnProperty(t)&&(e.ElapsedStationTime[t]=this.elapsedStationTime[t])}if(this.activeStationTime){e.ActiveStationTime={};for(let t in this.activeStationTime)this.activeStationTime.hasOwnProperty(t)&&(e.ActiveStationTime[t]=this.activeStationTime[t])}if(Array.isArray(this.material)){e.Material=[];for(let t of this.material)e.Material.push(t?t.toJSON():void 0)}return e}},dt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.comment=e.Comment,this.timeUTC=e.TimeUTC?new Date(e.TimeUTC.toString()):void 0)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Comment=this.comment,e.TimeUTC=this.timeUTC?this.timeUTC.toISOString():void 0,e}},ft=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.materialID=e.MaterialID,this.serial=e.Serial,this.quarantined=e.Quarantined,this.inspectionFailed=e.InspectionFailed,this.closeout=e.Closeout)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.Serial=this.serial,e.Quarantined=this.quarantined,e.InspectionFailed=this.inspectionFailed,e.Closeout=this.closeout,e}},pt=function(e){return e.None=`None`,e.ClosedOut=`ClosedOut`,e.CloseOutFailed=`CloseOutFailed`,e}({}),mt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e){if(this.basketId=e.BasketId,this.loadStationWork=e.LoadStationWork?ht.fromJS(e.LoadStationWork):void 0,this.position=e.Position?_t.fromJS(e.Position):void 0,Array.isArray(e.EmptySlots)){this.emptySlots=[];for(let t of e.EmptySlots)this.emptySlots.push(t)}if(Array.isArray(e.UnknownSlots)){this.unknownSlots=[];for(let t of e.UnknownSlots)this.unknownSlots.push(t)}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.BasketId=this.basketId,e.LoadStationWork=this.loadStationWork?this.loadStationWork.toJSON():void 0,e.Position=this.position?this.position.toJSON():void 0,Array.isArray(this.emptySlots)){e.EmptySlots=[];for(let t of this.emptySlots)e.EmptySlots.push(t)}if(Array.isArray(this.unknownSlots)){e.UnknownSlots=[];for(let t of this.unknownSlots)e.UnknownSlots.push(t)}return e}},ht=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e&&(this.workId=e.WorkId,this.type=e.Type,this.readyToConfirm=e.ReadyToConfirm,this.confirmationBlockedReason=e.ConfirmationBlockedReason,Array.isArray(e.AwaitingMaterialSlots))){this.awaitingMaterialSlots=[];for(let t of e.AwaitingMaterialSlots)this.awaitingMaterialSlots.push(t)}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.WorkId=this.workId,e.Type=this.type,e.ReadyToConfirm=this.readyToConfirm,e.ConfirmationBlockedReason=this.confirmationBlockedReason,Array.isArray(this.awaitingMaterialSlots)){e.AwaitingMaterialSlots=[];for(let t of this.awaitingMaterialSlots)e.AwaitingMaterialSlots.push(t)}return e}},gt=function(e){return e.Material=`Material`,e.ConfirmEmptyBasket=`ConfirmEmptyBasket`,e}({}),_t=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.location=e.Location,this.locationNum=e.LocationNum,this.locationTitle=e.LocationTitle,this.zone=e.Zone)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Location=this.location,e.LocationNum=this.locationNum,e.LocationTitle=this.locationTitle,e.Zone=this.zone,e}},vt=function(e){return e.LoadUnload=`LoadUnload`,e.LoadStationStaging=`LoadStationStaging`,e.Storage=`Storage`,e.InTransit=`InTransit`,e}({}),yt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.destination=new _t)}init(e){e&&(this.instructionId=e.InstructionId,this.basketId=e.BasketId,this.source=e.Source?_t.fromJS(e.Source):void 0,this.destination=e.Destination?_t.fromJS(e.Destination):new _t,this.reason=e.Reason,this.displayText=e.DisplayText,this.prerequisiteInstructionId=e.PrerequisiteInstructionId)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.InstructionId=this.instructionId,e.BasketId=this.basketId,e.Source=this.source?this.source.toJSON():void 0,e.Destination=this.destination?this.destination.toJSON():void 0,e.Reason=this.reason,e.DisplayText=this.displayText,e.PrerequisiteInstructionId=this.prerequisiteInstructionId,e}},bt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);this.type=e.type,this.title=e.title,this.status=e.status,this.detail=e.detail,this.instance=e.instance}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){for(var t in e=typeof e==`object`?e:{},this)this.hasOwnProperty(t)&&(e[t]=this[t]);return e.type=this.type,e.title=this.title,e.status=this.status,e.detail=this.detail,e.instance=this.instance,e}},xt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.existingMaterial=e.ExistingMaterial?St.fromJS(e.ExistingMaterial):void 0,this.potentialNewMaterial=e.PotentialNewMaterial?Ct.fromJS(e.PotentialNewMaterial):void 0)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.ExistingMaterial=this.existingMaterial?this.existingMaterial.toJSON():void 0,e.PotentialNewMaterial=this.potentialNewMaterial?this.potentialNewMaterial.toJSON():void 0,e}},St=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e&&(this.materialID=e.MaterialID,this.jobUnique=e.JobUnique,this.partName=e.PartName,this.numProcesses=e.NumProcesses,this.workorder=e.Workorder,this.serial=e.Serial,e.Paths)){this.paths={};for(let t in e.Paths)e.Paths.hasOwnProperty(t)&&(this.paths[t]=e.Paths[t])}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.JobUnique=this.jobUnique,e.PartName=this.partName,e.NumProcesses=this.numProcesses,e.Workorder=this.workorder,e.Serial=this.serial,this.paths){e.Paths={};for(let t in this.paths)this.paths.hasOwnProperty(t)&&(e.Paths[t]=this.paths[t])}return e}},Ct=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e){if(e.PossibleCastingsByQueue){this.possibleCastingsByQueue={};for(let t in e.PossibleCastingsByQueue)e.PossibleCastingsByQueue.hasOwnProperty(t)&&(this.possibleCastingsByQueue[t]=e.PossibleCastingsByQueue[t]===void 0?[]:e.PossibleCastingsByQueue[t])}if(e.PossibleJobsByQueue){this.possibleJobsByQueue={};for(let t in e.PossibleJobsByQueue)e.PossibleJobsByQueue.hasOwnProperty(t)&&(this.possibleJobsByQueue[t]=e.PossibleJobsByQueue[t]?e.PossibleJobsByQueue[t].map(e=>wt.fromJS(e)):[])}this.workorder=e.Workorder,this.serial=e.Serial}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},this.possibleCastingsByQueue){e.PossibleCastingsByQueue={};for(let t in this.possibleCastingsByQueue)this.possibleCastingsByQueue.hasOwnProperty(t)&&(e.PossibleCastingsByQueue[t]=this.possibleCastingsByQueue[t])}if(this.possibleJobsByQueue){e.PossibleJobsByQueue={};for(let t in this.possibleJobsByQueue)this.possibleJobsByQueue.hasOwnProperty(t)&&(e.PossibleJobsByQueue[t]=this.possibleJobsByQueue[t])}return e.Workorder=this.workorder,e.Serial=this.serial,e}},wt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.jobUnique=e.JobUnique,this.lastCompletedProcess=e.LastCompletedProcess,this.workorder=e.Workorder)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.JobUnique=this.jobUnique,e.LastCompletedProcess=this.lastCompletedProcess,e.Workorder=this.workorder,e}},Tt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.jobs={},this.stationUse=[])}init(e){if(e){if(e.Jobs){this.jobs={};for(let t in e.Jobs)e.Jobs.hasOwnProperty(t)&&(this.jobs[t]=e.Jobs[t]?Xe.fromJS(e.Jobs[t]):new Xe)}if(Array.isArray(e.StationUse)){this.stationUse=[];for(let t of e.StationUse)this.stationUse.push(He.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},this.jobs){e.Jobs={};for(let t in this.jobs)this.jobs.hasOwnProperty(t)&&(e.Jobs[t]=this.jobs[t]?this.jobs[t].toJSON():void 0)}if(Array.isArray(this.stationUse)){e.StationUse=[];for(let t of this.stationUse)e.StationUse.push(t?t.toJSON():void 0)}return e}},Et=class e extends Tt{constructor(e){super(e)}init(e){if(super.init(e),e&&(this.mostRecentSimulationId=e.MostRecentSimulationId,Array.isArray(e.MostRecentSimDayUsage))){this.mostRecentSimDayUsage=[];for(let t of e.MostRecentSimDayUsage)this.mostRecentSimDayUsage.push(We.fromJS(t))}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MostRecentSimulationId=this.mostRecentSimulationId,Array.isArray(this.mostRecentSimDayUsage)){e.MostRecentSimDayUsage=[];for(let t of this.mostRecentSimDayUsage)e.MostRecentSimDayUsage.push(t?t.toJSON():void 0)}return super.toJSON(e),e}},Dt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.jobs=[],this.extraParts={})}init(e){if(e){if(this.latestScheduleId=e.LatestScheduleId,Array.isArray(e.Jobs)){this.jobs=[];for(let t of e.Jobs)this.jobs.push(Xe.fromJS(t))}if(e.ExtraParts){this.extraParts={};for(let t in e.ExtraParts)e.ExtraParts.hasOwnProperty(t)&&(this.extraParts[t]=e.ExtraParts[t])}if(Array.isArray(e.RecentArtifactRuns)){this.recentArtifactRuns=[];for(let t of e.RecentArtifactRuns)this.recentArtifactRuns.push(Ot.fromJS(t))}if(Array.isArray(e.UnscheduledRebookings)){this.unscheduledRebookings=[];for(let t of e.UnscheduledRebookings)this.unscheduledRebookings.push(kt.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.LatestScheduleId=this.latestScheduleId,Array.isArray(this.jobs)){e.Jobs=[];for(let t of this.jobs)e.Jobs.push(t?t.toJSON():void 0)}if(this.extraParts){e.ExtraParts={};for(let t in this.extraParts)this.extraParts.hasOwnProperty(t)&&(e.ExtraParts[t]=this.extraParts[t])}if(Array.isArray(this.recentArtifactRuns)){e.RecentArtifactRuns=[];for(let t of this.recentArtifactRuns)e.RecentArtifactRuns.push(t?t.toJSON():void 0)}if(Array.isArray(this.unscheduledRebookings)){e.UnscheduledRebookings=[];for(let t of this.unscheduledRebookings)e.UnscheduledRebookings.push(t?t.toJSON():void 0)}return e}},Ot=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.jobUnique=e.JobUnique,this.partName=e.PartName,this.artifactRunDate=e.ArtifactRunDate?new Date(e.ArtifactRunDate.toString()):void 0)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.JobUnique=this.jobUnique,e.PartName=this.partName,e.ArtifactRunDate=this.artifactRunDate?zt(this.artifactRunDate):void 0,e}},kt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.bookingId=e.BookingId,this.partName=e.PartName,this.quantity=e.Quantity,this.timeUTC=e.TimeUTC?new Date(e.TimeUTC.toString()):void 0,this.priority=e.Priority,this.notes=e.Notes,this.workorder=e.Workorder)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.BookingId=this.bookingId,e.PartName=this.partName,e.Quantity=this.quantity,e.TimeUTC=this.timeUTC?this.timeUTC.toISOString():void 0,e.Priority=this.priority,e.Notes=this.notes,e.Workorder=this.workorder,e}},At=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.queue=e.Queue,this.position=e.Position)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Queue=this.queue,e.Position=this.position,e}},jt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.expectedLoadCancellationId=e.ExpectedLoadCancellationId,this.reason=e.Reason)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.ExpectedLoadCancellationId=this.expectedLoadCancellationId,e.Reason=this.reason,e}},Mt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.decrementId=e.DecrementId,this.jobUnique=e.JobUnique,this.timeUTC=e.TimeUTC?new Date(e.TimeUTC.toString()):void 0,this.part=e.Part,this.quantity=e.Quantity)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.DecrementId=this.decrementId,e.JobUnique=this.jobUnique,e.TimeUTC=this.timeUTC?this.timeUTC.toISOString():void 0,e.Part=this.part,e.Quantity=this.quantity,e}},Nt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e){if(this.materialID=e.MaterialID,this.process=e.Process,this.inspectionLocationNum=e.InspectionLocationNum,this.inspectionType=e.InspectionType,this.success=e.Success,e.ExtraData){this.extraData={};for(let t in e.ExtraData)e.ExtraData.hasOwnProperty(t)&&(this.extraData[t]=e.ExtraData[t])}this.elapsed=e.Elapsed,this.active=e.Active}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.Process=this.process,e.InspectionLocationNum=this.inspectionLocationNum,e.InspectionType=this.inspectionType,e.Success=this.success,this.extraData){e.ExtraData={};for(let t in this.extraData)this.extraData.hasOwnProperty(t)&&(e.ExtraData[t]=this.extraData[t])}return e.Elapsed=this.elapsed,e.Active=this.active,e}},Pt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e){if(this.materialID=e.MaterialID,this.process=e.Process,this.locationNum=e.LocationNum,this.closeoutType=e.CloseoutType,e.ExtraData){this.extraData={};for(let t in e.ExtraData)e.ExtraData.hasOwnProperty(t)&&(this.extraData[t]=e.ExtraData[t])}this.elapsed=e.Elapsed,this.active=e.Active,this.failed=e.Failed}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.Process=this.process,e.LocationNum=this.locationNum,e.CloseoutType=this.closeoutType,this.extraData){e.ExtraData={};for(let t in this.extraData)this.extraData.hasOwnProperty(t)&&(e.ExtraData[t]=this.extraData[t])}return e.Elapsed=this.elapsed,e.Active=this.active,e.Failed=this.failed,e}},Ft=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.pocket=e.Pocket,this.toolName=e.ToolName,this.serial=e.Serial,this.currentUse=e.CurrentUse,this.totalLifeTime=e.TotalLifeTime,this.currentUseCount=e.CurrentUseCount,this.totalLifeCount=e.TotalLifeCount)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Pocket=this.pocket,e.ToolName=this.toolName,e.Serial=this.serial,e.CurrentUse=this.currentUse,e.TotalLifeTime=this.totalLifeTime,e.CurrentUseCount=this.currentUseCount,e.TotalLifeCount=this.totalLifeCount,e}},It=class e extends Ft{constructor(e){super(e)}init(e){super.init(e),e&&(this.machineGroupName=e.MachineGroupName,this.machineNum=e.MachineNum)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.MachineGroupName=this.machineGroupName,e.MachineNum=this.machineNum,super.toJSON(e),e}},Lt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.cellControllerProgramName=e.CellControllerProgramName,this.programName=e.ProgramName,this.revision=e.Revision,this.comment=e.Comment)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.CellControllerProgramName=this.cellControllerProgramName,e.ProgramName=this.programName,e.Revision=this.revision,e.Comment=this.comment,e}},Rt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.programName=e.ProgramName,this.revision=e.Revision,this.comment=e.Comment,this.cellControllerProgramName=e.CellControllerProgramName)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.ProgramName=this.programName,e.Revision=this.revision,e.Comment=this.comment,e.CellControllerProgramName=this.cellControllerProgramName,e}};function zt(e){return e.getUTCFullYear()+`-`+(e.getUTCMonth()<9?`0`+(e.getUTCMonth()+1):e.getUTCMonth()+1)+`-`+(e.getUTCDate()<10?`0`+e.getUTCDate():e.getUTCDate())}var Bt=class extends Error{constructor(e,t,n,r,i){super(),this.isApiException=!0,this.message=e,this.status=t,this.response=n,this.headers=r,this.result=i}static isApiException(e){return e.isApiException===!0}};function Vt(e,t,n,r,i){throw i??new Bt(e,t,n,r,null)}var Ht,Ut,Wt,Gt,Kt=[],qt=[],Jt;function Yt(){Wt=new we,Gt=new Te,Ut=new Ce,Ht=new Se}function Xt(e){Kt=e,qt=e.map(e=>new we(e))}function Zt(e){Jt=e.access_token;let t={fetch:Qt};Ht=new Se(void 0,t),Ut=new Ce(void 0,t),Wt=new we(void 0,t),qt=Kt.map(e=>new we(e,t))}function Qt(e,t){let n=new Headers(e instanceof Request?e.headers:void 0);return new Headers(t?.headers).forEach((e,t)=>n.set(t,e)),Jt&&n.set(`Authorization`,`Bearer `+Jt),window.fetch(e,t?{...t,headers:n}:{headers:n})}function $t(e,t,n,r,i,a){return`/api/v1/fms/find-instructions/`+encodeURIComponent(e)+`?type=`+encodeURIComponent(t)+(`&materialID=`+n.toString())+(i==null?``:`&process=`+i.toString())+(a===null?``:`&operatorName=`+encodeURIComponent(a))+(r?`&pallet=`+encodeURIComponent(r):``)}var en=class extends Error{};en.prototype.name=`InvalidTokenError`;function tn(e){return decodeURIComponent(atob(e).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n=`0`+n),`%`+n}))}function nn(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);switch(t.length%4){case 0:break;case 2:t+=`==`;break;case 3:t+=`=`;break;default:throw Error(`base64 string is not of the correct length`)}try{return tn(t)}catch{return atob(t)}}function rn(e,t){if(typeof e!=`string`)throw new en(`Invalid token specified: must be a string`);t||={};let n=t.header===!0?0:1,r=e.split(`.`)[n];if(typeof r!=`string`)throw new en(`Invalid token specified: missing part #${n+1}`);let i;try{i=nn(r)}catch(e){throw new en(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(i)}catch(e){throw new en(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}var an={debug:()=>void 0,info:()=>void 0,warn:()=>void 0,error:()=>void 0},on,sn,cn=(e=>(e[e.NONE=0]=`NONE`,e[e.ERROR=1]=`ERROR`,e[e.WARN=2]=`WARN`,e[e.INFO=3]=`INFO`,e[e.DEBUG=4]=`DEBUG`,e))(cn||{});(e=>{function t(){on=3,sn=an}e.reset=t;function n(e){if(!(0<=e&&e<=4))throw Error(`Invalid log level`);on=e}e.setLevel=n;function r(e){sn=e}e.setLogger=r})(cn||={});var ln=class e{constructor(e){this._name=e}debug(...t){on>=4&&sn.debug(e._format(this._name,this._method),...t)}info(...t){on>=3&&sn.info(e._format(this._name,this._method),...t)}warn(...t){on>=2&&sn.warn(e._format(this._name,this._method),...t)}error(...t){on>=1&&sn.error(e._format(this._name,this._method),...t)}throw(e){throw this.error(e),e}create(e){let t=Object.create(this);return t._method=e,t.debug(`begin`),t}static createStatic(t,n){let r=new e(`${t}.${n}`);return r.debug(`begin`),r}static _format(e,t){let n=`[${e}]`;return t?`${n} ${t}:`:n}static debug(t,...n){on>=4&&sn.debug(e._format(t),...n)}static info(t,...n){on>=3&&sn.info(e._format(t),...n)}static warn(t,...n){on>=2&&sn.warn(e._format(t),...n)}static error(t,...n){on>=1&&sn.error(e._format(t),...n)}};cn.reset();var un=class{static decode(e){try{return rn(e)}catch(e){throw ln.error(`JwtUtils.decode`,e),e}}static async generateSignedJwt(e,t,n){let r=`${mn.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e)))}.${mn.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t)))}`,i=await window.crypto.subtle.sign({name:`ECDSA`,hash:{name:`SHA-256`}},n,new TextEncoder().encode(r));return`${r}.${mn.encodeBase64Url(new Uint8Array(i))}`}static async generateSignedJwtWithHmac(e,t,n){let r=`${mn.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e)))}.${mn.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t)))}`,i=await window.crypto.subtle.sign(`HMAC`,n,new TextEncoder().encode(r));return`${r}.${mn.encodeBase64Url(new Uint8Array(i))}`}},dn=`10000000-1000-4000-8000-100000000000`,fn=e=>btoa([...new Uint8Array(e)].map(e=>String.fromCharCode(e)).join(``)),pn=class e{static _randomWord(){let e=new Uint32Array(1);return crypto.getRandomValues(e),e[0]}static generateUUIDv4(){return dn.replace(/[018]/g,t=>(+t^e._randomWord()&15>>t/4).toString(16)).replace(/-/g,``)}static generateCodeVerifier(){return e.generateUUIDv4()+e.generateUUIDv4()+e.generateUUIDv4()}static async generateCodeChallenge(e){if(!crypto.subtle)throw Error(`Crypto.subtle is available only in secure contexts (HTTPS).`);try{let t=new TextEncoder().encode(e);return fn(await crypto.subtle.digest(`SHA-256`,t)).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}catch(e){throw ln.error(`CryptoUtils.generateCodeChallenge`,e),e}}static generateBasicAuth(e,t){return fn(new TextEncoder().encode([e,t].join(`:`)))}static async hash(e,t){let n=new TextEncoder().encode(t),r=await crypto.subtle.digest(e,n);return new Uint8Array(r)}static async customCalculateJwkThumbprint(t){let n;switch(t.kty){case`RSA`:n={e:t.e,kty:t.kty,n:t.n};break;case`EC`:n={crv:t.crv,kty:t.kty,x:t.x,y:t.y};break;case`OKP`:n={crv:t.crv,kty:t.kty,x:t.x};break;case`oct`:n={crv:t.k,kty:t.kty};break;default:throw Error(`Unknown jwk type`)}let r=await e.hash(`SHA-256`,JSON.stringify(n));return e.encodeBase64Url(r)}static async generateDPoPProof({url:t,accessToken:n,httpMethod:r,keyPair:i,nonce:a}){let o,s,c={jti:window.crypto.randomUUID(),htm:r??`GET`,htu:t,iat:Math.floor(Date.now()/1e3)};n&&(o=await e.hash(`SHA-256`,n),s=e.encodeBase64Url(o),c.ath=s),a&&(c.nonce=a);try{let e=await crypto.subtle.exportKey(`jwk`,i.publicKey),t={alg:`ES256`,typ:`dpop+jwt`,jwk:{crv:e.crv,kty:e.kty,x:e.x,y:e.y}};return await un.generateSignedJwt(t,c,i.privateKey)}catch(e){throw e instanceof TypeError?Error(`Error exporting dpop public key: ${e.message}`):e}}static async generateDPoPJkt(t){try{let n=await crypto.subtle.exportKey(`jwk`,t.publicKey);return await e.customCalculateJwkThumbprint(n)}catch(e){throw e instanceof TypeError?Error(`Could not retrieve dpop keys from storage: ${e.message}`):e}}static async generateDPoPKeys(){return await window.crypto.subtle.generateKey({name:`ECDSA`,namedCurve:`P-256`},!1,[`sign`,`verify`])}static async generateClientAssertionJwt(t,n,r,i=`HS256`){let a=Math.floor(Date.now()/1e3),o={alg:i,typ:`JWT`},s={iss:t,sub:t,aud:r,jti:e.generateUUIDv4(),exp:a+300,iat:a},c={HS256:`SHA-256`,HS384:`SHA-384`,HS512:`SHA-512`}[i];if(!c)throw Error(`Unsupported algorithm: ${i}. Supported algorithms are: HS256, HS384, HS512`);let l=new TextEncoder,u=await crypto.subtle.importKey(`raw`,l.encode(n),{name:`HMAC`,hash:c},!1,[`sign`]);return await un.generateSignedJwtWithHmac(o,s,u)}};pn.encodeBase64Url=e=>fn(e).replace(/=/g,``).replace(/\+/g,`-`).replace(/\//g,`_`);var mn=pn,hn=class{constructor(e){this._name=e,this._callbacks=[],this._logger=new ln(`Event('${this._name}')`)}addHandler(e){return this._callbacks.push(e),()=>this.removeHandler(e)}removeHandler(e){let t=this._callbacks.lastIndexOf(e);t>=0&&this._callbacks.splice(t,1)}async raise(...e){this._logger.debug(`raise:`,...e);for(let t of this._callbacks)await t(...e)}},gn=class{static center({...e}){return e.width??=[800,720,600,480].find(e=>e<=window.outerWidth/1.618)??360,e.left??=Math.max(0,Math.round(window.screenX+(window.outerWidth-e.width)/2)),e.height!=null&&(e.top??=Math.max(0,Math.round(window.screenY+(window.outerHeight-e.height)/2))),e}static serialize(e){return Object.entries(e).filter(([,e])=>e!=null).map(([e,t])=>`${e}=${typeof t==`boolean`?t?`yes`:`no`:t}`).join(`,`)}},_n=class e extends hn{constructor(){super(...arguments),this._logger=new ln(`Timer('${this._name}')`),this._timerHandle=null,this._expiration=0,this._callback=()=>{let t=this._expiration-e.getEpochTime();this._logger.debug(`timer completes in`,t),this._expiration<=e.getEpochTime()&&(this.cancel(),super.raise())}}static getEpochTime(){return Math.floor(Date.now()/1e3)}init(t){let n=this._logger.create(`init`);t=Math.max(Math.floor(t),1);let r=e.getEpochTime()+t;if(this.expiration===r&&this._timerHandle){n.debug(`skipping since already initialized for expiration at`,this.expiration);return}this.cancel(),n.debug(`using duration`,t),this._expiration=r;let i=Math.min(t,5);this._timerHandle=setInterval(this._callback,i*1e3)}get expiration(){return this._expiration}cancel(){this._logger.create(`cancel`),this._timerHandle&&=(clearInterval(this._timerHandle),null)}},vn=class{static readParams(e,t=`query`){if(!e)throw TypeError(`Invalid URL`);let n=new URL(e,`http://127.0.0.1`)[t===`fragment`?`hash`:`search`];return new URLSearchParams(n.slice(1))}},yn=`;`,bn=class extends Error{constructor(e,t){if(super(e.error_description||e.error||``),this.form=t,this.name=`ErrorResponse`,!e.error)throw ln.error(`ErrorResponse`,`No error passed`),Error(`No error passed`);this.error=e.error,this.error_description=e.error_description??null,this.error_uri=e.error_uri??null,this.state=e.userState,this.session_state=e.session_state??null,this.url_state=e.url_state}},xn=class extends Error{constructor(e){super(e),this.name=`ErrorTimeout`}},Sn=class{constructor(e){this._logger=new ln(`AccessTokenEvents`),this._expiringTimer=new _n(`Access token expiring`),this._expiredTimer=new _n(`Access token expired`),this._expiringNotificationTimeInSeconds=e.expiringNotificationTimeInSeconds}async load(e){let t=this._logger.create(`load`);if(e.access_token&&e.expires_in!==void 0){let n=e.expires_in;if(t.debug(`access token present, remaining duration:`,n),n>0){let e=n-this._expiringNotificationTimeInSeconds;e<=0&&(e=1),t.debug(`registering expiring timer, raising in`,e,`seconds`),this._expiringTimer.init(e)}else t.debug(`canceling existing expiring timer because we're past expiration.`),this._expiringTimer.cancel();let r=n+1;t.debug(`registering expired timer, raising in`,r,`seconds`),this._expiredTimer.init(r)}else this._expiringTimer.cancel(),this._expiredTimer.cancel()}async unload(){this._logger.debug(`unload: canceling existing access token timers`),this._expiringTimer.cancel(),this._expiredTimer.cancel()}addAccessTokenExpiring(e){return this._expiringTimer.addHandler(e)}removeAccessTokenExpiring(e){this._expiringTimer.removeHandler(e)}addAccessTokenExpired(e){return this._expiredTimer.addHandler(e)}removeAccessTokenExpired(e){this._expiredTimer.removeHandler(e)}},Cn=class{constructor(e,t,n,r,i){this._callback=e,this._client_id=t,this._intervalInSeconds=r,this._stopOnError=i,this._logger=new ln(`CheckSessionIFrame`),this._timer=null,this._session_state=null,this._message=e=>{e.origin===this._frame_origin&&e.source===this._frame.contentWindow&&(e.data===`error`?(this._logger.error(`error message from check session op iframe`),this._stopOnError&&this.stop()):e.data===`changed`?(this._logger.debug(`changed message from check session op iframe`),this.stop(),this._callback()):this._logger.debug(e.data+` message from check session op iframe`))};let a=new URL(n);this._frame_origin=a.origin,this._frame=window.document.createElement(`iframe`),this._frame.style.visibility=`hidden`,this._frame.style.position=`fixed`,this._frame.style.left=`-1000px`,this._frame.style.top=`0`,this._frame.width=`0`,this._frame.height=`0`,this._frame.src=a.href}load(){return new Promise(e=>{this._frame.onload=()=>{e()},window.document.body.appendChild(this._frame),window.addEventListener(`message`,this._message,!1)})}start(e){if(this._session_state===e)return;this._logger.create(`start`),this.stop(),this._session_state=e;let t=()=>{this._frame.contentWindow&&this._session_state&&this._frame.contentWindow.postMessage(this._client_id+` `+this._session_state,this._frame_origin)};t(),this._timer=setInterval(t,this._intervalInSeconds*1e3)}stop(){this._logger.create(`stop`),this._session_state=null,this._timer&&=(clearInterval(this._timer),null)}},wn=class{constructor(){this._logger=new ln(`InMemoryWebStorage`),this._data={}}clear(){this._logger.create(`clear`),this._data={}}getItem(e){return this._logger.create(`getItem('${e}')`),this._data[e]}setItem(e,t){this._logger.create(`setItem('${e}')`),this._data[e]=t}removeItem(e){this._logger.create(`removeItem('${e}')`),delete this._data[e]}get length(){return Object.getOwnPropertyNames(this._data).length}key(e){return Object.getOwnPropertyNames(this._data)[e]}},Tn=class extends Error{constructor(e,t){super(t),this.name=`ErrorDPoPNonce`,this.nonce=e}},En=class{constructor(e=[],t=null,n={}){this._jwtHandler=t,this._extraHeaders=n,this._logger=new ln(`JsonService`),this._contentTypes=[],this._contentTypes.push(...e,`application/json`),t&&this._contentTypes.push(`application/jwt`)}async fetchWithTimeout(e,t={}){let{timeoutInSeconds:n,...r}=t;if(!n)return await fetch(e,r);let i=new AbortController,a=setTimeout(()=>i.abort(),n*1e3);try{return await fetch(e,{...t,signal:i.signal})}catch(e){throw e instanceof DOMException&&e.name===`AbortError`?new xn(`Network timed out`):e}finally{clearTimeout(a)}}async getJson(e,{token:t,credentials:n,timeoutInSeconds:r}={}){let i=this._logger.create(`getJson`),a={Accept:this._contentTypes.join(`, `)};t&&(i.debug(`token passed, setting Authorization header`),a.Authorization=`Bearer `+t),this._appendExtraHeaders(a);let o;try{i.debug(`url:`,e),o=await this.fetchWithTimeout(e,{method:`GET`,headers:a,timeoutInSeconds:r,credentials:n})}catch(e){throw i.error(`Network Error`),e}i.debug(`HTTP response received, status`,o.status);let s=o.headers.get(`Content-Type`);if(s&&!this._contentTypes.find(e=>s.startsWith(e))&&i.throw(Error(`Invalid response Content-Type: ${s??`undefined`}, from URL: ${e}`)),o.ok&&this._jwtHandler&&s?.startsWith(`application/jwt`))return await this._jwtHandler(await o.text());let c;try{c=await o.json()}catch(e){throw i.error(`Error parsing JSON response`,e),o.ok?e:Error(`${o.statusText} (${o.status})`)}if(!o.ok)throw i.error(`Error from server:`,c),c.error?new bn(c):Error(`${o.statusText} (${o.status}): ${JSON.stringify(c)}`);return c}async postForm(e,{body:t,basicAuth:n,timeoutInSeconds:r,initCredentials:i,extraHeaders:a}){let o=this._logger.create(`postForm`),s={Accept:this._contentTypes.join(`, `),"Content-Type":`application/x-www-form-urlencoded`,...a};n!==void 0&&(s.Authorization=`Basic `+n),this._appendExtraHeaders(s);let c;try{o.debug(`url:`,e),c=await this.fetchWithTimeout(e,{method:`POST`,headers:s,body:t,timeoutInSeconds:r,credentials:i})}catch(e){throw o.error(`Network error`),e}o.debug(`HTTP response received, status`,c.status);let l=c.headers.get(`Content-Type`);if(l&&!this._contentTypes.find(e=>l.startsWith(e)))throw Error(`Invalid response Content-Type: ${l??`undefined`}, from URL: ${e}`);let u=await c.text(),d={};if(u)try{d=JSON.parse(u)}catch(e){throw o.error(`Error parsing JSON response`,e),c.ok?e:Error(`${c.statusText} (${c.status})`)}if(!c.ok)throw o.error(`Error from server:`,d),c.headers.has(`dpop-nonce`)?new Tn(c.headers.get(`dpop-nonce`),`${JSON.stringify(d)}`):d.error?new bn(d,t):Error(`${c.statusText} (${c.status}): ${JSON.stringify(d)}`);return d}_appendExtraHeaders(e){let t=this._logger.create(`appendExtraHeaders`),n=Object.keys(this._extraHeaders),r=[`accept`,`content-type`],i=[`authorization`];n.length!==0&&n.forEach(n=>{if(r.includes(n.toLocaleLowerCase())){t.warn(`Protected header could not be set`,n,r);return}if(i.includes(n.toLocaleLowerCase())&&Object.keys(e).includes(n)){t.warn(`Header could not be overridden`,n,i);return}let a=typeof this._extraHeaders[n]==`function`?this._extraHeaders[n]():this._extraHeaders[n];a&&a!==``&&(e[n]=a)})}},Dn=class{constructor(e){this._settings=e,this._logger=new ln(`MetadataService`),this._signingKeys=null,this._metadata=null,this._metadataUrl=this._settings.metadataUrl,this._jsonService=new En([`application/jwk-set+json`],null,this._settings.extraHeaders),this._settings.signingKeys&&(this._logger.debug(`using signingKeys from settings`),this._signingKeys=this._settings.signingKeys),this._settings.metadata&&(this._logger.debug(`using metadata from settings`),this._metadata=this._settings.metadata),this._settings.fetchRequestCredentials&&(this._logger.debug(`using fetchRequestCredentials from settings`),this._fetchRequestCredentials=this._settings.fetchRequestCredentials)}resetSigningKeys(){this._signingKeys=null}async getMetadata(){let e=this._logger.create(`getMetadata`);if(this._metadata)return e.debug(`using cached values`),this._metadata;if(!this._metadataUrl)throw e.throw(Error(`No authority or metadataUrl configured on settings`)),null;e.debug(`getting metadata from`,this._metadataUrl);let t=await this._jsonService.getJson(this._metadataUrl,{credentials:this._fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return e.debug(`merging remote JSON with seed metadata`),this._metadata=Object.assign({},t,this._settings.metadataSeed),this._metadata}getIssuer(){return this._getMetadataProperty(`issuer`)}getAuthorizationEndpoint(){return this._getMetadataProperty(`authorization_endpoint`)}getUserInfoEndpoint(){return this._getMetadataProperty(`userinfo_endpoint`)}getTokenEndpoint(e=!0){return this._getMetadataProperty(`token_endpoint`,e)}getCheckSessionIframe(){return this._getMetadataProperty(`check_session_iframe`,!0)}getEndSessionEndpoint(){return this._getMetadataProperty(`end_session_endpoint`,!0)}getRevocationEndpoint(e=!0){return this._getMetadataProperty(`revocation_endpoint`,e)}getKeysEndpoint(e=!0){return this._getMetadataProperty(`jwks_uri`,e)}async _getMetadataProperty(e,t=!1){let n=this._logger.create(`_getMetadataProperty('${e}')`),r=await this.getMetadata();if(n.debug(`resolved`),r[e]===void 0){if(t===!0){n.warn(`Metadata does not contain optional property`);return}n.throw(Error(`Metadata does not contain property `+e))}return r[e]}async getSigningKeys(){let e=this._logger.create(`getSigningKeys`);if(this._signingKeys)return e.debug(`returning signingKeys from cache`),this._signingKeys;let t=await this.getKeysEndpoint(!1);e.debug(`got jwks_uri`,t);let n=await this._jsonService.getJson(t,{timeoutInSeconds:this._settings.requestTimeoutInSeconds});if(e.debug(`got key set`,n),!Array.isArray(n.keys))throw e.throw(Error(`Missing keys on keyset`)),null;return this._signingKeys=n.keys,this._signingKeys}},On=class{constructor({prefix:e=`oidc.`,store:t=localStorage}={}){this._logger=new ln(`WebStorageStateStore`),this._store=t,this._prefix=e}async set(e,t){this._logger.create(`set('${e}')`),e=this._prefix+e,await this._store.setItem(e,t)}async get(e){return this._logger.create(`get('${e}')`),e=this._prefix+e,await this._store.getItem(e)}async remove(e){this._logger.create(`remove('${e}')`),e=this._prefix+e;let t=await this._store.getItem(e);return await this._store.removeItem(e),t}async getAllKeys(){this._logger.create(`getAllKeys`);let e=await this._store.length,t=[];for(let n=0;n<e;n++){let e=await this._store.key(n);e&&e.indexOf(this._prefix)===0&&t.push(e.substr(this._prefix.length))}return t}},kn=`code`,An=`openid`,jn=`client_secret_post`,Mn=900,Nn=class{constructor({authority:e,metadataUrl:t,metadata:n,signingKeys:r,metadataSeed:i,client_id:a,client_secret:o,response_type:s=kn,scope:c=An,redirect_uri:l,post_logout_redirect_uri:u,client_authentication:d=jn,token_endpoint_auth_signing_alg:f=`HS256`,prompt:p,display:m,max_age:h,ui_locales:g,acr_values:_,resource:v,response_mode:y,filterProtocolClaims:b=!0,loadUserInfo:x=!1,requestTimeoutInSeconds:S,staleStateAgeInSeconds:C=Mn,mergeClaimsStrategy:w={array:`replace`},disablePKCE:T=!1,stateStore:E,revokeTokenAdditionalContentTypes:D,fetchRequestCredentials:O,refreshTokenAllowedScope:ee,extraQueryParams:te={},extraTokenParams:k={},extraHeaders:A={},dpop:j,omitScopeWhenRequesting:M=!1}){if(this.authority=e,t?this.metadataUrl=t:(this.metadataUrl=e,e&&(this.metadataUrl.endsWith(`/`)||(this.metadataUrl+=`/`),this.metadataUrl+=`.well-known/openid-configuration`)),this.metadata=n,this.metadataSeed=i,this.signingKeys=r,this.client_id=a,this.client_secret=o,this.response_type=s,this.scope=c,this.redirect_uri=l,this.post_logout_redirect_uri=u,this.client_authentication=d,this.token_endpoint_auth_signing_alg=f,this.prompt=p,this.display=m,this.max_age=h,this.ui_locales=g,this.acr_values=_,this.resource=v,this.response_mode=y,this.filterProtocolClaims=b??!0,this.loadUserInfo=!!x,this.staleStateAgeInSeconds=C,this.mergeClaimsStrategy=w,this.omitScopeWhenRequesting=M,this.disablePKCE=!!T,this.revokeTokenAdditionalContentTypes=D,this.fetchRequestCredentials=O||`same-origin`,this.requestTimeoutInSeconds=S,E)this.stateStore=E;else{let e=typeof window<`u`?window.localStorage:new wn;this.stateStore=new On({store:e})}if(this.refreshTokenAllowedScope=ee,this.extraQueryParams=te,this.extraTokenParams=k,this.extraHeaders=A,this.dpop=j,this.dpop&&!this.dpop?.store)throw Error(`A DPoPStore is required when dpop is enabled`)}},Pn=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new ln(`UserInfoService`),this._getClaimsFromJwt=async e=>{let t=this._logger.create(`_getClaimsFromJwt`);try{let n=un.decode(e);return t.debug(`JWT decoding successful`),n}catch(e){throw t.error(`Error parsing JWT response`),e}},this._jsonService=new En(void 0,this._getClaimsFromJwt,this._settings.extraHeaders)}async getClaims(e){let t=this._logger.create(`getClaims`);e||this._logger.throw(Error(`No token passed`));let n=await this._metadataService.getUserInfoEndpoint();t.debug(`got userinfo url`,n);let r=await this._jsonService.getJson(n,{token:e,credentials:this._settings.fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return t.debug(`got claims`,r),r}},Fn=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new ln(`TokenClient`),this._jsonService=new En(this._settings.revokeTokenAdditionalContentTypes,null,this._settings.extraHeaders)}async exchangeCode({grant_type:e=`authorization_code`,redirect_uri:t=this._settings.redirect_uri,client_id:n=this._settings.client_id,client_secret:r=this._settings.client_secret,extraHeaders:i,...a}){let o=this._logger.create(`exchangeCode`);n||o.throw(Error(`A client_id is required`)),t||o.throw(Error(`A redirect_uri is required`)),a.code||o.throw(Error(`A code is required`));let s=new URLSearchParams({grant_type:e,redirect_uri:t});for(let[e,t]of Object.entries(a))t!=null&&s.set(e,t);if((this._settings.client_authentication===`client_secret_basic`||this._settings.client_authentication===`client_secret_jwt`)&&r==null)throw o.throw(Error(`A client_secret is required`)),null;let c,l=await this._metadataService.getTokenEndpoint(!1);switch(this._settings.client_authentication){case`client_secret_basic`:c=mn.generateBasicAuth(n,r);break;case`client_secret_post`:s.append(`client_id`,n),r&&s.append(`client_secret`,r);break;case`client_secret_jwt`:{let e=await mn.generateClientAssertionJwt(n,r,l,this._settings.token_endpoint_auth_signing_alg);s.append(`client_id`,n),s.append(`client_assertion_type`,`urn:ietf:params:oauth:client-assertion-type:jwt-bearer`),s.append(`client_assertion`,e);break}}o.debug(`got token endpoint`);let u=await this._jsonService.postForm(l,{body:s,basicAuth:c,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:i});return o.debug(`got response`),u}async exchangeCredentials({grant_type:e=`password`,client_id:t=this._settings.client_id,client_secret:n=this._settings.client_secret,scope:r=this._settings.scope,...i}){let a=this._logger.create(`exchangeCredentials`);t||a.throw(Error(`A client_id is required`));let o=new URLSearchParams({grant_type:e});this._settings.omitScopeWhenRequesting||o.set(`scope`,r);for(let[e,t]of Object.entries(i))t!=null&&o.set(e,t);if((this._settings.client_authentication===`client_secret_basic`||this._settings.client_authentication===`client_secret_jwt`)&&n==null)throw a.throw(Error(`A client_secret is required`)),null;let s,c=await this._metadataService.getTokenEndpoint(!1);switch(this._settings.client_authentication){case`client_secret_basic`:s=mn.generateBasicAuth(t,n);break;case`client_secret_post`:o.append(`client_id`,t),n&&o.append(`client_secret`,n);break;case`client_secret_jwt`:{let e=await mn.generateClientAssertionJwt(t,n,c,this._settings.token_endpoint_auth_signing_alg);o.append(`client_id`,t),o.append(`client_assertion_type`,`urn:ietf:params:oauth:client-assertion-type:jwt-bearer`),o.append(`client_assertion`,e);break}}a.debug(`got token endpoint`);let l=await this._jsonService.postForm(c,{body:o,basicAuth:s,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials});return a.debug(`got response`),l}async exchangeRefreshToken({grant_type:e=`refresh_token`,client_id:t=this._settings.client_id,client_secret:n=this._settings.client_secret,timeoutInSeconds:r,extraHeaders:i,...a}){let o=this._logger.create(`exchangeRefreshToken`);t||o.throw(Error(`A client_id is required`)),a.refresh_token||o.throw(Error(`A refresh_token is required`));let s=new URLSearchParams({grant_type:e});for(let[e,t]of Object.entries(a))Array.isArray(t)?t.forEach(t=>s.append(e,t)):t!=null&&s.set(e,t);if((this._settings.client_authentication===`client_secret_basic`||this._settings.client_authentication===`client_secret_jwt`)&&n==null)throw o.throw(Error(`A client_secret is required`)),null;let c,l=await this._metadataService.getTokenEndpoint(!1);switch(this._settings.client_authentication){case`client_secret_basic`:c=mn.generateBasicAuth(t,n);break;case`client_secret_post`:s.append(`client_id`,t),n&&s.append(`client_secret`,n);break;case`client_secret_jwt`:{let e=await mn.generateClientAssertionJwt(t,n,l,this._settings.token_endpoint_auth_signing_alg);s.append(`client_id`,t),s.append(`client_assertion_type`,`urn:ietf:params:oauth:client-assertion-type:jwt-bearer`),s.append(`client_assertion`,e);break}}o.debug(`got token endpoint`);let u=await this._jsonService.postForm(l,{body:s,basicAuth:c,timeoutInSeconds:r,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:i});return o.debug(`got response`),u}async revoke(e){let t=this._logger.create(`revoke`);e.token||t.throw(Error(`A token is required`));let n=await this._metadataService.getRevocationEndpoint(!1);t.debug(`got revocation endpoint, revoking ${e.token_type_hint??`default token type`}`);let r=new URLSearchParams;for(let[t,n]of Object.entries(e))n!=null&&r.set(t,n);r.set(`client_id`,this._settings.client_id),this._settings.client_secret&&r.set(`client_secret`,this._settings.client_secret),await this._jsonService.postForm(n,{body:r,timeoutInSeconds:this._settings.requestTimeoutInSeconds}),t.debug(`got response`)}},In=class{constructor(e,t,n){this._settings=e,this._metadataService=t,this._claimsService=n,this._logger=new ln(`ResponseValidator`),this._userInfoService=new Pn(this._settings,this._metadataService),this._tokenClient=new Fn(this._settings,this._metadataService)}async validateSigninResponse(e,t,n){let r=this._logger.create(`validateSigninResponse`);this._processSigninState(e,t),r.debug(`state processed`),await this._processCode(e,t,n),r.debug(`code processed`),e.isOpenId&&this._validateIdTokenAttributes(e,``,t.nonce),r.debug(`tokens validated`),await this._processClaims(e,t?.skipUserInfo,e.isOpenId),r.debug(`claims processed`)}async validateCredentialsResponse(e,t){let n=this._logger.create(`validateCredentialsResponse`),r=e.isOpenId&&!!e.id_token;r&&this._validateIdTokenAttributes(e),n.debug(`tokens validated`),await this._processClaims(e,t,r),n.debug(`claims processed`)}async validateRefreshResponse(e,t){let n=this._logger.create(`validateRefreshResponse`);e.userState=t.data,e.session_state??=t.session_state,e.scope??=t.scope,e.isOpenId&&e.id_token&&(this._validateIdTokenAttributes(e,t.id_token),n.debug(`ID Token validated`)),e.id_token||(e.id_token=t.id_token,e.profile=t.profile);let r=e.isOpenId&&!!e.id_token;await this._processClaims(e,!1,r),n.debug(`claims processed`)}validateSignoutResponse(e,t){let n=this._logger.create(`validateSignoutResponse`);if(t.id!==e.state&&n.throw(Error(`State does not match`)),n.debug(`state validated`),e.userState=t.data,e.error)throw n.warn(`Response was error`,e.error),new bn(e)}_processSigninState(e,t){let n=this._logger.create(`_processSigninState`);if(t.id!==e.state&&n.throw(Error(`State does not match`)),t.client_id||n.throw(Error(`No client_id on state`)),t.authority||n.throw(Error(`No authority on state`)),this._settings.authority!==t.authority&&n.throw(Error(`authority mismatch on settings vs. signin state`)),this._settings.client_id&&this._settings.client_id!==t.client_id&&n.throw(Error(`client_id mismatch on settings vs. signin state`)),n.debug(`state validated`),e.userState=t.data,e.url_state=t.url_state,e.scope??=t.scope,e.error)throw n.warn(`Response was error`,e.error),new bn(e);t.code_verifier&&!e.code&&n.throw(Error(`Expected code in response`))}async _processClaims(e,t=!1,n=!0){let r=this._logger.create(`_processClaims`);if(e.profile=this._claimsService.filterProtocolClaims(e.profile),t||!this._settings.loadUserInfo||!e.access_token){r.debug(`not loading user info`);return}r.debug(`loading user info`);let i=await this._userInfoService.getClaims(e.access_token);r.debug(`user info claims received from user info endpoint`),n&&i.sub!==e.profile.sub&&r.throw(Error(`subject from UserInfo response does not match subject in ID Token`)),e.profile=this._claimsService.mergeClaims(e.profile,this._claimsService.filterProtocolClaims(i)),r.debug(`user info claims received, updated profile:`,e.profile)}async _processCode(e,t,n){let r=this._logger.create(`_processCode`);if(e.code){r.debug(`Validating code`);let i=await this._tokenClient.exchangeCode({client_id:t.client_id,client_secret:t.client_secret,code:e.code,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier,extraHeaders:n,...t.extraTokenParams});Object.assign(e,i)}else r.debug(`No code to process`)}_validateIdTokenAttributes(e,t,n){let r=this._logger.create(`_validateIdTokenAttributes`);r.debug(`decoding ID Token JWT`);let i=un.decode(e.id_token??``);if(i.sub||r.throw(Error(`ID Token is missing a subject claim`)),n&&i.nonce!==n&&r.throw(Error(`nonce in id_token does not match nonce in client storage`)),t){let e=un.decode(t);i.sub!==e.sub&&r.throw(Error(`sub in id_token does not match current sub`)),i.auth_time&&i.auth_time!==e.auth_time&&r.throw(Error(`auth_time in id_token does not match original auth_time`)),i.azp&&i.azp!==e.azp&&r.throw(Error(`azp in id_token does not match original azp`)),!i.azp&&e.azp&&r.throw(Error(`azp not in id_token, but present in original id_token`))}e.profile=i}},Ln=class e{constructor(e){this.id=e.id||mn.generateUUIDv4(),this.data=e.data,this.created=e.created&&e.created>0?e.created:_n.getEpochTime(),this.request_type=e.request_type,this.url_state=e.url_state}toStorageString(){return new ln(`State`).create(`toStorageString`),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state})}static fromStorageString(t){return ln.createStatic(`State`,`fromStorageString`),Promise.resolve(new e(JSON.parse(t)))}static async clearStaleState(t,n){let r=ln.createStatic(`State`,`clearStaleState`),i=_n.getEpochTime()-n,a=await t.getAllKeys();r.debug(`got keys`,a);for(let n=0;n<a.length;n++){let o=a[n],s=await t.get(o),c=!1;if(s)try{let t=await e.fromStorageString(s);r.debug(`got item from key:`,o,t.created),t.created<=i&&(c=!0)}catch(e){r.error(`Error parsing state for key:`,o,e),c=!0}else r.debug(`no item in storage for key:`,o),c=!0;c&&(r.debug(`removed item for key:`,o),t.remove(o))}}},Rn=class e extends Ln{constructor(e){super(e),this.code_verifier=e.code_verifier,this.code_challenge=e.code_challenge,this.authority=e.authority,this.client_id=e.client_id,this.redirect_uri=e.redirect_uri,this.scope=e.scope,this.client_secret=e.client_secret,this.extraTokenParams=e.extraTokenParams,this.response_mode=e.response_mode,this.skipUserInfo=e.skipUserInfo,this.nonce=e.nonce}static async create(t){let n=t.code_verifier===!0?mn.generateCodeVerifier():t.code_verifier||void 0,r=n?await mn.generateCodeChallenge(n):void 0;return new e({...t,code_verifier:n,code_challenge:r})}toStorageString(){return new ln(`SigninState`).create(`toStorageString`),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state,code_verifier:this.code_verifier,authority:this.authority,client_id:this.client_id,redirect_uri:this.redirect_uri,scope:this.scope,client_secret:this.client_secret,extraTokenParams:this.extraTokenParams,response_mode:this.response_mode,skipUserInfo:this.skipUserInfo,nonce:this.nonce})}static fromStorageString(t){ln.createStatic(`SigninState`,`fromStorageString`);let n=JSON.parse(t);return e.create(n)}},zn=class e{constructor(e){this.url=e.url,this.state=e.state}static async create({url:t,authority:n,client_id:r,redirect_uri:i,response_type:a,scope:o,state_data:s,response_mode:c,request_type:l,client_secret:u,nonce:d,url_state:f,resource:p,skipUserInfo:m,extraQueryParams:h,extraTokenParams:g,disablePKCE:_,dpopJkt:v,omitScopeWhenRequesting:y,...b}){if(!t)throw this._logger.error(`create: No url passed`),Error(`url`);if(!r)throw this._logger.error(`create: No client_id passed`),Error(`client_id`);if(!i)throw this._logger.error(`create: No redirect_uri passed`),Error(`redirect_uri`);if(!a)throw this._logger.error(`create: No response_type passed`),Error(`response_type`);if(!o)throw this._logger.error(`create: No scope passed`),Error(`scope`);if(!n)throw this._logger.error(`create: No authority passed`),Error(`authority`);let x=await Rn.create({data:s,request_type:l,url_state:f,code_verifier:!_,client_id:r,authority:n,redirect_uri:i,response_mode:c,client_secret:u,scope:o,extraTokenParams:g,skipUserInfo:m,nonce:d}),S=new URL(t);S.searchParams.append(`client_id`,r),S.searchParams.append(`redirect_uri`,i),S.searchParams.append(`response_type`,a),y||S.searchParams.append(`scope`,o),d&&S.searchParams.append(`nonce`,d),v&&S.searchParams.append(`dpop_jkt`,v);let C=x.id;f&&(C=`${C}${yn}${f}`),S.searchParams.append(`state`,C),x.code_challenge&&(S.searchParams.append(`code_challenge`,x.code_challenge),S.searchParams.append(`code_challenge_method`,`S256`)),p&&(Array.isArray(p)?p:[p]).forEach(e=>S.searchParams.append(`resource`,e));for(let[e,t]of Object.entries({response_mode:c,...b,...h}))t!=null&&S.searchParams.append(e,t.toString());return new e({url:S.href,state:x})}};zn._logger=new ln(`SigninRequest`);var Bn=zn,Vn=`openid`,Hn=class{constructor(e){if(this.access_token=``,this.token_type=``,this.profile={},this.state=e.get(`state`),this.session_state=e.get(`session_state`),this.state){let e=decodeURIComponent(this.state).split(yn);this.state=e[0],e.length>1&&(this.url_state=e.slice(1).join(yn))}this.error=e.get(`error`),this.error_description=e.get(`error_description`),this.error_uri=e.get(`error_uri`),this.code=e.get(`code`)}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-_n.getEpochTime()}set expires_in(e){typeof e==`string`&&(e=Number(e)),e!==void 0&&e>=0&&(this.expires_at=Math.floor(e)+_n.getEpochTime())}get isOpenId(){return this.scope?.split(` `).includes(Vn)||!!this.id_token}},Un=class{constructor({url:e,state_data:t,id_token_hint:n,post_logout_redirect_uri:r,extraQueryParams:i,request_type:a,client_id:o,url_state:s}){if(this._logger=new ln(`SignoutRequest`),!e)throw this._logger.error(`ctor: No url passed`),Error(`url`);let c=new URL(e);if(n&&c.searchParams.append(`id_token_hint`,n),o&&c.searchParams.append(`client_id`,o),r&&(c.searchParams.append(`post_logout_redirect_uri`,r),t||s)){this.state=new Ln({data:t,request_type:a,url_state:s});let e=this.state.id;s&&(e=`${e}${yn}${s}`),c.searchParams.append(`state`,e)}for(let[e,t]of Object.entries({...i}))t!=null&&c.searchParams.append(e,t.toString());this.url=c.href}},Wn=class{constructor(e){if(this.state=e.get(`state`),this.state){let e=decodeURIComponent(this.state).split(yn);this.state=e[0],e.length>1&&(this.url_state=e.slice(1).join(yn))}this.error=e.get(`error`),this.error_description=e.get(`error_description`),this.error_uri=e.get(`error_uri`)}},Gn=[`nbf`,`jti`,`auth_time`,`nonce`,`acr`,`amr`,`azp`,`at_hash`],Kn=[`sub`,`iss`,`aud`,`exp`,`iat`],qn=class{constructor(e){this._settings=e,this._logger=new ln(`ClaimsService`)}filterProtocolClaims(e){let t={...e};if(this._settings.filterProtocolClaims){let e;e=Array.isArray(this._settings.filterProtocolClaims)?this._settings.filterProtocolClaims:Gn;for(let n of e)Kn.includes(n)||delete t[n]}return t}mergeClaims(e,t){let n={...e};for(let[e,r]of Object.entries(t))if(n[e]!==r){if(Array.isArray(n[e])||Array.isArray(r)){if(this._settings.mergeClaimsStrategy.array==`replace`)n[e]=r;else{let t=Array.isArray(n[e])?n[e]:[n[e]];for(let e of Array.isArray(r)?r:[r])t.includes(e)||t.push(e);n[e]=t}}else n[e]=typeof n[e]==`object`&&typeof r==`object`?this.mergeClaims(n[e],r):r}return n}},Jn=class{constructor(e,t){this.keys=e,this.nonce=t}},Yn=class{constructor(e,t){this._logger=new ln(`OidcClient`),this.settings=e instanceof Nn?e:new Nn(e),this.metadataService=t??new Dn(this.settings),this._claimsService=new qn(this.settings),this._validator=new In(this.settings,this.metadataService,this._claimsService),this._tokenClient=new Fn(this.settings,this.metadataService)}async createSigninRequest({state:e,request:t,request_uri:n,request_type:r,id_token_hint:i,login_hint:a,skipUserInfo:o,nonce:s,url_state:c,response_type:l=this.settings.response_type,scope:u=this.settings.scope,redirect_uri:d=this.settings.redirect_uri,prompt:f=this.settings.prompt,display:p=this.settings.display,max_age:m=this.settings.max_age,ui_locales:h=this.settings.ui_locales,acr_values:g=this.settings.acr_values,resource:_=this.settings.resource,response_mode:v=this.settings.response_mode,extraQueryParams:y=this.settings.extraQueryParams,extraTokenParams:b=this.settings.extraTokenParams,dpopJkt:x,omitScopeWhenRequesting:S=this.settings.omitScopeWhenRequesting}){let C=this._logger.create(`createSigninRequest`);if(l!==`code`)throw Error(`Only the Authorization Code flow (with PKCE) is supported`);let w=await this.metadataService.getAuthorizationEndpoint();C.debug(`Received authorization endpoint`,w);let T=await Bn.create({url:w,authority:this.settings.authority,client_id:this.settings.client_id,redirect_uri:d,response_type:l,scope:u,state_data:e,url_state:c,prompt:f,display:p,max_age:m,ui_locales:h,id_token_hint:i,login_hint:a,acr_values:g,dpopJkt:x,resource:_,request:t,request_uri:n,extraQueryParams:y,extraTokenParams:b,request_type:r,response_mode:v,client_secret:this.settings.client_secret,skipUserInfo:o,nonce:s,disablePKCE:this.settings.disablePKCE,omitScopeWhenRequesting:S});await this.clearStaleState();let E=T.state;return await this.settings.stateStore.set(E.id,E.toStorageString()),T}async readSigninResponseState(e,t=!1){let n=this._logger.create(`readSigninResponseState`),r=new Hn(vn.readParams(e,this.settings.response_mode));if(!r.state)throw n.throw(Error(`No state in response`)),null;let i=await this.settings.stateStore[t?`remove`:`get`](r.state);if(!i)throw n.throw(Error(`No matching state found in storage`)),null;return{state:await Rn.fromStorageString(i),response:r}}async processSigninResponse(e,t,n=!0){let r=this._logger.create(`processSigninResponse`),{state:i,response:a}=await this.readSigninResponseState(e,n);if(r.debug(`received state from storage; validating response`),this.settings.dpop&&this.settings.dpop.store){let e=await this.getDpopProof(this.settings.dpop.store);t={...t,DPoP:e}}try{await this._validator.validateSigninResponse(a,i,t)}catch(e){if(e instanceof Tn&&this.settings.dpop){let n=await this.getDpopProof(this.settings.dpop.store,e.nonce);t.DPoP=n,await this._validator.validateSigninResponse(a,i,t)}else throw e}return a}async getDpopProof(e,t){let n,r;return(await e.getAllKeys()).includes(this.settings.client_id)?(r=await e.get(this.settings.client_id),r.nonce!==t&&t&&(r.nonce=t,await e.set(this.settings.client_id,r))):(n=await mn.generateDPoPKeys(),r=new Jn(n,t),await e.set(this.settings.client_id,r)),await mn.generateDPoPProof({url:await this.metadataService.getTokenEndpoint(!1),httpMethod:`POST`,keyPair:r.keys,nonce:r.nonce})}async processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:n=!1,extraTokenParams:r={}}){let i=await this._tokenClient.exchangeCredentials({username:e,password:t,...r}),a=new Hn(new URLSearchParams);return Object.assign(a,i),await this._validator.validateCredentialsResponse(a,n),a}async useRefreshToken({state:e,redirect_uri:t,resource:n,timeoutInSeconds:r,extraHeaders:i,extraTokenParams:a}){let o=this._logger.create(`useRefreshToken`),s;if(this.settings.refreshTokenAllowedScope===void 0)s=e.scope;else{let t=this.settings.refreshTokenAllowedScope.split(` `);s=(e.scope?.split(` `)||[]).filter(e=>t.includes(e)).join(` `)}if(this.settings.dpop&&this.settings.dpop.store){let e=await this.getDpopProof(this.settings.dpop.store);i={...i,DPoP:e}}let c;try{c=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:s,redirect_uri:t,resource:n,timeoutInSeconds:r,extraHeaders:i,...a})}catch(o){if(o instanceof Tn&&this.settings.dpop)i.DPoP=await this.getDpopProof(this.settings.dpop.store,o.nonce),c=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:s,redirect_uri:t,resource:n,timeoutInSeconds:r,extraHeaders:i,...a});else throw o}let l=new Hn(new URLSearchParams);return Object.assign(l,c),o.debug(`validating response`,l),await this._validator.validateRefreshResponse(l,{...e,scope:s}),l}async createSignoutRequest({state:e,id_token_hint:t,client_id:n,request_type:r,url_state:i,post_logout_redirect_uri:a=this.settings.post_logout_redirect_uri,extraQueryParams:o=this.settings.extraQueryParams}={}){let s=this._logger.create(`createSignoutRequest`),c=await this.metadataService.getEndSessionEndpoint();if(!c)throw s.throw(Error(`No end session endpoint`)),null;s.debug(`Received end session endpoint`,c),!n&&a&&!t&&(n=this.settings.client_id);let l=new Un({url:c,id_token_hint:t,client_id:n,post_logout_redirect_uri:a,state_data:e,extraQueryParams:o,request_type:r,url_state:i});await this.clearStaleState();let u=l.state;return u&&(s.debug(`Signout request has state to persist`),await this.settings.stateStore.set(u.id,u.toStorageString())),l}async readSignoutResponseState(e,t=!1){let n=this._logger.create(`readSignoutResponseState`),r=new Wn(vn.readParams(e,this.settings.response_mode));if(!r.state){if(n.debug(`No state in response`),r.error)throw n.warn(`Response was error:`,r.error),new bn(r);return{state:void 0,response:r}}let i=await this.settings.stateStore[t?`remove`:`get`](r.state);if(!i)throw n.throw(Error(`No matching state found in storage`)),null;return{state:await Ln.fromStorageString(i),response:r}}async processSignoutResponse(e){let t=this._logger.create(`processSignoutResponse`),{state:n,response:r}=await this.readSignoutResponseState(e,!0);return n?(t.debug(`Received state from storage; validating response`),this._validator.validateSignoutResponse(r,n)):t.debug(`No state from storage; skipping response validation`),r}clearStaleState(){return this._logger.create(`clearStaleState`),Ln.clearStaleState(this.settings.stateStore,this.settings.staleStateAgeInSeconds)}async revokeToken(e,t){return this._logger.create(`revokeToken`),await this._tokenClient.revoke({token:e,token_type_hint:t})}},Xn=class{constructor(e){this._userManager=e,this._logger=new ln(`SessionMonitor`),this._start=async e=>{let t=e.session_state;if(!t)return;let n=this._logger.create(`_start`);if(e.profile?(this._sub=e.profile.sub,n.debug(`session_state`,t,`, sub`,this._sub)):(this._sub=void 0,n.debug(`session_state`,t,`, anonymous user`)),this._checkSessionIFrame){this._checkSessionIFrame.start(t);return}try{let e=await this._userManager.metadataService.getCheckSessionIframe();if(e){n.debug(`initializing check session iframe`);let r=this._userManager.settings.client_id,i=this._userManager.settings.checkSessionIntervalInSeconds,a=this._userManager.settings.stopCheckSessionOnError,o=new Cn(this._callback,r,e,i,a);await o.load(),this._checkSessionIFrame=o,o.start(t)}else n.warn(`no check session iframe found in the metadata`)}catch(e){n.error(`Error from getCheckSessionIframe:`,e instanceof Error?e.message:e)}},this._stop=()=>{let e=this._logger.create(`_stop`);if(this._sub=void 0,this._checkSessionIFrame&&this._checkSessionIFrame.stop(),this._userManager.settings.monitorAnonymousSession){let t=setInterval(async()=>{clearInterval(t);try{let e=await this._userManager.querySessionStatus();if(e){let t={session_state:e.session_state,profile:e.sub?{sub:e.sub}:null};this._start(t)}}catch(t){e.error(`error from querySessionStatus`,t instanceof Error?t.message:t)}},1e3)}},this._callback=async()=>{let e=this._logger.create(`_callback`);try{let t=await this._userManager.querySessionStatus(),n=!0;t&&this._checkSessionIFrame?t.sub===this._sub?(n=!1,this._checkSessionIFrame.start(t.session_state),e.debug(`same sub still logged in at OP, session state has changed, restarting check session iframe; session_state`,t.session_state),await this._userManager.events._raiseUserSessionChanged()):e.debug(`different subject signed into OP`,t.sub):e.debug(`subject no longer signed into OP`),n?this._sub?await this._userManager.events._raiseUserSignedOut():await this._userManager.events._raiseUserSignedIn():e.debug(`no change in session detected, no event to raise`)}catch(t){this._sub&&(e.debug(`Error calling queryCurrentSigninSession; raising signed out event`,t),await this._userManager.events._raiseUserSignedOut())}},e||this._logger.throw(Error(`No user manager passed`)),this._userManager.events.addUserLoaded(this._start),this._userManager.events.addUserUnloaded(this._stop),this._init().catch(e=>{this._logger.error(e)})}async _init(){this._logger.create(`_init`);let e=await this._userManager.getUser();if(e)this._start(e);else if(this._userManager.settings.monitorAnonymousSession){let e=await this._userManager.querySessionStatus();if(e){let t={session_state:e.session_state,profile:e.sub?{sub:e.sub}:null};this._start(t)}}}},Zn=class e{constructor(e){this.id_token=e.id_token,this.session_state=e.session_state??null,this.access_token=e.access_token,this.refresh_token=e.refresh_token,this.token_type=e.token_type,this.scope=e.scope,this.profile=e.profile,this.expires_at=e.expires_at,this.state=e.userState,this.url_state=e.url_state}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-_n.getEpochTime()}set expires_in(e){e!==void 0&&(this.expires_at=Math.floor(e)+_n.getEpochTime())}get expired(){let e=this.expires_in;if(e!==void 0)return e<=0}get scopes(){return this.scope?.split(` `)??[]}toStorageString(){return new ln(`User`).create(`toStorageString`),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})}static fromStorageString(t){return ln.createStatic(`User`,`fromStorageString`),new e(JSON.parse(t))}},Qn=`oidc-client`,$n=class{constructor(){this._abort=new hn(`Window navigation aborted`),this._disposeHandlers=new Set,this._window=null}async navigate(e){let t=this._logger.create(`navigate`);if(!this._window)throw Error(`Attempted to navigate on a disposed window`);t.debug(`setting URL in window`),this._window.location.replace(e.url);let{url:n,keepOpen:r}=await new Promise((n,r)=>{let i=i=>{let a=i.data,o=e.scriptOrigin??window.location.origin;if(i.origin===o&&a?.source===Qn){try{let n=vn.readParams(a.url,e.response_mode).get(`state`);if(n||t.warn(`no state found in response url`),i.source!==this._window&&n!==e.state)return}catch{this._dispose(),r(Error(`Invalid response from window`))}n(a)}};window.addEventListener(`message`,i,!1),this._disposeHandlers.add(()=>window.removeEventListener(`message`,i,!1));let a=new BroadcastChannel(`oidc-client-popup-${e.state}`);a.addEventListener(`message`,i,!1),this._disposeHandlers.add(()=>a.close()),this._disposeHandlers.add(this._abort.addHandler(e=>{this._dispose(),r(e)}))});return t.debug(`got response from window`),this._dispose(),r||this.close(),{url:n}}_dispose(){this._logger.create(`_dispose`);for(let e of this._disposeHandlers)e();this._disposeHandlers.clear()}static _notifyParent(e,t,n=!1,r=window.location.origin){let i={source:Qn,url:t,keepOpen:n},a=new ln(`_notifyParent`);if(e)a.debug(`With parent. Using parent.postMessage.`),e.postMessage(i,r);else{a.debug(`No parent. Using BroadcastChannel.`);let e=new URL(t).searchParams.get(`state`);if(!e)throw Error(`No parent and no state in URL. Can't complete notification.`);let n=new BroadcastChannel(`oidc-client-popup-${e}`);n.postMessage(i),n.close()}}},er={location:!1,toolbar:!1,height:640,closePopupWindowAfterInSeconds:-1},tr=`_blank`,nr=60,rr=2,ir=10,ar=class extends Nn{constructor(e){let{popup_redirect_uri:t=e.redirect_uri,popup_post_logout_redirect_uri:n=e.post_logout_redirect_uri,popupWindowFeatures:r=er,popupWindowTarget:i=tr,redirectMethod:a=`assign`,redirectTarget:o=`self`,iframeNotifyParentOrigin:s=e.iframeNotifyParentOrigin,iframeScriptOrigin:c=e.iframeScriptOrigin,requestTimeoutInSeconds:l,silent_redirect_uri:u=e.redirect_uri,silentRequestTimeoutInSeconds:d,automaticSilentRenew:f=!0,validateSubOnSilentRenew:p=!0,includeIdTokenInSilentRenew:m=!1,monitorSession:h=!1,monitorAnonymousSession:g=!1,checkSessionIntervalInSeconds:_=rr,query_status_response_type:v=`code`,stopCheckSessionOnError:y=!0,revokeTokenTypes:b=[`access_token`,`refresh_token`],revokeTokensOnSignout:x=!1,includeIdTokenInSilentSignout:S=!1,accessTokenExpiringNotificationTimeInSeconds:C=nr,maxSilentRenewTimeoutRetries:w,userStore:T}=e;if(super(e),this.popup_redirect_uri=t,this.popup_post_logout_redirect_uri=n,this.popupWindowFeatures=r,this.popupWindowTarget=i,this.redirectMethod=a,this.redirectTarget=o,this.iframeNotifyParentOrigin=s,this.iframeScriptOrigin=c,this.silent_redirect_uri=u,this.silentRequestTimeoutInSeconds=d||l||ir,this.automaticSilentRenew=f,this.validateSubOnSilentRenew=p,this.includeIdTokenInSilentRenew=m,this.monitorSession=h,this.monitorAnonymousSession=g,this.checkSessionIntervalInSeconds=_,this.stopCheckSessionOnError=y,this.query_status_response_type=v,this.revokeTokenTypes=b,this.revokeTokensOnSignout=x,this.includeIdTokenInSilentSignout=S,this.accessTokenExpiringNotificationTimeInSeconds=C,this.maxSilentRenewTimeoutRetries=w,T)this.userStore=T;else{let e=typeof window<`u`?window.sessionStorage:new wn;this.userStore=new On({store:e})}}},or=class e extends $n{constructor({silentRequestTimeoutInSeconds:t=ir}){super(),this._logger=new ln(`IFrameWindow`),this._timeoutInSeconds=t,this._frame=e.createHiddenIframe(),this._window=this._frame.contentWindow}static createHiddenIframe(){let e=window.document.createElement(`iframe`);return e.style.visibility=`hidden`,e.style.position=`fixed`,e.style.left=`-1000px`,e.style.top=`0`,e.width=`0`,e.height=`0`,window.document.body.appendChild(e),e}async navigate(e){this._logger.debug(`navigate: Using timeout of:`,this._timeoutInSeconds);let t=setTimeout(()=>void this._abort.raise(new xn(`IFrame timed out without a response`)),this._timeoutInSeconds*1e3);return this._disposeHandlers.add(()=>clearTimeout(t)),await super.navigate(e)}close(){var e;this._frame&&=(this._frame.parentNode&&(this._frame.addEventListener(`load`,e=>{var t;let n=e.target;(t=n.parentNode)==null||t.removeChild(n),this._abort.raise(Error(`IFrame removed from DOM`))},!0),(e=this._frame.contentWindow)==null||e.location.replace(`about:blank`)),null),this._window=null}static notifyParent(e,t){return super._notifyParent(window.parent,e,!1,t)}},sr=class{constructor(e){this._settings=e,this._logger=new ln(`IFrameNavigator`)}async prepare({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new or({silentRequestTimeoutInSeconds:e})}async callback(e){this._logger.create(`callback`),or.notifyParent(e,this._settings.iframeNotifyParentOrigin)}},cr=500,lr=1e3,ur=class extends $n{constructor({popupWindowTarget:e=tr,popupWindowFeatures:t={},popupSignal:n,popupAbortOnClose:r}){super(),this._logger=new ln(`PopupWindow`);let i=gn.center({...er,...t});this._window=window.open(void 0,e,gn.serialize(i)),this.abortOnClose=!!r,n&&n.addEventListener(`abort`,()=>{this._abort.raise(Error(n.reason??`Popup aborted`))}),t.closePopupWindowAfterInSeconds&&t.closePopupWindowAfterInSeconds>0&&setTimeout(()=>{if(!this._window||typeof this._window.closed!=`boolean`||this._window.closed){this._abort.raise(Error(`Popup blocked by user`));return}this.close()},t.closePopupWindowAfterInSeconds*lr)}async navigate(e){var t;(t=this._window)==null||t.focus();let n=setInterval(()=>{(!this._window||this._window.closed)&&(this._logger.debug(`Popup closed by user or isolated by redirect`),r(),this._disposeHandlers.delete(r),this.abortOnClose&&this._abort.raise(Error(`Popup closed by user`)))},cr),r=()=>clearInterval(n);return this._disposeHandlers.add(r),await super.navigate(e)}close(){this._window&&(this._window.closed||(this._window.close(),this._abort.raise(Error(`Popup closed`)))),this._window=null}static notifyOpener(e,t){super._notifyParent(window.opener,e,t),!t&&!window.opener&&window.close()}},dr=class{constructor(e){this._settings=e,this._logger=new ln(`PopupNavigator`)}async prepare({popupWindowFeatures:e=this._settings.popupWindowFeatures,popupWindowTarget:t=this._settings.popupWindowTarget,popupSignal:n,popupAbortOnClose:r}){return new ur({popupWindowFeatures:e,popupWindowTarget:t,popupSignal:n,popupAbortOnClose:r})}async callback(e,{keepOpen:t=!1}){this._logger.create(`callback`),ur.notifyOpener(e,t)}},fr=class{constructor(e){this._settings=e,this._logger=new ln(`RedirectNavigator`)}async prepare({redirectMethod:e=this._settings.redirectMethod,redirectTarget:t=this._settings.redirectTarget}){this._logger.create(`prepare`);let n=window.self;t===`top`&&(n=window.top??window.self);let r=n.location[e].bind(n.location),i;return{navigate:async e=>(this._logger.create(`navigate`),await new Promise((t,n)=>{i=n,window.addEventListener(`pageshow`,()=>t(window.location.href)),r(e.url)})),close:()=>{this._logger.create(`close`),i?.(Error(`Redirect aborted`)),n.stop()}}}async callback(){}},pr=class extends Sn{constructor(e){super({expiringNotificationTimeInSeconds:e.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new ln(`UserManagerEvents`),this._userLoaded=new hn(`User loaded`),this._userUnloaded=new hn(`User unloaded`),this._silentRenewError=new hn(`Silent renew error`),this._userSignedIn=new hn(`User signed in`),this._userSignedOut=new hn(`User signed out`),this._userSessionChanged=new hn(`User session changed`)}async load(e,t=!0){await super.load(e),t&&await this._userLoaded.raise(e)}async unload(){await super.unload(),await this._userUnloaded.raise()}addUserLoaded(e){return this._userLoaded.addHandler(e)}removeUserLoaded(e){return this._userLoaded.removeHandler(e)}addUserUnloaded(e){return this._userUnloaded.addHandler(e)}removeUserUnloaded(e){return this._userUnloaded.removeHandler(e)}addSilentRenewError(e){return this._silentRenewError.addHandler(e)}removeSilentRenewError(e){return this._silentRenewError.removeHandler(e)}async _raiseSilentRenewError(e){await this._silentRenewError.raise(e)}addUserSignedIn(e){return this._userSignedIn.addHandler(e)}removeUserSignedIn(e){this._userSignedIn.removeHandler(e)}async _raiseUserSignedIn(){await this._userSignedIn.raise()}addUserSignedOut(e){return this._userSignedOut.addHandler(e)}removeUserSignedOut(e){this._userSignedOut.removeHandler(e)}async _raiseUserSignedOut(){await this._userSignedOut.raise()}addUserSessionChanged(e){return this._userSessionChanged.addHandler(e)}removeUserSessionChanged(e){this._userSessionChanged.removeHandler(e)}async _raiseUserSessionChanged(){await this._userSessionChanged.raise()}},mr=class{constructor(e){this._userManager=e,this._logger=new ln(`SilentRenewService`),this._isStarted=!1,this._retryTimer=new _n(`Retry Silent Renew`),this._timeoutRetryCount=0,this._tokenExpiring=async()=>{let e=this._logger.create(`_tokenExpiring`);try{await this._userManager.signinSilent(),this._timeoutRetryCount=0,e.debug(`silent token renewal successful`)}catch(t){if(t instanceof xn){this._timeoutRetryCount++;let n=this._userManager.settings.maxSilentRenewTimeoutRetries;if(n!==void 0&&this._timeoutRetryCount>n){e.error(`Timeout retry limit reached (${this._timeoutRetryCount} > ${n}), raising silentRenewError:`,t),this._timeoutRetryCount=0,await this._userManager.events._raiseSilentRenewError(t);return}e.warn(`ErrorTimeout from signinSilent (attempt ${this._timeoutRetryCount}), retry in 5s:`,t),this._retryTimer.init(5);return}e.error(`Error from signinSilent:`,t),this._timeoutRetryCount=0,await this._userManager.events._raiseSilentRenewError(t)}}}async start(){let e=this._logger.create(`start`);if(!this._isStarted){this._isStarted=!0,this._userManager.events.addAccessTokenExpiring(this._tokenExpiring),this._retryTimer.addHandler(this._tokenExpiring);try{await this._userManager.getUser()}catch(t){e.error(`getUser error`,t)}}}stop(){this._isStarted&&=(this._retryTimer.cancel(),this._retryTimer.removeHandler(this._tokenExpiring),this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring),!1)}},hr=class{constructor(e){this.refresh_token=e.refresh_token,this.id_token=e.id_token,this.session_state=e.session_state,this.scope=e.scope,this.profile=e.profile,this.data=e.state}},gr=class{constructor(e,t,n,r){this._logger=new ln(`UserManager`),this.settings=new ar(e),this._client=new Yn(e),this._redirectNavigator=t??new fr(this.settings),this._popupNavigator=n??new dr(this.settings),this._iframeNavigator=r??new sr(this.settings),this._events=new pr(this.settings),this._silentRenewService=new mr(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new Xn(this))}get events(){return this._events}get metadataService(){return this._client.metadataService}async getUser(e=!1){let t=this._logger.create(`getUser`),n=await this._loadUser();return n?(t.info(`user loaded`),await this._events.load(n,e),n):(t.info(`user not found in storage`),null)}async removeUser(){let e=this._logger.create(`removeUser`);await this.storeUser(null),e.info(`user removed from storage`),await this._events.unload()}async signinRedirect(e={}){this._logger.create(`signinRedirect`);let{redirectMethod:t,...n}=e,r;this.settings.dpop?.bind_authorization_code&&(r=await this.generateDPoPJkt(this.settings.dpop));let i=await this._redirectNavigator.prepare({redirectMethod:t});await this._signinStart({request_type:`si:r`,dpopJkt:r,...n},i)}async signinRedirectCallback(e=window.location.href){let t=this._logger.create(`signinRedirectCallback`),n=await this._signinEnd(e);return n.profile&&n.profile.sub?t.info(`success, signed in subject`,n.profile.sub):t.info(`no subject`),n}async signinResourceOwnerCredentials({username:e,password:t,skipUserInfo:n=!1}){let r=this._logger.create(`signinResourceOwnerCredential`),i=await this._client.processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:n,extraTokenParams:this.settings.extraTokenParams});r.debug(`got signin response`);let a=await this._buildUser(i);return a.profile&&a.profile.sub?r.info(`success, signed in subject`,a.profile.sub):r.info(`no subject`),a}async signinPopup(e={}){let t=this._logger.create(`signinPopup`),n;this.settings.dpop?.bind_authorization_code&&(n=await this.generateDPoPJkt(this.settings.dpop));let{popupWindowFeatures:r,popupWindowTarget:i,popupSignal:a,popupAbortOnClose:o,...s}=e,c=this.settings.popup_redirect_uri;c||t.throw(Error(`No popup_redirect_uri configured`));let l=await this._popupNavigator.prepare({popupWindowFeatures:r,popupWindowTarget:i,popupSignal:a,popupAbortOnClose:o}),u=await this._signin({request_type:`si:p`,redirect_uri:c,display:`popup`,dpopJkt:n,...s},l);return u&&(u.profile&&u.profile.sub?t.info(`success, signed in subject`,u.profile.sub):t.info(`no subject`)),u}async signinPopupCallback(e=window.location.href,t=!1){let n=this._logger.create(`signinPopupCallback`);await this._popupNavigator.callback(e,{keepOpen:t}),n.info(`success`)}async signinSilent(e={}){let t=this._logger.create(`signinSilent`),{silentRequestTimeoutInSeconds:n,...r}=e,i=await this._loadUser();if(!e.forceIframeAuth&&i?.refresh_token){t.debug(`using refresh token`);let e=new hr(i);return await this._useRefreshToken({state:e,redirect_uri:r.redirect_uri,resource:r.resource,extraTokenParams:r.extraTokenParams,timeoutInSeconds:n})}let a;this.settings.dpop?.bind_authorization_code&&(a=await this.generateDPoPJkt(this.settings.dpop));let o=this.settings.silent_redirect_uri;o||t.throw(Error(`No silent_redirect_uri configured`));let s;i&&this.settings.validateSubOnSilentRenew&&(t.debug(`subject prior to silent renew:`,i.profile.sub),s=i.profile.sub);let c=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n});return i=await this._signin({request_type:`si:s`,redirect_uri:o,prompt:`none`,id_token_hint:this.settings.includeIdTokenInSilentRenew?i?.id_token:void 0,dpopJkt:a,...r},c,s),i&&(i.profile?.sub?t.info(`success, signed in subject`,i.profile.sub):t.info(`no subject`)),i}async _useRefreshToken(e){let t=await this._client.useRefreshToken({timeoutInSeconds:this.settings.silentRequestTimeoutInSeconds,...e}),n=new Zn({...e.state,...t});return await this.storeUser(n),await this._events.load(n),n}async signinSilentCallback(e=window.location.href){let t=this._logger.create(`signinSilentCallback`);await this._iframeNavigator.callback(e),t.info(`success`)}async signinCallback(e=window.location.href){let{state:t}=await this._client.readSigninResponseState(e);switch(t.request_type){case`si:r`:return await this.signinRedirectCallback(e);case`si:p`:await this.signinPopupCallback(e);break;case`si:s`:await this.signinSilentCallback(e);break;default:throw Error(`invalid request_type in state`)}}async signoutCallback(e=window.location.href,t=!1){let{state:n}=await this._client.readSignoutResponseState(e);if(n)switch(n.request_type){case`so:r`:return await this.signoutRedirectCallback(e);case`so:p`:await this.signoutPopupCallback(e,t);break;case`so:s`:await this.signoutSilentCallback(e);break;default:throw Error(`invalid request_type in state`)}}async querySessionStatus(e={}){let t=this._logger.create(`querySessionStatus`),{silentRequestTimeoutInSeconds:n,...r}=e,i=this.settings.silent_redirect_uri;i||t.throw(Error(`No silent_redirect_uri configured`));let a=await this._loadUser(),o=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n}),s=await this._signinStart({request_type:`si:s`,redirect_uri:i,prompt:`none`,id_token_hint:this.settings.includeIdTokenInSilentRenew?a?.id_token:void 0,response_type:this.settings.query_status_response_type,scope:`openid`,skipUserInfo:!0,...r},o);try{let e=await this._client.processSigninResponse(s.url,{});return t.debug(`got signin response`),e.session_state&&e.profile.sub?(t.info(`success for subject`,e.profile.sub),{session_state:e.session_state,sub:e.profile.sub}):(t.info(`success, user not authenticated`),null)}catch(e){if(this.settings.monitorAnonymousSession&&e instanceof bn)switch(e.error){case`login_required`:case`consent_required`:case`interaction_required`:case`account_selection_required`:return t.info(`success for anonymous user`),{session_state:e.session_state}}throw e}}async _signin(e,t,n){let r=await this._signinStart(e,t);return await this._signinEnd(r.url,n)}async _signinStart(e,t){let n=this._logger.create(`_signinStart`);try{let r=await this._client.createSigninRequest(e);return n.debug(`got signin request`),await t.navigate({url:r.url,state:r.state.id,response_mode:r.state.response_mode,scriptOrigin:this.settings.iframeScriptOrigin})}catch(e){throw n.debug(`error after preparing navigator, closing navigator window`),t.close(),e}}async _signinEnd(e,t){let n=this._logger.create(`_signinEnd`),r=await this._client.processSigninResponse(e,{});return n.debug(`got signin response`),await this._buildUser(r,t)}async _buildUser(e,t){let n=this._logger.create(`_buildUser`),r=new Zn(e);if(t){if(t!==r.profile.sub)throw n.debug(`current user does not match user returned from signin. sub from signin:`,r.profile.sub),new bn({...e,error:`login_required`});n.debug(`current user matches user returned from signin`)}return await this.storeUser(r),n.debug(`user stored`),await this._events.load(r),r}async signoutRedirect(e={}){let t=this._logger.create(`signoutRedirect`),{redirectMethod:n,...r}=e,i=await this._redirectNavigator.prepare({redirectMethod:n});await this._signoutStart({request_type:`so:r`,post_logout_redirect_uri:this.settings.post_logout_redirect_uri,...r},i),t.info(`success`)}async signoutRedirectCallback(e=window.location.href){let t=this._logger.create(`signoutRedirectCallback`),n=await this._signoutEnd(e);return t.info(`success`),n}async signoutPopup(e={}){let t=this._logger.create(`signoutPopup`),{popupWindowFeatures:n,popupWindowTarget:r,popupSignal:i,...a}=e,o=this.settings.popup_post_logout_redirect_uri,s=await this._popupNavigator.prepare({popupWindowFeatures:n,popupWindowTarget:r,popupSignal:i});await this._signout({request_type:`so:p`,post_logout_redirect_uri:o,state:o==null?void 0:{},...a},s),t.info(`success`)}async signoutPopupCallback(e=window.location.href,t=!1){let n=this._logger.create(`signoutPopupCallback`);await this._popupNavigator.callback(e,{keepOpen:t}),n.info(`success`)}async _signout(e,t){let n=await this._signoutStart(e,t);return await this._signoutEnd(n.url)}async _signoutStart(e={},t){let n=this._logger.create(`_signoutStart`);try{let r=await this._loadUser();n.debug(`loaded current user from storage`),this.settings.revokeTokensOnSignout&&await this._revokeInternal(r);let i=e.id_token_hint||r&&r.id_token;i&&(n.debug(`setting id_token_hint in signout request`),e.id_token_hint=i),await this.removeUser(),n.debug(`user removed, creating signout request`);let a=await this._client.createSignoutRequest(e);return n.debug(`got signout request`),await t.navigate({url:a.url,state:a.state?.id,scriptOrigin:this.settings.iframeScriptOrigin})}catch(e){throw n.debug(`error after preparing navigator, closing navigator window`),t.close(),e}}async _signoutEnd(e){let t=this._logger.create(`_signoutEnd`),n=await this._client.processSignoutResponse(e);return t.debug(`got signout response`),n}async signoutSilent(e={}){let t=this._logger.create(`signoutSilent`),{silentRequestTimeoutInSeconds:n,...r}=e,i=this.settings.includeIdTokenInSilentSignout?(await this._loadUser())?.id_token:void 0,a=this.settings.popup_post_logout_redirect_uri,o=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n});await this._signout({request_type:`so:s`,post_logout_redirect_uri:a,id_token_hint:i,...r},o),t.info(`success`)}async signoutSilentCallback(e=window.location.href){let t=this._logger.create(`signoutSilentCallback`);await this._iframeNavigator.callback(e),t.info(`success`)}async revokeTokens(e){let t=await this._loadUser();await this._revokeInternal(t,e)}async _revokeInternal(e,t=this.settings.revokeTokenTypes){let n=this._logger.create(`_revokeInternal`);if(!e)return;let r=t.filter(t=>typeof e[t]==`string`);if(!r.length){n.debug(`no need to revoke due to no token(s)`);return}for(let t of r)await this._client.revokeToken(e[t],t),n.info(`${t} revoked successfully`),t!==`access_token`&&(e[t]=null);await this.storeUser(e),n.debug(`user stored`),await this._events.load(e)}startSilentRenew(){this._logger.create(`startSilentRenew`),this._silentRenewService.start()}stopSilentRenew(){this._silentRenewService.stop()}get _userStoreKey(){return`user:${this.settings.authority}:${this.settings.client_id}`}async _loadUser(){let e=this._logger.create(`_loadUser`),t=await this.settings.userStore.get(this._userStoreKey);return t?(e.debug(`user storageString loaded`),Zn.fromStorageString(t)):(e.debug(`no user storageString`),null)}async storeUser(e){let t=this._logger.create(`storeUser`);if(e){t.debug(`storing user`);let n=e.toStorageString();await this.settings.userStore.set(this._userStoreKey,n)}else this._logger.debug(`removing user`),await this.settings.userStore.remove(this._userStoreKey),this.settings.dpop&&await this.settings.dpop.store.remove(this.settings.client_id)}async clearStaleState(){await this._client.clearStaleState()}async dpopProof(e,t,n,r){let i=await(this.settings.dpop?.store)?.get(this.settings.client_id);if(i)return await mn.generateDPoPProof({url:e,accessToken:t?.access_token,httpMethod:n,keyPair:i.keys,nonce:r})}async generateDPoPJkt(e){let t=await e.store.get(this.settings.client_id);return t||(t=new Jn(await mn.generateDPoPKeys()),await e.store.set(this.settings.client_id,t)),await mn.generateDPoPJkt(t.keys)}},_r;function vr(e){return e.openIDConnectClientId?location.hostname===`localhost`?!!e.localhostOpenIDConnectAuthority:!!e.openIDConnectAuthority:!1}async function yr(){let e=await Ht.fMSInformation();e.additionalLogServers&&e.additionalLogServers.length>0&&Xt(e.additionalLogServers);let t=null;if(vr(e)){if(_r=new gr({authority:(location.hostname===`localhost`?e.localhostOpenIDConnectAuthority:e.openIDConnectAuthority)??``,client_id:e.openIDConnectClientId??``,redirect_uri:window.location.protocol+`//`+window.location.host+`/`,post_logout_redirect_uri:window.location.protocol+`//`+window.location.host+`/`,automaticSilentRenew:!0,loadUserInfo:!0,scope:`openid profile`}),t=await _r.getUser(),!t){try{t=await _r.signinRedirectCallback()}catch{t=null}window.history.replaceState({},``,`/`)}t&&(Zt(t),localStorage.setItem(`current-operator`,t.profile.name||t.profile.sub))}return{...e,user:t===null?void 0:t}}var br=P({name:`FMS Insight`,version:``});function xr(e){_r&&!e.user&&_r.signinRedirect().catch(e=>console.log(e))}function Sr(){_r&&_r.signoutRedirect().catch(e=>console.log(e))}var Cr=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&k(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&k(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function k(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,k(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),wr=o(((e,t)=>{t.exports=Cr()})),Tr=o((e=>{var t=pe();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),Er=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Tr()})),Dr=o((e=>{var t=wr(),n=pe(),r=Er();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function ee(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var te=Symbol.for(`react.client.reference`);function k(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?k(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return k(e(t))}catch{}}return null}var A=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function ae(e){return{current:e}}function N(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function oe(e,t){ie++,re[ie]=e.current,e.current=t}var se=ae(null),ce=ae(null),P=ae(null),le=ae(null);function ue(e,t){switch(oe(P,t),oe(ce,e),oe(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Jd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Jd(t),e=Yd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}N(se),oe(se,e)}function F(){N(se),N(ce),N(P)}function I(e){e.memoizedState!==null&&oe(le,e);var t=se.current,n=Yd(t,e.type);t!==n&&(oe(ce,e),oe(se,n))}function de(e){ce.current===e&&(N(se),N(ce)),le.current===e&&(N(le),ap._currentValue=ne)}var fe,L;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,L=-1<e.stack.indexOf(`
|
|
23
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
24
|
+
`+fe+e+L}var he=!1;function ge(e,t){if(!e||he)return``;he=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
25
|
+
`),l=s.split(`
|
|
26
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
27
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{he=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?me(n):``}function _e(e,t){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me(`Lazy`);case 13:return e.child!==t&&t!==null?me(`Suspense Fallback`):me(`Suspense`);case 19:return me(`SuspenseList`);case 0:case 15:return ge(e.type,!1);case 11:return ge(e.type.render,!1);case 1:return ge(e.type,!0);case 31:return me(`Activity`);default:return``}}function ve(e){try{var t=``,n=null;do t+=_e(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
28
|
+
Error generating stack: `+e.message+`
|
|
29
|
+
`+e.stack}}var ye=Object.prototype.hasOwnProperty,be=t.unstable_scheduleCallback,xe=t.unstable_cancelCallback,R=t.unstable_shouldYield,z=t.unstable_requestPaint,B=t.unstable_now,Se=t.unstable_getCurrentPriorityLevel,Ce=t.unstable_ImmediatePriority,we=t.unstable_UserBlockingPriority,Te=t.unstable_NormalPriority,Ee=t.unstable_LowPriority,De=t.unstable_IdlePriority,Oe=t.log,ke=t.unstable_setDisableYieldValue,Ae=null,V=null;function je(e){if(typeof Oe==`function`&&ke(e),V&&typeof V.setStrictMode==`function`)try{V.setStrictMode(Ae,e)}catch{}}var Me=Math.clz32?Math.clz32:Fe,Ne=Math.log,Pe=Math.LN2;function Fe(e){return e>>>=0,e===0?32:31-(Ne(e)/Pe|0)|0}var Ie=256,Le=262144,Re=4194304;function ze(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Be(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=ze(n))):i=ze(o):i=ze(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ze(n))):i=ze(o)):i=ze(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ve(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function He(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ue(){var e=Re;return Re<<=1,!(Re&62914560)&&(Re=4194304),e}function We(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ge(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ke(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Me(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&qe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function qe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Me(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Je(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Me(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ye(e,t){var n=t&-t;return n=n&42?1:Xe(n),(n&(e.suspendedLanes|t))===0?n:0}function Xe(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ze(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Qe(){var e=M.p;return e===0?(e=window.event,e===void 0?32:xp(e.type)):e}function $e(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var et=Math.random().toString(36).slice(2),tt=`__reactFiber$`+et,nt=`__reactProps$`+et,rt=`__reactContainer$`+et,it=`__reactEvents$`+et,at=`__reactListeners$`+et,ot=`__reactHandles$`+et,st=`__reactResources$`+et,ct=`__reactMarker$`+et;function lt(e){delete e[tt],delete e[nt],delete e[it],delete e[at],delete e[ot]}function ut(e){var t=e[tt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[rt]||n[tt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=vf(e);e!==null;){if(n=e[tt])return n;e=vf(e)}return t}e=n,n=e.parentNode}return null}function dt(e){if(e=e[tt]||e[rt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ft(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function pt(e){var t=e[st];return t||=e[st]={hoistableStyles:new Map,hoistableScripts:new Map},t}function mt(e){e[ct]=!0}var ht=new Set,gt={};function _t(e,t){vt(e,t),vt(e+`Capture`,t)}function vt(e,t){for(gt[e]=t,e=0;e<t.length;e++)ht.add(t[e])}var yt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),bt={},xt={};function St(e){return ye.call(xt,e)?!0:ye.call(bt,e)?!1:yt.test(e)?xt[e]=!0:(bt[e]=!0,!1)}function Ct(e,t,n){if(St(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function wt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Tt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Et(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Dt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ot(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function kt(e){if(!e._valueTracker){var t=Dt(e)?`checked`:`value`;e._valueTracker=Ot(e,t,``+e[t])}}function At(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Dt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function jt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Mt=/[\n"\\]/g;function Nt(e){return e.replace(Mt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Pt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Et(t)):e.value!==``+Et(t)&&(e.value=``+Et(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):It(e,o,Et(n)):It(e,o,Et(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Et(s):e.removeAttribute(`name`)}function Ft(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){kt(e);return}n=n==null?``:``+Et(n),t=t==null?n:``+Et(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),kt(e)}function It(e,t,n){t===`number`&&jt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Lt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Et(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Rt(e,t,n){if(t!=null&&(t=``+Et(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Et(n)}function zt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(A(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Et(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),kt(e)}function Bt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Ht(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Vt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Ut(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Ht(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Ht(e,o,t[o])}function Wt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Gt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Kt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function qt(e){return Kt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Jt(){}var Yt=null;function Xt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zt=null,Qt=null;function $t(e){var t=dt(e);if(t&&(e=t.stateNode)){var n=e[nt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Pt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Nt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[nt]||null;if(!a)throw Error(i(90));Pt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&At(r)}break a;case`textarea`:Rt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Lt(e,!!n.multiple,t,!1)}}}var en=!1;function tn(e,t,n){if(en)return e(t,n);en=!0;try{return e(t)}finally{if(en=!1,(Zt!==null||Qt!==null)&&(Du(),Zt&&(t=Zt,e=Qt,Qt=Zt=null,$t(t),e)))for(t=0;t<e.length;t++)$t(e[t])}}function nn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[nt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var rn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),an=!1;if(rn)try{var on={};Object.defineProperty(on,"passive",{get:function(){an=!0}}),window.addEventListener(`test`,on,on),window.removeEventListener(`test`,on,on)}catch{an=!1}var sn=null,cn=null,ln=null;function un(){if(ln)return ln;var e,t=cn,n=t.length,r,i=`value`in sn?sn.value:sn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return ln=i.slice(e,1<r?1-r:void 0)}function dn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function fn(){return!0}function pn(){return!1}function mn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?fn:pn,this.isPropagationStopped=pn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=fn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=fn)},persist:function(){},isPersistent:fn}),t}var hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gn=mn(hn),_n=f({},hn,{view:0,detail:0}),vn=mn(_n),yn,bn,xn,Sn=f({},_n,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==xn&&(xn&&e.type===`mousemove`?(yn=e.screenX-xn.screenX,bn=e.screenY-xn.screenY):bn=yn=0,xn=e),yn)},movementY:function(e){return`movementY`in e?e.movementY:bn}}),Cn=mn(Sn),wn=mn(f({},Sn,{dataTransfer:0})),Tn=mn(f({},_n,{relatedTarget:0})),En=mn(f({},hn,{animationName:0,elapsedTime:0,pseudoElement:0})),Dn=mn(f({},hn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),On=mn(f({},hn,{data:0})),kn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},An={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},jn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Mn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=jn[e])?!!t[e]:!1}function Nn(){return Mn}var Pn=mn(f({},_n,{key:function(e){if(e.key){var t=kn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=dn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?An[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nn,charCode:function(e){return e.type===`keypress`?dn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?dn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Fn=mn(f({},Sn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),In=mn(f({},_n,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nn})),Ln=mn(f({},hn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Rn=mn(f({},Sn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),zn=mn(f({},hn,{newState:0,oldState:0})),Bn=[9,13,27,32],Vn=rn&&`CompositionEvent`in window,Hn=null;rn&&`documentMode`in document&&(Hn=document.documentMode);var Un=rn&&`TextEvent`in window&&!Hn,Wn=rn&&(!Vn||Hn&&8<Hn&&11>=Hn),Gn=` `,Kn=!1;function qn(e,t){switch(e){case`keyup`:return Bn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Jn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Yn=!1;function Xn(e,t){switch(e){case`compositionend`:return Jn(t);case`keypress`:return t.which===32?(Kn=!0,Gn):null;case`textInput`:return e=t.data,e===Gn&&Kn?null:e;default:return null}}function Zn(e,t){if(Yn)return e===`compositionend`||!Vn&&qn(e,t)?(e=un(),ln=cn=sn=null,Yn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Wn&&t.locale!==`ko`?null:t.data;default:return null}}var Qn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Qn[e.type]:t===`textarea`}function er(e,t,n,r){Zt?Qt?Qt.push(r):Qt=[r]:Zt=r,t=Pd(t,`onChange`),0<t.length&&(n=new gn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var tr=null,nr=null;function rr(e){Ed(e,0)}function ir(e){if(At(ft(e)))return e}function ar(e,t){if(e===`change`)return t}var or=!1;if(rn){var sr;if(rn){var cr=`oninput`in document;if(!cr){var lr=document.createElement(`div`);lr.setAttribute(`oninput`,`return;`),cr=typeof lr.oninput==`function`}sr=cr}else sr=!1;or=sr&&(!document.documentMode||9<document.documentMode)}function ur(){tr&&(tr.detachEvent(`onpropertychange`,dr),nr=tr=null)}function dr(e){if(e.propertyName===`value`&&ir(nr)){var t=[];er(t,nr,e,Xt(e)),tn(rr,t)}}function fr(e,t,n){e===`focusin`?(ur(),tr=t,nr=n,tr.attachEvent(`onpropertychange`,dr)):e===`focusout`&&ur()}function pr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ir(nr)}function mr(e,t){if(e===`click`)return ir(t)}function hr(e,t){if(e===`input`||e===`change`)return ir(t)}function gr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var _r=typeof Object.is==`function`?Object.is:gr;function vr(e,t){if(_r(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ye.call(t,i)||!_r(e[i],t[i]))return!1}return!0}function yr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function br(e,t){var n=yr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=yr(n)}}function xr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=jt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=jt(e.document)}return t}function Cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Tr=rn&&`documentMode`in document&&11>=document.documentMode,Dr=null,Or=null,kr=null,Ar=!1;function jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ar||Dr==null||Dr!==jt(r)||(r=Dr,`selectionStart`in r&&Cr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),kr&&vr(kr,r)||(kr=r,r=Pd(Or,`onSelect`),0<r.length&&(t=new gn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Dr)))}function Mr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Nr={animationend:Mr(`Animation`,`AnimationEnd`),animationiteration:Mr(`Animation`,`AnimationIteration`),animationstart:Mr(`Animation`,`AnimationStart`),transitionrun:Mr(`Transition`,`TransitionRun`),transitionstart:Mr(`Transition`,`TransitionStart`),transitioncancel:Mr(`Transition`,`TransitionCancel`),transitionend:Mr(`Transition`,`TransitionEnd`)},Pr={},Fr={};rn&&(Fr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Nr.animationend.animation,delete Nr.animationiteration.animation,delete Nr.animationstart.animation),`TransitionEvent`in window||delete Nr.transitionend.transition);function Ir(e){if(Pr[e])return Pr[e];if(!Nr[e])return e;var t=Nr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fr)return Pr[e]=t[n];return e}var Lr=Ir(`animationend`),Rr=Ir(`animationiteration`),zr=Ir(`animationstart`),Br=Ir(`transitionrun`),Vr=Ir(`transitionstart`),Hr=Ir(`transitioncancel`),Ur=Ir(`transitionend`),Wr=new Map,Gr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Gr.push(`scrollEnd`);function Kr(e,t){Wr.set(e,t),_t(t,[e])}var qr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Jr=[],Yr=0,Xr=0;function Zr(){for(var e=Yr,t=Xr=Yr=0;t<e;){var n=Jr[t];Jr[t++]=null;var r=Jr[t];Jr[t++]=null;var i=Jr[t];Jr[t++]=null;var a=Jr[t];if(Jr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ti(n,i,a)}}function Qr(e,t,n,r){Jr[Yr++]=e,Jr[Yr++]=t,Jr[Yr++]=n,Jr[Yr++]=r,Xr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function $r(e,t,n,r){return Qr(e,t,n,r),ni(e)}function ei(e,t){return Qr(e,null,null,t),ni(e)}function ti(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Me(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ni(e){if(50<vu)throw vu=0,yu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ri={};function ii(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ai(e,t,n,r){return new ii(e,t,n,r)}function oi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function si(e,t){var n=e.alternate;return n===null?(n=ai(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ci(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function li(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)oi(e)&&(s=1);else if(typeof e==`string`)s=Xf(e,n,se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=ai(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return ui(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=ai(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=ai(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=ai(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ai(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ui(e,t,n,r){return e=ai(7,e,r,t),e.lanes=n,e}function di(e,t,n){return e=ai(6,e,null,t),e.lanes=n,e}function fi(e){var t=ai(18,null,null,0);return t.stateNode=e,t}function pi(e,t,n){return t=ai(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mi=new WeakMap;function hi(e,t){if(typeof e==`object`&&e){var n=mi.get(e);return n===void 0?(t={value:e,source:t,stack:ve(t)},mi.set(e,t),t):n}return{value:e,source:t,stack:ve(t)}}var gi=[],_i=0,vi=null,yi=0,bi=[],xi=0,Si=null,Ci=1,wi=``;function Ti(e,t){gi[_i++]=yi,gi[_i++]=vi,vi=e,yi=t}function Ei(e,t,n){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Si=e;var r=Ci;e=wi;var i=32-Me(r)-1;r&=~(1<<i),n+=1;var a=32-Me(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ci=1<<32-Me(t)+i|n<<i|r,wi=a+e}else Ci=1<<a|n<<i|r,wi=e}function Di(e){e.return!==null&&(Ti(e,1),Ei(e,1,0))}function Oi(e){for(;e===vi;)vi=gi[--_i],gi[_i]=null,yi=gi[--_i],gi[_i]=null;for(;e===Si;)Si=bi[--xi],bi[xi]=null,wi=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null}function ki(e,t){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Ci=t.id,wi=t.overflow,Si=e}var Ai=null,ji=null,Mi=!1,Ni=null,Pi=!1,Fi=Error(i(519));function Ii(e){throw Hi(hi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Fi}function Li(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[tt]=e,t[nt]=r,n){case`dialog`:Dd(`cancel`,t),Dd(`close`,t);break;case`iframe`:case`object`:case`embed`:Dd(`load`,t);break;case`video`:case`audio`:for(n=0;n<wd.length;n++)Dd(wd[n],t);break;case`source`:Dd(`error`,t);break;case`img`:case`image`:case`link`:Dd(`error`,t),Dd(`load`,t);break;case`details`:Dd(`toggle`,t);break;case`input`:Dd(`invalid`,t),Ft(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Dd(`invalid`,t);break;case`textarea`:Dd(`invalid`,t),zt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Bd(t.textContent,n)?(r.popover!=null&&(Dd(`beforetoggle`,t),Dd(`toggle`,t)),r.onScroll!=null&&Dd(`scroll`,t),r.onScrollEnd!=null&&Dd(`scrollend`,t),r.onClick!=null&&(t.onclick=Jt),t=!0):t=!1,t||Ii(e,!0)}function Ri(e){for(Ai=e.return;Ai;)switch(Ai.tag){case 5:case 31:case 13:Pi=!1;return;case 27:case 3:Pi=!0;return;default:Ai=Ai.return}}function zi(e){if(e!==Ai)return!1;if(!Mi)return Ri(e),Mi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Xd(e.type,e.memoizedProps)),n=!n),n&&ji&&Ii(e),Ri(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ji=_f(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ji=_f(e)}else t===27?(t=ji,af(e.type)?(e=gf,gf=null,ji=e):ji=t):ji=Ai?hf(e.stateNode.nextSibling):null;return!0}function Bi(){ji=Ai=null,Mi=!1}function Vi(){var e=Ni;return e!==null&&(iu===null?iu=e:iu.push.apply(iu,e),Ni=null),e}function Hi(e){Ni===null?Ni=[e]:Ni.push(e)}var Ui=ae(null),Wi=null,Gi=null;function Ki(e,t,n){oe(Ui,t._currentValue),t._currentValue=n}function qi(e){e._currentValue=Ui.current,N(Ui)}function Ji(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Yi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ji(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ji(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Xi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;_r(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===le.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ap]:e.push(ap))}a=a.return}e!==null&&Yi(t,e,n,r),t.flags|=262144}function Zi(e){for(e=e.firstContext;e!==null;){if(!_r(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qi(e){Wi=e,Gi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $i(e){return ta(Wi,e)}function ea(e,t){return Wi===null&&Qi(e),ta(e,t)}function ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Gi===null){if(e===null)throw Error(i(308));Gi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gi=Gi.next=t;return n}var na=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ra=t.unstable_scheduleCallback,ia=t.unstable_NormalPriority,aa={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function oa(){return{controller:new na,data:new Map,refCount:0}}function sa(e){e.refCount--,e.refCount===0&&ra(ia,function(){e.controller.abort()})}var ca=null,la=0,ua=0,da=null;function fa(e,t){if(ca===null){var n=ca=[];la=0,ua=vd(),da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return la++,t.then(pa,pa),t}function pa(){if(--la===0&&ca!==null){da!==null&&(da.status=`fulfilled`);var e=ca;ca=null,ua=0,da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ma(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ha=j.S;j.S=function(e,t){su=B(),typeof t==`object`&&t&&typeof t.then==`function`&&fa(e,t),ha!==null&&ha(e,t)};var ga=ae(null);function _a(){var e=ga.current;return e===null?Hl.pooledCache:e}function va(e,t){t===null?oe(ga,ga.current):oe(ga,t.pool)}function ya(){var e=_a();return e===null?null:{parent:aa._currentValue,pool:e}}var ba=Error(i(460)),xa=Error(i(474)),Sa=Error(i(542)),Ca={then:function(){}};function wa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ta(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Jt,Jt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e;default:if(typeof t.status==`string`)t.then(Jt,Jt);else{if(e=Hl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e}throw Da=t,ba}}function Ea(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Da=e,ba):e}}var Da=null;function Oa(){if(Da===null)throw Error(i(459));var e=Da;return Da=null,e}function ka(e){if(e===ba||e===Sa)throw Error(i(483))}var Aa=null,ja=0;function Ma(e){var t=ja;return ja+=1,Aa===null&&(Aa=[]),Ta(Aa,e,t)}function Na(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Pa(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Fa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=si(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=di(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&Ea(i)===t.type)?(t=a(t,n.props),Na(t,n),t.return=e,t):(t=li(n.type,n.key,n.props,null,e.mode,r),Na(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=pi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ui(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=li(t.type,t.key,t.props,null,e.mode,n),Na(n,t),n.return=e,n;case h:return t=pi(t,e.mode,n),t.return=e,t;case T:return t=Ea(t),f(e,t,n)}if(A(t)||ee(t))return t=ui(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ma(t),n);if(t.$$typeof===b)return f(e,ea(e,t),n);Pa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=Ea(n),p(e,t,n,r)}if(A(n)||ee(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ma(n),r);if(n.$$typeof===b)return p(e,t,ea(e,n),r);Pa(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=Ea(r),_(e,t,n,r,i)}if(A(r)||ee(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Ma(r),i);if(r.$$typeof===b)return _(e,t,n,ea(t,r),i);Pa(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Mi&&Ti(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return Mi&&Ti(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),Mi&&Ti(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Mi&&Ti(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Mi&&Ti(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Mi&&Ti(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Ea(l)===r.type){n(e,r.sibling),c=a(r,o.props),Na(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=ui(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=li(o.type,o.key,o.props,null,e.mode,c),Na(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=pi(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Ea(o),x(e,r,o,c)}if(A(o))return v(e,r,o,c);if(ee(o)){if(l=ee(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Ma(o),c);if(o.$$typeof===b)return x(e,r,ea(e,o),c);Pa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ja=0;var i=x(e,t,n,r);return Aa=null,i}catch(t){if(t===ba||t===Sa)throw t;var a=ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ia=Fa(!0),La=Fa(!1),Ra=!1;function za(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ba(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ha(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Vl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ni(e),ti(e,null,n),t}return Qr(e,r,t,n),ni(e)}function Ua(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Je(e,n)}}function Wa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ga=!1;function H(){if(Ga){var e=da;if(e!==null)throw e}}function Ka(e,t,n,r){Ga=!1;var i=e.updateQueue;Ra=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Wl&p)===p:(r&p)===p){p!==0&&p===ua&&(Ga=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ra=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Ql|=o,e.lanes=o,e.memoizedState=d}}function qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ja(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)qa(n[e],t)}var Ya=ae(null),Xa=ae(0);function Za(e,t){e=Xl,oe(Xa,e),oe(Ya,t),Xl=e|t.baseLanes}function Qa(){oe(Xa,Xl),oe(Ya,Ya.current)}function $a(){Xl=Xa.current,N(Ya),N(Xa)}var eo=ae(null),to=null;function no(e){var t=e.alternate;oe(so,so.current&1),oe(eo,e),to===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(to=e)}function ro(e){oe(so,so.current),oe(eo,e),to===null&&(to=e)}function io(e){e.tag===22?(oe(so,so.current),oe(eo,e),to===null&&(to=e)):ao(e)}function ao(){oe(so,so.current),oe(eo,eo.current)}function oo(e){N(eo),to===e&&(to=null),N(so)}var so=ae(0);function co(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||ff(n)||pf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var lo=0,uo=null,fo=null,po=null,mo=!1,ho=!1,go=!1,_o=0,vo=0,yo=null,bo=0;function xo(){throw Error(i(321))}function So(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!_r(e[n],t[n]))return!1;return!0}function Co(e,t,n,r,i,a){return lo=a,uo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?Bs:Vs,go=!1,a=n(r,i),go=!1,ho&&(a=To(t,n,r,i)),wo(e),a}function wo(e){j.H=zs;var t=fo!==null&&fo.next!==null;if(lo=0,po=fo=uo=null,mo=!1,vo=0,yo=null,t)throw Error(i(300));e===null||rc||(e=e.dependencies,e!==null&&Zi(e)&&(rc=!0))}function To(e,t,n,r){uo=e;var a=0;do{if(ho&&(yo=null),vo=0,ho=!1,25<=a)throw Error(i(301));if(a+=1,po=fo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}j.H=Hs,o=t(n,r)}while(ho);return o}function Eo(){var e=j.H,t=e.useState()[0];return t=typeof t.then==`function`?No(t):t,e=e.useState()[0],(fo===null?null:fo.memoizedState)!==e&&(uo.flags|=1024),t}function Do(){var e=_o!==0;return _o=0,e}function Oo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ko(e){if(mo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}mo=!1}lo=0,po=fo=uo=null,ho=!1,vo=_o=0,yo=null}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return po===null?uo.memoizedState=po=e:po=po.next=e,po}function jo(){if(fo===null){var e=uo.alternate;e=e===null?null:e.memoizedState}else e=fo.next;var t=po===null?uo.memoizedState:po.next;if(t!==null)po=t,fo=e;else{if(e===null)throw uo.alternate===null?Error(i(467)):Error(i(310));fo=e,e={memoizedState:fo.memoizedState,baseState:fo.baseState,baseQueue:fo.baseQueue,queue:fo.queue,next:null},po===null?uo.memoizedState=po=e:po=po.next=e}return po}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function No(e){var t=vo;return vo+=1,yo===null&&(yo=[]),e=Ta(yo,e,t),t=uo,(po===null?t.memoizedState:po.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?Bs:Vs),e}function Po(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return No(e);if(e.$$typeof===b)return $i(e)}throw Error(i(438,String(e)))}function Fo(e){var t=null,n=uo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=uo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Mo(),uo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=D;return t.index++,n}function Io(e,t){return typeof t==`function`?t(e):t}function Lo(e){return Ro(jo(),fo,e)}function Ro(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(lo&f)===f:(Wl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ua&&(d=!0);else if((lo&p)===p){u=u.next,p===ua&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,uo.lanes|=p,Ql|=p;f=u.action,go&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,uo.lanes|=f,Ql|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!_r(o,e.memoizedState)&&(rc=!0,d&&(n=da,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function zo(e){var t=jo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);_r(o,t.memoizedState)||(rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Bo(e,t,n){var r=uo,a=jo(),o=Mi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!_r((fo||a).memoizedState,n);if(s&&(a.memoizedState=n,rc=!0),a=a.queue,ds(Uo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||po!==null&&po.memoizedState.tag&1){if(r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),Hl===null)throw Error(i(349));o||lo&127||Vo(r,t,n)}return n}function Vo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=uo.updateQueue,t===null?(t=Mo(),uo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ho(e,t,n,r){t.value=n,t.getSnapshot=r,Wo(t)&&Go(e)}function Uo(e,t,n){return n(function(){Wo(t)&&Go(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!_r(e,n)}catch{return!0}}function Go(e){var t=ei(e,2);t!==null&&Su(t,e,2)}function Ko(e){var t=Ao();if(typeof e==`function`){var n=e;if(e=n(),go){je(!0);try{n()}finally{je(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t}function qo(e,t,n,r){return e.baseState=n,Ro(e,fo,typeof r==`function`?r:Io)}function Jo(e,t,n,r,a){if(Is(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};j.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Yo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Yo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=j.T,o={};j.T=o;try{var s=n(i,r),c=j.S;c!==null&&c(o,s),Xo(e,t,s)}catch(n){Qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),j.T=a}}else try{a=n(i,r),Xo(e,t,a)}catch(n){Qo(e,t,n)}}function Xo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Zo(e,t,n)},function(n){return Qo(e,t,n)}):Zo(e,t,n)}function Zo(e,t,n){t.status=`fulfilled`,t.value=n,$o(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Yo(e,n)))}function Qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,$o(t),t=t.next;while(t!==r)}e.action=null}function $o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function es(e,t){return t}function ts(e,t){if(Mi){var n=Hl.formState;if(n!==null){a:{var r=uo;if(Mi){if(ji){b:{for(var i=ji,a=Pi;i.nodeType!==8;){if(!a){i=null;break b}if(i=hf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ji=hf(i.nextSibling),r=i.data===`F!`;break a}}Ii(r)}r=!1}r&&(t=n[0])}}return n=Ao(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:t},n.queue=r,n=Ns.bind(null,uo,r),r.dispatch=n,r=Ko(!1),a=Fs.bind(null,uo,!1,r.queue),r=Ao(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Jo.bind(null,uo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ns(e){return rs(jo(),fo,e)}function rs(e,t,n){if(t=Ro(e,t,es)[0],e=Lo(Io)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=No(t)}catch(e){throw e===ba?Sa:e}else r=t;t=jo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(uo.flags|=2048,os(9,{destroy:void 0},is.bind(null,i,n),null)),[r,a,e]}function is(e,t){e.action=t}function as(e){var t=jo(),n=fo;if(n!==null)return rs(t,n,e);jo(),t=t.memoizedState,n=jo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=uo.updateQueue,t===null&&(t=Mo(),uo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ss(){return jo().memoizedState}function cs(e,t,n,r){var i=Ao();uo.flags|=e,i.memoizedState=os(1|t,{destroy:void 0},n,r===void 0?null:r)}function ls(e,t,n,r){var i=jo();r=r===void 0?null:r;var a=i.memoizedState.inst;fo!==null&&r!==null&&So(r,fo.memoizedState.deps)?i.memoizedState=os(t,a,n,r):(uo.flags|=e,i.memoizedState=os(1|t,a,n,r))}function us(e,t){cs(8390656,8,e,t)}function ds(e,t){ls(2048,8,e,t)}function fs(e){uo.flags|=4;var t=uo.updateQueue;if(t===null)t=Mo(),uo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ps(e){var t=jo().memoizedState;return fs({ref:t,nextImpl:e}),function(){if(Vl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ms(e,t){return ls(4,2,e,t)}function hs(e,t){return ls(4,4,e,t)}function gs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _s(e,t,n){n=n==null?null:n.concat([e]),ls(4,4,gs.bind(null,t,e),n)}function vs(){}function ys(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&So(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bs(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&So(t,r[1]))return r[0];if(r=e(),go){je(!0);try{e()}finally{je(!1)}}return n.memoizedState=[r,t],r}function xs(e,t,n){return n===void 0||lo&1073741824&&!(Wl&261930)?e.memoizedState=t:(e.memoizedState=n,e=xu(),uo.lanes|=e,Ql|=e,n)}function Ss(e,t,n,r){return _r(n,t)?n:Ya.current===null?!(lo&42)||lo&1073741824&&!(Wl&261930)?(rc=!0,e.memoizedState=n):(e=xu(),uo.lanes|=e,Ql|=e,t):(e=xs(e,n,r),_r(e,t)||(rc=!0),e)}function Cs(e,t,n,r,i){var a=M.p;M.p=a!==0&&8>a?a:8;var o=j.T,s={};j.T=s,Fs(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,ma(c,r),bu(e)):Ps(e,t,r,bu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},bu())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Es(e).queue;Cs(e,a,t,ne,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},bu())}function Os(){return $i(ap)}function ks(){return jo().memoizedState}function As(){return jo().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=bu();e=Va(n);var r=Ha(t,e,n);r!==null&&(Su(r,t,n),Ua(r,t,n)),t={cache:oa()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=bu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=$r(e,t,n,r),n!==null&&(Su(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,bu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,_r(s,o))return Qr(e,t,i,0),Hl===null&&Zr(),!1}catch{}if(n=$r(e,t,i,r),n!==null)return Su(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:vd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(i(479))}else t=$r(e,n,r,2),t!==null&&Su(t,e,2)}function Is(e){var t=e.alternate;return e===uo||t!==null&&t===uo}function Ls(e,t){ho=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Je(e,n)}}var zs={readContext:$i,use:Po,useCallback:xo,useContext:xo,useEffect:xo,useImperativeHandle:xo,useLayoutEffect:xo,useInsertionEffect:xo,useMemo:xo,useReducer:xo,useRef:xo,useState:xo,useDebugValue:xo,useDeferredValue:xo,useTransition:xo,useSyncExternalStore:xo,useId:xo,useHostTransitionStatus:xo,useFormState:xo,useActionState:xo,useOptimistic:xo,useMemoCache:xo,useCacheRefresh:xo};zs.useEffectEvent=xo;var Bs={readContext:$i,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:$i,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(go){je(!0);try{e()}finally{je(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(go){je(!0);try{n(t)}finally{je(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ms.bind(null,uo,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,uo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,uo,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=uo,a=Ao();if(Mi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Hl===null)throw Error(i(349));Wl&127||Vo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,us(Uo.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=Hl.identifierPrefix;if(Mi){var n=wi,r=Ci;n=(r&~(1<<32-Me(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=_o++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=bo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Os,useFormState:ts,useActionState:ts,useOptimistic:function(e){var t=Ao();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Fs.bind(null,uo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Ao().memoizedState=js.bind(null,uo)},useEffectEvent:function(e){var t=Ao(),n={impl:e};return t.memoizedState=n,function(){if(Vl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Vs={readContext:$i,use:Po,useCallback:ys,useContext:$i,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:Lo,useRef:ss,useState:function(){return Lo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){return Ss(jo(),fo.memoizedState,e,t)},useTransition:function(){var e=Lo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){return qo(jo(),fo,e,t)},useMemoCache:Fo,useCacheRefresh:As};Vs.useEffectEvent=ps;var Hs={readContext:$i,use:Po,useCallback:ys,useContext:$i,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:zo,useRef:ss,useState:function(){return zo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){var n=jo();return fo===null?xs(n,e,t):Ss(n,fo.memoizedState,e,t)},useTransition:function(){var e=zo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:as,useActionState:as,useOptimistic:function(e,t){var n=jo();return fo===null?(n.baseState=e,[e,n.queue.dispatch]):qo(n,fo,e,t)},useMemoCache:Fo,useCacheRefresh:As};Hs.useEffectEvent=ps;function Us(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ws={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=bu(),i=Va(r);i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(Su(t,e,r),Ua(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=bu(),i=Va(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(Su(t,e,r),Ua(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=bu(),r=Va(n);r.tag=2,t!=null&&(r.callback=t),t=Ha(e,r,n),t!==null&&(Su(t,e,n),Ua(t,e,n))}};function Gs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!vr(n,r)||!vr(i,a):!0}function Ks(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ws.enqueueReplaceState(t,t.state,null)}function qs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Js(e){qr(e)}function U(e){console.error(e)}function Ys(e){qr(e)}function Xs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Zs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Qs(e,t,n){return n=Va(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=Va(e),e.tag=3,e}function ec(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Zs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Zs(t,n,r),typeof i!=`function`&&(uu===null?uu=new Set([this]):uu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function tc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Xi(t,n,a,!0),n=eo.current,n!==null){switch(n.tag){case 31:case 13:return to===null?Pu():n.alternate===null&&Zl===0&&(Zl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),$u(e,r,a)),!1;case 22:return n.flags|=65536,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),$u(e,r,a)),!1}throw Error(i(435,n.tag))}return $u(e,r,a),Pu(),!1}if(Mi)return t=eo.current,t===null?(r!==Fi&&(t=Error(i(423),{cause:r}),Hi(hi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=hi(r,n),a=Qs(e.stateNode,r,a),Wa(e,a),Zl!==4&&(Zl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Fi&&(e=Error(i(422),{cause:r}),Hi(hi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=hi(o,n),ru===null?ru=[o]:ru.push(o),Zl!==4&&(Zl=2),t===null)return!0;r=hi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Qs(n.stateNode,r,e),Wa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(uu===null||!uu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=$s(a),ec(a,e,n,r),Wa(n,a),!1}n=n.return}while(n!==null);return!1}var nc=Error(i(461)),rc=!1;function ic(e,t,n,r){t.child=e===null?La(t,null,n,r):Ia(t,e.child,n,r)}function ac(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Qi(t),r=Co(e,t,n,o,a,i),s=Do(),e!==null&&!rc?(Oo(e,t,i),kc(e,t,i)):(Mi&&s&&Di(t),t.flags|=1,ic(e,t,r,i),t.child)}function oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!oi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ac(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?vr:n,n(o,r)&&e.ref===t.ref)return kc(e,t,i)}return t.flags|=1,e=si(a,r),e.ref=t.ref,e.return=t,t.child=e}function sc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(vr(a,r)&&e.ref===t.ref){if(rc=!1,t.pendingProps=r=a,Ac(e,i))e.flags&131072&&(rc=!0);else return t.lanes=e.lanes,kc(e,t,i)}}return hc(e,t,n,r,i)}function cc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&va(t,a===null?null:a.cachePool),a===null?Qa():Za(t,a),io(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&va(t,null),Qa(),ao(t)):(va(t,a.cachePool),Za(t,a),ao(t),t.memoizedState=null);return ic(e,t,i,n),t.child}function lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function uc(e,t,n,r,i){var a=_a();return a=a===null?null:{parent:aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&va(t,null),Qa(),io(t),e!==null&&Xi(e,t,r,!0),t.childLanes=i,null}function dc(e,t){return t=wc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fc(e,t,n){return Ia(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,oo(t),t.memoizedState=null,e}function pc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Mi){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(ro(t),(e=ji)?(e=df(e,Pi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,Ai=t,ji=null)):e=null,e===null)throw Ii(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ro(t),a){if(t.flags&256)t.flags&=-257,t=fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(rc||Xi(e,t,n,!1),a=(n&e.childLanes)!==0,rc||a){if(r=Hl,r!==null&&(s=Ye(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ei(e,s),Su(r,e,s),nc;Pu(),t=fc(e,t,n)}else e=o.treeContext,ji=hf(s.nextSibling),Ai=t,Mi=!0,Ni=null,Pi=!1,e!==null&&ki(t,e),t=dc(t,r),t.flags|=4096;return t}return e=si(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function mc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function hc(e,t,n,r,i){return Qi(t),n=Co(e,t,n,r,void 0,i),r=Do(),e!==null&&!rc?(Oo(e,t,i),kc(e,t,i)):(Mi&&r&&Di(t),t.flags|=1,ic(e,t,n,i),t.child)}function gc(e,t,n,r,i,a){return Qi(t),t.updateQueue=null,n=To(t,r,n,i),wo(e),r=Do(),e!==null&&!rc?(Oo(e,t,a),kc(e,t,a)):(Mi&&r&&Di(t),t.flags|=1,ic(e,t,n,a),t.child)}function _c(e,t,n,r,i){if(Qi(t),t.stateNode===null){var a=ri,o=n.contextType;typeof o==`object`&&o&&(a=$i(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ws,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},za(t),o=n.contextType,a.context=typeof o==`object`&&o?$i(o):ri,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Us(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ws.enqueueReplaceState(a,a.state,null),Ka(t,r,a,i),H(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ri,typeof u==`object`&&u&&(o=$i(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ks(t,a,r,o),Ra=!1;var f=t.memoizedState;a.state=f,Ka(t,r,a,i),H(),l=t.memoizedState,s||f!==l||Ra?(typeof d==`function`&&(Us(t,n,d,r),l=t.memoizedState),(c=Ra||Gs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ba(e,t),o=t.memoizedProps,u=qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ri,typeof l==`object`&&l&&(c=$i(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ks(t,a,r,c),Ra=!1,f=t.memoizedState,a.state=f,Ka(t,r,a,i),H();var p=t.memoizedState;o!==d||f!==p||Ra||e!==null&&e.dependencies!==null&&Zi(e.dependencies)?(typeof s==`function`&&(Us(t,n,s,r),p=t.memoizedState),(u=Ra||Gs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Zi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,mc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ia(t,e.child,null,i),t.child=Ia(t,null,n,i)):ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=kc(e,t,i),e}function vc(e,t,n,r){return Bi(),t.flags|=256,ic(e,t,n,r),t.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bc(e){return{baseLanes:e,cachePool:ya()}}function xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=tu),e}function Sc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(so.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(Mi){if(a?no(t):ao(t),(e=ji)?(e=df(e,Pi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,Ai=t,ji=null)):e=null,e===null)throw Ii(t);return pf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ao(t),a=t.mode,c=wc({mode:`hidden`,children:c},a),r=ui(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(null,r)):(no(t),Cc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(no(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState===null?(ao(t),c=r.fallback,a=t.mode,r=wc({mode:`visible`,children:r.children},a),c=ui(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ia(t,e.child,null,n),r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,t=lc(null,r)):(ao(t),t.child=e.child,t.flags|=128,t=null);else if(no(t),pf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Hi({value:r,source:null,stack:null}),t=Tc(e,t,n)}else if(rc||Xi(e,t,n,!1),s=(n&e.childLanes)!==0,rc||s){if(s=Hl,s!==null&&(r=Ye(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ei(e,r),Su(s,e,r),nc;ff(c)||Pu(),t=Tc(e,t,n)}else ff(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,ji=hf(c.nextSibling),Ai=t,Mi=!0,Ni=null,Pi=!1,e!==null&&ki(t,e),t=Cc(t,r.children),t.flags|=4096);return t}return a?(ao(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=si(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ui(c,a,n,null),c.flags|=2):c=si(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,lc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=bc(n):(a=c.cachePool,a===null?a=ya():(l=aa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(e.child,r)):(no(t),n=e.child,e=n.sibling,n=si(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Cc(e,t){return t=wc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function wc(e,t){return e=ai(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return Ia(t,e.child,null,n),e=Cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ec(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ji(e.return,t,n)}function Dc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=so.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,oe(so,o),ic(e,t,r,n),r=Mi?yi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ec(e,n,t);else if(e.tag===19)Ec(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&co(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Dc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&co(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Dc(t,!0,n,null,a,r);break;case`together`:Dc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function kc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ql|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Xi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=si(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=si(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ac(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Zi(e)))}function jc(e,t,n){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),Ki(t,aa,e.memoizedState.cache),Bi();break;case 27:case 5:I(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:Ki(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(no(t),e=kc(e,t,n),e===null?null:e.sibling):Sc(e,t,n):(no(t),t.flags|=128,null);no(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Xi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),oe(so,so.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:Ki(t,aa,e.memoizedState.cache)}return kc(e,t,n)}function Mc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)rc=!0;else{if(!Ac(e,n)&&!(t.flags&128))return rc=!1,jc(e,t,n);rc=!!(e.flags&131072)}}else rc=!1,Mi&&t.flags&1048576&&Ei(t,yi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ea(t.elementType),t.type=e,typeof e==`function`)oi(e)?(r=qs(e,r),t.tag=1,t=_c(null,t,e,r,n)):(t.tag=0,t=hc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=ac(null,t,e,r,n);break a}if(a===w){t.tag=14,t=oc(null,t,e,r,n);break a}}throw t=k(e)||e,Error(i(306,t,``))}}return t;case 0:return hc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=qs(r,t.pendingProps),_c(e,t,r,a,n);case 3:a:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ba(e,t),Ka(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ki(t,aa,r),r!==o.cache&&Yi(t,[aa],n,!0),H(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=vc(e,t,r,n);break a}if(r!==a){a=hi(Error(i(424)),t),Hi(a),t=vc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(ji=hf(e.firstChild),Ai=t,Mi=!0,Ni=null,Pi=!0,n=La(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Bi(),r===a){t=kc(e,t,n);break a}ic(e,t,r,n)}t=t.child}return t;case 26:return mc(e,t),e===null?(n=If(t.type,null,t.pendingProps,null))?t.memoizedState=n:Mi||(n=t.type,e=t.pendingProps,r=qd(P.current).createElement(n),r[tt]=t,r[nt]=e,G(r,n,e),mt(r),t.stateNode=r):t.memoizedState=If(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return I(t),e===null&&Mi&&(r=t.stateNode=yf(t.type,t.pendingProps,P.current),Ai=t,Pi=!0,a=ji,af(t.type)?(gf=a,ji=hf(r.firstChild)):ji=a),ic(e,t,t.pendingProps.children,n),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Mi&&((a=r=ji)&&(r=lf(r,t.type,t.pendingProps,Pi),r===null?a=!1:(t.stateNode=r,Ai=t,ji=hf(r.firstChild),Pi=!1,a=!0)),a||Ii(t)),I(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Xd(a,o)?r=null:s!==null&&Xd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Co(e,t,Eo,null,null,n),ap._currentValue=a),mc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&Mi&&((e=n=ji)&&(n=uf(n,t.pendingProps,Pi),n===null?e=!1:(t.stateNode=n,Ai=t,ji=null,e=!0)),e||Ii(t)),null;case 13:return Sc(e,t,n);case 4:return ue(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ia(t,null,r,n):ic(e,t,r,n),t.child;case 11:return ac(e,t,t.type,t.pendingProps,n);case 7:return ic(e,t,t.pendingProps,n),t.child;case 8:return ic(e,t,t.pendingProps.children,n),t.child;case 12:return ic(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ki(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Qi(t),a=$i(a),r=r(a),t.flags|=1,ic(e,t,r,n),t.child;case 14:return oc(e,t,t.type,t.pendingProps,n);case 15:return sc(e,t,t.type,t.pendingProps,n);case 19:return Oc(e,t,n);case 31:return pc(e,t,n);case 22:return cc(e,t,n,t.pendingProps);case 24:return Qi(t),r=$i(aa),e===null?(a=_a(),a===null&&(a=Hl,o=oa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},za(t),Ki(t,aa,a)):((e.lanes&n)!==0&&(Ba(e,t),Ka(t,null,null,n),H()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ki(t,aa,r),r!==a.cache&&Yi(t,[aa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ki(t,aa,r))),ic(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Nc(e){e.flags|=4}function Pc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(ju())e.flags|=8192;else throw Da=Ca,xa}}else e.flags&=-16777217}function Fc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Zf(t)){if(ju())e.flags|=8192;else throw Da=Ca,xa}}function Ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ue(),e.lanes|=t,nu|=t)}function Lc(e,t){if(!Mi)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Rc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function zc(e,t,n){var r=t.pendingProps;switch(Oi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rc(t),null;case 1:return Rc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),qi(aa),F(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zi(t)?Nc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Vi())),Rc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Nc(t),o===null?(Rc(t),Pc(t,a,null,r,n)):(Rc(t),Fc(t,o))):o?o===e.memoizedState?(Rc(t),t.flags&=-16777217):(Nc(t),Rc(t),Fc(t,o)):(e=e.memoizedProps,e!==r&&Nc(t),Rc(t),Pc(t,a,e,r,n)),null;case 27:if(de(t),n=P.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}e=se.current,zi(t)?Li(t,e):(e=yf(a,r,n),t.stateNode=e,Nc(t))}return Rc(t),null;case 5:if(de(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}if(o=se.current,zi(t))Li(t,o);else{var s=qd(P.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[tt]=t,o[nt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(G(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Nc(t)}}return Rc(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=P.current,zi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ai,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[tt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Bd(e.nodeValue,n)),e||Ii(t,!0)}else e=qd(e).createTextNode(r),e[tt]=t,t.stateNode=e}return Rc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=zi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[tt]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),e=!1}else n=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(oo(t),t):(oo(t),null);if(t.flags&128)throw Error(i(558))}return Rc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=zi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[tt]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),a=!1}else a=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(oo(t),t):(oo(t),null)}return oo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ic(t,t.updateQueue),Rc(t),null);case 4:return F(),e===null&&Ad(t.stateNode.containerInfo),Rc(t),null;case 10:return qi(t.type),Rc(t),null;case 19:if(N(so),r=t.memoizedState,r===null)return Rc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Lc(r,!1);else{if(Zl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=co(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ci(n,e),n=n.sibling;return oe(so,so.current&1|2),Mi&&Ti(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&B()>cu&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=co(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Mi)return Rc(t),null}else 2*B()-r.renderingStartTime>cu&&n!==536870912&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Rc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=B(),e.sibling=null,n=so.current,oe(so,a?n&1|2:n&1),Mi&&Ti(t,r.treeForkCount),e);case 22:case 23:return oo(t),$a(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Rc(t),t.subtreeFlags&6&&(t.flags|=8192)):Rc(t),n=t.updateQueue,n!==null&&Ic(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&N(ga),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),qi(aa),Rc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Bc(e,t){switch(Oi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qi(aa),F(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(oo(t),t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(oo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return N(so),null;case 4:return F(),null;case 10:return qi(t.type),null;case 22:case 23:return oo(t),$a(),e!==null&&N(ga),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return qi(aa),null;case 25:return null;default:return null}}function Vc(e,t){switch(Oi(t),t.tag){case 3:qi(aa),F();break;case 26:case 27:case 5:de(t);break;case 4:F();break;case 31:t.memoizedState!==null&&oo(t);break;case 13:oo(t);break;case 19:N(so);break;case 10:qi(t.type);break;case 22:case 23:oo(t),$a(),e!==null&&N(ga);break;case 24:qi(aa)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Qu(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Qu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Qu(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ja(t,n)}catch(t){Qu(e,e.return,t)}}}function Gc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Qu(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Qu(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Qu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Qu(e,t,n)}else n.current=null}}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Qu(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Ud(r,e.type,n,t),r[nt]=t}catch(t){Qu(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&af(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&af(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Jt));else if(r!==4&&(r===27&&af(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&af(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);G(t,r,n),t[tt]=e,t[nt]=n}catch(t){Qu(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,K=mp,e=Sr(e),Cr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Kd={focusedElem:e,selectionRange:n},mp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=qs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Qu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)cf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:cf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Sl(e,n),r&4&&Hc(5,n);break;case 1:if(Sl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Qu(n,n.return,e)}else{var i=qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Qu(n,n.return,e)}}}r&64&&Wc(n),r&512&&Kc(n,n.return);break;case 3:if(Sl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ja(e,t)}catch(e){Qu(n,n.return,e)}}break;case 27:t===null&&r&4&&el(n);case 26:case 5:Sl(e,n),t===null&&r&4&&Jc(n),r&512&&Kc(n,n.return);break;case 12:Sl(e,n);break;case 31:Sl(e,n),r&4&&pl(e,n);break;case 13:Sl(e,n),r&4&&ml(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=nd.bind(null,n),mf(e,n))));break;case 22:if(r=n.memoizedState!==null||tl,!r){t=t!==null&&t.memoizedState!==null||nl,i=tl;var a=nl;tl=r,(nl=t)&&!a?wl(e,n,!!(n.subtreeFlags&8772)):Sl(e,n),tl=i,nl=a}break;case 30:break;default:Sl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&<(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ll=null,ul=!1;function dl(e,t,n){for(n=n.child;n!==null;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(V&&typeof V.onCommitFiberUnmount==`function`)try{V.onCommitFiberUnmount(Ae,n)}catch{}switch(n.tag){case 26:nl||qc(n,t),dl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nl||qc(n,t);var r=ll,i=ul;af(n.type)&&(ll=n.stateNode,ul=!1),dl(e,t,n),bf(n.stateNode),ll=r,ul=i;break;case 5:nl||qc(n,t);case 6:if(r=ll,i=ul,ll=null,dl(e,t,n),ll=r,ul=i,ll!==null){if(ul)try{(ll.nodeType===9?ll.body:ll.nodeName===`HTML`?ll.ownerDocument.body:ll).removeChild(n.stateNode)}catch(e){Qu(n,t,e)}else try{ll.removeChild(n.stateNode)}catch(e){Qu(n,t,e)}}break;case 18:ll!==null&&(ul?(e=ll,of(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Bp(e)):of(ll,n.stateNode));break;case 4:r=ll,i=ul,ll=n.stateNode.containerInfo,ul=!0,dl(e,t,n),ll=r,ul=i;break;case 0:case 11:case 14:case 15:Uc(2,n,t),nl||Uc(4,n,t),dl(e,t,n);break;case 1:nl||(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Gc(n,t,r)),dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:nl=(r=nl)||n.memoizedState!==null,dl(e,t,n),nl=r;break;default:dl(e,t,n)}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Bp(e)}catch(e){Qu(t,t.return,e)}}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Bp(e)}catch(e){Qu(t,t.return,e)}}function hl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(i(435,e.tag))}}function gl(e,t){var n=hl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=rd.bind(null,e,t);t.then(r,r)}})}function _l(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(af(c.type)){ll=c.stateNode,ul=!1;break a}break;case 5:ll=c.stateNode,ul=!1;break a;case 3:case 4:ll=c.stateNode.containerInfo,ul=!0;break a}c=c.return}if(ll===null)throw Error(i(160));fl(o,s,a),ll=null,ul=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yl(t,e),t=t.sibling}var vl=null;function yl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_l(t,e),bl(e),r&4&&(Uc(3,e,e.return),Hc(3,e),Uc(5,e,e.return));break;case 1:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&64&&tl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=vl;if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ct]||o[tt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),G(o,r,n),o[tt]=e,mt(o),r=o;break a;case`link`:var s=Jf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),G(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Jf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),G(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[tt]=e,mt(o),r=o}e.stateNode=r}else Yf(a,e.type,e.stateNode)}else e.stateNode=Uf(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Yf(a,e.type,e.stateNode):Uf(a,r,e.memoizedProps))}break;case 27:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),n!==null&&r&4&&Yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),e.flags&32){a=e.stateNode;try{Bt(a,``)}catch(t){Qu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Yc(e,a,n===null?a:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(_l(t,e),bl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Qu(e,e.return,t)}}break;case 3:if(qf=null,a=vl,vl=Cf(t.containerInfo),_l(t,e),vl=a,bl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Bp(t.containerInfo)}catch(t){Qu(e,e.return,t)}rl&&(rl=!1,xl(e));break;case 4:r=vl,vl=Cf(e.stateNode.containerInfo),_l(t,e),bl(e),vl=r;break;case 12:_l(t,e),bl(e);break;case 31:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 13:_l(t,e),bl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ou=B()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=tl,d=nl;if(tl=u||a,nl=d||l,_l(t,e),nl=d,tl=u,bl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||tl||nl||Cl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Qu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Qu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?sf(m,!0):sf(l.stateNode,!1)}catch(e){Qu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,gl(e,n))));break;case 19:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 30:break;case 21:break;default:_l(t,e),bl(e)}}function bl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Xc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;$c(e,Zc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Bt(o,``),n.flags&=-33),$c(e,Zc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Qc(e,Zc(e),s);break;default:throw Error(i(161))}}catch(t){Qu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Cl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Uc(4,t,t.return),Cl(t);break;case 1:qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Gc(t,t.return,n),Cl(t);break;case 27:bf(t.stateNode);case 26:case 5:qc(t,t.return),Cl(t);break;case 22:t.memoizedState===null&&Cl(t);break;case 30:Cl(t);break;default:Cl(t)}e=e.sibling}}function wl(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:wl(i,a,n),Hc(4,a);break;case 1:if(wl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Qu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)qa(c[i],s)}catch(e){Qu(r,r.return,e)}}n&&o&64&&Wc(a),Kc(a,a.return);break;case 27:el(a);case 26:case 5:wl(i,a,n),n&&r===null&&o&4&&Jc(a),Kc(a,a.return);break;case 12:wl(i,a,n);break;case 31:wl(i,a,n),n&&o&4&&pl(i,a);break;case 13:wl(i,a,n),n&&o&4&&ml(i,a);break;case 22:a.memoizedState===null&&wl(i,a,n),Kc(a,a.return);break;case 30:break;default:wl(i,a,n)}t=t.sibling}}function Tl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&sa(n))}function El(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e))}function Dl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ol(e,t,n,r),t=t.sibling}function Ol(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Dl(e,t,n,r),i&2048&&Hc(9,t);break;case 1:Dl(e,t,n,r);break;case 3:Dl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e)));break;case 12:if(i&2048){Dl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Qu(t,t.return,e)}}else Dl(e,t,n,r);break;case 31:Dl(e,t,n,r);break;case 13:Dl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Dl(e,t,n,r):(a._visibility|=2,kl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?Dl(e,t,n,r):Al(e,t),i&2048&&Tl(o,t);break;case 24:Dl(e,t,n,r),i&2048&&El(t.alternate,t);break;default:Dl(e,t,n,r)}}function kl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:kl(a,o,s,c,i),Hc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,kl(a,o,s,c,i)):u._visibility&2?kl(a,o,s,c,i):Al(a,o),i&&l&2048&&Tl(o.alternate,o);break;case 24:kl(a,o,s,c,i),i&&l&2048&&El(o.alternate,o);break;default:kl(a,o,s,c,i)}t=t.sibling}}function Al(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Al(n,r),i&2048&&Tl(r.alternate,r);break;case 24:Al(n,r),i&2048&&El(r.alternate,r);break;default:Al(n,r)}t=t.sibling}}var jl=8192;function Ml(e,t,n){if(e.subtreeFlags&jl)for(e=e.child;e!==null;)Nl(e,t,n),e=e.sibling}function Nl(e,t,n){switch(e.tag){case 26:Ml(e,t,n),e.flags&jl&&e.memoizedState!==null&&Qf(n,vl,e.memoizedState,e.memoizedProps);break;case 5:Ml(e,t,n);break;case 3:case 4:var r=vl;vl=Cf(e.stateNode.containerInfo),Ml(e,t,n),vl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=jl,jl=16777216,Ml(e,t,n),jl=r):Ml(e,t,n));break;default:Ml(e,t,n)}}function Pl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Il(e),e=e.sibling}function Il(e){switch(e.tag){case 0:case 11:case 15:Fl(e),e.flags&2048&&Uc(9,e,e.return);break;case 3:Fl(e);break;case 12:Fl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ll(e)):Fl(e);break;default:Fl(e)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Uc(8,t,t.return),Ll(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ll(t));break;default:Ll(t)}e=e.sibling}}function Rl(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:Uc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:sa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var zl={getCacheForType:function(e){var t=$i(aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return $i(aa).controller.signal}},Bl=typeof WeakMap==`function`?WeakMap:Map,Vl=0,Hl=null,Ul=null,Wl=0,Gl=0,Kl=null,ql=!1,Jl=!1,Yl=!1,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=null,iu=null,au=!1,ou=0,su=0,cu=1/0,lu=null,uu=null,du=0,fu=null,pu=null,mu=0,hu=0,gu=null,_u=null,vu=0,yu=null;function bu(){return Vl&2&&Wl!==0?Wl&-Wl:j.T===null?Qe():vd()}function xu(){if(tu===0){if(!(Wl&536870912)||Mi){var e=Le;Le<<=1,!(Le&3932160)&&(Le=262144),tu=e}else tu=536870912}return e=eo.current,e!==null&&(e.flags|=32),tu}function Su(e,t,n){(e===Hl&&(Gl===2||Gl===9)||e.cancelPendingCommit!==null)&&(ku(e,0),Eu(e,Wl,tu,!1)),Ge(e,n),(!(Vl&2)||e!==Hl)&&(e===Hl&&(!(Vl&2)&&($l|=n),Zl===4&&Eu(e,Wl,tu,!1)),ud(e))}function Cu(e,t,n){if(Vl&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||Ve(e,t),a=r?Lu(e,t):Fu(e,t,!0),o=r;do{if(a===0){Jl&&!r&&Eu(e,t,0,!1);break}if(n=e.current.alternate,o&&!Tu(n)){a=Fu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ru;var l=c.current.memoizedState.isDehydrated;if(l&&(ku(c,s).flags|=256),s=Fu(c,s,!1),s!==2){if(Yl&&!l){c.errorRecoveryDisabledLanes|=o,$l|=o,a=4;break a}o=iu,iu=a,o!==null&&(iu===null?iu=o:iu.push.apply(iu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){ku(e,0),Eu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Eu(r,t,tu,!ql);break a;case 2:iu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=ou+300-B(),10<a)){if(Eu(r,t,tu,!ql),Be(r,0,!0)!==0)break a;mu=t,r.timeoutHandle=$d(wu.bind(null,r,n,iu,lu,au,t,tu,$l,nu,ql,o,`Throttled`,-0,0),a);break a}wu(r,n,iu,lu,au,t,tu,$l,nu,ql,o,null,-0,0)}break}while(1);ud(e)}function wu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Jt},Nl(t,a,d);var m=(a&62914560)===a?ou-B():(a&4194048)===a?su-B():0;if(m=ep(d,m),m!==null){mu=a,e.cancelPendingCommit=m(Wu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Eu(e,a,o,!l);return}}Wu(e,t,a,n,r,i,o,s,c)}function Tu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!_r(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Eu(e,t,n,r){t&=~eu,t&=~$l,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Me(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&qe(e,n,t)}function Du(){return Vl&6?!0:(dd(0,!1),!1)}function Ou(){if(Ul!==null){if(Gl===0)var e=Ul.return;else e=Ul,Gi=Wi=null,ko(e),Aa=null,ja=0,e=Ul;for(;e!==null;)Vc(e.alternate,e),e=e.return;Ul=null}}function ku(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,ef(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),mu=0,Ou(),Hl=e,Ul=n=si(e.current,null),Wl=t,Gl=0,Kl=null,ql=!1,Jl=Ve(e,t),Yl=!1,nu=tu=eu=$l=Ql=Zl=0,iu=ru=null,au=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Me(r),a=1<<i;t|=e[i],r&=~a}return Xl=t,Zr(),n}function Au(e,t){uo=null,j.H=zs,t===ba||t===Sa?(t=Oa(),Gl=3):t===xa?(t=Oa(),Gl=4):Gl=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Kl=t,Ul===null&&(Zl=1,Xs(e,hi(t,e.current)))}function ju(){var e=eo.current;return e===null?!0:(Wl&4194048)===Wl?to===null:(Wl&62914560)===Wl||Wl&536870912?e===to:!1}function Mu(){var e=j.H;return j.H=zs,e===null?zs:e}function Nu(){var e=j.A;return j.A=zl,e}function Pu(){Zl=4,ql||(Wl&4194048)!==Wl&&eo.current!==null||(Jl=!0),!(Ql&134217727)&&!($l&134217727)||Hl===null||Eu(Hl,Wl,tu,!1)}function Fu(e,t,n){var r=Vl;Vl|=2;var i=Mu(),a=Nu();(Hl!==e||Wl!==t)&&(lu=null,ku(e,t)),t=!1;var o=Zl;a:do try{if(Gl!==0&&Ul!==null){var s=Ul,c=Kl;switch(Gl){case 8:Ou(),o=6;break a;case 3:case 2:case 9:case 6:eo.current===null&&(t=!0);var l=Gl;if(Gl=0,Kl=null,Vu(e,s,c,l),n&&Jl){o=0;break a}break;default:l=Gl,Gl=0,Kl=null,Vu(e,s,c,l)}}Iu(),o=Zl;break}catch(t){Au(e,t)}while(1);return t&&e.shellSuspendCounter++,Gi=Wi=null,Vl=r,j.H=i,j.A=a,Ul===null&&(Hl=null,Wl=0,Zr()),o}function Iu(){for(;Ul!==null;)zu(Ul)}function Lu(e,t){var n=Vl;Vl|=2;var r=Mu(),a=Nu();Hl!==e||Wl!==t?(lu=null,cu=B()+500,ku(e,t)):Jl=Ve(e,t);a:do try{if(Gl!==0&&Ul!==null){t=Ul;var o=Kl;b:switch(Gl){case 1:Gl=0,Kl=null,Vu(e,t,o,1);break;case 2:case 9:if(wa(o)){Gl=0,Kl=null,Bu(t);break}t=function(){Gl!==2&&Gl!==9||Hl!==e||(Gl=7),ud(e)},o.then(t,t);break a;case 3:Gl=7;break a;case 4:Gl=5;break a;case 7:wa(o)?(Gl=0,Kl=null,Bu(t)):(Gl=0,Kl=null,Vu(e,t,o,7));break;case 5:var s=null;switch(Ul.tag){case 26:s=Ul.memoizedState;case 5:case 27:var c=Ul;if(s?Zf(s):c.stateNode.complete){Gl=0,Kl=null;var l=c.sibling;if(l!==null)Ul=l;else{var u=c.return;u===null?Ul=null:(Ul=u,Hu(u))}break b}}Gl=0,Kl=null,Vu(e,t,o,5);break;case 6:Gl=0,Kl=null,Vu(e,t,o,6);break;case 8:Ou(),Zl=6;break a;default:throw Error(i(462))}}Ru();break}catch(t){Au(e,t)}while(1);return Gi=Wi=null,j.H=r,j.A=a,Vl=n,Ul===null?(Hl=null,Wl=0,Zr(),Zl):0}function Ru(){for(;Ul!==null&&!R();)zu(Ul)}function zu(e){var t=Mc(e.alternate,e,Xl);e.memoizedProps=e.pendingProps,t===null?Hu(e):Ul=t}function Bu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=gc(n,t,t.pendingProps,t.type,void 0,Wl);break;case 11:t=gc(n,t,t.pendingProps,t.type.render,t.ref,Wl);break;case 5:ko(t);default:Vc(n,t),t=Ul=ci(t,Xl),t=Mc(n,t,Xl)}e.memoizedProps=e.pendingProps,t===null?Hu(e):Ul=t}function Vu(e,t,n,r){Gi=Wi=null,ko(t),Aa=null,ja=0;var i=t.return;try{if(tc(e,i,t,n,Wl)){Zl=1,Xs(e,hi(n,e.current)),Ul=null;return}}catch(t){if(i!==null)throw Ul=i,t;Zl=1,Xs(e,hi(n,e.current)),Ul=null;return}t.flags&32768?(Mi||r===1?e=!0:Jl||Wl&536870912?e=!1:(ql=e=!0,(r===2||r===9||r===3||r===6)&&(r=eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Uu(t,e)):Hu(t)}function Hu(e){var t=e;do{if(t.flags&32768){Uu(t,ql);return}e=t.return;var n=zc(t.alternate,t,Xl);if(n!==null){Ul=n;return}if(t=t.sibling,t!==null){Ul=t;return}Ul=t=e}while(t!==null);Zl===0&&(Zl=5)}function Uu(e,t){do{var n=Bc(e.alternate,e);if(n!==null){n.flags&=32767,Ul=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ul=e;return}Ul=e=n}while(e!==null);Zl=6,Ul=null}function Wu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Yu();while(du!==0);if(Vl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Xr,Ke(e,n,o,s,c,l),e===Hl&&(Ul=Hl=null,Wl=0),pu=t,fu=e,mu=n,hu=o,gu=a,_u=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,id(Te,function(){return Xu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=j.T,j.T=null,a=M.p,M.p=2,s=Vl,Vl|=4;try{ol(e,t,n)}finally{Vl=s,M.p=a,j.T=r}}du=1,Gu(),Ku(),qu()}}function Gu(){if(du===1){du=0;var e=fu,t=pu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=Vl;Vl|=4;try{yl(t,e);var a=Kd,o=Sr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&xr(s.ownerDocument.documentElement,s)){if(c!==null&&Cr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=br(s,h),v=br(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}mp=!!K,Kd=K=null}finally{Vl=i,M.p=r,j.T=n}}e.current=t,du=2}}function Ku(){if(du===2){du=0;var e=fu,t=pu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=Vl;Vl|=4;try{sl(e,t.alternate,t)}finally{Vl=i,M.p=r,j.T=n}}du=3}}function qu(){if(du===4||du===3){du=0,z();var e=fu,t=pu,n=mu,r=_u;t.subtreeFlags&10256||t.flags&10256?du=5:(du=0,pu=fu=null,Ju(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(uu=null),Ze(n),t=t.stateNode,V&&typeof V.onCommitFiberRoot==`function`)try{V.onCommitFiberRoot(Ae,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=j.T,i=M.p,M.p=2,j.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{j.T=t,M.p=i}}mu&3&&Yu(),ud(e),i=e.pendingLanes,n&261930&&i&42?e===yu?vu++:(vu=0,yu=e):vu=0,dd(0,!1)}}function Ju(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,sa(t)))}function Yu(){return Gu(),Ku(),qu(),Xu()}function Xu(){if(du!==5)return!1;var e=fu,t=hu;hu=0;var n=Ze(mu),r=j.T,a=M.p;try{M.p=32>n?32:n,j.T=null,n=gu,gu=null;var o=fu,s=mu;if(du=0,pu=fu=null,mu=0,Vl&6)throw Error(i(331));var c=Vl;if(Vl|=4,Il(o.current),Ol(o,o.current,s,n),Vl=c,dd(0,!1),V&&typeof V.onPostCommitFiberRoot==`function`)try{V.onPostCommitFiberRoot(Ae,o)}catch{}return!0}finally{M.p=a,j.T=r,Ju(e,t)}}function Zu(e,t,n){t=hi(n,t),t=Qs(e.stateNode,t,2),e=Ha(e,t,2),e!==null&&(Ge(e,2),ud(e))}function Qu(e,t,n){if(e.tag===3)Zu(e,e,n);else for(;t!==null;){if(t.tag===3){Zu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(uu===null||!uu.has(r))){e=hi(n,e),n=$s(2),r=Ha(t,n,2),r!==null&&(ec(n,r,t,e),Ge(r,2),ud(r));break}}t=t.return}}function $u(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Bl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Yl=!0,i.add(n),e=ed.bind(null,e,t,n),t.then(e,e))}function ed(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Hl===e&&(Wl&n)===n&&(Zl===4||Zl===3&&(Wl&62914560)===Wl&&300>B()-ou?!(Vl&2)&&ku(e,0):eu|=n,nu===Wl&&(nu=0)),ud(e)}function td(e,t){t===0&&(t=Ue()),e=ei(e,t),e!==null&&(Ge(e,t),ud(e))}function nd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),td(e,n)}function rd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),td(e,n)}function id(e,t){return be(e,t)}var ad=null,od=null,sd=!1,cd=!1,W=!1,ld=0;function ud(e){e!==od&&e.next===null&&(od===null?ad=od=e:od=od.next=e),cd=!0,sd||(sd=!0,_d())}function dd(e,t){if(!W&&cd){W=!0;do for(var n=!1,r=ad;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Me(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,gd(r,a))}else a=Wl,a=Be(r,r===Hl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ve(r,a)||(n=!0,gd(r,a))}r=r.next}while(n);W=!1}}function fd(){pd()}function pd(){cd=sd=!1;var e=0;ld!==0&&Qd()&&(e=ld);for(var t=B(),n=null,r=ad;r!==null;){var i=r.next,a=md(r,t);a===0?(r.next=null,n===null?ad=i:n.next=i,i===null&&(od=n)):(n=r,(e!==0||a&3)&&(cd=!0)),r=i}du!==0&&du!==5||dd(e,!1),ld!==0&&(ld=0)}function md(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Me(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=He(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Hl,n=Wl,n=Be(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Gl===2||Gl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&xe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ve(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&xe(r),Ze(n)){case 2:case 8:n=we;break;case 32:n=Te;break;case 268435456:n=De;break;default:n=Te}return r=hd.bind(null,e),n=be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&xe(r),e.callbackPriority=2,e.callbackNode=null,2}function hd(e,t){if(du!==0&&du!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Yu()&&e.callbackNode!==n)return null;var r=Wl;return r=Be(e,e===Hl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Cu(e,r,t),md(e,B()),e.callbackNode!=null&&e.callbackNode===n?hd.bind(null,e):null)}function gd(e,t){if(Yu())return null;Cu(e,t,!0)}function _d(){nf(function(){Vl&6?be(Ce,fd):pd()})}function vd(){if(ld===0){var e=ua;e===0&&(e=Ie,Ie<<=1,!(Ie&261888)&&(Ie=256)),ld=e}return ld}function yd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:qt(``+e)}function bd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function xd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=yd((i[nt]||null).action),o=r.submitter;o&&(t=(t=o[nt]||null)?yd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new gn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ld!==0){var e=o?bd(i,o):new FormData(i);Ts(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?bd(i,o):new FormData(i),Ts(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Sd=0;Sd<Gr.length;Sd++){var Cd=Gr[Sd];Kr(Cd.toLowerCase(),`on`+(Cd[0].toUpperCase()+Cd.slice(1)))}Kr(Lr,`onAnimationEnd`),Kr(Rr,`onAnimationIteration`),Kr(zr,`onAnimationStart`),Kr(`dblclick`,`onDoubleClick`),Kr(`focusin`,`onFocus`),Kr(`focusout`,`onBlur`),Kr(Br,`onTransitionRun`),Kr(Vr,`onTransitionStart`),Kr(Hr,`onTransitionCancel`),Kr(Ur,`onTransitionEnd`),vt(`onMouseEnter`,[`mouseout`,`mouseover`]),vt(`onMouseLeave`,[`mouseout`,`mouseover`]),vt(`onPointerEnter`,[`pointerout`,`pointerover`]),vt(`onPointerLeave`,[`pointerout`,`pointerover`]),_t(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),_t(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),_t(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),_t(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),_t(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),_t(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var wd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Td=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(wd));function Ed(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){qr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){qr(e)}i.currentTarget=null,a=c}}}}function Dd(e,t){var n=t[it];n===void 0&&(n=t[it]=new Set);var r=e+`__bubble`;n.has(r)||(jd(t,e,2,!1),n.add(r))}function Od(e,t,n){var r=0;t&&(r|=4),jd(n,e,r,t)}var kd=`_reactListening`+Math.random().toString(36).slice(2);function Ad(e){if(!e[kd]){e[kd]=!0,ht.forEach(function(t){t!==`selectionchange`&&(Td.has(t)||Od(t,!1,e),Od(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kd]||(t[kd]=!0,Od(`selectionchange`,!1,t))}}function jd(e,t,n,r){switch(xp(t)){case 2:var i=hp;break;case 8:i=gp;break;default:i=_p}n=i.bind(null,t,n,e),i=void 0,!an||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Md(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=ut(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}tn(function(){var r=a,i=Xt(n),s=[];a:{var c=Wr.get(e);if(c!==void 0){var l=gn,u=e;switch(e){case`keypress`:if(dn(n)===0)break a;case`keydown`:case`keyup`:l=Pn;break;case`focusin`:u=`focus`,l=Tn;break;case`focusout`:u=`blur`,l=Tn;break;case`beforeblur`:case`afterblur`:l=Tn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Cn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=wn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=In;break;case Lr:case Rr:case zr:l=En;break;case Ur:l=Ln;break;case`scroll`:case`scrollend`:l=vn;break;case`wheel`:l=Rn;break;case`copy`:case`cut`:case`paste`:l=Dn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Fn;break;case`toggle`:case`beforetoggle`:l=zn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=nn(m,p),g!=null&&d.push(Nd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Yt&&(u=n.relatedTarget||n.fromElement)&&(ut(u)||u[rt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?ut(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Cn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Fn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ft(l),h=u==null?c:ft(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ut(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Fd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Id(s,c,l,d,!1),u!==null&&f!==null&&Id(s,f,u,d,!0)}}a:{if(c=r?ft(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=ar;else if($n(c)){if(or)v=hr;else{v=pr;var y=fr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Wt(r.elementType)&&(v=ar):v=mr;if(v&&=v(e,r)){er(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&It(c,`number`,c.value)}switch(y=r?ft(r):window,e){case`focusin`:($n(y)||y.contentEditable===`true`)&&(Dr=y,Or=r,kr=null);break;case`focusout`:kr=Or=Dr=null;break;case`mousedown`:Ar=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ar=!1,jr(s,n,i);break;case`selectionchange`:if(Tr)break;case`keydown`:case`keyup`:jr(s,n,i)}var b;if(Vn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Yn?qn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Wn&&n.locale!==`ko`&&(Yn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Yn&&(b=un()):(sn=i,cn=`value`in sn?sn.value:sn.textContent,Yn=!0)),y=Pd(r,x),0<y.length&&(x=new On(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Jn(n),b!==null&&(x.data=b)))),(b=Un?Xn(e,n):Zn(e,n))&&(x=Pd(r,`onBeforeInput`),0<x.length&&(y=new On(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),xd(s,e,r,n,i)}Ed(s,t)})}function Nd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Pd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=nn(e,n),i!=null&&r.unshift(Nd(e,i,a)),i=nn(e,t),i!=null&&r.push(Nd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Fd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Id(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=nn(n,a),l!=null&&o.unshift(Nd(n,l,c))):i||(l=nn(n,a),l!=null&&o.push(Nd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ld=/\r\n?/g,Rd=/\u0000|\uFFFD/g;function zd(e){return(typeof e==`string`?e:``+e).replace(Ld,`
|
|
30
|
+
`).replace(Rd,``)}function Bd(e,t){return t=zd(t),zd(e)===t}function Vd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Bt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Bt(e,``+r);break;case`className`:wt(e,`class`,r);break;case`tabIndex`:wt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:wt(e,n,r);break;case`style`:Ut(e,r,o);break;case`data`:if(t!==`object`){wt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=qt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Vd(e,t,`name`,a.name,a,null),Vd(e,t,`formEncType`,a.formEncType,a,null),Vd(e,t,`formMethod`,a.formMethod,a,null),Vd(e,t,`formTarget`,a.formTarget,a,null)):(Vd(e,t,`encType`,a.encType,a,null),Vd(e,t,`method`,a.method,a,null),Vd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=qt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Jt);break;case`onScroll`:r!=null&&Dd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Dd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=qt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Dd(`beforetoggle`,e),Dd(`toggle`,e),Ct(e,`popover`,r);break;case`xlinkActuate`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Tt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Tt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Tt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ct(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Gt.get(n)||n,Ct(e,n,r))}}function Hd(e,t,n,r,a,o){switch(n){case`style`:Ut(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Bt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Bt(e,``+r);break;case`onScroll`:r!=null&&Dd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Dd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Jt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!gt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[nt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Ct(e,n,r)}}}function G(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Dd(`error`,e),Dd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Vd(e,t,o,s,n,null)}}a&&Vd(e,t,`srcSet`,n.srcSet,n,null),r&&Vd(e,t,`src`,n.src,n,null);return;case`input`:Dd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Vd(e,t,r,d,n,null)}}Ft(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Dd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Vd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Lt(e,!!r,n,!0):Lt(e,!!r,t,!1);return;case`textarea`:for(s in Dd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Vd(e,t,s,c,n,null)}zt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Vd(e,t,l,r,n,null)}return;case`dialog`:Dd(`beforetoggle`,e),Dd(`toggle`,e),Dd(`cancel`,e),Dd(`close`,e);break;case`iframe`:case`object`:Dd(`load`,e);break;case`video`:case`audio`:for(r=0;r<wd.length;r++)Dd(wd[r],e);break;case`image`:Dd(`error`,e),Dd(`load`,e);break;case`details`:Dd(`toggle`,e);break;case`embed`:case`source`:case`link`:Dd(`error`,e),Dd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Vd(e,t,u,r,n,null)}return;default:if(Wt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Hd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Vd(e,t,c,r,n,null))}function Ud(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Vd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Vd(e,t,p,m,r,f)}}Pt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Vd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Vd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Lt(e,!!n,n?[]:``,!1):Lt(e,!!n,t,!0)):Lt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Vd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Vd(e,t,s,a,r,o)}Rt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Vd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Vd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Vd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Vd(e,t,u,p,r,m)}return;default:if(Wt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Hd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Hd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Vd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Vd(e,t,f,p,r,m)}function Wd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Gd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Wd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Wd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var K=null,Kd=null;function qd(e){return e.nodeType===9?e:e.ownerDocument}function Jd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Yd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Xd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Zd=null;function Qd(){var e=window.event;return e&&e.type===`popstate`?e!==Zd&&(Zd=e,!0):(Zd=null,!1)}var $d=typeof setTimeout==`function`?setTimeout:void 0,ef=typeof clearTimeout==`function`?clearTimeout:void 0,tf=typeof Promise==`function`?Promise:void 0,nf=typeof queueMicrotask==`function`?queueMicrotask:tf===void 0?$d:function(e){return tf.resolve(null).then(e).catch(rf)};function rf(e){setTimeout(function(){throw e})}function af(e){return e===`head`}function of(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Bp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)bf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,bf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ct]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&bf(e.ownerDocument.body)}n=i}while(n);Bp(t)}function sf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function cf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:cf(n),lt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function lf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[ct])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=hf(e.nextSibling),e===null)break}return null}function uf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=hf(e.nextSibling),e===null))return null;return e}function df(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=hf(e.nextSibling),e===null))return null;return e}function ff(e){return e.data===`$?`||e.data===`$~`}function pf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function mf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function hf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var gf=null;function _f(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return hf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function vf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function yf(e,t,n){switch(t=qd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function bf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);lt(e)}var xf=new Map,Sf=new Set;function Cf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var wf=M.d;M.d={f:Tf,r:Ef,D:kf,C:Af,L:jf,m:Mf,X:Pf,S:Nf,M:Ff};function Tf(){var e=wf.f(),t=Du();return e||t}function Ef(e){var t=dt(e);t!==null&&t.tag===5&&t.type===`form`?Ds(t):wf.r(e)}var Df=typeof document>`u`?null:document;function Of(e,t,n){var r=Df;if(r&&typeof t==`string`&&t){var i=Nt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Sf.has(i)||(Sf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),G(t,`link`,e),mt(t),r.head.appendChild(t)))}}function kf(e){wf.D(e),Of(`dns-prefetch`,e,null)}function Af(e,t){wf.C(e,t),Of(`preconnect`,e,t)}function jf(e,t,n){wf.L(e,t,n);var r=Df;if(r&&e&&t){var i=`link[rel="preload"][as="`+Nt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Nt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Nt(n.imageSizes)+`"]`)):i+=`[href="`+Nt(e)+`"]`;var a=i;switch(t){case`style`:a=Lf(e);break;case`script`:a=Vf(e)}xf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),xf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Rf(a))||t===`script`&&r.querySelector(Hf(a))||(t=r.createElement(`link`),G(t,`link`,e),mt(t),r.head.appendChild(t)))}}function Mf(e,t){wf.m(e,t);var n=Df;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Nt(r)+`"][href="`+Nt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Vf(e)}if(!xf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),xf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Hf(a)))return}r=n.createElement(`link`),G(r,`link`,e),mt(r),n.head.appendChild(r)}}}function Nf(e,t,n){wf.S(e,t,n);var r=Df;if(r&&e){var i=pt(r).hoistableStyles,a=Lf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Rf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=xf.get(a))&&Gf(e,n);var c=o=r.createElement(`link`);mt(c),G(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Wf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Pf(e,t){wf.X(e,t);var n=Df;if(n&&e){var r=pt(n).hoistableScripts,i=Vf(e),a=r.get(i);a||(a=n.querySelector(Hf(i)),a||(e=f({src:e,async:!0},t),(t=xf.get(i))&&Kf(e,t),a=n.createElement(`script`),mt(a),G(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Ff(e,t){wf.M(e,t);var n=Df;if(n&&e){var r=pt(n).hoistableScripts,i=Vf(e),a=r.get(i);a||(a=n.querySelector(Hf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=xf.get(i))&&Kf(e,t),a=n.createElement(`script`),mt(a),G(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function If(e,t,n,r){var a=(a=P.current)?Cf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Lf(n.href),n=pt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Lf(n.href);var o=pt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Rf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),xf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},xf.set(e,n),o||Bf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Vf(n),n=pt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Lf(e){return`href="`+Nt(e)+`"`}function Rf(e){return`link[rel="stylesheet"][`+e+`]`}function zf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Bf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),G(t,`link`,n),mt(t),e.head.appendChild(t))}function Vf(e){return`[src="`+Nt(e)+`"]`}function Hf(e){return`script[async]`+e}function Uf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Nt(n.href)+`"]`);if(r)return t.instance=r,mt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),mt(r),G(r,`style`,a),Wf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Lf(n.href);var o=e.querySelector(Rf(a));if(o)return t.state.loading|=4,t.instance=o,mt(o),o;r=zf(n),(a=xf.get(a))&&Gf(r,a),o=(e.ownerDocument||e).createElement(`link`),mt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),G(o,`link`,r),t.state.loading|=4,Wf(o,n.precedence,e),t.instance=o;case`script`:return o=Vf(n.src),(a=e.querySelector(Hf(o)))?(t.instance=a,mt(a),a):(r=n,(a=xf.get(o))&&(r=f({},n),Kf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),mt(a),G(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Wf(r,n.precedence,e));return t.instance}function Wf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Gf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Kf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var qf=null;function Jf(e,t,n){if(qf===null){var r=new Map,i=qf=new Map;i.set(n,r)}else i=qf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ct]||a[tt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Yf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Xf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Zf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Qf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Lf(r.href),a=t.querySelector(Rf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=tp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,mt(a);return}a=t.ownerDocument||t,r=zf(r),(i=xf.get(i))&&Gf(r,i),a=a.createElement(`link`),mt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),G(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=tp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $f=0;function ep(e,t){return e.stylesheets&&e.count===0&&rp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&rp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$f===0&&($f=62500*Gd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&rp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$f?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function tp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)rp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var np=null;function rp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,np=new Map,t.forEach(ip,e),np=null,tp.call(e))}function ip(e,t){if(!(t.state.loading&4)){var n=np.get(e);if(n)var r=n.get(null);else{n=new Map,np.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=tp.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ap={$$typeof:b,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function op(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=We(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=We(0),this.hiddenUpdates=We(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function sp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new op(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ai(3,null,null,t),e.current=a,a.stateNode=e,t=oa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},za(a),e}function cp(e){return e?(e=ri,e):ri}function lp(e,t,n,r,i,a){i=cp(i),r.context===null?r.context=i:r.pendingContext=i,r=Va(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ha(e,r,t),n!==null&&(Su(n,e,t),Ua(n,e,t))}function up(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function dp(e,t){up(e,t),(e=e.alternate)&&up(e,t)}function fp(e){if(e.tag===13||e.tag===31){var t=ei(e,67108864);t!==null&&Su(t,e,67108864),dp(e,67108864)}}function pp(e){if(e.tag===13||e.tag===31){var t=bu();t=Xe(t);var n=ei(e,t);n!==null&&Su(n,e,t),dp(e,t)}}var mp=!0;function hp(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=2,_p(e,t,n,r)}finally{M.p=a,j.T=i}}function gp(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=8,_p(e,t,n,r)}finally{M.p=a,j.T=i}}function _p(e,t,n,r){if(mp){var i=vp(r);if(i===null)Md(e,t,r,yp,n),Ap(e,r);else if(Mp(i,e,t,n,r))r.stopPropagation();else if(Ap(e,r),t&4&&-1<kp.indexOf(e)){for(;i!==null;){var a=dt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ze(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Me(o);s.entanglements[1]|=c,o&=~c}ud(a),!(Vl&6)&&(cu=B()+500,dd(0,!1))}}break;case 31:case 13:s=ei(a,2),s!==null&&Su(s,a,2),Du(),dp(a,2)}if(a=vp(r),a===null&&Md(e,t,r,yp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Md(e,t,r,null,n)}}function vp(e){return e=Xt(e),bp(e)}var yp=null;function bp(e){if(yp=null,e=ut(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return yp=e,null}function xp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Se()){case Ce:return 2;case we:return 8;case Te:case Ee:return 32;case De:return 268435456;default:return 32}default:return 32}}var Sp=!1,Cp=null,wp=null,Tp=null,Ep=new Map,Dp=new Map,Op=[],kp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Ap(e,t){switch(e){case`focusin`:case`focusout`:Cp=null;break;case`dragenter`:case`dragleave`:wp=null;break;case`mouseover`:case`mouseout`:Tp=null;break;case`pointerover`:case`pointerout`:Ep.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Dp.delete(t.pointerId)}}function jp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=dt(t),t!==null&&fp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Mp(e,t,n,r,i){switch(t){case`focusin`:return Cp=jp(Cp,e,t,n,r,i),!0;case`dragenter`:return wp=jp(wp,e,t,n,r,i),!0;case`mouseover`:return Tp=jp(Tp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ep.set(a,jp(Ep.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Dp.set(a,jp(Dp.get(a)||null,e,t,n,r,i)),!0}return!1}function Np(e){var t=ut(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,$e(e.priority,function(){pp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,$e(e.priority,function(){pp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Pp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=vp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Yt=r,n.target.dispatchEvent(r),Yt=null}else return t=dt(n),t!==null&&fp(t),e.blockedOn=n,!1;t.shift()}return!0}function Fp(e,t,n){Pp(e)&&n.delete(t)}function Ip(){Sp=!1,Cp!==null&&Pp(Cp)&&(Cp=null),wp!==null&&Pp(wp)&&(wp=null),Tp!==null&&Pp(Tp)&&(Tp=null),Ep.forEach(Fp),Dp.forEach(Fp)}function Lp(e,n){e.blockedOn===n&&(e.blockedOn=null,Sp||(Sp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ip)))}var Rp=null;function zp(e){Rp!==e&&(Rp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Rp===e&&(Rp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(bp(r||n)===null)continue;break}var a=dt(n);a!==null&&(e.splice(t,3),t-=3,Ts(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Bp(e){function t(t){return Lp(t,e)}Cp!==null&&Lp(Cp,e),wp!==null&&Lp(wp,e),Tp!==null&&Lp(Tp,e),Ep.forEach(t),Dp.forEach(t);for(var n=0;n<Op.length;n++){var r=Op[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Op.length&&(n=Op[0],n.blockedOn===null);)Np(n),n.blockedOn===null&&Op.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[nt]||null;if(typeof a==`function`)o||zp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[nt]||null)s=o.formAction;else if(bp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),zp(n)}}}function Vp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Hp(e){this._internalRoot=e}Up.prototype.render=Hp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;lp(n,bu(),e,t,null,null)},Up.prototype.unmount=Hp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;lp(e.current,2,null,e,null,null),Du(),t[rt]=null}};function Up(e){this._internalRoot=e}Up.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Op.length&&t!==0&&t<Op[n].priority;n++);Op.splice(n,0,e),n===0&&Np(e)}};var Wp=n.version;if(Wp!==`19.2.8`)throw Error(i(527,Wp,`19.2.8`));M.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Gp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:j,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Kp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kp.isDisabled&&Kp.supportsFiber)try{Ae=Kp.inject(Gp),V=Kp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Js,s=U,c=Ys;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=sp(e,1,!1,null,null,n,r,null,o,s,c,Vp),e[rt]=t.current,Ad(e),new Hp(t)}})),Or=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Dr()})),kr={black:`#000`,white:`#fff`},Ar={50:`#ffebee`,100:`#ffcdd2`,200:`#ef9a9a`,300:`#e57373`,400:`#ef5350`,500:`#f44336`,600:`#e53935`,700:`#d32f2f`,800:`#c62828`,900:`#b71c1c`,A100:`#ff8a80`,A200:`#ff5252`,A400:`#ff1744`,A700:`#d50000`},jr={50:`#f3e5f5`,100:`#e1bee7`,200:`#ce93d8`,300:`#ba68c8`,400:`#ab47bc`,500:`#9c27b0`,600:`#8e24aa`,700:`#7b1fa2`,800:`#6a1b9a`,900:`#4a148c`,A100:`#ea80fc`,A200:`#e040fb`,A400:`#d500f9`,A700:`#aa00ff`},Mr={50:`#e3f2fd`,100:`#bbdefb`,200:`#90caf9`,300:`#64b5f6`,400:`#42a5f5`,500:`#2196f3`,600:`#1e88e5`,700:`#1976d2`,800:`#1565c0`,900:`#0d47a1`,A100:`#82b1ff`,A200:`#448aff`,A400:`#2979ff`,A700:`#2962ff`},Nr={50:`#e1f5fe`,100:`#b3e5fc`,200:`#81d4fa`,300:`#4fc3f7`,400:`#29b6f6`,500:`#03a9f4`,600:`#039be5`,700:`#0288d1`,800:`#0277bd`,900:`#01579b`,A100:`#80d8ff`,A200:`#40c4ff`,A400:`#00b0ff`,A700:`#0091ea`},Pr={50:`#e8f5e9`,100:`#c8e6c9`,200:`#a5d6a7`,300:`#81c784`,400:`#66bb6a`,500:`#4caf50`,600:`#43a047`,700:`#388e3c`,800:`#2e7d32`,900:`#1b5e20`,A100:`#b9f6ca`,A200:`#69f0ae`,A400:`#00e676`,A700:`#00c853`},Fr={50:`#fff3e0`,100:`#ffe0b2`,200:`#ffcc80`,300:`#ffb74d`,400:`#ffa726`,500:`#ff9800`,600:`#fb8c00`,700:`#f57c00`,800:`#ef6c00`,900:`#e65100`,A100:`#ffd180`,A200:`#ffab40`,A400:`#ff9100`,A700:`#ff6d00`},Ir={50:`#efebe9`,100:`#d7ccc8`,200:`#bcaaa4`,300:`#a1887f`,400:`#8d6e63`,500:`#795548`,600:`#6d4c41`,700:`#5d4037`,800:`#4e342e`,900:`#3e2723`,A100:`#d7ccc8`,A200:`#bcaaa4`,A400:`#8d6e63`,A700:`#5d4037`},Lr={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`};function Rr(e,...t){let n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append(`args[]`,e)),`Minified MUI error #${e}; visit ${n} for the full message.`}var zr=`$$material`;function Br(){return Br=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Br.apply(null,arguments)}function Vr(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Hr(e){var t=document.createElement(`style`);return t.setAttribute(`data-emotion`,e.key),e.nonce!==void 0&&t.setAttribute(`nonce`,e.nonce),t.appendChild(document.createTextNode(``)),t.setAttribute(`data-s`,``),t}var Ur=function(){function e(e){var t=this;this._insertTag=function(e){var n=t.tags.length===0?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling;t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=e.speedy===void 0||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(Hr(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=Vr(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode?.removeChild(e)}),this.tags=[],this.ctr=0},e}(),Wr=`-ms-`,Gr=`-moz-`,Kr=`-webkit-`,qr=`comm`,Jr=`rule`,Yr=`decl`,Xr=`@import`,Zr=`@keyframes`,Qr=`@layer`,$r=Math.abs,ei=String.fromCharCode,ti=Object.assign;function ni(e,t){return si(e,0)^45?(((t<<2^si(e,0))<<2^si(e,1))<<2^si(e,2))<<2^si(e,3):0}function ri(e){return e.trim()}function ii(e,t){return(e=t.exec(e))?e[0]:e}function ai(e,t,n){return e.replace(t,n)}function oi(e,t){return e.indexOf(t)}function si(e,t){return e.charCodeAt(t)|0}function ci(e,t,n){return e.slice(t,n)}function li(e){return e.length}function ui(e){return e.length}function di(e,t){return t.push(e),e}function fi(e,t){return e.map(t).join(``)}var pi=1,mi=1,hi=0,gi=0,_i=0,vi=``;function yi(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:pi,column:mi,length:o,return:``}}function bi(e,t){return ti(yi(``,null,null,``,null,null,0),e,{length:-e.length},t)}function xi(){return _i}function Si(){return _i=gi>0?si(vi,--gi):0,mi--,_i===10&&(mi=1,pi--),_i}function Ci(){return _i=gi<hi?si(vi,gi++):0,mi++,_i===10&&(mi=1,pi++),_i}function wi(){return si(vi,gi)}function Ti(){return gi}function Ei(e,t){return ci(vi,e,t)}function Di(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Oi(e){return pi=mi=1,hi=li(vi=e),gi=0,[]}function ki(e){return vi=``,e}function Ai(e){return ri(Ei(gi-1,Ni(e===91?e+2:e===40?e+1:e)))}function ji(e){for(;(_i=wi())&&_i<33;)Ci();return Di(e)>2||Di(_i)>3?``:` `}function Mi(e,t){for(;--t&&Ci()&&!(_i<48||_i>102||_i>57&&_i<65||_i>70&&_i<97););return Ei(e,Ti()+(t<6&&wi()==32&&Ci()==32))}function Ni(e){for(;Ci();)switch(_i){case e:return gi;case 34:case 39:e!==34&&e!==39&&Ni(_i);break;case 40:e===41&&Ni(e);break;case 92:Ci()}return gi}function Pi(e,t){for(;Ci()&&e+_i!==57&&(e+_i!==84||wi()!==47););return`/*`+Ei(t,gi-1)+`*`+ei(e===47?e:Ci())}function Fi(e){for(;!Di(wi());)Ci();return Ei(e,gi)}function Ii(e){return ki(Li(``,null,null,null,[``],e=Oi(e),0,[0],e))}function Li(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=Ci()){case 40:if(m!=108&&si(C,d-1)==58){oi(C+=ai(Ai(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=Ai(v);break;case 9:case 10:case 13:case 32:C+=ji(m);break;case 92:C+=Mi(Ti()-1,7);continue;case 47:switch(wi()){case 42:case 47:di(zi(Pi(Ci(),Ti()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=li(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=ai(C,/\f/g,``)),p>0&&li(C)-d&&di(p>32?Bi(C+`;`,r,n,d-1):Bi(ai(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(di(S=Ri(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123){if(u===0)Li(C,t,S,S,b,a,d,s,x);else switch(f===99&&si(C,3)===110?100:f){case 100:case 108:case 109:case 115:Li(e,S,S,r&&di(Ri(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:Li(C,S,S,S,[``],x,0,s,x)}}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+li(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&Si()==125)continue}switch(C+=ei(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(li(C)-1)*_,_=1;break;case 64:wi()===45&&(C+=Ai(Ci())),f=wi(),u=d=li(y=C+=Fi(Ti())),v++;break;case 45:m===45&&li(C)==2&&(h=0)}}return a}function Ri(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=ui(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=ci(e,d+1,d=$r(h=o[m])),y=e;_<p;++_)(y=ri(h>0?f[_]+` `+v:ai(v,/&\f/g,f[_])))&&(c[g++]=y);return yi(e,t,n,i===0?Jr:s,c,l,u)}function zi(e,t,n){return yi(e,t,n,qr,ei(xi()),ci(e,2,-2),0)}function Bi(e,t,n,r){return yi(e,t,n,Yr,ci(e,0,r),ci(e,r+1,-1),r)}function Vi(e,t){for(var n=``,r=ui(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function Hi(e,t,n,r){switch(e.type){case Qr:if(e.children.length)break;case Xr:case Yr:return e.return=e.return||e.value;case qr:return``;case Zr:return e.return=e.value+`{`+Vi(e.children,r)+`}`;case Jr:e.value=e.props.join(`,`)}return li(n=Vi(e.children,r))?e.return=e.value+`{`+n+`}`:``}function Ui(e){var t=ui(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function Wi(e){return function(t){t.root||(t=t.return)&&e(t)}}function Gi(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Ki=function(e,t,n){for(var r=0,i=0;r=i,i=wi(),r===38&&i===12&&(t[n]=1),!Di(i);)Ci();return Ei(e,gi)},qi=function(e,t){var n=-1,r=44;do switch(Di(r)){case 0:r===38&&wi()===12&&(t[n]=1),e[n]+=Ki(gi-1,t,n);break;case 2:e[n]+=Ai(r);break;case 4:if(r===44){e[++n]=wi()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=ei(r)}while(r=Ci());return e},Ji=function(e,t){return ki(qi(Oi(e),t))},Yi=new WeakMap,Xi=function(e){if(!(e.type!==`rule`||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!==`rule`;)if(n=n.parent,!n)return;if((e.props.length!==1||t.charCodeAt(0)===58||Yi.get(n))&&!r){Yi.set(e,!0);for(var i=[],a=Ji(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var l=0;l<o.length;l++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+` `+a[s]}}},Zi=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}};function Qi(e,t){switch(ni(e,t)){case 5103:return Kr+`print-`+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Kr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Kr+e+Gr+e+Wr+e+e;case 6828:case 4268:return Kr+e+Wr+e+e;case 6165:return Kr+e+Wr+`flex-`+e+e;case 5187:return Kr+e+ai(e,/(\w+).+(:[^]+)/,Kr+`box-$1$2`+Wr+`flex-$1$2`)+e;case 5443:return Kr+e+Wr+`flex-item-`+ai(e,/flex-|-self/,``)+e;case 4675:return Kr+e+Wr+`flex-line-pack`+ai(e,/align-content|flex-|-self/,``)+e;case 5548:return Kr+e+Wr+ai(e,`shrink`,`negative`)+e;case 5292:return Kr+e+Wr+ai(e,`basis`,`preferred-size`)+e;case 6060:return Kr+`box-`+ai(e,`-grow`,``)+Kr+e+Wr+ai(e,`grow`,`positive`)+e;case 4554:return Kr+ai(e,/([^-])(transform)/g,`$1`+Kr+`$2`)+e;case 6187:return ai(ai(ai(e,/(zoom-|grab)/,Kr+`$1`),/(image-set)/,Kr+`$1`),e,``)+e;case 5495:case 3959:return ai(e,/(image-set\([^]*)/,Kr+"$1$`$1");case 4968:return ai(ai(e,/(.+:)(flex-)?(.*)/,Kr+`box-pack:$3`+Wr+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+Kr+e+e;case 4095:case 3583:case 4068:case 2532:return ai(e,/(.+)-inline(.+)/,Kr+`$1$2`)+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(li(e)-1-t>6)switch(si(e,t+1)){case 109:if(si(e,t+4)!==45)break;case 102:return ai(e,/(.+:)(.+)-([^]+)/,`$1`+Kr+`$2-$3$1`+Gr+(si(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~oi(e,`stretch`)?Qi(ai(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(si(e,t+1)!==115)break;case 6444:switch(si(e,li(e)-3-(~oi(e,`!important`)&&10))){case 107:return ai(e,`:`,`:`+Kr)+e;case 101:return ai(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+Kr+(si(e,14)===45?`inline-`:``)+`box$3$1`+Kr+`$2$3$1`+Wr+`$2box$3`)+e}break;case 5936:switch(si(e,t+11)){case 114:return Kr+e+Wr+ai(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return Kr+e+Wr+ai(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return Kr+e+Wr+ai(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return Kr+e+Wr+e+e}return e}var $i=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Yr:e.return=Qi(e.value,e.length);break;case Zr:return Vi([bi(e,{value:ai(e.value,`@`,`@`+Kr)})],r);case Jr:if(e.length)return fi(e.props,function(t){switch(ii(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return Vi([bi(e,{props:[ai(t,/:(read-\w+)/,`:`+Gr+`$1`)]})],r);case`::placeholder`:return Vi([bi(e,{props:[ai(t,/:(plac\w+)/,`:`+Kr+`input-$1`)]}),bi(e,{props:[ai(t,/:(plac\w+)/,`:`+Gr+`$1`)]}),bi(e,{props:[ai(t,/:(plac\w+)/,Wr+`input-$1`)]})],r)}return``})}}],ea=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){e.getAttribute(`data-emotion`).indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||$i,i={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll(`style[data-emotion^="`+t+` "]`),function(e){for(var t=e.getAttribute(`data-emotion`).split(` `),n=1;n<t.length;n++)i[t[n]]=!0;o.push(e)});var s,c=[Xi,Zi],l,u=[Hi,Wi(function(e){l.insert(e)})],d=Ui(c.concat(r,u)),f=function(e){return Vi(Ii(e),d)};s=function(e,t,n,r){l=n,f(e?e+`{`+t.styles+`}`:t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new Ur({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(o),p},ta=o((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),na=o(((e,t)=>{t.exports=ta()})),ra=o(((e,t)=>{var n=na(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g<a.length;++g){var _=a[g];if(!i[_]&&!(n&&n[_])&&!(s&&s[_])&&!(o&&o[_])){var v=f(t,_);try{l(e,_,v)}catch{}}}}return e}t.exports=h}));function ia(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var aa=function(e,t,n){var r=e.key+`-`+t.name;n===!1&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},oa=function(e,t,n){aa(e,t,n);var r=e.key+`-`+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?`.`+r:``,i,e.sheet,!0),i=i.next;while(i!==void 0)}};function sa(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var ca={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},la=/[A-Z]|^ms/g,ua=/_EMO_([^_]+?)_([^]*?)_EMO_/g,da=function(e){return e.charCodeAt(1)===45},fa=function(e){return e!=null&&typeof e!=`boolean`},pa=Gi(function(e){return da(e)?e:e.replace(la,`-$&`).toLowerCase()}),ma=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(ua,function(e,t,n){return va={name:t,styles:n,next:va},t})}return ca[e]!==1&&!da(e)&&typeof t==`number`&&t!==0?t+`px`:t};function ha(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return va={name:i.name,styles:i.styles,next:va},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)va={name:o.name,styles:o.styles,next:va},o=o.next;return a.styles+`;`}return ga(e,t,n);case`function`:if(e!==void 0){var s=va,c=n(e);return va=s,ha(e,t,c)}}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function ga(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=ha(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:fa(s)&&(r+=pa(a)+`:`+ma(a,s)+`;`)}else if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)fa(o[c])&&(r+=pa(a)+`:`+ma(a,o[c])+`;`);else{var l=ha(e,t,o);switch(a){case`animation`:case`animationName`:r+=pa(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}return r}var _a=/label:\s*([^\s;{]+)\s*(;|$)/g,va;function ya(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;va=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=ha(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=ha(n,t,e[o]),r&&(i+=a[o]);_a.lastIndex=0;for(var s=``,c;(c=_a.exec(i))!==null;)s+=`-`+c[1];return{name:sa(i)+s,styles:i,next:va}}var ba=function(e){return e()},xa=L.useInsertionEffect?L.useInsertionEffect:!1,Sa=xa||ba,Ca=xa||L.useLayoutEffect,wa=L.createContext(typeof HTMLElement<`u`?ea({key:`css`}):null);wa.Provider;var Ta=function(e){return(0,L.forwardRef)(function(t,n){return e(t,(0,L.useContext)(wa),n)})},Ea=L.createContext({}),Da={}.hasOwnProperty,Oa=`__EMOTION_TYPE_PLEASE_DO_NOT_USE__`,ka=function(e,t){var n={};for(var r in t)Da.call(t,r)&&(n[r]=t[r]);return n[Oa]=e,n},Aa=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return aa(t,n,r),Sa(function(){return oa(t,n,r)}),null},ja=Ta(function(e,t,n){var r=e.css;typeof r==`string`&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Oa],a=[r],o=``;typeof e.className==`string`?o=ia(t.registered,a,e.className):e.className!=null&&(o=e.className+` `);var s=ya(a,void 0,L.useContext(Ea));o+=t.key+`-`+s.name;var c={};for(var l in e)Da.call(e,l)&&l!==`css`&&l!==Oa&&(c[l]=e[l]);return c.className=o,n&&(c.ref=n),L.createElement(L.Fragment,null,L.createElement(Aa,{cache:t,serialized:s,isStringTag:typeof i==`string`}),L.createElement(i,c))});ra();var Ma=function(e,t){var n=arguments;if(t==null||!Da.call(t,`css`))return L.createElement.apply(void 0,n);var r=n.length,i=Array(r);i[0]=ja,i[1]=ka(e,t);for(var a=2;a<r;a++)i[a]=n[a];return L.createElement.apply(null,i)};(function(e){var t;t||=e.JSX||={}})(Ma||={});var Na=Ta(function(e,t){var n=e.styles,r=ya([n],void 0,L.useContext(Ea)),i=L.useRef();return Ca(function(){var e=t.key+`-global`,n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,o=document.querySelector(`style[data-emotion="`+e+` `+r.name+`"]`);return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),o!==null&&(a=!0,o.setAttribute(`data-emotion`,e),n.hydrate([o])),i.current=[n,a],function(){n.flush()}},[t]),Ca(function(){var e=i.current,n=e[0];if(e[1]){e[1]=!1;return}r.next!==void 0&&oa(t,r.next,!0),n.tags.length&&(n.before=n.tags[n.tags.length-1].nextElementSibling,n.flush()),t.insert(``,r,n,!1)},[t,r.name]),null});function Pa(){return ya([...arguments])}function Fa(){var e=Pa.apply(void 0,arguments),t=`animation-`+e.name;return{name:t,styles:`@keyframes `+t+`{`+e.styles+`}`,anim:1,toString:function(){return`_EMO_`+this.name+`_`+this.styles+`_EMO_`}}}var Ia=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,La=Gi(function(e){return Ia.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Ra=function(e){return e!==`theme`},za=function(e){return typeof e==`string`&&e.charCodeAt(0)>96?La:Ra},Ba=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return typeof r!=`function`&&n&&(r=e.__emotion_forwardProp),r},Va=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return aa(t,n,r),Sa(function(){return oa(t,n,r)}),null},Ha=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,a,o;n!==void 0&&(a=n.label,o=n.target);var s=Ba(t,n,r),c=s||za(i),l=!c(`as`);return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&d.push(`label:`+a+`;`),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var p=u.length,m=1;m<p;m++)d.push(u[m],f[m])}var h=Ta(function(e,t,n){var r=l&&e.as||i,a=``,u=[],f=e;if(e.theme==null){for(var p in f={},e)f[p]=e[p];f.theme=L.useContext(Ea)}typeof e.className==`string`?a=ia(t.registered,u,e.className):e.className!=null&&(a=e.className+` `);var m=ya(d.concat(u),t.registered,f);a+=t.key+`-`+m.name,o!==void 0&&(a+=` `+o);var h=l&&s===void 0?za(r):c,g={};for(var _ in e)l&&_===`as`||h(_)&&(g[_]=e[_]);return g.className=a,n&&(g.ref=n),L.createElement(L.Fragment,null,L.createElement(Va,{cache:t,serialized:m,isStringTag:typeof r==`string`}),L.createElement(r,g))});return h.displayName=a===void 0?`Styled(`+(typeof i==`string`?i:i.displayName||i.name||`Component`)+`)`:a,h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=i,h.__emotion_styles=d,h.__emotion_forwardProp=s,Object.defineProperty(h,"toString",{value:function(){return`.`+o}}),h.withComponent=function(t,r){return e(t,Br({},n,r,{shouldForwardProp:Ba(h,r,!0)})).apply(void 0,d)},h}},Ua=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.marquee.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`),Wa=Ha.bind(null);Ua.forEach(function(e){Wa[e]=Wa(e)});var Ga=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),H=o(((e,t)=>{t.exports=Ga()}))();function Ka(e){return e==null||Object.keys(e).length===0}function qa(e){let{styles:t,defaultTheme:n={}}=e;return(0,H.jsx)(Na,{styles:typeof t==`function`?e=>t(Ka(e)?n:e):t})}function Ja(e,t){return Wa(e,t)}function Ya(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var Xa=[];function Za(e){return Xa[0]=e,ya(Xa)}var Qa=o((e=>{var t=Symbol.for(`react.fragment`),n=Symbol.for(`react.strict_mode`),r=Symbol.for(`react.profiler`),i=Symbol.for(`react.consumer`),a=Symbol.for(`react.context`),o=Symbol.for(`react.forward_ref`),s=Symbol.for(`react.suspense`),c=Symbol.for(`react.suspense_list`),l=Symbol.for(`react.memo`),u=Symbol.for(`react.lazy`),d=Symbol.for(`react.client.reference`);e.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===t||e===r||e===n||e===s||e===c||typeof e==`object`&&e&&(e.$$typeof===u||e.$$typeof===l||e.$$typeof===a||e.$$typeof===i||e.$$typeof===o||e.$$typeof===d||e.getModuleId!==void 0))}})),$a=o(((e,t)=>{t.exports=Qa()}))();function eo(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function to(e){if(L.isValidElement(e)||(0,$a.isValidElementType)(e)||!eo(e))return e;let t={};return Object.keys(e).forEach(n=>{t[n]=to(e[n])}),t}function no(e,t,n={clone:!0}){let r=n.clone?{...e}:e;return eo(e)&&eo(t)&&Object.keys(t).forEach(i=>{L.isValidElement(t[i])||(0,$a.isValidElementType)(t[i])?r[i]=t[i]:eo(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&eo(e[i])?r[i]=no(e[i],t[i],n):n.clone?r[i]=eo(t[i])?to(t[i]):t[i]:r[i]=t[i]}),r}var ro=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})};function io(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n=`px`,step:r=5,...i}=e,a=ro(t),o=Object.keys(a);function s(e){return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n})`}function c(e){return`@media (max-width:${(typeof t[e]==`number`?t[e]:e)-r/100}${n})`}function l(e,i){let a=o.indexOf(i);return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n}) and (max-width:${(a!==-1&&typeof t[o[a]]==`number`?t[o[a]]:i)-r/100}${n})`}function u(e){return o.indexOf(e)+1<o.length?l(e,o[o.indexOf(e)+1]):s(e)}function d(e){let t=o.indexOf(e);return t===0?s(o[1]):t===o.length-1?c(o[t]):l(e,o[o.indexOf(e)+1]).replace(`@media`,`@media not all and`)}let f=[];for(let e=0;e<o.length;e+=1)f.push(s(o[e]));return{keys:o,values:a,up:s,down:c,between:l,only:u,not:d,unit:n,internal_mediaKeys:f,...i}}var ao=/min-width:\s*([0-9.]+)/;function oo(e,t){if(!e.containerQueries||!so(t))return t;let n=[];for(let e in t)e.startsWith(`@container`)&&n.push(e);n.sort((e,t)=>+(e.match(ao)?.[1]||0)-(t.match(ao)?.[1]||0));let r=t;for(let e=0;e<n.length;e+=1){let t=n[e],i=r[t];delete r[t],r[t]=i}return r}function so(e){for(let t in e)if(t.startsWith(`@container`))return!0;return!1}function co(e,t){return t===`@`||t.startsWith(`@`)&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}function lo(e,t){let n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;let[,r,i]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(a)}function uo(e){let t=(e,t)=>e.replace(`@media`,t?`@container ${t}`:`@container`);function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{let i=t(e.breakpoints.not(...n),r);return i.includes(`not all and`)?i.replace(`not all and `,``).replace(`min-width:`,`width<`).replace(`max-width:`,`width>`).replace(`and`,`or`):i}}let r={},i=e=>(n(r,e),r);return n(i),{...e,containerQueries:i}}var fo={borderRadius:4};function po(e){if(e==null)return!0;for(let t in e)return!1;return!0}function mo(e,t){let n=Array.isArray(t),r=Array.isArray(e);return yo(t)?t:bo(e)?xo(t):n&&r?_o(e,t):n===r?So(e,t):xo(t)}function ho(e){let t=0,n=e.length,r=Array(n);for(t=0;t<n;t+=1)r[t]=xo(e[t]);return r}function go(e){let t={};for(let n in e)n!==`__proto__`&&n!==`constructor`&&n!==`prototype`&&(t[n]=xo(e[n]));return t}function _o(e,t){let n=e.length;for(let r=0;r<t.length;r+=1)e[n+r]=xo(t[r]);return e}function vo(e){return typeof e==`object`&&!!e&&!(e instanceof RegExp)&&!(e instanceof Date)}function yo(e){return typeof e!=`object`||!e}function bo(e){return typeof e!=`object`||!e||e instanceof RegExp||e instanceof Date}function xo(e){return vo(e)?Array.isArray(e)?ho(e):go(e):e}function So(e,t){for(let n in t)n!==`__proto__`&&n!==`constructor`&&n!==`prototype`&&(e[n]=n in e?mo(e[n],t[n]):xo(t[n]));return e}var Co={},wo={xs:0,sm:600,md:900,lg:1200,xl:1536},To=io({values:wo}),Eo={containerQueries:e=>({up:t=>{let n=typeof t==`number`?t:wo[t]||t;return typeof n==`number`&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Do(e,t,n){let r={};return Oo(r,e.theme,t,(e,t,i)=>{let a=n(t,i);e?r[e]=a:mo(r,a)})}function Oo(e,t,n,r){if(t??=Co,Array.isArray(n)){let i=t.breakpoints??To;for(let t=0;t<n.length;t+=1)ko(e,i.up(i.keys[t]),n[t],void 0,r);return e}if(typeof n==`object`){let i=t.breakpoints??To,a=i.values??wo;for(let o in n)if(co(i.keys,o)){let i=lo(t.containerQueries?t:Eo,o);i&&ko(e,i,n[o],o,r)}else if(o in a)ko(e,i.up(o),n[o],o,r);else{let t=o;e[t]=n[t]}return e}return r(void 0,n),e}function ko(e,t,n,r,i){e[t]??={},i(t,n,r)}function Ao(e=To){let{internal_mediaKeys:t}=e,n={};for(let e=0;e<t.length;e+=1)n[t[e]]={};return n}function jo(e,t){let n=e.internal_mediaKeys;for(let e=0;e<n.length;e+=1){let r=n[e];po(t[r])&&delete t[r]}return t}function Mo(e,...t){return jo(e,[Ao(e),...t].reduce((e,t)=>no(e,t),{}))}function No(e,t){if(typeof e!=`object`)return{};let n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((t,r)=>{r<e.length&&(n[t]=!0)}):r.forEach(t=>{e[t]!=null&&(n[t]=!0)}),n}function Po(e){let{values:t,breakpoints:n,base:r}=e,i=r||No(t,n),a=Object.keys(i);if(a.length===0)return t;let o;return a.reduce((e,n,r)=>{if(Array.isArray(t))e[n]=t[r]==null?t[o]:t[r],o=r;else if(typeof t==`object`&&t){let r=t;e[n]=r[n]==null?r[o]:r[n],o=n}else e[n]=t;return e},{})}function Fo(e,t){if(Array.isArray(t))return!0;if(typeof t==`object`&&t){for(let n=0;n<e.keys.length;n+=1)if(e.keys[n]in t)return!0;let n=Object.keys(t);for(let t=0;t<n.length;t+=1)if(co(e.keys,n[t]))return!0}return!1}function Io(e){if(typeof e!=`string`)throw Error(Rr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Lo(e,t,n,r){let i;return i=typeof e==`function`?e(n):Array.isArray(e)?e[n]||n:typeof n==`string`&&Ro(e,n,!0,r)||n,t&&(i=t(i,n,e)),i}function Ro(e,t,n=!0,r=void 0){if(!e||!t)return null;let i=t.split(`.`);if(e.vars&&n){let t=zo(e.vars,i,r);if(t!=null)return t}return zo(e,i,r)}function zo(e,t,n=void 0){let r,i=e,a=0;for(;a<t.length;){if(i==null)return i;r=i,i=i[t[a]],a+=1}if(n&&i===void 0){let e=t[t.length-1],i=`${n}${e==="default"?``:Io(e)}`;return r?.[i]}return i}function Bo(e){let{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,a=e=>{if(e[t]==null)return null;let a=e[t],o=e.theme,s=Ro(o,r)||{};return Do(e,a,e=>{let r=Lo(s,i,e,t);return n===!1?r:{[n]:r}})};return a.propTypes={},a.filterProps=[t],a}var Vo={internal_cache:{}},Ho={m:`margin`,p:`padding`},Uo={t:`Top`,r:`Right`,b:`Bottom`,l:`Left`,x:[`Left`,`Right`],y:[`Top`,`Bottom`]},Wo={marginX:`mx`,marginY:`my`,paddingX:`px`,paddingY:`py`},Go={};for(let e in Ho)Go[e]=[Ho[e]];for(let e in Ho)for(let t in Uo){let n=Ho[e],r=Uo[t],i=Array.isArray(r)?r.map(e=>n+e):[n+r];Go[e+t]=i}for(let e in Wo)Go[e]=Go[Wo[e]];var Ko=new Set([`m`,`mt`,`mr`,`mb`,`ml`,`mx`,`my`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`marginX`,`marginY`,`marginInline`,`marginInlineStart`,`marginInlineEnd`,`marginBlock`,`marginBlockStart`,`marginBlockEnd`]),qo=new Set([`p`,`pt`,`pr`,`pb`,`pl`,`px`,`py`,`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`paddingX`,`paddingY`,`paddingInline`,`paddingInlineStart`,`paddingInlineEnd`,`paddingBlock`,`paddingBlockStart`,`paddingBlockEnd`]);[...Ko,...qo];function Jo(e,t,n,r){let i=Ro(e,t,!0)??n;return typeof i==`number`||typeof i==`string`?e=>typeof e==`string`?e:typeof i==`string`?i.startsWith(`var(`)&&e===0?0:i.startsWith(`var(`)&&e===1?i:`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if(typeof e==`string`)return e;let t=i[Math.abs(e)];return e>=0?t:typeof t==`number`?-t:typeof t==`string`&&t.startsWith(`var(`)?`calc(-1 * ${t})`:`-${t}`}:typeof i==`function`?i:()=>void 0}function Yo(e){return Jo(e,`spacing`,8,`spacing`)}function Xo(e,t){return typeof t==`string`||t==null?t:e(t)}var Zo=[``];function Qo(e,t){let n=e.theme??Vo,r=n?.internal_cache?.unarySpacing??Yo(n),i={};for(let n in e){if(!t.has(n))continue;let a=Go[n]??(Zo[0]=n,Zo),o=e[n];Oo(i,e.theme,o,(e,t)=>{let n=e?i[e]:i;for(let e=0;e<a.length;e+=1)n[a[e]]=Xo(r,t)})}return i}function $o(e){return Qo(e,Ko)}$o.propTypes={},$o.filterProps=Ko;var es=$o;function ts(e){return Qo(e,qo)}ts.propTypes={},ts.filterProps=qo;var ns=ts;function rs(e=8,t=Yo({spacing:e})){if(e.mui)return e;let n=(...e)=>(e.length===0?[1]:e).map(e=>{let n=t(e);return typeof n==`number`?`${n}px`:n}).join(` `);return n.mui=!0,n}function is(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>{let n={};for(let r in e)t[r]&&mo(n,t[r](e));return n};return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function as(e){return typeof e==`number`?`${e}px solid`:e}function os(e,t){return Bo({prop:e,themeKey:`borders`,transform:t})}var ss=os(`border`,as),cs=os(`borderTop`,as),ls=os(`borderRight`,as),us=os(`borderBottom`,as),ds=os(`borderLeft`,as),fs=os(`borderColor`),ps=os(`borderTopColor`),ms=os(`borderRightColor`),hs=os(`borderBottomColor`),gs=os(`borderLeftColor`),_s=os(`outline`,as),vs=os(`outlineColor`),ys=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=Jo(e.theme,`shape.borderRadius`,4,`borderRadius`);return Do(e,e.borderRadius,e=>({borderRadius:Xo(t,e)}))}return null};ys.propTypes={},ys.filterProps=[`borderRadius`],is(ss,cs,ls,us,ds,fs,ps,ms,hs,gs,ys,_s,vs);var bs=e=>{if(e.gap!==void 0&&e.gap!==null){let t=Jo(e.theme,`spacing`,8,`gap`);return Do(e,e.gap,e=>({gap:Xo(t,e)}))}return null};bs.propTypes={},bs.filterProps=[`gap`];var xs=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=Jo(e.theme,`spacing`,8,`columnGap`);return Do(e,e.columnGap,e=>({columnGap:Xo(t,e)}))}return null};xs.propTypes={},xs.filterProps=[`columnGap`];var Ss=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=Jo(e.theme,`spacing`,8,`rowGap`);return Do(e,e.rowGap,e=>({rowGap:Xo(t,e)}))}return null};Ss.propTypes={},Ss.filterProps=[`rowGap`],is(bs,xs,Ss,Bo({prop:`gridColumn`}),Bo({prop:`gridRow`}),Bo({prop:`gridAutoFlow`}),Bo({prop:`gridAutoColumns`}),Bo({prop:`gridAutoRows`}),Bo({prop:`gridTemplateColumns`}),Bo({prop:`gridTemplateRows`}),Bo({prop:`gridTemplateAreas`}),Bo({prop:`gridArea`}));function Cs(e,t){return t===`grey`?t:e}is(Bo({prop:`color`,themeKey:`palette`,transform:Cs}),Bo({prop:`bgcolor`,cssProperty:`backgroundColor`,themeKey:`palette`,transform:Cs}),Bo({prop:`backgroundColor`,themeKey:`palette`,transform:Cs}));var ws=wo;function Ts(e){return e<=1&&e!==0?`${e*100}%`:e}var Es=Bo({prop:`width`,transform:Ts}),Ds=e=>e.maxWidth!==void 0&&e.maxWidth!==null?Do(e,e.maxWidth,t=>{let n=e.theme?.breakpoints?.values?.[t]||ws[t];return n?e.theme?.breakpoints?.unit===`px`?{maxWidth:n}:{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:Ts(t)}}):null;Ds.filterProps=[`maxWidth`];var Os=Bo({prop:`minWidth`,transform:Ts}),ks=Bo({prop:`height`,transform:Ts}),As=Bo({prop:`maxHeight`,transform:Ts}),js=Bo({prop:`minHeight`,transform:Ts});Bo({prop:`size`,cssProperty:`width`,transform:Ts}),Bo({prop:`size`,cssProperty:`height`,transform:Ts}),is(Es,Ds,Os,ks,As,js,Bo({prop:`boxSizing`}));var Ms={border:{themeKey:`borders`,transform:as},borderTop:{themeKey:`borders`,transform:as},borderRight:{themeKey:`borders`,transform:as},borderBottom:{themeKey:`borders`,transform:as},borderLeft:{themeKey:`borders`,transform:as},borderColor:{themeKey:`palette`},borderTopColor:{themeKey:`palette`},borderRightColor:{themeKey:`palette`},borderBottomColor:{themeKey:`palette`},borderLeftColor:{themeKey:`palette`},outline:{themeKey:`borders`,transform:as},outlineColor:{themeKey:`palette`},borderRadius:{themeKey:`shape.borderRadius`,style:ys},color:{themeKey:`palette`,transform:Cs},bgcolor:{themeKey:`palette`,cssProperty:`backgroundColor`,transform:Cs},backgroundColor:{themeKey:`palette`,transform:Cs},p:{style:ns},pt:{style:ns},pr:{style:ns},pb:{style:ns},pl:{style:ns},px:{style:ns},py:{style:ns},padding:{style:ns},paddingTop:{style:ns},paddingRight:{style:ns},paddingBottom:{style:ns},paddingLeft:{style:ns},paddingX:{style:ns},paddingY:{style:ns},paddingInline:{style:ns},paddingInlineStart:{style:ns},paddingInlineEnd:{style:ns},paddingBlock:{style:ns},paddingBlockStart:{style:ns},paddingBlockEnd:{style:ns},m:{style:es},mt:{style:es},mr:{style:es},mb:{style:es},ml:{style:es},mx:{style:es},my:{style:es},margin:{style:es},marginTop:{style:es},marginRight:{style:es},marginBottom:{style:es},marginLeft:{style:es},marginX:{style:es},marginY:{style:es},marginInline:{style:es},marginInlineStart:{style:es},marginInlineEnd:{style:es},marginBlock:{style:es},marginBlockStart:{style:es},marginBlockEnd:{style:es},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:bs},rowGap:{style:Ss},columnGap:{style:xs},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:`zIndex`},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:`shadows`},width:{transform:Ts},maxWidth:{style:Ds},minWidth:{transform:Ts},height:{transform:Ts},maxHeight:{transform:Ts},minHeight:{transform:Ts},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`}},Ns={};function Ps(){function e(t){if(!t.sx)return null;let{sx:n,theme:r=Ns,nested:i}=t,a=r.unstable_sxConfig??Ms,o={sx:null,theme:r,nested:!0};function s(n){let s=n;if(typeof n==`function`)s=n(r);else if(typeof n!=`object`)return n;if(!s)return null;let c=r.breakpoints??To,l=Ao(c);for(let n in s){let i=Ls(s[n],r);if(i!=null){if(typeof i!=`object`){Is(l,n,i,r,a);continue}if(a[n]){Is(l,n,i,r,a);continue}Fo(c,i)?Oo(l,t.theme,i,(e,t)=>{l[e][n]=t}):(o.sx=i,l[n]=e(o))}}return!i&&r.modularCssLayers?{"@layer sx":oo(r,jo(c,l))}:oo(r,jo(c,l))}return Array.isArray(n)?n.map(s):s(n)}return e.filterProps=[`sx`],e}var Fs=Ps();function Is(e,t,n,r,i){let a=i[t];if(!a){e[t]=n;return}if(n==null)return;let{themeKey:o}=a;if(o===`typography`&&n===`inherit`){e[t]=n;return}let{style:s}=a;if(s){mo(e,s({[t]:n,theme:r}));return}let{cssProperty:c=t,transform:l}=a,u=Ro(r,o);Oo(e,r,n,(n,r)=>{let i=Lo(u,l,r,t);c===!1?mo(n?e[n]:e,i):n?e[n][c]=i:e[c]=i})}function Ls(e,t){return typeof e==`function`?e(t):e}function Rs(e,t){let n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!=`function`)return{};let r=n.getColorSchemeSelector(e);return r===`&`?t:((r.includes(`data-`)||r.includes(`.`))&&(r=`*:where(${r.replace(/\s*&$/,``)}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function zs(e={},...t){let{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=io(n),c=rs(i),l=no({breakpoints:s,direction:`ltr`,components:{},palette:{mode:`light`,...r},spacing:c,shape:{...fo,...a}},o);return l=uo(l),l.applyStyles=Rs,l=t.reduce((e,t)=>no(e,t),l),l.unstable_sxConfig={...Ms,...o?.unstable_sxConfig},l.unstable_sx=function(e){return Fs({sx:e,theme:this})},l.internal_cache={},l}function Bs(e){return Object.keys(e).length===0}function Vs(e=null){let t=L.useContext(Ea);return!t||Bs(t)?e:t}var Hs=zs();function Us(e=Hs){return Vs(e)}function Ws(e){let t=Za(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Gs({styles:e,themeId:t,defaultTheme:n={}}){let r=Us(n),i=t&&r[t]||r,a=typeof e==`function`?e(i):e;return i.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>Ws(typeof e==`function`?e(i):e)):Ws(a)),(0,H.jsx)(qa,{styles:a})}var Ks=e=>e,qs=(()=>{let e=Ks;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ks}}})();function Js(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Js(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function U(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Js(e))&&(r&&(r+=` `),r+=t);return r}function Ys(e={}){let{themeId:t,defaultTheme:n,defaultClassName:r=`MuiBox-root`,generateClassName:i}=e,a=Ja(`div`,{shouldForwardProp:e=>e!==`theme`&&e!==`sx`&&e!==`as`})(Fs);return L.forwardRef(function(e,o){let s=Us(n),{className:c,component:l=`div`,...u}=e;return(0,H.jsx)(a,{as:l,ref:o,className:U(c,i?i(r):r),theme:t&&s[t]||s,...u})})}var Xs={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 Zs(e,t,n=`Mui`){let r=Xs[t];return r?`${n}-${r}`:`${qs.generate(e)}-${t}`}function Qs(e,t,n=`Mui`){let r={};return t.forEach(t=>{r[t]=Zs(e,t,n)}),r}function $s(e){let{variants:t,...n}=e,r={variants:t,style:Za(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{typeof e.style!=`function`&&(e.style=Za(e.style))}),r}var ec=zs();function tc(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}function nc(e,t){return t&&e&&typeof e==`object`&&e.styles&&!e.styles.startsWith(`@layer`)&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function rc(e){return e?(t,n)=>n[e]:null}function ic(e,t,n){e.theme=po(e.theme)?n:e.theme[t]||e.theme}function ac(e,t,n){let r=typeof t==`function`?t(e):t;if(Array.isArray(r))return r.flatMap(t=>ac(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?nc(r.style,n):r.style;else{let{variants:e,...i}=r;t=n?nc(Za(i),n):i}return oc(e,r.variants,[t],n)}return r?.isProcessed?n?nc(Za(r.style),n):r.style:n?nc(Za(r),n):r}function oc(e,t,n=[],r=void 0){let i;variantLoop:for(let a=0;a<t.length;a+=1){let o=t[a];if(typeof o.props==`function`){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!o.props(i))continue}else for(let t in o.props)if(e[t]!==o.props[t]&&e.ownerState?.[t]!==o.props[t])continue variantLoop;typeof o.style==`function`?(i??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?nc(Za(o.style(i)),r):o.style(i))):n.push(r?nc(Za(o.style),r):o.style)}return n}function sc(e={}){let{themeId:t,defaultTheme:n=ec,rootShouldForwardProp:r=tc,slotShouldForwardProp:i=tc}=e;function a(e){ic(e,t,n)}return(e,t={})=>{Ya(e,e=>e.filter(e=>e!==Fs));let{name:n,slot:o,skipVariantsResolver:s,skipSx:c,overridesResolver:l=rc(lc(o)),...u}=t,d=n&&n.startsWith(`Mui`)||o?`components`:`custom`,f=s===void 0?o&&o!==`Root`&&o!==`root`||!1:s,p=c||!1,m=tc;o===`Root`||o===`root`?m=r:o?m=i:cc(e)&&(m=void 0);let h=Ja(e,{shouldForwardProp:m,label:void 0,...u}),g=e=>{if(e.__emotion_real===e)return e;if(typeof e==`function`)return function(t){return ac(t,e,t.theme.modularCssLayers?d:void 0)};if(eo(e)){let t=$s(e);return function(e){return t.variants?ac(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?nc(t.style,d):t.style}}return e},_=(...t)=>{let r=[],i=t.map(g),o=[];if(r.push(a),n&&l&&o.push(function(e){let t=e.theme.components?.[n]?.styleOverrides;if(!t)return null;let r={};for(let n in t)r[n]=ac(e,t[n],e.theme.modularCssLayers?`theme`:void 0);return l(e,r)}),n&&!f&&o.push(function(e){let t=e.theme?.components?.[n]?.variants;return t?oc(e,t,[],e.theme.modularCssLayers?`theme`:void 0):null}),p||o.push(Fs),Array.isArray(i[0])){let e=i.shift(),t=Array(r.length).fill(``),n=Array(o.length).fill(``),a;a=[...t,...e,...n],a.raw=[...t,...e.raw,...n],r.unshift(a)}let s=[...r,...i,...o],c=h(...s);return e.muiName&&(c.muiName=e.muiName),c};return h.withConfig&&(_.withConfig=h.withConfig),_}}function cc(e){return typeof e==`string`&&e.charCodeAt(0)>96}function lc(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}var uc=sc();function dc(e,t,n=!1){let r={...t};for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let a=i;if(a===`components`||a===`slots`)r[a]={...e[a],...r[a]};else if(a===`componentsProps`||a===`slotProps`){let i=e[a],o=t[a];if(!o)r[a]=i||{};else if(!i)r[a]=o;else{r[a]={...o};for(let e in i)if(Object.prototype.hasOwnProperty.call(i,e)){let t=e,s=i[t],c=o[t];typeof s==`function`||typeof c==`function`?r[a][t]=(...e)=>dc((typeof s==`function`?s(...e):s)??{},(typeof c==`function`?c(...e):c)??{},n):r[a][t]=dc(s??{},c??{},n)}}}else a===`className`&&n&&t.className!==void 0?r.className=U(e?.className,t?.className):a===`style`&&n&&t.style?r.style={...e?.style,...t?.style}:r[a]===void 0&&(r[a]=e[a])}return r}function fc(e){let{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:dc(t.components[n].defaultProps,r)}function pc(e){let{props:t,name:n,defaultTheme:r,themeId:i}=e,a=Us(r);return i&&(a=a[i]||a),fc({theme:a,name:n,props:t})}var mc=typeof window<`u`?L.useLayoutEffect:L.useEffect;function hc(e,t,n,r,i){let[a,o]=L.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return mc(()=>{if(!n)return;let t=n(e),r=()=>{o(t.matches)};return r(),t.addEventListener(`change`,r),()=>{t.removeEventListener(`change`,r)}},[e,n]),a}var gc={...L}.useSyncExternalStore;function _c(e,t,n,r,i){let a=L.useCallback(()=>t,[t]),o=L.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(r!==null){let{matches:t}=r(e);return()=>t}return a},[a,e,r,i,n]),[s,c]=L.useMemo(()=>{if(n===null)return[a,()=>()=>{}];let t=n(e);return[()=>t.matches,e=>(t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)})]},[a,n,e]);return gc(c,s,o)}function vc(e={}){let{themeId:t}=e;return function(e,n={}){let r=Vs();r&&t&&(r=r[t]||r);let i=typeof window<`u`&&window.matchMedia!==void 0?window.matchMedia:null,{defaultMatches:a=!1,matchMedia:o,ssrMatchMedia:s=null,noSsr:c=!1}=fc({name:`MuiUseMediaQuery`,props:n,theme:r}),l=L.useMemo(()=>o===void 0?i===null?null:i.bind(window):o,[o,i]),u=typeof e==`function`?e(r):e;return u=u.replace(/^@media( ?)/m,``),u.includes(`print`)&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.",`Using the print media query to modify print styles can lead to unexpected results.`,"Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
|
|
31
|
+
`)),(gc===void 0?hc:_c)(u,a,l,s,c)}}vc();function yc(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function bc(e,t=0,n=1){return yc(e,t,n)}function xc(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,`g`),n=e.match(t);return n&&n[0].length===1&&(n=n.map(e=>e+e)),n?`rgb${n.length===4?`a`:``}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(`, `)})`:``}function Sc(e){if(e.type)return e;if(e.charAt(0)===`#`)return Sc(xc(e));let t=e.indexOf(`(`),n=e.substring(0,t);if(![`rgb`,`rgba`,`hsl`,`hsla`,`color`].includes(n))throw Error(Rr(9,e));let r=e.substring(t+1,e.length-1),i;if(n===`color`){if(r=r.split(` `),i=r.shift(),r.length===4&&r[3].charAt(0)===`/`&&(r[3]=r[3].slice(1)),![`srgb`,`display-p3`,`a98-rgb`,`prophoto-rgb`,`rec-2020`].includes(i))throw Error(Rr(10,i))}else r=r.split(`,`);return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:i}}var Cc=e=>{let t=Sc(e);return t.values.slice(0,3).map((e,n)=>t.type.includes(`hsl`)&&n!==0?`${e}%`:e).join(` `)},wc=(e,t)=>{try{return Cc(e)}catch{return e}};function Tc(e){let{type:t,colorSpace:n}=e,{values:r}=e;return t.includes(`rgb`)?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes(`hsl`)&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes(`color`)?`${n} ${r.join(` `)}`:`${r.join(`, `)}`,`${t}(${r})`}function Ec(e){e=Sc(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1),s=`rgb`,c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type===`hsla`&&(s+=`a`,c.push(t[3])),Tc({type:s,values:c})}function Dc(e){e=Sc(e);let t=e.type===`hsl`||e.type===`hsla`?Sc(Ec(e)).values:e.values;return t=t.map(t=>(e.type!==`color`&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Oc(e,t){let n=Dc(e),r=Dc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function kc(e,t){return e=Sc(e),t=bc(t),(e.type===`rgb`||e.type===`hsl`)&&(e.type+=`a`),e.type===`color`?e.values[3]=`/${t}`:e.values[3]=t,Tc(e)}function Ac(e,t,n){try{return kc(e,t)}catch{return e}}function jc(e,t){if(e=Sc(e),t=bc(t),e.type.includes(`hsl`))e.values[2]*=1-t;else if(e.type.includes(`rgb`)||e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Tc(e)}function Mc(e,t,n){try{return jc(e,t)}catch{return e}}function Nc(e,t){if(e=Sc(e),t=bc(t),e.type.includes(`hsl`))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes(`rgb`))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Tc(e)}function Pc(e,t,n){try{return Nc(e,t)}catch{return e}}function Fc(e,t=.15){return Dc(e)>.5?jc(e,t):Nc(e,t)}function Ic(e,t,n){try{return Fc(e,t)}catch{return e}}var Lc=L.createContext(null);function Rc(){return L.useContext(Lc)}var zc=typeof Symbol==`function`&&Symbol.for?Symbol.for(`mui.nested`):`__THEME_NESTED__`;function Bc(e,t){return typeof t==`function`?t(e):{...e,...t}}function Vc(e){let{children:t,theme:n}=e,r=Rc(),i=L.useMemo(()=>{let e=r===null?{...n}:Bc(r,n);return e!=null&&(e[zc]=r!==null),e},[n,r]);return(0,H.jsx)(Lc.Provider,{value:i,children:t})}var Hc=L.createContext();function Uc({value:e,...t}){return(0,H.jsx)(Hc.Provider,{value:e??!0,...t})}var Wc=()=>L.useContext(Hc)??!1,Gc=L.createContext(void 0);function Kc({value:e,children:t}){return(0,H.jsx)(Gc.Provider,{value:e,children:t})}function qc(e){let{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;let i=t.components[n];return i.defaultProps?dc(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?dc(i,r,t.components.mergeClassNameAndStyle):r}function Jc({props:e,name:t}){return qc({props:e,name:t,theme:{components:L.useContext(Gc)}})}var Yc=0;function Xc(e){let[t,n]=L.useState(e),r=e||t;return L.useEffect(()=>{t??(Yc+=1,n(`mui-${Yc}`))},[t]),r}var Zc={...L}.useId;function Qc(e){if(Zc!==void 0){let t=Zc();return e??t}return Xc(e)}function $c(e){let t=Vs(),n=Qc()||``,{modularCssLayers:r}=e,i=`mui.global, mui.components, mui.theme, mui.custom, mui.sx`;return i=!r||t!==null?``:typeof r==`string`?r.replace(/mui(?!\.)/g,i):`@layer ${i};`,mc(()=>{let e=document.querySelector(`head`);if(!e)return;let t=e.firstChild;if(i){if(t&&t.hasAttribute?.(`data-mui-layer-order`)&&t.getAttribute(`data-mui-layer-order`)===n)return;let r=document.createElement(`style`);r.setAttribute(`data-mui-layer-order`,n),r.textContent=i,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[i,n]),i?(0,H.jsx)(Gs,{styles:i}):null}var el={};function tl(e,t,n,r=!1){return L.useMemo(()=>{let i=e&&t[e]||t;if(typeof n==`function`){let a=n(i),o=e?{...t,[e]:a}:a;return r?()=>o:o}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function nl(e){let{children:t,theme:n,themeId:r}=e,i=Vs(el),a=Rc()||el,o=tl(r,i,n),s=tl(r,a,n,!0),c=(r?o[r]:o).direction===`rtl`,l=$c(o);return(0,H.jsx)(Vc,{theme:s,children:(0,H.jsx)(Ea.Provider,{value:o,children:(0,H.jsx)(Uc,{value:c,children:(0,H.jsxs)(Kc,{value:r?o[r].components:o.components,children:[l,t]})})})})}var rl={theme:void 0};function il(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(rl.theme=r.theme,i=$s(e(rl)),t=i,n=r.theme),i}}var al=`mode`,ol=`color-scheme`,sl=`data-color-scheme`;({...L}).useSyncExternalStore;function cl(e){let{defaultMode:t=`system`,defaultLightColorScheme:n=`light`,defaultDarkColorScheme:r=`dark`,modeStorageKey:i=al,colorSchemeStorageKey:a=ol,attribute:o=sl,colorSchemeNode:s=`document.documentElement`,nonce:c}=e||{},l=``,u=o;if(o===`class`&&(u=`.%s`),o===`data`&&(u=`[data-%s]`),u.startsWith(`.`)){let e=u.substring(1);l+=`${s}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));
|
|
32
|
+
${s}.classList.add('${e}'.replace('%s', colorScheme));`}let d=u.match(/\[([^[\]]+)\]/);if(d){let[e,t]=d[1].split(`=`);t||(l+=`${s}.removeAttribute('${e}'.replace('%s', light));
|
|
33
|
+
${s}.removeAttribute('${e}'.replace('%s', dark));`),l+=`
|
|
34
|
+
${s}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:`""`});`}else u!==`.%s`&&(l+=`${s}.setAttribute('${u}', colorScheme);`);return(0,H.jsx)(`script`,{suppressHydrationWarning:!0,nonce:typeof window>`u`?c:``,dangerouslySetInnerHTML:{__html:`(function() {
|
|
35
|
+
try {
|
|
36
|
+
let colorScheme = '';
|
|
37
|
+
const mode = localStorage.getItem('${i}') || '${t}';
|
|
38
|
+
const dark = localStorage.getItem('${a}-dark') || '${r}';
|
|
39
|
+
const light = localStorage.getItem('${a}-light') || '${n}';
|
|
40
|
+
if (mode === 'system') {
|
|
41
|
+
// handle system mode
|
|
42
|
+
const mql = window.matchMedia('(prefers-color-scheme: dark)');
|
|
43
|
+
if (mql.matches) {
|
|
44
|
+
colorScheme = dark
|
|
45
|
+
} else {
|
|
46
|
+
colorScheme = light
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (mode === 'light') {
|
|
50
|
+
colorScheme = light;
|
|
51
|
+
}
|
|
52
|
+
if (mode === 'dark') {
|
|
53
|
+
colorScheme = dark;
|
|
54
|
+
}
|
|
55
|
+
if (colorScheme) {
|
|
56
|
+
${l}
|
|
57
|
+
}
|
|
58
|
+
} catch(e){}})();`}},`mui-color-scheme-init`)}function ll(){}var ul=({key:e,storageWindow:t})=>(!t&&typeof window<`u`&&(t=window),{get(n){if(typeof window>`u`)return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return ll;let r=t=>{let r=t.newValue;t.key===e&&n(r)};return t.addEventListener(`storage`,r),()=>{t.removeEventListener(`storage`,r)}}});function dl(){}function fl(e){if(typeof window<`u`&&typeof window.matchMedia==`function`&&e===`system`)return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function pl(e,t){if(e.mode===`light`||e.mode===`system`&&e.systemMode===`light`)return t(`light`);if(e.mode===`dark`||e.mode===`system`&&e.systemMode===`dark`)return t(`dark`)}function ml(e){return pl(e,t=>{if(t===`light`)return e.lightColorScheme;if(t===`dark`)return e.darkColorScheme})}function hl(e){let{defaultMode:t=`light`,defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:i=[],modeStorageKey:a=al,colorSchemeStorageKey:o=ol,storageWindow:s=typeof window>`u`?void 0:window,storageManager:c=ul,noSsr:l=!1}=e,u=i.join(`,`),d=i.length>1,f=L.useMemo(()=>c?.({key:a,storageWindow:s}),[c,a,s]),p=L.useMemo(()=>c?.({key:`${o}-light`,storageWindow:s}),[c,o,s]),m=L.useMemo(()=>c?.({key:`${o}-dark`,storageWindow:s}),[c,o,s]),[h,g]=L.useState(()=>{let e=f?.get(t)||t,i=p?.get(n)||n,a=m?.get(r)||r;return{mode:e,systemMode:fl(e),lightColorScheme:i,darkColorScheme:a}}),[_,v]=L.useState(l||!d);L.useEffect(()=>{v(!0)},[]);let y=ml(h),b=L.useCallback(e=>{g(n=>{if(e===n.mode)return n;let r=e??t;return f?.set(r),{...n,mode:r,systemMode:fl(r)}})},[f,t]),x=L.useCallback(e=>{e?typeof e==`string`?e&&!u.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):g(t=>{let n={...t};return pl(t,t=>{t===`light`&&(p?.set(e),n.lightColorScheme=e),t===`dark`&&(m?.set(e),n.darkColorScheme=e)}),n}):g(t=>{let i={...t},a=e.light===null?n:e.light,o=e.dark===null?r:e.dark;return a&&(u.includes(a)?(i.lightColorScheme=a,p?.set(a)):console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)),o&&(u.includes(o)?(i.darkColorScheme=o,m?.set(o)):console.error(`\`${o}\` does not exist in \`theme.colorSchemes\`.`)),i}):g(e=>(p?.set(n),m?.set(r),{...e,lightColorScheme:n,darkColorScheme:r}))},[u,p,m,n,r]),S=L.useCallback(e=>{h.mode===`system`&&g(t=>{let n=e?.matches?`dark`:`light`;return t.systemMode===n?t:{...t,systemMode:n}})},[h.mode]),C=L.useRef(S);return C.current=S,L.useEffect(()=>{if(typeof window.matchMedia!=`function`||!d)return;let e=(...e)=>C.current(...e),t=window.matchMedia(`(prefers-color-scheme: dark)`);return t.addListener(e),e(t),()=>{t.removeListener(e)}},[d]),L.useEffect(()=>{if(d){let e=f?.subscribe(e=>{(!e||[`light`,`dark`,`system`].includes(e))&&b(e||t)})||dl,n=p?.subscribe(e=>{(!e||u.match(e))&&x({light:e})})||dl,r=m?.subscribe(e=>{(!e||u.match(e))&&x({dark:e})})||dl;return()=>{e(),n(),r()}}},[x,b,u,t,s,d,f,p,m]),{...h,mode:_?h.mode:void 0,systemMode:_?h.systemMode:void 0,colorScheme:_?y:void 0,setMode:b,setColorScheme:x}}var gl=`*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`;function _l(e){let{themeId:t,theme:n={},modeStorageKey:r=al,colorSchemeStorageKey:i=ol,disableTransitionOnChange:a=!1,defaultColorScheme:o,resolveTheme:s}=e,c={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},l=L.createContext(void 0),u=()=>L.useContext(l)||c,d={},f={};function p(e){let{children:c,theme:u,modeStorageKey:p=r,colorSchemeStorageKey:m=i,disableTransitionOnChange:h=a,storageManager:g,storageWindow:_=typeof window>`u`?void 0:window,documentNode:v=typeof document>`u`?void 0:document,colorSchemeNode:y=typeof document>`u`?void 0:document.documentElement,disableNestedContext:b=!1,disableStyleSheetGeneration:x=!1,defaultMode:S=`system`,forceThemeRerender:C=!1,noSsr:w}=e,T=L.useRef(!1),E=Rc(),D=L.useContext(l),O=!!D&&!b,ee=L.useMemo(()=>u||(typeof n==`function`?n():n),[u]),te=ee[t],k=te||ee,{colorSchemes:A=d,components:j=f,cssVarPrefix:M}=k,ne=Object.keys(A).filter(e=>!!A[e]).join(`,`),re=L.useMemo(()=>ne.split(`,`),[ne]),ie=typeof o==`string`?o:o.light,ae=typeof o==`string`?o:o.dark,{mode:N,setMode:oe,systemMode:se,lightColorScheme:ce,darkColorScheme:P,colorScheme:le,setColorScheme:ue}=hl({supportedColorSchemes:re,defaultLightColorScheme:ie,defaultDarkColorScheme:ae,modeStorageKey:p,colorSchemeStorageKey:m,defaultMode:A[ie]&&A[ae]?S:A[k.defaultColorScheme]?.palette?.mode||k.palette?.mode,storageManager:g,storageWindow:_,noSsr:w}),F=N,I=le;O&&(F=D.mode,I=D.colorScheme);let de=I||k.defaultColorScheme;k.vars&&!C&&(de=k.defaultColorScheme);let fe=L.useMemo(()=>{let e=k.generateThemeVars?.()||k.vars,t={...k,components:j,colorSchemes:A,cssVarPrefix:M,vars:e};if(typeof t.generateSpacing==`function`&&(t.spacing=t.generateSpacing()),de){let e=A[de];e&&typeof e==`object`&&Object.keys(e).forEach(n=>{e[n]&&typeof e[n]==`object`?t[n]={...t[n],...e[n]}:t[n]=e[n]})}return s?s(t):t},[k,de,j,A,M]),pe=k.colorSchemeSelector;mc(()=>{if(I&&y&&pe&&pe!==`media`){let e=pe,t=pe;if(e===`class`&&(t=`.%s`),e===`data`&&(t=`[data-%s]`),e?.startsWith(`data-`)&&!e.includes(`%s`)&&(t=`[${e}="%s"]`),t.startsWith(`.`))y.classList.remove(...re.map(e=>t.substring(1).replace(`%s`,e))),y.classList.add(t.substring(1).replace(`%s`,I));else{let e=t.replace(`%s`,I).match(/\[([^\]]+)\]/);if(e){let[t,n]=e[1].split(`=`);n||re.forEach(e=>{y.removeAttribute(t.replace(I,e))}),y.setAttribute(t,n?n.replace(/"|'/g,``):``)}else y.setAttribute(t,I)}}},[I,pe,y,re]),L.useEffect(()=>{let e;if(h&&T.current&&v){let t=v.createElement(`style`);t.appendChild(v.createTextNode(gl)),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[I,h,v]),L.useEffect(()=>(T.current=!0,()=>{T.current=!1}),[]);let me=L.useMemo(()=>({allColorSchemes:re,colorScheme:I,darkColorScheme:P,lightColorScheme:ce,mode:F,setColorScheme:ue,setMode:oe,systemMode:se}),[re,I,P,ce,F,ue,oe,se,fe.colorSchemeSelector]),he=!0;(x||k.cssVariables===!1||O&&E?.cssVarPrefix===M)&&(he=!1);let ge=(0,H.jsxs)(L.Fragment,{children:[(0,H.jsx)(nl,{themeId:te?t:void 0,theme:fe,children:c}),he&&(0,H.jsx)(qa,{styles:fe.generateStyleSheets?.()||[]})]});return O?ge:(0,H.jsx)(l.Provider,{value:me,children:ge})}let m=typeof o==`string`?o:o.light,h=typeof o==`string`?o:o.dark;return{CssVarsProvider:p,useColorScheme:u,getInitColorSchemeScript:e=>cl({colorSchemeStorageKey:i,defaultLightColorScheme:m,defaultDarkColorScheme:h,modeStorageKey:r,...e})}}function vl(e=``){function t(...n){if(!n.length)return``;let r=n[0];return typeof r==`string`&&!r.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}-`:``}${r}${t(...n.slice(1))})`:`, ${r}`}return(n,...r)=>`var(--${e?`${e}-`:``}${n}${t(...r)})`}var yl=new Set([`__proto__`,`constructor`,`prototype`]),bl=(e,t,n,r=[])=>{let i=e;for(let e=0;e<t.length;e+=1){let a=t[e];if(yl.has(a))break;e===t.length-1?Array.isArray(i)?i[Number(a)]=n:i&&typeof i==`object`&&(i[a]=n):i&&typeof i==`object`&&(i[a]||(i[a]=r.includes(a)?[]:{}),i=i[a])}},xl=(e,t,n)=>{function r(e,i=[],a=[]){Object.entries(e).forEach(([e,o])=>{(!n||n&&!n([...i,e]))&&o!=null&&(typeof o==`object`&&Object.keys(o).length>0?r(o,[...i,e],Array.isArray(o)?[...a,e]:a):t([...i,e],o,a))})}r(e)},Sl=(e,t)=>typeof t==`number`?[`lineHeight`,`fontWeight`,`opacity`,`zIndex`].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes(`opacity`)?t:`${t}px`:t;function Cl(e,t){let{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},a={},o={};return xl(e,(e,t,s)=>{if((typeof t==`string`||typeof t==`number`)&&(!r||!r(e,t))){let r=`--${n?`${n}-`:``}${e.join(`-`)}`,c=Sl(e,t);Object.assign(i,{[r]:c}),bl(a,e,`var(${r})`,s),bl(o,e,`var(${r}, ${c})`,s)}},e=>e[0]===`vars`),{css:i,vars:a,varsWithDefaults:o}}function wl(e,t={}){let{getSelector:n=_,disableCssColorScheme:r,colorSchemeSelector:i,enableContrastVars:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:c=`light`,...l}=e,{vars:u,css:d,varsWithDefaults:f}=Cl(l,t),p=f,m={},{[c]:h,...g}=o;if(Object.entries(g||{}).forEach(([e,n])=>{let{vars:r,css:i,varsWithDefaults:a}=Cl(n,t);p=no(p,a),m[e]={css:i,vars:r}}),h){let{css:e,vars:n,varsWithDefaults:r}=Cl(h,t);p=no(p,r),m[c]={css:e,vars:n}}function _(t,n){let r=i;if(i===`class`&&(r=`.%s`),i===`data`&&(r=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(r=`[${i}="%s"]`),t){if(r===`media`)return e.defaultColorScheme===t?`:root`:{[`@media (prefers-color-scheme: ${o[t]?.palette?.mode||t})`]:{":root":n}};if(r)return e.defaultColorScheme===t?`:root, ${r.replace(`%s`,String(t))}`:r.replace(`%s`,String(t))}return`:root`}return{vars:p,generateThemeVars:()=>{let e={...u};return Object.entries(m).forEach(([,{vars:t}])=>{e=no(e,t)}),e},generateStyleSheets:()=>{let t=[],i=e.defaultColorScheme||`light`;function s(e,n){Object.keys(n).length&&t.push(typeof e==`string`?{[e]:{...n}}:e)}s(n(void 0,{...d}),d);let{[i]:c,...l}=m;if(c){let{css:e}=c,t=o[i]?.palette?.mode,a=!r&&t?{colorScheme:t,...e}:{...e};s(n(i,{...a}),a)}return Object.entries(l).forEach(([e,{css:t}])=>{let i=o[e]?.palette?.mode,a=!r&&i?{colorScheme:i,...t}:{...t};s(n(e,{...a}),a)}),a&&t.push({":root":{"--__l-threshold":`0.7`,"--__l":`clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)`,"--__a":`clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)`}}),t}}}function Tl(e){return function(t){return e===`media`?`@media (prefers-color-scheme: ${t})`:e?e.startsWith(`data-`)&&!e.includes(`%s`)?`[${e}="${t}"] &`:e===`class`?`.${t} &`:e===`data`?`[data-${t}] &`:`${e.replace(`%s`,t)} &`:`&`}}function El(e,t,n=void 0){let r={};for(let i in e){let a=e[i],o=``,s=!0;for(let e=0;e<a.length;e+=1){let r=a[e];r&&(o+=(s===!0?``:` `)+t(r),s=!1,n&&n[r]&&(o+=` `+n[r]))}r[i]=o}return r}function Dl(e,t){return L.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}var Ol=(e,t)=>e.filter(e=>t.includes(e)),kl=(e,t,n)=>{let r=e.keys[0];Array.isArray(t)?t.forEach((t,r)=>{n((t,n)=>{r<=e.keys.length-1&&(r===0?Object.assign(t,n):t[e.up(e.keys[r])]=n)},t)}):t&&typeof t==`object`?(Object.keys(t).length>e.keys.length?e.keys:Ol(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.includes(i)){let a=t[i];a!==void 0&&n((t,n)=>{r===i?Object.assign(t,n):t[e.up(i)]=n},a)}}):(typeof t==`number`||typeof t==`string`)&&n((e,t)=>{Object.assign(e,t)},t)};function Al(e){return`--Grid-${e}Spacing`}function jl(e){return`--Grid-parent-${e}Spacing`}var Ml=`--Grid-columns`,Nl=`--Grid-parent-columns`,Pl=({theme:e,ownerState:t})=>{let n={};return kl(e.breakpoints,t.size,(e,t)=>{let r={};t===`grow`&&(r={flexBasis:0,flexGrow:1,maxWidth:`100%`}),t===`auto`&&(r={flexBasis:`auto`,flexGrow:0,flexShrink:0,maxWidth:`none`,width:`auto`}),typeof t==`number`&&(r={flexGrow:0,flexBasis:`auto`,width:`calc(100% * ${t} / var(${Nl}) - (var(${Nl}) - ${t}) * (var(${jl(`column`)}) / var(${Nl})))`}),e(n,r)}),n},Fl=({theme:e,ownerState:t})=>{let n={};return kl(e.breakpoints,t.offset,(e,t)=>{let r={};t===`auto`&&(r={marginLeft:`auto`}),typeof t==`number`&&(r={marginLeft:t===0?`0px`:`calc(100% * ${t} / var(${Nl}) + var(${jl(`column`)}) * ${t} / var(${Nl}))`}),e(n,r)}),n},Il=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={[Ml]:12};return kl(e.breakpoints,t.columns,(e,t)=>{let r=t??12;e(n,{[Ml]:r,"> *":{[Nl]:r}})}),n},Ll=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return kl(e.breakpoints,t.rowSpacing,(t,r)=>{let i=typeof r==`string`?r:e.spacing?.(r);t(n,{[Al(`row`)]:i,"> *":{[jl(`row`)]:i}})}),n},Rl=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return kl(e.breakpoints,t.columnSpacing,(t,r)=>{let i=typeof r==`string`?r:e.spacing?.(r);t(n,{[Al(`column`)]:i,"> *":{[jl(`column`)]:i}})}),n},zl=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return kl(e.breakpoints,t.direction,(e,t)=>{e(n,{flexDirection:t})}),n},Bl=({ownerState:e})=>({minWidth:0,boxSizing:`border-box`,...e.container&&{display:`flex`,flexWrap:`wrap`,...e.wrap&&e.wrap!==`wrap`&&{flexWrap:e.wrap},gap:`var(${Al(`row`)}) var(${Al(`column`)})`}}),Vl=e=>{let t=[];return Object.entries(e).forEach(([e,n])=>{n!==!1&&n!==void 0&&t.push(`grid-${e}-${String(n)}`)}),t},Hl=(e,t=`xs`)=>{function n(e){return e===void 0?!1:typeof e==`string`&&!Number.isNaN(Number(e))||typeof e==`number`&&e>0}if(n(e))return[`spacing-${t}-${String(e)}`];if(typeof e==`object`&&!Array.isArray(e)){let t=[];return Object.entries(e).forEach(([e,r])=>{n(r)&&t.push(`spacing-${e}-${String(r)}`)}),t}return[]},Ul=e=>e===void 0?[]:typeof e==`object`?Object.entries(e).map(([e,t])=>`direction-${e}-${t}`):[`direction-xs-${String(e)}`],Wl=zs(),Gl=uc(`div`,{name:`MuiGrid`,slot:`Root`});function Kl(e){return pc({props:e,name:`MuiGrid`,defaultTheme:Wl})}function ql(e={}){let{createStyledComponent:t=Gl,useThemeProps:n=Kl,useTheme:r=Us,componentName:i=`MuiGrid`}=e,a=(e,t)=>{let{container:n,direction:r,spacing:a,wrap:o,size:s}=e;return El({root:[`root`,n&&`container`,o!==`wrap`&&`wrap-xs-${String(o)}`,...Ul(r),...Vl(s),...n?Hl(a,t.breakpoints.keys[0]):[]]},e=>Zs(i,e),{})};function o(e,t,n=()=>!0){let r={};return e===null||(Array.isArray(e)?e.forEach((e,i)=>{e!==null&&n(e)&&t.keys[i]&&(r[t.keys[i]]=e)}):typeof e==`object`?Object.keys(e).forEach(t=>{let i=e[t];i!=null&&n(i)&&(r[t]=i)}):r[t.keys[0]]=e),r}let s=t(Il,Rl,Ll,Pl,zl,Bl,Fl),c=L.forwardRef(function(e,t){let i=r(),c=n(e),{className:l,children:u,columns:d=12,container:f=!1,component:p=`div`,direction:m=`row`,wrap:h=`wrap`,size:g={},offset:_={},spacing:v=0,rowSpacing:y=v,columnSpacing:b=v,unstable_level:x=0,...S}=c,C=o(g,i.breakpoints,e=>e!==!1),w=o(_,i.breakpoints),T=e.columns??(x?void 0:d),E=e.spacing??(x?void 0:v),D=e.rowSpacing??e.spacing??(x?void 0:y),O=e.columnSpacing??e.spacing??(x?void 0:b),ee={...c,level:x,columns:T,container:f,direction:m,wrap:h,spacing:E,rowSpacing:D,columnSpacing:O,size:C,offset:w},te=a(ee,i);return(0,H.jsx)(s,{ref:t,as:p,ownerState:ee,className:U(te.root,l),...S,children:L.Children.map(u,e=>L.isValidElement(e)&&Dl(e,[`Grid`])&&f&&e.props.container?L.cloneElement(e,{unstable_level:e.props?.unstable_level??x+1}):e)})});return c.muiName=`Grid`,c}var Jl=zs(),Yl=uc(`div`,{name:`MuiStack`,slot:`Root`});function Xl(e){return pc({props:e,name:`MuiStack`,defaultTheme:Jl})}function Zl(e,t){let n=L.Children.toArray(e).filter(Boolean);return n.reduce((e,r,i)=>(e.push(r),i<n.length-1&&e.push(L.cloneElement(t,{key:`separator-${i}`})),e),[])}var Ql=e=>({row:`Left`,"row-reverse":`Right`,column:`Top`,"column-reverse":`Bottom`})[e],$l=({ownerState:e,theme:t})=>{let n={display:`flex`,flexDirection:`column`,...Do({theme:t},Po({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){let r=Yo(t),i=Object.keys(t.breakpoints.values).reduce((t,n)=>((typeof e.spacing==`object`&&e.spacing[n]!=null||typeof e.direction==`object`&&e.direction[n]!=null)&&(t[n]=!0),t),{}),a=Po({values:e.direction,base:i}),o=Po({values:e.spacing,base:i});typeof a==`object`&&Object.keys(a).forEach((e,t,n)=>{if(!a[e]){let r=t>0?a[n[t-1]]:`column`;a[e]=r}}),n=no(n,Do({theme:t},o,(t,n)=>e.useFlexGap?{gap:Xo(r,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Ql(n?a[n]:e.direction)}`]:Xo(r,t)}}))}return n=Mo(t.breakpoints,n),n};function eu(e={}){let{createStyledComponent:t=Yl,useThemeProps:n=Xl,componentName:r=`MuiStack`}=e,i=()=>El({root:[`root`]},e=>Zs(r,e),{}),a=t($l);return L.forwardRef(function(e,t){let{component:r=`div`,direction:o=`column`,spacing:s=0,divider:c,children:l,className:u,useFlexGap:d=!1,...f}=n(e),p={direction:o,spacing:s,useFlexGap:d},m=i();return(0,H.jsx)(a,{as:r,ownerState:p,ref:t,className:U(m.root,u),...f,children:c?Zl(l,c):l})})}function tu(){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:kr.white,default:kr.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}}}var nu=tu();function ru(){return{text:{primary:kr.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:kr.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}}}var iu=ru();function au(e,t,n,r){let i=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t===`light`?e.light=Nc(e.main,i):t===`dark`&&(e.dark=jc(e.main,a)))}function ou(e,t,n,r,i){let a=i.light||i,o=i.dark||i*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n===`light`?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(a*100).toFixed(0)}%)`:n===`dark`&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(o*100).toFixed(0)}%)`))}function su(e=`light`){return e===`dark`?{main:Mr[200],light:Mr[50],dark:Mr[400]}:{main:Mr[700],light:Mr[400],dark:Mr[800]}}function cu(e=`light`){return e===`dark`?{main:jr[200],light:jr[50],dark:jr[400]}:{main:jr[500],light:jr[300],dark:jr[700]}}function lu(e=`light`){return e===`dark`?{main:Ar[500],light:Ar[300],dark:Ar[700]}:{main:Ar[700],light:Ar[400],dark:Ar[800]}}function uu(e=`light`){return e===`dark`?{main:Nr[400],light:Nr[300],dark:Nr[700]}:{main:Nr[700],light:Nr[500],dark:Nr[900]}}function du(e=`light`){return e===`dark`?{main:Pr[400],light:Pr[300],dark:Pr[700]}:{main:Pr[800],light:Pr[500],dark:Pr[900]}}function fu(e=`light`){return e===`dark`?{main:Fr[400],light:Fr[300],dark:Fr[700]}:{main:`#ed6c02`,light:Fr[500],dark:Fr[900]}}function pu(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function mu(e){let{mode:t=`light`,contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:i,...a}=e,o=e.primary||su(t),s=e.secondary||cu(t),c=e.error||lu(t),l=e.info||uu(t),u=e.success||du(t),d=e.warning||fu(t);function f(e){return i?pu(e):Oc(e,iu.text.primary)>=n?iu.text.primary:nu.text.primary}let p=({color:e,name:t,mainShade:n=500,lightShade:a=300,darkShade:o=700})=>{if(e={...e},!e.main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty(`main`))throw Error(Rr(11,t?` (${t})`:``,n));if(typeof e.main!=`string`)throw Error(Rr(12,t?` (${t})`:``,JSON.stringify(e.main)));return i?(ou(i,e,`light`,a,r),ou(i,e,`dark`,o,r)):(au(e,`light`,a,r),au(e,`dark`,o,r)),e.contrastText||(e.contrastText=f(e.main)),e},m;return t===`light`?m=tu():t===`dark`&&(m=ru()),no({common:{...kr},mode:t,primary:p({color:o,name:`primary`}),secondary:p({color:s,name:`secondary`,mainShade:`A400`,lightShade:`A200`,darkShade:`A700`}),error:p({color:c,name:`error`}),warning:p({color:d,name:`warning`}),info:p({color:l,name:`info`}),success:p({color:u,name:`success`}),grey:Lr,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r,...m},a)}var hu=`--_focusVisible-offset`,gu=`--_focusVisible-behavior`,_u=`--_focusVisible-shadow`,vu=`var(${hu}, 1)`,yu=`var(${gu}, )`,bu={[hu]:1,[gu]:`initial`};function xu(e){return{[_u]:e}}function Su(e){return{[hu]:-e,[gu]:`inset`}}function Cu(e,t){return t.reduce((e,t)=>t&&`focusVisible`in t?no(e,{focusVisible:t.focusVisible}):e,{focusVisible:e}).focusVisible}function wu(e){return typeof e==`object`&&!!e&&typeof e.outlineOffset==`string`&&e.outlineOffset.includes(hu)}function Tu(e,t){return Eu({outlineStyle:`solid`,outlineColor:t,outlineWidth:2,outlineOffset:2,boxShadow:`var(${_u}, 0 0)`,...e===!0?null:e})}function Eu(e){let t=e.outlineOffset??0;(typeof t!=`string`||!t.includes(hu))&&(e.outlineOffset=`calc(${vu} * ${typeof t==`number`?`${t}px`:t})`);let n=new Set([`none`,`initial`,`inherit`,`unset`,`revert`,`revert-layer`]);return typeof e.boxShadow==`string`&&!n.has(e.boxShadow.trim().toLowerCase())&&!/\binset\b/.test(e.boxShadow)&&!e.boxShadow.includes(gu)&&(e.boxShadow=`${yu} ${e.boxShadow}`),e}function Du(e){let t={};return Object.entries(e).forEach(e=>{let[n,r]=e;typeof r==`object`&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:``}${r.fontVariant?`${r.fontVariant} `:``}${r.fontWeight?`${r.fontWeight} `:``}${r.fontStretch?`${r.fontStretch} `:``}${r.fontSize||``}${r.lineHeight?`/${r.lineHeight} `:``}${r.fontFamily||``}`)}),t}function Ou(e,t){return{toolbar:{minHeight:56,[e.up(`xs`)]:{"@media (orientation: landscape)":{minHeight:48}},[e.up(`sm`)]:{minHeight:64}},...t}}function ku(e){return Math.round(e*1e5)/1e5}var Au={textTransform:`uppercase`},ju=`"Roboto", "Helvetica", "Arial", sans-serif`;function Mu(e,t){let{fontFamily:n=ju,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:l,pxToRem:u,...d}=typeof t==`function`?t(e):t,f=r/14,p=u||(e=>`${e/c*f}rem`),m=(e,t,r,i,a)=>({fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===ju?{letterSpacing:`${ku(i/t)}em`}:{},...a,...l});return no({htmlFontSize:c,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(o,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(o,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(o,14,1.75,.4,Au),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,Au),inherit:{fontFamily:`inherit`,fontWeight:`inherit`,fontSize:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},d,{clone:!1})}var Nu=.2,Pu=.14,Fu=.12;function Iu(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Nu})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Pu})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Fu})`].join(`,`)}var Lu=[`none`,Iu(0,2,1,-1,0,1,1,0,0,1,3,0),Iu(0,3,1,-2,0,2,2,0,0,1,5,0),Iu(0,3,3,-2,0,3,4,0,0,1,8,0),Iu(0,2,4,-1,0,4,5,0,0,1,10,0),Iu(0,3,5,-1,0,5,8,0,0,1,14,0),Iu(0,3,5,-1,0,6,10,0,0,1,18,0),Iu(0,4,5,-2,0,7,10,1,0,2,16,1),Iu(0,5,5,-3,0,8,10,1,0,3,14,2),Iu(0,5,6,-3,0,9,12,1,0,3,16,2),Iu(0,6,6,-3,0,10,14,1,0,4,18,3),Iu(0,6,7,-4,0,11,15,1,0,4,20,3),Iu(0,7,8,-4,0,12,17,2,0,5,22,4),Iu(0,7,8,-4,0,13,19,2,0,5,24,4),Iu(0,7,9,-4,0,14,21,2,0,5,26,4),Iu(0,8,9,-5,0,15,22,2,0,6,28,5),Iu(0,8,10,-5,0,16,24,2,0,6,30,5),Iu(0,8,11,-5,0,17,26,2,0,6,32,5),Iu(0,9,11,-5,0,18,28,2,0,7,34,6),Iu(0,9,12,-6,0,19,29,2,0,7,36,6),Iu(0,10,13,-6,0,20,31,3,0,8,38,7),Iu(0,10,13,-6,0,21,33,3,0,8,40,7),Iu(0,10,14,-6,0,22,35,3,0,8,42,7),Iu(0,11,14,-7,0,23,36,3,0,9,44,8),Iu(0,11,15,-7,0,24,38,3,0,9,46,8)],Ru=[`all`],zu={},Bu={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)`},Vu={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Hu(e){return`${Math.round(e)}ms`}function Uu(e){if(!e)return 0;let t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Wu(e){let t={...e};delete t.reducedMotion;let n={...Bu,...t.easing},r={...Vu,...t.duration};return{getAutoHeightDuration:Uu,create:t.create??((e=Ru,t=zu)=>{let{duration:i=r.standard,easing:a=n.easeInOut,delay:o=0,...s}=t;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${typeof i==`string`?i:Hu(i)} ${a} ${typeof o==`string`?o:Hu(o)}`).join(`,`)}),...t,easing:n,duration:r}}var Gu={};function Ku(e=Gu){return{reducedMotion:`never`,...e}}var qu={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Ju(e){return eo(e)||e===void 0||typeof e==`string`||typeof e==`boolean`||typeof e==`number`||Array.isArray(e)}function Yu(e={}){let t={...e};function n(e){let t=Object.entries(e);for(let r=0;r<t.length;r++){let[i,a]=t[r];!Ju(a)||i.startsWith(`unstable_`)||i.startsWith(`internal_`)?delete e[i]:eo(a)&&(e[i]={...a},n(e[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
59
|
+
|
|
60
|
+
const theme = ${JSON.stringify(t,null,2)};
|
|
61
|
+
|
|
62
|
+
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
63
|
+
theme.motion = { reducedMotion: 'never', ...theme.motion };
|
|
64
|
+
theme.transitions = createTransitions(theme.transitions || {});
|
|
65
|
+
|
|
66
|
+
export default theme;`}function Xu(e){return typeof e==`number`?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}var Zu=e=>{if(!Number.isNaN(+e))return+e;let t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let e=0;e<t.length;e+=1)n+=+t[e];return n};function Qu(e){Object.assign(e,{alpha(t,n){let r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n==`string`?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,`var(--$1Channel)`)} / ${typeof n==`string`?`calc(${n})`:n})`:kc(t,Zu(n))},lighten(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Xu(n)})`:Nc(t,n)},darken(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Xu(n)})`:jc(t,n)}})}function $u(e={},...t){let{breakpoints:n,mixins:r={},spacing:i,palette:a={},motion:o={},transitions:s={},typography:c={},shape:l,colorSpace:u,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw Error(Rr(22));let f=mu({...a,colorSpace:u}),p=zs(e),m=no(p,{mixins:Ou(p.breakpoints,r),palette:f,shadows:Lu.slice(),typography:Mu(f,c),motion:Ku(o),transitions:Wu(s),zIndex:{...qu}});return m=no(m,d),m=t.reduce((e,t)=>no(e,t),m),delete m.transitions.reducedMotion,m.focusVisible!=null&&m.focusVisible!==!1&&(m.focusVisible=Tu(m.focusVisible,m.palette.primary.main)),m.unstable_sxConfig={...Ms,...d?.unstable_sxConfig},m.unstable_sx=function(e){return Fs({sx:e,theme:this})},m.toRuntimeSource=Yu,Qu(m),m}function ed(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}var td=[...Array(25)].map((e,t)=>{if(t===0)return`none`;let n=ed(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function nd(e){return{inputPlaceholder:e===`dark`?.5:.42,inputUnderline:e===`dark`?.7:.42,switchTrackDisabled:e===`dark`?.2:.12,switchTrack:e===`dark`?.3:.38}}function rd(e){return e===`dark`?td:[]}function id(e){let{palette:t={mode:`light`},opacity:n,overlays:r,colorSpace:i,...a}=e,o=mu({...t,colorSpace:i});return{palette:o,opacity:{...nd(o.mode),...n},overlays:r||rd(o.mode),...a}}function ad(e){return e[0]===`motion`||e[0]===`focusVisible`||!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]===`palette`&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var od=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:``}overlays-${n}`),`--${e?`${e}-`:``}palette-AppBar-darkBg`,`--${e?`${e}-`:``}palette-AppBar-darkColor`],sd=e=>(t,n)=>{let r=e.rootSelector||`:root`,i=e.colorSchemeSelector,a=i;if(i===`class`&&(a=`.%s`),i===`data`&&(a=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t===`dark`){let i={};return od(e.cssVarPrefix).forEach(e=>{i[e]=n[e],delete n[e]}),a===`media`?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:a?{[a.replace(`%s`,t)]:i,[`${r}, ${a.replace(`%s`,t)}`]:n}:{[r]:{...n,...i}}}if(a&&a!==`media`)return`${r}, ${a.replace(`%s`,String(t))}`}else if(t){if(a===`media`)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(a)return a.replace(`%s`,String(t))}return r};function cd(e,t){t.forEach(t=>{e[t]||(e[t]={})})}function W(e,t,n){!e[t]&&n&&(e[t]=n)}function ld(e){return typeof e!=`string`||!e.startsWith(`hsl`)?e:Ec(e)}function ud(e,t){`${t}Channel`in e||(e[`${t}Channel`]=wc(ld(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().
|
|
67
|
+
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 dd(e){return typeof e==`number`?`${e}px`:typeof e==`string`||typeof e==`function`||Array.isArray(e)?e:`8px`}var fd=e=>{try{return e()}catch{}},pd=(e=`mui`)=>vl(e);function md(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;let a=i===`dark`?`dark`:`light`;if(!r){t[i]=id({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}let{palette:o,...s}=$u({...r,palette:{mode:a,...n?.palette},colorSpace:e});return t[i]={...n,palette:o,opacity:{...nd(a),...n?.opacity},overlays:n?.overlays||rd(a)},s}function hd(e={},...t){let{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:a=`mui`,nativeColor:o=!1,shouldSkipGeneratingVar:s=ad,colorSchemeSelector:c=n.light&&n.dark?`media`:void 0,rootSelector:l=`:root`,...u}=e,d=Object.keys(n)[0],f=r||(n.light&&d!==`light`?`light`:d),p=pd(a),{[f]:m,light:h,dark:g,..._}=n,v={..._},y=m;if((f===`dark`&&!(`dark`in n)||f===`light`&&!(`light`in n))&&(y=!0),!y)throw Error(Rr(21,f));let b;o&&(b=`oklch`);let x=md(b,v,y,u,f);h&&!v.light&&md(b,v,h,void 0,`light`),g&&!v.dark&&md(b,v,g,void 0,`dark`);let S={defaultColorScheme:f,...x,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:l,getCssVar:p,colorSchemes:v,font:{...Du(x.typography),...x.font},spacing:dd(u.spacing)};Object.keys(S.colorSchemes).forEach(e=>{let t=S.colorSchemes[e].palette,n=e=>{let n=e.split(`-`),r=n[1],i=n[2];return p(e,t[r][i])};t.mode===`light`&&(W(t.common,`background`,`#fff`),W(t.common,`onBackground`,`#000`)),t.mode===`dark`&&(W(t.common,`background`,`#000`),W(t.common,`onBackground`,`#fff`));function r(e,t,n){if(b){let r;return e===Ac&&(r=`transparent ${((1-n)*100).toFixed(0)}%`),e===Mc&&(r=`#000 ${(n*100).toFixed(0)}%`),e===Pc&&(r=`#fff ${(n*100).toFixed(0)}%`),`color-mix(in ${b}, ${t}, ${r})`}return e(t,n)}if(cd(t,[`Alert`,`AppBar`,`Avatar`,`Button`,`Chip`,`FilledInput`,`LinearProgress`,`Skeleton`,`Slider`,`SnackbarContent`,`SpeedDialAction`,`StepConnector`,`StepContent`,`Switch`,`TableCell`,`Tooltip`]),t.mode===`light`){W(t.Alert,`errorColor`,r(Mc,o?p(`palette-error-light`):t.error.light,.6)),W(t.Alert,`infoColor`,r(Mc,o?p(`palette-info-light`):t.info.light,.6)),W(t.Alert,`successColor`,r(Mc,o?p(`palette-success-light`):t.success.light,.6)),W(t.Alert,`warningColor`,r(Mc,o?p(`palette-warning-light`):t.warning.light,.6)),W(t.Alert,`errorFilledBg`,n(`palette-error-main`)),W(t.Alert,`infoFilledBg`,n(`palette-info-main`)),W(t.Alert,`successFilledBg`,n(`palette-success-main`)),W(t.Alert,`warningFilledBg`,n(`palette-warning-main`)),W(t.Alert,`errorFilledColor`,fd(()=>t.getContrastText(t.error.main))),W(t.Alert,`infoFilledColor`,fd(()=>t.getContrastText(t.info.main))),W(t.Alert,`successFilledColor`,fd(()=>t.getContrastText(t.success.main))),W(t.Alert,`warningFilledColor`,fd(()=>t.getContrastText(t.warning.main))),W(t.Alert,`errorStandardBg`,r(Pc,o?p(`palette-error-light`):t.error.light,.9)),W(t.Alert,`infoStandardBg`,r(Pc,o?p(`palette-info-light`):t.info.light,.9)),W(t.Alert,`successStandardBg`,r(Pc,o?p(`palette-success-light`):t.success.light,.9)),W(t.Alert,`warningStandardBg`,r(Pc,o?p(`palette-warning-light`):t.warning.light,.9)),W(t.Alert,`errorIconColor`,n(`palette-error-main`)),W(t.Alert,`infoIconColor`,n(`palette-info-main`)),W(t.Alert,`successIconColor`,n(`palette-success-main`)),W(t.Alert,`warningIconColor`,n(`palette-warning-main`)),W(t.AppBar,`defaultBg`,n(`palette-grey-100`)),W(t.Avatar,`defaultBg`,n(`palette-grey-400`)),W(t.Button,`inheritContainedBg`,n(`palette-grey-300`)),W(t.Button,`inheritContainedHoverBg`,n(`palette-grey-A100`)),W(t.Chip,`defaultBorder`,n(`palette-grey-400`)),W(t.Chip,`defaultAvatarColor`,n(`palette-grey-700`)),W(t.Chip,`defaultIconColor`,n(`palette-grey-700`)),W(t.FilledInput,`bg`,`rgba(0, 0, 0, 0.06)`),W(t.FilledInput,`hoverBg`,`rgba(0, 0, 0, 0.09)`),W(t.FilledInput,`disabledBg`,`rgba(0, 0, 0, 0.12)`),W(t.LinearProgress,`primaryBg`,r(Pc,o?p(`palette-primary-main`):t.primary.main,.62)),W(t.LinearProgress,`secondaryBg`,r(Pc,o?p(`palette-secondary-main`):t.secondary.main,.62)),W(t.LinearProgress,`errorBg`,r(Pc,o?p(`palette-error-main`):t.error.main,.62)),W(t.LinearProgress,`infoBg`,r(Pc,o?p(`palette-info-main`):t.info.main,.62)),W(t.LinearProgress,`successBg`,r(Pc,o?p(`palette-success-main`):t.success.main,.62)),W(t.LinearProgress,`warningBg`,r(Pc,o?p(`palette-warning-light`):t.warning.main,.62)),W(t.Skeleton,`bg`,b?r(Ac,o?p(`palette-text-primary`):t.text.primary,.11):`rgba(${n(`palette-text-primaryChannel`)} / 0.11)`),W(t.Slider,`primaryTrack`,r(Pc,o?p(`palette-primary-main`):t.primary.main,.62)),W(t.Slider,`secondaryTrack`,r(Pc,o?p(`palette-secondary-main`):t.secondary.main,.62)),W(t.Slider,`errorTrack`,r(Pc,o?p(`palette-error-main`):t.error.main,.62)),W(t.Slider,`infoTrack`,r(Pc,o?p(`palette-info-main`):t.info.main,.62)),W(t.Slider,`successTrack`,r(Pc,o?p(`palette-success-main`):t.success.main,.62)),W(t.Slider,`warningTrack`,r(Pc,o?p(`palette-warning-main`):t.warning.main,.62));let e=b?r(Mc,o?p(`palette-background-default`):t.background.default,.6825):Ic(t.background.default,.8);W(t.SnackbarContent,`bg`,e),W(t.SnackbarContent,`color`,fd(()=>b?iu.text.primary:t.getContrastText(e))),W(t.SpeedDialAction,`fabHoverBg`,Ic(t.background.paper,.15)),W(t.StepConnector,`border`,n(`palette-grey-400`)),W(t.StepContent,`border`,n(`palette-grey-400`)),W(t.Switch,`defaultColor`,n(`palette-common-white`)),W(t.Switch,`defaultDisabledColor`,n(`palette-grey-100`)),W(t.Switch,`primaryDisabledColor`,r(Pc,o?p(`palette-primary-main`):t.primary.main,.62)),W(t.Switch,`secondaryDisabledColor`,r(Pc,o?p(`palette-secondary-main`):t.secondary.main,.62)),W(t.Switch,`errorDisabledColor`,r(Pc,o?p(`palette-error-main`):t.error.main,.62)),W(t.Switch,`infoDisabledColor`,r(Pc,o?p(`palette-info-main`):t.info.main,.62)),W(t.Switch,`successDisabledColor`,r(Pc,o?p(`palette-success-main`):t.success.main,.62)),W(t.Switch,`warningDisabledColor`,r(Pc,o?p(`palette-warning-main`):t.warning.main,.62)),W(t.TableCell,`border`,r(Pc,Ac(o?p(`palette-divider`):t.divider,1),.88)),W(t.Tooltip,`bg`,r(Ac,o?p(`palette-grey-700`):t.grey[700],.92))}if(t.mode===`dark`){W(t.Alert,`errorColor`,r(Pc,o?p(`palette-error-light`):t.error.light,.6)),W(t.Alert,`infoColor`,r(Pc,o?p(`palette-info-light`):t.info.light,.6)),W(t.Alert,`successColor`,r(Pc,o?p(`palette-success-light`):t.success.light,.6)),W(t.Alert,`warningColor`,r(Pc,o?p(`palette-warning-light`):t.warning.light,.6)),W(t.Alert,`errorFilledBg`,n(`palette-error-dark`)),W(t.Alert,`infoFilledBg`,n(`palette-info-dark`)),W(t.Alert,`successFilledBg`,n(`palette-success-dark`)),W(t.Alert,`warningFilledBg`,n(`palette-warning-dark`)),W(t.Alert,`errorFilledColor`,fd(()=>t.getContrastText(t.error.dark))),W(t.Alert,`infoFilledColor`,fd(()=>t.getContrastText(t.info.dark))),W(t.Alert,`successFilledColor`,fd(()=>t.getContrastText(t.success.dark))),W(t.Alert,`warningFilledColor`,fd(()=>t.getContrastText(t.warning.dark))),W(t.Alert,`errorStandardBg`,r(Mc,o?p(`palette-error-light`):t.error.light,.9)),W(t.Alert,`infoStandardBg`,r(Mc,o?p(`palette-info-light`):t.info.light,.9)),W(t.Alert,`successStandardBg`,r(Mc,o?p(`palette-success-light`):t.success.light,.9)),W(t.Alert,`warningStandardBg`,r(Mc,o?p(`palette-warning-light`):t.warning.light,.9)),W(t.Alert,`errorIconColor`,n(`palette-error-main`)),W(t.Alert,`infoIconColor`,n(`palette-info-main`)),W(t.Alert,`successIconColor`,n(`palette-success-main`)),W(t.Alert,`warningIconColor`,n(`palette-warning-main`)),W(t.AppBar,`defaultBg`,n(`palette-grey-900`)),W(t.AppBar,`darkBg`,n(`palette-background-paper`)),W(t.AppBar,`darkColor`,n(`palette-text-primary`)),W(t.Avatar,`defaultBg`,n(`palette-grey-600`)),W(t.Button,`inheritContainedBg`,n(`palette-grey-800`)),W(t.Button,`inheritContainedHoverBg`,n(`palette-grey-700`)),W(t.Chip,`defaultBorder`,n(`palette-grey-700`)),W(t.Chip,`defaultAvatarColor`,n(`palette-grey-300`)),W(t.Chip,`defaultIconColor`,n(`palette-grey-300`)),W(t.FilledInput,`bg`,`rgba(255, 255, 255, 0.09)`),W(t.FilledInput,`hoverBg`,`rgba(255, 255, 255, 0.13)`),W(t.FilledInput,`disabledBg`,`rgba(255, 255, 255, 0.12)`),W(t.LinearProgress,`primaryBg`,r(Mc,o?p(`palette-primary-main`):t.primary.main,.5)),W(t.LinearProgress,`secondaryBg`,r(Mc,o?p(`palette-secondary-main`):t.secondary.main,.5)),W(t.LinearProgress,`errorBg`,r(Mc,o?p(`palette-error-main`):t.error.main,.5)),W(t.LinearProgress,`infoBg`,r(Mc,o?p(`palette-info-main`):t.info.main,.5)),W(t.LinearProgress,`successBg`,r(Mc,o?p(`palette-success-main`):t.success.main,.5)),W(t.LinearProgress,`warningBg`,r(Mc,o?p(`palette-warning-main`):t.warning.main,.5)),W(t.Skeleton,`bg`,b?r(Ac,o?p(`palette-text-primary`):t.text.primary,.13):`rgba(${n(`palette-text-primaryChannel`)} / 0.13)`),W(t.Slider,`primaryTrack`,r(Mc,o?p(`palette-primary-main`):t.primary.main,.5)),W(t.Slider,`secondaryTrack`,r(Mc,o?p(`palette-secondary-main`):t.secondary.main,.5)),W(t.Slider,`errorTrack`,r(Mc,o?p(`palette-error-main`):t.error.main,.5)),W(t.Slider,`infoTrack`,r(Mc,o?p(`palette-info-main`):t.info.main,.5)),W(t.Slider,`successTrack`,r(Mc,o?p(`palette-success-main`):t.success.main,.5)),W(t.Slider,`warningTrack`,r(Mc,o?p(`palette-warning-light`):t.warning.main,.5));let e=b?r(Pc,o?p(`palette-background-default`):t.background.default,.985):Ic(t.background.default,.98);W(t.SnackbarContent,`bg`,e),W(t.SnackbarContent,`color`,fd(()=>b?nu.text.primary:t.getContrastText(e))),W(t.SpeedDialAction,`fabHoverBg`,Ic(t.background.paper,.15)),W(t.StepConnector,`border`,n(`palette-grey-600`)),W(t.StepContent,`border`,n(`palette-grey-600`)),W(t.Switch,`defaultColor`,n(`palette-grey-300`)),W(t.Switch,`defaultDisabledColor`,n(`palette-grey-600`)),W(t.Switch,`primaryDisabledColor`,r(Mc,o?p(`palette-primary-main`):t.primary.main,.55)),W(t.Switch,`secondaryDisabledColor`,r(Mc,o?p(`palette-secondary-main`):t.secondary.main,.55)),W(t.Switch,`errorDisabledColor`,r(Mc,o?p(`palette-error-main`):t.error.main,.55)),W(t.Switch,`infoDisabledColor`,r(Mc,o?p(`palette-info-main`):t.info.main,.55)),W(t.Switch,`successDisabledColor`,r(Mc,o?p(`palette-success-main`):t.success.main,.55)),W(t.Switch,`warningDisabledColor`,r(Mc,o?p(`palette-warning-light`):t.warning.main,.55)),W(t.TableCell,`border`,r(Mc,Ac(o?p(`palette-divider`):t.divider,1),.68)),W(t.Tooltip,`bg`,r(Ac,o?p(`palette-grey-700`):t.grey[700],.92))}o||(ud(t.background,`default`),ud(t.background,`paper`),ud(t.common,`background`),ud(t.common,`onBackground`),ud(t,`divider`)),Object.keys(t).forEach(e=>{let n=t[e];e!==`tonalOffset`&&!o&&n&&typeof n==`object`&&(n.main&&W(t[e],`mainChannel`,wc(ld(n.main))),n.light&&W(t[e],`lightChannel`,wc(ld(n.light))),n.dark&&W(t[e],`darkChannel`,wc(ld(n.dark))),n.contrastText&&W(t[e],`contrastTextChannel`,wc(ld(n.contrastText))),e===`text`&&(ud(t[e],`primary`),ud(t[e],`secondary`)),e===`action`&&(n.active&&ud(t[e],`active`),n.selected&&ud(t[e],`selected`)))})}),S=t.reduce((e,t)=>no(e,t),S);let C=Cu(e.focusVisible,t);C!=null&&C!==!1&&(S.focusVisible=Tu(C,p(`palette-primary-main`)));let w={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:sd(S),enableContrastVars:o},{vars:T,generateThemeVars:E,generateStyleSheets:D}=wl(S,w);return S.vars=T,Object.entries(S.colorSchemes[S.defaultColorScheme]).forEach(([e,t])=>{S[e]=t}),S.generateThemeVars=E,S.generateStyleSheets=D,S.generateSpacing=function(){return rs(u.spacing,Yo(this))},S.getColorSchemeSelector=Tl(c),S.spacing=S.generateSpacing(),S.shouldSkipGeneratingVar=s,S.unstable_sxConfig={...Ms,...u?.unstable_sxConfig},S.unstable_sx=function(e){return Fs({sx:e,theme:this})},S.internal_cache={},S.toRuntimeSource=Yu,S}function gd(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:mu({...n===!0?{}:n.palette,mode:t})})}function _d(e={},...t){let{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...o}=e,s=a||`light`,c=i?.[s],l={...i,...n?{[s]:{...typeof c!=`boolean`&&c,palette:n}}:void 0};if(r===!1){if(!(`colorSchemes`in e))return $u(e,...t);let r=n;`palette`in e||l[s]&&(l[s]===!0?s===`dark`&&(r={mode:`dark`}):r=l[s].palette);let i=$u({...e,palette:r},...t);if(i.defaultColorScheme=s,i.colorSchemes=l,i.palette.mode===`light`&&(i.colorSchemes.light={...l.light!==!0&&l.light,palette:i.palette},gd(i,`dark`,l.dark)),i.palette.mode===`dark`&&(i.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:i.palette},gd(i,`light`,l.light)),i.focusVisible!=null&&i.focusVisible!==!1){let n=i.focusVisible,r=Cu(e.focusVisible,t),a=r&&typeof r==`object`?r.outlineColor:void 0;if(!a||wu(r)&&a===i.palette.primary.main){let{outlineColor:e,...t}=n;n=t}Object.keys(i.colorSchemes).forEach(e=>{let t=i.colorSchemes?.[e]?.palette;t?.primary&&(i.colorSchemes[e].focusVisible=Tu(n,t.primary.main))})}return i}return!n&&!(`light`in l)&&s===`light`&&(l.light=!0),hd({...o,colorSchemes:l,defaultColorScheme:s,...typeof r!=`boolean`&&r},...t)}function vd(e){return Zs(`MuiAccordionSummary`,e)}var yd=Qs(`MuiAccordionSummary`,[`root`,`expanded`,`focusVisible`,`disabled`,`gutters`,`content`,`expandIconWrapper`]);function bd(e){return Zs(`MuiAutocomplete`,e)}var xd=Qs(`MuiAutocomplete`,`root.expanded.fullWidth.focused.focusVisible.tag.tagSizeSmall.tagSizeMedium.hasPopupIcon.hasClearIcon.inputRoot.input.inputFocused.endAdornment.clearIndicator.popupIndicator.popupIndicatorOpen.popper.popperDisablePortal.paper.listbox.loading.noOptions.status.option.groupLabel.groupUl`.split(`.`));function Sd(e){return Zs(`MuiCheckbox`,e)}var Cd=Qs(`MuiCheckbox`,[`root`,`checked`,`disabled`,`indeterminate`,`colorPrimary`,`colorSecondary`,`sizeSmall`,`sizeMedium`]);function wd(e){return typeof e==`string`}function Td(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}function Ed(...e){let t=L.useRef(void 0),n=L.useCallback(t=>{let n=e.map(e=>{if(e==null)return null;if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}});return()=>{n.forEach(e=>e?.())}},e);return L.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}function Dd(e){let t=L.useRef(e);return mc(()=>{t.current=e}),L.useRef((...e)=>(0,t.current)(...e)).current}function Od(e){return e&&e.ownerDocument||document}function kd(e){return Od(e).defaultView||window}function Ad(e){return parseInt(e,10)||0}var jd={shadow:{visibility:`hidden`,position:`absolute`,overflow:`hidden`,height:0,top:0,left:0,transform:`translateZ(0)`}};function Md(e){for(let t in e)return!1;return!0}function Nd(e){return Md(e)||e.outerHeightStyle===0&&!e.overflowing}var Pd=L.forwardRef(function(e,t){let{onChange:n,maxRows:r,minRows:i=1,style:a,value:o,...s}=e,{current:c}=L.useRef(o!=null),l=L.useRef(null),u=Ed(t,l),d=L.useRef(null),f=L.useRef(null),p=L.useCallback(()=>{let t=l.current,n=f.current;if(!t||!n)return;let a=kd(t).getComputedStyle(t);if(a.width===`0px`)return{outerHeightStyle:0,overflowing:!1};n.style.width=a.width,n.value=t.value||e.placeholder||`x`,n.value.slice(-1)===`
|
|
68
|
+
`&&(n.value+=` `);let o=a.boxSizing,s=Ad(a.paddingBottom)+Ad(a.paddingTop),c=Ad(a.borderBottomWidth)+Ad(a.borderTopWidth),u=n.scrollHeight;n.value=`x`;let d=n.scrollHeight,p=u;return i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d),{outerHeightStyle:p+(o===`border-box`?s+c:0),overflowing:Math.abs(p-u)<=1}},[r,i,e.placeholder]),m=Dd(()=>{let e=l.current,t=p();if(!e||!t||Nd(t))return!1;let n=t.outerHeightStyle;return d.current!=null&&d.current!==n}),h=L.useCallback(()=>{let e=l.current,t=p();if(!e||!t||Nd(t))return;let n=t.outerHeightStyle;d.current!==n&&(d.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?`hidden`:``},[p]),g=L.useRef(-1);return mc(()=>{let e=Td(h),t=l?.current;if(!t)return;let n=kd(t);n.addEventListener(`resize`,e);let r;return typeof ResizeObserver<`u`&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(g.current),h(),g.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(g.current),n.removeEventListener(`resize`,e),r&&r.disconnect()}},[p,h,m]),mc(()=>{h()}),(0,H.jsxs)(L.Fragment,{children:[(0,H.jsx)(`textarea`,{value:o,onChange:e=>{c||h();let t=e.target,r=t.value.length,i=t.value.endsWith(`
|
|
69
|
+
`),a=t.selectionStart===r;i&&a&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:i,style:a,...s}),(0,H.jsx)(`textarea`,{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...jd.shadow,...a,paddingTop:0,paddingBottom:0}})]})}),Fd=L.createContext(void 0);function Id(){return L.useContext(Fd)}function Ld({props:e,states:t}){let n=L.useContext(Fd),r={};return t.forEach(t=>{let i=e[t];r[t]=i===void 0&&n?n[t]:i}),[r,n]}var Rd=_d();function zd(){let e=Us(Rd);return e.$$material||e}function Bd(e){return(0,H.jsx)(Gs,{...e,defaultTheme:Rd,themeId:zr})}function Vd(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}var Hd=e=>Vd(e)&&e!==`classes`,G=sc({themeId:zr,defaultTheme:Rd,rootShouldForwardProp:Hd});function Ud(e){return function(t){return(0,H.jsx)(Bd,{styles:typeof e==`function`?n=>e({theme:n,...t}):e})}}var Wd=il;function Gd(e){return Jc(e)}var K=Io,Kd=Ed,qd=mc,Jd=Od;function Yd(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var Xd=Yd;function Zd(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Qd(e,t=!1){return e&&(Zd(e.value)&&e.value!==``||t&&Zd(e.defaultValue)&&e.defaultValue!==``)}function $d(e){return e.startAdornment}function ef(e){return Zs(`MuiInputBase`,e)}var tf=Qs(`MuiInputBase`,[`root`,`formControl`,`focused`,`disabled`,`adornedStart`,`adornedEnd`,`error`,`sizeSmall`,`multiline`,`colorSecondary`,`fullWidth`,`hiddenLabel`,`readOnly`,`input`,`inputTypeSearch`]),nf={transition:`none`};function rf(e,t){return e===`always`?t:e===`system`?{"@media (prefers-reduced-motion: reduce)":t}:null}var af=e=>e.scrollTop,of={},sf=[`all`],cf={};function lf(e,t){return n=>{if(t){let r=e.current;n===void 0?t(r):t(r,n)}}}function uf(e,t,n,r,i,a){let o=e===`exited`&&!t?r:n[e]||n.exited;return i||a?{...o,...i,...a}:o}function df(e,t){let{timeout:n,easing:r,style:i=of}=e;return{duration:i.transitionDuration??(typeof n==`number`?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r==`object`?r[t.mode]:r),delay:i.transitionDelay}}function ff(e,t){let n=t??nf;return rf(e.motion?.reducedMotion,n)}function pf(e,t=sf,n=cf){let r=e.transitions?.create?.(t,n),i=ff(e);if(r===void 0)return i??of;let a={transition:r};return i?{...a,...i}:a}var mf,hf=`mui-auto-fill`,gf=`mui-auto-fill-cancel`,_f=(e,t)=>{let{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size===`small`&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${K(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},vf=(e,t)=>{let{ownerState:n}=e;return[t.input,n.type===`search`&&t.inputTypeSearch]},yf=e=>{let{classes:t,color:n,disabled:r,error:i,endAdornment:a,focused:o,formControl:s,fullWidth:c,hiddenLabel:l,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e;return El({root:[`root`,`color${K(n)}`,r&&`disabled`,i&&`error`,c&&`fullWidth`,o&&`focused`,s&&`formControl`,f&&f!==`medium`&&`size${K(f)}`,u&&`multiline`,p&&`adornedStart`,a&&`adornedEnd`,l&&`hiddenLabel`,d&&`readOnly`],input:[`input`,r&&`disabled`,m===`search`&&`inputTypeSearch`,d&&`readOnly`]},ef,t)},bf=G(`div`,{name:`MuiInputBase`,slot:`Root`,overridesResolver:_f})(Wd(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:`1.4375em`,boxSizing:`border-box`,position:`relative`,cursor:`text`,display:`inline-flex`,alignItems:`center`,[`&.${tf.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:`default`},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:`4px 0 5px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:`100%`}}]}))),xf=G(`input`,{name:`MuiInputBase`,slot:`Input`,overridesResolver:vf})(Wd(({theme:e})=>{let t=e.palette.mode===`light`,n={color:`currentColor`,...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},...pf(e,`opacity`,{duration:e.transitions.duration.shorter})},r={opacity:`0 !important`},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:`inherit`,letterSpacing:`inherit`,color:`currentColor`,padding:`4px 0 5px`,border:0,boxSizing:`content-box`,background:`none`,height:`1.4375em`,margin:0,WebkitTapHighlightColor:`transparent`,display:`block`,minWidth:0,width:`100%`,"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:`none`},"&::-webkit-search-decoration":{WebkitAppearance:`none`},[`label[data-shrink=false] + .${tf.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${tf.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:gf,animationDuration:`10ms`,"&:-webkit-autofill":{animationDuration:`5000s`,animationName:hf}}},{props:{size:`small`},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:`auto`,resize:`none`,padding:0,paddingTop:0}},{props:{type:`search`},style:{MozAppearance:`textfield`}}]}})),Sf=Ud({[`@keyframes ${hf}`]:{from:{animationName:hf}},[`@keyframes ${gf}`]:{from:{animationName:gf}}}),Cf=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiInputBase`}),{"aria-describedby":r,"aria-label":i,autoComplete:a,autoFocus:o,className:s,color:c,defaultValue:l,disabled:u,disableInjectingGlobalStyles:d,endAdornment:f,error:p,fullWidth:m=!1,id:h,inputComponent:g=`input`,inputProps:_={},inputRef:v,margin:y,maxRows:b,minRows:x,multiline:S=!1,name:C,onBlur:w,onChange:T,onClick:E,onFocus:D,onKeyDown:O,onKeyUp:ee,placeholder:te,readOnly:k,renderSuffix:A,rows:j,size:M,slotProps:ne={},slots:re={},startAdornment:ie,type:ae=`text`,value:N,...oe}=n,se=_.value==null?N:_.value,{current:ce}=L.useRef(se!=null),P=L.useRef(),le=L.useCallback(e=>{},[]),ue=Kd(P,v,_.ref,le),[F,I]=L.useState(!1),[de,fe]=Ld({props:n,states:[`color`,`disabled`,`error`,`hiddenLabel`,`size`,`required`,`filled`]});de.focused=fe?fe.focused:F,L.useEffect(()=>{!fe&&u&&F&&(I(!1),w&&w())},[fe,u,F,w]);let pe=fe&&fe.onFilled,me=fe&&fe.onEmpty,he=L.useCallback(e=>{Qd(e)?pe&&pe():me&&me()},[pe,me]);qd(()=>{ce&&he({value:se})},[se,he,ce]),qd(()=>{if(!o)return;let e=P.current;if(!e)return;let t=Jd(e),n=Xd(t),r=n==null||n===t.body||n===t.documentElement;e===n?fe&&fe.onFocus?fe.onFocus():I(!0):r&&e.focus()},[o]);let ge=e=>{D&&D(e),_.onFocus&&_.onFocus(e),fe&&fe.onFocus?fe.onFocus(e):I(!0)},_e=e=>{w&&w(e),_.onBlur&&_.onBlur(e),fe&&fe.onBlur?fe.onBlur(e):I(!1)},ve=(e,...t)=>{if(!ce){let t=e.target||P.current;if(t==null)throw Error(Rr(1));he({value:t.value})}_.onChange&&_.onChange(e,...t),T&&T(e,...t)};L.useEffect(()=>{he(P.current)},[]);let ye=e=>{P.current&&e.currentTarget===e.target&&P.current.focus(),E&&E(e)},be=g,xe=_;S&&be===`input`&&(xe=j?{type:void 0,minRows:j,maxRows:j,...xe}:{type:void 0,maxRows:b,minRows:x,...xe},be=Pd);let R=e=>{he(e.animationName===gf?P.current:{value:`x`})};L.useEffect(()=>{fe&&fe.setAdornedStart(!!ie)},[fe,ie]);let z={...n,color:de.color||`primary`,disabled:de.disabled,endAdornment:f,error:de.error,focused:de.focused,formControl:fe,fullWidth:m,hiddenLabel:de.hiddenLabel,multiline:S,size:de.size,startAdornment:ie,type:ae},B=yf(z),Se=re.root||bf,Ce=ne.root||{},we=re.input||xf;return xe={...xe,...ne.input},(0,H.jsxs)(L.Fragment,{children:[!d&&typeof Sf==`function`&&(mf||=(0,H.jsx)(Sf,{})),(0,H.jsxs)(Se,{...Ce,ref:t,onClick:ye,...oe,...!wd(Se)&&{ownerState:{...z,...Ce.ownerState}},className:U(B.root,Ce.className,s,k&&`MuiInputBase-readOnly`),children:[ie,(0,H.jsx)(Fd.Provider,{value:null,children:(0,H.jsx)(we,{"aria-invalid":de.error,"aria-describedby":r,"aria-label":i,autoComplete:a,autoFocus:o,defaultValue:l,disabled:de.disabled,id:h,onAnimationStart:R,name:C,placeholder:te,readOnly:k,required:de.required,rows:j,value:se,onKeyDown:O,onKeyUp:ee,type:ae,...xe,...!wd(we)&&{as:be,ownerState:{...z,...xe.ownerState}},ref:ue,className:U(B.input,xe.className,k&&`MuiInputBase-readOnly`),onBlur:_e,onChange:ve,onFocus:ge})}),f,A?A({...de,startAdornment:ie}):null]})]})});function wf(e){return Zs(`MuiFilledInput`,e)}var Tf={...tf,...Qs(`MuiFilledInput`,[`root`,`underline`,`input`,`adornedStart`,`adornedEnd`,`sizeSmall`,`multiline`,`hiddenLabel`])};function Ef(e){return Zs(`MuiFormControlLabel`,e)}var Df=Qs(`MuiFormControlLabel`,[`root`,`labelPlacementStart`,`labelPlacementEnd`,`labelPlacementTop`,`labelPlacementBottom`,`disabled`,`label`,`error`,`required`,`asterisk`]);function Of(e){return Zs(`MuiFormHelperText`,e)}var kf=Qs(`MuiFormHelperText`,[`root`,`error`,`disabled`,`sizeSmall`,`sizeMedium`,`contained`,`focused`,`filled`,`required`]);function Af(e){return Zs(`MuiFormLabel`,e)}var jf=Qs(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]);function Mf(e){return Zs(`MuiInput`,e)}var Nf={...tf,...Qs(`MuiInput`,[`root`,`underline`,`input`])};function Pf(e){return Zs(`MuiListItemButton`,e)}var Ff=Qs(`MuiListItemButton`,[`root`,`focusVisible`,`dense`,`alignItemsFlexStart`,`disabled`,`divider`,`gutters`,`selected`]);function If(e){return Zs(`MuiMenuItem`,e)}var Lf=Qs(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]);function Rf(e){return Zs(`MuiNativeSelect`,e)}var zf=Qs(`MuiNativeSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);function Bf(e){return Zs(`MuiOutlinedInput`,e)}var Vf={...tf,...Qs(`MuiOutlinedInput`,[`root`,`notchedOutline`,`input`])};function Hf(e){return Zs(`MuiRadio`,e)}var Uf=Qs(`MuiRadio`,[`root`,`checked`,`disabled`,`colorPrimary`,`colorSecondary`,`sizeSmall`]);function Wf(e){return Zs(`MuiSlider`,e)}var Gf=Qs(`MuiSlider`,`root.active.colorPrimary.colorSecondary.colorError.colorInfo.colorSuccess.colorWarning.disabled.dragging.focusVisible.mark.markActive.marked.markLabel.markLabelActive.rail.sizeSmall.thumb.track.trackInverted.trackFalse.valueLabel.valueLabelOpen.valueLabelCircle.valueLabelLabel.vertical`.split(`.`));function Kf(e){return Zs(`MuiToggleButton`,e)}var qf=Qs(`MuiToggleButton`,[`root`,`disabled`,`selected`,`standard`,`primary`,`secondary`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`fullWidth`]);function Jf({theme:e,...t}){let n=`$$material`in e?e[zr]:void 0;return(0,H.jsx)(nl,{...t,themeId:n?zr:void 0,theme:n||e})}var Yf={attribute:`data-mui-color-scheme`,colorSchemeStorageKey:`mui-color-scheme`,defaultLightColorScheme:`light`,defaultDarkColorScheme:`dark`,modeStorageKey:`mui-mode`},{CssVarsProvider:Xf,useColorScheme:Zf,getInitColorSchemeScript:Qf}=_l({themeId:zr,theme:()=>_d({cssVariables:!0}),colorSchemeStorageKey:Yf.colorSchemeStorageKey,modeStorageKey:Yf.modeStorageKey,defaultColorScheme:{light:Yf.defaultLightColorScheme,dark:Yf.defaultDarkColorScheme},resolveTheme:e=>{let t={...e,typography:Mu(e.palette,e.typography)};return t.unstable_sx=function(e){return Fs({sx:e,theme:this})},t}}),$f=Xf;function ep({theme:e,...t}){let n=L.useMemo(()=>{if(typeof e==`function`)return e;let t=`$$material`in e?e[zr]:e;return`colorSchemes`in t?null:`vars`in t?e:{...e,vars:null}},[e]);return n?(0,H.jsx)(Jf,{theme:n,...t}):(0,H.jsx)($f,{theme:e,...t})}function tp(...e){return e.reduce((e,t)=>t==null?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}var np=tp;function rp(e){return Zs(`MuiSvgIcon`,e)}Qs(`MuiSvgIcon`,[`root`,`colorPrimary`,`colorSecondary`,`colorAction`,`colorError`,`colorDisabled`,`fontSizeInherit`,`fontSizeSmall`,`fontSizeMedium`,`fontSizeLarge`]);var ip=e=>{let{color:t,fontSize:n,classes:r}=e;return El({root:[`root`,t!==`inherit`&&`color${K(t)}`,`fontSize${K(n)}`]},rp,r)},ap=G(`svg`,{name:`MuiSvgIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!==`inherit`&&t[`color${K(n.color)}`],t[`fontSize${K(n.fontSize)}`]]}})(Wd(({theme:e})=>({userSelect:`none`,width:`1em`,height:`1em`,display:`inline-block`,flexShrink:0,...pf(e,`fill`,{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:`currentColor`}},{props:{fontSize:`inherit`},style:{fontSize:`inherit`}},{props:{fontSize:`small`},style:{fontSize:e.typography?.pxToRem?.(20)||`1.25rem`}},{props:{fontSize:`medium`},style:{fontSize:e.typography?.pxToRem?.(24)||`1.5rem`}},{props:{fontSize:`large`},style:{fontSize:e.typography?.pxToRem?.(35)||`2.1875rem`}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:`action`},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:`disabled`},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:`inherit`},style:{color:void 0}}]}))),op=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiSvgIcon`}),{children:r,className:i,color:a=`inherit`,component:o=`svg`,fontSize:s=`medium`,htmlColor:c,inheritViewBox:l=!1,titleAccess:u,viewBox:d=`0 0 24 24`,...f}=n,p=L.isValidElement(r)&&r.type===`svg`,m={...n,color:a,component:o,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:l,viewBox:d,hasSvgAsChild:p},h={};l||(h.viewBox=d);let g=ip(m);return(0,H.jsxs)(ap,{as:o,className:U(g.root,i),focusable:`false`,color:c,"aria-hidden":!u||void 0,role:u?`img`:void 0,ref:t,...h,...f,...p&&r.props,ownerState:m,children:[p?r.props.children:r,u?(0,H.jsx)(`title`,{children:u}):null]})});op.muiName=`SvgIcon`;function sp(e,t){function n(t,n){return(0,H.jsx)(op,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=op.muiName,L.memo(L.forwardRef(n))}var cp=Td,lp=Dl,up=kd;function dp(e,t){typeof e==`function`?e(t):e&&(e.current=t)}var fp=Qc;function pp(e){let{controlled:t,default:n,name:r,state:i=`value`}=e,{current:a}=L.useRef(t!==void 0),[o,s]=L.useState(n);return[a?t:o,L.useCallback(e=>{a||s(e)},[])]}var mp=pp,hp=Dd;function gp(e,t){let n=e.charCodeAt(2);return e[0]===`o`&&e[1]===`n`&&n>=65&&n<=90&&typeof t==`function`}function _p(e,t){if(!e)return t;function n(e,t){let n={};return Object.keys(t).forEach(r=>{gp(r,t[r])&&typeof e[r]==`function`&&(n[r]=(...n)=>{e[r](...n),t[r](...n)})}),n}if(typeof e==`function`||typeof t==`function`)return r=>{let i=typeof t==`function`?t(r):t,a=typeof e==`function`?e({...r,...i}):e,o=U(r?.className,i?.className,a?.className),s=n(a,i);return{...i,...a,...s,...!!o&&{className:o},...i?.style&&a?.style&&{style:{...i.style,...a.style}},...i?.sx&&a?.sx&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(a.sx)?a.sx:[a.sx]]}}};let r=t,i=n(e,r),a=U(r?.className,e?.className);return{...t,...e,...i,...!!a&&{className:a},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}var vp={};function yp(e,t){let n=L.useRef(vp);return n.current===vp&&(n.current=e(t)),n}function bp(e){let t=yp(()=>xp(e)).current;return t.next=e,mc(t.effect),t}function xp(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Sp=L.createContext(null);function Cp(e){if(e==null)return{appear:void 0,enter:void 0,exit:void 0};if(typeof e==`number`)return{appear:e,enter:e,exit:e};let t=e.enter,n=e.exit;return{appear:e.appear===void 0?t:e.appear,enter:t,exit:n}}function wp(e){if(e.autoTimeout!=null)return e.autoTimeout;let t=Cp(e.timeout);return e.currentStatus===`entering`?e.isAppearing?t.appear??t.enter??null:t.enter??null:t.exit??null}function Tp(e){let{in:t=!1,appear:n=!1,enter:r=!0,exit:i=!0,mountOnEnter:a=!1,unmountOnExit:o=!1,timeout:s,addEndListener:c,reduceMotion:l=!1,getAutoTimeout:u,nodeRef:d,onEnter:f,onEntering:p,onEntered:m,onExit:h,onExiting:g,onExited:_,children:v,...y}=e,b=L.useContext(Sp),x=b&&!b.isMounting?r:n,[S,C]=L.useState(()=>t?x?`exited`:`entered`:a||o?`unmounted`:`exited`),w=L.useRef(S);w.current=S,t&&S===`unmounted`&&(w.current=`exited`,C(`exited`));let T=L.useRef(t&&x),E=L.useRef(!1),D=L.useRef(null),O=L.useRef(S),ee=L.useRef(!1),te=L.useRef(l),k=bp({timeout:s,addEndListener:c,reduceMotion:l,getAutoTimeout:u,onEnter:f,onEntering:p,onEntered:m,onExit:h,onExiting:g,onExited:_,enter:r,exit:i,mountOnEnter:a,unmountOnExit:o,nodeRef:d,parentGroup:b}),A=L.useCallback(()=>{D.current!==null&&(D.current.cancel(),D.current=null)},[]),j=L.useCallback(e=>{let t=!0,n=()=>{t&&(t=!1,D.current=null,e())};return n.cancel=()=>{t=!1},D.current=n,n},[]),M=L.useCallback((e,t)=>{let n,r=()=>{n!==void 0&&(clearTimeout(n),n=void 0)},i=j(()=>{r(),w.current=e,C(e)}),a=i.cancel;i.cancel=()=>{r(),a()};let o=k.current.nodeRef.current,s=k.current.addEndListener,c=k.current.getAutoTimeout!==void 0,l=k.current.getAutoTimeout?.(),u=wp({currentStatus:t,isAppearing:ee.current,timeout:k.current.timeout,autoTimeout:l}),d=te.current,f=u??(d&&c?0:null),p=e=>{n=setTimeout(i,e)};if(!o){p(0);return}if(s){f!=null&&p(d?0:f),s.length>=2?s(o,i):s(i);return}p(d?0:u??0)},[j,k]),ne=L.useCallback(e=>{let t=k.current,n=t.parentGroup?t.parentGroup.isMounting:e;if(ee.current=n,!e&&!t.enter){w.current=`entered`,C(`entered`);return}te.current=t.reduceMotion,t.onEnter?.(n),w.current=`entering`,C(`entering`)},[k]),re=L.useCallback(()=>{let e=k.current;if(!e.exit){w.current=`exited`,C(`exited`);return}te.current=e.reduceMotion,e.onExit?.(),w.current=`exiting`,C(`exiting`)},[k]),ie=L.useCallback((e,t)=>{if(A(),t===`entering`){let t=k.current;if(t.mountOnEnter||t.unmountOnExit){let e=t.nodeRef.current;e&&af(e)}ne(e)}else re()},[A,ne,re,k]);return mc(()=>(E.current=!0,T.current&&(T.current=!1,ie(!0,`entering`)),()=>{E.current=!1,A()}),[A,ie]),mc(()=>{if(!E.current)return;let e=w.current;t?e!==`entering`&&e!==`entered`&&ie(!1,`entering`):e===`entering`||e===`entered`?ie(!1,`exiting`):e===`exited`&&o&&(w.current=`unmounted`,C(`unmounted`))},[t,S,o,ie]),mc(()=>{if(S===`unmounted`||O.current===`unmounted`){O.current=S;return}let e=O.current!==S;e&&(O.current=S);let t=k.current;S===`entering`?(e&&t.onEntering?.(ee.current),D.current===null&&w.current===S&&M(`entered`,`entering`)):S===`exiting`?(e&&t.onExiting?.(),D.current===null&&w.current===S&&M(`exited`,`exiting`)):S===`entered`&&e?t.onEntered?.(ee.current):S===`exited`&&e&&t.onExited?.()},[k,M,S]),S===`unmounted`?null:(0,H.jsx)(Sp.Provider,{value:null,children:v(S,y)})}var Ep=`(prefers-reduced-motion: reduce)`,Dp=0,Op=`0ms`,kp=()=>{},Ap=()=>!1,jp=()=>!0,Mp=()=>kp;function Np(e){let[t,n]=L.useState(()=>({enabled:e,matches:e?null:!1})),r=t.matches;return t.enabled!==e&&(r=null,e||(r=!1)),mc(()=>{let r=t=>{n(n=>n.enabled===e&&n.matches===t?n:{enabled:e,matches:t})};if(!e){t.enabled&&r(!1);return}if(typeof window>`u`||typeof window.matchMedia!=`function`){r(!1);return}let i=window.matchMedia(Ep),a=()=>{r(i.matches)};return a(),i.addEventListener(`change`,a),()=>{i.removeEventListener(`change`,a)}},[e,t.enabled]),r}var Pp={...L}.useSyncExternalStore;function Fp(e){let t=e?jp:Ap,[n,r]=L.useMemo(()=>{if(!e||typeof window>`u`||typeof window.matchMedia!=`function`)return[Ap,Mp];let t=window.matchMedia(Ep);return[()=>t.matches,e=>(t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)})]},[e]);return Pp(r,n,t)}var Ip=Pp===void 0?Np:Fp;function Lp(e,t){let n=Ip(!t&&e===`system`),r=!t&&(e===`always`||e===`system`&&n!==!1);return L.useMemo(()=>({shouldReduceMotion:r,getTransitionTiming(e){return r?{duration:Dp,delay:Op}:e}}),[r])}function Rp(e,t,n){return e===void 0||wd(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function zp(e,t,n){return typeof e==`function`?e(t,n):e}function Bp(e){if(e===void 0)return{};let t={};for(let n of Object.keys(e))gp(n,e[n])&&(t[n]=e[n]);return t}function Vp(e){if(e===void 0)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&typeof e[t]==`function`)).forEach(n=>{t[n]=e[n]}),t}function Hp(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){let e=U(n?.className,a,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},o={...n,...i,...r};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}let o=Bp({...i,...r}),s=Vp(r),c=Vp(i),l=t(o),u=U(l?.className,n?.className,a,i?.className,r?.className),d={...l?.style,...n?.style,...i?.style,...r?.style},f={...l,...n,...c,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:l.ref}}function Up(e,t){let{className:n,elementType:r,ownerState:i,externalForwardedProps:a,internalForwardedProps:o,shouldForwardComponentProp:s=!1,...c}=t,{component:l,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=a,p=u[e]||r,m=zp(d[e],i),{props:{component:h,...g},internalRef:_}=Hp({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=Ed(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,Rp(p,{...e===`root`&&!l&&!u[e]&&o,...e!==`root`&&!u[e]&&o,...g,...y&&!s&&{as:y},...y&&s&&{component:y},ref:v},i)]}function Wp(e){return Zs(`MuiCollapse`,e)}Qs(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var Gp={},Kp=e=>{let{orientation:t,classes:n}=e;return El({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},Wp,n)},qp=G(`div`,{name:`MuiCollapse`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.state===`entered`&&t.entered,n.state===`exited`&&!n.in&&n.collapsedSize===`0px`&&t.hidden]}})(Wd(({theme:e})=>({height:0,overflow:`hidden`,transition:e.transitions.create(`height`),variants:[{props:{orientation:`horizontal`},style:{height:`auto`,width:0,transition:e.transitions.create(`width`)}},{props:{state:`entered`},style:{height:`auto`,overflow:`visible`}},{props:{state:`entered`,orientation:`horizontal`},style:{width:`auto`}},{props:({ownerState:e})=>e.state===`exited`&&!e.in&&e.collapsedSize===`0px`,style:{visibility:`hidden`}}]}))),Jp=G(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),Yp=G(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),Xp=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiCollapse`}),{addEndListener:r,children:i,className:a,collapsedSize:o=`0px`,component:s,disablePrefersReducedMotion:c=!1,easing:l,in:u,onEnter:d,onEntered:f,onEntering:p,onExit:m,onExited:h,onExiting:g,orientation:_=`vertical`,slots:v=Gp,slotProps:y=Gp,style:b,timeout:x=Vu.standard,TransitionComponent:S=Tp,...C}=n,w={...n,orientation:_,collapsedSize:o},T=Kp(w),E=zd(),D=L.useRef(null),O=L.useRef(null),ee=typeof o==`number`?`${o}px`:o,te=_===`horizontal`,k=te?`width`:`height`,A=Lp(E.motion.reducedMotion,c),j=L.useRef(null),M=Kd(t,j),ne=()=>D.current?D.current[te?`clientWidth`:`clientHeight`]:0,re=lf(j,(e,t)=>{D.current&&te&&(D.current.style.position=`absolute`),e.style[k]=ee,d&&d(e,t)}),ie=lf(j,(e,t)=>{let n=ne();D.current&&te&&(D.current.style.position=``);let{duration:r,easing:i}=df({style:b,timeout:x,easing:l},{mode:`enter`});if(x===`auto`&&!A.shouldReduceMotion){let e=E.transitions.getAutoHeightDuration(n);O.current=e}else O.current=null;let a=A.getTransitionTiming({duration:O.current??r,delay:void 0});e.style.transitionDuration=typeof a.duration==`string`?a.duration:`${a.duration}ms`,e.style[k]=`${n}px`,e.style.transitionTimingFunction=i,p&&p(e,t)}),ae=lf(j,(e,t)=>{e.style[k]=`auto`,f&&f(e,t)}),N=lf(j,e=>{e.style[k]=`${ne()}px`,m&&m(e)}),oe=lf(j,h),se=lf(j,e=>{let t=ne(),{duration:n,easing:r}=df({style:b,timeout:x,easing:l},{mode:`exit`});if(x===`auto`&&!A.shouldReduceMotion){let e=E.transitions.getAutoHeightDuration(t);O.current=e}else O.current=null;let i=A.getTransitionTiming({duration:O.current??n,delay:void 0});e.style.transitionDuration=typeof i.duration==`string`?i.duration:`${i.duration}ms`,e.style[k]=ee,e.style.transitionTimingFunction=r,g&&g(e)}),ce=r?e=>{r(j.current,e)}:void 0,P={slots:v,slotProps:y,component:s},[le,ue]=Up(`root`,{ref:M,className:U(T.root,a),elementType:qp,externalForwardedProps:P,ownerState:w,additionalProps:{style:{[te?`minWidth`:`minHeight`]:ee,...b}}}),[F,I]=Up(`wrapper`,{ref:D,className:T.wrapper,elementType:Jp,externalForwardedProps:P,ownerState:w}),[de,fe]=Up(`wrapperInner`,{className:T.wrapperInner,elementType:Yp,externalForwardedProps:P,ownerState:w});return(0,H.jsx)(S,{in:u,onEnter:re,onEntered:ae,onEntering:ie,onExit:N,onExited:oe,onExiting:se,addEndListener:ce,getAutoTimeout:x===`auto`?()=>O.current:void 0,reduceMotion:A.shouldReduceMotion,nodeRef:j,timeout:x===`auto`?null:x,...C,children:(e,{ownerState:t,...n})=>{let r={...w,state:e};return(0,H.jsx)(le,{...ue,className:U(ue.className,{entered:T.entered,exited:!u&&ee===`0px`&&T.hidden}[e]),ownerState:r,...n,children:(0,H.jsx)(F,{...I,ownerState:r,children:(0,H.jsx)(de,{...fe,ownerState:r,children:i})})})}})});Xp&&(Xp.muiSupportAuto=!0);function eee(e){return Zs(`MuiPaper`,e)}Qs(`MuiPaper`,`root.rounded.outlined.elevation.elevation0.elevation1.elevation2.elevation3.elevation4.elevation5.elevation6.elevation7.elevation8.elevation9.elevation10.elevation11.elevation12.elevation13.elevation14.elevation15.elevation16.elevation17.elevation18.elevation19.elevation20.elevation21.elevation22.elevation23.elevation24`.split(`.`));var tee=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return El({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},eee,i)},Zp=G(`div`,{name:`MuiPaper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant===`elevation`&&t[`elevation${n.elevation}`]]}})(Wd(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,...pf(e,`box-shadow`),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:`outlined`},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:`elevation`},style:{boxShadow:`var(--Paper-shadow)`,backgroundImage:`var(--Paper-overlay)`}}]}))),Qp=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiPaper`}),r=zd(),{className:i,component:a=`div`,elevation:o=1,square:s=!1,variant:c=`elevation`,...l}=n,u={...n,component:a,elevation:o,square:s,variant:c},d=tee(u);return(0,H.jsx)(Zp,{as:a,ownerState:u,className:U(d.root,i),ref:t,...l,style:{...c===`elevation`&&{"--Paper-shadow":(r.vars||r).shadows[o],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[o]},...!r.vars&&r.palette.mode===`dark`&&{"--Paper-overlay":`linear-gradient(${kc(`#fff`,ed(o))}, ${kc(`#fff`,ed(o))})`}},...l.style}})}),$p=L.createContext({});function em(e){return Zs(`MuiAccordion`,e)}var tm=Qs(`MuiAccordion`,[`root`,`heading`,`rounded`,`expanded`,`disabled`,`gutters`,`region`]),nee=e=>{let{classes:t,square:n,expanded:r,disabled:i,disableGutters:a}=e;return El({root:[`root`,!n&&`rounded`,r&&`expanded`,i&&`disabled`,!a&&`gutters`],heading:[`heading`],region:[`region`]},em,t)},ree=G(Qp,{name:`MuiAccordion`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${tm.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(Wd(({theme:e})=>{let t={duration:e.transitions.duration.shortest};return{position:`relative`,...pf(e,[`margin`],t),overflowAnchor:`none`,"&::before":{position:`absolute`,left:0,top:-1,right:0,height:1,content:`""`,opacity:1,backgroundColor:(e.vars||e).palette.divider,...pf(e,[`opacity`,`background-color`],t)},"&:first-of-type":{"&::before":{display:`none`}},[`&.${tm.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:`none`}}},[`&.${tm.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),Wd(({theme:e})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${tm.expanded}`]:{margin:`16px 0`}}}]}))),nm=G(`h3`,{name:`MuiAccordion`,slot:`Heading`})({all:`unset`}),rm=G(`div`,{name:`MuiAccordion`,slot:`Region`})({}),im=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiAccordion`}),{children:r,className:i,defaultExpanded:a=!1,disabled:o=!1,disableGutters:s=!1,expanded:c,onChange:l,slots:u={},slotProps:d={},...f}=n,[p,m]=mp({controlled:c,default:a,name:`Accordion`,state:`expanded`}),h=L.useCallback(e=>{m(!p),l&&l(e,!p)},[p,l,m]),[g,..._]=L.Children.toArray(r),v=L.useMemo(()=>({expanded:p,disabled:o,disableGutters:s,toggle:h}),[p,o,s,h]),y={...n,disabled:o,disableGutters:s,expanded:p},b=nee(y),x={slots:u,slotProps:d},[S,C]=Up(`root`,{elementType:ree,externalForwardedProps:{...x,...f},className:U(b.root,i),shouldForwardComponentProp:!0,ownerState:y,ref:t}),[w,T]=Up(`heading`,{elementType:nm,externalForwardedProps:x,className:b.heading,ownerState:y}),[E,D]=Up(`transition`,{elementType:Xp,externalForwardedProps:x,ownerState:y}),[O,ee]=Up(`region`,{elementType:rm,externalForwardedProps:x,ownerState:y,className:b.region,additionalProps:{"aria-labelledby":g.props.id,id:g.props[`aria-controls`],role:`region`}});return(0,H.jsxs)(S,{...C,children:[(0,H.jsx)(w,{...T,children:(0,H.jsx)($p.Provider,{value:v,children:g})}),(0,H.jsx)(E,{in:p,timeout:`auto`,...D,children:(0,H.jsx)(O,{...ee,children:_})})]})});function am(e){return Zs(`MuiAccordionDetails`,e)}Qs(`MuiAccordionDetails`,[`root`]);var om=e=>{let{classes:t}=e;return El({root:[`root`]},am,t)},sm=G(`div`,{name:`MuiAccordionDetails`,slot:`Root`})(Wd(({theme:e})=>({padding:e.spacing(1,2,2)}))),cm=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiAccordionDetails`}),{className:r,...i}=n,a=n,o=om(a);return(0,H.jsx)(sm,{className:U(o.root,r),ref:t,ownerState:a,...i})});function lm(e){try{return e.matches(`:focus-visible`)}catch{}return!1}function iee(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return L.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}var aee={};function oee(e){let{nativeButton:t,nativeButtonProp:n,internalNativeButton:r=t,allowInferredHostMismatch:i=!1,disabled:a,type:o,hasFormAction:s=!1,tabIndex:c=0,focusableWhenDisabled:l,stopEventPropagation:u=!1,onBeforeKeyDown:d,onBeforeKeyUp:f}=e,p=L.useRef(null),m=l===!0,h=iee({focusableWhenDisabled:m,disabled:a,isNativeButton:t,tabIndex:c}),g=L.useCallback(()=>{let e=p.current;return e==null?t:e.tagName===`BUTTON`||!!(e.tagName===`A`&&e.href)},[t]),_=L.useMemo(()=>{let e=m?{}:{tabIndex:a?-1:c};return t?(e.type=o===void 0&&!s?`button`:o,m||(e.disabled=a)):(e.role=`button`,!m&&a&&(e[`aria-disabled`]=a)),m?{...e,...h}:e},[a,m,h,s,t,c,o]);return{getButtonProps:L.useCallback((e=aee)=>{let{onClick:t,onKeyDown:n,onKeyUp:r,...i}=e,o=e=>{if(u&&e.stopPropagation(),a){e.preventDefault();return}t?.(e)},s=e=>{if(m&&h.onKeyDown(e),!a&&(d?.(e),n?.(e),!(e.target!==e.currentTarget||g()))){if(e.key===` `){e.preventDefault();return}e.key===`Enter`&&(e.preventDefault(),e.currentTarget.click())}},c=e=>{a||(f?.(e),r?.(e),e.target===e.currentTarget&&!g()&&e.key===` `&&!e.defaultPrevented&&e.currentTarget.click())};return{..._,...i,onClick:o,onKeyDown:s,onKeyUp:c}},[_,a,m,h,g,d,f,u]),rootRef:p}}var see=class e{static create(){return new e}static use(){let t=yp(e.create).current,[n,r]=L.useState(!1);return t.shouldMount=n,t.setShouldMount=r,L.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=um(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function cee(){return see.use()}function um(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}var dm=[];function fm(e){L.useEffect(e,dm)}var pm=class e{static create(){return new e}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear};function mm(){let e=yp(pm.create).current;return fm(e.disposeEffect),e}function hm(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:l}=e,[u,d]=L.useState(!1),f=mm(),p=L.useRef(!1),m=L.useRef(c);m.current=c;let h=c!=null,g=U(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),_={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},v=U(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),L.useEffect(()=>{!s&&h?p.current||(p.current=!0,f.start(l,()=>{p.current=!1,m.current?.()})):(p.current=!1,f.clear())},[f,h,s,l]),(0,H.jsx)(`span`,{className:g,style:_,children:(0,H.jsx)(`span`,{className:v})})}var gm=Qs(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),_m=550,vm={},ym=[],lee=()=>{};function bm(e,t){let n=new Set(t),r=new Map,i=[];for(let t of e)n.has(t)?i.length>0&&(r.set(t,i),i=[]):i.push(t);let a=[];for(let e of t){let t=r.get(e);t&&a.push(...t),a.push(e)}return a.push(...i),a}function uee({event:e,element:t,center:n}){let r=t?t.getBoundingClientRect():{width:0,height:0,left:0,top:0},i,a;if(n||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)i=Math.round(r.width/2),a=Math.round(r.height/2);else{let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;i=Math.round(t-r.left),a=Math.round(n-r.top)}let o;if(n)o=Math.sqrt((2*r.width**2+r.height**2)/3),o%2==0&&(o+=1);else{let e=Math.max(Math.abs((t?t.clientWidth:0)-i),i)*2+2,n=Math.max(Math.abs((t?t.clientHeight:0)-a),a)*2+2;o=Math.sqrt(e**2+n**2)}return{rippleX:i,rippleY:a,rippleSize:o}}var dee=Fa`
|
|
70
|
+
0% {
|
|
71
|
+
transform: scale(0);
|
|
72
|
+
opacity: 0.1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
100% {
|
|
76
|
+
transform: scale(1);
|
|
77
|
+
opacity: 0.3;
|
|
78
|
+
}
|
|
79
|
+
`,fee=Fa`
|
|
80
|
+
0% {
|
|
81
|
+
opacity: 1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
100% {
|
|
85
|
+
opacity: 0;
|
|
86
|
+
}
|
|
87
|
+
`,pee=Fa`
|
|
88
|
+
0% {
|
|
89
|
+
transform: scale(1);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
50% {
|
|
93
|
+
transform: scale(0.92);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
100% {
|
|
97
|
+
transform: scale(1);
|
|
98
|
+
}
|
|
99
|
+
`;function mee(e){if(e.motion.reducedMotion===`always`)return null;let t=Pa`
|
|
100
|
+
&.${gm.rippleVisible} {
|
|
101
|
+
animation-name: ${dee};
|
|
102
|
+
animation-duration: ${_m}ms;
|
|
103
|
+
animation-timing-function: ${e.transitions.easing.easeInOut};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&.${gm.ripplePulsate} {
|
|
107
|
+
animation-duration: ${e.transitions.duration.shorter}ms;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
& .${gm.childLeaving} {
|
|
111
|
+
animation-name: ${fee};
|
|
112
|
+
animation-duration: ${_m}ms;
|
|
113
|
+
animation-timing-function: ${e.transitions.easing.easeInOut};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
& .${gm.childPulsate} {
|
|
117
|
+
animation-name: ${pee};
|
|
118
|
+
animation-duration: 2500ms;
|
|
119
|
+
animation-timing-function: ${e.transitions.easing.easeInOut};
|
|
120
|
+
animation-iteration-count: infinite;
|
|
121
|
+
animation-delay: 200ms;
|
|
122
|
+
}
|
|
123
|
+
`;return e.motion.reducedMotion===`system`?Pa`
|
|
124
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
125
|
+
${t}
|
|
126
|
+
}
|
|
127
|
+
`:t}var hee=G(`span`,{name:`MuiTouchRipple`,slot:`Root`})({overflow:`hidden`,pointerEvents:`none`,position:`absolute`,zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:`inherit`}),gee=G(hm,{name:`MuiTouchRipple`,slot:`Ripple`})`
|
|
128
|
+
opacity: 0;
|
|
129
|
+
position: absolute;
|
|
130
|
+
|
|
131
|
+
&.${gm.rippleVisible} {
|
|
132
|
+
opacity: 0.3;
|
|
133
|
+
transform: scale(1);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/*
|
|
137
|
+
* Order matters: 'child', 'childLeaving' and 'childPulsate' apply to the same
|
|
138
|
+
* element with equal specificity, so the later rule wins. 'child' must come
|
|
139
|
+
* before 'childLeaving' so the leaving 'opacity: 0' takes precedence. A focus
|
|
140
|
+
* (pulsate) ripple keeps 'pulsateKeyframe' (no opacity animation) on exit, so
|
|
141
|
+
* it relies on this static 'opacity: 0' to disappear on blur instead of
|
|
142
|
+
* lingering until removal.
|
|
143
|
+
*/
|
|
144
|
+
& .${gm.child} {
|
|
145
|
+
opacity: 1;
|
|
146
|
+
display: block;
|
|
147
|
+
width: 100%;
|
|
148
|
+
height: 100%;
|
|
149
|
+
border-radius: 50%;
|
|
150
|
+
background-color: currentColor;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
& .${gm.childLeaving} {
|
|
154
|
+
opacity: 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
& .${gm.childPulsate} {
|
|
158
|
+
position: absolute;
|
|
159
|
+
/* @noflip */
|
|
160
|
+
left: 0px;
|
|
161
|
+
top: 0;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
${({theme:e})=>mee(e)}
|
|
165
|
+
`,xm=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiTouchRipple`}),r=Lp(zd().motion.reducedMotion,!1),{center:i=!1,classes:a=vm,className:o,...s}=n,[c,l]=L.useState({items:ym,order:ym}),u=c.items,d=L.useRef(0),f=L.useRef(null),p=L.useRef(!1);fm(()=>(p.current=!0,()=>{p.current=!1})),L.useEffect(()=>{f.current&&=(f.current(),null)},[u]);let m=L.useRef(!1),h=mm(),g=L.useRef(null),_=L.useRef(null),v=hp(e=>{p.current&&l(t=>{let n=t.items.filter(t=>t.key!==e);return{items:n,order:bm(t.order.filter(t=>t!==e),n.filter(e=>!e.exiting).map(e=>e.key))}})}),y=hp(e=>{let{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e,o=d.current;d.current+=1,l(e=>{let a=[...e.items,{key:o,pulsate:t,rippleX:n,rippleY:r,rippleSize:i,exiting:!1}];return{items:a,order:bm(e.order,a.filter(e=>!e.exiting).map(e=>e.key))}}),f.current=a}),b=hp((e=vm,t=vm,n=lee)=>{let{pulsate:r=!1,center:a=i||t.pulsate,fakeElement:o=!1}=t;if(e?.type===`mousedown`&&m.current){m.current=!1;return}e?.type===`touchstart`&&(m.current=!0);let{rippleX:s,rippleY:c,rippleSize:l}=uee({event:e,element:o?null:_.current,center:a});e?.touches?g.current===null&&(g.current=()=>{y({pulsate:r,rippleX:s,rippleY:c,rippleSize:l,cb:n})},h.start(80,()=>{g.current&&=(g.current(),null)})):y({pulsate:r,rippleX:s,rippleY:c,rippleSize:l,cb:n})}),x=hp(()=>{b(vm,{pulsate:!0})}),S=hp((e,t)=>{if(h.clear(),e?.type===`touchend`&&g.current){g.current(),g.current=null,h.start(0,()=>{S(e,t)});return}g.current=null,l(e=>{let t=e.items.findIndex(e=>!e.exiting);if(t===-1)return e;let n=e.items.slice();return n[t]={...n[t],exiting:!0},{items:n,order:bm(e.order,n.filter(e=>!e.exiting).map(e=>e.key))}}),f.current=t});L.useImperativeHandle(t,()=>({pulsate:x,start:b,stop:S}),[x,b,S]);let C=new Map(u.map(e=>[e.key,e])),w=c.order.map(e=>C.get(e)).filter(Boolean);return(0,H.jsx)(hee,{className:U(gm.root,a.root,o),ref:_,...s,children:w.map(e=>(0,H.jsx)(gee,{classes:{ripple:U(a.ripple,gm.ripple),rippleVisible:U(a.rippleVisible,gm.rippleVisible),ripplePulsate:U(a.ripplePulsate,gm.ripplePulsate),child:U(a.child,gm.child),childLeaving:U(a.childLeaving,gm.childLeaving),childPulsate:U(a.childPulsate,gm.childPulsate)},timeout:r.shouldReduceMotion?0:_m,pulsate:e.pulsate,rippleX:e.rippleX,rippleY:e.rippleY,rippleSize:e.rippleSize,in:!e.exiting,onExited:()=>v(e.key)},e.key))})});function Sm(e){return Zs(`MuiButtonBase`,e)}var Cm=Qs(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]),wm=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,suppressFocusVisible:i,classes:a}=e,o=El({root:[`root`,t&&`disabled`,n&&!i&&`focusVisible`]},Sm,a);return n&&!i&&r&&(o.root+=` ${r}`),o},Tm=G(`button`,{name:`MuiButtonBase`,slot:`Root`})(Wd(({theme:e})=>({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,boxSizing:`border-box`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,textDecoration:`none`,color:`inherit`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${Cm.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`},variants:[{props:{internalDisabledThemeFocusVisible:!1},style:e.focusVisible&&{...bu,[`&.${Cm.focusVisible}`]:e.focusVisible}}]}))),Em=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiButtonBase`}),{action:r,centerRipple:i=!1,children:a,className:o,component:s=`button`,disabled:c=!1,disableRipple:l=!1,disableTouchRipple:u=!1,focusRipple:d=!1,focusVisibleClassName:f,focusableWhenDisabled:p,suppressFocusVisible:m=!1,internalNativeButton:h,internalDisabledThemeFocusVisible:g=!1,LinkComponent:_=`a`,nativeButton:v,onBlur:y,onClick:b,onContextMenu:x,onDragLeave:S,onFocus:C,onFocusVisible:w,onKeyDown:T,onKeyUp:E,onMouseDown:D,onMouseLeave:O,onMouseUp:ee,onTouchEnd:te,onTouchMove:k,onTouchStart:A,tabIndex:j=0,TouchRippleProps:M,touchRippleRef:ne,type:re,...ie}=n,ae=!!(ie.href||ie.to),N=!!ie.formAction,oe=s;oe===`button`&&ae&&(oe=_);let se=typeof oe==`string`?oe===`button`:h??!1,ce=v??se,P=cee(),le=Kd(P.ref,ne),[ue,F]=L.useState(!1);(c||m)&&ue&&F(!1);let I=hp(e=>{d&&!e.repeat&&ue&&e.key===` `&&P.stop(e,()=>{P.start(e)})}),de=hp(e=>{d&&e.key===` `&&ue&&!e.defaultPrevented&&P.stop(e,()=>{P.pulsate(e)})}),{getButtonProps:fe,rootRef:pe}=oee({nativeButton:ce,nativeButtonProp:v,internalNativeButton:se,allowInferredHostMismatch:ae||typeof oe==`string`,disabled:c,type:re,hasFormAction:N,tabIndex:j,onBeforeKeyDown:I,onBeforeKeyUp:de}),{onClick:me,onKeyDown:he,onKeyUp:ge,..._e}=fe({onClick:b,onKeyDown:T,onKeyUp:E});L.useImperativeHandle(r,()=>({focusVisible:()=>{F(!0),pe.current.focus()}}),[pe]);let ve=P.shouldMount&&!l&&!c;L.useEffect(()=>{ue&&d&&!l&&P.pulsate()},[l,d,ue,P]);let ye=Dm(P,`start`,D,u),be=Dm(P,`stop`,x,u),xe=Dm(P,`stop`,S,u),R=Dm(P,`stop`,ee,u),z=Dm(P,`stop`,e=>{ue&&e.preventDefault(),O&&O(e)},u),B=Dm(P,`start`,A,u),Se=Dm(P,`stop`,te,u),Ce=Dm(P,`stop`,k,u),we=Dm(P,`stop`,e=>{lm(e.target)||F(!1),y&&y(e)},!1),Te=hp(e=>{pe.current||=e.currentTarget,!m&&lm(e.target)&&(F(!0),w&&w(e)),C&&C(e)}),Ee={};ae&&(Ee.tabIndex=c?-1:j,c&&(Ee[`aria-disabled`]=c),Ee.type=re);let De=Kd(t,pe),Oe={...n,centerRipple:i,component:s,disabled:c,disableRipple:l,disableTouchRipple:u,focusRipple:d,suppressFocusVisible:m,tabIndex:j,focusVisible:ue,internalDisabledThemeFocusVisible:g},ke=wm(Oe);return(0,H.jsxs)(Tm,{as:oe,className:U(ke.root,o),ownerState:Oe,onBlur:we,onClick:me,onContextMenu:be,onFocus:Te,onKeyDown:he,onKeyUp:ge,onMouseDown:ye,onMouseLeave:z,onMouseUp:R,onDragLeave:xe,onTouchEnd:Se,onTouchMove:Ce,onTouchStart:B,ref:De,...ae?Ee:_e,...ie,children:[a,ve?(0,H.jsx)(xm,{ref:le,center:i,...M}):null]})});function Dm(e,t,n,r=!1){return hp(i=>(n&&n(i),r||e[t](i),!0))}var Om=e=>{let{classes:t,expanded:n,disabled:r,disableGutters:i}=e;return El({root:[`root`,n&&`expanded`,r&&`disabled`,!i&&`gutters`],focusVisible:[`focusVisible`],content:[`content`,n&&`expanded`],expandIconWrapper:[`expandIconWrapper`,n&&`expanded`]},vd,t)},km=G(Em,{name:`MuiAccordionSummary`,slot:`Root`})(Wd(({theme:e})=>({display:`flex`,width:`100%`,minHeight:48,padding:e.spacing(0,2),...pf(e,[`min-height`,`background-color`],{duration:e.transitions.duration.shortest}),...!e.focusVisible&&{[`&.${yd.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus}},[`&.${yd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${yd.disabled})`]:{cursor:`pointer`},variants:[{props:e=>!e.disableGutters,style:{[`&.${yd.expanded}`]:{minHeight:64}}}]}))),Am=G(`span`,{name:`MuiAccordionSummary`,slot:`Content`})(Wd(({theme:e})=>({display:`flex`,textAlign:`start`,flexGrow:1,margin:`12px 0`,variants:[{props:e=>!e.disableGutters,style:{...pf(e,[`margin`],{duration:e.transitions.duration.shortest}),[`&.${yd.expanded}`]:{margin:`20px 0`}}}]}))),jm=G(`span`,{name:`MuiAccordionSummary`,slot:`ExpandIconWrapper`})(Wd(({theme:e})=>({display:`flex`,color:(e.vars||e).palette.action.active,transform:`rotate(0deg)`,...pf(e,`transform`,{duration:e.transitions.duration.shortest}),[`&.${yd.expanded}`]:{transform:`rotate(180deg)`}}))),Mm=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiAccordionSummary`}),{children:r,className:i,expandIcon:a,focusVisibleClassName:o,onClick:s,slots:c,slotProps:l,...u}=n,{disabled:d=!1,disableGutters:f,expanded:p,toggle:m}=L.useContext($p),h=e=>{m&&m(e),s&&s(e)},g={...n,expanded:p,disabled:d,disableGutters:f},_=Om(g),v={slots:c,slotProps:l},[y,b]=Up(`root`,{ref:t,shouldForwardComponentProp:!0,className:U(_.root,i),elementType:km,externalForwardedProps:{...v,...u},ownerState:g,additionalProps:{focusRipple:!1,disableRipple:!0,internalNativeButton:!0,disabled:d,"aria-expanded":p,focusVisibleClassName:U(_.focusVisible,o)},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),h(t)}})}),[x,S]=Up(`content`,{className:_.content,elementType:Am,externalForwardedProps:v,ownerState:g}),[C,w]=Up(`expandIconWrapper`,{className:_.expandIconWrapper,elementType:jm,externalForwardedProps:v,ownerState:g});return(0,H.jsxs)(y,{...b,children:[(0,H.jsx)(x,{...S,children:r}),a&&(0,H.jsx)(C,{...w,children:a})]})});function Nm(e){return typeof e.main==`string`}function Pm(e,t=[]){if(!Nm(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function Fm(e=[]){return([,t])=>t&&Pm(t,e)}function Im(e){return Zs(`MuiAlert`,e)}var Lm=Qs(`MuiAlert`,[`root`,`action`,`icon`,`message`,`filled`,`colorSuccess`,`colorInfo`,`colorWarning`,`colorError`,`outlined`,`standard`]);function Rm(e){return Zs(`MuiCircularProgress`,e)}Qs(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDisableShrink`]);var zm=44,Bm=Fa`
|
|
166
|
+
0% {
|
|
167
|
+
transform: rotate(0deg);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
100% {
|
|
171
|
+
transform: rotate(360deg);
|
|
172
|
+
}
|
|
173
|
+
`,Vm=Fa`
|
|
174
|
+
0% {
|
|
175
|
+
stroke-dasharray: 1px, 200px;
|
|
176
|
+
stroke-dashoffset: 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
50% {
|
|
180
|
+
stroke-dasharray: 100px, 200px;
|
|
181
|
+
stroke-dashoffset: -15px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
100% {
|
|
185
|
+
stroke-dasharray: 1px, 200px;
|
|
186
|
+
stroke-dashoffset: -126px;
|
|
187
|
+
}
|
|
188
|
+
`,Hm=typeof Bm==`string`?null:Pa`
|
|
189
|
+
animation: ${Bm} 1.4s linear infinite;
|
|
190
|
+
`,Um=typeof Vm==`string`?null:Pa`
|
|
191
|
+
animation: ${Vm} 1.4s ease-in-out infinite;
|
|
192
|
+
`,Wm=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return El({root:[`root`,n,`color${K(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,i&&`circleDisableShrink`]},Rm,t)},Gm=G(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${K(n.color)}`]]}})(Wd(({theme:e})=>{let t=ff(e,{animation:`none`});return{display:`inline-block`,variants:[{props:{variant:`determinate`},style:{...pf(e,`transform`)}},{props:{variant:`indeterminate`},style:Hm||{animation:`${Bm} 1.4s linear infinite`}},...t?[{props:{variant:`indeterminate`},style:t}]:[],...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}})),Km=G(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),qm=G(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,n.disableShrink&&t.circleDisableShrink]}})(Wd(({theme:e})=>{let t=ff(e,{animation:`none`});return{stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{...pf(e,`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:Um||{animation:`${Vm} 1.4s ease-in-out infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:t}]:[]]}})),Jm=G(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(Wd(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),Ym=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,min:s,max:c,size:l=40,style:u,thickness:d=3.6,value:f=n.min??0,variant:p=`indeterminate`,...m}=n,h=s??0,g=c??100,_={...n,color:i,disableShrink:a,size:l,thickness:d,value:f,variant:p,enableTrackSlot:o},v=Wm(_),y={},b={},x={};if(p===`determinate`){let e=2*Math.PI*((zm-d)/2),t=g-h;y.strokeDasharray=e.toFixed(3),y.strokeDashoffset=t>0?`${((g-f)/t*e).toFixed(3)}px`:`${e.toFixed(3)}px`,b.transform=`rotate(-90deg)`,x[`aria-valuenow`]=f,x[`aria-valuemin`]=h,x[`aria-valuemax`]=g}return(0,H.jsx)(Gm,{className:U(v.root,r),style:{width:l,height:l,...b,...u},ownerState:_,ref:t,role:`progressbar`,...x,...m,children:(0,H.jsxs)(Km,{className:v.svg,ownerState:_,viewBox:`${zm/2} ${zm/2} ${zm} ${zm}`,children:[o?(0,H.jsx)(Jm,{className:v.track,ownerState:_,cx:zm,cy:zm,r:(zm-d)/2,fill:`none`,strokeWidth:d,"aria-hidden":`true`}):null,(0,H.jsx)(qm,{className:v.circle,style:y,ownerState:_,cx:zm,cy:zm,r:(zm-d)/2,fill:`none`,strokeWidth:d})]})})});function Xm(e){return Zs(`MuiIconButton`,e)}var Zm=Qs(`MuiIconButton`,[`root`,`disabled`,`colorInherit`,`colorPrimary`,`colorSecondary`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`,`edgeStart`,`edgeEnd`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`loading`,`loadingIndicator`,`loadingWrapper`]),Qm=e=>{let{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e;return El({root:[`root`,o&&`loading`,n&&`disabled`,r!=="default"&&`color${K(r)}`,i&&`edge${K(i)}`,`size${K(a)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},Xm,t)},$m=G(Em,{name:`MuiIconButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${K(n.color)}`],n.edge&&t[`edge${K(n.edge)}`],t[`size${K(n.size)}`]]}})(Wd(({theme:e})=>({textAlign:`center`,flex:`0 0 auto`,fontSize:e.typography.pxToRem(24),padding:8,borderRadius:`50%`,color:(e.vars||e).palette.action.active,...pf(e,`background-color`,{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:`var(--IconButton-hoverBg)`,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:{edge:`start`},style:{marginLeft:-12}},{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:{edge:`end`},style:{marginRight:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}}]})),Wd(({theme:e})=>({variants:[{props:{color:`inherit`},style:{color:`inherit`}},...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main,"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:`small`},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:`large`},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Zm.disabled}`]:{backgroundColor:`transparent`,color:(e.vars||e).palette.action.disabled},[`&.${Zm.loading}`]:{color:`transparent`}}))),eh=G(`span`,{name:`MuiIconButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:`flex`}}]})),th=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiIconButton`}),{edge:r=!1,children:i,className:a,color:o=`default`,disabled:s=!1,disableFocusRipple:c=!1,size:l=`medium`,id:u,loading:d=null,loadingIndicator:f,...p}=n,m=fp(u),h=f??(0,H.jsx)(Ym,{"aria-labelledby":m,color:`inherit`,size:16}),g={...n,edge:r,color:o,disabled:s,disableFocusRipple:c,loading:d,loadingIndicator:h,size:l},_=Qm(g);return(0,H.jsxs)($m,{id:d?m:u,className:U(_.root,a),centerRipple:!0,internalNativeButton:!0,focusRipple:!c,disabled:s||d,ref:t,...p,ownerState:g,children:[typeof d==`boolean`&&(0,H.jsx)(`span`,{className:_.loadingWrapper,style:{display:`contents`},children:(0,H.jsx)(eh,{className:_.loadingIndicator,ownerState:g,children:d&&h})}),i]})}),nh=sp((0,H.jsx)(`path`,{d:`M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z`}),`SuccessOutlined`),rh=sp((0,H.jsx)(`path`,{d:`M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z`}),`ReportProblemOutlined`),ih=sp((0,H.jsx)(`path`,{d:`M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),`ErrorOutline`),ah=sp((0,H.jsx)(`path`,{d:`M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z`}),`InfoOutlined`),oh=sp((0,H.jsx)(`path`,{d:`M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Close`),sh=e=>{let{variant:t,color:n,severity:r,classes:i}=e;return El({root:[`root`,`color${K(n||r)}`,`${t}`],icon:[`icon`],message:[`message`],action:[`action`]},Im,i)},ch=G(Qp,{name:`MuiAlert`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant]]}})(Wd(({theme:e})=>{let t=e.palette.mode===`light`?e.darken:e.lighten,n=e.palette.mode===`light`?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:`transparent`,display:`flex`,padding:`6px 16px`,variants:[...Object.entries(e.palette).filter(Fm([`light`])).map(([r])=>({props:{colorSeverity:r,variant:`standard`},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${Lm.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Fm([`light`])).map(([n])=>({props:{colorSeverity:n,variant:`outlined`},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),border:`1px solid ${(e.vars||e).palette[n].light}`,[`& .${Lm.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}})),...Object.entries(e.palette).filter(Fm([`dark`])).map(([t])=>({props:{colorSeverity:t,variant:`filled`},style:{...e.focusVisible&&xu(`0 0 0 4px ${(e.vars||e).palette.background.default}`),fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:e.palette.mode===`dark`?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)}}}))]}})),lh=G(`div`,{name:`MuiAlert`,slot:`Icon`})({marginRight:12,padding:`7px 0`,display:`flex`,fontSize:22,opacity:.9}),uh=G(`div`,{name:`MuiAlert`,slot:`Message`})({padding:`8px 0`,minWidth:0,overflow:`auto`}),dh=G(`div`,{name:`MuiAlert`,slot:`Action`})({display:`flex`,alignItems:`flex-start`,padding:`4px 0 0 16px`,marginLeft:`auto`,marginRight:-8}),fh={success:(0,H.jsx)(nh,{fontSize:`inherit`}),warning:(0,H.jsx)(rh,{fontSize:`inherit`}),error:(0,H.jsx)(ih,{fontSize:`inherit`}),info:(0,H.jsx)(ah,{fontSize:`inherit`})},ph=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiAlert`}),{action:r,children:i,className:a,closeText:o=`Close`,color:s,icon:c,iconMapping:l=fh,onClose:u,role:d=`alert`,severity:f=`success`,slotProps:p={},slots:m={},variant:h=`standard`,...g}=n,_={...n,color:s,severity:f,variant:h,colorSeverity:s||f},v=sh(_),y={slots:m,slotProps:p},[b,x]=Up(`root`,{ref:t,shouldForwardComponentProp:!0,className:U(v.root,a),elementType:ch,externalForwardedProps:{...y,...g},ownerState:_,additionalProps:{role:d,elevation:0}}),[S,C]=Up(`icon`,{className:v.icon,elementType:lh,externalForwardedProps:y,ownerState:_}),[w,T]=Up(`message`,{className:v.message,elementType:uh,externalForwardedProps:y,ownerState:_}),[E,D]=Up(`action`,{className:v.action,elementType:dh,externalForwardedProps:y,ownerState:_}),[O,ee]=Up(`closeButton`,{elementType:th,externalForwardedProps:y,ownerState:_}),[te,k]=Up(`closeIcon`,{elementType:oh,externalForwardedProps:y,ownerState:_});return(0,H.jsxs)(b,{...x,children:[c===!1?null:(0,H.jsx)(S,{...C,children:c||l[f]||fh[f]}),(0,H.jsx)(w,{...T,children:i}),r==null?null:(0,H.jsx)(E,{...D,children:r}),r==null&&u?(0,H.jsx)(E,{...D,children:(0,H.jsx)(O,{size:`small`,"aria-label":o,title:o,color:`inherit`,onClick:u,...ee,children:(0,H.jsx)(te,{fontSize:`small`,...k})})}):null]})});function mh(e){return Zs(`MuiTypography`,e)}var hh=Qs(`MuiTypography`,[`root`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`inherit`,`button`,`caption`,`overline`,`alignLeft`,`alignRight`,`alignCenter`,`alignJustify`,`noWrap`,`gutterBottom`]),gh=e=>{let{align:t,gutterBottom:n,noWrap:r,variant:i,classes:a}=e;return El({root:[`root`,i,e.align!==`inherit`&&`align${K(t)}`,n&&`gutterBottom`,r&&`noWrap`]},mh,a)},_h=G(`span`,{name:`MuiTypography`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!==`inherit`&&t[`align${K(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom]}})(Wd(({theme:e})=>({margin:0,variants:[{props:{variant:`inherit`},style:{font:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},...Object.entries(e.typography).filter(([e,t])=>e!==`inherit`&&t&&typeof t==`object`).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>typeof e==`string`).map(([t])=>({props:{color:`text${K(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>e.align!==`inherit`,style:{textAlign:`var(--Typography-textAlign)`}},{props:({ownerState:e})=>e.noWrap,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:`0.35em`}}]}))),vh={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,inherit:`p`},q=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiTypography`}),{color:r,align:i=`inherit`,className:a,component:o,gutterBottom:s=!1,noWrap:c=!1,variant:l=`body1`,variantMapping:u=vh,...d}=n,f={...n,align:i,color:r,className:a,component:o,gutterBottom:s,noWrap:c,variant:l,variantMapping:u},p=o||u[l]||vh[l]||`span`,m=gh(f);return(0,H.jsx)(_h,{as:p,ref:t,className:U(m.root,a),...d,ownerState:f,style:{...i!==`inherit`&&{"--Typography-textAlign":i},...d.style}})});function yh(e){return Zs(`MuiAppBar`,e)}Qs(`MuiAppBar`,[`root`,`positionFixed`,`positionAbsolute`,`positionSticky`,`positionStatic`,`positionRelative`,`colorDefault`,`colorPrimary`,`colorSecondary`,`colorInherit`,`colorTransparent`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`]);var bh=e=>{let{color:t,position:n,classes:r}=e;return El({root:[`root`,`color${K(t)}`,`position${K(n)}`]},yh,r)},xh=(e,t)=>e?`${e.replace(`)`,``)}, ${t})`:t,Sh=G(Qp,{name:`MuiAppBar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${K(n.position)}`],t[`color${K(n.color)}`]]}})(Wd(({theme:e})=>({display:`flex`,flexDirection:`column`,width:`100%`,boxSizing:`border-box`,flexShrink:0,variants:[{props:{position:`fixed`},style:{position:`fixed`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0,"@media print":{position:`absolute`}}},{props:{position:`absolute`},style:{position:`absolute`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0}},{props:{position:`sticky`},style:{position:`sticky`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0}},{props:{position:`static`},style:{position:`static`}},{props:{position:`relative`},style:{position:`relative`}},{props:{color:`inherit`},style:{"--AppBar-color":`inherit`,color:`var(--AppBar-color)`}},{props:{color:`default`},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles(`dark`,{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Fm([`contrastText`])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText,...e.focusVisible&&xu(`0 0 0 4px ${(e.vars||e).palette.background.default}`)}})),{props:e=>e.enableColorOnDark===!0&&![`inherit`,`transparent`].includes(e.color),style:{backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`}},{props:e=>e.enableColorOnDark===!1&&![`inherit`,`transparent`].includes(e.color),style:{backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`,...e.applyStyles(`dark`,{backgroundColor:e.vars?xh(e.vars.palette.AppBar.darkBg,`var(--AppBar-background)`):null,color:e.vars?xh(e.vars.palette.AppBar.darkColor,`var(--AppBar-color)`):null})}},{props:{color:`transparent`},style:{"--AppBar-background":`transparent`,"--AppBar-color":`inherit`,backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`,...e.applyStyles(`dark`,{backgroundImage:`none`})}}]}))),Ch=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiAppBar`}),{className:r,color:i=`primary`,enableColorOnDark:a=!1,position:o=`fixed`,...s}=n,c={...n,color:i,position:o,enableColorOnDark:a},l=bh(c);return(0,H.jsx)(Sh,{square:!0,component:`header`,ownerState:c,elevation:4,className:U(l.root,r,o===`fixed`&&`mui-fixed`),ref:t,...s})});function _ee(){let[,e]=L.useState({});return L.useCallback(()=>{e({})},[])}function wh(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}function Th(e){let t=L.useRef({});return L.useEffect(()=>{t.current=e}),t.current}function Eh({array1:e,array2:t,parser:n=e=>e}){return e&&t&&e.length===t.length&&e.every((e,r)=>n(e)===n(t[r]))}function Dh(e){return e.normalize(`NFD`).replace(/[\u0300-\u036f]/g,``)}function vee(e={}){let{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:i=`any`,stringify:a,trim:o=!1}=e;return(e,{inputValue:s,getOptionLabel:c})=>{let l=o?s.trim():s;n&&(l=l.toLowerCase()),t&&(l=Dh(l));let u=l?e.filter(e=>{let r=(a||c)(e);return n&&(r=r.toLowerCase()),t&&(r=Dh(r)),i===`start`?r.startsWith(l):r.includes(l)}):e;return typeof r==`number`?u.slice(0,r):u}}var yee=vee(),bee=5,xee=e=>e.current!==null&&wh(e.current.parentElement,document.activeElement),Oh=(e,t)=>e===t,See=[];function kh(e,t,n,r){if(t||e==null||r)return``;let i=n(e);return typeof i==`string`?i:``}function Cee(e){let{unstable_isActiveElementInListbox:t=xee,unstable_classNamePrefix:n=`Mui`,autoComplete:r=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:o=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:c=!1,componentName:l=`useAutocomplete`,defaultValue:u=e.multiple?See:null,disableClearable:d=!1,disableCloseOnSelect:f=!1,disabled:p,disabledItemsFocusable:m=!1,disableListWrap:h=!1,filterOptions:g=yee,filterSelectedOptions:_=!1,freeSolo:v=!1,getOptionDisabled:y,getOptionKey:b,getOptionLabel:x=e=>e.label??e,groupBy:S,handleHomeEndKeys:C=!e.freeSolo,id:w,includeInputInList:T=!1,inputValue:E,isOptionEqualToValue:D=Oh,multiple:O=!1,onChange:ee,onClose:te,onHighlightChange:k,onInputChange:A,onOpen:j,open:M,openOnFocus:ne=!1,options:re,readOnly:ie=!1,renderValue:ae,resetHighlightOnMouseLeave:N=!1,selectOnFocus:oe=!e.freeSolo,value:se}=e,ce=Qc(w),P=x;P=e=>{let t=x(e);return typeof t==`string`?t:String(t)};let le=L.useRef(!1),ue=L.useRef(!0),F=L.useRef(null),I=L.useRef(null),de=L.useRef(!1),fe=L.useRef(!1),[pe,me]=L.useState(null),[he,ge]=L.useState(-1),_e=i?0:-1,ve=L.useRef(_e),ye=L.useRef(null),be=L.useRef(!1),xe=L.useRef(!1),R=L.useRef(kh(u??se,O,P)).current,[z,B]=pp({controlled:se,default:u,name:l}),[Se,Ce]=pp({controlled:E,default:R,name:l,state:`inputValue`}),[we,Te]=L.useState(!1),Ee=L.useCallback((e,t,n)=>{if(!(O?z.length<t.length:t!==null)&&!s&&(n!==`reset`||!v||O||t!==null))return;let r=kh(t,O,P,ae);Se!==r&&(Ce(r),A&&A(e,r,n))},[P,Se,O,A,Ce,s,v,z,ae]),[De,Oe]=pp({controlled:M,default:!1,name:l,state:`open`}),[ke,Ae]=L.useState(!0),V=!O&&z!=null&&Se===P(z),je=De&&!ie,Me=L.useMemo(()=>O?z:z==null?[]:[z],[O,z]),Ne=L.useMemo(()=>D!==Oh||Me.length===0?null:new Set(Me),[D,Me]),Pe=L.useCallback(e=>Ne?Ne.has(e):Me.some(t=>t!=null&&D(e,t)),[D,Me,Ne]),Fe=je?g(re.filter(e=>!(_&&Pe(e))),{inputValue:V&&ke?``:Se,getOptionLabel:P}):[],Ie=Th({filteredOptions:Fe,value:z,inputValue:Se});L.useEffect(()=>{let e=z!==Ie.value;(!we||e)&&(!v||e&&(z!=null||Ie.value!==void 0))&&Ee(null,z,`reset`)},[z,Ee,we,Ie.value,v]);let Le=De&&Fe.length>0&&!ie,Re=Dd(e=>{e===-1?F.current.focus():pe.querySelector(`[data-item-index="${e}"]`).focus()});L.useEffect(()=>{O&&he>z.length-1&&(ge(-1),Re(-1))},[z,O,he,Re]);function ze(e,t){if(!I.current||e<0||e>=Fe.length)return-1;let n=e;for(;;){let r=I.current.querySelector(`[data-option-index="${n}"]`),i=m?!1:!r||r.disabled||r.getAttribute(`aria-disabled`)===`true`;if(r&&r.hasAttribute(`tabindex`)&&!i)return n;if(n=t===`next`?(n+1)%Fe.length:(n-1+Fe.length)%Fe.length,n===e)return-1}}let Be=Dd(({index:e,reason:t,preserveScroll:r=!1})=>{if(F.current==null&&I.current==null||(e===-1?F.current.removeAttribute(`aria-activedescendant`):F.current.setAttribute(`aria-activedescendant`,`${ce}-option-${e}`),!I.current))return;let i=I.current.querySelector(`[role="option"].${n}-focused`);i&&(i.classList.remove(`${n}-focused`),i.classList.remove(`${n}-focusVisible`));let a=I.current;if(I.current.getAttribute(`role`)!==`listbox`&&(a=I.current.parentElement.querySelector(`[role="listbox"]`)),!a)return;if(e===-1){r||(a.scrollTop=0);return}let o=I.current.querySelector(`[data-option-index="${e}"]`);if(o&&(o.classList.add(`${n}-focused`),t===`keyboard`&&o.classList.add(`${n}-focusVisible`),a.scrollHeight>a.clientHeight&&t!==`mouse`&&t!==`touch`)){let e=o,t=a.clientHeight+a.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?a.scrollTop=n-a.clientHeight:e.offsetTop-e.offsetHeight*(S?1.3:0)<a.scrollTop&&(a.scrollTop=e.offsetTop-e.offsetHeight*(S?1.3:0))}}),Ve=Dd(({event:e,index:t,reason:n,preserveScroll:r=!1})=>{ve.current=t,ye.current=n??null,k&&[`mouse`,`keyboard`,`touch`].includes(n)&&k(e,t===-1?null:Fe[t],n),Be({index:t,reason:n,preserveScroll:r})}),He=Dd(({index:e})=>{ve.current=e,Be({index:e,reason:ye.current})}),Ue=Dd(({event:e,diff:t,direction:n=`next`,reason:i,preserveScroll:a})=>{if(!je)return;i===`keyboard`&&(be.current=!1,xe.current=!1);let o=ze((()=>{let e=Fe.length-1;if(t===`reset`)return _e;if(t===`start`)return 0;if(t===`end`)return e;let n=ve.current+t;return n<0?n===-1&&T?-1:h&&ve.current!==-1||Math.abs(t)>1?0:e:n>e?n===e+1&&T?-1:h||Math.abs(t)>1?e:0:n})(),n);if(Ve({index:o,reason:i,event:e,preserveScroll:a}),r&&t!==`reset`){if(o===-1)F.current.value=Se;else{let e=P(Fe[o]);F.current.value=e,e.toLowerCase().indexOf(Se.toLowerCase())===0&&Se.length>0&&F.current.setSelectionRange(Se.length,e.length)}}}),We=!Eh({array1:Ie.filteredOptions,array2:Fe,parser:P}),Ge=()=>{if(ve.current!==-1&&!Eh({array1:Ie.filteredOptions,array2:Fe,parser:P})&&Ie.inputValue===Se&&(O?z.length===Ie.value.length&&Ie.value.every((e,t)=>P(z[t])===P(e)):((e,t)=>(e?P(e):``)===(t?P(t):``))(Ie.value,z))){let e=Ie.filteredOptions[ve.current];if(e)return Fe.findIndex(t=>P(t)===P(e))}return-1},Ke=L.useCallback(()=>{if(!je)return;let e=Ge();if(e!==-1){He({index:e});return}let t=O?z[0]:z;if(Fe.length===0||t==null){let e=We&&Ie.inputValue===Se&&Ie.filteredOptions?.length>0&&Fe.length>Ie.filteredOptions.length&&Ie.filteredOptions.every((e,t)=>P(e)===P(Fe[t]));Ue({diff:`reset`,preserveScroll:e});return}if(I.current){if(t!=null){let e=Fe[ve.current];if(O&&e&&z.findIndex(t=>D(e,t))!==-1&&Ie.filteredOptions?.length>0){He({index:ve.current});return}let n=Fe.findIndex(e=>D(e,t));n===-1?Ue({diff:`reset`}):Ve({index:n});return}if(ve.current>=Fe.length-1){Ve({index:Fe.length-1});return}Ve({index:ve.current})}},[Fe.length,!O&&z,Ue,Ve,He,je,Se,O]),qe=Dd(e=>{dp(I,e),e&&Ke()});L.useEffect(()=>{(We||je&&!f)&&Ke()},[Ke,We,je,f]),L.useEffect(()=>{if(typeof window>`u`)return;let e=()=>{fe.current=!0};return window.addEventListener(`blur`,e),()=>{window.removeEventListener(`blur`,e)}},[]);let Je=e=>{De||(Oe(!0),Ae(!0),xe.current=!1,j&&j(e))},Ye=(e,t)=>{De&&(Oe(!1),be.current=!1,ye.current=null,te&&te(e,t))},Xe=(e,t,n,r)=>{if(O){if(z.length===t.length&&z.every((e,n)=>e===t[n]))return}else if(z===t)return;ee&&ee(e,t,n,r),B(t)},Ze=(e,t,n=`selectOption`,r=`options`)=>{let i=n,a=t;if(O){a=Array.isArray(z)?z.slice():[];let e=a.findIndex(e=>D(t,e));e===-1?a.push(t):r!==`freeSolo`&&(a.splice(e,1),i=`removeOption`)}Ee(e,a,i),Xe(e,a,i,{option:t}),!f&&(!e||!e.ctrlKey&&!e.metaKey)&&Ye(e,i),(o===!0||o===`touch`&&xe.current||o===`mouse`&&!xe.current)&&F.current.blur()};function Qe(e,t){if(e===-1)return-1;let n=e;for(;;){if(t===`next`&&n===z.length||t===`previous`&&n===-1)return-1;let e=pe.querySelector(`[data-item-index="${n}"]`);if(!e||!e.hasAttribute(`tabindex`)||e.disabled||e.getAttribute(`aria-disabled`)===`true`)n+=t===`next`?1:-1;else return n}}let $e=(e,t)=>{if(!O)return;Se===``&&Ye(e,`toggleInput`);let n=he;he===-1&&t===`previous`?(n=z.length-1,v&&Se!==``&&(Ce(``),A&&A(e,``,`reset`))):(n+=t===`next`?1:-1,n<0&&(n=0),n===z.length&&(n=-1)),n=Qe(n,t),ge(n),Re(n)},et=e=>{Ce(``),A&&A(e,``,`clear`),Xe(e,O?[]:null,`clear`)},tt=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(he!==-1&&![`ArrowLeft`,`ArrowRight`].includes(t.key)&&(ge(-1),Re(-1)),t.which!==229))switch(t.key){case`Home`:je&&C&&(t.preventDefault(),Ue({diff:`start`,direction:`next`,reason:`keyboard`,event:t}));break;case`End`:je&&C&&(t.preventDefault(),Ue({diff:`end`,direction:`previous`,reason:`keyboard`,event:t}));break;case`PageUp`:t.preventDefault(),Ue({diff:-5,direction:`previous`,reason:`keyboard`,event:t}),Je(t);break;case`PageDown`:t.preventDefault(),Ue({diff:bee,direction:`next`,reason:`keyboard`,event:t}),Je(t);break;case`ArrowDown`:t.preventDefault(),Ue({diff:1,direction:`next`,reason:`keyboard`,event:t}),Je(t);break;case`ArrowUp`:t.preventDefault(),Ue({diff:-1,direction:`previous`,reason:`keyboard`,event:t}),Je(t);break;case`ArrowLeft`:{let e=F.current;if(!(e&&e.selectionStart===0&&e.selectionEnd===0))return;!O&&ae&&z!=null?(v&&Se!==``&&(Ce(``),A&&A(t,``,`reset`)),ge(0),Re(0)):$e(t,`previous`);break}case`ArrowRight`:!O&&ae?(ge(-1),Re(-1)):$e(t,`next`);break;case`Enter`:{let e=je&&ve.current!==-1&&ye.current===null,n=v&&!ke&&e,i=!v||ke||!e,a=n&&!be.current;if(ve.current!==-1&&je&&i&&!be.current){let e=Fe[ve.current],n=y?y(e):!1;if(t.preventDefault(),n)return;Ze(t,e,`selectOption`),r&&F.current.setSelectionRange(F.current.value.length,F.current.value.length)}else v&&Se!==``&&V===!1?((O||a)&&t.preventDefault(),Ze(t,Se,`createOption`,`freeSolo`)):je&&be.current&&(t.preventDefault(),Ye(t,`escape`));break}case`Escape`:je?(t.preventDefault(),t.stopPropagation(),Ye(t,`escape`)):c&&(Se!==``||O&&z.length>0||ae)&&(t.preventDefault(),t.stopPropagation(),et(t));break;case`Backspace`:if(de.current){de.current=!1;break}if(O&&!ie&&Se===``&&z.length>0){let e=he===-1?z.length-1:he,n=z.slice();n.splice(e,1),Xe(t,n,`removeOption`,{option:z[e]}),he!==-1&&(de.current=!0,setTimeout(()=>{de.current&&=!1},0))}!O&&ae&&!ie&&Se===``&&Xe(t,null,`removeOption`,{option:z});break;case`Delete`:if(O&&!ie&&Se===``&&z.length>0&&he!==-1){let e=he,n=z.slice();n.splice(e,1),Xe(t,n,`removeOption`,{option:z[e]})}!O&&ae&&!ie&&Se===``&&Xe(t,null,`removeOption`,{option:z})}},nt=e=>{if(Te(!0),he!==-1&&(ge(-1),Re(-1)),fe.current){fe.current=!1;return}ne&&!le.current&&Je(e)},rt=e=>{if(t(I)){F.current.focus();return}Te(!1),ue.current=!0,le.current=!1,a&&ve.current!==-1&&je&&ye.current!==`mouse`&&ye.current!==`touch`?Ze(e,Fe[ve.current],`blur`):a&&v&&Se!==``?Ze(e,Se,`blur`,`freeSolo`):s&&Ee(e,z,`blur`),Ye(e,`blur`)},it=e=>{let t=e.target.value,n=Se!==t;n&&(Ce(t),be.current=!1,A&&A(e,t,`input`)),t===``?!d&&!O&&!ae&&Xe(e,null,`clear`):Je(e),n&&Ae(!1)},at=e=>{let t=Number(e.currentTarget.getAttribute(`data-option-index`));ve.current===t?ye.current=`mouse`:Ve({event:e,index:t,reason:`mouse`}),xe.current||(be.current=!1)},ot=e=>{N&&ve.current!==-1&&ye.current===`mouse`&&!xe.current&&Ve({event:e,index:-1,reason:`mouse`,preserveScroll:!0})},st=e=>{be.current=!1,Ve({event:e,index:Number(e.currentTarget.getAttribute(`data-option-index`)),reason:`touch`}),xe.current=!0},ct=e=>{let t=Number(e.currentTarget.getAttribute(`data-option-index`));Ze(e,Fe[t],`selectOption`),xe.current=!1},lt=e=>t=>{let n=z.slice();n.splice(e,1),Xe(t,n,`removeOption`,{option:z[e]})},ut=e=>{Xe(e,null,`removeOption`,{option:z})},dt=e=>{De?Ye(e,`toggleInput`):Je(e)},ft=e=>{wh(e.currentTarget,e.target)&&(!pe||wh(pe,e.target))&&e.target.getAttribute(`id`)!==ce&&e.preventDefault()},pt=e=>{wh(e.currentTarget,e.target)&&(!pe||wh(pe,e.target))&&(F.current.focus(),oe&&ue.current&&F.current.selectionEnd-F.current.selectionStart===0&&F.current.select(),ue.current=!1)},mt=e=>{!p&&(Se===``||!De)&&e.button===0&&dt(e)},ht=v&&Se.length>0;ht||=O?z.length>0:z!==null;let gt=Fe;return S&&(gt=Fe.reduce((e,t,n)=>{let r=S(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e},[])),p&&we&&rt(),{getRootProps:(e={})=>({...e,onKeyDown:tt(e),onMouseDown:ft,onClick:pt}),getInputLabelProps:()=>({id:`${ce}-label`,htmlFor:ce}),getInputProps:()=>({id:ce,value:Se,onBlur:rt,onFocus:nt,onChange:it,onMouseDown:mt,"aria-activedescendant":je?``:null,"aria-autocomplete":r?`both`:`list`,"aria-controls":Le?`${ce}-listbox`:void 0,"aria-expanded":Le,autoComplete:`off`,ref:F,autoCapitalize:`none`,spellCheck:`false`,role:`combobox`,disabled:p}),getClearProps:()=>({tabIndex:-1,type:`button`,onClick:e=>{le.current=!0,et(e)}}),getItemProps:({index:e=0}={})=>({...O&&{key:e},"data-item-index":e,tabIndex:-1,onFocus:()=>{he!==e&&ge(e)},...!ie&&{onDelete:O?lt(e):ut}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:`button`,onClick:dt}),getListboxProps:(e={})=>({...e,role:`listbox`,id:`${ce}-listbox`,"aria-labelledby":`${ce}-label`,"aria-multiselectable":O||void 0,ref:qe,onMouseDown:t=>{e.onMouseDown?.(t),!t.defaultMuiPrevented&&t.preventDefault()},onScroll:t=>{e.onScroll?.(t),!t.defaultMuiPrevented&&xe.current&&(be.current=!0)},onMouseLeave:t=>{e.onMouseLeave?.(t),!t.defaultMuiPrevented&&ot(t)}}),getOptionProps:({index:e,option:t})=>{let n=Pe(t),r=y?y(t):!1;return{key:b?.(t)??P(t),tabIndex:-1,role:`option`,id:`${ce}-option-${e}`,onMouseMove:at,onClick:ct,onTouchStart:st,"data-option-index":e,"aria-disabled":r,"aria-selected":n}},id:ce,inputValue:Se,value:z,dirty:ht,expanded:je&&pe,popupOpen:je,focused:we||he!==-1,anchorEl:pe,setAnchorEl:me,focusedItem:he,groupedOptions:gt}}var Ah=`bottom`,jh=`right`,Mh=`left`,wee=`auto`,Nh=[`top`,Ah,jh,Mh],Ph=`start`,Tee=`clippingParents`,Eee=`viewport`,Fh=`popper`,Dee=`reference`,Ih=Nh.reduce(function(e,t){return e.concat([t+`-`+Ph,t+`-end`])},[]),Lh=[].concat(Nh,[wee]).reduce(function(e,t){return e.concat([t,t+`-`+Ph,t+`-end`])},[]),Oee=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function Rh(e){return e?(e.nodeName||``).toLowerCase():null}function zh(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Bh(e){return e instanceof zh(e).Element||e instanceof Element}function Vh(e){return e instanceof zh(e).HTMLElement||e instanceof HTMLElement}function Hh(e){return typeof ShadowRoot>`u`?!1:e instanceof zh(e).ShadowRoot||e instanceof ShadowRoot}function Uh(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];Vh(i)&&Rh(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function Wh(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});Vh(r)&&Rh(r)&&(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var Gh={name:`applyStyles`,enabled:!0,phase:`write`,fn:Uh,effect:Wh,requires:[`computeStyles`]};function Kh(e){return e.split(`-`)[0]}var qh=Math.max,Jh=Math.min,Yh=Math.round;function Xh(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function Zh(){return!/^((?!chrome|android).)*safari/i.test(Xh())}function Qh(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&Vh(e)&&(i=e.offsetWidth>0&&Yh(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Yh(r.height)/e.offsetHeight||1);var o=(Bh(e)?zh(e):window).visualViewport,s=!Zh()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function $h(e){var t=Qh(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function eg(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Hh(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function tg(e){return zh(e).getComputedStyle(e)}function ng(e){return[`table`,`td`,`th`].indexOf(Rh(e))>=0}function rg(e){return((Bh(e)?e.ownerDocument:e.document)||window.document).documentElement}function ig(e){return Rh(e)===`html`?e:e.assignedSlot||e.parentNode||(Hh(e)?e.host:null)||rg(e)}function ag(e){return!Vh(e)||tg(e).position===`fixed`?null:e.offsetParent}function og(e){var t=/firefox/i.test(Xh());if(/Trident/i.test(Xh())&&Vh(e)&&tg(e).position===`fixed`)return null;var n=ig(e);for(Hh(n)&&(n=n.host);Vh(n)&&[`html`,`body`].indexOf(Rh(n))<0;){var r=tg(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function sg(e){for(var t=zh(e),n=ag(e);n&&ng(n)&&tg(n).position===`static`;)n=ag(n);return n&&(Rh(n)===`html`||Rh(n)===`body`&&tg(n).position===`static`)?t:n||og(e)||t}function cg(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function lg(e,t,n){return qh(e,Jh(t,n))}function ug(e,t,n){var r=lg(e,t,n);return r>n?n:r}function dg(){return{top:0,right:0,bottom:0,left:0}}function fg(e){return Object.assign({},dg(),e)}function pg(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var mg=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,fg(typeof e==`number`?pg(e,Nh):e)};function hg(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=Kh(n.placement),c=cg(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(a&&o){var u=mg(i.padding,n),d=$h(a),f=c===`y`?`top`:Mh,p=c===`y`?Ah:jh,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=sg(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=lg(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function gg(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||eg(t.elements.popper,r)&&(t.elements.arrow=r))}var kee={name:`arrow`,enabled:!0,phase:`main`,fn:hg,effect:gg,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function _g(e){return e.split(`-`)[1]}var Aee={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function jee(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Yh(n*i)/i||0,y:Yh(r*i)/i||0}}function vg(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=Mh,b=`top`,x=window;if(l){var S=sg(n),C=`clientHeight`,w=`clientWidth`;if(S===zh(n)&&(S=rg(n),tg(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=Ah;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=jh;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var D=Object.assign({position:s},l&&Aee),O=u===!0?jee({x:p,y:h},zh(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var ee;return Object.assign({},D,(ee={},ee[b]=v?`0`:``,ee[y]=_?`0`:``,ee.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,ee))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function Mee(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0||r,a=n.adaptive,o=a===void 0||a,s=n.roundOffsets,c=s===void 0||s,l={placement:Kh(t.placement),variation:_g(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,vg(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,vg(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Nee={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:Mee,data:{}},yg={passive:!0};function bg(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0||i,o=r.resize,s=o===void 0||o,c=zh(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,yg)}),s&&c.addEventListener(`resize`,n.update,yg),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,yg)}),s&&c.removeEventListener(`resize`,n.update,yg)}}var xg={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:bg,data:{}},Sg={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Cg(e){return e.replace(/left|right|bottom|top/g,function(e){return Sg[e]})}var wg={start:`end`,end:`start`};function Tg(e){return e.replace(/start|end/g,function(e){return wg[e]})}function Eg(e){var t=zh(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Dg(e){return Qh(rg(e)).left+Eg(e).scrollLeft}function Og(e,t){var n=zh(e),r=rg(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=Zh();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+Dg(e),y:c}}function kg(e){var t=rg(e),n=Eg(e),r=e.ownerDocument?.body,i=qh(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=qh(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+Dg(e),s=-n.scrollTop;return tg(r||t).direction===`rtl`&&(o+=qh(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function Ag(e){var t=tg(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function jg(e){return[`html`,`body`,`#document`].indexOf(Rh(e))>=0?e.ownerDocument.body:Vh(e)&&Ag(e)?e:jg(ig(e))}function Mg(e,t){t===void 0&&(t=[]);var n=jg(e),r=n===e.ownerDocument?.body,i=zh(n),a=r?[i].concat(i.visualViewport||[],Ag(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(Mg(ig(a)))}function Ng(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Pg(e,t){var n=Qh(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Fg(e,t,n){return t===`viewport`?Ng(Og(e,n)):Bh(t)?Pg(t,n):Ng(kg(rg(e)))}function Ig(e){var t=Mg(ig(e)),n=[`absolute`,`fixed`].indexOf(tg(e).position)>=0&&Vh(e)?sg(e):e;return Bh(n)?t.filter(function(e){return Bh(e)&&eg(e,n)&&Rh(e)!==`body`}):[]}function Lg(e,t,n,r){var i=t===`clippingParents`?Ig(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=Fg(e,n,r);return t.top=qh(i.top,t.top),t.right=Jh(i.right,t.right),t.bottom=Jh(i.bottom,t.bottom),t.left=qh(i.left,t.left),t},Fg(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Rg(e){var t=e.reference,n=e.element,r=e.placement,i=r?Kh(r):null,a=r?_g(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case Ah:c={x:o,y:t.y+t.height};break;case jh:c={x:t.x+t.width,y:s};break;case Mh:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?cg(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case Ph:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2)}}return c}function zg(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?Tee:s,l=n.rootBoundary,u=l===void 0?Eee:l,d=n.elementContext,f=d===void 0?Fh:d,p=n.altBoundary,m=p!==void 0&&p,h=n.padding,g=h===void 0?0:h,_=fg(typeof g==`number`?pg(g,Nh):g),v=f===`popper`?Dee:Fh,y=e.rects.popper,b=e.elements[m?v:f],x=Lg(Bh(b)?b:b.contextElement||rg(e.elements.popper),c,u,o),S=Qh(e.elements.reference),C=Rg({reference:S,element:y,strategy:`absolute`,placement:i}),w=Ng(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function Bg(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?Lh:c,u=_g(r),d=u?s?Ih:Ih.filter(function(e){return _g(e)===u}):Nh,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=zg(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[Kh(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function Vg(e){if(Kh(e)===`auto`)return[];var t=Cg(e);return[Tg(e),t,Tg(t)]}function Hg(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o===void 0||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0||p,h=n.allowedAutoPlacements,g=t.options.placement,_=Kh(g)===g,v=c||(_||!m?[Cg(g)]:Vg(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(Kh(n)===`auto`?Bg(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T<y.length;T++){var E=y[T],D=Kh(E),O=_g(E)===Ph,ee=[`top`,Ah].indexOf(D)>=0,te=ee?`width`:`height`,k=zg(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),A=ee?O?jh:Mh:O?Ah:`top`;b[te]>x[te]&&(A=Cg(A));var j=Cg(A),M=[];if(a&&M.push(k[D]<=0),s&&M.push(k[A]<=0,k[j]<=0),M.every(function(e){return e})){w=E,C=!1;break}S.set(E,M)}if(C)for(var ne=m?3:1,re=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},ie=ne;ie>0&&re(ie)!==`break`;ie--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var Ug={name:`flip`,enabled:!0,phase:`main`,fn:Hg,requiresIfExists:[`offset`],data:{_skip:!1}};function Wg(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Gg(e){return[`top`,jh,Ah,Mh].some(function(t){return e[t]>=0})}function Kg(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=zg(t,{elementContext:`reference`}),s=zg(t,{altBoundary:!0}),c=Wg(o,r),l=Wg(s,i,a),u=Gg(c),d=Gg(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var qg={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:Kg};function Jg(e,t,n){var r=Kh(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function Yg(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=Lh.reduce(function(e,n){return e[n]=Jg(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var Xg={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:Yg};function Zg(e){var t=e.state,n=e.name;t.modifiersData[n]=Rg({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var Qg={name:`popperOffsets`,enabled:!0,phase:`read`,fn:Zg,data:{}};function $g(e){return e===`x`?`y`:`x`}function e_(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o!==void 0&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0||f,m=n.tetherOffset,h=m===void 0?0:m,g=zg(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=Kh(t.placement),v=_g(t.placement),y=!v,b=cg(_),x=$g(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(a){var ee=b===`y`?`top`:Mh,te=b===`y`?Ah:jh,k=b===`y`?`height`:`width`,A=S[b],j=A+g[ee],M=A-g[te],ne=p?-w[k]/2:0,re=v===`start`?C[k]:w[k],ie=v===`start`?-w[k]:-C[k],ae=t.elements.arrow,N=p&&ae?$h(ae):{width:0,height:0},oe=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:dg(),se=oe[ee],ce=oe[te],P=lg(0,C[k],N[k]),le=y?C[k]/2-ne-P-se-E.mainAxis:re-P-se-E.mainAxis,ue=y?-C[k]/2+ne+P+ce+E.mainAxis:ie+P+ce+E.mainAxis,F=t.elements.arrow&&sg(t.elements.arrow),I=F?b===`y`?F.clientTop||0:F.clientLeft||0:0,de=D?.[b]??0,fe=A+le-de-I,pe=A+ue-de,L=lg(p?Jh(j,fe):j,A,p?qh(M,pe):M);S[b]=L,O[b]=L-A}if(s){var me=b===`x`?`top`:Mh,he=b===`x`?Ah:jh,ge=S[x],_e=x===`y`?`height`:`width`,ve=ge+g[me],ye=ge-g[he],be=[`top`,Mh].indexOf(_)!==-1,xe=D?.[x]??0,R=be?ve:ge-C[_e]-w[_e]-xe+E.altAxis,z=be?ge+C[_e]+w[_e]-xe-E.altAxis:ye,B=p&&be?ug(R,ge,z):lg(p?R:ve,ge,p?z:ye);S[x]=B,O[x]=B-ge}t.modifiersData[r]=O}}var t_={name:`preventOverflow`,enabled:!0,phase:`main`,fn:e_,requiresIfExists:[`offset`]};function n_(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function r_(e){return e===zh(e)||!Vh(e)?Eg(e):n_(e)}function i_(e){var t=e.getBoundingClientRect(),n=Yh(t.width)/e.offsetWidth||1,r=Yh(t.height)/e.offsetHeight||1;return n!==1||r!==1}function a_(e,t,n){n===void 0&&(n=!1);var r=Vh(t),i=Vh(t)&&i_(t),a=rg(t),o=Qh(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Rh(t)!==`body`||Ag(a))&&(s=r_(t)),Vh(t)?(c=Qh(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=Dg(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function o_(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function s_(e){var t=o_(e);return Oee.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function c_(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function l_(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var u_={placement:`bottom`,modifiers:[],strategy:`absolute`};function d_(){return![...arguments].some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function f_(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?u_:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},u_,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:Bh(e)?Mg(e):e.contextElement?Mg(e.contextElement):[],popper:Mg(t)};var s=s_(l_([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(d_(t,n)){i.rects={reference:a_(t,sg(n),i.options.strategy===`fixed`),popper:$h(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++){if(i.reset===!0){i.reset=!1,r=-1;continue}var a=i.orderedModifiers[r],o=a.fn,l=a.options,u=l===void 0?{}:l,d=a.name;typeof o==`function`&&(i=o({state:i,options:u,name:d,instance:c})||i)}}}},update:c_(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!d_(e,t))return c;c.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)});function l(){i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=n===void 0?{}:n,a=e.effect;if(typeof a==`function`){var s=a({state:i,name:t,instance:c,options:r});o.push(s||function(){})}})}function u(){o.forEach(function(e){return e()}),o=[]}return c}}var p_=f_({defaultModifiers:[xg,Qg,Nee,Gh,Xg,Ug,t_,kee,qg]});function m_(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:zp(n,r),{props:s,internalRef:c}=Hp({...a,externalSlotProps:o}),l=Ed(c,o?.ref,e.additionalProps?.ref);return Rp(t,{...s,ref:l},r)}function h_(e){return e?.props?.ref||null}var g_=l(Er(),1);function Pee(e){return typeof e==`function`?e():e}var __=L.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=L.useState(null),s=Ed(L.isValidElement(n)?h_(n):null,t);if(mc(()=>{i||o(Pee(r)||document.body)},[r,i]),mc(()=>{if(a&&!i)return dp(t,a),()=>{dp(t,null)}},[t,a,i]),i){if(L.isValidElement(n)){let e={ref:s};return L.cloneElement(n,e)}return n}return a&&g_.createPortal(n,a)});function Fee(e){return Zs(`MuiPopper`,e)}Qs(`MuiPopper`,[`root`]);function Iee(e,t){if(t===`ltr`)return e;switch(e){case`bottom-end`:return`bottom-start`;case`bottom-start`:return`bottom-end`;case`top-end`:return`top-start`;case`top-start`:return`top-end`;default:return e}}function v_(e){return typeof e==`function`?e():e}function Lee(e){return e.nodeType!==void 0}var Ree=e=>{let{classes:t}=e;return El({root:[`root`]},Fee,t)},zee={},Bee=L.forwardRef(function(e,t){let{anchorEl:n,children:r,direction:i,disablePortal:a,modifiers:o,open:s,placement:c,popperOptions:l,popperRef:u,slotProps:d={},slots:f={},TransitionProps:p,ownerState:m,...h}=e,g=L.useRef(null),_=Ed(g,t),v=L.useRef(null),y=Ed(v,u),b=L.useRef(y);mc(()=>{b.current=y},[y]),L.useImperativeHandle(u,()=>v.current,[]);let x=Iee(c,i),[S,C]=L.useState(x),w=L.useMemo(()=>v_(n),[n]);L.useEffect(()=>{v.current&&v.current.forceUpdate()}),mc(()=>{if(!w||!s)return;let e=e=>{C(e.placement)},t=[{name:`preventOverflow`,options:{altBoundary:a}},{name:`flip`,options:{altBoundary:a}},{name:`onUpdate`,enabled:!0,phase:`afterWrite`,fn:({state:t})=>{e(t)}}];o!=null&&(t=t.concat(o)),l&&l.modifiers!=null&&(t=t.concat(l.modifiers));let n=p_(w,g.current,{placement:x,...l,modifiers:t});b.current(n);let r=g.current;return()=>{if(r){let{style:e}=r,t=e.position,i=e.top,a=e.left,o=e.transform;n.destroy(),e.position=t,e.top=i,e.left=a,e.transform=o}else n.destroy();b.current(null)}},[w,a,o,s,l,x]);let T={placement:S};p!==null&&(T.TransitionProps=p);let E=Ree(e),D=f.root??`div`,O=m_({elementType:D,externalSlotProps:d.root,externalForwardedProps:h,additionalProps:{role:`tooltip`,ref:_},ownerState:e,className:E.root});return(0,H.jsx)(D,{...O,children:typeof r==`function`?r(T):r})}),Vee=G(L.forwardRef(function(e,t){let{anchorEl:n,children:r,container:i,direction:a=`ltr`,disablePortal:o=!1,keepMounted:s=!1,modifiers:c,open:l,placement:u=`bottom`,popperOptions:d=zee,popperRef:f,style:p,transition:m=!1,slotProps:h={},slots:g={},..._}=e,[v,y]=L.useState(!0),b=()=>{y(!1)},x=()=>{y(!0)};if(!s&&!l&&(!m||v))return null;let S;if(i)S=i;else if(n){let e=v_(n);S=e&&Lee(e)?Od(e).body:Od(null).body}let C=!l&&s&&(!m||v)?`none`:void 0,w=m?{in:l,onEnter:b,onExited:x}:void 0;return(0,H.jsx)(__,{disablePortal:o,container:S,children:(0,H.jsx)(Bee,{anchorEl:n,direction:a,disablePortal:o,modifiers:c,ref:t,open:m?!v:l,placement:u,popperOptions:d,popperRef:f,slotProps:h,slots:g,..._,style:{position:`fixed`,top:0,left:0,display:C,...p},TransitionProps:w,children:r})})}),{name:`MuiPopper`,slot:`Root`})({}),y_=L.forwardRef(function(e,t){let n=Wc(),{anchorEl:r,component:i,container:a,disablePortal:o,keepMounted:s,modifiers:c,open:l,placement:u,popperOptions:d,popperRef:f,transition:p,slots:m,slotProps:h,...g}=Gd({props:e,name:`MuiPopper`}),_={anchorEl:r,container:a,disablePortal:o,keepMounted:s,modifiers:c,open:l,placement:u,popperOptions:d,popperRef:f,transition:p,...g};return(0,H.jsx)(Vee,{as:i,direction:n?`rtl`:`ltr`,slots:m,slotProps:h,..._,ref:t})});function Hee(e){return Zs(`MuiListSubheader`,e)}Qs(`MuiListSubheader`,[`root`,`colorPrimary`,`colorInherit`,`gutters`,`inset`,`sticky`]);var Uee=e=>{let{classes:t,color:n,disableGutters:r,inset:i,disableSticky:a}=e;return El({root:[`root`,n!=="default"&&`color${K(n)}`,!r&&`gutters`,i&&`inset`,!a&&`sticky`]},Hee,t)},Wee=G(`li`,{name:`MuiListSubheader`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${K(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(Wd(({theme:e})=>({boxSizing:`border-box`,lineHeight:`48px`,listStyle:`none`,color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:`primary`},style:{color:(e.vars||e).palette.primary.main}},{props:{color:`inherit`},style:{color:`inherit`}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:72}},{props:({ownerState:e})=>!e.disableSticky,style:{position:`sticky`,top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),b_=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiListSubheader`}),{className:r,color:i=`default`,component:a=`li`,disableGutters:o=!1,disableSticky:s=!1,inset:c=!1,...l}=n,u={...n,color:i,component:a,disableGutters:o,disableSticky:s,inset:c},d=Uee(u);return(0,H.jsx)(Wee,{as:a,className:U(d.root,r),ref:t,ownerState:u,...l})}),Gee=sp((0,H.jsx)(`path`,{d:`M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z`}),`Cancel`);function Kee(e){return Zs(`MuiChip`,e)}var x_=Qs(`MuiChip`,[`root`,`sizeSmall`,`sizeMedium`,`colorDefault`,`colorError`,`colorInfo`,`colorPrimary`,`colorSecondary`,`colorSuccess`,`colorWarning`,`disabled`,`clickable`,`deletable`,`outlined`,`filled`,`avatar`,`icon`,`label`,`deleteIcon`,`focusVisible`]),qee=e=>{let{classes:t,disabled:n,size:r,color:i,onDelete:a,clickable:o,variant:s}=e;return El({root:[`root`,s,n&&`disabled`,`size${K(r)}`,`color${K(i)}`,o&&`clickable`,a&&`deletable`],label:[`label`],avatar:[`avatar`],icon:[`icon`],deleteIcon:[`deleteIcon`]},Kee,t)},Jee=G(`div`,{name:`MuiChip`,slot:`Root`,shouldForwardProp:e=>Hd(e)&&e!==`focusableWhenDisabled`&&e!==`skipFocusWhenDisabled`,overridesResolver:(e,t)=>{let{ownerState:n}=e,{color:r,clickable:i,onDelete:a,size:o,variant:s}=n;return[{[`& .${x_.avatar}`]:t.avatar},{[`& .${x_.icon}`]:t.icon},{[`& .${x_.deleteIcon}`]:t.deleteIcon},t.root,t[`size${K(o)}`],t[`color${K(r)}`],i&&t.clickable,a&&t.deletable,t[s]]}})(Wd(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:`100%`,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:`inline-flex`,alignItems:`center`,justifyContent:`center`,height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:`nowrap`,...pf(e,[`background-color`,`box-shadow`]),cursor:`unset`,outline:0,textDecoration:`none`,border:0,padding:0,verticalAlign:`middle`,boxSizing:`border-box`,[`&.${x_.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:`none`},[`& .${x_.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${x_.icon}`]:{marginLeft:5,marginRight:-6},[`& .${x_.deleteIcon}`]:{WebkitTapHighlightColor:`transparent`,color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:`pointer`,margin:`0 5px 0 -6px`,"&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{color:`primary`},style:{[`& .${x_.avatar}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark}}},{props:{color:`secondary`},style:{[`& .${x_.avatar}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark}}},{props:{size:`small`},style:{height:24,[`& .${x_.avatar}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${x_.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${x_.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Fm([`contrastText`])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${x_.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}})),{props:e=>e.iconColor===e.color,style:{[`& .${x_.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&e.color!=="default",style:{[`& .${x_.icon}`]:{color:`inherit`}}},{props:{onDelete:!0},style:!e.focusVisible&&{[`&.${x_.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(Fm([`dark`])).map(([t])=>({props:{color:t,onDelete:!0},style:!e.focusVisible&&{[`&.${x_.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}})),{props:{clickable:!0},style:{userSelect:`none`,WebkitTapHighlightColor:`transparent`,cursor:`pointer`,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},...!e.focusVisible&&{[`&.${x_.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(Fm([`dark`])).map(([t])=>({props:{color:t,clickable:!0},style:{"&:hover":{backgroundColor:(e.vars||e).palette[t].dark},...!e.focusVisible&&{[`&.${x_.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}}})),{props:{variant:`outlined`},style:{backgroundColor:`transparent`,border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode===`light`?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${x_.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},...!e.focusVisible&&{[`&.${x_.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus}},[`& .${x_.avatar}`]:{marginLeft:4},[`& .${x_.icon}`]:{marginLeft:4},[`& .${x_.deleteIcon}`]:{marginRight:5}}},{props:{size:`small`,variant:`outlined`},style:{[`& .${x_.avatar}`]:{marginLeft:2},[`& .${x_.icon}`]:{marginLeft:2},[`& .${x_.deleteIcon}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{variant:`outlined`,color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.alpha((e.vars||e).palette[t].main,.7)}`,[`&.${x_.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)},...!e.focusVisible&&{[`&.${x_.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.focusOpacity)}},[`& .${x_.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}}))]}})),Yee=G(`span`,{name:`MuiChip`,slot:`Label`})({overflow:`hidden`,textOverflow:`ellipsis`,paddingLeft:12,paddingRight:12,whiteSpace:`nowrap`,variants:[{props:{variant:`outlined`},style:{paddingLeft:11,paddingRight:11}},{props:{size:`small`},style:{paddingLeft:8,paddingRight:8}},{props:{size:`small`,variant:`outlined`},style:{paddingLeft:7,paddingRight:7}}]});function S_(e){return e.key===`Backspace`||e.key===`Delete`}var Xee=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiChip`}),{avatar:r,className:i,clickable:a,color:o=`default`,component:s,deleteIcon:c,disabled:l=!1,icon:u,label:d,onClick:f,onDelete:p,onKeyDown:m,onKeyUp:h,size:g=`medium`,variant:_=`filled`,tabIndex:v,skipFocusWhenDisabled:y=!1,slots:b={},slotProps:x={},...S}=n,{nativeButton:C,...w}=S,T=Kd(L.useRef(null),t),E=e=>{e.stopPropagation(),p(e)},D=e=>{e.currentTarget===e.target&&S_(e)&&e.preventDefault(),m&&m(e)},O=e=>{e.currentTarget===e.target&&p&&S_(e)&&p(e),h&&h(e)},ee=a!==!1&&f?!0:a,te=ee||p?Em:s||`div`,k={...n,component:te,disabled:l,size:g,color:o,iconColor:L.isValidElement(u)&&u.props.color||o,onDelete:!!p,clickable:ee,variant:_},A=qee(k),j=te===Em?{component:s||`div`,internalNativeButton:!1,focusVisibleClassName:A.focusVisible,...p&&{disableRipple:!0},...C!==void 0&&{nativeButton:C}}:{},M=null;p&&(M=c&&L.isValidElement(c)?L.cloneElement(c,{className:U(c.props.className,A.deleteIcon),onClick:E}):(0,H.jsx)(Gee,{className:A.deleteIcon,onClick:E}));let ne=null;r&&L.isValidElement(r)&&(ne=L.cloneElement(r,{className:U(A.avatar,r.props.className)}));let re=null;u&&L.isValidElement(u)&&(re=L.cloneElement(u,{className:U(A.icon,u.props.className)}));let ie={slots:b,slotProps:x},[ae,N]=Up(`root`,{elementType:Jee,externalForwardedProps:{...ie,...w},ownerState:k,shouldForwardComponentProp:!0,ref:T,className:U(A.root,i),additionalProps:{disabled:ee&&l?!0:void 0,tabIndex:y&&l?-1:v,...j},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),f?.(t)},onKeyDown:t=>{e.onKeyDown?.(t),D(t)},onKeyUp:t=>{e.onKeyUp?.(t),O(t)}})}),[oe,se]=Up(`label`,{elementType:Yee,externalForwardedProps:ie,ownerState:k,className:A.label});return(0,H.jsxs)(ae,{as:te,...N,children:[ne||re,(0,H.jsx)(oe,{...se,children:d}),M]})}),C_=sp((0,H.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`),Zee,Qee,w_=e=>{let{classes:t,disablePortal:n,expanded:r,focused:i,fullWidth:a,hasClearIcon:o,hasPopupIcon:s,inputFocused:c,popupOpen:l,size:u}=e;return El({root:[`root`,r&&`expanded`,i&&`focused`,a&&`fullWidth`,o&&`hasClearIcon`,s&&`hasPopupIcon`],inputRoot:[`inputRoot`],input:[`input`,c&&`inputFocused`],tag:[`tag`,`tagSize${K(u)}`],endAdornment:[`endAdornment`],clearIndicator:[`clearIndicator`],popupIndicator:[`popupIndicator`,l&&`popupIndicatorOpen`],popper:[`popper`,n&&`popperDisablePortal`],paper:[`paper`],listbox:[`listbox`],loading:[`loading`],noOptions:[`noOptions`],status:[`status`],option:[`option`],groupLabel:[`groupLabel`],groupUl:[`groupUl`]},bd,t)},T_=G(`div`,{name:`MuiAutocomplete`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e,{fullWidth:r,hasClearIcon:i,hasPopupIcon:a,inputFocused:o,size:s}=n;return[{[`& .${xd.tag}`]:t.tag},{[`& .${xd.tag}`]:t[`tagSize${K(s)}`]},{[`& .${xd.inputRoot}`]:t.inputRoot},{[`& .${xd.input}`]:t.input},{[`& .${xd.input}`]:o&&t.inputFocused},t.root,r&&t.fullWidth,a&&t.hasPopupIcon,i&&t.hasClearIcon]}})({[`&.${xd.focused} .${xd.clearIndicator}`]:{visibility:`visible`},"@media (pointer: fine)":{[`&:hover .${xd.clearIndicator}`]:{visibility:`visible`}},[`& .${xd.tag}`]:{margin:3,maxWidth:`calc(100% - 6px)`},[`& .${xd.inputRoot}`]:{[`.${xd.hasPopupIcon}&, .${xd.hasClearIcon}&`]:{paddingRight:30},[`.${xd.hasPopupIcon}.${xd.hasClearIcon}&`]:{paddingRight:56},[`& .${xd.input}`]:{width:0,minWidth:30}},[`& .${Nf.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:`4px 4px 4px 0px`}},[`& .${Nf.root}.${tf.sizeSmall}`]:{[`& .${Nf.input}`]:{padding:`2px 4px 3px 0`}},[`& .${Vf.root}`]:{padding:9,[`.${xd.hasPopupIcon}&, .${xd.hasClearIcon}&`]:{paddingRight:39},[`.${xd.hasPopupIcon}.${xd.hasClearIcon}&`]:{paddingRight:65},[`& .${xd.input}`]:{padding:`7.5px 4px 7.5px 5px`},[`& .${xd.endAdornment}`]:{right:9}},[`& .${Vf.root}.${tf.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${xd.input}`]:{padding:`2.5px 4px 2.5px 8px`}},[`& .${Tf.root}`]:{paddingTop:19,paddingLeft:8,[`.${xd.hasPopupIcon}&, .${xd.hasClearIcon}&`]:{paddingRight:39},[`.${xd.hasPopupIcon}.${xd.hasClearIcon}&`]:{paddingRight:65},[`& .${Tf.input}`]:{padding:`7px 4px`},[`& .${xd.endAdornment}`]:{right:9}},[`& .${Tf.root}.${tf.sizeSmall}`]:{paddingBottom:1,[`& .${Tf.input}`]:{padding:`2.5px 4px`}},[`& .${tf.hiddenLabel}`]:{paddingTop:8},[`& .${Tf.root}.${tf.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${xd.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Tf.root}.${tf.hiddenLabel}.${tf.sizeSmall}`]:{[`& .${xd.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${xd.input}`]:{flexGrow:1,textOverflow:`ellipsis`,opacity:0},variants:[{props:{fullWidth:!0},style:{width:`100%`}},{props:{size:`small`},style:{[`& .${xd.tag}`]:{margin:2,maxWidth:`calc(100% - 4px)`}}},{props:{inputFocused:!0},style:{[`& .${xd.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${xd.inputRoot}`]:{flexWrap:`wrap`}}}]}),E_=G(`div`,{name:`MuiAutocomplete`,slot:`EndAdornment`})({position:`absolute`,right:0,top:`50%`,transform:`translate(0, -50%)`}),D_=G(th,{name:`MuiAutocomplete`,slot:`ClearIndicator`})({marginRight:-2,padding:4,visibility:`hidden`}),O_=G(th,{name:`MuiAutocomplete`,slot:`PopupIndicator`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:`rotate(180deg)`}}]}),k_=G(y_,{name:`MuiAutocomplete`,slot:`Popper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${xd.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(Wd(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:`absolute`}}]}))),A_=G(Qp,{name:`MuiAutocomplete`,slot:`Paper`})(Wd(({theme:e})=>({...e.typography.body1,overflow:`auto`}))),j_=G(`div`,{name:`MuiAutocomplete`,slot:`Loading`})(Wd(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:`14px 16px`}))),M_=G(`div`,{name:`MuiAutocomplete`,slot:`Status`})({}),N_=G(`div`,{name:`MuiAutocomplete`,slot:`NoOptions`})(Wd(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:`14px 16px`}))),P_=G(`ul`,{name:`MuiAutocomplete`,slot:`Listbox`})(Wd(({theme:e})=>({listStyle:`none`,margin:0,padding:`8px 0`,maxHeight:`40vh`,overflow:`auto`,isolation:`isolate`,position:`relative`,[`& .${xd.option}`]:{minHeight:48,display:`flex`,overflow:`hidden`,justifyContent:`flex-start`,alignItems:`center`,cursor:`pointer`,paddingTop:6,boxSizing:`border-box`,outline:`0`,WebkitTapHighlightColor:`transparent`,paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up(`sm`)]:{minHeight:`auto`},[`&.${xd.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:`none`},[`&.${xd.focusVisible}`]:e.focusVisible?{...Su(1),...e.focusVisible}:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${xd.focused}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},...!e.focusVisible&&{[`&.${xd.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}}))),F_=G(b_,{name:`MuiAutocomplete`,slot:`GroupLabel`})(Wd(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),I_=G(`ul`,{name:`MuiAutocomplete`,slot:`GroupUl`})({padding:0,[`& .${xd.option}`]:{paddingLeft:24}}),L_=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiAutocomplete`}),{autoComplete:r=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:o=!1,className:s,clearIcon:c=Zee||=(0,H.jsx)(oh,{fontSize:`small`}),clearOnBlur:l=!n.freeSolo,clearOnEscape:u=!1,clearText:d=`Clear`,closeText:f=`Close`,defaultValue:p=n.multiple?[]:null,disableClearable:m=!1,disableCloseOnSelect:h=!1,disabled:g=!1,disabledItemsFocusable:_=!1,disableListWrap:v=!1,disablePortal:y=!1,filterOptions:b,filterSelectedOptions:x=!1,forcePopupIcon:S=`auto`,freeSolo:C=!1,fullWidth:w=!1,getLimitTagsText:T=e=>`+${e}`,getOptionDisabled:E,getOptionKey:D,getOptionLabel:O,isOptionEqualToValue:ee,groupBy:te,handleHomeEndKeys:k=!n.freeSolo,id:A,includeInputInList:j=!1,inputValue:M,limitTags:ne=-1,loading:re=!1,loadingText:ie=`Loading…`,multiple:ae=!1,noOptionsText:N=`No options`,onChange:oe,onClose:se,onHighlightChange:ce,onInputChange:P,onOpen:le,open:ue,openOnFocus:F=!1,openText:I=`Open`,options:de,popupIcon:fe=Qee||=(0,H.jsx)(C_,{}),readOnly:pe=!1,renderGroup:me,renderInput:he,renderOption:ge,renderValue:_e,resetHighlightOnMouseLeave:ve=!1,selectOnFocus:ye=!n.freeSolo,size:be=`medium`,slots:xe={},slotProps:R={},value:z,...B}=n,{getRootProps:Se,getInputProps:Ce,getInputLabelProps:we,getPopupIndicatorProps:Te,getClearProps:Ee,getItemProps:De,getListboxProps:Oe,getOptionProps:ke,value:Ae,dirty:V,expanded:je,id:Me,popupOpen:Ne,focused:Pe,focusedItem:Fe,anchorEl:Ie,setAnchorEl:Le,inputValue:Re,groupedOptions:ze}=Cee({...n,componentName:`Autocomplete`}),Be=_ee();L.useEffect(()=>{if(!Ne||!Ie||typeof ResizeObserver>`u`)return;let e=Ie.clientWidth,t=new ResizeObserver(()=>{let t=Ie.clientWidth;e!==t&&(e=t,Be())});return t.observe(Ie),()=>{t.disconnect()}},[Ne,Ie,Be]);let Ve=L.useRef([]),He=L.useRef(!1),Ue=Ne?ze:Ve.current;mc(()=>{Ne&&!He.current&&(Ve.current=[]),He.current=Ne,Ne&&ze.length>0&&(Ve.current=ze)},[Ne,ze]);let We=!m&&!g&&V&&!pe,Ge=(!C||S===!0)&&S!==!1,{onMouseDown:Ke}=Ce(),qe=O||(e=>e.label??e),Je={...n,disablePortal:y,expanded:je,focused:Pe,fullWidth:w,getOptionLabel:qe,hasClearIcon:We,hasPopupIcon:Ge,inputFocused:Fe===-1,popupOpen:Ne,size:be},Ye=w_(Je),Xe={slots:xe,slotProps:R},[Ze,Qe]=Up(`root`,{ref:t,className:[Ye.root,s],elementType:T_,externalForwardedProps:{...Xe,...B},getSlotProps:Se,ownerState:Je}),[$e,et]=Up(`listbox`,{elementType:P_,externalForwardedProps:Xe,ownerState:Je,className:Ye.listbox,getSlotProps:Oe}),[tt,nt]=Up(`paper`,{elementType:Qp,externalForwardedProps:Xe,ownerState:Je,className:Ye.paper}),[rt,it]=Up(`status`,{elementType:M_,externalForwardedProps:Xe,ownerState:Je,className:Ye.status,additionalProps:{role:`status`,"aria-live":`polite`,"aria-atomic":`true`}}),[at,ot]=Up(`popper`,{elementType:y_,externalForwardedProps:Xe,ownerState:Je,className:Ye.popper,additionalProps:{disablePortal:y,style:{width:Ie?Ie.clientWidth:null,pointerEvents:Ne?void 0:`none`},role:`presentation`,anchorEl:Ie,open:Ne}}),st=Ue.length>0||re||!C||ot.keepMounted===!0,[ct,lt]=Up(`clearIndicator`,{elementType:D_,externalForwardedProps:Xe,ownerState:Je,className:Ye.clearIndicator,shouldForwardComponentProp:!0,additionalProps:{...Ee(),"aria-label":d,title:d}}),[ut,dt]=Up(`popupIndicator`,{elementType:O_,externalForwardedProps:Xe,ownerState:Je,className:Ye.popupIndicator,shouldForwardComponentProp:!0,additionalProps:{...Te(),disabled:g,"aria-label":Ne?f:I,title:Ne?f:I}}),ft,pt=e=>({className:Ye.tag,disabled:g,...De(e)});if(ae?Ae.length>0&&(ft=_e?_e(Ae,pt,Je):Ae.map((e,t)=>{let{key:n,...r}=pt({index:t});return(0,H.jsx)(Xee,{label:qe(e),size:be,...r,...Xe.slotProps.chip},n)})):_e&&Ae!=null&&(ft=_e(Ae,pt,Je)),ne>-1&&Array.isArray(ft)){let e=ft.length-ne;!Pe&&e>0&&(ft=ft.splice(0,ne),ft.push((0,H.jsx)(`span`,{className:Ye.tag,children:T(e)},ft.length)))}let mt=me||(e=>(0,H.jsxs)(`li`,{children:[(0,H.jsx)(F_,{className:Ye.groupLabel,ownerState:Je,component:`div`,children:e.group}),(0,H.jsx)(I_,{className:Ye.groupUl,ownerState:Je,children:e.children})]},e.key)),ht=ge||((e,t)=>{let{key:n,...r}=e;return(0,H.jsx)(`li`,{...r,children:qe(t)},n)}),gt=(e,t)=>{let n=ke({option:e,index:t});return ht({...n,className:Ye.option},e,{selected:n[`aria-selected`],index:t,inputValue:Re},Je)};return(0,H.jsxs)(L.Fragment,{children:[(0,H.jsx)(Ze,{...Qe,children:he({id:Me,disabled:g,fullWidth:n.fullWidth??!0,size:be===`small`?`small`:void 0,slotProps:{inputLabel:we(),input:{ref:Le,className:Ye.inputRoot,startAdornment:ft,onMouseDown:e=>{e.target===e.currentTarget&&Ke(e)},...(We||Ge)&&{endAdornment:(0,H.jsxs)(E_,{className:Ye.endAdornment,ownerState:Je,children:[We?(0,H.jsx)(ct,{...lt,children:c}):null,Ge?(0,H.jsx)(ut,{...dt,children:fe}):null]})}},htmlInput:{className:Ye.input,disabled:g,readOnly:pe,...Ce()}}})}),Ie&&st?(0,H.jsx)(k_,{as:at,...ot,children:(0,H.jsxs)(A_,{as:tt,...nt,children:[(0,H.jsxs)(rt,{...it,children:[re&&Ue.length===0?(0,H.jsx)(j_,{className:Ye.loading,ownerState:Je,children:ie}):null,Ue.length===0&&!C&&!re?(0,H.jsx)(N_,{className:Ye.noOptions,ownerState:Je,onMouseDown:e=>{e.preventDefault()},children:N}):null]}),Ue.length>0?(0,H.jsx)($e,{...et,children:Ue.map((e,t)=>te?mt({key:e.key,group:e.group,children:e.options.map((t,n)=>gt(t,e.index+n))}):gt(e,t))}):null]})}):null]})}),R_=sp((0,H.jsx)(`path`,{d:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`}),`Person`);function z_(e){return Zs(`MuiAvatar`,e)}Qs(`MuiAvatar`,[`root`,`colorDefault`,`circular`,`rounded`,`square`,`img`,`fallback`]);var B_=e=>{let{classes:t,variant:n,colorDefault:r}=e;return El({root:[`root`,n,r&&`colorDefault`],img:[`img`],fallback:[`fallback`]},z_,t)},V_=G(`div`,{name:`MuiAvatar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(Wd(({theme:e})=>({position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:`50%`,overflow:`hidden`,userSelect:`none`,variants:[{props:{variant:`rounded`},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:`square`},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,"@media (forced-colors: active)":{boxSizing:`border-box`,border:`1px solid ButtonBorder`},...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles(`dark`,{backgroundColor:e.palette.grey[600]})}}}]}))),H_=G(`img`,{name:`MuiAvatar`,slot:`Img`})({width:`100%`,height:`100%`,textAlign:`center`,objectFit:`cover`,color:`transparent`,textIndent:1e4}),U_=G(R_,{name:`MuiAvatar`,slot:`Fallback`})({width:`75%`,height:`75%`});function W_(e,t,n,r){let[i,a]=L.useState(!1);return L.useEffect(()=>{if(!e&&!t)return;a(!1);let i=!0,o=new Image;return o.onload=()=>{i&&a(`loaded`)},o.onerror=()=>{i&&a(`error`)},o.crossOrigin=n,o.referrerPolicy=r,o.src=e,t&&(o.srcset=t),()=>{i=!1}},[n,r,e,t]),i}var G_=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiAvatar`}),{alt:r,children:i,className:a,component:o=`div`,slots:s={},slotProps:c={},sizes:l,src:u,srcSet:d,variant:f=`circular`,...p}=n,m=null,h={...n,component:o,variant:f},{crossOrigin:g,referrerPolicy:_}=(typeof c.img==`function`?c.img(h):c.img)??{},v=W_(u,d,g,_),y=u||d,b=y&&v!==`error`;h.colorDefault=!b,delete h.ownerState;let x=B_(h),S={slots:s,slotProps:c},[C,w]=Up(`root`,{ref:t,className:U(x.root,a),elementType:V_,externalForwardedProps:{...S,component:o,...p},ownerState:h}),[T,E]=Up(`img`,{className:x.img,elementType:H_,externalForwardedProps:S,additionalProps:{alt:r,src:u,srcSet:d,sizes:l},ownerState:h}),[D,O]=Up(`fallback`,{className:x.fallback,elementType:U_,externalForwardedProps:S,shouldForwardComponentProp:!0,ownerState:h});return m=b?(0,H.jsx)(T,{...E}):i||i===0?i:y&&r?r[0]:(0,H.jsx)(D,{...O}),(0,H.jsx)(C,{...w,children:m})}),K_={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},q_={opacity:0,visibility:`hidden`},J_=L.forwardRef(function(e,t){let n=zd(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:o,disablePrefersReducedMotion:s=!1,easing:c,in:l,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,style:g,timeout:_=r,...v}=e,y=Lp(n.motion.reducedMotion,s),b=L.useRef(null),x=Kd(b,h_(o),t),S=lf(b,f),C=lf(b,(e,t)=>{y.shouldReduceMotion||af(e);let r=df({style:g,timeout:_,easing:c},{mode:`enter`}),i=y.getTransitionTiming({duration:r.duration,delay:r.delay});e.style.transition=n.transitions.create(`opacity`,{duration:i.duration,easing:r.easing,delay:i.delay}),u&&u(e,t)}),w=lf(b,d),T=lf(b,h),E=lf(b,e=>{let t=df({style:g,timeout:_,easing:c},{mode:`exit`}),r=y.getTransitionTiming({duration:t.duration,delay:t.delay});e.style.transition=n.transitions.create(`opacity`,{duration:r.duration,easing:t.easing,delay:r.delay}),p&&p(e)}),D=lf(b,e=>{e.style.transition=``,m&&m(e)});return(0,H.jsx)(Tp,{appear:a,in:l,nodeRef:b,onEnter:C,onEntered:w,onEntering:S,onExit:E,onExited:D,onExiting:T,addEndListener:i?e=>{i(b.current,e)}:void 0,reduceMotion:y.shouldReduceMotion,timeout:_,...v,children:(e,{ownerState:t,...n})=>{let r=uf(e,l,K_,q_,g,o.props.style);return L.cloneElement(o,{style:r,ref:x,...n})}})});function Y_(e){return Zs(`MuiBackdrop`,e)}Qs(`MuiBackdrop`,[`root`,`invisible`]);var X_=e=>{let{classes:t,invisible:n}=e;return El({root:[`root`,n&&`invisible`]},Y_,t)},Z_=G(`div`,{name:`MuiBackdrop`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:`fixed`,display:`flex`,alignItems:`center`,justifyContent:`center`,right:0,bottom:0,top:0,left:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,WebkitTapHighlightColor:`transparent`,variants:[{props:{invisible:!0},style:{backgroundColor:`transparent`}}]}),Q_=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,slotProps:c={},slots:l={},transitionDuration:u,...d}=n,f={...n,component:a,invisible:o},p=X_(f),m={component:a,slots:l,slotProps:c},[h,g]=Up(`root`,{elementType:Z_,externalForwardedProps:m,className:U(p.root,i),ownerState:f}),[_,v]=Up(`transition`,{elementType:J_,externalForwardedProps:m,ownerState:f});return(0,H.jsx)(_,{in:s,timeout:u,...d,...v,children:(0,H.jsx)(h,{...g,ref:t,children:r})})});function $_(e){let{badgeContent:t,invisible:n=!1,max:r=99,showZero:i=!1}=e,a=Th({badgeContent:t,max:r}),o=n;n===!1&&t===0&&!i&&(o=!0);let{badgeContent:s,max:c=r}=o?a:e,l=s&&Number(s)>c?`${c}+`:s;return{badgeContent:s,invisible:o,max:c,displayValue:l}}function ev(e){return Zs(`MuiBadge`,e)}var tv=Qs(`MuiBadge`,[`root`,`badge`,`dot`,`standard`,`anchorOriginTopRight`,`anchorOriginBottomRight`,`anchorOriginTopLeft`,`anchorOriginBottomLeft`,`invisible`,`colorError`,`colorInfo`,`colorPrimary`,`colorSecondary`,`colorSuccess`,`colorWarning`,`overlapRectangular`,`overlapCircular`,`anchorOriginTopLeftCircular`,`anchorOriginTopLeftRectangular`,`anchorOriginTopRightCircular`,`anchorOriginTopRightRectangular`,`anchorOriginBottomLeftCircular`,`anchorOriginBottomLeftRectangular`,`anchorOriginBottomRightCircular`,`anchorOriginBottomRightRectangular`]),nv=10,rv=4,iv=e=>{let{color:t,anchorOrigin:n,invisible:r,overlap:i,variant:a,classes:o={}}=e;return El({root:[`root`],badge:[`badge`,a,r&&`invisible`,`anchorOrigin${K(n.vertical)}${K(n.horizontal)}`,`anchorOrigin${K(n.vertical)}${K(n.horizontal)}${K(i)}`,`overlap${K(i)}`,t!=="default"&&`color${K(t)}`]},ev,o)},av=G(`span`,{name:`MuiBadge`,slot:`Root`})({position:`relative`,display:`inline-flex`,verticalAlign:`middle`,flexShrink:0}),ov=G(`span`,{name:`MuiBadge`,slot:`Badge`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${K(n.anchorOrigin.vertical)}${K(n.anchorOrigin.horizontal)}${K(n.overlap)}`],n.color!=="default"&&t[`color${K(n.color)}`],n.invisible&&t.invisible]}})(Wd(({theme:e})=>({display:`flex`,flexDirection:`row`,flexWrap:`wrap`,justifyContent:`center`,alignContent:`center`,alignItems:`center`,position:`absolute`,boxSizing:`border-box`,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:`0 6px`,height:20,borderRadius:nv,zIndex:1,"@media (forced-colors: active)":{border:`1px solid ButtonBorder`},...pf(e,`transform`,{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(Fm([`contrastText`])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:`dot`},style:{borderRadius:rv,height:8,minWidth:8,padding:0}},{props:{invisible:!0},style:{...pf(e,`transform`,{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}},{style:{inset:`var(--Badge-inset)`,transform:`scale(1) translate(var(--Badge-translate))`,transformOrigin:`var(--Badge-origin)`,[`&.${tv.invisible}`]:{transform:`scale(0) translate(var(--Badge-translate))`}}}]})));function sv(e){return{vertical:e?.vertical??`top`,horizontal:e?.horizontal??`right`}}var cv=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiBadge`}),{anchorOrigin:r,className:i,classes:a,component:o,children:s,overlap:c=`rectangular`,color:l=`default`,invisible:u=!1,max:d=99,badgeContent:f,slots:p,slotProps:m,showZero:h=!1,variant:g=`standard`,..._}=n,{badgeContent:v,invisible:y,max:b,displayValue:x}=$_({max:d,invisible:u,badgeContent:f,showZero:h}),S=Th({anchorOrigin:sv(r),color:l,overlap:c,variant:g,badgeContent:f}),C=y||v==null&&g!==`dot`,{color:w=l,overlap:T=c,anchorOrigin:E,variant:D=g}=C?S:n,O=sv(E),ee=D===`dot`?void 0:x,te={...n,badgeContent:v,invisible:C,max:b,displayValue:ee,showZero:h,anchorOrigin:O,color:w,overlap:T,variant:D},k=iv(te),A={slots:p,slotProps:m},[j,M]=Up(`root`,{elementType:av,externalForwardedProps:{...A,..._},ownerState:te,className:U(k.root,i),ref:t,additionalProps:{as:o}}),{vertical:ne,horizontal:re}=O,ie=T===`circular`?`14%`:`0`,ae=ne===`top`?ie:`auto`,N=ne===`bottom`?ie:`auto`,oe=re===`right`?ie:`auto`,se=re===`left`?ie:`auto`,[ce,P]=Up(`badge`,{elementType:ov,externalForwardedProps:A,ownerState:te,className:k.badge,additionalProps:{"aria-hidden":!0,style:{"--Badge-translate":`${re===`right`?`50%`:`-50%`}, ${ne===`top`?`-50%`:`50%`}`,"--Badge-inset":`${ae} ${oe} ${N} ${se}`,"--Badge-origin":`${re===`right`?`100%`:`0%`} ${ne===`top`?`0%`:`100%`}`}}});return(0,H.jsxs)(j,{...M,children:[s,(0,H.jsx)(ce,{...P,children:ee})]})}),lv=Qs(`MuiBox`,[`root`]),J=Ys({themeId:zr,defaultTheme:_d(),defaultClassName:lv.root,generateClassName:qs.generate});function uv(e){return Zs(`MuiButton`,e)}var dv=Qs(`MuiButton`,`root.text.outlined.contained.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),fv=L.createContext({}),pv=L.createContext(void 0),mv=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=El({root:[`root`,o&&`loading`,a,`size${K(i)}`,`color${K(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${K(s)}`],startIcon:[`icon`,`startIcon`],endIcon:[`icon`,`endIcon`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},uv,c);return{...c,...l}},hv=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],gv=G(Em,{shouldForwardProp:e=>Hd(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${K(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Wd(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,...pf(e,[`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${dv.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${dv.focusVisible}`]:{...e.focusVisible,boxShadow:e.focusVisible?.boxShadow?`${(e.vars||e).shadows[6]}, ${e.focusVisible.boxShadow}`:(e.vars||e).shadows[6]},[`&.${dv.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${dv.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${dv.focusVisible}`]:{boxShadow:e.focusVisible?.boxShadow??`none`},"&:active":{boxShadow:`none`},[`&.${dv.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{...pf(e,[`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${dv.loading}`]:{color:`transparent`}}}]}})),_v=G(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart]}})(({theme:e})=>({display:`inherit`,alignItems:`center`,marginRight:8,marginLeft:-4,"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`},variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{...pf(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...hv]})),vv=G(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{...pf(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...hv]})),yv=G(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),bv=G(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),Y=L.forwardRef(function(e,t){let n=L.useContext(fv),r=L.useContext(pv),i=Gd({props:dc(n,e),name:`MuiButton`}),{children:a,color:o=`primary`,component:s=`button`,className:c,disabled:l=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:g=null,loadingIndicator:_,loadingPosition:v=`center`,size:y=`medium`,startIcon:b,type:x,variant:S=`text`,...C}=i,w=fp(h),T=_??(0,H.jsx)(Ym,{"aria-labelledby":w,color:`inherit`,size:16}),E={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:g,loadingIndicator:T,loadingPosition:v,size:y,type:x,variant:S},D=mv(E),O=(b||g&&v===`start`)&&(0,H.jsx)(_v,{className:D.startIcon,ownerState:E,children:b||(0,H.jsx)(bv,{className:D.loadingIconPlaceholder,ownerState:E})}),ee=(f||g&&v===`end`)&&(0,H.jsx)(vv,{className:D.endIcon,ownerState:E,children:f||(0,H.jsx)(bv,{className:D.loadingIconPlaceholder,ownerState:E})}),te=r||``,k=typeof g==`boolean`?(0,H.jsx)(`span`,{className:D.loadingWrapper,style:{display:`contents`},children:g&&(0,H.jsx)(yv,{className:D.loadingIndicator,ownerState:E,children:T})}):null,{root:A,...j}=D;return(0,H.jsxs)(gv,{ownerState:E,className:U(n.className,D.root,c,te),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:U(D.focusVisible,p),ref:t,internalNativeButton:!0,type:x,id:g?w:h,...C,classes:j,children:[O,v!==`end`&&k,a,v===`end`&&k,ee]})});function xv(e){return Zs(`MuiCard`,e)}Qs(`MuiCard`,[`root`]);var Sv=e=>{let{classes:t}=e;return El({root:[`root`]},xv,t)},Cv=G(Qp,{name:`MuiCard`,slot:`Root`})({overflow:`hidden`}),wv=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiCard`}),{className:r,raised:i=!1,...a}=n,o={...n,raised:i},s=Sv(o);return(0,H.jsx)(Cv,{className:U(s.root,r),elevation:i?8:void 0,ref:t,ownerState:o,...a})});function Tv(e){return Zs(`MuiCardContent`,e)}Qs(`MuiCardContent`,[`root`]);var Ev=e=>{let{classes:t}=e;return El({root:[`root`]},Tv,t)},Dv=G(`div`,{name:`MuiCardContent`,slot:`Root`})({padding:16,"&:last-child":{paddingBottom:24}}),Ov=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiCardContent`}),{className:r,component:i=`div`,...a}=n,o={...n,component:i},s=Ev(o);return(0,H.jsx)(Dv,{as:i,className:U(s.root,r),ownerState:o,ref:t,...a})});function kv(e){return Zs(`PrivateSwitchBase`,e)}Qs(`PrivateSwitchBase`,[`root`,`checked`,`disabled`,`input`,`edgeStart`,`edgeEnd`]);var Av=e=>{let{classes:t,checked:n,disabled:r,edge:i}=e;return El({root:[`root`,n&&`checked`,r&&`disabled`,i&&`edge${K(i)}`],input:[`input`]},kv,t)},jv=G(Em,{name:`MuiSwitchBase`})({padding:9,borderRadius:`50%`,variants:[{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e===`start`&&t.size!==`small`,style:{marginLeft:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e===`end`&&t.size!==`small`,style:{marginRight:-12}}]}),Mv=G(`input`,{name:`MuiSwitchBase`,shouldForwardProp:Hd})({cursor:`inherit`,position:`absolute`,opacity:0,width:`100%`,height:`100%`,top:0,left:0,margin:0,padding:0,zIndex:1}),Nv=L.forwardRef(function(e,t){let{autoFocus:n,checked:r,checkedIcon:i,defaultChecked:a,disabled:o,disableFocusRipple:s=!1,edge:c=!1,icon:l,id:u,name:d,onBlur:f,onChange:p,onFocus:m,readOnly:h,required:g=!1,tabIndex:_,type:v,value:y,slots:b={},slotProps:x={},...S}=e,{nativeButton:C,...w}=S,[T,E]=mp({controlled:r,default:!!a,name:`SwitchBase`,state:`checked`}),D=Id(),O=e=>{m&&m(e),D&&D.onFocus&&D.onFocus(e)},ee=e=>{f&&f(e),D&&D.onBlur&&D.onBlur(e)},te=e=>{if(e.nativeEvent.defaultPrevented||h)return;let t=e.target.checked;E(t),p&&p(e,t)},k=o;D&&k===void 0&&(k=D.disabled);let A=v===`checkbox`||v===`radio`,j={...e,checked:T,disabled:k,disableFocusRipple:s,edge:c},M=Av(j),ne={slots:b,slotProps:x},[re,ie]=Up(`root`,{ref:t,elementType:jv,className:M.root,shouldForwardComponentProp:!0,externalForwardedProps:{...ne,component:`span`,...w},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),O(t)},onBlur:t=>{e.onBlur?.(t),ee(t)}}),ownerState:j,additionalProps:{centerRipple:!0,focusRipple:!s,role:void 0,tabIndex:null,internalDisabledThemeFocusVisible:!0}}),[ae,N]=Up(`input`,{elementType:Mv,className:M.input,externalForwardedProps:ne,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),te(t)}}),ownerState:j,additionalProps:{autoFocus:n,checked:r,defaultChecked:a,disabled:k,id:A?u:void 0,name:d,readOnly:h,required:g,tabIndex:_,type:v,...v===`checkbox`&&y===void 0?{}:{value:y}}});return(0,H.jsxs)(re,{...ie,children:[(0,H.jsx)(ae,{...N}),T?i:l]})}),Pv=sp((0,H.jsx)(`path`,{d:`M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z`}),`CheckBoxOutlineBlank`),Fv=sp((0,H.jsx)(`path`,{d:`M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z`}),`CheckBox`),Iv=sp((0,H.jsx)(`path`,{d:`M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z`}),`IndeterminateCheckBox`),Lv=e=>{let{classes:t,indeterminate:n,color:r,size:i}=e,a=El({root:[`root`,n&&`indeterminate`,`color${K(r)}`,`size${K(i)}`]},Sd,t);return{...t,...a}},Rv=G(Nv,{shouldForwardProp:e=>Hd(e)||e===`classes`,name:`MuiCheckbox`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${K(n.size)}`],n.color!=="default"&&t[`color${K(n.color)}`]]}})(Wd(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.focusVisible&&{[`&.${Cm.focusVisible} svg:first-of-type`]:{...bu,borderRadius:(e.vars||e).shape.borderRadius,...e.focusVisible}},variants:[{props:{color:`default`,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{color:t},style:{[`&.${Cd.checked}, &.${Cd.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${Cd.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]}))),zv=(0,H.jsx)(Fv,{}),Bv=(0,H.jsx)(Pv,{}),Vv=(0,H.jsx)(Iv,{}),Hv=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiCheckbox`}),{checkedIcon:r=zv,color:i=`primary`,icon:a=Bv,indeterminate:o=!1,indeterminateIcon:s=Vv,size:c=`medium`,disableRipple:l=!1,className:u,slots:d={},slotProps:f={},...p}=n,m=o?s:a,h=o?s:r,g={...n,disableRipple:l,color:i,indeterminate:o,size:c},_=Lv(g),v=f.input,[y,b]=Up(`root`,{ref:t,elementType:Rv,className:U(_.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:d,slotProps:f,...p},ownerState:g,additionalProps:{type:`checkbox`,icon:L.cloneElement(m,{fontSize:m.props.fontSize??c}),checkedIcon:L.cloneElement(h,{fontSize:h.props.fontSize??c}),disableRipple:n.disableRipple,slots:d,slotProps:{input:_p(typeof v==`function`?v(g):v,{"data-indeterminate":o,"aria-checked":o?`mixed`:void 0})}}});return(0,H.jsx)(y,{...b,classes:_})}),Uv=typeof Ud({})==`function`,Wv=(e,t)=>({WebkitFontSmoothing:`antialiased`,MozOsxFontSmoothing:`grayscale`,boxSizing:`border-box`,WebkitTextSizeAdjust:`100%`,...t&&!e.vars&&{colorScheme:e.palette.mode}}),Gv=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),Kv=(e,t=!1)=>{let n={};t&&e.colorSchemes&&typeof e.getColorSchemeSelector==`function`&&Object.entries(e.colorSchemes).forEach(([t,r])=>{let i=e.getColorSchemeSelector(t);i.startsWith(`@`)?n[i]={":root":{colorScheme:r.palette?.mode}}:n[i.replace(/\s*&/,``)]={colorScheme:r.palette?.mode}});let r={html:Wv(e,t),"*, *::before, *::after":{boxSizing:`inherit`},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...Gv(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...n},i=e.components?.MuiCssBaseline?.styleOverrides;return i&&(r=[r,i]),r},qv=`mui-ecs`,Jv=e=>{let t=Kv(e,!1),n=Array.isArray(t)?t[0]:t;return!e.vars&&n&&(n.html[`:root:has(${qv})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([t,r])=>{let i=e.getColorSchemeSelector(t);i.startsWith(`@`)?n[i]={[`:root:not(:has(.${qv}))`]:{colorScheme:r.palette?.mode}}:n[i.replace(/\s*&/,``)]={[`&:not(:has(.${qv}))`]:{colorScheme:r.palette?.mode}}}),t},Yv=Ud(Uv?({theme:e,enableColorScheme:t})=>Kv(e,t):({theme:e})=>Jv(e));function Xv(e){let{children:t,enableColorScheme:n=!1}=Gd({props:e,name:`MuiCssBaseline`});return(0,H.jsxs)(L.Fragment,{children:[Uv&&(0,H.jsx)(Yv,{enableColorScheme:n}),!Uv&&!n&&(0,H.jsx)(`span`,{className:qv,style:{display:`none`}}),t]})}function Zv(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Qv(e){let t=Od(e);return e===t.body||e===t.documentElement?kd(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function $v(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function ey(e){return parseFloat(kd(e).getComputedStyle(e).paddingRight)||0}function ty(e){let t=[`TEMPLATE`,`SCRIPT`,`STYLE`,`LINK`,`MAP`,`META`,`NOSCRIPT`,`PICTURE`,`COL`,`COLGROUP`,`PARAM`,`SLOT`,`SOURCE`,`TRACK`].includes(e.tagName),n=e.tagName===`INPUT`&&e.getAttribute(`type`)===`hidden`;return t||n}function ny(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!ty(e);t&&n&&$v(e,i)})}function ry(e,t){let n=[],r=e.container;if(!t.disableScrollLock){let e;if(r.parentNode instanceof DocumentFragment)e=Od(r).body;else{let t=r.parentElement,n=kd(r);e=t?.nodeName===`HTML`&&n.getComputedStyle(t).overflowY===`scroll`?t:r}if(Qv(e)){let t=Zv(kd(e));n.push({value:e.style.paddingRight,property:`padding-right`,el:e}),e.style.paddingRight=`${ey(e)+t}px`;let i=Od(r).querySelectorAll(`.mui-fixed`);[].forEach.call(i,e=>{n.push({value:e.style.paddingRight,property:`padding-right`,el:e}),e.style.paddingRight=`${ey(e)+t}px`})}n.push({value:e.style.overflow,property:`overflow`,el:e},{value:e.style.overflowX,property:`overflow-x`,el:e},{value:e.style.overflowY,property:`overflow-y`,el:e}),e.style.overflow=`hidden`}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}function iy(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var $ee=class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&$v(e.modalRef,!1);let r=iy(t);ny(t,e.mount,e.modalRef,r,!0);let i=this.containers.findIndex(e=>e.container===t);return i===-1?(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n):(this.containers[i].modals.push(e),n)}mount(e,t){let n=this.containers.findIndex(t=>t.modals.includes(e)),r=this.containers[n];r.restore||=ry(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=this.containers.findIndex(t=>t.modals.includes(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&$v(e.modalRef,t),ny(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=i.modals[i.modals.length-1];e.modalRef&&$v(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},ay=wh,oy=`data-mui-focusable`;function sy(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${oy}]`):null}var ete=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function cy(e){let t=parseInt(e.getAttribute(`tabindex`)||``,10);return Number.isNaN(t)?e.contentEditable===`true`||(e.nodeName===`AUDIO`||e.nodeName===`VIDEO`||e.nodeName===`DETAILS`)&&e.getAttribute(`tabindex`)===null?0:e.tabIndex:t}function tte(e){if(e.tagName!==`INPUT`||e.type!==`radio`||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||=t(`[name="${e.name}"]`),n!==e}function nte(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||tte(e))}function rte(e){let t=[],n=[];return Array.from(e.querySelectorAll(ete)).forEach((e,r)=>{let i=cy(e);i!==-1&&nte(e)&&(i===0?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function ite(){return!0}function ate(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=rte,isEnabled:o=ite,open:s}=e,c=L.useRef(!1),l=L.useRef(null),u=L.useRef(null),d=L.useRef(null),f=L.useRef(null),p=L.useRef(!1),m=L.useRef(null),h=Ed(h_(t),m),g=L.useRef(null);L.useEffect(()=>{s&&m.current&&(p.current=!n)},[n,s]),L.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=Xd(Od(m.current)),t=sy(m.current)??m.current;return ay(m.current,e)||(t.hasAttribute(`tabIndex`)||t.setAttribute(`tabIndex`,`-1`),p.current&&t.focus()),()=>{!i&&d.current&&(c.current=!0,d.current.focus(),d.current=null)}},[s]),L.useEffect(()=>{if(!s||!m.current)return;let e=Od(m.current),t=t=>{if(g.current=t,r||!o()||t.key!==`Tab`)return;let n=m.current,i=Xd(e);if(n===null)return;let s=sy(n);if(i===n||i===s){let e=a(n);if(e.length===0)return;t.preventDefault(),t.shiftKey?e[e.length-1].focus():e[0].focus();return}if(ay(n,i)){let e=a(n),r=e.indexOf(i);if(r===-1||!e.some(e=>cy(e)>0))return;t.preventDefault();let o=0;o=t.shiftKey?r<=0?e.length-1:r-1:r===e.length-1?0:r+1,e[o].focus()}},n=()=>{let t=m.current;if(t===null)return;let n=Xd(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(ay(t,n)||r&&n!==l.current&&n!==u.current)return;if(n!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let i=[];if((n===l.current||n===u.current)&&(i=a(m.current)),i.length>0){let e=!!(g.current?.shiftKey&&g.current?.key===`Tab`),t=i[0],n=i[i.length-1];typeof t!=`string`&&typeof n!=`string`&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener(`focusin`,n),e.addEventListener(`keydown`,t,!0);let i=setInterval(()=>{let t=Xd(e);t&&t.tagName===`BODY`&&n()},50);return()=>{clearInterval(i),e.removeEventListener(`focusin`,n),e.removeEventListener(`keydown`,t,!0)}},[n,r,i,o,s,a]);let _=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0,f.current=e.target;let n=t.props.onFocus;n&&n(e)},v=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0};return(0,H.jsxs)(L.Fragment,{children:[(0,H.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),L.cloneElement(t,{ref:h,onFocus:_}),(0,H.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function ote(e){return typeof e==`function`?e():e}function ste(e){return e?e.props.hasOwnProperty(`in`):!1}var ly=()=>{},uy=new $ee;function cte(e){let{container:t,disableScrollLock:n=!1,closeAfterTransition:r=!1,onTransitionEnter:i,onTransitionExited:a,children:o,onClose:s,open:c,rootRef:l}=e,u=L.useRef({}),d=L.useRef(null),f=L.useRef(null),p=L.useRef(null),m=Ed(p,l),[h,g]=L.useState(!c),_=ste(o),v=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(v=!1);let y=()=>Od(d.current),b=()=>(u.current.modalRef=p.current,u.current.mount=d.current,u.current),x=()=>{uy.mount(b(),{disableScrollLock:n}),p.current&&(p.current.scrollTop=0)},S=Dd(()=>{let e=ote(t)||y().body;uy.add(b(),e),p.current&&x()}),C=()=>uy.isTopModal(b()),w=Dd(e=>{d.current=e,e&&(f.current=e,c&&C()?x():p.current&&$v(p.current,v))}),T=L.useCallback(()=>{uy.remove(b(),v)},[v]);L.useEffect(()=>()=>{T()},[T]),L.useEffect(()=>{c?S():(!_||!r)&&T()},[c,T,_,r,S]);let E=e=>t=>{e.onKeyDown?.(t),t.key===`Escape`&&t.which!==229&&C()&&(t.stopPropagation(),s&&s(t,`escapeKeyDown`))},D=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&s&&s(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=Bp(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:E(r),ref:m}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:D(t),open:c}},getTransitionProps:()=>({onEnter:tp(()=>{g(!1),i&&i()},o?.props.onEnter??ly),onExited:tp(()=>{g(!0),a&&a(),r&&T()},o?.props.onExited??ly)}),rootRef:m,portalRef:w,portalContainer:!c&&_&&!h?f.current??t:t,isTopModal:C,exited:h,hasTransition:_}}function lte(e){return Zs(`MuiModal`,e)}Qs(`MuiModal`,[`root`,`hidden`,`backdrop`]);var ute=e=>{let{open:t,exited:n,classes:r}=e;return El({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},lte,r)},dte=G(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Wd(({theme:e})=>({position:`fixed`,zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:`hidden`}}]}))),fte=G(Q_,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),dy=L.forwardRef(function(e,t){let n=Gd({name:`MuiModal`,props:e}),{classes:r,className:i,closeAfterTransition:a=!1,children:o,container:s,component:c,disableAutoFocus:l=!1,disableEnforceFocus:u=!1,disablePortal:d=!1,disableRestoreFocus:f=!1,disableScrollLock:p=!1,hideBackdrop:m=!1,keepMounted:h=!1,onClose:g,onTransitionEnter:_,onTransitionExited:v,open:y,slotProps:b={},slots:x={},theme:S,...C}=n,w={...n,closeAfterTransition:a,disableAutoFocus:l,disableEnforceFocus:u,disablePortal:d,disableRestoreFocus:f,disableScrollLock:p,hideBackdrop:m,keepMounted:h},{getRootProps:T,getBackdropProps:E,getTransitionProps:D,portalRef:O,portalContainer:ee,isTopModal:te,exited:k,hasTransition:A}=cte({...w,rootRef:t}),j={...w,exited:k},M=ute(j),ne={};if(o.props.tabIndex===void 0&&(ne.tabIndex=`-1`),A){let{onEnter:e,onExited:t}=D();ne.onEnter=e,ne.onExited=t}let re={slots:x,slotProps:b},[ie,ae]=Up(`root`,{ref:t,elementType:dte,externalForwardedProps:{...re,...C,component:c},getSlotProps:T,ownerState:j,className:U(i,M?.root,!j.open&&j.exited&&M?.hidden)}),[N,oe]=Up(`backdrop`,{elementType:fte,externalForwardedProps:re,shouldForwardComponentProp:!0,getSlotProps:e=>E({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:M?.backdrop,ownerState:j});return!h&&!y&&(!A||k)?null:(0,H.jsx)(__,{ref:O,container:ee,disablePortal:d,children:(0,H.jsxs)(ie,{...ae,children:[m?null:(0,H.jsx)(N,{...oe}),(0,H.jsx)(ate,{disableEnforceFocus:u,disableAutoFocus:l,disableRestoreFocus:f,isEnabled:te,open:y,children:L.cloneElement(o,ne)})]})})});function pte(e){return Zs(`MuiDialog`,e)}Qs(`MuiDialog`,[`root`,`backdrop`,`scrollPaper`,`scrollBody`,`container`,`paper`,`paperWidthFalse`,`paperWidthXs`,`paperWidthSm`,`paperWidthMd`,`paperWidthLg`,`paperWidthXl`,`paperFullWidth`,`paperFullScreen`]);var fy=L.createContext({}),mte=G(Q_,{name:`MuiDialog`,slot:`Backdrop`})({zIndex:-1}),hte=e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=e;return El({root:[`root`],backdrop:[`backdrop`],container:[`container`,`scroll${K(n)}`],paper:[`paper`,`paperWidth${K(String(r))}`,i&&`paperFullWidth`,a&&`paperFullScreen`]},pte,t)},gte=G(dy,{name:`MuiDialog`,slot:`Root`})({"@media print":{position:`absolute !important`}}),_te=G(`div`,{name:`MuiDialog`,slot:`Container`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${K(n.scroll)}`]]}})({height:`100%`,"@media print":{height:`auto`},outline:0,variants:[{props:{scroll:`paper`},style:{display:`flex`,justifyContent:`center`,alignItems:`center`}},{props:{scroll:`body`},style:{overflowY:`auto`,overflowX:`hidden`,textAlign:`center`,"&::after":{content:`""`,display:`inline-block`,verticalAlign:`middle`,height:`100%`,width:`0`}}}]}),vte=G(Qp,{name:`MuiDialog`,slot:`Paper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`paperWidth${K(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Wd(({theme:e})=>({margin:32,position:`relative`,overflowY:`auto`,outline:0,"@media print":{overflowY:`visible`,boxShadow:`none`},variants:[{props:{scroll:`paper`},style:{display:`flex`,flexDirection:`column`,maxHeight:`calc(100% - 64px)`}},{props:{scroll:`body`},style:{display:`inline-block`,verticalAlign:`middle`,textAlign:`initial`}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:`calc(100% - 64px)`}},{props:{maxWidth:`xs`},style:{maxWidth:e.breakpoints.unit===`px`?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`}},{props:{maxWidth:`xs`,scroll:`body`},style:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:`calc(100% - 64px)`}}},...Object.keys(e.breakpoints.values).filter(e=>e!==`xs`).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`}})),...Object.keys(e.breakpoints.values).filter(e=>e!==`xs`).map(t=>({props:{maxWidth:t,scroll:`body`},style:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:`calc(100% - 64px)`}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:`calc(100% - 64px)`}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:`100%`,maxWidth:`100%`,height:`100%`,maxHeight:`none`,borderRadius:0}},{props:({ownerState:e})=>e.fullScreen&&e.scroll===`body`,style:{margin:0,maxWidth:`100%`}}]}))),py=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiDialog`}),r=zd(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":o,"aria-modal":s=!0,children:c,className:l,fullScreen:u=!1,fullWidth:d=!1,maxWidth:f=`sm`,onClick:p,onClose:m,open:h,PaperComponent:g=Qp,role:_=`dialog`,scroll:v=`paper`,slots:y={},slotProps:b={},transitionDuration:x=i,...S}=n,C={...n,fullScreen:u,fullWidth:d,maxWidth:f,scroll:v},w=hte(C),T=L.useRef(),E=e=>{T.current=e.target===e.currentTarget},D=e=>{p&&p(e),T.current&&(T.current=null,m&&m(e,`backdropClick`))},O=Qc(o),ee=L.useMemo(()=>({titleId:O}),[O]),te={slots:y,slotProps:b},[k,A]=Up(`root`,{elementType:gte,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:C,className:U(w.root,l),ref:t}),[j,M]=Up(`backdrop`,{elementType:mte,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:C,className:w.backdrop}),[ne,re]=Up(`paper`,{elementType:vte,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:C,className:w.paper,additionalProps:{elevation:24,role:_,"aria-describedby":a,"aria-labelledby":O,"aria-modal":s,tabIndex:-1,[oy]:``}}),[ie,ae]=Up(`container`,{elementType:_te,externalForwardedProps:te,ownerState:C,className:w.container}),[N,oe]=Up(`transition`,{elementType:J_,externalForwardedProps:te,ownerState:C,additionalProps:{appear:!0,in:h,timeout:x,role:`presentation`}});return(0,H.jsx)(k,{closeAfterTransition:!0,slots:{backdrop:j},slotProps:{backdrop:{transitionDuration:x,...M}},onClose:m,open:h,onClick:D,...A,...S,children:(0,H.jsx)(N,{...oe,children:(0,H.jsx)(ie,{onMouseDown:E,...ae,children:(0,H.jsx)(ne,{as:g,...re,children:(0,H.jsx)(fy.Provider,{value:ee,children:c})})})})})});function yte(e){return Zs(`MuiDialogActions`,e)}Qs(`MuiDialogActions`,[`root`,`spacing`]);var bte=e=>{let{classes:t,disableSpacing:n}=e;return El({root:[`root`,!n&&`spacing`]},yte,t)},xte=G(`div`,{name:`MuiDialogActions`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:`flex`,alignItems:`center`,padding:8,justifyContent:`flex-end`,flex:`0 0 auto`,variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),my=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiDialogActions`}),{className:r,disableSpacing:i=!1,...a}=n,o={...n,disableSpacing:i},s=bte(o);return(0,H.jsx)(xte,{className:U(s.root,r),ownerState:o,ref:t,...a})});function Ste(e){return Zs(`MuiDialogContent`,e)}Qs(`MuiDialogContent`,[`root`,`dividers`]);function Cte(e){return Zs(`MuiDialogTitle`,e)}var wte=Qs(`MuiDialogTitle`,[`root`]),Tte=e=>{let{classes:t,dividers:n}=e;return El({root:[`root`,n&&`dividers`]},Ste,t)},Ete=G(`div`,{name:`MuiDialogContent`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Wd(({theme:e})=>({flex:`1 1 auto`,WebkitOverflowScrolling:`touch`,overflowY:`auto`,padding:`20px 24px`,variants:[{props:({ownerState:e})=>e.dividers,style:{padding:`16px 24px`,borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${wte.root} + &`]:{paddingTop:0}}}]}))),hy=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiDialogContent`}),{className:r,dividers:i=!1,...a}=n,o={...n,dividers:i},s=Tte(o);return(0,H.jsx)(Ete,{className:U(s.root,r),ownerState:o,ref:t,...a})}),Dte=e=>{let{classes:t}=e;return El({root:[`root`]},Cte,t)},Ote=G(q,{name:`MuiDialogTitle`,slot:`Root`})({padding:`16px 24px`,flex:`0 0 auto`}),gy=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiDialogTitle`}),{className:r,id:i,...a}=n,o=n,s=Dte(o),{titleId:c=i}=L.useContext(fy);return(0,H.jsx)(Ote,{component:`h2`,className:U(s.root,r),ownerState:o,ref:t,variant:`h6`,id:i??c,...a})});function kte(e){return Zs(`MuiDivider`,e)}var _y=Qs(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`vertical`,`withChildren`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),Ate=e=>{let{absolute:t,children:n,classes:r,flexItem:i,orientation:a,textAlign:o,variant:s}=e;return El({root:[`root`,t&&`absolute`,s,a===`vertical`&&`vertical`,i&&`flexItem`,n&&`withChildren`,o===`right`&&a!==`vertical`&&`textAlignRight`,o===`left`&&a!==`vertical`&&`textAlignLeft`],wrapper:[`wrapper`,a===`vertical`&&`wrapperVertical`]},kte,r)},jte=G(`div`,{name:`MuiDivider`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.orientation===`vertical`&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.textAlign===`right`&&n.orientation!==`vertical`&&t.textAlignRight,n.textAlign===`left`&&n.orientation!==`vertical`&&t.textAlignLeft]}})(Wd(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:`solid`,borderColor:(e.vars||e).palette.divider,borderBottomWidth:`thin`,variants:[{props:{absolute:!0},style:{position:`absolute`,bottom:0,left:0,width:`100%`}},{props:{variant:`inset`},style:{marginLeft:72}},{props:{variant:`middle`,orientation:`horizontal`},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:`middle`,orientation:`vertical`},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:`vertical`},style:{height:`100%`,borderBottomWidth:0,borderRightWidth:`thin`}},{props:{flexItem:!0},style:{alignSelf:`stretch`,height:`auto`}},{props:({ownerState:e})=>!!e.children,style:{display:`flex`,textAlign:`center`,border:0,borderTopStyle:`solid`,borderLeftStyle:`solid`,"&::before, &::after":{content:`""`,alignSelf:`center`}}},{props:({ownerState:e})=>e.children&&e.orientation!==`vertical`,style:{"&::before, &::after":{width:`100%`,borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:`inherit`}}},{props:({ownerState:e})=>e.orientation===`vertical`&&e.children,style:{flexDirection:`column`,"&::before, &::after":{height:`100%`,borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:`inherit`}}},{props:({ownerState:e})=>e.textAlign===`right`&&e.orientation!==`vertical`,style:{"&::before":{width:`90%`},"&::after":{width:`10%`}}},{props:({ownerState:e})=>e.textAlign===`left`&&e.orientation!==`vertical`,style:{"&::before":{width:`10%`},"&::after":{width:`90%`}}}]}))),Mte=G(`span`,{name:`MuiDivider`,slot:`Wrapper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.wrapper,n.orientation===`vertical`&&t.wrapperVertical]}})(Wd(({theme:e})=>({display:`inline-block`,paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:`nowrap`,variants:[{props:{orientation:`vertical`},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),vy=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiDivider`}),{absolute:r=!1,children:i,className:a,orientation:o=`horizontal`,component:s=i||o===`vertical`?`div`:`hr`,flexItem:c=!1,role:l=s===`hr`?void 0:`separator`,textAlign:u=`center`,variant:d=`fullWidth`,...f}=n,p={...n,absolute:r,component:s,flexItem:c,orientation:o,role:l,textAlign:u,variant:d},m=Ate(p);return(0,H.jsx)(jte,{as:s,className:U(m.root,a),role:l,ref:t,ownerState:p,"aria-orientation":l===`separator`&&(s!==`hr`||o===`vertical`)?o:void 0,...f,children:i?(0,H.jsx)(Mte,{className:m.wrapper,ownerState:p,children:i}):null})});function Nte(e){return Zs(`MuiFab`,e)}var yy=Qs(`MuiFab`,[`root`,`primary`,`secondary`,`extended`,`circular`,`focusVisible`,`disabled`,`colorInherit`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`info`,`error`,`warning`,`success`]),Pte=e=>{let{color:t,variant:n,classes:r,size:i}=e,a=El({root:[`root`,n,`size${K(i)}`,t===`inherit`?`colorInherit`:t]},Nte,r);return{...r,...a}},Fte=G(Em,{name:`MuiFab`,slot:`Root`,shouldForwardProp:e=>Hd(e)||e===`classes`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${K(n.size)}`],n.color===`inherit`&&t.colorInherit,t[K(n.size)],t[n.color]]}})(Wd(({theme:e})=>({...e.typography.button,minHeight:36,...pf(e,[`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),borderRadius:`50%`,padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.grey[900]:e.palette.getContrastText?.(e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:`none`},[`&.${yy.focusVisible}`]:{...e.focusVisible,boxShadow:e.focusVisible?.boxShadow?`${(e.vars||e).shadows[6]}, ${e.focusVisible.boxShadow}`:(e.vars||e).shadows[6]},variants:[{props:{size:`small`},style:{width:40,height:40}},{props:{size:`medium`},style:{width:48,height:48}},{props:{variant:`extended`},style:{borderRadius:24,padding:`0 16px`,width:`auto`,minHeight:`auto`,minWidth:48,height:48}},{props:{variant:`extended`,size:`small`},style:{width:`auto`,padding:`0 8px`,borderRadius:17,minWidth:34,height:34}},{props:{variant:`extended`,size:`medium`},style:{width:`auto`,padding:`0 16px`,borderRadius:20,minWidth:40,height:40}},{props:{color:`inherit`},style:{color:`inherit`}}]})),Wd(({theme:e})=>({variants:[...Object.entries(e.palette).filter(Fm([`dark`,`contrastText`])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),Wd(({theme:e})=>({[`&.${yy.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),by=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiFab`}),{children:r,className:i,color:a=`default`,component:o=`button`,disabled:s=!1,disableFocusRipple:c=!1,focusVisibleClassName:l,size:u=`large`,variant:d=`circular`,...f}=n,p={...n,color:a,component:o,disabled:s,disableFocusRipple:c,size:u,variant:d},m=Pte(p),{root:h,...g}=m;return(0,H.jsx)(Fte,{className:U(m.root,i),component:o,internalNativeButton:!0,disabled:s,focusRipple:!c,focusVisibleClassName:U(m.focusVisible,l),ownerState:p,ref:t,...f,classes:g,children:r})});function xy(e){return Zs(`MuiSelect`,e)}var Sy=Qs(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`nativeInput`,`error`]),Cy=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=El({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${K(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},wf,t);return{...t,...c}},wy=G(bf,{shouldForwardProp:e=>Hd(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[..._f(e,t),!n.disableUnderline&&t.underline]}})(Wd(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{position:`relative`,backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,...pf(e,`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Tf.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Tf.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,...pf(e,`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${Tf.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Tf.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,...pf(e,`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Tf.disabled}, .${Tf.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Tf.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{"--_trailingPad":`12px`,paddingRight:`var(--_trailingPad)`,[`&.${Sy.root}`]:{"--_trailingPad":`0px`}}},{props:({ownerState:e})=>e.multiline,style:{padding:`25px 12px 8px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}}]}})),Ty=G(xf,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:vf})(Wd(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,"&:-webkit-autofill":{...!e.vars&&{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`},borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`,...e.vars&&e.applyStyles(`dark`,{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`})},variants:[{props:{size:`small`},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),Ey=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiFilledInput`}),{disableUnderline:r=!1,fullWidth:i=!1,hiddenLabel:a,inputComponent:o=`input`,multiline:s=!1,notched:c,slotProps:l,slots:u={},type:d=`text`,...f}=n,p={...n,disableUnderline:r,fullWidth:i,inputComponent:o,multiline:s,type:d},m=Cy(n),h={root:{ownerState:p},input:{ownerState:p}},g=l?no(h,l):h,_=u.root??wy,v=u.input??Ty;return(0,H.jsx)(Cf,{slots:{root:_,input:v},slotProps:g,fullWidth:i,inputComponent:o,multiline:s,ref:t,type:d,...f,classes:m})});Ey.muiName=`Input`;function Dy(e){return Zs(`MuiFormControl`,e)}Qs(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var Oy=e=>{let{classes:t,margin:n,fullWidth:r}=e;return El({root:[`root`,n!==`none`&&`margin${K(n)}`,r&&`fullWidth`]},Dy,t)},ky=G(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${K(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:`inline-flex`,flexDirection:`column`,position:`relative`,minWidth:0,padding:0,margin:0,border:0,verticalAlign:`top`,variants:[{props:{margin:`normal`},style:{marginTop:16,marginBottom:8}},{props:{margin:`dense`},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:`100%`}}]}),Ay=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiFormControl`}),{children:r,className:i,color:a=`primary`,component:o=`div`,disabled:s=!1,error:c=!1,focused:l,fullWidth:u=!1,hiddenLabel:d=!1,margin:f=`none`,required:p=!1,size:m=`medium`,variant:h=`outlined`,...g}=n,_={...n,color:a,component:o,disabled:s,error:c,fullWidth:u,hiddenLabel:d,margin:f,required:p,size:m,variant:h},v=Oy(_),[y,b]=L.useState(()=>{let e=!1;return r&&L.Children.forEach(r,t=>{if(!lp(t,[`Input`,`Select`]))return;let n=lp(t,[`Select`])?t.props.input:t;n&&$d(n.props)&&(e=!0)}),e}),[x,S]=L.useState(()=>{let e=!1;return r&&L.Children.forEach(r,t=>{lp(t,[`Input`,`Select`])&&(Qd(t.props,!0)||Qd(t.props.inputProps,!0))&&(e=!0)}),e}),[C,w]=L.useState(!1);s&&C&&w(!1);let T=l!==void 0&&!s?l:C,E;L.useRef(!1);let D=L.useCallback(()=>{S(!0)},[]),O=L.useCallback(()=>{S(!1)},[]),ee=L.useMemo(()=>({adornedStart:y,setAdornedStart:b,color:a,disabled:s,error:c,filled:x,focused:T,fullWidth:u,hiddenLabel:d,size:m,onBlur:()=>{w(!1)},onFocus:()=>{w(!0)},onEmpty:O,onFilled:D,registerEffect:E,required:p,variant:h}),[y,a,s,c,x,T,u,d,E,O,D,p,m,h]);return(0,H.jsx)(Fd.Provider,{value:ee,children:(0,H.jsx)(ky,{as:o,ownerState:_,className:U(v.root,i),ref:t,...g,children:r})})}),jy=e=>{let{classes:t,disabled:n,labelPlacement:r,error:i,required:a}=e;return El({root:[`root`,n&&`disabled`,`labelPlacement${K(r)}`,i&&`error`,a&&`required`],label:[`label`,n&&`disabled`],asterisk:[`asterisk`,i&&`error`]},Ef,t)},My=G(`label`,{name:`MuiFormControlLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Df.label}`]:t.label},t.root,t[`labelPlacement${K(n.labelPlacement)}`]]}})(Wd(({theme:e})=>({display:`inline-flex`,alignItems:`center`,cursor:`pointer`,verticalAlign:`middle`,WebkitTapHighlightColor:`transparent`,marginLeft:-11,marginRight:16,[`&.${Df.disabled}`]:{cursor:`default`},[`& .${Df.label}`]:{[`&.${Df.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:`start`},style:{flexDirection:`row-reverse`,marginRight:-11}},{props:{labelPlacement:`top`},style:{flexDirection:`column-reverse`}},{props:{labelPlacement:`bottom`},style:{flexDirection:`column`}},{props:({labelPlacement:e})=>e===`start`||e===`top`||e===`bottom`,style:{marginLeft:16}}]}))),Ny=G(`span`,{name:`MuiFormControlLabel`,slot:`Asterisk`})(Wd(({theme:e})=>({[`&.${Df.error}`]:{color:(e.vars||e).palette.error.main}}))),Py=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiFormControlLabel`}),{checked:r,className:i,control:a,disabled:o,disableTypography:s,inputRef:c,label:l,labelPlacement:u=`end`,name:d,onChange:f,required:p,slots:m={},slotProps:h={},value:g,..._}=n,[v,y]=Ld({props:n,states:[`error`]}),b=o??a.props.disabled??y?.disabled,x=p??a.props.required,S={disabled:b,required:x};[`checked`,`name`,`onChange`,`value`,`inputRef`].forEach(e=>{a.props[e]===void 0&&n[e]!==void 0&&(S[e]=n[e])});let C={...n,disabled:b,labelPlacement:u,required:x,error:v.error},w=jy(C),[T,E]=Up(`typography`,{elementType:q,externalForwardedProps:{slots:m,slotProps:h},ownerState:C}),D=l;return D!=null&&D.type!==q&&!s&&(D=(0,H.jsx)(T,{component:`span`,...E,className:U(w.label,E?.className),children:D})),(0,H.jsxs)(My,{className:U(w.root,i),ownerState:C,ref:t,..._,children:[L.cloneElement(a,S),x?(0,H.jsxs)(`div`,{children:[D,(0,H.jsxs)(Ny,{ownerState:C,"aria-hidden":!0,className:w.asterisk,children:[` `,`*`]})]}):D]})});function Fy(e){return Zs(`MuiFormGroup`,e)}Qs(`MuiFormGroup`,[`root`,`row`,`error`]);var Iy=e=>{let{classes:t,row:n,error:r}=e;return El({root:[`root`,n&&`row`,r&&`error`]},Fy,t)},Ly=G(`div`,{name:`MuiFormGroup`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:`flex`,flexDirection:`column`,flexWrap:`wrap`,variants:[{props:{row:!0},style:{flexDirection:`row`}}]}),Ry=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiFormGroup`}),{className:r,row:i=!1,...a}=n,[o]=Ld({props:n,states:[`error`]}),s={...n,row:i,error:o.error},c=Iy(s);return(0,H.jsx)(Ly,{className:U(c.root,r),ownerState:s,ref:t,...a})}),zy,By=e=>{let{classes:t,contained:n,size:r,disabled:i,error:a,filled:o,focused:s,required:c}=e;return El({root:[`root`,i&&`disabled`,a&&`error`,r&&`size${K(r)}`,n&&`contained`,s&&`focused`,o&&`filled`,c&&`required`]},Of,t)},Vy=G(`p`,{name:`MuiFormHelperText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size&&t[`size${K(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Wd(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:`left`,marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${kf.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${kf.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:`small`},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),Hy=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiFormHelperText`}),{children:r,className:i,component:a=`p`,disabled:o,error:s,filled:c,focused:l,margin:u,required:d,variant:f,...p}=n,[m]=Ld({props:n,states:[`variant`,`size`,`disabled`,`error`,`filled`,`focused`,`required`]}),h={...n,component:a,contained:m.variant===`filled`||m.variant===`outlined`,variant:m.variant,size:m.size,disabled:m.disabled,error:m.error,filled:m.filled,focused:m.focused,required:m.required};delete h.ownerState;let g=By(h);return(0,H.jsx)(Vy,{as:a,className:U(g.root,i),ref:t,...p,ownerState:h,children:r===` `?zy||=(0,H.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):r})}),Uy=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return El({root:[`root`,`color${K(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},Af,t)},Wy=G(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(Wd(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:`1.4375em`,padding:0,position:`relative`,variants:[...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{color:t},style:{[`&.${jf.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${jf.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${jf.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),Gy=G(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(Wd(({theme:e})=>({[`&.${jf.error}`]:{color:(e.vars||e).palette.error.main}}))),Ky=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiFormLabel`}),{children:r,className:i,color:a,component:o=`label`,disabled:s,error:c,filled:l,focused:u,required:d,...f}=n,[p]=Ld({props:n,states:[`color`,`required`,`focused`,`disabled`,`error`,`filled`]}),m={...n,color:p.color||`primary`,component:o,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required},h=Uy(m);return(0,H.jsxs)(Wy,{as:o,ownerState:m,className:U(h.root,i),ref:t,...f,children:[r,p.required&&(0,H.jsxs)(Gy,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})}),qy=ql({createStyledComponent:G(`div`,{name:`MuiGrid`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:`MuiGrid`,useThemeProps:e=>Gd({props:e,name:`MuiGrid`}),useTheme:zd});function Jy(e){return`scale(${e}, ${e**2})`}var Yy={entering:{opacity:1,transform:Jy(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:Jy(.75)},exited:{opacity:0,transform:Jy(.75)}},Xy={opacity:0,transform:Jy(.75),visibility:`hidden`},Zy=L.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,disablePrefersReducedMotion:a=!1,easing:o,in:s,onEnter:c,onEntered:l,onEntering:u,onExit:d,onExited:f,onExiting:p,style:m,timeout:h=`auto`,...g}=e,_=L.useRef(null),v=zd(),y=Lp(v.motion.reducedMotion,a),b=L.useRef(null),x=Kd(b,h_(i),t),S=lf(b,u),C=lf(b,(e,t)=>{y.shouldReduceMotion||af(e);let{duration:n,delay:r,easing:i}=df({style:m,timeout:h,easing:o},{mode:`enter`}),a;h===`auto`&&!y.shouldReduceMotion?(a=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=a):(a=n,_.current=null);let s=y.getTransitionTiming({duration:a,delay:r});e.style.transition=[v.transitions.create(`opacity`,{duration:s.duration,delay:s.delay}),v.transitions.create(`transform`,{duration:typeof s.duration==`string`?s.duration:s.duration*.666,delay:s.delay,easing:i})].join(`,`),c&&c(e,t)}),w=lf(b,l),T=lf(b,p),E=lf(b,e=>{let{duration:t,delay:n,easing:r}=df({style:m,timeout:h,easing:o},{mode:`exit`}),i;h===`auto`&&!y.shouldReduceMotion?(i=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=i):(i=t,_.current=null);let a=y.getTransitionTiming({duration:i,delay:n});e.style.transition=[v.transitions.create(`opacity`,{duration:a.duration,delay:a.delay}),v.transitions.create(`transform`,{duration:typeof a.duration==`string`?a.duration:a.duration*.666,delay:a.delay||(typeof a.duration==`string`?a.duration:a.duration*.333),easing:r})].join(`,`),e.style.opacity=0,e.style.transform=Jy(.75),d&&d(e)}),D=lf(b,e=>{e.style.transition=``,f&&f(e)});return(0,H.jsx)(Tp,{appear:r,in:s,nodeRef:b,onEnter:C,onEntered:w,onEntering:S,onExit:E,onExited:D,onExiting:T,addEndListener:n?e=>{n(b.current,e)}:void 0,getAutoTimeout:h===`auto`?()=>_.current:void 0,reduceMotion:y.shouldReduceMotion,timeout:h===`auto`?null:h,...g,children:(e,{ownerState:t,...n})=>{let r=uf(e,s,Yy,Xy,m,i.props.style);return L.cloneElement(i,{style:r,ref:x,...n})}})});Zy&&(Zy.muiSupportAuto=!0);function Qy(e){return Zs(`MuiInputLabel`,e)}var $y=Qs(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]),eb=e=>{let{classes:t,disableUnderline:n}=e,r=El({root:[`root`,!n&&`underline`],input:[`input`]},Mf,t);return{...t,...r}},tb=G(bf,{shouldForwardProp:e=>Hd(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[..._f(e,t),!n.disableUnderline&&t.underline]}})(Wd(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:`relative`,variants:[{props:({ownerState:e})=>e.formControl,style:{[`label + &, .${$y.root} + &`]:{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,...pf(e,`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${Nf.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Nf.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,...pf(e,`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Nf.disabled}, .${Nf.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${Nf.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),nb=G(xf,{name:`MuiInput`,slot:`Input`,overridesResolver:vf})({}),rb=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiInput`}),{disableUnderline:r=!1,fullWidth:i=!1,inputComponent:a=`input`,multiline:o=!1,notched:s,slotProps:c,slots:l={},type:u=`text`,...d}=n,f=eb(n),p={root:{ownerState:{disableUnderline:r}}},m=c?no(c,p):p,h=l.root??tb,g=l.input??nb;return(0,H.jsx)(Cf,{slots:{root:h,input:g},slotProps:m,fullWidth:i,inputComponent:a,multiline:o,ref:t,type:u,...d,classes:f})});rb.muiName=`Input`;function ib(e){return Zs(`MuiInputAdornment`,e)}var ab=Qs(`MuiInputAdornment`,[`root`,`filled`,`standard`,`outlined`,`positionStart`,`positionEnd`,`disablePointerEvents`,`hiddenLabel`,`sizeSmall`]),ob,sb=(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${K(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},cb=e=>{let{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:a,variant:o}=e;return El({root:[`root`,n&&`disablePointerEvents`,i&&`position${K(i)}`,o,r&&`hiddenLabel`,a&&`size${K(a)}`]},ib,t)},lb=G(`div`,{name:`MuiInputAdornment`,slot:`Root`,overridesResolver:sb})(Wd(({theme:e})=>({display:`flex`,maxHeight:`2em`,alignItems:`center`,whiteSpace:`nowrap`,color:(e.vars||e).palette.action.active,variants:[{props:{variant:`filled`},style:{[`&.${ab.positionStart}&:not(.${ab.hiddenLabel})`]:{marginTop:16}}},{props:{position:`start`},style:{marginRight:8}},{props:{position:`end`},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:`none`}}]}))),ub=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiInputAdornment`}),{children:r,className:i,component:a=`div`,disablePointerEvents:o=!1,disableTypography:s=!1,position:c,variant:l,...u}=n,d=Id()||{},f=l;l&&d.variant,d&&!f&&(f=d.variant);let p={...n,hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:o,position:c,variant:f},m=cb(p);return(0,H.jsx)(Fd.Provider,{value:null,children:(0,H.jsx)(lb,{as:a,ownerState:p,className:U(m.root,i),ref:t,...u,children:typeof r==`string`&&!s?(0,H.jsx)(q,{color:`textSecondary`,children:r}):(0,H.jsxs)(L.Fragment,{children:[c===`start`?ob||=(0,H.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):null,r]})})})}),db=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=El({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${K(r)}`,o],asterisk:[s&&`asterisk`]},Qy,t);return{...t,...c}},fb=G(Ky,{shouldForwardProp:e=>Hd(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${jf.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size===`small`&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Wd(({theme:e})=>({display:`block`,transformOrigin:`top left`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,variants:[{props:({ownerState:e})=>e.formControl,style:{position:`absolute`,left:0,top:0,transform:`translate(0, 20px) scale(1)`}},{props:{size:`small`},style:{transform:`translate(0, 17px) scale(1)`}},{props:({ownerState:e})=>e.shrink,style:{transform:`translate(0, -1.5px) scale(0.75)`,transformOrigin:`top left`,maxWidth:`133%`}},{props:({ownerState:e})=>!e.disableAnimation,style:{...pf(e,[`color`,`transform`,`max-width`],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:`filled`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(12px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`filled`,size:`small`},style:{transform:`translate(12px, 13px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`filled`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,transform:`translate(12px, 7px) scale(0.75)`,maxWidth:`calc(133% - 24px)`}},{props:({variant:e,ownerState:t,size:n})=>e===`filled`&&t.shrink&&n===`small`,style:{transform:`translate(12px, 4px) scale(0.75)`}},{props:{variant:`outlined`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(14px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`outlined`,size:`small`},style:{transform:`translate(14px, 9px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`outlined`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,maxWidth:`calc(133% - 32px)`,transform:`translate(14px, -9px) scale(0.75)`}}]}))),pb=L.forwardRef(function(e,t){let n=Gd({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,[l,u]=Ld({props:n,states:[`size`,`variant`,`required`,`focused`]}),d=a;d===void 0&&u&&(d=u.filled||u.focused||u.adornedStart);let f={...n,disableAnimation:r,formControl:u,shrink:d,size:l.size,variant:l.variant,required:l.required,focused:l.focused},p=db(f);return(0,H.jsx)(fb,{"data-shrink":d,ref:t,className:U(p.root,s),...c,ownerState:f,classes:p})});function mb(e){return Zs(`MuiLinearProgress`,e)}Qs(`MuiLinearProgress`,[`root`,`colorPrimary`,`colorSecondary`,`determinate`,`indeterminate`,`buffer`,`query`,`dashed`,`bar`,`bar1`,`bar2`]);var hb=4,gb={},_b=Fa`
|
|
193
|
+
0% {
|
|
194
|
+
left: -35%;
|
|
195
|
+
right: 100%;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
60% {
|
|
199
|
+
left: 100%;
|
|
200
|
+
right: -90%;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
100% {
|
|
204
|
+
left: 100%;
|
|
205
|
+
right: -90%;
|
|
206
|
+
}
|
|
207
|
+
`,vb=typeof _b==`string`?null:Pa`
|
|
208
|
+
animation: ${_b} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
209
|
+
`,yb=Fa`
|
|
210
|
+
0% {
|
|
211
|
+
left: -200%;
|
|
212
|
+
right: 100%;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
60% {
|
|
216
|
+
left: 107%;
|
|
217
|
+
right: -8%;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
100% {
|
|
221
|
+
left: 107%;
|
|
222
|
+
right: -8%;
|
|
223
|
+
}
|
|
224
|
+
`,bb=typeof yb==`string`?null:Pa`
|
|
225
|
+
animation: ${yb} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
|
|
226
|
+
`,xb=Fa`
|
|
227
|
+
0% {
|
|
228
|
+
opacity: 1;
|
|
229
|
+
background-position: 0 -23px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
60% {
|
|
233
|
+
opacity: 0;
|
|
234
|
+
background-position: 0 -23px;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
100% {
|
|
238
|
+
opacity: 1;
|
|
239
|
+
background-position: -200px -23px;
|
|
240
|
+
}
|
|
241
|
+
`,Sb=typeof xb==`string`?null:Pa`
|
|
242
|
+
animation: ${xb} 3s infinite linear;
|
|
243
|
+
`,Cb=e=>{let{classes:t,variant:n,color:r}=e;return El({root:[`root`,`color${K(r)}`,n],dashed:[`dashed`],bar1:[`bar`,`bar1`],bar2:[`bar`,`bar2`,n===`buffer`&&`color${K(r)}`]},mb,t)},wb=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode===`light`?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.5),Tb=G(`span`,{name:`MuiLinearProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${K(n.color)}`],t[n.variant]]}})(Wd(({theme:e})=>({position:`relative`,overflow:`hidden`,display:`block`,height:4,zIndex:0,"@media print":{colorAdjust:`exact`},variants:[...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{color:t},style:{backgroundColor:wb(e,t)}})),{props:({ownerState:e})=>e.color===`inherit`&&e.variant!==`buffer`,style:{"&::before":{content:`""`,position:`absolute`,left:0,top:0,right:0,bottom:0,backgroundColor:`currentColor`,opacity:.3}}},{props:{variant:`buffer`},style:{backgroundColor:`transparent`}},{props:{variant:`query`},style:{transform:`rotate(180deg)`}}]}))),Eb=G(`span`,{name:`MuiLinearProgress`,slot:`Dashed`})(Wd(({theme:e})=>({position:`absolute`,marginTop:0,height:`100%`,width:`100%`,backgroundSize:`10px 10px`,backgroundPosition:`0 -23px`,variants:[{props:{color:`inherit`},style:{opacity:.3,backgroundImage:`radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)`}},...Object.entries(e.palette).filter(Fm()).map(([t])=>{let n=wb(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),Sb||{animation:`${xb} 3s infinite linear`},Wd(({theme:e})=>ff(e,{animation:`none`})||gb)),Db=G(`span`,{name:`MuiLinearProgress`,slot:`Bar1`,overridesResolver:(e,t)=>[t.bar,t.bar1]})(Wd(({theme:e})=>{let t=ff(e,{animation:`none`,left:`30%`,right:`auto`,width:`40%`});return{width:`100%`,position:`absolute`,left:0,bottom:0,top:0,...pf(e,`transform`,{duration:`0.2s`,easing:`linear`}),transformOrigin:`left`,variants:[{props:{color:`inherit`},style:{backgroundColor:`currentColor`}},...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:`determinate`},style:{...pf(e,`transform`,{duration:`.${hb}s`,easing:`linear`})}},{props:{variant:`buffer`},style:{zIndex:1,...pf(e,`transform`,{duration:`.${hb}s`,easing:`linear`})}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:vb||{animation:`${_b} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:t}]:[]]}})),Ob=G(`span`,{name:`MuiLinearProgress`,slot:`Bar2`,overridesResolver:(e,t)=>[t.bar,t.bar2]})(Wd(({theme:e})=>{let t=ff(e,{animation:`none`,display:`none`});return{width:`100%`,position:`absolute`,left:0,bottom:0,top:0,...pf(e,`transform`,{duration:`0.2s`,easing:`linear`}),transformOrigin:`left`,variants:[...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:e})=>e.variant!==`buffer`&&e.color!==`inherit`,style:{backgroundColor:`var(--LinearProgressBar2-barColor, currentColor)`}},{props:({ownerState:e})=>e.variant!==`buffer`&&e.color===`inherit`,style:{backgroundColor:`currentColor`}},{props:{color:`inherit`},style:{opacity:.3}},...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{color:t,variant:`buffer`},style:{backgroundColor:wb(e,t),...pf(e,`transform`,{duration:`.${hb}s`,easing:`linear`})}})),{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:bb||{animation:`${yb} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:t}]:[]]}})),kb=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiLinearProgress`}),{className:r,color:i=`primary`,max:a,min:o,value:s,valueBuffer:c,variant:l=`indeterminate`,...u}=n,d={...n,color:i,variant:l},f=o??0,p=a??100,m=Cb(d),h=Wc(),g={},_={bar1:{},bar2:{}};if((l===`determinate`||l===`buffer`)&&s!==void 0){let e=p-f,t=(s-f)/e*100-100;h&&(t=-t),_.bar1.transform=e>0?`translateX(${t}%)`:`translateX(-100%)`,g[`aria-valuenow`]=s,g[`aria-valuemin`]=f,g[`aria-valuemax`]=p}if(l===`buffer`&&c!==void 0){let e=p-f,t=(c-f)/e*100-100;h&&(t=-t),_.bar2.transform=e>0?`translateX(${t}%)`:`translateX(-100%)`}return(0,H.jsxs)(Tb,{className:U(m.root,r),ownerState:d,role:`progressbar`,...g,ref:t,...u,children:[l===`buffer`?(0,H.jsx)(Eb,{className:m.dashed,ownerState:d}):null,(0,H.jsx)(Db,{className:m.bar1,ownerState:d,style:_.bar1}),l===`determinate`?null:(0,H.jsx)(Ob,{className:m.bar2,ownerState:d,style:_.bar2})]})});function Ab(e){return Zs(`MuiLink`,e)}var jb=Qs(`MuiLink`,[`root`,`underlineNone`,`underlineHover`,`underlineAlways`,`button`,`focusVisible`]),Mb=({theme:e,ownerState:t})=>{let n=t.color;if(`colorSpace`in e&&e.colorSpace){let r=Ro(e,`palette.${n}.main`)||Ro(e,`palette.${n}`)||t.color;return e.alpha(r,.4)}let r=Ro(e,`palette.${n}.main`,!1)||Ro(e,`palette.${n}`,!1)||t.color,i=Ro(e,`palette.${n}.mainChannel`)||Ro(e,`palette.${n}Channel`);return`vars`in e&&i?`rgba(${i} / 0.4)`:kc(r,.4)},Nb={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Pb=e=>{let{classes:t,component:n,focusVisible:r,underline:i}=e;return El({root:[`root`,`underline${K(i)}`,n===`button`&&`button`,r&&`focusVisible`]},Ab,t)},Fb=G(q,{name:`MuiLink`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`underline${K(n.underline)}`],n.component===`button`&&t.button]}})(Wd(({theme:e})=>({...e.focusVisible&&{[`&.${jb.focusVisible}`]:{...bu,...e.focusVisible}},variants:[{props:{underline:`none`},style:{textDecoration:`none`}},{props:{underline:`hover`},style:{textDecoration:`none`,"&:hover":{textDecoration:`underline`}}},{props:{underline:`always`},style:{textDecoration:`underline`,"&:hover":{textDecorationColor:`inherit`}}},{props:({underline:e,ownerState:t})=>e===`always`&&t.color!==`inherit`,style:{textDecorationColor:`var(--Link-underlineColor)`}},{props:({underline:e,ownerState:t})=>e===`always`&&t.color===`inherit`,style:e.colorSpace?{textDecorationColor:e.alpha(`currentColor`,.4)}:null},...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{underline:`always`,color:t},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette[t].main,.4)}})),{props:{underline:`always`,color:`textPrimary`},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.primary,.4)}},{props:{underline:`always`,color:`textSecondary`},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.secondary,.4)}},{props:{underline:`always`,color:`textDisabled`},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:`button`},style:{position:`relative`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,"&::-moz-focus-inner":{borderStyle:`none`},...!e.focusVisible&&{[`&.${jb.focusVisible}`]:{outline:`auto`}}}}]}))),Ib=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiLink`}),r=zd(),{className:i,color:a=`primary`,component:o=`a`,onBlur:s,onFocus:c,TypographyClasses:l,underline:u=`always`,variant:d=`inherit`,sx:f,...p}=n,[m,h]=L.useState(!1),g=e=>{lm(e.target)||h(!1),s&&s(e)},_=e=>{lm(e.target)&&h(!0),c&&c(e)},v={...n,color:a,component:o,focusVisible:m,underline:u,variant:d},y=Pb(v);return(0,H.jsx)(Fb,{color:a,className:U(y.root,i),classes:l,component:o,onBlur:g,onFocus:_,ref:t,ownerState:v,variant:d,...p,sx:[...Nb[a]===void 0?[{color:a}]:[],...Array.isArray(f)?f:[f]],style:{...p.style,...u===`always`&&a!==`inherit`&&!Nb[a]&&{"--Link-underlineColor":Mb({theme:r,ownerState:v})}}})}),Lb=L.createContext({});function Rb(e){return Zs(`MuiList`,e)}Qs(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var zb=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return El({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},Rb,t)},Bb=G(`ul`,{name:`MuiList`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:`none`,margin:0,padding:0,position:`relative`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0,isolation:`isolate`}}]}),Vb=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=L.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=zb(d);return(0,H.jsx)(Lb.Provider,{value:u,children:(0,H.jsxs)(Bb,{as:a,className:U(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})});function Hb(e){return Zs(`MuiListItem`,e)}Qs(`MuiListItem`,[`root`,`dense`,`alignItemsFlexStart`,`divider`,`gutters`,`padding`,`secondaryAction`]);var Ub=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems===`flex-start`&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Wb=e=>{let{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:a,divider:o,selected:s}=e,c=El({root:[`root`,r&&`dense`,!a&&`gutters`,o&&`divider`,i&&`disabled`,t===`flex-start`&&`alignItemsFlexStart`,s&&`selected`]},Pf,n);return{...n,...c}},Gb=G(Em,{shouldForwardProp:e=>Hd(e)||e===`classes`,name:`MuiListItemButton`,slot:`Root`,overridesResolver:Ub})(Wd(({theme:e})=>({display:`flex`,flexGrow:1,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minWidth:0,boxSizing:`border-box`,textAlign:`left`,paddingTop:8,paddingBottom:8,...pf(e,`background-color`,{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${Ff.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),...!e.focusVisible&&{[`&.${Ff.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},[`&.${Ff.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},...e.focusVisible?Su(1):{[`&.${Ff.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus}},[`&.${Ff.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:{alignItems:`flex-start`},style:{alignItems:`flex-start`}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]}))),Kb=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiListItemButton`}),{alignItems:r=`center`,autoFocus:i=!1,component:a=`div`,children:o,dense:s=!1,disableGutters:c=!1,divider:l=!1,focusVisibleClassName:u,selected:d=!1,className:f,...p}=n,m=L.useContext(Lb),h=L.useMemo(()=>({dense:s||m.dense||!1,alignItems:r,disableGutters:c}),[r,m.dense,s,c]),g=L.useRef(null);qd(()=>{i&&g.current&&g.current.focus()},[i]);let _={...n,alignItems:r,dense:h.dense,disableGutters:c,divider:l,selected:d},v=Wb(_),{root:y,...b}=v,x=Kd(g,t);return(0,H.jsx)(Lb.Provider,{value:h,children:(0,H.jsx)(Gb,{ref:x,href:p.href||p.to,component:(p.href||p.to)&&a===`div`?`button`:a,internalNativeButton:!1,focusVisibleClassName:U(v.focusVisible,u),ownerState:_,className:U(v.root,f),...p,classes:b,children:o})})});function qb(e){return Zs(`MuiListItemSecondaryAction`,e)}Qs(`MuiListItemSecondaryAction`,[`root`,`disableGutters`]);var Jb=e=>{let{disableGutters:t,classes:n}=e;return El({root:[`root`,t&&`disableGutters`]},qb,n)},Yb=G(`div`,{name:`MuiListItemSecondaryAction`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:`absolute`,right:16,top:`50%`,transform:`translateY(-50%)`,variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),Xb=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiListItemSecondaryAction`}),{className:r,component:i,...a}=n,o=L.useContext(Lb),s={...n,disableGutters:o.disableGutters},c=Jb(s);return(0,H.jsx)(Yb,{as:i,className:U(c.root,r),ownerState:s,ref:t,...a})});Xb.muiName=`ListItemSecondaryAction`;var Zb=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems===`flex-start`&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding]},Qb=e=>{let{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:a,divider:o}=e;return El({root:[`root`,r&&`dense`,!i&&`gutters`,!a&&`padding`,o&&`divider`,t===`flex-start`&&`alignItemsFlexStart`],secondaryAction:[`secondaryAction`]},Hb,n)},$b=G(`div`,{name:`MuiListItem`,slot:`Root`,overridesResolver:Zb})(Wd(({theme:e})=>({display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,width:`100%`,boxSizing:`border-box`,textAlign:`left`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${Ff.root}`]:{paddingRight:48}}},{props:{alignItems:`flex-start`},style:{alignItems:`flex-start`}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>e.button,style:{...pf(e,`background-color`,{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}}}}]}))),ex=G(Xb,{name:`MuiListItem`,slot:`secondaryAction`})({}),tx=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiListItem`}),{alignItems:r=`center`,children:i,className:a,component:o=`li`,dense:s=!1,disableGutters:c=!1,disablePadding:l=!1,divider:u=!1,secondaryAction:d,slotProps:f={},slots:p={},...m}=n,h=L.useContext(Lb),g=L.useMemo(()=>({dense:s||h.dense||!1,alignItems:r,disableGutters:c}),[r,h.dense,s,c]),_={...n,alignItems:r,dense:g.dense,disableGutters:c,disablePadding:l,divider:u,secondaryAction:d},v=Qb(_),y={slots:p,slotProps:f},[b,x]=Up(`root`,{ref:t,elementType:$b,externalForwardedProps:{component:o,...y,...m},ownerState:_,className:U(v.root,a)}),[S,C]=Up(`secondaryAction`,{elementType:ex,shouldForwardComponentProp:!0,externalForwardedProps:y,ownerState:_,className:v.secondaryAction});return(0,H.jsx)(Lb.Provider,{value:g,children:(0,H.jsxs)(b,{...x,children:[i,d&&(0,H.jsx)(S,{...C,children:d})]})})});function nx(e){return Zs(`MuiListItemIcon`,e)}var rx=Qs(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),ix=e=>{let{alignItems:t,classes:n}=e;return El({root:[`root`,t===`flex-start`&&`alignItemsFlexStart`]},nx,n)},ax=G(`div`,{name:`MuiListItemIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.alignItems===`flex-start`&&t.alignItemsFlexStart]}})(Wd(({theme:e})=>({minWidth:e.spacing(4.5),color:(e.vars||e).palette.action.active,flexShrink:0,display:`inline-flex`,variants:[{props:{alignItems:`flex-start`},style:{marginTop:8}}]}))),ox=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiListItemIcon`}),{className:r,...i}=n,a=L.useContext(Lb),o={...n,alignItems:a.alignItems},s=ix(o);return(0,H.jsx)(ax,{className:U(s.root,r),ownerState:o,ref:t,...i})});function sx(e){return Zs(`MuiListItemText`,e)}var cx=Qs(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]),lx=e=>{let{classes:t,inset:n,primary:r,secondary:i,dense:a}=e;return El({root:[`root`,n&&`inset`,a&&`dense`,r&&i&&`multiline`],primary:[`primary`],secondary:[`secondary`]},sx,t)},ux=G(`div`,{name:`MuiListItemText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${cx.primary}`]:t.primary},{[`& .${cx.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:`1 1 auto`,minWidth:0,marginTop:4,marginBottom:4,[`.${hh.root}:where(& .${cx.primary})`]:{display:`block`},[`.${hh.root}:where(& .${cx.secondary})`]:{display:`block`},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),dx=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiListItemText`}),{children:r,className:i,disableTypography:a=!1,inset:o=!1,primary:s,secondary:c,slots:l={},slotProps:u={},...d}=n,{dense:f}=L.useContext(Lb),p=s??r,m=c,h={...n,disableTypography:a,inset:o,primary:!!p,secondary:!!m,dense:f},g=lx(h),_={slots:l,slotProps:u},[v,y]=Up(`root`,{className:U(g.root,i),elementType:ux,externalForwardedProps:{..._,...d},ownerState:h,ref:t}),[b,x]=Up(`primary`,{className:g.primary,elementType:q,externalForwardedProps:_,ownerState:h}),[S,C]=Up(`secondary`,{className:g.secondary,elementType:q,externalForwardedProps:_,ownerState:h});return p!=null&&p.type!==q&&!a&&(p=(0,H.jsx)(b,{variant:f?`body2`:`body1`,component:x?.variant?void 0:`span`,...x,children:p})),m!=null&&m.type!==q&&!a&&(m=(0,H.jsx)(S,{variant:`body2`,color:`textSecondary`,...C,children:m})),(0,H.jsxs)(v,{...y,children:[p,m]})}),fx=L.createContext(void 0);function px(){let e=L.useContext(fx);if(e===void 0)throw Error(`MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.`);return e}var mx=Object.is;function hx(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(let r in e)if(n+=1,!mx(e[r],t[r])||!(r in t))return!1;for(let e in t)r+=1;return n===r}var gx=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`,`Home`,`End`];function _x(e){let{activeItemId:t,getDefaultActiveItemId:n,orientation:r,isRtl:i=!1,isItemFocusable:a=jx,wrap:o=!0}=e,[s,c]=L.useState(t),[l,u]=L.useState(t),d=s;t!==l&&(u(t),t!==void 0&&t!==s&&(d=t,c(t)));let f=L.useRef(null),p=L.useRef(new Map),[m,h]=L.useState(0),g=L.useMemo(()=>Ox(p.current),[m]),_=yx(d,g,a,n),v=L.useRef(_);v.current=_;let y=L.useCallback(()=>{let e=Ox(p.current);return Tx(e,yx(v.current,e,a,n))},[n,a]),b=L.useCallback(()=>p.current,[]),x=Dd(e=>{hx(p.current.get(e.id)??null,e)||(p.current.set(e.id,e),h(e=>e+1))}),S=Dd(e=>{p.current.delete(e)&&h(e=>e+1)}),C=Dd(e=>{c(e)}),w=L.useCallback(e=>v.current===e,[]),T=L.useCallback((e,t,n,r)=>{let i=Cx(kx(p.current),e,t,n,r??a);return i?(i.element?.focus(),c(i.id),i):null},[a]),E=L.useCallback((e,t,n)=>({onFocus:e=>{t?.(e);let n=kx(p.current),r=Dx(n,e.target);r!==-1&&c(n[r].id)},onKeyDown:e=>{if(n?.(e),e.defaultPrevented||e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||!gx.includes(e.key))return;let t=r===`horizontal`?`ArrowLeft`:`ArrowUp`,a=r===`horizontal`?`ArrowRight`:`ArrowDown`;r===`horizontal`&&i&&(t=`ArrowRight`,a=`ArrowLeft`);let s=kx(p.current),c=Yd(Od(f.current)),l=c===f.current,u=Sx(s,c,v.current),d=`next`;switch(e.key){case t:d=`previous`,e.preventDefault(),l&&(u=s.length);break;case a:e.preventDefault(),l&&(u=-1);break;case`Home`:e.preventDefault(),u=-1;break;case`End`:e.preventDefault(),d=`previous`,u=s.length;break;default:return}T(u,d,o)},ref:Px(e,e=>{f.current=e})}),[T,i,r,o]),D=L.useCallback(e=>{let t=kx(p.current),n=Yd(Od(f.current)),r=n===f.current?-1:Sx(t,n,v.current);return T(r,`next`,!0,e)?.id??null},[T]);return L.useMemo(()=>({activeItemId:_,focusNext:D,getActiveItem:y,getContainerProps:E,getItemMap:b,isItemActive:w,registerItem:x,setActiveItemId:C,unregisterItem:S}),[_,D,y,E,b,w,x,C,S])}function vx(e){let{activeItemId:t,registerItem:n,unregisterItem:r}=px(),i=L.useRef(null),a=L.useMemo(()=>({disabled:e.disabled??!1,element:null,focusableWhenDisabled:e.focusableWhenDisabled??!1,id:e.id,selected:e.selected??!1,textValue:e.textValue}),[e.disabled,e.focusableWhenDisabled,e.id,e.selected,e.textValue]),o=L.useRef(a);o.current=a;let s=L.useCallback(t=>{if(i.current=t,t==null){queueMicrotask(()=>{i.current??r(e.id)});return}n({...o.current,element:t})},[e.id,n,r]),c=Ed(e.ref,s);return mc(()=>{i.current&&n({...a,element:i.current})},[a,n]),mc(()=>{let t=e.id;return()=>{r(t)}},[e.id,r]),{ref:c,tabIndex:t===e.id?0:-1}}function yx(e,t,n,r){return e==null?xx(t,n,r):bx(e,t,n)}function bx(e,t,n){let r=Ex(t,e);return r===-1?wx(t,n):n(t[r])?t[r].id:Cx(t,r,`next`,!1,n)?.id??null}function xx(e,t,n){let r=n?.(e);if(r!=null){let n=Tx(e,r);if(n&&t(n))return n.id}return wx(e,t)}function Sx(e,t,n){if(t){let n=Dx(e,t);if(n!==-1)return n}return Ex(e,n)}function Cx(e,t,n,r,i){let a=e.length-1;if(a===-1)return null;let o=!1,s=Ax(t,a,n,r),c=s;for(;s!==-1;){if(s===c){if(o)return null;o=!0}let t=e[s];if(!t||!i(t))s=Ax(s,a,n,r);else return t}return null}function wx(e,t){return e.find(e=>t(e))?.id??null}function Tx(e,t){return t==null?null:e.find(e=>e.id===t)??null}function Ex(e,t){return t==null?-1:e.findIndex(e=>e.id===t)}function Dx(e,t){return t?e.findIndex(e=>e.element===t||e.element?.contains(t)):-1}function Ox(e){let t=Array.from(e.values());if(t.every(e=>e.element==null))return t;let n=t.filter(Mx).sort((e,t)=>Nx(e.element,t.element)),r=t.filter(e=>!Mx(e));return[...n,...r]}function kx(e){return Ox(e).filter(Mx)}function Ax(e,t,n,r=!0){return n===`next`?e===t?r?0:-1:e+1:e===0?r?t:-1:e-1}function jx(e){return e.element?e.focusableWhenDisabled?!0:!e.disabled&&!e.element.hasAttribute(`disabled`)&&e.element.getAttribute(`aria-disabled`)!==`true`&&e.element.hasAttribute(`tabindex`):!1}function Mx(e){return e.element!=null&&e.element.isConnected}function Nx(e,t){if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function Px(...e){return t=>{e.forEach(e=>{dp(e??null,t)})}}var Fx=Zv;function Ix(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}function Lx(e){return e?e.type===`mousedown`||e.type===`pointerdown`||e.type===`touchstart`?`pointer`:e.type===`keydown`||e.type===`click`&&e.detail===0?`keyboard`:null:null}function Rx(e){return e==null||typeof e==`string`&&!e.trim()}function zx(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var Bx=L.createContext(null);function Vx(){return L.useContext(Bx)}var Hx=Bx.Provider,Ux=L.createContext(void 0);function Wx(){let e=L.useContext(Ux);if(e===void 0)throw Error(`MUI: MenuListContext is missing. MenuItems must be placed within Menu or MenuList.`);return e}function Gx(e){let t=e?.element??e;if(!t)return``;if(e?.textValue!==void 0)return e.textValue;let n=t.innerText;return n===void 0&&(n=t.textContent),n??``}function Kx(e,t){if(t===void 0)return!0;let n=Gx(e);return n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(``))}function qx(e,t){return Kx(e,t)?jx(e):!1}function Jx(e,t){Ix(e,t)}var Yx=L.forwardRef(function(e,t){let{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:o,disabledItemsFocusable:s=!1,disableListWrap:c=!1,onKeyDown:l,variant:u=`selectedMenu`,...d}=e,f=L.useRef(null),p=L.useRef(!1),[m,h]=L.useState(!1),g=Vx(),_=L.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null}),v=_x({activeItemId:void 0,getDefaultActiveItemId:L.useCallback(e=>u===`selectedMenu`?e.find(e=>e.selected&&jx(e))?.id??e.find(e=>jx(e))?.id??null:e.find(e=>jx(e))?.id??null,[u]),orientation:`vertical`,wrap:!c}),{activeItemId:y,focusNext:b,getActiveItem:x,getContainerProps:S,getItemMap:C}=v,w=hp((e=!1)=>{if(!f.current||!e&&p.current)return null;if(i){let e=x();if(e?.element){let t=Array.from(C().values()).some(e=>e.selected),n=u===`menu`&&t&&!e.selected&&g==null;return h(n),Jx(e.element,g),p.current=!0,e.element}return r?(h(!1),f.current.focus(),f.current):null}return r?(h(!1),f.current.focus(),p.current=!0,f.current):(h(!1),null)});qd(()=>{if(!r&&!i){p.current=!1,h(!1);return}w()},[y,i,r,w]),L.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=up(e),r=Fx(n);if(r>0){let e=`${r}px`,i=t===`rtl`?`paddingLeft`:`paddingRight`,a=parseFloat(n.getComputedStyle(f.current)[i])||0;f.current.style[i]=`${a+r}px`,f.current.style.width=`calc(100% + ${e})`}}return f.current},focusInitialTarget:()=>{if(!f.current)return null;let e=Xd(Jd(f.current));return e&&ay(f.current,e)?e:w(!0)}}),[w]);let T=S(void 0,d.onFocus),E=Kd(f,T.ref,t),D=L.useMemo(()=>({itemsFocusableWhenDisabled:s,suppressInitialFocusVisible:m,variant:u}),[s,m,u]),O=hp(e=>{if(m&&h(!1),(e.ctrlKey||e.metaKey||e.altKey)&&l){l(e);return}if(T.onKeyDown(e),e.key.length===1){let t=_.current,n=e.key.toLowerCase(),r=performance.now();t.keys.length>0&&(r-t.lastTime>500?(t.keys=[],t.repeating=!0,t.previousKeyMatched=!0):t.repeating&&n!==t.keys[0]&&(t.repeating=!1)),t.lastTime=r,t.keys.push(n);let i=Xd(Jd(f.current)),a=i&&!t.repeating&&Kx(i,t);t.previousKeyMatched&&(a||b(e=>qx(e,t))!=null)?e.preventDefault():t.previousKeyMatched=!1}l&&l(e)});return(0,H.jsx)(Vb,{role:`menu`,ref:E,className:o,onKeyDown:O,tabIndex:-1,...d,onFocus:T.onFocus,children:(0,H.jsx)(Ux.Provider,{value:D,children:(0,H.jsx)(fx.Provider,{value:v,children:a})})})});function Xx(e){return Zs(`MuiPopover`,e)}Qs(`MuiPopover`,[`root`,`paper`]);function Zx(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function Qx(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function $x(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function eS(e){return typeof e==`function`?e():e}var tS=e=>{let{classes:t}=e;return El({root:[`root`],paper:[`paper`]},Xx,t)},nS=G(dy,{name:`MuiPopover`,slot:`Root`})({}),rS=G(Qp,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),iS=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiPopover`}),{action:r,anchorEl:i,anchorOrigin:a={vertical:`top`,horizontal:`left`},anchorPosition:o,anchorReference:s=`anchorEl`,children:c,className:l,container:u,disableAutoFocus:d=!1,elevation:f=8,marginThreshold:p=16,open:m,slots:h={},slotProps:g={},transformOrigin:_={vertical:`top`,horizontal:`left`},transitionDuration:v=`auto`,disableScrollLock:y=!1,...b}=n,x=L.useRef(),S={...n,anchorOrigin:a,anchorReference:s,elevation:f,marginThreshold:p,transformOrigin:_,transitionDuration:v},C=tS(S),w=L.useCallback(()=>{if(s===`anchorPosition`)return o;let e=eS(i),t=(e&&e.nodeType===1?e:Jd(x.current).body).getBoundingClientRect();return{top:t.top+Zx(t,a.vertical),left:t.left+Qx(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),T=L.useCallback(e=>({vertical:Zx(e,_.vertical),horizontal:Qx(e,_.horizontal)}),[_.horizontal,_.vertical]),E=L.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=T(t);if(s===`none`)return{top:null,left:null,transformOrigin:$x(n)};let r=w(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=up(eS(i)),d=u.innerHeight-p,f=u.innerWidth-p;if(p!=null&&a<p){let e=a-p;a-=e,n.vertical+=e}else if(p!=null&&c>d){let e=c-d;a-=e,n.vertical+=e}if(p!=null&&o<p){let e=o-p;o-=e,n.horizontal+=e}else if(l>f){let e=l-f;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:$x(n)}},[i,s,w,T,p]),[D,O]=L.useState(m),ee=L.useCallback(()=>{let e=x.current;if(!e)return;let t=E(e);t.top!=null&&e.style.setProperty(`top`,t.top),t.left!=null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,O(!0)},[E]);L.useEffect(()=>(y&&window.addEventListener(`scroll`,ee),()=>window.removeEventListener(`scroll`,ee)),[i,y,ee]);let te=()=>{ee()},k=()=>{O(!1)};L.useEffect(()=>{m&&ee()}),L.useImperativeHandle(r,()=>m?{updatePosition:()=>{ee()}}:null,[m,ee]),L.useEffect(()=>{if(!m)return;let e=cp(()=>{ee()}),t=up(eS(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,m,ee]);let A=v,j={slots:h,slotProps:g},[M,ne]=Up(`transition`,{elementType:Zy,externalForwardedProps:j,ownerState:S,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),te()},onExited:t=>{e.onExited?.(t),k()}}),additionalProps:{appear:!0,in:m}});v===`auto`&&!M.muiSupportAuto&&(A=void 0);let re=u||(i?Jd(eS(i)).body:void 0),[ie,{slots:ae,slotProps:N,...oe}]=Up(`root`,{ref:t,elementType:nS,externalForwardedProps:{...j,...b},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:_p(typeof g.backdrop==`function`?g.backdrop(S):g.backdrop,{invisible:!0})},container:re,open:m},ownerState:S,className:U(C.root,l)}),[se,ce]=Up(`paper`,{ref:x,className:C.paper,elementType:rS,externalForwardedProps:j,shouldForwardComponentProp:!0,additionalProps:{elevation:f,style:D?void 0:{opacity:0}},ownerState:S});return(0,H.jsx)(ie,{...oe,...!wd(ie)&&{slots:ae,slotProps:N,disableAutoFocus:d,disableScrollLock:y},children:(0,H.jsx)(M,{...ne,timeout:A,children:(0,H.jsx)(se,{...ce,children:c})})})});function aS(e){return Zs(`MuiMenu`,e)}Qs(`MuiMenu`,[`root`,`paper`,`list`]);var oS={vertical:`top`,horizontal:`right`},sS={vertical:`top`,horizontal:`left`},cS=e=>{let{classes:t}=e;return El({root:[`root`],paper:[`paper`],list:[`list`]},aS,t)},lS=G(iS,{shouldForwardProp:e=>Hd(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),uS=G(rS,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),dS=G(Yx,{name:`MuiMenu`,slot:`List`})({outline:0}),fS=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiMenu`}),{autoFocus:r=!0,children:i,className:a,disableAutoFocusItem:o=!1,onClose:s,open:c,PopoverClasses:l,transitionDuration:u=`auto`,variant:d=`selectedMenu`,slots:f={},slotProps:p={},...m}=n,h=Wc(),g={...n,autoFocus:r,disableAutoFocusItem:o,transitionDuration:u,variant:d},_=cS(g),v=r&&c,y=v&&!o,b=L.useRef(null),x=(e,t)=>{b.current&&(b.current.adjustStyleForScrollbar(e,{direction:h?`rtl`:`ltr`}),v&&b.current.focusInitialTarget?.())},S=e=>{e.key===`Tab`&&(e.preventDefault(),s&&s(e,`tabKeyDown`))},C={slots:f,slotProps:p},w=m_({elementType:f.root,externalSlotProps:p.root,ownerState:g,className:[_.root,a]}),[T,E]=Up(`paper`,{className:_.paper,elementType:uS,externalForwardedProps:C,shouldForwardComponentProp:!0,ownerState:g}),[D,O]=Up(`list`,{className:_.list,elementType:dS,shouldForwardComponentProp:!0,externalForwardedProps:C,getSlotProps:e=>({...e,onKeyDown:t=>{S(t),e.onKeyDown?.(t)}}),ownerState:g}),ee=typeof p.transition==`function`?p.transition(g):p.transition;return(0,H.jsx)(lS,{disableAutoFocus:r,onClose:s,anchorOrigin:{vertical:`bottom`,horizontal:h?`right`:`left`},transformOrigin:h?oS:sS,slots:{root:f.root,paper:T,backdrop:f.backdrop,transition:f.transition},slotProps:{root:w,paper:E,backdrop:typeof p.backdrop==`function`?p.backdrop(g):p.backdrop,transition:{...ee,onEntering:(...e)=>{x(...e),ee?.onEntering?.(...e)}}},open:c,ref:t,transitionDuration:u,ownerState:g,...m,classes:l,children:(0,H.jsx)(D,{actions:b,autoFocus:v,autoFocusItem:y,variant:d,...O,children:i})})}),pS=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},mS=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=El({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},If,o);return{...o,...s}},hS=G(Em,{shouldForwardProp:e=>Hd(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:pS})(Wd(({theme:e})=>({...e.typography.body1,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:`border-box`,whiteSpace:`nowrap`,"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${Lf.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),...!e.focusVisible&&{[`&.${Lf.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},[`&.${Lf.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},...e.focusVisible?Su(1):{[`&.${Lf.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus}},[`&.${Lf.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${_y.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${_y.inset}`]:{marginLeft:52},[`& .${cx.root}`]:{marginTop:0,marginBottom:0},[`& .${cx.inset}`]:{paddingLeft:36},[`& .${rx.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up(`sm`)]:{minHeight:`auto`}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${rx.root} svg`]:{fontSize:`1.25rem`}}}]}))),gS=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiMenuItem`}),{autoFocus:r=!1,component:i=`li`,dense:a=!1,divider:o=!1,disableGutters:s=!1,focusVisibleClassName:c,role:l=`menuitem`,tabIndex:u,className:d,...f}=n,p=l===`menuitemcheckbox`||l===`menuitemradio`?!!n.selected:void 0,m=Vx(),h=L.useContext(Lb),g=L.useMemo(()=>({dense:a||h.dense||!1,disableGutters:s}),[h.dense,a,s]),_=Wx(),v=fp(),y=_.suppressInitialFocusVisible,b=_.itemsFocusableWhenDisabled,x=L.useRef(null);qd(()=>{r&&x.current&&Ix(x.current,m)},[r]);let S={...n,dense:g.dense,divider:o,disableGutters:s},C=mS(n),{root:w,...T}=C,E=vx({id:v,ref:t,disabled:n.disabled,focusableWhenDisabled:b,selected:n.selected}),D=Kd(x,E.ref),O;return u===void 0?_.variant===`selectedMenu`?O=E.tabIndex:(!n.disabled||b)&&(O=-1):O=u,(0,H.jsx)(Lb.Provider,{value:g,children:(0,H.jsx)(hS,{ref:D,role:l,"aria-checked":p,tabIndex:O,component:i,internalNativeButton:!1,focusableWhenDisabled:b,suppressFocusVisible:y,focusVisibleClassName:U(C.focusVisible,c),className:U(C.root,d),...f,ownerState:S,classes:T})})}),_S=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return El({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${K(n)}`,a&&`iconOpen`,r&&`disabled`]},Rf,t)},vS=G(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${zf.disabled}`]:{cursor:`default`},"&[multiple]":{height:`auto`},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},[`& ~ .${ab.root}`]:{position:`absolute`,top:`50%`,transform:`translateY(-50%)`,right:`calc(var(--_caret, 24px) + (var(--_endAdornment, 28px) - 1.5rem)/2)`},[`.${tf.root}:has(> &)`]:{"--_endAdornment":`0px`},variants:[{props:({ownerState:e})=>e.variant!==`filled`&&e.variant!==`outlined`,style:{[`.${tf.root}:has(> &)`]:{"--_caret":`24px`},[`.${tf.root}:has(> & ~ .${ab.root})`]:{"--_endAdornment":`28px`},"&&&":{paddingRight:`calc(var(--_caret, 24px) + var(--_endAdornment, 0px))`,minWidth:16}}},{props:{variant:`filled`},style:{[`.${tf.root}:has(> &)`]:{"--_caret":`32px`},[`.${tf.root}:has(> & ~ .${ab.root})`]:{"--_endAdornment":`28px`},"&&&":{paddingRight:`calc(var(--_caret, 32px) + var(--_endAdornment, 0px))`}}},{props:{variant:`outlined`},style:{[`.${tf.root}:has(> &)`]:{"--_caret":`32px`},[`.${tf.root}:has(> & ~ .${ab.root})`]:{"--_endAdornment":`28px`},borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:`calc(var(--_caret, 32px) + var(--_endAdornment, 0px))`}}}]})),yS=G(vS,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:Hd,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${zf.multiple}`]:t.multiple}]}})({}),bS=G(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${zf.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:`rotate(180deg)`}},{props:{variant:`filled`},style:{right:7}},{props:{variant:`outlined`},style:{right:7}}]})),xS=G(bS,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${K(n.variant)}`],n.open&&t.iconOpen]}})({}),SS=L.forwardRef(function(e,t){let{className:n,disabled:r,error:i,IconComponent:a,inputRef:o,variant:s=`standard`,...c}=e,l={...e,disabled:r,variant:s,error:i},u=_S(l);return(0,H.jsxs)(L.Fragment,{children:[(0,H.jsx)(yS,{ownerState:l,className:U(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,H.jsx)(xS,{as:a,ownerState:l,className:u.icon})]})}),CS,wS=G(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:Hd})({textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`}),TS=G(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:Hd})(Wd(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:`11px`,...pf(e,`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,...pf(e,`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:`100%`,...pf(e,`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function ES(e){let{children:t,classes:n,className:r,label:i,notched:a,...o}=e,s=i!=null&&i!==``,c={...e,notched:a,withLabel:s};return(0,H.jsx)(wS,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,H.jsx)(TS,{ownerState:c,children:s?(0,H.jsx)(`span`,{children:i}):CS||=(0,H.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``})})})}var DS=e=>{let{classes:t}=e,n=El({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},Bf,t);return{...t,...n}},OS=G(bf,{shouldForwardProp:e=>Hd(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:_f})(Wd(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{position:`relative`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Vf.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Vf.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Vf.focused} .${Vf.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{color:t},style:{[`&.${Vf.focused} .${Vf.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Vf.error} .${Vf.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Vf.disabled} .${Vf.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{"--_trailingPad":`14px`,paddingRight:`var(--_trailingPad)`,[`&.${Sy.root}`]:{"--_trailingPad":`0px`}}},{props:({ownerState:e})=>e.multiline,style:{padding:`16.5px 14px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{padding:`8.5px 14px`}}]}})),kS=G(ES,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(Wd(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),AS=G(xf,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:vf})(Wd(({theme:e})=>({padding:`16.5px 14px`,"&:-webkit-autofill":{...!e.vars&&{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`},borderRadius:`inherit`,...e.vars&&e.applyStyles(`dark`,{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`})},variants:[{props:{size:`small`},style:{padding:`8.5px 14px`}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),jS=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiOutlinedInput`}),{fullWidth:r=!1,inputComponent:i=`input`,label:a,multiline:o=!1,notched:s,slots:c={},slotProps:l={},type:u=`text`,...d}=n,f=DS(n),[p,m]=Ld({props:n,states:[`color`,`disabled`,`error`,`focused`,`hiddenLabel`,`size`,`required`]}),h={...n,color:p.color||`primary`,disabled:p.disabled,error:p.error,focused:p.focused,formControl:m,fullWidth:r,hiddenLabel:p.hiddenLabel,multiline:o,size:p.size,type:u},g=c.root??OS,_=c.input??AS,[v,y]=Up(`notchedOutline`,{elementType:kS,className:f.notchedOutline,shouldForwardComponentProp:!0,ownerState:h,externalForwardedProps:{slots:c,slotProps:l},additionalProps:{label:a!=null&&a!==``&&p.required?(0,H.jsxs)(L.Fragment,{children:[a,` `,`*`]}):a}});return(0,H.jsx)(Cf,{slots:{root:g,input:_},slotProps:l,renderSuffix:e=>(0,H.jsx)(v,{...y,notched:s===void 0?!!(e.startAdornment||e.filled||e.focused):s}),fullWidth:r,inputComponent:i,multiline:o,ref:t,type:u,...d,classes:{...f,notchedOutline:null}})});jS.muiName=`Input`;var MS=sp((0,H.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),`RadioButtonUnchecked`),NS=sp((0,H.jsx)(`path`,{d:`M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z`}),`RadioButtonChecked`),PS=G(`span`,{name:`MuiRadioButtonIcon`,shouldForwardProp:Hd})({position:`relative`,display:`flex`}),FS=G(MS,{name:`MuiRadioButtonIcon`})({transform:`scale(1)`}),IS=G(NS,{name:`MuiRadioButtonIcon`})(Wd(({theme:e})=>({left:0,position:`absolute`,transform:`scale(0)`,...pf(e,`transform`,{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:`scale(1)`,...pf(e,`transform`,{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}}]})));function LS(e){let{checked:t=!1,classes:n={},fontSize:r}=e,i={...e,checked:t};return(0,H.jsxs)(PS,{className:n.root,ownerState:i,children:[(0,H.jsx)(FS,{fontSize:r,className:n.background,ownerState:i}),(0,H.jsx)(IS,{fontSize:r,className:n.dot,ownerState:i})]})}var RS=L.createContext(void 0);function zS(){return L.useContext(RS)}var BS=e=>{let{classes:t,color:n,size:r}=e,i={root:[`root`,`color${K(n)}`,r!==`medium`&&`size${K(r)}`]};return{...t,...El(i,Hf,t)}},VS=G(Nv,{shouldForwardProp:e=>Hd(e)||e===`classes`,name:`MuiRadio`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size!==`medium`&&t[`size${K(n.size)}`],t[`color${K(n.color)}`]]}})(Wd(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.focusVisible&&{[`&.${Cm.focusVisible} svg:first-of-type`]:{...bu,borderRadius:99,...e.focusVisible}},[`&.${Uf.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:`default`,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{color:t,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{color:t,disabled:!1},style:{[`&.${Uf.checked}`]:{color:(e.vars||e).palette[t].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]})));function HS(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var US=(0,H.jsx)(LS,{checked:!0}),WS=(0,H.jsx)(LS,{}),GS=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiRadio`}),{checked:r,checkedIcon:i=US,color:a=`primary`,icon:o=WS,name:s,onChange:c,size:l=`medium`,className:u,disabled:d,disableRipple:f=!1,slots:p={},slotProps:m={},...h}=n,g=Id(),_=d;g&&_===void 0&&(_=g.disabled),_??=!1;let v={...n,disabled:_,disableRipple:f,color:a,size:l},y=BS(v),b=zS(),x=r,S=np(c,b&&b.onChange),C=s;b&&(x===void 0&&(x=HS(b.value,n.value)),C===void 0&&(C=b.name));let w=m.input,[T,E]=Up(`root`,{ref:t,elementType:VS,className:U(y.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:p,slotProps:m,...h},getSlotProps:e=>({...e,onChange:(t,...n)=>{e.onChange?.(t,...n),S(t,...n)}}),ownerState:v,additionalProps:{type:`radio`,icon:L.cloneElement(o,{fontSize:o.props.fontSize??l}),checkedIcon:L.cloneElement(i,{fontSize:i.props.fontSize??l}),disabled:_,name:C,checked:x,disableRipple:n.disableRipple,slots:p,slotProps:{input:typeof w==`function`?w(v):w}}});return(0,H.jsx)(T,{...E,classes:y})});function KS(e){return Zs(`MuiRadioGroup`,e)}Qs(`MuiRadioGroup`,[`root`,`row`,`error`]);var qS=e=>{let{classes:t,row:n,error:r}=e;return El({root:[`root`,n&&`row`,r&&`error`]},KS,t)},JS=L.forwardRef(function(e,t){let{actions:n,children:r,className:i,defaultValue:a,name:o,onChange:s,value:c,...l}=e,u=L.useRef(null),d=qS(e),[f,p]=mp({controlled:c,default:a,name:`RadioGroup`});L.useImperativeHandle(n,()=>({focus:()=>{let e=u.current.querySelector(`input:not(:disabled):checked`);e||=u.current.querySelector(`input:not(:disabled)`),e&&e.focus()}}),[]);let m=Kd(t,u),h=fp(o),g=L.useMemo(()=>({name:h,onChange(e){p(e.target.value),s&&s(e,e.target.value)},value:f}),[h,s,p,f]);return(0,H.jsx)(RS.Provider,{value:g,children:(0,H.jsx)(Ry,{role:`radiogroup`,ref:m,className:U(d.root,i),...l,children:r})})}),YS={border:0,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,whiteSpace:`nowrap`,width:`1px`};function XS(e){return Object.prototype.hasOwnProperty.call(e.props,`value`)}function ZS(e){if(typeof e==`string`||typeof e==`number`)return String(e);let t=``;return L.Children.forEach(e,e=>{typeof e==`string`||typeof e==`number`?t+=String(e):L.isValidElement(e)&&(t+=ZS(e.props.children))}),t}function QS(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length;for(let n=0;n<e.length;n+=1){let i=(r+n)%e.length;if(e[i].label.startsWith(t))return i}return-1}function $S(e,t){return!e.some(e=>e.label[0]===t&&e.label[1]===t)}function eC(e,t){let n=[],r=-1;for(let i=0;i<e.length;i+=1){let a=e[i];if(!L.isValidElement(a)||!XS(a)||a.props.disabled)continue;let o=ZS(a.props.children).trim().toLowerCase();o!==``&&(r===-1&&zx(t,a.props.value)&&(r=n.length),n.push({child:a,label:o,value:a.props.value}))}return{options:n,selectedIndex:r}}var tC,nC=2,rC=400,iC=200,aC=750,oC=` `,sC=`ArrowUp`,cC=`ArrowDown`,lC=`Enter`;function uC(e,t){if(!t)return!1;if(e.composedPath().includes(t)||e.target?.nodeType&&t.contains(e.target))return!0;let n=t.getBoundingClientRect();return n.width===0&&n.height===0?!1:e.clientX>=n.left-nC&&e.clientX<=n.right+nC&&e.clientY>=n.top-nC&&e.clientY<=n.bottom+nC}var dC=G(vS,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${Sy.select}`]:t.select},{[`&.${Sy.select}`]:t[n.variant]},{[`&.${Sy.error}`]:t.error},{[`&.${Sy.multiple}`]:t.multiple}]}})({[`&.${Sy.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),fC=G(bS,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.open&&t.iconOpen]}})({}),pC=G(`input`,{shouldForwardProp:e=>Vd(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),mC=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return El({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},xy,t)},hC=L.forwardRef(function(e,t){let{"aria-describedby":n,"aria-label":r,autoFocus:i,autoWidth:a,children:o,className:s,defaultOpen:c,defaultValue:l,disabled:u,displayEmpty:d,error:f=!1,IconComponent:p,inputRef:m,labelId:h,MenuProps:g={},multiple:_,name:v,onBlur:y,onChange:b,onClose:x,onFocus:S,onKeyDown:C,onMouseDown:w,onOpen:T,open:E,readOnly:D,renderValue:O,required:ee,SelectDisplayProps:te={},tabIndex:k,type:A,value:j,variant:M=`standard`,...ne}=e,[re,ie]=mp({controlled:j,default:l,name:`Select`}),[ae,N]=mp({controlled:E,default:c,name:`Select`}),oe=L.useRef(null),se=L.useRef(null),ce=L.useRef(null),P=L.useRef(!1),le=L.useRef(!1),ue=L.useRef(null),F=L.useRef(!1),I=L.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),de=L.useRef({buffer:``,previousSearchIndex:null,matchedIndex:null}),fe=mm(),pe=mm(),me=mm(),[he,ge]=L.useState(null),{current:_e}=L.useRef(E!=null),[ve,ye]=L.useState(),[be,xe]=L.useState(null),R=Kd(t,m),z=L.useCallback(e=>{se.current=e,e&&ge(e)},[]),B=he?.parentNode;L.useImperativeHandle(R,()=>({focus:()=>{se.current.focus()},node:oe.current,value:re}),[re]);let Se=he!==null&&ae,Ce=L.useCallback(()=>{me.clear(),de.current.buffer=``,de.current.previousSearchIndex=null,de.current.matchedIndex=null},[me]);qd(()=>{P.current=Se,Se&&Ce()},[Se,Ce]);let we=L.useCallback(()=>{fe.clear(),pe.clear()},[fe,pe]),Te=L.useCallback(()=>{we(),F.current=!1,I.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},[we]),Ee=L.useCallback(()=>{ue.current&&=(ue.current(),null)},[]);L.useEffect(()=>{Se||(Te(),Ee())},[Se,Te,Ee]),L.useEffect(()=>()=>{Te(),Ee(),Ce()},[Te,Ee,Ce]),L.useEffect(()=>{if(!Se||!B||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{ye(B.clientWidth)});return e.observe(B),()=>{e.disconnect()}},[Se,B,a]),L.useEffect(()=>{c&&ae&&he&&!_e&&(ye(a?null:B.clientWidth),se.current.focus())},[he,a]),L.useEffect(()=>{i&&se.current.focus()},[i]),L.useEffect(()=>{if(!h)return;let e=Jd(se.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&se.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let De=hp((e,t)=>{e||(Te(),Ee()),e?(Ce(),xe(Lx(t)),T&&T(t)):(xe(null),x&&x(t)),_e||(P.current=e,ye(a?null:B.clientWidth),N(e))}),Oe=()=>{Te(),le.current?pe.start(iC,()=>{I.current.allowUnselectedMouseUp=!0,fe.start(iC,()=>{I.current.allowSelectedMouseUp=!0})}):fe.start(rC,()=>{I.current.allowSelectedMouseUp=!0,I.current.allowUnselectedMouseUp=!0})},ke=e=>{if(w?.(e),e.button!==0||(e.preventDefault(),!se.current))return;se.current.focus();let t=Jd(e.currentTarget);Oe(),Ee();let n=e=>{ue.current=null,se.current&&(uC(e,se.current)||uC(e,ce.current)||(P.current||!_e)&&De(!1,e))};t.addEventListener(`mouseup`,n,{capture:!0,once:!0}),ue.current=()=>{t.removeEventListener(`mouseup`,n,!0)},De(!0,e)},Ae=e=>{De(!1,e)},V=L.Children.toArray(o),je=e=>{let t=V.find(t=>t.props.value===e.target.value);t!==void 0&&(ie(t.props.value),b&&b(e,t))},Me=(e,t,n)=>{if(ie(n),b){let r=e.nativeEvent||e,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:v}}),b(i,t)}},Ne=e=>t=>{F.current=!1;let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(_){n=Array.isArray(re)?re.slice():[];let t=re.indexOf(e.props.value);t===-1?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;e.props.onClick&&e.props.onClick(t),re!==n&&Me(t,e,n),_||De(!1,t)}},Pe=(e,t)=>n=>{if(e.props.onMouseUp?.(n),F.current){F.current=!1;return}let r=!I.current.allowSelectedMouseUp&&t,i=!I.current.allowUnselectedMouseUp&&!t;r||i||n.currentTarget.click()},Fe=e=>{let t=de.current,n=t.buffer!==``;if(Se||_||u||e.defaultPrevented||e.nativeEvent?.isComposing||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey||e.key===oC&&!n)return!1;e.key===oC&&e.preventDefault();let r=t.buffer===``,{options:i,selectedIndex:a}=eC(V,re);if(i.length===0)return e.key!==oC&&Ce(),!0;r&&(t.previousSearchIndex=a);let o=e.key.toLowerCase();t.buffer===o&&$S(i,o)&&(t.buffer=``,t.previousSearchIndex=t.matchedIndex),t.buffer+=o,me.start(aC,Ce);let s=QS(i,t.buffer,(t.previousSearchIndex??-1)+1);if(s!==-1){let n=i[s];return t.matchedIndex=s,zx(re,n.value)||Me(e,n.child,n.value),!0}return e.key!==oC&&Ce(),!0},Ie=e=>{if(!D){let t=Fe(e),n=e.key===oC||e.key===sC||e.key===cC||e.key===lC;!t&&n&&(e.preventDefault(),De(!0,e)),C?.(e)}},Le=e=>{Ce(),!Se&&y&&(Object.defineProperty(e,"target",{writable:!0,value:{value:re,name:v}}),y(e))},Re=e=>t=>{e?.props?.onKeyDown?.(t),t.key===oC&&t.target===t.currentTarget&&!t.defaultPrevented&&(t.preventDefault(),t.repeat||t.currentTarget.click())};delete ne[`aria-invalid`];let ze,Be,Ve=[],He=!1,Ue=!1;(Qd({value:re})||d)&&(O?ze=O(re):He=!0);let We=V.map(e=>{if(!L.isValidElement(e))return null;let t;if(_){if(!Array.isArray(re))throw Error(Rr(2));t=re.some(t=>zx(t,e.props.value)),t&&He&&Ve.push(e.props.children)}else t=zx(re,e.props.value),t&&He&&(Be=e.props.children);return t&&(Ue=!0),L.cloneElement(e,{"aria-selected":t?`true`:`false`,onMouseDown:t=>{F.current=!0,e.props.onMouseDown?.(t)},onPointerDown:t=>{F.current=!0,e.props.onPointerDown?.(t)},onClick:Ne(e),onMouseUp:Pe(e,t),onKeyUp:t=>{t.key===oC&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},onKeyDown:Re(e),role:`option`,selected:t,value:void 0,"data-value":e.props.value})});qd(()=>{le.current=Ue,!Se&&!_&&!Ue&&Ce()},[Ue,_,Se,Ce]),He&&(ze=_?Ve.length===0?null:Ve.reduce((e,t,n)=>(e.push(t),n<Ve.length-1&&e.push(`, `),e),[]):Be);let Ge=ve;!a&&_e&&he&&(Ge=B.clientWidth);let Ke;Ke=k===void 0?u?null:0:k;let qe=te.id||(v?`mui-component-select-${v}`:void 0),Je={...e,variant:M,value:re,open:Se,error:f},Ye=mC(Je),Xe=typeof g.slotProps?.paper==`function`?g.slotProps.paper(Je):g.slotProps?.paper,Ze=Kd(Xe?.ref,ce),Qe=typeof g.slotProps?.list==`function`?g.slotProps.list(Je):g.slotProps?.list,$e=Qc(),et=Qc();return(0,H.jsxs)(L.Fragment,{children:[(0,H.jsx)(dC,{as:`div`,ref:z,tabIndex:Ke,role:`combobox`,"aria-controls":Se?$e:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":Se?`true`:`false`,"aria-haspopup":`listbox`,"aria-readonly":D?`true`:void 0,"aria-label":r,"aria-labelledby":h,"aria-describedby":n,"aria-required":ee?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:Ie,onMouseDown:u||D?null:ke,onBlur:Le,onFocus:S,...te,ownerState:Je,className:U(te.className,Ye.select,s),id:qe,children:Rx(ze)?tC||=(0,H.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):ze}),(0,H.jsx)(pC,{"aria-invalid":f,value:Array.isArray(re)?re.join(`,`):re,name:v,ref:oe,"aria-hidden":!0,onChange:je,tabIndex:-1,disabled:u,readOnly:D,className:Ye.nativeInput,autoFocus:i,required:ee,...ne,id:ne.id??et,ownerState:Je}),(0,H.jsx)(fC,{as:p,className:Ye.icon,ownerState:Je}),(0,H.jsx)(Hx,{value:be,children:(0,H.jsx)(fS,{id:`menu-${v||``}`,anchorEl:B,open:Se,onClose:Ae,anchorOrigin:{vertical:`bottom`,horizontal:`center`},transformOrigin:{vertical:`top`,horizontal:`center`},...g,slotProps:{...g.slotProps,list:{"aria-labelledby":h,role:`listbox`,"aria-multiselectable":_?`true`:void 0,disableListWrap:!0,id:$e,...Qe},paper:{...Xe,ref:Ze,style:{minWidth:Ge,...Xe?.style}}},children:We})})]})}),gC=e=>{let{classes:t}=e,n=El({root:[`root`]},xy,t);return{...t,...n}},_C={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>Hd(e)&&e!==`variant`},vC=G(rb,_C)(``),yC=G(jS,_C)(``),bC=G(Ey,_C)(``),xC=L.forwardRef(function(e,t){let n=Gd({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=C_,id:u,input:d,inputProps:f,label:p,labelId:m,MenuProps:h,multiple:g=!1,native:_=!1,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:S,variant:C=`outlined`,...w}=n,T=_?SS:hC,[E]=Ld({props:n,states:[`variant`,`error`]}),D=E.variant||C,O={...n,variant:D,classes:a},ee=gC(O),{root:te,...k}=ee,A=d||{standard:(0,H.jsx)(vC,{ownerState:O}),outlined:(0,H.jsx)(yC,{label:p,ownerState:O}),filled:(0,H.jsx)(bC,{ownerState:O})}[D],j=Kd(t,h_(A));return(0,H.jsx)(L.Fragment,{children:L.cloneElement(A,{inputComponent:T,inputProps:{children:i,error:E.error,IconComponent:l,variant:D,type:void 0,multiple:g,..._?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:c,labelId:m,MenuProps:h,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:{id:u,...S}},...f,classes:f?no(k,f.classes):k,...d?d.props.inputProps:{}},...(g&&_||c)&&D===`outlined`?{notched:!0}:{},ref:j,className:U(A.props.className,o,ee.root),...!d&&{variant:D},...w})})});xC.muiName=`Select`;function SC(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}var CC=2,wC=[],TC={};function EC(e,t,n,r,i){return n===1?Math.min(e+t,i):Math.max(e-t,r)}function DC(e,t){return e-t}function OC(e,t,n=-1){let{index:r}=e.reduce((e,n,r)=>{let i=Math.abs(t-n);return e==null||i<=e.distance?{distance:i,index:r}:e},null)??TC;return r==null?r:n>=0&&e[n]===e[r]?n:r}function kC(e,t){if(t.current!=null&&e.changedTouches){let n=e;for(let e=0;e<n.changedTouches.length;e+=1){let r=n.changedTouches[e];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function AC(e,t,n){return(e-t)*100/(n-t)}function jC(e,t,n){return(n-t)*e+t}function MC(e){if(Math.abs(e)<1){let t=e.toExponential().split(`e-`),n=t[0].split(`.`)[1];return(n?n.length:0)+parseInt(t[1],10)}let t=e.toString().split(`.`)[1];return t?t.length:0}function NC(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(MC(t)))}function PC(e,t,n){let r=e.slice();return r[n]=t,r.sort(DC)}function FC(e,t,n,r){let i=Xd(Od(e.current));if(!ay(e.current,i)||Number(i?.getAttribute(`data-index`))!==t){let n=e.current?.querySelector(`[type="range"][data-index="${t}"]`);n!=null&&(r==null?n.focus({preventScroll:!0}):n.focus({preventScroll:!0,focusVisible:r}))}n&&n(t)}function IC(e,t){return typeof e==`number`&&typeof t==`number`?e===t:typeof e==`object`&&typeof t==`object`&&SC(e,t)}var LC={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}%`})}},RC=e=>e;function zC(e){let{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:a=!1,marks:o=!1,max:s=100,min:c=0,name:l,onChange:u,onChangeCommitted:d,orientation:f=`horizontal`,rootRef:p,scale:m=RC,step:h=1,shiftStep:g=10,tabIndex:_,value:v}=e,y=L.useRef(void 0),b=L.useRef(null),[x,S]=L.useState(-1),[C,w]=L.useState(-1),[T,E]=L.useState(!1),D=L.useRef(0),O=L.useRef(-1),ee=L.useRef(!1),te=L.useRef(-1),k=Dd(()=>{b.current!=null&&(cancelAnimationFrame(b.current),b.current=null)}),A=L.useRef(null),[j,M]=pp({controlled:v,default:n??c,name:`Slider`}),ne=Dd((e,t,n)=>{let r=`nativeEvent`in e?e.nativeEvent:e,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:t,name:l}}),A.current=t,u?.(i,t,n)}),re=Array.isArray(j),ie=L.useMemo(()=>{if(typeof j==`number`)return[yc(j,c,s)];if(j==null)return[c];let e=j.slice().sort(DC);for(let t=0;t<e.length;t+=1){let n=e[t];e[t]=n==null?c:yc(n,c,s)}return e},[j,c,s]),ae=L.useMemo(()=>{if(o===!0&&h!=null){let e=Array(Math.floor((s-c)/h)+1);for(let t=0;t<e.length;t+=1)e[t]={value:c+h*t};return e}return Array.isArray(o)?o:wC},[o,h,c,s]),N=L.useMemo(()=>{let e=Array(ae.length);for(let t=0;t<ae.length;t+=1)e[t]=ae[t].value;return e},[ae]),[oe,se]=L.useState(-1),ce=L.useRef(null),P=Ed(p,ce),le=e=>t=>{let n=Number(t.currentTarget.getAttribute(`data-index`));lm(t.target)&&se(n),w(n),e?.onFocus?.(t)},ue=e=>t=>{lm(t.target)||se(-1),w(-1),e?.onBlur?.(t)},F=(e,t)=>{let n=Number(e.currentTarget.getAttribute(`data-index`)),r=ie[n],a=N.indexOf(r),o=t;if(ae&&h==null){let e=N[N.length-1];o=o>=e?e:o<=N[0]?N[0]:o<r?N[a-1]:N[a+1]}if(o=yc(o,c,s),re){i&&(o=yc(o,ie[n-1]||-1/0,ie[n+1]||1/0));let e=o;o=PC(ie,o,n);let t=n;i||(t=o.indexOf(e)),FC(ce,t)}M(o),se(n),u&&!IC(o,j)&&ne(e,o,n),d&&d(e,A.current??o)},I=e=>t=>{if([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`].includes(t.key)){t.preventDefault();let e=Number(t.currentTarget.getAttribute(`data-index`)),n=ie[e],r=null;if(h!=null){let e=t.shiftKey?g:h;switch(t.key){case`ArrowUp`:r=EC(n,e,1,c,s);break;case`ArrowRight`:r=EC(n,e,a?-1:1,c,s);break;case`ArrowDown`:r=EC(n,e,-1,c,s);break;case`ArrowLeft`:r=EC(n,e,a?1:-1,c,s);break;case`PageUp`:r=EC(n,g,1,c,s);break;case`PageDown`:r=EC(n,g,-1,c,s);break;case`Home`:r=c;break;case`End`:r=s}}else if(ae){let e=N[N.length-1],i=N.indexOf(n),o=[a?`ArrowRight`:`ArrowLeft`,`ArrowDown`,`PageDown`,`Home`],s=[a?`ArrowLeft`:`ArrowRight`,`ArrowUp`,`PageUp`,`End`];o.includes(t.key)?r=i===0?N[0]:N[i-1]:s.includes(t.key)&&(r=i===N.length-1?e:N[i+1])}r!=null&&F(t,r)}e?.onKeyDown?.(t)};mc(()=>{let e=Xd(Od(ce.current));r&&ay(ce.current,e)&&e!=null&&`blur`in e&&e.blur()},[r]),r&&x!==-1&&S(-1),r&&oe!==-1&&se(-1);let de=e=>t=>{e.onChange?.(t),F(t,t.currentTarget.valueAsNumber)},fe=L.useRef(void 0),pe=f;a&&f===`horizontal`&&(pe+=`-reverse`);let me=e=>{let{current:t}=ce;if(!t)return null;let{width:n,height:r,bottom:a,left:o}=t.getBoundingClientRect(),l;l=pe.startsWith(`vertical`)?(a-e.y)/r:(e.x-o)/n,pe.includes(`-reverse`)&&(l=1-l);let u;if(u=jC(l,c,s),h)u=NC(u,h,c);else{let e=OC(N,u);u=N[e]}u=yc(u,c,s);let d=0;if(re){let e=fe.current!==-1;d=e?fe.current:OC(ie,u,O.current),i&&(u=yc(u,ie[d-1]||-1/0,ie[d+1]||1/0));let t=u;u=PC(ie,u,d),i&&e||(d=u.indexOf(t),fe.current=d)}return{newValue:u,activeIndex:d}},he=Dd(e=>{if(`pointerId`in e&&e.pointerId!==te.current)return;let t=kC(e,y);if(!t)return;if(D.current+=1,e.type===`pointermove`&&e.buttons===0){ge(e);return}let n=me(t);n&&(FC(ce,n.activeIndex,S,!1),O.current=n.activeIndex,M(n.newValue),!T&&D.current>CC&&E(!0),u&&!IC(n.newValue,j)&&ne(e,n.newValue,n.activeIndex))}),ge=Dd(e=>{if(`pointerId`in e&&e.pointerId!==te.current)return;let t=kC(e,y);if(E(!1),!t)return;let n=me(t);S(-1),e.type===`touchend`&&w(-1),n&&d&&d(e,A.current??n.newValue),`pointerType`in e&&ce.current?.hasPointerCapture(e.pointerId)&&ce.current.releasePointerCapture(e.pointerId),y.current=void 0,te.current=-1,ve()}),_e=Dd(e=>{if(r)return;if(ee.current){ee.current=!1;let t=e.changedTouches[0];t!=null&&(y.current=t.identifier);return}let t=e.changedTouches[0];t!=null&&(y.current=t.identifier);let n=kC(e,y);if(n!==!1){fe.current=-1;let t=me(n);t&&(FC(ce,t.activeIndex,S,!1),O.current=t.activeIndex,M(t.newValue),u&&!IC(t.newValue,j)&&ne(e,t.newValue,t.activeIndex))}D.current=0;let i=Od(ce.current);i.addEventListener(`touchmove`,he,{passive:!0}),i.addEventListener(`touchend`,ge,{passive:!0})}),ve=L.useCallback(()=>{let e=Od(ce.current);e.removeEventListener(`pointermove`,he),e.removeEventListener(`pointerup`,ge),e.removeEventListener(`touchmove`,he),e.removeEventListener(`touchend`,ge)},[ge,he]);L.useEffect(()=>{let e=ce.current;if(e)return e.addEventListener(`touchstart`,_e,{passive:!0}),()=>{e.removeEventListener(`touchstart`,_e),k(),ve()}},[ve,_e,k]),L.useEffect(()=>{r&&(ve(),k())},[r,ve,k]);let ye=e=>t=>{if(e.onPointerDown?.(t),t.pointerType===`touch`&&(ee.current=!0),r||t.defaultPrevented||t.button!==0)return;let n=kC(t,y);if(n!==!1){fe.current=-1;let e=me(n);if(e){let n=ce.current?.querySelector(`input[type="range"][data-index="${e.activeIndex}"]`),r=Od(ce.current),i=n!=null&&n===Xd(r);S(e.activeIndex),O.current=e.activeIndex,i?t.preventDefault():(k(),b.current=requestAnimationFrame(()=>{b.current=null,FC(ce,e.activeIndex,void 0,!1)})),M(e.newValue),u&&!IC(e.newValue,j)&&ne(t,e.newValue,e.activeIndex)}}D.current=0,te.current=t.pointerId;let i=Od(ce.current);try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}i.addEventListener(`pointermove`,he,{passive:!0}),i.addEventListener(`pointerup`,ge)},be=AC(re?ie[0]:c,c,s),xe=AC(ie[ie.length-1],c,s)-be,R=(e=TC)=>{let t=Bp(e),n={onPointerDown:ye(t)},r={...t,...n};return{...e,ref:P,...r}},z=e=>t=>{e.onMouseOver?.(t);let n=Number(t.currentTarget.getAttribute(`data-index`));w(n)},B=e=>t=>{e.onMouseLeave?.(t),w(-1)},Se=(e=TC)=>{let t=Bp(e),n={onMouseOver:z(t),onMouseLeave:B(t)};return{...e,...t,...n}},Ce=e=>{let t;return re?x===e?t=2:O.current===e&&(t=1):x===e&&(t=1),{pointerEvents:x!==-1&&x!==e?`none`:void 0,zIndex:t}},we;return f===`vertical`&&(we=a?`vertical-rl`:`vertical-lr`),{active:x,axis:pe,axisProps:LC,dragging:T,focusedThumbIndex:oe,getHiddenInputProps:(n=TC)=>{let i=Bp(n),o={onChange:de(i),onFocus:le(i),onBlur:ue(i),onKeyDown:I(i)},u={...i,...o};return{tabIndex:_,"aria-labelledby":t,"aria-orientation":f,"aria-valuemax":m(s),"aria-valuemin":m(c),name:l,type:`range`,min:e.min,max:e.max,step:e.step===null&&e.marks?`any`:e.step??void 0,disabled:r,...n,...u,style:{...YS,direction:a?`rtl`:`ltr`,width:`100%`,height:`100%`,writingMode:we}}},getRootProps:R,getThumbProps:Se,marks:ae,open:C,range:re,rootRef:P,trackLeap:xe,trackOffset:be,values:ie,getThumbStyle:Ce}}var BC=e=>{let{open:t}=e;return{offset:U(t&&Gf.valueLabelOpen),circle:Gf.valueLabelCircle,label:Gf.valueLabelLabel}};function VC(e){let{children:t,className:n,value:r}=e,i=BC(e);return t?L.cloneElement(t,{className:t.props.className},(0,H.jsxs)(L.Fragment,{children:[t.props.children,(0,H.jsx)(`span`,{className:U(i.offset,n),"aria-hidden":!0,children:(0,H.jsx)(`span`,{className:i.circle,children:(0,H.jsx)(`span`,{className:i.label,children:r})})})]})):null}function HC(e){return e}var UC=G(`span`,{name:`MuiSlider`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${K(n.color)}`],n.size!==`medium`&&t[`size${K(n.size)}`],n.marked&&t.marked,n.orientation===`vertical`&&t.vertical,n.track===`inverted`&&t.trackInverted,n.track===!1&&t.trackFalse]}})(Wd(({theme:e})=>({borderRadius:12,boxSizing:`content-box`,display:`inline-block`,position:`relative`,cursor:`pointer`,touchAction:`none`,WebkitTapHighlightColor:`transparent`,"@media print":{colorAdjust:`exact`},[`&.${Gf.disabled}`]:{pointerEvents:`none`,cursor:`default`,color:(e.vars||e).palette.grey[400]},[`&.${Gf.dragging}`]:{[`& .${Gf.thumb}, & .${Gf.track}`]:{transition:`none`}},variants:[...Object.entries(e.palette).filter(Fm()).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}}]}))),WC=G(`span`,{name:`MuiSlider`,slot:`Rail`})({display:`block`,position:`absolute`,borderRadius:`inherit`,backgroundColor:`currentColor`,opacity:.38,"@media (forced-colors: active)":{border:`1px solid transparent`,boxSizing:`border-box`},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}}]}),GC=G(`span`,{name:`MuiSlider`,slot:`Track`})(Wd(({theme:e})=>({display:`block`,position:`absolute`,borderRadius:`inherit`,border:`1px solid currentColor`,backgroundColor:`currentColor`,...pf(e,[`left`,`width`,`bottom`,`height`],{duration:e.transitions.duration.shortest}),variants:[{props:{size:`small`},style:{"@media (forced-colors: none)":{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(Fm()).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:e.lighten(e.palette[t].main,.62),borderColor:e.lighten(e.palette[t].main,.62),...e.applyStyles(`dark`,{backgroundColor:e.darken(e.palette[t].main,.5)}),...e.applyStyles(`dark`,{borderColor:e.darken(e.palette[t].main,.5)})}}}))]}))),KC=G(`span`,{name:`MuiSlider`,slot:`Thumb`})(Wd(({theme:e})=>({position:`absolute`,width:20,height:20,boxSizing:`border-box`,borderRadius:`50%`,outline:0,backgroundColor:`currentColor`,display:`flex`,alignItems:`center`,justifyContent:`center`,...pf(e,[`box-shadow`,`left`,`bottom`],{duration:e.transitions.duration.shortest}),"@media (forced-colors: active)":{border:`1px solid ButtonBorder`},"&::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%)`},[`&.${Gf.disabled}`]:{"&:hover":{boxShadow:`none`}},...e.focusVisible&&{[`&.${Gf.focusVisible}`]:{...bu,...e.focusVisible}},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(Fm()).map(([t])=>({props:{color:t},style:{"&:hover":{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:`none`}},...!e.focusVisible&&{[`&.${Gf.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:`none`}}},[`&.${Gf.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),qC=G(VC,{name:`MuiSlider`,slot:`ValueLabel`})(Wd(({theme:e})=>({zIndex:1,whiteSpace:`nowrap`,...e.typography.body2,fontWeight:500,...pf(e,[`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%`},[`&.${Gf.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%`},[`&.${Gf.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`}}]}))),JC=G(`span`,{name:`MuiSlider`,slot:`Mark`,shouldForwardProp:e=>Vd(e)&&e!==`markActive`,overridesResolver:(e,t)=>{let{markActive:n}=e;return[t.mark,n&&t.markActive]}})(Wd(({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}}]}))),YC=G(`span`,{name:`MuiSlider`,slot:`MarkLabel`,shouldForwardProp:e=>Vd(e)&&e!==`markLabelActive`})(Wd(({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}}]}))),XC=e=>{let{disabled:t,dragging:n,marked:r,orientation:i,track:a,classes:o,color:s,size:c}=e;return El({root:[`root`,t&&`disabled`,n&&`dragging`,r&&`marked`,i===`vertical`&&`vertical`,a===`inverted`&&`trackInverted`,a===!1&&`trackFalse`,s&&`color${K(s)}`,c&&`size${K(c)}`],rail:[`rail`],track:[`track`],mark:[`mark`],markActive:[`markActive`],markLabel:[`markLabel`],markLabelActive:[`markLabelActive`],valueLabel:[`valueLabel`],thumb:[`thumb`,t&&`disabled`],active:[`active`],disabled:[`disabled`],focusVisible:[`focusVisible`]},Wf,o)},ZC=({children:e})=>e,QC=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiSlider`}),r=Wc(),{"aria-label":i,"aria-valuetext":a,"aria-labelledby":o,color:s=`primary`,classes:c,className:l,disableSwap:u=!1,disabled:d=!1,getAriaLabel:f,getAriaValueText:p,marks:m=!1,max:h=100,min:g=0,name:_,onChange:v,onChangeCommitted:y,orientation:b=`horizontal`,shiftStep:x=10,size:S=`medium`,step:C=1,scale:w=HC,slotProps:T={},slots:E={},tabIndex:D,track:O=`normal`,value:ee,valueLabelDisplay:te=`off`,valueLabelFormat:k=HC,...A}=n,j={...n,isRtl:r,max:h,min:g,classes:c,disabled:d,disableSwap:u,orientation:b,marks:m,color:s,size:S,step:C,shiftStep:x,scale:w,track:O,valueLabelDisplay:te,valueLabelFormat:k},{axisProps:M,getRootProps:ne,getHiddenInputProps:re,getThumbProps:ie,open:ae,active:N,axis:oe,focusedThumbIndex:se,range:ce,dragging:P,marks:le,values:ue,trackOffset:F,trackLeap:I,getThumbStyle:de}=zC({...j,rootRef:t});j.marked=le.length>0&&le.some(e=>e.label),j.dragging=P,j.focusedThumbIndex=se;let fe=XC(j),pe={slots:E,slotProps:T},[me,he]=Up(`root`,{elementType:UC,getSlotProps:ne,externalForwardedProps:{...pe,...A},ownerState:j,className:[fe.root,l]}),[ge,_e]=Up(`rail`,{elementType:WC,externalForwardedProps:pe,ownerState:j,className:fe.rail}),[ve,ye]=Up(`track`,{elementType:GC,externalForwardedProps:pe,additionalProps:{style:{...M[oe].offset(F),...M[oe].leap(I)}},ownerState:j,className:fe.track}),[be,xe]=Up(`thumb`,{elementType:KC,getSlotProps:ie,externalForwardedProps:pe,ownerState:j,className:fe.thumb}),[R,z]=Up(`valueLabel`,{elementType:qC,externalForwardedProps:pe,ownerState:j,className:fe.valueLabel}),[B,Se]=Up(`mark`,{elementType:JC,externalForwardedProps:pe,ownerState:j,className:fe.mark}),[Ce,we]=Up(`markLabel`,{elementType:YC,externalForwardedProps:pe,ownerState:j,className:fe.markLabel}),[Te,Ee]=Up(`input`,{elementType:`input`,getSlotProps:re,externalForwardedProps:pe,ownerState:j});return(0,H.jsxs)(me,{...he,children:[(0,H.jsx)(ge,{..._e}),(0,H.jsx)(ve,{...ye}),le.filter(e=>e.value>=g&&e.value<=h).map((e,t)=>{let n=AC(e.value,g,h),r=M[oe].offset(n),i;return i=O===!1?ue.includes(e.value):O===`normal`&&(ce?e.value>=ue[0]&&e.value<=ue[ue.length-1]:e.value<=ue[0])||O===`inverted`&&(ce?e.value<=ue[0]||e.value>=ue[ue.length-1]:e.value>=ue[0]),(0,H.jsxs)(L.Fragment,{children:[(0,H.jsx)(B,{"data-index":t,...Se,...!wd(B)&&{markActive:i},style:{...r,...Se.style},className:U(Se.className,i&&fe.markActive)}),e.label==null?null:(0,H.jsx)(Ce,{"aria-hidden":!0,"data-index":t,...we,...!wd(Ce)&&{markLabelActive:i},style:{...r,...we.style},className:U(fe.markLabel,we.className,i&&fe.markLabelActive),children:e.label})]},t)}),ue.map((e,t)=>{let n=AC(e,g,h),r=M[oe].offset(n),s=te===`off`?ZC:R;return(0,H.jsx)(s,{...!wd(s)&&{valueLabelFormat:k,valueLabelDisplay:te,value:typeof k==`function`?k(w(e),t):k,index:t,open:ae===t||N===t||te===`on`,disabled:d},...z,children:(0,H.jsx)(be,{"data-index":t,...xe,className:U(fe.thumb,xe.className,N===t&&fe.active,se===t&&fe.focusVisible),style:{...r,...de(t),...xe.style},children:(0,H.jsx)(Te,{"data-index":t,"aria-label":f?f(t):i,"aria-valuenow":w(e),"aria-labelledby":o,"aria-valuetext":p?p(w(e),t):a,value:ue[t],...Ee})})},t)})]})});function $C(e){return Zs(`MuiTooltip`,e)}var ew=Qs(`MuiTooltip`,[`popper`,`popperInteractive`,`popperArrow`,`popperClose`,`tooltip`,`tooltipArrow`,`touch`,`tooltipPlacementLeft`,`tooltipPlacementRight`,`tooltipPlacementTop`,`tooltipPlacementBottom`,`arrow`]);function tw(e){return Math.round(e*1e5)/1e5}var nw=e=>{let{classes:t,disableInteractive:n,arrow:r,touch:i,placement:a}=e;return El({popper:[`popper`,!n&&`popperInteractive`,r&&`popperArrow`],tooltip:[`tooltip`,r&&`tooltipArrow`,i&&`touch`,`tooltipPlacement${K(a.split(`-`)[0])}`],arrow:[`arrow`]},$C,t)},rw=G(y_,{name:`MuiTooltip`,slot:`Popper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(Wd(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:`none`,variants:[{props:({ownerState:e,open:t})=>t&&!e.disableInteractive,style:{pointerEvents:`auto`}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${ew.arrow}`]:{top:0,marginTop:`-0.71em`,"&::before":{transformOrigin:`0 100%`}},[`&[data-popper-placement*="top"] .${ew.arrow}`]:{bottom:0,marginBottom:`-0.71em`,"&::before":{transformOrigin:`100% 0`}},[`&[data-popper-placement*="right"] .${ew.arrow}`]:{height:`1em`,width:`0.71em`,insetInlineStart:0,marginInlineStart:`-0.71em`,"&::before":{transformOrigin:`100% 100%`}},[`&[data-popper-placement*="left"] .${ew.arrow}`]:{height:`1em`,width:`0.71em`,insetInlineEnd:0,marginInlineEnd:`-0.71em`,"&::before":{transformOrigin:`0 0`}}}}]}))),iw=G(`div`,{name:`MuiTooltip`,slot:`Tooltip`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${K(n.placement.split(`-`)[0])}`]]}})(Wd(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:`4px 8px`,fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:`break-word`,fontWeight:e.typography.fontWeightMedium,[`.${ew.popper}[data-popper-placement*="left"] &`]:{transformOrigin:`right center`,marginInlineEnd:`14px`},[`.${ew.popper}[data-popper-placement*="right"] &`]:{transformOrigin:`left center`,marginInlineStart:`14px`},[`.${ew.popper}[data-popper-placement*="top"] &`]:{transformOrigin:`center bottom`,marginBottom:`14px`},[`.${ew.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:`center top`,marginTop:`14px`},variants:[{props:({ownerState:e})=>e.arrow,style:{position:`relative`,marginBlock:0}},{props:({ownerState:e})=>e.touch,style:{padding:`8px 16px`,fontSize:e.typography.pxToRem(14),lineHeight:`${tw(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>e.touch,style:{[`.${ew.popper}[data-popper-placement*="left"] &`]:{marginInlineEnd:`24px`},[`.${ew.popper}[data-popper-placement*="right"] &`]:{marginInlineStart:`24px`},[`.${ew.popper}[data-popper-placement*="top"] &`]:{marginBottom:`24px`},[`.${ew.popper}[data-popper-placement*="bottom"] &`]:{marginTop:`24px`}}}]}))),aw=G(`span`,{name:`MuiTooltip`,slot:`Arrow`})(Wd(({theme:e})=>({overflow:`hidden`,position:`absolute`,width:`1em`,height:`0.71em`,boxSizing:`border-box`,color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:`""`,margin:`auto`,display:`block`,width:`100%`,height:`100%`,backgroundColor:`currentColor`,transform:`rotate(45deg)`}}))),ow=!1,sw=new pm,cw={x:0,y:0};function lw(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}var X=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiTooltip`}),{arrow:r=!1,children:i,classes:a,describeChild:o=!1,disableFocusListener:s=!1,disableHoverListener:c=!1,disableInteractive:l=!1,disableTouchListener:u=!1,enterDelay:d=100,enterNextDelay:f=0,enterTouchDelay:p=700,followCursor:m=!1,id:h,leaveDelay:g=0,leaveTouchDelay:_=1500,onClose:v,onOpen:y,open:b,placement:x=`bottom`,slotProps:S={},slots:C={},title:w,...T}=n,E=L.isValidElement(i)?i:(0,H.jsx)(`span`,{children:i}),D=zd(),[O,ee]=L.useState(),[te,k]=L.useState(null),A=L.useRef(!1),j=L.useRef(!1),M=l||m,ne=mm(),re=mm(),ie=mm(),ae=mm(),[N,oe]=mp({controlled:b,default:!1,name:`Tooltip`,state:`open`}),se=N,{current:ce}=L.useRef(b!==void 0),P=fp(h),le=L.useRef(),ue=hp(()=>{le.current!==void 0&&(document.body.style.WebkitUserSelect=le.current,le.current=void 0),ae.clear()});L.useEffect(()=>ue,[ue]);let F=e=>{sw.clear(),ow=!0,oe(!0),y&&!se&&y(e)},I=hp(e=>{j.current=!1,sw.start(800+g,()=>{ow=!1}),oe(!1),v&&se&&v(e),ne.start(D.transitions.duration.shortest,()=>{A.current=!1})}),de=e=>{A.current&&e.type!==`touchstart`||(O&&O.removeAttribute(`title`),re.clear(),ie.clear(),d||ow&&f?re.start(ow?f:d,()=>{F(e)}):F(e))},fe=e=>{if(O?.disabled&&!ce){if(se&&!j.current)return;j.current=!0}else j.current=!1;de(e)},pe=e=>{(!O?.disabled||ce||j.current)&&de(e)},me=e=>{re.clear(),ie.start(g,()=>{I(e)})},[,he]=L.useState(!1),ge=e=>{let t=e?.target??O;if(!t||t.disabled||!lm(t)){he(!1);let n=e??new Event(`blur`);!e&&t&&(Object.defineProperty(n,"target",{value:t}),Object.defineProperty(n,"currentTarget",{value:t})),me(n)}},_e=e=>{if(O||ee(e.currentTarget),j.current=!1,lm(e.target)){let t=e=>{e.target.disabled&&ge(e),e.target.removeEventListener(`blur`,t)};e.target.addEventListener(`blur`,t),he(!0),de(e)}},ve=e=>{A.current=!0;let t=E.props;t.onTouchStart&&t.onTouchStart(e)},ye=e=>{ve(e),ie.clear(),ne.clear(),ue(),le.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect=`none`,ae.start(p,()=>{document.body.style.WebkitUserSelect=le.current,fe(e)})},be=e=>{E.props.onTouchEnd&&E.props.onTouchEnd(e),ue(),ie.start(_,()=>{I(e)})};L.useEffect(()=>{if(!se)return;function e(e){e.key===`Escape`&&I(e)}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[I,se]);let xe=Kd(h_(E),ee,t);!w&&w!==0&&(se=!1);let R=L.useRef(),z=e=>{let t=E.props;t.onMouseMove&&t.onMouseMove(e),cw={x:e.clientX,y:e.clientY},R.current&&R.current.update()},B={},Se=typeof w==`string`;o?(B.title=!se&&Se&&!c?w:null,B[`aria-describedby`]=se?P:null):(B[`aria-label`]=Se?w:null,B[`aria-labelledby`]=se&&!Se?P:null);let Ce={...B,...T,...E.props,className:U(T.className,E.props.className),onTouchStart:ve,ref:xe,...m?{onMouseMove:z}:{}},we={};u||(Ce.onTouchStart=ye,Ce.onTouchEnd=be),c||(Ce.onMouseOver=lw(fe,Ce.onMouseOver),Ce.onMouseLeave=lw(me,Ce.onMouseLeave),M||(we.onMouseOver=pe,we.onMouseLeave=me)),s||(Ce.onFocus=lw(_e,Ce.onFocus),Ce.onBlur=lw(ge,Ce.onBlur),M||(we.onFocus=_e,we.onBlur=ge));let Te={...n,arrow:r,disableInteractive:M,placement:x,touch:A.current},Ee=typeof S.popper==`function`?S.popper(Te):S.popper,De=L.useMemo(()=>{let e=[{name:`arrow`,enabled:!!te,options:{element:te,padding:4}}];return Ee?.popperOptions?.modifiers&&(e=e.concat(Ee.popperOptions.modifiers)),{...Ee?.popperOptions,modifiers:e}},[te,Ee?.popperOptions]),Oe=nw(Te),ke={slots:C,slotProps:{arrow:S.arrow,popper:Ee,tooltip:S.tooltip,transition:S.transition}},[Ae,V]=Up(`popper`,{elementType:rw,externalForwardedProps:ke,ownerState:Te,className:Oe.popper}),[je,Me]=Up(`transition`,{elementType:Zy,externalForwardedProps:ke,ownerState:Te}),[Ne,Pe]=Up(`tooltip`,{elementType:iw,className:Oe.tooltip,externalForwardedProps:ke,ownerState:Te}),[Fe,Ie]=Up(`arrow`,{elementType:aw,className:Oe.arrow,externalForwardedProps:ke,ownerState:Te,ref:k});return(0,H.jsxs)(L.Fragment,{children:[L.cloneElement(E,Ce),(0,H.jsx)(Ae,{as:y_,placement:x,anchorEl:m?{getBoundingClientRect:()=>({top:cw.y,left:cw.x,right:cw.x,bottom:cw.y,width:0,height:0})}:O,popperRef:R,open:O?se:!1,id:P,transition:!0,...we,...V,popperOptions:De,children:({TransitionProps:e})=>(0,H.jsx)(je,{timeout:D.transitions.duration.shorter,...e,...Me,children:(0,H.jsxs)(Ne,{...Pe,children:[w,r?(0,H.jsx)(Fe,{...Ie}):null]})})})]})}),uw=eu({createStyledComponent:G(`div`,{name:`MuiStack`,slot:`Root`}),useThemeProps:e=>Gd({props:e,name:`MuiStack`})}),dw=L.createContext({});function fw(){return L.useContext(dw)}var pw=L.createContext({});function mw(e){return Zs(`MuiStep`,e)}Qs(`MuiStep`,[`root`,`horizontal`,`vertical`,`alternativeLabel`,`completed`]);var hw=e=>{let{classes:t,orientation:n,alternativeLabel:r,completed:i}=e;return El({root:[`root`,n,r&&`alternativeLabel`,i&&`completed`]},mw,t)},gw=G(`li`,{name:`MuiStep`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({variants:[{props:{orientation:`horizontal`,alternativeLabel:!1,hasConnector:!1},style:{paddingLeft:8}},{props:{orientation:`horizontal`,alternativeLabel:!1,last:!0},style:{paddingRight:8}},{props:{orientation:`horizontal`,alternativeLabel:!1,hasConnector:!0},style:{flex:`1 1 auto`,display:`grid`,gridTemplateColumns:`1fr auto`,alignItems:`center`,gap:8}},{props:{orientation:`vertical`,alternativeLabel:!0},style:{display:`flex`,flexDirection:`column`}},{props:{orientation:`horizontal`,alternativeLabel:!0},style:{flex:1,position:`relative`}}]}),_w=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiStep`}),{active:r,children:i,className:a,component:o=`li`,completed:s,disabled:c,expanded:l=!1,index:u,last:d,...f}=n,{activeStep:p,connector:m,alternativeLabel:h,orientation:g,nonLinear:_,isTabList:v}=fw(),[y=!1,b=!1,x=!1]=[r,s,c];p===u?y=r===void 0||r:!_&&p>u?b=s===void 0||s:!_&&p<u&&(x=c===void 0||c);let S=L.useMemo(()=>({index:u,last:d,expanded:l,icon:u+1,active:y,completed:b,disabled:x}),[u,d,l,y,b,x]),C=!!m&&u!==0,w={...n,active:y,orientation:g,alternativeLabel:h,completed:b,disabled:x,expanded:l,component:o,hasConnector:C},T=hw(w);return(0,H.jsx)(pw.Provider,{value:S,children:(0,H.jsxs)(gw,{as:o,className:U(T.root,a),ref:t,ownerState:w,role:v?`presentation`:void 0,...f,children:[C?m:null,i]})})}),vw=sp((0,H.jsx)(`path`,{d:`M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z`}),`CheckCircle`),yw=sp((0,H.jsx)(`path`,{d:`M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z`}),`Warning`);function bw(e){return Zs(`MuiStepIcon`,e)}var xw=Qs(`MuiStepIcon`,[`root`,`active`,`completed`,`error`,`text`]),Sw,Cw=e=>{let{classes:t,active:n,completed:r,error:i}=e;return El({root:[`root`,n&&`active`,r&&`completed`,i&&`error`],text:[`text`]},bw,t)},ww=G(op,{name:`MuiStepIcon`,slot:`Root`})(Wd(({theme:e})=>({display:`block`,...pf(e,`color`,{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${xw.completed}, &.${xw.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${xw.error}`]:{color:(e.vars||e).palette.error.main}}))),Tw=G(`text`,{name:`MuiStepIcon`,slot:`Text`})(Wd(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily}))),Ew=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiStepIcon`}),{active:r=!1,className:i,completed:a=!1,error:o=!1,icon:s,...c}=n,l={...n,active:r,completed:a,error:o},u=Cw(l);if(typeof s==`number`||typeof s==`string`){let e=U(i,u.root);return o?(0,H.jsx)(ww,{as:yw,className:e,ref:t,ownerState:l,...c}):a?(0,H.jsx)(ww,{as:vw,className:e,ref:t,ownerState:l,...c}):(0,H.jsxs)(ww,{className:e,ref:t,ownerState:l,...c,children:[Sw||=(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`12`}),(0,H.jsx)(Tw,{className:u.text,x:`12`,y:`12`,textAnchor:`middle`,dominantBaseline:`central`,ownerState:l,children:s})]})}return s});function Dw(e){return Zs(`MuiStepLabel`,e)}var Ow=Qs(`MuiStepLabel`,[`root`,`horizontal`,`vertical`,`label`,`active`,`completed`,`error`,`disabled`,`iconContainer`,`alternativeLabel`,`labelContainer`]),kw=e=>{let{classes:t,orientation:n,active:r,completed:i,error:a,disabled:o,alternativeLabel:s}=e;return El({root:[`root`,n,a&&`error`,o&&`disabled`,s&&`alternativeLabel`],label:[`label`,r&&`active`,i&&`completed`,a&&`error`,o&&`disabled`,s&&`alternativeLabel`],iconContainer:[`iconContainer`,r&&`active`,i&&`completed`,a&&`error`,o&&`disabled`,s&&`alternativeLabel`],labelContainer:[`labelContainer`,s&&`alternativeLabel`]},Dw,t)},Aw=G(`span`,{name:`MuiStepLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation]]}})({display:`flex`,alignItems:`center`,[`&.${Ow.disabled}`]:{cursor:`default`},variants:[{props:{orientation:`vertical`},style:{textAlign:`left`,padding:`8px 0`}},{props:{alternativeLabel:!0},style:{flexDirection:`column`}},{props:{orientation:`vertical`,alternativeLabel:!0},style:{flexDirection:`row-reverse`}}]}),jw=G(`span`,{name:`MuiStepLabel`,slot:`Label`})(Wd(({theme:e})=>({...e.typography.body2,display:`block`,...pf(e,`color`,{duration:e.transitions.duration.shortest}),[`&.${Ow.active}, &.${Ow.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${Ow.alternativeLabel}`]:{marginTop:16},[`&.${Ow.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{orientation:`vertical`,alternativeLabel:!0},style:{[`&.${Ow.alternativeLabel}`]:{marginTop:0}}}]}))),Ite=G(`span`,{name:`MuiStepLabel`,slot:`IconContainer`})({flexShrink:0,display:`flex`,paddingRight:8,[`&.${Ow.alternativeLabel}`]:{paddingRight:0},variants:[{props:{orientation:`vertical`,alternativeLabel:!0},style:{paddingRight:0,paddingLeft:8}}]}),Lte=G(`span`,{name:`MuiStepLabel`,slot:`LabelContainer`})(Wd(({theme:e})=>({width:`100%`,color:(e.vars||e).palette.text.secondary,[`&.${Ow.alternativeLabel}`]:{textAlign:`center`},variants:[{props:{orientation:`vertical`,alternativeLabel:!0},style:{[`&.${Ow.alternativeLabel}`]:{textAlign:`right`}}}]}))),Mw=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiStepLabel`}),{children:r,className:i,error:a=!1,icon:o,optional:s,slots:c={},slotProps:l={},...u}=n,{alternativeLabel:d,orientation:f}=fw(),{active:p,disabled:m,completed:h,icon:g}=L.useContext(pw),_=o||g,v={...n,active:p,alternativeLabel:d,completed:h,disabled:m,error:a,orientation:f},y=kw(v),b={slots:c,slotProps:l},[x,S]=Up(`root`,{elementType:Aw,externalForwardedProps:{...b,...u},ownerState:v,ref:t,className:U(y.root,i)}),[C,w]=Up(`label`,{elementType:jw,externalForwardedProps:b,ownerState:v}),[T,E]=Up(`stepIcon`,{elementType:_?Ew:void 0,externalForwardedProps:b,ownerState:v});return(0,H.jsxs)(x,{...S,children:[_||T?(0,H.jsx)(Ite,{className:y.iconContainer,ownerState:v,children:(0,H.jsx)(T,{completed:h,active:p,error:a,icon:_,...E})}):null,(0,H.jsxs)(Lte,{className:y.labelContainer,ownerState:v,children:[r?(0,H.jsx)(C,{...w,className:U(y.label,w?.className),children:r}):null,s]})]})});Mw.muiName=`StepLabel`;function Rte(e){return Zs(`MuiStepButton`,e)}var Nw=Qs(`MuiStepButton`,[`root`,`horizontal`,`vertical`,`touchRipple`]),zte=e=>{let{classes:t,orientation:n}=e;return El({root:[`root`,n],touchRipple:[`touchRipple`]},Rte,t)},Pw=G(Em,{name:`MuiStepButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Nw.touchRipple}`]:t.touchRipple},t.root,t[n.orientation]]}})(Wd(({theme:e})=>({width:`100%`,padding:`24px 16px`,margin:`-24px -16px`,boxSizing:`content-box`,[`& .${Nw.touchRipple}`]:{color:`rgba(0, 0, 0, 0.3)`,...e.applyStyles(`dark`,{color:`rgba(255, 255, 255, 0.3)`})},...e.focusVisible&&{[`&.${Cm.focusVisible} .${Ow.root}`]:{borderRadius:(e.vars||e).shape.borderRadius,...e.focusVisible}},variants:[{props:{orientation:`vertical`},style:{justifyContent:`flex-start`,padding:`8px`,margin:`-8px`}}]}))),Bte=L.forwardRef(function(e,t){let{children:n,disabled:r,index:i,...a}=e,o=vx({id:i,ref:t,disabled:r});return(0,H.jsx)(Pw,{disabled:r,...o,...a,children:n})}),Fw=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiStepButton`}),{children:r,className:i,icon:a,optional:o,...s}=n,{disabled:c,active:l,index:u}=L.useContext(pw),{orientation:d,totalSteps:f,isTabList:p}=fw(),m={...n,orientation:d},h=zte(m),g={icon:a,optional:o},_=lp(r,[`StepLabel`])?L.cloneElement(r,g):(0,H.jsx)(Mw,{...g,children:r}),v={internalNativeButton:!0,focusRipple:!0,disabled:c,TouchRippleProps:{className:h.touchRipple},className:U(h.root,i),ownerState:m,"aria-selected":l,"aria-posinset":u+1,"aria-setsize":f,role:`tab`,internalDisabledThemeFocusVisible:!0,...s};return p?(0,H.jsx)(Bte,{...v,index:u,ref:t,children:_}):(0,H.jsx)(Pw,{ref:t,tabIndex:l?0:-1,...v,children:_})});function Vte(e){return Zs(`MuiStepConnector`,e)}Qs(`MuiStepConnector`,[`root`,`horizontal`,`vertical`,`alternativeLabel`,`active`,`completed`,`disabled`,`line`]);var Hte=e=>{let{classes:t,orientation:n,alternativeLabel:r,active:i,completed:a,disabled:o}=e;return El({root:[`root`,n,r&&`alternativeLabel`,i&&`active`,a&&`completed`,o&&`disabled`],line:[`line`]},Vte,t)},Ute=G(`div`,{name:`MuiStepConnector`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({flex:`1 1 auto`,variants:[{props:{orientation:`vertical`},style:{marginLeft:12}},{props:{orientation:`vertical`,alternativeLabel:!0},style:{marginLeft:`auto`,marginRight:12}},{props:{orientation:`horizontal`,alternativeLabel:!0},style:{position:`absolute`,top:12,left:`calc(-50% + 20px)`,right:`calc(50% + 20px)`}}]}),Wte=G(`span`,{name:`MuiStepConnector`,slot:`Line`})(Wd(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[400]:e.palette.grey[600];return{display:`block`,borderColor:e.vars?e.vars.palette.StepConnector.border:t,variants:[{props:{orientation:`horizontal`},style:{borderTopStyle:`solid`,borderTopWidth:1}},{props:{orientation:`vertical`},style:{borderLeftStyle:`solid`,borderLeftWidth:1,minHeight:24}}]}})),Gte=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiStepConnector`}),{className:r,...i}=n,{alternativeLabel:a,orientation:o=`horizontal`}=fw(),{active:s,disabled:c,completed:l}=L.useContext(pw),u={...n,alternativeLabel:a,orientation:o,active:s,completed:l,disabled:c},d=Hte(u);return(0,H.jsx)(Ute,{className:U(d.root,r),ref:t,ownerState:u,...i,children:(0,H.jsx)(Wte,{className:d.line,ownerState:u})})});function Kte(e){return Zs(`MuiStepper`,e)}Qs(`MuiStepper`,[`root`,`horizontal`,`vertical`,`nonLinear`,`alternativeLabel`]);var qte=e=>{let{orientation:t,nonLinear:n,alternativeLabel:r,classes:i}=e;return El({root:[`root`,t,n&&`nonLinear`,r&&`alternativeLabel`]},Kte,i)},Iw=G(`ol`,{name:`MuiStepper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.nonLinear&&t.nonLinear]}})({display:`flex`,listStyle:`none`,margin:0,padding:0,variants:[{props:{orientation:`horizontal`},style:{flexDirection:`row`,alignItems:`center`}},{props:{orientation:`horizontal`,alternativeLabel:!1},style:{gap:8}},{props:{orientation:`vertical`},style:{flexDirection:`column`}},{props:{alternativeLabel:!0},style:{alignItems:`flex-start`}},{props:{orientation:`vertical`,alternativeLabel:!0},style:{alignItems:`flex-end`}}]}),Jte=(0,H.jsx)(Gte,{});function Yte(e){let{children:t,className:n,component:r,forwardedRef:i,isRtl:a,orientation:o,ownerState:s,...c}=e,l=_x({orientation:o,isRtl:a}),u=l.getContainerProps(i,c.onFocus,c.onKeyDown);return(0,H.jsx)(fx.Provider,{value:l,children:(0,H.jsx)(Iw,{as:r,ownerState:s,className:n,role:`tablist`,"aria-orientation":o,...c,...u,children:t})})}var Xte=L.forwardRef(function(e,t){let n=Wc(),r=Gd({props:e,name:`MuiStepper`}),{activeStep:i=0,alternativeLabel:a=!1,children:o,className:s,component:c=`ol`,connector:l=Jte,nonLinear:u=!1,orientation:d=`horizontal`,...f}=r,p={...r,nonLinear:u,alternativeLabel:a,orientation:d,component:c},m=qte(p),h=L.Children.toArray(o).filter(Boolean),g=h.length,_=h.some(e=>{if(!L.isValidElement(e))return!1;if(e.type===Fw)return!0;let t=e.props.children;return t?L.Children.toArray(t).some(e=>L.isValidElement(e)&&e.type===Fw):!1}),v=h.map((e,t)=>L.cloneElement(e,{index:t,last:t+1===g,...e.props})),y=L.useMemo(()=>({activeStep:i,alternativeLabel:a,connector:l,nonLinear:u,orientation:d,totalSteps:g,isTabList:_}),[i,a,l,u,d,g,_]);return _?(0,H.jsx)(dw.Provider,{value:y,children:(0,H.jsx)(Yte,{forwardedRef:t,isRtl:n,className:U(m.root,s),component:c,orientation:d,ownerState:p,...f,children:v})}):(0,H.jsx)(dw.Provider,{value:y,children:(0,H.jsx)(Iw,{as:c,ownerState:p,className:U(m.root,s),ref:t,...f,children:v})})});function Zte(e){return Zs(`MuiTab`,e)}var Lw=Qs(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`icon`]),Qte=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:a,label:o,selected:s,disabled:c}=e;return El({root:[`root`,a&&o&&`labelIcon`,`textColor${K(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`icon`]},Zte,t)},$te=G(Em,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${K(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${Lw.icon}`]:t.icon}]}})(Wd(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:`relative`,minHeight:48,flexShrink:0,padding:`12px 16px`,overflow:`hidden`,whiteSpace:`normal`,textAlign:`center`,lineHeight:1.25,...e.focusVisible&&Su(3),variants:[{props:({ownerState:e})=>e.label&&(e.iconPosition===`top`||e.iconPosition===`bottom`),style:{flexDirection:`column`}},{props:({ownerState:e})=>e.label&&e.iconPosition!==`top`&&e.iconPosition!==`bottom`,style:{flexDirection:`row`}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`top`,style:{[`& > .${Lw.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${Lw.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${Lw.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${Lw.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${Lw.selected}`]:{opacity:1},...e.focusVisible&&{[`&.${Cm.focusVisible}`]:{opacity:1}},[`&.${Lw.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${Lw.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Lw.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${Lw.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Lw.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:`none`}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),Rw=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiTab`}),{className:r,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:o,icon:s,iconPosition:c=`top`,indicator:l,label:u,onChange:d,onClick:f,onFocus:p,selected:m,selectionFollowsFocus:h,textColor:g=`inherit`,value:_,wrapped:v=!1,...y}=n,b=px(),x=vx({id:_,ref:t,disabled:i,selected:m}),S=b.getItemMap().size===0&&m?0:x.tabIndex,C={...n,disabled:i,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:c,label:!!u,fullWidth:o,textColor:g,wrapped:v},w=Qte(C),T=s&&u&&L.isValidElement(s)?L.cloneElement(s,{className:U(w.icon,s.props.className)}):s;return(0,H.jsxs)($te,{internalNativeButton:!0,focusRipple:!a,className:U(w.root,r),ref:x.ref,role:`tab`,"aria-selected":m,disabled:i,onClick:e=>{!m&&d&&d(e,_),f&&f(e)},onFocus:e=>{h&&!m&&d&&d(e,_),p&&p(e)},tabIndex:S,ownerState:C,...y,children:[c===`top`||c===`start`?(0,H.jsxs)(L.Fragment,{children:[T,u]}):(0,H.jsxs)(L.Fragment,{children:[u,T]}),l]})}),zw=L.createContext();function ene(e){return Zs(`MuiTable`,e)}Qs(`MuiTable`,[`root`,`stickyHeader`]);var tne=e=>{let{classes:t,stickyHeader:n}=e;return El({root:[`root`,n&&`stickyHeader`]},ene,t)},nne=G(`table`,{name:`MuiTable`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(Wd(({theme:e})=>({display:`table`,width:`100%`,borderCollapse:`collapse`,borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:`left`,captionSide:`bottom`},variants:[{props:({ownerState:e})=>e.stickyHeader,style:{borderCollapse:`separate`}}]}))),Bw=`table`,Vw=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiTable`}),{className:r,component:i=Bw,padding:a=`normal`,size:o=`medium`,stickyHeader:s=!1,...c}=n,l={...n,component:i,padding:a,size:o,stickyHeader:s},u=tne(l),d=L.useMemo(()=>({padding:a,size:o,stickyHeader:s}),[a,o,s]);return(0,H.jsx)(zw.Provider,{value:d,children:(0,H.jsx)(nne,{as:i,role:i===Bw?null:`table`,ref:t,className:U(u.root,r),ownerState:l,...c})})}),Hw=L.createContext();function rne(e){return Zs(`MuiTableBody`,e)}Qs(`MuiTableBody`,[`root`]);var ine=e=>{let{classes:t}=e;return El({root:[`root`]},rne,t)},ane=G(`tbody`,{name:`MuiTableBody`,slot:`Root`})({display:`table-row-group`}),one={variant:`body`},Uw=`tbody`,Ww=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiTableBody`}),{className:r,component:i=Uw,...a}=n,o={...n,component:i},s=ine(o);return(0,H.jsx)(Hw.Provider,{value:one,children:(0,H.jsx)(ane,{className:U(s.root,r),as:i,ref:t,role:i===Uw?null:`rowgroup`,ownerState:o,...a})})});function sne(e){return Zs(`MuiTableCell`,e)}var cne=Qs(`MuiTableCell`,[`root`,`head`,`body`,`footer`,`sizeSmall`,`sizeMedium`,`paddingCheckbox`,`paddingNone`,`alignLeft`,`alignCenter`,`alignRight`,`alignJustify`,`stickyHeader`]),lne=e=>{let{classes:t,variant:n,align:r,padding:i,size:a,stickyHeader:o}=e;return El({root:[`root`,n,o&&`stickyHeader`,r!==`inherit`&&`align${K(r)}`,i!==`normal`&&`padding${K(i)}`,`size${K(a)}`]},sne,t)},une=G(`td`,{name:`MuiTableCell`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${K(n.size)}`],n.padding!==`normal`&&t[`padding${K(n.padding)}`],n.align!==`inherit`&&t[`align${K(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(Wd(({theme:e})=>({...e.typography.body2,display:`table-cell`,verticalAlign:`inherit`,borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
|
|
244
|
+
${e.palette.mode===`light`?e.lighten(e.alpha(e.palette.divider,1),.88):e.darken(e.alpha(e.palette.divider,1),.68)}`,textAlign:`left`,padding:16,variants:[{props:{variant:`head`},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:`body`},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:`footer`},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:`small`},style:{padding:`6px 16px`,[`&.${cne.paddingCheckbox}`]:{width:24,padding:`0 12px 0 16px`,"& > *":{padding:0}}}},{props:{padding:`checkbox`},style:{width:48,padding:`0 0 0 4px`}},{props:{padding:`none`},style:{padding:0}},{props:{align:`left`},style:{textAlign:`left`}},{props:{align:`center`},style:{textAlign:`center`}},{props:{align:`right`},style:{textAlign:`right`,flexDirection:`row-reverse`}},{props:{align:`justify`},style:{textAlign:`justify`}},{props:({ownerState:e})=>e.stickyHeader,style:{position:`sticky`,top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),Z=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiTableCell`}),{align:r=`inherit`,className:i,component:a,padding:o,scope:s,size:c,sortDirection:l,variant:u,...d}=n,f=L.useContext(zw),p=L.useContext(Hw),m=p&&p.variant===`head`,h;h=a||(m?`th`:`td`);let g=s;h===`td`?g=void 0:!g&&m&&(g=`col`);let _=u||p&&p.variant,v={...n,align:r,component:h,padding:o||(f&&f.padding?f.padding:`normal`),size:c||(f&&f.size?f.size:`medium`),sortDirection:l,stickyHeader:_===`head`&&f&&f.stickyHeader,variant:_},y=lne(v),b=null;return l&&(b=l===`asc`?`ascending`:`descending`),(0,H.jsx)(une,{as:h,ref:t,className:U(y.root,i),"aria-sort":b,scope:g,ownerState:v,...d})});function dne(e){return Zs(`MuiTableFooter`,e)}Qs(`MuiTableFooter`,[`root`]);var fne=e=>{let{classes:t}=e;return El({root:[`root`]},dne,t)},pne=G(`tfoot`,{name:`MuiTableFooter`,slot:`Root`})({display:`table-footer-group`}),mne={variant:`footer`},Gw=`tfoot`,hne=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiTableFooter`}),{className:r,component:i=Gw,...a}=n,o={...n,component:i},s=fne(o);return(0,H.jsx)(Hw.Provider,{value:mne,children:(0,H.jsx)(pne,{as:i,className:U(s.root,r),ref:t,role:i===Gw?null:`rowgroup`,ownerState:o,...a})})});function gne(e){return Zs(`MuiTableHead`,e)}Qs(`MuiTableHead`,[`root`]);var _ne=e=>{let{classes:t}=e;return El({root:[`root`]},gne,t)},vne=G(`thead`,{name:`MuiTableHead`,slot:`Root`})({display:`table-header-group`}),yne={variant:`head`},Kw=`thead`,qw=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiTableHead`}),{className:r,component:i=Kw,...a}=n,o={...n,component:i},s=_ne(o);return(0,H.jsx)(Hw.Provider,{value:yne,children:(0,H.jsx)(vne,{as:i,className:U(s.root,r),ref:t,role:i===Kw?null:`rowgroup`,ownerState:o,...a})})});function bne(e){return Zs(`MuiToolbar`,e)}Qs(`MuiToolbar`,[`root`,`gutters`,`regular`,`dense`]);var xne=e=>{let{classes:t,disableGutters:n,variant:r}=e;return El({root:[`root`,!n&&`gutters`,r]},bne,t)},Sne=G(`div`,{name:`MuiToolbar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(Wd(({theme:e})=>({position:`relative`,display:`flex`,alignItems:`center`,variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up(`sm`)]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:`dense`},style:{minHeight:48}},{props:{variant:`regular`},style:e.mixins.toolbar}]}))),Jw=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiToolbar`}),{className:r,component:i=`div`,disableGutters:a=!1,variant:o=`regular`,...s}=n,c={...n,component:i,disableGutters:a,variant:o},l=xne(c);return(0,H.jsx)(Sne,{as:i,className:U(l.root,r),ref:t,ownerState:c,...s})}),Cne=sp((0,H.jsx)(`path`,{d:`M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z`}),`KeyboardArrowLeft`),wne=sp((0,H.jsx)(`path`,{d:`M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z`}),`KeyboardArrowRight`);function Tne(e){return Zs(`MuiTableRow`,e)}var Yw=Qs(`MuiTableRow`,[`root`,`selected`,`hover`,`head`,`footer`]),Ene=e=>{let{classes:t,selected:n,hover:r,head:i,footer:a}=e;return El({root:[`root`,n&&`selected`,r&&`hover`,i&&`head`,a&&`footer`]},Tne,t)},Dne=G(`tr`,{name:`MuiTableRow`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(Wd(({theme:e})=>({color:`inherit`,display:`table-row`,verticalAlign:`middle`,outline:0,[`&.${Yw.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Yw.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)}}}))),Xw=`tr`,Zw=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiTableRow`}),{className:r,component:i=Xw,hover:a=!1,selected:o=!1,...s}=n,c=L.useContext(Hw),l={...n,component:i,hover:a,selected:o,head:c&&c.variant===`head`,footer:c&&c.variant===`footer`},u=Ene(l);return(0,H.jsx)(Dne,{as:i,ref:t,className:U(u.root,r),role:i===Xw?null:`row`,ownerState:l,...s})}),One=sp((0,H.jsx)(`path`,{d:`M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z`}),`ArrowDownward`);function kne(e){return Zs(`MuiTableSortLabel`,e)}var Qw=Qs(`MuiTableSortLabel`,[`root`,`active`,`icon`,`directionDesc`,`directionAsc`]),Ane=e=>{let{classes:t,direction:n,active:r}=e;return El({root:[`root`,r&&`active`,`direction${K(n)}`],icon:[`icon`]},kne,t)},jne=G(Em,{name:`MuiTableSortLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.active&&t.active]}})(Wd(({theme:e})=>({cursor:`pointer`,display:`inline-flex`,justifyContent:`flex-start`,flexDirection:`inherit`,alignItems:`center`,"&:focus":{color:(e.vars||e).palette.text.secondary},"&:hover":{color:(e.vars||e).palette.text.secondary,[`& .${Qw.icon}`]:{opacity:.5}},[`&.${Qw.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${Qw.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}}))),Mne=G(`span`,{name:`MuiTableSortLabel`,slot:`Icon`})(Wd(({theme:e})=>({fontSize:18,marginRight:4,marginLeft:4,opacity:0,...pf(e,[`opacity`,`transform`],{duration:e.transitions.duration.shorter}),userSelect:`none`,variants:[{props:{direction:`desc`},style:{transform:`rotate(0deg)`}},{props:{direction:`asc`},style:{transform:`rotate(180deg)`}}]}))),$w=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiTableSortLabel`}),{active:r=!1,children:i,className:a,direction:o=`asc`,hideSortIcon:s=!1,IconComponent:c=One,slots:l={},slotProps:u={},...d}=n,f={...n,active:r,direction:o,hideSortIcon:s,IconComponent:c},p=Ane(f),m={slots:l,slotProps:u},[h,g]=Up(`root`,{elementType:jne,externalForwardedProps:m,ownerState:f,className:U(p.root,a),ref:t,additionalProps:{internalNativeButton:!1}}),[_,v]=Up(`icon`,{elementType:Mne,externalForwardedProps:m,ownerState:f,className:p.icon});return(0,H.jsxs)(h,{disableRipple:!0,component:`span`,...g,...d,children:[i,s&&!r?null:(0,H.jsx)(_,{as:c,...v})]})});function Nne(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function Pne(e,t,n,r={},i=()=>{}){let{ease:a=Nne,duration:o=300}=r,s=null,c=t[e],l=!1,u=()=>{l=!0},d=r=>{if(l){i(Error(`Animation cancelled`));return}s===null&&(s=r);let u=Math.min(1,(r-s)/o);if(t[e]=a(u)*(n-c)+c,u>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(d)};return c===n?(i(Error(`Element already at target position`)),u):(requestAnimationFrame(d),u)}var Fne={width:99,height:99,position:`absolute`,top:-9999,overflow:`scroll`,pointerEvents:`none`};function Ine(e){let{onChange:t,...n}=e,r=L.useRef(),i=L.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return qd(()=>{let e=cp(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=up(i.current);return n.addEventListener(`resize`,e),()=>{e.clear(),n.removeEventListener(`resize`,e)}},[t]),L.useEffect(()=>{a(),t(r.current)},[t]),(0,H.jsx)(`div`,{style:Fne,...n,ref:i})}function Lne(e){return Zs(`MuiTabScrollButton`,e)}var Rne=Qs(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),zne=e=>{let{classes:t,orientation:n,disabled:r}=e;return El({root:[`root`,n,r&&`disabled`]},Lne,t)},Bne=G(Em,{name:`MuiTabScrollButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${Rne.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),Vne=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiTabScrollButton`}),{className:r,slots:i={},slotProps:a={},direction:o,orientation:s,disabled:c,...l}=n,{nativeButton:u,...d}=l,f=Wc(),p={isRtl:f,...n},m=zne(p),h=i.StartScrollButtonIcon??Cne,g=i.EndScrollButtonIcon??wne,_=m_({elementType:h,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:p}),v=m_({elementType:g,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:p});return(0,H.jsx)(Bne,{component:`div`,className:U(m.root,r),ref:t,role:null,ownerState:p,tabIndex:null,...d,style:{...d.style,...s===`vertical`&&{"--TabScrollButton-svgRotate":`rotate(${f?-90:90}deg)`}},children:o===`left`?(0,H.jsx)(h,{..._}):(0,H.jsx)(g,{...v})})});function Hne(e){return Zs(`MuiTabs`,e)}var eT=Qs(`MuiTabs`,[`root`,`vertical`,`list`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]),Une=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return El({root:[`root`,t&&`vertical`],scroller:[`scroller`,n&&`fixed`,r&&`hideScrollbar`,i&&`scrollableX`,a&&`scrollableY`],list:[`list`,t&&`vertical`,o&&`centered`],indicator:[`indicator`],scrollButtons:[`scrollButtons`,s&&`scrollButtonsHideMobile`],scrollableX:[i&&`scrollableX`],hideScrollbar:[r&&`hideScrollbar`]},Hne,c)},Wne=G(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${eT.scrollButtons}`]:t.scrollButtons},{[`& .${eT.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(Wd(({theme:e})=>({overflow:`hidden`,minHeight:48,WebkitOverflowScrolling:`touch`,display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${eT.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),Gne=G(`div`,{name:`MuiTabs`,slot:`Scroller`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:`relative`,display:`inline-block`,flex:`1 1 auto`,whiteSpace:`nowrap`,variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:`hidden`,width:`100%`}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:`auto`,overflowY:`hidden`}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:`auto`,overflowX:`hidden`}}]}),Kne=G(`div`,{name:`MuiTabs`,slot:`List`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,n.centered&&t.centered]}})({display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.centered,style:{justifyContent:`center`}}]}),qne=G(`span`,{name:`MuiTabs`,slot:`Indicator`})(Wd(({theme:e})=>({position:`absolute`,height:2,bottom:0,width:`100%`,...pf(e),variants:[{props:{indicatorColor:`primary`},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:`secondary`},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:`100%`,width:2,right:0}}]}))),Jne=G(Ine)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),tT={},Yne=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiTabs`}),r=zd(),i=Wc(),a=Lp(r.motion.reducedMotion,!1),{"aria-label":o,"aria-labelledby":s,action:c,centered:l=!1,children:u,className:d,component:f=`div`,allowScrollButtonsMobile:p=!1,indicatorColor:m=`primary`,onChange:h,orientation:g=`horizontal`,scrollButtons:_=`auto`,selectionFollowsFocus:v,slots:y={},slotProps:b={},textColor:x=`primary`,value:S,variant:C=`standard`,visibleScrollbar:w=!1,...T}=n,E=C===`scrollable`,D=g===`vertical`,O=D?`scrollTop`:`scrollLeft`,ee=D?`top`:`left`,te=D?`bottom`:`right`,k=D?`clientHeight`:`clientWidth`,A=D?`height`:`width`,j={...n,component:f,allowScrollButtonsMobile:p,indicatorColor:m,orientation:g,vertical:D,scrollButtons:_,textColor:x,variant:C,visibleScrollbar:w,fixed:!E,hideScrollbar:E&&!w,scrollableX:E&&!D,scrollableY:E&&D,centered:l&&!E,scrollButtonsHideMobile:!p},M=Une(j),ne=m_({elementType:y.startScrollButtonIcon,externalSlotProps:b.startScrollButtonIcon,ownerState:j}),re=m_({elementType:y.endScrollButtonIcon,externalSlotProps:b.endScrollButtonIcon,ownerState:j}),[ie,ae]=L.useState(!1),[N,oe]=L.useState(tT),[se,ce]=L.useState(!1),[P,le]=L.useState(!1),[ue,F]=L.useState(!1),I=S===!1?null:S,[de,fe]=L.useState(!1),[pe,me]=L.useState({overflow:`hidden`,scrollbarWidth:0}),he=new Map,ge=L.useRef(null),_e=L.useRef(null),ve={slots:y,slotProps:b},ye=()=>{let e=ge.current,t;if(e){let n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}let n;if(e&&S!==!1){let e=_e.current.children;if(e.length>0){let t=e[he.get(S)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},be=hp(()=>{let{tabsMeta:e,tabMeta:t}=ye(),n=0,r;D?(r=`top`,t&&e&&(n=t.top-e.top+e.scrollTop)):(r=i?`right`:`left`,t&&e&&(n=(i?-1:1)*(t[r]-e[r]+e.scrollLeft)));let a={[r]:n,[A]:t?t[A]:0};if(typeof N[r]!=`number`||typeof N[A]!=`number`)oe(a);else{let e=Math.abs(N[r]-a[r]),t=Math.abs(N[A]-a[A]);(e>=1||t>=1)&&oe(a)}}),xe=(e,{animation:t=!0}={})=>{t&&!a.shouldReduceMotion?Pne(O,ge.current,e,{duration:r.transitions.duration.standard}):ge.current[O]=e},R=e=>{let t=ge.current[O];t+=D?e:e*(i?-1:1),xe(t)},z=()=>{let e=ge.current[k],t=0,n=Array.from(_e.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[k]>e){r===0&&(t=e);break}t+=i[k]}return t},B=()=>{R(-1*z())},Se=()=>{R(z())},[Ce,{onChange:we,...Te}]=Up(`scrollbar`,{className:U(M.scrollableX,M.hideScrollbar),elementType:Jne,shouldForwardComponentProp:!0,externalForwardedProps:ve,ownerState:j}),Ee=L.useCallback(e=>{we?.(e),me({overflow:null,scrollbarWidth:e})},[we]),[De,Oe]=Up(`scrollButtons`,{className:M.scrollButtons,elementType:Vne,externalForwardedProps:ve,ownerState:j,additionalProps:{orientation:g,slots:{StartScrollButtonIcon:y.startScrollButtonIcon,EndScrollButtonIcon:y.endScrollButtonIcon},slotProps:{startScrollButtonIcon:ne,endScrollButtonIcon:re}}}),ke=()=>{let e={};e.scrollbarSizeListener=E?(0,H.jsx)(Ce,{...Te,onChange:Ee}):null;let t=E&&(_===`auto`&&(se||P)||_===!0);return e.scrollButtonStart=t?(0,H.jsx)(De,{direction:i?`right`:`left`,onClick:B,disabled:!se,...Oe}):null,e.scrollButtonEnd=t?(0,H.jsx)(De,{direction:i?`left`:`right`,onClick:Se,disabled:!P,...Oe}):null,e},Ae=hp(e=>{let{tabsMeta:t,tabMeta:n}=ye();if(n&&t){if(n[ee]<t[ee]){let r=t[O]+(n[ee]-t[ee]);xe(r,{animation:e})}else if(n[te]>t[te]){let r=t[O]+(n[te]-t[te]);xe(r,{animation:e})}}}),V=hp(()=>{E&&_!==!1&&F(!ue)});L.useEffect(()=>{let e=cp(()=>{ge.current&&be()}),t,n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),V()},r=up(ge.current);r.addEventListener(`resize`,e);let i;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(e),Array.from(_e.current.children).forEach(e=>{t.observe(e)})),typeof MutationObserver<`u`&&(i=new MutationObserver(n),i.observe(_e.current,{childList:!0})),()=>{e.clear(),r.removeEventListener(`resize`,e),i?.disconnect(),t?.disconnect()}},[be,V]),L.useEffect(()=>{let e=Array.from(_e.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&E&&_!==!1){let n=e[0],r=e[t-1],i={root:ge.current,threshold:.99},a=new IntersectionObserver(e=>{ce(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{le(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[E,_,ue,u?.length]),L.useEffect(()=>{ae(!0)},[]),L.useEffect(()=>{be()}),L.useEffect(()=>{Ae(tT!==N)},[Ae,N]),L.useImperativeHandle(c,()=>({updateIndicator:be,updateScrollButtons:V}),[be,V]);let[je,Me]=Up(`indicator`,{className:M.indicator,elementType:qne,externalForwardedProps:ve,ownerState:j,additionalProps:{style:N}}),Ne=(0,H.jsx)(je,{...Me}),Pe=_x({activeItemId:de?void 0:I,orientation:g,isRtl:i}),Fe=Pe.getContainerProps(),Ie=L.Children.toArray(u).filter(L.isValidElement).map((e,t)=>{let n=e.props.value===void 0?t:e.props.value;return he.set(n,t),{child:e,index:t,childValue:n}}).map(({child:e,childValue:t})=>{let n=t===S;return L.cloneElement(e,{fullWidth:C===`fullWidth`,indicator:n&&!ie&&Ne,selected:n,selectionFollowsFocus:v,onChange:h,textColor:x,value:t})}),Le=ke(),[Re,ze]=Up(`root`,{ref:t,className:U(M.root,d),elementType:Wne,externalForwardedProps:{...ve,...T,component:f},ownerState:j}),[Be,Ve]=Up(`scroller`,{ref:ge,className:M.scroller,elementType:Gne,externalForwardedProps:ve,ownerState:j,additionalProps:{style:{overflow:pe.overflow,[D?`margin${i?`Left`:`Right`}`:`marginBottom`]:w?void 0:-pe.scrollbarWidth}}}),He=Kd(Fe.ref,_e),Ue=e=>{let t=_e.current;Xd(Jd(t))?.getAttribute(`role`)===`tab`&&Fe.onKeyDown(e)},[We,Ge]=Up(`list`,{ref:He,className:M.list,elementType:Kne,externalForwardedProps:ve,ownerState:j,getSlotProps:e=>({...e,onBlur:t=>{ay(t.currentTarget,t.relatedTarget)||fe(!1),e.onBlur?.(t)},onKeyDown:t=>{Ue(t),e.onKeyDown?.(t)},onFocus:t=>{fe(!0),Fe.onFocus(t),e.onFocus?.(t)}})});return(0,H.jsxs)(Re,{...ze,children:[Le.scrollButtonStart,Le.scrollbarSizeListener,(0,H.jsxs)(Be,{...Ve,children:[(0,H.jsx)(We,{"aria-label":o,"aria-labelledby":s,"aria-orientation":g===`vertical`?`vertical`:null,role:`tablist`,...Ge,children:(0,H.jsx)(fx.Provider,{value:Pe,children:Ie})}),ie&&Ne]}),Le.scrollButtonEnd]})});function Xne(e){return Zs(`MuiTextField`,e)}Qs(`MuiTextField`,[`root`]);var Zne={standard:rb,filled:Ey,outlined:jS},Qne=e=>{let{classes:t}=e;return El({root:[`root`]},Xne,t)},$ne=G(Ay,{name:`MuiTextField`,slot:`Root`})({}),nT=L.forwardRef(function(e,t){let n=Gd({props:e,name:`MuiTextField`}),{autoComplete:r,autoFocus:i=!1,children:a,className:o,color:s=`primary`,defaultValue:c,disabled:l=!1,error:u=!1,fullWidth:d=!1,helperText:f,id:p,inputRef:m,label:h,maxRows:g,minRows:_,multiline:v=!1,name:y,onBlur:b,onChange:x,onFocus:S,placeholder:C,required:w=!1,rows:T,select:E=!1,slots:D={},slotProps:O={},type:ee,value:te,variant:k=`outlined`,...A}=n,j={...n,autoFocus:i,color:s,disabled:l,error:u,fullWidth:d,multiline:v,required:w,select:E,variant:k},M=Qne(j),ne=Qc(p),re=f&&ne?`${ne}-helper-text`:void 0,ie=h&&ne?`${ne}-label`:void 0,ae=Zne[k],N={slots:D,slotProps:O},[oe,se]=Up(`select`,{elementType:xC,externalForwardedProps:N,ownerState:j}),ce=E&&se.native,P={},le=N.slotProps.inputLabel;k===`outlined`&&(le&&le.shrink!==void 0&&(P.notched=le.shrink),P.label=h),E&&(ce||(P.id=void 0),P[`aria-describedby`]=void 0);let[ue,F]=Up(`root`,{elementType:$ne,shouldForwardComponentProp:!0,externalForwardedProps:{...N,...A},ownerState:j,className:U(M.root,o),ref:t,additionalProps:{disabled:l,error:u,fullWidth:d,required:w,color:s,variant:k}}),[I,de]=Up(`input`,{elementType:ae,externalForwardedProps:N,additionalProps:P,ownerState:j}),[fe,pe]=Up(`inputLabel`,{elementType:pb,externalForwardedProps:N,ownerState:j}),[L,me]=Up(`htmlInput`,{elementType:`input`,externalForwardedProps:N,ownerState:j}),[he,ge]=Up(`formHelperText`,{elementType:Hy,externalForwardedProps:N,ownerState:j}),_e=(0,H.jsx)(I,{"aria-describedby":re,autoComplete:r,autoFocus:i,defaultValue:c,fullWidth:d,multiline:v,name:y,rows:T,maxRows:g,minRows:_,type:ee,value:te,id:ne,inputRef:m,onBlur:b,onChange:x,onFocus:S,placeholder:C,inputProps:me,slots:{input:D.htmlInput?L:void 0},...de});return(0,H.jsxs)(ue,{...F,children:[h!=null&&h!==``&&(0,H.jsx)(fe,{htmlFor:E&&!ce?void 0:ne,id:ie,...E&&!ce&&{component:`div`},...pe,children:h}),E?(0,H.jsx)(oe,{"aria-describedby":re,id:ne,labelId:ie,value:te,input:_e,...se,children:a}):_e,f&&(0,H.jsx)(he,{id:re,...ge,children:f})]})}),ere=L.createContext({}),tre=L.createContext(void 0);function nre(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}function rre(e,t){let{children:n,disabled:r=!1,selected:i=!1,value:a}=e,o=px(),s=vx({id:a,ref:t,disabled:r,selected:i}),c=o.getItemMap().size===0&&i?0:s.tabIndex;return L.cloneElement(L.Children.only(n),{...s,tabIndex:n.props.tabIndex??c})}var ire=L.forwardRef(rre),are=e=>{let{classes:t,fullWidth:n,selected:r,disabled:i,size:a,color:o}=e;return El({root:[`root`,r&&`selected`,i&&`disabled`,n&&`fullWidth`,`size${K(a)}`,o]},Kf,t)},ore=G(Em,{name:`MuiToggleButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`size${K(n.size)}`]]}})(Wd(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${qf.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:`none`,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:`transparent`}},variants:[{props:{color:`standard`},style:{[`&.${qf.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(Fm()).map(([t])=>({props:{color:t},style:{[`&.${qf.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:`100%`}},{props:{size:`small`},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),rT=L.forwardRef(function(e,t){let{value:n,isRovingTabIndex:r,...i}=L.useContext(ere),a=L.useContext(tre),o=Gd({props:dc({...i,selected:nre(e.value,n)},e),name:`MuiToggleButton`}),{children:s,className:c,color:l=`standard`,disabled:u=!1,disableFocusRipple:d=!1,fullWidth:f=!1,onChange:p,onClick:m,selected:h,size:g=`medium`,value:_,...v}=o,y={...o,color:l,disabled:u,disableFocusRipple:d,fullWidth:f,size:g},b=are(y),x=e=>{m&&(m(e,_),e.defaultPrevented)||p&&p(e,_)},S=a||``,C=(0,H.jsx)(ore,{className:U(i.className,b.root,c,S),internalNativeButton:!0,disabled:u,focusRipple:!d,ref:r?void 0:t,onClick:x,onChange:p,value:_,ownerState:y,"aria-pressed":h,...v,children:s});return r?(0,H.jsx)(ire,{disabled:u,selected:h,ref:t,value:_,children:C}):C}),iT=vc({themeId:zr}),sre=Or(),cre=sp((0,H.jsx)(`path`,{d:`M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7 3c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6m7 13H5v-.23c0-.62.28-1.2.76-1.58C7.47 15.82 9.64 15 12 15s4.53.82 6.24 2.19c.48.38.76.97.76 1.58z`}),`AccountBox`),aT=sp((0,H.jsx)(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z`}),`Add`),lre=sp((0,H.jsx)(`path`,{d:`m9.78 11.16-1.42 1.42c-.68-.69-1.34-1.58-1.79-2.94l1.94-.49c.32.89.77 1.5 1.27 2.01M11 6 7 2 3 6h3.02c.02.81.08 1.54.19 2.17l1.94-.49C8.08 7.2 8.03 6.63 8.02 6zm10 0-4-4-4 4h2.99c-.1 3.68-1.28 4.75-2.54 5.88-.5.44-1.01.92-1.45 1.55-.34-.49-.73-.88-1.13-1.24L9.46 13.6c.93.85 1.54 1.54 1.54 3.4v5h2v-5c0-2.02.71-2.66 1.79-3.63 1.38-1.24 3.08-2.78 3.2-7.37z`}),`AltRoute`),ure=sp((0,H.jsx)(`path`,{d:`M19 3h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m4 12h-4v3l-5-5 5-5v3h4z`}),`AssignmentReturn`),dre=sp((0,H.jsx)(`path`,{d:`M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4`}),`AttachMoney`),oT=sp((0,H.jsx)(`path`,{d:`M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-6 8h-4v-2h4zm0-4h-4v-2h4z`}),`BugReport`),sT=sp((0,H.jsx)(`path`,{d:`m22.7 19-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4`}),`Build`),cT=sp((0,H.jsx)(`path`,{d:`M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zM9 14H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2zm-8 4H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2z`}),`CalendarMonth`),fre=sp((0,H.jsx)(`path`,{d:`M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z`}),`CalendarToday`),pre=sp((0,H.jsx)(`path`,{d:`M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2M8 11H4V6h4zm6 0h-4V6h4zm6 0h-4V6h4zM8 18H4v-5h4zm6 0h-4v-5h4zm6 0h-4v-5h4z`}),`CalendarViewMonth`),mre=sp((0,H.jsx)(`path`,{d:`m14 4 2.29 2.29-2.88 2.88 1.42 1.42 2.88-2.88L20 10V4zm-4 0H4v6l2.29-2.29 4.71 4.7V20h2v-8.41l-5.29-5.3z`}),`CallSplit`),hre=sp([(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3.2`},`0`),(0,H.jsx)(`path`,{d:`M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5`},`1`)],`CameraAlt`),lT=sp((0,H.jsx)(`path`,{d:`M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z`}),`Check`),gre=sp((0,H.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z`}),`CheckCircle`),_re=sp((0,H.jsx)(`path`,{d:`M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z`}),`ChevronRight`),uT=sp((0,H.jsx)(`path`,{d:`M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Clear`),vre=sp((0,H.jsx)(`path`,{d:`M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Close`),dT=sp((0,H.jsx)(`path`,{d:`M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z`}),`Code`),yre=sp((0,H.jsx)(`path`,{d:`M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z`}),`Delete`),bre=sp((0,H.jsx)(`path`,{d:`m21.41 10.59-7.99-8c-.78-.78-2.05-.78-2.83 0l-8.01 8c-.78.78-.78 2.05 0 2.83l8.01 8c.78.78 2.05.78 2.83 0l7.99-8c.79-.79.79-2.05 0-2.83M13.5 14.5V12H10v3H8v-4c0-.55.45-1 1-1h4.5V7.5L17 11z`}),`Directions`),fT=sp((0,H.jsx)(`path`,{d:`M20 13H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 19c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2M20 3H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2`}),`Dns`),xre=sp((0,H.jsx)(`path`,{d:`M11 9.16V2c-5 .5-9 4.79-9 10s4 9.5 9 10v-7.16c-1-.41-2-1.52-2-2.84s1-2.43 2-2.84M14.86 11H22c-.48-4.75-4-8.53-9-9v7.16c1 .3 1.52.98 1.86 1.84M13 14.84V22c5-.47 8.52-4.25 9-9h-7.14c-.34.86-.86 1.54-1.86 1.84`}),`DonutSmall`),Sre=sp((0,H.jsx)(`path`,{d:`M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2`}),`DragIndicator`),pT=sp((0,H.jsx)(`path`,{d:`M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z`}),`Edit`),Cre=sp((0,H.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z`}),`Error`),mT=sp((0,H.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z`}),`ErrorOutlined`),wre=sp((0,H.jsx)(`path`,{d:`M10.09 15.59 11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2`}),`ExitToApp`),hT=sp((0,H.jsx)(`path`,{d:`M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z`}),`ExpandMore`),gT=sp((0,H.jsx)(`path`,{d:`M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7s2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11`}),`Extension`),Tre=sp((0,H.jsx)(`path`,{d:`M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z`}),`FilterList`),_T=sp((0,H.jsx)(`path`,{d:`M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z`}),`FirstPage`),Ere=sp((0,H.jsx)(`path`,{d:`M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 12H4V8h16z`}),`FolderOpen`),vT=sp((0,H.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25`}),`HelpOutlined`),Dre=sp((0,H.jsx)(`path`,{d:`M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z`}),`History`),yT=sp((0,H.jsx)(`path`,{d:`M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2z`}),`HourglassFull`),bT=sp((0,H.jsx)(`path`,{d:`M9 3 5 6.99h3V14h2V6.99h3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99z`}),`ImportExport`),Ore=sp((0,H.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z`}),`Info`),kre=sp((0,H.jsx)(`path`,{d:`M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M9 17H7v-7h2zm4 0h-2V7h2zm4 0h-2v-4h2z`}),`InsertChart`),xT=sp((0,H.jsx)(`path`,{d:`M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z`}),`KeyboardArrowDown`),ST=sp((0,H.jsx)(`path`,{d:`M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6z`}),`KeyboardArrowLeft`),CT=sp((0,H.jsx)(`path`,{d:`M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z`}),`KeyboardArrowRight`),wT=sp((0,H.jsx)(`path`,{d:`M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z`}),`KeyboardArrowUp`),TT=sp((0,H.jsx)(`path`,{d:`M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z`}),`LastPage`),Are=sp((0,H.jsx)(`path`,{d:`M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z`}),`Loop`),ET=sp((0,H.jsx)(`path`,{d:`M15 9H9v6h6zm-2 4h-2v-2h2zm8-2V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-2h2c1.1 0 2-.9 2-2v-2h2v-2h-2v-2zm-4 6H7V7h10z`}),`Memory`),DT=sp((0,H.jsx)(`path`,{d:`M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2`}),`MoreHoriz`),OT=sp((0,H.jsx)(`path`,{d:`M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2m6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1z`}),`Notifications`),kT=sp((0,H.jsx)(`path`,{d:`M17.66 8 12 2.35 6.34 8C4.78 9.56 4 11.64 4 13.64s.78 4.11 2.34 5.67 3.61 2.35 5.66 2.35 4.1-.79 5.66-2.35S20 15.64 20 13.64 19.22 9.56 17.66 8M6 14c.01-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 17.99 12 18 14z`}),`Opacity`),jre=sp((0,H.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m.88 15.76V19h-1.75v-1.29c-.74-.18-2.39-.77-3.02-2.96l1.65-.67c.06.22.58 2.09 2.4 2.09.93 0 1.98-.48 1.98-1.61 0-.96-.7-1.46-2.28-2.03-1.1-.39-3.35-1.03-3.35-3.31 0-.1.01-2.4 2.62-2.96V5h1.75v1.24c1.84.32 2.51 1.79 2.66 2.23l-1.58.67c-.11-.35-.59-1.34-1.9-1.34-.7 0-1.81.37-1.81 1.39 0 .95.86 1.31 2.64 1.9 2.4.83 3.01 2.05 3.01 3.45 0 2.63-2.5 3.13-3.02 3.22`}),`Paid`),Mre=sp((0,H.jsx)(`path`,{d:`M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z`}),`Receipt`),AT=sp((0,H.jsx)(`path`,{d:`M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z`}),`Refresh`),jT=sp((0,H.jsx)(`path`,{d:`M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8`}),`Replay`),MT=sp((0,H.jsx)(`path`,{d:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14m-2.17-1.5 2.14-1.53 2.14 1.53-.83-2.46 2.15-1.5h-2.62L9.47 6l-.84 2.54H6l2.14 1.49z`}),`SavedSearch`),NT=sp((0,H.jsx)(`path`,{d:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14`}),`Search`),PT=sp((0,H.jsx)(`path`,{d:`M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6`}),`Settings`),FT=sp((0,H.jsx)(`path`,{d:`m17.21 9-4.38-6.56c-.19-.28-.51-.42-.83-.42s-.64.14-.83.43L6.79 9H2c-.55 0-1 .45-1 1 0 .09.01.18.04.27l2.54 9.27c.23.84 1 1.46 1.92 1.46h13c.92 0 1.69-.62 1.93-1.46l2.54-9.27L23 10c0-.55-.45-1-1-1zM9 9l3-4.4L15 9zm3 8c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2`}),`ShoppingBasket`),IT=sp((0,H.jsx)(`path`,{d:`m6 18 8.5-6L6 6zM16 6v12h2V6z`}),`SkipNext`),LT=sp((0,H.jsx)(`path`,{d:`M6 6h2v12H6zm3.5 6 8.5 6V6z`}),`SkipPrevious`),RT=sp((0,H.jsx)(`path`,{d:`M14.43 10 12 2l-2.43 8H2l6.18 4.41L5.83 22 12 17.31 18.18 22l-2.35-7.59L22 10z`}),`StarRate`),zT=sp((0,H.jsx)(`path`,{d:`M15 3H5c-1.1 0-1.99.9-1.99 2L3 19c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V9zM8 17c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m0-4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m0-4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m6 1V4.5l5.5 5.5z`}),`Summarize`),BT=sp((0,H.jsx)(`path`,{d:`M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2`}),`Timeline`),Nre=sp((0,H.jsx)(`path`,{d:`M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3`}),`Visibility`),Pre=sp((0,H.jsx)(`path`,{d:`M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z`}),`VisibilityOff`),VT=sp((0,H.jsx)(`path`,{d:`M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z`}),`Warning`),HT=sp([(0,H.jsx)(`path`,{d:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14`},`0`),(0,H.jsx)(`path`,{d:`M12 10h-2v2H9v-2H7V9h2V7h1v2h2z`},`1`)],`ZoomIn`),UT=sp((0,H.jsx)(`path`,{d:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14M7 9h5v1H7z`}),`ZoomOut`),WT=365.2425,GT=864e5,KT=6e4,qT=36e5,JT=86400;JT*7,JT*WT/12*3;var YT=Symbol.for(`constructDateFrom`);function XT(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&YT in e?e[YT](t):e instanceof Date?new e.constructor(t):new Date(t)}function ZT(e,t){return XT(t||e,e)}function QT(e,t,n){let r=ZT(e,n?.in);return isNaN(t)?XT(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function $T(e,t,n){let r=ZT(e,n?.in);if(isNaN(t))return XT(n?.in||e,NaN);if(!t)return r;let i=r.getDate(),a=XT(n?.in||e,r.getTime());return a.setMonth(r.getMonth()+t+1,0),i>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function eE(e,t,n){return XT(n?.in||e,+ZT(e)+t)}function tE(e,t,n){return eE(e,t*qT,n)}var nE={};function rE(){return nE}function iE(e,t){let n=rE(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=ZT(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function aE(e){let t=ZT(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-n}function oE(e,...t){let n=XT.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function sE(e,t){let n=ZT(e,t?.in);return n.setHours(0,0,0,0),n}function Fre(e,t,n){let[r,i]=oE(n?.in,e,t),a=sE(r),o=sE(i),s=+a-aE(a),c=+o-aE(o);return Math.round((s-c)/GT)}function cE(e,t,n){let r=ZT(e,n?.in);return r.setTime(r.getTime()+t*KT),r}function lE(e,t,n){return eE(e,t*1e3,n)}function uE(e,t,n){return $T(e,t*12,n)}function dE(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=XT.bind(null,e));let t=ZT(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),XT(r,n||NaN)}function Ire(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=XT.bind(null,e));let t=ZT(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),XT(r,n||NaN)}function fE(e,t,n){let[r,i]=oE(n?.in,e,t),a=pE(r,i),o=Math.abs(Fre(r,i));r.setDate(r.getDate()-a*o);let s=a*(o-Number(pE(r,i)===-a));return s===0?0:s}function pE(e,t){let n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function mE(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function hE(e,t){return+ZT(e)-ZT(t)}function gE(e,t,n){let r=hE(e,t)/KT;return mE(n?.roundingMethod)(r)}function _E(e,t){let n=ZT(e,t?.in);return n.setHours(23,59,59,999),n}function vE(e,t,n){let r=hE(e,t)/1e3;return mE(n?.roundingMethod)(r)}function yE(e,t){let n=ZT(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function bE(e,t){let n=ZT(e,t?.in),r=n.getFullYear(),i=n.getMonth(),a=XT(n,0);return a.setFullYear(r,i+1,0),a.setHours(0,0,0,0),a.getDate()}function xE(e){return sE(Date.now(),e)}var SE=3,CE=2;function wE(e,t,n){let r=n.left,i=n.right;return r===null?i===null?{key:e,val:t,size:2,left:null,right:n}:{key:n.key,val:n.val,size:3,left:{key:e,val:t,size:1,left:null,right:null},right:i}:i===null?{key:r.key,val:r.val,size:3,left:{key:e,val:t,size:1,left:null,right:null},right:{key:n.key,val:n.val,size:1,left:null,right:null}}:{key:n.key,val:n.val,size:1+n.size,left:{key:e,val:t,size:1+r.size,left:null,right:r},right:i}}function TE(e,t,n){let r=n.left,i=n.right;return r===null?i===null?{key:e,val:t,size:2,left:n,right:null}:{key:i.key,val:i.val,size:3,left:{key:n.key,val:n.val,size:1,left:null,right:null},right:{key:e,val:t,size:1,left:null,right:null}}:i===null?{key:n.key,val:n.val,size:3,left:r,right:{key:e,val:t,size:1,left:null,right:null}}:{key:n.key,val:n.val,size:1+n.size,left:r,right:{key:e,val:t,size:1+i.size,left:i,right:null}}}function EE(e,t,n,r){let i=r.left,a=r.right;return i.size<CE*a.size?{key:r.key,val:r.val,size:1+n.size+r.size,left:{key:e,val:t,size:1+n.size+i.size,left:n,right:i},right:a}:{key:i.key,val:i.val,size:1+n.size+r.size,left:{key:e,val:t,size:1+n.size+(i.left?.size??0),left:n,right:i.left},right:{key:r.key,val:r.val,size:1+a.size+(i.right?.size??0),left:i.right,right:a}}}function DE(e,t,n,r){let i=n.left,a=n.right;return a.size<CE*i.size?{key:n.key,val:n.val,size:1+n.size+r.size,left:i,right:{key:e,val:t,size:1+r.size+a.size,left:a,right:r}}:{key:a.key,val:a.val,size:1+n.size+r.size,left:{key:n.key,val:n.val,size:1+i.size+(a.left?.size??0),left:i,right:a.left},right:{key:e,val:t,size:1+r.size+(a.right?.size??0),left:a.right,right:r}}}function OE(e,t,n,r){if(r===null)return e===null?{key:t,val:n,size:1,left:null,right:null}:TE(t,n,e);let i=e;return i.size>SE*r.size?DE(t,n,i,r):{key:t,val:n,size:1+i.size+r.size,left:e,right:r}}function kE(e,t,n,r){if(e===null)return r===null?{key:t,val:n,size:1,left:null,right:null}:wE(t,n,r);let i=r;return i.size>SE*e.size?EE(t,n,e,i):{key:t,val:n,size:1+e.size+i.size,left:e,right:r}}function AE(e,t,n,r){return e===null?r===null?{key:t,val:n,size:1,left:null,right:null}:wE(t,n,r):r===null?TE(t,n,e):r.size>SE*e.size?EE(t,n,e,r):e.size>SE*r.size?DE(t,n,e,r):{key:t,val:n,size:1+e.size+r.size,left:e,right:r}}function jE(e,t,n){return n===null?{key:e,val:t,size:1,left:null,right:null}:OE(jE(e,t,n.left),n.key,n.val,n.right)}function ME(e,t,n){if(n===null)return{key:e,val:t,size:1,left:null,right:null};let r=ME(e,t,n.right);return kE(n.left,n.key,n.val,r)}function NE(e,t,n,r){return e===null?jE(t,n,r):r===null?ME(t,n,e):r.size>SE*e.size?OE(NE(e,t,n,r.left),r.key,r.val,r.right):e.size>SE*r.size?kE(e.left,e.key,e.val,NE(e.right,t,n,r)):{key:t,val:n,size:1+e.size+r.size,left:e,right:r}}function PE(e){let t=e.left;if(t===null)return{k:e.key,v:e.val,rest:e.right};{let n=PE(t);return n.rest=kE(n.rest,e.key,e.val,e.right),n}}function FE(e){let t=e.right;if(t===null)return{k:e.key,v:e.val,rest:e.left};{let n=FE(t);return n.rest=OE(e.left,e.key,e.val,n.rest),n}}function IE(e,t){if(e===null)return t;if(t===null)return e;if(e.size>t.size){let{k:n,v:r,rest:i}=FE(e);return kE(i,n,r,t)}{let{k:n,v:r,rest:i}=PE(t);return OE(e,n,r,i)}}function LE(e,t){return e===null?t:t===null?e:t.size>SE*e.size?OE(LE(e,t.left),t.key,t.val,t.right):e.size>SE*t.size?kE(e.left,e.key,e.val,LE(e.right,t)):IE(e,t)}function RE(e,t,n,r,i){return e<0?{key:t,val:n,size:2,left:null,right:{key:r,val:i,size:1,left:null,right:null}}:{key:t,val:n,size:2,left:{key:r,val:i,size:1,left:null,right:null},right:null}}function zE(e){let t=e.right,n=t.size;return t.size=e.size,e.right=t.left,e.size=e.size-n+(e.right?.size??0),t.left=e,t}function BE(e){let t=e.left,n=t.size;return t.size=e.size,e.left=t.right,e.size=e.size-n+(e.left?.size??0),t.right=e,t}function VE(e){let t=e.left.size,n=e.right?.size??0;if(t>SE*n&&t+n>1){let t=e.left.left?.size??0;return(e.left.right?.size??0)<CE*t||(e.left=zE(e.left)),BE(e)}return e}function HE(e){let t=e.left?.size??0,n=e.right.size;return n>SE*t&&t+n>1?((e.right.left?.size??0)<CE*(e.right.right?.size??0)||(e.right=BE(e.right)),zE(e)):e}function UE(e){return typeof e==`object`&&!!e&&`compare`in e}function WE(e,t){return`asc`in e?e.asc(t):`desc`in e?e.desc(t):e(t)}function GE(...e){return(t,n)=>{for(let r of e)if(`desc`in r){let e=r.desc(t),i=r.desc(n);if(typeof e==`string`&&typeof i==`string`){let t=e.localeCompare(i);if(t===0)continue;return t<0?1:-1}if(UE(e)&&i!==null){let t=e.compare(i);if(t===0)continue;return t<0?1:-1}if(e===i)continue;return e===null?-1:i===null||e<i?1:-1}else{let e=`asc`in r?r.asc:r,i=e(t),a=e(n);if(typeof i==`string`&&typeof a==`string`){let e=i.localeCompare(a);if(e===0)continue;return e<0?-1:1}if(UE(i)&&a!==null){let e=i.compare(a);if(e===0)continue;return e<0?-1:1}if(i===a)continue;return i===null?1:a===null||i<a?-1:1}return 0}}function KE(e,t){return e===t?0:e?1:-1}function qE(e,t){return e-t}function JE(e,t){return e.localeCompare(t)}function YE(e,t){return e.getTime()-t.getTime()}function XE(e,t){return e.compare(t)}function ZE(){let e;function t(t){switch(typeof t){case`object`:if(t instanceof Date){e.compare=YE;return}if(UE(t)){e.compare=XE;return}throw Error(`key type must have compare method`);case`string`:e.compare=JE;return;case`number`:e.compare=qE;return;case`boolean`:e.compare=KE;return;default:throw Error(`cannot compare keys`)}}function n(n,r){return t(n),e.compare(n,r)}return e={compare:n},e}function QE({compare:e},t,n){let r=n;for(;r;){let n=e(t,r.key);if(n===0)return r.val;r=n<0?r.left:r.right}}function $E(e){let t=e;for(;;){let e=t.left;if(e)t=e;else return[t.key,t.val]}}function eD(e){let t=e;for(;;){let e=t.right;if(e)t=e;else return[t.key,t.val]}}function tD({compare:e},t,n,r){function i(r){if(r===null){let e=n(void 0);return e===void 0?null:{key:t,val:e,size:1,left:null,right:null}}let a=e(t,r.key);if(a===0){let e=n(r.val);return e===void 0?IE(r.left,r.right):e===r.val?r:{key:t,val:e,size:r.size,left:r.left,right:r.right}}if(a<0){let e=i(r.left);return e===r.left?r:AE(e,r.key,r.val,r.right)}{let e=i(r.right);return e===r.right?r:AE(r.left,r.key,r.val,e)}}return i(r)}function nD({compare:e},t,n,r,i){let a=!0;function o(i){if(i===null)return{key:t,val:r(void 0,n),size:1,left:null,right:null};let s=e(t,i.key);if(s<0)return i.left=o(i.left),a&&(i.size+=1),VE(i);if(s>0)return i.right=o(i.right),a&&(i.size+=1),HE(i);{let e=r(i.val,n);return e===i.val?(a=!1,i):(a=!1,{key:i.key,val:e,size:i.size,left:i.left,right:i.right})}}return o(i)}function Lre({compare:e},t,n){let r,i,a=null,o=!0;function s(t){if(t===null)return{key:r,val:i,size:1,left:null,right:null};let a=e(r,t.key);return a<0?(t.left=s(t.left),o&&(t.size+=1),VE(t)):a>0?(t.right=s(t.right),o&&(t.size+=1),HE(t)):i===t.val?(o=!1,t):(o=!1,{key:t.key,val:n?n(t.val,i):i,size:t.size,left:t.left,right:t.right})}for([r,i]of t)a=s(a),o=!0;return a}function rD({compare:e},t,n,r){let i,a,o=null,s=!0;function c(t){if(t===null)return{key:i,val:r?r(void 0,a):a,size:1,left:null,right:null};let n=e(i,t.key);if(n<0)return t.left=c(t.left),s&&(t.size+=1),VE(t);if(n>0)return t.right=c(t.right),s&&(t.size+=1),HE(t);{s=!1;let e=r?r(t.val,a):a;return e===t.val?t:{key:t.key,val:e,size:t.size,left:t.left,right:t.right}}}for(a of t)i=n(a),o=c(o),s=!0;return o}function*iD(e,t){let n=[],r=t;for(;r!==null||n.length>0;)r===null?(r=n.pop(),yield e(r.key,r.val),r=r.right):(n.push(r),r=r.left)}function*aD(e,t){let n=[],r=t;for(;r!==null||n.length>0;)r===null?(r=n.pop(),yield e(r.key,r.val),r=r.left):(n.push(r),r=r.right)}function oD(e,t,n){let r=[],i=n,a=t;for(;i!==null||r.length>0;)i===null?(i=r.pop(),a=e(a,i.key,i.val),i=i.right):(r.push(i),i=i.left);return a}function sD(e,t,n){let r=[],i=n,a=t;for(;i!==null||r.length>0;)i===null?(i=r.pop(),a=e(i.key,i.val,a),i=i.left):(r.push(i),i=i.right);return a}function cD(e,t){function n(t){if(!t)return null;let r=n(t.left),i=e(t.val,t.key),a=n(t.right);return i===t.val&&r===t.left&&a===t.right?t:{key:t.key,val:i,size:t.size,left:r,right:a}}return n(t)}function lD(e,t,n){function r(n){if(!n)return null;let i=r(n.left),a=e(n.val,n.key),o=r(n.right);return a===void 0||t&&a===null?LE(i,o):a===n.val&&i===n.left&&o===n.right?n:NE(i,n.key,a,o)}return r(n)}function uD({compare:e},t,n){function r(n){if(!n)return{below:null,val:void 0,above:null};let i=e(t,n.key);if(i<0){let e=r(n.left),t=NE(e.above,n.key,n.val,n.right);return{below:e.below,val:e.val,above:t}}if(i>0){let e=r(n.right);return{below:NE(n.left,n.key,n.val,e.below),val:e.val,above:e.above}}return{below:n.left,val:n.val,above:n.right}}return r(n)}function dD(e,t){function n(t){if(t===null)return[null,null];let[r,i]=n(t.left),[a,o]=n(t.right);if(e(t.key,t.val))return[r===t.left&&a===t.right?t:NE(r,t.key,t.val,a),LE(i,o)];{let e=o===t.right&&i===t.left?t:NE(i,t.key,t.val,o);return[LE(r,a),e]}}return n(t)}function fD(e){return PE(e)}function pD(e){return FE(e)}function mD(e,t,n){if(!t)return!0;if(!n||t.size>n.size)return!1;function r(t,n){if(!t)return!0;let i=uD(e,t.key,n);return i.val===void 0||(t.left?.size??0)>(i.below?.size??0)||(t.right?.size??0)>(i.above?.size??0)?!1:r(t.left,i.below)&&r(t.right,i.above)}return r(t,n)}function hD(e,t,n){if(!t||!n)return!0;function r(t,n){if(!t||!n)return!0;if(t.size===1)return QE(e,t.key,n)===void 0;let i=uD(e,t.key,n);return i.val===void 0&&r(t.left,i.below)&&r(t.right,i.above)}return r(t,n)}function gD({compare:e},t,n){let r=n,i=0;for(;r;){let n=e(t,r.key);if(n===0)return r.left&&(i+=r.left.size),i;n<0?r=r.left:(r.left&&(i+=r.left.size),i+=1,r=r.right)}return-1}function _D(e,t){let n=t,r=e;for(;n;){let e=n.left?n.left.size:0;if(r<e)n=n.left;else if(r===e)return[n.key,n.val];else r-=e+1,n=n.right}}function vD(e,t){if(e<=0||t===null)return null;if(e>=t.size)return t;let n=t.left?t.left.size:0;if(e<=n)return vD(e,t.left);{let r=vD(e-n-1,t.right);return NE(t.left,t.key,t.val,r)}}function yD(e,t){if(e<=0||t===null)return t;if(e>=t.size)return null;let n=t.left?t.left.size:0;return e<n?NE(yD(e,t.left),t.key,t.val,t.right):e===n?jE(t.key,t.val,t.right):yD(e-n-1,t.right)}function bD(e,t,n){if(e<0||n===null)return n;let r=n.left?n.left.size:0;if(e<r){let r=bD(e,t,n.left);return r===n.left?n:AE(r,n.key,n.val,n.right)}if(e===r){let e=t(n.key,n.val);return e===void 0?IE(n.left,n.right):e===n.val?n:{key:n.key,val:e,size:n.size,left:n.left,right:n.right}}{let i=bD(e-r-1,t,n.right);return i===n.right?n:AE(n.left,n.key,n.val,i)}}function xD(e,t,n,r){function i(n,r){if(!n)return r;if(!r)return n;if(!n.left&&!n.right)return tD(e,n.key,e=>e===void 0?n.val:t(n.val,e,n.key),r);if(!r.left&&!r.right)return tD(e,r.key,e=>e===void 0?r.val:t(e,r.val,r.key),n);let a=uD(e,n.key,r),o=i(n.left,a.below),s=i(n.right,a.above);return o===n.left&&s===n.right&&(a.val===void 0||a.val===n.val)?n:a.val===void 0?NE(o,n.key,n.val,s):NE(o,n.key,t(n.val,a.val,n.key),s)}return i(n,r)}function SD(e,t,n,r){function i(n,r){if(!n||!r)return null;let a=uD(e,n.key,r),o=i(n.left,a.below),s=i(n.right,a.above);return a.val===void 0?LE(o,s):o===n.left&&s===n.right&&a.val===n.val?n:NE(o,n.key,t(n.val,a.val,n.key),s)}return i(n,r)}function CD(e,t,n){function r(t,n){if(!t)return null;if(!n)return t;let i=uD(e,t.key,n),a=r(t.left,i.below),o=r(t.right,i.above);return i.val===void 0?a===t.left&&o===t.right?t:NE(a,t.key,t.val,o):LE(a,o)}return r(t,n)}function wD(e,t,n){function r(t,n){if(!t)return n;if(!n)return t;if(!t.left&&!t.right)return tD(e,t.key,e=>e===void 0?t.val:void 0,n);if(!n.left&&!n.right)return tD(e,n.key,e=>e===void 0?n.val:void 0,t);let i=uD(e,t.key,n),a=r(t.left,i.below),o=r(t.right,i.above);return i.val===void 0?NE(a,t.key,t.val,o):LE(a,o)}return r(t,n)}function TD(e,t,n,r){function i(e,n){return t(void 0,e,n)}function a(n,r){if(!r)return n;if(!n)return lD(i,!1,r);let o=uD(e,n.key,r),s=a(n.left,o.below),c=a(n.right,o.above);if(o.val!==void 0){let e=t(n.val,o.val,n.key);return e===void 0?LE(s,c):e===n.val&&s===n.left&&c===n.right?n:NE(s,n.key,e,c)}return s===n.left&&c===n.right?n:NE(s,n.key,n.val,c)}return a(n,r)}function ED(e){return typeof e==`object`&&!!e&&`hash`in e}function DD(e,t){return e*16777619^t}function OD(e){let t=2166136261;for(let n=0;n<e.length;n++)t=DD(t,e.charCodeAt(n));return DD(t,e.length)}function kD(e){return+!!e}function AD(e){if(Number.isInteger(e)&&e>=-2147483648&&e<=2147483647)return e;if(Object.is(e,1/0)||Object.is(e,NaN))return 0;{let t=new ArrayBuffer(8);new Float64Array(t)[0]=e;let n=new Int32Array(t);return DD(DD(2166136261,n[0]),n[1])}}function jD(e){return AD(e.getTime())}function MD(...e){let t=e.length===1?0:2166136261;for(let n=0;n<e.length;n++){let r=e[n];if(r==null)t=DD(t,0);else switch(typeof r){case`string`:t=DD(t,OD(r));break;case`number`:t=DD(t,AD(r));break;case`boolean`:t=DD(t,kD(r));break;default:t=r instanceof Date?DD(t,AD(r.getTime())):ED(r)?DD(t,r.hash()):DD(t,OD(r.toString()))}}return e.length===1?t:DD(t,e.length)}function ND(){let e;function t(t){switch(typeof t){case`object`:if(t instanceof Date){e.compare=YE,e.hash=jD;return}if(ED(t)){e.compare=XE,e.hash=e=>e.hash();return}throw Error(`key type must have compare and hash methods`);case`string`:e.compare=JE,e.hash=OD;return;case`number`:e.compare=qE,e.hash=AD;return;case`boolean`:e.compare=KE,e.hash=kD;return}}function n(n,r){return t(n),e.compare(n,r)}function r(n){return t(n),e.hash(n)}return e={compare:n,hash:r},e}var PD=5,FD=31,ID=-1;function LD(e,t){return 1<<(e>>>t&FD)}function RD(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}function zD(e,t){return RD(e&t-1)}function BD(e,t){return e>>>t&FD}function VD(){}function HD(e,t,n,r,i){r===void 0&&(r=e.hash(t)),i===void 0&&(i=0);let a=n;do if(`children`in a){let e=a.bitmap;if(e!==ID){let t=LD(r,i);if((e&t)===0)return;a=a.children[zD(e,t)],i+=PD}else a=a.children[BD(r,i)],i+=PD}else if(`key`in a)return r===a.hash&&e.compare(t,a.key)===0?a.val:void 0;else if(r===a.hash)return QE(e,t,a.collision);else return;while(a);throw Error(`Internal immutable-collections violation: node undefined during lookup`)}function UD(e,t,n){let r=t.hash,i=n.hash,a,o;for(;;){let s=LD(r,e),c=LD(i,e);if(s===c){let t=[,],n={bitmap:s,children:t};a===void 0&&(a=n),o!==void 0&&(o[0]=n),o=t,e+=PD}else{let l={bitmap:s|c,children:BD(r,e)<BD(i,e)?[t,n]:[n,t]};return o!==void 0&&(o[0]=l),a??l}}}function WD(e,t,n,r){let i=e.hash(t);if(r===null)return[{hash:i,key:t,val:n(void 0)},!0];let a,o,s=0,c=0,l=r;do if(`children`in l){let e,r,u=l.bitmap;if(u!==ID){let d=LD(i,c);if(e=zD(u,d),(u&d)===0){let r=l.children,c={hash:i,key:t,val:n(void 0)},f=[...r.slice(0,e),c,...r.slice(e)],p={bitmap:u|d,children:f};return o!==void 0&&(o[s]=p),[a??p,!0]}r={bitmap:u,children:[...l.children]}}else e=BD(i,c),r={bitmap:ID,children:[...l.children]};a===void 0&&(a=r),o!==void 0&&(o[s]=r),o=r.children,s=e,c+=PD,l=r.children[e]}else if(`key`in l){let u,d=!0;if(i===l.hash){let a=e.compare(t,l.key);if(a===0){let e=n(l.val);if(e===l.val)return[r,!1];u={hash:i,key:t,val:e},d=!1}else u={hash:i,collision:RE(a,t,n(void 0),l.key,l.val)}}else u=UD(c,{hash:i,key:t,val:n(void 0)},l);return o!==void 0&&(o[s]=u),[a??u,d]}else{let u,d=!0;if(i===l.hash){let a=tD(e,t,n,l.collision);if(a===l.collision)return[r,!1];d=a.size!==l.collision.size,u={hash:i,collision:a}}else u=UD(c,l,{hash:i,key:t,val:n(void 0)});return o!==void 0&&(o[s]=u),[a??u,d]}while(l);throw Error(`Internal immutable-collections violation: hamt insert reached null`)}function GD(e,t,n,r,i){let a=e.hash(t);if(i===null)return{hash:a,key:t,val:r(void 0,n)};let o,s=0,c=0,l=i;do if(`children`in l){let e,u=l.bitmap;if(u!==ID){let o=LD(a,c);if(e=zD(u,o),(u&o)===0){let s={hash:a,key:t,val:r(void 0,n)};return l.children.splice(e,0,s),l.bitmap|=o,i}}else e=BD(a,c);o=l.children,s=e,c+=PD,l=o[e]}else if(`key`in l){let u;if(a===l.hash){let o=e.compare(t,l.key);if(e.compare(t,l.key)===0)return l.val=r(l.val,n),i;u={hash:a,collision:RE(o,t,r(void 0,n),l.key,l.val)}}else u=UD(c,{hash:a,key:t,val:r(void 0,n)},l);return o===void 0?i=u:o[s]=u,i}else if(a===l.hash)return l.collision=nD(e,t,n,r,l.collision),i;else{let e=UD(c,l,{hash:a,key:t,val:r(void 0,n)});return o===void 0?i=e:o[s]=e,i}while(l);throw Error(`Internal immutable-collections violation: hamt mutate insert reached null`)}function KD(e,t,n){let r=null,i=0,a;a=n?function(e,t){return e===void 0?(i++,t):n(e,t)}:function(e,t){return e===void 0&&i++,t};for(let[n,i]of t)r=GD(e,n,i,a,r);return[r,i]}function qD(e,t,n,r){let i=null,a=0,o;o=r?function(e,t){return e===void 0?(a++,r(void 0,t)):r(e,t)}:function(e,t){return e===void 0&&a++,t};for(let r of t)i=GD(e,n(r),r,o,i);return[i,a]}function JD(e){for(;;)if(`children`in e){if(e.children.length===1)e=e.children[0];else return null}else return e}function YD(e,t,n){let r=e[e.length-1];if(r.node.bitmap===ID){let t=r.node.children;t.splice(r.childIdx,1);let n=~(1<<r.childIdx);if(e.length===1)return{bitmap:n,children:t};{let r=e[e.length-2];return r.node.children[r.childIdx]={bitmap:n,children:t},e[0].node}}if(r.node.children.length===2){let t=JD(r.node.children[1-r.childIdx]);if(t){for(let n=e.length-2;n>=0;n--){let r=e[n];if(r.node.children.length!==1)return r.node.children[r.childIdx]=t,e[0].node}return t}}return r.node.bitmap&=~LD(t,n-PD),r.node.children.splice(r.childIdx,1),e[0].node}function XD(e,t,n){if(e.length>0){let n=e[e.length-1];n.node.children[n.childIdx]=t}e.push({node:t,childIdx:n})}function ZD(e,t,n,r,i){if(n===null)return null;r===void 0&&(r=e.hash(t)),i===void 0&&(i=0);let a=[],o=n;do if(`children`in o){let e,t=o.bitmap;if(t!==ID){let a=LD(r,i);if((t&a)===0)return n;e=zD(t,a)}else e=BD(r,i);let s={bitmap:t,children:[...o.children]};XD(a,s,e),i+=PD,o=s.children[e]}else if(`key`in o)return r===o.hash&&e.compare(t,o.key)===0?a.length===0?null:YD(a,r,i):n;else if(r===o.hash){let i=tD(e,t,VD,o.collision);if(i===o.collision)return n;let s;if(s=i.size===1?{hash:r,key:i.key,val:i.val}:{hash:r,collision:i},a.length>0){let e=a[a.length-1];return e.node.children[e.childIdx]=s,a[0].node}return s}else return n;while(o);throw Error(`Internal immutable-collections violation: hamt remove reached null`)}function QD(e,t,n,r){if(r===null){let r=n(void 0);return r===void 0?[null,0]:[{hash:e.hash(t),key:t,val:r},1]}let i=e.hash(t),a=[],o=0,s=r;do if(`children`in s){let e,c=s.bitmap;if(c!==ID){let l=LD(i,o);if((c&l)===0){let e=n(void 0);if(e===void 0)return[r,0];{let n=s.children,r=zD(c,l),o=[...n.slice(0,r),{hash:i,key:t,val:e},...n.slice(r)],u={bitmap:c|l,children:o};if(a.length>0){let e=a[a.length-1];return e.node.children[e.childIdx]=u,[a[0].node,1]}return[u,1]}}e=zD(c,l)}else e=BD(i,o);let l={bitmap:c,children:[...s.children]};XD(a,l,e),o+=PD,s=l.children[e]}else if(`key`in s){let c,l;if(i===s.hash){let u=e.compare(t,s.key);if(u===0){let e=n(s.val);if(e===void 0)return a.length===0?[null,-1]:[YD(a,i,o),-1];if(e===s.val)return[r,0];c={hash:i,key:t,val:e},l=0}else{let e=n(void 0);if(e===void 0)return[r,0];c={hash:i,collision:RE(u,t,e,s.key,s.val)},l=1}}else{let e=n(void 0);if(e===void 0)return[r,0];c=UD(o,{hash:i,key:t,val:e},s),l=1}if(a.length>0){let e=a[a.length-1];return e.node.children[e.childIdx]=c,[a[0].node,l]}return[c,l]}else{let c,l;if(i===s.hash){let a=tD(e,t,n,s.collision);if(a===s.collision)return[r,0];l=a.size-s.collision.size,c=a.size===1?{hash:i,key:a.key,val:a.val}:{hash:i,collision:a}}else{let e=n(void 0);if(e===void 0)return[r,0];c=UD(o,{hash:i,key:t,val:e},s),l=1}if(a.length>0){let e=a[a.length-1];return e.node.children[e.childIdx]=c,[a[0].node,l]}return[c,l]}while(s);throw Error(`Internal immutable-collections violation: hamt alter reached null`)}function*$D(e,t){if(t===null)return;let n=[t],r;for(;r=n.pop();)if(`children`in r)for(let e=0,t=r.children,i=t.length;e<i;e++)n.push(t[e]);else`key`in r?yield e(r.key,r.val):yield*iD(e,r.collision)}function eO(e,t,n){let r=t;if(n===null)return r;let i=[n],a;for(;a=i.pop();)if(`children`in a)for(let e=0,t=a.children,n=t.length;e<n;e++)i.push(t[e]);else r=`key`in a?e(r,a.key,a.val):oD(e,r,a.collision);return r}function tO(e,t){if(t===null)return null;function n(t){if(`children`in t){let e;for(let r=0,i=t.children,a=i.length;r<a;r++){let t=i[r],a=n(t);e?e.push(a):t!==a&&(e=[...i.slice(0,r),a])}return e?{bitmap:t.bitmap,children:e}:t}if(`key`in t){let n=e(t.val,t.key);return t.val===n?t:{hash:t.hash,key:t.key,val:n}}{let n=cD(e,t.collision);return n===t.collision?t:{hash:t.hash,collision:n}}}return n(t)}function nO(e,t,n){if(n===null)return[null,0];let r=0;function i(n){if(`children`in n){let e=n.bitmap,t,r=e;for(let a=1,o=0,s=e;s!==0;s&=~a,a<<=1)if(e&a){let e=n.children[o],s=i(e);t?s?t.push(s):r&=~a:s?e!==s&&(t=[...n.children.slice(0,o),s]):(t=[...n.children.slice(0,o)],r&=~a),o++}return t?t.length===0?null:t.length===1&&JD(t[0])||{bitmap:r,children:t}:n}if(`key`in n){let i=e(n.val,n.key);return i===void 0||t&&i===null?null:n.val===i?(r++,n):(r++,{hash:n.hash,key:n.key,val:i})}{let i=lD(e,t,n.collision);return i===n.collision?(r+=n.collision.size,n):i===null?null:i.size===1?(r+=1,{hash:n.hash,key:i.key,val:i.val}):(r+=i.size,{hash:n.hash,collision:i})}}return[i(n),r]}function rO(e,t,n,r){if(n===null)return[r,0];if(r===null)return[n,0];let i=0;function a(n,r,o){if(`key`in r&&`key`in o){if(r.hash===o.hash){let n=e.compare(r.key,o.key);if(n===0){i++;let e=t(r.val,o.val,r.key);return e===r.val?r:e===o.val?o:{hash:r.hash,key:r.key,val:e}}return{hash:r.hash,collision:RE(n,r.key,r.val,o.key,o.val)}}return UD(n,r,o)}if(`key`in r&&`collision`in o){if(r.hash===o.hash){let n=tD(e,r.key,e=>e===void 0?r.val:(i++,t(r.val,e,r.key)),o.collision);return n===o.collision?o:{hash:r.hash,collision:n}}return UD(n,r,o)}if(`collision`in r&&`key`in o){if(r.hash===o.hash){let n=tD(e,o.key,e=>e===void 0?o.val:(i++,t(e,o.val,o.key)),r.collision);return n===r.collision?r:{hash:o.hash,collision:n}}return UD(n,r,o)}if(`collision`in r&&`collision`in o){if(r.hash===o.hash){let n=xD(e,t,r.collision,o.collision);return n===r.collision?r:(i+=r.collision.size+o.collision.size-n.size,{hash:r.hash,collision:n})}return UD(n,r,o)}if(`children`in r&&`children`in o){let e=r.bitmap,t=o.bitmap,i=e&t,s;for(let c=1,l=0,u=0,d=e|t;d!==0;d&=~c,c<<=1)if(c&i){let e=a(n+PD,r.children[l],o.children[u]);s?s.push(e):e!==r.children[l]&&(s=[...r.children.slice(0,l),e]),l++,u++}else c&e?(s&&s.push(r.children[l]),l++):c&t&&(s?s.push(o.children[u]):s=[...r.children.slice(0,l),o.children[u]],u++);return s?{bitmap:e|t,children:s}:r}if(`children`in r){let e=o.hash,t=r.bitmap,i=r.children,s;if(t===ID)s=BD(e,n);else{let r=LD(e,n);if(t&r)s=zD(t,r);else{let e=zD(t,r),n=[...i.slice(0,e),o,...i.slice(e)];return{bitmap:t|r,children:n}}}let c=i[s],l=a(n+PD,c,o);if(l===c)return r;{let e=[...i];return e[s]=l,{bitmap:t,children:e}}}{let e=r.hash,t=o,i=t.bitmap,s=t.children,c;if(i===ID)c=BD(e,n);else{let t=LD(e,n);if(i&t)c=zD(i,t);else{let e=zD(i,t),n=[...s.slice(0,e),r,...s.slice(e)];return{bitmap:i|t,children:n}}}let l=s[c],u=a(n+PD,r,l);if(u===l)return o;{let e=[...s];return e[c]=u,{bitmap:i,children:e}}}}return[a(0,n,r),i]}function iO(e,t,n,r){if(n===null||r===null)return[null,0];let i=0;function a(n,r,o){if(`key`in r){let a=HD(e,r.key,o,r.hash,n);if(a!==void 0){i++;let e=t(r.val,a,r.key);return e===r.val?r:{hash:r.hash,key:r.key,val:e}}return null}if(`key`in o){let a=HD(e,o.key,r,o.hash,n);if(a!==void 0){i++;let e=t(a,o.val,o.key);return e===o.val?o:{hash:o.hash,key:o.key,val:e}}return null}if(`collision`in r&&`collision`in o){let n=SD(e,t,r.collision,o.collision);return n===r.collision?(i+=r.collision.size,r):n===null?null:n.size===1?(i+=1,{hash:r.hash,key:n.key,val:n.val}):(i+=n.size,{hash:r.hash,collision:n})}if(`children`in r&&`children`in o){let e=r.bitmap,t=o.bitmap,i=e&t,s,c=i;for(let l=1,u=0,d=0,f=e|t;f!==0;f&=~l,l<<=1)if(l&i){let e=a(n+PD,r.children[u],o.children[d]);s?e===null?c&=~l:s.push(e):e!==r.children[u]&&(e===null?(s=[...r.children.slice(0,u)],c&=~l):s=[...r.children.slice(0,u),e]),u++,d++}else l&e?(s||=[...r.children.slice(0,u)],u++):l&t&&d++;return s?s.length===0?null:s.length===1?JD(s[0])??{bitmap:c,children:s}:{bitmap:c,children:s}:r}if(`children`in r){let e=o.hash,t=r.bitmap,i;if(t===ID)i=BD(e,n);else{let r=LD(e,n);if(r&t)i=zD(t,r);else return null}return a(n+PD,r.children[i],o)}{let e=r.hash,t=o,i=t.bitmap,s;if(i===ID)s=BD(e,n);else{let t=LD(e,n);if(t&i)s=zD(i,t);else return null}return a(n+PD,r,t.children[s])}}return[a(0,n,r),i]}function aO(e,t,n){if(n===null)return[t,0];if(t===null)return[null,0];let r=0;function i(t,n,a){if(`key`in n)return HD(e,n.key,a,n.hash,t)===void 0?n:(r+=1,null);if(`key`in a){let i=ZD(e,a.key,n,a.hash,t);return i===n?n:(r+=1,i)}if(`children`in n&&`children`in a){let e=n.bitmap,r=a.bitmap,o=e&r,s,c=e;for(let l=1,u=0,d=0,f=e;f!==0;f&=~l,l<<=1)if(l&o){let e=i(t+PD,n.children[u],a.children[d]);s?e===null?c&=~l:s.push(e):e!==n.children[u]&&(e===null?(s=[...n.children.slice(0,u)],c&=~l):s=[...n.children.slice(0,u),e]),u++,d++}else l&e?(s&&s.push(n.children[u]),u++):l&r&&d++;return s?s.length===0?null:s.length===1?JD(s[0])??{bitmap:c,children:s}:{bitmap:c,children:s}:n}if(`collision`in n&&`collision`in a){let t=CD(e,n.collision,a.collision);return t===null?(r+=n.collision.size,null):t.size===1?(r+=n.collision.size-1,{hash:n.hash,key:t.key,val:t.val}):t===n.collision?n:(r+=n.collision.size-t.size,{hash:n.hash,collision:t})}if(`children`in n){let e=a.hash,r=n.bitmap,o,s;if(r===ID)o=BD(e,t),s=1<<o;else if(s=LD(e,t),r&s)o=zD(r,s);else return n;let c=n.children,l=c[o],u=i(t+PD,l,a);if(u===l)return n;if(u===null){if(c.length===2){let e=c[1-o];return JD(e)??{bitmap:r&~s,children:[e]}}{let e=[...c.slice(0,o),...c.slice(o+1)];return{bitmap:r&~s,children:e}}}{let e=[...c];return e[o]=u,{bitmap:r,children:e}}}{let e=n.hash,r=a,o=r.bitmap,s;if(o===ID)s=BD(e,t);else{let r=LD(e,t);if(r&o)s=zD(o,r);else return n}return i(t+PD,n,r.children[s])}}return[i(0,t,n),r]}function oO(e,t,n,r){if(r===null)return[n,0];if(n===null){let[e,t]=nO(i,!1,r);return[e,-t]}function i(e,n){return t(void 0,e,n)}let a=0;function o(n,r,s){if(`key`in r&&`key`in s){if(r.hash===s.hash){let n=e.compare(r.key,s.key);if(n===0){let e=t(r.val,s.val,r.key);return e===void 0?(a+=1,null):e===r.val?r:e===s.val?s:{hash:r.hash,key:r.key,val:e}}{let e=t(void 0,s.val,s.key);return e===void 0?r:(--a,{hash:r.hash,collision:RE(n,r.key,r.val,s.key,e)})}}{let e=t(void 0,s.val,s.key);return e===void 0?r:(--a,UD(n,r,{hash:s.hash,key:s.key,val:e}))}}if(`collision`in r&&`key`in s){if(r.hash===s.hash){let n=tD(e,s.key,e=>t(e,s.val,s.key),r.collision);return n===r.collision?r:n.size===1?(a+=r.collision.size-1,{hash:r.hash,key:n.key,val:n.val}):(a+=r.collision.size-n.size,{hash:r.hash,collision:n})}{let e=t(void 0,s.val,s.key);return e===void 0?r:(--a,UD(n,r,{hash:s.hash,key:s.key,val:e}))}}if(`key`in r&&`collision`in s){if(r.hash===s.hash){let n=TD(e,t,{key:r.key,val:r.val,size:1,left:null,right:null},s.collision);return n===null?(a+=1,null):(a+=1-n.size,{hash:r.hash,collision:n})}{let e=lD(i,!1,s.collision);return e===null?r:e.size===1?(--a,UD(n,r,{hash:s.hash,key:e.key,val:e.val})):(a-=e.size,UD(n,r,{hash:s.hash,collision:e}))}}if(`collision`in r&&`collision`in s){if(r.hash===s.hash){let n=TD(e,t,r.collision,s.collision);return n===null?(a+=r.collision.size,null):n===r.collision?r:n.size===1?(a+=r.collision.size-1,{hash:r.hash,key:n.key,val:n.val}):(a+=r.collision.size-n.size,{hash:r.hash,collision:n})}{let e=lD(i,!1,s.collision);return e===null?r:e.size===1?(--a,UD(n,r,{hash:s.hash,key:e.key,val:e.val})):(a-=e.size,UD(n,r,{hash:s.hash,collision:e}))}}if(`children`in r&&`children`in s){let e=r.bitmap,t=s.bitmap,c=e&t,l,u=e;for(let d=1,f=0,p=0,m=e|t;m!==0;m&=~d,d<<=1)if(d&c){let e=o(n+PD,r.children[f],s.children[p]);l?e===null?u&=~d:l.push(e):e!==r.children[f]&&(e===null?(l=[...r.children.slice(0,f)],u&=~d):l=[...r.children.slice(0,f),e]),f++,p++}else if(d&e)l&&l.push(r.children[f]),f++;else if(d&t){let[e,t]=nO(i,!1,s.children[p]);e!==null&&(a-=t,u|=d,l?l.push(e):l=[...r.children.slice(0,f),e]),p++}return l?l.length===0?null:l.length===1?JD(l[0])??{bitmap:u,children:l}:{bitmap:u,children:l}:r}if(`children`in r){let e=s,t=e.hash,c=r.bitmap,l,u;if(c===ID?(l=BD(t,n),u=1<<l):(u=LD(t,n),l=zD(c,u)),c&u){let e=r.children,t=e[l],i=o(n+PD,t,s);if(i===null){if(e.length===2){let t=e[1-l];return JD(t)??{bitmap:c&~u,children:[t]}}{let t=[...e.slice(0,l),...e.slice(l+1)];return{bitmap:c&~u,children:t}}}if(i===t)return r;{let t=[...e];return t[l]=i,{bitmap:c,children:t}}}{let t=zD(c,u),[n,o]=nO(i,!1,e);if(n!==null){a-=o;let e=r.children,i=[...e.slice(0,t),n,...e.slice(t)];return{bitmap:c|u,children:i}}return r}}{let e=s,t=r.hash,c=LD(t,n),l=e.bitmap,u,d=l;for(let t=1,s=0,f=l|c;f!==0;f&=~t,t<<=1)if(t&l){let l;if(t&c)l=o(n+PD,r,e.children[s]);else{let t;[l,t]=nO(i,!1,e.children[s]),a-=t}u?l===null?d&=~t:u.push(l):l!==e.children[s]&&(l===null?(u=[...e.children.slice(0,s)],d&=~t):u=[...e.children.slice(0,s),l]),s++}else t&c&&(d|=t,u?u.push(r):u=[...e.children.slice(0,s),r]);return u?u.length===0?null:u.length===1?JD(u[0])??{bitmap:d,children:u}:{bitmap:d,children:u}:s}}return[o(0,n,r),a]}function sO(){return!0}var cO=class e{static empty(){return new e(ND(),null,0)}static ofKeys(t){let n=t;return new e(n.cfg,n.root,n.size)}static from(t){let n=null,r=0,i=ND();function a(e){return e===void 0&&r++,!0}for(let e of t)n=GD(i,e,void 0,a,n);return new e(i,n,r)}static build(t,n){let r=null,i=0,a=ND();function o(e){return e===void 0&&i++,!0}for(let e of t)r=GD(a,n(e),void 0,o,r);return new e(a,r,i)}has(e){return this.root!==null&&HD(this.cfg,e,this.root)!==void 0}[Symbol.iterator](){return $D(e=>e,this.root)}entries(){return $D(e=>[e,e],this.root)}keys(){return $D(e=>e,this.root)}values(){return $D(e=>e,this.root)}forEach(e){eO((t,n)=>{e(n,n,this)},void 0,this.root)}fold(e,t){return eO((t,n)=>e(t,n),t,this.root)}toLazySeq(){let e=this.root;return Q.ofIterator(()=>$D(e=>e,e))}add(t){let[n,r]=WD(this.cfg,t,sO,this.root);return n===this.root?this:new e(this.cfg,n,this.size+ +!!r)}delete(t){let n=ZD(this.cfg,t,this.root);return n===this.root?this:new e(this.cfg,n,this.size-1)}union(t){let[n,r]=rO(this.cfg,sO,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size+t.size-r)}static union(...t){let n=t.filter(e=>e.size>0);if(n.length===0)return e.empty();{let t=n[0].root,r=n[0].size;for(let e=1;e<n.length;e++){let i=n[e],[a,o]=rO(i.cfg,sO,t,i.root);t=a,r+=i.size-o}return t===n[0].root?n[0]:new e(n[0].cfg,t,r)}}append(t){return this.union(e.from(t))}intersection(t){let[n,r]=iO(this.cfg,sO,this.root,t.root);return n===this.root?this:new e(this.cfg,n,r)}static intersection(...t){if(t.length===0)return e.empty();{let n=t[0].root,r=0;for(let e=1;e<t.length;e++){let i=t[e],[a,o]=iO(i.cfg,sO,n,i.root);n=a,r+=o}return n===t[0].root?t[0]:new e(t[0].cfg,n,r)}}difference(t){let[n,r]=aO(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}symmetricDifference(t){let[n,r]=oO(this.cfg,e=>e===void 0||void 0,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}filter(t){let[n,r]=nO((e,n)=>t(n)?e:void 0,!1,this.root);return n===this.root?this:new e(this.cfg,n,r)}transform(e){return e(this)}isSubsetOf(e){if(this.size>e.size)return!1;for(let t of this)if(!e.has(t))return!1;return!0}isSupersetOf(e){return e.isSubsetOf(this)}isDisjointFrom(e){if(this.size<=e.size){for(let t of this)if(e.has(t))return!1}else for(let t of e)if(this.has(t))return!1;return!0}constructor(e,t,n){this.cfg=e,this.root=t,this.size=n}};Object.defineProperty(cO.prototype,"@@__IMMUTABLE_SET__@@",{value:!0});function lO(){return!0}function uO(){}var dO=class e{static empty(){return new e(ZE(),null)}static ofKeys(t){let n=t;return new e(n.cfg,n.root)}static from(t){let n=ZE();return new e(n,rD(n,t,e=>e,lO))}static build(t,n){let r=ZE();return new e(r,rD(r,t,n,lO))}get size(){return this.root===null?0:this.root.size}has(e){return this.root!==null&&QE(this.cfg,e,this.root)!==void 0}[Symbol.iterator](){return iD(e=>e,this.root)}entries(){return iD(e=>[e,e],this.root)}keys(){return iD(e=>e,this.root)}values(){return iD(e=>e,this.root)}forEach(e){oD((t,n)=>{e(n,n,this)},void 0,this.root)}foldl(e,t){return oD((t,n)=>e(t,n),t,this.root)}foldr(e,t){return sD((t,n,r)=>e(t,r),t,this.root)}toAscLazySeq(){let e=this.root;return Q.ofIterator(()=>iD(e=>e,e))}toDescLazySeq(){let e=this.root;return Q.ofIterator(()=>aD(e=>e,e))}add(t){let n=tD(this.cfg,t,lO,this.root);return n===this.root?this:new e(this.cfg,n)}delete(t){let n=tD(this.cfg,t,uO,this.root);return n===this.root?this:new e(this.cfg,n)}partition(t){let[n,r]=dD(t,this.root);return n===this.root?[this,new e(this.cfg,null)]:r===this.root?[new e(this.cfg,null),this]:[new e(this.cfg,n),new e(this.cfg,r)]}filter(t){let n=lD((e,n)=>t(n)?!0:void 0,!1,this.root);return n===this.root?this:new e(this.cfg,n)}split(t){let n=uD(this.cfg,t,this.root);return{below:new e(this.cfg,n.below),present:n.val!==void 0,above:new e(this.cfg,n.above)}}transform(e){return e(this)}lookupMin(){if(this.root!==null)return $E(this.root)[0]}lookupMax(){if(this.root!==null)return eD(this.root)[0]}deleteMin(){if(this.root===null)return this;let t=fD(this.root);return new e(this.cfg,t.rest)}deleteMax(){if(this.root===null)return this;let t=pD(this.root);return new e(this.cfg,t.rest)}minView(){if(this.root!==null){let t=fD(this.root);return{min:t.k,rest:new e(this.cfg,t.rest)}}}maxView(){if(this.root!==null){let t=pD(this.root);return{max:t.k,rest:new e(this.cfg,t.rest)}}}indexOf(e){return gD(this.cfg,e,this.root)}getByIndex(e){return _D(e,this.root)?.[0]}take(t){let n=vD(t,this.root);return n===this.root?this:new e(this.cfg,n)}drop(t){let n=yD(t,this.root);return n===this.root?this:new e(this.cfg,n)}deleteByIndex(t){let n=bD(t,uO,this.root);return n===this.root?this:new e(this.cfg,n)}union(t){let n=xD(this.cfg,lO,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}static union(...t){let n=t.filter(e=>e.size>0);if(n.length===0)return e.empty();{let t=n[0].root;for(let e=1;e<n.length;e++){let r=n[e];t=xD(r.cfg,lO,t,r.root)}return t===n[0].root?n[0]:new e(n[0].cfg,t)}}intersection(t){let n=SD(this.cfg,lO,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}static intersection(...t){if(t.length===0)return e.empty();{let n=t[0].root;for(let e=1;e<t.length;e++){let r=t[e];n=SD(r.cfg,lO,n,r.root)}return n===t[0].root?t[0]:new e(t[0].cfg,n)}}difference(t){let n=CD(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}symmetricDifference(t){let n=wD(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}isSubsetOf(e){return mD(this.cfg,this.root,e.root)}isSupersetOf(e){return mD(this.cfg,e.root,this.root)}isDisjointFrom(e){return hD(this.cfg,this.root,e.root)}constructor(e,t){this.cfg=e,this.root=t}};Object.defineProperty(dO.prototype,"@@__IMMUTABLE_SET__@@",{value:!0}),Object.defineProperty(dO.prototype,"@@__IMMUTABLE_ORDERED__@@",{value:!0});function fO(){}var pO=class e{static empty(){return new e(ZE(),null)}static from(t,n){let r=ZE();return new e(r,Lre(r,t,n))}static build(t,n,r){let i=ZE();return new e(i,rD(i,t,n,r))}get size(){return this.root===null?0:this.root.size}get(e){return QE(this.cfg,e,this.root)}has(e){return QE(this.cfg,e,this.root)!==void 0}[Symbol.iterator](){return iD((e,t)=>[e,t],this.root)}entries(){return iD((e,t)=>[e,t],this.root)}keys(){return iD(e=>e,this.root)}values(){return iD((e,t)=>t,this.root)}forEach(e){oD((t,n,r)=>{e(r,n,this)},void 0,this.root)}foldl(e,t){return oD(e,t,this.root)}foldr(e,t){return sD(e,t,this.root)}toAscLazySeq(){let e=this.root;return Q.ofIterator(()=>iD((e,t)=>[e,t],e))}keysToAscLazySeq(){let e=this.root;return Q.ofIterator(()=>iD(e=>e,e))}valuesToAscLazySeq(){let e=this.root;return Q.ofIterator(()=>iD((e,t)=>t,e))}toDescLazySeq(){let e=this.root;return Q.ofIterator(()=>aD((e,t)=>[e,t],e))}keysToDescLazySeq(){let e=this.root;return Q.ofIterator(()=>aD(e=>e,e))}valuesToDescLazySeq(){let e=this.root;return Q.ofIterator(()=>aD((e,t)=>t,e))}keySet(){return dO.ofKeys(this)}set(t,n){let r=tD(this.cfg,t,()=>n,this.root);return r===this.root?this:new e(this.cfg,r)}alter(t,n){let r=tD(this.cfg,t,n,this.root);return r===this.root?this:new e(this.cfg,r)}delete(t){let n=tD(this.cfg,t,fO,this.root);return n===this.root?this:new e(this.cfg,n)}partition(t){let[n,r]=dD(t,this.root);return n===this.root?[this,new e(this.cfg,null)]:r===this.root?[new e(this.cfg,null),this]:[new e(this.cfg,n),new e(this.cfg,r)]}mapValues(t){let n=cD(t,this.root);return n===this.root?this:new e(this.cfg,n)}collectValues(t){let n=lD(t,!0,this.root);return n===this.root?this:new e(this.cfg,n)}filter(t){let n=lD((e,n)=>t(e,n)?e:void 0,!1,this.root);return n===this.root?this:new e(this.cfg,n)}split(t){let n=uD(this.cfg,t,this.root);return{below:new e(this.cfg,n.below),val:n.val,above:new e(this.cfg,n.above)}}transform(e){return e(this)}lookupMin(){if(this.root!==null)return $E(this.root)}lookupMax(){if(this.root!==null)return eD(this.root)}deleteMin(){if(this.root===null)return this;let t=fD(this.root);return new e(this.cfg,t.rest)}deleteMax(){if(this.root===null)return this;let t=pD(this.root);return new e(this.cfg,t.rest)}minView(){if(this.root!==null){let t=fD(this.root);return{minKey:t.k,minVal:t.v,rest:new e(this.cfg,t.rest)}}}maxView(){if(this.root!==null){let t=pD(this.root);return{maxKey:t.k,maxVal:t.v,rest:new e(this.cfg,t.rest)}}}indexOf(e){return gD(this.cfg,e,this.root)}getByIndex(e){return _D(e,this.root)}take(t){let n=vD(t,this.root);return n===this.root?this:new e(this.cfg,n)}drop(t){let n=yD(t,this.root);return n===this.root?this:new e(this.cfg,n)}setByIndex(t,n){let r=bD(t,()=>n,this.root);return r===this.root?this:new e(this.cfg,r)}deleteByIndex(t){let n=bD(t,fO,this.root);return n===this.root?this:new e(this.cfg,n)}alterByIndex(t,n){let r=bD(t,n,this.root);return r===this.root?this:new e(this.cfg,r)}union(t,n){let r=xD(this.cfg,n??((e,t)=>t),this.root,t.root);return r===this.root?this:new e(this.cfg,r)}static union(t,...n){let r=n.filter(e=>e.size>0);if(r.length===0)return e.empty();{let n=r[0].root;for(let e=1;e<r.length;e++){let i=r[e];n=xD(i.cfg,t,n,i.root)}return n===r[0].root?r[0]:new e(r[0].cfg,n)}}intersection(t,n){let r=SD(this.cfg,n??((e,t)=>t),this.root,t.root);return r===this.root?this:new e(this.cfg,r)}static intersection(t,...n){if(n.length===0)return e.empty();{let r=n[0].root;for(let e=1;e<n.length;e++){let i=n[e];r=SD(i.cfg,t,r,i.root)}return r===n[0].root?n[0]:new e(n[0].cfg,r)}}difference(t){let n=CD(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}symmetricDifference(t){let n=wD(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}withoutKeys(t){let n=t,r=CD(this.cfg,this.root,n.root);return r===this.root?this:new e(this.cfg,r)}adjust(t,n){let r=TD(this.cfg,n,this.root,t.root);return r===this.root?this:new e(this.cfg,r)}constructor(e,t){this.cfg=e,this.root=t}};Object.defineProperty(pO.prototype,"@@__IMMUTABLE_KEYED__@@",{value:!0}),Object.defineProperty(pO.prototype,"@@__IMMUTABLE_ORDERED__@@",{value:!0});var mO=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},hO=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},gO,Q=class e{static of(t){return new e(t)}static ofIterator(t){return new e({[Symbol.iterator](){return t()}})}static ofObject(t){return e.ofIterator(function*(){for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(yield[e,t[e]])})}static ofRange(t,n,r){let i=r||1;return i>0?e.ofIterator(function*(){for(let e=t;e<n;e+=i)yield e}):e.ofIterator(function*(){for(let e=t;e>n;e+=i)yield e})}[(gO=new WeakMap,Symbol.iterator)](){return mO(this,gO,`f`)[Symbol.iterator]()}aggregate(t,n,r){let i=new Map;for(let e of mO(this,gO,`f`)){let a=t(e),o=i.get(a);o===void 0?i.set(a,n(e)):i.set(a,r(o,n(e)))}return e.of(i)}append(t){let n=mO(this,gO,`f`);return e.ofIterator(function*(){yield*n,yield t})}chunk(t){let n=mO(this,gO,`f`);return e.ofIterator(function*(){let e=[];for(let r of n)e.push(r),e.length===t&&(yield e,e=[]);e.length>0&&(yield e)})}concat(t){let n=mO(this,gO,`f`);return e.ofIterator(function*(){yield*n,yield*t})}distinct(){let t=mO(this,gO,`f`);return e.ofIterator(function*(){let e=new Set;for(let n of t)e.has(n)||(e.add(n),yield n)})}distinctBy(t,...n){n.unshift(t);let r=mO(this,gO,`f`),i={hash:e=>MD(...n.map(t=>t(e))),compare:GE(...n)};return e.ofIterator(function*(){let e=null,t=!1;function n(e){return t=e===void 0,!0}for(let a of r)e=GD(i,a,!0,n,e),t&&(yield a)})}distinctAndSortBy(t,...n){n.unshift(t);let r={compare:GE(...n)},i=null;function a(e,t){return e===void 0?t:e}for(let e of mO(this,gO,`f`))i=nD(r,e,e,a,i);return e.ofIterator(()=>iD(e=>e,i))}drop(t){let n=mO(this,gO,`f`);return e.ofIterator(function*(){let e=0;for(let r of n)e>=t?yield r:e+=1})}dropWhile(t){let n=mO(this,gO,`f`);return e.ofIterator(function*(){let e=!0;for(let r of n)e?t(r)||(e=!1,yield r):yield r})}filter(t){let n=mO(this,gO,`f`);return e.ofIterator(function*(){for(let e of n)t(e)&&(yield e)})}flatMap(t){let n=mO(this,gO,`f`);return e.ofIterator(function*(){for(let e of n)yield*t(e)})}groupBy(t,...n){n.unshift(t);let r={hash:e=>MD(...n.map(t=>t(e))),compare:GE(...n)},i=null;function a(e,t){return e===void 0?[t]:(e.push(t),e)}for(let e of mO(this,gO,`f`))i=GD(r,e,e,a,i);return e.ofIterator(()=>$D((e,t)=>n.length===1?[n[0](e),t]:[n.map(t=>t(e)),t],i))}orderedGroupBy(t,...n){n.unshift(t);let r={compare:GE(...n)},i=null;function a(e,t){return e===void 0?[t]:(e.push(t),e)}for(let e of mO(this,gO,`f`))i=nD(r,e,e,a,i);return e.ofIterator(()=>iD((e,t)=>n.length===1?[WE(n[0],e),t]:[n.map(t=>WE(t,e)),t],i))}map(t){let n=mO(this,gO,`f`);return e.ofIterator(function*(){let e=0;for(let r of n)yield t(r,e),e+=1})}collect(t){let n=mO(this,gO,`f`);return e.ofIterator(function*(){for(let e of n){let n=t(e);n!=null&&(yield n)}})}prepend(t){let n=mO(this,gO,`f`);return e.ofIterator(function*(){yield t,yield*n})}prependAll(t){let n=mO(this,gO,`f`);return e.ofIterator(function*(){yield*t,yield*n})}sortWith(t){return e.of(Array.from(mO(this,gO,`f`)).sort(t))}sortBy(t,...n){return e.of(Array.from(mO(this,gO,`f`)).sort(GE(t,...n)))}tail(){let t=mO(this,gO,`f`);return e.ofIterator(function*(){let e=!1;for(let n of t)e?yield n:e=!0})}take(t){let n=mO(this,gO,`f`);return e.ofIterator(function*(){let e=0;for(let r of n){if(e>=t)return;yield r,e+=1}})}takeWhile(t){let n=mO(this,gO,`f`);return e.ofIterator(function*(){for(let e of n)if(t(e))yield e;else return})}zip(t){let n=mO(this,gO,`f`);return e.ofIterator(function*(){let e=n[Symbol.iterator](),r=t[Symbol.iterator]();for(;;){let t=e.next(),n=r.next();if(t.done||n.done)return;yield[t.value,n.value]}})}every(e){for(let t of mO(this,gO,`f`))if(!e(t))return!1;return!0}some(e){for(let t of mO(this,gO,`f`))if(e(t))return!0;return!1}isEmpty(){return mO(this,gO,`f`)[Symbol.iterator]().next().done===!0}find(e){for(let t of mO(this,gO,`f`))if(e(t))return t}head(){let e=mO(this,gO,`f`)[Symbol.iterator]().next();if(!e.done)return e.value}length(){let e=0;for(let t of mO(this,gO,`f`))e+=1;return e}maxBy(e,...t){let n=GE(e,...t),r;for(let e of mO(this,gO,`f`))(r===void 0||n(r,e)<=0)&&(r=e);return r}minBy(e,...t){let n=GE(e,...t),r;for(let e of mO(this,gO,`f`))(r===void 0||n(r,e)>=0)&&(r=e);return r}sumBy(e){let t=0;for(let n of mO(this,gO,`f`))t+=e(n);return t}toRArray(){return Array.from(mO(this,gO,`f`))}toMutableArray(){return Array.from(mO(this,gO,`f`))}toSortedArray(e,...t){return Array.from(mO(this,gO,`f`)).sort(GE(e,...t))}toHashMap(e,t){return _O.from(this.map(e),t)}buildHashMap(e,t){return _O.build(mO(this,gO,`f`),e,t)}toOrderedMap(e,t){return pO.from(this.map(e),t)}buildOrderedMap(e,t){return pO.build(mO(this,gO,`f`),e,t)}toRMap(e,t){return this.toMutableMap(e,t)}toMutableMap(e,t){let n=new Map;for(let r of mO(this,gO,`f`)){let[i,a]=e(r);if(t!==void 0){let e=n.get(i);e?n.set(i,t(e,a)):n.set(i,a)}else n.set(i,a)}return n}toObject(e,t){let n={};for(let r of mO(this,gO,`f`)){let[i,a]=e(r);if(t!==void 0){let e=n[i];n[i]=e?t(e,a):a}else n[i]=a}return n}toHashSet(e){return cO.build(mO(this,gO,`f`),e)}toOrderedSet(e){return dO.build(mO(this,gO,`f`),e)}toRSet(e){return this.toMutableSet(e)}toMutableSet(e){let t=new Set;for(let n of mO(this,gO,`f`))t.add(e(n));return t}fold(e,t){let n=e;for(let e of mO(this,gO,`f`))n=t(n,e);return n}reduce(e,t){if(t===void 0){let t=!0,n;for(let r of mO(this,gO,`f`))t?(t=!1,n=r):n=e(n,r);if(t)throw Error(`Empty sequence`);return n}return this.fold(t,e)}transform(e){return e(this)}toLookup(e,t){let n;return n=t===void 0?(e,t)=>e===void 0?[t]:(e.push(t),e):(e,n)=>e===void 0?[t(n)]:(e.push(t(n)),e),_O.build(mO(this,gO,`f`),e,n)}toOrderedLookup(e,t){let n;return n=t===void 0?(e,t)=>e===void 0?[t]:(e.push(t),e):(e,n)=>e===void 0?[t(n)]:(e.push(t(n)),e),pO.build(mO(this,gO,`f`),e,n)}toLookupMap(e,t,n,r){let i;return i=n===void 0?(e,n)=>(e??_O.empty()).set(t(n),n):r===void 0?(e,r)=>(e??_O.empty()).set(t(r),n(r)):(e,i)=>(e??_O.empty()).alter(t(i),e=>e===void 0?n(i):r(e,n(i))),_O.build(mO(this,gO,`f`),e,i)}toLookupOrderedMap(e,t,n,r){let i;return i=n===void 0?(e,n)=>(e??pO.empty()).set(t(n),n):r===void 0?(e,r)=>(e??pO.empty()).set(t(r),n(r)):(e,i)=>(e??pO.empty()).alter(t(i),e=>e===void 0?n(i):r(e,n(i))),pO.build(mO(this,gO,`f`),e,i)}toRLookup(e,t){let n=new Map;for(let r of mO(this,gO,`f`)){let i=e(r),a=t===void 0?r:t(r),o=n.get(i);o===void 0?n.set(i,[a]):o.push(a)}return n}constructor(e){gO.set(this,void 0),hO(this,gO,e,`f`)}},_O=class e{static empty(){return new e(ND(),null,0)}static from(t,n){let r=ND(),[i,a]=KD(r,t,n);return new e(r,i,a)}static build(t,n,r){let i=ND(),[a,o]=qD(i,t,n,r);return new e(i,a,o)}get(e){if(this.root!==null)return HD(this.cfg,e,this.root)}has(e){return this.get(e)!==void 0}[Symbol.iterator](){return $D((e,t)=>[e,t],this.root)}entries(){return $D((e,t)=>[e,t],this.root)}keys(){return $D(e=>e,this.root)}values(){return $D((e,t)=>t,this.root)}forEach(e){eO((t,n,r)=>{e(r,n,this)},void 0,this.root)}fold(e,t){return eO(e,t,this.root)}toLazySeq(){let e=this.root;return Q.ofIterator(()=>$D((e,t)=>[e,t],e))}keysToLazySeq(){let e=this.root;return Q.ofIterator(()=>$D(e=>e,e))}valuesToLazySeq(){let e=this.root;return Q.ofIterator(()=>$D((e,t)=>t,e))}keySet(){return cO.ofKeys(this)}set(e,t){return this.modify(e,()=>t)}modify(t,n){let[r,i]=WD(this.cfg,t,n,this.root);return r===this.root?this:new e(this.cfg,r,this.size+ +!!i)}delete(t){let n=ZD(this.cfg,t,this.root);return n===this.root?this:new e(this.cfg,n,this.size-1)}alter(t,n){let[r,i]=QD(this.cfg,t,n,this.root);return r===this.root?this:new e(this.cfg,r,this.size+i)}mapValues(t){let n=tO(t,this.root);return n===this.root?this:new e(this.cfg,n,this.size)}collectValues(t){let[n,r]=nO(t,!0,this.root);return n===this.root?this:new e(this.cfg,n,r)}filter(t){let[n,r]=nO((e,n)=>t(e,n)?e:void 0,!1,this.root);return n===this.root?this:new e(this.cfg,n,r)}transform(e){return e(this)}union(t,n){let[r,i]=rO(this.cfg,n??((e,t)=>t),this.root,t.root);return r===this.root?this:new e(this.cfg,r,this.size+t.size-i)}static union(t,...n){let r=n.filter(e=>e.size>0);if(r.length===0)return e.empty();{let n=r[0].root,i=r[0].size;for(let e=1;e<r.length;e++){let a=r[e],[o,s]=rO(a.cfg,t,n,a.root);n=o,i+=a.size-s}return n===r[0].root?r[0]:new e(r[0].cfg,n,i)}}append(t){return this.union(e.from(t))}intersection(t,n){let[r,i]=iO(this.cfg,n??((e,t)=>t),this.root,t.root);return r===this.root?this:new e(this.cfg,r,i)}static intersection(t,...n){if(n.length===0)return e.empty();{let r=n[0].root,i=0;for(let e=1;e<n.length;e++){let a=n[e],[o,s]=iO(a.cfg,t,r,a.root);r=o,i+=s}return r===n[0].root?n[0]:new e(n[0].cfg,r,i)}}difference(t){let[n,r]=aO(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}symmetricDifference(t){let[n,r]=oO(this.cfg,(e,t)=>e===void 0?t:void 0,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}withoutKeys(t){let[n,r]=aO(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}adjust(t,n){let[r,i]=oO(this.cfg,n,this.root,t.root);return r===this.root?this:new e(this.cfg,r,this.size-i)}constructor(e,t,n){this.cfg=e,this.root=t,this.size=n}};Object.defineProperty(_O.prototype,"@@__IMMUTABLE_KEYED__@@",{value:!0});function vO(e,t){let n=null,r=new Map,i=new Set;function a(i){let s;if(t===void 0)s=r.get(i);else for(let[e,n]of r)if(t(e,i)){s=n;break}if(s!==void 0){if(n?.(s[1],i))a.remove(i);else return s[0]}let c=e(i);return r.set(i,[c,Date.now()]),o(`CREATE`,i,c),c}function o(e,t,n){for(let r of i)r({type:e,param:t,atom:n})}return a.unstable_listen=e=>(i.add(e),()=>{i.delete(e)}),a.getParams=()=>r.keys(),a.remove=e=>{if(t===void 0){if(!r.has(e))return;let[t]=r.get(e);r.delete(e),o(`REMOVE`,e,t)}else for(let[n,[i]]of r)if(t(n,e)){r.delete(n),o(`REMOVE`,n,i);break}},a.setShouldRemove=e=>{if(n=e,n)for(let[e,[t,i]]of r)n(i,e)&&(r.delete(e),o(`REMOVE`,e,t))},a}var yO=P(_O.empty()),bO=yO,xO=P(cO.empty()),SO=xO,CO=P(_O.empty()),wO=CO;function TO(e,t){if(e.size===0)return t;let n={...t,jobs:{...t.jobs},stationUse:t.stationUse.filter(t=>!e.has(t.scheduleId))};for(let[r,i]of Object.entries(t.jobs))i.scheduleId&&e.has(i.scheduleId)&&delete n.jobs[r];return n}var EO=P(null,(e,t,n)=>{t(yO,e=>e.union(Q.ofObject(n.jobs).toHashMap(e=>e))),t(xO,e=>e.union(Q.ofObject(n.jobs).collect(([,e])=>e.scheduleId).toHashSet(e=>e)))}),DO=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs){let e=n.newJobs.scheduleId,a=Q.of(n.newJobs.jobs);t(yO,e=>{if(i){let t=QT(r,-30);e=e.filter(e=>e.routeStartUTC>=t)}return e.union(a.toHashMap(e=>{let t=new Xe({...e,copiedToSystem:!0});return[e.unique,t]}))}),e&&t(xO,t=>t.add(e))}}),OO=P(null,(e,t,n)=>{t(CO,Q.ofObject(n.jobs).toHashMap(e=>e))}),kO=vO(e=>P(t=>t(bO).get(e)?.comment??null,(t,n,r)=>{let i=r===null?``:r;n(yO,t=>{let n=t.get(e);return n===void 0?t:t.set(e,{...n,comment:i??void 0})})})),AO=Symbol(``);function jO(e){let t=Symbol(),n=P(t),r=P((r,i)=>{let a=r(n);return a===t?e(r,i):a},(e,i,a)=>{let o=typeof a==`function`?a(e(r)):a;i(n,o===AO?t:o)});return r}var MO=e=>typeof e?.then==`function`;function Rre(e=()=>{try{return window.localStorage}catch{return}},t){let n,r,i={getItem:(i,a)=>{let o=e=>{if(e||=``,n!==e){try{r=JSON.parse(e,t?.reviver)}catch{return a}n=e}return r},s=e()?.getItem(i)??null;return MO(s)?s.then(o):o(s)},setItem:(n,r)=>e()?.setItem(n,JSON.stringify(r,t?.replacer)),removeItem:t=>e()?.removeItem(t)},a=e=>(n,r,i)=>e(n,e=>{let n;try{n=JSON.parse(e||``,t?.reviver)}catch{n=i}r(n)}),o;try{o=e()?.subscribe}catch{}return!o&&typeof window<`u`&&typeof window.addEventListener==`function`&&window.Storage&&(o=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};let r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener(`storage`,r),()=>{window.removeEventListener(`storage`,r)}}),o&&(i.subscribe=a(o)),i}var zre=Rre();function NO(e,t,n=zre,r){let i=r?.getOnInit,a=P(i?n.getItem(e,t):t);return a.onMount=r=>(r(n.getItem(e,t)),n.subscribe?.call(n,e,r,t)),P(e=>e(a),(r,i,o)=>{let s=typeof o==`function`?o(r(a)):o;return s===AO?(i(a,t),n.removeItem(e)):MO(s)?s.then(t=>(i(a,t),n.setItem(e,t))):(i(a,s),n.setItem(e,s))})}var PO=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),Bre=new WeakMap,Vre=(e,t,n)=>PO(e,PO(()=>new WeakMap,Bre,t),n),Hre=e=>typeof e?.then==`function`,Ure=()=>void 0;function FO(e,t=Ure){return Vre(()=>{let n=new WeakMap,r=new WeakMap,i=P(0),a=P([]);a.INTERNAL_onInit=e=>{e.set(a,[()=>e.set(i,e=>e+1)])};let o=P(s=>{s(i);let c;try{c=s(o)}catch{}let l=s(e);if(!Hre(l))return{v:l};if(l!==c?.p&&l.then(e=>{r.set(l,e);let[t]=s(a);t()},e=>{n.set(l,e);let[t]=s(a);t()}),n.has(l)){if(c&&`e`in c&&c.p===l)return c;let e=n.get(l);return c&&`v`in c?{p:l,e,v:c.v}:{p:l,e}}return r.has(l)?{p:l,v:r.get(l)}:c&&`v`in c?{p:l,f:t(c.v),v:c.v}:{p:l,f:t()}});return o.init=void 0,P(e=>{let t=e(o);if(`e`in t)throw t.e;return`f`in t?t.f:t.v},(t,n,...r)=>n(e,...r))},e,t)}var IO=NO(`current-operator`,null),Wre=NO(`operators`,[]),LO=P(e=>{let t=e(IO),n=e(br);return n.user?n.user.profile.name||n.user.profile.sub||null:t},(e,t,n)=>{t(IO,n)}),RO=P({timeOfCurrentStatusUTC:new Date,jobs:{},pallets:{},material:[],alarms:[],queues:{}}),zO=RO,BO=P(Math.floor(Date.now()/1e3));BO.onMount=e=>{let t=setInterval(()=>{e(Math.floor(Date.now()/1e3))},1e3);return()=>clearInterval(t)};var Gre=P(null,(e,t,n,r)=>{let i=r===null?``:r;t(RO,e=>{let t=e.jobs[n];if(t){let r=new Ze(t);return r.comment=i,{...e,jobs:{...e.jobs,[n]:r}}}return e}),t(kO(n),i),Ut.setJobComment(n,i)}),VO=P(null,(e,t,{workorder:n,comment:r})=>{let i=e(LO);t(RO,e=>e.workorders?{...e,workorders:e.workorders.map(e=>e.workorderId===n?new ut({...e,comments:[...e.comments??[],new dt({comment:r,timeUTC:new Date})]}):e)}:e),Wt.recordWorkorderComment(n,i,r)}),Kre=P(null,(e,t,n)=>t(RO,n)),qre=P(null,(e,t,{evt:n})=>{n.logEntry?t(RO,Jre(n.logEntry)):n.newCurrentStatus&&t(RO,n.newCurrentStatus)});function Jre(e){return t=>{let n=new Map;function r(e,r){if(n.size===0)for(let e of t.material)n.set(e.materialID,e);let i=n.get(e);i!==void 0&&n.set(e,new nt(r(i)))}switch(e.type){case V.PartMark:for(let t of e.material)r(t.id,t=>({...t,serial:e.result}));break;case V.OrderAssignment:for(let t of e.material)r(t.id,t=>({...t,workorderId:e.result}));break;case V.Inspection:case V.InspectionForce:if(e.result.toLowerCase()===`true`||e.result===`1`){let t;if(t=e.type===V.InspectionForce?e.program:(e.details||{}).InspectionType,t)for(let n of e.material)r(n.id,e=>({...e,signaledInspections:[...e.signaledInspections,t]}))}}return n.size===0?t:{...t,material:Array.from(n.values())}}}var HO=P(null,(e,t,{queue:n,matId:r,newIdx:i})=>{t(RO,e=>{let t=e.material.find(e=>e.materialID===r);if(!t||t.location.type!==it.InQueue||t.location.currentQueue===n&&t.location.queuePosition===i)return e;let a=t.location.currentQueue,o=t.location.queuePosition;if(o===void 0||a===void 0)return e;let s=e.material.map(e=>{if(e.location.type!==it.InQueue||e.location.queuePosition===void 0||e.location.currentQueue===void 0)return e;if(e.materialID===r)return new nt({...e,location:new rt({...e.location,type:it.InQueue,currentQueue:n,queuePosition:i})});let t=e.location.queuePosition;return e.location.currentQueue===a&&e.location.queuePosition>o&&--t,e.location.currentQueue===n&&t>=i&&(t+=1),t===e.location.queuePosition?e:new nt({...e,location:new rt({...e.location,queuePosition:t})})});return{...e,material:s}})}),Yre=RegExp(`P(-?\\d+(?:[\\.,]\\d+)?Y)?(-?\\d+(?:[\\.,]\\d+)?M)?(-?\\d+(?:[\\.,]\\d+)?D)?(?:T(-?\\d+(?:[\\.,]\\d+)?H)?(-?\\d+(?:[\\.,]\\d+)?M)?(-?\\d+(?:[\\.,]\\d+)?S)?)?`);function Xre(e){let t=Yre.exec(e);if(!t||!t[1]&&!t[2]&&!t[3]&&!t[4]&&!t[5]&&!t[6])return null;let n={};return t[1]&&(n.years=parseFloat(t[1])),t[2]&&(n.months=parseFloat(t[2])),t[3]&&(n.days=parseFloat(t[3])),t[4]&&(n.hours=parseFloat(t[4])),t[5]&&(n.minutes=parseFloat(t[5])),t[6]&&(n.seconds=parseFloat(t[6])),n}function UO(e){let t=Xre(e);return t?((((t.years??0)*365+(t.months??0)*30+(t.days??0))*24+(t.hours??0))*60+(t.minutes??0))*60+(t.seconds??0):0}function WO(e){return UO(e)/60}var GO=class e{constructor(e,t,n){this.part=e,this.statGroup=t,this.operation=n}static ofLogCycle(t){return new e(t.material[0].part,t.loc,(t.type===V.LoadUnloadCycle||t.type===V.BasketLoadUnload)&&t.material.length>0?t.result+`-`+t.material[0].proc.toString():t.program)}static ofPartCycle(t){return new e(t.part,t.stationGroup,t.carrier.kind!==`machining`&&t.material.length>0?t.operation+`-`+t.material[0].proc.toString():t.operation)}compare(e){let t=this.part.localeCompare(e.part);return t!==0||(t=this.statGroup.localeCompare(e.statGroup),t!==0)?t:this.operation.localeCompare(e.operation)}hash(){return MD(this.part,this.statGroup,this.operation)}toString(){return`{part: ${this.part}}, statGroup: ${this.statGroup}, operation: ${this.operation}}`}},KO=P(_O.empty()),qO=KO,JO=P(_O.empty()),YO=JO;function XO(e,t){return e.medianMinutesForSingleMat===0?!1:t<e.medianMinutesForSingleMat?(e.medianMinutesForSingleMat-t)/e.MAD_belowMinutes>2:(t-e.medianMinutesForSingleMat)/e.MAD_aboveMinutes>2}function ZO(e,t){return e.medianMinutesForSingleMat===0||t<e.medianMinutesForSingleMat?!1:(t-e.medianMinutesForSingleMat)/e.MAD_aboveMinutes>2}function QO(e){let t=e.toSortedArray(e=>e);if(t.length===0)return 0;let n=Math.floor(t.length/2);return t.length%2==0?(t[n-1]+t[n])/2:t[n]}function Zre(e){let t=QO(Q.of(e)),n=1.4826*QO(Q.of(e).filter(e=>e<=t).map(e=>t-e));n<.25&&(n=.25);let r=1.4826*QO(Q.of(e).filter(e=>e>=t).map(e=>e-t));r<.25&&(r=.25);let i={medianMinutesForSingleMat:t,MAD_belowMinutes:n,MAD_aboveMinutes:r,expectedCycleMinutesForSingleMat:0},a=Q.of(e).filter(e=>!XO(i,e)).toRArray(),o=a.reduce((e,t)=>e+t,0)/a.length;return{...i,expectedCycleMinutesForSingleMat:o}}function $O(e,t,n){return e.toLookupOrderedMap(t,n,e=>[e],(e,t)=>e.concat(t)).toAscLazySeq().map(([e,t])=>{let r=[],i=[];for(let e of t.valuesToAscLazySeq().flatMap(e=>e))i.length===0?i=[e]:vE(n(e),n(i[i.length-1]))<10?i.push(e):(r.push(i),i=[e]);return i.length>0&&r.push(i),[e,r]})}function ek(e,t,n){let r=0,i=0,a=!0;for(let t of e)n(t)<0&&(a=!1),i+=t.material.length,r+=n(t);return a&&r>0?e.map(e=>({cycle:e,elapsedForSingleMaterialMinutes:t(e)*n(e)/r/e.material.length})):i>0?e.map(e=>({cycle:e,elapsedForSingleMaterialMinutes:t(e)/i})):e.map(e=>({cycle:e,elapsedForSingleMaterialMinutes:t(e)}))}function tk(e){let t=new Set;for(let n of e)if(n.type===V.PalletCycle&&n.material.length>0)for(let e of n.material)t.add(e.id);return $O(Q.of(e).filter(e=>(e.type===V.LoadUnloadCycle||e.type===V.BasketLoadUnload||e.type===V.MachineCycle)&&!e.startofcycle&&e.loc!==``&&e.material.length>0),e=>e.loc+` #`+e.locnum.toString(),e=>e.endUTC).flatMap(([e,t])=>t).flatMap(e=>{let n=WO(e[0].elapsed);return e.length>=2&&e.every(e=>WO(e.elapsed)===n&&e.material.every(e=>!t.has(e.id)))?ek(e,e=>WO(e.elapsed),e=>e.active===``?-1:WO(e.active)):e.map(e=>({cycle:e,elapsedForSingleMaterialMinutes:e.material.length>0?WO(e.elapsed)/e.material.length:0}))})}function nk(e){return tk(e).toLookup(e=>GO.ofLogCycle(e.cycle),e=>e.elapsedForSingleMaterialMinutes).mapValues(Zre)}var Qre=P(null,(e,t,n)=>{t(KO,e=>e.size===0?nk(n):e)}),$re=P(null,(e,t,n)=>{t(JO,nk(n))});function rk(e){return e.carrier.kind!==`machining`}function ik(e){return e.carrier.kind===`machining`}function eie(e){return e.carrier.kind===`pallet-lul`}function tie(e){return e.carrier.kind===`basket-lul`}function ak(e){return e.carrier.kind===`basket-lul`?void 0:e.carrier.pallet}function ok(e){return e.carrier.kind===`basket-lul`?e.carrier.basket:void 0}function sk(e,t){return e.startsWith(`Inspect`)?e:e+` #`+t.toString()}function ck(e,t){let n=t?.[e.toString()];return n&&n.trim().length>0?n:`L/U #${e}`}function lk(e,t,n){return e===`L/U`?ck(t,n):sk(e,t)}function uk(e){if(!Number.isSafeInteger(e)||e<=0)return String(e);let t=``;for(let n=e;n>0;n=Math.floor((n-1)/26))t=String.fromCharCode(65+(n-1)%26)+t;return t}function dk(e){return e&&e.trim().length>0?e:`Basket`}function fk(e,t=`Basket`){switch(e.carrier.kind){case`machining`:case`pallet-lul`:return`Pallet ${e.carrier.pallet}`;case`basket-lul`:return`${t} ${e.carrier.basket}`}}function nie(e){switch(e.carrier.kind){case`machining`:case`pallet-lul`:return e.carrier.pallet;case`basket-lul`:return e.carrier.basket+1e6}}function pk(e){return e.valuesToLazySeq().some(e=>e.carrier.kind===`basket-lul`)}var mk=P(_O.empty()),hk=mk,gk=P(e=>pk(e(mk))),_k=P(_O.empty()),vk=_k,yk=P(e=>pk(e(_k)));function bk(e,t,n,r){if(t.startofcycle||t.type!==V.LoadUnloadCycle&&t.type!==V.BasketLoadUnload&&t.type!==V.MachineCycle||t.loc===``)return null;let i=t.type===V.MachineCycle?{kind:`machining`,pallet:t.pal}:t.type===V.LoadUnloadCycle?{kind:`pallet-lul`,pallet:t.pal}:{kind:`basket-lul`,basket:t.pal},a=WO(t.active);if(i.kind===`basket-lul`&&n<=0&&a<=0)return null;let o=t.material.length>0?t.material[0].part:``,s=t.material.length>0?e.get(GO.ofLogCycle(t)):void 0,c=a;return(t.active===``||c<=0||t.material.length==0)&&(c=(s?.expectedCycleMinutesForSingleMat??0)*t.material.length),{endTime:t.endUTC,elapsedMinsPerMaterial:n,cntr:t.counter,activeMinutes:c,medianCycleMinutes:(s?.medianMinutesForSingleMat??0)*t.material.length,MAD_aboveMinutes:s?.MAD_aboveMinutes??0,part:o,carrier:i,material:t.material,isOutlier:s?XO(s,n):!1,stationGroup:t.loc,stationNumber:t.locnum,stationLabel:lk(t.loc,t.locnum,r),operation:i.kind===`machining`?t.program:t.result,operator:t.details&&t.details.operator||``}}function xk(e,t,n){return tk(t).collect(t=>bk(e,t.cycle,t.elapsedForSingleMaterialMinutes,n)).buildHashMap(e=>e.cntr)}var Sk=P(null,(e,t,n)=>{let r=e(qO),i=e(br)?.loadStationNames;t(mk,e=>e.union(xk(r,n,i)))}),Ck=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry&&n.logEntry.type===V.InvalidateCycle){let e=n.logEntry.details?.EditedCounters,r=e?new Set(e.split(`,`).map(e=>parseInt(e))):new Set;r.size>0&&t(mk,e=>{for(let t of r){let n=e.get(t);n!==void 0&&(e=e.set(t,{...n,activeMinutes:0}))}return e})}else if(n.logEntry){let a=e(qO),o=n.logEntry.material.length>0?WO(n.logEntry.elapsed)/n.logEntry.material.length:0,s=e(br)?.loadStationNames,c=bk(a,n.logEntry,o,s);if(!c)return;t(mk,e=>{if(i){let t=QT(r,-30);e=e.filter(e=>e.endTime>=t)}return e=e.set(c.cntr,c),e})}}),wk=P(null,(e,t,n)=>{let r=e(YO),i=e(br)?.loadStationNames;t(_k,xk(r,n,i))}),Tk=Object.create,Ek=Object.defineProperty,Dk=Object.getOwnPropertyDescriptor,Ok=Object.getOwnPropertyNames,kk=Object.getPrototypeOf,Ak=Object.prototype.hasOwnProperty,jk=(e,t)=>function(){return t||(0,e[Ok(e)[0]])((t={exports:{}}).exports,t),t.exports},Mk=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of Ok(t))!Ak.call(e,i)&&i!==n&&Ek(e,i,{get:()=>t[i],enumerable:!(r=Dk(t,i))||r.enumerable});return e},Nk=((e,t,n)=>(n=e==null?{}:Tk(kk(e)),Mk(t||!e||!e.__esModule?Ek(n,`default`,{value:e,enumerable:!0}):n,e)))(jk({"node_modules/toggle-selection/index.js"(e,t){t.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case`INPUT`:case`TEXTAREA`:t.blur();break;default:t=null}return e.removeAllRanges(),function(){e.type===`Caret`&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}}})(),1).default,Pk=`Copy to clipboard: #{key}, Enter`;function Fk(e){var t=((navigator.userAgentData?/mac/i.test(navigator.userAgentData.platform):/mac os x/i.test(navigator.userAgent))?`⌘`:`Ctrl`)+`+C`;return e.replace(/#{\s*key\s*}/g,t)}function Ik(e,t){var n={};return n[`text/plain`]=new Blob([e],{type:`text/plain`}),t&&t!==`text/plain`&&(n[t]=new Blob([e],{type:t})),new ClipboardItem(n)}async function Lk(e,t){if(!t.format&&!t.onCopy)return await navigator.clipboard.writeText(e),!0;var n=Ik(e,t.format);return t.onCopy&&(n=t.onCopy(n)||n),await navigator.clipboard.write([n]),!0}function Rk(e,t){var n=document.createElement(`span`);return n.textContent=e,n.ariaHidden=`true`,n.style.all=`unset`,n.style.position=`fixed`,n.style.top=`0`,n.style.clip=`rect(0, 0, 0, 0)`,n.style.whiteSpace=`pre`,n.style.webkitUserSelect=`text`,n.style.MozUserSelect=`text`,n.style.msUserSelect=`text`,n.style.userSelect=`text`,n.addEventListener(`copy`,function(n){n.stopPropagation(),t.format&&(n.preventDefault(),n.clipboardData&&n.clipboardData.setData(t.format,e)),t.onCopy&&n.clipboardData&&t.onCopy(n.clipboardData)}),n}function zk(){let e=document.activeElement;for(;e;){if(e.tagName===`DIALOG`&&e.open)return e;e=e.parentElement}return null}function Bk(e,t){var n=Nk(),r=document.createRange(),i=document.getSelection(),a=Rk(e,t),o=zk()||document.fullscreenElement||document.body,s=!1;try{if(o.appendChild(a),r.selectNodeContents(a),i.removeAllRanges(),i.addRange(r),!document.execCommand(`copy`))throw Error(`copy command was unsuccessful`);s=!0}finally{typeof i.removeRange==`function`?i.removeRange(r):i.removeAllRanges(),o.removeChild(a),n()}return s}async function Vk(e,t={}){var n=t.debug||!1;if(window.isSecureContext&&navigator.clipboard)try{return await Lk(e,t)}catch(e){n&&console.error(`unable to copy using navigator.clipboard: `,e),n&&console.warn(`falling back to execCommand`)}else n&&!window.isSecureContext&&console.warn(`copy-to-clipboard: navigator.clipboard requires a secure context (HTTPS/localhost). Falling back to execCommand.`);try{return Bk(e,t)}catch(i){if(n&&console.error(`unable to copy using execCommand: `,i),n&&console.error(`falling back to prompt`),t.fallbackToPrompt){var r=Fk(`message`in t?t.message:Pk);window.prompt(r,e)}}return!1}var Hk=Vk;function Uk(e,t){return!t&&e===`Basket`?`Any`:e}function Wk(e,t){let n=dO.empty(),r=dO.empty(),i=dO.empty(),a=pO.empty(),o=dO.empty(),s=!1;for(let c of e){let e=ak(c);e!==void 0&&(n=n.add(e)),s||=tie(c),rk(c)?r=r.add(c.stationLabel):(i=i.add(c.stationLabel),t&&c.part==t.part&&c.material.some(e=>e.proc===t.proc)&&(o=o.add(GO.ofPartCycle(c))));for(let e of c.material)a=a.alter(e.part,t=>(t??dO.empty()).add(e.proc))}return{allPalletNames:n.toAscLazySeq().toRArray(),allLoadStationNames:r.toAscLazySeq().toRArray(),allMachineNames:i.toAscLazySeq().toRArray(),allPartAndProcNames:a.toAscLazySeq().flatMap(([e,t])=>t.toAscLazySeq().map(t=>({part:e,proc:t}))).toRArray(),allMachineOperations:o.toAscLazySeq().toRArray(),hasBasketCycles:s}}var Gk=`@@@_FMSInsight_FilterAnyMachineKey_@@@`,Kk=`@@@_FMSInsigt_FilterAnyLoadKey_@@@`;function qk(e){return{...Wk(e),seriesLabel:`Station`,data:new Map}}function Jk(e,{zoom:t,partAndProc:n,pallet:r,station:i,operation:a,carrierKind:o}){let s=n&&i&&i!==`@@@_FMSInsight_FilterAnyMachineKey_@@@`&&i!==`@@@_FMSInsigt_FilterAnyLoadKey_@@@`,c=r&&!a&&i&&i!==`@@@_FMSInsight_FilterAnyMachineKey_@@@`&&i!==`@@@_FMSInsigt_FilterAnyLoadKey_@@@`;return{...Wk(e,n),seriesLabel:s?`Carrier`:c?`Part`:`Station`,data:Q.of(e).filter(e=>{if(t&&(e.endTime<t.start||e.endTime>t.end)||n&&(e.part!==n.part||!e.material.some(e=>e.proc===n.proc))||r&&ak(e)!==r||o===`Pallet`&&ok(e)!==void 0||o===`Basket`&&ok(e)===void 0)return!1;if(i===`@@@_FMSInsight_FilterAnyMachineKey_@@@`){if(rk(e))return!1}else if(i===`@@@_FMSInsigt_FilterAnyLoadKey_@@@`){if(!rk(e))return!1}else if(i&&e.stationLabel!==i)return!1;return!(a&&a.compare(GO.ofPartCycle(e))!==0)}).toRLookup(e=>s?fk(e):c?e.part+`-`+Q.of(e.material).map(e=>e.proc).distinctAndSortBy(e=>e).toRArray().join(`:`):e.stationLabel,e=>({...e,x:e.endTime,y:e.elapsedMinsPerMaterial*e.material.length}))}}function Yk(e,{zoom:t,partAndProc:n,pallet:r,station:i,carrierKind:a}){let o=Q.of(e).filter(e=>a===`Pallet`&&ok(e)!==void 0||a===`Basket`&&ok(e)===void 0?!1:!i||i===`@@@_FMSInsigt_FilterAnyLoadKey_@@@`?rk(e):rk(e)&&e.stationLabel===i);return{...Wk(e,n),seriesLabel:`Station`,data:$O(o,e=>e.stationLabel,e=>e.endTime).map(([e,i])=>[e,Q.of(i).collect(e=>{let i=e.find(e=>!(t&&(e.endTime<t.start||e.endTime>t.end)||n&&(e.part!==n.part||!e.material.some(e=>e.proc===n.proc))||r&&ak(e)!==r));return i?{...i,x:i.endTime,y:e.reduce((e,t)=>e+t.elapsedMinsPerMaterial*t.material.length,0),operations:Q.of(e).flatMap(e=>e.material.map(t=>({mat:t,operation:e.operation}))).toRArray()}:null}).toRArray()]).filter(([,e])=>e.length>0).toRMap(e=>e)}}function Xk(e,t){let n=null;for(let[,r]of e.data)for(let e of r)if(e.material.length>0&&(n===null||n.time<e.x)){let r=t?e.activeMinutes/e.material.length:e.activeMinutes;n={time:e.x,mins:r}}return n?.mins}function Zk(e){return $O(e,e=>e.stationLabel,e=>e.endTime).flatMap(function*([e,t]){for(let n of t){let t=Q.of(n).sumBy(e=>e.elapsedMinsPerMaterial*e.material.length),r=lE(n[0].endTime,-t*60),i=Q.of(n).sumBy(e=>e.activeMinutes);yield{station:e,startTime:r,endActive:i>0?cE(r,i):void 0,endOccupied:n[0].endTime,outlier:n.some(e=>e.isOutlier),parts:Q.of(n).flatMap(e=>Q.of(e.material).distinctBy(e=>e.proc).map(t=>({part:e.part,proc:t.proc,oper:e.operation}))).distinctAndSortBy(e=>e.part,e=>e.proc,e=>e.oper).map(e=>({part:e.part+`-`+e.proc.toString(),oper:e.oper})).toRArray()}}}).toRArray()}function Qk(e,t){let n=[],r=new Set,i=new Set,a=new Set;for(let n of e.material){let e=t.get(n.id);if(e!==void 0){for(let t of e.signaledInspections)r.add(t);for(let[t,n]of Q.ofObject(e.completedInspections??{}))r.add(t),i.add(t),n.success&&a.add(t)}}for(let e of Q.of(r).toSortedArray(e=>e))i.has(e)?n.push(e+`[`+(a.has(e)?`success`:`failed`)+`]`):n.push(e);return n.join(`, `)}function $k(e,t,n,r,i,a,o){let s=`<table>
|
|
245
|
+
<thead><tr>`;s+=`<th>Date</th><th>Part</th><th>Station</th><th>Carrier</th>`,s+=`<th>Serial</th><th>Workorder</th><th>Inspection</th>`,s+=`<th>Elapsed Min</th><th>Target Min</th>`,i||(s+=`<th>Median Elapsed Min</th><th>Median Deviation</th>`),s+=`</tr></thead>
|
|
246
|
+
<tbody>
|
|
247
|
+
`;let c=Q.of(e.data).flatMap(([,e])=>e).filter(e=>(!n||e.endTime>=n)&&(!r||e.endTime<r)).toSortedArray(e=>e.endTime.getTime());for(let e of c)s+=`<tr>`,s+=`<td>`+e.endTime.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})+`</td>`,s+=`<td>`+e.part+`-`+Q.of(e.material).map(e=>e.proc).distinctAndSortBy(e=>e).toRArray().join(`:`)+`</td>`,s+=`<td>`+lk(e.stationGroup,e.stationNumber,a)+`</td>`,s+=`<td>`+fk(e,dk(o))+`</td>`,s+=`<td>`+e.material.filter(e=>e.serial).map(e=>e.serial).join(`,`)+`</td>`,s+=`<td>`+e.material.filter(e=>e.workorder).map(e=>e.workorder).join(`,`)+`</td>`,s+=`<td>`+Qk(e,t)+`</td>`,s+=`<td>`+(e.elapsedMinsPerMaterial*e.material.length).toFixed(1)+`</td>`,s+=`<td>`+e.activeMinutes.toFixed(1)+`</td>`,i||(s+=`<td>`+e.medianCycleMinutes.toFixed(1)+`</td>`,s+=`<td>`+e.MAD_aboveMinutes.toFixed(1)+`</td>`),s+=`</tr>
|
|
248
|
+
`;return s+=`</tbody>
|
|
249
|
+
</table>`,s}function eA(e,t,n,r,i,a){Hk($k(e,t,n?n.start:void 0,n?n.end:void 0,r,i,a)).catch(console.error)}function tA(e,t=`Pallet`){let n=`<table>
|
|
250
|
+
<thead><tr>`;n+=`<th>${t}</th><th>Date</th><th>Elapsed (min)</th>`,n+=`</tr></thead>
|
|
251
|
+
<tbody>
|
|
252
|
+
`;let r=e.keysToLazySeq().toSortedArray(e=>e);for(let t of r)for(let r of e.get(t)?.valuesToLazySeq()??[])n+=`<tr>`,n+=`<td>`+t.toString()+`</td>`,n+=`<td>`+r.x.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})+`</td>`,n+=`<td>`+r.y.toFixed(1)+`</td>`,n+=`</tr>
|
|
253
|
+
`;return n+=`</tbody>
|
|
254
|
+
</table>`,n}function nA(e,t=`Pallet`){Hk(tA(e,t)).catch(console.error)}function rA(e){switch(e.type){case V.LoadUnloadCycle:case V.MachineCycle:return e.loc+` #`+e.locnum.toString();case V.AddToQueue:case V.RemoveFromQueue:return e.loc;case V.PartMark:return`Mark`;case V.OrderAssignment:return`Workorder`;case V.CloseOut:return`CloseOut`;case V.Inspection:return`Signal `+((e.details||{}).InspectionType||``);case V.InspectionForce:return`Signal `+e.program;case V.InspectionResult:return`Inspect `+e.program;default:return e.loc}}function iA(e){switch(e.type){case V.Inspection:case V.InspectionForce:case V.LoadUnloadCycle:case V.PartMark:case V.OrderAssignment:return e.result;case V.AddToQueue:return`Add`;case V.RemoveFromQueue:return`Remove`;case V.MachineCycle:return e.program;case V.InspectionResult:return e.result.toLowerCase()===`false`?`Failed`:`Succeeded`;default:return``}}function aA(e){let t=`<table>
|
|
255
|
+
<thead><tr>`;t+=`<th>Date</th><th>Part</th><th>Station</th><th>Pallet</th>`,t+=`<th>Serial</th><th>Workorder</th><th>Result</th><th>Elapsed Min</th><th>Active Min</th>`,t+=`</tr></thead>
|
|
256
|
+
<tbody>
|
|
257
|
+
`;for(let n of e)if(!n.startofcycle)for(let e of n.material)t+=`<tr>`,t+=`<td>`+n.endUTC.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})+`</td>`,t+=`<td>`+e.part+`-`+e.proc.toString()+`</td>`,t+=`<td>`+rA(n)+`</td>`,t+=`<td>`+n.pal.toString()+`</td>`,t+=`<td>`+(e.serial||``)+`</td>`,t+=`<td>`+(e.workorder||``)+`</td>`,t+=`<td>`+iA(n)+`</td>`,t+=`<td>`+WO(n.elapsed).toFixed(1)+`</td>`,t+=`<td>`+WO(n.active).toFixed(1)+`</td>`,t+=`</tr>
|
|
258
|
+
`;return t+=`</tbody>
|
|
259
|
+
</table>`,t}function oA(e){Hk(aA(e)).catch(console.error)}var sA=P([]),cA=sA,lA=P([]),uA=lA;function dA(e,t){return e.map(e=>({station:e.stationGroup+` #`+e.stationNum.toString(),stationLabel:lk(e.stationGroup,e.stationNum,t),start:e.startUTC,end:e.endUTC,plannedDown:e.planDown??!1,parts:e.parts?.map(e=>({uniq:e.jobUnique,proc:e.process,path:e.path}))}))}var fA=P(null,(e,t,n)=>{let r=e(br)?.loadStationNames;t(sA,e=>e.concat(dA(n.stationUse,r)))}),pA=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs?.stationUse){let a=n.newJobs?.stationUse,o=e(br)?.loadStationNames;t(sA,e=>{if(i){let t=QT(r,-30),n=Q.of(e).minBy(e=>e.end.getTime());if((n===void 0||n.start>=t)&&a.length===0)return e;e=e.filter(e=>e.start>=t)}return e.concat(dA(a,o))})}}),mA=P(null,(e,t,n)=>{let r=e(br)?.loadStationNames;t(lA,dA(n.stationUse,r))});function hA(e){let{target:t}=e;if(!(t instanceof SVGElement))return null;let n=t instanceof SVGSVGElement?t:t.ownerSVGElement;if(!n)return null;let r=n.getScreenCTM();if(!r)return null;let i=n.createSVGPoint();return`changedTouches`in e?(i.x=e.changedTouches[0].clientX,i.y=e.changedTouches[0].clientY):(i.x=e.clientX,i.y=e.clientY),i.matrixTransform(r.inverse())}var gA=`__bms_measure_text_element`;function _A(e,t){try{let n=document.getElementById(gA),r;if(n instanceof SVGTextElement)r=n;else{let e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);e.setAttribute(`aria-hidden`,`true`),e.style.position=`absolute`,e.style.top=`-100%`,e.style.left=`-100%`,e.style.width=`0`,e.style.height=`0`,e.style.opacity=`0`;let n=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);if(!(n instanceof SVGTextElement))return null;r=n,r.setAttribute(`id`,gA),t&&(r.style.fontSize=t.toString()),e.appendChild(r),document.body.appendChild(e)}return r.textContent=e,r.getComputedTextLength()}catch{return null}}function vA(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function yA(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=vA(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?((r||i)&&(s=e.apply(this,t)),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function bA(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return yA(e,t,{leading:r,maxWait:t,trailing:i})}var xA=(e,t,n,r)=>{switch(t){case`debounce`:return yA(e,n,r);case`throttle`:return bA(e,n,r);default:return e}},SA=e=>{let t=L.useRef(e);return L.useEffect(()=>{t.current=e}),L.useMemo(()=>((...e)=>t.current?.call(t,...e)),[])},CA=e=>{let[t,n]=L.useState(e?.current||null);return e&&setTimeout(()=>{e.current!==t&&n(e.current)},0),{refProxy:L.useMemo(()=>new Proxy(e=>{e!==t&&n(e)},{get(e,n){return n===`current`?t:e[n]},set(e,t,r){return t===`current`?n(r):e[t]=r,!0}}),[t]),refElement:t,setRefElement:n}},wA=(e,t)=>{let n=e.borderBoxSize?.[0],r=e.contentBoxSize?.[0];return t===`border-box`&&n?{width:n.inlineSize,height:n.blockSize}:t===`content-box`&&r?{width:r.inlineSize,height:r.blockSize}:{width:e.contentRect.width,height:e.contentRect.height}};function TA({skipOnMount:e=!1,refreshMode:t,refreshRate:n=1e3,refreshOptions:r,handleWidth:i=!0,handleHeight:a=!0,targetRef:o,observerOptions:s,onResize:c,disableRerender:l=!1}={}){let u=(0,L.useRef)(e),d=SA(c),[f,p]=(0,L.useState)({width:void 0,height:void 0}),m=(0,L.useRef)({width:void 0,height:void 0}),{refProxy:h,refElement:g}=CA(o),{box:_}=s||{},v=(0,L.useCallback)(e=>{if(!i&&!a)return;if(u.current){u.current=!1;return}let t=(e,t)=>i&&e.width!==t.width||a&&e.height!==t.height;e.forEach(e=>{let n=wA(e,_);l?t(m.current,n)&&(m.current.width=n.width,m.current.height=n.height,d?.({width:n.width,height:n.height,entry:e})):p(r=>t(r,n)?(d?.({width:n.width,height:n.height,entry:e}),n):r)})},[i,a,u,_,l]),y=(0,L.useCallback)(xA(v,t,n,r),[v,t,n,r]);return(0,L.useEffect)(()=>{let e;if(g)try{e=new window.ResizeObserver(y),e.observe(g,s)}catch(e){console.warn(`ResizeObserver not supported or failed to initialize:`,e)}else(f.width||f.height)&&(d?.({width:null,height:null,entry:null}),m.current.width=void 0,m.current.height=void 0,l||p({width:void 0,height:void 0}));return()=>{var t,n,r;(t=e?.disconnect)==null||t.call(e),(r=(n=y).cancel)==null||r.call(n)}},[y,g]),Object.assign({ref:h},l?m.current:f)}var EA=G(`div`)({backgroundColor:Lr[700],color:`white`,padding:`0.3rem 0.5rem`,borderRadius:`3px`,boxShadow:`0 1px 2px rgba(33, 33, 33, 0.2)`,pointerEvents:`none`});function DA({chartHeight:e,chartWidth:t,atom:n,TooltipContent:r}){let i=R(n),{ref:a,width:o,height:s}=TA({refreshMode:`debounce`,refreshRate:100});if(!i)return null;let c=i.left,l=i.top;return o!==void 0&&(c+10+o>t&&c+10>t/2?c=c-o-30:c+=10),s!==void 0&&(l+10+s>e&&l+10>e/2?l=l-s-10:l+=10),(0,H.jsx)(`div`,{style:{visibility:s!==void 0&&o!==void 0?`visible`:`hidden`,position:`absolute`,left:c,top:l,zIndex:10},children:(0,H.jsx)(EA,{ref:a,style:i?.zIndex?{zIndex:i.zIndex}:void 0,children:(0,H.jsx)(r,{tooltip:i})})})}function OA({chart:e,tooltipAtom:t,TooltipContent:n,sx:r,autoHeight:i}){let{ref:a,width:o,height:s}=TA({refreshMode:`debounce`,refreshRate:100});return(0,H.jsx)(J,{ref:a,sx:r,children:(0,H.jsxs)(J,{sx:{position:`relative`,overflow:`hidden`},children:[o&&(s||i)?e({width:o,height:s??0}):void 0,s&&o?(0,H.jsx)(DA,{chartHeight:s,chartWidth:o,atom:t,TooltipContent:n}):void 0]})})}function kA(e){return Q.ofObject(e.baskets??{}).collect(([,e])=>{let t=e.position;return t===void 0?null:t.location===vt.LoadUnload||t.location===vt.LoadStationStaging?[e.basketId,{group:`L/U`,num:t.locationNum}]:null}).toRMap(([e,t])=>[e,t])}function AA(e,t,n){return e.action.type===ot.LoadingToBasket?n.get(e.action.loadToBasketId??0)??null:e.action.type===ot.Loading?e.action.loadOntoPalletNum?t.get(e.action.loadOntoPalletNum)??null:e.action.loadFromBasketId?n.get(e.action.loadFromBasketId)??null:null:e.location.palletNum?t.get(e.location.palletNum)??null:e.location.basketId?n.get(e.location.basketId)??null:null}function jA(e,t,n,r){return Q.of(e.material).collect(e=>{if(e.action.type!==ot.Machining||!e.location.palletNum)return null;let t=n.get(e.location.palletNum);return t?{mat:e,loc:t}:null}).groupBy(({loc:e})=>e.group,({loc:e})=>e.num).map(([[n,i],a])=>{let o=t.get(new GO(a[0].mat.partName,n,a[0].mat.action.program??``)),s=UO(a[0].mat.action.elapsedMachiningTime??`PT0S`),c=UO(a[0].mat.action.expectedRemainingMachiningTime??`PT0S`);return{station:lk(n,i,r),start:lE(e.timeOfCurrentStatusUTC,-s),expectedEnd:lE(e.timeOfCurrentStatusUTC,c),isOutlier:o?ZO(o,s/60/a.length):!1,parts:[{part:a[0].mat.partName,oper:a[0].mat.action.program??``}]}})}function MA(e,t,n,r){let i=kA(e);return Q.of(e.material).collect(e=>{if(e.action.type===ot.UnloadToCompletedMaterial||e.action.type===ot.UnloadToInProcess){let t=AA(e,n,i);return t?{mat:e,material:[e],proc:e.process,path:e.path,loc:t}:null}if(e.action.type===ot.Loading||e.action.type===ot.LoadingToBasket){let t=AA(e,n,i);return t?{mat:e,material:[e],proc:e.action.processAfterLoad??e.process,path:e.action.pathAfterLoad??e.path,loc:t}:null}return null}).map(t=>{let n=e.jobs[t.mat.jobUnique],r=n?.procsAndPaths?.[t.proc-1],i=n?.procsAndPaths?.[t.proc-1]?.paths?.[t.path-1];if(t.mat.action.type===ot.Loading||t.mat.action.type===ot.LoadingToBasket){let e=t.mat.action.type===ot.Loading?i?.expectedLoadTime:r?.expectedBasketLoadTime??i?.expectedLoadTime;return{...t,expectedLoadSecs:UO(e??`PT0S`)}}{let e=t.mat.location.palletNum!==null&&t.mat.location.palletNum!==void 0?i?.expectedUnloadTime:r?.expectedBasketUnloadTime??i?.expectedUnloadTime;return{...t,expectedLoadSecs:UO(e??`PT0S`)}}}).groupBy(({loc:e})=>e.group,({loc:e})=>e.num).map(([[n,i],a])=>{let o=ek(a,e=>WO(e.mat.action.elapsedLoadUnloadTime??`PT0S`),e=>e.expectedLoadSecs/60),s=!1,c=0;for(let{cycle:e,elapsedForSingleMaterialMinutes:r}of o){let i=t.get(new GO(e.mat.partName,n,e.mat.action.type===ot.Loading||e.mat.action.type===ot.LoadingToBasket?`LOAD-`+e.proc.toString():`UNLOAD-`+e.proc.toString()));i&&ZO(i,r)&&(s=!0),e.expectedLoadSecs>0?c+=e.expectedLoadSecs:i?.expectedCycleMinutesForSingleMat&&(c+=i.expectedCycleMinutesForSingleMat*60)}let l=UO(a[0].mat.action.elapsedLoadUnloadTime??`PT0S`);return{station:lk(n,i,r),start:lE(e.timeOfCurrentStatusUTC,-l),expectedEnd:lE(e.timeOfCurrentStatusUTC,-l+c),isOutlier:s,parts:Q.of(a).distinctAndSortBy(e=>e.mat.partName,e=>e.proc,e=>e.mat.action.type===ot.Loading||e.mat.action.type===ot.LoadingToBasket?`LOAD`:`UNLOAD`).map(e=>({part:e.mat.partName+`-`+e.proc.toString(),oper:e.mat.action.type===ot.Loading||e.mat.action.type===ot.LoadingToBasket?`LOAD`:`UNLOAD`})).toRArray()}})}function NA(e,t,n){let r=Q.ofObject(e.pallets).buildHashMap(([,e])=>e.palletNum,(e,[,t])=>t.currentPalletLocation);return jA(e,t,r,n).concat(MA(e,t,r,n)).toRArray()}function PA({scale:e,width:t,tickOverride:n}){return(0,H.jsx)(`g`,{children:(n??e.ticks()).map((n,r)=>(0,H.jsx)(`line`,{x1:0,y1:e(n),x2:t,y2:e(n),stroke:`#eaf0f6`,strokeWidth:1},r))})}function FA({scale:e,height:t,tickOverride:n}){return(0,H.jsx)(`g`,{children:(n??e.ticks()).map((n,r)=>(0,H.jsx)(`line`,{x1:e(n),y1:0,x2:e(n),y2:t,stroke:`#eaf0f6`,strokeWidth:1},r))})}function IA({xScale:e,yScale:t,width:n,height:r,rowTickOverride:i,colTickOverride:a}){return(0,H.jsxs)(`g`,{children:[(0,H.jsx)(PA,{scale:t,width:n,tickOverride:i}),(0,H.jsx)(FA,{scale:e,height:r,tickOverride:a})]})}var LA=8;function RA(e,t){if(t)return t.map(t=>({tick:t,pos:e(t)??0}));if(`ticks`in e&&e.ticks)return e.ticks().map(t=>({tick:t,pos:e(t)??0}));if(`bandwidth`in e&&e.bandwidth){let t=e.bandwidth();return e.domain().map(n=>({tick:n,pos:(e(n)??0)+t/2}))}return e.domain().map(t=>({tick:t,pos:e(t)??0}))}function zA({top:e,scale:t,label:n,fontSize:r,tickFormat:i,tickOverride:a}){r??=10,i??=`tickFormat`in t&&t.tickFormat?t.tickFormat():e=>String(e);let o=RA(t,a),s=t.range();return(0,H.jsxs)(`g`,{transform:`translate(0, ${e})`,children:[(0,H.jsx)(`line`,{x1:s[0],y1:0,x2:s[1],y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),o.map((e,t)=>(0,H.jsxs)(`g`,{transform:`translate(${e.pos}, 0)`,children:[(0,H.jsx)(`line`,{y1:LA,y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),(0,H.jsx)(`text`,{dy:13,textAnchor:`middle`,fontSize:r,fill:`#222`,dominantBaseline:`hanging`,children:i(e.tick)})]},t)),n?(0,H.jsx)(`text`,{x:(s[0]+s[1])/2,y:LA+r+20,textAnchor:`middle`,fontSize:r+2,fill:`#222`,children:n}):void 0]})}function BA({left:e,scale:t,label:n,fontSize:r,tickFormat:i,tickOverride:a}){r??=10,i??=`tickFormat`in t&&t.tickFormat?t.tickFormat():e=>String(e);let o=RA(t,a),s=t.range();return(0,H.jsxs)(`g`,{transform:`translate(${e}, 0)`,children:[(0,H.jsx)(`line`,{x1:0,y1:s[0],x2:0,y2:s[1],stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),o.map((e,t)=>(0,H.jsxs)(`g`,{transform:`translate(0, ${e.pos})`,children:[(0,H.jsx)(`line`,{x1:-8,x2:0,y1:0,y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),(0,H.jsx)(`text`,{dx:-13,textAnchor:`end`,fontSize:r,fill:`#222`,dominantBaseline:`middle`,children:i(e.tick)})]},t)),n?(0,H.jsx)(`text`,{x:-(s[0]+s[1])/2,y:-8-r-20,textAnchor:`middle`,fontSize:r+2,fill:`#222`,transform:`rotate(-90)`,children:n}):void 0]})}function VA({top:e,scale:t,label:n,fontSize:r,tickFormat:i,tickOverride:a}){r??=10,i??=`tickFormat`in t&&t.tickFormat?t.tickFormat():e=>String(e);let o=RA(t,a),s=t.range();return(0,H.jsxs)(`g`,{transform:`translate(0, ${e})`,children:[(0,H.jsx)(`line`,{x1:s[0],y1:0,x2:s[1],y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),o.map((e,t)=>(0,H.jsxs)(`g`,{transform:`translate(${e.pos}, 0)`,children:[(0,H.jsx)(`line`,{y1:0,y2:-8,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),(0,H.jsx)(`text`,{dy:-13,textAnchor:`middle`,fontSize:r,fill:`#222`,children:i(e.tick)})]},t)),n?(0,H.jsx)(`text`,{x:(s[0]+s[1])/2,y:-8-r-20,textAnchor:`middle`,fontSize:r+2,fill:`#222`,children:n}):void 0]})}function HA(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function UA(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function WA(e){let t,n,r;e.length===2?(t=e===HA||e===UA?e:GA,n=e,r=e):(t=HA,n=(t,n)=>HA(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function GA(){return 0}function KA(e){return e===null?NaN:+e}var qA=WA(HA),JA=qA.right;qA.left,WA(KA).center;var YA=class extends Map{constructor(e,t=$A){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(XA(this,e))}has(e){return super.has(XA(this,e))}set(e,t){return super.set(ZA(this,e),t)}delete(e){return super.delete(QA(this,e))}};function XA({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function ZA({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function QA({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function $A(e){return typeof e==`object`&&e?e.valueOf():e}var ej=Math.sqrt(50),tj=Math.sqrt(10),nj=Math.sqrt(2);function rj(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=ej?10:a>=tj?5:a>=nj?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?rj(e,t,n*2):[s,c,l]}function ij(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?rj(t,e,n):rj(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r){if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o}else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function aj(e,t,n){return t=+t,e=+e,n=+n,rj(e,t,n)[2]}function oj(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?aj(t,e,n):aj(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function sj(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function cj(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var lj=Symbol(`implicit`);function uj(){var e=new YA,t=[],n=[],r=lj;function i(i){let a=e.get(i);if(a===void 0){if(r!==lj)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new YA;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return uj(t,n).unknown(r)},cj.apply(i,arguments),i}function dj(){var e=uj().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=sj(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return dj(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},cj.apply(d(),arguments)}function fj(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function pj(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function mj(){}var hj=.7,gj=1/hj,_j=`\\s*([+-]?\\d+)\\s*`,vj=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,yj=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,bj=/^#([0-9a-f]{3,8})$/,xj=RegExp(`^rgb\\(${_j},${_j},${_j}\\)$`),Sj=RegExp(`^rgb\\(${yj},${yj},${yj}\\)$`),Cj=RegExp(`^rgba\\(${_j},${_j},${_j},${vj}\\)$`),wj=RegExp(`^rgba\\(${yj},${yj},${yj},${vj}\\)$`),Tj=RegExp(`^hsl\\(${vj},${yj},${yj}\\)$`),Ej=RegExp(`^hsla\\(${vj},${yj},${yj},${vj}\\)$`),Dj={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};fj(mj,Mj,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Oj,formatHex:Oj,formatHex8:kj,formatHsl:Aj,formatRgb:jj,toString:jj});function Oj(){return this.rgb().formatHex()}function kj(){return this.rgb().formatHex8()}function Aj(){return Gj(this).formatHsl()}function jj(){return this.rgb().formatRgb()}function Mj(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=bj.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Nj(t):n===3?new Lj(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Pj(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Pj(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=xj.exec(e))?new Lj(t[1],t[2],t[3],1):(t=Sj.exec(e))?new Lj(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Cj.exec(e))?Pj(t[1],t[2],t[3],t[4]):(t=wj.exec(e))?Pj(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Tj.exec(e))?Wj(t[1],t[2]/100,t[3]/100,1):(t=Ej.exec(e))?Wj(t[1],t[2]/100,t[3]/100,t[4]):Dj.hasOwnProperty(e)?Nj(Dj[e]):e===`transparent`?new Lj(NaN,NaN,NaN,0):null}function Nj(e){return new Lj(e>>16&255,e>>8&255,e&255,1)}function Pj(e,t,n,r){return r<=0&&(e=t=n=NaN),new Lj(e,t,n,r)}function Fj(e){return e instanceof mj||(e=Mj(e)),e?(e=e.rgb(),new Lj(e.r,e.g,e.b,e.opacity)):new Lj}function Ij(e,t,n,r){return arguments.length===1?Fj(e):new Lj(e,t,n,r??1)}function Lj(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}fj(Lj,Ij,pj(mj,{brighter(e){return e=e==null?gj:gj**+e,new Lj(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?hj:hj**+e,new Lj(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Lj(Hj(this.r),Hj(this.g),Hj(this.b),Vj(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:Rj,formatHex:Rj,formatHex8:zj,formatRgb:Bj,toString:Bj}));function Rj(){return`#${Uj(this.r)}${Uj(this.g)}${Uj(this.b)}`}function zj(){return`#${Uj(this.r)}${Uj(this.g)}${Uj(this.b)}${Uj((isNaN(this.opacity)?1:this.opacity)*255)}`}function Bj(){let e=Vj(this.opacity);return`${e===1?`rgb(`:`rgba(`}${Hj(this.r)}, ${Hj(this.g)}, ${Hj(this.b)}${e===1?`)`:`, ${e})`}`}function Vj(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Hj(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Uj(e){return e=Hj(e),(e<16?`0`:``)+e.toString(16)}function Wj(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new qj(e,t,n,r)}function Gj(e){if(e instanceof qj)return new qj(e.h,e.s,e.l,e.opacity);if(e instanceof mj||(e=Mj(e)),!e)return new qj;if(e instanceof qj)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new qj(o,s,c,e.opacity)}function Kj(e,t,n,r){return arguments.length===1?Gj(e):new qj(e,t,n,r??1)}function qj(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}fj(qj,Kj,pj(mj,{brighter(e){return e=e==null?gj:gj**+e,new qj(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hj:hj**+e,new qj(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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Lj(Xj(e>=240?e-240:e+120,i,r),Xj(e,i,r),Xj(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new qj(Jj(this.h),Yj(this.s),Yj(this.l),Vj(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(){let e=Vj(this.opacity);return`${e===1?`hsl(`:`hsla(`}${Jj(this.h)}, ${Yj(this.s)*100}%, ${Yj(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function Jj(e){return e=(e||0)%360,e<0?e+360:e}function Yj(e){return Math.max(0,Math.min(1,e||0))}function Xj(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Zj=e=>()=>e;function Qj(e,t){return function(n){return e+n*t}}function $j(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function eM(e){return(e=+e)==1?tM:function(t,n){return n-t?$j(t,n,e):Zj(isNaN(t)?n:t)}}function tM(e,t){var n=t-e;return n?Qj(e,n):Zj(isNaN(e)?t:e)}var nM=(function e(t){var n=eM(t);function r(e,t){var r=n((e=Ij(e)).r,(t=Ij(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=tM(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function rM(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function iM(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function aM(e,t){for(var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o=0;o<r;++o)i[o]=mM(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function oM(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function sM(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function cM(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=mM(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var lM=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uM=new RegExp(lM.source,`g`);function dM(e){return function(){return e}}function fM(e){return function(t){return e(t)+``}}function pM(e,t){var n=lM.lastIndex=uM.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=lM.exec(e))&&(i=uM.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:sM(r,i)})),n=uM.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?fM(c[0].x):dM(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function mM(e,t){var n=typeof t,r;return t==null||n===`boolean`?Zj(t):(n===`number`?sM:n===`string`?(r=Mj(t))?(t=r,nM):pM:t instanceof Mj?nM:t instanceof Date?oM:iM(t)?rM:Array.isArray(t)?aM:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?cM:sM)(e,t)}function hM(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function gM(e){return function(){return e}}function _M(e){return+e}var vM=[0,1];function yM(e){return e}function bM(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:gM(isNaN(t)?NaN:.5)}function xM(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function SM(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=bM(i,r),a=n(o,a)):(r=bM(r,i),a=n(a,o)),function(e){return a(r(e))}}function CM(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=bM(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=JA(e,t,1,r)-1;return a[n](i[n](t))}}function wM(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function TM(){var e=vM,t=vM,n=mM,r,i,a,o=yM,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==yM&&(o=xM(e[0],e[n-1])),s=n>2?CM:SM,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),sM))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,_M),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=hM,u()},d.clamp=function(e){return arguments.length?(o=e?!0:yM,u()):o!==yM},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function EM(){return TM()(yM,yM)}function DM(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function OM(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function kM(e){return e=OM(Math.abs(e)),e?e[1]:NaN}function AM(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function jM(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var MM=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function NM(e){if(!(t=MM.exec(e)))throw Error(`invalid format: `+e);var t;return new PM({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]})}NM.prototype=PM.prototype;function PM(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+``}PM.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 FM(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var IM;function LM(e,t){var n=OM(e,t);if(!n)return IM=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(IM=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+OM(e,Math.max(0,t+a-1))[0]}function RM(e,t){var n=OM(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var zM={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:DM,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)=>RM(e*100,t),r:RM,s:LM,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function BM(e){return e}var VM=Array.prototype.map,HM=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function UM(e){var t=e.grouping===void 0||e.thousands===void 0?BM:AM(VM.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?BM:jM(VM.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=NM(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):zM[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=zM[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=FM(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&IM!==void 0?HM[8+IM/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(kM(t)/3)))*3,r=10**-n,i=l((e=NM(e),e.type=`f`,e),{suffix:HM[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var WM,GM,KM;qM({thousands:`,`,grouping:[3],currency:[`$`,``]});function qM(e){return WM=UM(e),GM=WM.format,KM=WM.formatPrefix,WM}function JM(e){return Math.max(0,-kM(Math.abs(e)))}function YM(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(kM(t)/3)))*3-kM(Math.abs(e)))}function XM(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,kM(t)-kM(e))+1}function ZM(e,t,n,r){var i=oj(e,t,n),a;switch(r=NM(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=YM(i,o))&&(r.precision=a),KM(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=XM(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=JM(i))&&(r.precision=a-(r.type===`%`)*2)}return GM(r)}function QM(e){var t=e.domain;return e.ticks=function(e){var n=t();return ij(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return ZM(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=aj(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function $M(){var e=EM();return e.copy=function(){return wM(e,$M())},cj.apply(e,arguments),QM(e)}function eN(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}var tN=new Date,nN=new Date;function rN(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>rN(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e){if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}}),n&&(i.count=(t,r)=>(tN.setTime(+t),nN.setTime(+r),e(tN),e(nN),Math.floor(n(tN,nN))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var iN=rN(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);iN.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?rN(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):iN),iN.range;var aN=1e3,oN=aN*60,sN=oN*60,cN=sN*24,lN=cN*7,uN=cN*30,dN=cN*365,fN=rN(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*aN)},(e,t)=>(t-e)/aN,e=>e.getUTCSeconds());fN.range;var pN=rN(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*aN)},(e,t)=>{e.setTime(+e+t*oN)},(e,t)=>(t-e)/oN,e=>e.getMinutes());pN.range;var mN=rN(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*oN)},(e,t)=>(t-e)/oN,e=>e.getUTCMinutes());mN.range;var hN=rN(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*aN-e.getMinutes()*oN)},(e,t)=>{e.setTime(+e+t*sN)},(e,t)=>(t-e)/sN,e=>e.getHours());hN.range;var gN=rN(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*sN)},(e,t)=>(t-e)/sN,e=>e.getUTCHours());gN.range;var _N=rN(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*oN)/cN,e=>e.getDate()-1);_N.range;var vN=rN(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/cN,e=>e.getUTCDate()-1);vN.range;var yN=rN(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/cN,e=>Math.floor(e/cN));yN.range;function bN(e){return rN(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*oN)/lN)}var xN=bN(0),SN=bN(1),CN=bN(2),wN=bN(3),TN=bN(4),EN=bN(5),DN=bN(6);xN.range,SN.range,CN.range,wN.range,TN.range,EN.range,DN.range;function ON(e){return rN(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/lN)}var kN=ON(0),AN=ON(1),jN=ON(2),MN=ON(3),NN=ON(4),PN=ON(5),FN=ON(6);kN.range,AN.range,jN.range,MN.range,NN.range,PN.range,FN.range;var IN=rN(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());IN.range;var LN=rN(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());LN.range;var RN=rN(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());RN.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:rN(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),RN.range;var zN=rN(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());zN.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:rN(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),zN.range;function BN(e,t,n,r,i,a){let o=[[fN,1,aN],[fN,5,5*aN],[fN,15,15*aN],[fN,30,30*aN],[a,1,oN],[a,5,5*oN],[a,15,15*oN],[a,30,30*oN],[i,1,sN],[i,3,3*sN],[i,6,6*sN],[i,12,12*sN],[r,1,cN],[r,2,2*cN],[n,1,lN],[t,1,uN],[t,3,3*uN],[e,1,dN]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=WA(([,,e])=>e).right(o,i);if(a===o.length)return e.every(oj(t/dN,n/dN,r));if(a===0)return iN.every(Math.max(oj(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[rie,iie]=BN(zN,LN,kN,yN,gN,mN),[VN,HN]=BN(RN,IN,xN,_N,hN,pN);function UN(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 WN(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 GN(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function KN(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=$N(i),u=eP(i),d=$N(a),f=eP(a),p=$N(o),m=eP(o),h=$N(s),g=eP(s),_=$N(c),v=eP(c),y={a:j,A:M,b:ne,B:re,c:null,d:xP,e:xP,f:EP,g:IP,G:RP,H:SP,I:CP,j:wP,L:TP,m:DP,M:OP,p:ie,q:ae,Q:sF,s:cF,S:aie,u:kP,U:AP,V:MP,w:NP,W:PP,x:null,X:null,y:FP,Y:LP,Z:zP,"%":oF},b={a:N,A:oe,b:se,B:ce,c:null,d:BP,e:BP,f:GP,g:nF,G:iF,H:VP,I:HP,j:UP,L:WP,m:KP,M:qP,p:P,q:le,Q:sF,s:cF,S:JP,u:YP,U:XP,V:QP,w:$P,W:eF,x:null,X:null,y:tF,Y:rF,Z:aF,"%":oF},x={a:E,A:D,b:O,B:ee,c:te,d:dP,e:dP,f:_P,g:sP,G:oP,H:pP,I:pP,j:fP,L:gP,m:uP,M:mP,p:T,q:lP,Q:yP,s:bP,S:hP,u:nP,U:rP,V:iP,w:tP,W:aP,x:k,X:A,y:sP,Y:oP,Z:cP,"%":vP};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=qN[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=GN(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=WN(GN(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?AN.ceil(a):AN(a),a=vN.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=UN(GN(r.y,0,1)),o=a.getDay(),a=o>4||o===0?SN.ceil(a):SN(a),a=_N.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?WN(GN(r.y,0,1)).getUTCDay():UN(GN(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,WN(r)):UN(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in qN?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function ee(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function te(e,n,r){return w(e,t,n,r)}function k(e,t,r){return w(e,n,t,r)}function A(e,t,n){return w(e,r,t,n)}function j(e){return o[e.getDay()]}function M(e){return a[e.getDay()]}function ne(e){return c[e.getMonth()]}function re(e){return s[e.getMonth()]}function ie(e){return i[+(e.getHours()>=12)]}function ae(e){return 1+~~(e.getMonth()/3)}function N(e){return o[e.getUTCDay()]}function oe(e){return a[e.getUTCDay()]}function se(e){return c[e.getUTCMonth()]}function ce(e){return s[e.getUTCMonth()]}function P(e){return i[+(e.getUTCHours()>=12)]}function le(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var qN={"-":``,_:` `,0:`0`},JN=/^\s*\d+/,YN=/^%/,XN=/[\\^$*+?|[\]().{}]/g;function ZN(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function QN(e){return e.replace(XN,`\\$&`)}function $N(e){return RegExp(`^(?:`+e.map(QN).join(`|`)+`)`,`i`)}function eP(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function tP(e,t,n){var r=JN.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function nP(e,t,n){var r=JN.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function rP(e,t,n){var r=JN.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function iP(e,t,n){var r=JN.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function aP(e,t,n){var r=JN.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function oP(e,t,n){var r=JN.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function sP(e,t,n){var r=JN.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function cP(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function lP(e,t,n){var r=JN.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function uP(e,t,n){var r=JN.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function dP(e,t,n){var r=JN.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function fP(e,t,n){var r=JN.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function pP(e,t,n){var r=JN.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function mP(e,t,n){var r=JN.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function hP(e,t,n){var r=JN.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function gP(e,t,n){var r=JN.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function _P(e,t,n){var r=JN.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function vP(e,t,n){var r=YN.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function yP(e,t,n){var r=JN.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function bP(e,t,n){var r=JN.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function xP(e,t){return ZN(e.getDate(),t,2)}function SP(e,t){return ZN(e.getHours(),t,2)}function CP(e,t){return ZN(e.getHours()%12||12,t,2)}function wP(e,t){return ZN(1+_N.count(RN(e),e),t,3)}function TP(e,t){return ZN(e.getMilliseconds(),t,3)}function EP(e,t){return TP(e,t)+`000`}function DP(e,t){return ZN(e.getMonth()+1,t,2)}function OP(e,t){return ZN(e.getMinutes(),t,2)}function aie(e,t){return ZN(e.getSeconds(),t,2)}function kP(e){var t=e.getDay();return t===0?7:t}function AP(e,t){return ZN(xN.count(RN(e)-1,e),t,2)}function jP(e){var t=e.getDay();return t>=4||t===0?TN(e):TN.ceil(e)}function MP(e,t){return e=jP(e),ZN(TN.count(RN(e),e)+(RN(e).getDay()===4),t,2)}function NP(e){return e.getDay()}function PP(e,t){return ZN(SN.count(RN(e)-1,e),t,2)}function FP(e,t){return ZN(e.getFullYear()%100,t,2)}function IP(e,t){return e=jP(e),ZN(e.getFullYear()%100,t,2)}function LP(e,t){return ZN(e.getFullYear()%1e4,t,4)}function RP(e,t){var n=e.getDay();return e=n>=4||n===0?TN(e):TN.ceil(e),ZN(e.getFullYear()%1e4,t,4)}function zP(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+ZN(t/60|0,`0`,2)+ZN(t%60,`0`,2)}function BP(e,t){return ZN(e.getUTCDate(),t,2)}function VP(e,t){return ZN(e.getUTCHours(),t,2)}function HP(e,t){return ZN(e.getUTCHours()%12||12,t,2)}function UP(e,t){return ZN(1+vN.count(zN(e),e),t,3)}function WP(e,t){return ZN(e.getUTCMilliseconds(),t,3)}function GP(e,t){return WP(e,t)+`000`}function KP(e,t){return ZN(e.getUTCMonth()+1,t,2)}function qP(e,t){return ZN(e.getUTCMinutes(),t,2)}function JP(e,t){return ZN(e.getUTCSeconds(),t,2)}function YP(e){var t=e.getUTCDay();return t===0?7:t}function XP(e,t){return ZN(kN.count(zN(e)-1,e),t,2)}function ZP(e){var t=e.getUTCDay();return t>=4||t===0?NN(e):NN.ceil(e)}function QP(e,t){return e=ZP(e),ZN(NN.count(zN(e),e)+(zN(e).getUTCDay()===4),t,2)}function $P(e){return e.getUTCDay()}function eF(e,t){return ZN(AN.count(zN(e)-1,e),t,2)}function tF(e,t){return ZN(e.getUTCFullYear()%100,t,2)}function nF(e,t){return e=ZP(e),ZN(e.getUTCFullYear()%100,t,2)}function rF(e,t){return ZN(e.getUTCFullYear()%1e4,t,4)}function iF(e,t){var n=e.getUTCDay();return e=n>=4||n===0?NN(e):NN.ceil(e),ZN(e.getUTCFullYear()%1e4,t,4)}function aF(){return`+0000`}function oF(){return`%`}function sF(e){return+e}function cF(e){return Math.floor(e/1e3)}var lF,uF;oie({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 oie(e){return lF=KN(e),uF=lF.format,lF.parse,lF.utcFormat,lF.utcParse,lF}function sie(e){return new Date(e)}function cie(e){return e instanceof Date?+e:+new Date(+e)}function dF(e,t,n,r,i,a,o,s,c,l){var u=EM(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,cie)):f().map(sie)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(eN(n,e)):u},u.copy=function(){return wM(u,dF(e,t,n,r,i,a,o,s,c,l))},u}function fF(){return cj.apply(dF(VN,HN,RN,IN,xN,_N,hN,pN,fN,uF).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var pF=Pr[200],mF=Pr[600],hF=Pr[900],gF=Ar[700],lie=Lr[400],uie=Lr[100];function die(){let e=R(bO),t=R(cA);return(0,L.useMemo)(()=>{let n=tE(new Date,-12);return Q.of(t).filter(e=>e.end>=n).sortBy(e=>+!!e.plannedDown).map(t=>({station:t.stationLabel,start:t.start,end:t.end,plannedDown:t.plannedDown,parts:Q.of(t.parts??[]).collect(t=>{let n=e.get(t.uniq);return n?n.partName+`-`+t.proc.toString():null}).distinctAndSortBy(e=>e).toRArray()})).toRArray()},[e,t])}var _F=P(null),vF=14,yF=20,bF=10,xF=2;function fie(e,t,n,r,i){let a=dO.build(e,e=>e.station).union(dO.build(t,e=>e.station)),o=(a.toAscLazySeq().map(e=>_A(e,vF)).maxBy(e=>e??0)??20)+30,s=Math.max(r-o-xF,5),c=Math.max(i-bF-yF,5),l=fF().domain([tE(n,-12),tE(n,8)]).range([0,s]),u=dj().domain(Array.from(a)).range([0,c]).padding(.3);return{xScale:l,yScale:u,actualPlannedScale:dj().domain([`actual`,`planned`]).range([0,u.bandwidth()]).padding(.1),marginLeft:o}}function pie({xScale:e,yScale:t}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(zA,{scale:e,top:t.range()[1]}),(0,H.jsx)(BA,{scale:t,left:e.range()[0],fontSize:vF}),(0,H.jsx)(FA,{scale:e,height:t.range()[1]-t.range()[0]})]})}function mie({cycles:e,xScale:t,yScale:n,actualPlannedScale:r,hideTooltipRef:i}){let a=r(`actual`)??0,o=z(_F);function s(e){return t=>{let n=hA(t);n&&(i.current!==null&&(clearTimeout(i.current),i.current=null),o({left:n.x,top:n.y,data:{kind:`actual`,cycle:e}}))}}let c=(0,L.useCallback)(()=>{i.current=setTimeout(()=>{o(null)},300)},[i,o]);return(0,H.jsx)(`g`,{children:e.map((e,i)=>e.endActive&&e.endActive<e.endOccupied?(0,H.jsxs)(`g`,{onMouseOver:s(e),onMouseLeave:c,children:[(0,H.jsx)(`rect`,{x:t(e.startTime),y:(n(e.station)??0)+a,width:t(e.endOccupied)-t(e.startTime),height:r.bandwidth(),fill:mF}),(0,H.jsx)(`rect`,{x:t(e.endActive),y:(n(e.station)??0)+a+r.bandwidth()/10,width:t(e.endOccupied)-t(e.endActive),height:r.bandwidth()*8/10,fill:e.outlier?gF:hF})]},i):(0,H.jsx)(`g`,{onMouseOver:s(e),onMouseLeave:c,children:(0,H.jsx)(`rect`,{x:t(e.startTime),y:(n(e.station)??0)+a,width:t(e.endOccupied)-t(e.startTime),height:r.bandwidth(),fill:mF})},i))})}function hie(e,t,n,r){return`M ${e} ${t} A ${n} ${r} 0 0 1 ${e} ${t+r}`}function gie({now:e,cycles:t,xScale:n,yScale:r,actualPlannedScale:i,hideTooltipRef:a}){let o=i(`actual`)??0,s=z(_F);function c(t){return n=>{let r=hA(n);r&&(a.current!==null&&(clearTimeout(a.current),a.current=null),s({left:r.x,top:r.y,data:{kind:`current`,cycle:t,now:e}}))}}let l=(0,L.useCallback)(()=>{a.current=setTimeout(()=>{s(null)},300)},[a,s]);return(0,H.jsx)(`g`,{children:t.map((t,a)=>(0,H.jsxs)(`g`,{onMouseOver:c(t),onMouseLeave:l,children:[(0,H.jsx)(`rect`,{x:n(t.start),y:(r(t.station)??0)+o,width:n(e)-n(t.start),height:i.bandwidth(),fill:mF}),t.expectedEnd<e?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`rect`,{x:n(t.expectedEnd),y:(r(t.station)??0)+o+i.bandwidth()/10,width:n(e)-n(t.expectedEnd),height:i.bandwidth()*8/10,fill:t.isOutlier?gF:hF}),(0,H.jsx)(`path`,{d:hie(n(e),(r(t.station)??0)+o,80,i.bandwidth()),fill:pF})]}):(0,H.jsx)(`rect`,{x:n(e),y:(r(t.station)??0)+o,width:n(t.expectedEnd)-n(e),height:i.bandwidth(),fill:pF})]},a))})}function _ie({sim:e,xScale:t,yScale:n,actualPlannedScale:r,hideTooltipRef:i}){let a=r(`planned`)??0,o=z(_F);function s(e){return t=>{let n=hA(t);n&&(i.current!==null&&(clearTimeout(i.current),i.current=null),o({left:n.x,top:n.y,data:{kind:`sim`,cycle:e}}))}}let c=(0,L.useCallback)(()=>{i.current=setTimeout(()=>{o(null)},300)},[i,o]);return(0,H.jsx)(`g`,{children:e.map((e,i)=>(0,H.jsx)(`g`,{onMouseOver:s(e),onMouseLeave:c,children:(0,H.jsx)(`rect`,{x:t(e.start),y:(n(e.station)??0)+a,width:t(e.end)-t(e.start),height:r.bandwidth(),fill:e.plannedDown?uie:lie})},i))})}function vie({tooltip:e}){return(0,H.jsx)(uw,{children:e.data.kind===`actual`?(0,H.jsxs)(H.Fragment,{children:[e.data.cycle.outlier?(0,H.jsxs)(`div`,{children:[`Outlier Cycle for `,e.data.cycle.station]}):(0,H.jsx)(`div`,{children:e.data.cycle.station}),(0,H.jsxs)(`div`,{children:[`Start: `,e.data.cycle.startTime.toLocaleString()]}),(0,H.jsxs)(`div`,{children:[`End: `,e.data.cycle.endOccupied.toLocaleString()]}),e.data.cycle.endActive===void 0?void 0:(0,H.jsxs)(`div`,{children:[`Active Minutes:`,` `,gE(e.data.cycle.endActive,e.data.cycle.startTime)]}),(0,H.jsxs)(`div`,{children:[`Occupied Minutes:`,` `,gE(e.data.cycle.endOccupied,e.data.cycle.startTime)]}),e.data.cycle.parts.map((e,t)=>(0,H.jsxs)(`div`,{children:[`Part: `,e.part,` `,e.oper]},t))]}):e.data.kind===`sim`?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{children:[`Simulation of `,e.data.cycle.station]}),e.data.cycle.parts.map((e,t)=>(0,H.jsxs)(`div`,{children:[`Part: `,e]},t)),(0,H.jsxs)(`div`,{children:[`Predicted Start: `,e.data.cycle.start.toLocaleString()]}),(0,H.jsxs)(`div`,{children:[`Predicted End: `,e.data.cycle.end.toLocaleString()]}),e.data.cycle.plannedDown?(0,H.jsx)(`div`,{children:`Planned Downtime`}):void 0]}):(0,H.jsxs)(H.Fragment,{children:[e.data.cycle.isOutlier?(0,H.jsxs)(`div`,{children:[`Current Outlier Cycle for `,e.data.cycle.station]}):(0,H.jsxs)(`div`,{children:[`Current `,e.data.cycle.station]}),(0,H.jsxs)(`div`,{children:[`Start: `,e.data.cycle.start.toLocaleString()]}),(0,H.jsxs)(`div`,{children:[`Expected End: `,e.data.cycle.expectedEnd.toLocaleString()]}),e.data.cycle.expectedEnd<e.data.now?(0,H.jsxs)(`div`,{children:[`Cycle Exceeding Expected By`,` `,gE(e.data.now,e.data.cycle.expectedEnd),` Minutes`]}):(0,H.jsxs)(`div`,{children:[`Expected Remaining Minutes:`,` `,gE(e.data.cycle.expectedEnd,e.data.now)]}),(0,H.jsxs)(`div`,{children:[`Occupied Minutes: `,gE(e.data.now,e.data.cycle.start)]}),e.data.cycle.parts.map((e,t)=>(0,H.jsxs)(`div`,{children:[`Part: `,e.part,` `,e.oper]},t))]})})}function yie({now:e,xScale:t,yScale:n}){let r=t(e);return(0,H.jsxs)(`g`,{children:[(0,H.jsx)(`line`,{x1:r,x2:r,y1:n.range()[0],y2:n.range()[1]+8,stroke:`black`}),(0,H.jsx)(`text`,{x:r,y:n.range()[1]+8+11,textAnchor:`middle`,fontSize:11,children:`Now`})]})}function SF({height:e,width:t}){let n=R(hk),r=R(qO),i=die(),a=R(zO),o=R(br),s=(0,L.useMemo)(()=>{let e=tE(new Date,-12);return Zk(n.valuesToLazySeq().filter(t=>t.endTime>=e))},[n]),c=(0,L.useMemo)(()=>NA(a,r,o.loadStationNames),[a,r,o.loadStationNames]),l=new Date,[,u]=(0,L.useState)(0),d=(0,L.useRef)(null);(0,L.useEffect)(()=>{d.current!==null&&clearTimeout(d.current),d.current=setTimeout(()=>{u(e=>e+1)},3e5)});let{xScale:f,yScale:p,actualPlannedScale:m,marginLeft:h}=fie(s,c,l,t,e),g=(0,L.useRef)(null);return e<=0||t<=0?null:(0,H.jsxs)(`div`,{style:{position:`relative`,overflow:`hidden`},children:[(0,H.jsx)(`svg`,{height:e,width:t,children:(0,H.jsxs)(`g`,{transform:`translate(${h}, ${bF})`,children:[(0,H.jsx)(`clipPath`,{id:`recent-cycle-clip-body`,children:(0,H.jsx)(`rect`,{x:0,y:0,width:t-xF-h,height:e-yF-bF})}),(0,H.jsx)(pie,{xScale:f,yScale:p}),(0,H.jsxs)(`g`,{clipPath:`url(#recent-cycle-clip-body)`,children:[(0,H.jsx)(mie,{cycles:s,xScale:f,yScale:p,hideTooltipRef:g,actualPlannedScale:m}),(0,H.jsx)(gie,{now:l,cycles:c,xScale:f,yScale:p,hideTooltipRef:g,actualPlannedScale:m}),(0,H.jsx)(_ie,{sim:i,xScale:f,yScale:p,actualPlannedScale:m,hideTooltipRef:g})]}),(0,H.jsx)(yie,{now:l,xScale:f,yScale:p})]})}),(0,H.jsx)(DA,{chartHeight:e,chartWidth:t,atom:_F,TooltipContent:vie})]})}var bie=Object.defineProperty,CF=(e,t)=>bie(e,`name`,{value:t,configurable:!0}),wF=class{type=3;name=``;prefix=``;value=``;suffix=``;modifier=3;constructor(e,t,n,r,i,a){this.type=e,this.name=t,this.prefix=n,this.value=r,this.suffix=i,this.modifier=a}hasCustomName(){return this.name!==``&&typeof this.name!=`number`}};CF(wF,`Part`);var xie=/[$_\p{ID_Start}]/u,Sie=/[$_\u200C\u200D\p{ID_Continue}]/u,TF=`.*`;function EF(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}CF(EF,`isASCII`);function DF(e,t=!1){let n=[],r=0;for(;r<e.length;){let i=e[r],a=CF(function(i){if(!t)throw TypeError(i);n.push({type:`INVALID_CHAR`,index:r,value:e[r++]})},`ErrorOrInvalid`);if(i===`*`){n.push({type:`ASTERISK`,index:r,value:e[r++]});continue}if(i===`+`||i===`?`){n.push({type:`OTHER_MODIFIER`,index:r,value:e[r++]});continue}if(i===`\\`){n.push({type:`ESCAPED_CHAR`,index:r++,value:e[r++]});continue}if(i===`{`){n.push({type:`OPEN`,index:r,value:e[r++]});continue}if(i===`}`){n.push({type:`CLOSE`,index:r,value:e[r++]});continue}if(i===`:`){let t=``,i=r+1;for(;i<e.length;){let n=e.substr(i,1);if(i===r+1&&xie.test(n)||i!==r+1&&Sie.test(n)){t+=e[i++];continue}break}if(!t){a(`Missing parameter name at ${r}`);continue}n.push({type:`NAME`,index:r,value:t}),r=i;continue}if(i===`(`){let t=1,i=``,o=r+1,s=!1;if(e[o]===`?`){a(`Pattern cannot start with "?" at ${o}`);continue}for(;o<e.length;){if(!EF(e[o],!1)){a(`Invalid character '${e[o]}' at ${o}.`),s=!0;break}if(e[o]===`\\`){i+=e[o++]+e[o++];continue}if(e[o]===`)`){if(t--,t===0){o++;break}}else if(e[o]===`(`&&(t++,e[o+1]!==`?`)){a(`Capturing groups are not allowed at ${o}`),s=!0;break}i+=e[o++]}if(s)continue;if(t){a(`Unbalanced pattern at ${r}`);continue}if(!i){a(`Missing pattern at ${r}`);continue}n.push({type:`REGEX`,index:r,value:i}),r=o;continue}n.push({type:`CHAR`,index:r,value:e[r++]})}return n.push({type:`END`,index:r,value:``}),n}CF(DF,`lexer`);function OF(e,t={}){let n=DF(e);t.delimiter??=`/#?`,t.prefixes??=`./`;let r=`[^${kF(t.delimiter)}]+?`,i=[],a=0,o=0,s=new Set,c=CF(e=>{if(o<n.length&&n[o].type===e)return n[o++].value},`tryConsume`),l=CF(()=>c(`OTHER_MODIFIER`)??c(`ASTERISK`),`tryConsumeModifier`),u=CF(e=>{let t=c(e);if(t!==void 0)return t;let{type:r,index:i}=n[o];throw TypeError(`Unexpected ${r} at ${i}, expected ${e}`)},`mustConsume`),d=CF(()=>{let e=``,t;for(;t=c(`CHAR`)??c(`ESCAPED_CHAR`);)e+=t;return e},`consumeText`),f=CF(e=>e,`DefaultEncodePart`),p=t.encodePart||f,m=``,h=CF(e=>{m+=e},`appendToPendingFixedValue`),g=CF(()=>{m.length&&(i.push(new wF(3,``,``,p(m),``,3)),m=``)},`maybeAddPartFromPendingFixedValue`),_=CF((e,t,n,o,c)=>{let l=3;switch(c){case`?`:l=1;break;case`*`:l=0;break;case`+`:l=2}if(!t&&!n&&l===3){h(e);return}if(g(),!t&&!n){if(!e)return;i.push(new wF(3,``,``,p(e),``,l));return}let u;u=n?n===`*`?TF:n:r;let d=2;u===r?(d=1,u=``):u===TF&&(d=0,u=``);let f;if(t?f=t:n&&(f=a++),s.has(f))throw TypeError(`Duplicate name '${f}'.`);s.add(f),i.push(new wF(d,f,p(e),u,p(o),l))},`addPart`);for(;o<n.length;){let e=c(`CHAR`),n=c(`NAME`),r=c(`REGEX`);if(!n&&!r&&(r=c(`ASTERISK`)),n||r){let i=e??``;t.prefixes.indexOf(i)===-1&&(h(i),i=``),g();let a=l();_(i,n,r,``,a);continue}let i=e??c(`ESCAPED_CHAR`);if(i){h(i);continue}if(c(`OPEN`)){let e=d(),t=c(`NAME`),n=c(`REGEX`);!t&&!n&&(n=c(`ASTERISK`));let r=d();u(`CLOSE`);let i=l();_(e,t,n,r,i);continue}g(),u(`END`)}return i}CF(OF,`parse`);function kF(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,`\\$1`)}CF(kF,`escapeString`);function AF(e){return e&&e.ignoreCase?`ui`:`u`}CF(AF,`flags`);function jF(e,t,n){return NF(OF(e,n),t,n)}CF(jF,`stringToRegexp`);function MF(e){switch(e){case 0:return`*`;case 1:return`?`;case 2:return`+`;case 3:return``}}CF(MF,`modifierToString`);function NF(e,t,n={}){n.delimiter??=`/#?`,n.prefixes??=`./`,n.sensitive??=!1,n.strict??=!1,n.end??=!0,n.start??=!0,n.endsWith=``;let r=n.start?`^`:``;for(let i of e){if(i.type===3){i.modifier===3?r+=kF(i.value):r+=`(?:${kF(i.value)})${MF(i.modifier)}`;continue}t&&t.push(i.name);let e=`[^${kF(n.delimiter)}]+?`,a=i.value;if(i.type===1?a=e:i.type===0&&(a=TF),!i.prefix.length&&!i.suffix.length){i.modifier===3||i.modifier===1?r+=`(${a})${MF(i.modifier)}`:r+=`((?:${a})${MF(i.modifier)})`;continue}if(i.modifier===3||i.modifier===1){r+=`(?:${kF(i.prefix)}(${a})${kF(i.suffix)})`,r+=MF(i.modifier);continue}r+=`(?:${kF(i.prefix)}`,r+=`((?:${a})(?:`,r+=kF(i.suffix),r+=kF(i.prefix),r+=`(?:${a}))*)${kF(i.suffix)})`,i.modifier===0&&(r+=`?`)}let i=`[${kF(n.endsWith)}]|$`,a=`[${kF(n.delimiter)}]`;if(n.end)return n.strict||(r+=`${a}?`),n.endsWith.length?r+=`(?=${i})`:r+=`$`,new RegExp(r,AF(n));n.strict||(r+=`(?:${a}(?=${i}))?`);let o=!1;if(e.length){let t=e[e.length-1];t.type===3&&t.modifier===3&&(o=n.delimiter.indexOf(t)>-1)}return o||(r+=`(?=${a}|${i})`),new RegExp(r,AF(n))}CF(NF,`partsToRegexp`);var PF={delimiter:``,prefixes:``,sensitive:!0,strict:!0},Cie={delimiter:`.`,prefixes:``,sensitive:!0,strict:!0},wie={delimiter:`/`,prefixes:`/`,sensitive:!0,strict:!0};function FF(e,t){return e.length?e[0]===`/`?!0:!t||e.length<2?!1:(e[0]==`\\`||e[0]==`{`)&&e[1]==`/`:!1}CF(FF,`isAbsolutePathname`);function IF(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}CF(IF,`maybeStripPrefix`);function LF(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}CF(LF,`maybeStripSuffix`);function RF(e){return!e||e.length<2?!1:e[0]===`[`||(e[0]===`\\`||e[0]===`{`)&&e[1]===`[`}CF(RF,`treatAsIPv6Hostname`);var zF=[`ftp`,`file`,`http`,`https`,`ws`,`wss`];function BF(e){if(!e)return!0;for(let t of zF)if(e.test(t))return!0;return!1}CF(BF,`isSpecialScheme`);function VF(e,t){if(e=IF(e,`#`),t||e===``)return e;let n=new URL(`https://example.com`);return n.hash=e,n.hash?n.hash.substring(1,n.hash.length):``}CF(VF,`canonicalizeHash`);function HF(e,t){if(e=IF(e,`?`),t||e===``)return e;let n=new URL(`https://example.com`);return n.search=e,n.search?n.search.substring(1,n.search.length):``}CF(HF,`canonicalizeSearch`);function UF(e,t){return t||e===``?e:RF(e)?eI(e):$F(e)}CF(UF,`canonicalizeHostname`);function WF(e,t){if(t||e===``)return e;let n=new URL(`https://example.com`);return n.password=e,n.password}CF(WF,`canonicalizePassword`);function GF(e,t){if(t||e===``)return e;let n=new URL(`https://example.com`);return n.username=e,n.username}CF(GF,`canonicalizeUsername`);function KF(e,t,n){if(n||e===``)return e;if(t&&!zF.includes(t))return new URL(`${t}:${e}`).pathname;let r=e[0]==`/`;return e=new URL(r?e:`/-`+e,`https://example.com`).pathname,r||(e=e.substring(2,e.length)),e}CF(KF,`canonicalizePathname`);function qF(e,t,n){return YF(t)===e&&(e=``),n||e===``?e:tI(e)}CF(qF,`canonicalizePort`);function JF(e,t){return e=LF(e,`:`),t||e===``?e:XF(e)}CF(JF,`canonicalizeProtocol`);function YF(e){switch(e){case`ws`:case`http`:return`80`;case`wws`:case`https`:return`443`;case`ftp`:return`21`;default:return``}}CF(YF,`defaultPortForProtocol`);function XF(e){if(e===``)return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw TypeError(`Invalid protocol '${e}'.`)}CF(XF,`protocolEncodeCallback`);function ZF(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.username=e,t.username}CF(ZF,`usernameEncodeCallback`);function QF(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.password=e,t.password}CF(QF,`passwordEncodeCallback`);function $F(e){if(e===``)return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw TypeError(`Invalid hostname '${e}'`);let t=new URL(`https://example.com`);return t.hostname=e,t.hostname}CF($F,`hostnameEncodeCallback`);function eI(e){if(e===``)return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}CF(eI,`ipv6HostnameEncodeCallback`);function tI(e){if(e===``||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw TypeError(`Invalid port '${e}'.`)}CF(tI,`portEncodeCallback`);function nI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.pathname=e[0]===`/`?e:`/-`+e,e[0]===`/`?t.pathname:t.pathname.substring(2,t.pathname.length)}CF(nI,`standardURLPathnameEncodeCallback`);function rI(e){return e===``?e:new URL(`data:${e}`).pathname}CF(rI,`pathURLPathnameEncodeCallback`);function iI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.search=e,t.search.substring(1,t.search.length)}CF(iI,`searchEncodeCallback`);function aI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.hash=e,t.hash.substring(1,t.hash.length)}CF(aI,`hashEncodeCallback`);var oI=class{#e;#t=[];#n={};#r=0;#i=1;#a=0;#o=0;#s=0;#c=0;#l=!1;constructor(e){this.#e=e}get result(){return this.#n}parse(){for(this.#t=DF(this.#e,!0);this.#r<this.#t.length;this.#r+=this.#i){if(this.#i=1,this.#t[this.#r].type===`END`){if(this.#o===0){this.#f(),this.#C()?this.#u(9,1):this.#S()?this.#u(8,1):this.#u(7,0);continue}if(this.#o===2){this.#p(5);continue}this.#u(10,0);break}if(this.#s>0){if(this.#T())--this.#s;else continue}if(this.#w()){this.#s+=1;continue}switch(this.#o){case 0:this.#g()&&this.#p(1);break;case 1:if(this.#g()){this.#k();let e=7,t=1;this.#_()?(e=2,t=3):this.#l&&(e=2),this.#u(e,t)}break;case 2:this.#v()?this.#p(3):(this.#x()||this.#S()||this.#C())&&this.#p(5);break;case 3:this.#y()?this.#u(4,1):this.#v()&&this.#u(5,1);break;case 4:this.#v()&&this.#u(5,1);break;case 5:this.#E()?this.#c+=1:this.#D()&&--this.#c,this.#b()&&!this.#c?this.#u(6,1):this.#x()?this.#u(7,0):this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 6:this.#x()?this.#u(7,0):this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 7:this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 8:this.#C()&&this.#u(9,1)}}this.#n.hostname!==void 0&&this.#n.port===void 0&&(this.#n.port=``)}#u(e,t){switch(this.#o){case 0:break;case 1:this.#n.protocol=this.#O();break;case 2:break;case 3:this.#n.username=this.#O();break;case 4:this.#n.password=this.#O();break;case 5:this.#n.hostname=this.#O();break;case 6:this.#n.port=this.#O();break;case 7:this.#n.pathname=this.#O();break;case 8:this.#n.search=this.#O();break;case 9:this.#n.hash=this.#O()}this.#o!==0&&e!==10&&([1,2,3,4].includes(this.#o)&&[6,7,8,9].includes(e)&&(this.#n.hostname??=``),[1,2,3,4,5,6].includes(this.#o)&&[8,9].includes(e)&&(this.#n.pathname??=this.#l?`/`:``),[1,2,3,4,5,6,7].includes(this.#o)&&e===9&&(this.#n.search??=``)),this.#d(e,t)}#d(e,t){this.#o=e,this.#a=this.#r+t,this.#r+=t,this.#i=0}#f(){this.#r=this.#a,this.#i=0}#p(e){this.#f(),this.#o=e}#m(e){return e<0&&(e=this.#t.length-e),e<this.#t.length?this.#t[e]:this.#t[this.#t.length-1]}#h(e,t){let n=this.#m(e);return n.value===t&&(n.type===`CHAR`||n.type===`ESCAPED_CHAR`||n.type===`INVALID_CHAR`)}#g(){return this.#h(this.#r,`:`)}#_(){return this.#h(this.#r+1,`/`)&&this.#h(this.#r+2,`/`)}#v(){return this.#h(this.#r,`@`)}#y(){return this.#h(this.#r,`:`)}#b(){return this.#h(this.#r,`:`)}#x(){return this.#h(this.#r,`/`)}#S(){if(this.#h(this.#r,`?`))return!0;if(this.#t[this.#r].value!==`?`)return!1;let e=this.#m(this.#r-1);return e.type!==`NAME`&&e.type!==`REGEX`&&e.type!==`CLOSE`&&e.type!==`ASTERISK`}#C(){return this.#h(this.#r,`#`)}#w(){return this.#t[this.#r].type==`OPEN`}#T(){return this.#t[this.#r].type==`CLOSE`}#E(){return this.#h(this.#r,`[`)}#D(){return this.#h(this.#r,`]`)}#O(){let e=this.#t[this.#r],t=this.#m(this.#a).index;return this.#e.substring(t,e.index)}#k(){let e={};Object.assign(e,PF),e.encodePart=XF;let t=jF(this.#O(),void 0,e);this.#l=BF(t)}};CF(oI,`Parser`);var sI=[`protocol`,`username`,`password`,`hostname`,`port`,`pathname`,`search`,`hash`],cI=`*`;function lI(e,t){if(typeof e!=`string`)throw TypeError(`parameter 1 is not of type 'string'.`);let n=new URL(e,t);return{protocol:n.protocol.substring(0,n.protocol.length-1),username:n.username,password:n.password,hostname:n.hostname,port:n.port,pathname:n.pathname,search:n.search===``?void 0:n.search.substring(1,n.search.length),hash:n.hash===``?void 0:n.hash.substring(1,n.hash.length)}}CF(lI,`extractValues`);function uI(e,t){return t?fI(e):e}CF(uI,`processBaseURLString`);function dI(e,t,n){let r;if(typeof t.baseURL==`string`)try{r=new URL(t.baseURL),t.protocol===void 0&&(e.protocol=uI(r.protocol.substring(0,r.protocol.length-1),n)),!n&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&(e.username=uI(r.username,n)),!n&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&t.password===void 0&&(e.password=uI(r.password,n)),t.protocol===void 0&&t.hostname===void 0&&(e.hostname=uI(r.hostname,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&(e.port=uI(r.port,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&(e.pathname=uI(r.pathname,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&(e.search=uI(r.search.substring(1,r.search.length),n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&t.hash===void 0&&(e.hash=uI(r.hash.substring(1,r.hash.length),n))}catch{throw TypeError(`invalid baseURL '${t.baseURL}'.`)}if(typeof t.protocol==`string`&&(e.protocol=JF(t.protocol,n)),typeof t.username==`string`&&(e.username=GF(t.username,n)),typeof t.password==`string`&&(e.password=WF(t.password,n)),typeof t.hostname==`string`&&(e.hostname=UF(t.hostname,n)),typeof t.port==`string`&&(e.port=qF(t.port,e.protocol,n)),typeof t.pathname==`string`){if(e.pathname=t.pathname,r&&!FF(e.pathname,n)){let t=r.pathname.lastIndexOf(`/`);t>=0&&(e.pathname=uI(r.pathname.substring(0,t+1),n)+e.pathname)}e.pathname=KF(e.pathname,e.protocol,n)}return typeof t.search==`string`&&(e.search=HF(t.search,n)),typeof t.hash==`string`&&(e.hash=VF(t.hash,n)),e}CF(dI,`applyInit`);function fI(e){return e.replace(/([+*?:{}()\\])/g,`\\$1`)}CF(fI,`escapePatternString`);function pI(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,`\\$1`)}CF(pI,`escapeRegexpString`);function mI(e,t){t.delimiter??=`/#?`,t.prefixes??=`./`,t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith=``;let n=`[^${pI(t.delimiter)}]+?`,r=/[$_\u200C\u200D\p{ID_Continue}]/u,i=``;for(let a=0;a<e.length;++a){let o=e[a];if(o.type===3){if(o.modifier===3){i+=fI(o.value);continue}i+=`{${fI(o.value)}}${MF(o.modifier)}`;continue}let s=o.hasCustomName(),c=!!o.suffix.length||!!o.prefix.length&&(o.prefix.length!==1||!t.prefixes.includes(o.prefix)),l=a>0?e[a-1]:null,u=a<e.length-1?e[a+1]:null;if(!c&&s&&o.type===1&&o.modifier===3&&u&&!u.prefix.length&&!u.suffix.length){if(u.type===3){let e=u.value.length>0?u.value[0]:``;c=r.test(e)}else c=!u.hasCustomName()}if(!c&&!o.prefix.length&&l&&l.type===3){let e=l.value[l.value.length-1];c=t.prefixes.includes(e)}c&&(i+=`{`),i+=fI(o.prefix),s&&(i+=`:${o.name}`),o.type===2?i+=`(${o.value})`:o.type===1?s||(i+=`(${n})`):o.type===0&&(!s&&(!l||l.type===3||l.modifier!==3||c||o.prefix!==``)?i+=`*`:i+=`(.*)`),o.type===1&&s&&o.suffix.length&&r.test(o.suffix[0])&&(i+=`\\`),i+=fI(o.suffix),c&&(i+=`}`),o.modifier!==3&&(i+=MF(o.modifier))}return i}CF(mI,`partsToPattern`);var hI=class{#e;#t={};#n={};#r={};#i={};#a=!1;constructor(e={},t,n){try{let r;if(typeof t==`string`?r=t:n=t,typeof e==`string`){let t=new oI(e);if(t.parse(),e=t.result,r===void 0&&typeof e.protocol!=`string`)throw TypeError(`A base URL must be provided for a relative constructor string.`);e.baseURL=r}else{if(!e||typeof e!=`object`)throw TypeError(`parameter 1 is not of type 'string' and cannot convert to dictionary.`);if(r)throw TypeError(`parameter 1 is not of type 'string'.`)}typeof n>`u`&&(n={ignoreCase:!1});let i={ignoreCase:n.ignoreCase===!0},a={pathname:cI,protocol:cI,username:cI,password:cI,hostname:cI,port:cI,search:cI,hash:cI};this.#e=dI(a,e,!0),YF(this.#e.protocol)===this.#e.port&&(this.#e.port=``);let o;for(o of sI){if(!(o in this.#e))continue;let e={},t=this.#e[o];switch(this.#n[o]=[],o){case`protocol`:Object.assign(e,PF),e.encodePart=XF;break;case`username`:Object.assign(e,PF),e.encodePart=ZF;break;case`password`:Object.assign(e,PF),e.encodePart=QF;break;case`hostname`:Object.assign(e,Cie),e.encodePart=RF(t)?eI:$F;break;case`port`:Object.assign(e,PF),e.encodePart=tI;break;case`pathname`:BF(this.#t.protocol)?(Object.assign(e,wie,i),e.encodePart=nI):(Object.assign(e,PF,i),e.encodePart=rI);break;case`search`:Object.assign(e,PF,i),e.encodePart=iI;break;case`hash`:Object.assign(e,PF,i),e.encodePart=aI}try{this.#i[o]=OF(t,e),this.#t[o]=NF(this.#i[o],this.#n[o],e),this.#r[o]=mI(this.#i[o],e),this.#a=this.#a||this.#i[o].some(e=>e.type===2)}catch{throw TypeError(`invalid ${o} pattern '${this.#e[o]}'.`)}}}catch(e){throw TypeError(`Failed to construct 'URLPattern': ${e.message}`)}}get[Symbol.toStringTag](){return`URLPattern`}test(e={},t){let n={pathname:``,protocol:``,username:``,password:``,hostname:``,port:``,search:``,hash:``};if(typeof e!=`string`&&t)throw TypeError(`parameter 1 is not of type 'string'.`);if(typeof e>`u`)return!1;try{n=typeof e==`object`?dI(n,e,!1):dI(n,lI(e,t),!1)}catch{return!1}let r;for(r of sI)if(!this.#t[r].exec(n[r]))return!1;return!0}exec(e={},t){let n={pathname:``,protocol:``,username:``,password:``,hostname:``,port:``,search:``,hash:``};if(typeof e!=`string`&&t)throw TypeError(`parameter 1 is not of type 'string'.`);if(typeof e>`u`)return;try{n=typeof e==`object`?dI(n,e,!1):dI(n,lI(e,t),!1)}catch{return null}let r={};r.inputs=t?[e,t]:[e];let i;for(i of sI){let e=this.#t[i].exec(n[i]);if(!e)return null;let t={};for(let[n,r]of this.#n[i].entries())(typeof r==`string`||typeof r==`number`)&&(t[r]=e[n+1]);r[i]={input:n[i]??``,groups:t}}return r}static compareComponent(e,t,n){let r=CF((e,t)=>{for(let n of[`type`,`modifier`,`prefix`,`value`,`suffix`]){if(e[n]<t[n])return-1;if(e[n]!==t[n])return 1}return 0},`comparePart`),i=new wF(3,``,``,``,``,3),a=new wF(0,``,``,``,``,3),o=CF((e,t)=>{let n=0;for(;n<Math.min(e.length,t.length);++n){let i=r(e[n],t[n]);if(i)return i}return e.length===t.length?0:r(e[n]??i,t[n]??i)},`comparePartList`);return!t.#r[e]&&!n.#r[e]?0:t.#r[e]&&!n.#r[e]?o(t.#i[e],[a]):!t.#r[e]&&n.#r[e]?o([a],n.#i[e]):o(t.#i[e],n.#i[e])}get protocol(){return this.#r.protocol}get username(){return this.#r.username}get password(){return this.#r.password}get hostname(){return this.#r.hostname}get port(){return this.#r.port}get pathname(){return this.#r.pathname}get search(){return this.#r.search}get hash(){return this.#r.hash}get hasRegExpGroups(){return this.#a}};CF(hI,`URLPattern`),globalThis.URLPattern||(globalThis.URLPattern=hI);function*Tie(e){let t=null;for(let n of e)t!=null&&t.type===V.RemoveFromQueue&&n.type===V.AddToQueue&&t.loc===n.loc?t=null:(t!==null&&(yield t),t=n);t!==null&&(yield t)}function gI(e,t){return e.pal>0?`${t} ${e.pal}`:t}function Eie(e,t){let n=gI(e,t);return e.startofcycle?`${n} started cycle`:`${n} completed cycle`}var _I=G(`span`,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$type:e})=>{switch(e){case`machine`:return{color:`#1565C0`};case`loadStation`:return{color:`#795548`};case`pallet`:return{color:`#00695C`};case`queue`:return{color:`#6A1B9A`};case`inspectionNotSignaled`:return{color:`#4527A0`};case`inspectionSignaled`:return{color:`red`};case`closeoutFailed`:return{color:`red`}}});function Die(e,t){let n=dk(t.basketName);switch(e.type){case V.LoadUnloadCycle:return e.startofcycle?`Start `+e.result.charAt(0).toUpperCase()+e.result.substring(1).toLowerCase():`End `+e.result.charAt(0).toUpperCase()+e.result.substring(1).toLowerCase();case V.BasketLoadUnload:return e.program===`LOAD`?`${n} Load`:`${n} Unload`;case V.BasketCycle:return`${n} Cycle`;case V.MachineCycle:return e.startofcycle?`Start Cycle`:`End Cycle`;case V.PartMark:return`Serial`;case V.OrderAssignment:return`Workorder`;case V.Inspection:case V.InspectionForce:return`Signal`;case V.PalletCycle:return`Pallet Cycle`;case V.WorkorderComment:return`Workorder`;case V.CloseOut:return`CloseOut`;case V.InspectionResult:return`Inspection`;case V.AddToQueue:return`Queue`;case V.RemoveFromQueue:return`Queue`;case V.PalletInStocker:return`Stocker`;case V.PalletOnRotaryInbound:return`Rotary`;case V.SignalQuarantine:return`Quarantine`;case V.SwapMaterialOnPallet:return`Swap Serial`;case V.InvalidateCycle:return`Invalidate Cycle`;case V.Rebooking:return`Rebooking`;case V.CancelRebooking:return`Cancel Rebooking`;default:return`Message`}}function vI(e){return e.details?.PalletCycleInvalidated===`1`}function yI(e){return e.length>1?e[0].numproc==1?`${e[0].part} x${e.length}`:`${e[0].part}-${Q.of(e).map(e=>e.proc).distinctAndSortBy(e=>e).toRArray().join(`&`)} x${e.length}`:e.length==1?e[0].numproc==1?e[0].part:`${e[0].part}-${e[0].proc}`:``}function bI(e){return e.length>1?`${e[0].part} x${e.length}`:e.length===1?e[0].part:``}function Oie(e,t){let n=e.entry;switch(n.type){case V.LoadUnloadCycle:return(0,H.jsxs)(`span`,{children:[yI(n.material),` on`,` `,(0,H.jsxs)(_I,{$type:`pallet`,children:[`pallet `,n.pal]}),` at`,` `,(0,H.jsx)(_I,{$type:`loadStation`,children:ck(n.locnum,t.loadStationNames)})]});case V.BasketLoadUnload:{let e=dk(t.basketName);return(0,H.jsxs)(`span`,{children:[yI(n.material),` `,n.program===`LOAD`?`loaded onto`:`unloaded from`,` `,(0,H.jsx)(_I,{$type:`pallet`,children:gI(n,e)}),` at`,` `,(0,H.jsx)(_I,{$type:`loadStation`,children:ck(n.locnum,t.loadStationNames)})]})}case V.BasketCycle:{let e=dk(t.basketName);return(0,H.jsx)(`span`,{children:Eie(n,e)})}case V.MachineCycle:return(0,H.jsxs)(`span`,{children:[yI(n.material),` on`,` `,(0,H.jsxs)(_I,{$type:`pallet`,children:[`pallet `,n.pal]}),` at`,` `,(0,H.jsxs)(_I,{$type:`machine`,children:[n.loc,` `,n.locnum.toString()]}),n.program&&n.program!==``?(0,H.jsxs)(`span`,{children:[` with program `,n.program]}):void 0]});case V.PartMark:return(0,H.jsxs)(`span`,{children:[yI(n.material),` marked with `,n.result]});case V.OrderAssignment:return(0,H.jsxs)(`span`,{children:[yI(n.material),` assigned to workorder `,n.result]});case V.PalletCycle:return n.startofcycle?(0,H.jsxs)(`span`,{children:[`Pallet `,n.pal,` started route`]}):(0,H.jsxs)(`span`,{children:[`Pallet `,n.pal,` completed route`]});case V.Inspection:{let e=(n.details||{}).InspectionType||``;return n.result.toLowerCase()===`true`||n.result===`1`?(0,H.jsxs)(`span`,{children:[yI(n.material),` signaled for inspection`,` `,(0,H.jsx)(_I,{$type:`inspectionSignaled`,children:e})]}):(0,H.jsxs)(`span`,{children:[yI(n.material),` skipped inspection`,` `,(0,H.jsx)(_I,{$type:`inspectionNotSignaled`,children:e})]})}case V.InspectionForce:{let e=n.program;return n.result.toLowerCase()===`true`||n.result===`1`?(0,H.jsxs)(`span`,{children:[yI(n.material),` declared for inspection`,` `,(0,H.jsx)(_I,{$type:`inspectionSignaled`,children:e})]}):(0,H.jsxs)(`span`,{children:[yI(n.material),` passed over for inspection`,` `,(0,H.jsx)(_I,{$type:`inspectionNotSignaled`,children:e})]})}case V.WorkorderComment:return(0,H.jsxs)(`span`,{children:[`Workorder `,n.result,` Comment`]});case V.InspectionResult:return n.result.toLowerCase()===`false`?(0,H.jsxs)(_I,{$type:`inspectionSignaled`,children:[n.program,` Failed`]}):(0,H.jsxs)(_I,{$type:`inspectionSignaled`,children:[n.program,` Succeeded`]});case V.CloseOut:return n.result.toLowerCase()===`failed`?(0,H.jsxs)(_I,{$type:`closeoutFailed`,children:[n.program&&n.program!==``?n.program:`CloseOut`,` Failed`]}):(0,H.jsxs)(`span`,{children:[n.program&&n.program!==``?n.program:`CloseOut`,` Completed`]});case V.AddToQueue:switch(n.program){case`Unloaded`:return(0,H.jsxs)(`span`,{children:[bI(n.material),` unloaded into queue`,` `,(0,H.jsx)(_I,{$type:`queue`,children:n.loc})]});case`SetByOperator`:return(0,H.jsxs)(`span`,{children:[bI(n.material),` set manually into queue`,` `,(0,H.jsx)(_I,{$type:`queue`,children:n.loc})]});case`Quarantine`:return(0,H.jsxs)(`span`,{children:[bI(n.material),` quarantined into queue`,` `,(0,H.jsx)(_I,{$type:`queue`,children:n.loc})]});case`SwapMaterial`:return(0,H.jsxs)(`span`,{children:[bI(n.material),` swapped off pallet into queue`,` `,(0,H.jsx)(_I,{$type:`queue`,children:n.loc})]});case`MaterialMissingOnPallet`:return(0,H.jsxs)(`span`,{children:[bI(n.material),` removed from cell controller, added to queue`,` `,(0,H.jsx)(_I,{$type:`queue`,children:n.loc})]});default:return(0,H.jsxs)(`span`,{children:[bI(n.material),` added to queue`,` `,(0,H.jsx)(_I,{$type:`queue`,children:n.loc}),n.program&&n.program!==``?` (`+n.program+`)`:void 0]})}case V.RemoveFromQueue:return(0,H.jsxs)(`span`,{children:[bI(n.material),` removed from queue`,` `,(0,H.jsx)(_I,{$type:`queue`,children:n.loc})]});case V.PalletInStocker:return n.startofcycle?(0,H.jsxs)(`span`,{children:[(0,H.jsxs)(_I,{$type:`pallet`,children:[`Pallet `,n.pal]}),` arrived at stocker`,` `,n.locnum]}):(0,H.jsxs)(`span`,{children:[(0,H.jsxs)(_I,{$type:`pallet`,children:[`Pallet `,n.pal]}),` departed stocker`,` `,n.locnum]});case V.PalletOnRotaryInbound:return n.startofcycle?(0,H.jsxs)(`span`,{children:[(0,H.jsxs)(_I,{$type:`pallet`,children:[`Pallet `,n.pal]}),` arrived at`,` `,(0,H.jsxs)(_I,{$type:`machine`,children:[n.loc,` `,n.locnum.toString()]})]}):n.result==`RotateIntoWorktable`?(0,H.jsxs)(`span`,{children:[(0,H.jsxs)(_I,{$type:`pallet`,children:[`Pallet `,n.pal]}),` rotated into`,` `,(0,H.jsxs)(_I,{$type:`machine`,children:[n.loc,` `,n.locnum.toString()]}),` `,`worktable`]}):(0,H.jsxs)(`span`,{children:[(0,H.jsxs)(_I,{$type:`pallet`,children:[`Pallet `,n.pal]}),` left`,` `,(0,H.jsxs)(_I,{$type:`machine`,children:[n.loc,` `,n.locnum.toString()]})]});case V.SignalQuarantine:return(0,H.jsxs)(`span`,{children:[yI(n.material),` signaled for quarantine after unload`]});case V.SwapMaterialOnPallet:return(0,H.jsx)(`span`,{children:n.result});case V.InvalidateCycle:return(0,H.jsx)(`span`,{children:n.result});case V.Rebooking:return(0,H.jsxs)(`span`,{children:[`Rebooking requested with ID `,n.result]});case V.CancelRebooking:return(0,H.jsxs)(`span`,{children:[`Rebooking `,n.result,` canceled`]});default:return(0,H.jsx)(`span`,{children:n.result})}}function kie(e){let t=[];if(e.details&&e.details.operator&&t.push({name:`Operator`,value:e.details.operator}),e.details&&e.details.note&&t.push({name:`Note`,value:e.details.note}),e.tooluse)for(let n of e.tooluse){let e=null;if(n.toolUseDuringCycle&&n.toolUseDuringCycle!==``&&(e=WO(n.toolUseDuringCycle).toFixed(1)+` minutes used during cycle.`,n.totalToolUseAtEndOfCycle&&n.configuredToolLife&&n.totalToolUseAtEndOfCycle!==``&&n.configuredToolLife!==``)){let t=UO(n.totalToolUseAtEndOfCycle),r=UO(n.configuredToolLife),i=t/r;e+=` Total use at end of cycle: ${(t/60).toFixed(1)}/${(r/60).toFixed(1)} minutes (${(i*100).toFixed(0)}%).`}if(n.toolUseCountDuringCycle&&n.toolUseCountDuringCycle>0&&(e=(e===null?``:` | `)+`${n.toolUseCountDuringCycle} use${n.toolUseCountDuringCycle>1?`s`:``} during cycle.`,n.totalToolUseCountAtEndOfCycle&&n.configuredToolLifeCount&&(e+=` Total use count at end of cycle: ${n.totalToolUseCountAtEndOfCycle}/${n.configuredToolLifeCount} (${(n.totalToolUseCountAtEndOfCycle/n.configuredToolLifeCount*100).toFixed(0)}%).`)),e!==null){let r=n.pocket>0?`${n.tool} [${n.pocket}]`:n.tool,i=n.toolSerialAtEndOfCycle??n.toolSerialAtStartOfCycle;i&&i!==``&&(r+=` (${i})`),t.push({name:r,value:e})}}return t}var Aie=[V.AddToQueue,V.RemoveFromQueue,V.LoadUnloadCycle,V.BasketLoadUnload,V.MachineCycle],jie=G(Zw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$highlightProc:e,$invalidCycle:t})=>({...e&&{backgroundColor:`#eeeeee`},...t&&{textDecoration:`line-through`}})),Mie=(0,L.memo)(function(e){let t=kie(e.entry),n=e.highlightProcsGreaterOrEqualTo,r=R(br);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(jie,{$highlightProc:n!==void 0&&e.entry.material.findIndex(e=>e.proc>=n)>=0&&Aie.indexOf(e.entry.type)>=0,$invalidCycle:vI(e.entry),children:[(0,H.jsx)(Z,{size:`small`,children:e.entry.endUTC.toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`2-digit`})}),(0,H.jsx)(Z,{size:`small`,children:e.entry.endUTC.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})}),(0,H.jsx)(Z,{size:`small`,children:Die(e.entry,r)}),(0,H.jsx)(Z,{size:`small`,children:Oie(e,r)}),(0,H.jsx)(Z,{padding:`checkbox`,children:t.length>0?(0,H.jsx)(th,{style:{transition:`all ease 200ms`,transform:e.entry.counter===e.detailLogCounter?`rotate(90deg)`:`none`},onClick:t=>{e.setDetail(e.entry.counter===e.detailLogCounter?null:e.entry.counter),t.stopPropagation()},size:`small`,children:(0,H.jsx)(_re,{fontSize:`inherit`})}):void 0})]}),t.length>0&&e.entry.counter===e.detailLogCounter?(0,H.jsx)(Zw,{children:(0,H.jsx)(Z,{colSpan:5,children:(0,H.jsx)(`ul`,{children:t.map((e,t)=>(0,H.jsxs)(`li`,{children:[e.name,`: `,e.value]},t))})})}):void 0]})}),xI=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(null);return(0,H.jsxs)(Vw,{children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:`Date`}),(0,H.jsx)(Z,{children:`Time`}),(0,H.jsx)(Z,{children:`Type`}),(0,H.jsx)(Z,{children:`Details`}),(0,H.jsx)(Z,{padding:`checkbox`,children:e.copyToClipboard?(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{onClick:()=>oA(e.entries),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(bT,{})})}):void 0})]})}),(0,H.jsx)(Ww,{children:Array.from(Tie(e.entries)).map((r,i)=>(0,H.jsx)(Mie,{entry:r,detailLogCounter:t,setDetail:n,highlightProcsGreaterOrEqualTo:e.highlightProcsGreaterOrEqualTo},i))})]})}),SI=P(null),CI=P(e=>e(SI),(e,t,n)=>{n===null?(t(SI,null),t(MI,[])):t(SI,n)}),wI=P(async e=>{let t=e(SI);if(t&&t.type===`Barcode`){if(Ht===void 0)return null;let n=e(qI),r=t.toQueue?[t.toQueue]:n.route===$.Station_LoadMonitor||n.route===$.Station_Queues?n.queues:null;return await Ht.parseBarcode(t.barcode,r)}return null}),TI=P(async e=>(await e(wI))?.potentialNewMaterial??null),EI=P(async e=>{let t=e(SI);if(t===null)return null;switch(t.type){case`InProcMat`:return t.inproc;case`MatSummary`:return t.summary;case`MatDetails`:return t.details;case`LogMat`:return{materialID:t.logMat.id,partName:t.logMat.part,serial:t.logMat.serial,workorderId:t.logMat.workorder};case`Barcode`:{let t=await e(wI);return t?.existingMaterial&&t.existingMaterial.materialID>=0?t.existingMaterial:null}case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:return Wt===void 0?null:(await Wt.materialForSerial(t.serial))?.[0]??null}}),DI=FO(EI,e=>e??null);function OI(e){return FO(P(t=>t(e).then(e=>({state:`hasData`,data:e}),e=>({state:`hasError`,error:e}))),()=>({state:`loading`}))}var Nie=OI(EI),kI=P(async e=>{let t=e(zO),n=e(SI);if(n===null)return null;if(n.type===`InProcMat`)return t.material.find(e=>e.materialID===n.inproc.materialID)??null;let r=(await e(EI))?.materialID??null;return r!==null&&r>=0?t.material.find(e=>e.materialID===r)??null:null}),AI=P(async e=>{let t=e(SI);if(t===null)return null;switch(t.type){case`InProcMat`:return t.inproc.serial??null;case`MatSummary`:return t.summary.serial??null;case`MatDetails`:return t.details.serial??null;case`LogMat`:return t.logMat.serial??null;case`Barcode`:{let t=await e(wI);return t?.existingMaterial?.serial??t?.potentialNewMaterial?.serial??null}case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:return t.serial}});FO(AI,e=>e??null);var Pie=OI(AI),jI=P(async e=>{let t=e(SI);if(t===null)return null;switch(t.type){case`InProcMat`:return t.inproc.workorderId??null;case`MatSummary`:return t.summary.workorderId??null;case`MatDetails`:return t.details.workorder??null;case`LogMat`:return t.logMat.workorder??null;case`Barcode`:{let t=await e(wI);return t?.existingMaterial?.workorder??t?.potentialNewMaterial?.workorder??null}case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:return null}}),MI=P([]),NI=FO(P(async(e,{signal:t})=>{let n=await e(EI);return n===null||Wt===void 0?[]:n.materialID>=0?await Wt.logForMaterial(n.materialID,t):n.serial&&n.serial!==``?await Wt.logForSerial(n.serial):[]}),e=>e??[]),Fie=FO(P(async(e,{signal:t})=>{let n=await e(AI);if(n===null||n===``)return[];let r=[];for(let e of qt)r.push.apply(await e.logForSerial(n,t));return r}),e=>e??[]),Iie=P(e=>Q.of(e(NI)).concat(e(MI)).toRArray()),PI=P(e=>{let t=e(MI);return Q.of(e(NI)).concat(e(Fie)).sortBy(e=>e.endUTC.getTime(),e=>e.counter).concat(t).toRArray()}),FI=P(async e=>{let t=await e(EI);if(t===null)return null;let n=e(PI),r=Q.of(n).filter(e=>!vI(e)&&(e.type===V.LoadUnloadCycle||e.type===V.MachineCycle||e.type===V.AddToQueue)).flatMap(e=>e.material).filter(e=>e.id===t.materialID).maxBy(e=>e.proc);return r?{process:r.proc,totalNumProcesses:r.numproc}:null}),II=P(e=>{let t=e(SI),n=e(PI);if(t===null)return{signaledInspections:[],completedInspections:[]};let r=new Set(t.type===`InProcMat`?t.inproc.signaledInspections:[]),i=new Set;return n.forEach(e=>{switch(e.type){case V.Inspection:if(e.result.toLowerCase()===`true`||e.result===`1`){let t=(e.details||{}).InspectionType;t&&r.add(t)}break;case V.InspectionForce:(e.result.toLowerCase()===`true`||e.result===`1`)&&r.add(e.program);break;case V.InspectionResult:i.add(e.program)}}),{signaledInspections:Q.of(r).toSortedArray(e=>e),completedInspections:Q.of(i).toSortedArray(e=>e)}}),Lie=P(async e=>{let t=await e(EI);if(t===null||t.partName===``)return[];let n=e(zO)?.workorders??[];return Q.of(n).filter(e=>e.part===t.partName).toSortedArray(e=>e.dueDate.getTime(),e=>-e.priority)});function LI(){let[e,t]=(0,L.useState)(!1),n=z(MI);return[(0,L.useCallback)(e=>{t(!0),Wt.setInspectionDecision(e.mat.materialID,e.inspType,1,e.inspect).then(e=>n(t=>[...t,e])).catch(console.log).finally(()=>t(!1))},[n]),e]}function Rie(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),Wt.recordInspectionCompleted(new Nt({materialID:e.mat.materialID,process:1,inspectionLocationNum:1,inspectionType:e.inspType,success:e.success,active:`PT0S`,elapsed:`PT0S`,extraData:e.operator?{operator:e.operator}:void 0})).catch(console.log).finally(()=>t(!1))},[]),e]}function RI(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),Wt.recordCloseoutCompleted(new Pt({materialID:e.mat.materialID,process:1,locationNum:1,closeoutType:``,active:`PT0S`,elapsed:`PT0S`,extraData:e.operator?{operator:e.operator}:void 0,failed:e.failed})).catch(console.log).finally(()=>t(!1))},[]),e]}function zI(){let[e,t]=(0,L.useState)(!1),n=z(MI);return[(0,L.useCallback)((e,r)=>{t(!0),Wt.setWorkorder(e.materialID,1,r).then(e=>n(t=>[...t,e])).catch(console.log).finally(()=>t(!1))},[n]),e]}function zie(){let[e,t]=(0,L.useState)(!1),n=z(MI);return[(0,L.useCallback)(e=>{t(!0),Wt.recordOperatorNotes(e.matId,e.process,e.operator,e.notes).then(e=>n(t=>[...t,e])).catch(console.log).finally(()=>t(!1))},[n]),e]}function BI(){let[e,t]=(0,L.useState)(!1),[n,r]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),Ht.printLabel(e.materialId,e.proc).catch(console.log).finally(()=>{t(!1),r(!0)})},[]),e,n]}function Bie(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(async(e,n)=>{t(!0);try{await Ut.removeMaterialFromAllQueues(e,n??void 0)}finally{t(!1)}},[]),e]}function Vie(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(async(e,n,r)=>{t(!0);try{await Ut.signalMaterialForQuarantine(e,n,r===``?void 0:r)}finally{t(!1)}},[]),e]}function Hie(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(async(e,n,r)=>{t(!0);try{await Ut.quarantineQueuedMaterial(e,n,r===``?void 0:r)}finally{t(!1)}},[]),e]}function VI(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(async e=>{t(!0);try{await Ut.setMaterialInQueue(e.materialId,e.operator,new At({queue:e.queue,position:e.queuePosition}))}finally{t(!1)}},[]),e]}function Uie(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(async e=>{t(!0);try{let t=await Ut.addUnprocessedMaterialToQueue(e.jobUnique,e.lastCompletedProcess,e.queue,e.queuePosition,e.operator,e.workorder,e.serial||``);if(t===void 0)throw Error(`No material returned`);return e.onNewMaterial?.(t),t}catch(t){throw e.onError?.(t),t}finally{t(!1)}},[]),e]}function HI(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(async e=>{t(!0);try{let t=await Ut.addUnallocatedCastingToQueue(e.casting,e.queue,e.quantity,e.operator,e.workorder,[...e.serials||[]]);return e.onNewMaterial?.(t),t}catch(t){throw e.onError?.(t),t}finally{t(!1)}},[]),e]}var $=function(e){return e.ChooseMode=`/`,e.Station_LoadMonitor=`/station/loadunload/:num`,e.Station_InspectionMonitor=`/station/inspection`,e.Station_InspectionMonitorWithType=`/station/inspection/:type`,e.Station_Closeout=`/station/closeout`,e.Station_Queues=`/station/queues`,e.Station_Overview=`/station/overview`,e.Operations_Dashboard=`/operations`,e.Operations_LoadOutliers=`/operations/load-outliers`,e.Operations_LoadHours=`/operations/load-hours`,e.Operations_LoadCycles=`/operations/load-cycles`,e.Operations_MachineOutliers=`/operations/machine-outliers`,e.Operations_MachineHours=`/operations/machine-hours`,e.Operations_MachineCycles=`/operations/machine-cycles`,e.Operations_SystemOverview=`/operations/system-overview`,e.Operations_AllMaterial=`/operations/material`,e.Operations_RecentSchedules=`/operations/recent-schedules`,e.Operations_CurrentWorkorders=`/operations/current-workorders`,e.Operations_Production=`/operations/recent-production`,e.Operations_Tools=`/operations/tools`,e.Operations_Programs=`/operations/programs`,e.Operations_Quality=`/operations/quality`,e.Operations_Inspections=`/operations/inspections`,e.Operations_CloseoutReport=`/operations/closeout`,e.Operations_Rebookings=`/analysis/rebookings`,e.Operations_Parts=`/operations/parts`,e.Engineering_Cycles=`/engineering`,e.Engineering_Hours=`/engineering/hours`,e.Engineering_Outliers=`/engineering/outliers`,e.Quality_Dashboard=`/quality`,e.Quality_Paths=`/quality/paths`,e.Quality_Quarantine=`/quality/quarantine`,e.Tools_Dashboard=`/tools`,e.Tools_Programs=`/tools/programs`,e.Analysis_Buffers=`/analysis/buffers`,e.Analysis_StationOEE=`/analysis/station-oee`,e.Analysis_PartsCompleted=`/analysis/parts-completed`,e.Analysis_MachineCycles=`/analysis/machine-cycles`,e.Analysis_LoadCycles=`/analysis/load-cycles`,e.Analysis_PalletCycles=`/analysis/pallet-cycles`,e.Analysis_BasketCycles=`/analysis/basket-cycles`,e.Analysis_Schedules=`/analysis/schedules`,e.Analysis_Quality=`/analysis/quality`,e.Analysis_ToolReplacements=`/analysis/tool-replacements`,e.Analysis_CostPercents=`/analysis/cost-percents`,e.Analysis_CostPerPiece=`/analysis/cost`,e.Sales_Dashboard=`/sales`,e.Sales_ProjectedUsage=`/sales/projected-usage`,e.VerboseLogging=`/logging`,e.Client_Custom=`/client/:custom+`,e}({}),Wie=Q.ofObject($).map(([,e])=>[e,new URLPattern(e,location.origin)]).append([`/operations/recent-schedules`,new URLPattern(`/operations/completed`,location.origin)]).append([`/station/closeout`,new URLPattern(`/station/wash`,location.origin)]).toRArray();function UI(e){switch(e.route){case`/station/loadunload/:num`:if(e.queues.length>0||e.completed){let t=new URLSearchParams;for(let n of e.queues)t.append(`queue`,n);return e.completed&&t.append(`completed`,`t`),`/station/loadunload/${e.loadNum}?${t.toString()}`}return`/station/loadunload/${e.loadNum}`;case`/station/inspection/:type`:return`/station/inspection/${encodeURIComponent(e.inspType)}`;case`/station/queues`:if(e.queues.length>0){let t=new URLSearchParams;for(let n of e.queues)t.append(`queue`,n);return`/station/queues?${t.toString()}`}return`/station/queues`;case`/operations/current-workorders`:if(e.workorder){let t=new URLSearchParams;return t.append(`workorder`,e.workorder),`/operations/current-workorders?${t.toString()}`}return`/operations/current-workorders`;case`/client/:custom+`:return`/client/`+e.custom.map(e=>encodeURIComponent(e)).join(`/`);default:return e.route}}function WI(e){for(let[t,n]of Wie){let r=n.exec(e.origin+e.pathname)?.pathname?.groups;if(r)switch(t){case`/station/loadunload/:num`:return{route:t,loadNum:parseInt(r.num??`1`),queues:e.searchParams.getAll(`queue`),completed:e.searchParams.has(`completed`)};case`/station/inspection/:type`:{let e=r.type;return e?{route:`/station/inspection/:type`,inspType:e}:{route:`/station/inspection`}}case`/station/queues`:return{route:`/station/queues`,queues:e.searchParams.getAll(`queue`)};case`/operations/current-workorders`:return{route:`/operations/current-workorders`,workorder:e.searchParams.get(`workorder`)??void 0};case`/client/:custom+`:return{route:`/client/:custom+`,custom:r?.custom?.split(`/`)?.map(e=>decodeURIComponent(e))??[]};default:return{route:t}}}return{route:`/`}}var GI=P(WI(new URL(location.href))),KI=P(!1),qI=P(e=>e(GI),(e,t,n)=>{let r=e(KI);t(GI,n),t(CI,null),r||history.pushState(null,``,UI(n))});function Gie({to:e,children:t}){let n=z(qI);return(0,L.createElement)(Ib,{href:UI(e),onClick:t=>{t.preventDefault(),t.stopPropagation(),n(e)}},t)}function Kie(){let e=R(KI),t=z(GI);(0,L.useEffect)(()=>{if(e)return;function n(){t(WI(new URL(location.href)))}return addEventListener(`popstate`,n),()=>removeEventListener(`popstate`,n)},[e,t])}function JI(){return R(KI)}function YI(e){(0,L.useEffect)(()=>{document.title=e+` - FMS Insight`},[e])}function qie(e){switch(e.route){case`/station/loadunload/:num`:case`/station/inspection`:case`/station/inspection/:type`:case`/station/closeout`:case`/station/queues`:case`/station/overview`:return`https://www.seedtactics.com/docs/fms-insight/client-station-monitor`;case`/operations`:case`/operations/load-outliers`:case`/operations/load-hours`:case`/operations/load-cycles`:case`/operations/system-overview`:case`/operations/material`:case`/operations/recent-schedules`:case`/operations/current-workorders`:case`/operations/closeout`:case`/operations/recent-production`:case`/analysis/rebookings`:case`/operations/parts`:return`https://www.seedtactics.com/docs/fms-insight/client-operations`;case`/operations/machine-outliers`:case`/operations/machine-hours`:case`/operations/machine-cycles`:return`https://www.seedtactics.com/docs/fms-insight/client-engineering`;case`/operations/quality`:case`/operations/inspections`:return`https://www.seedtactics.com/docs/fms-insight/client-quality`;case`/operations/tools`:case`/operations/programs`:return`https://www.seedtactics.com/docs/fms-insight/client-tools-programs`;case`/engineering`:case`/engineering/outliers`:case`/engineering/hours`:return`https://www.seedtactics.com/docs/fms-insight/client-engineering`;case`/quality`:case`/quality/paths`:case`/quality/quarantine`:return`https://www.seedtactics.com/docs/fms-insight/client-quality`;case`/tools`:case`/tools/programs`:return`https://www.seedtactics.com/docs/fms-insight/client-tools-programs`;case`/analysis/schedules`:case`/analysis/buffers`:case`/analysis/station-oee`:case`/analysis/parts-completed`:case`/analysis/machine-cycles`:case`/analysis/load-cycles`:case`/analysis/pallet-cycles`:case`/analysis/quality`:case`/analysis/cost-percents`:case`/analysis/tool-replacements`:case`/analysis/cost`:return`https://www.seedtactics.com/docs/fms-insight/client-efficiency`;case`/sales`:case`/sales/projected-usage`:return`https://www.seedtactics.com/docs/fms-insight/client-sales`;default:return`https://www.seedtactics.com/docs/fms-insight/client-launch`}}var XI=new Intl.NumberFormat(void 0,{style:`percent`,minimumFractionDigits:1});function Jie(){let e=new Date;return t=>{if(!t.simulatedProduction)return 0;let n=0;for(let r of t.simulatedProduction){if(r.timeUTC>e)break;n=r.quantity}return n}}var ZI=(0,L.memo)(function(){let e=R(zO),t=Q.ofObject(e.jobs).sumBy(([,e])=>Q.of(e.completed??[]).sumBy(e=>Q.of(e).sumBy(e=>e))),n=Q.ofObject(e.jobs).flatMap(([,e])=>e.procsAndPaths).flatMap(e=>e.paths).sumBy(Jie()),r=Q.ofObject(e.jobs).sumBy(([,e])=>(e.cycles??0)*e.procsAndPaths.length);return(0,H.jsx)(J,{sx:{maxWidth:`60em`,ml:`auto`,mr:`auto`,pt:`1em`},children:(0,H.jsxs)(J,{sx:{display:`grid`,gridTemplateColumns:`auto 1fr auto`,gridColumnGap:`0.5em`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{gridRow:1,gridColumn:1},children:(0,H.jsxs)(q,{variant:`body2`,children:[`Completed Parts: `,t,`/`,r]})}),(0,H.jsx)(J,{sx:{gridRow:1,gridColumn:2},children:(0,H.jsx)(kb,{variant:`determinate`,value:t/r*100,color:`secondary`})}),(0,H.jsx)(J,{sx:{gridRow:1,gridColumn:3},children:(0,H.jsx)(q,{variant:`body2`,children:XI.format(t/r)})}),(0,H.jsx)(J,{sx:{gridRow:2,gridColumn:1},children:(0,H.jsxs)(q,{variant:`body2`,children:[`Simulated Parts: `,n,`/`,r]})}),(0,H.jsx)(J,{sx:{gridRow:2,gridColumn:2},children:(0,H.jsx)(kb,{variant:`determinate`,value:n/r*100,color:`secondary`})}),(0,H.jsx)(J,{sx:{gridRow:2,gridColumn:3},children:(0,H.jsx)(q,{variant:`body2`,children:XI.format(n/r)})})]})})});function Yie(){let{ref:e,width:t,height:n}=TA({refreshMode:`debounce`,refreshRate:100});return(0,H.jsxs)(`main`,{style:{height:`calc(100vh - 64px)`,display:`flex`,flexDirection:`column`},children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(ZI,{})}),(0,H.jsx)(`div`,{ref:e,style:{flexGrow:1,overflow:`hidden`,margin:`8px`},children:t&&n&&(0,H.jsx)(SF,{width:t,height:n})})]})}function Xie(){let{ref:e,width:t}=TA({refreshMode:`debounce`,refreshRate:100,handleHeight:!1});return(0,H.jsxs)(`main`,{style:{padding:`8px`},children:[(0,H.jsx)(ZI,{}),(0,H.jsx)(`div`,{ref:e,style:{overflow:`hidden`},children:t&&(0,H.jsx)(SF,{width:t,height:500})})]})}function Zie(){return YI(`Dashboard`),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(J,{sx:{display:{xs:`none`,md:`block`}},children:(0,H.jsx)(Yie,{})}),(0,H.jsx)(J,{sx:{display:{xs:`block`,md:`none`}},children:(0,H.jsx)(Xie,{})})]})}var QI=P([]),$I=QI,eL=P([]),Qie=eL;function*tL(e){for(let t of e)for(let e=0;e<t.procsAndPaths.length;e++){let n=t.procsAndPaths[e];for(let r=0;r<n.paths.length;r++){let i=n.paths[r],a=0;for(let e of i.stops)a+=WO(e.expectedCycleTime);let o=0;for(let n of i.simulatedProduction||[])yield{partName:t.partName,process:e+1,finalProcess:e===t.procsAndPaths.length-1,completeTime:n.timeUTC,quantity:n.quantity-o,expectedMachineMins:a},o=n.quantity}}}var $ie=P(null,(e,t,n)=>{t(QI,e=>[...e,...tL(Object.values(n.jobs))])}),eae=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs){let e=n.newJobs.jobs;t(QI,t=>{if(i){let n=QT(r,-30),i=Q.of(t).minBy(e=>e.completeTime.getTime());if((i===void 0||i.completeTime>=n)&&e.length===0)return t;t=t.filter(e=>e.completeTime>=n)}return[...t,...tL(e)]})}}),tae=P(null,(e,t,n)=>{t(eL,Array.from(tL(Object.values(n.jobs))))}),nL=P(_O.empty()),nae=nL,rL=P(_O.empty()),rae=rL;function iL(e){if(e.elapsed===``)return null;let t=UO(e.elapsed);if(t<=0)return null;switch(e.type){case V.RemoveFromQueue:return[e.counter,{buffer:{type:`Queue`,queue:e.loc},endTime:e.endUTC,elapsedSeconds:t,numMaterial:e.material.length}];case V.PalletInStocker:return!e.startofcycle&&e.result===`WaitForMachine`?[e.counter,{buffer:{type:`StockerWaitForMC`,stockerNum:e.locnum},endTime:e.endUTC,elapsedSeconds:t,numMaterial:e.material.length}]:e.startofcycle?null:[e.counter,{buffer:{type:`StockerWaitForUnload`,stockerNum:e.locnum},endTime:e.endUTC,elapsedSeconds:t,numMaterial:e.material.length}];case V.PalletOnRotaryInbound:return e.startofcycle?null:[e.counter,{buffer:{type:`Rotary`,machineGroup:e.loc,machineNum:e.locnum},endTime:e.endUTC,elapsedSeconds:t,numMaterial:e.material.length}];default:return null}}var iae=P(null,(e,t,n)=>{t(nL,e=>e.union(Q.of(n).collect(iL).toHashMap(e=>e)))}),aae=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(!n.logEntry)return;let a=iL(n.logEntry);a&&t(nL,e=>{if(i){let t=QT(r,-30);e=e.filter(e=>e.endTime>=t)}return e.set(a[0],a[1])})}),oae=P(null,(e,t,n)=>{t(rL,Q.of(n).collect(iL).toHashMap(e=>e))}),sae=P(null),aL=P(null,(e,t,n)=>{t(sae,n)}),oL=function(e){return e[e.Triggered=0]=`Triggered`,e[e.Forced=1]=`Forced`,e[e.Completed=2]=`Completed`,e}({}),sL=class{constructor(e,t){this.part=e,this.inspType=t}compare(e){let t=this.part.localeCompare(e.part);return t===0?this.inspType.localeCompare(e.inspType):t}hash(){return MD(this.part,this.inspType)}toString(){return`{part: ${this.part}}, inspType: ${this.inspType}}`}},cL=P(_O.empty()),lL=cL,uL=P(_O.empty()),dL=uL;function fL(e){return e.type!==V.Inspection&&e.type!==V.InspectionForce&&e.type!==V.InspectionResult?[]:e.material.map(t=>{if(e.type===V.Inspection){let n=JSON.parse((e.details||{}).ActualPath||`[]`),r=Array.isArray(n)?n:[],i=[];for(let e of r)i.push(Me.fromJS(e));let a=(e.details||{}).InspectionType||``,o;return o=e.result.toLowerCase()===`true`||e.result===`1`,{key:new sL(t.part,a),entry:{cntr:e.counter,time:e.endUTC,materialID:t.id,serial:t.serial,workorder:t.workorder,result:{type:0,actualPath:i,toInspect:o},part:t.part,inspType:a}}}if(e.type===V.InspectionForce){let n;return n=e.result.toLowerCase()===`true`||e.result===`1`,{key:new sL(t.part,e.program),entry:{cntr:e.counter,time:e.endUTC,materialID:t.id,serial:t.serial,workorder:t.workorder,result:{type:1,toInspect:n},part:t.part,inspType:e.program}}}{let n;return n=e.result.toLowerCase()===`true`||e.result===`1`,{key:new sL(t.part,e.program),entry:{cntr:e.counter,time:e.endUTC,materialID:t.id,serial:t.serial,workorder:t.workorder,result:{type:2,success:n},part:t.part,inspType:e.program}}}})}var pL=P(null,(e,t,n)=>{t(cL,e=>e.union(Q.of(n).flatMap(fL).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry),(e,t)=>e.union(t)))}),mL=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry){let e=fL(n.logEntry);if(e.length===0)return;t(cL,t=>{if(i){let e=QT(r,-30);t=t.collectValues(t=>{let n=t.filter(t=>t.time>=e);return n.size===0?null:n})}return t.union(Q.of(e).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry),(e,t)=>e.union(t))})}}),hL=P(null,(e,t,n)=>{t(uL,Q.of(n).flatMap(fL).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry))}),gL=P({matsById:_O.empty(),matIdsForJob:_O.empty()}),_L=gL,vL=P({matsById:_O.empty(),matIdsForJob:_O.empty()}),yL=vL;function bL(e){return{materialID:e.materialID,jobUnique:e.jobUnique,partName:e.partName,startedProcess1:e.process>0,serial:e.serial,workorderId:e.workorderId,signaledInspections:e.signaledInspections,quarantineAfterUnload:e.quarantineAfterUnload}}function xL(e,t){let n=e.matsById,r=e.matIdsForJob;if(t.startofcycle||t.material.length===0)return e;for(let e of t.material){if(e.uniq&&e.uniq!==``){let t=r.get(e.uniq);t===void 0?r=r.set(e.uniq,cO.empty().add(e.id)):t.has(e.id)||(r=r.set(e.uniq,t.add(e.id)))}let i=n.get(e.id),a;switch(a=i===void 0?{materialID:e.id,jobUnique:e.uniq,partName:e.part,last_event:t.endUTC,startedProcess1:!1,numProcesses:e.numproc,unloaded_processes:{},signaledInspections:[],quarantineAfterUnload:null,completedInspections:{}}:{...i,last_event:t.endUTC},t.type){case V.PartMark:a={...a,serial:t.result};break;case V.OrderAssignment:a={...a,workorderId:t.result};break;case V.Inspection:if(t.result.toLowerCase()===`true`||t.result===`1`){let e=(t.details||{}).InspectionType;e&&(a={...a,signaledInspections:[...a.signaledInspections,e]})}break;case V.InspectionForce:if(t.result.toLowerCase()===`true`||t.result===`1`){let e=t.program;a={...a,signaledInspections:[...a.signaledInspections,e]}}break;case V.InspectionResult:{let e=t.result.toLowerCase()==`true`||t.result===`1`;a={...a,completedInspections:{...a.completedInspections,[t.program]:{time:t.endUTC,success:e}},completed_inspect_time:t.endUTC};break}case V.LoadUnloadCycle:t.result===`UNLOAD`?(a={...a,unloaded_processes:{...a.unloaded_processes,[e.proc]:t.endUTC},quarantineAfterUnload:!1,currently_quarantined:!1},a=e.proc===e.numproc?{...a,last_unload_time:t.endUTC,completed_last_proc_machining:!0}:{...a,last_unload_time:t.endUTC}):t.result===`LOAD`&&(a={...a,startedProcess1:!0,quarantineAfterUnload:!1,currently_quarantined:!1});break;case V.MachineCycle:a.currently_quarantined&&(a={...a,currently_quarantined:!1});break;case V.AddToQueue:t.program===`Quarantine`&&(a={...a,currently_quarantined:!0});break;case V.CloseOut:a={...a,closeout_completed:t.endUTC,closeout_failed:t.result===`Failed`};break;case V.SignalQuarantine:a={...a,quarantineAfterUnload:!0}}n=n.set(e.id,a)}return{matsById:n,matIdsForJob:r}}function SL(e,{matIdsForJob:t,matsById:n}){let r=n.valuesToLazySeq().filter(t=>t.last_event<e).toRSet(e=>e.materialID);return r.size>0&&(t=t.collectValues(e=>{let t=Q.of(r).fold(e,(e,t)=>e.delete(t));return t.size>0?t:null})),n=n.filter(t=>t.last_event>=e),{matIdsForJob:t,matsById:n}}var CL=P(null,(e,t,n)=>{t(gL,e=>n.reduce(xL,e))}),wL=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry){let e=n.logEntry;t(gL,t=>{let n=xL(t,e);return n===t||!i?t:SL(QT(r,-30),n)})}}),TL=P(null,(e,t,n)=>{t(vL,n.reduce(xL,{matsById:_O.empty(),matIdsForJob:_O.empty()}))}),EL=P(new Set),DL=EL,OL=P(new Set),kL=OL,AL=P(new Set),jL=AL,ML=P(new Set),NL=ML,PL=P(null,(e,t,{evt:n})=>{n.newJobs?RL(t,n.newJobs.jobs):n.logEntry?BL(t,[n.logEntry]):n.newCurrentStatus&&zL(e,t,n.newCurrentStatus)}),FL=P(null,(e,t,n)=>{RL(t,Object.values(n.jobs))}),IL=P(null,(e,t,n)=>BL(t,n)),LL=P(null,zL);function RL(e,t){e(AL,e=>{let n=new Set;for(let r of t)for(let t of r.procsAndPaths[0].paths)t.casting&&t.casting!==``&&!e.has(t.casting)&&n.add(t.casting);return n.size===0?e:new Set([...e,...n])})}function zL(e,t,n){RL(t,Object.values(n.jobs));let r=e(EL),i=e(OL),a=new Set,o=new Set;for(let[e,t]of Q.ofObject(n.queues))t.role===ct.RawMaterial?r.has(e)||a.add(e):t.role===ct.InProcessTransfer&&(i.has(e)||o.add(e));a.size>0&&t(EL,new Set([...r,...a])),o.size>0&&t(OL,new Set([...i,...o]))}function BL(e,t){e(ML,e=>{let n=new Set;for(let r of t)switch(r.type){case V.Inspection:{let t=(r.details||{}).InspectionType;t&&!e.has(t)&&n.add(t)}break;case V.InspectionForce:case V.InspectionResult:{let t=r.program;e.has(t)||n.add(t)}}return n.size===0?e:new Set([...e,...n])})}var VL=P(_O.empty()),HL=VL;function UL(e,t,n){if(e.tooluse===void 0||e.tooluse.length===0||e.type!==V.MachineCycle)return n;let r=e.material.length>0?t.get(GO.ofLogCycle(e)):void 0,i=WO(e.elapsed);if(r===void 0||XO(r,i))return n;let a=GO.ofLogCycle(e),o=Q.of(e.tooluse).groupBy(e=>e.tool).map(([e,t])=>({toolName:e,cycleUsageMinutes:Q.of(t).sumBy(e=>e.toolUseDuringCycle&&e.toolUseDuringCycle!==``?WO(e.toolUseDuringCycle):0),cycleUsageCnt:Q.of(t).sumBy(e=>e.toolUseCountDuringCycle??0),toolChangedDuringMiddleOfCycle:Q.of(t).some(e=>e.toolChangeOccurred??!1)})).toRArray();return o.length===0&&n.has(a)?n:n.modify(a,t=>{if(t){let n=t.recentCycles.slice(-4);return n.push({tools:o}),{machines:t.machines.add(sk(e.loc,e.locnum)),recentCycles:n}}return{machines:dO.empty().add(sk(e.loc,e.locnum)),recentCycles:[{tools:o}]}})}var WL=P(null,(e,t,n)=>{let r=e(qO);t(VL,e=>n.reduce((e,t)=>UL(t,r,e),e))}),GL=P(null,(e,t,{evt:n})=>{if(n.logEntry){let r=n.logEntry,i=e(qO);t(VL,e=>UL(r,i,e))}}),KL=P(_O.empty()),qL=KL,JL=P(_O.empty()),YL=JL;function XL(e){return{cntr:e.counter,x:e.endUTC,y:WO(e.elapsed),active:WO(e.active),mats:e.material}}var ZL=P(null,(e,t,n)=>{t(KL,e=>e.union(Q.of(n).filter(e=>!e.startofcycle&&e.type===V.PalletCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,XL),(e,t)=>e.union(t)))}),QL=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry&&!n.logEntry.startofcycle&&n.logEntry.type===V.PalletCycle&&n.logEntry.pal!==0){let e=n.logEntry;t(KL,t=>{if(i){let e=QT(r,-30);t=t.collectValues(t=>{let n=t.filter(t=>t.x>=e);return n.size>0?n:null})}return t.modify(e.pal,t=>(t??_O.empty()).set(e.counter,XL(e)))})}}),$L=P(null,(e,t,n)=>{t(JL,Q.of(n).filter(e=>!e.startofcycle&&e.type===V.PalletCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,XL))}),eR=P(_O.empty()),tR=eR,nR=P(e=>e(eR).size>0),rR=P(_O.empty()),iR=rR,aR=P(e=>e(rR).size>0);function oR(e){return{cntr:e.counter,x:e.endUTC,y:WO(e.elapsed),active:WO(e.active),mats:e.material}}var sR=P(null,(e,t,n)=>{t(eR,e=>e.union(Q.of(n).filter(e=>!e.startofcycle&&e.type===V.BasketCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,oR),(e,t)=>e.union(t)))}),cR=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry&&!n.logEntry.startofcycle&&n.logEntry.type===V.BasketCycle&&n.logEntry.pal!==0){let e=n.logEntry;t(eR,t=>{if(i){let e=QT(r,-30);t=t.collectValues(t=>{let n=t.filter(t=>t.x>=e);return n.size>0?n:null})}return t.modify(e.pal,t=>(t??_O.empty()).set(e.counter,oR(e)))})}}),lR=P(null,(e,t,n)=>{t(rR,Q.of(n).filter(e=>!e.startofcycle&&e.type===V.BasketCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,oR))}),uR=class e{constructor(e,t){this.group=e,this.num=t}static ofLogCycle(t){return new e(t.loc,t.locnum)}hash(){return MD(this.group,this.num)}compare(e){return this.group===e.group?this.num-e.num:this.group.localeCompare(e.group)}toString(){return this.group+` #`+this.num.toString()}},dR={replacements:pO.empty(),recentUse:_O.empty()},fR=P(dR),pR=P(e=>e(fR).replacements),mR=P(dR),hR=P(e=>e(mR).replacements);function gR(e,t){let n=uR.ofLogCycle(t);return{replacements:e.replacements.alter(n,r=>{let i=[];for(let r of t.tooluse??[]){let t=r.toolUseDuringCycle!==null&&r.toolUseDuringCycle!==void 0?WO(r.toolUseDuringCycle):null,a=r.totalToolUseAtEndOfCycle!==null&&r.totalToolUseAtEndOfCycle!==void 0?WO(r.totalToolUseAtEndOfCycle):null,o=r.toolUseCountDuringCycle??null,s=r.totalToolUseCountAtEndOfCycle??null;if((t||o)&&t===a&&o===s){let t=e.recentUse.get(n)?.find(e=>e.tool===r.tool&&e.pocket===r.pocket);if(t){let e=t.totalToolUseAtEndOfCycle?WO(t.totalToolUseAtEndOfCycle):null;(e||t.totalToolUseCountAtEndOfCycle)&&i.push({tool:r.tool,pocket:r.pocket,type:`ReplaceBeforeCycleStart`,useAtReplacement:e,cntAtReplacement:t.totalToolUseCountAtEndOfCycle??null})}}else if(r.toolChangeOccurred&&(t&&r.configuredToolLife||o&&r.configuredToolLifeCount)){let e=r.configuredToolLife!==null&&r.configuredToolLife!==void 0?WO(r.configuredToolLife):null,n=r.configuredToolLifeCount??null;i.push({tool:r.tool,pocket:r.pocket,type:`ReplaceInCycle`,totalUseAtBeginningOfCycle:e!==null&&t!==null?e-t+(a??0):null,totalUseAtEndOfCycle:a,totalCntAtBeginningOfCycle:n!==null&&o!==null?n-o+(s??0):null,totalCntAtEndOfCycle:s})}}return i.length>0?(r??pO.empty()).set(t.counter,{time:t.endUTC,replacements:i}):r}),recentUse:t.tooluse?e.recentUse.set(n,t.tooluse):e.recentUse}}var _R=P(null,(e,t,n)=>{t(fR,e=>Q.of(n).filter(e=>e.type===V.MachineCycle&&!e.startofcycle&&!!e.tooluse&&e.tooluse.length>0).fold(e,gR))}),vR=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry&&!n.logEntry.startofcycle&&n.logEntry.type===V.MachineCycle&&n.logEntry.tooluse&&n.logEntry.tooluse.length>0){let e=n.logEntry;t(fR,t=>{if(i){let e=QT(r,-30);t={replacements:t.replacements.collectValues(t=>{let n=t.filter(t=>t.time>=e);return n.size>0?n:null}),recentUse:t.recentUse}}return gR(t,e)})}}),yR=P(null,(e,t,n)=>{t(mR,Q.of(n).filter(e=>e.type===V.MachineCycle&&!e.startofcycle&&!!e.tooluse&&e.tooluse.length>0).fold(dR,gR))}),bR=P(null),xR=bR;function SR(e,t,n,r){let i=e(xR);(i===null||i.simId<n)&&t(bR,{simId:n,usage:r})}var CR=P(null,(e,t,n)=>{n.mostRecentSimulationId&&n.mostRecentSimDayUsage&&n.mostRecentSimDayUsage.length!==0&&SR(e,t,n.mostRecentSimulationId,n.mostRecentSimDayUsage)}),wR=P(null,(e,t,{evt:n})=>{n.newJobs&&n.newJobs.simDayUsage&&n.newJobs.simDayUsage.length>0&&SR(e,t,n.newJobs.scheduleId,n.newJobs.simDayUsage)}),TR=P(pO.empty()),ER=FO(P(async(e,{signal:t})=>Ut===void 0?pO.empty():DR(await Ut.unscheduledRebookings(t))),e=>e??pO.empty());function DR(e){return pO.build(e??[],e=>e.bookingId)}var OR=P(e=>{let t=e(TR),n=e(ER);return t.union(n,(e,t)=>e??t)}),kR=P(pO.empty()),AR=kR,jR=P(pO.empty()),MR=jR;function NR(e){let t=1;return e.details?.Quantity&&(t=parseInt(e.details.Quantity,10)),{bookingId:e.result,partName:e.program,quantity:t,timeUTC:e.endUTC,priority:e.locnum,notes:e.details?.Notes,workorder:e.details?.Workorder??e.material?.[0]?.workorder}}var PR=P(null,(e,t,n)=>{t(TR,e=>e.union(Q.of(n).filter(e=>e.type===V.Rebooking).toOrderedMap(e=>[e.result,NR(e)]))),t(kR,e=>e.union(Q.of(n).filter(e=>e.type===V.CancelRebooking).toOrderedMap(e=>[e.result,e.endUTC])))});function FR(e,t,n){e(jR,e=>(n&&(e=e.filter(e=>e.scheduledTime>=n)),e.union(t.flatMap(e=>(e.bookings??[]).map(t=>[t,{scheduledTime:e.routeStartUTC,jobUnique:e.unique}])).toOrderedMap(e=>e))))}var IR=P(null,(e,t,n)=>{FR(t,Q.ofObject(n.jobs).map(([,e])=>e))}),LR=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs)FR(t,Q.of(n.newJobs.jobs),i?QT(r,-30):void 0);else if(n.logEntry){let e=n.logEntry;e.type===V.Rebooking?t(TR,t=>t.set(e.result,NR(e))):e.type===V.CancelRebooking&&t(kR,t=>t.set(e.result,e.endUTC))}});function RR(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>(t(!0),Wt.cancelRebooking(e).then(()=>{}).catch(console.log).finally(()=>t(!1))),[]),e]}function zR(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>(t(!0),Wt.requestRebooking(e.part,e.qty&&!isNaN(e.qty)?e.qty:1,e.workorder,e.priority!==void 0&&e.priority!==null&&!isNaN(e.priority)?e.priority:void 0,e.notes).then(()=>{}).catch(console.log).finally(()=>t(!1))),[]),e]}var BR=P(null),VR=BR,HR=P(null,(e,t,n)=>{if(n.evt.newCurrentStatus&&t(aL,n.evt.newCurrentStatus.customState??null),t(eae,n),t(pA,n),t(DO,n),t(aae,n),t(qre,n),t(wL,n),t(mL,n),t(PL,n),t(GL,n),t(QL,n),t(cR,n),t(vR,n),t(Ck,n),t(LR,n),t(wR,n),n.evt.logEntry){let e=n.evt.logEntry.counter;t(BR,t=>t===null?t:Math.max(t,e))}}),UR=P(null,(e,t,n)=>{let r=TO(e(SO),n);t(fA,r),t($ie,r),t(EO,r),t(FL,r),t(CR,r),t(IR,r)}),WR=P(null,(e,t,n)=>{t(Qre,n),t(iae,n),t(pL,n),t(CL,n),t(IL,n),t(WL,n),t(ZL,n),t(sR,n),t(_R,n),t(Sk,n),t(PR,n);let r=Q.of(n).maxBy(e=>e.counter)?.counter??null;t(BR,e=>e===null?r:Math.max(e,r??-1))}),GR=P(null,(e,t,n)=>{t(Kre,n),t(aL,n.customState??null),t(LL,n)}),KR=P(null,(e,t,n)=>{t(mA,n),t(tae,n),t(OO,n)}),qR=P(null,(e,t,n)=>{t($re,n),t(oae,n),t(hL,n),t(TL,n),t($L,n),t(lR,n),t(yR,n),t(wk,n)}),JR=P(`Last30`),YR=P(yE(new Date)),XR=P(e=>e(YR),(e,t,n)=>{t(JR,`SpecificMonth`),t(YR,n),e(QR)!==n&&!e($R)&&rz(n,t)}),ZR=P(e=>e(JR)===`Last30`?{type:`Last30`}:{type:`SpecificMonth`,month:e(YR)}),QR=P(null),$R=P(!1),ez=$R,tz=P(null),nz=tz;function rz(e,t){t($R,!0),t(tz,null);let n=$T(e,1),r=Ut.history(e,n).then(e=>t(KR,e)),i=Wt.get(e,n).then(e=>t(qR,e));Promise.all([r,i]).then(()=>t(QR,e)).catch(e=>t(tz,e.message??`Error`)).finally(()=>t($R,!1))}function iz(){let e=z(JR);return()=>e(`Last30`)}function az(){return z(YR)}function oz(e){return eie(e)&&e.operation===`UNLOAD`}function sz(e){return Object.prototype.hasOwnProperty.call(e,`month`)}function cz(e,t,n,r){let i=sz(r)?r.month:r.thirtyDaysAgo,a=sz(r)?$T(r.month,1):QT(r.thirtyDaysAgo,31),o=0,s=new Map,c=0,l=new Map,u=e.filter(e=>e.endTime>=i&&e.endTime<=a&&!e.material.some(e=>t.has(e.part)));for(let e of u)if(oz(e)&&(o+=1),rk(e))c+=e.activeMinutes;else if(ik(e)){s.set(e.stationGroup,e.activeMinutes+(s.get(e.stationGroup)??0));let t=l.get(e.stationGroup);t?t.add(e.stationNumber):l.set(e.stationGroup,new Set([e.stationNumber]))}let d=Q.of(n).filter(([,e])=>{if(t.has(e.partName)||e.numProcesses===void 0)return!1;let n=e.unloaded_processes?.[e.numProcesses];return!!n&&n>=i&&n<=a}).toRMap(([,e])=>[e.partName,1],(e,t)=>e+t);return{parts:u.groupBy(e=>e.part).map(([e,t])=>({part:e,parts_completed:d.get(e)??0,machine:Q.of(t).filter(e=>ik(e)).buildOrderedMap(e=>e.stationGroup,(e,t)=>(e??0)+t.activeMinutes).mapValues((e,t)=>e/(s.get(t)??1)),labor:Q.of(t).filter(e=>rk(e)).sumBy(e=>e.activeMinutes/c),automation:o>0?t.reduce((e,t)=>oz(t)?e+1:e,0)/o:0})).toRArray(),machineQuantities:Q.of(l).toOrderedMap(([e,t])=>[e,t.size]),type:r}}function lz(e,t,n,r){let i=sz(e.type)?bE(e.type.month):30,a=n?n*i/365:0,o=e.machineQuantities.mapValues((e,n)=>(t[n]??0)*e*i/365);return{machineQuantities:e.machineQuantities,type:e.type,parts:e.parts.map(e=>({part:e.part,parts_completed:e.parts_completed,machine:e.machine.mapValues((t,n)=>e.parts_completed>0?t*(o.get(n)??0)/e.parts_completed:0),labor:e.parts_completed>0?e.labor*r/e.parts_completed:0,automation:e.parts_completed>0?e.automation*a/e.parts_completed:0}))}}function uz(e){let t=`<table>
|
|
260
|
+
<thead><tr>`;t+=`<th>Part</th>`,t+=`<th>Completed Quantity</th>`;for(let n of e.machineQuantities.keys())t+=`<th>`+n+` Cost %</th>`;t+=`<th>Labor Cost</th>`,t+=`<th>Automation Cost</th>`,t+=`</tr></thead>
|
|
261
|
+
<tbody>
|
|
262
|
+
`;let n=Q.of(e.parts).sortBy(e=>e.part),r=Intl.NumberFormat(void 0,{maximumFractionDigits:1});for(let i of n){t+=`<tr><td>`+i.part+`</td>`,t+=`<td>`+i.parts_completed.toString()+`</td>`;for(let n of e.machineQuantities.keys())t+=`<td>`+r.format(i.machine.get(n)??0)+`</td>`;t+=`<td>`+(i.parts_completed>0?r.format(i.labor):`0`)+`</td>`,t+=`<td>`+(i.parts_completed>0?r.format(i.automation):`0`)+`</td>`,t+=`</tr>
|
|
263
|
+
`}return t+=`</tbody>
|
|
264
|
+
</table>`,t}function dz(e){Hk(uz(e))}function fz(e){let t=`<table>
|
|
265
|
+
<thead><tr>`;t+=`<th>Part</th>`,t+=`<th>Completed Quantity</th>`;for(let n of e.machineQuantities.keys())t+=`<th>`+n+` Cost %</th>`;t+=`<th>Labor Cost %</th>`,t+=`<th>Automation Cost %</th>`,t+=`</tr></thead>
|
|
266
|
+
<tbody>
|
|
267
|
+
`;let n=Q.of(e.parts).sortBy(e=>e.part),r=new Intl.NumberFormat(void 0,{style:`percent`,minimumFractionDigits:1,maximumFractionDigits:1});for(let i of n){t+=`<tr><td>`+i.part+`</td>`,t+=`<td>`+i.parts_completed.toString()+`</td>`;for(let n of e.machineQuantities.keys())t+=`<td>`+r.format(i.machine.get(n)??0)+`</td>`;t+=`<td>`+r.format(i.labor)+`</td>`,t+=`<td>`+r.format(i.automation)+`</td>`,t+=`</tr>
|
|
268
|
+
`}return t+=`</tbody>
|
|
269
|
+
</table>`,t}function pz(e){Hk(fz(e))}function mz(e,t,n){return parseInt(e.substr(t,n),16)}function hz(e){return e|=0,e<0?`00`:e<16?`0`+e.toString(16):e<256?e.toString(16):`ff`}function gz(e,t,n){return n=n<0?n+6:n>6?n-6:n,hz(255*(n<1?e+(t-e)*n:n<3?t:n<4?e+(t-e)*(4-n):e))}function _z(e){if(/^#[0-9a-f]{3,8}$/i.test(e)){let t,n=e.length;if(n<6){let n=e[1],r=e[2],i=e[3],a=e[4]||``;t=`#`+n+n+r+r+i+i+a+a}return(n==7||n>8)&&(t=e),t}}function vz(e,t,n){let r;if(t==0){let e=hz(n*255);r=e+e+e}else{let i=n<=.5?n*(t+1):n+t-n*t,a=n*2-i;r=gz(a,i,e*6+2)+gz(a,i,e*6)+gz(a,i,e*6-2)}return`#`+r}function yz(e,t,n){let r=[.55,.5,.5,.46,.6,.55,.55][e*6+.5|0];return n=n<.5?n*r*2:r+(n-.5)*(1-r)*2,vz(e,t,n)}var bz=typeof window<`u`?window:typeof self<`u`?self:typeof global<`u`?global:{},xz={V:`jdenticon_config`,n:`config`},Sz={};function Cz(e,t){let n=typeof e==`object`&&e||Sz[xz.n]||bz[xz.V]||{},r=n.lightness||{},i=n.saturation||{},a=`color`in i?i.color:i,o=i.grayscale,s=n.backColor,c=n.padding;function l(e,t){let n=r[e];return n&&n.length>1||(n=t),function(e){return e=n[0]+e*(n[1]-n[0]),e<0?0:e>1?1:e}}function u(e){let t=n.hues,r;return t&&t.length>0&&(r=t[0|.999*e*t.length]),typeof r==`number`?(r/360%1+1)%1:e}return{W:u,o:typeof a==`number`?a:.5,D:typeof o==`number`?o:0,p:l(`color`,[.4,.8]),F:l(`grayscale`,[.3,.9]),G:_z(s),X:typeof e==`number`?e:typeof c==`number`?c:t}}var wz=class{constructor(e,t){this.x=e,this.y=t}},Tz=class{constructor(e,t,n,r){this.q=e,this.t=t,this.H=n,this.Y=r}I(e,t,n,r){let i=this.q+this.H,a=this.t+this.H,o=this.Y;return o===1?new wz(i-t-(r||0),this.t+e):o===2?new wz(i-e-(n||0),a-t-(r||0)):o===3?new wz(this.q+t,a-e-(n||0)):new wz(this.q+e,this.t+t)}},Ez=new Tz(0,0,0,0),Dz=class{constructor(e){this.J=e,this.u=Ez}g(e,t){let n=t?-2:2,r=[];for(let i=t?e.length-2:0;i<e.length&&i>=0;i+=n)r.push(this.u.I(e[i],e[i+1]));this.J.g(r)}h(e,t,n,r){let i=this.u.I(e,t,n,n);this.J.h(i,n,r)}i(e,t,n,r,i){this.g([e,t,e+n,t,e+n,t+r,e,t+r],i)}j(e,t,n,r,i,a){let o=[e+n,t,e+n,t+r,e,t+r,e,t];o.splice((i||0)%4*2,2),this.g(o,a)}K(e,t,n,r,i){this.g([e+n/2,t,e+n,t+r/2,e+n/2,t+r,e,t+r/2],i)}};function Oz(e,t,n,r){e%=14;let i,a,o,s,c,l;e?e==1?(o=0|n*.5,s=0|n*.8,t.j(n-o,0,o,s,2)):e==2?(o=0|n/3,t.i(o,o,n-o,n-o)):e==3?(c=n*.1,l=n<6?1:n<8?2:0|n*.25,c=c>1?0|c:c>.5?1:c,t.i(l,l,n-c-l,n-c-l)):e==4?(a=0|n*.15,o=0|n*.5,t.h(n-o-a,n-o-a,o)):e==5?(c=n*.1,l=c*4,l>3&&(l=0|l),t.i(0,0,n,n),t.g([l,l,n-c,l,l+(n-l-c)/2,n-c],!0)):e==6?t.g([0,0,n,0,n,n*.7,n*.4,n*.4,n*.7,n,0,n]):e==7?t.j(n/2,n/2,n/2,n/2,3):e==8?(t.i(0,0,n,n/2),t.i(0,n/2,n/2,n/2),t.j(n/2,n/2,n/2,n/2,1)):e==9?(c=n*.14,l=n<4?1:n<6?2:0|n*.35,c=n<8?c:0|c,t.i(0,0,n,n),t.i(l,l,n-l-c,n-l-c,!0)):e==10?(c=n*.12,l=c*3,t.i(0,0,n,n),t.h(l,l,n-c-l,!0)):e==11?t.j(n/2,n/2,n/2,n/2,3):e==12?(a=n*.25,t.i(0,0,n,n),t.K(a,a,n-a,n-a,!0)):!r&&(a=n*.4,o=n*1.2,t.h(a,a,o)):(i=n*.42,t.g([0,0,n,0,n,n-i*2,n-i,n,0,n]))}function kz(e,t,n){e%=4;let r;e?e==1?t.j(0,n/2,n,n/2,0):e==2?t.K(0,0,n,n):(r=n/6,t.h(r,r,n-2*r)):t.j(0,0,n,n,0)}function Az(e,t){return e=t.W(e),[yz(e,t.D,t.F(0)),yz(e,t.o,t.p(.5)),yz(e,t.D,t.F(1)),yz(e,t.o,t.p(1)),yz(e,t.o,t.p(0))]}function jz(e,t,n){let r=Cz(n,.08);r.G&&e.m(r.G);let i=e.k,a=.5+i*r.X|0;i-=a*2;let o=new Dz(e),s=0|i/4,c=0|a+i/2-s*2,l=0|a+i/2-s*2;function u(n,r,i,a,u){let p=mz(t,i,1),m=a?mz(t,a,1):0;e.L(d[f[n]]);for(let e=0;e<u.length;e++)o.u=new Tz(c+u[e][0]*s,l+u[e][1]*s,s,m++%4),r(p,o,s,e);e.M()}let d=Az(mz(t,-7)/268435455,r),f=[],p;function m(e){if(e.indexOf(p)>=0){for(let t=0;t<e.length;t++)if(f.indexOf(e[t])>=0)return!0}}for(let e=0;e<3;e++)p=mz(t,8+e,1)%d.length,(m([0,4])||m([2,3]))&&(p=1),f.push(p);u(0,kz,2,3,[[1,0],[2,0],[2,3],[1,3],[0,1],[3,1],[3,2],[0,2]]),u(1,kz,4,5,[[0,0],[3,0],[3,3],[0,3]]),u(2,Oz,1,null,[[1,1],[2,1],[2,2],[1,2]]),e.finish()}function Mz(e){var t=0,n=0,r=encodeURI(e)+`%80`,i=[],a,o=[],s=1732584193,c=4023233417,l=~s,u=~c,d=3285377520,f=[s,c,l,u,d],p=0,m=``;function h(e,t){return e<<t|e>>>32-t}for(;t<r.length;n++)i[n>>2]=i[n>>2]|(r[t]==`%`?parseInt(r.substring(t+1,t+=3),16):r.charCodeAt(t++))<<(3-(n&3))*8;for(a=((n+7>>6)+1)*16,i[a-1]=n*8-8;p<a;p+=16){for(t=0;t<80;t++)n=h(s,5)+d+(t<20?(c&l^~c&u)+1518500249:t<40?(c^l^u)+1859775393:t<60?(c&l^c&u^l&u)+2400959708:(c^l^u)+3395469782)+(o[t]=t<16?i[p+t]|0:h(o[t-3]^o[t-8]^o[t-14]^o[t-16],1)),d=u,u=l,l=h(c,30),c=s,s=n;f[0]=s=f[0]+s|0,f[1]=c=f[1]+c|0,f[2]=l=f[2]+l|0,f[3]=u=f[3]+u|0,f[4]=d=f[4]+d|0}for(t=0;t<40;t++)m+=(f[t>>3]>>>(7-(t&7))*4&15).toString(16);return m}function Nz(e){return/^[0-9a-f]{11,}$/i.test(e)&&e}function Pz(e){return Mz(e==null?``:``+e)}typeof document<`u`&&document.querySelectorAll.bind(document);function Fz(e){return(e*10+.5|0)/10}var Iz=class{constructor(){this.v=``}g(e){let t=``;for(let n=0;n<e.length;n++)t+=(n?`L`:`M`)+Fz(e[n].x)+` `+Fz(e[n].y);this.v+=t+`Z`}h(e,t,n){let r=+!n,i=Fz(t/2),a=Fz(t),o=`a`+i+`,`+i+` 0 1,`+r+` `;this.v+=`M`+Fz(e.x)+` `+Fz(e.y+t/2)+o+a+`,0`+o+-a+`,0`}},Lz=class{constructor(e){this.A,this.B={},this.O=e,this.k=e.k}m(e){let t=/^(#......)(..)?/.exec(e),n=t[2]?mz(t[2],0)/255:1;this.O.m(t[1],n)}L(e){this.A=this.B[e]||(this.B[e]=new Iz)}M(){}g(e){this.A.g(e)}h(e,t,n){this.A.h(e,t,n)}finish(){let e=this.B;for(let t in e)e.hasOwnProperty(t)&&this.O.P(t,e[t].v)}},Rz={R:`http://www.w3.org/2000/svg`,S:`width`,T:`height`},zz=class{constructor(e){this.k=e,this.C=`<svg xmlns="`+Rz.R+`" width="`+e+`" height="`+e+`" viewBox="0 0 `+e+` `+e+`">`}m(e,t){t&&(this.C+=`<rect width="100%" height="100%" fill="`+e+`" opacity="`+t.toFixed(2)+`"/>`)}P(e,t){this.C+=`<path fill="`+e+`" d="`+t+`"/>`}toString(){return this.C+`</svg>`}};function Bz(e,t,n){let r=new zz(t);return jz(new Lz(r),Nz(e)||Pz(e),n),r.toString()}function Vz(e){let t=new Date(e);if(!Number.isNaN(t.valueOf()))return t;let n=String(e).match(/\d+/g);if(n==null||n.length<=2)return t;{let[e,t,...r]=n.map(e=>parseInt(e)),i=[e,t-1,...r];return new Date(Date.UTC(...i))}}var Hz=(e,t,n)=>{let r=e===1?t:t+`s`;return e+` `+r+` `+n};function Uz(){return Uz=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uz.apply(null,arguments)}var Wz=60,Gz=3600,Kz=Gz*24,qz=Kz*7,Jz=Kz*30,Yz=Kz*365,Xz=()=>Date.now();function Zz({date:e,formatter:t,component:n=`time`,live:r=!0,minPeriod:i=0,maxPeriod:a=qz,title:o,now:s=Xz,...c}){let[l,u]=(0,L.useState)(s());(0,L.useEffect)(()=>{if(!r)return;let t=(()=>{let t=Vz(e).valueOf();if(!t)return console.warn(`[react-timeago] Invalid Date provided`),0;let n=Math.round(Math.abs(l-t)/1e3),r=Math.min(Math.max(n<Wz?1e3:n<Gz?1e3*Wz:n<Kz?1e3*Gz:1e3*qz,i*1e3),a*1e3);return r?setTimeout(()=>{u(s())},r):0})();return()=>{t&&clearTimeout(t)}},[e,r,a,i,s,l]),(0,L.useEffect)(()=>{u(s())},[e]);let d=n,f=Vz(e).valueOf();if(!f)return null;let p=Math.round(Math.abs(l-f)/1e3),m=f<l?`ago`:`from now`,[h,g]=p<Wz?[Math.round(p),`second`]:p<Gz?[Math.round(p/Wz),`minute`]:p<Kz?[Math.round(p/Gz),`hour`]:p<qz?[Math.round(p/Kz),`day`]:p<Jz?[Math.round(p/qz),`week`]:p<Yz?[Math.round(p/Jz),`month`]:[Math.round(p/Yz),`year`],_=o===void 0?typeof e==`string`?e:Vz(e).toISOString().substring(0,16).replace(`T`,` `):o,v=d===`time`?{...c,dateTime:Vz(e).toISOString()}:c,y=(e=e,t=t,n=n,r=f,i=Hz,a=a)=>Hz(e,t,n,r,i,a),b=t||Hz,x;try{x=b(h,g,m,f,y,s),x||=Hz(h,g,m,f,y,s)}catch(e){console.error(`[react-timeago] Formatter threw an error:`,e),x=Hz(h,g,m,f,y,s)}return L.createElement(d,Uz({},v,{title:_}),x)}function Qz(){var e=[...arguments];return(0,L.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var $z=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function eB(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function tB(e){return`nodeType`in e}function nB(e){return e?eB(e)?e:tB(e)?e.ownerDocument?.defaultView??window:window:window}function rB(e){let{Document:t}=nB(e);return e instanceof t}function iB(e){return!eB(e)&&e instanceof nB(e).HTMLElement}function aB(e){return e instanceof nB(e).SVGElement}function oB(e){return e?eB(e)?e.document:tB(e)?rB(e)?e:iB(e)||aB(e)?e.ownerDocument:document:document:document}var sB=$z?L.useLayoutEffect:L.useEffect;function cB(e){let t=(0,L.useRef)(e);return sB(()=>{t.current=e}),(0,L.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function lB(){let e=(0,L.useRef)(null);return[(0,L.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,L.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function uB(e,t){t===void 0&&(t=[e]);let n=(0,L.useRef)(e);return sB(()=>{n.current!==e&&(n.current=e)},t),n}function dB(e,t){let n=(0,L.useRef)();return(0,L.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function fB(e){let t=cB(e),n=(0,L.useRef)(null);return[n,(0,L.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function pB(e){let t=(0,L.useRef)();return(0,L.useEffect)(()=>{t.current=e},[e]),t.current}var mB={};function hB(e,t){return(0,L.useMemo)(()=>{if(t)return t;let n=mB[e]==null?0:mB[e]+1;return mB[e]=n,e+`-`+n},[e,t])}function gB(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var _B=gB(1),vB=gB(-1);function yB(e){return`clientX`in e&&`clientY`in e}function bB(e){if(!e)return!1;let{KeyboardEvent:t}=nB(e.target);return t&&e instanceof t}function xB(e){if(!e)return!1;let{TouchEvent:t}=nB(e.target);return t&&e instanceof t}function SB(e){if(xB(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return yB(e)?{x:e.clientX,y:e.clientY}:null}var CB=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[CB.Translate.toString(e),CB.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),wB=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function TB(e){return e.matches(wB)?e:e.querySelector(wB)}var EB={display:`none`};function DB(e){let{id:t,value:n}=e;return L.createElement(`div`,{id:t,style:EB},n)}function OB(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return L.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function kB(){let[e,t]=(0,L.useState)(``);return{announce:(0,L.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var AB=(0,L.createContext)(null);function jB(e){let t=(0,L.useContext)(AB);(0,L.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function MB(){let[e]=(0,L.useState)(()=>new Set),t=(0,L.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,L.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var NB={draggable:`
|
|
270
|
+
To pick up a draggable item, press the space bar.
|
|
271
|
+
While dragging, use the arrow keys to move the item.
|
|
272
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
273
|
+
`},PB={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function FB(e){let{announcements:t=PB,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=NB}=e,{announce:a,announcement:o}=kB(),s=hB(`DndLiveRegion`),[c,l]=(0,L.useState)(!1);if((0,L.useEffect)(()=>{l(!0)},[]),jB((0,L.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=L.createElement(L.Fragment,null,L.createElement(DB,{id:r,value:i.draggable}),L.createElement(OB,{id:s,announcement:o}));return n?(0,g_.createPortal)(u,n):u}var IB;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(IB||={});function LB(){}function RB(e,t){return(0,L.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function zB(){var e=[...arguments];return(0,L.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var BB=Object.freeze({x:0,y:0});function VB(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function HB(e,t){let n=SB(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function UB(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function WB(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function GB(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function KB(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function qB(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var JB=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=qB(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=VB(qB(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(UB)},YB=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=GB(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=GB(r),o=i.reduce((e,t,r)=>e+VB(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(UB)};function XB(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var ZB=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=XB(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(WB)};function QB(e,t){let{top:n,left:r,bottom:i,right:a}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=a}var $B=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];let i=[];for(let e of t){let{id:t}=e,a=n.get(t);if(a&&QB(r,a)){let n=GB(a).reduce((e,t)=>e+VB(r,t),0),o=Number((n/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:o}})}}return i.sort(UB)};function eV(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function tV(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:BB}function nV(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var rV=nV(1);function iV(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function aV(e,t,n){let r=iV(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var oV={ignoreTransform:!1};function sV(e,t){t===void 0&&(t=oV);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=nB(e).getComputedStyle(e);t&&(n=aV(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function cV(e){return sV(e,{ignoreTransform:!0})}function lV(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function uV(e,t){return t===void 0&&(t=nB(e).getComputedStyle(e)),t.position===`fixed`}function dV(e,t){t===void 0&&(t=nB(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function fV(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(rB(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!iB(i)||aB(i)||n.includes(i))return n;let a=nB(e).getComputedStyle(i);return i!==e&&dV(i,a)&&n.push(i),uV(i,a)?n:r(i.parentNode)}return e?r(e):n}function pV(e){let[t]=fV(e,1);return t??null}function mV(e){return!$z||!e?null:eB(e)?e:tB(e)?rB(e)||e===oB(e).scrollingElement?window:iB(e)?e:null:null}function hV(e){return eB(e)?e.scrollX:e.scrollLeft}function gV(e){return eB(e)?e.scrollY:e.scrollTop}function _V(e){return{x:hV(e),y:gV(e)}}var vV;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(vV||={});function yV(e){return!$z||!e?!1:e===document.scrollingElement}function bV(e){let t={x:0,y:0},n=yV(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var xV={x:.2,y:.2};function SV(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=xV);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=bV(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=vV.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=vV.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=vV.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=vV.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function CV(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function wV(e){return e.reduce((e,t)=>_B(e,_V(t)),BB)}function TV(e){return e.reduce((e,t)=>e+hV(t),0)}function EV(e){return e.reduce((e,t)=>e+gV(t),0)}function DV(e,t){if(t===void 0&&(t=sV),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);pV(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var OV=[[`x`,[`left`,`right`],TV],[`y`,[`top`,`bottom`],EV]],kV=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=fV(t),r=wV(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of OV)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},AV=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function jV(e){let{EventTarget:t}=nB(e);return e instanceof t?e:oB(e)}function MV(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}var NV;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(NV||={});function PV(e){e.preventDefault()}function FV(e){e.stopPropagation()}var IV;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(IV||={});var LV={start:[IV.Space,IV.Enter],cancel:[IV.Esc],end:[IV.Space,IV.Enter,IV.Tab]},RV=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case IV.Right:return{...n,x:n.x+25};case IV.Left:return{...n,x:n.x-25};case IV.Down:return{...n,y:n.y+25};case IV.Up:return{...n,y:n.y-25}}},zV=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new AV(oB(t)),this.windowListeners=new AV(nB(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(NV.Resize,this.handleCancel),this.windowListeners.add(NV.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(NV.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&DV(n),t(BB)}handleKeyDown(e){if(bB(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=LV,coordinateGetter:a=RV,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:BB;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=vB(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=bV(n),p=CV(n),m={x:Math.min(i===IV.Right?p.right-p.width/2:p.right,Math.max(i===IV.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===IV.Down?p.bottom-p.height/2:p.bottom,Math.max(i===IV.Down?p.top:p.top+p.height/2,u.y))},h=i===IV.Right&&!s||i===IV.Left&&!c,g=i===IV.Down&&!l||i===IV.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===IV.Right&&e<=d.x||i===IV.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}r.x=a?n.scrollLeft-e:i===IV.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===IV.Down&&e<=d.y||i===IV.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}r.y=a?n.scrollTop-e:i===IV.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,_B(vB(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};zV.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=LV,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function BV(e){return!!(e&&`distance`in e)}function VV(e){return!!(e&&`delay`in e)}var HV=class{constructor(e,t,n){n===void 0&&(n=jV(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=oB(i),this.documentListeners=new AV(this.document),this.listeners=new AV(n),this.windowListeners=new AV(nB(i)),this.initialCoordinates=SB(r)??BB,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(NV.Resize,this.handleCancel),this.windowListeners.add(NV.DragStart,PV),this.windowListeners.add(NV.VisibilityChange,this.handleCancel),this.windowListeners.add(NV.ContextMenu,PV),this.documentListeners.add(NV.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(VV(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(BV(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(NV.Click,FV,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(NV.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=SB(e)??BB,s=vB(n,o);if(!t&&a){if(BV(a)){if(a.tolerance!=null&&MV(s,a.tolerance))return this.handleCancel();if(MV(s,a.distance))return this.handleStart()}if(VV(a)&&MV(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===IV.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},UV={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},WV=class extends HV{constructor(e){let{event:t}=e,n=oB(t.target);super(e,UV,n)}};WV.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var GV={move:{name:`mousemove`},end:{name:`mouseup`}},KV;(function(e){e[e.RightClick=2]=`RightClick`})(KV||={});var qV=class extends HV{constructor(e){super(e,GV,oB(e.event.target))}};qV.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==KV.RightClick&&(r?.({event:n}),!0)}}];var JV={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},YV=class extends HV{constructor(e){super(e,JV)}static setup(){return window.addEventListener(JV.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(JV.move.name,e)};function e(){}}};YV.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var XV;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(XV||={});var ZV;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(ZV||={});function QV(e){let{acceleration:t,activator:n=XV.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=ZV.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=eH({delta:d,disabled:!a}),[m,h]=lB(),g=(0,L.useRef)({x:0,y:0}),_=(0,L.useRef)({x:0,y:0}),v=(0,L.useMemo)(()=>{switch(n){case XV.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case XV.DraggableRect:return i}},[n,i,c]),y=(0,L.useRef)(null),b=(0,L.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,L.useMemo)(()=>s===ZV.TreeOrder?[...l].reverse():l,[s,l]);(0,L.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of x){if(r?.(e)===!1)continue;let n=l.indexOf(e),i=u[n];if(!i)continue;let{direction:a,speed:s}=SV(e,i,v,t,f);for(let e of[`x`,`y`])p[e][a[e]]||(s[e]=0,a[e]=0);if(s.x>0||s.y>0){h(),y.current=e,m(b,o),g.current=s,_.current=a;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var $V={x:{[vV.Backward]:!1,[vV.Forward]:!1},y:{[vV.Backward]:!1,[vV.Forward]:!1}};function eH(e){let{delta:t,disabled:n}=e,r=pB(t);return dB(e=>{if(n||!r||!e)return $V;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[vV.Backward]:e.x[vV.Backward]||i.x===-1,[vV.Forward]:e.x[vV.Forward]||i.x===1},y:{[vV.Backward]:e.y[vV.Backward]||i.y===-1,[vV.Forward]:e.y[vV.Forward]||i.y===1}}},[n,t,r])}function tH(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return dB(e=>t==null?null:r??e??null,[r,t])}function nH(e,t){return(0,L.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var rH;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(rH||={});var iH;(function(e){e.Optimized=`optimized`})(iH||={});var aH=new Map;function oH(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,L.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,L.useRef)(e),d=g(),f=uB(d),p=(0,L.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,L.useRef)(null),h=dB(t=>{if(d&&!n)return aH;if(!t||t===aH||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new kV(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,L.useEffect)(()=>{u.current=e},[e]),(0,L.useEffect)(()=>{d||p()},[n,d]),(0,L.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,L.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case rH.Always:return!1;case rH.BeforeDragging:return n;default:return!n}}}function sH(e,t){return dB(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function cH(e,t){return sH(e,t)}function lH(e){let{callback:t,disabled:n}=e,r=cB(t),i=(0,L.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,L.useEffect)(()=>()=>i?.disconnect(),[i]),i}function uH(e){let{callback:t,disabled:n}=e,r=cB(t),i=(0,L.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,L.useEffect)(()=>()=>i?.disconnect(),[i]),i}function dH(e){return new kV(sV(e),e)}function fH(e,t,n){t===void 0&&(t=dH);let[r,i]=(0,L.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=lH({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=uH({callback:a});return sB(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function pH(e){return tV(e,sH(e))}var mH=[];function hH(e){let t=(0,L.useRef)(e),n=dB(n=>e?n&&n!==mH&&e&&t.current&&e.parentNode===t.current.parentNode?n:fV(e):mH,[e]);return(0,L.useEffect)(()=>{t.current=e},[e]),n}function gH(e){let[t,n]=(0,L.useState)(null),r=(0,L.useRef)(e),i=(0,L.useCallback)(e=>{let t=mV(e.target);t&&n(e=>e?(e.set(t,_V(t)),new Map(e)):null)},[]);return(0,L.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=mV(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,_V(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{mV(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,L.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>_B(e,t),BB):wV(e):BB,[e,t])}function _H(e,t){t===void 0&&(t=[]);let n=(0,L.useRef)(null);return(0,L.useEffect)(()=>{n.current=null},t),(0,L.useEffect)(()=>{let t=e!==BB;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?vB(e,n.current):BB}function vH(e){(0,L.useEffect)(()=>{if(!$z)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function yH(e,t){return(0,L.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function bH(e){return(0,L.useMemo)(()=>e?lV(e):null,[e])}var xH=[];function SH(e,t){t===void 0&&(t=sV);let[n]=e,r=bH(n?nB(n):null),[i,a]=(0,L.useState)(xH);function o(){a(()=>e.length?e.map(e=>yV(e)?r:new kV(t(e),e)):xH)}let s=uH({callback:o});return sB(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function CH(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return iB(t)?t:e}function wH(e){let{measure:t}=e,[n,r]=(0,L.useState)(null),i=uH({callback:(0,L.useCallback)(e=>{for(let{target:n}of e)if(iB(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=fB((0,L.useCallback)(e=>{let n=CH(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,L.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var TH=[{sensor:WV,options:{}},{sensor:zV,options:{}}],EH={current:{}},DH={draggable:{measure:cV},droppable:{measure:cV,strategy:rH.WhileDragging,frequency:iH.Optimized},dragOverlay:{measure:sV}},OH=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},kH={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new OH,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:LB},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:DH,measureDroppableContainers:LB,windowRect:null,measuringScheduled:!1},AH={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:LB,draggableNodes:new Map,over:null,measureDroppableContainers:LB},jH=(0,L.createContext)(AH),MH=(0,L.createContext)(kH);function NH(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new OH}}}function PH(e,t){switch(t.type){case IB.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case IB.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case IB.DragEnd:case IB.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case IB.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new OH(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case IB.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new OH(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case IB.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new OH(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function FH(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,L.useContext)(jH),a=pB(r),o=pB(n?.id);return(0,L.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!bB(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=TB(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function IH(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function LH(e){return(0,L.useMemo)(()=>({draggable:{...DH.draggable,...e?.draggable},droppable:{...DH.droppable,...e?.droppable},dragOverlay:{...DH.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function RH(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,L.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;sB(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=tV(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=pV(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var zH=(0,L.createContext)({...BB,scaleX:1,scaleY:1}),BH;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(BH||={});var VH=(0,L.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=TH,collisionDetection:o=ZB,measuring:s,modifiers:c,...l}=e,[u,d]=(0,L.useReducer)(PH,void 0,NH),[f,p]=MB(),[m,h]=(0,L.useState)(BH.Uninitialized),g=m===BH.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,x=_==null?null:v.get(_),S=(0,L.useRef)({initial:null,translated:null}),C=(0,L.useMemo)(()=>_==null?null:{id:_,data:x?.data??EH,rect:S},[_,x]),w=(0,L.useRef)(null),[T,E]=(0,L.useState)(null),[D,O]=(0,L.useState)(null),ee=uB(l,Object.values(l)),te=hB(`DndDescribedBy`,t),k=(0,L.useMemo)(()=>b.getEnabled(),[b]),A=LH(s),{droppableRects:j,measureDroppableContainers:M,measuringScheduled:ne}=oH(k,{dragging:g,dependencies:[y.x,y.y],config:A.droppable}),re=tH(v,_),ie=(0,L.useMemo)(()=>D?SB(D):null,[D]),ae=ke(),N=cH(re,A.draggable.measure);RH({activeNode:_==null?null:v.get(_),config:ae.layoutShiftCompensation,initialRect:N,measure:A.draggable.measure});let oe=fH(re,A.draggable.measure,N),se=fH(re?re.parentElement:null),ce=(0,L.useRef)({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:j,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),P=b.getNodeFor(ce.current.over?.id),le=wH({measure:A.dragOverlay.measure}),ue=le.nodeRef.current??re,F=g?le.rect??oe:null,I=!!(le.nodeRef.current&&le.rect),de=pH(I?null:oe),fe=bH(ue?nB(ue):null),pe=hH(g?P??re:null),me=SH(pe),he=IH(c,{transform:{x:y.x-de.x,y:y.y-de.y,scaleX:1,scaleY:1},activatorEvent:D,active:C,activeNodeRect:oe,containerNodeRect:se,draggingNodeRect:F,over:ce.current.over,overlayNodeRect:le.rect,scrollableAncestors:pe,scrollableAncestorRects:me,windowRect:fe}),ge=ie?_B(ie,y):null,_e=gH(pe),ve=_H(_e),ye=_H(_e,[oe]),be=_B(he,ve),xe=F?rV(F,he):null,R=C&&xe?o({active:C,collisionRect:xe,droppableRects:j,droppableContainers:k,pointerCoordinates:ge}):null,z=KB(R,`id`),[B,Se]=(0,L.useState)(null),Ce=eV(I?he:_B(he,ye),B?.rect??null,oe),we=(0,L.useRef)(null),Te=(0,L.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(w.current==null)return;let i=v.get(w.current);if(!i)return;let a=e.nativeEvent,o=new n({active:w.current,activeNode:i,event:a,options:r,context:ce,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=ee.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=ee.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=w.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=ee.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:S}};(0,g_.unstable_batchedUpdates)(()=>{r?.(i),h(BH.Initializing),d({type:IB.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),E(we.current),O(a)})},onMove(e){d({type:IB.DragMove,coordinates:e})},onEnd:s(IB.DragEnd),onCancel:s(IB.DragCancel)});we.current=o;function s(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ce.current,o=null;if(t&&i){let{cancelDrop:s}=ee.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===IB.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=IB.DragCancel)}w.current=null,(0,g_.unstable_batchedUpdates)(()=>{d({type:e}),h(BH.Uninitialized),Se(null),E(null),O(null),we.current=null;let t=e===IB.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=ee.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),Ee=nH(a,(0,L.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(w.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},w.current=r,Te(n,t))},[v,Te]));vH(a),sB(()=>{oe&&m===BH.Initializing&&h(BH.Initialized)},[oe,m]),(0,L.useEffect)(()=>{let{onDragMove:e}=ee.current,{active:t,activatorEvent:n,collisions:r,over:i}=ce.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:be.x,y:be.y},over:i};(0,g_.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[be.x,be.y]),(0,L.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ce.current;if(!e||w.current==null||!t||!i)return;let{onDragOver:a}=ee.current,o=r.get(z),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,g_.unstable_batchedUpdates)(()=>{Se(s),a?.(c),f({type:`onDragOver`,event:c})})},[z]),sB(()=>{ce.current={activatorEvent:D,active:C,activeNode:re,collisionRect:xe,collisions:R,droppableRects:j,draggableNodes:v,draggingNode:ue,draggingNodeRect:F,droppableContainers:b,over:B,scrollableAncestors:pe,scrollAdjustedTranslate:be},S.current={initial:F,translated:xe}},[C,re,R,xe,v,ue,F,j,b,B,pe,be]),QV({...ae,delta:y,draggingRect:xe,pointerCoordinates:ge,scrollableAncestors:pe,scrollableAncestorRects:me});let De=(0,L.useMemo)(()=>({active:C,activeNode:re,activeNodeRect:oe,activatorEvent:D,collisions:R,containerNodeRect:se,dragOverlay:le,draggableNodes:v,droppableContainers:b,droppableRects:j,over:B,measureDroppableContainers:M,scrollableAncestors:pe,scrollableAncestorRects:me,measuringConfiguration:A,measuringScheduled:ne,windowRect:fe}),[C,re,oe,D,R,se,le,v,b,j,B,M,pe,me,A,ne,fe]),Oe=(0,L.useMemo)(()=>({activatorEvent:D,activators:Ee,active:C,activeNodeRect:oe,ariaDescribedById:{draggable:te},dispatch:d,draggableNodes:v,over:B,measureDroppableContainers:M}),[D,Ee,C,oe,d,te,v,B,M]);return L.createElement(AB.Provider,{value:p},L.createElement(jH.Provider,{value:Oe},L.createElement(MH.Provider,{value:De},L.createElement(zH.Provider,{value:Ce},i)),L.createElement(FH,{disabled:n?.restoreFocus===!1})),L.createElement(FB,{...n,hiddenTextDescribedById:te}));function ke(){let e=T?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),HH=(0,L.createContext)(null),UH=`button`,WH=`Draggable`;function GH(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=hB(WH),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,L.useContext)(jH),{role:p=UH,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,L.useContext)(g?zH:HH),[v,y]=fB(),[b,x]=fB(),S=yH(o,t),C=uB(n);return sB(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:C}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,L.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===UH?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}function KH(){return(0,L.useContext)(MH)}var qH=`Droppable`,JH={timeout:25};function YH(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=hB(qH),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,L.useContext)(jH),u=(0,L.useRef)({disabled:n}),d=(0,L.useRef)(!1),f=(0,L.useRef)(null),p=(0,L.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...JH,...i},_=uB(h??r),v=uH({callback:(0,L.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=fB((0,L.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=uB(t);return(0,L.useEffect)(()=>{v&&y.current&&(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,L.useEffect)(()=>(s({type:IB.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:IB.UnregisterDroppable,key:a,id:r})),[r]),(0,L.useEffect)(()=>{n!==u.current.disabled&&(s({type:IB.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function XH(e){let{animation:t,children:n}=e,[r,i]=(0,L.useState)(null),[a,o]=(0,L.useState)(null),s=pB(n);return!n&&!r&&s&&i(s),sB(()=>{if(!a)return;let e=r?.key,n=r?.props.id;if(e==null||n==null){i(null);return}Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),L.createElement(L.Fragment,null,n,r?(0,L.cloneElement)(r,{ref:o}):null)}var ZH={x:0,y:0,scaleX:1,scaleY:1};function QH(e){let{children:t}=e;return L.createElement(jH.Provider,{value:AH},L.createElement(zH.Provider,{value:ZH},t))}var $H={position:`fixed`,touchAction:`none`},eU=e=>bB(e)?`transform 250ms ease`:void 0,tU=(0,L.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=eU}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...$H,width:s.width,height:s.height,top:s.top,left:s.left,transform:CB.Transform.toString(d),transformOrigin:i&&r?HB(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return L.createElement(n,{className:o,style:f,ref:t},a)}),nU={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:CB.Transform.toString(t)},{transform:CB.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function rU(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return cB((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=CH(a);if(!c)return;let{transform:l}=nB(a).getComputedStyle(a),u=iV(l);if(!u)return;let d=typeof t==`function`?t:iU(t);return DV(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function iU(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...nU,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var aU=0;function oU(e){return(0,L.useMemo)(()=>{if(e!=null)return aU++,aU},[e])}var sU=L.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:m,droppableContainers:h,dragOverlay:g,over:_,measuringConfiguration:v,scrollableAncestors:y,scrollableAncestorRects:b,windowRect:x}=KH(),S=(0,L.useContext)(zH),C=oU(d?.id),w=IH(o,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:g.rect,over:_,overlayNodeRect:g.rect,scrollableAncestors:y,scrollableAncestorRects:b,transform:S,windowRect:x}),T=sH(f),E=rU({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),D=T?g.setRef:void 0;return L.createElement(QH,null,L.createElement(XH,{animation:E},d&&C?L.createElement(tU,{key:C,id:d.id,ref:D,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:T,style:{zIndex:l,...i},transform:w},n):null))});function cU(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function lU(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function uU(e){return e!==null&&e>=0}function dU(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function fU(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var pU={scaleX:1,scaleY:1},mU=e=>{let{rects:t,activeNodeRect:n,activeIndex:r,overIndex:i,index:a}=e,o=t[r]??n;if(!o)return null;let s=hU(t,a,r);if(a===r){let e=t[i];return e?{x:r<i?e.left+e.width-(o.left+o.width):e.left-o.left,y:0,...pU}:null}return a>r&&a<=i?{x:-o.width-s,y:0,...pU}:a<r&&a>=i?{x:o.width+s,y:0,...pU}:{x:0,y:0,...pU}};function hU(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return!r||!i&&!a?0:n<t?i?r.left-(i.left+i.width):a.left-(r.left+r.width):a?a.left-(r.left+r.width):r.left-(i.left+i.width)}var gU=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=cU(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},_U={scaleX:1,scaleY:1},vU=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,..._U}:null}let s=yU(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,..._U}:r<t&&r>=a?{x:0,y:o.height+s,..._U}:{x:0,y:0,..._U}};function yU(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var bU=`Sortable`,xU=L.createContext({activeIndex:-1,containerId:bU,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:gU,disabled:{draggable:!1,droppable:!1}});function SU(e){let{children:t,id:n,items:r,strategy:i=gU,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=KH(),d=hB(bU,n),f=s.rect!==null,p=(0,L.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,_=(0,L.useRef)(p),v=!dU(p,_.current),y=g!==-1&&h===-1||v,b=fU(a);sB(()=>{v&&m&&u(p)},[v,p,m,u]),(0,L.useEffect)(()=>{_.current=p},[p]);let x=(0,L.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:lU(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return L.createElement(xU.Provider,{value:x},t)}var CU=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return cU(n,r,i).indexOf(t)},wU=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},TU={duration:200,easing:`ease`},EU=`transform`,DU=CB.Transition.toString({property:EU,duration:0,easing:`linear`}),OU={roleDescription:`sortable`};function kU(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,L.useState)(null),s=(0,L.useRef)(n);return sB(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=sV(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,L.useEffect)(()=>{a&&o(null)},[a]),a}function AU(e){let{animateLayoutChanges:t=wU,attributes:n,disabled:r,data:i,getNewIndex:a=CU,id:o,strategy:s,resizeObserverConfig:c,transition:l=TU}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,L.useContext)(xU),y=jU(r,p),b=u.indexOf(o),x=(0,L.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),S=(0,L.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:C,node:w,isOver:T,setNodeRef:E}=YH({id:o,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...c}}),{active:D,activatorEvent:O,activeNodeRect:ee,attributes:te,setNodeRef:k,listeners:A,isDragging:j,over:M,setActivatorNodeRef:ne,transform:re}=GH({id:o,data:x,attributes:{...OU,...n},disabled:y.draggable}),ie=Qz(E,k),ae=!!D,N=ae&&!m&&uU(f)&&uU(g),oe=!_&&j,se=N?(oe&&N?re:null)??(s??v)({rects:h,activeNodeRect:ee,activeIndex:f,overIndex:g,index:b}):null,ce=uU(f)&&uU(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,P=D?.id,le=(0,L.useRef)({activeId:P,items:u,newIndex:ce,containerId:d}),ue=u!==le.current.items,F=t({active:D,containerId:d,isDragging:j,isSorting:ae,id:o,index:b,items:u,newIndex:le.current.newIndex,previousItems:le.current.items,previousContainerId:le.current.containerId,transition:l,wasDragging:le.current.activeId!=null}),I=kU({disabled:!F,index:b,node:w,rect:C});return(0,L.useEffect)(()=>{ae&&le.current.newIndex!==ce&&(le.current.newIndex=ce),d!==le.current.containerId&&(le.current.containerId=d),u!==le.current.items&&(le.current.items=u)},[ae,ce,d,u]),(0,L.useEffect)(()=>{if(P===le.current.activeId)return;if(P!=null&&le.current.activeId==null){le.current.activeId=P;return}let e=setTimeout(()=>{le.current.activeId=P},50);return()=>clearTimeout(e)},[P]),{active:D,activeIndex:f,attributes:te,data:x,rect:C,index:b,newIndex:ce,items:u,isOver:T,isSorting:ae,isDragging:j,listeners:A,node:w,overIndex:g,over:M,setNodeRef:ie,setActivatorNodeRef:ne,setDroppableNodeRef:E,setDraggableNodeRef:k,transform:I??se,transition:de()};function de(){if(I||ue&&le.current.newIndex===b)return DU;if(!(oe&&!bB(O)||!l)&&(ae||F))return CB.Transition.toString({...l,property:EU})}}function jU(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function MU(e){if(!e)return!1;let t=e.data.current;return!!(t&&`sortable`in t&&typeof t.sortable==`object`&&`containerId`in t.sortable&&`items`in t.sortable&&`index`in t.sortable)}var NU=[IV.Down,IV.Right,IV.Up,IV.Left],PU=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(NU.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];a.getEnabled().forEach(n=>{if(!n||n!=null&&n.disabled)return;let a=i.get(n.id);if(a)switch(e.code){case IV.Down:r.top<a.top&&t.push(n);break;case IV.Up:r.top>a.top&&t.push(n);break;case IV.Left:r.left>a.left&&t.push(n);break;case IV.Right:r.left<a.left&&t.push(n)}});let c=YB({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=KB(c,`id`);if(l===o?.id&&c.length>1&&(l=c[1].id),l!=null){let e=a.get(n.id),t=a.get(l),o=t?i.get(t.id):null,c=t?.node.current;if(c&&o&&e&&t){let n=fV(c).some((e,t)=>s[t]!==e),i=FU(e,t),a=IU(e,t),l=n||!i?{x:0,y:0}:{x:a?r.width-o.width:0,y:a?r.height-o.height:0},u={x:o.left,y:o.top};return l.x&&l.y?u:vB(u,l)}}}};function FU(e,t){return!MU(e)||!MU(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function IU(e,t){return!MU(e)||!MU(t)||!FU(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var LU=(0,L.createContext)(null),RU={didCatch:!1,error:null},zU=class extends L.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=RU}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){let{didCatch:t}=this.state;t&&(this.props.onReset?.({args:e,reason:`imperative-api`}),this.setState(RU))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;n&&t.didCatch&&BU(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:`keys`}),this.setState(RU))}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:a}=this.state,o=e;if(i){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof t==`function`)o=t(e);else if(n)o=(0,L.createElement)(n,e);else if(r!==void 0)o=r;else throw a}return(0,L.createElement)(LU.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},o)}};function BU(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}function VU(e){return typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`?e.toString():JSON.stringify(e)??``}function HU(){return(0,H.jsxs)(`div`,{style:{textAlign:`center`,marginTop:`4em`},children:[(0,H.jsx)(Ym,{}),(0,H.jsx)(`p`,{children:`Loading`})]})}function UU({error:e}){return e===void 0?(0,H.jsx)(H.Fragment,{}):Bt.isApiException(e)?(0,H.jsx)(wv,{children:(0,H.jsxs)(Ov,{children:[(0,H.jsx)(`h3`,{children:`FMS Insight Server Error`}),(0,H.jsx)(`p`,{children:e.response})]})}):e instanceof Error?(0,H.jsx)(wv,{children:(0,H.jsx)(Ov,{children:e.message})}):(0,H.jsx)(wv,{children:(0,H.jsxs)(Ov,{children:[(0,H.jsx)(`h3`,{children:`Unknown Error`}),(0,H.jsx)(`p`,{children:VU(e)})]})})}function WU(e){return(0,H.jsx)(zU,{FallbackComponent:UU,children:(0,H.jsx)(L.Suspense,{fallback:e.fallback??(0,H.jsx)(HU,{}),children:e.children})})}function GU(e){let t=e.action.loadCancellationId;return t!==void 0&&t.trim()!==``?t:null}function KU(e){switch(e.action.type){case ot.Loading:case ot.UnloadToInProcess:case ot.UnloadToCompletedMaterial:case ot.LoadingToBasket:return!0;default:return!1}}function qU(e){let t=GU(e);return t!==null||KU(e)?{kind:`ActiveLoadStationOperation`,cancellationId:t}:e.location.type===it.InQueue&&e.action.type===ot.Waiting?{kind:`HumanControlledQueue`}:e.location.type===it.OnPallet||e.location.type===it.InBasket||e.action.type===ot.Machining?{kind:`AutomationControlled`}:{kind:`AddToQueueProposal`}}function JU(e){return qU(e).kind===`ActiveLoadStationOperation`}function YU(e){if(e===null)return!1;let t=qU(e);return t.kind===`ActiveLoadStationOperation`&&t.cancellationId!==null}function XU(e){return e!==null&&qU(e).kind===`AutomationControlled`}function ZU(e){return e!==null&&qU(e).kind===`HumanControlledQueue`}function QU(e){return ZU(e)}function $U(e){return e===null||qU(e).kind===`AddToQueueProposal`}function eW(e){if(e===null)return!0;let t=qU(e);return t.kind===`AddToQueueProposal`||t.kind===`HumanControlledQueue`}var tW=class extends L.PureComponent{render(){let e=this.props.size||50,t=Bz(this.props.part,e);return(0,H.jsx)(`div`,{style:{width:e,height:e},dangerouslySetInnerHTML:{__html:t}})}},nW=2,rW=Fa`
|
|
274
|
+
from, to { transform: translate(0, 0) }
|
|
275
|
+
10% { transform: translate(${nW}px, 0) }
|
|
276
|
+
20% { transform: translate(0, 0) }
|
|
277
|
+
30% { transform: translate(${nW}px, 0) }
|
|
278
|
+
40% { transform: translate(0, 0) }
|
|
279
|
+
50% { transform: translate(${nW}px, 0) }
|
|
280
|
+
60% { transform: translate(0, 0) }
|
|
281
|
+
`,iW=`${rW} 1s ease-in-out infinite`;function aW(e){return`animationName`in e}function oW(e){let t=e.currentTarget.getAnimations().find(e=>aW(e)&&e.animationName===rW.name);if(t&&typeof t.startTime==`number`)t.startTime-=t.startTime%1e3;else if(t&&typeof t.startTime==`object`&&t.startTime instanceof CSSNumericValue){let e=t.startTime.to(`ms`).value;t.startTime=CSS.ms(e-e%1e3)}}var sW=G(`div`,{shouldForwardProp:e=>e!==`fsize`})(({fsize:e,theme:t})=>{if(!e)return{fontSize:`1.25rem`,fontWeight:`500`};switch(e){case`normal`:return{fontSize:`1rem`,fontWeight:`500`,[t.breakpoints.up(`md`)]:{fontSize:`1.25rem`},[t.breakpoints.up(`lg`)]:{fontSize:`1.5rem`}};case`large`:return{fontSize:`1.5rem`,fontWeight:`500`,[t.breakpoints.up(`lg`)]:{fontSize:`1.75rem`},[t.breakpoints.up(`xl`)]:{fontSize:`2rem`}};case`x-large`:return{fontSize:`1.5rem`,fontWeight:`500`,[t.breakpoints.up(`md`)]:{fontSize:`1.75rem`},[t.breakpoints.up(`lg`)]:{fontSize:`2.75rem`},[t.breakpoints.up(`xl`)]:{fontSize:`3.75rem`}}}}),cW=G(`div`,{shouldForwardProp:e=>e!==`fsize`})(({fsize:e,theme:t})=>{if(!e)return{fontSize:`0.75rem`,fontWeight:`500`};switch(e){case`normal`:return{fontSize:`0.75rem`,fontWeight:`500`,[t.breakpoints.up(`md`)]:{fontSize:`1rem`}};case`large`:return{fontSize:`1rem`,fontWeight:`500`,[t.breakpoints.up(`lg`)]:{fontSize:`1.5rem`},[t.breakpoints.up(`xl`)]:{fontSize:`1.75rem`}};case`x-large`:return{fontSize:`1rem`,fontWeight:`500`,[t.breakpoints.up(`md`)]:{fontSize:`1.5rem`},[t.breakpoints.up(`lg`)]:{fontSize:`2.5rem`},[t.breakpoints.up(`xl`)]:{fontSize:`3.5rem`}}}});function lW({mat:e,displayActionForSinglePallet:t,fsize:n}){let r=R(zO),i=dk(R(br).basketName);switch(e.action.type){case ot.Loading:if(e.action.loadFromBasketId){if(e.action.loadOntoPalletNum===null||e.action.loadOntoPalletNum===void 0)return(0,H.jsxs)(cW,{fsize:n,children:[`Load into `,i,` `,e.action.loadFromBasketId]});if(t===void 0)return(0,H.jsxs)(cW,{fsize:n,children:[`Load from `,i,` `,e.action.loadFromBasketId,` to pal`,` `,e.action.loadOntoPalletNum??``]});if(t===e.action.loadOntoPalletNum){let t=e.action.loadOntoFace??0,a=e.action.loadOntoPalletNum?r.pallets[e.action.loadOntoPalletNum]?.faceNames?.[t-1]:null;return(0,H.jsxs)(cW,{fsize:n,children:[`Load from `,i,` `,e.action.loadFromBasketId,` to`,` `,a??`face ${t}`]})}return null}switch(e.location.type){case it.OnPallet:if(t===void 0||t===e.location.palletNum){if(e.action.loadOntoFace===void 0||e.action.loadOntoFace===e.location.face)return e.action.processAfterLoad&&e.action.processAfterLoad!==e.process?(0,H.jsxs)(cW,{fsize:n,children:[`Reclamp material to process # `,e.action.processAfterLoad]}):null;{let t=e.action.loadOntoFace??0,i=e.location.palletNum?r.pallets[e.location.palletNum]?.faceNames?.[t-1]:null;return(0,H.jsxs)(cW,{fsize:n,children:[`Transfer to `,i??`face ${t}`]})}}return null;default:{let i=e.action.loadOntoFace??0,a=e.action.loadOntoPalletNum?r.pallets[e.action.loadOntoPalletNum]?.faceNames?.[i-1]:null;return t===void 0?(0,H.jsxs)(cW,{fsize:n,children:[`Load to `,a??`face ${i}`,` of pal `,e.action.loadOntoPalletNum??``]}):t===e.action.loadOntoPalletNum?(0,H.jsxs)(cW,{fsize:n,children:[`Load to `,a??`face ${i}`]}):null}}case ot.LoadingToBasket:return(0,H.jsxs)(cW,{fsize:n,children:[`Load into `,i,` `,e.action.loadToBasketId??``,e.action.loadToBasketSlot===void 0?``:` slot ${uk(e.action.loadToBasketSlot)}`]});case ot.UnloadToInProcess:case ot.UnloadToCompletedMaterial:return e.action.unloadToBasketId?(0,H.jsxs)(cW,{fsize:n,children:[`Unload to `,i,` `,e.action.unloadToBasketId,e.action.unloadToBasketSlot===void 0?``:` slot ${uk(e.action.unloadToBasketSlot)}`]}):e.action.unloadIntoQueue?(0,H.jsxs)(cW,{fsize:n,children:[`Unload into queue `,e.action.unloadIntoQueue]}):e.action.type===ot.UnloadToCompletedMaterial&&e.location.type===it.InBasket?(0,H.jsxs)(cW,{fsize:n,children:[`Unload from `,i,` `,e.location.basketId,` to completed material`]}):e.location.type===it.InBasket?(0,H.jsxs)(cW,{fsize:n,children:[`Unload from `,i,` `,e.location.basketId]}):(0,H.jsx)(cW,{fsize:n,children:`Unload from pallet`});case ot.Waiting:if(e.location.type===it.InQueue&&e.jobUnique&&e.jobUnique!==``)return(0,H.jsxs)(cW,{fsize:n,children:[`Waiting; next process is #`,e.process+1]});if(e.location.type===it.InBasket)return(0,H.jsxs)(cW,{fsize:n,children:[`In `,i,` `,e.location.basketId]});if(e.location.type===it.OnPallet&&(e.lastCompletedMachiningRouteStopIndex===null||e.lastCompletedMachiningRouteStopIndex===void 0))return(0,H.jsx)(cW,{fsize:n,children:`Waiting for machining`});break;case ot.Machining:return(0,H.jsxs)(cW,{fsize:n,children:[`Machining program `,e.action.program??``]})}return null}function uW({mat:e}){let t=null;return e.signaledInspections.length>0&&(t=`Inspect: `+e.signaledInspections.join(`, `)),e.quarantineAfterUnload&&(t===null?t=`Material will quarantine after unload`:t+=`; Material will quarantine after unload`),t===null?null:(0,H.jsx)(X,{title:t,children:(0,H.jsx)(VT,{})})}function dW({fsize:e,mat:t}){let n=R(zO).jobs[t.jobUnique],r=t.path;if((t.action.type===ot.Loading||t.action.type===ot.LoadingToBasket)&&t.action.pathAfterLoad&&(r=t.action.pathAfterLoad),!n)return null;let i=n.procsAndPaths?.[0]?.paths?.[r-1];return i&&i.casting&&i.casting!==``?(0,H.jsx)(cW,{fsize:e,children:i.casting}):null}function fW({fsize:e,uniq:t}){let n=R(zO).jobs[t],r=R(OR);if(n&&n.bookings&&n.bookings.length>0){let t=r.get(n.bookings[0]);if(t&&t.notes&&t.notes!==``)return(0,H.jsx)(cW,{fsize:e,style:{textOverflow:`ellipsis`,overflow:`hidden`,whiteSpace:`nowrap`,maxWidth:`10em`},children:t.notes})}return null}function pW(){let e=R(zO),t=R(jI);if(!t)return null;let n=e.workorders?.find(e=>e.workorderId===t)?.comments??[];return(0,H.jsxs)(`div`,{style:{marginTop:`1em`,marginLeft:`1em`},children:[(0,H.jsxs)(`p`,{children:[`Workorder: `,t]}),(0,H.jsx)(`ul`,{children:n.map((e,t)=>(0,H.jsx)(`li`,{children:e.comment},t))})]})}var mW=function({mat:e,inProcMat:t,fsize:n,focusInspectionType:r,isDragOverlay:i,isActiveDrag:a,shake:o,dragRootProps:s,showDragHandle:c,setDragHandleRef:l,dragHandleProps:u,displayJob:d,hideEmptySerial:f,showRawMaterial:p,showJobComment:m,displayActionForSinglePallet:h,hideAvatar:g,hideWarningIcon:_,ref:v}){let y=z(CI),b=e.completedInspections||{},x;return r&&b[r]?x=(0,H.jsxs)(cW,{fsize:n,children:[(0,H.jsx)(`span`,{children:`Inspection completed `}),(0,H.jsx)(Zz,{date:b[r].time})]}):r&&e.last_unload_time?x=(0,H.jsxs)(cW,{fsize:n,children:[(0,H.jsx)(`span`,{children:`Unloaded `}),(0,H.jsx)(Zz,{date:e.last_unload_time})]}):e.closeout_completed&&(x=(0,H.jsxs)(cW,{fsize:n,children:[(0,H.jsxs)(`span`,{children:[e.closeout_failed?`Failed `:``,`Closed Out `]}),(0,H.jsx)(Zz,{date:e.closeout_completed})]})),(0,H.jsxs)(Qp,{ref:v,elevation:4,sx:{display:`flex`,minWidth:`10em`,padding:`8px`,margin:i?void 0:`8px`,opacity:a?.2:1,animation:o?iW:void 0,"&:hover":{animationPlayState:`paused`}},onAnimationIteration:oW,...s,children:[c?(0,H.jsx)(`div`,{ref:l,role:`button`,tabIndex:0,style:{display:`flex`,flexDirection:`column`,justifyContent:`center`,cursor:i?`grabbing`:`grab`,touchAction:`none`},...u,children:(0,H.jsx)(Sre,{fontSize:`large`,color:`action`})}):void 0,(0,H.jsx)(Em,{focusRipple:!0,sx:{width:`100%`},onClick:()=>y(t?{type:`InProcMat`,inproc:t}:{type:`MatSummary`,summary:e}),children:(0,H.jsxs)(J,{sx:{display:`flex`,textAlign:`left`,alignItems:`center`,width:`100%`},children:[(0,H.jsx)(tW,{part:e.partName}),(0,H.jsxs)(J,{sx:{marginLeft:`8px`,flexGrow:1,minWidth:0},children:[(0,H.jsx)(sW,{fsize:n,children:e.partName}),d?(0,H.jsx)(cW,{fsize:n,children:e.jobUnique&&e.jobUnique!==``?`Assigned to `+e.jobUnique:`Unassigned material`}):void 0,!f||e.serial?(0,H.jsxs)(cW,{fsize:n,children:[`Serial: `,e.serial?e.serial:`none`]}):void 0,e.workorderId===void 0||e.workorderId===``||e.workorderId===e.serial?void 0:(0,H.jsxs)(cW,{fsize:n,children:[`Workorder: `,e.workorderId]}),e.jobUnique!==void 0&&p&&t&&t.process===0?(0,H.jsx)(dW,{fsize:n,mat:t}):void 0,m&&e.jobUnique&&e.jobUnique!==``?(0,H.jsx)(fW,{fsize:n,uniq:e.jobUnique}):void 0,t?(0,H.jsx)(lW,{mat:t,displayActionForSinglePallet:h,fsize:n}):void 0,t?.problem?(0,H.jsx)(cW,{fsize:n,children:(0,H.jsxs)(q,{variant:`body2`,color:`error`,sx:{fontWeight:`bold`},children:[`⚠ `,t.problem]})}):void 0,x]}),(0,H.jsxs)(J,{sx:{marginLeft:`4px`,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,alignItems:`flex-end`,alignSelf:`start`,flexShrink:0},children:[e.serial&&e.serial.length>=1&&!g?(0,H.jsx)(`div`,{children:(0,H.jsx)(G_,{style:{width:`30px`,height:`30px`},children:e.serial.slice(-1)})}):void 0,_?void 0:(0,H.jsx)(`div`,{children:(0,H.jsx)(uW,{mat:e})})]})]})})]})},hW=(0,L.memo)(mW),gW=(0,L.memo)(function(e){return(0,H.jsx)(mW,{mat:bL(e.mat),inProcMat:e.mat,displayActionForSinglePallet:e.displayActionForSinglePallet,fsize:e.fsize,hideAvatar:e.hideAvatar,displayJob:e.displayJob,showDragHandle:e.showHandle,hideEmptySerial:e.hideEmptySerial,showRawMaterial:e.showRawMaterial,showJobComment:e.showJobComment,shake:e.shake})}),_W=(0,L.memo)(function(e){let t={mat:e.mat},{active:n,isDragging:r,attributes:i,listeners:a,setNodeRef:o,setActivatorNodeRef:s,transform:c,transition:l}=AU({id:e.mat.materialID,data:t}),u={...a};for(let[e,t]of Object.entries(i))e.startsWith(`aria`)&&(u[e]=t);let d={transform:c?`translate3d(${Math.round(c.x)}px, ${Math.round(c.y)}px, 0)`:void 0,transition:n===null?void 0:l};return(0,H.jsx)(mW,{ref:o,dragRootProps:{style:d},showDragHandle:!0,dragHandleProps:u,setDragHandleRef:s,isActiveDrag:r,mat:bL(e.mat),inProcMat:e.mat,displayActionForSinglePallet:e.displayActionForSinglePallet,hideAvatar:e.hideAvatar,displayJob:e.displayJob,hideEmptySerial:e.hideEmptySerial,fsize:e.fsize,shake:n?void 0:e.shake,showRawMaterial:e.showRawMaterial})});function vW(e){return(0,H.jsx)(mW,{mat:bL(e.mat),inProcMat:e.mat,displayActionForSinglePallet:e.displayActionForSinglePallet,showDragHandle:!0,hideAvatar:e.hideAvatar,displayJob:e.displayJob,fsize:e.fsize,hideEmptySerial:e.hideEmptySerial,isDragOverlay:!0})}var yW=(0,L.memo)(function(e){return(0,H.jsx)(Qp,{elevation:4,sx:{display:`flex`,minWidth:`10em`,padding:`8px`,margin:`8px`},children:(0,H.jsx)(cv,{badgeContent:e.material.length<2?0:e.material.length,color:`secondary`,children:(0,H.jsx)(Em,{focusRipple:!0,onClick:()=>e.onOpen(),children:(0,H.jsxs)(J,{sx:{display:`flex`,textAlign:`left`},children:[(0,H.jsx)(tW,{part:e.partOrCasting}),(0,H.jsxs)(J,{sx:{marginLeft:`8px`,flexGrow:1},children:[(0,H.jsx)(q,{variant:`h6`,children:e.partOrCasting}),(0,H.jsx)(cW,{fsize:e.fsize,children:e.assignedJobUnique&&e.assignedJobUnique!==``?`Assigned to `+e.assignedJobUnique:`Unassigned material`})]}),e.material.length>0&&e.material[0].serial&&e.material[0].serial.length>=1?(0,H.jsx)(`div`,{children:(0,H.jsx)(G_,{style:{width:`30px`,height:`30px`},children:e.material[0].serial.slice(-1)})}):void 0]})})})})}),bW=(0,L.memo)(function({partName:e,serial:t,subtitle:n,notes:r}){let i;return i=e===``?t??`Material`:t==null||t===``?r?`Add note for `+e:e:r?`Add note for `+t:e+` - `+t,(0,H.jsxs)(J,{sx:{display:`flex`,textAlign:`left`},children:[e===``?(0,H.jsx)(NT,{}):(0,H.jsx)(tW,{part:e}),(0,H.jsxs)(J,{sx:{marginLeft:`8px`,flexGrow:1},children:[(0,H.jsx)(q,{variant:`h6`,children:i}),n?(0,H.jsx)(q,{variant:`caption`,children:n}):void 0]})]})});function xW({notes:e}){let t=R(CI),n=R(Nie),r=R(Pie),i=``,a=null;switch(t?.type){case`InProcMat`:i=t.inproc.partName,a=t.inproc.serial;break;case`MatSummary`:i=t.summary.partName,a=t.summary.serial;break;case`MatDetails`:i=t.details.partName,a=t.details.serial;break;case`LogMat`:i=t.logMat.part,a=t.logMat.serial;break;case`Barcode`:a=t.barcode;break;case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:a=t.serial}return n.state===`hasData`&&n.data!==null&&(i=n.data.partName,a=n.data.serial??a),r.state===`hasData`&&r.data&&(a=r.data),(0,H.jsx)(bW,{notes:e,partName:i,serial:a})}function SW(){let e=R(II);function t(t){return e.completedInspections.includes(t)?`black`:`red`}return e.signaledInspections.length===0?(0,H.jsx)(`small`,{children:`Inspections: none`}):(0,H.jsxs)(`small`,{children:[`Inspections:`,` `,e.signaledInspections.map((e,n)=>(0,H.jsxs)(`span`,{children:[n===0?``:`, `,(0,H.jsx)(`span`,{style:{color:t(e)},children:e})]},n))]})}function CW({highlightProcsGreaterOrEqualTo:e}){let t=R(PI);return(0,H.jsx)(xI,{entries:t,copyToClipboard:!0,highlightProcsGreaterOrEqualTo:e})}function wW(){let e=R(kI),t=R(zO).jobs,n=R(OR),r=e?t[e.jobUnique]:null;if(r&&r.bookings&&r.bookings.length>0){let e=n.get(r.bookings[0]);if(e&&e.notes&&e.notes!==``)return(0,H.jsx)(q,{variant:`caption`,sx:{width:`100%`,textWrap:`wrap`},children:e.notes})}return null}function TW(){let e=R(kI);if(e===null)return null;if(e.quarantineAfterUnload)return(0,H.jsx)(q,{variant:`caption`,component:`p`,children:`Quarantine requested`});let t=qU(e);return t.kind!==`ActiveLoadStationOperation`||t.cancellationId!==null?null:(0,H.jsx)(q,{variant:`caption`,component:`p`,children:`This material is part of the current load/unload operation. Complete the operation or cancel it at the machine control before making other changes.`})}var EW=(0,L.memo)(function({highlightProcsGreaterOrEqualTo:e}){let t=R(CI),n=R(EI),r=R(TI);return t===null?null:n===null?t.type===`AddMatWithEnteredSerial`||t.type===`ManuallyEnteredSerial`?(0,H.jsxs)(`div`,{style:{marginLeft:`1em`},children:[`Material with serial `,t.serial,` not found.`]}):t.type===`Barcode`?r?(0,H.jsxs)(`div`,{style:{marginLeft:`1em`},children:[`Material with barcode `,t.barcode,` does not yet exist in the cell.`]}):(0,H.jsxs)(`div`,{style:{marginLeft:`1em`},children:[`Material with barcode `,t.barcode,` not found.`]}):(0,H.jsx)(`div`,{style:{marginLeft:`1em`},children:`Material not found.`}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{style:{marginLeft:`1em`},children:[(0,H.jsx)(TW,{}),(0,H.jsx)(`div`,{children:(0,H.jsxs)(`small`,{children:[`Workorder: `,n?.workorderId??`none`]})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(WU,{fallback:(0,H.jsxs)(`small`,{children:[`Inspections: `,(0,H.jsx)(Ym,{size:`10`})]}),children:(0,H.jsx)(SW,{})})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(WU,{fallback:(0,H.jsx)(`div`,{}),children:(0,H.jsx)(wW,{})})})]}),(0,H.jsx)(WU,{fallback:(0,H.jsx)(Ym,{}),children:(0,H.jsx)(CW,{highlightProcsGreaterOrEqualTo:e})})]})});function DW(e){let[t,n]=(0,L.useState)(``),r=R(LO),[i]=zie(),a=R(EI);return a===null?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(hy,{children:(0,H.jsx)(nT,{sx:{mt:`5px`},multiline:!0,label:`Note`,autoFocus:!0,variant:`outlined`,value:t,onChange:e=>n(e.target.value)})}),(0,H.jsxs)(my,{children:[(0,H.jsx)(Y,{onClick:()=>{i({matId:a.materialID,process:0,operator:r,notes:t}),e.setNotesOpen(!1),n(``)},disabled:t===``,color:`secondary`,children:`Save`}),(0,H.jsx)(Y,{onClick:()=>{e.setNotesOpen(!1),n(``)},color:`secondary`,children:`Cancel`})]})]})}function OW(){let e=R(CI);if(e===null)return null;let t;switch(e.type){case`Barcode`:t=`Loading material with barcode `+e.barcode+`...`;break;case`AddMatWithEnteredSerial`:case`ManuallyEnteredSerial`:t=`Loading material with serial `+e.serial+`...`;break;default:t=`Loading material...`}return(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`},children:[(0,H.jsx)(Ym,{}),(0,H.jsx)(`div`,{style:{marginTop:`1em`},children:t})]})}function kW({setNotesOpen:e}){let t=R(EI);return t===null||t.materialID<0?null:(0,H.jsx)(Y,{onClick:()=>e(!0),color:`primary`,children:`Add Note`})}var AW=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(!1),[r,i]=B(CI);function a(){i(null),e.onClose&&e.onClose()}let o,s;return r&&(o=(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(gy,{children:(0,H.jsx)(xW,{})}),(0,H.jsx)(hy,{children:(0,H.jsxs)(WU,{fallback:(0,H.jsx)(OW,{}),children:[(0,H.jsx)(EW,{highlightProcsGreaterOrEqualTo:e.highlightProcsGreaterOrEqualTo}),(0,H.jsx)(WU,{fallback:(0,H.jsx)(Ym,{}),children:e.extraDialogElements})]})}),(0,H.jsxs)(my,{children:[r&&(e.buttons||e.allowNote)?(0,H.jsx)(zU,{fallback:(0,H.jsx)(`div`,{}),children:(0,H.jsxs)(L.Suspense,{fallback:(0,H.jsx)(`div`,{}),children:[r&&e.allowNote?(0,H.jsx)(kW,{setNotesOpen:n}):void 0,e.buttons]})}):null,(0,H.jsx)(Y,{onClick:a,color:`secondary`,children:`Close`})]})]}),e.allowNote&&(s=(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(gy,{children:(0,H.jsx)(xW,{notes:!0})}),(0,H.jsxs)(WU,{fallback:(0,H.jsx)(hy,{children:(0,H.jsx)(Ym,{})}),children:[(0,H.jsx)(DW,{setNotesOpen:n}),`;`]})]}))),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(py,{open:r!==null,onClose:a,maxWidth:`lg`,children:o}),e.allowNote?(0,H.jsx)(py,{open:t,onClose:()=>n(!1),maxWidth:`md`,children:s}):void 0]})}),jW=NO(`MachineCostPerYear`,{}),MW=NO(`AutomationCostPerYear`,null),NW=NO(`Last30LaborCost`,null),PW=vO(e=>NO(`PerMonthLabor-`+e.getFullYear().toString()+`-`+e.getMonth().toString(),null)),FW=P(e=>e(e(ZR).type===`Last30`?bO:wO).valuesToLazySeq().filter(e=>e.procsAndPaths.length===1&&e.procsAndPaths[0].paths.length===1&&e.procsAndPaths[0].paths[0].stops.length===1&&UO(e.procsAndPaths[0].paths[0].stops[0].expectedCycleTime)===0).toHashSet(e=>e.partName)),IW=P(e=>{let t=e(ZR),n=e(t.type===`Last30`?hk:vk),r=e(t.type===`Last30`?_L:yL),i=e(FW),a=QT(xE(),-30),o=t.type===`Last30`?null:t.month;return cz(n.valuesToLazySeq(),i,r.matsById,o?{month:o}:{thirtyDaysAgo:a})}),LW=P(e=>{let t=e(ZR),n=e(jW),r=e(MW),i=e(t.type===`Last30`?NW:PW(t.month));return lz(e(IW),n,r,i??0)});function RW(){let[e,t]=(0,L.useState)(null),[n,r]=B(MW);return(0,H.jsx)(nT,{id:`auotmation-cost-year`,type:`number`,label:`Cost for automated handling system per year`,style:{marginTop:`1.5em`},variant:`outlined`,value:e===null?n??``:isNaN(e)?``:e,onChange:e=>t(parseFloat(e.target.value)),onBlur:()=>{e!=null&&r(isNaN(e)?null:e),t(null)},slotProps:{htmlInput:{min:0}}})}function zW(){let e=R(ZR),t=e.type===`Last30`?null:e.month,[n,r]=(0,L.useState)(null),[i,a]=B(t===null?NW:PW(t));return(0,H.jsx)(nT,{type:`number`,label:`Total labor cost for `+(t===null?`last 30 days`:t.toLocaleDateString(void 0,{month:`long`,year:`numeric`})),variant:`outlined`,value:n===null?i??``:isNaN(n)?``:n,onChange:e=>r(parseFloat(e.target.value)),onBlur:()=>{n!=null&&a(isNaN(n)?null:n),r(null)},slotProps:{htmlInput:{min:0}}})}function BW(e){let[t,n]=(0,L.useState)(null),[r,i]=B(jW);return(0,H.jsx)(nT,{type:`number`,variant:`outlined`,label:`Cost for `+e.machineGroup+` per station per year`,style:{marginTop:`1.5em`},value:t===null?r[e.machineGroup]??``:isNaN(t)?``:t,onChange:e=>n(parseFloat(e.target.value)),onBlur:()=>{if(t!=null){let n={...r};isNaN(t)?delete n[e.machineGroup]:n[e.machineGroup]=t,i(n)}n(null)},slotProps:{htmlInput:{min:0}}})}function VW(){let e=R(LW);return(0,H.jsx)(H.Fragment,{children:e.machineQuantities.keysToAscLazySeq().map((t,n)=>(0,H.jsx)(BW,{machineQuantities:e.machineQuantities,machineGroup:t},n))})}var HW=Intl.NumberFormat(void 0,{minimumFractionDigits:1,maximumFractionDigits:1}),UW=new Intl.NumberFormat(void 0,{style:`percent`,minimumFractionDigits:1,maximumFractionDigits:1});function WW(){YI(`Cost Percentages`);let e=R(IW);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(q,{variant:`subtitle1`,children:`Part Cost Percentage Breakdown`}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>pz(e),size:`large`,children:(0,H.jsx)(bT,{})})})]}),(0,H.jsx)(`main`,{children:(0,H.jsxs)(Vw,{stickyHeader:!0,children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:`Part`}),(0,H.jsx)(Z,{align:`right`,children:`Completed Quantity`}),e.machineQuantities.keysToAscLazySeq().map(e=>(0,H.jsxs)(Z,{align:`right`,children:[e,` Cost %`]},e)),(0,H.jsx)(Z,{align:`right`,children:`Labor Cost %`}),(0,H.jsx)(Z,{align:`right`,children:`Automation Cost %`})]})}),(0,H.jsx)(Ww,{children:Q.of(e.parts).sortBy(e=>e.part).map((t,n)=>(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(tW,{part:t.part,size:25})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(q,{variant:`body2`,component:`span`,sx:{display:`block`},children:t.part})})]})}),(0,H.jsx)(Z,{align:`right`,children:t.parts_completed}),e.machineQuantities.keysToAscLazySeq().map(e=>(0,H.jsx)(Z,{align:`right`,children:UW.format(t.machine.get(e)??0)},e)),(0,H.jsx)(Z,{align:`right`,children:UW.format(t.labor)}),(0,H.jsx)(Z,{align:`right`,children:UW.format(t.automation)})]},n))})]})})]})}function GW(){let e=R(LW);return(0,H.jsxs)(Vw,{stickyHeader:!0,children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:`Part`}),(0,H.jsx)(Z,{align:`right`,children:`Completed Quantity`}),e.machineQuantities.keysToAscLazySeq().map(e=>(0,H.jsxs)(Z,{align:`right`,children:[e,` Cost`]},e)),(0,H.jsx)(Z,{align:`right`,children:`Labor Cost`}),(0,H.jsx)(Z,{align:`right`,children:`Automation Cost`}),(0,H.jsxs)(Z,{align:`right`,children:[(0,H.jsx)(`span`,{children:`Total`}),(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>dz(e),size:`large`,children:(0,H.jsx)(bT,{})})})]})]})}),(0,H.jsx)(Ww,{children:Q.of(e.parts).sortBy(e=>e.part).map((t,n)=>(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(tW,{part:t.part,size:25})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(q,{variant:`body2`,component:`span`,sx:{display:`block`},children:t.part})})]})}),(0,H.jsx)(Z,{align:`right`,children:t.parts_completed}),e.machineQuantities.keysToAscLazySeq().map(e=>(0,H.jsx)(Z,{align:`right`,children:HW.format(t.machine.get(e)??0)},e)),(0,H.jsx)(Z,{align:`right`,children:HW.format(t.labor)}),(0,H.jsx)(Z,{align:`right`,children:HW.format(t.automation)}),(0,H.jsx)(Z,{align:`right`,children:HW.format(t.machine.valuesToAscLazySeq().sumBy(e=>e)+t.labor+t.automation)})]},n))})]})}var KW=(0,L.memo)(function(){return YI(`Cost Per Piece`),(0,H.jsx)(J,{component:`main`,sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`20px`},children:(0,H.jsxs)(uw,{direction:`column`,spacing:4,children:[(0,H.jsxs)(uw,{direction:`column`,spacing:2,children:[(0,H.jsx)(zW,{}),(0,H.jsx)(RW,{}),(0,H.jsx)(VW,{})]}),(0,H.jsx)(GW,{})]})})}),qW=[{type:`Subheader`,caption:`Shop Floor`},{type:`Link`,route:{route:$.Station_LoadMonitor,loadNum:1,queues:[],completed:!1},icon:(0,H.jsx)(bre,{}),label:`Load Station`},{type:`Link`,route:{route:$.Station_Queues,queues:[]},icon:(0,H.jsx)(gT,{}),label:`Queue Management`},{type:`Link`,route:{route:$.Station_InspectionMonitor},icon:(0,H.jsx)(Ore,{}),label:`Inspection Stand`},{type:`Link`,route:{route:$.Station_Closeout},icon:(0,H.jsx)(kT,{}),label:`Close Out`},{type:`Link`,route:{route:$.Tools_Dashboard},icon:(0,H.jsx)(sT,{}),label:`Tool Management`},{type:`Link`,route:{route:$.Station_Overview},icon:(0,H.jsx)(pre,{}),label:`System Overview`},{type:`Subheader`,caption:`Daily Monitoring`},{type:`Link`,route:{route:$.Operations_Dashboard},icon:(0,H.jsx)(FT,{}),label:`Operation Management`},{type:`Link`,route:{route:$.Engineering_Cycles},icon:(0,H.jsx)(ET,{}),label:`Engineering`},{type:`Link`,route:{route:$.Quality_Dashboard},icon:(0,H.jsx)(RT,{}),label:`Quality Analysis`},{type:`Link`,route:{route:$.Sales_Dashboard},icon:(0,H.jsx)(jre,{}),label:`Sales`},{type:`Subheader`,caption:`Monthly Review`},{type:`Link`,route:{route:$.Analysis_Buffers},icon:(0,H.jsx)(kre,{}),label:`Flexibility Analysis`}];function JW(e){let t=(0,H.jsx)(Qp,{children:(0,H.jsx)(Vb,{component:`nav`,dense:!0,children:(e.modes??qW).map((t,n)=>t.type===`Subheader`?(0,H.jsx)(b_,{children:t.caption},n):(0,H.jsx)(tx,{children:(0,H.jsxs)(Kb,{onClick:()=>e.setRoute(t.route),children:[(0,H.jsx)(ox,{children:t.icon}),(0,H.jsx)(dx,{children:t.label})]})},n))})});return(0,H.jsx)(`main`,{style:{display:`flex`,justifyContent:`center`},children:(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,H.jsx)(q,{variant:`h4`,style:{marginTop:`2em`},children:`Select user and computer location`}),(0,H.jsxs)(q,{variant:`caption`,style:{marginBottom:`2em`,maxWidth:`30em`,marginLeft:`auto`,marginRight:`auto`},children:[`We recommend that after selecting one of the following modes, you bookmark the page and visit it directly.`,(0,H.jsx)(`a`,{href:`https://fms-insight.seedtactics.com/docs/client-dashboard.html`,children:`Learn More`})]})]}),t]})})}var YW=[[`All`,`*`,`*`,` `,0,`All`],[`AllReadable`,`*`,`r`,` `,0,`All Readable`],[`AllCreatable`,`*`,`w`,` `,0,`All Creatable`],[`AllLinear`,`*`,`l`,` `,0,`All Linear`],[`AllMatrix`,`*`,`m`,` `,0,`All Matrix`],[`AllGS1`,`*`,`G`,` `,0,`All GS1`],[`AllRetail`,`*`,`R`,` `,0,`All Retail`],[`AllIndustrial`,`*`,`I`,` `,0,`All Industrial`],[`Codabar`,`F`,` `,`lrw `,18,`Codabar`],[`Code39`,`A`,` `,`lrw I`,8,`Code 39`],[`Code39Std`,`A`,`s`,`lrw I`,8,`Code 39 Standard`],[`Code39Ext`,`A`,`e`,`lr I`,9,`Code 39 Extended`],[`Code32`,`A`,`2`,`lr I`,129,`Code 32`],[`PZN`,`A`,`p`,`lr I`,52,`Pharmazentralnummer`],[`Code93`,`G`,` `,`lrw I`,25,`Code 93`],[`Code128`,`C`,` `,`lrwGI`,20,`Code 128`],[`ITF`,`I`,` `,`lrw I`,3,`ITF`],[`ITF14`,`I`,`4`,`lr I`,89,`ITF-14`],[`DataBar`,`e`,` `,`lr GR`,29,`DataBar`],[`DataBarOmni`,`e`,`o`,`lr GR`,29,`DataBar Omni`],[`DataBarStk`,`e`,`s`,`lr GR`,79,`DataBar Stacked`],[`DataBarStkOmni`,`e`,`O`,`lr GR`,80,`DataBar Stacked Omni`],[`DataBarLtd`,`e`,`l`,`lr GR`,30,`DataBar Limited`],[`DataBarExp`,`e`,`e`,`lr GR`,31,`DataBar Expanded`],[`DataBarExpStk`,`e`,`E`,`lr GR`,81,`DataBar Expanded Stacked`],[`EANUPC`,`E`,` `,`lr R`,15,`EAN/UPC`],[`EAN13`,`E`,`1`,`lrw R`,15,`EAN-13`],[`EAN8`,`E`,`8`,`lrw R`,10,`EAN-8`],[`EAN5`,`E`,`5`,`l R`,12,`EAN-5`],[`EAN2`,`E`,`2`,`l R`,11,`EAN-2`],[`ISBN`,`E`,`i`,`lr R`,69,`ISBN`],[`UPCA`,`E`,`a`,`lrw R`,34,`UPC-A`],[`UPCE`,`E`,`e`,`lrw R`,37,`UPC-E`],[`Telepen`,`B`,` `,`lr I`,32,`Telepen`],[`TelepenAlpha`,`B`,`0`,`lr I`,32,`Telepen Alpha`],[`TelepenNumeric`,`B`,`1`,`lr I`,87,`Telepen Numeric`],[`OtherBarcode`,`X`,` `,` r `,0,`Other barcode`],[`DXFilmEdge`,`X`,`x`,`lr `,147,`DX Film Edge`],[`PDF417`,`L`,` `,`mrw `,55,`PDF417`],[`CompactPDF417`,`L`,`c`,`mr `,56,`Compact PDF417`],[`MicroPDF417`,`L`,`m`,`mr `,84,`MicroPDF417`],[`Aztec`,`z`,` `,`mr G `,92,`Aztec`],[`AztecCode`,`z`,`c`,`mrwG `,92,`Aztec Code`],[`AztecRune`,`z`,`r`,`mr `,128,`Aztec Rune`],[`QRCode`,`Q`,` `,`mrwG `,58,`QR Code`],[`QRCodeModel1`,`Q`,`1`,`mr `,0,`QR Code Model 1`],[`QRCodeModel2`,`Q`,`2`,`mr `,58,`QR Code Model 2`],[`MicroQRCode`,`Q`,`m`,`mr `,97,`Micro QR Code`],[`RMQRCode`,`Q`,`r`,`mr G `,145,`rMQR Code`],[`DataMatrix`,`d`,` `,`mrwG `,71,`Data Matrix`],[`MaxiCode`,`U`,` `,`mr `,57,`MaxiCode`]],XW={DataBarExpanded:`DataBarExp`,DataBarLimited:`DataBarLtd`,"Linear-Codes":`AllLinear`,"Matrix-Codes":`AllMatrix`,Any:`All`,rMQRCode:`RMQRCode`};YW.map(e=>e[5]),YW.filter(e=>e[1]===`*`).map(e=>e[0]),YW.filter(e=>e[1]!==`*`).map(e=>e[0]),YW.filter(e=>e[2]===` `).map(e=>e[0]),YW.filter(e=>e[3][0]===`l`).map(e=>e[0]),YW.filter(e=>e[3][0]===`m`).map(e=>e[0]),YW.filter(e=>e[3][1]===`r`).map(e=>e[0]),YW.filter(e=>e[3][2]===`w`||e[4]!==0).map(e=>e[0]),YW.filter(e=>e[3][3]===`G`).map(e=>e[0]),YW.filter(e=>e[3][4]===`R`).map(e=>e[0]),YW.filter(e=>e[3][4]===`I`).map(e=>e[0]);function ZW(e){return XW[e]??e}function QW(e){return e.map(ZW).join(`,`)}var $W=[`LocalAverage`,`GlobalHistogram`,`FixedThreshold`,`BoolCast`];function eG(e){return $W.indexOf(e)}var tG=`Unknown.ASCII.ISO8859_1.ISO8859_2.ISO8859_3.ISO8859_4.ISO8859_5.ISO8859_6.ISO8859_7.ISO8859_8.ISO8859_9.ISO8859_10.ISO8859_11.ISO8859_13.ISO8859_14.ISO8859_15.ISO8859_16.Cp437.Cp1250.Cp1251.Cp1252.Cp1256.Shift_JIS.Big5.GB2312.GB18030.EUC_JP.EUC_KR.UTF16BE.UTF8.UTF16LE.UTF32BE.UTF32LE.BINARY`.split(`.`);function nG(e){return e===`UnicodeBig`?tG.indexOf(`UTF16BE`):tG.indexOf(e)}var rG=[`Text`,`Binary`,`Mixed`,`GS1`,`ISO15434`,`UnknownECI`];function iG(e){return rG[e]}var aG=[`Ignore`,`Read`,`Require`];function oG(e){return aG.indexOf(e)}var sG=[`Plain`,`ECI`,`HRI`,`Escaped`,`Hex`,`HexECI`];function cG(e){return sG.indexOf(e)}var lG={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:`LocalAverage`,isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,validateOptionalChecksum:!1,returnErrors:!1,eanAddOnSymbol:`Ignore`,textMode:`HRI`,characterSet:`Unknown`,tryCode39ExtendedMode:!0};function uG(e){var t;return{...e,formats:QW(e.formats),binarizer:eG(e.binarizer),eanAddOnSymbol:oG(e.eanAddOnSymbol),textMode:cG(e.textMode),characterSet:nG(e.characterSet),tryCode39ExtendedMode:(t=e.tryCode39ExtendedMode)==null||t}}function dG(e){return{...e,format:e.format,symbology:e.symbology,contentType:iG(e.contentType)}}var fG={format:`QRCode`,readerInit:!1,forceSquareDataMatrix:!1,ecLevel:``,scale:1,sizeHint:0,rotate:0,invert:!1,withHRT:!1,withQuietZones:!0,addHRT:!1,addQuietZones:!0,options:``},pG={locateFile:(e,t)=>{let n=e.match(/_(.+?)\.wasm$/);return n?`https://fastly.jsdelivr.net/npm/zxing-wasm@3.1.3/dist/${n[1]}/${e}`:t+e}},mG=new WeakMap;function hG(e,t){return Object.is(e,t)||Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>Object.hasOwn(t,n)&&e[n]===t[n])}function gG(e,{overrides:t,equalityFn:n=hG,fireImmediately:r=!1}={}){let[i,a]=mG.get(e)??[pG],o=t??i,s;if(r){if(a&&(s=n(i,o)))return a;let t=e({...o});return mG.set(e,[o,t]),t}(s??n(i,o))||mG.set(e,[o])}function _G(e){let t=e.byteLength>>2,n=new Uint8Array(t);for(let r=0;r<t;r++){let t=r<<2;n[r]=306*e[t]+601*e[t+1]+117*e[t+2]+512>>10}return n}async function vG(e,t,n=lG){let r={...lG,...n},i=await gG(e,{fireImmediately:!0}),a,o;if(`width`in t&&`height`in t&&`data`in t){let{data:e,width:n,height:s}=t,c=_G(e),l=c.byteLength;if(o=i._malloc(l),!o)throw Error(`Failed to allocate ${l} bytes in WASM memory`);try{i.HEAPU8.set(c,o),a=i.readBarcodesFromPixmap(o,n,s,uG(r))}finally{i._free(o)}}else{let e,n;if(`buffer`in t)[e,n]=[t.byteLength,t];else if(`byteLength`in t)[e,n]=[t.byteLength,new Uint8Array(t)];else if(`size`in t)[e,n]=[t.size,new Uint8Array(await t.arrayBuffer())];else throw TypeError(`Invalid input type`);if(o=i._malloc(e),!o)throw Error(`Failed to allocate ${e} bytes in WASM memory`);try{i.HEAPU8.set(n,o),a=i.readBarcodesFromImage(o,e,uG(r))}finally{i._free(o)}}let s=[];for(let e=0;e<a.size();++e)s.push(dG(a.get(e)));return s}({...lG}),[...lG.formats],{...fG};async function yG(e={}){var t,n,r,i=e,a=!!globalThis.window,o=typeof Bun<`u`,s=!!globalThis.WorkerGlobalScope;(n=globalThis.process)!=null&&(n=n.versions)!=null&&n.node&&((r=globalThis.process)==null||r.type);var c=`./this.program`,l,u=``;function d(e){return i.locateFile?i.locateFile(e,u):u+e}var f,p;if(a||s||o){try{u=new URL(`.`,l).href}catch{}s&&(p=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),f=async e=>{var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)}}console.log.bind(console);var m=console.error.bind(console),h,g=!1,_,v,y=!1;function b(){var e=tr.buffer;ne=new Int8Array(e),j=new Int16Array(e),i.HEAPU8=oe=new Uint8Array(e),ae=new Uint16Array(e),M=new Int32Array(e),N=new Uint32Array(e),re=new Float32Array(e),ie=new Float64Array(e)}function x(){if(i.preRun)for(typeof i.preRun==`function`&&(i.preRun=[i.preRun]);i.preRun.length;)ue(i.preRun.shift());se(le)}function S(){y=!0,Gr.za()}function C(){if(i.postRun)for(typeof i.postRun==`function`&&(i.postRun=[i.postRun]);i.postRun.length;)P(i.postRun.shift());se(ce)}function w(e){var t,n;(t=i.onAbort)==null||t.call(i,e),e=`Aborted(`+e+`)`,m(e),g=!0,e+=`. Build with -sASSERTIONS for more info.`;var r=new WebAssembly.RuntimeError(e);throw(n=v)==null||n(r),r}var T;function E(){return d(`zxing_reader.wasm`)}function D(e){if(e==T&&h)return new Uint8Array(h);if(p)return p(e);throw`both async and sync fetching of the wasm failed`}async function O(e){if(!h)try{var t=await f(e);return new Uint8Array(t)}catch{}return D(e)}async function ee(e,t){try{var n=await O(e);return await WebAssembly.instantiate(n,t)}catch(e){m(`failed to asynchronously prepare wasm: ${e}`),w(e)}}async function te(e,t,n){if(!e&&WebAssembly.instantiateStreaming)try{var r=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(r,n)}catch(e){m(`wasm streaming compile failed: ${e}`),m(`falling back to ArrayBuffer instantiation`)}return ee(t,n)}function k(){return{a:ir}}async function A(){function e(e,t){return Gr=e.exports,rr(Gr),b(),Gr}function t(t){return e(t.instance)}var n=k();return i.instantiateWasm?new Promise((t,r)=>{i.instantiateWasm(n,(n,r)=>{t(e(n,r))})}):(T??=E(),t(await te(h,T,n)))}var j,M,ne,re,ie,ae,N,oe,se=e=>{for(;e.length>0;)e.shift()(i)},ce=[],P=e=>ce.push(e),le=[],ue=e=>le.push(e),F=e=>qn(e),I=()=>Jn(),de=[],fe=0,pe=e=>{var t=new he(e);return t.get_caught()||(t.set_caught(!0),fe--),t.set_rethrown(!1),de.push(t),Wn(e)},L=0,me=()=>{Gn(0,0);var e=de.pop();Yn(e.excPtr),L=0};class he{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){N[this.ptr+4>>2]=e}get_type(){return N[this.ptr+4>>2]}set_destructor(e){N[this.ptr+8>>2]=e}get_destructor(){return N[this.ptr+8>>2]}set_caught(e){e=+!!e,ne[this.ptr+12]=e}get_caught(){return ne[this.ptr+12]!=0}set_rethrown(e){e=+!!e,ne[this.ptr+13]=e}get_rethrown(){return ne[this.ptr+13]!=0}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){N[this.ptr+16>>2]=e}get_adjusted_ptr(){return N[this.ptr+16>>2]}}var ge=e=>Kn(e),_e=e=>{var t=L;if(!t)return ge(0),0;var n=new he(t);n.set_adjusted_ptr(t);var r=n.get_type();if(!r)return ge(0),t;for(var i of e){if(i===0||i===r)break;var a=n.ptr+16;if(Zn(i,r,a))return ge(i),t}return ge(r),t},ve=()=>_e([]),ye=e=>_e([e]),be=(e,t)=>_e([e,t]),xe=()=>{var e=de.pop();e||w(`no exception to throw`);var t=e.excPtr;throw e.get_rethrown()||(de.push(e),e.set_rethrown(!0),e.set_caught(!1),fe++),Xn(t),L=t,L},R=(e,t,n)=>{throw new he(e).init(t,n),Xn(e),L=e,fe++,L},z=()=>fe,B=e=>{throw L||=e,L},Se=()=>w(``),Ce={},we=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Te(e){return this.fromWireType(N[e>>2])}var Ee={},De={},Oe={},ke=class extends Error{constructor(e){super(e),this.name=`InternalError`}},Ae=e=>{throw new ke(e)},V=(e,t,n)=>{e.forEach(e=>Oe[e]=t);function r(t){var r=n(t);r.length!==e.length&&Ae(`Mismatched type converter count`);for(var i=0;i<e.length;++i)Le(e[i],r[i])}var i=Array(t.length),a=[],o=0;{let e=t;for(let t=0;t<e.length;++t){let n=e[t];De.hasOwnProperty(n)?i[t]=De[n]:(a.push(n),Ee.hasOwnProperty(n)||(Ee[n]=[]),Ee[n].push(()=>{i[t]=De[n],++o,o===a.length&&r(i)}))}}a.length===0&&r(i)},je=e=>{var t=Ce[e];delete Ce[e];var n=t.rawConstructor,r=t.rawDestructor,i=t.fields,a=i.map(e=>e.getterReturnType).concat(i.map(e=>e.setterArgumentType));V([e],a,e=>{var a={};{let t=i;for(let n=0;n<t.length;++n){let r=t[n],o=e[n],s=r.getter,c=r.getterContext,l=e[n+i.length],u=r.setter,d=r.setterContext;a[r.fieldName]={read:e=>o.fromWireType(s(c,e)),write:(e,t)=>{var n=[];u(d,e,l.toWireType(n,t)),we(n)},optional:o.optional}}}return[{name:t.name,fromWireType:e=>{var t={};for(var n in a)t[n]=a[n].read(e);return r(e),t},toWireType:(e,t)=>{for(var i in a)if(!(i in t)&&!a[i].optional)throw TypeError(`Missing field: "${i}"`);var o=n();for(i in a)a[i].write(o,t[i]);return e!==null&&e.push(r,o),o},readValueFromPointer:Te,destructorFunction:r}]})},Me=(e,t,n,r,i)=>{},Ne=e=>{for(var t=``;;){var n=oe[e++];if(!n)return t;t+=String.fromCharCode(n)}},Pe=class extends Error{constructor(e){super(e),this.name=`BindingError`}},Fe=e=>{throw new Pe(e)};function Ie(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r=t.name;if(e||Fe(`type "${r}" must have a positive integer typeid pointer`),De.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;Fe(`Cannot register type '${r}' twice`)}if(De[e]=t,delete Oe[e],Ee.hasOwnProperty(e)){var i=Ee[e];delete Ee[e],i.forEach(e=>e())}}function Le(e,t){return Ie(e,t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{})}var Re=(e,t,n,r)=>{t=Ne(t),Le(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},readValueFromPointer:function(e){return this.fromWireType(oe[e])},destructorFunction:null})},ze=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Be=e=>{function t(e){return e.$$.ptrType.registeredClass.name}Fe(t(e)+` instance already deleted`)},Ve=!1,He=e=>{},Ue=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},We=e=>{--e.count.value,e.count.value===0&&Ue(e)},Ge=e=>globalThis.FinalizationRegistry?(Ve=new FinalizationRegistry(e=>{We(e.$$)}),Ge=e=>{var t=e.$$;if(t.smartPtr){var n={$$:t};Ve.register(e,n,e)}return e},He=e=>Ve.unregister(e),Ge(e)):(Ge=e=>e,e),Ke=[],qe=()=>{for(;Ke.length;){var e=Ke.pop();e.$$.deleteScheduled=!1,e.delete()}},Je,Ye=()=>{let e=Xe.prototype;Object.assign(e,{isAliasOf(e){if(!(this instanceof Xe)||!(e instanceof Xe))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var r=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;r.baseClass;)i=r.upcast(i),r=r.baseClass;return t===r&&n===i},clone(){if(this.$$.ptr||Be(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Ge(Object.create(Object.getPrototypeOf(this),{$$:{value:ze(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Be(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Fe(`Object already scheduled for deletion`),He(this),We(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Be(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Fe(`Object already scheduled for deletion`),Ke.push(this),Ke.length===1&&Je&&Je(qe),this.$$.deleteScheduled=!0,this}});let t=Symbol.dispose;t&&(e[t]=e.delete)};function Xe(){}var Ze=(e,t)=>Object.defineProperty(t,"name",{value:e}),Qe={},$e=(e,t,n)=>{if(e[t].overloadTable===void 0){var r=e[t];e[t]=function(){var r=[...arguments];return e[t].overloadTable.hasOwnProperty(r.length)||Fe(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[r.length].apply(this,r)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}},et=(e,t,n)=>{i.hasOwnProperty(e)?((n===void 0||i[e].overloadTable!==void 0&&i[e].overloadTable[n]!==void 0)&&Fe(`Cannot register public name '${e}' twice`),$e(i,e,e),i[e].overloadTable.hasOwnProperty(n)&&Fe(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),i[e].overloadTable[n]=t):(i[e]=t,i[e].argCount=n)},tt=48,nt=57,rt=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,`$`);var t=e.charCodeAt(0);return t>=tt&&t<=nt?`_${e}`:e};function it(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=r,this.baseClass=i,this.getActualType=a,this.upcast=o,this.downcast=s,this.pureVirtualFunctions=[]}var at=(e,t,n)=>{for(;t!==n;)t.upcast||Fe(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e},ot=e=>{if(e===null)return`null`;var t=typeof e;return t===`object`||t===`array`||t===`function`?e.toString():``+e};function st(e,t){if(t===null)return this.isReference&&Fe(`null is not a valid ${this.name}`),0;t.$$||Fe(`Cannot pass "${ot(t)}" as a ${this.name}`),t.$$.ptr||Fe(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass;return at(t.$$.ptr,n,this.registeredClass)}function ct(e,t){var n;if(t===null)return this.isReference&&Fe(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;(!t||!t.$$)&&Fe(`Cannot pass "${ot(t)}" as a ${this.name}`),t.$$.ptr||Fe(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&Fe(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;if(n=at(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&Fe(`Passing raw pointer to smart pointer is illegal`),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:Fe(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var i=t.clone();n=this.rawShare(n,zt.toHandle(()=>i.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:Fe(`Unsupported sharing policy`)}return n}function lt(e,t){if(t===null)return this.isReference&&Fe(`null is not a valid ${this.name}`),0;t.$$||Fe(`Cannot pass "${ot(t)}" as a ${this.name}`),t.$$.ptr||Fe(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&Fe(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;return at(t.$$.ptr,n,this.registeredClass)}var ut=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var r=ut(e,t,n.baseClass);return r===null?null:n.downcast(r)},dt={},ft=(e,t)=>{for(t===void 0&&Fe(`ptr should not be undefined`);e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},pt=(e,t)=>(t=ft(e,t),dt[t]),mt=(e,t)=>((!t.ptrType||!t.ptr)&&Ae(`makeClassHandle requires ptr and ptrType`),!!t.smartPtrType!=!!t.smartPtr&&Ae(`Both smartPtrType and smartPtr must be specified`),t.count={value:1},Ge(Object.create(e,{$$:{value:t,writable:!0}})));function ht(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=pt(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var r=n.clone();return this.destructor(e),r}function i(){return this.isSmartPointer?mt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):mt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a=Qe[this.registeredClass.getActualType(t)];if(!a)return i.call(this);var o=this.isConst?a.constPointerType:a.pointerType,s=ut(t,this.registeredClass,o.registeredClass);return s===null?i.call(this):this.isSmartPointer?mt(o.registeredClass.instancePrototype,{ptrType:o,ptr:s,smartPtrType:this,smartPtr:e}):mt(o.registeredClass.instancePrototype,{ptrType:o,ptr:s})}var gt=()=>{Object.assign(_t.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)==null||t.call(this,e)},readValueFromPointer:Te,fromWireType:ht})};function _t(e,t,n,r,i,a,o,s,c,l,u){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=r,this.isSmartPointer=i,this.pointeeType=a,this.sharingPolicy=o,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=l,this.rawDestructor=u,!i&&t.baseClass===void 0?r?(this.toWireType=st,this.destructorFunction=null):(this.toWireType=lt,this.destructorFunction=null):this.toWireType=ct}var vt=(e,t,n)=>{i.hasOwnProperty(e)||Ae(`Replacing nonexistent public symbol`),i[e].overloadTable!==void 0&&n!==void 0?i[e].overloadTable[n]=t:(i[e]=t,i[e].argCount=n)},yt={},bt=(e,t,n)=>{e=e.replace(/p/g,`i`);var r=yt[e];return r(t,...n)},xt=[],St=e=>{var t=xt[e];return t||(xt[e]=t=nr.get(e)),t},Ct=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(arguments.length>3&&arguments[3]!==void 0&&arguments[3],e.includes(`j`))return bt(e,t,n);var r=St(t)(...n);function i(e){return e}return i(r)},wt=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return function(){return Ct(e,t,[...arguments],n)}},Tt=function(e,t){arguments.length>2&&arguments[2]!==void 0&&arguments[2],e=Ne(e);function n(){return e.includes(`j`)?wt(e,t):St(t)}var r=n();return typeof r!=`function`&&Fe(`unknown function pointer with signature ${e}: ${t}`),r};class Et extends Error{}var Dt=e=>{var t=Vn(e),n=Ne(t);return Hn(t),n},Ot=(e,t)=>{var n=[],r={};function i(e){if(!r[e]&&!De[e]){if(Oe[e]){Oe[e].forEach(i);return}n.push(e),r[e]=!0}}throw t.forEach(i),new Et(`${e}: `+n.map(Dt).join([`, `]))},kt=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{u=Ne(u),a=Tt(i,a),s&&=Tt(o,s),l&&=Tt(c,l),f=Tt(d,f);var p=rt(u);et(p,function(){Ot(`Cannot construct ${u} due to unbound types`,[r])}),V([e,t,n],r?[r]:[],t=>{t=t[0];var n,i;r?(n=t.registeredClass,i=n.instancePrototype):i=Xe.prototype;var o=Ze(u,function(){if(Object.getPrototypeOf(this)!==c)throw new Pe(`Use 'new' to construct ${u}`);if(d.constructor_body===void 0)throw new Pe(`${u} has no accessible constructor`);var e=[...arguments],t=d.constructor_body[e.length];if(t===void 0)throw new Pe(`Tried to invoke ctor of ${u} with invalid number of parameters (${e.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return t.apply(this,e)}),c=Object.create(i,{constructor:{value:o}});o.prototype=c;var d=new it(u,o,c,f,n,a,s,l);if(d.baseClass){var m;(m=d.baseClass).__derivedClasses??(m.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d)}var h=new _t(u,d,!0,!1,!1),g=new _t(u+`*`,d,!1,!1,!1),_=new _t(u+` const*`,d,!1,!0,!1);return Qe[e]={pointerType:g,constPointerType:_},vt(p,o),[h,g,_]})},At=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(N[t+r*4>>2]);return n};function jt(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function Mt(e,t,n,r,i,a){var o=t.length;o<2&&Fe(`argTypes array size mismatch! Must at least get return value and 'this' types!`);var s=t[1]!==null&&n!==null,c=jt(t),l=!t[0].isVoid,u=o-2,d=Array(u),f=[],p=[];return Ze(e,function(){p.length=0;var e;f.length=s?2:1,f[0]=i,s&&(e=t[1].toWireType(p,this),f[1]=e);for(var n=0;n<u;++n)d[n]=t[n+2].toWireType(p,n<0||arguments.length<=n?void 0:arguments[n]),f.push(d[n]);var a=r(...f);function o(n){if(c)we(p);else for(var r=s?1:2;r<t.length;r++){var i=r===1?e:d[r-2];t[r].destructorFunction!==null&&t[r].destructorFunction(i)}if(l)return t[0].fromWireType(n)}return o(a)})}var Nt=(e,t,n,r,i,a)=>{var o=At(t,n);i=Tt(r,i),V([],[e],e=>{e=e[0];var n=`constructor ${e.name}`;if(e.registeredClass.constructor_body===void 0&&(e.registeredClass.constructor_body=[]),e.registeredClass.constructor_body[t-1]!==void 0)throw new Pe(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Ot(`Cannot construct ${e.name} due to unbound types`,o)},V([],o,r=>(r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Mt(n,r,null,i,a),[])),[]})},Pt=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.slice(0,t)},Ft=(e,t,n,r,i,a,o,s,c,l)=>{var u=At(n,r);t=Ne(t),t=Pt(t),a=Tt(i,a,c),V([],[e],e=>{e=e[0];var r=`${e.name}.${t}`;t.startsWith(`@@`)&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);function i(){Ot(`Cannot call ${r} due to unbound types`,u)}var l=e.registeredClass.instancePrototype,d=l[t];return d===void 0||d.overloadTable===void 0&&d.className!==e.name&&d.argCount===n-2?(i.argCount=n-2,i.className=e.name,l[t]=i):($e(l,t,r),l[t].overloadTable[n-2]=i),V([],u,i=>{var s=Mt(r,i,e,a,o,c);return l[t].overloadTable===void 0?(s.argCount=n-2,l[t]=s):l[t].overloadTable[n-2]=s,[]}),[]})},It=[],Lt=[0,1,,1,null,1,!0,1,!1,1],Rt=e=>{e>9&&--Lt[e+1]===0&&(Lt[e]=void 0,It.push(e))},zt={toValue:e=>(e||Fe(`Cannot use deleted val. handle = ${e}`),Lt[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let t=It.pop()||Lt.length;return Lt[t]=e,Lt[t+1]=1,t}}}},Bt={name:`emscripten::val`,fromWireType:e=>{var t=zt.toValue(e);return Rt(e),t},toWireType:(e,t)=>zt.toHandle(t),readValueFromPointer:Te,destructorFunction:null},Vt=e=>Le(e,Bt),Ht=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(re[e>>2])};case 8:return function(e){return this.fromWireType(ie[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},Ut=(e,t,n)=>{t=Ne(t),Le(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:Ht(t,n),destructorFunction:null})},Wt=(e,t,n,r,i,a,o,s)=>{var c=At(t,n);e=Ne(e),e=Pt(e),i=Tt(r,i,o),et(e,function(){Ot(`Cannot call ${e} due to unbound types`,c)},t-1),V([],c,n=>{var r=[n[0],null].concat(n.slice(1));return vt(e,Mt(e,r,null,i,a,o),t-1),[]})},Gt=(e,t,n)=>{switch(t){case 1:return n?e=>ne[e]:e=>oe[e];case 2:return n?e=>j[e>>1]:e=>ae[e>>1];case 4:return n?e=>M[e>>2]:e=>N[e>>2];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},Kt=(e,t,n,r,i)=>{t=Ne(t);let a=r===0,o=e=>e;if(a){var s=32-8*n;o=e=>e<<s>>>s,i=o(i)}Le(e,{name:t,fromWireType:o,toWireType:(e,t)=>t,readValueFromPointer:Gt(t,n,r!==0),destructorFunction:null})},qt=(e,t,n)=>{let r=(e,t)=>{let n=0;return{next(){if(n>=e)return{done:!0};let r=n;return n++,{value:t(r),done:!1}},[Symbol.iterator](){return this}}};e[Symbol.iterator]||(e[Symbol.iterator]=function(){let e=this[t]();return r(e,e=>this[n](e))})},Jt=(e,t,n,r)=>{n=Ne(n),r=Ne(r),V([],[e,t],e=>{let t=e[0];return qt(t.registeredClass.instancePrototype,n,r),[]})},Yt=(e,t,n)=>{var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=N[e>>2],n=N[e+4>>2];return new r(ne.buffer,n,t)}n=Ne(n),Le(e,{name:n,fromWireType:i,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},Xt=Object.assign({optional:!0},Bt),Zt=(e,t)=>{Le(e,Xt)},Qt=(e,t,n,r)=>{if(!(r>0))return 0;for(var i=n,a=n+r-1,o=0;o<e.length;++o){var s=e.codePointAt(o);if(s<=127){if(n>=a)break;t[n++]=s}else if(s<=2047){if(n+1>=a)break;t[n++]=192|s>>6,t[n++]=128|s&63}else if(s<=65535){if(n+2>=a)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|s&63}else{if(n+3>=a)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|s&63,o++}}return t[n]=0,n-i},$t=(e,t,n)=>Qt(e,oe,t,n),en=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++n):t+=3}return t},tn=globalThis.TextDecoder&&new TextDecoder,nn=(e,t,n,r)=>{var i=t+n;if(r)return i;for(;e[t]&&!(t>=i);)++t;return t},rn=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;var i=nn(e,t,n,r);if(i-t>16&&e.buffer&&tn)return tn.decode(e.subarray(t,i));for(var a=``;t<i;){var o=e[t++];if(!(o&128)){a+=String.fromCharCode(o);continue}var s=e[t++]&63;if((o&224)==192){a+=String.fromCharCode((o&31)<<6|s);continue}var c=e[t++]&63;if(o=(o&240)==224?(o&15)<<12|s<<6|c:(o&7)<<18|s<<12|c<<6|e[t++]&63,o<65536)a+=String.fromCharCode(o);else{var l=o-65536;a+=String.fromCharCode(55296|l>>10,56320|l&1023)}}return a},an=(e,t,n)=>e?rn(oe,e,t,n):``,on=(e,t)=>{t=Ne(t);var n=!0;Le(e,{name:t,fromWireType(e){var t=N[e>>2],r=e+4,i;if(n)i=an(r,t,!0);else{i=``;for(var a=0;a<t;++a)i+=String.fromCharCode(oe[r+a])}return Hn(e),i},toWireType(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r,i=typeof t==`string`;i||ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT==1||Fe(`Cannot pass non-string to std::string`),r=n&&i?en(t):t.length;var a=Un(4+r+1),o=a+4;if(N[a>>2]=r,i){if(n)$t(t,o,r+1);else for(var s=0;s<r;++s){var c=t.charCodeAt(s);c>255&&(Hn(a),Fe(`String has UTF-16 code units that do not fit in 8 bits`)),oe[o+s]=c}}else oe.set(t,o);return e!==null&&e.push(Hn,a),a},readValueFromPointer:Te,destructorFunction(e){Hn(e)}})},sn=globalThis.TextDecoder?new TextDecoder(`utf-16le`):void 0,cn=(e,t,n)=>{var r=e>>1,i=nn(ae,r,t/2,n);if(i-r>16&&sn)return sn.decode(ae.subarray(r,i));for(var a=``,o=r;o<i;++o){var s=ae[o];a+=String.fromCharCode(s)}return a},ln=(e,t,n)=>{if(n??=2147483647,n<2)return 0;n-=2;for(var r=t,i=n<e.length*2?n/2:e.length,a=0;a<i;++a){var o=e.charCodeAt(a);j[t>>1]=o,t+=2}return j[t>>1]=0,t-r},un=e=>e.length*2,dn=(e,t,n)=>{for(var r=``,i=e>>2,a=0;!(a>=t/4);a++){var o=N[i+a];if(!o&&!n)break;r+=String.fromCodePoint(o)}return r},fn=(e,t,n)=>{if(n??=2147483647,n<4)return 0;for(var r=t,i=r+n-4,a=0;a<e.length;++a){var o=e.codePointAt(a);if(o>65535&&a++,M[t>>2]=o,t+=4,t+4>i)break}return M[t>>2]=0,t-r},pn=e=>{for(var t=0,n=0;n<e.length;++n)e.codePointAt(n)>65535&&n++,t+=4;return t},mn=(e,t,n)=>{n=Ne(n);var r,i,a;t===2?(r=cn,i=ln,a=un):(r=dn,i=fn,a=pn),Le(e,{name:n,fromWireType:e=>{var n=N[e>>2],i=r(e+4,n*t,!0);return Hn(e),i},toWireType:(e,r)=>{typeof r!=`string`&&Fe(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=Un(4+o+t);return N[s>>2]=o/t,i(r,s+4,o+t),e!==null&&e.push(Hn,s),s},readValueFromPointer:Te,destructorFunction(e){Hn(e)}})},hn=(e,t,n,r,i,a)=>{Ce[e]={name:Ne(t),rawConstructor:Tt(n,r),rawDestructor:Tt(i,a),fields:[]}},gn=(e,t,n,r,i,a,o,s,c,l)=>{Ce[e].fields.push({fieldName:Ne(t),getterReturnType:n,getter:Tt(r,i),getterContext:a,setterArgumentType:o,setter:Tt(s,c),setterContext:l})},_n=(e,t)=>{t=Ne(t),Le(e,{isVoid:!0,name:t,fromWireType:()=>void 0,toWireType:(e,t)=>void 0})},vn=[],yn=e=>{var t=vn.length;return vn.push(e),t},bn=(e,t)=>{var n=De[e];return n===void 0&&Fe(`${t} has unknown type ${Dt(e)}`),n},xn=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=bn(N[t+r*4>>2],`parameter ${r}`);return n},Sn=(e,t,n)=>{var r=[],i=e(r,n);return r.length&&(N[t>>2]=zt.toHandle(r)),i},Cn={},wn=e=>{var t=Cn[e];return t===void 0?Ne(e):t},Tn=(e,t,n)=>{var[r,...i]=xn(e,t),a=r.toWireType.bind(r),o=i.map(e=>e.readValueFromPointer.bind(e));e--;var s=Array(e);return yn(Ze(`methodCaller<(${i.map(e=>e.name)}) => ${r.name}>`,(t,r,i,c)=>{for(var l=0,u=0;u<e;++u)s[u]=o[u](c+l),l+=8;var d;switch(n){case 0:d=zt.toValue(t).apply(null,s);break;case 2:d=Reflect.construct(zt.toValue(t),s);break;case 3:d=s[0];break;case 1:d=zt.toValue(t)[wn(r)](...s)}return Sn(a,i,d)}))},En=e=>e?(e=wn(e),zt.toHandle(globalThis[e])):zt.toHandle(globalThis),Dn=e=>{e>9&&(Lt[e+1]+=1)},On=(e,t,n,r,i)=>vn[e](t,n,r,i),kn=e=>{we(zt.toValue(e)),Rt(e)},An=(e,t,n,r)=>{var i=new Date().getFullYear(),a=new Date(i,0,1),o=new Date(i,6,1),s=a.getTimezoneOffset(),c=o.getTimezoneOffset(),l=Math.max(s,c);N[e>>2]=l*60,M[t>>2]=Number(s!=c);var u=e=>{var t=e>=0?`-`:`+`,n=Math.abs(e);return`UTC${t}${String(Math.floor(n/60)).padStart(2,`0`)}${String(n%60).padStart(2,`0`)}`},d=u(s),f=u(c);c<s?($t(d,n,17),$t(f,r,17)):($t(d,r,17),$t(f,n,17))},jn=()=>2147483648,Mn=(e,t)=>Math.ceil(e/t)*t,Nn=e=>{var t=(e-tr.buffer.byteLength+65535)/65536|0;try{return tr.grow(t),b(),1}catch{}},Pn=e=>{var t=oe.length;e>>>=0;var n=jn();if(e>n)return!1;for(var r=1;r<=4;r*=2){var i=t*(1+.2/r);if(i=Math.min(i,e+100663296),Nn(Math.min(n,Mn(Math.max(e,i),65536))))return!0}return!1},Fn={},In=()=>c||`./this.program`,Ln=()=>{if(!Ln.strings){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(globalThis.navigator?.language??`C`).replace(`-`,`_`)+`.UTF-8`,_:In()};for(var t in Fn)Fn[t]===void 0?delete e[t]:e[t]=Fn[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);Ln.strings=n}return Ln.strings},Rn=(e,t)=>{var n=0,r=0;for(var i of Ln()){var a=t+n;N[e+r>>2]=a,n+=$t(i,a,1/0)+1,r+=4}return 0},zn=(e,t)=>{var n=Ln();N[e>>2]=n.length;var r=0;for(var i of n)r+=en(i)+1;return N[t>>2]=r,0},Bn=e=>e;if(Ye(),gt(),i.noExitRuntime&&i.noExitRuntime,i.print&&i.print,i.printErr&&(m=i.printErr),i.wasmBinary&&(h=i.wasmBinary),i.arguments&&i.arguments,i.thisProgram&&(c=i.thisProgram),i.preInit)for(typeof i.preInit==`function`&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.shift()();var Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr,nr;function rr(e){Vn=e.Aa,Hn=i._free=e.Ba,Un=i._malloc=e.Da,Wn=e.Ea,Gn=e.Fa,Kn=e.Ga,qn=e.Ha,Jn=e.Ia,Yn=e.Ja,Xn=e.Ka,Zn=e.La,yt.viijii=e.Ma,Qn=yt.viijjijjjjjj=e.Na,$n=yt.iiijj=e.Oa,er=yt.jiiii=e.Pa,yt.iiiiij=e.Qa,yt.iiiiijj=e.Ra,yt.iiiiiijj=e.Sa,tr=e.ya,nr=e.Ca}var ir={q:pe,x:me,a:ve,i:ye,m:be,S:xe,p:R,fa:z,d:B,ba:Se,va:je,aa:Me,pa:Re,ta:kt,sa:Nt,H:Ft,na:Vt,X:Ut,Y:Wt,A:Kt,ra:Jt,u:Yt,ua:Zt,oa:on,T:mn,I:hn,wa:gn,qa:_n,O:Tn,xa:Rt,F:En,U:Dn,N:On,ia:kn,ca:An,ga:Pn,da:Rn,ea:zn,la:Tr,M:Or,B:Pr,P:fr,V:Lr,s:Rr,b:sr,C:Dr,ja:Mr,c:lr,Q:Nr,h:dr,j:vr,r:yr,R:Er,t:xr,G:Sr,D:Cr,K:zr,_:Hr,Z:Ur,f:pr,l:ar,ha:Fr,e:cr,W:kr,g:ur,L:Ir,k:or,ka:Ar,o:br,y:hr,v:wr,E:_r,w:jr,n:mr,J:Br,ma:gr,$:Vr,z:Bn};function ar(e,t){var n=I();try{St(e)(t)}catch(e){if(F(n),e!==e+0)throw e;Gn(1,0)}}function or(e,t,n,r,i){var a=I();try{St(e)(t,n,r,i)}catch(e){if(F(a),e!==e+0)throw e;Gn(1,0)}}function sr(e,t){var n=I();try{return St(e)(t)}catch(e){if(F(n),e!==e+0)throw e;Gn(1,0)}}function cr(e,t,n){var r=I();try{St(e)(t,n)}catch(e){if(F(r),e!==e+0)throw e;Gn(1,0)}}function lr(e,t,n){var r=I();try{return St(e)(t,n)}catch(e){if(F(r),e!==e+0)throw e;Gn(1,0)}}function ur(e,t,n,r){var i=I();try{St(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Gn(1,0)}}function dr(e,t,n,r){var i=I();try{return St(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Gn(1,0)}}function fr(e,t,n,r,i,a){var o=I();try{return St(e)(t,n,r,i,a)}catch(e){if(F(o),e!==e+0)throw e;Gn(1,0)}}function pr(e){var t=I();try{St(e)()}catch(e){if(F(t),e!==e+0)throw e;Gn(1,0)}}function mr(e,t,n,r,i,a,o,s,c,l,u){var d=I();try{St(e)(t,n,r,i,a,o,s,c,l,u)}catch(e){if(F(d),e!==e+0)throw e;Gn(1,0)}}function hr(e,t,n,r,i,a,o){var s=I();try{St(e)(t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Gn(1,0)}}function gr(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g){var _=I();try{St(e)(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g)}catch(e){if(F(_),e!==e+0)throw e;Gn(1,0)}}function _r(e,t,n,r,i,a,o,s,c){var l=I();try{St(e)(t,n,r,i,a,o,s,c)}catch(e){if(F(l),e!==e+0)throw e;Gn(1,0)}}function vr(e,t,n,r,i){var a=I();try{return St(e)(t,n,r,i)}catch(e){if(F(a),e!==e+0)throw e;Gn(1,0)}}function yr(e,t,n,r,i,a){var o=I();try{return St(e)(t,n,r,i,a)}catch(e){if(F(o),e!==e+0)throw e;Gn(1,0)}}function br(e,t,n,r,i,a){var o=I();try{St(e)(t,n,r,i,a)}catch(e){if(F(o),e!==e+0)throw e;Gn(1,0)}}function xr(e,t,n,r,i,a,o){var s=I();try{return St(e)(t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Gn(1,0)}}function Sr(e,t,n,r,i,a,o,s){var c=I();try{return St(e)(t,n,r,i,a,o,s)}catch(e){if(F(c),e!==e+0)throw e;Gn(1,0)}}function Cr(e,t,n,r,i,a,o,s,c){var l=I();try{return St(e)(t,n,r,i,a,o,s,c)}catch(e){if(F(l),e!==e+0)throw e;Gn(1,0)}}function wr(e,t,n,r,i,a,o,s){var c=I();try{St(e)(t,n,r,i,a,o,s)}catch(e){if(F(c),e!==e+0)throw e;Gn(1,0)}}function Tr(e,t,n){var r=I();try{return St(e)(t,n)}catch(e){if(F(r),e!==e+0)throw e;Gn(1,0)}}function Er(e,t,n,r,i,a,o){var s=I();try{return St(e)(t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Gn(1,0)}}function Dr(e,t,n,r){var i=I();try{return St(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Gn(1,0)}}function Or(e,t,n,r){var i=I();try{return St(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Gn(1,0)}}function kr(e,t,n,r,i,a,o,s,c){var l=I();try{St(e)(t,n,r,i,a,o,s,c)}catch(e){if(F(l),e!==e+0)throw e;Gn(1,0)}}function Ar(e,t,n,r,i,a,o,s){var c=I();try{St(e)(t,n,r,i,a,o,s)}catch(e){if(F(c),e!==e+0)throw e;Gn(1,0)}}function jr(e,t,n,r,i,a,o,s,c,l){var u=I();try{St(e)(t,n,r,i,a,o,s,c,l)}catch(e){if(F(u),e!==e+0)throw e;Gn(1,0)}}function Mr(e,t,n){var r=I();try{return St(e)(t,n)}catch(e){if(F(r),e!==e+0)throw e;Gn(1,0)}}function Nr(e,t,n,r,i){var a=I();try{return St(e)(t,n,r,i)}catch(e){if(F(a),e!==e+0)throw e;Gn(1,0)}}function Pr(e,t,n,r,i,a){var o=I();try{return St(e)(t,n,r,i,a)}catch(e){if(F(o),e!==e+0)throw e;Gn(1,0)}}function Fr(e,t,n){var r=I();try{St(e)(t,n)}catch(e){if(F(r),e!==e+0)throw e;Gn(1,0)}}function Ir(e,t,n,r,i,a,o){var s=I();try{St(e)(t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Gn(1,0)}}function Lr(e,t,n,r){var i=I();try{return St(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Gn(1,0)}}function Rr(e){var t=I();try{return St(e)()}catch(e){if(F(t),e!==e+0)throw e;Gn(1,0)}}function zr(e,t,n,r,i,a,o,s,c,l,u,d){var f=I();try{return St(e)(t,n,r,i,a,o,s,c,l,u,d)}catch(e){if(F(f),e!==e+0)throw e;Gn(1,0)}}function Br(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){var g=I();try{St(e)(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h)}catch(e){if(F(g),e!==e+0)throw e;Gn(1,0)}}function Vr(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y){var b=I();try{Qn(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y)}catch(e){if(F(b),e!==e+0)throw e;Gn(1,0)}}function Hr(e,t,n,r,i,a,o){var s=I();try{return $n(e,t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Gn(1,0)}}function Ur(e,t,n,r,i){var a=I();try{return er(e,t,n,r,i)}catch(e){if(F(a),e!==e+0)throw e;Gn(1,0)}}function Wr(){x();function e(){var e,t;i.calledRun=!0,!g&&(S(),(e=_)==null||e(i),(t=i.onRuntimeInitialized)==null||t.call(i),C())}i.setStatus?(i.setStatus(`Running...`),setTimeout(()=>{setTimeout(()=>i.setStatus(``),1),e()},1)):e()}var Gr=await A();return Wr(),t=y?i:new Promise((e,t)=>{_=e,v=t}),t}function bG(e){return gG(yG,e)}async function xG(e,t){return vG(yG,e,t)}var SG=[[`aztec`,`Aztec`],[`aztec_code`,`AztecCode`],[`aztec_rune`,`AztecRune`],[`code_128`,`Code128`],[`code_39`,`Code39`],[`code_39_standard`,`Code39Std`],[`code_39_extended`,`Code39Ext`],[`code_32`,`Code32`],[`pzn`,`PZN`],[`code_93`,`Code93`],[`codabar`,`Codabar`],[`databar`,`DataBar`],[`databar_omni`,`DataBarOmni`],[`databar_stacked`,`DataBarStk`],[`databar_stacked_omni`,`DataBarStkOmni`],[`databar_expanded`,`DataBarExp`],[`databar_expanded_stacked`,`DataBarExpStk`],[`databar_limited`,`DataBarLtd`],[`data_matrix`,`DataMatrix`],[`dx_film_edge`,`DXFilmEdge`],[`ean_13`,`EAN13`],[`ean_upc`,`EANUPC`],[`isbn`,`ISBN`],[`ean_8`,`EAN8`],[`itf`,`ITF`],[`itf_14`,`ITF14`],[`maxi_code`,`MaxiCode`],[`micro_qr_code`,`MicroQRCode`],[`pdf417`,`PDF417`],[`compact_pdf417`,`CompactPDF417`],[`micro_pdf417`,`MicroPDF417`],[`qr_code`,`QRCode`],[`qr_code_model_1`,`QRCodeModel1`],[`qr_code_model_2`,`QRCodeModel2`],[`rm_qr_code`,`RMQRCode`],[`upc_a`,`UPCA`],[`upc_e`,`UPCE`],[`telepen`,`Telepen`],[`telepen_alpha`,`TelepenAlpha`],[`telepen_numeric`,`TelepenNumeric`],[`other_barcode`,`OtherBarcode`],[`linear_codes`,`AllLinear`],[`matrix_codes`,`AllMatrix`],[`gs1_codes`,`AllGS1`],[`retail_codes`,`AllRetail`],[`industrial_codes`,`AllIndustrial`],[`any`,`All`]],CG=[...SG,[`unknown`]].map(e=>e[0]),wG=new Map(SG);function TG(e){for(let[t,n]of wG)if(e===n)return t;return`unknown`}function EG(e){if(DG(e))return{width:e.naturalWidth,height:e.naturalHeight};if(OG(e))return{width:e.width.baseVal.value,height:e.height.baseVal.value};if(kG(e))return{width:e.videoWidth,height:e.videoHeight};if(jG(e))return{width:e.width,height:e.height};if(NG(e))return{width:e.displayWidth,height:e.displayHeight};if(AG(e)||MG(e))return{width:e.width,height:e.height};throw TypeError(`The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.`)}function DG(e){try{var t;return e instanceof(e==null||(t=e.ownerDocument)==null||(t=t.defaultView)==null?void 0:t.HTMLImageElement)}catch{return!1}}function OG(e){try{var t;return e instanceof(e==null||(t=e.ownerDocument)==null||(t=t.defaultView)==null?void 0:t.SVGImageElement)}catch{return!1}}function kG(e){try{var t;return e instanceof(e==null||(t=e.ownerDocument)==null||(t=t.defaultView)==null?void 0:t.HTMLVideoElement)}catch{return!1}}function AG(e){try{var t;return e instanceof(e==null||(t=e.ownerDocument)==null||(t=t.defaultView)==null?void 0:t.HTMLCanvasElement)}catch{return!1}}function jG(e){try{return e instanceof ImageBitmap||Object.prototype.toString.call(e)===`[object ImageBitmap]`}catch{return!1}}function MG(e){try{return e instanceof OffscreenCanvas||Object.prototype.toString.call(e)===`[object OffscreenCanvas]`}catch{return!1}}function NG(e){try{return e instanceof VideoFrame||Object.prototype.toString.call(e)===`[object VideoFrame]`}catch{return!1}}function PG(e){try{return e instanceof Blob||Object.prototype.toString.call(e)===`[object Blob]`}catch{return!1}}function FG(e){try{return e instanceof ImageData||Object.prototype.toString.call(e)===`[object ImageData]`}catch{return!1}}function IG(e,t){try{let n=new OffscreenCanvas(e,t);if(n.getContext(`2d`)instanceof OffscreenCanvasRenderingContext2D)return n;throw void 0}catch{let n=document.createElement(`canvas`);return n.width=e,n.height=t,n}}async function LG(e){if(DG(e)&&!await VG(e))throw new DOMException(`Failed to load or decode HTMLImageElement.`,`InvalidStateError`);if(OG(e)&&!await HG(e))throw new DOMException(`Failed to load or decode SVGImageElement.`,`InvalidStateError`);if(NG(e)&&UG(e))throw new DOMException(`VideoFrame is closed.`,`InvalidStateError`);if(kG(e)&&(e.readyState===0||e.readyState===1))throw new DOMException(`Invalid element or state.`,`InvalidStateError`);if(jG(e)&&GG(e))throw new DOMException(`The image source is detached.`,`InvalidStateError`);let{width:t,height:n}=EG(e);if(t===0||n===0)return null;let r=IG(t,n).getContext(`2d`);r.drawImage(e,0,0);try{return r.getImageData(0,0,t,n)}catch{throw new DOMException(`Source would taint origin.`,`SecurityError`)}}async function RG(e){let t;try{t=await createImageBitmap(e)}catch{try{if(globalThis.Image){t=new Image;let n=``;try{n=URL.createObjectURL(e),t.src=n,await t.decode()}finally{URL.revokeObjectURL(n)}}else return e}catch{throw new DOMException(`Failed to load or decode Blob.`,`InvalidStateError`)}}return await LG(t)}function zG(e){let{width:t,height:n}=e;if(t===0||n===0)return null;let r=e.getContext(`2d`);try{return r.getImageData(0,0,t,n)}catch{throw new DOMException(`Source would taint origin.`,`SecurityError`)}}async function BG(e){if(PG(e))return await RG(e);if(FG(e)){if(WG(e))throw new DOMException(`The image data has been detached.`,`InvalidStateError`);return e}return AG(e)||MG(e)?zG(e):await LG(e)}async function VG(e){try{return await e.decode(),!0}catch{return!1}}async function HG(e){try{return await e.decode?.call(e),!0}catch{return!1}}function UG(e){return e.format===null}function WG(e){return e.data.buffer.byteLength===0}function GG(e){return e.width===0&&e.height===0}function KG(e,t){return qG(e)?new DOMException(`${t}: ${e.message}`,e.name):JG(e)?new e.constructor(`${t}: ${e.message}`):Error(`${t}: ${e}`)}function qG(e){return e instanceof DOMException||Object.prototype.toString.call(e)===`[object DOMException]`}function JG(e){return e instanceof Error||Object.prototype.toString.call(e)===`[object Error]`}function YG(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function XG(e,t,n){YG(e,t),t.set(e,n)}function ZG(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function QG(e,t,n){return e.set(ZG(e,t),n),n}function $G(e,t){return e.get(ZG(e,t))}var eK=new WeakMap,tK=class{constructor(e={}){XG(this,eK,void 0);try{var t;let n=e==null||(t=e.formats)==null?void 0:t.filter(e=>e!==`unknown`);if(n?.length===0)throw TypeError(`Hint option provided, but is empty.`);for(let e of n??[])if(!wG.has(e))throw TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${e}' is not a valid enum value of type BarcodeFormat.`);QG(eK,this,n??[]),bG({fireImmediately:!0}).catch(()=>{})}catch(e){throw KG(e,`Failed to construct 'BarcodeDetector'`)}}static async getSupportedFormats(){return CG.filter(e=>e!==`unknown`)}async detect(e){try{let t=await BG(e);if(t===null)return[];let n,r={textMode:`Plain`,formats:$G(eK,this).map(e=>wG.get(e))};try{n=await xG(t,r)}catch(e){throw console.error(e),new DOMException(`Barcode detection service unavailable.`,`NotSupportedError`)}return n.map(e=>{let{topLeft:{x:t,y:n},topRight:{x:r,y:i},bottomLeft:{x:a,y:o},bottomRight:{x:s,y:c}}=e.position,l=Math.min(t,r,a,s),u=Math.min(n,i,o,c),d=Math.max(t,r,a,s),f=Math.max(n,i,o,c);return{boundingBox:new DOMRectReadOnly(l,u,d-l,f-u),rawValue:e.text,format:TG(e.format),cornerPoints:[{x:t,y:n},{x:r,y:i},{x:s,y:c},{x:a,y:o}]}})}catch(e){throw KG(e,`Failed to execute 'detect' on 'BarcodeDetector'`)}}},nK=!0,rK=!0;function iK(e,t,n){let r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function aK(e,t,n){if(!e.RTCPeerConnection)return;if(!Object.getOwnPropertyDescriptor(EventTarget.prototype,`addEventListener`).writable){cK(`Unable to polyfill events`);return}let r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);let a=e=>{let t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,a),i.apply(this,[e,a])};let a=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t]||!this._eventMap[t].has(n))return a.apply(this,arguments);let r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),this._eventMap[t].size===0&&delete this._eventMap[t],Object.keys(this._eventMap).length===0&&delete this._eventMap,a.apply(this,[e,r])},Object.defineProperty(r,`on`+t,{get(){return this[`_on`+t]},set(e){this[`_on`+t]&&(this.removeEventListener(t,this[`_on`+t]),delete this[`_on`+t]),e&&this.addEventListener(t,this[`_on`+t]=e)},enumerable:!0,configurable:!0})}function oK(e){return typeof e==`boolean`?(nK=e,e?`adapter.js logging disabled`:`adapter.js logging enabled`):Error(`Argument type: `+typeof e+`. Please use a boolean.`)}function sK(e){return typeof e==`boolean`?(rK=!e,`adapter.js deprecation warnings `+(e?`disabled`:`enabled`)):Error(`Argument type: `+typeof e+`. Please use a boolean.`)}function cK(){if(typeof window==`object`){if(nK)return;typeof console<`u`&&typeof console.log==`function`&&console.log.apply(console,arguments)}}function lK(e,t){rK&&console.warn(e+` is deprecated, please use `+t+` instead.`)}function uK(e){let t={browser:null,version:null};if(e===void 0||!e.navigator||!e.navigator.userAgent)return t.browser=`Not a browser.`,t;let{navigator:n}=e;if(n.userAgentData&&n.userAgentData.brands){let e=n.userAgentData.brands.find(e=>e.brand===`Chromium`);if(e){let t=parseInt(e.version,10);if(t>=90)return{browser:`chrome`,version:t}}}if(n.mozGetUserMedia)t.browser=`firefox`,t.version=parseInt(iK(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser=`chrome`,t.version=parseInt(iK(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2))||null;else if(e.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser=`safari`,t.version=parseInt(iK(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&`currentDirection`in e.RTCRtpTransceiver.prototype,t._safariVersion=iK(n.userAgent,/Version\/(\d+(\.?\d+))/,1);else return t.browser=`Not a supported browser.`,t;return t}function dK(e){return Object.prototype.toString.call(e)===`[object Object]`}function fK(e){return dK(e)?Object.keys(e).reduce(function(t,n){let r=dK(e[n]),i=r?fK(e[n]):e[n],a=r&&!Object.keys(i).length;return i===void 0||a?t:Object.assign(t,{[n]:i})},{}):e}function pK(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith(`Id`)?pK(e,e.get(t[r]),n):r.endsWith(`Ids`)&&t[r].forEach(t=>{pK(e,e.get(t),n)})}))}function mK(e,t,n){let r=n?`outbound-rtp`:`inbound-rtp`,i=new Map;if(t===null)return i;let a=[];return e.forEach(e=>{e.type===`track`&&e.trackIdentifier===t.id&&a.push(e)}),a.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&pK(e,n,i)})}),i}var hK=cK;function gK(e,t){if(t.version>=64)return;let n=e&&e.navigator;if(!n.mediaDevices)return;let r=function(e){if(typeof e!=`object`||e.mandatory||e.optional)return e;let t={};return Object.keys(e).forEach(n=>{if(n===`require`||n===`advanced`||n===`mediaSource`)return;let r=typeof e[n]==`object`?e[n]:{ideal:e[n]};r.exact!==void 0&&typeof r.exact==`number`&&(r.min=r.max=r.exact);let i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):t===`deviceId`?`sourceId`:t};if(r.ideal!==void 0){t.optional=t.optional||[];let e={};typeof r.ideal==`number`?(e[i(`min`,n)]=r.ideal,t.optional.push(e),e={},e[i(`max`,n)]=r.ideal,t.optional.push(e)):(e[i(``,n)]=r.ideal,t.optional.push(e))}r.exact!==void 0&&typeof r.exact!=`number`?(t.mandatory=t.mandatory||{},t.mandatory[i(``,n)]=r.exact):[`min`,`max`].forEach(e=>{r[e]!==void 0&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},i=function(e,i){if(t.version>=61)return i(e);if(e=JSON.parse(JSON.stringify(e)),e&&typeof e.audio==`object`){let t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};e=JSON.parse(JSON.stringify(e)),t(e.audio,`autoGainControl`,`googAutoGainControl`),t(e.audio,`noiseSuppression`,`googNoiseSuppression`),e.audio=r(e.audio)}if(e&&typeof e.video==`object`){let a=e.video.facingMode;a&&=typeof a==`object`?a:{ideal:a};let o=t.version<66;if(a&&(a.exact===`user`||a.exact===`environment`||a.ideal===`user`||a.ideal===`environment`)&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!o)){delete e.video.facingMode;let t;if(a.exact===`environment`||a.ideal===`environment`?t=[`back`,`rear`]:(a.exact===`user`||a.ideal===`user`)&&(t=[`front`]),t)return n.mediaDevices.enumerateDevices().then(n=>{n=n.filter(e=>e.kind===`videoinput`);let o=n.find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!o&&n.length&&t.includes(`back`)&&(o=n[n.length-1]),o&&(e.video.deviceId=a.exact?{exact:o.deviceId}:{ideal:o.deviceId}),e.video=r(e.video),hK(`chrome: `+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return hK(`chrome: `+JSON.stringify(e)),i(e)},a=function(e){return t.version>=64?e:{name:{PermissionDeniedError:`NotAllowedError`,PermissionDismissedError:`NotAllowedError`,InvalidStateError:`NotAllowedError`,DevicesNotFoundError:`NotFoundError`,ConstraintNotSatisfiedError:`OverconstrainedError`,TrackStartError:`NotReadableError`,MediaDeviceFailedDueToShutdown:`NotAllowedError`,MediaDeviceKillSwitchOn:`NotAllowedError`,TabCaptureError:`AbortError`,ScreenCaptureError:`AbortError`,DeviceCaptureError:`AbortError`}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&`: `)+this.message}}};if(n.getUserMedia=function(e,t,r){i(e,e=>{n.webkitGetUserMedia(e,t,e=>{r&&r(a(e))})})}.bind(n),n.mediaDevices.getUserMedia){let e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return i(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException(``,`NotFoundError`);return e},e=>Promise.reject(a(e))))}}}var _K=s({fixNegotiationNeeded:()=>TK,shimAddTrackRemoveTrack:()=>CK,shimAddTrackRemoveTrackWithNative:()=>SK,shimGetSendersWithDtmf:()=>bK,shimGetUserMedia:()=>gK,shimMediaStream:()=>vK,shimOnTrack:()=>yK,shimPeerConnection:()=>wK,shimSenderReceiverGetStats:()=>xK});function vK(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function yK(e,t){if(!(t.version>102)){if(typeof e==`object`&&e.RTCPeerConnection&&!(`ontrack`in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener(`track`,this._ontrack),this.addEventListener(`track`,this._ontrack=e)},enumerable:!0,configurable:!0});let t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener(`addtrack`,n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.track.id):{track:n.track};let i=new Event(`track`);i.track=n.track,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)}),t.stream.getTracks().forEach(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.id):{track:n};let i=new Event(`track`);i.track=n,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)})},this.addEventListener(`addstream`,this._ontrackpoly)),t.apply(this,arguments)}}else aK(e,`track`,e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}}function bK(e){if(typeof e==`object`&&e.RTCPeerConnection&&!(`getSenders`in e.RTCPeerConnection.prototype)&&`createDTMFSender`in e.RTCPeerConnection.prototype){let t=function(e,t){return{track:t,get dtmf(){return this._dtmf===void 0&&(this._dtmf=t.kind===`audio`?e.createDTMFSender(t):null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};let n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};let r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);let t=this._senders.indexOf(e);t!==-1&&this._senders.splice(t,1)}}let n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};let r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{let t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if(typeof e==`object`&&e.RTCPeerConnection&&`getSenders`in e.RTCPeerConnection.prototype&&`createDTMFSender`in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!(`dtmf`in e.RTCRtpSender.prototype)){let t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return this._dtmf===void 0&&(this._dtmf=this.track.kind===`audio`?this._pc.createDTMFSender(this.track):null),this._dtmf}})}}function xK(e,t){if(t.version>=67||!(typeof e==`object`&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!(`getStats`in e.RTCRtpSender.prototype)){let t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});let n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){let e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){let e=this;return this._pc.getStats().then(t=>mK(t,e.track,!0))}}if(!(`getStats`in e.RTCRtpReceiver.prototype)){let t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),aK(e,`track`,e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){let e=this;return this._pc.getStats().then(t=>mK(t,e.track,!1))}}if(!(`getStats`in e.RTCRtpSender.prototype&&`getStats`in e.RTCRtpReceiver.prototype))return;let n=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){let e=arguments[0],t,n,r;return this.getSenders().forEach(n=>{n.track===e&&(t?r=!0:t=n)}),this.getReceivers().forEach(t=>(t.track===e&&(n?r=!0:n=t),t.track===e)),r||t&&n?Promise.reject(new DOMException(`There are more than one sender or receiver for the track.`,`InvalidAccessError`)):t?t.getStats():n?n.getStats():Promise.reject(new DOMException(`There is no sender or receiver for the track.`,`InvalidAccessError`))}return n.apply(this,arguments)}}function SK(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};let t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};let r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?this._shimmedLocalStreams[n.id].indexOf(r)===-1&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};let n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException(`Track already exists.`,`InvalidAccessError`)});let t=this.getSenders();n.apply(this,arguments);let r=this.getSenders().filter(e=>t.indexOf(e)===-1);this._shimmedLocalStreams[e.id]=[e].concat(r)};let r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};let i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{let n=this._shimmedLocalStreams[t].indexOf(e);n!==-1&&this._shimmedLocalStreams[t].splice(n,1),this._shimmedLocalStreams[t].length===1&&delete this._shimmedLocalStreams[t]}),i.apply(this,arguments)}}function CK(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return SK(e);let n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){let e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};let r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException(`Track already exists.`,`InvalidAccessError`)}),!this._reverseStreams[t.id]){let n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};let i=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if(this.signalingState===`closed`)throw new DOMException(`The RTCPeerConnection's signalingState is 'closed'.`,`InvalidStateError`);let r=[].slice.call(arguments,1);if(r.length!==1||!r[0].getTracks().find(e=>e===t))throw new DOMException(`The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.`,`NotSupportedError`);if(this.getSenders().find(e=>e.track===t))throw new DOMException(`Track already exists.`,`InvalidAccessError`);this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};let i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event(`negotiationneeded`))});else{let r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find(e=>e.track===t)};function a(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{let r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(i.id,`g`),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}function o(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{let r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,`g`),i.id)}),new RTCSessionDescription({type:t.type,sdp:n})}[`createOffer`,`createAnswer`].forEach(function(t){let n=e.RTCPeerConnection.prototype[t],r={[t](){let e=arguments;return arguments.length&&typeof arguments[0]==`function`?n.apply(this,[t=>{let n=a(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>a(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]});let s=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type||(arguments[0]=o(this,arguments[0])),s.apply(this,arguments)};let c=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,`localDescription`);Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){let e=c.get.apply(this);return e.type===``?e:a(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if(this.signalingState===`closed`)throw new DOMException(`The RTCPeerConnection's signalingState is 'closed'.`,`InvalidStateError`);if(!e._pc)throw new DOMException(`Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.`,`TypeError`);if(e._pc!==this)throw new DOMException(`Sender was not created by this connection.`,`InvalidAccessError`);this._streams=this._streams||{};let t;Object.keys(this._streams).forEach(n=>{this._streams[n].getTracks().find(t=>e.track===t)&&(t=this._streams[n])}),t&&(t.getTracks().length===1?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event(`negotiationneeded`)))}}function wK(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&[`setLocalDescription`,`setRemoteDescription`,`addIceCandidate`].forEach(function(t){let n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new(t===`addIceCandidate`?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]})}function TK(e,t){t.version>102||aK(e,`negotiationneeded`,e=>{let n=e.target;if(!((t.version<72||n.getConfiguration&&n.getConfiguration().sdpSemantics===`plan-b`)&&n.signalingState!==`stable`))return e})}function EK(e,t){let n=e&&e.navigator;if(!n.mediaDevices)return;let r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){lK(`navigator.getUserMedia`,`navigator.mediaDevices.getUserMedia`),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&`autoGainControl`in n.mediaDevices.getSupportedConstraints())){let e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return typeof n==`object`&&typeof n.audio==`object`&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,`autoGainControl`,`mozAutoGainControl`),e(n.audio,`noiseSuppression`,`mozNoiseSuppression`)),t(n)},r&&r.prototype.getSettings){let t=r.prototype.getSettings;r.prototype.getSettings=function(){let n=t.apply(this,arguments);return e(n,`mozAutoGainControl`,`autoGainControl`),e(n,`mozNoiseSuppression`,`noiseSuppression`),n}}if(r&&r.prototype.applyConstraints){let t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return this.kind===`audio`&&typeof n==`object`&&(n=JSON.parse(JSON.stringify(n)),e(n,`autoGainControl`,`mozAutoGainControl`),e(n,`noiseSuppression`,`mozNoiseSuppression`)),t.apply(this,[n])}}}}function DK(e,t){e.navigator.mediaDevices&&(e.navigator.mediaDevices&&`getDisplayMedia`in e.navigator.mediaDevices||(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!(n&&n.video)){let e=new DOMException(`getDisplayMedia without video constraints is undefined`);return e.name=`NotFoundError`,e.code=8,Promise.reject(e)}return n.video===!0?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)}))}var OK=s({shimAddTransceiver:()=>IK,shimCreateAnswer:()=>zK,shimCreateOffer:()=>RK,shimGetDisplayMedia:()=>DK,shimGetParameters:()=>LK,shimGetStats:()=>jK,shimGetUserMedia:()=>EK,shimOnTrack:()=>kK,shimPeerConnection:()=>AK,shimRTCDataChannel:()=>FK,shimReceiverGetStats:()=>NK,shimRemoveStream:()=>PK,shimSenderGetStats:()=>MK});function kK(e){typeof e==`object`&&e.RTCTrackEvent&&`receiver`in e.RTCTrackEvent.prototype&&!(`transceiver`in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function AK(e,t){typeof e==`object`&&(e.RTCPeerConnection||e.mozRTCPeerConnection)&&(!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&[`setLocalDescription`,`setRemoteDescription`,`addIceCandidate`].forEach(function(t){let n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new(t===`addIceCandidate`?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]}))}function jK(e,t){if(typeof e!=`object`||!(e.RTCPeerConnection||e.mozRTCPeerConnection)||t.version>=151)return;let n={inboundrtp:`inbound-rtp`,outboundrtp:`outbound-rtp`,candidatepair:`candidate-pair`,localcandidate:`local-candidate`,remotecandidate:`remote-candidate`},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){let[e,i,a]=arguments;return this.signalingState===`closed`?Promise.resolve(new Map):r.apply(this,[e||null]).then(e=>{if(t.version<53&&!i)try{e.forEach(e=>{e.type=n[e.type]||e.type})}catch(t){if(t.name!==`TypeError`)throw t;e.forEach((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))})}return e}).then(i,a)}}function MK(e){if(!(typeof e==`object`&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&`getStats`in e.RTCRtpSender.prototype)return;let t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});let n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){let e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function NK(e){if(!(typeof e==`object`&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&`getStats`in e.RTCRtpReceiver.prototype)return;let t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),aK(e,`track`,e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function PK(e){!e.RTCPeerConnection||`removeStream`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){lK(`removeStream`,`removeTrack`),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function FK(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function IK(e,t){if(!(typeof e==`object`&&e.RTCPeerConnection)||t.version>=110)return;let n=e.RTCPeerConnection.prototype.addTransceiver;n&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;e===void 0&&(e=[]),e=[...e];let t=e.length>0;t&&e.forEach(e=>{if(`rid`in e&&!/^[a-z0-9]{0,16}$/i.test(e.rid))throw TypeError(`Invalid RID value provided.`);if(`scaleResolutionDownBy`in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw RangeError(`scale_resolution_down_by must be >= 1.0`);if(`maxFramerate`in e&&!(parseFloat(e.maxFramerate)>=0))throw RangeError(`max_framerate must be >= 0.0`)});let r=n.apply(this,arguments);if(t){let{sender:t}=r,n=t.getParameters();(!(`encodings`in n)||n.encodings.length===1&&Object.keys(n.encodings[0]).length===0)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return r})}function LK(e,t){if(!(typeof e==`object`&&e.RTCRtpSender)||t.version>=110)return;let n=e.RTCRtpSender.prototype.getParameters;n&&(e.RTCRtpSender.prototype.getParameters=function(){let e=n.apply(this,arguments);return`encodings`in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function RK(e,t){if(!(typeof e==`object`&&e.RTCPeerConnection)||t.version>=110)return;let n=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>n.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):n.apply(this,arguments)}}function zK(e,t){if(!(typeof e==`object`&&e.RTCPeerConnection)||t.version>=110)return;let n=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>n.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):n.apply(this,arguments)}}var BK=s({shimAudioContext:()=>YK,shimCallbacksAPI:()=>UK,shimConstraints:()=>GK,shimCreateOfferLegacy:()=>JK,shimGetUserMedia:()=>WK,shimLocalStreamsAPI:()=>VK,shimRTCIceServerUrls:()=>KK,shimRemoteStreamsAPI:()=>HK,shimTrackEventTransceiver:()=>qK});function VK(e){if(typeof e==`object`&&e.RTCPeerConnection){if(`getLocalStreams`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||=[],this._localStreams}),!(`addStream`in e.RTCPeerConnection.prototype)){let t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||=[],this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>t.call(this,n,e)),e.getVideoTracks().forEach(n=>t.call(this,n,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}`removeStream`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||=[];let t=this._localStreams.indexOf(e);if(t===-1)return;this._localStreams.splice(t,1);let n=e.getTracks();this.getSenders().forEach(e=>{n.includes(e.track)&&this.removeTrack(e)})})}}function HK(e){if(typeof e==`object`&&e.RTCPeerConnection&&(`getRemoteStreams`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!(`onaddstream`in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener(`addstream`,this._onaddstream),this.removeEventListener(`track`,this._onaddstreampoly)),this.addEventListener(`addstream`,this._onaddstream=e),this.addEventListener(`track`,this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||=[],this._remoteStreams.includes(e))return;this._remoteStreams.push(e);let t=new Event(`addstream`);t.stream=e,this.dispatchEvent(t)})})}});let t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){let e=this;return this._onaddstreampoly||this.addEventListener(`track`,this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||=[],e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);let n=new Event(`addstream`);n.stream=t,e.dispatchEvent(n)})}),t.apply(e,arguments)}}}function UK(e){if(typeof e!=`object`||!e.RTCPeerConnection)return;let t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,a=t.setRemoteDescription,o=t.addIceCandidate;t.createOffer=function(e,t){let r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){let n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};let s=function(e,t,n){let r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=s,s=function(e,t,n){let r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=s,s=function(e,t,n){let r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=s}function WK(e){let t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){let e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(GK(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function GK(e){return e&&e.video!==void 0?Object.assign({},e,{video:fK(e.video)}):e}function KK(e){if(!e.RTCPeerConnection)return;let t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){let t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];r.urls===void 0&&r.url?(lK(`RTCIceServer.url`,`RTCIceServer.urls`),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,`generateCertificate`in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get(){return t.generateCertificate}})}function qK(e){typeof e==`object`&&e.RTCTrackEvent&&`receiver`in e.RTCTrackEvent.prototype&&!(`transceiver`in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function JK(e){let t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){e.offerToReceiveAudio!==void 0&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);let t=this.getTransceivers().find(e=>e.receiver.track.kind===`audio`);e.offerToReceiveAudio===!1&&t?t.direction===`sendrecv`?t.setDirection?t.setDirection(`sendonly`):t.direction=`sendonly`:t.direction===`recvonly`&&(t.setDirection?t.setDirection(`inactive`):t.direction=`inactive`):e.offerToReceiveAudio===!0&&!t&&this.addTransceiver(`audio`,{direction:`recvonly`}),e.offerToReceiveVideo!==void 0&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);let n=this.getTransceivers().find(e=>e.receiver.track.kind===`video`);e.offerToReceiveVideo===!1&&n?n.direction===`sendrecv`?n.setDirection?n.setDirection(`sendonly`):n.direction=`sendonly`:n.direction===`recvonly`&&(n.setDirection?n.setDirection(`inactive`):n.direction=`inactive`):e.offerToReceiveVideo===!0&&!n&&this.addTransceiver(`video`,{direction:`recvonly`})}return t.apply(this,arguments)}}function YK(e){typeof e!=`object`||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var XK=o(((e,t)=>{var n={};n.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},n.localCName=n.generateIdentifier(),n.splitLines=function(e){return e.trim().split(`
|
|
282
|
+
`).map(e=>e.trim())},n.splitSections=function(e){return e.split(`
|
|
283
|
+
m=`).map((e,t)=>(t>0?`m=`+e:e).trim()+`\r
|
|
284
|
+
`)},n.getDescription=function(e){let t=n.splitSections(e);return t&&t[0]},n.getMediaSections=function(e){let t=n.splitSections(e);return t.shift(),t},n.matchPrefix=function(e,t){return n.splitLines(e).filter(e=>e.indexOf(t)===0)},n.parseCandidate=function(e){let t;t=e.indexOf(`a=candidate:`)===0?e.substring(12).split(` `):e.substring(10).split(` `);let n={foundation:t[0],component:{1:`rtp`,2:`rtcp`}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case`raddr`:n.relatedAddress=t[e+1];break;case`rport`:n.relatedPort=parseInt(t[e+1],10);break;case`tcptype`:n.tcpType=t[e+1];break;case`ufrag`:n.ufrag=t[e+1],n.usernameFragment=t[e+1];break;default:n[t[e]]===void 0&&(n[t[e]]=t[e+1])}return n},n.writeCandidate=function(e){let t=[];t.push(e.foundation);let n=e.component;n===`rtp`?t.push(1):n===`rtcp`?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);let r=e.type;return t.push(`typ`),t.push(r),r!==`host`&&e.relatedAddress&&e.relatedPort!==void 0&&(t.push(`raddr`),t.push(e.relatedAddress),t.push(`rport`),t.push(e.relatedPort)),e.tcpType&&e.protocol.toLowerCase()===`tcp`&&(t.push(`tcptype`),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push(`ufrag`),t.push(e.usernameFragment||e.ufrag)),`candidate:`+t.join(` `)},n.parseIceOptions=function(e){return e.substring(14).split(` `)},n.parseRtpMap=function(e){let t=e.substring(9).split(` `),n={payloadType:parseInt(t.shift(),10)};return t=t[0].split(`/`),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=t.length===3?parseInt(t[2],10):1,n.numChannels=n.channels,n},n.writeRtpMap=function(e){let t=e.payloadType;e.preferredPayloadType!==void 0&&(t=e.preferredPayloadType);let n=e.channels||e.numChannels||1;return`a=rtpmap:`+t+` `+e.name+`/`+e.clockRate+(n===1?``:`/`+n)+`\r
|
|
285
|
+
`},n.parseExtmap=function(e){let t=e.substring(9).split(` `);return{id:parseInt(t[0],10),direction:t[0].indexOf(`/`)>0?t[0].split(`/`)[1]:`sendrecv`,uri:t[1],attributes:t.slice(2).join(` `)}},n.writeExtmap=function(e){return`a=extmap:`+(e.id||e.preferredId)+(e.direction&&e.direction!==`sendrecv`?`/`+e.direction:``)+` `+e.uri+(e.attributes?` `+e.attributes:``)+`\r
|
|
286
|
+
`},n.parseFmtp=function(e){let t={},n,r=e.substring(e.indexOf(` `)+1).split(`;`);for(let e=0;e<r.length;e++)n=r[e].trim().split(`=`),t[n[0].trim()]=n[1];return t},n.writeFmtp=function(e){let t=``,n=e.payloadType;if(e.preferredPayloadType!==void 0&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){let r=[];Object.keys(e.parameters).forEach(t=>{e.parameters[t]===void 0?r.push(t):r.push(t+`=`+e.parameters[t])}),t+=`a=fmtp:`+n+` `+r.join(`;`)+`\r
|
|
287
|
+
`}return t},n.parseRtcpFb=function(e){let t=e.substring(e.indexOf(` `)+1).split(` `);return{type:t.shift(),parameter:t.join(` `)}},n.writeRtcpFb=function(e){let t=``,n=e.payloadType;return e.preferredPayloadType!==void 0&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{t+=`a=rtcp-fb:`+n+` `+e.type+(e.parameter&&e.parameter.length?` `+e.parameter:``)+`\r
|
|
288
|
+
`}),t},n.parseSsrcMedia=function(e){let t=e.indexOf(` `),n={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(`:`,t);return r>-1?(n.attribute=e.substring(t+1,r),n.value=e.substring(r+1)):n.attribute=e.substring(t+1),n},n.parseSsrcGroup=function(e){let t=e.substring(13).split(` `);return{semantics:t.shift(),ssrcs:t.map(e=>parseInt(e,10))}},n.getMid=function(e){let t=n.matchPrefix(e,`a=mid:`)[0];if(t)return t.substring(6)},n.parseFingerprint=function(e){let t=e.substring(14).split(` `);return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},n.getDtlsParameters=function(e,t){return{role:`auto`,fingerprints:n.matchPrefix(e+t,`a=fingerprint:`).map(n.parseFingerprint)}},n.writeDtlsParameters=function(e,t){let n=`a=setup:`+t+`\r
|
|
289
|
+
`;return e.fingerprints.forEach(e=>{n+=`a=fingerprint:`+e.algorithm+` `+e.value+`\r
|
|
290
|
+
`}),n},n.parseCryptoLine=function(e){let t=e.substring(9).split(` `);return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},n.writeCryptoLine=function(e){return`a=crypto:`+e.tag+` `+e.cryptoSuite+` `+(typeof e.keyParams==`object`?n.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?` `+e.sessionParams.join(` `):``)+`\r
|
|
291
|
+
`},n.parseCryptoKeyParams=function(e){if(e.indexOf(`inline:`)!==0)return null;let t=e.substring(7).split(`|`);return{keyMethod:`inline`,keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(`:`)[0]:void 0,mkiLength:t[2]?t[2].split(`:`)[1]:void 0}},n.writeCryptoKeyParams=function(e){return e.keyMethod+`:`+e.keySalt+(e.lifeTime?`|`+e.lifeTime:``)+(e.mkiValue&&e.mkiLength?`|`+e.mkiValue+`:`+e.mkiLength:``)},n.getCryptoParameters=function(e,t){return n.matchPrefix(e+t,`a=crypto:`).map(n.parseCryptoLine)},n.getIceParameters=function(e,t){let r=n.matchPrefix(e+t,`a=ice-ufrag:`)[0],i=n.matchPrefix(e+t,`a=ice-pwd:`)[0];return r&&i?{usernameFragment:r.substring(12),password:i.substring(10)}:null},n.writeIceParameters=function(e){let t=`a=ice-ufrag:`+e.usernameFragment+`\r
|
|
292
|
+
a=ice-pwd:`+e.password+`\r
|
|
293
|
+
`;return e.iceLite&&(t+=`a=ice-lite\r
|
|
294
|
+
`),t},n.parseRtpParameters=function(e){let t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=n.splitLines(e)[0].split(` `);t.profile=r[2];for(let i=3;i<r.length;i++){let a=r[i],o=n.matchPrefix(e,`a=rtpmap:`+a+` `)[0];if(o){let r=n.parseRtpMap(o),i=n.matchPrefix(e,`a=fmtp:`+a+` `);switch(r.parameters=i.length?n.parseFmtp(i[0]):{},r.rtcpFeedback=n.matchPrefix(e,`a=rtcp-fb:`+a+` `).map(n.parseRtcpFb),t.codecs.push(r),r.name.toUpperCase()){case`RED`:case`ULPFEC`:t.fecMechanisms.push(r.name.toUpperCase())}}}n.matchPrefix(e,`a=extmap:`).forEach(e=>{t.headerExtensions.push(n.parseExtmap(e))});let i=n.matchPrefix(e,`a=rtcp-fb:* `).map(n.parseRtcpFb);return t.codecs.forEach(e=>{i.forEach(t=>{e.rtcpFeedback.find(e=>e.type===t.type&&e.parameter===t.parameter)||e.rtcpFeedback.push(t)})}),t},n.writeRtpDescription=function(e,t){let r=``;r+=`m=`+e+` `,r+=t.codecs.length>0?`9`:`0`,r+=` `+(t.profile||`UDP/TLS/RTP/SAVPF`)+` `,r+=t.codecs.map(e=>e.preferredPayloadType===void 0?e.payloadType:e.preferredPayloadType).join(` `)+`\r
|
|
295
|
+
`,r+=`c=IN IP4 0.0.0.0\r
|
|
296
|
+
`,r+=`a=rtcp:9 IN IP4 0.0.0.0\r
|
|
297
|
+
`,t.codecs.forEach(e=>{r+=n.writeRtpMap(e),r+=n.writeFmtp(e),r+=n.writeRtcpFb(e)});let i=0;return t.codecs.forEach(e=>{e.maxptime>i&&(i=e.maxptime)}),i>0&&(r+=`a=maxptime:`+i+`\r
|
|
298
|
+
`),t.headerExtensions&&t.headerExtensions.forEach(e=>{r+=n.writeExtmap(e)}),r},n.parseRtpEncodingParameters=function(e){let t=[],r=n.parseRtpParameters(e),i=r.fecMechanisms.indexOf(`RED`)!==-1,a=r.fecMechanisms.indexOf(`ULPFEC`)!==-1,o=n.matchPrefix(e,`a=ssrc:`).map(e=>n.parseSsrcMedia(e)).filter(e=>e.attribute===`cname`),s=o.length>0&&o[0].ssrc,c,l=n.matchPrefix(e,`a=ssrc-group:FID`).map(e=>e.substring(17).split(` `).map(e=>parseInt(e,10)));l.length>0&&l[0].length>1&&l[0][0]===s&&(c=l[0][1]),r.codecs.forEach(e=>{if(e.name.toUpperCase()===`RTX`&&e.parameters.apt){let n={ssrc:s,codecPayloadType:parseInt(e.parameters.apt,10)};s&&c&&(n.rtx={ssrc:c}),t.push(n),i&&(n=JSON.parse(JSON.stringify(n)),n.fec={ssrc:s,mechanism:a?`red+ulpfec`:`red`},t.push(n))}}),t.length===0&&s&&t.push({ssrc:s});let u=n.matchPrefix(e,`b=`);return u.length&&(u=u[0].indexOf(`b=TIAS:`)===0?parseInt(u[0].substring(7),10):u[0].indexOf(`b=AS:`)===0?parseInt(u[0].substring(5),10)*1e3*.95-16e3:void 0,t.forEach(e=>{e.maxBitrate=u})),t},n.parseRtcpParameters=function(e){let t={},r=n.matchPrefix(e,`a=ssrc:`).map(e=>n.parseSsrcMedia(e)).filter(e=>e.attribute===`cname`)[0];r&&(t.cname=r.value,t.ssrc=r.ssrc);let i=n.matchPrefix(e,`a=rtcp-rsize`);return t.reducedSize=i.length>0,t.compound=i.length===0,t.mux=n.matchPrefix(e,`a=rtcp-mux`).length>0,t},n.writeRtcpParameters=function(e){let t=``;return e.reducedSize&&(t+=`a=rtcp-rsize\r
|
|
299
|
+
`),e.mux&&(t+=`a=rtcp-mux\r
|
|
300
|
+
`),e.ssrc!==void 0&&e.cname&&(t+=`a=ssrc:`+e.ssrc+` cname:`+e.cname+`\r
|
|
301
|
+
`),t},n.parseMsid=function(e){let t,r=n.matchPrefix(e,`a=msid:`);if(r.length===1)return t=r[0].substring(7).split(` `),{stream:t[0],track:t[1]};let i=n.matchPrefix(e,`a=ssrc:`).map(e=>n.parseSsrcMedia(e)).filter(e=>e.attribute===`msid`);if(i.length>0)return t=i[0].value.split(` `),{stream:t[0],track:t[1]}},n.parseSctpDescription=function(e){let t=n.parseMLine(e),r=n.matchPrefix(e,`a=max-message-size:`),i;r.length>0&&(i=parseInt(r[0].substring(19),10)),isNaN(i)&&(i=65536);let a=n.matchPrefix(e,`a=sctp-port:`);if(a.length>0)return{port:parseInt(a[0].substring(12),10),protocol:t.fmt,maxMessageSize:i};let o=n.matchPrefix(e,`a=sctpmap:`);if(o.length>0){let e=o[0].substring(10).split(` `);return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:i}}},n.writeSctpDescription=function(e,t){let n=[];return n=e.protocol===`DTLS/SCTP`?[`m=`+e.kind+` 9 `+e.protocol+` `+t.port+`\r
|
|
302
|
+
`,`c=IN IP4 0.0.0.0\r
|
|
303
|
+
`,`a=sctpmap:`+t.port+` `+t.protocol+` 65535\r
|
|
304
|
+
`]:[`m=`+e.kind+` 9 `+e.protocol+` `+t.protocol+`\r
|
|
305
|
+
`,`c=IN IP4 0.0.0.0\r
|
|
306
|
+
`,`a=sctp-port:`+t.port+`\r
|
|
307
|
+
`],t.maxMessageSize!==void 0&&n.push(`a=max-message-size:`+t.maxMessageSize+`\r
|
|
308
|
+
`),n.join(``)},n.generateSessionId=function(){return Math.random().toString().substr(2,22)},n.writeSessionBoilerplate=function(e,t,r){let i,a=t===void 0?2:t;return i=e||n.generateSessionId(),`v=0\r
|
|
309
|
+
o=`+(r||`thisisadapterortc`)+` `+i+` `+a+` IN IP4 127.0.0.1\r
|
|
310
|
+
s=-\r
|
|
311
|
+
t=0 0\r
|
|
312
|
+
`},n.getDirection=function(e,t){let r=n.splitLines(e);for(let e=0;e<r.length;e++)switch(r[e]){case`a=sendrecv`:case`a=sendonly`:case`a=recvonly`:case`a=inactive`:return r[e].substring(2)}return t?n.getDirection(t):`sendrecv`},n.getKind=function(e){return n.splitLines(e)[0].split(` `)[0].substring(2)},n.isRejected=function(e){return e.split(` `,2)[1]===`0`},n.parseMLine=function(e){let t=n.splitLines(e)[0].substring(2).split(` `);return{kind:t[0],port:parseInt(t[1],10),protocol:t[2],fmt:t.slice(3).join(` `)}},n.parseOLine=function(e){let t=n.matchPrefix(e,`o=`)[0].substring(2).split(` `);return{username:t[0],sessionId:t[1],sessionVersion:parseInt(t[2],10),netType:t[3],addressType:t[4],address:t[5]}},n.isValidSDP=function(e){if(typeof e!=`string`||e.length===0)return!1;let t=n.splitLines(e);for(let e=0;e<t.length;e++)if(t[e].length<2||t[e].charAt(1)!==`=`)return!1;return!0},typeof t==`object`&&(t.exports=n)})),ZK=s({removeExtmapAllowMixed:()=>iq,shimAddIceCandidateNullOrEmpty:()=>aq,shimConnectionState:()=>rq,shimMaxMessageSize:()=>tq,shimParameterlessSetLocalDescription:()=>oq,shimRTCIceCandidate:()=>$K,shimRTCIceCandidateRelayProtocol:()=>eq,shimSendThrowTypeError:()=>nq}),QK=l(XK());function $K(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&`foundation`in e.RTCIceCandidate.prototype)return;let t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if(typeof e==`object`&&e.candidate&&e.candidate.indexOf(`a=`)===0&&(e=JSON.parse(JSON.stringify(e)),e.candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){let n=new t(e),r=QK.default.parseCandidate(e.candidate);for(let e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,aK(e,`icecandidate`,t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:`false`}),t))}function eq(e){!e.RTCIceCandidate||e.RTCIceCandidate&&`relayProtocol`in e.RTCIceCandidate.prototype||aK(e,`icecandidate`,e=>{if(e.candidate){let t=QK.default.parseCandidate(e.candidate.candidate);t.type===`relay`&&(e.candidate.relayProtocol={0:`tls`,1:`tcp`,2:`udp`}[t.priority>>24])}return e})}function tq(e,t){if(!e.RTCPeerConnection||t.browser===`chrome`&&t.version>102||t.browser===`firefox`&&t.version>=113)return;`sctp`in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return this._sctp===void 0?null:this._sctp}});let n=function(e){if(!e||!e.sdp)return!1;let t=QK.default.splitSections(e.sdp);return t.shift(),t.some(e=>{let t=QK.default.parseMLine(e);return t&&t.kind===`application`&&t.protocol.indexOf(`SCTP`)!==-1})},r=function(e){let t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(t===null||t.length<2)return-1;let n=parseInt(t[1],10);return n===n?n:-1},i=function(e){let n=65536;return t.browser===`firefox`&&(n=t.version<57?e===-1?16384:2147483637:t.version<60?t.version===57?65535:65536:2147483637),n},a=function(e,n){let r=65536;t.browser===`firefox`&&t.version===57&&(r=65535);let i=QK.default.matchPrefix(e.sdp,`a=max-message-size:`);return i.length>0?r=parseInt(i[0].substring(19),10):t.browser===`firefox`&&n!==-1&&(r=2147483637),r},o=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,t.browser===`chrome`&&t.version>=76){let{sdpSemantics:e}=this.getConfiguration();e===`plan-b`&&Object.defineProperty(this,"sctp",{get(){return this._sctp===void 0?null:this._sctp},enumerable:!0,configurable:!0})}if(n(arguments[0])){let e=r(arguments[0]),t=i(e),n=a(arguments[0],e),o;o=t===0&&n===0?1/0:t===0||n===0?Math.max(t,n):Math.min(t,n);let s={};Object.defineProperty(s,"maxMessageSize",{get(){return o}}),this._sctp=s}return o.apply(this,arguments)}}function nq(e,t){if(!(e.RTCPeerConnection&&`createDataChannel`in e.RTCPeerConnection.prototype)||t.browser===`chrome`&&t.version>=149||t.browser===`firefox`&&t.version>60)return;function n(e,t){let n=e.send;e.send=function(){let r=arguments[0],i=r.length||r.size||r.byteLength;if(e.readyState===`open`&&t.sctp&&i>t.sctp.maxMessageSize)throw TypeError(`Message too large (can send a maximum of `+t.sctp.maxMessageSize+` bytes)`);return n.apply(e,arguments)}}let r=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){let e=r.apply(this,arguments);return n(e,this),e},aK(e,`datachannel`,e=>(n(e.channel,e.target),e))}function rq(e){if(!e.RTCPeerConnection||`connectionState`in e.RTCPeerConnection.prototype)return;let t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:`connected`,checking:`connecting`}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener(`connectionstatechange`,this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener(`connectionstatechange`,this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),[`setLocalDescription`,`setRemoteDescription`].forEach(e=>{let n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{let t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;let n=new Event(`connectionstatechange`,e);t.dispatchEvent(n)}return e},this.addEventListener(`iceconnectionstatechange`,this._connectionstatechangepoly)),n.apply(this,arguments)}})}function iq(e,t){if(!e.RTCPeerConnection||t.browser===`chrome`&&t.version>=71||t.browser===`safari`&&t._safariVersion>=13.1)return;let n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&t.sdp.indexOf(`
|
|
313
|
+
a=extmap-allow-mixed`)!==-1){let n=t.sdp.split(`
|
|
314
|
+
`).filter(e=>e.trim()!==`a=extmap-allow-mixed`).join(`
|
|
315
|
+
`);e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function aq(e,t){if(!(e.RTCPeerConnection&&e.RTCPeerConnection.prototype))return;let n=e.RTCPeerConnection.prototype.addIceCandidate;n&&n.length!==0&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?(t.browser===`chrome`&&t.version<78||t.browser===`firefox`&&t.version<68||t.browser===`safari`)&&arguments[0]&&arguments[0].candidate===``?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function oq(e,t){if(!(e.RTCPeerConnection&&e.RTCPeerConnection.prototype))return;let n=e.RTCPeerConnection.prototype.setLocalDescription;n&&n.length!==0&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if(typeof e!=`object`||e.type&&e.sdp)return n.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case`stable`:case`have-local-offer`:case`have-remote-pranswer`:e.type=`offer`;break;default:e.type=`answer`}return e.sdp||e.type!==`offer`&&e.type!==`answer`?n.apply(this,[e]):(e.type===`offer`?this.createOffer:this.createAnswer).apply(this).then(e=>n.apply(this,[e]))})}function sq({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){let n=cK,r=uK(e),i={browserDetails:r,commonShim:ZK,extractVersion:iK,disableLog:oK,disableWarnings:sK,sdp:QK};switch(r.browser){case`chrome`:if(!_K||!wK||!t.shimChrome)return n(`Chrome shim is not included in this adapter release.`),i;if(r.version===null)return n(`Chrome shim can not determine version, not shimming.`),i;n(`adapter.js shimming chrome.`),i.browserShim=_K,aq(e,r),oq(e,r),gK(e,r),vK(e,r),wK(e,r),yK(e,r),CK(e,r),bK(e,r),xK(e,r),TK(e,r),$K(e,r),eq(e,r),rq(e,r),tq(e,r),nq(e,r),iq(e,r);break;case`firefox`:if(!OK||!AK||!t.shimFirefox)return n(`Firefox shim is not included in this adapter release.`),i;n(`adapter.js shimming firefox.`),i.browserShim=OK,aq(e,r),oq(e,r),EK(e,r),AK(e,r),jK(e,r),kK(e,r),PK(e,r),MK(e,r),NK(e,r),FK(e,r),IK(e,r),LK(e,r),RK(e,r),zK(e,r),$K(e,r),rq(e,r),tq(e,r),nq(e,r);break;case`safari`:if(!BK||!t.shimSafari)return n(`Safari shim is not included in this adapter release.`),i;n(`adapter.js shimming safari.`),i.browserShim=BK,aq(e,r),oq(e,r),KK(e,r),JK(e,r),UK(e,r),VK(e,r),HK(e,r),qK(e,r),WK(e,r),YK(e,r),$K(e,r),eq(e,r),tq(e,r),nq(e,r),iq(e,r);break;default:n(`Unsupported browser!`)}return i}sq({window:typeof window>`u`?void 0:window}),typeof window<`u`&&`BarcodeDetector`in window;var cq=3e3,lq=500;function uq(e={}){let{startTimeoutMs:t=cq,settleDelayMs:n=lq}=e,r=(0,L.useRef)(Promise.resolve({type:`stop`,data:{}})),i=(0,L.useRef)(null),a=(0,L.useRef)(null),[o,s]=(0,L.useState)({}),[c,l]=(0,L.useState)({}),u=(0,L.useCallback)(async(e,r)=>{if(!window.isSecureContext)throw Error(`camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.`);if(navigator?.mediaDevices?.getUserMedia===void 0)throw Error(`this browser has no Stream API support`);let o=await navigator.mediaDevices.getUserMedia({audio:!1,video:r});e.srcObject=o;let c;try{await Promise.race([e.play(),new Promise((e,n)=>{c=setTimeout(()=>n(Error(`Loading camera stream timed out after ${t} ms.`)),t)})])}finally{c!==void 0&&clearTimeout(c)}n>0&&await new Promise(e=>setTimeout(e,n));let[u]=o.getVideoTracks();return l(u.getSettings()),s(u.getCapabilities?.()??{}),i.current=o,a.current=u,{type:`start`,data:{videoEl:e,stream:o,constraints:r}}},[t,n]),d=(0,L.useCallback)(async(e,t)=>{e.srcObject=null,e.removeAttribute(`src`),e.load();for(let e of t.getTracks())t.removeTrack(e),e.stop();return i.current=null,a.current=null,l({}),{type:`stop`,data:{}}},[]),f=(0,L.useCallback)(async(e,{constraints:t,restart:n=!1})=>{let i=null;r.current=r.current.then(r=>{if(r.type===`start`){let{data:{videoEl:i,stream:a,constraints:o}}=r;return!n&&e===i&&t===o?r:d(i,a).then(()=>u(e,t))}return u(e,t)}).catch(e=>(i=e,{type:`stop`,data:{}}));let a=await r.current;if(i)throw i;if(a.type===`stop`)throw Error(`Something went wrong with the camera task queue (start task).`)},[u,d]),p=(0,L.useCallback)(async()=>{if(r.current=r.current.then(e=>{if(e.type===`stop`)return e;let{data:{videoEl:t,stream:n}}=e;return d(t,n)}),(await r.current).type===`start`)throw Error(`Something went wrong with the camera task queue (stop task).`)},[d]),m=(0,L.useCallback)(async e=>{let t=null;if(r.current=r.current.then(async n=>{let r=a.current;if(!r||n.type!==`start`)return t=Error(`No active video track found.`),n;try{e.advanced?.[0]?.zoom&&r.getCapabilities().torch&&(await r.applyConstraints({advanced:[{torch:!1}]}),l(r.getSettings())),await r.applyConstraints(e),s(r.getCapabilities()),l(r.getSettings())}catch(e){t=e}return n}),await r.current,t)throw t},[]),h=(0,L.useCallback)(async()=>{try{await r.current}catch{}},[]);return(0,L.useEffect)(()=>()=>{p()},[p]),{capabilities:o,settings:c,startCamera:f,stopCamera:p,updateConstraints:m,flush:h,getStream:()=>i.current}}var dq=`data:audio/mp3;base64,//PkZAAhghE0AKToAJra/n0FQygAAAGIkYJgmCYXBMAAGCTJz3zhCEM//z//1hz//8MMMMN08ssV6e5DDWIQreAgCvFKy8bXgIKMkUDDBgzJwIBtkRMQAocxIFdxghQGKDoEziAzQxOBOdH92i/iGi+zDCAEIX46a73HrSybZw1x3JZjXp7dSNy/P68rjcbt7p7fakMP5LVMyzCaj1pjvejYYAIDgDGzECjEAk1Jl3559HIon8hzlfPVTCvGJZzfcKSxXfyMWM88//9VKSxXdtnb9vomOuuRyiWVYbf+X8zp6fKGHIdycuWMMMMMMKSnp+6wsYc/9f/7z7rPPWHN556p6fP8MMMP///PPP/7+GHK9PT6p7f/unldP2np7YeHjweiYA4GLNAgAiI7u57n5//oc5/yfk6znOcPhwOBwggHCMpA4HA4KEyHOc5znO+hPIc5//+fqJh8XQPh90JU5xQinOf//87/zvP+ggAYuhCKHxdA+Hxd0EA4KKHA4ciB3kOXfXB/gmf8p/B96lAMKAgAADU+BujARHgwdisgHMfAUHAiceBg4ASBgZBiBIBH4ZaHOJsLhf8R+HYEciIgYSwj/+Bi7EqBh+AcBn5P6Bh4TuBmrAMBiZH7gaLEWgew//PkZFMlyek60MpYAShzqqZhm6gCUWeEUWAewEWYGN4X4GDEPwGE8S4GDoOIGAYKgIQOkz//gGARAUB+CwGxTwMAACAEgyAwdAlAxKhzAxXiZ///AxcEwAwJjDAziCAAwQgdAwRgdAsJQDAmAcGzYDwAhZIAKAcIQB4GT9TQMJ9/4Gi1Fv/AcAYUqKBAwGgNAwVBAAwGhwAwdBlAxFg1AwlgzAwNBuAkJQDBgEEDEqGECgChFgBgL//CIswYYH//+HKCpk4K0C9AaKKCAOBeMcR4X9C44BwABCgGAsGYCgTwHAcAwXAiAwSAQV///CJP9lwMBQAwAAAWGo5lVLCcaeneVhJAVGai3//ioaUEf//gaTAYGCj8BnEwfrIqDcsIQb/vmhU/8fAs0G8YGGwKST8Igj4GCATipksVzY8p//90FWJwh45AkX//4fCF9wMEgkL3uQc+gbGJ8t4MBAMBP/hEXf9FRuWBcAfIFjYzQdoLCBwh7IWVlxaX/w8oMCP/+EQT5poGB1Ir90DhiV6af/jFYBpT2BgoQyyt2M0ToBdEaZyzt8nTo3xdNDCTSd//o6F06CjooxRr4jVF/0bOKD6OMUNDRxiMUVFR0FFQPhGXRjDpr4MAEA4wIQUhYOIw//PkZE4nrg08sOx4ACQ0CopD2aAAlwTTBxQeMcwd8w8gZTAgABXwGABOkzpI0wAQAExnWfP4x8ZjKunWdZ1o1Qe6lFGKCNULORQCELAAPnRUf/GIx/0FHGfo3SdZ0qP2cukXKLlRtBKFgAQwCkwJgFRYBEEATmDsLSY2QiQYCEnEra+UZo6F1aKMRr6GhoaP/+j//ov+i+hjLqBgMkYoqChoo1GqCjoY06TpRqjjLOYzRRmMuizmgdKhdF8kjTAAAPMCwGswzglgwAJfzqxmioKH/////////////+ijLOAwFmN0f/////////Q///8ZjP/9DGYyFwIDBeB3MA4AlBWidKM5spykAUAQOCakK+udGqN8VDYjTRuN//0bVX//6Kio4xQFv//nf//kKOoAEIB6SY6hcxenp85///4/DEPf/84Xvl4vF4dwtxfEJgCYQHMSgKCROp4+fn////L4tQf0unz89OecLxeL0ul09y6enzp4dIhKAQFA5hKfLu1nU7/Wr71rRKJUBQSUVt////l08GUPVWgAAYAeNKsxbQNAAhQx3/oKGMM6dZ1Yy6sajMbfKio7lNcv0sScZ47lNcw32ekVFMP9fp/f+mklI6at6u/dBMQuW6y+C5BcgwAA//PkZEomGg1HYGe0riWsCqbEwiY0BJFJMxrCcxGgQ2VK8xxCF1wsABgQBBgQBAYAFCkYCgALkK4fJ00E5ctJN1Uxy5au3XoGcM4dSN0EYZwzhW0WCh1PZwzhnFFQxtnbO2d0Kt6CdXbruggkTEX5Rs4TEQUVsdVXaCcuWXIBQUGmwmgoAGcJiM4dSioHQdBnEY+hjcbov//jcb/43G43G/jCRibfxugdBnDqULO2duvQumztncbo4xGKKNxugooxGIxQULoOgFgUMTA/jbrxiMDmETL+eLhcPThzOeeOZfL5fIcBYuXD/OHv8t//LJFxjxQYHHKDGFkZMtlmKM0RgQfbVtxFIHbQBDRuzRguEI1c9XZ/rWmrZfVU3Oc/9utNNygRQkCoHlAYstNN6DJ1IINpoINppv+WG/+g2mmnUmmmpBAoJIJhnwB5xkymn606Df/t000xhU03UXC5Ol8uFyXy+Xy/l8v5w4cLk4XAvwAYUvl/QL5fTdlKZkEEEEGumaKaX00zIOemf6CH///ywI3LKpiQ2Ef4xYWMSDyI0XwzikpL0ajVHZ3j9DGIjeuXcNfjn96/S/TUz/X/vX////5K/r+v7Jn+LlAoGZOIQIwMKBQM/yppKYURmhGZkR2b//PkZE0mHg1HEG8wyiD7mlwAyDU8nJHi5htakZmZGNiRcpkJhBmUmZYQcM1VDEEBggNDV/ASEZRYKFZIhkXKLlKmk7IVTKmZNJ5KhiqVUqpX+k7+qlVKyV/ZIqZDFDWTJlFyi5TJpKhiXKBQyZzIS5JhBoayV/AQWVpGWkcYTV5O/rIVSv8/0nkr+v6/vyR/X9f1/ZN8kf5/n99/n+f5/lTKmf9/mRP8yFUqpWSv4yJUqpX9kj/MmZNJ5K/z/P9J5P/v6yFUz/CEoywgUMqZkz/FssECIsVq0aPRrRRatFFFykQZJ2Ukl///5KjmksOaA7ALROJLDnEsLbq3GTMVrwb/0dGzmM0DlfBlHQOmrdR0MYi92TX6b/cmDHLclyUVYO/4O8sFTKFTKFf8yhUyhUyhXzKlDKlCsr/+ZUoVlSsr/+ZQqZUoZUoceMfcoZUoZUoVlfOPGcmDHKcpynKg9yXJcr3JclyXJclyYO+DXJclyfgxFZVb3KcqD/g2MxzsY72L9LubPR0dCyf5K5NNd+Tv9GXRdV0XJclyfcl/n+k8kf6SX/iVynvXf///4Mg/1OkxguYzmM5jMcLHMxwwGhgNCwXMLAcwMXTLi1MD7w7tmTdBvMmE0xQFzCwHMDAd//PkZGMpigkmAGOUvCfTgcgAuC+ITswMFzC4oMLhYMByn0xvU+p9Tr0xUxf/0xv///1PBYDhgNTFTFTGTGTGTGTGTGTGTGC4GTFMDAcLAdMVMVMULAcMBpgYDhcDGFwsYXFBikLGFwMGA4MBxgcDKfTEMUoAx2BisD+mKp5Tv1OkxkxkxkxkxkxkxkxlO0xVPJi/6nv////U7CwHTFTFTGTGTGTGU+p71PpjJipihYDpipi/6n1Ov//C4GC4GTGTGTGTFU8WBSZdLhWB//yKlotyLZFiLf8tyyRUipFSKkVGRBZQMiWC3yx//wxUGKsSvDFQGHUAL3QMsHDFIYpCYy2Bmagy6BjLgy6Bh3od58DCLAizBgRb+EQiyEQiwGBFuDAi3/////20QqSBJf/qcumv/////wMZdGXAYMu1gYy6MuBEZdBgy4BjLgy6BjLgy6BjLgy6BjLQy6DBlz2cJDLgRGXAMZdGXAYMuhMZcCIy6sJGaoGMuppwNRl3WBjLgy63wiEWAwIt/+EQi0IhFsDCLAi0GBFkGBFgMJCqaqYAgAYIhBBvwf7kwcqRq7V3IctacvlN6NxqgooxRRuNRiijEZjMGRuMvz9FGozQ+1X2qe1T1S//+VhaWAtKwtML//PkZEIkbgcaAHc1xCJrjeAAtfuUAtLAWf///mWePH95ZFgsyssvM88+jzO6K+z7OM48sH+WDiweZx5YOK+zxWLGJWsa6xadAv02fTZLSpsFpvLSga0tMgWgUgWmwgUmyWl8tMgWWmLSoFJsoFlpSwsmyBg4HhEdgwHAYPBwGDgeBg8HwMHg4DB4PBgOAwcOwMHLwDn5lAwcDgiDgYDwMHA/4MB3//+EQeDAdwiDwYLPhEWQYLODBYERZBgt8Ii34GLBaB5pfAZ0FvEAQ/UfwxULlx+IXx+8f5CELH8fxKhAIDFoHBEDRc3////gwHgaRXgMHYMB2EU/gwZ/gYbw3gY3QbgYNgbgYiAbgwN3/+EQbBEG4MBuDAbAwG4RBtAwbg2////+B9B6F//////////hEdD//////////8DRahEQGCInMNg3LBElgNjDciCwG/lgNiwGxWG///mG4bf/+WA3Kw3KyIMNw2Kw3MNg3MNg3MNiIMiQ2OK0xMiA3KyJLAEZgRARmBEDEYFwBBgEgEeomowol5YAJKwCDAIAJ8sAE+gGBgCJYAQUZ/13LubMu5dyiYOAhKwEFGf9AOoz/g4CFAIol/lgAjysAgsAElYBP////lgJksBM//lgRUxF//PkZGApggsIAHt2wiNLoggAqCz8RFSwIqYioipkjEjHCCSN/+WJg5iYOYmPK5krmTmZk5mZ8sTJYmf8yJiNiIisi/ywRmRkZkZGZGRmRERkREZERGRERkREZERGxEf///hETIMEyBiZEyBiZEzwiJgDEwU4DV2gQGFOBgmP8GAiAwRAiBgIgYCIGAi/4MBHAwRgjAwRgjwMEQIgMcgY8DBGCMDBGCMDEyJn///+BiYQIBlObj4eYLIwsjAOBGFkYBoEQ84eULIw88LIA88PKHnw8sPKFkeHlANAiAaFUDAiMYPIHmDzBZBhZB///8GBOA1sH/Awni7AwnhPCITwYE/CKzBgt8Ig8GA4Ig6EQdww4Yb+F1sIgtwYCwGAsAwWAsBgLAYCwDBYCwDBaHUDF+VEDKgC2BgtBaDAWgYLQW////gYLAWQMFgLAMFoLcGAt////4RMABmBSj4NgwMOGHBsHhdcLrwbB4XXC6+F14YcLrww4Ng8MOGHBsHww4Ng8AUC4AoMQMC4fgw3wutV4QIsAgFYIBWCCVgHeVgHeWABCwAIVgH+YBwB5aRAstKgV6Ba1oMg9avtUVN/qdLWciD/cqD3Jg6DFPuTB/////lYAn//mC8C+YLwL5gvgvGC//PkZFEpLgMKYXt2xB5LogAArbdc+C8VgvlYL/mC8C+YLwL5YBfMNgNkwXixDWoHPMc4VUxVA2TBeDZPYXzXl815fK14sLxYXvK1//NeXzXl815fMtdDLSw3UsMtLCstMtLDLSwsFhWWlgt//8sFhW6f/////+WF7zXl8sL5ry+Vrxry+WF/wMLwX4MC+EQv/AwvBfAxsjYAyqpKA0lpLAwvBfBgXv///4RA2DANAYGgNgYGgNgYGwN+EQvf/BgXwYF//8DC+F4Dd6NgGBf4AgFwbB0MMF1wuuDYMBsGwusDYOBsHA2Dvg2DQuuDYOhdcMMF14YYDGYDEGwfhhgbB0MN///4RBaEQWgZByoYRWYMFvwiDsGwaF1gbB34GDwdC64XW/w1aKxDVgatir4YcLrQbBwNg7////////////+ESfgZPyff/////////4MFmBvvMAERZ8CC5adNj02E2S0qbCBSBZaYtN///oFlpU2QMXIFAYuQK9AtAo7IxLTpsIFJs/5aZRxQawaxGfIg9CsrI+PUqkWdOHp7ODsOl6cOHZ4dsulfLI9/8BAAgMBACsBLACVgBjoAWAE5OTM6WDAR0zodMdHCsJLASWAjzCQgsBJhASWAjysI8wkJMICU//PkZFkeqgcaYDd1th6DogAAqCuIxQwtDA5MdMULgyY6YqnXqdep5TpMdMVRNRL/UT9AN6jCiSjKAZRNRhAMomgFQDfCIJwYCQiCAiCMGAkGAgDBJUA3eVAMEgj////8SrDFIYqh5g8kPMHkDzB5OFkYeYPJ+HlDzB5+AYVQDibCyIPLLEZIsjIliWS0WywWyyWuWCyWJaLZbLJYDHgLAItFvy3///4eYPKBlQTh5QYEODBb//hhoNg7/C62DYPFUKwKsVgNWBq8VkVcVkVUVYrH//hGff/8Iz8GT7//////wiX4ML3gwvgwvf4ML3gZeqoHVGyBl4vgZfL2F1oNg4Lrg2DcLrg2DQw0Lrhh8Lr4YcMNBsGhdcGBcMOGGAFGAGMQsF1guuGG4XXV/4uQXOLmF1kL/8lCXkuSk4O8/FzHzuP0hIucf/CIFAMCgFPgYFAKAwCgGBQCgGHYO4GBVM4GgQI4RCMEQKQOtQjUI1CNcI14MqDKwDIAGQDzh5wsjDyw8uHmDzYeUPN+DEYRRhFEIowYgDQgIhWDApgwKAwKQYFAYFQMKkYDOxHAzsRgMKBUGBX/h5v+Hm4ecPNh5A8wBwjhZHhZAHlDzBZAFkAeQPKHnCyILIAsih5QsgDz//PkZLQgIgsMAFp1xCGLogAAA2rkB5w8oeYLIQ8kPMHkCyGHnAMKoGmAgFkUPMHmDYAtfHPHNkr/JYl8c8lCWHPHMkqSo5onMAkBDnfJX//8IgDBgBhEdAaxSQMHUGAEIgAV4risCcipBOMVRVBO////hEvAxsAwvf////8MPDDww4XWC64XXDDww4YcMPC6wYb/wYGgiGwMplMDYhTCIaCIaBga/////8GA+EQdgYPB4MB4GDwdhEH8Ig8Ig8GA6EQcEQf8DBxlBjoAweDuFwgCQXiL//iLiKCKCL4XCiKRFwEgoRT4iqpMQU1FMy4xMDCqqqqqqqr////xuDd8fv/DVwrArEIg6EQdhEHAYPBwMB+ERYBi0WAwWAZ0FoGLYOB+JfgZ0FoGdBaDBYbn+WHm9xW7/Nzzc83PLDzc8reWlA7S0oHamx//6BflpU2C0qbBaf/8yk/ysn+VkMhTKQrKVk8yE8rIVkKyYsAn/5WC+YICmCApWCGTkxtKMcVWlgFMEBTBAX////0C0C0C/////////LTFpvTZLTlpv/0Ci0xaYtOgWmymyWkAxcWmTZTYTY8tMmygUWmLTIFpsFpv9NnywLmLCx2RgWmQKTZ98UjnzZ1/++D4M6/////3//PkZOgjIg8IAFcbxCaTogAAoCuIzfJ8vfJ8Wcs5fBnD5//++L5f////////6nCKv//+o0o0FUYwqDNGCwgUMKC0VVGkVv//4Yf8LrxVCriqDVoasDVuKsNWw1bisBqwVkVkVX//gy/4YYMMGGhhgwwNg4LrhdcLrAYWGAA0zBsH4Ng3C6/////4MAoGBQIDAKBgUCAwCgYEAsDAoEAwKBAYBYMAoGBQIBgUCYGBQIBgUCwiBAYBYMAoRAgRAoGBBMBooCAYFAkIgTEUxFv/EWxFxFhFoi0LhQuFiLCL/EWqTEFNRTMuMTAwqqqq//////8TWJriV/hERAwRgYiEYGIhGBmIRgYiEYMEQMEcDMSiA1GYwMR+UDMTkA7KIgMRGIGGM0SIrRGjRlhEV4jxov8rR/5YRFhEdQSViCsR5iRJWIKxPlgQYgSViSsR5WJMQJLC78IiKERF4REeERGEREERHwMRGOBmIRhERhERAwRAYiEQGIhGBmIRAajkgG5TEEREDBHwYIwYI4REXCIV/4MCmDArgwKAYUO/gYVCkGBUGBTgYUCsGBUIhUDCoUCIVBgVBgVBgUhEKQMKhUDCoUBgVAwoFAYFcGBQDI6oA5+qQiFAMjBUGBXCyEPIFkOH//PkZPMj6gr6AFdVwifkBdwAoC2Ilh5/8PPh5Qsih5IeUA0TAZrE8PP////wMRiIIqID8piAxEIwMxCMDEQjCIj//BiIDRo8Iogii/4MKwYVhEoESkDEiIGJEgYlfBgmDBIMEAYgSBiBIREAwSERH/8I7wPfuCO4I7v/8GBvAw3Bv/////gwN34RBuBg2BuBg2BuBg2BuEQbhEG+EQbAwG4MBtwiDaDAbhEGwMBuDAbAwG4GDYG8DBsDcDBuNwDRWDcIg2AwbA34RBv///CINvCINgMRIN/////wiG4DDeG+TEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq/zB4OLAP8rBxWDisHlYOKxb5WLTFgsMWiw18LDOnjPxZoxadDOgsLAtLAbKymVhsrDZWG/LAb8w2GywGysNlgNFgNGFwuBQuWnTZLToFFpisLJsFp0Cy0voFAQLFZkMCAQwIBCsC/5WBCwBCwBCwBCsCeVgUwIBCwBDEwEMCAQrAhgUClgCFgTlgCGJgJ5gQTGJwKWAKYFApgQTGBQL5kY0HMjQYnAhWJvKwIWAIVgQrApYAhWBPBgECIEBgE/8IgXhECQiBAMCkcDEwEwMCAQGAQIhoIhsGBsIhvgwN//PkZN4irgr2AAOVqiUThegAnCtMgwNwiG/8IhuDA1hENhENgYbKYHb2IBhoNhENAwN////8IhsDKZS////8IhuBhspgc0KQRDWEQ3///CNf4GAIMDAwgAwAAwhAwAwYAIgwiHBgAMAYGAAGHv///CIBqBqESDEIgRYGoGHBiDEIgGoGgMAYgxgwgxCIETwYFYMCoMCuDApBgU8DCoU//gY3G//wYFOBhUKBEKQYFfBgV8IhSEQoBkYK8IhT/wMKhXBgUCIU4RCoRCvgYVCsDCp3A1SqAYFAiFP////gY3G1TEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVgwCAwCBEC///////8IgUIgWEQIBgUCAwTQMCAQDAoEhECAYFIwGaRMBotWAasdwH/KqBmhFgaKI4GRgKVpjCBTCBPMJHNMFMIFKwnlgJ5hUxhUwGWlpAMuMuWLTFpvQKQLQKLTIFJsoFIFFZb/8woQwoT///MIF8rC+WAphAphAppgpYClgsmwBC6bHoFFpUCi0wGXFguWCwFLgUsgX6BZaVNj0Ci03//+EQKEQKEQLCIFAxMBcDAgFAwIBQYBODAKBgUCAYEAuDAKBgUCAYFAgRAngwCgwCwiBIRAmE//PkZN4iogj2AFdVxiUrhewAhOkwQIBgQ0gbOI4GRhOBiYCgYEAv////CIFAyMBQYBf///CIF8IgUDAgFBgEAwIRwMCCcDEwFAwIBf///CIEQGMDGEXCKBpCIDCEQDCAsYInDFQMMAuYSoTQMVfBlf//+DKfBgAiGDAQMIMIgCIQYADAEGAgwP////8ItgNu2/8DAAAiABgHhECBgQGEQARA8GAeEQIMABECEQIMAwYBBgCDAARA4GAAgYACDAARAwiAgwDhED4RABEBCIGBgDoH2dgZwCBgAP//BhX/+DCiTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqF1ww////////hdeGGDDBhwjeF102E2fTYAowMLjE0zTDfyyMYjEDJTwMLSwFi0/gQLoFIFpsegWmyBQsWlQL9ApNgtIWn8tMgX6BaBX+WmQL9Nn02f9NktIgUgWmwWl9Avy06bCBSbJaUtImyWkQKLTIFgYWoFFpAKFwMLzZgwAwvLTIFlpU2fQLQK///4Yf4YaF1sLrg2DAuuDYNDDQw4NgwLrhh4XXC64Ng3C60MNwbB4XWC64YcMODYPCJYDlMQBlwRLg2DOF1v/////PkZM0eKgz0AE+UuCnLFfAAk3Fsg2DAYX/ww//4YaGGDDhdbDDACFwMuXA2DADlygusDYOBsGhhv//wNU/CKQusF1oXX+F1wuuGGC6wXWDDBdbC6wXXhHv//4AHIFgC0BZAA4Ba4FkADwFsC3AtQAOcC0BYAtgAcAA9+BYAsgW4FvgWOABwC1oq+it4RT0VVG0VFGkVywo1/RWU4U59TlFb1GvRX////QK9Nj/9AtNn02fTY9NhNlAr/QK//TYTZLSJsIFemx///oF/5aZNj02U2C0yBaBfoFAS6bKBfoFVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQiA8GAO/4RAf//////wYA4GAO+EQHAwB4GDoB4GA4HQRB0BhlDIBpEAcBgPDIBgPAeDAHIFAYuLTpspsJsFpi0haRApAtAstIYKClgF/ysF/ysE/ysF//LAJ6plTlYC1ZUypmqtWVK1VqyplSFgBaqqcwAAVIqcrEBAAKmMBERCQhwD5iICIQEyABMAABBVGXF4gIA4DLAAWAEQgLVSsBaq1ZUv+YKClgELAJ////5YBP//LAL5WC+Vgn+WAX/LT+gW//PkZMIhLgrsAFt1yiD7FiB6A9qwmwViybCbCbCBSBabCBSBabPpsegWmwWn9ApApApNgCGBmEwWlLSpsf////hEHgYOB3////4GDkiBxMHhEdgYOB4GDwcBg4HW23gooFYHd/+BnAz8O8Vv//FaBm4rBWh38es2zbAtD1m2PVBqBrBqBrAF7AF3/5el84MkuHTgyy+dL0dRnEajMIyOn8RsZ5HGG/kbIpHIkYUiD0y2WctlZaWSwrKx6FZbxnL54ul04eLhw9Ol84dl86cOHT3Ipb5Z8qKpVx6/j0EkLctVTEFNRTMuMTAwgWQLQAHgLf/////4Fn+EQESEcIgInCIRW9TkrCzH0YIjjWtI+YeCD0woLCBQwsKRWUaRVCBZFZRtRtFRTlTlThRtAr0C0C//02E2fTZQK/0Ck2f9TlFRTlTlFT/9TlFVFRFb/9ThThynIQbWkAREue5S11rKdlkDEVABh61ExYPU+tOD4MQgcn4iwigivxFRFoXDcRQLhoiwioXCeAkFBcNiL8RURQBIKEVEWiLBcKIqIpEXC4QReIoIpCIKAQMxFAFAsIuIr/4YYLr//ww4XWBgwC64XX/hhgw3hhwuv8MNhhguvhdcAUYgaYTAAoWDDg2DQbBg//PkZPYe6gzuADd1uDKsBhBAe89cYYdGjtDT2hDmlD2leaOv9oX0OX/0NNLplNf8ewakNWGrTfTRpphNJtfaeh7T1/tStdtTpqN532lpX/1/kmQ5eaf2hoaV9paGleJAvd0rer2pWu1ar2vk56vVrV5Hj1Nop+/lfv5Zpkem5kX/2vtata2rq783nbvtbW6VjW6a2rq13+rO6VysV58K7tbp0ru6Vrtqa1a67tr6sau1ulYrnfa2v927Vrt21NSuN5X927/D4diAQANh4gEIfxB+IQG/D/4gDw/iGIRD+HRATEFNRTMuMTAwqqqqqqqqqqqqqqqqqiIEK/ititFX///8VcVuK38VsVhXBOQTpq/qm8QCAcBmIxgdfFZCHECpxFBFAuFEUC4cLhsRTEVEUDVoDQD+KrFYirFX+KwKoVgVUVUVeKwGrhWRWBViqFYDV4rMViKyGroauBg/A0YThVgNAEVQqw1fisis4quKxxWYrAatxWIqoqg1dFYxVxWIrAavAaAArIrAqoqhWYrIqvxWMVYrARCADhcKoVYavDVgqhV4qorIrHFWKuKxFViscVUVYasAaAfFY/4YcMNhdfwuuGGC64YfDDA2DwusANygbBwAxhAECwNg8MOF1hD4//PkZOkc4g7yBjd1sDNkDhgqYwtcYoUyiQ0NCkxQ0NCQkSIbGKIyRGEo5mUaNEhGKEHMmaGhI0UokORvMmZmZSZSiMZQkRnKKZkzRoSNCQpQ0NEZoaNFJkhh3KOUJEhIcoSJCQkIzlDlEjMDMyMpQ0JCQzNCRGaNCRISEZoZihoaIwlEHKNGiMzFEjRmSIwlHMyZmcyiGyMxRyhIkIxRSZokSEYGBkiRojAPESNGjQxvKHMmMoSKTJCQkIwlFKLDYWGhoZhYWAAUGBsAwsMDYUAcK4XDPhQVwwLAH/DfgHC6TEFNRaqqBgjwYI//wYI/8GCL///+DBFhERgwRcIiPAzGYgMRKIDcskBgjAxEIwYI4GiRwNEjhFH4MRwYjA0aOEUf8Io/BiLgxGEUYRRQij/BiKDEYMR+DBGBiMRQiIgYIwiIwYIgiIgMRGIDUSjhEReEREBiIRAwR/wYI/8IiP4MEcGCIIiOERH8GCIIiMIiIIiODBHBgjBgjwiIoREcIiOEREDBFCKiAxHJcIiMGCMGCLwYI8IiPhERgwRAwRAYjEUIiIGCP/AxGIgiIsGCL//4REYMEXhERBERhExhExAzyAZiEWDBGERGeKsVsVRVFcVwTnFcVxVgnYqipFUV//PkZPkcfgzeAFaVxDgUBgAgatvIYrgnYqgnQJyK4riqK4rwTsVor4rQAjABAgnQritFSKoqQTsE5C1haxfF7F4XQtULSFqC1i4LwWkXIWkXRdF+LwqAnME4iqCdwToVuK+HAERWAkAlgJB0OB3Doc8OYc8VCsVgIB3DuHAERUAkAkHMOBwOAIisO4dwEAEAEg6AkAl4CeHA4AkKhXioBIOiv8OB3F+LgWkXxeF8XouxcF0XBeF8XBdF8XhdAdouC8AEsXYWsXOKsVBU/FaKmK/FTxXFbFUVPiv/8VfxXitVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVAXX/8MN/wwwYf//DDBh4Yf/+DYODDfCIFAwKBQiaANFgUDAgFAwIBcADwFuBY/At8C1wLfgAdAtwLGBawLcC3AsgWeBYwLX4XW8LrBhgiFgMlhYLrhh4XWhdb8MOGGhdcMP4YaF1gw8LrwuvhhoYYLrYXWDDBdcGwfC60MN/ww8GwZ4XXC64GZQsF1wbBnDD4XXg2DcLrBdaDYPhhgusF1uGGC64YfhhoNg0LrQwwYcMNC62F1/g2DYXW4XXC6+GH8DTIW4YeB/wR/wjwR+DP/y06bJaRAtAtAtAs//PkZNwY2grqBFW1xDhTRegABLBstL6BRaVAstN5aYtN/psIFf5aQtIgWgUWk8tImyWkQL9Avy0qbKbKbJaf02f/0CkCy05adAsC3K7+mx5aVAv0C/TZ8tOmymwB2pspsFpPLSlpy0qbCBSBXlpk2E2E2C0paUtP6Bfpslp0CkCy0ibJaZAosWQLLTJsemwgUmz6BZaYtOgUWmLTpsJsoFJslpPLT+mwmz//6Bfpsf6BSBSbCBXoFeWk9NhNhAr0Cy0/+WnTZ8tJ/oFf6bP+myWn//8tMmz/lpf//////8sPTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVBgJwiCYMBP//gwE//////wiCAMEgkIggIqIDKpUCIIgwE8IzA4j+EYhGAZMIyDJA5gGRhGcIyDIhEQiIGAgwIRDwiAGAAwYMHBghGAZMGRCMhGYRgGRA5gIyDIwZPBk/wZIRmEY/gyOBxIMgIzCMgcTgwRBgjwYJBgngwTwYJhEQBiBGERMIrwOouAxAgGCQYIhERhEQDBGDBAREgwTCIgGCQYJgwSDBHwiI4MEAwSBiRHCIkGCYGJEQiI/Bgn4REYREeBiBIH6XhERhETwogoy04mpZibFmJuWYmx8n//PkZN4ZrgrkAFZUyDcjofgAA9qc0HafZ8HwNrjaG3xtjaDtJwTo+D55Ow7fxNRNSyLPlqJsAr/lmA/FmWYm5acTQVgTkVQTnBOQTgVxVBOBVFWK4J3FUE7gBABOwToVQTsVhUFcVRXBOhUBORWiuKkVYrCqK+KoqgnQrAnEV+K8E7FQE5xWBOQToVQTsVRW8V4qRUFYVgTsVhXioKgrCqKwqAnYqCtBOhUioK+CcisK8VRUFSKnirFQVBVFcE6FcVoJwKoqCrFXFUE7gnAqiuCcQTsE7xU8VP8VYrgnYrCuTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqn3/l/J/8vHL5f/BhwCETgGpIDOATgEIOFoDcHzgEIDgC+pG7eve1S/6tat7rXupDXSStWoIpGS4TSMQNIySMwpIyAaRkkZ8GJGdBtbwYkZ63tCKRkoIpGWDEjLCKRmEkjOvsEUjJOsIpGa6bOrgxIzsEkjIGJGYUkZVKCKRmqoDkgEjMJJGSYMSMAikZJ3qhp0dq9ru3X1I36FujPbXuxwKbr//waABfg0AC6DUDUDXBqBoAmQawJiGrhqDUGoN//PkZL8USgKcAAblrroTgfQAbhtQAag1QawaYNIAuQa12Lv9si7F2NnXa2Vsi7i/DZl2tlL9l+vL8tlUTUTUTUYQDIBlGUAyifqJKJqJ+p5Mf/U7TETEU7CxkxVO1PKdqeU8u4vq2ddnrsbM2Zs/tl9s67V2NlbIu5sgaA1Q14ExAmAaA0BrDVDXhpgTPDQGuBMA0gTKGgCYgTHDQGrDUGgNcNQaw1hoAmcNIaRIAtALVEgC1gteI8FpBaBIAtcRwkAWgFpBaILVBaIkAWgRwjhIiPEeDXwa/4NUGr+DRwaKBgX/8IhP//wiF8GBMGBP/wYEhEKEQmEQuDAoGFTAwLgwLhG/4MvCM8GSDJCNwZQOXg2DwbB8MPDDhhuGGBsHhh8Lrf4MCQYFCIUGJgiE8GBQMIFhELDDhdaGHhdYGwaGGDDhhuDYMBsHg2D8MMGHBsH8GwYDYMhEKEQgMCeDAsIhAiFBgQIhAYFhEKDAkGBMIhYGEC4GFCBELgYUKDAuEQsGBQMKEwiEBgUGBcIhQYFwYFAwgWDAoRC8GBAYE4RCgwKEQvhEJgYUIBhQkIhAiECIUGBIMC4RCgwJCIUGBAiFgaYLwiEA5cGXCNhGBGwZAw4Ng0MPBkqNqcoqorlh//PkZP8cygrkAFI0wjo7lfAAjhq4SnPor//psoFemygWmwWm/0C0Ci05adApNn/TZQLU5RU9FRFVFdTn1OFG1Gywv/UbUa9Ff0VoFgCwBbAtQLUCzAtgAchHAN8ImAbgBvwDd4RwjQDeAN8I0ImEQEQAbwRgiQjBHhHAN0A3vgG6Ab/CIhEgG5AN6EQESAbmEYI4RABvYRoRABuYRgDehEQiAiIRABvcA3QiQDfwjwDfCICPCJCJCJ4RwiYRwjBEwDehEYRgDfCNCOEQEQEcI+BagAd4FrAscCxAswLfwLAFgC1wLNVMQU1FMy4xMDBVVVVVVVVVBlBkwO3wZAZMIz//////+DJwO0IwI0DsA7cGUI34Rn4RgMuEZgywZQjAZP/hGAcmDKEYDIB28GQGQGXhGgcgRoMgRoHYBywZAZYMmBygyQYFCIUDChQYE4MCgaYJ/gwKEQsGBAiEBgXAwgQLrhdcGwcGHBsGA2Dgw4YYGwZC6/hdYMMF14YcLrYYcMPDDhdYGweF1oYb4MCwYEwYEgwJBgTCIQGBIRC/BgQDCBcIhAMKFhEKDAsGBQYFAwgTgwKDAoMCQiEgwIBhAnCIUGBQiFwiEBicIhAiFhEIgIoBooGieDPA+4GeDPCP//PkZOobXgrkAEY0jjazieQgBKKIBGgyBGhGhGgyAdoMmEaDIB2gyhGwZYMsI0GSDIEaDKB2QOWEaDKB2hGgygcoHYBygdkDtgygcngyAyhG4MgMgRgRmDJCNBkA7QjAZIRoRoMuByhGgyAyAyhGwZYHKByAcgMgRoHIEbCNCNA7fCNA7AZAO0GSEYEaDLA7cDthGgyAyAyQjAOwGUIyDKEYEaEYEYEaEbA5AZQZAZAZIMgRkGXBlBkCMgyAyQZYMngcmEb8GUGQIyDIBywZAZOEZhGBGwO2EbwjcI3hGYMqTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqquDqz8GMDQIvBj///+DGDEGAMAifBj8IuEThFCIEQGPCLwiQYBFCKESDCETBhhGAZGEZ4MjgcSEY4GoRQigxCIEQGPCKBiBrgxwiBEwMIRAY4MQNMIkImDEGIRYMIRYRAYhFBjwYwNQYgwBgBh4GAMQiwYgxA0gahFBgBjgYBFhFhFCKEWBgEWEUGEIgMQYQMYRAMQigxhFBh4GkIgRIRYRAY4RIMQYgYhFA18IoMQYQihFhEgwhFCIDEGIRQieBiEUIoRQYhEwYDAFwGrBog0waAaQawacGsGiDQp9MZMVT3piJjJjK//PkZOYZBgjoaUJQ0DprofQgbhq0dep71PqeU69TpMdMVT6n1OlPKdJjpiKdFZkxlPKdJiJj+mKp/0xFPBoAmYaw0BpwJhDSBMQ1BqAmIEzDSGgNXDRDRhp+GsNMNAEyAmYagJkBMA1BpDXAmECZhoDXhqAmYawJjgTICZBrDSGsNAExDVDQGqGgNHDWBMIaQ0BrAmcCYgTHAmIEzDWGgNYaOBMw0BqDSBMYaA04aA1hqwJhw0ATKGqBM8NYEz4aQJkGoNMNIag1+GsCY+BMQJlDVw0cCYfDXw1ho4aQ0gTCTEFNRTMuMTAwqqoD37wjuhHf/////hGf////hHf/gycEZwRn4MnYMncIzsGTwOdOA507A507hGeEZ8GTuDJ4Rn4HPn4Mn4RnhGcDJwM3YM3gzdBm6DNwR3QjvA927Bm//Bm7Bm/Bm8GbgZvBm4GboR3gzeEd+DN8GbvBm6EZ+Bzp4Mn4HOnBGfA588IzsDnTgZPCM8Iz+EZ/CM4DnTgOdPBk8Iz4RJwGTidBi7AycTgiT4RJ8GE6ESdhEngZPJwGTieDCcESfwYToMJ3AycTwiTsDJ5OhEnwibwYb+ETdwibwibvCJuwYb/4RN/Btf/jYGyNv8bHLUtSzE0/LQBW//PkZPQcHgjQAFKVrjfDmgAge1eMLITcshNy1LX8si0LUTQtCyLQTUteWQmvLItSz4mgmnTJops0umEymDSPsnR9HwfB8k7Pvn0fAvwtcLXF/F+L4vQtQWuFoC0BaReF7AeBfwtcXBdF4XheFwXAtAui9C1haRdi6LwvirgnUE6FcVBVisKgrCvioK+KoqiqAhh3AQFXhwVYrFYCWHMOioVAI4dFWHPDgCAdDgdDmHcBIBEO+HRWAiKsBMO4dFQCAdATw6HBWHBWAgHBUHMOf/gICsOCoV4qw7+KxWHA6KhVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVC11Fz1+NP+/Xkqpr9OfuhQ6lZNWf+XsZc/si+KNoOj/Ntai9j7IISgZAklTqQhjToNTeQoreRdaSDODWvYAVFaWWkQmVuZPP8bRUzq896vc+XS6mm5gnnW7JLnV4z9N5XnW4k86x+uyHyxnWkmdborzraff2SvOtvljOtjd/5XRW8MivOsry/K3gUzrFPS1eFTOttTsul1+lLGdbV3c53h51mdbK7xPOr1SpnWlM63kedZnV4XPK86onnW7myrnWTmRTOqascoabXd/L+yuzS95dv1efjhl92ntYyTuIb6wuWRZFmWRa//PkZOcb/gqMACDf1LTLofggA9qc/gKRZiblqWYm3E24moSQnR9BJj6JwfBaFqWZZFoWvLUshNPxNuWn6bTZHgozRTSaNAY5oGjFQVgTkE6FUVorioK8VBXBO8VRUioAhxVioK4qAnIrYrCqKsVRVBORXBORVFcVcVwTgVBUBORUisK4rCoKwrxXFYE4FYVATjFcVhX4rcVBVFQV4rxVFSKwqCpFcV+K8VhXFYV4qivFUE4FaCdivBORUBOfBOgToE6FUVYqisKgqCtxWFbFQVxXisKgqRU4qioKuKwqCvxVBkH/4Mgf4Rg4RgfgxZBizhFYEVuDFvhFbBi3CKyEVsGLf/4MgAxaDFoGsWYMWgaxYBrFngxaDFnCKwIrAYswNas+DFgRWYGtWYMWBFZgxbgaxbgxZCKwGLIRWgxZCK2EVmDFmDFgMW4GtW8IrAYtBi3Bi0GLAYsCK0IrQit4MWeEVgRW+DFsI9cDW9AYtgxZhFaBrVgMWgxaDFvCKwIrIGtWhFaBrFuEVvBi3hFZA1i0IrYMWYMWAxaEVkGLAisCKzBizCK0DWrIRg+EYIRgQjABkHwODABkDhGDwODBgyAEYIRoRvww4YcKILYKILfhRg5htjY4OQbQ2hNAH8su//PkZP8cRgjWAFAUYjwDofQAi9pcJry1E1LUsuWvE2E0LQTcB+E2LMTctQFEEcWnFYVwTkAI4rRWFYE6BOhWwToBBAQgnIrisETANwIiAb/COEQEbgG+EcA38A3wjhGCMEeEaEeKoJwK4J2KoARBVBOIJ1FWKoJ0CcCuCdRWFcV4rioK4rAnYJ2K0V8VYr8E4xWFUVBVFQE6FXBORWFSKorxVFcVwToE5wTvBOoqwToVIJziuKwJxAQgnUVBUgnAqQCaCdxWirFaKwrRWFcE7FfFeK4rgnIrAnYrCoKoqgnAqCrip4qgnCr/////8Iu8BjvP4Ry5/8Izggc4Zw4RnD/hGcP8GThBk4eDJwgycIMnDwjOD4MnBA3eu9hF3kGO8gx3vBjvAN3jvMGO8CLvAY72DHeAbvXe+DHehF3kGO8gbvHeBF3oG713gG713vgx3oMd5BjvAi7wGO9A3eu8BjvMDd470Iu9wN3jvQY7wGO9wN3jvIRd4Bu9d6Bu9d6DHeAbvHewi7yEXecGO9BjvQN3rvIG7zykGO9A3eO9CLvYMd6EXegx3gG7x3kDd470Dd472DHewY7yDHeAKomwmhZFkAof8tCy4m5aCbcTUswFYsy0/LQTX9NBqBgJgYaY//PkZPcaTdCuAFgWlkI0DfQAe9r8Jxz6CShr8++JsArgjxNBNC0LQsyyLMsgRxallyyLIsi0LUTUtS0AVwFPia8si0LMTXiacsxNizLMTYTcsi1LMsy0E2LUsuJqJvxNyy/E1LMteWgm4mpZlkJuWRZFmWnLQTfgncVATkVcVQTsVIqQToVxWFeK4rwTmATCsCcAnQJyKoriqKwrxWiqKoqwToVRWBORWBOBVFSKgq4qAnAqAnArRVgnIJ3FYVQAgCriqK4qYqivBOsVoJwKgJ3FYVBWFfBOIqCoCcivipxUFSCd4qRV4rCvFaCc/BOhW8VxWFUVhX4r1eX/+DHgaYMOEX/CJgwwYQY8GODH/wYf4RAiQiAxCKBj4GAMYRQiwYcGEGMIoMfhECIBgEXAwCJhEA1BjhF+BhCIDEGARYGoRAYgxCLwYeESEUGMDEIoGAMAiAwBiBrCJ8GMGGEWEUGIRYMAYAxCKBiBgBqDDA1wiBEBiDAIsGIMANANMIoMAYhEBh4GMGMGARfAxBj8GAMANYRAYBFAwCIBhgYhEwNQMYGIRAMAiwNYRQi4RQYwYgahEBiBqBgESEUIqa6Z6bTBpGkmUwmkwaZpJlNCkifmkaaaBymgm0wmRPxSDTTa//PkZOYYTgboZUAQIkCEFgAAe898YTZpJtMJhNilphNdMJhMGgmemDSNJNmkaX6aNJN9MJhMc0E2mzSNJMpg0umU2mDS5oJlNJtNJnpg0DSTBoml0wmzTE8TRpGgm00mkzzRNNMJg0jQTSb/NFNdNGl02KTzRTfTPTSbTKZNLphNJpNmgmUymkwaaaTKZ/TSYTBoJr/ifptMpr9MJlNptMpg0kymumEwmf+mEwmOmkymTT5ppv80eaHTCYTHTSaNBNJtN80/0yaBoJo0k2aPTPNA0OaSaTJoplMJv9MgBAB4MBUGwbwVwUBkFAYDAU4NBoMBqhAELk//h/y1/vz6/6zMnEglwqnIsVSHBzAMMIqXiLgxS8ucoLCKl7VwipeupwYpeAxS8Z22hSl4U+qE1L2goKUva1GUJqXqwkpeAxS81IQpS8smBqXql6E1LyEVLxdEJqXoSUvAmpeJhFS8rpH3CKl6EVLxPWFKXgDUvVL1LCal4kuDFL2EVLxFlPClLyEVL2FKXhdwYpeswGpeqXkGKXqLAxS8wYpeqWk8KUvATUvQYpehJS9Bil6yoUpegipeZT2x1vN5NR2X3KrRuXjFmaS0AUCyE1BHflmWZacTYsvy05ZgAIs+WQCqJoWZ//PkZOwZ+gaYBgbm6EQMAfQAe9r8ZCbiaFkWv5ZibialoArlryyDtCSnyfR8hrE7PpNmiaIxDTGKafTJalqJoJoWQm4mnLUtSzE1LUsxNyy4mpZlqJpy14mgD8WpagKvLIEcJuWnLItBNhNhNxNgH8tSyLMTflmA/iaCaFqJqWf4mxZFmCdCvFWKwqivgnQJzFfwToAIwqgnOKgqCoK4J2KwqisKwJwKwqCqKgJwK4rYqirgnIJ2K8VhVwTmKorYrioK4JwKwrRWFQE5FUE6BOwTgV4qYqiuCdAnYqAnMVBVFUVATkVBVirioKoqCviuK8VwTjxWFfivFUVxXBOcVuKvFaKoqiuCdeEW3Bjb/gxvhFvCLYGN8GNwi3CLf8DbtuEW//CM7+DG+EW+DG8DbNgi3CLfA2zYItwY3gbZuDG8GT/Bk+DJ+DJ/hGdCM+EZwMnQZP8GT8GToRngc6dBk4IzwZOBk8GTvhGdBk+DG8Dbt8DbtgY2CLbBjYGNwi2A2zYDbN4RbhFtA2zcDbNwNu3CLaEW4RbeEW2DG8DbNwY3BjYDbNgY3A2zYItwi3CLbgbdvA27YGN/CLaDG4RbgxsDG4Rb8ItsI7oR3cGb00m0wmTT6aTZoJgUpMc0kwaa//PkZNcYqeLUAAAUHjw8DgQAe88cYTXTXNBpXiQdfLVpLJoaCSJs0TQNAbRpJpDWleaGlDmlfQ9fQ7tBZoa0IeOw3Ccq44TcHgrufDVzQNA0Om0wmDTNE0EymkymumU2mU0aSY6ZE8NFMmiaaYNDptMGn+aJpdNptNps0OmU0J50wNtMGmmEz/zQTJpppNplMJlM9M8FAYCoKAAApgqDIMACwAQbBsAMGQAQaCkGg0GgyCkGeCgNABwAAUgrwA+CoAQNAeHCAOAeAyIQHBwgDg4QYDAGgMEEOEAeA0Q4DxAHh0PEMGYMBsFQYDPgoDMGQV4NBqryAZfhGfwjMDl4Rv/wjcGT/4R/CPBH//hH4H3gzv4M7A+/gzoR4GdBnAf+DPBnwj4M7BnwivA1QIpCKcIpgaqDFgaqBogMWBqgGqgxQinA0XBi8IqEUCKBFcD7/CPwj0I+DPA/8GfBnQZ8I+EeCPwZ4R6EfhGcI0GSDIDJCNCMBkgdsIwGQDkBk4HIEZgy4RoHZwZQjcDtCMgcoRgRoRgHKDJBl4RgHIDKDIEYEaEZgyYMoRsIwGQGQIwGUGUI3A5AZMI2EaDLBlwjQZQjAjAZQoqIqqN+pypx/qNIqoqqNKNKcqchwGrCAPqN//PkZOsaCgjiBUZRnkhEBfAgw9tw+iu1RUqp2qNUNalOVG1GkV/U58sLU48sLLCiwFU4hAYA+qQQgasVhVIYQNWKwmAKpvasNoHIDm4OQHIDlGwNgbH4D+JuWQm4mhZFoJsWgm4I4TcbA2xtA5ODnGyNoHJ+NgHKDl/LMBXLUtS04mvLQteAqCaCbFoWQmha8bQ2Acg2ht8bI2RsjaGyNrjYGwNvjbByja/GxFYE4ipBOIrwTiK4J2KuK8BAK4rAnAJwKkE4FYE7FUVgEIqgIRVBO4qRXFQVBVBOMVwCcE5itBOoqAnQqCpBOIrxVBOoJ0KwJxgnQrCuKsVBXioCcCqCdAnYJyKsVYqipBOgjwiAj/8InhH4RMIkIioAC4RiJCMRP////CNk//Blkv4M6F8I9C/8GWT/8I2SwjZOEbJQZZIGWShGyYMsnwj0P///CPQ/hGyQRsn8I2SCNkgOyVkoMsnhGyQMslCNkoMsl4MsnhGyXCNk4MsmEbJ/wZZP8I2SA7JWTgyyQMiKDIieEYiAcRIihGIkIxFwZEUIxEA4iREgcRYihGIoHESIkDiJEUIxFwjEQIxEwZEWDIihGIoRiKEYiHcYJRIr9kzDmO5cIaApXE/NA0TTTKZGym/0//PkZMQWjdCsAwAWCsQ8Cfwoe89cyaXTKZACgKxsmybQFQCyPQPUbRtA9x6QAoegHKmRtClpk0RSkwaCYE/GyaaZ6ZFJTaaTCbTabTBomgmk2mxS0x0waSaTI2gcgOcT0T5MiedM9M9NCfCeGgNhMJlNJoT1MdNJhMjaNPptNGkmhtpnmgmv+KQmRSE0aaY6ZTKZTRoJg0U0aBopg0emU1/xPzTTaa5o80DRTZoJs0TRNEUhMikJs0P0x0wmkwmUymkwaKb5pppNJg0OaInhpGgmeaSbTBp9N/ptNJo0DTNAbOCkGAwGABgA4NgwAAAMAPBgAQKAyDAZgoCkFINAABWAEDAUBTAABgMBTgqACDcGAAQYDAUqLUlVt///+Bj4MIRcGH/hE//hEwY/wi8GPBj8GH8IgRcIv4RYMQi+DAIsIsIn8GHCLCJCJ/BhBgBpgwwifhFhEhF/gwCIDAGIMIMAMQYBFhFBgDH4GAMQiQNAYAwwYBECIAMIAMAAiHBgAMIAiAIg4MABgABhADAhEAGAARCBhCEQhEIMABh6EQAwIMABgCEQwMAQYD4MDCIcGACIQiHwYGDAhEOEQ4MAENB8hJD7PsnXJ0fZ98+D6LItQR3PgnZHmgPYYRopk0xj//PkZMkU/gLsKkITrkL0CfzIetvgJtNdNGkmkwCPLITf8s+WpaFmApAjgFUsyz49jSTCaGMmkyaRZlkJsWpaiagKBZlmWomh8c+CdcnROj4Pk+Akh9E6DsJ0fJ8c+OTs+idk4J2Tg+j7Pr8nB9nwfAa59k7598+D74Sk+eEkFQdDmKsOhwBEVYCeAiAmAiHcBEV4CYCIWmCHF6FqC0haRcF4XYvxfF2LwvC+FqC0xcC0C/FwLSFoF0XBfi7C0xei8LwvcLQLoWoXheC0BaIWoXBdiNiMY6cZ8RkZxnjqOojAz4zx0HUdBGozjoMw6iMjpxdi+L4uC5F/xd/haIui/bZ/+DGBp4RYMQYgw8Ivgw/CJ4RfBh/hECKBgEUGODH8InhFwY4GoMcIgRIMcInCIBrBhCIESESBp+DEGARfhEA1gxBjBj4RAYQYgxgYwiYRcIgMAiAwBjCJgYAawYYRQMQMAYhFgagYhEA0AxA1A1CJBhBgEXwMQNAihFhFAxwYAwgaYMPCJA1hEBiBrwYQiwYwiBFwYhFgxgawihFCLA0gYAwCKESBoBpCJ4MIRcGOEVB9ALR8BJj7/PonB9HyEoJwfZ9E4Dt5OeTnlqJtxNAH7nwfHPonJ8E759E6PoJI//PkZOAWKgjoZUAQYka0Ffgge9VcfZOCdE7J0To+Cc8JWTo+D7J0EqPoO0+T5PsJSfJ9n0TkJUfJOeTknPPo+z6J2Ts+ycE759/k7Pg+z5J2TonBOeTkJUTg+T5DtJ0Tvk5Pjk5DXPg+idH2HYfR9E6PgnR9k5JyfZ9cnR9cNYJSfROidE6Ps+Cdn0fB8E6DtPs+CdHwfH5OAlR8nyfB98+SdE4J0ff5OidH2TknfPkJMfYSg+Cd8+D6PsnP/JwTk++fYSQO0+D5J0fZ8HwTjn2AWDgdAL8ApALQCkO8GACwMgyAVBiAVhzwY4BeDIMgFMOh0ArDgc4BeAV4cgFsOhz/wP225HGw7wCsO4M8AqHP/+DEGQ7/8OgzgFoM4Bf4MhwO4BT4cDmHcGfDnw78GcVhUFTFXFeKoqYJ3isKuKkVgTsVoqCsKwrCoKsVQTqKorYWoXhfxeF/xdi58XOL4WmLnFYVQToE4FXiuK0VwTnFQVRVFcVhU4JzFfDgdhzBnDuHfALgyDAMQZBgGQCgBUAoDAMh3BkAsDMGcGAYgxBn+HAC0ArwCwMAS5adAry0yBSBfoFBVaKqKwVUVrRXUa9FUOEqVUjV3ySPLkvkzlNlNn02E2S06pvVKWACECpW//PkZN8VDgj+zymq5krb1ewAxJvkqe1XysDVFSqlVIo2o0ispyFVoqKNIrKcqNKcKcFhSjaKiKyKhYWiv6nCnCKijajSnPorKNKcKcqcIrqNoqKNqcKNoqKNKNqNKcIqKN//orf6BSbKbKBSBXlp0CvQKTYTZ/0C/LTxFxFoigioigCLC4cRYRWItEXC4cRcI0IoFwwXCiKwjQXC8LhRFcRcRQRSFwoikRcLhxFRFguHiKRF8E7FYVhVBOgCYVRUACKKgqgE0E6ACJFYVoJ0CcgnQrAnMVwTgE6ioKoRwDdhHhG4RARgDcCMEaEYIiAbwRIRuESEcIwRwiYRwjQjBEgWoFuBa4FngWkIQQigwhEwigx/CL/4RfCKEQGP/wYiEUwYHwYGDAwYAGA4RCEQBEGB0rCNcGU4RrBlcIsGGDCESBiEWDCBhCIEWBiDAGHCKEUGEGEGMIgMAiwigxCIDADQGIRfCIEQDXgYYRfBgBoESEXwY/CJCKEQIsGIRODEGIRQYgw8IgRYMMGAGGDEDGDAIoMcDQIkGMGGBrgwCKDAIsIkDUDWDGDDA1hE4RQMQYgwBhhFBhBh4MAMYRMIoRAiAxBjhF4mhZFpxNBNy0LQTUTXhKglR9FqWpaAP5Zi//PkZNYXkgTkGEJwlkXcDfQAe9r8bCa/k5JwTriacsizBHE6CSH1w7efHLPgjuJqWnLITYTX8tRNAH/ialqJuJuWZaFkCO4m5aE7J2TonB8E559nyEnJyfB8FmJrxNxNhNS1E3LT8sxNC0E0LTlqJuWQm3E15ZiaFqWRZiaCagP5aCblkKoqCsCdioKoqwToE6FcVwAhRWBOIrCpFbgnEVRVFUVIJ2K4rAnIqioKgrcV4riuK0E4FcVQTsVxUBOoJ3FUE7itFYE7FYVRXFUVwTkVoqAnYJxBO4rReF4XYWsLWLoui4LwuC9AdsLQL0LQA9C8Lgvi6LguBahfFwXAtIvQQ4vCqKwrxX/8E5xXit4JwKzBnwj+DF+F1guvBiQYkDRIR8I/gz8Gd4R/wYsGLBi8I8DPBneDPBnwZ/8I8DP8I8B/0Gd+DPA+8I/+Ef+DOgzvwj4R/hHoM+Ee4M4D74M+Ef/A/7gfcDPBn4R7BnfCPgz4M7Bngf8DPwjwR6B/3CPwj0Gfgz+EfBnhH8GfwioRQGIBqgRUDVAYoGiBFcIoBqoMWEUA1UDRYRUIqEUA1WBooGiAaqBogRUGJwigM8I/gz+DOCPwj/Bnwj3BnBHgZ4M4I+DOhHhNCz5aiaCb//PkZM0YugrgAAASBEUEBfQAe9rclmWompZ8shNyzLMsy1LMBUAfhNxNicBJCcE5J0JpyyLMTcBVLXloCO5aCagKACiAqflqWYmvE3E3BHlmArFnxNRNC1LUBS5aFoWhZFmWR8k5CTnxz4PonZ8E5Pg+j4LUshNQH4TYtSzLMshNBNhNSyAViyE0FQE4FYVoJ0CcRUgnYqisKoJxFWAhiuKgrCtFUE7FQE5iqKgqRVFWKorwTsVxVFYE7FTFTBOxVgnAqRXBOPisK4BOK0VoriuK0E5BOxUivFcE5FYE5FQVBXFQE6FQVBVFYVxWioCcCoLovi4LoWiL0LSL+LouBaIvBahdi6LoWgEMFoC1hacXxdC14uipiqKn8VPFbiqKsVb//Bm/+EXgx4RdhFb///hE1/8GLP//CKwIrQjoGa/wPewZqEdYM1wZqDNAetgzWEd8GagzYM2DN4M1wjoI7Bm+DNhHcD3rA9awZuEdwZvCOwjsGaA964M1A978I7hHQR0DNge98I6hHYR1wZrBmwPWgPWwZsI7wjqB63COvgzQR3BmwZsGaget8D3rCOgZoGa4R1gzYM0EdwZsI6CO+DN4R1wZsD3oGaBmwjqEdAzXCO/4R0DNAzYR0WgI8TQT//PkZL4XFgTcAE6Tekf8EfQAe9t8YTXiagKwCsJuWXLMTUtC1LMTT8TYTUJP+fAdomomoD8JuWoCgWoI7iaFkJqJqfZ8hrk4CSE5Pk+Cdk5PgnBOT7JwTg+uWZaiaCbcsgFAsy0LPlmJsWYmom5ZFmWpaibiaAjy15ZFkWQm5Zll+JsJqJvy1E0CThJz65OQlJ8H2TknZOT759k6J3z4PgTQTcsy0LITflmWfLUsiyLITYTcTT8syzLQsi0LMEcWZa8tSyE1LTibibFqWYI/8shNCyE1LQsy1LUTUBTLLloWXLUsiyLUtBN+JqJvy1E05Z8TcsxNeWn/LTnxydHwfZ9n1ydk4PsnHJyfR9E4JwTgnB8k4588nB9cnR8c+D7PjxV4q4r8VsVgTgE4/itFShX/xV4rirxVFWKoq4qfxX8E6xVxUBOYrCtwTvwTj/xV8E5/irBOsVuKwqRXFTFQVorCrFf/xWioKwrCtioCcxUFUVAToE4FUVxWFQVhUBO4rgnUVIJyKkVgToE4ipFUVoq4qisKsE64qCoCdxUFUVxXFUE78VxWFQV4qiuKgqiuK4CCK2KoqirBOATsE4FWK4qxVFUVhVFYE4gnIriuCcQTiK4rCoCdCtirBORUiqK2//PkZLAWsgzuADQNNkZj/fjIe9r8K/FXFUVwSE5aiaAKgmhaFpxNQkp8n3z5PsJOGsffLQsyyE1LItS1E1Af+CPLMTUTfibFmJoWQmxanzydHwTsnASknBaCalqWom5ZcsxNyc8nASsnHDt59BrhJgkpOicBKg7D7JyfZ8E5Pk+Cd8EeWXE0LQsiyLQtSyLIsi0LUTYsy0E3LITQshNiyLUsiy4I78shNy0LMVcE6ipgnArRVgncE4wTsVIrCqCcCtBOYrwTgE7iuKwqCoKwrcE7BOQTqKgqiqFpBEC1gPYD3F0X4WoLTF0Xxei6FqC0BaAtQWgXxdwtWFqC0haBW/FQVRUBOBUFcE6ioCcAnEVRX4rYrxWFUVBViuLsXgtAuC6FoBDBaYvi7F8XxexdF8XhcFyI//gx//CJBhgxhEwY/+EXwYgx8ImDH8GPhE8GPhEwigwhFwNQNQNfhE+DGDAGHCIBrhEhEBh4RQMAY/gYBFBhhEAxCIDCEUDEDHBiEUIoRQY+DCBp4McGEIgGgMcGIGMGIGIGgRQYgxCKBiBjBgDGESDADWBgEUDEIuDADWBpBiEUDEDDgYgwBgDEDQDUGIGgRAYQYAxCKBhCKEThEBgBiEUGIRQMQiQiwNAY//PkZKwWNgjoZUAQREakFfQAe9t8YMfwi4GBaFoJsWpaFlyyBHctCzE25ZiaFoAocsy1E24Sk+idk6LMTYTYTQsyyLUtCyLQTUswFYJMGuTg+CdHwErPotAFAsuJtxNCz4m4mvBHiafloWZZ8YppBqzTNI0jTNBMpg0jTTZZFqWfE3Af/xNf+WomhZ8suWZZCb8tC1LQtS14m/LQtBNhNOfR8hKCc8nHJ2EqCUE5CSHxydk6Pg+D7Ps+Sdk6LUTQTcTcTctSz4mwmha8TXlmJvyy5ZiaFl+WpZFoWZa8TQshNCz4mhalmJsWfLQsuWRactBNRNC1E1LLlly0E2PgJWfR8h2H2fJOSdnx+fXPs+T5PgNbnzz6Po+T7JwTk+z4PonROglJ84qCvxXxUirFX4q4qeCd1f8InCI/4R/CP//4RMI/CMEYI4RAR8I8IjCJ4REI/gG8ESEfCOERCP4R/+EaERCPCNCNCI4BvQjYRMHINobIOfjZBzDZG3xtja42gcw2PwcvG2Nng5+NgbY2wcn42htDYGwNrjYGwNsbX42vxscbI2gc3Bzg5Qcg2uNvjaGwNgbI2+Dl4OUbI2Qc42RsjbBy//g5eAboR4RwjQDeCP+EcI8IwBuwjwjBEBEA//PkZKoZMgrqADXt9EV8FfQAe9scG+EThEBGCMESESEbhEQjwjwjwjBHCIwiQDcCNCI/hHE0/LQBSLITf/lqWoSvk7LT8BWLMtRNAk58E7Po+CyLQTcsyyLUsi0Afi1LUTUTUtBNS05aFkWpZHzwkoSgnB9HwfQSsTYsizLQtRNRNgFf/8NcJWEmAWCdn0To+T4CUHyGtxNiyLT/lmJqJqJqWgmpZFqJsWgmwmwmwmv5ZiaibiactBNv/yyLTiaFkWZagKgCmJqWQmgmom3E0LTibAKfE0LLiuKgrYqipBO4JzFUE5BORXBOhVioKwqRWBOYJyKkE6BOIrYqCqCcxVxVFUV8E4FSCdcVgAgCuKkLTBDC6CHi+LwuRfha4uC+FpF8XQtAWgB2wtAWoXBchaBfwtQWnFSCdxVxXFUVhUFYV4rgnOK3wTiKir//1eDCsf//7/+wOYd///ei/f6lmiqGXpyOlCSRm+yP3UtDhFIzqBhwCFHAGFHABYGcAnAAMOAAYcAAw4BYKOAIROANgicAQYcABE4AAzgE4B+1wmcAwYcAK+sDOADgFLCJwAlWBnABwABnABwDWraETgEDOADgDBiRkgoJpGaP+64RSMoRSMGBiRkkwMSMlq7AxIy4//PkZJUYEgieBFw3fkL8FgAied8AROAAicA8DOATgAGHAAROAFwM4BOAGBhwADDgAGHANQUcAgicAYROAfgw4AIkbPNNNpo0TSNBNJgUs0l7lomEwmRSOaRp80zQFK4nvTInnTEGgwGwAwYmOmkyaInppJpMJg0k1+KUaaaTCb42U0mBsGiaSaNNNpo0OaKZNE0jTTSY5oGmaZpJrphM9MGkmDQTCZBzpg0OKR+mBtdMJobfTSbTfG2KSaBpGgaZomiaBomn02mOmkwmjSNPpjmmaKZNA0zSNFNCeClJkT40DTTCY5oJk0kyaJpdMppMdMdN80TR6ZTXTfNJNmimumem+aKZTKaTaaTRops0kwaZppk0+aSa6ZTKYTfTfTPTHTKa5omgmEyaJo9NmkaRp/pnmmaf6aNNMplMplMdMpv8TxMJlNplNJn9MdM1OM6hWa/EjiRiRiO/xIcSP+GgCZQ1+GvDRDV//4aP///4I8EwTwTBLwS/4AHgnBHBHgiwR4JgAgS4IwAYPA8ADg+AAAAFwfB4L4WADC2AGAGFwsFwuD2FgAcAPC+F/B8L4X/B7B4L4WwuD+AGDwXACAAC2D2AEFgfCwAAAAXB8LhcLeDwXCwPYPA+ACACD+AH4XwA//PkZJMVIgb2ejVLxkBMEgTIe898vwv4X/ACB/C4WwtgBg/gA4PA9gBeFhLRTXTRomkmP0yJ6J+mPy0NA0OvibNDQmfzTNNMjaFKNATxMiemiaRoGkmE2mkwmTRTHNBMGiaCZTSZTZomh0PaV9fX2hoX14kzSmOaCY5pJr80U0aPTfNFMps0jSNJMmiaSaTKb6aTKYNLphMpg0eaJoGkJ8aBoppMppMJg00xzTTabNFNJpNJpNpnpg0DT6bTRoppoJMWrSh/690NQ5paV5D2le/LND2hoQxDF/rzR1/r/aWhfaWleQxfXmheaevNDS0tLQ0ryGoch/X15D+vLy+0oc0ry/19DUOXuvIc0oav9oXkNX1/r3X18QCGHQGQHB8PiAPAaHgPDsBgcH+Hqv//+DJ0GNuEW4MbQY2wZO4Rn///4R34R3Qjv//8Gbv//8GbgZuwZvCO4GbsD37+Ed3A586DJ4Rn8DnToRn8GTsGT8GToRn4HOngyf4HOnBGeDJ0IzgjOCM8DnTwjOgydwOdP4RnYMncDbtwY2A27cItgNs3CLeDGwMbwY3CLaEWwRbQi3A27eDG0GN4G2bBFvA2zcItgY3A27YGN4G2bAxtA58/gc6eDJwHOnAyfCM7A588//PkZLMYngTSAFAUhEYcDfggw9V8DnzwOdOBk8IzuEZ4MnAyfgychsy7F3oE13Nl9sy7myrsL6qqOU5anCqkHqNDI3KVUTEU8GNU7U6gxyHKchyVV/Xa2Zspfds3rubK2VsjZmztk9djZi/TZV2NnXYu0vsm0yaBoDZNEbA2k0aKZNjmwbH/Nvm2bRtGyBVArD1G0bQPUevg9h6/+PRzZNkCrzZNgesegesermyPQPXzbHpNvm0PQPUPSbJs82TaHqAtj082h6DaNn8eo2DbHrHpNjj1m1zYHqNo2jYNnmwbPNgek2ja5sj0D1m0bJs80xtJlMdMCeps0U0meaaa6b5p/mmmU3zRTfNFN/pgHPzQNPmkaaaTXTKbTRoJk0zS6b/NBNdNJlNGj02aH6Z4IgAEEYJ4I+CMEQJcEUEXBOpHDX/w1Q0Q1Q1cNWGvw0Q0/hp/AmIaA0cCYhow0w1/w0hoDRhpw1w1BrgTLDXw1BrhrDQGgNQEzAmOGuGiGgNfgTHDQGoCZw1w0BrDWBMIEzDVDTDUGgNfAFwGjBrg1A1YNcGsAXAaQaABcBqg1g1QagaINYaoEyw1Bow1YaA1hoDSBMw1gTICYQJkGrDQGoNGGmGsNcNQawJkGuBM4aIa//PkZKAYngTsATQNQkKMFgDifh7AYagJkGsCZ+GkNWGiGsNAaYaOGgCYgTENQaw0Yaw1Q1Q0/hqw1BkAfmkaCb6ZTCY6bNBNLwmqGA5fzSTCb/lgwXOmMmMmTQ5pmkmUwmkymfzRTaZFJ6aNM002NrppMpg0kwKQmE2m0yKUaKaE95o9MJj9N9NJk0UymOaSaE/TabNNNmmmk2mU2aHTKZTCaNDjaTJoGimkyNvpk0TRTHTf6bTRopg001+mU0aXNBMjYNA0k2mjR5pfps0U100mUz0ym02mDRTHTaaTRpplMc0kz0ySA000mDSTKbNI002mzQTHTaYTf//NA0zQTBodNJk0UyKSaaZNJMprmkaP5oGmKUmEymUyaCbTHNBMJlN80DRNBMmkm/00mUwaZpprplNpvmiaJo80+aSa//TaY/6ZaH//wY4ReEX4RIMfwiAxBh/BhCJ/+ESDDwYcIn+EQIoMAiQYAw8IsGIGGETBj4MP4MQiAxhEAwAxAxBjBiEUIgMIMcDCDAGIMcGMDEGGBgEUDTwNfAx4MAiwiQYgwBgEUIgMIRAiQYhFwYAwBhA1CKDEIoGoGgMQi4MeDADGEQIkIgGMDCDAIoMAiQiAYwYYMQNQigwCJBiDEGAR//PkZJwV+gzoZUAQRkZsCfQAe9tcQYgx8GEGIMQiwMAY4MANAMcIoMSyE1E1/LMTUtCz5OD5PkJJz5Pk+uA/FqWRaib8TUTUTQtC05alqWYm4momgI8TYsxNCzE3LUtQFEsgFM+z6J0fB8nz+TsNcnB9BK+Tk+g7CdhJT6LTiaFqWYI7lqWoCvy05ZlnxNy0/LUshNBNvwR4moCj+Wv5ZlkJqWpalkCOE1E1LQsiyLITUBULLlqWZZlmJsWhZcsi1/4CiWpalkJqJuWvLXlkJsJpyy4mwm5ZlmJuWXLUTQteWgmgmwCsJoWfE3LMsiyLP8TTlkJuAolqJryzE1LTibCbloJuWhZFoWYmxZ8TcXIvxeC0i+FrF0B2i4L8LSL4uBaIDyCHF8XRfF6FqgiwtIuYWoXIrYqAncVvxVip8VIqCvUxPqtFbFf/4q/8V/8V/iririr8VATjxXipxWgnYq+KwqfFTFQVoq+KsVBW8VhUisKuK0VRXivFYE4FTBOhVFcVRV4riuCdCuCdCtwTiCcCqCcgnYqxWFcVIJwKsVxWisK8VxVgnArYqRWFeK0V4qgnQrgnYrfBOoqAnAq4J0CciqKviuK3BOoJyKsE4FUVoqisK2KwrAnArgBAFSK4//PkZJ0VagjyJgGtbkOkFfwAbh4AqRViuK4J0KgrCrFUVxVjOEeDQgjlcT4T40xtjaNI0uaI2QciGNJIl4kJZtCGIaSckIm6GL3TQ2zRTY2UwmjSNE0fxS02aY2BsJs0/+mzSE8TQpHTKZTaaG0aQpApZp/mmm+aHTfTCZGwNgUk0E0aRp/ilJlNJgT5MmkJ9zQNA0TQTH6ZG2mk0mk0mk3zQTKY/G3zQTHTabTBpGgmU0aKaTJpJpNJtMphNjYTfNE0emkymE2mEyaCbNBNfmkaJpdNJnpg0k0mDTTCbTaZTBp80k2aCbTfNE00yaCb6bTZoplMmmaKZTKaTJpmiaHTXNJNdMDbTab6Y6Z6ZNNMJhMJhN9NJrmim02m0ymU300aPTSa6Y//5pJpNdN/9NppxWxU4Jx/xWxU/xU4qcV/ipiuKwqxWFbioK/8VIqivFTwTkVgTkVor4JxFXxX8VcVxUFQE4FaCcwTvBOIqwToVuKwqCtFUVYqxXxWFeK0E7FQVYrwTnwTsV4rCqCcfFaCcRVFQE5gnAr4JyK4r4Jz4J0Koqip4rCvisKoJ3xWBOME7iuKgriuKgrAnAqgnArxXiqCcgnYJzFQVQTmAEIVYrwToAIYrwTiKkVQTkE5//PkZK4XGgzsADQNAkIcCfwAe898FXFTFYVxXxUFQVkzzS5oilg5TTTY2kyaJpJtNGgJ8aKaTQ2k2aCaNI0eaSYNJM/tKHEiQxfJG09MmgaSYTRppg0TRNNMJlMptMCfppNprmiaA2jQNLmmaRppk0jRFLNP9NJhMGmaQpZpJhNCkGkmE0J+mxSk0m0x02mjRTKbTCZ42EwaQpJpptNprmgaRpmim00J4mzSNM0kymkyKWmE0muaKYGwNjmgafTPNE0U0mUwJ7+mem01+J8mhSk2mjRTSb6aTCbNBM9MpjpjppMpk0E2mE2mE2mjSTfTaZ6YNFMcT1MpnprptNmim0wmE100aSaTRo9MGjzTTHTaaTfTSaNLpoFMAAFYNBQGwAvwAYM4NgqqkjaAN3d3d3etERNK5CZ/3Ctf8AaiAc/u7vaIn/+8XPv//+GDKv8W1/+AC8K4Yw+94xe940jgceOBwOcRaxGwH4EuNIjBfxazB8HhkwVjIAII/vDkjG/wAcJPeF5e98hNgSYLWMFvhZ73pX06aoehpmh01hMJtM9K3TKY9E10x+memvlIpZM9MUTCbShbUrtM+n5ophNZuXK+0wmemumMCemkmvc0Uwm/lJJlLe5oJZI0SyW6R0mE//PkZLcXlgrzECFvrEmMEfgAfh7k2aORpbTYUo9SBNsekGYNVKgqg6hrUXK4Q42DOwPWbILEzBSumEgkWJPU8S72G5wUuGDwguEKa1Q0UykS3Bn7FJNgg5qoEgpsGabBtGabZt7NrKCNgLYes1idmabBtm2bZsBRm0PQbF9mwPSPUBbMwzB6QojYM42ePTzbMwzR6TaNs1eBVNv81yDUJ2QYhJtD0m0PVe+x6T2M8HsbFwsh6B6D7HpugT2uZhO6HqZhmE7ISZhhkFNcghtmybBnnsD1Ho49ZtG2bZs5PVBc2EEepCaEHNjj1EJHq5smabZtmwbNEEPR+bJse9z2PY2T1SN0rdNJq6yXI06COvNJj9MGmkkGmUj7pI0TToNGlEsNEnCW10ymi5FtNFKpvps0kz0uW3aaTF00mTSzdNJu0KFYz1KjaGAhyoQCFGM//zFARgIUZ/oZpdCttay6M5drW1joSj6Ekk1b7J7R7aoQNlPrWBKLTTzOsGT5yYxLrtHTy2iUxEkES0HIBVD066VjGj31odPkkSjJtbWs6OIjKmlXHR9K5MTv5pdZolE10kk2lly74TFx5KTXeTGLrS6ExiucvJSSDUdXZm3NLn1rtYBCUEoRj77WOhCPc+g5//PkZJ8XPgzoAABMTrz8BfQyY9ONGxJULutaa1TE5LHxWEo+XecmMa3p0kqBCR6qOFaFUGpNJIIjqVi0ylBqJIkiSJIkmJj605EkSRJPetWAyVacmodBUVhGfrAZPF0AUrgRLNiqDU4VHo8h6HRObJJNdqlRBMFT0qdNE0WZhmay2tCuOY6oieWieianCnVSbzjd7SGhrLi6eUSeLcZTWqdML5PM50uOGJms9VqtYU6hrgrm4V0frUzTvYsiegR2FOkqUxSKdVCpmRCSkIAUZ4VPhqEKgFDU2VhUiIhUaIg0RAkTBYEjYBUbBMuCJgLAkCUBUinABgBE3/9EQqFRM0s0qzktk9ZFqqFC6RULE11JVDkd8Y1vVFOx9oUIpZ8Vnq5klkxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq`,fq={NotAllowedError:`permission-denied`,PermissionDeniedError:`permission-denied`,NotFoundError:`no-camera`,DevicesNotFoundError:`no-camera`,NotReadableError:`in-use`,TrackStartError:`in-use`,OverconstrainedError:`overconstrained`,ConstraintNotSatisfiedError:`overconstrained`,AbortError:`aborted`,SecurityError:`security`,TypeError:`type-error`};function pq(e){if(e instanceof DOMException||e instanceof Error){let t=e.name??``,n=e.message??String(e);return n.includes(`secure context`)?{kind:`insecure-context`,message:n,cause:e}:n.includes(`Stream API`)?{kind:`unsupported`,message:n,cause:e}:{kind:fq[t]??`unknown`,message:n,cause:e}}return{kind:`unknown`,message:typeof e==`string`?e:`Unknown scanner error`,cause:e}}var mq=[];function hq(e){let{videoElementRef:t,onScan:n,onFound:r,onError:i,retryDelay:a=100,scanDelay:o=0,formats:s=mq,allowMultiple:c=!1,sound:l=!0}=e,u=(0,L.useMemo)(()=>[...s].sort().join(`|`),[s]),d=(0,L.useRef)(null),f=(0,L.useRef)(null),p=(0,L.useRef)(null);typeof window<`u`&&d.current===null&&(d.current=new tK({formats:s})),(0,L.useEffect)(()=>{typeof window>`u`||(d.current=new tK({formats:s}))},[u]),(0,L.useEffect)(()=>{if(typeof window>`u`||!l){f.current=null;return}return f.current=new Audio(typeof l==`string`?l:dq),()=>{f.current?.pause(),f.current=null}},[l]);let m=(0,L.useCallback)(e=>async s=>{let u=d.current;if(t.current===null||t.current.readyState<=1||u===null)return;let{lastScan:h,contentBefore:g,lastScanHadContent:_}=e;if(s-h<a){p.current=window.requestAnimationFrame(m(e));return}let v;try{v=await u.detect(t.current)}catch(e){i?.(pq(e));return}let y=v.some(e=>!g.has(e.rawValue)),b=v.length>0,x=e.lastOnScan,S=s-x>=o;(y||c&&b&&S)&&(l&&f.current?.paused&&f.current.play().catch(e=>console.error(`Error playing the sound`,e)),x=s,n(v)),(b||_)&&r(v);let C=y?new Set(v.map(e=>e.rawValue)):g,w={lastScan:s,lastOnScan:x,lastScanHadContent:b,contentBefore:C};p.current=window.requestAnimationFrame(m(w))},[n,r,i,a,c,o,l]);return{startScanning:(0,L.useCallback)(()=>{if(typeof window>`u`)return;let e=performance.now(),t={lastScan:e,lastOnScan:e,contentBefore:new Set,lastScanHadContent:!1};p.current=window.requestAnimationFrame(m(t))},[m]),stopScanning:(0,L.useCallback)(()=>{p.current!==null&&(window.cancelAnimationFrame(p.current),p.current=null)},[])}}var gq={finder:!0,torch:!0,tracker:void 0,onOff:!1,zoom:!1},_q={facingMode:`environment`,width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},vq={container:{width:`100%`,height:`100%`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,aspectRatio:`1/1`},video:{width:`100%`,height:`100%`,objectFit:`cover`,overflow:`hidden`}},yq=e=>e instanceof Date,bq=e=>e==null,xq=e=>typeof e==`object`,Sq=e=>!bq(e)&&!Array.isArray(e)&&xq(e)&&!yq(e),Cq=e=>bq(e)||!xq(e);function wq(e,t){if(Cq(e)||Cq(t))return e===t;if(yq(e)&&yq(t))return e.getTime()===t.getTime();if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!wq(e[n],t[n]))return!1;return!0}if(!Sq(e)||!Sq(t))return!1;let n=e,r=t,i=Object.keys(n),a=Object.keys(r);if(i.length!==a.length)return!1;let o=new Set(a);for(let e of i){if(!o.has(e))return!1;if(e===`ref`)continue;let t=n[e],i=r[e],a=Sq(t)&&Sq(i),s=Array.isArray(t)&&Array.isArray(i),c=yq(t)&&yq(i);if(a||s||c){if(!wq(t,i))return!1}else if(t!==i)return!1}return!0}function Tq(e){let{disabled:t=!1,className:n,style:r}=e,i={stroke:t?`grey`:`yellow`,fill:`none`,strokeLinejoin:`round`,strokeLinecap:`round`,strokeWidth:1.5,...r};return(0,H.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,className:n,style:i,width:`28px`,height:`28px`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,H.jsx)(`path`,{d:`M3 3L6.00007 6.00007M21 21L19.8455 19.8221M9.74194 4.06811C9.83646 4.04279 9.93334 4.02428 10.0319 4.01299C10.1453 4 10.2683 4 10.5141 4H13.5327C13.7786 4 13.9015 4 14.015 4.01299C14.6068 4.08078 15.1375 4.40882 15.4628 4.90782C15.5252 5.00345 15.5802 5.11345 15.6901 5.33333C15.7451 5.44329 15.7726 5.49827 15.8037 5.54609C15.9664 5.79559 16.2318 5.95961 16.5277 5.9935C16.5844 6 16.6459 6 16.7688 6H17.8234C18.9435 6 19.5036 6 19.9314 6.21799C20.3077 6.40973 20.6137 6.71569 20.8055 7.09202C21.0234 7.51984 21.0234 8.0799 21.0234 9.2V15.3496M19.8455 19.8221C19.4278 20 18.8702 20 17.8234 20H6.22344C5.10333 20 4.54328 20 4.11546 19.782C3.73913 19.5903 3.43317 19.2843 3.24142 18.908C3.02344 18.4802 3.02344 17.9201 3.02344 16.8V9.2C3.02344 8.0799 3.02344 7.51984 3.24142 7.09202C3.43317 6.71569 3.73913 6.40973 4.11546 6.21799C4.51385 6.015 5.0269 6.00103 6.00007 6.00007M19.8455 19.8221L14.5619 14.5619M14.5619 14.5619C14.0349 15.4243 13.0847 16 12 16C10.3431 16 9 14.6569 9 13C9 11.9153 9.57566 10.9651 10.4381 10.4381M14.5619 14.5619L10.4381 10.4381M10.4381 10.4381L6.00007 6.00007`})})}function Eq(e){let{disabled:t=!1,className:n,style:r}=e,i={stroke:t?`grey`:`yellow`,fill:`none`,strokeLinejoin:`round`,strokeLinecap:`round`,strokeWidth:1.5,...r};return(0,H.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,className:n,style:i,width:`28px`,height:`28px`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,H.jsx)(`path`,{d:`M12 16C13.6569 16 15 14.6569 15 13C15 11.3431 13.6569 10 12 10C10.3431 10 9 11.3431 9 13C9 14.6569 10.3431 16 12 16Z`}),(0,H.jsx)(`path`,{d:`M3 16.8V9.2C3 8.0799 3 7.51984 3.21799 7.09202C3.40973 6.71569 3.71569 6.40973 4.09202 6.21799C4.51984 6 5.0799 6 6.2 6H7.25464C7.37758 6 7.43905 6 7.49576 5.9935C7.79166 5.95961 8.05705 5.79559 8.21969 5.54609C8.25086 5.49827 8.27836 5.44328 8.33333 5.33333C8.44329 5.11342 8.49827 5.00346 8.56062 4.90782C8.8859 4.40882 9.41668 4.08078 10.0085 4.01299C10.1219 4 10.2448 4 10.4907 4H13.5093C13.7552 4 13.8781 4 13.9915 4.01299C14.5833 4.08078 15.1141 4.40882 15.4394 4.90782C15.5017 5.00345 15.5567 5.11345 15.6667 5.33333C15.7216 5.44329 15.7491 5.49827 15.7803 5.54609C15.943 5.79559 16.2083 5.95961 16.5042 5.9935C16.561 6 16.6224 6 16.7454 6H17.8C18.9201 6 19.4802 6 19.908 6.21799C20.2843 6.40973 20.5903 6.71569 20.782 7.09202C21 7.51984 21 8.0799 21 9.2V16.8C21 17.9201 21 18.4802 20.782 18.908C20.5903 19.2843 20.2843 19.5903 19.908 19.782C19.4802 20 18.9201 20 17.8 20H6.2C5.0799 20 4.51984 20 4.09202 19.782C3.71569 19.5903 3.40973 19.2843 3.21799 18.908C3 18.4802 3 17.9201 3 16.8Z`})]})}var Dq={bottom:85,right:8,position:`absolute`,zIndex:2,background:`transparent`,border:0,padding:4,margin:0,display:`inline-flex`,alignItems:`center`,justifyContent:`center`};function Oq(e){let{scanning:t,startScanning:n,stopScanning:r}=e,[i,a]=(0,L.useState)(!1),o=(0,L.useRef)(null);(0,L.useEffect)(()=>()=>{o.current!==null&&clearTimeout(o.current)},[]);function s(){i||(a(!0),t?r():n(),o.current!==null&&clearTimeout(o.current),o.current=setTimeout(()=>{a(!1),o.current=null},1e3))}return(0,H.jsx)(`button`,{type:`button`,"aria-label":t?`Turn camera off`:`Turn camera on`,"aria-pressed":t,disabled:i,onClick:s,style:{...Dq,cursor:i?`default`:`pointer`},children:t?(0,H.jsx)(Tq,{disabled:i}):(0,H.jsx)(Eq,{disabled:i})})}function kq(e){let{className:t,style:n}=e;return(0,H.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:`30px`,height:`30px`,viewBox:`0 0 24 24`,className:t,style:n,xmlns:`http://www.w3.org/2000/svg`,children:(0,H.jsx)(`path`,{strokeWidth:.2,stroke:`yellow`,fill:`yellow`,d:`M14.516 15.158l.714.714-4.595 6.14-.75-.364L12.337 13H6.978L8.22 8.861l.803.803L8.322 12h3.036l1.793 1.792-1.475 5.16zm5.984 4.05L4.793 3.5l.707-.707 3.492 3.492L10.278 2h7.972l-5.025 7h7.149l-3.71 4.957 4.543 4.543zM12.707 10l3.243 3.243L18.376 10zM9.795 7.088l2.079 2.079L16.3 3h-5.278z`})})}function Aq(e){let{className:t,style:n}=e;return(0,H.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:`30px`,height:`30px`,viewBox:`0 0 24 24`,className:t,style:n,xmlns:`http://www.w3.org/2000/svg`,children:(0,H.jsx)(`path`,{strokeWidth:.2,stroke:`yellow`,fill:`yellow`,d:`M13.225 9l5.025-7h-7.972l-3.3 11h5.359l-2.452 8.648.75.364L20.374 9zm.438 3H8.322l2.7-9H16.3l-5.025 7h7.101l-6.7 8.953z`})})}var jq={bottom:35,right:8,position:`absolute`,zIndex:2,background:`transparent`,border:0,padding:4,margin:0,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`};function Mq(e){let{status:t,scanning:n,torchToggle:r}=e;return n?(0,H.jsx)(`button`,{type:`button`,"aria-label":t?`Turn flashlight off`:`Turn flashlight on`,"aria-pressed":t,onClick:()=>r(!t),style:jq,children:t?(0,H.jsx)(kq,{}):(0,H.jsx)(Aq,{})}):null}function Nq(e){let{className:t,disabled:n=!1,style:r}=e,i={stroke:n?`grey`:`yellow`,fill:n?`grey`:`yellow`,...r};return(0,H.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:`30px`,height:`30px`,viewBox:`0 0 24 24`,className:t,style:i,xmlns:`http://www.w3.org/2000/svg`,children:(0,H.jsx)(`path`,{strokeWidth:.3,d:`M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-7.46,0.5l-1.5,0c-0.645,0 -0.643,-1 -0,-1l1.5,0l-0,-1.5c-0,-0.645 1,-0.643 1,0l-0,1.5l1.5,0c0.645,0 0.643,1 -0,1l-1.5,0l-0,1.5c-0,0.645 -1,0.643 -1,0l-0,-1.5Z`})})}function Pq(e){let{className:t,disabled:n=!1,style:r}=e,i={stroke:n?`grey`:`yellow`,fill:n?`grey`:`yellow`,...r};return(0,H.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:`30px`,height:`30px`,viewBox:`0 0 24 24`,className:t,style:i,xmlns:`http://www.w3.org/2000/svg`,children:(0,H.jsx)(`path`,{strokeWidth:.3,d:`M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-4.96,-0.5c0.645,0 0.643,1 -0,1l-4,0c-0.645,0 -0.643,-1 -0,-1l4,0Z`})})}var Fq={bottom:130,right:8,position:`absolute`,zIndex:2,background:`transparent`,border:0,padding:4,margin:0,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},Iq={...Fq,bottom:180};function Lq(e){let{scanning:t,capabilities:n,onZoom:r,value:i}=e;if(!t)return null;let a=n.step>0?n.step:1;function o(){r(Math.min(i+a,n.max))}function s(){r(Math.max(i-a,n.min))}let c=i<=n.min,l=i>=n.max;return(0,H.jsxs)(L.Fragment,{children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Zoom out`,disabled:c,onClick:s,style:{...Fq,cursor:c?`default`:`pointer`},children:(0,H.jsx)(Pq,{disabled:c})}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Zoom in`,disabled:l,onClick:o,style:{...Iq,cursor:l?`default`:`pointer`},children:(0,H.jsx)(Nq,{disabled:l})})]})}var Rq={fullContainer:{width:`100%`,height:`100%`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`},innerContainer:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`},overlay:{position:`absolute`,top:0,right:0,bottom:0,left:0,pointerEvents:`none`,display:`flex`,alignItems:`center`,justifyContent:`center`},borderBox:{position:`relative`,width:`70%`,aspectRatio:`1 / 1`,border:`2px dashed rgba(239, 68, 68, 0.4)`,borderRadius:`0.5rem`},cornerTopLeft:{position:`absolute`,width:`15%`,height:`15%`,border:`4px solid #ef4444`,top:0,left:0,borderBottomColor:`transparent`,borderRightColor:`transparent`,borderTopLeftRadius:`0.5rem`},cornerTopRight:{position:`absolute`,width:`15%`,height:`15%`,border:`4px solid #ef4444`,top:0,right:0,borderBottomColor:`transparent`,borderLeftColor:`transparent`,borderTopRightRadius:`0.5rem`},cornerBottomLeft:{position:`absolute`,width:`15%`,height:`15%`,border:`4px solid #ef4444`,bottom:0,left:0,borderTopColor:`transparent`,borderRightColor:`transparent`,borderBottomLeftRadius:`0.5rem`},cornerBottomRight:{position:`absolute`,width:`15%`,height:`15%`,border:`4px solid #ef4444`,bottom:0,right:0,borderTopColor:`transparent`,borderLeftColor:`transparent`,borderBottomRightRadius:`0.5rem`}};function zq(e){let{scanning:t,capabilities:n,onOff:r,torch:i,zoom:a,startScanning:o,stopScanning:s}=e;return(0,H.jsx)(`div`,{style:Rq.fullContainer,children:(0,H.jsxs)(`div`,{style:Rq.innerContainer,children:[(0,H.jsx)(`div`,{style:Rq.overlay,children:(0,H.jsxs)(`div`,{style:Rq.borderBox,children:[(0,H.jsx)(`div`,{style:Rq.cornerTopLeft}),(0,H.jsx)(`div`,{style:Rq.cornerTopRight}),(0,H.jsx)(`div`,{style:Rq.cornerBottomLeft}),(0,H.jsx)(`div`,{style:Rq.cornerBottomRight})]})}),r&&(0,H.jsx)(Oq,{scanning:t,startScanning:o,stopScanning:s}),i&&n.torch&&(0,H.jsx)(Mq,{scanning:t,status:i.status,torchToggle:i.toggle}),a&&n.zoom&&(0,H.jsx)(Lq,{scanning:t,capabilities:n.zoom,value:a.value,onZoom:a.onChange})]})})}var Bq={position:`absolute`,width:`100%`,height:`100%`},Vq={position:`absolute`,width:`100%`,height:`100%`},Hq={position:`absolute`,width:`100%`,height:`100%`};function Uq(e){if(e===null)return;let t=e.getContext(`2d`);t!==null&&t.clearRect(0,0,e.width,e.height)}function Wq(e,t,n,r){if(n===null||t===null)return;if(e.length===0||r===void 0){Uq(n);return}let i=t.offsetWidth,a=t.offsetHeight,o=t.videoWidth,s=t.videoHeight;if(o===0||s===0){Uq(n);return}let c=Math.max(i/o,a/s),l=o*c,u=s*c,d=l/o,f=u/s,p=(i-l)/2,m=(a-u)/2,h=({x:e,y:t})=>({x:Math.floor(e*d),y:Math.floor(t*f)}),g=({x:e,y:t})=>({x:Math.floor(e+p),y:Math.floor(t+m)}),_=e.map(e=>{let{boundingBox:t,cornerPoints:n}=e,{x:r,y:i}=g(h({x:t.x,y:t.y})),{x:a,y:o}=h({x:t.width,y:t.height});return{...e,cornerPoints:n.map(e=>g(h(e))),boundingBox:DOMRectReadOnly.fromRect({x:r,y:i,width:a,height:o})}});n.width=i,n.height=a;let v=n.getContext(`2d`);v!==null&&r(_,v)}var Gq=(0,L.forwardRef)(function(e,t){let{onScan:n,constraints:r,formats:i=[`any`],paused:a=!1,components:o,tracker:s,children:c,styles:l,classNames:u,allowMultiple:d,scanDelay:f,retryDelay:p,onError:m,sound:h,startTimeoutMs:g,settleDelayMs:_}=e,v=(0,L.useRef)(null),y=(0,L.useRef)(null),b=(0,L.useRef)(null),x=(0,L.useMemo)(()=>{let e={..._q,...r};return r?.deviceId&&delete e.facingMode,e},[r]),S=(0,L.useMemo)(()=>({...gq,...o}),[o]),C=s??S.tracker,[w,T]=(0,L.useState)(!1),[E,D]=(0,L.useState)(!1),[O,ee]=(0,L.useState)(x),te=uq({startTimeoutMs:g,settleDelayMs:_}),k=(0,L.useRef)(te),A=(0,L.useRef)(n),j=(0,L.useRef)(m),M=(0,L.useRef)(C);(0,L.useEffect)(()=>{k.current=te},[te]),(0,L.useEffect)(()=>{A.current=n},[n]),(0,L.useEffect)(()=>{j.current=m},[m]),(0,L.useEffect)(()=>{M.current=C},[C]);let ne=(0,L.useCallback)(e=>{A.current?.(e)},[]),re=(0,L.useCallback)(e=>{j.current?.(e)},[]),{startScanning:ie,stopScanning:ae}=hq({videoElementRef:v,onScan:ne,onFound:(0,L.useCallback)(e=>{Wq(e,v.current,b.current,M.current)},[]),onError:re,formats:i,retryDelay:p??(C===void 0?500:33),scanDelay:f,allowMultiple:d,sound:h});(0,L.useEffect)(()=>(T(!0),()=>{T(!1)}),[]),(0,L.useEffect)(()=>{wq(x,O)||ee(x)},[x,O]);let N=(0,L.useMemo)(()=>({constraints:O,shouldStream:w&&!a}),[O,w,a]),oe=(0,L.useCallback)(async()=>{let e=v.current,t=y.current;if(e===null||t===null)return;let n=t.getContext(`2d`);if(n!==null)try{N.shouldStream?(await k.current.stopCamera(),D(!1),await k.current.startCamera(e,{constraints:N.constraints}),D(!0)):(e.videoWidth>0&&e.videoHeight>0&&(t.width=e.videoWidth,t.height=e.videoHeight,n.drawImage(e,0,0,e.videoWidth,e.videoHeight)),await k.current.stopCamera(),D(!1))}catch(e){D(!1),j.current?.(pq(e))}},[N]);(0,L.useEffect)(()=>{oe()},[oe]);let se=(0,L.useMemo)(()=>N.shouldStream&&E,[N.shouldStream,E]);(0,L.useEffect)(()=>(se&&(Uq(y.current),Uq(b.current),ie()),()=>{ae()}),[se,ie,ae]),(0,L.useImperativeHandle)(t,()=>({getVideoElement:()=>v.current,getStream:()=>k.current.getStream()}),[]);let ce=(0,L.useMemo)(()=>({...vq.container,...l?.container}),[l?.container]),P=(0,L.useMemo)(()=>({...vq.video,...l?.video,visibility:a?`hidden`:`visible`}),[l?.video,a]),le=(0,L.useMemo)(()=>({...Vq,display:a?`block`:`none`}),[a]);return(0,H.jsxs)(`div`,{style:ce,className:u?.container,children:[(0,H.jsx)(`video`,{ref:v,style:P,className:u?.video,autoPlay:!0,muted:!0,playsInline:!0}),(0,H.jsx)(`canvas`,{ref:y,style:le}),(0,H.jsx)(`canvas`,{ref:b,style:Hq}),(0,H.jsxs)(`div`,{style:Bq,children:[S.finder&&(0,H.jsx)(zq,{scanning:E,capabilities:te.capabilities,onOff:S.onOff,zoom:S.zoom&&te.settings.zoom?{value:te.settings.zoom,onChange:async e=>{try{await te.updateConstraints({...O,advanced:[{zoom:e}]})}catch(e){j.current?.(pq(e))}}}:void 0,torch:S.torch?{status:te.settings.torch??!1,toggle:async e=>{try{await te.updateConstraints({...O,advanced:[{torch:e}]})}catch(e){j.current?.(pq(e))}}}:void 0,startScanning:async()=>await oe(),stopScanning:async()=>{try{await te.stopCamera(),Uq(b.current),D(!1)}catch(e){j.current?.(pq(e))}}}),c]})]})}),Kq=(0,L.memo)(function(){let e=z(CI);return(0,L.useEffect)(()=>{let t,n=!1,r=``,i=null;function a(){r=``,n=!1}function o(){r=``,n=!0,t=window.setTimeout(a,3e3)}function s(){t&&=(clearTimeout(t),void 0),n=!1,e({type:`Barcode`,barcode:r,toQueue:null})}function c(e){e.key===`!`?i=Date.now():e.code===`F1`&&!n||e.key===`*`&&!n&&i!==null&&Date.now()-i<1e3?(o(),e.stopPropagation(),e.preventDefault()):n&&e.code===`Enter`?(s(),e.stopPropagation(),e.preventDefault()):n&&e.key&&e.key.length===1&&/[a-zA-Z0-9-|_,;]/.test(e.key)&&(r+=e.key,e.stopPropagation(),e.preventDefault())}return document.addEventListener(`keydown`,c,{capture:!0}),()=>document.removeEventListener(`keydown`,c)},[e]),null}),qq=(0,L.memo)(function(){let[e,t]=(0,L.useState)(!1),n=z(CI),[r,i]=(0,L.useState)(``);if(window.location.protocol!==`https:`)return null;function a(e){e.length>0&&e[0].rawValue!==null&&e[0].rawValue!==``&&(n({type:`Barcode`,barcode:e[0].rawValue,toQueue:null}),t(!1),i(``))}function o(){r!==``&&n({type:`Barcode`,barcode:r,toQueue:null}),t(!1),i(``)}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(py,{open:e,onClose:()=>t(!1),children:[(0,H.jsx)(gy,{children:`Scan a QR Code`}),(0,H.jsxs)(hy,{children:[(0,H.jsx)(J,{sx:{width:`15em`,height:`15em`},children:e?(0,H.jsx)(Gq,{onScan:a}):void 0}),(0,H.jsx)(J,{sx:{marginTop:`1em`},children:(0,H.jsx)(nT,{label:`Manual Entry`,value:r,variant:`outlined`,fullWidth:!0,onKeyDown:e=>{e.key===`Enter`&&o()},onChange:e=>i(e.target.value)})})]}),(0,H.jsxs)(my,{children:[r===``?void 0:(0,H.jsx)(Y,{onClick:o,children:`Submit`}),(0,H.jsx)(Y,{onClick:()=>t(!1),children:`Cancel`})]})]}),(0,H.jsx)(X,{title:`Scan QR Code`,children:(0,H.jsx)(th,{onClick:()=>t(!0),size:`large`,children:(0,H.jsx)(hre,{})})})]})}),Jq=P(null),Yq=(0,L.memo)(function(){let[e,t]=B(Jq),[n,r]=(0,L.useState)(``),i=z(CI);function a(n){e!==null&&n.length>0&&n[0].rawValue!==null&&n[0].rawValue!==``&&(i({type:`Barcode`,barcode:n[0].rawValue,toQueue:e}),t(null),r(``))}function o(){n!==``&&e!==null&&i({type:`Barcode`,barcode:n,toQueue:e}),t(null),r(``)}return(0,H.jsxs)(py,{open:e!==null,onClose:()=>t(null),maxWidth:`md`,children:[(0,H.jsxs)(gy,{children:[`Scan a Barcode To Add To `,e]}),(0,H.jsxs)(hy,{children:[window.location.protocol===`https:`?(0,H.jsx)(J,{sx:{width:`15em`,height:`15em`},children:e===null?void 0:(0,H.jsx)(Gq,{onScan:a})}):void 0,(0,H.jsx)(J,{sx:{marginTop:`1em`},children:(0,H.jsx)(nT,{label:`Manual Entry`,value:n,variant:`outlined`,fullWidth:!0,onKeyDown:e=>{e.key===`Enter`&&o()},onChange:e=>r(e.target.value)})})]}),(0,H.jsxs)(my,{children:[n===``?void 0:(0,H.jsx)(Y,{onClick:o,children:`Submit`}),(0,H.jsx)(Y,{onClick:()=>t(null),children:`Cancel`})]})]})});function Xq(e,t,n,r){let i=Q.of(t).flatMap(([e,t])=>Q.ofObject(t.unloaded_processes??{}).map(([n])=>({matId:e,proc:parseInt(n),uniq:t.jobUnique}))).toLookupMap(e=>e.uniq,e=>e.proc,()=>1,(e,t)=>e+t),a=new Map;if(r)for(let[e,t]of Q.ofObject(r.jobs)){let n=Q.of(t.procsAndPaths[0]?.paths??[]).collect(e=>e.casting===``?null:e.casting).head();a.set(e,{partName:t.partName,comment:t.comment,routeStartTime:t.routeStartUTC,historicJob:null,inProcJob:t,casting:n??``,scheduledQty:t.cycles??0,decrementedQty:Q.of(t.decrements||[]).sumBy(e=>e.quantity),completedQty:Q.of(t.completed?.[t.completed?.length-1]??[]).sumBy(e=>e),inProcessQty:0,remainingQty:t.remainingToStart??0,darkRow:!1})}for(let[t,r]of n){let n=a.get(t);if(n)n.historicJob=r;else if(!e||r.routeStartUTC>=e.start&&r.routeStartUTC<=e.end){let e=Q.of(r.procsAndPaths[0]?.paths??[]).collect(e=>e.casting===``?null:e.casting).head();a.set(t,{partName:r.partName,comment:r.comment,routeStartTime:r.routeStartUTC,historicJob:r,inProcJob:null,casting:e??``,scheduledQty:r.cycles??0,decrementedQty:Q.of(r.decrements||[]).sumBy(e=>e.quantity),completedQty:i.get(t)?.get(r.procsAndPaths.length)??0,inProcessQty:0,darkRow:!1,remainingQty:0})}}if(r){for(let e of r.material)if(e.jobUnique){let t=a.get(e.jobUnique);t&&(t.inProcessQty+=1)}}let o=Q.of(a.values()).toSortedArray({desc:e=>e.routeStartTime.getTime()},e=>e.partName),s=null,c=!0;for(let e of o)s!=(e.historicJob?.scheduleId??e.inProcJob?.scheduleId??null)&&(c=!c,s=e.historicJob?.scheduleId??e.inProcJob?.scheduleId??null),e.darkRow=c;return o}function Zq(e,t){let n=`<table>
|
|
316
|
+
<thead><tr>`;n+=`<th>Date</th>`,n+=`<th>Part</th>`,t&&(n+=`<th>Material</th>`),n+=`<th>Note</th>`,n+=`<th>Scheduled</th>`,n+=`<th>Removed</th>`,n+=`<th>Completed</th>`,n+=`<th>In Process</th>`,n+=`</tr></thead>
|
|
317
|
+
<tbody>
|
|
318
|
+
`;for(let r of e)n+=`<tr><td>`+r.routeStartTime.toString()+`</td>`,n+=`<td>`+r.partName+`</td>`,t&&(n+=`<td>`+(r.casting??r.partName)+`</td>`),n+=`<td>`+(r.comment??``)+`</td>`,n+=`<td>`+r.scheduledQty.toFixed(0)+`</td>`,n+=`<td>`+r.decrementedQty.toFixed(0)+`</td>`,n+=`<td>`+r.completedQty.toFixed(0)+`</td>`,n+=`<td>`+r.inProcessQty.toFixed(0)+`</td>`,n+=`</tr>
|
|
319
|
+
`;return n+=`</tbody>
|
|
320
|
+
</table>`,n}function Qq(e,t){Hk(Zq(e,t))}var $q=NO(`fmsinsight.hide-nonloading-loadstation`,!1);function eJ(e){return`${e.palletNums&&e.palletNums.length>1?`Pallets `+e.palletNums.map(e=>e.toString()).join(`,`):e.palletNums&&e.palletNums.length==1?`Pallet `+e.palletNums[0].toString():`Pallet`}; ${e.stops.map(e=>e.stationGroup+`#`+(e.stationNums??[]).join(`,`)).join(`->`)}`}function tJ(e,t,n){let r=Q.ofObject(e.jobs).filter(([,e])=>e.procsAndPaths[0].paths.some(e=>e.casting===n)).toHashSet(([,e])=>e.partName),i=e.workorders?.find(e=>e.workorderId===t&&(e.part===n||r.has(e.part)));return i?`Started: ${i.material?.length??0}; Planned: ${i.plannedQuantity}`:null}function nJ(e,t,n){let r=t?.workorder;return Q.of(t?.possibleCastingsByQueue?.[n]??[]).map(t=>({casting:t,message:r?tJ(e,r,t):null})).toSortedArray(e=>e.casting)}function rJ(e,t,n,r){return Q.of(n?.possibleJobsByQueue?.[r]??[]).groupBy(e=>e.jobUnique).collect(([n,r])=>{let i=e.jobs[n]??t.get(n);return{jobUnique:n,job:i??null,workorder:Q.of(r).collect(e=>e.workorder).head()??null,machinedProcs:r.map(e=>({lastProc:e.lastCompletedProcess,details:i?.procsAndPaths[e.lastCompletedProcess].paths.map(eJ).join(` | `)??``}))}}).toSortedArray(e=>e.job?.partName??e.jobUnique)}function iJ(e){let t=R(bO),n=R(zO),r=R(TI),i=R(DL);return(0,L.useMemo)(()=>r===null||e===null?{castings:[],jobs:[]}:{castings:i.has(e)?nJ(n,r,e):[],jobs:rJ(n,t,r,e)},[n,t,e,r,i])}function aJ(e,t){return t.jobUnique===e&&t.location.type===it.InQueue&&t.action.type!==ot.Loading&&t.action.type!==ot.LoadingToBasket&&t.process===0}function oJ(e,t){return t.partName===e&&t.location.type===it.InQueue&&t.action.type!==ot.Loading&&t.action.type!==ot.LoadingToBasket&&t.process===0&&!t.jobUnique}function sJ(e,t,n){return Q.ofObject(e).filter(([,e])=>e.remainingToStart===void 0||e.remainingToStart>0).collect(([,e])=>{let r=(e.procsAndPaths?.[0]?.paths??[]).filter(e=>e.inputQueue===n);if(r.length===0)return null;let i=Q.of(r).collect(e=>e.casting&&e.casting!==``?e.casting:void 0).head()??e.partName;return{job:e,startingTime:Q.of(r).map(e=>e.simulatedStartingUTC).minBy(e=>e),rawMatName:i,remainingToStart:e.remainingToStart??0,assignedRaw:Q.of(t).filter(t=>aJ(e.unique,t)).length(),availableUnassigned:Q.of(t).filter(e=>oJ(i,e)).length()}}).toSortedArray(e=>{let t=Q.of(e.job.precedence?.[0]??[]).minBy(e=>e);return!t||t<0?2**53-1:t})}function cJ(e,t,n,r){let i=[],a=[...e];a.sort((e,t)=>e.localeCompare(t));for(let e of a)if(n.has(e)){let n=pO.empty(),r=new Map;for(let i of t.material)if(i.location.type===it.InQueue&&i.location.currentQueue===e&&i.location.queuePosition!==void 0){if(i.serial&&i.serial!==``||i.action.type!==ot.Waiting)n=n.set(i.location.queuePosition,i);else{let e=r.get(i.partName);e||(e=new Map,r.set(i.partName,e));let t=i.jobUnique||null,n=e.get(t);n?n.push(i):e.set(t,[i])}}let a=[];for(let[e,t]of r)for(let[n,r]of t)a.push({partOrCasting:e,assignedJobUnique:n,material:r});a.sort((e,t)=>{let n=e.partOrCasting.localeCompare(t.partOrCasting);return n===0?(e.assignedJobUnique||``).localeCompare(t.assignedJobUnique||``):n}),i.push({label:e,free:!1,rawMaterialQueue:!0,inProcQueue:!1,material:[...n.values()],groupedRawMat:a})}else i.push({label:e,free:!1,rawMaterialQueue:!1,inProcQueue:r.has(e),material:Q.of(t.material).filter(t=>t.location.type===it.InQueue&&t.location.currentQueue===e&&t.location.queuePosition!==void 0).toSortedArray(e=>e.location.queuePosition??0)});return i}async function lJ(e){let t=[];for(let n of Q.of(e).chunk(15))t.push(...await Wt.logForMaterials(n.map(e=>e.materialID)));t.sort((e,t)=>e.endUTC.getTime()-t.endUTC.getTime());let n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r.type===V.AddToQueue||r.type===V.RemoveFromQueue){let i=[...r.material];for(;e+1<t.length&&t[e+1].type===r.type&&vE(t[e+1].endUTC,r.endUTC)<10;)i.push(...t[e+1].material),e+=1;i.length===r.material.length?n.push(r):n.push({...r,material:i})}else n.push(t[e])}return n}function uJ(e){return e.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})}function dJ(e){let t=e.job.completed?.[e.procIdx]?.[e.pathIdx];return t===void 0?null:(0,H.jsxs)(`div`,{children:[`Completed: `,t]})}function fJ(e){let t=R(br),n=e=>e.map(e=>ck(e,t.loadStationNames)).join(`, `);return(0,H.jsx)(`div`,{children:(0,H.jsxs)(`dl`,{children:[(0,H.jsx)(`dt`,{children:`Job ID`}),(0,H.jsx)(`dd`,{children:e.job.unique}),(0,H.jsx)(`dt`,{children:`Time`}),(0,H.jsxs)(`dd`,{children:[uJ(e.job.routeStartUTC),` to `,uJ(e.job.routeEndUTC)]}),e.job.cycles?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`dt`,{children:`Quantity`}),(0,H.jsx)(`dd`,{children:e.job.cycles})]}):void 0,e.job.comment!==void 0&&e.job.comment!==``?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`dt`,{children:`Comment`}),(0,H.jsx)(`dd`,{children:e.job.comment})]}):void 0,e.job.assignedWorkorders&&e.job.assignedWorkorders.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`dt`,{children:`Workorders`}),(0,H.jsx)(`dd`,{children:e.job.assignedWorkorders.join(`, `)})]}):void 0,e.job.procsAndPaths.map((t,r)=>(0,H.jsx)(L.Fragment,{children:t.paths.map((i,a)=>(0,H.jsxs)(L.Fragment,{children:[(0,H.jsxs)(`dt`,{children:[`Process `,r+1,t.paths.length>1?`, Path `+(a+1).toString():void 0]}),(0,H.jsxs)(`dd`,{children:[(0,H.jsx)(dJ,{job:e.job,procIdx:r,pathIdx:a}),(0,H.jsxs)(`div`,{children:[`Estimated Start: `,uJ(i.simulatedStartingUTC)]}),(0,H.jsxs)(`div`,{children:[`Pallets: `,(i.palletNums??[]).map(e=>e.toString()).join(`,`)]}),i.fixture?(0,H.jsxs)(`div`,{children:[`Fixture: `,i.fixture,` `,i.face===void 0?void 0:`, Face: `+i.face.toString()]}):void 0,i.inputQueue?(0,H.jsxs)(`div`,{children:[`Input Queue: `,i.inputQueue]}):void 0,i.casting?(0,H.jsxs)(`div`,{children:[`Raw Material: `,i.casting]}):void 0,t.basketLoadStations&&t.basketLoadStations.length>0&&t.expectedBasketLoadTime?(0,H.jsxs)(`div`,{children:[`Basket Load Stations: `,n(t.basketLoadStations),` |`,` `,WO(t.expectedBasketLoadTime).toFixed(1),` mins`,i.partsPerPallet>1?` per piece`:``]}):void 0,(0,H.jsxs)(`div`,{children:[`Load Stations: `,n(i.load),` |`,` `,WO(i.expectedLoadTime).toFixed(1),` mins`,i.partsPerPallet>1?` per piece`:``]}),i.stops.map((e,t)=>(0,H.jsx)(L.Fragment,{children:(0,H.jsxs)(`div`,{children:[e.stationGroup,`: `,(e.stationNums??[]).join(`,`),` | Program:`,` `,e.program,e.programRevision?` rev`+e.programRevision.toString():void 0,` `,`|`,` `,(WO(e.expectedCycleTime)/i.partsPerPallet).toFixed(1),` `,`mins`,i.partsPerPallet>1?` per piece`:``]})},t)),(0,H.jsxs)(`div`,{children:[`Unload Stations: `,n(i.unload),` |`,` `,WO(i.expectedUnloadTime).toFixed(1),` mins`,i.partsPerPallet>1?` per piece`:``]}),t.basketUnloadStations&&t.basketUnloadStations.length>0&&t.expectedBasketUnloadTime?(0,H.jsxs)(`div`,{children:[`Basket Unload Stations: `,n(t.basketUnloadStations),` |`,` `,WO(t.expectedBasketUnloadTime).toFixed(1),` mins`,i.partsPerPallet>1?` per piece`:``]}):void 0,i.outputQueue?(0,H.jsxs)(`div`,{children:[`Output Queue: `,i.outputQueue]}):void 0,i.inspections&&i.inspections.length>0?(0,H.jsxs)(`div`,{children:[`Inspections: `,i.inspections.map(e=>e.inspectionType).join(`,`)]}):void 0]})]},a))},r))]})})}function pJ(e){let t=dk(R(br).basketName);return e.inProcMat!==null&&e.inProcMat.location.type===it.OnPallet?(0,H.jsxs)(`span`,{children:[`On pallet `,e.inProcMat.location.palletNum??``]}):e.inProcMat!==null&&e.inProcMat.location.type===it.InQueue?(0,H.jsxs)(`span`,{children:[`In queue `,e.inProcMat.location.currentQueue??``]}):e.inProcMat!==null&&e.inProcMat.location.type===it.InBasket?(0,H.jsxs)(`span`,{children:[`In `,t,` `,e.inProcMat.location.basketId??``]}):e.matSummary?.completed_last_proc_machining?(0,H.jsx)(`span`,{children:`Completed`}):e.matSummary!==null&&!e.matSummary.startedProcess1?(0,H.jsx)(`span`,{children:`Not yet started`}):(0,H.jsx)(`span`,{})}function mJ(e){let t=R(zO).material,n=z(CI),r=Q.of(e.matIdsForJob.get(e.unique)??cO.empty()).collect(t=>e.matsFromEvents.get(t)).toRArray();if(r===null||r.length===0)return(0,H.jsx)(`div`,{});let i=Q.of(t).toHashMap(e=>[e.materialID,e],(e,t)=>e),a=Q.of(r).some(e=>e.workorderId!==void 0&&e.workorderId!==``&&e.workorderId!==e.serial);return(0,H.jsx)(`div`,{children:(0,H.jsxs)(Vw,{size:`small`,style:{width:e.fullWidth?`100%`:`auto`},children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[a?(0,H.jsx)(Z,{children:`Workorder`}):void 0,(0,H.jsx)(Z,{children:`Serial`}),(0,H.jsx)(Z,{children:`Status`}),(0,H.jsx)(Z,{padding:`checkbox`})]})}),(0,H.jsx)(Ww,{children:r.map(t=>(0,H.jsxs)(Zw,{children:[a?(0,H.jsx)(Z,{children:t.workorderId??``}):void 0,(0,H.jsx)(Z,{children:t.serial??``}),(0,H.jsx)(Z,{children:(0,H.jsx)(pJ,{matSummary:e.matsFromEvents.get(t.materialID)??null,inProcMat:i.get(t.materialID)??null})}),(0,H.jsx)(Z,{padding:`checkbox`,children:(0,H.jsx)(th,{onClick:()=>n({type:`MatSummary`,summary:t}),size:`large`,children:(0,H.jsx)(DT,{fontSize:`inherit`})})})]},t.materialID))})]})})}function hJ(e){let t=R(ZR),n=R(e.checkAnalysisMonth&&t.type===`SpecificMonth`?yL:_L);return(0,H.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-evenly`},children:e.job===null?void 0:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(fJ,{job:e.job}),(0,H.jsx)(mJ,{unique:e.job.unique,fullWidth:!1,matsFromEvents:n.matsById,matIdsForJob:n.matIdsForJob})]})})}function gJ(e){return typeof e==`object`&&!!e&&`mat`in e}function _J(e){return typeof e==`number`?e:null}var vJ=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(void 0),[r]=VI(),i=z(HO),a=R(LO),o=(0,L.useMemo)(()=>e.matIds.slice(),[e.matIds]),s=zB(RB(WV),RB(zV,{coordinateGetter:PU}));return(0,H.jsx)(VH,{sensors:s,collisionDetection:JB,onDragStart:({active:e})=>n(gJ(e.data.current)?e.data.current.mat:void 0),onDragCancel:()=>n(void 0),onDragEnd:({active:t,over:o})=>{let s=_J(t.id),c=o?_J(o.id):null;if(o&&t.id!==o.id&&s!==null&&c!==null){let t=e.matIds.indexOf(c);r({materialId:s,queue:e.queueName,queuePosition:t,operator:a}).catch(console.error),i({queue:e.queueName,matId:s,newIdx:t})}n(void 0)},children:(0,H.jsxs)(SU,{items:o,strategy:e.direction===`vertical`?vU:gU,children:[e.children,(0,H.jsx)(sU,{children:t===void 0?void 0:e.renderDragOverlay(t)})]})})}),yJ=`printWindow`;function bJ(e){let t=document.createElement(`iframe`);return t.width=`${document.documentElement.clientWidth}px`,t.height=`${document.documentElement.clientHeight}px`,t.style.position=`absolute`,t.style.top=`-${document.documentElement.clientHeight+100}px`,t.style.left=`-${document.documentElement.clientWidth+100}px`,t.id=yJ,t.srcdoc=`<!DOCTYPE html>`,e&&(e.allow&&(t.allow=e.allow),e.referrerPolicy!==void 0&&(t.referrerPolicy=e.referrerPolicy),e.sandbox!==void 0&&(t.sandbox=e.sandbox)),t}function xJ({level:e=`error`,messages:t,suppressErrors:n=!1}){n||(e===`error`?console.error(t):e===`warning`?console.warn(t):console.debug(t))}function SJ(e,t){if(t||!e){let e=document.getElementById(yJ);e&&document.body.removeChild(e)}}function CJ(e){return e instanceof Error?e:Error(`Unknown Error`)}function wJ(e,t){let{documentTitle:n,onAfterPrint:r,onPrintError:i,preserveAfterPrint:a,print:o,suppressErrors:s}=t;setTimeout(()=>{if(e.contentWindow){let t=function(){r?.(),SJ(a)};if(e.contentWindow.focus(),o)o(e).then(t).catch(e=>{i?i(`print`,CJ(e)):xJ({messages:["An error was thrown by the specified `print` function"],suppressErrors:s})});else{if(e.contentWindow.print){let t=e.contentDocument?.title??``,r=e.ownerDocument.title,i=typeof n==`function`?n():n;i&&(e.ownerDocument.title=i,e.contentDocument&&(e.contentDocument.title=i)),e.contentWindow.print(),i&&(e.ownerDocument.title=r,e.contentDocument&&(e.contentDocument.title=t))}else xJ({messages:["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."],suppressErrors:s});TJ()?setTimeout(t,500):t()}}else xJ({messages:["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/MatthewHerbst/react-to-print/issues/"],suppressErrors:s})},500)}function TJ(){return[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i].some(e=>(navigator.userAgent??navigator.vendor??(`opera`in window&&window.opera)).match(e))}function EJ(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,null),r=n.nextNode();for(;r;)t.push(r),r=n.nextNode();return t}function DJ(e,t,n){let r=EJ(e),i=EJ(t);if(r.length!==i.length){xJ({messages:["When cloning shadow root content, source and target elements have different size. `onBeforePrint` likely resolved too early.",e,t],suppressErrors:n});return}for(let e=0;e<r.length;e++){let t=r[e],a=i[e],o=t.shadowRoot;if(o!==null){let e=a.attachShadow({mode:o.mode});e.innerHTML=o.innerHTML,DJ(o,e,n)}}}var OJ=`
|
|
321
|
+
@page {
|
|
322
|
+
/* Remove browser default header (title) and footer (url) */
|
|
323
|
+
margin: 0;
|
|
324
|
+
}
|
|
325
|
+
@media print {
|
|
326
|
+
body {
|
|
327
|
+
/* Tell browsers to print background colors */
|
|
328
|
+
color-adjust: exact; /* Firefox. This is an older version of "print-color-adjust" */
|
|
329
|
+
print-color-adjust: exact; /* Firefox/Safari */
|
|
330
|
+
-webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
`;function kJ(e,t,n){let{contentNode:r,clonedContentNode:i,clonedImgNodes:a,clonedVideoNodes:o,numResourcesToLoad:s,originalCanvasNodes:c}=t,{bodyClass:l,fonts:u,ignoreGlobalStyles:d,pageStyle:f,nonce:p,suppressErrors:m,copyShadowRoots:h}=n,g=[],_=[];function v(t,r){if(g.includes(t)){xJ({level:`debug`,messages:[`Tried to mark a resource that has already been handled`,t],suppressErrors:m});return}r?(xJ({messages:[`"react-to-print" was unable to load a resource but will continue attempting to print the page`,...r],suppressErrors:m}),_.push(t)):g.push(t),g.length+_.length===s&&wJ(e,n)}e.onload=null;let y=e.contentDocument??e.contentWindow?.document;if(y){let t=y.body.appendChild(i);h&&DJ(r,t,!!m),u&&(e.contentDocument?.fonts&&e.contentWindow?.FontFace?u.forEach(t=>{let n=new FontFace(t.family,t.source,{weight:t.weight,style:t.style});e.contentDocument.fonts.add(n),n.loaded.then(()=>{v(n)}).catch(e=>{v(n,[`Failed loading the font:`,n,`Load error:`,CJ(e)])})}):(u.forEach(e=>{v(e)}),xJ({messages:[`"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page`],suppressErrors:m})));let n=f??OJ,s=y.createElement(`style`);p&&(s.setAttribute(`nonce`,p),y.head.setAttribute(`nonce`,p)),s.appendChild(y.createTextNode(n)),y.head.appendChild(s),l&&y.body.classList.add(...l.split(` `));let g=y.querySelectorAll(`canvas`);for(let e=0;e<c.length;++e){let t=c[e],n=g[e];if(n===void 0){xJ({messages:["A canvas element could not be copied for printing, has it loaded? `onBeforePrint` likely resolved too early.",t],suppressErrors:m});continue}let r=n.getContext(`2d`);r&&r.drawImage(t,0,0)}for(let e=0;e<a.length;e++){let t=a[e],n=t.getAttribute(`src`);if(!n)v(t,[`Found an <img> tag with an empty "src" attribute. This prevents pre-loading it.`,t]);else{let e=new Image;e.onload=()=>{v(t)},e.onerror=(e,n,r,i,a)=>{v(t,[`Error loading <img>`,t,`Error`,a])},e.src=n}}for(let e=0;e<o.length;e++){let t=o[e];t.preload=`auto`;let n=t.getAttribute(`poster`);if(n){let e=new Image;e.onload=()=>{v(t)},e.onerror=(e,r,i,a,o)=>{v(t,[`Error loading video poster`,n,`for video`,t,`Error:`,o])},e.src=n}else t.readyState>=2?v(t):t.src?(t.onloadeddata=()=>{v(t)},t.onerror=(e,n,r,i,a)=>{v(t,[`Error loading video`,t,`Error`,a])},t.onstalled=()=>{v(t,[`Loading video stalled, skipping`,t])}):v(t,["Error loading video, `src` is empty",t])}let _=`select`,b=r.querySelectorAll(_),x=y.querySelectorAll(_);for(let e=0;e<b.length;e++)x[e].value=b[e].value;if(!d){let e=document.querySelectorAll(`style, link[rel~='stylesheet'], link[as='style']`);for(let t=0,n=e.length;t<n;++t){let n=e[t];if(n.tagName.toLowerCase()===`style`){let e=y.createElement(n.tagName),r=n.sheet;if(r){let i=``;try{let e=r.cssRules.length;for(let t=0;t<e;++t)typeof r.cssRules[t].cssText==`string`&&(i+=`${r.cssRules[t].cssText}\r
|
|
334
|
+
`)}catch(e){xJ({messages:["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/MatthewHerbst/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",n,`Original error: ${CJ(e).message}`],level:`warning`})}e.setAttribute(`id`,`react-to-print-${t}`),p&&e.setAttribute(`nonce`,p),e.appendChild(y.createTextNode(i)),y.head.appendChild(e)}}else if(n.getAttribute(`href`)){if(n.hasAttribute(`disabled`))xJ({messages:["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",n],level:`warning`}),v(n);else{let e=y.createElement(n.tagName);for(let t=0,r=n.attributes.length;t<r;++t){let r=n.attributes[t];r&&e.setAttribute(r.nodeName,r.nodeValue??``)}e.onload=()=>{v(e)},e.onerror=(t,n,r,i,a)=>{v(e,[`Failed to load`,e,`Error:`,a])},p&&e.setAttribute(`nonce`,p),y.head.appendChild(e)}}else xJ({messages:["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",n],level:`warning`}),v(n)}}}s===0&&wJ(e,n)}function AJ(e,t,n){e.onload=()=>{kJ(e,t,n)},document.body.appendChild(e)}function jJ({contentRef:e,optionalContent:t,suppressErrors:n}){if(t&&typeof t==`function`)return e&&xJ({level:`warning`,messages:['"react-to-print" received a `contentRef` option and an optional-content param passed to its callback. The `contentRef` option will be ignored.']}),t();if(e)return e.current;xJ({messages:['"react-to-print" did not receive a `contentRef` option or a optional-content param pass to its callback.'],suppressErrors:n})}function MJ(e,t){let{contentRef:n,fonts:r,ignoreGlobalStyles:i,suppressErrors:a}=t,o=jJ({contentRef:n,optionalContent:e,suppressErrors:a});if(!o)return;let s=o.cloneNode(!0),c=document.querySelectorAll(`link[rel~='stylesheet'], link[as='style']`),l=s.querySelectorAll(`img`),u=s.querySelectorAll(`video`),d=r?r.length:0;return{contentNode:o,clonedContentNode:s,clonedImgNodes:l,clonedVideoNodes:u,numResourcesToLoad:(i?0:c.length)+l.length+u.length+d,originalCanvasNodes:o.querySelectorAll(`canvas`)}}function NJ({bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:r,fonts:i,ignoreGlobalStyles:a,nonce:o,onAfterPrint:s,onBeforePrint:c,onPrintError:l,pageStyle:u,preserveAfterPrint:d,print:f,printIframeProps:p,suppressErrors:m}){return(0,L.useCallback)(h=>{SJ(d,!0);function g(){let c={bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:r,fonts:i,ignoreGlobalStyles:a,nonce:o,onAfterPrint:s,onPrintError:l,pageStyle:u,preserveAfterPrint:d,print:f,suppressErrors:m},g=bJ(p),_=MJ(h,c);if(!_){xJ({messages:[`There is nothing to print`],suppressErrors:m});return}AJ(g,_,c)}c?c().then(()=>{g()}).catch(e=>{l?.(`onBeforePrint`,CJ(e))}):g()},[e,t,n,r,i,a,o,s,c,l,u,d,p,f,m])}var PJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.default=function e(n,r){t(this,e),this.data=n,this.text=r.text||n,this.options=r}})),FJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CODE39=void 0;var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(PJ());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(e){o(n,e);function n(e,t){return i(this,n),e=e.toUpperCase(),t.mod43&&(e+=f(m(e))),a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return t(n,[{key:`encode`,value:function(){for(var e=u(`*`),t=0;t<this.data.length;t++)e+=u(this.data[t])+`0`;return e+=u(`*`),{data:e,text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),n}(n.default),c=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%*`.split(``),l=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function u(e){return d(p(e))}function d(e){return l[e].toString(2)}function f(e){return c[e]}function p(e){return c.indexOf(e)}function m(e){for(var t=0,n=0;n<e.length;n++)t+=p(e[n]);return t%=43,t}e.CODE39=s})),IJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t;function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var r=e.SET_A=0,i=e.SET_B=1,a=e.SET_C=2;e.SHIFT=98;var o=e.START_A=103,s=e.START_B=104,c=e.START_C=105;e.MODULO=103,e.STOP=106,e.FNC1=207,e.SET_BY_CODE=(t={},n(t,o,r),n(t,s,i),n(t,c,a),t),e.SWAP={101:r,100:i,99:a},e.A_START_CHAR=`Ð`,e.B_START_CHAR=`Ñ`,e.C_START_CHAR=`Ò`,e.A_CHARS=`[\0-_È-Ï]`,e.B_CHARS=`[ -È-Ï]`,e.C_CHARS=`(Ï*[0-9]{2}Ï*)`,e.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011]})),LJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(PJ()),r=IJ();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(n,e);function n(e,t){a(this,n);var r=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.substring(1),t));return r.bytes=e.split(``).map(function(e){return e.charCodeAt(0)}),r}return t(n,[{key:`valid`,value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.bytes,t=e.shift()-105,i=r.SET_BY_CODE[t];if(i===void 0)throw RangeError(`The encoding does not start with a start character.`);this.shouldEncodeAsEan128()===!0&&e.unshift(r.FNC1);var a=n.next(e,1,i);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,``):this.text,data:n.getBar(t)+a.result+n.getBar((a.checksum+t)%r.MODULO)+n.getBar(r.STOP)}}},{key:`shouldEncodeAsEan128`,value:function(){var e=this.options.ean128||!1;return typeof e==`string`&&(e=e.toLowerCase()===`true`),e}}],[{key:`getBar`,value:function(e){return r.BARS[e]?r.BARS[e].toString():``}},{key:`correctIndex`,value:function(e,t){if(t===r.SET_A){var n=e.shift();return n<32?n+64:n-32}return t===r.SET_B?e.shift()-32:(e.shift()-48)*10+e.shift()-48}},{key:`next`,value:function(e,t,i){if(!e.length)return{result:``,checksum:0};var a=void 0,o=void 0;if(e[0]>=200){o=e.shift()-105;var s=r.SWAP[o];s===void 0?((i===r.SET_A||i===r.SET_B)&&o===r.SHIFT&&(e[0]=i===r.SET_A?e[0]>95?e[0]-96:e[0]:e[0]<32?e[0]+96:e[0]),a=n.next(e,t+1,i)):a=n.next(e,t+1,s)}else o=n.correctIndex(e,i),a=n.next(e,t+1,i);var c=n.getBar(o),l=o*t;return{result:c+a.result,checksum:l+a.checksum}}}]),n}(n.default)})),RJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=IJ(),n=function(e){return e.match(RegExp(`^`+t.A_CHARS+`*`))[0].length},r=function(e){return e.match(RegExp(`^`+t.B_CHARS+`*`))[0].length},i=function(e){return e.match(RegExp(`^`+t.C_CHARS+`*`))[0]};function a(e,n){var r=n?t.A_CHARS:t.B_CHARS,i=e.match(RegExp(`^(`+r+`+?)(([0-9]{2}){2,})([^0-9]|$)`));if(i)return i[1]+`Ì`+o(e.substring(i[1].length));var s=e.match(RegExp(`^`+r+`+`))[0];return s.length===e.length?e:s+String.fromCharCode(n?205:206)+a(e.substring(s.length),!n)}function o(e){var t=i(e),o=t.length;if(o===e.length)return e;e=e.substring(o);var s=n(e)>=r(e);return t+String.fromCharCode(s?206:205)+a(e,s)}e.default=function(e){var s=void 0;if(i(e).length>=2)s=t.C_START_CHAR+o(e);else{var c=n(e)>r(e);s=(c?t.A_START_CHAR:t.B_START_CHAR)+a(e,c)}return s.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(e,t){return`Ë`+t})}})),zJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(LJ()),n=r(RJ());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(t,e);function t(e,r){if(i(this,t),/^[\x00-\x7F\xC8-\xD3]+$/.test(e))var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,(0,n.default)(e),r));else var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));return a(o)}return t}(t.default)})),BJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(LJ()),r=IJ();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(n,e);function n(e,t){return a(this,n),o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.A_START_CHAR+e,t))}return t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.A_CHARS+`+$`).test(this.data)}}]),n}(n.default)})),VJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(LJ()),r=IJ();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(n,e);function n(e,t){return a(this,n),o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.B_START_CHAR+e,t))}return t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.B_CHARS+`+$`).test(this.data)}}]),n}(n.default)})),HJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(LJ()),r=IJ();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(n,e);function n(e,t){return a(this,n),o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.C_START_CHAR+e,t))}return t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.C_CHARS+`+$`).test(this.data)}}]),n}(n.default)})),UJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var t=a(zJ()),n=a(BJ()),r=a(VJ()),i=a(HJ());function a(e){return e&&e.__esModule?e:{default:e}}e.CODE128=t.default,e.CODE128A=n.default,e.CODE128B=r.default,e.CODE128C=i.default})),WJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SIDE_BIN=`101`,e.MIDDLE_BIN=`01010`,e.BINARIES={L:[`0001101`,`0011001`,`0010011`,`0111101`,`0100011`,`0110001`,`0101111`,`0111011`,`0110111`,`0001011`],G:[`0100111`,`0110011`,`0011011`,`0100001`,`0011101`,`0111001`,`0000101`,`0010001`,`0001001`,`0010111`],R:[`1110010`,`1100110`,`1101100`,`1000010`,`1011100`,`1001110`,`1010000`,`1000100`,`1001000`,`1110100`],O:[`0001101`,`0011001`,`0010011`,`0111101`,`0100011`,`0110001`,`0101111`,`0111011`,`0110111`,`0001011`],E:[`0100111`,`0110011`,`0011011`,`0100001`,`0011101`,`0111001`,`0000101`,`0010001`,`0001001`,`0010111`]},e.EAN2_STRUCTURE=[`LL`,`LG`,`GL`,`GG`],e.EAN5_STRUCTURE=[`GGLLL`,`GLGLL`,`GLLGL`,`GLLLG`,`LGGLL`,`LLGGL`,`LLLGG`,`LGLGL`,`LGLLG`,`LLGLG`],e.EAN13_STRUCTURE=[`LLLLLL`,`LLGLGG`,`LLGGLG`,`LLGGGL`,`LGLLGG`,`LGGLLG`,`LGGGLL`,`LGLGLG`,`LGLGGL`,`LGGLGL`]})),GJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=WJ();e.default=function(e,n,r){var i=e.split(``).map(function(e,r){return t.BINARIES[n[r]]}).map(function(t,n){return t?t[e[n]]:``});if(r){var a=e.length-1;i=i.map(function(e,t){return t<a?e+r:e})}return i.join(``)}})),KJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=WJ(),r=a(GJ()),i=a(PJ());function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function c(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){c(i,e);function i(e,t){o(this,i);var n=s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.fontSize=!t.flat&&t.fontSize>t.width*10?t.width*10:t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return t(i,[{key:`encode`,value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:`leftText`,value:function(e,t){return this.text.substr(e,t)}},{key:`leftEncode`,value:function(e,t){return(0,r.default)(e,t)}},{key:`rightText`,value:function(e,t){return this.text.substr(e,t)}},{key:`rightEncode`,value:function(e,t){return(0,r.default)(e,t)}},{key:`encodeGuarded`,value:function(){var e={fontSize:this.fontSize},t={height:this.guardHeight};return[{data:n.SIDE_BIN,options:t},{data:this.leftEncode(),text:this.leftText(),options:e},{data:n.MIDDLE_BIN,options:t},{data:this.rightEncode(),text:this.rightText(),options:e},{data:n.SIDE_BIN,options:t}]}},{key:`encodeFlat`,value:function(){return{data:[n.SIDE_BIN,this.leftEncode(),n.MIDDLE_BIN,this.rightEncode(),n.SIDE_BIN].join(``),text:this.text}}}]),i}(i.default)})),qJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}if(`value`in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(r)},r=WJ(),i=a(KJ());function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function c(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=function(e){return(10-e.substr(0,12).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t*3:e+t},0)%10)%10};e.default=function(e){c(i,e);function i(e,t){o(this,i),e.search(/^[0-9]{12}$/)!==-1&&(e+=l(e));var n=s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.lastChar=t.lastChar,n}return t(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===l(this.data)}},{key:`leftText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftText`,this).call(this,1,6)}},{key:`leftEncode`,value:function(){var e=this.data.substr(1,6),t=r.EAN13_STRUCTURE[this.data[0]];return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftEncode`,this).call(this,e,t)}},{key:`rightText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightText`,this).call(this,7,6)}},{key:`rightEncode`,value:function(){var e=this.data.substr(7,6);return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightEncode`,this).call(this,e,`RRRRRR`)}},{key:`encodeGuarded`,value:function(){var e=n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`encodeGuarded`,this).call(this);return this.options.displayValue&&(e.unshift({data:`000000000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),this.options.lastChar&&(e.push({data:`00`}),e.push({data:`00000`,text:this.options.lastChar,options:{fontSize:this.fontSize}}))),e}}]),i}(i.default)})),JJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}if(`value`in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(r)},r=i(KJ());function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){return(10-e.substr(0,7).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t:e+t*3},0)%10)%10};e.default=function(e){s(r,e);function r(e,t){return a(this,r),e.search(/^[0-9]{7}$/)!==-1&&(e+=c(e)),o(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return t(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===c(this.data)}},{key:`leftText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftText`,this).call(this,0,4)}},{key:`leftEncode`,value:function(){var e=this.data.substr(0,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftEncode`,this).call(this,e,`LLLL`)}},{key:`rightText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightText`,this).call(this,4,4)}},{key:`rightEncode`,value:function(){var e=this.data.substr(4,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightEncode`,this).call(this,e,`RRRR`)}}]),r}(r.default)})),YJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=WJ(),r=a(GJ()),i=a(PJ());function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function c(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=function(e){return e.split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t*9:e+t*3},0)%10};e.default=function(e){c(i,e);function i(e,t){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return t(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:`encode`,value:function(){var e=n.EAN5_STRUCTURE[l(this.data)];return{data:`1011`+(0,r.default)(this.data,e,`01`),text:this.text}}}]),i}(i.default)})),XJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=WJ(),r=a(GJ()),i=a(PJ());function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function c(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){c(i,e);function i(e,t){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return t(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:`encode`,value:function(){var e=n.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:`1011`+(0,r.default)(this.data,e,`01`),text:this.text}}}]),i}(i.default)})),ZJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();e.checksum=l;var n=i(GJ()),r=i(PJ());function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){s(r,e);function r(e,t){a(this,r),e.search(/^[0-9]{11}$/)!==-1&&(e+=l(e));var n=o(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.displayValue=t.displayValue,n.fontSize=t.fontSize>t.width*10?t.width*10:t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return t(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==l(this.data)}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=(0,n.default)(this.data.substr(0,6),`LLLLLL`),e+=`01010`,e+=(0,n.default)(this.data.substr(6,6),`RRRRRR`),e+=`101`,{data:e,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`+(0,n.default)(this.data[0],`L`),options:{height:this.guardHeight}}),e.push({data:(0,n.default)(this.data.substr(1,5),`LLLLL`),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:`01010`,options:{height:this.guardHeight}}),e.push({data:(0,n.default)(this.data.substr(6,5),`RRRRR`),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:(0,n.default)(this.data[11],`R`)+`101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text.substr(11,1),options:{textAlign:`right`,fontSize:this.fontSize}}),e}}]),r}(r.default);function l(e){for(var t=0,n=1;n<11;n+=2)t+=parseInt(e[n]);for(n=0;n<11;n+=2)t+=parseInt(e[n])*3;return(10-t%10)%10}e.default=c})),QJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=a(GJ()),r=a(PJ()),i=ZJ();function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function c(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=[`XX00000XXX`,`XX10000XXX`,`XX20000XXX`,`XXX00000XX`,`XXXX00000X`,`XXXXX00005`,`XXXXX00006`,`XXXXX00007`,`XXXXX00008`,`XXXXX00009`],u=[[`EEEOOO`,`OOOEEE`],[`EEOEOO`,`OOEOEE`],[`EEOOEO`,`OOEEOE`],[`EEOOOE`,`OOEEEO`],[`EOEEOO`,`OEOOEE`],[`EOOEEO`,`OEEOOE`],[`EOOOEE`,`OEEEOO`],[`EOEOEO`,`OEOEOE`],[`EOEOOE`,`OEOEEO`],[`EOOEOE`,`OEEOEO`]],d=function(e){c(r,e);function r(e,t){o(this,r);var n=s(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));if(n.isValid=!1,e.search(/^[0-9]{6}$/)!==-1)n.middleDigits=e,n.upcA=f(e,`0`),n.text=t.text||``+n.upcA[0]+e+n.upcA[n.upcA.length-1],n.isValid=!0;else if(e.search(/^[01][0-9]{7}$/)!==-1){if(n.middleDigits=e.substring(1,e.length-1),n.upcA=f(n.middleDigits,e[0]),n.upcA[n.upcA.length-1]===e[e.length-1])n.isValid=!0;else return s(n)}else return s(n);return n.displayValue=t.displayValue,n.fontSize=t.fontSize>t.width*10?t.width*10:t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return t(r,[{key:`valid`,value:function(){return this.isValid}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=this.encodeMiddleDigits(),e+=`010101`,{data:e,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text[0],options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`,options:{height:this.guardHeight}}),e.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),e.push({data:`010101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text[7],options:{textAlign:`right`,fontSize:this.fontSize}}),e}},{key:`encodeMiddleDigits`,value:function(){var e=this.upcA[0],t=this.upcA[this.upcA.length-1],r=u[parseInt(t)][parseInt(e)];return(0,n.default)(this.middleDigits,r)}}]),r}(r.default);function f(e,t){for(var n=l[parseInt(e[e.length-1])],r=``,a=0,o=0;o<n.length;o++){var s=n[o];r+=s===`X`?e[a++]:s}return r=``+t+r,``+r+(0,i.checksum)(r)}e.default=d})),$J=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.UPCE=e.UPC=e.EAN2=e.EAN5=e.EAN8=e.EAN13=void 0;var t=s(qJ()),n=s(JJ()),r=s(YJ()),i=s(XJ()),a=s(ZJ()),o=s(QJ());function s(e){return e&&e.__esModule?e:{default:e}}e.EAN13=t.default,e.EAN8=n.default,e.EAN5=r.default,e.EAN2=i.default,e.UPC=a.default,e.UPCE=o.default})),eY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.START_BIN=`1010`,e.END_BIN=`11101`,e.BINARIES=[`00110`,`10001`,`01001`,`11000`,`00101`,`10100`,`01100`,`00011`,`10010`,`01010`]})),tY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=eY(),r=i(PJ());function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(r,e);function r(){return a(this,r),o(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return t(r,[{key:`valid`,value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:`encode`,value:function(){var e=this,t=this.data.match(/.{2}/g).map(function(t){return e.encodePair(t)}).join(``);return{data:n.START_BIN+t+n.END_BIN,text:this.text}}},{key:`encodePair`,value:function(e){var t=n.BINARIES[e[1]];return n.BINARIES[e[0]].split(``).map(function(e,n){return(e===`1`?`111`:`1`)+(t[n]===`1`?`000`:`0`)}).join(``)}}]),r}(r.default)})),nY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(tY());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(e){var t=e.substr(0,13).split(``).map(function(e){return parseInt(e,10)}).reduce(function(e,t,n){return e+t*(3-n%2*2)},0);return Math.ceil(t/10)*10-t};e.default=function(e){o(n,e);function n(e,t){return i(this,n),e.search(/^[0-9]{13}$/)!==-1&&(e+=s(e)),a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return t(n,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===s(this.data)}}]),n}(n.default)})),rY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ITF14=e.ITF=void 0;var t=r(tY()),n=r(nY());function r(e){return e&&e.__esModule?e:{default:e}}e.ITF=t.default,e.ITF14=n.default})),iY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(PJ());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(e){o(n,e);function n(e,t){return i(this,n),a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return t(n,[{key:`encode`,value:function(){for(var e=`110`,t=0;t<this.data.length;t++){var n=parseInt(this.data[t]).toString(2);n=c(n,4-n.length);for(var r=0;r<n.length;r++)e+=n[r]==`0`?`100`:`110`}return e+=`1001`,{data:e,text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),n}(n.default);function c(e,t){for(var n=0;n<t;n++)e=`0`+e;return e}e.default=s})),aY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mod10=t,e.mod11=n;function t(e){for(var t=0,n=0;n<e.length;n++){var r=parseInt(e[n]);(n+e.length)%2==0?t+=r:t+=r*2%10+Math.floor(r*2/10)}return(10-t%10)%10}function n(e){for(var t=0,n=[2,3,4,5,6,7],r=0;r<e.length;r++){var i=parseInt(e[e.length-1-r]);t+=n[r%n.length]*i}return(11-t%11)%11}})),oY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(iY()),n=aY();function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(t,e);function t(e,r){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod10)(e),r))}return t}(t.default)})),sY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(iY()),n=aY();function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(t,e);function t(e,r){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod11)(e),r))}return t}(t.default)})),cY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(iY()),n=aY();function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(t,e);function t(e,r){return i(this,t),e+=(0,n.mod10)(e),e+=(0,n.mod10)(e),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return t}(t.default)})),lY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(iY()),n=aY();function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(t,e);function t(e,r){return i(this,t),e+=(0,n.mod11)(e),e+=(0,n.mod10)(e),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return t}(t.default)})),uY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MSI1110=e.MSI1010=e.MSI11=e.MSI10=e.MSI=void 0;var t=o(iY()),n=o(oY()),r=o(sY()),i=o(cY()),a=o(lY());function o(e){return e&&e.__esModule?e:{default:e}}e.MSI=t.default,e.MSI10=n.default,e.MSI11=r.default,e.MSI1010=i.default,e.MSI1110=a.default})),dY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.pharmacode=void 0;var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(PJ());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.pharmacode=function(e){o(n,e);function n(e,t){i(this,n);var r=a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.number=parseInt(e,10),r}return t(n,[{key:`encode`,value:function(){for(var e=this.number,t=``;!isNaN(e)&&e!=0;)e%2==0?(t=`11100`+t,e=(e-2)/2):(t=`100`+t,e=(e-1)/2);return t=t.slice(0,-2),{data:t,text:this.text}}},{key:`valid`,value:function(){return this.number>=3&&this.number<=131070}}]),n}(n.default)})),fY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.codabar=void 0;var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(PJ());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.codabar=function(e){o(n,e);function n(e,t){i(this,n),e.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(e=`A`+e+`A`);var r=a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.toUpperCase(),t));return r.text=r.options.text||r.text.replace(/[A-D]/g,``),r}return t(n,[{key:`valid`,value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:`encode`,value:function(){for(var e=[],t=this.getEncodings(),n=0;n<this.data.length;n++)e.push(t[this.data.charAt(n)]),n!==this.data.length-1&&e.push(`0`);return{text:this.text,data:e.join(``)}}},{key:`getEncodings`,value:function(){return{0:`101010011`,1:`101011001`,2:`101001011`,3:`110010101`,4:`101101001`,5:`110101001`,6:`100101011`,7:`100101101`,8:`100110101`,9:`110100101`,"-":`101001101`,$:`101100101`,":":`1101011011`,"/":`1101101011`,".":`1101101101`,"+":`1011011011`,A:`1011001001`,B:`1001001011`,C:`1010010011`,D:`1010011001`}}}]),n}(n.default)})),pY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SYMBOLS=`0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,-,., ,$,/,+,%,($),(%),(/),(+),ÿ`.split(`,`),e.BINARIES=`100010100.101001000.101000100.101000010.100101000.100100100.100100010.101010000.100010010.100001010.110101000.110100100.110100010.110010100.110010010.110001010.101101000.101100100.101100010.100110100.100011010.101011000.101001100.101000110.100101100.100010110.110110100.110110010.110101100.110100110.110010110.110011010.101101100.101100110.100110110.100111010.100101110.111010100.111010010.111001010.101101110.101110110.110101110.100100110.111011010.111010110.100110010.101011110`.split(`.`),e.MULTI_SYMBOLS={"\0":[`(%)`,`U`],"":[`($)`,`A`],"":[`($)`,`B`],"":[`($)`,`C`],"":[`($)`,`D`],"":[`($)`,`E`],"":[`($)`,`F`],"\x07":[`($)`,`G`],"\b":[`($)`,`H`]," ":[`($)`,`I`],"\n":[`($)`,`J`],"\v":[`($)`,`K`],"\f":[`($)`,`L`],"\r":[`($)`,`M`],"":[`($)`,`N`],"":[`($)`,`O`],"":[`($)`,`P`],"":[`($)`,`Q`],"":[`($)`,`R`],"":[`($)`,`S`],"":[`($)`,`T`],"":[`($)`,`U`],"":[`($)`,`V`],"":[`($)`,`W`],"":[`($)`,`X`],"":[`($)`,`Y`],"":[`($)`,`Z`],"\x1B":[`(%)`,`A`],"":[`(%)`,`B`],"":[`(%)`,`C`],"":[`(%)`,`D`],"":[`(%)`,`E`],"!":[`(/)`,`A`],'"':[`(/)`,`B`],"#":[`(/)`,`C`],"&":[`(/)`,`F`],"'":[`(/)`,`G`],"(":[`(/)`,`H`],")":[`(/)`,`I`],"*":[`(/)`,`J`],",":[`(/)`,`L`],":":[`(/)`,`Z`],";":[`(%)`,`F`],"<":[`(%)`,`G`],"=":[`(%)`,`H`],">":[`(%)`,`I`],"?":[`(%)`,`J`],"@":[`(%)`,`V`],"[":[`(%)`,`K`],"\\":[`(%)`,`L`],"]":[`(%)`,`M`],"^":[`(%)`,`N`],_:[`(%)`,`O`],"`":[`(%)`,`W`],a:[`(+)`,`A`],b:[`(+)`,`B`],c:[`(+)`,`C`],d:[`(+)`,`D`],e:[`(+)`,`E`],f:[`(+)`,`F`],g:[`(+)`,`G`],h:[`(+)`,`H`],i:[`(+)`,`I`],j:[`(+)`,`J`],k:[`(+)`,`K`],l:[`(+)`,`L`],m:[`(+)`,`M`],n:[`(+)`,`N`],o:[`(+)`,`O`],p:[`(+)`,`P`],q:[`(+)`,`Q`],r:[`(+)`,`R`],s:[`(+)`,`S`],t:[`(+)`,`T`],u:[`(+)`,`U`],v:[`(+)`,`V`],w:[`(+)`,`W`],x:[`(+)`,`X`],y:[`(+)`,`Y`],z:[`(+)`,`Z`],"{":[`(%)`,`P`],"|":[`(%)`,`Q`],"}":[`(%)`,`R`],"~":[`(%)`,`S`],"":[`(%)`,`T`]}})),mY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=pY(),r=i(PJ());function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(r,e);function r(e,t){return a(this,r),o(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return t(r,[{key:`valid`,value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.data.split(``).flatMap(function(e){return n.MULTI_SYMBOLS[e]||e}),t=e.map(function(e){return r.getEncoding(e)}).join(``),i=r.checksum(e,20),a=r.checksum(e.concat(i),15);return{text:this.text,data:r.getEncoding(`ÿ`)+t+r.getEncoding(i)+r.getEncoding(a)+r.getEncoding(`ÿ`)+`1`}}}],[{key:`getEncoding`,value:function(e){return n.BINARIES[r.symbolValue(e)]}},{key:`getSymbol`,value:function(e){return n.SYMBOLS[e]}},{key:`symbolValue`,value:function(e){return n.SYMBOLS.indexOf(e)}},{key:`checksum`,value:function(e,t){var n=e.slice().reverse().reduce(function(e,n,i){var a=i%t+1;return e+r.symbolValue(n)*a},0);return r.getSymbol(n%47)}}]),r}(r.default)})),hY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(mY());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(n,e);function n(e,t){return i(this,n),a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return t(n,[{key:`valid`,value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),n}(n.default)})),gY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CODE93FullASCII=e.CODE93=void 0;var t=r(mY()),n=r(hY());function r(e){return e&&e.__esModule?e:{default:e}}e.CODE93=t.default,e.CODE93FullASCII=n.default})),_Y=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GenericBarcode=void 0;var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(PJ());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.GenericBarcode=function(e){o(n,e);function n(e,t){return i(this,n),a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return t(n,[{key:`encode`,value:function(){return{data:`10101010101010101010101010101010101010101`,text:this.text}}},{key:`valid`,value:function(){return!0}}]),n}(n.default)})),vY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=FJ(),n=UJ(),r=$J(),i=rY(),a=uY(),o=dY(),s=fY(),c=gY(),l=_Y();e.default={CODE39:t.CODE39,CODE128:n.CODE128,CODE128A:n.CODE128A,CODE128B:n.CODE128B,CODE128C:n.CODE128C,EAN13:r.EAN13,EAN8:r.EAN8,EAN5:r.EAN5,EAN2:r.EAN2,UPC:r.UPC,UPCE:r.UPCE,ITF14:i.ITF14,ITF:i.ITF,MSI:a.MSI,MSI10:a.MSI10,MSI11:a.MSI11,MSI1010:a.MSI1010,MSI1110:a.MSI1110,pharmacode:o.pharmacode,codabar:s.codabar,CODE93:c.CODE93,CODE93FullASCII:c.CODE93FullASCII,GenericBarcode:l.GenericBarcode}})),yY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};e.default=function(e,n){return t({},e,n)}})),bY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e){var t=[];function n(e){if(Array.isArray(e))for(var r=0;r<e.length;r++)n(e[r]);else e.text=e.text||``,e.data=e.data||``,t.push(e)}return n(e),t}})),xY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e){return e.marginTop=e.marginTop||e.margin,e.marginBottom=e.marginBottom||e.margin,e.marginRight=e.marginRight||e.margin,e.marginLeft=e.marginLeft||e.margin,e}})),SY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e){var t=[`width`,`height`,`textMargin`,`fontSize`,`margin`,`marginTop`,`marginBottom`,`marginLeft`,`marginRight`];for(var n in t)t.hasOwnProperty(n)&&(n=t[n],typeof e[n]==`string`&&(e[n]=parseInt(e[n],10)));return typeof e.displayValue==`string`&&(e.displayValue=e.displayValue!=`false`),e}})),CY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={width:2,height:100,format:`auto`,displayValue:!0,fontOptions:``,font:`monospace`,text:void 0,textAlign:`center`,textPosition:`bottom`,textMargin:2,fontSize:20,background:`#ffffff`,lineColor:`#000000`,margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}}})),wY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(SY()),n=r(CY());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var r={};for(var i in n.default)n.default.hasOwnProperty(i)&&(e.hasAttribute(`jsbarcode-`+i.toLowerCase())&&(r[i]=e.getAttribute(`jsbarcode-`+i.toLowerCase())),e.hasAttribute(`data-`+i.toLowerCase())&&(r[i]=e.getAttribute(`data-`+i.toLowerCase())));return r.value=e.getAttribute(`jsbarcode-value`)||e.getAttribute(`data-value`),r=(0,t.default)(r),r}e.default=i})),TY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var t=n(yY());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){return t.height+(t.displayValue&&e.text.length>0?t.fontSize+t.textMargin:0)+t.marginTop+t.marginBottom}function i(e,t,n){if(n.displayValue&&t<e){if(n.textAlign==`center`)return Math.floor((e-t)/2);if(n.textAlign==`left`)return 0;if(n.textAlign==`right`)return Math.floor(e-t)}return 0}function a(e,n,a){for(var o=0;o<e.length;o++){var s=e[o],l=(0,t.default)(n,s.options),u=l.displayValue?c(s.text,l,a):0,d=s.data.length*l.width;s.width=Math.ceil(Math.max(u,d)),s.height=r(s,l),s.barcodePadding=i(u,d,l)}}function o(e){for(var t=0,n=0;n<e.length;n++)t+=e[n].width;return t}function s(e){for(var t=0,n=0;n<e.length;n++)e[n].height>t&&(t=e[n].height);return t}function c(e,t,n){var r;if(n)r=n;else if(typeof document<`u`)r=document.createElement(`canvas`).getContext(`2d`);else return 0;r.font=t.fontOptions+` `+t.fontSize+`px `+t.font;var i=r.measureText(e);return i?i.width:0}e.getMaximumHeightOfEncodings=s,e.getEncodingHeight=r,e.getBarcodePadding=i,e.calculateEncodingAttributes=a,e.getTotalWidthOfEncodings=o})),EY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(yY()),r=TY();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.default=function(){function e(t,n,r){a(this,e),this.canvas=t,this.encodings=n,this.options=r}return t(e,[{key:`render`,value:function(){if(!this.canvas.getContext)throw Error(`The browser does not support canvas.`);this.prepareCanvas();for(var e=0;e<this.encodings.length;e++){var t=(0,n.default)(this.options,this.encodings[e].options);this.drawCanvasBarcode(t,this.encodings[e]),this.drawCanvasText(t,this.encodings[e]),this.moveCanvasDrawing(this.encodings[e])}this.restoreCanvas()}},{key:`prepareCanvas`,value:function(){var e=this.canvas.getContext(`2d`);e.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,e);var t=(0,r.getTotalWidthOfEncodings)(this.encodings),n=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=t+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,e.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(e.fillStyle=this.options.background,e.fillRect(0,0,this.canvas.width,this.canvas.height)),e.translate(this.options.marginLeft,0)}},{key:`drawCanvasBarcode`,value:function(e,t){var n=this.canvas.getContext(`2d`),r=t.data,i=e.textPosition==`top`?e.marginTop+e.fontSize+e.textMargin:e.marginTop;n.fillStyle=e.lineColor;for(var a=0;a<r.length;a++){var o=a*e.width+t.barcodePadding;r[a]===`1`?n.fillRect(o,i,e.width,e.height):r[a]&&n.fillRect(o,i,e.width,e.height*r[a])}}},{key:`drawCanvasText`,value:function(e,t){var n=this.canvas.getContext(`2d`),r=e.fontOptions+` `+e.fontSize+`px `+e.font;if(e.displayValue){var i,a=e.textPosition==`top`?e.marginTop+e.fontSize-e.textMargin:e.height+e.textMargin+e.marginTop+e.fontSize;n.font=r,e.textAlign==`left`||t.barcodePadding>0?(i=0,n.textAlign=`left`):e.textAlign==`right`?(i=t.width-1,n.textAlign=`right`):(i=t.width/2,n.textAlign=`center`),n.fillText(t.text,i,a)}}},{key:`moveCanvasDrawing`,value:function(e){this.canvas.getContext(`2d`).translate(e.width,0)}},{key:`restoreCanvas`,value:function(){this.canvas.getContext(`2d`).restore()}}]),e}()})),DY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(yY()),r=TY();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var o=`http://www.w3.org/2000/svg`;e.default=function(){function e(t,n,r){a(this,e),this.svg=t,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return t(e,[{key:`render`,value:function(){var e=this.options.marginLeft;this.prepareSVG();for(var t=0;t<this.encodings.length;t++){var r=this.encodings[t],i=(0,n.default)(this.options,r.options),a=this.createGroup(e,i.marginTop,this.svg);this.setGroupOptions(a,i),this.drawSvgBarcode(a,i,r),this.drawSVGText(a,i,r),e+=r.width}}},{key:`prepareSVG`,value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var e=(0,r.getTotalWidthOfEncodings)(this.encodings),t=(0,r.getMaximumHeightOfEncodings)(this.encodings),n=e+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,t),this.options.background&&this.drawRect(0,0,n,t,this.svg).setAttribute(`fill`,this.options.background)}},{key:`drawSvgBarcode`,value:function(e,t,n){for(var r=n.data,i=t.textPosition==`top`?t.fontSize+t.textMargin:0,a=0,o=0,s=0;s<r.length;s++)o=s*t.width+n.barcodePadding,r[s]===`1`?a++:a>0&&(this.drawRect(o-t.width*a,i,t.width*a,t.height,e),a=0);a>0&&this.drawRect(o-t.width*(a-1),i,t.width*a,t.height,e)}},{key:`drawSVGText`,value:function(e,t,n){var r=this.document.createElementNS(o,`text`);if(t.displayValue){var i,a;r.setAttribute(`font-family`,t.font),r.setAttribute(`font-size`,t.fontSize),t.fontOptions.includes(`bold`)&&r.setAttribute(`font-weight`,`bold`),t.fontOptions.includes(`italic`)&&r.setAttribute(`font-style`,`italic`),a=t.textPosition==`top`?t.fontSize-t.textMargin:t.height+t.textMargin+t.fontSize,t.textAlign==`left`||n.barcodePadding>0?(i=0,r.setAttribute(`text-anchor`,`start`)):t.textAlign==`right`?(i=n.width-1,r.setAttribute(`text-anchor`,`end`)):(i=n.width/2,r.setAttribute(`text-anchor`,`middle`)),r.setAttribute(`x`,i),r.setAttribute(`y`,a),r.appendChild(this.document.createTextNode(n.text)),e.appendChild(r)}}},{key:`setSvgAttributes`,value:function(e,t){var n=this.svg;n.setAttribute(`width`,e+`px`),n.setAttribute(`height`,t+`px`),n.setAttribute(`x`,`0px`),n.setAttribute(`y`,`0px`),n.setAttribute(`viewBox`,`0 0 `+e+` `+t),n.setAttribute(`xmlns`,o),n.setAttribute(`version`,`1.1`)}},{key:`createGroup`,value:function(e,t,n){var r=this.document.createElementNS(o,`g`);return r.setAttribute(`transform`,`translate(`+e+`, `+t+`)`),n.appendChild(r),r}},{key:`setGroupOptions`,value:function(e,t){e.setAttribute(`fill`,t.lineColor)}},{key:`drawRect`,value:function(e,t,n,r,i){var a=this.document.createElementNS(o,`rect`);return a.setAttribute(`x`,e),a.setAttribute(`y`,t),a.setAttribute(`width`,n),a.setAttribute(`height`,r),i.appendChild(a),a}}]),e}()})),OY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function n(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.default=function(){function e(t,r,i){n(this,e),this.object=t,this.encodings=r,this.options=i}return t(e,[{key:`render`,value:function(){this.object.encodings=this.encodings}}]),e}()})),kY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=i(EY()),n=i(DY()),r=i(OY());function i(e){return e&&e.__esModule?e:{default:e}}e.default={CanvasRenderer:t.default,SVGRenderer:n.default,ObjectRenderer:r.default}})),AY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function n(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function r(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(e){r(i,e);function i(e,r){t(this,i);var a=n(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return a.name=`InvalidInputException`,a.symbology=e,a.input=r,a.message=`"`+a.input+`" is not a valid input for `+a.symbology,a}return i}(Error),a=function(e){r(i,e);function i(){t(this,i);var e=n(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return e.name=`InvalidElementException`,e.message=`Not supported type to render on`,e}return i}(Error),o=function(e){r(i,e);function i(){t(this,i);var e=n(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return e.name=`NoElementException`,e.message=`No element to render on.`,e}return i}(Error);e.InvalidInputException=i,e.InvalidElementException=a,e.NoElementException=o})),jY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n=a(wY()),r=a(kY()),i=AY();function a(e){return e&&e.__esModule?e:{default:e}}function o(e){if(typeof e==`string`)return s(e);if(Array.isArray(e)){for(var a=[],l=0;l<e.length;l++)a.push(o(e[l]));return a}if(typeof HTMLCanvasElement<`u`&&e instanceof HTMLImageElement)return c(e);if(e&&e.nodeName&&e.nodeName.toLowerCase()===`svg`||typeof SVGElement<`u`&&e instanceof SVGElement)return{element:e,options:(0,n.default)(e),renderer:r.default.SVGRenderer};if(typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement)return{element:e,options:(0,n.default)(e),renderer:r.default.CanvasRenderer};if(e&&e.getContext)return{element:e,renderer:r.default.CanvasRenderer};if(e&&(e===void 0?`undefined`:t(e))===`object`&&!e.nodeName)return{element:e,renderer:r.default.ObjectRenderer};throw new i.InvalidElementException}function s(e){var t=document.querySelectorAll(e);if(t.length!==0){for(var n=[],r=0;r<t.length;r++)n.push(o(t[r]));return n}}function c(e){var t=document.createElement(`canvas`);return{element:t,options:(0,n.default)(e),renderer:r.default.CanvasRenderer,afterRender:function(){e.setAttribute(`src`,t.toDataURL())}}}e.default=o})),MY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function n(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.default=function(){function e(t){n(this,e),this.api=t}return t(e,[{key:`handleCatch`,value:function(e){if(e.name===`InvalidInputException`){if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw e.message}else throw e;this.api.render=function(){}}},{key:`wrapBarcodeCall`,value:function(e){try{var t=e.apply(void 0,arguments);return this.api._options.valid(!0),t}catch(e){return this.handleCatch(e),this.api}}}]),e}()})),NY=l(o(((e,t)=>{var n=d(vY()),r=d(yY()),i=d(bY()),a=d(xY()),o=d(jY()),s=d(SY()),c=d(MY()),l=AY(),u=d(CY());function d(e){return e&&e.__esModule?e:{default:e}}var f=function(){},p=function(e,t,n){var r=new f;if(e===void 0)throw Error(`No element to render on was provided.`);return r._renderProperties=(0,o.default)(e),r._encodings=[],r._options=u.default,r._errorHandler=new c.default(r),t!==void 0&&(n||={},n.format||(n.format=_()),r.options(n)[n.format](t,n).render()),r};for(var m in p.getModule=function(e){return n.default[e]},n.default)n.default.hasOwnProperty(m)&&h(n.default,m);function h(e,t){f.prototype[t]=f.prototype[t.toUpperCase()]=f.prototype[t.toLowerCase()]=function(n,i){var a=this;return a._errorHandler.wrapBarcodeCall(function(){i.text=i.text===void 0?void 0:``+i.text;var o=(0,r.default)(a._options,i);o=(0,s.default)(o);var c=e[t],l=g(n,c,o);return a._encodings.push(l),a})}}function g(e,t,n){e=``+e;var a=new t(e,n);if(!a.valid())throw new l.InvalidInputException(a.constructor.name,e);var o=a.encode();o=(0,i.default)(o);for(var s=0;s<o.length;s++)o[s].options=(0,r.default)(n,o[s].options);return o}function _(){return n.default.CODE128?`CODE128`:Object.keys(n.default)[0]}f.prototype.options=function(e){return this._options=(0,r.default)(this._options,e),this},f.prototype.blank=function(e){var t=Array(e+1).join(`0`);return this._encodings.push({data:t}),this},f.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var e;for(var t in this._renderProperties){e=this._renderProperties[t];var i=(0,r.default)(this._options,e.options);i.format==`auto`&&(i.format=_()),this._errorHandler.wrapBarcodeCall(function(){var t=i.value,r=n.default[i.format.toUpperCase()],a=g(t,r,i);v(e,a,i)})}}},f.prototype.render=function(){if(!this._renderProperties)throw new l.NoElementException;if(Array.isArray(this._renderProperties))for(var e=0;e<this._renderProperties.length;e++)v(this._renderProperties[e],this._encodings,this._options);else v(this._renderProperties,this._encodings,this._options);return this},f.prototype._defaults=u.default;function v(e,t,n){t=(0,i.default)(t);for(var o=0;o<t.length;o++)t[o].options=(0,r.default)(n,t[o].options),(0,a.default)(t[o].options);(0,a.default)(n);var s=e.renderer;new s(e.element,t,n).render(),e.afterRender&&e.afterRender()}typeof window<`u`&&(window.JsBarcode=p),typeof jQuery<`u`&&(jQuery.fn.JsBarcode=function(e,t){var n=[];return jQuery(this).each(function(){n.push(this)}),p(n,e,t)}),t.exports=p}))(),1);function PY(e){let t=(0,L.useRef)(null),n=(0,L.useCallback)(n=>{n&&(0,NY.default)(n,e.text,{format:`CODE128`}),t.current=n},[e.text]);return(0,L.useEffect)(()=>{t.current&&(0,NY.default)(t.current,e.text,{format:`CODE128`,fontSize:30})},[e.text]),(0,H.jsx)(`svg`,{ref:n})}function FY(e){return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{marginTop:`4em`,display:`flex`,justifyContent:`center`},children:(0,H.jsx)(`h2`,{children:`SeedTactic: FMS Insight`})}),(0,H.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`},children:(0,H.jsx)(`p`,{style:{fontSize:`x-large`},children:new Date().toLocaleString(void 0,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`})})}),(0,H.jsxs)(`div`,{style:{marginTop:`2em`,display:`flex`,justifyContent:`space-around`},children:[(0,H.jsx)(PY,{text:e.materialName??e.partName}),e.count>=2?(0,H.jsx)(PY,{text:e.count.toString()}):void 0]}),e.serial1&&e.serial1!==``?(0,H.jsxs)(`div`,{style:{marginTop:`2em`,display:`flex`,justifyContent:`space-around`},children:[(0,H.jsx)(PY,{text:e.serial1}),e.serial2&&e.serial2!==``?(0,H.jsx)(PY,{text:e.serial2||``}):void 0]}):void 0,(0,H.jsx)(`div`,{style:{marginTop:`2em`,marginLeft:`4em`,marginRight:`4em`,marginBottom:`9em`},children:e.uniq===null||e.uniq===``?(0,H.jsx)(`p`,{style:{fontSize:`x-large`},children:`Not currently assigned to any jobs`}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{style:{fontSize:`x-large`},children:`Assigned To`}),(0,H.jsxs)(`div`,{style:{marginTop:`1em`,marginLeft:`2em`,display:`flex`,alignItems:`center`},children:[(0,H.jsx)(PY,{text:e.partName}),(0,H.jsxs)(`h3`,{style:{marginLeft:`4em`},children:[`assigned to `,e.uniq,e.jobCycles&&e.jobCycles>0?` (`+e.jobCycles.toString()+` scheduled)`:``]})]})]})}),e.note?(0,H.jsx)(`div`,{style:{marginBottom:`2em`},children:(0,H.jsx)(`p`,{style:{fontSize:`xxx-large`,textAlign:`center`},children:e.note})}):void 0,(0,H.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`},children:e.operator?(0,H.jsx)(`p`,{style:{fontSize:`x-large`},children:e.operator}):void 0})]})}function IY(e){let t=R(zO).jobs,n=(0,L.useMemo)(()=>Q.of(e.material||[]).filter(e=>e.jobUnique!==null&&e.jobUnique!==void 0&&e.jobUnique!==``).groupBy(e=>e.jobUnique).map(([e,n])=>[e,{cycles:t[e]?.cycles??0,length:n.length,part:n[0]?.partName??``,comment:t[e]?.comment,serial1:n[0]?.serial,serial2:n[n.length-1]?.serial}]).toSortedArray(([,e])=>e.part),[e.material,t]);return!e.material||e.material.length===0?(0,H.jsx)(`div`,{}):n.length===0?(0,H.jsx)(FY,{partName:e.material[0].partName,materialName:e.materialName,count:e.material.length,uniq:null,note:null,operator:e.operator,serial1:e.material[0].serial,serial2:e.material[e.material.length-1]?.serial}):(0,H.jsx)(`div`,{children:n.map(([t,r],i)=>(0,H.jsxs)(L.Fragment,{children:[(0,H.jsx)(FY,{partName:r.part,materialName:e.materialName,count:r.length,uniq:t,jobCycles:r.cycles,note:r.comment,operator:e.operator,serial1:r.serial1,serial2:r.serial2}),i<n.length-1?(0,H.jsx)(`div`,{style:{pageBreakAfter:`always`}}):void 0]},i))})}function LY(e){let t=(0,L.useMemo)(()=>Q.of(e.material||[]).filter(e=>e.jobUnique!==null&&e.jobUnique!==void 0&&e.jobUnique!==``).groupBy(e=>e.jobUnique).map(([e,t])=>[e,{length:t.length,part:t[0]?.partName??``}]).toSortedArray(([,e])=>e.part),[e.material]),n=R(zO).jobs,r=(0,L.useMemo)(()=>Q.of(e.material||[]).collect(e=>e.jobUnique?n[e.jobUnique]?.comment:void 0).distinct().toSortedArray(e=>e),[e.material,n]);return!e.material||e.material.length===0?(0,H.jsx)(`div`,{}):(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{marginTop:`4em`,display:`flex`,justifyContent:`center`},children:(0,H.jsx)(`h2`,{children:`SeedTactic: FMS Insight`})}),(0,H.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`},children:(0,H.jsx)(`p`,{style:{fontSize:`x-large`},children:new Date().toLocaleString(void 0,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`})})}),(0,H.jsxs)(`div`,{style:{marginTop:`2em`,display:`flex`,justifyContent:`space-around`},children:[(0,H.jsx)(PY,{text:e.materialName??e.material[0].partName}),e.material.length>=2?(0,H.jsx)(PY,{text:e.material.length.toString()}):void 0]}),e.material[0].serial&&e.material[0].serial!==``?(0,H.jsxs)(`div`,{style:{marginTop:`2em`,display:`flex`,justifyContent:`space-around`},children:[(0,H.jsx)(PY,{text:e.material[0].serial}),e.material.length>=2&&e.material[e.material.length-1].serial&&e.material[e.material.length-1].serial!==``?(0,H.jsx)(PY,{text:e.material[e.material.length-1].serial||``}):void 0]}):void 0,(0,H.jsx)(`div`,{style:{marginTop:`2em`,marginLeft:`4em`,marginRight:`4em`,marginBottom:`9em`},children:t.length===0?(0,H.jsx)(`p`,{style:{fontSize:`x-large`},children:`Not currently assigned to any jobs`}):e.materialName?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{style:{fontSize:`x-large`},children:`Assigned To`}),t.map(([e,t],n)=>(0,H.jsxs)(`div`,{style:{marginTop:`1em`,marginLeft:`2em`,display:`flex`,alignItems:`center`},children:[(0,H.jsx)(PY,{text:t.part}),(0,H.jsxs)(`h3`,{style:{marginLeft:`4em`},children:[`x`,t.length]}),(0,H.jsxs)(`h3`,{style:{marginLeft:`4em`},children:[`assigned to `,e]})]},n))]}):t.length===1?(0,H.jsx)(`div`,{style:{marginTop:`1em`,display:`flex`,justifyContent:`space-around`},children:(0,H.jsxs)(`p`,{style:{fontSize:`x-large`},children:[(0,H.jsxs)(`span`,{children:[`Assigned to `,t[0][0]]}),t[0][1].length>1?(0,H.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`x`,t[0][1].length]}):void 0]})}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{style:{fontSize:`x-large`},children:`Assigned To`}),t.map(([e,t],n)=>(0,H.jsxs)(`h3`,{style:{marginTop:`1em`,marginLeft:`2em`},children:[(0,H.jsx)(`span`,{children:e}),t.length>1?(0,H.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`x`,t.length]}):void 0]},n))]})}),r.length>0?(0,H.jsx)(`div`,{style:{marginBottom:`2em`},children:r.map((e,t)=>(0,H.jsx)(`p`,{style:{fontSize:`xxx-large`,textAlign:`center`},children:e},t))}):void 0,(0,H.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`},children:e.operator?(0,H.jsx)(`p`,{style:{fontSize:`x-large`},children:e.operator}):void 0})]})}function RY(e){return e.oneJobPerPage?(0,H.jsx)(IY,{...e}):(0,H.jsx)(LY,{...e})}function zY({mat:e,materialName:t,operator:n}){let r=(0,L.useRef)(null),i=NJ({contentRef:r,ignoreGlobalStyles:!0});return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Y,{color:`primary`,onClick:()=>i(),children:`Print Label`}),(0,H.jsx)(`div`,{style:{display:`none`},children:(0,H.jsx)(`div`,{ref:r,children:(0,H.jsx)(RY,{materialName:t,material:Array.isArray(e)?e:[e],oneJobPerPage:!1,operator:n})})})]})}function BY(){let e=R(br),t=R(EI),n=R(kI),[r,i,a]=BI();return!e.usingLabelPrinterForSerials||t===null||t.materialID<0?null:e.useClientPrinterForLabels?n===null?null:(0,H.jsx)(zY,{mat:n}):(0,H.jsx)(Y,{color:`primary`,disabled:i||a,onClick:()=>r({materialId:t.materialID,proc:n?.process??0}),children:a?`Printed`:`Print Label`})}var VY=P(null),HY=P(null);function UY(){let[e,t]=B(HY),n=R(zO),r=(0,L.useRef)(null),i=(0,L.useRef)(!1),a=NJ({contentRef:r,onAfterPrint:()=>t(null),ignoreGlobalStyles:!0}),o=e?n.material.filter(t=>e.materialIds.has(t.materialID)):null;return o?.length!==e?.materialIds.size&&(o=null),(0,L.useEffect)(()=>{if(e===null){i.current&&=!1;return}i.current||o===null||(a(),i.current=!0)},[e,o,i,a]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(py,{open:e!==null,children:[(0,H.jsx)(gy,{children:`Waiting for Material Assignment`}),(0,H.jsx)(hy,{children:o===null?e===null?(0,H.jsx)(`div`,{}):(0,H.jsxs)(uw,{direction:`column`,spacing:2,sx:{mt:`0.5em`,mb:`0.5em`},children:[(0,H.jsx)(Ym,{color:`secondary`}),(0,H.jsx)(`div`,{children:`Waiting for material assignment. This could take a while if a download is currently in progress.`})]}):(0,H.jsx)(`div`,{children:`Printing...`})}),(0,H.jsx)(my,{children:(0,H.jsx)(Y,{color:`primary`,onClick:()=>t(null),children:`Cancel`})})]}),(0,H.jsx)(`div`,{style:{display:`none`},children:(0,H.jsx)(`div`,{ref:r,children:(0,H.jsx)(RY,{materialName:e?.selectedCasting,material:o,operator:e?.operator,oneJobPerPage:!0})})})]})}function WY({casting:e,queue:t}){let n=R(zO),r=(0,L.useMemo)(()=>sJ(n.jobs,n.material,t).filter(t=>t.rawMatName===e),[n.jobs,n.material,e,t]);return r.length===0?null:(0,H.jsxs)(Vw,{size:`small`,children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:`Job`}),(0,H.jsx)(Z,{align:`right`,children:`Plan`}),(0,H.jsx)(Z,{align:`right`,children:`Remaining`}),(0,H.jsx)(Z,{align:`right`,children:`Assigned`}),(0,H.jsx)(Z,{align:`right`,children:`Required`}),(0,H.jsx)(Z,{align:`right`,children:`Available`})]})}),(0,H.jsxs)(Ww,{children:[r.map((e,t)=>(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:e.job.unique}),(0,H.jsx)(Z,{align:`right`,children:e.job.cycles}),(0,H.jsx)(Z,{align:`right`,children:e.remainingToStart}),(0,H.jsx)(Z,{align:`right`,children:e.assignedRaw}),(0,H.jsx)(Z,{align:`right`,children:Math.max(e.remainingToStart-e.assignedRaw,0)}),(0,H.jsx)(Z,{align:`right`,children:e.availableUnassigned})]},t)),r.length>=2?(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:`Total`}),(0,H.jsx)(Z,{align:`right`,children:Q.of(r).sumBy(e=>e.job.cycles)}),(0,H.jsx)(Z,{align:`right`,children:Q.of(r).sumBy(e=>e.remainingToStart)}),(0,H.jsx)(Z,{align:`right`,children:Q.of(r).sumBy(e=>e.assignedRaw)}),(0,H.jsx)(Z,{align:`right`,children:Q.of(r).sumBy(e=>Math.max(e.remainingToStart-e.assignedRaw,0))}),(0,H.jsx)(Z,{align:`right`,children:Q.of(r).sumBy(e=>e.availableUnassigned)})]}):void 0]})]})}var GY=(0,L.memo)(function(){let[e,t]=B(VY),n=R(LO),r=R(br),i=r.usingLabelPrinterForSerials&&r.useClientPrinterForLabels,[a]=HI(),o=z(HY),[s,c]=(0,L.useState)(null),[l,u]=(0,L.useState)(null),[d,f]=(0,L.useState)(null),[p,m]=(0,L.useState)(!1),h=R(zO),g=R(jL),_=(0,L.useMemo)(()=>Q.ofObject(h.jobs).flatMap(([,e])=>e.procsAndPaths[0].paths).filter(e=>e.casting!==void 0&&e.casting!==``).map(e=>({casting:e.casting??``,cnt:1})).concat(Q.of(g).map(e=>({casting:e,cnt:0}))).buildOrderedMap(e=>e.casting,(e,t)=>e===void 0?t.cnt:e+t.cnt).toAscLazySeq(),[h.jobs,g]);function v(){t(null),c(null),f(null),m(!1),u(null)}function y(){e!==null&&s!==null&&l!==null&&!isNaN(l)&&l>0&&a({casting:s,quantity:l,queue:e,workorder:null,operator:r.requireOperatorNamePromptWhenAddingMaterial?d:n}).catch(console.log),v()}function b(){e!==null&&s!==null&&l!==null&&!isNaN(l)&&(m(!0),a({casting:s,quantity:l,queue:e,operator:n,workorder:null,onNewMaterial:e=>{o({selectedCasting:s,operator:r.requireOperatorNamePromptWhenAddingMaterial?d:n,materialIds:new Set(e.map(e=>e.materialID))}),v()},onError:()=>{v()}}).catch(()=>{}))}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(py,{open:e!==null,onClose:()=>v(),maxWidth:`md`,children:[(0,H.jsx)(gy,{children:`Add Raw Material`}),(0,H.jsx)(hy,{children:(0,H.jsxs)(uw,{direction:`column`,spacing:2,sx:{mt:`0.5em`},children:[(0,H.jsx)(nT,{style:{minWidth:`15em`},value:s||``,onChange:e=>c(e.target.value),select:!0,fullWidth:!0,label:`Raw Material`,slotProps:{select:{renderValue:s===null?void 0:()=>(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{style:{marginRight:`0.5em`},children:(0,H.jsx)(tW,{part:s,size:25})}),(0,H.jsx)(`div`,{children:s})]})}},children:_.map(([e,t],n)=>(0,H.jsxs)(gS,{value:e,children:[(0,H.jsx)(ox,{children:(0,H.jsx)(tW,{part:e})}),(0,H.jsx)(dx,{primary:e,slotProps:{primary:{variant:`h4`}},secondary:t===0?`Not used by any current jobs`:`Used by ${t} current job${t>1?`s`:``}`})]},n))}),(0,H.jsx)(nT,{fullWidth:!0,type:`number`,label:`Quantity`,disabled:s===null,slotProps:{htmlInput:{min:`1`}},value:l===null||isNaN(l)||l<=0?``:l,onChange:e=>u(parseInt(e.target.value))}),r.requireOperatorNamePromptWhenAddingMaterial?(0,H.jsx)(nT,{fullWidth:!0,label:`Operator`,value:d||``,onChange:e=>f(e.target.value)}):void 0,s!==null&&e!==null?(0,H.jsx)(WY,{casting:s,queue:e}):void 0]})}),(0,H.jsxs)(my,{children:[i?(0,H.jsxs)(Y,{color:`primary`,disabled:p||s===null||l===null||isNaN(l)||r.requireOperatorNamePromptWhenAddingMaterial&&(d===null||d===``),onClick:b,children:[p?(0,H.jsx)(Ym,{size:10}):void 0,`Add `,l!==null&&!isNaN(l)?l.toString()+` `:``,`to`,` `,e]}):(0,H.jsxs)(Y,{color:`primary`,disabled:s===null||l===null||isNaN(l)||r.requireOperatorNamePromptWhenAddingMaterial&&(d===null||d===``),onClick:y,children:[`Add `,l!==null&&!isNaN(l)?l.toString()+` `:``,`to`,` `,e]}),(0,H.jsx)(Y,{color:`primary`,disabled:p&&i,onClick:v,children:`Cancel`})]})]}),(0,H.jsx)(UY,{})]})}),KY=(0,L.memo)(function(e){let t=R(br),n=R(zO).jobs,[r,i]=BI(),[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)([]),[l,u]=(0,L.useState)(!1),[d,f]=(0,L.useState)(NaN),[p,m]=(0,L.useState)(void 0);(0,L.useEffect)(()=>{if(e.material===null)return;let t=!0;return(async()=>{if(e.material!==null){o(!0);try{let n=await lJ(e.material);if(t){c(n);let e;for(let t of n)t.type===V.AddToQueue&&t.details?.operator!==void 0&&(e=t.details.operator);m(e)}}catch(e){console.error(e)}finally{o(!1)}}})().catch(console.error),()=>{t=!1}},[e.material]);let h=(0,L.useMemo)(()=>{if(!e.material||e.material.length===0)return;let t=e.material[0].jobUnique;if(t&&t!==``&&n[t])return Q.of(n[t].procsAndPaths[0].paths).filter(e=>e.casting!==void 0&&e.casting!==``).head()?.casting},[e.material,n]);function g(){e.closeDialog(),u(!1),f(NaN),o(!1),c([])}function _(){l?isNaN(d)||(o(!0),Ut.bulkRemoveMaterialFromQueues(e.operator,Q.of(e.material||[]).take(d).map(e=>e.materialID).toRArray()).catch(console.error).finally(g)):u(!0)}let v=e.material?.[0];return(0,H.jsxs)(py,{open:e.material!==null,onClose:g,maxWidth:`md`,children:[(0,H.jsx)(gy,{children:v&&e.material&&e.material.length>0?(0,H.jsx)(bW,{partName:v.partName,subtitle:e.material.length.toString()+(v.jobUnique&&v.jobUnique!==``?` assigned to `+v.jobUnique:` unassigned`)}):`Material`}),(0,H.jsxs)(hy,{children:[a?(0,H.jsx)(Ym,{color:`secondary`}):(0,H.jsx)(xI,{entries:s,copyToClipboard:!0}),l&&e.material?(0,H.jsx)(`div`,{style:{marginTop:`1em`},children:(0,H.jsx)(nT,{type:`number`,variant:`outlined`,fullWidth:!0,label:`Quantity to Remove`,slotProps:{htmlInput:{min:`1`,max:e.material.length.toString()}},value:isNaN(d)?``:d,onChange:e=>f(parseInt(e.target.value))})}):void 0]}),(0,H.jsxs)(my,{children:[e.material&&e.material.length>0&&t.usingLabelPrinterForSerials?t.useClientPrinterForLabels?(0,H.jsx)(zY,{mat:e.material||[],materialName:h,operator:p}):(0,H.jsx)(Y,{color:`primary`,disabled:i,onClick:()=>e.material&&e.material.length>0?r({materialId:e.material[0].materialID,proc:0}):void 0,children:`Print Label`}):void 0,(0,H.jsx)(Y,{color:`primary`,onClick:_,disabled:a||l&&isNaN(d),children:a&&l?`Removing...`:l&&!isNaN(d)?`Remove ${d} material`:`Remove Material`}),(0,H.jsx)(Y,{color:`primary`,onClick:g,children:`Close`})]})]})}),qY=(0,L.memo)(function(){let[e,t]=(0,L.useState)(null),[n,r]=(0,L.useState)(!1),i=z(CI);function a(){r(!1),t(null)}function o(){e&&e!==``&&(i({type:`ManuallyEnteredSerial`,serial:e}),a())}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{title:`Enter Serial`,children:(0,H.jsx)(th,{onClick:()=>r(!0),size:`large`,children:(0,H.jsx)(NT,{})})}),(0,H.jsxs)(py,{open:n,onClose:a,maxWidth:`md`,children:[(0,H.jsx)(gy,{children:`Enter a part's serial`}),(0,H.jsx)(hy,{children:(0,H.jsx)(`div`,{style:{minWidth:`20em`},children:(0,H.jsx)(nT,{sx:{mt:`5px`},label:e===null||e===``?`Serial`:`Serial (press enter)`,value:e??``,fullWidth:!0,autoFocus:!0,onChange:e=>t(e.target.value),onKeyDown:t=>{t.key===`Enter`&&e&&e!==``&&(t.preventDefault(),o())}})})}),(0,H.jsxs)(my,{children:[(0,H.jsx)(Y,{onClick:o,disabled:e===null||e===``,color:`secondary`,children:`Open`}),(0,H.jsx)(Y,{onClick:a,color:`secondary`,children:`Cancel`})]})]})]})}),JY=P(null),YY=(0,L.memo)(function(){let[e,t]=B(JY),n=z(CI),[r,i]=(0,L.useState)(void 0);function a(){r&&r!==``&&e!==null&&(n({type:`AddMatWithEnteredSerial`,serial:r,toQueue:e}),t(null),i(void 0))}function o(){t(null),i(void 0)}return(0,H.jsxs)(py,{open:e!==null,onClose:o,maxWidth:`md`,children:[(0,H.jsxs)(gy,{children:[`Lookup Material To Add To `,e]}),(0,H.jsx)(hy,{children:(0,H.jsx)(nT,{label:`Serial`,style:{marginTop:`0.5em`},autoFocus:!0,fullWidth:!0,value:r||``,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&r&&r!==``&&(e.preventDefault(),a())}})}),(0,H.jsxs)(my,{children:[(0,H.jsx)(Y,{onClick:a,color:`secondary`,children:`Lookup Serial`}),(0,H.jsx)(Y,{onClick:o,color:`primary`,children:`Cancel`})]})]})});function XY(e){let t=R(EI),n=R(kI),r=R(TI);return!(!eW(n)||n?.location.type===it.InQueue&&n.location.currentQueue!==void 0&&e.includes(n.location.currentQueue)||t===null&&!r)}var ZY=G(hT,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({theme:e,$expandedOpen:t})=>({transform:t?`rotate(0deg)`:`rotate(-90deg)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shortest})}));function QY({newMaterialTy:e,setNewMaterialTy:t,castings:n,indent:r}){return(0,H.jsx)(Vb,{sx:r?e=>({pl:e.spacing(4)}):void 0,children:n.map(n=>(0,H.jsx)(tx,{children:(0,H.jsxs)(Kb,{selected:e?.kind===`RawMat`&&e?.rawMatName===n.casting,onClick:()=>t({kind:`RawMat`,rawMatName:n.casting}),children:[(0,H.jsx)(ox,{children:(0,H.jsx)(tW,{part:n.casting})}),(0,H.jsx)(dx,{primary:n.casting,secondary:n.message??void 0,slotProps:{primary:{variant:`h4`}}})]})},n.casting))})}function $Y({newMaterialTy:e,setNewMaterialTy:t,curCollapse:n,setCurCollapse:r,indent:i,jobs:a}){return(0,H.jsx)(Vb,{sx:i?e=>({pl:e.spacing(4)}):void 0,children:a.map((a,o)=>a.machinedProcs.length===1?(0,H.jsx)(`div`,{children:(0,H.jsx)(tx,{children:(0,H.jsxs)(Kb,{alignItems:`flex-start`,selected:e?.kind===`JobAndProc`&&e?.jobUnique===a.jobUnique&&e?.last_proc===a.machinedProcs[0].lastProc,onClick:()=>t({kind:`JobAndProc`,jobUnique:a.jobUnique,last_proc:a.machinedProcs[0].lastProc,workorder:a.workorder}),children:[a.job?(0,H.jsx)(ox,{children:(0,H.jsx)(tW,{part:a.job.partName})}):void 0,(0,H.jsx)(dx,{primary:(a.job?.partName??``)+` (`+a.jobUnique+`)`,slotProps:{primary:{variant:`h4`}},secondary:(0,H.jsxs)(q,{variant:`body2`,children:[a.machinedProcs[0].lastProc===0?`Raw Material`:`Last machined process `+a.machinedProcs[0].lastProc.toString(),`, `,a.job?.routeStartUTC.toLocaleDateString()??``,`,`,` `,a.machinedProcs[0].details]})})]})})},o):(0,H.jsxs)(L.Fragment,{children:[(0,H.jsx)(tx,{children:(0,H.jsxs)(Kb,{onClick:()=>{e&&t(null),r(n&&n.kind===`Job`&&n.unique===a.jobUnique?null:{kind:`Job`,unique:a.jobUnique})},children:[(0,H.jsx)(ox,{children:(0,H.jsx)(ZY,{$expandedOpen:n!==null&&n.kind===`Job`&&n.unique===a.jobUnique})}),a.job?(0,H.jsx)(ox,{children:(0,H.jsx)(tW,{part:a.job.partName})}):void 0,(0,H.jsx)(dx,{primary:(a.job?.partName??``)+` (`+a.jobUnique+`)`,slotProps:{primary:{variant:`h4`}},secondary:a.job?.routeStartUTC.toLocaleDateString()})]})}),(0,H.jsx)(Xp,{in:n!==null&&n.kind===`Job`&&n.unique===a.jobUnique,timeout:`auto`,children:a.machinedProcs.map((n,r)=>(0,H.jsx)(`div`,{children:(0,H.jsx)(tx,{sx:e=>({pl:e.spacing(i?8:4)}),children:(0,H.jsx)(Kb,{selected:e?.kind===`JobAndProc`&&e?.jobUnique===a.jobUnique&&e?.last_proc===n.lastProc,onClick:()=>t({kind:`JobAndProc`,jobUnique:a.jobUnique,last_proc:n.lastProc,workorder:a.workorder}),children:(0,H.jsx)(dx,{primary:n.lastProc===0?`Raw Material`:`Last machined process `+n.lastProc.toString(),secondary:n.details})})})},r))})]},o))})}function eX({newMaterialTy:e,options:t,setNewMaterialTy:n,curCollapse:r,setCurCollapse:i}){return(0,H.jsxs)(Vb,{children:[(0,H.jsx)(tx,{children:(0,H.jsxs)(Kb,{onClick:()=>{e&&n(null),i(r&&r.kind===`RawMat`?null:{kind:`RawMat`})},children:[(0,H.jsx)(ox,{children:(0,H.jsx)(ZY,{$expandedOpen:r!==null&&r.kind===`RawMat`})}),(0,H.jsx)(dx,{primary:`Raw Material`})]})}),(0,H.jsx)(Xp,{in:r!==null&&r.kind===`RawMat`,timeout:`auto`,children:(0,H.jsx)(QY,{castings:t.castings,newMaterialTy:e,setNewMaterialTy:n,indent:!0})}),(0,H.jsx)(tx,{children:(0,H.jsxs)(Kb,{onClick:()=>{e&&n(null),i(r&&(r.kind===`AllJobs`||r.kind===`Job`)?null:{kind:`AllJobs`})},children:[(0,H.jsx)(ox,{children:(0,H.jsx)(ZY,{$expandedOpen:r!==null&&(r.kind===`AllJobs`||r.kind===`Job`)})}),(0,H.jsx)(dx,{primary:`Specify Job`})]})}),(0,H.jsx)(Xp,{in:r!==null&&(r.kind===`AllJobs`||r.kind===`Job`),timeout:`auto`,children:(0,H.jsx)($Y,{newMaterialTy:e,jobs:t.jobs,setNewMaterialTy:n,curCollapse:r,setCurCollapse:i,indent:!0})})]})}function tX({newMaterialTy:e,setNewMaterialTy:t,toQueue:n}){let r=R(AI),i=R(EI),[a,o]=(0,L.useState)(null),s=iJ(n);return i||r===null||n===null?null:s.castings.length===0&&s.jobs.length===0?(0,H.jsxs)(`div`,{children:[`No jobs are currently scheduled for `,n]}):s.jobs.length===0?(0,H.jsx)(QY,{newMaterialTy:e,setNewMaterialTy:t,castings:s.castings}):s.castings.length===0?(0,H.jsx)($Y,{jobs:s.jobs,newMaterialTy:e,setNewMaterialTy:t,curCollapse:a,setCurCollapse:o}):(0,H.jsx)(eX,{options:s,newMaterialTy:e,setNewMaterialTy:t,curCollapse:a,setCurCollapse:o})}function nX({selectedQueue:e,setSelectedQueue:t,queueNames:n}){let r=(0,L.useRef)(null);return(0,L.useEffect)(()=>{r.current?.scrollIntoView({behavior:`smooth`,block:`end`})},[r]),(0,H.jsxs)(`div`,{ref:r,children:[(0,H.jsx)(`p`,{children:`Select a queue`}),(0,H.jsx)(Vb,{children:n.map((n,r)=>(0,H.jsx)(Kb,{selected:n===e,onClick:()=>t(n),children:n},r))})]})}function rX({enteredOperator:e,setEnteredOperator:t}){return R(br).requireOperatorNamePromptWhenAddingMaterial?(0,H.jsx)(`div`,{style:{marginLeft:`1em`},children:(0,H.jsx)(nT,{fullWidth:!0,label:`Operator`,value:e||``,required:!0,onChange:e=>t(e.target.value)})}):null}function iX({st:e,queueNames:t,setState:n}){return XY(t)?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(pW,{}),t.length>1?(0,H.jsx)(nX,{selectedQueue:e.toQueue,setSelectedQueue:t=>{n({toQueue:t,newMaterialTy:null,enteredOperator:e.enteredOperator})},queueNames:t}):void 0,(0,H.jsx)(tX,{newMaterialTy:e.newMaterialTy,toQueue:t.length>1?e.toQueue:t[0]??null,setNewMaterialTy:t=>n({...e,newMaterialTy:t})}),(0,H.jsx)(rX,{enteredOperator:e.enteredOperator,setEnteredOperator:t=>n({...e,enteredOperator:t})})]}):null}function aX({st:{enteredOperator:e,newMaterialTy:t,toQueue:n},queueNames:r,onClose:i}){let a=R(br),o=R(LO),s=z(CI),c=R(AI),l=R(jI),u=R(EI),d=R(kI),f=R(FI),[p,m]=VI(),[h,g]=Uie(),[_,v]=HI(),[y,b]=(0,L.useState)(null);if(!XY(r))return null;n===null&&r.length===1&&(n=r[0]);let x=``;if(u!==null){if(f&&f.process>=f.totalNumProcesses)return null;x=` To Run Process `+((f?.process??0)+1).toString()}else t?.kind===`JobAndProc`&&t?.last_proc!==void 0&&(x=` To Run Process `+(t.last_proc+1).toString()),t?.kind===`RawMat`&&t?.rawMatName&&(x=` As `+t.rawMatName);let S=``;!u&&c&&c!==``&&(S=` With Serial `+c);let C=d?.location.currentQueue??null;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{title:n===null?`Select a queue to add the material to`:a.requireOperatorNamePromptWhenAddingMaterial&&(e===null||e===``)?`Please enter an operator name`:``,children:(0,H.jsx)(`span`,{children:(0,H.jsx)(Y,{color:`primary`,disabled:n===null||m||g||v||u===null&&t===null||a.requireOperatorNamePromptWhenAddingMaterial&&(e===null||e===``),onClick:async()=>{b(null);try{u?await p({materialId:u.materialID,queue:n??``,queuePosition:-1,operator:e??o}):t&&t.kind===`JobAndProc`&&t.jobUnique?await h({jobUnique:t.jobUnique,lastCompletedProcess:t.last_proc,serial:c??void 0,workorder:l??t?.workorder,queue:n??``,queuePosition:-1,operator:e??o}):t&&t.kind===`RawMat`&&t.rawMatName&&await _({casting:t.rawMatName,quantity:1,queue:n??``,serials:c?[c]:void 0,workorder:l,operator:e??o}),s(null),i()}catch(e){b(Bt.isApiException(e)?e.response:e instanceof Error?e.message:String(e))}},children:n===null?`Add to Queue`:(0,H.jsxs)(`span`,{children:[C===null?`Add To`:`Move From ${C} To`,` `,n,S,x]})})})}),y?(0,H.jsx)(`p`,{role:`alert`,children:y}):null]})}function oX(e,t){let n=t.jobs[e.jobUnique];if(!n)return!1;let r=n.procsAndPaths[e.process-1]?.paths[e.path-1];return r?e.process===n.procsAndPaths.length||!!r.outputQueue:!1}function sX(){let e=R(br),t=R(kI),n=R(zO);if(t===null||t.materialID<0||JU(t)||t.quarantineAfterUnload)return null;let r=e.quarantineQueue?.length?e.quarantineQueue:null,i=Q.ofObject(n.jobs).flatMap(([,e])=>e.procsAndPaths).flatMap(e=>e.paths).flatMap(e=>{let t=[];return e.inputQueue!==void 0&&t.push(e.inputQueue),e.outputQueue!==void 0&&t.push(e.outputQueue),t}).concat(Q.ofObject(n.queues).filter(([,e])=>e.role===ct.RawMaterial||e.role===ct.InProcessTransfer).map(([e])=>e)).toRSet(e=>e),a=Q.ofObject(n.queues).filter(([e])=>!i.has(e)).toRSet(([e])=>e);if(t.location.type===it.InQueue&&t.location.currentQueue&&a.has(t.location.currentQueue))return{type:`Remove`,material:t,quarantineQueueDestination:null,canRemoveFromQueues:!1};let o=null;switch(t.location.type){case it.OnPallet:case it.InBasket:if(!XU(t)||!oX(t,n))return null;o=`SignalForScrap`;break;case it.InQueue:if(!ZU(t)||t.location.currentQueue===void 0||a.has(t.location.currentQueue))return null;o=`Scrap`;break;case it.Free:return null}return o?{type:o,material:t,quarantineQueueDestination:r,canRemoveFromQueues:t.location.type===it.InQueue&&t.location.currentQueue!==void 0&&!a.has(t.location.currentQueue)&&QU(t)}:null}function cX({material:e,removeFromQueues:t,removing:n}){let[r,i]=(0,L.useState)(!1),[a,o]=(0,L.useState)(null),s=z(CI);async function c(){o(null);try{await t(),i(!1),s({type:`MatSummary`,summary:{materialID:e.materialID,partName:e.partName,serial:e.serial}})}catch(e){o(Bt.isApiException(e)?e.response:e instanceof Error?e.message:String(e))}}function l(){o(null),i(!0)}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{title:`Remove from the current queue so it can be rescanned`,children:(0,H.jsx)(Y,{color:`primary`,disabled:n,onClick:l,children:`Remove from Queue`})}),(0,H.jsxs)(py,{open:r,onClose:()=>i(!1),children:[(0,H.jsx)(gy,{children:`Remove Material from Queue`}),(0,H.jsxs)(hy,{children:[(0,H.jsx)(`p`,{children:`Remove this material from its current queue. Its production history will remain available. You can scan it again to correct its history or assignment and then add it back to a queue.`}),a?(0,H.jsx)(`p`,{role:`alert`,children:a}):null]}),(0,H.jsxs)(my,{children:[(0,H.jsx)(Y,{color:`primary`,disabled:n,onClick:c,children:`Remove from Queue`}),(0,H.jsx)(Y,{color:`secondary`,disabled:n,onClick:()=>i(!1),children:`Cancel`})]})]})]})}function lX({onClose:e,ignoreOperator:t}){let[n,r]=(0,L.useState)(!1),[i,a]=(0,L.useState)(``),[o,s]=(0,L.useState)(null),[c,l]=(0,L.useState)(!1),[u,d]=(0,L.useState)(null),f=sX(),[p,m]=Bie(),[h,g]=Vie(),[_,v]=Hie(),y=R(LO),b=t?null:y,x=z(CI),S=f===null?null:{material:f.material,materialId:f.material.materialID,operation:f.type===`SignalForScrap`?`DeferredQuarantine`:f.type===`Scrap`?`DirectQuarantine`:`RemoveFromSystem`,destination:f.quarantineQueueDestination,operator:b},C=u??S;function w(){S!==null&&(s(null),a(``),d(S),r(!0))}function T(){c||(r(!1),d(null))}if(C===null)return null;let E,D;switch(C.operation){case`RemoveFromSystem`:E=`Remove from system`,D=`Remove`;break;case`DirectQuarantine`:E=C.destination?`Move to ${C.destination}`:`Remove from queue and treat as scrap`,D=C.destination?`Quarantine`:`Scrap`;break;case`DeferredQuarantine`:E=C.destination?`The current automated operation will continue. When the material leaves automation control, move it to ${C.destination}`:`The current automated operation will continue. When the material leaves automation control, remove it from normal production flow as scrap`,D=C.destination?`Quarantine`:`Scrap`}async function O(){if(u!==null){l(!0),s(null);try{switch(u.operation){case`DeferredQuarantine`:await h(u.materialId,u.operator,i);break;case`DirectQuarantine`:await _(u.materialId,u.operator,i);break;case`RemoveFromSystem`:await p(u.materialId,u.operator)}r(!1),d(null),a(``),u.operation===`RemoveFromSystem`?x({type:`MatSummary`,summary:{materialID:u.materialId,partName:u.material.partName,serial:u.material.serial}}):(x(null),e?.())}catch(e){s(Bt.isApiException(e)?e.response:e instanceof Error?e.message:String(e))}finally{l(!1)}}}let ee=c||(C.operation===`DeferredQuarantine`?g:C.operation===`DirectQuarantine`?v:m),te=f?.canRemoveFromQueues===!0?()=>p(f.material.materialID,b):null;return(0,H.jsxs)(H.Fragment,{children:[f?(0,H.jsx)(X,{title:E,children:(0,H.jsx)(Y,{color:`primary`,disabled:ee,onClick:w,children:D})}):null,te&&f?(0,H.jsx)(cX,{material:f.material,removeFromQueues:te,removing:m}):null,(0,H.jsxs)(py,{open:n&&u!==null,onClose:T,children:[(0,H.jsx)(gy,{children:`Quarantine Material`}),(0,H.jsxs)(hy,{children:[(0,H.jsx)(`p`,{children:E}),(0,H.jsx)(nT,{label:`Reason`,value:i,onChange:e=>a(e.target.value),fullWidth:!0,autoFocus:!0,multiline:!0}),o?(0,H.jsx)(`p`,{role:`alert`,children:o}):null]}),(0,H.jsxs)(my,{children:[(0,H.jsx)(Y,{color:`primary`,disabled:ee,onClick:O,children:D}),(0,H.jsx)(Y,{color:`secondary`,disabled:ee,onClick:T,children:`Cancel`})]})]})]})}function uX({onClose:e,ignoreOperator:t=!1}){let n=R(kI),r=R(zO),i=R(LO),a=z(CI),[o,s]=(0,L.useState)(!1),[c,l]=(0,L.useState)(``),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(null),[m,h]=(0,L.useState)(null),g=n?.action.loadCancellationId??null,_=n===null||g===null||!YU(n)?null:{material:n,cancellationId:g,group:Q.of(r.material).filter(e=>e.action.loadCancellationId===g).toRArray()};if(_===null&&m===null)return null;async function v(){if(m!==null){d(!0),p(null);try{await Ut.cancelLoad(m.material.materialID,t?null:i,new jt({expectedLoadCancellationId:m.cancellationId,reason:c||void 0})),a(null),e?.()}catch(e){p(Bt.isApiException(e)?e.response:e instanceof Error?e.message:String(e))}finally{d(!1)}}}return(0,H.jsxs)(H.Fragment,{children:[_?(0,H.jsx)(X,{title:`Cancel the displayed load instruction`,children:(0,H.jsx)(Y,{color:`primary`,disabled:u,onClick:()=>{h(_),l(``),p(null),s(!0)},children:`Cancel Load`})}):null,(0,H.jsxs)(py,{open:o&&m!==null,onClose:()=>s(!1),children:[(0,H.jsx)(gy,{children:`Cancel Load`}),(0,H.jsxs)(hy,{children:[(0,H.jsx)(`p`,{children:`The displayed load instruction will be cancelled and recalculated for:`}),(0,H.jsx)(`ul`,{children:m?.group.map(e=>(0,H.jsx)(`li`,{children:e.serial||`Material ID ${e.materialID}`},e.materialID))}),(0,H.jsx)(nT,{label:`Reason (optional)`,value:c,onChange:e=>l(e.target.value),fullWidth:!0,multiline:!0}),f?(0,H.jsx)(`p`,{role:`alert`,children:f}):null]}),(0,H.jsxs)(my,{children:[(0,H.jsx)(Y,{color:`primary`,disabled:u,onClick:v,children:`Cancel Load`}),(0,H.jsx)(Y,{color:`secondary`,disabled:u,onClick:()=>s(!1),children:`Keep Load`})]})]})]})}var dX=Q.of([V.AddToQueue,V.RemoveFromQueue,V.LoadUnloadCycle,V.MachineCycle]).toRSet(e=>e);function fX(e,t,n){let r=_O.empty();for(let i of e)if(dX.has(i.type)&&!vI(i)&&i.material.some(e=>e.id===t&&(n===null||e.proc>=n)))for(let e of i.material)r=r.set(e.id,e.serial??null);return r}function pX(e){let t=R(FI),n=R(TI),r=R(zO),i=R(bO),a=Object.values(n?.possibleCastingsByQueue??{}).flatMap(e=>e),o=Object.values(n?.possibleJobsByQueue??{}).flatMap(e=>e).filter(e=>e.lastCompletedProcess===0).map(e=>({jobUnique:e.jobUnique,job:r.jobs[e.jobUnique]??i.get(e.jobUnique)??null})),s=t!==null&&t.process>=1,c=a.length>0||o.length>0,l=e.st?.changeRawMat!==null&&e.st?.changeRawMat!==void 0&&a.includes(e.st.changeRawMat),u=e.st?.changeJobUnique!==null&&e.st?.changeJobUnique!==void 0&&o.some(t=>t.jobUnique===e.st?.changeJobUnique);function d(t){e.setState({updating:!1,error:null,process:t.startsWith(`proc`)?parseInt(t.substring(4)):1,changeRawMat:t.startsWith(`rawMat`)?t.substring(6):null,changeJobUnique:t.startsWith(`job`)?t.substring(3):null})}return(0,H.jsx)(nT,{value:l?`rawMat`+e.st.changeRawMat:u?`job`+e.st.changeJobUnique:e.st?.process&&s?`proc`+e.st.process.toString():``,select:!0,onChange:e=>d(e.target.value),variant:`outlined`,label:e.st?.changeRawMat?`Change Raw Material`:e.st?.changeJobUnique?`Change Assigned Job`:e.st?.process||!c?`Invalidate Process`:s?``:`Change Assignment`,children:[s&&c?[(0,H.jsx)(b_,{children:`Invalidate Selected Process`},`procheader`)]:[],s?[(0,H.jsxs)(gS,{value:`proc`+t.process.toString(),children:[`Invalidate Process `,t.process]},t.process),...t.process>1?[(0,H.jsx)(gS,{value:`proc1`,children:`Invalidate All Processes`},`all`)]:[]]:[],s&&c?[(0,H.jsx)(b_,{children:`Change Material Type`},`matheader`)]:[],c?[...a.map(e=>(0,H.jsxs)(gS,{value:`rawMat`+e,children:[`Invalidate Everything and Change to `,e]},`rawMat`+e)),...o.map(({jobUnique:e,job:t})=>(0,H.jsxs)(gS,{value:`job`+e,children:[t?(0,H.jsx)(ox,{children:(0,H.jsx)(tW,{part:t.partName})}):void 0,(0,H.jsx)(dx,{primary:`Invalidate Everything and Change to Job `+e,secondary:t?.partName})]},`job`+e))]:[]]})}function mX(e){let t=R(EI),n=R(Iie),r=R(zO),i=e.st!==null&&t!==null,a=(0,L.useRef)(null);if((0,L.useEffect)(()=>{a.current?.scrollIntoView({behavior:`smooth`,block:`end`})},[a]),!i)return(0,H.jsx)(`div`,{});let o=e.st.process!==null||e.st.changeRawMat!==null||e.st.changeJobUnique!==null,s=e.st.changeRawMat!==null||e.st.changeJobUnique!==null?null:e.st.process,c=[...o?fX(n,t.materialID,s):_O.empty()].map(([e,t])=>({materialId:e,serial:t,queued:r.material.find(t=>t.materialID===e)?.location.type===it.InQueue}));return(0,H.jsx)(J,{ref:a,sx:{display:`flex`,flexDirection:`column`,alignItems:`center`,marginTop:`1em`},children:(0,H.jsxs)(uw,{spacing:2,children:[(0,H.jsx)(`p`,{style:{maxWidth:`35em`},children:`Invalidating removes whole recorded cycle events from active material reconstruction while retaining them in the event log.`}),(0,H.jsx)(pX,{st:e.st,setState:e.setState}),c.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{children:`All material recorded on these events will be affected:`}),(0,H.jsx)(`ul`,{children:c.map(e=>(0,H.jsxs)(`li`,{children:[e.serial||`Material ID ${e.materialId}`,e.queued?` (currently in a queue)`:``]},e.materialId))})]}):null,e.st.error?(0,H.jsx)(`p`,{role:`alert`,children:e.st.error}):null]})})}function hX(e){let t=R(br),n=R(EI),r=R(kI),i=R(FI),a=R(TI),o=z(CI),s=R(LO);if(e.loadStation&&!t.allowInvalidateMaterialAtLoadStation||!e.loadStation&&!t.allowInvalidateMaterialOnQueuesPage||n===null||!$U(r)||(a===null||Q.ofObject(a.possibleCastingsByQueue??{}).isEmpty()&&Q.ofObject(a.possibleJobsByQueue??{}).isEmpty())&&(i===null||i.process<1))return null;e.ignoreOperator&&(s=null);function c(){e.setState({process:null,updating:!1,error:null,changeRawMat:null,changeJobUnique:null})}function l(){n&&(e.st?.process||e.st?.changeRawMat||e.st?.changeJobUnique)&&(e.setState({...e.st,updating:!0}),Ut.invalidatePalletCycle(n.materialID,s,e.st?.changeRawMat,e.st?.changeJobUnique,e.st?.process??0).then(t=>{t?(o({type:`MatDetails`,details:t}),e.setState(null)):(o(null),e.onClose())}).catch(t=>{e.setState({...e.st,updating:!1,error:Bt.isApiException(t)?t.response:t instanceof Error?t.message:String(t)})}))}return(0,H.jsxs)(H.Fragment,{children:[e.st===null?(0,H.jsx)(Y,{color:`primary`,onClick:c,children:`Invalidate Cycle`}):void 0,e.st===null?void 0:(0,H.jsx)(Y,{color:`primary`,onClick:l,disabled:e.st.updating||e.st.process===null&&e.st.changeRawMat===null&&e.st.changeJobUnique===null,children:e.st.changeJobUnique===null?e.st.changeRawMat===null?e.st.process===null?`Invalidate Cycle`:e.st.process===1?i&&i.process>1?`Invalidate All Processes`:`Invalidate Process 1`:`Invalidate Process `+e.st.process.toString():`Invalidate Everything and Change to `+e.st.changeRawMat:`Invalidate Everything and Change to Job `+e.st.changeJobUnique})]})}var gX=G(Zw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$noBorderBottom:e,$highlightedRow:t,$noncompletedRow:n})=>({...e&&{"& > *":{borderBottom:`unset`}},backgroundColor:t?`#FF8A65`:n?`#E0E0E0`:void 0})),_X=[/\bhold\b/,/\bmissing\b/,/\bwait\b/,/\bwaiting\b/,/\bnone\b/];function vX(e){let t=e.comment;return!t||t===``?!1:Q.of(_X).some(e=>e.test(t))}function yX(e){let t=(R(br).allowEditJobPlanQuantityFromQueuesPage??null)!=null,[n,r]=(0,L.useState)(!1),i=e.job,a=vX(i.job);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(gX,{$noBorderBottom:!0,$highlightedRow:a,$noncompletedRow:i.remainingToStart-i.assignedRaw>0,children:[(0,H.jsx)(Z,{children:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(tW,{part:i.job.partName,size:25})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(q,{variant:`body2`,component:`span`,sx:{display:`block`},children:i.job.unique})})]})}),(0,H.jsx)(Z,{children:i.startingTime?i.startingTime.toLocaleString():``}),(0,H.jsx)(Z,{children:i.rawMatName===i.job.partName?i.rawMatName:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(tW,{part:i.rawMatName,size:25})}),(0,H.jsx)(q,{variant:`body2`,sx:{display:`block`},children:i.rawMatName})]})}),(0,H.jsxs)(Z,{children:[i.job.comment,(0,H.jsx)(X,{title:`Edit`,children:(0,H.jsx)(th,{size:`small`,onClick:()=>e.editNote(i.job),children:(0,H.jsx)(pT,{})})})]}),(0,H.jsxs)(Z,{align:`right`,children:[i.job.cycles??0,t?(0,H.jsx)(X,{title:`Edit`,children:(0,H.jsx)(th,{size:`small`,onClick:()=>e.editQty(i),children:(0,H.jsx)(pT,{})})}):void 0]}),(0,H.jsx)(Z,{align:`right`,children:i.remainingToStart}),(0,H.jsx)(Z,{align:`right`,children:i.assignedRaw}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(X,{title:i.remainingToStart>0||i.assignedRaw>0?`${i.remainingToStart} - ${i.assignedRaw}`:``,children:(0,H.jsx)(`span`,{children:Math.max(i.remainingToStart-i.assignedRaw,0)})})}),(0,H.jsx)(Z,{align:`right`,children:i.availableUnassigned}),(0,H.jsx)(Z,{children:(0,H.jsx)(X,{title:`Show Details`,children:(0,H.jsx)(th,{size:`small`,onClick:()=>r(!n),children:n?(0,H.jsx)(wT,{}):(0,H.jsx)(xT,{})})})})]}),(0,H.jsx)(gX,{$highlightedRow:a,$noncompletedRow:i.remainingToStart-i.assignedRaw>0,children:(0,H.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:10,children:(0,H.jsx)(Xp,{in:n,timeout:`auto`,unmountOnExit:!0,children:(0,H.jsx)(hJ,{job:i.job,checkAnalysisMonth:!1})})})})]})}function bX(e){let t=R(zO),n=(0,L.useMemo)(()=>sJ(t.jobs,t.material,e.queue),[t,e.queue]);return n.length===0?null:(0,H.jsxs)(Vw,{size:`small`,children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:`Job`}),(0,H.jsx)(Z,{children:`Starting Time`}),(0,H.jsx)(Z,{children:`Material`}),(0,H.jsx)(Z,{children:`Note`}),(0,H.jsx)(Z,{align:`right`,children:`Planned Quantity`}),(0,H.jsx)(Z,{align:`right`,children:`Remaining To Start`}),(0,H.jsx)(Z,{align:`right`,children:`Assigned Raw Material`}),(0,H.jsx)(Z,{align:`right`,children:`Required`}),(0,H.jsx)(Z,{align:`right`,children:`Available Unassigned`}),(0,H.jsx)(Z,{})]})}),(0,H.jsx)(Ww,{children:n.map((t,n)=>(0,H.jsx)(yX,{job:t,editNote:e.editNote,editQty:e.editQty},n))})]})}var xX=(0,L.memo)(function({workorder:e,inProc:t}){let n=z(TX);return(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:e.workorderId}),(0,H.jsx)(Z,{children:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(tW,{part:e.part,size:25})}),(0,H.jsx)(q,{variant:`body2`,sx:{display:`block`},children:e.part})]})}),(0,H.jsxs)(Z,{children:[e.comments&&e.comments.length>0?e.comments[e.comments.length-1].comment:``,(0,H.jsx)(X,{title:`Edit`,children:(0,H.jsx)(th,{size:`small`,onClick:()=>n(e),children:(0,H.jsx)(pT,{})})})]}),(0,H.jsx)(Z,{children:e.dueDate.toLocaleDateString()}),(0,H.jsx)(Z,{children:e.priority}),(0,H.jsx)(Z,{children:e.plannedQuantity}),(0,H.jsx)(Z,{children:e.completedQuantity}),(0,H.jsx)(Z,{children:t}),(0,H.jsx)(Z,{children:Math.max(0,e.plannedQuantity-e.completedQuantity-t)})]})}),SX=(0,L.memo)(function(){let e=R(zO);if(!e.workorders||e.workorders.length===0)return null;let t=Q.of(e.workorders).sortBy(e=>e.dueDate.getTime(),e=>e.priority),n=Q.of(e.material).filter(e=>!!e.workorderId&&e.workorderId!==``).toLookupMap(e=>e.workorderId??``,e=>e.partName,()=>1,(e,t)=>e+t);return(0,H.jsxs)(Vw,{size:`small`,children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:`Workorder`}),(0,H.jsx)(Z,{children:`Part`}),(0,H.jsx)(Z,{children:`Comment`}),(0,H.jsx)(Z,{children:`Due Date`}),(0,H.jsx)(Z,{children:`Priority`}),(0,H.jsx)(Z,{children:`Planned Qty`}),(0,H.jsx)(Z,{children:`Completed Qty`}),(0,H.jsx)(Z,{children:`In Process`}),(0,H.jsx)(Z,{children:`Remaining To Assign`})]})}),(0,H.jsx)(Ww,{children:t.map(e=>(0,H.jsx)(xX,{workorder:e,inProc:n.get(e.workorderId)?.get(e.part)??0},`${e.workorderId}-${e.part}`))})]})}),CX=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(null),r=z(Gre);function i(){e.closeDialog(),n(null)}function a(){t!==null&&e.job!==null&&t!==e.job.comment&&(r(e.job.unique,t),i())}return(0,H.jsx)(py,{open:e.job!==null,onClose:i,children:e.job===null?void 0:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(gy,{children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(tW,{part:e.job.partName,size:40})}),(0,H.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Edit Note For `,e.job.unique]})]})}),(0,H.jsx)(hy,{children:(0,H.jsx)(nT,{variant:`outlined`,fullWidth:!0,autoFocus:!0,value:t===null?e.job.comment||``:t,onChange:e=>n(e.target.value),onKeyDown:e=>{e.keyCode===13&&t!==null&&(a(),e.preventDefault())}})}),(0,H.jsxs)(my,{children:[(0,H.jsx)(Y,{color:`primary`,disabled:t===null,onClick:a,children:`Save Note`}),(0,H.jsx)(Y,{color:`primary`,onClick:i,children:`Cancel`})]})]})})}),wX=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(!1),[r,i]=(0,L.useState)(null),a=R(br).allowEditJobPlanQuantityFromQueuesPage??null;function o(){t||(e.closeDialog(),i(null))}async function s(){if(!(a===null||e.job===null||r==null||isNaN(r))){n(!0);try{await fetch(a,{method:`PUT`,headers:new Headers({"Content-Type":`application/json`}),body:JSON.stringify({Unique:e.job.job.unique,Quantity:r})}),e.closeDialog(),i(null)}finally{n(!1)}}}return(0,H.jsx)(py,{open:a!=null&&e.job!==null,onClose:o,children:e.job===null?void 0:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(gy,{children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(tW,{part:e.job.job.partName,size:40})}),(0,H.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Edit Planned Quantity For `,e.job.job.unique]})]})}),(0,H.jsxs)(hy,{children:[(0,H.jsxs)(`p`,{children:[e.job.job.cycles,` currently planned, `,e.job.remainingToStart,` remaining to start`]}),(0,H.jsx)(nT,{variant:`outlined`,fullWidth:!0,autoFocus:!0,type:`number`,value:r===null?``:r,onChange:e=>i(parseInt(e.target.value)),slotProps:{htmlInput:{style:{textAlign:`right`},min:(e.job.job.cycles??0)-e.job.remainingToStart}}})]}),(0,H.jsxs)(my,{children:[(0,H.jsxs)(Y,{color:`primary`,disabled:t||r===null||isNaN(r),onClick:()=>void s(),children:[t?(0,H.jsx)(Ym,{size:10}):void 0,`Set Quantity`]}),(0,H.jsx)(Y,{color:`primary`,disabled:t,onClick:o,children:`Cancel`})]})]})})}),TX=P(null);function EX(){let[e,t]=B(TX),[n,r]=(0,L.useState)(null),i=z(VO);function a(){t(null),r(null)}function o(){e&&n&&n!==``&&i({workorder:e.workorderId,comment:n}),a()}return(0,H.jsx)(py,{open:e!==null,onClose:a,children:e===null?void 0:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(gy,{children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(tW,{part:e.part,size:40})}),(0,H.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Add Comment For `,e.workorderId]})]})}),(0,H.jsxs)(hy,{children:[(0,H.jsx)(`ul`,{children:(e.comments??[]).map((e,t)=>(0,H.jsx)(`li`,{children:(0,H.jsxs)(q,{variant:`body1`,children:[e.timeUTC.toLocaleString(),`: `,e.comment]})},t))}),(0,H.jsx)(nT,{variant:`outlined`,sx:{mt:`1em`},fullWidth:!0,autoFocus:!0,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Enter`&&n!==null&&n!==``&&(o(),e.preventDefault())}})]}),(0,H.jsxs)(my,{children:[(0,H.jsx)(Y,{color:`primary`,onClick:o,children:`Save Comment`}),(0,H.jsx)(Y,{color:`primary`,onClick:a,children:`Cancel`})]})]})})}var DX=(0,L.memo)(function(e){let t=R(br),n=z(VY),r=z(JY),i=z(Jq);if(!t.addToQueueButton||t.addToQueueButton===De.DoNotShow)return null;function a(){switch(t.addToQueueButton){case De.DoNotShow:return;case De.AddBulkUnassigned:e.rawMatQueue?n(e.label):r(e.label);break;case De.LookupExistingSerial:r(e.label);return;case De.ManualBarcodeScan:i(e.label);return}}return e.rawMatQueue?(0,H.jsx)(X,{title:`Add Raw Material`,children:(0,H.jsx)(by,{color:`secondary`,onClick:a,size:`large`,style:{marginBottom:`-30px`,zIndex:1},children:(0,H.jsx)(aT,{})})}):e.inProcQueue?(0,H.jsx)(X,{title:`Add Material`,children:(0,H.jsx)(by,{color:`secondary`,onClick:a,size:`medium`,style:{marginBottom:`-30px`,zIndex:1},children:(0,H.jsx)(ure,{fontSize:`inherit`})})}):null});function OX(e){let t=R(CI);return t&&t.type===`AddMatWithEnteredSerial`||t&&t.type===`Barcode`&&t.toQueue?e.includes(t.toQueue)?[t.toQueue]:[]:e}var kX=(0,L.memo)(function({queueNames:e}){let[t,n]=(0,L.useState)({toQueue:null,enteredOperator:null,newMaterialTy:null}),[r,i]=(0,L.useState)(null),a=(0,L.useCallback)(()=>{n({toQueue:null,enteredOperator:null,newMaterialTy:null}),i(null)},[]);return e=OX(e),(0,H.jsx)(AW,{allowNote:!0,onClose:a,highlightProcsGreaterOrEqualTo:r?.process??void 0,extraDialogElements:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(mX,{st:r,setState:i}),(0,H.jsx)(iX,{queueNames:e,st:t,setState:n})]}),buttons:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(BY,{}),(0,H.jsx)(lX,{onClose:a}),(0,H.jsx)(uX,{onClose:a}),(0,H.jsx)(hX,{onClose:a,st:r,setState:i}),(0,H.jsx)(aX,{st:t,queueNames:e,onClose:a})]})})}),AX=e=>{let t=R(LO),n=R(zO),r=R(DL),i=R(kL),a=(0,L.useMemo)(()=>cJ(e.queues,n,r,i),[n,e.queues,r,i]),o=!Q.ofObject(n.jobs).isEmpty(),[s,c]=(0,L.useState)(null),l=(0,L.useCallback)(()=>c(null),[]),[u,d]=(0,L.useState)(null),f=(0,L.useCallback)(()=>d(null),[]),[p,m]=(0,L.useState)(null),h=(0,L.useCallback)(()=>m(null),[]);return(0,H.jsxs)(J,{sx:{padding:`8px`,width:`100%`},children:[a.map((e,t)=>(0,H.jsx)(`div`,{style:t<a.length-1?{borderBottom:`1px solid black`}:void 0,children:(0,H.jsx)(vJ,{matIds:e.material.map(e=>e.materialID),direction:`rect`,queueName:e.label,renderDragOverlay:t=>(0,H.jsx)(vW,{mat:t,hideEmptySerial:!0,displayJob:o&&e.rawMaterialQueue,fsize:`normal`}),children:(0,H.jsxs)(J,{sx:{minHeight:`134px`},children:[(0,H.jsxs)(J,{sx:{display:`flex`,margin:`4px`},children:[(0,H.jsx)(q,{variant:`h4`,sx:{flexGrow:1},children:e.label}),e.free?void 0:(0,H.jsx)(DX,{label:e.label,rawMatQueue:e.rawMaterialQueue,inProcQueue:e.inProcQueue})]}),(0,H.jsxs)(J,{sx:{justifyContent:`flex-start`,display:`flex`,flexWrap:`wrap`},children:[e.material.map((t,n)=>(0,H.jsx)(_W,{mat:t,hideEmptySerial:!0,fsize:`normal`,displayJob:o&&e.rawMaterialQueue},n)),e.groupedRawMat&&e.groupedRawMat.length>0?e.groupedRawMat.map((n,r)=>n.material.length===1?(0,H.jsx)(gW,{mat:n.material[0],hideEmptySerial:!0,fsize:`normal`,displayJob:o&&e.rawMaterialQueue},r):(0,H.jsx)(yW,{partOrCasting:n.partOrCasting,assignedJobUnique:n.assignedJobUnique,material:n.material,fsize:`normal`,onOpen:()=>m(n.material)},t)):void 0,e.rawMaterialQueue?o?(0,H.jsx)(bX,{queue:e.label,editNote:c,editQty:d}):(0,H.jsx)(SX,{}):void 0]})]})})},t)),(0,H.jsx)(kX,{queueNames:e.queues}),(0,H.jsx)(YY,{}),(0,H.jsx)(Yq,{}),(0,H.jsx)(GY,{}),(0,H.jsx)(CX,{job:s,closeDialog:l}),(0,H.jsx)(wX,{job:u,closeDialog:f}),(0,H.jsx)(EX,{}),(0,H.jsx)(KY,{material:p,closeDialog:h,operator:t})]})};function jX(e){return YI(`Queues`),(0,H.jsx)(J,{component:`main`,sx:{backgroundColor:`#F8F8F8`,minHeight:{xs:`calc(100vh - 64px - 32px)`,sm:`calc(100vh - 64px - 40px)`,md:`calc(100vh - 64px)`}},children:(0,H.jsx)(AX,{...e})})}var MX=G(Zw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(e=>({"& > *":{borderBottom:`unset`},...e.$darkRow&&{backgroundColor:`#F5F5F5`}})),NX=G(Zw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(e=>({...e.$darkRow&&{backgroundColor:`#F5F5F5`}}));function PX(e){let[t,n]=(0,L.useState)(!1),r=10;e.showMaterial&&(r+=1);let i=e.job;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(MX,{$darkRow:e.showDarkRow&&i.darkRow,children:[(0,H.jsx)(Z,{children:i.routeStartTime.toLocaleString()}),(0,H.jsx)(Z,{children:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(tW,{part:i.partName,size:25})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(q,{variant:`body2`,component:`span`,sx:{display:`block`},children:i.partName})})]})}),e.showMaterial?(0,H.jsx)(Z,{children:i.casting?(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(tW,{part:i.casting,size:25})}),(0,H.jsx)(q,{variant:`body2`,sx:{display:`block`},children:i.casting})]}):void 0}):void 0,(0,H.jsxs)(Z,{children:[i.comment,(0,H.jsx)(X,{title:`Edit`,children:(0,H.jsx)(th,{size:`small`,onClick:()=>e.setCurEditNoteJob(i),children:(0,H.jsx)(pT,{})})})]}),(0,H.jsx)(Z,{children:i.inProcJob===null?`Archived`:`Active`}),(0,H.jsx)(Z,{align:`right`,children:i.scheduledQty}),(0,H.jsx)(Z,{align:`right`,sx:{backgroundColor:i.decrementedQty>0?`#FF8A65`:void 0},children:i.decrementedQty}),(0,H.jsx)(Z,{align:`right`,children:i.completedQty}),(0,H.jsx)(Z,{align:`right`,children:i.inProcessQty}),(0,H.jsx)(Z,{align:`right`,children:i.remainingQty}),(0,H.jsx)(Z,{children:(0,H.jsx)(X,{title:`Show Details`,children:(0,H.jsx)(th,{size:`small`,onClick:()=>n(!t),children:t?(0,H.jsx)(wT,{}):(0,H.jsx)(xT,{})})})})]}),(0,H.jsx)(NX,{$darkRow:e.showDarkRow&&i.darkRow,children:(0,H.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:r,children:(0,H.jsx)(Xp,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,H.jsx)(hJ,{job:i.inProcJob?i.inProcJob:i.historicJob,checkAnalysisMonth:!1})})})})]})}function FX(e,t,n,r){let i;switch(t){case 0:i=e=>e.routeStartTime.getTime();break;case 1:i=e=>e.partName;break;case 2:i=e=>e.casting;break;case 3:i=e=>e.comment??null;break;case 4:i=e=>e.scheduledQty;break;case 5:i=e=>e.decrementedQty;break;case 6:i=e=>e.completedQty;break;case 7:i=e=>e.inProcessQty;break;case 8:i=e=>e.remainingQty}return(r?Q.of(e):Q.of(e).filter(e=>e.inProcJob!==null)).toSortedArray(n===`asc`?{asc:i}:{desc:i})}function IX(e){return(0,H.jsx)(X,{title:`Sort`,enterDelay:300,children:(0,H.jsx)(Z,{align:e.align,sortDirection:e.sortBy===e.col&&e.order,children:(0,H.jsx)($w,{active:e.sortBy===e.col,direction:e.order,onClick:()=>{e.col===e.sortBy?e.setOrder(e.order===`asc`?`desc`:`asc`):(e.setSortBy(e.col),e.setOrder(`asc`))},children:e.children})})})}var LX=(0,L.memo)(function(e){let t={sortBy:e.sortBy,setSortBy:e.setSortBy,order:e.order,setOrder:e.setOrder};return(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(IX,{align:`left`,col:0,...t,children:`Date`}),(0,H.jsx)(IX,{align:`left`,col:1,...t,children:`Part`}),e.showMaterial?(0,H.jsx)(IX,{align:`left`,col:2,...t,children:`Material`}):void 0,(0,H.jsx)(IX,{align:`left`,col:3,...t,children:`Note`}),(0,H.jsxs)(Z,{align:`left`,children:[`Active`,(0,H.jsx)(X,{title:e.showArchived?`Hide Archived`:`Show Archived`,children:(0,H.jsx)(th,{size:`small`,onClick:t=>{e.setShowArchived(e=>!e),t.stopPropagation()},children:e.showArchived?(0,H.jsx)(Nre,{}):(0,H.jsx)(Pre,{})})})]}),(0,H.jsx)(IX,{align:`right`,col:4,...t,children:`Scheduled`}),(0,H.jsx)(IX,{align:`right`,col:5,...t,children:`Removed`}),(0,H.jsx)(IX,{align:`right`,col:6,...t,children:`Completed`}),(0,H.jsx)(IX,{align:`right`,col:7,...t,children:`In Process`}),(0,H.jsx)(IX,{align:`right`,col:8,...t,children:`Remaining To Run`}),(0,H.jsx)(Z,{children:(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>Qq(e.jobs,e.showMaterial),size:`large`,children:(0,H.jsx)(bT,{})})})})]})})}),RX=(0,L.memo)(function(){let[e,t]=(0,L.useState)(null),[n,r]=(0,L.useState)(0),[i,a]=(0,L.useState)(`desc`),[o,s]=(0,L.useState)(!0),c=R(_L),l=R(bO),u=R(zO),d=(0,L.useMemo)(()=>{for(let[,e]of l)for(let t of e.procsAndPaths[0]?.paths??[])if(t.casting!==null&&t.casting!==void 0&&t.casting!==``)return!0;return!1},[l]),f=(0,L.useMemo)(()=>Xq({start:QT(xE(),-6),end:QT(xE(),1)},c.matsById,l,u),[c.matsById,l,u]),p=(0,L.useMemo)(()=>FX(f,n,i,o),[f,n,i,o]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(Vw,{stickyHeader:!0,children:[(0,H.jsx)(LX,{jobs:f,showMaterial:d,sortBy:n,setSortBy:r,order:i,setOrder:a,showArchived:o,setShowArchived:s}),(0,H.jsx)(Ww,{children:p.map((e,r)=>(0,H.jsx)(PX,{job:e,showDarkRow:n===0,showMaterial:d,setCurEditNoteJob:t},e.inProcJob?.unique??e.historicJob?.unique??r))})]}),(0,H.jsx)(CX,{job:e?.historicJob??null,closeDialog:()=>t(null)})]})});function zX(){return YI(`Scheduled Jobs`),(0,H.jsx)(`main`,{style:{padding:`24px`},children:(0,H.jsx)(RX,{})})}var BX=`__FMS_INSIGHT_LOAD_STATION_BIN__`,VX=`__FMS_INSIGHT_PALLETS_BIN__`,HX=`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`,UX=`__FMS_INSIGHT_BASKETS_BIN__`,WX=NO(`material-bins`,[]);function GX(e,t,n){let r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r}function KX(e,t,n){let r=e.get(t);r?r.push(n):e.set(t,[n])}var qX=function(e){return e.LoadStations=`Bin_LoadStations`,e.Pallets=`Bin_Pallets`,e.ActiveQueues=`Bin_ActiveQueues`,e.Baskets=`Bin_Baskets`,e.QuarantineQueues=`Bin_Quarantine`,e}({});function JX(e){let t=e.position;if(t===void 0)return`Unknown`;let n;return n=t.locationTitle&&t.locationTitle.length>0?t.locationTitle:t.location+` `+t.locationNum.toString(),t.zone&&(n+=`-${t.zone}`),n}function YX(e,t){let n=new Map,r=new Map,i=new Map,a=new Map,o=Q.ofObject(e.pallets).toRMap(([,e])=>[e.palletNum,e.palletNum.toString()+` (`+e.currentPalletLocation.group+` #`+e.currentPalletLocation.num.toString()+`)`]);for(let t of e.material)switch(t.location.type){case it.InQueue:if(t.action.type===ot.Loading){let r=e.pallets[t.action.loadOntoPalletNum??0];if(r&&r.currentPalletLocation.loc===tt.LoadUnload){let e=r.currentPalletLocation.num;KX(n,e,t)}else KX(i,t.location.currentQueue||`Queue`,t)}else KX(i,t.location.currentQueue||`Queue`,t);break;case it.OnPallet:if(t.location.palletNum){let i=e.pallets[t.location.palletNum];i.currentPalletLocation.loc===tt.LoadUnload?KX(n,i.currentPalletLocation.num,t):KX(r,o.get(t.location.palletNum)??``,t)}else KX(r,`Pallet`,t);break;case it.Free:switch(t.action.type){case ot.Loading:{let r=e.pallets[t.action.loadOntoPalletNum??0]?.currentPalletLocation.num;KX(n,r,t);break}case ot.LoadingToBasket:{let r=e.baskets?.[t.action.loadToBasketId??0]?.position;r?.location===vt.LoadUnload?KX(n,r.locationNum,t):KX(i,`Free Material`,t);break}default:KX(i,`Free Material`,t)}break;case it.InBasket:t.location.basketId!==void 0&&KX(a,t.location.basketId,t)}let s=Q.ofObject(e.jobs).flatMap(([,e])=>e.procsAndPaths).flatMap(e=>e.paths).flatMap(e=>{let t=[];return e.inputQueue!==void 0&&t.push(e.inputQueue),e.outputQueue!==void 0&&t.push(e.outputQueue),t}).concat(Q.ofObject(e.queues).filter(([,e])=>e.role===ct.RawMaterial||e.role===ct.InProcessTransfer).map(([e])=>e)).toRSet(e=>e),c=Q.ofObject(e.queues).filter(([e])=>!s.has(e)).toRSet(([e])=>e),l=t.filter(e=>e===`__FMS_INSIGHT_LOAD_STATION_BIN__`||e===`__FMS_INSIGHT_PALLETS_BIN__`||e===`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`||e===`__FMS_INSIGHT_BASKETS_BIN__`||c.has(e));l.indexOf(`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`)<0&&l.unshift(HX),a.size>0&&l.indexOf(`__FMS_INSIGHT_BASKETS_BIN__`)<0&&l.unshift(UX),l.indexOf(`__FMS_INSIGHT_PALLETS_BIN__`)<0&&l.unshift(VX),l.indexOf(`__FMS_INSIGHT_LOAD_STATION_BIN__`)<0&&l.unshift(BX);for(let e of Q.of(c).sortBy(e=>e))l.indexOf(e)<0&&l.push(e);return l.map(t=>{if(t===`__FMS_INSIGHT_LOAD_STATION_BIN__`)return{type:`Bin_LoadStations`,binId:BX,byLul:n};if(t===`__FMS_INSIGHT_PALLETS_BIN__`)return{type:`Bin_Pallets`,binId:VX,byPallet:r};if(t===`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`)return{type:`Bin_ActiveQueues`,binId:HX,byQueue:Q.of(s).toRMap(e=>{let t=i.get(e)??[];return t.sort((e,t)=>(e.location.queuePosition??0)-(t.location.queuePosition??0)),[e,t]},(e,t)=>e.concat(t))};if(t===`__FMS_INSIGHT_BASKETS_BIN__`)return{type:`Bin_Baskets`,binId:UX,byBasket:new Map(a),basketLocations:Q.ofObject(e.baskets??{}).collect(([e,t])=>parseInt(e)>0?[parseInt(e),JX(t)]:null).toRMap(e=>e)};{let e=t,n=i.get(e)??[];return n.sort((e,t)=>(e.location.queuePosition??0)-(t.location.queuePosition??0)),{type:`Bin_Quarantine`,binId:e,queueName:e,material:n}}})}function XX(e,t,n,r){return e.map(e=>{switch(e.type){case`Bin_Quarantine`:if(e.queueName===n){let n=e.material.filter(e=>e.materialID!==t.materialID);return n.splice(r,0,t),{...e,material:n}}return{...e,material:e.material.filter(e=>e.materialID!==t.materialID)};default:return e}})}function ZX(e,t){for(let n of t)switch(n.type){case`Bin_Quarantine`:for(let t=0;t<n.material.length;t++)if(n.material[t].materialID===e)return{bin:n,idx:t}}return null}function QX(e,t){for(let n of t)if(n.type===`Bin_Quarantine`&&n.queueName===e)return{bin:n,idx:0};return null}var $X=(0,L.forwardRef)(function(e,t){return(0,H.jsxs)(J,{sx:{margin:e.isDragOverlay?void 0:`0.75em`,opacity:e.isActiveDrag?.2:1,border:`1px solid black`,padding:`4px`},ref:t,...e.dragRootProps,children:[(0,H.jsx)(J,{role:`button`,tabIndex:0,sx:{cursor:e.isDragOverlay?`grabbing`:`grab`},...e.dragHandleProps,children:(0,H.jsx)(q,{variant:`h4`,children:e.label})}),(0,H.jsx)(J,{sx:{display:`flex`,flexDirection:`column`,flexWrap:`nowrap`,width:`18em`,minHeight:`20em`},children:e.children})]})});function eZ(e){let t={type:`container`,bin:e.bin},{active:n,isDragging:r,attributes:i,listeners:a,setNodeRef:o,setActivatorNodeRef:s,transform:c,transition:l}=AU({id:e.binId,data:t}),u={...a};for(let[e,t]of Object.entries(i))e.startsWith(`aria`)&&(u[e]=t);let d={transform:c?`translate3d(${Math.round(c.x)}px, ${Math.round(c.y)}px, 0)`:void 0,transition:n===null?void 0:l};return(0,H.jsx)($X,{ref:o,dragRootProps:{style:d},dragHandleProps:u,setDragHandleRef:s,isActiveDrag:r,...e})}var tZ=(0,L.memo)(function(e){return e.isDragOverlay?(0,H.jsx)($X,{binId:e.binId,label:e.queue,isDragOverlay:!0,children:e.material.map(e=>(0,H.jsx)(gW,{mat:e,hideAvatar:!0,showHandle:!0},e.materialID))}):(0,H.jsx)(eZ,{binId:e.binId,label:e.queue,bin:e.bin,children:(0,H.jsx)(SU,{items:e.material.map(e=>e.materialID),strategy:vU,children:e.material.map(e=>(0,H.jsx)(_W,{mat:e,hideAvatar:!0},e.materialID))})})});function nZ(e,t){return e-t}function rZ(e){return`Pallet `+e}function iZ(e,t){let n=parseInt(e),r=parseInt(t);return isNaN(n)||isNaN(r)?e.localeCompare(t):n-r}function aZ(e){return e}function oZ(e,t){return e.localeCompare(t)}function sZ(e,t){return e-t}var cZ=class extends L.PureComponent{render(){let e=this.props.isDragOverlay?$X:eZ;return(0,H.jsx)(e,{label:this.props.name,binId:this.props.binId,bin:this.props.bin,isDragOverlay:this.props.isDragOverlay,children:Q.of(this.props.material).sortWith(([e,t],[n,r])=>this.props.compareLabel(e,n)).map(([e,t],n)=>(0,H.jsxs)(`div`,{children:[(0,H.jsx)(q,{variant:`caption`,children:this.props.renderLabel(e)}),t.map((e,t)=>(0,H.jsx)(gW,{mat:e,hideAvatar:!0},t))]},n))})}};function lZ({matBin:e,isDragOverlay:t}){let n=R(br),r=dk(n.basketName);switch(e.type){case qX.LoadStations:return(0,H.jsx)(cZ,{name:`Load Stations`,binId:e.binId,renderLabel:e=>ck(e,n.loadStationNames),compareLabel:nZ,material:e.byLul,bin:e,isDragOverlay:t});case qX.Pallets:return(0,H.jsx)(cZ,{name:`Pallets`,binId:e.binId,renderLabel:rZ,compareLabel:iZ,material:e.byPallet,bin:e,isDragOverlay:t});case qX.ActiveQueues:return(0,H.jsx)(cZ,{name:`Queues`,binId:e.binId,renderLabel:aZ,compareLabel:oZ,material:e.byQueue,bin:e,isDragOverlay:t});case qX.Baskets:return(0,H.jsx)(cZ,{name:r+`s`,binId:e.binId,renderLabel:t=>r+` `+t.toString()+(typeof t==`number`&&e.basketLocations.get(t)?` (${e.basketLocations.get(t)})`:``),compareLabel:sZ,material:e.byBasket,bin:e,isDragOverlay:t});case qX.QuarantineQueues:return(0,H.jsx)(tZ,{binId:e.binId,queue:e.queueName,material:e.material,bin:e,isDragOverlay:t})}}var uZ=(0,L.memo)(function(){let[e,t]=(0,L.useState)(null);function n(){t(null)}return(0,H.jsx)(AW,{onClose:n,allowNote:!0,highlightProcsGreaterOrEqualTo:e?.process??void 0,extraDialogElements:(0,H.jsx)(H.Fragment,{children:e===null?null:(0,H.jsx)(mX,{st:e,setState:t})}),buttons:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(lX,{onClose:n,ignoreOperator:!0}),(0,H.jsx)(uX,{onClose:n,ignoreOperator:!0}),(0,H.jsx)(hX,{st:e,setState:t,onClose:n,ignoreOperator:!0})]})})});function dZ(e){return(0,L.useCallback)(t=>{if(typeof t.active.id==`string`)return JB({...t,droppableContainers:t.droppableContainers.filter(e=>typeof e.id==`string`)});let n=$B(t),r=KB(n.length>0?n:ZB(t),`id`);if(r!=null){if(typeof r==`string`){let n=QX(r,e);n&&n.bin.material.length>0&&(r=JB({...t,droppableContainers:t.droppableContainers.filter(e=>e.id!==r&&n.bin.material.findIndex(t=>t.materialID===e.id)>=0)})[0]?.id)}return[{id:r}]}return[]},[e])}function fZ(e){YI(`All Material`);let t=R(zO),[n,r]=B(WX),[i]=VI(),a=z(HO),[o,s]=(0,L.useState)(null),c=(0,L.useMemo)(()=>{let e=YX(t,n);return o&&o.type===`material`&&o.curOverBinId!==null?XX(e,o.mat,o.curOverBinId,o.initialIdx):e},[t,n,o]),l=e.displaySystemBins?c:c.filter(e=>e.type===qX.QuarantineQueues),u=dZ(c);return(0,H.jsxs)(VH,{collisionDetection:u,measuring:{droppable:{strategy:rH.Always}},onDragStart:({active:e})=>{typeof e.id==`string`&&typeof e.data.current==`object`&&e.data.current!==null&&`bin`in e.data.current?s({type:`column`,bin:e.data.current.bin}):typeof e.data.current==`object`&&e.data.current!==null&&`mat`in e.data.current&&s({type:`material`,mat:e.data.current.mat,curOverBinId:null,initialIdx:0})},onDragOver:({over:e})=>{if(!e||o===null||o.type===`column`)return;let t=typeof e.id==`string`?QX(e.id,c):ZX(e.id,c);t&&t.bin.binId!==o.curOverBinId&&s({...o,curOverBinId:t.bin.binId,initialIdx:t.idx})},onDragEnd:({over:e})=>{if(o!==null){if(!e){s(null);return}if(o.type===`column`)typeof e.id==`number`?console.log(`Invalid, collision should never allow a column drag to be over a material`):r(GX(l.map(e=>e.binId),l.findIndex(e=>e.binId===o.bin.binId),l.findIndex(t=>t.binId===e.id)));else{let t=typeof e.id==`string`?QX(e.id,c):ZX(e.id,c);t&&(i({materialId:o.mat.materialID,queue:t.bin.queueName,queuePosition:t.idx,operator:null}).catch(console.error),a({queue:t.bin.queueName,matId:o.mat.materialID,newIdx:t.idx}))}s(null)}},onDragCancel:()=>s(null),children:[(0,H.jsx)(SU,{items:l.map(e=>e.binId),strategy:mU,children:(0,H.jsx)(J,{component:`main`,sx:{display:`flex`,flexWrap:`nowrap`,backgroundColor:`#F8F8F8`,minHeight:{xs:`calc(100vh - 64px - 48px)`,md:`calc(100vh - 64px)`}},children:l.map(e=>(0,H.jsx)(lZ,{matBin:e},e.binId))})}),(0,H.jsx)(sU,{children:o?.type===`material`?(0,H.jsx)(vW,{mat:o.mat,hideAvatar:!0}):o?.type===`column`?(0,H.jsx)(lZ,{matBin:o.bin,isDragOverlay:!0}):void 0}),(0,H.jsx)(uZ,{})]})}function pZ(e){let t=[];for(let n of e)for(let e of n.stops)t.push(`P${n.pallet},M${e.stationNum}`);return t.join(` -> `)}function mZ(e,t,n){let r=Q.of(e).collect(e=>e.result.type===oL.Completed&&!e.result.success?e.materialID:null).toRSet(e=>e);return Q.of(e).collect(e=>{if(t&&(e.time<t.start||e.time>t.end))return null;switch(e.result.type){case oL.Triggered:return{time:e.time,materialID:e.materialID,partName:e.part,serial:e.serial,workorder:e.workorder,toInspect:e.result.toInspect,path:pZ(e.result.actualPath),failed:r.has(e.materialID)};default:return null}}).buildHashMap(e=>e.path,(e,t)=>{let n=e??[];return n.push(t),n}).mapValues(e=>({material:Q.of(e).toSortedArray(n,e=>e.time.getTime()),failedCnt:e.reduce((e,t)=>e+ +!!t.failed,0)}))}function hZ(e,t,n){return Q.of(e).collect(e=>e.time<t||e.time>n?null:e.result.type===oL.Completed&&!e.result.success?{time:e.time,materialID:e.materialID,serial:e.serial,workorder:e.workorder,inspType:e.inspType,part:e.part}:null).toSortedArray(e=>e.time.getTime())}function gZ(e){for(let t of e)if(t.type===V.Inspection){let e=JSON.parse((t.details||{}).ActualPath||`[]`);if(!Array.isArray(e))continue;let n=[];for(let t of e)typeof t==`object`&&t&&n.push(Me.fromJS(t));if(n.length>0)return n}return[]}function _Z(e,t,n){let r=`<table>
|
|
335
|
+
<thead><tr>`;r+=`<th>Path</th><th>Date</th><th>Part</th><th>Inspection</th>`,r+=`<th>Serial</th><th>Workorder</th><th>Inspected</th><th>Failed</th>`,r+=`</tr></thead>
|
|
336
|
+
<tbody>
|
|
337
|
+
`;let i=mZ(n,void 0,{asc:e=>e.time.getTime()}),a=Q.of(i.keys()).toSortedArray(e=>e);for(let n of a){let a=i.get(n);if(a)for(let i of a.material)r+=`<tr>`,r+=`<td>`+n+`</td>`,r+=`<td>`+i.time.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})+`</td>`,r+=`<td>`+e+`</td>`,r+=`<td>`+t+`</td>`,r+=`<td>`+(i.serial||``)+`</td>`,r+=`<td>`+(i.workorder||``)+`</td>`,r+=`<td>`+(i.toInspect?`inspected`:``)+`</td>`,r+=`<td>`+(i.failed?`failed`:``)+`</td>`,r+=`</tr>
|
|
338
|
+
`}return r+=`</tbody>
|
|
339
|
+
</table>`,r}function vZ(e,t,n){Hk(_Z(e,t,n))}function yZ(e){let t=`<table>
|
|
340
|
+
<thead><tr>`;t+=`<th>Date</th><th>Part</th><th>Inspection</th><th>Serial</th><th>Workorder</th>`,t+=`</tr></thead>
|
|
341
|
+
<tbody>
|
|
342
|
+
`;for(let n of Q.of(e).sortBy({desc:e=>e.time.getTime()}))t+=`<tr>`,t+=`<td>`+n.time.toLocaleString()+`</td>`,t+=`<td>`+n.part+`</td>`,t+=`<td>`+n.inspType+`</td>`,t+=`<td>`+(n.serial||``)+`</td>`,t+=`<td>`+(n.workorder||``)+`</td>`,t+=`</tr>
|
|
343
|
+
`;return t+=`</tbody>
|
|
344
|
+
</table>`,t}function bZ(e){Hk(yZ(e))}function xZ(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function SZ(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function CZ(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function wZ(e,t){return e.sourceLinks.length?e.depth:t-1}function TZ(e){return function(){return e}}function EZ(e,t){return OZ(e.source,t.source)||e.index-t.index}function DZ(e,t){return OZ(e.target,t.target)||e.index-t.index}function OZ(e,t){return e.y0-t.y0}function kZ(e){return e.value}function AZ(e){return e.index}function jZ(e){return e.nodes}function MZ(e){return e.links}function NZ(e,t){let n=e.get(t);if(!n)throw Error(`missing: `+t);return n}function PZ({nodes:e}){for(let t of e){let e=t.y0,n=e;for(let n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(let e of t.targetLinks)e.y1=n+e.width/2,n+=e.width}}function FZ(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=AZ,c=wZ,l,u,d=jZ,f=MZ,p=6;function m(){let e={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return h(e),g(e),_(e),v(e),x(e),PZ(e),e}m.update=function(e){return PZ(e),e},m.nodeId=function(e){return arguments.length?(s=typeof e==`function`?e:TZ(e),m):s},m.nodeAlign=function(e){return arguments.length?(c=typeof e==`function`?e:TZ(e),m):c},m.nodeSort=function(e){return arguments.length?(l=e,m):l},m.nodeWidth=function(e){return arguments.length?(i=+e,m):i},m.nodePadding=function(e){return arguments.length?(a=o=+e,m):a},m.nodes=function(e){return arguments.length?(d=typeof e==`function`?e:TZ(e),m):d},m.links=function(e){return arguments.length?(f=typeof e==`function`?e:TZ(e),m):f},m.linkSort=function(e){return arguments.length?(u=e,m):u},m.size=function(i){return arguments.length?(e=t=0,n=+i[0],r=+i[1],m):[n-e,r-t]},m.extent=function(i){return arguments.length?(e=+i[0][0],n=+i[1][0],t=+i[0][1],r=+i[1][1],m):[[e,t],[n,r]]},m.iterations=function(e){return arguments.length?(p=+e,m):p};function h({nodes:e,links:t}){for(let[t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];let n=new Map(e.map((t,n)=>[s(t,n,e),t]));for(let[e,r]of t.entries()){r.index=e;let{source:t,target:i}=r;typeof t!=`object`&&(t=r.source=NZ(n,t)),typeof i!=`object`&&(i=r.target=NZ(n,i)),t.sourceLinks.push(r),i.targetLinks.push(r)}if(u!=null)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(u),n.sort(u)}function g({nodes:e}){for(let t of e)t.value=t.fixedValue===void 0?Math.max(CZ(t.sourceLinks,kZ),CZ(t.targetLinks,kZ)):t.fixedValue}function _({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.depth=i;for(let{target:t}of e.sourceLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function v({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.height=i;for(let{source:t}of e.targetLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function y({nodes:t}){let r=xZ(t,e=>e.depth)+1,a=(n-e-i)/(r-1),o=Array(r);for(let n of t){let t=Math.max(0,Math.min(r-1,Math.floor(c.call(null,n,r))));n.layer=t,n.x0=e+t*a,n.x1=n.x0+i,o[t]?o[t].push(n):o[t]=[n]}if(l)for(let e of o)e.sort(l);return o}function b(e){let n=SZ(e,e=>(r-t-(e.length-1)*o)/CZ(e,kZ));for(let i of e){let e=t;for(let t of i){t.y0=e,t.y1=e+t.value*n,e=t.y1+o;for(let e of t.sourceLinks)e.width=e.value*n}e=(r-e+o)/(i.length+1);for(let t=0;t<i.length;++t){let n=i[t];n.y0+=e*(t+1),n.y1+=e*(t+1)}O(i)}}function x(e){let n=y(e);o=Math.min(a,(r-t)/(xZ(n,e=>e.length)-1)),b(n);for(let e=0;e<p;++e){let t=.99**e,r=Math.max(1-t,(e+1)/p);C(n,t,r),S(n,t,r)}}function S(e,t,n){for(let r=1,i=e.length;r<i;++r){let i=e[r];for(let e of i){let n=0,r=0;for(let{source:t,value:i}of e.targetLinks){let a=i*(e.layer-t.layer);n+=ee(t,e)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,D(e)}l===void 0&&i.sort(OZ),w(i,n)}}function C(e,t,n){for(let r=e.length-2;r>=0;--r){let i=e[r];for(let e of i){let n=0,r=0;for(let{target:t,value:i}of e.sourceLinks){let a=i*(t.layer-e.layer);n+=te(e,t)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,D(e)}l===void 0&&i.sort(OZ),w(i,n)}}function w(e,n){let i=e.length>>1,a=e[i];E(e,a.y0-o,i-1,n),T(e,a.y1+o,i+1,n),E(e,r,e.length-1,n),T(e,t,0,n)}function T(e,t,n,r){for(;n<e.length;++n){let i=e[n],a=(t-i.y0)*r;a>1e-6&&(i.y0+=a,i.y1+=a),t=i.y1+o}}function E(e,t,n,r){for(;n>=0;--n){let i=e[n],a=(i.y1-t)*r;a>1e-6&&(i.y0-=a,i.y1-=a),t=i.y0-o}}function D({sourceLinks:e,targetLinks:t}){if(u===void 0){for(let{source:{sourceLinks:e}}of t)e.sort(DZ);for(let{target:{targetLinks:t}}of e)t.sort(EZ)}}function O(e){if(u===void 0)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(DZ),n.sort(EZ)}function ee(e,t){let n=e.y0-(e.sourceLinks.length-1)*o/2;for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n+=i+o}for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n-=i}return n}function te(e,t){let n=t.y0-(t.targetLinks.length-1)*o/2;for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n+=i+o}for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n-=i}return n}return m}var IZ=Math.PI,LZ=2*IZ,RZ=1e-6,zZ=LZ-RZ;function BZ(){this._x0=this._y0=this._x1=this._y1=null,this._=``}function VZ(){return new BZ}BZ.prototype=VZ.prototype={constructor:BZ,moveTo:function(e,t){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)},lineTo:function(e,t){this._+=`L`+(this._x1=+e)+`,`+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+=`Q`+ +e+`,`+ +t+`,`+(this._x1=+n)+`,`+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+=`C`+ +e+`,`+ +t+`,`+ +n+`,`+ +r+`,`+(this._x1=+i)+`,`+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(i<0)throw Error(`negative radius: `+i);if(this._x1===null)this._+=`M`+(this._x1=e)+`,`+(this._y1=t);else if(d>RZ){if(!(Math.abs(u*s-c*l)>RZ)||!i)this._+=`L`+(this._x1=e)+`,`+(this._y1=t);else{var f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((IZ-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>RZ&&(this._+=`L`+(e+y*l)+`,`+(t+y*u)),this._+=`A`+i+`,`+i+`,0,0,`+ +(u*f>l*p)+`,`+(this._x1=e+b*s)+`,`+(this._y1=t+b*c)}}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;if(n<0)throw Error(`negative radius: `+n);this._x1===null?this._+=`M`+c+`,`+l:(Math.abs(this._x1-c)>RZ||Math.abs(this._y1-l)>RZ)&&(this._+=`L`+c+`,`+l),n&&(d<0&&(d=d%LZ+LZ),d>zZ?this._+=`A`+n+`,`+n+`,0,1,`+u+`,`+(e-o)+`,`+(t-s)+`A`+n+`,`+n+`,0,1,`+u+`,`+(this._x1=c)+`,`+(this._y1=l):d>RZ&&(this._+=`A`+n+`,`+n+`,0,`+ +(d>=IZ)+`,`+u+`,`+(this._x1=e+n*Math.cos(i))+`,`+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)+`h`+ +n+`v`+ +r+`h`+-n+`Z`},toString:function(){return this._}};function HZ(e){return function(){return e}}function UZ(e){return e[0]}function WZ(e){return e[1]}var GZ=Array.prototype.slice;function KZ(e){return e.source}function qZ(e){return e.target}function JZ(e){var t=KZ,n=qZ,r=UZ,i=WZ,a=null;function o(){var o,s=GZ.call(arguments),c=t.apply(this,s),l=n.apply(this,s);if(a||=o=VZ(),e(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),o)return a=null,o+``||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(n=e,o):n},o.x=function(e){return arguments.length?(r=typeof e==`function`?e:HZ(+e),o):r},o.y=function(e){return arguments.length?(i=typeof e==`function`?e:HZ(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}function YZ(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function XZ(){return JZ(YZ)}function ZZ(e){return[e.source.x1,e.y0]}function QZ(e){return[e.target.x0,e.y1]}function $Z(){return XZ().source(ZZ).target(QZ)}var eQ=class{constructor(e,t){this.unique=e,this.name=t}compare(e){let t=this.unique.localeCompare(e.unique);return t===0?this.name.localeCompare(e.name):t}hash(){return MD(this.unique,this.name)}toString(){return`{unique: ${this.unique}}, name: ${this.name}}`}},tQ=class{constructor(e,t){this.from=e,this.to=t}compare(e){let t=this.from.compare(e.from);return t===0?this.to.compare(e.to):t}hash(){return MD(this.from,this.to)}toString(){return`{from: ${this.from.toString()}}, to: ${this.to.toString()}}`}};function nQ(e,t,n){let r=``,i=new eQ(``,`raw`),a=[];for(let t of e)for(let e of t.stops){let n=`P`+t.pallet+`,M`+e.stationNum.toString();r+=`->`+n;let o=new eQ(r,n);a.push(new tQ(i,o)),i=o}return t&&n!==void 0?n?a.push(new tQ(i,new eQ(`@@success`,`success`))):a.push(new tQ(i,new eQ(`@@failed`,`failed`))):a.push(new tQ(i,new eQ(`@@uninspected`,`uninspected`))),a}function rQ(e){let t=Q.of(e).filter(e=>e.result.type===oL.Completed).toRMap(e=>[e.materialID,e.result.type===oL.Completed&&e.result.success]),n=Q.of(e).flatMap(e=>e.result.type===oL.Triggered?nQ(e.result.actualPath,e.result.toInspect,t.get(e.materialID)??!1):[]),r=n.flatMap(e=>[e.from,e.to]).distinctBy(e=>e).map((e,t)=>({idx:t,node:e})),i=r.map(e=>({unique:e.node.unique,name:e.node.name})).toMutableArray(),a=r.toHashMap(e=>[e.node,e.idx],e=>e);return{nodes:i,links:n.toHashMap(e=>[e,1],(e,t)=>e+t).toLazySeq().map(([e,t])=>({source:a.get(e.from),target:a.get(e.to),value:t})).toMutableArray()}}var iQ=(e,t,n,r)=>{if(n===`length`||n===`prototype`||n===`arguments`||n===`caller`)return;let i=Object.getOwnPropertyDescriptor(e,n),a=Object.getOwnPropertyDescriptor(t,n);(aQ(i,a)||!r)&&Object.defineProperty(e,n,a)},aQ=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},oQ=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},sQ=(e,t)=>`/* Wrapped ${e}*/\n${t}`,cQ=Object.getOwnPropertyDescriptor(Function.prototype,`toString`),lQ=Object.getOwnPropertyDescriptor(Function.prototype.toString,`name`),uQ=(e,t,n)=>{let r=n===``?``:`with ${n.trim()}() `,i=sQ.bind(null,r,t.toString());Object.defineProperty(i,"name",lQ);let{writable:a,enumerable:o,configurable:s}=cQ;Object.defineProperty(e,"toString",{value:i,writable:a,enumerable:o,configurable:s})};function dQ(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let r of Reflect.ownKeys(t))iQ(e,t,r,n);return oQ(e,t),uQ(e,t,r),e}var fQ=2147483647,pQ=new WeakMap,mQ=new WeakMap,hQ=new WeakMap;function gQ(e,t){let n=e.get(t);if(n){if(n.maxAge<=Date.now()){e.delete(t);return}return n}}function _Q(e,{cacheKey:t,cache:n=new Map,maxAge:r}={}){if(r===0)return e;if(typeof r==`number`&&Number.isFinite(r)){if(r>fQ)throw TypeError(`The \`maxAge\` option cannot exceed ${fQ}.`);if(r<0)throw TypeError("The `maxAge` option should not be a negative number.")}let i=function(...a){let o=t?t(a):a[0],s=gQ(n,o);if(s)return s.data;let c=e.apply(this,a),l=typeof r==`function`?r(...a):r;if(l!==void 0&&l!==1/0){if(!Number.isFinite(l))throw TypeError("The `maxAge` function must return a finite number, `0`, or `Infinity`.");if(l<=0)return c;if(l>fQ)throw TypeError(`The \`maxAge\` function result cannot exceed ${fQ}.`)}if(n.set(o,{data:c,maxAge:l===void 0||l===1/0?1/0:Date.now()+l}),l!==void 0&&l!==1/0){let e=setTimeout(()=>{n.delete(o),mQ.get(i)?.delete(e)},l);e.unref?.();let t=mQ.get(i)??new Set;t.add(e),mQ.set(i,t)}return c};return dQ(i,e,{ignoreNonConfigurable:!0}),pQ.set(i,n),hQ.set(i,t??(e=>e[0])),i}function vQ(e){return typeof e==`string`}function yQ(e,t,n){return n.indexOf(e)===t}function bQ(e){return e.toLowerCase()===e}function xQ(e){return e.indexOf(`,`)===-1?e:e.split(`,`)}function SQ(e){if(!e)return e;if(e===`C`||e===`posix`||e===`POSIX`)return`en-US`;if(e.indexOf(`.`)!==-1){var t=e.split(`.`)[0],n=t===void 0?``:t;return SQ(n)}if(e.indexOf(`@`)!==-1){var r=e.split(`@`)[0],n=r===void 0?``:r;return SQ(n)}if(e.indexOf(`-`)===-1||!bQ(e))return e;var i=e.split(`-`),a=i[0],o=i[1];return`${a}-${(o===void 0?``:o).toUpperCase()}`}function CQ(e){var t=e===void 0?{}:e,n=t.useFallbackLocale,r=n===void 0||n,i=t.fallbackLocale,a=i===void 0?`en-US`:i,o=[];if(typeof navigator<`u`){for(var s=navigator.languages||[],c=[],l=0,u=s;l<u.length;l++){var d=u[l];c=c.concat(xQ(d))}var f=navigator.language,p=f&&xQ(f);o=o.concat(c,p)}return r&&o.push(a),o.filter(vQ).map(SQ).filter(yQ)}var wQ=_Q(CQ,{cacheKey:JSON.stringify});function TQ(e){return wQ(e)[0]||null}var EQ=_Q(TQ,{cacheKey:JSON.stringify}),DQ=new Map;function OQ(e){return function(t,n){let r=t||EQ();DQ.has(r)||DQ.set(r,new Map);let i=DQ.get(r);if(!i.has(e)){let t=new Intl.DateTimeFormat(r||void 0,e);i.set(e,t.format.bind(t))}return i.get(e)(n)}}function kQ(e){let t=new Date(e);return new Date(t.setHours(12))}function AQ(e){return(t,n)=>OQ(e)(t,kQ(n))}var jQ={day:`numeric`},MQ={day:`numeric`,month:`long`,year:`numeric`},NQ={month:`long`},PQ={month:`long`,year:`numeric`},FQ={weekday:`short`},IQ={weekday:`long`},LQ={year:`numeric`},RQ=AQ(jQ),zQ=AQ(MQ),BQ=AQ(NQ),VQ=AQ(PQ),HQ=AQ(FQ),UQ=AQ(IQ),WQ=AQ(LQ);function GQ(e,t,n){return function(r,i=n){return t(e(r)+i)}}function KQ(e){return function(t){return new Date(e(t).getTime()-1)}}function qQ(e,t){return function(n){return[e(n),t(n)]}}function JQ(e){if(e instanceof Date)return e.getFullYear();if(typeof e==`number`)return e;let t=Number.parseInt(e,10);if(typeof e==`string`&&!Number.isNaN(t))return t;throw Error(`Failed to get year from date: ${e}.`)}function YQ(e){if(e instanceof Date)return e.getMonth();throw Error(`Failed to get month from date: ${e}.`)}function XQ(e){if(e instanceof Date)return e.getDate();throw Error(`Failed to get year from date: ${e}.`)}function ZQ(e){let t=JQ(e),n=t+(-t+1)%100,r=new Date;return r.setFullYear(n,0,1),r.setHours(0,0,0,0),r}var QQ=GQ(JQ,ZQ,-100),$Q=GQ(JQ,ZQ,100),e$=KQ($Q),t$=GQ(JQ,e$,-100),n$=qQ(ZQ,e$);function r$(e){let t=JQ(e),n=t+(-t+1)%10,r=new Date;return r.setFullYear(n,0,1),r.setHours(0,0,0,0),r}var i$=GQ(JQ,r$,-10),a$=GQ(JQ,r$,10),o$=KQ(a$),s$=GQ(JQ,o$,-10),c$=qQ(r$,o$);function l$(e){let t=JQ(e),n=new Date;return n.setFullYear(t,0,1),n.setHours(0,0,0,0),n}var u$=GQ(JQ,l$,-1),d$=GQ(JQ,l$,1),f$=KQ(d$),p$=GQ(JQ,f$,-1),m$=qQ(l$,f$);function h$(e,t){return function(n,r=t){let i=JQ(n),a=YQ(n)+r,o=new Date;return o.setFullYear(i,a,1),o.setHours(0,0,0,0),e(o)}}function g$(e){let t=JQ(e),n=YQ(e),r=new Date;return r.setFullYear(t,n,1),r.setHours(0,0,0,0),r}var _$=h$(g$,-1),v$=h$(g$,1),y$=KQ(v$),b$=h$(y$,-1),x$=qQ(g$,y$);function S$(e,t){return function(n,r=t){let i=JQ(n),a=YQ(n),o=XQ(n)+r,s=new Date;return s.setFullYear(i,a,o),s.setHours(0,0,0,0),e(s)}}function C$(e){let t=JQ(e),n=YQ(e),r=XQ(e),i=new Date;return i.setFullYear(t,n,r),i.setHours(0,0,0,0),i}var w$=KQ(S$(C$,1)),T$=qQ(C$,w$);function E$(e){return XQ(y$(e))}var D$={GREGORY:`gregory`,HEBREW:`hebrew`,ISLAMIC:`islamic`,ISO_8601:`iso8601`},O$={gregory:[`en-CA`,`en-US`,`es-AR`,`es-BO`,`es-CL`,`es-CO`,`es-CR`,`es-DO`,`es-EC`,`es-GT`,`es-HN`,`es-MX`,`es-NI`,`es-PA`,`es-PE`,`es-PR`,`es-SV`,`es-VE`,`pt-BR`],hebrew:[`he`,`he-IL`],islamic:[`ar`,`ar-AE`,`ar-BH`,`ar-DZ`,`ar-EG`,`ar-IQ`,`ar-JO`,`ar-KW`,`ar-LY`,`ar-OM`,`ar-QA`,`ar-SA`,`ar-SD`,`ar-SY`,`ar-YE`,`dv`,`dv-MV`,`ps`,`ps-AR`]},k$=[0,1,2,3,4,5,6],A$=k$[0],j$=k$[5],M$=k$[6];function N$(e,t=D$.ISO_8601){let n=e.getDay();switch(t){case D$.ISO_8601:return(n+6)%7;case D$.ISLAMIC:return(n+1)%7;case D$.HEBREW:case D$.GREGORY:return n;default:throw Error(`Unsupported calendar type.`)}}function P$(e){return JQ(ZQ(e))}function F$(e){return JQ(r$(e))}function I$(e,t=D$.ISO_8601){let n=JQ(e),r=YQ(e),i=e.getDate()-N$(e,t);return new Date(n,r,i)}function L$(e,t=D$.ISO_8601){let n=t===D$.GREGORY?D$.GREGORY:D$.ISO_8601,r=I$(e,t),i=JQ(e)+1,a,o;do a=new Date(i,0,n===D$.ISO_8601?4:1),o=I$(a,t),--i;while(e<o);return Math.round((r.getTime()-o.getTime())/6048e5)+1}function R$(e,t){switch(e){case`century`:return ZQ(t);case`decade`:return r$(t);case`year`:return l$(t);case`month`:return g$(t);case`day`:return C$(t);default:throw Error(`Invalid rangeType: ${e}`)}}function z$(e,t){switch(e){case`century`:return QQ(t);case`decade`:return i$(t);case`year`:return u$(t);case`month`:return _$(t);default:throw Error(`Invalid rangeType: ${e}`)}}function B$(e,t){switch(e){case`century`:return $Q(t);case`decade`:return a$(t);case`year`:return d$(t);case`month`:return v$(t);default:throw Error(`Invalid rangeType: ${e}`)}}function V$(e,t){switch(e){case`decade`:return i$(t,-100);case`year`:return u$(t,-10);case`month`:return _$(t,-12);default:throw Error(`Invalid rangeType: ${e}`)}}function H$(e,t){switch(e){case`decade`:return a$(t,100);case`year`:return d$(t,10);case`month`:return v$(t,12);default:throw Error(`Invalid rangeType: ${e}`)}}function U$(e,t){switch(e){case`century`:return e$(t);case`decade`:return o$(t);case`year`:return f$(t);case`month`:return y$(t);case`day`:return w$(t);default:throw Error(`Invalid rangeType: ${e}`)}}function W$(e,t){switch(e){case`century`:return t$(t);case`decade`:return s$(t);case`year`:return p$(t);case`month`:return b$(t);default:throw Error(`Invalid rangeType: ${e}`)}}function G$(e,t){switch(e){case`decade`:return s$(t,-100);case`year`:return p$(t,-10);case`month`:return b$(t,-12);default:throw Error(`Invalid rangeType: ${e}`)}}function K$(e,t){switch(e){case`century`:return n$(t);case`decade`:return c$(t);case`year`:return m$(t);case`month`:return x$(t);case`day`:return T$(t);default:throw Error(`Invalid rangeType: ${e}`)}}function q$(e,t,n){let r=[t,n].sort((e,t)=>e.getTime()-t.getTime());return[R$(e,r[0]),U$(e,r[1])]}function J$(e,t,n){return n.map(n=>(t||WQ)(e,n)).join(` – `)}function Y$(e,t,n){return J$(e,t,n$(n))}function X$(e,t,n){return J$(e,t,c$(n))}function Z$(e){return e.getDay()===new Date().getDay()}function Q$(e,t=D$.ISO_8601){let n=e.getDay();switch(t){case D$.ISLAMIC:case D$.HEBREW:return n===j$||n===M$;case D$.ISO_8601:case D$.GREGORY:return n===M$||n===A$;default:throw Error(`Unsupported calendar type.`)}}var $$=`react-calendar__navigation`;function e1({activeStartDate:e,drillUp:t,formatMonthYear:n=VQ,formatYear:r=WQ,locale:i,maxDate:a,minDate:o,navigationAriaLabel:s=``,navigationAriaLive:c,navigationLabel:l,next2AriaLabel:u=``,next2Label:d=`»`,nextAriaLabel:f=``,nextLabel:p=`›`,prev2AriaLabel:m=``,prev2Label:h=`«`,prevAriaLabel:g=``,prevLabel:_=`‹`,setActiveStartDate:v,showDoubleView:y,view:b,views:x}){let S=x.indexOf(b)>0,C=b!==`century`,w=z$(b,e),T=C?V$(b,e):void 0,E=B$(b,e),D=C?H$(b,e):void 0,O=(()=>{if(w.getFullYear()<0)return!0;let t=W$(b,e);return o&&o>=t})(),ee=C&&(()=>{if(T.getFullYear()<0)return!0;let t=G$(b,e);return o&&o>=t})(),te=a&&a<E,k=C&&a&&a<D;function A(){v(w,`prev`)}function j(){v(T,`prev2`)}function M(){v(E,`next`)}function ne(){v(D,`next2`)}function re(e){let t=(()=>{switch(b){case`century`:return Y$(i,r,e);case`decade`:return X$(i,r,e);case`year`:return r(i,e);case`month`:return n(i,e);default:throw Error(`Invalid view: ${b}.`)}})();return l?l({date:e,label:t,locale:i||EQ()||void 0,view:b}):t}function ie(){let n=`${$$}__label`;return(0,H.jsxs)(`button`,{"aria-label":s,"aria-live":c,className:n,disabled:!S,onClick:t,style:{flexGrow:1},type:`button`,children:[(0,H.jsx)(`span`,{className:`${n}__labelText ${n}__labelText--from`,children:re(e)}),y?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{className:`${n}__divider`,children:` – `}),(0,H.jsx)(`span`,{className:`${n}__labelText ${n}__labelText--to`,children:re(E)})]}):null]})}return(0,H.jsxs)(`div`,{className:$$,children:[h!==null&&C?(0,H.jsx)(`button`,{"aria-label":m,className:`${$$}__arrow ${$$}__prev2-button`,disabled:ee,onClick:j,type:`button`,children:h}):null,_!==null&&(0,H.jsx)(`button`,{"aria-label":g,className:`${$$}__arrow ${$$}__prev-button`,disabled:O,onClick:A,type:`button`,children:_}),ie(),p!==null&&(0,H.jsx)(`button`,{"aria-label":f,className:`${$$}__arrow ${$$}__next-button`,disabled:te,onClick:M,type:`button`,children:p}),d!==null&&C?(0,H.jsx)(`button`,{"aria-label":u,className:`${$$}__arrow ${$$}__next2-button`,disabled:k,onClick:ne,type:`button`,children:d}):null]})}function t1(e){return`${e}%`}function n1({children:e,className:t,count:n,direction:r,offset:i,style:a,wrap:o,...s}){return(0,H.jsx)(`div`,{className:t,style:{display:`flex`,flexDirection:r,flexWrap:o?`wrap`:`nowrap`,...a},...s,children:L.Children.map(e,(e,t)=>{let r=i&&t===0?t1(100*i/n):null;return(0,L.cloneElement)(e,{...e.props,style:{flexBasis:t1(100/n),flexShrink:0,flexGrow:0,overflow:`hidden`,marginLeft:r,marginInlineStart:r,marginInlineEnd:0}})})})}function r1(e,t,n){return t&&t>e?t:n&&n<e?n:e}function i1(e,t){return t[0]<=e&&t[1]>=e}function a1(e,t){return e[0]<=t[0]&&e[1]>=t[1]}function o1(e,t){return i1(e[0],t)||i1(e[1],t)}function s1(e,t,n){let r=o1(t,e),i=[];if(r){i.push(n);let r=i1(e[0],t),a=i1(e[1],t);r&&i.push(`${n}Start`),a&&i.push(`${n}End`),r&&a&&i.push(`${n}BothEnds`)}return i}function c1(e){return Array.isArray(e)?e[0]!==null&&e[1]!==null:e!==null}function l1(e){if(!e)throw Error(`args is required`);let{value:t,date:n,hover:r}=e,i=`react-calendar__tile`,a=[i];if(!n)return a;let o=new Date,s=(()=>{if(Array.isArray(n))return n;let{dateType:t}=e;if(!t)throw Error(`dateType is required when date is not an array of two dates`);return K$(t,n)})();if(i1(o,s)&&a.push(`${i}--now`),!t||!c1(t))return a;let c=(()=>{if(Array.isArray(t))return t;let{valueType:n}=e;if(!n)throw Error(`valueType is required when value is not an array of two dates`);return K$(n,t)})();a1(c,s)?a.push(`${i}--active`):o1(c,s)&&a.push(`${i}--hasActive`);let l=s1(c,s,`${i}--range`);if(a.push(...l),r&&(Array.isArray(t)?t:[t]).length===1){let e=s1(r>c[0]?[c[0],r]:[r,c[0]],s,`${i}--hover`);a.push(...e)}return a}function u1({className:e,count:t=3,dateTransform:n,dateType:r,end:i,hover:a,offset:o,renderTile:s,start:c,step:l=1,value:u,valueType:d}){let f=[];for(let e=c;e<=i;e+=l){let t=n(e);f.push(s({classes:l1({date:t,dateType:r,hover:a,value:u,valueType:d}),date:t}))}return(0,H.jsx)(n1,{className:e,count:t,offset:o,wrap:!0,children:f})}function d1(e){let{activeStartDate:t,children:n,classes:r,date:i,formatAbbr:a,locale:o,maxDate:s,maxDateTransform:c,minDate:l,minDateTransform:u,onClick:d,onMouseOver:f,style:p,tileClassName:m,tileContent:h,tileDisabled:g,view:_}=e,v=(0,L.useMemo)(()=>typeof m==`function`?m({activeStartDate:t,date:i,view:_}):m,[t,i,m,_]),y=(0,L.useMemo)(()=>typeof h==`function`?h({activeStartDate:t,date:i,view:_}):h,[t,i,h,_]);return(0,H.jsxs)(`button`,{className:U(r,v),disabled:l&&u(l)>i||s&&c(s)<i||g?.({activeStartDate:t,date:i,view:_}),onClick:d?e=>d(i,e):void 0,onFocus:f?()=>f(i):void 0,onMouseOver:f?()=>f(i):void 0,style:p,type:`button`,children:[a?(0,H.jsx)(`abbr`,{"aria-label":a(o,i),children:n}):n,y]})}var f1=`react-calendar__century-view__decades__decade`;function p1({classes:e=[],currentCentury:t,formatYear:n=WQ,...r}){let{date:i,locale:a}=r,o=[];return e&&o.push(...e),o.push(f1),ZQ(i).getFullYear()!==t&&o.push(`${f1}--neighboringCentury`),(0,H.jsx)(d1,{...r,classes:o,maxDateTransform:o$,minDateTransform:r$,view:`century`,children:X$(a,n,i)})}function m1(e){let{activeStartDate:t,hover:n,showNeighboringCentury:r,value:i,valueType:a,...o}=e,s=P$(t),c=s+(r?119:99);return(0,H.jsx)(u1,{className:`react-calendar__century-view__decades`,dateTransform:r$,dateType:`decade`,end:c,hover:n,renderTile:({date:e,...n})=>(0,H.jsx)(p1,{...o,...n,activeStartDate:t,currentCentury:s,date:e},e.getTime()),start:s,step:10,value:i,valueType:a})}function h1(e){function t(){return(0,H.jsx)(m1,{...e})}return(0,H.jsx)(`div`,{className:`react-calendar__century-view`,children:t()})}var g1=`react-calendar__decade-view__years__year`;function _1({classes:e=[],currentDecade:t,formatYear:n=WQ,...r}){let{date:i,locale:a}=r,o=[];return e&&o.push(...e),o.push(g1),r$(i).getFullYear()!==t&&o.push(`${g1}--neighboringDecade`),(0,H.jsx)(d1,{...r,classes:o,maxDateTransform:f$,minDateTransform:l$,view:`decade`,children:n(a,i)})}function v1(e){let{activeStartDate:t,hover:n,showNeighboringDecade:r,value:i,valueType:a,...o}=e,s=F$(t),c=s+(r?11:9);return(0,H.jsx)(u1,{className:`react-calendar__decade-view__years`,dateTransform:l$,dateType:`year`,end:c,hover:n,renderTile:({date:e,...n})=>(0,H.jsx)(_1,{...o,...n,activeStartDate:t,currentDecade:s,date:e},e.getTime()),start:s,value:i,valueType:a})}function y1(e){function t(){return(0,H.jsx)(v1,{...e})}return(0,H.jsx)(`div`,{className:`react-calendar__decade-view`,children:t()})}var b1=`react-calendar__month-view__days__day`;function x1({calendarType:e,classes:t=[],currentMonthIndex:n,formatDay:r=RQ,formatLongDate:i=zQ,...a}){let{date:o,locale:s}=a,c=[];return t&&c.push(...t),c.push(b1),Q$(o,e)&&c.push(`${b1}--weekend`),o.getMonth()!==n&&c.push(`${b1}--neighboringMonth`),(0,H.jsx)(d1,{...a,classes:c,formatAbbr:i,maxDateTransform:w$,minDateTransform:C$,view:`month`,children:r(s,o)})}function S1(e){let{activeStartDate:t,calendarType:n,hover:r,showFixedNumberOfWeeks:i,showNeighboringMonth:a,value:o,valueType:s,...c}=e,l=JQ(t),u=YQ(t),d=i||a,f=N$(t,n),p=d?0:f,m=(d?-f:0)+1,h=(()=>{if(i)return m+42-1;let e=E$(t);if(a){let t=new Date;return t.setFullYear(l,u,e),t.setHours(0,0,0,0),e+(7-N$(t,n)-1)}return e})();return(0,H.jsx)(u1,{className:`react-calendar__month-view__days`,count:7,dateTransform:e=>{let t=new Date;return t.setFullYear(l,u,e),C$(t)},dateType:`day`,hover:r,end:h,renderTile:({date:e,...r})=>(0,H.jsx)(x1,{...c,...r,activeStartDate:t,calendarType:n,currentMonthIndex:u,date:e},e.getTime()),offset:p,start:m,value:o,valueType:s})}var C1=`react-calendar__month-view__weekdays`,w1=`${C1}__weekday`;function T1(e){let{calendarType:t,formatShortWeekday:n=HQ,formatWeekday:r=UQ,locale:i,onMouseLeave:a}=e,o=g$(new Date),s=JQ(o),c=YQ(o),l=[];for(let e=1;e<=7;e+=1){let a=new Date(s,c,e-N$(o,t)),u=r(i,a);l.push((0,H.jsx)(`div`,{className:U(w1,Z$(a)&&`${w1}--current`,Q$(a,t)&&`${w1}--weekend`),children:(0,H.jsx)(`abbr`,{"aria-label":u,title:u,children:n(i,a).replace(`.`,``)})},e))}return(0,H.jsx)(n1,{className:C1,count:7,onFocus:a,onMouseOver:a,children:l})}var E1=`react-calendar__tile`;function D1(e){let{onClickWeekNumber:t,weekNumber:n}=e,r=(0,H.jsx)(`span`,{children:n});if(t){let{date:t,onClickWeekNumber:n,weekNumber:i,...a}=e;return(0,H.jsx)(`button`,{...a,className:E1,onClick:e=>n(i,t,e),type:`button`,children:r})}{let{date:t,onClickWeekNumber:n,weekNumber:i,...a}=e;return(0,H.jsx)(`div`,{...a,className:E1,children:r})}}function O1(e){let{activeStartDate:t,calendarType:n,onClickWeekNumber:r,onMouseLeave:i,showFixedNumberOfWeeks:a}=e,o=(()=>{if(a)return 6;let e=E$(t)-(7-N$(t,n));return 1+Math.ceil(e/7)})(),s=(()=>{let e=JQ(t),r=YQ(t),i=XQ(t),a=[];for(let t=0;t<o;t+=1)a.push(I$(new Date(e,r,i+t*7),n));return a})(),c=s.map(e=>L$(e,n));return(0,H.jsx)(n1,{className:`react-calendar__month-view__weekNumbers`,count:o,direction:`column`,onFocus:i,onMouseOver:i,style:{flexBasis:`calc(100% * (1 / 8)`,flexShrink:0},children:c.map((e,t)=>{let n=s[t];if(!n)throw Error(`date is not defined`);return(0,H.jsx)(D1,{date:n,onClickWeekNumber:r,weekNumber:e},e)})})}function k1(e){if(e){for(let[t,n]of Object.entries(O$))if(n.includes(e))return t}return D$.ISO_8601}function A1(e){let{activeStartDate:t,locale:n,onMouseLeave:r,showFixedNumberOfWeeks:i}=e,{calendarType:a=k1(n),formatShortWeekday:o,formatWeekday:s,onClickWeekNumber:c,showWeekNumbers:l,...u}=e;function d(){return(0,H.jsx)(T1,{calendarType:a,formatShortWeekday:o,formatWeekday:s,locale:n,onMouseLeave:r})}function f(){return l?(0,H.jsx)(O1,{activeStartDate:t,calendarType:a,onClickWeekNumber:c,onMouseLeave:r,showFixedNumberOfWeeks:i}):null}function p(){return(0,H.jsx)(S1,{calendarType:a,...u})}let m=`react-calendar__month-view`;return(0,H.jsx)(`div`,{className:U(m,l?`${m}--weekNumbers`:``),children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-end`},children:[f(),(0,H.jsxs)(`div`,{style:{flexGrow:1,width:`100%`},children:[d(),p()]})]})})}var j1=`react-calendar__year-view__months__month`;function M1({classes:e=[],formatMonth:t=BQ,formatMonthYear:n=VQ,...r}){let{date:i,locale:a}=r;return(0,H.jsx)(d1,{...r,classes:[...e,j1],formatAbbr:n,maxDateTransform:y$,minDateTransform:g$,view:`year`,children:t(a,i)})}function N1(e){let{activeStartDate:t,hover:n,value:r,valueType:i,...a}=e,o=JQ(t);return(0,H.jsx)(u1,{className:`react-calendar__year-view__months`,dateTransform:e=>{let t=new Date;return t.setFullYear(o,e,1),g$(t)},dateType:`month`,end:11,hover:n,renderTile:({date:e,...n})=>(0,H.jsx)(M1,{...a,...n,activeStartDate:t,date:e},e.getTime()),start:0,value:r,valueType:i})}function P1(e){function t(){return(0,H.jsx)(N1,{...e})}return(0,H.jsx)(`div`,{className:`react-calendar__year-view`,children:t()})}var F1=`react-calendar`,I1=[`century`,`decade`,`year`,`month`],L1=[`decade`,`year`,`month`,`day`],R1=new Date;R1.setFullYear(1,0,1),R1.setHours(0,0,0,0);var z1=new Date(864e13);function B1(e){return e instanceof Date?e:new Date(e)}function V1(e,t){return I1.slice(I1.indexOf(e),I1.indexOf(t)+1)}function H1(e,t,n){return V1(t,n).indexOf(e)!==-1}function U1(e,t,n){return e&&H1(e,t,n)?e:n}function W1(e){return L1[I1.indexOf(e)]}function G1(e,t){let n=Array.isArray(e)?e[t]:e;if(!n)return null;let r=B1(n);if(Number.isNaN(r.getTime()))throw Error(`Invalid date: ${e}`);return r}function K1({value:e,minDate:t,maxDate:n,maxDetail:r},i){let a=G1(e,i);if(!a)return null;let o=W1(r);return r1((()=>{switch(i){case 0:return R$(o,a);case 1:return U$(o,a);default:throw Error(`Invalid index value: ${i}`)}})(),t,n)}var q1=e=>K1(e,0),J1=e=>K1(e,1),Y1=e=>[q1,J1].map(t=>t(e));function X1({maxDate:e,maxDetail:t,minDate:n,minDetail:r,value:i,view:a}){return R$(U1(a,r,t),q1({value:i,minDate:n,maxDate:e,maxDetail:t})||new Date)}function Z1({activeStartDate:e,defaultActiveStartDate:t,defaultValue:n,defaultView:r,maxDate:i,maxDetail:a,minDate:o,minDetail:s,value:c,view:l}){let u=U1(l,s,a),d=e||t;return d?R$(u,d):X1({maxDate:i,maxDetail:a,minDate:o,minDetail:s,value:c||n,view:l||r})}function Q1(e){return e&&(!Array.isArray(e)||e.length===1)}function $1(e,t){return e instanceof Date&&t instanceof Date&&e.getTime()===t.getTime()}var e0=(0,L.forwardRef)(function(e,t){let{activeStartDate:n,allowPartialRange:r,calendarType:i,className:a,"data-testid":o,defaultActiveStartDate:s,defaultValue:c,defaultView:l,formatDay:u,formatLongDate:d,formatMonth:f,formatMonthYear:p,formatShortWeekday:m,formatWeekday:h,formatYear:g,goToRangeStartOnSelect:_=!0,inputRef:v,locale:y,maxDate:b=z1,maxDetail:x=`month`,minDate:S=R1,minDetail:C=`century`,navigationAriaLabel:w,navigationAriaLive:T,navigationLabel:E,next2AriaLabel:D,next2Label:O,nextAriaLabel:ee,nextLabel:te,onActiveStartDateChange:k,onChange:A,onClickDay:j,onClickDecade:M,onClickMonth:ne,onClickWeekNumber:re,onClickYear:ie,onDrillDown:ae,onDrillUp:N,onViewChange:oe,prev2AriaLabel:se,prev2Label:ce,prevAriaLabel:P,prevLabel:le,returnValue:ue=`start`,selectRange:F,showDoubleView:I,showFixedNumberOfWeeks:de,showNavigation:fe=!0,showNeighboringCentury:pe,showNeighboringDecade:me,showNeighboringMonth:he=!0,showWeekNumbers:ge,tileClassName:_e,tileContent:ve,tileDisabled:ye,value:be,view:xe}=e,[R,z]=(0,L.useState)(s),[B,Se]=(0,L.useState)(null),[Ce,we]=(0,L.useState)(Array.isArray(c)?c.map(e=>e===null?null:B1(e)):c==null?null:B1(c)),[Te,Ee]=(0,L.useState)(l),De=n||R||Z1({activeStartDate:n,defaultActiveStartDate:s,defaultValue:c,defaultView:l,maxDate:b,maxDetail:x,minDate:S,minDetail:C,value:be,view:xe}),Oe=(()=>{let e=F&&Q1(Ce)||be===void 0?Ce:be;return e?Array.isArray(e)?e.map(e=>e===null?null:B1(e)):e===null?null:B1(e):null})(),ke=W1(x),Ae=U1(xe||Te,C,x),V=V1(C,x),je=F?B:null,Me=V.indexOf(Ae)<V.length-1,Ne=V.indexOf(Ae)>0,Pe=(0,L.useCallback)(e=>(()=>{switch(ue){case`start`:return q1;case`end`:return J1;case`range`:return Y1;default:throw Error(`Invalid returnValue.`)}})()({maxDate:b,maxDetail:x,minDate:S,value:e}),[b,x,S,ue]),Fe=(0,L.useCallback)((e,t)=>{z(e);let n={action:t,activeStartDate:e,value:Oe,view:Ae};k&&!$1(De,e)&&k(n)},[De,k,Oe,Ae]),Ie=(0,L.useCallback)((e,t)=>{let n=(()=>{switch(Ae){case`century`:return M;case`decade`:return ie;case`year`:return ne;case`month`:return j;default:throw Error(`Invalid view: ${Ae}.`)}})();n&&n(e,t)},[j,M,ne,ie,Ae]),Le=(0,L.useCallback)((e,t)=>{if(!Me)return;Ie(e,t);let n=V[V.indexOf(Ae)+1];if(!n)throw Error(`Attempted to drill down from the lowest view.`);z(e),Ee(n);let r={action:`drillDown`,activeStartDate:e,value:Oe,view:n};k&&!$1(De,e)&&k(r),oe&&Ae!==n&&oe(r),ae&&ae(r)},[De,Me,k,Ie,ae,oe,Oe,Ae,V]),Re=(0,L.useCallback)(()=>{if(!Ne)return;let e=V[V.indexOf(Ae)-1];if(!e)throw Error(`Attempted to drill up from the highest view.`);let t=R$(e,De);z(t),Ee(e);let n={action:`drillUp`,activeStartDate:t,value:Oe,view:e};k&&!$1(De,t)&&k(n),oe&&Ae!==e&&oe(n),N&&N(n)},[De,Ne,k,N,oe,Oe,Ae,V]),ze=(0,L.useCallback)((e,t)=>{let n=Oe;Ie(e,t);let i=F&&!Q1(n),a;if(F){if(i)a=R$(ke,e);else{if(!n)throw Error(`previousValue is required`);if(Array.isArray(n))throw Error(`previousValue must not be an array`);a=q$(ke,n,e)}}else a=Pe(e);let o=!F||i||_?X1({maxDate:b,maxDetail:x,minDate:S,minDetail:C,value:a,view:Ae}):null;t.persist(),z(o),we(a);let s={action:`onChange`,activeStartDate:o,value:a,view:Ae};if(k&&!$1(De,o)&&k(s),A){if(F){if(!Q1(a))A(a||null,t);else if(r){if(Array.isArray(a))throw Error(`value must not be an array`);A([a||null,null],t)}}else A(a||null,t)}},[De,r,Pe,_,b,x,S,C,k,A,Ie,F,Oe,ke,Ae]);function Be(e){Se(e)}function Ve(){Se(null)}(0,L.useImperativeHandle)(t,()=>({activeStartDate:De,drillDown:Le,drillUp:Re,onChange:ze,setActiveStartDate:Fe,value:Oe,view:Ae}),[De,Le,Re,ze,Fe,Oe,Ae]);function He(e){let t={activeStartDate:e?B$(Ae,De):R$(Ae,De),hover:je,locale:y,maxDate:b,minDate:S,onClick:Me?Le:ze,onMouseOver:F?Be:void 0,tileClassName:_e,tileContent:ve,tileDisabled:ye,value:Oe,valueType:ke};switch(Ae){case`century`:return(0,H.jsx)(h1,{formatYear:g,showNeighboringCentury:pe,...t});case`decade`:return(0,H.jsx)(y1,{formatYear:g,showNeighboringDecade:me,...t});case`year`:return(0,H.jsx)(P1,{formatMonth:f,formatMonthYear:p,...t});case`month`:return(0,H.jsx)(A1,{calendarType:i,formatDay:u,formatLongDate:d,formatShortWeekday:m,formatWeekday:h,onClickWeekNumber:re,onMouseLeave:F?Ve:void 0,showFixedNumberOfWeeks:de===void 0?I:de,showNeighboringMonth:he,showWeekNumbers:ge,...t});default:throw Error(`Invalid view: ${Ae}.`)}}function Ue(){return fe?(0,H.jsx)(e1,{activeStartDate:De,drillUp:Re,formatMonthYear:p,formatYear:g,locale:y,maxDate:b,minDate:S,navigationAriaLabel:w,navigationAriaLive:T,navigationLabel:E,next2AriaLabel:D,next2Label:O,nextAriaLabel:ee,nextLabel:te,prev2AriaLabel:se,prev2Label:ce,prevAriaLabel:P,prevLabel:le,setActiveStartDate:Fe,showDoubleView:I,view:Ae,views:V}):null}return(0,H.jsxs)(`div`,{className:U(F1,F&&(Array.isArray(Oe)?Oe:[Oe]).length===1&&`${F1}--selectRange`,I&&`${F1}--doubleView`,a),"data-testid":o,ref:v,children:[Ue(),(0,H.jsxs)(`div`,{className:`${F1}__viewContainer`,onBlur:F?Ve:void 0,onMouseLeave:F?Ve:void 0,children:[He(),I?He(!0):null]})]})}),t0=G(Z,{shouldForwardProp:e=>e!==`expand`})(({expand:e})=>({width:e?`100%`:void 0}));function n0({open:e}){let t=z(e);return(0,H.jsx)(X,{title:`Filter`,enterDelay:300,children:(0,H.jsx)(th,{onClick:()=>t(!0),size:`small`,children:(0,H.jsx)(Tre,{})})})}function r0(e){let t=e.copyToClipboardRows;return(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[e.columns.map(t=>(0,H.jsxs)(t0,{align:t.numeric?`right`:`left`,expand:t.expanded,sortDirection:e.sort.orderBy===t.id&&e.sort.order,children:[(0,H.jsx)(X,{title:`Sort`,placement:t.numeric?`bottom-end`:`bottom-start`,enterDelay:300,children:(0,H.jsx)($w,{active:e.sort.orderBy===t.id,direction:e.sort.order,onClick:()=>e.sort.handleRequestSort(t.id),children:t.label})}),t.openFilterDialog?(0,H.jsx)(n0,{open:t.openFilterDialog}):void 0]},t.id)),e.showDetailsCol?(0,H.jsx)(t0,{padding:`checkbox`,children:t?(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>m0(e.columns,t),size:`large`,children:(0,H.jsx)(bT,{})})}):void 0}):void 0]})})}var i0=new Intl.DateTimeFormat([],{year:`numeric`,month:`short`,day:`numeric`}),a0=new Intl.DateTimeFormat([],{year:`numeric`,month:`long`}),o0=G(e0)(({theme:e})=>({width:`350px`,"& .react-calendar__month-view__weekdays":{textAlign:`center`,textTransform:`uppercase`,fontWeight:`bold`},"& .react-calendar__tile":{textAlign:`center`,padding:`.75em .5em`,margin:0,border:0,background:`none`,outline:`none`,cursor:`pointer`,"&:hover":{backgroundColor:`rgb(230, 230, 230)`},"&--active":{backgroundColor:e.palette.primary.light,"&:hover":{backgroundColor:e.palette.primary.dark}}},"&.react-calendar--selectRange .react-calendar__tile--hover":{backgroundColor:`rgb(230, 230, 230)`}}));function s0(e){let[t,n]=(0,L.useState)(!1),r=e.zoom.current_date_zoom?e.zoom.current_date_zoom.start:e.zoom.default_date_range[0],i=QT(e.zoom.current_date_zoom?e.zoom.current_date_zoom.end:e.zoom.default_date_range[1],-1);function a(t){e.zoom.set_date_zoom_range({start:t[0],end:QT(t[1],1)}),n(!1)}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`span`,{children:[i0.format(e.zoom.current_date_zoom?.start??e.zoom.default_date_range[0]),` `,`- `,i0.format(e.zoom.current_date_zoom?.end??e.zoom.default_date_range[1])]}),(0,H.jsx)(X,{title:`Zoom To Date Range`,children:(0,H.jsx)(th,{onClick:()=>n(!0),size:`large`,children:(0,H.jsx)(HT,{})})}),(0,H.jsx)(X,{title:`Reset Date Range`,children:(0,H.jsx)(th,{onClick:()=>e.zoom.set_date_zoom_range(void 0),size:`large`,children:(0,H.jsx)(UT,{})})}),(0,H.jsxs)(py,{open:t,onClose:()=>n(!1),children:[(0,H.jsxs)(gy,{children:[`Select Date Range `,a0.format(e.zoom.default_date_range[0])]}),(0,H.jsx)(hy,{children:(0,H.jsx)(o0,{minDate:e.zoom.default_date_range[0],maxDate:e.zoom.default_date_range[1],calendarType:`gregory`,selectRange:!0,showNavigation:!1,showNeighboringMonth:!1,value:[r,i],onChange:e=>{Array.isArray(e)&&e[0]instanceof Date&&e[1]instanceof Date&&a([e[0],e[1]])}})}),(0,H.jsx)(my,{children:(0,H.jsx)(Y,{onClick:()=>n(!1),children:`Close`})})]})]})}var c0=(0,L.memo)(function({zoom:e,tpage:t,count:n}){let r;return e&&e.type===`Last30Days`?r=(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{title:`Last 24 hours`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(1),style:{color:`rgba(0, 0, 0, 0.54)`},children:`24h`})}),(0,H.jsx)(X,{title:`Last 2 days`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(2),style:{color:`rgba(0, 0, 0, 0.54)`},children:`2d`})}),(0,H.jsx)(X,{title:`Last 3 days`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(3),style:{color:`rgba(0, 0, 0, 0.54)`},children:`3d`})}),(0,H.jsx)(X,{title:`Last 4 days`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(4),style:{color:`rgba(0, 0, 0, 0.54)`},children:`4d`})}),(0,H.jsx)(X,{title:`Last 5 days`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(5),style:{color:`rgba(0, 0, 0, 0.54)`},children:`5d`})}),(0,H.jsx)(X,{title:`Last 6 days`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(6),style:{color:`rgba(0, 0, 0, 0.54)`},children:`6d`})}),(0,H.jsx)(X,{title:`Last 1 week`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(7),style:{color:`rgba(0, 0, 0, 0.54)`},children:`1w`})}),(0,H.jsx)(X,{title:`Last 2 weeks`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(14),style:{color:`rgba(0, 0, 0, 0.54)`},children:`2w`})}),(0,H.jsx)(X,{title:`Last 3 weeks`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(21),style:{color:`rgba(0, 0, 0, 0.54)`},children:`3w`})}),(0,H.jsx)(X,{title:`Last 30 days`,children:(0,H.jsx)(Y,{onClick:()=>e.set_days_back(null),style:{color:`rgba(0, 0, 0, 0.54)`},children:`30d`})})]}):e&&e.type===`ZoomIntoRange`?r=(0,H.jsx)(s0,{zoom:e}):e&&e.type===`ExtendDays`&&(r=(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{title:`Extend 1 day previous`,children:(0,H.jsx)(th,{onClick:()=>e.extend(-1),size:`large`,children:(0,H.jsx)(LT,{})})}),(0,H.jsx)(q,{variant:`caption`,children:e.curStart.toLocaleDateString()+` to `+e.curEnd.toLocaleDateString()}),(0,H.jsx)(X,{title:`Extend 1 day`,children:(0,H.jsx)(th,{onClick:()=>e.extend(1),size:`large`,children:(0,H.jsx)(IT,{})})})]})),(0,H.jsxs)(Jw,{children:[(0,H.jsx)(q,{color:`textSecondary`,variant:`caption`,children:`Rows per page:`}),(0,H.jsx)(xC,{style:{marginLeft:8,marginRight:`1em`},value:t.rowsPerPage,SelectDisplayProps:{style:{color:`rgba(0, 0, 0, 0.54)`}},input:(0,H.jsx)(Cf,{}),onChange:e=>{t.setRowsPerPage(e.target.value);let r=Math.ceil(n/e.target.value)-1;t.page>r&&t.setPage(r)},children:[10,15,20,50].map(e=>(0,H.jsx)(gS,{value:e,children:e},e))}),(0,H.jsx)(q,{color:`textSecondary`,variant:`caption`,children:`${n===0?0:t.page*t.rowsPerPage+1}-${Math.min(n,(t.page+1)*t.rowsPerPage)} of ${n}`}),(0,H.jsx)(th,{onClick:()=>t.setPage(0),disabled:t.page===0,"aria-label":`First Page`,size:`large`,children:(0,H.jsx)(_T,{})}),(0,H.jsx)(th,{onClick:()=>t.setPage(t.page-1),disabled:t.page===0,"aria-label":`Previous Page`,size:`large`,children:(0,H.jsx)(ST,{})}),(0,H.jsx)(th,{onClick:()=>t.setPage(t.page+1),disabled:t.page>=Math.ceil(n/t.rowsPerPage)-1,"aria-label":`Next Page`,size:`large`,children:(0,H.jsx)(CT,{})}),(0,H.jsx)(th,{onClick:()=>t.setPage(Math.max(0,Math.ceil(n/t.rowsPerPage)-1)),disabled:t.page>=Math.ceil(n/t.rowsPerPage)-1,"aria-label":`Last Page`,size:`large`,children:(0,H.jsx)(TT,{})}),e?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{style:{flexGrow:1}}),r]}):void 0]})}),l0=class extends L.PureComponent{render(){let e=this.props.onClickDetails,t=[...this.props.pageData],n=this.props.rowsPerPage===void 0?0:Math.max(0,this.props.rowsPerPage-t.length);return(0,H.jsxs)(Ww,{children:[t.map((t,n)=>(0,H.jsxs)(Zw,{children:[this.props.columns.map(e=>(0,H.jsx)(t0,{align:e.numeric?`right`:`left`,expand:e.expanded,children:e.Cell?(0,H.jsx)(e.Cell,{row:t}):e.getDisplay(t)},e.id)),e?(0,H.jsx)(t0,{padding:`checkbox`,children:(0,H.jsx)(th,{onClick:n=>e(n,t),size:`large`,children:(0,H.jsx)(DT,{})})}):void 0]},n)),n>0?(0,H.jsx)(Zw,{style:{height:53*n},children:(0,H.jsx)(Z,{colSpan:this.props.columns.length+ +!!this.props.onClickDetails,style:{textAlign:`center`},children:t.length===0?this.props.emptyMessage:void 0})}):void 0]})}};function u0(e){let[t,n]=(0,L.useState)(void 0);return(0,L.useMemo)(()=>{let r;return r=e.type===`Last30`?{type:`Last30Days`,set_days_back:e=>{if(e){let t=new Date;n({start:QT(t,-e),end:tE(t,1)})}else n(void 0)}}:{type:`ZoomIntoRange`,default_date_range:[e.month,$T(e.month,1)],current_date_zoom:t,set_date_zoom_range:n},{zoom:r,zoomRange:t}},[e,t,n])}function d0(){let[e,t]=(0,L.useState)(0),[n,r]=(0,L.useState)(10);return(0,L.useMemo)(()=>({page:e,setPage:t,rowsPerPage:n,setRowsPerPage:r}),[e,t,n,r])}function f0(e,t,n){let[r,i]=(0,L.useState)(e),[a,o]=(0,L.useState)(n??`asc`);return(0,L.useMemo)(()=>{function e(e){r===e?o(a===`asc`?`desc`:`asc`):(i(e),o(`asc`))}let n={asc:t[0].getForSort??t[0].getDisplay};for(let e of t)e.id===r&&a===`asc`?n={asc:e.getForSort??e.getDisplay}:e.id===r&&(n={desc:e.getForSort??e.getDisplay});return{orderBy:r,order:a,sortOn:n,handleRequestSort:e}},[r,i,a,o,t])}function p0(e,t){let n=`<table>
|
|
345
|
+
<thead><tr>`;for(let t of e)t.ignoreDuringExport||(n+=`<th>`+t.label+`</th>`);n+=`</tr></thead>
|
|
346
|
+
<tbody>
|
|
347
|
+
`;for(let r of t){n+=`<tr>`;for(let t of e)if(!t.ignoreDuringExport){let e=t.getForExport?t.getForExport(r):t.getDisplay(r);n+=`<td>`+e+`</td>`}n+=`</tr>
|
|
348
|
+
`}return n+=`</tbody>
|
|
349
|
+
</table>`,n}function m0(e,t){Hk(p0(e,t))}var h0=[{id:0,numeric:!1,label:`Date`,getDisplay:e=>e.time.toLocaleString(),getForSort:e=>e.time.getTime()},{id:1,numeric:!1,label:`Serial`,getDisplay:e=>e.serial||``},{id:2,numeric:!1,label:`Workorder`,getDisplay:e=>e.workorder||``},{id:3,numeric:!1,label:`Inspected`,getDisplay:e=>e.toInspect?`inspected`:``},{id:4,numeric:!1,label:`Failed`,getDisplay:e=>e.failed?`failed`:``}];function g0(e,t,n){let[r,i]=(0,L.useState)(void 0),a;return e&&e===`Last30Days`?a={type:`Last30Days`,set_days_back:e=>{if(e){let t=new Date;i({start:QT(t,-e),end:tE(t,1)})}else i(void 0)}}:e&&e===`ZoomIntoRange`?a={type:`ZoomIntoRange`,default_date_range:n,current_date_zoom:r,set_date_zoom_range:i}:e&&t&&e===`ExtendDays`&&(a={type:`ExtendDays`,curStart:n[0],curEnd:n[1],extend:t}),{zoom:a,zoomRange:r}}var _0=(0,L.memo)(function(e){let t=z(CI),n=f0(0,h0),[r,i]=(0,L.useState)(_O.empty()),[a,o]=(0,L.useState)(10),[s,c]=(0,L.useState)(void 0),l=g0(e.zoomType,e.extendDateRange,e.default_date_range),u=mZ(e.points,l.zoomRange,n.sortOn),d=Q.of(u).toSortedArray(([e])=>e);return(0,H.jsx)(`div`,{style:{width:`100%`,marginTop:`1em`},children:d.map(([u,d])=>{let f=Math.min(r.get(u)??0,Math.ceil(d.material.length/a));return(0,H.jsxs)(im,{expanded:u===s,onChange:(e,t)=>c(t?u:void 0),children:[(0,H.jsxs)(Mm,{expandIcon:(0,H.jsx)(hT,{}),children:[(0,H.jsx)(q,{variant:`h6`,style:{flexBasis:`33.33%`,flexShrink:0},children:u}),(0,H.jsxs)(q,{variant:`caption`,children:[d.material.length,` total parts, `,d.failedCnt,` failed`]})]}),(0,H.jsx)(cm,{children:(0,H.jsxs)(`div`,{style:{width:`100%`},children:[(0,H.jsxs)(Vw,{children:[(0,H.jsx)(r0,{columns:h0,sort:n,showDetailsCol:!0}),(0,H.jsx)(l0,{columns:h0,pageData:Q.of(d.material).drop(f*a).take(a),rowsPerPage:a,onClickDetails:e.hideOpenDetailColumn?void 0:(e,n)=>t({type:`MatSummary`,summary:{materialID:n.materialID,partName:n.partName,serial:n.serial,workorderId:n.workorder}})})]}),(0,H.jsx)(c0,{tpage:{page:f,rowsPerPage:a,setPage:e=>i(r.set(u,e)),setRowsPerPage:o},count:d.material.length,zoom:l.zoom})]})})]},u)})})}),v0=20,y0=20,b0=120,x0=20;function S0({link:e,path:t,strokeWidth:n,setTooltip:r}){let[i,a]=(0,L.useState)(!1);if(t===null)return null;function o(t){let n=hA(t);n!==null&&(r({left:n.x,top:n.y,data:e}),a(!0))}function s(){a(!1),r(null)}return(0,H.jsx)(`path`,{d:t,stroke:i?Pr[600]:Pr[300],strokeWidth:n,opacity:.2,fill:`none`,onMouseMove:o,onMouseLeave:s})}function C0({node:e}){return e.x1===void 0||e.x0===void 0||e.y1===void 0||e.y0===void 0?null:(0,H.jsxs)(`g`,{transform:`translate(${e.x0}, ${e.y0})`,children:[(0,H.jsx)(`rect`,{width:e.x1-e.x0,height:e.y1-e.y0,fill:Pr[800],opacity:.8,stroke:`none`}),(0,H.jsx)(`text`,{x:18,y:(e.y1-e.y0)/2,children:e.name})]})}var w0=(0,L.memo)(function({data:e,setTooltip:t,parentHeight:n,parentWidth:r}){let{nodes:i,links:a}=(0,L.useMemo)(()=>{let t=rQ(e);if(t.nodes.length===0)return{nodes:[],links:[]};let i=FZ().nodeWidth(10).nodePadding(10).nodeAlign(wZ).extent([[v0,y0],[r-b0,n-x0-y0]])({nodes:t.nodes,links:t.links});return{nodes:i.nodes,links:i.links.flatMap(e=>typeof e.source==`object`&&typeof e.target==`object`&&e.width!==void 0?[{...e,source:e.source,target:e.target,width:e.width}]:[])}},[e,r,n]),o=$Z();return(0,H.jsxs)(`svg`,{width:r,height:n,children:[(0,H.jsx)(`g`,{children:i.map((e,t)=>(0,H.jsx)(C0,{node:e},t))}),(0,H.jsx)(`g`,{children:a.map((e,n)=>(0,H.jsx)(S0,{link:e,path:o(e),strokeWidth:Math.max(e.width??1,1),setTooltip:t},n))})]})});function T0({tooltip:e}){return e===null?null:(0,H.jsxs)(`div`,{children:[e.data.source.name,` ➞ `,e.data.target.name,`: `,e.data.value,` parts`]})}var E0=(0,L.memo)(function({data:e}){let t=(0,L.useMemo)(()=>P(null),[]),n=z(t);return(0,H.jsx)(`div`,{style:{position:`relative`},children:(0,H.jsx)(OA,{sx:{height:{xs:`calc(100vh - 230px)`,md:`calc(100vh - 182px)`,xl:`calc(100vh - 130px)`},width:`100%`},chart:({height:t,width:r})=>(0,H.jsx)(w0,{data:e,setTooltip:n,parentHeight:t,parentWidth:r}),tooltipAtom:t,TooltipContent:T0})})}),D0=jO(e=>e(KI)?`aaa`:void 0),O0=jO(e=>e(KI)?`CMM`:void 0),k0=P(!1);function A0(e){let[t,n]=B(D0),[r,i]=B(O0),[a,o]=B(k0),s,c=e.restrictToPart||t;c&&r&&(s=e.inspectionlogs.get(new sL(c,r))?.valuesToLazySeq()??[]);let l=e.inspectionlogs.keysToLazySeq().map(e=>e.part).distinct().toSortedArray(e=>e),u=e.inspectionlogs.keysToLazySeq().map(e=>e.inspType).distinct().toSortedArray(e=>e);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[e.subtitle?(0,H.jsx)(q,{variant:`subtitle1`,children:e.subtitle}):void 0,(0,H.jsx)(J,{sx:{flexGrow:1}}),e.onlyTable?void 0:(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,value:a?`table`:`sankey`,onChange:e=>o(e.target.value===`table`),children:[(0,H.jsx)(gS,{value:`sankey`,children:`Sankey`},`sankey`),(0,H.jsx)(gS,{value:`table`,children:`Table`},`table`)]})}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{name:`inspection-sankey-select-type`,autoWidth:!0,displayEmpty:!0,style:{marginRight:`1em`,marginLeft:`1em`},value:r||``,onChange:e=>i(e.target.value),children:[r?void 0:(0,H.jsx)(gS,{value:``,children:(0,H.jsx)(`em`,{children:`Select Inspection Type`})},0),u.map(e=>(0,H.jsx)(gS,{value:e,children:e},e))]})}),e.restrictToPart===void 0?(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{name:`inspection-sankey-select-part`,autoWidth:!0,displayEmpty:!0,value:c||``,onChange:e=>n(e.target.value),children:[c?void 0:(0,H.jsx)(gS,{value:``,children:(0,H.jsx)(`em`,{children:`Select Part`})},0),l.map(e=>(0,H.jsx)(gS,{value:e,children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(tW,{part:e,size:30}),(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})]})},e))]})}):void 0,s?(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{onClick:()=>s?vZ(c||``,r||``,s):void 0,style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(bT,{})})}):void 0]}),(0,H.jsx)(`main`,{children:s?a||e.onlyTable?(0,H.jsx)(_0,{zoomType:e.zoomType,points:s,default_date_range:e.default_date_range,extendDateRange:e.extendDateRange,hideOpenDetailColumn:e.hideOpenDetailColumn}):(0,H.jsx)(E0,{data:s}):void 0})]})}var j0=P(null),M0=FO(P(async(e,{signal:t})=>{let n=e(j0);if(n==null||Wt===void 0)return _O.empty();let r=await Wt.get(n.curStart,n.curEnd,t);return Q.of(r).flatMap(fL).filter(e=>e.key.part===n.part).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry)}),e=>e??_O.empty()),N0=FO(P(async e=>{let t=e(j0);if(t==null)return _O.empty();let n=[];for(let e of qt)n.push(await e.get(t.curStart,t.curEnd));return Q.of(n).flatMap(e=>e).flatMap(fL).filter(e=>e.key.part===t.part).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry)}),e=>e??_O.empty()),P0=P(e=>_O.union((e,t)=>e.union(t),e(M0),e(N0)));function F0(e){return t=>t===null?null:e<0?{curStart:QT(t.curStart,e),curEnd:t.curEnd,part:t.part}:{curStart:t.curStart,curEnd:QT(t.curEnd,e),part:t.part}}var I0=[{id:0,numeric:!1,label:`Date`,getDisplay:e=>e.time.toLocaleString(),getForSort:e=>e.time.getTime()},{id:1,numeric:!1,label:`Part`,getDisplay:e=>e.part},{id:2,numeric:!1,label:`Inspection`,getDisplay:e=>e.inspType},{id:3,numeric:!1,label:`Serial`,getDisplay:e=>e.serial||``},{id:4,numeric:!1,label:`Workorder`,getDisplay:e=>e.workorder||``}];function L0(e){let t=JI(),n=f0(0,I0),r=d0(),i=z(CI),a=Math.min(r.page,Math.ceil(e.failed.length/r.rowsPerPage)),o=Q.of(e.failed).sortBy(n.sortOn);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(Vw,{children:[(0,H.jsx)(r0,{columns:I0,sort:n,showDetailsCol:!t}),(0,H.jsx)(l0,{columns:I0,pageData:o.drop(a*r.rowsPerPage).take(r.rowsPerPage),rowsPerPage:r.rowsPerPage,onClickDetails:t?void 0:(e,t)=>{i({type:`MatSummary`,summary:{materialID:t.materialID,partName:t.part,serial:t.serial,workorderId:t.workorder}})}})]}),(0,H.jsx)(c0,{tpage:{...r,page:a},count:e.failed.length})]})}function R0(){let e=R(lL),t=(0,L.useMemo)(()=>{let t=xE();return hZ(Q.of(e).flatMap(([,e])=>e.valuesToLazySeq()),QT(t,-4),QT(t,1))},[e]);return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(q,{variant:`subtitle1`,children:`Inspections marked as failed in the last 5 days`}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>bZ(t),size:`large`,children:(0,H.jsx)(bT,{})})})]}),(0,H.jsx)(L0,{failed:t})]})}function z0(){let e=JI(),t=z(CI),[n,r]=(0,L.useState)(e?`00000000i9`:``),[i,a]=(0,L.useState)(!1),[o,s]=(0,L.useState)(null);function c(){n&&n!==``&&(a(!0),s(null),Wt.materialForSerial(n).then(e=>{let i=Q.of(e).maxBy(e=>e.materialID);i?(t({type:`MatDetails`,details:i}),r(``),s(null)):s(`No material found with serial `+n)}).catch(e=>{Bt.isApiException(e)?s(e.response):e instanceof Error?s(e.message):s(e)}).finally(()=>a(!1)))}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(uw,{direction:`row`,spacing:2,sx:{alignItems:`center`,marginLeft:`auto`,marginRight:`auto`},children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(nT,{label:n===``?`Serial`:`Serial (press enter)`,value:n,onChange:e=>r(e.target.value),onKeyPress:e=>{e.key===`Enter`&&n!==``&&(e.preventDefault(),c())}})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(Y,{variant:`contained`,color:`secondary`,disabled:n===``||i,onClick:c,children:i?(0,H.jsxs)(uw,{direction:`row`,spacing:2,children:[(0,H.jsx)(Ym,{}),` Searching`]}):(0,H.jsx)(H.Fragment,{children:`Lookup`})})})]}),o&&o!==``?(0,H.jsx)(`div`,{children:o}):void 0]})}function B0(e){let t=e[0];if(t===void 0)return xE();let n=t.endUTC;for(let t of e)t.type===V.MachineCycle&&(n=t.endUTC);return n}function V0(){let e=R(DI),t=R(PI);return e?(0,H.jsx)(bW,{partName:e.partName,serial:e.serial,subtitle:`Path `+pZ(gZ(t))+` at `+B0(t).toLocaleString()}):(0,H.jsx)(`div`,{children:`Serial Details`})}function H0({setStep:e}){let t=R(DI),n=R(PI),r=z(j0),i=z(CI);return(0,H.jsxs)(uw,{direction:`row`,spacing:2,sx:{mt:`2em`},children:[t?(0,H.jsx)(Y,{variant:`contained`,color:`secondary`,onClick:()=>{let i=B0(n);r({part:t?.partName??``,curStart:sE(QT(i,-5)),curEnd:_E(QT(i,5))}),e(2)},children:`Lookup Similar Paths`}):void 0,(0,H.jsx)(Y,{variant:`contained`,style:{marginLeft:`2em`},onClick:()=>{i(null),r(null),e(0)},children:`Reset`})]})}function U0(e){let t=R(EI),n=R(PI),[r,i]=B(j0),a=R(P0),o=z(CI);if(t===null)return null;function s(e){i(F0(e))}return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(A0,{inspectionlogs:a,restrictToPart:t.partName,subtitle:`Paths for `+t.partName+` around `+B0(n).toLocaleString(),default_date_range:r?[r.curStart,r.curEnd]:[],zoomType:r?`ExtendDays`:void 0,extendDateRange:s,hideOpenDetailColumn:!0,onlyTable:!0}),(0,H.jsx)(Y,{variant:`contained`,style:{marginTop:`2em`},onClick:()=>{o(null),i(null),e.setStep(0)},children:`Reset`})]})}function W0(){let[e,t]=(0,L.useState)(0),n=R(CI),r=e;return r===0&&n&&(r=1),(0,H.jsxs)(uw,{direction:`column`,spacing:2,children:[(0,H.jsxs)(Xte,{activeStep:r,orientation:`horizontal`,children:[(0,H.jsx)(_w,{children:(0,H.jsx)(Mw,{children:`Select Material`})}),(0,H.jsx)(_w,{children:(0,H.jsx)(Mw,{children:(0,H.jsx)(V0,{})})}),(0,H.jsx)(_w,{children:(0,H.jsx)(Mw,{children:`Lookup similar paths`})})]}),r===0?(0,H.jsxs)(uw,{direction:`column`,spacing:4,children:[(0,H.jsx)(q,{children:`Enter a serial number, scan a barcode, or click on a material in the table below to see details.`}),(0,H.jsx)(z0,{}),(0,H.jsx)(R0,{})]}):r===1?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(WU,{fallback:(0,H.jsx)(OW,{}),children:(0,H.jsx)(EW,{})}),(0,H.jsx)(H0,{setStep:t})]}):r===2?(0,H.jsx)(WU,{children:(0,H.jsx)(U0,{setStep:t})}):void 0]})}function G0(){return YI(`Quality Material`),(0,H.jsx)(`main`,{style:{padding:`24px`},children:(0,H.jsx)(W0,{})})}var K0=(0,L.memo)(function(){YI(`Paths`);let e=R(lL),t=(0,L.useMemo)(()=>{let t=xE(),n=QT(t,-6),r=QT(t,1);return e.collectValues(e=>{let t=e.filter(e=>e.time>=n&&e.time<=r);return t.size===0?null:t})},[e]);return(0,H.jsx)(A0,{inspectionlogs:t,default_date_range:[QT(xE(),-6),QT(xE(),1)],subtitle:`Paths from the last 7 days`})}),q0=P(!1);function J0(e){let t=``;return e.comments&&e.comments.length>0&&(t=`; `+e.comments[e.comments.length-1].comment),`Due ${e.dueDate.toLocaleDateString()}; Completed ${e.completedQuantity} of ${e.plannedQuantity}${t}`}function Y0({work:e}){return e.plannedQuantity<=e.completedQuantity?(0,H.jsx)(lT,{}):(0,H.jsx)(FT,{})}function X0(){let[e,t]=(0,L.useState)(null),n=R(EI),[r]=zI(),i=z(q0);return(0,H.jsx)(nT,{sx:{mt:`5px`},label:e===null||e===``?`Workorder`:`Workorder (press enter)`,value:e??``,onChange:e=>t(e.target.value),onKeyPress:t=>{t.key===`Enter`&&n&&e&&e!==``&&(t.preventDefault(),r(n,e),i(!1))}})}function Z0(){let e=R(EI),t=R(Lie),n=z(q0),[r]=zI();return(0,H.jsx)(Vb,{children:(t??[]).map(t=>(0,H.jsx)(tx,{children:(0,H.jsxs)(Kb,{onClick:()=>{e&&r(e,t.workorderId),n(!1)},children:[(0,H.jsx)(ox,{children:(0,H.jsx)(Y0,{work:t})}),(0,H.jsx)(dx,{primary:t.workorderId,secondary:J0(t)})]})},t.workorderId))})}var Q0=(0,L.memo)(function(){let[e,t]=B(q0),n;return n=e?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(gy,{children:`Select Workorder`}),(0,H.jsx)(hy,{children:(0,H.jsxs)(WU,{children:[(0,H.jsx)(X0,{}),(0,H.jsx)(Z0,{})]})}),(0,H.jsx)(my,{children:(0,H.jsx)(Y,{onClick:()=>t(!1),color:`primary`,children:`Cancel`})})]}):(0,H.jsx)(`p`,{children:`None`}),(0,H.jsx)(py,{open:e,onClose:()=>t(!1),maxWidth:`md`,children:n})}),$0=P(!1);function e2(){let[e,t]=(0,L.useState)(null),n=R(EI),[r]=LI(),i=z($0);return(0,H.jsx)(nT,{sx:{mt:`5px`},label:e===``||e===null?`Inspection Type`:`Inspection Type (press enter)`,value:e??``,onChange:e=>t(e.target.value),onKeyPress:t=>{t.key===`Enter`&&n&&e&&e!==``&&(t.preventDefault(),r({mat:n,inspType:e,inspect:!0}),i(!1))}})}function t2(){let e=R(EI),[t]=LI(),n=R(NL),r=Q.of(n).sortBy(e=>e),i=z($0);return e===null?null:(0,H.jsx)(Vb,{children:r.map(n=>(0,H.jsx)(tx,{children:(0,H.jsxs)(Kb,{onClick:()=>{t({mat:e,inspType:n,inspect:!0}),i(!1)},children:[(0,H.jsx)(ox,{children:(0,H.jsx)(NT,{})}),(0,H.jsx)(dx,{primary:n})]})},n))})}function n2(){let e=z($0),t=R(kI);return t===null||t.materialID<0?null:(0,H.jsx)(Y,{color:`primary`,onClick:()=>e(!0),children:`Signal Inspection`})}var r2=(0,L.memo)(function(){let[e,t]=B($0),n;return n=e?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(gy,{children:`Select Inspection Type`}),(0,H.jsx)(hy,{children:(0,H.jsxs)(WU,{children:[(0,H.jsx)(e2,{}),(0,H.jsx)(t2,{})]})}),(0,H.jsx)(my,{children:(0,H.jsx)(Y,{onClick:()=>t(!1),color:`primary`,children:`Cancel`})})]}):(0,H.jsx)(`p`,{children:`None`}),(0,H.jsx)(py,{open:e,onClose:()=>t(!1),maxWidth:`md`,children:n})}),i2=function(e){return e[e.Material=0]=`Material`,e[e.FreeMaterialZone=1]=`FreeMaterialZone`,e[e.CompletedCollapsedMaterialZone=2]=`CompletedCollapsedMaterialZone`,e[e.CompletedExpandedMaterialZone=3]=`CompletedExpandedMaterialZone`,e[e.PalletFaceZone=4]=`PalletFaceZone`,e[e.QueueZone=5]=`QueueZone`,e[e.BasketZone=6]=`BasketZone`,e[e.BasketSlotZone=7]=`BasketSlotZone`,e}({});function a2(e){switch(e.type){case 0:return`Material-`+(e.identifier??(e.material?.materialID??-1).toString());case 1:return`FreeMaterialZone`;case 2:return`CompletedCollapsedMaterialZone`;case 3:return`CompletedExpandedMaterialZone`;case 4:return`PalletFaceZone-`+e.face.toString();case 5:return`QueueZone-`+e.queue;case 6:return`BasketZone-`+e.basketId.toString();case 7:return`BasketSlotZone-${e.basketId}-${e.slot}`}}function o2(e){switch(e.type){case 0:return[e.type,e.material,e.identifier];case 1:case 2:case 3:return[e.type,null];case 4:return[e.type,e.face];case 5:return[e.type,e.queue];case 6:return[e.type,e.basketId];case 7:return[e.type,e.basketId,e.slot]}}function s2(e){let t,n,r=new Map,i=new Map,a=new Map,o=new Map,s=[];for(let c of e.values())switch(c.type){case 1:t=c.elem;break;case 2:case 3:n=c.elem;break;case 4:r.set(c.face,c.elem);break;case 5:i.set(c.queue,c.elem);break;case 6:a.set(c.basketId,c.elem);break;case 7:o.set(`${c.basketId}:${c.slot}`,c.elem);break;case 0:c.material&&s.push([c.elem,c.material])}return{freeMaterial:t,completedMaterial:n,faces:r,queues:i,baskets:a,basketSlots:o,material:s}}function c2(e,t){if(!e)return[];let n=s2(t);if(!n.completedMaterial)return[];let r=[],i=new Map,a=new Map,o=new Map,s=0;for(let[t,c]of Q.of(n.material).sortBy(([e])=>e.left,([e])=>e.top))switch(c.action.type){case ot.UnloadToCompletedMaterial:case ot.UnloadToInProcess:if(c.action.unloadToBasketId){let i=n.baskets.get(c.action.unloadToBasketId),a=o.get(c.action.unloadToBasketId)??0;o.set(c.action.unloadToBasketId,a+1),r.push({fromX:t.left,fromY:t.top+t.height/2,toX:i===void 0?e.left+2:i.right-5,toY:i===void 0?t.top+t.height/2:i.top+20*(a+1),curveDirection:1})}else if(c.action.type===ot.UnloadToCompletedMaterial&&(!c.action.unloadIntoQueue||c.action.unloadIntoQueue===``))r.push({fromX:t.right,fromY:t.top+t.height/2,toY:t.top+t.height/2,toX:n.completedMaterial?n.completedMaterial.left+2:e.right-10,curveDirection:1});else{let i,o;c.action.unloadIntoQueue?(i=n.queues.get(c.action.unloadIntoQueue),o=a.get(c.action.unloadIntoQueue)??0,a.set(c.action.unloadIntoQueue,o+1)):(i=n.freeMaterial,o=s,s+=1),r.push({fromX:t.left,fromY:t.top+t.height/2,toX:i===void 0?e.left+2:i.right-5,toY:i===void 0?t.top+t.height/2:i.top+20*(o+1),curveDirection:1})}break;case ot.Loading:if(c.action.loadFromBasketId&&c.action.loadOntoFace){let e=n.faces.get(c.action.loadOntoFace);if(e!==void 0){let n=i.get(c.action.loadOntoFace)??0;i.set(c.action.loadOntoFace,n+1),r.push({fromX:t.right,fromY:t.top+t.height/2,toX:e.left+20,toY:e.top+50+20*n,curveDirection:-1})}}else if(c.action.loadFromBasketId){let i=n.baskets.get(c.action.loadFromBasketId),a=o.get(c.action.loadFromBasketId)??0;o.set(c.action.loadFromBasketId,a+1),r.push({fromX:t.right,fromY:t.top+t.height/2,toX:i===void 0?e.right-10:i.left+20,toY:i===void 0?t.top+t.height/2:i.top+50+20*a,curveDirection:-1})}else if(c.action.loadOntoFace){if(c.location.type===it.OnPallet){if(c.location.palletNum===c.action.loadOntoPalletNum&&c.location.face===c.action.loadOntoFace)r.push({fromX:t.right,fromY:t.top+t.height*3/4,toX:t.left+t.width*7/8,toY:t.bottom,curveDirection:-1});else{let e=n.faces.get(c.action.loadOntoFace);e&&(c.action.loadOntoFace<(c.location.face??0)?r.push({fromX:t.left,fromY:t.top+t.height/2,toX:t.left,toY:e.bottom+20,curveDirection:-1}):r.push({fromX:t.left,fromY:t.top+t.height/2,toX:t.left,toY:e.top-20,curveDirection:1}))}}else{let e=n.faces.get(c.action.loadOntoFace);if(e!==void 0){let n=i.get(c.action.loadOntoFace)??0;i.set(c.action.loadOntoFace,n+1),r.push({fromX:t.right,fromY:t.top+t.height/2,toX:e.left+20,toY:e.top+50+20*n,curveDirection:-1})}}}break;case ot.LoadingToBasket:{let i=c.action.loadToBasketId;if(i===void 0)break;let a=c.action.loadToBasketSlot===void 0?n.baskets.get(i):n.basketSlots.get(`${i}:${c.action.loadToBasketSlot}`)??n.baskets.get(i),s=o.get(i)??0;o.set(i,s+1),r.push({fromX:t.right,fromY:t.top+t.height/2,toX:a===void 0?e.right-10:a.left+20,toY:a===void 0?t.top+t.height/2:a.top+50+20*s,curveDirection:-1});break}}return r.map(t=>({fromX:t.fromX-e.left,fromY:t.fromY-e.top,toX:t.toX-e.left,toY:t.toY-e.top,curveDirection:t.curveDirection}))}function l2(e){let t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,width:t.width,height:t.height,bottom:t.bottom+window.scrollY,right:t.right+window.scrollX}}function u2(e){let t=(e.fromX+e.toX)/2,n=(e.fromY+e.toY)/2,r=Math.atan2(e.toY-e.fromY,e.toX-e.fromX)+Math.PI*e.curveDirection/2,i=t+50*Math.cos(r),a=n+50*Math.sin(r);return`M${e.fromX},${e.fromY} Q ${i} ${a} ${e.toX} ${e.toY}`}var d2=(0,L.memo)(function({container:e,arrowsWithRefs:t}){let[,n]=(0,L.useState)({height:window.innerHeight,width:window.innerWidth});(0,L.useEffect)(()=>{function e(){n({height:window.innerHeight,width:window.innerWidth})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[n]);let r=c2(e.current?l2(e.current):null,t.collectValues(e=>e.elem.current?{...e,elem:l2(e.elem.current)}:null));return(0,H.jsx)(`g`,{children:r.map((e,t)=>(0,H.jsx)(`path`,{style:{fill:`none`,stroke:`rgba(0,0,0,0.15)`,strokeWidth:2},d:u2(e),markerEnd:`url(#arrow)`},t))})}),f2=(0,L.createContext)(void 0),p2=(0,L.memo)(function({children:e,hideArrows:t,whiteBackground:n}){let r=(0,L.useRef)(null),[i,a]=(0,L.useState)(_O.empty()),o=(0,L.useMemo)(()=>({registerNode(e,t,n){a(t&&n?r=>r.set(e,{...t,elem:n}):t=>t.delete(e))}}),[a]);return(0,H.jsxs)(`div`,{style:{position:`relative`},children:[(0,H.jsxs)(`svg`,{style:{position:`absolute`,pointerEvents:`none`,width:`100%`,height:`100%`,top:0,right:0,zIndex:-1,backgroundColor:n?`white`:`#F8F8F8`},children:[(0,H.jsx)(`defs`,{children:(0,H.jsx)(`marker`,{id:`arrow`,markerWidth:6,markerHeight:10,refX:`0`,refY:`3`,orient:`auto`,markerUnits:`strokeWidth`,children:(0,H.jsx)(`path`,{d:`M0,0 L0,6 L5,3 z`,fill:`rgba(0,0,0,0.15)`})})}),t?void 0:(0,H.jsx)(d2,{container:r,arrowsWithRefs:i})]}),(0,H.jsx)(`div`,{ref:r,children:(0,H.jsx)(f2.Provider,{value:o,children:e})})]})});function m2(e){let t=(0,L.useContext)(f2);if(!t)throw Error(`useMoveMaterialArrowRef must be used within a MoveMaterialArrowContainer`);let n=(0,L.useRef)(null);return(0,L.useEffect)(()=>{let r=a2(e);return t.registerNode(r,e,n),()=>{t.registerNode(r,null,null)}},[t,...o2(e)]),n}function h2({kind:e,children:t}){let n=m2(e);return(0,H.jsx)(`div`,{ref:n,"data-move-material-identifier":a2(e),children:t})}var g2=45,_2=55;function v2(){let e=R(zO),t=R(bO),n=R(br),r=Q.of(e.material).filter(e=>e.location.type===it.OnPallet||e.action.type===ot.Loading).toRLookup(e=>e.location.palletNum??e.action.loadOntoPalletNum??0),i=Q.of(e.material).filter(e=>e.location.type===it.InBasket&&e.location.basketId!==null&&e.location.basketId!==void 0||e.action.type===ot.LoadingToBasket&&e.action.loadToBasketId!==null&&e.action.loadToBasketId!==void 0).toRLookup(e=>e.location.basketId??e.action.loadToBasketId??0),a=Q.ofObject(e.pallets).filter(([,e])=>e.currentPalletLocation.loc===tt.LoadUnload).toOrderedMap(([,e])=>[e.currentPalletLocation.num,{lulNum:e.currentPalletLocation.num,pal:{pallet:e,mats:r.get(e.palletNum)??[]},basket:null,staging:[],sources:[]}]),o=Q.ofObject(e.pallets).filter(([,e])=>e.currentPalletLocation.loc===tt.Machine||e.currentPalletLocation.loc===tt.MachineQueue).map(([,e])=>e).groupBy(e=>e.currentPalletLocation.group,e=>e.currentPalletLocation.num).toLookupOrderedMap(([[e,t],n])=>e,([[e,t],n])=>t,([[t,n],i])=>{let a=i.find(e=>e.currentPalletLocation.loc===tt.Machine),o=a?r.get(a.palletNum)??[]:null,s=i.find(e=>e.currentPalletLocation.loc===tt.MachineQueue),c=s?r.get(s.palletNum)??[]:null,l=!0,u=c?.[0];if(u&&u.lastCompletedMachiningRouteStopIndex!==null&&u.lastCompletedMachiningRouteStopIndex!==void 0){let r=e.jobs[u.jobUnique]?.procsAndPaths?.[u.process-1]?.paths?.[u.path-1]?.stops?.[u.lastCompletedMachiningRouteStopIndex];r.stationGroup===t&&r.stationNums.includes(n)&&(l=!1)}return l?{name:t+` `+n.toString(),inbound:s?{pallet:s,mats:c??[]}:null,worktable:a?{pallet:a,mats:o??[]}:null,outbound:null}:{name:t+` `+n.toString(),inbound:null,worktable:a?{pallet:a,mats:o??[]}:null,outbound:s?{pallet:s,mats:c??[]}:null}}),s=Q.ofObject(e.pallets).filter(([,e])=>e.currentPalletLocation.loc===tt.Buffer||e.currentPalletLocation.loc===tt.Cart).collect(([,e])=>{let t=r.get(e.palletNum);return!t||t.length===0?null:{pallet:e,mats:t}}).toOrderedMap(e=>[e.pallet.palletNum,e]),c=1,l=1,u=QT(new Date,-7),d=t.valuesToLazySeq().filter(e=>e.routeEndUTC>u).concat(Q.ofObject(e.jobs).map(([,e])=>e)).flatMap(e=>e.procsAndPaths).toRArray();for(let e of d)for(let t of(e.basketLoadStations??[]).concat(e.basketUnloadStations??[]))c=Math.max(c,t);let f=Q.of(d).flatMap(e=>e.paths);for(let e of f){for(let t of e.load.concat(e.unload))c=Math.max(c,t);e.face&&(l=Math.max(l,e.face));for(let t of e.stops)o=o.alter(t.stationGroup,e=>{e??=pO.empty();for(let n of t.stationNums)e=e.alter(n,e=>e||{name:t.stationGroup+` `+n.toString(),inbound:null,worktable:null,outbound:null});return e})}for(let e=1;e<=c;e++)a=a.alter(e,t=>t||{lulNum:e,pal:null,basket:null,staging:[],sources:[]});for(let t of Object.values(e.pallets))l=Math.max(l,t.numFaces);for(let t of e.material)t.location.face!==null&&t.location.face!==void 0&&(l=Math.max(l,t.location.face));let p=pO.empty();if(e.machineLocations&&e.machineLocations.length>0)for(let t of e.machineLocations){o=o.alter(t.machineGroup,e=>{if(!e||t.machineNum===void 0)return e;let n=e.delete(t.machineNum);if(n.size!==0)return n});for(let n of t.possibleLoadStations){let r;a=a.alter(n,e=>{r=e});let i=Q.of(r?.pal?.mats??[]).toLookup(n=>{if(n.action.type===ot.Machining)return`Machining`;if(n.action.type!==ot.Waiting)return`Loading`;if(n.lastCompletedMachiningRouteStopIndex!==null&&n.lastCompletedMachiningRouteStopIndex!==void 0){let r=e.jobs[n.jobUnique]?.procsAndPaths?.[n.process-1]?.paths?.[n.path-1]?.stops?.[n.lastCompletedMachiningRouteStopIndex];if(!r||r.stationGroup===t.machineGroup&&r.stationNums.includes(t.machineNum))return`Loading`}return`Ready`}),o={lulNum:n,machineMoving:t.moving,machineCurrentlyAtLoad:n===t.currentLoadStation?{group:t.machineGroup,num:t.machineNum}:null,readyMats:i.get(`Ready`)??[],machiningMats:i.get(`Machining`)??[],loadingMats:i.get(`Loading`)??[]};p=p.set(n,o)}}let m=new Map,h=new Map,g=new Map,_=0,v=0;for(let t of Q.ofObject(e.baskets??{}).map(([,e])=>e).sortBy(e=>e.basketId)){let e={basket:t,mats:i.get(t.basketId)??[]},n=t.position;if(n===void 0){g.set(t.basketId,e);continue}switch(n.location){case vt.Storage:e.mats.length>0?v+=1:_+=1;break;case vt.LoadUnload:case vt.LoadStationStaging:{let r=n.locationNum;if(r===null){g.set(t.basketId,e);break}let i=n.location===vt.LoadUnload?h:m,a=i.get(r)??[];a.push(e),i.set(r,a);break}case vt.InTransit:g.set(t.basketId,e)}}return a=a.mapValues(e=>{let t=new Map,r=Q.of(e.pal?.mats??e.basket?.mats??[]).filter(e=>e.location.type!==it.OnPallet).toRArray();for(let e of r){if(e.location.type===it.Free){let n=`free`,r=t.get(n)??{label:`To Load`,mats:[]};r.mats.push(e),t.set(n,r);continue}if(e.action.loadFromBasketId!==null&&e.action.loadFromBasketId!==void 0){let r=`basket:${e.action.loadFromBasketId}`,i=t.get(r)??{label:`From ${dk(n.basketName)} ${e.action.loadFromBasketId}`,mats:[]};i.mats.push(e),t.set(r,i);continue}if(e.location.type===it.InQueue&&e.location.currentQueue){let n=`queue:${e.location.currentQueue}`,r=t.get(n)??{label:`From ${e.location.currentQueue}`,mats:[]};r.mats.push(e),t.set(n,r)}}let i=Q.of(h.get(e.lulNum)??[]).sortBy(e=>e.basket.position?.locationNum??0).toRArray();for(let e of i.slice(1))g.set(e.basket.basketId,e);let a=new Set(Q.of(e.pal?.mats??[]).collect(e=>e.action.loadFromBasketId??null).toRArray()),o=Q.of(m.get(e.lulNum)??[]).filter(e=>!a.has(e.basket.basketId)).sortBy(e=>e.basket.position?.locationNum??0).toRArray(),s=Q.of(t).map(([e,t])=>({key:e,label:t.label,mats:t.mats})).sortBy(e=>e.label).toRArray();return{...e,basket:i[0]??null,staging:o,sources:s}}),{machines:o.mapValues(e=>e.valuesToAscLazySeq().toRArray()),loads:a.valuesToAscLazySeq().toRArray(),stockerPals:s.valuesToAscLazySeq().toRArray(),floatingBaskets:Q.of(g.values()).toRArray(),storageBaskets:_+v>0?{empty:_,filled:v}:null,machineAtLoad:p.valuesToAscLazySeq().toRArray(),maxNumFacesOnPallet:l,maxNumStagingRows:a.valuesToAscLazySeq().map(e=>e.staging.length).maxBy(e=>e)??0,maxNumSourceRows:a.valuesToAscLazySeq().map(e=>e.sources.length).maxBy(e=>e)??0}}function y2({mats:e}){let[t,n]=(0,L.useState)(!1),r=(0,L.useRef)(null),[i,a]=(0,L.useState)(null),o=z(CI),s=R(zO);function c(){r.current!==null&&(clearTimeout(r.current),r.current=null),n(!0)}function l(){r.current=setTimeout(()=>{n(!1),r.current=null},200)}function u(t){e.length===1?o({type:`MatDetails`,details:e[0]}):a(t.currentTarget)}function d(e,t){return t==null?null:(e!=null&&e!=null?s.pallets[e]?.faceNames?.[t-1]:null)??`Face: `+t.toString()}return(0,H.jsxs)(J,{sx:{width:g2,height:g2,overflow:`visible`},children:[(0,H.jsx)(Qp,{elevation:4,onPointerEnter:c,onPointerLeave:l,sx:{position:`relative`,zIndex:t?10:0,width:`max-content`,height:`max-content`},children:(0,H.jsx)(cv,{badgeContent:e.length>1?e.length:0,color:`secondary`,children:(0,H.jsx)(Em,{focusRipple:!0,onClick:u,children:(0,H.jsx)(Xp,{orientation:`horizontal`,in:t,collapsedSize:g2,children:(0,H.jsxs)(J,{sx:{display:`flex`},children:[(0,H.jsx)(tW,{part:e[0].partName,size:g2}),(0,H.jsx)(J,{sx:{marginLeft:`10px`,marginRight:`10px`,whiteSpace:`nowrap`,textAlign:`left`},children:(0,H.jsx)(Xp,{in:t,collapsedSize:g2,children:(0,H.jsxs)(uw,{direction:`column`,sx:{marginBottom:`0.2em`},children:[(0,H.jsxs)(q,{variant:`h6`,children:[e[0].partName,`-`,e[0].process]}),(0,H.jsx)(`div`,{children:(0,H.jsx)(`small`,{children:d(e[0].location.palletNum,e[0].location.face)??d(e[0].action.loadOntoPalletNum,e[0].action.loadOntoFace)})}),Q.of(e).collect(e=>e.serial?(0,H.jsx)(`div`,{children:(0,H.jsxs)(`small`,{children:[`Serial: `,e.serial]})},e.materialID):void 0),(0,H.jsx)(`div`,{children:(0,H.jsx)(lW,{mat:e[0]})})]})})})]})})})})}),(0,H.jsx)(fS,{anchorEl:i,open:!!i,onClose:()=>a(null),anchorOrigin:{vertical:`top`,horizontal:`left`},children:Q.of(e).map((e,t)=>(0,H.jsx)(gS,{onClick:()=>{a(null),o({type:`MatDetails`,details:e})},children:e.serial&&e.serial!==``?e.serial:(t+1).toString()},e.materialID))})]})}function b2({maxNumFaces:e,mats:t,loadingOntoPallet:n,noFilter:r,showExpanded:i}){if(i&&e===1)return(0,H.jsx)(J,{sx:{display:`flex`,flexDirection:`column`,flexWrap:`wrap`},children:t.map(e=>(0,H.jsx)(gW,{mat:e},e.materialID))});{let i=n?Q.of(t).filter(e=>r||e.location.type!==it.OnPallet).orderedGroupBy(e=>e.action.loadOntoFace??1):Q.of(t).filter(e=>r||e.location.type===it.OnPallet).orderedGroupBy(e=>e.action.type===ot.Loading?e.action.loadOntoFace??1:e.location.face??1);return(0,H.jsx)(J,{sx:{display:`grid`,gridTemplateRows:`${g2}px`,gridTemplateColumns:`repeat(${e}, ${g2}px)`,columnGap:`5px`,height:`100%`,alignContent:`center`,justifyContent:`center`},children:i.map(([e,t])=>(0,H.jsx)(J,{sx:{gridColumn:e,gridRow:1},children:(0,H.jsx)(y2,{mats:t})},e))})}}function x2({mats:e}){let t=Q.of(e).orderedGroupBy(e=>e.location.basketSlot??0);return(0,H.jsx)(J,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`flex-start`,alignItems:`flex-start`,gap:`5px`,minHeight:`${g2}px`,paddingLeft:`5px`,paddingRight:`5px`,height:`100%`,alignContent:`center`},children:t.map(([e,t])=>(0,H.jsx)(J,{children:(0,H.jsx)(y2,{mats:t})},e))})}function S2({mats:e,maxNumFaces:t}){return(0,H.jsx)(J,{sx:{minHeight:`${_2}px`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`,paddingLeft:`5px`,gap:`5px`,paddingRight:`5px`},children:(0,H.jsx)(b2,{mats:e,maxNumFaces:t,loadingOntoPallet:!0})})}function C2(e,t){let n=g2*e+5*(e+1);return t?`60px ${Math.max(n,100)}px`:`${Math.max(n,100)}px`}function w2(e){e=Math.round(e);let t=Math.abs(e)%60,n=Math.floor(Math.abs(e)/60),r=n%60,i=Math.floor(n/60);return i>0?`${e<0?`-`:``}${i}:${r.toString().padStart(2,`0`)}:${t.toString().padStart(2,`0`)}`:`${e<0?`-`:``}${r}:${t.toString().padStart(2,`0`)}`}function T2(e){let t=e?.find(e=>e.action.type===ot.Machining),n=t?.action?.elapsedMachiningTime,r=t?.action.expectedRemainingMachiningTime,i=R(zO).timeOfCurrentStatusUTC,a=R(BO),o=null;r&&(o=UO(r)-(a-Math.floor(i.getTime()/1e3)));let s=null;return n&&(s=UO(n)+(a-Math.floor(i.getTime()/1e3))),o!==null&&s!==null?[!0,`${w2(s)} / ${w2(o)}`,o<0?-1:s/(s+o)*100]:o===null?s===null?[!!t,`Idle`,null]:[!0,w2(s),null]:[!0,` / `+w2(o),o<0?-1:null]}function E2({machine:e}){let[t,n,r]=T2(e.worktable?.mats);return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(q,{variant:`h5`,children:e.name}),(0,H.jsx)(q,{variant:`subtitle1`,children:n}),t?r===null?(0,H.jsx)(kb,{}):r<0?(0,H.jsx)(kb,{color:`error`}):(0,H.jsx)(kb,{variant:`determinate`,value:r}):void 0]})}function D2({maxNumFaces:e,machine:t}){return(0,H.jsxs)(J,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto ${_2}px ${_2}px ${_2}px`,gridTemplateColumns:C2(e,!0),gridTemplateAreas:`"machname machname" "inboundpal inboundmat" "worktablepal worktablemat" "outboundpal outboundmat"`},children:[(0,H.jsx)(J,{sx:{gridArea:`machname`,padding:`0.2em`,borderBottom:`1px solid black`},children:(0,H.jsx)(E2,{machine:t})}),(0,H.jsx)(J,{sx:{gridArea:`inboundpal`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`},children:(0,H.jsxs)(uw,{children:[(0,H.jsx)(q,{variant:`body1`,sx:{textAlign:`center`},children:`In`}),t.inbound?(0,H.jsx)(q,{variant:`h6`,sx:{textAlign:`center`},children:t.inbound.pallet.palletNum}):void 0]})}),(0,H.jsx)(J,{sx:{gridArea:`inboundmat`,borderBottom:`1px solid black`},children:t.inbound?(0,H.jsx)(b2,{mats:t.inbound.mats,maxNumFaces:e}):void 0}),(0,H.jsx)(J,{sx:{gridArea:`worktablepal`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`},children:(0,H.jsxs)(uw,{children:[(0,H.jsx)(q,{variant:`body1`,sx:{textAlign:`center`},children:`Work`}),t.worktable?(0,H.jsx)(q,{variant:`h6`,sx:{textAlign:`center`},children:t.worktable.pallet.palletNum}):void 0]})}),(0,H.jsx)(J,{sx:{gridArea:`worktablemat`,borderBottom:`1px solid black`},children:t.worktable?(0,H.jsx)(b2,{mats:t.worktable.mats,maxNumFaces:e}):void 0}),(0,H.jsx)(J,{sx:{gridArea:`outboundpal`,borderRight:`1px solid black`,padding:`2px`},children:(0,H.jsxs)(uw,{children:[(0,H.jsx)(q,{variant:`body1`,sx:{textAlign:`center`},children:`Out`}),t.outbound?(0,H.jsx)(q,{variant:`h6`,sx:{textAlign:`center`},children:t.outbound.pallet.palletNum}):void 0]})}),(0,H.jsx)(J,{sx:{gridArea:`outboundmat`},children:t.outbound?(0,H.jsx)(b2,{mats:t.outbound.mats,maxNumFaces:e}):void 0})]})}function O2(e){let t=(e?.find(e=>e.action.type===ot.Loading||e.action.type===ot.LoadingToBasket||e.action.type===ot.UnloadToCompletedMaterial||e.action.type===ot.UnloadToInProcess))?.action?.elapsedLoadUnloadTime,n=R(zO).timeOfCurrentStatusUTC,r=R(BO),i=null;return t&&(i=UO(t)+(r-Math.floor(n.getTime()/1e3))),i===null?`Idle`:w2(i)}function k2({load:e}){let t=O2(e.pal?.mats??e.basket?.mats),n=R(br);return(0,H.jsxs)(J,{sx:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`},children:[(0,H.jsx)(q,{variant:`h5`,children:ck(e.lulNum,n.loadStationNames)}),(0,H.jsx)(q,{variant:`body1`,children:t})]})}function A2({maxNumFaces:e,maxNumStagingRows:t,maxNumSourceRows:n,load:r}){let i=dk(R(br).basketName),a=r.pal?`Pallet`:r.basket?i:null,o=r.pal?r.pal.pallet.palletNum.toString():r.basket?r.basket.basket.basketId.toString():null,s=Math.max(1,n),c=Math.max(1,t),l=Array.from({length:s},(e,t)=>`"source${t} sourcemat${t}"`),u=Array.from({length:c},(e,t)=>`"stage${t} stagemat${t}"`),d=[`"lulname lulname"`,...l,`"current currentmat"`,...u].join(` `),f=s+1+c;return(0,H.jsxs)(J,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto repeat(${f}, ${_2}px)`,gridTemplateColumns:C2(e,!0),gridTemplateAreas:d},children:[(0,H.jsx)(J,{sx:{gridArea:`lulname`,padding:`0.2em`,borderBottom:`1px solid black`},children:(0,H.jsx)(k2,{load:r})}),Array.from({length:s},(t,n)=>{let i=r.sources[n]??null;return(0,H.jsxs)(L.Fragment,{children:[(0,H.jsx)(J,{sx:{gridArea:`source${n}`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:i?(0,H.jsx)(q,{variant:`body2`,sx:{textAlign:`center`},children:i.label}):void 0}),(0,H.jsx)(J,{sx:{gridArea:`sourcemat${n}`,borderBottom:`1px solid black`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:i?(0,H.jsx)(S2,{mats:i.mats,maxNumFaces:e}):void 0})]},`source-${n}`)}),(0,H.jsx)(J,{sx:{gridArea:`current`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,H.jsxs)(uw,{children:[a?(0,H.jsx)(q,{variant:`body1`,sx:{textAlign:`center`},children:a}):void 0,o?(0,H.jsx)(q,{variant:`h6`,sx:{textAlign:`center`},children:o}):void 0]})}),(0,H.jsxs)(J,{sx:{gridArea:`currentmat`,display:`flex`,flexDirection:`column`,justifyContent:`center`,borderBottom:`1px solid black`},children:[r.pal?(0,H.jsx)(b2,{mats:r.pal.mats,maxNumFaces:e}):void 0,!r.pal&&r.basket?(0,H.jsx)(x2,{mats:r.basket.mats}):void 0]}),Array.from({length:c},(e,t)=>{let n=r.staging[t]??null,a=t===c-1;return(0,H.jsxs)(L.Fragment,{children:[(0,H.jsx)(J,{sx:{gridArea:`stage${t}`,borderRight:`1px solid black`,...a?{}:{borderBottom:`1px solid black`},padding:`2px`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:n?(0,H.jsxs)(q,{variant:`body2`,sx:{textAlign:`center`},children:[`Staging `,i,` `,n.basket.basketId]}):void 0}),(0,H.jsx)(J,{sx:{gridArea:`stagemat${t}`,...a?{}:{borderBottom:`1px solid black`},display:`flex`,flexDirection:`column`,justifyContent:`center`},children:n?(0,H.jsx)(x2,{mats:n.mats}):void 0})]},`stage-${t}`)})]})}function j2({status:e}){let t=O2(e.loadingMats),[n,r,i]=T2(e.machiningMats);return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(q,{variant:`h5`,children:[`Station `,e.lulNum]}),e.machineCurrentlyAtLoad?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(q,{variant:`h5`,children:[e.machineCurrentlyAtLoad.group,` `,e.machineCurrentlyAtLoad.num]}),(0,H.jsx)(q,{variant:`subtitle1`,children:r===`Idle`?t:r}),n?i===null?(0,H.jsx)(kb,{}):i<0?(0,H.jsx)(kb,{color:`error`}):(0,H.jsx)(kb,{variant:`determinate`,value:i}):void 0]}):(0,H.jsxs)(H.Fragment,{children:[e.machineMoving?(0,H.jsx)(q,{variant:`subtitle2`,children:`Machine Moving`}):void 0,(0,H.jsxs)(q,{variant:`subtitle1`,children:[`Loading `,t]})]})]})}function M2({maxNumFaces:e,status:t}){return(0,H.jsxs)(J,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`minmax(104px, max-content) repeat(3, ${e>1?_2.toString()+`px`:`minmax(110px, max-content)`})`,gridTemplateColumns:e===1?`60px minmax(230px, max-content)`:C2(e,!0),gridTemplateAreas:`"name name" "ready readymat" "machining machiningmat" "loadstation loadstationmat"`},children:[(0,H.jsx)(J,{sx:{gridArea:`name`,padding:`0.2em`,borderBottom:`1px solid black`},children:(0,H.jsx)(j2,{status:t})}),(0,H.jsx)(J,{sx:{gridArea:`ready`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`},children:(0,H.jsx)(q,{variant:`body1`,sx:{textAlign:`center`},children:`Ready`})}),(0,H.jsx)(J,{sx:{gridArea:`readymat`,borderBottom:`1px solid black`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:(0,H.jsx)(b2,{mats:t.readyMats,maxNumFaces:e,showExpanded:!0})}),(0,H.jsx)(J,{sx:{gridArea:`machining`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`},children:(0,H.jsx)(q,{variant:`body1`,sx:{textAlign:`center`},children:`Work`})}),(0,H.jsx)(J,{sx:{gridArea:`machiningmat`,borderBottom:`1px solid black`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:(0,H.jsx)(b2,{mats:t.machiningMats,maxNumFaces:e,showExpanded:!0})}),(0,H.jsx)(J,{sx:{gridArea:`loadstation`,borderRight:`1px solid black`,padding:`2px`},children:(0,H.jsxs)(uw,{children:[(0,H.jsx)(q,{variant:`body1`,sx:{textAlign:`center`},children:`Load`}),(0,H.jsx)(q,{variant:`body1`,sx:{textAlign:`center`},children:`Station`})]})}),(0,H.jsx)(J,{sx:{gridArea:`loadstationmat`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:(0,H.jsx)(b2,{mats:t.loadingMats,maxNumFaces:e,showExpanded:!0,noFilter:!0})})]})}function N2({maxNumFaces:e,pallet:t}){return(0,H.jsxs)(J,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto ${_2}px`,gridTemplateColumns:C2(e,!1),gridTemplateAreas:`"palname" "palmat"`},children:[(0,H.jsxs)(q,{variant:`h5`,sx:{gridArea:`palname`,padding:`0.2em`,borderBottom:`1px solid black`},children:[`Pallet `,t.pallet.palletNum]}),(0,H.jsx)(J,{sx:{gridArea:`palmat`},children:(0,H.jsx)(b2,{mats:t.mats,maxNumFaces:e})})]})}function P2({basket:e}){let t=dk(R(br).basketName);return(0,H.jsxs)(J,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto ${_2}px`,gridTemplateColumns:`minmax(120px, max-content)`,gridTemplateAreas:`"basketname" "basketmat"`},children:[(0,H.jsxs)(q,{variant:`h5`,sx:{gridArea:`basketname`,padding:`0.2em`,borderBottom:`1px solid black`},children:[t,` `,e.basket.basketId]}),(0,H.jsx)(J,{sx:{gridArea:`basketmat`},children:(0,H.jsx)(x2,{mats:e.mats})})]})}function F2({empty:e,filled:t}){let n=dk(R(br).basketName);return(0,H.jsxs)(J,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,padding:`0.5em 1em`,alignContent:`center`,minWidth:`170px`},children:[(0,H.jsxs)(q,{variant:`h5`,children:[n,` Storage`]}),(0,H.jsxs)(q,{variant:`body1`,children:[`Empty: `,e]}),(0,H.jsxs)(q,{variant:`body1`,children:[`Filled: `,t]})]})}var I2=(0,L.memo)(function({overview:e}){return(0,H.jsxs)(`div`,{children:[e.machines.toAscLazySeq().map(([t,n])=>(0,H.jsx)(J,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:n.map(t=>(0,H.jsx)(D2,{machine:t,maxNumFaces:e.maxNumFacesOnPallet},t.name))},t)),e.loads.length>0?(0,H.jsx)(J,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:e.loads.map(t=>(0,H.jsx)(A2,{load:t,maxNumFaces:e.maxNumFacesOnPallet,maxNumStagingRows:e.maxNumStagingRows,maxNumSourceRows:e.maxNumSourceRows},t.lulNum))}):void 0,e.machineAtLoad.length>0?(0,H.jsx)(J,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:e.machineAtLoad.map(t=>(0,H.jsx)(M2,{status:t,maxNumFaces:e.maxNumFacesOnPallet},t.lulNum))}):void 0,e.stockerPals.length>0||e.floatingBaskets.length>0||e.storageBaskets?(0,H.jsxs)(J,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:[e.stockerPals.map(t=>(0,H.jsx)(N2,{pallet:t,maxNumFaces:e.maxNumFacesOnPallet},t.pallet.palletNum)),e.floatingBaskets.map(e=>(0,H.jsx)(P2,{basket:e},e.basket.basketId)),e.storageBaskets?(0,H.jsx)(F2,{empty:e.storageBaskets.empty,filled:e.storageBaskets.filled}):void 0]}):void 0]})}),L2=(0,L.memo)(function({ignoreOperator:e}){let[t,n]=(0,L.useState)(null);function r(){n(null)}return(0,H.jsx)(AW,{onClose:r,allowNote:!0,highlightProcsGreaterOrEqualTo:t?.process??void 0,extraDialogElements:(0,H.jsx)(H.Fragment,{children:t===null?null:(0,H.jsx)(mX,{st:t,setState:n})}),buttons:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(lX,{ignoreOperator:e}),(0,H.jsx)(uX,{onClose:r,ignoreOperator:e}),(0,H.jsx)(n2,{}),(0,H.jsx)(hX,{st:t,setState:n,onClose:r,ignoreOperator:e})]})})});function R2({ignoreOperator:e,whiteBackground:t}){YI(`System Overview`);let n=v2();return(0,H.jsxs)(`main`,{style:{padding:`10px`,minHeight:`calc(100vh - 64px)`,backgroundColor:t?`white`:`#F8F8F8`},children:[(0,H.jsx)(I2,{overview:n}),(0,H.jsx)(L2,{ignoreOperator:e}),(0,H.jsx)(r2,{})]})}var z2=30;function B2({machine:e}){let t=zd(),[,,n]=T2(e.worktable?.mats);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`rect`,{x:3,y:3,width:24,height:24,stroke:`black`}),`;`,(0,H.jsx)(`rect`,{x:3,y:3,width:24,height:8,fill:e.inbound===null?`white`:t.palette.secondary.main}),(0,H.jsx)(`rect`,{x:3,y:11,width:24,height:8,fill:e.worktable===null?`white`:n!=null&&n<0?t.palette.error.main:t.palette.secondary.main}),(0,H.jsx)(`rect`,{x:3,y:19,width:24,height:8,fill:e.outbound===null?`white`:t.palette.secondary.main})]})}function V2({load:e}){let t=zd();return(0,H.jsx)(`polygon`,{points:`3,27 27,27 15,3`,fill:e.pal===null&&e.basket===null&&e.staging.length===0?`white`:t.palette.secondary.main,stroke:`black`})}function H2({status:e}){let t=zd(),[,,n]=T2(e.machiningMats);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`rect`,{x:3,y:3,width:24,height:24,stroke:`black`}),`;`,(0,H.jsx)(`rect`,{x:3,y:3,width:24,height:8,fill:e.readyMats.length===0?`white`:t.palette.secondary.main}),(0,H.jsx)(`rect`,{x:3,y:11,width:24,height:8,fill:e.machiningMats.length===0?`white`:n!=null&&n<0?t.palette.error.main:t.palette.secondary.main}),(0,H.jsx)(`rect`,{x:3,y:19,width:24,height:8,fill:e.loadingMats.length===0?`white`:t.palette.secondary.main})]})}var U2=(0,L.memo)(function({overview:e}){let t=e.machines.toAscLazySeq().sumBy(([,e])=>e.length);return(0,H.jsx)(J,{sx:{height:`1.5em`,"&:hover":{backgroundColor:`primary.light`}},children:(0,H.jsxs)(`svg`,{viewBox:`0 0 ${(t+e.loads.length+e.machineAtLoad.length)*z2} ${z2}`,preserveAspectRatio:`none`,width:`140px`,height:`1.5em`,children:[(0,H.jsx)(`g`,{children:e.machines.toAscLazySeq().flatMap(([,e])=>e).map((e,t)=>(0,H.jsx)(`g`,{transform:`translate(${t*z2})`,children:(0,H.jsx)(B2,{machine:e})},e.name))}),(0,H.jsx)(`g`,{transform:`translate(${t*z2})`,children:e.loads.map((e,t)=>(0,H.jsx)(`g`,{transform:`translate(${t*z2})`,children:(0,H.jsx)(V2,{load:e})},e.lulNum))}),(0,H.jsx)(`g`,{transform:`translate(${(t+e.loads.length)*z2})`,children:e.machineAtLoad.map((e,t)=>(0,H.jsx)(`g`,{transform:`translate(${t*z2})`,children:(0,H.jsx)(H2,{status:e})},e.lulNum))})]})})}),W2=(0,L.memo)(function({full:e}){let[t,n]=(0,L.useState)(!1),r=v2();return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Y,{onClick:()=>n(!0),children:(0,H.jsx)(U2,{overview:r})}),(0,H.jsxs)(py,{open:t,onClose:()=>n(!1),maxWidth:`xl`,fullScreen:e,children:[e?(0,H.jsx)(Ch,{sx:{position:`relative`},children:(0,H.jsxs)(Jw,{children:[(0,H.jsx)(th,{edge:`start`,color:`inherit`,onClick:()=>n(!1),"aria-label":`close`,children:(0,H.jsx)(vre,{})}),(0,H.jsx)(q,{sx:{ml:2,flex:1},variant:`h6`,component:`div`,children:`System Overview`})]})}):void 0,(0,H.jsx)(hy,{children:(0,H.jsx)(J,{sx:{paddingBottom:`2em`,paddingLeft:`5em`,paddingRight:`5em`},children:(0,H.jsx)(I2,{overview:r})})})]})]})});function G2(e){return Number.isInteger(e)&&(e??0)>0}function K2(e){return typeof e==`string`&&e.trim()!==``}function q2(e,t){if(e.location.type===it.InBasket&&e.location.basketId===t&&(e.action.type===ot.UnloadToInProcess||e.action.type===ot.UnloadToCompletedMaterial))return G2(e.location.basketSlot)?{type:`valid`,workId:e.action.workId}:{type:`invalid`};if(e.action.type===ot.LoadingToBasket){if(!G2(e.action.loadToBasketId))return{type:`invalid`};if(e.action.loadToBasketId!==t)return;let n=e.location.type===it.InBasket&&e.location.basketId===t&&e.location.basketSlot===e.action.loadToBasketSlot;return!G2(e.action.loadToBasketSlot)||!n&&e.location.type!==it.Free&&(e.location.type!==it.InQueue||!K2(e.location.currentQueue))?{type:`invalid`}:{type:`valid`,workId:e.action.workId}}}function J2(e,t){let n=Q.of(e).collect(e=>q2(e,t.basketId)).toRArray();if(n.some(e=>e.type===`invalid`))return{type:`inconsistent`};let r=n.filter(e=>e.type===`valid`),i=t.loadStationWork;if(i!==void 0){if(!i||!K2(i.workId)||typeof i.readyToConfirm!=`boolean`)return{type:`inconsistent`};let n=i.awaitingMaterialSlots??[];if(!Array.isArray(n)||!n.every(G2)||new Set(n).size!==n.length||i.readyToConfirm&&n.length>0||r.some(e=>e.workId!==i.workId))return{type:`inconsistent`};let a=i.type===gt.ConfirmEmptyBasket;if(a){if(r.length>0||n.length>0||e.some(e=>e.location.type===it.InBasket&&e.location.basketId===t.basketId))return{type:`inconsistent`}}else if(i.type!==gt.Material||i.readyToConfirm&&r.length===0)return{type:`inconsistent`};return{type:`active`,work:{workId:i.workId,ready:i.readyToConfirm,confirmEmpty:a,awaitingSlots:n}}}if(r.length===0)return{type:`none`};let a=r.filter(e=>K2(e.workId)),o=Q.of(a).toHashSet(({workId:e})=>e);return a.length!==r.length||o.size!==1?{type:`inconsistent`}:{type:`active`,work:{workId:a[0].workId,ready:!0,confirmEmpty:!1,awaitingSlots:[]}}}function Y2(e){return e.location.type===it.InBasket&&e.location.basketId===e.action.loadToBasketId&&e.location.basketSlot===e.action.loadToBasketSlot?`Unload, re-plate, and reload this slot`:e.location.type===it.InQueue&&e.location.currentQueue?`Load from ${e.location.currentQueue}`:`Load from raw material`}function X2({material:e,fsize:t}){return e.map(e=>(0,H.jsx)(h2,{kind:{type:i2.Material,material:e},children:(0,H.jsx)(gW,{mat:e,fsize:t})},e.materialID))}function Z2({stationNumber:e,basket:t,material:n,fsize:r,submitCommand:i}){let[a,o]=(0,L.useState)(),s=(0,L.useMemo)(()=>J2(n,t),[t,n]),c=t.loadStationWork?.confirmationBlockedReason?.trim(),l=s.type===`active`?s.work:void 0,u=a!==void 0&&a.workId===l?.workId&&(a.state!==`conflict`||a.basket===t&&a.material===n)?a.state:`idle`,d=(0,L.useMemo)(()=>Q.of(n).filter(e=>e.location.type===it.InBasket&&e.location.basketId===t.basketId&&e.location.basketSlot!==void 0).groupBy(e=>e.location.basketSlot??0).toHashMap(e=>e),[t,n]),f=(0,L.useMemo)(()=>Q.of(n).filter(e=>e.action.type===ot.LoadingToBasket&&e.action.loadToBasketId===t.basketId&&e.action.loadToBasketSlot!==void 0).groupBy(e=>e.action.loadToBasketSlot??0).toHashMap(e=>e),[t,n]),p=(0,L.useMemo)(()=>Q.of(t.emptySlots??[]).concat(t.unknownSlots??[]).concat(d.keysToLazySeq()).concat(f.keysToLazySeq()).distinctBy(e=>e).toSortedArray(e=>e),[t.emptySlots,t.unknownSlots,d,f]);async function m(){if(l===void 0||!l.ready||i===void 0)return;let r=l.workId,a={workId:r,basket:t,material:n,state:`submitting`};o(a);try{let t=await i(e,{workId:r});o(e=>e===a?{...a,state:t}:e)}catch{o(e=>e===a?{...a,state:`error`}:e)}}let h=!l?.ready||u===`submitting`||u===`accepted`||u===`conflict`;return(0,H.jsxs)(uw,{spacing:2,sx:{mt:2},children:[(0,H.jsx)(q,{variant:`h6`,children:`Basket slots`}),(0,H.jsx)(J,{sx:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(15em, 1fr))`,gap:2},children:p.map(e=>{let n=d.get(e)??[],i=f.get(e)??[],a=t.unknownSlots?.includes(e)===!0;return(0,H.jsx)(h2,{kind:{type:i2.BasketSlotZone,basketId:t.basketId,slot:e},children:(0,H.jsxs)(J,{component:`section`,"data-testid":`basket-load-station-slot-${e}`,sx:{border:`1px solid`,borderColor:`text.primary`,p:2},children:[(0,H.jsxs)(q,{variant:`h6`,children:[`Slot `,uk(e)]}),n.length>0?(0,H.jsx)(X2,{material:n,fsize:r}):(0,H.jsx)(q,{color:a?`warning.main`:`text.secondary`,children:a?`Unknown`:`Empty`}),i.map((e,t)=>(0,H.jsxs)(J,{sx:{mt:1},children:[(0,H.jsx)(q,{children:Y2(e)}),(0,H.jsxs)(q,{variant:`body2`,color:`text.secondary`,children:[e.partName,` · Process `,e.action.processAfterLoad??e.process]})]},`${e.jobUnique}-${e.process}-${t}`))]})},e)})}),l?.confirmEmpty&&(0,H.jsxs)(q,{children:[`Confirm basket `,t.basketId,` is empty.`]}),l&&!l.ready&&(0,H.jsx)(ph,{severity:`info`,children:c||(l.awaitingSlots.length>0?`Waiting for material for slots ${l.awaitingSlots.map(uk).join(`, `)}.`:`Basket work is not ready for confirmation.`)}),l&&i?(0,H.jsx)(J,{sx:{display:`flex`,justifyContent:`flex-end`},children:(0,H.jsx)(Y,{variant:`contained`,disabled:h,onClick:()=>void m(),children:`Confirm`})}):l?(0,H.jsx)(ph,{severity:`warning`,children:`Basket work confirmation is not configured.`}):s.type===`inconsistent`?(0,H.jsx)(ph,{severity:`warning`,children:`Basket work is inconsistent. Wait for refreshed material actions before confirming.`}):null,u===`accepted`?(0,H.jsx)(ph,{severity:`success`,children:`Confirmation accepted. Waiting for refreshed work.`}):u===`conflict`?(0,H.jsx)(ph,{severity:`warning`,children:`Basket work changed before confirmation. Review the refreshed slots and try again.`}):u===`error`?(0,H.jsx)(ph,{severity:`error`,children:`Unable to confirm basket work. No work was assumed complete.`}):null]})}function Q2(e,t){let n=new Set(e.map(e=>e.instructionId));return e.find(e=>e.basketId!==void 0&&e.destination.location===vt.LoadUnload&&e.destination.locationNum===t&&(e.prerequisiteInstructionId===void 0||!n.has(e.prerequisiteInstructionId)))}function $2({stationNumber:e,instruction:t,receipt:n}){return[e,t.instructionId,n?.status??`pending`,n?.receipt.observationId??``].join(`:`)}function e4(e){return(0,H.jsx)(t4,{...e},$2(e))}function t4({stationNumber:e,basketName:t,instruction:n,submitCommand:r,submitCorrection:i,receipt:a,onAccepted:o,onCorrected:s}){let c=(0,L.useRef)(!0),[l,u]=(0,L.useState)(!1),[d,f]=(0,L.useState)(``),[p,m]=(0,L.useState)(),[h,g]=(0,L.useState)(!1),[_,v]=(0,L.useState)();(0,L.useEffect)(()=>(c.current=!0,()=>{c.current=!1}),[]);let y=n.basketId;if(y===void 0)return(0,H.jsx)(ph,{severity:`warning`,children:`This tracked basket must be handled through the recovery workflow.`});async function b(t){if(r!==void 0){m({state:`submitting`,command:t});try{let i=await r(e,t);if(!c.current)return;i===`conflict`?m({state:i,command:t}):(m({state:`accepted`,command:t,receipt:i}),o?.({stationNumber:e,instruction:n,command:t,receipt:i,status:`recorded`}))}catch(e){if(!c.current)return;m({state:`error`,command:t,message:e instanceof Error?e.message:`Unable to record basket arrival`})}}}async function x(t){if(i!==void 0&&w!==void 0){v({state:`submitting`,command:t});try{let n=await i(e,t);if(!c.current)return;v({state:n,command:t}),n===`accepted`&&s?.(t)}catch{if(!c.current)return;v({state:`error`,command:t})}}}function S(e){return{commandId:crypto.randomUUID(),instructionId:n.instructionId,observedBasketId:e}}let C=Number(d),w=a?.status===`retracted`?void 0:a?.command??(p?.state===`accepted`&&p.command.instructionId===n.instructionId?p.command:void 0),T=a?.status===`retracted`?void 0:a?.receipt.observationId??(p?.state===`accepted`?p.receipt.observationId:void 0);function E(e){return{correctionId:crypto.randomUUID(),targetObservationId:T??``,replacementBasketId:e,replacementObservationId:e===null?null:crypto.randomUUID()}}let D=Number.isInteger(C)&&C>0&&C!==(w?.observedBasketId??y),O=r===void 0||w!==void 0||p!==void 0&&p.state!==`error`,ee=a?.status===`retracted`?`Arrival observation retracted.`:a?.status===`corrected`?`Arrival corrected to ${t.toLocaleLowerCase()} ${a.command.observedBasketId}.`:`Arrival recorded. Waiting for updated status.`;return(0,H.jsx)(Qp,{component:`section`,elevation:2,sx:{margin:1,padding:2},children:(0,H.jsxs)(uw,{spacing:2,children:[(0,H.jsxs)(J,{children:[(0,H.jsx)(q,{variant:`overline`,children:a===void 0?`Basket arrival`:`Basket arrival receipt`}),(0,H.jsx)(q,{variant:`h4`,children:a?.status===`retracted`?`Retracted basket arrival`:a===void 0?`Bring ${t.toLocaleLowerCase()} ${y} to this station`:`${t} ${a.command.observedBasketId} at this station`}),a===void 0?(0,H.jsx)(q,{children:`Record arrival after the basket is physically in place.`}):null]}),a===void 0?(0,H.jsxs)(uw,{direction:{xs:`column`,sm:`row`},spacing:1,children:[(0,H.jsx)(Y,{disabled:O,onClick:()=>void b(S(y)),size:`large`,variant:`contained`,children:p?.state===`submitting`?`Recording arrival…`:`${t} ${y} arrived`}),(0,H.jsxs)(Y,{disabled:O,onClick:()=>u(e=>!e),size:`large`,variant:`outlined`,children:[`Different `,t.toLocaleLowerCase()]})]}):null,a===void 0&&l&&!O?(0,H.jsxs)(uw,{direction:{xs:`column`,sm:`row`},spacing:1,children:[(0,H.jsx)(nT,{label:`${t} number`,onChange:e=>f(e.target.value),type:`number`,value:d,slotProps:{htmlInput:{inputMode:`numeric`,min:1}}}),(0,H.jsxs)(Y,{disabled:!D,onClick:()=>void b(S(C)),variant:`contained`,children:[`Record `,t.toLocaleLowerCase(),` arrival`]})]}):null,r===void 0?(0,H.jsx)(ph,{severity:`warning`,children:`Basket arrival completion is not configured.`}):w!==void 0||a?.status===`retracted`?(0,H.jsxs)(uw,{spacing:1,children:[(0,H.jsx)(ph,{severity:`success`,children:ee}),i===void 0||w===void 0?null:(0,H.jsxs)(uw,{direction:{xs:`column`,sm:`row`},spacing:1,children:[(0,H.jsx)(Y,{disabled:_!==void 0,onClick:()=>g(e=>!e),variant:`outlined`,children:`Change`}),(0,H.jsx)(Y,{color:`error`,disabled:_!==void 0,onClick:()=>void x(E(null)),variant:`text`,children:`Undo`})]}),h&&_===void 0?(0,H.jsxs)(uw,{direction:{xs:`column`,sm:`row`},spacing:1,children:[(0,H.jsx)(nT,{label:`Correct ${t.toLocaleLowerCase()} number`,onChange:e=>f(e.target.value),type:`number`,value:d,slotProps:{htmlInput:{inputMode:`numeric`,min:1}}}),(0,H.jsx)(Y,{disabled:!D,onClick:()=>void x(E(C)),variant:`contained`,children:`Save correction`})]}):null,_?.state===`accepted`?(0,H.jsx)(ph,{severity:`success`,children:`Correction recorded.`}):_?.state===`conflict`?(0,H.jsx)(ph,{severity:`warning`,children:`Basket status changed. Review the refreshed status.`}):_?.state===`error`?(0,H.jsx)(ph,{action:(0,H.jsx)(Y,{color:`inherit`,onClick:()=>void x(_.command),children:`Retry correction`}),severity:`error`,children:`Unable to correct the recorded arrival.`}):null]}):p?.state===`conflict`?(0,H.jsx)(ph,{severity:`warning`,children:`Basket movement changed. Review the refreshed instruction.`}):p?.state===`error`?(0,H.jsx)(ph,{action:(0,H.jsx)(Y,{onClick:()=>void b(p.command),color:`inherit`,children:`Retry arrival`}),severity:`error`,children:p.message}):null]})})}function n4(e){return encodeURIComponent(e.toString())}function r4(e){switch(e.kind){case`queue`:return`load-station-queue-${n4(e.label)}`;case`baskets`:return`load-station-baskets`;case`free`:return`load-station-material`}}function i4(e,t,n){switch(e.action.type){case ot.Loading:return t!==void 0&&e.action.loadOntoPalletNum===t.palletNum||n!==void 0&&e.action.loadFromBasketId===n.basketId;case ot.LoadingToBasket:return n!==void 0&&e.action.loadToBasketId===n.basketId;default:return!1}}function a4(e,t,n,r){let i,a,o=new Set;if(e>=0){for(let t of Object.values(n.pallets))if(t.currentPalletLocation.loc===tt.LoadUnload&&t.currentPalletLocation.num===e){i=t;break}for(let t of Object.values(n.baskets??{})){let n=t.position;n!==void 0&&n.locationNum===e&&(n.location===vt.LoadUnload?a=t:n.location===vt.LoadStationStaging&&o.add(t.basketId))}}let s=new Set(t);if(i!==void 0)for(let e of n.material)e.action.type===ot.Loading&&e.action.loadOntoPalletNum===i.palletNum&&e.location.type===it.InQueue&&e.location.currentQueue&&s.add(e.location.currentQueue),e.action.type===ot.Loading&&e.action.loadOntoPalletNum===i.palletNum&&e.action.loadFromBasketId&&o.add(e.action.loadFromBasketId),(e.action.type===ot.UnloadToInProcess||e.action.type===ot.UnloadToCompletedMaterial)&&e.action.unloadToBasketId&&e.location.type===it.OnPallet&&e.location.palletNum===i.palletNum&&o.add(e.action.unloadToBasketId),(e.action.type===ot.UnloadToInProcess||e.action.type===ot.UnloadToCompletedMaterial)&&e.action.unloadIntoQueue&&e.location.type===it.OnPallet&&e.location.palletNum===i.palletNum&&s.add(e.action.unloadIntoQueue);else if(a!==void 0)for(let e of n.material)e.location.type===it.InBasket&&e.location.basketId===a.basketId&&(e.action.type===ot.UnloadToInProcess||e.action.type===ot.UnloadToCompletedMaterial)&&e.action.unloadIntoQueue&&s.add(e.action.unloadIntoQueue),e.location.type===it.InQueue&&e.location.currentQueue&&i4(e,void 0,a)&&s.add(e.location.currentQueue);let c=new Map(Q.of(s).map(e=>[e,{mats:[],hiddenCnt:0}])),l=new Map(Q.of(o).map(e=>[e,{mats:[],hiddenCnt:0}])),u=[],d=pO.empty(),f=null;if(i)for(let e=1;e<=i.numFaces;e++)d=d.set(e,[]);else a&&(d=d.set(1,[]));for(let e of n.material){if(i?(e.action.type===ot.Loading&&e.action.loadOntoPalletNum===i.palletNum&&(e.action.elapsedLoadUnloadTime&&(f=e.action.elapsedLoadUnloadTime),e.action.loadOntoFace&&!d.has(e.action.loadOntoFace)&&(d=d.set(e.action.loadOntoFace,[])),e.location.type===it.Free&&u.push(e)),e.location.type===it.OnPallet&&e.location.palletNum===i.palletNum&&((e.action.type===ot.UnloadToCompletedMaterial||e.action.type===ot.UnloadToInProcess)&&e.action.elapsedLoadUnloadTime&&(f=e.action.elapsedLoadUnloadTime),d=d.alter(e.location.face??1,t=>t?(t.push(e),t):[e]))):a&&(i4(e,i,a)&&e.action.elapsedLoadUnloadTime&&(f=e.action.elapsedLoadUnloadTime),e.action.type===ot.LoadingToBasket&&e.action.loadToBasketId===a.basketId&&e.location.type===it.Free&&u.push(e),e.location.type===it.InBasket&&e.location.basketId===a.basketId&&((e.action.type===ot.UnloadToCompletedMaterial||e.action.type===ot.UnloadToInProcess)&&e.action.elapsedLoadUnloadTime&&(f=e.action.elapsedLoadUnloadTime),d=d.alter(1,t=>t?(t.push(e),t):[e]))),e.location.type===it.InQueue&&e.location.currentQueue&&c.has(e.location.currentQueue)){let t=c.get(e.location.currentQueue);r&&!i4(e,i,a)?t===void 0?c.set(e.location.currentQueue,{mats:[],hiddenCnt:1}):t.hiddenCnt+=1:t===void 0?c.set(e.location.currentQueue,{mats:[e],hiddenCnt:0}):t.mats.push(e)}if(e.location.type===it.InBasket&&e.location.basketId&&l.has(e.location.basketId)){let t=l.get(e.location.basketId);r&&!i4(e,i,a)?t===void 0?l.set(e.location.basketId,{mats:[],hiddenCnt:1}):t.hiddenCnt+=1:t===void 0?l.set(e.location.basketId,{mats:[e],hiddenCnt:0}):t.mats.push(e)}}let p=new Map([...c].map(([e,t])=>[e,{...t,mats:Q.of(t.mats).sortBy(e=>e.location.queuePosition??0).toRArray()}])),m=new Map([...l].map(([e,t])=>[e,{...t,mats:Q.of(t.mats).sortBy(e=>e.location.basketSlot??0).toRArray()}])),h=u.length+d.valuesToAscLazySeq().sumBy(e=>e.length),g=a?Q.of(a.emptySlots??[]).concat(a.unknownSlots??[]).concat(Q.of(n.material).collect(e=>e.location.type===it.InBasket&&e.location.basketId===a.basketId?e.location.basketSlot:void 0)).concat(Q.of(n.material).collect(e=>e.action.type===ot.LoadingToBasket&&e.action.loadToBasketId===a.basketId?e.action.loadToBasketSlot:void 0)).distinctBy(e=>e).toRArray().length:0,_=Math.max(h,g);return{pallet:i,activeBasket:a,allMaterial:n.material,face:d,freeLoadingMaterial:u,queues:p,baskets:m,elapsedLoadingTime:f,fsize:_<=2?`x-large`:_<=6?`large`:`normal`}}function o4({loadData:e}){let t=JI(),n=R(LO),r=(0,L.useMemo)(()=>{let t=e.pallet;return t?Q.of(e.face.values()).append(e.freeLoadingMaterial).concat(Q.of(e.queues).collect(([,e])=>e.mats)).flatMap(e=>e).collect(e=>e.action.type===ot.Loading&&e.action.loadOntoPalletNum===t.palletNum&&e.location.type===it.OnPallet&&e.location.palletNum===t.palletNum?$t(e.partName,`unload`,e.materialID,t.palletNum,e.process,n):e.action.type===ot.Loading&&e.action.loadOntoPalletNum===t.palletNum?$t(e.partName,`load`,e.materialID,t.palletNum,e.action.processAfterLoad??e.process,n):e.location.type===it.OnPallet&&e.location.palletNum===t.palletNum&&(e.action.type===ot.UnloadToCompletedMaterial||e.action.type===ot.UnloadToInProcess)?$t(e.partName,`unload`,e.materialID,t.palletNum,e.process,n):null).toRArray():[]},[e,n]);if(r.length===0||t)return(0,H.jsx)(`div`,{});function i(){for(let e of r)window.open(e,`_blank`)}return(0,H.jsx)(J,{sx:{position:`fixed`,bottom:`5px`,right:`5px`},children:(0,H.jsx)(X,{title:`Open All Instructions`,children:(0,H.jsx)(by,{onClick:i,color:`secondary`,children:(0,H.jsx)(Ere,{})})})})}function s4({elapsedLoadTime:e}){let t=R(zO).timeOfCurrentStatusUTC,n=R(BO);if(e){let r=UO(e)+(n-Math.floor(t.getTime()/1e3));return(0,H.jsx)(`span`,{children:w2(r)})}return null}function c4({data:e,faceNum:t,loadNum:n,submitBasketLoadStationCommand:r}){let i=e.face.get(t),a=dk(R(br).basketName);return i?e.activeBasket&&!e.pallet?(0,H.jsxs)(`div`,{"data-testid":`load-station-active-basket`,children:[t===1?(0,H.jsxs)(J,{sx:{display:`grid`,gridTemplateColumns:`1fr auto`},children:[(0,H.jsxs)(q,{variant:`h4`,children:[a,` `,e.activeBasket.basketId]}),(0,H.jsx)(J,{sx:{justifySelf:`flex-end`},children:(0,H.jsx)(s4,{elapsedLoadTime:e.elapsedLoadingTime})})]}):null,(0,H.jsx)(J,{sx:{ml:`4em`,mr:`4em`},children:(0,H.jsx)(h2,{kind:{type:i2.BasketZone,basketId:e.activeBasket.basketId},children:(0,H.jsx)(Z2,{stationNumber:n,basket:e.activeBasket,material:e.allMaterial,fsize:e.fsize,submitCommand:r})})})]}):e.pallet?(0,H.jsxs)(`div`,{"data-testid":`load-station-pallet-face-${t}`,children:[t===1?(0,H.jsxs)(J,{sx:{display:`grid`,gridTemplateColumns:e.pallet.numFaces>1?`1fr 1fr 1fr`:`1fr 1fr`},children:[(0,H.jsxs)(q,{variant:`h4`,children:[`Pallet `,e.pallet.palletNum]}),e.pallet.numFaces>1?(0,H.jsx)(q,{variant:`h6`,sx:{justifySelf:`center`},children:e.pallet.faceNames?.[t-1]??`Face 1`}):void 0,(0,H.jsx)(J,{sx:{justifySelf:`flex-end`},children:(0,H.jsx)(s4,{elapsedLoadTime:e.elapsedLoadingTime})})]}):e.pallet.numFaces>1?(0,H.jsx)(J,{sx:{display:`flex`,justifyContent:`center`},children:(0,H.jsx)(q,{variant:`h6`,children:e.pallet.faceNames?.[t-1]??`Face ${t}`})}):void 0,(0,H.jsx)(J,{sx:{ml:`4em`,mr:`4em`},children:(0,H.jsx)(h2,{kind:{type:i2.PalletFaceZone,face:t},children:(0,H.jsx)(J,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`},children:i.map((t,n)=>(0,H.jsx)(h2,{kind:{type:i2.Material,material:t},children:(0,H.jsx)(gW,{mat:t,fsize:e.fsize})},n))})})})]}):null:null}function l4({data:e,mat:t}){return(0,H.jsxs)(`div`,{children:[t.label===``?null:(0,H.jsx)(q,{variant:`h4`,children:t.label}),t.material.mats.map((n,r)=>(0,H.jsx)(h2,{kind:{type:i2.Material,material:n,identifier:n.materialID<0?`raw-${t.isFree?`free`:`queue`}-${t.label}-${r}`:void 0},children:t.isFree||t.sortable===!1?(0,H.jsx)(gW,{mat:n,displayActionForSinglePallet:e.pallet?e.pallet.palletNum:0,fsize:e.fsize,showRawMaterial:!0,showJobComment:!0}):(0,H.jsx)(_W,{mat:n,displayActionForSinglePallet:e.pallet?e.pallet.palletNum:0,shake:n.action.type===ot.Loading&&n.action.loadOntoPalletNum===e.pallet?.palletNum,fsize:n.action.type===ot.Loading&&n.action.loadOntoPalletNum===e.pallet?.palletNum?e.fsize:void 0,showRawMaterial:!0,showJobComment:!0})},r)),t.material.hiddenCnt>0?(0,H.jsxs)(q,{variant:`body2`,color:`textSecondary`,sx:{textAlign:`center`,mt:`0.5em`},children:[`+`,t.material.hiddenCnt,` hidden`]}):null]})}function u4({data:e,label:t,baskets:n}){return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(q,{variant:`h4`,children:t}),n.map((t,n)=>(0,H.jsxs)(J,{"data-testid":`load-station-basket-${n4(t.basketId)}`,sx:{mt:n===0?`0.5em`:`1.5em`,pt:n===0?void 0:`1em`},children:[(0,H.jsx)(q,{variant:`h6`,sx:{mb:`0.5em`},children:t.label}),(0,H.jsx)(h2,{kind:{type:i2.BasketZone,basketId:t.basketId},children:(0,H.jsx)(l4,{data:e,mat:{label:``,material:t.material,isFree:!1,sortable:!1}})})]},t.basketId))]})}function d4({data:e,region:t}){switch(t.kind){case`free`:return(0,H.jsx)(h2,{kind:{type:i2.FreeMaterialZone},children:(0,H.jsx)(l4,{data:e,mat:{label:t.label,material:t.material,isFree:!0,sortable:!1}})});case`queue`:return(0,H.jsx)(h2,{kind:{type:i2.QueueZone,queue:t.label},children:(0,H.jsx)(vJ,{matIds:t.material.mats.map(e=>e.materialID),direction:`vertical`,queueName:t.label,renderDragOverlay:t=>(0,H.jsx)(vW,{mat:t,displayActionForSinglePallet:e.pallet?e.pallet.palletNum:0,fsize:t.action.type===ot.Loading&&t.action.loadOntoPalletNum===e.pallet?.palletNum?e.fsize:void 0}),children:(0,H.jsx)(l4,{data:e,mat:{label:t.label,material:t.material,isFree:!1,sortable:!0}})})});case`baskets`:return(0,H.jsx)(u4,{data:e,label:t.label,baskets:t.baskets})}}function f4(){let e=R(_L),t=(0,L.useMemo)(()=>{let t=tE(new Date,-5);return e.matsById.valuesToLazySeq().filter(e=>e.completed_last_proc_machining===!0&&e.last_unload_time!==void 0&&e.last_unload_time>=t).toSortedArray({desc:e=>e.last_unload_time?.getTime()??0})},[e]);return(0,H.jsx)(`div`,{children:t.map((e,t)=>(0,H.jsx)(hW,{mat:e},t))})}var p4=(0,L.memo)(function({fillViewPort:e,showMaterial:t}){let n=m2({type:t?i2.CompletedExpandedMaterialZone:i2.CompletedCollapsedMaterialZone});return t&&e?(0,H.jsxs)(J,{ref:n,sx:{padding:`8px`,display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,H.jsx)(q,{variant:`h4`,children:`Completed`}),(0,H.jsx)(J,{sx:{position:`relative`,flexGrow:1},children:(0,H.jsx)(J,{sx:{position:`absolute`,top:`0`,left:`0`,right:`0`,bottom:`0`,overflow:`auto`},children:(0,H.jsx)(f4,{})})})]}):t?(0,H.jsxs)(J,{ref:n,sx:{padding:`8px`},children:[(0,H.jsx)(q,{variant:`h4`,children:`Completed`}),(0,H.jsx)(f4,{})]}):(0,H.jsx)(J,{ref:n,sx:{display:`flex`,justifyContent:e?`flex-end`:void 0,padding:`8px`},children:(0,H.jsx)(q,{variant:`h4`,sx:{margin:`4px`,...e?{textOrientation:`mixed`,writingMode:`vertical-rl`}:{}},children:`Completed`})})});function m4({pallet:e}){let t=R(kI),n=R(LO),r=JI();if(t===null)return null;let i;if(t.action.type===ot.Loading&&t.action.loadOntoPalletNum===e?i=`load`:(t.action.type===ot.UnloadToInProcess||t.action.type===ot.UnloadToCompletedMaterial)&&t.location.type===it.OnPallet&&t.location.palletNum===e&&(i=`unload`),i===void 0)return null;let a=$t(t.partName,i,t.materialID,e,t.action.type===ot.Loading?t.action.processAfterLoad??t.process:t.process,n);return r?(0,H.jsx)(Y,{color:`primary`,children:`Instructions`}):(0,H.jsx)(Y,{href:a,target:`bms-instructions`,color:`primary`,children:`Instructions`})}function h4({queues:e,onClose:t,toQueue:n,showAddToQueue:r,setShowAddToQueue:i}){let a=z(CI),o=R(FI),s=R(EI),c=R(kI),l=R(LO),[u,d]=VI(),[f,p]=(0,L.useState)(null);return!s||!eW(c)||e.length===0||c?.location.type===it.InQueue&&c?.location.currentQueue&&e.includes(c?.location.currentQueue)?null:r?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(Y,{color:`primary`,disabled:n===null||d,onClick:async()=>{p(null);try{await u({materialId:s.materialID,queue:n??``,queuePosition:-1,operator:l}),a(null),t()}catch(e){p(Bt.isApiException(e)?e.response:e instanceof Error?e.message:String(e))}},children:[`Add To `,n??`Queue`,` `,o?` To Run Process ${o.process+1}`:``]}),f?(0,H.jsx)(q,{role:`alert`,children:f}):null]}):(0,H.jsx)(Y,{color:`primary`,onClick:()=>i(!0),children:`Add To Queue`})}function g4(){let e=R(br),t=z(q0),n=R(EI);return!e.allowChangeWorkorderAtLoadStation||n===null||n.materialID<0?null:(0,H.jsx)(Y,{color:`primary`,onClick:()=>t(!0),children:`Assign Workorder`})}var _4=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(null),[r,i]=(0,L.useState)(!1),[a,o]=(0,L.useState)(null),s=(0,L.useCallback)(function(){n(null),i(!1),o(null)},[n]);return(0,H.jsx)(AW,{onClose:s,allowNote:!0,highlightProcsGreaterOrEqualTo:t?.process??void 0,extraDialogElements:(0,H.jsxs)(H.Fragment,{children:[t===null?null:(0,H.jsx)(mX,{st:t,setState:n}),r?(0,H.jsx)(nX,{selectedQueue:a,setSelectedQueue:o,queueNames:e.queues}):void 0]}),buttons:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(m4,{pallet:e.pallet}),(0,H.jsx)(BY,{}),(0,H.jsx)(lX,{}),(0,H.jsx)(uX,{onClose:s}),(0,H.jsx)(n2,{}),(0,H.jsx)(h4,{toQueue:a,queues:e.queues,onClose:s,showAddToQueue:r,setShowAddToQueue:i}),(0,H.jsx)(hX,{st:t,setState:n,onClose:s,loadStation:!0}),(0,H.jsx)(g4,{})]})})});function v4({numMatCols:e,maxNumFaces:t,horizontal:n,showMatInCompleted:r}){let i=``,a=``;if(t<=0&&(t=1),n){let n=``;for(let t=0;t<e;t++)a+=`minmax(16em, max-content) `,n+=`mat${t} `;a+=`1fr `,a+=r?`minmax(16em, max-content)`:` 4.5em`;let o=`minmax(calc((100vh - 64px) / ${t}), max-content)`;for(let e=0;e<t;e++){let r=e===t-1?`1fr`:o;i+=`"${n} palface${e} completed" ${r}\n`}}else{a=`1fr`;for(let e=0;e<t;e++)i+=`"palface${e}" minmax(134px, max-content)\n`;for(let t=0;t<e;t++)i+=`"mat${t}" minmax(134px, max-content)\n`;i+=`"completed" minmax(134px, max-content)
|
|
350
|
+
`}return`${i} / ${a}`}function y4(e){let t=dk(R(br).basketName),n=t.endsWith(`s`)?t:`${t}s`,r=R(zO),i=R($q),a=(0,L.useMemo)(()=>a4(e.loadNum,e.queues,r,i),[r,e.loadNum,e.queues,i]),o=Q2(r.basketMoveInstructions??[],e.loadNum),[s,c]=(0,L.useState)();(0,L.useEffect)(()=>{s!==void 0&&(s.stationNumber!==e.loadNum||o!==void 0&&o.instructionId!==s.instruction.instructionId)&&c(void 0)},[o,e.loadNum,s]);let l=o??s?.instruction,u=s?.stationNumber===e.loadNum&&l?.instructionId===s?.instruction.instructionId?s:void 0,d=[...Q.of(a.queues).sortBy(([e])=>e).map(([e,t])=>({kind:`queue`,label:e,material:t})).toRArray()];if(a.baskets.size>0){let e=Q.of(a.baskets).filter(([e])=>e!==a.activeBasket?.basketId).sortBy(([e])=>e).map(([e,n])=>({basketId:e,label:`${t} ${e}`,material:n})).toRArray();e.length>0&&d.push({kind:`baskets`,label:n,baskets:e})}(a.queues.size===0&&a.baskets.size===0||a.freeLoadingMaterial.length>0)&&d.push({kind:`free`,label:`Material`,material:{mats:a.freeLoadingMaterial,hiddenCnt:0}});let f=d.length+ +!!e.completed,p=iT(f<=1?`(min-width: 720px)`:f===2?`(min-width: 1030px)`:`(min-width: 1320px)`),m=v4({numMatCols:d.length,maxNumFaces:a.face.size,horizontal:p,showMatInCompleted:e.completed});return(0,H.jsxs)(H.Fragment,{children:[l===void 0?null:(0,H.jsx)(e4,{basketName:t,instruction:l,stationNumber:e.loadNum,submitCommand:e.submitBasketMovementCompletion,submitCorrection:e.submitBasketLocationCorrection,receipt:u,onAccepted:c,onCorrected:t=>c(n=>n===void 0||n.stationNumber!==e.loadNum||n.receipt.observationId!==t.targetObservationId?n:t.replacementBasketId===null||t.replacementObservationId===null?{...n,status:`retracted`}:{...n,receipt:{...n.receipt,observationId:t.replacementObservationId,observedBasketId:t.replacementBasketId},command:{...n.command,commandId:t.replacementObservationId,observedBasketId:t.replacementBasketId},status:`corrected`})}),(0,H.jsx)(p2,{hideArrows:!p,whiteBackground:e.whiteBackground,children:(0,H.jsxs)(J,{component:`main`,sx:{width:`100%`,display:`grid`,gridTemplate:m,minHeight:{xs:`calc(100vh - 64px - 32px)`,sm:`calc(100vh - 64px - 40px)`,md:`calc(100vh - 64px)`},padding:p?void 0:`8px`},children:[d.map((e,t)=>(0,H.jsx)(J,{"data-testid":r4(e),sx:{gridArea:`mat${t}`,padding:`8px`,borderRight:p?`1px solid black`:void 0,borderBottom:p?void 0:`1px solid black`},children:(0,H.jsx)(d4,{data:a,region:e})},t)),a.face.keysToAscLazySeq().map((t,n)=>(0,H.jsx)(J,{sx:{marginLeft:`15px`,gridArea:`palface${n}`,padding:`8px`,borderTop:a.pallet&&n!==0?`1px solid black`:void 0},children:(0,H.jsx)(c4,{data:a,faceNum:t,loadNum:e.loadNum,submitBasketLoadStationCommand:e.submitBasketLoadStationCommand})},t)),(0,H.jsx)(J,{"data-testid":`load-station-completed`,sx:{borderLeft:p?`1px solid black`:void 0,borderTop:p?void 0:`1px solid black`,gridArea:`completed`},children:(0,H.jsx)(p4,{fillViewPort:p,showMaterial:e.completed})}),(0,H.jsx)(o4,{loadData:a}),(0,H.jsx)(Q0,{}),(0,H.jsx)(r2,{}),(0,H.jsx)(_4,{pallet:a.pallet?.palletNum??null,queues:e.queues})]})})]})}function b4(e){let t=R(br);return YI(ck(e.loadNum,t.loadStationNames)),(0,H.jsx)(y4,{...e})}function x4(e){let t=JI(),n=R(LO),r=R(EI),i=R(FI)?.process,[a,o]=Rie(),s=z(CI);if(r===null)return null;function c(t){r&&(a({mat:r,inspType:e.inspection_type,success:t,operator:n}),s(null))}let l=$t(r.partName,e.inspection_type,r.materialID,null,i,n);return(0,H.jsxs)(H.Fragment,{children:[r.partName===``?void 0:t?(0,H.jsx)(Y,{color:`primary`,children:`Instructions`}):(0,H.jsx)(Y,{href:l,target:`bms-instructions`,color:`primary`,children:`Instructions`}),(0,H.jsx)(lX,{}),(0,H.jsx)(uX,{}),(0,H.jsxs)(Y,{color:`primary`,disabled:o,onClick:()=>c(!0),children:[`Mark `,e.inspection_type,` Success`]}),(0,H.jsxs)(Y,{color:`primary`,disabled:o,onClick:()=>c(!1),children:[`Mark `,e.inspection_type,` Failed`]})]})}function S4({focusInspectionType:e}){let t=R(II);return t===null||e||t.signaledInspections.length===1?null:(0,H.jsx)(H.Fragment,{children:t.signaledInspections.map(e=>(0,H.jsx)(my,{children:(0,H.jsx)(x4,{inspection_type:e})},e))})}function C4({focusInspectionType:e}){let t=R(II),n;if(e)n=e;else if(t&&t.signaledInspections.length===1)n=t.signaledInspections[0];else return null;return(0,H.jsx)(x4,{inspection_type:n})}var w4=(0,L.memo)(function(e){return(0,H.jsx)(AW,{allowNote:!0,extraDialogElements:(0,H.jsx)(S4,{focusInspectionType:e.focusInspectionType}),buttons:(0,H.jsx)(C4,{focusInspectionType:e.focusInspectionType})})});function T4({focusInspectionType:e,forceSingleColumn:t}){let n=R(_L),r=(0,L.useMemo)(()=>D4(n.matsById,e),[n,e]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(J,{sx:{display:t?void 0:{md:`flex`}},children:[(0,H.jsxs)(J,{sx:{padding:`8px`,minHeight:t?void 0:{md:`calc(100vh - 64px)`},width:t?`100%`:{md:`50vw`},borderRight:t?void 0:{md:`1px solid black`},borderBottom:t?`1px solid black`:{sm:`1px solid black`,md:`none`}},children:[(0,H.jsx)(q,{variant:`h4`,children:`Parts to Inspect`}),(0,H.jsx)(J,{sx:{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:r.waiting_to_inspect.map((t,n)=>(0,H.jsx)(hW,{mat:t,focusInspectionType:e,hideWarningIcon:!0},n))})]}),(0,H.jsxs)(J,{sx:{padding:`8px`,width:t?`100%`:{md:`50vw`}},children:[(0,H.jsx)(q,{variant:`h4`,children:`Recently Inspected`}),(0,H.jsx)(J,{sx:{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:r.inspect_completed.map((t,n)=>(0,H.jsx)(hW,{mat:t,focusInspectionType:e,hideWarningIcon:!0},n))})]})]}),(0,H.jsx)(w4,{focusInspectionType:e})]})}function E4(e){let t=e.completedInspections;return t===void 0?e.signaledInspections.length===0:Q.of(e.signaledInspections).every(e=>e in t)}function D4(e,t){let n=QT(new Date,-7),r=QT(new Date,-1),i=Array.from(t===null?e.valuesToLazySeq().filter(e=>e.last_unload_time!==void 0&&e.last_unload_time>=n&&e.signaledInspections.length>0&&!E4(e)):e.valuesToLazySeq().filter(e=>e.last_unload_time!==void 0&&e.last_unload_time>=n&&e.signaledInspections.includes(t)&&(e.completedInspections||{})[t]===void 0));i.sort((e,t)=>e.last_unload_time&&t.last_unload_time?t.last_unload_time.getTime()-e.last_unload_time.getTime():0);let a=Array.from(t===null?e.valuesToLazySeq().filter(e=>e.completed_inspect_time!==void 0&&e.completed_inspect_time>=r&&e.signaledInspections.length>0&&E4(e)):e.valuesToLazySeq().filter(e=>e.completed_inspect_time!==void 0&&e.completed_inspect_time>=r&&e.signaledInspections.includes(t)&&(e.completedInspections||{})[t]!==void 0));return a.sort((e,t)=>e.completed_inspect_time&&t.completed_inspect_time?t.completed_inspect_time.getTime()-e.completed_inspect_time.getTime():0),{waiting_to_inspect:i,inspect_completed:a}}function O4(e){return YI(e.focusInspectionType&&e.focusInspectionType!==``?`Inspection ${e.focusInspectionType}`:`Inspection`),(0,H.jsx)(J,{component:`main`,sx:{backgroundColor:`#F8F8F8`,minHeight:{sm:`calc(100vh - 64px - 40px)`,md:`calc(100vh - 64px)`}},children:(0,H.jsx)(T4,{...e})})}function k4(){let e=R(br),t=R(EI),[n,r]=RI(),i=R(LO),[a,o]=B(CI);if(t===null)return null;let s=e.requireScanAtCloseout,c=e.requireWorkorderBeforeAllowCloseoutComplete,l;s?(a===null||a.type!==`Barcode`&&a.type!==`ManuallyEnteredSerial`)&&(l=`Scan Required`):c&&(t.workorderId===void 0||t.workorderId===``)&&(l=`No workorder assigned`);function u(e){t!==null&&(n({mat:t,operator:i,failed:e}),o(null))}return l?(0,H.jsx)(X,{title:l,placement:`top`,children:(0,H.jsx)(`div`,{children:(0,H.jsx)(Y,{color:`primary`,disabled:!0,children:`Close Out`})})}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Y,{color:`primary`,disabled:r,onClick:()=>u(!0),children:`Fail Close Out`}),(0,H.jsx)(Y,{color:`primary`,disabled:r,onClick:()=>u(!1),children:`Pass Close Out`})]})}function A4(){let e=JI(),t=R(EI),n=R(LO),r=R(FI)?.process;if(t===null||t.partName===``)return null;let i=$t(t.partName,`closeout`,t.materialID,null,r,n);return e?(0,H.jsx)(Y,{color:`primary`,children:`Instructions`}):(0,H.jsx)(Y,{href:i,target:`bms-instructions`,color:`primary`,children:`Instructions`})}function j4(){let e=z(q0);return R(EI)===null?null:(0,H.jsx)(Y,{color:`primary`,onClick:()=>e(!0),children:`Assign Workorder`})}var M4=(0,L.memo)(function(){return(0,H.jsx)(AW,{allowNote:!0,buttons:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(A4,{}),(0,H.jsx)(lX,{}),(0,H.jsx)(uX,{}),(0,H.jsx)(j4,{}),(0,H.jsx)(k4,{})]})})}),N4=P(new Date);N4.onMount=e=>{e(new Date);let t=setInterval(()=>{e(new Date)},6e4);return()=>clearInterval(t)};function P4({forceSingleColumn:e}){let t=R(_L),n=R(N4),r=(0,L.useMemo)(()=>{let e=tE(n,-48),r=tE(n,-2),i=[],a=[];for(let n of t.matsById.values())n.completed_last_proc_machining===!0&&n.last_unload_time&&n.last_unload_time>=e&&(n.closeout_completed===void 0?i.push(n):n.closeout_completed>=r&&a.push(n));return i.sort((e,t)=>e.last_unload_time&&t.last_unload_time?e.last_unload_time.getTime()-t.last_unload_time.getTime():0),a.sort((e,t)=>e.last_unload_time&&t.last_unload_time?t.last_unload_time.getTime()-e.last_unload_time.getTime():0),{uncompleted:i,closed:a}},[t,n]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(J,{sx:{display:e?void 0:{md:`flex`}},children:[(0,H.jsxs)(J,{sx:{padding:`8px`,minHeight:e?void 0:{md:`calc(100vh - 64px)`},width:e?`100%`:{md:`50vw`},borderRight:e?void 0:{md:`1px solid black`},borderBottom:e?`1px solid black`:{sm:`1px solid black`,md:`none`}},children:[(0,H.jsx)(q,{variant:`h4`,children:`Recently Completed`}),(0,H.jsx)(J,{sx:{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:r.uncompleted.map((e,t)=>(0,H.jsx)(hW,{mat:e},t))})]}),(0,H.jsxs)(J,{sx:{padding:`8px`,width:e?`100%`:{md:`50vw`}},children:[(0,H.jsx)(q,{variant:`h4`,children:`Recently Closed Out`}),(0,H.jsx)(J,{sx:{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:r.closed.map((e,t)=>(0,H.jsx)(hW,{mat:e},t))})]})]}),(0,H.jsx)(Q0,{}),(0,H.jsx)(M4,{})]})}function F4(){return YI(`Close Out`),(0,H.jsx)(J,{component:`main`,sx:{backgroundColor:`#F8F8F8`,minHeight:{sm:`calc(100vh - 64px - 40px)`,md:`calc(100vh - 64px)`}},children:(0,H.jsx)(P4,{})})}function I4(e,t){return e.mapValues(e=>{let n=Q.of(e.recentCycles).flatMap(e=>e.tools).filter(e=>!e.toolChangedDuringMiddleOfCycle).groupBy(e=>e.toolName).map(([e,t])=>({toolName:e,cycleUsageMinutes:Q.of(t).sumBy(e=>e.cycleUsageMinutes)/t.length,cycleUsageCnt:Q.of(t).sumBy(e=>e.cycleUsageCnt)/t.length,toolChangedDuringMiddleOfCycle:!1})).toMutableArray();return t&&n.sort((e,t)=>e.toolName.localeCompare(t.toolName)),{tools:n}})}var L4=class{constructor(e,t){this.statGroup=e,this.operation=t}compare(e){let t=this.statGroup.localeCompare(e.statGroup);return t===0?this.operation.localeCompare(e.operation):t}hash(){return MD(this.statGroup,this.operation)}toString(){return`{statGroup: ${this.statGroup}, operation: ${this.operation}}`}};function R4(e,t){let n=0,r=0;for(let i of Q.of(e).filter(e=>e.machines.has(t)??!1))n+=i.quantity*(i.scheduledUseMinutes/i.scheduledUseCnt),r+=i.quantity;return r===0?0:n/r}function z4(e,t,n){let r=_O.empty();for(let[t,n]of Q.ofObject(e.jobs)){let i=n.cycles??0;for(let a=0;a<n.procsAndPaths.length;a++){let o=0,s=_O.empty();for(let r=0;r<n.procsAndPaths[a].paths.length;r++){o+=n.completed?.[a]?.[r]??0;let i=n.procsAndPaths[a].paths[r];for(let n=0;n<i.stops.length;n+=1){let o=i.stops[n],c=Q.of(e.material).filter(e=>e.jobUnique===t&&e.process==a+1&&e.path===r+1&&(e.action.type===ot.UnloadToCompletedMaterial||e.action.type===ot.UnloadToInProcess||e.lastCompletedMachiningRouteStopIndex!==void 0&&e.lastCompletedMachiningRouteStopIndex>n)).length();o.program!==void 0&&o.program!==``&&(s=s.modify(new L4(o.stationGroup,o.program),e=>(e??0)+c))}}for(let[e,t]of s)r=r.modify(new GO(n.partName,e.statGroup,e.operation),e=>(e??0)+i-o-t)}}let i=Q.of(I4(n,!1)).flatMap(([e,t])=>{let i=window.bmsToolReportOverridePartQuantity??r.get(e);return i!==void 0&&i>0?t.tools.map(t=>({toolName:t.toolName,part:{partAndProg:e,quantity:i,scheduledUseMinutes:t.cycleUsageMinutes,scheduledUseCnt:t.cycleUsageCnt===0?1:t.cycleUsageCnt,machines:n.get(e)?.machines??dO.empty()}})):[]}).sortBy(e=>e.part.partAndProg.part,e=>e.part.partAndProg.operation).toLookup(e=>e.toolName,e=>e.part);return Q.of(t).orderedGroupBy(e=>e.toolName).map(([e,t])=>{let n=!1;return{toolName:e,machines:Q.of(t).sortBy(e=>e.machineGroupName,e=>e.machineNum,e=>e.pocket).map(t=>{let r=t.currentUse!==null&&t.currentUse!==void 0&&t.currentUse!==``?WO(t.currentUse):null,a=t.totalLifeTime!==null&&t.totalLifeTime!==void 0&&t.totalLifeTime!==``?WO(t.totalLifeTime):null,o=sk(t.machineGroupName,t.machineNum),s=t.currentUseCount??null,c=t.totalLifeCount??null;if(s===null&&c===null){let t=R4(i.get(e)??[],o);t>0&&(n=!0,s=r===null?null:r/t,c=a===null?null:a/t)}return{machineName:o,pocket:t.pocket,serial:t.serial,currentUseMinutes:r,lifetimeMinutes:a,remainingMinutes:r!==null&&a!==null?Math.max(0,a-r):null,currentUseCnt:s??null,lifetimeCnt:c??null,remainingCnt:s!==null&&c!==null?Math.max(0,c-s):null}}).toRArray(),parts:i.get(e)??[],estimatedToolCounts:n}}).toRArray()}var B4=P(null),V4=P(e=>e(B4)?.time??null,async(e,t,n)=>{t(B4,{tools:await Gt.getToolsInMachines(),time:n})}),H4=P(e=>{let t=e(B4);return t===null?[]:Q.of(t.tools).toOrderedSet(e=>sk(e.machineGroupName,e.machineNum)).toAscLazySeq().toRArray()}),U4=P(e=>{let t=e(B4);if(t===null)return null;let n=e(zO),r=e(HL);return z4(n,t.tools,r)}),W4=P(e=>{let t=e(U4);return t?Q.of(t).flatMap(e=>e.machines).some(e=>e.serial!=null&&e.serial!==``):!1}),G4=P(e=>{let t=e(U4);return t?Q.of(t).some(e=>e.estimatedToolCounts):!1});function K4(e){let t=Q.of(e).flatMap(e=>e.machines).some(e=>e.currentUseMinutes!=null),n=Q.of(e).flatMap(e=>e.machines).some(e=>e.currentUseCnt!=null),r=`<table>
|
|
351
|
+
<thead><tr>`;r+=`<th>Tool</th><th>Machine</th><th>Pocket</th>`,t&&(r+=`<th>Scheduled Use (min)</th><th>Current Use (min)</th><th>Lifetime (min)</th><th>Remaining Life (min)</th>`),n&&(r+=`<th>Scheduled Use (cnt)</th><th>Current Use (cnt)</th><th>Lifetime (cnt)</th><th>Remaining Life (cnt)</th>`),r+=`</tr></thead>
|
|
352
|
+
<tbody>
|
|
353
|
+
`;for(let i of e)for(let e of i.machines){if(r+=`<tr><td>${i.toolName}</td><td>${e.machineName}</td><td>${e.pocket}</td>`,t){let t=Q.of(i.parts).sumBy(e=>e.scheduledUseMinutes*e.quantity);r+=`<td>`+t.toFixed(1)+`</td>`,r+=`<td>`+(e.currentUseMinutes?e.currentUseMinutes.toFixed(1):``)+`</td>`,r+=`<td>`+(e.lifetimeMinutes?e.lifetimeMinutes.toFixed(1):``)+`</td>`,r+=`<td>`+(e.remainingMinutes?e.remainingMinutes.toFixed(1):``)+`</td>`}if(n){let t=Q.of(i.parts).sumBy(e=>e.scheduledUseCnt*e.quantity);r+=`<td>`+t.toFixed(1)+`</td>`,r+=`<td>`+(e.currentUseCnt?e.currentUseCnt.toFixed(1):``)+`</td>`,r+=`<td>`+(e.lifetimeCnt?e.lifetimeCnt.toFixed(1):``)+`</td>`,r+=`<td>`+(e.remainingCnt?e.remainingCnt.toFixed(1):``)+`</td>`}r+=`</tr>
|
|
354
|
+
`}return r+=`</tbody></table>`,r}function q4(){let e=he();return(0,L.useCallback)(()=>{let t=e.get(U4);t&&Hk(K4(t))},[e])}function J4(e,t,n,r,i){let a=I4(e,!0),o=e.keysToLazySeq().toRMap(e=>[e.operation,e],(e,t)=>t),s=Q.of(r);i!=null&&(s=s.filter(e=>i.has(e.programName)));let c=n?.valuesToLazySeq().flatMap(e=>Q.of(e.procsAndPaths).flatMap(e=>e.paths).flatMap(t=>Q.of(t.stops).collect(n=>{let r=WO(n.expectedCycleTime);return n.program&&r>0?{program:n.program,plannedMins:r/t.partsPerPallet,start:e.routeStartUTC}:null}))).toOrderedMap(e=>[e.program,e],(e,t)=>e.start>t.start?e:t),l=s.map(e=>{let n=o.get(e.programName);return{programName:e.programName,cellControllerProgramName:e.cellControllerProgramName,comment:e.comment??null,revision:e.revision??null,partName:n?.part??null,statisticalCycleTime:n?t.get(n)??null:null,toolUse:n?a.get(n)??null:null,plannedMins:c?.get(e.programName)?.plannedMins??null}}).toRArray();return{time:new Date,programs:l,hasRevisions:l.some(e=>e.revision!==null),cellNameDifferentFromProgName:l.some(e=>e.cellControllerProgramName!==e.programName)}}var Y4=P(`AllPrograms`),X4=P(null),Z4=P(e=>e(X4)?.time??null,async(e,t,n)=>{t(X4,{progs:await Gt.getProgramsInCellController(),time:n})}),Q4=P(e=>{if(e(Z4)===null)return null;let t=e(Y4),n=null;if(t===`ActivePrograms`){let t=e(zO);n=new Set(Q.ofObject(t.jobs).flatMap(([,e])=>e.procsAndPaths).flatMap(e=>e.paths).flatMap(e=>e.stops).filter(e=>e.program!==null&&e.program!==void 0&&e.program!==``).map(e=>e.program??``))}let r=e(X4);return r===null?null:J4(e(HL),e(qO),e(bO),r.progs,n)}),$4=P(null),e3=P(async e=>{let t=e($4);return t===null?``:t.revision===null?await Gt.getLatestProgramRevisionContent(t.programName):await Gt.getProgramRevisionContent(t.programName,t.revision)}),t3=P(null),n3=new Intl.NumberFormat(`en-US`,{minimumFractionDigits:0,maximumFractionDigits:1}),r3=G(Zw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({theme:e,$noBorderBottom:t,$highlightedRow:n,$noticeRow:r})=>({...t&&{"& > *":{borderBottom:`unset`}},[e.breakpoints.up(`lg`)]:{"& td:not(:last-child), & th:not(:last-child)":{whiteSpace:`nowrap`},"& td:last-child, & th:last-child":{width:`100%`}},backgroundColor:n?`#BDBDBD`:r?`#E0E0E0`:void 0})),i3=G(Zw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$borderBottom:e})=>({...e&&{"&:not(:last-child)":{borderBottom:`2px solid black`}}})),a3=G(`span`)({fontSize:`x-large`,fontWeight:`lighter`});function o3({min:e,cnt:t,showZero:n,extraMin:r,extraCnt:i}){e??=0,t??=0;let a=r?(0,H.jsx)(X,{title:r,children:(0,H.jsxs)(`span`,{children:[e.toFixed(1),` min`]})}):e.toFixed(1)+` min`,o=i?(0,H.jsx)(X,{title:i,children:(0,H.jsxs)(`span`,{children:[n3.format(t),` cnt`]})}):n3.format(t)+` cnt`;return e===0&&t===0?n?`0`:``:e>0&&t===0?a:e===0&&t>0?o:(0,H.jsxs)(`span`,{children:[a,` `,(0,H.jsx)(a3,{children:`|`}),` `,o]})}function s3({tool:e,machine:t}){let n=t?Q.of(e.parts).filter(e=>e.machines.has(t)):Q.of(e.parts);return(0,H.jsxs)(Vw,{size:`small`,sx:{width:`auto`,ml:`10em`,mb:`1em`},children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:`Part`}),(0,H.jsx)(Z,{children:`Program`}),t?void 0:(0,H.jsx)(Z,{children:`Machines`}),(0,H.jsx)(Z,{align:`right`,children:`Quantity`}),(0,H.jsx)(Z,{align:`right`,children:`Use/Cycle (min)`}),(0,H.jsx)(Z,{align:`right`,children:`Use/Cycle (cnt)`})]})}),(0,H.jsx)(Ww,{children:n.isEmpty()?(0,H.jsx)(Zw,{children:(0,H.jsx)(Z,{colSpan:5,children:`No programs use this machine`})}):n.map((e,n)=>(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(tW,{part:e.partAndProg.part,size:20}),(0,H.jsx)(`span`,{children:e.partAndProg.part})]})}),(0,H.jsx)(Z,{children:e.partAndProg.operation}),t?void 0:(0,H.jsx)(Z,{children:e.machines.foldl((e,t)=>(e.length>0?e+`, `:``)+t,``)}),(0,H.jsx)(Z,{align:`right`,children:e.quantity}),(0,H.jsx)(Z,{align:`right`,children:e.scheduledUseMinutes>0?e.scheduledUseMinutes.toFixed(1):``}),(0,H.jsx)(Z,{align:`right`,children:e.scheduledUseCnt>0?n3.format(e.scheduledUseCnt):``})]},n))})]})}function c3({machines:e}){let t=R(W4),n=Q.of(e).toLookupOrderedMap(e=>e.machineName,e=>e.pocket),r=n.size>1&&n.valuesToAscLazySeq().some(e=>e.size>1);return(0,H.jsxs)(Vw,{size:`small`,sx:{width:`auto`,ml:`10em`,mb:`1em`},children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:`Machine`}),(0,H.jsx)(Z,{align:`right`,children:`Pocket`}),t?(0,H.jsx)(Z,{children:`Serial`}):void 0,(0,H.jsx)(Z,{align:`right`,children:`Current Use `}),(0,H.jsx)(Z,{align:`right`,children:`Lifetime `}),(0,H.jsx)(Z,{align:`right`,children:`Remaining Use `})]})}),(0,H.jsxs)(Ww,{children:[n.toAscLazySeq().map(([e,i])=>(0,H.jsxs)(L.Fragment,{children:[i.valuesToAscLazySeq().map((e,n)=>(0,H.jsxs)(i3,{$borderBottom:r&&i.size===1,children:[(0,H.jsx)(Z,{children:e.machineName}),(0,H.jsx)(Z,{align:`right`,children:e.pocket}),t?(0,H.jsx)(Z,{children:e.serial??``}):void 0,(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(o3,{min:e.currentUseMinutes,cnt:e.currentUseCnt})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(o3,{min:e.lifetimeMinutes,cnt:e.lifetimeCnt})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(o3,{min:e.remainingMinutes,cnt:e.remainingCnt,showZero:!0})})]},n)),n.size>1&&i.size>1?(0,H.jsxs)(i3,{$borderBottom:!0,children:[(0,H.jsx)(Z,{colSpan:t?4:3}),(0,H.jsx)(Z,{children:`Subtotal`}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(o3,{min:i.valuesToAscLazySeq().sumBy(e=>e.remainingMinutes??0),cnt:i.valuesToAscLazySeq().sumBy(e=>e.remainingCnt??0)})})]}):void 0]},e)),(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{colSpan:t?4:3}),(0,H.jsx)(Z,{children:`Total`}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(o3,{min:Q.of(e).sumBy(e=>e.remainingMinutes??0),cnt:Q.of(e).sumBy(e=>e.remainingCnt??0)})})]})]})]})}function l3(){let e=R(G4);return(0,H.jsxs)(r3,{children:[(0,H.jsx)(Z,{}),(0,H.jsx)(Z,{children:`Tool`}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(X,{title:`Expected use for all currently scheduled parts.`+(e?` Counts are estimates.`:``),children:(0,H.jsx)(`span`,{children:`Scheduled Use`})})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(X,{title:`Remaining use summed over all machines which have a scheduled part.`+(e?` Counts are estimates.`:``),children:(0,H.jsx)(`span`,{children:`Total Remaining Use`})})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(X,{title:`Machine with the least remaining use.`+(e?` Counts are estimates.`:``),children:(0,H.jsx)(`span`,{children:`Smallest Remaining Use`})})}),(0,H.jsx)(Z,{})]})}function u3({tool:e}){let[t,n]=(0,L.useState)(!1),r=Q.of(e.machines).filter(t=>e.parts.some(e=>e.machines.has(t.machineName))),i=Q.of(e.parts).sumBy(e=>e.scheduledUseMinutes*e.quantity),a=Q.of(e.parts).sumBy(e=>e.scheduledUseCnt*e.quantity),o=r.sumBy(e=>e.remainingMinutes??0),s=r.sumBy(e=>e.remainingCnt??0),c=r.groupBy(e=>e.machineName).map(([e,t])=>({mach:e,remainMin:Q.of(t).sumBy(e=>e.remainingMinutes??0)})).minBy(({remainMin:e})=>e),l=r.groupBy(e=>e.machineName).map(([e,t])=>({mach:e,remainCnt:Q.of(t).sumBy(e=>e.remainingCnt??0)})).minBy(({remainCnt:e})=>e);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(r3,{$noBorderBottom:!0,$highlightedRow:i>o||a>s,$noticeRow:i<=o&&a<=s&&(c&&i>c.remainMin||l&&a>l.remainCnt),children:[(0,H.jsx)(Z,{children:(0,H.jsx)(th,{size:`small`,onClick:()=>n(!t),children:t?(0,H.jsx)(wT,{}):(0,H.jsx)(xT,{})})}),(0,H.jsx)(Z,{children:e.toolName}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(o3,{min:i,cnt:a})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(o3,{min:o,cnt:s})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(o3,{min:c?.remainMin,cnt:l?.remainCnt,showZero:!0,extraMin:c?.mach,extraCnt:l?.mach})}),(0,H.jsx)(Z,{})]}),(0,H.jsx)(Zw,{children:(0,H.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:6,children:(0,H.jsx)(Xp,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,H.jsxs)(J,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`,ml:`1em`,mr:`1em`},children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(c3,{machines:e.machines})}),e.parts.length===0?void 0:(0,H.jsx)(`div`,{children:(0,H.jsx)(s3,{tool:e})})]})})})})]})}function d3({machine:e}){let t=R(G4),n=R(W4);return(0,H.jsxs)(r3,{children:[(0,H.jsx)(Z,{}),(0,H.jsxs)(Z,{children:[`Tool In `,e]}),(0,H.jsx)(Z,{align:`right`,children:`Pocket`}),n?(0,H.jsx)(Z,{children:`Serial`}):void 0,(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(X,{title:`Expected use for all currently scheduled parts.`+(t?` Counts are estimates.`:``),children:(0,H.jsx)(`span`,{children:`Scheduled Use`})})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(X,{title:`Current recorded usage of this tool.`+(t?` Counts are estimates.`:``),children:(0,H.jsx)(`span`,{children:`Current Use`})})}),(0,H.jsxs)(Z,{align:`right`,children:[(0,H.jsx)(X,{title:`Current configured lifetime of this tool.`+(t?` Counts are estimates.`:``),children:(0,H.jsx)(`span`,{children:`Lifetime`})}),` `]}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(X,{title:`Lifetime minus current use.`+(t?` Counts are estimates.`:``),children:(0,H.jsx)(`span`,{children:`Remaining Use`})})}),(0,H.jsx)(Z,{})]})}function f3({report:e,pocket:t}){let[n,r]=(0,L.useState)(!1),i=R(W4),a=i?9:8,o=Q.of(e.parts).filter(e=>e.machines.has(t.machineName)).sumBy(e=>e.scheduledUseMinutes*e.quantity),s=Q.of(e.parts).filter(e=>e.machines.has(t.machineName)).sumBy(e=>e.scheduledUseCnt*e.quantity);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(r3,{$noBorderBottom:!0,children:[(0,H.jsx)(Z,{children:(0,H.jsx)(th,{size:`small`,onClick:()=>r(!n),children:n?(0,H.jsx)(wT,{}):(0,H.jsx)(xT,{})})}),(0,H.jsx)(Z,{children:e.toolName}),(0,H.jsx)(Z,{align:`right`,children:t.pocket}),i?(0,H.jsx)(Z,{children:t.serial??``}):void 0,(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(o3,{min:o,cnt:s})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(o3,{min:t.currentUseMinutes,cnt:t.currentUseCnt})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(o3,{min:t.lifetimeMinutes,cnt:t.lifetimeCnt})}),(0,H.jsx)(Z,{align:`right`,children:(0,H.jsx)(o3,{min:t.remainingMinutes,cnt:t.remainingCnt})}),(0,H.jsx)(Z,{})]}),(0,H.jsx)(Zw,{children:(0,H.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:a,children:(0,H.jsx)(Xp,{in:n,timeout:`auto`,unmountOnExit:!0,children:(0,H.jsx)(s3,{tool:e,machine:t.machineName})})})})]})}var p3=`__Insight__FilterAnyMachine__`,m3=P(null);function h3(){let e=R(m3),t=R(U4);return t===null?(0,H.jsx)(`div`,{}):(0,H.jsxs)(Vw,{stickyHeader:!0,children:[(0,H.jsx)(qw,{children:e===null?(0,H.jsx)(l3,{}):(0,H.jsx)(d3,{machine:e})}),(0,H.jsx)(Ww,{children:t.map(t=>e===null?(0,H.jsx)(u3,{tool:t},t.toolName):(0,H.jsx)(L.Fragment,{children:t.machines.filter(t=>t.machineName===e).map(e=>(0,H.jsx)(f3,{report:t,pocket:e},e.pocket))},t.toolName))})]})}function g3(){let[e,t]=B(m3),[n,r]=B(V4),[i,a]=(0,L.useState)(!1),o=R(H4),s=q4(),c=JI();function l(){a(!0),r(new Date).catch(console.log).finally(()=>a(!1))}return c?(0,H.jsx)(`div`,{}):n===null?(0,H.jsx)(`main`,{style:{margin:`2em`,display:`flex`,justifyContent:`center`},children:(0,H.jsx)(by,{color:`secondary`,size:`large`,variant:`extended`,style:{margin:`2em`},onClick:l,disabled:i,children:(0,H.jsxs)(H.Fragment,{children:[i?(0,H.jsx)(Ym,{size:10,style:{marginRight:`1em`}}):(0,H.jsx)(AT,{fontSize:`inherit`,style:{marginRight:`1em`}}),`Load Tools`]})})}):(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(X,{title:`Refresh Tools`,children:(0,H.jsx)(`div`,{children:(0,H.jsx)(th,{onClick:l,disabled:i,size:`small`,children:i?(0,H.jsx)(Ym,{size:10}):(0,H.jsx)(AT,{fontSize:`inherit`})})})}),(0,H.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`Tools from `,(0,H.jsx)(Zz,{date:n})]}),(0,H.jsx)(`div`,{style:{flexGrow:`1`}}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,displayEmpty:!0,value:e??p3,style:{marginLeft:`1em`},onChange:e=>{e.target.value===p3?t(null):t(e.target.value)},children:[(0,H.jsx)(gS,{value:p3,children:(0,H.jsx)(`em`,{children:`All Machines`})}),o.map(e=>(0,H.jsx)(gS,{value:e,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:s,size:`large`,children:(0,H.jsx)(bT,{})})})]})}function _3(){return YI(`Tool Report`),(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsx)(g3,{}),(0,H.jsx)(`main`,{children:(0,H.jsx)(WU,{children:(0,H.jsx)(h3,{})})})]})}var v3=G(Zw)(()=>({"& > *":{borderBottom:`unset`}}));function y3(e){if(e.length===0)return``;let t=e.lastIndexOf(`\\`);return t>=0&&t<e.length-2?e.substr(t+1):e}var b3=new Intl.NumberFormat(`en-US`,{maximumFractionDigits:2});function x3(e){let[t,n]=(0,L.useState)(!1),r=z($4),i=z(t3),a=8+ +!!e.showCellCtrlCol+ +!!e.showRevCol,o=e.program.toolUse!==null&&e.program.toolUse.tools.length>0&&Q.of(e.program.toolUse.tools).some(e=>e.cycleUsageMinutes>0),s=e.program.toolUse!==null&&e.program.toolUse.tools.length>0&&Q.of(e.program.toolUse.tools).some(e=>e.cycleUsageCnt>0);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(v3,{children:[(0,H.jsx)(Z,{children:e.program.toolUse===null||e.program.toolUse.tools.length===0?void 0:(0,H.jsx)(th,{size:`small`,onClick:()=>n(!t),children:t?(0,H.jsx)(wT,{}):(0,H.jsx)(xT,{})})}),(0,H.jsx)(Z,{children:y3(e.program.programName)}),e.showCellCtrlCol?(0,H.jsx)(Z,{children:e.program.cellControllerProgramName}):void 0,(0,H.jsx)(Z,{children:e.program.partName===null?void 0:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(tW,{part:e.program.partName,size:20}),(0,H.jsx)(`span`,{children:e.program.partName})]})}),(0,H.jsx)(Z,{children:e.program.comment??``}),e.showRevCol?(0,H.jsx)(Z,{children:e.program.revision===null?``:e.program.revision.toFixed()}):void 0,(0,H.jsx)(Z,{align:`right`,children:e.program.statisticalCycleTime===null?``:e.program.statisticalCycleTime.medianMinutesForSingleMat.toFixed(2)}),(0,H.jsx)(Z,{align:`right`,children:e.program.statisticalCycleTime===null?``:e.program.statisticalCycleTime.MAD_aboveMinutes.toFixed(2)}),(0,H.jsx)(Z,{align:`right`,children:e.program.statisticalCycleTime===null?``:e.program.statisticalCycleTime.MAD_belowMinutes.toFixed(2)}),(0,H.jsx)(Z,{align:`right`,children:e.program.plannedMins===null?``:b3.format(e.program.plannedMins)}),(0,H.jsxs)(Z,{children:[(0,H.jsx)(X,{title:`Load Program Content`,children:(0,H.jsx)(th,{size:`small`,onClick:()=>r(e.program),children:(0,H.jsx)(dT,{})})}),e.program.revision===null?void 0:(0,H.jsx)(X,{title:`Revision History`,children:(0,H.jsx)(th,{size:`small`,onClick:()=>i(e.program),children:(0,H.jsx)(Dre,{})})})]})]}),(0,H.jsx)(Zw,{children:(0,H.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:a,children:(0,H.jsx)(Xp,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,H.jsx)(J,{sx:{mr:`1em`,ml:`3em`},children:e.program.toolUse===null||e.program.toolUse.tools.length===0?void 0:(0,H.jsxs)(Vw,{size:`small`,sx:{width:`auto`,ml:`10em`,mr:`1em`},children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:`Tool`}),o?(0,H.jsx)(Z,{align:`right`,children:`Estimated Usage (min)`}):void 0,s?(0,H.jsx)(Z,{align:`right`,children:`Estimated Usage (count)`}):void 0]})}),(0,H.jsx)(Ww,{children:Q.of(e.program.toolUse.tools).map((e,t)=>(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:e.toolName}),o?(0,H.jsx)(Z,{align:`right`,children:e.cycleUsageMinutes===0?``:e.cycleUsageMinutes.toFixed(1)}):void 0,s?(0,H.jsx)(Z,{align:`right`,children:e.cycleUsageCnt===0?``:e.cycleUsageCnt.toFixed(1)}):void 0]},t))})]})})})})})]})}function S3(){let e=R(Q4),[t,n]=(0,L.useState)(`ProgramName`),[r,i]=(0,L.useState)(`asc`);if(e===null)return(0,H.jsx)(`div`,{});let a=Q.of(e.programs).sortWith((e,n)=>{let i=0;switch(t){case`ProgramName`:i=y3(e.programName).localeCompare(y3(n.programName));break;case`CellProgName`:i=e.cellControllerProgramName.localeCompare(n.cellControllerProgramName);break;case`Comment`:i=e.comment===null&&n.comment===null?0:e.comment===null?1:n.comment===null?-1:e.comment.localeCompare(n.comment);break;case`Revision`:i=e.revision===null&&n.revision===null?0:e.revision===null?1:n.revision===null?-1:e.revision-n.revision;break;case`PartName`:i=e.partName===null&&n.partName===null?0:e.partName===null?1:n.partName===null?-1:e.partName.localeCompare(n.partName);break;case`MedianTime`:i=e.statisticalCycleTime===null&&n.statisticalCycleTime===null?0:e.statisticalCycleTime===null?1:n.statisticalCycleTime===null?-1:e.statisticalCycleTime.medianMinutesForSingleMat-n.statisticalCycleTime.medianMinutesForSingleMat;break;case`DeviationAbove`:i=e.statisticalCycleTime===null&&n.statisticalCycleTime===null?0:e.statisticalCycleTime===null?1:n.statisticalCycleTime===null?-1:e.statisticalCycleTime.MAD_aboveMinutes-n.statisticalCycleTime.MAD_aboveMinutes;break;case`DeviationBelow`:i=e.statisticalCycleTime===null&&n.statisticalCycleTime===null?0:e.statisticalCycleTime===null?1:n.statisticalCycleTime===null?-1:e.statisticalCycleTime.MAD_belowMinutes-n.statisticalCycleTime.MAD_belowMinutes;break;case`Planned`:i=e.plannedMins===null&&n.plannedMins===null?0:e.plannedMins===null?1:n.plannedMins===null?-1:e.plannedMins-n.plannedMins}return i===0?0:i<0&&r===`asc`||i>0&&r===`desc`?-1:1});function o(e){e===t?i(r===`asc`?`desc`:`asc`):n(e)}return(0,H.jsxs)(Vw,{stickyHeader:!0,children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{}),(0,H.jsx)(Z,{sortDirection:t===`ProgramName`&&r,children:(0,H.jsx)($w,{active:t===`ProgramName`,direction:r,onClick:()=>o(`ProgramName`),children:`Program Name`})}),e.cellNameDifferentFromProgName?(0,H.jsx)(Z,{sortDirection:t===`CellProgName`&&r,children:(0,H.jsx)($w,{active:t===`CellProgName`,direction:r,onClick:()=>o(`CellProgName`),children:`Cell Controller Program`})}):void 0,(0,H.jsx)(Z,{sortDirection:t===`PartName`&&r,children:(0,H.jsx)($w,{active:t===`PartName`,direction:r,onClick:()=>o(`PartName`),children:`Part`})}),(0,H.jsx)(Z,{sortDirection:t===`Comment`&&r,children:(0,H.jsx)($w,{active:t===`Comment`,direction:r,onClick:()=>o(`Comment`),children:`Comment`})}),e.hasRevisions?(0,H.jsx)(Z,{sortDirection:t===`Revision`&&r,children:(0,H.jsx)($w,{active:t===`Revision`,direction:r,onClick:()=>o(`Revision`),children:`Revision`})}):void 0,(0,H.jsx)(Z,{sortDirection:t===`MedianTime`&&r,align:`right`,children:(0,H.jsx)($w,{active:t===`MedianTime`,direction:r,onClick:()=>o(`MedianTime`),children:`Median Time / Material (min)`})}),(0,H.jsx)(Z,{sortDirection:t===`DeviationAbove`&&r,align:`right`,children:(0,H.jsx)($w,{active:t===`DeviationAbove`,direction:r,onClick:()=>o(`DeviationAbove`),children:`Deviation Above Median`})}),(0,H.jsx)(Z,{sortDirection:t===`DeviationBelow`&&r,align:`right`,children:(0,H.jsx)($w,{active:t===`DeviationBelow`,direction:r,onClick:()=>o(`DeviationBelow`),children:`Deviation Below Median`})}),(0,H.jsx)(Z,{sortDirection:t===`Planned`&&r,align:`right`,children:(0,H.jsx)($w,{active:t===`Planned`,direction:r,onClick:()=>o(`Planned`),children:`Planned Time (min)`})}),(0,H.jsx)(Z,{})]})}),(0,H.jsx)(Ww,{children:Q.of(a).map((t,n)=>(0,H.jsx)(x3,{program:t,showCellCtrlCol:e.cellNameDifferentFromProgName,showRevCol:e.hasRevisions},n))})]})}function C3(){let e=R(e3),[t,n]=(0,L.useState)(null),r=(0,L.useMemo)(()=>new Worker(new URL(`/assets/ProgramHighlight-C6zSEXCX.js`,``+import.meta.url),{type:`module`}),[]);return(0,L.useEffect)(()=>{let e=e=>n(e),t=t=>e(t.data);return r.addEventListener(`message`,t),()=>{e=()=>null,r.removeEventListener(`message`,t),r.terminate(),n(null)}},[r]),(0,L.useEffect)(()=>{e&&e!==``&&r.postMessage(e,[])},[e,r]),(0,H.jsx)(`pre`,{children:t===null?(0,H.jsx)(`code`,{className:`gcode`,children:e}):(0,H.jsx)(`code`,{className:`gcode`,dangerouslySetInnerHTML:{__html:t}})})}function w3(){let[e,t]=B($4),n=R(t3);return(0,H.jsxs)(py,{open:e!==null&&n===null,onClose:()=>t(null),maxWidth:`lg`,children:[(0,H.jsx)(gy,{children:e?.partName?(0,H.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`},children:[(0,H.jsx)(tW,{part:e.partName}),(0,H.jsxs)(`div`,{style:{marginLeft:`10px`,marginRight:`3em`},children:[e?.programName??`Program`,` `,e?.revision?` rev`+e.revision.toFixed():``,` `,(0,H.jsxs)(q,{variant:`subtitle1`,component:`span`,children:[`(`,e.partName,`)`]})]})]}):(0,H.jsxs)(H.Fragment,{children:[e?.programName??`Program`,` `,e?.revision?` rev`+e.revision.toFixed():``]})}),(0,H.jsx)(hy,{children:e===null||n!==null?(0,H.jsx)(`div`,{}):(0,H.jsx)(WU,{children:(0,H.jsx)(C3,{})})}),(0,H.jsx)(my,{children:(0,H.jsx)(Y,{onClick:()=>t(null),children:`Close`})})]})}var T3=10;function E3(e){let t=R(t3),n=z($4);return(0,H.jsxs)(Vw,{children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:`Revision`}),(0,H.jsx)(Z,{children:`Comment`}),(0,H.jsx)(Z,{children:`Cell Controller Program`}),(0,H.jsx)(Z,{})]})}),(0,H.jsx)(Ww,{children:e.loading?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Zw,{children:(0,H.jsx)(Z,{colSpan:4,children:(0,H.jsx)(Ym,{})})}),Q.ofRange(0,9).map(e=>(0,H.jsx)(Zw,{children:(0,H.jsx)(Z,{colSpan:4})},e))]}):Q.of(e.revisions).drop(e.page*T3).take(T3).map(e=>(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:e.revision}),(0,H.jsx)(Z,{children:e.comment??``}),(0,H.jsx)(Z,{children:e.cellControllerProgramName??``}),(0,H.jsx)(Z,{children:(0,H.jsx)(X,{title:`Load Program Content`,children:(0,H.jsx)(th,{size:`small`,onClick:()=>n({...e,partName:t?.partName??null}),children:(0,H.jsx)(dT,{})})})})]},e.revision))})]})}function D3(){let[e,t]=B(t3),[n,r]=B($4),[i,a]=(0,L.useState)(null),[o,s]=(0,L.useState)({page:0,hasMore:!1}),[c,l]=(0,L.useState)(0),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(null);(0,L.useEffect)(()=>{(async()=>{if(e===null)a(null),l(0),s({page:0,hasMore:!1});else if(e!==null&&i===null){d(!0),p(null);try{let t=await Gt.getProgramRevisionsInDescendingOrderOfRevision(e.programName,T3,void 0);a(t),s({page:0,hasMore:t.length===T3})}catch(e){p(e instanceof Error?e:String(e))}finally{d(!1)}}})().catch(console.error)},[e,i]);function m(){if(c<o.page)l(c+1);else if(o.hasMore&&e!==null&&i!==null&&i.length>0){d(!0),p(null);let t=i[i.length-1];Gt.getProgramRevisionsInDescendingOrderOfRevision(e.programName,T3,t?t.revision-1:void 0).then(e=>{a(t=>t===null?e:t.concat(e)),s({page:c+1,hasMore:e.length===T3}),l(c+1)}).catch(p).finally(()=>d(!1))}}return(0,H.jsxs)(py,{open:e!==null,onClose:()=>t(null),maxWidth:`lg`,children:[(0,H.jsx)(gy,{children:e?.partName?(0,H.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`},children:[(0,H.jsx)(tW,{part:e.partName}),(0,H.jsxs)(`div`,{style:{marginLeft:`10px`,marginRight:`3em`},children:[e.programName??`Program`,` `,(0,H.jsxs)(q,{variant:`subtitle1`,component:`span`,children:[`(`,e.partName,`)`]})]})]}):(0,H.jsx)(H.Fragment,{children:e?.programName??`Program`})}),(0,H.jsxs)(hy,{children:[f===null?void 0:(0,H.jsx)(wv,{children:(0,H.jsx)(Ov,{children:typeof f==`string`?f:f.message})}),n===null?i===null?u?(0,H.jsx)(Ym,{}):void 0:(0,H.jsx)(E3,{page:c,revisions:i,loading:u}):(0,H.jsx)(WU,{children:(0,H.jsx)(C3,{})})]}),(0,H.jsx)(my,{children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,width:`100%`},children:[n===null?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{title:`Latest Revisions`,children:(0,H.jsx)(`span`,{children:(0,H.jsx)(th,{onClick:()=>l(0),disabled:u||c===0,size:`large`,children:(0,H.jsx)(_T,{})})})}),(0,H.jsx)(X,{title:`Previous Page`,children:(0,H.jsx)(`span`,{children:(0,H.jsx)(th,{onClick:()=>l(c-1),disabled:u||c===0,size:`large`,children:(0,H.jsx)(ST,{})})})}),(0,H.jsx)(X,{title:`Next Page`,children:(0,H.jsx)(`span`,{children:(0,H.jsx)(th,{onClick:()=>m(),disabled:u||c===o.page&&!o.hasMore,size:`large`,children:(0,H.jsx)(CT,{})})})})]}):void 0,(0,H.jsx)(`div`,{style:{flexGrow:1}}),n===null?void 0:(0,H.jsx)(Y,{onClick:()=>r(null),children:`Back to History`}),(0,H.jsx)(Y,{onClick:()=>t(null),children:`Close`})]})})]})}function O3(){let[e,t]=B(Z4),[n,r]=(0,L.useState)(!1),i=JI(),[a,o]=B(Y4);function s(){r(!0),t(new Date).catch(console.log).finally(()=>r(!1))}return i?(0,H.jsx)(`div`,{}):e===null?(0,H.jsx)(`main`,{style:{margin:`2em`,display:`flex`,justifyContent:`center`},children:(0,H.jsx)(by,{color:`secondary`,size:`large`,variant:`extended`,style:{margin:`2em`},onClick:s,disabled:n,children:(0,H.jsxs)(H.Fragment,{children:[n?(0,H.jsx)(Ym,{size:10,style:{marginRight:`1em`}}):(0,H.jsx)(AT,{fontSize:`inherit`,style:{marginRight:`1em`}}),`Load Programs`]})})}):(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(X,{title:`Refresh Programs`,children:(0,H.jsx)(`div`,{children:(0,H.jsx)(th,{onClick:s,disabled:n,size:`small`,children:n?(0,H.jsx)(Ym,{size:10}):(0,H.jsx)(AT,{fontSize:`inherit`})})})}),(0,H.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`Programs from `,(0,H.jsx)(Zz,{date:e})]}),(0,H.jsx)(`div`,{style:{flexGrow:1}}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,value:a,onChange:e=>o(e.target.value),children:[(0,H.jsx)(gS,{value:`AllPrograms`,children:`All Programs`},`AllPrograms`),(0,H.jsx)(gS,{value:`ActivePrograms`,children:`Active Programs`},`ActivePrograms`)]})})]})}function k3(){return YI(`Programs`),(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsx)(O3,{}),(0,H.jsx)(`main`,{children:(0,H.jsx)(WU,{children:(0,H.jsx)(S3,{})})}),(0,H.jsx)(w3,{}),(0,H.jsx)(D3,{})]})}var A3=P(!1),j3=A3,M3=P(null),N3=M3;function P3(e){let t=new Date,n=QT(t,-30),r=Ut.currentStatus().then(t=>e(GR,t)),i=Ut.recent(n,[]).then(t=>e(UR,t)),a=Wt.get(n,t).then(t=>e(WR,t));Promise.all([r,i,a]).catch(t=>e(M3,t.message??`Error`)).finally(()=>e(A3,!1))}function F3(e,t,n){let r=new Date,i=Ut.currentStatus().then(e=>n(GR,e)),a=Ut.recent(QT(r,-30),t?Array.from(t):[]).then(e=>n(UR,e)),o=Wt.recent(e,void 0).then(e=>n(WR,e));Promise.all([i,a,o]).catch(e=>n(M3,e.message??`Error`)).finally(()=>n(A3,!1))}var I3=class{constructor(e){this.userCalledClose=!1,this.reconnectAttempts=0,this.url=e,this.connect()}close(){this.userCalledClose=!0,this.ws?.close()}connect(){if(this.userCalledClose)return;this.ws=new WebSocket(this.url);let e=this.ws,t=setTimeout(()=>{e.close()},2e3);e.addEventListener(`open`,()=>{clearTimeout(t),this.reconnectAttempts=0,this.handleOpen?.()}),e.addEventListener(`close`,()=>{if(clearTimeout(t),this.ws=void 0,this.userCalledClose)return;this.handleReconnecting?.();let e=Math.min(1e3*1.5**this.reconnectAttempts,3e4);setTimeout(()=>{this.reconnectAttempts++,this.connect()},e)}),e.addEventListener(`message`,e=>{this.handleMessage?.(e)})}},L3=P(null,(e,t)=>{let n=e(VR),r=e(SO);t(A3,!0),t(M3,null),n==null?P3(t):F3(n,r,t)}),R3=P(null,(e,t,n)=>{t(HR,{evt:Oe.fromJS(JSON.parse(n.data)),now:new Date,expire:!0})});function z3(){let e=z(L3),t=z(A3),n=(0,L.useCallback)(()=>t(!0),[t]),r=z(R3),i=R(br),a=(0,L.useRef)(null);return(0,L.useEffect)(()=>{if(a.current)return;let t=i.user??null,o=window.location,s;if(o.protocol===`backup:`)return;s=o.protocol===`https:`?`wss:`:`ws:`,s+=`//`+o.host+`/api/v1/events`,t&&(s+=`?token=`+encodeURIComponent(t.access_token));let c=new I3(s);return c.handleOpen=e,c.handleReconnecting=n,c.handleMessage=r,a.current=c,()=>{a.current&&=(a.current.close(),null)}},[i,r,e,n]),null}var B3=[{id:0,label:`Date`,numeric:!1,getDisplay:e=>e.routeStartTime.toLocaleString(),getForSort:e=>e.routeStartTime.getTime(),getForExport:e=>e.routeStartTime.toISOString()},{id:1,label:`Part`,numeric:!1,getDisplay:e=>e.partName},{id:2,label:`Scheduled`,numeric:!0,getDisplay:e=>e.scheduledQty.toString(),getForSort:e=>e.scheduledQty},{id:3,label:`Removed`,numeric:!0,getDisplay:e=>e.decrementedQty.toString(),getForSort:e=>e.decrementedQty},{id:4,label:`Completed`,numeric:!0,getDisplay:e=>e.completedQty.toString()}];function V3({job:e}){let[t,n]=(0,L.useState)(!1);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(MX,{children:[B3.map(t=>(0,H.jsx)(Z,{align:t.numeric?`right`:`left`,children:t.id===1?(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(tW,{part:e.partName,size:25})}),(0,H.jsx)(`div`,{children:e.partName})]}):t.getDisplay(e)},t.id)),(0,H.jsx)(Z,{children:(0,H.jsx)(X,{title:`Show Details`,children:(0,H.jsx)(th,{size:`small`,onClick:()=>n(!t),children:t?(0,H.jsx)(wT,{}):(0,H.jsx)(xT,{})})})})]}),(0,H.jsx)(NX,{children:(0,H.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:B3.length+1,children:(0,H.jsx)(Xp,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,H.jsx)(hJ,{job:e.inProcJob?e.inProcJob:e.historicJob,checkAnalysisMonth:!0})})})})]})}function H3(){let e=R(ZR),t=d0(),n=u0(e),r=f0(0,B3),i=R(e.type===`Last30`?_L:yL),a=R(e.type===`Last30`?bO:wO),o=(0,L.useMemo)(()=>Xq(n.zoomRange,i.matsById,a,null),[n,i.matsById,a]),s=(0,L.useMemo)(()=>Q.of(o).sortBy(r.sortOn).drop(t.page*t.rowsPerPage).take(t.rowsPerPage),[o,r,t]);return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(Vw,{stickyHeader:!0,children:[(0,H.jsx)(r0,{columns:B3,sort:r,showDetailsCol:!0,copyToClipboardRows:o}),(0,H.jsx)(Ww,{children:s.map((e,t)=>(0,H.jsx)(V3,{job:e},e.historicJob?.unique??e.inProcJob?.unique??t))})]}),(0,H.jsx)(c0,{tpage:t,zoom:n.zoom,count:o.length})]})}function U3(){return YI(`Scheduled Jobs`),(0,H.jsx)(H.Fragment,{children:(0,H.jsx)(`main`,{style:{padding:`24px`},children:(0,H.jsx)(H3,{})})})}function W3(){YI(`Quality`);let e=R(ZR),t=R(e.type===`Last30`?lL:dL),n=e.type===`Last30`?`Last30Days`:`ZoomIntoRange`,r=e.type===`Last30`?[QT(xE(),-29),QT(xE(),1)]:[e.month,$T(e.month,1)];return(0,H.jsx)(A0,{subtitle:`Inspection decisions grouped by path`,inspectionlogs:t,zoomType:n,default_date_range:r})}var G3={display:`flex`,backgroundColor:`#E0E0E0`,paddingLeft:`24px`,paddingRight:`24px`,paddingBottom:`4px`,height:`2.5em`,alignItems:`flex-end`},K3={display:`flex`,alignSelf:`center`,alignItems:`flex-end`},q3=`@@all_inspection_display@@`,J3=`@@recent_completed_material@@`;function Y3(e){return typeof e==`string`?e.split(`,`):e}function cae(){let[e,t]=B($q);return(0,H.jsx)(Py,{control:(0,H.jsx)(Hv,{size:`small`,checked:e,onChange:e=>t(e.target.checked)}),label:`Hide Non-Loading Material`,sx:{pl:2,pr:2}})}function X3(){let[e,t]=B(qI),n=R(NL),r=Q.of(Object.keys(R(zO).queues)).toSortedArray(e=>e),i=R(br),a=iT(zd().breakpoints.down(`md`));function o(n){let r=parseFloat(n);!isNaN(r)&&isFinite(r)&&(e.route===$.Station_LoadMonitor?t({route:$.Station_LoadMonitor,loadNum:r,queues:e.queues,completed:e.completed}):t({route:$.Station_LoadMonitor,loadNum:r,queues:[],completed:!1}))}function s(e){t(e===q3?{route:$.Station_InspectionMonitor}:{route:$.Station_InspectionMonitorWithType,inspType:e})}function c(n){let r=n.includes(J3);n=n.filter(e=>e!==J3).slice(0,2),e.route===$.Station_LoadMonitor?t({route:$.Station_LoadMonitor,loadNum:e.loadNum,queues:n,completed:r}):t({route:$.Station_LoadMonitor,loadNum:1,queues:n,completed:r})}function l(e){t({route:$.Station_Queues,queues:e})}let u=`LoadUnload`,d=1,f=null,p=[];switch(e.route){case $.Station_LoadMonitor:u=`LoadUnload`,d=e.loadNum,p=e.queues,e.completed&&(p=p.concat(J3));break;case $.Station_InspectionMonitor:u=`Inspection`,f=``;break;case $.Station_InspectionMonitorWithType:u=`Inspection`,f=e.inspType;break;case $.Station_Queues:u=`Queues`,p=e.queues;break;case $.Station_Closeout:u=`CloseOut`;break;default:u=`AllMaterial`}return(0,H.jsxs)(J,{component:`nav`,sx:a?G3:K3,children:[u===`LoadUnload`?i.loadStationNames&&Object.keys(i.loadStationNames).length>0?(0,H.jsx)(xC,{value:d,onChange:e=>o(e.target.value.toString()),variant:`standard`,style:{marginLeft:`1em`,minWidth:`8em`},children:Q.of(Object.entries(i.loadStationNames)).sortBy(([e])=>parseInt(e)).map(([e,t])=>(0,H.jsx)(gS,{value:parseInt(e),children:t},e))},`loadnumselect`):(0,H.jsx)(rb,{type:`number`,placeholder:`Load Station Number`,value:d,onChange:e=>o(e.target.value),style:{width:`3em`,marginLeft:`1em`}},`loadnumselect`):void 0,u===`Inspection`?(0,H.jsxs)(xC,{value:f||q3,onChange:e=>s(e.target.value),variant:`standard`,style:{marginLeft:`1em`},children:[(0,H.jsx)(gS,{value:q3,children:(0,H.jsx)(`em`,{children:`All`})},q3),Q.of(n).sortBy(e=>e).map(e=>(0,H.jsx)(gS,{value:e,children:e},e))]},`inspselect`):void 0,u===`LoadUnload`?(0,H.jsxs)(Ay,{style:{marginLeft:`1em`},children:[p.length===0?(0,H.jsx)(`label`,{style:{position:`absolute`,top:`10px`,left:0,color:`rgba(0,0,0,0.54)`,fontSize:`0.9rem`},children:`Display queue(s)`}):void 0,(0,H.jsxs)(xC,{multiple:!0,displayEmpty:!0,variant:`standard`,value:p,inputProps:{id:`queueselect`},style:{minWidth:`10em`,marginTop:`0`},onChange:e=>c(Y3(e.target.value)),children:[r.map((e,t)=>(0,H.jsx)(gS,{value:e,children:e},t)),(0,H.jsx)(gS,{value:J3,children:(0,H.jsx)(`i`,{children:`Completed`})}),(0,H.jsx)(vy,{}),(0,H.jsx)(cae,{})]})]}):void 0,u===`Queues`?(0,H.jsxs)(Ay,{style:{marginLeft:`1em`,minWidth:`10em`},children:[p.length===0?(0,H.jsx)(`label`,{style:{position:`absolute`,top:`10px`,left:0,color:`rgba(0,0,0,0.54)`,fontSize:`0.9rem`},children:`Select queue(s)`}):void 0,(0,H.jsx)(xC,{multiple:!0,displayEmpty:!0,variant:`standard`,value:p,inputProps:{id:`queueselect`},style:{marginTop:`0`},onChange:e=>l(Y3(e.target.value)),children:r.map((e,t)=>(0,H.jsx)(gS,{value:e,children:e},t))})]}):void 0]})}function Z3(){let e=iT(zd().breakpoints.down(`md`));return(0,H.jsx)(J,{sx:{display:`flex`,alignItems:`center`,height:`100%`,bgcolor:e?`#E0E0E0`:void 0},children:(0,H.jsx)(W2,{full:e})})}var Q3=NO(`shift-starts`,[[1,360],[2,840],[3,1320]]),$3=P(e=>new Map(e(Q3)),(e,t,n)=>{let r=new Map(e(Q3));n(r),t(Q3,Array.from(r.entries()))});function e6(e){let t=R($3);return(0,L.useMemo)(()=>{let n=[];for(let e=1;e<=3;e++){let r=t.get(e);r!==void 0&&(n.length>=1&&n[n.length-1]>=r||n.push(r))}if(n.length===0)return[{start:e,end:QT(e,1)}];let r=cE(QT(e,1),n[0]),i=[];for(let t=0;t<n.length;t++)i.push({start:cE(e,n[t]),end:t===n.length-1?r:cE(e,n[t+1])});return i},[t,e])}function lae(e){let[t,n]=e.split(`:`);return parseInt(t,10)*60+parseInt(n,10)}function uae(e){let t=Math.floor(e/60),n=e%60;return`${t.toString().padStart(2,`0`)}:${n.toString().padStart(2,`0`)}`}function dae(e,t){let n=t.get(e);if(n===void 0)return!1;if(e===1){let e=t.get(2)??t.get(3);return e!==void 0&&e<=n}if(e===2){let e=t.get(1),r=t.get(3);return e!==void 0&&e>=n||r!==void 0&&r<=n}if(e===3){let e=t.get(2)??t.get(1);return e!==void 0&&e>=n}return!1}function t6({shiftNum:e}){let[t,n]=B($3),r=t.get(e);return(0,H.jsx)(nT,{type:`time`,label:`Shift ${e} Start`,error:dae(e,t),value:r===void 0?``:uae(r),onChange:t=>{let r=t.target.value;n(r===``?t=>t.delete(e):t=>t.set(e,lae(r)))},variant:`standard`,size:`small`,slotProps:{inputLabel:{shrink:!0},input:e===1?void 0:{endAdornment:(0,H.jsx)(X,{title:`Clear/Disable Shift`,children:(0,H.jsx)(Em,{sx:{mb:`4px`},onClick:()=>n(t=>t.delete(e)),children:(0,H.jsx)(uT,{fontSize:`small`})})})}}})}function fae(){return(0,H.jsxs)(uw,{direction:`row`,spacing:2,children:[(0,H.jsx)(t6,{shiftNum:1}),(0,H.jsx)(t6,{shiftNum:2}),(0,H.jsx)(t6,{shiftNum:3})]})}function n6(e,t){return n=>{let r=e(n);for(let e=0;e<t.length;e++){let i=t[e];if(r>=i.start&&r<i.end)return{val:n,shift:e}}return null}}function pae(e,t){return Q.of(e).filter(e=>e.finalProcess).collect(n6(e=>e.completeTime,t)).toLookupOrderedMap(e=>e.val.partName,e=>e.shift,e=>e.val.quantity,(e,t)=>e+t)}function mae(e,t){return e.valuesToLazySeq().filter(e=>rk(e)&&e.operation===`UNLOAD`&&Q.of(e.material).some(e=>e.proc===e.numproc)).collect(n6(e=>e.endTime,t)).toLookupOrderedMap(e=>e.val.part,e=>e.shift,e=>Q.of(e.val.material).sumBy(e=>+(e.proc===e.numproc)),(e,t)=>e+t)}function hae(e){let t=R(hk),n=R($I),r=e6(e);return(0,L.useMemo)(()=>{let e=pae(n,r),i=mae(t,r);return e.mapValues(e=>({planned:e})).adjust(i,(e,t)=>e?{...e,completed:t}:{completed:t}).toAscLazySeq().map(([e,{planned:t,completed:n}])=>({part:e,planned:t??pO.empty(),completed:n??pO.empty()})).toRArray()},[t,n,r])}var gae=new Intl.DateTimeFormat(void 0,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`});function _ae({row:e}){return(0,H.jsxs)(uw,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,H.jsx)(tW,{part:e.part,size:25}),(0,H.jsx)(`span`,{children:e.part})]})}function vae(e){let t=e6(e).length;return(0,L.useMemo)(()=>{let e=[{id:0,numeric:!1,label:`Part`,getDisplay:e=>e.part,getForTotal:()=>0,Cell:_ae},{id:1,numeric:!0,label:`Shift 1 Planned`,getDisplay:e=>e.planned.get(0)?.toString()??``,getForSort:e=>e.planned.get(0)??0,getForTotal:e=>e.planned.get(0)??0},{id:4,numeric:!0,label:`Shift 1 Completed`,getDisplay:e=>e.completed.get(0)?.toString()??``,getForSort:e=>e.completed.get(0)??0,getForTotal:e=>e.completed.get(0)??0}];return t>=2&&(e.push({id:2,numeric:!0,label:`Shift 2 Planned`,getDisplay:e=>e.planned.get(1)?.toString()??``,getForSort:e=>e.planned.get(1)??0,getForTotal:e=>e.planned.get(1)??0}),e.push({id:5,numeric:!0,label:`Shift 2 Completed`,getDisplay:e=>e.completed.get(1)?.toString()??``,getForSort:e=>e.completed.get(1)??0,getForTotal:e=>e.completed.get(1)??0})),t===3&&(e.push({id:3,numeric:!0,label:`Shift 3 Planned`,getDisplay:e=>e.planned.get(2)?.toString()??``,getForSort:e=>e.planned.get(2)??0,getForTotal:e=>e.planned.get(2)??0}),e.push({id:6,numeric:!0,label:`Shift 3 Completed`,getDisplay:e=>e.completed.get(2)?.toString()??``,getForSort:e=>e.completed.get(2)??0,getForTotal:e=>e.completed.get(2)??0})),e},[t])}function yae({columns:e,rows:t}){return(0,H.jsx)(Zw,{children:e.map(e=>(0,H.jsx)(Z,{align:e.numeric?`right`:`left`,children:e.id===0?`Total`:Q.of(t).sumBy(e.getForTotal)},e.id))})}var bae=(0,L.memo)(function({columns:e,rows:t}){let n=f0(0,e);return(0,H.jsx)(J,{sx:{overflowX:`auto`},children:(0,H.jsxs)(Vw,{stickyHeader:!0,children:[(0,H.jsx)(r0,{columns:e,sort:n,showDetailsCol:!1}),(0,H.jsx)(l0,{columns:e,pageData:Q.of(t).toSortedArray(n.sortOn,e=>e.part)}),(0,H.jsx)(hne,{children:(0,H.jsx)(yae,{columns:e,rows:t})})]})})});function xae({day:e,setDay:t}){let n=xE();return(0,H.jsxs)(uw,{direction:`row`,spacing:2,sx:{alignItems:`center`},children:[(0,H.jsx)(X,{title:`Previous Day`,children:(0,H.jsx)(`div`,{children:(0,H.jsx)(th,{disabled:e<=QT(n,-28),onClick:()=>t(e=>QT(e,-1)),children:(0,H.jsx)(LT,{})})})}),(0,H.jsx)(q,{sx:{minWidth:`14em`,textAlign:`center`},children:gae.format(e)}),(0,H.jsx)(X,{title:`Next Day`,children:(0,H.jsx)(`div`,{children:(0,H.jsx)(th,{disabled:e>=n,onClick:()=>t(e=>QT(e,1)),children:(0,H.jsx)(IT,{})})})})]})}var Sae=`"shifts day export" auto / 1fr 1fr 1fr`,Cae=`"shifts export" auto
|
|
355
|
+
"day day" auto / 1fr auto`,wae=function({day:e,setDay:t,columns:n,rows:r}){return(0,H.jsxs)(J,{component:`nav`,sx:{display:`grid`,gridTemplate:{md:Sae,xs:Cae},minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(J,{sx:{gridArea:`shifts`,justifySelf:`flex-start`},children:(0,H.jsx)(fae,{})}),(0,H.jsx)(J,{sx:{gridArea:`day`,justifySelf:`center`},children:(0,H.jsx)(xae,{day:e,setDay:t})}),(0,H.jsx)(J,{sx:{gridArea:`export`,justifySelf:`flex-end`},children:(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{onClick:()=>m0(n,r),children:(0,H.jsx)(bT,{})})})})]})};function Tae(){YI(`Recent Completed Parts`);let[e,t]=(0,L.useState)(xE),n=vae(e),r=hae(e);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsx)(wae,{day:e,setDay:t,rows:r,columns:n}),(0,H.jsx)(`main`,{children:(0,H.jsx)(bae,{rows:r,columns:n})})]})}function Eae(){let[e,t]=(0,L.useState)(!1);function n(){t(!0),Ht.enableVerboseLoggingForFiveMinutes(),setTimeout(()=>t(!1),3e5)}return(0,H.jsx)(`main`,{style:{marginTop:`4em`},children:(0,H.jsxs)(`div`,{style:{maxWidth:`50em`,marginLeft:`auto`,marginRight:`auto`,textAlign:`center`},children:[(0,H.jsx)(`p`,{style:{marginBottom:`1em`},children:`Verbose logging generates a large amount of additional data in the FMS Insight Server debug log file.`}),(0,H.jsx)(Y,{disabled:e,onClick:n,variant:`contained`,children:e?(0,H.jsx)(`span`,{children:`Verbose Logging is Enabled`}):(0,H.jsx)(`span`,{children:`Enable Verbose Logging For 5 minutes`})})]})})}function Dae(){return(0,H.jsxs)(`svg`,{width:`30px`,height:`30px`,viewBox:`0 0 170 170`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,H.jsxs)(`defs`,{children:[(0,H.jsx)(`path`,{id:`t`,d:`m307.5 125v77.5h-40c6.92-6.52 11.25-10.6 12.98-12.23 10.65-10.04 13.56-25.81 7.21-38.99-1.7-3.5-5.92-12.26-12.69-26.28z`}),(0,H.jsx)(`path`,{id:`ag`,d:`m273.88 120.52c-0.13 0.28-4.87 3.3-11.17 0.5-6.3-2.81-11.99-9.96-11.67-10.67 0.32-0.72 9.44-1.27 15.74 1.53 6.3 2.81 7.23 8.35 7.1 8.64z`}),(0,H.jsx)(`path`,{id:`m`,d:`m259 102.25c-0.13 0.29-4.2 3.61-9.02 1.46-4.81-2.14-8.75-8.51-8.43-9.23 0.31-0.71 7.69-2.05 12.5 0.1 4.82 2.14 5.07 7.39 4.95 7.67z`}),(0,H.jsx)(`path`,{id:`x`,d:`m282.79 114.2c-0.2 0.24-5.59 1.84-10.87-2.59-5.29-4.44-8.78-12.88-8.28-13.48 0.5-0.59 9.42 1.38 14.7 5.82 5.29 4.43 4.65 10.02 4.45 10.25z`}),(0,H.jsx)(`path`,{id:`k`,d:`m268.39 125.43c-0.12-0.28-4.33-3.54-9.45-1.26s-9.41 8.81-9.1 9.52c0.32 0.71 8.05 1.89 13.17-0.39s5.51-7.58 5.38-7.87z`}),(0,H.jsx)(`path`,{id:`ae`,d:`m243.83 111.58c0 0.31-2.61 5-8.43 5s-12.65-4.22-12.65-5 6.83-5 12.65-5 8.43 4.69 8.43 5z`}),(0,H.jsx)(`path`,{id:`l`,d:`m304.24 109.88c-0.31 0.04-5.38-2.38-6.34-9.21s2.09-15.44 2.86-15.55 6.08 7.33 7.04 14.16-3.25 10.55-3.56 10.6z`}),(0,H.jsx)(`path`,{id:`u`,d:`m306.79 80.57c-0.31 0.05-5.31-1.83-6.1-7.47-0.79-5.63 2.45-12.84 3.23-12.95 0.77-0.11 5.88 5.92 6.67 11.56s-3.49 8.82-3.8 8.86z`}),(0,H.jsx)(`path`,{id:`a`,d:`m306.13 58.04c-0.31 0.05-5.23-1.3-5.86-5.74-0.62-4.43 2.83-10.24 3.6-10.34 0.77-0.11 5.68 4.51 6.31 8.95 0.62 4.44-3.74 7.09-4.05 7.13z`}),(0,H.jsx)(`path`,{id:`f`,d:`m295.52 118.45c-0.29 0.13-6.1-1.39-9.5-9.02-3.39-7.64-3.53-18.31-2.82-18.63 0.72-0.32 8.56 6.93 11.96 14.56s0.64 12.97 0.36 13.09z`}),(0,H.jsx)(`path`,{id:`b`,d:`m272.35 90.11c-0.26 0.19-5.76 0.58-9.58-4.67-3.82-5.26-4.88-13.9-4.25-14.36s8.52 3.23 12.34 8.48 1.74 10.37 1.49 10.55z`}),(0,H.jsx)(`path`,{id:`s`,d:`m289.97 85.66c-0.28 0.13-5.97-0.97-9.17-7.84-3.21-6.87-3.15-16.73-2.44-17.06s8.3 5.96 11.5 12.83 0.4 11.94 0.11 12.07z`}),(0,H.jsx)(`path`,{id:`n`,d:`m270.16 65.57c-0.28 0.14-5.38 0.38-7.35-3.65-1.96-4.03-0.48-10.62 0.22-10.96s6.8 2.54 8.77 6.58c1.97 4.03-1.36 7.9-1.64 8.03z`}),(0,H.jsx)(`path`,{id:`ah`,d:`m250 80c-0.17 0.26-4.4 3.11-8.12 0.69s-5.79-8.79-5.37-9.45c0.43-0.65 7.1-1.35 10.82 1.06 3.72 2.42 2.84 7.44 2.67 7.7z`}),(0,H.jsx)(`path`,{id:`y`,d:`m236.47 96.58c-0.11 0.29-3.72 3.89-7.83 2.23-4.12-1.66-7.37-7.53-7.07-8.25 0.29-0.72 6.7-2.68 10.81-1.02 4.12 1.66 4.21 6.75 4.09 7.04z`}),(0,H.jsx)(`path`,{id:`aa`,d:`m290.52 56.48c-0.28 0.14-5.35 0.58-7.44-3.33-2.08-3.92-0.8-10.5-0.11-10.87s6.86 2.25 8.94 6.17c2.09 3.92-1.12 7.88-1.39 8.03z`}),(0,H.jsx)(`path`,{id:`af`,d:`m274.18 138.46c-0.16-0.26-5.28-2.6-11.13 1.06s-10.48 11.53-10.07 12.19 9.52-0.05 15.37-3.71 6-9.27 5.83-9.54z`}),(0,H.jsx)(`path`,{id:`z`,d:`m247.89 137.78c0.11 0.29-0.65 5.6-6.08 7.69-5.43 2.08-13.32 0.59-13.6-0.14s4.58-7.11 10.01-9.2c5.44-2.08 9.56 1.36 9.67 1.65z`}),(0,H.jsx)(`path`,{id:`h`,d:`m235.06 125.39c0.1 0.3-0.26 5.38-4.46 6.83-4.19 1.44-10.49-0.85-10.75-1.59-0.25-0.74 3.3-6.42 7.5-7.87 4.19-1.44 7.61 2.34 7.71 2.63z`}),(0,H.jsx)(`path`,{id:`ab`,d:`m317.14 85.63c0.28 0.13 5.97-0.98 9.17-7.85 3.21-6.87 3.14-16.72 2.44-17.05-0.71-0.33-8.3 5.95-11.5 12.82-3.21 6.87-0.4 11.94-0.11 12.08z`}),(0,H.jsx)(`path`,{id:`ac`,d:`m299.61 124.96v77.5h40c-6.93-6.52-11.25-10.6-12.99-12.23-10.64-10.03-13.56-25.81-7.2-38.99 1.69-3.5 5.92-12.26 12.69-26.28z`}),(0,H.jsx)(`path`,{id:`c`,d:`m348.11 102.22c0.13 0.28 4.2 3.6 9.01 1.46 4.82-2.15 8.76-8.52 8.44-9.23-0.32-0.72-7.69-2.05-12.5 0.09-4.82 2.14-5.08 7.39-4.95 7.68z`}),(0,H.jsx)(`path`,{id:`p`,d:`m324.32 114.17c0.2 0.24 5.59 1.83 10.87-2.6 5.29-4.43 8.78-12.87 8.28-13.47s-9.42 1.38-14.71 5.81c-5.28 4.43-4.64 10.02-4.44 10.26z`}),(0,H.jsx)(`path`,{id:`o`,d:`m338.71 125.4c0.13-0.29 4.34-3.55 9.46-1.27s9.41 8.81 9.09 9.52c-0.31 0.72-8.04 1.9-13.16-0.38s-5.51-7.59-5.39-7.87z`}),(0,H.jsx)(`path`,{id:`j`,d:`m363.28 111.54c0 0.32 2.61 5 8.43 5s12.65-4.21 12.65-5c0-0.78-6.83-5-12.65-5s-8.43 4.69-8.43 5z`}),(0,H.jsx)(`path`,{id:`w`,d:`m311.59 118.42c0.29 0.12 6.1-1.4 9.49-9.03 3.4-7.63 3.54-18.31 2.82-18.63-0.71-0.32-8.55 6.93-11.95 14.56s-0.64 12.97-0.36 13.1z`}),(0,H.jsx)(`path`,{id:`i`,d:`m334.76 90.08c0.25 0.18 5.76 0.57 9.58-4.68 3.81-5.25 4.88-13.9 4.25-14.36s-8.53 3.23-12.34 8.48c-3.82 5.26-1.74 10.37-1.49 10.56z`}),(0,H.jsx)(`path`,{id:`r`,d:`m333.23 120.48c0.12 0.29 4.86 3.31 11.17 0.5 6.3-2.81 11.98-9.96 11.67-10.67-0.32-0.71-9.44-1.27-15.74 1.53-6.3 2.81-7.23 8.35-7.1 8.64z`}),(0,H.jsx)(`path`,{id:`ad`,d:`m336.95 65.54c0.28 0.13 5.38 0.38 7.35-3.66 1.96-4.03 0.48-10.61-0.22-10.96-0.7-0.34-6.81 2.55-8.77 6.58-1.97 4.03 1.36 7.9 1.64 8.04z`}),(0,H.jsx)(`path`,{id:`ai`,d:`m357.11 79.96c0.17 0.27 4.39 3.11 8.12 0.69 3.72-2.41 5.79-8.79 5.36-9.44-0.42-0.66-7.09-1.36-10.81 1.06-3.72 2.41-2.84 7.43-2.67 7.69z`}),(0,H.jsx)(`path`,{id:`d`,d:`m370.63 96.55c0.12 0.29 3.73 3.89 7.84 2.22 4.11-1.66 7.37-7.52 7.07-8.25-0.29-0.72-6.7-2.68-10.82-1.02-4.11 1.66-4.2 6.76-4.09 7.05z`}),(0,H.jsx)(`path`,{id:`q`,d:`m316.59 56.44c0.28 0.15 5.35 0.59 7.43-3.33 2.09-3.92 0.81-10.5 0.12-10.87-0.69-0.36-6.86 2.26-8.95 6.17-2.08 3.92 1.12 7.88 1.4 8.03z`}),(0,H.jsx)(`path`,{id:`v`,d:`m332.93 138.42c0.16-0.26 5.28-2.59 11.13 1.06 5.85 3.66 10.48 11.53 10.07 12.19-0.42 0.66-9.52-0.05-15.37-3.71-5.85-3.65-6-9.27-5.83-9.54z`}),(0,H.jsx)(`path`,{id:`g`,d:`m359.22 137.74c-0.11 0.29 0.65 5.61 6.08 7.69 5.43 2.09 13.32 0.59 13.6-0.13 0.28-0.73-4.59-7.12-10.02-9.21-5.43-2.08-9.55 1.36-9.66 1.65z`}),(0,H.jsx)(`path`,{id:`e`,d:`m372.05 125.36c-0.1 0.29 0.26 5.37 4.45 6.82 4.2 1.44 10.5-0.85 10.75-1.59 0.26-0.74-3.29-6.42-7.49-7.87-4.2-1.44-7.61 2.34-7.71 2.64z`})]}),(0,H.jsx)(`g`,{transform:`translate(-219.32 -33)`,visibility:`inherit`,children:(0,H.jsxs)(`g`,{visibility:`inherit`,children:[(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#t`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#t`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ag`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ag`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#m`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#m`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#x`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#x`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#k`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#k`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ae`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ae`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#l`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#l`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#u`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#u`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#a`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#a`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#f`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#f`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#b`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#b`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#s`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#s`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#n`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#n`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ah`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#y`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#y`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#aa`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#aa`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#af`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#af`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#z`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#z`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#h`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#h`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ab`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ab`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ac`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ac`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#c`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#c`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#p`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#p`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#o`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#o`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#j`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#j`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#w`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#w`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#i`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#i`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#r`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#r`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ad`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ad`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ai`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#d`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#d`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#q`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#q`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#v`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#v`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#g`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#g`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#e`}),(0,H.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#e`})]})})]})}var r6=`__FMS_INSIGHT_NEW_OPERATOR__`,Oae=(0,L.memo)(function(){let e=R(br),[t,n]=B(LO),[r,i]=B(Wre),[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)(``);function l(e){e.target.value===r6?o(!0):n(e.target.value)}function u(e){i(t=>t.filter(t=>t!==e))}function d(){s!==``&&(i(e=>[...e.filter(e=>e!==s),s]),n(s),c(``),o(!1))}return e.user?(0,H.jsx)(`div`,{children:e.user.profile.name||e.user.profile.sub}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(xC,{value:t||``,onChange:l,variant:`standard`,renderValue:e=>e,children:[Q.of(r).sortBy(e=>e).map((e,t)=>(0,H.jsxs)(gS,{value:e,children:[(0,H.jsx)(dx,{primary:e}),(0,H.jsx)(Xb,{children:(0,H.jsx)(th,{edge:`end`,onClick:()=>u(e),size:`large`,children:(0,H.jsx)(yre,{})})})]},t)),(0,H.jsx)(gS,{value:r6,children:(0,H.jsx)(`em`,{children:`Create New Operator`})},`new`)]}),(0,H.jsxs)(py,{open:a,onClose:()=>{o(!1),c(``)},children:[(0,H.jsx)(gy,{children:`Create New Operator`}),(0,H.jsx)(hy,{children:(0,H.jsx)(nT,{value:s,onChange:e=>c(e.target.value),label:`New Name`,variant:`outlined`,autoFocus:!0,sx:{mt:`0.5em`},onKeyUp:e=>{e.keyCode===13&&d()}})}),(0,H.jsxs)(my,{children:[(0,H.jsxs)(Y,{disabled:s===``,onClick:d,children:[`Create `,s]}),(0,H.jsx)(Y,{onClick:()=>{c(``),o(!1)},children:`Cancel`})]})]})]})}),kae=(0,L.memo)(function(){let e=R(j3),t=R(ez),n=R(N3),r=R(nz),[i,a]=(0,L.useState)(!1);return(0,H.jsxs)(H.Fragment,{children:[n!=null||r!=null?(0,H.jsx)(X,{title:`Error`,children:(0,H.jsx)(th,{onClick:()=>a(!0),size:`large`,children:(0,H.jsx)(Cre,{})})}):void 0,e||t?(0,H.jsx)(X,{title:`Loading`,children:(0,H.jsx)(Ym,{"data-testid":`loading-icon`,color:`secondary`})}):void 0,(0,H.jsxs)(py,{open:i,onClose:()=>a(!1),children:[(0,H.jsx)(gy,{children:`Error`}),(0,H.jsxs)(hy,{children:[n===null?void 0:(0,H.jsx)(`p`,{children:n}),r===null?void 0:(0,H.jsx)(`p`,{children:r})]}),(0,H.jsx)(my,{children:(0,H.jsx)(Y,{onClick:()=>a(!1),children:`Close`})})]})]})}),Aae=(0,L.memo)(function(){let e=R(br)?.customStationMonitorDialogUrl,[t,n]=(0,L.useState)(!1);if(!e)return null;let r=e.split(`/`),i=r[r.length-1];return i=i[0].toUpperCase()+i.substr(1),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{title:i,children:(0,H.jsx)(th,{onClick:()=>n(!0),size:`large`,children:(0,H.jsx)(PT,{})})}),(0,H.jsxs)(py,{open:t,onClose:()=>n(!1),fullWidth:!0,maxWidth:`md`,children:[(0,H.jsx)(gy,{children:i}),(0,H.jsx)(hy,{children:(0,H.jsx)(`iframe`,{width:`100%`,src:e,sandbox:`allow-scripts`,style:{border:0,height:`calc(100vh - 250px)`}})}),(0,H.jsx)(my,{children:(0,H.jsx)(Y,{color:`primary`,onClick:()=>n(!1),children:`Close`})})]})]})});function jae({d:e}){let t=fE(e,xE());return t>7?null:t>=0?(0,H.jsxs)(q,{variant:`subtitle1`,children:[`License expires on `,e.toDateString()]}):(0,H.jsxs)(q,{variant:`h6`,children:[`License expired on `,e.toDateString()]})}function i6(){let e=R(br),t=``;return t=e.name?(e.name||``)+` `+(e.version||``):`SeedTactic FMS Insight`,(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{title:t,children:(0,H.jsx)(`div`,{children:(0,H.jsx)(Dae,{})})}),(0,H.jsx)(q,{variant:`h6`,style:{marginLeft:`1em`,marginRight:`2em`},children:`Insight`}),e?.licenseExpires?(0,H.jsx)(jae,{d:e.licenseExpires}):void 0]})}function Mae(){let e=R(zO).alarms,t=e&&e.length>0,n=t?e.join(`. `):`No Alarms`;return(0,H.jsx)(X,{title:n,children:(0,H.jsx)(cv,{badgeContent:t?e.length:0,children:(0,H.jsx)(OT,{color:t?`error`:void 0})})})}function Nae(){let e=R(qI);return(0,H.jsx)(X,{title:`Help`,children:(0,H.jsx)(th,{"aria-label":`Help`,href:qie(e),target:`_help`,size:`large`,children:(0,H.jsx)(vT,{})})})}function Pae(){return(0,H.jsx)(X,{title:`Logout`,children:(0,H.jsx)(th,{"aria-label":`Logout`,onClick:Sr,size:`large`,children:(0,H.jsx)(wre,{})})})}function a6({showAlarms:e,showLogout:t,showSearch:n}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(kae,{}),(0,H.jsx)(Aae,{}),n?(0,H.jsx)(qq,{}):void 0,n?(0,H.jsx)(qY,{}):void 0,(0,H.jsx)(Nae,{}),t?(0,H.jsx)(Pae,{}):void 0,e?(0,H.jsx)(Mae,{}):void 0]})}function Fae({menuNavs:e}){let t=R(br),[n,r]=B(qI),[i,a]=(0,L.useTransition)();return(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsx)(xC,{value:n.route,sx:{width:`16.5em`},onChange:t=>a(()=>{let n=e.find(e=>`separator`in e?!1:e.route.route===t.target.value);!n||`separator`in n||r(n.route)}),renderValue:()=>{let r=e.find(e=>`separator`in e?!1:e.route.route===n.route);return!r||`separator`in r?null:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[r.icon,(0,H.jsxs)(q,{variant:`h6`,style:{marginLeft:`1em`},children:[typeof r.name==`string`?r.name:r.name(t),i?`...`:``]})]})},children:e.map((e,n)=>`separator`in e?(0,H.jsx)(b_,{children:e.separator},e.separator):e.hidden?.(t)?void 0:(0,H.jsxs)(gS,{value:e.route.route,children:[(0,H.jsx)(ox,{children:e.icon}),(0,H.jsx)(dx,{primary:typeof e.name==`string`?e.name:e.name(t)})]},n))})})}function Iae({showAlarms:e,showLogout:t,showSearch:n,showOperator:r,Nav1:i,Nav2:a,menuNavs:o}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Ch,{position:`static`,sx:{display:{xs:`none`,md:`block`}},children:(0,H.jsx)(Jw,{children:(0,H.jsxs)(J,{sx:{display:`grid`,gridTemplateColumns:a?`1fr auto 1fr`:`minmax(200px, 1fr) auto`,width:`100vw`,gridTemplateAreas:a?`"nav navCenter tools"`:`"nav tools"`},children:[(0,H.jsxs)(J,{sx:{gridArea:`nav`,display:`flex`,alignItems:`center`},children:[(0,H.jsx)(i6,{}),i?(0,H.jsx)(i,{}):void 0]}),a?(0,H.jsx)(J,{sx:{gridArea:`navCenter`},children:(0,H.jsx)(a,{})}):void 0,(0,H.jsxs)(J,{sx:{gridArea:`tools`,display:`flex`,alignItems:`center`,justifyContent:`flex-end`},children:[r?(0,H.jsx)(Oae,{}):void 0,(0,H.jsx)(a6,{showAlarms:e,showLogout:t,showSearch:n})]})]})})}),(0,H.jsxs)(Ch,{position:`static`,sx:{display:{xs:`block`,md:`none`}},children:[(0,H.jsxs)(Jw,{children:[(0,H.jsx)(i6,{}),(0,H.jsx)(`div`,{style:{flexGrow:1}}),(0,H.jsx)(a6,{showAlarms:e,showLogout:t,showSearch:n})]}),(0,H.jsxs)(J,{sx:{display:`grid`,gridTemplateColumns:`minmax(200px, 1fr) auto`},children:[(0,H.jsx)(J,{sx:{gridColumn:`1`},children:i?(0,H.jsx)(i,{}):void 0}),(0,H.jsx)(J,{sx:{gridColumn:`2`},children:a?(0,H.jsx)(a,{}):void 0})]})]}),o&&o.length>0?(0,H.jsx)(Qp,{elevation:4,square:!0,component:`nav`,sx:{display:{xs:`block`,xl:`none`},padding:`2px`},children:(0,H.jsx)(Fae,{menuNavs:o})}):void 0]})}function Lae({menuItems:e}){let t=R(br),[n,r]=B(qI),[i,a]=(0,L.useTransition)();return!e||e.length===0?null:(0,H.jsx)(Qp,{elevation:3,square:!0,sx:{flexShrink:0,display:{xs:`none`,xl:`block`},minHeight:`calc(100vh - 64px)`,zIndex:1},children:(0,H.jsx)(Vb,{dense:!0,children:e?.map((e,o)=>`separator`in e?(0,H.jsx)(b_,{children:e.separator},e.separator):e.hidden?.(t)?void 0:(0,H.jsx)(tx,{children:(0,H.jsxs)(Kb,{selected:n.route===e.route.route,onClick:()=>a(()=>r(e.route)),children:[(0,H.jsx)(ox,{children:e.icon}),(0,H.jsx)(dx,{primary:typeof e.name==`string`?e.name:e.name(t),sx:i?e=>({color:e.palette.grey[700]}):void 0})]})},o))})})}function Rae(e,t,n){return[{id:0,numeric:!1,label:`Date`,getDisplay:e=>e.endTime.toLocaleString(),getForSort:e=>e.endTime.getTime()},{id:1,numeric:!1,label:`Part`,getDisplay:e=>e.part+`-`+Q.of(e.material).map(e=>e.proc).distinctAndSortBy(e=>e).toRArray().join(`:`)},{id:2,numeric:!1,label:`Station`,getDisplay:e=>lk(e.stationGroup,e.stationNumber,t)},{id:6,numeric:!1,label:`Operation`,getDisplay:e=>e.operation},{id:3,numeric:!1,label:`Carrier`,getDisplay:e=>fk(e,n),getForSort:e=>nie(e)},{id:4,numeric:!1,label:`Serial`,getDisplay:e=>e.material.filter(e=>e.serial).map(e=>e.serial).join(`, `)},{id:5,numeric:!1,label:`Workorder`,getDisplay:e=>e.material.filter(e=>e.workorder).map(e=>e.workorder).join(`, `)},{id:7,numeric:!1,label:`Inspection`,getDisplay:t=>Qk(t,e),getForSort:t=>Q.of(t.material).collect(t=>e.get(t.id)).flatMap(e=>e.signaledInspections).distinct().toSortedArray(e=>e).join(`,`)},{id:8,numeric:!0,label:`Elapsed Min`,getDisplay:e=>(e.elapsedMinsPerMaterial*e.material.length).toFixed(1)},{id:9,numeric:!0,label:`Target Min`,getDisplay:e=>e.activeMinutes.toFixed(1)},{id:10,numeric:!0,label:`Median Elapsed Min`,getDisplay:e=>e.medianCycleMinutes.toFixed(1)},{id:11,numeric:!0,label:`Median Deviation`,getDisplay:e=>e.MAD_aboveMinutes.toFixed(1)}]}function zae(e,t,n,r,i){let a;for(let e of t)e.id===r&&(a=e.getForSort||e.getDisplay);a===void 0&&(a=t[0].getForSort||t[0].getDisplay);let o=a,s=Q.of(e.values()).flatMap(e=>e);return(n?s.filter(e=>e.endTime>=n.start&&e.endTime<=n.end):s).toSortedArray(i===`desc`?{desc:o}:{asc:o},i===`desc`?{desc:e=>e.endTime.getTime()}:{asc:e=>e.endTime.getTime()})}function Bae(e){let t,n=e.set_date_zoom_range;return n&&(t=e.period.type===`Last30`?{type:`Last30Days`,set_days_back:e=>{if(e){let t=new Date;n({zoom:{start:QT(t,-e),end:tE(t,1)}})}else n({zoom:void 0})}}:{type:`ZoomIntoRange`,default_date_range:[e.period.month,$T(e.period.month,1)],current_date_zoom:e.current_date_zoom,set_date_zoom_range:e=>n({zoom:e})}),{zoom:t,zoomRange:e.current_date_zoom}}var o6=(0,L.memo)(function(e){let t=R(br),n=Rae(e.matsById,t.loadStationNames,dk(t.basketName)),r=f0(0,n),i=d0(),a=Bae(e),[o,s]=(0,L.useState)(null),c=z(CI),l=zae(e.points,n,e.current_date_zoom,r.orderBy,r.order),u=l.length,d=l.slice(i.page*i.rowsPerPage,(i.page+1)*i.rowsPerPage),f=n.filter(t=>!(!e.showWorkorderAndInspect&&t.id===5||!e.showWorkorderAndInspect&&t.id===7||e.hideMedian&&t.id===10||e.hideMedian&&t.id===11));return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(Vw,{children:[(0,H.jsx)(r0,{columns:f,sort:r,showDetailsCol:!0}),(0,H.jsx)(l0,{columns:f,pageData:d,rowsPerPage:i.rowsPerPage,onClickDetails:(e,t)=>{t.material.length!==0&&(t.material.length===1?c({type:`LogMat`,logMat:t.material[0]}):s({anchorEl:e.currentTarget,material:t.material}))},emptyMessage:e.emptyMessage})]}),(0,H.jsx)(c0,{zoom:a.zoom,tpage:i,count:u}),(0,H.jsx)(fS,{anchorEl:o?.anchorEl,keepMounted:!0,open:o!==null,onClose:()=>s(null),children:o?.material.map((e,t)=>(0,H.jsx)(gS,{onClick:()=>{c({type:`LogMat`,logMat:e}),s(null)},children:e.serial||`Material`},t))})]})});function s6({outlierTy:e}){YI(e===`machine`?`Machine Outliers`:`L/U Outliers`);let t=R(_L),n=R(br),r=xE(),i=R(hk),a=(0,L.useMemo)(()=>{let t=xE(),n=QT(t,-4),r=QT(t,1);return{seriesLabel:`Part`,data:i.valuesToLazySeq().filter(t=>t.isOutlier&&t.endTime>=n&&t.endTime<r&&rk(t)===(e===`labor`)).toRLookup(e=>e.part+`-`+e.material[0].proc.toString())}},[e,i]);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsxs)(q,{variant:`subtitle1`,children:[e===`labor`?`Load/Unload`:`Machine`,` cycles from the past 5 days statistically outside expected range`]}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>eA(a,t.matsById,void 0,void 0,n.loadStationNames,n.basketName),size:`large`,children:(0,H.jsx)(bT,{})})})]}),(0,H.jsx)(`main`,{children:(0,H.jsx)(o6,{points:a.data,matsById:t.matsById,current_date_zoom:{start:QT(r,-4),end:QT(r,1)},set_date_zoom_range:void 0,period:{type:`Last30`},showWorkorderAndInspect:!1,defaultSortDesc:!0})})]})}var c6=class e{constructor(e,t){this.day=e,this.station=t}compare(e){let t=this.day.getTime()-e.day.getTime();return t===0?this.station.localeCompare(e.station):t}hash(){return MD(this.day,this.station)}toString(){return`{day: ${this.day.toISOString()}}, station: ${this.station}}`}adjustDay(t){return new e(t(this.day),this.station)}};function l6(e,t,n){let r=sE(e),i=sE(t);if(r.getTime()===i.getTime())return[{day:r,value:n}];{let a=[],o=t.getTime()-e.getTime();for(let s=r;s<=i;s=QT(s,1)){let r=dE([s,e]),i=(Ire([QT(s,1),t]).getTime()-r.getTime())/o;a.push({day:s,value:n*i})}return a}}function u6(e,t){return $O(Q.of(e),e=>e.stationLabel,e=>e.endTime).flatMap(([e,n])=>n.flatMap(e=>{let n=Q.of(e).sumBy(e=>e.elapsedMinsPerMaterial*e.material.length),r=lE(e[0].endTime,-n*60),i=Q.of(e).sumBy(e=>t(e));return l6(r,e[0].endTime,i)}).map(t=>({...t,statNameAndNum:e}))).buildHashMap(e=>new c6(e.day,e.statNameAndNum),(e,t)=>t.value+(e??0))}function d6(e){return u6(e,e=>e.activeMinutes)}function Vae(e){return u6(e,e=>e.elapsedMinsPerMaterial*e.material.length)}function f6(e){let t=[];for(let n of e)if(t.length===0)t.push(n);else{let e=t[t.length-1];n.start<=e.end?t[t.length-1]={start:e.start,end:dE([e.end,n.end])}:t.push(n)}return t}function p6(e){return Q.of(e).filter(e=>e.plannedDown).toLookupOrderedMap(e=>e.stationLabel,e=>e.start).toAscLazySeq().flatMap(([e,t])=>f6(t.valuesToAscLazySeq()).flatMap(t=>l6(t.start,t.end,gE(t.end,t.start)).map(t=>({...t,station:e})))).toHashMap(e=>[new c6(e.day,e.station),e.value],(e,t)=>e+t)}function m6(e){let t=Q.of(e).filter(e=>e.plannedDown).toLookupOrderedMap(e=>e.stationLabel,e=>e.start).mapValues(e=>f6(e.valuesToAscLazySeq()));return Q.of(e).filter(e=>!e.plannedDown).toLookupOrderedMap(e=>e.stationLabel,e=>e.start).toAscLazySeq().flatMap(([e,n])=>{let r=f6(n.valuesToAscLazySeq()),i=t.get(e)??[];for(let e=0,t=0;t<r.length;)if(e<i.length&&i[e].end<=r[t].start)e++;else if(e<i.length&&i[e].start<r[t].end){let n=r[t].start,a=r[t].end,o=i[e].start,s=i[e].end;o<=n&&s>=a?r.splice(t,1):o<=n?(r[t]={start:s,end:a},e+=1):s>=a?(r[t]={start:n,end:o},t+=1):(r[t]={start:n,end:o},r.splice(t+1,0,{start:s,end:a}),e++,t++)}else t++;return r.flatMap(t=>l6(t.start,t.end,gE(t.end,t.start)).map(t=>({...t,station:e})))}).toHashMap(e=>[new c6(e.day,e.station),e.value],(e,t)=>e+t)}function Hae(e,t,n,r,i){let a=d6(Q.of(r).filter(r=>n===`labor`===rk(r)&&r.endTime>=e&&r.endTime<=t)),o=Q.of(i).filter(r=>n===`labor`===r.station.startsWith(`L/U`)&&r.end>=e&&r.start<=t),s=p6(o),c=m6(o),l=[],u=a.keysToLazySeq().concat(c.keysToLazySeq()).map(e=>e.station).distinct().toSortedArray(e=>e);for(let n of u){let r=[];for(let i=e;i<t;i=QT(i,1)){let e=new c6(i,n),t=a.get(e),o=c.get(e),l=s.get(e)??0;r.push({x:i.toLocaleDateString(),y:(t??0)/60,plannedHours:(o??0)/60,actualOee:l<1440?(t??0)/(1440-l):0,plannedOee:l<1440?(o??0)/(1440-l):0,station:n,day:i})}l.push({station:n,points:r})}return l}var h6=class{constructor(e,t){this.x=e,this.y=t}compare(e){let t=this.x-e.x;return t===0?this.y.localeCompare(e.y):t}hash(){return MD(this.x,this.y)}toString(){return`{x: ${new Date(this.x).toISOString()}, y: ${this.y}}`}};function Uae(e,t){let n=Q.of(t).toHashMap(e=>[new h6(e.x.getTime(),e.y),e],(e,t)=>t),r=Q.of(t).map(e=>e.x.getTime()).distinct().toSortedArray(e=>e),i=Q.of(t).map(e=>e.y).distinct().toSortedArray(e=>e),a=`<table>
|
|
356
|
+
<thead><tr><th>`+e+`</th>`;for(let e of r)a+=`<th>`+new Date(e).toDateString()+`</th>`;a+=`</tr></thead>
|
|
357
|
+
<tbody>
|
|
358
|
+
`;for(let e of i){a+=`<tr><th>`+e+`</th>`;for(let t of r){let r=n.get(new h6(t,e));a+=r===void 0?`<td></td>`:`<td>`+r.label+`</td>`}a+=`</tr>
|
|
359
|
+
`}return a+=`</tbody>
|
|
360
|
+
</table>`,a}function Wae(e,t){Hk(Uae(e,t))}function Gae(e){let t=`<table>
|
|
361
|
+
<thead><tr>`;t+=`<th>Day</th><th>Station</th><th>Actual Hours</th><th>Planned Hours</th>`,t+=`</tr></thead>
|
|
362
|
+
<tbody>
|
|
363
|
+
`;for(let n of e)for(let e of n.points)t+=`<tr>`,t+=`<td>`+e.day.toLocaleDateString()+`</td>`,t+=`<td>`+e.station+`</td>`,t+=`<td>`+e.y.toFixed(1)+`</td>`,t+=`<td>`+e.plannedHours.toFixed(1)+`</td>`,t+=`</tr>
|
|
364
|
+
`;return t+=`</tbody>
|
|
365
|
+
</table>`,t}function Kae(e){Hk(Gae(e))}var g6=[[`4477aa`],[`4477aa`,`cc6677`],[`4477aa`,`ddcc77`,`cc6677`],[`4477aa`,`117733`,`ddcc77`,`cc6677`],[`332288`,`88ccee`,`117733`,`ddcc77`,`cc6677`],[`332288`,`88ccee`,`117733`,`ddcc77`,`cc6677`,`aa4499`],[`332288`,`88ccee`,`44aa99`,`117733`,`ddcc77`,`cc6677`,`aa4499`],[`332288`,`88ccee`,`44aa99`,`117733`,`999933`,`ddcc77`,`cc6677`,`aa4499`],[`332288`,`88ccee`,`44aa99`,`117733`,`999933`,`ddcc77`,`cc6677`,`882255`,`aa4499`],[`332288`,`88ccee`,`44aa99`,`117733`,`999933`,`ddcc77`,`661100`,`cc6677`,`882255`,`aa4499`],[`332288`,`6699cc`,`88ccee`,`44aa99`,`117733`,`999933`,`ddcc77`,`661100`,`cc6677`,`882255`,`aa4499`],[`332288`,`6699cc`,`88ccee`,`44aa99`,`117733`,`999933`,`ddcc77`,`661100`,`cc6677`,`aa4466`,`882255`,`aa4499`]],_6=`ff0029.377eb8.66a61e.984ea3.00d2d5.ff7f00.af8d00.7f80cd.b3e900.c42e60.a65628.f781bf.8dd3c7.bebada.fb8072.80b1d3.fdb462.fccde5.bc80bd.ffed6f.c4eaff.cf8c00.1b9e77.d95f02.e7298a.e6ab02.a6761d.0097ff.00d067.000000.252525.525252.737373.969696.bdbdbd.f43600.4ba93b.5779bb.927acc.97ee3f.bf3947.9f5b00.f48758.8caed6.f2b94f.eff26e.e43872.d9b100.9d7a00.698cff.d9d9d9.00d27e.d06800.009f82.c49200.cbe8ff.fecddf.c27eb6.8cd2ce.c4b8d9.f883b0.a49100.f48800.27d0df.a04a9b`.split(`.`);function v6(e,t){return t<=g6.length?`#`+g6[t-1][e]:`#`+_6[e%_6.length]}var y6=v6(0,2),b6=v6(1,2),x6=50,qae=30,S6=10,C6=10;function Jae({width:e,height:t,points:n,setTooltip:r}){let i=t-S6-qae,a=(0,L.useMemo)(()=>$M().domain([0,24]).range([i,0]),[i]),o=(0,L.useMemo)(()=>dj().domain(Q.of(n).map(e=>e.x).distinct()).range([0,e-x6-C6]).padding(.1),[n,e]),s=(0,L.useMemo)(()=>dj().domain([`Actual`,`Planned`]).range([0,o.bandwidth()]).padding(.05),[o]);return(0,H.jsx)(`svg`,{width:e,height:t,children:(0,H.jsxs)(`g`,{transform:`translate(${x6},${S6})`,children:[(0,H.jsx)(zA,{scale:o,top:i}),(0,H.jsx)(BA,{scale:a,left:0,label:`Hours`}),(0,H.jsx)(PA,{scale:a,width:e-x6-C6}),n.map((e,t)=>(0,H.jsxs)(`g`,{transform:`translate(${o(e.x)},0)`,children:[(0,H.jsx)(`rect`,{x:s(`Actual`),y:a(e.y),width:s.bandwidth(),height:i-a(e.y),fill:y6,onMouseEnter:t=>{let n=hA(t);r({left:n?.x??0,top:n?.y??0,datum:e})},onMouseLeave:()=>r(null)}),(0,H.jsx)(`rect`,{x:s(`Planned`),y:a(e.plannedHours),width:s.bandwidth(),height:i-a(e.plannedHours),fill:b6,onMouseEnter:t=>{let n=hA(t);r({left:n?.x??0,top:n?.y??0,datum:e})},onMouseLeave:()=>r(null)})]},t))]})})}function Yae({station:e}){return(0,H.jsxs)(`div`,{style:{marginTop:`1em`,display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{style:{width:`14px`,height:`14px`,backgroundColor:y6}}),(0,H.jsxs)(`div`,{style:{marginLeft:`1em`},children:[e,` Actual`]})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{style:{width:`14px`,height:`14px`,backgroundColor:b6}}),(0,H.jsxs)(`div`,{style:{marginLeft:`1em`},children:[e,` Planned`]})]})]})}function Xae({tooltip:e}){return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{children:e.datum.x}),(0,H.jsxs)(`div`,{children:[`Actual Hours: `,e.datum.y?.toFixed(1)]}),(0,H.jsxs)(`div`,{children:[`Planned Hours: `,e.datum?.plannedHours?.toFixed(1)]})]})}function Zae({series:e}){let t=(0,L.useMemo)(()=>P(null),[]),n=z(t);return(0,H.jsxs)(qy,{size:{xs:12,md:6},onMouseLeave:()=>n(null),children:[(0,H.jsx)(OA,{sx:{height:`calc(100vh / 2 - 200px)`},chart:({width:t,height:r})=>(0,H.jsx)(Jae,{width:t,height:r,points:e.points,setTooltip:n}),tooltipAtom:t,TooltipContent:Xae}),(0,H.jsx)(Yae,{station:e.station})]})}function Qae({points:e}){return(0,H.jsx)(qy,{container:!0,children:e.map((e,t)=>(0,H.jsx)(Zae,{series:e},t))})}var w6=[{id:0,numeric:!1,label:`Date`,getDisplay:e=>e.x,getForSort:e=>e.day.getTime()},{id:1,numeric:!1,label:`Station`,getDisplay:e=>e.station},{id:2,numeric:!0,label:`Actual Hours`,getDisplay:e=>e.y.toFixed(1),getForSort:e=>e.y},{id:3,numeric:!0,label:`Actual OEE`,getDisplay:e=>(e.actualOee*100).toFixed(0)+`%`,getForSort:e=>e.actualOee},{id:4,numeric:!0,label:`Planned Hours`,getDisplay:e=>e.plannedHours.toFixed(1),getForSort:e=>e.plannedHours},{id:5,numeric:!0,label:`Planned OEE`,getDisplay:e=>(e.plannedOee*100).toFixed(0)+`%`,getForSort:e=>e.plannedOee}];function $ae(e,t){return Q.of(e).flatMap(e=>e.points).toSortedArray(t)}var eoe=(0,L.memo)(function({points:e}){let t=f0(0,w6);return(0,H.jsxs)(Vw,{children:[(0,H.jsx)(r0,{columns:w6,sort:t,showDetailsCol:!1}),(0,H.jsx)(l0,{columns:w6,pageData:$ae(e,t.sortOn)})]})}),toe=P(!0),noe=P(!0);function T6({ty:e}){YI(e===`labor`?`L/U OEE`:`Machine OEE`);let[t,n]=B(e===`labor`?toe:noe),r=QT(xE(),-6),i=QT(xE(),1),a=R(hk),o=R(cA),s=(0,L.useMemo)(()=>Hae(r,i,e,a.valuesToLazySeq(),o),[r,i,e,a,o]);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsxs)(q,{variant:`subtitle1`,children:[e===`labor`?`Load/Unload`:`Machine`,` OEE: comparing flexplan hours between actual and simulated production`]}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,value:t?`chart`:`table`,onChange:e=>n(e.target.value===`chart`),children:[(0,H.jsx)(gS,{value:`chart`,children:`Chart`},`chart`),(0,H.jsx)(gS,{value:`table`,children:`Table`},`table`)]})}),(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>Kae(s),size:`large`,children:(0,H.jsx)(bT,{})})})]}),(0,H.jsx)(`main`,{children:t?(0,H.jsx)(Qae,{points:s}):(0,H.jsx)(eoe,{points:s})})]})}var E6=Object.defineProperty,roe=(e,t)=>{let n={};for(var r in e)E6(n,r,{get:e[r],enumerable:!0});return t||E6(n,Symbol.toStringTag,{value:`Module`}),n},D6=U6(),O6=e=>z6(e,D6),k6=U6();O6.write=e=>z6(e,k6);var A6=U6();O6.onStart=e=>z6(e,A6);var j6=U6();O6.onFrame=e=>z6(e,j6);var M6=U6();O6.onFinish=e=>z6(e,M6);var N6=[];O6.setTimeout=(e,t)=>{let n=O6.now()+t,r=()=>{let e=N6.findIndex(e=>e.cancel==r);~e&&N6.splice(e,1),L6-=+!!~e},i={time:n,handler:e,cancel:r};return N6.splice(P6(n),0,i),L6+=1,B6(),i};var P6=e=>~(~N6.findIndex(t=>t.time>e)||~N6.length);O6.cancel=e=>{A6.delete(e),j6.delete(e),M6.delete(e),D6.delete(e),k6.delete(e)},O6.sync=e=>{R6=!0,O6.batchedUpdates(e),R6=!1},O6.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,O6.onStart(n)}return r.handler=e,r.cancel=()=>{A6.delete(n),t=null},r};var F6=typeof window<`u`?window.requestAnimationFrame:()=>{};O6.use=e=>F6=e,O6.now=typeof performance<`u`?()=>performance.now():Date.now,O6.batchedUpdates=e=>e(),O6.catch=console.error,O6.frameLoop=`always`,O6.onDemand=()=>{},O6.advance=()=>{O6.frameLoop===`demand`?H6():console.warn(`Cannot call the manual advancement of rafz whilst frameLoop is not set as demand`)};var I6=-1,L6=0,R6=!1;function z6(e,t){R6?(t.delete(e),e(0)):(t.add(e),B6(),O6.frameLoop===`demand`&&O6.onDemand())}function B6(){I6<0&&(I6=0,O6.frameLoop!==`demand`&&F6(V6))}function ioe(){I6=-1}function V6(){~I6&&(F6(V6),O6.batchedUpdates(H6))}function H6(){let e=I6;I6=O6.now();let t=P6(I6);if(t&&(W6(N6.splice(0,t),e=>e.handler()),L6-=t),!L6){ioe();return}A6.flush(),D6.flush(e?Math.min(64,I6-e):16.667),j6.flush(),k6.flush(),M6.flush(),O6.frameLoop===`demand`&&L6>0&&O6.onDemand()}function U6(){let e=new Set,t=e;return{add(n){L6+=+(t==e&&!e.has(n)),e.add(n)},delete(n){return L6-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,L6-=t.size,W6(t,t=>t(n)&&e.add(t)),L6+=e.size,t=e)}}}function W6(e,t){e.forEach(e=>{try{t(e)}catch(e){O6.catch(e)}})}function G6(){}var aoe=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),K6={arr:Array.isArray,obj:e=>!!e&&e.constructor.name===`Object`,fun:(e=>typeof e==`function`),str:e=>typeof e==`string`,num:e=>typeof e==`number`,und:e=>e===void 0};function q6(e,t){if(K6.arr(e)){if(!K6.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var J6=(e,t)=>e.forEach(t);function Y6(e,t,n){if(K6.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var X6=e=>K6.und(e)?[]:K6.arr(e)?e:[e];function Z6(e,t){if(e.size){let n=Array.from(e);e.clear(),J6(n,t)}}var Q6=(e,...t)=>Z6(e,e=>e(...t)),$6=()=>typeof window>`u`||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),e8=roe({assign:()=>ooe,colors:()=>r8,createStringInterpolator:()=>t8,skipAnimation:()=>i8,to:()=>n8,willAdvance:()=>a8}),t8,n8,r8=null,i8=!1,a8=G6,ooe=e=>{e.to&&(n8=e.to),e.now&&(O6.now=e.now),e.colors!==void 0&&(r8=e.colors),e.skipAnimation!=null&&(i8=e.skipAnimation),e.createStringInterpolator&&(t8=e.createStringInterpolator),e.requestAnimationFrame&&O6.use(e.requestAnimationFrame),e.batchedUpdates&&(O6.batchedUpdates=e.batchedUpdates),e.willAdvance&&(a8=e.willAdvance),e.frameLoop&&(O6.frameLoop=e.frameLoop),e.onDemand&&(O6.onDemand=e.onDemand)},o8=new Set,s8=[],c8=[],l8=0,u8={get idle(){return!o8.size&&!s8.length},start(e){l8>e.priority?(o8.add(e),O6.onStart(soe)):(d8(e),O6(p8))},advance:p8,sort(e){if(l8)O6.onFrame(()=>u8.sort(e));else{let t=s8.indexOf(e);~t&&(s8.splice(t,1),f8(e))}},clear(){s8=[],o8.clear()}};function soe(){o8.forEach(d8),o8.clear(),O6(p8)}function d8(e){s8.includes(e)||f8(e)}function f8(e){s8.splice(coe(s8,t=>t.priority>e.priority),0,e)}function p8(e){let t=c8;for(let n=0;n<s8.length;n++){let r=s8[n];l8=r.priority,r.idle||(a8(r),r.advance(e),r.idle||t.push(r))}return l8=0,c8=s8,c8.length=0,s8=t,s8.length>0}function coe(e,t){let n=e.findIndex(t);return n<0?e.length:n}var loe=(e,t,n)=>Math.min(Math.max(n,e),t),uoe={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},m8=`[-+]?\\d*\\.?\\d+`,h8=`[-+]?\\d*\\.?\\d+%`;function g8(...e){return`\\(\\s*(`+e.join(`)\\s*,\\s*(`)+`)\\s*\\)`}var doe=RegExp(`rgb`+g8(m8,m8,m8)),foe=RegExp(`rgba`+g8(m8,m8,m8,m8)),poe=RegExp(`hsl`+g8(m8,h8,h8)),moe=RegExp(`hsla`+g8(m8,h8,h8,m8)),hoe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,goe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,_oe=/^#([0-9a-fA-F]{6})$/,voe=/^#([0-9a-fA-F]{8})$/;function yoe(e){let t;return typeof e==`number`?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=_oe.exec(e))?parseInt(t[1]+`ff`,16)>>>0:r8&&r8[e]!==void 0?r8[e]:(t=doe.exec(e))?(y8(t[1])<<24|y8(t[2])<<16|y8(t[3])<<8|255)>>>0:(t=foe.exec(e))?(y8(t[1])<<24|y8(t[2])<<16|y8(t[3])<<8|x8(t[4]))>>>0:(t=hoe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+`ff`,16)>>>0:(t=voe.exec(e))?parseInt(t[1],16)>>>0:(t=goe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=poe.exec(e))?(v8(b8(t[1]),S8(t[2]),S8(t[3]))|255)>>>0:(t=moe.exec(e))?(v8(b8(t[1]),S8(t[2]),S8(t[3]))|x8(t[4]))>>>0:null}function _8(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function v8(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=_8(i,r,e+1/3),o=_8(i,r,e),s=_8(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function y8(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function b8(e){return(parseFloat(e)%360+360)%360/360}function x8(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function S8(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function C8(e){let t=yoe(e);return t===null?e:(t||=0,`rgba(${(t&4278190080)>>>24}, ${(t&16711680)>>>16}, ${(t&65280)>>>8}, ${(t&255)/255})`)}var w8=(e,t,n)=>{if(K6.fun(e))return e;if(K6.arr(e))return w8({range:e,output:t,extrapolate:n});if(K6.str(e.output[0]))return t8(e);let r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||`extend`,s=r.extrapolateRight||r.extrapolate||`extend`,c=r.easing||(e=>e);return e=>{let t=xoe(e,a);return boe(e,a[t],a[t+1],i[t],i[t+1],c,o,s,r.map)}};function boe(e,t,n,r,i,a,o,s,c){let l=c?c(e):e;if(l<t){if(o===`identity`)return l;o===`clamp`&&(l=t)}if(l>n){if(s===`identity`)return l;s===`clamp`&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function xoe(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Soe=(e,t=`end`)=>n=>{n=t===`end`?Math.min(n,.999):Math.max(n,.001);let r=n*e;return loe(0,1,(t===`end`?Math.floor(r):Math.ceil(r))/e)},T8=1.70158,E8=T8*1.525,D8=2.70158,O8=2*Math.PI/3,k8=2*Math.PI/4.5,A8=e=>{let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},Coe={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-(-2*e+2)**2/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-(1-e)**3,easeInOutCubic:e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-(1-e)**4,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-(-2*e+2)**4/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-(1-e)**5,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-(-2*e+2)**5/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:2**(10*e-10),easeOutExpo:e=>e===1?1:1-2**(-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-e**2),easeOutCirc:e=>Math.sqrt(1-(e-1)**2),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-(2*e)**2))/2:(Math.sqrt(1-(-2*e+2)**2)+1)/2,easeInBack:e=>D8*e*e*e-T8*e*e,easeOutBack:e=>1+D8*(e-1)**3+T8*(e-1)**2,easeInOutBack:e=>e<.5?(2*e)**2*(7.189819*e-E8)/2:((2*e-2)**2*(3.5949095*(e*2-2)+E8)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-(2**(10*e-10))*Math.sin((e*10-10.75)*O8),easeOutElastic:e=>e===0?0:e===1?1:2**(-10*e)*Math.sin((e*10-.75)*O8)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(2**(20*e-10)*Math.sin((20*e-11.125)*k8))/2:2**(-20*e+10)*Math.sin((20*e-11.125)*k8)/2+1,easeInBounce:e=>1-A8(1-e),easeOutBounce:A8,easeInOutBounce:e=>e<.5?(1-A8(1-2*e))/2:(1+A8(2*e-1))/2,steps:Soe},j8=Symbol.for(`FluidValue.get`),M8=Symbol.for(`FluidValue.observers`),N8=e=>!!(e&&e[j8]),P8=e=>e&&e[j8]?e[j8]():e,F8=e=>e[M8]||null;function woe(e,t){e.eventObserved?e.eventObserved(t):e(t)}function I8(e,t){let n=e[M8];n&&n.forEach(e=>{woe(e,t)})}var L8=class{constructor(e){if(!e&&!(e=this.get))throw Error(`Unknown getter`);Toe(this,e)}},Toe=(e,t)=>B8(e,j8,t);function R8(e,t){if(e[j8]){let n=e[M8];n||B8(e,M8,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function z8(e,t){let n=e[M8];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[M8]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var B8=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),V8=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Eoe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,H8=RegExp(`(${V8.source})(%|[a-z]+)`,`i`),Doe=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,U8=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,W8=e=>{let[t,n]=Ooe(e);if(!t||$6())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);return r?r.trim():n&&n.startsWith(`--`)?window.getComputedStyle(document.documentElement).getPropertyValue(n)||e:n&&U8.test(n)?W8(n):n||e},Ooe=e=>{let t=U8.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},G8,koe=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,K8=e=>e.match(V8)??[],q8=e=>{G8||=r8?RegExp(`(${Object.keys(r8).join(`|`)})(?!\\w)`,`g`):/^\b$/;let t=e.output.map(e=>P8(e).replace(U8,W8).replace(Eoe,C8).replace(G8,C8)),n=t.map(e=>K8(e).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error(`The arity of each "output" value must be equal`);return e[t]})).map(t=>w8({...e,output:t})),i=e.range||[0,1],a=t.map(e=>K8(e)),o=a[0].map((e,t)=>{let n=a.map(e=>{let n=e[t],r=n.indexOf(`.`);return r===-1?0:n.length-r-1});return n.every(e=>e===n[0])&&n[0]>0?n[0]:null});return e=>{let n=i.indexOf(e);if(n!==-1)return t[n];let a=!H8.test(t[0])&&t.find(e=>H8.test(e))?.replace(V8,``),s=0;return t[0].replace(V8,()=>{let t=s++,n=r[t](e),i=o[t];return`${i==null?n:n.toFixed(i)}${a||``}`}).replace(Doe,koe)}},J8=`react-spring: `,Y8=e=>{let t=e,n=!1;if(typeof t!=`function`)throw TypeError(`${J8}once requires a function parameter`);return(...e)=>{n||=(t(...e),!0)}},Aoe=Y8(console.warn);function joe(){Aoe(`${J8}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Moe=Y8(console.warn);function Noe(){Moe(`${J8}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function X8(e){return K6.str(e)&&(e[0]==`#`||/\d/.test(e)||!$6()&&U8.test(e)||e in(r8||{}))}var Z8=$6()?L.useEffect:L.useLayoutEffect,Poe=()=>{let e=(0,L.useRef)(!1);return Z8(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Q8(){let e=(0,L.useState)()[1],t=Poe();return()=>{t.current&&e(Math.random())}}var $8=e=>(0,L.useEffect)(e,Foe),Foe=[];function e5(e){let t=(0,L.useRef)(void 0);return(0,L.useEffect)(()=>{t.current=e}),t.current}var t5=Symbol.for(`Animated:node`),Ioe=e=>!!e&&e[t5]===e,n5=e=>e&&e[t5],r5=(e,t)=>aoe(e,t5,t),i5=e=>e&&e[t5]&&e[t5].getPayload(),a5=class{constructor(){r5(this,this)}getPayload(){return this.payload||[]}},o5=class e extends a5{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,K6.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return K6.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,K6.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},s5=class e extends o5{constructor(e){super(0),this._string=null,this._toString=w8({output:[e,e]})}static create(t){return new e(t)}getValue(){return this._string??=this._toString(this._value)}setValue(e){if(K6.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=w8({output:[this.getValue(),e]})),this._value=0,super.reset()}},c5={dependencies:null},l5=class extends a5{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Y6(this.source,(n,r)=>{Ioe(n)?t[r]=n.getValue(e):N8(n)?t[r]=P8(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&J6(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return Y6(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){c5.dependencies&&N8(e)&&c5.dependencies.add(e);let t=i5(e);t&&J6(t,e=>this.add(e))}},Loe=class e extends l5{constructor(e){super(e)}static create(t){return new e(t)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(Roe)),!0)}};function Roe(e){return(X8(e)?s5:o5).create(e)}function u5(e){let t=n5(e);return t?t.constructor:K6.arr(e)?Loe:X8(e)?s5:o5}var d5=(e,t)=>{let n=!K6.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,L.forwardRef)((r,i)=>{let a=(0,L.useRef)(null),o=n&&(0,L.useCallback)(e=>{a.current=Voe(i,e)},[i]),[s,c]=Boe(r,t),l=Q8(),u=()=>{let e=a.current;(!n||e)&&(e?t.applyAnimatedValues(e,s.getValue(!0)):!1)===!1&&l()},d=new zoe(u,c),f=(0,L.useRef)(void 0);Z8(()=>(f.current=d,J6(c,e=>R8(e,d)),()=>{f.current&&(J6(f.current.deps,e=>z8(e,f.current)),O6.cancel(f.current.update))})),(0,L.useEffect)(u,[]),$8(()=>()=>{let e=f.current;J6(e.deps,t=>z8(t,e))});let p=t.getComponentProps(s.getValue());return L.createElement(e,{...p,ref:o})})},zoe=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type==`change`&&O6.write(this.update)}};function Boe(e,t){let n=new Set;return c5.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new l5(e),c5.dependencies=null,[e,n]}function Voe(e,t){return e&&(K6.fun(e)?e(t):e.current=t),t}var f5=Symbol.for(`AnimatedComponent`),p5=new WeakMap,Hoe=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new l5(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{let t=m5(e)||`Anonymous`;if(K6.str(e))e=a[e]||(a[e]=d5(e,i));else{let t=e[f5]??p5.get(e);if(!t){t=d5(e,i);try{e[f5]=t}catch{}p5.set(e,t)}e=t}return e.displayName=`Animated(${t})`,e};return Y6(e,(t,n)=>{K6.arr(e)&&(n=m5(t)),a[n]=a(t)}),{animated:a}},m5=e=>K6.str(e)?e:e&&K6.str(e.displayName)?e.displayName:K6.fun(e)&&e.name||null;function h5(e,...t){return K6.fun(e)?e(...t):e}var g5=(e,t)=>e===!0||!!(t&&e&&(K6.fun(e)?e(t):X6(e).includes(t))),_5=(e,t)=>K6.obj(e)?t&&e[t]:e,v5=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Uoe=e=>e,y5=(e,t=Uoe)=>{let n=Woe;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));let r={};for(let i of n){let n=t(e[i],i);K6.und(n)||(r[i]=n)}return r},Woe=[`config`,`onProps`,`onStart`,`onChange`,`onPause`,`onResume`,`onRest`],Goe={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Koe(e){let t={},n=0;if(Y6(e,(e,r)=>{Goe[r]||(t[r]=e,n++)}),n)return t}function b5(e){let t=Koe(e);if(t){let n={to:t};return Y6(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function x5(e){let t=P8(e);return K6.arr(t)?t.map(x5):X8(t)?e8.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function qoe(e){for(let t in e)return!0;return!1}function S5(e){return K6.fun(e)||K6.arr(e)&&K6.obj(e[0])}function Joe(e,t){e.ref?.delete(e),t?.delete(e)}function Yoe(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var C5={...{default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}}.default,mass:1,damping:1,easing:Coe.linear,clamp:!1},Xoe=class{constructor(){this.velocity=0,Object.assign(this,C5)}};function Zoe(e,t,n){n&&(n={...n},w5(n,t),t={...n,...t}),w5(e,t),Object.assign(e,t);for(let t in C5)e[t]??(e[t]=C5[t]);let{frequency:r,damping:i}=e,{mass:a}=e;return K6.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=(2*Math.PI/r)**2*a,e.friction=4*Math.PI*i*a/r),e}function w5(e,t){if(!K6.und(t.decay))e.duration=void 0;else{let n=!K6.und(t.tension)||!K6.und(t.friction);(n||!K6.und(t.frequency)||!K6.und(t.damping)||!K6.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var T5=[],Qoe=class{constructor(){this.changed=!1,this.values=T5,this.toValues=null,this.fromValues=T5,this.config=new Xoe,this.immediate=!1}};function E5(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=g5(n.cancel??r?.cancel,t);if(u)p();else{K6.und(n.pause)||(i.paused=g5(n.pause,t));let e=r?.pause;e!==!0&&(e=i.paused||g5(e,t)),c=h5(n.delay||0,t),e?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(l),l.cancel(),c=l.time-O6.now()}function f(){c>0&&!e8.skipAnimation?(i.delayed=!0,l=O6.setTimeout(p,c),i.pauseQueue.add(d),i.timeouts.add(l)):p()}function p(){i.delayed&&=!1,i.pauseQueue.delete(d),i.timeouts.delete(l),e<=(i.cancelId||0)&&(u=!0);try{a.start({...n,callId:e,cancel:u},o)}catch(e){s(e)}}})}var D5=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?A5(e.get()):t.every(e=>e.noop)?O5(e.get()):k5(e.get(),t.every(e=>e.finished)),O5=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),k5=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),A5=e=>({value:e,cancelled:!0,finished:!1});function j5(e,t,n,r){let{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:c}=n;return!a&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let l=y5(t,(e,t)=>t===`onRest`?void 0:e),u,d,f=new Promise((e,t)=>(u=e,d=t)),p=e=>{let t=i<=(n.cancelId||0)&&A5(r)||i!==n.asyncId&&k5(r,!1);if(t)throw e.result=t,d(e),e},m=0,h=(e,t)=>{let a=new N5,o=new P5;return(async()=>{p(a);let s=K6.obj(e)?{...e}:{...t,to:e};if(s.parentId=i,Y6(l,(e,t)=>{K6.und(s[t])&&(s[t]=e)}),e8.skipAnimation){if(++m>1024)throw M5(n),o.result=k5(r,!1),d(o),o;return s.immediate=!0,await r.start(s)}let c=await r.start(s);return p(a),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),c})()},g;try{let t;t=K6.arr(e)?(async e=>{for(let t of e)await h(t)})(e):Promise.resolve(e(h,r.stop.bind(r))),await Promise.all([t.then(u),f]),g=k5(r.get(),!0,!1)}catch(e){if(e instanceof N5)g=e.result;else if(e instanceof P5)g=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?c:void 0)}return K6.fun(o)&&O6.batchedUpdates(()=>{o(g,r,r.item)}),g})()}function M5(e,t){Z6(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var N5=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},P5=class extends Error{constructor(){super(`SkipAnimationSignal`)}},F5=e=>e instanceof I5,$oe=1,I5=class extends L8{constructor(...e){super(...e),this.id=$oe++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=n5(this);return e&&e.getValue()}to(...e){return e8.to(this,e)}interpolate(...e){return joe(),e8.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){I8(this,{type:`change`,parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||u8.sort(this),I8(this,{type:`priority`,parent:this,priority:e})}},L5=Symbol.for(`SpringPhase`),ese=1,tse=2,R5=4,z5=e=>(e[L5]&ese)>0,B5=e=>(e[L5]&tse)>0,V5=e=>(e[L5]&R5)>0,H5=(e,t)=>t?e[L5]|=3:e[L5]&=-3,U5=(e,t)=>t?e[L5]|=R5:e[L5]&=-5,nse=class extends I5{constructor(e,t){if(super(),this.animation=new Qoe,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!K6.und(e)||!K6.und(t)){let n=K6.obj(e)?{...e}:{...t,from:e};K6.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(B5(this)||this._state.asyncTo)||V5(this)}get goal(){return P8(this.animation.to)}get velocity(){let e=n5(this);return e instanceof o5?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return z5(this)}get isAnimating(){return B5(this)}get isPaused(){return V5(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:a}=r,o=i5(r.to);!o&&N8(r.to)&&(i=X6(P8(r.to))),r.values.forEach((s,c)=>{if(s.done)return;let l=s.constructor==s5?1:o?o[c].lastPosition:i[c],u=r.immediate,d=l;if(!u){if(d=s.lastPosition,a.tension<=0){s.done=!0;return}let t=s.elapsedTime+=e,n=r.fromValues[c],i=s.v0==null?s.v0=K6.arr(a.velocity)?a.velocity[c]:a.velocity:s.v0,o,f=a.precision||(n==l?.005:Math.max(Math.max(Math.abs(l),Math.abs(n),1)*2**-52,Math.min(1,Math.abs(l-n)*.001)));if(!K6.und(a.duration)){let r=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,s.durationProgress>0&&(s.elapsedTime=a.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(a.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+a.easing(r)*(l-n),o=(d-s.lastPosition)/e,u=r==1}else if(a.decay){let e=a.decay===!0?.998:a.decay,r=Math.exp(-(1-e)*t);d=n+i/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=f,o=i*r}else{o=s.lastVelocity==null?i:s.lastVelocity;let t=a.restVelocity||f/10,r=a.clamp?0:a.bounce,c=!K6.und(r),p=n==l?s.v0>0:n<l,m,h=!1,g=Math.ceil(e/1);for(let e=0;e<g&&(m=Math.abs(o)>t,!(!m&&(u=Math.abs(l-d)<=f,u)));++e){c&&(h=d==l||d>l==p,h&&(o=-o*r,d=l));let e=(-a.tension*1e-6*(d-l)+-a.friction*.001*o)/a.mass;o+=e*1,d+=o*1}}s.lastVelocity=o,Number.isNaN(d)&&(console.warn(`Got NaN while animating:`,this),u=!0)}o&&!o[c].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,a.round)&&(n=!0)});let s=n5(this),c=s.getValue();if(t){let e=P8(r.to);(c!==e||n)&&!a.decay?(s.setValue(e),this._onChange(e)):n&&a.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return O6.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(B5(this)){let{to:e,config:t}=this.animation;O6.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||=[]).push(e),this}start(e,t){let n;return K6.und(e)?(n=this.queue||[],this.queue=[]):n=[K6.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>this._update(e))).then(e=>D5(this,e))}stop(e){let{to:t}=this.animation;return K6.und(t)||this._focus(this.get()),M5(this._state,e&&this._lastCallId),O6.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type==`change`?this._start():e.type==`priority`&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||``,{to:n,from:r}=e;n=K6.obj(n)?n[t]:n,(n==null||S5(n))&&(n=void 0),r=K6.obj(r)?r[t]:r,r??=void 0;let i={to:n,from:r};return z5(this)||(e.reverse&&([n,r]=[r,n]),r=P8(r),K6.und(r)?n5(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,y5(e,(e,t)=>/^on/.test(t)?_5(e,n):e)),J5(this,e,`onProps`),Y5(this,`onProps`,e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let a=this._state;return E5(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{V5(this)||(U5(this,!0),Q6(a.pauseQueue),Y5(this,`onPause`,k5(this,W5(this,this.animation.to)),this))},resume:()=>{V5(this)&&(U5(this,!1),B5(this)&&this._resume(),Q6(a.resumeQueue),Y5(this,`onResume`,k5(this,W5(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=G5(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(A5(this));let r=!K6.und(e.to),i=!K6.und(e.from);if(r||i){if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(A5(this))}let{key:a,defaultProps:o,animation:s}=this,{to:c,from:l}=s,{to:u=c,from:d=l}=e;i&&!r&&(!t.default||K6.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let f=!q6(d,l);f&&(s.from=d),d=P8(d);let p=!q6(u,c);p&&this._focus(u);let m=S5(t.to),{config:h}=s,{decay:g,velocity:_}=h;(r||i)&&!h.decay&&(h.velocity=0),t.config&&!m&&Zoe(h,h5(t.config,a),t.config===o.config?void 0:h5(o.config,a));let v=n5(this);if(!v||K6.und(u))return n(k5(this,!0));let y=K6.und(t.reset)?i&&!t.default:!K6.und(d)&&g5(t.reset,a),b=y?d:this.get(),x=x5(u),S=K6.num(x)||K6.arr(x)||X8(x),C=!m&&(!S||g5(o.immediate||t.immediate,a));if(p){let e=u5(u);if(e!==v.constructor){if(C)v=this._set(x);else throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`)}}let w=v.constructor,T=N8(u),E=!1;if(!T){let e=y||!z5(this)&&f;(p||e)&&(E=q6(x5(b),x),T=!E),(!q6(s.immediate,C)&&!C||!q6(h.decay,g)||!q6(h.velocity,_))&&(T=!0)}if(E&&B5(this)&&(s.changed&&!y?T=!0:T||this._stop(c)),!m&&((T||N8(c))&&(s.values=v.getPayload(),s.toValues=N8(u)?null:w==s5?[1]:X6(x)),s.immediate!=C&&(s.immediate=C,!C&&!y&&this._set(c)),T)){let{onRest:e}=s;J6(ise,e=>J5(this,t,e));let r=k5(this,W5(this,c));Q6(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&O6.batchedUpdates(()=>{s.changed=!y,e?.(r,this),y?h5(o.onRest,r):s.onStart?.(r,this)})}y&&this._set(b),m?n(j5(t.to,t,this._state,this)):T?this._start():B5(this)&&!p?this._pendingCalls.add(n):n(O5(b))}_focus(e){let t=this.animation;e!==t.to&&(F8(this)&&this._detach(),t.to=e,F8(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;N8(t)&&(R8(t,this),F5(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;N8(e)&&z8(e,this)}_set(e,t=!0){let n=P8(e);if(!K6.und(n)){let e=n5(this);if(!e||!q6(n,e.getValue())){let r=u5(n);!e||e.constructor!=r?r5(this,r.create(n)):e.setValue(n),e&&O6.batchedUpdates(()=>{this._onChange(n,t)})}}return n5(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,Y5(this,`onStart`,k5(this,W5(this,e.to)),this))}_onChange(e,t){let n=k5(e,!1);t||(this._onStart(),h5(this.animation.onChange,n,this)),h5(this.defaultProps.onChange,n,this),super._onChange(e,t)}_start(){let e=this.animation;n5(this).reset(P8(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),B5(this)||(H5(this,!0),V5(this)||this._resume())}_resume(){e8.skipAnimation?this.finish():u8.start(this)}_stop(e,t){if(B5(this)){H5(this,!1);let n=this.animation;J6(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),I8(this,{type:`idle`,parent:this});let r=t?A5(this.get()):k5(this.get(),W5(this,e??n.to));Q6(this._pendingCalls,r),n.changed=!1,Y5(this,`onRest`,r,this)}}};function W5(e,t){let n=x5(t);return q6(x5(e.get()),n)}function G5(e,t=e.loop,n=e.to){let r=h5(t);if(r){let i=r!==!0&&b5(r),a=(i||e).reverse,o=!i||i.reset;return K5({...e,loop:t,default:!1,pause:void 0,to:!a||S5(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function K5(e){let{to:t,from:n}=e=b5(e),r=new Set;return K6.obj(t)&&q5(t,r),K6.obj(n)&&q5(n,r),e.keys=r.size?Array.from(r):null,e}function rse(e){let t=K5(e);return K6.und(t.default)&&(t.default=y5(t)),t}function q5(e,t){Y6(e,(e,n)=>e!=null&&t.add(n))}var ise=[`onStart`,`onRest`,`onChange`,`onPause`,`onResume`];function J5(e,t,n){e.animation[n]=t[n]===v5(t,n)?void 0:_5(t[n],e.key)}function Y5(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var ase=[`onStart`,`onChange`,`onRest`],ose=1,sse=class{constructor(e,t){this.id=ose++,this.springs={},this.queue=[],this._lastAsyncId=0,this._lastLoopId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];K6.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(K5(e)),this}start(e){let{queue:t}=this;return e?t=X6(e).map(K5):this.queue=[],this._flush?this._flush(this,t):(n7(this,t),X5(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;J6(X6(t),t=>n[t].stop(!!e))}else M5(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(K6.und(e))this.start({pause:!0});else{let t=this.springs;J6(X6(e),e=>t[e].pause())}return this}resume(e){if(K6.und(e))this.start({pause:!1});else{let t=this.springs;J6(X6(e),e=>t[e].resume())}return this}each(e){Y6(this.springs,e)}onLoopReset(e){let t=this._onLoopReset??=new Set;return t.add(e),()=>{t.delete(e)}}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,Z6(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&Z6(t,([e,t])=>{t.value=o,e(t,this,this._item)}),a&&(this._started=!1,Z6(n,([e,t])=>{t.value=o,e(t,this,this._item)}))}eventObserved(e){if(e.type==`change`)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type==`idle`)this._active.delete(e.parent);else return;O6.onFrame(this._onFrame)}};function X5(e,t){return Promise.all(t.map(t=>Z5(e,t))).then(t=>D5(e,t))}async function Z5(e,t,n){let{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:c}=t,l=K6.obj(t.default)&&t.default;o&&(t.loop=!1);let u=t,d=!n&&!u.parentId&&`loop`in t?++e._lastLoopId:n?u.loopId:e._lastLoopId;i===!1&&(t.to=null),a===!1&&(t.from=null);let f=K6.arr(i)||K6.fun(i)?i:void 0;f?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):J6(ase,n=>{let r=t[n];if(K6.fun(r)){let i=e._events[n];t[n]=(({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})}),l&&(l[n]=t[n])}});let p=e._state;t.pause===!p.paused?(p.paused=t.pause,Q6(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);let m=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),h=t.cancel===!0||v5(t,`cancel`)===!0;(f||h&&p.asyncId)&&m.push(E5(++e._lastAsyncId,{props:t,state:p,actions:{pause:G6,resume:G6,start(t,n){h?(M5(p,e._lastAsyncId),n(A5(e))):(t.onRest=s,n(j5(f,t,p,e)))}}})),p.paused&&await new Promise(e=>{p.resumeQueue.add(e)});let g=D5(e,await Promise.all(m));if(o&&g.finished&&!(n&&g.noop)&&d===e._lastLoopId){let n=G5(t,o,i);if(n)return n.loopId=d,e._onLoopReset?.forEach(e=>e()),n7(e,[n]),Z5(e,n,!0)}return c&&O6.batchedUpdates(()=>c(g,e,e.item)),g}function Q5(e,t){let n={...e.springs};return t&&J6(X6(t),e=>{K6.und(e.keys)&&(e=K5(e)),K6.obj(e.to)||(e={...e,to:void 0}),t7(n,e,e=>e7(e))}),$5(e,n),n}function $5(e,t){Y6(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,R8(t,e))})}function e7(e,t){let n=new nse;return n.key=e,t&&R8(n,t),n}function t7(e,t,n){t.keys&&J6(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function n7(e,t){J6(t,t=>{t7(e.springs,t,t=>e7(t,e))})}var cse=L.createContext({pause:!1,immediate:!1}),lse=()=>{let e=[],t=function(t){Noe();let r=[];return J6(e,(e,i)=>{if(K6.und(t))r.push(e.start());else{let a=n(t,e,i);a&&r.push(e.start(a))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return J6(e,e=>e.pause(...arguments)),this},t.resume=function(){return J6(e,e=>e.resume(...arguments)),this},t.set=function(t){J6(e,(e,n)=>{let r=K6.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){let n=[];return J6(e,(e,r)=>{if(K6.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}}),n},t.stop=function(){return J6(e,e=>e.stop(...arguments)),this},t.update=function(t){return J6(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return K6.fun(e)?e(n,t):e};return t._getProps=n,t};function r7(e,t,n){let r=K6.fun(t)&&t;r&&!n&&(n=[]);let i=(0,L.useMemo)(()=>r||arguments.length==3?lse():void 0,[]),a=(0,L.useRef)(0),o=Q8(),s=(0,L.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=Q5(e,t);return a.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t])?X5(e,t):new Promise(r=>{$5(e,n),s.queue.push(()=>{r(X5(e,t))}),o()})}}),[]),c=(0,L.useRef)([...s.ctrls]),l=(0,L.useRef)([]),u=(0,L.useRef)([]);u.current=[];let d=e5(e)||0;(0,L.useMemo)(()=>{J6(c.current.slice(e,d),e=>{Joe(e,i),e.stop(!0)}),c.current.length=e,f(d,e)},[e]),(0,L.useMemo)(()=>{f(0,Math.min(d,e))},n);function f(e,n){for(let i=e;i<n;i++){let e=c.current[i]||(c.current[i]=new sse(null,s.flush)),n=r?r(i,e):t[i];n&&(l.current[i]=rse(n))}}let p=c.current.map((e,t)=>Q5(e,l.current[t])),m=(0,L.useContext)(cse),h=m!==e5(m)&&qoe(m);Z8(()=>{a.current++,s.ctrls=c.current;let{queue:e}=s;e.length&&(s.queue=[],J6(e,e=>e()));let t=l.current.length>0?l.current:u.current;J6(c.current,(e,n)=>{i?.add(e),h&&e.start({default:m});let r=t[n];r&&(Yoe(e,r.ref),e.ref?e.queue.push({...r,default:K6.obj(r.default)?{...r.default}:r.default}):e.start(r))}),l.current.length>0&&(u.current=l.current),l.current=[]}),$8(()=>()=>{J6(s.ctrls,e=>e.stop(!0))});let g=p.map(e=>({...e}));return i?[g,i]:g}function i7(e,t){let n=K6.fun(e),[[r],i]=r7(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,i]:r}var use=class extends I5{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=w8(...t);let n=this._get(),r=u5(n);r5(this,r.create(n))}advance(e){let t=this._get();q6(t,this.get())||(n5(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&a7(this._active)&&o7(this)}_get(){let e=K6.arr(this.source)?this.source.map(P8):X6(P8(this.source));return this.calc(...e)}_start(){this.idle&&!a7(this._active)&&(this.idle=!1,J6(i5(this),e=>{e.done=!1}),e8.skipAnimation?(O6.batchedUpdates(()=>this.advance()),o7(this)):u8.start(this))}_attach(){let e=1;J6(X6(this.source),t=>{N8(t)&&R8(t,this),F5(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){J6(X6(this.source),e=>{N8(e)&&z8(e,this)}),this._active.clear(),o7(this)}eventObserved(e){e.type==`change`?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type==`idle`?this._active.delete(e.parent):e.type==`priority`&&(this.priority=X6(this.source).reduce((e,t)=>Math.max(e,(F5(t)?t.priority:0)+1),0))}};function dse(e){return e.idle!==!1}function a7(e){return!e.size||Array.from(e).every(dse)}function o7(e){e.idle||(e.idle=!0,J6(i5(e),e=>{e.done=!0}),I8(e,{type:`idle`,parent:e}))}e8.assign({createStringInterpolator:q8,to:(e,t)=>new use(e,t)}),u8.advance;var s7=/^--/;function fse(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t==`number`&&t!==0&&!s7.test(e)&&!(l7.hasOwnProperty(e)&&l7[e])?t+`px`:(``+t).trim()}var c7={};function pse(e,t){if(!e.nodeType||!e.setAttribute||!e.removeAttribute)return!1;let n=e.nodeName===`filter`||e.parentNode&&e.parentNode.nodeName===`filter`,{className:r,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:c,...l}=t,u=Object.values(l),d=Object.keys(l).map(t=>n||e.hasAttribute(t)?t:c7[t]||(c7[t]=t.replace(/([A-Z])/g,e=>`-`+e.toLowerCase())));t.hasOwnProperty(`children`)&&(e.textContent=a);for(let t in i)if(i.hasOwnProperty(t)){let n=fse(t,i[t]);s7.test(t)?e.style.setProperty(t,n):e.style[t]=n}d.forEach((t,n)=>{let r=u[n];r===void 0?e.removeAttribute(t):e.setAttribute(t,r)}),t.hasOwnProperty(`className`)&&(r===void 0?e.removeAttribute(`class`):e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),t.hasOwnProperty(`viewBox`)&&(c===void 0?e.removeAttribute(`viewBox`):e.setAttribute(`viewBox`,c))}var l7={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},mse=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),hse=[`Webkit`,`Ms`,`Moz`,`O`];l7=Object.keys(l7).reduce((e,t)=>(hse.forEach(n=>e[mse(n,t)]=e[t]),e),l7);var gse=/^(matrix3d|matrix|translate3d|translate[XYZ]?|scale3d|scale[XYZ]?|rotate3d|rotate[XYZ]?|skew[XY]?)$/,_se=/^(translate)/,vse=/^(rotate|skew)/,u7=(e,t)=>K6.num(e)&&e!==0?e+t:e,d7=(e,t)=>K6.arr(e)?e.every(e=>d7(e,t)):K6.num(e)?e===t:parseFloat(e)===t,yse=class extends l5{constructor({x:e,y:t,z:n,...r}){let i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(e=>[`translate3d(${e.map(e=>u7(e,`px`)).join(`,`)})`,d7(e,0)])),Y6(r,(e,t)=>{if(t===`transform`)i.push([e||``]),a.push(e=>[e,e===``]);else if(gse.test(t)){if(delete r[t],K6.und(e))return;let n=_se.test(t)?`px`:vse.test(t)?`deg`:``;i.push(X6(e)),a.push(t===`rotate3d`?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${u7(i,n)})`,d7(i,0)]:e=>[`${t}(${e.map(e=>u7(e,n)).join(`,`)})`,d7(e,+!!t.startsWith(`scale`))])}}),i.length&&(r.transform=new bse(i,a)),super(r)}},bse=class extends L8{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||=this._get()}_get(){let e=``,t=!0;return J6(this.inputs,(n,r)=>{let i=P8(n[0]),[a,o]=this.transforms[r](K6.arr(i)?i:n.map(P8));e+=` `+a,t&&=o}),t?`none`:e}observerAdded(e){e==1&&J6(this.inputs,e=>J6(e,e=>N8(e)&&R8(e,this)))}observerRemoved(e){e==0&&J6(this.inputs,e=>J6(e,e=>N8(e)&&z8(e,this)))}eventObserved(e){e.type==`change`&&(this._value=null),I8(this,e)}},xse=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`);e8.assign({batchedUpdates:g_.unstable_batchedUpdates,createStringInterpolator:q8,colors:uoe});var f7=Hoe(xse,{applyAnimatedValues:pse,createAnimatedStyle:e=>new yse(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated;function Sse({points:e,stats:t,partCntPerPoint:n}){return{series:(0,L.useMemo)(()=>Q.of(e).toSortedArray(([e])=>e).map(([t,n],r)=>({name:t,color:v6(r,e.size),points:n??[]})),[e]),median:(0,L.useMemo)(()=>t?{low:(n??1)*(t.medianMinutesForSingleMat-t.MAD_belowMinutes),high:(n??1)*(t.medianMinutesForSingleMat+t.MAD_aboveMinutes)}:null,[t,n])}}var p7=50,Cse=30,m7=10,wse=2;function Tse({points:e,yZoom:t,default_date_range:n,current_date_zoom:r,containerWidth:i,containerHeight:a}){let o=i===0?400:i,s=a===0?400:a,c=o-p7-wse,l=s-m7-Cse,u=(0,L.useMemo)(()=>r?fF().domain([r.start,r.end]).range([0,c]):fF().domain([n[0],n[1]]).range([0,c]),[r,n,c]),d=(0,L.useMemo)(()=>{if(e.size===0)return 60;let t=Q.of(e).flatMap(([,e])=>e.map(e=>e.y)).maxBy(e=>e)??1;return Math.ceil(t/5)*5},[e]);return{height:s,width:o,xScale:u,yScale:(0,L.useMemo)(()=>t?$M().domain([t.y_low,t.y_high]).range([l,0]):$M().domain([0,d]).range([l,0]),[l,t,d])}}var Ese=(0,L.memo)(function({xScale:e,yScale:t}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(zA,{scale:e,top:t.range()[0]}),(0,H.jsx)(BA,{scale:t,left:e.range()[0],label:`Minutes`}),(0,H.jsx)(IA,{width:e.range()[1]-e.range()[0],height:t.range()[0]-t.range()[1],xScale:e,yScale:t})]})}),h7=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(),[r,i]=(0,L.useState)(),[a,o]=(0,L.useState)(!1);function s(){o(!1),n(void 0),i(void 0)}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(th,{size:`small`,onClick:()=>o(!0),children:(0,H.jsx)(HT,{fontSize:`inherit`})}),(0,H.jsxs)(py,{open:a,onClose:s,children:[(0,H.jsxs)(hy,{children:[(0,H.jsx)(`div`,{style:{marginBottom:`1em`},children:(0,H.jsx)(nT,{type:`number`,label:`Y Low`,value:t===void 0?e.yZoom?.y_low??``:isNaN(t)?``:t,onChange:e=>n(parseFloat(e.target.value)),onBlur:()=>{t&&e.setZoom(e=>e?{...e,y_low:t}:{y_low:t,y_high:60})}})}),(0,H.jsx)(`div`,{style:{marginBottom:`1em`},children:(0,H.jsx)(nT,{type:`number`,label:`Y High`,value:r===void 0?e.yZoom?.y_high??``:isNaN(r)?``:r,onChange:e=>i(parseFloat(e.target.value)),onBlur:()=>{r&&e.setZoom(e=>e?{...e,y_high:r}:{y_low:0,y_high:r})}})})]}),(0,H.jsx)(my,{children:(0,H.jsx)(Y,{onClick:s,children:`Close`})})]})]})}),Dse=(0,L.memo)(function({median:e,plannedMinutes:t,xScale:n,yScale:r}){let i=i7({to:{x:n.range()[0],y:e?r(e.high):r.range()[0],width:n.range()[1]-n.range()[0],height:e?r(e.low)-r(e.high):0},from:{x:n.range()[0],y:r.range()[0],width:n.range()[1]-n.range()[0],height:0}}),a=i7({to:{y:t?r(t):r.range()[0]},from:{y:r.range()[0]}});return(0,H.jsxs)(`g`,{children:[e?(0,H.jsx)(f7.rect,{x:i.x,y:i.y,width:i.width,height:i.height,fill:Lr[700],opacity:.2,pointerEvents:`none`}):void 0,t?(0,H.jsx)(f7.line,{stroke:`black`,x1:n.range()[0],x2:n.range()[1],y1:a.y,y2:a.y}):void 0]})}),Ose=(0,L.memo)(function({seriesName:e,points:t,color:n,xScale:r,yScale:i,showTooltip:a}){let o=(0,L.useCallback)(n=>{let r=hA(n);if(r===null)return;let i=n.currentTarget.dataset.idx;i!==void 0&&a({left:r.x,top:r.y,pt:t[parseInt(i)],seriesName:e})},[a,t,e]),s=r7(t.length,t.map(e=>({from:{x:r(e.x),y:i.range()[0]+15},to:{x:r(e.x),y:i(e.y)}})));return(0,H.jsx)(`g`,{children:s.map((e,t)=>(0,H.jsx)(f7.circle,{className:`bms-cycle-chart-pt`,fill:n,r:5,cx:e.x,cy:e.y,"data-idx":t,onClick:o},t))})}),kse=(0,L.memo)(function({series:e,xScale:t,yScale:n,showTooltip:r,disabledSeries:i}){return(0,H.jsx)(`g`,{children:e.filter(e=>!i.has(e.name)).map(e=>(0,H.jsx)(Ose,{points:e.points,seriesName:e.name,color:e.color,xScale:t,yScale:n,showTooltip:r},e.name))})}),Ase=(0,L.memo)(function({series:e,disabledSeries:t,adjustDisabled:n}){return(0,H.jsx)(`div`,{style:{marginTop:`1em`,display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`},children:e.map(e=>(0,H.jsx)(rT,{selected:!t.has(e.name),value:e,onChange:()=>n(t=>t.has(e.name)?t.delete(e.name):t.add(e.name)),children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{style:{width:`14px`,height:`14px`,backgroundColor:e.color}}),(0,H.jsx)(`div`,{style:{marginLeft:`1em`},children:e.name})]})},e.name))})}),jse=G(`g`,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$noPtrEvents:e})=>e?{"& .bms-cycle-chart-pt":{pointerevents:`none`}}:void 0),Mse=(0,L.memo)(function({setYZoom:e,setXZoom:t,setTooltip:n,xScale:r,yScale:i,highlightStart:a,setHighlightStart:o}){let[s,c]=(0,L.useState)(null),l=(0,L.useCallback)(e=>{let t=hA(e);t!==null&&(c(null),o({x:t.x-p7,y:t.y-m7,nowMS:Date.now()}),n(null))},[o,n]),u=(0,L.useCallback)(e=>{let t=hA(e);t!==null&&c({x:t.x-p7,y:t.y-m7})},[c]),d=(0,L.useCallback)(n=>{if(a!==null){if(Date.now()-a.nowMS>500){let o=hA(n);if(o!==null){let n=r.invert(a.x),s=r.invert(o.x-p7),c=i.invert(a.y),l=i.invert(o.y-m7);e(c<l?{y_low:c,y_high:l}:{y_low:l,y_high:c}),t?.({zoom:n.getTime()<s.getTime()?{start:n,end:s}:{start:s,end:n}})}}o(null),c(null)}},[a,o,c,t,e,r,i]);return(0,H.jsxs)(`g`,{children:[(0,H.jsx)(`rect`,{x:0,y:0,width:r.range()[1],height:i.range()[0],fill:`transparent`,onPointerDown:l,onPointerMove:a===null?void 0:u,onPointerUp:a===null?void 0:d}),a!==null&&s!==null?(0,H.jsx)(`rect`,{x:Math.min(a.x,s.x),y:Math.min(a.y,s.y),width:Math.abs(a.x-s.x),height:Math.abs(a.y-s.y),color:`red`,pointerEvents:`none`,opacity:.3}):void 0]})}),Nse=(0,L.memo)(function({set_date_zoom_range:e,current_date_zoom:t,yZoom:n,setYZoom:r,median:i}){return(0,H.jsxs)(`div`,{children:[e&&(t||n)?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Y,{size:`small`,onClick:()=>{e?.({zoom:void 0}),r(null)},children:`Reset Zoom`}),(0,H.jsx)(h7,{yZoom:n,setZoom:r})]}):void 0,e&&!t&&!n?(0,H.jsxs)(`span`,{style:{color:`#6b6b76`},children:[`Zoom via mouse drag`,i?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{children:` or `}),(0,H.jsx)(Y,{size:`small`,onClick:()=>{let e=i.high,t=i.low,n=.2*(e-t);r({y_low:t-n,y_high:e+n})},children:`Zoom To Inliers`})]}):void 0,(0,H.jsx)(h7,{yZoom:n,setZoom:r})]}):void 0]})}),Pse=(0,L.memo)(function({tooltip:e,extraTooltip:t,seriesLabel:n}){return e===null?null:(0,H.jsxs)(uw,{direction:`column`,spacing:.6,children:[(0,H.jsxs)(`div`,{children:[`Time:`,` `,e.pt.x.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})]}),(0,H.jsxs)(`div`,{children:[n,`: `,e.seriesName]}),(0,H.jsxs)(`div`,{children:[`Cycle Time: `,e.pt.y.toFixed(1),` minutes`]}),t?t(e.pt).map((e,t)=>(0,H.jsxs)(`div`,{children:[e.title,`:`,` `,e.link?(0,H.jsx)(`a`,{style:{color:`white`,pointerEvents:`auto`,cursor:`pointer`,borderBottom:`1px solid`},onClick:e.link,children:e.value}):(0,H.jsx)(`span`,{children:`e.value`})]},t)):void 0]})});function Fse(e){let{width:t,height:n,xScale:r,yScale:i}=Tse({points:e.points,yZoom:e.yZoom,setYZoom:e.setYZoom,default_date_range:e.default_date_range,current_date_zoom:e.current_date_zoom,set_date_zoom_range:e.set_date_zoom_range,containerWidth:e.containerWidth,containerHeight:e.containerHeight});return(0,H.jsx)(`svg`,{width:t,height:n,children:(0,H.jsxs)(`g`,{transform:`translate(${p7}, ${m7})`,children:[(0,H.jsx)(Ese,{xScale:r,yScale:i}),(0,H.jsx)(Dse,{median:e.median,plannedMinutes:e.plannedTimeMinutes,xScale:r,yScale:i}),(0,H.jsx)(Mse,{setYZoom:e.setYZoom,setXZoom:e.set_date_zoom_range,xScale:r,setTooltip:e.showTooltip,yScale:i,highlightStart:e.highlightStart,setHighlightStart:e.setHighlightStart}),(0,H.jsx)(jse,{$noPtrEvents:e.highlightStart!==null,children:(0,H.jsx)(kse,{series:e.series,disabledSeries:e.disabledSeries,xScale:r,yScale:i,showTooltip:e.showTooltip})})]})})}var g7=(0,L.memo)(function(e){let t=(0,L.useMemo)(()=>P(null),[]),n=z(t),[r,i]=(0,L.useState)(cO.empty()),[a,o]=(0,L.useState)(null),{series:s,median:c}=Sse({points:e.points,stats:e.stats,partCntPerPoint:e.partCntPerPoint}),l=(0,L.useCallback)(()=>{n(null),o(null)},[n,o]);return(0,H.jsxs)(`div`,{onPointerLeave:l,children:[(0,H.jsx)(OA,{sx:{height:{xs:`calc(100vh - 320px)`,md:`calc(100vh - 280px)`,xl:`calc(100vh - 220px)`}},tooltipAtom:t,TooltipContent:({tooltip:t})=>(0,H.jsx)(Pse,{tooltip:t,seriesLabel:e.series_label,extraTooltip:e.extra_tooltip}),chart:({width:t,height:i})=>(0,H.jsx)(Fse,{...e,containerHeight:i,containerWidth:t,series:s,median:c,yZoom:e.yZoom,setYZoom:e.setYZoom,highlightStart:a,setHighlightStart:o,showTooltip:n,disabledSeries:r})}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`},children:[(0,H.jsx)(`div`,{style:{color:`#6b6b76`},children:`Click on a point for details`}),(0,H.jsx)(`div`,{style:{flexGrow:1}}),(0,H.jsx)(Nse,{set_date_zoom_range:e.set_date_zoom_range,current_date_zoom:e.current_date_zoom,yZoom:e.yZoom,setYZoom:e.setYZoom,median:c})]}),(0,H.jsx)(Ase,{series:s,disabledSeries:r,adjustDisabled:i})]})});function Ise(e){return`operations`in e&&(e.operations===void 0||Array.isArray(e.operations))}var Lse=P(!0),Rse=P(!0),zse=P(void 0),Bse=P(void 0),Vse=P(void 0),Hse=P(`Any`),Use=P(void 0),Wse=P(void 0),Gse=P({}),Kse=P({}),qse=P(null),Jse=P(null);function _7({ty:e}){YI(e===`labor`?`L/U Cycles`:`Machine Cycles`);let t=z(CI),n=(0,L.useCallback)(function(e){if(!Ise(e))return[];let n=[];if(e.operations)for(let r of e.operations)n.push({title:(r.mat.serial?r.mat.serial:`Material`)+` `+r.operation,value:`Open Card`,link:()=>t({type:`LogMat`,logMat:r.mat})});else if(`material`in e&&Array.isArray(e.material))for(let r of e.material)n.push({title:r.serial?r.serial:`Material`,value:`Open Card`,link:()=>t({type:`LogMat`,logMat:r})});return n},[t]),[r,i]=B(e===`labor`?Lse:Rse),[a,o]=B(e===`labor`?Gse:Kse),[s,c]=B(e===`labor`?zse:Bse),[l,u]=B(Vse),[d,f]=B(Hse),[p,m]=B(e===`labor`?Use:Wse),[h,g]=B(e===`labor`?qse:Jse),_=R(br),v=dk(_.basketName),y=R(gk),b=Uk(d,e!==`labor`||y),x=R(qO),S=[QT(xE(),-4),QT(xE(),1)],C=R(hk),w=R(_L),T=(0,L.useMemo)(()=>{let t=xE();return l?Jk(C.valuesToLazySeq(),{zoom:{start:QT(t,-4),end:QT(t,1)},partAndProc:s,pallet:p,operation:l,carrierKind:b}):e===`labor`&&r?Yk(C.valuesToLazySeq(),{zoom:{start:QT(t,-4),end:QT(t,1)},partAndProc:s,pallet:p,carrierKind:b}):Jk(C.valuesToLazySeq(),{zoom:{start:QT(t,-4),end:QT(t,1)},partAndProc:s,pallet:p,station:e===`labor`?Kk:Gk,carrierKind:b})},[C,e,s,p,l,r,b]),E=s?l??(T.allMachineOperations.length===1?T.allMachineOperations[0]:void 0):void 0,D=(0,L.useMemo)(()=>{if(E&&e===`machine`)return Xk(T,!1)},[T,e,E]);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsxs)(q,{variant:`subtitle1`,children:[`Recent `,e===`labor`?`Load/Unload Occupancy`:`Machine Cycles`]}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{name:`Station-Cycles-chart-or-table-select`,autoWidth:!0,value:r?`graph`:`table`,onChange:e=>i(e.target.value===`graph`),children:[(0,H.jsx)(gS,{value:`graph`,children:`Graph`},`graph`),(0,H.jsx)(gS,{value:`table`,children:`Table`},`table`)]})}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,displayEmpty:!0,value:s?T.allPartAndProcNames.findIndex(e=>s.part===e.part&&s.proc===e.proc):-1,style:{marginLeft:`1em`},onChange:e=>{c(e.target.value===-1?void 0:T.allPartAndProcNames[e.target.value]),u(void 0)},children:[(0,H.jsx)(gS,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Part`})},0),T.allPartAndProcNames.map((e,t)=>(0,H.jsx)(gS,{value:t,children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(tW,{part:e.part,size:20}),(0,H.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}),e===`machine`?(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsx)(xC,{name:`Station-Cycles-cycle-chart-station-select`,autoWidth:!0,displayEmpty:!0,value:E?T.allMachineOperations.findIndex(e=>E.compare(e)===0):-1,style:{marginLeft:`1em`},onChange:e=>u(T.allMachineOperations[e.target.value]),children:[...T.allMachineOperations.length===1?[]:[(0,H.jsx)(gS,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Operation`})},-1)],...T.allMachineOperations.map((e,t)=>(0,H.jsxs)(gS,{value:t,children:[e.statGroup,` `,e.operation]},t))]})}):void 0,e===`labor`&&y?(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,displayEmpty:!0,value:b,style:{marginLeft:`1em`},onChange:e=>{let t=e.target.value;f(t),t===`Basket`&&m(void 0)},children:[(0,H.jsx)(gS,{value:`Any`,children:(0,H.jsx)(`em`,{children:`Any Carrier`})}),(0,H.jsx)(gS,{value:`Pallet`,children:`Pallet`}),(0,H.jsx)(gS,{value:`Basket`,children:v})]})}):void 0,e!==`labor`||b!==`Basket`?(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{name:`Station-Cycles-cycle-chart-station-pallet`,autoWidth:!0,displayEmpty:!0,value:p||``,style:{marginLeft:`1em`},onChange:e=>m(e.target.value===``?void 0:e.target.value),children:[(0,H.jsx)(gS,{value:``,children:(0,H.jsx)(`em`,{children:`Any Pallet`})},0),T.allPalletNames.map(e=>(0,H.jsx)(gS,{value:e,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}):void 0,(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{onClick:()=>eA(T,w.matsById,void 0,e===`labor`,_.loadStationNames,v),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(bT,{})})})]}),(0,H.jsx)(`main`,{children:r?(0,H.jsx)(g7,{points:T.data,series_label:T.seriesLabel,default_date_range:S,extra_tooltip:n,current_date_zoom:a.zoom,set_date_zoom_range:o,yZoom:h,setYZoom:g,stats:E&&e===`machine`?x.get(E):void 0,partCntPerPoint:E?Q.of(T.data).head()?.[1]?.[0]?.material?.length:void 0,plannedTimeMinutes:D}):(0,H.jsx)(o6,{points:T.data,matsById:w.matsById,period:{type:`Last30`},current_date_zoom:void 0,set_date_zoom_range:void 0,showWorkorderAndInspect:!0,hideMedian:e===`labor`})})]})}var Yse=Q.ofRange(0,12,1).map(e=>new Date(2019,e,1)).chunk(3).toRArray(),Xse=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(!1),[r,i]=(0,L.useState)(void 0);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(rb,{type:`text`,value:(r||e.curMonth).toLocaleDateString(void 0,{month:`long`,year:`numeric`}),readOnly:!0,endAdornment:(0,H.jsx)(ub,{position:`end`,children:(0,H.jsx)(th,{"aria-label":`Open month select`,"data-testid":`open-month-select`,onClick:()=>{i(yE(e.curMonth)),n(!0)},size:`large`,children:(0,H.jsx)(fre,{})})})}),(0,H.jsx)(py,{open:t,onClose:()=>{n(!1),i(void 0)},children:(0,H.jsxs)(hy,{children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(th,{"data-testid":`select-month-dialog-previous-year`,onClick:()=>i(uE(r||e.curMonth,-1)),size:`large`,children:(0,H.jsx)(ST,{})}),(0,H.jsx)(`div`,{style:{flexGrow:1},children:(0,H.jsx)(q,{variant:`h5`,align:`center`,"data-testid":`select-month-dialog-current-year`,children:(r||e.curMonth).toLocaleDateString(void 0,{year:`numeric`})})}),(0,H.jsx)(th,{onClick:()=>i(uE(r||e.curMonth,1)),size:`large`,children:(0,H.jsx)(CT,{})})]}),(0,H.jsx)(`div`,{"data-testid":`select-month-dialog-choose-month`,children:Yse.map((t,a)=>(0,H.jsx)(`div`,{style:a>0?{marginTop:`1.2em`}:void 0,children:t.map((t,a)=>(0,H.jsx)(Y,{color:`primary`,style:a>0?{marginLeft:`1.2em`}:void 0,onClick:()=>{e.onSelectMonth(new Date((r||e.curMonth).getFullYear(),t.getMonth(),1)),i(void 0),n(!1)},children:t.toLocaleDateString(void 0,{month:`short`})},a))},a))})]})})]})}),v7=(0,L.memo)(function(){let e=R(ZR),[t,n]=B(XR),r=az(),i=iz();return(0,H.jsxs)(uw,{component:`nav`,direction:`row`,spacing:3,sx:{paddingLeft:`24px`,paddingRight:`24px`,alignItems:`center`},children:[(0,H.jsx)(Py,{control:(0,H.jsx)(GS,{checked:e.type===`Last30`,color:`secondary`,onChange:(e,t)=>t?i():null}),label:`Last 30 days`}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(Py,{control:(0,H.jsx)(GS,{checked:e.type===`SpecificMonth`,color:`secondary`,onChange:(e,r)=>r?n(t):null}),label:`Select Month`}),(0,H.jsx)(Xse,{curMonth:t,onSelectMonth:t=>{e.type===`SpecificMonth`?n(t):r(t)}})]})]})});function y7(e){return function(){return e}}var b7=Math.PI;b7/2,2*b7;var x7=Math.PI,S7=2*x7,C7=1e-6,Zse=S7-C7;function w7(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Qse(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return w7;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var T7=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?w7:Qse(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>C7){if(!(Math.abs(u*s-c*l)>C7)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((x7-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>C7&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>C7||Math.abs(this._y1-l)>C7)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%S7+S7),d>Zse?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>C7&&this._append`A${n},${n},0,${+(d>=x7)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};T7.prototype;function $se(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new T7(t)}Array.prototype.slice;function ece(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function E7(e){this._context=e}E7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function tce(e){return new E7(e)}function nce(e){return e[0]}function rce(e){return e[1]}function ice(e,t){var n=y7(!0),r=null,i=tce,a=null,o=$se(s);e=typeof e==`function`?e:e===void 0?nce:y7(e),t=typeof t==`function`?t:t===void 0?rce:y7(t);function s(s){var c,l=(s=ece(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:y7(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:y7(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:y7(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function D7(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function O7(e,t){this._context=e,this._k=(1-t)/6}O7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:D7(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:D7(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},(function e(t){function n(e){return new O7(e,t)}return n.tension=function(t){return e(+t)},n})(0);function ace(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function k7(e,t){this._context=e,this._alpha=t}k7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:ace(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var oce=(function e(t){function n(e){return t?new k7(e,t):new O7(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function sce(e){switch(e.type){case`Queue`:return e.queue;case`Rotary`:return`Rotary `+e.machineGroup+` #`+e.machineNum.toString();case`StockerWaitForMC`:return`Stocker[Waiting For Machining]`;case`StockerWaitForUnload`:return`Stocker[Waiting For Unload]`}}function cce(e,t,n){let r=Math.max(t.x.getTime()-e,n.endTime.getTime()-n.elapsedSeconds*1e3),i=Math.min(t.x.getTime()+e,n.endTime.getTime());t.y+=(i-r)/(2*e)*n.numMaterial}function lce(e,t,n,r){let i=new Date(e.getTime()+n),a=new Date(t.getTime()-n),o=(a.getTime()-i.getTime())/149,s=[];for(let e=0;e<149;e++)s.push({x:new Date(i.getTime()+e*o),y:0});s.push({x:a,y:0});for(let e of r){let t=Math.max(0,Math.ceil((e.endTime.getTime()-e.elapsedSeconds*1e3-n-i.getTime())/o)),r=Math.min(149,Math.floor((e.endTime.getTime()+n-i.getTime())/o));for(let i=t;i<=r;i++)cce(n,s[i],e)}return s}function uce(e,t,n,r,i){let a=n*60*60*1e3;return Q.of(i).filter(e=>e.buffer.type!==`Queue`||!r.has(e.buffer.queue)).groupBy(e=>sce(e.buffer)).map(([n,r])=>({label:n,points:lce(e,t,a,r)})).toSortedArray(e=>e.label)}function A7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dce(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?A7(Object(n),!0).forEach(function(t){fce(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A7(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function j7(e){"@babel/helpers - typeof";return j7=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},j7(e)}function fce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M7(){return M7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M7.apply(this,arguments)}function pce(e,t){if(e){if(typeof e==`string`)return N7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N7(e,t)}}function N7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function P7(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=pce(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
366
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function mce(e,t){var n=[],r=[];function i(e,t){if(e.length===1)n.push(e[0]),r.push(e[0]);else{for(var a=Array(e.length-1),o=0;o<a.length;o++)o===0&&n.push(e[0]),o===a.length-1&&r.push(e[o+1]),a[o]=[(1-t)*e[o][0]+t*e[o+1][0],(1-t)*e[o][1]+t*e[o+1][1]];i(a,t)}}return e.length&&i(e,t),{left:n,right:r.reverse()}}function hce(e){var t={};return e.length===4&&(t.x2=e[2][0],t.y2=e[2][1]),e.length>=3&&(t.x1=e[1][0],t.y1=e[1][1]),t.x=e[e.length-1][0],t.y=e[e.length-1][1],t.type=e.length===4?`C`:e.length===3?`Q`:`L`,t}function gce(e,t){t||=2;for(var n=[],r=e,i=1/t,a=0;a<t-1;a++){var o=i/(1-i*a),s=mce(r,o);n.push(s.left),r=s.right}return n.push(r),n}function _ce(e,t,n){var r=[[e.x,e.y]];return t.x1!=null&&r.push([t.x1,t.y1]),t.x2!=null&&r.push([t.x2,t.y2]),r.push([t.x,t.y]),gce(r,n).map(hce)}var vce=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,F7={M:[`x`,`y`],L:[`x`,`y`],H:[`x`],V:[`y`],C:[`x1`,`y1`,`x2`,`y2`,`x`,`y`],S:[`x2`,`y2`,`x`,`y`],Q:[`x1`,`y1`,`x`,`y`],T:[`x`,`y`],A:[`rx`,`ry`,`xAxisRotation`,`largeArcFlag`,`sweepFlag`,`x`,`y`],Z:[]};Object.keys(F7).forEach(function(e){F7[e.toLowerCase()]=F7[e]});function I7(e,t){for(var n=Array(e),r=0;r<e;r++)n[r]=t;return n}function yce(e){return`${e.type}${F7[e.type].map(function(t){return e[t]}).join(`,`)}`}function bce(e,t){var n={x1:`x`,y1:`y`,x2:`x`,y2:`y`},r=[`xAxisRotation`,`largeArcFlag`,`sweepFlag`];if(e.type!==t.type&&t.type.toUpperCase()!==`M`){var i={};Object.keys(t).forEach(function(a){var o=t[a],s=e[a];s===void 0&&(r.includes(a)?s=o:(s===void 0&&n[a]&&(s=e[n[a]]),s===void 0&&(s=0))),i[a]=s}),i.type=t.type,e=i}return e}function xce(e,t,n){var r=[];if(t.type===`L`||t.type===`Q`||t.type===`C`)r=r.concat(_ce(e,t,n));else{var i=M7({},e);i.type===`M`&&(i.type=`L`),r=r.concat(I7(n-1).map(function(){return i})),r.push(t)}return r}function L7(e,t,n){var r=e.length-1,i=t.length-1,a=r/i,o=I7(i).reduce(function(t,r,i){var o=Math.floor(a*i);if(n&&o<e.length-1&&n(e[o],e[o+1])){var s=a*i%1<.5;t[o]&&(s?o>0?--o:o<e.length-1&&(o+=1):o<e.length-1?o+=1:o>0&&--o)}return t[o]=(t[o]||0)+1,t},[]).reduce(function(t,n,r){if(r===e.length-1){var i=I7(n,M7({},e[e.length-1]));return i[0].type===`M`&&i.forEach(function(e){e.type=`L`}),t.concat(i)}return t.concat(xce(e[r],e[r+1],n))},[]);return o.unshift(e[0]),o}function R7(e){for(var t=(e||``).match(vce)||[],n=[],r,i,a=0;a<t.length;++a)if(r=F7[t[a]],r){i={type:t[a]};for(var o=0;o<r.length;++o)i[r[o]]=+t[a+o+1];a+=r.length,n.push(i)}return n}function Sce(e,t,n){var r=e==null?[]:e.slice(),i=t==null?[]:t.slice(),a=j7(n)===`object`?n:{excludeSegment:n,snapEndsToInput:!0},o=a.excludeSegment,s=a.snapEndsToInput;if(!r.length&&!i.length)return function(){return[]};var c=(r.length===0||r[r.length-1].type===`Z`)&&(i.length===0||i[i.length-1].type===`Z`);r.length>0&&r[r.length-1].type===`Z`&&r.pop(),i.length>0&&i[i.length-1].type===`Z`&&i.pop(),r.length?i.length||i.push(r[0]):r.push(i[0]),Math.abs(i.length-r.length)!==0&&(i.length>r.length?r=L7(r,i,o):i.length<r.length&&(i=L7(i,r,o))),r=r.map(function(e,t){return bce(e,i[t])});var l=r.map(function(e){return dce({},e)});return c&&(l.push({type:`Z`}),r.push({type:`Z`})),function(e){if(e===1&&s)return t??[];if(e===0)return r;for(var n=0;n<l.length;++n){var a=r[n],o=i[n],c=l[n],u=P7(F7[c.type]),d;try{for(u.s();!(d=u.n()).done;){var f=d.value;c[f]=(1-e)*a[f]+e*o[f],(f===`largeArcFlag`||f===`sweepFlag`)&&(c[f]=Math.round(c[f]))}}catch(e){u.e(e)}finally{u.f()}}return l}}function Cce(e,t,n){var r=R7(e),i=R7(t),a=j7(n)===`object`?n:{excludeSegment:n,snapEndsToInput:!0},o=a.excludeSegment,s=a.snapEndsToInput;if(!r.length&&!i.length)return function(){return``};var c=Sce(r,i,{excludeSegment:o,snapEndsToInput:s});return function(e){if(e===1&&s)return t??``;var n=c(e),r=``,i=P7(n),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;r+=yce(o)}}catch(e){i.e(e)}finally{i.f()}return r}}var wce=(0,L.memo)(function({series:e,xScale:t,yScale:n,color:r}){let i=ice().curve(oce).x(e=>t(e.x)).y(e=>n(e.y))(e.points)??``,a=(0,L.useRef)(i),o=(0,L.useCallback)(cp(e=>{a.current=e},50),[]),s=Cce(a.current,i);o(i);let{t:c}=i7({from:{t:0},to:{t:1},reset:!0,delay:0});return(0,H.jsx)(f7.path,{d:c.to(s),stroke:r,strokeWidth:2,strokeLinecap:`round`,fill:`transparent`})}),z7=60,Tce=50,B7=20,V7=20;function Ece({width:e,height:t,series:n,disabled:r}){let[i,a]=(0,L.useMemo)(()=>{let e=null,t=null;for(let r of n)for(let n of r.points)(e===null||n.x<e)&&(e=n.x),(t===null||n.x>t)&&(t=n.x);return[e??new Date,t??new Date]},[n]),o=(0,L.useMemo)(()=>fF().range([0,e-z7-V7]).domain([i,a]),[e,i,a]),s=t-Tce-B7,c=(0,L.useMemo)(()=>$M().domain([0,Q.of(n).flatMap(e=>e.points).map(e=>e.y).maxBy(e=>e)??1]).range([s,0]),[n,s]);return(0,H.jsx)(`svg`,{width:e,height:t,children:(0,H.jsxs)(`g`,{transform:`translate(${z7},${B7})`,children:[(0,H.jsx)(zA,{scale:o,top:s}),(0,H.jsx)(BA,{scale:c,left:0,label:`Buffer Size`}),(0,H.jsx)(IA,{xScale:o,yScale:c,width:e-z7-V7,height:s}),n.map((e,t)=>r.has(e.label)?void 0:(0,H.jsx)(wce,{series:e,xScale:o,yScale:c,color:v6(t,n.length)},e.label))]})})}var Dce=(0,L.memo)(function(e){let t=R(ZR),n=t.type===`Last30`?[QT(xE(),-29),QT(xE(),1)]:[t.month,$T(t.month,1)],r=R(t.type===`Last30`?nae:rae),i=R(DL),[a,o]=(0,L.useState)(cO.empty()),s=n[0],c=n[1],l=(0,L.useMemo)(()=>uce(s,c,e.movingAverageDistanceInHours,i,r.valuesToLazySeq()),[s,c,r,e.movingAverageDistanceInHours,i]),{width:u,height:d,ref:f}=TA({refreshMode:`debounce`,refreshRate:100});return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(J,{ref:f,sx:{height:{xs:`calc(100vh - 350px)`,md:`calc(100vh - 285px)`,xl:`calc(100vh - 220px)`},overflow:`hidden`},children:u&&d&&u>0&&d>0&&(0,H.jsx)(Ece,{width:u,height:d,series:l,disabled:a})}),(0,H.jsx)(`div`,{style:{marginTop:`1em`,display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`},children:l.map((e,t)=>(0,H.jsx)(rT,{selected:!a.has(e.label),value:e.label,onChange:()=>o(t=>t.has(e.label)?t.delete(e.label):t.add(e.label)),children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{style:{width:`14px`,height:`14px`,backgroundColor:v6(t,l.length)}}),(0,H.jsx)(`div`,{style:{marginLeft:`1em`},children:e.label})]})},e.label))})]})}),Oce=QC;function kce(){YI(`Buffer Occupancy`);let[e,t]=(0,L.useState)(12);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(q,{variant:`subtitle1`,children:`Average material occupancy of rotary tables and stocker positions over time`}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(`span`,{style:{fontSize:`small`,marginRight:`1em`},children:`Moving Average Window: `}),(0,H.jsx)(Oce,{style:{width:`10em`},min:1,max:36,steps:.2,valueLabelDisplay:`off`,value:e,onChange:(e,n)=>t(n)})]}),(0,H.jsx)(`main`,{children:(0,H.jsx)(Dce,{movingAverageDistanceInHours:e})})]})}function Ace(e,t){return e.some(e=>e===t)}var jce=20,H7=10,Mce=2,U7=`#E8F5E9`,W7=`#1B5E20`;function Nce({yType:e,dateRange:t,containerWidth:n,points:r}){let i=n==null||n===0?400:n,a=(0,L.useMemo)(()=>Q.of(r).map(e=>e.y).distinct().map(_A).maxBy(e=>e??0)??20,[r])+5,o=i-a-Mce,s=t[0],c=t[1],l=(0,L.useMemo)(()=>{let e=[];if(c<s)e.push(s);else{let t=s;for(;t<c;)e.push(t),t=QT(t,1)}return dj().domain(e).range([0,o]).align(0).padding(.05)},[s,c,o]),{yScale:u,height:d,colorScale:f}=(0,L.useMemo)(()=>{let t=new Set;for(let e of r)t.add(e.y);let n=60*t.size,i=n+H7+jce,a=dj().domain(Q.of(t).toSortedArray(e=>e)).range([0,n]).align(0).padding(.05),o;if(e===`Station`)o=$M().domain([0,1]).range([U7,W7]);else{let e=Q.of(r).maxBy(e=>e.color)?.color??1;o=$M().domain([0,e]).range([U7,W7])}return{yScale:a,height:i,colorScale:o}},[r,e]);return{height:d,width:i,xScale:l,yScale:u,colorScale:f,marginLeft:a}}var Pce=(0,L.memo)(function({xScale:e,yScale:t}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(zA,{scale:e,top:t.range()[1],tickFormat:e=>e.toLocaleDateString(void 0,{month:`short`,day:`numeric`})}),(0,H.jsx)(BA,{scale:t,left:e.range()[0]})]})}),Fce=(0,L.memo)(function({points:e,xScale:t,yScale:n,colorScale:r,setTooltip:i}){let a=(0,L.useRef)(null),o=(0,L.useCallback)(t=>{let n=hA(t);if(n===null)return;a.current!==null&&(clearTimeout(a.current),a.current=null);let r=t.currentTarget.dataset.idx;if(r===void 0)return;let o=e[parseInt(r)];i({left:n.x,top:n.y,data:o})},[e,i]),s=(0,L.useCallback)(()=>{a.current===null&&(a.current=window.setTimeout(()=>{a.current=null,i(null)},100))},[i]);return(0,H.jsx)(`g`,{children:e.map((e,i)=>(0,H.jsx)(`rect`,{"data-idx":i,x:t(e.x)??0,width:t.bandwidth(),y:n(e.y)??0,height:n.bandwidth(),rx:6,fill:r(e.color),onPointerEnter:o,onPointerLeave:s},i))})}),Ice=(0,L.memo)(function({yType:e,seriesLabel:t,tooltip:n}){return n===null?null:(0,H.jsxs)(uw,{direction:`column`,spacing:.6,children:[(0,H.jsxs)(`div`,{children:[e,`: `,n.data.y]}),(0,H.jsxs)(`div`,{children:[`Day: `,n.data.x.toDateString()]}),(0,H.jsxs)(`div`,{children:[t,`: `,n.data.label]})]})});function Lce(e){let{width:t,height:n,xScale:r,yScale:i,colorScale:a,marginLeft:o}=Nce({yType:e.y_title,points:e.points,dateRange:e.dateRange,containerWidth:e.parentWidth});return(0,H.jsx)(`svg`,{width:t,height:n,children:(0,H.jsxs)(`g`,{transform:`translate(${o}, ${H7})`,children:[(0,H.jsx)(Fce,{points:e.points,xScale:r,yScale:i,colorScale:a,setTooltip:e.setTooltip}),(0,H.jsx)(Pce,{xScale:r,yScale:i,colorScale:a})]})})}function Rce(e){let t=e.setSelected;return(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(q,{variant:`subtitle1`,children:e.label}),(0,H.jsx)(J,{sx:{flexGrow:1}}),t?(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsx)(xC,{autoWidth:!0,displayEmpty:!0,value:e.cur_selected,onChange:n=>{Ace(e.options,n.target.value)&&t(n.target.value)},children:e.options.map((e,t)=>(0,H.jsx)(gS,{value:e,children:e},t))})}):void 0,(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{onClick:e.onExport,style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(bT,{})})})]})}function G7(e){let t=(0,L.useMemo)(()=>P(null),[]),n=z(t),r=(0,L.useCallback)(()=>{n(null)},[n]);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsx)(Rce,{label:e.label,setSelected:e.setSelected,cur_selected:e.cur_selected,onExport:e.onExport,options:e.options}),(0,H.jsx)(`main`,{onPointerLeave:r,children:(0,H.jsx)(OA,{sx:{width:`100%`},tooltipAtom:t,autoHeight:!0,chart:({width:t})=>(0,H.jsx)(Lce,{points:e.points,y_title:e.y_title,dateRange:e.dateRange,parentWidth:t,setTooltip:n}),TooltipContent:({tooltip:t})=>(0,H.jsx)(Ice,{yType:e.y_title,seriesLabel:e.label_title,tooltip:t})})})]})}var K7=class e{constructor(e,t){this.day=e,this.part=t}compare(e){let t=this.day.getTime()-e.day.getTime();return t===0?this.part.localeCompare(e.part):t}hash(){return MD(this.day,this.part)}toString(){return`{day: ${this.day.toISOString()}}, part: ${this.part}}`}adjustDay(t){return new e(t(this.day),this.part)}},q7=class{constructor(e,t){this.matId=e,this.proc=t}compare(e){let t=this.matId-e.matId;return t===0?this.proc-e.proc:t}hash(){return MD(this.matId,this.proc)}toString(){return this.matId.toString()+`-`+this.proc.toString()}};function zce(e,t,n,r){let i=Q.of(e).filter(e=>e.endTime>=n&&e.endTime<=r&&ik(e)&&e.activeMinutes>0&&e.material.length>0).flatMap(e=>e.material.map(t=>({matId:t.id,proc:t.proc,active:e.activeMinutes/e.material.length}))).toHashMap(e=>[new q7(e.matId,e.proc),e.active],(e,t)=>e+t);return Q.of(t).flatMap(([e,t])=>Q.ofObject(t.unloaded_processes??{}).filter(([,e])=>e>=n&&e<=r).map(([n,r])=>({day:sE(r),part:t.partName+`-`+n,value:{count:1,activeMachineMins:i.get(new q7(e,parseInt(n)))??0}}))).toHashMap(e=>[new K7(e.day,e.part),e.value],(e,t)=>({count:e.count+t.count,activeMachineMins:e.activeMachineMins+t.activeMachineMins}))}function Bce(e){return Q.of(e).toHashMap(e=>[new K7(sE(e.completeTime),e.partName+`-`+e.process.toString()),{count:e.quantity,activeMachineMins:e.expectedMachineMins}],(e,t)=>({count:e.count+t.count,activeMachineMins:e.activeMachineMins+t.activeMachineMins}))}var J7=class{constructor(e,t){this.x=e,this.y=t}compare(e){let t=this.x-e.x;return t===0?this.y.localeCompare(e.y):t}hash(){return MD(this.x,this.y)}toString(){return`{x: ${new Date(this.x).toISOString()}, y: ${this.y}}`}};function Vce(e){let t=Q.of(e).toHashMap(e=>[new J7(e.x.getTime(),e.y),e],(e,t)=>t),n=Q.of(e).map(e=>e.x.getTime()).distinct().toSortedArray(e=>e),r=Q.of(e).aggregate(e=>e.y,e=>e.activeMachineMins/e.count,(e,t)=>isNaN(e)?t:e).sortBy(([e,t])=>e),i=`<table>
|
|
367
|
+
<thead><tr><th>Part</th><th>Expected Cycle Mins</th>`;for(let e of n)i+=`<th>`+new Date(e).toDateString()+` Completed</th>`,i+=`<th>`+new Date(e).toDateString()+` Std. Hours</th>`;i+=`</tr></thead>
|
|
368
|
+
<tbody>
|
|
369
|
+
`;for(let[e,a]of r){i+=`<tr><th>`+e+`</th><th>`+a.toFixed(1)+`</th>`;for(let r of n){let n=t.get(new J7(r,e));n===void 0?(i+=`<td></td>`,i+=`<td></td>`):(i+=`<td>`+n.count.toFixed(0)+`</td>`,i+=`<td>`+(n.activeMachineMins/60).toFixed(1)+`</td>`)}i+=`</tr>
|
|
370
|
+
`}return i+=`</tbody>
|
|
371
|
+
</table>`,i}function Hce(e){Hk(Vce(e))}function Uce(e,t){return Q.of(e).map(([e,n])=>{let r=t.get(e)??0,i=r<1440?Math.max(n/(1440-r),0):0;return{x:e.day,y:e.station,color:Math.min(i,1),label:r<1440?(i*100).toFixed(1)+`%`:`Planned Downtime`}}).toSortedArray(e=>e.x.getTime(),{desc:e=>e.y})}var Wce=P(`Standard OEE`);function Gce(){YI(`Station OEE`);let[e,t]=B(Wce),n=R(ZR),r=n.type===`Last30`?[QT(xE(),-29),QT(xE(),1)]:[n.month,$T(n.month,1)],i=R(n.type===`Last30`?hk:vk),a=R(n.type===`Last30`?cA:uA),o=(0,L.useMemo)(()=>{let t=p6(a);return Uce(e===`Standard OEE`?d6(i.valuesToLazySeq()):e===`Occupied`?Vae(i.valuesToLazySeq()):m6(a),t)},[e,i,a]);return(0,H.jsx)(G7,{label:`Station Usage Per Day`,y_title:`Station`,label_title:e===`Occupied`?`Occupied`:`OEE`,dateRange:r,cur_selected:e,options:[`Standard OEE`,`Occupied`,`Planned OEE`],setSelected:t,points:o,onExport:()=>Wae(`Station`,o)})}var Kce=P(`Completed`);function qce(e,t,n,r){let i=zce(e,t,n,r);return Q.of(i).map(([e,t])=>({x:e.day,y:e.part,color:t.activeMachineMins,label:t.count.toFixed(0)+` (`+(t.activeMachineMins/60).toFixed(1)+` hours)`,count:t.count,activeMachineMins:t.activeMachineMins})).toSortedArray(e=>e.x.getTime(),{desc:e=>e.y})}function Jce(e){let t=Bce(e);return Q.of(t).map(([e,t])=>({x:e.day,y:e.part,color:t.activeMachineMins,label:t.count.toFixed(0)+` (`+(t.activeMachineMins/60).toFixed(1)+` hours)`,count:t.count,activeMachineMins:t.activeMachineMins})).toSortedArray(e=>e.x.getTime(),{desc:e=>e.y})}function Yce(){YI(`Part Production`);let[e,t]=B(Kce),n=R(ZR),r=n.type===`Last30`?[QT(xE(),-29),QT(xE(),1)]:[n.month,$T(n.month,1)],i=R(n.type===`Last30`?hk:vk),a=R(n.type===`Last30`?$I:Qie),o=R(n.type===`Last30`?_L:yL),s=(0,L.useMemo)(()=>{if(e===`Completed`){let e=xE(),t=n.type===`Last30`?QT(e,-30):n.month,r=n.type===`Last30`?QT(e,1):$T(n.month,1);return qce(i.valuesToLazySeq(),o.matsById,t,r)}return Jce(a)},[e,i,o,a,n]);return(0,H.jsx)(G7,{label:`Part Production Per Day`,y_title:`Part`,label_title:e,dateRange:r,cur_selected:e,options:[`Completed`,`Planned`],setSelected:t,points:s,onExport:()=>Hce(s)})}var Y7=new Intl.DateTimeFormat(void 0,{weekday:`short`,month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`});function Xce(e){return`material`in e&&Array.isArray(e.material)}function Zce(e){return`operations`in e&&(e.operations===void 0||Array.isArray(e.operations))}function X7({range:e}){let t=R(ZR);if(!e)return null;let n=`start`in e?e.start:e[0],r=`end`in e?e.end:e[1];return t.type===`SpecificMonth`?n.toDateString()+` to `+r.toDateString():Y7.format(n)+` to `+Y7.format(r)}var Qce=P(!0),$ce=jO(e=>e(KI)?{part:`aaa`,proc:2}:void 0),ele=P(Gk),tle=P(void 0),nle=P(void 0),Z7=P(void 0),Q7=P(pO.empty()),rle=P(e=>{let t=e(ZR);return t.type===`Last30`?e(Z7):e(Q7).get(t.month)},(e,t,n)=>{let r=e(ZR);r.type===`Last30`?t(Z7,n):t(Q7,e=>e.alter(r.month,()=>n))}),ile=P(null);function ale(){YI(`Machine Cycles`);let e=z(CI),t=(0,L.useCallback)(function(t){if(!Xce(t))return[];let n=[];for(let r of t.material)n.push({title:r.serial?r.serial:`Material`,value:`Open Card`,link:()=>e({type:`LogMat`,logMat:r})});return n},[e]),n=R(ZR),r=R(n.type===`Last30`?qO:YO),i=R(n.type===`Last30`?_L:yL),[a,o]=B(Qce),[s,c]=B($ce),[l,u]=B(ele),[d,f]=B(tle),[p,m]=B(nle),[h,g]=B(rle),[_,v]=B(ile),y=n.type===`Last30`?[QT(xE(),-29),QT(xE(),1)]:[n.month,$T(n.month,1)],b=R(n.type===`Last30`?hk:vk),x=(0,L.useMemo)(()=>s?d?Jk(b.valuesToLazySeq(),{partAndProc:s,pallet:p,operation:d}):Jk(b.valuesToLazySeq(),{partAndProc:s,pallet:p,station:Gk}):p||l!==`@@@_FMSInsight_FilterAnyMachineKey_@@@`?Jk(b.valuesToLazySeq(),{pallet:p,station:l}):qk(b.valuesToLazySeq()),[s,p,l,d,b]),S=s?d??(x.allMachineOperations.length===1?x.allMachineOperations[0]:void 0):void 0,C=(0,L.useMemo)(()=>{if(S)return Xk(x,!1)},[x,S]);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsxs)(q,{variant:`subtitle1`,children:[`Machine Cycles for `,(0,H.jsx)(X7,{range:h??y})]}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,value:a?`graph`:`table`,onChange:e=>o(e.target.value===`graph`),children:[(0,H.jsx)(gS,{value:`graph`,children:`Graph`},`graph`),(0,H.jsx)(gS,{value:`table`,children:`Table`},`table`)]})}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,displayEmpty:!0,value:s?x.allPartAndProcNames.findIndex(e=>s.part===e.part&&s.proc===e.proc):-1,style:{marginLeft:`1em`},onChange:e=>{c(e.target.value===-1?void 0:x.allPartAndProcNames[e.target.value]),f(void 0)},children:[(0,H.jsx)(gS,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Part`})},0),x.allPartAndProcNames.map((e,t)=>(0,H.jsx)(gS,{value:t,children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(tW,{part:e.part,size:20}),(0,H.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsx)(xC,{autoWidth:!0,displayEmpty:!0,value:s?S?x.allMachineOperations.findIndex(e=>S.compare(e)===0):-1:l,style:{marginLeft:`1em`},onChange:e=>{if(s){let t=typeof e.target.value==`number`?e.target.value:Number.parseInt(e.target.value,10);Number.isNaN(t)||f(t===-1?void 0:x.allMachineOperations[t])}else typeof e.target.value==`string`&&u(e.target.value)},children:s?[...x.allMachineOperations.length===1?[]:[(0,H.jsx)(gS,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Operation`})},-1)],...x.allMachineOperations.map((e,t)=>(0,H.jsxs)(gS,{value:t,children:[e.statGroup,` `,e.operation]},t))]:[(0,H.jsx)(gS,{value:Gk,children:(0,H.jsx)(`em`,{children:`Any Machine`})},-1),x.allMachineNames.map(e=>(0,H.jsx)(gS,{value:e,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,displayEmpty:!0,value:p||``,style:{marginLeft:`1em`},onChange:e=>m(e.target.value===``?void 0:e.target.value),children:[(0,H.jsx)(gS,{value:``,children:(0,H.jsx)(`em`,{children:`Any Pallet`})},0),x.allPalletNames.map(e=>(0,H.jsx)(gS,{value:e,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),x.data.size>0?(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{onClick:()=>eA(x,i.matsById,h),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(bT,{})})}):void 0]}),(0,H.jsx)(`main`,{children:a?(0,H.jsx)(g7,{points:x.data,series_label:x.seriesLabel,default_date_range:y,extra_tooltip:t,current_date_zoom:h,set_date_zoom_range:e=>g(e.zoom),yZoom:_,setYZoom:v,stats:S?r.get(S):void 0,partCntPerPoint:S?Q.of(x.data).head()?.[1]?.[0]?.material?.length:void 0,plannedTimeMinutes:C}):(0,H.jsx)(o6,{points:x.data,matsById:i.matsById,period:n,current_date_zoom:h,set_date_zoom_range:e=>g(e.zoom),showWorkorderAndInspect:!0,emptyMessage:s||p||d?`No Cycles`:`Select part, station, or pallet to see cycles.`})})]})}var ole=P(!0),sle=jO(e=>e(KI)?{part:`aaa`,proc:2}:void 0),cle=jO(e=>e(KI)?`LoadOp`:`LULOccupancy`),lle=P(Kk),ule=P(`Any`),dle=P(void 0),$7=P(void 0),e9=P(pO.empty()),fle=P(e=>{let t=e(ZR);return t.type===`Last30`?e($7):e(e9).get(t.month)},(e,t,n)=>{let r=e(ZR);r.type===`Last30`?t($7,n):t(e9,e=>e.alter(r.month,()=>n))}),ple=P(null);function mle(){YI(`L/U Cycles`);let e=z(CI),t=(0,L.useCallback)(function(t){if(!Zce(t))return[];let n=[];if(t.operations)for(let r of t.operations)n.push({title:(r.mat.serial?r.mat.serial:`Material`)+` `+r.operation,value:`Open Card`,link:()=>e({type:`LogMat`,logMat:r.mat})});return n},[e]),n=R(ZR),[r,i]=B(ole),[a,o]=B(sle),[s,c]=B(cle),[l,u]=B(lle),[d,f]=B(ule),[p,m]=B(dle),[h,g]=B(fle),[_,v]=B(ple),y=R(br),b=dk(y.basketName),x=R(n.type===`Last30`?gk:yk),S=Uk(d,x),C=(0,L.useMemo)(()=>a&&s===`LoadOp`?new GO(a.part,`L/U`,`LOAD-${a.proc}`):a&&s===`UnloadOp`?new GO(a.part,`L/U`,`UNLOAD-${a.proc}`):null,[a,s]),w=n.type===`Last30`?[QT(xE(),-29),QT(xE(),1)]:[n.month,$T(n.month,1)],T=R(n.type===`Last30`?hk:vk),E=R(n.type===`Last30`?_L:yL),D=R(n.type===`Last30`?qO:YO),O=(0,L.useMemo)(()=>a||p||l!==`@@@_FMSInsigt_FilterAnyLoadKey_@@@`||S!==`Any`?C?Jk(T.valuesToLazySeq(),{operation:C,pallet:p,station:l,carrierKind:S}):r?Yk(T.valuesToLazySeq(),{partAndProc:a,pallet:p,station:l,carrierKind:S}):Jk(T.valuesToLazySeq(),{partAndProc:a,pallet:p,station:l,carrierKind:S}):qk(T.valuesToLazySeq()),[a,p,C,l,T,r,S]),ee=(0,L.useMemo)(()=>{if(s===`LoadOp`||s===`UnloadOp`)return Xk(O,!0)},[O,s]);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsxs)(q,{variant:`subtitle1`,children:[`Load/Unload Cycles for `,(0,H.jsx)(X7,{range:h??w})]}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,value:r?`graph`:`table`,onChange:e=>i(e.target.value===`graph`),children:[(0,H.jsx)(gS,{value:`graph`,children:`Graph`},`graph`),(0,H.jsx)(gS,{value:`table`,children:`Table`},`table`)]})}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,displayEmpty:!0,value:a?O.allPartAndProcNames.findIndex(e=>a.part===e.part&&a.proc===e.proc):-1,style:{marginLeft:`1em`},onChange:e=>{e.target.value===-1?(o(void 0),c(`LULOccupancy`)):o(e.target.value===-1?void 0:O.allPartAndProcNames[e.target.value])},children:[(0,H.jsx)(gS,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Part`})},0),O.allPartAndProcNames.map((e,t)=>(0,H.jsx)(gS,{value:t,children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(tW,{part:e.part,size:20}),(0,H.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,displayEmpty:!0,value:s,style:{marginLeft:`1em`},onChange:e=>c(e.target.value),children:[(0,H.jsx)(gS,{value:`LULOccupancy`,children:`L/U Occupancy`}),a?(0,H.jsx)(gS,{value:`LoadOp`,children:`Load Operation (estimated)`}):void 0,a?(0,H.jsx)(gS,{value:`UnloadOp`,children:`Unload Operation (estimated)`}):void 0]})}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,displayEmpty:!0,value:l,style:{marginLeft:`1em`},onChange:e=>{u(e.target.value)},children:[(0,H.jsx)(gS,{value:Kk,children:(0,H.jsx)(`em`,{children:`Any Station`})},-1),O.allLoadStationNames.map(e=>(0,H.jsx)(gS,{value:e,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),x?(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,displayEmpty:!0,value:S,style:{marginLeft:`1em`},onChange:e=>{let t=e.target.value;f(t),t===`Basket`&&m(void 0)},children:[(0,H.jsx)(gS,{value:`Any`,children:(0,H.jsx)(`em`,{children:`Any Carrier`})}),(0,H.jsx)(gS,{value:`Pallet`,children:`Pallet`}),(0,H.jsx)(gS,{value:`Basket`,children:b})]})}):void 0,S===`Basket`?void 0:(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,displayEmpty:!0,value:p||``,style:{marginLeft:`1em`},onChange:e=>m(e.target.value===``?void 0:e.target.value),children:[(0,H.jsx)(gS,{value:``,children:(0,H.jsx)(`em`,{children:`Any Pallet`})},0),O.allPalletNames.map(e=>(0,H.jsx)(gS,{value:e,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),O.data.size>0?(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{onClick:()=>eA(O,E.matsById,h,s===`LULOccupancy`,y.loadStationNames,b),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(bT,{})})}):void 0]}),(0,H.jsx)(`main`,{children:r?(0,H.jsx)(g7,{points:O.data,series_label:O.seriesLabel,default_date_range:w,extra_tooltip:t,current_date_zoom:h,set_date_zoom_range:e=>g(e.zoom),yZoom:_,setYZoom:v,stats:C?D.get(C):void 0,plannedTimeMinutes:ee}):(0,H.jsx)(o6,{points:O.data,matsById:E.matsById,period:n,current_date_zoom:h,set_date_zoom_range:e=>g(e.zoom),showWorkorderAndInspect:!0,hideMedian:s===`LULOccupancy`,emptyMessage:a||p?`No Cycles`:`Select part, operation, or pallet to see cycles.`})})]})}var t9=jO(e=>e(KI)?3:void 0),n9=P(void 0),hle=P(void 0),gle=P(null);function _le(e){return`mats`in e&&Array.isArray(e.mats)}var vle=P(e=>{let t=e(t9),n=e(n9);if(!t&&!n)return new Map;let r=e(e(ZR).type===`Last30`?qL:YL);if(t){let e=r.get(t)?.valuesToLazySeq()??Q.of([]);return n&&(e=e.filter(e=>e.mats.some(e=>e.part===n.part&&e.proc===n.proc))),new Map([[t.toString(),Array.from(e)]])}return n?Q.of(r).collect(([e,t])=>{let r=t.valuesToLazySeq().filter(e=>e.mats.some(e=>e.part===n.part&&e.proc===n.proc)).toRArray();return r.length>0?[e,r]:null}).toRMap(([e,t])=>[e.toString(),t]):new Map}),yle=P(e=>{let t=e(e(ZR).type===`Last30`?qL:YL);return Q.of(t).flatMap(([,e])=>e).flatMap(([,e])=>e.mats).distinctAndSortBy(e=>e.part,e=>e.proc).map(e=>({part:e.part,proc:e.proc})).toRArray()});function ble(){YI(`Pallet Cycles`);let[e,t]=B(t9),[n,r]=B(n9),[i,a]=B(hle),[o,s]=B(gle),c=R(ZR),l=c.type===`Last30`?[QT(xE(),-29),QT(xE(),1)]:[c.month,$T(c.month,1)],u=R(c.type===`Last30`?qL:YL),d=R(vle),f=R(yle),p=z(CI),m=(0,L.useCallback)(function(e){return _le(e)?e.mats.map(e=>({title:e.part+`-`+e.proc,value:e.serial??``,link:e.serial?()=>p({type:`LogMat`,logMat:e}):void 0})):[]},[p]);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(q,{variant:`subtitle1`,children:`Pallet Cycles`}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,displayEmpty:!0,value:e??-1,onChange:e=>t(e.target.value===-1?void 0:e.target.value),children:[(0,H.jsx)(gS,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Pallet`})},0),u.keysToLazySeq().sortBy(e=>e).map(e=>(0,H.jsx)(gS,{value:e,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),f.length>0?(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,displayEmpty:!0,value:n?f.findIndex(e=>n.part===e.part&&n.proc===e.proc):-1,style:{marginLeft:`1em`},onChange:e=>{r(e.target.value===-1?void 0:f[e.target.value])},children:[(0,H.jsx)(gS,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Part`})},0),f.map((e,t)=>(0,H.jsx)(gS,{value:t,children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(tW,{part:e.part,size:20}),(0,H.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}):void 0,(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{onClick:()=>nA(u),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(bT,{})})})]}),(0,H.jsx)(`main`,{children:(0,H.jsx)(g7,{points:d,series_label:`Pallet`,default_date_range:l,current_date_zoom:i,set_date_zoom_range:e=>a(e.zoom),yZoom:o,setYZoom:s,extra_tooltip:m})})]})}var r9=P(void 0),i9=P(void 0),xle=P(void 0);function Sle(e){return`mats`in e&&Array.isArray(e.mats)}var Cle=P(null),wle=P(e=>{let t=e(r9),n=e(i9);if(!t&&!n)return new Map;let r=e(e(ZR).type===`Last30`?tR:iR);if(t){let e=r.get(t)?.valuesToLazySeq()??Q.of([]);return n&&(e=e.filter(e=>e.mats.some(e=>e.part===n.part&&e.proc===n.proc))),new Map([[t.toString(),Array.from(e)]])}return n?Q.of(r).collect(([e,t])=>{let r=t.valuesToLazySeq().filter(e=>e.mats.some(e=>e.part===n.part&&e.proc===n.proc)).toRArray();return r.length>0?[e,r]:null}).toRMap(([e,t])=>[e.toString(),t]):new Map}),Tle=P(e=>{let t=e(e(ZR).type===`Last30`?tR:iR);return Q.of(t).flatMap(([,e])=>e).flatMap(([,e])=>e.mats).distinctAndSortBy(e=>e.part,e=>e.proc).map(e=>({part:e.part,proc:e.proc})).toRArray()});function Ele(){let e=dk(R(br).basketName);YI(`${e} Cycles`);let[t,n]=B(r9),[r,i]=B(i9),[a,o]=B(xle),[s,c]=B(Cle),l=R(ZR),u=l.type===`Last30`?[QT(xE(),-29),QT(xE(),1)]:[l.month,$T(l.month,1)],d=R(l.type===`Last30`?tR:iR),f=R(wle),p=R(Tle),m=z(CI),h=(0,L.useCallback)(function(e){return Sle(e)?e.mats.map(e=>({title:e.part+`-`+e.proc,value:e.serial??``,link:e.serial?()=>m({type:`LogMat`,logMat:e}):void 0})):[]},[m]);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsxs)(q,{variant:`subtitle1`,children:[e,` Cycles`]}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,displayEmpty:!0,value:t??-1,onChange:e=>n(e.target.value===-1?void 0:e.target.value),children:[(0,H.jsx)(gS,{value:-1,children:(0,H.jsxs)(`em`,{children:[`Any `,e]})},0),d.keysToLazySeq().sortBy(e=>e).map(e=>(0,H.jsx)(gS,{value:e,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),p.length>0?(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,displayEmpty:!0,value:r?p.findIndex(e=>r.part===e.part&&r.proc===e.proc):-1,style:{marginLeft:`1em`},onChange:e=>{i(e.target.value===-1?void 0:p[e.target.value])},children:[(0,H.jsx)(gS,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Part`})},0),p.map((e,t)=>(0,H.jsx)(gS,{value:t,children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(tW,{part:e.part,size:20}),(0,H.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}):void 0,(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{onClick:()=>nA(d,e),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(bT,{})})})]}),(0,H.jsx)(`main`,{children:(0,H.jsx)(g7,{points:f,series_label:e,default_date_range:u,current_date_zoom:a,set_date_zoom_range:e=>o(e.zoom),yZoom:s,setYZoom:c,extra_tooltip:h})})]})}function a9(e,t,n){let r=e?.zoomRange;return n?(t.get(n)??pO.empty()).valuesToAscLazySeq().transform(e=>r?e.filter(e=>e.time>=r.start&&e.time<=r.end):e).flatMap(e=>e.replacements.map(t=>({...t,station:n,time:e.time}))):t.toAscLazySeq().flatMap(([e,t])=>t.valuesToAscLazySeq().transform(e=>r?e.filter(e=>e.time>=r.start&&e.time<=r.end):e).flatMap(t=>t.replacements.map(n=>({...n,station:e,time:t.time}))))}function o9(e,t,n,r){return a9(e,t,n).groupBy(e=>e.tool).map(([e,t])=>{let n=0,r=null,i=0,a=null;for(let e of t){let t=e.type===`ReplaceBeforeCycleStart`?e.useAtReplacement:e.totalUseAtBeginningOfCycle;t&&(r===null||t>r)&&(r=t),t&&(n+=t);let o=e.type===`ReplaceBeforeCycleStart`?e.cntAtReplacement:e.totalCntAtBeginningOfCycle;o&&(a===null||o>a)&&(a=o),o&&(i+=o)}return{tool:e,numReplacements:t.length,totalUseOfAllReplacements:n,totalCntOfAllReplacements:i,maxY:r??a??1,yAxisType:r===null?`Count`:`Time`,replacements:t}}).toSortedArray(r)}function Dle(e,t){let n=e.maxY/2;return t.type===`ReplaceBeforeCycleStart`?e.yAxisType===`Time`?t.useAtReplacement??n:t.cntAtReplacement??n:e.yAxisType===`Time`?t.totalUseAtBeginningOfCycle??n:t.totalCntAtBeginningOfCycle??n}var s9=Intl.NumberFormat(void 0,{maximumFractionDigits:1}),c9=(0,L.createContext)({start:new Date,end:new Date});function Ole({tooltip:e}){return(0,H.jsxs)(uw,{spacing:.5,children:[(0,H.jsxs)(`div`,{children:[`Tool: `,e.r.tool]}),(0,H.jsxs)(`div`,{children:[`Pocket: `,e.r.pocket]}),(0,H.jsxs)(`div`,{children:[`Time: `,e.r.time.toLocaleString()]}),(0,H.jsxs)(`div`,{children:[`Station: `,e.r.station.group,` #`,e.r.station.num]}),e.r.type===`ReplaceBeforeCycleStart`?(0,H.jsxs)(H.Fragment,{children:[e.r.useAtReplacement===null?void 0:(0,H.jsxs)(`div`,{children:[`Minutes at replacement: `,s9.format(e.r.useAtReplacement)]}),e.r.cntAtReplacement===null?void 0:(0,H.jsxs)(`div`,{children:[`Count at replacement: `,s9.format(e.r.cntAtReplacement)]})]}):(0,H.jsxs)(H.Fragment,{children:[e.r.totalUseAtBeginningOfCycle===null?void 0:(0,H.jsxs)(`div`,{children:[`Minutes at beginning of cycle:`,` `,s9.format(e.r.totalUseAtBeginningOfCycle)]}),e.r.totalUseAtEndOfCycle===null?void 0:(0,H.jsxs)(`div`,{children:[`Minutes at end of cycle: `,s9.format(e.r.totalUseAtEndOfCycle)]}),e.r.totalCntAtBeginningOfCycle===null?void 0:(0,H.jsxs)(`div`,{children:[`Count at beginning of cycle:`,` `,s9.format(e.r.totalCntAtBeginningOfCycle)]}),e.r.totalCntAtEndOfCycle===null?void 0:(0,H.jsxs)(`div`,{children:[`Count at end of cycle: `,s9.format(e.r.totalCntAtEndOfCycle)]})]})]})}function l9({row:e,tooltip:t,timeScale:n,yScale:r}){let[i,a]=B(t);return(0,H.jsx)(`g`,{children:e.replacements.map((t,o)=>(0,H.jsx)(`circle`,{cx:n(t.time),cy:r(Dle(e,t)),r:t===i?.r?4:2,onMouseEnter:e=>a({top:0,left:hA(e)?.x??0,r:t}),fill:`black`},o))})}var u9=[{id:0,numeric:!1,label:`Tool`,getDisplay:e=>e.tool},{id:1,numeric:!0,label:`Num Replacements`,getDisplay:e=>e.numReplacements.toString(),getForSort:e=>e.numReplacements},{id:2,numeric:!0,label:`Avg Use (min) at Replacement`,getDisplay:e=>s9.format(e.totalUseOfAllReplacements/e.numReplacements),getForSort:e=>e.totalUseOfAllReplacements/e.numReplacements},{id:3,numeric:!0,label:`Avg Use (count) at Replacement`,getDisplay:e=>s9.format(e.totalCntOfAllReplacements/e.numReplacements),getForSort:e=>e.totalCntOfAllReplacements/e.numReplacements},{id:4,numeric:!1,ignoreDuringExport:!0,label:`All Replacements`,getDisplay:()=>``,expanded:!0,Cell:(0,L.memo)(function({row:e}){let t=(0,L.useContext)(c9),n=(0,L.useMemo)(()=>P(null),[]),r=z(n),{ref:i,width:a}=TA({refreshMode:`debounce`,refreshRate:100,handleHeight:!1}),o=fF().domain([t.start,t.end]).range([0,a??1e3]),s=$M().domain([0,e.maxY]).range([33,3]),c=e.numReplacements===0?null:s(e.totalUseOfAllReplacements/e.numReplacements);return(0,H.jsxs)(`div`,{ref:i,style:{position:`relative`,width:`100%`,height:`35px`},children:[(0,H.jsxs)(`svg`,{height:`35`,width:a??1e3,onMouseLeave:()=>r(null),children:[c===null?void 0:(0,H.jsx)(`line`,{x1:`0`,y1:c,x2:a??1e3,y2:c,stroke:`red`,strokeWidth:.5}),(0,H.jsx)(l9,{row:e,tooltip:n,timeScale:o,yScale:s})]}),(0,H.jsx)(DA,{atom:n,TooltipContent:Ole,chartHeight:35,chartWidth:a??1e3})]})})}],kle=(0,L.memo)(function(e){let t=R(ZR),n=d0(),r=u0(t),i=f0(0,u9),a=R(t.type===`Last30`?pR:hR),o=(0,L.useMemo)(()=>o9(r,a,e.station,i.sortOn),[r,a,e.station,i]),s=n?o.slice(n.page*n.rowsPerPage,(n.page+1)*n.rowsPerPage):o,c=r?.zoomRange??(t.type===`Last30`?{start:QT(xE(),-29),end:QT(xE(),1)}:{start:t.month,end:$T(t.month,1)});return(0,H.jsx)(`div`,{children:(0,H.jsxs)(c9.Provider,{value:c,children:[(0,H.jsxs)(Vw,{children:[(0,H.jsx)(r0,{columns:u9,sort:i,showDetailsCol:!1}),(0,H.jsx)(l0,{columns:u9,pageData:s,rowsPerPage:n.rowsPerPage})]}),(0,H.jsx)(c0,{tpage:n,zoom:r.zoom,count:o.length})]})})}),d9=[{id:0,numeric:!1,label:`Date`,getDisplay:e=>e.time.toLocaleString(),getForSort:e=>e.time.getTime(),getForExport:e=>e.time.toISOString()},{id:1,numeric:!1,label:`Machine`,getDisplay:e=>e.station.group+` #`+e.station.num.toString(),getForSort:e=>e.station},{id:2,numeric:!1,label:`Tool`,getDisplay:e=>e.tool},{id:3,numeric:!0,label:`Pocket`,getDisplay:e=>e.pocket===-1?``:e.pocket.toString(),getForSort:e=>e.pocket},{id:4,numeric:!1,label:`Type`,getDisplay:e=>e.type===`ReplaceBeforeCycleStart`?`Between Cycles`:`During Cycle`},{id:5,numeric:!0,label:`Use At Replacement / Start of Cycle (min)`,getDisplay:e=>{let t=e.type===`ReplaceBeforeCycleStart`?e.useAtReplacement:e.totalUseAtBeginningOfCycle;return t==null?``:s9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?e.useAtReplacement:e.totalUseAtBeginningOfCycle},{id:6,numeric:!0,label:`Use At End of Cycle (min)`,getDisplay:e=>{if(e.type===`ReplaceBeforeCycleStart`)return``;let t=e.totalUseAtEndOfCycle;return t==null?``:s9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?0:e.totalUseAtEndOfCycle},{id:7,numeric:!0,label:`Use At Replacement / Start of Cycle (count)`,getDisplay:e=>{let t=e.type===`ReplaceBeforeCycleStart`?e.cntAtReplacement:e.totalCntAtBeginningOfCycle;return t==null?``:s9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?e.cntAtReplacement:e.totalCntAtBeginningOfCycle},{id:8,numeric:!0,label:`Use At End of Cycle (count)`,getDisplay:e=>{if(e.type===`ReplaceBeforeCycleStart`)return``;let t=e.totalCntAtEndOfCycle;return t==null?``:s9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?0:e.totalCntAtEndOfCycle}],Ale=(0,L.memo)(function(e){let t=R(ZR),n=d0(),r=u0(t),i=f0(0,d9),a=R(t.type===`Last30`?pR:hR),o=(0,L.useMemo)(()=>a9(r,a,e.station).toSortedArray(i.sortOn),[i,r,a,e.station]),s=n?o.slice(n.page*n.rowsPerPage,(n.page+1)*n.rowsPerPage):o;return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(Vw,{children:[(0,H.jsx)(r0,{columns:d9,sort:i,showDetailsCol:!1}),(0,H.jsx)(l0,{columns:d9,pageData:s})]}),(0,H.jsx)(c0,{tpage:n,zoom:r.zoom,count:o.length})]})});function jle(e,t){t===`summary`?m0(u9,o9(void 0,e,void 0,e=>e.tool)):m0(d9,a9(void 0,e,void 0).toSortedArray(e=>e.tool,e=>e.time))}var Mle=(0,L.memo)(function(e){let t=R(R(ZR).type===`Last30`?pR:hR),n=Array.from(t.keys()),r=e.station===null?-1:n.indexOf(e.station);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,value:r,style:{marginLeft:`1em`},onChange:t=>{let r=t.target.value;r===-1?e.setSelectedStation(null):e.setSelectedStation(n[r])},children:[(0,H.jsx)(gS,{value:-1,children:(0,H.jsx)(`em`,{children:`Any Machine`})}),n.map((e,t)=>(0,H.jsx)(gS,{value:t,children:(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,H.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.group,` #`,e.num]})})},t))]})}),(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{onClick:()=>jle(t,e.displayType),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,H.jsx)(bT,{})})})]})}),Nle=P(null),Ple=P(`summary`),Fle=(0,L.memo)(function(){YI(`Tool Replacements`);let[e,t]=B(Nle),[n,r]=B(Ple);return(0,H.jsxs)(J,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,H.jsxs)(J,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,H.jsx)(q,{variant:`subtitle1`,children:`Tool Replacements`}),(0,H.jsx)(J,{sx:{flexGrow:1}}),(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{autoWidth:!0,value:n,style:{marginLeft:`1em`},onChange:e=>r(e.target.value),children:[(0,H.jsx)(gS,{value:`summary`,children:`Summary`}),(0,H.jsx)(gS,{value:`details`,children:`Details`})]})}),(0,H.jsx)(Mle,{station:e,setSelectedStation:t,displayType:n})]}),(0,H.jsx)(`main`,{children:n===`summary`?(0,H.jsx)(kle,{station:e}):(0,H.jsx)(Ale,{station:e})})]})}),f9=P(null),Ile=150,p9=40,m9=10,h9=20,g9=10,_9=80;function v9(e){return`${e.workorderId}-${e.part}`}function y9(e){return e?new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()):null}function Lle(e){let t=e.map(v9),n=Q.of(e).flatMap(e=>{let t=y9(e.simulatedFilled);return[y9(e.simulatedStart),t?QT(t,2):null]}).collect(e=>e),r=n.minBy(e=>e)??new Date,i=n.maxBy(e=>e)??QT(new Date,7),a=Math.max(fE(i,r)*50,30),o=Math.max(t.length*_9,_9);return{xScale:fF().domain([r,i]).range([0,a]),yScale:dj().domain(t).range([0,o])}}function Rle({tooltip:e}){return(0,H.jsxs)(uw,{children:[(0,H.jsxs)(`div`,{children:[`Workorder: `,e.data.workorderId]}),(0,H.jsxs)(`div`,{children:[`Part: `,e.data.part]}),(0,H.jsxs)(`div`,{children:[`Due Date: `,e.data.dueDate.toLocaleDateString()]}),(0,H.jsxs)(`div`,{children:[`Priority: `,e.data.priority]}),(0,H.jsxs)(`div`,{children:[`Planned Quantity: `,e.data.plannedQuantity]}),(0,H.jsxs)(`div`,{children:[`Completed Quantity: `,e.data.completedQuantity]}),(0,H.jsxs)(`div`,{children:[`Projected Start: `,y9(e.data.simulatedStart)?.toLocaleDateString()]}),(0,H.jsxs)(`div`,{children:[`Projected Filled: `,y9(e.data.simulatedFilled)?.toLocaleDateString()]})]})}function zle({workorders:e}){return(0,H.jsx)(`div`,{children:e.map(e=>(0,H.jsxs)(uw,{direction:`column`,sx:{height:_9,alignItems:`flex-end`,paddingRight:`10px`,justifyContent:`center`},children:[(0,H.jsx)(J,{children:e.workorderId}),(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(tW,{part:e.part,size:18}),(0,H.jsx)(J,{sx:{ml:`3px`},children:e.part})]})]},v9(e)))})}function Ble({xScale:e,yScale:t}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(VA,{scale:e,top:0}),(0,H.jsx)(FA,{scale:e,height:t.range()[1]-t.range()[0]})]})}function Vle({workorders:e,xScale:t,yScale:n}){let r=z(f9),i=(0,L.useRef)(null);function a(e){return t=>{let n=hA(t);n&&(i.current!==null&&(clearTimeout(i.current),i.current=null),r({left:n.x,top:n.y,data:e}))}}let o=(0,L.useCallback)(()=>{i.current=setTimeout(()=>{r(null)},300)},[i,r]);return(0,H.jsx)(`g`,{children:e.map(e=>{let r=v9(e);return(0,H.jsx)(`g`,{onMouseOver:a(e),onMouseLeave:o,children:e.simulatedStart&&e.simulatedFilled?(0,H.jsx)(`rect`,{x:t(y9(e.simulatedStart)),y:(n(r)??0)+20,width:t(QT(y9(e.simulatedFilled),1))-t(y9(e.simulatedStart)),height:40,fill:Pr[600]}):void 0},r)})})}function Hle(){let e=R(zO),t=(0,L.useMemo)(()=>Q.of(e.workorders??[]).toSortedArray(e=>e.simulatedFilled?.getTime()??null,e=>e.simulatedStart?.getTime()??null,e=>e.workorderId,e=>e.part),[e.workorders]),{xScale:n,yScale:r}=Lle(t);return(0,H.jsxs)(J,{sx:{display:`flex`},children:[(0,H.jsx)(J,{sx:{height:r.range()[1]+p9+m9,width:Ile,paddingTop:`${p9}px`},children:(0,H.jsx)(zle,{workorders:t})}),(0,H.jsxs)(J,{sx:{flexGrow:1,width:0,position:`relative`},children:[(0,H.jsx)(`div`,{style:{overflowX:`visible`},children:(0,H.jsx)(`svg`,{height:r.range()[1]+p9+m9,width:n.range()[1]+g9+h9,children:(0,H.jsxs)(`g`,{transform:`translate(${h9}, ${p9})`,children:[(0,H.jsx)(Ble,{yScale:r,xScale:n}),(0,H.jsx)(Vle,{workorders:t,xScale:n,yScale:r})]})})}),(0,H.jsx)(DA,{atom:f9,TooltipContent:Rle,chartHeight:r.range()[1]+p9+m9,chartWidth:n.range()[1]+g9+h9})]})]})}var b9=P(e=>{let t=e(qI);return t.route===$.Operations_CurrentWorkorders?t.workorder??null:null},(e,t,n)=>{e(qI).route===$.Operations_CurrentWorkorders&&(n===``&&(n=null),t(qI,{route:$.Operations_CurrentWorkorders,workorder:n??void 0}))}),Ule=NO(`recentSearchedWorkorders`,[]),Wle=P(async(e,{signal:t})=>{let n=e(b9);return n===null?null:await Wt.getActiveWorkorder(n,t)??[]}),Gle=G(Zw)({"& > *":{borderBottom:`unset !important`}}),x9=new Intl.NumberFormat(void 0,{maximumFractionDigits:1}),Kle=(0,L.memo)(function({workorder:e}){let t=z(CI),n=z(E9),r=Q.ofObject(e.activeStationTime??{}).concat(Q.ofObject(e.elapsedStationTime??{})).map(([e])=>e).distinctAndSortBy(e=>e);function i(n){t({type:`MatSummary`,summary:{materialID:n.materialID,partName:e.part,serial:n.serial,workorderId:e.workorderId}})}return(0,H.jsxs)(uw,{direction:`row`,sx:{flexWrap:`wrap`,justifyContent:`space-around`,ml:`1em`,mr:`1em`},children:[(0,H.jsx)(`div`,{children:(0,H.jsxs)(Vw,{size:`small`,stickyHeader:!0,children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:`Serial`}),(0,H.jsx)(Z,{children:`Quarantine?`}),(0,H.jsx)(Z,{sx:{whiteSpace:`nowrap`},children:`Inspect Failed?`}),(0,H.jsx)(Z,{sx:{whiteSpace:`nowrap`},children:`Close Out`}),(0,H.jsx)(Z,{padding:`checkbox`})]})}),(0,H.jsx)(Ww,{children:(e.material??[]).map(e=>(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:e.serial??``}),(0,H.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:e.quarantined?(0,H.jsx)(MT,{fontSize:`inherit`}):``}),(0,H.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:e.inspectionFailed?(0,H.jsx)(mT,{fontSize:`inherit`}):``}),(0,H.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:e.closeout===pt.None?``:e.closeout===pt.ClosedOut?(0,H.jsx)(lT,{fontSize:`inherit`}):(0,H.jsx)(mT,{fontSize:`inherit`})}),(0,H.jsx)(Z,{padding:`checkbox`,children:(0,H.jsx)(th,{onClick:()=>i(e),size:`large`,children:(0,H.jsx)(DT,{fontSize:`inherit`})})})]},e.materialID))})]})}),(0,H.jsx)(`div`,{children:(0,H.jsxs)(Vw,{size:`small`,children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:`Station`}),(0,H.jsx)(Z,{children:`Active Minutes`}),(0,H.jsx)(Z,{children:`Elapsed Minutes`})]})}),(0,H.jsx)(Ww,{children:r.map(t=>(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:t}),(0,H.jsx)(Z,{children:x9.format(WO(e.activeStationTime?.[t]??0))}),(0,H.jsx)(Z,{children:x9.format(WO(e.elapsedStationTime?.[t]??0))})]},t))})]})}),(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(Vw,{size:`small`,children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:`Time`}),(0,H.jsx)(Z,{children:`Comment`})]})}),(0,H.jsx)(Ww,{children:(e.comments??[]).map((e,t)=>(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:e.timeUTC.toLocaleString(void 0,{year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`})}),(0,H.jsx)(Z,{children:e.comment})]},t))})]}),(0,H.jsx)(Y,{sx:{mt:`0.5em`},onClick:()=>n(e),children:`Add Comment`})]})]})});function S9(e){return e?new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())).toLocaleDateString():``}function C9(e){return e.closeout===pt.ClosedOut?!1:e.quarantined||e.inspectionFailed||e.closeout===pt.CloseOutFailed}function qle({workorder:e,showSim:t}){let[n,r]=(0,L.useState)(!1),i=t?10:8;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(Gle,{children:[(0,H.jsx)(Z,{children:e.workorderId}),(0,H.jsx)(Z,{children:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(tW,{part:e.part,size:25})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(q,{variant:`body2`,component:`span`,sx:{display:`block`},children:e.part})})]})}),(0,H.jsx)(Z,{children:e.dueDate===null?``:e.dueDate.toLocaleDateString()}),(0,H.jsx)(Z,{align:`right`,children:e.priority}),(0,H.jsx)(Z,{align:`right`,children:e.plannedQuantity}),(0,H.jsx)(Z,{align:`right`,children:e.material?.length??0}),(0,H.jsx)(Z,{align:`right`,children:e.material?.filter(C9).length??0}),(0,H.jsx)(Z,{align:`right`,children:e.completedQuantity}),t?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Z,{align:`right`,children:S9(e.simulatedStart)}),(0,H.jsx)(Z,{align:`right`,children:S9(e.simulatedFilled)})]}):void 0,(0,H.jsx)(Z,{children:(0,H.jsx)(X,{title:`Show Details`,children:(0,H.jsx)(th,{size:`small`,onClick:()=>r(!n),children:n?(0,H.jsx)(wT,{}):(0,H.jsx)(xT,{})})})})]}),(0,H.jsx)(Zw,{children:(0,H.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:i,children:(0,H.jsx)(Xp,{in:n,timeout:`auto`,unmountOnExit:!0,children:(0,H.jsx)(Kle,{workorder:e})})})})]})}function Jle(e,t,n){let r;switch(t){case 0:r=e=>e.workorderId;break;case 1:r=e=>e.part;break;case 2:r=e=>e.plannedQuantity;break;case 3:r=e=>e.dueDate.getTime();break;case 4:r=e=>e.priority;break;case 5:r=e=>e.completedQuantity;break;case 7:r=e=>e.material?.filter(C9).length??0;break;case 6:r=e=>e.material?.length??0;break;case 8:r=e=>e.simulatedStart?.getTime()??null;break;case 9:r=e=>e.simulatedFilled?.getTime()??null}return Q.of(e).toSortedArray(n===`asc`?{asc:r}:{desc:r})}function Yle({sortBy:e,order:t,showSim:n}){let r=R(zO),i=R(Wle),a=(0,L.useMemo)(()=>Jle(i??r.workorders??[],e,t),[r.workorders,e,t,i]);return i&&i.length===0?(0,H.jsx)(Zw,{children:(0,H.jsx)(Z,{colSpan:n?10:8,children:`No workorders found`})}):(0,H.jsx)(H.Fragment,{children:a.map(e=>(0,H.jsx)(qle,{workorder:e,showSim:n},`${e.workorderId}-${e.part}`))})}function Xle(e,t){let n=`<table>
|
|
372
|
+
<thead><tr>`;n+=`<th>Workorder</th>`,n+=`<th>Part</th>`,n+=`<th>Due Date</th>`,n+=`<th>Priority</th>`,n+=`<th>Planned Qty</th>`,n+=`<th>Completed Qty</th>`,t&&(n+=`<th>Simulated Start</th>`,n+=`<th>Simulated Filled</th>`),n+=`<th>Serials</th>`,n+=`<th>Active Time (mins)</th>`,n+=`<th>Elapsed Time (mins)</th>`,n+=`</tr></thead>
|
|
373
|
+
<tbody>
|
|
374
|
+
`;for(let r of e)n+=`<tr>`,n+=`<td>${r.workorderId}</td>`,n+=`<td>${r.part}</td>`,n+=`<td>${r.dueDate===null?``:r.dueDate.toLocaleDateString()}</td>`,n+=`<td>${r.priority}</td>`,n+=`<td>${r.plannedQuantity}</td>`,n+=`<td>${r.completedQuantity}</td>`,t&&(n+=`<td>${S9(r.simulatedStart)}</td>`,n+=`<td>${S9(r.simulatedFilled)}</td>`),n+=`<td>${(r.material??[]).map(e=>e.serial??``).join(`;`)}</td>`,n+=`<td>${Q.ofObject(r.activeStationTime??{}).map(([e,t])=>`${e}: ${WO(t)}`).toRArray().join(`;`)}</td>`,n+=`<td>${Q.ofObject(r.elapsedStationTime??{}).map(([e,t])=>`${e}: ${WO(t)}`).toRArray().join(`;`)}</td>`,n+=`</tr>
|
|
375
|
+
`;n+=`</tbody></table>
|
|
376
|
+
`,Hk(n)}function w9(e){return(0,H.jsxs)(Z,{align:e.align,sortDirection:e.sortBy===e.col&&e.order,children:[(0,H.jsx)(X,{title:`Sort`,enterDelay:300,children:(0,H.jsx)($w,{active:e.sortBy===e.col,direction:e.order,onClick:()=>{e.col===e.sortBy?e.setOrder(e.order===`asc`?`desc`:`asc`):(e.setSortBy(e.col),e.setOrder(`asc`))},children:e.children})}),e.extraIcon]})}var T9=P(`table`),Zle=(0,L.memo)(function({showSim:e}){let[t,n]=B(T9);return(0,H.jsxs)(uw,{direction:`row`,spacing:2,sx:{justifyContent:`flex-end`,alignItems:`center`},children:[e?(0,H.jsxs)(uw,{direction:`row`,spacing:2,sx:{alignItems:`center`,flexGrow:1},children:[(0,H.jsx)(VT,{fontSize:`small`}),(0,H.jsx)(q,{variant:`caption`,children:`Projected dates are estimates`})]}):void 0,(0,H.jsx)(Ay,{size:`small`,children:(0,H.jsxs)(xC,{variant:`outlined`,value:t,onChange:e=>n(e.target.value),children:[(0,H.jsx)(gS,{value:`table`,children:`Table`}),(0,H.jsx)(gS,{value:`gantt`,children:`Gantt`})]})})]})}),Qle=Fa`
|
|
377
|
+
0% {
|
|
378
|
+
transform: rotate(0deg);
|
|
379
|
+
}
|
|
380
|
+
100% {
|
|
381
|
+
transform: rotate(360deg);
|
|
382
|
+
}
|
|
383
|
+
`,$le=G(Are)(()=>({animation:`${Qle} 1.5s linear infinite`}));function eue(){let[e,t]=(0,L.useState)(!1),[n,r]=(0,L.useTransition)(),[i,a]=B(b9),[o,s]=(0,L.useState)(null),[c,l]=B(Ule);function u(e){e!==null&&e!==``&&(r(()=>{a(e)}),t(!1),s(null),l(t=>{let n=t.filter(t=>t!==e);return n.unshift(e),n.slice(0,5)}))}return(0,H.jsxs)(H.Fragment,{children:[n?(0,H.jsx)(X,{title:`Searching.... Click to cancel`,children:(0,H.jsx)(th,{size:`small`,onClick:()=>a(null),children:(0,H.jsx)($le,{fontSize:`inherit`})})}):i?(0,H.jsx)(X,{title:`Clear Search`,children:(0,H.jsx)(th,{size:`small`,onClick:()=>a(null),children:(0,H.jsx)(uT,{fontSize:`inherit`})})}):(0,H.jsx)(X,{title:`Search`,children:(0,H.jsx)(th,{size:`small`,onClick:e=>{t(!0),e.currentTarget.blur()},children:(0,H.jsx)(NT,{fontSize:`inherit`})})}),(0,H.jsxs)(py,{open:e,onClose:()=>t(!1),children:[(0,H.jsx)(gy,{children:`Search Workorder`}),(0,H.jsxs)(hy,{children:[(0,H.jsx)(nT,{variant:`outlined`,fullWidth:!0,autoFocus:!0,sx:{mt:`0.5em`,minWidth:`15em`},label:`Workorder ID`,value:o??``,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(u(o),e.preventDefault())}}),c.length>0?(0,H.jsx)(H.Fragment,{children:(0,H.jsx)(Vb,{dense:!0,sx:{mt:`1em`},subheader:(0,H.jsx)(b_,{children:`Previous Searches`}),children:c.map(e=>(0,H.jsx)(tx,{onClick:()=>u(e),children:(0,H.jsx)(Kb,{children:(0,H.jsx)(dx,{primary:e})})},e))})}):void 0]}),(0,H.jsxs)(my,{children:[(0,H.jsx)(Y,{color:`primary`,onClick:()=>u(o),children:`Search`}),(0,H.jsx)(Y,{color:`secondary`,onClick:()=>t(!1),children:`Cancel`})]})]})]})}var tue=(0,L.memo)(function(e){let t={sortBy:e.sortBy,setSortBy:e.setSortBy,order:e.order,setOrder:e.setOrder};return(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(w9,{align:`left`,col:0,...t,extraIcon:e.disableSearch?void 0:(0,H.jsx)(eue,{}),children:`Workorder`}),(0,H.jsx)(w9,{align:`left`,col:1,...t,children:`Part`}),(0,H.jsx)(w9,{align:`left`,col:3,...t,children:`Due Date`}),(0,H.jsx)(w9,{align:`right`,col:4,...t,children:`Priority`}),(0,H.jsx)(w9,{align:`right`,col:2,...t,children:`Planned Quantity`}),(0,H.jsx)(w9,{align:`right`,col:6,...t,children:`Started Quantity`}),(0,H.jsx)(w9,{align:`right`,col:7,...t,children:`Abnormal Quantity`}),(0,H.jsx)(w9,{align:`right`,col:5,...t,children:`Completed Quantity`}),e.showSim?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(w9,{align:`right`,col:8,...t,children:`Projected Start`}),(0,H.jsx)(w9,{align:`right`,col:9,...t,children:`Projected Filled`})]}):void 0,(0,H.jsx)(Z,{children:(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,onClick:()=>Xle(e.workorders,e.showSim),children:(0,H.jsx)(bT,{})})})})]})})}),E9=P(null);function nue(){let[e,t]=B(E9),[n,r]=(0,L.useState)(null),i=z(VO);function a(){t(null),r(null)}function o(){e&&n&&n!==``&&i({workorder:e.workorderId,comment:n}),a()}return(0,H.jsx)(py,{open:e!==null,onClose:a,children:e===null?void 0:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(gy,{children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(tW,{part:e.part,size:40})}),(0,H.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Add Comment For `,e.workorderId]})]})}),(0,H.jsx)(hy,{children:(0,H.jsx)(nT,{variant:`outlined`,sx:{mt:`1em`},fullWidth:!0,autoFocus:!0,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Enter`&&n!==null&&n!==``&&(o(),e.preventDefault())}})}),(0,H.jsxs)(my,{children:[(0,H.jsx)(Y,{color:`primary`,onClick:o,children:`Save Comment`}),(0,H.jsx)(Y,{color:`primary`,onClick:a,children:`Cancel`})]})]})})}function rue(){let[e,t]=B(b9);return(0,H.jsx)(Zw,{children:(0,H.jsx)(Z,{colSpan:10,children:(0,H.jsxs)(uw,{direction:`column`,sx:{mt:`3em`,flex:`flex`,alignItems:`center`,width:`100%`},children:[(0,H.jsxs)(uw,{direction:`row`,spacing:`3`,children:[(0,H.jsx)(Ym,{}),e&&e!==``?(0,H.jsxs)(q,{variant:`h6`,children:[`Searching for workorder `,e]}):(0,H.jsx)(q,{variant:`h6`,children:`Searching`})]}),(0,H.jsx)(Y,{onClick:()=>t(null),children:`Cancel`})]})})})}function iue({showSim:e,disableSearch:t}){let[n,r]=(0,L.useState)(0),[i,a]=(0,L.useState)(`asc`),o=R(zO);return(0,H.jsxs)(Vw,{stickyHeader:!0,children:[(0,H.jsx)(tue,{workorders:o?.workorders??[],sortBy:n,setSortBy:r,showSim:e,order:i,setOrder:a,disableSearch:t}),(0,H.jsx)(Ww,{children:(0,H.jsx)(L.Suspense,{fallback:(0,H.jsx)(rue,{}),children:(0,H.jsx)(Yle,{sortBy:n,order:i,showSim:e})})})]})}function aue(){let e=z(q0),t=R(EI),[n,r]=RI(),i=z(CI);if(t===null||t.materialID<0)return null;function a(e){t!==null&&(n({mat:t,operator:`Manager`,failed:e}),i(null))}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Y,{color:`primary`,disabled:r,onClick:()=>a(!0),children:`Fail CloseOut`}),(0,H.jsx)(Y,{color:`primary`,disabled:r,onClick:()=>a(!1),children:`Pass CloseOut`}),(0,H.jsx)(Y,{color:`primary`,onClick:()=>e(!0),children:`Change Workorder`})]})}var oue=(0,L.memo)(function(){return(0,H.jsx)(AW,{buttons:(0,H.jsx)(aue,{})})}),D9=(0,L.memo)(function({disableSearch:e}){YI(`Workorders`);let t=R(zO),n=R(T9),r=(0,L.useMemo)(()=>t.workorders?.some(e=>!!e.simulatedStart||!!e.simulatedFilled)??!1,[t.workorders]);return(0,H.jsxs)(J,{component:`main`,sx:{padding:`24px`},children:[r?(0,H.jsx)(Zle,{showSim:r}):void 0,n===`table`?(0,H.jsx)(iue,{showSim:r,disableSearch:e}):(0,H.jsx)(Hle,{}),(0,H.jsx)(nue,{}),(0,H.jsx)(oue,{}),(0,H.jsx)(Q0,{})]})}),sue=Pr[50],cue=Pr[600],lue=Lr[100],O9=`3em`,uue=`calc(${O9} * 7)`,due=P(e=>{let t=e(xR);return t===null?null:Q.of(t.usage).toLookupOrderedMap(e=>e.machineGroup,e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),e.day.getUTCDate()))}),fue=P(e=>{let t=e(xR);return t===null?dO.empty():dO.build(t.usage,e=>e.machineGroup)}),pue=P(e=>{let t=e(xR);return t===null?dO.empty():dO.build(t.usage,e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),1))}),mue=P(e=>{let t=e(xR);return t===null?0:Q.of(t.usage).map(e=>Math.ceil(e.usage)).maxBy(e=>e)??1}),hue=P(e=>{let t=e(xR);return t===null?[null,null]:[Q.of(t.usage).map(e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),e.day.getUTCDate())).minBy(e=>e)??null,Q.of(t.usage).map(e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),e.day.getUTCDate())).maxBy(e=>e)??null]});function gue({date:e,dayColor:t,tooltip:n}){let r=new Date(e.getFullYear(),e.getMonth(),1).getDay(),i=new Date(e.getFullYear(),e.getMonth()+1,0).getDate();return(0,H.jsxs)(J,{sx:{width:uue},children:[(0,H.jsx)(q,{variant:`h6`,sx:{textAlign:`center`},children:e.toLocaleString(`default`,{month:`long`,year:`numeric`})}),(0,H.jsxs)(J,{sx:{display:`flex`,flexWrap:`wrap`},children:[Q.ofRange(0,r).map((e,t)=>(0,H.jsx)(J,{sx:{height:O9,width:O9}},t)),Q.ofRange(1,i+1).map((r,i)=>(0,H.jsx)(`div`,{style:{width:O9,height:O9,cursor:`default`,backgroundColor:t(new Date(e.getFullYear(),e.getMonth(),r))},children:(0,H.jsx)(X,{title:n(new Date(e.getFullYear(),e.getMonth(),r)),children:(0,H.jsx)(J,{sx:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100%`},children:r})})},i))]})]})}function _ue(){return(0,H.jsxs)(uw,{direction:`row`,spacing:2,sx:{alignItems:`center`},children:[(0,H.jsx)(VT,{fontSize:`small`}),(0,H.jsx)(q,{variant:`caption`,children:`Projected dates are estimates`})]})}function vue({group:e,month:t}){let n=R(due),[r,i]=R(hue),a=R(mue),o=(0,L.useMemo)(()=>{let t=$M().domain([0,a]).range([sue,cue]);return a=>{if(i&&a>i||r&&a<r)return`white`;let o=n?.get(e)?.get(a);return o?t(o.usage):lue}},[n,a,r,i,e]);function s(t){let a=n?.get(e)?.get(t);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{children:t.toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`})}),i&&t>i?(0,H.jsx)(`div`,{children:`Not Simulated`}):r&&t<r?(0,H.jsx)(`div`,{}):a?(0,H.jsxs)(`div`,{children:[`Usage: `,a.usage.toFixed(2)]}):(0,H.jsx)(`div`,{children:`Downtime`})]})}return(0,H.jsx)(gue,{date:t,dayColor:o,tooltip:s})}function yue(){YI(`Projected Machine Usage`);let e=R(fue),t=R(pue);return(0,H.jsx)(J,{component:`main`,sx:{padding:`24px`},children:(0,H.jsxs)(uw,{direction:`column`,spacing:5,children:[(0,H.jsx)(_ue,{}),e.toAscLazySeq().map(e=>(0,H.jsxs)(`div`,{children:[(0,H.jsx)(q,{variant:`h4`,children:e}),(0,H.jsx)(J,{sx:{display:`flex`,flexWrap:`wrap`,columnGap:`50px`},children:t.toAscLazySeq().map(t=>(0,H.jsx)(vue,{group:e,month:t},t.getTime()))})]},e))]})})}function bue(){let e=z(q0),t=R(EI),[n,r]=RI(),i=z(CI);if(t===null||t.materialID<0)return null;function a(e){t!==null&&(n({mat:t,operator:`Manager`,failed:e}),i(null))}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Y,{color:`primary`,disabled:r,onClick:()=>a(!0),children:`Fail CloseOut`}),(0,H.jsx)(Y,{color:`primary`,disabled:r,onClick:()=>a(!1),children:`Pass CloseOut`}),(0,H.jsx)(Y,{color:`primary`,onClick:()=>e(!0),children:`Change Workorder`})]})}var xue=(0,L.memo)(function(){return(0,H.jsx)(AW,{buttons:(0,H.jsx)(bue,{})})}),Sue=new Intl.DateTimeFormat(void 0,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`});function Cue({day:e,setDay:t}){let n=xE();return(0,H.jsxs)(uw,{direction:`row`,spacing:2,sx:{alignItems:`center`},children:[(0,H.jsx)(X,{title:`Previous Day`,children:(0,H.jsx)(`div`,{children:(0,H.jsx)(th,{disabled:e<=QT(n,-28),onClick:()=>t(e=>QT(e,-1)),children:(0,H.jsx)(LT,{})})})}),(0,H.jsx)(q,{sx:{minWidth:`14em`,textAlign:`center`},children:Sue.format(e)}),(0,H.jsx)(X,{title:`Next Day`,children:(0,H.jsx)(`div`,{children:(0,H.jsx)(th,{disabled:e>=n,onClick:()=>t(e=>QT(e,1)),children:(0,H.jsx)(IT,{})})})})]})}function wue(e,t,n){let r;switch(t){case 0:r=e=>e.last_unload_time??null;break;case 2:r=e=>e.partName;break;case 1:r=e=>e.serial??null;break;case 3:r=e=>e.workorderId??null;break;case 4:r=e=>e.closeout_failed??null;break;case 5:r=e=>e.closeout_completed??null}return Q.of(e).toSortedArray(n===`asc`?{asc:r}:{desc:r},{asc:e=>e.last_unload_time??null})}function Tue({sortBy:e,setSortBy:t,sortOrder:n,setSortOrder:r}){function i(i){i===e?r(n===`asc`?`desc`:`asc`):(t(i),r(`asc`))}return(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{sortDirection:e===0&&n,children:(0,H.jsx)($w,{active:e===0,direction:n,onClick:()=>i(0),children:`Completed Time`})}),(0,H.jsx)(Z,{sortDirection:e===1&&n,children:(0,H.jsx)($w,{active:e===1,direction:n,onClick:()=>i(1),children:`Serial`})}),(0,H.jsx)(Z,{sortDirection:e===2&&n,children:(0,H.jsx)($w,{active:e===2,direction:n,onClick:()=>i(2),children:`Part`})}),(0,H.jsx)(Z,{sortDirection:e===3&&n,children:(0,H.jsx)($w,{active:e===3,direction:n,onClick:()=>i(3),children:`Workorder`})}),(0,H.jsx)(Z,{sortDirection:e===4&&n,children:(0,H.jsx)($w,{active:e===4,direction:n,onClick:()=>i(4),children:`Closeout`})}),(0,H.jsx)(Z,{sortDirection:e===5&&n,children:(0,H.jsx)($w,{active:e===5,direction:n,onClick:()=>i(5),children:`Closeout Time`})}),(0,H.jsx)(Z,{})]})}var Eue=new Intl.DateTimeFormat(void 0,{hour:`2-digit`,minute:`numeric`,second:`numeric`}),Due=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`}),Oue=(0,L.memo)(function({mat:e}){let t=z(CI);return(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:e.last_unload_time?Eue.format(e.last_unload_time):``}),(0,H.jsx)(Z,{children:e.serial}),(0,H.jsx)(Z,{children:(0,H.jsxs)(uw,{direction:`row`,spacing:`2`,sx:{alignItems:`center`},children:[(0,H.jsx)(tW,{part:e.partName,size:25}),(0,H.jsx)(q,{variant:`body2`,children:e.partName})]})}),(0,H.jsx)(Z,{children:e.workorderId}),(0,H.jsx)(Z,{children:e.closeout_completed===null||e.closeout_completed===void 0?``:e.closeout_failed?(0,H.jsx)(mT,{fontSize:`inherit`}):(0,H.jsx)(lT,{fontSize:`inherit`})}),(0,H.jsx)(Z,{children:e.closeout_completed?Due.format(e.closeout_completed):``}),(0,H.jsx)(Z,{padding:`checkbox`,children:e.serial!==null&&e.serial!==``?(0,H.jsx)(th,{onClick:()=>{e.serial&&t({type:`ManuallyEnteredSerial`,serial:e.serial})},size:`large`,children:(0,H.jsx)(DT,{fontSize:`inherit`})}):void 0})]})});function kue({day:e}){let t=R(_L),n=(0,L.useMemo)(()=>{let n=QT(e,1),r=[];for(let i of t.matsById.values())i.completed_last_proc_machining===!0&&i.last_unload_time&&i.last_unload_time>=e&&i.last_unload_time<n&&r.push(i);return r},[t,e]),[r,i]=(0,L.useState)(0),[a,o]=(0,L.useState)(`asc`),s=(0,L.useMemo)(()=>wue(n,r,a),[n,r,a]);return(0,H.jsxs)(Vw,{stickyHeader:!0,children:[(0,H.jsx)(qw,{children:(0,H.jsx)(Tue,{sortBy:r,setSortBy:i,sortOrder:a,setSortOrder:o})}),(0,H.jsx)(Ww,{children:s.map(e=>(0,H.jsx)(Oue,{mat:e},e.materialID))})]})}function Aue(){YI(`Close Out`);let[e,t]=(0,L.useState)(xE());return(0,H.jsxs)(J,{sx:{padding:`24px`},children:[(0,H.jsx)(J,{component:`nav`,sx:{display:`flex`,justifyContent:`center`},children:(0,H.jsx)(Cue,{day:e,setDay:t})}),(0,H.jsx)(`main`,{children:(0,H.jsx)(kue,{day:e})}),(0,H.jsx)(Q0,{}),(0,H.jsx)(xue,{})]})}var k9=P(!1),A9=P(!1),j9=P(!1),M9=[{id:0,numeric:!1,label:`ID`,getDisplay:e=>e.bookingId,Cell:({row:e})=>e.canceled?(0,H.jsx)(q,{sx:{textDecoration:`line-through`,fontSize:`inherit`},children:e.bookingId}):e.bookingId},{id:1,numeric:!1,label:`Part`,getDisplay:e=>e.partName,Cell:({row:e})=>(0,H.jsxs)(uw,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,H.jsx)(tW,{part:e.partName,size:25}),e.partName]})},{id:2,numeric:!0,label:`Quantity`,getDisplay:e=>e.quantity.toString(),getForSort:e=>e.quantity},{id:3,numeric:!1,label:`Request Time`,getDisplay:e=>e.timeUTC.toLocaleString(),getForSort:e=>e.timeUTC.getTime()},{id:4,numeric:!1,label:`Priority`,getDisplay:e=>e.priority?e.priority.toString():``,getForSort:e=>e.priority??0},{id:5,numeric:!1,label:`Workorder`,getDisplay:e=>e.workorder??``},{id:6,numeric:!1,label:`Canceled`,getDisplay:e=>e.canceled?.toLocaleString()??``,getForSort:e=>e.canceled?.getTime()??0,openFilterDialog:k9},{id:7,numeric:!1,label:`Scheduled Job`,getDisplay:e=>e.job??``,openFilterDialog:k9},{id:8,numeric:!1,label:`Scheduled Time`,getDisplay:e=>e.schTime?e.schTime.toLocaleString():``,getForSort:e=>e.schTime?e.schTime.getTime():0}],jue=(0,L.memo)(function({setRebookingToShow:e}){let t=f0(3,M9,`desc`),n=d0(),r=R(OR),i=R(AR),a=R(MR),o=R(A9),s=R(j9),c=(0,L.useMemo)(()=>r.adjust(a,(e,t)=>e?{...e,job:t?.jobUnique,schTime:t?.scheduledTime}:void 0).adjust(i,(e,t)=>e?{...e,canceled:t}:void 0).valuesToAscLazySeq().transform(e=>o?e.filter(e=>!e.job):e).transform(e=>s?e.filter(e=>!e.canceled):e).toSortedArray(t.sortOn),[t.sortOn,r,i,a,o,s]);return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(Vw,{children:[(0,H.jsx)(r0,{columns:M9,sort:t,showDetailsCol:!0,copyToClipboardRows:c}),(0,H.jsx)(l0,{columns:M9,pageData:c,rowsPerPage:n.rowsPerPage,onClickDetails:(t,n)=>e(n)})]}),(0,H.jsx)(c0,{tpage:n,count:c.length})]})}),N9=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`numeric`}),Mue=(0,L.memo)(function({rebooking:e,close:t}){let[n,r]=RR();function i(){e&&n(e.bookingId).then(()=>t(void 0)).catch(console.log)}return(0,H.jsxs)(py,{open:e!==void 0,onClose:()=>t(void 0),children:[(0,H.jsx)(gy,{children:e?.canceled?(0,H.jsx)(q,{sx:{textDecoration:`line-through`},children:e?.bookingId}):e?.bookingId}),(0,H.jsx)(hy,{children:(0,H.jsxs)(uw,{direction:`column`,spacing:1,children:[e?.canceled&&(0,H.jsxs)(q,{variant:`h5`,children:[`Canceled at `,N9.format(e.canceled)]}),(0,H.jsxs)(uw,{direction:`row`,spacing:1,children:[(0,H.jsx)(`span`,{children:`Part:`}),e?.partName&&(0,H.jsx)(tW,{part:e?.partName,size:25}),(0,H.jsx)(`span`,{children:e?.partName})]}),(0,H.jsxs)(q,{children:[`Quantity: `,e?.quantity]}),(0,H.jsxs)(q,{children:[`Request Time: `,N9.format(e?.timeUTC)]}),(0,H.jsxs)(q,{children:[`Priority: `,e?.priority]}),e?.workorder&&(0,H.jsxs)(q,{children:[`Workorder: `,e?.workorder]}),(0,H.jsxs)(q,{children:[`Note: `,e?.notes]}),e?.job&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(vy,{}),(0,H.jsxs)(q,{children:[`Scheduled Job: `,e?.job]}),(0,H.jsxs)(q,{children:[`Scheduled Time: `,e?.schTime?.toLocaleString()]})]})]})}),(0,H.jsxs)(my,{children:[!e?.canceled&&!e?.job&&(0,H.jsxs)(Y,{onClick:i,color:`secondary`,disabled:r,children:[r?(0,H.jsx)(Ym,{size:24}):void 0,`Cancel Rebooking Request`]}),(0,H.jsx)(Y,{onClick:()=>t(void 0),children:`Close`})]})]})}),Nue=P(e=>Q.ofObject(e(zO).jobs).map(([,e])=>e.partName).concat(e(bO).valuesToLazySeq().map(e=>e.partName)).distinctAndSortBy(e=>e).toRArray()),Pue=(0,L.memo)(function(){let[e,t]=(0,L.useState)(!1),[n,r]=(0,L.useState)({part:``}),i=R(Nue),[a,o]=zR(),s=n.part!==``&&!!n.qty&&!isNaN(n.qty);function c(){t(!1),r({part:``})}function l(){s&&a(n).then(c).catch(console.log)}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(py,{open:e,onClose:c,children:[(0,H.jsx)(gy,{children:`Create New`}),(0,H.jsx)(hy,{children:(0,H.jsxs)(uw,{direction:`column`,spacing:2,sx:{mt:`0.5em`,minWidth:`25em`},children:[(0,H.jsx)(L_,{freeSolo:!0,selectOnFocus:!0,clearOnBlur:!0,handleHomeEndKeys:!0,disableClearable:!0,options:i,value:n.part,onChange:(e,t)=>r(e=>({...e,part:t})),renderInput:e=>(0,H.jsx)(nT,{...e,label:`Part Name`,slotProps:{input:{...e.slotProps.input,startAdornment:(0,H.jsxs)(H.Fragment,{children:[n.part===``?void 0:(0,H.jsx)(ub,{position:`start`,children:(0,H.jsx)(tW,{part:n.part,size:25})}),e.slotProps.input?.startAdornment]})}}}),renderOption:(e,t)=>(0,H.jsx)(`li`,{...e,children:(0,H.jsxs)(uw,{direction:`row`,spacing:`1`,sx:{alignItems:`center`},children:[(0,H.jsx)(tW,{part:t,size:25}),t]})}),filterOptions:(e,t)=>{let n=e.filter(e=>e.toLowerCase().includes(t.inputValue.toLowerCase()));return n.length===0&&t.inputValue!==``?[t.inputValue]:n}}),(0,H.jsx)(nT,{label:`Quantity`,type:`number`,value:n.qty&&!isNaN(n.qty)?n.qty:``,onChange:e=>r(t=>({...t,qty:parseInt(e.target.value)}))}),(0,H.jsx)(nT,{label:`Priority (optional)`,type:`number`,value:n.priority&&!isNaN(n.priority)?n.priority:``,onChange:e=>r(t=>({...t,priority:parseInt(e.target.value)}))}),(0,H.jsx)(nT,{label:`Workorder (optional)`,value:n.workorder??``,onChange:e=>r(t=>({...t,workorder:e.target.value}))}),(0,H.jsx)(nT,{label:`Notes (optional)`,multiline:!0,minRows:2,value:n.notes??``,onChange:e=>r(t=>({...t,notes:e.target.value}))})]})}),(0,H.jsxs)(my,{children:[(0,H.jsxs)(Y,{color:`secondary`,onClick:l,disabled:!s||o,children:[o?(0,H.jsx)(Ym,{size:24}):void 0,`Create`]}),(0,H.jsx)(Y,{onClick:c,children:`Cancel`})]})]}),(0,H.jsx)(X,{title:`Add Rebooking`,children:(0,H.jsx)(by,{onClick:()=>t(!0),sx:{position:`fixed`,bottom:`24px`,right:`24px`},color:`primary`,children:(0,H.jsx)(aT,{})})})]})}),Fue=(0,L.memo)(function(){let[e,t]=B(k9),[n,r]=B(A9),[i,a]=B(j9);return(0,H.jsxs)(py,{open:e,onClose:()=>t(!1),children:[(0,H.jsx)(gy,{children:`Filter`}),(0,H.jsx)(hy,{children:(0,H.jsxs)(uw,{direction:`column`,spacing:2,children:[(0,H.jsx)(Py,{control:(0,H.jsx)(Hv,{checked:n,onChange:e=>r(e.target.checked)}),label:`Hide scheduled`}),(0,H.jsx)(Py,{control:(0,H.jsx)(Hv,{checked:i,onChange:e=>a(e.target.checked)}),label:`Hide canceled`})]})}),(0,H.jsx)(my,{children:(0,H.jsx)(Y,{onClick:()=>t(!1),children:`Close`})})]})});function Iue(){YI(R(br).supportsRebookings??`Rebookings`);let[e,t]=(0,L.useState)(void 0);return(0,H.jsxs)(J,{component:`main`,sx:{padding:`24px`},children:[(0,H.jsx)(jue,{setRebookingToShow:t}),(0,H.jsx)(Mue,{rebooking:e,close:t}),(0,H.jsx)(Pue,{}),(0,H.jsx)(Fue,{})]})}var P9=P(Math.floor(Date.now()/6e4));P9.onMount=e=>{let t=setInterval(()=>{e(Math.floor(Date.now()/6e4))},6e4);return()=>clearInterval(t)};var F9=NO(`charts_last30WeekdayStartIdx`,0),I9=NO(`charts_last30WeekdayStartMinuteOffset`,360),L9=vO(e=>P(t=>{let n=t(F9),r=t(I9),i=new Date(t(P9)*6e4),a=cE(sE(i),r),o=cE(iE(i,{weekStartsOn:n}),r);switch(e){case`StartOfToday`:return a;case`StartOfYesterday`:return QT(a,-1);case`StartOfWeek`:return o;case`StartOfLastWeek`:return QT(o,-7);case`Last30`:return QT(i,-30)}})),R9=vO(e=>P(t=>{if(e===`Now`)return null;let n=t(F9),r=t(I9),i=new Date(t(P9)*6e4);switch(e){case`EndOfYesterday`:return cE(sE(i),r);case`EndOfLastWeek`:return cE(iE(i,{weekStartsOn:n}),r)}}));function Lue(e){let t=NO(`charts_${e}_start`,`StartOfWeek`),n=NO(`charts_${e}_end`,`Now`);return P(e=>{let r=e(t),i=e(n);return{startType:r,endType:i,startDate:r instanceof Date?r:e(L9(r)),endDate:i instanceof Date?i:e(R9(i))}},(e,r,i)=>{`start`in i&&r(t,i.start),`end`in i&&r(n,i.end)})}function Rue(e){return e.closeout_completed===void 0?!!(Q.ofObject(e.completedInspections??{}).some(([,e])=>!e.success)||e.currently_quarantined):e.closeout_failed!==!1}var z9=Lue(`part-summary`),zue=P(e=>{let t=e(_L),n=e(hk),r=e(z9),i=n.valuesToLazySeq().filter(e=>(r.startDate===null||e.endTime>=r.startDate)&&(r.endDate===null||e.endTime<=r.endDate)).toLookupOrderedMap(e=>e.part,e=>e.stationGroup,e=>({isLoadUnload:rk(e),elapsed:e.elapsedMinsPerMaterial*e.material.length,active:e.activeMinutes,medianElapsed:e.medianCycleMinutes}),(e,t)=>({isLoadUnload:e.isLoadUnload||t.isLoadUnload,elapsed:e.elapsed+t.elapsed,active:e.active+t.active,medianElapsed:e.medianElapsed+t.medianElapsed}));return t.matsById.valuesToLazySeq().filter(e=>!!(e.numProcesses&&e.unloaded_processes?.[e.numProcesses]&&(r.startDate===null||e.unloaded_processes[e.numProcesses]>=r.startDate)&&(r.endDate===null||e.unloaded_processes[e.numProcesses]<=r.endDate))).toOrderedLookup(e=>e.partName).mapValues((e,t)=>({part:t,completedQty:e.length,abnormalQty:Q.of(e).sumBy(e=>+!!Rue(e)),mats:e,stationMins:pO.empty(),workorders:Q.of(e).toOrderedSet(e=>e.workorderId??``).delete(``)})).adjust(i,(e,t,n)=>e?{...e,stationMins:t}:{part:n,completedQty:0,abnormalQty:0,mats:[],stationMins:t,workorders:dO.empty()}).valuesToAscLazySeq().toRArray()});function Bue(e){return e===`CustomDate`||e===`StartOfToday`||e===`StartOfYesterday`||e===`StartOfWeek`||e===`StartOfLastWeek`||e===`Last30`}function Vue(e){return e===`CustomDate`||e===`Now`||e===`EndOfYesterday`||e===`EndOfLastWeek`}function Hue(e){switch(e){case`0`:return 0;case`1`:return 1;case`2`:return 2;case`3`:return 3;case`4`:return 4;case`5`:return 5;case`6`:return 6;default:return null}}function B9({label:e,date:t}){return(0,H.jsxs)(J,{children:[(0,H.jsx)(q,{children:e}),t?(0,H.jsxs)(q,{variant:`subtitle2`,children:[`(`,t.toLocaleString(),`)`]}):void 0]})}function V9({date:e,setDate:t,enabled:n}){let r=R(L9(`Last30`));return(0,H.jsx)(nT,{type:`datetime-local`,value:e?new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString().slice(0,16):``,onChange:e=>t(new Date(e.target.value)),disabled:!n,label:`Custom Date`,slotProps:{inputLabel:{shrink:!0},htmlInput:{min:new Date(r.getTime()-r.getTimezoneOffset()*6e4).toISOString().slice(0,16)}}})}function Uue({chartAtom:e}){let[t,n]=B(e),r=R(I9),[i,a]=(0,L.useState)(t.startType instanceof Date?t.startType:cE(xE(),r));function o(e){n(e===`CustomDate`?{start:i??new Date}:{start:e})}function s(e){a(e),n({start:e})}let c=R(L9(`StartOfToday`)),l=R(L9(`StartOfYesterday`)),u=R(L9(`StartOfWeek`)),d=R(L9(`StartOfLastWeek`)),f=R(L9(`Last30`));return(0,H.jsxs)(J,{children:[(0,H.jsx)(q,{variant:`h6`,children:`Range Start`}),(0,H.jsx)(JS,{value:t.startType instanceof Date?`CustomDate`:t.startType,onChange:e=>{Bue(e.target.value)&&o(e.target.value)},children:(0,H.jsxs)(uw,{direction:`column`,spacing:2,children:[(0,H.jsxs)(uw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(GS,{value:`StartOfToday`}),(0,H.jsx)(B9,{label:`Start of Today`,date:c})]}),(0,H.jsxs)(uw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(GS,{value:`StartOfYesterday`}),(0,H.jsx)(B9,{label:`Start of Yesterday`,date:l})]}),(0,H.jsxs)(uw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(GS,{value:`StartOfWeek`}),(0,H.jsx)(B9,{label:`Start of This Week`,date:u})]}),(0,H.jsxs)(uw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(GS,{value:`StartOfLastWeek`}),(0,H.jsx)(B9,{label:`Start of Last Week`,date:d})]}),(0,H.jsxs)(uw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(GS,{value:`Last30`}),(0,H.jsx)(B9,{label:`Last 30 Days`,date:f})]}),(0,H.jsxs)(uw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(GS,{value:`CustomDate`}),(0,H.jsx)(V9,{enabled:t.startType instanceof Date,date:i,setDate:s})]})]})})]})}function Wue({chartAtom:e}){let[t,n]=B(e),r=R(I9),[i,a]=(0,L.useState)(t.endType instanceof Date?t.endType:cE(xE(),r));function o(e){n(e===`CustomDate`?{end:i??new Date}:{end:e})}function s(e){a(e),n({end:e})}let c=R(R9(`EndOfYesterday`)),l=R(R9(`EndOfLastWeek`));return(0,H.jsxs)(J,{children:[(0,H.jsx)(q,{variant:`h6`,children:`Range End`}),(0,H.jsx)(JS,{value:t.endType instanceof Date?`CustomDate`:t.endType,onChange:e=>{Vue(e.target.value)&&o(e.target.value)},children:(0,H.jsxs)(uw,{direction:`column`,spacing:2,children:[(0,H.jsxs)(uw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(GS,{value:`Now`}),(0,H.jsx)(q,{children:`Now`})]}),(0,H.jsxs)(uw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(GS,{value:`EndOfYesterday`}),(0,H.jsx)(B9,{label:`End of Yesterday`,date:c})]}),(0,H.jsx)(J,{sx:{height:`3em`}}),(0,H.jsxs)(uw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(GS,{value:`EndOfLastWeek`}),(0,H.jsx)(B9,{label:`End of Last Week`,date:l})]}),(0,H.jsx)(J,{sx:{height:`3em`}}),(0,H.jsxs)(uw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,H.jsx)(GS,{value:`CustomDate`}),(0,H.jsx)(V9,{enabled:t.endType instanceof Date,date:i,setDate:s})]})]})})]})}function Gue(e){let t=Math.floor(e/60),n=e%60;return`${t.toString().padStart(2,`0`)}:${n.toString().padStart(2,`0`)}`}function Kue({chartAtom:e,open:t,setOpen:n}){let[r,i]=B(F9),[a,o]=B(I9);return(0,H.jsxs)(py,{open:t,onClose:()=>n(!1),maxWidth:`md`,children:[(0,H.jsx)(hy,{children:(0,H.jsxs)(uw,{direction:`column`,spacing:2,divider:(0,H.jsx)(vy,{orientation:`horizontal`,flexItem:!0}),children:[(0,H.jsxs)(uw,{direction:`row`,spacing:2,divider:(0,H.jsx)(vy,{orientation:`vertical`,flexItem:!0}),children:[(0,H.jsx)(Uue,{chartAtom:e}),(0,H.jsx)(Wue,{chartAtom:e})]}),(0,H.jsxs)(uw,{direction:`row`,sx:{justifyContent:`space-around`},children:[(0,H.jsxs)(nT,{select:!0,label:`First Day Of Week`,sx:{minWidth:`10em`},value:r,onChange:e=>{let t=Hue(e.target.value);t!==null&&i(t)},children:[(0,H.jsx)(gS,{value:0,children:`Sunday`}),(0,H.jsx)(gS,{value:1,children:`Monday`}),(0,H.jsx)(gS,{value:2,children:`Tuesday`}),(0,H.jsx)(gS,{value:3,children:`Wednesday`}),(0,H.jsx)(gS,{value:4,children:`Thursday`}),(0,H.jsx)(gS,{value:5,children:`Friday`}),(0,H.jsx)(gS,{value:6,children:`Saturday`})]}),(0,H.jsx)(nT,{type:`time`,label:`Day Start Time`,sx:{minWidth:`10em`},value:Gue(a),onChange:e=>{let t=e.target.value;if(t===``)o(0);else{let[e,n]=t.split(`:`).map(Number);o(e*60+n)}}})]})]})}),(0,H.jsx)(my,{children:(0,H.jsx)(Y,{onClick:()=>n(!1),children:`Close`})})]})}function que(e,t){if(e instanceof Date)return e.toLocaleString();switch(e){case`StartOfToday`:return`Start of Today${t?` (${t.toLocaleString()})`:``}`;case`StartOfYesterday`:return`Start of Yesterday${t?` (${t.toLocaleString()})`:``}`;case`StartOfWeek`:return`Start of This Week${t?` (${t.toLocaleString()})`:``}`;case`StartOfLastWeek`:return`Start of Last Week${t?` (${t.toLocaleString()})`:``}`;case`Last30`:return`Last 30 Days${t?` (${t.toLocaleString()})`:``}`}}function Jue(e,t){if(e instanceof Date)return e.toLocaleString();switch(e){case`Now`:return`Now`;case`EndOfYesterday`:return`End of Yesterday${t?` (${t.toLocaleString()})`:``}`;case`EndOfLastWeek`:return`End of Last Week${t?` (${t.toLocaleString()})`:``}`}}var Yue=(0,L.memo)(function({chartAtom:e}){let t=R(e),[n,r]=(0,L.useState)(!1);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(uw,{direction:`row`,spacing:2,sx:{alignItems:`center`},children:[(0,H.jsxs)(q,{variant:`body2`,color:`textSecondary`,children:[`Range: `,que(t.startType,t.startDate),` -`,` `,Jue(t.endType,t.endDate)]}),(0,H.jsx)(X,{title:`Edit Range`,children:(0,H.jsx)(th,{onClick:()=>r(!0),children:(0,H.jsx)(pT,{})})})]}),(0,H.jsx)(Kue,{open:n,setOpen:r,chartAtom:e})]})}),H9=new Intl.NumberFormat(void 0,{maximumFractionDigits:1});function Xue(e,t,n){let r;switch(t){case`PartName`:r=e=>e.part;break;case`CompletedQty`:r=e=>e.completedQty;break;case`AbnormalQty`:r=e=>e.abnormalQty;break;case`Workorders`:r=e=>e.workorders.lookupMin()?.[0]??null;break;case`Elapsed`:r=e=>e.stationMins.toAscLazySeq().filter(([,e])=>!e.isLoadUnload).sumBy(([,e])=>e.elapsed);break;case`Active`:r=e=>e.stationMins.toAscLazySeq().filter(([,e])=>!e.isLoadUnload).sumBy(([,e])=>e.active);break;case`Median`:r=e=>e.stationMins.toAscLazySeq().filter(([,e])=>!e.isLoadUnload).sumBy(([,e])=>e.medianElapsed)}let i=[...e];return i.sort(GE(n===`asc`?{asc:r}:{desc:r})),i}var Zue=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`});function Que(e,t,n){let r;switch(t){case`Serial`:r=e=>e.serial??null;break;case`CompletedDate`:r=e=>e.last_unload_time??null;break;case`Workorder`:r=e=>e.workorderId??null;break;case`Quarantined`:r=e=>e.currently_quarantined??null;break;case`InspectFailed`:r=e=>Q.ofObject(e.completedInspections??{}).some(([,e])=>!e.success)?-1:0;break;case`CloseOut`:r=e=>e.closeout_failed===void 0?1:e.closeout_failed?-1:0}let i=[...e];return i.sort(GE(n===`asc`?{asc:r}:{desc:r})),i}function U9(e){return(0,H.jsxs)(Z,{align:e.align,sortDirection:e.sortBy===e.col&&e.order,sx:e.noWhitespaceWrap?{whiteSpace:`nowrap`}:void 0,children:[(0,H.jsx)(X,{title:`Sort`,enterDelay:300,children:(0,H.jsx)($w,{active:e.sortBy===e.col,direction:e.order,onClick:()=>{e.col===e.sortBy?e.setOrder(e.order===`asc`?`desc`:`asc`):(e.setSortBy(e.col),e.setOrder(`asc`))},children:e.children})}),e.extraIcon]})}var W9=(0,L.memo)(function({workorderId:e}){return!e||e===``?(0,H.jsx)(`span`,{}):(0,H.jsx)(Gie,{to:{route:$.Operations_CurrentWorkorders,workorder:e},children:e})});function $ue({material:e}){let t=z(CI),[n,r]=(0,L.useState)(`Serial`),[i,a]=(0,L.useState)(`asc`),o=(0,L.useMemo)(()=>Que(e,n,i),[e,n,i]),s={sortBy:n,setSortBy:r,order:i,setOrder:a},[c,l]=(0,L.useState)(10),[u,d]=(0,L.useState)(0),f=o.slice(u*c,(u+1)*c);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(Vw,{size:`small`,children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(U9,{col:`Serial`,...s,children:`Serial`}),(0,H.jsx)(U9,{col:`CompletedDate`,...s,children:`Completed`}),(0,H.jsx)(U9,{col:`Workorder`,...s,children:`Workorder`}),(0,H.jsx)(U9,{col:`Quarantined`,...s,children:`Quarantine?`}),(0,H.jsx)(U9,{col:`InspectFailed`,noWhitespaceWrap:!0,...s,children:`Inspect Failed?`}),(0,H.jsx)(U9,{col:`CloseOut`,noWhitespaceWrap:!0,...s,children:`Close Out`}),(0,H.jsx)(Z,{padding:`checkbox`})]})}),(0,H.jsxs)(Ww,{children:[f.map(e=>(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:e.serial??``}),(0,H.jsx)(Z,{children:e.last_unload_time?Zue.format(e.last_unload_time):``}),(0,H.jsx)(Z,{children:(0,H.jsx)(W9,{workorderId:e.workorderId})}),(0,H.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:e.currently_quarantined?(0,H.jsx)(MT,{fontSize:`inherit`}):``}),(0,H.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:Q.ofObject(e.completedInspections??{}).some(([,e])=>!e.success)?(0,H.jsx)(mT,{fontSize:`inherit`}):``}),(0,H.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:e.closeout_completed===void 0?``:e.closeout_failed===!1?(0,H.jsx)(lT,{fontSize:`inherit`}):(0,H.jsx)(mT,{fontSize:`inherit`})}),(0,H.jsx)(Z,{padding:`checkbox`,children:(0,H.jsx)(th,{onClick:()=>t({type:`MatSummary`,summary:e}),size:`large`,children:(0,H.jsx)(DT,{fontSize:`inherit`})})})]},e.materialID)),Q.ofRange(0,c-f.length).map(e=>(0,H.jsx)(Zw,{children:(0,H.jsx)(Z,{colSpan:7,children:`\xA0`})},e))]})]}),(0,H.jsxs)(Jw,{variant:`dense`,sx:{mb:`0.5em`},children:[(0,H.jsx)(q,{color:`textSecondary`,variant:`caption`,children:`Rows per page:`}),(0,H.jsx)(xC,{style:{marginLeft:8,marginRight:`1em`},value:c,SelectDisplayProps:{style:{color:`rgba(0, 0, 0, 0.54)`}},input:(0,H.jsx)(Cf,{}),onChange:t=>{let n=t.target.value;l(n);let r=Math.ceil(e.length/n)-1;u>r&&d(r)},children:[10,15,20,50].map(e=>(0,H.jsx)(gS,{value:e,children:e},e))}),(0,H.jsx)(q,{color:`textSecondary`,variant:`caption`,children:`${e.length===0?0:u*c+1}-${Math.min(e.length,(u+1)*c)} of ${e.length}`}),(0,H.jsx)(th,{onClick:()=>d(0),disabled:u===0,"aria-label":`First Page`,size:`large`,children:(0,H.jsx)(_T,{})}),(0,H.jsx)(th,{onClick:()=>d(u-1),disabled:u===0,"aria-label":`Previous Page`,size:`large`,children:(0,H.jsx)(ST,{})}),(0,H.jsx)(th,{onClick:()=>d(u+1),disabled:u>=Math.ceil(e.length/c)-1,"aria-label":`Next Page`,size:`large`,children:(0,H.jsx)(CT,{})}),(0,H.jsx)(th,{onClick:()=>d(Math.max(0,Math.ceil(e.length/c)-1)),disabled:u>=Math.ceil(e.length/c)-1,"aria-label":`Last Page`,size:`large`,children:(0,H.jsx)(TT,{})})]})]})}var ede=(0,L.memo)(function({part:e}){return(0,H.jsxs)(uw,{direction:`row`,sx:{flexWrap:`wrap`,justifyContent:`space-around`,ml:`1em`,mr:`1em`},children:[(0,H.jsx)(J,{sx:{width:`60em`,overflow:`auto`},children:(0,H.jsx)($ue,{material:e.mats})}),(0,H.jsx)(J,{sx:{width:`40em`,overflow:`auto`},children:(0,H.jsxs)(Vw,{size:`small`,children:[(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:`Station`}),(0,H.jsx)(Z,{children:`Active Hours`}),(0,H.jsx)(Z,{children:`Elapsed Hours`}),(0,H.jsx)(Z,{children:`Total Median Hours`})]})}),(0,H.jsx)(Ww,{children:e.stationMins.toAscLazySeq().map(([e,t])=>(0,H.jsxs)(Zw,{children:[(0,H.jsx)(Z,{children:e}),(0,H.jsx)(Z,{children:H9.format(t.active/60)}),(0,H.jsx)(Z,{children:H9.format(t.elapsed/60)}),(0,H.jsx)(Z,{children:H9.format(t.medianElapsed/60)})]},e))})]})})]})}),tde=G(Zw)({"& > *":{borderBottom:`unset !important`}}),nde=(0,L.memo)(function({part:e}){let[t,n]=(0,L.useState)(!1);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(tde,{children:[(0,H.jsx)(Z,{children:(0,H.jsxs)(J,{sx:{display:`flex`,alignItems:`center`},children:[(0,H.jsx)(J,{sx:{mr:`0.2em`},children:(0,H.jsx)(tW,{part:e.part,size:25})}),(0,H.jsx)(`div`,{children:(0,H.jsx)(q,{variant:`body2`,component:`span`,sx:{display:`block`},children:e.part})})]})}),(0,H.jsx)(Z,{align:`right`,children:e.completedQty}),(0,H.jsx)(Z,{align:`right`,children:e.abnormalQty}),(0,H.jsx)(Z,{align:`right`,children:H9.format(e.stationMins.toAscLazySeq().filter(([,e])=>!e.isLoadUnload).sumBy(([,e])=>e.active)/60)}),(0,H.jsx)(Z,{align:`right`,children:H9.format(e.stationMins.toAscLazySeq().filter(([,e])=>!e.isLoadUnload).sumBy(([,e])=>e.elapsed)/60)}),(0,H.jsx)(Z,{align:`right`,children:H9.format(e.stationMins.toAscLazySeq().filter(([,e])=>!e.isLoadUnload).sumBy(([,e])=>e.medianElapsed)/60)}),(0,H.jsx)(Z,{align:`left`,children:e.workorders.size<=1?(0,H.jsx)(W9,{workorderId:e.workorders.lookupMin()??null}):e.workorders.size===2?(0,H.jsxs)(`span`,{children:[(0,H.jsx)(W9,{workorderId:e.workorders.lookupMin()}),` &`,` `,(0,H.jsx)(W9,{workorderId:e.workorders.lookupMax()})]}):`${e.workorders.size} workorders`}),(0,H.jsx)(Z,{children:(0,H.jsx)(X,{title:`Show Details`,children:(0,H.jsx)(th,{size:`small`,onClick:()=>n(!t),children:t?(0,H.jsx)(wT,{}):(0,H.jsx)(xT,{})})})})]}),(0,H.jsx)(Zw,{children:(0,H.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:7,children:(0,H.jsx)(Xp,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,H.jsx)(ede,{part:e})})})})]})});function rde({partsAtom:e}){let t=R(e);return(0,H.jsx)(X,{title:`Copy to Clipboard`,children:(0,H.jsx)(th,{style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,onClick:()=>dde(t),children:(0,H.jsx)(bT,{})})})}function ide(){return(0,H.jsx)(X,{title:`Total Median Hours are calculated by taking the median cycle time (excluding outliers) and adding up for each piece of material.`,children:(0,H.jsx)(`span`,{style:{verticalAlign:`middle`,marginLeft:`0.5em`,fontSize:16},children:(0,H.jsx)(vT,{fontSize:`inherit`})})})}function G9(){return(0,H.jsx)(X,{title:`The entire cycle time is credited at the time the cycle completes, so it may be that a day has more than 24 hours of credited time for example.`,children:(0,H.jsx)(`span`,{style:{verticalAlign:`middle`,marginLeft:`0.5em`,fontSize:16},children:(0,H.jsx)(vT,{fontSize:`inherit`})})})}function ade(){return(0,H.jsx)(X,{title:`An abnormal part is one which was quarantined, had a failed inspection, or was explicitly marked as failing closeout. A successful closeout overrides this and will never be an abnormal part.`,children:(0,H.jsx)(`span`,{style:{verticalAlign:`middle`,marginLeft:`0.5em`,fontSize:16},children:(0,H.jsx)(vT,{fontSize:`inherit`})})})}var ode=(0,L.memo)(function({partsAtom:e,order:t,setOrder:n,sortBy:r,setSortBy:i}){let a={sortBy:r,setSortBy:i,order:t,setOrder:n};return(0,H.jsx)(qw,{children:(0,H.jsxs)(Zw,{children:[(0,H.jsx)(U9,{align:`left`,col:`PartName`,...a,children:`Part`}),(0,H.jsx)(U9,{align:`right`,col:`CompletedQty`,...a,children:`Completed Quantity`}),(0,H.jsx)(U9,{align:`right`,col:`AbnormalQty`,...a,extraIcon:(0,H.jsx)(ade,{}),children:`Abnormal Quantity`}),(0,H.jsx)(U9,{align:`right`,col:`Active`,...a,extraIcon:(0,H.jsx)(G9,{}),children:`Active Hours`}),(0,H.jsx)(U9,{align:`right`,col:`Elapsed`,...a,extraIcon:(0,H.jsx)(G9,{}),children:`Elapsed Hours`}),(0,H.jsx)(U9,{align:`right`,col:`Median`,...a,extraIcon:(0,H.jsx)(ide,{}),children:`Total Median Hours`}),(0,H.jsx)(U9,{align:`left`,col:`Workorders`,...a,children:`Workorders`}),(0,H.jsx)(Z,{children:(0,H.jsx)(rde,{partsAtom:e})})]})})}),sde=(0,L.memo)(function({partsAtom:e}){let t=R(e),[n,r]=(0,L.useState)(`PartName`),[i,a]=(0,L.useState)(`asc`),o=Xue(t,n,i);return(0,H.jsxs)(Vw,{stickyHeader:!0,children:[(0,H.jsx)(ode,{partsAtom:e,sortBy:n,setSortBy:r,order:i,setOrder:a}),(0,H.jsx)(Ww,{children:o.map(e=>(0,H.jsx)(nde,{part:e},e.part))})]})});function cde(){let e=z(q0),t=R(EI),[n,r]=RI(),i=z(CI);if(t===null||t.materialID<0)return null;function a(e){t!==null&&(n({mat:t,operator:`Manager`,failed:e}),i(null))}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Y,{color:`primary`,disabled:r,onClick:()=>a(!0),children:`Fail CloseOut`}),(0,H.jsx)(Y,{color:`primary`,disabled:r,onClick:()=>a(!1),children:`Pass CloseOut`}),(0,H.jsx)(Y,{color:`primary`,onClick:()=>e(!0),children:`Change Workorder`})]})}var lde=(0,L.memo)(function(){return(0,H.jsx)(AW,{buttons:(0,H.jsx)(cde,{})})});function ude(){return YI(`Completed Parts`),(0,H.jsxs)(J,{component:`main`,sx:{padding:`24px`},children:[(0,H.jsxs)(uw,{direction:`row`,spacing:2,sx:{alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{children:`Completed Parts`}),(0,H.jsx)(Yue,{chartAtom:z9})]}),(0,H.jsx)(sde,{partsAtom:zue}),(0,H.jsx)(lde,{}),(0,H.jsx)(Q0,{})]})}function dde(e){let t=`<table>
|
|
384
|
+
<thead><tr>`;t+=`<th>Part</th>`,t+=`<th>Completed Qty</th>`,t+=`<th>Abnormal Qty</th>`,t+=`<th>Workorders</th>`,t+=`<th>Active Machine Time (mins)</th>`,t+=`<th>Elapsed Machine Time (mins)</th>`,t+=`<th>Total Median Machine Time (mins)</th>`,t+=`<th>Active L/U Time (mins)</th>`,t+=`<th>Elapsed L/U Time (mins)</th>`,t+=`<th>Total Median L/U Time (mins)</th>`,t+=`</tr></thead>
|
|
385
|
+
<tbody>
|
|
386
|
+
`;for(let n of e){t+=`<tr>`,t+=`<td>${n.part}</td>`,t+=`<td>${n.completedQty}</td>`,t+=`<td>${n.abnormalQty}</td>`,t+=`<td>${n.workorders.toAscLazySeq().toRArray().join(`;`)}</td>`;for(let e of[!1,!0]){let r=n.stationMins.toAscLazySeq().filter(([,t])=>t.isLoadUnload===e).toRArray();r.length===0?t+=`<td>0</td><td>0</td><td>0</td>`:r.length===1?(t+=`<td>${r[0][1].active}</td>`,t+=`<td>${r[0][1].elapsed}</td>`,t+=`<td>${r[0][1].medianElapsed}</td>`):(t+=`<td>${r.map(([e,t])=>`${e}: ${t.active}`).join(`;`)}</td>`,t+=`<td>${r.map(([e,t])=>`${e}: ${t.elapsed}`).join(`;`)}</td>`,t+=`<td>${r.map(([e,t])=>`${e}: ${t.medianElapsed}`).join(`;`)}</td>`)}t+=`</tr>
|
|
387
|
+
`}t+=`</tbody></table>
|
|
388
|
+
`,Hk(t,{format:`text/html`})}var K9=`bms-operations-reports-tab`,q9=[{separator:`Load/Unload`},{name:`L/U Outliers`,route:{route:$.Operations_LoadOutliers},icon:(0,H.jsx)(oT,{})},{name:`L/U Hours`,route:{route:$.Operations_LoadHours},icon:(0,H.jsx)(yT,{})},{name:`L/U Cycles`,route:{route:$.Operations_LoadCycles},icon:(0,H.jsx)(BT,{})},{separator:`Machines`},{name:`MC Outliers`,route:{route:$.Operations_MachineOutliers},icon:(0,H.jsx)(oT,{})},{name:`MC Hours`,route:{route:$.Operations_MachineHours},icon:(0,H.jsx)(yT,{})},{name:`MC Cycles`,route:{route:$.Operations_MachineCycles},icon:(0,H.jsx)(BT,{})},{name:`Tools`,route:{route:$.Operations_Tools},icon:(0,H.jsx)(fT,{})},{name:`Programs`,route:{route:$.Operations_Programs},icon:(0,H.jsx)(Mre,{})},{separator:`Material`},{name:`Quality`,route:{route:$.Operations_Quality},icon:(0,H.jsx)(sT,{})},{name:`Inspections`,route:{route:$.Operations_Inspections},icon:(0,H.jsx)(lre,{})},{name:`Close Out`,route:{route:$.Operations_CloseoutReport},icon:(0,H.jsx)(kT,{})},{separator:`Cell`},{name:`Schedules`,route:{route:$.Operations_RecentSchedules},icon:(0,H.jsx)(cT,{})},{name:`Workorders`,route:{route:$.Operations_CurrentWorkorders},icon:(0,H.jsx)(gT,{})},{name:`Production`,route:{route:$.Operations_Production},icon:(0,H.jsx)(gre,{})},{name:`Part Summary`,route:{route:$.Operations_Parts},icon:(0,H.jsx)(zT,{})},{name:e=>e.supportsRebookings??`Rebooking`,route:{route:$.Operations_Rebookings},icon:(0,H.jsx)(jT,{}),hidden:e=>e.supportsRebookings===null||e.supportsRebookings===``}];function fde(e){return[{separator:`Efficiency`},{name:`Buffers`,route:{route:$.Analysis_Buffers},icon:(0,H.jsx)(xre,{})},{name:`Station OEE`,route:{route:$.Analysis_StationOEE},icon:(0,H.jsx)(yT,{})},{name:`Completed Parts`,route:{route:$.Analysis_PartsCompleted},icon:(0,H.jsx)(gT,{})},{separator:`Cycles`},{name:`Machine Cycles`,route:{route:$.Analysis_MachineCycles},icon:(0,H.jsx)(BT,{})},{name:`L/U Cycles`,route:{route:$.Analysis_LoadCycles},icon:(0,H.jsx)(cre,{})},{name:`Pallet Cycles`,route:{route:$.Analysis_PalletCycles},icon:(0,H.jsx)(FT,{})},{name:e=>dk(e.basketName)+` Cycles`,route:{route:$.Analysis_BasketCycles},icon:(0,H.jsx)(FT,{}),hidden:()=>!e},{separator:`Cell`},{name:`Quality`,route:{route:$.Analysis_Quality},icon:(0,H.jsx)(sT,{})},{name:`Tool Replacements`,route:{route:$.Analysis_ToolReplacements},icon:(0,H.jsx)(fT,{})},{name:`Schedules`,route:{route:$.Analysis_Schedules},icon:(0,H.jsx)(cT,{})},{separator:`Costs`},{name:`Percentages`,route:{route:$.Analysis_CostPercents},icon:(0,H.jsx)(mre,{})},{name:`Cost/Piece`,route:{route:$.Analysis_CostPerPiece},icon:(0,H.jsx)(dre,{})}]}function pde(e){return typeof e==`string`&&Object.values($).includes(e)}function mde(e){return pde(e)&&e!==$.Client_Custom&&e!==$.Operations_CurrentWorkorders&&e!==$.Station_InspectionMonitorWithType&&e!==$.Station_LoadMonitor&&e!==$.Station_Queues}function hde(e){return{route:e}}function J9({children:e}){let[t,n]=B(qI),r=iT(zd().breakpoints.down(`md`)),[,i]=(0,L.useTransition)(),a=q9.some(e=>`separator`in e?!1:e.route.route===t.route);return(0,H.jsx)(Yne,{variant:r&&(!Array.isArray(e)||e.length<5)?`fullWidth`:`scrollable`,value:a?K9:t.route,onChange:(e,t)=>i(()=>{t===K9?n({route:$.Operations_MachineCycles}):mde(t)&&n(hde(t))}),textColor:`inherit`,scrollButtons:!0,allowScrollButtonsMobile:!0,indicatorColor:`secondary`,children:e})}function Y9(){return(0,H.jsxs)(J9,{children:[(0,H.jsx)(Rw,{label:`Operations`,value:$.Operations_Dashboard}),(0,H.jsx)(Rw,{label:`Cell`,value:$.Operations_SystemOverview}),(0,H.jsx)(Rw,{label:`Material`,value:$.Operations_AllMaterial}),(0,H.jsx)(Rw,{label:`Reports`,value:K9})]})}function X9(){return(0,H.jsxs)(J9,{children:[(0,H.jsx)(Rw,{label:`Material`,value:$.Quality_Dashboard}),(0,H.jsx)(Rw,{label:`Paths`,value:$.Quality_Paths}),(0,H.jsx)(Rw,{label:`Quarantine Material`,value:$.Quality_Quarantine})]})}function Z9(){return(0,H.jsxs)(J9,{children:[(0,H.jsx)(Rw,{label:`Tools`,value:$.Tools_Dashboard}),(0,H.jsx)(Rw,{label:`Programs`,value:$.Tools_Programs})]})}function Q9(){return(0,H.jsxs)(J9,{children:[(0,H.jsx)(Rw,{label:`Cycles`,value:$.Engineering_Cycles}),(0,H.jsx)(Rw,{label:`Hours`,value:$.Engineering_Hours}),(0,H.jsx)(Rw,{label:`Outliers`,value:$.Engineering_Outliers})]})}function $9(){return R(xR)===null?null:(0,H.jsxs)(J9,{children:[(0,H.jsx)(Rw,{label:`Workorders`,value:$.Sales_Dashboard}),(0,H.jsx)(Rw,{label:`Projections`,value:$.Sales_ProjectedUsage})]})}var gde=(0,L.memo)(function(e){Kie();let t=R(br),n=R(nR),r=R(aR),[i,a]=B(qI),o=fde(n||r),s=t.user!==null&&t.user!==void 0,c,l,u,d,f=!0,p=!0,m=!1,h=!0;if(vr(t)&&!t.user)c=(0,H.jsxs)(`div`,{style:{textAlign:`center`,marginTop:`4em`},children:[(0,H.jsx)(`h3`,{children:`Please Login`}),(0,H.jsx)(Y,{variant:`contained`,color:`primary`,onClick:()=>xr(t),children:`Login`})]}),f=!1,p=!1;else switch(i.route){case $.Station_LoadMonitor:c=(0,H.jsx)(b4,{loadNum:i.loadNum,queues:i.queues,completed:i.completed,submitBasketLoadStationCommand:e.submitBasketLoadStationCommand,submitBasketMovementCompletion:e.submitBasketMovementCompletion,submitBasketLocationCorrection:e.submitBasketLocationCorrection},i.loadNum),l=X3,u=Z3,m=!0,h=!1;break;case $.Station_InspectionMonitor:c=(0,H.jsx)(O4,{focusInspectionType:null}),l=X3,u=Z3,m=!0,h=!1;break;case $.Station_InspectionMonitorWithType:c=(0,H.jsx)(O4,{focusInspectionType:i.inspType}),l=X3,u=Z3,m=!0,h=!1;break;case $.Station_Closeout:c=(0,H.jsx)(F4,{}),l=X3,u=Z3,m=!0,h=!1;break;case $.Station_Queues:c=(0,H.jsx)(jX,{queues:i.queues}),l=X3,u=Z3,m=!0,h=!1;break;case $.Station_Overview:c=(0,H.jsx)(R2,{}),h=!1;break;case $.Analysis_Quality:c=(0,H.jsx)(W3,{}),l=v7,d=o,f=!1;break;case $.Analysis_ToolReplacements:c=(0,H.jsx)(Fle,{}),l=v7,d=o,f=!1;break;case $.Analysis_Schedules:c=(0,H.jsx)(U3,{}),l=v7,d=o,f=!1;break;case $.Analysis_Buffers:c=(0,H.jsx)(kce,{}),l=v7,d=o,f=!1;break;case $.Analysis_StationOEE:c=(0,H.jsx)(Gce,{}),l=v7,d=o,f=!1;break;case $.Analysis_PartsCompleted:c=(0,H.jsx)(Yce,{}),l=v7,d=o,f=!1;break;case $.Analysis_MachineCycles:c=(0,H.jsx)(ale,{}),l=v7,d=o,f=!1;break;case $.Analysis_LoadCycles:c=(0,H.jsx)(mle,{}),l=v7,d=o,f=!1;break;case $.Analysis_PalletCycles:c=(0,H.jsx)(ble,{}),l=v7,d=o,f=!1;break;case $.Analysis_BasketCycles:c=(0,H.jsx)(Ele,{}),l=v7,d=o,f=!1;break;case $.Analysis_CostPercents:c=(0,H.jsx)(WW,{}),l=v7,d=o,f=!1;break;case $.Analysis_CostPerPiece:c=(0,H.jsx)(KW,{}),l=v7,d=o,f=!1;break;case $.Operations_Dashboard:c=(0,H.jsx)(Zie,{}),l=Y9;break;case $.Operations_SystemOverview:c=(0,H.jsx)(R2,{ignoreOperator:!0}),l=Y9,h=!1;break;case $.Operations_AllMaterial:c=(0,H.jsx)(fZ,{displaySystemBins:!0}),l=Y9,h=!1;break;case $.Operations_LoadOutliers:c=(0,H.jsx)(s6,{outlierTy:`labor`}),l=Y9,d=q9;break;case $.Operations_LoadHours:c=(0,H.jsx)(T6,{ty:`labor`}),l=Y9,d=q9;break;case $.Operations_LoadCycles:c=(0,H.jsx)(_7,{ty:`labor`}),l=Y9,d=q9;break;case $.Operations_MachineOutliers:c=(0,H.jsx)(s6,{outlierTy:`machine`}),l=Y9,d=q9;break;case $.Operations_MachineHours:c=(0,H.jsx)(T6,{ty:`machine`}),l=Y9,d=q9;break;case $.Operations_MachineCycles:c=(0,H.jsx)(_7,{ty:`machine`}),l=Y9,d=q9;break;case $.Operations_RecentSchedules:c=(0,H.jsx)(zX,{}),l=Y9,d=q9;break;case $.Operations_CurrentWorkorders:c=(0,H.jsx)(D9,{}),l=Y9,d=q9,h=!1;break;case $.Operations_Production:c=(0,H.jsx)(Tae,{}),l=Y9,d=q9;break;case $.Operations_Quality:c=(0,H.jsx)(G0,{}),l=Y9,d=q9,h=!1;break;case $.Operations_Inspections:c=(0,H.jsx)(K0,{}),l=Y9,d=q9;break;case $.Operations_CloseoutReport:c=(0,H.jsx)(Aue,{}),l=Y9,d=q9,h=!1;break;case $.Operations_Tools:c=(0,H.jsx)(_3,{}),l=Y9,d=q9;break;case $.Operations_Programs:c=(0,H.jsx)(k3,{}),l=Y9,d=q9;break;case $.Operations_Rebookings:c=(0,H.jsx)(Iue,{}),l=Y9,d=q9;break;case $.Operations_Parts:c=(0,H.jsx)(ude,{}),l=Y9,d=q9,h=!1;break;case $.Engineering_Cycles:c=(0,H.jsx)(_7,{ty:`machine`}),f=!1,l=Q9;break;case $.Engineering_Hours:c=(0,H.jsx)(T6,{ty:`machine`}),f=!1,l=Q9;break;case $.Engineering_Outliers:c=(0,H.jsx)(s6,{outlierTy:`machine`}),f=!1,l=Q9;break;case $.Quality_Dashboard:c=(0,H.jsx)(G0,{}),l=X9,f=!1,h=!1;break;case $.Quality_Paths:c=(0,H.jsx)(K0,{}),l=X9,f=!1;break;case $.Quality_Quarantine:c=(0,H.jsx)(fZ,{displaySystemBins:!1}),l=X9,f=!1,h=!1;break;case $.Tools_Dashboard:c=(0,H.jsx)(_3,{}),l=Z9;break;case $.Tools_Programs:c=(0,H.jsx)(k3,{}),l=Z9;break;case $.Sales_Dashboard:c=(0,H.jsx)(D9,{disableSearch:!0}),l=$9,f=!1;break;case $.Sales_ProjectedUsage:c=(0,H.jsx)(yue,{}),l=$9,f=!1;break;case $.VerboseLogging:c=(0,H.jsx)(Eae,{}),p=!1,f=!1;break;case $.Client_Custom:{let n=e.renderCustomPage?.(i.custom);l=n?.nav,c=n?.page??(0,H.jsx)(JW,{setRoute:a,modes:e.chooseModes?.(t)}),f=!1;break}case $.ChooseMode:default:c=(0,H.jsx)(JW,{setRoute:a,modes:e.chooseModes?.(t)}),p=!1,f=!1}return(0,H.jsxs)(`div`,{id:`App`,children:[(0,H.jsx)(Iae,{showAlarms:f,showSearch:p,showLogout:s,showOperator:m,Nav1:l,Nav2:u,menuNavs:d}),(0,H.jsxs)(`div`,{style:{display:`flex`},children:[(0,H.jsx)(Lae,{menuItems:d}),(0,H.jsx)(`div`,{style:{flexGrow:1},children:c})]}),h?(0,H.jsx)(AW,{}):void 0,(0,H.jsx)(z3,{}),(0,H.jsx)(Kq,{})]})});function _de(e,t,n){let r=_d({palette:{primary:Pr,secondary:Ir}});(0,sre.createRoot)(t).render((0,H.jsxs)(ep,{theme:r,children:[(0,H.jsx)(Xv,{}),(0,H.jsx)(L.StrictMode,{children:(0,H.jsx)(ge,{store:n,children:(0,H.jsx)(gde,{...e})})})]}))}async function vde(e={},t){let n=t??document.getElementById(`root`);if(!n)throw Error(`Unable to start FMS Insight: no root element was provided or found`);Yt();let r=F();r.set(br,await yr()),_de(e,n,r)}async function yde(){await vde({})}yde().catch(e=>{console.log(e);let t=`Error loading Insight`;e instanceof Bt&&(t=`Error loading Insight: `+e.message+` `+e.response);let n=document.createElement(`p`);n.textContent=t,(document.getElementById(`loading`)??document.body).appendChild(n)});
|