(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const h of o.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&s(h)}).observe(document,{childList:!0,subtree:!0});function f(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=f(r);fetch(r.href,o)}})();function wg(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var rr={exports:{}},Zi={};/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var y1;function Og(){if(y1)return Zi;y1=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function f(s,r,o){var h=null;if(o!==void 0&&(h=""+o),r.key!==void 0&&(h=""+r.key),"key"in r){o={};for(var v in r)v!=="key"&&(o[v]=r[v])}else o=r;return r=o.ref,{$$typeof:u,type:s,key:h,ref:r!==void 0?r:null,props:o}}return Zi.Fragment=i,Zi.jsx=f,Zi.jsxs=f,Zi}var g1;function Rg(){return g1||(g1=1,rr.exports=Og()),rr.exports}var O=Rg(),or={exports:{}},Et={};/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var v1;function Dg(){if(v1)return Et;v1=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.iterator;function T(E){return E===null||typeof E!="object"?null:(E=b&&E[b]||E["@@iterator"],typeof E=="function"?E:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G=Object.assign,W={};function J(E,R,k){this.props=E,this.context=R,this.refs=W,this.updater=k||D}J.prototype.isReactComponent={},J.prototype.setState=function(E,R){if(typeof E!="object"&&typeof E!="function"&&E!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,E,R,"setState")},J.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function Z(){}Z.prototype=J.prototype;function $(E,R,k){this.props=E,this.context=R,this.refs=W,this.updater=k||D}var I=$.prototype=new Z;I.constructor=$,G(I,J.prototype),I.isPureReactComponent=!0;var B=Array.isArray;function it(){}var X={H:null,A:null,T:null,S:null},et=Object.prototype.hasOwnProperty;function ut(E,R,k){var w=k.ref;return{$$typeof:u,type:E,key:R,ref:w!==void 0?w:null,props:k}}function st(E,R){return ut(E.type,R,E.props)}function at(E){return typeof E=="object"&&E!==null&&E.$$typeof===u}function _t(E){var R={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(k){return R[k]})}var pt=/\/+/g;function yt(E,R){return typeof E=="object"&&E!==null&&E.key!=null?_t(""+E.key):R.toString(36)}function ot(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(it,it):(E.status="pending",E.then(function(R){E.status==="pending"&&(E.status="fulfilled",E.value=R)},function(R){E.status==="pending"&&(E.status="rejected",E.reason=R)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function N(E,R,k,w,U){var L=typeof E;(L==="undefined"||L==="boolean")&&(E=null);var P=!1;if(E===null)P=!0;else switch(L){case"bigint":case"string":case"number":P=!0;break;case"object":switch(E.$$typeof){case u:case i:P=!0;break;case _:return P=E._init,N(P(E._payload),R,k,w,U)}}if(P)return U=U(E),P=w===""?"."+yt(E,0):w,B(U)?(k="",P!=null&&(k=P.replace(pt,"$&/")+"/"),N(U,R,k,"",function(Yt){return Yt})):U!=null&&(at(U)&&(U=st(U,k+(U.key==null||E&&E.key===U.key?"":(""+U.key).replace(pt,"$&/")+"/")+P)),R.push(U)),1;P=0;var H=w===""?".":w+":";if(B(E))for(var ht=0;ht>>1,gt=N[rt];if(0>>1;rtr(k,lt))wr(U,k)?(N[rt]=U,N[w]=lt,rt=w):(N[rt]=k,N[R]=lt,rt=R);else if(wr(U,lt))N[rt]=U,N[w]=lt,rt=w;else break t}}return V}function r(N,V){var lt=N.sortIndex-V.sortIndex;return lt!==0?lt:N.id-V.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;u.unstable_now=function(){return o.now()}}else{var h=Date,v=h.now();u.unstable_now=function(){return h.now()-v}}var m=[],y=[],_=1,p=null,b=3,T=!1,D=!1,G=!1,W=!1,J=typeof setTimeout=="function"?setTimeout:null,Z=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function I(N){for(var V=f(y);V!==null;){if(V.callback===null)s(y);else if(V.startTime<=N)s(y),V.sortIndex=V.expirationTime,i(m,V);else break;V=f(y)}}function B(N){if(G=!1,I(N),!D)if(f(m)!==null)D=!0,it||(it=!0,_t());else{var V=f(y);V!==null&&ot(B,V.startTime-N)}}var it=!1,X=-1,et=5,ut=-1;function st(){return W?!0:!(u.unstable_now()-utN&&st());){var rt=p.callback;if(typeof rt=="function"){p.callback=null,b=p.priorityLevel;var gt=rt(p.expirationTime<=N);if(N=u.unstable_now(),typeof gt=="function"){p.callback=gt,I(N),V=!0;break e}p===f(m)&&s(m),I(N)}else s(m);p=f(m)}if(p!==null)V=!0;else{var E=f(y);E!==null&&ot(B,E.startTime-N),V=!1}}break t}finally{p=null,b=lt,T=!1}V=void 0}}finally{V?_t():it=!1}}}var _t;if(typeof $=="function")_t=function(){$(at)};else if(typeof MessageChannel<"u"){var pt=new MessageChannel,yt=pt.port2;pt.port1.onmessage=at,_t=function(){yt.postMessage(null)}}else _t=function(){J(at,0)};function ot(N,V){X=J(function(){N(u.unstable_now())},V)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(N){N.callback=null},u.unstable_forceFrameRate=function(N){0>N||125rt?(N.sortIndex=lt,i(y,N),f(m)===null&&N===f(y)&&(G?(Z(X),X=-1):G=!0,ot(B,lt-rt))):(N.sortIndex=gt,i(m,N),D||T||(D=!0,it||(it=!0,_t()))),N},u.unstable_shouldYield=st,u.unstable_wrapCallback=function(N){var V=b;return function(){var lt=b;b=V;try{return N.apply(this,arguments)}finally{b=lt}}}})(mr)),mr}var b1;function Ng(){return b1||(b1=1,hr.exports=zg()),hr.exports}var yr={exports:{}},He={};/** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var S1;function Mg(){if(S1)return He;S1=1;var u=kr();function i(m){var y="https://react.dev/errors/"+m;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(i){console.error(i)}}return u(),yr.exports=Mg(),yr.exports}/** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var T1;function Cg(){if(T1)return Xi;T1=1;var u=Ng(),i=kr(),f=Ug();function s(t){var e="https://react.dev/errors/"+t;if(1gt||(t.current=rt[gt],rt[gt]=null,gt--)}function k(t,e){gt++,rt[gt]=t.current,t.current=e}var w=E(null),U=E(null),L=E(null),P=E(null);function H(t,e){switch(k(L,e),k(U,t),k(w,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?Bd(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=Bd(e),t=Yd(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}R(w),k(w,t)}function ht(){R(w),R(U),R(L)}function Yt(t){t.memoizedState!==null&&k(P,t);var e=w.current,n=Yd(e,t.type);e!==n&&(k(U,t),k(w,n))}function Ft(t){U.current===t&&(R(w),R(U)),P.current===t&&(R(P),Bi._currentValue=lt)}var ae,oe;function Jt(t){if(ae===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);ae=e&&e[1]||"",oe=-1)":-1l||S[a]!==M[l]){var q=` `+S[a].replace(" at new "," at ");return t.displayName&&q.includes("")&&(q=q.replace("",t.displayName)),q}while(1<=a&&0<=l);break}}}finally{Gt=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?Jt(n):""}function je(t,e){switch(t.tag){case 26:case 27:case 5:return Jt(t.type);case 16:return Jt("Lazy");case 13:return t.child!==e&&e!==null?Jt("Suspense Fallback"):Jt("Suspense");case 19:return Jt("SuspenseList");case 0:case 15:return kt(t.type,!1);case 11:return kt(t.type.render,!1);case 1:return kt(t.type,!0);case 31:return Jt("Activity");default:return""}}function Be(t){try{var e="",n=null;do e+=je(t,n),n=t,t=t.return;while(t);return e}catch(a){return` Error generating stack: `+a.message+` `+a.stack}}var qe=Object.prototype.hasOwnProperty,Ce=u.unstable_scheduleCallback,Ae=u.unstable_cancelCallback,wn=u.unstable_shouldYield,nl=u.unstable_requestPaint,xe=u.unstable_now,al=u.unstable_getCurrentPriorityLevel,ll=u.unstable_ImmediatePriority,_e=u.unstable_UserBlockingPriority,ea=u.unstable_NormalPriority,Jc=u.unstable_LowPriority,Wl=u.unstable_IdlePriority,kc=u.log,Ic=u.unstable_setDisableYieldValue,Ua=null,Y=null;function tt(t){if(typeof kc=="function"&&Ic(t),Y&&typeof Y.setStrictMode=="function")try{Y.setStrictMode(Ua,t)}catch{}}var F=Math.clz32?Math.clz32:St,nt=Math.log,ct=Math.LN2;function St(t){return t>>>=0,t===0?32:31-(nt(t)/ct|0)|0}var wt=256,de=262144,Le=4194304;function pn(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ca(t,e,n){var a=t.pendingLanes;if(a===0)return 0;var l=0,c=t.suspendedLanes,d=t.pingedLanes;t=t.warmLanes;var g=a&134217727;return g!==0?(a=g&~c,a!==0?l=pn(a):(d&=g,d!==0?l=pn(d):n||(n=g&~t,n!==0&&(l=pn(n))))):(g=a&~c,g!==0?l=pn(g):d!==0?l=pn(d):n||(n=a&~t,n!==0&&(l=pn(n)))),l===0?0:e!==0&&e!==l&&(e&c)===0&&(c=l&-l,n=e&-e,c>=n||c===32&&(n&4194048)!==0)?e:l}function na(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function h3(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function po(){var t=Le;return Le<<=1,(Le&62914560)===0&&(Le=4194304),t}function Wc(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function $l(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function m3(t,e,n,a,l,c){var d=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var g=t.entanglements,S=t.expirationTimes,M=t.hiddenUpdates;for(n=d&~n;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var b3=/[\n"\\]/g;function cn(t){return t.replace(b3,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function as(t,e,n,a,l,c,d,g){t.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?t.type=d:t.removeAttribute("type"),e!=null?d==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+un(e)):t.value!==""+un(e)&&(t.value=""+un(e)):d!=="submit"&&d!=="reset"||t.removeAttribute("value"),e!=null?ls(t,d,un(e)):n!=null?ls(t,d,un(n)):a!=null&&t.removeAttribute("value"),l==null&&c!=null&&(t.defaultChecked=!!c),l!=null&&(t.checked=l&&typeof l!="function"&&typeof l!="symbol"),g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?t.name=""+un(g):t.removeAttribute("name")}function Mo(t,e,n,a,l,c,d,g){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(t.type=c),e!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||e!=null)){ns(t);return}n=n!=null?""+un(n):"",e=e!=null?""+un(e):n,g||e===t.value||(t.value=e),t.defaultValue=e}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,t.checked=g?t.checked:!!a,t.defaultChecked=!!a,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(t.name=d),ns(t)}function ls(t,e,n){e==="number"&&su(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function rl(t,e,n,a){if(t=t.options,e){e={};for(var l=0;l"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fs=!1;if(Ln)try{var ni={};Object.defineProperty(ni,"passive",{get:function(){fs=!0}}),window.addEventListener("test",ni,ni),window.removeEventListener("test",ni,ni)}catch{fs=!1}var la=null,rs=null,ru=null;function Yo(){if(ru)return ru;var t,e=rs,n=e.length,a,l="value"in la?la.value:la.textContent,c=l.length;for(t=0;t=ii),Qo=" ",Fo=!1;function Ko(t,e){switch(t){case"keyup":return J3.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jo(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ml=!1;function I3(t,e){switch(t){case"compositionend":return Jo(e);case"keypress":return e.which!==32?null:(Fo=!0,Qo);case"textInput":return t=e.data,t===Qo&&Fo?null:t;default:return null}}function W3(t,e){if(ml)return t==="compositionend"||!ys&&Ko(t,e)?(t=Yo(),ru=rs=la=null,ml=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=a}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=n0(n)}}function l0(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?l0(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function i0(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=su(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=su(t.document)}return e}function _s(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var iy=Ln&&"documentMode"in document&&11>=document.documentMode,yl=null,ps=null,fi=null,bs=!1;function u0(t,e,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;bs||yl==null||yl!==su(a)||(a=yl,"selectionStart"in a&&_s(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),fi&&si(fi,a)||(fi=a,a=ac(ps,"onSelect"),0>=d,l-=d,On=1<<32-F(e)+l|n<xt?(Mt=dt,dt=null):Mt=dt.sibling;var jt=C(x,dt,z[xt],Q);if(jt===null){dt===null&&(dt=Mt);break}t&&dt&&jt.alternate===null&&e(x,dt),A=c(jt,A,xt),Ht===null?vt=jt:Ht.sibling=jt,Ht=jt,dt=Mt}if(xt===z.length)return n(x,dt),Ut&&jn(x,xt),vt;if(dt===null){for(;xtxt?(Mt=dt,dt=null):Mt=dt.sibling;var wa=C(x,dt,jt.value,Q);if(wa===null){dt===null&&(dt=Mt);break}t&&dt&&wa.alternate===null&&e(x,dt),A=c(wa,A,xt),Ht===null?vt=wa:Ht.sibling=wa,Ht=wa,dt=Mt}if(jt.done)return n(x,dt),Ut&&jn(x,xt),vt;if(dt===null){for(;!jt.done;xt++,jt=z.next())jt=K(x,jt.value,Q),jt!==null&&(A=c(jt,A,xt),Ht===null?vt=jt:Ht.sibling=jt,Ht=jt);return Ut&&jn(x,xt),vt}for(dt=a(dt);!jt.done;xt++,jt=z.next())jt=j(dt,x,xt,jt.value,Q),jt!==null&&(t&&jt.alternate!==null&&dt.delete(jt.key===null?xt:jt.key),A=c(jt,A,xt),Ht===null?vt=jt:Ht.sibling=jt,Ht=jt);return t&&dt.forEach(function(xg){return e(x,xg)}),Ut&&jn(x,xt),vt}function Qt(x,A,z,Q){if(typeof z=="object"&&z!==null&&z.type===G&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case T:t:{for(var vt=z.key;A!==null;){if(A.key===vt){if(vt=z.type,vt===G){if(A.tag===7){n(x,A.sibling),Q=l(A,z.props.children),Q.return=x,x=Q;break t}}else if(A.elementType===vt||typeof vt=="object"&&vt!==null&&vt.$$typeof===et&&Qa(vt)===A.type){n(x,A.sibling),Q=l(A,z.props),yi(Q,z),Q.return=x,x=Q;break t}n(x,A);break}else e(x,A);A=A.sibling}z.type===G?(Q=Ga(z.props.children,x.mode,Q,z.key),Q.return=x,x=Q):(Q=bu(z.type,z.key,z.props,null,x.mode,Q),yi(Q,z),Q.return=x,x=Q)}return d(x);case D:t:{for(vt=z.key;A!==null;){if(A.key===vt)if(A.tag===4&&A.stateNode.containerInfo===z.containerInfo&&A.stateNode.implementation===z.implementation){n(x,A.sibling),Q=l(A,z.children||[]),Q.return=x,x=Q;break t}else{n(x,A);break}else e(x,A);A=A.sibling}Q=Os(z,x.mode,Q),Q.return=x,x=Q}return d(x);case et:return z=Qa(z),Qt(x,A,z,Q)}if(ot(z))return ft(x,A,z,Q);if(_t(z)){if(vt=_t(z),typeof vt!="function")throw Error(s(150));return z=vt.call(z),bt(x,A,z,Q)}if(typeof z.then=="function")return Qt(x,A,Ou(z),Q);if(z.$$typeof===$)return Qt(x,A,Tu(x,z),Q);Ru(x,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,A!==null&&A.tag===6?(n(x,A.sibling),Q=l(A,z),Q.return=x,x=Q):(n(x,A),Q=ws(z,x.mode,Q),Q.return=x,x=Q),d(x)):n(x,A)}return function(x,A,z,Q){try{mi=0;var vt=Qt(x,A,z,Q);return wl=null,vt}catch(dt){if(dt===xl||dt===xu)throw dt;var Ht=We(29,dt,null,x.mode);return Ht.lanes=Q,Ht.return=x,Ht}finally{}}}var Ka=D0(!0),z0=D0(!1),fa=!1;function Ys(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gs(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ra(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function oa(t,e,n){var a=t.updateQueue;if(a===null)return null;if(a=a.shared,(Bt&2)!==0){var l=a.pending;return l===null?e.next=e:(e.next=l.next,l.next=e),a.pending=e,e=pu(t),h0(t,null,n),e}return _u(t,a,e,n),pu(t)}function gi(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var a=e.lanes;a&=t.pendingLanes,n|=a,e.lanes=n,So(t,n)}}function qs(t,e){var n=t.updateQueue,a=t.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var d={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?l=c=d:c=c.next=d,n=n.next}while(n!==null);c===null?l=c=e:c=c.next=e}else l=c=e;n={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:c,shared:a.shared,callbacks:a.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var Zs=!1;function vi(){if(Zs){var t=Al;if(t!==null)throw t}}function _i(t,e,n,a){Zs=!1;var l=t.updateQueue;fa=!1;var c=l.firstBaseUpdate,d=l.lastBaseUpdate,g=l.shared.pending;if(g!==null){l.shared.pending=null;var S=g,M=S.next;S.next=null,d===null?c=M:d.next=M,d=S;var q=t.alternate;q!==null&&(q=q.updateQueue,g=q.lastBaseUpdate,g!==d&&(g===null?q.firstBaseUpdate=M:g.next=M,q.lastBaseUpdate=S))}if(c!==null){var K=l.baseState;d=0,q=M=S=null,g=c;do{var C=g.lane&-536870913,j=C!==g.lane;if(j?(Nt&C)===C:(a&C)===C){C!==0&&C===Tl&&(Zs=!0),q!==null&&(q=q.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});t:{var ft=t,bt=g;C=e;var Qt=n;switch(bt.tag){case 1:if(ft=bt.payload,typeof ft=="function"){K=ft.call(Qt,K,C);break t}K=ft;break t;case 3:ft.flags=ft.flags&-65537|128;case 0:if(ft=bt.payload,C=typeof ft=="function"?ft.call(Qt,K,C):ft,C==null)break t;K=p({},K,C);break t;case 2:fa=!0}}C=g.callback,C!==null&&(t.flags|=64,j&&(t.flags|=8192),j=l.callbacks,j===null?l.callbacks=[C]:j.push(C))}else j={lane:C,tag:g.tag,payload:g.payload,callback:g.callback,next:null},q===null?(M=q=j,S=K):q=q.next=j,d|=C;if(g=g.next,g===null){if(g=l.shared.pending,g===null)break;j=g,g=j.next,j.next=null,l.lastBaseUpdate=j,l.shared.pending=null}}while(!0);q===null&&(S=K),l.baseState=S,l.firstBaseUpdate=M,l.lastBaseUpdate=q,c===null&&(l.shared.lanes=0),ga|=d,t.lanes=d,t.memoizedState=K}}function N0(t,e){if(typeof t!="function")throw Error(s(191,t));t.call(e)}function M0(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;tc?c:8;var d=N.T,g={};N.T=g,sf(t,!1,e,n);try{var S=l(),M=N.S;if(M!==null&&M(g,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var q=my(S,a);Si(t,e,q,nn(t))}else Si(t,e,a,nn(t))}catch(K){Si(t,e,{then:function(){},status:"rejected",reason:K},nn())}finally{V.p=c,d!==null&&g.types!==null&&(d.types=g.types),N.T=d}}function by(){}function uf(t,e,n,a){if(t.tag!==5)throw Error(s(476));var l=r2(t).queue;f2(t,l,e,lt,n===null?by:function(){return o2(t),n(a)})}function r2(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:lt,baseState:lt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:lt},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function o2(t){var e=r2(t);e.next===null&&(e=t.alternate.memoizedState),Si(t,e.next.queue,{},nn())}function cf(){return Re(Bi)}function d2(){return fe().memoizedState}function h2(){return fe().memoizedState}function Sy(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=nn();t=ra(n);var a=oa(e,t,n);a!==null&&(Je(a,e,n),gi(a,e,n)),e={cache:Ls()},t.payload=e;return}e=e.return}}function Ey(t,e,n){var a=nn();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Bu(t)?y2(e,n):(n=As(t,e,n,a),n!==null&&(Je(n,t,a),g2(n,e,a)))}function m2(t,e,n){var a=nn();Si(t,e,n,a)}function Si(t,e,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bu(t))y2(e,l);else{var c=t.alternate;if(t.lanes===0&&(c===null||c.lanes===0)&&(c=e.lastRenderedReducer,c!==null))try{var d=e.lastRenderedState,g=c(d,n);if(l.hasEagerState=!0,l.eagerState=g,Ie(g,d))return _u(t,e,l,0),Kt===null&&vu(),!1}catch{}finally{}if(n=As(t,e,l,a),n!==null)return Je(n,t,a),g2(n,e,a),!0}return!1}function sf(t,e,n,a){if(a={lane:2,revertLane:Gf(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Bu(t)){if(e)throw Error(s(479))}else e=As(t,n,a,2),e!==null&&Je(e,t,2)}function Bu(t){var e=t.alternate;return t===Tt||e!==null&&e===Tt}function y2(t,e){Rl=Nu=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function g2(t,e,n){if((n&4194048)!==0){var a=e.lanes;a&=t.pendingLanes,n|=a,e.lanes=n,So(t,n)}}var Ei={readContext:Re,use:Cu,useCallback:ie,useContext:ie,useEffect:ie,useImperativeHandle:ie,useLayoutEffect:ie,useInsertionEffect:ie,useMemo:ie,useReducer:ie,useRef:ie,useState:ie,useDebugValue:ie,useDeferredValue:ie,useTransition:ie,useSyncExternalStore:ie,useId:ie,useHostTransitionStatus:ie,useFormState:ie,useActionState:ie,useOptimistic:ie,useMemoCache:ie,useCacheRefresh:ie};Ei.useEffectEvent=ie;var v2={readContext:Re,use:Cu,useCallback:function(t,e){return Ye().memoizedState=[t,e===void 0?null:e],t},useContext:Re,useEffect:t2,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,Hu(4194308,4,l2.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Hu(4194308,4,t,e)},useInsertionEffect:function(t,e){Hu(4,2,t,e)},useMemo:function(t,e){var n=Ye();e=e===void 0?null:e;var a=t();if(Ja){tt(!0);try{t()}finally{tt(!1)}}return n.memoizedState=[a,e],a},useReducer:function(t,e,n){var a=Ye();if(n!==void 0){var l=n(e);if(Ja){tt(!0);try{n(e)}finally{tt(!1)}}}else l=e;return a.memoizedState=a.baseState=l,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:l},a.queue=t,t=t.dispatch=Ey.bind(null,Tt,t),[a.memoizedState,t]},useRef:function(t){var e=Ye();return t={current:t},e.memoizedState=t},useState:function(t){t=tf(t);var e=t.queue,n=m2.bind(null,Tt,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:af,useDeferredValue:function(t,e){var n=Ye();return lf(n,t,e)},useTransition:function(){var t=tf(!1);return t=f2.bind(null,Tt,t.queue,!0,!1),Ye().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var a=Tt,l=Ye();if(Ut){if(n===void 0)throw Error(s(407));n=n()}else{if(n=e(),Kt===null)throw Error(s(349));(Nt&127)!==0||B0(a,e,n)}l.memoizedState=n;var c={value:n,getSnapshot:e};return l.queue=c,t2(G0.bind(null,a,c,t),[t]),a.flags|=2048,zl(9,{destroy:void 0},Y0.bind(null,a,c,n,e),null),n},useId:function(){var t=Ye(),e=Kt.identifierPrefix;if(Ut){var n=Rn,a=On;n=(a&~(1<<32-F(a)-1)).toString(32)+n,e="_"+e+"R_"+n,n=Mu++,0<\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof a.is=="string"?d.createElement("select",{is:a.is}):d.createElement("select"),a.multiple?c.multiple=!0:a.size&&(c.size=a.size);break;default:c=typeof a.is=="string"?d.createElement(l,{is:a.is}):d.createElement(l)}}c[we]=e,c[Ze]=a;t:for(d=e.child;d!==null;){if(d.tag===5||d.tag===6)c.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break t;for(;d.sibling===null;){if(d.return===null||d.return===e)break t;d=d.return}d.sibling.return=d.return,d=d.sibling}e.stateNode=c;t:switch(ze(c,l,a),l){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break t;case"img":a=!0;break t;default:a=!1}a&&Xn(e)}}return Wt(e),Ef(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==a&&Xn(e);else{if(typeof a!="string"&&e.stateNode===null)throw Error(s(166));if(t=L.current,Sl(e)){if(t=e.stateNode,n=e.memoizedProps,a=null,l=Oe,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}t[we]=e,t=!!(t.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Hd(t.nodeValue,n)),t||ca(e,!0)}else t=lc(t).createTextNode(a),t[we]=e,e.stateNode=t}return Wt(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(a=Sl(e),n!==null){if(t===null){if(!a)throw Error(s(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(557));t[we]=e}else qa(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Wt(e),t=!1}else n=Ns(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?(Pe(e),e):(Pe(e),null);if((e.flags&128)!==0)throw Error(s(558))}return Wt(e),null;case 13:if(a=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(l=Sl(e),a!==null&&a.dehydrated!==null){if(t===null){if(!l)throw Error(s(318));if(l=e.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(s(317));l[we]=e}else qa(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Wt(e),l=!1}else l=Ns(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),l=!0;if(!l)return e.flags&256?(Pe(e),e):(Pe(e),null)}return Pe(e),(e.flags&128)!==0?(e.lanes=n,e):(n=a!==null,t=t!==null&&t.memoizedState!==null,n&&(a=e.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==l&&(a.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),Xu(e,e.updateQueue),Wt(e),null);case 4:return ht(),t===null&&Vf(e.stateNode.containerInfo),Wt(e),null;case 10:return Yn(e.type),Wt(e),null;case 19:if(R(se),a=e.memoizedState,a===null)return Wt(e),null;if(l=(e.flags&128)!==0,c=a.rendering,c===null)if(l)Ai(a,!1);else{if(ue!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(c=zu(t),c!==null){for(e.flags|=128,Ai(a,!1),t=c.updateQueue,e.updateQueue=t,Xu(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)m0(n,t),n=n.sibling;return k(se,se.current&1|2),Ut&&jn(e,a.treeForkCount),e.child}t=t.sibling}a.tail!==null&&xe()>Ju&&(e.flags|=128,l=!0,Ai(a,!1),e.lanes=4194304)}else{if(!l)if(t=zu(c),t!==null){if(e.flags|=128,l=!0,t=t.updateQueue,e.updateQueue=t,Xu(e,t),Ai(a,!0),a.tail===null&&a.tailMode==="hidden"&&!c.alternate&&!Ut)return Wt(e),null}else 2*xe()-a.renderingStartTime>Ju&&n!==536870912&&(e.flags|=128,l=!0,Ai(a,!1),e.lanes=4194304);a.isBackwards?(c.sibling=e.child,e.child=c):(t=a.last,t!==null?t.sibling=c:e.child=c,a.last=c)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=xe(),t.sibling=null,n=se.current,k(se,l?n&1|2:n&1),Ut&&jn(e,a.treeForkCount),t):(Wt(e),null);case 22:case 23:return Pe(e),Vs(),a=e.memoizedState!==null,t!==null?t.memoizedState!==null!==a&&(e.flags|=8192):a&&(e.flags|=8192),a?(n&536870912)!==0&&(e.flags&128)===0&&(Wt(e),e.subtreeFlags&6&&(e.flags|=8192)):Wt(e),n=e.updateQueue,n!==null&&Xu(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),a=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),a!==n&&(e.flags|=2048),t!==null&&R(Va),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),Yn(he),Wt(e),null;case 25:return null;case 30:return null}throw Error(s(156,e.tag))}function Oy(t,e){switch(Ds(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Yn(he),ht(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Ft(e),null;case 31:if(e.memoizedState!==null){if(Pe(e),e.alternate===null)throw Error(s(340));qa()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Pe(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(s(340));qa()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return R(se),null;case 4:return ht(),null;case 10:return Yn(e.type),null;case 22:case 23:return Pe(e),Vs(),t!==null&&R(Va),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Yn(he),null;case 25:return null;default:return null}}function q2(t,e){switch(Ds(e),e.tag){case 3:Yn(he),ht();break;case 26:case 27:case 5:Ft(e);break;case 4:ht();break;case 31:e.memoizedState!==null&&Pe(e);break;case 13:Pe(e);break;case 19:R(se);break;case 10:Yn(e.type);break;case 22:case 23:Pe(e),Vs(),t!==null&&R(Va);break;case 24:Yn(he)}}function xi(t,e){try{var n=e.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var l=a.next;n=l;do{if((n.tag&t)===t){a=void 0;var c=n.create,d=n.inst;a=c(),d.destroy=a}n=n.next}while(n!==l)}}catch(g){Zt(e,e.return,g)}}function ma(t,e,n){try{var a=e.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var c=l.next;a=c;do{if((a.tag&t)===t){var d=a.inst,g=d.destroy;if(g!==void 0){d.destroy=void 0,l=e;var S=n,M=g;try{M()}catch(q){Zt(l,S,q)}}}a=a.next}while(a!==c)}}catch(q){Zt(e,e.return,q)}}function Z2(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{M0(e,n)}catch(a){Zt(t,t.return,a)}}}function X2(t,e,n){n.props=ka(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(a){Zt(t,e,a)}}function wi(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var a=t.stateNode;break;case 30:a=t.stateNode;break;default:a=t.stateNode}typeof n=="function"?t.refCleanup=n(a):n.current=a}}catch(l){Zt(t,e,l)}}function Dn(t,e){var n=t.ref,a=t.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){Zt(t,e,l)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){Zt(t,e,l)}else n.current=null}function V2(t){var e=t.type,n=t.memoizedProps,a=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break t;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(l){Zt(t,t.return,l)}}function Tf(t,e,n){try{var a=t.stateNode;ky(a,t.type,n,e),a[Ze]=e}catch(l){Zt(t,t.return,l)}}function Q2(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Sa(t.type)||t.tag===4}function Af(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Q2(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Sa(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function xf(t,e,n){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Cn));else if(a!==4&&(a===27&&Sa(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(xf(t,e,n),t=t.sibling;t!==null;)xf(t,e,n),t=t.sibling}function Vu(t,e,n){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(a!==4&&(a===27&&Sa(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(Vu(t,e,n),t=t.sibling;t!==null;)Vu(t,e,n),t=t.sibling}function F2(t){var e=t.stateNode,n=t.memoizedProps;try{for(var a=t.type,l=e.attributes;l.length;)e.removeAttributeNode(l[0]);ze(e,a,n),e[we]=t,e[Ze]=n}catch(c){Zt(t,t.return,c)}}var Vn=!1,ge=!1,wf=!1,K2=typeof WeakSet=="function"?WeakSet:Set,Se=null;function Ry(t,e){if(t=t.containerInfo,Kf=oc,t=i0(t),_s(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var l=a.anchorOffset,c=a.focusNode;a=a.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break t}var d=0,g=-1,S=-1,M=0,q=0,K=t,C=null;e:for(;;){for(var j;K!==n||l!==0&&K.nodeType!==3||(g=d+l),K!==c||a!==0&&K.nodeType!==3||(S=d+a),K.nodeType===3&&(d+=K.nodeValue.length),(j=K.firstChild)!==null;)C=K,K=j;for(;;){if(K===t)break e;if(C===n&&++M===l&&(g=d),C===c&&++q===a&&(S=d),(j=K.nextSibling)!==null)break;K=C,C=K.parentNode}K=j}n=g===-1||S===-1?null:{start:g,end:S}}else n=null}n=n||{start:0,end:0}}else n=null;for(Jf={focusedElem:t,selectionRange:n},oc=!1,Se=e;Se!==null;)if(e=Se,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Se=t;else for(;Se!==null;){switch(e=Se,c=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(n=0;n title"))),ze(c,a,n),c[we]=t,be(c),a=c;break t;case"link":var d=Pd("link","href",l).get(a+(n.href||""));if(d){for(var g=0;gQt&&(d=Qt,Qt=bt,bt=d);var x=a0(g,bt),A=a0(g,Qt);if(x&&A&&(j.rangeCount!==1||j.anchorNode!==x.node||j.anchorOffset!==x.offset||j.focusNode!==A.node||j.focusOffset!==A.offset)){var z=K.createRange();z.setStart(x.node,x.offset),j.removeAllRanges(),bt>Qt?(j.addRange(z),j.extend(A.node,A.offset)):(z.setEnd(A.node,A.offset),j.addRange(z))}}}}for(K=[],j=g;j=j.parentNode;)j.nodeType===1&&K.push({element:j,left:j.scrollLeft,top:j.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;gn?32:n,N.T=null,n=Uf,Uf=null;var c=_a,d=kn;if(pe=0,Ll=_a=null,kn=0,(Bt&6)!==0)throw Error(s(331));var g=Bt;if(Bt|=4,ld(c.current),ed(c,c.current,d,n),Bt=g,Mi(0,!1),Y&&typeof Y.onPostCommitFiberRoot=="function")try{Y.onPostCommitFiberRoot(Ua,c)}catch{}return!0}finally{V.p=l,N.T=a,Ed(t,e)}}function Ad(t,e,n){e=fn(n,e),e=df(t.stateNode,e,2),t=oa(t,e,2),t!==null&&($l(t,2),zn(t))}function Zt(t,e,n){if(t.tag===3)Ad(t,t,n);else for(;e!==null;){if(e.tag===3){Ad(e,t,n);break}else if(e.tag===1){var a=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(va===null||!va.has(a))){t=fn(n,t),n=x2(2),a=oa(e,n,2),a!==null&&(w2(n,a,e,t),$l(a,2),zn(a));break}}e=e.return}}function jf(t,e,n){var a=t.pingCache;if(a===null){a=t.pingCache=new Ny;var l=new Set;a.set(e,l)}else l=a.get(e),l===void 0&&(l=new Set,a.set(e,l));l.has(n)||(Df=!0,l.add(n),t=Hy.bind(null,t,e,n),e.then(t,t))}function Hy(t,e,n){var a=t.pingCache;a!==null&&a.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,Kt===t&&(Nt&n)===n&&(ue===4||ue===3&&(Nt&62914560)===Nt&&300>xe()-Ku?(Bt&2)===0&&Hl(t,0):zf|=n,Cl===Nt&&(Cl=0)),zn(t)}function xd(t,e){e===0&&(e=po()),t=Ya(t,e),t!==null&&($l(t,e),zn(t))}function jy(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),xd(t,n)}function By(t,e){var n=0;switch(t.tag){case 31:case 13:var a=t.stateNode,l=t.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=t.stateNode;break;case 22:a=t.stateNode._retryCache;break;default:throw Error(s(314))}a!==null&&a.delete(e),xd(t,n)}function Yy(t,e){return Ce(t,e)}var tc=null,Bl=null,Bf=!1,ec=!1,Yf=!1,ba=0;function zn(t){t!==Bl&&t.next===null&&(Bl===null?tc=Bl=t:Bl=Bl.next=t),ec=!0,Bf||(Bf=!0,qy())}function Mi(t,e){if(!Yf&&ec){Yf=!0;do for(var n=!1,a=tc;a!==null;){if(t!==0){var l=a.pendingLanes;if(l===0)var c=0;else{var d=a.suspendedLanes,g=a.pingedLanes;c=(1<<31-F(42|t)+1)-1,c&=l&~(d&~g),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,Dd(a,c))}else c=Nt,c=Ca(a,a===Kt?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||na(a,c)||(n=!0,Dd(a,c));a=a.next}while(n);Yf=!1}}function Gy(){wd()}function wd(){ec=Bf=!1;var t=0;ba!==0&&Wy()&&(t=ba);for(var e=xe(),n=null,a=tc;a!==null;){var l=a.next,c=Od(a,e);c===0?(a.next=null,n===null?tc=l:n.next=l,l===null&&(Bl=n)):(n=a,(t!==0||(c&3)!==0)&&(ec=!0)),a=l}pe!==0&&pe!==5||Mi(t),ba!==0&&(ba=0)}function Od(t,e){for(var n=t.suspendedLanes,a=t.pingedLanes,l=t.expirationTimes,c=t.pendingLanes&-62914561;0g)break;var q=S.transferSize,K=S.initiatorType;q&&jd(K)&&(S=S.responseEnd,d+=q*(S"u"?null:document;function kd(t,e,n){var a=Yl;if(a&&typeof e=="string"&&e){var l=cn(e);l='link[rel="'+t+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),Jd.has(l)||(Jd.add(l),t={rel:t,crossOrigin:n,href:e},a.querySelector(l)===null&&(e=a.createElement("link"),ze(e,"link",t),be(e),a.head.appendChild(e)))}}function ug(t){In.D(t),kd("dns-prefetch",t,null)}function cg(t,e){In.C(t,e),kd("preconnect",t,e)}function sg(t,e,n){In.L(t,e,n);var a=Yl;if(a&&t&&e){var l='link[rel="preload"][as="'+cn(e)+'"]';e==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+cn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+cn(n.imageSizes)+'"]')):l+='[href="'+cn(t)+'"]';var c=l;switch(e){case"style":c=Gl(t);break;case"script":c=ql(t)}yn.has(c)||(t=p({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),yn.set(c,t),a.querySelector(l)!==null||e==="style"&&a.querySelector(Hi(c))||e==="script"&&a.querySelector(ji(c))||(e=a.createElement("link"),ze(e,"link",t),be(e),a.head.appendChild(e)))}}function fg(t,e){In.m(t,e);var n=Yl;if(n&&t){var a=e&&typeof e.as=="string"?e.as:"script",l='link[rel="modulepreload"][as="'+cn(a)+'"][href="'+cn(t)+'"]',c=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=ql(t)}if(!yn.has(c)&&(t=p({rel:"modulepreload",href:t},e),yn.set(c,t),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ji(c)))return}a=n.createElement("link"),ze(a,"link",t),be(a),n.head.appendChild(a)}}}function rg(t,e,n){In.S(t,e,n);var a=Yl;if(a&&t){var l=sl(a).hoistableStyles,c=Gl(t);e=e||"default";var d=l.get(c);if(!d){var g={loading:0,preload:null};if(d=a.querySelector(Hi(c)))g.loading=5;else{t=p({rel:"stylesheet",href:t,"data-precedence":e},n),(n=yn.get(c))&&er(t,n);var S=d=a.createElement("link");be(S),ze(S,"link",t),S._p=new Promise(function(M,q){S.onload=M,S.onerror=q}),S.addEventListener("load",function(){g.loading|=1}),S.addEventListener("error",function(){g.loading|=2}),g.loading|=4,uc(d,e,a)}d={type:"stylesheet",instance:d,count:1,state:g},l.set(c,d)}}}function og(t,e){In.X(t,e);var n=Yl;if(n&&t){var a=sl(n).hoistableScripts,l=ql(t),c=a.get(l);c||(c=n.querySelector(ji(l)),c||(t=p({src:t,async:!0},e),(e=yn.get(l))&&nr(t,e),c=n.createElement("script"),be(c),ze(c,"link",t),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(l,c))}}function dg(t,e){In.M(t,e);var n=Yl;if(n&&t){var a=sl(n).hoistableScripts,l=ql(t),c=a.get(l);c||(c=n.querySelector(ji(l)),c||(t=p({src:t,async:!0,type:"module"},e),(e=yn.get(l))&&nr(t,e),c=n.createElement("script"),be(c),ze(c,"link",t),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(l,c))}}function Id(t,e,n,a){var l=(l=L.current)?ic(l):null;if(!l)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=Gl(n.href),n=sl(l).hoistableStyles,a=n.get(e),a||(a={type:"style",instance:null,count:0,state:null},n.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=Gl(n.href);var c=sl(l).hoistableStyles,d=c.get(t);if(d||(l=l.ownerDocument||l,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(t,d),(c=l.querySelector(Hi(t)))&&!c._p&&(d.instance=c,d.state.loading=5),yn.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},yn.set(t,n),c||hg(l,t,n,d.state))),e&&a===null)throw Error(s(528,""));return d}if(e&&a!==null)throw Error(s(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=ql(n),n=sl(l).hoistableScripts,a=n.get(e),a||(a={type:"script",instance:null,count:0,state:null},n.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function Gl(t){return'href="'+cn(t)+'"'}function Hi(t){return'link[rel="stylesheet"]['+t+"]"}function Wd(t){return p({},t,{"data-precedence":t.precedence,precedence:null})}function hg(t,e,n,a){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?a.loading=1:(e=t.createElement("link"),a.preload=e,e.addEventListener("load",function(){return a.loading|=1}),e.addEventListener("error",function(){return a.loading|=2}),ze(e,"link",n),be(e),t.head.appendChild(e))}function ql(t){return'[src="'+cn(t)+'"]'}function ji(t){return"script[async]"+t}function $d(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var a=t.querySelector('style[data-href~="'+cn(n.href)+'"]');if(a)return e.instance=a,be(a),a;var l=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(t.ownerDocument||t).createElement("style"),be(a),ze(a,"style",l),uc(a,n.precedence,t),e.instance=a;case"stylesheet":l=Gl(n.href);var c=t.querySelector(Hi(l));if(c)return e.state.loading|=4,e.instance=c,be(c),c;a=Wd(n),(l=yn.get(l))&&er(a,l),c=(t.ownerDocument||t).createElement("link"),be(c);var d=c;return d._p=new Promise(function(g,S){d.onload=g,d.onerror=S}),ze(c,"link",a),e.state.loading|=4,uc(c,n.precedence,t),e.instance=c;case"script":return c=ql(n.src),(l=t.querySelector(ji(c)))?(e.instance=l,be(l),l):(a=n,(l=yn.get(c))&&(a=p({},n),nr(a,l)),t=t.ownerDocument||t,l=t.createElement("script"),be(l),ze(l,"link",a),t.head.appendChild(l),e.instance=l);case"void":return null;default:throw Error(s(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(a=e.instance,e.state.loading|=4,uc(a,n.precedence,t));return e.instance}function uc(t,e,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,c=l,d=0;d title"):null)}function mg(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function e1(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function yg(t,e,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var l=Gl(a.href),c=e.querySelector(Hi(l));if(c){e=c._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=sc.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=c,be(c);return}c=e.ownerDocument||e,a=Wd(a),(l=yn.get(l))&&er(a,l),c=c.createElement("link"),be(c);var d=c;d._p=new Promise(function(g,S){d.onload=g,d.onerror=S}),ze(c,"link",a),n.instance=c}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=sc.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var ar=0;function gg(t,e){return t.stylesheets&&t.count===0&&rc(t,t.stylesheets),0ar?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function sc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)rc(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var fc=null;function rc(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,fc=new Map,e.forEach(vg,t),fc=null,sc.call(t))}function vg(t,e){if(!(e.state.loading&4)){var n=fc.get(t);if(n)var a=n.get(null);else{n=new Map,fc.set(t,n);for(var l=t.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(i){console.error(i)}}return u(),dr.exports=Cg(),dr.exports}var Hg=Lg();function jg(){const u=mt.useRef(null),[i]=yh(u);return[i,u]}function yh(u){const[i,f]=mt.useState(new DOMRect(0,0,10,10)),s=mt.useCallback(()=>{const r=u==null?void 0:u.current;r&&f(r.getBoundingClientRect())},[u]);return mt.useLayoutEffect(()=>{const r=u==null?void 0:u.current;if(!r)return;s();const o=new ResizeObserver(s);return o.observe(r),window.addEventListener("resize",s),()=>{o.disconnect(),window.removeEventListener("resize",s)}},[s,u]),[i,s]}function x1(u,i){u&&(i=Pa.getObject(u,i));const[f,s]=mt.useState(i),r=mt.useCallback(o=>{u?Pa.setObject(u,o):s(o)},[u,s]);return mt.useEffect(()=>{if(u){const o=()=>s(Pa.getObject(u,i));return Pa.onChangeEmitter.addEventListener(u,o),()=>Pa.onChangeEmitter.removeEventListener(u,o)}},[i,u]),[f,r]}class Bg{constructor(){this.onChangeEmitter=new EventTarget}getString(i,f){return localStorage[i]||f}setString(i,f){var s;localStorage[i]=f,this.onChangeEmitter.dispatchEvent(new Event(i)),(s=window.saveSettings)==null||s.call(window)}getObject(i,f){if(!localStorage[i])return f;try{return JSON.parse(localStorage[i])}catch{return f}}setObject(i,f){var s;localStorage[i]=JSON.stringify(f),this.onChangeEmitter.dispatchEvent(new Event(i)),(s=window.saveSettings)==null||s.call(window)}}const Pa=new Bg;function Ji(...u){return u.filter(Boolean).join(" ")}function Yg(u){u&&(u!=null&&u.scrollIntoViewIfNeeded?u.scrollIntoViewIfNeeded(!1):u==null||u.scrollIntoView())}const Gg="system",gh="theme",qg=[{label:"Dark mode",value:"dark-mode"},{label:"Light mode",value:"light-mode"},{label:"System",value:"system"}],vh=window.matchMedia("(prefers-color-scheme: dark)");function Zg(){document.playwrightThemeInitialized||(document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",u=>{u.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",u=>{document.body.classList.add("inactive")},!1),Dr(zr()),vh.addEventListener("change",()=>{Dr(zr())}))}const Xg=new Set;function Dr(u){const i=Vg(),f=u==="system"?vh.matches?"dark-mode":"light-mode":u;if(i!==f){i&&document.documentElement.classList.remove(i),document.documentElement.classList.add(f);for(const s of Xg)s(f)}}function zr(){return Pa.getString(gh,Gg)}function Vg(){return document.documentElement.classList.contains("dark-mode")?"dark-mode":document.documentElement.classList.contains("light-mode")?"light-mode":null}function Qg(){const[u,i]=mt.useState(zr());return mt.useEffect(()=>{Pa.setString(gh,u),Dr(u)},[u]),[u,i]}const Fg="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='-10%20-10%20276%20276'%3e%3clinearGradient%20id='a'%20x1='145'%20x2='34'%20y1='253'%20y2='61'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%231e8e3e'/%3e%3cstop%20offset='1'%20stop-color='%2334a853'/%3e%3c/linearGradient%3e%3clinearGradient%20id='b'%20x1='111'%20x2='222'%20y1='254'%20y2='62'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23fcc934'/%3e%3cstop%20offset='1'%20stop-color='%23fbbc04'/%3e%3c/linearGradient%3e%3clinearGradient%20id='c'%20x1='17'%20x2='239'%20y1='80'%20y2='80'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23d93025'/%3e%3cstop%20offset='1'%20stop-color='%23ea4335'/%3e%3c/linearGradient%3e%3ccircle%20cx='128'%20cy='128'%20r='64'%20fill='%23fff'/%3e%3cpath%20fill='url(%23a)'%20d='M96%20183.4A63.7%2063.7%200%200%201%2072.6%20160L17.2%2064A128%20128%200%200%200%20128%20256l55.4-96A64%2064%200%200%201%2096%20183.4Z'/%3e%3cpath%20fill='url(%23b)'%20d='M192%20128a63.7%2063.7%200%200%201-8.6%2032L128%20256A128%20128%200%200%200%20238.9%2064h-111a64%2064%200%200%201%2064%2064Z'/%3e%3ccircle%20cx='128'%20cy='128'%20r='52'%20fill='%231a73e8'/%3e%3cpath%20fill='url(%23c)'%20d='M96%2072.6a63.7%2063.7%200%200%201%2032-8.6h110.8a128%20128%200%200%200-221.7%200l55.5%2096A64%2064%200%200%201%2096%2072.6Z'/%3e%3c/svg%3e",Kg="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23fff'%20viewBox='-190%20-190%205180%205180'%3e%3clinearGradient%20id='a'%20x1='2149'%20x2='4207'%20y1='4638'%20y2='1076'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23fcc934'/%3e%3cstop%20offset='1'%20stop-color='%23fbbc04'/%3e%3c/linearGradient%3e%3clinearGradient%20id='b'%20x1='2823'%20x2='-214'%20y1='4031'%20y2='2278'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%231e8e3e'/%3e%3cstop%20offset='1'%20stop-color='%2334a853'/%3e%3c/linearGradient%3e%3clinearGradient%20id='c'%20x1='371'%20x2='4429'%20y1='1501'%20y2='1501'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23d93025'/%3e%3cstop%20offset='1'%20stop-color='%23ea4335'/%3e%3c/linearGradient%3e%3cpath%20fill='%23202124'%20d='M4400%203676c-45%2080-93%20157-145%20228l541-228z'/%3e%3cpath%20d='M2399%203600a1200%201200%200%201%200-1%200z'/%3e%3cpath%20fill='url(%23a)'%20d='M3440%203001%202402%204800a2394%202394%200%200%200%202398-2400c0-421-112-835-323-1200H2400l-2%201a1198%201198%200%200%201%201041%201800z'/%3e%3cpath%20fill='url(%23b)'%20d='M1360%203001%20322%201202a2398%202398%200%200%200%202078%203598l1038-1799v-1a1199%201199%200%200%201-2078%202z'/%3e%3cpath%20fill='%231a73e8'%20d='M2399%203351a950%20950%200%201%200%200-1900%20950%20950%200%200%200%200%201900z'/%3e%3cpath%20fill='url(%23c)'%20d='M2399%201200h2076a2396%202396%200%200%200-4153%202l1038%201800h2a1200%201200%200%200%201%201037-1802z'/%3e%3cpath%20fill='%233c4043'%20d='M1575%202250c0-40%2033-74%2075-74h3149v1500H1649a75%2075%200%200%201-74-75z'/%3e%3cpath%20d='M2442%202883a199%20199%200%200%200%20115-185c1-44-10-87-34-124a244%20244%200%200%200-94-86c-38-20-81-30-125-30h-317v880h334c46%201%2090-10%20131-32a250%20250%200%200%200%20135-220%20216%20216%200%200%200-145-203zm-40%20325c-23%2014-50%2022-76%2021h-226v-286h222c28%200%2055%206%2079%2020a146%20146%200%200%201%2070%20123c0%2024-6%2047-17%2068-13%2022-30%2041-53%2054zm25-444a140%20140%200%200%201-124%2070h-203v-267h209c25%200%2050%207%2071%2020a140%20140%200%200%201%2065%20113c0%2022-6%2044-18%2063zm733-40a296%20296%200%200%200-160-42%20292%20292%200%200%200-264%20171%20389%20389%200%200%200%203%20340%20300%20300%200%200%200%20270%20164%20300%20300%200%200%200%20276-167l3-5-96-48-3%205c-40%2072-100%20110-176%20110a192%20192%200%200%201-168-95%20240%20240%200%200%201-32-112h481l1-4a377%20377%200%200%200-32-200%20277%20277%200%200%200-103-117zm-160%2064c35-1%2070%208%20100%2026%2025%2015%2045%2037%2059%2064%2010%2022%2018%2045%2020%2070h-360c10-44%2031-84%2063-114s74-47%20118-46zm657%20462a76%2076%200%200%201-62-25c-12-15-18-40-18-73v-340h150v-105h-150v-175h-114v175h-108v105h108v364c0%2027%203%2053%2012%2078a160%20160%200%200%200%2094%2090c23%2010%2047%2014%2071%2013%2017%200%2033%200%2050-3%2012-3%2025-7%2037-13l4-1v-115l-9%205c-20%2013-42%2020-65%2020zm656-500a283%20283%200%200%200-200-68c-50%200-100%2010-144%2033-40%2020-76%2051-101%2090l-3%204%2086%2066%203-5c17-26%2040-47%2067-61%2028-15%2060-22%2092-22%2043-2%2085%2013%20118%2040a142%20142%200%200%201%2046%20108v29a418%20418%200%200%200-170-36c-75%200-139%2019-189%2056s-75%2092-75%20160a205%20205%200%200%200%20114%20186%20268%20268%200%200%200%20245-5c30-17%2056-41%2076-70v83h108v-401c0-78-25-141-73-186zm-224%20504c-34%202-67-10-94-30a96%2096%200%200%201-36-79%20108%20108%200%200%201%2040-88c28-22%2070-34%20124-34a315%20315%200%200%201%20155%2042%20198%20198%200%200%201-95%20164c-28%2017-60%2026-94%2025z'/%3e%3c/svg%3e",Jg="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='-10%20-10%20276%20276'%3e%3ccircle%20cx='128'%20cy='128'%20r='64'%20fill='%23fff'/%3e%3cpath%20fill='%23fbbc04'%20d='M96%20183.4A63.7%2063.7%200%200%201%2072.6%20160L17.2%2064A128%20128%200%200%200%20128%20256l55.4-96A64%2064%200%200%201%2096%20183.4Z'/%3e%3cpath%20fill='%23fdd663'%20d='M192%20128a63.7%2063.7%200%200%201-8.6%2032L128%20256A128%20128%200%200%200%20238.9%2064h-111a64%2064%200%200%201%2064%2064Z'/%3e%3ccircle%20cx='128'%20cy='128'%20r='52'%20fill='%23fbbc04'/%3e%3cpath%20fill='%23f29900'%20d='M96%2072.6a63.7%2063.7%200%200%201%2032-8.6h110.8a128%20128%200%200%200-221.7%200l55.5%2096A64%2064%200%200%201%2096%2072.6Z'/%3e%3c/svg%3e",kg="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23fff'%20viewBox='-190%20-190%205180%205180'%3e%3clinearGradient%20id='a'%20x1='2149'%20x2='4207'%20y1='4638'%20y2='1076'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23fcc934'/%3e%3cstop%20offset='1'%20stop-color='%23fbbc04'/%3e%3c/linearGradient%3e%3clinearGradient%20id='b'%20x1='2823'%20x2='-214'%20y1='4031'%20y2='2278'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%231e8e3e'/%3e%3cstop%20offset='1'%20stop-color='%2334a853'/%3e%3c/linearGradient%3e%3clinearGradient%20id='c'%20x1='371'%20x2='4429'%20y1='1501'%20y2='1501'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23d93025'/%3e%3cstop%20offset='1'%20stop-color='%23ea4335'/%3e%3c/linearGradient%3e%3cpath%20fill='%23202124'%20d='M4400%203676c-45%2080-93%20157-145%20228l541-228z'/%3e%3cpath%20d='M2399%203600a1200%201200%200%201%200-1%200z'/%3e%3cpath%20fill='url(%23a)'%20d='M3440%203001%202402%204800a2394%202394%200%200%200%202398-2400c0-421-112-835-323-1200H2400l-2%201a1198%201198%200%200%201%201041%201800z'/%3e%3cpath%20fill='url(%23b)'%20d='M1360%203001%20322%201202a2398%202398%200%200%200%202078%203598l1038-1799v-1a1199%201199%200%200%201-2078%202z'/%3e%3cpath%20fill='%231a73e8'%20d='M2399%203351a950%20950%200%201%200%200-1900%20950%20950%200%200%200%200%201900z'/%3e%3cpath%20fill='url(%23c)'%20d='M2399%201200h2076a2396%202396%200%200%200-4153%202l1038%201800h2a1200%201200%200%200%201%201037-1802z'/%3e%3cpath%20fill='%233c4043'%20d='M1987%202326c0-70%200-106%2022-128s57-22%20128-22h2662v1500H2137c-70%200-106%200-128-22s-22-57-22-128z'/%3e%3cpath%20d='M2865%202532a480%20480%200%200%200-236-56h-267v881h267a480%20480%200%200%200%20236-56c66-36%20120-90%20155-155%2037-70%2056-150%2054-229%202-80-17-158-54-229-35-65-90-120-155-156zm-390%2054h154c102%200%20182%2030%20240%2087%2060%2058%2090%20140%2090%20244s-30%20186-90%20244a330%20330%200%200%201-240%2087h-154zm1153%20157a295%20295%200%200%200-158-42c-57%200-112%2016-160%2047-45%2030-81%2073-105%20123-25%2053-38%20110-37%20170%200%2060%2013%20118%2040%20172a302%20302%200%200%200%20270%20163%20300%20300%200%200%200%20276-167l2-6-96-47-2%204c-41%2073-100%20110-176%20110a193%20193%200%200%201-168-95c-20-34-30-72-33-112h482v-4c4-10%205-22%205-33a380%20380%200%200%200-36-168c-23-48-60-87-104-115zm-160%2064c36-2%2070%207%20101%2026%2025%2015%2045%2037%2058%2064%2011%2022%2018%2045%2021%2070h-360c10-44%2030-84%2062-115%2032-30%2075-46%20118-45zm837-87-190%20496-187-493-1-3h-122l251%20634%202%204h110l256-638z'/%3e%3c/svg%3e",gr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='-10%20-10%20276%20276'%3e%3ccircle%20cx='128'%20cy='128'%20r='64'%20fill='%23fff'/%3e%3cpath%20fill='%23669df6'%20d='M96%20183.4A63.7%2063.7%200%200%201%2072.6%20160L17.2%2064A128%20128%200%200%200%20128%20256l55.4-96A64%2064%200%200%201%2096%20183.4Z'/%3e%3cpath%20fill='%23aecbfa'%20d='M192%20128a63.7%2063.7%200%200%201-8.6%2032L128%20256A128%20128%200%200%200%20238.9%2064h-111a64%2064%200%200%201%2064%2064Z'/%3e%3ccircle%20cx='128'%20cy='128'%20r='52'%20fill='%231a73e8'/%3e%3cpath%20fill='%231967d2'%20d='M96%2072.6a63.7%2063.7%200%200%201%2032-8.6h110.8a128%20128%200%200%200-221.7%200l55.5%2096A64%2064%200%200%201%2096%2072.6Z'/%3e%3c/svg%3e",w1="/assets/firefox-1bWoP6pv.svg",O1="/assets/firefox-beta-k3eOH_eK.svg",Ig="/assets/firefox-nightly-Cp5nfeDT.svg",Wg="/assets/safari-na3_-uQk.svg",_c="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:x='http://www.w3.org/1999/xlink'%20viewBox='0%200%2027600%2027600'%3e%3clinearGradient%20id='a'%20gradientUnits='userSpaceOnUse'/%3e%3clinearGradient%20id='b'%20x1='6870'%20x2='24704'%20y1='18705'%20y2='18705'%20x:href='%23a'%3e%3cstop%20offset='0'%20stop-color='%230c59a4'/%3e%3cstop%20offset='1'%20stop-color='%23114a8b'/%3e%3c/linearGradient%3e%3clinearGradient%20id='c'%20x1='16272'%20x2='5133'%20y1='10968'%20y2='23102'%20x:href='%23a'%3e%3cstop%20offset='0'%20stop-color='%231b9de2'/%3e%3cstop%20offset='.16'%20stop-color='%231595df'/%3e%3cstop%20offset='.67'%20stop-color='%230680d7'/%3e%3cstop%20offset='1'%20stop-color='%230078d4'/%3e%3c/linearGradient%3e%3cradialGradient%20id='d'%20cx='16720'%20cy='18747'%20r='9538'%20x:href='%23a'%3e%3cstop%20offset='.72'%20stop-opacity='0'/%3e%3cstop%20offset='.95'%20stop-opacity='.53'/%3e%3cstop%20offset='1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='e'%20cx='7130'%20cy='19866'%20r='14324'%20gradientTransform='matrix(.14843%20-.98892%20.79688%20.1196%20-8759%2025542)'%20x:href='%23a'%3e%3cstop%20offset='.76'%20stop-opacity='0'/%3e%3cstop%20offset='.95'%20stop-opacity='.5'/%3e%3cstop%20offset='1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='f'%20cx='2523'%20cy='4680'%20r='20243'%20gradientTransform='matrix(-.03715%20.99931%20-2.12836%20-.07913%2013579%203530)'%20x:href='%23a'%3e%3cstop%20offset='0'%20stop-color='%2335c1f1'/%3e%3cstop%20offset='.11'%20stop-color='%2334c1ed'/%3e%3cstop%20offset='.23'%20stop-color='%232fc2df'/%3e%3cstop%20offset='.31'%20stop-color='%232bc3d2'/%3e%3cstop%20offset='.67'%20stop-color='%2336c752'/%3e%3c/radialGradient%3e%3cradialGradient%20id='g'%20cx='24247'%20cy='7758'%20r='9734'%20gradientTransform='matrix(.28109%20.95968%20-.78353%20.22949%2024510%20-16292)'%20x:href='%23a'%3e%3cstop%20offset='0'%20stop-color='%2366eb6e'/%3e%3cstop%20offset='1'%20stop-color='%2366eb6e'%20stop-opacity='0'/%3e%3c/radialGradient%3e%3cpath%20id='h'%20d='M24105%2020053a9345%209345%200%2001-1053%20472%2010202%2010202%200%2001-3590%20646c-4732%200-8855-3255-8855-7432%200-1175%20680-2193%201643-2729-4280%20180-5380%204640-5380%207253%200%207387%206810%208137%208276%208137%20791%200%201984-230%202704-456l130-44a12834%2012834%200%20006660-5282c220-350-168-757-535-565z'/%3e%3cpath%20id='i'%20d='M11571%2025141a7913%207913%200%2001-2273-2137%208145%208145%200%2001-1514-4740%208093%208093%200%20013093-6395%208082%208082%200%20011373-859c312-148%20846-414%201554-404a3236%203236%200%20012569%201297%203184%203184%200%2001636%201866c0-21%202446-7960-8005-7960-4390%200-8004%204166-8004%207820%200%202319%20538%204170%201212%205604a12833%2012833%200%20007684%206757%2012795%2012795%200%20003908%20610c1414%200%202774-233%204045-656a7575%207575%200%2001-6278-803z'/%3e%3cpath%20id='j'%20d='M16231%2015886c-80%20105-330%20250-330%20566%200%20260%20170%20512%20472%20723%201438%201003%204149%20868%204156%20868a5954%205954%200%20003027-839%206147%206147%200%20001133-850%206180%206180%200%20001910-4437c26-2242-796-3732-1133-4392-2120-4141-6694-6525-11668-6525-7011%200-12703%205635-12798%2012620%2047-3654%203679-6605%207996-6605%20350%200%202346%2034%204200%201007%201634%20858%202490%201894%203086%202921%20618%201067%20728%202415%20728%202952s-271%201333-780%201990z'/%3e%3cuse%20fill='url(%23b)'%20x:href='%23h'/%3e%3cuse%20fill='url(%23d)'%20opacity='.35'%20x:href='%23h'/%3e%3cuse%20fill='url(%23c)'%20x:href='%23i'/%3e%3cuse%20fill='url(%23e)'%20opacity='.4'%20x:href='%23i'/%3e%3cuse%20fill='url(%23f)'%20x:href='%23j'/%3e%3cuse%20fill='url(%23g)'%20x:href='%23j'/%3e%3c/svg%3e",R1={chromium:gr,"chromium-headless-shell":gr,"chrome-for-testing":gr,chrome:Fg,"chrome-beta":Kg,"chrome-dev":kg,"chrome-canary":Jg,firefox:w1,"moz-firefox":w1,"firefox-beta":O1,"moz-firefox-beta":O1,"moz-firefox-nightly":Ig,webkit:Wg,msedge:_c,"msedge-beta":_c,"msedge-dev":_c,"msedge-canary":_c},$g=({browserName:u,channel:i})=>{const f=i&&R1[i]?i:u,s=f?R1[f]:void 0;if(s)return O.jsx("img",{className:"browser-icon-img",src:s,alt:"","aria-hidden":"true"});const r=u?u[0].toUpperCase():"?";return O.jsx("span",{className:"browser-icon-fallback","aria-hidden":"true",children:r})},Pg=()=>O.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:O.jsx("polyline",{points:"15 18 9 12 15 6"})}),tv=()=>O.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:O.jsx("polyline",{points:"9 18 15 12 9 6"})}),ev=()=>O.jsx("svg",{width:"20",height:"20",viewBox:"0 -960 960 960",style:{fill:"currentColor"},"aria-hidden":"true",children:O.jsx("path",{d:"M240-80q-33 0-56.5-23.5T160-160v-400q0-33 23.5-56.5T240-640h40v-80q0-83 58.5-141.5T480-920q83 0 141.5 58.5T680-720v80h40q33 0 56.5 23.5T800-560v400q0 33-23.5 56.5T720-80H240Zm0-80h480v-400H240v400Zm296.5-143.5Q560-327 560-360t-23.5-56.5Q513-440 480-440t-56.5 23.5Q400-393 400-360t23.5 56.5Q447-280 480-280t56.5-23.5ZM360-640h240v-80q0-50-35-85t-85-35q-50 0-85 35t-35 85v80ZM240-160v-400 400Z"})}),nv=()=>O.jsx("svg",{width:"20",height:"20",viewBox:"0 -960 960 960",style:{fill:"currentColor"},"aria-hidden":"true",children:O.jsx("path",{d:"M240-160h480v-400H240v400Zm296.5-143.5Q560-327 560-360t-23.5-56.5Q513-440 480-440t-56.5 23.5Q400-393 400-360t23.5 56.5Q447-280 480-280t56.5-23.5ZM240-160v-400 400Zm0 80q-33 0-56.5-23.5T160-160v-400q0-33 23.5-56.5T240-640h280v-80q0-83 58.5-141.5T720-920q83 0 141.5 58.5T920-720h-80q0-50-35-85t-85-35q-50 0-85 35t-35 85v80h120q33 0 56.5 23.5T800-560v400q0 33-23.5 56.5T720-80H240Z"})}),av=()=>O.jsx("svg",{width:"20",height:"20",viewBox:"0 -960 960 960",style:{fill:"currentColor"},"aria-hidden":"true",children:O.jsx("path",{d:"M680-80v-120H560v-80h120v-120h80v120h120v80H760v120h-80ZM200-200v-200h80v120h120v80H200Zm0-360v-200h200v80H280v120h-80Zm480 0v-120H560v-80h200v200h-80Z"})}),_h=()=>O.jsx("svg",{width:"20",height:"20",viewBox:"0 -960 960 960",style:{fill:"currentColor"},"aria-hidden":"true",children:O.jsx("path",{d:"M480-320 280-520l56-58 104 104v-326h80v326l104-104 56 58-200 200ZM240-160q-33 0-56.5-23.5T160-240v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-160H240Z"})}),lv=()=>O.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[O.jsx("polyline",{points:"23 4 23 10 17 10"}),O.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]}),iv=()=>O.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:O.jsx("path",{d:"M8 0a8.2 8.2 0 0 1 .701.031C9.444.095 9.99.645 10.16 1.29l.288 1.107c.018.066.079.158.212.224.231.114.454.243.668.386.123.082.233.09.299.071l1.103-.303c.644-.176 1.392.021 1.82.63.27.385.506.792.704 1.218.315.675.111 1.422-.364 1.891l-.814.806c-.049.048-.098.147-.088.294.016.257.016.515 0 .772-.01.147.038.246.088.294l.814.806c.475.469.679 1.216.364 1.891a7.977 7.977 0 0 1-.704 1.217c-.428.61-1.176.807-1.82.63l-1.102-.302c-.067-.019-.177-.011-.3.071a5.909 5.909 0 0 1-.668.386c-.133.066-.194.158-.211.224l-.29 1.106c-.168.646-.715 1.196-1.458 1.26a8.006 8.006 0 0 1-1.402 0c-.743-.064-1.289-.614-1.458-1.26l-.289-1.106c-.018-.066-.079-.158-.212-.224a5.738 5.738 0 0 1-.668-.386c-.123-.082-.233-.09-.299-.071l-1.103.303c-.644.176-1.392-.021-1.82-.63a8.12 8.12 0 0 1-.704-1.218c-.315-.675-.111-1.422.363-1.891l.815-.806c.05-.048.098-.147.088-.294a6.214 6.214 0 0 1 0-.772c.01-.147-.038-.246-.088-.294l-.815-.806C.635 6.045.431 5.298.746 4.623a7.92 7.92 0 0 1 .704-1.217c.428-.61 1.176-.807 1.82-.63l1.102.302c.067.019.177.011.3-.071.214-.143.437-.272.668-.386.133-.066.194-.158.211-.224l.29-1.106C6.009.645 6.556.095 7.299.03 7.53.01 7.764 0 8 0Zm-.571 1.525c-.036.003-.108.036-.137.146l-.289 1.105c-.147.561-.549.967-.998 1.189-.173.086-.34.183-.5.29-.417.278-.97.423-1.529.27l-1.103-.303c-.109-.03-.175.016-.195.045-.22.312-.412.644-.573.99-.014.031-.021.11.059.19l.815.806c.411.406.562.957.53 1.456a4.709 4.709 0 0 0 0 .582c.032.499-.119 1.05-.53 1.456l-.815.806c-.081.08-.073.159-.059.19.162.346.353.677.573.989.02.03.085.076.195.046l1.102-.303c.56-.153 1.113-.008 1.53.27.161.107.328.204.501.29.447.222.85.629.997 1.189l.289 1.105c.029.109.101.143.137.146a6.6 6.6 0 0 0 1.142 0c.036-.003.108-.036.137-.146l.289-1.105c.147-.561.549-.967.998-1.189.173-.086.34-.183.5-.29.417-.278.97-.423 1.529-.27l1.103.303c.109.029.175-.016.195-.045.22-.313.411-.644.573-.99.014-.031.021-.11-.059-.19l-.815-.806c-.411-.406-.562-.957-.53-1.456a4.709 4.709 0 0 0 0-.582c-.032-.499.119-1.05.53-1.456l.815-.806c.081-.08.073-.159.059-.19a6.464 6.464 0 0 0-.573-.989c-.02-.03-.085-.076-.195-.046l-1.102.303c-.56.153-1.113.008-1.53-.27a4.44 4.44 0 0 0-.501-.29c-.447-.222-.85-.629-.997-1.189l-.289-1.105c-.029-.11-.101-.143-.137-.146a6.6 6.6 0 0 0-1.142 0ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM9.5 8a1.5 1.5 0 1 0-3.001.001A1.5 1.5 0 0 0 9.5 8Z"})});function wc(u){if(!u||!u.naturalWidth||!u.naturalHeight)return null;const i=u.getBoundingClientRect(),f=u.naturalWidth/u.naturalHeight,s=i.width/i.height;if(f>s){const o=i.width/f;return{rect:i,renderW:i.width,renderH:o,offsetX:0,offsetY:(i.height-o)/2}}const r=i.height*f;return{rect:i,renderW:r,renderH:i.height,offsetX:(i.width-r)/2,offsetY:0}}function Nr(u,i,f,s,r){const o=(s-u.rect.left-u.offsetX)/u.renderW,h=(r-u.rect.top-u.offsetY)/u.renderH;return{x:Math.round(o*i),y:Math.round(h*f)}}const ln=Wn.forwardRef(function({children:i,title:f="",icon:s,disabled:r=!1,toggled:o=!1,onClick:h=()=>{},style:v,testId:m,className:y,ariaLabel:_,errorBadge:p},b){const T=Wn.useId();return O.jsxs("button",{ref:b,className:Ji(y,"toolbar-button",s,o&&"toggled"),onMouseDown:D1,onClick:h,onDoubleClick:D1,title:f,disabled:!!r,style:v,"data-testid":m,"aria-label":_||f,"aria-describedby":p?T:void 0,children:[s&&O.jsx("span",{className:`codicon codicon-${s}`,style:i?{marginRight:5}:{}}),i,p&&O.jsx("span",{id:T,className:"toolbar-button-error-badge",title:p,"aria-label":p})]})}),D1=u=>{u.stopPropagation(),u.preventDefault()},uv=({blob:u,blobUrl:i,onSave:f,onClose:s})=>{const r=mt.useCallback(async()=>{await f(u)},[f,u]);return O.jsx("div",{className:"modal-overlay",role:"dialog","aria-modal":"true","aria-label":"Recording preview",children:O.jsxs("div",{className:"modal",children:[O.jsxs("div",{className:"modal-toolbar",children:[O.jsx("div",{className:"modal-title",children:"Recording"}),O.jsx(ln,{title:"Save recording",onClick:r,children:O.jsx(_h,{})}),O.jsx(ln,{title:"Discard",icon:"close",onClick:s})]}),O.jsx("div",{className:"modal-body recording-body",children:O.jsx("video",{className:"recording-video",src:i,controls:!0,autoPlay:!0})})]})})};async function ph(u,i,f,s){if(!u.naturalWidth||!u.naturalHeight||!i||!f)return null;const r=document.createElement("canvas");r.width=u.naturalWidth,r.height=u.naturalHeight;const o=r.getContext("2d");if(!o)return null;o.drawImage(u,0,0,r.width,r.height);const h=r.width/i,v=r.height/f,m=Math.max(11,Math.round(14*v));o.font=`500 ${m}px -apple-system, system-ui, sans-serif`,o.textBaseline="middle";for(const y of s){const[_,p,b]=y.color.split(" ").map(Number),T=`rgb(${_}, ${p}, ${b})`,D=`rgba(${_}, ${p}, ${b}, 0.12)`,G=y.x*h,W=y.y*v,J=y.width*h,Z=y.height*v;if(o.fillStyle=D,o.fillRect(G,W,J,Z),o.lineWidth=Math.max(2,Math.round(2*v)),o.strokeStyle=T,o.strokeRect(G,W,J,Z),y.text){const $=Math.max(4,Math.round(6*v)),I=Math.max(2,Math.round(3*v)),it=o.measureText(y.text).width+$*2,X=m+I*2,et=G-o.lineWidth/2,ut=W-X;o.fillStyle=T,o.fillRect(et,ut,it,X),o.fillStyle="#fff",o.fillText(y.text,et+$,ut+X/2)}}return await new Promise(y=>r.toBlob(y,"image/png"))}async function bh(u,i){var _;const f=new Date().toISOString().replace(/[:.]/g,"-"),s=i??`annotations-${f}.png`,r=(((_=s.match(/\.[^./\\]+$/))==null?void 0:_[0])??".bin").toLowerCase(),o=u.type||{".png":"image/png",".zip":"application/zip"}[r]||"application/octet-stream",h={".png":"PNG image",".zip":"Zip archive"}[r]||"File",v=window.showSaveFilePicker;if(v){try{const b=await(await v({suggestedName:s,startIn:"downloads",types:[{description:h,accept:{[o]:[r]}}]})).createWritable();await b.write(u),await b.close()}catch(p){if((p==null?void 0:p.name)==="AbortError")return!1;throw p}return!0}const m=URL.createObjectURL(u),y=document.createElement("a");return y.href=m,y.download=s,document.body.appendChild(y),y.click(),document.body.removeChild(y),URL.revokeObjectURL(m),!0}const Sh=[{name:"blue",rgb:"54 116 209"},{name:"red",rgb:"229 62 62"},{name:"green",rgb:"56 161 105"},{name:"orange",rgb:"221 107 32"},{name:"purple",rgb:"128 90 213"},{name:"pink",rgb:"213 63 140"}],cv=Sh[0].rgb,sv=["nw","n","ne","e","se","s","sw","w"],z1=4;function fv(){return"ann-"+Math.random().toString(36).slice(2,10)}function N1(u){return{x:Math.min(u.startX,u.x),y:Math.min(u.startY,u.y),width:Math.abs(u.x-u.startX),height:Math.abs(u.y-u.startY)}}function rv(u,i,f,s){let r=u.x,o=u.y,h=u.x+u.width,v=u.y+u.height;switch(i){case"move":r+=f,o+=s,h+=f,v+=s;break;case"nw":r+=f,o+=s;break;case"n":o+=s;break;case"ne":h+=f,o+=s;break;case"e":h+=f;break;case"se":h+=f,v+=s;break;case"s":v+=s;break;case"sw":r+=f,v+=s;break;case"w":r+=f;break}return{x:Math.min(r,h),y:Math.min(o,v),width:Math.abs(h-r),height:Math.abs(v-o)}}function ov(u,i,f,s,r){const o=u.rect.left-i.left+u.offsetX,h=u.rect.top-i.top+u.offsetY;return{left:o+r.x/f*u.renderW,top:h+r.y/s*u.renderH,width:r.width/f*u.renderW,height:r.height/s*u.renderH}}const dv=({color:u,onChange:i})=>O.jsx("div",{className:"annotations-color-picker",role:"radiogroup","aria-label":"Annotation color",children:Sh.map(({name:f,rgb:s})=>O.jsx("button",{type:"button",role:"radio","aria-checked":u===s,title:`Use ${f}`,className:"annotations-color-swatch"+(u===s?" selected":""),style:{"--annotation-color":s},onClick:()=>i(s)},f))}),Eh=mt.forwardRef(({active:u,displayRef:i,screenRef:f,viewportWidth:s,viewportHeight:r,annotations:o,onAnnotationsChange:h,focusAnnotationId:v},m)=>{var k;const[y,_]=mt.useState(null),[p,b]=mt.useState(null),[T,D]=mt.useState(null),[G,W]=mt.useState(cv),[J,Z]=mt.useState(null),[,$]=mt.useState(0),I=mt.useCallback(()=>$(w=>w+1),[]),B=mt.useRef(null),it=mt.useRef(o),X=mt.useRef(v);mt.useLayoutEffect(()=>{it.current=o,X.current=v});const et=(p==null?void 0:p.id)??null,ut=p!=null&&p.editing?p.id:null;mt.useEffect(()=>{if(!u)return;const w=()=>I(),U=i.current,L=()=>I();return window.addEventListener("resize",w),U==null||U.addEventListener("load",L),()=>{window.removeEventListener("resize",w),U==null||U.removeEventListener("load",L)}},[u,i,I]),mt.useEffect(()=>{var w;if(u){const U=X.current;if(U){const L=it.current.find(P=>P.id===U);if(L){Z({...L}),b({id:U,editing:!0});return}}(w=B.current)==null||w.focus()}else b(null)},[u]),mt.useEffect(()=>{if(!T)return;const w=L=>{const P=wc(i.current);if(!P||!s||!r)return;const H=Nr(P,s,r,L.clientX,L.clientY),ht=H.x-T.startVx,Yt=H.y-T.startVy;ht===0&&Yt===0||h(it.current.map(Ft=>Ft.id===T.id?{...Ft,...rv(T.orig,T.kind,ht,Yt)}:Ft))},U=()=>D(null);return window.addEventListener("mousemove",w),window.addEventListener("mouseup",U),()=>{window.removeEventListener("mousemove",w),window.removeEventListener("mouseup",U)}},[T,i,s,r,h]);function st(w){if(!s||!r)return null;const U=wc(i.current);return U?Nr(U,s,r,w.clientX,w.clientY):null}function at(w,U){for(let L=o.length-1;L>=0;L--){const P=o[L];if(w>=P.x&&w<=P.x+P.width&&U>=P.y&&U<=P.y+P.height)return P}}function _t(w){var P;if(w.button!==0)return;(P=B.current)==null||P.focus();const U=st(w);if(!U)return;const L=at(U.x,U.y);if(w.preventDefault(),L){b({id:L.id,editing:!1}),D({kind:"move",id:L.id,orig:{x:L.x,y:L.y,width:L.width,height:L.height},startVx:U.x,startVy:U.y});return}_({startX:U.x,startY:U.y,x:U.x,y:U.y}),b(null)}function pt(w){if(T||!y)return;const U=st(w);U&&(y.x===U.x&&y.y===U.y||_({...y,x:U.x,y:U.y}))}function yt(w){if(!y)return;w.preventDefault();const U=N1(y);if(_(null),U.widthL.id===et?{...L,x:L.x+w,y:L.y+U}:L))}function V(){var w;b(U=>U!=null&&U.editing?{...U,editing:!1}:U),(w=B.current)==null||w.focus()}function lt(w){if(w.key==="Escape"){w.preventDefault(),y?_(null):ut?V():et&&b(null);return}if((w.key==="Delete"||w.key==="Backspace")&&et&&!ut){w.preventDefault(),h(o.filter(U=>U.id!==et)),b(null);return}if(et&&!ut){const U=w.shiftKey?1:5;if(w.key==="ArrowLeft"){w.preventDefault(),N(-U,0);return}if(w.key==="ArrowRight"){w.preventDefault(),N(U,0);return}if(w.key==="ArrowUp"){w.preventDefault(),N(0,-U);return}if(w.key==="ArrowDown"){w.preventDefault(),N(0,U);return}}}if(mt.useEffect(()=>{ut||Z(null)},[ut]),mt.useImperativeHandle(m,()=>({clearSelection:()=>{_(null),b(null)}}),[]),!u)return null;const rt=wc(i.current),gt=((k=f.current)==null?void 0:k.getBoundingClientRect())??null,E=w=>rt&>&&s&&r?ov(rt,gt,s,r,w):null,R=ut?o.find(w=>w.id===ut):void 0;return O.jsxs("div",{ref:B,className:"annotations-layer",tabIndex:0,onMouseDown:_t,onMouseMove:pt,onMouseUp:yt,onKeyDown:lt,onContextMenu:w=>w.preventDefault(),children:[o.map(w=>{const U=E(w);if(!U)return null;const L=w.id===et,P=w.id===ut;return O.jsxs("div",{className:"annotations-rect"+(L?" selected":"")+(P?" editing":"")+(w.text?"":" empty"),style:{...U,"--annotation-color":w.color},onDoubleClick:H=>{H.preventDefault(),H.stopPropagation(),ut!==w.id&&Z({...w}),b({id:w.id,editing:!0})},children:[w.text&&O.jsx("div",{className:"annotations-label",onMouseDown:H=>{H.preventDefault(),H.stopPropagation(),ut!==w.id&&Z({...w}),b({id:w.id,editing:!0})},children:w.text}),L&&!P&&sv.map(H=>O.jsx("div",{className:"annotations-handle annotations-handle-"+H,onMouseDown:ht=>ot(H,w,ht)},H))]},w.id)}),y&&(()=>{const w=E(N1(y));return w?O.jsx("div",{className:"annotations-rect draft",style:{...w,"--annotation-color":G}}):null})(),R&&(()=>{const w=E(R);if(!w)return null;const U={left:w.left,top:w.top+w.height+6,"--annotation-color":R.color};return O.jsxs("div",{className:"annotations-popover",style:U,onMouseDown:L=>L.stopPropagation(),onClick:L=>L.stopPropagation(),children:[O.jsx("textarea",{className:"annotations-textarea",autoFocus:!0,onFocus:L=>{const P=L.target.value.length;L.target.setSelectionRange(P,P)},value:R.text,placeholder:"Task or comment…",onChange:L=>{const P=L.target.value;h(o.map(H=>H.id===R.id?{...H,text:P}:H))},onKeyDown:L=>{(L.key==="Enter"&&!L.shiftKey&&!L.ctrlKey&&!L.metaKey||L.key==="Escape")&&(L.preventDefault(),V()),L.stopPropagation()},onKeyUp:L=>L.stopPropagation()}),O.jsxs("div",{className:"annotations-popover-footer",children:[O.jsx(dv,{color:R.color,onChange:L=>{h(o.map(P=>P.id===R.id?{...P,color:L}:P)),W(L)}}),O.jsx("div",{className:"annotations-popover-actions",children:J?O.jsxs(O.Fragment,{children:[O.jsx("button",{className:"annotations-action-btn",onClick:()=>{var P;const L=J;h(o.map(H=>H.id===L.id?L:H)),b(null),(P=B.current)==null||P.focus()},children:"Cancel"}),O.jsx("button",{className:"annotations-action-btn",onClick:V,children:"Done"})]}):O.jsxs(O.Fragment,{children:[O.jsx("button",{className:"annotations-action-btn danger",onClick:()=>{var L;h(o.filter(P=>P.id!==R.id)),b(null),(L=B.current)==null||L.focus()},children:"Discard"}),O.jsx("button",{className:"annotations-action-btn",onClick:V,children:"Add"})]})})]})]})})()]})});Eh.displayName="Annotations";const hv=({model:u,session:i,onSubmit:f})=>{const[s,r]=mt.useState(!1),[o,h]=mt.useState(null);return O.jsxs("aside",{className:"annotate-sidebar","aria-label":"Annotation screenshots",children:[O.jsx("div",{className:"annotate-sidebar-header dashboard-shell-sidebar-header",children:O.jsx("h2",{className:"dashboard-shell-sidebar-title",children:"UI Review"})}),O.jsx("div",{className:"annotate-sidebar-list",children:i.frames.map(v=>{const m=v.id===i.selectedFrameId,y=v.annotations;return O.jsxs("div",{className:"annotate-sidebar-thumb"+(m?" selected":""),children:[O.jsx("button",{className:"annotate-sidebar-thumb-button",onClick:()=>u.selectAnnotateFrame(v.id),title:`${v.sessionTitle||"session"} · ${v.title||"tab"} ${v.url}`,"aria-pressed":m,children:O.jsxs("span",{className:"annotate-sidebar-thumb-img-wrap",style:{aspectRatio:`${v.viewportWidth} / ${v.viewportHeight}`},children:[O.jsx("img",{className:"annotate-sidebar-thumb-img",alt:"",src:"data:image/png;base64,"+v.data}),v.annotations.map(_=>O.jsx("span",{className:"annotate-sidebar-thumb-rect"+(_.id===o?" hovered":""),style:{left:`${_.x/v.viewportWidth*100}%`,top:`${_.y/v.viewportHeight*100}%`,width:`${_.width/v.viewportWidth*100}%`,height:`${_.height/v.viewportHeight*100}%`,"--annotation-color":_.color}},_.id))]})}),y.length>0&&O.jsx("ul",{className:"annotate-sidebar-comments",children:y.map(_=>O.jsx("li",{children:O.jsx("button",{className:"annotate-sidebar-comment"+(_.text?"":" empty"),style:{"--annotation-color":_.color},onClick:()=>u.selectAnnotateFrame(v.id,_.id),onMouseEnter:()=>h(_.id),onMouseLeave:()=>h(null),title:"Edit comment",children:_.text||"Empty comment"})},_.id))}),O.jsx(ln,{className:"annotate-sidebar-thumb-remove",icon:"close",title:"Remove screenshot",onClick:_=>{_.stopPropagation(),u.removeAnnotateFrame(v.id)}})]},v.id)})}),O.jsx("div",{className:"annotate-sidebar-feedback-wrap","data-value":i.feedback,children:O.jsx("textarea",{className:"annotate-sidebar-feedback",placeholder:"Feedback…",value:i.feedback,onChange:v=>u.updateFeedback(v.target.value)})}),O.jsx("button",{className:"annotate-sidebar-submit",disabled:s,onClick:async()=>{r(!0);try{await f()}finally{r(!1)}},children:s?"Submitting…":"Submit"})]})},mv=({model:u,frame:i,focusAnnotationId:f})=>{const s=mt.useRef(null),r=mt.useRef(null),o=mt.useRef(null),h=mt.useCallback(y=>{u.updateFrameAnnotations(i.id,y)},[u,i.id]),v=mt.useCallback(async()=>{const y=r.current;if(!y)return;const _=await ph(y,i.viewportWidth,i.viewportHeight,i.annotations);if(!_)return;const p=(i.title||i.url||"screenshot").replace(/[^a-z0-9]+/gi,"-").slice(0,40)||"screenshot",b=new Date().toISOString().replace(/[:.]/g,"-");await bh(_,`annotations-${b}-${p}.png`)},[i]),m=mt.useCallback(()=>{var y;u.updateFrameAnnotations(i.id,[]),(y=s.current)==null||y.clearSelection()},[u,i.id]);return O.jsx("div",{className:"annotate-overlay",role:"dialog","aria-label":`Annotate screenshot from ${i.title||i.url||"page"}`,children:O.jsxs("div",{className:"annotate-overlay-window",children:[O.jsxs("div",{className:"annotate-overlay-chrome",children:[O.jsxs("span",{className:"annotate-overlay-titlebar",children:[O.jsx("span",{className:"annotate-overlay-title-text",children:i.title||"untitled"}),O.jsx("span",{className:"annotate-overlay-title-sep",children:"·"}),O.jsx("span",{className:"annotate-overlay-title-url",children:i.url})]}),O.jsx(ln,{title:"Save screenshot",onClick:v,children:O.jsx(_h,{})}),O.jsx(ln,{title:"Clear annotations",icon:"circle-slash",disabled:i.annotations.length===0,onClick:m}),O.jsx(ln,{title:"Done annotating",icon:"check",onClick:()=>u.deselectFrame()})]}),O.jsxs("div",{ref:o,className:"annotate-overlay-canvas",children:[O.jsx("img",{ref:r,className:"annotate-modal-image",alt:"annotation",src:"data:image/png;base64,"+i.data}),O.jsx(Eh,{ref:s,active:!0,displayRef:r,screenRef:o,viewportWidth:i.viewportWidth,viewportHeight:i.viewportHeight,annotations:i.annotations,onAnnotationsChange:h,focusAnnotationId:f})]})]})})},yv=["left","middle","right"];async function gv(u,i,f,s){try{return await(await window.showSaveFilePicker({suggestedName:u,types:[{description:i,accept:{[f]:[s]}}]})).createWritable()}catch{return null}}function vv(u){const i=u.trim();if(!i||/^[a-z][a-z0-9+.-]*:\/\//i.test(i)||i.startsWith("about:")||i.startsWith("data:"))return i;const f=i.split(/[/?#]/,1)[0],s=f.includes("."),r=/^localhost(:\d+)?$/i.test(f),o=/:\d+$/.test(f),h=/^\d{1,3}(\.\d{1,3}){3}(:\d+)?$/.test(f);return r||h||o&&!s?"http://"+i:s||o?"https://"+i:"https://"+f+".com"+i.slice(f.length)}const _v=({model:u})=>{const[,i]=mt.useState(0);mt.useEffect(()=>u.subscribe(()=>i(H=>H+1)),[u]);const{tabs:f,mode:s,recording:r,liveFrame:o,annotateSession:h,pendingCapture:v}=u.state,m=s==="interactive",y=!!h,_=(h==null?void 0:h.frames.find(H=>H.id===h.selectedFrameId))??null,[p,b]=mt.useState(0),T=mt.useRef(null),D=mt.useRef(null),G=mt.useRef(null),W=mt.useRef(null),J=mt.useRef(null),Z=mt.useRef(null),$=mt.useRef(0),I=o&&o.viewportWidth&&o.viewportHeight?o.viewportWidth/o.viewportHeight:null,[B]=yh(W),it=(r==null?void 0:r.phase)!=="recording",X=mt.useMemo(()=>{var Gt;const ht=it?((Gt=J.current)==null?void 0:Gt.offsetHeight)??40:0,Yt=B.width-24,Ft=B.height-24;if(Yt<=0||Ft<=0)return;if(I===null)return{width:Yt,height:Ft};const ae=Ft-ht;let oe=Yt,Jt=oe/I;return Jt>ae&&(Jt=ae,oe=Jt*I),{width:oe,height:Jt+ht}},[B,I,it]);mt.useEffect(()=>{if(p===0)return;const H=Z.current;if(!H)return;H.classList.remove("flash"),H.offsetWidth,H.classList.add("flash");const ht=setTimeout(()=>H.classList.remove("flash"),2e3);return()=>{clearTimeout(ht),H.classList.remove("flash")}},[p]),mt.useEffect(()=>{var H;m&&((H=Z.current)==null||H.classList.remove("flash"))},[m]);function et(){b(H=>H+1)}const ut=mt.useCallback(async H=>{const ht=await gv(`playwright-recording-${Date.now()}.webm`,"WebM Video","video/webm",".webm");ht&&(await ht.write(H),await ht.close(),u.discardRecording())},[u]),st=f==null?void 0:f.find(H=>H.selected),at=!!st,[_t,pt]=mt.useState((st==null?void 0:st.url)??"");mt.useEffect(()=>{pt((st==null?void 0:st.url)??"")},[st==null?void 0:st.url]);function yt(H){const ht=(o==null?void 0:o.viewportWidth)??0,Yt=(o==null?void 0:o.viewportHeight)??0;if(!ht||!Yt)return{x:0,y:0};const Ft=wc(T.current);return Ft?Nr(Ft,ht,Yt,H.clientX,H.clientY):{x:0,y:0}}function ot(H,ht){const{x:Yt,y:Ft}=yt(ht);u[H](Yt,Ft,yv[ht.button]||"left")}function N(H){var ht;if(H.preventDefault(),(ht=D.current)==null||ht.focus(),!!at){if(!m){et();return}ot("mousedown",H)}}function V(H){m&&(H.preventDefault(),ot("mouseup",H))}function lt(H){if(!m)return;const ht=Date.now();if(ht-$.current<32)return;$.current=ht;const{x:Yt,y:Ft}=yt(H);u.mousemove(Yt,Ft)}function rt(H){m&&(H.preventDefault(),u.wheel(H.deltaX,H.deltaY))}function gt(H){m&&(H.preventDefault(),u.keydown(H.key))}function E(H){m&&(H.preventDefault(),u.keyup(H.key))}function R(H){if(H.key==="Enter"){const ht=vv(H.target.value);u.navigate(ht),H.currentTarget.blur()}}const k=st?void 0:"Select a session",w=(r==null?void 0:r.phase)==="recording",U=(r==null?void 0:r.phase)==="stopped",L=y?"Dashboard: annotate":w?"Dashboard: record":"Dashboard",P=!!_;return O.jsxs("main",{className:"dashboard-view"+(m?" interactive":"")+(y?" has-annotate-sidebar":""),"aria-label":L,children:[O.jsxs("div",{className:"dashboard-main",children:[O.jsxs("div",{ref:G,className:"toolbar",hidden:P,children:[O.jsx(ln,{ref:Z,className:"mode-toggle mode-interactive",title:m?"Disable interactive mode":"Enable interactive mode",toggled:m,disabled:!at,onClick:()=>{m?u.toggleInteractive():u.enterInteractive()},children:m?O.jsx(nv,{}):O.jsx(ev,{})}),O.jsx(ln,{className:"mode-annotate",title:y?"Add screenshot":"Take screenshot",disabled:!at||v,onClick:()=>{y?u.addAnnotateFrame():u.enterAnnotate("user")},children:O.jsx(av,{})}),O.jsx(ln,{className:"mode-toggle mode-record",title:w?"Stop recording":"Record video",icon:"record",toggled:w,disabled:!at||U,onClick:()=>{w?u.stopRecording():u.startRecording()},children:w&&O.jsx("span",{className:"mode-record-label",children:"Recording..."})})]}),O.jsx("div",{className:"viewport-wrapper",children:O.jsx("div",{ref:W,className:"viewport-main",children:O.jsxs("div",{className:"browser-window",style:X,children:[it&&O.jsxs("div",{ref:J,className:"browser-chrome",children:[O.jsx("button",{className:"nav-btn",title:"Back","aria-disabled":!m||void 0,onClick:()=>{if(!m){et();return}u.back()},children:O.jsx(Pg,{})}),O.jsx("button",{className:"nav-btn",title:"Forward","aria-disabled":!m||void 0,onClick:()=>{if(!m){et();return}u.forward()},children:O.jsx(tv,{})}),O.jsx("button",{className:"nav-btn",title:"Reload","aria-disabled":!m||void 0,onClick:()=>{if(!m){et();return}u.reload()},children:O.jsx(lv,{})}),O.jsx("div",{className:"omnibox-wrap",children:O.jsx("input",{id:"omnibox",className:"omnibox",type:"text",placeholder:"Search or enter URL",spellCheck:!1,autoComplete:"off",value:_t,onChange:H=>pt(H.target.value),onKeyDown:H=>{m&&R(H)},onFocus:H=>{if(!m){et(),H.target.blur();return}H.target.select()},"aria-disabled":!m||void 0,"aria-label":m?"Search or enter URL":"URL input - enable interactive mode to use this field",readOnly:!m})})]}),O.jsx("div",{ref:D,className:"screen",tabIndex:0,style:{display:o?"":"none"},onMouseDown:N,onMouseUp:V,onMouseMove:lt,onWheel:rt,onKeyDown:gt,onKeyUp:E,onContextMenu:H=>H.preventDefault(),children:O.jsx("img",{ref:T,id:"display",className:"display",alt:"screencast",src:o?"data:image/jpeg;base64,"+o.data:void 0})}),k&&O.jsx("div",{className:"screen-overlay"+(o?" has-frame":""),children:O.jsx("span",{children:k})})]})})})]}),_&&O.jsx(mv,{model:u,frame:_,focusAnnotationId:h==null?void 0:h.focusAnnotationId},_.id+((h==null?void 0:h.focusAnnotationId)??"")),h&&O.jsx(hv,{model:u,session:h,onSubmit:()=>u.submitAnnotateSession()}),U&&(r==null?void 0:r.phase)==="stopped"&&O.jsx(uv,{blob:r.blob,blobUrl:r.blobUrl,onSave:ut,onClose:()=>u.discardRecording()})]})},Pi=15,Mr=30,Ur=19,pv=29,Cc=256,Ir=Cc+1+pv,M1=2*Ir+1,Vi=256,bv=7,U1=16,C1=17,L1=18,vr=16,Lc=-1,Sv=1,pc=2,Ev=0,Ql=0,H1=1,Tv=3,ke=4,An=0,Th=1,bc=2,xn=-2,Av=-3,Xl=-5;function Zc(u){return Xc(u.map(([i,f])=>new Array(i).fill(f,0,i)))}function Xc(u){return u.reduce((i,f)=>i.concat(Array.isArray(f)?Xc(f):f),[])}const j1=[0,1,2,3].concat(...Zc([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function $t(){const u=this;function i(r){const o=u.dyn_tree,h=u.stat_desc.static_tree,v=u.stat_desc.extra_bits,m=u.stat_desc.extra_base,y=u.stat_desc.max_length;let _,p,b,T,D,G,W=0;for(T=0;T<=Pi;T++)r.bl_count[T]=0;for(o[r.heap[r.heap_max]*2+1]=0,_=r.heap_max+1;_y&&(T=y,W++),o[p*2+1]=T,!(p>u.max_code)&&(r.bl_count[T]++,D=0,p>=m&&(D=v[p-m]),G=o[p*2],r.opt_len+=G*(T+D),h&&(r.static_len+=G*(h[p*2+1]+D)));if(W!==0){do{for(T=y-1;r.bl_count[T]===0;)T--;r.bl_count[T]--,r.bl_count[T+1]+=2,r.bl_count[y]--,W-=2}while(W>0);for(T=y;T!==0;T--)for(p=r.bl_count[T];p!==0;)b=r.heap[--_],!(b>u.max_code)&&(o[b*2+1]!=T&&(r.opt_len+=(T-o[b*2+1])*o[b*2],o[b*2+1]=T),p--)}}function f(r,o){let h=0;do h|=r&1,r>>>=1,h<<=1;while(--o>0);return h>>>1}function s(r,o,h){const v=[];let m=0,y,_,p;for(y=1;y<=Pi;y++)v[y]=m=m+h[y-1]<<1;for(_=0;_<=o;_++)p=r[_*2+1],p!==0&&(r[_*2]=f(v[p]++,p))}u.build_tree=function(r){const o=u.dyn_tree,h=u.stat_desc.static_tree,v=u.stat_desc.elems;let m,y,_=-1,p;for(r.heap_len=0,r.heap_max=M1,m=0;m=1;m--)r.pqdownheap(o,m);p=v;do m=r.heap[1],r.heap[1]=r.heap[r.heap_len--],r.pqdownheap(o,1),y=r.heap[1],r.heap[--r.heap_max]=m,r.heap[--r.heap_max]=y,o[p*2]=o[m*2]+o[y*2],r.depth[p]=Math.max(r.depth[m],r.depth[y])+1,o[m*2+1]=o[y*2+1]=p,r.heap[1]=p++,r.pqdownheap(o,1);while(r.heap_len>=2);r.heap[--r.heap_max]=r.heap[1],i(r),s(o,u.max_code,r.bl_count)}}$t._length_code=[0,1,2,3,4,5,6,7].concat(...Zc([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));$t.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];$t.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];$t.d_code=function(u){return u<256?j1[u]:j1[256+(u>>>7)]};$t.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];$t.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];$t.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];$t.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Me(u,i,f,s,r){const o=this;o.static_tree=u,o.extra_bits=i,o.extra_base=f,o.elems=s,o.max_length=r}const xv=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],wv=Zc([[144,8],[112,9],[24,7],[8,8]]);Me.static_ltree=Xc(xv.map((u,i)=>[u,wv[i]]));const Ov=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],Rv=Zc([[30,5]]);Me.static_dtree=Xc(Ov.map((u,i)=>[u,Rv[i]]));Me.static_l_desc=new Me(Me.static_ltree,$t.extra_lbits,Cc+1,Ir,Pi);Me.static_d_desc=new Me(Me.static_dtree,$t.extra_dbits,0,Mr,Pi);Me.static_bl_desc=new Me(null,$t.extra_blbits,0,Ur,bv);const Dv=9,zv=8;function Nn(u,i,f,s,r){const o=this;o.good_length=u,o.max_lazy=i,o.nice_length=f,o.max_chain=s,o.func=r}const Ah=0,Oc=1,$a=2,Tn=[new Nn(0,0,0,0,Ah),new Nn(4,4,8,4,Oc),new Nn(4,5,16,8,Oc),new Nn(4,6,32,32,Oc),new Nn(4,4,16,16,$a),new Nn(8,16,32,32,$a),new Nn(8,16,128,128,$a),new Nn(8,32,128,256,$a),new Nn(32,128,258,1024,$a),new Nn(32,258,258,4096,$a)],Sc=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],gn=0,Ec=1,Qi=2,Tc=3,Nv=32,_r=42,Ac=113,Fi=666,pr=8,Mv=0,br=1,Uv=2,ee=3,Rc=258,an=Rc+ee+1;function B1(u,i,f,s){const r=u[i*2],o=u[f*2];return r=3&&V[$t.bl_order[Y]*2+1]===0;Y--);return u.opt_len+=3*(Y+1)+5+5+4,Y}function ae(Y){u.pending_buf[u.pending++]=Y}function oe(Y){ae(Y&255),ae(Y>>>8&255)}function Jt(Y){ae(Y>>8&255),ae(Y&255&255)}function Gt(Y,tt){let F;const nt=tt;L>vr-nt?(F=Y,U|=F<>>vr-L,L+=nt-vr):(U|=Y<=8&&(ae(U&255),U>>>=8,L-=8)}function Ce(){Gt(br<<1,3),kt(Vi,Me.static_ltree),qe(),1+w+10-L<9&&(Gt(br<<1,3),kt(Vi,Me.static_ltree),qe()),w=7}function Ae(Y,tt){let F,nt,ct;if(u.dist_buf[R]=Y,u.lc_buf[R]=tt&255,R++,Y===0?ot[tt*2]++:(k++,Y--,ot[($t._length_code[tt]+Cc+1)*2]++,N[$t.d_code(Y)*2]++),(R&8191)===0&&at>2){for(F=R*8,nt=B-J,ct=0;ct>>=3,k8?oe(U):L>0&&ae(U&255),U=0,L=0}function xe(Y,tt,F){nl(),w=8,oe(tt),oe(~tt),u.pending_buf.set(m.subarray(Y,Y+tt),u.pending),u.pending+=tt}function al(Y,tt,F){Gt((Mv<<1)+(F?1:0),3),xe(Y,tt)}function ll(Y,tt,F){let nt,ct,St=0;at>0?(lt.build_tree(u),rt.build_tree(u),St=Ft(),nt=u.opt_len+3+7>>>3,ct=u.static_len+3+7>>>3,ct<=nt&&(nt=ct)):nt=ct=tt+5,tt+4<=nt&&Y!=-1?al(Y,tt,F):ct==nt?(Gt((br<<1)+(F?1:0),3),wn(Me.static_ltree,Me.static_dtree)):(Gt((Uv<<1)+(F?1:0),3),Be(lt.max_code+1,rt.max_code+1,St+1),wn(ot,N)),H(),F&&nl()}function _e(Y){ll(J>=0?J:-1,B-J,Y),J=B,i.flush_pending()}function ea(){let Y,tt,F,nt;do{if(nt=y-X-B,nt===0&&B===0&&X===0)nt=o;else if(nt==-1)nt--;else if(B>=o+o-an){m.set(m.subarray(o,o+o),0),it-=o,B-=o,J-=o,Y=T,F=Y;do tt=p[--F]&65535,p[F]=tt>=o?tt-o:0;while(--Y!==0);Y=o,F=Y;do tt=_[--F]&65535,_[F]=tt>=o?tt-o:0;while(--Y!==0);nt+=o}if(i.avail_in===0)return;Y=i.read_buf(m,B+X,nt),X+=Y,X>=ee&&(b=m[B]&255,b=(b<s-5&&(tt=s-5);;){if(X<=1){if(ea(),X===0&&Y==Ql)return gn;if(X===0)break}if(B+=X,X=0,F=J+tt,(B===0||B>=F)&&(X=B-F,B=F,_e(!1),i.avail_out===0)||B-J>=o-an&&(_e(!1),i.avail_out===0))return gn}return _e(Y==ke),i.avail_out===0?Y==ke?Qi:gn:Y==ke?Tc:Ec}function Wl(Y){let tt=ut,F=B,nt,ct,St=et;const wt=B>o-an?B-(o-an):0;let de=yt;const Le=v,pn=B+Rc;let Ca=m[F+St-1],na=m[F+St];et>=pt&&(tt>>=2),de>X&&(de=X);do if(nt=Y,!(m[nt+St]!=na||m[nt+St-1]!=Ca||m[nt]!=m[F]||m[++nt]!=m[F+1])){F+=2,nt++;do;while(m[++F]==m[++nt]&&m[++F]==m[++nt]&&m[++F]==m[++nt]&&m[++F]==m[++nt]&&m[++F]==m[++nt]&&m[++F]==m[++nt]&&m[++F]==m[++nt]&&m[++F]==m[++nt]&&FSt){if(it=Y,St=ct,ct>=de)break;Ca=m[F+St-1],na=m[F+St]}}while((Y=_[Y&Le]&65535)>wt&&--tt!==0);return St<=X?St:X}function kc(Y){let tt=0,F;for(;;){if(X=ee&&(b=(b<=ee)if(F=Ae(B-it,Z-ee),X-=Z,Z<=st&&X>=ee){Z--;do B++,b=(b<=ee&&(b=(b<4096)&&(Z=ee-1)),et>=ee&&Z<=et){nt=B+X-ee,F=Ae(B-1-$,et-ee),X-=et-1,et-=2;do++B<=nt&&(b=(b<Dv||nt!=pr||F<9||F>15||tt<0||tt>9||St<0||St>pc?xn:(Y.dstate=u,h=F,o=1<9||F<0||F>pc?xn:(Tn[at].func!=Tn[tt].func&&Y.total_in!==0&&(nt=Y.deflate(H1)),at!=tt&&(at=tt,st=Tn[at].max_lazy,pt=Tn[at].good_length,yt=Tn[at].nice_length,ut=Tn[at].max_chain),_t=F,nt)},u.deflateSetDictionary=function(Y,tt,F){let nt=F,ct,St=0;if(!tt||f!=_r)return xn;if(nto-an&&(nt=o-an,St=F-nt),m.set(tt.subarray(St,St+nt),0),B=nt,J=nt,b=m[0]&255,b=(b<ke||tt<0)return xn;if(!Y.next_out||!Y.next_in&&Y.avail_in!==0||f==Fi&&tt!=ke)return Y.msg=Sc[bc-xn],xn;if(Y.avail_out===0)return Y.msg=Sc[bc-Xl],Xl;if(i=Y,St=r,r=tt,f==_r&&(nt=pr+(h-8<<4)<<8,ct=(at-1&255)>>1,ct>3&&(ct=3),nt|=ct<<6,B!==0&&(nt|=Nv),nt+=31-nt%31,f=Ac,Jt(nt)),u.pending!==0){if(i.flush_pending(),i.avail_out===0)return r=-1,An}else if(i.avail_in===0&&tt<=St&&tt!=ke)return i.msg=Sc[bc-Xl],Xl;if(f==Fi&&i.avail_in!==0)return Y.msg=Sc[bc-Xl],Xl;if(i.avail_in!==0||X!==0||tt!=Ql&&f!=Fi){switch(wt=-1,Tn[at].func){case Ah:wt=Jc(tt);break;case Oc:wt=kc(tt);break;case $a:wt=Ic(tt);break}if((wt==Qi||wt==Tc)&&(f=Fi),wt==gn||wt==Qi)return i.avail_out===0&&(r=-1),An;if(wt==Ec){if(tt==H1)Ce();else if(al(0,0,!1),tt==Tv)for(F=0;Ff&&(r=f),r===0?0:(s.avail_in-=r,u.set(s.next_in.subarray(s.next_in_index,s.next_in_index+r),i),s.next_in_index+=r,s.total_in+=r,r)},flush_pending(){const u=this;let i=u.dstate.pending;i>u.avail_out&&(i=u.avail_out),i!==0&&(u.next_out.set(u.dstate.pending_buf.subarray(u.dstate.pending_out,u.dstate.pending_out+i),u.next_out_index),u.next_out_index+=i,u.dstate.pending_out+=i,u.total_out+=i,u.avail_out-=i,u.dstate.pending-=i,u.dstate.pending===0&&(u.dstate.pending_out=0))}};function Lv(u){const i=this,f=new xh,s=Hv(u&&u.chunkSize?u.chunkSize:64*1024),r=Ql,o=new Uint8Array(s);let h=u?u.level:Lc;typeof h>"u"&&(h=Lc),f.deflateInit(h),f.next_out=o,i.append=function(v,m){let y,_,p=0,b=0,T=0;const D=[];if(v.length){f.next_in_index=0,f.next_in=v,f.avail_in=v.length;do{if(f.next_out_index=0,f.avail_out=s,y=f.deflate(r),y!=An)throw new Error("deflating: "+f.msg);f.next_out_index&&(f.next_out_index==s?D.push(new Uint8Array(o)):D.push(o.subarray(0,f.next_out_index))),T+=f.next_out_index,m&&f.next_in_index>0&&f.next_in_index!=p&&(m(f.next_in_index),p=f.next_in_index)}while(f.avail_in>0||f.avail_out===0);return D.length>1?(_=new Uint8Array(T),D.forEach(function(G){_.set(G,b),b+=G.length})):_=D[0]?new Uint8Array(D[0]):new Uint8Array,_}},i.flush=function(){let v,m,y=0,_=0;const p=[];do{if(f.next_out_index=0,f.avail_out=s,v=f.deflate(ke),v!=Th&&v!=An)throw new Error("deflating: "+f.msg);s-f.avail_out>0&&p.push(o.slice(0,f.next_out_index)),_+=f.next_out_index}while(f.avail_in>0||f.avail_out===0);return f.deflateEnd(),m=new Uint8Array(_),p.forEach(function(b){m.set(b,y),y+=b.length}),m}}function Hv(u){return u+5*(Math.floor(u/16383)+1)}const ce=4294967295,le=65535,Wr=8,jv=9,wh=0,Oh=99,Rh=67324752,$r=134695760,Dh=$r,Cr=33639248,zh=101010256,Lr=101075792,Nh=117853008,vn=22,ki=20,Ii=56,Bv=vn+ki+Ii,Mh=12,Uh=20,Hc=4,Ch=1,Lh=39169,Hh=10,jh=1,Pr=21589,Yv=28789,Gv=25461,Bh=6534,Hr=1,qv=6,Zv=2,Xv=4,Vv=6,jr=8,Br=2048,Yr=16,Qv=61440,Yh=16384,Gr=73,Sr=420,Fv=20,Y1=45,G1=51,Wi="/",tl=30,to=10,kl=14,Il=18,q1=new Date(2107,11,31),Z1=new Date(1980,0,1),At=void 0,Na="undefined",au="function";class X1{constructor(i){return class extends TransformStream{constructor(f,s){const r=new i(s);super({transform(o,h){h.enqueue(r.append(o))},flush(o){const h=r.flush();h&&o.enqueue(h)}})}}}}const Kv=64;let Gh=2;try{typeof navigator!=Na&&navigator.hardwareConcurrency&&(Gh=navigator.hardwareConcurrency)}catch{}const Jv={chunkSize:512*1024,maxWorkers:Gh,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:At,CompressionStreamNative:typeof CompressionStream!=Na&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=Na&&DecompressionStream},Da=Object.assign({},Jv);function eo(){return Da}function qh(u){return Math.max(u.chunkSize,Kv)}function Zh(u){const{baseURL:i,chunkSize:f,maxWorkers:s,terminateWorkerTimeout:r,useCompressionStream:o,useWebWorkers:h,Deflate:v,Inflate:m,CompressionStream:y,DecompressionStream:_,workerScripts:p}=u;if(Oa("baseURL",i),Oa("chunkSize",f),Oa("maxWorkers",s),Oa("terminateWorkerTimeout",r),Oa("useCompressionStream",o),Oa("useWebWorkers",h),v&&(Da.CompressionStream=new X1(v)),m&&(Da.DecompressionStream=new X1(m)),Oa("CompressionStream",y),Oa("DecompressionStream",_),p!==At){const{deflate:b,inflate:T}=p;if((b||T)&&(Da.workerScripts||(Da.workerScripts={})),b){if(!Array.isArray(b))throw new Error("workerScripts.deflate must be an array");Da.workerScripts.deflate=b}if(T){if(!Array.isArray(T))throw new Error("workerScripts.inflate must be an array");Da.workerScripts.inflate=T}}}function Oa(u,i){i!==At&&(Da[u]=i)}function kv(){return"application/octet-stream"}const Xh=[];for(let u=0;u<256;u++){let i=u;for(let f=0;f<8;f++)i&1?i=i>>>1^3988292384:i=i>>>1;Xh[u]=i}class jc{constructor(i){this.crc=i||-1}append(i){let f=this.crc|0;for(let s=0,r=i.length|0;s>>8^Xh[(f^i[s])&255];this.crc=f}get(){return~this.crc}}class Vh extends TransformStream{constructor(){let i;const f=new jc;super({transform(s,r){f.append(s),r.enqueue(s)},flush(){const s=new Uint8Array(4);new DataView(s.buffer).setUint32(0,f.get()),i.value=s}}),i=this}}function Dc(u){if(typeof TextEncoder==Na){u=unescape(encodeURIComponent(u));const i=new Uint8Array(u.length);for(let f=0;f0&&i&&(u[f-1]=Ge.partial(i,u[f-1]&2147483648>>i-1,1)),u},partial(u,i,f){return u===32?i:(f?i|0:i<<32-u)+u*1099511627776},getPartial(u){return Math.round(u/1099511627776)||32},_shiftRight(u,i,f,s){for(s===void 0&&(s=[]);i>=32;i-=32)s.push(f),f=0;if(i===0)return s.concat(u);for(let h=0;h>>i),f=u[h]<<32-i;const r=u.length?u[u.length-1]:0,o=Ge.getPartial(r);return s.push(Ge.partial(i+o&31,i+o>32?f:s.pop(),1)),s}},Bc={bytes:{fromBits(u){const f=Ge.bitLength(u)/8,s=new Uint8Array(f);let r;for(let o=0;o>>24,r<<=8;return s},toBits(u){const i=[];let f,s=0;for(f=0;f9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const o=new Uint32Array(f);let h=0;for(let v=i.blockSize+s-(i.blockSize+s&i.blockSize-1);v<=r;v+=i.blockSize)i._block(o.subarray(16*h,16*(h+1))),h+=1;return f.splice(0,16*h),i}finalize(){const u=this;let i=u._buffer;const f=u._h;i=Ge.concat(i,[Ge.partial(1,1)]);for(let s=i.length+2;s&15;s++)i.push(0);for(i.push(Math.floor(u._length/4294967296)),i.push(u._length|0);i.length;)u._block(i.splice(0,16));return u.reset(),f}_f(u,i,f,s){if(u<=19)return i&f|~i&s;if(u<=39)return i^f^s;if(u<=59)return i&f|i&s|f&s;if(u<=79)return i^f^s}_S(u,i){return i<>>32-u}_block(u){const i=this,f=i._h,s=Array(80);for(let y=0;y<16;y++)s[y]=u[y];let r=f[0],o=f[1],h=f[2],v=f[3],m=f[4];for(let y=0;y<=79;y++){y>=16&&(s[y]=i._S(1,s[y-3]^s[y-8]^s[y-14]^s[y-16]));const _=i._S(5,r)+i._f(y,o,h,v)+m+s[y]+i._key[Math.floor(y/20)]|0;m=v,v=h,h=i._S(30,o),o=r,r=_}f[0]=f[0]+r|0,f[1]=f[1]+o|0,f[2]=f[2]+h|0,f[3]=f[3]+v|0,f[4]=f[4]+m|0}};const Fh={};Fh.aes=class{constructor(u){const i=this;i._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],i._tables[0][0][0]||i._precompute();const f=i._tables[0][4],s=i._tables[1],r=u.length;let o,h,v,m=1;if(r!==4&&r!==6&&r!==8)throw new Error("invalid aes key size");for(i._key=[h=u.slice(0),v=[]],o=r;o<4*r+28;o++){let y=h[o-1];(o%r===0||r===8&&o%r===4)&&(y=f[y>>>24]<<24^f[y>>16&255]<<16^f[y>>8&255]<<8^f[y&255],o%r===0&&(y=y<<8^y>>>24^m<<24,m=m<<1^(m>>7)*283)),h[o]=h[o-r]^y}for(let y=0;o;y++,o--){const _=h[y&3?o:o-4];o<=4||y<4?v[y]=_:v[y]=s[0][f[_>>>24]]^s[1][f[_>>16&255]]^s[2][f[_>>8&255]]^s[3][f[_&255]]}}encrypt(u){return this._crypt(u,0)}decrypt(u){return this._crypt(u,1)}_precompute(){const u=this._tables[0],i=this._tables[1],f=u[4],s=i[4],r=[],o=[];let h,v,m,y;for(let _=0;_<256;_++)o[(r[_]=_<<1^(_>>7)*283)^_]=_;for(let _=h=0;!f[_];_^=v||1,h=o[h]||1){let p=h^h<<1^h<<2^h<<3^h<<4;p=p>>8^p&255^99,f[_]=p,s[p]=_,y=r[m=r[v=r[_]]];let b=y*16843009^m*65537^v*257^_*16843008,T=r[p]*257^p*16843008;for(let D=0;D<4;D++)u[D][_]=T=T<<24^T>>>8,i[D][p]=b=b<<24^b>>>8}for(let _=0;_<5;_++)u[_]=u[_].slice(0),i[_]=i[_].slice(0)}_crypt(u,i){if(u.length!==4)throw new Error("invalid aes block size");const f=this._key[i],s=f.length/4-2,r=[0,0,0,0],o=this._tables[i],h=o[0],v=o[1],m=o[2],y=o[3],_=o[4];let p=u[0]^f[0],b=u[i?3:1]^f[1],T=u[2]^f[2],D=u[i?1:3]^f[3],G=4,W,J,Z;for(let $=0;$>>24]^v[b>>16&255]^m[T>>8&255]^y[D&255]^f[G],J=h[b>>>24]^v[T>>16&255]^m[D>>8&255]^y[p&255]^f[G+1],Z=h[T>>>24]^v[D>>16&255]^m[p>>8&255]^y[b&255]^f[G+2],D=h[D>>>24]^v[p>>16&255]^m[b>>8&255]^y[T&255]^f[G+3],G+=4,p=W,b=J,T=Z;for(let $=0;$<4;$++)r[i?3&-$:$]=_[p>>>24]<<24^_[b>>16&255]<<16^_[T>>8&255]<<8^_[D&255]^f[G++],W=p,p=b,b=T,T=D,D=W;return r}};const Iv={getRandomValues(u){const i=new Uint32Array(u.buffer),f=s=>{let r=987654321;const o=4294967295;return function(){return r=36969*(r&65535)+(r>>16)&o,s=18e3*(s&65535)+(s>>16)&o,(((r<<16)+s&o)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let s=0,r;s>24&255)===255){let i=u>>16&255,f=u>>8&255,s=u&255;i===255?(i=0,f===255?(f=0,s===255?s=0:++s):++f):++i,u=0,u+=i<<16,u+=f<<8,u+=s}else u+=1<<24;return u}incCounter(u){(u[0]=this.incWord(u[0]))===0&&(u[1]=this.incWord(u[1]))}calculate(u,i,f){let s;if(!(s=i.length))return[];const r=Ge.bitLength(i);for(let o=0;o>5)+1<<2;let o,h,v,m,y;const _=new ArrayBuffer(r),p=new DataView(_);let b=0;const T=Ge;for(i=Bc.bytes.toBits(i),y=1;b<(r||1);y++){for(o=h=u.encrypt(T.concat(i,[y])),v=1;vr&&(u=new f().update(u).finalize());for(let o=0;othis.resolveReady=h),password:em(i,f),signed:s,strength:r-1,pending:new Uint8Array})},async transform(h,v){const m=this,{password:y,strength:_,resolveReady:p,ready:b}=m;y?(await f4(m,_,y,_n(h,0,tu[_]+2)),h=_n(h,tu[_]+2),o?v.error(new Error(no)):p()):await b;const T=new Uint8Array(h.length-Ra-(h.length-Ra)%Fl);v.enqueue(Ph(m,h,T,0,Ra,!0))},async flush(h){const{signed:v,ctr:m,hmac:y,pending:_,ready:p}=this;if(y&&m){await p;const b=_n(_,0,_.length-Ra),T=_n(_,_.length-Ra);let D=new Uint8Array;if(b.length){const G=nu(Mn,b);y.update(G);const W=m.update(G);D=eu(Mn,W)}if(v){const G=_n(eu(Mn,y.digest()),0,Ra);for(let W=0;Wthis.resolveReady=o),password:em(i,f),strength:s-1,pending:new Uint8Array})},async transform(o,h){const v=this,{password:m,strength:y,resolveReady:_,ready:p}=v;let b=new Uint8Array;m?(b=await r4(v,y,m),_()):await p;const T=new Uint8Array(b.length+o.length-o.length%Fl);T.set(b,0),h.enqueue(Ph(v,o,T,b.length,0))},async flush(o){const{ctr:h,hmac:v,pending:m,ready:y}=this;if(v&&h){await y;let _=new Uint8Array;if(m.length){const p=h.update(nu(Mn,m));v.update(p),_=eu(Mn,p)}r.signature=eu(Mn,v.digest()).slice(0,Ra),o.enqueue(ao(_,r.signature))}}}),r=this}}function Ph(u,i,f,s,r,o){const{ctr:h,hmac:v,pending:m}=u,y=i.length-r;m.length&&(i=ao(m,i),f=h4(f,y-y%Fl));let _;for(_=0;_<=y-Fl;_+=Fl){const p=nu(Mn,_n(i,_,_+Fl));o&&v.update(p);const b=h.update(p);o||v.update(b),f.set(eu(Mn,b),_+s)}return u.pending=_n(i,_),f}async function f4(u,i,f,s){const r=await tm(u,i,f,_n(s,0,tu[i])),o=_n(s,tu[i]);if(r[0]!=o[0]||r[1]!=o[1])throw new Error(Jh)}async function r4(u,i,f){const s=Ih(new Uint8Array(tu[i])),r=await tm(u,i,f,s);return ao(s,r)}async function tm(u,i,f,s){u.password=null;const r=await o4($v,f,e4,!1,n4),o=await d4(Object.assign({salt:s},qr),r,8*(Ki[i]*2+2)),h=new Uint8Array(o),v=nu(Mn,_n(h,0,Ki[i])),m=nu(Mn,_n(h,Ki[i],Ki[i]*2)),y=_n(h,Ki[i]*2);return Object.assign(u,{keys:{key:v,authentication:m,passwordVerification:y},ctr:new i4(new l4(v),Array.from(a4)),hmac:new u4(m)}),y}async function o4(u,i,f,s,r){if(V1)try{return await lu.importKey(u,i,f,s,r)}catch{return V1=!1,el.importKey(i)}else return el.importKey(i)}async function d4(u,i,f){if(Q1)try{return await lu.deriveBits(u,i,f)}catch{return Q1=!1,el.pbkdf2(i,u.salt,qr.iterations,f)}else return el.pbkdf2(i,u.salt,qr.iterations,f)}function em(u,i){return i===At?Dc(u):i}function ao(u,i){let f=u;return u.length+i.length&&(f=new Uint8Array(u.length+i.length),f.set(u,0),f.set(i,u.length)),f}function h4(u,i){if(i&&i>u.length){const f=u;u=new Uint8Array(i),u.set(f,0)}return u}function _n(u,i,f){return u.subarray(i,f)}function eu(u,i){return u.fromBits(i)}function nu(u,i){return u.toBits(i)}const $i=12;class m4 extends TransformStream{constructor({password:i,passwordVerification:f,checkPasswordOnly:s}){super({start(){Object.assign(this,{password:i,passwordVerification:f}),nm(this,i)},transform(r,o){const h=this;if(h.password){const v=F1(h,r.subarray(0,$i));if(h.password=null,v.at(-1)!=h.passwordVerification)throw new Error(Jh);r=r.subarray($i)}s?o.error(new Error(no)):o.enqueue(F1(h,r))}})}}class y4 extends TransformStream{constructor({password:i,passwordVerification:f}){super({start(){Object.assign(this,{password:i,passwordVerification:f}),nm(this,i)},transform(s,r){const o=this;let h,v;if(o.password){o.password=null;const m=Ih(new Uint8Array($i));m[$i-1]=o.passwordVerification,h=new Uint8Array(s.length+m.length),h.set(K1(o,m),0),v=$i}else h=new Uint8Array(s.length),v=0;h.set(K1(o,s),v),r.enqueue(h)}})}}function F1(u,i){const f=new Uint8Array(i.length);for(let s=0;s>>24]),r=~u.crcKey2.get(),u.keys=[f,s,r]}function am(u){const i=u.keys[2]|2;return lm(Math.imul(i,i^1)>>>8)}function lm(u){return u&255}function J1(u){return u&4294967295}const im="Invalid uncompressed size",k1="deflate-raw";class g4 extends TransformStream{constructor(i,{chunkSize:f,CompressionStream:s,CompressionStreamNative:r}){super({});const{compressed:o,encrypted:h,useCompressionStream:v,zipCrypto:m,signed:y,level:_}=i,p=this;let b,T,D=super.readable;(!h||m)&&y&&(b=new Vh,D=Pn(D,b)),o&&(D=cm(D,v,{level:_,chunkSize:f},r,s)),h&&(m?D=Pn(D,new y4(i)):(T=new s4(i),D=Pn(D,T))),um(p,D,()=>{let G;h&&!m&&(G=T.signature),(!h||m)&&y&&(G=new DataView(b.value.buffer).getUint32(0)),p.signature=G})}}class v4 extends TransformStream{constructor(i,{chunkSize:f,DecompressionStream:s,DecompressionStreamNative:r}){super({});const{zipCrypto:o,encrypted:h,signed:v,signature:m,compressed:y,useCompressionStream:_}=i;let p,b,T=super.readable;h&&(o?T=Pn(T,new m4(i)):(b=new c4(i),T=Pn(T,b))),y&&(T=cm(T,_,{chunkSize:f},r,s)),(!h||o)&&v&&(p=new Vh,T=Pn(T,p)),um(this,T,()=>{if((!h||o)&&v){const D=new DataView(p.value.buffer);if(m!=D.getUint32(0,!1))throw new Error(kh)}})}}function um(u,i,f){i=Pn(i,new TransformStream({flush:f})),Object.defineProperty(u,"readable",{get(){return i}})}function cm(u,i,f,s,r){try{const o=i&&s?s:r;u=Pn(u,new o(k1,f))}catch(o){if(i)u=Pn(u,new r(k1,f));else throw o}return u}function Pn(u,i){return u.pipeThrough(i)}const _4="message",p4="start",b4="pull",I1="data",S4="ack",W1="close",sm="deflate",fm="inflate";class E4 extends TransformStream{constructor(i,f){super({});const s=this,{codecType:r}=i;let o;r.startsWith(sm)?o=g4:r.startsWith(fm)&&(o=v4),s.outputSize=0;let h=0;const v=new o(i,f),m=super.readable,y=new TransformStream({transform(p,b){p&&p.length&&(h+=p.length,b.enqueue(p))},flush(){Object.assign(s,{inputSize:h})}}),_=new TransformStream({transform(p,b){if(p&&p.length&&(b.enqueue(p),s.outputSize+=p.length,i.outputSize&&s.outputSize>i.outputSize))throw new Error(im)},flush(){const{signature:p}=v;Object.assign(s,{signature:p,inputSize:h})}});Object.defineProperty(s,"readable",{get(){return m.pipeThrough(y).pipeThrough(v).pipeThrough(_)}})}}class T4 extends TransformStream{constructor(i){let f;super({transform:s,flush(r){f&&f.length&&r.enqueue(f)}});function s(r,o){if(f){const h=new Uint8Array(f.length+r.length);h.set(f),h.set(r,f.length),r=h,f=null}r.length>i?(o.enqueue(r.slice(0,i)),s(r.slice(i),o)):f=r}}}let rm=typeof Worker!=Na;class Er{constructor(i,{readable:f,writable:s},{options:r,config:o,streamOptions:h,useWebWorkers:v,transferStreams:m,scripts:y},_){const{signal:p}=h;return Object.assign(i,{busy:!0,readable:f.pipeThrough(new T4(o.chunkSize)).pipeThrough(new A4(h),{signal:p}),writable:s,options:Object.assign({},r),scripts:y,transferStreams:m,terminate(){return new Promise(b=>{const{worker:T,busy:D}=i;T?(D?i.resolveTerminated=b:(T.terminate(),b()),i.interface=null):b()})},onTaskFinished(){const{resolveTerminated:b}=i;b&&(i.resolveTerminated=null,i.terminated=!0,i.worker.terminate(),b()),i.busy=!1,_(i)}}),(v&&rm?x4:om)(i,o)}}class A4 extends TransformStream{constructor({onstart:i,onprogress:f,size:s,onend:r}){let o=0;super({async start(){i&&await Tr(i,s)},async transform(h,v){o+=h.length,f&&await Tr(f,o,s),v.enqueue(h)},async flush(){r&&await Tr(r,o)}})}}async function Tr(u,...i){try{await u(...i)}catch{}}function om(u,i){return{run:()=>w4(u,i)}}function x4(u,i){const{baseURL:f,chunkSize:s}=i;if(!u.interface){let r;try{r=D4(u.scripts[0],f,u)}catch{return rm=!1,om(u,i)}Object.assign(u,{worker:r,interface:{run:()=>O4(u,{chunkSize:s})}})}return u.interface}async function w4({options:u,readable:i,writable:f,onTaskFinished:s},r){let o;try{o=new E4(u,r),await i.pipeThrough(o).pipeTo(f,{preventClose:!0,preventAbort:!0});const{signature:h,inputSize:v,outputSize:m}=o;return{signature:h,inputSize:v,outputSize:m}}catch(h){throw o&&(h.outputSize=o.outputSize),h}finally{s()}}async function O4(u,i){let f,s;const r=new Promise((b,T)=>{f=b,s=T});Object.assign(u,{reader:null,writer:null,resolveResult:f,rejectResult:s,result:r});const{readable:o,options:h,scripts:v}=u,{writable:m,closed:y}=R4(u.writable),_=zc({type:p4,scripts:v.slice(1),options:h,config:i,readable:o,writable:m},u);_||Object.assign(u,{reader:o.getReader(),writer:m.getWriter()});const p=await r;return _||await m.getWriter().close(),await y,p}function R4(u){let i;const f=new Promise(r=>i=r);return{writable:new WritableStream({async write(r){const o=u.getWriter();await o.ready,await o.write(r),o.releaseLock()},close(){i()},abort(r){return u.getWriter().abort(r)}}),closed:f}}let $1=!0,P1=!0;function D4(u,i,f){const s={type:"module"};let r,o;typeof u==au&&(u=u());try{r=new URL(u,i)}catch{r=u}if($1)try{o=new Worker(r)}catch{$1=!1,o=new Worker(r,s)}else o=new Worker(r,s);return o.addEventListener(_4,h=>z4(h,f)),o}function zc(u,{worker:i,writer:f,onTaskFinished:s,transferStreams:r}){try{const{value:o,readable:h,writable:v}=u,m=[];if(o&&(o.byteLength!J.busy);if(W)return Zr(W),new Er(W,u,i,G);if(za.lengthAr.push({resolve:J,stream:u,workerOptions:i}))}function G(W){if(Ar.length){const[{resolve:J,stream:Z,workerOptions:$}]=Ar.splice(0,1);J(new Er(W,Z,$,G))}else W.worker?(Zr(W),N4(W,i)):za=za.filter(J=>J!=W)}}function N4(u,i){const{config:f}=i,{terminateWorkerTimeout:s}=f;Number.isFinite(s)&&s>=0&&(u.terminated?u.terminated=!1:u.terminateTimeout=setTimeout(async()=>{za=za.filter(r=>r!=u);try{await u.terminate()}catch{}},s))}function Zr(u){const{terminateTimeout:i}=u;i&&(clearTimeout(i),u.terminateTimeout=null)}async function M4(){await Promise.allSettled(za.map(u=>(Zr(u),u.terminate())))}const hm="HTTP error ",iu="HTTP Range not supported",mm="Writer iterator completed too soon",ym="Writer not initialized",U4="text/plain",C4="Content-Length",L4="Content-Range",H4="Accept-Ranges",j4="Range",B4="Content-Type",Y4="HEAD",io="GET",gm="bytes",G4=64*1024,uo="writable";class Qc{constructor(){this.size=0}init(){this.initialized=!0}}class Ma extends Qc{get readable(){const i=this,{chunkSize:f=G4}=i,s=new ReadableStream({start(){this.chunkOffset=0},async pull(r){const{offset:o=0,size:h,diskNumberStart:v}=s,{chunkOffset:m}=this,y=h===At?f:Math.min(f,h-m),_=await Ee(i,o+m,y,v);r.enqueue(_),m+f>h||h===At&&!_.length&&y?r.close():this.chunkOffset+=f}});return s}}class co extends Qc{constructor(){super();const i=this,f=new WritableStream({write(s){if(!i.initialized)throw new Error(ym);return i.writeUint8Array(s)}});Object.defineProperty(i,uo,{get(){return f}})}writeUint8Array(){}}class q4 extends Ma{constructor(i){super();let f=i.length;for(;i.charAt(f-1)=="=";)f--;const s=i.indexOf(",")+1;Object.assign(this,{dataURI:i,dataStart:s,size:Math.floor((f-s)*.75)})}readUint8Array(i,f){const{dataStart:s,dataURI:r}=this,o=new Uint8Array(f),h=Math.floor(i/3)*4,v=atob(r.substring(h+s,Math.ceil((i+f)/3)*4+s)),m=i-Math.floor(h/4)*3;let y=0;for(let _=m;_2?f.data+=btoa(r):f.pending+=r)}getData(){return this.data+btoa(this.pending)}}class so extends Ma{constructor(i){super(),Object.assign(this,{blob:i,size:i.size})}async readUint8Array(i,f){const s=this,r=i+f;let h=await(i||rf&&(h=h.slice(i,r)),new Uint8Array(h)}}class vm extends Qc{constructor(i){super();const f=this,s=new TransformStream,r=[];i&&r.push([B4,i]),Object.defineProperty(f,uo,{get(){return s.writable}}),f.blob=new Response(s.readable,{headers:r}).blob()}getData(){return this.blob}}class X4 extends so{constructor(i){super(new Blob([i],{type:U4}))}}class V4 extends vm{constructor(i){super(i),Object.assign(this,{encoding:i,utf8:!i||i.toLowerCase()=="utf-8"})}async getData(){const{encoding:i,utf8:f}=this,s=await super.getData();if(s.text&&f)return s.text();{const r=new FileReader;return new Promise((o,h)=>{Object.assign(r,{onload:({target:v})=>o(v.result),onerror:()=>h(r.error)}),r.readAsText(s,i)})}}}class Q4 extends Ma{constructor(i,f){super(),_m(this,i,f)}async init(){await pm(this,Xr,eh),super.init()}readUint8Array(i,f){return bm(this,i,f,Xr,eh)}}class F4 extends Ma{constructor(i,f){super(),_m(this,i,f)}async init(){await pm(this,Vr,nh),super.init()}readUint8Array(i,f){return bm(this,i,f,Vr,nh)}}function _m(u,i,f){const{preventHeadRequest:s,useRangeHeader:r,forceRangeRequests:o,combineSizeEocd:h}=f;f=Object.assign({},f),delete f.preventHeadRequest,delete f.useRangeHeader,delete f.forceRangeRequests,delete f.combineSizeEocd,delete f.useXHR,Object.assign(u,{url:i,options:f,preventHeadRequest:s,useRangeHeader:r,forceRangeRequests:o,combineSizeEocd:h})}async function pm(u,i,f){const{url:s,preventHeadRequest:r,useRangeHeader:o,forceRangeRequests:h,combineSizeEocd:v}=u;if(I4(s)&&(o||h)&&(typeof r>"u"||r)){const m=await i(io,u,Sm(u,v?-vn:void 0));if(!h&&m.headers.get(H4)!=gm)throw new Error(iu);{v&&(u.eocdCache=new Uint8Array(await m.arrayBuffer()));let y;const _=m.headers.get(L4);if(_){const p=_.trim().split(/\s*\/\s*/);if(p.length){const b=p[1];b&&b!="*"&&(y=Number(b))}}y===At?await ah(u,i,f):u.size=y}}else await ah(u,i,f)}async function bm(u,i,f,s,r){const{useRangeHeader:o,forceRangeRequests:h,eocdCache:v,size:m,options:y}=u;if(o||h){if(v&&i==m-vn&&f==vn)return v;if(i>=m)return new Uint8Array;{i+f>m&&(f=m-i);const _=await s(io,u,Sm(u,i,f));if(_.status!=206)throw new Error(iu);return new Uint8Array(await _.arrayBuffer())}}else{const{data:_}=u;return _||await r(u,y),new Uint8Array(u.data.subarray(i,i+f))}}function Sm(u,i=0,f=1){return Object.assign({},fo(u),{[j4]:gm+"="+(i<0?i:i+"-"+(i+f-1))})}function fo({options:u}){const{headers:i}=u;if(i)return Symbol.iterator in i?Object.fromEntries(i):i}async function eh(u){await Em(u,Xr)}async function nh(u){await Em(u,Vr)}async function Em(u,i){const f=await i(io,u,fo(u));u.data=new Uint8Array(await f.arrayBuffer()),u.size||(u.size=u.data.length)}async function ah(u,i,f){if(u.preventHeadRequest)await f(u,u.options);else{const r=(await i(Y4,u,fo(u))).headers.get(C4);r?u.size=Number(r):await f(u,u.options)}}async function Xr(u,{options:i,url:f},s){const r=await fetch(f,Object.assign({},i,{method:u,headers:s}));if(r.status<400)return r;throw r.status==416?new Error(iu):new Error(hm+(r.statusText||r.status))}function Vr(u,{url:i},f){return new Promise((s,r)=>{const o=new XMLHttpRequest;if(o.addEventListener("load",()=>{if(o.status<400){const h=[];o.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(v=>{const m=v.trim().split(/\s*:\s*/);m[0]=m[0].trim().replace(/^[a-z]|-[a-z]/g,y=>y.toUpperCase()),h.push(m)}),s({status:o.status,arrayBuffer:()=>o.response,headers:new Map(h)})}else r(o.status==416?new Error(iu):new Error(hm+(o.statusText||o.status)))},!1),o.addEventListener("error",h=>r(h.detail?h.detail.error:new Error("Network error")),!1),o.open(u,i),f)for(const h of Object.entries(f))o.setRequestHeader(h[0],h[1]);o.responseType="arraybuffer",o.send()})}class Tm extends Ma{constructor(i,f={}){super(),Object.assign(this,{url:i,reader:f.useXHR?new F4(i,f):new Q4(i,f)})}set size(i){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(i,f){return this.reader.readUint8Array(i,f)}}class K4 extends Tm{constructor(i,f={}){f.useRangeHeader=!0,super(i,f)}}class J4 extends Ma{constructor(i){super(),i=new Uint8Array(i.buffer,i.byteOffset,i.byteLength),Object.assign(this,{array:i,size:i.length})}readUint8Array(i,f){return this.array.slice(i,i+f)}}class k4 extends co{init(i=0){Object.assign(this,{offset:0,array:new Uint8Array(i)}),super.init()}writeUint8Array(i){const f=this;if(f.offset+i.length>f.array.length){const s=f.array;f.array=new Uint8Array(s.length+i.length),f.array.set(s)}f.array.set(i,f.offset),f.offset+=i.length}getData(){return this.array}}class ro extends Ma{constructor(i){super(),this.readers=i}async init(){const i=this,{readers:f}=i;i.lastDiskNumber=0,i.lastDiskOffset=0,await Promise.all(f.map(async(s,r)=>{await s.init(),r!=f.length-1&&(i.lastDiskOffset+=s.size),i.size+=s.size})),super.init()}async readUint8Array(i,f,s=0){const r=this,{readers:o}=this;let h,v=s;v==-1&&(v=o.length-1);let m=i;for(;o[v]&&m>=o[v].size;)m-=o[v].size,v++;const y=o[v];if(y){const _=y.size;if(m+f<=_)h=await Ee(y,m,f);else{const p=_-m;h=new Uint8Array(f);const b=await Ee(y,m,p);h.set(b,0);const T=await r.readUint8Array(i+p,f-p,s);h.set(T,p),b.length+T.length=p?(await m(_.subarray(0,p)),await y(),s.diskOffset+=r.size,s.diskNumber++,h=null,await this.write(_.subarray(p))):await m(_);else{const{value:b,done:T}=await i.next();if(T&&!b)throw new Error(mm);r=b,r.size=0,r.maxSize&&(s.maxSize=r.maxSize),s.availableSize=s.maxSize,await ta(r),o=b.writable,h=o.getWriter(),await this.write(_)}},async close(){await h.ready,await y()}});Object.defineProperty(s,uo,{get(){return v}});async function m(_){const p=_.length;p&&(await h.ready,await h.write(_),r.size+=p,s.size+=p,s.availableSize-=p)}async function y(){await h.close()}}}class Fc{constructor(i){return Array.isArray(i)&&(i=new ro(i)),i instanceof ReadableStream&&(i={readable:i}),i}}class oo{constructor(i){return i.writable===At&&typeof i.next==au&&(i=new Yc(i)),i instanceof WritableStream&&(i={writable:i}),i.size===At&&(i.size=0),i instanceof Yc||Object.assign(i,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),i}}function I4(u){const{baseURL:i}=eo(),{protocol:f}=new URL(u,i);return f=="http:"||f=="https:"}async function ta(u,i){if(u.init&&!u.initialized)await u.init(i);else return Promise.resolve()}function Ee(u,i,f,s){return u.readUint8Array(i,f,s)}const W4=ro,$4=Yc,Am="filename",xm="rawFilename",ho="comment",wm="rawComment",mo="uncompressedSize",Om="compressedSize",Rm="offset",Qr="diskNumberStart",Gc="lastModDate",Fr="rawLastModDate",yo="lastAccessDate",P4="rawLastAccessDate",go="creationDate",t_="rawCreationDate",Dm="internalFileAttribute",zm="internalFileAttributes",Nm="externalFileAttribute",Mm="externalFileAttributes",Um="msDosCompatible",vo="zip64",Cm="encrypted",Lm="version",Hm="versionMadeBy",jm="zipCrypto",Nc="directory",Bm="executable",Ym="compressionMethod",Gm="signature",qm="extraField",e_=[Am,xm,Om,mo,Gc,Fr,ho,wm,yo,go,Rm,Qr,Qr,Dm,zm,Nm,Mm,Um,vo,Cm,Lm,Hm,jm,Nc,Bm,Ym,Gm,qm,"bitFlag","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class qc{constructor(i){e_.forEach(f=>this[f]=i[f])}}const n_="filenameEncoding",a_="commentEncoding",l_="decodeText",i_="extractPrependedData",u_="extractAppendedData",Zm="password",Xm="rawPassword",Vm="passThrough",Qm="signal",c_="checkPasswordOnly",s_="checkOverlappingEntryOnly",f_="checkOverlappingEntry",r_="checkSignature",Fm="useWebWorkers",Km="useCompressionStream",o_="transferStreams",Jm="preventClose",d_="encryptionStrength",h_="extendedTimestamp",m_="keepOrder",y_="level",g_="bufferedWrite",v_="dataDescriptorSignature",__="useUnicodeFileNames",p_="dataDescriptor",km="supportZip64SplitFile",b_="encodeText",lh="offset",Im="usdz",Wm="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),S_=Wm.length==256;function E_(u){if(S_){let i="";for(let f=0;fot&&(W=m-ot),_t=await Ee(s,m,Ii,-1),pt=ne(_t)}if(Pt(pt,0)!=Lr)throw new Error(A_);b==le&&(b=Pt(pt,16)),D==le&&(D=Pt(pt,20)),G==le&&(G=Jl(pt,32)),v==ce&&(v=Jl(pt,40)),m-=v}}if(m>=s.size&&(W=s.size-m-v-vn,m=s.size-v-vn),T!=b)throw new Error(uh);if(m<0)throw new Error(xr);let Z=0,$=await Ee(s,m,v,D),I=ne($);if(v){const st=o.offset-v;if(Pt(I,Z)!=Cr&&m!=st){const at=m;m=st,m>at&&(W+=m-at),$=await Ee(s,m,v,D),I=ne($)}}const B=o.offset-m-(s.lastDiskOffset||0);if(v!=B&&B>=0&&(v=B,$=await Ee(s,m,v,D),I=ne($)),m<0||m>=s.size)throw new Error(xr);const it=Ne(f,i,n_),X=Ne(f,i,a_);for(let st=0;st>8==0,lt=N>>8==3,rt=$.subarray(pt,yt),gt=Te(I,Z+32),E=ot+gt,R=$.subarray(ot,E),k=_t,w=_t,U=Pt(I,Z+38),L=V&&(Kl(I,Z+38)&Yr)==Yr||lt&&(U>>16&Qv)==Yh||rt.length&&rt.at(-1)==Wi.charCodeAt(0),P=lt&&(U>>16&Gr)!=0,H=Pt(I,Z+42)+W;Object.assign(at,{versionMadeBy:N,msDosCompatible:V,compressedSize:0,uncompressedSize:0,commentLength:gt,directory:L,offset:H,diskNumberStart:Te(I,Z+34),internalFileAttributes:Te(I,Z+36),externalFileAttributes:U,rawFilename:rt,filenameUTF8:k,commentUTF8:w,rawExtraField:$.subarray(yt,ot),executable:P}),at.internalFileAttribute=at.internalFileAttributes,at.externalFileAttribute=at.externalFileAttributes;const ht=Ne(f,i,l_)||Mc,Yt=k?ch:it||sh,Ft=w?ch:X||sh;let ae=ht(rt,Yt);ae===At&&(ae=Mc(rt,Yt));let oe=ht(R,Ft);oe===At&&(oe=Mc(R,Ft)),Object.assign(at,{rawComment:R,filename:ae,comment:oe,directory:L||ae.endsWith(Wi)}),J=Math.max(H,J),Pm(at,at,I,Z+6),at.zipCrypto=at.encrypted&&!at.extraFieldAES;const Jt=new qc(at);Jt.getData=(kt,je)=>at.getData(kt,Jt,f.readRanges,je),Jt.arrayBuffer=async kt=>{const je=new TransformStream,[Be]=await Promise.all([new Response(je.readable).arrayBuffer(),at.getData(je,Jt,f.readRanges,kt)]);return Be},Z=E;const{onprogress:Gt}=i;if(Gt)try{await Gt(st+1,G,new qc(at))}catch{}yield Jt}const et=Ne(f,i,i_),ut=Ne(f,i,u_);return et&&(f.prependedData=J>0?await Ee(s,0,J):new Uint8Array),f.comment=_?await Ee(s,y+vn,_):new Uint8Array,ut&&(f.appendedData=p>>8&255:D>>>24&255),outputSize:W,signature:D,compressed:p!=0&&!et,encrypted:o.encrypted&&!et,useWebWorkers:Ne(o,r,Fm),useCompressionStream:Ne(o,r,Km),transferStreams:Ne(o,r,o_),checkPasswordOnly:rt},config:b,streamOptions:{signal:lt,size:N,onstart:R,onprogress:k,onend:w}};gt&&await Y_({reader:h,fileEntry:f,offset:v,diskNumberStart:m,signature:D,compressedSize:J,uncompressedSize:W,dataOffset:ot,dataDescriptor:Z||$.bitFlag.dataDescriptor,extraFieldZip64:_||$.extraFieldZip64,readRanges:s});let L;try{if(!E){rt&&(i=new WritableStream),i=new oo(i),await ta(i,et?J:W),{writable:L}=i;const{outputSize:P}=await dm({readable:V,writable:L},U);if(i.size+=P,P!=(et?J:W))throw new Error(im)}}catch(P){if(P.outputSize!==At&&(i.size+=P.outputSize),!rt||P.message!=no)throw P}finally{!Ne(o,r,Jm)&&L&&!L.locked&&await L.getWriter().close()}return rt||E?At:i.getData?i.getData():L}}function $m(u,i,f){const s=u.rawBitFlag=Te(i,f+2),r=(s&Hr)==Hr,o=Pt(i,f+6);Object.assign(u,{encrypted:r,version:Te(i,f),bitFlag:{level:(s&qv)>>1,dataDescriptor:(s&jr)==jr,languageEncodingFlag:(s&Br)==Br},rawLastModDate:o,lastModDate:q_(o),filenameLength:Te(i,f+22),extraFieldLength:Te(i,f+24)})}function Pm(u,i,f,s,r){const{rawExtraField:o}=i,h=i.extraField=new Map,v=ne(new Uint8Array(o));let m=0;try{for(;mi[r]==o);for(let r=0,o=0;r=5&&(o.push(Gc),h.push(Fr));let v=1;o.forEach((m,y)=>{if(u.data.length>=v+4){const _=Pt(s,v);i[m]=u[m]=new Date(_*1e3);const p=h[y];u[p]=_}v+=4})}async function Y_({reader:u,fileEntry:i,offset:f,diskNumberStart:s,signature:r,compressedSize:o,uncompressedSize:h,dataOffset:v,dataDescriptor:m,extraFieldZip64:y,readRanges:_}){let p=0;if(s)for(let D=0;D=D.start&&T.start=0;b--)if(p[b]==o[0]&&p[b+1]==o[1]&&p[b+2]==o[2]&&p[b+3]==o[3])return{offset:_+b,buffer:p.slice(b,b+s).buffer}}}function Ne(u,i,f){return i[f]===At?u.options[f]:i[f]}function q_(u){const i=(u&4294901760)>>16,f=u&65535;try{return new Date(1980+((i&65024)>>9),((i&480)>>5)-1,i&31,(f&63488)>>11,(f&2016)>>5,(f&31)*2,0)}catch{}}function wr(u){return new Date(Number(u/BigInt(1e4)-BigInt(116444736e5)))}function Kl(u,i){return u.getUint8(i)}function Te(u,i){return u.getUint16(i,!0)}function Pt(u,i){return u.getUint32(i,!0)}function Jl(u,i){return Number(u.getBigUint64(i,!0))}function Z_(u,i,f){u.setUint32(i,f,!0)}function ne(u){return new DataView(u.buffer)}const t3="File already exists",e3="Zip file comment exceeds 64KB",n3="File entry comment exceeds 64KB",a3="File entry name exceeds 64KB",Kr="Version exceeds 65535",l3="The strength must equal 1, 2, or 3",i3="Extra field type exceeds 65535",u3="Extra field data exceeds 64KB",Kc="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",c3="Undefined uncompressed size",s3="Zip file not empty",rh=new Uint8Array([7,0,2,0,65,69,3,0,0]);let Or=0;const oh=[];class f3{constructor(i,f={}){i=new oo(i);const s=i.availableSize!==At&&i.availableSize>0&&i.availableSize!==1/0&&i.maxSize!==At&&i.maxSize>0&&i.maxSize!==1/0;Object.assign(this,{writer:i,addSplitZipSignature:s,options:f,config:eo(),files:new Map,filenames:new Set,offset:f[lh]===At?i.size||i.writable.size||0:f[lh],pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async prependZip(i){if(this.filenames.size)throw new Error(s3);i=new Fc(i);const f=new U_(i.readable),s=await f.getEntries();await f.close(),await i.readable.pipeTo(this.writer.writable,{preventClose:!0,preventAbort:!0}),this.writer.size=this.offset=i.size,this.filenames=new Set(s.map(r=>r.filename)),this.files=new Map(s.map(r=>{const{version:o,compressionMethod:h,lastModDate:v,lastAccessDate:m,creationDate:y,rawFilename:_,bitFlag:p,encrypted:b,uncompressedSize:T,compressedSize:D,diskOffset:G,diskNumber:W,zip64:J}=r;let{rawExtraFieldZip64:Z,rawExtraFieldAES:$,rawExtraFieldExtendedTimestamp:I,rawExtraFieldNTFS:B,rawExtraField:it}=r;const{level:X,languageEncodingFlag:et,dataDescriptor:ut}=p;Z=Z||new Uint8Array,$=$||new Uint8Array,I=I||new Uint8Array,B=B||new Uint8Array,it=it||new Uint8Array;const st=zt(Z,$,I,B,it),at=J&&T>ce,_t=J&&D>ce,{headerArray:pt,headerView:yt}=r3({version:o,bitFlag:o3(X,et,ut,b,h),compressionMethod:h,uncompressedSize:T,compressedSize:D,lastModDate:v,rawFilename:_,zip64CompressedSize:_t,zip64UncompressedSize:at,extraFieldLength:st});return Object.assign(r,{zip64UncompressedSize:at,zip64CompressedSize:_t,zip64Offset:J&&this.offset-G>ce,zip64DiskNumberStart:J&&W>le,rawExtraFieldZip64:Z,rawExtraFieldAES:$,rawExtraFieldExtendedTimestamp:I,rawExtraFieldNTFS:B,rawExtraField:it,extendedTimestamp:I.length>0||B.length>0,extraFieldExtendedTimestampFlag:1+(m?2:0)+(y?4:0),headerArray:pt,headerView:yt}),[r.filename,r]}))}async add(i="",f,s={}){const r=this,{pendingAddFileCalls:o,config:h}=r;Oroh.push(m));let v;try{if(i=i.trim(),r.filenames.has(i))throw new Error(t3);return r.filenames.add(i),v=V_(r,i,f,s),o.add(v),await v}catch(m){throw r.filenames.delete(i),m}finally{o.delete(v);const m=oh.shift();m?m():Or--}}remove(i){const{filenames:f,files:s}=this;if(typeof i=="string"&&(i=s.get(i)),i&&i.filename!==At){const{filename:r}=i;if(f.has(r)&&s.has(r))return f.delete(r),s.delete(r),!0}return!1}async close(i=new Uint8Array,f={}){const s=this,{pendingAddFileCalls:r,writer:o}=this,{writable:h}=o;for(;r.size;)await Promise.allSettled(Array.from(r));return await $_(this,i,f),Ct(s,f,Jm)||await h.getWriter().close(),o.getData?o.getData():h}}class X_{constructor(i={}){const{readable:f,writable:s}=new TransformStream;this.readable=f,this.zipWriter=new f3(s,i)}transform(i){const{readable:f,writable:s}=new TransformStream({flush:()=>{this.zipWriter.close()}});return this.zipWriter.add(i,f),{readable:this.readable,writable:s}}writable(i){const{readable:f,writable:s}=new TransformStream;return this.zipWriter.add(i,f),s}close(i=void 0,f={}){return this.zipWriter.close(i,f)}}async function V_(u,i,f,s){i=i.trim();const r=Ct(u,s,Um),o=Ct(u,s,Hm,r?20:768),h=Ct(u,s,Bm);if(o>le)throw new Error(Kr);let v=Ct(u,s,Mm,0);v===0&&(v=Ct(u,s,Nm,0)),!s[Nc]&&i.endsWith(Wi)&&(s[Nc]=!0),Ct(u,s,Nc)?(i.endsWith(Wi)||(i+=Wi),v===0&&(v=Yr,r||(v|=(Yh|Gr|Sr)<<16))):!r&&v===0&&(h?v=(Gr|Sr)<<16:v=Sr<<16);const y=Ct(u,s,b_,Dc);let _=y(i);if(_===At&&(_=Dc(i)),zt(_)>le)throw new Error(a3);const p=s[ho]||"";let b=y(p);if(b===At&&(b=Dc(p)),zt(b)>le)throw new Error(n3);const T=Ct(u,s,Lm,Fv);if(T>le)throw new Error(Kr);const D=Ct(u,s,Gc,new Date),G=Ct(u,s,yo),W=Ct(u,s,go);let J=Ct(u,s,zm,0);J===0&&(J=Ct(u,s,Dm,0));const Z=Ct(u,s,Vm);let $,I;Z||($=Ct(u,s,Zm),I=Ct(u,s,Xm));const B=Ct(u,s,d_,3),it=Ct(u,s,jm),X=Ct(u,s,h_,!0),et=Ct(u,s,m_,!0),ut=Ct(u,s,y_),st=Ct(u,s,Fm),at=Ct(u,s,g_),_t=Ct(u,s,v_,!1),pt=Ct(u,s,Qm),yt=Ct(u,s,__,!0),ot=Ct(u,s,Km),N=Ct(u,s,Ym);let V=Ct(u,s,p_);at&&V===At&&(V=!1),(V===At||it)&&(V=!0);let lt=Ct(u,s,vo);if(!it&&($!==At||I!==At)&&!(B>=1&&B<=3))throw new Error(l3);let rt=new Uint8Array;const gt=s[qm];if(gt){let Be=0,qe=0;gt.forEach(Ce=>Be+=4+zt(Ce)),rt=new Uint8Array(Be),gt.forEach((Ce,Ae)=>{if(Ae>le)throw new Error(i3);if(zt(Ce)>le)throw new Error(u3);re(rt,new Uint16Array([Ae]),qe),re(rt,new Uint16Array([zt(Ce)]),qe+2),re(rt,Ce,qe+4),qe+=4+zt(Ce)})}let E=0,R=0,k=0;if(Z&&(k=s[mo],k===At))throw new Error(c3);const w=lt===!0;f&&(f=new Fc(f),await ta(f),Z?(s.uncompressedSize=k,E=hh(k)):f.size===At?(V=!0,(lt||lt===At)&&(lt=!0,k=E=ce+1)):(s.uncompressedSize=k=f.size,E=hh(k)));const{diskOffset:U,diskNumber:L,maxSize:P}=u.writer,H=w||k>ce,ht=w||E>ce,Yt=w||u.offset+u.pendingEntriesSize-U>ce,ae=Ct(u,s,km,!0)&&w||L+Math.ceil(u.pendingEntriesSize/P)>le;if(Yt||H||ht||ae){if(lt===!1||!et)throw new Error(Kc);lt=!0}lt=lt||!1;const oe=Ct(u,s,Cm);s=Object.assign({},s,{rawFilename:_,rawComment:b,version:T,versionMadeBy:o,lastModDate:D,lastAccessDate:G,creationDate:W,rawExtraField:rt,zip64:lt,zip64UncompressedSize:H,zip64CompressedSize:ht,zip64Offset:Yt,zip64DiskNumberStart:ae,password:$,rawPassword:I,level:!ot&&u.config.CompressionStream===At&&u.config.CompressionStreamNative===At?0:ut,useWebWorkers:st,encryptionStrength:B,extendedTimestamp:X,zipCrypto:it,bufferedWrite:at,keepOrder:et,useUnicodeFileNames:yt,dataDescriptor:V,dataDescriptorSignature:_t,signal:pt,msDosCompatible:r,internalFileAttribute:J,internalFileAttributes:J,externalFileAttribute:v,externalFileAttributes:v,useCompressionStream:ot,passThrough:Z,encrypted:!!($&&zt($)||I&&zt(I))||Z&&oe,signature:s[Gm],compressionMethod:N,uncompressedSize:k,offset:u.offset-U,diskNumberStart:L});const Jt=K_(s),Gt=k_(s),kt=zt(Jt.localHeaderArray,Gt.dataDescriptorArray);R=kt+E,u.options[Im]&&(R+=R+64),u.pendingEntriesSize+=R;let je;try{je=await Q_(u,i,f,{headerInfo:Jt,dataDescriptorInfo:Gt,metadataSize:kt},s)}finally{u.pendingEntriesSize-=R}return Object.assign(je,{name:i,comment:p,extraField:gt}),new qc(je)}async function Q_(u,i,f,s,r){const{files:o,writer:h}=u,{keepOrder:v,dataDescriptor:m,signal:y}=r,{headerInfo:_}=s,p=u.options[Im],b=Array.from(o.values()).pop();let T={},D,G,W,J,Z,$,I;o.set(i,T);try{let et;v&&(et=b&&b.lock,B()),(r.bufferedWrite||u.writerLocked||u.bufferedWrites&&v||!m)&&!p?($=new TransformStream,$.size=0,D=!0,u.bufferedWrites++,await ta(h)):($=h,await it()),await ta($);const{writable:ut,diskOffset:st}=h;if(u.addSplitZipSignature){delete u.addSplitZipSignature;const ot=new Uint8Array(4),N=Ue(ot);Dt(N,0,$r),await $n(h,ot),u.offset+=4}p&&J_(s,u.offset-st);const{localHeaderView:at,localHeaderArray:_t}=_;D||(await et,await X(ut));const{diskNumber:pt}=h;Z=!0,T.diskNumberStart=pt,D?I=new Response($.readable).blob():await $n($,_t),T=await F_(f,$,T,s,u.config,r);const{zip64:yt}=T;if(Z=!1,o.set(i,T),T.filename=i,D){const[ot]=await Promise.all([I,$.writable.getWriter().close(),et]);await it(),J=!0,T.diskNumberStart=h.diskNumber,T.offset=u.offset-h.diskOffset,yt&&dh(T),W_(T,at,r),await X(ut),await $n(h,_t),await ot.stream().pipeTo(ut,{preventClose:!0,preventAbort:!0,signal:y}),h.size+=$.size,J=!1}else T.offset=u.offset-st,yt&&dh(T);if(T.offset>ce&&!yt)throw new Error(Kc);return u.offset+=T.size,T}catch(et){if(D&&J||!D&&Z){if(u.hasCorruptedEntries=!0,et)try{et.corruptedEntry=!0}catch{}D?u.offset+=$.size:u.offset=$.size}throw o.delete(i),et}finally{D&&u.bufferedWrites--,W&&W(),G&&G()}function B(){T.lock=new Promise(et=>W=et)}async function it(){u.writerLocked=!0;const{lockWriter:et}=u;u.lockWriter=new Promise(ut=>G=()=>{u.writerLocked=!1,ut()}),await et}async function X(et){zt(_.localHeaderArray)>h.availableSize&&(h.availableSize=0,await $n(et,new Uint8Array))}}async function F_(u,i,{diskNumberStart:f,lock:s},r,o,h){const{headerInfo:v,dataDescriptorInfo:m,metadataSize:y}=r,{headerArray:_,headerView:p,lastModDate:b,rawLastModDate:T,encrypted:D,compressed:G,version:W,compressionMethod:J,rawExtraFieldZip64:Z,localExtraFieldZip64Length:$,rawExtraFieldExtendedTimestamp:I,extraFieldExtendedTimestampFlag:B,rawExtraFieldNTFS:it,rawExtraFieldAES:X}=v,{dataDescriptorArray:et}=m,{rawFilename:ut,lastAccessDate:st,creationDate:at,password:_t,rawPassword:pt,level:yt,zip64:ot,zip64UncompressedSize:N,zip64CompressedSize:V,zip64Offset:lt,zip64DiskNumberStart:rt,zipCrypto:gt,dataDescriptor:E,directory:R,executable:k,versionMadeBy:w,rawComment:U,rawExtraField:L,useWebWorkers:P,onstart:H,onprogress:ht,onend:Yt,signal:Ft,encryptionStrength:ae,extendedTimestamp:oe,msDosCompatible:Jt,internalFileAttributes:Gt,externalFileAttributes:kt,useCompressionStream:je,passThrough:Be}=h,qe={lock:s,versionMadeBy:w,zip64:ot,directory:!!R,executable:!!k,filenameUTF8:!0,rawFilename:ut,commentUTF8:!0,rawComment:U,rawExtraFieldZip64:Z,localExtraFieldZip64Length:$,rawExtraFieldExtendedTimestamp:I,rawExtraFieldNTFS:it,rawExtraFieldAES:X,rawExtraField:L,extendedTimestamp:oe,msDosCompatible:Jt,internalFileAttributes:Gt,externalFileAttributes:kt,diskNumberStart:f};let{signature:Ce,uncompressedSize:Ae}=h,wn=0;Be||(Ae=0);const{writable:nl}=i;if(u){u.chunkSize=qh(o);const xe=u.readable,al=u.size,ll={options:{codecType:sm,level:yt,rawPassword:pt,password:_t,encryptionStrength:ae,zipCrypto:D&>,passwordVerification:D&>&&T>>8&255,signed:!Be,compressed:G&&!Be,encrypted:D&&!Be,useWebWorkers:P,useCompressionStream:je,transferStreams:!1},config:o,streamOptions:{signal:Ft,size:al,onstart:H,onprogress:ht,onend:Yt}};try{const _e=await dm({readable:xe,writable:nl},ll);wn=_e.outputSize,i.size+=wn,Be||(Ae=_e.inputSize,Ce=_e.signature)}catch(_e){throw _e.outputSize!==At&&(i.size+=_e.outputSize),_e}}return I_({signature:Ce,compressedSize:wn,uncompressedSize:Ae,headerInfo:v,dataDescriptorInfo:m},h),E&&await $n(i,et),Object.assign(qe,{uncompressedSize:Ae,compressedSize:wn,lastModDate:b,rawLastModDate:T,creationDate:at,lastAccessDate:st,encrypted:D,zipCrypto:gt,size:y+wn,compressionMethod:J,version:W,headerArray:_,headerView:p,signature:Ce,extraFieldExtendedTimestampFlag:B,zip64UncompressedSize:N,zip64CompressedSize:V,zip64Offset:lt,zip64DiskNumberStart:rt}),qe}function K_(u){const{rawFilename:i,lastModDate:f,lastAccessDate:s,creationDate:r,level:o,zip64:h,zipCrypto:v,useUnicodeFileNames:m,dataDescriptor:y,directory:_,rawExtraField:p,encryptionStrength:b,extendedTimestamp:T,passThrough:D,encrypted:G,zip64UncompressedSize:W,zip64CompressedSize:J,zip64Offset:Z,zip64DiskNumberStart:$,uncompressedSize:I,offset:B,diskNumberStart:it}=u;let{version:X,compressionMethod:et}=u;const ut=!_&&(o>0||o===At&&et!==0);let st;const at=D||!ut,_t=h&&(u.bufferedWrite||!W&&!J||at);if(h){let U=4;W&&(U+=8),J&&(U+=8),Z&&(U+=8),$&&(U+=4),st=new Uint8Array(U);const L=Ue(st);if(Lt(L,0,Ch),Lt(L,2,zt(st)-4),_t){const P=Ue(st);let H=4;W&&(ve(P,H,BigInt(I)),H+=8),J&&at&&(ve(P,H,BigInt(I)),H+=8),Z&&(ve(P,H,BigInt(B)),H+=8),$&&(Dt(P,H,it),H+=4)}}else st=new Uint8Array;let pt;if(G&&!v){pt=new Uint8Array(zt(rh)+2);const U=Ue(pt);Lt(U,0,Lh),re(pt,rh,2),Jr(U,8,b)}else pt=new Uint8Array;let yt,ot,N;if(T){ot=new Uint8Array(9+(s?4:0)+(r?4:0));const U=Ue(ot);Lt(U,0,Pr),Lt(U,2,zt(ot)-4),N=1+(s?2:0)+(r?4:0),Jr(U,4,N);let L=5;Dt(U,L,Math.floor(f.getTime()/1e3)),L+=4,s&&(Dt(U,L,Math.floor(s.getTime()/1e3)),L+=4),r&&Dt(U,L,Math.floor(r.getTime()/1e3));try{yt=new Uint8Array(36);const P=Ue(yt),H=Rr(f);Lt(P,0,Hh),Lt(P,2,32),Lt(P,8,jh),Lt(P,10,24),ve(P,12,H),ve(P,20,Rr(s)||H),ve(P,28,Rr(r)||H)}catch{yt=new Uint8Array}}else yt=ot=new Uint8Array;et===At&&(et=ut?Wr:wh),h&&(X=X>Y1?X:Y1),G&&!v&&(X=X>G1?X:G1,pt[9]=et,et=Oh);const V=_t?zt(st):0,lt=V+zt(pt,ot,yt,p),{headerArray:rt,headerView:gt,rawLastModDate:E}=r3({version:X,bitFlag:o3(o,m,y,G,et),compressionMethod:et,uncompressedSize:I,lastModDate:fq1?q1:f,rawFilename:i,zip64CompressedSize:J,zip64UncompressedSize:W,extraFieldLength:lt});let R=tl;const k=new Uint8Array(R+zt(i)+lt),w=Ue(k);return Dt(w,0,Rh),re(k,rt,4),re(k,i,R),R+=zt(i),_t&&re(k,st,R),R+=V,re(k,pt,R),R+=zt(pt),re(k,ot,R),R+=zt(ot),re(k,yt,R),R+=zt(yt),re(k,p,R),y&&(Dt(w,kl+4,0),Dt(w,Il+4,0)),{localHeaderArray:k,localHeaderView:w,headerArray:rt,headerView:gt,lastModDate:f,rawLastModDate:E,encrypted:G,compressed:ut,version:X,compressionMethod:et,extraFieldExtendedTimestampFlag:N,rawExtraFieldZip64:st,localExtraFieldZip64Length:V,rawExtraFieldExtendedTimestamp:ot,rawExtraFieldNTFS:yt,rawExtraFieldAES:pt,extraFieldLength:lt}}function J_(u,i){const{headerInfo:f}=u;let{localHeaderArray:s,extraFieldLength:r}=f,o=Ue(s),h=64-(i+zt(s))%64;h<4&&(h+=64);const v=new Uint8Array(h),m=Ue(v);Lt(m,0,Bh),Lt(m,2,h-2);const y=s;f.localHeaderArray=s=new Uint8Array(zt(y)+h),re(s,y),re(s,v,zt(y)),o=Ue(s),Lt(o,28,r+h),u.metadataSize+=h}function k_({zip64:u,dataDescriptor:i,dataDescriptorSignature:f}){let s=new Uint8Array,r,o=0,h=u?Uh:Mh;return f&&(h+=Hc),i&&(s=new Uint8Array(h),r=Ue(s),f&&(o=Hc,Dt(r,0,Dh))),{dataDescriptorArray:s,dataDescriptorView:r,dataDescriptorOffset:o}}function I_({signature:u,compressedSize:i,uncompressedSize:f,headerInfo:s,dataDescriptorInfo:r},{zip64:o,zipCrypto:h,dataDescriptor:v}){const{headerView:m,encrypted:y}=s,{dataDescriptorView:_,dataDescriptorOffset:p}=r;(!y||h)&&u!==At&&(Dt(m,to,u),v&&Dt(_,p,u)),o?v&&(ve(_,p+4,BigInt(i)),ve(_,p+12,BigInt(f))):(Dt(m,kl,i),Dt(m,Il,f),v&&(Dt(_,p+4,i),Dt(_,p+8,f)))}function W_({rawFilename:u,encrypted:i,zip64:f,localExtraFieldZip64Length:s,signature:r,compressedSize:o,uncompressedSize:h,offset:v,diskNumberStart:m,zip64UncompressedSize:y,zip64CompressedSize:_,zip64Offset:p,zip64DiskNumberStart:b},T,{dataDescriptor:D}){if(D||(i||Dt(T,to+4,r),f||(Dt(T,kl+4,o),Dt(T,Il+4,h))),f&&s){let G=tl+zt(u)+4;y&&(ve(T,G,BigInt(h)),G+=8),_&&(ve(T,G,BigInt(o)),G+=8),p&&(ve(T,G,BigInt(v)),G+=8),b&&Dt(T,G,m)}}function dh({compressedSize:u,uncompressedSize:i,offset:f,diskNumberStart:s,zip64UncompressedSize:r,zip64CompressedSize:o,zip64Offset:h,zip64DiskNumberStart:v,rawExtraFieldZip64:m}){const y=Ue(m);let _=4;r&&(ve(y,_,BigInt(i)),_+=8),o&&(ve(y,_,BigInt(u)),_+=8),h&&(ve(y,_,BigInt(f)),_+=8),v&&Dt(y,_,s)}async function $_(u,i,f){const{files:s,writer:r}=u,{diskOffset:o}=r;let{diskNumber:h}=r,v=0,m=0,y=u.offset-o,_=s.size;for(const[,I]of s){const{rawFilename:B,rawExtraFieldZip64:it,rawExtraFieldAES:X,rawComment:et,rawExtraFieldNTFS:ut,rawExtraField:st,extendedTimestamp:at,extraFieldExtendedTimestampFlag:_t,lastModDate:pt}=I;let yt;if(at){yt=new Uint8Array(9);const ot=Ue(yt);Lt(ot,0,Pr),Lt(ot,2,5),Jr(ot,4,_t),Dt(ot,5,Math.floor(pt.getTime()/1e3))}else yt=new Uint8Array;I.rawExtraFieldExtendedTimestamp=yt,m+=46+zt(B,et,it,X,ut,yt,st)}const p=new Uint8Array(m),b=Ue(p);await ta(r);let T=0;for(const[I,B]of Array.from(s.values()).entries()){const{offset:it,rawFilename:X,rawExtraFieldZip64:et,rawExtraFieldAES:ut,rawExtraFieldExtendedTimestamp:st,rawExtraFieldNTFS:at,rawExtraField:_t,rawComment:pt,versionMadeBy:yt,headerArray:ot,headerView:N,zip64:V,zip64UncompressedSize:lt,zip64CompressedSize:rt,zip64DiskNumberStart:gt,zip64Offset:E,internalFileAttributes:R,externalFileAttributes:k,diskNumberStart:w,uncompressedSize:U,compressedSize:L}=B,P=zt(et,ut,st,at,_t);Dt(b,v,Cr),Lt(b,v+4,yt),lt||Dt(N,Il,U),rt||Dt(N,kl,L),re(p,ot,v+6);let H=v+tl;if(Lt(b,H,P),H+=2,Lt(b,H,zt(pt)),H+=2,Lt(b,H,V&>?le:w),H+=2,Lt(b,H,R),H+=2,k&&Dt(b,H,k),H+=4,Dt(b,H,V&&E?ce:it),H+=4,re(p,X,H),H+=zt(X),re(p,et,H),H+=zt(et),re(p,ut,H),H+=zt(ut),re(p,st,H),H+=zt(st),re(p,at,H),H+=zt(at),re(p,_t,H),H+=zt(_t),re(p,pt,H),v-T>r.availableSize&&(r.availableSize=0,await $n(r,p.slice(T,v)),T=v),v=H,f.onprogress)try{await f.onprogress(I+1,s.size,new qc(B))}catch{}}await $n(r,T?p.slice(T):p);let D=r.diskNumber;const{availableSize:G}=r;Gce||m>ce||_>le||D>le){if(W===!1)throw new Error(Kc);W=!0}const J=new Uint8Array(W?Bv:vn),Z=Ue(J);v=0,W&&(Dt(Z,0,Lr),ve(Z,4,BigInt(44)),Lt(Z,12,45),Lt(Z,14,45),Dt(Z,16,D),Dt(Z,20,h),ve(Z,24,BigInt(_)),ve(Z,32,BigInt(_)),ve(Z,40,BigInt(m)),ve(Z,48,BigInt(y)),Dt(Z,56,Nh),ve(Z,64,BigInt(y)+BigInt(m)),Dt(Z,72,D+1),Ct(u,f,km,!0)&&(D=le,h=le),_=le,y=ce,m=ce,v+=Ii+ki),Dt(Z,v,zh),Lt(Z,v+4,D),Lt(Z,v+6,h),Lt(Z,v+8,_),Lt(Z,v+10,_),Dt(Z,v+12,m),Dt(Z,v+16,y);const $=zt(i);if($)if($<=le)Lt(Z,v+20,$);else throw new Error(e3);await $n(r,J),$&&await $n(r,i)}async function $n(u,i){const{writable:f}=u,s=f.getWriter();try{await s.ready,u.size+=zt(i),await s.write(i)}finally{s.releaseLock()}}function Rr(u){if(u)return(BigInt(u.getTime())+BigInt(116444736e5))*BigInt(1e4)}function Ct(u,i,f,s){const r=i[f]===At?u.options[f]:i[f];return r===At?s:r}function hh(u){return u+5*(Math.floor(u/16383)+1)}function Jr(u,i,f){u.setUint8(i,f)}function Lt(u,i,f){u.setUint16(i,f,!0)}function Dt(u,i,f){u.setUint32(i,f,!0)}function ve(u,i,f){u.setBigUint64(i,f,!0)}function re(u,i,f){u.set(i,f)}function Ue(u){return new DataView(u.buffer)}function zt(...u){let i=0;return u.forEach(f=>f&&(i+=f.length)),i}function r3({version:u,bitFlag:i,compressionMethod:f,uncompressedSize:s,compressedSize:r,lastModDate:o,rawFilename:h,zip64CompressedSize:v,zip64UncompressedSize:m,extraFieldLength:y}){const _=new Uint8Array(tl-4),p=Ue(_);Lt(p,0,u),Lt(p,2,i),Lt(p,4,f);const b=new Uint32Array(1),T=Ue(b);Lt(T,0,(o.getHours()<<6|o.getMinutes())<<5|o.getSeconds()/2),Lt(T,2,(o.getFullYear()-1980<<4|o.getMonth()+1)<<5|o.getDate());const D=b[0];return Dt(p,6,D),(v||r!==At)&&Dt(p,kl,v?ce:r),(m||s!==At)&&Dt(p,Il,m?ce:s),Lt(p,22,zt(h)),Lt(p,24,y),{headerArray:_,headerView:p,rawLastModDate:D}}function o3(u,i,f,s,r){let o=0;return i&&(o=o|Br),f&&(o=o|jr),(r==Wr||r==jv)&&(u>=0&&u<=3&&(o=o|Vv),u>3&&u<=5&&(o=o|Xv),u==9&&(o=o|Zv)),s&&(o=o|Hr),o}Zh({Deflate:Lv});const P_=Object.freeze(Object.defineProperty({__proto__:null,BlobReader:so,BlobWriter:vm,Data64URIReader:q4,Data64URIWriter:Z4,ERR_DUPLICATED_NAME:t3,ERR_HTTP_RANGE:iu,ERR_INVALID_COMMENT:e3,ERR_INVALID_ENCRYPTION_STRENGTH:l3,ERR_INVALID_ENTRY_COMMENT:n3,ERR_INVALID_ENTRY_NAME:a3,ERR_INVALID_EXTRAFIELD_DATA:u3,ERR_INVALID_EXTRAFIELD_TYPE:i3,ERR_INVALID_VERSION:Kr,ERR_ITERATOR_COMPLETED_TOO_SOON:mm,ERR_UNDEFINED_UNCOMPRESSED_SIZE:c3,ERR_UNSUPPORTED_FORMAT:Kc,ERR_WRITER_NOT_INITIALIZED:ym,ERR_ZIP_NOT_EMPTY:s3,GenericReader:Fc,GenericWriter:oo,HttpRangeReader:K4,HttpReader:Tm,Reader:Ma,SplitDataReader:ro,SplitDataWriter:Yc,SplitZipReader:W4,SplitZipWriter:$4,TextReader:X4,TextWriter:V4,Uint8ArrayReader:J4,Uint8ArrayWriter:k4,Writer:co,ZipWriter:f3,ZipWriterStream:X_,configure:Zh,getMimeType:kv,initStream:ta,readUint8Array:Ee,terminateWorkers:M4},Symbol.toStringTag,{value:"Module"})),Vl=P_;async function tp(u,i){Vl.configure({useWebWorkers:!1});const f=new Vl.ZipWriter(new Vl.BlobWriter("application/zip")),s=[];i&&s.push(i,"");for(let r=0;r`# { x: ${T.x}, y: ${T.y}, width: ${T.width}, height: ${T.height} }: ${T.text}`),h.ariaSnapshot].join(` `);await f.add(_,new Vl.TextReader(b)),s.push(`- [Aria snapshot ${o}](${_})`)}for(const _ of h.annotations)_.text&&s.push(`- { x: ${_.x}, y: ${_.y}, width: ${_.width}, height: ${_.height} }: ${_.text}`);s.push("")}return await f.add("feedback.md",new Vl.TextReader(s.join(` `))),f.close()}const ep={sessions:[],clientInfo:void 0,loadingSessions:!0,tabs:null,liveFrame:void 0,annotateSession:null,pendingCapture:!1,mode:"readonly",recording:null};class np{constructor(i){this.state=ep,this._listeners=new Set,this._requestId=0,this._client=i,i.on("sessions",f=>this._emit({sessions:f.sessions,clientInfo:f.clientInfo,loadingSessions:!1})),i.on("tabs",f=>this._emit({tabs:f.tabs})),i.on("frame",f=>this._emit({liveFrame:f})),i.on("annotate",()=>this.enterAnnotate("cli")),i.on("cancelAnnotate",()=>this.cancelAnnotate(!1))}subscribe(i){return this._listeners.add(i),()=>{this._listeners.delete(i)}}sessionByGuid(i){return this.state.sessions.find(f=>f.browser.guid===i)}closeSession(i){this._client.closeSession({browser:i.browser.guid})}setVisible(i){this._client.setVisible({visible:i})}selectTab(i){this._client.selectTab({browser:i.browser,context:i.context,page:i.page})}closeTab(i){this._client.closeTab({browser:i.browser,context:i.context,page:i.page})}newTab(i,f){this._client.newTab({browser:i,context:f})}navigate(i){this._client.navigate({url:i})}back(){this._client.back()}forward(){this._client.forward()}reload(){this._client.reload()}mousemove(i,f){this._client.mousemove({x:i,y:f})}mousedown(i,f,s){this._client.mousedown({x:i,y:f,button:s})}mouseup(i,f,s){this._client.mouseup({x:i,y:f,button:s})}wheel(i,f){this._client.wheel({deltaX:i,deltaY:f})}keydown(i){this._client.keydown({key:i})}keyup(i){this._client.keyup({key:i})}toggleInteractive(){const i=this.state.mode==="interactive"?"readonly":"interactive";i==="interactive"?this._enterInteractive():this._emit({mode:i})}enterInteractive(){this._enterInteractive()}enterAnnotate(i){this._enterAnnotate(i)}addAnnotateFrame(){this._addAnnotateFrame()}selectAnnotateFrame(i,f){const s=this.state.annotateSession;!s||!s.frames.find(r=>r.id===i)||this._emit({annotateSession:{...s,selectedFrameId:i,focusAnnotationId:f??null},mode:"annotate"})}toggleSelectFrame(i){const f=this.state.annotateSession;f&&(f.selectedFrameId===i?this._emit({annotateSession:{...f,selectedFrameId:null,focusAnnotationId:null},mode:"readonly"}):this.selectAnnotateFrame(i))}deselectFrame(){const i=this.state.annotateSession;!i||i.selectedFrameId===null||this._emit({annotateSession:{...i,selectedFrameId:null,focusAnnotationId:null},mode:"readonly"})}removeAnnotateFrame(i){const f=this.state.annotateSession;if(!f)return;const s=f.frames.filter(o=>o.id!==i);if(s.length===0){this.cancelAnnotate();return}const r=f.selectedFrameId===i?null:f.selectedFrameId;this._emit({annotateSession:{...f,frames:s,selectedFrameId:r}})}updateFrameAnnotations(i,f){const s=this.state.annotateSession;if(!s)return;const r=s.frames.map(o=>o.id===i?{...o,annotations:f}:o);this._emit({annotateSession:{...s,frames:r}})}updateFeedback(i){const f=this.state.annotateSession;f&&this._emit({annotateSession:{...f,feedback:i}})}completeAnnotation(){this._completeAnnotation()}startRecording(){this._startRecording()}stopRecording(){this._stopRecording()}discardRecording(){this._discardRecording()}cancelAnnotate(i=!0){var s;this._requestId++;const f=this.state;i&&((s=f.annotateSession)==null?void 0:s.initiator)==="cli"&&this._client.cancelAnnotation(),this._emit({mode:f.mode==="annotate"?"readonly":f.mode,annotateSession:null,pendingCapture:!1})}async submitAnnotateSession(){const i=this.state.annotateSession;if(!i)return;const f=[];for(const s of i.frames){const r=await ap(s);f.push({data:r??s.data,ariaSnapshot:s.ariaSnapshot,annotations:s.annotations.map(o=>({x:o.x,y:o.y,width:o.width,height:o.height,text:o.text})),sessionTitle:s.sessionTitle,title:s.title,url:s.url,viewportWidth:s.viewportWidth,viewportHeight:s.viewportHeight})}if(i.initiator==="cli")await this._client.submitAnnotation({frames:f,feedback:i.feedback});else{const s=await tp(f,i.feedback),r=new Date().toISOString().replace(/[:.]/g,"-");if(!await bh(s,`annotations-${r}.zip`))return}this.cancelAnnotate()}async _enterInteractive(){var f;const i=this.state;this._emit({mode:"interactive",annotateSession:(f=i.annotateSession)!=null&&f.selectedFrameId?{...i.annotateSession,selectedFrameId:null,focusAnnotationId:null}:i.annotateSession})}async _enterAnnotate(i){const f=this.state;if(f.annotateSession){i==="cli"&&f.annotateSession.initiator!=="cli"&&this._emit({annotateSession:{...f.annotateSession,initiator:"cli"}}),await this._addAnnotateFrame();return}await this._discardRecording(),await this._addAnnotateFrame(i)}async _addAnnotateFrame(i){var y,_;if(this.state.pendingCapture)return;const f=++this._requestId;this._emit({pendingCapture:!0});let s;try{s=await this._client.screenshot()}catch{}if(f!==this._requestId)return;if(!s){this._emit({pendingCapture:!1});return}const r=(y=this.state.tabs)==null?void 0:y.find(p=>p.selected),o=((_=this.state.sessions.find(p=>p.browser.guid===(r==null?void 0:r.browser)))==null?void 0:_.title)??"",h={id:"frm-"+Math.random().toString(36).slice(2,10),data:s.data,viewportWidth:s.viewportWidth,viewportHeight:s.viewportHeight,ariaSnapshot:s.ariaSnapshot,sessionTitle:o,title:(r==null?void 0:r.title)??"",url:(r==null?void 0:r.url)??"",annotations:[]},v=this.state.annotateSession,m=v?{...v,frames:[...v.frames,h],selectedFrameId:h.id,focusAnnotationId:null}:{initiator:i??"user",frames:[h],selectedFrameId:h.id,focusAnnotationId:null,feedback:""};this._emit({annotateSession:m,pendingCapture:!1,mode:"annotate"})}async _completeAnnotation(){var f;((f=this.state.annotateSession)==null?void 0:f.initiator)==="cli"?await this.submitAnnotateSession().catch(()=>{}):this.cancelAnnotate()}async _startRecording(){this.state.annotateSession&&this.cancelAnnotate(),await this._client.startRecording(),this._emit({recording:{phase:"recording"}})}async _stopRecording(){const{streamId:i}=await this._client.stopRecording(),f=[];for(;;){const{data:o,eof:h}=await this._client.readStream({streamId:i});if(o&&f.push(lp(o,"video/webm")),h)break}const s=new Blob(f,{type:"video/webm"}),r=URL.createObjectURL(s);this._emit({recording:{phase:"stopped",blob:s,blobUrl:r}})}async _discardRecording(){var f,s;const i=this.state;if(((f=i.recording)==null?void 0:f.phase)==="recording")try{const{streamId:r}=await this._client.stopRecording();for(;;){const{eof:o}=await this._client.readStream({streamId:r});if(o)break}}catch{}((s=i.recording)==null?void 0:s.phase)==="stopped"&&URL.revokeObjectURL(i.recording.blobUrl),this._emit({recording:null})}_emit(i){this.state={...this.state,...i};for(const f of this._listeners)f()}}async function ap(u){const i=new Image;i.src="data:image/png;base64,"+u.data;try{await i.decode()}catch{return}const f=await ph(i,u.viewportWidth,u.viewportHeight,u.annotations);if(!f)return;const s=await f.arrayBuffer();return new Uint8Array(s).toBase64()}function lp(u,i){return new Blob([Uint8Array.fromBase64(u)],{type:i})}class ip{constructor(i){this._lastId=0,this._pending=new Map,this._sendQueue=[],this._closed=!1,this._ws=new WebSocket(i),this._ws.onopen=()=>{for(const f of this._sendQueue||[])this._ws.send(f);this._sendQueue=void 0,this.onopen&&this.onopen()},this._ws.onmessage=f=>{let s;try{s=JSON.parse(f.data)}catch{this._ws.close();return}if(s.id!==void 0){const r=this._pending.get(s.id);r&&(this._pending.delete(s.id),s.error?r.reject(new Error(s.error)):r.resolve(s.result))}else s.method&&this.onevent&&this.onevent(s.method,s.params)},this._ws.onclose=f=>{this._closed=!0,this._sendQueue=void 0;for(const{reject:s}of this._pending.values())s(new Error("Connection closed"));this._pending.clear(),this.onclose&&this.onclose(f.reason)},this._ws.onerror=()=>{}}sendNoReply(i,f){this.send(i,f).catch(()=>{})}send(i,f){if(this._closed)return Promise.reject(new Error("Connection closed"));const s=++this._lastId,r=JSON.stringify({id:s,method:i,params:f});return this._sendQueue?this._sendQueue.push(r):this._ws.send(r),new Promise((o,h)=>{this._pending.set(s,{resolve:o,reject:h})})}close(){this._ws.close()}}class _o{constructor(i){this._listeners=new Map,this._transport=i,this._transport.onopen=()=>{var f;(f=this.onopen)==null||f.call(this)},this._transport.onevent=(f,s)=>{this._fireEvent(f,s)},this._transport.onclose=f=>{var s;(s=this.onclose)==null||s.call(this,f)}}static create(i){const f=new ip(i),s=new _o(f);return new Proxy(s,{get(r,o,h){if(typeof o=="symbol"||o in r)return Reflect.get(r,o,h);if(o!=="then")return v=>r._transport.send(o,v)}})}_fireEvent(i,f){const s=this._listeners.get(i);if(s)for(const r of s)r(f)}on(i,f){let s=this._listeners.get(i);s||(s=new Set,this._listeners.set(i,s)),s.add(f)}off(i,f){var s;(s=this._listeners.get(i))==null||s.delete(f)}close(){this._transport.close()}}const up=()=>{const[u,i]=mt.useState(!1),[f,s]=Qg(),r=mt.useRef(null);return mt.useEffect(()=>{if(!u)return;const o=v=>{r.current&&!r.current.contains(v.target)&&i(!1)},h=v=>{v.key==="Escape"&&i(!1)};return document.addEventListener("mousedown",o),document.addEventListener("keydown",h),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",h)}},[u]),O.jsxs("div",{ref:r,className:"settings-button-container",children:[O.jsx(ln,{className:"settings-gear-btn",title:"Settings",toggled:u,onClick:()=>i(!u),children:O.jsx(iv,{})}),u&&O.jsx("div",{className:"settings-popup",children:O.jsxs("div",{className:"setting-row",children:[O.jsx("span",{className:"setting-label",children:"Theme"}),O.jsx("div",{className:"setting-options",children:qg.map(o=>O.jsx("div",{className:"setting-option"+(f===o.value?" selected":""),onClick:()=>{s(o.value),i(!1)},children:o.label},o.value))})]})})]})},mh=new Map;function cp({name:u,items:i=[],id:f,render:s,icon:r,isError:o,isWarning:h,isInfo:v,selectedItem:m,onAccepted:y,onSelected:_,onHighlighted:p,onIconClicked:b,noItemsMessage:T,dataTestId:D,notSelectable:G,ariaLabel:W}){const J=Wn.useRef(null),[Z,$]=Wn.useState();return Wn.useEffect(()=>{p==null||p(Z)},[p,Z]),Wn.useEffect(()=>{const I=J.current;if(!I)return;const B=()=>{mh.set(u,I.scrollTop)};return I.addEventListener("scroll",B,{passive:!0}),()=>I.removeEventListener("scroll",B)},[u]),Wn.useEffect(()=>{J.current&&(J.current.scrollTop=mh.get(u)||0)},[u]),O.jsx("div",{className:Ji("list-view vbox",u+"-list-view"),role:i.length>0?"listbox":void 0,"aria-label":W,children:O.jsxs("div",{className:Ji("list-view-content",G&&"not-selectable"),tabIndex:0,onKeyDown:I=>{var et;if(m&&I.key==="Enter"){y==null||y(m,i.indexOf(m));return}if(I.key!=="ArrowDown"&&I.key!=="ArrowUp")return;I.stopPropagation(),I.preventDefault();const B=m?i.indexOf(m):-1;let it=B;I.key==="ArrowDown"&&(B===-1?it=0:it=Math.min(B+1,i.length-1)),I.key==="ArrowUp"&&(B===-1?it=i.length-1:it=Math.max(B-1,0));const X=(et=J.current)==null?void 0:et.children.item(it);Yg(X||void 0),p==null||p(void 0),_==null||_(i[it],it),$(void 0)},ref:J,children:[T&&i.length===0&&O.jsx("div",{className:"list-view-empty",children:T}),i.map((I,B)=>{const it=s(I,B);return O.jsxs("div",{onDoubleClick:()=>y==null?void 0:y(I,B),role:"option",className:Ji("list-view-entry",m===I&&"selected",!G&&Z===I&&"highlighted",(o==null?void 0:o(I,B))&&"error",(h==null?void 0:h(I,B))&&"warning",(v==null?void 0:v(I,B))&&"info"),"aria-selected":m===I,onClick:()=>_==null?void 0:_(I,B),onMouseEnter:()=>$(I),onMouseLeave:()=>$(void 0),children:[r&&O.jsx("div",{className:"codicon "+(r(I,B)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:X=>{X.preventDefault(),X.stopPropagation()},onClick:X=>{X.stopPropagation(),X.preventDefault(),b==null||b(I,B)}}),typeof it=="string"?O.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:it}):it]},(f==null?void 0:f(I,B))||B)})]})})}const sp=cp;function fp(u){try{const f=new URL(u).hostname.replace(/^www\./,"");return f?f[0].toUpperCase():""}catch{return""}}function rp(u,i){if(!u||u==="Global")return u;let f=u;if(!u.startsWith("/")&&!u.startsWith("\\\\")&&!/^[A-Za-z]:[\\/]/.test(u)&&u.includes("/")&&(f="/"+u),i){if(f===i)return"~";if(f.startsWith(i+"/")||f.startsWith(i+"\\"))return"~"+f.slice(i.length)}return f}const op=({tab:u,model:i})=>O.jsxs(O.Fragment,{children:[u.faviconUrl?O.jsx("img",{className:"sidebar-tab-favicon",src:u.faviconUrl,alt:"","aria-hidden":"true"}):O.jsx("span",{className:"sidebar-tab-favicon placeholder","aria-hidden":"true",children:fp(u.url)}),O.jsxs("span",{className:"sidebar-tab-text",children:[O.jsx("span",{className:"sidebar-tab-title",children:u.title||"New Tab"}),O.jsx("span",{className:"sidebar-tab-url",children:u.url||"about:blank"})]}),O.jsx(ln,{className:"sidebar-tab-close",icon:"close",title:"Close tab",onClick:f=>{f.stopPropagation(),i.closeTab(u)}})]}),dp=({model:u})=>{const{sessions:i,clientInfo:f,loadingSessions:s,tabs:r}=u.state,o=i,h=mt.useMemo(()=>{const y=new Map;for(const _ of r??[]){let p=y.get(_.browser);p||(p=new Map,y.set(_.browser,p));let b=p.get(_.context);b||(b=[],p.set(_.context,b)),b.push(_)}return y},[r]),v=mt.useMemo(()=>{var y;return(y=r==null?void 0:r.find(_=>_.selected))==null?void 0:y.context},[r]),m=mt.useMemo(()=>{const y=new Map;for(const D of o){const G=D.workspaceDir||"Global";let W=y.get(G);W||(W=[],y.set(G,W)),W.push(D)}for(const D of y.values())D.sort((G,W)=>G.title.localeCompare(W.title));const _=(f==null?void 0:f.workspaceDir)||"Global",p=[...y.entries()],b=p.filter(([D])=>D===_),T=p.filter(([D])=>D!==_).sort((D,G)=>D[0].localeCompare(G[0]));return[...b,...T]},[o,f==null?void 0:f.workspaceDir]);return O.jsxs("nav",{className:"dashboard-shell-sidebar","aria-label":"Sessions",children:[O.jsxs("div",{className:"dashboard-shell-sidebar-header",children:[O.jsx("h2",{className:"dashboard-shell-sidebar-title",children:"Sessions"}),O.jsx(up,{})]}),O.jsxs("div",{className:"dashboard-shell-sidebar-content",children:[s&&O.jsx("p",{className:"sidebar-empty",role:"status","aria-live":"polite",children:"Loading sessions..."}),!s&&o.length===0&&O.jsx("p",{className:"sidebar-empty",role:"status","aria-live":"polite",children:"No open sessions."}),m.map(([y,_])=>{const p=rp(y,f==null?void 0:f.homeDir);return O.jsxs("section",{className:"workspace-group","aria-label":`Workspace ${p}`,children:[O.jsx("h3",{className:"workspace-header",children:O.jsx("span",{className:"workspace-path-full",title:p,children:p})}),_.map(b=>{var $;const T=b.browser.guid,D=b.browser.browserName,G=($=b.browser.launchOptions)==null?void 0:$.channel,W=h.get(T),J=W?[...W.entries()]:[];return(r===null?[{contextGuid:null,tabs:void 0}]:J.length===0?[{contextGuid:null,tabs:[]}]:J.map(([I,B])=>({contextGuid:I,tabs:B}))).map((I,B)=>{var et;const it=(et=I.tabs)==null?void 0:et.find(ut=>ut.context===v&&ut.selected),X=`${T}-${I.contextGuid??`placeholder-${B}`}`;return O.jsxs("section",{className:"sidebar-session session-chip"+(it?" active":""),"aria-label":`Session ${b.title}`,children:[O.jsxs("header",{className:"sidebar-session-row",children:[O.jsxs("div",{className:"session-browser-icon-wrap",title:G||D,children:[O.jsx("span",{className:"session-browser-icon","aria-hidden":"true",children:O.jsx($g,{browserName:D,channel:G})}),O.jsx(ln,{className:"session-browser-close",icon:"close",title:"Close session",onClick:()=>u.closeSession(b)})]}),O.jsx("span",{className:"session-chip-name",children:b.title}),O.jsx("div",{className:"sidebar-session-row-actions",children:I.contextGuid&&O.jsx(ln,{className:"sidebar-session-new-tab",icon:"add",title:"New tab",onClick:()=>u.newTab(T,I.contextGuid)})})]}),I.tabs===void 0?O.jsx("p",{className:"sidebar-tabs-loading",role:"status","aria-live":"polite",children:"Loading tabs..."}):O.jsx(sp,{name:`sidebar-tabs-${X}`,ariaLabel:`${b.title} tabs`,items:I.tabs,id:ut=>ut.page,selectedItem:it,onSelected:ut=>u.selectTab(ut),noItemsMessage:"No tabs open.",render:ut=>O.jsx(op,{tab:ut,model:u})})]},X)})})]},y)})]})]})},hp=50,mp=({sidebarSize:u,sidebarHidden:i=!1,sidebarIsFirst:f=!1,orientation:s="vertical",minSidebarSize:r=hp,settingName:o,sidebar:h,main:v})=>{const m=Math.max(r,u)*window.devicePixelRatio,[y,_]=x1(o?o+"."+s+":size":void 0,m),[p,b]=x1(o?o+"."+s+":size":void 0,m),[T,D]=Wn.useState(null),[G,W]=jg();let J;s==="vertical"?(J=p/window.devicePixelRatio,G&&G.heightD({offset:s==="vertical"?$.clientY:$.clientX,size:J}),onMouseUp:()=>D(null),onMouseMove:$=>{if(!$.buttons)D(null);else if(T){const B=(s==="vertical"?$.clientY:$.clientX)-T.offset,it=f?T.size+B:T.size-B,et=$.target.parentElement.getBoundingClientRect(),ut=Math.min(Math.max(r,it),(s==="vertical"?et.height:et.width)-r);s==="vertical"?b(ut*window.devicePixelRatio):_(ut*window.devicePixelRatio)}}})]})};Zg();const yp=new URLSearchParams(location.search).get("ws")??"",gp=_o.create("/"+yp),Uc=new np(gp),d3=()=>Uc.setVisible(!document.hidden);document.addEventListener("visibilitychange",d3);document.hidden&&d3();const vp=()=>{const[,u]=mt.useState(0);return mt.useEffect(()=>Uc.subscribe(()=>u(i=>i+1)),[]),O.jsx(mp,{orientation:"horizontal",sidebarIsFirst:!0,sidebarSize:320,minSidebarSize:220,settingName:"dashboardSessionSidebar",sidebar:O.jsx(dp,{model:Uc}),main:O.jsx("div",{className:"dashboard-shell-main",children:O.jsx(_v,{model:Uc})})})},xc=document.querySelector("#root"),_p=xc.__dashboardRoot??(xc.__dashboardRoot=Hg.createRoot(xc));_p.render(O.jsx(vp,{}));