From 9e2450461c228152b83d1ef8205dafed5b5d361d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9stor=20Balaguer=20Adsuara?= Date: Wed, 11 Sep 2024 00:19:50 +0200 Subject: [PATCH] v2.25 --- assets/index-KP-qa45h.js | 123 +++++++++++++++++++++++++++++++++++ assets/index-PjgksUOS.css | 9 --- assets/index-nciSMtqN.js | 131 -------------------------------------- assets/index-q3wjcOzQ.css | 1 + index.html | 4 +- 5 files changed, 126 insertions(+), 142 deletions(-) create mode 100644 assets/index-KP-qa45h.js delete mode 100644 assets/index-PjgksUOS.css delete mode 100644 assets/index-nciSMtqN.js create mode 100644 assets/index-q3wjcOzQ.css diff --git a/assets/index-KP-qa45h.js b/assets/index-KP-qa45h.js new file mode 100644 index 0000000..b0e5d32 --- /dev/null +++ b/assets/index-KP-qa45h.js @@ -0,0 +1,123 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var xi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function En(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O1={exports:{}},Hl={},F1={exports:{}},ue={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ls=Symbol.for("react.element"),oS=Symbol.for("react.portal"),sS=Symbol.for("react.fragment"),aS=Symbol.for("react.strict_mode"),lS=Symbol.for("react.profiler"),uS=Symbol.for("react.provider"),cS=Symbol.for("react.context"),fS=Symbol.for("react.forward_ref"),dS=Symbol.for("react.suspense"),hS=Symbol.for("react.memo"),pS=Symbol.for("react.lazy"),Xp=Symbol.iterator;function mS(e){return e===null||typeof e!="object"?null:(e=Xp&&e[Xp]||e["@@iterator"],typeof e=="function"?e:null)}var R1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N1=Object.assign,j1={};function io(e,t,n){this.props=e,this.context=t,this.refs=j1,this.updater=n||R1}io.prototype.isReactComponent={};io.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};io.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function $1(){}$1.prototype=io.prototype;function Id(e,t,n){this.props=e,this.context=t,this.refs=j1,this.updater=n||R1}var Od=Id.prototype=new $1;Od.constructor=Id;N1(Od,io.prototype);Od.isPureReactComponent=!0;var Yp=Array.isArray,z1=Object.prototype.hasOwnProperty,Fd={current:null},V1={key:!0,ref:!0,__self:!0,__source:!0};function B1(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)z1.call(t,r)&&!V1.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,ae=$[Y];if(0>>1;Yi(rt,x))cei(ht,rt)?($[Y]=ht,$[ce]=x,Y=ce):($[Y]=rt,$[ke]=x,Y=ke);else if(cei(ht,x))$[Y]=ht,$[ce]=x,Y=ce;else break e}}return q}function i($,q){var x=$.sortIndex-q.sortIndex;return x!==0?x:$.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],f=1,c=null,d=3,h=!1,p=!1,v=!1,k=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y($){for(var q=n(u);q!==null;){if(q.callback===null)r(u);else if(q.startTime<=$)r(u),q.sortIndex=q.expirationTime,t(l,q);else break;q=n(u)}}function b($){if(v=!1,y($),!p)if(n(l)!==null)p=!0,ie(P);else{var q=n(u);q!==null&&oe(b,q.startTime-$)}}function P($,q){p=!1,v&&(v=!1,g(I),I=-1),h=!0;var x=d;try{for(y(q),c=n(l);c!==null&&(!(c.expirationTime>q)||$&&!z());){var Y=c.callback;if(typeof Y=="function"){c.callback=null,d=c.priorityLevel;var ae=Y(c.expirationTime<=q);q=e.unstable_now(),typeof ae=="function"?c.callback=ae:c===n(l)&&r(l),y(q)}else r(l);c=n(l)}if(c!==null)var S=!0;else{var ke=n(u);ke!==null&&oe(b,ke.startTime-q),S=!1}return S}finally{c=null,d=x,h=!1}}var T=!1,D=null,I=-1,j=5,E=-1;function z(){return!(e.unstable_now()-E$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function($){switch(d){case 1:case 2:case 3:var q=3;break;default:q=d}var x=d;d=q;try{return $()}finally{d=x}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,q){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var x=d;d=$;try{return q()}finally{d=x}},e.unstable_scheduleCallback=function($,q,x){var Y=e.unstable_now();switch(typeof x=="object"&&x!==null?(x=x.delay,x=typeof x=="number"&&0Y?($.sortIndex=x,t(u,$),n(l)===null&&$===n(u)&&(v?(g(I),I=-1):v=!0,oe(b,x-Y))):($.sortIndex=ae,t(l,$),p||h||(p=!0,ie(P))),$},e.unstable_shouldYield=z,e.unstable_wrapCallback=function($){var q=d;return function(){var x=d;d=q;try{return $.apply(this,arguments)}finally{d=x}}}})(G1);W1.exports=G1;var TS=W1.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var K1=A,zt=TS;function R(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jc=Object.prototype.hasOwnProperty,ES=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Jp={},em={};function PS(e){return Jc.call(em,e)?!0:Jc.call(Jp,e)?!1:ES.test(e)?em[e]=!0:(Jp[e]=!0,!1)}function AS(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function LS(e,t,n,r){if(t===null||typeof t>"u"||AS(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function xt(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var nt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){nt[e]=new xt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];nt[t]=new xt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){nt[e]=new xt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){nt[e]=new xt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){nt[e]=new xt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){nt[e]=new xt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){nt[e]=new xt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){nt[e]=new xt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){nt[e]=new xt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Nd=/[\-:]([a-z])/g;function jd(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Nd,jd);nt[t]=new xt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Nd,jd);nt[t]=new xt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Nd,jd);nt[t]=new xt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){nt[e]=new xt(e,1,!1,e.toLowerCase(),null,!1,!1)});nt.xlinkHref=new xt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){nt[e]=new xt(e,1,!1,e.toLowerCase(),null,!0,!0)});function $d(e,t,n,r){var i=nt.hasOwnProperty(t)?nt[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` +`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{zu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Io(e):""}function MS(e){switch(e.tag){case 5:return Io(e.type);case 16:return Io("Lazy");case 13:return Io("Suspense");case 19:return Io("SuspenseList");case 0:case 2:case 15:return e=Vu(e.type,!1),e;case 11:return e=Vu(e.type.render,!1),e;case 1:return e=Vu(e.type,!0),e;default:return""}}function rf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case bi:return"Fragment";case ki:return"Portal";case ef:return"Profiler";case zd:return"StrictMode";case tf:return"Suspense";case nf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case X1:return(e.displayName||"Context")+".Consumer";case Q1:return(e._context.displayName||"Context")+".Provider";case Vd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Bd:return t=e.displayName||null,t!==null?t:rf(e.type)||"Memo";case er:t=e._payload,e=e._init;try{return rf(e(t))}catch{}}return null}function DS(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return rf(t);case 8:return t===zd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function kr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Z1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function IS(e){var t=Z1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zs(e){e._valueTracker||(e._valueTracker=IS(e))}function J1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Z1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ha(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function of(e,t){var n=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function nm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=kr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ev(e,t){t=t.checked,t!=null&&$d(e,"checked",t,!1)}function sf(e,t){ev(e,t);var n=kr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?af(e,t.type,n):t.hasOwnProperty("defaultValue")&&af(e,t.type,kr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rm(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function af(e,t,n){(t!=="number"||Ha(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Oo=Array.isArray;function ji(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Js.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function is(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var $o={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},OS=["Webkit","ms","Moz","O"];Object.keys($o).forEach(function(e){OS.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$o[t]=$o[e]})});function iv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||$o.hasOwnProperty(e)&&$o[e]?(""+t).trim():t+"px"}function ov(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=iv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var FS=Le({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function cf(e,t){if(t){if(FS[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function ff(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var df=null;function Ud(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hf=null,$i=null,zi=null;function sm(e){if(e=Is(e)){if(typeof hf!="function")throw Error(R(280));var t=e.stateNode;t&&(t=Ql(t),hf(e.stateNode,e.type,t))}}function sv(e){$i?zi?zi.push(e):zi=[e]:$i=e}function av(){if($i){var e=$i,t=zi;if(zi=$i=null,sm(e),t)for(e=0;e>>=0,e===0?32:31-(GS(e)/KS|0)|0}var ea=64,ta=4194304;function Fo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function qa(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Fo(a):(o&=s,o!==0&&(r=Fo(o)))}else s=n&~i,s!==0?r=Fo(s):o!==0&&(r=Fo(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ms(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-fn(t),e[t]=n}function YS(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Vo),mm=" ",gm=!1;function Ev(e,t){switch(e){case"keyup":return _C.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Si=!1;function EC(e,t){switch(e){case"compositionend":return Pv(t);case"keypress":return t.which!==32?null:(gm=!0,mm);case"textInput":return e=t.data,e===mm&&gm?null:e;default:return null}}function PC(e,t){if(Si)return e==="compositionend"||!Yd&&Ev(e,t)?(e=_v(),Pa=qd=or=null,Si=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=xm(n)}}function Dv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Iv(){for(var e=window,t=Ha();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ha(e.document)}return t}function Zd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function NC(e){var t=Iv(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Dv(n.ownerDocument.documentElement,n)){if(r!==null&&Zd(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=km(n,o);var s=km(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ci=null,wf=null,Uo=null,xf=!1;function bm(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xf||Ci==null||Ci!==Ha(r)||(r=Ci,"selectionStart"in r&&Zd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Uo&&cs(Uo,r)||(Uo=r,r=Ya(wf,"onSelect"),0Ei||(e.current=Tf[Ei],Tf[Ei]=null,Ei--)}function we(e,t){Ei++,Tf[Ei]=e.current,e.current=t}var br={},ct=Tr(br),Tt=Tr(!1),Yr=br;function Ki(e,t){var n=e.type.contextTypes;if(!n)return br;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Et(e){return e=e.childContextTypes,e!=null}function Ja(){Ce(Tt),Ce(ct)}function Am(e,t,n){if(ct.current!==br)throw Error(R(168));we(ct,t),we(Tt,n)}function Bv(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(R(108,DS(e)||"Unknown",i));return Le({},n,r)}function el(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||br,Yr=ct.current,we(ct,e),we(Tt,Tt.current),!0}function Lm(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=Bv(e,t,Yr),r.__reactInternalMemoizedMergedChildContext=e,Ce(Tt),Ce(ct),we(ct,e)):Ce(Tt),we(Tt,n)}var Fn=null,Xl=!1,tc=!1;function Uv(e){Fn===null?Fn=[e]:Fn.push(e)}function QC(e){Xl=!0,Uv(e)}function Er(){if(!tc&&Fn!==null){tc=!0;var e=0,t=me;try{var n=Fn;for(me=1;e>=s,i-=s,Nn=1<<32-fn(t)+i|n<I?(j=D,D=null):j=D.sibling;var E=d(g,D,y[I],b);if(E===null){D===null&&(D=j);break}e&&D&&E.alternate===null&&t(g,D),m=o(E,m,I),T===null?P=E:T.sibling=E,T=E,D=j}if(I===y.length)return n(g,D),Te&&Rr(g,I),P;if(D===null){for(;II?(j=D,D=null):j=D.sibling;var z=d(g,D,E.value,b);if(z===null){D===null&&(D=j);break}e&&D&&z.alternate===null&&t(g,D),m=o(z,m,I),T===null?P=z:T.sibling=z,T=z,D=j}if(E.done)return n(g,D),Te&&Rr(g,I),P;if(D===null){for(;!E.done;I++,E=y.next())E=c(g,E.value,b),E!==null&&(m=o(E,m,I),T===null?P=E:T.sibling=E,T=E);return Te&&Rr(g,I),P}for(D=r(g,D);!E.done;I++,E=y.next())E=h(D,g,I,E.value,b),E!==null&&(e&&E.alternate!==null&&D.delete(E.key===null?I:E.key),m=o(E,m,I),T===null?P=E:T.sibling=E,T=E);return e&&D.forEach(function(F){return t(g,F)}),Te&&Rr(g,I),P}function k(g,m,y,b){if(typeof y=="object"&&y!==null&&y.type===bi&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ys:e:{for(var P=y.key,T=m;T!==null;){if(T.key===P){if(P=y.type,P===bi){if(T.tag===7){n(g,T.sibling),m=i(T,y.props.children),m.return=g,g=m;break e}}else if(T.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===er&&Nm(P)===T.type){n(g,T.sibling),m=i(T,y.props),m.ref=_o(g,T,y),m.return=g,g=m;break e}n(g,T);break}else t(g,T);T=T.sibling}y.type===bi?(m=Xr(y.props.children,g.mode,b,y.key),m.return=g,g=m):(b=Ra(y.type,y.key,y.props,null,g.mode,b),b.ref=_o(g,m,y),b.return=g,g=b)}return s(g);case ki:e:{for(T=y.key;m!==null;){if(m.key===T)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(g,m.sibling),m=i(m,y.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=uc(y,g.mode,b),m.return=g,g=m}return s(g);case er:return T=y._init,k(g,m,T(y._payload),b)}if(Oo(y))return p(g,m,y,b);if(xo(y))return v(g,m,y,b);la(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(g,m.sibling),m=i(m,y),m.return=g,g=m):(n(g,m),m=lc(y,g.mode,b),m.return=g,g=m),s(g)):n(g,m)}return k}var Qi=Yv(!0),Zv=Yv(!1),Os={},Sn=Tr(Os),ps=Tr(Os),ms=Tr(Os);function Gr(e){if(e===Os)throw Error(R(174));return e}function ah(e,t){switch(we(ms,t),we(ps,e),we(Sn,Os),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:uf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=uf(t,e)}Ce(Sn),we(Sn,t)}function Xi(){Ce(Sn),Ce(ps),Ce(ms)}function Jv(e){Gr(ms.current);var t=Gr(Sn.current),n=uf(t,e.type);t!==n&&(we(ps,e),we(Sn,n))}function lh(e){ps.current===e&&(Ce(Sn),Ce(ps))}var Ee=Tr(0);function sl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var nc=[];function uh(){for(var e=0;en?n:4,e(!0);var r=rc.transition;rc.transition={};try{e(!1),t()}finally{me=n,rc.transition=r}}function mw(){return nn().memoizedState}function JC(e,t,n){var r=mr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gw(e))yw(t,n);else if(n=Kv(e,t,n,r),n!==null){var i=vt();dn(n,e,r,i),vw(n,t,r)}}function e5(e,t,n){var r=mr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gw(e))yw(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,pn(a,s)){var l=t.interleaved;l===null?(i.next=i,oh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=Kv(e,t,i,r),n!==null&&(i=vt(),dn(n,e,r,i),vw(n,t,r))}}function gw(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function yw(e,t){Ho=al=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Wd(e,n)}}var ll={readContext:tn,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useInsertionEffect:st,useLayoutEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useMutableSource:st,useSyncExternalStore:st,useId:st,unstable_isNewReconciler:!1},t5={readContext:tn,useCallback:function(e,t){return gn().memoizedState=[e,t===void 0?null:t],e},useContext:tn,useEffect:$m,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Da(4194308,4,cw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Da(4194308,4,e,t)},useInsertionEffect:function(e,t){return Da(4,2,e,t)},useMemo:function(e,t){var n=gn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=JC.bind(null,Ae,e),[r.memoizedState,e]},useRef:function(e){var t=gn();return e={current:e},t.memoizedState=e},useState:jm,useDebugValue:ph,useDeferredValue:function(e){return gn().memoizedState=e},useTransition:function(){var e=jm(!1),t=e[0];return e=ZC.bind(null,e[1]),gn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ae,i=gn();if(Te){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),Xe===null)throw Error(R(349));Jr&30||nw(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,$m(iw.bind(null,r,o,e),[e]),r.flags|=2048,vs(9,rw.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=gn(),t=Xe.identifierPrefix;if(Te){var n=jn,r=Nn;n=(r&~(1<<32-fn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=gs++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[wn]=t,e[hs]=r,Ew(e,t,!1,!1),t.stateNode=e;e:{switch(s=ff(n,r),n){case"dialog":be("cancel",e),be("close",e),i=r;break;case"iframe":case"object":case"embed":be("load",e),i=r;break;case"video":case"audio":for(i=0;iZi&&(t.flags|=128,r=!0,To(o,!1),t.lanes=4194304)}else{if(!r)if(e=sl(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),To(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Te)return at(t),null}else 2*Fe()-o.renderingStartTime>Zi&&n!==1073741824&&(t.flags|=128,r=!0,To(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Fe(),t.sibling=null,n=Ee.current,we(Ee,r?n&1|2:n&1),t):(at(t),null);case 22:case 23:return xh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ot&1073741824&&(at(t),t.subtreeFlags&6&&(t.flags|=8192)):at(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function u5(e,t){switch(eh(t),t.tag){case 1:return Et(t.type)&&Ja(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xi(),Ce(Tt),Ce(ct),uh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return lh(t),null;case 13:if(Ce(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ce(Ee),null;case 4:return Xi(),null;case 10:return ih(t.type._context),null;case 22:case 23:return xh(),null;case 24:return null;default:return null}}var ca=!1,lt=!1,c5=typeof WeakSet=="function"?WeakSet:Set,K=null;function Mi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){De(e,t,r)}else n.current=null}function jf(e,t,n){try{n()}catch(r){De(e,t,r)}}var qm=!1;function f5(e,t){if(kf=Qa,e=Iv(),Zd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==n||i!==0&&c.nodeType!==3||(a=s+i),c!==o||r!==0&&c.nodeType!==3||(l=s+r),c.nodeType===3&&(s+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===n&&++u===i&&(a=s),d===o&&++f===r&&(l=s),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(bf={focusedElem:e,selectionRange:n},Qa=!1,K=t;K!==null;)if(t=K,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var v=p.memoizedProps,k=p.memoizedState,g=t.stateNode,m=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:sn(t.type,v),k);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(b){De(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return p=qm,qm=!1,p}function Wo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&jf(t,n,o)}i=i.next}while(i!==r)}}function Jl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function $f(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Lw(e){var t=e.alternate;t!==null&&(e.alternate=null,Lw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wn],delete t[hs],delete t[_f],delete t[KC],delete t[qC])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Mw(e){return e.tag===5||e.tag===3||e.tag===4}function Qm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Za));else if(r!==4&&(e=e.child,e!==null))for(zf(e,t,n),e=e.sibling;e!==null;)zf(e,t,n),e=e.sibling}function Vf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Vf(e,t,n),e=e.sibling;e!==null;)Vf(e,t,n),e=e.sibling}var Je=null,an=!1;function Yn(e,t,n){for(n=n.child;n!==null;)Dw(e,t,n),n=n.sibling}function Dw(e,t,n){if(bn&&typeof bn.onCommitFiberUnmount=="function")try{bn.onCommitFiberUnmount(Wl,n)}catch{}switch(n.tag){case 5:lt||Mi(n,t);case 6:var r=Je,i=an;Je=null,Yn(e,t,n),Je=r,an=i,Je!==null&&(an?(e=Je,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Je.removeChild(n.stateNode));break;case 18:Je!==null&&(an?(e=Je,n=n.stateNode,e.nodeType===8?ec(e.parentNode,n):e.nodeType===1&&ec(e,n),ls(e)):ec(Je,n.stateNode));break;case 4:r=Je,i=an,Je=n.stateNode.containerInfo,an=!0,Yn(e,t,n),Je=r,an=i;break;case 0:case 11:case 14:case 15:if(!lt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&jf(n,t,s),i=i.next}while(i!==r)}Yn(e,t,n);break;case 1:if(!lt&&(Mi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){De(n,t,a)}Yn(e,t,n);break;case 21:Yn(e,t,n);break;case 22:n.mode&1?(lt=(r=lt)||n.memoizedState!==null,Yn(e,t,n),lt=r):Yn(e,t,n);break;default:Yn(e,t,n)}}function Xm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new c5),t.forEach(function(r){var i=x5.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function on(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Fe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*h5(r/1960))-r,10e?16:e,sr===null)var r=!1;else{if(e=sr,sr=null,fl=0,de&6)throw Error(R(331));var i=de;for(de|=4,K=e.current;K!==null;){var o=K,s=o.child;if(K.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lFe()-vh?Qr(e,0):yh|=n),Pt(e,t)}function zw(e,t){t===0&&(e.mode&1?(t=ta,ta<<=1,!(ta&130023424)&&(ta=4194304)):t=1);var n=vt();e=Hn(e,t),e!==null&&(Ms(e,t,n),Pt(e,n))}function w5(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),zw(e,n)}function x5(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(R(314))}r!==null&&r.delete(t),zw(e,n)}var Vw;Vw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tt.current)_t=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _t=!1,a5(e,t,n);_t=!!(e.flags&131072)}else _t=!1,Te&&t.flags&1048576&&Hv(t,nl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ia(e,t),e=t.pendingProps;var i=Ki(t,ct.current);Bi(t,n),i=fh(null,t,r,e,i,n);var o=dh();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Et(r)?(o=!0,el(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,sh(t),i.updater=Yl,t.stateNode=i,i._reactInternals=t,Mf(t,r,e,n),t=Of(null,t,r,!0,o,n)):(t.tag=0,Te&&o&&Jd(t),mt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ia(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=b5(r),e=sn(r,e),i){case 0:t=If(null,t,r,e,n);break e;case 1:t=Wm(null,t,r,e,n);break e;case 11:t=Um(null,t,r,e,n);break e;case 14:t=Hm(null,t,r,sn(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),If(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),Wm(e,t,r,i,n);case 3:e:{if(Cw(t),e===null)throw Error(R(387));r=t.pendingProps,o=t.memoizedState,i=o.element,qv(e,t),ol(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Yi(Error(R(423)),t),t=Gm(e,t,r,n,i);break e}else if(r!==i){i=Yi(Error(R(424)),t),t=Gm(e,t,r,n,i);break e}else for(Rt=dr(t.stateNode.containerInfo.firstChild),jt=t,Te=!0,ln=null,n=Zv(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(qi(),r===i){t=Wn(e,t,n);break e}mt(e,t,r,n)}t=t.child}return t;case 5:return Jv(t),e===null&&Pf(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Sf(r,i)?s=null:o!==null&&Sf(r,o)&&(t.flags|=32),Sw(e,t),mt(e,t,s,n),t.child;case 6:return e===null&&Pf(t),null;case 13:return _w(e,t,n);case 4:return ah(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Qi(t,null,r,n):mt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),Um(e,t,r,i,n);case 7:return mt(e,t,t.pendingProps,n),t.child;case 8:return mt(e,t,t.pendingProps.children,n),t.child;case 12:return mt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,we(rl,r._currentValue),r._currentValue=s,o!==null)if(pn(o.value,s)){if(o.children===i.children&&!Tt.current){t=Wn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=zn(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Af(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(R(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Af(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}mt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Bi(t,n),i=tn(i),r=r(i),t.flags|=1,mt(e,t,r,n),t.child;case 14:return r=t.type,i=sn(r,t.pendingProps),i=sn(r.type,i),Hm(e,t,r,i,n);case 15:return kw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),Ia(e,t),t.tag=1,Et(r)?(e=!0,el(t)):e=!1,Bi(t,n),Xv(t,r,i),Mf(t,r,i,n),Of(null,t,r,!0,e,n);case 19:return Tw(e,t,n);case 22:return bw(e,t,n)}throw Error(R(156,t.tag))};function Bw(e,t){return pv(e,t)}function k5(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jt(e,t,n,r){return new k5(e,t,n,r)}function bh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function b5(e){if(typeof e=="function")return bh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vd)return 11;if(e===Bd)return 14}return 2}function gr(e,t){var n=e.alternate;return n===null?(n=Jt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ra(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")bh(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case bi:return Xr(n.children,i,o,t);case zd:s=8,i|=8;break;case ef:return e=Jt(12,n,t,i|2),e.elementType=ef,e.lanes=o,e;case tf:return e=Jt(13,n,t,i),e.elementType=tf,e.lanes=o,e;case nf:return e=Jt(19,n,t,i),e.elementType=nf,e.lanes=o,e;case Y1:return tu(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q1:s=10;break e;case X1:s=9;break e;case Vd:s=11;break e;case Bd:s=14;break e;case er:s=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=Jt(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Xr(e,t,n,r){return e=Jt(7,e,r,t),e.lanes=n,e}function tu(e,t,n,r){return e=Jt(22,e,r,t),e.elementType=Y1,e.lanes=n,e.stateNode={isHidden:!1},e}function lc(e,t,n){return e=Jt(6,e,null,t),e.lanes=n,e}function uc(e,t,n){return t=Jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function S5(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Uu(0),this.expirationTimes=Uu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Uu(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Sh(e,t,n,r,i,o,s,a,l){return e=new S5(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Jt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},sh(o),e}function C5(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Gw)}catch(e){console.error(e)}}Gw(),H1.exports=Ht;var Kw=H1.exports;const A5=En(Kw);var ig=Kw;Zc.createRoot=ig.createRoot,Zc.hydrateRoot=ig.hydrateRoot;const L5=!!(window!=null&&window.showOpenFilePicker);async function M5(){const[e]=await window.showOpenFilePicker();return e}async function D5(e,t){const n=await e.createWritable();await n.write(t),n.close()}async function I5(e){const t=await window.showSaveFilePicker(),n=await t.createWritable();return await n.write(e),await n.close(),t}const qw=he.createContext(null);function O5(e){const{children:t}=e,[n,r]=A.useState(null),i=A.useMemo(()=>({isFileSystemSupported:L5,fileHandle:n,setFileHandle:r}),[n]);return w.jsx(qw.Provider,{value:i,children:t})}function su(){const e=A.useContext(qw);if(!e)throw new Error("ContextProvider not found");return e}var Qw={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},og=he.createContext&&he.createContext(Qw),yr=function(){return yr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n4&&n.slice(0,4)==="data"&&p_.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(ug,v_);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!ug.test(o)){let s=o.replace(m_,y_);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Eh}return new i(r,t)}function y_(e){return"-"+e.toLowerCase()}function v_(e){return e.charAt(1).toUpperCase()}const w_={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},x_=Zw([tx,ex,ix,ox,d_],"html"),Ph=Zw([tx,ex,ix,ox,h_],"svg");function k_(e){return e.join(" ").trim()}var sx={},cg=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,b_=/\n/g,S_=/^\s*/,C_=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,__=/^:\s*/,T_=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,E_=/^[;\s]*/,P_=/^\s+|\s+$/g,A_=` +`,fg="/",dg="*",Ur="",L_="comment",M_="declaration",D_=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(p){var v=p.match(b_);v&&(n+=v.length);var k=p.lastIndexOf(A_);r=~k?p.length-k:r+p.length}function o(){var p={line:n,column:r};return function(v){return v.position=new s(p),u(),v}}function s(p){this.start=p,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function a(p){var v=new Error(t.source+":"+n+":"+r+": "+p);if(v.reason=p,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function l(p){var v=p.exec(e);if(v){var k=v[0];return i(k),e=e.slice(k.length),v}}function u(){l(S_)}function f(p){var v;for(p=p||[];v=c();)v!==!1&&p.push(v);return p}function c(){var p=o();if(!(fg!=e.charAt(0)||dg!=e.charAt(1))){for(var v=2;Ur!=e.charAt(v)&&(dg!=e.charAt(v)||fg!=e.charAt(v+1));)++v;if(v+=2,Ur===e.charAt(v-1))return a("End of comment missing");var k=e.slice(2,v-2);return r+=2,i(k),e=e.slice(v),r+=2,p({type:L_,comment:k})}}function d(){var p=o(),v=l(C_);if(v){if(c(),!l(__))return a("property missing ':'");var k=l(T_),g=p({type:M_,property:hg(v[0].replace(cg,Ur)),value:k?hg(k[0].replace(cg,Ur)):Ur});return l(E_),g}}function h(){var p=[];f(p);for(var v;v=d();)v!==!1&&(p.push(v),f(p));return p}return u(),h()};function hg(e){return e?e.replace(P_,Ur):Ur}var I_=xi&&xi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sx,"__esModule",{value:!0});var O_=I_(D_);function F_(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,O_.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var s=o.property,a=o.value;i?t(s,a,o):a&&(n=n||{},n[s]=a)}}),n}var pg=sx.default=F_;const R_=pg.default||pg,ax=lx("end"),Ah=lx("start");function lx(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function N_(e){const t=Ah(e),n=ax(e);if(t&&n)return{start:t,end:n}}function qo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?mg(e.position):"start"in e||"end"in e?mg(e):"line"in e||"column"in e?Qf(e):""}function Qf(e){return gg(e&&e.line)+":"+gg(e&&e.column)}function mg(e){return Qf(e&&e.start)+"-"+Qf(e&&e.end)}function gg(e){return e&&typeof e=="number"?e:1}class dt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=qo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}dt.prototype.file="";dt.prototype.name="";dt.prototype.reason="";dt.prototype.message="";dt.prototype.stack="";dt.prototype.column=void 0;dt.prototype.line=void 0;dt.prototype.ancestors=void 0;dt.prototype.cause=void 0;dt.prototype.fatal=void 0;dt.prototype.place=void 0;dt.prototype.ruleId=void 0;dt.prototype.source=void 0;const Lh={}.hasOwnProperty,j_=new Map,$_=/[A-Z]/g,z_=/-([a-z])/g,V_=new Set(["table","tbody","thead","tfoot","tr"]),B_=new Set(["td","th"]),ux="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function U_(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Y_(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=X_(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ph:x_,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=cx(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function cx(e,t,n){if(t.type==="element")return H_(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return W_(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return K_(e,t,n);if(t.type==="mdxjsEsm")return G_(e,t);if(t.type==="root")return q_(e,t,n);if(t.type==="text")return Q_(e,t)}function H_(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ph,e.schema=i),e.ancestors.push(t);const o=dx(e,t.tagName,!1),s=Z_(e,t);let a=Dh(e,t);return V_.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!u_(l):!0})),fx(e,s,o,t),Mh(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function W_(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}xs(e,t.position)}function G_(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xs(e,t.position)}function K_(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ph,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:dx(e,t.name,!0),s=J_(e,t),a=Dh(e,t);return fx(e,s,o,t),Mh(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function q_(e,t,n){const r={};return Mh(r,Dh(e,t)),e.create(t,e.Fragment,r,n)}function Q_(e,t){return t.value}function fx(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Mh(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function X_(e,t,n){return r;function r(i,o,s,a){const u=Array.isArray(s.children)?n:t;return a?u(o,s,a):u(o,s)}}function Y_(e,t){return n;function n(r,i,o,s){const a=Array.isArray(o.children),l=Ah(r);return t(i,o,s,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Z_(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Lh.call(t.properties,i)){const o=e3(e,i,t.properties[i]);if(o){const[s,a]=o;e.tableCellAlignToStyle&&s==="align"&&typeof a=="string"&&B_.has(t.tagName)?r=a:n[s]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function J_(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const a=s.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else xs(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else xs(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Dh(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:j_;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o0?($t(e,e.length,0,t),e):t}const wg={}.hasOwnProperty;function px(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function hn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const c3=Pr(new RegExp("\\p{P}","u")),yt=Pr(/[A-Za-z]/),ut=Pr(/[\dA-Za-z]/),f3=Pr(/[#-'*+\--9=?A-Z^-~]/);function pl(e){return e!==null&&(e<32||e===127)}const Xf=Pr(/\d/),d3=Pr(/[\dA-Fa-f]/),gx=Pr(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<-2}function ge(e){return e!==null&&(e<0||e===32)}function le(e){return e===-2||e===-1||e===32}function au(e){return gx(e)||c3(e)}const ni=Pr(/\s/);function Pr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function lo(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function fe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(l){return le(l)?(e.enter(n),a(l)):t(l)}function a(l){return le(l)&&o++s))return;const D=t.events.length;let I=D,j,E;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(j){E=t.events[I][1].end;break}j=!0}for(g(r),T=D;Ty;){const P=n[b];t.containerState=P[1],P[0].exit.call(t,e)}n.length=y}function m(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function y3(e,t,n){return fe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ml(e){if(e===null||ge(e)||ni(e))return 1;if(au(e))return 2}function lu(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c=Object.assign({},e[r][1].end),d=Object.assign({},e[n][1].start);kg(c,-l),kg(d,l),s={type:l>1?"strongSequence":"emphasisSequence",start:c,end:Object.assign({},e[r][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:d},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},a.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Zt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Zt(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=Zt(u,lu(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Zt(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=Zt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,$t(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n0&&le(T)?fe(e,m,"linePrefix",o+1)(T):m(T)}function m(T){return T===null||J(T)?e.check(bg,v,b)(T):(e.enter("codeFlowValue"),y(T))}function y(T){return T===null||J(T)?(e.exit("codeFlowValue"),m(T)):(e.consume(T),y)}function b(T){return e.exit("codeFenced"),t(T)}function P(T,D,I){let j=0;return E;function E(B){return T.enter("lineEnding"),T.consume(B),T.exit("lineEnding"),z}function z(B){return T.enter("codeFencedFence"),le(B)?fe(T,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):F(B)}function F(B){return B===a?(T.enter("codeFencedFenceSequence"),U(B)):I(B)}function U(B){return B===a?(j++,T.consume(B),U):j>=s?(T.exit("codeFencedFenceSequence"),le(B)?fe(T,H,"whitespace")(B):H(B)):I(B)}function H(B){return B===null||J(B)?(T.exit("codeFencedFence"),D(B)):I(B)}}}function A3(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const dc={name:"codeIndented",tokenize:M3},L3={tokenize:D3,partial:!0};function M3(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),fe(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?l(u):J(u)?e.attempt(L3,s,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||J(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function D3(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):J(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):fe(e,o,"linePrefix",5)(s)}function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):J(s)?i(s):n(s)}}const I3={name:"codeText",tokenize:R3,resolve:O3,previous:F3};function O3(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function kx(e,t,n,r,i,o,s,a,l){const u=l||Number.POSITIVE_INFINITY;let f=0;return c;function c(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),d):g===null||g===32||g===41||pl(g)?n(g):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),v(g))}function d(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===62?(e.exit("chunkString"),e.exit(a),d(g)):g===null||g===60||J(g)?n(g):(e.consume(g),g===92?p:h)}function p(g){return g===60||g===62||g===92?(e.consume(g),h):h(g)}function v(g){return!f&&(g===null||g===41||ge(g))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(g)):f999||h===null||h===91||h===93&&!l||h===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):J(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||J(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),l||(l=!le(h)),h===92?d:c)}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function Sx(e,t,n,r,i,o){let s;return a;function a(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),s=d===40?41:d,l):n(d)}function l(d){return d===s?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(o),u(d))}function u(d){return d===s?(e.exit(o),l(s)):d===null?n(d):J(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),fe(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===s||d===null||J(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?c:f)}function c(d){return d===s||d===92?(e.consume(d),f):f(d)}}function Qo(e,t){let n;return r;function r(i){return J(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):le(i)?fe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const U3={name:"definition",tokenize:W3},H3={tokenize:G3,partial:!0};function W3(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),s(h)}function s(h){return bx.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=hn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return ge(h)?Qo(e,u)(h):u(h)}function u(h){return kx(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(H3,c,c)(h)}function c(h){return le(h)?fe(e,d,"whitespace")(h):d(h)}function d(h){return h===null||J(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function G3(e,t,n){return r;function r(a){return ge(a)?Qo(e,i)(a):n(a)}function i(a){return Sx(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return le(a)?fe(e,s,"whitespace")(a):s(a)}function s(a){return a===null||J(a)?t(a):n(a)}}const K3={name:"hardBreakEscape",tokenize:q3};function q3(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return J(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Q3={name:"headingAtx",tokenize:Y3,resolve:X3};function X3(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},$t(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Y3(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||ge(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||J(f)?(e.exit("atxHeading"),t(f)):le(f)?fe(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||ge(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const Z3=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Cg=["pre","script","style","textarea"],J3={name:"htmlFlow",tokenize:r4,resolveTo:n4,concrete:!0},e4={tokenize:o4,partial:!0},t4={tokenize:i4,partial:!0};function n4(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function r4(e,t,n){const r=this;let i,o,s,a,l;return u;function u(S){return f(S)}function f(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),c}function c(S){return S===33?(e.consume(S),d):S===47?(e.consume(S),o=!0,v):S===63?(e.consume(S),i=3,r.interrupt?t:x):yt(S)?(e.consume(S),s=String.fromCharCode(S),k):n(S)}function d(S){return S===45?(e.consume(S),i=2,h):S===91?(e.consume(S),i=5,a=0,p):yt(S)?(e.consume(S),i=4,r.interrupt?t:x):n(S)}function h(S){return S===45?(e.consume(S),r.interrupt?t:x):n(S)}function p(S){const ke="CDATA[";return S===ke.charCodeAt(a++)?(e.consume(S),a===ke.length?r.interrupt?t:F:p):n(S)}function v(S){return yt(S)?(e.consume(S),s=String.fromCharCode(S),k):n(S)}function k(S){if(S===null||S===47||S===62||ge(S)){const ke=S===47,rt=s.toLowerCase();return!ke&&!o&&Cg.includes(rt)?(i=1,r.interrupt?t(S):F(S)):Z3.includes(s.toLowerCase())?(i=6,ke?(e.consume(S),g):r.interrupt?t(S):F(S)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(S):o?m(S):y(S))}return S===45||ut(S)?(e.consume(S),s+=String.fromCharCode(S),k):n(S)}function g(S){return S===62?(e.consume(S),r.interrupt?t:F):n(S)}function m(S){return le(S)?(e.consume(S),m):E(S)}function y(S){return S===47?(e.consume(S),E):S===58||S===95||yt(S)?(e.consume(S),b):le(S)?(e.consume(S),y):E(S)}function b(S){return S===45||S===46||S===58||S===95||ut(S)?(e.consume(S),b):P(S)}function P(S){return S===61?(e.consume(S),T):le(S)?(e.consume(S),P):y(S)}function T(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),l=S,D):le(S)?(e.consume(S),T):I(S)}function D(S){return S===l?(e.consume(S),l=null,j):S===null||J(S)?n(S):(e.consume(S),D)}function I(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||ge(S)?P(S):(e.consume(S),I)}function j(S){return S===47||S===62||le(S)?y(S):n(S)}function E(S){return S===62?(e.consume(S),z):n(S)}function z(S){return S===null||J(S)?F(S):le(S)?(e.consume(S),z):n(S)}function F(S){return S===45&&i===2?(e.consume(S),ie):S===60&&i===1?(e.consume(S),oe):S===62&&i===4?(e.consume(S),Y):S===63&&i===3?(e.consume(S),x):S===93&&i===5?(e.consume(S),q):J(S)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(e4,ae,U)(S)):S===null||J(S)?(e.exit("htmlFlowData"),U(S)):(e.consume(S),F)}function U(S){return e.check(t4,H,ae)(S)}function H(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),B}function B(S){return S===null||J(S)?U(S):(e.enter("htmlFlowData"),F(S))}function ie(S){return S===45?(e.consume(S),x):F(S)}function oe(S){return S===47?(e.consume(S),s="",$):F(S)}function $(S){if(S===62){const ke=s.toLowerCase();return Cg.includes(ke)?(e.consume(S),Y):F(S)}return yt(S)&&s.length<8?(e.consume(S),s+=String.fromCharCode(S),$):F(S)}function q(S){return S===93?(e.consume(S),x):F(S)}function x(S){return S===62?(e.consume(S),Y):S===45&&i===2?(e.consume(S),x):F(S)}function Y(S){return S===null||J(S)?(e.exit("htmlFlowData"),ae(S)):(e.consume(S),Y)}function ae(S){return e.exit("htmlFlow"),t(S)}}function i4(e,t,n){const r=this;return i;function i(s){return J(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function o4(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Rs,t,n)}}const s4={name:"htmlText",tokenize:a4};function a4(e,t,n){const r=this;let i,o,s;return a;function a(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),l}function l(x){return x===33?(e.consume(x),u):x===47?(e.consume(x),P):x===63?(e.consume(x),y):yt(x)?(e.consume(x),I):n(x)}function u(x){return x===45?(e.consume(x),f):x===91?(e.consume(x),o=0,p):yt(x)?(e.consume(x),m):n(x)}function f(x){return x===45?(e.consume(x),h):n(x)}function c(x){return x===null?n(x):x===45?(e.consume(x),d):J(x)?(s=c,oe(x)):(e.consume(x),c)}function d(x){return x===45?(e.consume(x),h):c(x)}function h(x){return x===62?ie(x):x===45?d(x):c(x)}function p(x){const Y="CDATA[";return x===Y.charCodeAt(o++)?(e.consume(x),o===Y.length?v:p):n(x)}function v(x){return x===null?n(x):x===93?(e.consume(x),k):J(x)?(s=v,oe(x)):(e.consume(x),v)}function k(x){return x===93?(e.consume(x),g):v(x)}function g(x){return x===62?ie(x):x===93?(e.consume(x),g):v(x)}function m(x){return x===null||x===62?ie(x):J(x)?(s=m,oe(x)):(e.consume(x),m)}function y(x){return x===null?n(x):x===63?(e.consume(x),b):J(x)?(s=y,oe(x)):(e.consume(x),y)}function b(x){return x===62?ie(x):y(x)}function P(x){return yt(x)?(e.consume(x),T):n(x)}function T(x){return x===45||ut(x)?(e.consume(x),T):D(x)}function D(x){return J(x)?(s=D,oe(x)):le(x)?(e.consume(x),D):ie(x)}function I(x){return x===45||ut(x)?(e.consume(x),I):x===47||x===62||ge(x)?j(x):n(x)}function j(x){return x===47?(e.consume(x),ie):x===58||x===95||yt(x)?(e.consume(x),E):J(x)?(s=j,oe(x)):le(x)?(e.consume(x),j):ie(x)}function E(x){return x===45||x===46||x===58||x===95||ut(x)?(e.consume(x),E):z(x)}function z(x){return x===61?(e.consume(x),F):J(x)?(s=z,oe(x)):le(x)?(e.consume(x),z):j(x)}function F(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,U):J(x)?(s=F,oe(x)):le(x)?(e.consume(x),F):(e.consume(x),H)}function U(x){return x===i?(e.consume(x),i=void 0,B):x===null?n(x):J(x)?(s=U,oe(x)):(e.consume(x),U)}function H(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||ge(x)?j(x):(e.consume(x),H)}function B(x){return x===47||x===62||ge(x)?j(x):n(x)}function ie(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function oe(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),$}function $(x){return le(x)?fe(e,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):q(x)}function q(x){return e.enter("htmlTextData"),s(x)}}const Fh={name:"labelEnd",tokenize:h4,resolveTo:d4,resolveAll:f4},l4={tokenize:p4},u4={tokenize:m4},c4={tokenize:g4};function f4(e){let t=-1;for(;++t=3&&(u===null||J(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),le(u)?fe(e,a,"whitespace")(u):a(u))}}const St={name:"list",tokenize:_4,continuation:{tokenize:T4},exit:P4},S4={tokenize:A4,partial:!0},C4={tokenize:E4,partial:!0};function _4(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(h){const p=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Xf(h)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Na,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return Xf(h)&&++s<10?(e.consume(h),l):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Rs,r.interrupt?n:f,e.attempt(S4,d,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,d(h)}function c(h){return le(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),d):n(h)}function d(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function T4(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Rs,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,fe(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!le(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(C4,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,fe(e,e.attempt(St,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function E4(e,t,n){const r=this;return fe(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function P4(e){e.exit(this.containerState.type)}function A4(e,t,n){const r=this;return fe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!le(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const _g={name:"setextUnderline",tokenize:M4,resolveTo:L4};function L4(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function M4(e,t,n){const r=this;let i;return o;function o(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),le(u)?fe(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||J(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const D4={tokenize:I4};function I4(e){const t=this,n=e.attempt(Rs,r,e.attempt(this.parser.constructs.flowInitial,i,fe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(j3,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const O4={resolveAll:_x()},F4=Cx("string"),R4=Cx("text");function Cx(e){return{tokenize:t,resolveAll:_x(e==="text"?N4:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,a);return s;function s(f){return u(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),l}function l(f){return u(f)?(n.exit("data"),o(f)):(n.consume(f),l)}function u(f){if(f===null)return!0;const c=i[f];let d=-1;if(c)for(;++d-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function z4(e,t){let n=-1;const r=[];let i;for(;++n0){const We=W.tokenStack[W.tokenStack.length-1];(We[1]||Eg).call(W,void 0,We[0])}for(M.position={start:Zn(C.length>0?C[0][1].start:{line:1,column:1,offset:0}),end:Zn(C.length>0?C[C.length-2][1].end:{line:1,column:1,offset:0})},se=-1;++se1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function hT(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pT(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Px(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function mT(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Px(e,t);const i={src:lo(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function gT(e,t){const n={src:lo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function yT(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function vT(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Px(e,t);const i={href:lo(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function wT(e,t){const n={href:lo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function xT(e,t,n){const r=e.all(t),i=n?kT(n):Ax(t),o={},s=[];if(typeof t.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a1}function bT(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Ah(t.children[1]),l=ax(t.children[t.children.length-1]);a&&l&&(s.position={start:a,end:l}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function ET(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:t.children.length;let l=-1;const u=[];for(;++l0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Lg(t.slice(i),i>0,!1)),o.join("")}function Lg(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Pg||o===Ag;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Pg||o===Ag;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function LT(e,t){const n={type:"text",value:AT(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function MT(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const DT={blockquote:aT,break:lT,code:uT,delete:cT,emphasis:fT,footnoteReference:dT,heading:hT,html:pT,imageReference:mT,image:gT,inlineCode:yT,linkReference:vT,link:wT,listItem:xT,list:bT,paragraph:ST,root:CT,strong:_T,table:TT,tableCell:PT,tableRow:ET,text:LT,thematicBreak:MT,toml:ha,yaml:ha,definition:ha,footnoteDefinition:ha};function ha(){}const Lx=-1,uu=0,gl=1,yl=2,Rh=3,Nh=4,jh=5,$h=6,Mx=7,Dx=8,Mg=typeof self=="object"?self:globalThis,IT=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case uu:case Lx:return n(s,i);case gl:{const a=n([],i);for(const l of s)a.push(r(l));return a}case yl:{const a=n({},i);for(const[l,u]of s)a[r(l)]=r(u);return a}case Rh:return n(new Date(s),i);case Nh:{const{source:a,flags:l}=s;return n(new RegExp(a,l),i)}case jh:{const a=n(new Map,i);for(const[l,u]of s)a.set(r(l),r(u));return a}case $h:{const a=n(new Set,i);for(const l of s)a.add(r(l));return a}case Mx:{const{name:a,message:l}=s;return n(new Mg[a](l),i)}case Dx:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new Mg[o](s),i)};return r},Dg=e=>IT(new Map,e)(0),pi="",{toString:OT}={},{keys:FT}=Object,Po=e=>{const t=typeof e;if(t!=="object"||!e)return[uu,t];const n=OT.call(e).slice(8,-1);switch(n){case"Array":return[gl,pi];case"Object":return[yl,pi];case"Date":return[Rh,pi];case"RegExp":return[Nh,pi];case"Map":return[jh,pi];case"Set":return[$h,pi]}return n.includes("Array")?[gl,n]:n.includes("Error")?[Mx,n]:[yl,n]},pa=([e,t])=>e===uu&&(t==="function"||t==="symbol"),RT=(e,t,n,r)=>{const i=(s,a)=>{const l=r.push(s)-1;return n.set(a,l),l},o=s=>{if(n.has(s))return n.get(s);let[a,l]=Po(s);switch(a){case uu:{let f=s;switch(l){case"bigint":a=Dx,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);f=null;break;case"undefined":return i([Lx],s)}return i([a,f],s)}case gl:{if(l)return i([l,[...s]],s);const f=[],c=i([a,f],s);for(const d of s)f.push(o(d));return c}case yl:{if(l)switch(l){case"BigInt":return i([l,s.toString()],s);case"Boolean":case"Number":case"String":return i([l,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const f=[],c=i([a,f],s);for(const d of FT(s))(e||!pa(Po(s[d])))&&f.push([o(d),o(s[d])]);return c}case Rh:return i([a,s.toISOString()],s);case Nh:{const{source:f,flags:c}=s;return i([a,{source:f,flags:c}],s)}case jh:{const f=[],c=i([a,f],s);for(const[d,h]of s)(e||!(pa(Po(d))||pa(Po(h))))&&f.push([o(d),o(h)]);return c}case $h:{const f=[],c=i([a,f],s);for(const d of s)(e||!pa(Po(d)))&&f.push(o(d));return c}}const{message:u}=s;return i([a,{name:l,message:u}],s)};return o},Ig=(e,{json:t,lossy:n}={})=>{const r=[];return RT(!(t||n),!!t,new Map,r)(e),r},vl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Dg(Ig(e,t)):structuredClone(e):(e,t)=>Dg(Ig(e,t));function NT(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function jT(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function $T(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||NT,r=e.options.footnoteBackLabel||jT,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l0&&p.push({type:"text",value:" "});let m=typeof n=="string"?n:n(l,h);typeof m=="string"&&(m={type:"text",value:m}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,h),className:["data-footnote-backref"]},children:Array.isArray(m)?m:[m]})}const k=f[f.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const m=k.children[k.children.length-1];m&&m.type==="text"?m.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...p)}else f.push(...p);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(f,!0)};e.patch(u,g),a.push(g)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...vl(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:` +`}]}}const cu=function(e){if(e==null)return UT;if(typeof e=="function")return fu(e);if(typeof e=="object")return Array.isArray(e)?zT(e):VT(e);if(typeof e=="string")return BT(e);throw new Error("Expected function, string, or object as test")};function zT(e){const t=[];let n=-1;for(;++n":""))+")"})}return d;function d(){let h=Ix,p,v,k;if((!t||o(l,u,f[f.length-1]||void 0))&&(h=KT(n(l,f)),h[0]===Zf))return h;if("children"in l&&l.children){const g=l;if(g.children&&h[0]!==GT)for(v=(r?g.children.length:-1)+s,k=f.concat(g);v>-1&&v0&&n.push({type:"text",value:` +`}),n}function Og(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Fg(e,t){const n=QT(e,t),r=n.one(e,void 0),i=$T(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:` +`},i),o}function eE(e,t){return e&&"run"in e?async function(n,r){const i=Fg(n,t);await e.run(i,r)}:function(n){return Fg(n,t||e)}}function Rg(e){if(e)throw e}var ja=Object.prototype.hasOwnProperty,Fx=Object.prototype.toString,Ng=Object.defineProperty,jg=Object.getOwnPropertyDescriptor,$g=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Fx.call(t)==="[object Array]"},zg=function(t){if(!t||Fx.call(t)!=="[object Object]")return!1;var n=ja.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ja.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ja.call(t,i)},Vg=function(t,n){Ng&&n.name==="__proto__"?Ng(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Bg=function(t,n){if(n==="__proto__")if(ja.call(t,n)){if(jg)return jg(t,n).value}else return;return t[n]},tE=function e(){var t,n,r,i,o,s,a=arguments[0],l=1,u=arguments.length,f=!1;for(typeof a=="boolean"&&(f=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});ls.length;let l;a&&s.push(i);try{l=e.apply(this,s)}catch(u){const f=u;if(a&&n)throw f;return i(f)}a||(l instanceof Promise?l.then(o,i):l instanceof Error?i(l):o(l))}function i(s,...a){n||(n=!0,t(s,...a))}function o(s){i(null,s)}}const yn={basename:iE,dirname:oE,extname:sE,join:aE,sep:"/"};function iE(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ns(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function oE(e){if(Ns(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function sE(e){Ns(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const a=e.codePointAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function aE(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function uE(e,t){let n="",r=0,i=-1,o=0,s=-1,a,l;for(;++s<=e.length;){if(s2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else a===46&&o>-1?o++:o=-1}return n}function Ns(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const cE={cwd:fE};function fE(){return"/"}function td(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function dE(e){if(typeof e=="string")e=new URL(e);else if(!td(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return hE(e)}function hE(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[h,...p]=f;const v=r[d][1];ed(v)&&ed(h)&&(h=pc(!0,v,h)),r[d]=[u,h,...p]}}}}const yE=new Vh().freeze();function vc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function wc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function xc(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Hg(e){if(!ed(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Wg(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ma(e){return vE(e)?e:new Rx(e)}function vE(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function wE(e){return typeof e=="string"||xE(e)}function xE(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const kE="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Gg=[],Kg={allowDangerousHtml:!0},bE=/^(https?|ircs?|mailto|xmpp)$/i,SE=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function CE(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,s=e.disallowedElements,a=e.rehypePlugins||Gg,l=e.remarkPlugins||Gg,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Kg}:Kg,f=e.skipHtml,c=e.unwrapDisallowed,d=e.urlTransform||_E,h=yE().use(sT).use(l).use(eE,u).use(a),p=new Rx;typeof r=="string"&&(p.value=r);for(const m of SE)Object.hasOwn(e,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+kE+m.id,void 0);const v=h.parse(p);let k=h.runSync(v,p);return i&&(k={type:"element",tagName:"div",properties:{className:i},children:k.type==="root"?k.children:[k]}),zh(k,g),U_(k,{Fragment:w.Fragment,components:o,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function g(m,y,b){if(m.type==="raw"&&b&&typeof y=="number")return f?b.children.splice(y,1):b.children[y]={type:"text",value:m.value},y;if(m.type==="element"){let P;for(P in fc)if(Object.hasOwn(fc,P)&&Object.hasOwn(m.properties,P)){const T=m.properties[P],D=fc[P];(D===null||D.includes(m.tagName))&&(m.properties[P]=d(String(T||""),P,m))}}if(m.type==="element"){let P=t?!t.includes(m.tagName):s?s.includes(m.tagName):!1;if(!P&&n&&typeof y=="number"&&(P=!n(m,y,b)),P&&b&&typeof y=="number")return c&&m.children?b.children.splice(y,1,...m.children):b.children.splice(y,1),y}}}function _E(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||bE.test(e.slice(0,t))?e:""}function qg(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function TE(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function EE(e,t,n){const i=cu((n||{}).ignore||[]),o=PE(t);let s=-1;for(;++s0?{type:"text",value:T}:void 0),T===!1?d.lastIndex=b+1:(p!==b&&m.push({type:"text",value:u.value.slice(p,b)}),Array.isArray(T)?m.push(...T):T&&m.push(T),p=b+y[0].length,g=!0),!d.global)break;y=d.exec(u.value)}return g?(p?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=qg(e,"(");let o=qg(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function Nx(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ni(n)||au(n))&&(!t||n!==47)}jx.peek=JE;function UE(){return{enter:{gfmFootnoteDefinition:WE,gfmFootnoteDefinitionLabelString:GE,gfmFootnoteCall:QE,gfmFootnoteCallString:XE},exit:{gfmFootnoteDefinition:qE,gfmFootnoteDefinitionLabelString:KE,gfmFootnoteCall:ZE,gfmFootnoteCallString:YE}}}function HE(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:eP,footnoteReference:jx}}}function WE(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function GE(){this.buffer()}function KE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=hn(this.sliceSerialize(e)).toLowerCase()}function qE(e){this.exit(e)}function QE(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function XE(){this.buffer()}function YE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=hn(this.sliceSerialize(e)).toLowerCase()}function ZE(e){this.exit(e)}function jx(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),a(),s(),o+=i.move("]"),o}function JE(){return"["}function eP(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteDefinition"),a=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),a(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),tP)),s(),o}function tP(e,t,n){return t===0?e:(n?"":" ")+e}const nP=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];$x.peek=aP;function rP(){return{canContainEols:["delete"],enter:{strikethrough:oP},exit:{strikethrough:sP}}}function iP(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:nP}],handlers:{delete:$x}}}function oP(e){this.enter({type:"delete",children:[]},e)}function sP(e){this.exit(e)}function $x(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function aP(){return"~"}function lP(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||cP,i=[],o=[],s=[],a=[];let l=0,u=-1;for(;++ul&&(l=e[u].length);++ka[k])&&(a[k]=m)}p.push(g)}o[u]=p,s[u]=v}let f=-1;if(typeof n=="object"&&"length"in n)for(;++fa[f]&&(a[f]=g),d[f]=g),c[f]=m}o.splice(1,0,c),s.splice(1,0,d),u=-1;const h=[];for(;++u "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),dP);return i(),s}function dP(e,t,n){return">"+(n?"":" ")+e}function hP(e,t){return Xg(e,t.inConstruct,!0)&&!Xg(e,t.notInConstruct,!1)}function Xg(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++rs&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function mP(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function gP(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function yP(e,t,n,r){const i=gP(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(mP(e,n)){const c=n.enter("codeIndented"),d=n.indentLines(o,vP);return c(),d}const a=n.createTracker(r),l=i.repeat(Math.max(pP(o,i)+1,3)),u=n.enter("codeFenced");let f=a.move(l);if(e.lang){const c=n.enter(`codeFencedLang${s}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${s}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:` +`,encode:["`"],...a.current()})),c()}return f+=a.move(` +`),o&&(f+=a.move(o+` +`)),f+=a.move(l),u(),f}function vP(e,t,n){return(n?"":" ")+e}function Bh(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function wP(e,t,n,r){const i=Bh(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":` +`,...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),a()),s(),u}function xP(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}zx.peek=kP;function zx(e,t,n,r){const i=xP(n),o=n.enter("emphasis"),s=n.createTracker(r);let a=s.move(i);return a+=s.move(n.containerPhrasing(e,{before:a,after:i,...s.current()})),a+=s.move(i),o(),a}function kP(e,t,n){return n.options.emphasis||"*"}function bP(e,t){let n=!1;return zh(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Zf}),!!((!e.depth||e.depth<3)&&Ih(e)&&(t.options.setext||n))}function SP(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(bP(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),d=n.containerPhrasing(e,{...o.current(),before:` +`,after:` +`});return c(),f(),d+` +`+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(` +`))+1))}const s="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:` +`,...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),l(),a(),u}Vx.peek=CP;function Vx(e){return e.value||""}function CP(){return"<"}Bx.peek=_P;function Bx(e,t,n,r){const i=Bh(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),a()),u+=l.move(")"),s(),u}function _P(){return"!"}Ux.peek=TP;function Ux(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("![");const u=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const c=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=f,o(),i==="full"||!u||u!==c?l+=a.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function TP(){return"!"}Hx.peek=EP;function Hx(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o\u007F]/.test(e.url))}Gx.peek=PP;function Gx(e,t,n,r){const i=Bh(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let a,l;if(Wx(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let c=s.move("<");return c+=s.move(n.containerPhrasing(e,{before:c,after:">",...s.current()})),c+=s.move(">"),a(),n.stack=f,c}a=n.enter("link"),l=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(l=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),l()),u+=s.move(")"),a(),u}function PP(e,t,n){return Wx(e,n)?"<":"["}Kx.peek=AP;function Kx(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const c=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=f,o(),i==="full"||!u||u!==c?l+=a.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function AP(){return"["}function Uh(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function LP(e){const t=Uh(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function MP(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function qx(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function DP(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?MP(n):Uh(n);const a=e.ordered?s==="."?")":".":LP(n);let l=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),qx(n)===s&&f){let c=-1;for(;++c-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),f);return l(),u;function f(c,d,h){return d?(h?"":" ".repeat(s))+c:(h?o:o+" ".repeat(s-o.length))+c}}function FP(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const RP=cu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text"]);function NP(e,t,n,r){return(e.children.some(function(s){return RP(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function jP(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Qx.peek=$P;function Qx(e,t,n,r){const i=jP(n),o=n.enter("strong"),s=n.createTracker(r);let a=s.move(i+i);return a+=s.move(n.containerPhrasing(e,{before:a,after:i,...s.current()})),a+=s.move(i+i),o(),a}function $P(e,t,n){return n.options.strong||"*"}function zP(e,t,n,r){return n.safe(e.value,r)}function VP(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function BP(e,t,n){const r=(qx(n)+(n.options.ruleSpaces?" ":"")).repeat(VP(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Xx={blockquote:fP,break:Yg,code:yP,definition:wP,emphasis:zx,hardBreak:Yg,heading:SP,html:Vx,image:Bx,imageReference:Ux,inlineCode:Hx,link:Gx,linkReference:Kx,list:DP,listItem:OP,paragraph:FP,root:NP,strong:Qx,text:zP,thematicBreak:BP};function UP(){return{enter:{table:HP,tableData:Zg,tableHeader:Zg,tableRow:GP},exit:{codeText:KP,table:WP,tableData:Cc,tableHeader:Cc,tableRow:Cc}}}function HP(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function WP(e){this.exit(e),this.data.inTable=void 0}function GP(e){this.enter({type:"tableRow",children:[]},e)}function Cc(e){this.exit(e)}function Zg(e){this.enter({type:"tableCell",children:[]},e)}function KP(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,qP));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function qP(e,t){return t==="|"?t:e}function QP(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:s,tableCell:l,tableRow:a}};function s(h,p,v,k){return u(f(h,v,k),h.align)}function a(h,p,v,k){const g=c(h,v,k),m=u([g]);return m.slice(0,m.indexOf(` +`))}function l(h,p,v,k){const g=v.enter("tableCell"),m=v.enter("phrasing"),y=v.containerPhrasing(h,{...k,before:o,after:o});return m(),g(),y}function u(h,p){return lP(h,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function f(h,p,v){const k=h.children;let g=-1;const m=[],y=p.enter("table");for(;++g0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const hA={tokenize:kA,partial:!0};function pA(){return{document:{91:{tokenize:vA,continuation:{tokenize:wA},exit:xA}},text:{91:{tokenize:yA},93:{add:"after",tokenize:mA,resolveTo:gA}}}}function mA(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!s||!s._balanced)return n(l);const u=hn(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function gA(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function yA(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),l}function l(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!s||c===null||c===91||ge(c))return n(c);if(c===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(hn(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return ge(c)||(s=!0),o++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function vA(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,a;return l;function l(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(p)}function f(p){if(s>999||p===93&&!a||p===null||p===91||ge(p))return n(p);if(p===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=hn(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return ge(p)||(a=!0),s++,e.consume(p),p===92?c:f}function c(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}function d(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(o)||i.push(o),fe(e,h,"gfmFootnoteDefinitionWhitespace")):n(p)}function h(p){return t(p)}}function wA(e,t,n){return e.check(Rs,t,e.attempt(hA,t,n))}function xA(e){e.exit("gfmFootnoteDefinition")}function kA(e,t,n){const r=this;return fe(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function bA(e){let n=(e||{}).singleTilde;const r={tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,a){let l=-1;for(;++l1?l(p):(s.consume(p),c++,h);if(c<2&&!n)return l(p);const k=s.exit("strikethroughSequenceTemporary"),g=ml(p);return k._open=!g||g===2&&!!v,k._close=!v||v===2&&!!g,a(p)}}}class SA{constructor(){this.map=[]}add(t,n,r){CA(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function CA(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i-1;){const H=r.events[z][1].type;if(H==="lineEnding"||H==="linePrefix")z--;else break}const F=z>-1?r.events[z][1].type:null,U=F==="tableHead"||F==="tableRow"?T:l;return U===T&&r.parser.lazy[r.now().line]?n(E):U(E)}function l(E){return e.enter("tableHead"),e.enter("tableRow"),u(E)}function u(E){return E===124||(s=!0,o+=1),f(E)}function f(E){return E===null?n(E):J(E)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),h):n(E):le(E)?fe(e,f,"whitespace")(E):(o+=1,s&&(s=!1,i+=1),E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),c(E)))}function c(E){return E===null||E===124||ge(E)?(e.exit("data"),f(E)):(e.consume(E),E===92?d:c)}function d(E){return E===92||E===124?(e.consume(E),c):c(E)}function h(E){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(E):(e.enter("tableDelimiterRow"),s=!1,le(E)?fe(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):p(E))}function p(E){return E===45||E===58?k(E):E===124?(s=!0,e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),v):P(E)}function v(E){return le(E)?fe(e,k,"whitespace")(E):k(E)}function k(E){return E===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),g):E===45?(o+=1,g(E)):E===null||J(E)?b(E):P(E)}function g(E){return E===45?(e.enter("tableDelimiterFiller"),m(E)):P(E)}function m(E){return E===45?(e.consume(E),m):E===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(E))}function y(E){return le(E)?fe(e,b,"whitespace")(E):b(E)}function b(E){return E===124?p(E):E===null||J(E)?!s||i!==o?P(E):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(E)):P(E)}function P(E){return n(E)}function T(E){return e.enter("tableRow"),D(E)}function D(E){return E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),D):E===null||J(E)?(e.exit("tableRow"),t(E)):le(E)?fe(e,D,"whitespace")(E):(e.enter("data"),I(E))}function I(E){return E===null||E===124||ge(E)?(e.exit("data"),D(E)):(e.consume(E),E===92?j:I)}function j(E){return E===92||E===124?(e.consume(E),I):I(E)}}function PA(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,u,f,c;const d=new SA;for(;++nn[2]+1){const p=n[2]+1,v=n[3]-n[2]-1;e.add(p,v,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(o.end=Object.assign({},yi(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function e0(e,t,n,r,i){const o=[],s=yi(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function yi(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const AA={tokenize:MA};function LA(){return{text:{91:AA}}}function MA(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return ge(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):n(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(l)}function a(l){return J(l)?t(l):le(l)?e.check({tokenize:DA},t,n)(l):n(l)}}function DA(e,t,n){return fe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function IA(e){return px([iA(),pA(),bA(e),TA(),LA()])}const OA={};function FA(e){const t=this,n=e||OA,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(IA(n)),o.push(eA()),s.push(tA(n))}function o2(e){const{markdown:t}=e;return w.jsx(CE,{className:"markdown",remarkPlugins:[FA],children:t})}const du=A.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),hu=A.createContext({}),pu=A.createContext(null),mu=typeof document<"u",gu=mu?A.useLayoutEffect:A.useEffect,s2=A.createContext({strict:!1}),Wh=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),RA="framerAppearId",a2="data-"+Wh(RA);function NA(e,t,n,r){const{visualElement:i}=A.useContext(hu),o=A.useContext(s2),s=A.useContext(pu),a=A.useContext(du).reducedMotion,l=A.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;A.useInsertionEffect(()=>{u&&u.update(n,s)});const f=A.useRef(!!(n[a2]&&!window.HandoffComplete));return gu(()=>{u&&(u.render(),f.current&&u.animationState&&u.animationState.animateChanges())}),A.useEffect(()=>{u&&(u.updateFeatures(),!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(f.current=!1,window.HandoffComplete=!0))}),u}function Ii(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function jA(e,t,n){return A.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Ii(n)&&(n.current=r))},[t])}function ks(e){return typeof e=="string"||Array.isArray(e)}function yu(e){return typeof e=="object"&&typeof e.start=="function"}const Gh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Kh=["initial",...Gh];function vu(e){return yu(e.animate)||Kh.some(t=>ks(e[t]))}function l2(e){return!!(vu(e)||e.variants)}function $A(e,t){if(vu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ks(n)?n:void 0,animate:ks(r)?r:void 0}}return e.inherit!==!1?t:{}}function zA(e){const{initial:t,animate:n}=$A(e,A.useContext(hu));return A.useMemo(()=>({initial:t,animate:n}),[t0(t),t0(n)])}function t0(e){return Array.isArray(e)?e.join(" "):e}const n0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},bs={};for(const e in n0)bs[e]={isEnabled:t=>n0[e].some(n=>!!t[n])};function VA(e){for(const t in e)bs[t]={...bs[t],...e[t]}}const Ss=A.createContext({}),u2=A.createContext({}),BA=Symbol.for("motionComponentSymbol");function UA({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&VA(e);function o(a,l){let u;const f={...A.useContext(du),...a,layoutId:HA(a)},{isStatic:c}=f,d=zA(a),h=r(a,c);if(!c&&mu){d.visualElement=NA(i,h,f,t);const p=A.useContext(u2),v=A.useContext(s2).strict;d.visualElement&&(u=d.visualElement.loadFeatures(f,v,e,p))}return A.createElement(hu.Provider,{value:d},u&&d.visualElement?A.createElement(u,{visualElement:d.visualElement,...f}):null,n(i,a,jA(h,d.visualElement,l),h,c,d.visualElement))}const s=A.forwardRef(o);return s[BA]=i,s}function HA({layoutId:e}){const t=A.useContext(Ss).id;return t&&e!==void 0?t+"-"+e:e}function WA(e){function t(r,i={}){return UA(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const GA=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function qh(e){return typeof e!="string"||e.includes("-")?!1:!!(GA.indexOf(e)>-1||/[A-Z]/.test(e))}const wl={};function KA(e){Object.assign(wl,e)}const js=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ui=new Set(js);function c2(e,{layout:t,layoutId:n}){return ui.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!wl[e]||e==="opacity")}const ft=e=>!!(e&&e.getVelocity),qA={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},QA=js.length;function XA(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;st=>typeof t=="string"&&t.startsWith(e),d2=f2("--"),rd=f2("var(--"),YA=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,ZA=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Sr=(e,t,n)=>Math.min(Math.max(n,e),t),ci={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Xo={...ci,transform:e=>Sr(0,1,e)},ya={...ci,default:1},Yo=e=>Math.round(e*1e5)/1e5,wu=/(-)?([\d]*\.?[\d])+/g,h2=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,JA=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function $s(e){return typeof e=="string"}const zs=e=>({test:t=>$s(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Jn=zs("deg"),Cn=zs("%"),te=zs("px"),e6=zs("vh"),t6=zs("vw"),r0={...Cn,parse:e=>Cn.parse(e)/100,transform:e=>Cn.transform(e*100)},i0={...ci,transform:Math.round},p2={borderWidth:te,borderTopWidth:te,borderRightWidth:te,borderBottomWidth:te,borderLeftWidth:te,borderRadius:te,radius:te,borderTopLeftRadius:te,borderTopRightRadius:te,borderBottomRightRadius:te,borderBottomLeftRadius:te,width:te,maxWidth:te,height:te,maxHeight:te,size:te,top:te,right:te,bottom:te,left:te,padding:te,paddingTop:te,paddingRight:te,paddingBottom:te,paddingLeft:te,margin:te,marginTop:te,marginRight:te,marginBottom:te,marginLeft:te,rotate:Jn,rotateX:Jn,rotateY:Jn,rotateZ:Jn,scale:ya,scaleX:ya,scaleY:ya,scaleZ:ya,skew:Jn,skewX:Jn,skewY:Jn,distance:te,translateX:te,translateY:te,translateZ:te,x:te,y:te,z:te,perspective:te,transformPerspective:te,opacity:Xo,originX:r0,originY:r0,originZ:te,zIndex:i0,fillOpacity:Xo,strokeOpacity:Xo,numOctaves:i0};function Qh(e,t,n,r){const{style:i,vars:o,transform:s,transformOrigin:a}=e;let l=!1,u=!1,f=!0;for(const c in t){const d=t[c];if(d2(c)){o[c]=d;continue}const h=p2[c],p=ZA(d,h);if(ui.has(c)){if(l=!0,s[c]=p,!f)continue;d!==(h.default||0)&&(f=!1)}else c.startsWith("origin")?(u=!0,a[c]=p):i[c]=p}if(t.transform||(l||r?i.transform=XA(e.transform,n,f,r):i.transform&&(i.transform="none")),u){const{originX:c="50%",originY:d="50%",originZ:h=0}=a;i.transformOrigin=`${c} ${d} ${h}`}}const Xh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function m2(e,t,n){for(const r in t)!ft(t[r])&&!c2(r,n)&&(e[r]=t[r])}function n6({transformTemplate:e},t,n){return A.useMemo(()=>{const r=Xh();return Qh(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function r6(e,t,n){const r=e.style||{},i={};return m2(i,r,e),Object.assign(i,n6(e,t,n)),e.transformValues?e.transformValues(i):i}function i6(e,t,n){const r={},i=r6(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const o6=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function xl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||o6.has(e)}let g2=e=>!xl(e);function s6(e){e&&(g2=t=>t.startsWith("on")?!xl(t):e(t))}try{s6(require("@emotion/is-prop-valid").default)}catch{}function a6(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(g2(i)||n===!0&&xl(i)||!t&&!xl(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function o0(e,t,n){return typeof e=="string"?e:te.transform(t+n*e)}function l6(e,t,n){const r=o0(t,e.x,e.width),i=o0(n,e.y,e.height);return`${r} ${i}`}const u6={offset:"stroke-dashoffset",array:"stroke-dasharray"},c6={offset:"strokeDashoffset",array:"strokeDasharray"};function f6(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?u6:c6;e[o.offset]=te.transform(-r);const s=te.transform(t),a=te.transform(n);e[o.array]=`${s} ${a}`}function Yh(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},f,c,d){if(Qh(e,u,f,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:v}=e;h.transform&&(v&&(p.transform=h.transform),delete h.transform),v&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=l6(v,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&f6(h,s,a,l,!1)}const y2=()=>({...Xh(),attrs:{}}),Zh=e=>typeof e=="string"&&e.toLowerCase()==="svg";function d6(e,t,n,r){const i=A.useMemo(()=>{const o=y2();return Yh(o,t,{enableHardwareAcceleration:!1},Zh(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};m2(o,e.style,e),i.style={...o,...i.style}}return i}function h6(e=!1){return(n,r,i,{latestValues:o},s)=>{const l=(qh(n)?d6:i6)(r,o,s,n),f={...a6(r,typeof n=="string",e),...l,ref:i},{children:c}=r,d=A.useMemo(()=>ft(c)?c.get():c,[c]);return A.createElement(n,{...f,children:d})}}function v2(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const w2=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function x2(e,t,n,r){v2(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(w2.has(i)?i:Wh(i),t.attrs[i])}function Jh(e,t){const{style:n}=e,r={};for(const i in n)(ft(n[i])||t.style&&ft(t.style[i])||c2(i,e))&&(r[i]=n[i]);return r}function k2(e,t){const n=Jh(e,t);for(const r in e)if(ft(e[r])||ft(t[r])){const i=js.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function ep(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function tp(e){const t=A.useRef(null);return t.current===null&&(t.current=e()),t.current}const kl=e=>Array.isArray(e),p6=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),m6=e=>kl(e)?e[e.length-1]||0:e;function $a(e){const t=ft(e)?e.get():e;return p6(t)?t.toValue():t}function g6({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:y6(r,i,o,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const b2=e=>(t,n)=>{const r=A.useContext(hu),i=A.useContext(pu),o=()=>g6(e,t,r,i);return n?o():tp(o)};function y6(e,t,n,r){const i={},o=r(e,{});for(const d in o)i[d]=$a(o[d]);let{initial:s,animate:a}=e;const l=vu(e),u=l2(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let f=n?n.initial===!1:!1;f=f||s===!1;const c=f?a:s;return c&&typeof c!="boolean"&&!yu(c)&&(Array.isArray(c)?c:[c]).forEach(h=>{const p=ep(e,h);if(!p)return;const{transitionEnd:v,transition:k,...g}=p;for(const m in g){let y=g[m];if(Array.isArray(y)){const b=f?y.length-1:0;y=y[b]}y!==null&&(i[m]=y)}for(const m in v)i[m]=v[m]}),i}const Ie=e=>e;class s0{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function v6(e){let t=new s0,n=new s0,r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(l,u=!1,f=!1)=>{const c=f&&i,d=c?t:n;return u&&s.add(l),d.add(l)&&c&&i&&(r=t.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u(c[d]=v6(()=>n=!0),c),{}),s=c=>o[c].process(i),a=()=>{const c=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(c-i.timestamp,w6),1),i.timestamp=c,i.isProcessing=!0,va.forEach(s),i.isProcessing=!1,n&&t&&(r=!1,e(a))},l=()=>{n=!0,r=!0,i.isProcessing||e(a)};return{schedule:va.reduce((c,d)=>{const h=o[d];return c[d]=(p,v=!1,k=!1)=>(n||l(),h.schedule(p,v,k)),c},{}),cancel:c=>va.forEach(d=>o[d].cancel(c)),state:i,steps:o}}const{schedule:xe,cancel:Gn,state:Ge,steps:_c}=x6(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ie,!0),k6={useVisualState:b2({scrapeMotionValuesFromProps:k2,createRenderState:y2,onMount:(e,t,{renderState:n,latestValues:r})=>{xe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),xe.render(()=>{Yh(n,r,{enableHardwareAcceleration:!1},Zh(t.tagName),e.transformTemplate),x2(t,n)})}})},b6={useVisualState:b2({scrapeMotionValuesFromProps:Jh,createRenderState:Xh})};function S6(e,{forwardMotionProps:t=!1},n,r){return{...qh(e)?k6:b6,preloadedFeatures:n,useRender:h6(t),createVisualElement:r,Component:e}}function $n(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const S2=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function xu(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const C6=e=>t=>S2(t)&&e(t,xu(t));function Vn(e,t,n,r){return $n(e,t,C6(n),r)}const _6=(e,t)=>n=>t(e(n)),vr=(...e)=>e.reduce(_6);function C2(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const a0=C2("dragHorizontal"),l0=C2("dragVertical");function _2(e){let t=!1;if(e==="y")t=l0();else if(e==="x")t=a0();else{const n=a0(),r=l0();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function T2(){const e=_2(!0);return e?(e(),!1):!0}class Ar{constructor(t){this.isMounted=!1,this.node=t}update(){}}function u0(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||T2())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&xe.update(()=>a[r](o,s))};return Vn(e.current,n,i,{passive:!e.getProps()[r]})}class T6 extends Ar{mount(){this.unmount=vr(u0(this.node,!0),u0(this.node,!1))}unmount(){}}class E6 extends Ar{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=vr($n(this.node.current,"focus",()=>this.onFocus()),$n(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const E2=(e,t)=>t?e===t?!0:E2(e,t.parentElement):!1;function Tc(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,xu(n))}class P6 extends Ar{constructor(){super(...arguments),this.removeStartListeners=Ie,this.removeEndListeners=Ie,this.removeAccessibleListeners=Ie,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=Vn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:f}=this.node.getProps();xe.update(()=>{E2(this.node.current,a.target)?u&&u(a,l):f&&f(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),s=Vn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=vr(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Tc("up",(l,u)=>{const{onTap:f}=this.node.getProps();f&&xe.update(()=>f(l,u))})};this.removeEndListeners(),this.removeEndListeners=$n(this.node.current,"keyup",s),Tc("down",(a,l)=>{this.startPress(a,l)})},n=$n(this.node.current,"keydown",t),r=()=>{this.isPressing&&Tc("cancel",(o,s)=>this.cancelPress(o,s))},i=$n(this.node.current,"blur",r);this.removeAccessibleListeners=vr(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&xe.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!T2()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&xe.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Vn(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=$n(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=vr(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const id=new WeakMap,Ec=new WeakMap,A6=e=>{const t=id.get(e.target);t&&t(e)},L6=e=>{e.forEach(A6)};function M6({root:e,...t}){const n=e||document;Ec.has(n)||Ec.set(n,{});const r=Ec.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(L6,{root:e,...t})),r[i]}function D6(e,t,n){const r=M6(t);return id.set(e,n),r.observe(e),()=>{id.delete(e),r.unobserve(e)}}const I6={some:0,all:1};class O6 extends Ar{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:I6[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:c}=this.node.getProps(),d=u?f:c;d&&d(l)};return D6(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(F6(t,n))&&this.startObserver()}unmount(){}}function F6({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const R6={inView:{Feature:O6},tap:{Feature:P6},focus:{Feature:E6},hover:{Feature:T6}};function P2(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function j6(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function ku(e,t,n){const r=e.getProps();return ep(r,t,n!==void 0?n:r.custom,N6(e),j6(e))}let $6=Ie,np=Ie;const wr=e=>e*1e3,_n=e=>e/1e3,z6={current:!1},A2=e=>Array.isArray(e)&&typeof e[0]=="number";function L2(e){return!!(!e||typeof e=="string"&&M2[e]||A2(e)||Array.isArray(e)&&e.every(L2))}const No=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,M2={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:No([0,.65,.55,1]),circOut:No([.55,0,1,.45]),backIn:No([.31,.01,.66,-.59]),backOut:No([.33,1.53,.69,.99])};function D2(e){if(e)return A2(e)?No(e):Array.isArray(e)?e.map(D2):M2[e]}function V6(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const f=D2(a);return Array.isArray(f)&&(u.easing=f),e.animate(u,{delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function B6(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const I2=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,U6=1e-7,H6=12;function W6(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=I2(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>U6&&++aW6(o,0,1,e,n);return o=>o===0||o===1?o:I2(i(o),t,r)}const G6=Vs(.42,0,1,1),K6=Vs(0,0,.58,1),O2=Vs(.42,0,.58,1),q6=e=>Array.isArray(e)&&typeof e[0]!="number",F2=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,R2=e=>t=>1-e(1-t),rp=e=>1-Math.sin(Math.acos(e)),N2=R2(rp),Q6=F2(rp),j2=Vs(.33,1.53,.69,.99),ip=R2(j2),X6=F2(ip),Y6=e=>(e*=2)<1?.5*ip(e):.5*(2-Math.pow(2,-10*(e-1))),Z6={linear:Ie,easeIn:G6,easeInOut:O2,easeOut:K6,circIn:rp,circInOut:Q6,circOut:N2,backIn:ip,backInOut:X6,backOut:j2,anticipate:Y6},c0=e=>{if(Array.isArray(e)){np(e.length===4);const[t,n,r,i]=e;return Vs(t,n,r,i)}else if(typeof e=="string")return Z6[e];return e},op=(e,t)=>n=>!!($s(n)&&JA.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),$2=(e,t,n)=>r=>{if(!$s(r))return r;const[i,o,s,a]=r.match(wu);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},J6=e=>Sr(0,255,e),Pc={...ci,transform:e=>Math.round(J6(e))},Kr={test:op("rgb","red"),parse:$2("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Pc.transform(e)+", "+Pc.transform(t)+", "+Pc.transform(n)+", "+Yo(Xo.transform(r))+")"};function eL(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const od={test:op("#"),parse:eL,transform:Kr.transform},Oi={test:op("hsl","hue"),parse:$2("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Cn.transform(Yo(t))+", "+Cn.transform(Yo(n))+", "+Yo(Xo.transform(r))+")"},pt={test:e=>Kr.test(e)||od.test(e)||Oi.test(e),parse:e=>Kr.test(e)?Kr.parse(e):Oi.test(e)?Oi.parse(e):od.parse(e),transform:e=>$s(e)?e:e.hasOwnProperty("red")?Kr.transform(e):Oi.transform(e)},Pe=(e,t,n)=>-n*e+n*t+e;function Ac(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function tL({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Ac(l,a,e+1/3),o=Ac(l,a,e),s=Ac(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const Lc=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},nL=[od,Kr,Oi],rL=e=>nL.find(t=>t.test(e));function f0(e){const t=rL(e);let n=t.parse(e);return t===Oi&&(n=tL(n)),n}const z2=(e,t)=>{const n=f0(e),r=f0(t),i={...n};return o=>(i.red=Lc(n.red,r.red,o),i.green=Lc(n.green,r.green,o),i.blue=Lc(n.blue,r.blue,o),i.alpha=Pe(n.alpha,r.alpha,o),Kr.transform(i))};function iL(e){var t,n;return isNaN(e)&&$s(e)&&(((t=e.match(wu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(h2))===null||n===void 0?void 0:n.length)||0)>0}const V2={regex:YA,countKey:"Vars",token:"${v}",parse:Ie},B2={regex:h2,countKey:"Colors",token:"${c}",parse:pt.parse},U2={regex:wu,countKey:"Numbers",token:"${n}",parse:ci.parse};function Mc(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function bl(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Mc(n,V2),Mc(n,B2),Mc(n,U2),n}function H2(e){return bl(e).values}function W2(e){const{values:t,numColors:n,numVars:r,tokenised:i}=bl(e),o=t.length;return s=>{let a=i;for(let l=0;ltypeof e=="number"?0:e;function sL(e){const t=H2(e);return W2(e)(t.map(oL))}const Cr={test:iL,parse:H2,createTransformer:W2,getAnimatableNone:sL},G2=(e,t)=>n=>`${n>0?t:e}`;function K2(e,t){return typeof e=="number"?n=>Pe(e,t,n):pt.test(e)?z2(e,t):e.startsWith("var(")?G2(e,t):Q2(e,t)}const q2=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,s)=>K2(o,t[s]));return o=>{for(let s=0;s{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=K2(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},Q2=(e,t)=>{const n=Cr.createTransformer(t),r=bl(e),i=bl(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?vr(q2(r.values,i.values),n):G2(e,t)},Cs=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},d0=(e,t)=>n=>Pe(e,t,n);function lL(e){return typeof e=="number"?d0:typeof e=="string"?pt.test(e)?z2:Q2:Array.isArray(e)?q2:typeof e=="object"?aL:d0}function uL(e,t,n){const r=[],i=n||lL(e[0]),o=e.length-1;for(let s=0;st[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=uL(t,r,i),a=s.length,l=u=>{let f=0;if(a>1)for(;fl(Sr(e[0],e[o-1],u)):l}function cL(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Cs(0,t,r);e.push(Pe(n,1,i))}}function fL(e){const t=[0];return cL(t,e.length-1),t}function dL(e,t){return e.map(n=>n*t)}function hL(e,t){return e.map(()=>t||O2).splice(0,e.length-1)}function Sl({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=q6(r)?r.map(c0):c0(r),o={done:!1,value:t[0]},s=dL(n&&n.length===t.length?n:fL(t),e),a=X2(s,t,{ease:Array.isArray(i)?i:hL(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}function Y2(e,t){return t?e*(1e3/t):0}const pL=5;function Z2(e,t,n){const r=Math.max(t-pL,0);return Y2(n-e(r),t-r)}const Dc=.001,mL=.01,h0=10,gL=.05,yL=1;function vL({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;$6(e<=wr(h0));let s=1-t;s=Sr(gL,yL,s),e=Sr(mL,h0,_n(e)),s<1?(i=u=>{const f=u*s,c=f*e,d=f-n,h=sd(u,s),p=Math.exp(-c);return Dc-d/h*p},o=u=>{const c=u*s*e,d=c*n+n,h=Math.pow(s,2)*Math.pow(u,2)*e,p=Math.exp(-c),v=sd(Math.pow(u,2),s);return(-i(u)+Dc>0?-1:1)*((d-h)*p)/v}):(i=u=>{const f=Math.exp(-u*e),c=(u-n)*e+1;return-Dc+f*c},o=u=>{const f=Math.exp(-u*e),c=(n-u)*(e*e);return f*c});const a=5/e,l=xL(i,o,a);if(e=wr(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const wL=12;function xL(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function SL(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!p0(e,bL)&&p0(e,kL)){const n=vL(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function J2({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,velocity:f,duration:c,isResolvedFromDuration:d}=SL(r),h=f?-_n(f):0,p=l/(2*Math.sqrt(a*u)),v=o-i,k=_n(Math.sqrt(a/u)),g=Math.abs(v)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let m;if(p<1){const y=sd(k,p);m=b=>{const P=Math.exp(-p*k*b);return o-P*((h+p*k*v)/y*Math.sin(y*b)+v*Math.cos(y*b))}}else if(p===1)m=y=>o-Math.exp(-k*y)*(v+(h+k*v)*y);else{const y=k*Math.sqrt(p*p-1);m=b=>{const P=Math.exp(-p*k*b),T=Math.min(y*b,300);return o-P*((h+p*k*v)*Math.sinh(T)+y*v*Math.cosh(T))/y}}return{calculatedDuration:d&&c||null,next:y=>{const b=m(y);if(d)s.done=y>=c;else{let P=h;y!==0&&(p<1?P=Z2(m,y,b):P=0);const T=Math.abs(P)<=n,D=Math.abs(o-b)<=t;s.done=T&&D}return s.value=s.done?o:b,s}}}function m0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:f}){const c=e[0],d={done:!1,value:c},h=I=>a!==void 0&&Il,p=I=>a===void 0?l:l===void 0||Math.abs(a-I)-v*Math.exp(-I/r),y=I=>g+m(I),b=I=>{const j=m(I),E=y(I);d.done=Math.abs(j)<=u,d.value=d.done?g:E};let P,T;const D=I=>{h(d.value)&&(P=I,T=J2({keyframes:[d.value,p(d.value)],velocity:Z2(y,I,d.value),damping:i,stiffness:o,restDelta:u,restSpeed:f}))};return D(0),{calculatedDuration:null,next:I=>{let j=!1;return!T&&P===void 0&&(j=!0,b(I),D(I)),P!==void 0&&I>P?T.next(I-P):(!j&&b(I),d)}}}const CL=e=>{const t=({timestamp:n})=>e(n);return{start:()=>xe.update(t,!0),stop:()=>Gn(t),now:()=>Ge.isProcessing?Ge.timestamp:performance.now()}},g0=2e4;function y0(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=g0?1/0:t}const _L={decay:m0,inertia:m0,tween:Sl,keyframes:Sl,spring:J2};function _s({autoplay:e=!0,delay:t=0,driver:n=CL,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:f,onUpdate:c,...d}){let h=1,p=!1,v,k;const g=()=>{k=new Promise(Y=>{v=Y})};g();let m;const y=_L[i]||Sl;let b;y!==Sl&&typeof r[0]!="number"&&(b=X2([0,100],r,{clamp:!1}),r=[0,100]);const P=y({...d,keyframes:r});let T;a==="mirror"&&(T=y({...d,keyframes:[...r].reverse(),velocity:-(d.velocity||0)}));let D="idle",I=null,j=null,E=null;P.calculatedDuration===null&&o&&(P.calculatedDuration=y0(P));const{calculatedDuration:z}=P;let F=1/0,U=1/0;z!==null&&(F=z+s,U=F*(o+1)-s);let H=0;const B=Y=>{if(j===null)return;h>0&&(j=Math.min(j,Y)),h<0&&(j=Math.min(Y-U/h,j)),I!==null?H=I:H=Math.round(Y-j)*h;const ae=H-t*(h>=0?1:-1),S=h>=0?ae<0:ae>U;H=Math.max(ae,0),D==="finished"&&I===null&&(H=U);let ke=H,rt=P;if(o){const Mt=H/F;let it=Math.floor(Mt),bt=Mt%1;!bt&&Mt>=1&&(bt=1),bt===1&&it--,it=Math.min(it,o+1);const di=!!(it%2);di&&(a==="reverse"?(bt=1-bt,s&&(bt-=s/F)):a==="mirror"&&(rt=T));let Mr=Sr(0,1,bt);H>U&&(Mr=a==="reverse"&&di?1:0),ke=Mr*F}const ce=S?{done:!1,value:r[0]}:rt.next(ke);b&&(ce.value=b(ce.value));let{done:ht}=ce;!S&&z!==null&&(ht=h>=0?H>=U:H<=0);const kt=I===null&&(D==="finished"||D==="running"&&ht);return c&&c(ce.value),kt&&$(),ce},ie=()=>{m&&m.stop(),m=void 0},oe=()=>{D="idle",ie(),v(),g(),j=E=null},$=()=>{D="finished",f&&f(),ie(),v()},q=()=>{if(p)return;m||(m=n(B));const Y=m.now();l&&l(),I!==null?j=Y-I:(!j||D==="finished")&&(j=Y),D==="finished"&&g(),E=j,I=null,D="running",m.start()};e&&q();const x={then(Y,ae){return k.then(Y,ae)},get time(){return _n(H)},set time(Y){Y=wr(Y),H=Y,I!==null||!m||h===0?I=Y:j=m.now()-Y/h},get duration(){const Y=P.calculatedDuration===null?y0(P):P.calculatedDuration;return _n(Y)},get speed(){return h},set speed(Y){Y===h||!m||(h=Y,x.time=_n(H))},get state(){return D},play:q,pause:()=>{D="paused",I=H},stop:()=>{p=!0,D!=="idle"&&(D="idle",u&&u(),oe())},cancel:()=>{E!==null&&B(E),oe()},complete:()=>{D="finished"},sample:Y=>(j=0,B(Y))};return x}function TL(e){let t;return()=>(t===void 0&&(t=e()),t)}const EL=TL(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),PL=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),wa=10,AL=2e4,LL=(e,t)=>t.type==="spring"||e==="backgroundColor"||!L2(t.ease);function ML(e,t,{onUpdate:n,onComplete:r,...i}){if(!(EL()&&PL.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,l;const u=()=>{l=new Promise(m=>{a=m})};u();let{keyframes:f,duration:c=300,ease:d,times:h}=i;if(LL(t,i)){const m=_s({...i,repeat:0,delay:0});let y={done:!1,value:f[0]};const b=[];let P=0;for(;!y.done&&Pp.cancel(),k=()=>{xe.update(v),a(),u()};return p.onfinish=()=>{e.set(B6(f,i)),r&&r(),k()},{then(m,y){return l.then(m,y)},attachTimeline(m){return p.timeline=m,p.onfinish=null,Ie},get time(){return _n(p.currentTime||0)},set time(m){p.currentTime=wr(m)},get speed(){return p.playbackRate},set speed(m){p.playbackRate=m},get duration(){return _n(c)},play:()=>{s||(p.play(),Gn(v))},pause:()=>p.pause(),stop:()=>{if(s=!0,p.playState==="idle")return;const{currentTime:m}=p;if(m){const y=_s({...i,autoplay:!1});e.setWithVelocity(y.sample(m-wa).value,y.sample(m).value,wa)}k()},complete:()=>p.finish(),cancel:k}}function DL({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Ie,pause:Ie,stop:Ie,then:o=>(o(),Promise.resolve()),cancel:Ie,complete:Ie});return t?_s({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const IL={type:"spring",stiffness:500,damping:25,restSpeed:10},OL=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),FL={type:"keyframes",duration:.8},RL={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},NL=(e,{keyframes:t})=>t.length>2?FL:ui.has(e)?e.startsWith("scale")?OL(t[1]):IL:RL,ad=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Cr.test(t)||t==="0")&&!t.startsWith("url(")),jL=new Set(["brightness","contrast","saturate","opacity"]);function $L(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(wu)||[];if(!r)return e;const i=n.replace(r,"");let o=jL.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const zL=/([a-z-]*)\(.*?\)/g,ld={...Cr,getAnimatableNone:e=>{const t=e.match(zL);return t?t.map($L).join(" "):e}},VL={...p2,color:pt,backgroundColor:pt,outlineColor:pt,fill:pt,stroke:pt,borderColor:pt,borderTopColor:pt,borderRightColor:pt,borderBottomColor:pt,borderLeftColor:pt,filter:ld,WebkitFilter:ld},sp=e=>VL[e];function ek(e,t){let n=sp(e);return n!==ld&&(n=Cr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const tk=e=>/^0[^.\s]+$/.test(e);function BL(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||tk(e)}function UL(e,t,n,r){const i=ad(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:e.get();let a;const l=[];for(let u=0;ui=>{const o=ap(r,e)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-wr(s);const l=UL(t,e,n,o),u=l[0],f=l[l.length-1],c=ad(e,u),d=ad(e,f);let h={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(HL(o)||(h={...h,...NL(e,h)}),h.duration&&(h.duration=wr(h.duration)),h.repeatDelay&&(h.repeatDelay=wr(h.repeatDelay)),!c||!d||z6.current||o.type===!1)return DL(h);if(!r.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=ML(t,e,h);if(p)return p}return _s(h)};function Cl(e){return!!(ft(e)&&e.add)}const nk=e=>/^\-?\d*\.?\d+$/.test(e);function up(e,t){e.indexOf(t)===-1&&e.push(t)}function cp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class fp{constructor(){this.subscriptions=[]}add(t){return up(this.subscriptions,t),()=>cp(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class GL{constructor(t,n={}){this.version="10.16.16",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:s}=Ge;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,xe.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>xe.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=WL(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new fp);const r=this.events[t].add(n);return t==="change"?()=>{r(),xe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Y2(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ri(e,t){return new GL(e,t)}const rk=e=>t=>t.test(e),KL={test:e=>e==="auto",parse:e=>e},ik=[ci,te,Cn,Jn,t6,e6,KL],Ao=e=>ik.find(rk(e)),qL=[...ik,pt,Cr],QL=e=>qL.find(rk(e));function XL(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ri(n))}function YL(e,t){const n=ku(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const a=m6(o[s]);XL(e,s,a)}}function ZL(e,t,n){var r,i;const o=Object.keys(t).filter(a=>!e.hasValue(a)),s=o.length;if(s)for(let a=0;al.remove(c))),u.push(k)}return s&&Promise.all(u).then(()=>{s&&YL(e,s)}),u}function ud(e,t,n={}){const r=ku(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(ok(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:c}=i;return rM(e,t,u+l,f,c,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,s]:[s,o];return l().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function rM(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(iM).forEach((u,f)=>{u.notify("AnimationStart",t),s.push(ud(u,t,{...o,delay:n+l(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function iM(e,t){return e.sortNodePosition(t)}function oM(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>ud(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=ud(e,t,n);else{const i=typeof t=="function"?ku(e,t,n.custom):t;r=Promise.all(ok(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const sM=[...Gh].reverse(),aM=Gh.length;function lM(e){return t=>Promise.all(t.map(({animation:n,options:r})=>oM(e,n,r)))}function uM(e){let t=lM(e);const n=fM();let r=!0;const i=(l,u)=>{const f=ku(e,u);if(f){const{transition:c,transitionEnd:d,...h}=f;l={...l,...h,...d}}return l};function o(l){t=l(e)}function s(l,u){const f=e.getProps(),c=e.getVariantContext(!0)||{},d=[],h=new Set;let p={},v=1/0;for(let g=0;gv&&P;const E=Array.isArray(b)?b:[b];let z=E.reduce(i,{});T===!1&&(z={});const{prevResolvedValues:F={}}=y,U={...F,...z},H=B=>{j=!0,h.delete(B),y.needsAnimating[B]=!0};for(const B in U){const ie=z[B],oe=F[B];p.hasOwnProperty(B)||(ie!==oe?kl(ie)&&kl(oe)?!P2(ie,oe)||I?H(B):y.protectedKeys[B]=!0:ie!==void 0?H(B):h.add(B):ie!==void 0&&h.has(B)?H(B):y.protectedKeys[B]=!0)}y.prevProp=b,y.prevResolvedValues=z,y.isActive&&(p={...p,...z}),r&&e.blockInitialAnimation&&(j=!1),j&&!D&&d.push(...E.map(B=>({animation:B,options:{type:m,...l}})))}if(h.size){const g={};h.forEach(m=>{const y=e.getBaseTarget(m);y!==void 0&&(g[m]=y)}),d.push({animation:g})}let k=!!d.length;return r&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(k=!1),r=!1,k?t(d):Promise.resolve()}function a(l,u,f){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,u)}),n[l].isActive=u;const d=s(f,l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n}}function cM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!P2(t,e):!1}function Or(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fM(){return{animate:Or(!0),whileInView:Or(),whileHover:Or(),whileTap:Or(),whileDrag:Or(),whileFocus:Or(),exit:Or()}}class dM extends Ar{constructor(t){super(t),t.animationState||(t.animationState=uM(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),yu(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let hM=0;class pM extends Ar{constructor(){super(...arguments),this.id=hM++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const mM={animation:{Feature:dM},exit:{Feature:pM}},v0=(e,t)=>Math.abs(e-t);function gM(e,t){const n=v0(e.x,t.x),r=v0(e.y,t.y);return Math.sqrt(n**2+r**2)}class sk{constructor(t,n,{transformPagePoint:r,contextWindow:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Oc(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,d=gM(f.offset,{x:0,y:0})>=3;if(!c&&!d)return;const{point:h}=f,{timestamp:p}=Ge;this.history.push({...h,timestamp:p});const{onStart:v,onMove:k}=this.handlers;c||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,f)},this.handlePointerMove=(f,c)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Ic(c,this.transformPagePoint),xe.update(this.updatePoint,!0)},this.handlePointerUp=(f,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:h}=this.handlers,p=Oc(f.type==="pointercancel"?this.lastMoveEventInfo:Ic(c,this.transformPagePoint),this.history);this.startEvent&&d&&d(f,p),h&&h(f,p)},!S2(t))return;this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=xu(t),s=Ic(o,this.transformPagePoint),{point:a}=s,{timestamp:l}=Ge;this.history=[{...a,timestamp:l}];const{onSessionStart:u}=n;u&&u(t,Oc(s,this.history)),this.removeListeners=vr(Vn(this.contextWindow,"pointermove",this.handlePointerMove),Vn(this.contextWindow,"pointerup",this.handlePointerUp),Vn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Gn(this.updatePoint)}}function Ic(e,t){return t?{point:t(e.point)}:e}function w0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Oc({point:e},t){return{point:e,delta:w0(e,ak(t)),offset:w0(e,yM(t)),velocity:vM(t,.1)}}function yM(e){return e[0]}function ak(e){return e[e.length-1]}function vM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=ak(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>wr(t)));)n--;if(!r)return{x:0,y:0};const o=_n(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Vt(e){return e.max-e.min}function cd(e,t=0,n=.01){return Math.abs(e-t)<=n}function x0(e,t,n,r=.5){e.origin=r,e.originPoint=Pe(t.min,t.max,e.origin),e.scale=Vt(n)/Vt(t),(cd(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Pe(n.min,n.max,e.origin)-e.originPoint,(cd(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Zo(e,t,n,r){x0(e.x,t.x,n.x,r?r.originX:void 0),x0(e.y,t.y,n.y,r?r.originY:void 0)}function k0(e,t,n){e.min=n.min+t.min,e.max=e.min+Vt(t)}function wM(e,t,n){k0(e.x,t.x,n.x),k0(e.y,t.y,n.y)}function b0(e,t,n){e.min=t.min-n.min,e.max=e.min+Vt(t)}function Jo(e,t,n){b0(e.x,t.x,n.x),b0(e.y,t.y,n.y)}function xM(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Pe(n,e,r.max):Math.min(e,n)),e}function S0(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function kM(e,{top:t,left:n,bottom:r,right:i}){return{x:S0(e.x,n,i),y:S0(e.y,t,r)}}function C0(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Cs(t.min,t.max-r,e.min):r>i&&(n=Cs(e.min,e.max-i,t.min)),Sr(0,1,n)}function CM(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const fd=.35;function _M(e=fd){return e===!1?e=0:e===!0&&(e=fd),{x:_0(e,"left","right"),y:_0(e,"top","bottom")}}function _0(e,t,n){return{min:T0(e,t),max:T0(e,n)}}function T0(e,t){return typeof e=="number"?e:e[t]||0}const E0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Fi=()=>({x:E0(),y:E0()}),P0=()=>({min:0,max:0}),Re=()=>({x:P0(),y:P0()});function vn(e){return[e("x"),e("y")]}function lk({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function TM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function EM(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Fc(e){return e===void 0||e===1}function dd({scale:e,scaleX:t,scaleY:n}){return!Fc(e)||!Fc(t)||!Fc(n)}function jr(e){return dd(e)||uk(e)||e.z||e.rotate||e.rotateX||e.rotateY}function uk(e){return A0(e.x)||A0(e.y)}function A0(e){return e&&e!=="0%"}function _l(e,t,n){const r=e-n,i=t*r;return n+i}function L0(e,t,n,r,i){return i!==void 0&&(e=_l(e,i,r)),_l(e,n,r)+t}function hd(e,t=0,n=1,r,i){e.min=L0(e.min,t,n,r,i),e.max=L0(e.max,t,n,r,i)}function ck(e,{x:t,y:n}){hd(e.x,t.translate,t.scale,t.originPoint),hd(e.y,n.translate,n.scale,n.originPoint)}function PM(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let a=0;a1.0000000000001||e<.999999999999?e:1}function nr(e,t){e.min=e.min+t,e.max=e.max+t}function D0(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,s=Pe(e.min,e.max,o);hd(e,t[n],t[r],s,t.scale)}const AM=["x","scaleX","originX"],LM=["y","scaleY","originY"];function Ri(e,t){D0(e.x,t,AM),D0(e.y,t,LM)}function fk(e,t){return lk(EM(e.getBoundingClientRect(),t))}function MM(e,t,n){const r=fk(e,n),{scroll:i}=t;return i&&(nr(r.x,i.offset.x),nr(r.y,i.offset.y)),r}const dk=({current:e})=>e?e.ownerDocument.defaultView:null,DM=new WeakMap;class IM{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Re(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=l=>{this.stopAnimation(),n&&this.snapToCursor(xu(l,"page").point)},o=(l,u)=>{const{drag:f,dragPropagation:c,onDragStart:d}=this.getProps();if(f&&!c&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=_2(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),vn(p=>{let v=this.getAxisMotionValue(p).get()||0;if(Cn.test(v)){const{projection:k}=this.visualElement;if(k&&k.layout){const g=k.layout.layoutBox[p];g&&(v=Vt(g)*(parseFloat(v)/100))}}this.originPoint[p]=v}),d&&xe.update(()=>d(l,u),!1,!0);const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},s=(l,u)=>{const{dragPropagation:f,dragDirectionLock:c,onDirectionLock:d,onDrag:h}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:p}=u;if(c&&this.currentDirection===null){this.currentDirection=OM(p),this.currentDirection!==null&&d&&d(this.currentDirection);return}this.updateAxis("x",u.point,p),this.updateAxis("y",u.point,p),this.visualElement.render(),h&&h(l,u)},a=(l,u)=>this.stop(l,u);this.panSession=new sk(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),contextWindow:dk(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&xe.update(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!xa(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=xM(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&Ii(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=kM(i.layoutBox,n):this.constraints=!1,this.elastic=_M(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&vn(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=CM(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ii(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=MM(r,i.root,this.visualElement.getTransformPagePoint());let s=bM(i.layout.layoutBox,o);if(n){const a=n(TM(s));this.hasMutatedConstraints=!!a,a&&(s=lk(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=vn(f=>{if(!xa(f,n,this.currentDirection))return;let c=l&&l[f]||{};s&&(c={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...c};return this.startAxisValueAnimation(f,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(lp(t,r,0,n))}stopAnimation(){vn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){vn(n=>{const{drag:r}=this.getProps();if(!xa(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(t[n]-Pe(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ii(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};vn(s=>{const a=this.getAxisMotionValue(s);if(a){const l=a.get();i[s]=SM({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),vn(s=>{if(!xa(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(Pe(l,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;DM.set(this.visualElement,this);const t=this.visualElement.current,n=Vn(t,"pointerdown",l=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Ii(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=$n(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(vn(f=>{const c=this.getAxisMotionValue(f);c&&(this.originPoint[f]+=l[f].translate,c.set(c.get()+l[f].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=fd,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function xa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function OM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class FM extends Ar{constructor(t){super(t),this.removeGroupControls=Ie,this.removeListeners=Ie,this.controls=new IM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ie}unmount(){this.removeGroupControls(),this.removeListeners()}}const I0=e=>(t,n)=>{e&&xe.update(()=>e(t,n))};class RM extends Ar{constructor(){super(...arguments),this.removePointerDownListener=Ie}onPointerDown(t){this.session=new sk(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:dk(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:I0(t),onStart:I0(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&xe.update(()=>i(o,s))}}}mount(){this.removePointerDownListener=Vn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function NM(){const e=A.useContext(pu);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=A.useId();return A.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const za={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function O0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Lo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(te.test(e))e=parseFloat(e);else return e;const n=O0(e,t.target.x),r=O0(e,t.target.y);return`${n}% ${r}%`}},jM={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Cr.parse(e);if(i.length>5)return r;const o=Cr.createTransformer(e),s=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=l;const u=Pe(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}};class $M extends he.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;KA(zM),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),za.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||xe.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function hk(e){const[t,n]=NM(),r=A.useContext(Ss);return he.createElement($M,{...e,layoutGroup:r,switchLayoutGroup:A.useContext(u2),isPresent:t,safeToRemove:n})}const zM={borderRadius:{...Lo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lo,borderTopRightRadius:Lo,borderBottomLeftRadius:Lo,borderBottomRightRadius:Lo,boxShadow:jM},pk=["TopLeft","TopRight","BottomLeft","BottomRight"],VM=pk.length,F0=e=>typeof e=="string"?parseFloat(e):e,R0=e=>typeof e=="number"||te.test(e);function BM(e,t,n,r,i,o){i?(e.opacity=Pe(0,n.opacity!==void 0?n.opacity:1,UM(r)),e.opacityExit=Pe(t.opacity!==void 0?t.opacity:1,0,HM(r))):o&&(e.opacity=Pe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;srt?1:n(Cs(e,t,r))}function j0(e,t){e.min=t.min,e.max=t.max}function qt(e,t){j0(e.x,t.x),j0(e.y,t.y)}function $0(e,t,n,r,i){return e-=t,e=_l(e,1/n,r),i!==void 0&&(e=_l(e,1/i,r)),e}function WM(e,t=0,n=1,r=.5,i,o=e,s=e){if(Cn.test(t)&&(t=parseFloat(t),t=Pe(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Pe(o.min,o.max,r);e===o&&(a-=t),e.min=$0(e.min,t,n,a,i),e.max=$0(e.max,t,n,a,i)}function z0(e,t,[n,r,i],o,s){WM(e,t[n],t[r],t[i],t.scale,o,s)}const GM=["x","scaleX","originX"],KM=["y","scaleY","originY"];function V0(e,t,n,r){z0(e.x,t,GM,n?n.x:void 0,r?r.x:void 0),z0(e.y,t,KM,n?n.y:void 0,r?r.y:void 0)}function B0(e){return e.translate===0&&e.scale===1}function gk(e){return B0(e.x)&&B0(e.y)}function qM(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function yk(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function U0(e){return Vt(e.x)/Vt(e.y)}class QM{constructor(){this.members=[]}add(t){up(this.members,t),t.scheduleRender()}remove(t){if(cp(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function H0(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:f}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),f&&(r+=`rotateY(${f}deg) `)}const s=e.x.scale*t.x,a=e.y.scale*t.y;return(s!==1||a!==1)&&(r+=`scale(${s}, ${a})`),r||"none"}const XM=(e,t)=>e.depth-t.depth;class YM{constructor(){this.children=[],this.isDirty=!1}add(t){up(this.children,t),this.isDirty=!0}remove(t){cp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(XM),this.isDirty=!1,this.children.forEach(t)}}function ZM(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Gn(r),e(o-t))};return xe.read(r,!0),()=>Gn(r)}function JM(e){window.MotionDebug&&window.MotionDebug.record(e)}function eD(e){return e instanceof SVGElement&&e.tagName!=="svg"}function tD(e,t,n){const r=ft(e)?e:ri(e);return r.start(lp("",r,t,n)),r.animation}const W0=["","X","Y","Z"],nD={visibility:"hidden"},G0=1e3;let rD=0;const $r={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function vk({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=t==null?void 0:t()){this.id=rD++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,$r.totalNodes=$r.resolvedTargetDeltas=$r.recalculatedProjection=0,this.nodes.forEach(sD),this.nodes.forEach(fD),this.nodes.forEach(dD),this.nodes.forEach(aD),JM($r)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=ZM(d,250),za.hasAnimatedSinceResize&&(za.hasAnimatedSinceResize=!1,this.nodes.forEach(q0))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||f.getDefaultTransition()||yD,{onLayoutAnimationStart:k,onLayoutAnimationComplete:g}=f.getProps(),m=!this.targetLayout||!yk(this.targetLayout,p)||h,y=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||d&&(m||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,y);const b={...ap(v,"layout"),onPlay:k,onComplete:g};(f.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else d||q0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Gn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(hD),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;fthis.update()))}clearAllSnapshots(){this.nodes.forEach(lD),this.sharedNodes.forEach(pD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const P=b/1e3;Q0(c.x,s.x,P),Q0(c.y,s.y,P),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mD(this.relativeTarget,this.relativeTargetOrigin,d,P),y&&qM(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Re()),qt(y,this.relativeTarget)),v&&(this.animationValues=f,BM(f,u,this.latestValues,P,m,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Gn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=xe.update(()=>{za.hasAnimatedSinceResize=!0,this.currentAnimation=tD(0,G0,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(G0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:f}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&wk(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Re();const c=Vt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+c;const d=Vt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}qt(a,l),Ri(a,f),Zo(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new QM),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const u={};for(let f=0;f{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(K0),this.root.sharedNodes.clear()}}}function iD(e){e.updateLayout()}function oD(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=n.source!==e.layout.source;o==="size"?vn(c=>{const d=s?n.measuredBox[c]:n.layoutBox[c],h=Vt(d);d.min=r[c].min,d.max=d.min+h}):wk(o,n.layoutBox,r)&&vn(c=>{const d=s?n.measuredBox[c]:n.layoutBox[c],h=Vt(r[c]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+h)});const a=Fi();Zo(a,r,n.layoutBox);const l=Fi();s?Zo(l,e.applyTransform(i,!0),n.measuredBox):Zo(l,r,n.layoutBox);const u=!gk(a);let f=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:h}=c;if(d&&h){const p=Re();Jo(p,n.layoutBox,d.layoutBox);const v=Re();Jo(v,r,h.layoutBox),yk(p,v)||(f=!0),c.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=p,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function sD(e){$r.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function aD(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function lD(e){e.clearSnapshot()}function K0(e){e.clearMeasurements()}function uD(e){e.isLayoutDirty=!1}function cD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function q0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function fD(e){e.resolveTargetDelta()}function dD(e){e.calcProjection()}function hD(e){e.resetRotation()}function pD(e){e.removeLeadSnapshot()}function Q0(e,t,n){e.translate=Pe(t.translate,0,n),e.scale=Pe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function X0(e,t,n,r){e.min=Pe(t.min,n.min,r),e.max=Pe(t.max,n.max,r)}function mD(e,t,n,r){X0(e.x,t.x,n.x,r),X0(e.y,t.y,n.y,r)}function gD(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const yD={duration:.45,ease:[.4,0,.1,1]},Y0=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),Z0=Y0("applewebkit/")&&!Y0("chrome/")?Math.round:Ie;function J0(e){e.min=Z0(e.min),e.max=Z0(e.max)}function vD(e){J0(e.x),J0(e.y)}function wk(e,t,n){return e==="position"||e==="preserve-aspect"&&!cd(U0(t),U0(n),.2)}const wD=vk({attachResizeListener:(e,t)=>$n(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Rc={current:void 0},xk=vk({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Rc.current){const e=new wD({});e.mount(window),e.setOptions({layoutScroll:!0}),Rc.current=e}return Rc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),xD={pan:{Feature:RM},drag:{Feature:FM,ProjectionNode:xk,MeasureLayout:hk}},kD=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function bD(e){const t=kD.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function pd(e,t,n=1){const[r,i]=bD(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return nk(s)?parseFloat(s):s}else return rd(i)?pd(i,t,n+1):i}function SD(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!rd(o))return;const s=pd(o,r);s&&i.set(s)});for(const i in t){const o=t[i];if(!rd(o))continue;const s=pd(o,r);s&&(t[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const CD=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),kk=e=>CD.has(e),_D=e=>Object.keys(e).some(kk),ey=e=>e===ci||e===te,ty=(e,t)=>parseFloat(e.split(", ")[t]),ny=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return ty(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?ty(o[1],e):0}},TD=new Set(["x","y","z"]),ED=js.filter(e=>!TD.has(e));function PD(e){const t=[];return ED.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Ji={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:ny(4,13),y:ny(5,14)};Ji.translateX=Ji.x;Ji.translateY=Ji.y;const AD=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{a[u]=Ji[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const f=t.getValue(u);f&&f.jump(a[u]),e[u]=Ji[u](l,o)}),e},LD=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(kk);let o=[],s=!1;const a=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let f=n[l],c=Ao(f);const d=t[l];let h;if(kl(d)){const p=d.length,v=d[0]===null?1:0;f=d[v],c=Ao(f);for(let k=v;k=0?window.pageYOffset:null,u=AD(t,e,a);return o.length&&o.forEach(([f,c])=>{e.getValue(f).set(c)}),e.render(),mu&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function MD(e,t,n,r){return _D(t)?LD(e,t,n,r):{target:t,transitionEnd:r}}const DD=(e,t,n,r)=>{const i=SD(e,t,r);return t=i.target,r=i.transitionEnd,MD(e,t,n,r)},md={current:null},bk={current:!1};function ID(){if(bk.current=!0,!!mu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>md.current=e.matches;e.addListener(t),t()}else md.current=!1}function OD(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],s=n[i];if(ft(o))e.addValue(i,o),Cl(r)&&r.add(i);else if(ft(s))e.addValue(i,ri(o,{owner:e})),Cl(r)&&r.remove(i);else if(s!==o)if(e.hasValue(i)){const a=e.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=e.getStaticValue(i);e.addValue(i,ri(a!==void 0?a:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const ry=new WeakMap,Sk=Object.keys(bs),FD=Sk.length,iy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],RD=Kh.length;class ND{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>xe.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=vu(n),this.isVariantNode=l2(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{});for(const c in f){const d=f[c];a[c]!==void 0&&ft(d)&&(d.set(a[c],!1),Cl(u)&&u.add(c))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,ry.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),bk.current||ID(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:md.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){ry.delete(this.current),this.projection&&this.projection.unmount(),Gn(this.notifyUpdate),Gn(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=ui.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&xe.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let s,a;for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:d,layoutRoot:h})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Re()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ri(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=ep(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!ft(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new fp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Ck extends ND{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let s=eM(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){ZL(this,r,s);const a=DD(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function jD(e){return window.getComputedStyle(e)}class $D extends Ck{readValueFromInstance(t,n){if(ui.has(n)){const r=sp(n);return r&&r.default||0}else{const r=jD(t),i=(d2(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return fk(t,n)}build(t,n,r,i){Qh(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Jh(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ft(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){v2(t,n,r,i)}}class zD extends Ck{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ui.has(n)){const r=sp(n);return r&&r.default||0}return n=w2.has(n)?n:Wh(n),t.getAttribute(n)}measureInstanceViewportBox(){return Re()}scrapeMotionValuesFromProps(t,n){return k2(t,n)}build(t,n,r,i){Yh(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){x2(t,n,r,i)}mount(t){this.isSVGTag=Zh(t.tagName),super.mount(t)}}const VD=(e,t)=>qh(e)?new zD(t,{enableHardwareAcceleration:!1}):new $D(t,{enableHardwareAcceleration:!0}),BD={layout:{ProjectionNode:xk,MeasureLayout:hk}},UD={...mM,...R6,...xD,...BD},Lt=WA((e,t)=>S6(e,t,UD,VD));function _k(){const e=A.useRef(!1);return gu(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Tk(){const e=_k(),[t,n]=A.useState(0),r=A.useCallback(()=>{e.current&&n(t+1)},[t]);return[A.useCallback(()=>xe.postRender(r),[r]),t]}class HD extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function WD({children:e,isPresent:t}){const n=A.useId(),r=A.useRef(null),i=A.useRef({width:0,height:0,top:0,left:0});return A.useInsertionEffect(()=>{const{width:o,height:s,top:a,left:l}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${s}px !important; + top: ${a}px !important; + left: ${l}px !important; + } + `),()=>{document.head.removeChild(u)}},[t]),A.createElement(HD,{isPresent:t,childRef:r,sizeRef:i},A.cloneElement(e,{ref:r}))}const Nc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=tp(GD),l=A.useId(),u=A.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:f=>{a.set(f,!0);for(const c of a.values())if(!c)return;r&&r()},register:f=>(a.set(f,!1),()=>a.delete(f))}),o?void 0:[n]);return A.useMemo(()=>{a.forEach((f,c)=>a.set(c,!1))},[n]),A.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=A.createElement(WD,{isPresent:n},e)),A.createElement(pu.Provider,{value:u},e)};function GD(){return new Map}function KD(e){return A.useEffect(()=>()=>e(),[])}const zr=e=>e.key||"";function qD(e,t){e.forEach(n=>{const r=zr(n);t.set(r,n)})}function QD(e){const t=[];return A.Children.forEach(e,n=>{A.isValidElement(n)&&t.push(n)}),t}const dp=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const a=A.useContext(Ss).forceRender||Tk()[0],l=_k(),u=QD(e);let f=u;const c=A.useRef(new Map).current,d=A.useRef(f),h=A.useRef(new Map).current,p=A.useRef(!0);if(gu(()=>{p.current=!1,qD(u,h),d.current=f}),KD(()=>{p.current=!0,h.clear(),c.clear()}),p.current)return A.createElement(A.Fragment,null,f.map(m=>A.createElement(Nc,{key:zr(m),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},m)));f=[...f];const v=d.current.map(zr),k=u.map(zr),g=v.length;for(let m=0;m{if(k.indexOf(y)!==-1)return;const b=h.get(y);if(!b)return;const P=v.indexOf(y);let T=m;if(!T){const D=()=>{c.delete(y);const I=Array.from(h.keys()).filter(j=>!k.includes(j));if(I.forEach(j=>h.delete(j)),d.current=u.filter(j=>{const E=zr(j);return E===y||I.includes(E)}),!c.size){if(l.current===!1)return;a(),r&&r()}};T=A.createElement(Nc,{key:zr(b),isPresent:!1,onExitComplete:D,custom:t,presenceAffectsLayout:o,mode:s},b),c.set(y,T)}f.splice(P,0,T)}),f=f.map(m=>{const y=m.key;return c.has(y)?m:A.createElement(Nc,{key:zr(m),isPresent:!0,presenceAffectsLayout:o,mode:s},m)}),A.createElement(A.Fragment,null,c.size?f:f.map(m=>A.cloneElement(m)))},XD=A.createContext(null),YD=e=>!e.isLayoutDirty&&e.willUpdate(!1);function oy(){const e=new Set,t=new WeakMap,n=()=>e.forEach(YD);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}const Ek=e=>e===!0,ZD=e=>Ek(e===!0)||e==="id",JD=({children:e,id:t,inherit:n=!0})=>{const r=A.useContext(Ss),i=A.useContext(XD),[o,s]=Tk(),a=A.useRef(null),l=r.id||i;a.current===null&&(ZD(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:Ek(n)&&r.group||oy()});const u=A.useMemo(()=>({...a.current,forceRender:o}),[s]);return A.createElement(Ss.Provider,{value:u},e)};function eI(e){const t=tp(()=>ri(e)),{isStatic:n}=A.useContext(du);if(n){const[,r]=A.useState(e);A.useEffect(()=>t.on("change",r),[])}return t}function hp(e,t={}){const{isStatic:n}=A.useContext(du),r=A.useRef(null),i=eI(ft(e)?e.get():e),o=()=>{r.current&&r.current.stop()};return A.useInsertionEffect(()=>i.attach((s,a)=>{if(n)return a(s);if(o(),r.current=_s({keyframes:[i.get(),s],velocity:i.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...t,onUpdate:a}),!Ge.isProcessing){const l=performance.now()-Ge.timestamp;l<30&&(r.current.time=_n(l))}return i.get()},o),[JSON.stringify(t)]),gu(()=>{if(ft(e))return e.on("change",s=>i.set(parseFloat(s)))},[i]),i}function tI(e){const{containerId:t,children:n}=e,r=A.useMemo(()=>document.getElementById(t),[t]);return r?A5.createPortal(n,r):null}const nI={enter:{opacity:1,transition:{duration:.3}},exit:{opacity:0,transition:{duration:.2,delay:.1}}},rI={enter:{scale:1,opacity:1,transition:{duration:.2,delay:.1}},exit:{scale:1.1,opacity:0,transition:{duration:.2}}};function bu(e){const{children:t,isOpen:n,onCloseRequest:r,className:i}=e;return w.jsx(tI,{containerId:"modals-portal",children:w.jsx(dp,{children:n&&w.jsx(Lt.div,{variants:nI,animate:"enter",exit:"exit",initial:"exit",className:"fixed inset-0 grid place-items-center overflow-auto bg-slate-900/50 p-6",onClick:r,children:w.jsx(Lt.div,{variants:rI,className:At("flex flex-col bg-slate-800 text-slate-100 shadow-lg",i),onClick:o=>{o.stopPropagation()},children:t})})})})}const iI=`## Timeline controls + +- Move ability instances by dragging them +- Dragged instances will displace others to respect the ability cooldown. Hold **Ctrl** for disabling the behaviour +- Holding **Shift** will cause all future instances of the ability to reset and move with the one you're dragging +- Hold **Alt** while dragging to make small adjustments to the cast times. + +## Left panel + +- Ctrl+Click an ability to go to it's wowhead page + +## Tips + +- You can load and save notes if you have a [compatible browser](https://caniuse.com/?search=showopenfilepicker) +- The exported MRT string is compatible with [Kaze ERT Timers Icons Wekaura](https://wago.io/n7l5uN3YM) +- Use the overlays section to paste in captures from your fight logs, I'm using damage taken and casts in this example :) + +![alt text](/img/lackoplan-screenshot.png) +`;function oI(){const[e,t]=A.useState(!1);return w.jsxs(w.Fragment,{children:[w.jsx(qe,{className:"text-xl",icon:"help",onClick:()=>t(!0)}),w.jsxs(bu,{isOpen:e,onCloseRequest:()=>t(!1),className:"border-2 border-slate-700 py-2 px-6",children:[w.jsx(qe,{icon:"close",className:"-mr-3 mt-1 self-end",onClick:()=>t(!1)}),w.jsx(o2,{markdown:iI})]})]})}function sI(){const{fileHandle:e,isFileSystemSupported:t}=su();return w.jsxs("header",{className:"relative flex items-baseline justify-center border-b-2 border-slate-700 py-3",children:[w.jsx("h1",{className:"text-2xl font-semibold",children:"Lackoplan"}),t&&e&&w.jsx("span",{className:"ml-2 text-sm text-slate-400",children:`[${e.name}]`}),w.jsxs("div",{className:"absolute right-0 top-0 flex h-full items-center gap-4 pr-3",children:[w.jsx("a",{className:"rounded-md border-2 border-yellow-600 bg-yellow-400 px-2 py-1 text-sm font-medium text-slate-800 transition-transform hover:scale-105",href:"https://www.buymeacoffee.com/lackobread",rel:"noreferrer noopener",target:"_blank",children:"🍞 Buy me a toast"}),w.jsx(oI,{})]})]})}const pe={WARRIOR:"warrior",PALADIN:"paladin",HUNTER:"hunter",ROGUE:"rogue",PRIEST:"priest",SHAMAN:"shaman",MAGE:"mage",WARLOCK:"warlock",MONK:"monk",DRUID:"druid",DEMONHUNTER:"demonhunter",DEATHKNIGHT:"deathknight",EVOKER:"evoker",GENERAL:"general"},aI={mini:"w-4",small:"w-6",medium:"w-8",large:"w-10",full:"w-full"};function eo(e){const{name:t,size:n="medium",className:r,...i}=e;return w.jsx("img",{src:`https://wow.zamimg.com/images/wow/icons/medium/${t}.jpg`,loading:"lazy",className:At(`${aI[n]}`,r),...i})}const Pk={[pe.WARRIOR]:"classicon_warrior",[pe.PALADIN]:"classicon_paladin",[pe.HUNTER]:"classicon_hunter",[pe.ROGUE]:"classicon_rogue",[pe.PRIEST]:"classicon_priest",[pe.SHAMAN]:"classicon_shaman",[pe.MAGE]:"classicon_mage",[pe.WARLOCK]:"classicon_warlock",[pe.MONK]:"classicon_monk",[pe.DRUID]:"classicon_druid",[pe.DEMONHUNTER]:"classicon_demonhunter",[pe.DEATHKNIGHT]:"classicon_deathknight",[pe.EVOKER]:"classicon_evoker",[pe.GENERAL]:"inv_cloth_broker_c_01_helm"};function lI(){this.__data__=[],this.size=0}var uI=lI;function cI(e,t){return e===t||e!==e&&t!==t}var pp=cI,fI=pp;function dI(e,t){for(var n=e.length;n--;)if(fI(e[n][0],t))return n;return-1}var Su=dI,hI=Su,pI=Array.prototype,mI=pI.splice;function gI(e){var t=this.__data__,n=hI(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():mI.call(t,n,1),--this.size,!0}var yI=gI,vI=Su;function wI(e){var t=this.__data__,n=vI(t,e);return n<0?void 0:t[n][1]}var xI=wI,kI=Su;function bI(e){return kI(this.__data__,e)>-1}var SI=bI,CI=Su;function _I(e,t){var n=this.__data__,r=CI(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var TI=_I,EI=uI,PI=yI,AI=xI,LI=SI,MI=TI;function uo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=L8}var kp=M8,D8=Bs,I8=kp,O8=Lr,F8="[object Arguments]",R8="[object Array]",N8="[object Boolean]",j8="[object Date]",$8="[object Error]",z8="[object Function]",V8="[object Map]",B8="[object Number]",U8="[object Object]",H8="[object RegExp]",W8="[object Set]",G8="[object String]",K8="[object WeakMap]",q8="[object ArrayBuffer]",Q8="[object DataView]",X8="[object Float32Array]",Y8="[object Float64Array]",Z8="[object Int8Array]",J8="[object Int16Array]",eR="[object Int32Array]",tR="[object Uint8Array]",nR="[object Uint8ClampedArray]",rR="[object Uint16Array]",iR="[object Uint32Array]",Se={};Se[X8]=Se[Y8]=Se[Z8]=Se[J8]=Se[eR]=Se[tR]=Se[nR]=Se[rR]=Se[iR]=!0;Se[F8]=Se[R8]=Se[q8]=Se[N8]=Se[Q8]=Se[j8]=Se[$8]=Se[z8]=Se[V8]=Se[B8]=Se[U8]=Se[H8]=Se[W8]=Se[G8]=Se[K8]=!1;function oR(e){return O8(e)&&I8(e.length)&&!!Se[D8(e)]}var sR=oR;function aR(e){return function(t){return e(t)}}var bp=aR,El={exports:{}};El.exports;(function(e,t){var n=Ak,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,s=o&&n.process,a=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=a})(El,El.exports);var Sp=El.exports,lR=sR,uR=bp,py=Sp,my=py&&py.isTypedArray,cR=my?uR(my):lR,Nk=cR,fR=h8,dR=wp,hR=Gt,pR=xp,mR=Rk,gR=Nk,yR=Object.prototype,vR=yR.hasOwnProperty;function wR(e,t){var n=hR(e),r=!n&&dR(e),i=!n&&!r&&pR(e),o=!n&&!r&&!i&&gR(e),s=n||r||i||o,a=s?fR(e.length,String):[],l=a.length;for(var u in e)(t||vR.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||mR(u,l)))&&a.push(u);return a}var jk=wR,xR=Object.prototype;function kR(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||xR;return e===n}var Cp=kR;function bR(e,t){return function(n){return e(t(n))}}var $k=bR,SR=$k,CR=SR(Object.keys,Object),_R=CR,TR=Cp,ER=_R,PR=Object.prototype,AR=PR.hasOwnProperty;function LR(e){if(!TR(e))return ER(e);var t=[];for(var n in Object(e))AR.call(e,n)&&n!="constructor"&&t.push(n);return t}var MR=LR,DR=Mk,IR=kp;function OR(e){return e!=null&&IR(e.length)&&!DR(e)}var _p=OR,FR=jk,RR=MR,NR=_p;function jR(e){return NR(e)?FR(e):RR(e)}var Us=jR,$R=Eu,zR=Us;function VR(e,t){return e&&$R(t,zR(t),e)}var BR=VR;function UR(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var HR=UR,WR=fo,GR=Cp,KR=HR,qR=Object.prototype,QR=qR.hasOwnProperty;function XR(e){if(!WR(e))return KR(e);var t=GR(e),n=[];for(var r in e)r=="constructor"&&(t||!QR.call(e,r))||n.push(r);return n}var YR=XR,ZR=jk,JR=YR,eN=_p;function tN(e){return eN(e)?ZR(e,!0):JR(e)}var Tp=tN,nN=Eu,rN=Tp;function iN(e,t){return e&&nN(t,rN(t),e)}var oN=iN,Pl={exports:{}};Pl.exports;(function(e,t){var n=An,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,s=o?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;function l(u,f){if(f)return u.slice();var c=u.length,d=a?a(c):new u.constructor(c);return u.copy(d),d}e.exports=l})(Pl,Pl.exports);var sN=Pl.exports;function aN(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},Iz=Dz,Oz=Array.prototype.concat,Fz=Array.prototype.slice,Dy=Jk.exports=function(t){for(var n=[],r=0,i=t.length;r=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};Nt.to.keyword=function(e){return tb[e.slice(0,3)]};function xr(e,t,n){return Math.min(Math.max(t,e),n)}function ba(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var Nz=Zk.exports,jz={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const Ts=jz,nb={};for(const e of Object.keys(Ts))nb[Ts[e]]=e;const X={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var rb=X;for(const e of Object.keys(X)){if(!("channels"in X[e]))throw new Error("missing channels property: "+e);if(!("labels"in X[e]))throw new Error("missing channel labels property: "+e);if(X[e].labels.length!==X[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=X[e];delete X[e].channels,delete X[e].labels,Object.defineProperty(X[e],"channels",{value:t}),Object.defineProperty(X[e],"labels",{value:n})}X.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=o-i;let a,l;o===i?a=0:t===o?a=(n-r)/s:n===o?a=2+(r-t)/s:r===o&&(a=4+(t-n)/s),a=Math.min(a*60,360),a<0&&(a+=360);const u=(i+o)/2;return o===i?l=0:u<=.5?l=s/(o+i):l=s/(2-o-i),[a,l*100,u*100]};X.rgb.hsv=function(e){let t,n,r,i,o;const s=e[0]/255,a=e[1]/255,l=e[2]/255,u=Math.max(s,a,l),f=u-Math.min(s,a,l),c=function(d){return(u-d)/6/f+1/2};return f===0?(i=0,o=0):(o=f/u,t=c(s),n=c(a),r=c(l),s===u?i=r-n:a===u?i=1/3+t-r:l===u&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,u*100]};X.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const i=X.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,o*100,r*100]};X.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),o=(1-t-i)/(1-i)||0,s=(1-n-i)/(1-i)||0,a=(1-r-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function $z(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}X.rgb.keyword=function(e){const t=nb[e];if(t)return t;let n=1/0,r;for(const i of Object.keys(Ts)){const o=Ts[i],s=$z(e,o);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const i=t*.4124+n*.3576+r*.1805,o=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[i*100,o*100,s*100]};X.rgb.lab=function(e){const t=X.rgb.xyz(e);let n=t[0],r=t[1],i=t[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const o=116*r-16,s=500*(n-r),a=200*(r-i);return[o,s,a]};X.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let i,o,s;if(n===0)return s=r*255,[s,s,s];r<.5?i=r*(1+n):i=r+n-r*n;const a=2*r-i,l=[0,0,0];for(let u=0;u<3;u++)o=t+1/3*-(u-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(i-a)*6*o:2*o<1?s=i:3*o<2?s=a+(i-a)*(2/3-o)*6:s=a,l[u]=s*255;return l};X.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,i=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=o<=1?o:2-o;const s=(r+n)/2,a=r===0?2*i/(o+i):2*n/(r+n);return[t,a*100,s*100]};X.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),s=255*r*(1-n),a=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,s];case 1:return[a,r,s];case 2:return[s,r,l];case 3:return[s,a,r];case 4:return[l,s,r];case 5:return[r,s,a]}};X.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01);let o,s;s=(2-n)*r;const a=(2-n)*i;return o=n*i,o/=a<=1?a:2-a,o=o||0,s/=2,[t,o*100,s*100]};X.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const i=n+r;let o;i>1&&(n/=i,r/=i);const s=Math.floor(6*t),a=1-r;o=6*t-s,s&1&&(o=1-o);const l=n+o*(a-n);let u,f,c;switch(s){default:case 6:case 0:u=a,f=l,c=n;break;case 1:u=l,f=a,c=n;break;case 2:u=n,f=a,c=l;break;case 3:u=n,f=l,c=a;break;case 4:u=l,f=n,c=a;break;case 5:u=a,f=n,c=l;break}return[u*255,f*255,c*255]};X.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,o=1-Math.min(1,t*(1-i)+i),s=1-Math.min(1,n*(1-i)+i),a=1-Math.min(1,r*(1-i)+i);return[o*255,s*255,a*255]};X.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let i,o,s;return i=t*3.2406+n*-1.5372+r*-.4986,o=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};X.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const i=116*n-16,o=500*(t-n),s=200*(n-r);return[i,o,s]};X.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let i,o,s;o=(t+16)/116,i=n/500+o,s=o-r/200;const a=o**3,l=i**3,u=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,s=u>.008856?u:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};X.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);const s=Math.sqrt(n*n+r*r);return[t,s,i]};X.lch.lab=function(e){const t=e[0],n=e[1],i=e[2]/360*2*Math.PI,o=n*Math.cos(i),s=n*Math.sin(i);return[t,o,s]};X.rgb.ansi16=function(e,t=null){const[n,r,i]=e;let o=t===null?X.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s};X.hsv.ansi16=function(e){return X.rgb.ansi16(X.hsv.rgb(e),e[2])};X.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};X.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,i=(t>>1&1)*n*255,o=(t>>2&1)*n*255;return[r,i,o]};X.ansi256.rgb=function(e){if(e>=232){const o=(e-232)*10+8;return[o,o,o]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,i=t%6/5*255;return[n,r,i]};X.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};X.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(a=>a+a).join(""));const r=parseInt(n,16),i=r>>16&255,o=r>>8&255,s=r&255;return[i,o,s]};X.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),s=i-o;let a,l;return s<1?a=o/(1-s):a=0,s<=0?l=0:i===t?l=(n-r)/s%6:i===n?l=2+(r-t)/s:l=4+(t-n)/s,l/=6,l%=1,[l*360,s*100,a*100]};X.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]};X.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]};X.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const i=[0,0,0],o=t%1*6,s=o%1,a=1-s;let l=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return l=(1-n)*r,[(n*i[0]+l)*255,(n*i[1]+l)*255,(n*i[2]+l)*255]};X.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let i=0;return r>0&&(i=t/r),[e[0],i*100,r*100]};X.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let i=0;return r>0&&r<.5?i=t/(2*r):r>=.5&&r<1&&(i=t/(2*(1-r))),[e[0],i*100,r*100]};X.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};X.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,i=r-t;let o=0;return i<1&&(o=(r-i)/(1-i)),[e[0],i*100,o*100]};X.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};X.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};X.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};X.gray.hsl=function(e){return[0,0,e[0]]};X.gray.hsv=X.gray.hsl;X.gray.hwb=function(e){return[0,100,e[0]]};X.gray.cmyk=function(e){return[0,0,0,e[0]]};X.gray.lab=function(e){return[e[0],0,0]};X.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};X.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const Ll=rb;function zz(){const e={},t=Object.keys(Ll);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function qz(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const i=e(n);if(typeof i=="object")for(let o=i.length,s=0;s{vi[e]={},Object.defineProperty(vi[e],"channels",{value:kd[e].channels}),Object.defineProperty(vi[e],"labels",{value:kd[e].labels});const t=Wz(e);Object.keys(t).forEach(r=>{const i=t[r];vi[e][r]=qz(i),vi[e][r].raw=Kz(i)})});var Qz=vi;const wi=Nz,Ft=Qz,ib=["keyword","gray","hex"],bd={};for(const e of Object.keys(Ft))bd[[...Ft[e].labels].sort().join("")]=e;const Ml={};function Qe(e,t){if(!(this instanceof Qe))return new Qe(e,t);if(t&&t in ib&&(t=null),t&&!(t in Ft))throw new Error("Unknown model: "+t);let n,r;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof Qe)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const i=wi.get(e);if(i===null)throw new Error("Unable to parse color from string: "+e);this.model=i.model,r=Ft[this.model].channels,this.color=i.value.slice(0,r),this.valpha=typeof i.value[r]=="number"?i.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=Ft[this.model].channels;const i=Array.prototype.slice.call(e,0,r);this.color=Sd(i,r),this.valpha=typeof e[r]=="number"?e[r]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const i=Object.keys(e);"alpha"in e&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const o=i.sort().join("");if(!(o in bd))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=bd[o];const{labels:s}=Ft[this.model],a=[];for(n=0;n(e%360+360)%360),saturationl:Me("hsl",1,ze(100)),lightness:Me("hsl",2,ze(100)),saturationv:Me("hsv",1,ze(100)),value:Me("hsv",2,ze(100)),chroma:Me("hcg",1,ze(100)),gray:Me("hcg",2,ze(100)),white:Me("hwb",1,ze(100)),wblack:Me("hwb",2,ze(100)),cyan:Me("cmyk",0,ze(100)),magenta:Me("cmyk",1,ze(100)),yellow:Me("cmyk",2,ze(100)),black:Me("cmyk",3,ze(100)),x:Me("xyz",0,ze(95.047)),y:Me("xyz",1,ze(100)),z:Me("xyz",2,ze(108.833)),l:Me("lab",0,ze(100)),a:Me("lab",1),b:Me("lab",2),keyword(e){return e!==void 0?new Qe(e):Ft[this.model].keyword(this.color)},hex(e){return e!==void 0?new Qe(e):wi.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new Qe(e);const t=this.rgb().round().color;let n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),wi.to.hex(t)+n},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[n,r]of e.entries()){const i=r/255;t[n]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return Qe.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,o=2*i-1,s=n.alpha()-r.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,l=1-a;return Qe.rgb(a*n.red()+l*r.red(),a*n.green()+l*r.green(),a*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(const e of Object.keys(Ft)){if(ib.includes(e))continue;const{channels:t}=Ft[e];Qe.prototype[e]=function(...n){return this.model===e?new Qe(this):n.length>0?new Qe(n,e):new Qe([...Zz(Ft[this.model][e].raw(this.color)),this.valpha],e)},Qe[e]=function(...n){let r=n[0];return typeof r=="number"&&(r=Sd(n,t)),new Qe(r,e)}}function Xz(e,t){return Number(e.toFixed(t))}function Yz(e){return function(t){return Xz(t,e)}}function Me(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(Ml[r]||(Ml[r]=[]))[t]=n;return e=e[0],function(r){let i;return r!==void 0?(n&&(r=n(r)),i=this[e](),i.color[t]=r,i):(i=this[e]().color[t],n&&(i=n(i)),i)}}function ze(e){return function(t){return Math.max(0,Math.min(e,t))}}function Zz(e){return Array.isArray(e)?e:[e]}function Sd(e,t){for(let n=0;n0&&n(a)?t>1?ob(a,t-1,n,r,i):l9(i,a):r||(i[i.length]=a)}return i}var c9=ob,f9=c9;function d9(e){var t=e==null?0:e.length;return t?f9(e,1):[]}var h9=d9;function p9(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var m9=p9,g9=m9,Fy=Math.max;function y9(e,t,n){return t=Fy(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=Fy(r.length-t,0),s=Array(o);++i0){if(++t>=T9)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var L9=A9,M9=_9,D9=L9,I9=D9(M9),O9=I9,F9=h9,R9=v9,N9=O9;function j9(e){return N9(R9(e,void 0,F9),e+"")}var $9=j9,Ny=Gk,z9=Ny&&new Ny,V9=z9;function B9(){}var U9=B9,jy=V9,H9=U9,W9=jy?function(e){return jy.get(e)}:H9,ab=W9,G9={},K9=G9,$y=K9,q9=Object.prototype,Q9=q9.hasOwnProperty;function X9(e){for(var t=e.name+"",n=$y[t],r=Q9.call($y,t)?n.length:0;r--;){var i=n[r],o=i.func;if(o==null||o==e)return i.name}return t}var lb=X9,Y9=Lp,Z9=Mp,J9=4294967295;function Il(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=J9,this.__views__=[]}Il.prototype=Y9(Z9.prototype);Il.prototype.constructor=Il;var Ip=Il,eV=Ip,tV=Dp,nV=zk;function rV(e){if(e instanceof eV)return e.clone();var t=new tV(e.__wrapped__,e.__chain__);return t.__actions__=nV(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var iV=rV,oV=Ip,zy=Dp,sV=Mp,aV=Gt,lV=Lr,uV=iV,cV=Object.prototype,fV=cV.hasOwnProperty;function Ol(e){if(lV(e)&&!aV(e)&&!(e instanceof oV)){if(e instanceof zy)return e;if(fV.call(e,"__wrapped__"))return uV(e)}return new zy(e)}Ol.prototype=sV.prototype;Ol.prototype.constructor=Ol;var dV=Ol,hV=Ip,pV=ab,mV=lb,gV=dV;function yV(e){var t=mV(e),n=gV[t];if(typeof n!="function"||!(t in hV.prototype))return!1;if(e===n)return!0;var r=pV(n);return!!r&&e===r[0]}var vV=yV,Vy=Dp,wV=$9,xV=ab,zc=lb,kV=Gt,By=vV,bV="Expected a function",SV=8,CV=32,_V=128,TV=256;function EV(e){return wV(function(t){var n=t.length,r=n,i=Vy.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if(typeof o!="function")throw new TypeError(bV);if(i&&!s&&zc(o)=="wrapper")var s=new Vy([],!0)}for(r=s?r:n;++r(t.cooldown=e,t)},addCooldown(e){return t=>(t.cooldown=t.cooldown+e,t)},multiplyCooldown(e){return t=>(t.cooldown=t.cooldown*e,t)},setIcon(e){return t=>(t.icon=e,t)},setSpellId(e){return t=>(t.spellId=e,t)},setName(e){return t=>(t.name=e,t)},setShortName(e){return t=>(t.shortName=e,t)},setWowheadLink(e){return t=>(t.wowheadLink=e,t)}},ub={[pe.GENERAL]:[{name:"Personal defensives",spellId:160533,shortName:"Personals",cooldown:60*2,icon:"ability_vehicle_shellshieldgenerator",modifiers:[]},{name:"1 min CDs",spellId:168430,shortName:"1 min CDs",cooldown:60*1,icon:"achievement_pvp_h_01",modifiers:[]},{name:"2 min CDs",spellId:168431,shortName:"2 min CDs",cooldown:60*2,icon:"achievement_pvp_h_02",modifiers:[]},{name:"3 min CDs",spellId:71195,shortName:"3 min CDs",cooldown:60*3,icon:"achievement_pvp_h_03",modifiers:[]},{name:"Healthstone",spellId:251527,shortName:"Healthstone",cooldown:60*60,icon:"warlock_-healthstone",modifiers:[]},{name:"Health Potion",spellId:194629,shortName:"Poti",cooldown:60*5,icon:"inv_potion_27",modifiers:[]}],[pe.WARRIOR]:[{wowheadLink:"https://www.wowhead.com/spell=97462/rallying-cry",name:"Rallying Cry",spellId:97462,shortName:"Rally",cooldown:60*3,icon:"ability_toughness",modifiers:[]}],[pe.PALADIN]:[{wowheadLink:"https://www.wowhead.com/spell=31884/avenging-wrath",name:"Avenging Wrath",spellId:31884,shortName:"Wings",cooldown:60*2,icon:"spell_holy_avenginewrath",modifiers:[{icon:"ability_paladin_veneration",process:Fr(ne.setCooldown(60),ne.setIcon("ability_paladin_veneration"),ne.setSpellId(216331),ne.setName("Avenging Crusader"),ne.setShortName("Avenging Crusader"),ne.setWowheadLink("https://www.wowhead.com/spell=216331/avenging-crusader"))}]},{wowheadLink:"https://www.wowhead.com/spell=375576/divine-toll",name:"Divine Toll",spellId:375576,shortName:"Toll",cooldown:60,icon:"ability_bastion_paladin",modifiers:[{icon:"spell_holy_pureofheart",wowheadLink:"https://www.wowhead.com/spell=379391/quickened-invocation",description:"Quickened Invocation",process:ne.addCooldown(-15)}]},{wowheadLink:"https://www.wowhead.com/spell=200652/tyrs-deliverance",name:"Tyr's Deliverance",spellId:200652,shortName:"Tyr's Deliverance",cooldown:60*1.5,icon:"inv_mace_2h_artifactsilverhand_d_01",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=31821/aura-mastery",name:"Aura Mastery",spellId:31821,shortName:"Mastery",cooldown:60*3,icon:"spell_holy_auramastery",modifiers:[{icon:"spell_holy_fanaticism",wowheadLink:"https://www.wowhead.com/spell=392911/unwavering-spirit",description:"Unwavering Spirit",process:ne.addCooldown(-30)}]},{wowheadLink:"https://www.wowhead.com/spell=1022/blessing-of-protection",name:"Blessing of Protection",spellId:1022,shortName:"Protection",cooldown:60*5,icon:"spell_holy_sealofprotection",modifiers:[{wowheadLink:"https://www.wowhead.com/spell=384909/improved-blessing-of-protection",icon:"spell_holy_sealofprotection",process:Fr(ne.addCooldown(-60))}]},{wowheadLink:"https://www.wowhead.com/spell=204018/blessing-of-spellwarding",name:"Blessing of Spellwarding",spellId:204018,shortName:"Spellwarding",cooldown:60*5,icon:"spell_holy_blessingofprotection",modifiers:[{wowheadLink:"https://www.wowhead.com/spell=384909/improved-blessing-of-protection",icon:"spell_holy_sealofprotection",process:Fr(ne.addCooldown(-60))},{wowheadLink:"https://www.wowhead.com/spell=378425/uthers-counsel",icon:"spell_holy_greaterblessingofsalvation",process:Fr(ne.multiplyCooldown(.7))}]}],[pe.HUNTER]:[],[pe.ROGUE]:[],[pe.PRIEST]:[{wowheadLink:"https://www.wowhead.com/spell=120517/halo",name:"Halo",spellId:120517,shortName:"Halo",cooldown:60,icon:"ability_priest_halo",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=64843/divine-hymn",name:"Divine Hymn",spellId:64843,shortName:"Hymn",spec:"holy",cooldown:60*3,icon:"spell_holy_divinehymn",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=265202/holy-word-salvation",name:"Holy Word: Salvation",spellId:265202,shortName:"Salvation",spec:"holy",cooldown:60*4,icon:"ability_priest_archangel",modifiers:[{icon:"ability_priest_ascension",process:Fr(ne.setCooldown(60*2),ne.setIcon("ability_priest_ascension"),ne.setSpellId(200183),ne.setName("Apotheosis"),ne.setShortName("Apotheosis"),ne.setWowheadLink("https://www.wowhead.com/spell=200183/apotheosis"))}]},{wowheadLink:"https://www.wowhead.com/spell=372835/lightwell",name:"Lightwell",spellId:372835,shortName:"Well",spec:"holy",cooldown:60*1.5,icon:"spell_holy_summonlightwell",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=64901/symbol-of-hope",name:"Symbol of Hope",spellId:64901,shortName:"Hope",spec:"holy",cooldown:60*3,icon:"spell_holy_symbolofhope",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=34433/shadowfiend?spellModifier=137032",name:"Shadowfiend",spellId:34433,shortName:"Shadowfiend",spec:"discipline",cooldown:60*3,icon:"spell_shadow_shadowfiend",modifiers:[{icon:"spell_shadow_soulleech_3",process:Fr(ne.setCooldown(60),ne.setIcon("spell_shadow_soulleech_3"),ne.setSpellId(123040),ne.setName("Mindbender"),ne.setShortName("Mindbender"),ne.setWowheadLink("https://www.wowhead.com/spell=123040/mindbender"))}]},{wowheadLink:"https://www.wowhead.com/spell=246287/evangelism",name:"Evangelism",spellId:246287,shortName:"Evang",spec:"discipline",cooldown:60*1.5,icon:"spell_holy_divineillumination",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=47536/rapture",name:"Rapture",spellId:47536,shortName:"Rapture",spec:"discipline",cooldown:60*1.5,icon:"spell_holy_rapture",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=421453/ultimate-penitence",name:"Ultimate Penitence",spellId:421453,shortName:"Ultimate Penitence",spec:"discipline",cooldown:60*4,icon:"ability_priest_ascendance",modifiers:[{wowheadLink:"https://www.wowhead.com/spell=421558/heavens-wrath",icon:"spell_holy_penance",description:"Heaven's Wrath expected CD: 1m",process:ne.addCooldown(-60)}]},{wowheadLink:"https://www.wowhead.com/spell=62618/power-word-barrier",name:"Power Work: Barrier",spellId:62618,shortName:"Barrier",spec:"discipline",cooldown:60*3,icon:"spell_holy_powerwordbarrier",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=33206/pain-suppression",name:"Pain Suppression",spellId:33206,shortName:"Pain Suppression",spec:"discipline",cooldown:60*3,icon:"spell_holy_painsupression",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=15286/vampiric-embrace",name:"Vampiric Embrace",spellId:15286,shortName:"Embrace",cooldown:60*2,icon:"spell_shadow_unsummonbuilding",modifiers:[]}],[pe.SHAMAN]:[{wowheadLink:"https://www.wowhead.com/spell=114052/ascendance",name:"Ascendance",spellId:114052,shortName:"Asc",cooldown:60*3,icon:"spell_fire_elementaldevastation",modifiers:[{wowheadLink:"https://www.wowhead.com/spell=462440/first-ascendant",icon:"spell_shaman_astralshift",description:"First Ascendant",process:ne.addCooldown(-60)}]},{wowheadLink:"https://www.wowhead.com/spell=108280/healing-tide-totem",name:"Healing Tide Totem",spellId:108280,shortName:"Tide",cooldown:60*2.75,icon:"ability_shaman_healingtide",modifiers:[{wowheadLink:"https://www.wowhead.com/spell=404015/current-control",icon:"ability_shaman_healingtide",description:"Current Control",process:ne.addCooldown(-45)}]},{wowheadLink:"https://www.wowhead.com/spell=198838/earthen-wall-totem",name:"Earthen Wall Totem",spellId:198838,shortName:"Wall",cooldown:60,icon:"spell_nature_stoneskintotem",modifiers:[{icon:"spell_nature_reincarnation",process:Fr(ne.setCooldown(60*5),ne.setIcon("spell_nature_reincarnation"),ne.setSpellId(207399),ne.setName("Ancestral Protection Totem"),ne.setShortName("Res Totem"),ne.setWowheadLink("https://www.wowhead.com/spell=207399/ancestral-protection-totem"))}]},{wowheadLink:"https://www.wowhead.com/spell=98008/spirit-link-totem",name:"Spirit Link Totem",spellId:98008,shortName:"Link",cooldown:60*3,icon:"spell_shaman_spiritlink",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=192077/wind-rush-totem",name:"Wind Rush Totem",spellId:192077,shortName:"Rush",cooldown:60*2,icon:"ability_shaman_windwalktotem",modifiers:[{wowheadLink:"https://www.wowhead.com/spell=462791/ascending-air",icon:"achievement_raidprimalist_windelemental",description:"Ascending Air",process:ne.addCooldown(-30)}]},{wowheadLink:"https://www.wowhead.com/spell=108281/ancestral-guidance",name:"Ancestral Guidance",spellId:108281,shortName:"Guidance",cooldown:60*2,icon:"ability_shaman_ancestralguidance",modifiers:[]}],[pe.MAGE]:[],[pe.WARLOCK]:[],[pe.MONK]:[{wowheadLink:"https://www.wowhead.com/spell=325197/invoke-chi-ji-the-red-crane",name:"Invoke Celestial",spellId:325197,shortName:"Celestial",cooldown:60*3,icon:"inv_pet_cranegod",modifiers:[{icon:"inv_pet_jadeserpentpet",description:"Gift of the Celestials",wowheadLink:"https://www.wowhead.com/spell=388212/gift-of-the-celestials",process:ne.addCooldown(-60*2),exclusiveWith:[1]},{icon:"inv_inscription_deck_jadeserpent",description:"Jade Bond",wowheadLink:"https://www.wowhead.com/spell=388031/jade-bond",process:ne.addCooldown(-60),exclusiveWith:[0]}]},{wowheadLink:"https://www.wowhead.com/spell=443028/celestial-conduit?spellModifier=137024",name:"Celestial Conduit",spellId:443028,shortName:"Conduit",cooldown:60*1.5,icon:"inv_ability_conduitofthecelestialsmonk_celestialconduit",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=115310/revival",name:"Revival",spellId:115310,shortName:"Revival",cooldown:60*3,icon:"spell_monk_revival",modifiers:[{icon:"monk_stance_wiseserpent",description:"Uplifted Spirits. Expected CDR: 1m",wowheadLink:"https://www.wowhead.com/spell=388551/uplifted-spirits",process:ne.addCooldown(-60)}]},{wowheadLink:"https://www.wowhead.com/spell=116849/life-cocoon",name:"Life Cocoon",spellId:116849,shortName:"Cocoon",cooldown:60*2,icon:"ability_monk_chicocoon",modifiers:[{icon:"ability_monk_domeofmist",wowheadLink:"https://www.wowhead.com/spell=202424/chrysalis",process:ne.addCooldown(-45)}]}],[pe.DRUID]:[{wowheadLink:"https://www.wowhead.com/spell=33891/incarnation-tree-of-life",name:"Incarnation: Tree of Life",spellId:33891,shortName:"Tree",cooldown:60*3,icon:"ability_druid_improvedtreeform",modifiers:[{icon:"ability_druid_treeoflife",description:"Cenarius' Guidance",wowheadLink:"https://www.wowhead.com/spell=393371/cenarius-guidance",process:ne.addCooldown(-60)}]},{wowheadLink:"https://www.wowhead.com/spell=740/tranquility",name:"Tranquility",spellId:740,shortName:"Tranq",cooldown:60*3,icon:"spell_nature_tranquility",modifiers:[{icon:"ability_druid_dreamstate",description:"Inner Peace",wowheadLink:"https://www.wowhead.com/spell=197073/inner-peace",process:ne.addCooldown(-30)}]},{wowheadLink:"https://www.wowhead.com/spell=197721/flourish",name:"Flourish",spellId:197721,shortName:"Flourish",cooldown:60,icon:"spell_druid_wildburst",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=391528/convoke-the-spirits",name:"Convoke the Spirits",spellId:391528,shortName:"Convoke",cooldown:60*2,icon:"ability_ardenweald_druid",modifiers:[{icon:"ability_ardenweald_druid",description:"Cenarius Guidance",wowheadLink:"https://www.wowhead.com/spell=393371/cenarius-guidance",process:ne.multiplyCooldown(.5)}]},{wowheadLink:"https://www.wowhead.com/spell=29166/innervate",name:"Innervate",spellId:29166,shortName:"Innervate",cooldown:60*3,icon:"spell_nature_lightning",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=106898/stampeding-roar",name:"Stampeding Roar",spellId:106898,shortName:"Roar",cooldown:60*2,icon:"spell_druid_stampedingroar_cat",modifiers:[{icon:"spell_druid_stampedingroar_cat",description:"Improved Stampeding Roar",wowheadLink:"https://www.wowhead.com/spell=288826/improved-stampeding-roar",process:ne.addCooldown(-60)}]}],[pe.DEMONHUNTER]:[{wowheadLink:"https://www.wowhead.com/spell=196718/darkness",name:"Darkness",spellId:196718,shortName:"Dark",cooldown:60*3,icon:"ability_demonhunter_darkness",modifiers:[]}],[pe.DEATHKNIGHT]:[{wowheadLink:"https://www.wowhead.com/spell=51052/anti-magic-zone",name:"AntiMagic Zone",spellId:51052,shortName:"AMZ",cooldown:60*2,icon:"spell_deathknight_antimagiczone",modifiers:[]}],[pe.EVOKER]:[{wowheadLink:"https://www.wowhead.com/spell=363534/rewind",name:"Rewind",spellId:363534,shortName:"Rewind",cooldown:60*4,icon:"ability_evoker_rewind",modifiers:[{icon:"ability_evoker_rewind",description:"Temporal Artificer",wowheadLink:"https://www.wowhead.com/spell=381922/temporal-artificer",process:ne.addCooldown(-60)}]},{wowheadLink:"https://www.wowhead.com/spell=370537/stasis",name:"Stasis",spellId:370537,shortName:"Stasis",cooldown:60*1.5,icon:"ability_evoker_stasis",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=370960/emerald-communion",name:"Emerald Communion",spellId:370960,shortName:"Communion",cooldown:60*3,icon:"ability_evoker_green_01",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=359816/dream-flight",name:"Dream Flight",spellId:359816,shortName:"Breath",cooldown:60*2,icon:"ability_evoker_dreamflight",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=374227/zephyr",name:"Zephyr",spellId:374227,shortName:"Zephyr",cooldown:60*2,icon:"ability_evoker_hoverblack",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=374968/time-spiral",name:"Time Spiral",spellId:374968,shortName:"Spiral",cooldown:60*2,icon:"ability_evoker_timespiral",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=370665/rescue",name:"Rescue",spellId:370665,shortName:"Rescue",cooldown:60,icon:"ability_evoker_flywithme",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=406732/spatial-paradox",name:"Spatial Paradox",spellId:406732,shortName:"Paradox",cooldown:60*2,icon:"ability_evoker_stretchtime",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=370553/tip-the-scales",name:"Tip the Scales",spellId:370553,shortName:"Tip the Scales",cooldown:60*2,icon:"ability_evoker_tipthescales",modifiers:[]}]},DV=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function cb(e){return{id:es(),class:e,name:e,isActive:!0,abilities:ub[e].map(t=>({id:es(),ability:Al(t),originalAbility:Al(t),isActive:!1,activeModifiers:t.modifiers.map(()=>!1),castTimes:[]}))}}function Cd(e){const t=e.originalAbility.modifiers.reduce((n,r,i)=>(e.activeModifiers[i]&&r.process(n),n),Al(e.originalAbility));e.ability=t}function Fl(e,t){return[...Array(Math.floor(t/e)+1)].map((n,r)=>e*r)}function IV(e){const[t,n]=e.split(":");return(parseInt(t)||0)*60+(parseInt(n)||0)}function ar(e){return`${Math.floor(e/60)}:${String(Math.floor(e%60)).padStart(2,"0")}`}function Uy(e){switch(e.type){case"phase":return`p${e.phase}`;case"event":return`${e.event}:${e.spell}:${e.counter}`}}var OV={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Hy=e=>{let t;const n=new Set,r=(l,u)=>{const f=typeof l=="function"?l(t):l;if(!Object.is(f,t)){const c=t;t=u??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(d=>d(t,c))}},i=()=>t,a={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{(OV?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,i,a),a},FV=e=>e?Hy(e):Hy;var fb={exports:{}},db={},hb={exports:{}},pb={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var to=A;function RV(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var NV=typeof Object.is=="function"?Object.is:RV,jV=to.useState,$V=to.useEffect,zV=to.useLayoutEffect,VV=to.useDebugValue;function BV(e,t){var n=t(),r=jV({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return zV(function(){i.value=n,i.getSnapshot=t,Vc(i)&&o({inst:i})},[e,n,t]),$V(function(){return Vc(i)&&o({inst:i}),e(function(){Vc(i)&&o({inst:i})})},[e]),VV(n),n}function Vc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!NV(e,n)}catch{return!0}}function UV(e,t){return t()}var HV=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?UV:BV;pb.useSyncExternalStore=to.useSyncExternalStore!==void 0?to.useSyncExternalStore:HV;hb.exports=pb;var WV=hb.exports;/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Au=A,GV=WV;function KV(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qV=typeof Object.is=="function"?Object.is:KV,QV=GV.useSyncExternalStore,XV=Au.useRef,YV=Au.useEffect,ZV=Au.useMemo,JV=Au.useDebugValue;db.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=XV(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=ZV(function(){function l(h){if(!u){if(u=!0,f=h,h=r(h),i!==void 0&&s.hasValue){var p=s.value;if(i(p,h))return c=p}return c=h}if(p=c,qV(f,h))return p;var v=r(h);return i!==void 0&&i(p,v)?p:(f=h,c=v)}var u=!1,f,c,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,i]);var a=QV(e,o[0],o[1]);return YV(function(){s.hasValue=!0,s.value=a},[a]),JV(a),a};fb.exports=db;var e7=fb.exports;const t7=En(e7);var mb={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:n7}=he,{useSyncExternalStoreWithSelector:r7}=t7;let Wy=!1;function i7(e,t=e.getState,n){(mb?"production":void 0)!=="production"&&n&&!Wy&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Wy=!0);const r=r7(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return n7(r),r}const Gy=e=>{(mb?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?FV(e):e,n=(r,i)=>i7(t,r,i);return Object.assign(n,t),n},o7=e=>e?Gy(e):Gy;var gb=Symbol.for("immer-nothing"),Ky=Symbol.for("immer-draftable"),Bt=Symbol.for("immer-state");function un(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var no=Object.getPrototypeOf;function ro(e){return!!e&&!!e[Bt]}function ii(e){var t;return e?yb(e)||Array.isArray(e)||!!e[Ky]||!!((t=e.constructor)!=null&&t[Ky])||Mu(e)||Du(e):!1}var s7=Object.prototype.constructor.toString();function yb(e){if(!e||typeof e!="object")return!1;const t=no(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===s7}function Es(e,t){Lu(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function Lu(e){const t=e[Bt];return t?t.type_:Array.isArray(e)?1:Mu(e)?2:Du(e)?3:0}function _d(e,t){return Lu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function vb(e,t,n){const r=Lu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function a7(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Mu(e){return e instanceof Map}function Du(e){return e instanceof Set}function Br(e){return e.copy_||e.base_}function Td(e,t){if(Mu(e))return new Map(e);if(Du(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&yb(e))return no(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Bt];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=l7),Object.freeze(e),t&&Es(e,(n,r)=>Op(r,!0))),e}function l7(){un(2)}function Iu(e){return Object.isFrozen(e)}var u7={};function oi(e){const t=u7[e];return t||un(0,e),t}var Ps;function wb(){return Ps}function c7(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function qy(e,t){t&&(oi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ed(e){Pd(e),e.drafts_.forEach(f7),e.drafts_=null}function Pd(e){e===Ps&&(Ps=e.parent_)}function Qy(e){return Ps=c7(Ps,e)}function f7(e){const t=e[Bt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Xy(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Bt].modified_&&(Ed(t),un(4)),ii(e)&&(e=Rl(t,e),t.parent_||Nl(t,e)),t.patches_&&oi("Patches").generateReplacementPatches_(n[Bt].base_,e,t.patches_,t.inversePatches_)):e=Rl(t,n,[]),Ed(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==gb?e:void 0}function Rl(e,t,n){if(Iu(t))return t;const r=t[Bt];if(!r)return Es(t,(i,o)=>Yy(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Nl(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),Es(o,(a,l)=>Yy(e,r,i,a,l,n,s)),Nl(e,i,!1),n&&e.patches_&&oi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Yy(e,t,n,r,i,o,s){if(ro(i)){const a=o&&t&&t.type_!==3&&!_d(t.assigned_,r)?o.concat(r):void 0,l=Rl(e,i,a);if(vb(n,r,l),ro(l))e.canAutoFreeze_=!1;else return}else s&&n.add(i);if(ii(i)&&!Iu(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Rl(e,i),(!t||!t.scope_.parent_)&&Nl(e,i)}}function Nl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Op(t,n)}function d7(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:wb(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Fp;n&&(i=[r],o=As);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var Fp={get(e,t){if(t===Bt)return e;const n=Br(e);if(!_d(n,t))return h7(e,n,t);const r=n[t];return e.finalized_||!ii(r)?r:r===Bc(e.base_,t)?(Uc(e),e.copy_[t]=Ld(r,e)):r},has(e,t){return t in Br(e)},ownKeys(e){return Reflect.ownKeys(Br(e))},set(e,t,n){const r=xb(Br(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Bc(Br(e),t),o=i==null?void 0:i[Bt];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(a7(n,i)&&(n!==void 0||_d(e.base_,t)))return!0;Uc(e),Ad(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Bc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Uc(e),Ad(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Br(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){un(11)},getPrototypeOf(e){return no(e.base_)},setPrototypeOf(){un(12)}},As={};Es(Fp,(e,t)=>{As[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});As.deleteProperty=function(e,t){return As.set.call(this,e,t,void 0)};As.set=function(e,t,n){return Fp.set.call(this,e[0],t,n,e[0])};function Bc(e,t){const n=e[Bt];return(n?Br(n):e)[t]}function h7(e,t,n){var i;const r=xb(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function xb(e,t){if(!(t in e))return;let n=no(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=no(n)}}function Ad(e){e.modified_||(e.modified_=!0,e.parent_&&Ad(e.parent_))}function Uc(e){e.copy_||(e.copy_=Td(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var p7=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const s=this;return function(l=o,...u){return s.produce(l,f=>n.call(this,f,...u))}}typeof n!="function"&&un(6),r!==void 0&&typeof r!="function"&&un(7);let i;if(ii(t)){const o=Qy(this),s=Ld(t,void 0);let a=!0;try{i=n(s),a=!1}finally{a?Ed(o):Pd(o)}return qy(o,r),Xy(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===gb&&(i=void 0),this.autoFreeze_&&Op(i,!0),r){const o=[],s=[];oi("Patches").generateReplacementPatches_(t,i,o,s),r(o,s)}return i}else un(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,i;return[this.produce(t,n,(s,a)=>{r=s,i=a}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ii(e)||un(8),ro(e)&&(e=m7(e));const t=Qy(this),n=Ld(e,void 0);return n[Bt].isManual_=!0,Pd(t),n}finishDraft(e,t){const n=e&&e[Bt];(!n||!n.isManual_)&&un(9);const{scope_:r}=n;return qy(r,t),Xy(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=oi("Patches").applyPatches_;return ro(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Ld(e,t){const n=Mu(e)?oi("MapSet").proxyMap_(e,t):Du(e)?oi("MapSet").proxySet_(e,t):d7(e,t);return(t?t.scope_:wb()).drafts_.push(n),n}function m7(e){return ro(e)||un(10,e),kb(e)}function kb(e){if(!ii(e)||Iu(e))return e;const t=e[Bt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Td(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Td(e,!0);return Es(n,(r,i)=>{vb(n,r,kb(i))}),t&&(t.finalized_=!1),n}var Ut=new p7,g7=Ut.produce;Ut.produceWithPatches.bind(Ut);Ut.setAutoFreeze.bind(Ut);Ut.setUseStrictShallowCopy.bind(Ut);Ut.applyPatches.bind(Ut);Ut.createDraft.bind(Ut);Ut.finishDraft.bind(Ut);const y7=e=>(t,n,r)=>(r.setState=(i,o,...s)=>{const a=typeof i=="function"?g7(i):i;return t(a,o,...s)},e(r.setState,n,r)),v7=y7,w7=` +# Hi! + +Click on the edit button to add your own notes. + +Use **all** the [markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) you want!. +`,ee=o7()(v7((e,t)=>({duration:60*9+17,userNote:w7,players:[],casts:[],overlays:["","",""],markers:[],markersEnabled:!0,exportState:(n=!1)=>{const r=t();return S7(r,n)},importState:n=>e(r=>{C7(r,n)}),setDuration:n=>e(r=>{r.duration=n}),setUserNote:n=>e(r=>{r.userNote=n}),setOverlay:(n,r)=>e(i=>{i.overlays[n]=r}),addPlayer:n=>e(r=>{r.players.push(n)}),duplicatePlayer:n=>e(r=>{const i=r.players.findIndex(o=>o.id===n);if(i!=-1){const o=Al(r.players[i]);o.id=es(),r.players.splice(i,0,o)}}),removePlayer:n=>e(r=>{const i=r.players.findIndex(o=>o.id===n);i!==-1&&r.players.splice(i,1)}),togglePlayer:n=>e(r=>{const i=jl(r,n);i&&(i.isActive=!i.isActive)}),movePlayer:(n,r)=>e(i=>{const o=i.players.findIndex(s=>s.id===n);if(o!==-1){const s=i.players[o],a=Math.max(0,o+r);i.players.splice(o,1),i.players.splice(a,0,s)}}),toggleAbility:(n,r)=>e(i=>{const o=xn(i,n,r);o&&(o.isActive=!o.isActive,o.isActive&&(Cd(o),o.castTimes=Fl(o.ability.cooldown,i.duration)))}),changePlayerName:(n,r)=>e(i=>{const o=jl(i,n);o&&(o.name=r)}),toggleAbilityModifier:(n,r,i)=>e(o=>{var a;const s=xn(o,n,r);s&&((a=s.ability.modifiers[i].dependsOn)!=null&&a.map(l=>s.activeModifiers[l]).some(l=>!l)||(s.activeModifiers[i]=!s.activeModifiers[i],T7(s,i),Cd(s),s.castTimes=Fl(s.ability.cooldown,o.duration)))}),updateCastTime:({playerId:n,abilityId:r,castIndex:i,newCastTime:o,constrain:s=!1,replicateLeft:a=!1})=>e(l=>{const u=xn(l,n,r);if(!u)return;const f=l.duration;x7(u,i,o,f,s),k7(u,i),b7(u,i,f,a)}),toggleMarkers:n=>e(r=>{r.markersEnabled=n??!r.markersEnabled}),addMarker:n=>e(r=>{let i;switch(n){case"phase":i={id:es(),type:"phase",time:0,phase:1};break;case"event":i={id:es(),type:"event",time:0,counter:1,event:"SCS",spell:0};break}r.markers.push(i)}),updateMarker:(n,r)=>e(i=>{const o=i.markers.find(a=>a.id===n);if(!o)return;const s=Math.max(0,Math.min(r.time??o.time,i.duration));o.time=s,o.type==="phase"&&r.type==="phase"&&(o.phase=r.phase??o.phase),o.type==="event"&&r.type==="event"&&(o.event=r.event??o.event,o.spell=r.spell??o.spell,o.counter=r.counter??o.counter)}),removeMarker:n=>e(r=>{const i=r.markers.findIndex(o=>o.id===n);i!==-1&&r.markers.splice(i,1)})})));function x7(e,t,n,r,i){if(n<0){e.castTimes[t]=0;return}if(n>r){e.castTimes[t]=r;return}if(i){const o=e.ability.cooldown;if(t>0&&n-e.castTimes[t-1]=0;n--){const r=e.ability.cooldown,i=e.castTimes[n+1]-e.castTimes[n];i{const a=e.castTimes[s];(o-at)&&(e.castTimes[s+1]=e.castTimes[s]+i)}),e.castTimes=e.castTimes.filter(o=>oi&&e.castTimes.push(n)}function S7(e,t){const n=e.players.map(i=>({name:i.name,isActive:i.isActive,class:i.class,abilities:i.abilities.map(o=>({name:o.originalAbility.name,isActive:o.isActive,activeModifiers:o.activeModifiers,castTimes:o.castTimes}))})),r={duration:e.duration,markers:e.markers,markersEnabled:e.markersEnabled,userNote:e.userNote,players:n};return t&&(r.overlays=e.overlays),r}function C7(e,t){t.overlays&&(e.overlays=t.overlays),e.duration=t.duration,t.userNote&&(e.userNote=t.userNote),t.markers&&(e.markers=t.markers),t.markersEnabled&&(e.markersEnabled=t.markersEnabled),e.players=t.players.map(n=>{const r=cb(n.class);return r.name=n.name,r.isActive=n.isActive,r.abilities.forEach(i=>{const o=n.abilities.find(s=>s.name===i.originalAbility.name);o&&(i.isActive=o.isActive,i.castTimes=o.castTimes,i.activeModifiers=o.activeModifiers,Cd(i))}),r})}function Rp(e,t){var n;(n=e.ability.modifiers[t].dependants)==null||n.filter(r=>e.activeModifiers[r]).forEach(r=>{e.activeModifiers[r]=!1,Rp(e,r)})}function _7(e,t){var n;(n=e.ability.modifiers[t].exclusiveWith)==null||n.filter(r=>e.activeModifiers[r]).forEach(r=>{e.activeModifiers[r]=!1,Rp(e,r)})}function T7(e,t){e.activeModifiers[t]?_7(e,t):Rp(e,t)}function jl(e,t){return e.players.find(n=>n.id===t)}function xn(e,t,n){const r=jl(e,t);return r?r.abilities.find(o=>o.id===n):void 0}function E7(e){const{classKey:t}=e,n=ee(r=>r.addPlayer);return w.jsx("button",{className:"flex outline outline-2 outline-transparent transition-[outline-color] duration-100 hover:outline-slate-500",onClick:()=>{const r=cb(t);n(r)},children:w.jsx(eo,{name:Pk[t],size:"large"})})}function P7(){return w.jsx("div",{className:"grid grid-cols-[repeat(5,auto)] gap-2 border-b-2 border-slate-700 p-4 px-10 justify-center",children:Object.values(pe).map(e=>ub[e].length?w.jsx(E7,{classKey:e},e):w.jsx(eo,{name:Pk[e],className:"opacity-30",size:"large"},e))})}function A7(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r{const r=e(n);return A7(t.current,r)?t.current:t.current=r}}function bb(e){const t=A.useRef(e);return e&&(t.current=e),e??t.current}function M7(e){const{playerId:t,playerAbilityId:n}=e,r=ee(Qn(l=>{const u=xn(l,t,n);if(u)return{id:u.id,ability:u.ability,isActive:u.isActive,activeModifiers:u.activeModifiers}})),i=bb(r),o=ee(l=>l.toggleAbility);function s(l){l.ctrlKey?i!=null&&i.ability.wowheadLink&&window.open(i.ability.wowheadLink,"_blank"):o(t,n)}const a=ee(l=>l.toggleAbilityModifier);return i?w.jsxs("div",{className:"flex w-full flex-col place-content-start place-items-start content-start items-start gap-1",children:[w.jsx("button",{title:i.ability.name,onClick:s,className:"flex outline outline-2 outline-transparent transition-[outline] duration-100 hover:outline-slate-500",children:w.jsx(eo,{name:i.ability.icon,size:"full",className:At("aspect-[4/3] object-cover grayscale transition-[filter] duration-100",{"filter-none":i.isActive})})}),w.jsx("div",{className:"grid grid-cols-2 gap-0.5",children:i.ability.modifiers.map((l,u)=>{const f=i.activeModifiers[u];return w.jsx("button",{title:l.description,onClick:c=>{c.ctrlKey?l.wowheadLink&&window.open(l.wowheadLink,"_blank"):a(t,n,u)},className:"flex",children:w.jsx(eo,{name:l.icon,size:"mini",className:At("grayscale transition-[filter] duration-100",{"filter-none":f})})},l.icon)})})]}):null}var Ws=e=>e.type==="checkbox",Ni=e=>e instanceof Date,gt=e=>e==null;const Sb=e=>typeof e=="object";var Ue=e=>!gt(e)&&!Array.isArray(e)&&Sb(e)&&!Ni(e),D7=e=>Ue(e)&&e.target?Ws(e.target)?e.target.checked:e.target.value:e,I7=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,O7=(e,t)=>e.has(I7(t)),F7=e=>{const t=e.constructor&&e.constructor.prototype;return Ue(t)&&t.hasOwnProperty("isPrototypeOf")},Np=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function In(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Np&&(e instanceof Blob||e instanceof FileList))&&(n||Ue(e)))if(t=n?[]:{},!n&&!F7(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=In(e[r]));else return e;return t}var Gs=e=>Array.isArray(e)?e.filter(Boolean):[],Oe=e=>e===void 0,Q=(e,t,n)=>{if(!t||!Ue(e))return n;const r=Gs(t.split(/[,[\].]+?/)).reduce((i,o)=>gt(i)?i:i[o],e);return Oe(r)||r===e?Oe(e[t])?n:e[t]:r},Rn=e=>typeof e=="boolean";const Zy={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},cn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Dn={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Cb=he.createContext(null),_b=()=>he.useContext(Cb),R7=e=>{const{children:t,...n}=e;return he.createElement(Cb.Provider,{value:n},t)};var N7=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const s=o;return t._proxyFormState[s]!==cn.all&&(t._proxyFormState[s]=!r||cn.all),n&&(n[s]=!0),e[s]}});return i},Qt=e=>Ue(e)&&!Object.keys(e).length,j7=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return Qt(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(s=>t[s]===(!r||cn.all))},Hc=e=>Array.isArray(e)?e:[e];function $7(e){const t=he.useRef(e);t.current=e,he.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var kn=e=>typeof e=="string",z7=(e,t,n,r,i)=>kn(e)?(r&&t.watch.add(e),Q(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Q(n,o))):(r&&(t.watchAll=!0),n),jp=e=>/^\w*$/.test(e),Tb=e=>Gs(e.replace(/["|']|\]/g,"").split(/\.|\[/)),_e=(e,t,n)=>{let r=-1;const i=jp(t)?[t]:Tb(t),o=i.length,s=o-1;for(;++rt?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Jy=e=>({isOnSubmit:!e||e===cn.onSubmit,isOnBlur:e===cn.onBlur,isOnChange:e===cn.onChange,isOnAll:e===cn.all,isOnTouch:e===cn.onTouched}),e1=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const ns=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=Q(e,i);if(o){const{_f:s,...a}=o;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!r)break;if(s.ref&&t(s.ref,s.name)&&!r)break;ns(a,t)}else Ue(a)&&ns(a,t)}}};var B7=(e,t,n)=>{const r=Gs(Q(e,n));return _e(r,"root",t[n]),_e(e,n,r),e},$p=e=>e.type==="file",lr=e=>typeof e=="function",$l=e=>{if(!Np)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ba=e=>kn(e),zp=e=>e.type==="radio",zl=e=>e instanceof RegExp;const t1={value:!1,isValid:!1},n1={value:!0,isValid:!0};var Eb=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Oe(e[0].attributes.value)?Oe(e[0].value)||e[0].value===""?n1:{value:e[0].value,isValid:!0}:n1:t1}return t1};const r1={isValid:!1,value:null};var Pb=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,r1):r1;function i1(e,t,n="validate"){if(Ba(e)||Array.isArray(e)&&e.every(Ba)||Rn(e)&&!e)return{type:n,message:Ba(e)?e:"",ref:t}}var mi=e=>Ue(e)&&!zl(e)?e:{value:e,message:""},o1=async(e,t,n,r,i)=>{const{ref:o,refs:s,required:a,maxLength:l,minLength:u,min:f,max:c,pattern:d,validate:h,name:p,valueAsNumber:v,mount:k,disabled:g}=e._f,m=Q(t,p);if(!k||g)return{};const y=s?s[0]:o,b=F=>{r&&y.reportValidity&&(y.setCustomValidity(Rn(F)?"":F||""),y.reportValidity())},P={},T=zp(o),D=Ws(o),I=T||D,j=(v||$p(o))&&Oe(o.value)&&Oe(m)||$l(o)&&o.value===""||m===""||Array.isArray(m)&&!m.length,E=V7.bind(null,p,n,P),z=(F,U,H,B=Dn.maxLength,ie=Dn.minLength)=>{const oe=F?U:H;P[p]={type:F?B:ie,message:oe,ref:o,...E(F?B:ie,oe)}};if(i?!Array.isArray(m)||!m.length:a&&(!I&&(j||gt(m))||Rn(m)&&!m||D&&!Eb(s).isValid||T&&!Pb(s).isValid)){const{value:F,message:U}=Ba(a)?{value:!!a,message:a}:mi(a);if(F&&(P[p]={type:Dn.required,message:U,ref:y,...E(Dn.required,U)},!n))return b(U),P}if(!j&&(!gt(f)||!gt(c))){let F,U;const H=mi(c),B=mi(f);if(!gt(m)&&!isNaN(m)){const ie=o.valueAsNumber||m&&+m;gt(H.value)||(F=ie>H.value),gt(B.value)||(U=ienew Date(new Date().toDateString()+" "+x),$=o.type=="time",q=o.type=="week";kn(H.value)&&m&&(F=$?oe(m)>oe(H.value):q?m>H.value:ie>new Date(H.value)),kn(B.value)&&m&&(U=$?oe(m)+F.value,B=!gt(U.value)&&m.length<+U.value;if((H||B)&&(z(H,F.message,U.message),!n))return b(P[p].message),P}if(d&&!j&&kn(m)){const{value:F,message:U}=mi(d);if(zl(F)&&!m.match(F)&&(P[p]={type:Dn.pattern,message:U,ref:o,...E(Dn.pattern,U)},!n))return b(U),P}if(h){if(lr(h)){const F=await h(m,t),U=i1(F,y);if(U&&(P[p]={...U,...E(Dn.validate,U.message)},!n))return b(U.message),P}else if(Ue(h)){let F={};for(const U in h){if(!Qt(F)&&!n)break;const H=i1(await h[U](m,t),y,U);H&&(F={...H,...E(U,H.message)},b(H.message),n&&(P[p]=F))}if(!Qt(F)&&(P[p]={ref:y,...F},!n))return P}}return b(!0),P};function U7(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},Vl=e=>gt(e)||!Sb(e);function qr(e,t){if(Vl(e)||Vl(t))return e===t;if(Ni(e)&&Ni(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Ni(o)&&Ni(s)||Ue(o)&&Ue(s)||Array.isArray(o)&&Array.isArray(s)?!qr(o,s):o!==s)return!1}}return!0}var Ab=e=>e.type==="select-multiple",W7=e=>zp(e)||Ws(e),Gc=e=>$l(e)&&e.isConnected,Lb=e=>{for(const t in e)if(lr(e[t]))return!0;return!1};function Bl(e,t={}){const n=Array.isArray(e);if(Ue(e)||n)for(const r in e)Array.isArray(e[r])||Ue(e[r])&&!Lb(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Bl(e[r],t[r])):gt(e[r])||(t[r]=!0);return t}function Mb(e,t,n){const r=Array.isArray(e);if(Ue(e)||r)for(const i in e)Array.isArray(e[i])||Ue(e[i])&&!Lb(e[i])?Oe(t)||Vl(n[i])?n[i]=Array.isArray(e[i])?Bl(e[i],[]):{...Bl(e[i])}:Mb(e[i],gt(t)?{}:t[i],n[i]):n[i]=!qr(e[i],t[i]);return n}var Kc=(e,t)=>Mb(e,t,Bl(t)),Db=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Oe(e)?e:t?e===""?NaN:e&&+e:n&&kn(e)?new Date(e):r?r(e):e;function qc(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return $p(t)?t.files:zp(t)?Pb(e.refs).value:Ab(t)?[...t.selectedOptions].map(({value:n})=>n):Ws(t)?Eb(e.refs).value:Db(Oe(t.value)?e.ref.value:t.value,e)}var G7=(e,t,n,r)=>{const i={};for(const o of e){const s=Q(t,o);s&&_e(i,o,s._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Do=e=>Oe(e)?e:zl(e)?e.source:Ue(e)?zl(e.value)?e.value.source:e.value:e,K7=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function s1(e,t,n){const r=Q(e,n);if(r||jp(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),s=Q(t,o),a=Q(e,o);if(s&&!Array.isArray(s)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};i.pop()}return{name:n}}var q7=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,Q7=(e,t)=>!Gs(Q(e,t)).length&&Ze(e,t);const X7={mode:cn.onSubmit,reValidateMode:cn.onChange,shouldFocusError:!0};function Y7(e={},t){let n={...X7,...e},r={submitCount:0,isDirty:!1,isLoading:lr(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:n.errors||{},disabled:!1},i={},o=Ue(n.defaultValues)||Ue(n.values)?In(n.defaultValues||n.values)||{}:{},s=n.shouldUnregister?{}:In(o),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,f=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:Wc(),array:Wc(),state:Wc()},h=e.resetOptions&&e.resetOptions.keepDirtyValues,p=Jy(n.mode),v=Jy(n.reValidateMode),k=n.criteriaMode===cn.all,g=_=>L=>{clearTimeout(f),f=setTimeout(_,L)},m=async _=>{if(c.isValid||_){const L=n.resolver?Qt((await E()).errors):await F(i,!0);L!==r.isValid&&d.state.next({isValid:L})}},y=_=>c.isValidating&&d.state.next({isValidating:_}),b=(_,L=[],O,G,V=!0,C=!0)=>{if(G&&O){if(a.action=!0,C&&Array.isArray(Q(i,_))){const M=O(Q(i,_),G.argA,G.argB);V&&_e(i,_,M)}if(C&&Array.isArray(Q(r.errors,_))){const M=O(Q(r.errors,_),G.argA,G.argB);V&&_e(r.errors,_,M),Q7(r.errors,_)}if(c.touchedFields&&C&&Array.isArray(Q(r.touchedFields,_))){const M=O(Q(r.touchedFields,_),G.argA,G.argB);V&&_e(r.touchedFields,_,M)}c.dirtyFields&&(r.dirtyFields=Kc(o,s)),d.state.next({name:_,isDirty:H(_,L),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else _e(s,_,L)},P=(_,L)=>{_e(r.errors,_,L),d.state.next({errors:r.errors})},T=_=>{r.errors=_,d.state.next({errors:r.errors,isValid:!1})},D=(_,L,O,G)=>{const V=Q(i,_);if(V){const C=Q(s,_,Oe(O)?Q(o,_):O);Oe(C)||G&&G.defaultChecked||L?_e(s,_,L?C:qc(V._f)):oe(_,C),a.mount&&m()}},I=(_,L,O,G,V)=>{let C=!1,M=!1;const W={name:_},Z=!!(Q(i,_)&&Q(i,_)._f.disabled);if(!O||G){c.isDirty&&(M=r.isDirty,r.isDirty=W.isDirty=H(),C=M!==W.isDirty);const se=Z||qr(Q(o,_),L);M=!!(!Z&&Q(r.dirtyFields,_)),se||Z?Ze(r.dirtyFields,_):_e(r.dirtyFields,_,!0),W.dirtyFields=r.dirtyFields,C=C||c.dirtyFields&&M!==!se}if(O){const se=Q(r.touchedFields,_);se||(_e(r.touchedFields,_,O),W.touchedFields=r.touchedFields,C=C||c.touchedFields&&se!==O)}return C&&V&&d.state.next(W),C?W:{}},j=(_,L,O,G)=>{const V=Q(r.errors,_),C=c.isValid&&Rn(L)&&r.isValid!==L;if(e.delayError&&O?(u=g(()=>P(_,O)),u(e.delayError)):(clearTimeout(f),u=null,O?_e(r.errors,_,O):Ze(r.errors,_)),(O?!qr(V,O):V)||!Qt(G)||C){const M={...G,...C&&Rn(L)?{isValid:L}:{},errors:r.errors,name:_};r={...r,...M},d.state.next(M)}y(!1)},E=async _=>n.resolver(s,n.context,G7(_||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation)),z=async _=>{const{errors:L}=await E(_);if(_)for(const O of _){const G=Q(L,O);G?_e(r.errors,O,G):Ze(r.errors,O)}else r.errors=L;return L},F=async(_,L,O={valid:!0})=>{for(const G in _){const V=_[G];if(V){const{_f:C,...M}=V;if(C){const W=l.array.has(C.name),Z=await o1(V,s,k,n.shouldUseNativeValidation&&!L,W);if(Z[C.name]&&(O.valid=!1,L))break;!L&&(Q(Z,C.name)?W?B7(r.errors,Z,C.name):_e(r.errors,C.name,Z[C.name]):Ze(r.errors,C.name))}M&&await F(M,L,O)}}return O.valid},U=()=>{for(const _ of l.unMount){const L=Q(i,_);L&&(L._f.refs?L._f.refs.every(O=>!Gc(O)):!Gc(L._f.ref))&&kt(_)}l.unMount=new Set},H=(_,L)=>(_&&L&&_e(s,_,L),!qr(S(),o)),B=(_,L,O)=>z7(_,l,{...a.mount?s:Oe(L)?o:kn(_)?{[_]:L}:L},O,L),ie=_=>Gs(Q(a.mount?s:o,_,e.shouldUnregister?Q(o,_,[]):[])),oe=(_,L,O={})=>{const G=Q(i,_);let V=L;if(G){const C=G._f;C&&(!C.disabled&&_e(s,_,Db(L,C)),V=$l(C.ref)&>(L)?"":L,Ab(C.ref)?[...C.ref.options].forEach(M=>M.selected=V.includes(M.value)):C.refs?Ws(C.ref)?C.refs.length>1?C.refs.forEach(M=>(!M.defaultChecked||!M.disabled)&&(M.checked=Array.isArray(V)?!!V.find(W=>W===M.value):V===M.value)):C.refs[0]&&(C.refs[0].checked=!!V):C.refs.forEach(M=>M.checked=M.value===V):$p(C.ref)?C.ref.value="":(C.ref.value=V,C.ref.type||d.values.next({name:_,values:{...s}})))}(O.shouldDirty||O.shouldTouch)&&I(_,V,O.shouldTouch,O.shouldDirty,!0),O.shouldValidate&&ae(_)},$=(_,L,O)=>{for(const G in L){const V=L[G],C=`${_}.${G}`,M=Q(i,C);(l.array.has(_)||!Vl(V)||M&&!M._f)&&!Ni(V)?$(C,V,O):oe(C,V,O)}},q=(_,L,O={})=>{const G=Q(i,_),V=l.array.has(_),C=In(L);_e(s,_,C),V?(d.array.next({name:_,values:{...s}}),(c.isDirty||c.dirtyFields)&&O.shouldDirty&&d.state.next({name:_,dirtyFields:Kc(o,s),isDirty:H(_,C)})):G&&!G._f&&!gt(C)?$(_,C,O):oe(_,C,O),e1(_,l)&&d.state.next({...r}),d.values.next({name:_,values:{...s}}),!a.mount&&t()},x=async _=>{const L=_.target;let O=L.name,G=!0;const V=Q(i,O),C=()=>L.type?qc(V._f):D7(_),M=W=>{G=Number.isNaN(W)||W===Q(s,O,W)};if(V){let W,Z;const se=C(),We=_.type===Zy.BLUR||_.type===Zy.FOCUS_OUT,Ln=!K7(V._f)&&!n.resolver&&!Q(r.errors,O)&&!V._f.deps||q7(We,Q(r.touchedFields,O),r.isSubmitted,v,p),Dt=e1(O,l,We);_e(s,O,se),We?(V._f.onBlur&&V._f.onBlur(_),u&&u(0)):V._f.onChange&&V._f.onChange(_);const Mn=I(O,se,We,!1),Dr=!Qt(Mn)||Dt;if(!We&&d.values.next({name:O,type:_.type,values:{...s}}),Ln)return c.isValid&&m(),Dr&&d.state.next({name:O,...Dt?{}:Mn});if(!We&&Dt&&d.state.next({...r}),y(!0),n.resolver){const{errors:ot}=await E([O]);if(M(se),G){const Xn=s1(r.errors,i,O),Kt=s1(ot,i,Xn.name||O);W=Kt.error,O=Kt.name,Z=Qt(ot)}}else W=(await o1(V,s,k,n.shouldUseNativeValidation))[O],M(se),G&&(W?Z=!1:c.isValid&&(Z=await F(i,!0)));G&&(V._f.deps&&ae(V._f.deps),j(O,Z,W,Mn))}},Y=(_,L)=>{if(Q(r.errors,L)&&_.focus)return _.focus(),1},ae=async(_,L={})=>{let O,G;const V=Hc(_);if(y(!0),n.resolver){const C=await z(Oe(_)?_:V);O=Qt(C),G=_?!V.some(M=>Q(C,M)):O}else _?(G=(await Promise.all(V.map(async C=>{const M=Q(i,C);return await F(M&&M._f?{[C]:M}:M)}))).every(Boolean),!(!G&&!r.isValid)&&m()):G=O=await F(i);return d.state.next({...!kn(_)||c.isValid&&O!==r.isValid?{}:{name:_},...n.resolver||!_?{isValid:O}:{},errors:r.errors,isValidating:!1}),L.shouldFocus&&!G&&ns(i,Y,_?V:l.mount),G},S=_=>{const L={...o,...a.mount?s:{}};return Oe(_)?L:kn(_)?Q(L,_):_.map(O=>Q(L,O))},ke=(_,L)=>({invalid:!!Q((L||r).errors,_),isDirty:!!Q((L||r).dirtyFields,_),isTouched:!!Q((L||r).touchedFields,_),error:Q((L||r).errors,_)}),rt=_=>{_&&Hc(_).forEach(L=>Ze(r.errors,L)),d.state.next({errors:_?r.errors:{}})},ce=(_,L,O)=>{const G=(Q(i,_,{_f:{}})._f||{}).ref;_e(r.errors,_,{...L,ref:G}),d.state.next({name:_,errors:r.errors,isValid:!1}),O&&O.shouldFocus&&G&&G.focus&&G.focus()},ht=(_,L)=>lr(_)?d.values.subscribe({next:O=>_(B(void 0,L),O)}):B(_,L,!0),kt=(_,L={})=>{for(const O of _?Hc(_):l.mount)l.mount.delete(O),l.array.delete(O),L.keepValue||(Ze(i,O),Ze(s,O)),!L.keepError&&Ze(r.errors,O),!L.keepDirty&&Ze(r.dirtyFields,O),!L.keepTouched&&Ze(r.touchedFields,O),!n.shouldUnregister&&!L.keepDefaultValue&&Ze(o,O);d.values.next({values:{...s}}),d.state.next({...r,...L.keepDirty?{isDirty:H()}:{}}),!L.keepIsValid&&m()},Mt=({disabled:_,name:L,field:O,fields:G,value:V})=>{if(Rn(_)){const C=_?void 0:Oe(V)?qc(O?O._f:Q(G,L)._f):V;_e(s,L,C),I(L,C,!1,!1,!0)}},it=(_,L={})=>{let O=Q(i,_);const G=Rn(L.disabled);return _e(i,_,{...O||{},_f:{...O&&O._f?O._f:{ref:{name:_}},name:_,mount:!0,...L}}),l.mount.add(_),O?Mt({field:O,disabled:L.disabled,name:_,value:L.value}):D(_,!0,L.value),{...G?{disabled:L.disabled}:{},...n.progressive?{required:!!L.required,min:Do(L.min),max:Do(L.max),minLength:Do(L.minLength),maxLength:Do(L.maxLength),pattern:Do(L.pattern)}:{},name:_,onChange:x,onBlur:x,ref:V=>{if(V){it(_,L),O=Q(i,_);const C=Oe(V.value)&&V.querySelectorAll&&V.querySelectorAll("input,select,textarea")[0]||V,M=W7(C),W=O._f.refs||[];if(M?W.find(Z=>Z===C):C===O._f.ref)return;_e(i,_,{_f:{...O._f,...M?{refs:[...W.filter(Gc),C,...Array.isArray(Q(o,_))?[{}]:[]],ref:{type:C.type,name:_}}:{ref:C}}}),D(_,!1,void 0,C)}else O=Q(i,_,{}),O._f&&(O._f.mount=!1),(n.shouldUnregister||L.shouldUnregister)&&!(O7(l.array,_)&&a.action)&&l.unMount.add(_)}}},bt=()=>n.shouldFocusError&&ns(i,Y,l.mount),di=_=>{Rn(_)&&(d.state.next({disabled:_}),ns(i,(L,O)=>{let G=_;const V=Q(i,O);V&&Rn(V._f.disabled)&&(G||(G=V._f.disabled)),L.disabled=G},0,!1))},Mr=(_,L)=>async O=>{O&&(O.preventDefault&&O.preventDefault(),O.persist&&O.persist());let G=In(s);if(d.state.next({isSubmitting:!0}),n.resolver){const{errors:V,values:C}=await E();r.errors=V,G=C}else await F(i);Ze(r.errors,"root"),Qt(r.errors)?(d.state.next({errors:{}}),await _(G,O)):(L&&await L({...r.errors},O),bt(),setTimeout(bt)),d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Qt(r.errors),submitCount:r.submitCount+1,errors:r.errors})},Qs=(_,L={})=>{Q(i,_)&&(Oe(L.defaultValue)?q(_,Q(o,_)):(q(_,L.defaultValue),_e(o,_,L.defaultValue)),L.keepTouched||Ze(r.touchedFields,_),L.keepDirty||(Ze(r.dirtyFields,_),r.isDirty=L.defaultValue?H(_,Q(o,_)):H()),L.keepError||(Ze(r.errors,_),c.isValid&&m()),d.state.next({...r}))},vo=(_,L={})=>{const O=_?In(_):o,G=In(O),V=_&&!Qt(_)?G:o;if(L.keepDefaultValues||(o=O),!L.keepValues){if(L.keepDirtyValues||h)for(const C of l.mount)Q(r.dirtyFields,C)?_e(V,C,Q(s,C)):q(C,Q(V,C));else{if(Np&&Oe(_))for(const C of l.mount){const M=Q(i,C);if(M&&M._f){const W=Array.isArray(M._f.refs)?M._f.refs[0]:M._f.ref;if($l(W)){const Z=W.closest("form");if(Z){Z.reset();break}}}}i={}}s=e.shouldUnregister?L.keepDefaultValues?In(o):{}:In(V),d.array.next({values:{...V}}),d.values.next({values:{...V}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!c.isValid||!!L.keepIsValid,a.watch=!!e.shouldUnregister,d.state.next({submitCount:L.keepSubmitCount?r.submitCount:0,isDirty:L.keepDirty?r.isDirty:!!(L.keepDefaultValues&&!qr(_,o)),isSubmitted:L.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:L.keepDirtyValues?r.dirtyFields:L.keepDefaultValues&&_?Kc(o,_):{},touchedFields:L.keepTouched?r.touchedFields:{},errors:L.keepErrors?r.errors:{},isSubmitSuccessful:L.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},wo=(_,L)=>vo(lr(_)?_(s):_,L);return{control:{register:it,unregister:kt,getFieldState:ke,handleSubmit:Mr,setError:ce,_executeSchema:E,_getWatch:B,_getDirty:H,_updateValid:m,_removeUnmounted:U,_updateFieldArray:b,_updateDisabledField:Mt,_getFieldArray:ie,_reset:vo,_resetDefaultValues:()=>lr(n.defaultValues)&&n.defaultValues().then(_=>{wo(_,n.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:_=>{r={...r,..._}},_disableForm:di,_subjects:d,_proxyFormState:c,_setErrors:T,get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(_){a=_},get _defaultValues(){return o},get _names(){return l},set _names(_){l=_},get _formState(){return r},set _formState(_){r=_},get _options(){return n},set _options(_){n={...n,..._}}},trigger:ae,register:it,handleSubmit:Mr,watch:ht,setValue:q,getValues:S,reset:wo,resetField:Qs,clearErrors:rt,unregister:kt,setError:ce,setFocus:(_,L={})=>{const O=Q(i,_),G=O&&O._f;if(G){const V=G.refs?G.refs[0]:G.ref;V.focus&&(V.focus(),L.shouldSelect&&V.select())}},getFieldState:ke}}function Ks(e={}){const t=he.useRef(),n=he.useRef(),[r,i]=he.useState({isDirty:!1,isValidating:!1,isLoading:lr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:e.errors||{},disabled:!1,defaultValues:lr(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Y7(e,()=>i(s=>({...s}))),formState:r});const o=t.current.control;return o._options=e,$7({subject:o._subjects.state,next:s=>{j7(s,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),he.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),he.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==r.isDirty&&o._subjects.state.next({isDirty:s})}},[o,r.isDirty]),he.useEffect(()=>{e.values&&!qr(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i(s=>({...s}))):o._resetDefaultValues()},[e.values,o]),he.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),he.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=N7(r,o),t.current}var Ib={};Object.defineProperty(Ib,"__esModule",{value:!0});function Z7(){for(var e=[],t=0;tb.changePlayerName),l=ee(b=>b.togglePlayer),u=ee(b=>b.movePlayer),f=ee(b=>b.duplicatePlayer),c=A.useCallback(()=>{l(t)},[t,l]),d=A.useRef(),[h,p]=A.useState(!1),{register:v,handleSubmit:k}=Ks(),{ref:g,...m}=v("name");A.useEffect(()=>{!h||!d.current||d.current.select()},[h]);const y=A.useCallback(b=>{a(t,b.name),p(!1)},[a,t]);return w.jsxs("div",{className:"flex items-center justify-between",children:[w.jsx(qe,{icon:"close",onClick:i,className:"text-xs -ml-2 mt-1"}),w.jsxs("div",{className:"flex min-w-[18ch] flex-grow items-center gap-2 pl-1",children:[h?w.jsx("form",{id:t,className:"flex-grow",onSubmit:k(y),children:w.jsx("input",{ref:J7(d,g),...m,size:1,className:"w-full border-none bg-transparent outline-none",type:"text",defaultValue:n})}):w.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:n}),w.jsx(Lt.span,{layout:!0,transition:{duration:.15},className:"flex text-xs",children:h?w.jsx(qe,{icon:"check",htmlType:"submit",htmlForm:t},"done"):w.jsx(qe,{icon:"edit",onClick:()=>p(!h)},"edit")})]}),w.jsx(qe,{icon:"duplicate",onClick:()=>f(t),className:"text-xs"}),w.jsx(qe,{icon:"up",onClick:()=>u(t,-1),disabled:o,className:"text-xs"}),w.jsx(qe,{icon:"down",onClick:()=>u(t,1),disabled:s,className:"text-xs"}),r?w.jsx(qe,{icon:"show",onClick:c,className:"text-xs"}):w.jsx(qe,{icon:"hide",onClick:c,className:"text-xs"})]})}const tB=he.memo(eB),Vp={colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},warrior:"#C69B6D",paladin:"#F48CBA",hunter:"#AAD372",rogue:"#FFF468",priest:"#FFFFFF",shaman:"#0070DD",mage:"#3FC7EB",warlock:"#8788EE",monk:"#00FF98",druid:"#FF7C0A",demonhunter:"#A330C9",deathknight:"#C41E3A",evoker:"#33937F",general:"#6079bf",contrast:{dark:"#FFFFFF",light:"#000000"}}};var nB="__lodash_hash_undefined__";function rB(e){return this.__data__.set(e,nB),this}var iB=rB;function oB(e){return this.__data__.has(e)}var sB=oB,aB=gp,lB=iB,uB=sB;function Ul(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new aB;++ta))return!1;var u=o.get(e),f=o.get(t);if(u&&f)return u==t&&f==e;var c=-1,d=!0,h=n&wB?new mB:void 0;for(o.set(e,t),o.set(t,e);++c{const r=e(n);return aU(t.current,r)?t.current:t.current=r}}const Nb=A.forwardRef((e,t)=>{var u;const{playerId:n,isFirst:r,isLast:i}=e,o=ee(Rb(f=>{const c=jl(f,n);if(c)return{name:c.name,isActive:c.isActive,class:c.class,abilityIds:c.abilities.map(d=>d.id)}})),s=bb(o),a=ee(f=>f.removePlayer),l=A.useCallback(()=>{a(n)},[a,n]);return s?w.jsxs(Lt.div,{layout:!0,initial:{opacity:0},animate:{opacity:s.isActive?1:.6},exit:{opacity:0},transition:{opacity:{duration:.1}},style:{borderColor:s.isActive?Vp.colors[s.class]:"transparent"},className:"grid grid-cols-[minmax(0,1fr)] border-l-[5px] pl-3 pb-1 gap-1",ref:t,children:[w.jsx(tB,{playerId:n,name:s.name,isActive:s.isActive,onRemove:l,disableMoveUp:r,disableMoveDown:i}),w.jsx("div",{className:"grid grid-cols-[repeat(7,minmax(0,auto))] gap-1 justify-start",children:(u=s.abilityIds)==null?void 0:u.map(f=>w.jsx(M7,{playerId:n,playerAbilityId:f},f))})]}):null});Nb.displayName="Player";const lU=he.memo(Nb);function uU(){const e=ee(Qn(t=>t.players.map(n=>n.id)));return w.jsx("div",{className:"overflow-auto p-2 space-y-2",children:w.jsx(dp,{mode:"popLayout",children:e.map((t,n)=>w.jsx(lU,{playerId:t,isFirst:n===0,isLast:n===e.length-1},t))})})}function cU(){return w.jsxs("div",{className:"grid grid-rows-[auto_minmax(0px,1fr)] border-r-2 border-r-slate-700",children:[w.jsx(P7,{}),w.jsx(uU,{})]})}const fU=DV?A.useLayoutEffect:A.useEffect;function Yc(e){const t=A.useRef(e);return fU(()=>{t.current=e},[e]),t}function jb({onStart:e,onChange:t,onEnd:n}){const r=Yc(e),i=Yc(t),o=Yc(n);return A.useCallback(a=>{var c;window.addEventListener("mousemove",u),window.addEventListener("mouseup",f),(c=r.current)==null||c.call(r);let l=a.clientX;function u(d){const h=d.clientX,p=h-l;(p>2||p<-2)&&(i.current(d,p),l=h)}function f(){var d;window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",f),(d=o.current)==null||d.call(o)}},[r,i,o])}function dU(e,t){var n=A.useRef(null),r=A.useRef(null);r.current=t;var i=A.useRef(null);A.useEffect(function(){o()});var o=A.useCallback(function(){var s=i.current,a=r.current,l=s||(a?a instanceof Element?a:a.current:null);n.current&&n.current.element===l&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:e,cleanup:l?e(l):void 0})},[e]);return A.useEffect(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),A.useCallback(function(s){i.current=s,o()},[o])}function k1(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}function hU(e){e===void 0&&(e={});var t=e.onResize,n=A.useRef(void 0);n.current=t;var r=e.round||Math.round,i=A.useRef(),o=A.useState({width:void 0,height:void 0}),s=o[0],a=o[1],l=A.useRef(!1);A.useEffect(function(){return l.current=!1,function(){l.current=!0}},[]);var u=A.useRef({width:void 0,height:void 0}),f=dU(A.useCallback(function(c){return(!i.current||i.current.box!==e.box||i.current.round!==r)&&(i.current={box:e.box,round:r,instance:new ResizeObserver(function(d){var h=d[0],p=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",v=k1(h,p,"inlineSize"),k=k1(h,p,"blockSize"),g=v?r(v):void 0,m=k?r(k):void 0;if(u.current.width!==g||u.current.height!==m){var y={width:g,height:m};u.current.width=g,u.current.height=m,n.current?n.current(y):l.current||a(y)}})}),i.current.instance.observe(c,{box:e.box}),function(){i.current&&i.current.instance.unobserve(c)}},[e.box,r]),e.ref);return A.useMemo(function(){return{ref:f,width:s.width,height:s.height}},[f,s.width,s.height])}const $b=he.createContext(null);function pU(e){const{panelRef:t,children:n}=e,{width:r}=hU({ref:t}),i=A.useMemo(()=>({panelRef:t,panelWidth:r}),[t,r]);return w.jsx($b.Provider,{value:i,children:n})}function Ou(){const e=A.useContext($b);if(!e)throw new Error("useTimelineContext must be used within ");return e}function mU(e){const{playerId:t,abilityId:n,castIndex:r}=e,i=ee(o=>{const s=xn(o,t,n);return s?s.castTimes[r]:0});return w.jsx("span",{className:"text-xs p-1 bg-slate-950",children:ar(i)})}function gU(e){const{playerId:t,abilityId:n,castIndex:r}=e,{panelWidth:i}=Ou(),[o,s]=A.useState(!1),[a,l]=A.useState(!1),u=o||a,f=ee(k=>k.updateCastTime),c=ee(k=>k.duration),d=ee(k=>{const g=xn(k,t,n);if(g)return g.ability.icon}),h=hp(0,{bounce:0,stiffness:1e3,damping:50});A.useEffect(()=>{const k=xn(ee.getState(),t,n);if(!(!k||!i))return h.jump(i*k.castTimes[r]/c),ee.subscribe((g,m)=>{const y=xn(g,t,n),b=xn(m,t,n);if(!y||!b||!i)return;const P=y.ability.cooldown!==b.ability.cooldown,T=i*y.castTimes[r]/c;P?h.jump(T):h.set(T)})},[n,r,c,h,t,i]);function p(k,g){const m=xn(ee.getState(),t,n);if(!i||!m)return;const y=k.altKey?.1:1,P=m.castTimes[r]+c*(g/i)*y;f({playerId:t,abilityId:n,castIndex:r,newCastTime:P,constrain:k.ctrlKey,replicateLeft:k.shiftKey})}const v=jb({onStart:()=>s(!0),onChange:p,onEnd:()=>s(!1)});return w.jsxs(Lt.div,{className:"absolute top-0 left-0",onMouseDown:v,initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},style:{x:h},onHoverStart:()=>l(!0),onHoverEnd:()=>l(!1),children:[w.jsx(Lt.div,{initial:{opacity:0},animate:{opacity:u?1:0},className:"absolute bottom-[120%] left-1/2 -translate-x-1/2 pointer-events-none",children:w.jsx(mU,{playerId:t,abilityId:n,castIndex:r})}),w.jsx(eo,{name:d||"",size:"small",className:"pointer-events-none aspect-[5/4] object-cover"})]})}function yU(e){const{playerId:t,abilityId:n}=e,r=ee(Qn(i=>{const o=i.players.find(a=>a.id===t);if(!o)return;const s=o.abilities.find(a=>a.id===n);if(s)return{icon:s.ability.icon,numCasts:s.castTimes.length}}));return r?w.jsxs(Lt.div,{layout:!0,className:"relative flex select-none",children:[w.jsx(eo,{name:r.icon,className:"invisible aspect-[5/4]",size:"small"}),[...Array(r.numCasts)].map((i,o)=>w.jsx(gU,{playerId:t,abilityId:n,castIndex:o},o))]}):null}function vU(e){const{playerId:t}=e,n=ee(Rb(r=>{const i=r.players.find(o=>o.id===t);if(i)return{name:i.name,class:i.class,abilityData:i.abilities.map(o=>({id:o.id,isActive:o.isActive}))}}));return n?w.jsxs(Lt.div,{layout:!0,transition:{duration:.2},className:"py-0.5",style:{backgroundColor:e9(Vp.colors[n.class]).alpha(.1).string()},children:[w.jsx(Lt.div,{layout:!0,className:"px-2 text-xs font-medium",children:n.name}),w.jsx("div",{children:w.jsx(dp,{children:n.abilityData.filter(r=>r.isActive).map(r=>w.jsx(yU,{playerId:t,abilityId:r.id},r.id))})})]}):null}function wU(){const e=ee(Qn(n=>n.players.filter(r=>r.isActive).map(r=>r.id))),t=ee(n=>n.overlays[0]);return w.jsxs("div",{className:"relative flex-grow",children:[!!t&&w.jsx("img",{src:t,alt:"",className:"absolute top-0 left-0 -z-10 h-full w-full opacity-20"}),w.jsx("div",{className:"absolute top-0 bottom-0 -left-4 -right-4 overflow-x-hidden overflow-y-auto",children:w.jsx("div",{className:"flex min-h-full flex-col justify-end px-4",children:w.jsx(JD,{children:e.map(n=>w.jsx(vU,{playerId:n},n))})})})]})}function xU(){const e=ee(t=>t.duration);return w.jsx("div",{className:"-z-10",children:Fl(15,e).map((t,n)=>{const r=n%4===0,i=!r&&n%2===0;return w.jsx("div",{className:At("absolute top-0 bottom-0 w-px",{"bg-slate-600/50":r,"bg-slate-700/50":i,"bg-slate-800/75":!r&&!i}),style:{left:`${t/e*100}%`}},t)})})}function kU(){const e=ee(s=>s.duration),t=Fl(60,e),[n,r]=A.useState(!1),{panelRef:i}=Ou(),o=hp(0,{bounce:0,stiffness:8e3,damping:100,mass:1});return A.useEffect(()=>{if(!i.current)return;const s=i.current;function a(){r(!0)}function l(){r(!1)}function u(f){o.set(f.clientX-s.offsetLeft)}return s.addEventListener("mousemove",u),s.addEventListener("mouseenter",a),s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",u),s.removeEventListener("mouseenter",a),s.removeEventListener("mouseleave",l)}},[i,o]),w.jsxs("div",{children:[w.jsx(Lt.div,{className:At("absolute top-0 left-0 -z-10 h-full w-0 border-l-[1px] border-dashed border-slate-700/75 transition-opacity duration-100",{"opacity-0 duration-500":!n}),style:{x:o}}),w.jsx("div",{className:"h-px bg-slate-500"}),w.jsxs("div",{className:"relative text-slate-500",children:[w.jsx("span",{className:"invisible",children:"sizer"}),t.map((s,a)=>w.jsx("span",{className:"absolute top-0 -translate-x-1/2 bg-slate-900",style:{left:`${s/e*100}%`},children:a},a))]})]})}function bU(){const e=ee(Qn(t=>t.overlays.slice(1)));return w.jsx("div",{className:"relative min-h-[222px]",children:e.filter(t=>!!t).map((t,n)=>w.jsx("img",{src:t,alt:"",className:"absolute top-0 left-0 -z-10 h-full w-full opacity-30"},n))})}function SU(){const e=ee(i=>i.duration),[t,n]=A.useState("0:00"),{panelRef:r}=Ou();return A.useEffect(()=>{if(!r.current)return;const i=r.current;function o(s){const a=e*(s.clientX-i.offsetLeft)/i.clientWidth;a<0||a>e?n("--:--"):n(ar(a))}return i.addEventListener("mousemove",o),()=>{i.removeEventListener("mousemove",o)}},[r,e]),w.jsx(w.Fragment,{children:`${t}`})}function CU(){return w.jsx("div",{className:"mb-2 flex justify-center",children:w.jsx("div",{className:"text-sm text-slate-400",children:w.jsx(SU,{})})})}function _U(e){const{marker:t,disabled:n}=e,{panelWidth:r}=Ou(),i=ee(l=>l.duration),o=ee(l=>l.updateMarker),s=hp(0,{bounce:0,stiffness:1e3,damping:50});A.useEffect(()=>{if(!r||!t)return;const l=r*(t.time>i?i:t.time)/i;return s.jump(l),ee.subscribe(u=>{const f=u.markers.find(d=>d.id===t.id);if(!f)return;const c=r*f.time/i;s.get()!==c&&s.set(c)})},[i,t,r,s]);const a=jb({onChange:(l,u)=>{if(!r||!t)return;const f=l.altKey?.1:1;o(t.id,{type:t.type,time:t.time+i*(u/r)*f})}});return w.jsxs("div",{className:At("group",{"opacity-50":n}),children:[w.jsx(Lt.div,{className:"absolute top-4 -left-2 z-10 p-1",onMouseDown:n?void 0:a,style:{x:s},children:w.jsx("div",{className:At("h-0 w-[9px] border-x-4 border-t-4 border-transparent border-t-yellow-500 opacity-100 transition-colors",{"group-hover:border-t-yellow-300":!n})})}),w.jsxs(Lt.div,{className:"absolute top-4 left-0 p-2 text-xs font-thin text-slate-400",style:{x:s},children:[(t==null?void 0:t.type)==="phase"&&w.jsx("div",{children:t.phase}),(t==null?void 0:t.type)==="event"&&w.jsxs(w.Fragment,{children:[w.jsx("div",{children:t.event}),w.jsx("div",{children:t.spell}),w.jsx("div",{children:t.counter})]})]}),w.jsx(Lt.div,{className:At("absolute top-6 left-0 bottom-0 w-px bg-yellow-500 opacity-60 transition-opacity",{"group-hover:opacity-80":!n}),style:{x:s}})]})}const TU=he.memo(_U);function EU(){const e=ee(Qn(n=>n.markers)),t=ee(n=>n.markersEnabled);return w.jsx("div",{children:e.map(n=>w.jsx(TU,{marker:n,disabled:!t},n.id))})}function PU(){const e=A.useRef(null);return w.jsx("div",{className:"grid select-none bg-slate-900 py-3 px-5",children:w.jsx("div",{ref:e,className:"relative z-0 flex flex-col",children:w.jsxs(pU,{panelRef:e,children:[w.jsx(CU,{}),w.jsx(xU,{}),w.jsx(EU,{}),w.jsx(wU,{}),w.jsx(kU,{}),w.jsx(bU,{})]})})})}function Tn(e){const{text:t,className:n,startIcon:r,endIcon:i,htmlType:o,htmlForm:s,onClick:a,disabled:l}=e;return w.jsxs("button",{type:o,form:s,className:At(n,"flex items-center justify-center gap-2 border-2 border-slate-500 bg-slate-700 px-2 py-1 text-xs font-medium uppercase text-slate-200 transition-colors duration-100 hover:bg-slate-600 disabled:border-slate-700 disabled:bg-slate-800 disabled:text-slate-500"),onClick:a,disabled:l,children:[r&&w.jsx(Gf,{icon:r}),t,i&&w.jsx(Gf,{icon:i})]})}function AU(){const e=ee(a=>a.duration),t=ee(a=>a.setDuration),{register:n,handleSubmit:r,getValues:i,setValue:o}=Ks({defaultValues:{duration:ar(e)}});A.useEffect(()=>{e!==Number(i().duration)&&o("duration",ar(e))},[e,i,o]);const s=A.useCallback(a=>{t(IV(a.duration))},[t]);return w.jsxs("form",{onSubmit:r(s),className:"flex flex-col gap-3 p-3",children:[w.jsx("h3",{className:"text-md font-bold",children:"Fight"}),w.jsxs("label",{className:"block space-y-1",children:[w.jsx("span",{className:"text-xs",children:"Duration"}),w.jsx("input",{...n("duration"),className:"w-full px-2 text-black"})]}),w.jsx(Tn,{htmlType:"submit",text:"update",className:"mt-3"})]})}function LU(e){const{src:t,onOverlay:n}=e,r=A.useRef(null);return A.useEffect(()=>{if(!r.current)return;const i=r.current;async function o(s){const{code:a,ctrlKey:l}=s;if(a==="KeyV"&&l)try{const f=await(await navigator.clipboard.read())[0].getType("image/png"),c=new FileReader;c.readAsDataURL(f),c.onload=function(){const d=c.result;n(d)}}catch(u){console.error(u)}a==="KeyC"&&l&&fetch(t).then(u=>u.blob()).then(u=>{const f=new ClipboardItem({[u.type]:u});navigator.clipboard.write([f])}),a==="Delete"&&n("")}return i.addEventListener("keydown",o),()=>i.removeEventListener("keydown",o)},[n,t]),w.jsxs("div",{ref:r,className:"relative grid aspect-video cursor-pointer place-content-center outline outline-2 outline-slate-600 transition-[outline-width,outline-color] duration-100 hover:outline-slate-500 focus:outline-4",tabIndex:0,children:[!!t&&w.jsx("img",{src:t,alt:"",className:"absolute top-0 left-0 h-full w-full"}),!t&&w.jsx("span",{className:"text-sm text-slate-500",children:"Click + Paste image here"})]})}function MU(){const e=ee(n=>n.setOverlay),t=ee(Qn(n=>n.overlays));return w.jsxs("div",{className:"mt-auto space-y-3 p-3",children:[w.jsx("h3",{className:"text-md font-bold",children:"Overlays"}),w.jsx("div",{className:"space-y-3",children:t.map((n,r)=>w.jsxs(he.Fragment,{children:[r===1&&w.jsx("div",{className:"border-b-2 border-slate-600"}),w.jsx(LU,{src:n,onOverlay:i=>e(r,i)})]},r))})]})}function DU(){const{register:e}=_b();return w.jsxs("label",{className:"flex gap-2 py-1 text-slate-300",children:[w.jsx("span",{children:"Phase:"}),w.jsx("input",{className:"flex-grow border-none bg-transparent outline-none",...e("phase")})]})}function IU(){const{register:e}=_b();return w.jsxs(w.Fragment,{children:[w.jsxs("label",{className:"flex gap-2 py-1 text-slate-300",children:[w.jsx("span",{children:"Event:"}),w.jsx("input",{className:"flex-grow border-none bg-transparent outline-none",...e("event")})]}),w.jsxs("label",{className:"flex gap-2 py-1 text-slate-300",children:[w.jsx("span",{children:"SpellId:"}),w.jsx("input",{className:"flex-grow border-none bg-transparent outline-none",...e("spell")})]}),w.jsxs("label",{className:"flex gap-2 py-1 text-slate-300",children:[w.jsx("span",{children:"Counter:"}),w.jsx("input",{className:"flex-grow border-none bg-transparent outline-none",...e("counter")})]})]})}function OU(e){const{markerId:t}=e,n=ee(Qn(l=>{const u=l.markers.find(f=>f.id===t);if(u)switch(u.type){case"phase":return{type:u.type,phase:u.phase};case"event":return{type:u.type,event:u.event,spell:u.spell,counter:u.counter}}})),r=ee(l=>l.updateMarker),i=ee(l=>l.removeMarker),o=Ks({defaultValues:n}),{handleSubmit:s}=o,a=A.useCallback(l=>{let u;switch(l.type){case"phase":u={type:l.type,phase:l.phase};break;case"event":u={type:l.type,event:l.event,spell:l.spell,counter:l.counter};break}r(t,u)},[t,r]);return n?w.jsx(R7,{...o,children:w.jsxs("form",{onSubmit:s(a),className:"grid grid-cols-[minmax(0px,1fr),auto] border-l-[5px] border-yellow-500 bg-slate-900/40 pl-2",children:[w.jsxs("div",{children:[n.type==="phase"&&w.jsx(DU,{}),n.type==="event"&&w.jsx(IU,{})]}),w.jsxs("div",{className:"flex flex-col gap-1",children:[w.jsx(qe,{className:"text-xs",icon:"close",htmlType:"button",onClick:()=>i(t)}),w.jsx(qe,{className:"text-xs",icon:"check",htmlType:"submit"})]})]})}):null}function Up(e){const{checked:t,onChange:n,label:r,reverse:i}=e;return w.jsxs("label",{className:"group flex select-none items-center gap-2",children:[w.jsx("input",{className:"hidden",type:"checkbox",onChange:n,checked:t}),!!r&&i&&w.jsx("span",{className:"text-sm",children:r}),w.jsx("div",{className:At("flex w-7 justify-start border-2 border-slate-500 bg-slate-500 transition-colors duration-100",{"justify-end":t}),children:w.jsx(Lt.div,{layout:!0,transition:{duration:.15},className:"h-2 w-3 bg-slate-700 transition-colors duration-150 group-hover:bg-slate-600"})}),!!r&&!i&&w.jsx("span",{className:"text-sm",children:r})]})}function FU(){const e=ee(i=>i.markersEnabled),t=ee(i=>i.toggleMarkers),n=ee(Qn(i=>i.markers.map(o=>o.id))),r=ee(i=>i.addMarker);return w.jsxs("div",{className:"space-y-3 p-3",children:[w.jsxs("h3",{className:"text-md font-bold flex justify-between",children:[w.jsx("span",{children:"Markers"}),w.jsx(Up,{checked:e,onChange:()=>t(),label:""})]}),w.jsxs("div",{className:"space-y-2",children:[w.jsx(Tn,{className:"w-full",onClick:()=>r("phase"),text:"Add phase marker"}),w.jsx(Tn,{className:"w-full",onClick:()=>r("event"),text:"Add event marker"})]}),w.jsx("div",{className:"space-y-2",children:n.map(i=>w.jsx(OU,{markerId:i},i))})]})}function RU(){return w.jsxs("div",{className:"flex flex-col divide-y-2 divide-slate-700",children:[w.jsx(AU,{}),w.jsx(FU,{}),w.jsx(MU,{})]})}function NU(){const[e,t]=A.useState(!1),n=ee(a=>a.userNote),r=ee(a=>a.setUserNote),{register:i,handleSubmit:o}=Ks({defaultValues:{userNote:n}}),s=A.useCallback(a=>{r(a.userNote),t(!1)},[r]);return w.jsxs("div",{className:"flex w-[450px] flex-col gap-2 p-4",children:[w.jsx("div",{className:"-mx-2 -mt-2 flex items-center justify-end",children:e?w.jsx(qe,{icon:"check",htmlForm:"noteForm"},"done"):w.jsx(qe,{icon:"edit",onClick:()=>t(!0)},"edit")}),!e&&w.jsx("div",{className:"flex-grow overflow-auto break-words",children:w.jsx(o2,{markdown:n})}),e&&w.jsx("form",{id:"noteForm",onSubmit:o(s),className:"flex flex-grow",children:w.jsx("textarea",{...i("userNote"),className:"w-full resize-none border-2 border-slate-600 bg-slate-800 px-3 py-2 text-sm outline-none"})})]})}const zb="3.7.5",jU=zb,$U=typeof atob=="function",zU=typeof btoa=="function",yo=typeof Buffer=="function",b1=typeof TextDecoder=="function"?new TextDecoder:void 0,S1=typeof TextEncoder=="function"?new TextEncoder:void 0,VU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",jo=Array.prototype.slice.call(VU),Ca=(e=>{let t={};return e.forEach((n,r)=>t[n]=r),t})(jo),BU=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,et=String.fromCharCode.bind(String),C1=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),Vb=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),Bb=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),Ub=e=>{let t,n,r,i,o="";const s=e.length%3;for(let a=0;a255||(r=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|i,o+=jo[t>>18&63]+jo[t>>12&63]+jo[t>>6&63]+jo[t&63]}return s?o.slice(0,s-3)+"===".substring(s):o},Hp=zU?e=>btoa(e):yo?e=>Buffer.from(e,"binary").toString("base64"):Ub,Md=yo?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let r=0,i=e.length;rt?Vb(Md(e)):Md(e),UU=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?et(192|t>>>6)+et(128|t&63):et(224|t>>>12&15)+et(128|t>>>6&63)+et(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return et(240|t>>>18&7)+et(128|t>>>12&63)+et(128|t>>>6&63)+et(128|t&63)}},HU=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Hb=e=>e.replace(HU,UU),_1=yo?e=>Buffer.from(e,"utf8").toString("base64"):S1?e=>Md(S1.encode(e)):e=>Hp(Hb(e)),Wi=(e,t=!1)=>t?Vb(_1(e)):_1(e),T1=e=>Wi(e,!0),WU=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,GU=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),n=t-65536;return et((n>>>10)+55296)+et((n&1023)+56320);case 3:return et((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return et((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},Wb=e=>e.replace(WU,GU),Gb=e=>{if(e=e.replace(/\s+/g,""),!BU.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,n="",r,i;for(let o=0;o>16&255):i===64?et(t>>16&255,t>>8&255):et(t>>16&255,t>>8&255,t&255);return n},Wp=$U?e=>atob(Bb(e)):yo?e=>Buffer.from(e,"base64").toString("binary"):Gb,Kb=yo?e=>C1(Buffer.from(e,"base64")):e=>C1(Wp(e).split("").map(t=>t.charCodeAt(0))),qb=e=>Kb(Qb(e)),KU=yo?e=>Buffer.from(e,"base64").toString("utf8"):b1?e=>b1.decode(Kb(e)):e=>Wb(Wp(e)),Qb=e=>Bb(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),Dd=e=>KU(Qb(e)),qU=e=>{if(typeof e!="string")return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},Xb=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),Yb=function(){const e=(t,n)=>Object.defineProperty(String.prototype,t,Xb(n));e("fromBase64",function(){return Dd(this)}),e("toBase64",function(t){return Wi(this,t)}),e("toBase64URI",function(){return Wi(this,!0)}),e("toBase64URL",function(){return Wi(this,!0)}),e("toUint8Array",function(){return qb(this)})},Zb=function(){const e=(t,n)=>Object.defineProperty(Uint8Array.prototype,t,Xb(n));e("toBase64",function(t){return Ua(this,t)}),e("toBase64URI",function(){return Ua(this,!0)}),e("toBase64URL",function(){return Ua(this,!0)})},QU=()=>{Yb(),Zb()},qs={version:zb,VERSION:jU,atob:Wp,atobPolyfill:Gb,btoa:Hp,btoaPolyfill:Ub,fromBase64:Dd,toBase64:Wi,encode:Wi,encodeURI:T1,encodeURL:T1,utob:Hb,btou:Wb,decode:Dd,isValid:qU,fromUint8Array:Ua,toUint8Array:qb,extendString:Yb,extendUint8Array:Zb,extendBuiltins:QU};function XU(){const e=A.useRef(null),[t,n]=A.useState(!1),r=ee(f=>f.exportState),[i,o]=A.useState(!1),[s,a]=A.useState(""),l=A.useCallback(f=>{const c=r(f);return qs.encode(JSON.stringify(c))},[r]),u=A.useCallback(f=>{const c=f.target.checked;o(c),a(l(c))},[l]);return A.useEffect(()=>{!t||!e.current||e.current.select()},[t,s]),w.jsxs(w.Fragment,{children:[w.jsx(Tn,{text:"Export string",onClick:()=>{n(!0),a(l(i))}}),w.jsxs(bu,{isOpen:t,onCloseRequest:()=>n(!1),className:"relative h-2/3 w-full max-w-screen-lg space-y-2 border-2 border-slate-700 p-4",children:[w.jsxs("div",{className:"flex items-center justify-between",children:[w.jsx(Up,{label:"Include overlays",checked:i,onChange:u,reverse:!0}),w.jsx(qe,{icon:"close",onClick:()=>n(!1),className:"text-md"})]}),w.jsx("textarea",{ref:e,className:"h-full resize-none bg-slate-900/60 px-3 py-2 text-sm outline-none",value:s,readOnly:!0})]})]})}function YU(){const e=ee(l=>l.importState),[t,n]=A.useState(!1),{register:r,handleSubmit:i,reset:o}=Ks(),s=A.useCallback(l=>{e(JSON.parse(qs.decode(l.importString))),n(!1)},[e]),a=A.useCallback(()=>{n(!1),o()},[o]);return w.jsxs(w.Fragment,{children:[w.jsx(Tn,{text:"Import string",onClick:()=>n(!0)}),w.jsxs(bu,{isOpen:t,className:"h-2/3 w-full max-w-screen-lg space-y-2 border-2 border-slate-700 p-4",onCloseRequest:a,children:[w.jsx("div",{className:"flex justify-end",children:w.jsx(qe,{icon:"close",onClick:()=>n(!1),className:"text-md"})}),w.jsxs("form",{className:"flex h-full flex-col gap-4",onSubmit:i(s),children:[w.jsx("textarea",{...r("importString"),className:"h-full resize-none bg-slate-900/60 px-3 py-2 text-sm outline-none"}),w.jsx(Tn,{text:"Import",htmlType:"submit",className:"self-end"})]})]})]})}function ZU(){const e=ee(i=>i.importState),{isFileSystemSupported:t,setFileHandle:n}=su(),r=A.useCallback(async()=>{try{const i=await M5();n(i);const s=await(await i.getFile()).text();e(JSON.parse(qs.decode(s)))}catch{}},[e,n]);return t?w.jsx(Tn,{text:"Load",onClick:r}):null}function JU(){const e=ee(i=>i.exportState),{isFileSystemSupported:t,fileHandle:n}=su(),r=A.useCallback(async()=>{if(!n)return;const i=e(!0),o=qs.encode(JSON.stringify(i));try{await D5(n,o),alert("File Saved")}catch(s){console.error(s)}},[e,n]);return t?w.jsx(Tn,{text:"Save",onClick:r,disabled:!n}):null}function eH(){const e=ee(i=>i.exportState),{isFileSystemSupported:t,setFileHandle:n}=su(),r=A.useCallback(async()=>{const i=e(!0),o=qs.encode(JSON.stringify(i));try{const s=await I5(o);n(s),alert("File Saved")}catch(s){console.error(s)}},[e,n]);return t?w.jsx(Tn,{text:"Save as...",onClick:r}):null}function tH(e,t,n,r){for(var i=-1,o=e==null?0:e.length;++io.isActive).map(o=>o.abilities.filter(s=>s.isActive).map(s=>s.castTimes.map(a=>({player:o,ability:s,castTime:a})))).flat(2).sort((o,s)=>o.castTime-s.castTime);if(n==="none")return D1(i,t).map(o=>{const s=L1(o.castEvents,f=>f.player.id),a=Object.values(s).map(f=>{const[c,...d]=f,h=c.player.class,p=c.player.name;return[gi(h,p),gi(h,c.ability.ability.shortName),...d.flatMap(v=>[`{spell:${v.ability.ability.spellId}}`,gi(h,v.ability.ability.shortName)]),`{spell:${c.ability.ability.spellId}}`].join(" ")}).join(" ");let l=ar(o.castTime),u="";if(r.markersEnabled){const f=r.markers.findLast(c=>c.time<=o.castTime);u=f?","+Uy(f):"",l=ar(o.castTime-((f==null?void 0:f.time)||0))}return`{time:${l}${u}} ${a} `}).join(` +`);if(n==="player"){const o=L1(i,s=>s.player.id);return Object.values(o).map(s=>{const a=s[0].player.class,l=s[0].player.name,u=D1(s,t);return[gi(a,l),...u.map(f=>{const[c,...d]=f.castEvents,h=[gi(a,c.ability.ability.shortName),...d.flatMap(k=>[`{spell:${k.ability.ability.spellId}}`,gi(a,k.ability.ability.shortName)]),`{spell:${c.ability.ability.spellId}}`].join(" ");let p=ar(f.castTime),v="";if(r.markersEnabled){const k=r.markers.findLast(g=>g.time<=f.castTime);v=k?","+Uy(k):"",p=ar(f.castTime-((k==null?void 0:k.time)||0))}return`{time:${p}${v}} ${h} `})].join(` +`)}).join(` + +`)}return""}function D1(e,t){const n=[];return e.length&&(n.push({castTime:e[0].castTime,castEvents:[]}),e.forEach(r=>{const i=n[n.length-1];r.castTime-i.castTime<=t?i.castEvents.push(r):n.push({castTime:r.castTime,castEvents:[r]})})),n}function MG(){const[e,t]=A.useState(!1),[n,r]=A.useState(""),[i,o]=A.useState(!1),s=A.useRef(null),a=A.useCallback(l=>{const u=l.target.checked?"player":"none";r(M1({groupBy:u})),o(l.target.checked)},[]);return A.useEffect(()=>{!e||!s.current||s.current.select()},[e,n]),w.jsxs(w.Fragment,{children:[w.jsx(Tn,{text:"Export MRT",onClick:()=>{t(!0),r(M1({groupBy:i?"player":"none"}))}}),w.jsxs(bu,{isOpen:e,onCloseRequest:()=>t(!1),className:"relative h-2/3 w-full max-w-screen-lg space-y-2 border-2 border-slate-700 p-4",children:[w.jsxs("div",{className:"flex items-center justify-between",children:[w.jsx(Up,{label:"Group by player",checked:i,onChange:a}),w.jsx(qe,{icon:"close",onClick:()=>t(!1),className:"text-md"})]}),w.jsx("textarea",{className:"h-full resize-none bg-slate-900/60 px-3 py-2 text-sm outline-none",value:n,readOnly:!0,ref:s})]})]})}function DG(){return w.jsx("div",{children:w.jsxs("div",{className:"grid grid-cols-2 gap-2 p-3",children:[w.jsx(ZU,{}),w.jsx(YU,{}),w.jsx(JU,{}),w.jsx(XU,{}),w.jsx(eH,{}),w.jsx(MG,{})]})})}const I1={fight:{icon:"fight",Component:RU},note:{icon:"note",Component:NU},settings:{icon:"settings",Component:DG}};function IG(){const[e,t]=A.useState("fight"),n=A.useCallback(i=>{t(o=>o===i?null:i)},[]);let r=null;return e&&(r=I1[e].Component),w.jsxs("div",{className:At("grid grid-cols-[repeat(2,minmax(0px,auto))]",{"border-l-2 border-slate-700":!!r}),children:[r&&w.jsx(r,{}),w.jsx("div",{className:"col-start-2 flex flex-col divide-y-2 divide-slate-700 border-l-2 border-slate-700",children:Object.entries(I1).map(([i,o])=>w.jsx("div",{className:At("p-3 text-xl transition-colors duration-150",{"bg-slate-700":e===i}),children:w.jsx(qe,{icon:o.icon,onClick:()=>n(i)})},i))})]})}function OG(){return w.jsxs(O5,{children:[w.jsx(sI,{}),w.jsxs("main",{className:"grid grid-cols-[auto_1fr_auto] grid-rows-[minmax(0,auto)]",children:[w.jsx(cU,{}),w.jsx(PU,{}),w.jsx(IG,{})]})]})}Zc.createRoot(document.getElementById("root")).render(w.jsx(he.StrictMode,{children:w.jsx(OG,{})})); diff --git a/assets/index-PjgksUOS.css b/assets/index-PjgksUOS.css deleted file mode 100644 index 8a4b85a..0000000 --- a/assets/index-PjgksUOS.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * OverlayScrollbars - * Version: 2.4.5 - * - * Copyright (c) Rene Haas | KingSora. - * https://github.com/KingSora - * - * Released under the MIT license. - */.os-size-observer,.os-size-observer-listener{scroll-behavior:auto!important;direction:inherit;pointer-events:none;overflow:hidden;visibility:hidden;box-sizing:border-box}.os-size-observer,.os-size-observer-listener,.os-size-observer-listener-item,.os-size-observer-listener-item-final{writing-mode:horizontal-tb;position:absolute;left:0;top:0}.os-size-observer{z-index:-1;contain:strict;display:flex;flex-direction:row;flex-wrap:nowrap;padding:inherit;border:inherit;box-sizing:inherit;margin:-133px;top:0;right:0;bottom:0;left:0;transform:scale(.1)}.os-size-observer:before{content:"";flex:none;box-sizing:inherit;padding:10px;width:10px;height:10px}.os-size-observer-appear{animation:os-size-observer-appear-animation 1ms forwards}.os-size-observer-listener{box-sizing:border-box;position:relative;flex:auto;padding:inherit;border:inherit;margin:-133px;transform:scale(10)}.os-size-observer-listener.ltr{margin-right:-266px;margin-left:0}.os-size-observer-listener.rtl{margin-left:-266px;margin-right:0}.os-size-observer-listener:empty:before{content:"";width:100%;height:100%}.os-size-observer-listener:empty:before,.os-size-observer-listener>.os-size-observer-listener-item{display:block;position:relative;padding:inherit;border:inherit;box-sizing:content-box;flex:auto}.os-size-observer-listener-scroll{box-sizing:border-box;display:flex}.os-size-observer-listener-item{right:0;bottom:0;overflow:hidden;direction:ltr;flex:none}.os-size-observer-listener-item-final{transition:none}@keyframes os-size-observer-appear-animation{0%{cursor:auto}to{cursor:none}}.os-trinsic-observer{flex:none;box-sizing:border-box;position:relative;max-width:0px;max-height:1px;padding:0;margin:0;border:none;overflow:hidden;z-index:-1;height:0;top:calc(100% + 1px);contain:strict}.os-trinsic-observer:not(:empty){height:calc(100% + 1px);top:-1px}.os-trinsic-observer:not(:empty)>.os-size-observer{width:1000%;height:1000%;min-height:1px;min-width:1px}.os-environment{scroll-behavior:auto!important;--os-custom-prop: -1;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:var(--os-custom-prop)}.os-environment div{width:200%;height:200%;margin:10px 0}.os-environment.os-environment-flexbox-glue{display:flex;flex-direction:row;flex-wrap:nowrap;height:auto;width:auto;min-height:200px;min-width:200px}.os-environment.os-environment-flexbox-glue div{flex:auto;width:auto;height:auto;max-height:100%;max-width:100%;margin:0}.os-environment.os-environment-flexbox-glue-max{max-height:200px}.os-environment.os-environment-flexbox-glue-max div{overflow:visible}.os-environment.os-environment-flexbox-glue-max div:before{content:"";display:block;height:999px;width:999px}.os-environment,[data-overlayscrollbars-viewport]{-ms-overflow-style:scrollbar!important}[data-overlayscrollbars-initialize],[data-overlayscrollbars~=scrollbarHidden],[data-overlayscrollbars-viewport~=scrollbarHidden],.os-scrollbar-hidden.os-environment{scrollbar-width:none!important}[data-overlayscrollbars-initialize]::-webkit-scrollbar,[data-overlayscrollbars-initialize]::-webkit-scrollbar-corner,[data-overlayscrollbars~=scrollbarHidden]::-webkit-scrollbar,[data-overlayscrollbars~=scrollbarHidden]::-webkit-scrollbar-corner,[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar,[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar-corner,.os-scrollbar-hidden.os-environment::-webkit-scrollbar,.os-scrollbar-hidden.os-environment::-webkit-scrollbar-corner{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;display:none!important;width:0!important;height:0!important}[data-overlayscrollbars-initialize]:not([data-overlayscrollbars]):not(html):not(body){overflow:auto}html[data-overlayscrollbars],html.os-scrollbar-hidden,html.os-scrollbar-hidden>body{box-sizing:border-box;margin:0;width:100%;height:100%}html[data-overlayscrollbars]>body{overflow:visible}[data-overlayscrollbars~=host],[data-overlayscrollbars-padding]{display:flex;align-items:stretch!important;flex-direction:row!important;flex-wrap:nowrap!important}[data-overlayscrollbars-padding],[data-overlayscrollbars-viewport]{box-sizing:inherit;position:relative;flex:auto!important;height:auto;width:100%;min-width:0;padding:0;margin:0;border:none;z-index:0}[data-overlayscrollbars-viewport]{--os-vaw: 0;--os-vah: 0}[data-overlayscrollbars-viewport][data-overlayscrollbars-viewport~=arrange]:before{content:"";position:absolute;pointer-events:none;z-index:-1;min-width:1px;min-height:1px;width:var(--os-vaw);height:var(--os-vah)}[data-overlayscrollbars-padding],[data-overlayscrollbars-viewport]{overflow:hidden}[data-overlayscrollbars~=host],[data-overlayscrollbars~=viewport]{position:relative;overflow:hidden}[data-overlayscrollbars~=overflowVisible],[data-overlayscrollbars-padding~=overflowVisible],[data-overlayscrollbars-viewport~=overflowVisible]{overflow:visible}[data-overlayscrollbars-overflow-x=hidden]{overflow-x:hidden}[data-overlayscrollbars-overflow-x=scroll]{overflow-x:scroll}[data-overlayscrollbars-overflow-x=hidden]{overflow-y:hidden}[data-overlayscrollbars-overflow-y=scroll]{overflow-y:scroll}[data-overlayscrollbars~=scrollbarPressed],[data-overlayscrollbars~=scrollbarPressed] [data-overlayscrollbars-viewport]{scroll-behavior:auto!important}[data-overlayscrollbars-content]{box-sizing:inherit}[data-overlayscrollbars-contents]:not([data-overlayscrollbars-padding]):not([data-overlayscrollbars-viewport]):not([data-overlayscrollbars-content]){display:contents}[data-overlayscrollbars-grid],[data-overlayscrollbars-grid] [data-overlayscrollbars-padding]{display:grid;grid-template:1fr/1fr}[data-overlayscrollbars-grid]>[data-overlayscrollbars-padding],[data-overlayscrollbars-grid]>[data-overlayscrollbars-viewport],[data-overlayscrollbars-grid]>[data-overlayscrollbars-padding]>[data-overlayscrollbars-viewport]{height:auto!important;width:auto!important}.os-scrollbar{contain:size layout;contain:size layout style;transition:opacity .15s,visibility .15s,top .15s,right .15s,bottom .15s,left .15s;pointer-events:none;position:absolute;opacity:0;visibility:hidden}body>.os-scrollbar{position:fixed;z-index:99999}.os-scrollbar-transitionless{transition:none}.os-scrollbar-track{position:relative;direction:ltr!important;padding:0!important;border:none!important}.os-scrollbar-handle{position:absolute}.os-scrollbar-track,.os-scrollbar-handle{pointer-events:none;width:100%;height:100%}.os-scrollbar.os-scrollbar-track-interactive .os-scrollbar-track,.os-scrollbar.os-scrollbar-handle-interactive .os-scrollbar-handle{pointer-events:auto;touch-action:none}.os-scrollbar-horizontal{bottom:0;left:0}.os-scrollbar-vertical{top:0;right:0}.os-scrollbar-rtl.os-scrollbar-horizontal{right:0}.os-scrollbar-rtl.os-scrollbar-vertical{right:auto;left:0}.os-scrollbar-visible,.os-scrollbar-interaction.os-scrollbar-visible{opacity:1;visibility:visible}.os-scrollbar-auto-hide.os-scrollbar-auto-hide-hidden{opacity:0;visibility:hidden}.os-scrollbar-unusable,.os-scrollbar-unusable *,.os-scrollbar-wheel,.os-scrollbar-wheel *{pointer-events:none!important}.os-scrollbar-unusable .os-scrollbar-handle{opacity:0!important}.os-scrollbar-horizontal .os-scrollbar-handle{bottom:0}.os-scrollbar-vertical .os-scrollbar-handle{right:0}.os-scrollbar-rtl.os-scrollbar-vertical .os-scrollbar-handle{right:auto;left:0}.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless,.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless.os-scrollbar-rtl{left:0;right:0}.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless,.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless.os-scrollbar-rtl{top:0;bottom:0}.os-scrollbar{--os-size: 0;--os-padding-perpendicular: 0;--os-padding-axis: 0;--os-track-border-radius: 0;--os-track-bg: none;--os-track-bg-hover: none;--os-track-bg-active: none;--os-track-border: none;--os-track-border-hover: none;--os-track-border-active: none;--os-handle-border-radius: 0;--os-handle-bg: none;--os-handle-bg-hover: none;--os-handle-bg-active: none;--os-handle-border: none;--os-handle-border-hover: none;--os-handle-border-active: none;--os-handle-min-size: 33px;--os-handle-max-size: none;--os-handle-perpendicular-size: 100%;--os-handle-perpendicular-size-hover: 100%;--os-handle-perpendicular-size-active: 100%;--os-handle-interactive-area-offset: 0}.os-scrollbar .os-scrollbar-track{border:var(--os-track-border);border-radius:var(--os-track-border-radius);background:var(--os-track-bg);transition:opacity .15s,background-color .15s,border-color .15s}.os-scrollbar .os-scrollbar-track:hover{border:var(--os-track-border-hover);background:var(--os-track-bg-hover)}.os-scrollbar .os-scrollbar-track:active{border:var(--os-track-border-active);background:var(--os-track-bg-active)}.os-scrollbar .os-scrollbar-handle{border:var(--os-handle-border);border-radius:var(--os-handle-border-radius);background:var(--os-handle-bg)}.os-scrollbar .os-scrollbar-handle:before{content:"";position:absolute;left:0;right:0;top:0;bottom:0;display:block}.os-scrollbar .os-scrollbar-handle:hover{border:var(--os-handle-border-hover);background:var(--os-handle-bg-hover)}.os-scrollbar .os-scrollbar-handle:active{border:var(--os-handle-border-active);background:var(--os-handle-bg-active)}.os-scrollbar-horizontal{padding:var(--os-padding-perpendicular) var(--os-padding-axis);right:var(--os-size);height:var(--os-size)}.os-scrollbar-horizontal.os-scrollbar-rtl{left:var(--os-size);right:0}.os-scrollbar-horizontal .os-scrollbar-handle{min-width:var(--os-handle-min-size);max-width:var(--os-handle-max-size);height:var(--os-handle-perpendicular-size);transition:opacity .15s,background-color .15s,border-color .15s,height .15s}.os-scrollbar-horizontal .os-scrollbar-handle:before{top:calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1);bottom:calc(var(--os-padding-perpendicular) * -1)}.os-scrollbar-horizontal:hover .os-scrollbar-handle{height:var(--os-handle-perpendicular-size-hover)}.os-scrollbar-horizontal:active .os-scrollbar-handle{height:var(--os-handle-perpendicular-size-active)}.os-scrollbar-vertical{padding:var(--os-padding-axis) var(--os-padding-perpendicular);bottom:var(--os-size);width:var(--os-size)}.os-scrollbar-vertical .os-scrollbar-handle{min-height:var(--os-handle-min-size);max-height:var(--os-handle-max-size);width:var(--os-handle-perpendicular-size);transition:opacity .15s,background-color .15s,border-color .15s,width .15s}.os-scrollbar-vertical .os-scrollbar-handle:before{left:calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1);right:calc(var(--os-padding-perpendicular) * -1)}.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before{right:calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1);left:calc(var(--os-padding-perpendicular) * -1)}.os-scrollbar-vertical:hover .os-scrollbar-handle{width:var(--os-handle-perpendicular-size-hover)}.os-scrollbar-vertical:active .os-scrollbar-handle{width:var(--os-handle-perpendicular-size-active)}[data-overlayscrollbars~=updating]>.os-scrollbar,.os-theme-none.os-scrollbar{display:none!important}.os-theme-dark,.os-theme-light{box-sizing:border-box;--os-size: 10px;--os-padding-perpendicular: 2px;--os-padding-axis: 2px;--os-track-border-radius: 10px;--os-handle-interactive-area-offset: 4px;--os-handle-border-radius: 10px}.os-theme-dark{--os-handle-bg: rgba(0, 0, 0, .44);--os-handle-bg-hover: rgba(0, 0, 0, .55);--os-handle-bg-active: rgba(0, 0, 0, .66)}.os-theme-light{--os-handle-bg: rgba(255, 255, 255, .44);--os-handle-bg-hover: rgba(255, 255, 255, .55);--os-handle-bg-active: rgba(255, 255, 255, .66)}.os-no-css-vars.os-theme-dark.os-scrollbar .os-scrollbar-handle,.os-no-css-vars.os-theme-light.os-scrollbar .os-scrollbar-handle,.os-no-css-vars.os-theme-dark.os-scrollbar .os-scrollbar-track,.os-no-css-vars.os-theme-light.os-scrollbar .os-scrollbar-track{border-radius:10px}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal{padding:2px;right:10px;height:10px}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal.os-scrollbar-cornerless,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal.os-scrollbar-cornerless{right:0}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal.os-scrollbar-rtl,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal.os-scrollbar-rtl{left:10px;right:0}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal.os-scrollbar-rtl.os-scrollbar-cornerless,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal.os-scrollbar-rtl.os-scrollbar-cornerless{left:0}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal .os-scrollbar-handle,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal .os-scrollbar-handle{min-width:33px;max-width:none}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal .os-scrollbar-handle:before{top:-6px;bottom:-2px}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical,.os-no-css-vars.os-theme-light.os-scrollbar-vertical{padding:2px;bottom:10px;width:10px}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical.os-scrollbar-cornerless,.os-no-css-vars.os-theme-light.os-scrollbar-vertical.os-scrollbar-cornerless{bottom:0}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical .os-scrollbar-handle,.os-no-css-vars.os-theme-light.os-scrollbar-vertical .os-scrollbar-handle{min-height:33px;max-height:none}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical .os-scrollbar-handle:before,.os-no-css-vars.os-theme-light.os-scrollbar-vertical .os-scrollbar-handle:before{left:-6px;right:-2px}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before,.os-no-css-vars.os-theme-light.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before{right:-6px;left:-2px}.os-no-css-vars.os-theme-dark .os-scrollbar-handle{background:rgba(0,0,0,.44)}.os-no-css-vars.os-theme-dark:hover .os-scrollbar-handle{background:rgba(0,0,0,.55)}.os-no-css-vars.os-theme-dark:active .os-scrollbar-handle{background:rgba(0,0,0,.66)}.os-no-css-vars.os-theme-light .os-scrollbar-handle{background:rgba(255,255,255,.44)}.os-no-css-vars.os-theme-light:hover .os-scrollbar-handle{background:rgba(255,255,255,.55)}.os-no-css-vars.os-theme-light:active .os-scrollbar-handle{background:rgba(255,255,255,.66)}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.-left-2{left:-.5rem}.-left-4{left:-1rem}.-right-4{right:-1rem}.bottom-0{bottom:0}.bottom-\[120\%\]{bottom:120%}.left-0{left:0}.left-1\/2{left:50%}.right-0{right:0}.top-0{top:0}.top-4{top:1rem}.top-6{top:1.5rem}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2 / span 2}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.-mr-3{margin-right:-.75rem}.-mt-2{margin-top:-.5rem}.mb-2{margin-bottom:.5rem}.ml-2{margin-left:.5rem}.mt-1{margin-top:.25rem}.mt-3{margin-top:.75rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-\[4\/3\]{aspect-ratio:4/3}.aspect-\[5\/4\]{aspect-ratio:5/4}.aspect-video{aspect-ratio:16 / 9}.h-0{height:0px}.h-2{height:.5rem}.h-2\/3{height:66.666667%}.h-full{height:100%}.h-px{height:1px}.min-h-\[222px\]{min-height:222px}.min-h-full{min-height:100%}.w-0{width:0px}.w-3{width:.75rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-\[450px\]{width:450px}.w-\[9px\]{width:9px}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.max-w-screen-lg{max-width:1024px}.flex-grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-\[1fr\,auto\]{grid-template-columns:1fr auto}.grid-cols-\[auto_1fr_auto\]{grid-template-columns:auto 1fr auto}.grid-cols-\[minmax\(0px\,1fr\)\,auto\]{grid-template-columns:minmax(0px,1fr) auto}.grid-cols-\[repeat\(2\,minmax\(0px\,auto\)\)\]{grid-template-columns:repeat(2,minmax(0px,auto))}.grid-rows-\[auto\,1fr\]{grid-template-rows:auto 1fr}.flex-col{flex-direction:column}.place-content-center{place-content:center}.place-content-start{place-content:start}.place-items-start{place-items:start}.place-items-center{place-items:center}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.divide-y-2>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(2px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(2px * var(--tw-divide-y-reverse))}.divide-slate-700>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(51 65 85 / var(--tw-divide-opacity))}.self-end{align-self:flex-end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.border-2{border-width:2px}.border-x-4{border-left-width:4px;border-right-width:4px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-l-\[1px\]{border-left-width:1px}.border-l-\[5px\]{border-left-width:5px}.border-r-2{border-right-width:2px}.border-t-4{border-top-width:4px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-slate-500{--tw-border-opacity: 1;border-color:rgb(100 116 139 / var(--tw-border-opacity))}.border-slate-600{--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity))}.border-slate-700{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity))}.border-slate-700\/75{border-color:#334155bf}.border-transparent{border-color:transparent}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.border-yellow-600{--tw-border-opacity: 1;border-color:rgb(202 138 4 / var(--tw-border-opacity))}.border-r-slate-700{--tw-border-opacity: 1;border-right-color:rgb(51 65 85 / var(--tw-border-opacity))}.border-t-yellow-500{--tw-border-opacity: 1;border-top-color:rgb(234 179 8 / var(--tw-border-opacity))}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity))}.bg-slate-600\/50{background-color:#47556980}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity))}.bg-slate-700\/50{background-color:#33415580}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.bg-slate-800\/75{background-color:#1e293bbf}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity))}.bg-slate-900\/20{background-color:#0f172a33}.bg-slate-900\/40{background-color:#0f172a66}.bg-slate-900\/50{background-color:#0f172a80}.bg-slate-900\/60{background-color:#0f172a99}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[0\.5em\]{padding:.5em}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-contrast-dark{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-contrast-light{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-2{outline-width:2px}.outline-slate-600{outline-color:#475569}.outline-transparent{outline-color:transparent}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter-none{filter:none}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[filter\]{transition-property:filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[outline-color\]{transition-property:outline-color;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[outline-width\,outline-color\]{transition-property:outline-width,outline-color;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[outline\]{transition-property:outline;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-500{transition-duration:.5s}html{height:100%}body{min-height:100%;display:grid;grid-template-rows:1fr;--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}#root{display:grid;grid-template-rows:auto 1fr auto}main{grid-row:2}.os-scrollbar.os-scrollbar-vertical{width:8px}.os-theme-light.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle{background:rgba(248,250,252,.3)}.os-theme-light.os-scrollbar:hover>.os-scrollbar-track>.os-scrollbar-handle{background:rgba(248,250,252,.4)}#drawers-portal{position:relative;z-index:800}#modals-portal{position:relative;z-index:1000}.markdown{font-size:.8rem}.markdown *{all:revert}.markdown ul{padding-left:1.3em}.markdown a{--tw-text-opacity: 1;color:rgb(56 189 248 / var(--tw-text-opacity))}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-slate-100\/20:hover{background-color:#f1f5f933}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.hover\:outline-slate-500:hover{outline-color:#64748b}.focus\:outline-4:focus{outline-width:4px}.disabled\:border-slate-700:disabled{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity))}.disabled\:bg-slate-800:disabled{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.disabled\:text-slate-400:disabled{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.disabled\:text-slate-500:disabled{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.disabled\:hover\:bg-transparent:hover:disabled{background-color:transparent}.group:hover .group-hover\:border-t-yellow-300{--tw-border-opacity: 1;border-top-color:rgb(253 224 71 / var(--tw-border-opacity))}.group:hover .group-hover\:bg-slate-600{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.group:hover .group-hover\:opacity-80{opacity:.8} diff --git a/assets/index-nciSMtqN.js b/assets/index-nciSMtqN.js deleted file mode 100644 index e2b83d4..0000000 --- a/assets/index-nciSMtqN.js +++ /dev/null @@ -1,131 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var po=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fx={exports:{}},mc={},dx={exports:{}},Se={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Rl=Symbol.for("react.element"),k5=Symbol.for("react.portal"),b5=Symbol.for("react.fragment"),S5=Symbol.for("react.strict_mode"),C5=Symbol.for("react.profiler"),_5=Symbol.for("react.provider"),E5=Symbol.for("react.context"),T5=Symbol.for("react.forward_ref"),P5=Symbol.for("react.suspense"),A5=Symbol.for("react.memo"),L5=Symbol.for("react.lazy"),o0=Symbol.iterator;function M5(e){return e===null||typeof e!="object"?null:(e=o0&&e[o0]||e["@@iterator"],typeof e=="function"?e:null)}var hx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},px=Object.assign,mx={};function rs(e,t,n){this.props=e,this.context=t,this.refs=mx,this.updater=n||hx}rs.prototype.isReactComponent={};rs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};rs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function gx(){}gx.prototype=rs.prototype;function Lp(e,t,n){this.props=e,this.context=t,this.refs=mx,this.updater=n||hx}var Mp=Lp.prototype=new gx;Mp.constructor=Lp;px(Mp,rs.prototype);Mp.isPureReactComponent=!0;var s0=Array.isArray,yx=Object.prototype.hasOwnProperty,Op={current:null},vx={key:!0,ref:!0,__self:!0,__source:!0};function wx(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)yx.call(t,r)&&!vx.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1>>1,U=z[B];if(0>>1;Bi(Y,k))Hi(Q,Y)?(z[B]=Q,z[H]=k,B=H):(z[B]=Y,z[X]=k,B=X);else if(Hi(Q,k))z[B]=Q,z[H]=k,B=H;else break e}}return K}function i(z,K){var k=z.sortIndex-K.sortIndex;return k!==0?k:z.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,f=null,d=3,h=!1,p=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(z){for(var K=n(u);K!==null;){if(K.callback===null)r(u);else if(K.startTime<=z)r(u),K.sortIndex=K.expirationTime,t(a,K);else break;K=n(u)}}function b(z){if(v=!1,y(z),!p)if(n(a)!==null)p=!0,Z(T);else{var K=n(u);K!==null&&ee(b,K.startTime-z)}}function T(z,K){p=!1,v&&(v=!1,g(M),M=-1),h=!0;var k=d;try{for(y(K),f=n(a);f!==null&&(!(f.expirationTime>K)||z&&!I());){var B=f.callback;if(typeof B=="function"){f.callback=null,d=f.priorityLevel;var U=B(f.expirationTime<=K);K=e.unstable_now(),typeof U=="function"?f.callback=U:f===n(a)&&r(a),y(K)}else r(a);f=n(a)}if(f!==null)var w=!0;else{var X=n(u);X!==null&&ee(b,X.startTime-K),w=!1}return w}finally{f=null,d=k,h=!1}}var _=!1,L=null,M=-1,F=5,C=-1;function I(){return!(e.unstable_now()-Cz||125B?(z.sortIndex=k,t(u,z),n(a)===null&&z===n(u)&&(v?(g(M),M=-1):v=!0,ee(b,k-B))):(z.sortIndex=U,t(a,z),p||h||(p=!0,Z(T))),z},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(z){var K=d;return function(){var k=d;d=K;try{return z.apply(this,arguments)}finally{d=k}}}})(Sx);bx.exports=Sx;var B5=bx.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Cx=A,un=B5;function G(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vd=Object.prototype.hasOwnProperty,U5=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,a0={},u0={};function H5(e){return Vd.call(u0,e)?!0:Vd.call(a0,e)?!1:U5.test(e)?u0[e]=!0:(a0[e]=!0,!1)}function W5(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function G5(e,t,n,r){if(t===null||typeof t>"u"||W5(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function zt(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Ct={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ct[e]=new zt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ct[t]=new zt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ct[e]=new zt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ct[e]=new zt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ct[e]=new zt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ct[e]=new zt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ct[e]=new zt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ct[e]=new zt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ct[e]=new zt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ip=/[\-:]([a-z])/g;function $p(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ip,$p);Ct[t]=new zt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ip,$p);Ct[t]=new zt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ip,$p);Ct[t]=new zt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ct[e]=new zt(e,1,!1,e.toLowerCase(),null,!1,!1)});Ct.xlinkHref=new zt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ct[e]=new zt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Fp(e,t,n,r){var i=Ct.hasOwnProperty(t)?Ct[t]:null;(i!==null?i.type!==0:r||!(2l||i[s]!==o[l]){var a=` -`+i[s].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{kf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ms(e):""}function K5(e){switch(e.tag){case 5:return Ms(e.type);case 16:return Ms("Lazy");case 13:return Ms("Suspense");case 19:return Ms("SuspenseList");case 0:case 2:case 15:return e=bf(e.type,!1),e;case 11:return e=bf(e.type.render,!1),e;case 1:return e=bf(e.type,!0),e;default:return""}}function Wd(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case go:return"Fragment";case mo:return"Portal";case Bd:return"Profiler";case Rp:return"StrictMode";case Ud:return"Suspense";case Hd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Tx:return(e.displayName||"Context")+".Consumer";case Ex:return(e._context.displayName||"Context")+".Provider";case Np:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case jp:return t=e.displayName||null,t!==null?t:Wd(e.type)||"Memo";case Fr:t=e._payload,e=e._init;try{return Wd(e(t))}catch{}}return null}function q5(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Wd(t);case 8:return t===Rp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function si(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ax(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Q5(e){var t=Ax(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function la(e){e._valueTracker||(e._valueTracker=Q5(e))}function Lx(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ax(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function iu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Gd(e,t){var n=t.checked;return qe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function f0(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=si(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Mx(e,t){t=t.checked,t!=null&&Fp(e,"checked",t,!1)}function Kd(e,t){Mx(e,t);var n=si(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?qd(e,t.type,n):t.hasOwnProperty("defaultValue")&&qd(e,t.type,si(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function d0(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function qd(e,t,n){(t!=="number"||iu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Os=Array.isArray;function Do(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=aa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function al(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var js={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},X5=["Webkit","ms","Moz","O"];Object.keys(js).forEach(function(e){X5.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),js[t]=js[e]})});function $x(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||js.hasOwnProperty(e)&&js[e]?(""+t).trim():t+"px"}function Fx(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=$x(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Y5=qe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Yd(e,t){if(t){if(Y5[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(G(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(G(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(G(61))}if(t.style!=null&&typeof t.style!="object")throw Error(G(62))}}function Zd(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Jd=null;function zp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var eh=null,Io=null,$o=null;function m0(e){if(e=zl(e)){if(typeof eh!="function")throw Error(G(280));var t=e.stateNode;t&&(t=xc(t),eh(e.stateNode,e.type,t))}}function Rx(e){Io?$o?$o.push(e):$o=[e]:Io=e}function Nx(){if(Io){var e=Io,t=$o;if($o=Io=null,m0(e),t)for(e=0;e>>=0,e===0?32:31-(a3(e)/u3|0)|0}var ua=64,ca=4194304;function Ds(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function au(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=Ds(l):(o&=s,o!==0&&(r=Ds(o)))}else s=n&~i,s!==0?r=Ds(s):o!==0&&(r=Ds(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Nl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Vn(t),e[t]=n}function h3(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Vs),C0=" ",_0=!1;function i2(e,t){switch(e){case"keyup":return V3.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function o2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yo=!1;function U3(e,t){switch(e){case"compositionend":return o2(t);case"keypress":return t.which!==32?null:(_0=!0,C0);case"textInput":return e=t.data,e===C0&&_0?null:e;default:return null}}function H3(e,t){if(yo)return e==="compositionend"||!qp&&i2(e,t)?(e=n2(),Va=Wp=Ur=null,yo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=A0(n)}}function u2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?u2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function c2(){for(var e=window,t=iu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=iu(e.document)}return t}function Qp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function J3(e){var t=c2(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&u2(n.ownerDocument.documentElement,n)){if(r!==null&&Qp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=L0(n,o);var s=L0(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,vo=null,sh=null,Us=null,lh=!1;function M0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;lh||vo==null||vo!==iu(r)||(r=vo,"selectionStart"in r&&Qp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Us&&pl(Us,r)||(Us=r,r=fu(sh,"onSelect"),0ko||(e.current=hh[ko],hh[ko]=null,ko--)}function Fe(e,t){ko++,hh[ko]=e.current,e.current=t}var li={},Lt=hi(li),Kt=hi(!1),Vi=li;function Ho(e,t){var n=e.type.contextTypes;if(!n)return li;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function qt(e){return e=e.childContextTypes,e!=null}function hu(){ze(Kt),ze(Lt)}function N0(e,t,n){if(Lt.current!==li)throw Error(G(168));Fe(Lt,t),Fe(Kt,n)}function w2(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(G(108,q5(e)||"Unknown",i));return qe({},n,r)}function pu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||li,Vi=Lt.current,Fe(Lt,e),Fe(Kt,Kt.current),!0}function j0(e,t,n){var r=e.stateNode;if(!r)throw Error(G(169));n?(e=w2(e,t,Vi),r.__reactInternalMemoizedMergedChildContext=e,ze(Kt),ze(Lt),Fe(Lt,e)):ze(Kt),Fe(Kt,n)}var dr=null,kc=!1,Ff=!1;function x2(e){dr===null?dr=[e]:dr.push(e)}function fE(e){kc=!0,x2(e)}function pi(){if(!Ff&&dr!==null){Ff=!0;var e=0,t=Me;try{var n=dr;for(Me=1;e>=s,i-=s,pr=1<<32-Vn(t)+i|n<M?(F=L,L=null):F=L.sibling;var C=d(g,L,y[M],b);if(C===null){L===null&&(L=F);break}e&&L&&C.alternate===null&&t(g,L),m=o(C,m,M),_===null?T=C:_.sibling=C,_=C,L=F}if(M===y.length)return n(g,L),Be&&Ci(g,M),T;if(L===null){for(;MM?(F=L,L=null):F=L.sibling;var I=d(g,L,C.value,b);if(I===null){L===null&&(L=F);break}e&&L&&I.alternate===null&&t(g,L),m=o(I,m,M),_===null?T=I:_.sibling=I,_=I,L=F}if(C.done)return n(g,L),Be&&Ci(g,M),T;if(L===null){for(;!C.done;M++,C=y.next())C=f(g,C.value,b),C!==null&&(m=o(C,m,M),_===null?T=C:_.sibling=C,_=C);return Be&&Ci(g,M),T}for(L=r(g,L);!C.done;M++,C=y.next())C=h(L,g,M,C.value,b),C!==null&&(e&&C.alternate!==null&&L.delete(C.key===null?M:C.key),m=o(C,m,M),_===null?T=C:_.sibling=C,_=C);return e&&L.forEach(function(O){return t(g,O)}),Be&&Ci(g,M),T}function x(g,m,y,b){if(typeof y=="object"&&y!==null&&y.type===go&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case sa:e:{for(var T=y.key,_=m;_!==null;){if(_.key===T){if(T=y.type,T===go){if(_.tag===7){n(g,_.sibling),m=i(_,y.props.children),m.return=g,g=m;break e}}else if(_.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Fr&&G0(T)===_.type){n(g,_.sibling),m=i(_,y.props),m.ref=Ss(g,_,y),m.return=g,g=m;break e}n(g,_);break}else t(g,_);_=_.sibling}y.type===go?(m=Ni(y.props.children,g.mode,b,y.key),m.return=g,g=m):(b=Qa(y.type,y.key,y.props,null,g.mode,b),b.ref=Ss(g,m,y),b.return=g,g=b)}return s(g);case mo:e:{for(_=y.key;m!==null;){if(m.key===_)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(g,m.sibling),m=i(m,y.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=Hf(y,g.mode,b),m.return=g,g=m}return s(g);case Fr:return _=y._init,x(g,m,_(y._payload),b)}if(Os(y))return p(g,m,y,b);if(vs(y))return v(g,m,y,b);ya(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(g,m.sibling),m=i(m,y),m.return=g,g=m):(n(g,m),m=Uf(y,g.mode,b),m.return=g,g=m),s(g)):n(g,m)}return x}var Go=P2(!0),A2=P2(!1),Vl={},er=hi(Vl),vl=hi(Vl),wl=hi(Vl);function Ii(e){if(e===Vl)throw Error(G(174));return e}function im(e,t){switch(Fe(wl,t),Fe(vl,e),Fe(er,Vl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Xd(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Xd(t,e)}ze(er),Fe(er,t)}function Ko(){ze(er),ze(vl),ze(wl)}function L2(e){Ii(wl.current);var t=Ii(er.current),n=Xd(t,e.type);t!==n&&(Fe(vl,e),Fe(er,n))}function om(e){vl.current===e&&(ze(er),ze(vl))}var We=hi(0);function xu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Rf=[];function sm(){for(var e=0;en?n:4,e(!0);var r=Nf.transition;Nf.transition={};try{e(!1),t()}finally{Me=n,Nf.transition=r}}function G2(){return Pn().memoizedState}function mE(e,t,n){var r=ei(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},K2(e))q2(t,n);else if(n=C2(e,t,n,r),n!==null){var i=Nt();Bn(n,e,r,i),Q2(n,t,r)}}function gE(e,t,n){var r=ei(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(K2(e))q2(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,Hn(l,s)){var a=t.interleaved;a===null?(i.next=i,nm(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=C2(e,t,i,r),n!==null&&(i=Nt(),Bn(n,e,r,i),Q2(n,t,r))}}function K2(e){var t=e.alternate;return e===Ke||t!==null&&t===Ke}function q2(e,t){Hs=ku=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Q2(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bp(e,n)}}var bu={readContext:Tn,useCallback:_t,useContext:_t,useEffect:_t,useImperativeHandle:_t,useInsertionEffect:_t,useLayoutEffect:_t,useMemo:_t,useReducer:_t,useRef:_t,useState:_t,useDebugValue:_t,useDeferredValue:_t,useTransition:_t,useMutableSource:_t,useSyncExternalStore:_t,useId:_t,unstable_isNewReconciler:!1},yE={readContext:Tn,useCallback:function(e,t){return Gn().memoizedState=[e,t===void 0?null:t],e},useContext:Tn,useEffect:q0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Wa(4194308,4,V2.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wa(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wa(4,2,e,t)},useMemo:function(e,t){var n=Gn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Gn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=mE.bind(null,Ke,e),[r.memoizedState,e]},useRef:function(e){var t=Gn();return e={current:e},t.memoizedState=e},useState:K0,useDebugValue:fm,useDeferredValue:function(e){return Gn().memoizedState=e},useTransition:function(){var e=K0(!1),t=e[0];return e=pE.bind(null,e[1]),Gn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ke,i=Gn();if(Be){if(n===void 0)throw Error(G(407));n=n()}else{if(n=t(),yt===null)throw Error(G(349));Ui&30||D2(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,q0($2.bind(null,r,o,e),[e]),r.flags|=2048,bl(9,I2.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Gn(),t=yt.identifierPrefix;if(Be){var n=mr,r=pr;n=(r&~(1<<32-Vn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=xl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Qn]=t,e[yl]=r,ik(e,t,!1,!1),t.stateNode=e;e:{switch(s=Zd(n,r),n){case"dialog":Ne("cancel",e),Ne("close",e),i=r;break;case"iframe":case"object":case"embed":Ne("load",e),i=r;break;case"video":case"audio":for(i=0;iQo&&(t.flags|=128,r=!0,Cs(o,!1),t.lanes=4194304)}else{if(!r)if(e=xu(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Cs(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Be)return Et(t),null}else 2*tt()-o.renderingStartTime>Qo&&n!==1073741824&&(t.flags|=128,r=!0,Cs(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=tt(),t.sibling=null,n=We.current,Fe(We,r?n&1|2:n&1),t):(Et(t),null);case 22:case 23:return ym(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?nn&1073741824&&(Et(t),t.subtreeFlags&6&&(t.flags|=8192)):Et(t),null;case 24:return null;case 25:return null}throw Error(G(156,t.tag))}function _E(e,t){switch(Yp(t),t.tag){case 1:return qt(t.type)&&hu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ko(),ze(Kt),ze(Lt),sm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return om(t),null;case 13:if(ze(We),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));Wo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(We),null;case 4:return Ko(),null;case 10:return tm(t.type._context),null;case 22:case 23:return ym(),null;case 24:return null;default:return null}}var wa=!1,Tt=!1,EE=typeof WeakSet=="function"?WeakSet:Set,ne=null;function _o(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ye(e,t,r)}else n.current=null}function _h(e,t,n){try{n()}catch(r){Ye(e,t,r)}}var ry=!1;function TE(e,t){if(ah=uu,e=c2(),Qp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(l=s+i),f!==o||r!==0&&f.nodeType!==3||(a=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++u===i&&(l=s),d===o&&++c===r&&(a=s),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(uh={focusedElem:e,selectionRange:n},uu=!1,ne=t;ne!==null;)if(t=ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ne=e;else for(;ne!==null;){t=ne;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var v=p.memoizedProps,x=p.memoizedState,g=t.stateNode,m=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:In(t.type,v),x);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(G(163))}}catch(b){Ye(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,ne=e;break}ne=t.return}return p=ry,ry=!1,p}function Ws(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&_h(t,n,o)}i=i.next}while(i!==r)}}function Cc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Eh(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function lk(e){var t=e.alternate;t!==null&&(e.alternate=null,lk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Qn],delete t[yl],delete t[dh],delete t[uE],delete t[cE])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ak(e){return e.tag===5||e.tag===3||e.tag===4}function iy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ak(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Th(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=du));else if(r!==4&&(e=e.child,e!==null))for(Th(e,t,n),e=e.sibling;e!==null;)Th(e,t,n),e=e.sibling}function Ph(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ph(e,t,n),e=e.sibling;e!==null;)Ph(e,t,n),e=e.sibling}var kt=null,$n=!1;function Dr(e,t,n){for(n=n.child;n!==null;)uk(e,t,n),n=n.sibling}function uk(e,t,n){if(Jn&&typeof Jn.onCommitFiberUnmount=="function")try{Jn.onCommitFiberUnmount(gc,n)}catch{}switch(n.tag){case 5:Tt||_o(n,t);case 6:var r=kt,i=$n;kt=null,Dr(e,t,n),kt=r,$n=i,kt!==null&&($n?(e=kt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):kt.removeChild(n.stateNode));break;case 18:kt!==null&&($n?(e=kt,n=n.stateNode,e.nodeType===8?$f(e.parentNode,n):e.nodeType===1&&$f(e,n),dl(e)):$f(kt,n.stateNode));break;case 4:r=kt,i=$n,kt=n.stateNode.containerInfo,$n=!0,Dr(e,t,n),kt=r,$n=i;break;case 0:case 11:case 14:case 15:if(!Tt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&_h(n,t,s),i=i.next}while(i!==r)}Dr(e,t,n);break;case 1:if(!Tt&&(_o(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ye(n,t,l)}Dr(e,t,n);break;case 21:Dr(e,t,n);break;case 22:n.mode&1?(Tt=(r=Tt)||n.memoizedState!==null,Dr(e,t,n),Tt=r):Dr(e,t,n);break;default:Dr(e,t,n)}}function oy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new EE),t.forEach(function(r){var i=FE.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Dn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=tt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*AE(r/1960))-r,10e?16:e,Hr===null)var r=!1;else{if(e=Hr,Hr=null,_u=0,Te&6)throw Error(G(331));var i=Te;for(Te|=4,ne=e.current;ne!==null;){var o=ne,s=o.child;if(ne.flags&16){var l=o.deletions;if(l!==null){for(var a=0;att()-mm?Ri(e,0):pm|=n),Qt(e,t)}function yk(e,t){t===0&&(e.mode&1?(t=ca,ca<<=1,!(ca&130023424)&&(ca=4194304)):t=1);var n=Nt();e=Cr(e,t),e!==null&&(Nl(e,t,n),Qt(e,n))}function $E(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),yk(e,n)}function FE(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(G(314))}r!==null&&r.delete(t),yk(e,n)}var vk;vk=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Kt.current)Gt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Gt=!1,SE(e,t,n);Gt=!!(e.flags&131072)}else Gt=!1,Be&&t.flags&1048576&&k2(t,gu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ga(e,t),e=t.pendingProps;var i=Ho(t,Lt.current);Ro(t,n),i=am(null,t,r,e,i,n);var o=um();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,qt(r)?(o=!0,pu(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,rm(t),i.updater=bc,t.stateNode=i,i._reactInternals=t,vh(t,r,e,n),t=kh(null,t,r,!0,o,n)):(t.tag=0,Be&&o&&Xp(t),It(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ga(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=NE(r),e=In(r,e),i){case 0:t=xh(null,t,r,e,n);break e;case 1:t=ey(null,t,r,e,n);break e;case 11:t=Z0(null,t,r,e,n);break e;case 14:t=J0(null,t,r,In(r.type,e),n);break e}throw Error(G(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:In(r,i),xh(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:In(r,i),ey(e,t,r,i,n);case 3:e:{if(tk(t),e===null)throw Error(G(387));r=t.pendingProps,o=t.memoizedState,i=o.element,_2(e,t),wu(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=qo(Error(G(423)),t),t=ty(e,t,r,n,i);break e}else if(r!==i){i=qo(Error(G(424)),t),t=ty(e,t,r,n,i);break e}else for(on=Yr(t.stateNode.containerInfo.firstChild),ln=t,Be=!0,Fn=null,n=A2(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Wo(),r===i){t=_r(e,t,n);break e}It(e,t,r,n)}t=t.child}return t;case 5:return L2(t),e===null&&mh(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,ch(r,i)?s=null:o!==null&&ch(r,o)&&(t.flags|=32),ek(e,t),It(e,t,s,n),t.child;case 6:return e===null&&mh(t),null;case 13:return nk(e,t,n);case 4:return im(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Go(t,null,r,n):It(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:In(r,i),Z0(e,t,r,i,n);case 7:return It(e,t,t.pendingProps,n),t.child;case 8:return It(e,t,t.pendingProps.children,n),t.child;case 12:return It(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Fe(yu,r._currentValue),r._currentValue=s,o!==null)if(Hn(o.value,s)){if(o.children===i.children&&!Kt.current){t=_r(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=vr(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),gh(o.return,n,t),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(G(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),gh(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}It(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ro(t,n),i=Tn(i),r=r(i),t.flags|=1,It(e,t,r,n),t.child;case 14:return r=t.type,i=In(r,t.pendingProps),i=In(r.type,i),J0(e,t,r,i,n);case 15:return Z2(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:In(r,i),Ga(e,t),t.tag=1,qt(r)?(e=!0,pu(t)):e=!1,Ro(t,n),T2(t,r,i),vh(t,r,i,n),kh(null,t,r,!0,e,n);case 19:return rk(e,t,n);case 22:return J2(e,t,n)}throw Error(G(156,t.tag))};function wk(e,t){return Wx(e,t)}function RE(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cn(e,t,n,r){return new RE(e,t,n,r)}function wm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function NE(e){if(typeof e=="function")return wm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Np)return 11;if(e===jp)return 14}return 2}function ti(e,t){var n=e.alternate;return n===null?(n=Cn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Qa(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")wm(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case go:return Ni(n.children,i,o,t);case Rp:s=8,i|=8;break;case Bd:return e=Cn(12,n,t,i|2),e.elementType=Bd,e.lanes=o,e;case Ud:return e=Cn(13,n,t,i),e.elementType=Ud,e.lanes=o,e;case Hd:return e=Cn(19,n,t,i),e.elementType=Hd,e.lanes=o,e;case Px:return Ec(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ex:s=10;break e;case Tx:s=9;break e;case Np:s=11;break e;case jp:s=14;break e;case Fr:s=16,r=null;break e}throw Error(G(130,e==null?e:typeof e,""))}return t=Cn(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ni(e,t,n,r){return e=Cn(7,e,r,t),e.lanes=n,e}function Ec(e,t,n,r){return e=Cn(22,e,r,t),e.elementType=Px,e.lanes=n,e.stateNode={isHidden:!1},e}function Uf(e,t,n){return e=Cn(6,e,null,t),e.lanes=n,e}function Hf(e,t,n){return t=Cn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jE(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Cf(0),this.expirationTimes=Cf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cf(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function xm(e,t,n,r,i,o,s,l,a){return e=new jE(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Cn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},rm(o),e}function zE(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Sk)}catch(e){console.error(e)}}Sk(),kx.exports=hn;var Ck=kx.exports;const WE=sr(Ck);var hy=Ck;zd.createRoot=hy.createRoot,zd.hydrateRoot=hy.hydrateRoot;const GE=!!(window!=null&&window.showOpenFilePicker);async function KE(){const[e]=await window.showOpenFilePicker();return e}async function qE(e,t){const n=await e.createWritable();await n.write(t),n.close()}async function QE(e){const t=await window.showSaveFilePicker(),n=await t.createWritable();return await n.write(e),await n.close(),t}const _k=_e.createContext(null);function XE(e){const{children:t}=e,[n,r]=A.useState(null),i=A.useMemo(()=>({isFileSystemSupported:GE,fileHandle:n,setFileHandle:r}),[n]);return S.jsx(_k.Provider,{value:i,children:t})}function Mc(){const e=A.useContext(_k);if(!e)throw new Error("ContextProvider not found");return e}var Ek={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},py=_e.createContext&&_e.createContext(Ek),ni=function(){return ni=Object.assign||function(e){for(var t,n=1,r=arguments.length;n4&&n.slice(0,4)==="data"&<.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(vy,IT);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!vy.test(o)){let s=o.replace(MT,DT);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Cm}return new i(r,t)}function DT(e){return"-"+e.toLowerCase()}function IT(e){return e.charAt(1).toUpperCase()}const $T={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},FT=Ak([Ok,Mk,$k,Fk,PT],"html"),_m=Ak([Ok,Mk,$k,Fk,AT],"svg");function RT(e){return e.join(" ").trim()}var Rk={},wy=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,NT=/\n/g,jT=/^\s*/,zT=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,VT=/^:\s*/,BT=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,UT=/^[;\s]*/,HT=/^\s+|\s+$/g,WT=` -`,xy="/",ky="*",Mi="",GT="comment",KT="declaration",qT=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(p){var v=p.match(NT);v&&(n+=v.length);var x=p.lastIndexOf(WT);r=~x?p.length-x:r+p.length}function o(){var p={line:n,column:r};return function(v){return v.position=new s(p),u(),v}}function s(p){this.start=p,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function l(p){var v=new Error(t.source+":"+n+":"+r+": "+p);if(v.reason=p,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function a(p){var v=p.exec(e);if(v){var x=v[0];return i(x),e=e.slice(x.length),v}}function u(){a(jT)}function c(p){var v;for(p=p||[];v=f();)v!==!1&&p.push(v);return p}function f(){var p=o();if(!(xy!=e.charAt(0)||ky!=e.charAt(1))){for(var v=2;Mi!=e.charAt(v)&&(ky!=e.charAt(v)||xy!=e.charAt(v+1));)++v;if(v+=2,Mi===e.charAt(v-1))return l("End of comment missing");var x=e.slice(2,v-2);return r+=2,i(x),e=e.slice(v),r+=2,p({type:GT,comment:x})}}function d(){var p=o(),v=a(zT);if(v){if(f(),!a(VT))return l("property missing ':'");var x=a(BT),g=p({type:KT,property:by(v[0].replace(wy,Mi)),value:x?by(x[0].replace(wy,Mi)):Mi});return a(UT),g}}function h(){var p=[];c(p);for(var v;v=d();)v!==!1&&(p.push(v),c(p));return p}return u(),h()};function by(e){return e?e.replace(HT,Mi):Mi}var QT=po&&po.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rk,"__esModule",{value:!0});var XT=QT(qT);function YT(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,XT.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var s=o.property,l=o.value;i?t(s,l,o):l&&(n=n||{},n[s]=l)}}),n}var Sy=Rk.default=YT;const ZT=Sy.default||Sy,Nk=jk("end"),Em=jk("start");function jk(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function JT(e){const t=Em(e),n=Nk(e);if(t&&n)return{start:t,end:n}}function qs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Cy(e.position):"start"in e||"end"in e?Cy(e):"line"in e||"column"in e?Fh(e):""}function Fh(e){return _y(e&&e.line)+":"+_y(e&&e.column)}function Cy(e){return Fh(e&&e.start)+"-"+Fh(e&&e.end)}function _y(e){return e&&typeof e=="number"?e:1}class Ot extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?o.ruleId=r:(o.source=r.slice(0,a),o.ruleId=r.slice(a+1))}if(!o.place&&o.ancestors&&o.ancestors){const a=o.ancestors[o.ancestors.length-1];a&&(o.place=a.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=l?l.line:void 0,this.name=qs(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ot.prototype.file="";Ot.prototype.name="";Ot.prototype.reason="";Ot.prototype.message="";Ot.prototype.stack="";Ot.prototype.column=void 0;Ot.prototype.line=void 0;Ot.prototype.ancestors=void 0;Ot.prototype.cause=void 0;Ot.prototype.fatal=void 0;Ot.prototype.place=void 0;Ot.prototype.ruleId=void 0;Ot.prototype.source=void 0;const Tm={}.hasOwnProperty,e4=new Map,t4=/[A-Z]/g,n4=/-([a-z])/g,r4=new Set(["table","tbody","thead","tfoot","tr"]),i4=new Set(["td","th"]),zk="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function o4(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=h4(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=d4(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?_m:FT,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Vk(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Vk(e,t,n){if(t.type==="element")return s4(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return l4(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return u4(e,t,n);if(t.type==="mdxjsEsm")return a4(e,t);if(t.type==="root")return c4(e,t,n);if(t.type==="text")return f4(e,t)}function s4(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=_m,e.schema=i),e.ancestors.push(t);const o=Uk(e,t.tagName,!1),s=p4(e,t);let l=Am(e,t);return r4.has(t.tagName)&&(l=l.filter(function(a){return typeof a=="string"?!_T(a):!0})),Bk(e,s,o,t),Pm(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function l4(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Cl(e,t.position)}function a4(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Cl(e,t.position)}function u4(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=_m,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Uk(e,t.name,!0),s=m4(e,t),l=Am(e,t);return Bk(e,s,o,t),Pm(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function c4(e,t,n){const r={};return Pm(r,Am(e,t)),e.create(t,e.Fragment,r,n)}function f4(e,t){return t.value}function Bk(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Pm(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function d4(e,t,n){return r;function r(i,o,s,l){const u=Array.isArray(s.children)?n:t;return l?u(o,s,l):u(o,s)}}function h4(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),a=Em(r);return t(i,o,s,l,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function p4(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Tm.call(t.properties,i)){const o=g4(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&i4.has(t.tagName)?r=l:n[s]=l}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function m4(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Cl(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,o=e.evaluater.evaluateExpression(l.expression)}else Cl(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Am(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:e4;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o0?(an(e,e.length,0,t),e):t}const Py={}.hasOwnProperty;function Wk(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Un(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const E4=mi(new RegExp("\\p{P}","u")),Rt=mi(/[A-Za-z]/),At=mi(/[\dA-Za-z]/),T4=mi(/[#-'*+\--9=?A-Z^-~]/);function Pu(e){return e!==null&&(e<32||e===127)}const Rh=mi(/\d/),P4=mi(/[\dA-Fa-f]/),Kk=mi(/[!-/:-@[-`{-~]/);function ce(e){return e!==null&&e<-2}function De(e){return e!==null&&(e<0||e===32)}function be(e){return e===-2||e===-1||e===32}function Oc(e){return Kk(e)||E4(e)}const Gi=mi(/\s/);function mi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ls(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(s=String.fromCharCode(o,l),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ee(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(a){return be(a)?(e.enter(n),l(a)):t(a)}function l(a){return be(a)&&o++s))return;const L=t.events.length;let M=L,F,C;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){if(F){C=t.events[M][1].end;break}F=!0}for(g(r),_=L;_y;){const T=n[b];t.containerState=T[1],T[0].exit.call(t,e)}n.length=y}function m(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function D4(e,t,n){return Ee(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Au(e){if(e===null||De(e)||Gi(e))return 1;if(Oc(e))return 2}function Dc(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),d=Object.assign({},e[n][1].start);Ly(f,-a),Ly(d,a),s={type:a>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},l={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:d},o={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:a>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},l.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},l.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=bn(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=bn(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=bn(u,Dc(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=bn(u,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=bn(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,an(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n0&&be(_)?Ee(e,m,"linePrefix",o+1)(_):m(_)}function m(_){return _===null||ce(_)?e.check(My,v,b)(_):(e.enter("codeFlowValue"),y(_))}function y(_){return _===null||ce(_)?(e.exit("codeFlowValue"),m(_)):(e.consume(_),y)}function b(_){return e.exit("codeFenced"),t(_)}function T(_,L,M){let F=0;return C;function C(V){return _.enter("lineEnding"),_.consume(V),_.exit("lineEnding"),I}function I(V){return _.enter("codeFencedFence"),be(V)?Ee(_,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):O(V)}function O(V){return V===l?(_.enter("codeFencedFenceSequence"),j(V)):M(V)}function j(V){return V===l?(F++,_.consume(V),j):F>=s?(_.exit("codeFencedFenceSequence"),be(V)?Ee(_,N,"whitespace")(V):N(V)):M(V)}function N(V){return V===null||ce(V)?(_.exit("codeFencedFence"),L(V)):M(V)}}}function W4(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Kf={name:"codeIndented",tokenize:K4},G4={tokenize:q4,partial:!0};function K4(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Ee(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?a(u):ce(u)?e.attempt(G4,s,a)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||ce(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),l)}function a(u){return e.exit("codeIndented"),t(u)}}function q4(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):ce(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Ee(e,o,"linePrefix",5)(s)}function o(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):ce(s)?i(s):n(s)}}const Q4={name:"codeText",tokenize:Z4,resolve:X4,previous:Y4};function X4(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Zk(e,t,n,r,i,o,s,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return f;function f(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),d):g===null||g===32||g===41||Pu(g)?n(g):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(g))}function d(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===62?(e.exit("chunkString"),e.exit(l),d(g)):g===null||g===60||ce(g)?n(g):(e.consume(g),g===92?p:h)}function p(g){return g===60||g===62||g===92?(e.consume(g),h):h(g)}function v(g){return!c&&(g===null||g===41||De(g))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(g)):c999||h===null||h===91||h===93&&!a||h===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):ce(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||ce(h)||l++>999?(e.exit("chunkString"),c(h)):(e.consume(h),a||(a=!be(h)),h===92?d:f)}function d(h){return h===91||h===92||h===93?(e.consume(h),l++,f):f(h)}}function eb(e,t,n,r,i,o){let s;return l;function l(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),s=d===40?41:d,a):n(d)}function a(d){return d===s?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(o),u(d))}function u(d){return d===s?(e.exit(o),a(s)):d===null?n(d):ce(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ee(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===s||d===null||ce(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?f:c)}function f(d){return d===s||d===92?(e.consume(d),c):c(d)}}function Qs(e,t){let n;return r;function r(i){return ce(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):be(i)?Ee(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const oP={name:"definition",tokenize:lP},sP={tokenize:aP,partial:!0};function lP(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),s(h)}function s(h){return Jk.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function l(h){return i=Un(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),a):n(h)}function a(h){return De(h)?Qs(e,u)(h):u(h)}function u(h){return Zk(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(sP,f,f)(h)}function f(h){return be(h)?Ee(e,d,"whitespace")(h):d(h)}function d(h){return h===null||ce(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function aP(e,t,n){return r;function r(l){return De(l)?Qs(e,i)(l):n(l)}function i(l){return eb(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return be(l)?Ee(e,s,"whitespace")(l):s(l)}function s(l){return l===null||ce(l)?t(l):n(l)}}const uP={name:"hardBreakEscape",tokenize:cP};function cP(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return ce(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const fP={name:"headingAtx",tokenize:hP,resolve:dP};function dP(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},an(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function hP(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||De(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||ce(c)?(e.exit("atxHeading"),t(c)):be(c)?Ee(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||De(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}const pP=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Dy=["pre","script","style","textarea"],mP={name:"htmlFlow",tokenize:wP,resolveTo:vP,concrete:!0},gP={tokenize:kP,partial:!0},yP={tokenize:xP,partial:!0};function vP(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function wP(e,t,n){const r=this;let i,o,s,l,a;return u;function u(w){return c(w)}function c(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),f}function f(w){return w===33?(e.consume(w),d):w===47?(e.consume(w),o=!0,v):w===63?(e.consume(w),i=3,r.interrupt?t:k):Rt(w)?(e.consume(w),s=String.fromCharCode(w),x):n(w)}function d(w){return w===45?(e.consume(w),i=2,h):w===91?(e.consume(w),i=5,l=0,p):Rt(w)?(e.consume(w),i=4,r.interrupt?t:k):n(w)}function h(w){return w===45?(e.consume(w),r.interrupt?t:k):n(w)}function p(w){const X="CDATA[";return w===X.charCodeAt(l++)?(e.consume(w),l===X.length?r.interrupt?t:O:p):n(w)}function v(w){return Rt(w)?(e.consume(w),s=String.fromCharCode(w),x):n(w)}function x(w){if(w===null||w===47||w===62||De(w)){const X=w===47,Y=s.toLowerCase();return!X&&!o&&Dy.includes(Y)?(i=1,r.interrupt?t(w):O(w)):pP.includes(s.toLowerCase())?(i=6,X?(e.consume(w),g):r.interrupt?t(w):O(w)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(w):o?m(w):y(w))}return w===45||At(w)?(e.consume(w),s+=String.fromCharCode(w),x):n(w)}function g(w){return w===62?(e.consume(w),r.interrupt?t:O):n(w)}function m(w){return be(w)?(e.consume(w),m):C(w)}function y(w){return w===47?(e.consume(w),C):w===58||w===95||Rt(w)?(e.consume(w),b):be(w)?(e.consume(w),y):C(w)}function b(w){return w===45||w===46||w===58||w===95||At(w)?(e.consume(w),b):T(w)}function T(w){return w===61?(e.consume(w),_):be(w)?(e.consume(w),T):y(w)}function _(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),a=w,L):be(w)?(e.consume(w),_):M(w)}function L(w){return w===a?(e.consume(w),a=null,F):w===null||ce(w)?n(w):(e.consume(w),L)}function M(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||De(w)?T(w):(e.consume(w),M)}function F(w){return w===47||w===62||be(w)?y(w):n(w)}function C(w){return w===62?(e.consume(w),I):n(w)}function I(w){return w===null||ce(w)?O(w):be(w)?(e.consume(w),I):n(w)}function O(w){return w===45&&i===2?(e.consume(w),Z):w===60&&i===1?(e.consume(w),ee):w===62&&i===4?(e.consume(w),B):w===63&&i===3?(e.consume(w),k):w===93&&i===5?(e.consume(w),K):ce(w)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(gP,U,j)(w)):w===null||ce(w)?(e.exit("htmlFlowData"),j(w)):(e.consume(w),O)}function j(w){return e.check(yP,N,U)(w)}function N(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),V}function V(w){return w===null||ce(w)?j(w):(e.enter("htmlFlowData"),O(w))}function Z(w){return w===45?(e.consume(w),k):O(w)}function ee(w){return w===47?(e.consume(w),s="",z):O(w)}function z(w){if(w===62){const X=s.toLowerCase();return Dy.includes(X)?(e.consume(w),B):O(w)}return Rt(w)&&s.length<8?(e.consume(w),s+=String.fromCharCode(w),z):O(w)}function K(w){return w===93?(e.consume(w),k):O(w)}function k(w){return w===62?(e.consume(w),B):w===45&&i===2?(e.consume(w),k):O(w)}function B(w){return w===null||ce(w)?(e.exit("htmlFlowData"),U(w)):(e.consume(w),B)}function U(w){return e.exit("htmlFlow"),t(w)}}function xP(e,t,n){const r=this;return i;function i(s){return ce(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function kP(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ul,t,n)}}const bP={name:"htmlText",tokenize:SP};function SP(e,t,n){const r=this;let i,o,s;return l;function l(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),a}function a(k){return k===33?(e.consume(k),u):k===47?(e.consume(k),T):k===63?(e.consume(k),y):Rt(k)?(e.consume(k),M):n(k)}function u(k){return k===45?(e.consume(k),c):k===91?(e.consume(k),o=0,p):Rt(k)?(e.consume(k),m):n(k)}function c(k){return k===45?(e.consume(k),h):n(k)}function f(k){return k===null?n(k):k===45?(e.consume(k),d):ce(k)?(s=f,ee(k)):(e.consume(k),f)}function d(k){return k===45?(e.consume(k),h):f(k)}function h(k){return k===62?Z(k):k===45?d(k):f(k)}function p(k){const B="CDATA[";return k===B.charCodeAt(o++)?(e.consume(k),o===B.length?v:p):n(k)}function v(k){return k===null?n(k):k===93?(e.consume(k),x):ce(k)?(s=v,ee(k)):(e.consume(k),v)}function x(k){return k===93?(e.consume(k),g):v(k)}function g(k){return k===62?Z(k):k===93?(e.consume(k),g):v(k)}function m(k){return k===null||k===62?Z(k):ce(k)?(s=m,ee(k)):(e.consume(k),m)}function y(k){return k===null?n(k):k===63?(e.consume(k),b):ce(k)?(s=y,ee(k)):(e.consume(k),y)}function b(k){return k===62?Z(k):y(k)}function T(k){return Rt(k)?(e.consume(k),_):n(k)}function _(k){return k===45||At(k)?(e.consume(k),_):L(k)}function L(k){return ce(k)?(s=L,ee(k)):be(k)?(e.consume(k),L):Z(k)}function M(k){return k===45||At(k)?(e.consume(k),M):k===47||k===62||De(k)?F(k):n(k)}function F(k){return k===47?(e.consume(k),Z):k===58||k===95||Rt(k)?(e.consume(k),C):ce(k)?(s=F,ee(k)):be(k)?(e.consume(k),F):Z(k)}function C(k){return k===45||k===46||k===58||k===95||At(k)?(e.consume(k),C):I(k)}function I(k){return k===61?(e.consume(k),O):ce(k)?(s=I,ee(k)):be(k)?(e.consume(k),I):F(k)}function O(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,j):ce(k)?(s=O,ee(k)):be(k)?(e.consume(k),O):(e.consume(k),N)}function j(k){return k===i?(e.consume(k),i=void 0,V):k===null?n(k):ce(k)?(s=j,ee(k)):(e.consume(k),j)}function N(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||De(k)?F(k):(e.consume(k),N)}function V(k){return k===47||k===62||De(k)?F(k):n(k)}function Z(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function ee(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),z}function z(k){return be(k)?Ee(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):K(k)}function K(k){return e.enter("htmlTextData"),s(k)}}const Om={name:"labelEnd",tokenize:AP,resolveTo:PP,resolveAll:TP},CP={tokenize:LP},_P={tokenize:MP},EP={tokenize:OP};function TP(e){let t=-1;for(;++t=3&&(u===null||ce(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),be(u)?Ee(e,l,"whitespace")(u):l(u))}}const Ut={name:"list",tokenize:VP,continuation:{tokenize:BP},exit:HP},jP={tokenize:WP,partial:!0},zP={tokenize:UP,partial:!0};function VP(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(h){const p=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Rh(h)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Xa,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(h)}return n(h)}function a(h){return Rh(h)&&++s<10?(e.consume(h),a):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Ul,r.interrupt?n:c,e.attempt(jP,d,f))}function c(h){return r.containerState.initialBlankLine=!0,o++,d(h)}function f(h){return be(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),d):n(h)}function d(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function BP(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ul,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ee(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!be(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(zP,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ee(e,e.attempt(Ut,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function UP(e,t,n){const r=this;return Ee(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function HP(e){e.exit(this.containerState.type)}function WP(e,t,n){const r=this;return Ee(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!be(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Iy={name:"setextUnderline",tokenize:KP,resolveTo:GP};function GP(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function KP(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),be(u)?Ee(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||ce(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const qP={tokenize:QP};function QP(e){const t=this,n=e.attempt(Ul,r,e.attempt(this.parser.constructs.flowInitial,i,Ee(e,e.attempt(this.parser.constructs.flow,i,e.attempt(eP,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const XP={resolveAll:nb()},YP=tb("string"),ZP=tb("text");function tb(e){return{tokenize:t,resolveAll:nb(e==="text"?JP:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(c){return u(c)?o(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function nA(e,t){let n=-1;const r=[];let i;for(;++n0){const He=J.tokenStack[J.tokenStack.length-1];(He[1]||Fy).call(J,void 0,He[0])}for(D.position={start:Ir(E.length>0?E[0][1].start:{line:1,column:1,offset:0}),end:Ir(E.length>0?E[E.length-2][1].end:{line:1,column:1,offset:0})},me=-1;++me1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,a);const u={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,u),e.applyData(t,u)}function AA(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function LA(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ob(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function MA(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ob(e,t);const i={src:ls(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function OA(e,t){const n={src:ls(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function DA(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function IA(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ob(e,t);const i={href:ls(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function $A(e,t){const n={href:ls(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function FA(e,t,n){const r=e.all(t),i=n?RA(n):sb(t),o={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l1}function NA(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Em(t.children[1]),a=Nk(t.children[t.children.length-1]);l&&a&&(s.position={start:l,end:a}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function UA(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let a=-1;const u=[];for(;++a0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(jy(t.slice(i),i>0,!1)),o.join("")}function jy(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Ry||o===Ny;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Ry||o===Ny;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function GA(e,t){const n={type:"text",value:WA(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function KA(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const qA={blockquote:SA,break:CA,code:_A,delete:EA,emphasis:TA,footnoteReference:PA,heading:AA,html:LA,imageReference:MA,image:OA,inlineCode:DA,linkReference:IA,link:$A,listItem:FA,list:NA,paragraph:jA,root:zA,strong:VA,table:BA,tableCell:HA,tableRow:UA,text:GA,thematicBreak:KA,toml:ba,yaml:ba,definition:ba,footnoteDefinition:ba};function ba(){}const lb=-1,Ic=0,Lu=1,Mu=2,Dm=3,Im=4,$m=5,Fm=6,ab=7,ub=8,zy=typeof self=="object"?self:globalThis,QA=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case Ic:case lb:return n(s,i);case Lu:{const l=n([],i);for(const a of s)l.push(r(a));return l}case Mu:{const l=n({},i);for(const[a,u]of s)l[r(a)]=r(u);return l}case Dm:return n(new Date(s),i);case Im:{const{source:l,flags:a}=s;return n(new RegExp(l,a),i)}case $m:{const l=n(new Map,i);for(const[a,u]of s)l.set(r(a),r(u));return l}case Fm:{const l=n(new Set,i);for(const a of s)l.add(r(a));return l}case ab:{const{name:l,message:a}=s;return n(new zy[l](a),i)}case ub:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new zy[o](s),i)};return r},Vy=e=>QA(new Map,e)(0),so="",{toString:XA}={},{keys:YA}=Object,Es=e=>{const t=typeof e;if(t!=="object"||!e)return[Ic,t];const n=XA.call(e).slice(8,-1);switch(n){case"Array":return[Lu,so];case"Object":return[Mu,so];case"Date":return[Dm,so];case"RegExp":return[Im,so];case"Map":return[$m,so];case"Set":return[Fm,so]}return n.includes("Array")?[Lu,n]:n.includes("Error")?[ab,n]:[Mu,n]},Sa=([e,t])=>e===Ic&&(t==="function"||t==="symbol"),ZA=(e,t,n,r)=>{const i=(s,l)=>{const a=r.push(s)-1;return n.set(l,a),a},o=s=>{if(n.has(s))return n.get(s);let[l,a]=Es(s);switch(l){case Ic:{let c=s;switch(a){case"bigint":l=ub,c=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);c=null;break;case"undefined":return i([lb],s)}return i([l,c],s)}case Lu:{if(a)return i([a,[...s]],s);const c=[],f=i([l,c],s);for(const d of s)c.push(o(d));return f}case Mu:{if(a)switch(a){case"BigInt":return i([a,s.toString()],s);case"Boolean":case"Number":case"String":return i([a,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const c=[],f=i([l,c],s);for(const d of YA(s))(e||!Sa(Es(s[d])))&&c.push([o(d),o(s[d])]);return f}case Dm:return i([l,s.toISOString()],s);case Im:{const{source:c,flags:f}=s;return i([l,{source:c,flags:f}],s)}case $m:{const c=[],f=i([l,c],s);for(const[d,h]of s)(e||!(Sa(Es(d))||Sa(Es(h))))&&c.push([o(d),o(h)]);return f}case Fm:{const c=[],f=i([l,c],s);for(const d of s)(e||!Sa(Es(d)))&&c.push(o(d));return f}}const{message:u}=s;return i([l,{name:a,message:u}],s)};return o},By=(e,{json:t,lossy:n}={})=>{const r=[];return ZA(!(t||n),!!t,new Map,r)(e),r},Ou=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Vy(By(e,t)):structuredClone(e):(e,t)=>Vy(By(e,t));function JA(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function e6(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function t6(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||JA,r=e.options.footnoteBackLabel||e6,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let a=-1;for(;++a0&&p.push({type:"text",value:" "});let m=typeof n=="string"?n:n(a,h);typeof m=="string"&&(m={type:"text",value:m}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(a,h),className:["data-footnote-backref"]},children:Array.isArray(m)?m:[m]})}const x=c[c.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const m=x.children[x.children.length-1];m&&m.type==="text"?m.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...p)}else c.push(...p);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(c,!0)};e.patch(u,g),l.push(g)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Ou(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` -`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` -`}]}}const $c=function(e){if(e==null)return o6;if(typeof e=="function")return Fc(e);if(typeof e=="object")return Array.isArray(e)?n6(e):r6(e);if(typeof e=="string")return i6(e);throw new Error("Expected function, string, or object as test")};function n6(e){const t=[];let n=-1;for(;++n":""))+")"})}return d;function d(){let h=cb,p,v,x;if((!t||o(a,u,c[c.length-1]||void 0))&&(h=u6(n(a,c)),h[0]===jh))return h;if("children"in a&&a.children){const g=a;if(g.children&&h[0]!==a6)for(v=(r?g.children.length:-1)+s,x=c.concat(g);v>-1&&v0&&n.push({type:"text",value:` -`}),n}function Uy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Hy(e,t){const n=f6(e,t),r=n.one(e,void 0),i=t6(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:` -`},i),o}function g6(e,t){return e&&"run"in e?async function(n,r){const i=Hy(n,t);await e.run(i,r)}:function(n){return Hy(n,t||e)}}function Wy(e){if(e)throw e}var Ya=Object.prototype.hasOwnProperty,db=Object.prototype.toString,Gy=Object.defineProperty,Ky=Object.getOwnPropertyDescriptor,qy=function(t){return typeof Array.isArray=="function"?Array.isArray(t):db.call(t)==="[object Array]"},Qy=function(t){if(!t||db.call(t)!=="[object Object]")return!1;var n=Ya.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ya.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ya.call(t,i)},Xy=function(t,n){Gy&&n.name==="__proto__"?Gy(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Yy=function(t,n){if(n==="__proto__")if(Ya.call(t,n)){if(Ky)return Ky(t,n).value}else return;return t[n]},y6=function e(){var t,n,r,i,o,s,l=arguments[0],a=1,u=arguments.length,c=!1;for(typeof l=="boolean"&&(c=l,l=arguments[1]||{},a=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});as.length;let a;l&&s.push(i);try{a=e.apply(this,s)}catch(u){const c=u;if(l&&n)throw c;return i(c)}l||(a instanceof Promise?a.then(o,i):a instanceof Error?i(a):o(a))}function i(s,...l){n||(n=!0,t(s,...l))}function o(s){i(null,s)}}const Kn={basename:x6,dirname:k6,extname:b6,join:S6,sep:"/"};function x6(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Hl(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function k6(e){if(Hl(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function b6(e){Hl(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function S6(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function _6(e,t){let n="",r=0,i=-1,o=0,s=-1,l,a;for(;++s<=e.length;){if(s2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else l===46&&o>-1?o++:o=-1}return n}function Hl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const E6={cwd:T6};function T6(){return"/"}function Bh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function P6(e){if(typeof e=="string")e=new URL(e);else if(!Bh(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return A6(e)}function A6(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[h,...p]=c;const v=r[d][1];Vh(v)&&Vh(h)&&(h=Qf(!0,v,h)),r[d]=[u,h,...p]}}}}const D6=new Nm().freeze();function Jf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ed(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function td(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Jy(e){if(!Vh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function e1(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ca(e){return I6(e)?e:new hb(e)}function I6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function $6(e){return typeof e=="string"||F6(e)}function F6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const R6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",t1=[],n1={allowDangerousHtml:!0},N6=/^(https?|ircs?|mailto|xmpp)$/i,j6=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function z6(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,s=e.disallowedElements,l=e.rehypePlugins||t1,a=e.remarkPlugins||t1,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...n1}:n1,c=e.skipHtml,f=e.unwrapDisallowed,d=e.urlTransform||V6,h=D6().use(bA).use(a).use(g6,u).use(l),p=new hb;typeof r=="string"&&(p.value=r);for(const m of j6)Object.hasOwn(e,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+R6+m.id,void 0);const v=h.parse(p);let x=h.runSync(v,p);return i&&(x={type:"element",tagName:"div",properties:{className:i},children:x.type==="root"?x.children:[x]}),Rm(x,g),o4(x,{Fragment:S.Fragment,components:o,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function g(m,y,b){if(m.type==="raw"&&b&&typeof y=="number")return c?b.children.splice(y,1):b.children[y]={type:"text",value:m.value},y;if(m.type==="element"){let T;for(T in Gf)if(Object.hasOwn(Gf,T)&&Object.hasOwn(m.properties,T)){const _=m.properties[T],L=Gf[T];(L===null||L.includes(m.tagName))&&(m.properties[T]=d(String(_||""),T,m))}}if(m.type==="element"){let T=t?!t.includes(m.tagName):s?s.includes(m.tagName):!1;if(!T&&n&&typeof y=="number"&&(T=!n(m,y,b)),T&&b&&typeof y=="number")return f&&m.children?b.children.splice(y,1,...m.children):b.children.splice(y,1),y}}}function V6(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||N6.test(e.slice(0,t))?e:""}function r1(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function B6(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function U6(e,t,n){const i=$c((n||{}).ignore||[]),o=H6(t);let s=-1;for(;++s0?{type:"text",value:_}:void 0),_===!1?d.lastIndex=b+1:(p!==b&&m.push({type:"text",value:u.value.slice(p,b)}),Array.isArray(_)?m.push(..._):_&&m.push(_),p=b+y[0].length,g=!0),!d.global)break;y=d.exec(u.value)}return g?(p?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=r1(e,"(");let o=r1(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function pb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Gi(n)||Oc(n))&&(!t||n!==47)}mb.peek=mL;function oL(){return{enter:{gfmFootnoteDefinition:lL,gfmFootnoteDefinitionLabelString:aL,gfmFootnoteCall:fL,gfmFootnoteCallString:dL},exit:{gfmFootnoteDefinition:cL,gfmFootnoteDefinitionLabelString:uL,gfmFootnoteCall:pL,gfmFootnoteCallString:hL}}}function sL(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:gL,footnoteReference:mb}}}function lL(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function aL(){this.buffer()}function uL(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Un(this.sliceSerialize(e)).toLowerCase()}function cL(e){this.exit(e)}function fL(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dL(){this.buffer()}function hL(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Un(this.sliceSerialize(e)).toLowerCase()}function pL(e){this.exit(e)}function mb(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),l(),s(),o+=i.move("]"),o}function mL(){return"["}function gL(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteDefinition"),l=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),l(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),yL)),s(),o}function yL(e,t,n){return t===0?e:(n?"":" ")+e}const vL=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];gb.peek=SL;function wL(){return{canContainEols:["delete"],enter:{strikethrough:kL},exit:{strikethrough:bL}}}function xL(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:vL}],handlers:{delete:gb}}}function kL(e){this.enter({type:"delete",children:[]},e)}function bL(e){this.exit(e)}function gb(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function SL(){return"~"}function CL(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||EL,i=[],o=[],s=[],l=[];let a=0,u=-1;for(;++ua&&(a=e[u].length);++xl[x])&&(l[x]=m)}p.push(g)}o[u]=p,s[u]=v}let c=-1;if(typeof n=="object"&&"length"in n)for(;++cl[c]&&(l[c]=g),d[c]=g),f[c]=m}o.splice(1,0,f),s.splice(1,0,d),u=-1;const h=[];for(;++u "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),PL);return i(),s}function PL(e,t,n){return">"+(n?"":" ")+e}function AL(e,t){return o1(e,t.inConstruct,!0)&&!o1(e,t.notInConstruct,!1)}function o1(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++rs&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function ML(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function OL(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function DL(e,t,n,r){const i=OL(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(ML(e,n)){const f=n.enter("codeIndented"),d=n.indentLines(o,IL);return f(),d}const l=n.createTracker(r),a=i.repeat(Math.max(LL(o,i)+1,3)),u=n.enter("codeFenced");let c=l.move(a);if(e.lang){const f=n.enter(`codeFencedLang${s}`);c+=l.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...l.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${s}`);c+=l.move(" "),c+=l.move(n.safe(e.meta,{before:c,after:` -`,encode:["`"],...l.current()})),f()}return c+=l.move(` -`),o&&(c+=l.move(o+` -`)),c+=l.move(a),u(),c}function IL(e,t,n){return(n?"":" ")+e}function jm(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function $L(e,t,n,r){const i=jm(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":` -`,...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),s(),u}function FL(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}yb.peek=RL;function yb(e,t,n,r){const i=FL(n),o=n.enter("emphasis"),s=n.createTracker(r);let l=s.move(i);return l+=s.move(n.containerPhrasing(e,{before:l,after:i,...s.current()})),l+=s.move(i),o(),l}function RL(e,t,n){return n.options.emphasis||"*"}function NL(e,t){let n=!1;return Rm(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,jh}),!!((!e.depth||e.depth<3)&&Lm(e)&&(t.options.setext||n))}function jL(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(NL(e,n)){const c=n.enter("headingSetext"),f=n.enter("phrasing"),d=n.containerPhrasing(e,{...o.current(),before:` -`,after:` -`});return f(),c(),d+` -`+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(` -`))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),a=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:` -`,...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),a(),l(),u}vb.peek=zL;function vb(e){return e.value||""}function zL(){return"<"}wb.peek=VL;function wb(e,t,n,r){const i=jm(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function VL(){return"!"}xb.peek=BL;function xb(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("![");const u=n.safe(e.alt,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==f?a+=l.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function BL(){return"!"}kb.peek=UL;function kb(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o\u007F]/.test(e.url))}Sb.peek=HL;function Sb(e,t,n,r){const i=jm(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,a;if(bb(e,n)){const c=n.stack;n.stack=[],l=n.enter("autolink");let f=s.move("<");return f+=s.move(n.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),l(),n.stack=c,f}l=n.enter("link"),a=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function HL(e,t,n){return bb(e,n)?"<":"["}Cb.peek=WL;function Cb(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==f?a+=l.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function WL(){return"["}function zm(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function GL(e){const t=zm(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function KL(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function _b(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function qL(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?KL(n):zm(n);const l=e.ordered?s==="."?")":".":GL(n);let a=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),_b(n)===s&&c){let f=-1;for(;++f-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),c);return a(),u;function c(f,d,h){return d?(h?"":" ".repeat(s))+f:(h?o:o+" ".repeat(s-o.length))+f}}function YL(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const ZL=$c(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text"]);function JL(e,t,n,r){return(e.children.some(function(s){return ZL(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function eM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Eb.peek=tM;function Eb(e,t,n,r){const i=eM(n),o=n.enter("strong"),s=n.createTracker(r);let l=s.move(i+i);return l+=s.move(n.containerPhrasing(e,{before:l,after:i,...s.current()})),l+=s.move(i+i),o(),l}function tM(e,t,n){return n.options.strong||"*"}function nM(e,t,n,r){return n.safe(e.value,r)}function rM(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function iM(e,t,n){const r=(_b(n)+(n.options.ruleSpaces?" ":"")).repeat(rM(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Tb={blockquote:TL,break:s1,code:DL,definition:$L,emphasis:yb,hardBreak:s1,heading:jL,html:vb,image:wb,imageReference:xb,inlineCode:kb,link:Sb,linkReference:Cb,list:qL,listItem:XL,paragraph:YL,root:JL,strong:Eb,text:nM,thematicBreak:iM};function oM(){return{enter:{table:sM,tableData:l1,tableHeader:l1,tableRow:aM},exit:{codeText:uM,table:lM,tableData:od,tableHeader:od,tableRow:od}}}function sM(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function lM(e){this.exit(e),this.data.inTable=void 0}function aM(e){this.enter({type:"tableRow",children:[]},e)}function od(e){this.exit(e)}function l1(e){this.enter({type:"tableCell",children:[]},e)}function uM(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,cM));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function cM(e,t){return t==="|"?t:e}function fM(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` -`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:s,tableCell:a,tableRow:l}};function s(h,p,v,x){return u(c(h,v,x),h.align)}function l(h,p,v,x){const g=f(h,v,x),m=u([g]);return m.slice(0,m.indexOf(` -`))}function a(h,p,v,x){const g=v.enter("tableCell"),m=v.enter("phrasing"),y=v.containerPhrasing(h,{...x,before:o,after:o});return m(),g(),y}function u(h,p){return CL(h,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function c(h,p,v){const x=h.children;let g=-1;const m=[],y=p.enter("table");for(;++g0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const AM={tokenize:RM,partial:!0};function LM(){return{document:{91:{tokenize:IM,continuation:{tokenize:$M},exit:FM}},text:{91:{tokenize:DM},93:{add:"after",tokenize:MM,resolveTo:OM}}}}function MM(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){s=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return l;function l(a){if(!s||!s._balanced)return n(a);const u=Un(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function OM(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function DM(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return l;function l(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),a}function a(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(o>999||f===93&&!s||f===null||f===91||De(f))return n(f);if(f===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(Un(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return De(f)||(s=!0),o++,e.consume(f),f===92?c:u}function c(f){return f===91||f===92||f===93?(e.consume(f),o++,u):u(f)}}function IM(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,l;return a;function a(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(p)}function c(p){if(s>999||p===93&&!l||p===null||p===91||De(p))return n(p);if(p===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=Un(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return De(p)||(l=!0),s++,e.consume(p),p===92?f:c}function f(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}function d(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(o)||i.push(o),Ee(e,h,"gfmFootnoteDefinitionWhitespace")):n(p)}function h(p){return t(p)}}function $M(e,t,n){return e.check(Ul,t,e.attempt(AM,t,n))}function FM(e){e.exit("gfmFootnoteDefinition")}function RM(e,t,n){const r=this;return Ee(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function NM(e){let n=(e||{}).singleTilde;const r={tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let a=-1;for(;++a1?a(p):(s.consume(p),f++,h);if(f<2&&!n)return a(p);const x=s.exit("strikethroughSequenceTemporary"),g=Au(p);return x._open=!g||g===2&&!!v,x._close=!v||v===2&&!!g,l(p)}}}class jM{constructor(){this.map=[]}add(t,n,r){zM(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function zM(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i-1;){const N=r.events[I][1].type;if(N==="lineEnding"||N==="linePrefix")I--;else break}const O=I>-1?r.events[I][1].type:null,j=O==="tableHead"||O==="tableRow"?_:a;return j===_&&r.parser.lazy[r.now().line]?n(C):j(C)}function a(C){return e.enter("tableHead"),e.enter("tableRow"),u(C)}function u(C){return C===124||(s=!0,o+=1),c(C)}function c(C){return C===null?n(C):ce(C)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),h):n(C):be(C)?Ee(e,c,"whitespace")(C):(o+=1,s&&(s=!1,i+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),f(C)))}function f(C){return C===null||C===124||De(C)?(e.exit("data"),c(C)):(e.consume(C),C===92?d:f)}function d(C){return C===92||C===124?(e.consume(C),f):f(C)}function h(C){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(C):(e.enter("tableDelimiterRow"),s=!1,be(C)?Ee(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):p(C))}function p(C){return C===45||C===58?x(C):C===124?(s=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),v):T(C)}function v(C){return be(C)?Ee(e,x,"whitespace")(C):x(C)}function x(C){return C===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),g):C===45?(o+=1,g(C)):C===null||ce(C)?b(C):T(C)}function g(C){return C===45?(e.enter("tableDelimiterFiller"),m(C)):T(C)}function m(C){return C===45?(e.consume(C),m):C===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(C))}function y(C){return be(C)?Ee(e,b,"whitespace")(C):b(C)}function b(C){return C===124?p(C):C===null||ce(C)?!s||i!==o?T(C):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(C)):T(C)}function T(C){return n(C)}function _(C){return e.enter("tableRow"),L(C)}function L(C){return C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),L):C===null||ce(C)?(e.exit("tableRow"),t(C)):be(C)?Ee(e,L,"whitespace")(C):(e.enter("data"),M(C))}function M(C){return C===null||C===124||De(C)?(e.exit("data"),L(C)):(e.consume(C),C===92?F:M)}function F(C){return C===92||C===124?(e.consume(C),M):M(C)}}function HM(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],l=!1,a=0,u,c,f;const d=new jM;for(;++nn[2]+1){const p=n[2]+1,v=n[3]-n[2]-1;e.add(p,v,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(o.end=Object.assign({},co(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function u1(e,t,n,r,i){const o=[],s=co(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function co(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const WM={tokenize:KM};function GM(){return{text:{91:WM}}}function KM(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),o)}function o(a){return De(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),s):n(a)}function s(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(a)}function l(a){return ce(a)?t(a):be(a)?e.check({tokenize:qM},t,n)(a):n(a)}}function qM(e,t,n){return Ee(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function QM(e){return Wk([xM(),LM(),NM(e),BM(),GM()])}const XM={};function YM(e){const t=this,n=e||XM,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(QM(n)),o.push(gM()),s.push(yM(n))}function Fb(e){const{markdown:t}=e;return S.jsx(z6,{className:"markdown",remarkPlugins:[YM],children:t})}const Rc=A.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Nc=A.createContext({}),jc=A.createContext(null),zc=typeof document<"u",Vc=zc?A.useLayoutEffect:A.useEffect,Rb=A.createContext({strict:!1}),Bm=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),ZM="framerAppearId",Nb="data-"+Bm(ZM);function JM(e,t,n,r){const{visualElement:i}=A.useContext(Nc),o=A.useContext(Rb),s=A.useContext(jc),l=A.useContext(Rc).reducedMotion,a=A.useRef();r=r||o.renderer,!a.current&&r&&(a.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));const u=a.current;A.useInsertionEffect(()=>{u&&u.update(n,s)});const c=A.useRef(!!(n[Nb]&&!window.HandoffComplete));return Vc(()=>{u&&(u.render(),c.current&&u.animationState&&u.animationState.animateChanges())}),A.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),c.current&&(c.current=!1,window.HandoffComplete=!0))}),u}function To(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function eO(e,t,n){return A.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):To(n)&&(n.current=r))},[t])}function _l(e){return typeof e=="string"||Array.isArray(e)}function Bc(e){return typeof e=="object"&&typeof e.start=="function"}const Um=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Hm=["initial",...Um];function Uc(e){return Bc(e.animate)||Hm.some(t=>_l(e[t]))}function jb(e){return!!(Uc(e)||e.variants)}function tO(e,t){if(Uc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||_l(n)?n:void 0,animate:_l(r)?r:void 0}}return e.inherit!==!1?t:{}}function nO(e){const{initial:t,animate:n}=tO(e,A.useContext(Nc));return A.useMemo(()=>({initial:t,animate:n}),[c1(t),c1(n)])}function c1(e){return Array.isArray(e)?e.join(" "):e}const f1={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},El={};for(const e in f1)El[e]={isEnabled:t=>f1[e].some(n=>!!t[n])};function rO(e){for(const t in e)El[t]={...El[t],...e[t]}}const Tl=A.createContext({}),zb=A.createContext({}),iO=Symbol.for("motionComponentSymbol");function oO({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&rO(e);function o(l,a){let u;const c={...A.useContext(Rc),...l,layoutId:sO(l)},{isStatic:f}=c,d=nO(l),h=r(l,f);if(!f&&zc){d.visualElement=JM(i,h,c,t);const p=A.useContext(zb),v=A.useContext(Rb).strict;d.visualElement&&(u=d.visualElement.loadFeatures(c,v,e,p))}return A.createElement(Nc.Provider,{value:d},u&&d.visualElement?A.createElement(u,{visualElement:d.visualElement,...c}):null,n(i,l,eO(h,d.visualElement,a),h,f,d.visualElement))}const s=A.forwardRef(o);return s[iO]=i,s}function sO({layoutId:e}){const t=A.useContext(Tl).id;return t&&e!==void 0?t+"-"+e:e}function lO(e){function t(r,i={}){return oO(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const aO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Wm(e){return typeof e!="string"||e.includes("-")?!1:!!(aO.indexOf(e)>-1||/[A-Z]/.test(e))}const Du={};function uO(e){Object.assign(Du,e)}const Wl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ji=new Set(Wl);function Vb(e,{layout:t,layoutId:n}){return Ji.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Du[e]||e==="opacity")}const Mt=e=>!!(e&&e.getVelocity),cO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fO=Wl.length;function dO(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;st=>typeof t=="string"&&t.startsWith(e),Ub=Bb("--"),Hh=Bb("var(--"),hO=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,pO=(e,t)=>t&&typeof e=="number"?t.transform(e):e,ai=(e,t,n)=>Math.min(Math.max(n,e),t),eo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Xs={...eo,transform:e=>ai(0,1,e)},Ea={...eo,default:1},Ys=e=>Math.round(e*1e5)/1e5,Hc=/(-)?([\d]*\.?[\d])+/g,Hb=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,mO=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Gl(e){return typeof e=="string"}const Kl=e=>({test:t=>Gl(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),$r=Kl("deg"),tr=Kl("%"),he=Kl("px"),gO=Kl("vh"),yO=Kl("vw"),d1={...tr,parse:e=>tr.parse(e)/100,transform:e=>tr.transform(e*100)},h1={...eo,transform:Math.round},Wb={borderWidth:he,borderTopWidth:he,borderRightWidth:he,borderBottomWidth:he,borderLeftWidth:he,borderRadius:he,radius:he,borderTopLeftRadius:he,borderTopRightRadius:he,borderBottomRightRadius:he,borderBottomLeftRadius:he,width:he,maxWidth:he,height:he,maxHeight:he,size:he,top:he,right:he,bottom:he,left:he,padding:he,paddingTop:he,paddingRight:he,paddingBottom:he,paddingLeft:he,margin:he,marginTop:he,marginRight:he,marginBottom:he,marginLeft:he,rotate:$r,rotateX:$r,rotateY:$r,rotateZ:$r,scale:Ea,scaleX:Ea,scaleY:Ea,scaleZ:Ea,skew:$r,skewX:$r,skewY:$r,distance:he,translateX:he,translateY:he,translateZ:he,x:he,y:he,z:he,perspective:he,transformPerspective:he,opacity:Xs,originX:d1,originY:d1,originZ:he,zIndex:h1,fillOpacity:Xs,strokeOpacity:Xs,numOctaves:h1};function Gm(e,t,n,r){const{style:i,vars:o,transform:s,transformOrigin:l}=e;let a=!1,u=!1,c=!0;for(const f in t){const d=t[f];if(Ub(f)){o[f]=d;continue}const h=Wb[f],p=pO(d,h);if(Ji.has(f)){if(a=!0,s[f]=p,!c)continue;d!==(h.default||0)&&(c=!1)}else f.startsWith("origin")?(u=!0,l[f]=p):i[f]=p}if(t.transform||(a||r?i.transform=dO(e.transform,n,c,r):i.transform&&(i.transform="none")),u){const{originX:f="50%",originY:d="50%",originZ:h=0}=l;i.transformOrigin=`${f} ${d} ${h}`}}const Km=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Gb(e,t,n){for(const r in t)!Mt(t[r])&&!Vb(r,n)&&(e[r]=t[r])}function vO({transformTemplate:e},t,n){return A.useMemo(()=>{const r=Km();return Gm(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function wO(e,t,n){const r=e.style||{},i={};return Gb(i,r,e),Object.assign(i,vO(e,t,n)),e.transformValues?e.transformValues(i):i}function xO(e,t,n){const r={},i=wO(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const kO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Iu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||kO.has(e)}let Kb=e=>!Iu(e);function bO(e){e&&(Kb=t=>t.startsWith("on")?!Iu(t):e(t))}try{bO(require("@emotion/is-prop-valid").default)}catch{}function SO(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Kb(i)||n===!0&&Iu(i)||!t&&!Iu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function p1(e,t,n){return typeof e=="string"?e:he.transform(t+n*e)}function CO(e,t,n){const r=p1(t,e.x,e.width),i=p1(n,e.y,e.height);return`${r} ${i}`}const _O={offset:"stroke-dashoffset",array:"stroke-dasharray"},EO={offset:"strokeDashoffset",array:"strokeDasharray"};function TO(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?_O:EO;e[o.offset]=he.transform(-r);const s=he.transform(t),l=he.transform(n);e[o.array]=`${s} ${l}`}function qm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:l=1,pathOffset:a=0,...u},c,f,d){if(Gm(e,u,c,d),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:v}=e;h.transform&&(v&&(p.transform=h.transform),delete h.transform),v&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=CO(v,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&TO(h,s,l,a,!1)}const qb=()=>({...Km(),attrs:{}}),Qm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function PO(e,t,n,r){const i=A.useMemo(()=>{const o=qb();return qm(o,t,{enableHardwareAcceleration:!1},Qm(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Gb(o,e.style,e),i.style={...o,...i.style}}return i}function AO(e=!1){return(n,r,i,{latestValues:o},s)=>{const a=(Wm(n)?PO:xO)(r,o,s,n),c={...SO(r,typeof n=="string",e),...a,ref:i},{children:f}=r,d=A.useMemo(()=>Mt(f)?f.get():f,[f]);return A.createElement(n,{...c,children:d})}}function Qb(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const Xb=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Yb(e,t,n,r){Qb(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Xb.has(i)?i:Bm(i),t.attrs[i])}function Xm(e,t){const{style:n}=e,r={};for(const i in n)(Mt(n[i])||t.style&&Mt(t.style[i])||Vb(i,e))&&(r[i]=n[i]);return r}function Zb(e,t){const n=Xm(e,t);for(const r in e)if(Mt(e[r])||Mt(t[r])){const i=Wl.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function Ym(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function Zm(e){const t=A.useRef(null);return t.current===null&&(t.current=e()),t.current}const $u=e=>Array.isArray(e),LO=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),MO=e=>$u(e)?e[e.length-1]||0:e;function Za(e){const t=Mt(e)?e.get():e;return LO(t)?t.toValue():t}function OO({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:DO(r,i,o,e),renderState:t()};return n&&(s.mount=l=>n(r,l,s)),s}const Jb=e=>(t,n)=>{const r=A.useContext(Nc),i=A.useContext(jc),o=()=>OO(e,t,r,i);return n?o():Zm(o)};function DO(e,t,n,r){const i={},o=r(e,{});for(const d in o)i[d]=Za(o[d]);let{initial:s,animate:l}=e;const a=Uc(e),u=jb(e);t&&u&&!a&&e.inherit!==!1&&(s===void 0&&(s=t.initial),l===void 0&&(l=t.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const f=c?l:s;return f&&typeof f!="boolean"&&!Bc(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=Ym(e,h);if(!p)return;const{transitionEnd:v,transition:x,...g}=p;for(const m in g){let y=g[m];if(Array.isArray(y)){const b=c?y.length-1:0;y=y[b]}y!==null&&(i[m]=y)}for(const m in v)i[m]=v[m]}),i}const Ze=e=>e;class m1{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function IO(e){let t=new m1,n=new m1,r=0,i=!1,o=!1;const s=new WeakSet,l={schedule:(a,u=!1,c=!1)=>{const f=c&&i,d=f?t:n;return u&&s.add(a),d.add(a)&&f&&i&&(r=t.order.length),a},cancel:a=>{n.remove(a),s.delete(a)},process:a=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u(f[d]=IO(()=>n=!0),f),{}),s=f=>o[f].process(i),l=()=>{const f=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(f-i.timestamp,$O),1),i.timestamp=f,i.isProcessing=!0,Ta.forEach(s),i.isProcessing=!1,n&&t&&(r=!1,e(l))},a=()=>{n=!0,r=!0,i.isProcessing||e(l)};return{schedule:Ta.reduce((f,d)=>{const h=o[d];return f[d]=(p,v=!1,x=!1)=>(n||a(),h.schedule(p,v,x)),f},{}),cancel:f=>Ta.forEach(d=>o[d].cancel(f)),state:i,steps:o}}const{schedule:Re,cancel:Er,state:ht,steps:sd}=FO(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ze,!0),RO={useVisualState:Jb({scrapeMotionValuesFromProps:Zb,createRenderState:qb,onMount:(e,t,{renderState:n,latestValues:r})=>{Re.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Re.render(()=>{qm(n,r,{enableHardwareAcceleration:!1},Qm(t.tagName),e.transformTemplate),Yb(t,n)})}})},NO={useVisualState:Jb({scrapeMotionValuesFromProps:Xm,createRenderState:Km})};function jO(e,{forwardMotionProps:t=!1},n,r){return{...Wm(e)?RO:NO,preloadedFeatures:n,useRender:AO(t),createVisualElement:r,Component:e}}function gr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const eS=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Wc(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const zO=e=>t=>eS(t)&&e(t,Wc(t));function wr(e,t,n,r){return gr(e,t,zO(n),r)}const VO=(e,t)=>n=>t(e(n)),ri=(...e)=>e.reduce(VO);function tS(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const g1=tS("dragHorizontal"),y1=tS("dragVertical");function nS(e){let t=!1;if(e==="y")t=y1();else if(e==="x")t=g1();else{const n=g1(),r=y1();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function rS(){const e=nS(!0);return e?(e(),!1):!0}class gi{constructor(t){this.isMounted=!1,this.node=t}update(){}}function v1(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||rS())return;const l=e.getProps();e.animationState&&l.whileHover&&e.animationState.setActive("whileHover",t),l[r]&&Re.update(()=>l[r](o,s))};return wr(e.current,n,i,{passive:!e.getProps()[r]})}class BO extends gi{mount(){this.unmount=ri(v1(this.node,!0),v1(this.node,!1))}unmount(){}}class UO extends gi{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ri(gr(this.node.current,"focus",()=>this.onFocus()),gr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const iS=(e,t)=>t?e===t?!0:iS(e,t.parentElement):!1;function ld(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Wc(n))}class HO extends gi{constructor(){super(...arguments),this.removeStartListeners=Ze,this.removeEndListeners=Ze,this.removeAccessibleListeners=Ze,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=wr(window,"pointerup",(l,a)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c}=this.node.getProps();Re.update(()=>{iS(this.node.current,l.target)?u&&u(l,a):c&&c(l,a)})},{passive:!(r.onTap||r.onPointerUp)}),s=wr(window,"pointercancel",(l,a)=>this.cancelPress(l,a),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=ri(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=l=>{l.key!=="Enter"||!this.checkPressEnd()||ld("up",(a,u)=>{const{onTap:c}=this.node.getProps();c&&Re.update(()=>c(a,u))})};this.removeEndListeners(),this.removeEndListeners=gr(this.node.current,"keyup",s),ld("down",(l,a)=>{this.startPress(l,a)})},n=gr(this.node.current,"keydown",t),r=()=>{this.isPressing&&ld("cancel",(o,s)=>this.cancelPress(o,s))},i=gr(this.node.current,"blur",r);this.removeAccessibleListeners=ri(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Re.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!rS()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Re.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=wr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=gr(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ri(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Wh=new WeakMap,ad=new WeakMap,WO=e=>{const t=Wh.get(e.target);t&&t(e)},GO=e=>{e.forEach(WO)};function KO({root:e,...t}){const n=e||document;ad.has(n)||ad.set(n,{});const r=ad.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(GO,{root:e,...t})),r[i]}function qO(e,t,n){const r=KO(t);return Wh.set(e,n),r.observe(e),()=>{Wh.delete(e),r.unobserve(e)}}const QO={some:0,all:1};class XO extends gi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:QO[i]},l=a=>{const{isIntersecting:u}=a;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(a)};return qO(this.node.current,s,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(YO(t,n))&&this.startObserver()}unmount(){}}function YO({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ZO={inView:{Feature:XO},tap:{Feature:HO},focus:{Feature:UO},hover:{Feature:BO}};function oS(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function eD(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Gc(e,t,n){const r=e.getProps();return Ym(r,t,n!==void 0?n:r.custom,JO(e),eD(e))}let tD=Ze,Jm=Ze;const ii=e=>e*1e3,nr=e=>e/1e3,nD={current:!1},sS=e=>Array.isArray(e)&&typeof e[0]=="number";function lS(e){return!!(!e||typeof e=="string"&&aS[e]||sS(e)||Array.isArray(e)&&e.every(lS))}const $s=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,aS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$s([0,.65,.55,1]),circOut:$s([.55,0,1,.45]),backIn:$s([.31,.01,.66,-.59]),backOut:$s([.33,1.53,.69,.99])};function uS(e){if(e)return sS(e)?$s(e):Array.isArray(e)?e.map(uS):aS[e]}function rD(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:l,times:a}={}){const u={[t]:n};a&&(u.offset=a);const c=uS(l);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function iD(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const cS=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,oD=1e-7,sD=12;function lD(e,t,n,r,i){let o,s,l=0;do s=t+(n-t)/2,o=cS(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>oD&&++llD(o,0,1,e,n);return o=>o===0||o===1?o:cS(i(o),t,r)}const aD=ql(.42,0,1,1),uD=ql(0,0,.58,1),fS=ql(.42,0,.58,1),cD=e=>Array.isArray(e)&&typeof e[0]!="number",dS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,hS=e=>t=>1-e(1-t),eg=e=>1-Math.sin(Math.acos(e)),pS=hS(eg),fD=dS(eg),mS=ql(.33,1.53,.69,.99),tg=hS(mS),dD=dS(tg),hD=e=>(e*=2)<1?.5*tg(e):.5*(2-Math.pow(2,-10*(e-1))),pD={linear:Ze,easeIn:aD,easeInOut:fS,easeOut:uD,circIn:eg,circInOut:fD,circOut:pS,backIn:tg,backInOut:dD,backOut:mS,anticipate:hD},w1=e=>{if(Array.isArray(e)){Jm(e.length===4);const[t,n,r,i]=e;return ql(t,n,r,i)}else if(typeof e=="string")return pD[e];return e},ng=(e,t)=>n=>!!(Gl(n)&&mO.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),gS=(e,t,n)=>r=>{if(!Gl(r))return r;const[i,o,s,l]=r.match(Hc);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:l!==void 0?parseFloat(l):1}},mD=e=>ai(0,255,e),ud={...eo,transform:e=>Math.round(mD(e))},$i={test:ng("rgb","red"),parse:gS("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ud.transform(e)+", "+ud.transform(t)+", "+ud.transform(n)+", "+Ys(Xs.transform(r))+")"};function gD(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Gh={test:ng("#"),parse:gD,transform:$i.transform},Po={test:ng("hsl","hue"),parse:gS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+tr.transform(Ys(t))+", "+tr.transform(Ys(n))+", "+Ys(Xs.transform(r))+")"},Dt={test:e=>$i.test(e)||Gh.test(e)||Po.test(e),parse:e=>$i.test(e)?$i.parse(e):Po.test(e)?Po.parse(e):Gh.parse(e),transform:e=>Gl(e)?e:e.hasOwnProperty("red")?$i.transform(e):Po.transform(e)},Ge=(e,t,n)=>-n*e+n*t+e;function cd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function yD({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const l=n<.5?n*(1+t):n+t-n*t,a=2*n-l;i=cd(a,l,e+1/3),o=cd(a,l,e),s=cd(a,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const fd=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},vD=[Gh,$i,Po],wD=e=>vD.find(t=>t.test(e));function x1(e){const t=wD(e);let n=t.parse(e);return t===Po&&(n=yD(n)),n}const yS=(e,t)=>{const n=x1(e),r=x1(t),i={...n};return o=>(i.red=fd(n.red,r.red,o),i.green=fd(n.green,r.green,o),i.blue=fd(n.blue,r.blue,o),i.alpha=Ge(n.alpha,r.alpha,o),$i.transform(i))};function xD(e){var t,n;return isNaN(e)&&Gl(e)&&(((t=e.match(Hc))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Hb))===null||n===void 0?void 0:n.length)||0)>0}const vS={regex:hO,countKey:"Vars",token:"${v}",parse:Ze},wS={regex:Hb,countKey:"Colors",token:"${c}",parse:Dt.parse},xS={regex:Hc,countKey:"Numbers",token:"${n}",parse:eo.parse};function dd(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function Fu(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&dd(n,vS),dd(n,wS),dd(n,xS),n}function kS(e){return Fu(e).values}function bS(e){const{values:t,numColors:n,numVars:r,tokenised:i}=Fu(e),o=t.length;return s=>{let l=i;for(let a=0;atypeof e=="number"?0:e;function bD(e){const t=kS(e);return bS(e)(t.map(kD))}const ui={test:xD,parse:kS,createTransformer:bS,getAnimatableNone:bD},SS=(e,t)=>n=>`${n>0?t:e}`;function CS(e,t){return typeof e=="number"?n=>Ge(e,t,n):Dt.test(e)?yS(e,t):e.startsWith("var(")?SS(e,t):ES(e,t)}const _S=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,s)=>CS(o,t[s]));return o=>{for(let s=0;s{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=CS(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},ES=(e,t)=>{const n=ui.createTransformer(t),r=Fu(e),i=Fu(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?ri(_S(r.values,i.values),n):SS(e,t)},Pl=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},k1=(e,t)=>n=>Ge(e,t,n);function CD(e){return typeof e=="number"?k1:typeof e=="string"?Dt.test(e)?yS:ES:Array.isArray(e)?_S:typeof e=="object"?SD:k1}function _D(e,t,n){const r=[],i=n||CD(e[0]),o=e.length-1;for(let s=0;st[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=_D(t,r,i),l=s.length,a=u=>{let c=0;if(l>1)for(;ca(ai(e[0],e[o-1],u)):a}function ED(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Pl(0,t,r);e.push(Ge(n,1,i))}}function TD(e){const t=[0];return ED(t,e.length-1),t}function PD(e,t){return e.map(n=>n*t)}function AD(e,t){return e.map(()=>t||fS).splice(0,e.length-1)}function Ru({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=cD(r)?r.map(w1):w1(r),o={done:!1,value:t[0]},s=PD(n&&n.length===t.length?n:TD(t),e),l=TS(s,t,{ease:Array.isArray(i)?i:AD(t,i)});return{calculatedDuration:e,next:a=>(o.value=l(a),o.done=a>=e,o)}}function PS(e,t){return t?e*(1e3/t):0}const LD=5;function AS(e,t,n){const r=Math.max(t-LD,0);return PS(n-e(r),t-r)}const hd=.001,MD=.01,b1=10,OD=.05,DD=1;function ID({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;tD(e<=ii(b1));let s=1-t;s=ai(OD,DD,s),e=ai(MD,b1,nr(e)),s<1?(i=u=>{const c=u*s,f=c*e,d=c-n,h=Kh(u,s),p=Math.exp(-f);return hd-d/h*p},o=u=>{const f=u*s*e,d=f*n+n,h=Math.pow(s,2)*Math.pow(u,2)*e,p=Math.exp(-f),v=Kh(Math.pow(u,2),s);return(-i(u)+hd>0?-1:1)*((d-h)*p)/v}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-hd+c*f},o=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const l=5/e,a=FD(i,o,l);if(e=ii(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(a,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const $D=12;function FD(e,t,n){let r=n;for(let i=1;i<$D;i++)r=r-e(r)/t(r);return r}function Kh(e,t){return e*Math.sqrt(1-t*t)}const RD=["duration","bounce"],ND=["stiffness","damping","mass"];function S1(e,t){return t.some(n=>e[n]!==void 0)}function jD(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!S1(e,ND)&&S1(e,RD)){const n=ID(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function LS({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:l,damping:a,mass:u,velocity:c,duration:f,isResolvedFromDuration:d}=jD(r),h=c?-nr(c):0,p=a/(2*Math.sqrt(l*u)),v=o-i,x=nr(Math.sqrt(l/u)),g=Math.abs(v)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let m;if(p<1){const y=Kh(x,p);m=b=>{const T=Math.exp(-p*x*b);return o-T*((h+p*x*v)/y*Math.sin(y*b)+v*Math.cos(y*b))}}else if(p===1)m=y=>o-Math.exp(-x*y)*(v+(h+x*v)*y);else{const y=x*Math.sqrt(p*p-1);m=b=>{const T=Math.exp(-p*x*b),_=Math.min(y*b,300);return o-T*((h+p*x*v)*Math.sinh(_)+y*v*Math.cosh(_))/y}}return{calculatedDuration:d&&f||null,next:y=>{const b=m(y);if(d)s.done=y>=f;else{let T=h;y!==0&&(p<1?T=AS(m,y,b):T=0);const _=Math.abs(T)<=n,L=Math.abs(o-b)<=t;s.done=_&&L}return s.value=s.done?o:b,s}}}function C1({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:l,max:a,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},h=M=>l!==void 0&&Ma,p=M=>l===void 0?a:a===void 0||Math.abs(l-M)-v*Math.exp(-M/r),y=M=>g+m(M),b=M=>{const F=m(M),C=y(M);d.done=Math.abs(F)<=u,d.value=d.done?g:C};let T,_;const L=M=>{h(d.value)&&(T=M,_=LS({keyframes:[d.value,p(d.value)],velocity:AS(y,M,d.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return L(0),{calculatedDuration:null,next:M=>{let F=!1;return!_&&T===void 0&&(F=!0,b(M),L(M)),T!==void 0&&M>T?_.next(M-T):(!F&&b(M),d)}}}const zD=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Re.update(t,!0),stop:()=>Er(t),now:()=>ht.isProcessing?ht.timestamp:performance.now()}},_1=2e4;function E1(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<_1;)t+=n,r=e.next(t);return t>=_1?1/0:t}const VD={decay:C1,inertia:C1,tween:Ru,keyframes:Ru,spring:LS};function Al({autoplay:e=!0,delay:t=0,driver:n=zD,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:l="loop",onPlay:a,onStop:u,onComplete:c,onUpdate:f,...d}){let h=1,p=!1,v,x;const g=()=>{x=new Promise(B=>{v=B})};g();let m;const y=VD[i]||Ru;let b;y!==Ru&&typeof r[0]!="number"&&(b=TS([0,100],r,{clamp:!1}),r=[0,100]);const T=y({...d,keyframes:r});let _;l==="mirror"&&(_=y({...d,keyframes:[...r].reverse(),velocity:-(d.velocity||0)}));let L="idle",M=null,F=null,C=null;T.calculatedDuration===null&&o&&(T.calculatedDuration=E1(T));const{calculatedDuration:I}=T;let O=1/0,j=1/0;I!==null&&(O=I+s,j=O*(o+1)-s);let N=0;const V=B=>{if(F===null)return;h>0&&(F=Math.min(F,B)),h<0&&(F=Math.min(B-j/h,F)),M!==null?N=M:N=Math.round(B-F)*h;const U=N-t*(h>=0?1:-1),w=h>=0?U<0:U>j;N=Math.max(U,0),L==="finished"&&M===null&&(N=j);let X=N,Y=T;if(o){const ie=N/O;let oe=Math.floor(ie),ue=ie%1;!ue&&ie>=1&&(ue=1),ue===1&&oe--,oe=Math.min(oe,o+1);const ye=!!(oe%2);ye&&(l==="reverse"?(ue=1-ue,s&&(ue-=s/O)):l==="mirror"&&(Y=_));let pe=ai(0,1,ue);N>j&&(pe=l==="reverse"&&ye?1:0),X=pe*O}const H=w?{done:!1,value:r[0]}:Y.next(X);b&&(H.value=b(H.value));let{done:Q}=H;!w&&I!==null&&(Q=h>=0?N>=j:N<=0);const re=M===null&&(L==="finished"||L==="running"&&Q);return f&&f(H.value),re&&z(),H},Z=()=>{m&&m.stop(),m=void 0},ee=()=>{L="idle",Z(),v(),g(),F=C=null},z=()=>{L="finished",c&&c(),Z(),v()},K=()=>{if(p)return;m||(m=n(V));const B=m.now();a&&a(),M!==null?F=B-M:(!F||L==="finished")&&(F=B),L==="finished"&&g(),C=F,M=null,L="running",m.start()};e&&K();const k={then(B,U){return x.then(B,U)},get time(){return nr(N)},set time(B){B=ii(B),N=B,M!==null||!m||h===0?M=B:F=m.now()-B/h},get duration(){const B=T.calculatedDuration===null?E1(T):T.calculatedDuration;return nr(B)},get speed(){return h},set speed(B){B===h||!m||(h=B,k.time=nr(N))},get state(){return L},play:K,pause:()=>{L="paused",M=N},stop:()=>{p=!0,L!=="idle"&&(L="idle",u&&u(),ee())},cancel:()=>{C!==null&&V(C),ee()},complete:()=>{L="finished"},sample:B=>(F=0,V(B))};return k}function BD(e){let t;return()=>(t===void 0&&(t=e()),t)}const UD=BD(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),HD=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Pa=10,WD=2e4,GD=(e,t)=>t.type==="spring"||e==="backgroundColor"||!lS(t.ease);function KD(e,t,{onUpdate:n,onComplete:r,...i}){if(!(UD()&&HD.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,l,a;const u=()=>{a=new Promise(m=>{l=m})};u();let{keyframes:c,duration:f=300,ease:d,times:h}=i;if(GD(t,i)){const m=Al({...i,repeat:0,delay:0});let y={done:!1,value:c[0]};const b=[];let T=0;for(;!y.done&&Tp.cancel(),x=()=>{Re.update(v),l(),u()};return p.onfinish=()=>{e.set(iD(c,i)),r&&r(),x()},{then(m,y){return a.then(m,y)},attachTimeline(m){return p.timeline=m,p.onfinish=null,Ze},get time(){return nr(p.currentTime||0)},set time(m){p.currentTime=ii(m)},get speed(){return p.playbackRate},set speed(m){p.playbackRate=m},get duration(){return nr(f)},play:()=>{s||(p.play(),Er(v))},pause:()=>p.pause(),stop:()=>{if(s=!0,p.playState==="idle")return;const{currentTime:m}=p;if(m){const y=Al({...i,autoplay:!1});e.setWithVelocity(y.sample(m-Pa).value,y.sample(m).value,Pa)}x()},complete:()=>p.finish(),cancel:x}}function qD({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Ze,pause:Ze,stop:Ze,then:o=>(o(),Promise.resolve()),cancel:Ze,complete:Ze});return t?Al({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const QD={type:"spring",stiffness:500,damping:25,restSpeed:10},XD=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),YD={type:"keyframes",duration:.8},ZD={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},JD=(e,{keyframes:t})=>t.length>2?YD:Ji.has(e)?e.startsWith("scale")?XD(t[1]):QD:ZD,qh=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ui.test(t)||t==="0")&&!t.startsWith("url(")),eI=new Set(["brightness","contrast","saturate","opacity"]);function tI(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Hc)||[];if(!r)return e;const i=n.replace(r,"");let o=eI.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const nI=/([a-z-]*)\(.*?\)/g,Qh={...ui,getAnimatableNone:e=>{const t=e.match(nI);return t?t.map(tI).join(" "):e}},rI={...Wb,color:Dt,backgroundColor:Dt,outlineColor:Dt,fill:Dt,stroke:Dt,borderColor:Dt,borderTopColor:Dt,borderRightColor:Dt,borderBottomColor:Dt,borderLeftColor:Dt,filter:Qh,WebkitFilter:Qh},rg=e=>rI[e];function MS(e,t){let n=rg(e);return n!==Qh&&(n=ui),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const OS=e=>/^0[^.\s]+$/.test(e);function iI(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||OS(e)}function oI(e,t,n,r){const i=qh(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:e.get();let l;const a=[];for(let u=0;ui=>{const o=ig(r,e)||{},s=o.delay||r.delay||0;let{elapsed:l=0}=r;l=l-ii(s);const a=oI(t,e,n,o),u=a[0],c=a[a.length-1],f=qh(e,u),d=qh(e,c);let h={keyframes:a,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-l,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(sI(o)||(h={...h,...JD(e,h)}),h.duration&&(h.duration=ii(h.duration)),h.repeatDelay&&(h.repeatDelay=ii(h.repeatDelay)),!f||!d||nD.current||o.type===!1)return qD(h);if(!r.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=KD(t,e,h);if(p)return p}return Al(h)};function Nu(e){return!!(Mt(e)&&e.add)}const DS=e=>/^\-?\d*\.?\d+$/.test(e);function sg(e,t){e.indexOf(t)===-1&&e.push(t)}function lg(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class ag{constructor(){this.subscriptions=[]}add(t){return sg(this.subscriptions,t),()=>lg(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class aI{constructor(t,n={}){this.version="10.16.16",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:s}=ht;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,Re.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Re.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=lI(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ag);const r=this.events[t].add(n);return t==="change"?()=>{r(),Re.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?PS(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ki(e,t){return new aI(e,t)}const IS=e=>t=>t.test(e),uI={test:e=>e==="auto",parse:e=>e},$S=[eo,he,tr,$r,yO,gO,uI],Ts=e=>$S.find(IS(e)),cI=[...$S,Dt,ui],fI=e=>cI.find(IS(e));function dI(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ki(n))}function hI(e,t){const n=Gc(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const l=MO(o[s]);dI(e,s,l)}}function pI(e,t,n){var r,i;const o=Object.keys(t).filter(l=>!e.hasValue(l)),s=o.length;if(s)for(let l=0;la.remove(f))),u.push(x)}return s&&Promise.all(u).then(()=>{s&&hI(e,s)}),u}function Xh(e,t,n={}){const r=Gc(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(FS(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(a=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=i;return wI(e,t,u+a,c,f,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[a,u]=l==="beforeChildren"?[o,s]:[s,o];return a().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function wI(e,t,n=0,r=0,i=1,o){const s=[],l=(e.variantChildren.size-1)*r,a=i===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(xI).forEach((u,c)=>{u.notify("AnimationStart",t),s.push(Xh(u,t,{...o,delay:n+a(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function xI(e,t){return e.sortNodePosition(t)}function kI(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Xh(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Xh(e,t,n);else{const i=typeof t=="function"?Gc(e,t,n.custom):t;r=Promise.all(FS(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const bI=[...Um].reverse(),SI=Um.length;function CI(e){return t=>Promise.all(t.map(({animation:n,options:r})=>kI(e,n,r)))}function _I(e){let t=CI(e);const n=TI();let r=!0;const i=(a,u)=>{const c=Gc(e,u);if(c){const{transition:f,transitionEnd:d,...h}=c;a={...a,...h,...d}}return a};function o(a){t=a(e)}function s(a,u){const c=e.getProps(),f=e.getVariantContext(!0)||{},d=[],h=new Set;let p={},v=1/0;for(let g=0;gv&&T;const C=Array.isArray(b)?b:[b];let I=C.reduce(i,{});_===!1&&(I={});const{prevResolvedValues:O={}}=y,j={...O,...I},N=V=>{F=!0,h.delete(V),y.needsAnimating[V]=!0};for(const V in j){const Z=I[V],ee=O[V];p.hasOwnProperty(V)||(Z!==ee?$u(Z)&&$u(ee)?!oS(Z,ee)||M?N(V):y.protectedKeys[V]=!0:Z!==void 0?N(V):h.add(V):Z!==void 0&&h.has(V)?N(V):y.protectedKeys[V]=!0)}y.prevProp=b,y.prevResolvedValues=I,y.isActive&&(p={...p,...I}),r&&e.blockInitialAnimation&&(F=!1),F&&!L&&d.push(...C.map(V=>({animation:V,options:{type:m,...a}})))}if(h.size){const g={};h.forEach(m=>{const y=e.getBaseTarget(m);y!==void 0&&(g[m]=y)}),d.push({animation:g})}let x=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(d):Promise.resolve()}function l(a,u,c){var f;if(n[a].isActive===u)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(a,u)}),n[a].isActive=u;const d=s(c,a);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:s,setActive:l,setAnimateFunction:o,getState:()=>n}}function EI(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!oS(t,e):!1}function bi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function TI(){return{animate:bi(!0),whileInView:bi(),whileHover:bi(),whileTap:bi(),whileDrag:bi(),whileFocus:bi(),exit:bi()}}class PI extends gi{constructor(t){super(t),t.animationState||(t.animationState=_I(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Bc(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let AI=0;class LI extends gi{constructor(){super(...arguments),this.id=AI++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const MI={animation:{Feature:PI},exit:{Feature:LI}},T1=(e,t)=>Math.abs(e-t);function OI(e,t){const n=T1(e.x,t.x),r=T1(e.y,t.y);return Math.sqrt(n**2+r**2)}class RS{constructor(t,n,{transformPagePoint:r,contextWindow:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=md(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=OI(c.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:h}=c,{timestamp:p}=ht;this.history.push({...h,timestamp:p});const{onStart:v,onMove:x}=this.handlers;f||(v&&v(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=pd(f,this.transformPagePoint),Re.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:h}=this.handlers,p=md(c.type==="pointercancel"?this.lastMoveEventInfo:pd(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(c,p),h&&h(c,p)},!eS(t))return;this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Wc(t),s=pd(o,this.transformPagePoint),{point:l}=s,{timestamp:a}=ht;this.history=[{...l,timestamp:a}];const{onSessionStart:u}=n;u&&u(t,md(s,this.history)),this.removeListeners=ri(wr(this.contextWindow,"pointermove",this.handlePointerMove),wr(this.contextWindow,"pointerup",this.handlePointerUp),wr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Er(this.updatePoint)}}function pd(e,t){return t?{point:t(e.point)}:e}function P1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function md({point:e},t){return{point:e,delta:P1(e,NS(t)),offset:P1(e,DI(t)),velocity:II(t,.1)}}function DI(e){return e[0]}function NS(e){return e[e.length-1]}function II(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=NS(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ii(t)));)n--;if(!r)return{x:0,y:0};const o=nr(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function cn(e){return e.max-e.min}function Yh(e,t=0,n=.01){return Math.abs(e-t)<=n}function A1(e,t,n,r=.5){e.origin=r,e.originPoint=Ge(t.min,t.max,e.origin),e.scale=cn(n)/cn(t),(Yh(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Ge(n.min,n.max,e.origin)-e.originPoint,(Yh(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Zs(e,t,n,r){A1(e.x,t.x,n.x,r?r.originX:void 0),A1(e.y,t.y,n.y,r?r.originY:void 0)}function L1(e,t,n){e.min=n.min+t.min,e.max=e.min+cn(t)}function $I(e,t,n){L1(e.x,t.x,n.x),L1(e.y,t.y,n.y)}function M1(e,t,n){e.min=t.min-n.min,e.max=e.min+cn(t)}function Js(e,t,n){M1(e.x,t.x,n.x),M1(e.y,t.y,n.y)}function FI(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Ge(n,e,r.max):Math.min(e,n)),e}function O1(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function RI(e,{top:t,left:n,bottom:r,right:i}){return{x:O1(e.x,n,i),y:O1(e.y,t,r)}}function D1(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Pl(t.min,t.max-r,e.min):r>i&&(n=Pl(e.min,e.max-i,t.min)),ai(0,1,n)}function zI(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Zh=.35;function VI(e=Zh){return e===!1?e=0:e===!0&&(e=Zh),{x:I1(e,"left","right"),y:I1(e,"top","bottom")}}function I1(e,t,n){return{min:$1(e,t),max:$1(e,n)}}function $1(e,t){return typeof e=="number"?e:e[t]||0}const F1=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ao=()=>({x:F1(),y:F1()}),R1=()=>({min:0,max:0}),it=()=>({x:R1(),y:R1()});function qn(e){return[e("x"),e("y")]}function jS({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function BI({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function UI(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function gd(e){return e===void 0||e===1}function Jh({scale:e,scaleX:t,scaleY:n}){return!gd(e)||!gd(t)||!gd(n)}function Ei(e){return Jh(e)||zS(e)||e.z||e.rotate||e.rotateX||e.rotateY}function zS(e){return N1(e.x)||N1(e.y)}function N1(e){return e&&e!=="0%"}function ju(e,t,n){const r=e-n,i=t*r;return n+i}function j1(e,t,n,r,i){return i!==void 0&&(e=ju(e,i,r)),ju(e,n,r)+t}function ep(e,t=0,n=1,r,i){e.min=j1(e.min,t,n,r,i),e.max=j1(e.max,t,n,r,i)}function VS(e,{x:t,y:n}){ep(e.x,t.translate,t.scale,t.originPoint),ep(e.y,n.translate,n.scale,n.originPoint)}function HI(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let l=0;l1.0000000000001||e<.999999999999?e:1}function Nr(e,t){e.min=e.min+t,e.max=e.max+t}function V1(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,s=Ge(e.min,e.max,o);ep(e,t[n],t[r],s,t.scale)}const WI=["x","scaleX","originX"],GI=["y","scaleY","originY"];function Lo(e,t){V1(e.x,t,WI),V1(e.y,t,GI)}function BS(e,t){return jS(UI(e.getBoundingClientRect(),t))}function KI(e,t,n){const r=BS(e,n),{scroll:i}=t;return i&&(Nr(r.x,i.offset.x),Nr(r.y,i.offset.y)),r}const US=({current:e})=>e?e.ownerDocument.defaultView:null,qI=new WeakMap;class QI{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=it(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=a=>{this.stopAnimation(),n&&this.snapToCursor(Wc(a,"page").point)},o=(a,u)=>{const{drag:c,dragPropagation:f,onDragStart:d}=this.getProps();if(c&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=nS(c),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),qn(p=>{let v=this.getAxisMotionValue(p).get()||0;if(tr.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const g=x.layout.layoutBox[p];g&&(v=cn(g)*(parseFloat(v)/100))}}this.originPoint[p]=v}),d&&Re.update(()=>d(a,u),!1,!0);const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},s=(a,u)=>{const{dragPropagation:c,dragDirectionLock:f,onDirectionLock:d,onDrag:h}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:p}=u;if(f&&this.currentDirection===null){this.currentDirection=XI(p),this.currentDirection!==null&&d&&d(this.currentDirection);return}this.updateAxis("x",u.point,p),this.updateAxis("y",u.point,p),this.visualElement.render(),h&&h(a,u)},l=(a,u)=>this.stop(a,u);this.panSession=new RS(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),contextWindow:US(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Re.update(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Aa(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=FI(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&To(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=RI(i.layoutBox,n):this.constraints=!1,this.elastic=VI(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&qn(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=zI(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!To(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=KI(r,i.root,this.visualElement.getTransformPagePoint());let s=NI(i.layout.layoutBox,o);if(n){const l=n(BI(s));this.hasMutatedConstraints=!!l,l&&(s=jS(l))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:l}=this.getProps(),a=this.constraints||{},u=qn(c=>{if(!Aa(c,n,this.currentDirection))return;let f=a&&a[c]||{};s&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(og(t,r,0,n))}stopAnimation(){qn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){qn(n=>{const{drag:r}=this.getProps();if(!Aa(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:l}=i.layout.layoutBox[n];o.set(t[n]-Ge(s,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!To(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};qn(s=>{const l=this.getAxisMotionValue(s);if(l){const a=l.get();i[s]=jI({min:a,max:a},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),qn(s=>{if(!Aa(s,t,null))return;const l=this.getAxisMotionValue(s),{min:a,max:u}=this.constraints[s];l.set(Ge(a,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;qI.set(this.visualElement,this);const t=this.visualElement.current,n=wr(t,"pointerdown",a=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(a)}),r=()=>{const{dragConstraints:a}=this.getProps();To(a)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=gr(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:a,hasLayoutChanged:u})=>{this.isDragging&&u&&(qn(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=a[c].translate,f.set(f.get()+a[c].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Zh,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:l}}}function Aa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function XI(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class YI extends gi{constructor(t){super(t),this.removeGroupControls=Ze,this.removeListeners=Ze,this.controls=new QI(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ze}unmount(){this.removeGroupControls(),this.removeListeners()}}const B1=e=>(t,n)=>{e&&Re.update(()=>e(t,n))};class ZI extends gi{constructor(){super(...arguments),this.removePointerDownListener=Ze}onPointerDown(t){this.session=new RS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:US(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:B1(t),onStart:B1(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&Re.update(()=>i(o,s))}}}mount(){this.removePointerDownListener=wr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function JI(){const e=A.useContext(jc);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=A.useId();return A.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const Ja={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function U1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ps={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(he.test(e))e=parseFloat(e);else return e;const n=U1(e,t.target.x),r=U1(e,t.target.y);return`${n}% ${r}%`}},e$={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ui.parse(e);if(i.length>5)return r;const o=ui.createTransformer(e),s=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,a=n.y.scale*t.y;i[0+s]/=l,i[1+s]/=a;const u=Ge(l,a,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}};class t$ extends _e.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;uO(n$),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Ja.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||Re.postRender(()=>{const l=s.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function HS(e){const[t,n]=JI(),r=A.useContext(Tl);return _e.createElement(t$,{...e,layoutGroup:r,switchLayoutGroup:A.useContext(zb),isPresent:t,safeToRemove:n})}const n$={borderRadius:{...Ps,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ps,borderTopRightRadius:Ps,borderBottomLeftRadius:Ps,borderBottomRightRadius:Ps,boxShadow:e$},WS=["TopLeft","TopRight","BottomLeft","BottomRight"],r$=WS.length,H1=e=>typeof e=="string"?parseFloat(e):e,W1=e=>typeof e=="number"||he.test(e);function i$(e,t,n,r,i,o){i?(e.opacity=Ge(0,n.opacity!==void 0?n.opacity:1,o$(r)),e.opacityExit=Ge(t.opacity!==void 0?t.opacity:1,0,s$(r))):o&&(e.opacity=Ge(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;srt?1:n(Pl(e,t,r))}function K1(e,t){e.min=t.min,e.max=t.max}function vn(e,t){K1(e.x,t.x),K1(e.y,t.y)}function q1(e,t,n,r,i){return e-=t,e=ju(e,1/n,r),i!==void 0&&(e=ju(e,1/i,r)),e}function l$(e,t=0,n=1,r=.5,i,o=e,s=e){if(tr.test(t)&&(t=parseFloat(t),t=Ge(s.min,s.max,t/100)-s.min),typeof t!="number")return;let l=Ge(o.min,o.max,r);e===o&&(l-=t),e.min=q1(e.min,t,n,l,i),e.max=q1(e.max,t,n,l,i)}function Q1(e,t,[n,r,i],o,s){l$(e,t[n],t[r],t[i],t.scale,o,s)}const a$=["x","scaleX","originX"],u$=["y","scaleY","originY"];function X1(e,t,n,r){Q1(e.x,t,a$,n?n.x:void 0,r?r.x:void 0),Q1(e.y,t,u$,n?n.y:void 0,r?r.y:void 0)}function Y1(e){return e.translate===0&&e.scale===1}function KS(e){return Y1(e.x)&&Y1(e.y)}function c$(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function qS(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Z1(e){return cn(e.x)/cn(e.y)}class f${constructor(){this.members=[]}add(t){sg(this.members,t),t.scheduleRender()}remove(t){if(lg(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function J1(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:a,rotateX:u,rotateY:c}=n;a&&(r+=`rotate(${a}deg) `),u&&(r+=`rotateX(${u}deg) `),c&&(r+=`rotateY(${c}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const d$=(e,t)=>e.depth-t.depth;class h${constructor(){this.children=[],this.isDirty=!1}add(t){sg(this.children,t),this.isDirty=!0}remove(t){lg(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(d$),this.isDirty=!1,this.children.forEach(t)}}function p$(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Er(r),e(o-t))};return Re.read(r,!0),()=>Er(r)}function m$(e){window.MotionDebug&&window.MotionDebug.record(e)}function g$(e){return e instanceof SVGElement&&e.tagName!=="svg"}function y$(e,t,n){const r=Mt(e)?e:Ki(e);return r.start(og("",r,t,n)),r.animation}const ev=["","X","Y","Z"],v$={visibility:"hidden"},tv=1e3;let w$=0;const Ti={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function QS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},l=t==null?void 0:t()){this.id=w$++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ti.totalNodes=Ti.resolvedTargetDeltas=Ti.recalculatedProjection=0,this.nodes.forEach(b$),this.nodes.forEach(T$),this.nodes.forEach(P$),this.nodes.forEach(S$),m$(Ti)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let a=0;athis.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=p$(d,250),Ja.hasAnimatedSinceResize&&(Ja.hasAnimatedSinceResize=!1,this.nodes.forEach(rv))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||D$,{onLayoutAnimationStart:x,onLayoutAnimationComplete:g}=c.getProps(),m=!this.targetLayout||!qS(this.targetLayout,p)||h,y=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||d&&(m||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const b={...ig(v,"layout"),onPlay:x,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else d||rv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Er(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(A$),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;cthis.update()))}clearAllSnapshots(){this.nodes.forEach(C$),this.sharedNodes.forEach(L$)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Re.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Re.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let a=0;a{const T=b/1e3;iv(f.x,s.x,T),iv(f.y,s.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Js(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),M$(this.relativeTarget,this.relativeTargetOrigin,d,T),y&&c$(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=it()),vn(y,this.relativeTarget)),v&&(this.animationValues=c,i$(c,u,this.latestValues,T,m,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Er(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Re.update(()=>{Ja.hasAnimatedSinceResize=!0,this.currentAnimation=y$(0,tv,{...s,onUpdate:l=>{this.mixTargetDelta(l),s.onUpdate&&s.onUpdate(l)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(tv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:l,target:a,layout:u,latestValues:c}=s;if(!(!l||!a||!u)){if(this!==s&&this.layout&&u&&XS(this.options.animationType,this.layout.layoutBox,u.layoutBox)){a=this.target||it();const f=cn(this.layout.layoutBox.x);a.x.min=s.target.x.min,a.x.max=a.x.min+f;const d=cn(this.layout.layoutBox.y);a.y.min=s.target.y.min,a.y.max=a.y.min+d}vn(l,a),Lo(l,c),Zs(this.projectionDeltaWithTransform,this.layoutCorrected,l,c)}}registerSharedNode(s,l){this.sharedNodes.has(s)||this.sharedNodes.set(s,new f$),this.sharedNodes.get(s).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:l}=this.options;return l?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:l}=this.options;return l?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:l,preserveFollowOpacity:a}={}){const u=this.getStack();u&&u.promote(this,a),s&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let l=!1;const{latestValues:a}=s;if((a.rotate||a.rotateX||a.rotateY||a.rotateZ)&&(l=!0),!l)return;const u={};for(let c=0;c{var l;return(l=s.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(nv),this.root.sharedNodes.clear()}}}function x$(e){e.updateLayout()}function k$(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=n.source!==e.layout.source;o==="size"?qn(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=cn(d);d.min=r[f].min,d.max=d.min+h}):XS(o,n.layoutBox,r)&&qn(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=cn(r[f]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const l=Ao();Zs(l,r,n.layoutBox);const a=Ao();s?Zs(a,e.applyTransform(i,!0),n.measuredBox):Zs(a,r,n.layoutBox);const u=!KS(l);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=it();Js(p,n.layoutBox,d.layoutBox);const v=it();Js(v,r,h.layoutBox),qS(p,v)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:a,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function b$(e){Ti.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function S$(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function C$(e){e.clearSnapshot()}function nv(e){e.clearMeasurements()}function _$(e){e.isLayoutDirty=!1}function E$(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function rv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function T$(e){e.resolveTargetDelta()}function P$(e){e.calcProjection()}function A$(e){e.resetRotation()}function L$(e){e.removeLeadSnapshot()}function iv(e,t,n){e.translate=Ge(t.translate,0,n),e.scale=Ge(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ov(e,t,n,r){e.min=Ge(t.min,n.min,r),e.max=Ge(t.max,n.max,r)}function M$(e,t,n,r){ov(e.x,t.x,n.x,r),ov(e.y,t.y,n.y,r)}function O$(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const D$={duration:.45,ease:[.4,0,.1,1]},sv=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),lv=sv("applewebkit/")&&!sv("chrome/")?Math.round:Ze;function av(e){e.min=lv(e.min),e.max=lv(e.max)}function I$(e){av(e.x),av(e.y)}function XS(e,t,n){return e==="position"||e==="preserve-aspect"&&!Yh(Z1(t),Z1(n),.2)}const $$=QS({attachResizeListener:(e,t)=>gr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),yd={current:void 0},YS=QS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!yd.current){const e=new $$({});e.mount(window),e.setOptions({layoutScroll:!0}),yd.current=e}return yd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),F$={pan:{Feature:ZI},drag:{Feature:YI,ProjectionNode:YS,MeasureLayout:HS}},R$=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function N$(e){const t=R$.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function tp(e,t,n=1){const[r,i]=N$(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return DS(s)?parseFloat(s):s}else return Hh(i)?tp(i,t,n+1):i}function j$(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!Hh(o))return;const s=tp(o,r);s&&i.set(s)});for(const i in t){const o=t[i];if(!Hh(o))continue;const s=tp(o,r);s&&(t[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const z$=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),ZS=e=>z$.has(e),V$=e=>Object.keys(e).some(ZS),uv=e=>e===eo||e===he,cv=(e,t)=>parseFloat(e.split(", ")[t]),fv=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return cv(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?cv(o[1],e):0}},B$=new Set(["x","y","z"]),U$=Wl.filter(e=>!B$.has(e));function H$(e){const t=[];return U$.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Xo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:fv(4,13),y:fv(5,14)};Xo.translateX=Xo.x;Xo.translateY=Xo.y;const W$=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:s}=o,l={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{l[u]=Xo[u](r,o)}),t.render();const a=t.measureViewportBox();return n.forEach(u=>{const c=t.getValue(u);c&&c.jump(l[u]),e[u]=Xo[u](a,o)}),e},G$=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(ZS);let o=[],s=!1;const l=[];if(i.forEach(a=>{const u=e.getValue(a);if(!e.hasValue(a))return;let c=n[a],f=Ts(c);const d=t[a];let h;if($u(d)){const p=d.length,v=d[0]===null?1:0;c=d[v],f=Ts(c);for(let x=v;x=0?window.pageYOffset:null,u=W$(t,e,l);return o.length&&o.forEach(([c,f])=>{e.getValue(c).set(f)}),e.render(),zc&&a!==null&&window.scrollTo({top:a}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function K$(e,t,n,r){return V$(t)?G$(e,t,n,r):{target:t,transitionEnd:r}}const q$=(e,t,n,r)=>{const i=j$(e,t,r);return t=i.target,r=i.transitionEnd,K$(e,t,n,r)},np={current:null},JS={current:!1};function Q$(){if(JS.current=!0,!!zc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>np.current=e.matches;e.addListener(t),t()}else np.current=!1}function X$(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],s=n[i];if(Mt(o))e.addValue(i,o),Nu(r)&&r.add(i);else if(Mt(s))e.addValue(i,Ki(o,{owner:e})),Nu(r)&&r.remove(i);else if(s!==o)if(e.hasValue(i)){const l=e.getValue(i);!l.hasAnimated&&l.set(o)}else{const l=e.getStaticValue(i);e.addValue(i,Ki(l!==void 0?l:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const dv=new WeakMap,eC=Object.keys(El),Y$=eC.length,hv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Z$=Hm.length;class J${constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Re.render(this.render,!1,!0);const{latestValues:l,renderState:a}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=a,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=Uc(n),this.isVariantNode=jb(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(n,{});for(const f in c){const d=c[f];l[f]!==void 0&&Mt(d)&&(d.set(l[f],!1),Nu(u)&&u.add(f))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,dv.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),JS.current||Q$(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:np.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){dv.delete(this.current),this.projection&&this.projection.unmount(),Er(this.notifyUpdate),Er(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Ji.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Re.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let s,l;for(let a=0;athis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:d,layoutRoot:h})}return l}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):it()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Ki(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=Ym(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Mt(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ag),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class tC extends J${sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let s=gI(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){pI(this,r,s);const l=q$(this,r,s,n);n=l.transitionEnd,r=l.target}return{transition:t,transitionEnd:n,...r}}}function eF(e){return window.getComputedStyle(e)}class tF extends tC{readValueFromInstance(t,n){if(Ji.has(n)){const r=rg(n);return r&&r.default||0}else{const r=eF(t),i=(Ub(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return BS(t,n)}build(t,n,r,i){Gm(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Xm(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Mt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){Qb(t,n,r,i)}}class nF extends tC{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ji.has(n)){const r=rg(n);return r&&r.default||0}return n=Xb.has(n)?n:Bm(n),t.getAttribute(n)}measureInstanceViewportBox(){return it()}scrapeMotionValuesFromProps(t,n){return Zb(t,n)}build(t,n,r,i){qm(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Yb(t,n,r,i)}mount(t){this.isSVGTag=Qm(t.tagName),super.mount(t)}}const rF=(e,t)=>Wm(e)?new nF(t,{enableHardwareAcceleration:!1}):new tF(t,{enableHardwareAcceleration:!0}),iF={layout:{ProjectionNode:YS,MeasureLayout:HS}},oF={...MI,...ZO,...F$,...iF},Yt=lO((e,t)=>jO(e,t,oF,rF));function nC(){const e=A.useRef(!1);return Vc(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function rC(){const e=nC(),[t,n]=A.useState(0),r=A.useCallback(()=>{e.current&&n(t+1)},[t]);return[A.useCallback(()=>Re.postRender(r),[r]),t]}class sF extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function lF({children:e,isPresent:t}){const n=A.useId(),r=A.useRef(null),i=A.useRef({width:0,height:0,top:0,left:0});return A.useInsertionEffect(()=>{const{width:o,height:s,top:l,left:a}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${s}px !important; - top: ${l}px !important; - left: ${a}px !important; - } - `),()=>{document.head.removeChild(u)}},[t]),A.createElement(sF,{isPresent:t,childRef:r,sizeRef:i},A.cloneElement(e,{ref:r}))}const vd=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const l=Zm(aF),a=A.useId(),u=A.useMemo(()=>({id:a,initial:t,isPresent:n,custom:i,onExitComplete:c=>{l.set(c,!0);for(const f of l.values())if(!f)return;r&&r()},register:c=>(l.set(c,!1),()=>l.delete(c))}),o?void 0:[n]);return A.useMemo(()=>{l.forEach((c,f)=>l.set(f,!1))},[n]),A.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),s==="popLayout"&&(e=A.createElement(lF,{isPresent:n},e)),A.createElement(jc.Provider,{value:u},e)};function aF(){return new Map}function uF(e){return A.useEffect(()=>()=>e(),[])}const Pi=e=>e.key||"";function cF(e,t){e.forEach(n=>{const r=Pi(n);t.set(r,n)})}function fF(e){const t=[];return A.Children.forEach(e,n=>{A.isValidElement(n)&&t.push(n)}),t}const ug=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const l=A.useContext(Tl).forceRender||rC()[0],a=nC(),u=fF(e);let c=u;const f=A.useRef(new Map).current,d=A.useRef(c),h=A.useRef(new Map).current,p=A.useRef(!0);if(Vc(()=>{p.current=!1,cF(u,h),d.current=c}),uF(()=>{p.current=!0,h.clear(),f.clear()}),p.current)return A.createElement(A.Fragment,null,c.map(m=>A.createElement(vd,{key:Pi(m),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},m)));c=[...c];const v=d.current.map(Pi),x=u.map(Pi),g=v.length;for(let m=0;m{if(x.indexOf(y)!==-1)return;const b=h.get(y);if(!b)return;const T=v.indexOf(y);let _=m;if(!_){const L=()=>{f.delete(y);const M=Array.from(h.keys()).filter(F=>!x.includes(F));if(M.forEach(F=>h.delete(F)),d.current=u.filter(F=>{const C=Pi(F);return C===y||M.includes(C)}),!f.size){if(a.current===!1)return;l(),r&&r()}};_=A.createElement(vd,{key:Pi(b),isPresent:!1,onExitComplete:L,custom:t,presenceAffectsLayout:o,mode:s},b),f.set(y,_)}c.splice(T,0,_)}),c=c.map(m=>{const y=m.key;return f.has(y)?m:A.createElement(vd,{key:Pi(m),isPresent:!0,presenceAffectsLayout:o,mode:s},m)}),A.createElement(A.Fragment,null,f.size?c:c.map(m=>A.cloneElement(m)))},dF=A.createContext(null),hF=e=>!e.isLayoutDirty&&e.willUpdate(!1);function pv(){const e=new Set,t=new WeakMap,n=()=>e.forEach(hF);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}const iC=e=>e===!0,pF=e=>iC(e===!0)||e==="id",mF=({children:e,id:t,inherit:n=!0})=>{const r=A.useContext(Tl),i=A.useContext(dF),[o,s]=rC(),l=A.useRef(null),a=r.id||i;l.current===null&&(pF(n)&&a&&(t=t?a+"-"+t:a),l.current={id:t,group:iC(n)&&r.group||pv()});const u=A.useMemo(()=>({...l.current,forceRender:o}),[s]);return A.createElement(Tl.Provider,{value:u},e)};function gF(e){const t=Zm(()=>Ki(e)),{isStatic:n}=A.useContext(Rc);if(n){const[,r]=A.useState(e);A.useEffect(()=>t.on("change",r),[])}return t}function cg(e,t={}){const{isStatic:n}=A.useContext(Rc),r=A.useRef(null),i=gF(Mt(e)?e.get():e),o=()=>{r.current&&r.current.stop()};return A.useInsertionEffect(()=>i.attach((s,l)=>{if(n)return l(s);if(o(),r.current=Al({keyframes:[i.get(),s],velocity:i.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...t,onUpdate:l}),!ht.isProcessing){const a=performance.now()-ht.timestamp;a<30&&(r.current.time=nr(a))}return i.get()},o),[JSON.stringify(t)]),Vc(()=>{if(Mt(e))return e.on("change",s=>i.set(parseFloat(s)))},[i]),i}function yF(e){const{containerId:t,children:n}=e,r=A.useMemo(()=>document.getElementById(t),[t]);return r?WE.createPortal(n,r):null}const vF={enter:{opacity:1,transition:{duration:.3}},exit:{opacity:0,transition:{duration:.2,delay:.1}}},wF={enter:{scale:1,opacity:1,transition:{duration:.2,delay:.1}},exit:{scale:1.1,opacity:0,transition:{duration:.2}}};function Kc(e){const{children:t,isOpen:n,onCloseRequest:r,className:i}=e;return S.jsx(yF,{containerId:"modals-portal",children:S.jsx(ug,{children:n&&S.jsx(Yt.div,{variants:vF,animate:"enter",exit:"exit",initial:"exit",className:"fixed inset-0 grid place-items-center overflow-auto bg-slate-900/50 p-6",onClick:r,children:S.jsx(Yt.div,{variants:wF,className:Xt("flex flex-col bg-slate-800 text-slate-100 shadow-lg",i),onClick:o=>{o.stopPropagation()},children:t})})})})}const xF=`## Timeline controls - -- Move ability instances by dragging them -- Dragged instances will displace others to respect the ability cooldown. Hold **Ctrl** for disabling the behaviour -- Holding **Shift** will cause all future instances of the ability to reset and move with the one you're dragging -- Hold **Alt** while dragging to make small adjustments to the cast times. - -## Left panel - -- Ctrl+Click an ability to go to it's wowhead page - -## Tips - -- You can load and save notes if you have a [compatible browser](https://caniuse.com/?search=showopenfilepicker) -- The exported MRT string is compatible with [Kaze ERT Timers Icons Wekaura](https://wago.io/n7l5uN3YM) -- Use the overlays section to paste in captures from your fight logs, I'm using damage taken and casts in this example :) - -![alt text](/img/lackoplan-screenshot.png) -`;function kF(){const[e,t]=A.useState(!1);return S.jsxs(S.Fragment,{children:[S.jsx(gt,{className:"text-xl",icon:"help",onClick:()=>t(!0)}),S.jsxs(Kc,{isOpen:e,onCloseRequest:()=>t(!1),className:"border-2 border-slate-700 py-2 px-6",children:[S.jsx(gt,{icon:"close",className:"-mr-3 mt-1 self-end",onClick:()=>t(!1)}),S.jsx(Fb,{markdown:xF})]})]})}function bF(){const{fileHandle:e,isFileSystemSupported:t}=Mc();return S.jsxs("header",{className:"relative flex items-baseline justify-center border-b-2 border-slate-700 py-3",children:[S.jsx("h1",{className:"text-2xl font-semibold",children:"Lackoplan"}),t&&e&&S.jsx("span",{className:"ml-2 text-sm text-slate-400",children:`[${e.name}]`}),S.jsxs("div",{className:"absolute right-0 top-0 flex h-full items-center gap-4 pr-3",children:[S.jsx("a",{className:"rounded-md border-2 border-yellow-600 bg-yellow-400 px-2 py-1 text-sm font-medium text-slate-800 transition-transform hover:scale-105",href:"https://www.buymeacoffee.com/lackobread",rel:"noreferrer noopener",target:"_blank",children:"🍞 Buy me a toast"}),S.jsx(kF,{})]})]})}const Ae={WARRIOR:"warrior",PALADIN:"paladin",HUNTER:"hunter",ROGUE:"rogue",PRIEST:"priest",SHAMAN:"shaman",MAGE:"mage",WARLOCK:"warlock",MONK:"monk",DRUID:"druid",DEMONHUNTER:"demonhunter",DEATHKNIGHT:"deathknight",EVOKER:"evoker",GENERAL:"general"},SF={mini:"w-4",small:"w-6",medium:"w-8",full:"w-full"};function Yo(e){const{name:t,size:n="medium",className:r,...i}=e;return S.jsx("img",{src:`https://wow.zamimg.com/images/wow/icons/medium/${t}.jpg`,loading:"lazy",className:Xt(`${SF[n]}`,r),...i})}const oC={[Ae.WARRIOR]:"classicon_warrior",[Ae.PALADIN]:"classicon_paladin",[Ae.HUNTER]:"classicon_hunter",[Ae.ROGUE]:"classicon_rogue",[Ae.PRIEST]:"classicon_priest",[Ae.SHAMAN]:"classicon_shaman",[Ae.MAGE]:"classicon_mage",[Ae.WARLOCK]:"classicon_warlock",[Ae.MONK]:"classicon_monk",[Ae.DRUID]:"classicon_druid",[Ae.DEMONHUNTER]:"classicon_demonhunter",[Ae.DEATHKNIGHT]:"classicon_deathknight",[Ae.EVOKER]:"classicon_evoker",[Ae.GENERAL]:"inv_cloth_broker_c_01_helm"};function CF(){this.__data__=[],this.size=0}var _F=CF;function EF(e,t){return e===t||e!==e&&t!==t}var fg=EF,TF=fg;function PF(e,t){for(var n=e.length;n--;)if(TF(e[n][0],t))return n;return-1}var qc=PF,AF=qc,LF=Array.prototype,MF=LF.splice;function OF(e){var t=this.__data__,n=AF(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():MF.call(t,n,1),--this.size,!0}var DF=OF,IF=qc;function $F(e){var t=this.__data__,n=IF(t,e);return n<0?void 0:t[n][1]}var FF=$F,RF=qc;function NF(e){return RF(this.__data__,e)>-1}var jF=NF,zF=qc;function VF(e,t){var n=this.__data__,r=zF(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var BF=VF,UF=_F,HF=DF,WF=FF,GF=jF,KF=BF;function as(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=G8}var vg=K8,q8=Ql,Q8=vg,X8=yi,Y8="[object Arguments]",Z8="[object Array]",J8="[object Boolean]",ej="[object Date]",tj="[object Error]",nj="[object Function]",rj="[object Map]",ij="[object Number]",oj="[object Object]",sj="[object RegExp]",lj="[object Set]",aj="[object String]",uj="[object WeakMap]",cj="[object ArrayBuffer]",fj="[object DataView]",dj="[object Float32Array]",hj="[object Float64Array]",pj="[object Int8Array]",mj="[object Int16Array]",gj="[object Int32Array]",yj="[object Uint8Array]",vj="[object Uint8ClampedArray]",wj="[object Uint16Array]",xj="[object Uint32Array]",je={};je[dj]=je[hj]=je[pj]=je[mj]=je[gj]=je[yj]=je[vj]=je[wj]=je[xj]=!0;je[Y8]=je[Z8]=je[cj]=je[J8]=je[fj]=je[ej]=je[tj]=je[nj]=je[rj]=je[ij]=je[oj]=je[sj]=je[lj]=je[aj]=je[uj]=!1;function kj(e){return X8(e)&&Q8(e.length)&&!!je[q8(e)]}var bj=kj;function Sj(e){return function(t){return e(t)}}var wg=Sj,Vu={exports:{}};Vu.exports;(function(e,t){var n=sC,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,s=o&&n.process,l=function(){try{var a=i&&i.require&&i.require("util").types;return a||s&&s.binding&&s.binding("util")}catch{}}();e.exports=l})(Vu,Vu.exports);var xg=Vu.exports,Cj=bj,_j=wg,Sv=xg,Cv=Sv&&Sv.isTypedArray,Ej=Cv?_j(Cv):Cj,pC=Ej,Tj=A8,Pj=gg,Aj=mn,Lj=yg,Mj=hC,Oj=pC,Dj=Object.prototype,Ij=Dj.hasOwnProperty;function $j(e,t){var n=Aj(e),r=!n&&Pj(e),i=!n&&!r&&Lj(e),o=!n&&!r&&!i&&Oj(e),s=n||r||i||o,l=s?Tj(e.length,String):[],a=l.length;for(var u in e)(t||Ij.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Mj(u,a)))&&l.push(u);return l}var mC=$j,Fj=Object.prototype;function Rj(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Fj;return e===n}var kg=Rj;function Nj(e,t){return function(n){return e(t(n))}}var gC=Nj,jj=gC,zj=jj(Object.keys,Object),Vj=zj,Bj=kg,Uj=Vj,Hj=Object.prototype,Wj=Hj.hasOwnProperty;function Gj(e){if(!Bj(e))return Uj(e);var t=[];for(var n in Object(e))Wj.call(e,n)&&n!="constructor"&&t.push(n);return t}var Kj=Gj,qj=aC,Qj=vg;function Xj(e){return e!=null&&Qj(e.length)&&!qj(e)}var bg=Xj,Yj=mC,Zj=Kj,Jj=bg;function ez(e){return Jj(e)?Yj(e):Zj(e)}var Xl=ez,tz=Zc,nz=Xl;function rz(e,t){return e&&tz(t,nz(t),e)}var iz=rz;function oz(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var sz=oz,lz=cs,az=kg,uz=sz,cz=Object.prototype,fz=cz.hasOwnProperty;function dz(e){if(!lz(e))return uz(e);var t=az(e),n=[];for(var r in e)r=="constructor"&&(t||!fz.call(e,r))||n.push(r);return n}var hz=dz,pz=mC,mz=hz,gz=bg;function yz(e){return gz(e)?pz(e,!0):mz(e)}var Sg=yz,vz=Zc,wz=Sg;function xz(e,t){return e&&vz(t,wz(t),e)}var kz=xz,Bu={exports:{}};Bu.exports;(function(e,t){var n=ar,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,s=o?n.Buffer:void 0,l=s?s.allocUnsafe:void 0;function a(u,c){if(c)return u.slice();var f=u.length,d=l?l(f):new u.constructor(f);return u.copy(d),d}e.exports=a})(Bu,Bu.exports);var bz=Bu.exports;function Sz(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},Q7=q7,X7=Array.prototype.concat,Y7=Array.prototype.slice,Vv=LC.exports=function(t){for(var n=[],r=0,i=t.length;r=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};sn.to.keyword=function(e){return OC[e.slice(0,3)]};function oi(e,t,n){return Math.min(Math.max(t,e),n)}function Ma(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var J7=AC.exports,eB={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const Ll=eB,DC={};for(const e of Object.keys(Ll))DC[Ll[e]]=e;const ae={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var IC=ae;for(const e of Object.keys(ae)){if(!("channels"in ae[e]))throw new Error("missing channels property: "+e);if(!("labels"in ae[e]))throw new Error("missing channel labels property: "+e);if(ae[e].labels.length!==ae[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=ae[e];delete ae[e].channels,delete ae[e].labels,Object.defineProperty(ae[e],"channels",{value:t}),Object.defineProperty(ae[e],"labels",{value:n})}ae.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=o-i;let l,a;o===i?l=0:t===o?l=(n-r)/s:n===o?l=2+(r-t)/s:r===o&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const u=(i+o)/2;return o===i?a=0:u<=.5?a=s/(o+i):a=s/(2-o-i),[l,a*100,u*100]};ae.rgb.hsv=function(e){let t,n,r,i,o;const s=e[0]/255,l=e[1]/255,a=e[2]/255,u=Math.max(s,l,a),c=u-Math.min(s,l,a),f=function(d){return(u-d)/6/c+1/2};return c===0?(i=0,o=0):(o=c/u,t=f(s),n=f(l),r=f(a),s===u?i=r-n:l===u?i=1/3+t-r:a===u&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,u*100]};ae.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const i=ae.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,o*100,r*100]};ae.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),o=(1-t-i)/(1-i)||0,s=(1-n-i)/(1-i)||0,l=(1-r-i)/(1-i)||0;return[o*100,s*100,l*100,i*100]};function tB(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}ae.rgb.keyword=function(e){const t=DC[e];if(t)return t;let n=1/0,r;for(const i of Object.keys(Ll)){const o=Ll[i],s=tB(e,o);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const i=t*.4124+n*.3576+r*.1805,o=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[i*100,o*100,s*100]};ae.rgb.lab=function(e){const t=ae.rgb.xyz(e);let n=t[0],r=t[1],i=t[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const o=116*r-16,s=500*(n-r),l=200*(r-i);return[o,s,l]};ae.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let i,o,s;if(n===0)return s=r*255,[s,s,s];r<.5?i=r*(1+n):i=r+n-r*n;const l=2*r-i,a=[0,0,0];for(let u=0;u<3;u++)o=t+1/3*-(u-1),o<0&&o++,o>1&&o--,6*o<1?s=l+(i-l)*6*o:2*o<1?s=i:3*o<2?s=l+(i-l)*(2/3-o)*6:s=l,a[u]=s*255;return a};ae.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,i=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=o<=1?o:2-o;const s=(r+n)/2,l=r===0?2*i/(o+i):2*n/(r+n);return[t,l*100,s*100]};ae.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*o),a=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,a,s];case 1:return[l,r,s];case 2:return[s,r,a];case 3:return[s,l,r];case 4:return[a,s,r];case 5:return[r,s,l]}};ae.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01);let o,s;s=(2-n)*r;const l=(2-n)*i;return o=n*i,o/=l<=1?l:2-l,o=o||0,s/=2,[t,o*100,s*100]};ae.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const i=n+r;let o;i>1&&(n/=i,r/=i);const s=Math.floor(6*t),l=1-r;o=6*t-s,s&1&&(o=1-o);const a=n+o*(l-n);let u,c,f;switch(s){default:case 6:case 0:u=l,c=a,f=n;break;case 1:u=a,c=l,f=n;break;case 2:u=n,c=l,f=a;break;case 3:u=n,c=a,f=l;break;case 4:u=a,c=n,f=l;break;case 5:u=l,c=n,f=a;break}return[u*255,c*255,f*255]};ae.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,o=1-Math.min(1,t*(1-i)+i),s=1-Math.min(1,n*(1-i)+i),l=1-Math.min(1,r*(1-i)+i);return[o*255,s*255,l*255]};ae.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let i,o,s;return i=t*3.2406+n*-1.5372+r*-.4986,o=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};ae.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const i=116*n-16,o=500*(t-n),s=200*(n-r);return[i,o,s]};ae.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let i,o,s;o=(t+16)/116,i=n/500+o,s=o-r/200;const l=o**3,a=i**3,u=s**3;return o=l>.008856?l:(o-16/116)/7.787,i=a>.008856?a:(i-16/116)/7.787,s=u>.008856?u:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};ae.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);const s=Math.sqrt(n*n+r*r);return[t,s,i]};ae.lch.lab=function(e){const t=e[0],n=e[1],i=e[2]/360*2*Math.PI,o=n*Math.cos(i),s=n*Math.sin(i);return[t,o,s]};ae.rgb.ansi16=function(e,t=null){const[n,r,i]=e;let o=t===null?ae.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s};ae.hsv.ansi16=function(e){return ae.rgb.ansi16(ae.hsv.rgb(e),e[2])};ae.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};ae.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,i=(t>>1&1)*n*255,o=(t>>2&1)*n*255;return[r,i,o]};ae.ansi256.rgb=function(e){if(e>=232){const o=(e-232)*10+8;return[o,o,o]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,i=t%6/5*255;return[n,r,i]};ae.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};ae.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),i=r>>16&255,o=r>>8&255,s=r&255;return[i,o,s]};ae.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),s=i-o;let l,a;return s<1?l=o/(1-s):l=0,s<=0?a=0:i===t?a=(n-r)/s%6:i===n?a=2+(r-t)/s:a=4+(t-n)/s,a/=6,a%=1,[a*360,s*100,l*100]};ae.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]};ae.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]};ae.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const i=[0,0,0],o=t%1*6,s=o%1,l=1-s;let a=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=l,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=l,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=l}return a=(1-n)*r,[(n*i[0]+a)*255,(n*i[1]+a)*255,(n*i[2]+a)*255]};ae.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let i=0;return r>0&&(i=t/r),[e[0],i*100,r*100]};ae.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let i=0;return r>0&&r<.5?i=t/(2*r):r>=.5&&r<1&&(i=t/(2*(1-r))),[e[0],i*100,r*100]};ae.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};ae.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,i=r-t;let o=0;return i<1&&(o=(r-i)/(1-i)),[e[0],i*100,o*100]};ae.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};ae.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};ae.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};ae.gray.hsl=function(e){return[0,0,e[0]]};ae.gray.hsv=ae.gray.hsl;ae.gray.hwb=function(e){return[0,100,e[0]]};ae.gray.cmyk=function(e){return[0,0,0,e[0]]};ae.gray.lab=function(e){return[e[0],0,0]};ae.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};ae.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const Hu=IC;function nB(){const e={},t=Object.keys(Hu);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function cB(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const i=e(n);if(typeof i=="object")for(let o=i.length,s=0;s{fo[e]={},Object.defineProperty(fo[e],"channels",{value:ap[e].channels}),Object.defineProperty(fo[e],"labels",{value:ap[e].labels});const t=lB(e);Object.keys(t).forEach(r=>{const i=t[r];fo[e][r]=cB(i),fo[e][r].raw=uB(i)})});var fB=fo;const ho=J7,rn=fB,$C=["keyword","gray","hex"],up={};for(const e of Object.keys(rn))up[[...rn[e].labels].sort().join("")]=e;const Wu={};function mt(e,t){if(!(this instanceof mt))return new mt(e,t);if(t&&t in $C&&(t=null),t&&!(t in rn))throw new Error("Unknown model: "+t);let n,r;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof mt)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const i=ho.get(e);if(i===null)throw new Error("Unable to parse color from string: "+e);this.model=i.model,r=rn[this.model].channels,this.color=i.value.slice(0,r),this.valpha=typeof i.value[r]=="number"?i.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=rn[this.model].channels;const i=Array.prototype.slice.call(e,0,r);this.color=cp(i,r),this.valpha=typeof e[r]=="number"?e[r]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const i=Object.keys(e);"alpha"in e&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const o=i.sort().join("");if(!(o in up))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=up[o];const{labels:s}=rn[this.model],l=[];for(n=0;n(e%360+360)%360),saturationl:Qe("hsl",1,at(100)),lightness:Qe("hsl",2,at(100)),saturationv:Qe("hsv",1,at(100)),value:Qe("hsv",2,at(100)),chroma:Qe("hcg",1,at(100)),gray:Qe("hcg",2,at(100)),white:Qe("hwb",1,at(100)),wblack:Qe("hwb",2,at(100)),cyan:Qe("cmyk",0,at(100)),magenta:Qe("cmyk",1,at(100)),yellow:Qe("cmyk",2,at(100)),black:Qe("cmyk",3,at(100)),x:Qe("xyz",0,at(95.047)),y:Qe("xyz",1,at(100)),z:Qe("xyz",2,at(108.833)),l:Qe("lab",0,at(100)),a:Qe("lab",1),b:Qe("lab",2),keyword(e){return e!==void 0?new mt(e):rn[this.model].keyword(this.color)},hex(e){return e!==void 0?new mt(e):ho.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new mt(e);const t=this.rgb().round().color;let n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),ho.to.hex(t)+n},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[n,r]of e.entries()){const i=r/255;t[n]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return mt.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,o=2*i-1,s=n.alpha()-r.alpha(),l=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,a=1-l;return mt.rgb(l*n.red()+a*r.red(),l*n.green()+a*r.green(),l*n.blue()+a*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(const e of Object.keys(rn)){if($C.includes(e))continue;const{channels:t}=rn[e];mt.prototype[e]=function(...n){return this.model===e?new mt(this):n.length>0?new mt(n,e):new mt([...pB(rn[this.model][e].raw(this.color)),this.valpha],e)},mt[e]=function(...n){let r=n[0];return typeof r=="number"&&(r=cp(n,t)),new mt(r,e)}}function dB(e,t){return Number(e.toFixed(t))}function hB(e){return function(t){return dB(t,e)}}function Qe(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(Wu[r]||(Wu[r]=[]))[t]=n;return e=e[0],function(r){let i;return r!==void 0?(n&&(r=n(r)),i=this[e](),i.color[t]=r,i):(i=this[e]().color[t],n&&(i=n(i)),i)}}function at(e){return function(t){return Math.max(0,Math.min(e,t))}}function pB(e){return Array.isArray(e)?e:[e]}function cp(e,t){for(let n=0;n0&&n(l)?t>1?FC(l,t-1,n,r,i):CB(i,l):r||(i[i.length]=l)}return i}var EB=FC,TB=EB;function PB(e){var t=e==null?0:e.length;return t?TB(e,1):[]}var AB=PB;function LB(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var MB=LB,OB=MB,Hv=Math.max;function DB(e,t,n){return t=Hv(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=Hv(r.length-t,0),s=Array(o);++i0){if(++t>=BB)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var GB=WB,KB=VB,qB=GB,QB=qB(KB),XB=QB,YB=AB,ZB=IB,JB=XB;function eU(e){return JB(ZB(e,void 0,YB),e+"")}var tU=eU,Gv=SC,nU=Gv&&new Gv,rU=nU;function iU(){}var oU=iU,Kv=rU,sU=oU,lU=Kv?function(e){return Kv.get(e)}:sU,NC=lU,aU={},uU=aU,qv=uU,cU=Object.prototype,fU=cU.hasOwnProperty;function dU(e){for(var t=e.name+"",n=qv[t],r=fU.call(qv,t)?n.length:0;r--;){var i=n[r],o=i.func;if(o==null||o==e)return i.name}return t}var jC=dU,hU=Tg,pU=Pg,mU=4294967295;function Ku(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=mU,this.__views__=[]}Ku.prototype=hU(pU.prototype);Ku.prototype.constructor=Ku;var Lg=Ku,gU=Lg,yU=Ag,vU=yC;function wU(e){if(e instanceof gU)return e.clone();var t=new yU(e.__wrapped__,e.__chain__);return t.__actions__=vU(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var xU=wU,kU=Lg,Qv=Ag,bU=Pg,SU=mn,CU=yi,_U=xU,EU=Object.prototype,TU=EU.hasOwnProperty;function qu(e){if(CU(e)&&!SU(e)&&!(e instanceof kU)){if(e instanceof Qv)return e;if(TU.call(e,"__wrapped__"))return _U(e)}return new Qv(e)}qu.prototype=bU.prototype;qu.prototype.constructor=qu;var PU=qu,AU=Lg,LU=NC,MU=jC,OU=PU;function DU(e){var t=MU(e),n=OU[t];if(typeof n!="function"||!(t in AU.prototype))return!1;if(e===n)return!0;var r=LU(n);return!!r&&e===r[0]}var IU=DU,Xv=Ag,$U=tU,FU=NC,kd=jC,RU=mn,Yv=IU,NU="Expected a function",jU=8,zU=32,VU=128,BU=256;function UU(e){return $U(function(t){var n=t.length,r=n,i=Xv.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if(typeof o!="function")throw new TypeError(NU);if(i&&!s&&kd(o)=="wrapper")var s=new Xv([],!0)}for(r=s?r:n;++r(t.cooldown=e,t)},addCooldown(e){return t=>(t.cooldown=t.cooldown+e,t)},multiplyCooldown(e){return t=>(t.cooldown=t.cooldown*e,t)},setIcon(e){return t=>(t.icon=e,t)},setSpellId(e){return t=>(t.spellId=e,t)},setName(e){return t=>(t.name=e,t)},setShortName(e){return t=>(t.shortName=e,t)},setWowheadLink(e){return t=>(t.wowheadLink=e,t)}},zC={[Ae.GENERAL]:[{name:"Personal defensives",spellId:160533,shortName:"Personals",cooldown:60*2,icon:"ability_vehicle_shellshieldgenerator",modifiers:[]},{name:"1 min CDs",spellId:168430,shortName:"1 min CDs",cooldown:60*1,icon:"achievement_pvp_h_01",modifiers:[]},{name:"2 min CDs",spellId:168431,shortName:"2 min CDs",cooldown:60*2,icon:"achievement_pvp_h_02",modifiers:[]},{name:"3 min CDs",spellId:71195,shortName:"3 min CDs",cooldown:60*3,icon:"achievement_pvp_h_03",modifiers:[]},{name:"Healthstone",spellId:251527,shortName:"Healthstone",cooldown:60*60,icon:"warlock_-healthstone",modifiers:[]},{name:"Health Potion",spellId:194629,shortName:"Poti",cooldown:60*5,icon:"inv_potion_27",modifiers:[]}],[Ae.WARRIOR]:[{wowheadLink:"https://www.wowhead.com/spell=97462/rallying-cry",name:"Rallying Cry",spellId:97462,shortName:"Rally",cooldown:60*3,icon:"ability_toughness",modifiers:[]}],[Ae.PALADIN]:[{wowheadLink:"https://www.wowhead.com/spell=31884/avenging-wrath",name:"Avenging Wrath",spellId:31884,shortName:"Wings",cooldown:60*2,icon:"spell_holy_avenginewrath",modifiers:[{icon:"ability_paladin_veneration",process:Si(ve.setCooldown(60),ve.setIcon("ability_paladin_veneration"),ve.setSpellId(216331),ve.setName("Avenging Crusader"),ve.setShortName("Avenging Crusader"),ve.setWowheadLink("https://www.wowhead.com/spell=216331/avenging-crusader"))}]},{wowheadLink:"https://www.wowhead.com/spell=375576/divine-toll",name:"Divine Toll",spellId:375576,shortName:"Toll",cooldown:60,icon:"ability_bastion_paladin",modifiers:[{icon:"spell_holy_pureofheart",wowheadLink:"https://www.wowhead.com/spell=379391/quickened-invocation",description:"Quickened Invocation",process:ve.addCooldown(-15)}]},{wowheadLink:"https://www.wowhead.com/spell=200652/tyrs-deliverance",name:"Tyr's Deliverance",spellId:200652,shortName:"Tyr's Deliverance",cooldown:60*1.5,icon:"inv_mace_2h_artifactsilverhand_d_01",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=31821/aura-mastery",name:"Aura Mastery",spellId:31821,shortName:"Mastery",cooldown:60*3,icon:"spell_holy_auramastery",modifiers:[{icon:"spell_holy_fanaticism",wowheadLink:"https://www.wowhead.com/spell=392911/unwavering-spirit",description:"Unwavering Spirit",process:ve.addCooldown(-30)}]},{wowheadLink:"https://www.wowhead.com/spell=1022/blessing-of-protection",name:"Blessing of Protection",spellId:1022,shortName:"Protection",cooldown:60*5,icon:"spell_holy_sealofprotection",modifiers:[{wowheadLink:"https://www.wowhead.com/spell=384909/improved-blessing-of-protection",icon:"spell_holy_sealofprotection",process:Si(ve.addCooldown(-60))}]},{wowheadLink:"https://www.wowhead.com/spell=204018/blessing-of-spellwarding",name:"Blessing of Spellwarding",spellId:204018,shortName:"Spellwarding",cooldown:60*5,icon:"spell_holy_blessingofprotection",modifiers:[{wowheadLink:"https://www.wowhead.com/spell=384909/improved-blessing-of-protection",icon:"spell_holy_sealofprotection",process:Si(ve.addCooldown(-60))},{wowheadLink:"https://www.wowhead.com/spell=378425/uthers-counsel",icon:"spell_holy_greaterblessingofsalvation",process:Si(ve.multiplyCooldown(.7))}]}],[Ae.HUNTER]:[],[Ae.ROGUE]:[],[Ae.PRIEST]:[{wowheadLink:"https://www.wowhead.com/spell=120517/halo",name:"Halo",spellId:120517,shortName:"Halo",cooldown:60,icon:"ability_priest_halo",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=64843/divine-hymn",name:"Divine Hymn",spellId:64843,shortName:"Hymn",spec:"holy",cooldown:60*3,icon:"spell_holy_divinehymn",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=265202/holy-word-salvation",name:"Holy Word: Salvation",spellId:265202,shortName:"Salvation",spec:"holy",cooldown:60*4,icon:"ability_priest_archangel",modifiers:[{icon:"ability_priest_ascension",process:Si(ve.setCooldown(60*2),ve.setIcon("ability_priest_ascension"),ve.setSpellId(200183),ve.setName("Apotheosis"),ve.setShortName("Apotheosis"),ve.setWowheadLink("https://www.wowhead.com/spell=200183/apotheosis"))}]},{wowheadLink:"https://www.wowhead.com/spell=372835/lightwell",name:"Lightwell",spellId:372835,shortName:"Well",spec:"holy",cooldown:60*1.5,icon:"spell_holy_summonlightwell",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=64901/symbol-of-hope",name:"Symbol of Hope",spellId:64901,shortName:"Hope",spec:"holy",cooldown:60*3,icon:"spell_holy_symbolofhope",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=34433/shadowfiend?spellModifier=137032",name:"Shadowfiend",spellId:34433,shortName:"Shadowfiend",spec:"discipline",cooldown:60*3,icon:"spell_shadow_shadowfiend",modifiers:[{icon:"spell_shadow_soulleech_3",process:Si(ve.setCooldown(60),ve.setIcon("spell_shadow_soulleech_3"),ve.setSpellId(123040),ve.setName("Mindbender"),ve.setShortName("Mindbender"),ve.setWowheadLink("https://www.wowhead.com/spell=123040/mindbender"))}]},{wowheadLink:"https://www.wowhead.com/spell=246287/evangelism",name:"Evangelism",spellId:246287,shortName:"Evang",spec:"discipline",cooldown:60*1.5,icon:"spell_holy_divineillumination",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=47536/rapture",name:"Rapture",spellId:47536,shortName:"Rapture",spec:"discipline",cooldown:60*1.5,icon:"spell_holy_rapture",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=421453/ultimate-penitence",name:"Ultimate Penitence",spellId:421453,shortName:"Ultimate Penitence",spec:"discipline",cooldown:60*4,icon:"ability_priest_ascendance",modifiers:[{wowheadLink:"https://www.wowhead.com/spell=421558/heavens-wrath",icon:"spell_holy_penance",description:"Heaven's Wrath expected CD: 1m",process:ve.addCooldown(-60)}]},{wowheadLink:"https://www.wowhead.com/spell=62618/power-word-barrier",name:"Power Work: Barrier",spellId:62618,shortName:"Barrier",spec:"discipline",cooldown:60*3,icon:"spell_holy_powerwordbarrier",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=33206/pain-suppression",name:"Pain Suppression",spellId:33206,shortName:"Pain Suppression",spec:"discipline",cooldown:60*3,icon:"spell_holy_painsupression",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=15286/vampiric-embrace",name:"Vampiric Embrace",spellId:15286,shortName:"Embrace",cooldown:60*2,icon:"spell_shadow_unsummonbuilding",modifiers:[]}],[Ae.SHAMAN]:[{wowheadLink:"https://www.wowhead.com/spell=114052/ascendance",name:"Ascendance",spellId:114052,shortName:"Asc",cooldown:60*3,icon:"spell_fire_elementaldevastation",modifiers:[{wowheadLink:"https://www.wowhead.com/spell=462440/first-ascendant",icon:"spell_shaman_astralshift",description:"First Ascendant",process:ve.addCooldown(-60)}]},{wowheadLink:"https://www.wowhead.com/spell=108280/healing-tide-totem",name:"Healing Tide Totem",spellId:108280,shortName:"Tide",cooldown:60*2.75,icon:"ability_shaman_healingtide",modifiers:[{wowheadLink:"https://www.wowhead.com/spell=404015/current-control",icon:"ability_shaman_healingtide",description:"Current Control",process:ve.addCooldown(-45)}]},{wowheadLink:"https://www.wowhead.com/spell=198838/earthen-wall-totem",name:"Earthen Wall Totem",spellId:198838,shortName:"Wall",cooldown:60,icon:"spell_nature_stoneskintotem",modifiers:[{icon:"spell_nature_reincarnation",process:Si(ve.setCooldown(60*5),ve.setIcon("spell_nature_reincarnation"),ve.setSpellId(207399),ve.setName("Ancestral Protection Totem"),ve.setShortName("Res Totem"),ve.setWowheadLink("https://www.wowhead.com/spell=207399/ancestral-protection-totem"))}]},{wowheadLink:"https://www.wowhead.com/spell=98008/spirit-link-totem",name:"Spirit Link Totem",spellId:98008,shortName:"Link",cooldown:60*3,icon:"spell_shaman_spiritlink",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=192077/wind-rush-totem",name:"Wind Rush Totem",spellId:192077,shortName:"Rush",cooldown:60*2,icon:"ability_shaman_windwalktotem",modifiers:[{wowheadLink:"https://www.wowhead.com/spell=462791/ascending-air",icon:"achievement_raidprimalist_windelemental",description:"Ascending Air",process:ve.addCooldown(-30)}]},{wowheadLink:"https://www.wowhead.com/spell=108281/ancestral-guidance",name:"Ancestral Guidance",spellId:108281,shortName:"Guidance",cooldown:60*2,icon:"ability_shaman_ancestralguidance",modifiers:[]}],[Ae.MAGE]:[],[Ae.WARLOCK]:[],[Ae.MONK]:[{wowheadLink:"https://www.wowhead.com/spell=325197/invoke-chi-ji-the-red-crane",name:"Invoke Celestial",spellId:325197,shortName:"Celestial",cooldown:60*3,icon:"inv_pet_cranegod",modifiers:[{icon:"inv_pet_jadeserpentpet",description:"Gift of the Celestials",wowheadLink:"https://www.wowhead.com/spell=388212/gift-of-the-celestials",process:ve.addCooldown(-60*2),exclusiveWith:[1]},{icon:"inv_inscription_deck_jadeserpent",description:"Jade Bond",wowheadLink:"https://www.wowhead.com/spell=388031/jade-bond",process:ve.addCooldown(-60),exclusiveWith:[0]}]},{wowheadLink:"https://www.wowhead.com/spell=443028/celestial-conduit?spellModifier=137024",name:"Celestial Conduit",spellId:443028,shortName:"Conduit",cooldown:60*1.5,icon:"inv_ability_conduitofthecelestialsmonk_celestialconduit",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=115310/revival",name:"Revival",spellId:115310,shortName:"Revival",cooldown:60*3,icon:"spell_monk_revival",modifiers:[{icon:"monk_stance_wiseserpent",description:"Uplifted Spirits. Expected CDR: 1m",wowheadLink:"https://www.wowhead.com/spell=388551/uplifted-spirits",process:ve.addCooldown(-60)}]},{wowheadLink:"https://www.wowhead.com/spell=116849/life-cocoon",name:"Life Cocoon",spellId:116849,shortName:"Cocoon",cooldown:60*2,icon:"ability_monk_chicocoon",modifiers:[{icon:"ability_monk_domeofmist",wowheadLink:"https://www.wowhead.com/spell=202424/chrysalis",process:ve.addCooldown(-45)}]}],[Ae.DRUID]:[{wowheadLink:"https://www.wowhead.com/spell=33891/incarnation-tree-of-life",name:"Incarnation: Tree of Life",spellId:33891,shortName:"Tree",cooldown:60*3,icon:"ability_druid_improvedtreeform",modifiers:[{icon:"ability_druid_treeoflife",description:"Cenarius' Guidance",wowheadLink:"https://www.wowhead.com/spell=393371/cenarius-guidance",process:ve.addCooldown(-60)}]},{wowheadLink:"https://www.wowhead.com/spell=740/tranquility",name:"Tranquility",spellId:740,shortName:"Tranq",cooldown:60*3,icon:"spell_nature_tranquility",modifiers:[{icon:"ability_druid_dreamstate",description:"Inner Peace",wowheadLink:"https://www.wowhead.com/spell=197073/inner-peace",process:ve.addCooldown(-30)}]},{wowheadLink:"https://www.wowhead.com/spell=197721/flourish",name:"Flourish",spellId:197721,shortName:"Flourish",cooldown:60,icon:"spell_druid_wildburst",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=391528/convoke-the-spirits",name:"Convoke the Spirits",spellId:391528,shortName:"Convoke",cooldown:60*2,icon:"ability_ardenweald_druid",modifiers:[{icon:"ability_ardenweald_druid",description:"Cenarius Guidance",wowheadLink:"https://www.wowhead.com/spell=393371/cenarius-guidance",process:ve.multiplyCooldown(.5)}]},{wowheadLink:"https://www.wowhead.com/spell=29166/innervate",name:"Innervate",spellId:29166,shortName:"Innervate",cooldown:60*3,icon:"spell_nature_lightning",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=106898/stampeding-roar",name:"Stampeding Roar",spellId:106898,shortName:"Roar",cooldown:60*2,icon:"spell_druid_stampedingroar_cat",modifiers:[{icon:"spell_druid_stampedingroar_cat",description:"Improved Stampeding Roar",wowheadLink:"https://www.wowhead.com/spell=288826/improved-stampeding-roar",process:ve.addCooldown(-60)}]}],[Ae.DEMONHUNTER]:[{wowheadLink:"https://www.wowhead.com/spell=196718/darkness",name:"Darkness",spellId:196718,shortName:"Dark",cooldown:60*3,icon:"ability_demonhunter_darkness",modifiers:[]}],[Ae.DEATHKNIGHT]:[{wowheadLink:"https://www.wowhead.com/spell=51052/anti-magic-zone",name:"AntiMagic Zone",spellId:51052,shortName:"AMZ",cooldown:60*2,icon:"spell_deathknight_antimagiczone",modifiers:[]}],[Ae.EVOKER]:[{wowheadLink:"https://www.wowhead.com/spell=363534/rewind",name:"Rewind",spellId:363534,shortName:"Rewind",cooldown:60*4,icon:"ability_evoker_rewind",modifiers:[{icon:"ability_evoker_rewind",description:"Temporal Artificer",wowheadLink:"https://www.wowhead.com/spell=381922/temporal-artificer",process:ve.addCooldown(-60)}]},{wowheadLink:"https://www.wowhead.com/spell=370537/stasis",name:"Stasis",spellId:370537,shortName:"Stasis",cooldown:60*1.5,icon:"ability_evoker_stasis",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=370960/emerald-communion",name:"Emerald Communion",spellId:370960,shortName:"Communion",cooldown:60*3,icon:"ability_evoker_green_01",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=359816/dream-flight",name:"Dream Flight",spellId:359816,shortName:"Breath",cooldown:60*2,icon:"ability_evoker_dreamflight",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=374227/zephyr",name:"Zephyr",spellId:374227,shortName:"Zephyr",cooldown:60*2,icon:"ability_evoker_hoverblack",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=374968/time-spiral",name:"Time Spiral",spellId:374968,shortName:"Spiral",cooldown:60*2,icon:"ability_evoker_timespiral",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=370665/rescue",name:"Rescue",spellId:370665,shortName:"Rescue",cooldown:60,icon:"ability_evoker_flywithme",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=406732/spatial-paradox",name:"Spatial Paradox",spellId:406732,shortName:"Paradox",cooldown:60*2,icon:"ability_evoker_stretchtime",modifiers:[]},{wowheadLink:"https://www.wowhead.com/spell=370553/tip-the-scales",name:"Tip the Scales",spellId:370553,shortName:"Tip the Scales",cooldown:60*2,icon:"ability_evoker_tipthescales",modifiers:[]}]},qU=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function VC(e){return{id:el(),class:e,name:e,isActive:!0,abilities:zC[e].map(t=>({id:el(),ability:Uu(t),originalAbility:Uu(t),isActive:!1,activeModifiers:t.modifiers.map(()=>!1),castTimes:[]}))}}function fp(e){const t=e.originalAbility.modifiers.reduce((n,r,i)=>(e.activeModifiers[i]&&r.process(n),n),Uu(e.originalAbility));e.ability=t}function Qu(e,t){return[...Array(Math.floor(t/e)+1)].map((n,r)=>e*r)}function QU(e){const[t,n]=e.split(":");return(parseInt(t)||0)*60+(parseInt(n)||0)}function Wr(e){return`${Math.floor(e/60)}:${String(Math.floor(e%60)).padStart(2,"0")}`}function Zv(e){switch(e.type){case"phase":return`p${e.phase}`;case"event":return`${e.event}:${e.spell}:${e.counter}`}}var XU={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Jv=e=>{let t;const n=new Set,r=(a,u)=>{const c=typeof a=="function"?a(t):a;if(!Object.is(c,t)){const f=t;t=u??(typeof c!="object"||c===null)?c:Object.assign({},t,c),n.forEach(d=>d(t,f))}},i=()=>t,l={setState:r,getState:i,subscribe:a=>(n.add(a),()=>n.delete(a)),destroy:()=>{(XU?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,i,l),l},YU=e=>e?Jv(e):Jv;var BC={exports:{}},UC={},HC={exports:{}},WC={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Zo=A;function ZU(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var JU=typeof Object.is=="function"?Object.is:ZU,eH=Zo.useState,tH=Zo.useEffect,nH=Zo.useLayoutEffect,rH=Zo.useDebugValue;function iH(e,t){var n=t(),r=eH({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return nH(function(){i.value=n,i.getSnapshot=t,bd(i)&&o({inst:i})},[e,n,t]),tH(function(){return bd(i)&&o({inst:i}),e(function(){bd(i)&&o({inst:i})})},[e]),rH(n),n}function bd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!JU(e,n)}catch{return!0}}function oH(e,t){return t()}var sH=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?oH:iH;WC.useSyncExternalStore=Zo.useSyncExternalStore!==void 0?Zo.useSyncExternalStore:sH;HC.exports=WC;var lH=HC.exports;/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var ef=A,aH=lH;function uH(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cH=typeof Object.is=="function"?Object.is:uH,fH=aH.useSyncExternalStore,dH=ef.useRef,hH=ef.useEffect,pH=ef.useMemo,mH=ef.useDebugValue;UC.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=dH(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=pH(function(){function a(h){if(!u){if(u=!0,c=h,h=r(h),i!==void 0&&s.hasValue){var p=s.value;if(i(p,h))return f=p}return f=h}if(p=f,cH(c,h))return p;var v=r(h);return i!==void 0&&i(p,v)?p:(c=h,f=v)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return a(t())},d===null?void 0:function(){return a(d())}]},[t,n,r,i]);var l=fH(e,o[0],o[1]);return hH(function(){s.hasValue=!0,s.value=l},[l]),mH(l),l};BC.exports=UC;var gH=BC.exports;const yH=sr(gH);var GC={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:vH}=_e,{useSyncExternalStoreWithSelector:wH}=yH;let ew=!1;function xH(e,t=e.getState,n){(GC?"production":void 0)!=="production"&&n&&!ew&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),ew=!0);const r=wH(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return vH(r),r}const tw=e=>{(GC?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?YU(e):e,n=(r,i)=>xH(t,r,i);return Object.assign(n,t),n},kH=e=>e?tw(e):tw;var KC=Symbol.for("immer-nothing"),nw=Symbol.for("immer-draftable"),fn=Symbol.for("immer-state");function Rn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Jo=Object.getPrototypeOf;function es(e){return!!e&&!!e[fn]}function qi(e){var t;return e?qC(e)||Array.isArray(e)||!!e[nw]||!!((t=e.constructor)!=null&&t[nw])||nf(e)||rf(e):!1}var bH=Object.prototype.constructor.toString();function qC(e){if(!e||typeof e!="object")return!1;const t=Jo(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===bH}function Ml(e,t){tf(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function tf(e){const t=e[fn];return t?t.type_:Array.isArray(e)?1:nf(e)?2:rf(e)?3:0}function dp(e,t){return tf(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function QC(e,t,n){const r=tf(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function SH(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function nf(e){return e instanceof Map}function rf(e){return e instanceof Set}function Li(e){return e.copy_||e.base_}function hp(e,t){if(nf(e))return new Map(e);if(rf(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&qC(e))return Jo(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[fn];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=CH),Object.freeze(e),t&&Ml(e,(n,r)=>Mg(r,!0))),e}function CH(){Rn(2)}function of(e){return Object.isFrozen(e)}var _H={};function Qi(e){const t=_H[e];return t||Rn(0,e),t}var Ol;function XC(){return Ol}function EH(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function rw(e,t){t&&(Qi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function pp(e){mp(e),e.drafts_.forEach(TH),e.drafts_=null}function mp(e){e===Ol&&(Ol=e.parent_)}function iw(e){return Ol=EH(Ol,e)}function TH(e){const t=e[fn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ow(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[fn].modified_&&(pp(t),Rn(4)),qi(e)&&(e=Xu(t,e),t.parent_||Yu(t,e)),t.patches_&&Qi("Patches").generateReplacementPatches_(n[fn].base_,e,t.patches_,t.inversePatches_)):e=Xu(t,n,[]),pp(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==KC?e:void 0}function Xu(e,t,n){if(of(t))return t;const r=t[fn];if(!r)return Ml(t,(i,o)=>sw(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Yu(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),Ml(o,(l,a)=>sw(e,r,i,l,a,n,s)),Yu(e,i,!1),n&&e.patches_&&Qi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function sw(e,t,n,r,i,o,s){if(es(i)){const l=o&&t&&t.type_!==3&&!dp(t.assigned_,r)?o.concat(r):void 0,a=Xu(e,i,l);if(QC(n,r,a),es(a))e.canAutoFreeze_=!1;else return}else s&&n.add(i);if(qi(i)&&!of(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Xu(e,i),(!t||!t.scope_.parent_)&&Yu(e,i)}}function Yu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Mg(t,n)}function PH(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:XC(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Og;n&&(i=[r],o=Dl);const{revoke:s,proxy:l}=Proxy.revocable(i,o);return r.draft_=l,r.revoke_=s,l}var Og={get(e,t){if(t===fn)return e;const n=Li(e);if(!dp(n,t))return AH(e,n,t);const r=n[t];return e.finalized_||!qi(r)?r:r===Sd(e.base_,t)?(Cd(e),e.copy_[t]=yp(r,e)):r},has(e,t){return t in Li(e)},ownKeys(e){return Reflect.ownKeys(Li(e))},set(e,t,n){const r=YC(Li(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Sd(Li(e),t),o=i==null?void 0:i[fn];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(SH(n,i)&&(n!==void 0||dp(e.base_,t)))return!0;Cd(e),gp(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Sd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Cd(e),gp(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Li(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Rn(11)},getPrototypeOf(e){return Jo(e.base_)},setPrototypeOf(){Rn(12)}},Dl={};Ml(Og,(e,t)=>{Dl[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Dl.deleteProperty=function(e,t){return Dl.set.call(this,e,t,void 0)};Dl.set=function(e,t,n){return Og.set.call(this,e[0],t,n,e[0])};function Sd(e,t){const n=e[fn];return(n?Li(n):e)[t]}function AH(e,t,n){var i;const r=YC(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function YC(e,t){if(!(t in e))return;let n=Jo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Jo(n)}}function gp(e){e.modified_||(e.modified_=!0,e.parent_&&gp(e.parent_))}function Cd(e){e.copy_||(e.copy_=hp(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var LH=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const s=this;return function(a=o,...u){return s.produce(a,c=>n.call(this,c,...u))}}typeof n!="function"&&Rn(6),r!==void 0&&typeof r!="function"&&Rn(7);let i;if(qi(t)){const o=iw(this),s=yp(t,void 0);let l=!0;try{i=n(s),l=!1}finally{l?pp(o):mp(o)}return rw(o,r),ow(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===KC&&(i=void 0),this.autoFreeze_&&Mg(i,!0),r){const o=[],s=[];Qi("Patches").generateReplacementPatches_(t,i,o,s),r(o,s)}return i}else Rn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...l)=>this.produceWithPatches(s,a=>t(a,...l));let r,i;return[this.produce(t,n,(s,l)=>{r=s,i=l}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){qi(e)||Rn(8),es(e)&&(e=MH(e));const t=iw(this),n=yp(e,void 0);return n[fn].isManual_=!0,mp(t),n}finishDraft(e,t){const n=e&&e[fn];(!n||!n.isManual_)&&Rn(9);const{scope_:r}=n;return rw(r,t),ow(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Qi("Patches").applyPatches_;return es(e)?r(e,t):this.produce(e,i=>r(i,t))}};function yp(e,t){const n=nf(e)?Qi("MapSet").proxyMap_(e,t):rf(e)?Qi("MapSet").proxySet_(e,t):PH(e,t);return(t?t.scope_:XC()).drafts_.push(n),n}function MH(e){return es(e)||Rn(10,e),ZC(e)}function ZC(e){if(!qi(e)||of(e))return e;const t=e[fn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=hp(e,t.scope_.immer_.useStrictShallowCopy_)}else n=hp(e,!0);return Ml(n,(r,i)=>{QC(n,r,ZC(i))}),t&&(t.finalized_=!1),n}var dn=new LH,OH=dn.produce;dn.produceWithPatches.bind(dn);dn.setAutoFreeze.bind(dn);dn.setUseStrictShallowCopy.bind(dn);dn.applyPatches.bind(dn);dn.createDraft.bind(dn);dn.finishDraft.bind(dn);const DH=e=>(t,n,r)=>(r.setState=(i,o,...s)=>{const l=typeof i=="function"?OH(i):i;return t(l,o,...s)},e(r.setState,n,r)),IH=DH,$H=` -# Hi! - -Click on the edit button to add your own notes. - -Use **all** the [markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) you want!. -`,de=kH()(IH((e,t)=>({duration:60*9+17,userNote:$H,players:[],casts:[],overlays:["","",""],markers:[],markersEnabled:!0,exportState:(n=!1)=>{const r=t();return jH(r,n)},importState:n=>e(r=>{zH(r,n)}),setDuration:n=>e(r=>{r.duration=n}),setUserNote:n=>e(r=>{r.userNote=n}),setOverlay:(n,r)=>e(i=>{i.overlays[n]=r}),addPlayer:n=>e(r=>{r.players.push(n)}),duplicatePlayer:n=>e(r=>{const i=r.players.findIndex(o=>o.id===n);if(i!=-1){const o=Uu(r.players[i]);o.id=el(),r.players.splice(i,0,o)}}),removePlayer:n=>e(r=>{const i=r.players.findIndex(o=>o.id===n);i!==-1&&r.players.splice(i,1)}),togglePlayer:n=>e(r=>{const i=Zu(r,n);i&&(i.isActive=!i.isActive)}),movePlayer:(n,r)=>e(i=>{const o=i.players.findIndex(s=>s.id===n);if(o!==-1){const s=i.players[o],l=Math.max(0,o+r);i.players.splice(o,1),i.players.splice(l,0,s)}}),toggleAbility:(n,r)=>e(i=>{const o=Xn(i,n,r);o&&(o.isActive=!o.isActive,o.isActive&&(fp(o),o.castTimes=Qu(o.ability.cooldown,i.duration)))}),changePlayerName:(n,r)=>e(i=>{const o=Zu(i,n);o&&(o.name=r)}),toggleAbilityModifier:(n,r,i)=>e(o=>{var l;const s=Xn(o,n,r);s&&((l=s.ability.modifiers[i].dependsOn)!=null&&l.map(a=>s.activeModifiers[a]).some(a=>!a)||(s.activeModifiers[i]=!s.activeModifiers[i],BH(s,i),fp(s),s.castTimes=Qu(s.ability.cooldown,o.duration)))}),updateCastTime:({playerId:n,abilityId:r,castIndex:i,newCastTime:o,constrain:s=!1,replicateLeft:l=!1})=>e(a=>{const u=Xn(a,n,r);if(!u)return;const c=a.duration;FH(u,i,o,c,s),RH(u,i),NH(u,i,c,l)}),toggleMarkers:n=>e(r=>{r.markersEnabled=n??!r.markersEnabled}),addMarker:n=>e(r=>{let i;switch(n){case"phase":i={id:el(),type:"phase",time:0,phase:1};break;case"event":i={id:el(),type:"event",time:0,counter:1,event:"SCS",spell:0};break}r.markers.push(i)}),updateMarker:(n,r)=>e(i=>{const o=i.markers.find(l=>l.id===n);if(!o)return;const s=Math.max(0,Math.min(r.time??o.time,i.duration));o.time=s,o.type==="phase"&&r.type==="phase"&&(o.phase=r.phase??o.phase),o.type==="event"&&r.type==="event"&&(o.event=r.event??o.event,o.spell=r.spell??o.spell,o.counter=r.counter??o.counter)}),removeMarker:n=>e(r=>{const i=r.markers.findIndex(o=>o.id===n);i!==-1&&r.markers.splice(i,1)})})));function FH(e,t,n,r,i){if(n<0){e.castTimes[t]=0;return}if(n>r){e.castTimes[t]=r;return}if(i){const o=e.ability.cooldown;if(t>0&&n-e.castTimes[t-1]=0;n--){const r=e.ability.cooldown,i=e.castTimes[n+1]-e.castTimes[n];i{const l=e.castTimes[s];(o-lt)&&(e.castTimes[s+1]=e.castTimes[s]+i)}),e.castTimes=e.castTimes.filter(o=>oi&&e.castTimes.push(n)}function jH(e,t){const n=e.players.map(i=>({name:i.name,isActive:i.isActive,class:i.class,abilities:i.abilities.map(o=>({name:o.originalAbility.name,isActive:o.isActive,activeModifiers:o.activeModifiers,castTimes:o.castTimes}))})),r={duration:e.duration,markers:e.markers,markersEnabled:e.markersEnabled,userNote:e.userNote,players:n};return t&&(r.overlays=e.overlays),r}function zH(e,t){t.overlays&&(e.overlays=t.overlays),e.duration=t.duration,t.userNote&&(e.userNote=t.userNote),t.markers&&(e.markers=t.markers),t.markersEnabled&&(e.markersEnabled=t.markersEnabled),e.players=t.players.map(n=>{const r=VC(n.class);return r.name=n.name,r.isActive=n.isActive,r.abilities.forEach(i=>{const o=n.abilities.find(s=>s.name===i.originalAbility.name);o&&(i.isActive=o.isActive,i.castTimes=o.castTimes,i.activeModifiers=o.activeModifiers,fp(i))}),r})}function Dg(e,t){var n;(n=e.ability.modifiers[t].dependants)==null||n.filter(r=>e.activeModifiers[r]).forEach(r=>{e.activeModifiers[r]=!1,Dg(e,r)})}function VH(e,t){var n;(n=e.ability.modifiers[t].exclusiveWith)==null||n.filter(r=>e.activeModifiers[r]).forEach(r=>{e.activeModifiers[r]=!1,Dg(e,r)})}function BH(e,t){e.activeModifiers[t]?VH(e,t):Dg(e,t)}function Zu(e,t){return e.players.find(n=>n.id===t)}function Xn(e,t,n){const r=Zu(e,t);return r?r.abilities.find(o=>o.id===n):void 0}function UH(e){const{classKey:t}=e,n=de(r=>r.addPlayer);return S.jsx("button",{className:"flex outline outline-2 outline-transparent transition-[outline-color] duration-100 hover:outline-slate-500",onClick:()=>{const r=VC(t);n(r)},children:S.jsx(Yo,{name:oC[t]})})}function HH(){return S.jsx("div",{className:"grid grid-cols-5 gap-2 border-b-2 border-slate-700 p-4 px-8",children:Object.values(Ae).map(e=>zC[e].length?S.jsx(UH,{classKey:e},e):S.jsx(Yo,{name:oC[e],className:"opacity-30"},e))})}function WH(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r{const r=e(n);return WH(t.current,r)?t.current:t.current=r}}function JC(e){const t=A.useRef(e);return e&&(t.current=e),e??t.current}function KH(e){const{playerId:t,playerAbilityId:n}=e,r=de(Or(a=>{const u=Xn(a,t,n);if(u)return{id:u.id,ability:u.ability,isActive:u.isActive,activeModifiers:u.activeModifiers}})),i=JC(r),o=de(a=>a.toggleAbility);function s(a){a.ctrlKey?i!=null&&i.ability.wowheadLink&&window.open(i.ability.wowheadLink,"_blank"):o(t,n)}const l=de(a=>a.toggleAbilityModifier);return i?S.jsxs("div",{className:"flex w-full flex-col place-content-start place-items-start content-start items-start gap-1",children:[S.jsx("button",{title:i.ability.name,onClick:s,className:"flex outline outline-2 outline-transparent transition-[outline] duration-100 hover:outline-slate-500",children:S.jsx(Yo,{name:i.ability.icon,size:"full",className:Xt("aspect-[4/3] object-cover grayscale transition-[filter] duration-100",{"filter-none":i.isActive})})}),S.jsx("div",{className:"grid grid-cols-2 gap-0.5",children:i.ability.modifiers.map((a,u)=>{const c=i.activeModifiers[u];return S.jsx("button",{title:a.description,onClick:f=>{f.ctrlKey?a.wowheadLink&&window.open(a.wowheadLink,"_blank"):l(t,n,u)},className:"flex",children:S.jsx(Yo,{name:a.icon,size:"mini",className:Xt("grayscale transition-[filter] duration-100",{"filter-none":c})})},a.icon)})})]}):null}var Zl=e=>e.type==="checkbox",Mo=e=>e instanceof Date,$t=e=>e==null;const e_=e=>typeof e=="object";var ft=e=>!$t(e)&&!Array.isArray(e)&&e_(e)&&!Mo(e),qH=e=>ft(e)&&e.target?Zl(e.target)?e.target.checked:e.target.value:e,QH=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,XH=(e,t)=>e.has(QH(t)),YH=e=>{const t=e.constructor&&e.constructor.prototype;return ft(t)&&t.hasOwnProperty("isPrototypeOf")},Ig=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function cr(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Ig&&(e instanceof Blob||e instanceof FileList))&&(n||ft(e)))if(t=n?[]:{},!n&&!YH(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=cr(e[r]));else return e;return t}var Jl=e=>Array.isArray(e)?e.filter(Boolean):[],et=e=>e===void 0,le=(e,t,n)=>{if(!t||!ft(e))return n;const r=Jl(t.split(/[,[\].]+?/)).reduce((i,o)=>$t(i)?i:i[o],e);return et(r)||r===e?et(e[t])?n:e[t]:r},hr=e=>typeof e=="boolean";const lw={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Nn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ur={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},t_=_e.createContext(null),n_=()=>_e.useContext(t_),ZH=e=>{const{children:t,...n}=e;return _e.createElement(t_.Provider,{value:n},t)};var JH=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const s=o;return t._proxyFormState[s]!==Nn.all&&(t._proxyFormState[s]=!r||Nn.all),n&&(n[s]=!0),e[s]}});return i},wn=e=>ft(e)&&!Object.keys(e).length,eW=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return wn(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(s=>t[s]===(!r||Nn.all))},_d=e=>Array.isArray(e)?e:[e];function tW(e){const t=_e.useRef(e);t.current=e,_e.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var Yn=e=>typeof e=="string",nW=(e,t,n,r,i)=>Yn(e)?(r&&t.watch.add(e),le(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),le(n,o))):(r&&(t.watchAll=!0),n),$g=e=>/^\w*$/.test(e),r_=e=>Jl(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ve=(e,t,n)=>{let r=-1;const i=$g(t)?[t]:r_(t),o=i.length,s=o-1;for(;++rt?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},aw=e=>({isOnSubmit:!e||e===Nn.onSubmit,isOnBlur:e===Nn.onBlur,isOnChange:e===Nn.onChange,isOnAll:e===Nn.all,isOnTouch:e===Nn.onTouched}),uw=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const nl=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=le(e,i);if(o){const{_f:s,...l}=o;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!r)break;if(s.ref&&t(s.ref,s.name)&&!r)break;nl(l,t)}else ft(l)&&nl(l,t)}}};var iW=(e,t,n)=>{const r=Jl(le(e,n));return Ve(r,"root",t[n]),Ve(e,n,r),e},Fg=e=>e.type==="file",Gr=e=>typeof e=="function",Ju=e=>{if(!Ig)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},tu=e=>Yn(e),Rg=e=>e.type==="radio",ec=e=>e instanceof RegExp;const cw={value:!1,isValid:!1},fw={value:!0,isValid:!0};var i_=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!et(e[0].attributes.value)?et(e[0].value)||e[0].value===""?fw:{value:e[0].value,isValid:!0}:fw:cw}return cw};const dw={isValid:!1,value:null};var o_=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,dw):dw;function hw(e,t,n="validate"){if(tu(e)||Array.isArray(e)&&e.every(tu)||hr(e)&&!e)return{type:n,message:tu(e)?e:"",ref:t}}var lo=e=>ft(e)&&!ec(e)?e:{value:e,message:""},pw=async(e,t,n,r,i)=>{const{ref:o,refs:s,required:l,maxLength:a,minLength:u,min:c,max:f,pattern:d,validate:h,name:p,valueAsNumber:v,mount:x,disabled:g}=e._f,m=le(t,p);if(!x||g)return{};const y=s?s[0]:o,b=O=>{r&&y.reportValidity&&(y.setCustomValidity(hr(O)?"":O||""),y.reportValidity())},T={},_=Rg(o),L=Zl(o),M=_||L,F=(v||Fg(o))&&et(o.value)&&et(m)||Ju(o)&&o.value===""||m===""||Array.isArray(m)&&!m.length,C=rW.bind(null,p,n,T),I=(O,j,N,V=ur.maxLength,Z=ur.minLength)=>{const ee=O?j:N;T[p]={type:O?V:Z,message:ee,ref:o,...C(O?V:Z,ee)}};if(i?!Array.isArray(m)||!m.length:l&&(!M&&(F||$t(m))||hr(m)&&!m||L&&!i_(s).isValid||_&&!o_(s).isValid)){const{value:O,message:j}=tu(l)?{value:!!l,message:l}:lo(l);if(O&&(T[p]={type:ur.required,message:j,ref:y,...C(ur.required,j)},!n))return b(j),T}if(!F&&(!$t(c)||!$t(f))){let O,j;const N=lo(f),V=lo(c);if(!$t(m)&&!isNaN(m)){const Z=o.valueAsNumber||m&&+m;$t(N.value)||(O=Z>N.value),$t(V.value)||(j=Znew Date(new Date().toDateString()+" "+k),z=o.type=="time",K=o.type=="week";Yn(N.value)&&m&&(O=z?ee(m)>ee(N.value):K?m>N.value:Z>new Date(N.value)),Yn(V.value)&&m&&(j=z?ee(m)+O.value,V=!$t(j.value)&&m.length<+j.value;if((N||V)&&(I(N,O.message,j.message),!n))return b(T[p].message),T}if(d&&!F&&Yn(m)){const{value:O,message:j}=lo(d);if(ec(O)&&!m.match(O)&&(T[p]={type:ur.pattern,message:j,ref:o,...C(ur.pattern,j)},!n))return b(j),T}if(h){if(Gr(h)){const O=await h(m,t),j=hw(O,y);if(j&&(T[p]={...j,...C(ur.validate,j.message)},!n))return b(j.message),T}else if(ft(h)){let O={};for(const j in h){if(!wn(O)&&!n)break;const N=hw(await h[j](m,t),y,j);N&&(O={...N,...C(j,N.message)},b(N.message),n&&(T[p]=O))}if(!wn(O)&&(T[p]={ref:y,...O},!n))return T}}return b(!0),T};function oW(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},tc=e=>$t(e)||!e_(e);function Fi(e,t){if(tc(e)||tc(t))return e===t;if(Mo(e)&&Mo(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Mo(o)&&Mo(s)||ft(o)&&ft(s)||Array.isArray(o)&&Array.isArray(s)?!Fi(o,s):o!==s)return!1}}return!0}var s_=e=>e.type==="select-multiple",lW=e=>Rg(e)||Zl(e),Td=e=>Ju(e)&&e.isConnected,l_=e=>{for(const t in e)if(Gr(e[t]))return!0;return!1};function nc(e,t={}){const n=Array.isArray(e);if(ft(e)||n)for(const r in e)Array.isArray(e[r])||ft(e[r])&&!l_(e[r])?(t[r]=Array.isArray(e[r])?[]:{},nc(e[r],t[r])):$t(e[r])||(t[r]=!0);return t}function a_(e,t,n){const r=Array.isArray(e);if(ft(e)||r)for(const i in e)Array.isArray(e[i])||ft(e[i])&&!l_(e[i])?et(t)||tc(n[i])?n[i]=Array.isArray(e[i])?nc(e[i],[]):{...nc(e[i])}:a_(e[i],$t(t)?{}:t[i],n[i]):n[i]=!Fi(e[i],t[i]);return n}var Pd=(e,t)=>a_(e,t,nc(t)),u_=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>et(e)?e:t?e===""?NaN:e&&+e:n&&Yn(e)?new Date(e):r?r(e):e;function Ad(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Fg(t)?t.files:Rg(t)?o_(e.refs).value:s_(t)?[...t.selectedOptions].map(({value:n})=>n):Zl(t)?i_(e.refs).value:u_(et(t.value)?e.ref.value:t.value,e)}var aW=(e,t,n,r)=>{const i={};for(const o of e){const s=le(t,o);s&&Ve(i,o,s._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Ls=e=>et(e)?e:ec(e)?e.source:ft(e)?ec(e.value)?e.value.source:e.value:e,uW=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function mw(e,t,n){const r=le(e,n);if(r||$g(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),s=le(t,o),l=le(e,o);if(s&&!Array.isArray(s)&&n!==o)return{name:n};if(l&&l.type)return{name:o,error:l};i.pop()}return{name:n}}var cW=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,fW=(e,t)=>!Jl(le(e,t)).length&&xt(e,t);const dW={mode:Nn.onSubmit,reValidateMode:Nn.onChange,shouldFocusError:!0};function hW(e={},t){let n={...dW,...e},r={submitCount:0,isDirty:!1,isLoading:Gr(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:n.errors||{},disabled:!1},i={},o=ft(n.defaultValues)||ft(n.values)?cr(n.defaultValues||n.values)||{}:{},s=n.shouldUnregister?{}:cr(o),l={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,c=0;const f={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:Ed(),array:Ed(),state:Ed()},h=e.resetOptions&&e.resetOptions.keepDirtyValues,p=aw(n.mode),v=aw(n.reValidateMode),x=n.criteriaMode===Nn.all,g=P=>$=>{clearTimeout(c),c=setTimeout(P,$)},m=async P=>{if(f.isValid||P){const $=n.resolver?wn((await C()).errors):await O(i,!0);$!==r.isValid&&d.state.next({isValid:$})}},y=P=>f.isValidating&&d.state.next({isValidating:P}),b=(P,$=[],R,te,W=!0,E=!0)=>{if(te&&R){if(l.action=!0,E&&Array.isArray(le(i,P))){const D=R(le(i,P),te.argA,te.argB);W&&Ve(i,P,D)}if(E&&Array.isArray(le(r.errors,P))){const D=R(le(r.errors,P),te.argA,te.argB);W&&Ve(r.errors,P,D),fW(r.errors,P)}if(f.touchedFields&&E&&Array.isArray(le(r.touchedFields,P))){const D=R(le(r.touchedFields,P),te.argA,te.argB);W&&Ve(r.touchedFields,P,D)}f.dirtyFields&&(r.dirtyFields=Pd(o,s)),d.state.next({name:P,isDirty:N(P,$),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Ve(s,P,$)},T=(P,$)=>{Ve(r.errors,P,$),d.state.next({errors:r.errors})},_=P=>{r.errors=P,d.state.next({errors:r.errors,isValid:!1})},L=(P,$,R,te)=>{const W=le(i,P);if(W){const E=le(s,P,et(R)?le(o,P):R);et(E)||te&&te.defaultChecked||$?Ve(s,P,$?E:Ad(W._f)):ee(P,E),l.mount&&m()}},M=(P,$,R,te,W)=>{let E=!1,D=!1;const J={name:P},se=!!(le(i,P)&&le(i,P)._f.disabled);if(!R||te){f.isDirty&&(D=r.isDirty,r.isDirty=J.isDirty=N(),E=D!==J.isDirty);const me=se||Fi(le(o,P),$);D=!!(!se&&le(r.dirtyFields,P)),me||se?xt(r.dirtyFields,P):Ve(r.dirtyFields,P,!0),J.dirtyFields=r.dirtyFields,E=E||f.dirtyFields&&D!==!me}if(R){const me=le(r.touchedFields,P);me||(Ve(r.touchedFields,P,R),J.touchedFields=r.touchedFields,E=E||f.touchedFields&&me!==R)}return E&&W&&d.state.next(J),E?J:{}},F=(P,$,R,te)=>{const W=le(r.errors,P),E=f.isValid&&hr($)&&r.isValid!==$;if(e.delayError&&R?(u=g(()=>T(P,R)),u(e.delayError)):(clearTimeout(c),u=null,R?Ve(r.errors,P,R):xt(r.errors,P)),(R?!Fi(W,R):W)||!wn(te)||E){const D={...te,...E&&hr($)?{isValid:$}:{},errors:r.errors,name:P};r={...r,...D},d.state.next(D)}y(!1)},C=async P=>n.resolver(s,n.context,aW(P||a.mount,i,n.criteriaMode,n.shouldUseNativeValidation)),I=async P=>{const{errors:$}=await C(P);if(P)for(const R of P){const te=le($,R);te?Ve(r.errors,R,te):xt(r.errors,R)}else r.errors=$;return $},O=async(P,$,R={valid:!0})=>{for(const te in P){const W=P[te];if(W){const{_f:E,...D}=W;if(E){const J=a.array.has(E.name),se=await pw(W,s,x,n.shouldUseNativeValidation&&!$,J);if(se[E.name]&&(R.valid=!1,$))break;!$&&(le(se,E.name)?J?iW(r.errors,se,E.name):Ve(r.errors,E.name,se[E.name]):xt(r.errors,E.name))}D&&await O(D,$,R)}}return R.valid},j=()=>{for(const P of a.unMount){const $=le(i,P);$&&($._f.refs?$._f.refs.every(R=>!Td(R)):!Td($._f.ref))&&re(P)}a.unMount=new Set},N=(P,$)=>(P&&$&&Ve(s,P,$),!Fi(w(),o)),V=(P,$,R)=>nW(P,a,{...l.mount?s:et($)?o:Yn(P)?{[P]:$}:$},R,$),Z=P=>Jl(le(l.mount?s:o,P,e.shouldUnregister?le(o,P,[]):[])),ee=(P,$,R={})=>{const te=le(i,P);let W=$;if(te){const E=te._f;E&&(!E.disabled&&Ve(s,P,u_($,E)),W=Ju(E.ref)&&$t($)?"":$,s_(E.ref)?[...E.ref.options].forEach(D=>D.selected=W.includes(D.value)):E.refs?Zl(E.ref)?E.refs.length>1?E.refs.forEach(D=>(!D.defaultChecked||!D.disabled)&&(D.checked=Array.isArray(W)?!!W.find(J=>J===D.value):W===D.value)):E.refs[0]&&(E.refs[0].checked=!!W):E.refs.forEach(D=>D.checked=D.value===W):Fg(E.ref)?E.ref.value="":(E.ref.value=W,E.ref.type||d.values.next({name:P,values:{...s}})))}(R.shouldDirty||R.shouldTouch)&&M(P,W,R.shouldTouch,R.shouldDirty,!0),R.shouldValidate&&U(P)},z=(P,$,R)=>{for(const te in $){const W=$[te],E=`${P}.${te}`,D=le(i,E);(a.array.has(P)||!tc(W)||D&&!D._f)&&!Mo(W)?z(E,W,R):ee(E,W,R)}},K=(P,$,R={})=>{const te=le(i,P),W=a.array.has(P),E=cr($);Ve(s,P,E),W?(d.array.next({name:P,values:{...s}}),(f.isDirty||f.dirtyFields)&&R.shouldDirty&&d.state.next({name:P,dirtyFields:Pd(o,s),isDirty:N(P,E)})):te&&!te._f&&!$t(E)?z(P,E,R):ee(P,E,R),uw(P,a)&&d.state.next({...r}),d.values.next({name:P,values:{...s}}),!l.mount&&t()},k=async P=>{const $=P.target;let R=$.name,te=!0;const W=le(i,R),E=()=>$.type?Ad(W._f):qH(P),D=J=>{te=Number.isNaN(J)||J===le(s,R,J)};if(W){let J,se;const me=E(),He=P.type===lw.BLUR||P.type===lw.FOCUS_OUT,Vt=!uW(W._f)&&!n.resolver&&!le(r.errors,R)&&!W._f.deps||cW(He,le(r.touchedFields,R),r.isSubmitted,v,p),nt=uw(R,a,He);Ve(s,R,me),He?(W._f.onBlur&&W._f.onBlur(P),u&&u(0)):W._f.onChange&&W._f.onChange(P);const Bt=M(R,me,He,!1),On=!wn(Bt)||nt;if(!He&&d.values.next({name:R,type:P.type,values:{...s}}),Vt)return f.isValid&&m(),On&&d.state.next({name:R,...nt?{}:Bt});if(!He&&nt&&d.state.next({...r}),y(!0),n.resolver){const{errors:rt}=await C([R]);if(D(me),te){const gn=mw(r.errors,i,R),vt=mw(rt,i,gn.name||R);J=vt.error,R=vt.name,se=wn(rt)}}else J=(await pw(W,s,x,n.shouldUseNativeValidation))[R],D(me),te&&(J?se=!1:f.isValid&&(se=await O(i,!0)));te&&(W._f.deps&&U(W._f.deps),F(R,se,J,Bt))}},B=(P,$)=>{if(le(r.errors,$)&&P.focus)return P.focus(),1},U=async(P,$={})=>{let R,te;const W=_d(P);if(y(!0),n.resolver){const E=await I(et(P)?P:W);R=wn(E),te=P?!W.some(D=>le(E,D)):R}else P?(te=(await Promise.all(W.map(async E=>{const D=le(i,E);return await O(D&&D._f?{[E]:D}:D)}))).every(Boolean),!(!te&&!r.isValid)&&m()):te=R=await O(i);return d.state.next({...!Yn(P)||f.isValid&&R!==r.isValid?{}:{name:P},...n.resolver||!P?{isValid:R}:{},errors:r.errors,isValidating:!1}),$.shouldFocus&&!te&&nl(i,B,P?W:a.mount),te},w=P=>{const $={...o,...l.mount?s:{}};return et(P)?$:Yn(P)?le($,P):P.map(R=>le($,R))},X=(P,$)=>({invalid:!!le(($||r).errors,P),isDirty:!!le(($||r).dirtyFields,P),isTouched:!!le(($||r).touchedFields,P),error:le(($||r).errors,P)}),Y=P=>{P&&_d(P).forEach($=>xt(r.errors,$)),d.state.next({errors:P?r.errors:{}})},H=(P,$,R)=>{const te=(le(i,P,{_f:{}})._f||{}).ref;Ve(r.errors,P,{...$,ref:te}),d.state.next({name:P,errors:r.errors,isValid:!1}),R&&R.shouldFocus&&te&&te.focus&&te.focus()},Q=(P,$)=>Gr(P)?d.values.subscribe({next:R=>P(V(void 0,$),R)}):V(P,$,!0),re=(P,$={})=>{for(const R of P?_d(P):a.mount)a.mount.delete(R),a.array.delete(R),$.keepValue||(xt(i,R),xt(s,R)),!$.keepError&&xt(r.errors,R),!$.keepDirty&&xt(r.dirtyFields,R),!$.keepTouched&&xt(r.touchedFields,R),!n.shouldUnregister&&!$.keepDefaultValue&&xt(o,R);d.values.next({values:{...s}}),d.state.next({...r,...$.keepDirty?{isDirty:N()}:{}}),!$.keepIsValid&&m()},ie=({disabled:P,name:$,field:R,fields:te,value:W})=>{if(hr(P)){const E=P?void 0:et(W)?Ad(R?R._f:le(te,$)._f):W;Ve(s,$,E),M($,E,!1,!1,!0)}},oe=(P,$={})=>{let R=le(i,P);const te=hr($.disabled);return Ve(i,P,{...R||{},_f:{...R&&R._f?R._f:{ref:{name:P}},name:P,mount:!0,...$}}),a.mount.add(P),R?ie({field:R,disabled:$.disabled,name:P,value:$.value}):L(P,!0,$.value),{...te?{disabled:$.disabled}:{},...n.progressive?{required:!!$.required,min:Ls($.min),max:Ls($.max),minLength:Ls($.minLength),maxLength:Ls($.maxLength),pattern:Ls($.pattern)}:{},name:P,onChange:k,onBlur:k,ref:W=>{if(W){oe(P,$),R=le(i,P);const E=et(W.value)&&W.querySelectorAll&&W.querySelectorAll("input,select,textarea")[0]||W,D=lW(E),J=R._f.refs||[];if(D?J.find(se=>se===E):E===R._f.ref)return;Ve(i,P,{_f:{...R._f,...D?{refs:[...J.filter(Td),E,...Array.isArray(le(o,P))?[{}]:[]],ref:{type:E.type,name:P}}:{ref:E}}}),L(P,!1,void 0,E)}else R=le(i,P,{}),R._f&&(R._f.mount=!1),(n.shouldUnregister||$.shouldUnregister)&&!(XH(a.array,P)&&l.action)&&a.unMount.add(P)}}},ue=()=>n.shouldFocusError&&nl(i,B,a.mount),ye=P=>{hr(P)&&(d.state.next({disabled:P}),nl(i,($,R)=>{let te=P;const W=le(i,R);W&&hr(W._f.disabled)&&(te||(te=W._f.disabled)),$.disabled=te},0,!1))},pe=(P,$)=>async R=>{R&&(R.preventDefault&&R.preventDefault(),R.persist&&R.persist());let te=cr(s);if(d.state.next({isSubmitting:!0}),n.resolver){const{errors:W,values:E}=await C();r.errors=W,te=E}else await O(i);xt(r.errors,"root"),wn(r.errors)?(d.state.next({errors:{}}),await P(te,R)):($&&await $({...r.errors},R),ue(),setTimeout(ue)),d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:wn(r.errors),submitCount:r.submitCount+1,errors:r.errors})},xe=(P,$={})=>{le(i,P)&&(et($.defaultValue)?K(P,le(o,P)):(K(P,$.defaultValue),Ve(o,P,$.defaultValue)),$.keepTouched||xt(r.touchedFields,P),$.keepDirty||(xt(r.dirtyFields,P),r.isDirty=$.defaultValue?N(P,le(o,P)):N()),$.keepError||(xt(r.errors,P),f.isValid&&m()),d.state.next({...r}))},fe=(P,$={})=>{const R=P?cr(P):o,te=cr(R),W=P&&!wn(P)?te:o;if($.keepDefaultValues||(o=R),!$.keepValues){if($.keepDirtyValues||h)for(const E of a.mount)le(r.dirtyFields,E)?Ve(W,E,le(s,E)):K(E,le(W,E));else{if(Ig&&et(P))for(const E of a.mount){const D=le(i,E);if(D&&D._f){const J=Array.isArray(D._f.refs)?D._f.refs[0]:D._f.ref;if(Ju(J)){const se=J.closest("form");if(se){se.reset();break}}}}i={}}s=e.shouldUnregister?$.keepDefaultValues?cr(o):{}:cr(W),d.array.next({values:{...W}}),d.values.next({values:{...W}})}a={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!l.mount&&t(),l.mount=!f.isValid||!!$.keepIsValid,l.watch=!!e.shouldUnregister,d.state.next({submitCount:$.keepSubmitCount?r.submitCount:0,isDirty:$.keepDirty?r.isDirty:!!($.keepDefaultValues&&!Fi(P,o)),isSubmitted:$.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:$.keepDirtyValues?r.dirtyFields:$.keepDefaultValues&&P?Pd(o,P):{},touchedFields:$.keepTouched?r.touchedFields:{},errors:$.keepErrors?r.errors:{},isSubmitSuccessful:$.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},ke=(P,$)=>fe(Gr(P)?P(s):P,$);return{control:{register:oe,unregister:re,getFieldState:X,handleSubmit:pe,setError:H,_executeSchema:C,_getWatch:V,_getDirty:N,_updateValid:m,_removeUnmounted:j,_updateFieldArray:b,_updateDisabledField:ie,_getFieldArray:Z,_reset:fe,_resetDefaultValues:()=>Gr(n.defaultValues)&&n.defaultValues().then(P=>{ke(P,n.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:P=>{r={...r,...P}},_disableForm:ye,_subjects:d,_proxyFormState:f,_setErrors:_,get _fields(){return i},get _formValues(){return s},get _state(){return l},set _state(P){l=P},get _defaultValues(){return o},get _names(){return a},set _names(P){a=P},get _formState(){return r},set _formState(P){r=P},get _options(){return n},set _options(P){n={...n,...P}}},trigger:U,register:oe,handleSubmit:pe,watch:Q,setValue:K,getValues:w,reset:ke,resetField:xe,clearErrors:Y,unregister:re,setError:H,setFocus:(P,$={})=>{const R=le(i,P),te=R&&R._f;if(te){const W=te.refs?te.refs[0]:te.ref;W.focus&&(W.focus(),$.shouldSelect&&W.select())}},getFieldState:X}}function ea(e={}){const t=_e.useRef(),n=_e.useRef(),[r,i]=_e.useState({isDirty:!1,isValidating:!1,isLoading:Gr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:e.errors||{},disabled:!1,defaultValues:Gr(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...hW(e,()=>i(s=>({...s}))),formState:r});const o=t.current.control;return o._options=e,tW({subject:o._subjects.state,next:s=>{eW(s,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),_e.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),_e.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==r.isDirty&&o._subjects.state.next({isDirty:s})}},[o,r.isDirty]),_e.useEffect(()=>{e.values&&!Fi(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i(s=>({...s}))):o._resetDefaultValues()},[e.values,o]),_e.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),_e.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=JH(r,o),t.current}var c_={};Object.defineProperty(c_,"__esModule",{value:!0});function pW(){for(var e=[],t=0;tv.changePlayerName),o=de(v=>v.togglePlayer),s=A.useCallback(()=>{o(t)},[t,o]),l=A.useRef(),[a,u]=A.useState(!1),{register:c,handleSubmit:f}=ea(),{ref:d,...h}=c("name");A.useEffect(()=>{!a||!l.current||l.current.select()},[a]);const p=A.useCallback(v=>{i(t,v.name),u(!1)},[i,t]);return S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{className:"flex min-w-0 flex-grow items-center gap-2",children:[a?S.jsx("form",{id:t,className:"flex-grow",onSubmit:f(p),children:S.jsx("input",{ref:mW(l,d),...h,size:1,className:"w-full border-none bg-transparent outline-none",type:"text",defaultValue:n})}):S.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:n}),S.jsx(Yt.span,{layout:!0,transition:{duration:.15},className:"flex text-xs",children:a?S.jsx(gt,{icon:"check",htmlType:"submit",htmlForm:t},"done"):S.jsx(gt,{icon:"edit",onClick:()=>u(!a)},"edit")})]}),r?S.jsx(gt,{icon:"show",onClick:s,className:"text-xs"}):S.jsx(gt,{icon:"hide",onClick:s,className:"text-xs"})]})}const yW=_e.memo(gW),Ng={colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},warrior:"#C69B6D",paladin:"#F48CBA",hunter:"#AAD372",rogue:"#FFF468",priest:"#FFFFFF",shaman:"#0070DD",mage:"#3FC7EB",warlock:"#8788EE",monk:"#00FF98",druid:"#FF7C0A",demonhunter:"#A330C9",deathknight:"#C41E3A",evoker:"#33937F",general:"#6079bf",contrast:{dark:"#FFFFFF",light:"#000000"}}};function vW(e){const{playerId:t,onRemove:n,disableMoveUp:r,disableMoveDown:i}=e,o=de(l=>l.movePlayer),s=de(l=>l.duplicatePlayer);return S.jsxs("div",{className:"row-span-2 flex flex-col text-xs",children:[S.jsx(gt,{icon:"close",onClick:n}),S.jsx(gt,{icon:"up",onClick:()=>o(t,-1),disabled:r}),S.jsx(gt,{icon:"down",onClick:()=>o(t,1),disabled:i}),S.jsx(gt,{icon:"duplicate",onClick:()=>s(t)})]})}const wW=_e.memo(vW);var xW="__lodash_hash_undefined__";function kW(e){return this.__data__.set(e,xW),this}var bW=kW;function SW(e){return this.__data__.has(e)}var CW=SW,_W=hg,EW=bW,TW=CW;function rc(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new _W;++tl))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,h=n&RW?new DW:void 0;for(o.set(e,t),o.set(t,e);++f{const r=e(n);return _G(t.current,r)?t.current:t.current=r}}const p_=A.forwardRef((e,t)=>{var u;const{playerId:n,isFirst:r,isLast:i}=e,o=de(h_(c=>{const f=Zu(c,n);if(f)return{name:f.name,isActive:f.isActive,class:f.class,abilityIds:f.abilities.map(d=>d.id)}})),s=JC(o),l=de(c=>c.removePlayer),a=A.useCallback(()=>{l(n)},[l,n]);return s?S.jsxs(Yt.div,{layout:!0,initial:{opacity:0},animate:{opacity:s.isActive?1:.6},exit:{opacity:0},transition:{opacity:{duration:.1}},style:{borderColor:s.isActive?Ng.colors[s.class]:"transparent"},className:"grid grid-cols-[1fr,auto] grid-rows-[auto,1fr] border-l-[5px] pl-3",ref:t,children:[S.jsx(yW,{playerId:n,name:s.name,isActive:s.isActive}),S.jsx(wW,{playerId:n,onRemove:a,disableMoveUp:r,disableMoveDown:i}),S.jsx("div",{className:"grid grid-cols-5 items-start gap-1 pr-2 pt-2",children:(u=s.abilityIds)==null?void 0:u.map(c=>S.jsx(KH,{playerId:n,playerAbilityId:c},c))})]}):null});p_.displayName="Player";const EG=_e.memo(p_);/*! - * OverlayScrollbars - * Version: 2.4.5 - * - * Copyright (c) Rene Haas | KingSora. - * https://github.com/KingSora - * - * Released under the MIT license. - */const jn=(e,t)=>{const{o:n,u:r,_:i}=e;let o=n,s;const l=(c,f)=>{const d=o,h=c,p=f||(r?!r(d,h):d!==h);return(p||i)&&(o=h,s=d),[o,p,s]};return[t?c=>l(t(o,s),c):l,c=>[o,!!c,s]]},zg=typeof window<"u",m_=zg&&Node.ELEMENT_NODE,{toString:TG,hasOwnProperty:Od}=Object.prototype,PG=/^\[object (.+)\]$/,vi=e=>e===void 0,sf=e=>e===null,AG=e=>vi(e)||sf(e)?`${e}`:TG.call(e).replace(PG,"$1").toLowerCase(),rr=e=>typeof e=="number",ta=e=>typeof e=="string",g_=e=>typeof e=="boolean",ir=e=>typeof e=="function",An=e=>Array.isArray(e),Il=e=>typeof e=="object"&&!An(e)&&!sf(e),lf=e=>{const t=!!e&&e.length,n=rr(t)&&t>-1&&t%1==0;return An(e)||!ir(e)&&n?t>0&&Il(e)?t-1 in e:!0:!1},ic=e=>{if(!e||!Il(e)||AG(e)!=="object")return!1;let t;const n="constructor",r=e[n],i=r&&r.prototype,o=Od.call(e,n),s=i&&Od.call(i,"isPrototypeOf");if(r&&!o&&!s)return!1;for(t in e);return vi(t)||Od.call(e,t)},rl=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===m_:!1},af=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===m_:!1};function Oe(e,t){if(lf(e))for(let n=0;nt(e[n],n,e));return e}const uf=(e,t)=>e.indexOf(t)>=0,Kr=(e,t)=>e.concat(t),Le=(e,t,n)=>(!n&&!ta(t)&&lf(t)?Array.prototype.push.apply(e,t):e.push(t),e),ms=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Le(n,r)}):Oe(e,r=>{Le(n,r)}),n)},oc=e=>!!e&&!e.length,Lw=e=>ms(new Set(e)),Ln=(e,t,n)=>{Oe(e,i=>i&&i.apply(void 0,t||[])),!n&&(e.length=0)},cf=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Tr=e=>e?Object.keys(e):[],Pe=(e,t,n,r,i,o,s)=>{const l=[t,n,r,i,o,s];return(typeof e!="object"||sf(e))&&!ir(e)&&(e={}),Oe(l,a=>{Oe(a,(u,c)=>{const f=a[c];if(e===f)return!0;const d=An(f);if(f&&ic(f)){const h=e[c];let p=h;d&&!An(h)?p=[]:!d&&!ic(h)&&(p={}),e[c]=Pe(p,f)}else e[c]=d?f.slice():f})}),e},y_=(e,t)=>Oe(Pe({},e),(n,r,i)=>{n===void 0?delete i[r]:t&&n&&ic(n)&&(i[r]=y_(n,t))}),Vg=e=>{for(const t in e)return!1;return!0},Ft=(e,t,n)=>{if(vi(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},v_=(e,t)=>new Set((Ft(e,t)||"").split(" ")),Ht=(e,t)=>{e&&e.removeAttribute(t)},ji=(e,t,n,r)=>{if(n){const i=v_(e,t);i[r?"add":"delete"](n);const o=ms(i).join(" ").trim();Ft(e,t,o)}},LG=(e,t,n)=>v_(e,t).has(n),vp=zg&&Element.prototype,w_=(e,t)=>{const n=[],r=t?af(t)&&t:document;return r?Le(n,r.querySelectorAll(e)):n},MG=(e,t)=>{const n=t?af(t)&&t:document;return n?n.querySelector(e):null},sc=(e,t)=>af(e)?(vp.matches||vp.msMatchesSelector).call(e,t):!1,wp=e=>e?ms(e.childNodes):[],xr=e=>e&&e.parentElement,Oo=(e,t)=>{if(af(e)){const n=vp.closest;if(n)return n.call(e,t);do{if(sc(e,t))return e;e=xr(e)}while(e)}},OG=(e,t,n)=>{const r=Oo(e,t),i=e&&MG(n,r),o=Oo(i,t)===r;return r&&i?r===e||i===e||o&&Oo(Oo(e,n),t)!==r:!1},En=()=>{},kr=e=>{if(lf(e))Oe(ms(e),t=>kr(t));else if(e){const t=xr(e);t&&t.removeChild(e)}},Bg=(e,t,n)=>{if(n&&e){let r=t,i;return lf(n)?(i=document.createDocumentFragment(),Oe(n,o=>{o===r&&(r=o.previousSibling),i.appendChild(o)})):i=n,t&&(r?r!==t&&(r=r.nextSibling):r=e.firstChild),e.insertBefore(i,r||null),()=>kr(n)}return En},Sn=(e,t)=>Bg(e,null,t),DG=(e,t)=>Bg(xr(e),e,t),Mw=(e,t)=>Bg(xr(e),e&&e.nextSibling,t),zi=e=>{const t=document.createElement("div");return Ft(t,"class",e),t},x_=e=>{const t=zi();return t.innerHTML=e.trim(),Oe(wp(t),n=>kr(n))},Zt=zg?window:{},il=Math.max,IG=Math.min,$l=Math.round,k_=Zt.cancelAnimationFrame,b_=Zt.requestAnimationFrame,lc=Zt.setTimeout,xp=Zt.clearTimeout,kp=e=>e.charAt(0).toUpperCase()+e.slice(1),$G=()=>zi().style,FG=["-webkit-","-moz-","-o-","-ms-"],RG=["WebKit","Moz","O","MS","webkit","moz","o","ms"],Dd={},Id={},NG=e=>{let t=Id[e];if(cf(Id,e))return t;const n=kp(e),r=$G();return Oe(FG,i=>{const o=i.replace(/-/g,"");return!(t=[e,i+e,o+n,kp(o)+n].find(l=>r[l]!==void 0))}),Id[e]=t||""},ff=e=>{let t=Dd[e]||Zt[e];return cf(Dd,e)||(Oe(RG,n=>(t=t||Zt[n+kp(e)],!t)),Dd[e]=t),t},jG=ff("MutationObserver"),Ow=ff("IntersectionObserver"),ac=ff("ResizeObserver"),bp=ff("ScrollTimeline"),ge=(e,...t)=>e.bind(0,...t),jr=e=>{let t;const n=e?lc:b_,r=e?xp:k_;return[i=>{r(t),t=n(i,ir(e)?e():e)},()=>r(t)]},S_=(e,t)=>{let n,r,i,o=En;const{v:s,p:l,g:a}=t||{},u=function(p){o(),xp(n),n=r=void 0,o=En,e.apply(this,p)},c=h=>a&&r?a(r,h):h,f=()=>{o!==En&&u(c(i)||i)},d=function(){const p=ms(arguments),v=ir(s)?s():s;if(rr(v)&&v>=0){const g=ir(l)?l():l,m=rr(g)&&g>=0,y=v>0?lc:b_,b=v>0?xp:k_,_=c(p)||p,L=u.bind(0,_);o();const M=y(L,v);o=()=>b(M),m&&!n&&(n=lc(f,g)),r=i=_}else u(p)};return d.m=f,d},zG=/[^\x20\t\r\n\f]+/g,C_=(e,t,n)=>{const r=e&&e.classList;let i,o=0,s=!1;if(r&&t&&ta(t)){const l=t.match(zG)||[];for(s=l.length>0;i=l[o++];)s=!!n(r,i)&&s}return s},Ug=(e,t)=>{C_(e,t,(n,r)=>n.remove(r))},ci=(e,t)=>(C_(e,t,(n,r)=>n.add(r)),ge(Ug,e,t)),VG={opacity:1,zIndex:1},Da=(e,t)=>{const n=e||"",r=t?parseFloat(n):parseInt(n,10);return r===r?r:0},BG=(e,t)=>!VG[e]&&rr(t)?`${t}px`:t,Dw=(e,t,n)=>String((t!=null?t[n]||t.getPropertyValue(n):e.style[n])||""),UG=(e,t,n)=>{try{const{style:r}=e;vi(r[t])?r.setProperty(t,n):r[t]=BG(t,n)}catch{}},__=e=>{const t=e||0;return isFinite(t)?t:0};function Pt(e,t){const n=ta(t);if(An(t)||n){let i=n?"":{};if(e){const o=Zt.getComputedStyle(e,null);i=n?Dw(e,o,t):t.reduce((s,l)=>(s[l]=Dw(e,o,l),s),i)}return i}e&&Oe(t,(i,o)=>UG(e,o,t[o]))}const Fl=e=>Pt(e,"direction")==="rtl",Iw=(e,t,n)=>{const r=t?`${t}-`:"",i=n?`-${n}`:"",o=`${r}top${i}`,s=`${r}right${i}`,l=`${r}bottom${i}`,a=`${r}left${i}`,u=Pt(e,[o,s,l,a]);return{t:Da(u[o],!0),r:Da(u[s],!0),b:Da(u[l],!0),l:Da(u[a],!0)}},ao=(e,t)=>`translate${Il(e)?`(${e.x},${e.y})`:`${t?"X":"Y"}(${e})`}`,Ia=e=>`${(__(e)*100).toFixed(3)}%`,$a=e=>`${__(e)}px`,E_="paddingTop",Hg="paddingRight",Wg="paddingLeft",uc="paddingBottom",cc="marginLeft",fc="marginRight",ol="marginBottom",Fs="overflowX",Rs="overflowY",Pr="width",Ar="height",ts="hidden",HG={w:0,h:0},df=(e,t)=>t?{w:t[`${e}Width`],h:t[`${e}Height`]}:HG,WG=e=>df("inner",e||Zt),sl=ge(df,"offset"),nu=ge(df,"client"),dc=ge(df,"scroll"),hc=e=>{const t=parseFloat(Pt(e,Pr))||0,n=parseFloat(Pt(e,Ar))||0;return{w:t-$l(t),h:n-$l(n)}},Zn=e=>e.getBoundingClientRect(),Sp=e=>!!(e&&(e[Ar]||e[Pr])),T_=(e,t)=>{const n=Sp(e);return!Sp(t)&&n},hf=(e,t,n,r)=>{if(e&&t){let i=!0;return Oe(n,o=>{const s=r?r(e[o]):e[o],l=r?r(t[o]):t[o];s!==l&&(i=!1)}),i}return!1},P_=(e,t)=>hf(e,t,["w","h"]),A_=(e,t)=>hf(e,t,["x","y"]),GG=(e,t)=>hf(e,t,["t","r","b","l"]),$w=(e,t,n)=>hf(e,t,[Pr,Ar],n&&(r=>$l(r)));let Fa;const Fw="passive",KG=()=>{if(vi(Fa)){Fa=!1;try{Zt.addEventListener(Fw,En,Object.defineProperty({},Fw,{get(){Fa=!0}}))}catch{}}return Fa},L_=e=>e.split(" "),Rw=(e,t,n,r)=>{Oe(L_(t),i=>{e.removeEventListener(i,n,r)})},Xe=(e,t,n,r)=>{var i;const o=KG(),s=(i=o&&r&&r.S)!=null?i:o,l=r&&r.$||!1,a=r&&r.O||!1,u=o?{passive:s,capture:l}:l;return ge(Ln,L_(t).map(c=>{const f=a?d=>{Rw(e,c,f,l),n(d)}:n;return e.addEventListener(c,f,u),ge(Rw,e,c,f,l)}))},M_=e=>e.stopPropagation(),Nw=e=>e.preventDefault(),qG={x:0,y:0},$d=e=>{const t=e&&Zn(e);return t?{x:t.left+Zt.pageYOffset,y:t.top+Zt.pageXOffset}:qG},O_=(e,t,n)=>n?n.n?-e:n.i?t-e:e:e,QG=(e,t)=>[t&&t.i?e:0,O_(e,e,t)],fi=(e,t)=>{const{x:n,y:r}=rr(t)?{x:t,y:t}:t||{};rr(n)&&(e.scrollLeft=n),rr(r)&&(e.scrollTop=r)},ns=e=>({x:e.scrollLeft,y:e.scrollTop}),jw=(e,t)=>{Oe(An(t)?t:[t],e)},Cp=e=>{const t=new Map,n=(o,s)=>{if(o){const l=t.get(o);jw(a=>{l&&l[a?"delete":"clear"](a)},s)}else t.forEach(l=>{l.clear()}),t.clear()},r=(o,s)=>{if(ta(o)){const u=t.get(o)||new Set;return t.set(o,u),jw(c=>{ir(c)&&u.add(c)},s),ge(n,o,s)}g_(s)&&s&&n();const l=Tr(o),a=[];return Oe(l,u=>{const c=o[u];c&&Le(a,r(u,c))}),ge(Ln,a)},i=(o,s)=>{Oe(ms(t.get(o)),l=>{s&&!oc(s)?l.apply(0,s):l()})};return r(e||{}),[r,n,i]},zw=e=>JSON.stringify(e,(t,n)=>{if(ir(n))throw 0;return n}),Vw=(e,t)=>e?`${t}`.split(".").reduce((n,r)=>n&&cf(n,r)?n[r]:void 0,e):void 0,XG={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},D_=(e,t)=>{const n={},r=Kr(Tr(t),Tr(e));return Oe(r,i=>{const o=e[i],s=t[i];if(Il(o)&&Il(s))Pe(n[i]={},D_(o,s)),Vg(n[i])&&delete n[i];else if(cf(t,i)&&s!==o){let l=!0;if(An(o)||An(s))try{zw(o)===zw(s)&&(l=!1)}catch{}l&&(n[i]=s)}}),n},YG=(e,t,n)=>r=>[Vw(e,r),n||Vw(t,r)!==void 0],na="data-overlayscrollbars",I_="os-environment",$_=`${I_}-flexbox-glue`,ZG=`${$_}-max`,F_="os-scrollbar-hidden",Fd=`${na}-initialize`,zn=na,R_=`${zn}-overflow-x`,N_=`${zn}-overflow-y`,zo="overflowVisible",JG="scrollbarHidden",Bw="scrollbarPressed",pc="updating",zr=`${na}-viewport`,Rd="arrange",j_="scrollbarHidden",Vo=zo,_p=`${na}-padding`,eK=Vo,Uw=`${na}-content`,Gg="os-size-observer",tK=`${Gg}-appear`,nK=`${Gg}-listener`,rK="os-trinsic-observer",iK="os-no-css-vars",oK="os-theme-none",en="os-scrollbar",sK=`${en}-rtl`,lK=`${en}-horizontal`,aK=`${en}-vertical`,z_=`${en}-track`,Kg=`${en}-handle`,uK=`${en}-visible`,cK=`${en}-cornerless`,Hw=`${en}-transitionless`,Ww=`${en}-interaction`,Gw=`${en}-unusable`,Ep=`${en}-auto-hide`,Kw=`${Ep}-hidden`,qw=`${en}-wheel`,fK=`${z_}-interactive`,dK=`${Kg}-interactive`,V_={},B_={},hK=e=>{Oe(e,t=>Oe(t,(n,r)=>{V_[r]=t[r]}))},U_=(e,t,n)=>Tr(e).map(r=>{const{static:i,instance:o}=e[r],[s,l,a]=n||[],u=n?o:i;if(u){const c=n?u(s,l,t):u(t);return(a||B_)[r]=c}}),gs=e=>B_[e],pK="__osOptionsValidationPlugin",mK="__osSizeObserverPlugin",qg="__osScrollbarsHidingPlugin",gK="__osClickScrollPlugin";let Nd;const Qw=(e,t,n,r)=>{Sn(e,t);const i=nu(t),o=sl(t),s=hc(n);return r&&kr(t),{x:o.h-i.h+s.h,y:o.w-i.w+s.w}},yK=e=>{let t=!1;const n=ci(e,F_);try{t=Pt(e,NG("scrollbar-width"))==="none"||Zt.getComputedStyle(e,"::-webkit-scrollbar").getPropertyValue("display")==="none"}catch{}return n(),t},vK=(e,t)=>{Pt(e,{[Fs]:ts,[Rs]:ts,direction:"rtl"}),fi(e,{x:0});const n=$d(e),r=$d(t);fi(e,{x:-999});const i=$d(t);return{i:n.x===r.x,n:r.x!==i.x}},wK=(e,t)=>{const n=ci(e,$_),r=Zn(e),i=Zn(t),o=$w(i,r,!0),s=ci(e,ZG),l=Zn(e),a=Zn(t),u=$w(a,l,!0);return n(),s(),o&&u},xK=()=>{const{body:e}=document,n=x_(`
`)[0],r=n.firstChild,[i,,o]=Cp(),[s,l]=jn({o:Qw(e,n,r),u:A_},ge(Qw,e,n,r,!0)),[a]=l(),u=yK(n),c={x:a.x===0,y:a.y===0},f={elements:{host:null,padding:!u,viewport:x=>u&&x===x.ownerDocument.body&&x,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},d=Pe({},XG),h=ge(Pe,{},d),p=ge(Pe,{},f),v={P:a,I:c,H:u,A:Pt(n,"zIndex")==="-1",L:!!bp,V:vK(n,r),U:wK(n,r),B:ge(i,"r"),j:p,N:x=>Pe(f,x)&&p(),G:h,q:x=>Pe(d,x)&&h(),F:Pe({},f),W:Pe({},d)};return Ht(n,"style"),kr(n),Zt.addEventListener("resize",()=>{let x;if(!u&&(!c.x||!c.y)){const g=gs(qg);x=!!(g?g.R():En)(v,s)}o("r",[x])}),v},Jt=()=>(Nd||(Nd=xK()),Nd),Qg=(e,t)=>ir(t)?t.apply(0,e):t,kK=(e,t,n,r)=>{const i=vi(r)?n:r;return Qg(e,i)||t.apply(0,e)},H_=(e,t,n,r)=>{const i=vi(r)?n:r,o=Qg(e,i);return!!o&&(rl(o)?o:t.apply(0,e))},bK=(e,t)=>{const{nativeScrollbarsOverlaid:n,body:r}=t||{},{I:i,H:o,j:s}=Jt(),{nativeScrollbarsOverlaid:l,body:a}=s().cancel,u=n??l,c=vi(r)?a:r,f=(i.x||i.y)&&u,d=e&&(sf(c)?!o:c);return!!f||!!d},Xg=new WeakMap,SK=(e,t)=>{Xg.set(e,t)},CK=e=>{Xg.delete(e)},W_=e=>Xg.get(e),_K=(e,t,n)=>{let r=!1;const i=n?new WeakMap:!1,o=()=>{r=!0},s=l=>{if(i&&n){const a=n.map(u=>{const[c,f]=u||[];return[f&&c?(l||w_)(c,e):[],f]});Oe(a,u=>Oe(u[0],c=>{const f=u[1],d=i.get(c)||[];if(e.contains(c)&&f){const p=Xe(c,f.trim(),v=>{r?(p(),i.delete(c)):t(v)});i.set(c,Le(d,p))}else Ln(d),i.delete(c)}))}};return s(),[o,s]},Xw=(e,t,n,r)=>{let i=!1;const{X:o,Y:s,J:l,K:a,Z:u,tt:c}=r||{},f=S_(()=>i&&n(!0),{v:33,p:99}),[d,h]=_K(e,f,l),p=o||[],v=s||[],x=Kr(p,v),g=(y,b)=>{if(!oc(b)){const T=u||En,_=c||En,L=[],M=[];let F=!1,C=!1;if(Oe(b,I=>{const{attributeName:O,target:j,type:N,oldValue:V,addedNodes:Z,removedNodes:ee}=I,z=N==="attributes",K=N==="childList",k=e===j,B=z&&O,U=B?Ft(j,O||""):null,w=B&&V!==U,X=uf(v,O)&&w;if(t&&(K||!k)){const Y=z&&w,H=Y&&a&&sc(j,a),re=(H?!T(j,O,V,U):!z||Y)&&!_(I,!!H,e,r);Oe(Z,ie=>Le(L,ie)),Oe(ee,ie=>Le(L,ie)),C=C||re}!t&&k&&w&&!T(j,O,V,U)&&(Le(M,O),F=F||X)}),h(I=>Lw(L).reduce((O,j)=>(Le(O,w_(I,j)),sc(j,I)?Le(O,j):O),[])),t)return!y&&C&&n(!1),[!1];if(!oc(M)||F){const I=[Lw(M),F];return!y&&n.apply(0,I),I}}},m=new jG(ge(g,!1));return[()=>(m.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:x,subtree:t,childList:t,characterData:t}),i=!0,()=>{i&&(d(),m.disconnect(),i=!1)}),()=>{if(i)return f.m(),g(!0,m.takeRecords())}]},G_=(e,t,n)=>{const{nt:i,ot:o}=n||{},s=gs(mK),{V:l}=Jt(),a=ge(Fl,e),[u]=jn({o:!1,_:!0});return()=>{const c=[],d=x_(`
`)[0],h=d.firstChild,p=v=>{const x=v instanceof ResizeObserverEntry,g=!x&&An(v);let m=!1,y=!1,b=!0;if(x){const[T,,_]=u(v.contentRect),L=Sp(T),M=T_(T,_);y=!_||M,m=!y&&!L,b=!m}else g?[,b]=v:y=v===!0;if(i&&b){const T=g?v[0]:Fl(d);fi(d,{x:O_(3333333,3333333,T&&l),y:3333333})}m||t({st:g?v:void 0,et:!g,ot:y})};if(ac){const v=new ac(x=>p(x.pop()));v.observe(h),Le(c,()=>{v.disconnect()})}else if(s){const[v,x]=s(h,p,o);Le(c,Kr([ci(d,tK),Xe(d,"animationstart",v)],x))}else return En;if(i){const[v]=jn({o:void 0},a);Le(c,Xe(d,"scroll",x=>{const g=v(),[m,y,b]=g;y&&(Ug(h,"ltr rtl"),ci(h,m?"rtl":"ltr"),p([!!m,y,b])),M_(x)}))}return ge(Ln,Le(c,Sn(e,d)))}},EK=(e,t)=>{let n;const r=a=>a.h===0||a.isIntersecting||a.intersectionRatio>0,i=zi(rK),[o]=jn({o:!1}),s=(a,u)=>{if(a){const c=o(r(a)),[,f]=c;return f&&!u&&t(c)&&[c]}},l=(a,u)=>s(u.pop(),a);return[()=>{const a=[];if(Ow)n=new Ow(ge(l,!1),{root:e}),n.observe(i),Le(a,()=>{n.disconnect()});else{const u=()=>{const c=sl(i);s(c)};Le(a,G_(i,u)()),u()}return ge(Ln,Le(a,Sn(e,i)))},()=>n&&l(!0,n.takeRecords())]},TK=(e,t)=>{let n,r,i,o,s;const{H:l}=Jt(),a=`[${zn}]`,u=`[${zr}]`,c=["tabindex"],f=["wrap","cols","rows"],d=["id","class","style","open"],h={ct:!1,rt:Fl(e.lt)},{lt:p,it:v,ut:x,ft:g,_t:m,dt:y,vt:b}=e,{U:T,B:_}=Jt(),[L]=jn({u:P_,o:{w:0,h:0}},()=>{const B=y(Vo,zo),U=y(Rd,""),w=U&&ns(v);b(Vo,zo),b(Rd,""),b("",pc,!0);const X=dc(x),Y=dc(v),H=hc(v);return b(Vo,zo,B),b(Rd,"",U),b("",pc),fi(v,w),{w:Y.w+X.w+H.w,h:Y.h+X.h+H.h}}),M=g?f:Kr(d,f),F=S_(t,{v:()=>n,p:()=>r,g(B,U){const[w]=B,[X]=U;return[Kr(Tr(w),Tr(X)).reduce((Y,H)=>(Y[H]=w[H]||X[H],Y),{})]}}),C=B=>{Oe(B||c,U=>{if(uf(c,U)){const w=Ft(p,U);ta(w)?Ft(v,U,w):Ht(v,U)}})},I=(B,U)=>{const[w,X]=B,Y={ht:X};return Pe(h,{ct:w}),!U&&t(Y),Y},O=({et:B,st:U,ot:w})=>{const Y=!(B&&!w&&!U)&&l?F:t,[H,Q]=U||[];U&&Pe(h,{rt:H}),Y({et:B||w,ot:w,gt:Q})},j=(B,U)=>{const[,w]=L(),X={bt:w};return w&&!U&&(B?t:F)(X),X},N=(B,U,w)=>{const X={wt:U};return U&&!w?F(X):m||C(B),X},[V,Z]=x||!T?EK(p,I):[],ee=!m&&G_(p,O,{ot:!0,nt:!0}),[z,K]=Xw(p,!1,N,{Y:d,X:Kr(d,c)}),k=m&&ac&&new ac(B=>{const U=B[B.length-1].contentRect;O({et:!0,ot:T_(U,s)}),s=U});return[()=>{C(),k&&k.observe(p);const B=ee&&ee(),U=V&&V(),w=z(),X=_(Y=>{const[,H]=L();F({yt:Y,bt:H})});return()=>{k&&k.disconnect(),B&&B(),U&&U(),o&&o(),w(),X()}},({St:B,$t:U,xt:w})=>{const X={},[Y]=B("update.ignoreMutation"),[H,Q]=B("update.attributes"),[re,ie]=B("update.elementEvents"),[oe,ue]=B("update.debounce"),ye=ie||Q,pe=U||w,xe=fe=>ir(Y)&&Y(fe);if(ye){i&&i(),o&&o();const[fe,ke]=Xw(x||v,!0,j,{X:Kr(M,H||[]),J:re,K:a,tt:(Ce,Ue)=>{const{target:Je,attributeName:P}=Ce;return(!Ue&&P&&!m?OG(Je,a,u):!1)||!!Oo(Je,`.${en}`)||!!xe(Ce)}});o=fe(),i=ke}if(ue)if(F.m(),An(oe)){const fe=oe[0],ke=oe[1];n=rr(fe)&&fe,r=rr(ke)&&ke}else rr(oe)?(n=oe,r=!1):(n=!1,r=!1);if(pe){const fe=K(),ke=Z&&Z(),Ce=i&&i();fe&&Pe(X,N(fe[0],fe[1],pe)),ke&&Pe(X,I(ke[0],pe)),Ce&&Pe(X,j(Ce[0],pe))}return X},h]},Tp=(e,t,n)=>il(e,IG(t,n)),PK=(e,t,n)=>{const r=$l(t),[i,o]=QG(r,n),s=(o-e)/o,l=e/i,a=e/o,u=n?n.n?s:n.i?l:a:a;return Tp(0,1,u)},K_=(e,t,n)=>{if(n){const a=t?Pr:Ar,{Ot:u,Ct:c}=n,f=Zn(c)[a],d=Zn(u)[a];return Tp(0,1,f/d)}const r=t?"x":"y",{Ht:i,zt:o}=e,s=o[r],l=i[r];return Tp(0,1,s/(s+l))},Yw=(e,t,n,r)=>{const i=K_(e,r,t);return 1/i*(1-i)*n},AK=(e,t,n,r)=>{const{j:i,A:o}=Jt(),{scrollbars:s}=i(),{slot:l}=s,{It:a,lt:u,it:c,At:f,Et:d,Tt:h,_t:p}=t,{scrollbars:v}=f?{}:e,{slot:x}=v||{},g=new Map,m=H=>bp&&new bp({source:d,axis:H}),y=m("x"),b=m("y"),T=H_([a,u,c],()=>p&&h?a:u,l,x),_=H=>p&&!h&&xr(H)===c,L=H=>{g.forEach((Q,re)=>{(H?uf(An(H)?H:[H],re):!0)&&((Q||[]).forEach(oe=>{oe&&oe.cancel()}),g.delete(re))})},M=(H,Q,re)=>{const ie=re?ci:Ug;Oe(H,oe=>{ie(oe.Dt,Q)})},F=(H,Q)=>{Oe(H,re=>{const[ie,oe]=Q(re);Pt(ie,oe)})},C=(H,Q,re,ie)=>Q&&H.animate(re,{timeline:Q,composite:ie}),I=(H,Q)=>{F(H,re=>{const{Ct:ie}=re;return[ie,{[Q?Pr:Ar]:Ia(K_(n,Q))}]})},O=(H,Q)=>{y&&b?H.forEach(re=>{const{Dt:ie,Ct:oe}=re,ue=ge(Yw,n,re),ye=Q&&Fl(ie),pe=ue(ye?1:0,Q),xe=ue(ye?0:1,Q);L(oe),g.set(oe,[C(oe,Q?y:b,Pe({transform:[ao(Ia(pe),Q),ao(Ia(xe),Q)]},ye?{clear:["left"]}:{}))])}):F(H,re=>{const{Ct:ie,Dt:oe}=re,{V:ue}=Jt(),ye=Q?"x":"y",{Ht:pe}=n,xe=Fl(oe),fe=Yw(n,re,PK(ns(d)[ye],pe[ye],Q&&xe&&ue),Q);return[ie,{transform:ao(Ia(fe),Q)}]})},j=H=>{const{Dt:Q}=H,re=_(Q)&&Q,{x:ie,y:oe}=ns(d);return[re,{transform:re?ao({x:$a(ie),y:$a(oe)}):""}]},N=(H,Q,re,ie)=>C(H,Q,{transform:[ao($a(0),ie),ao($a(il(0,re-.5)),ie)]},"add"),V=[],Z=[],ee=[],z=(H,Q,re)=>{const ie=g_(re),oe=ie?re:!0,ue=ie?!re:!0;oe&&M(Z,H,Q),ue&&M(ee,H,Q)},K=()=>{I(Z,!0),I(ee)},k=()=>{O(Z,!0),O(ee)},B=()=>{if(p)if(b&&b){const{Ht:H}=n;Kr(ee,Z).forEach(({Dt:Q})=>{L(Q),_(Q)&&g.set(Q,[N(Q,y,H.x,!0),N(Q,b,H.y)])})}else F(Z,j),F(ee,j)},U=H=>{const Q=H?lK:aK,re=H?Z:ee,ie=oc(re)?Hw:"",oe=zi(`${en} ${Q} ${ie}`),ue=zi(z_),ye=zi(Kg),pe={Dt:oe,Ot:ue,Ct:ye};return o||ci(oe,iK),Le(re,pe),Le(V,[Sn(oe,ue),Sn(ue,ye),ge(kr,oe),L,r(pe,z,O,H)]),pe},w=ge(U,!0),X=ge(U,!1),Y=()=>(Sn(T,Z[0].Dt),Sn(T,ee[0].Dt),lc(()=>{z(Hw)},300),ge(Ln,V));return w(),X(),[{kt:K,Mt:k,Rt:B,Pt:z,Lt:{L:y,Vt:Z,Ut:w,Bt:ge(F,Z)},jt:{L:b,Vt:ee,Ut:X,Bt:ge(F,ee)}},Y]},LK=(e,t,n)=>{const{lt:r,Et:i,Nt:o}=t;return(s,l,a,u)=>{const{Dt:c,Ot:f,Ct:d}=s,[h,p]=jr(333),[v,x]=jr(),g=ge(a,[s],u),m=!!i.scrollBy,y=`client${u?"X":"Y"}`,b=u?Pr:Ar,T=u?"left":"top",_=u?"w":"h",L=u?"x":"y",M=I=>I.propertyName.indexOf(b)>-1,F=()=>{const I="pointerup pointerleave pointercancel lostpointercapture",O=(j,N)=>V=>{const{Ht:Z}=n,ee=sl(f)[_]-sl(d)[_],K=N*V/ee*Z[L];fi(i,{[L]:j+K})};return Xe(f,"pointerdown",j=>{const N=Oo(j.target,`.${Kg}`)===d,V=N?d:f,Z=e.scrollbars,{button:ee,isPrimary:z,pointerType:K}=j,{pointers:k}=Z,B=ee===0&&z&&Z[N?"dragScroll":"clickScroll"]&&(k||[]).includes(K);if(ji(r,zn,Bw,!0),B){const U=!N&&j.shiftKey,w=ge(Zn,d),X=ge(Zn,f),Y=(Ce,Ue)=>(Ce||w())[T]-(Ue||X())[T],H=$l(Zn(i)[b])/sl(i)[_]||1,Q=O(ns(i)[L]||0,1/H),re=j[y],ie=w(),oe=X(),ue=ie[b],ye=Y(ie,oe)+ue/2,pe=re-oe[T],xe=N?0:pe-ye,fe=Ce=>{Ln(ke),V.releasePointerCapture(Ce.pointerId)},ke=[ge(ji,r,zn,Bw),Xe(o,I,fe),Xe(o,"selectstart",Ce=>Nw(Ce),{S:!1}),Xe(f,I,fe),Xe(f,"pointermove",Ce=>{const Ue=Ce[y]-re;(N||U)&&Q(xe+Ue)})];if(U)Q(xe);else if(!N){const Ce=gs(gK);Ce&&Le(ke,Ce(Q,Y,xe,ue,pe))}V.setPointerCapture(j.pointerId)}})};let C=!0;return ge(Ln,[Xe(c,"pointerenter",()=>{l(Ww,!0)}),Xe(c,"pointerleave pointercancel",()=>{l(Ww,!1)}),Xe(c,"wheel",I=>{const{deltaX:O,deltaY:j,deltaMode:N}=I;m&&C&&N===0&&xr(c)===r&&i.scrollBy({left:O,top:j,behavior:"smooth"}),C=!1,l(qw,!0),h(()=>{C=!0,l(qw)}),Nw(I)},{S:!1,$:!0}),Xe(d,"transitionstart",I=>{if(M(I)){const O=()=>{g(),v(O)};O()}}),Xe(d,"transitionend transitioncancel",I=>{M(I)&&(x(),g())}),Xe(c,"mousedown",ge(Xe,o,"click",M_,{O:!0,$:!0}),{$:!0}),F(),p,x])}},MK=(e,t,n,r,i,o)=>{let s,l,a,u,c,f=En,d=0;const[h,p]=jr(),[v,x]=jr(),[g,m]=jr(100),[y,b]=jr(100),[T,_]=jr(100),[L,M]=jr(()=>d),[F,C]=AK(e,i,r,LK(t,i,r)),{lt:I,Gt:O,Tt:j}=i,{Pt:N,kt:V,Mt:Z,Rt:ee}=F,z=w=>{N(Ep,w,!0),N(Ep,w,!1)},K=(w,X)=>{if(M(),w)N(Kw);else{const Y=ge(N,Kw,!0);d>0&&!X?L(Y):Y()}},k=w=>w.pointerType==="mouse",B=w=>{k(w)&&(u=l,u&&K(!0))},U=[m,M,b,_,x,p,()=>f(),Xe(I,"pointerover",B,{O:!0}),Xe(I,"pointerenter",B),Xe(I,"pointerleave",w=>{k(w)&&(u=!1,l&&K(!1))}),Xe(I,"pointermove",w=>{k(w)&&s&&h(()=>{m(),K(!0),y(()=>{s&&K(!1)})})}),Xe(O,"scroll",w=>{v(()=>{Z(),a&&K(!0),g(()=>{a&&!u&&K(!1)})}),o(w),ee()})];return[()=>ge(Ln,Le(U,C())),({St:w,xt:X,qt:Y,Ft:H})=>{const{Wt:Q,Xt:re,Yt:ie}=H||{},{gt:oe,ot:ue}=Y||{},{rt:ye}=n,{I:pe}=Jt(),{Ht:xe,Jt:fe,Kt:ke}=r,[Ce,Ue]=w("showNativeOverlaidScrollbars"),[Je,P]=w("scrollbars.theme"),[$,R]=w("scrollbars.visibility"),[te,W]=w("scrollbars.autoHide"),[E,D]=w("scrollbars.autoHideSuspend"),[J]=w("scrollbars.autoHideDelay"),[se,me]=w("scrollbars.dragScroll"),[He,Vt]=w("scrollbars.clickScroll"),nt=ue&&!X,Bt=ke.x||ke.y,On=Q||re||oe||X,rt=ie||R,gn=Ce&&pe.x&&pe.y,vt=(yn,no)=>{const ia=$==="visible"||$==="auto"&&yn==="scroll";return N(uK,ia,no),ia};if(d=J,nt&&(E&&Bt?(z(!1),f(),T(()=>{f=Xe(O,"scroll",ge(z,!0),{O:!0})})):z(!0)),Ue&&N(oK,gn),P&&(N(c),N(Je,!0),c=Je),D&&!E&&z(!0),W&&(s=te==="move",l=te==="leave",a=te!=="never",K(!a,!0)),me&&N(dK,se),Vt&&N(fK,He),rt){const yn=vt(fe.x,!0),no=vt(fe.y,!1);N(cK,!(yn&&no))}On&&(V(),Z(),ee(),N(Gw,!xe.x,!0),N(Gw,!xe.y,!1),N(sK,ye&&!j))},{},F]},OK=e=>{const t=Jt(),{j:n,H:r}=t,i=gs(qg),o=i&&i.C,{elements:s}=n(),{host:l,padding:a,viewport:u,content:c}=s,f=rl(e),d=f?{}:e,{elements:h}=d,{host:p,padding:v,viewport:x,content:g}=h||{},m=f?e:d.target,y=sc(m,"textarea"),b=m.ownerDocument,T=b.documentElement,_=m===b.body,L=b.defaultView,M=ge(kK,[m]),F=ge(H_,[m]),C=ge(Qg,[m]),I=ge(zi,""),O=ge(M,I,u),j=ge(F,I,c),N=O(x),V=N===m,Z=V&&_,ee=!V&&j(g),z=!V&&rl(N)&&N===ee,K=z&&!!C(c),k=K?O():N,B=K?ee:j(),w=Z?T:z?k:N,X=y?M(I,l,p):m,Y=Z?w:X,H=z?B:ee,Q=b.activeElement,re=!V&&L.top===L&&Q===m,ie={It:m,lt:Y,it:w,Zt:!V&&F(I,a,v),ut:H,Qt:!V&&!r&&o&&o(t),Et:Z?T:w,Gt:Z?b:w,tn:L,Nt:b,ft:y,Tt:_,At:f,_t:V,nn:z,dt:(W,E)=>LG(w,V?zn:zr,V?E:W),vt:(W,E,D)=>ji(w,V?zn:zr,V?E:W,D)},oe=Tr(ie).reduce((W,E)=>{const D=ie[E];return Le(W,D&&rl(D)&&!xr(D)?D:!1)},[]),ue=W=>W?uf(oe,W):null,{It:ye,lt:pe,Zt:xe,it:fe,ut:ke,Qt:Ce}=ie,Ue=[()=>{Ht(pe,zn),Ht(pe,Fd),Ht(ye,Fd),_&&(Ht(T,zn),Ht(T,Fd))}],Je=y&&ue(pe);let P=y?ye:wp([ke,fe,xe,pe,ye].find(W=>ue(W)===!1));const $=Z?ye:ke||fe,R=ge(Ln,Ue);return[ie,()=>{Ft(pe,zn,V?"viewport":"host"),Ft(xe,_p,""),Ft(ke,Uw,""),V||Ft(fe,zr,"");const W=_&&!V?ci(xr(m),F_):En,E=D=>{Sn(xr(D),wp(D)),kr(D)};if(Je&&(Mw(ye,pe),Le(Ue,()=>{Mw(pe,ye),kr(pe)})),Sn($,P),Sn(pe,xe),Sn(xe||pe,!V&&fe),Sn(fe,ke),Le(Ue,()=>{W(),Ht(xe,_p),Ht(ke,Uw),Ht(fe,R_),Ht(fe,N_),Ht(fe,zr),ue(ke)&&E(ke),ue(fe)&&E(fe),ue(xe)&&E(xe)}),r&&!V&&(ji(fe,zr,j_,!0),Le(Ue,ge(Ht,fe,zr))),Ce&&(DG(fe,Ce),Le(Ue,ge(kr,Ce))),re){const D="tabindex",J=Ft(fe,D);Ft(fe,D,"-1"),fe.focus();const se=()=>J?Ft(fe,D,J):Ht(fe,D),me=Xe(b,"pointerdown keydown",()=>{se(),me()});Le(Ue,[se,me])}else Q&&Q.focus&&Q.focus();return P=0,R},R]},DK=({ut:e})=>({qt:t,sn:n,xt:r})=>{const{U:i}=Jt(),{ht:o}=t||{},{ct:s}=n;(e||!i)&&(o||r)&&Pt(e,{[Ar]:s?"":"100%"})},IK=({lt:e,Zt:t,it:n,_t:r},i)=>{const[o,s]=jn({u:GG,o:Iw()},ge(Iw,e,"padding",""));return({St:l,qt:a,sn:u,xt:c})=>{let[f,d]=s(c);const{H:h,U:p}=Jt(),{et:v,bt:x,gt:g}=a||{},{rt:m}=u,[y,b]=l("paddingAbsolute");(v||d||(c||!p&&x))&&([f,d]=o(c));const _=!r&&(b||g||d);if(_){const L=!y||!t&&!h,M=f.r+f.l,F=f.t+f.b,C={[fc]:L&&!m?-M:0,[ol]:L?-F:0,[cc]:L&&m?-M:0,top:L?-f.t:0,right:L?m?-f.r:"auto":0,left:L?m?"auto":-f.l:0,[Pr]:L?`calc(100% + ${M}px)`:""},I={[E_]:L?f.t:0,[Hg]:L?f.r:0,[uc]:L?f.b:0,[Wg]:L?f.l:0};Pt(t||n,C),Pt(n,I),Pe(i,{Zt:f,en:!L,D:t?I:Pe({},C,I)})}return{cn:_}}},$K=({lt:e,Zt:t,it:n,Qt:r,_t:i,vt:o,Tt:s,tn:l},a)=>{const u=ge(il,0),c="visible",f=42,d={u:P_,o:{w:0,h:0}},h={u:A_,o:{x:ts,y:ts}},p=(U,w)=>{const X=Zt.devicePixelRatio%1!==0?1:0,Y={w:u(U.w-w.w),h:u(U.h-w.h)};return{w:Y.w>X?Y.w:0,h:Y.h>X?Y.h:0}},v=U=>U.indexOf(c)===0,{P:x,U:g,H:m,I:y}=Jt(),b=gs(qg),T=!i&&!m&&(y.x||y.y),_=s&&i,[L,M]=jn(d,ge(hc,n)),[F,C]=jn(d,ge(dc,n)),[I,O]=jn(d),[j,N]=jn(d),[V]=jn(h),Z=(U,w)=>{if(Pt(n,{[Ar]:""}),w){const{en:X,Zt:Y}=a,{rn:H,k:Q}=U,re=hc(e),ie=nu(e),oe=Pt(n,"boxSizing")==="content-box",ue=X||oe?Y.b+Y.t:0,ye=!(y.x&&oe);Pt(n,{[Ar]:ie.h+re.h+(H.x&&ye?Q.x:0)-ue})}},ee=(U,w)=>{const X=!m&&!U?f:0,Y=(xe,fe,ke)=>{const Ce=Pt(n,xe),Je=(w?w[xe]:Ce)==="scroll";return[Ce,Je,Je&&!m?fe?X:ke:0,fe&&!!X]},[H,Q,re,ie]=Y(Fs,y.x,x.x),[oe,ue,ye,pe]=Y(Rs,y.y,x.y);return{Jt:{x:H,y:oe},rn:{x:Q,y:ue},k:{x:re,y:ye},M:{x:ie,y:pe}}},z=(U,w,X,Y)=>{const H=(ue,ye)=>{const pe=v(ue),xe=ye&&pe&&ue.replace(`${c}-`,"")||"";return[ye&&!pe?ue:"",v(xe)?"hidden":xe]},[Q,re]=H(X.x,w.x),[ie,oe]=H(X.y,w.y);return Y[Fs]=re&&ie?re:Q,Y[Rs]=oe&&Q?oe:ie,ee(U,Y)},K=(U,w,X,Y)=>{const{k:H,M:Q}=U,{x:re,y:ie}=Q,{x:oe,y:ue}=H,{D:ye}=a,pe=w?cc:fc,xe=w?Wg:Hg,fe=ye[pe],ke=ye[ol],Ce=ye[xe],Ue=ye[uc];Y[Pr]=`calc(100% + ${ue+fe*-1}px)`,Y[pe]=-ue+fe,Y[ol]=-oe+ke,X&&(Y[xe]=Ce+(ie?ue:0),Y[uc]=Ue+(re?oe:0))},[k,B]=b?b.T(T,g,n,r,a,ee,K):[()=>T,()=>[En]];return({St:U,qt:w,sn:X,xt:Y},{cn:H})=>{const{et:Q,wt:re,bt:ie,ht:oe,gt:ue,yt:ye}=w||{},{ct:pe,rt:xe}=X,[fe,ke]=U("showNativeOverlaidScrollbars"),[Ce,Ue]=U("overflow"),Je=fe&&y.x&&y.y,P=!i&&!g&&(Q||ie||re||ke||oe),$=Q||H||ie||ue||ye||ke,R=v(Ce.x),te=v(Ce.y),W=R||te;let E=M(Y),D=C(Y),J=O(Y),se=N(Y),me;if(ke&&m&&o(j_,JG,!Je),P&&(me=ee(Je),Z(me,pe)),$){W&&o(Vo,zo,!1);const[wi,ro]=B(Je,xe,me),[xi,v5]=E=L(Y),[io,w5]=D=F(Y),gf=nu(n);let yf=io,vf=gf;wi(),(w5||v5||ke)&&ro&&!Je&&k(ro,io,xi,xe)&&(vf=nu(n),yf=dc(n));const r0=WG(l),x5={w:u(il(io.w,yf.w)+xi.w),h:u(il(io.h,yf.h)+xi.h)},i0={w:u((_?r0.w:vf.w+u(gf.w-io.w))+xi.w),h:u((_?r0.h:vf.h+u(gf.h-io.h))+xi.h)};se=j(i0),J=I(p(x5,i0),Y)}const[He,Vt]=se,[nt,Bt]=J,[On,rt]=D,[gn,vt]=E,yn={x:nt.w>0,y:nt.h>0},no=R&&te&&(yn.x||yn.y)||R&&yn.x&&!yn.y||te&&yn.y&&!yn.x;if(H||ue||ye||vt||rt||Vt||Bt||Ue||ke||P||$){const wi={[fc]:0,[ol]:0,[cc]:0,[Pr]:"",[Fs]:"",[Rs]:""},ro=z(Je,yn,Ce,wi),xi=k(ro,On,gn,xe);i||K(ro,xe,xi,wi),P&&Z(ro,pe),i?(Ft(e,R_,wi[Fs]),Ft(e,N_,wi[Rs])):Pt(n,wi)}ji(e,zn,zo,no),ji(t,_p,eK,no),i||ji(n,zr,Vo,W);const[g5,y5]=V(ee(Je).Jt);return Pe(a,{Jt:g5,zt:{x:He.w,y:He.h},Ht:{x:nt.w,y:nt.h},Kt:yn}),{Yt:y5,Wt:Vt,Xt:Bt}}},FK=e=>{const[t,n,r]=OK(e),i={Zt:{t:0,r:0,b:0,l:0},en:!1,D:{[fc]:0,[ol]:0,[cc]:0,[E_]:0,[Hg]:0,[uc]:0,[Wg]:0},zt:{x:0,y:0},Ht:{x:0,y:0},Jt:{x:ts,y:ts},Kt:{x:!1,y:!1}},{It:o,it:s,vt:l,_t:a}=t,{H:u,I:c,U:f}=Jt(),d=!u&&(c.x||c.y),h=[DK(t),IK(t,i),$K(t,i)];return[n,p=>{const v={},g=(d||!f)&&ns(s);return l("",pc,!0),Oe(h,m=>{Pe(v,m(p,v)||{})}),l("",pc),fi(s,g),!a&&fi(o,0),v},i,t,r]},RK=(e,t,n,r)=>{const[i,o,s,l,a]=FK(e),[u,c,f]=TK(l,g=>{x({},g)}),[d,h,,p]=MK(e,t,f,s,l,r),v=g=>Tr(g).some(m=>!!g[m]),x=(g,m)=>{const{ln:y,xt:b,$t:T,an:_}=g,L=y||{},M=!!b,F={St:YG(t,L,M),ln:L,xt:M};if(_)return h(F),!1;const C=m||c(Pe({},F,{$t:T})),I=o(Pe({},F,{sn:f,qt:C}));h(Pe({},F,{qt:C,Ft:I}));const O=v(C),j=v(I),N=O||j||!Vg(L)||M;return N&&n(g,{qt:C,Ft:I}),N};return[()=>{const{It:g,it:m,Nt:y,Tt:b}=l,T=b?y.documentElement:g,_=ns(T),L=[u(),i(),d()];return fi(m,_),ge(Ln,L)},x,()=>({un:f,fn:s}),{_n:l,dn:p},a]},yr=(e,t,n)=>{const{G:r}=Jt(),i=rl(e),o=i?e:e.target,s=W_(o);if(t&&!s){let l=!1;const a=[],u={},c=C=>{const I=y_(C,!0),O=gs(pK);return O?O(I,!0):I},f=Pe({},r(),c(t)),[d,h,p]=Cp(),[v,x,g]=Cp(n),m=(C,I)=>{g(C,I),p(C,I)},[y,b,T,_,L]=RK(e,f,({ln:C,xt:I},{qt:O,Ft:j})=>{const{et:N,gt:V,ht:Z,bt:ee,wt:z,ot:K}=O,{Wt:k,Xt:B,Yt:U}=j;m("updated",[F,{updateHints:{sizeChanged:!!N,directionChanged:!!V,heightIntrinsicChanged:!!Z,overflowEdgeChanged:!!k,overflowAmountChanged:!!B,overflowStyleChanged:!!U,contentMutation:!!ee,hostMutation:!!z,appear:!!K},changedOptions:C||{},force:!!I}])},C=>m("scroll",[F,C])),M=C=>{CK(o),Ln(a),l=!0,m("destroyed",[F,C]),h(),x()},F={options(C,I){if(C){const O=I?r():{},j=D_(f,Pe(O,c(C)));Vg(j)||(Pe(f,j),b({ln:j}))}return Pe({},f)},on:v,off:(C,I)=>{C&&I&&x(C,I)},state(){const{un:C,fn:I}=T(),{rt:O}=C,{zt:j,Ht:N,Jt:V,Kt:Z,Zt:ee,en:z}=I;return Pe({},{overflowEdge:j,overflowAmount:N,overflowStyle:V,hasOverflow:Z,padding:ee,paddingAbsolute:z,directionRTL:O,destroyed:l})},elements(){const{It:C,lt:I,Zt:O,it:j,ut:N,Et:V,Gt:Z}=_._n,{Lt:ee,jt:z}=_.dn,K=B=>{const{Ct:U,Ot:w,Dt:X}=B;return{scrollbar:X,track:w,handle:U}},k=B=>{const{Vt:U,Ut:w}=B,X=K(U[0]);return Pe({},X,{clone:()=>{const Y=K(w());return b({an:!0}),Y}})};return Pe({},{target:C,host:I,padding:O||j,viewport:j,content:N||j,scrollOffsetElement:V,scrollEventElement:Z,scrollbarHorizontal:k(ee),scrollbarVertical:k(z)})},update:C=>b({xt:C,$t:!0}),destroy:ge(M,!1),plugin:C=>u[Tr(C)[0]]};return Le(a,[L]),SK(o,F),U_(V_,yr,[F,d,u]),bK(_._n.Tt,!i&&e.cancel)?(M(!0),F):(Le(a,y()),m("initialized",[F]),F.update(!0),F)}return s};yr.plugin=e=>{const t=An(e),n=t?e:[e],r=n.map(i=>U_(i,yr)[0]);return hK(n),t?r:r[0]};yr.valid=e=>{const t=e&&e.elements,n=ir(t)&&t();return ic(n)&&!!W_(n.target)};yr.env=()=>{const{P:e,I:t,H:n,V:r,U:i,A:o,L:s,F:l,W:a,j:u,N:c,G:f,q:d}=Jt();return Pe({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,rtlScrollBehavior:r,flexboxGlue:i,cssCustomProperties:o,scrollTimeline:s,staticDefaultInitialization:l,staticDefaultOptions:a,getDefaultInitialization:u,setDefaultInitialization:c,getDefaultOptions:f,setDefaultOptions:d})};const NK=()=>{if(typeof window>"u"){const u=()=>{};return[u,u]}let e,t;const n=window,r=typeof n.requestIdleCallback=="function",i=n.requestAnimationFrame,o=n.cancelAnimationFrame,s=r?n.requestIdleCallback:i,l=r?n.cancelIdleCallback:o,a=()=>{l(e),o(t)};return[(u,c)=>{a(),e=s(r?()=>{a(),t=i(u)}:u,typeof c=="object"?c:{timeout:2233})},a]},jK=e=>{const{options:t,events:n,defer:r}=e||{},[i,o]=A.useMemo(NK,[]),s=A.useRef(null),l=A.useRef(r),a=A.useRef(t),u=A.useRef(n);return A.useEffect(()=>{l.current=r},[r]),A.useEffect(()=>{const{current:c}=s;a.current=t,yr.valid(c)&&c.options(t||{},!0)},[t]),A.useEffect(()=>{const{current:c}=s;u.current=n,yr.valid(c)&&c.on(n||{},!0)},[n]),A.useEffect(()=>()=>{var c;o(),(c=s.current)==null||c.destroy()},[]),A.useMemo(()=>[c=>{const f=s.current;if(yr.valid(f))return;const d=l.current,h=a.current||{},p=u.current||{},v=()=>s.current=yr(c,h,p);d?i(v,d):v()},()=>s.current],[])},zK=(e,t)=>{const{element:n="div",options:r,events:i,defer:o,children:s,...l}=e,a=n,u=A.useRef(null),c=A.useRef(null),[f,d]=jK({options:r,events:i,defer:o});return A.useEffect(()=>{const{current:h}=u,{current:p}=c;return h&&p&&f({target:h,elements:{viewport:p,content:p}}),()=>{var v;return(v=d())==null?void 0:v.destroy()}},[f,n]),A.useImperativeHandle(t,()=>({osInstance:d,getElement:()=>u.current}),[]),_e.createElement(a,{"data-overlayscrollbars-initialize":"",ref:u,...l},_e.createElement("div",{"data-overlayscrollbars-contents":"",ref:c},s))},q_=A.forwardRef(zK);function VK(){const e=de(Or(t=>t.players.map(n=>n.id)));return S.jsx("div",{className:"relative flex-grow",children:S.jsx("div",{className:"absolute inset-0",children:S.jsx(q_,{element:"div",defer:!0,className:"h-full",options:{scrollbars:{theme:"os-theme-light",autoHide:"scroll",autoHideDelay:300}},children:S.jsx("div",{className:"space-y-3 py-3 pr-2",children:S.jsx(ug,{mode:"popLayout",children:e.map((t,n)=>S.jsx(EG,{playerId:t,isFirst:n===0,isLast:n===e.length-1},t))})})})})})}function BK(){return S.jsxs("div",{className:"flex flex-col border-r-2 border-r-slate-700",children:[S.jsx(HH,{}),S.jsx(VK,{})]})}const UK=qU?A.useLayoutEffect:A.useEffect;function jd(e){const t=A.useRef(e);return UK(()=>{t.current=e},[e]),t}function Q_({onStart:e,onChange:t,onEnd:n}){const r=jd(e),i=jd(t),o=jd(n);return A.useCallback(l=>{var f;window.addEventListener("mousemove",u),window.addEventListener("mouseup",c),(f=r.current)==null||f.call(r);let a=l.clientX;function u(d){const h=d.clientX,p=h-a;(p>2||p<-2)&&(i.current(d,p),a=h)}function c(){var d;window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",c),(d=o.current)==null||d.call(o)}},[r,i,o])}function HK(e,t){var n=A.useRef(null),r=A.useRef(null);r.current=t;var i=A.useRef(null);A.useEffect(function(){o()});var o=A.useCallback(function(){var s=i.current,l=r.current,a=s||(l?l instanceof Element?l:l.current:null);n.current&&n.current.element===a&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:a,subscriber:e,cleanup:a?e(a):void 0})},[e]);return A.useEffect(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),A.useCallback(function(s){i.current=s,o()},[o])}function Zw(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}function WK(e){e===void 0&&(e={});var t=e.onResize,n=A.useRef(void 0);n.current=t;var r=e.round||Math.round,i=A.useRef(),o=A.useState({width:void 0,height:void 0}),s=o[0],l=o[1],a=A.useRef(!1);A.useEffect(function(){return a.current=!1,function(){a.current=!0}},[]);var u=A.useRef({width:void 0,height:void 0}),c=HK(A.useCallback(function(f){return(!i.current||i.current.box!==e.box||i.current.round!==r)&&(i.current={box:e.box,round:r,instance:new ResizeObserver(function(d){var h=d[0],p=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",v=Zw(h,p,"inlineSize"),x=Zw(h,p,"blockSize"),g=v?r(v):void 0,m=x?r(x):void 0;if(u.current.width!==g||u.current.height!==m){var y={width:g,height:m};u.current.width=g,u.current.height=m,n.current?n.current(y):a.current||l(y)}})}),i.current.instance.observe(f,{box:e.box}),function(){i.current&&i.current.instance.unobserve(f)}},[e.box,r]),e.ref);return A.useMemo(function(){return{ref:c,width:s.width,height:s.height}},[c,s.width,s.height])}const X_=_e.createContext(null);function GK(e){const{panelRef:t,children:n}=e,{width:r}=WK({ref:t}),i=A.useMemo(()=>({panelRef:t,panelWidth:r}),[t,r]);return S.jsx(X_.Provider,{value:i,children:n})}function pf(){const e=A.useContext(X_);if(!e)throw new Error("useTimelineContext must be used within ");return e}function KK(e){const{playerId:t,abilityId:n,castIndex:r}=e,i=de(o=>{const s=Xn(o,t,n);return s?s.castTimes[r]:0});return S.jsx("span",{className:"text-xs p-1 bg-slate-950",children:Wr(i)})}function qK(e){const{playerId:t,abilityId:n,castIndex:r}=e,{panelWidth:i}=pf(),[o,s]=A.useState(!1),[l,a]=A.useState(!1),u=o||l,c=de(x=>x.updateCastTime),f=de(x=>x.duration),d=de(x=>{const g=Xn(x,t,n);if(g)return g.ability.icon}),h=cg(0,{bounce:0,stiffness:1e3,damping:50});A.useEffect(()=>{const x=Xn(de.getState(),t,n);if(!(!x||!i))return h.jump(i*x.castTimes[r]/f),de.subscribe((g,m)=>{const y=Xn(g,t,n),b=Xn(m,t,n);if(!y||!b||!i)return;const T=y.ability.cooldown!==b.ability.cooldown,_=i*y.castTimes[r]/f;T?h.jump(_):h.set(_)})},[n,r,f,h,t,i]);function p(x,g){const m=Xn(de.getState(),t,n);if(!i||!m)return;const y=x.altKey?.1:1,T=m.castTimes[r]+f*(g/i)*y;c({playerId:t,abilityId:n,castIndex:r,newCastTime:T,constrain:x.ctrlKey,replicateLeft:x.shiftKey})}const v=Q_({onStart:()=>s(!0),onChange:p,onEnd:()=>s(!1)});return S.jsxs(Yt.div,{className:"absolute top-0 left-0",onMouseDown:v,initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},style:{x:h},onHoverStart:()=>a(!0),onHoverEnd:()=>a(!1),children:[S.jsx(Yt.div,{initial:{opacity:0},animate:{opacity:u?1:0},className:"absolute bottom-[120%] left-1/2 -translate-x-1/2 pointer-events-none",children:S.jsx(KK,{playerId:t,abilityId:n,castIndex:r})}),S.jsx(Yo,{name:d||"",size:"small",className:"pointer-events-none aspect-[5/4] object-cover"})]})}function QK(e){const{playerId:t,abilityId:n}=e,r=de(Or(i=>{const o=i.players.find(l=>l.id===t);if(!o)return;const s=o.abilities.find(l=>l.id===n);if(s)return{icon:s.ability.icon,numCasts:s.castTimes.length}}));return r?S.jsxs(Yt.div,{layout:!0,className:"relative flex select-none",children:[S.jsx(Yo,{name:r.icon,className:"invisible aspect-[5/4]",size:"small"}),[...Array(r.numCasts)].map((i,o)=>S.jsx(qK,{playerId:t,abilityId:n,castIndex:o},o))]}):null}function XK(e){const{playerId:t}=e,n=de(h_(r=>{const i=r.players.find(o=>o.id===t);if(i)return{name:i.name,class:i.class,abilityData:i.abilities.map(o=>({id:o.id,isActive:o.isActive}))}}));return n?S.jsxs(Yt.div,{layout:!0,transition:{duration:.2},className:"py-0.5",style:{backgroundColor:gB(Ng.colors[n.class]).alpha(.1).string()},children:[S.jsx(Yt.div,{layout:!0,className:"px-2 text-xs font-medium",children:n.name}),S.jsx("div",{children:S.jsx(ug,{children:n.abilityData.filter(r=>r.isActive).map(r=>S.jsx(QK,{playerId:t,abilityId:r.id},r.id))})})]}):null}function YK(){const e=de(Or(n=>n.players.filter(r=>r.isActive).map(r=>r.id))),t=de(n=>n.overlays[0]);return S.jsxs("div",{className:"relative flex-grow",children:[!!t&&S.jsx("img",{src:t,alt:"",className:"absolute top-0 left-0 -z-10 h-full w-full opacity-20"}),S.jsx("div",{className:"absolute top-0 bottom-0 -left-4 -right-4",children:S.jsx(q_,{element:"div",defer:!0,className:"h-full w-full",options:{scrollbars:{theme:"os-theme-light",autoHide:"scroll",autoHideDelay:300},overflow:{x:"hidden"}},children:S.jsx("div",{className:"flex min-h-full flex-col justify-end px-4",children:S.jsx(mF,{children:e.map(n=>S.jsx(XK,{playerId:n},n))})})})})]})}function ZK(){const e=de(t=>t.duration);return S.jsx("div",{className:"-z-10",children:Qu(15,e).map((t,n)=>{const r=n%4===0,i=!r&&n%2===0;return S.jsx("div",{className:Xt("absolute top-0 bottom-0 w-px",{"bg-slate-600/50":r,"bg-slate-700/50":i,"bg-slate-800/75":!r&&!i}),style:{left:`${t/e*100}%`}},t)})})}function JK(){const e=de(s=>s.duration),t=Qu(60,e),[n,r]=A.useState(!1),{panelRef:i}=pf(),o=cg(0,{bounce:0,stiffness:8e3,damping:100,mass:1});return A.useEffect(()=>{if(!i.current)return;const s=i.current;function l(){r(!0)}function a(){r(!1)}function u(c){o.set(c.clientX-s.offsetLeft)}return s.addEventListener("mousemove",u),s.addEventListener("mouseenter",l),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mousemove",u),s.removeEventListener("mouseenter",l),s.removeEventListener("mouseleave",a)}},[i,o]),S.jsxs("div",{children:[S.jsx(Yt.div,{className:Xt("absolute top-0 left-0 -z-10 h-full w-0 border-l-[1px] border-dashed border-slate-700/75 transition-opacity duration-100",{"opacity-0 duration-500":!n}),style:{x:o}}),S.jsx("div",{className:"h-px bg-slate-500"}),S.jsxs("div",{className:"relative text-slate-500",children:[S.jsx("span",{className:"invisible",children:"sizer"}),t.map((s,l)=>S.jsx("span",{className:"absolute top-0 -translate-x-1/2 bg-slate-900",style:{left:`${s/e*100}%`},children:l},l))]})]})}function eq(){const e=de(Or(t=>t.overlays.slice(1)));return S.jsx("div",{className:"relative min-h-[222px]",children:e.filter(t=>!!t).map((t,n)=>S.jsx("img",{src:t,alt:"",className:"absolute top-0 left-0 -z-10 h-full w-full opacity-30"},n))})}function tq(){const e=de(i=>i.duration),[t,n]=A.useState("0:00"),{panelRef:r}=pf();return A.useEffect(()=>{if(!r.current)return;const i=r.current;function o(s){const l=e*(s.clientX-i.offsetLeft)/i.clientWidth;l<0||l>e?n("--:--"):n(Wr(l))}return i.addEventListener("mousemove",o),()=>{i.removeEventListener("mousemove",o)}},[r,e]),S.jsx(S.Fragment,{children:`${t}`})}function nq(){return S.jsx("div",{className:"mb-2 flex justify-center",children:S.jsx("div",{className:"text-sm text-slate-400",children:S.jsx(tq,{})})})}function rq(e){const{marker:t,disabled:n}=e,{panelWidth:r}=pf(),i=de(a=>a.duration),o=de(a=>a.updateMarker),s=cg(0,{bounce:0,stiffness:1e3,damping:50});A.useEffect(()=>{if(!r||!t)return;const a=r*(t.time>i?i:t.time)/i;return s.jump(a),de.subscribe(u=>{const c=u.markers.find(d=>d.id===t.id);if(!c)return;const f=r*c.time/i;s.get()!==f&&s.set(f)})},[i,t,r,s]);const l=Q_({onChange:(a,u)=>{if(!r||!t)return;const c=a.altKey?.1:1;o(t.id,{type:t.type,time:t.time+i*(u/r)*c})}});return S.jsxs("div",{className:Xt("group",{"opacity-50":n}),children:[S.jsx(Yt.div,{className:"absolute top-4 -left-2 z-10 p-1",onMouseDown:n?void 0:l,style:{x:s},children:S.jsx("div",{className:Xt("h-0 w-[9px] border-x-4 border-t-4 border-transparent border-t-yellow-500 opacity-100 transition-colors",{"group-hover:border-t-yellow-300":!n})})}),S.jsxs(Yt.div,{className:"absolute top-4 left-0 p-2 text-xs font-thin text-slate-400",style:{x:s},children:[(t==null?void 0:t.type)==="phase"&&S.jsx("div",{children:t.phase}),(t==null?void 0:t.type)==="event"&&S.jsxs(S.Fragment,{children:[S.jsx("div",{children:t.event}),S.jsx("div",{children:t.spell}),S.jsx("div",{children:t.counter})]})]}),S.jsx(Yt.div,{className:Xt("absolute top-6 left-0 bottom-0 w-px bg-yellow-500 opacity-60 transition-opacity",{"group-hover:opacity-80":!n}),style:{x:s}})]})}const iq=_e.memo(rq);function oq(){const e=de(Or(n=>n.markers)),t=de(n=>n.markersEnabled);return S.jsx("div",{children:e.map(n=>S.jsx(iq,{marker:n,disabled:!t},n.id))})}function sq(){const e=A.useRef(null);return S.jsx("div",{className:"grid select-none bg-slate-900 py-3 px-5",children:S.jsx("div",{ref:e,className:"relative z-0 flex flex-col",children:S.jsxs(GK,{panelRef:e,children:[S.jsx(nq,{}),S.jsx(ZK,{}),S.jsx(oq,{}),S.jsx(YK,{}),S.jsx(JK,{}),S.jsx(eq,{})]})})})}function or(e){const{text:t,className:n,startIcon:r,endIcon:i,htmlType:o,htmlForm:s,onClick:l,disabled:a}=e;return S.jsxs("button",{type:o,form:s,className:Xt(n,"flex items-center justify-center gap-2 border-2 border-slate-500 bg-slate-700 px-2 py-1 text-xs font-medium uppercase text-slate-200 transition-colors duration-100 hover:bg-slate-600 disabled:border-slate-700 disabled:bg-slate-800 disabled:text-slate-500"),onClick:l,disabled:a,children:[r&&S.jsx(Dh,{icon:r}),t,i&&S.jsx(Dh,{icon:i})]})}function lq(){const e=de(l=>l.duration),t=de(l=>l.setDuration),{register:n,handleSubmit:r,getValues:i,setValue:o}=ea({defaultValues:{duration:Wr(e)}});A.useEffect(()=>{e!==Number(i().duration)&&o("duration",Wr(e))},[e,i,o]);const s=A.useCallback(l=>{t(QU(l.duration))},[t]);return S.jsxs("form",{onSubmit:r(s),className:"flex flex-col gap-3 p-3",children:[S.jsx("h3",{className:"text-md font-bold",children:"Fight"}),S.jsxs("label",{className:"block space-y-1",children:[S.jsx("span",{className:"text-xs",children:"Duration"}),S.jsx("input",{...n("duration"),className:"w-full px-2 text-black"})]}),S.jsx(or,{htmlType:"submit",text:"update",className:"mt-3"})]})}function aq(e){const{src:t,onOverlay:n}=e,r=A.useRef(null);return A.useEffect(()=>{if(!r.current)return;const i=r.current;async function o(s){const{code:l,ctrlKey:a}=s;if(l==="KeyV"&&a)try{const c=await(await navigator.clipboard.read())[0].getType("image/png"),f=new FileReader;f.readAsDataURL(c),f.onload=function(){const d=f.result;n(d)}}catch(u){console.error(u)}l==="KeyC"&&a&&fetch(t).then(u=>u.blob()).then(u=>{const c=new ClipboardItem({[u.type]:u});navigator.clipboard.write([c])}),l==="Delete"&&n("")}return i.addEventListener("keydown",o),()=>i.removeEventListener("keydown",o)},[n,t]),S.jsxs("div",{ref:r,className:"relative grid aspect-video cursor-pointer place-content-center outline outline-2 outline-slate-600 transition-[outline-width,outline-color] duration-100 hover:outline-slate-500 focus:outline-4",tabIndex:0,children:[!!t&&S.jsx("img",{src:t,alt:"",className:"absolute top-0 left-0 h-full w-full"}),!t&&S.jsx("span",{className:"text-sm text-slate-500",children:"Click + Paste image here"})]})}function uq(){const e=de(n=>n.setOverlay),t=de(Or(n=>n.overlays));return S.jsxs("div",{className:"mt-auto space-y-3 p-3",children:[S.jsx("h3",{className:"text-md font-bold",children:"Overlays"}),S.jsx("div",{className:"space-y-3",children:t.map((n,r)=>S.jsxs(_e.Fragment,{children:[r===1&&S.jsx("div",{className:"border-b-2 border-slate-600"}),S.jsx(aq,{src:n,onOverlay:i=>e(r,i)})]},r))})]})}function cq(){const{register:e}=n_();return S.jsxs("label",{className:"flex gap-2 py-1 text-slate-300",children:[S.jsx("span",{children:"Phase:"}),S.jsx("input",{className:"flex-grow border-none bg-transparent outline-none",...e("phase")})]})}function fq(){const{register:e}=n_();return S.jsxs(S.Fragment,{children:[S.jsxs("label",{className:"flex gap-2 py-1 text-slate-300",children:[S.jsx("span",{children:"Event:"}),S.jsx("input",{className:"flex-grow border-none bg-transparent outline-none",...e("event")})]}),S.jsxs("label",{className:"flex gap-2 py-1 text-slate-300",children:[S.jsx("span",{children:"SpellId:"}),S.jsx("input",{className:"flex-grow border-none bg-transparent outline-none",...e("spell")})]}),S.jsxs("label",{className:"flex gap-2 py-1 text-slate-300",children:[S.jsx("span",{children:"Counter:"}),S.jsx("input",{className:"flex-grow border-none bg-transparent outline-none",...e("counter")})]})]})}function dq(e){const{markerId:t}=e,n=de(Or(a=>{const u=a.markers.find(c=>c.id===t);if(u)switch(u.type){case"phase":return{type:u.type,phase:u.phase};case"event":return{type:u.type,event:u.event,spell:u.spell,counter:u.counter}}})),r=de(a=>a.updateMarker),i=de(a=>a.removeMarker),o=ea({defaultValues:n}),{handleSubmit:s}=o,l=A.useCallback(a=>{let u;switch(a.type){case"phase":u={type:a.type,phase:a.phase};break;case"event":u={type:a.type,event:a.event,spell:a.spell,counter:a.counter};break}r(t,u)},[t,r]);return n?S.jsx(ZH,{...o,children:S.jsxs("form",{onSubmit:s(l),className:"grid grid-cols-[minmax(0px,1fr),auto] border-l-[5px] border-yellow-500 bg-slate-900/40 pl-2",children:[S.jsxs("div",{children:[n.type==="phase"&&S.jsx(cq,{}),n.type==="event"&&S.jsx(fq,{})]}),S.jsxs("div",{className:"flex flex-col gap-1",children:[S.jsx(gt,{className:"text-xs",icon:"close",htmlType:"button",onClick:()=>i(t)}),S.jsx(gt,{className:"text-xs",icon:"check",htmlType:"submit"})]})]})}):null}function Yg(e){const{checked:t,onChange:n,label:r,reverse:i}=e;return S.jsxs("label",{className:"group flex select-none items-center gap-2",children:[S.jsx("input",{className:"hidden",type:"checkbox",onChange:n,checked:t}),!!r&&i&&S.jsx("span",{className:"text-sm",children:r}),S.jsx("div",{className:Xt("flex w-7 justify-start border-2 border-slate-500 bg-slate-500 transition-colors duration-100",{"justify-end":t}),children:S.jsx(Yt.div,{layout:!0,transition:{duration:.15},className:"h-2 w-3 bg-slate-700 transition-colors duration-150 group-hover:bg-slate-600"})}),!!r&&!i&&S.jsx("span",{className:"text-sm",children:r})]})}function hq(){const e=de(i=>i.markersEnabled),t=de(i=>i.toggleMarkers),n=de(Or(i=>i.markers.map(o=>o.id))),r=de(i=>i.addMarker);return S.jsxs("div",{className:"space-y-3 p-3",children:[S.jsxs("h3",{className:"text-md font-bold flex justify-between",children:[S.jsx("span",{children:"Markers"}),S.jsx(Yg,{checked:e,onChange:()=>t(),label:""})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsx(or,{className:"w-full",onClick:()=>r("phase"),text:"Add phase marker"}),S.jsx(or,{className:"w-full",onClick:()=>r("event"),text:"Add event marker"})]}),S.jsx("div",{className:"space-y-2",children:n.map(i=>S.jsx(dq,{markerId:i},i))})]})}function pq(){return S.jsxs("div",{className:"flex flex-col divide-y-2 divide-slate-700",children:[S.jsx(lq,{}),S.jsx(hq,{}),S.jsx(uq,{})]})}function mq(){const[e,t]=A.useState(!1),n=de(l=>l.userNote),r=de(l=>l.setUserNote),{register:i,handleSubmit:o}=ea({defaultValues:{userNote:n}}),s=A.useCallback(l=>{r(l.userNote),t(!1)},[r]);return S.jsxs("div",{className:"flex w-[450px] flex-col gap-2 p-4",children:[S.jsx("div",{className:"-mx-2 -mt-2 flex items-center justify-end",children:e?S.jsx(gt,{icon:"check",htmlForm:"noteForm"},"done"):S.jsx(gt,{icon:"edit",onClick:()=>t(!0)},"edit")}),!e&&S.jsx("div",{className:"flex-grow overflow-auto break-words",children:S.jsx(Fb,{markdown:n})}),e&&S.jsx("form",{id:"noteForm",onSubmit:o(s),className:"flex flex-grow",children:S.jsx("textarea",{...i("userNote"),className:"w-full resize-none border-2 border-slate-600 bg-slate-800 px-3 py-2 text-sm outline-none"})})]})}const Y_="3.7.5",gq=Y_,yq=typeof atob=="function",vq=typeof btoa=="function",ys=typeof Buffer=="function",Jw=typeof TextDecoder=="function"?new TextDecoder:void 0,ex=typeof TextEncoder=="function"?new TextEncoder:void 0,wq="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ns=Array.prototype.slice.call(wq),Ra=(e=>{let t={};return e.forEach((n,r)=>t[n]=r),t})(Ns),xq=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,bt=String.fromCharCode.bind(String),tx=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),Z_=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),J_=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),e5=e=>{let t,n,r,i,o="";const s=e.length%3;for(let l=0;l255||(r=e.charCodeAt(l++))>255||(i=e.charCodeAt(l++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|i,o+=Ns[t>>18&63]+Ns[t>>12&63]+Ns[t>>6&63]+Ns[t&63]}return s?o.slice(0,s-3)+"===".substring(s):o},Zg=vq?e=>btoa(e):ys?e=>Buffer.from(e,"binary").toString("base64"):e5,Pp=ys?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let r=0,i=e.length;rt?Z_(Pp(e)):Pp(e),kq=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?bt(192|t>>>6)+bt(128|t&63):bt(224|t>>>12&15)+bt(128|t>>>6&63)+bt(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return bt(240|t>>>18&7)+bt(128|t>>>12&63)+bt(128|t>>>6&63)+bt(128|t&63)}},bq=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,t5=e=>e.replace(bq,kq),nx=ys?e=>Buffer.from(e,"utf8").toString("base64"):ex?e=>Pp(ex.encode(e)):e=>Zg(t5(e)),Bo=(e,t=!1)=>t?Z_(nx(e)):nx(e),rx=e=>Bo(e,!0),Sq=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Cq=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),n=t-65536;return bt((n>>>10)+55296)+bt((n&1023)+56320);case 3:return bt((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return bt((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},n5=e=>e.replace(Sq,Cq),r5=e=>{if(e=e.replace(/\s+/g,""),!xq.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,n="",r,i;for(let o=0;o>16&255):i===64?bt(t>>16&255,t>>8&255):bt(t>>16&255,t>>8&255,t&255);return n},Jg=yq?e=>atob(J_(e)):ys?e=>Buffer.from(e,"base64").toString("binary"):r5,i5=ys?e=>tx(Buffer.from(e,"base64")):e=>tx(Jg(e).split("").map(t=>t.charCodeAt(0))),o5=e=>i5(s5(e)),_q=ys?e=>Buffer.from(e,"base64").toString("utf8"):Jw?e=>Jw.decode(i5(e)):e=>n5(Jg(e)),s5=e=>J_(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),Ap=e=>_q(s5(e)),Eq=e=>{if(typeof e!="string")return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},l5=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),a5=function(){const e=(t,n)=>Object.defineProperty(String.prototype,t,l5(n));e("fromBase64",function(){return Ap(this)}),e("toBase64",function(t){return Bo(this,t)}),e("toBase64URI",function(){return Bo(this,!0)}),e("toBase64URL",function(){return Bo(this,!0)}),e("toUint8Array",function(){return o5(this)})},u5=function(){const e=(t,n)=>Object.defineProperty(Uint8Array.prototype,t,l5(n));e("toBase64",function(t){return ru(this,t)}),e("toBase64URI",function(){return ru(this,!0)}),e("toBase64URL",function(){return ru(this,!0)})},Tq=()=>{a5(),u5()},ra={version:Y_,VERSION:gq,atob:Jg,atobPolyfill:r5,btoa:Zg,btoaPolyfill:e5,fromBase64:Ap,toBase64:Bo,encode:Bo,encodeURI:rx,encodeURL:rx,utob:t5,btou:n5,decode:Ap,isValid:Eq,fromUint8Array:ru,toUint8Array:o5,extendString:a5,extendUint8Array:u5,extendBuiltins:Tq};function Pq(){const e=A.useRef(null),[t,n]=A.useState(!1),r=de(c=>c.exportState),[i,o]=A.useState(!1),[s,l]=A.useState(""),a=A.useCallback(c=>{const f=r(c);return ra.encode(JSON.stringify(f))},[r]),u=A.useCallback(c=>{const f=c.target.checked;o(f),l(a(f))},[a]);return A.useEffect(()=>{!t||!e.current||e.current.select()},[t,s]),S.jsxs(S.Fragment,{children:[S.jsx(or,{text:"Export string",onClick:()=>{n(!0),l(a(i))}}),S.jsxs(Kc,{isOpen:t,onCloseRequest:()=>n(!1),className:"relative h-2/3 w-full max-w-screen-lg space-y-2 border-2 border-slate-700 p-4",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx(Yg,{label:"Include overlays",checked:i,onChange:u,reverse:!0}),S.jsx(gt,{icon:"close",onClick:()=>n(!1),className:"text-md"})]}),S.jsx("textarea",{ref:e,className:"h-full resize-none bg-slate-900/60 px-3 py-2 text-sm outline-none",value:s,readOnly:!0})]})]})}function Aq(){const e=de(a=>a.importState),[t,n]=A.useState(!1),{register:r,handleSubmit:i,reset:o}=ea(),s=A.useCallback(a=>{e(JSON.parse(ra.decode(a.importString))),n(!1)},[e]),l=A.useCallback(()=>{n(!1),o()},[o]);return S.jsxs(S.Fragment,{children:[S.jsx(or,{text:"Import string",onClick:()=>n(!0)}),S.jsxs(Kc,{isOpen:t,className:"h-2/3 w-full max-w-screen-lg space-y-2 border-2 border-slate-700 p-4",onCloseRequest:l,children:[S.jsx("div",{className:"flex justify-end",children:S.jsx(gt,{icon:"close",onClick:()=>n(!1),className:"text-md"})}),S.jsxs("form",{className:"flex h-full flex-col gap-4",onSubmit:i(s),children:[S.jsx("textarea",{...r("importString"),className:"h-full resize-none bg-slate-900/60 px-3 py-2 text-sm outline-none"}),S.jsx(or,{text:"Import",htmlType:"submit",className:"self-end"})]})]})]})}function Lq(){const e=de(i=>i.importState),{isFileSystemSupported:t,setFileHandle:n}=Mc(),r=A.useCallback(async()=>{try{const i=await KE();n(i);const s=await(await i.getFile()).text();e(JSON.parse(ra.decode(s)))}catch{}},[e,n]);return t?S.jsx(or,{text:"Load",onClick:r}):null}function Mq(){const e=de(i=>i.exportState),{isFileSystemSupported:t,fileHandle:n}=Mc(),r=A.useCallback(async()=>{if(!n)return;const i=e(!0),o=ra.encode(JSON.stringify(i));try{await qE(n,o),alert("File Saved")}catch(s){console.error(s)}},[e,n]);return t?S.jsx(or,{text:"Save",onClick:r,disabled:!n}):null}function Oq(){const e=de(i=>i.exportState),{isFileSystemSupported:t,setFileHandle:n}=Mc(),r=A.useCallback(async()=>{const i=e(!0),o=ra.encode(JSON.stringify(i));try{const s=await QE(o);n(s),alert("File Saved")}catch(s){console.error(s)}},[e,n]);return t?S.jsx(or,{text:"Save as...",onClick:r}):null}function Dq(e,t,n,r){for(var i=-1,o=e==null?0:e.length;++io.isActive).map(o=>o.abilities.filter(s=>s.isActive).map(s=>s.castTimes.map(l=>({player:o,ability:s,castTime:l})))).flat(2).sort((o,s)=>o.castTime-s.castTime);if(n==="none")return ux(i,t).map(o=>{const s=lx(o.castEvents,c=>c.player.id),l=Object.values(s).map(c=>{const[f,...d]=c,h=f.player.class,p=f.player.name;return[uo(h,p),uo(h,f.ability.ability.shortName),...d.flatMap(v=>[`{spell:${v.ability.ability.spellId}}`,uo(h,v.ability.ability.shortName)]),`{spell:${f.ability.ability.spellId}}`].join(" ")}).join(" ");let a=Wr(o.castTime),u="";if(r.markersEnabled){const c=r.markers.findLast(f=>f.time<=o.castTime);u=c?","+Zv(c):"",a=Wr(o.castTime-((c==null?void 0:c.time)||0))}return`{time:${a}${u}} ${l} `}).join(` -`);if(n==="player"){const o=lx(i,s=>s.player.id);return Object.values(o).map(s=>{const l=s[0].player.class,a=s[0].player.name,u=ux(s,t);return[uo(l,a),...u.map(c=>{const[f,...d]=c.castEvents,h=[uo(l,f.ability.ability.shortName),...d.flatMap(x=>[`{spell:${x.ability.ability.spellId}}`,uo(l,x.ability.ability.shortName)]),`{spell:${f.ability.ability.spellId}}`].join(" ");let p=Wr(c.castTime),v="";if(r.markersEnabled){const x=r.markers.findLast(g=>g.time<=c.castTime);v=x?","+Zv(x):"",p=Wr(c.castTime-((x==null?void 0:x.time)||0))}return`{time:${p}${v}} ${h} `})].join(` -`)}).join(` - -`)}return""}function ux(e,t){const n=[];return e.length&&(n.push({castTime:e[0].castTime,castEvents:[]}),e.forEach(r=>{const i=n[n.length-1];r.castTime-i.castTime<=t?i.castEvents.push(r):n.push({castTime:r.castTime,castEvents:[r]})})),n}function uY(){const[e,t]=A.useState(!1),[n,r]=A.useState(""),[i,o]=A.useState(!1),s=A.useRef(null),l=A.useCallback(a=>{const u=a.target.checked?"player":"none";r(ax({groupBy:u})),o(a.target.checked)},[]);return A.useEffect(()=>{!e||!s.current||s.current.select()},[e,n]),S.jsxs(S.Fragment,{children:[S.jsx(or,{text:"Export MRT",onClick:()=>{t(!0),r(ax({groupBy:i?"player":"none"}))}}),S.jsxs(Kc,{isOpen:e,onCloseRequest:()=>t(!1),className:"relative h-2/3 w-full max-w-screen-lg space-y-2 border-2 border-slate-700 p-4",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx(Yg,{label:"Group by player",checked:i,onChange:l}),S.jsx(gt,{icon:"close",onClick:()=>t(!1),className:"text-md"})]}),S.jsx("textarea",{className:"h-full resize-none bg-slate-900/60 px-3 py-2 text-sm outline-none",value:n,readOnly:!0,ref:s})]})]})}function cY(){return S.jsx("div",{children:S.jsxs("div",{className:"grid grid-cols-2 gap-2 p-3",children:[S.jsx(Lq,{}),S.jsx(Aq,{}),S.jsx(Mq,{}),S.jsx(Pq,{}),S.jsx(Oq,{}),S.jsx(uY,{})]})})}const cx={fight:{icon:"fight",Component:pq},note:{icon:"note",Component:mq},settings:{icon:"settings",Component:cY}};function fY(){const[e,t]=A.useState("fight"),n=A.useCallback(i=>{t(o=>o===i?null:i)},[]);let r=null;return e&&(r=cx[e].Component),S.jsxs("div",{className:Xt("grid grid-cols-[repeat(2,minmax(0px,auto))]",{"border-l-2 border-slate-700":!!r}),children:[r&&S.jsx(r,{}),S.jsx("div",{className:"col-start-2 flex flex-col divide-y-2 divide-slate-700 border-l-2 border-slate-700",children:Object.entries(cx).map(([i,o])=>S.jsx("div",{className:Xt("p-3 text-xl transition-colors duration-150",{"bg-slate-700":e===i}),children:S.jsx(gt,{icon:o.icon,onClick:()=>n(i)})},i))})]})}function dY(){return S.jsxs(XE,{children:[S.jsx(bF,{}),S.jsxs("main",{className:"grid grid-cols-[auto_1fr_auto]",children:[S.jsx(BK,{}),S.jsx(sq,{}),S.jsx(fY,{})]})]})}zd.createRoot(document.getElementById("root")).render(S.jsx(_e.StrictMode,{children:S.jsx(dY,{})})); diff --git a/assets/index-q3wjcOzQ.css b/assets/index-q3wjcOzQ.css new file mode 100644 index 0000000..a6d368f --- /dev/null +++ b/assets/index-q3wjcOzQ.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.-left-2{left:-.5rem}.-left-4{left:-1rem}.-right-4{right:-1rem}.bottom-0{bottom:0}.bottom-\[120\%\]{bottom:120%}.left-0{left:0}.left-1\/2{left:50%}.right-0{right:0}.top-0{top:0}.top-4{top:1rem}.top-6{top:1.5rem}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.col-start-2{grid-column-start:2}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.-ml-2{margin-left:-.5rem}.-mr-3{margin-right:-.75rem}.-mt-2{margin-top:-.5rem}.mb-2{margin-bottom:.5rem}.ml-2{margin-left:.5rem}.mt-1{margin-top:.25rem}.mt-3{margin-top:.75rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-\[4\/3\]{aspect-ratio:4/3}.aspect-\[5\/4\]{aspect-ratio:5/4}.aspect-video{aspect-ratio:16 / 9}.h-0{height:0px}.h-2{height:.5rem}.h-2\/3{height:66.666667%}.h-full{height:100%}.h-px{height:1px}.min-h-\[222px\]{min-height:222px}.min-h-full{min-height:100%}.w-0{width:0px}.w-10{width:2.5rem}.w-3{width:.75rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-\[450px\]{width:450px}.w-\[9px\]{width:9px}.w-full{width:100%}.w-px{width:1px}.min-w-\[18ch\]{min-width:18ch}.max-w-screen-lg{max-width:1024px}.flex-grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[auto_1fr_auto\]{grid-template-columns:auto 1fr auto}.grid-cols-\[minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1fr)}.grid-cols-\[minmax\(0px\,1fr\)\,auto\]{grid-template-columns:minmax(0px,1fr) auto}.grid-cols-\[repeat\(2\,minmax\(0px\,auto\)\)\]{grid-template-columns:repeat(2,minmax(0px,auto))}.grid-cols-\[repeat\(5\,auto\)\]{grid-template-columns:repeat(5,auto)}.grid-cols-\[repeat\(7\,minmax\(0\,auto\)\)\]{grid-template-columns:repeat(7,minmax(0,auto))}.grid-rows-\[auto_minmax\(0px\,1fr\)\]{grid-template-rows:auto minmax(0px,1fr)}.grid-rows-\[minmax\(0\,auto\)\]{grid-template-rows:minmax(0,auto)}.flex-col{flex-direction:column}.place-content-center{place-content:center}.place-content-start{place-content:start}.place-items-start{place-items:start}.place-items-center{place-items:center}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.divide-y-2>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(2px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(2px * var(--tw-divide-y-reverse))}.divide-slate-700>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(51 65 85 / var(--tw-divide-opacity))}.self-end{align-self:flex-end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.border-2{border-width:2px}.border-x-4{border-left-width:4px;border-right-width:4px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-l-\[1px\]{border-left-width:1px}.border-l-\[5px\]{border-left-width:5px}.border-r-2{border-right-width:2px}.border-t-4{border-top-width:4px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-slate-500{--tw-border-opacity: 1;border-color:rgb(100 116 139 / var(--tw-border-opacity))}.border-slate-600{--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity))}.border-slate-700{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity))}.border-slate-700\/75{border-color:#334155bf}.border-transparent{border-color:transparent}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.border-yellow-600{--tw-border-opacity: 1;border-color:rgb(202 138 4 / var(--tw-border-opacity))}.border-r-slate-700{--tw-border-opacity: 1;border-right-color:rgb(51 65 85 / var(--tw-border-opacity))}.border-t-yellow-500{--tw-border-opacity: 1;border-top-color:rgb(234 179 8 / var(--tw-border-opacity))}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity))}.bg-slate-600\/50{background-color:#47556980}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity))}.bg-slate-700\/50{background-color:#33415580}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.bg-slate-800\/75{background-color:#1e293bbf}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity))}.bg-slate-900\/20{background-color:#0f172a33}.bg-slate-900\/40{background-color:#0f172a66}.bg-slate-900\/50{background-color:#0f172a80}.bg-slate-900\/60{background-color:#0f172a99}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[0\.5em\]{padding:.5em}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-1{padding-bottom:.25rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pr-3{padding-right:.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-contrast-dark{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-contrast-light{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-2{outline-width:2px}.outline-slate-600{outline-color:#475569}.outline-transparent{outline-color:transparent}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter-none{filter:none}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[filter\]{transition-property:filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[outline-color\]{transition-property:outline-color;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[outline-width\,outline-color\]{transition-property:outline-width,outline-color;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[outline\]{transition-property:outline;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-500{transition-duration:.5s}body{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}#root{height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto}main{grid-row:2}.os-scrollbar.os-scrollbar-vertical{width:8px}.os-theme-light.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle{background:rgba(248,250,252,.3)}.os-theme-light.os-scrollbar:hover>.os-scrollbar-track>.os-scrollbar-handle{background:rgba(248,250,252,.4)}#drawers-portal{position:relative;z-index:800}#modals-portal{position:relative;z-index:1000}.markdown{font-size:.8rem}.markdown *{all:revert}.markdown ul{padding-left:1.3em}.markdown a{--tw-text-opacity: 1;color:rgb(56 189 248 / var(--tw-text-opacity))}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-slate-100\/20:hover{background-color:#f1f5f933}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.hover\:outline-slate-500:hover{outline-color:#64748b}.focus\:outline-4:focus{outline-width:4px}.disabled\:border-slate-700:disabled{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity))}.disabled\:bg-slate-800:disabled{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.disabled\:text-slate-400:disabled{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.disabled\:text-slate-500:disabled{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.disabled\:hover\:bg-transparent:hover:disabled{background-color:transparent}.group:hover .group-hover\:border-t-yellow-300{--tw-border-opacity: 1;border-top-color:rgb(253 224 71 / var(--tw-border-opacity))}.group:hover .group-hover\:bg-slate-600{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.group:hover .group-hover\:opacity-80{opacity:.8} diff --git a/index.html b/index.html index 7d6c7ae..c2ba640 100644 --- a/index.html +++ b/index.html @@ -5,8 +5,8 @@ CD Planner - - + +