diff --git "a/vafront/dist/assets/index-DY9R8Td0.js" "b/vafront/dist/assets/index-DY9R8Td0.js" new file mode 100644--- /dev/null +++ "b/vafront/dist/assets/index-DY9R8Td0.js" @@ -0,0 +1,77 @@ +function Nd(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const i of l.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function Pd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qa={exports:{}},Do={},Ka={exports:{}},V={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Nr=Symbol.for("react.element"),jd=Symbol.for("react.portal"),bd=Symbol.for("react.fragment"),_d=Symbol.for("react.strict_mode"),Ad=Symbol.for("react.profiler"),Td=Symbol.for("react.provider"),Od=Symbol.for("react.context"),Ld=Symbol.for("react.forward_ref"),Rd=Symbol.for("react.suspense"),Md=Symbol.for("react.memo"),zd=Symbol.for("react.lazy"),bs=Symbol.iterator;function Id(e){return e===null||typeof e!="object"?null:(e=bs&&e[bs]||e["@@iterator"],typeof e=="function"?e:null)}var Xa={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ya=Object.assign,Za={};function _n(e,t,n){this.props=e,this.context=t,this.refs=Za,this.updater=n||Xa}_n.prototype.isReactComponent={};_n.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): 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")};_n.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ja(){}Ja.prototype=_n.prototype;function Ri(e,t,n){this.props=e,this.context=t,this.refs=Za,this.updater=n||Xa}var Mi=Ri.prototype=new Ja;Mi.constructor=Ri;Ya(Mi,_n.prototype);Mi.isPureReactComponent=!0;var _s=Array.isArray,qa=Object.prototype.hasOwnProperty,zi={current:null},eu={key:!0,ref:!0,__self:!0,__source:!0};function tu(e,t,n){var r,o={},l=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(l=""+t.key),t)qa.call(t,r)&&!eu.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1>>1,ue=P[J];if(0>>1;Jo(Or,W))Ieo(Rn,Or)?(P[J]=Rn,P[Ie]=W,J=Ie):(P[J]=Or,P[I]=W,J=I);else if(Ieo(Rn,W))P[J]=Rn,P[Ie]=W,J=Ie;else break e}}return F}function o(P,F){var W=P.sortIndex-F.sortIndex;return W!==0?W:P.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var a=[],u=[],p=1,f=null,g=3,y=!1,w=!1,S=!1,_=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(P){for(var F=n(u);F!==null;){if(F.callback===null)r(u);else if(F.startTime<=P)r(u),F.sortIndex=F.expirationTime,t(a,F);else break;F=n(u)}}function x(P){if(S=!1,h(P),!w)if(n(a)!==null)w=!0,$(C);else{var F=n(u);F!==null&&B(x,F.startTime-P)}}function C(P,F){w=!1,S&&(S=!1,m(v),v=-1),y=!0;var W=g;try{for(h(F),f=n(a);f!==null&&(!(f.expirationTime>F)||P&&!T());){var J=f.callback;if(typeof J=="function"){f.callback=null,g=f.priorityLevel;var ue=J(f.expirationTime<=F);F=e.unstable_now(),typeof ue=="function"?f.callback=ue:f===n(a)&&r(a),h(F)}else r(a);f=n(a)}if(f!==null)var Zt=!0;else{var I=n(u);I!==null&&B(x,I.startTime-F),Zt=!1}return Zt}finally{f=null,g=W,y=!1}}var k=!1,A=null,v=-1,b=5,N=-1;function T(){return!(e.unstable_now()-NP||125J?(P.sortIndex=W,t(u,P),n(a)===null&&P===n(u)&&(S?(m(v),v=-1):S=!0,B(x,W-J))):(P.sortIndex=ue,t(a,P),w||y||(w=!0,$(C))),P},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(P){var F=g;return function(){var W=g;g=F;try{return P.apply(this,arguments)}finally{g=W}}}})(su);iu.exports=su;var Xd=iu.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Yd=E,Re=Xd;function j(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dl=Object.prototype.hasOwnProperty,Zd=/^[: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]*$/,Ts={},Os={};function Jd(e){return Dl.call(Os,e)?!0:Dl.call(Ts,e)?!1:Zd.test(e)?Os[e]=!0:(Ts[e]=!0,!1)}function qd(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ef(e,t,n,r){if(t===null||typeof t>"u"||qd(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ne(e,t,n,r,o,l,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=i}var ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ye[e]=new Ne(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ye[t]=new Ne(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ye[e]=new Ne(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ye[e]=new Ne(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ye[e]=new Ne(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ye[e]=new Ne(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ye[e]=new Ne(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ye[e]=new Ne(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ye[e]=new Ne(e,5,!1,e.toLowerCase(),null,!1,!1)});var Di=/[\-:]([a-z])/g;function Fi(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Di,Fi);ye[t]=new Ne(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Di,Fi);ye[t]=new Ne(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Di,Fi);ye[t]=new Ne(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ye[e]=new Ne(e,1,!1,e.toLowerCase(),null,!1,!1)});ye.xlinkHref=new Ne("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ye[e]=new Ne(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ui(e,t,n,r){var o=ye.hasOwnProperty(t)?ye[t]:null;(o!==null?o.type!==0:r||!(2s||o[i]!==l[s]){var a=` +`+o[i].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=i&&0<=s);break}}}finally{ul=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Qn(e):""}function tf(e){switch(e.tag){case 5:return Qn(e.type);case 16:return Qn("Lazy");case 13:return Qn("Suspense");case 19:return Qn("SuspenseList");case 0:case 2:case 15:return e=cl(e.type,!1),e;case 11:return e=cl(e.type.render,!1),e;case 1:return e=cl(e.type,!0),e;default:return""}}function Wl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case rn:return"Fragment";case nn:return"Portal";case Fl:return"Profiler";case Bi:return"StrictMode";case Ul:return"Suspense";case Bl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cu:return(e.displayName||"Context")+".Consumer";case uu:return(e._context.displayName||"Context")+".Provider";case Wi:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Vi:return t=e.displayName||null,t!==null?t:Wl(e.type)||"Memo";case pt:t=e._payload,e=e._init;try{return Wl(e(t))}catch{}}return null}function nf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Wl(t);case 8:return t===Bi?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function _t(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rf(e){var t=fu(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,l.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mr(e){e._valueTracker||(e._valueTracker=rf(e))}function pu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=fu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function uo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Vl(e,t){var n=t.checked;return ne({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Rs(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=_t(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function mu(e,t){t=t.checked,t!=null&&Ui(e,"checked",t,!1)}function Hl(e,t){mu(e,t);var n=_t(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?$l(e,t.type,n):t.hasOwnProperty("defaultValue")&&$l(e,t.type,_t(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ms(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function $l(e,t,n){(t!=="number"||uo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Kn=Array.isArray;function hn(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=zr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function sr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zn={animationIterationCount:!0,aspectRatio:!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,gridArea:!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},of=["Webkit","ms","Moz","O"];Object.keys(Zn).forEach(function(e){of.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zn[t]=Zn[e]})});function vu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Zn.hasOwnProperty(e)&&Zn[e]?(""+t).trim():t+"px"}function xu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=vu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var lf=ne({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Kl(e,t){if(t){if(lf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function Xl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Yl=null;function Hi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zl=null,gn=null,yn=null;function Ds(e){if(e=br(e)){if(typeof Zl!="function")throw Error(j(280));var t=e.stateNode;t&&(t=Vo(t),Zl(e.stateNode,e.type,t))}}function wu(e){gn?yn?yn.push(e):yn=[e]:gn=e}function Su(){if(gn){var e=gn,t=yn;if(yn=gn=null,Ds(e),t)for(e=0;e>>=0,e===0?32:31-(yf(e)/vf|0)|0}var Ir=64,Dr=4194304;function Xn(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function mo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes,i=n&268435455;if(i!==0){var s=i&~o;s!==0?r=Xn(s):(l&=i,l!==0&&(r=Xn(l)))}else i=n&~o,i!==0?r=Xn(i):l!==0&&(r=Xn(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,l=t&-t,o>=l||o===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Pr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ke(t),e[t]=n}function Cf(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=qn),Qs=" ",Ks=!1;function Bu(e,t){switch(e){case"keyup":return Yf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var on=!1;function Jf(e,t){switch(e){case"compositionend":return Wu(t);case"keypress":return t.which!==32?null:(Ks=!0,Qs);case"textInput":return e=t.data,e===Qs&&Ks?null:e;default:return null}}function qf(e,t){if(on)return e==="compositionend"||!Ji&&Bu(e,t)?(e=Fu(),eo=Xi=yt=null,on=!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)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Js(n)}}function Gu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qu(){for(var e=window,t=uo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=uo(e.document)}return t}function qi(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")}function ap(e){var t=Qu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Gu(n.ownerDocument.documentElement,n)){if(r!==null&&qi(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,l=Math.min(r.start,o);r=r.end===void 0?l:Math.min(r.end,o),!e.extend&&l>r&&(o=r,r=l,l=o),o=qs(n,l);var i=qs(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ln=null,ri=null,tr=null,oi=!1;function ea(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;oi||ln==null||ln!==uo(r)||(r=ln,"selectionStart"in r&&qi(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}),tr&&pr(tr,r)||(tr=r,r=yo(ri,"onSelect"),0un||(e.current=ci[un],ci[un]=null,un--)}function X(e,t){un++,ci[un]=e.current,e.current=t}var At={},Se=Ot(At),be=Ot(!1),Wt=At;function Cn(e,t){var n=e.type.contextTypes;if(!n)return At;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},l;for(l in n)o[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function _e(e){return e=e.childContextTypes,e!=null}function xo(){Z(be),Z(Se)}function sa(e,t,n){if(Se.current!==At)throw Error(j(168));X(Se,t),X(be,n)}function nc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(j(108,nf(e)||"Unknown",o));return ne({},n,r)}function wo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||At,Wt=Se.current,X(Se,e),X(be,be.current),!0}function aa(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=nc(e,t,Wt),r.__reactInternalMemoizedMergedChildContext=e,Z(be),Z(Se),X(Se,e)):Z(be),X(be,n)}var rt=null,Ho=!1,kl=!1;function rc(e){rt===null?rt=[e]:rt.push(e)}function wp(e){Ho=!0,rc(e)}function Lt(){if(!kl&&rt!==null){kl=!0;var e=0,t=K;try{var n=rt;for(K=1;e>=i,o-=i,ot=1<<32-Ke(t)+o|n<v?(b=A,A=null):b=A.sibling;var N=g(m,A,h[v],x);if(N===null){A===null&&(A=b);break}e&&A&&N.alternate===null&&t(m,A),d=l(N,d,v),k===null?C=N:k.sibling=N,k=N,A=b}if(v===h.length)return n(m,A),q&&Mt(m,v),C;if(A===null){for(;vv?(b=A,A=null):b=A.sibling;var T=g(m,A,N.value,x);if(T===null){A===null&&(A=b);break}e&&A&&T.alternate===null&&t(m,A),d=l(T,d,v),k===null?C=T:k.sibling=T,k=T,A=b}if(N.done)return n(m,A),q&&Mt(m,v),C;if(A===null){for(;!N.done;v++,N=h.next())N=f(m,N.value,x),N!==null&&(d=l(N,d,v),k===null?C=N:k.sibling=N,k=N);return q&&Mt(m,v),C}for(A=r(m,A);!N.done;v++,N=h.next())N=y(A,m,v,N.value,x),N!==null&&(e&&N.alternate!==null&&A.delete(N.key===null?v:N.key),d=l(N,d,v),k===null?C=N:k.sibling=N,k=N);return e&&A.forEach(function(R){return t(m,R)}),q&&Mt(m,v),C}function _(m,d,h,x){if(typeof h=="object"&&h!==null&&h.type===rn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Rr:e:{for(var C=h.key,k=d;k!==null;){if(k.key===C){if(C=h.type,C===rn){if(k.tag===7){n(m,k.sibling),d=o(k,h.props.children),d.return=m,m=d;break e}}else if(k.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===pt&&da(C)===k.type){n(m,k.sibling),d=o(k,h.props),d.ref=Bn(m,k,h),d.return=m,m=d;break e}n(m,k);break}else t(m,k);k=k.sibling}h.type===rn?(d=Bt(h.props.children,m.mode,x,h.key),d.return=m,m=d):(x=ao(h.type,h.key,h.props,null,m.mode,x),x.ref=Bn(m,d,h),x.return=m,m=x)}return i(m);case nn:e:{for(k=h.key;d!==null;){if(d.key===k)if(d.tag===4&&d.stateNode.containerInfo===h.containerInfo&&d.stateNode.implementation===h.implementation){n(m,d.sibling),d=o(d,h.children||[]),d.return=m,m=d;break e}else{n(m,d);break}else t(m,d);d=d.sibling}d=Ol(h,m.mode,x),d.return=m,m=d}return i(m);case pt:return k=h._init,_(m,d,k(h._payload),x)}if(Kn(h))return w(m,d,h,x);if(zn(h))return S(m,d,h,x);$r(m,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,d!==null&&d.tag===6?(n(m,d.sibling),d=o(d,h),d.return=m,m=d):(n(m,d),d=Tl(h,m.mode,x),d.return=m,m=d),i(m)):n(m,d)}return _}var kn=sc(!0),ac=sc(!1),Eo=Ot(null),ko=null,fn=null,rs=null;function os(){rs=fn=ko=null}function ls(e){var t=Eo.current;Z(Eo),e._currentValue=t}function pi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function xn(e,t){ko=e,rs=fn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(je=!0),e.firstContext=null)}function We(e){var t=e._currentValue;if(rs!==e)if(e={context:e,memoizedValue:t,next:null},fn===null){if(ko===null)throw Error(j(308));fn=e,ko.dependencies={lanes:0,firstContext:e}}else fn=fn.next=e;return t}var Dt=null;function is(e){Dt===null?Dt=[e]:Dt.push(e)}function uc(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,is(t)):(n.next=o.next,o.next=n),t.interleaved=n,ut(e,r)}function ut(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var mt=!1;function ss(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function it(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function kt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,ut(e,n)}return o=r.interleaved,o===null?(t.next=t,is(r)):(t.next=o.next,o.next=t),r.interleaved=t,ut(e,n)}function no(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gi(e,n)}}function fa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?o=l=i:l=l.next=i,n=n.next}while(n!==null);l===null?o=l=t:l=l.next=t}else o=l=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function No(e,t,n,r){var o=e.updateQueue;mt=!1;var l=o.firstBaseUpdate,i=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var a=s,u=a.next;a.next=null,i===null?l=u:i.next=u,i=a;var p=e.alternate;p!==null&&(p=p.updateQueue,s=p.lastBaseUpdate,s!==i&&(s===null?p.firstBaseUpdate=u:s.next=u,p.lastBaseUpdate=a))}if(l!==null){var f=o.baseState;i=0,p=u=a=null,s=l;do{var g=s.lane,y=s.eventTime;if((r&g)===g){p!==null&&(p=p.next={eventTime:y,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var w=e,S=s;switch(g=t,y=n,S.tag){case 1:if(w=S.payload,typeof w=="function"){f=w.call(y,f,g);break e}f=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=S.payload,g=typeof w=="function"?w.call(y,f,g):w,g==null)break e;f=ne({},f,g);break e;case 2:mt=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,g=o.effects,g===null?o.effects=[s]:g.push(s))}else y={eventTime:y,lane:g,tag:s.tag,payload:s.payload,callback:s.callback,next:null},p===null?(u=p=y,a=f):p=p.next=y,i|=g;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;g=s,s=g.next,g.next=null,o.lastBaseUpdate=g,o.shared.pending=null}}while(!0);if(p===null&&(a=f),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=p,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else l===null&&(o.shared.lanes=0);$t|=i,e.lanes=i,e.memoizedState=f}}function pa(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Pl.transition;Pl.transition={};try{e(!1),t()}finally{K=n,Pl.transition=r}}function jc(){return Ve().memoizedState}function kp(e,t,n){var r=Pt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bc(e))_c(t,n);else if(n=uc(e,t,n,r),n!==null){var o=Ee();Xe(n,e,r,o),Ac(n,t,r)}}function Np(e,t,n){var r=Pt(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bc(e))_c(t,o);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var i=t.lastRenderedState,s=l(i,n);if(o.hasEagerState=!0,o.eagerState=s,Ye(s,i)){var a=t.interleaved;a===null?(o.next=o,is(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=uc(e,t,o,r),n!==null&&(o=Ee(),Xe(n,e,r,o),Ac(n,t,r))}}function bc(e){var t=e.alternate;return e===te||t!==null&&t===te}function _c(e,t){nr=jo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ac(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gi(e,n)}}var bo={readContext:We,useCallback:ve,useContext:ve,useEffect:ve,useImperativeHandle:ve,useInsertionEffect:ve,useLayoutEffect:ve,useMemo:ve,useReducer:ve,useRef:ve,useState:ve,useDebugValue:ve,useDeferredValue:ve,useTransition:ve,useMutableSource:ve,useSyncExternalStore:ve,useId:ve,unstable_isNewReconciler:!1},Pp={readContext:We,useCallback:function(e,t){return Je().memoizedState=[e,t===void 0?null:t],e},useContext:We,useEffect:ha,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,oo(4194308,4,Cc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return oo(4194308,4,e,t)},useInsertionEffect:function(e,t){return oo(4,2,e,t)},useMemo:function(e,t){var n=Je();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Je();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=kp.bind(null,te,e),[r.memoizedState,e]},useRef:function(e){var t=Je();return e={current:e},t.memoizedState=e},useState:ma,useDebugValue:hs,useDeferredValue:function(e){return Je().memoizedState=e},useTransition:function(){var e=ma(!1),t=e[0];return e=Ep.bind(null,e[1]),Je().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=te,o=Je();if(q){if(n===void 0)throw Error(j(407));n=n()}else{if(n=t(),me===null)throw Error(j(349));Ht&30||mc(r,t,n)}o.memoizedState=n;var l={value:n,getSnapshot:t};return o.queue=l,ha(gc.bind(null,r,l,e),[e]),r.flags|=2048,Sr(9,hc.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=Je(),t=me.identifierPrefix;if(q){var n=lt,r=ot;n=(r&~(1<<32-Ke(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=xr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[qe]=t,e[gr]=r,Uc(e,t,!1,!1),t.stateNode=e;e:{switch(i=Xl(n,r),n){case"dialog":Y("cancel",e),Y("close",e),o=r;break;case"iframe":case"object":case"embed":Y("load",e),o=r;break;case"video":case"audio":for(o=0;ojn&&(t.flags|=128,r=!0,Wn(l,!1),t.lanes=4194304)}else{if(!r)if(e=Po(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Wn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!q)return xe(t),null}else 2*se()-l.renderingStartTime>jn&&n!==1073741824&&(t.flags|=128,r=!0,Wn(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(n=l.last,n!==null?n.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=se(),t.sibling=null,n=ee.current,X(ee,r?n&1|2:n&1),t):(xe(t),null);case 22:case 23:return Ss(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Te&1073741824&&(xe(t),t.subtreeFlags&6&&(t.flags|=8192)):xe(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function Rp(e,t){switch(ts(t),t.tag){case 1:return _e(t.type)&&xo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nn(),Z(be),Z(Se),cs(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return us(t),null;case 13:if(Z(ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));En()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Z(ee),null;case 4:return Nn(),null;case 10:return ls(t.type._context),null;case 22:case 23:return Ss(),null;case 24:return null;default:return null}}var Qr=!1,we=!1,Mp=typeof WeakSet=="function"?WeakSet:Set,D=null;function pn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){re(e,t,r)}else n.current=null}function Ci(e,t,n){try{n()}catch(r){re(e,t,r)}}var Pa=!1;function zp(e,t){if(li=ho,e=Qu(),qi(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var i=0,s=-1,a=-1,u=0,p=0,f=e,g=null;t:for(;;){for(var y;f!==n||o!==0&&f.nodeType!==3||(s=i+o),f!==l||r!==0&&f.nodeType!==3||(a=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(y=f.firstChild)!==null;)g=f,f=y;for(;;){if(f===e)break t;if(g===n&&++u===o&&(s=i),g===l&&++p===r&&(a=i),(y=f.nextSibling)!==null)break;f=g,g=f.parentNode}f=y}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(ii={focusedElem:e,selectionRange:n},ho=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,_=w.memoizedState,m=t.stateNode,d=m.getSnapshotBeforeUpdate(t.elementType===t.type?S:$e(t.type,S),_);m.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(x){re(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return w=Pa,Pa=!1,w}function rr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var l=o.destroy;o.destroy=void 0,l!==void 0&&Ci(t,n,l)}o=o.next}while(o!==r)}}function Qo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ei(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Vc(e){var t=e.alternate;t!==null&&(e.alternate=null,Vc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[qe],delete t[gr],delete t[ui],delete t[vp],delete t[xp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Hc(e){return e.tag===5||e.tag===3||e.tag===4}function ja(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hc(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ki(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=vo));else if(r!==4&&(e=e.child,e!==null))for(ki(e,t,n),e=e.sibling;e!==null;)ki(e,t,n),e=e.sibling}function Ni(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&&(e=e.child,e!==null))for(Ni(e,t,n),e=e.sibling;e!==null;)Ni(e,t,n),e=e.sibling}var he=null,Ge=!1;function ft(e,t,n){for(n=n.child;n!==null;)$c(e,t,n),n=n.sibling}function $c(e,t,n){if(et&&typeof et.onCommitFiberUnmount=="function")try{et.onCommitFiberUnmount(Fo,n)}catch{}switch(n.tag){case 5:we||pn(n,t);case 6:var r=he,o=Ge;he=null,ft(e,t,n),he=r,Ge=o,he!==null&&(Ge?(e=he,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):he.removeChild(n.stateNode));break;case 18:he!==null&&(Ge?(e=he,n=n.stateNode,e.nodeType===8?El(e.parentNode,n):e.nodeType===1&&El(e,n),dr(e)):El(he,n.stateNode));break;case 4:r=he,o=Ge,he=n.stateNode.containerInfo,Ge=!0,ft(e,t,n),he=r,Ge=o;break;case 0:case 11:case 14:case 15:if(!we&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var l=o,i=l.destroy;l=l.tag,i!==void 0&&(l&2||l&4)&&Ci(n,t,i),o=o.next}while(o!==r)}ft(e,t,n);break;case 1:if(!we&&(pn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){re(n,t,s)}ft(e,t,n);break;case 21:ft(e,t,n);break;case 22:n.mode&1?(we=(r=we)||n.memoizedState!==null,ft(e,t,n),we=r):ft(e,t,n);break;default:ft(e,t,n)}}function ba(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Mp),t.forEach(function(r){var o=$p.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function He(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=i),r&=~l}if(r=o,r=se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Dp(r/1960))-r,10e?16:e,vt===null)var r=!1;else{if(e=vt,vt=null,To=0,G&6)throw Error(j(331));var o=G;for(G|=4,D=e.current;D!==null;){var l=D,i=l.child;if(D.flags&16){var s=l.deletions;if(s!==null){for(var a=0;ase()-xs?Ut(e,0):vs|=n),Ae(e,t)}function qc(e,t){t===0&&(e.mode&1?(t=Dr,Dr<<=1,!(Dr&130023424)&&(Dr=4194304)):t=1);var n=Ee();e=ut(e,t),e!==null&&(Pr(e,t,n),Ae(e,n))}function Hp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qc(e,n)}function $p(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(j(314))}r!==null&&r.delete(t),qc(e,n)}var ed;ed=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||be.current)je=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return je=!1,Op(e,t,n);je=!!(e.flags&131072)}else je=!1,q&&t.flags&1048576&&oc(t,Co,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;lo(e,t),e=t.pendingProps;var o=Cn(t,Se.current);xn(t,n),o=fs(null,t,r,e,o,n);var l=ps();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,_e(r)?(l=!0,wo(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,ss(t),o.updater=Go,t.stateNode=o,o._reactInternals=t,hi(t,r,e,n),t=vi(null,t,r,!0,l,n)):(t.tag=0,q&&l&&es(t),Ce(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(lo(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Qp(r),e=$e(r,e),o){case 0:t=yi(null,t,r,e,n);break e;case 1:t=Ea(null,t,r,e,n);break e;case 11:t=Sa(null,t,r,e,n);break e;case 14:t=Ca(null,t,r,$e(r.type,e),n);break e}throw Error(j(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$e(r,o),yi(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$e(r,o),Ea(e,t,r,o,n);case 3:e:{if(Ic(t),e===null)throw Error(j(387));r=t.pendingProps,l=t.memoizedState,o=l.element,cc(e,t),No(t,r,null,n);var i=t.memoizedState;if(r=i.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){o=Pn(Error(j(423)),t),t=ka(e,t,r,n,o);break e}else if(r!==o){o=Pn(Error(j(424)),t),t=ka(e,t,r,n,o);break e}else for(Oe=Et(t.stateNode.containerInfo.firstChild),Le=t,q=!0,Qe=null,n=ac(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(En(),r===o){t=ct(e,t,n);break e}Ce(e,t,r,n)}t=t.child}return t;case 5:return dc(t),e===null&&fi(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,i=o.children,si(r,o)?i=null:l!==null&&si(r,l)&&(t.flags|=32),zc(e,t),Ce(e,t,i,n),t.child;case 6:return e===null&&fi(t),null;case 13:return Dc(e,t,n);case 4:return as(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=kn(t,null,r,n):Ce(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$e(r,o),Sa(e,t,r,o,n);case 7:return Ce(e,t,t.pendingProps,n),t.child;case 8:return Ce(e,t,t.pendingProps.children,n),t.child;case 12:return Ce(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,l=t.memoizedProps,i=o.value,X(Eo,r._currentValue),r._currentValue=i,l!==null)if(Ye(l.value,i)){if(l.children===o.children&&!be.current){t=ct(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var s=l.dependencies;if(s!==null){i=l.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(l.tag===1){a=it(-1,n&-n),a.tag=2;var u=l.updateQueue;if(u!==null){u=u.shared;var p=u.pending;p===null?a.next=a:(a.next=p.next,p.next=a),u.pending=a}}l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),pi(l.return,n,t),s.lanes|=n;break}a=a.next}}else if(l.tag===10)i=l.type===t.type?null:l.child;else if(l.tag===18){if(i=l.return,i===null)throw Error(j(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),pi(i,n,t),i=l.sibling}else i=l.child;if(i!==null)i.return=l;else for(i=l;i!==null;){if(i===t){i=null;break}if(l=i.sibling,l!==null){l.return=i.return,i=l;break}i=i.return}l=i}Ce(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,xn(t,n),o=We(o),r=r(o),t.flags|=1,Ce(e,t,r,n),t.child;case 14:return r=t.type,o=$e(r,t.pendingProps),o=$e(r.type,o),Ca(e,t,r,o,n);case 15:return Rc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$e(r,o),lo(e,t),t.tag=1,_e(r)?(e=!0,wo(t)):e=!1,xn(t,n),Tc(t,r,o),hi(t,r,o,n),vi(null,t,r,!0,e,n);case 19:return Fc(e,t,n);case 22:return Mc(e,t,n)}throw Error(j(156,t.tag))};function td(e,t){return bu(e,t)}function Gp(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.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 Ue(e,t,n,r){return new Gp(e,t,n,r)}function Es(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qp(e){if(typeof e=="function")return Es(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Wi)return 11;if(e===Vi)return 14}return 2}function jt(e,t){var n=e.alternate;return n===null?(n=Ue(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&14680064,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}function ao(e,t,n,r,o,l){var i=2;if(r=e,typeof e=="function")Es(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case rn:return Bt(n.children,o,l,t);case Bi:i=8,o|=8;break;case Fl:return e=Ue(12,n,t,o|2),e.elementType=Fl,e.lanes=l,e;case Ul:return e=Ue(13,n,t,o),e.elementType=Ul,e.lanes=l,e;case Bl:return e=Ue(19,n,t,o),e.elementType=Bl,e.lanes=l,e;case du:return Xo(n,o,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case uu:i=10;break e;case cu:i=9;break e;case Wi:i=11;break e;case Vi:i=14;break e;case pt:i=16,r=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=Ue(i,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function Bt(e,t,n,r){return e=Ue(7,e,r,t),e.lanes=n,e}function Xo(e,t,n,r){return e=Ue(22,e,r,t),e.elementType=du,e.lanes=n,e.stateNode={isHidden:!1},e}function Tl(e,t,n){return e=Ue(6,e,null,t),e.lanes=n,e}function Ol(e,t,n){return t=Ue(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Kp(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fl(0),this.expirationTimes=fl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fl(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ks(e,t,n,r,o,l,i,s,a){return e=new Kp(e,t,n,s,a),t===1?(t=1,l===!0&&(t|=8)):t=0,l=Ue(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ss(l),e}function Xp(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ld)}catch(e){console.error(e)}}ld(),lu.exports=Me;var e0=lu.exports,za=e0;Il.createRoot=za.createRoot,Il.hydrateRoot=za.hydrateRoot;var fe={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let t0=0;function Xt(e,t){const n=`atom${++t0}`,r={toString:()=>n};return typeof e=="function"?r.read=e:(r.init=e,r.read=n0,r.write=r0),r}function n0(e){return e(this)}function r0(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}const Ll=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,Rl=e=>"init"in e,Ml=e=>!!e.write,Ro=new WeakMap,o0=(e,t)=>{Ro.set(e,t),e.catch(()=>{}).finally(()=>Ro.delete(e))},Ia=(e,t)=>{const n=Ro.get(e);n&&(Ro.delete(e),n(t))},Da=(e,t)=>{e.status="fulfilled",e.value=t},Fa=(e,t)=>{e.status="rejected",e.reason=t},l0=e=>typeof(e==null?void 0:e.then)=="function",Hn=(e,t)=>!!e&&"v"in e&&"v"in t&&Object.is(e.v,t.v),Ua=(e,t)=>!!e&&"e"in e&&"e"in t&&Object.is(e.e,t.e),en=e=>!!e&&"v"in e&&e.v instanceof Promise,i0=(e,t)=>"v"in e&&"v"in t&&e.v.orig&&e.v.orig===t.v.orig,Yr=e=>{if("e"in e)throw e.e;return e.v},s0=()=>{const e=new WeakMap,t=new WeakMap,n=[],r=new WeakMap;let o,l;(fe?"production":void 0)!=="production"&&(o=new Set,l=new Set);const i=v=>e.get(v),s=(v,b)=>{b.d.forEach((N,T)=>{var R;if(!r.has(T)){const O=i(T);(R=n[n.length-1])==null||R.add(T),r.set(T,[O,new Set]),O&&s(T,O)}r.get(T)[1].add(v)})},a=(v,b)=>{var N;(fe?"production":void 0)!=="production"&&Object.freeze(b);const T=i(v);if(e.set(v,b),r.has(v)||((N=n[n.length-1])==null||N.add(v),r.set(v,[T,new Set]),s(v,b)),en(T)){const R="v"in b?b.v instanceof Promise?b.v:Promise.resolve(b.v):Promise.reject(b.e);T.v!==R&&Ia(T.v,R)}},u=(v,b,N,T)=>{const R=new Map(T?b.d:null);let O=!1;N.forEach((z,U)=>{!z&&Ll(v,U)&&(z=b),z?(R.set(U,z),b.d.get(U)!==z&&(O=!0)):(fe?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(O||b.d.size!==R.size)&&(b.d=R)},p=(v,b,N,T)=>{const R=i(v),O={d:(R==null?void 0:R.d)||new Map,v:b};if(N&&u(v,O,N,T),Hn(R,O)&&R.d===O.d)return R;if(en(R)&&en(O)&&i0(R,O)){if(R.d===O.d)return R;O.v=R.v}return a(v,O),O},f=(v,b,N,T)=>{if(l0(b)){let R;const O=()=>{const U=i(v);if(!en(U)||U.v!==z)return;const $=p(v,z,N);t.has(v)&&U.d!==$.d&&C(v,$,U.d)},z=new Promise((U,$)=>{let B=!1;b.then(P=>{B||(B=!0,Da(z,P),U(P),O())},P=>{B||(B=!0,Fa(z,P),$(P),O())}),R=P=>{B||(B=!0,P.then(F=>Da(z,F),F=>Fa(z,F)),U(P))}});return z.orig=b,z.status="pending",o0(z,U=>{U&&R(U),T==null||T()}),p(v,z,N,!0)}return p(v,b,N)},g=(v,b,N)=>{const T=i(v),R={d:(T==null?void 0:T.d)||new Map,e:b};return N&&u(v,R,N),Ua(T,R)&&T.d===R.d?T:(a(v,R),R)},y=(v,b)=>{const N=i(v);if(!b&&N&&(t.has(v)||Array.from(N.d).every(([B,P])=>{if(B===v)return!0;const F=y(B);return F===P||Hn(F,P)})))return N;const T=new Map;let R=!0;const O=B=>{if(Ll(v,B)){const F=i(B);if(F)return T.set(B,F),Yr(F);if(Rl(B))return T.set(B,void 0),B.init;throw new Error("no atom init")}const P=y(B);return T.set(B,P),Yr(P)};let z,U;const $={get signal(){return z||(z=new AbortController),z.signal},get setSelf(){return(fe?"production":void 0)!=="production"&&!Ml(v)&&console.warn("setSelf function cannot be used with read-only atom"),!U&&Ml(v)&&(U=(...B)=>{if((fe?"production":void 0)!=="production"&&R&&console.warn("setSelf function cannot be called in sync"),!R)return m(v,...B)}),U}};try{const B=v.read(O,$);return f(v,B,T,()=>z==null?void 0:z.abort())}catch(B){return g(v,B,T)}finally{R=!1}},w=v=>Yr(y(v)),S=v=>{const b=z=>{var U,$;const B=new Set((U=t.get(z))==null?void 0:U.t);return($=r.get(z))==null||$[1].forEach(P=>{B.add(P)}),B},N=new Array,T=new Set,R=z=>{if(!T.has(z)){T.add(z);for(const U of b(z))z!==U&&R(U);N.push(z)}};R(v);const O=new Set([v]);for(let z=N.length-1;z>=0;--z){const U=N[z],$=i(U);if(!$)continue;let B=!1;for(const P of $.d.keys())if(P!==U&&O.has(P)){B=!0;break}if(B){const P=y(U,!0);Hn($,P)||O.add(U)}}},_=(v,...b)=>{const N=O=>Yr(y(O)),T=(O,...z)=>{const U=n.length>0;U||n.push(new Set([O]));let $;if(Ll(v,O)){if(!Rl(O))throw new Error("atom not writable");const B=i(O),P=f(O,z[0]);Hn(B,P)||S(O)}else $=_(O,...z);if(!U){const B=k(n.pop());(fe?"production":void 0)!=="production"&&o.forEach(P=>P({type:"async-write",flushed:B}))}return $};return v.write(N,T,...b)},m=(v,...b)=>{n.push(new Set([v]));const N=_(v,...b),T=k(n.pop());return(fe?"production":void 0)!=="production"&&o.forEach(R=>R({type:"write",flushed:T})),N},d=(v,b,N)=>{var T;const R=t.get(v);if(R)return b&&R.t.add(b),R;const O=N||[];(T=i(v))==null||T.d.forEach((U,$)=>{$!==v&&d($,v,O)}),y(v);const z={t:new Set(b&&[b]),l:new Set};if(t.set(v,z),(fe?"production":void 0)!=="production"&&l.add(v),Ml(v)&&v.onMount){const{onMount:U}=v;O.push(()=>{const $=U((...B)=>m(v,...B));$&&(z.u=$)})}return N||O.forEach(U=>U()),z},h=(v,b)=>!b.l.size&&(!b.t.size||b.t.size===1&&b.t.has(v)),x=(v,b)=>{if(!h(v,b))return;const N=b.u;N&&N(),t.delete(v),(fe?"production":void 0)!=="production"&&l.delete(v);const T=i(v);T?(en(T)&&Ia(T.v),T.d.forEach((R,O)=>{if(O!==v){const z=t.get(O);z&&(z.t.delete(v),x(O,z))}})):(fe?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",v)},C=(v,b,N)=>{const T=new Set(b.d.keys()),R=new Set;N==null||N.forEach((O,z)=>{if(T.has(z)){T.delete(z);return}R.add(z);const U=t.get(z);U&&U.t.delete(v)}),T.forEach(O=>{d(O,v)}),R.forEach(O=>{const z=t.get(O);z&&x(O,z)})},k=v=>{let b;(fe?"production":void 0)!=="production"&&(b=new Set);const N=[],T=R=>{var O;if(!r.has(R))return;const[z,U]=r.get(R);r.delete(R),N.push([R,z]),U.forEach(T),(O=i(R))==null||O.d.forEach(($,B)=>T(B))};if(v.forEach(T),N.forEach(([R,O])=>{const z=i(R);if(!z){(fe?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush");return}if(z!==O){const U=t.get(R);U&&z.d!==(O==null?void 0:O.d)&&C(R,z,O==null?void 0:O.d),U&&!(!en(O)&&(Hn(O,z)||Ua(O,z)))&&(U.l.forEach($=>$()),(fe?"production":void 0)!=="production"&&b.add(R))}}),(fe?"production":void 0)!=="production")return b},A=(v,b)=>{const N=d(v),T=k([v]),R=N.l;return R.add(b),(fe?"production":void 0)!=="production"&&o.forEach(O=>O({type:"sub",flushed:T})),()=>{R.delete(b),x(v,N),(fe?"production":void 0)!=="production"&&o.forEach(O=>O({type:"unsub"}))}};return(fe?"production":void 0)!=="production"?{get:w,set:m,sub:A,dev_subscribe_store:v=>(o.add(v),()=>{o.delete(v)}),dev_get_mounted_atoms:()=>l.values(),dev_get_atom_state:v=>e.get(v),dev_get_mounted:v=>t.get(v),dev_restore_atoms:v=>{n.push(new Set);for(const[N,T]of v)Rl(N)&&(f(N,T),S(N));const b=k(n.pop());o.forEach(N=>N({type:"restore",flushed:b}))}}:{get:w,set:m,sub:A}};let $n;const a0=()=>($n||($n=s0(),(fe?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=$n),globalThis.__JOTAI_DEFAULT_STORE__!==$n&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),$n),u0=a0;var c0={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const d0=E.createContext(void 0),id=e=>E.useContext(d0)||u0(),f0=e=>typeof(e==null?void 0:e.then)=="function",p0=ru.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)});function m0(e,t){const n=id(),[[r,o,l],i]=E.useReducer(u=>{const p=n.get(e);return Object.is(u[0],p)&&u[1]===n&&u[2]===e?u:[p,n,e]},void 0,()=>[n.get(e),n,e]);let s=r;return(o!==n||l!==e)&&(i(),s=n.get(e)),E.useEffect(()=>{const u=n.sub(e,()=>{i()});return i(),u},[n,e,void 0]),E.useDebugValue(s),f0(s)?p0(s):s}function h0(e,t){const n=id();return E.useCallback((...o)=>{if((c0?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return n.set(e,...o)},[n,e])}function ie(e,t){return[m0(e),h0(e)]}var sd={};/** + * Artyom.js is a voice control, speech recognition and speech synthesis JavaScript library. + * + * @requires {webkitSpeechRecognition && speechSynthesis} + * @license MIT + * @version 1.0.6 + * @copyright 2017 Our Code World (www.ourcodeworld.com) All Rights Reserved. + * @author Carlos Delgado (https://github.com/sdkcarlos) and Sema García (https://github.com/semagarcia) + * @see https://sdkcarlos.github.io/sites/artyom.html + * @see http://docs.ourcodeworld.com/projects/artyom-js + */Object.defineProperty(sd,"__esModule",{value:!0});var g0=function(){function e(){this.ArtyomCommands=[],this.ArtyomVoicesIdentifiers={"de-DE":["Google Deutsch","de-DE","de_DE"],"es-ES":["Google español","es-ES","es_ES","es-MX","es_MX"],"it-IT":["Google italiano","it-IT","it_IT"],"jp-JP":["Google 日本人","ja-JP","ja_JP"],"en-US":["Google US English","en-US","en_US"],"en-GB":["Google UK English Male","Google UK English Female","en-GB","en_GB"],"pt-BR":["Google português do Brasil","pt-PT","pt-BR","pt_PT","pt_BR"],"pt-PT":["Google português do Brasil","pt-PT","pt_PT"],"ru-RU":["Google русский","ru-RU","ru_RU"],"nl-NL":["Google Nederlands","nl-NL","nl_NL"],"fr-FR":["Google français","fr-FR","fr_FR"],"pl-PL":["Google polski","pl-PL","pl_PL"],"id-ID":["Google Bahasa Indonesia","id-ID","id_ID"],"hi-IN":["Google हिन्दी","hi-IN","hi_IN"],"zh-CN":["Google 普通话(中国大陆)","zh-CN","zh_CN"],"zh-HK":["Google 粤語(香港)","zh-HK","zh_HK"],native:["native"]},window.hasOwnProperty("speechSynthesis")?speechSynthesis.getVoices():console.error("Artyom.js can't speak without the Speech Synthesis API."),window.hasOwnProperty("webkitSpeechRecognition")?this.ArtyomWebkitSpeechRecognition=new window.webkitSpeechRecognition:console.error("Artyom.js can't recognize voice without the Speech Recognition API."),this.ArtyomProperties={lang:"en-GB",recognizing:!1,continuous:!1,speed:1,volume:1,listen:!1,mode:"normal",debug:!1,helpers:{redirectRecognizedTextOutput:null,remoteProcessorHandler:null,lastSay:null,fatalityPromiseCallback:null},executionKeyword:null,obeyKeyword:null,speaking:!1,obeying:!0,soundex:!1,name:null},this.ArtyomGarbageCollection=[],this.ArtyomFlags={restartRecognition:!1},this.ArtyomGlobalEvents={ERROR:"ERROR",SPEECH_SYNTHESIS_START:"SPEECH_SYNTHESIS_START",SPEECH_SYNTHESIS_END:"SPEECH_SYNTHESIS_END",TEXT_RECOGNIZED:"TEXT_RECOGNIZED",COMMAND_RECOGNITION_START:"COMMAND_RECOGNITION_START",COMMAND_RECOGNITION_END:"COMMAND_RECOGNITION_END",COMMAND_MATCHED:"COMMAND_MATCHED",NOT_COMMAND_MATCHED:"NOT_COMMAND_MATCHED"},this.Device={isMobile:!1,isChrome:!0},(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i))&&(this.Device.isMobile=!0),navigator.userAgent.indexOf("Chrome")==-1&&(this.Device.isChrome=!1),this.ArtyomVoice={default:!1,lang:"en-GB",localService:!1,name:"Google UK English Male",voiceURI:"Google UK English Male"}}return e.prototype.addCommands=function(t){var n=this,r=function(l){l.hasOwnProperty("indexes")?n.ArtyomCommands.push(l):console.error("The given command doesn't provide any index to execute.")};if(t instanceof Array)for(var o=0;o> "+t);for(var r=0;r> REGEX "+u.toString()+" MATCHED AGAINST "+t+" WITH INDEX "+a+" IN COMMAND ","info"),i=parseInt(a.toString()));else if(u.indexOf("*")!=-1){var p=u.split("*");if(p.length>2){console.warn("Artyom found a smart command with "+(p.length-1)+" wildcards. Artyom only support 1 wildcard for each command. Sorry");continue}var f=p[0],g=p[1];g==""||g==" "?(t.indexOf(f)!=-1||t.toLowerCase().indexOf(f.toLowerCase())!=-1)&&(s=t.replace(f,""),s=s.toLowerCase().replace(f.toLowerCase(),""),i=parseInt(a.toString())):(t.indexOf(f)!=-1||t.toLowerCase().indexOf(f.toLowerCase())!=-1)&&(t.indexOf(g)!=-1||t.toLowerCase().indexOf(g.toLowerCase())!=-1)&&(s=t.replace(f,"").replace(g,""),s=s.toLowerCase().replace(f.toLowerCase(),"").replace(g.toLowerCase(),""),s=s.toLowerCase().replace(g.toLowerCase(),""),i=parseInt(a.toString()))}else console.warn("Founded command marked as SMART but have no wildcard in the indexes, remove the SMART for prevent extensive memory consuming or add the wildcard *");if(i>=0){i=parseInt(a.toString());break}}}if(i>=0){n.triggerEvent(n.ArtyomGlobalEvents.COMMAND_MATCHED);var y={index:i,instruction:o,wildcard:{item:s,full:t}};return y}}for(var r=0;r> MATCHED FULL EXACT OPTION "+u+" AGAINST "+t+" WITH INDEX "+a+" IN COMMAND ","info"),i=parseInt(a.toString());break}else if(t.toLowerCase()===u.toLowerCase()){n.debug(">> MATCHED OPTION CHANGING ALL TO LOWERCASE "+u+" AGAINST "+t+" WITH INDEX "+a+" IN COMMAND ","info"),i=parseInt(a.toString());break}}}if(i>=0){n.triggerEvent(n.ArtyomGlobalEvents.COMMAND_MATCHED);var y={index:i,instruction:o};return y}}for(var r=0;r=0){n.debug(">> MATCHED INDEX EXACT OPTION "+u+" AGAINST "+t+" WITH INDEX "+a+" IN COMMAND ","info"),i=parseInt(a.toString());break}else if(t.toLowerCase().indexOf(u.toLowerCase())>=0){n.debug(">> MATCHED INDEX OPTION CHANGING ALL TO LOWERCASE "+u+" AGAINST "+t+" WITH INDEX "+a+" IN COMMAND ","info"),i=parseInt(a.toString());break}}if(i>=0){n.triggerEvent(n.ArtyomGlobalEvents.COMMAND_MATCHED);var y={index:i,instruction:o};return y}}if(n.ArtyomProperties.soundex)for(var r=0;r> Matched Soundex command '"+u+"' AGAINST '"+t+"' with index "+a,"info"),i=parseInt(a.toString()),n.triggerEvent(n.ArtyomGlobalEvents.COMMAND_MATCHED);var y={index:i,instruction:o};return y}}n.debug("Event reached : "+n.ArtyomGlobalEvents.NOT_COMMAND_MATCHED),n.triggerEvent(n.ArtyomGlobalEvents.NOT_COMMAND_MATCHED)},e.prototype.fatality=function(){var t=this;return new Promise(function(n,r){t.ArtyomProperties.helpers.fatalityPromiseCallback=n;try{t.ArtyomFlags.restartRecognition=!1,t.ArtyomWebkitSpeechRecognition.stop()}catch(o){r(o)}})},e.prototype.getAvailableCommands=function(){return this.ArtyomCommands},e.prototype.getVoices=function(){return window.speechSynthesis.getVoices()},e.prototype.speechSupported=function(){return"speechSynthesis"in window},e.prototype.recognizingSupported=function(){return"webkitSpeechRecognition"in window},e.prototype.shutUp=function(){if("speechSynthesis"in window)do window.speechSynthesis.cancel();while(window.speechSynthesis.pending===!0);this.ArtyomProperties.speaking=!1,this.clearGarbageCollection()},e.prototype.getProperties=function(){return this.ArtyomProperties},e.prototype.getLanguage=function(){return this.ArtyomProperties.lang},e.prototype.getVersion=function(){return"1.0.6"},e.prototype.hey=function(t,n){var r,o,l=this;this.Device.isMobile?(this.ArtyomWebkitSpeechRecognition.continuous=!1,this.ArtyomWebkitSpeechRecognition.interimResults=!1,this.ArtyomWebkitSpeechRecognition.maxAlternatives=1):(this.ArtyomWebkitSpeechRecognition.continuous=!0,this.ArtyomWebkitSpeechRecognition.interimResults=!0),this.ArtyomWebkitSpeechRecognition.lang=this.ArtyomProperties.lang,this.ArtyomWebkitSpeechRecognition.onstart=function(){l.debug("Event reached : "+l.ArtyomGlobalEvents.COMMAND_RECOGNITION_START),l.triggerEvent(l.ArtyomGlobalEvents.COMMAND_RECOGNITION_START),l.ArtyomProperties.recognizing=!0,o=!0,t()},this.ArtyomWebkitSpeechRecognition.onerror=function(s){n(s.error),l.triggerEvent(l.ArtyomGlobalEvents.ERROR,{code:s.error}),s.error=="audio-capture"&&(o=!1),s.error=="not-allowed"&&(o=!1,s.timeStamp-r<100?l.triggerEvent(l.ArtyomGlobalEvents.ERROR,{code:"info-blocked",message:"Artyom needs the permision of the microphone, is blocked."}):l.triggerEvent(l.ArtyomGlobalEvents.ERROR,{code:"info-denied",message:"Artyom needs the permision of the microphone, is denied"}))},l.ArtyomWebkitSpeechRecognition.onend=function(){l.ArtyomFlags.restartRecognition===!0?(o===!0?(l.ArtyomWebkitSpeechRecognition.start(),l.debug("Continuous mode enabled, restarting","info")):console.error("Verify the microphone and check for the table of errors in sdkcarlos.github.io/sites/artyom.html to solve your problem. If you want to give your user a message when an error appears add an artyom listener"),l.triggerEvent(l.ArtyomGlobalEvents.COMMAND_RECOGNITION_END,{code:"continuous_mode_enabled",message:"OnEnd event reached with continuous mode"})):l.ArtyomProperties.helpers.fatalityPromiseCallback&&(setTimeout(function(){l.ArtyomProperties.helpers.fatalityPromiseCallback()},500),l.triggerEvent(l.ArtyomGlobalEvents.COMMAND_RECOGNITION_END,{code:"continuous_mode_disabled",message:"OnEnd event reached without continuous mode"})),l.ArtyomProperties.recognizing=!1};var i;if(l.ArtyomProperties.mode=="normal"&&(i=function(s){if(!l.ArtyomCommands.length){l.debug("No commands to process in normal mode.");return}var a=s.results.length;l.triggerEvent(l.ArtyomGlobalEvents.TEXT_RECOGNIZED);for(var u=s.resultIndex;u>","info"),l.ArtyomWebkitSpeechRecognition.stop(),l.ArtyomProperties.recognizing=!1,f.wildcard?f.instruction.action(f.index,f.wildcard.item,f.wildcard.full):f.instruction.action(f.index);break}}else{if(typeof l.ArtyomProperties.helpers.redirectRecognizedTextOutput=="function"&&l.ArtyomProperties.helpers.redirectRecognizedTextOutput(p,!1),typeof l.ArtyomProperties.executionKeyword=="string"&&p.indexOf(l.ArtyomProperties.executionKeyword)!=-1){var f=l.execute(p.replace(l.ArtyomProperties.executionKeyword,"").trim());if(f&&l.ArtyomProperties.recognizing==!0){l.debug("<< Executing command ordered by ExecutionKeyword >>","info"),l.ArtyomWebkitSpeechRecognition.stop(),l.ArtyomProperties.recognizing=!1,f.wildcard?f.instruction.action(f.index,f.wildcard.item,f.wildcard.full):f.instruction.action(f.index);break}}l.debug("Normal mode : "+p)}}}),l.ArtyomProperties.mode=="quick"&&(i=function(s){if(!l.ArtyomCommands.length){l.debug("No commands to process.");return}var a=s.results.length;l.triggerEvent(l.ArtyomGlobalEvents.TEXT_RECOGNIZED);for(var u=s.resultIndex;u>","info"),l.ArtyomWebkitSpeechRecognition.stop(),l.ArtyomProperties.recognizing=!1,f.wildcard?f.instruction.action(f.index,f.wildcard.item):f.instruction.action(f.index);break}}else{var f=l.execute(p.trim());if(typeof l.ArtyomProperties.helpers.redirectRecognizedTextOutput=="function"&&l.ArtyomProperties.helpers.redirectRecognizedTextOutput(p,!0),f&&l.ArtyomProperties.recognizing==!0){l.debug("<< Executing Matching Recognition in quick mode >>","info"),l.ArtyomWebkitSpeechRecognition.stop(),l.ArtyomProperties.recognizing=!1,f.wildcard?f.instruction.action(f.index,f.wildcard.item):f.instruction.action(f.index);break}}l.debug("Quick mode : "+p)}}),l.ArtyomProperties.mode=="remote"&&(i=function(s){var a=s.results.length;if(l.triggerEvent(l.ArtyomGlobalEvents.TEXT_RECOGNIZED),typeof l.ArtyomProperties.helpers.remoteProcessorHandler!="function")return l.debug("The remoteProcessorService is undefined.","warn");for(var u=s.resultIndex;u-1||a.indexOf(l.ArtyomProperties.obeyKeyword)>-1)&&(l.ArtyomProperties.obeying=!0)}},l.ArtyomProperties.recognizing)l.ArtyomWebkitSpeechRecognition.stop(),l.debug("Event reached : "+l.ArtyomGlobalEvents.COMMAND_RECOGNITION_END),l.triggerEvent(l.ArtyomGlobalEvents.COMMAND_RECOGNITION_END);else try{l.ArtyomWebkitSpeechRecognition.start()}catch{l.triggerEvent(l.ArtyomGlobalEvents.ERROR,{code:"recognition_overlap",message:"A webkitSpeechRecognition instance has been started while there's already running. Is recommendable to restart the Browser"})}},e.prototype.initialize=function(t){var n=this;return typeof t!="object"?Promise.reject("You must give the configuration for start artyom properly."):(t.hasOwnProperty("lang")&&(n.ArtyomVoice=n.getVoice(t.lang),n.ArtyomProperties.lang=t.lang),t.hasOwnProperty("continuous")&&(t.continuous?(this.ArtyomProperties.continuous=!0,this.ArtyomFlags.restartRecognition=!0):(this.ArtyomProperties.continuous=!1,this.ArtyomFlags.restartRecognition=!1)),t.hasOwnProperty("speed")&&(this.ArtyomProperties.speed=t.speed),t.hasOwnProperty("soundex")&&(this.ArtyomProperties.soundex=t.soundex),t.hasOwnProperty("executionKeyword")&&(this.ArtyomProperties.executionKeyword=t.executionKeyword),t.hasOwnProperty("obeyKeyword")&&(this.ArtyomProperties.obeyKeyword=t.obeyKeyword),t.hasOwnProperty("volume")&&(this.ArtyomProperties.volume=t.volume),t.hasOwnProperty("listen")&&(this.ArtyomProperties.listen=t.listen),t.hasOwnProperty("name")&&(this.ArtyomProperties.name=t.name),t.hasOwnProperty("debug")?this.ArtyomProperties.debug=t.debug:console.warn("The initialization doesn't provide how the debug mode should be handled. Is recommendable to set this value either to true or false."),t.mode&&(this.ArtyomProperties.mode=t.mode),this.ArtyomProperties.listen===!0?new Promise(function(r,o){n.hey(r,o)}):Promise.resolve(!0))},e.prototype.on=function(t,n){var r=this;return{then:function(o){var l={indexes:t,action:o};n&&(l.smart=!0),r.addCommands(l)}}},e.prototype.triggerEvent=function(t,n){var r=new CustomEvent(t,{detail:n});return document.dispatchEvent(r),r},e.prototype.repeatLastSay=function(t){var n=this.ArtyomProperties.helpers.lastSay;if(t)return n;n!=null&&this.say(n.text)},e.prototype.when=function(t,n){return document.addEventListener(t,function(r){n(r.detail)},!1)},e.prototype.remoteProcessorService=function(t){return this.ArtyomProperties.helpers.remoteProcessorHandler=t,!0},e.prototype.voiceAvailable=function(t){return typeof this.getVoice(t)<"u"},e.prototype.isObeying=function(){return this.ArtyomProperties.obeying},e.prototype.obey=function(){return this.ArtyomProperties.obeying=!0},e.prototype.dontObey=function(){return this.ArtyomProperties.obeying=!1},e.prototype.isSpeaking=function(){return this.ArtyomProperties.speaking},e.prototype.isRecognizing=function(){return this.ArtyomProperties.recognizing},e.prototype.getNativeApi=function(){return this.ArtyomWebkitSpeechRecognition},e.prototype.getGarbageCollection=function(){return this.ArtyomGarbageCollection},e.prototype.getVoice=function(t){var n=this.ArtyomVoicesIdentifiers[t];n||(console.warn("The providen language "+t+" isn't available, using English Great britain as default"),n=this.ArtyomVoicesIdentifiers["en-GB"]);for(var r=void 0,o=speechSynthesis.getVoices(),l=n.length,i=function(u){var p=o.filter(function(f){return f.name==n[u]||f.lang==n[u]})[0];if(p)return r=p,"break"},s=0;s=r&&i.addEventListener("end",function(){l.ArtyomProperties.speaking=!1,l.debug("Event reached : "+l.ArtyomGlobalEvents.SPEECH_SYNTHESIS_END),l.triggerEvent(l.ArtyomGlobalEvents.SPEECH_SYNTHESIS_END),o&&typeof o.onEnd=="function"&&o.onEnd.call(i)}),this.debug(n+" text chunk processed succesfully out of "+r),this.ArtyomGarbageCollection.push(i),window.speechSynthesis.speak(i)},e.prototype.say=function(t,n){var r=115,o=this,l=[];if(this.speechSupported()){if(typeof t!="string")return console.warn("Artyom expects a string to speak "+typeof t+" given");if(!t.length)return console.warn("Cannot speak empty string");if(t.length>r){var i=t.split(/,|:|\. |;/);i.forEach(function(s,a){if(s.length>r){var u=o.splitStringByChunks(s,r);l.push.apply(l,u)}else l.push(s)})}else l.push(t);l=l.filter(function(s){return s}),l.forEach(function(s,a){var u=a+1;s&&o.talk(s,u,l.length,n)}),o.ArtyomProperties.helpers.lastSay={text:t,date:new Date}}},e}(),y0=sd.default=g0;const v0=Xt([]),ad=Xt([]),ud=Xt(""),el=Xt(new y0),tl=Xt({id:1,name:"",supplierName:"",description:"",image:"",stock:0,widthBefore:0,widthAfter:0,shrinkage:0,created_at:"",updated_at:""}),nl=Xt({GRN:"",quantity:"",fabricDescription:"",itemDescription:"",fabricForm:"",POWidth:0,POUOM:"",PointsUOM:"",Tolarence:20,color:"",buyer:"",supplier:"",item:"",supplierName:"",PCH:"",invoice:"",fabricOdour:"",PO:"",basicUOM:"",Warehouse:"",convFactor:"",created_at:"",updated_at:""}),rl=Xt([]);/** + * @remix-run/router v1.16.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Er(){return Er=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function cd(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function w0(){return Math.random().toString(36).substr(2,8)}function Wa(e,t){return{usr:e.state,key:e.key,idx:t}}function Ai(e,t,n,r){return n===void 0&&(n=null),Er({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?On(t):t,{state:n,key:t&&t.key||r||w0()})}function Mo(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function On(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function S0(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:l=!1}=r,i=o.history,s=xt.Pop,a=null,u=p();u==null&&(u=0,i.replaceState(Er({},i.state,{idx:u}),""));function p(){return(i.state||{idx:null}).idx}function f(){s=xt.Pop;let _=p(),m=_==null?null:_-u;u=_,a&&a({action:s,location:S.location,delta:m})}function g(_,m){s=xt.Push;let d=Ai(S.location,_,m);u=p()+1;let h=Wa(d,u),x=S.createHref(d);try{i.pushState(h,"",x)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;o.location.assign(x)}l&&a&&a({action:s,location:S.location,delta:1})}function y(_,m){s=xt.Replace;let d=Ai(S.location,_,m);u=p();let h=Wa(d,u),x=S.createHref(d);i.replaceState(h,"",x),l&&a&&a({action:s,location:S.location,delta:0})}function w(_){let m=o.location.origin!=="null"?o.location.origin:o.location.href,d=typeof _=="string"?_:Mo(_);return d=d.replace(/ $/,"%20"),oe(m,"No window.location.(origin|href) available to create URL for href: "+d),new URL(d,m)}let S={get action(){return s},get location(){return e(o,i)},listen(_){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(Ba,f),a=_,()=>{o.removeEventListener(Ba,f),a=null}},createHref(_){return t(o,_)},createURL:w,encodeLocation(_){let m=w(_);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:g,replace:y,go(_){return i.go(_)}};return S}var Va;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Va||(Va={}));function C0(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?On(t):t,o=bn(r.pathname||"/",n);if(o==null)return null;let l=dd(e);E0(l);let i=null;for(let s=0;i==null&&s{let a={relativePath:s===void 0?l.path||"":s,caseSensitive:l.caseSensitive===!0,childrenIndex:i,route:l};a.relativePath.startsWith("/")&&(oe(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=bt([r,a.relativePath]),p=n.concat(a);l.children&&l.children.length>0&&(oe(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),dd(l.children,t,p,u)),!(l.path==null&&!l.index)&&t.push({path:u,score:A0(u,l.index),routesMeta:p})};return e.forEach((l,i)=>{var s;if(l.path===""||!((s=l.path)!=null&&s.includes("?")))o(l,i);else for(let a of fd(l.path))o(l,i,a)}),t}function fd(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return o?[l,""]:[l];let i=fd(r.join("/")),s=[];return s.push(...i.map(a=>a===""?l:[l,a].join("/"))),o&&s.push(...i),s.map(a=>e.startsWith("/")&&a===""?"/":a)}function E0(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:T0(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const k0=/^:[\w-]+$/,N0=3,P0=2,j0=1,b0=10,_0=-2,Ha=e=>e==="*";function A0(e,t){let n=e.split("/"),r=n.length;return n.some(Ha)&&(r+=_0),t&&(r+=P0),n.filter(o=>!Ha(o)).reduce((o,l)=>o+(k0.test(l)?N0:l===""?j0:b0),r)}function T0(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function O0(e,t){let{routesMeta:n}=e,r={},o="/",l=[];for(let i=0;i{let{paramName:g,isOptional:y}=p;if(g==="*"){let S=s[f]||"";i=l.slice(0,l.length-S.length).replace(/(.)\/+$/,"$1")}const w=s[f];return y&&!w?u[g]=void 0:u[g]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:l,pathnameBase:i,pattern:e}}function L0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),cd(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,s,a)=>(r.push({paramName:s,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function R0(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return cd(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function bn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function M0(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?On(e):e;return{pathname:n?n.startsWith("/")?n:z0(n,t):t,search:F0(r),hash:U0(o)}}function z0(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function zl(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function I0(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function pd(e,t){let n=I0(e);return t?n.map((r,o)=>o===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function md(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=On(e):(o=Er({},e),oe(!o.pathname||!o.pathname.includes("?"),zl("?","pathname","search",o)),oe(!o.pathname||!o.pathname.includes("#"),zl("#","pathname","hash",o)),oe(!o.search||!o.search.includes("#"),zl("#","search","hash",o)));let l=e===""||o.pathname==="",i=l?"/":o.pathname,s;if(i==null)s=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let g=i.split("/");for(;g[0]==="..";)g.shift(),f-=1;o.pathname=g.join("/")}s=f>=0?t[f]:"/"}let a=M0(o,s),u=i&&i!=="/"&&i.endsWith("/"),p=(l||i===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||p)&&(a.pathname+="/"),a}const bt=e=>e.join("/").replace(/\/\/+/g,"/"),D0=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),F0=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,U0=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function B0(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const hd=["post","put","patch","delete"];new Set(hd);const W0=["get",...hd];new Set(W0);/** + * React Router v6.23.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function kr(){return kr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),E.useCallback(function(u,p){if(p===void 0&&(p={}),!s.current)return;if(typeof u=="number"){r.go(u);return}let f=md(u,JSON.parse(i),l,p.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:bt([t,f.pathname])),(p.replace?r.replace:r.push)(f,p.state,p)},[t,r,i,l,e])}function il(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=E.useContext(Rt),{matches:o}=E.useContext(Yt),{pathname:l}=Tr(),i=JSON.stringify(pd(o,r.v7_relativeSplatPath));return E.useMemo(()=>md(e,JSON.parse(i),l,n==="path"),[e,i,l,n])}function $0(e,t){return G0(e,t)}function G0(e,t,n,r){Ar()||oe(!1);let{navigator:o}=E.useContext(Rt),{matches:l}=E.useContext(Yt),i=l[l.length-1],s=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let u=Tr(),p;if(t){var f;let _=typeof t=="string"?On(t):t;a==="/"||(f=_.pathname)!=null&&f.startsWith(a)||oe(!1),p=_}else p=u;let g=p.pathname||"/",y=g;if(a!=="/"){let _=a.replace(/^\//,"").split("/");y="/"+g.replace(/^\//,"").split("/").slice(_.length).join("/")}let w=C0(e,{pathname:y}),S=Z0(w&&w.map(_=>Object.assign({},_,{params:Object.assign({},s,_.params),pathname:bt([a,o.encodeLocation?o.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?a:bt([a,o.encodeLocation?o.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),l,n,r);return t&&S?E.createElement(ll.Provider,{value:{location:kr({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:xt.Pop}},S):S}function Q0(){let e=tm(),t=B0(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),n?E.createElement("pre",{style:o},n):null,null)}const K0=E.createElement(Q0,null);class X0 extends E.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?E.createElement(Yt.Provider,{value:this.props.routeContext},E.createElement(yd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Y0(e){let{routeContext:t,match:n,children:r}=e,o=E.useContext(ol);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),E.createElement(Yt.Provider,{value:t},r)}function Z0(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var l;if((l=n)!=null&&l.errors)e=n.matches;else return null}let i=e,s=(o=n)==null?void 0:o.errors;if(s!=null){let p=i.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);p>=0||oe(!1),i=i.slice(0,Math.min(i.length,p+1))}let a=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let p=0;p=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((p,f,g)=>{let y,w=!1,S=null,_=null;n&&(y=s&&f.route.id?s[f.route.id]:void 0,S=f.route.errorElement||K0,a&&(u<0&&g===0?(w=!0,_=null):u===g&&(w=!0,_=f.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,g+1)),d=()=>{let h;return y?h=S:w?h=_:f.route.Component?h=E.createElement(f.route.Component,null):f.route.element?h=f.route.element:h=p,E.createElement(Y0,{match:f,routeContext:{outlet:p,matches:m,isDataRoute:n!=null},children:h})};return n&&(f.route.ErrorBoundary||f.route.errorElement||g===0)?E.createElement(X0,{location:n.location,revalidation:n.revalidation,component:S,error:y,children:d(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):d()},null)}var xd=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(xd||{}),zo=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(zo||{});function J0(e){let t=E.useContext(ol);return t||oe(!1),t}function q0(e){let t=E.useContext(gd);return t||oe(!1),t}function em(e){let t=E.useContext(Yt);return t||oe(!1),t}function wd(e){let t=em(),n=t.matches[t.matches.length-1];return n.route.id||oe(!1),n.route.id}function tm(){var e;let t=E.useContext(yd),n=q0(zo.UseRouteError),r=wd(zo.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function nm(){let{router:e}=J0(xd.UseNavigateStable),t=wd(zo.UseNavigateStable),n=E.useRef(!1);return vd(()=>{n.current=!0}),E.useCallback(function(o,l){l===void 0&&(l={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,kr({fromRouteId:t},l)))},[e,t])}function tn(e){oe(!1)}function rm(e){let{basename:t="/",children:n=null,location:r,navigationType:o=xt.Pop,navigator:l,static:i=!1,future:s}=e;Ar()&&oe(!1);let a=t.replace(/^\/*/,"/"),u=E.useMemo(()=>({basename:a,navigator:l,static:i,future:kr({v7_relativeSplatPath:!1},s)}),[a,s,l,i]);typeof r=="string"&&(r=On(r));let{pathname:p="/",search:f="",hash:g="",state:y=null,key:w="default"}=r,S=E.useMemo(()=>{let _=bn(p,a);return _==null?null:{location:{pathname:_,search:f,hash:g,state:y,key:w},navigationType:o}},[a,p,f,g,y,w,o]);return S==null?null:E.createElement(Rt.Provider,{value:u},E.createElement(ll.Provider,{children:n,value:S}))}function om(e){let{children:t,location:n}=e;return $0(Oi(t),n)}new Promise(()=>{});function Oi(e,t){t===void 0&&(t=[]);let n=[];return E.Children.forEach(e,(r,o)=>{if(!E.isValidElement(r))return;let l=[...t,o];if(r.type===E.Fragment){n.push.apply(n,Oi(r.props.children,l));return}r.type!==tn&&oe(!1),!r.props.index||!r.props.children||oe(!1);let i={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=Oi(r.props.children,l)),n.push(i)}),n}/** + * React Router DOM v6.23.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Io(){return Io=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function lm(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function im(e,t){return e.button===0&&(!t||t==="_self")&&!lm(e)}const sm=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],am=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],um="6";try{window.__reactRouterVersion=um}catch{}const cm=E.createContext({isTransitioning:!1}),dm="startTransition",$a=Wd[dm];function fm(e){let{basename:t,children:n,future:r,window:o}=e,l=E.useRef();l.current==null&&(l.current=x0({window:o,v5Compat:!0}));let i=l.current,[s,a]=E.useState({action:i.action,location:i.location}),{v7_startTransition:u}=r||{},p=E.useCallback(f=>{u&&$a?$a(()=>a(f)):a(f)},[a,u]);return E.useLayoutEffect(()=>i.listen(p),[i,p]),E.createElement(rm,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:i,future:r})}const pm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hm=E.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:l,replace:i,state:s,target:a,to:u,preventScrollReset:p,unstable_viewTransition:f}=t,g=Sd(t,sm),{basename:y}=E.useContext(Rt),w,S=!1;if(typeof u=="string"&&mm.test(u)&&(w=u,pm))try{let h=new URL(window.location.href),x=u.startsWith("//")?new URL(h.protocol+u):new URL(u),C=bn(x.pathname,y);x.origin===h.origin&&C!=null?u=C+x.search+x.hash:S=!0}catch{}let _=V0(u,{relative:o}),m=ym(u,{replace:i,state:s,target:a,preventScrollReset:p,relative:o,unstable_viewTransition:f});function d(h){r&&r(h),h.defaultPrevented||m(h)}return E.createElement("a",Io({},g,{href:w||_,onClick:S||l?r:d,ref:n,target:a}))}),Gn=E.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:l="",end:i=!1,style:s,to:a,unstable_viewTransition:u,children:p}=t,f=Sd(t,am),g=il(a,{relative:f.relative}),y=Tr(),w=E.useContext(gd),{navigator:S,basename:_}=E.useContext(Rt),m=w!=null&&vm(g)&&u===!0,d=S.encodeLocation?S.encodeLocation(g).pathname:g.pathname,h=y.pathname,x=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;o||(h=h.toLowerCase(),x=x?x.toLowerCase():null,d=d.toLowerCase()),x&&_&&(x=bn(x,_)||x);const C=d!=="/"&&d.endsWith("/")?d.length-1:d.length;let k=h===d||!i&&h.startsWith(d)&&h.charAt(C)==="/",A=x!=null&&(x===d||!i&&x.startsWith(d)&&x.charAt(d.length)==="/"),v={isActive:k,isPending:A,isTransitioning:m},b=k?r:void 0,N;typeof l=="function"?N=l(v):N=[l,k?"active":null,A?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let T=typeof s=="function"?s(v):s;return E.createElement(hm,Io({},f,{"aria-current":b,className:N,ref:n,style:T,to:a,unstable_viewTransition:u}),typeof p=="function"?p(v):p)});var Li;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Li||(Li={}));var Ga;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ga||(Ga={}));function gm(e){let t=E.useContext(ol);return t||oe(!1),t}function ym(e,t){let{target:n,replace:r,state:o,preventScrollReset:l,relative:i,unstable_viewTransition:s}=t===void 0?{}:t,a=Ln(),u=Tr(),p=il(e,{relative:i});return E.useCallback(f=>{if(im(f,n)){f.preventDefault();let g=r!==void 0?r:Mo(u)===Mo(p);a(e,{replace:g,state:o,preventScrollReset:l,relative:i,unstable_viewTransition:s})}},[u,a,p,r,o,n,e,l,i,s])}function vm(e,t){t===void 0&&(t={});let n=E.useContext(cm);n==null&&oe(!1);let{basename:r}=gm(Li.useViewTransitionState),o=il(e,{relative:t.relative});if(!n.isTransitioning)return!1;let l=bn(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=bn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ti(o.pathname,i)!=null||Ti(o.pathname,l)!=null}function xm(){const[e,t]=ie(el),[n,r]=E.useState([]),[o,l]=E.useState(!1),[i,s]=E.useState(!1),[a,u]=E.useState(!1);return E.useEffect(()=>{var y,w,S,_;let p=[],f=[],g=e==null?void 0:e.getAvailableCommands();for(let m=0;m{l(e==null?void 0:e.isRecognizing()),s(e==null?void 0:e.isSpeaking())},1e3)},[e,a]),c.jsxs("div",{className:"h-16 w-full relative z-50",children:[c.jsx("div",{className:"h-full max-w-full rounded-none px-8 pl-4 py-1",children:c.jsxs("div",{className:"flex items-center justify-between text-primary-400",children:[c.jsx(Gn,{to:"/",className:"cursor-pointer w-48 h-full font-medium",children:c.jsxs("svg",{viewBox:"0 0 370.185 62.836",className:"h-full w-auto text-primary-900",xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("path",{fill:"currentColor",d:"M43.192 22.554c.705-4.174 1.102-8.074 1.149-11.46.063-4.577-.488-10.2-3.472-11.004a2.6 2.6 0 0 0-1.094-.06 3 3 0 0 0-.392-.03c-3.562 0-7.798 6.72-11.27 15.022-6.215-5.278-11.757-8.507-15.036-8.507-.917 0-1.66.249-2.206.74-2.7 2.422.358 9.623 5.356 17.185C6.856 26.267-.171 29.222.003 32.77c.238 4.867 13.725 7.11 26.312 7.158a2.66 2.66 0 0 0 2.313 1.356c1.463 0 2.653-1.19 2.653-2.654s-1.19-2.654-2.653-2.654a2.66 2.66 0 0 0-2.543 1.897c-11.14-.084-20.396-1.787-23.68-4.372-.005-.005-.564-.484-.577-1.087-.007-.355.185-.71.571-1.055l.02-.02c2.668-2.056 8.139-3.861 15.025-5.103a106 106 0 0 0 4.724 6.272.48.48 0 0 0 .667.074l.861-.676a.48.48 0 0 0 .077-.677 106 106 0 0 1-4.078-5.37c3.779-.588 7.907-1.01 12.188-1.22q1.623-.08 3.243-.12a125 125 0 0 1 3.92 4.347q-.468 2.013-1.019 4.062a134 134 0 0 1-1.314 4.562q-1.522.122-3.079.205a.48.48 0 0 0-.354.19l-.856 1.127a.479.479 0 0 0 .405.768q1.624-.08 3.22-.199c-4.08 12.503-8.967 20.735-11.797 21.496a1.3 1.3 0 0 1-.305-.152c-.644-.437-.793-1.456-.793-1.465a.476.476 0 0 0-.474-.415h-.002a.48.48 0 0 0-.397.224.48.48 0 0 0-.4-.224.48.48 0 0 0-.474.418c-.256 2.04 1.048 3.035 1.8 3.284a2.6 2.6 0 0 0 1.086.057q.197.03.4.032c4.128 0 9.992-9.78 14.389-23.518 2.554-.254 5.02-.583 7.352-.978 4.765 6.83 7.57 12.689 7 15.234-.114.517-.371.852-.783 1.025a1.5 1.5 0 0 1-.58.107 2.9 2.9 0 0 1-1.08-.24.478.478 0 0 0-.514.797c.652.55 1.35.83 2.074.83a2.8 2.8 0 0 0 1.66-.55c2.665-2.391-.253-9.567-5.636-17.596 2.474-.482 4.773-1.041 6.83-1.673 4.375-1.343 9.558-3.593 9.407-6.68-.21-4.265-10.588-6.515-21.62-7.04M40.678 2.803l.012.024c1.34 3.728 1.161 11.038-.334 19.63a106 106 0 0 0-2.264-.024c-.696 0-1.404.014-2.11.026a114 114 0 0 0-5.643-5.485c3.011-7.443 6.363-12.983 9.096-14.821.004-.003.196-.12.467-.197.318.118.575.397.776.847M29.549 18.994a113 113 0 0 1 3.664 3.545c-.41.016-.817.025-1.227.045-1.269.062-2.542.148-3.807.25q.665-1.982 1.37-3.84m8.76 5.484q.844.001 1.673.013-.183.939-.384 1.893-.324-.368-.652-.734a128 128 0 0 0-1.06-1.166c.14 0 .283-.006.423-.006m2.44 9.177q.283-1.055.545-2.105a118 118 0 0 1 3.838 4.968c-1.732.268-3.539.501-5.399.695q.526-1.743 1.016-3.558M13.503 8.226c3.355.791 8.359 4.026 13.81 8.764a108 108 0 0 0-2.19 6.13 110 110 0 0 0-6.687.918c-4.09-6.065-6.57-11.374-6.618-14.455.005-.233.086-1.391 1.28-1.391q.178 0 .38.032zm48.442 23.186-.06.034c-2.873 1.9-8.099 3.55-14.545 4.704a112 112 0 0 0-5.446-7.088 118 118 0 0 0 .941-4.499c10.3.39 18.246 2.105 19.994 4.434.3.4.386.796.265 1.21-.216.749-1.141 1.201-1.149 1.205"}),c.jsx("path",{fill:"currentColor",d:"M112.545 13.17h5.581l-13.82 37.597h-5.535L85.001 13.17h5.553l11.01 31.109zm22.919 38.103c-7.683 0-13.477-5.238-13.477-13.695 0-8.426 5.74-13.667 13.477-13.667s13.455 5.24 13.455 13.667c0 8.457-5.745 13.695-13.455 13.695m-.054-4.201c4.813 0 8.456-3.725 8.456-9.494 0-5.745-3.643-9.464-8.454-9.464-4.759 0-8.35 3.722-8.35 9.464 0 5.772 3.591 9.494 8.35 9.494m23.08-28.451c-1.808 0-3.349-1.49-3.349-3.322s1.541-3.3 3.349-3.3c1.783 0 3.297 1.465 3.297 3.297s-1.514 3.325-3.294 3.325m-2.611 32.146V24.444h5.132v26.323zm25.366.479c-7.658 0-13.321-5.45-13.321-13.668s5.663-13.667 13.321-13.667c5.955 0 10.635 3.245 12.203 8.88l-4.759.72c-1.17-3.51-4.013-5.397-7.498-5.397-4.68 0-8.162 3.722-8.162 9.464 0 5.718 3.485 9.467 8.162 9.467 3.485 0 6.327-1.887 7.498-5.396l4.76.716c-1.569 5.608-6.328 8.88-12.204 8.88m42.117-14.144-.082 1.356h-20.392c.185 5.82 3.855 8.638 8.217 8.638 3.136 0 5.742-1.701 7.07-4.546l4.629.904c-1.863 4.892-6.303 7.819-11.648 7.819-7.814 0-13.267-5.053-13.267-13.668s5.584-13.694 13.11-13.694c7.152 0 12.336 4.31 12.36 13.19zm-12.34-9.306c-4.067 0-7.124 2.178-7.922 6.78h15.13c-.428-4.575-3.325-6.78-7.207-6.78m44.775 22.97-3.137-8.774h-16.804l-3.136 8.775h-5.506l13.853-37.597h6.382l13.853 37.597zm-18.291-13.4h13.504l-6.752-18.958zm38.313 13.907c-5.636 0-9.864-2.5-10.69-7.313l4.387-1.25c.64 3.137 3.033 4.787 6.276 4.787 2.447 0 5.077-.931 4.998-3.828-.081-3.112-3.643-3.619-7.868-4.92-3.591-1.09-7.074-2.578-7.074-7.259 0-5.21 4.28-7.525 9.464-7.525 4.841 0 8.909 2.047 9.758 6.888l-4.12 1.008c-.639-3.003-2.978-4.253-5.608-4.253-2.341 0-4.762.958-4.762 3.512 0 2.764 3.112 3.403 6.488 4.28 4.122 1.035 8.67 2.5 8.67 8.056 0 5.663-4.708 7.814-9.92 7.814zm25.34 0c-5.637 0-9.865-2.5-10.69-7.313l4.386-1.25c.637 3.137 3.03 4.787 6.276 4.787 2.445 0 5.078-.931 4.999-3.828-.082-3.112-3.643-3.619-7.869-4.92-3.593-1.09-7.076-2.578-7.076-7.259 0-5.21 4.283-7.525 9.467-7.525 4.838 0 8.908 2.047 9.758 6.888l-4.122 1.008c-.637-3.003-2.976-4.253-5.609-4.253-2.341 0-4.76.958-4.76 3.512 0 2.764 3.11 3.403 6.489 4.28 4.12 1.035 8.666 2.5 8.666 8.056 0 5.663-4.705 7.814-9.916 7.814zm19.46-32.652c-1.807 0-3.348-1.49-3.348-3.322s1.54-3.3 3.349-3.3c1.78 0 3.297 1.465 3.297 3.297s-1.517 3.325-3.295 3.325m-2.608 32.146V24.444h5.132v26.323zm22.761.506c-5.636 0-9.867-2.5-10.689-7.313l4.384-1.25c.64 3.137 3.033 4.787 6.278 4.787 2.445 0 5.078-.931 4.999-3.828-.082-3.112-3.643-3.619-7.871-4.92-3.591-1.09-7.074-2.578-7.074-7.259 0-5.21 4.28-7.525 9.467-7.525 4.838 0 8.906 2.047 9.758 6.888l-4.122 1.008c-.637-3.003-2.979-4.253-5.609-4.253-2.341 0-4.76.958-4.76 3.512 0 2.764 3.11 3.403 6.486 4.28 4.122 1.035 8.67 2.5 8.67 8.056 0 5.663-4.708 7.814-9.92 7.814zm25.498-.506c-4.44 0-7.18-2.66-7.18-7.338V28.46h-5.372v-4.016h1.942c2.739 0 3.855-1.143 3.855-4.2v-4.545h4.707v8.748h5.955v4.016h-5.955v14.435c0 2.527 1.462 3.855 3.534 3.855h2.423v4.014z"})]})}),c.jsx("div",{className:"flex items-center gap-4",children:c.jsx("div",{className:"mr-4",children:c.jsxs("div",{className:"mt-2 mb-4 flex flex-row items-center gap-3",children:[c.jsx(Gn,{to:"/",className:({isActive:p})=>p?"text-white bg-gradient-to-tr from-primary-900 to-primary-700 p-2 px-4 rounded-lg":"text-primary-900 p-2 px-4",children:"Home"}),c.jsx(Gn,{to:"/grn",className:({isActive:p})=>p?"text-white bg-gradient-to-tr from-primary-900 to-primary-700 p-2 px-4 rounded-lg":"text-primary-900 p-2 px-4",children:"GRN Detail"}),c.jsx(Gn,{to:"/roll",className:({isActive:p})=>p?"text-white bg-gradient-to-tr from-primary-900 to-primary-700 p-2 px-4 rounded-lg":"text-primary-900 p-2 px-4",children:"Roll Detail"}),c.jsx(Gn,{to:"/transcribe",className:({isActive:p})=>p?"text-white bg-gradient-to-tr from-primary-900 to-primary-700 p-2 px-4 rounded-lg":"text-primary-900 p-2 px-4",children:"Transcribe"}),i?c.jsxs("svg",{className:"h-7 w-7 animate-pulse text-green-500 ",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 87.459 87.459",xmlSpace:"preserve",children:[c.jsx("path",{fill:"currentColor",d:"M37.44 73.283H7.694V55.66A23.82 23.82 0 0 1 0 38.09c0-13.186 10.728-23.913 23.913-23.913 10.765 0 20.254 7.251 23.074 17.634l.088.32.178 3.921 7.217 10.12-6.344 4.608v3.524c0 4.244-3.453 7.698-7.7 7.698h-2.985zm-23.746-6H31.44V56.004h8.985c.938 0 1.7-.763 1.7-1.699v-6.58l4.006-2.91-4.794-6.72-.227-5.016c-2.214-7.612-9.241-12.9-17.198-12.9-9.877 0-17.913 8.036-17.913 17.913 0 5.4 2.402 10.458 6.591 13.877l1.103.9zm47.458-10.311L56.91 52.73c2.706-2.707 2.706-7.111-.001-9.819l4.244-4.242c5.045 5.046 5.045 13.258-.001 18.303"}),c.jsx("path",{fill:"currentColor",d:"m69.251 63.361-4.242-4.242c6.229-6.229 6.229-16.366 0-22.596l4.242-4.242c8.567 8.569 8.567 22.512 0 31.08"}),c.jsx("path",{fill:"currentColor",d:"m78.555 69.351-4.244-4.242c9.531-9.533 9.531-25.043.002-34.575l4.242-4.242c11.872 11.869 11.872 31.186 0 43.059"})]}):c.jsx("svg",{title:"Voice Recognition "+(o?"Working":"Stopped"),className:"h-7 w-7 animate-pulse "+(o?"text-green-500 ":"text-red-500"),viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{fill:"currentColor",d:"M0 12C0 5.373 5.373 0 12 0s12 5.373 12 12-5.373 12-12 12C5.376 23.992.008 18.624 0 12.001zm2.4 0c0 5.302 4.298 9.6 9.6 9.6s9.6-4.298 9.6-9.6-4.298-9.6-9.6-9.6c-5.299.006-9.594 4.301-9.6 9.599zm4 0a5.6 5.6 0 1 1 11.2 0 5.6 5.6 0 0 1-11.2 0"})}),c.jsx("svg",{onClick:()=>{u(!a)},className:"h-7 w-auto border-2 border-primary-700 text-primary-700 hover:scale-110 transition-all cursor-pointer rounded-full p-1",viewBox:"-6.5 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{fill:"currentColor",d:"M8.436.006a2.24 2.24 0 0 1 2.408 2.354v-.006a3.156 3.156 0 0 1-3.151 3.01l-.065-.001h.003a2.15 2.15 0 0 1-2.367-2.398l-.001.01A3.087 3.087 0 0 1 8.44.004h-.005zM3.489 24c-1.268 0-2.199-.783-1.311-4.226l1.456-6.108c.254-.978.295-1.369 0-1.369a9.6 9.6 0 0 0-3.035 1.359l.033-.021-.633-1.057c3.086-2.622 6.638-4.159 8.158-4.159 1.268 0 1.48 1.526.845 3.874l-1.666 6.421c-.296 1.135-.168 1.526.126 1.526a6.55 6.55 0 0 0 2.863-1.456l-.008.007.72.979c-3.004 3.052-6.281 4.232-7.549 4.232z"})})]})})})]})}),c.jsx("div",{onMouseLeave:()=>{u(!1)},className:"absolute top-100 right-10 overflow-y-auto overflow-x-clip custom-scrollbar bg-white border border-t-0 border-primary-950 rounded-b-xl w-fit h-fit max-h-96 shadow-lg origin-top transition-all "+(a?"scale-y-100":"scale-y-0"),children:n==null?void 0:n.map((p,f)=>{var g;return c.jsxs("p",{className:"p-1 pr-4 pl-2 hover:text-primary-950 cursor-pointer hover:scale-105 origin-left text-primary-900 font-semibold whitespace-nowrap",children:[">> ",(g=p==null?void 0:p.indexes)==null?void 0:g.join(", ")]},f)})})]})}function wm({roll:e,index:t}){const[n,r]=ie(tl),o=Ln();return c.jsx("div",{onClick:()=>{r(e),o("/roll")},className:"relative hover:scale-90 cursor-pointer hover:brightness-105 transition-all rounded-xl bg-gray-100 shadow-inner text-primary-700 border border-primary-950/50 mx-0 flex items-center ",children:c.jsxs("div",{className:"flex w-full flex-col gap-0.5 py-2 px-3",children:[c.jsx("div",{className:"flex flex-wrap items-center justify-between",children:c.jsxs("h5",{className:"text-sm font-semibold whitespace-nowrap text-primary-950",children:["RollNo : ",e==null?void 0:e.name]})}),c.jsxs("p",{className:"text-sm text-primary-900 truncate",children:["minWidth : ",e==null?void 0:e.minWidth]}),c.jsxs("p",{className:"text-sm text-primary-900 truncate",children:["rLength : ",e==null?void 0:e.rLength]})]})},t)}function Sm(){return c.jsxs("div",{className:"flex flex-col gap-10 items-center justify-center w-full h-full opacity-80",children:[c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 820.615 714.558",className:"w-[50%] h-[50%]",children:[c.jsx("path",{d:"M519.033 169.224h-3.912V62.037A62.037 62.037 0 0 0 453.084 0h-227.09a62.037 62.037 0 0 0-62.037 62.037v588.035a62.037 62.037 0 0 0 62.037 62.036h227.09a62.037 62.037 0 0 0 62.037-62.036V245.52h3.912Z",fill:"#3f3d56"}),c.jsx("path",{fill:"#3f3d56",d:"M.244 682.871h718v2h-718z"}),c.jsx("path",{d:"M455.587 16.14h-29.643a22.01 22.01 0 0 1-20.378 30.323H275.469A22.01 22.01 0 0 1 255.09 16.14h-27.686a46.33 46.33 0 0 0-46.329 46.328V649.64a46.33 46.33 0 0 0 46.329 46.329h228.183a46.33 46.33 0 0 0 46.328-46.329V62.468a46.33 46.33 0 0 0-46.328-46.328",opacity:.2}),c.jsx("path",{d:"m71.563 684.765-1.074-.402c-.236-.09-23.708-9.082-34.704-29.474s-5.612-44.945-5.556-45.19l.253-1.118 1.073.402c.236.089 23.708 9.082 34.704 29.474s5.612 44.945 5.556 45.19ZM37.546 653.94c9.296 17.241 27.845 26.079 32.545 28.097.893-5.037 3.696-25.407-5.592-42.631-9.288-17.223-27.844-26.074-32.545-28.097-.894 5.04-3.696 25.407 5.592 42.63",fill:"#3f3d56"}),c.jsx("path",{d:"M44.188 647.736c19.76 11.889 27.371 35.503 27.371 35.503s-24.427 4.339-44.188-7.55S0 640.186 0 640.186s24.428-4.339 44.188 7.55m194.479-417.849h43.962v10.583h-43.962zm180.731 0h15.468v10.583h-15.468zm30.936 0h15.468v10.583h-15.468zm-152.237 0h105.019v10.583H298.097zm65.942 68.385h15.468v10.583h-15.468zm30.936 0h15.468v10.583h-15.468zm-152.237 0h105.019v10.583H242.738zm122.115-44.776h43.962v10.583h-43.962zm59.43 0h43.962v10.583h-43.962zm-210.039 0h15.468v10.583h-15.468zm30.936 0h105.019v10.583H245.18zm72.454 33.378h-43.962v-10.583h43.962zm-59.429 0h-43.962v-10.583h43.962zm210.04 0h-15.468v-10.583h15.468zm-30.937 0H332.289v-10.583h105.019z",fill:"#285c7c"}),c.jsx("circle",{cx:341.495,cy:453.871,r:40,fill:"#285c7c"}),c.jsx("path",{d:"M599.414 217.483c-11.607-19.612-34.57-20.526-34.57-20.526s-22.377-2.861-36.731 27.008c-13.38 27.841-31.845 54.722-2.973 61.24l5.215-16.232 3.23 17.44a113 113 0 0 0 12.353.21c30.92-.997 60.366.293 59.418-10.802-1.26-14.75 5.226-39.467-5.942-58.338",fill:"#2f2e41"}),c.jsx("path",{d:"M557.615 254.417s15 21 6 38 21 35 21 35l22-48s-26-17-19-33Z",fill:"#fbbebe"}),c.jsx("circle",{cx:567.615,cy:237.417,r:26,fill:"#fbbebe"}),c.jsx("path",{d:"m477.635 267.473 21.728-28.034s7.65-29.384 18.732-27.895-4.377 35.24-4.377 35.24l-21.59 31.03Zm109.98 372.944 7 37 15 4-4-44zm151-40 27 37 11 5 9-15-27-35z",fill:"#fbbebe"}),c.jsx("path",{d:"m581.615 311.417-16.681-21.96s-32.32 5.96-35.32 8.96 8 58 8 58 2 15 11 23l9 6 74-15 2.783-32.926a86.4 86.4 0 0 0-22.782-66.074l-12.876 1.76Z",fill:"#575a89"}),c.jsx("path",{d:"m533.615 300.417-5-2-23-2s-8-2-6-6 4-5 0-6-5-2-4-5 7-9 7-9l-17-14s-.92.651-2.408 1.855c-8.44 6.834-35.147 31.49-15.592 56.145 23 29 50 46 72 40Z",fill:"#575a89"}),c.jsx("path",{d:"M555.615 380.417v14s-9 17-6 33 4 24 4 24a136.5 136.5 0 0 0 7 40c7 20-16 151 13 153s45 4 54-6-15-182-15-182 82 171 99 164 60-23 55-32-131-209-131-209l-4-9Zm48 290s-16-1-16 4-8 22-8 22-6 20 10 18 26-20 26-20l-4-19Zm167-35s-14-9-13-3 2 22 9 23 28 7 29 9 25 10 25-3-15-23-15-23l-17-13s-11-1-13 6-5 4-5 4",fill:"#2f2e41"}),c.jsx("circle",{cx:567.654,cy:197.057,r:16.604,fill:"#2f2e41"}),c.jsx("path",{d:"M549.303 192.687a16.604 16.604 0 0 1 14.856-16.51 16.604 16.604 0 1 0 0 33.02 16.604 16.604 0 0 1-14.856-16.51",fill:"#2f2e41"}),c.jsx("path",{fill:"#2f2e41",d:"m594.282 215.593-22.686-11.884-31.33 4.862-6.481 28.628 16.135-.62 4.508-10.518v10.344l7.445-.286 4.321-16.745 2.701 17.825 26.468-.54z"}),c.jsx("path",{d:"m592.924 382.734-34.987.946s-29.854 5.809-28.18-6.24 30.8-7.836 30.8-7.836l31.88-4.863Z",fill:"#fbbebe"}),c.jsx("path",{d:"M620.606 269.722a7.47 7.47 0 0 1 8.236 5.128c6.85 21.584 27.95 93.814 6.985 103.723-24.693 11.672-42.714 11.158-42.714 11.158l-9.645-23.748 8.78-8.24 9.375-60.275 4.492-25.55Z",fill:"#575a89"}),c.jsx("path",{opacity:.4,d:"m614.115 309.917-4 40-35 15 39-9z"})]}),c.jsx("p",{className:"text-primary-700 text-4xl",children:"Hi, Voice Assist is here to help."})]})}function Cm(){return c.jsx("div",{children:"ErrorPage"})}function Em(){const[e,t]=ie(rl);return c.jsxs("div",{className:"p-5 pl-10 flex flex-col h-full",children:[c.jsx("p",{className:"text-xl font-semibold text-primary-950 mb-5",children:"Transcript of speech"}),c.jsx("div",{className:"h-full overflow-y-scroll noScrollBars",children:e.map((n,r)=>n!=null&&n.isCommand?c.jsxs("p",{className:"bg-primary-100 rounded-lg p-2 my-1",children:[">>"," ",n==null?void 0:n.msg]},r):c.jsx("p",{className:"",children:n==null?void 0:n.msg},r))})]})}function km(){const[e,t]=E.useState(""),[n,r]=E.useState(""),[o,l]=E.useState(""),[i,s]=E.useState(""),[a,u]=E.useState(""),[p,f]=E.useState(""),[g,y]=E.useState(""),[w,S]=E.useState(""),[_,m]=E.useState(""),[d,h]=E.useState(""),[x,C]=E.useState(""),[k,A]=E.useState(""),[v,b]=E.useState(""),[N,T]=E.useState(""),[R,O]=E.useState(""),[z,U]=E.useState(""),[$,B]=E.useState(""),[P,F]=E.useState(null),[W,J]=E.useState(null),[ue,Zt]=ie(ud),[I,Or]=ie(tl),[Ie,Rn]=ie(ad),[bm,le]=ie(rl),[_m,Cd]=ie(nl),[Q,Am]=ie(el),Jt=Ln();E.useEffect(()=>{I.name===""?Q.say("No roll selected, redirecting to home page",{onEnd:()=>{Jt("/")}}):(t((I==null?void 0:I.name)||""),r((I==null?void 0:I.GRN)||""),l((I==null?void 0:I.rLength)||""),s((I==null?void 0:I.aLength)||""),u((I==null?void 0:I.minWidth)||""),f((I==null?void 0:I.maxWidth)||""),y((I==null?void 0:I.CS)||""),S((I==null?void 0:I.LWV)||""),m((I==null?void 0:I.EPI)||""),h((I==null?void 0:I.PPI)||""),C((I==null?void 0:I.CutPcs)||""),A((I==null?void 0:I.sWarp)||""),b((I==null?void 0:I.sWeft)||""),T((I==null?void 0:I.GSM)||""),O((I==null?void 0:I.SL)||""),U((I==null?void 0:I.SG)||""),B((I==null?void 0:I.Bowing)||""))},[I,Jt,Q]);const Ed=()=>{const L=new FormData;o!==""&&L.append("rLength",o),i!==""&&L.append("aLength",i),a!==""&&L.append("minWidth",a),p!==""&&L.append("maxWidth",p),g!==""&&L.append("CS",g),w!==""&&L.append("LWV",w),_!==""&&L.append("EPI",_),d!==""&&L.append("PPI",d),x!==""&&L.append("CutPcs",x),k!==""&&L.append("sWarp",k),v!==""&&L.append("sWeft",v),N!==""&&L.append("GSM",N),R!==""&&L.append("SL",R),z!==""&&L.append("SG",z),$!==""&&L.append("Bowing",$),fetch(`/api/rollUpdate/${I==null?void 0:I.name}`,{method:"POST",body:L}).then(M=>M.json()).then(M=>{M.status==="success"?(F(M.msg),setTimeout(()=>F(null),3e3),le(H=>[...H.slice(0,-1),{msg:M.msg,isCommand:!0}]),Q.say(M.msg),Jt("/grn")):(J(M.msg),setTimeout(()=>J(null),3e3),Q.say(M.msg))}).catch(M=>{console.error("Error:",M),window.location.href="/"})};return E.useEffect(()=>{Q.emptyCommands(),Q.on(["open *","grn *","open grn *"],!0).then((L,M)=>{M=M.replace(/\s/g,"");let H=!1;for(let Mn=0;Mn[...kd.slice(0,-1),{msg:"open GRN "+M,isCommand:!0}]),Jt("/grn"),localStorage.setItem("currentGRN",JSON.stringify(Ie[Mn])),H=!0);H||Q.say("No GRN found with that Number")}),Q.on(["search *"],!0).then((L,M)=>{M=M.replace(/ /g,""),Zt(M),le(H=>[...H.slice(0,-1),{msg:"search "+M,isCommand:!0}])}),Q.on(["transcribe"]).then(L=>{le(M=>[...M.slice(0,-1),{msg:"transcribe",isCommand:!0}]),Jt("/transcribe")}),Q.on(["home","go to home"]).then(L=>{le(M=>[...M.slice(0,-1),{msg:"home",isCommand:!0}]),Jt("/")}),Q.on(["refresh"]).then(L=>{window.location.reload()}),Q.on(["A1 *","A 1 *","a1 *","a 1 *","A1*","A 1*","a1*","a 1*"],!0).then((L,M)=>{l(parseFloat(M)),le(H=>[...H.slice(0,-1),{msg:"Roll Length Updated to "+parseFloat(M),isCommand:!0}])}),Q.on(["A2 *","A 2 *","a 2 *","a2 *","A2*","A 2*","a 2*","a2*"],!0).then((L,M)=>{s(parseFloat(M)),le(H=>[...H.slice(0,-1),{msg:"Actual Length Updated to "+parseFloat(M),isCommand:!0}])}),Q.on(["B1 *","B 1 *","b 1 *","b1 *","B1*","B 1*","b 1*","b1*"],!0).then((L,M)=>{u(parseFloat(M)),le(H=>[...H.slice(0,-1),{msg:"Min Width Updated to "+parseFloat(M),isCommand:!0}])}),Q.on(["B2 *","B 2 *","b 2 *","b2 *","B2*","B 2*","b 2*","b2*"],!0).then((L,M)=>{f(parseFloat(M)),le(H=>[...H.slice(0,-1),{msg:"Max Width Updated to "+parseFloat(M),isCommand:!0}])}),Q.on(["B3 *","B 3 *","b 3 *","b3 *","B3*","B 3*","b 3*","b3*"],!0).then((L,M)=>{y(M),le(H=>[...H.slice(0,-1),{msg:"CS Updated to "+M,isCommand:!0}])}),Q.on(["B5 *","B 5 *","b 5 *","b5 *","B5*","B 5*","b 5*","b5*"],!0).then((L,M)=>{S(M),le(H=>[...H.slice(0,-1),{msg:"LWV Updated to "+M,isCommand:!0}])}),Q.on(["D1 *","D 1 *","d 1 *","d1 *","D1*","D 1*","d 1*","d1*"],!0).then((L,M)=>{m(parseFloat(M)),le(H=>[...H.slice(0,-1),{msg:"EPI Updated to "+parseFloat(M),isCommand:!0}])}),Q.on(["D2 *","D 2 *","d 2 *","d2 *","D2*","D 2*","d 2*","d2*"],!0).then((L,M)=>{h(parseFloat(M)),le(H=>[...H.slice(0,-1),{msg:"PPI Updated to "+parseFloat(M),isCommand:!0}])}),Q.on(["D3 *","D 3 *","d 3 *","d3 *","D3*","D 3*","d 3*","d3*"],!0).then((L,M)=>{C(parseFloat(M)),le(H=>[...H.slice(0,-1),{msg:"Cut Pcs Updated to "+parseFloat(M),isCommand:!0}])}),Q.on(["D4 *","D 4 *","d 4 *","d4 *","D4*","D 4*","d 4*","d4*"],!0).then((L,M)=>{A(M),le(H=>[...H.slice(0,-1),{msg:"Shrinkage Warp Updated to "+M,isCommand:!0}])}),Q.on(["F1 *","F 1 *","f 1 *","f1 *","F1*","F 1*","f 1*","f1*"],!0).then((L,M)=>{b(M),le(H=>[...H.slice(0,-1),{msg:"Shrinkage Weft Updated to "+M,isCommand:!0}])}),Q.on(["F2 *","F 2 *","f 2 *","f2 *","F2*","F 2*","f 2*","f2*"],!0).then((L,M)=>{T(parseFloat(M)),le(H=>[...H.slice(0,-1),{msg:"GSM Updated to "+parseFloat(M),isCommand:!0}])}),Q.on(["F3 *","F 3 *","f 3 *","f3 *","F3*","F 3*","f 3*","f3*"],!0).then((L,M)=>{O(M),le(H=>[...H.slice(0,-1),{msg:"SL Updated to "+M,isCommand:!0}])}),Q.on(["F4 *","F 4 *","f 4 *","f4 *","F4*","F 4*","f 4*","f4*"],!0).then((L,M)=>{U(M),le(H=>[...H.slice(0,-1),{msg:"SG Updated to "+M,isCommand:!0}])}),Q.on(["F5 *","F 5 *","f 5 *","f5 *","F5*","F 5*","f 5*","f5*"],!0).then((L,M)=>{B(M),le(H=>[...H.slice(0,-1),{msg:"Bowing Updated to "+M,isCommand:!0}])}),Q.on(["update","submit"]).then(L=>{console.log("submitting"),submitBtn.click()}),Q.on(["clear all","clear"]).then(L=>{l(""),s(""),u(""),f(""),y(""),S(""),m(""),h(""),C(""),A(""),b(""),T(""),O(""),U(""),B(""),le(M=>[...M.slice(0,-1),{msg:"clear all",isCommand:!0}])}),console.log("Commands",Q==null?void 0:Q.getAvailableCommands().length)},[Q]),c.jsxs("div",{className:"w-full h-fit min-h-[calc(100vh-4.1rem)] overflow-y-auto custom-scrollbar flex items-center justify-center",children:[I.name!==""&&c.jsx("div",{className:"relative flex gap-10 bg-clip-border rounded-xl bg-white text-gray-700 w-full max-w-[48rem] flex-row",children:c.jsxs("div",{className:"relative flex flex-col bg-clip-border rounded-xl bg-transparent text-primary-700 shadow-none",children:[P&&c.jsxs("div",{role:"alert",className:"relative w-full text-base font-regular px-4 py-4 mt-3 rounded-none border-l-4 border-green-600 bg-green-600/10 font-medium text-green-600 flex",style:{opacity:1},children:[c.jsx("div",{className:"shrink-0",children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"h-6 w-6",children:c.jsx("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z",clipRule:"evenodd"})})}),c.jsx("div",{className:"ml-3 mr-12 truncate",id:"successMsg",children:P})]}),W&&c.jsxs("div",{role:"alert",className:"relative w-full text-base font-regular px-4 py-4 mt-3 rounded-none border-l-4 border-red-500 bg-red-500/10 font-medium text-red-500 flex",style:{opacity:1},children:[c.jsx("div",{className:"shrink-0",children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"h-6 w-6",children:c.jsx("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z",clipRule:"evenodd"})})}),c.jsx("div",{className:"ml-3 mr-12 truncate",id:"errorMsg",children:W})]}),c.jsxs("div",{className:"mt-8 mb-2 lg:w-full w-[80%] lg:mx-0 mx-auto",children:[c.jsxs("div",{className:"mb-1 grid grid-cols-2 md:grid-cols-4 gap-3",children:[c.jsxs("div",{children:[c.jsx("h6",{className:"font-semibold text-primary-900 mb-3",children:"Name"}),c.jsx("input",{onChange:L=>t(L.target.value),value:e,disabled:!0,placeholder:"Name",type:"text",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]}),c.jsxs("div",{children:[c.jsx("h6",{className:"font-semibold text-primary-900 mb-3",children:"GRN"}),c.jsx("input",{onChange:L=>r(L.target.value),value:n,disabled:!0,placeholder:"GRN",type:"text",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]}),c.jsxs("div",{children:[c.jsxs("h6",{className:"font-semibold text-primary-900 mb-1 flex items-center justify-between",children:["Roll Length ",c.jsx("span",{className:"bg-primary-200 font-normal p-1 rounded",children:"(A1)"})]}),c.jsx("input",{onChange:L=>l(L.target.value),value:o,placeholder:"Roll Length",type:"number",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]}),c.jsxs("div",{children:[c.jsxs("h6",{className:"font-semibold text-primary-900 mb-1 flex items-center justify-between",children:["Actual Length ",c.jsx("span",{className:"bg-primary-200 font-normal p-1 rounded",children:"(A2)"})]}),c.jsx("input",{onChange:L=>s(L.target.value),value:i,placeholder:"Actual Length",type:"number",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]}),c.jsxs("div",{children:[c.jsxs("h6",{className:"font-semibold text-primary-900 mb-1 flex items-center justify-between",children:["Min Width ",c.jsx("span",{className:"bg-primary-200 font-normal p-1 rounded",children:"(B1)"})]}),c.jsx("input",{onChange:L=>u(L.target.value),value:a,placeholder:"Min Width",type:"number",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]}),c.jsxs("div",{children:[c.jsxs("h6",{className:"font-semibold text-primary-900 mb-1 flex items-center justify-between",children:["Max Width ",c.jsx("span",{className:"bg-primary-200 font-normal p-1 rounded",children:"(B2)"})]}),c.jsx("input",{onChange:L=>f(L.target.value),value:p,placeholder:"Max Width",type:"number",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]}),c.jsxs("div",{children:[c.jsxs("h6",{className:"font-semibold text-primary-900 mb-1 flex items-center justify-between",children:["CS ",c.jsx("span",{className:"bg-primary-200 font-normal p-1 rounded",children:"(B3)"})]}),c.jsx("input",{onChange:L=>y(L.target.value),value:g,placeholder:"CS",type:"text",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]}),c.jsxs("div",{children:[c.jsxs("h6",{className:"font-semibold text-primary-900 mb-1 flex items-center justify-between",children:["LWV ",c.jsx("span",{className:"bg-primary-200 font-normal p-1 rounded",children:"(B5)"})]}),c.jsx("input",{onChange:L=>S(L.target.value),value:w,placeholder:"LWV",type:"text",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]}),c.jsxs("div",{children:[c.jsxs("h6",{className:"font-semibold text-primary-900 mb-1 flex items-center justify-between",children:["EPI ",c.jsx("span",{className:"bg-primary-200 font-normal p-1 rounded",children:"(D1)"})]}),c.jsx("input",{onChange:L=>m(L.target.value),value:_,placeholder:"EPI",type:"number",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]}),c.jsxs("div",{children:[c.jsxs("h6",{className:"font-semibold text-primary-900 mb-1 flex items-center justify-between",children:["PPI ",c.jsx("span",{className:"bg-primary-200 font-normal p-1 rounded",children:"(D2)"})]}),c.jsx("input",{onChange:L=>h(L.target.value),value:d,placeholder:"PPI",type:"number",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]}),c.jsxs("div",{children:[c.jsxs("h6",{className:"font-semibold text-primary-900 mb-1 flex items-center justify-between",children:["Cut Pcs ",c.jsx("span",{className:"bg-primary-200 font-normal p-1 rounded",children:"(D3)"})]}),c.jsx("input",{onChange:L=>C(L.target.value),value:x,placeholder:"Cut Pcs",type:"number",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]}),c.jsxs("div",{children:[c.jsxs("h6",{className:"font-semibold text-primary-900 mb-1 flex items-center justify-between",children:["Shinkage Warp ",c.jsx("span",{className:"bg-primary-200 font-normal p-1 rounded",children:"(D4)"})]}),c.jsx("input",{onChange:L=>A(L.target.value),value:k,placeholder:"sWarp",type:"text",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]}),c.jsxs("div",{children:[c.jsxs("h6",{className:"font-semibold text-primary-900 mb-1 flex items-center justify-between",children:["Shinkage Weft ",c.jsx("span",{className:"bg-primary-200 font-normal p-1 rounded",children:"(F1)"})]}),c.jsx("input",{onChange:L=>b(L.target.value),value:v,placeholder:"sWeft",type:"text",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]}),c.jsxs("div",{children:[c.jsxs("h6",{className:"font-semibold text-primary-900 mb-1 flex items-center justify-between",children:["GSM ",c.jsx("span",{className:"bg-primary-200 font-normal p-1 rounded",children:"(F2)"})]}),c.jsx("input",{onChange:L=>T(L.target.value),value:N,placeholder:"GSM",type:"number",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]}),c.jsxs("div",{children:[c.jsxs("h6",{className:"font-semibold text-primary-900 mb-1 flex items-center justify-between",children:["SL ",c.jsx("span",{className:"bg-primary-200 font-normal p-1 rounded",children:"(F3)"})]}),c.jsx("input",{onChange:L=>O(L.target.value),value:R,placeholder:"SL",type:"text",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]}),c.jsxs("div",{children:[c.jsxs("h6",{className:"font-semibold text-primary-900 mb-1 flex items-center justify-between",children:["SG ",c.jsx("span",{className:"bg-primary-200 font-normal p-1 rounded",children:"(F4)"})]}),c.jsx("input",{onChange:L=>U(L.target.value),value:z,placeholder:"SG",type:"text",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]}),c.jsxs("div",{className:"col-span-2",children:[c.jsxs("h6",{className:"font-semibold text-primary-900 mb-1 flex items-center justify-between",children:["Bowing ",c.jsx("span",{className:"bg-primary-200 font-normal p-1 rounded",children:"(F5)"})]}),c.jsx("input",{onChange:L=>B(L.target.value),value:$,placeholder:"Bowing",type:"text",className:"w-full h-11 bg-transparent text-primary-700 font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border border focus:border-2 border-t-transparent focus:border-t-transparent text-sm px-3 py-3 rounded-md border-blue-gray-200 focus:border-gray-900 !border-t-blue-gray-200 focus:!border-t-gray-900"})]})]}),c.jsx("button",{id:"submitBtn",onClick:Ed,className:"align-middle select-none font-sans font-bold text-center uppercase transition-all disabled:opacity-50 disabled:shadow-none disabled:pointer-events-none text-xs py-3 px-6 rounded-lg bg-gradient-to-tr from-primary-950 to-primary-800 text-white shadow-md shadow-gray-900/10 hover:shadow-lg hover:shadow-gray-900/20 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none block w-full mt-6",type:"button",children:"Update"})]})]})}),I.name===""&&c.jsxs("div",{className:"flex flex-col items-center justify-center gap-5",children:[c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",viewBox:"0 0 647.636 632.174",className:"w-[50%] h-[50%] opacity-80",children:[c.jsx("path",{d:"M411.146 142.174h-174.51a15.02 15.02 0 0 0-15 15v387.85l-2 .61-42.81 13.11a8.007 8.007 0 0 1-9.99-5.31l-127.34-415.95a8.003 8.003 0 0 1 5.31-9.99l65.97-20.2 191.25-58.54 65.97-20.2a7.99 7.99 0 0 1 9.99 5.3l32.55 106.32Z",fill:"#f2f2f2"}),c.jsx("path",{d:"m449.226 140.174-39.23-128.14a16.994 16.994 0 0 0-21.23-11.28l-92.75 28.39-191.24 58.55-92.75 28.4a17.015 17.015 0 0 0-11.28 21.23l134.08 437.93a17.03 17.03 0 0 0 16.26 12.03 16.8 16.8 0 0 0 4.97-.75l63.58-19.46 2-.62v-2.09l-2 .61-64.17 19.65a15.015 15.015 0 0 1-18.73-9.95L2.666 136.734a14.98 14.98 0 0 1 9.95-18.73l92.75-28.4 191.24-58.54 92.75-28.4a15.2 15.2 0 0 1 4.41-.66 15.015 15.015 0 0 1 14.32 10.61l39.05 127.56.62 2h2.08Z",fill:"#3f3d56"}),c.jsx("path",{d:"M122.68 127.82a9.02 9.02 0 0 1-8.61-6.366l-12.88-42.072a9 9 0 0 1 5.97-11.24L283.1 14.278a9.01 9.01 0 0 1 11.24 5.971l12.88 42.072a9.01 9.01 0 0 1-5.97 11.241l-175.94 53.864a9 9 0 0 1-2.63.395",fill:"#285c7c"}),c.jsx("circle",{cx:190.154,cy:24.955,r:20,fill:"#285c7c"}),c.jsx("circle",{cx:190.154,cy:24.955,r:12.665,fill:"#fff"}),c.jsx("path",{d:"M602.636 582.174h-338a8.51 8.51 0 0 1-8.5-8.5v-405a8.51 8.51 0 0 1 8.5-8.5h338a8.51 8.51 0 0 1 8.5 8.5v405a8.51 8.51 0 0 1-8.5 8.5",fill:"#e6e6e6"}),c.jsx("path",{d:"M447.136 140.174h-210.5a17.024 17.024 0 0 0-17 17v407.8l2-.61v-407.19a15.02 15.02 0 0 1 15-15h211.12Zm183.5 0h-394a17.024 17.024 0 0 0-17 17v458a17.024 17.024 0 0 0 17 17h394a17.024 17.024 0 0 0 17-17v-458a17.024 17.024 0 0 0-17-17m15 475a15.02 15.02 0 0 1-15 15h-394a15.02 15.02 0 0 1-15-15v-458a15.02 15.02 0 0 1 15-15h394a15.02 15.02 0 0 1 15 15Z",fill:"#3f3d56"}),c.jsx("path",{d:"M525.636 184.174h-184a9.01 9.01 0 0 1-9-9v-44a9.01 9.01 0 0 1 9-9h184a9.01 9.01 0 0 1 9 9v44a9.01 9.01 0 0 1-9 9",fill:"#285c7c"}),c.jsx("circle",{cx:433.636,cy:105.174,r:20,fill:"#285c7c"}),c.jsx("circle",{cx:433.636,cy:105.174,r:12.182,fill:"#fff"})]}),c.jsx("p",{className:"text-3xl text-primary-700",children:"No roll selected, Please select a roll"})]})]})}function Nm({GRN:e}){const[t,n]=ie(nl),r=Ln();return c.jsx("div",{onClick:()=>{n(e),localStorage.setItem("currentGRN",JSON.stringify(e)),r("/grn")},className:"relative overflow-hidden hover:translate-x-3 cursor-pointer hover:brightness-105 transition-all rounded-xl bg-gray-100 shadow-inner text-primary-700 border border-primary-950/50 mx-0 flex items-center ",children:c.jsxs("div",{className:"flex w-full flex-col gap-0.5 py-2 px-3",children:[c.jsxs("div",{className:"flex flex-wrap gap-x-3 items-center justify-between",children:[c.jsxs("h5",{className:"text-sm font-semibold whitespace-nowrap text-primary-950",children:["GRN : ",e==null?void 0:e.GRN]}),c.jsxs("h5",{className:"text-sm font-semibold whitespace-nowrap text-primary-950",children:["Quant : ",e==null?void 0:e.quantity]})]}),c.jsxs("p",{className:"text-sm text-primary-900 truncate",title:e==null?void 0:e.supplierName,children:["Supplier Name : ",e==null?void 0:e.supplierName]}),c.jsxs("p",{className:"text-sm text-primary-900 truncate",title:e==null?void 0:e.buyer,children:["Buyer : ",e==null?void 0:e.buyer]})]})})}const Pm=({sidebar:e})=>{const[t,n]=ie(nl),[r,o]=ie(el),[l,i]=ie(tl),[s,a]=ie(rl),[u,p]=E.useState([]),[f,g]=E.useState(""),[y,w]=E.useState(0),[S,_]=E.useState(""),[m,d]=E.useState(0),h=Ln();return E.useEffect(()=>{fetch("/api/grnRolls/"+(t==null?void 0:t.GRN)).then(x=>x.json()).then(x=>{p(x.data),r.on(["roll *","open roll *"],!0).then((C,k)=>{k=k.replace(/ /g,"");let A=!1;for(let v=0;v[...b.slice(0,-1),{msg:"open roll "+k,isCommand:!0}]),h("/roll"),A=!0);A||r.say("No roll found with that Number")})}).catch(x=>{window.location.href="/"})},[t]),E.useEffect(()=>{g(t==null?void 0:t.fabricForm),w(t==null?void 0:t.POWidth),_(t==null?void 0:t.PointsUOM),d(t==null?void 0:t.Tolarence),r.emptyCommands(),r.on(["open *","grn *","open grn *"],!0).then((x,C)=>{C=C.replace(/\s/g,"");let k=!1;for(let A=0;A[...v.slice(0,-1),{msg:"open GRN "+C,isCommand:!0}]),h("/grn"),localStorage.setItem("currentGRN",JSON.stringify(grns[A])),k=!0);k||r.say("No GRN found with that Number")}),r.on(["search *"],!0).then((x,C)=>{C=C.replace(/ /g,""),setSearch(C),a(k=>[...k.slice(0,-1),{msg:"search "+C,isCommand:!0}])}),r.on(["transcribe"]).then(x=>{a(C=>[...C.slice(0,-1),{msg:"transcribe",isCommand:!0}]),h("/transcribe")}),r.on(["home","go to home"]).then(x=>{a(C=>[...C.slice(0,-1),{msg:"home",isCommand:!0}]),h("/")}),r.on(["refresh"]).then(x=>{window.location.reload()}),r.on(["c1 *","C 1 *","c 1 *","C1 *","c1*","C 1*","c 1*","C1*"],!0).then((x,C)=>{let k="";C==1?k="Roll":k="Than",g(k),a(A=>[...A.slice(0,-1),{msg:"Fabric Form Updated to "+k,isCommand:!0}])}),r.on(["c2 *","C 2 *","c 2 *","C2 *","c2*","C 2*","c 2*","C2*"],!0).then((x,C)=>{w(C),a(k=>[...k.slice(0,-1),{msg:"PO Width Updated to "+C,isCommand:!0}])}),r.on(["c3 *","C 3 *","c 3 *","C3 *","c3*","C 3*","c 3*","C3*"],!0).then((x,C)=>{let k="";C==1?k="YRD":k="MTR",_(k),a(A=>[...A.slice(0,-1),{msg:"Points UOM Updated to "+k,isCommand:!0}])}),r.on(["c4 *","C 4 *","c 4 *","C4 *","c4*","C 4*","c 4*","C4*"],!0).then((x,C)=>{let k="";C==1?k=20:k=30,d(k),a(A=>[...A.slice(0,-1),{msg:"Tolarence Updated to "+k,isCommand:!0}])}),r.on(["submit GRN","update GRN","submit grn","update grn"]).then(x=>{let C=new FormData;C.append("fabricForm",f),C.append("POWidth",y),C.append("PointsUOM",S),C.append("Tolarence",m),console.log(t),fetch("/api/GRNUpdate/"+(t==null?void 0:t.GRN),{method:"POST",body:C}).then(k=>k.json()).then(k=>{k.status=="success"?(a(A=>[...A.slice(0,-1),{msg:k.msg,isCommand:!0}]),r.say(k.msg)):(a(A=>[...A.slice(0,-1),{msg:k.msg,isCommand:!1}]),r.say("GRN Update Failed"))}).catch(k=>console.error(k))})},[r]),(t==null?void 0:t.GRN)!==""?c.jsxs("div",{className:"p-10",children:[c.jsxs("div",{className:"flex flex-nowrap items-center justify-between",children:[c.jsxs("h1",{className:"text-2xl font-semibold text-primary-900",children:["GRN : ",t==null?void 0:t.GRN]}),c.jsx("h1",{className:"text-lg text-primary-900",children:"* Only Fields with Command Code are editable"})]}),c.jsxs("div",{className:"w-full mt-3 grid-cols-1 md:grid-cols-4 grid overflow-hidden border-2 border-b-0 border-primary-950 rounded-lg "+(e?"text-xs":"text-sm"),children:[c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"GRN#"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.GRN})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950 md:border-l-2",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"Supplier#"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.supplier})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950 md:border-l-2",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"Buyer"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.buyer})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950 md:border-l-2",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"Item#"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.item})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"Supplier Name"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.supplierName})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950 md:border-l-2",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"PCH"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.PCH})]}),c.jsxs("div",{className:"flex col-span-2 item-center justify-between border-b-2 border-primary-950 md:border-l-2",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"Fabric Description"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.fabricDescription})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"Quantity"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.quantity})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950 md:border-l-2",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"Color"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.color})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950 md:border-l-2",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"Invoice#"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.invoice})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950 md:border-l-2",children:[c.jsxs("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 whitespace-nowrap",children:["PO Width ",c.jsx("span",{className:"bg-primary-800 font-normal text-white p-1 rounded ml-2",children:"(C2)"})]}),c.jsx("input",{className:"px-3 py-1 truncate3 focus:bg-primary-100 focus:outline-none",value:y,onChange:x=>{w(x.target.value)}})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"Fabric Odour"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.fabricOdour})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950 md:border-l-2",children:[c.jsxs("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 whitespace-nowrap",children:["Fabric Form ",c.jsx("span",{className:"bg-primary-800 font-normal text-white p-1 rounded",children:"(C11/C12)"})]}),c.jsxs("select",{onChange:x=>{g(x.target.value)},value:f,className:"px-3 py-1 truncate3 focus:bg-primary-100 focus:outline-none",children:[c.jsx("option",{value:"Roll",children:"Roll"}),c.jsx("option",{value:"Than",children:"Than"})]})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950 md:border-l-2",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"PO#"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.PO})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950 md:border-l-2",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"Item Description"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.itemDescription})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950",children:[c.jsxs("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 whitespace-nowrap",children:["Points UOM ",c.jsx("span",{className:"bg-primary-800 font-normal text-white p-1 rounded",children:"(C31/C32)"})]}),c.jsxs("select",{onChange:x=>{_(x.target.value)},value:S,className:"px-3 py-1 truncate3 focus:bg-primary-100 focus:outline-none",children:[c.jsx("option",{value:"YRD",children:"YRD"}),c.jsx("option",{value:"MTR",children:"MTR"})]})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950 md:border-l-2",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"Basic UOM"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.basicUOM})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950 md:border-l-2",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"Warehouse"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.Warehouse})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950 md:border-l-2",children:[c.jsxs("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 whitespace-nowrap",children:["Tolarence ",c.jsx("span",{className:"bg-primary-800 font-normal text-white p-1 rounded",children:"(C41/C42)"})]}),c.jsxs("select",{onChange:x=>{d(x.target.value)},value:m,className:"px-3 py-1 truncate3 focus:bg-primary-100 focus:outline-none",children:[c.jsx("option",{value:20,children:"20"}),c.jsx("option",{value:30,children:"30"})]})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"PO UOM"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.POUOM})]}),c.jsxs("div",{className:"flex item-center justify-between border-b-2 border-primary-950 md:border-l-2",children:[c.jsx("p",{className:"bg-gradient-to-r from-primary-200 via-primary-200 to-white font-semibold px-3 py-1 ",children:"Conv Factor"}),c.jsx("p",{className:"px-3 py-1 truncate3 bg-white",children:t==null?void 0:t.convFactor})]}),c.jsx("div",{className:"flex col-span-2 item-center justify-between border-b-2 border-primary-950 md:border-l-2"})]}),c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 mt-5 gap-3",children:u.map((x,C)=>c.jsx(wm,{roll:x},C))})]}):(E.useEffect(()=>{r.say("No GRN selected, redirecting to home page",{onEnd:()=>{h("/")}})},[]),c.jsx("div",{className:"w-full h-full flex items-center justify-center",children:c.jsxs("div",{className:"flex flex-col items-center justify-center gap-5",children:[c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",viewBox:"0 0 647.636 632.174",className:"w-[50%] h-[50%] opacity-80",children:[c.jsx("path",{d:"M411.146 142.174h-174.51a15.02 15.02 0 0 0-15 15v387.85l-2 .61-42.81 13.11a8.007 8.007 0 0 1-9.99-5.31l-127.34-415.95a8.003 8.003 0 0 1 5.31-9.99l65.97-20.2 191.25-58.54 65.97-20.2a7.99 7.99 0 0 1 9.99 5.3l32.55 106.32Z",fill:"#f2f2f2"}),c.jsx("path",{d:"m449.226 140.174-39.23-128.14a16.994 16.994 0 0 0-21.23-11.28l-92.75 28.39-191.24 58.55-92.75 28.4a17.015 17.015 0 0 0-11.28 21.23l134.08 437.93a17.03 17.03 0 0 0 16.26 12.03 16.8 16.8 0 0 0 4.97-.75l63.58-19.46 2-.62v-2.09l-2 .61-64.17 19.65a15.015 15.015 0 0 1-18.73-9.95L2.666 136.734a14.98 14.98 0 0 1 9.95-18.73l92.75-28.4 191.24-58.54 92.75-28.4a15.2 15.2 0 0 1 4.41-.66 15.015 15.015 0 0 1 14.32 10.61l39.05 127.56.62 2h2.08Z",fill:"#3f3d56"}),c.jsx("path",{d:"M122.68 127.82a9.02 9.02 0 0 1-8.61-6.366l-12.88-42.072a9 9 0 0 1 5.97-11.24L283.1 14.278a9.01 9.01 0 0 1 11.24 5.971l12.88 42.072a9.01 9.01 0 0 1-5.97 11.241l-175.94 53.864a9 9 0 0 1-2.63.395",fill:"#285c7c"}),c.jsx("circle",{cx:190.154,cy:24.955,r:20,fill:"#285c7c"}),c.jsx("circle",{cx:190.154,cy:24.955,r:12.665,fill:"#fff"}),c.jsx("path",{d:"M602.636 582.174h-338a8.51 8.51 0 0 1-8.5-8.5v-405a8.51 8.51 0 0 1 8.5-8.5h338a8.51 8.51 0 0 1 8.5 8.5v405a8.51 8.51 0 0 1-8.5 8.5",fill:"#e6e6e6"}),c.jsx("path",{d:"M447.136 140.174h-210.5a17.024 17.024 0 0 0-17 17v407.8l2-.61v-407.19a15.02 15.02 0 0 1 15-15h211.12Zm183.5 0h-394a17.024 17.024 0 0 0-17 17v458a17.024 17.024 0 0 0 17 17h394a17.024 17.024 0 0 0 17-17v-458a17.024 17.024 0 0 0-17-17m15 475a15.02 15.02 0 0 1-15 15h-394a15.02 15.02 0 0 1-15-15v-458a15.02 15.02 0 0 1 15-15h394a15.02 15.02 0 0 1 15 15Z",fill:"#3f3d56"}),c.jsx("path",{d:"M525.636 184.174h-184a9.01 9.01 0 0 1-9-9v-44a9.01 9.01 0 0 1 9-9h184a9.01 9.01 0 0 1 9 9v44a9.01 9.01 0 0 1-9 9",fill:"#285c7c"}),c.jsx("circle",{cx:433.636,cy:105.174,r:20,fill:"#285c7c"}),c.jsx("circle",{cx:433.636,cy:105.174,r:12.182,fill:"#fff"})]}),c.jsx("p",{className:"text-3xl text-primary-700",children:"No GRN selected, Please select a GRN"})]})}))};function jm(){const[e,t]=ie(ud);ie(v0);const[n,r]=ie(ad),[o,l]=ie(el);ie(tl);const[i,s]=ie(nl),[a,u]=ie(rl),[p,f]=E.useState(!0),g=Ln();return E.useEffect(()=>{localStorage.getItem("currentGRN")&&s(JSON.parse(localStorage.getItem("currentGRN"))),fetch("/api/grns").then(y=>y.json()).then(y=>{r(y.data),o.on(["open *","grn *","open grn *"],!0).then((w,S)=>{S=S.replace(/\s/g,"").replace(/-/g,"");let _=!1;for(let m=0;m[...d.slice(0,-1),{msg:"open GRN "+S,isCommand:!0}]),g("/grn"),_=!0);_||o.say("No GRN found with that Number")})}).catch(y=>console.error(y)),o.emptyCommands(),o.on(["search *"],!0).then((y,w)=>{w=w.replace(/ /g,""),t(w),u(S=>[...S.slice(0,-1),{msg:"search "+w,isCommand:!0}])}),o.on(["transcribe"]).then(y=>{u(w=>[...w.slice(0,-1),{msg:"transcribe",isCommand:!0}]),g("/transcribe")}),o.on(["home","go to home"]).then(y=>{u(w=>[...w.slice(0,-1),{msg:"home",isCommand:!0}]),g("/")}),o.on(["refresh"]).then(y=>{window.location.reload()}),o.fatality(),setTimeout(()=>{o.initialize({lang:"en-US",continuous:!0,soundex:!0,debug:!0,executionKeyword:"and do it now",listen:!0,name:"",speed:1.2}).then(()=>{console.log("Artyom has been succesfully initialized")}).catch(y=>{console.error("Artyom couldn't be initialized: ",y)})},250),o.redirectRecognizedTextOutput((y,w)=>{w&&y!=""&&u(S=>[...S,{msg:y,isCommand:!1}])})},[]),c.jsxs("div",{className:"flex flex-col h-screen w-full overflow-hidden relative",children:[a.length>0&&c.jsx("div",{className:"z-50 max-w-[25%] absolute bottom-5 right-10 flex flex-col items-end gap-2",children:a.map((y,w)=>a.length-w>4?null:c.jsxs("div",{className:"relative w-fit max-w-full text-white rounded-lg rounded-br-none p-3 px-4 transition-all duration-700 origin-bottom-right "+(y!=null&&y.isCommand?"bg-orange-500 ":"bg-primary-500 "),style:{opacity:a.length-w<4?1.25-(a.length-w)*.25:0,transform:a.length-w==4?"translate(200px,0px)":"scale(1)"},children:[c.jsx("p",{children:y==null?void 0:y.msg}),c.jsx("svg",{className:"absolute translate-x-1/2 translate-y-[2.5px] bottom-0 right-0 h-5 w-5 scale-x-150 "+(y!=null&&y.isCommand?"text-orange-500":"text-primary-500"),viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{fill:"currentColor",d:"M21 21H3l9-18Z"})})]},w))}),c.jsx(xm,{}),c.jsxs("div",{className:"flex flex-row w-full h-[calc(100vh-4rem)] flex-nowrap items-center justify-between border-t border-primary-950",children:[c.jsxs("div",{className:"border-r border-primary-950 h-full p-5 relative px-0 transition-all "+(p?"w-[20%] min-w-64":"w-0 "),children:[c.jsx("svg",{onClick:()=>{f(!p)},className:"absolute top-0 w-10 h-10 p-2 z-50 border border-t-0 border-primary-950 hover:bg-primary-100 cursor-pointer transition-all "+(p?"border-l-0 right-0 -scale-x-100":"border-l-0 -right-10"),viewBox:"-0.2 0 1 1",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"m0.138 0.023 0.434 0.417 0.004 0.003c0.015 0.014 0.023 0.033 0.024 0.055l0 0.007c-0.001 0.02 -0.01 0.038 -0.027 0.054l0 0L0.138 0.977a0.082 0.082 0 0 1 -0.114 0 0.079 0.079 0 0 1 0 -0.114l0.376 -0.361L0.024 0.137a0.079 0.079 0 0 1 0 -0.114 0.082 0.082 0 0 1 0.114 0",fill:"#1C1C1F"})}),c.jsxs("div",{className:"flex flex-col w-full h-full gap-3 transition-all origin-left "+(p?"":"scale-x-0"),children:[c.jsxs("div",{className:"relative w-[calc(100%-2.5rem)] mx-auto h-10",children:[c.jsx("div",{className:"grid place-items-center absolute text-blue-gray-500 top-2/4 right-12 -translate-y-2/4 w-5 h-5",children:c.jsx("svg",{width:16,height:16,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{fill:"currentColor",d:"M21.71 20.29 18 16.61A9 9 0 1 0 16.61 18l3.68 3.68a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.39M11 18a7 7 0 1 1 7-7 7 7 0 0 1-7 7"})})}),c.jsx("input",{onChange:y=>{t(y.target.value)},value:e,className:"peer w-[calc(100%-2.5rem)] h-full bg-transparent text-blue-gray-700 font-sans font-normal outline outline-0 focus:outline-0 disabled:bg-blue-gray-50 disabled:border-0 disabled:cursor-not-allowed transition-all placeholder-shown:border placeholder-shown:border-blue-gray-200 placeholder-shown:border-t-blue-gray-200 border focus:border-2 border-t-transparent focus:border-t-transparent placeholder:opacity-0 focus:placeholder:opacity-100 text-sm px-3 py-2.5 rounded-[7px] !pr-9 border-blue-gray-200 focus:border-gray-900",placeholder:" "}),c.jsx("label",{className:"flex w-[calc(100%-2.5rem)] h-full select-none pointer-events-none absolute left-0 font-normal !overflow-visible truncate peer-placeholder-shown:text-blue-gray-500 leading-tight peer-focus:leading-tight peer-disabled:text-transparent peer-disabled:peer-placeholder-shown:text-blue-gray-500 transition-all -top-1.5 peer-placeholder-shown:text-sm text-[11px] peer-focus:text-[11px] before:content[' '] before:block before:box-border before:w-2.5 before:h-1.5 before:mt-[6.5px] before:mr-1 peer-placeholder-shown:before:border-transparent before:rounded-tl-md before:border-t peer-focus:before:border-t-2 before:border-l peer-focus:before:border-l-2 before:pointer-events-none before:transition-all peer-disabled:before:border-transparent after:content[' '] after:block after:flex-grow after:box-border after:w-2.5 after:h-1.5 after:mt-[6.5px] after:ml-1 peer-placeholder-shown:after:border-transparent after:rounded-tr-md after:border-t peer-focus:after:border-t-2 after:border-r peer-focus:after:border-r-2 after:pointer-events-none after:transition-all peer-disabled:after:border-transparent peer-placeholder-shown:leading-[3.75] text-gray-500 peer-focus:text-gray-900 before:border-blue-gray-200 peer-focus:before:!border-gray-900 after:border-blue-gray-200 peer-focus:after:!border-gray-900",children:"Search Roll No. "})]}),c.jsx("div",{className:"w-full h-full flex flex-col gap-2 text-primary-700 overflow-y-scroll pl-6 py-5 px-5 noScrollBars",children:n.map((y,w)=>e&&!y.supplierName.toLowerCase().includes(e.toLowerCase())&&!y.buyer.toLowerCase().includes(e.toLowerCase())&&!y.GRN.toLowerCase().includes(e.toLowerCase())?null:c.jsx(Nm,{GRN:y},w))})]})]}),c.jsx("div",{className:"border-r h-full overflow-y-auto custom-scrollbar "+(p?"w-[80%]":"w-full"),children:c.jsxs(om,{children:[c.jsx(tn,{path:"/",element:c.jsx(Sm,{})}),c.jsx(tn,{path:"/roll",element:c.jsx(km,{})}),c.jsx(tn,{path:"/grn",element:c.jsx(Pm,{sidebar:p})}),c.jsx(tn,{path:"/transcribe",element:c.jsx(Em,{})}),c.jsx(tn,{path:"*",element:c.jsx(Cm,{})})]})})]})]})}Il.createRoot(document.getElementById("root")).render(c.jsx(fm,{children:c.jsx(jm,{})}));