unitdc-rs/assets/index-d35f4830.js

44 lines
150 KiB
JavaScript
Raw Normal View History

(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function kc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ls={exports:{}},dl={},os={exports:{}},L={};/**
* @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 lr=Symbol.for("react.element"),Sc=Symbol.for("react.portal"),_c=Symbol.for("react.fragment"),xc=Symbol.for("react.strict_mode"),Ec=Symbol.for("react.profiler"),Cc=Symbol.for("react.provider"),Nc=Symbol.for("react.context"),Pc=Symbol.for("react.forward_ref"),zc=Symbol.for("react.suspense"),Tc=Symbol.for("react.memo"),Lc=Symbol.for("react.lazy"),Gi=Symbol.iterator;function jc(e){return e===null||typeof e!="object"?null:(e=Gi&&e[Gi]||e["@@iterator"],typeof e=="function"?e:null)}var is={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},us=Object.assign,ss={};function cn(e,t,n){this.props=e,this.context=t,this.refs=ss,this.updater=n||is}cn.prototype.isReactComponent={};cn.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")};cn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function as(){}as.prototype=cn.prototype;function ei(e,t,n){this.props=e,this.context=t,this.refs=ss,this.updater=n||is}var ti=ei.prototype=new as;ti.constructor=ei;us(ti,cn.prototype);ti.isPureReactComponent=!0;var Zi=Array.isArray,cs=Object.prototype.hasOwnProperty,ni={current:null},fs={key:!0,ref:!0,__self:!0,__source:!0};function ds(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)cs.call(t,r)&&!fs.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1<u){for(var s=Array(u),a=0;a<u;a++)s[a]=arguments[a+2];l.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)l[r]===void 0&&(l[r]=u[r]);return{$$typeof:lr,type:e,key:o,ref:i,props:l,_owner:ni.current}}function Rc(e,t){return{$$typeof:lr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ri(e){return typeof e=="object"&&e!==null&&e.$$typeof===lr}function Oc(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ji=/\/+/g;function jl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Oc(""+e.key):t.toString(36)}function zr(e,t,n,r,l){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case lr:case Sc:i=!0}}if(i)return i=e,l=l(i),e=r===""?"."+jl(i,0):r,Zi(l)?(n="",e!=null&&(n=e.replace(Ji,"$&/")+"/"),zr(l,t,n,"",function(a){return a})):l!=null&&(ri(l)&&(l=Rc(l,n+(!l.key||i&&i.key===l.key?"":(""+l.key).replace(Ji,"$&/")+"/")+e)),t.push(l)),1;if(i=0,r=r===""?".":r+":",Zi(e))for(var u=0;u<e.length;u++){o=e[u];var s=r+jl(o,u);i+=zr(o,t,n,s,l)}else if(s=jc(e),typeof s=="function")for(e=s.call(e),u=0;!(o=e.next()).done;)o=o.value,s=r+jl(o,u++),i+=zr(o,t,n,s,l);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function fr(e,t,n){if(e==null)return e;var r=[],l=0;return zr(e,r,"","",function(o){return t.call(n,o,l++)}),r}function Mc(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var se={current:null},Tr={transition:null},Dc={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:Tr,ReactCurrentOwner:ni};L.Children={map:fr,forEach:function(e,t,n){fr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return fr(e,function(){t++}),t},toArray:function(e){return fr(e,function(t){return t})||[]},only:function(e){if(!ri(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};L.Component=cn;L.Fragment=_c;L.Profiler=Ec;L.Pure
* @license React
* react-jsx-runtime.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 Fc=ye,Uc=Symbol.for("react.element"),$c=Symbol.for("react.fragment"),Ac=Object.prototype.hasOwnProperty,Vc=Fc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Bc={key:!0,ref:!0,__self:!0,__source:!0};function ps(e,t,n){var r,l={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)Ac.call(t,r)&&!Bc.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:Uc,type:e,key:o,ref:i,props:l,_owner:Vc.current}}dl.Fragment=$c;dl.jsx=ps;dl.jsxs=ps;ls.exports=dl;var N=ls.exports,lo={},ms={exports:{}},ke={},hs={exports:{}},vs={};/**
* @license React
* scheduler.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.
*/(function(e){function t(x,z){var T=x.length;x.push(z);e:for(;0<T;){var H=T-1>>>1,Z=x[H];if(0<l(Z,z))x[H]=z,x[T]=Z,T=H;else break e}}function n(x){return x.length===0?null:x[0]}function r(x){if(x.length===0)return null;var z=x[0],T=x.pop();if(T!==z){x[0]=T;e:for(var H=0,Z=x.length,ar=Z>>>1;H<ar;){var kt=2*(H+1)-1,Ll=x[kt],St=kt+1,cr=x[St];if(0>l(Ll,T))St<Z&&0>l(cr,Ll)?(x[H]=cr,x[St]=T,H=St):(x[H]=Ll,x[kt]=T,H=kt);else if(St<Z&&0>l(cr,T))x[H]=cr,x[St]=T,H=St;else break e}}return z}function l(x,z){var T=x.sortIndex-z.sortIndex;return T!==0?T:x.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var s=[],a=[],h=1,m=null,p=3,v=!1,w=!1,k=!1,F=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(x){for(var z=n(a);z!==null;){if(z.callback===null)r(a);else if(z.startTime<=x)r(a),z.sortIndex=z.expirationTime,t(s,z);else break;z=n(a)}}function y(x){if(k=!1,d(x),!w)if(n(s)!==null)w=!0,zl(_);else{var z=n(a);z!==null&&Tl(y,z.startTime-x)}}function _(x,z){w=!1,k&&(k=!1,f(P),P=-1),v=!0;var T=p;try{for(d(z),m=n(s);m!==null&&(!(m.expirationTime>z)||x&&!ze());){var H=m.callback;if(typeof H=="function"){m.callback=null,p=m.priorityLevel;var Z=H(m.expirationTime<=z);z=e.unstable_now(),typeof Z=="function"?m.callback=Z:m===n(s)&&r(s),d(z)}else r(s);m=n(s)}if(m!==null)var ar=!0;else{var kt=n(a);kt!==null&&Tl(y,kt.startTime-z),ar=!1}return ar}finally{m=null,p=T,v=!1}}var E=!1,C=null,P=-1,W=5,j=-1;function ze(){return!(e.unstable_now()-j<W)}function pn(){if(C!==null){var x=e.unstable_now();j=x;var z=!0;try{z=C(!0,x)}finally{z?mn():(E=!1,C=null)}}else E=!1}var mn;if(typeof c=="function")mn=function(){c(pn)};else if(typeof MessageChannel<"u"){var Xi=new MessageChannel,wc=Xi.port2;Xi.port1.onmessage=pn,mn=function(){wc.postMessage(null)}}else mn=function(){F(pn,0)};function zl(x){C=x,E||(E=!0,mn())}function Tl(x,z){P=F(function(){x(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(x){x.callback=null},e.unstable_continueExecution=function(){w||v||(w=!0,zl(_))},e.unstable_forceFrameRate=function(x){0>x||125<x?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<x?Math.floor(1e3/x):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(x){switch(p){case 1:case 2:case 3:var z=3;break;default:z=p}var T=p;p=z;try{return x()}finally{p=T}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(x,z){switch(x){case 1:case 2:case 3:case 4:case 5:break;default:x=3}var T=p;p=x;try{return z()}finally{p=T}},e.unstable_scheduleCallback=function(x,z,T){var H=e.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?H+T:H):T=H,x){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=T+Z,x={id:h++,callback:z,priorityLevel:x,startTime:T,expirationTime:Z,sortIndex:-1},T>H?(x.sortIndex=T,t(a,x),n(s)===null&&x===n(a)&&(k?(f(P),P=-1):k=!0,Tl(y,T-H))):(x.sortIndex=Z,t(s,x),w||v||(w=!0,zl(_))),x},e.unstable_shouldYield=ze,e.unstable_wrapCallback=function(x){var z=p;return function(){var T=p;p=z;try{return x.apply(this,arguments)}finally{p=T}}}})(vs);hs.exports=vs;var Wc=hs.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 ys=ye,we=Wc;function g(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var gs=new Set,An={};function Mt(e,t){nn(e,t),nn(e+"Capture",t)}function nn(e,t){for(An[e]=t,e=0;e<t.length;e++)gs.add(t[e])}var Ge=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),oo=Object.prototype.hasOwnProperty,Hc=/^[: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]*$/,qi={},bi={};function Qc(e){return oo.call(bi,e)?!0:oo.call(qi,e)?!1:Hc.test(e)?bi[e]=!0:(qi[e]=!0,!1)}function Kc(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 Yc(e,t,n,r){if(t===null||typeof t>"u"||Kc(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 ae(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var te={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){te[e]=new ae(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];te[t]=new ae(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){te[e]=new ae(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){te[e]=new ae(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){te[e]=new ae(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){te[e]=new ae(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){te[e]=new ae(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){te[e]=new ae(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){te[e]=new ae(e,5,!1,e.toLowerCase(),null,!1,!1)});var li=/[\-:]([a-z])/g;function oi(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
`+Rl+e}var Ol=!1;function Ml(e,t){if(!e||Ol)return"";Ol=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(a){var r=a}Reflect.construct(e,[],t)}else{try{t.call()}catch(a){r=a}e.call(t.prototype)}else{try{throw Error()}catch(a){r=a}e()}}catch(a){if(a&&r&&typeof a.stack=="string"){for(var l=a.stack.split(`
`),o=r.stack.split(`
`),i=l.length-1,u=o.length-1;1<=i&&0<=u&&l[i]!==o[u];)u--;for(;1<=i&&0<=u;i--,u--)if(l[i]!==o[u]){if(i!==1||u!==1)do if(i--,u--,0>u||l[i]!==o[u]){var s=`
`+l[i].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=i&&0<=u);break}}}finally{Ol=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?xn(e):""}function Xc(e){switch(e.tag){case 5:return xn(e.type);case 16:return xn("Lazy");case 13:return xn("Suspense");case 19:return xn("SuspenseList");case 0:case 2:case 15:return e=Ml(e.type,!1),e;case 11:return e=Ml(e.type.render,!1),e;case 1:return e=Ml(e.type,!0),e;default:return""}}function ao(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 Ut:return"Fragment";case Ft:return"Portal";case io:return"Profiler";case ui:return"StrictMode";case uo:return"Suspense";case so:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ks:return(e.displayName||"Context")+".Consumer";case ws:return(e._context.displayName||"Context")+".Provider";case si:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ai:return t=e.displayName||null,t!==null?t:ao(e.type)||"Memo";case tt:t=e._payload,e=e._init;try{return ao(e(t))}catch{}}return null}function Gc(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 ao(t);case 8:return t===ui?"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 ht(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _s(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zc(e){var t=_s(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 l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.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 pr(e){e._valueTracker||(e._valueTracker=Zc(e))}function xs(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_s(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Br(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 co(e,t){var n=t.checked;return V({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function tu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ht(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 Es(e,t){t=t.checked,t!=null&&ii(e,"checked",t,!1)}function fo(e,t){Es(e,t);var n=ht(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")?po(e,t.type,n):t.hasOwnProperty("defaultValue")&&po(e,t.type,ht(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function nu(e,t,n){if(t.hasOwnProperty("valu
`).replace(ud,"")}function Sr(e,t,n){if(t=Cu(t),Cu(e)!==t&&n)throw Error(g(425))}function Zr(){}var Po=null,zo=null;function To(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Lo=typeof setTimeout=="function"?setTimeout:void 0,sd=typeof clearTimeout=="function"?clearTimeout:void 0,Nu=typeof Promise=="function"?Promise:void 0,ad=typeof queueMicrotask=="function"?queueMicrotask:typeof Nu<"u"?function(e){return Nu.resolve(null).then(e).catch(cd)}:Lo;function cd(e){setTimeout(function(){throw e})}function Yl(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),Qn(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);Qn(t)}function ct(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Pu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var dn=Math.random().toString(36).slice(2),$e="__reactFiber$"+dn,Zn="__reactProps$"+dn,Ze="__reactContainer$"+dn,jo="__reactEvents$"+dn,fd="__reactListeners$"+dn,dd="__reactHandles$"+dn;function Et(e){var t=e[$e];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ze]||n[$e]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Pu(e);e!==null;){if(n=e[$e])return n;e=Pu(e)}return t}e=n,n=e.parentNode}return null}function ur(e){return e=e[$e]||e[Ze],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Bt(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(g(33))}function yl(e){return e[Zn]||null}var Ro=[],Wt=-1;function gt(e){return{current:e}}function I(e){0>Wt||(e.current=Ro[Wt],Ro[Wt]=null,Wt--)}function M(e,t){Wt++,Ro[Wt]=e.current,e.current=t}var vt={},oe=gt(vt),de=gt(!1),Tt=vt;function rn(e,t){var n=e.type.contextTypes;if(!n)return vt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function pe(e){return e=e.childContextTypes,e!=null}function Jr(){I(de),I(oe)}function zu(e,t,n){if(oe.current!==vt)throw Error(g(168));M(oe,t),M(de,n)}function da(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(g(108,Gc(e)||"Unknown",l));return V({},n,r)}function qr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vt,Tt=oe.current,M(oe,e),M(de,de.current),!0}function Tu(e,t,n){var r=e.stateNode;if(!r)throw Error(g(169));n?(e=da(e,t,Tt),r.__reactInternalMemoizedMergedChildContext=e,I(de),I(oe),M(oe,e)):I(de),M(de,n)}var He=null,gl=!1,Xl=!1;function pa(e){He===null?He=[e]:He.push(e)}function pd(e){gl=!0,pa(e)}function wt(){if(!Xl&&He!==null){Xl=!0;var e=0,t=O;try{var n=He;for(O=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}He=null,gl=!1}catch(l){throw He!==null&&(He=He.slice(e+1)),Us(fi,wt),l}finally{O=t,Xl=!1}}return null}var Ht=[],Qt=0,br=null,el=0,_e=[],xe=0,Lt=null,Ke=1,Ye="";function _t(e,t){Ht[Qt++]=el,Ht[Qt++]=br,br=e,el=t}function ma(e,t,n){_e[xe++]=Ke,_e[xe++]=Ye,_e[xe++]=Lt,Lt=e;var r=Ke;e=Ye;var l=32-Oe(r)-1;r&=~(1<<l),n+=1;var o=32-Oe(t)+l;if(30<o){var i=l-l%5;o=(r&(1<<i)-1).toString(32),r>>=i,l-=i,Ke=1<<32-Oe(t)+l|n<<l|r,Ye=o+e}else Ke=1<<o|n<<l|r,Ye=e}function ki(e){e.return!==null&&(_t(e,1),ma(e,1,0))}function Si(e){for(;e===br;)br=Ht[--Qt],Ht[Qt]=null,el=Ht[--Qt],Ht[Qt]=null;for(;e===Lt;)Lt=_e[--xe],_e[xe]=null,Ye=_e[--xe],_e[xe]=null,Ke=_e[--xe],_e[xe]=null}var ge=null,ve=null,U=!1,Re=null;function ha(e,t){var n=Ee(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.del
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:l,digest:null}}function bl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Uo(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var _d=typeof WeakMap=="function"?WeakMap:Map;function Wa(e,t,n){n=Xe(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){sl||(sl=!0,Xo=r),Uo(e,t)},n}function Ha(e,t,n){n=Xe(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){Uo(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Uo(e,t),typeof r!="function"&&(dt===null?dt=new Set([this]):dt.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function $u(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new _d;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Id.bind(null,e,t,n),t.then(e,e))}function Au(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Vu(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Xe(-1,1),t.tag=2,ft(n,t,1))),n.lanes|=1),e)}var xd=be.ReactCurrentOwner,fe=!1;function ie(e,t,n,r){t.child=e===null?_a(t,null,n,r):on(t,e.child,n,r)}function Bu(e,t,n,r,l){n=n.render;var o=t.ref;return en(t,l),r=Ri(e,t,n,r,o,l),n=Oi(),e!==null&&!fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,qe(e,t,l)):(U&&n&&ki(t),t.flags|=1,ie(e,t,r,l),t.child)}function Wu(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!Wi(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Qa(e,t,o,r,l)):(e=$r(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:Yn,n(i,r)&&e.ref===t.ref)return qe(e,t,l)}return t.flags|=1,e=mt(o,r),e.ref=t.ref,e.return=t,t.child=e}function Qa(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(Yn(o,r)&&e.ref===t.ref)if(fe=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(fe=!0);else return t.lanes=e.lanes,qe(e,t,l)}return $o(e,t,n,r,l)}function Ka(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},M(Xt,he),he|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,M(Xt,he),he|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,M(Xt,he),he|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,M(Xt,he),he|=r;return ie(e,t,l,n),t.child}function Ya(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function $o(e,t,n,r,l){var o=pe(n)?Tt:oe.current;return o=rn(t,o),en(t,l),n=Ri(e,t,n,r,o,l),r=Oi(),e!==null&&!fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,qe(e,t,l)):(U&&r&&ki(t),t.flags|=1,ie(e,t,n,l),t.child)}function Hu(e,t,n,r,l){if(pe(n)){var o=!0;qr(t)}else o=!1;if(en(t,l),t.stateNode===null)Ir(e,t),ka(t,n,r),Fo(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,u=t.memoizedProps;i.props=u;var s=i.context,a=n.contextType;typeof a=="object"&&a!==null?a=Ne(a):(a=pe(n)?Tt:oe.current,a=rn(t,a));var h=n.getDerivedStateFromProps,m=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function";m||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==r||s!==a)&&Du(t,i,r,a),nt=!1;var p=t.memoizedState;i.state=p,rl(t,r,i,l),s=t.memoizedState,u!==r||p!==s||de.current||nt?(typeof h=="function"&&(Io(t,n,h,r),s=t.memoizedState),(u=nt||Mu(t,n,u,r,p,s,a))?(m||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.compon
${e.stack}`:r}let rr=0;const Vr=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},Jd=typeof Vr.encodeInto=="function"?function(e,t){return Vr.encodeInto(e,t)}:function(e,t){const n=Vr.encode(e);return t.set(n),{read:e.length,written:n.length}};function bo(e,t,n){if(n===void 0){const u=Vr.encode(e),s=t(u.length,1)>>>0;return Ar().subarray(s,s+u.length).set(u),rr=u.length,s}let r=e.length,l=t(r,1)>>>0;const o=Ar();let i=0;for(;i<r;i++){const u=e.charCodeAt(i);if(u>127)break;o[l+i]=u}if(i!==r){i!==0&&(e=e.slice(i)),l=n(l,r,r=i+e.length*3,1)>>>0;const u=Ar().subarray(l+i,l+r),s=Jd(e,u);i+=s.written}return rr=i,l}let Tn=null;function Gt(){return(Tn===null||Tn.byteLength===0)&&(Tn=new Int32Array(X.memory.buffer)),Tn}function qd(e){try{const r=X.__wbindgen_add_to_stack_pointer(-16),l=bo(e,X.__wbindgen_malloc,X.__wbindgen_realloc),o=rr;X.unitdc_input(r,l,o);var t=Gt()[r/4+0],n=Gt()[r/4+1];if(n)throw Pn(t)}finally{X.__wbindgen_add_to_stack_pointer(16)}}function bd(e){X.unitdc_init(We(e))}function ep(e,t){try{return e.apply(this,t)}catch(n){X.__wbindgen_exn_store(We(n))}}async function tp(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(r){if(e.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}function np(){const e={};return e.wbg={},e.wbg.__wbindgen_object_drop_ref=function(t){Pn(t)},e.wbg.__wbindgen_string_new=function(t,n){const r=ro(t,n);return We(r)},e.wbg.__wbindgen_number_new=function(t){return We(t)},e.wbg.__wbindgen_object_clone_ref=function(t){const n=Fe(t);return We(n)},e.wbg.__wbg_set_841ac57cff3d672b=function(t,n,r){Fe(t)[Pn(n)]=Pn(r)},e.wbg.__wbg_new_abda76e883ba8a5f=function(){const t=new Error;return We(t)},e.wbg.__wbg_stack_658279fe44541cf6=function(t,n){const r=Fe(n).stack,l=bo(r,X.__wbindgen_malloc,X.__wbindgen_realloc),o=rr;Gt()[t/4+1]=o,Gt()[t/4+0]=l},e.wbg.__wbg_error_f851667af71bcfc6=function(t,n){let r,l;try{r=t,l=n,console.error(ro(t,n))}finally{X.__wbindgen_free(r,l,1)}},e.wbg.__wbg_new_898a68150f225f2e=function(){const t=new Array;return We(t)},e.wbg.__wbg_new_b51585de1b234aff=function(){const t=new Object;return We(t)},e.wbg.__wbg_set_502d29070ea18557=function(t,n,r){Fe(t)[n>>>0]=Pn(r)},e.wbg.__wbg_call_4c92f6aec1e1d6e6=function(){return ep(function(t,n,r,l){const o=Fe(t).call(Fe(n),Fe(r),Fe(l));return We(o)},arguments)},e.wbg.__wbindgen_debug_string=function(t,n){const r=qo(Fe(n)),l=bo(r,X.__wbindgen_malloc,X.__wbindgen_realloc),o=rr;Gt()[t/4+1]=o,Gt()[t/4+0]=l},e.wbg.__wbindgen_throw=function(t,n){throw new Error(ro(t,n))},e}function rp(e,t){return X=e.exports,gc.__wbindgen_wasm_module=t,Tn=null,zn=null,X.__wbindgen_start(),X}async function gc(e){if(X!==void 0)return X;typeof e>"u"&&(e=new URL(""+new URL("unitdc_web_bg-66b447f4.wasm",import.meta.url).href,self.location));const t=np();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:n,module:r}=await tp(await e,t);return rp(n,r)}function lp(e){return N.jsxs("div",{className:"unitdc-io error",children:[N.jsx("label",{className:"prompt",children:"Error:"}),N.jsx("div",{className:"error-text",children:e.text})]})}function op(e){return N.jsxs("div",{className:"unitdc-io output",children:[N.jsx("label",{className:"prompt",children:"Out:"}),N.jsx("div",{className:"output-text",style:{paddingLeft:"2em"},children:e.quantities.map((t,n)=>`[${e.quantities.length-1-n}]: ${t._str}`).reverse().join(`\r
`)})]})}function ip(){const[e,t]=ye.useState(0);return()=>t(()=>e+1)}function up(e,t){switch(t.type){case"add":return[...e,t.cell];case"updateText":const n=[...e];return n[t.index].text=t.text,n;default:throw new Error}}function sp(){const[e,t]=ye.useReducer(up,[]),[n,r]=ye.useState(!1),[l,o]=ye.useState(""),i=ip(),u=p=>{p.forEach(v=>{t({type:"add",cell:v})})},s=()=>e.filter(p=>p.type==="input").slice(-1)[0],a=(p,v)=>{let w=s();l!=v&&(w.text+=" "),v==="unit"&&(p="("+p+")"),w.text+=p,o(v),i()},h=(p,v)=>{p==="quantity"?u([{type:"output",quantity:[v]}]):p==="quantity_list"?u([{type:"output",quantity:v}]):p==="message"&&u([{type:"message",text:v}])},m=()=>{let p=!1,v=s().text;console.log("submit",v);try{qd(v),p=!0}catch(w){u([{type:"error",text:w.toString()}])}u([{type:"input",text:p?"":v}])};return n||(r(!0),gc().then(()=>{bd(h),u([{type:"input",text:""}])})),N.jsxs(N.Fragment,{children:[N.jsxs("div",{className:"unitdc-container",children:[N.jsxs("h1",{style:{whiteSpace:"nowrap"},children:["UnitDC",N.jsx("span",{style:{fontStyle:"italic",fontWeight:"lighter",fontSize:"smaller"},id:"unitdc-description",children:"Unit-aware Desk Calculator"})]}),N.jsx("div",{id:"unitdc-dialog",children:e.map((p,v)=>{switch(p.type){case"output":return N.jsx(op,{quantities:p.quantity},v);case"input":return N.jsx(Gd,{number:v,text:p.text,active:v==e.length-1,onchange:w=>{console.log("onchange",w),t({type:"updateText",index:v,text:w})},onsubmit:m},v);case"error":return N.jsx(lp,{text:p.text},v);case"message":return N.jsxs("div",{children:["Message: ",p.text]},v)}})}),N.jsx("div",{className:"unitdc-keyboard-spacer"})]}),N.jsx(Xd,{onToken:a,onUiAction:p=>{switch(p){case"append_space":s().text+=" ",i();break;case"append_newline":s().text+=`
`,i();break;case"clear":s().text="",i();break;case"backspace":s().text=s().text.slice(0,-1),i();break;case"submit":m();break}}})]})}lo.createRoot(document.getElementById("root")).render(N.jsx(Ic.StrictMode,{children:N.jsx(sp,{})}));