diff --git "a/assets/index-DzdXI2pl.js" "b/assets/index-DzdXI2pl.js" new file mode 100644--- /dev/null +++ "b/assets/index-DzdXI2pl.js" @@ -0,0 +1,40 @@ +(function(){const R=document.createElement("link").relList;if(R&&R.supports&&R.supports("modulepreload"))return;for(const F of document.querySelectorAll('link[rel="modulepreload"]'))ue(F);new MutationObserver(F=>{for(const U of F)if(U.type==="childList")for(const H of U.addedNodes)H.tagName==="LINK"&&H.rel==="modulepreload"&&ue(H)}).observe(document,{childList:!0,subtree:!0});function m(F){const U={};return F.integrity&&(U.integrity=F.integrity),F.referrerPolicy&&(U.referrerPolicy=F.referrerPolicy),F.crossOrigin==="use-credentials"?U.credentials="include":F.crossOrigin==="anonymous"?U.credentials="omit":U.credentials="same-origin",U}function ue(F){if(F.ep)return;F.ep=!0;const U=m(F);fetch(F.href,U)}})();function Ma(k){return k&&k.__esModule&&Object.prototype.hasOwnProperty.call(k,"default")?k.default:k}var Co={exports:{}},gr={},_o={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 Ca;function jf(){if(Ca)return V;Ca=1;var k=Symbol.for("react.element"),R=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),ue=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),H=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),ce=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),ee=Symbol.iterator;function Z(c){return c===null||typeof c!="object"?null:(c=ee&&c[ee]||c["@@iterator"],typeof c=="function"?c:null)}var Ne={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Pe=Object.assign,J={};function G(c,v,B){this.props=c,this.context=v,this.refs=J,this.updater=B||Ne}G.prototype.isReactComponent={},G.prototype.setState=function(c,v){if(typeof c!="object"&&typeof c!="function"&&c!=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,c,v,"setState")},G.prototype.forceUpdate=function(c){this.updater.enqueueForceUpdate(this,c,"forceUpdate")};function je(){}je.prototype=G.prototype;function ze(c,v,B){this.props=c,this.context=v,this.refs=J,this.updater=B||Ne}var Oe=ze.prototype=new je;Oe.constructor=ze,Pe(Oe,G.prototype),Oe.isPureReactComponent=!0;var ve=Array.isArray,Me=Object.prototype.hasOwnProperty,we={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function I(c,v,B){var W,K={},Y=null,te=null;if(v!=null)for(W in v.ref!==void 0&&(te=v.ref),v.key!==void 0&&(Y=""+v.key),v)Me.call(v,W)&&!E.hasOwnProperty(W)&&(K[W]=v[W]);var q=arguments.length-2;if(q===1)K.children=B;else if(1>>1,v=S[c];if(0>>1;cF(K,_))YF(te,K)?(S[c]=te,S[Y]=_,c=Y):(S[c]=K,S[W]=_,c=W);else if(YF(te,_))S[c]=te,S[Y]=_,c=Y;else break e}}return M}function F(S,M){var _=S.sortIndex-M.sortIndex;return _!==0?_:S.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var U=performance;k.unstable_now=function(){return U.now()}}else{var H=Date,A=H.now();k.unstable_now=function(){return H.now()-A}}var T=[],ce=[],fe=1,ee=null,Z=3,Ne=!1,Pe=!1,J=!1,G=typeof setTimeout=="function"?setTimeout:null,je=typeof clearTimeout=="function"?clearTimeout:null,ze=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Oe(S){for(var M=m(ce);M!==null;){if(M.callback===null)ue(ce);else if(M.startTime<=S)ue(ce),M.sortIndex=M.expirationTime,R(T,M);else break;M=m(ce)}}function ve(S){if(J=!1,Oe(S),!Pe)if(m(T)!==null)Pe=!0,We(Me);else{var M=m(ce);M!==null&&me(ve,M.startTime-S)}}function Me(S,M){Pe=!1,J&&(J=!1,je(I),I=-1),Ne=!0;var _=Z;try{for(Oe(M),ee=m(T);ee!==null&&(!(ee.expirationTime>M)||S&&!Sn());){var c=ee.callback;if(typeof c=="function"){ee.callback=null,Z=ee.priorityLevel;var v=c(ee.expirationTime<=M);M=k.unstable_now(),typeof v=="function"?ee.callback=v:ee===m(T)&&ue(T),Oe(M)}else ue(T);ee=m(T)}if(ee!==null)var B=!0;else{var W=m(ce);W!==null&&me(ve,W.startTime-M),B=!1}return B}finally{ee=null,Z=_,Ne=!1}}var we=!1,E=null,I=-1,$=5,le=-1;function Sn(){return!(k.unstable_now()-le<$)}function Ge(){if(E!==null){var S=k.unstable_now();le=S;var M=!0;try{M=E(!0,S)}finally{M?Ae():(we=!1,E=null)}}else we=!1}var Ae;if(typeof ze=="function")Ae=function(){ze(Ge)};else if(typeof MessageChannel<"u"){var Le=new MessageChannel,hn=Le.port2;Le.port1.onmessage=Ge,Ae=function(){hn.postMessage(null)}}else Ae=function(){G(Ge,0)};function We(S){E=S,we||(we=!0,Ae())}function me(S,M){I=G(function(){S(k.unstable_now())},M)}k.unstable_IdlePriority=5,k.unstable_ImmediatePriority=1,k.unstable_LowPriority=4,k.unstable_NormalPriority=3,k.unstable_Profiling=null,k.unstable_UserBlockingPriority=2,k.unstable_cancelCallback=function(S){S.callback=null},k.unstable_continueExecution=function(){Pe||Ne||(Pe=!0,We(Me))},k.unstable_forceFrameRate=function(S){0>S||125c?(S.sortIndex=_,R(ce,S),m(T)===null&&S===m(ce)&&(J?(je(I),I=-1):J=!0,me(ve,_-c))):(S.sortIndex=v,R(T,S),Pe||Ne||(Pe=!0,We(Me))),S},k.unstable_shouldYield=Sn,k.unstable_wrapCallback=function(S){var M=Z;return function(){var _=Z;Z=M;try{return S.apply(this,arguments)}finally{Z=_}}}}(zo)),zo}var La;function Ff(){return La||(La=1,Po.exports=If()),Po.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 Ra;function Uf(){if(Ra)return Xe;Ra=1;var k=Lo(),R=Ff();function m(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),T=Object.prototype.hasOwnProperty,ce=/^[: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]*$/,fe={},ee={};function Z(e){return T.call(ee,e)?!0:T.call(fe,e)?!1:ce.test(e)?ee[e]=!0:(fe[e]=!0,!1)}function Ne(e,n,t,r){if(t!==null&&t.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return r?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Pe(e,n,t,r){if(n===null||typeof n>"u"||Ne(e,n,t,r))return!0;if(r)return!1;if(t!==null)switch(t.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function J(e,n,t,r,l,i,o){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=i,this.removeEmptyString=o}var G={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){G[e]=new J(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];G[n]=new J(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){G[e]=new J(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){G[e]=new J(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){G[e]=new J(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){G[e]=new J(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){G[e]=new J(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){G[e]=new J(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){G[e]=new J(e,5,!1,e.toLowerCase(),null,!1,!1)});var je=/[\-:]([a-z])/g;function ze(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 n=e.replace(je,ze);G[n]=new J(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(je,ze);G[n]=new J(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(je,ze);G[n]=new J(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){G[e]=new J(e,1,!1,e.toLowerCase(),null,!1,!1)}),G.xlinkHref=new J("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){G[e]=new J(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oe(e,n,t,r){var l=G.hasOwnProperty(n)?G[n]:null;(l!==null?l.type!==0:r||!(2u||l[o]!==i[u]){var s=` +`+l[o].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=o&&0<=u);break}}}finally{B=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?v(e):""}function K(e){switch(e.tag){case 5:return v(e.type);case 16:return v("Lazy");case 13:return v("Suspense");case 19:return v("SuspenseList");case 0:case 2:case 15:return e=W(e.type,!1),e;case 11:return e=W(e.type.render,!1),e;case 1:return e=W(e.type,!0),e;default:return""}}function Y(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 E:return"Fragment";case we:return"Portal";case $:return"Profiler";case I:return"StrictMode";case Ae:return"Suspense";case Le:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Sn:return(e.displayName||"Context")+".Consumer";case le:return(e._context.displayName||"Context")+".Provider";case Ge:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hn:return n=e.displayName||null,n!==null?n:Y(e.type)||"Memo";case We:n=e._payload,e=e._init;try{return Y(e(n))}catch{}}return null}function te(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Y(n);case 8:return n===I?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function q(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function se(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ze(e){var n=se(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var l=t.get,i=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function wr(e){e._valueTracker||(e._valueTracker=Ze(e))}function Ro(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=se(e)?e.checked?"true":"false":e.value),e=r,e!==t?(n.setValue(e),!0):!1}function kr(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 Rl(e,n){var t=n.checked;return _({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function To(e,n){var t=n.defaultValue==null?"":n.defaultValue,r=n.checked!=null?n.checked:n.defaultChecked;t=q(n.value!=null?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function jo(e,n){n=n.checked,n!=null&&Oe(e,"checked",n,!1)}function Tl(e,n){jo(e,n);var t=q(n.value),r=n.type;if(t!=null)r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?jl(e,n.type,t):n.hasOwnProperty("defaultValue")&&jl(e,n.type,q(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Oo(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!(r!=="submit"&&r!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function jl(e,n,t){(n!=="number"||kr(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var Ot=Array.isArray;function st(e,n,t,r){if(e=e.options,n){n={};for(var l=0;l"+n.valueOf().toString()+"",n=Sr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Mt(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=n;return}}e.textContent=n}var Dt={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},Ia=["Webkit","ms","Moz","O"];Object.keys(Dt).forEach(function(e){Ia.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Dt[n]=Dt[e]})});function Ao(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||Dt.hasOwnProperty(e)&&Dt[e]?(""+n).trim():n+"px"}function Bo(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var r=t.indexOf("--")===0,l=Ao(t,n[t],r);t==="float"&&(t="cssFloat"),r?e.setProperty(t,l):e[t]=l}}var Fa=_({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 Dl(e,n){if(n){if(Fa[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(m(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(m(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(m(61))}if(n.style!=null&&typeof n.style!="object")throw Error(m(62))}}function Il(e,n){if(e.indexOf("-")===-1)return typeof n.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 Fl=null;function Ul(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Al=null,at=null,ct=null;function Vo(e){if(e=rr(e)){if(typeof Al!="function")throw Error(m(280));var n=e.stateNode;n&&(n=Hr(n),Al(e.stateNode,e.type,n))}}function Wo(e){at?ct?ct.push(e):ct=[e]:at=e}function $o(){if(at){var e=at,n=ct;if(ct=at=null,Vo(e),n)for(e=0;e>>=0,e===0?32:31-(Xa(e)/Ga|0)|0}var Nr=64,Pr=4194304;function At(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 zr(e,n){var t=e.pendingLanes;if(t===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,o=t&268435455;if(o!==0){var u=o&~l;u!==0?r=At(u):(i&=o,i!==0&&(r=At(i)))}else o=t&~l,o!==0?r=At(o):i!==0&&(r=At(i));if(r===0)return 0;if(n!==0&&n!==r&&!(n&l)&&(l=r&-r,i=n&-n,l>=i||l===16&&(i&4194240)!==0))return n;if(r&4&&(r|=t&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=r;0t;t++)n.push(e);return n}function Bt(e,n,t){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-sn(n),e[n]=t}function ba(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Xt),yu=" ",gu=!1;function wu(e,n){switch(e){case"keyup":return Pc.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ku(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pt=!1;function Lc(e,n){switch(e){case"compositionend":return ku(n);case"keypress":return n.which!==32?null:(gu=!0,yu);case"textInput":return e=n.data,e===yu&&gu?null:e;default:return null}}function Rc(e,n){if(pt)return e==="compositionend"||!ri&&wu(e,n)?(e=fu(),Or=Jl=Mn=null,pt=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:t,offset:n-e};e=r}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=Pu(t)}}function Lu(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Lu(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Ru(){for(var e=window,n=kr();n instanceof e.HTMLIFrameElement;){try{var t=typeof n.contentWindow.location.href=="string"}catch{t=!1}if(t)e=n.contentWindow;else break;n=kr(e.document)}return n}function oi(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Ac(e){var n=Ru(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Lu(t.ownerDocument.documentElement,t)){if(r!==null&&oi(t)){if(n=r.start,e=r.end,e===void 0&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if(e=(n=t.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var l=t.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=zu(t,i);var o=zu(t,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(n=n.createRange(),n.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(n),e.extend(o.node,o.offset)):(n.setEnd(o.node,o.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,mt=null,ui=null,qt=null,si=!1;function Tu(e,n,t){var r=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;si||mt==null||mt!==kr(r)||(r=mt,"selectionStart"in r&&oi(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}),qt&&Jt(qt,r)||(qt=r,r=Vr(ui,"onSelect"),0wt||(e.current=ki[wt],ki[wt]=null,wt--)}function re(e,n){wt++,ki[wt]=e.current,e.current=n}var Un={},De=Fn(Un),$e=Fn(!1),Jn=Un;function kt(e,n){var t=e.type.contextTypes;if(!t)return Un;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in t)l[i]=n[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=l),l}function He(e){return e=e.childContextTypes,e!=null}function Qr(){oe($e),oe(De)}function Ku(e,n,t){if(De.current!==Un)throw Error(m(168));re(De,n),re($e,t)}function Yu(e,n,t){var r=e.stateNode;if(n=n.childContextTypes,typeof r.getChildContext!="function")return t;r=r.getChildContext();for(var l in r)if(!(l in n))throw Error(m(108,te(e)||"Unknown",l));return _({},t,r)}function Kr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Un,Jn=De.current,re(De,e),re($e,$e.current),!0}function Xu(e,n,t){var r=e.stateNode;if(!r)throw Error(m(169));t?(e=Yu(e,n,Jn),r.__reactInternalMemoizedMergedChildContext=e,oe($e),oe(De),re(De,e)):oe($e),re($e,t)}var En=null,Yr=!1,Si=!1;function Gu(e){En===null?En=[e]:En.push(e)}function Jc(e){Yr=!0,Gu(e)}function An(){if(!Si&&En!==null){Si=!0;var e=0,n=b;try{var t=En;for(b=1;e>=o,l-=o,Cn=1<<32-sn(n)+l|t<D?(_e=O,O=null):_e=O.sibling;var X=h(f,O,d[D],w);if(X===null){O===null&&(O=_e);break}e&&O&&X.alternate===null&&n(f,O),a=i(X,a,D),j===null?z=X:j.sibling=X,j=X,O=_e}if(D===d.length)return t(f,O),ae&&bn(f,D),z;if(O===null){for(;DD?(_e=O,O=null):_e=O.sibling;var Xn=h(f,O,X.value,w);if(Xn===null){O===null&&(O=_e);break}e&&O&&Xn.alternate===null&&n(f,O),a=i(Xn,a,D),j===null?z=Xn:j.sibling=Xn,j=Xn,O=_e}if(X.done)return t(f,O),ae&&bn(f,D),z;if(O===null){for(;!X.done;D++,X=d.next())X=g(f,X.value,w),X!==null&&(a=i(X,a,D),j===null?z=X:j.sibling=X,j=X);return ae&&bn(f,D),z}for(O=r(f,O);!X.done;D++,X=d.next())X=x(O,f,D,X.value,w),X!==null&&(e&&X.alternate!==null&&O.delete(X.key===null?D:X.key),a=i(X,a,D),j===null?z=X:j.sibling=X,j=X);return e&&O.forEach(function(Tf){return n(f,Tf)}),ae&&bn(f,D),z}function ge(f,a,d,w){if(typeof d=="object"&&d!==null&&d.type===E&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case Me:e:{for(var z=d.key,j=a;j!==null;){if(j.key===z){if(z=d.type,z===E){if(j.tag===7){t(f,j.sibling),a=l(j,d.props.children),a.return=f,f=a;break e}}else if(j.elementType===z||typeof z=="object"&&z!==null&&z.$$typeof===We&&ns(z)===j.type){t(f,j.sibling),a=l(j,d.props),a.ref=lr(f,j,d),a.return=f,f=a;break e}t(f,j);break}else n(f,j);j=j.sibling}d.type===E?(a=ut(d.props.children,f.mode,w,d.key),a.return=f,f=a):(w=Sl(d.type,d.key,d.props,null,f.mode,w),w.ref=lr(f,a,d),w.return=f,f=w)}return o(f);case we:e:{for(j=d.key;a!==null;){if(a.key===j)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){t(f,a.sibling),a=l(a,d.children||[]),a.return=f,f=a;break e}else{t(f,a);break}else n(f,a);a=a.sibling}a=wo(d,f.mode,w),a.return=f,f=a}return o(f);case We:return j=d._init,ge(f,a,j(d._payload),w)}if(Ot(d))return N(f,a,d,w);if(M(d))return P(f,a,d,w);Jr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(t(f,a.sibling),a=l(a,d),a.return=f,f=a):(t(f,a),a=go(d,f.mode,w),a.return=f,f=a),o(f)):t(f,a)}return ge}var Ct=ts(!0),rs=ts(!1),qr=Fn(null),br=null,_t=null,Pi=null;function zi(){Pi=_t=br=null}function Li(e){var n=qr.current;oe(qr),e._currentValue=n}function Ri(e,n,t){for(;e!==null;){var r=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,r!==null&&(r.childLanes|=n)):r!==null&&(r.childLanes&n)!==n&&(r.childLanes|=n),e===t)break;e=e.return}}function Nt(e,n){br=e,Pi=_t=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&n&&(Qe=!0),e.firstContext=null)}function rn(e){var n=e._currentValue;if(Pi!==e)if(e={context:e,memoizedValue:n,next:null},_t===null){if(br===null)throw Error(m(308));_t=e,br.dependencies={lanes:0,firstContext:e}}else _t=_t.next=e;return n}var et=null;function Ti(e){et===null?et=[e]:et.push(e)}function ls(e,n,t,r){var l=n.interleaved;return l===null?(t.next=t,Ti(n)):(t.next=l.next,l.next=t),n.interleaved=t,Nn(e,r)}function Nn(e,n){e.lanes|=n;var t=e.alternate;for(t!==null&&(t.lanes|=n),t=e,e=e.return;e!==null;)e.childLanes|=n,t=e.alternate,t!==null&&(t.childLanes|=n),t=e,e=e.return;return t.tag===3?t.stateNode:null}var Bn=!1;function ji(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function is(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Pn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Vn(e,n,t){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Q&2){var l=r.pending;return l===null?n.next=n:(n.next=l.next,l.next=n),r.pending=n,Nn(e,t)}return l=r.interleaved,l===null?(n.next=n,Ti(r)):(n.next=l.next,l.next=n),r.interleaved=n,Nn(e,t)}function el(e,n,t){if(n=n.updateQueue,n!==null&&(n=n.shared,(t&4194240)!==0)){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,Kl(e,t)}}function os(e,n){var t=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,t===r)){var l=null,i=null;if(t=t.firstBaseUpdate,t!==null){do{var o={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};i===null?l=i=o:i=i.next=o,t=t.next}while(t!==null);i===null?l=i=n:i=i.next=n}else l=i=n;t={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=t;return}e=t.lastBaseUpdate,e===null?t.firstBaseUpdate=n:e.next=n,t.lastBaseUpdate=n}function nl(e,n,t,r){var l=e.updateQueue;Bn=!1;var i=l.firstBaseUpdate,o=l.lastBaseUpdate,u=l.shared.pending;if(u!==null){l.shared.pending=null;var s=u,p=s.next;s.next=null,o===null?i=p:o.next=p,o=s;var y=e.alternate;y!==null&&(y=y.updateQueue,u=y.lastBaseUpdate,u!==o&&(u===null?y.firstBaseUpdate=p:u.next=p,y.lastBaseUpdate=s))}if(i!==null){var g=l.baseState;o=0,y=p=s=null,u=i;do{var h=u.lane,x=u.eventTime;if((r&h)===h){y!==null&&(y=y.next={eventTime:x,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var N=e,P=u;switch(h=n,x=t,P.tag){case 1:if(N=P.payload,typeof N=="function"){g=N.call(x,g,h);break e}g=N;break e;case 3:N.flags=N.flags&-65537|128;case 0:if(N=P.payload,h=typeof N=="function"?N.call(x,g,h):N,h==null)break e;g=_({},g,h);break e;case 2:Bn=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,h=l.effects,h===null?l.effects=[u]:h.push(u))}else x={eventTime:x,lane:h,tag:u.tag,payload:u.payload,callback:u.callback,next:null},y===null?(p=y=x,s=g):y=y.next=x,o|=h;if(u=u.next,u===null){if(u=l.shared.pending,u===null)break;h=u,u=h.next,h.next=null,l.lastBaseUpdate=h,l.shared.pending=null}}while(!0);if(y===null&&(s=g),l.baseState=s,l.firstBaseUpdate=p,l.lastBaseUpdate=y,n=l.shared.interleaved,n!==null){l=n;do o|=l.lane,l=l.next;while(l!==n)}else i===null&&(l.shared.lanes=0);rt|=o,e.lanes=o,e.memoizedState=g}}function us(e,n,t){if(e=n.effects,n.effects=null,e!==null)for(n=0;nt?t:4,e(!0);var r=Fi.transition;Fi.transition={};try{e(!1),n()}finally{b=t,Fi.transition=r}}function Ns(){return ln().memoizedState}function nf(e,n,t){var r=Qn(e);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},Ps(e))zs(n,t);else if(t=ls(e,n,t,r),t!==null){var l=Ve();mn(t,e,r,l),Ls(t,n,r)}}function tf(e,n,t){var r=Qn(e),l={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(Ps(e))zs(n,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=n.lastRenderedReducer,i!==null))try{var o=n.lastRenderedState,u=i(o,t);if(l.hasEagerState=!0,l.eagerState=u,an(u,o)){var s=n.interleaved;s===null?(l.next=l,Ti(n)):(l.next=s.next,s.next=l),n.interleaved=l;return}}catch{}finally{}t=ls(e,n,l,r),t!==null&&(l=Ve(),mn(t,e,r,l),Ls(t,n,r))}}function Ps(e){var n=e.alternate;return e===pe||n!==null&&n===pe}function zs(e,n){sr=ll=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function Ls(e,n,t){if(t&4194240){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,Kl(e,t)}}var ul={readContext:rn,useCallback:Ie,useContext:Ie,useEffect:Ie,useImperativeHandle:Ie,useInsertionEffect:Ie,useLayoutEffect:Ie,useMemo:Ie,useReducer:Ie,useRef:Ie,useState:Ie,useDebugValue:Ie,useDeferredValue:Ie,useTransition:Ie,useMutableSource:Ie,useSyncExternalStore:Ie,useId:Ie,unstable_isNewReconciler:!1},rf={readContext:rn,useCallback:function(e,n){return wn().memoizedState=[e,n===void 0?null:n],e},useContext:rn,useEffect:gs,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,il(4194308,4,Ss.bind(null,n,e),t)},useLayoutEffect:function(e,n){return il(4194308,4,e,n)},useInsertionEffect:function(e,n){return il(4,2,e,n)},useMemo:function(e,n){var t=wn();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=wn();return n=t!==void 0?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=nf.bind(null,pe,e),[r.memoizedState,e]},useRef:function(e){var n=wn();return e={current:e},n.memoizedState=e},useState:vs,useDebugValue:Hi,useDeferredValue:function(e){return wn().memoizedState=e},useTransition:function(){var e=vs(!1),n=e[0];return e=ef.bind(null,e[1]),wn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=pe,l=wn();if(ae){if(t===void 0)throw Error(m(407));t=t()}else{if(t=n(),Ce===null)throw Error(m(349));tt&30||fs(r,n,t)}l.memoizedState=t;var i={value:t,getSnapshot:n};return l.queue=i,gs(ps.bind(null,r,i,e),[e]),r.flags|=2048,fr(9,ds.bind(null,r,i,t,n),void 0,null),t},useId:function(){var e=wn(),n=Ce.identifierPrefix;if(ae){var t=_n,r=Cn;t=(r&~(1<<32-sn(r)-1)).toString(32)+t,n=":"+n+"R"+t,t=ar++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(t,{is:r.is}):(e=o.createElement(t),t==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,t),e[yn]=n,e[tr]=r,Gs(e,n,!1,!1),n.stateNode=e;e:{switch(o=Il(t,r),t){case"dialog":ie("cancel",e),ie("close",e),l=r;break;case"iframe":case"object":case"embed":ie("load",e),l=r;break;case"video":case"audio":for(l=0;lTt&&(n.flags|=128,r=!0,dr(i,!1),n.lanes=4194304)}else{if(!r)if(e=tl(o),e!==null){if(n.flags|=128,r=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),dr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ae)return Fe(n),null}else 2*ye()-i.renderingStartTime>Tt&&t!==1073741824&&(n.flags|=128,r=!0,dr(i,!1),n.lanes=4194304);i.isBackwards?(o.sibling=n.child,n.child=o):(t=i.last,t!==null?t.sibling=o:n.child=o,i.last=o)}return i.tail!==null?(n=i.tail,i.rendering=n,i.tail=n.sibling,i.renderingStartTime=ye(),n.sibling=null,t=de.current,re(de,r?t&1|2:t&1),n):(Fe(n),null);case 22:case 23:return ho(),r=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(n.flags|=8192),r&&n.mode&1?en&1073741824&&(Fe(n),n.subtreeFlags&6&&(n.flags|=8192)):Fe(n),null;case 24:return null;case 25:return null}throw Error(m(156,n.tag))}function df(e,n){switch(Ei(n),n.tag){case 1:return He(n.type)&&Qr(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Pt(),oe($e),oe(De),Ii(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return Mi(n),null;case 13:if(oe(de),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(m(340));Et()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return oe(de),null;case 4:return Pt(),null;case 10:return Li(n.type._context),null;case 22:case 23:return ho(),null;case 24:return null;default:return null}}var fl=!1,Ue=!1,pf=typeof WeakSet=="function"?WeakSet:Set,C=null;function Lt(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){he(e,n,r)}else t.current=null}function to(e,n,t){try{t()}catch(r){he(e,n,r)}}var qs=!1;function mf(e,n){if(mi=Tr,e=Ru(),oi(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{t.nodeType,i.nodeType}catch{t=null;break e}var o=0,u=-1,s=-1,p=0,y=0,g=e,h=null;n:for(;;){for(var x;g!==t||l!==0&&g.nodeType!==3||(u=o+l),g!==i||r!==0&&g.nodeType!==3||(s=o+r),g.nodeType===3&&(o+=g.nodeValue.length),(x=g.firstChild)!==null;)h=g,g=x;for(;;){if(g===e)break n;if(h===t&&++p===l&&(u=o),h===i&&++y===r&&(s=o),(x=g.nextSibling)!==null)break;g=h,h=g.parentNode}g=x}t=u===-1||s===-1?null:{start:u,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(hi={focusedElem:e,selectionRange:t},Tr=!1,C=n;C!==null;)if(n=C,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,C=e;else for(;C!==null;){n=C;try{var N=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(N!==null){var P=N.memoizedProps,ge=N.memoizedState,f=n.stateNode,a=f.getSnapshotBeforeUpdate(n.elementType===n.type?P:fn(n.type,P),ge);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=n.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(m(163))}}catch(w){he(n,n.return,w)}if(e=n.sibling,e!==null){e.return=n.return,C=e;break}C=n.return}return N=qs,qs=!1,N}function pr(e,n,t){var r=n.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&to(n,t,i)}l=l.next}while(l!==r)}}function dl(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function ro(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function bs(e){var n=e.alternate;n!==null&&(e.alternate=null,bs(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[yn],delete n[tr],delete n[wi],delete n[Gc],delete n[Zc])),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 ea(e){return e.tag===5||e.tag===3||e.tag===4}function na(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ea(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 lo(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=$r));else if(r!==4&&(e=e.child,e!==null))for(lo(e,n,t),e=e.sibling;e!==null;)lo(e,n,t),e=e.sibling}function io(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(io(e,n,t),e=e.sibling;e!==null;)io(e,n,t),e=e.sibling}var Re=null,dn=!1;function Wn(e,n,t){for(t=t.child;t!==null;)ta(e,n,t),t=t.sibling}function ta(e,n,t){if(vn&&typeof vn.onCommitFiberUnmount=="function")try{vn.onCommitFiberUnmount(_r,t)}catch{}switch(t.tag){case 5:Ue||Lt(t,n);case 6:var r=Re,l=dn;Re=null,Wn(e,n,t),Re=r,dn=l,Re!==null&&(dn?(e=Re,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):Re.removeChild(t.stateNode));break;case 18:Re!==null&&(dn?(e=Re,t=t.stateNode,e.nodeType===8?gi(e.parentNode,t):e.nodeType===1&&gi(e,t),Qt(e)):gi(Re,t.stateNode));break;case 4:r=Re,l=dn,Re=t.stateNode.containerInfo,dn=!0,Wn(e,n,t),Re=r,dn=l;break;case 0:case 11:case 14:case 15:if(!Ue&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&to(t,n,o),l=l.next}while(l!==r)}Wn(e,n,t);break;case 1:if(!Ue&&(Lt(t,n),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(u){he(t,n,u)}Wn(e,n,t);break;case 21:Wn(e,n,t);break;case 22:t.mode&1?(Ue=(r=Ue)||t.memoizedState!==null,Wn(e,n,t),Ue=r):Wn(e,n,t);break;default:Wn(e,n,t)}}function ra(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new pf),n.forEach(function(r){var l=Ef.bind(null,e,r);t.has(r)||(t.add(r),r.then(l,l))})}}function pn(e,n){var t=n.deletions;if(t!==null)for(var r=0;rl&&(l=o),r&=~i}if(r=l,r=ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*vf(r/1960))-r,10e?16:e,Hn===null)var r=!1;else{if(e=Hn,Hn=null,yl=0,Q&6)throw Error(m(331));var l=Q;for(Q|=4,C=e.current;C!==null;){var i=C,o=i.child;if(C.flags&16){var u=i.deletions;if(u!==null){for(var s=0;sye()-so?it(e,0):uo|=t),Ye(e,n)}function va(e,n){n===0&&(e.mode&1?(n=Pr,Pr<<=1,!(Pr&130023424)&&(Pr=4194304)):n=1);var t=Ve();e=Nn(e,n),e!==null&&(Bt(e,n,t),Ye(e,t))}function xf(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),va(e,t)}function Ef(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(m(314))}r!==null&&r.delete(n),va(e,t)}var ya;ya=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||$e.current)Qe=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return Qe=!1,cf(e,n,t);Qe=!!(e.flags&131072)}else Qe=!1,ae&&n.flags&1048576&&Zu(n,Gr,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;cl(e,n),e=n.pendingProps;var l=kt(n,De.current);Nt(n,t),l=Ai(null,n,r,e,l,t);var i=Bi();return n.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,He(r)?(i=!0,Kr(n)):i=!1,n.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,ji(n),l.updater=sl,n.stateNode=l,l._reactInternals=n,Ki(n,r,e,t),n=Zi(null,n,r,!0,i,t)):(n.tag=0,ae&&i&&xi(n),Be(null,n,l,t),n=n.child),n;case 16:r=n.elementType;e:{switch(cl(e,n),e=n.pendingProps,l=r._init,r=l(r._payload),n.type=r,l=n.tag=_f(r),e=fn(r,e),l){case 0:n=Gi(null,n,r,e,t);break e;case 1:n=$s(null,n,r,e,t);break e;case 11:n=Us(null,n,r,e,t);break e;case 14:n=As(null,n,r,fn(r.type,e),t);break e}throw Error(m(306,r,""))}return n;case 0:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:fn(r,l),Gi(e,n,r,l,t);case 1:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:fn(r,l),$s(e,n,r,l,t);case 3:e:{if(Hs(n),e===null)throw Error(m(387));r=n.pendingProps,i=n.memoizedState,l=i.element,is(e,n),nl(n,r,null,t);var o=n.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},n.updateQueue.baseState=i,n.memoizedState=i,n.flags&256){l=zt(Error(m(423)),n),n=Qs(e,n,r,t,l);break e}else if(r!==l){l=zt(Error(m(424)),n),n=Qs(e,n,r,t,l);break e}else for(be=In(n.stateNode.containerInfo.firstChild),qe=n,ae=!0,cn=null,t=rs(n,null,r,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Et(),r===l){n=zn(e,n,t);break e}Be(e,n,r,t)}n=n.child}return n;case 5:return ss(n),e===null&&_i(n),r=n.type,l=n.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,vi(r,l)?o=null:i!==null&&vi(r,i)&&(n.flags|=32),Ws(e,n),Be(e,n,o,t),n.child;case 6:return e===null&&_i(n),null;case 13:return Ks(e,n,t);case 4:return Oi(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=Ct(n,null,r,t):Be(e,n,r,t),n.child;case 11:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:fn(r,l),Us(e,n,r,l,t);case 7:return Be(e,n,n.pendingProps,t),n.child;case 8:return Be(e,n,n.pendingProps.children,t),n.child;case 12:return Be(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,l=n.pendingProps,i=n.memoizedProps,o=l.value,re(qr,r._currentValue),r._currentValue=o,i!==null)if(an(i.value,o)){if(i.children===l.children&&!$e.current){n=zn(e,n,t);break e}}else for(i=n.child,i!==null&&(i.return=n);i!==null;){var u=i.dependencies;if(u!==null){o=i.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=Pn(-1,t&-t),s.tag=2;var p=i.updateQueue;if(p!==null){p=p.shared;var y=p.pending;y===null?s.next=s:(s.next=y.next,y.next=s),p.pending=s}}i.lanes|=t,s=i.alternate,s!==null&&(s.lanes|=t),Ri(i.return,t,n),u.lanes|=t;break}s=s.next}}else if(i.tag===10)o=i.type===n.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(m(341));o.lanes|=t,u=o.alternate,u!==null&&(u.lanes|=t),Ri(o,t,n),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===n){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Be(e,n,l.children,t),n=n.child}return n;case 9:return l=n.type,r=n.pendingProps.children,Nt(n,t),l=rn(l),r=r(l),n.flags|=1,Be(e,n,r,t),n.child;case 14:return r=n.type,l=fn(r,n.pendingProps),l=fn(r.type,l),As(e,n,r,l,t);case 15:return Bs(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:fn(r,l),cl(e,n),n.tag=1,He(r)?(e=!0,Kr(n)):e=!1,Nt(n,t),Ts(n,r,l),Ki(n,r,l,t),Zi(null,n,r,!0,e,t);case 19:return Xs(e,n,t);case 22:return Vs(e,n,t)}throw Error(m(156,n.tag))};function ga(e,n){return Jo(e,n)}function Cf(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,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 un(e,n,t,r){return new Cf(e,n,t,r)}function yo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _f(e){if(typeof e=="function")return yo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ge)return 11;if(e===hn)return 14}return 2}function Yn(e,n){var t=e.alternate;return t===null?(t=un(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Sl(e,n,t,r,l,i){var o=2;if(r=e,typeof e=="function")yo(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case E:return ut(t.children,l,i,n);case I:o=8,l|=8;break;case $:return e=un(12,t,n,l|2),e.elementType=$,e.lanes=i,e;case Ae:return e=un(13,t,n,l),e.elementType=Ae,e.lanes=i,e;case Le:return e=un(19,t,n,l),e.elementType=Le,e.lanes=i,e;case me:return xl(t,l,i,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case le:o=10;break e;case Sn:o=9;break e;case Ge:o=11;break e;case hn:o=14;break e;case We:o=16,r=null;break e}throw Error(m(130,e==null?e:typeof e,""))}return n=un(o,t,n,l),n.elementType=e,n.type=r,n.lanes=i,n}function ut(e,n,t,r){return e=un(7,e,r,n),e.lanes=t,e}function xl(e,n,t,r){return e=un(22,e,r,n),e.elementType=me,e.lanes=t,e.stateNode={isHidden:!1},e}function go(e,n,t){return e=un(6,e,null,n),e.lanes=t,e}function wo(e,n,t){return n=un(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Nf(e,n,t,r,l){this.tag=n,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=Ql(0),this.expirationTimes=Ql(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ql(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function ko(e,n,t,r,l,i,o,u,s){return e=new Nf(e,n,t,u,s),n===1?(n=1,i===!0&&(n|=8)):n=0,i=un(3,null,null,n),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},ji(i),e}function Pf(e,n,t){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(k)}catch(R){console.error(R)}}return k(),No.exports=Uf(),No.exports}var ja;function Bf(){if(ja)return Ll;ja=1;var k=Af();return Ll.createRoot=k.createRoot,Ll.hydrateRoot=k.hydrateRoot,Ll}var Vf=Bf();const Wf=Ma(Vf);function $f(k){const R=k==0?0:Math.floor(Math.log(k)/Math.log(1024));return+(k/Math.pow(1024,R)).toFixed(2)*1+["B","kB","MB","GB","TB"][R]}function Hf({text:k,percentage:R,total:m}){return R??(R=0),L.jsx("div",{className:"w-full bg-gray-100 dark:bg-gray-700 text-left rounded-lg overflow-hidden mb-0.5",children:L.jsxs("div",{className:"bg-blue-400 whitespace-nowrap px-1 text-sm",style:{width:`${R}%`},children:[k," (",R.toFixed(2),"%",isNaN(m)?"":` of ${$f(m)}`,")"]})})}const Qf="https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/whisper-timestamps-demo.mp4",Da=ne.forwardRef(({onInputChange:k,onTimeUpdate:R,...m},ue)=>{var Oe,ve,Me,we;const[F,U]=ne.useState(!1),H=ne.useRef(null),A=ne.useRef(null),T=ne.useRef(null),ce=ne.useRef(0);ne.useImperativeHandle(ue,()=>({setMediaTime(E){var I,$;(I=A.current)!=null&&I.src?A.current.currentTime=E:($=T.current)!=null&&$.src&&(T.current.currentTime=E),ce.current=E}}));const fe=(E,I)=>{const $=new Blob([E.slice(0)],{type:I}),le=URL.createObjectURL($);G(E),I.startsWith("audio/")?(T.current.pause(),T.current.removeAttribute("src"),T.current.load(),A.current.src=le):I.startsWith("video/")?(A.current.pause(),A.current.removeAttribute("src"),A.current.load(),T.current.src=le):alert(`Unsupported file type: ${I}`)},ee=E=>{if(!E)return;const I=new FileReader;I.onload=$=>{fe($.target.result,E.type)},I.readAsArrayBuffer(E)},Z=E=>{ee(E.target.files[0])},Ne=E=>{E.preventDefault()},Pe=E=>{E.preventDefault(),U(!1),ee(E.dataTransfer.files[0])},J=E=>{E.target.tagName==="VIDEO"||E.target.tagName==="AUDIO"?(E.preventDefault(),H.current.click()):(E.target.tagName==="INPUT"||H.current.click(),E.stopPropagation())},G=async E=>{const I=new(window.AudioContext||window.webkitAudioContext)({sampleRate:16e3});try{const $=await I.decodeAudioData(E);let le;if($.numberOfChannels===2){const Sn=Math.sqrt(2),Ge=$.getChannelData(0),Ae=$.getChannelData(1);le=new Float32Array(Ge.length);for(let Le=0;Le<$.length;++Le)le[Le]=Sn*(Ge[Le]+Ae[Le])/2}else le=$.getChannelData(0);k(le)}catch($){alert($)}},je=ne.useRef(),ze=ne.useCallback(()=>{var I,$;let E;(I=A.current)!=null&&I.src?E=A.current:($=T.current)!=null&&$.src&&(E=T.current),E&&ce.current!==E.currentTime&&(ce.current=E.currentTime,R(E.currentTime)),je.current=requestAnimationFrame(ze)},[R]);return ne.useEffect(()=>(je.current=requestAnimationFrame(ze),()=>{cancelAnimationFrame(je.current)}),[ze]),L.jsxs("div",{...m,onClick:J,onDragOver:Ne,onDrop:Pe,onDragEnter:E=>U(!0),onDragLeave:E=>U(!1),children:[L.jsx("input",{type:"file",accept:"audio/*,video/*",onChange:Z,ref:H,className:"hidden"}),L.jsx("audio",{ref:A,controls:!0,style:{display:(Oe=A.current)!=null&&Oe.src?"block":"none"},className:"w-full max-h-full"}),L.jsx("video",{ref:T,controls:!0,style:{display:(ve=T.current)!=null&&ve.src?"block":"none"},className:"w-full max-h-full"}),!((Me=A.current)!=null&&Me.src)&&!((we=T.current)!=null&&we.src)&&L.jsxs("div",{className:"w-full flex flex-col items-center justify-center border-2 border-dashed border-gray-300 rounded-md h-[250px]",style:{borderColor:F?"blue":"lightgray"},children:[L.jsxs("span",{className:"text-gray-600 text-center",children:[L.jsx("u",{children:"Drag & drop"})," or ",L.jsx("u",{children:"click"}),L.jsx("br",{}),"to select media"]}),L.jsxs("span",{className:"text-gray-500 text-sm hover:text-gray-800 dark:hover:text-gray-300 mt-2",onClick:async E=>{E.stopPropagation();const I=await fetch(Qf).then($=>$.arrayBuffer());T.current.src=URL.createObjectURL(new Blob([I],{type:"video/mp4"})),fe(I,"video/mp4")},children:["(or ",L.jsx("u",{children:"try an example"}),")"]})]})]})});Da.displayName="MediaInput";const Kf=({chunk:k,currentTime:R,onClick:m,...ue})=>{const{text:F,timestamp:U}=k,[H,A]=U,T=H<=R&&Rce.toFixed(2)).join(" → "),style:{textDecoration:T?"underline":"none",textShadow:T?"0 0 1px #000":"none"},children:F.trim()})]})},Yf=({transcript:k,currentTime:R,setCurrentTime:m,...ue})=>{const F=ne.useMemo(()=>JSON.stringify(k,null,2).replace(/( {4}"timestamp": )\[\s+(\S+)\s+(\S+)\s+\]/gm,"$1[$2 $3]"),[k]),U=()=>{const H=new Blob([F],{type:"application/json"}),A=URL.createObjectURL(H),T=document.createElement("a");T.href=A,T.download="transcript.json",T.click(),URL.revokeObjectURL(A)};return L.jsxs(L.Fragment,{children:[L.jsx("div",{...ue,children:k.chunks.map((H,A)=>L.jsx(Kf,{chunk:H,currentTime:R,onClick:T=>{m(H.timestamp[0])}},A))}),L.jsx("div",{className:"flex justify-center border-t text-sm text-gray-600 max-h-[150px] overflow-y-auto p-2 scrollbar-thin",children:L.jsxs("button",{className:"flex items-center border px-2 py-1 rounded-lg bg-green-400 text-white hover:bg-green-500 cursor-pointer",onClick:U,children:[L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6 mr-1",children:L.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"})}),"Download transcript"]})})]})};function Xf(k){return k=k.toLowerCase(),(k.match(/\w+.?/g)||[]).map(R=>R.charAt(0).toUpperCase()+R.slice(1)).join("")}const Oa={en:"english",zh:"chinese",de:"german",es:"spanish/castilian",ru:"russian",ko:"korean",fr:"french",ja:"japanese",pt:"portuguese",tr:"turkish",pl:"polish",ca:"catalan/valencian",nl:"dutch/flemish",ar:"arabic",sv:"swedish",it:"italian",id:"indonesian",hi:"hindi",fi:"finnish",vi:"vietnamese",he:"hebrew",uk:"ukrainian",el:"greek",ms:"malay",cs:"czech",ro:"romanian/moldavian/moldovan",da:"danish",hu:"hungarian",ta:"tamil",no:"norwegian",th:"thai",ur:"urdu",hr:"croatian",bg:"bulgarian",lt:"lithuanian",la:"latin",mi:"maori",ml:"malayalam",cy:"welsh",sk:"slovak",te:"telugu",fa:"persian",lv:"latvian",bn:"bengali",sr:"serbian",az:"azerbaijani",sl:"slovenian",kn:"kannada",et:"estonian",mk:"macedonian",br:"breton",eu:"basque",is:"icelandic",hy:"armenian",ne:"nepali",mn:"mongolian",bs:"bosnian",kk:"kazakh",sq:"albanian",sw:"swahili",gl:"galician",mr:"marathi",pa:"punjabi/panjabi",si:"sinhala/sinhalese",km:"khmer",sn:"shona",yo:"yoruba",so:"somali",af:"afrikaans",oc:"occitan",ka:"georgian",be:"belarusian",tg:"tajik",sd:"sindhi",gu:"gujarati",am:"amharic",yi:"yiddish",lo:"lao",uz:"uzbek",fo:"faroese",ht:"haitian creole/haitian",ps:"pashto/pushto",tk:"turkmen",nn:"nynorsk",mt:"maltese",sa:"sanskrit",lb:"luxembourgish/letzeburgesch",my:"myanmar/burmese",bo:"tibetan",tl:"tagalog",mg:"malagasy",as:"assamese",tt:"tatar",haw:"hawaiian",ln:"lingala",ha:"hausa",ba:"bashkir",jw:"javanese",su:"sundanese"};function Gf({language:k,setLanguage:R,...m}){const ue=U=>{R(U.target.value)},F=Object.values(Oa).map(Xf);return L.jsx("select",{...m,value:k,onChange:ue,children:Object.keys(Oa).map((U,H)=>L.jsx("option",{value:U,children:F[H]},U))})}async function Zf(){if(!navigator.gpu)return!1;try{return!!await navigator.gpu.requestAdapter()}catch{return!1}}function Jf(){const k=ne.useRef(null),[R,m]=ne.useState(null),[ue,F]=ne.useState(""),[U,H]=ne.useState([]),A=ne.useRef(null),[T,ce]=ne.useState(null),[fe,ee]=ne.useState("en"),[Z,Ne]=ne.useState(null),[Pe,J]=ne.useState(null),[G,je]=ne.useState(0),[ze,Oe]=ne.useState("webgpu"),[ve,Me]=ne.useState("gpu"in navigator?196:77);ne.useEffect(()=>{Zf().then(E=>{Me(E?196:77),Oe(E?"webgpu":"wasm")})},[]),ne.useEffect(()=>{k.current??(k.current=new Worker(new URL("/assets/worker-C0lFRx5p.js",import.meta.url),{type:"module"}));const E=I=>{switch(I.data.status){case"loading":m("loading"),F(I.data.data);break;case"initiate":H($=>[...$,I.data]);break;case"progress":H($=>$.map(le=>le.file===I.data.file?{...le,...I.data}:le));break;case"done":H($=>$.filter(le=>le.file!==I.data.file));break;case"ready":m("ready");break;case"complete":Ne(I.data.result),J(I.data.time),m("ready");break}};return k.current.addEventListener("message",E),()=>{k.current.removeEventListener("message",E)}},[]);const we=ne.useCallback(()=>{Ne(null),J(null),R===null?(m("loading"),k.current.postMessage({type:"load",data:{device:ze}})):(m("running"),k.current.postMessage({type:"run",data:{audio:T,language:fe}}))},[R,T,fe,ze]);return L.jsx("div",{className:"w-screen h-screen text-gray-800 dark:text-gray-200 bg-white dark:bg-gray-900 ",children:L.jsxs("div",{className:"flex flex-col mx-auto items justify-end max-w-[560px] h-full",children:[R==="loading"&&L.jsx("div",{className:"flex justify-center items-center fixed w-screen h-screen bg-black z-10 bg-opacity-[92%] top-0 left-0",children:L.jsxs("div",{className:"w-[500px]",children:[L.jsx("p",{className:"text-center mb-1 text-white text-md",children:ue}),U.map(({file:E,progress:I,total:$},le)=>L.jsx(Hf,{text:E,percentage:I,total:$},le))]})}),L.jsxs("div",{className:"h-full flex justify-center items-center flex-col relative",children:[L.jsxs("div",{className:"flex flex-col items-center mb-1 text-center",children:[L.jsx("h1",{className:"text-5xl font-bold mb-2",children:"Whisper Timestamped"}),L.jsx("h2",{className:"text-xl font-semibold",children:"In-browser speech recognition w/ word-level timestamps"})]}),L.jsxs("div",{className:"w-full min-h-[220px] flex flex-col justify-center items-center p-2",children:[!T&&L.jsxs("p",{className:"mb-2",children:["You are about to download"," ",L.jsx("a",{href:"https://huggingface.co/onnx-community/whisper-base_timestamped",target:"_blank",rel:"noreferrer",className:"font-medium underline",children:"whisper-base (timestamped)"}),", a 73 million parameter speech recognition model with the ability to generate word-level timestamps across 100 different languages. Once loaded, the model (",ve," MB) will be cached and reused when you revisit the page.",L.jsx("br",{}),L.jsx("br",{}),"Everything runs locally in your browser using"," ",L.jsx("a",{href:"https://huggingface.co/docs/transformers.js",target:"_blank",rel:"noreferrer",className:"underline",children:"🤗 Transformers.js"})," ","and ONNX Runtime Web, meaning no API calls are made to a server for inference. You can even disconnect from the internet after the model has loaded!"]}),L.jsxs("div",{className:"flex flex-col w-full m-3",children:[L.jsx("span",{className:"text-sm mb-0.5",children:"Input audio/video"}),L.jsx(Da,{ref:A,className:"flex items-center border rounded-md cursor-pointer min-h-[100px] max-h-[500px] overflow-hidden",onInputChange:E=>ce(E),onTimeUpdate:E=>je(E)})]}),L.jsxs("div",{className:"relative w-full flex justify-center items-center",children:[L.jsx("button",{className:"border px-4 py-2 rounded-lg bg-blue-400 text-white hover:bg-blue-500 disabled:bg-blue-100 disabled:cursor-not-allowed select-none cursor-pointer",onClick:we,disabled:R==="running"||R!==null&&T===null,children:R===null?"Load model":R==="running"?"Running...":"Run model"}),R!==null&&L.jsxs("div",{className:"absolute right-0 bottom-0",children:[L.jsx("span",{className:"text-xs",children:"Language:"}),L.jsx("br",{}),L.jsx(Gf,{className:"border rounded-lg p-1 max-w-[100px] dark:bg-gray-800",language:fe,setLanguage:ee})]})]}),Z&&Pe&&L.jsxs(L.Fragment,{children:[L.jsx("div",{className:"w-full mt-4 border rounded-md",children:L.jsx(Yf,{className:"p-2 max-h-[200px] overflow-y-auto scrollbar-thin select-none",transcript:Z,currentTime:G,setCurrentTime:E=>{je(E),A.current.setMediaTime(E)}})}),L.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-300 text-end p-1",children:["Generation time:"," ",L.jsxs("span",{className:"text-gray-800 dark:text-gray-200 font-semibold",children:[Pe.toFixed(2),"ms"]})]})]})]})]})]})})}Wf.createRoot(document.getElementById("root")).render(L.jsx(Df.StrictMode,{children:L.jsx(Jf,{})}));